You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: introduce ServerContext and createServer (cppalliance#130)
* added server-context.ts and updated related files
* use disableSuggestFlow
* addressed CI test error
* addressed ai review
* addressed ai reviews
---------
Co-authored-by: zho <jornathanm910923@gmail.com>
Copy file name to clipboardExpand all lines: docs/MIGRATION.md
+77-16Lines changed: 77 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,67 @@ This guide is for **library and MCP client authors** upgrading from earlier **0.
6
6
7
7
Under [semver 0.y.z](https://semver.org/spec/v2.0.0.html#spec-item-4), **0.1.x → 0.2.0 is a breaking minor** — pin `@0.2.0` only after reading this guide.
Module-level helpers (`getPineconeClient`, `registerUrlGenerator`, `requireSuggested`, etc.) continue to work; they delegate to a process-default context.
**Later (future minors/major):** Legacy module getters will be marked `### Deprecated` per [deprecation-policy.md](./deprecation-policy.md). Multi-tenant HTTP embedders should use one `ServerContext` per session rather than sharing process-global state.
65
+
66
+
See also [deprecation-policy.md § Future instance APIs](./deprecation-policy.md#future-instance-apis-servercontext).
67
+
68
+
---
69
+
9
70
## Unreleased: core vs Alliance config defaults
10
71
11
72
**Rationale:** Generic npm consumers must not silently connect to Alliance infrastructure or inherit Alliance rerank settings when using `resolveConfig` from the package root.
@@ -70,12 +131,12 @@ const ns = userInput.trim();
70
131
71
132
**`code` values (discriminated union):**
72
133
73
-
|`code`|`recoverable`| Notes |
74
-
| ------ | --------------- | ----- |
75
-
|`FLOW_GATE`|`true`| Suggestion: call `suggest_query_params` for the namespace first |
76
-
|`VALIDATION`|`true`|**`field` required** — input or `metadata_filter` dot-path |
77
-
|`PINECONE_ERROR`|`true` or `false`| Upstream / network / Pinecone failures |
Copy file name to clipboardExpand all lines: docs/deprecation-policy.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,14 +66,14 @@ Security fixes may break behavior when required; document impact in CHANGELOG an
66
66
67
67
## Future instance APIs (`ServerContext`)
68
68
69
-
A planned refactor introduces **`ServerContext`** and **`createServer(config)`** while keeping legacy module-level getters during a transition. That work will:
69
+
Phase 1 of the **`ServerContext`** / **`createServer(config)`** refactor is available while legacy module-level getters remain supported. See [MIGRATION.md § ServerContext instance APIs](./MIGRATION.md#unreleased-servercontext-instance-apis-phase-1) for upgrade steps.
70
+
71
+
That work will:
70
72
71
73
- Add new instance APIs without removing legacy getters in the same release.
72
74
- Document legacy getters under `### Deprecated` with a named removal target per this policy.
73
75
- Link migration steps from [MIGRATION.md](./MIGRATION.md) to this document.
74
76
75
-
Until that migration guide is published, treat this section as the policy constraint for that refactor.
76
-
77
77
## CHANGELOG format for breaking changes
78
78
79
79
This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Each version block should use the sections that apply: `### Added`, `### Changed`, `### Deprecated`, `### Removed`, `### Fixed`.
0 commit comments