feat(tool-search): add deferred tool visibility with exact loading - #25
Conversation
BREAKING CHANGE: Execution tool authorization and artifact metadata now use hard-cut schemas with no compatibility reader.
Expose a compact deferred tool directory and load known names with select:<name>. Keep BM25 as the auxiliary discovery path and preserve strict authorization and recovery boundaries.
Hydrate absent authorization snapshots and loaded refs with canonical empty values while keeping present malformed data invalid. Do not introduce a data-format version.
|
Important Review skippedToo many files! This PR contains 128 files, which is 28 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (128)
You can disable this status message by setting the 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. Comment |
|
@coderabbitai review |
|
Summary
tool_searchwithselect:<exact registryName>as the primary loading path and deterministic BM25/trigram ranking as an auxiliary natural-language path.Why
Eagerly sending every local and MCP schema increases initial provider context and makes long-tail selection noisier. This keeps common capabilities immediately available while loading less-frequent contracts only when needed, without depending on provider-native Tool Search APIs.
Compatibility and risks
select:<exact registryName>is exact-only; an exact miss does not fall back to ranking. Natural-language recall still depends on metadata quality and language, and deferred use may require one additional model step.toolAuthorizationSnapshotandloadedToolRefs.{ extraTools: [], toolProjection: null }and[], then re-persist normally. No data-format version or migration framework is introduced.tools.toolscontract, namespace-summary compatibility path, and load-all fallback are intentionally removed.Validation
bun run typecheck— 5/5 workspace tasks passedbun run test— 8/8 workspace tasks passedbun run build— production Web build and 308-asset entrypoint passed./dist/archcode --version—archcode 0.0.10bun run tool-contract:measure— Lead initial wire 5,136 tokens; deferred directory 1,188 tokens; combined 6,324 vs. 11,845 baseline (-46.61%)bun run tool-search:benchmark— 1,000 entries / 100 queries; p50 93.54 ms, p95 96.06 msgit diff --check origin/main...HEADDocumentation and security
Related issue
None.