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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ Tagged releases are published to npm from GitHub Actions when a **GitHub Release
8
8
9
9
## [Unreleased]
10
10
11
+
### Changed
12
+
13
+
-**Breaking (core):**`resolveConfig` requires a Pinecone index name and no longer applies Alliance index/rerank defaults. Removed exported `DEFAULT_INDEX_NAME` and `DEFAULT_RERANK_MODEL` from the package root. Rerank is opt-in when `PINECONE_RERANK_MODEL` / `rerankModel` is unset.
14
+
-**Alliance CLI / `resolveAllianceConfig`:** When index or rerank env/CLI values are omitted, defaults remain `rag-hybrid` and `bge-reranker-v2-m3` (API-key-only MCP configs unchanged). See [examples/alliance/.env.example](examples/alliance/.env.example).
Copy file name to clipboardExpand all lines: README.md
+31-17Lines changed: 31 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,15 +108,15 @@ The codebase is split into two layers:
108
108
109
109
## Configuration
110
110
111
-
You need a **Pinecone API key**. **Index**uses `PINECONE_INDEX_NAME`when set, else defaults to `rag-hybrid`; sparse index defaults to `{index}-sparse`. **Reranking**uses`PINECONE_RERANK_MODEL`when set, else `bge-reranker-v2-m3`. MCP configs with only `PINECONE_API_KEY` keep prior Alliance defaults. See [docs/CONFIGURATION.md](docs/CONFIGURATION.md)for every variable and CLI flag.
111
+
You need a **Pinecone API key**. **Index**(`PINECONE_INDEX_NAME`or `--index-name`) is required for core/library use; the **published CLI**defaults to `rag-hybrid` when unset (Alliance deployment). Sparse index defaults to `{index}-sparse`. **Rerank:**set`PINECONE_RERANK_MODEL`to enable; the CLI defaults to `bge-reranker-v2-m3` when unset. See [docs/CONFIGURATION.md](docs/CONFIGURATION.md)(core vs Alliance table).
|`PINECONE_API_KEY`| Yes (for live Pinecone) | — |
118
-
|`PINECONE_INDEX_NAME`| No |`rag-hybrid`when unset|
119
-
|`PINECONE_RERANK_MODEL`| No |`bge-reranker-v2-m3`when unset|
118
+
|`PINECONE_INDEX_NAME`| No (CLI) / Yes (core)|`rag-hybrid`(CLI only)|
119
+
|`PINECONE_RERANK_MODEL`| No |`bge-reranker-v2-m3`(CLI only)|
120
120
|`PINECONE_SPARSE_INDEX_NAME`| No |`{index}-sparse`|
121
121
|`PINECONE_READ_ONLY_MCP_LOG_LEVEL`| No |`INFO` (`DEBUG`–`ERROR`) |
122
122
|`PINECONE_READ_ONLY_MCP_LOG_FORMAT`| No |`text` (`json` for log pipelines) |
@@ -132,9 +132,9 @@ The server uses **process-global** memory for the suggest-flow gate (`suggest_qu
132
132
Treat **`setupCoreServer()` / `setupAllianceServer()` as one logical server per Node process**: they mutate shared module singletons (suggest-flow map, namespaces cache, URL registry, config context, shared `PineconeClient` slot). A **second** setup call in the same process **throws** unless you call **`teardownServer()`** first.
133
133
134
134
-**Generic bridge only:**`import { setupCoreServer, teardownServer, ... } from '@will-cppa/pinecone-read-only-mcp'`
135
-
-**Full Alliance surface (CLI parity):**`import { setupAllianceServer } from '@will-cppa/pinecone-read-only-mcp/alliance'`
For the **generic bridge only**, see [examples/quickstart/mcp-demo.ts](examples/quickstart/mcp-demo.ts) (`setupCoreServer`). For the **full Alliance surface**, use `resolveConfig({ apiKey, indexName, ... })` → `setPineconeClient(new PineconeClient(...))` → `await setupAllianceServer(config)` → connect one MCP transport. See [examples/alliance/library-embedding-demo.ts](examples/alliance/library-embedding-demo.ts) and [docs/TOOLS.md](docs/TOOLS.md#suggest-flow-gate).
137
+
For the **generic bridge only**, see [examples/quickstart/mcp-demo.ts](examples/quickstart/mcp-demo.ts) (`setupCoreServer` + `resolveConfig` with required `indexName`). For the **full Alliance surface**, use `resolveAllianceConfig({ apiKey, ... })` (Alliance index/rerank defaults when omitted, same as the CLI) → `setPineconeClient(new PineconeClient(...))` → `await setupAllianceServer(config)` → connect one MCP transport. See [examples/alliance/library-embedding-demo.ts](examples/alliance/library-embedding-demo.ts) and [docs/TOOLS.md](docs/TOOLS.md#suggest-flow-gate).
Copy file name to clipboardExpand all lines: docs/CONFIGURATION.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Configuration
2
2
3
-
Configuration is built from **CLI flags** (when using the binary), **environment variables**, and **defaults**. Library callers use `resolveConfig(overrides)` with optional `ConfigOverrides`.
3
+
Configuration is built from **CLI flags** (when using the binary), **environment variables**, and **defaults**. Library callers use `resolveConfig(overrides)`(core) or `resolveAllianceConfig(overrides)` (Alliance CLI / `setupAllianceServer`) with optional `ConfigOverrides`.
4
4
5
5
## Precedence
6
6
@@ -15,9 +15,9 @@ Configuration is built from **CLI flags** (when using the binary), **environment
15
15
| Field | Source | Default / notes |
16
16
| ----- | ------ | --------------- |
17
17
|`apiKey`|`apiKey` / `PINECONE_API_KEY`|**Required** (non-empty after trim) |
18
-
|`indexName`|`indexName` / `PINECONE_INDEX_NAME`|`rag-hybrid` when env and overrides omit it|
18
+
|`indexName`|`indexName` / `PINECONE_INDEX_NAME`|**Required** (non-empty after trim)|
**Throws** if `apiKey`or `indexName`is missing after trim.
30
30
31
31
For the full Alliance tool surface (including `suggest_query_params`, `guided_query`, and built-in URL generators), import from `@will-cppa/pinecone-read-only-mcp/alliance` and call `setupAllianceServer(config)`.
32
32
33
-
### Rerank model
33
+
### Core vs Alliance resolvers
34
34
35
-
`resolveConfig` uses `PINECONE_INDEX_NAME` / `PINECONE_RERANK_MODEL` when set; otherwise **`rag-hybrid`** and **`bge-reranker-v2-m3`**. MCP configs that only set `PINECONE_API_KEY` keep the same defaults as before.
35
+
| Resolver | When to use | Index when unset | Rerank when unset |
|`resolveConfig`| Package root, `setupCoreServer`, quickstart |**Throws**| Omitted (no rerank) |
38
+
|`resolveAllianceConfig`| Published CLI, `setupAllianceServer`|`rag-hybrid`|`bge-reranker-v2-m3`|
39
+
40
+
C++ Alliance deployers can copy [examples/alliance/.env.example](../examples/alliance/.env.example). Constants: `ALLIANCE_DEFAULT_INDEX_NAME` / `ALLIANCE_DEFAULT_RERANK_MODEL` from `@will-cppa/pinecone-read-only-mcp/alliance`.
Copy file name to clipboardExpand all lines: docs/MIGRATION.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,25 @@ 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.
8
8
9
+
## Unreleased: core vs Alliance config defaults
10
+
11
+
**Rationale:** Generic npm consumers must not silently connect to Alliance infrastructure or inherit Alliance rerank settings when using `resolveConfig` from the package root.
12
+
13
+
**Migration (core / `setupCoreServer`):**
14
+
15
+
1. Add `PINECONE_INDEX_NAME` to MCP `env` blocks, `.env`, or Docker `-e`, or pass `indexName` in `ConfigOverrides`.
16
+
2. Set `PINECONE_RERANK_MODEL` only when you want reranking; omit it to skip rerank (previously defaulted to `bge-reranker-v2-m3` in core).
17
+
3. Code that imported `DEFAULT_INDEX_NAME` or `DEFAULT_RERANK_MODEL` from the package root should use your own constants or [examples/alliance/preset.ts](../examples/alliance/preset.ts) for Alliance values.
18
+
19
+
Core `resolveConfig` throws `Missing Pinecone index name: …` when the index is unset (same pattern as the API key error).
20
+
21
+
**Alliance CLI / `setupAllianceServer` (unchanged for typical MCP configs):**
22
+
23
+
- The binary uses `resolveAllianceConfig`; API-key-only configs still default to `rag-hybrid` and `bge-reranker-v2-m3`.
24
+
- Explicit env overrides still win. Copy [examples/alliance/.env.example](../examples/alliance/.env.example) to document Alliance conventions.
Copy file name to clipboardExpand all lines: examples/alliance/README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,14 @@ They assume a Pinecone index you control with compatible data (not necessarily t
10
10
11
11
## Required environment
12
12
13
+
Copy [`.env.example`](./.env.example) to `.env` and set your API key. For C++ Alliance infrastructure, use `PINECONE_INDEX_NAME=rag-hybrid` as documented there.
14
+
13
15
| Variable | Required | Notes |
14
16
| -------- | -------- | ----- |
15
17
|`PINECONE_API_KEY`| Yes | For live runs |
16
-
|`PINECONE_INDEX_NAME`| Yes |Your dense index name |
18
+
|`PINECONE_INDEX_NAME`| Yes |Dense index name (Alliance: `rag-hybrid`)|
17
19
18
-
Optional: `PINECONE_RERANK_MODEL`, `PINECONE_SPARSE_INDEX_NAME`, etc. See [docs/CONFIGURATION.md](../../docs/CONFIGURATION.md). CLI-only configs that set only `PINECONE_API_KEY` still use documented defaults (`rag-hybrid`, `bge-reranker-v2-m3`).
20
+
Optional: `PINECONE_RERANK_MODEL`, `PINECONE_SPARSE_INDEX_NAME`, etc. See [docs/CONFIGURATION.md](../../docs/CONFIGURATION.md). The **published CLI** uses `resolveAllianceConfig` and defaults to `rag-hybrid` / `bge-reranker-v2-m3` when those env vars are omitted. Demo constants: [`preset.ts`](./preset.ts).
0 commit comments