Skip to content

feat!: explicit Pinecone config, core/alliance split, generic exports - #109

Merged
wpak-ai merged 6 commits into
cppalliance:mainfrom
jonathanMLDev:feat/config-core-alliance
May 27, 2026
Merged

feat!: explicit Pinecone config, core/alliance split, generic exports#109
wpak-ai merged 6 commits into
cppalliance:mainfrom
jonathanMLDev:feat/config-core-alliance

Conversation

@jonathanMLDev

@jonathanMLDev jonathanMLDev commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Centralizes Pinecone configuration in resolveConfig(), splits the codebase into core (generic MCP–Pinecone bridge) and alliance (Alliance app tools), and limits the default npm export to the core surface. Alliance MCP configs that only set PINECONE_API_KEY keep working via documented defaults (rag-hybrid, bge-reranker-v2-m3).


Changes

Configuration (#104)

  • Single config path: parseCli()resolveConfig()PineconeClient / setupAllianceServer (no process.env reads in the client).
  • Required: PINECONE_API_KEY (or --api-key); clear error if missing.
  • Optional with documented defaults (in src/core/config.ts only — removed from src/constants.ts):
    • PINECONE_INDEX_NAME / --index-name → default rag-hybrid (DEFAULT_INDEX_NAME)
    • PINECONE_RERANK_MODEL / --rerank-model → default bge-reranker-v2-m3 (DEFAULT_RERANK_MODEL)
  • Precedence: CLI overrides → env → defaults.
  • Startup stderr logs resolved index, sparse index, and rerank model.
  • query / query_documents forward rerank_skipped_reason: no_model when rerank was requested but PineconeClient has no model (manual library embed); guided_query exposes decision_trace.rerank_status: skipped_no_model.

Architecture (#105)

  • src/core/setupCoreServer, resolveConfig, PineconeClient, seven generic MCP tools.
  • src/alliance/setupAllianceServer, suggest_query_params, guided_query, Boost/Slack URL builtins.
  • CLI composes the full Alliance surface; package root (".") exports core only.

Exports (#107)

  • Generic URL registry on core (registerUrlGenerator, etc.).
  • Built-in mailing / slack-Cpplang generators on @will-cppa/pinecone-read-only-mcp/alliance.
  • New subpath export: @will-cppa/pinecone-read-only-mcp/alliance.

Breaking changes

Area Before After
Default export setupServer, monolithic src/server.ts setupCoreServer from package root; full server via /alliance
Config Scattered defaults in constants.ts + env reads in client resolveConfig() in src/core/config.ts; explicit DEFAULT_* constants
Library full server import { setupServer } from '…' import { setupAllianceServer } from '…/alliance'
Minimum MCP env Often only documented as key + index Only PINECONE_API_KEY required; index/rerank default when unset (override with env)

Test plan

  • npm run ci (typecheck, lint, format, build, test:coverage)
  • npm run smoke (--help documents index/rerank defaults)
  • API key only (no PINECONE_INDEX_NAME, no --index-name): server starts and stderr shows Using Pinecone index: rag-hybrid (sparse: rag-hybrid-sparse) and rerank model
  • Override: PINECONE_INDEX_NAME=my-index or --index-name my-index used instead of default
  • Examples import from @will-cppa/pinecone-read-only-mcp and @will-cppa/pinecone-read-only-mcp/alliance (no stray backticks in README snippets)

Note: Semver bump and full migration guide deferred to PR B (week4/release).


Related issues

@jonathanMLDev jonathanMLDev self-assigned this May 25, 2026
@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Split repository into a generic core bridge and an Alliance app layer; move config defaults into core; make reranking optional with explicit skip signals; add a URL generation registry and Alliance built-ins; rework package exports; update examples, docs, and tests to match the new layout.

Changes

Core/Alliance Architecture Refactor

Layer / File(s) Summary
Package entrypoints & CLI
package.json, src/index.ts, src/cli.ts, README.md
Root export now points to dist/core; added ./alliance export. CLI and top-level entrypoint use Alliance wiring and document --index-name/--rerank-model behavior.
Core barrel and exports
src/core/index.ts, examples/tsconfig.json
Add src/core barrel re-exporting core APIs (config, PineconeClient, URL registry, setupCoreServer/teardownServer); update example tsconfig paths to source entrypoints.
Core config & types
src/core/config.ts, src/types.ts, src/core/config.test.ts
Centralize DEFAULT_INDEX_NAME/DEFAULT_RERANK_MODEL in core; trim optional inputs; PineconeClientConfig.indexName required; add RerankSkippedReason and optional rerank_skipped_reason fields; tests validate resolution and defaults.
Pinecone client rerank behavior
src/core/pinecone-client.ts, src/core/pinecone-client.test.ts
Client expects resolved config, treats rerankModel as optional, computes effective reranking, and emits rerank_skipped_reason + degradation_reason when rerank requested but no model exists; tests added for skip path.
Rerank decision mapping
src/core/rerank-trace.ts, src/core/rerank-trace.test.ts
Add guidedRerankStatus and tests mapping hybrid query outcomes to `'success'
URL registry (core)
src/core/server/url-registry.ts, src/core/server/url-registry.test.ts
Introduce per-namespace URL generation registry with register/unregister/reset and generation semantics; tests for behavior and custom generator registration.
Core lifecycle
src/core/setup.ts, src/core/server.test.ts
Add setupCoreServer/teardownServer, enforce single-init guard, register core tools, and test lifecycle and URL-generator presence across core vs Alliance setups.
Alliance layer & built-ins
src/alliance/index.ts, src/alliance/setup.ts, src/alliance/url-builtins.ts, src/alliance/url-builtins.test.ts
Add Alliance barrel, setupAllianceServer that registers built-in URL generators and Alliance tools, implement mailing/Slack generators and registration API, and tests for built-ins and overrides.
Tool rewires & tests
src/alliance/tools/*, src/core/server/tools/*, tests/*
Rewire imports to new core/alliance layout, update guided-query to use guidedRerankStatus, forward rerank_skipped_reason through tool responses, and add/adjust tests for query/guided-query/suggest/keyword-search/generate-urls flows.
Docs, examples, changelog, env
README.md, docs/CONFIGURATION.md, .env.example, examples/*, CHANGELOG.md
Document two-layer architecture, update config guidance and defaults, require placeholder PINECONE_INDEX_NAME in examples, update examples to use setupAllianceServer and resolveConfig, and record rerank skip signaling in changelog.
Misc small fixes
various test import/path updates, scripts/test-search.ts, examples/demo-mock-pinecone-client.ts
Import path fixes, test mock adjustments for sparse index naming, and demo mock now supplies indexName to PineconeClient.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • wpak-ai
  • AuraMindNest
  • whisper67265

"A rabbit hops through the tree of code,
separating forest from the load.
Index named, rerank optional, tests in line,
core and alliance, now tidy and fine. 🐇"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.68% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed All coding requirements from #104, #105, and #107 are met: defaults centralized in src/core/config.ts [#104], generic core/alliance layers properly separated [#105], and domain-specific generators moved to alliance submodule [#107].
Out of Scope Changes check ✅ Passed All changes align with the three linked issues: configuration refactoring, architectural split, and URL generator relocation. Documentation updates support the core changes.
Title check ✅ Passed The title 'feat!: explicit Pinecone config, core/alliance split, generic exports' accurately reflects the main architectural and configuration changes in the changeset, clearly identifying the breaking changes and key structural improvements.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented May 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.42424% with 10 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@56ffc29). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/alliance/url-builtins.ts 88.23% 4 Missing ⚠️
src/alliance/config.ts 71.42% 2 Missing ⚠️
src/core/server/tools/query-documents-tool.ts 33.33% 1 Missing and 1 partial ⚠️
src/core/server/url-registry.ts 91.66% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #109   +/-   ##
=======================================
  Coverage        ?   81.21%           
=======================================
  Files           ?       38           
  Lines           ?     1299           
  Branches        ?      430           
=======================================
  Hits            ?     1055           
  Misses          ?      242           
  Partials        ?        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jonathanMLDev

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/cli.ts (1)

132-157: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the first CLI example to include the required index.

Line 155 still shows --api-key only, but --index-name is now required (unless env is set). This example can fail as written.

Proposed fix
-  pinecone-read-only-mcp --api-key YOUR_KEY
+  pinecone-read-only-mcp --api-key YOUR_KEY --index-name my-index
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cli.ts` around lines 132 - 157, The first usage example inside the
process.stdout.write usage block still shows only "--api-key YOUR_KEY" but
--index-name is now required; update that example to include a sample index name
(e.g., "--api-key YOUR_KEY --index-name my-index") and also update the alternate
example that uses env export to include --index-name my-index if not relying on
PINECONE_INDEX_NAME; edit the string passed to process.stdout.write in
src/cli.ts (the Usage/Examples block) so both sample lines show a valid
combination including the required --index-name.
🧹 Nitpick comments (2)
src/alliance/setup.ts (1)

18-18: ⚡ Quick win

Prefer a single Alliance config entrypoint in setup.

Line 18 re-composes Alliance config logic inline. Prefer routing through the Alliance resolver so future Alliance-specific config behavior stays centralized and doesn’t drift.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/alliance/setup.ts` at line 18, The alliance config is being composed
inline by calling applyAllianceRerankDefault directly; instead route through the
centralized Alliance resolver so all Alliance-specific config logic stays in one
place: replace the inline composition that produces allianceConfig (currently
using applyAllianceRerankDefault and resolveConfig) with a single call to the
Alliance resolver (e.g., resolveAllianceConfig) passing the base config (config
?? resolveConfig({})) so that applyAllianceRerankDefault and any future Alliance
adjustments are applied inside that resolver.
src/core/index.ts (1)

19-25: ⚡ Quick win

Export resetUrlGenerationRegistry from the core barrel.

The URL registry export set here omits the reset API, which makes registry state harder to control for consumers using only the package root core entrypoint.

♻️ Proposed fix
 export {
   registerUrlGenerator,
   unregisterUrlGenerator,
+  resetUrlGenerationRegistry,
   generateUrlForNamespace,
   hasUrlGenerator,
 } from './server/url-registry.js';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/core/index.ts` around lines 19 - 25, The core barrel is missing the
resetUrlGenerationRegistry export, so add it to the re-exports in
src/core/index.ts (the same place that re-exports registerUrlGenerator,
unregisterUrlGenerator, generateUrlForNamespace, hasUrlGenerator) by exporting
resetUrlGenerationRegistry from './server/url-registry.js' so consumers can
reset registry state via the core entrypoint; also export its type if applicable
(e.g., the corresponding type name) alongside the existing
UrlGenerationResult/UrlGenerator/UrlGeneratorFn exports.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.env.example:
- Around line 9-11: The .env.example currently pre-enables the reranker by
setting PINECONE_RERANK_MODEL which contradicts the “unset is OK” note; change
the example so the variable is not set by default (either remove the assignment,
leave it blank, or comment it out) and instead provide the example value
(PINECONE_RERANK_MODEL=bge-reranker-v2-m3) as a commented suggestion or separate
example, so setupCoreServer and CLI/alliance behavior remains optional when the
variable is absent.

In `@examples/custom-url-generator.ts`:
- Around line 46-48: The example currently falls back to demo credentials;
remove the silent defaults and make the required env vars explicit by validating
process.env['PINECONE_API_KEY'] and process.env['PINECONE_INDEX_NAME'] (after
trimming) and throw or exit with a clear error if they are missing; then pass
those validated values to resolveAllianceConfig (referencing the apiKey,
indexName, and resolveAllianceConfig identifiers) so the example fails loudly on
misconfiguration instead of using demo values.

In `@examples/README.md`:
- Line 8: Update the README row for library-embedding-demo.ts to reference
resolveAllianceConfig instead of resolveConfig; edit the description to read
something like "Minimal **library embedding** (`resolveAllianceConfig`,
`setPineconeClient`, `setupAllianceServer`)" so it matches the actual symbols
used in library-embedding-demo.ts and avoids the stale resolveConfig reference.

In `@README.md`:
- Around line 131-143: The README example mixes core and alliance APIs: replace
the core resolveConfig usage with the alliance-specific resolver so the sequence
matches the recommended pattern; update the imports to import
resolveAllianceConfig from '`@will-cppa/pinecone-read-only-mcp/alliance`' (instead
of resolveConfig), call resolveAllianceConfig({ ... }) to produce config used by
setPineconeClient(...) and await setupAllianceServer(config), and ensure the
import list and function call references (resolveAllianceConfig,
setPineconeClient, setupAllianceServer, PineconeClient) are aligned.

In `@src/core/pinecone-client.ts`:
- Around line 39-41: Normalize empty-string rerank model inputs in the Pinecone
client constructor: when setting this.rerankModel from config.rerankModel, treat
'' as undefined (e.g., if config.rerankModel === '' then set this.rerankModel =
undefined) so downstream checks (the presence check around rerank usage and the
logic that sets rerank_skipped_reason) behave consistently; update only the
constructor assignment where this.rerankModel is set to ensure blank inputs are
normalized before any methods reference it.

In `@src/core/server/url-registry.ts`:
- Around line 70-76: Registration trims the namespace before storing it, but
unregisterUrlGenerator(namespace) and hasUrlGenerator(namespace) (and the URL
lookup/generation call referenced around the later pair at lines 92-93) use the
raw input causing mismatches; normalize the namespace input consistently by
trimming (e.g., call .trim()) in unregisterUrlGenerator, hasUrlGenerator, and
the URL lookup/generation function so all paths use the same normalized key as
registerUrlGenerator.

---

Outside diff comments:
In `@src/cli.ts`:
- Around line 132-157: The first usage example inside the process.stdout.write
usage block still shows only "--api-key YOUR_KEY" but --index-name is now
required; update that example to include a sample index name (e.g., "--api-key
YOUR_KEY --index-name my-index") and also update the alternate example that uses
env export to include --index-name my-index if not relying on
PINECONE_INDEX_NAME; edit the string passed to process.stdout.write in
src/cli.ts (the Usage/Examples block) so both sample lines show a valid
combination including the required --index-name.

---

Nitpick comments:
In `@src/alliance/setup.ts`:
- Line 18: The alliance config is being composed inline by calling
applyAllianceRerankDefault directly; instead route through the centralized
Alliance resolver so all Alliance-specific config logic stays in one place:
replace the inline composition that produces allianceConfig (currently using
applyAllianceRerankDefault and resolveConfig) with a single call to the Alliance
resolver (e.g., resolveAllianceConfig) passing the base config (config ??
resolveConfig({})) so that applyAllianceRerankDefault and any future Alliance
adjustments are applied inside that resolver.

In `@src/core/index.ts`:
- Around line 19-25: The core barrel is missing the resetUrlGenerationRegistry
export, so add it to the re-exports in src/core/index.ts (the same place that
re-exports registerUrlGenerator, unregisterUrlGenerator,
generateUrlForNamespace, hasUrlGenerator) by exporting
resetUrlGenerationRegistry from './server/url-registry.js' so consumers can
reset registry state via the core entrypoint; also export its type if applicable
(e.g., the corresponding type name) alongside the existing
UrlGenerationResult/UrlGenerator/UrlGeneratorFn exports.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0cf9106e-4108-42a8-ba1d-a40a95616370

📥 Commits

Reviewing files that changed from the base of the PR and between 56ffc29 and 108d062.

📒 Files selected for processing (81)
  • .env.example
  • CHANGELOG.md
  • README.md
  • docs/CONFIGURATION.md
  • examples/README.md
  • examples/custom-url-generator.ts
  • examples/demo-mock-pinecone-client.ts
  • examples/guided-query-demo.ts
  • examples/library-embedding-demo.ts
  • examples/suggest-flow-demo.ts
  • examples/tsconfig.json
  • package.json
  • scripts/test-search.ts
  • src/alliance/config.test.ts
  • src/alliance/config.ts
  • src/alliance/index.ts
  • src/alliance/setup.ts
  • src/alliance/tools/guided-query-tool.test.ts
  • src/alliance/tools/guided-query-tool.ts
  • src/alliance/tools/suggest-query-params-tool.test.ts
  • src/alliance/tools/suggest-query-params-tool.ts
  • src/alliance/url-builtins.test.ts
  • src/alliance/url-builtins.ts
  • src/cli.ts
  • src/constants.ts
  • src/core/config.test.ts
  • src/core/config.ts
  • src/core/index.ts
  • src/core/pinecone-client.test.ts
  • src/core/pinecone-client.ts
  • src/core/pinecone/indexes.test.ts
  • src/core/pinecone/indexes.ts
  • src/core/pinecone/rerank.test.ts
  • src/core/pinecone/rerank.ts
  • src/core/pinecone/search.test.ts
  • src/core/pinecone/search.ts
  • src/core/rerank-trace.test.ts
  • src/core/rerank-trace.ts
  • src/core/server.test.ts
  • src/core/server/client-context.ts
  • src/core/server/config-context.ts
  • src/core/server/format-query-result.test.ts
  • src/core/server/format-query-result.ts
  • src/core/server/metadata-filter.test.ts
  • src/core/server/metadata-filter.ts
  • src/core/server/namespace-router.ts
  • src/core/server/namespace-utils.ts
  • src/core/server/namespaces-cache.ts
  • src/core/server/query-suggestion.ts
  • src/core/server/reassemble-documents.test.ts
  • src/core/server/reassemble-documents.ts
  • src/core/server/retry.test.ts
  • src/core/server/retry.ts
  • src/core/server/suggestion-flow.ts
  • src/core/server/tool-error.test.ts
  • src/core/server/tool-error.ts
  • src/core/server/tool-response.ts
  • src/core/server/tools/count-tool.test.ts
  • src/core/server/tools/count-tool.ts
  • src/core/server/tools/generate-urls-tool.test.ts
  • src/core/server/tools/generate-urls-tool.ts
  • src/core/server/tools/keyword-search-tool.test.ts
  • src/core/server/tools/keyword-search-tool.ts
  • src/core/server/tools/list-namespaces-tool.test.ts
  • src/core/server/tools/list-namespaces-tool.ts
  • src/core/server/tools/namespace-router-tool.test.ts
  • src/core/server/tools/namespace-router-tool.ts
  • src/core/server/tools/query-documents-tool.test.ts
  • src/core/server/tools/query-documents-tool.ts
  • src/core/server/tools/query-tool.test.ts
  • src/core/server/tools/query-tool.ts
  • src/core/server/tools/test-helpers.ts
  • src/core/server/url-registry.test.ts
  • src/core/server/url-registry.ts
  • src/core/setup.ts
  • src/index.ts
  • src/logger.ts
  • src/server.ts
  • src/server/url-generation.test.ts
  • src/server/url-generation.ts
  • src/types.ts
💤 Files with no reviewable changes (3)
  • src/server/url-generation.test.ts
  • src/server/url-generation.ts
  • src/server.ts

Comment thread .env.example Outdated
Comment thread examples/custom-url-generator.ts Outdated
Comment thread examples/README.md Outdated
Comment thread README.md
Comment thread src/core/pinecone-client.ts
Comment thread src/core/server/url-registry.ts Outdated
Comment thread .env.example Outdated
Comment thread CHANGELOG.md Outdated
Comment thread README.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 96-107: The docs contradict whether reranking is enabled by
default: reconcile the behavior for PINECONE_RERANK_MODEL and the CLI flag
--rerank-model so both sections say the same thing; pick the canonical behavior
(either default to bge-reranker-v2-m3 when unset, or treat omission as disabling
rerank), then update the Quick reference row for PINECONE_RERANK_MODEL and the
CLI docs for --rerank-model to reflect that choice, and add a short note showing
how to explicitly disable reranking (e.g. using a special value like "none" or a
dedicated flag) so operators know how to turn reranking off. Ensure both places
reference PINECONE_RERANK_MODEL and --rerank-model consistently.

In `@src/alliance/config.ts`:
- Around line 2-3: resolveAllianceConfig currently aliases straight to
resolveConfig and thus injects the default rerank model even when the env var
PINECONE_RERANK_MODEL is unset; change resolveAllianceConfig so it does not
force a default value—call resolveConfig or build the returned config such that
rerank model remains undefined when process.env.PINECONE_RERANK_MODEL is not set
(do not substitute 'bge-reranker-v2-m3' yourself), i.e., detect
PINECONE_RERANK_MODEL and only set rerankModel when present so unset remains
opt-out.

In `@src/core/config.ts`:
- Around line 30-31: The config currently forces DEFAULT_RERANK_MODEL into
rerankModel during resolveConfig()/config construction which makes reranking
always enabled; change the logic so that if the env var PINECONE_RERANK_MODEL is
unset or blank we leave rerankModel undefined (or empty) instead of assigning
DEFAULT_RERANK_MODEL, thereby restoring the "disabled when unset" behavior.
Update the resolver that sets rerankModel (reference symbol: resolveConfig /
rerankModel / DEFAULT_RERANK_MODEL) to only assign DEFAULT_RERANK_MODEL when a
specific "enable" flag or explicit instruction is present (or when callers
explicitly request default), and adjust the config type/consumers if needed to
accept undefined/'' as the skip/no_model path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3ac903bf-475b-4ea5-92d3-3e50f0492e76

📥 Commits

Reviewing files that changed from the base of the PR and between 108d062 and 665a6b4.

📒 Files selected for processing (24)
  • .env.example
  • CHANGELOG.md
  • README.md
  • docs/CONFIGURATION.md
  • examples/README.md
  • examples/custom-url-generator.ts
  • examples/guided-query-demo.ts
  • examples/library-embedding-demo.ts
  • examples/suggest-flow-demo.ts
  • src/alliance/config.test.ts
  • src/alliance/config.ts
  • src/alliance/setup.ts
  • src/cli.ts
  • src/core/config.test.ts
  • src/core/config.ts
  • src/core/index.ts
  • src/core/pinecone-client.ts
  • src/core/server/tools/query-documents-tool.ts
  • src/core/server/tools/query-tool.test.ts
  • src/core/server/tools/query-tool.ts
  • src/core/server/url-registry.ts
  • src/core/setup.ts
  • src/index.ts
  • src/types.ts
💤 Files with no reviewable changes (1)
  • src/core/setup.ts
✅ Files skipped from review due to trivial changes (2)
  • examples/README.md
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (8)
  • src/core/server/tools/query-tool.ts
  • src/core/config.test.ts
  • src/core/index.ts
  • examples/suggest-flow-demo.ts
  • examples/library-embedding-demo.ts
  • docs/CONFIGURATION.md
  • src/core/pinecone-client.ts
  • src/core/server/url-registry.ts

Comment thread README.md Outdated
Comment thread src/alliance/config.ts
Comment thread src/core/config.ts
@jonathanMLDev
jonathanMLDev requested a review from wpak-ai May 27, 2026 16:17
@jonathanMLDev jonathanMLDev changed the title updated project structure feat!: explicit Pinecone config, core/alliance split, generic exports May 27, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/core/config.ts`:
- Around line 118-120: The code currently assigns indexName with a fallback to
DEFAULT_INDEX_NAME; change this to require an explicit value instead: obtain the
candidate from overrides.indexName or env['PINECONE_INDEX_NAME'] using
trimOptional and if the result is null/empty, throw a clear configuration error
(or return a failure) rather than defaulting to DEFAULT_INDEX_NAME so callers of
this module cannot silently use "rag-hybrid"; adjust the logic around the
indexName variable (referencing overrides.indexName, env['PINECONE_INDEX_NAME'],
trimOptional, and DEFAULT_INDEX_NAME) to enforce and surface a missing-index
configuration error.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b6055e7a-432a-4783-bc0d-213e66f330d8

📥 Commits

Reviewing files that changed from the base of the PR and between c893fc1 and 7757de2.

📒 Files selected for processing (10)
  • .env.example
  • CHANGELOG.md
  • README.md
  • docs/CONFIGURATION.md
  • examples/README.md
  • src/cli.ts
  • src/core/config.test.ts
  • src/core/config.ts
  • src/core/index.ts
  • src/types.ts
✅ Files skipped from review due to trivial changes (5)
  • .env.example
  • CHANGELOG.md
  • examples/README.md
  • src/core/index.ts
  • docs/CONFIGURATION.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/types.ts

Comment thread src/core/config.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants