Add buildSingleVaultTool: one owner for the single-vault dispatch contract - #121
Merged
Merged
Conversation
…h contract Refs #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…dSingleVaultTool Refs #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…gh the builder Refs #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e separator heuristic Refs #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…odules Refs #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Refs #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… nine descriptions Refs #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Refs #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…hange Refs #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidates the explicit-vault dispatch contract (vault param, suffix-last description, resolver call) into
buildSingleVaultToolfor all nine single-vault tools; deletesbuildMultiVaultTool's separator heuristic; lint-enforces the import boundary; adds builder-levelVAULT_REQUIREDcoverage through the registration gate.What changed
src/lib/single-vault-tool.ts(new) — the mirror ofbuildMultiVaultToolfor the explicit-vault class. A discriminated spec union onsemantic: thesemantic: truevariant resolves throughresolveSemanticVaultand typesentry.backendas present, cast-free.read_notes,create_note,edit_note,read_daily,set_property,remove_property,get_note_links) and two semantic (get_similar_notes,find_duplicates). 27 hand-rolled repetitions of the vault param spread, suffix concatenation, and resolver call are gone.describeMultiVaultreturns the bare block; thespec.description.includes('\n')separator heuristic is deleted.create_notehad prose after the vault contract text;get_note_linksfolded the suffix into a.join('\n')array element. Both now end their domain description before the builder appends. Words unchanged, position fixed.no-restricted-importsoverride banssrc/modules/**from importinglib/vault-param.js/lib/resolve-vault.js. Probed with the verbatimnpm run lint.No tool-contract change
Parameter names, error codes, and dispatch prose wording are untouched. All 14 registered
tools/listdescriptions were rendered whitespace-normalized againstmainand diffed word-wise: the only difference iscreate_note's repositioned overwrite sentence. The other 13 are word-identical.Tests
108 files / 1 347 tests green (from 107 / 1 342).
npm run lint,npm run typecheck,npm run buildclean.test/lib/single-vault-tool.test.ts— builder behaviour through the registration gate (registerTool+callTool/expectToolError, per ADR-0015):VAULT_REQUIREDcode anddetails, named-vault targeting, unknown-vault failure, single-vault fallthrough,vaultadvertisement, suffix placement, semantic readiness routing.test/lib/explicit-vault-prose.test.ts— pins the suffix as the final paragraph of all nine registered descriptions. Probed againstmain'screate-note.ts, where it fails.Change:
openspec/changes/archive/2026-08-30-single-vault-dispatch-builder(verify + retrospective included).Closes #111
🤖 Generated with Claude Code