@specship/specship-win32-arm64 0.24.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/specship.cmd +31 -1
- package/lib/dist/activation/cheatsheet.d.ts +17 -1
- package/lib/dist/activation/cheatsheet.d.ts.map +1 -1
- package/lib/dist/activation/cheatsheet.js +47 -3
- package/lib/dist/activation/cheatsheet.js.map +1 -1
- package/lib/dist/activation/hook-output.d.ts +80 -0
- package/lib/dist/activation/hook-output.d.ts.map +1 -0
- package/lib/dist/activation/hook-output.js +103 -0
- package/lib/dist/activation/hook-output.js.map +1 -0
- package/lib/dist/activation/search-intercept.d.ts +60 -29
- package/lib/dist/activation/search-intercept.d.ts.map +1 -1
- package/lib/dist/activation/search-intercept.js +159 -55
- package/lib/dist/activation/search-intercept.js.map +1 -1
- package/lib/dist/activation/steering.d.ts +11 -13
- package/lib/dist/activation/steering.d.ts.map +1 -1
- package/lib/dist/activation/steering.js +25 -10
- package/lib/dist/activation/steering.js.map +1 -1
- package/lib/dist/behaviour/behaviour-surface.d.ts +47 -0
- package/lib/dist/behaviour/behaviour-surface.d.ts.map +1 -1
- package/lib/dist/behaviour/behaviour-surface.js +108 -2
- package/lib/dist/behaviour/behaviour-surface.js.map +1 -1
- package/lib/dist/bin/node-version-check.d.ts +22 -7
- package/lib/dist/bin/node-version-check.d.ts.map +1 -1
- package/lib/dist/bin/node-version-check.js +39 -9
- package/lib/dist/bin/node-version-check.js.map +1 -1
- package/lib/dist/bin/specship.js +989 -116
- package/lib/dist/bin/specship.js.map +1 -1
- package/lib/dist/commands/specship/learn.md +27 -3
- package/lib/dist/commands/specship/spec.md +85 -15
- package/lib/dist/db/spec-queries.d.ts +73 -3
- package/lib/dist/db/spec-queries.d.ts.map +1 -1
- package/lib/dist/db/spec-queries.js +139 -5
- package/lib/dist/db/spec-queries.js.map +1 -1
- package/lib/dist/db/sqlite-adapter.d.ts +7 -5
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +11 -9
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/enforce/changed-files.d.ts +39 -0
- package/lib/dist/enforce/changed-files.d.ts.map +1 -0
- package/lib/dist/enforce/changed-files.js +114 -0
- package/lib/dist/enforce/changed-files.js.map +1 -0
- package/lib/dist/enforce/enforce.d.ts +53 -2
- package/lib/dist/enforce/enforce.d.ts.map +1 -1
- package/lib/dist/enforce/enforce.js +95 -8
- package/lib/dist/enforce/enforce.js.map +1 -1
- package/lib/dist/enforce/mutation.d.ts +46 -0
- package/lib/dist/enforce/mutation.d.ts.map +1 -0
- package/lib/dist/enforce/mutation.js +104 -0
- package/lib/dist/enforce/mutation.js.map +1 -0
- package/lib/dist/enforce/suppressions.d.ts +33 -0
- package/lib/dist/enforce/suppressions.d.ts.map +1 -0
- package/lib/dist/enforce/suppressions.js +159 -0
- package/lib/dist/enforce/suppressions.js.map +1 -0
- package/lib/dist/extraction/grammars.d.ts +10 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +32 -3
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +7 -0
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/specs/markdown-spec-extractor.d.ts +7 -0
- package/lib/dist/extraction/specs/markdown-spec-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/specs/markdown-spec-extractor.js +97 -10
- package/lib/dist/extraction/specs/markdown-spec-extractor.js.map +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-pascal.wasm.gz +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm.gz +0 -0
- package/lib/dist/graph/spec-coverage.d.ts +142 -0
- package/lib/dist/graph/spec-coverage.d.ts.map +1 -0
- package/lib/dist/graph/spec-coverage.js +276 -0
- package/lib/dist/graph/spec-coverage.js.map +1 -0
- package/lib/dist/health/smoke-check.js +2 -2
- package/lib/dist/health/smoke-check.js.map +1 -1
- package/lib/dist/index.d.ts +75 -7
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +191 -23
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/gemini-commands.d.ts +107 -0
- package/lib/dist/installer/gemini-commands.d.ts.map +1 -0
- package/lib/dist/installer/gemini-commands.js +264 -0
- package/lib/dist/installer/gemini-commands.js.map +1 -0
- package/lib/dist/installer/index.d.ts +55 -8
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +72 -53
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/init-offer.d.ts +14 -9
- package/lib/dist/installer/init-offer.d.ts.map +1 -1
- package/lib/dist/installer/init-offer.js +13 -9
- package/lib/dist/installer/init-offer.js.map +1 -1
- package/lib/dist/installer/install-defaults.d.ts +81 -0
- package/lib/dist/installer/install-defaults.d.ts.map +1 -0
- package/lib/dist/installer/install-defaults.js +95 -0
- package/lib/dist/installer/install-defaults.js.map +1 -0
- package/lib/dist/installer/instructions-template.d.ts +22 -0
- package/lib/dist/installer/instructions-template.d.ts.map +1 -1
- package/lib/dist/installer/instructions-template.js +37 -1
- package/lib/dist/installer/instructions-template.js.map +1 -1
- package/lib/dist/installer/targets/claude.d.ts +18 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +70 -23
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/gemini.d.ts +85 -12
- package/lib/dist/installer/targets/gemini.d.ts.map +1 -1
- package/lib/dist/installer/targets/gemini.js +527 -30
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +13 -0
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +22 -4
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +12 -0
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/jira/auto-publish.d.ts +71 -4
- package/lib/dist/jira/auto-publish.d.ts.map +1 -1
- package/lib/dist/jira/auto-publish.js +186 -17
- package/lib/dist/jira/auto-publish.js.map +1 -1
- package/lib/dist/jira/reconcile.d.ts +24 -1
- package/lib/dist/jira/reconcile.d.ts.map +1 -1
- package/lib/dist/jira/reconcile.js +46 -2
- package/lib/dist/jira/reconcile.js.map +1 -1
- package/lib/dist/jira/repo-config.d.ts +9 -0
- package/lib/dist/jira/repo-config.d.ts.map +1 -1
- package/lib/dist/jira/repo-config.js +11 -0
- package/lib/dist/jira/repo-config.js.map +1 -1
- package/lib/dist/jira/types.d.ts +7 -0
- package/lib/dist/jira/types.d.ts.map +1 -1
- package/lib/dist/jira/types.js.map +1 -1
- package/lib/dist/knowledge/enforce.d.ts +75 -0
- package/lib/dist/knowledge/enforce.d.ts.map +1 -0
- package/lib/dist/knowledge/enforce.js +250 -0
- package/lib/dist/knowledge/enforce.js.map +1 -0
- package/lib/dist/knowledge/facts.d.ts +33 -0
- package/lib/dist/knowledge/facts.d.ts.map +1 -0
- package/lib/dist/knowledge/facts.js +117 -0
- package/lib/dist/knowledge/facts.js.map +1 -0
- package/lib/dist/knowledge/proposals.d.ts +88 -0
- package/lib/dist/knowledge/proposals.d.ts.map +1 -0
- package/lib/dist/knowledge/proposals.js +360 -0
- package/lib/dist/knowledge/proposals.js.map +1 -0
- package/lib/dist/knowledge/stale.d.ts +64 -0
- package/lib/dist/knowledge/stale.d.ts.map +1 -0
- package/lib/dist/knowledge/stale.js +174 -0
- package/lib/dist/knowledge/stale.js.map +1 -0
- package/lib/dist/mcp/fitness-tool.d.ts +5 -6
- package/lib/dist/mcp/fitness-tool.d.ts.map +1 -1
- package/lib/dist/mcp/fitness-tool.js +0 -16
- package/lib/dist/mcp/fitness-tool.js.map +1 -1
- package/lib/dist/mcp/gemini-session.d.ts +50 -0
- package/lib/dist/mcp/gemini-session.d.ts.map +1 -0
- package/lib/dist/mcp/gemini-session.js +159 -0
- package/lib/dist/mcp/gemini-session.js.map +1 -0
- package/lib/dist/mcp/health-tool.d.ts +26 -0
- package/lib/dist/mcp/health-tool.d.ts.map +1 -0
- package/lib/dist/mcp/health-tool.js +50 -0
- package/lib/dist/mcp/health-tool.js.map +1 -0
- package/lib/dist/mcp/jira-tools.d.ts.map +1 -1
- package/lib/dist/mcp/jira-tools.js +25 -0
- package/lib/dist/mcp/jira-tools.js.map +1 -1
- package/lib/dist/mcp/maintainability-tool.d.ts +5 -7
- package/lib/dist/mcp/maintainability-tool.d.ts.map +1 -1
- package/lib/dist/mcp/maintainability-tool.js +0 -16
- package/lib/dist/mcp/maintainability-tool.js.map +1 -1
- package/lib/dist/mcp/model-context.d.ts +31 -7
- package/lib/dist/mcp/model-context.d.ts.map +1 -1
- package/lib/dist/mcp/model-context.js +70 -21
- package/lib/dist/mcp/model-context.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +5 -2
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +16 -15
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +72 -5
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.js +1 -1
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/spec-tools.d.ts +9 -1
- package/lib/dist/mcp/spec-tools.d.ts.map +1 -1
- package/lib/dist/mcp/spec-tools.js +282 -49
- package/lib/dist/mcp/spec-tools.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +49 -9
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +210 -58
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/pulse/pulse.d.ts +93 -0
- package/lib/dist/pulse/pulse.d.ts.map +1 -0
- package/lib/dist/pulse/pulse.js +401 -0
- package/lib/dist/pulse/pulse.js.map +1 -0
- package/lib/dist/reflect/apply.d.ts.map +1 -1
- package/lib/dist/reflect/apply.js +38 -3
- package/lib/dist/reflect/apply.js.map +1 -1
- package/lib/dist/reflect/auto-sweep.d.ts +26 -0
- package/lib/dist/reflect/auto-sweep.d.ts.map +1 -0
- package/lib/dist/reflect/auto-sweep.js +90 -0
- package/lib/dist/reflect/auto-sweep.js.map +1 -0
- package/lib/dist/reflect/cli.d.ts +62 -0
- package/lib/dist/reflect/cli.d.ts.map +1 -0
- package/lib/dist/reflect/cli.js +163 -0
- package/lib/dist/reflect/cli.js.map +1 -0
- package/lib/dist/reflect/miner.d.ts.map +1 -1
- package/lib/dist/reflect/miner.js +119 -0
- package/lib/dist/reflect/miner.js.map +1 -1
- package/lib/dist/reflect/sweep.d.ts +1 -0
- package/lib/dist/reflect/sweep.d.ts.map +1 -1
- package/lib/dist/reflect/sweep.js +62 -13
- package/lib/dist/reflect/sweep.js.map +1 -1
- package/lib/dist/reflect/targets.d.ts +2 -0
- package/lib/dist/reflect/targets.d.ts.map +1 -1
- package/lib/dist/reflect/targets.js +33 -0
- package/lib/dist/reflect/targets.js.map +1 -1
- package/lib/dist/reflect/types.d.ts +19 -2
- package/lib/dist/reflect/types.d.ts.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.d.ts +44 -2
- package/lib/dist/resolution/spec-link-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.js +132 -0
- package/lib/dist/resolution/spec-link-resolver.js.map +1 -1
- package/lib/dist/resolution/test-title-links.d.ts +62 -0
- package/lib/dist/resolution/test-title-links.d.ts.map +1 -0
- package/lib/dist/resolution/test-title-links.js +97 -0
- package/lib/dist/resolution/test-title-links.js.map +1 -0
- package/lib/dist/search/query-parser.d.ts.map +1 -1
- package/lib/dist/search/query-parser.js +6 -1
- package/lib/dist/search/query-parser.js.map +1 -1
- package/lib/dist/server/project-registry.js +1 -1
- package/lib/dist/server/routes/claude.js +24 -43
- package/lib/dist/server/routes/graph.js +53 -7
- package/lib/dist/server/routes/knowledge.js +118 -0
- package/lib/dist/server/routes/mcp.js +4 -3
- package/lib/dist/server/routes/projects.js +4 -4
- package/lib/dist/server/routes/spec.js +49 -7
- package/lib/dist/server/server.js +31 -17
- package/lib/dist/skills/spec-author/SKILL.md +164 -0
- package/lib/dist/skills/spec-author/references/format.md +210 -0
- package/lib/dist/skills/spec-author/references/gap-questions.md +152 -0
- package/lib/dist/skills/spec-author/references/quality-rubric.md +125 -0
- package/lib/dist/skills/spec-author/references/review-checklist.md +175 -0
- package/lib/dist/spec-lint/lint.d.ts +82 -0
- package/lib/dist/spec-lint/lint.d.ts.map +1 -0
- package/lib/dist/spec-lint/lint.js +491 -0
- package/lib/dist/spec-lint/lint.js.map +1 -0
- package/lib/dist/spec-quality/criterion-ids.d.ts +13 -0
- package/lib/dist/spec-quality/criterion-ids.d.ts.map +1 -0
- package/lib/dist/spec-quality/criterion-ids.js +38 -0
- package/lib/dist/spec-quality/criterion-ids.js.map +1 -0
- package/lib/dist/spec-quality/evidence-kind.d.ts +54 -0
- package/lib/dist/spec-quality/evidence-kind.d.ts.map +1 -0
- package/lib/dist/spec-quality/evidence-kind.js +183 -0
- package/lib/dist/spec-quality/evidence-kind.js.map +1 -0
- package/lib/dist/spec-quality/link-persist.d.ts +65 -0
- package/lib/dist/spec-quality/link-persist.d.ts.map +1 -0
- package/lib/dist/spec-quality/link-persist.js +249 -0
- package/lib/dist/spec-quality/link-persist.js.map +1 -0
- package/lib/dist/spec-quality/plan-scope.d.ts +38 -0
- package/lib/dist/spec-quality/plan-scope.d.ts.map +1 -0
- package/lib/dist/spec-quality/plan-scope.js +129 -0
- package/lib/dist/spec-quality/plan-scope.js.map +1 -0
- package/lib/dist/spec-quality/postcheck.d.ts +85 -0
- package/lib/dist/spec-quality/postcheck.d.ts.map +1 -0
- package/lib/dist/spec-quality/postcheck.js +390 -0
- package/lib/dist/spec-quality/postcheck.js.map +1 -0
- package/lib/dist/spec-quality/readiness.d.ts +72 -0
- package/lib/dist/spec-quality/readiness.d.ts.map +1 -0
- package/lib/dist/spec-quality/readiness.js +226 -0
- package/lib/dist/spec-quality/readiness.js.map +1 -0
- package/lib/dist/statusline/index.js.map +1 -1
- package/lib/dist/statusline/render.d.ts +1 -1
- package/lib/dist/statusline/render.d.ts.map +1 -1
- package/lib/dist/statusline/render.js +3 -1
- package/lib/dist/statusline/render.js.map +1 -1
- package/lib/dist/ui/assets/index-BzuUWUAE.js +50 -0
- package/lib/dist/ui/index.html +1 -1
- package/lib/dist/verify/report-ingest.d.ts +88 -0
- package/lib/dist/verify/report-ingest.d.ts.map +1 -0
- package/lib/dist/verify/report-ingest.js +269 -0
- package/lib/dist/verify/report-ingest.js.map +1 -0
- package/lib/dist/workflows/agents/claude.d.ts +16 -0
- package/lib/dist/workflows/agents/claude.d.ts.map +1 -0
- package/lib/dist/workflows/agents/claude.js +82 -0
- package/lib/dist/workflows/agents/claude.js.map +1 -0
- package/lib/dist/workflows/agents/gemini.d.ts +21 -0
- package/lib/dist/workflows/agents/gemini.d.ts.map +1 -0
- package/lib/dist/workflows/agents/gemini.js +124 -0
- package/lib/dist/workflows/agents/gemini.js.map +1 -0
- package/lib/dist/workflows/agents/index.d.ts +28 -0
- package/lib/dist/workflows/agents/index.d.ts.map +1 -0
- package/lib/dist/workflows/agents/index.js +104 -0
- package/lib/dist/workflows/agents/index.js.map +1 -0
- package/lib/dist/workflows/agents/types.d.ts +55 -0
- package/lib/dist/workflows/agents/types.d.ts.map +1 -0
- package/lib/dist/workflows/agents/types.js +46 -0
- package/lib/dist/workflows/agents/types.js.map +1 -0
- package/lib/dist/workflows/batch.d.ts +63 -0
- package/lib/dist/workflows/batch.d.ts.map +1 -0
- package/lib/dist/workflows/batch.js +151 -0
- package/lib/dist/workflows/batch.js.map +1 -0
- package/lib/dist/workflows/defaults/claude-design-implement.yaml +3 -4
- package/lib/dist/workflows/defaults/spec-author.yaml +11 -9
- package/lib/dist/workflows/defaults/spec-fix.yaml +103 -12
- package/lib/dist/workflows/defaults/spec-implement-mixed.yaml +21 -193
- package/lib/dist/workflows/defaults/spec-implement.yaml +701 -41
- package/lib/dist/workflows/defaults/spec-verify.yaml +60 -9
- package/lib/dist/workflows/discovery.d.ts +13 -0
- package/lib/dist/workflows/discovery.d.ts.map +1 -1
- package/lib/dist/workflows/discovery.js +79 -17
- package/lib/dist/workflows/discovery.js.map +1 -1
- package/lib/dist/workflows/executor.d.ts +18 -0
- package/lib/dist/workflows/executor.d.ts.map +1 -1
- package/lib/dist/workflows/executor.js +130 -33
- package/lib/dist/workflows/executor.js.map +1 -1
- package/lib/dist/workflows/gc.d.ts +50 -0
- package/lib/dist/workflows/gc.d.ts.map +1 -0
- package/lib/dist/workflows/gc.js +120 -0
- package/lib/dist/workflows/gc.js.map +1 -0
- package/lib/dist/workflows/merge-queue.d.ts +64 -0
- package/lib/dist/workflows/merge-queue.d.ts.map +1 -0
- package/lib/dist/workflows/merge-queue.js +162 -0
- package/lib/dist/workflows/merge-queue.js.map +1 -0
- package/lib/dist/workflows/runners/approval.d.ts +1 -1
- package/lib/dist/workflows/runners/approval.d.ts.map +1 -1
- package/lib/dist/workflows/runners/approval.js +11 -2
- package/lib/dist/workflows/runners/approval.js.map +1 -1
- package/lib/dist/workflows/runners/bash.d.ts +15 -0
- package/lib/dist/workflows/runners/bash.d.ts.map +1 -1
- package/lib/dist/workflows/runners/bash.js +50 -1
- package/lib/dist/workflows/runners/bash.js.map +1 -1
- package/lib/dist/workflows/runners/prompt.d.ts +16 -41
- package/lib/dist/workflows/runners/prompt.d.ts.map +1 -1
- package/lib/dist/workflows/runners/prompt.js +55 -120
- package/lib/dist/workflows/runners/prompt.js.map +1 -1
- package/lib/dist/workflows/runners/types.d.ts +12 -0
- package/lib/dist/workflows/runners/types.d.ts.map +1 -1
- package/lib/dist/workflows/schemas/workflow.d.ts +17 -0
- package/lib/dist/workflows/schemas/workflow.d.ts.map +1 -1
- package/lib/dist/workflows/schemas/workflow.js +27 -0
- package/lib/dist/workflows/schemas/workflow.js.map +1 -1
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +8 -4
- package/package.json +5 -3
- package/lib/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/lib/dist/server/ingest/impact-query.js +0 -343
- package/lib/dist/server/routes/events.js +0 -152
- package/lib/dist/ui/assets/index-CjjaftDw.js +0 -50
- package/node.exe +0 -4
package/lib/dist/mcp/tools.d.ts
CHANGED
|
@@ -111,7 +111,36 @@ export declare const MAX_PINNED_FILES = 4;
|
|
|
111
111
|
* query order (earliest-named pins first) and are capped.
|
|
112
112
|
*/
|
|
113
113
|
export declare function resolveNamedFilePaths(tokens: readonly string[], filePaths: readonly string[], cap?: number): string[];
|
|
114
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Lite-tier overlay on a size-tier budget (REQ-LOWEND-004).
|
|
116
|
+
*
|
|
117
|
+
* A low-end model abandons a tool chain the instant an answer looks partial,
|
|
118
|
+
* so it needs the top cluster COMPLETE far more than it needs a wide survey.
|
|
119
|
+
* The overlay therefore concentrates the tier's existing budget rather than
|
|
120
|
+
* enlarging it: `maxOutputChars` is untouched (it is the ~24K inline
|
|
121
|
+
* tool-result ceiling — exceeding it makes the host externalize the payload
|
|
122
|
+
* to a file the agent Reads back, re-introducing the very read this exists to
|
|
123
|
+
* prevent), while `maxCharsPerFile` rises and `defaultMaxFiles` falls so the
|
|
124
|
+
* same bytes land as fuller bodies on fewer files. `maxCharsPerFile` is a
|
|
125
|
+
* `max()` and `defaultMaxFiles` a `min()`, so the overlay can never shrink a
|
|
126
|
+
* body below what its size tier already returns (the monotonicity invariant
|
|
127
|
+
* in `src/mcp/CLAUDE.md`).
|
|
128
|
+
*
|
|
129
|
+
* The meta-text flags are the INVERSE of the small-repo tiers, hence explicit
|
|
130
|
+
* overrides rather than reuse: the trailing lists (additional files, budget
|
|
131
|
+
* note) are breadth pointers a lite model won't productively follow, but the
|
|
132
|
+
* completeness signal — "this source is complete, do NOT re-read" — is the one
|
|
133
|
+
* line that stops the Read fallback, so it is always on regardless of size.
|
|
134
|
+
*/
|
|
135
|
+
export declare function applyLiteExploreBudget(base: ExploreOutputBudget): ExploreOutputBudget;
|
|
136
|
+
/**
|
|
137
|
+
* Output budget for one `specship_explore` call: the project-size tier,
|
|
138
|
+
* optionally overlaid by the session's model tier.
|
|
139
|
+
*
|
|
140
|
+
* `tier` defaults to `full`, and `standard` is a pass-through, so full- and
|
|
141
|
+
* standard-tier output stays byte-identical to today (REQ-LOWEND-004.A3).
|
|
142
|
+
*/
|
|
143
|
+
export declare function getExploreOutputBudget(fileCount: number, tier?: ModelTier): ExploreOutputBudget;
|
|
115
144
|
/**
|
|
116
145
|
* Per-file staleness banner emitted at the top of a tool response when the
|
|
117
146
|
* file watcher has pending events for files referenced by the response.
|
|
@@ -171,13 +200,16 @@ export declare function integrationEnabled(name: IntegrationName, env?: NodeJS.P
|
|
|
171
200
|
export declare function toolIntegration(toolName: string): IntegrationName | null;
|
|
172
201
|
/** Drop tools whose integration isn't enabled (REQ-INTEG-001.A1/A2). */
|
|
173
202
|
export declare function filterIntegrationTools(list: ToolDefinition[], env?: NodeJS.ProcessEnv): ToolDefinition[];
|
|
203
|
+
export declare function applyLiteTierTrim(list: ToolDefinition[], hint: string | null): ToolDefinition[];
|
|
174
204
|
/**
|
|
175
205
|
* Allowlist-filtered tool definitions WITHOUT an engine — the static surface the
|
|
176
206
|
* proxy answers `tools/list` with before any project is open. Mirrors
|
|
177
207
|
* `ToolHandler.getTools()` in the no-SpecShip case (the dynamic per-repo budget
|
|
178
208
|
* note in a description only adds once `cg` is loaded; the schemas are static).
|
|
209
|
+
* When a project-root hint is given, the lite-tier trim applies here too
|
|
210
|
+
* (REQ-LOWMODEL-004.A4) — the marker file needs no DB open.
|
|
179
211
|
*/
|
|
180
|
-
export declare function getStaticTools(): ToolDefinition[];
|
|
212
|
+
export declare function getStaticTools(projectRootHint?: string | null): ToolDefinition[];
|
|
181
213
|
/**
|
|
182
214
|
* Tool handler that executes tools against a SpecShip instance
|
|
183
215
|
*
|
|
@@ -223,6 +255,13 @@ export declare class ToolHandler {
|
|
|
223
255
|
private toolAllowlist;
|
|
224
256
|
/** Whether a tool name passes the SPECSHIP_MCP_TOOLS allowlist (if any). */
|
|
225
257
|
private isToolAllowed;
|
|
258
|
+
/**
|
|
259
|
+
* Whether the default project has at least one indexed spec. One
|
|
260
|
+
* `LIMIT 1` probe on the `specs` primary key — cheap enough for every
|
|
261
|
+
* ListTools call. Any failure (pre-spec schema, closed DB) reads as "no
|
|
262
|
+
* specs", which keeps the tiny-repo list unchanged.
|
|
263
|
+
*/
|
|
264
|
+
private hasIndexedSpecs;
|
|
226
265
|
/**
|
|
227
266
|
* Get tool definitions with dynamic descriptions based on project size.
|
|
228
267
|
* The specship_explore tool description includes a budget recommendation
|
|
@@ -294,11 +333,11 @@ export declare class ToolHandler {
|
|
|
294
333
|
/**
|
|
295
334
|
* Model-aware compaction (MODCTX-DOC, REQ-MODCTX-002/003). Resolves the
|
|
296
335
|
* session's model tier (status-line marker / SPECSHIP_MODEL; SPECSHIP_COMPACT=0
|
|
297
|
-
* disables) and, on
|
|
336
|
+
* disables) and, on the lite/standard tiers, compresses the response's prose
|
|
298
337
|
* scaffolding — fenced code stays byte-verbatim. Full tier is identity.
|
|
299
338
|
*/
|
|
300
339
|
/**
|
|
301
|
-
* Tier-change listeners (LOWMODEL-DOC, REQ-LOWMODEL-004.A3): the
|
|
340
|
+
* Tier-change listeners (LOWMODEL-DOC, REQ-LOWMODEL-004.A3): the lite-tier
|
|
302
341
|
* menu trim changes `tools/list`, so a mid-session /model switch must ride
|
|
303
342
|
* an MCP `notifications/tools/list_changed`. Sessions subscribe here; the
|
|
304
343
|
* change is detected on the next code-graph call (the same funnel that
|
|
@@ -450,12 +489,13 @@ export declare class ToolHandler {
|
|
|
450
489
|
*/
|
|
451
490
|
private formatTrail;
|
|
452
491
|
/**
|
|
453
|
-
*
|
|
454
|
-
* server process — the version an
|
|
455
|
-
* how it was installed, node version, and
|
|
456
|
-
*
|
|
492
|
+
* Server identity (REQ-MCPVER-001, folded into specship_status by
|
|
493
|
+
* REQ-SURF-006). Identifies the running MCP server process — the version an
|
|
494
|
+
* agent's tools are being served by, how it was installed, node version, and
|
|
495
|
+
* (if bound) the project root. Synchronous, never touches the DB, safe with
|
|
496
|
+
* no project open.
|
|
457
497
|
*/
|
|
458
|
-
private
|
|
498
|
+
private identityBlock;
|
|
459
499
|
/**
|
|
460
500
|
* Handle specship_status
|
|
461
501
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAgBrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAyD3C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAM1D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,mBAAmB;IAClC,2CAA2C;IAC3C,cAAc,EAAE,MAAM,CAAC;IACvB,6DAA6D;IAC7D,eAAe,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,eAAe,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,sBAAsB,EAAE,MAAM,CAAC;IAC/B,0EAA0E;IAC1E,2BAA2B,EAAE,MAAM,CAAC;IACpC,2CAA2C;IAC3C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,yEAAyE;IACzE,sBAAsB,EAAE,OAAO,CAAC;IAChC,sEAAsE;IACtE,yBAAyB,EAAE,OAA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3B,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,YAAY;IA4BpB;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IAe7B,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,WAAW;CAMpB"}
|
package/lib/dist/mcp/tools.js
CHANGED
|
@@ -9,12 +9,14 @@ exports.ToolHandler = exports.tools = exports.MAX_PINNED_FILES = exports.SEEDABL
|
|
|
9
9
|
exports.getExploreBudget = getExploreBudget;
|
|
10
10
|
exports.extractNamedTokens = extractNamedTokens;
|
|
11
11
|
exports.resolveNamedFilePaths = resolveNamedFilePaths;
|
|
12
|
+
exports.applyLiteExploreBudget = applyLiteExploreBudget;
|
|
12
13
|
exports.getExploreOutputBudget = getExploreOutputBudget;
|
|
13
14
|
exports.formatStaleBanner = formatStaleBanner;
|
|
14
15
|
exports.formatStaleFooter = formatStaleFooter;
|
|
15
16
|
exports.integrationEnabled = integrationEnabled;
|
|
16
17
|
exports.toolIntegration = toolIntegration;
|
|
17
18
|
exports.filterIntegrationTools = filterIntegrationTools;
|
|
19
|
+
exports.applyLiteTierTrim = applyLiteTierTrim;
|
|
18
20
|
exports.getStaticTools = getStaticTools;
|
|
19
21
|
const directory_1 = require("../directory");
|
|
20
22
|
const statusline_1 = require("../statusline");
|
|
@@ -212,7 +214,66 @@ function resolveNamedFilePaths(tokens, filePaths, cap = exports.MAX_PINNED_FILES
|
|
|
212
214
|
}
|
|
213
215
|
return out;
|
|
214
216
|
}
|
|
215
|
-
|
|
217
|
+
/** Breadth ceiling on the lite tier — depth over breadth (REQ-LOWEND-004). */
|
|
218
|
+
const LITE_MAX_FILES = 3;
|
|
219
|
+
/**
|
|
220
|
+
* Floor on the lite tier's per-file body cap. Sized so the top-ranked file's
|
|
221
|
+
* relevant clusters come back whole (~200 lines) instead of tail-trimmed,
|
|
222
|
+
* which is what sends a low-end model to Read (REQ-LOWEND-004.A1).
|
|
223
|
+
*/
|
|
224
|
+
const LITE_MIN_CHARS_PER_FILE = 8000;
|
|
225
|
+
/**
|
|
226
|
+
* Lite-tier overlay on a size-tier budget (REQ-LOWEND-004).
|
|
227
|
+
*
|
|
228
|
+
* A low-end model abandons a tool chain the instant an answer looks partial,
|
|
229
|
+
* so it needs the top cluster COMPLETE far more than it needs a wide survey.
|
|
230
|
+
* The overlay therefore concentrates the tier's existing budget rather than
|
|
231
|
+
* enlarging it: `maxOutputChars` is untouched (it is the ~24K inline
|
|
232
|
+
* tool-result ceiling — exceeding it makes the host externalize the payload
|
|
233
|
+
* to a file the agent Reads back, re-introducing the very read this exists to
|
|
234
|
+
* prevent), while `maxCharsPerFile` rises and `defaultMaxFiles` falls so the
|
|
235
|
+
* same bytes land as fuller bodies on fewer files. `maxCharsPerFile` is a
|
|
236
|
+
* `max()` and `defaultMaxFiles` a `min()`, so the overlay can never shrink a
|
|
237
|
+
* body below what its size tier already returns (the monotonicity invariant
|
|
238
|
+
* in `src/mcp/CLAUDE.md`).
|
|
239
|
+
*
|
|
240
|
+
* The meta-text flags are the INVERSE of the small-repo tiers, hence explicit
|
|
241
|
+
* overrides rather than reuse: the trailing lists (additional files, budget
|
|
242
|
+
* note) are breadth pointers a lite model won't productively follow, but the
|
|
243
|
+
* completeness signal — "this source is complete, do NOT re-read" — is the one
|
|
244
|
+
* line that stops the Read fallback, so it is always on regardless of size.
|
|
245
|
+
*/
|
|
246
|
+
function applyLiteExploreBudget(base) {
|
|
247
|
+
return {
|
|
248
|
+
...base,
|
|
249
|
+
// Breadth down, depth up — same byte ceiling, concentrated.
|
|
250
|
+
defaultMaxFiles: Math.max(1, Math.min(base.defaultMaxFiles, LITE_MAX_FILES)),
|
|
251
|
+
maxCharsPerFile: Math.max(base.maxCharsPerFile, LITE_MIN_CHARS_PER_FILE),
|
|
252
|
+
maxOutputChars: base.maxOutputChars,
|
|
253
|
+
gapThreshold: base.gapThreshold,
|
|
254
|
+
// Breadth pointers off, stop-reading signal on. Relationships stay AT
|
|
255
|
+
// THE BASE VALUE: the section is the cheapest structural signal (see the
|
|
256
|
+
// explore doctrine test) and is not one of the trailing meta-sections
|
|
257
|
+
// REQ-LOWEND-004.A2 suppresses.
|
|
258
|
+
includeRelationships: base.includeRelationships,
|
|
259
|
+
includeAdditionalFiles: false,
|
|
260
|
+
includeBudgetNote: false,
|
|
261
|
+
includeCompletenessSignal: true,
|
|
262
|
+
excludeLowValueFiles: true,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Output budget for one `specship_explore` call: the project-size tier,
|
|
267
|
+
* optionally overlaid by the session's model tier.
|
|
268
|
+
*
|
|
269
|
+
* `tier` defaults to `full`, and `standard` is a pass-through, so full- and
|
|
270
|
+
* standard-tier output stays byte-identical to today (REQ-LOWEND-004.A3).
|
|
271
|
+
*/
|
|
272
|
+
function getExploreOutputBudget(fileCount, tier = 'full') {
|
|
273
|
+
const base = baseExploreOutputBudget(fileCount);
|
|
274
|
+
return tier === 'lite' ? applyLiteExploreBudget(base) : base;
|
|
275
|
+
}
|
|
276
|
+
function baseExploreOutputBudget(fileCount) {
|
|
216
277
|
// Tiered budget, scaled to project size. The budget is a CEILING (relevance
|
|
217
278
|
// still gates WHAT is included), and it MUST stay under the agent's INLINE
|
|
218
279
|
// tool-result cap (~25K chars). Above that, the host externalizes the result
|
|
@@ -411,6 +472,7 @@ const projectPathProperty = {
|
|
|
411
472
|
const spec_tools_1 = require("./spec-tools");
|
|
412
473
|
const maintainability_tool_1 = require("./maintainability-tool");
|
|
413
474
|
const fitness_tool_1 = require("./fitness-tool");
|
|
475
|
+
const health_tool_1 = require("./health-tool");
|
|
414
476
|
const designer_tools_1 = require("./designer-tools");
|
|
415
477
|
const jira_tools_1 = require("./jira-tools");
|
|
416
478
|
exports.tools = [
|
|
@@ -549,7 +611,7 @@ exports.tools = [
|
|
|
549
611
|
},
|
|
550
612
|
{
|
|
551
613
|
name: 'specship_status',
|
|
552
|
-
description: 'Index health check (files / nodes / edges). Skip unless debugging.',
|
|
614
|
+
description: 'Index health check (files / nodes / edges) AND server identity — package version, install method (bundle/npm/unknown), the install serving this session, and node version. Works with no project open (identity only). Skip unless debugging or asked which SpecShip is running.',
|
|
553
615
|
inputSchema: {
|
|
554
616
|
type: 'object',
|
|
555
617
|
properties: {
|
|
@@ -557,14 +619,6 @@ exports.tools = [
|
|
|
557
619
|
},
|
|
558
620
|
},
|
|
559
621
|
},
|
|
560
|
-
{
|
|
561
|
-
name: 'specship_version',
|
|
562
|
-
description: 'Identify the running SpecShip MCP server: package version, install method (bundle/npm/unknown), install dir, node version, and project root (if bound). Zero-arg, no index required — safe to call before any project is open.',
|
|
563
|
-
inputSchema: {
|
|
564
|
-
type: 'object',
|
|
565
|
-
properties: {},
|
|
566
|
-
},
|
|
567
|
-
},
|
|
568
622
|
{
|
|
569
623
|
name: 'specship_files',
|
|
570
624
|
description: 'Indexed file tree with language + symbol counts. Faster than Glob for project layout.',
|
|
@@ -600,8 +654,10 @@ exports.tools = [
|
|
|
600
654
|
},
|
|
601
655
|
// Spec-layer tools (v5): see ./spec-tools.ts for handlers.
|
|
602
656
|
...spec_tools_1.specToolDefinitions,
|
|
603
|
-
|
|
604
|
-
|
|
657
|
+
// Code health: one tool for maintainability + architecture fitness
|
|
658
|
+
// (REQ-SURF-007). The two former tools still execute for clients holding a
|
|
659
|
+
// cached list, but they are off the menu.
|
|
660
|
+
...health_tool_1.healthToolDefinitions,
|
|
605
661
|
// Designer tools: claude.ai/design driving, vendored from @pro-vi/designer.
|
|
606
662
|
// See ./designer-tools.ts for handlers. Drives a debug Chrome over CDP.
|
|
607
663
|
...designer_tools_1.designerToolDefinitions,
|
|
@@ -629,19 +685,62 @@ function filterIntegrationTools(list, env = process.env) {
|
|
|
629
685
|
return integ === null || integrationEnabled(integ, env);
|
|
630
686
|
});
|
|
631
687
|
}
|
|
688
|
+
/**
|
|
689
|
+
* Lite-tier menu trim (LOWMODEL-DOC, REQ-LOWMODEL-004): small-model tool
|
|
690
|
+
* choice degrades with menu size, so the code-graph group trims to the core
|
|
691
|
+
* three; spec/link tools and enabled integrations are untouched. Composes
|
|
692
|
+
* with the tiny-repo gate and SPECSHIP_MCP_TOOLS as an intersection.
|
|
693
|
+
* Schemas never vary — only the list; `execute()` still answers a
|
|
694
|
+
* trimmed-away tool for clients that cached the full list (A2).
|
|
695
|
+
*
|
|
696
|
+
* Needs only a project-root hint, NOT an open DB — tier detection reads the
|
|
697
|
+
* session model marker file. That is what lets the proxy's connect-time
|
|
698
|
+
* static list trim too (A4); `hint` may be any path at or under the project
|
|
699
|
+
* (the nearest `.specship/` root wins).
|
|
700
|
+
*/
|
|
701
|
+
const LITE_CORE_TOOLS = new Set(['specship_explore', 'specship_search', 'specship_node']);
|
|
702
|
+
// `specship_status` is deliberately NOT in this group (REQ-SURF-006.A2): it
|
|
703
|
+
// carries the server-identity answer, so the lite tier must keep it.
|
|
704
|
+
const CODE_GRAPH_GROUP = new Set([
|
|
705
|
+
'specship_explore', 'specship_search', 'specship_node',
|
|
706
|
+
'specship_callers', 'specship_callees', 'specship_impact',
|
|
707
|
+
'specship_files',
|
|
708
|
+
'specship_health',
|
|
709
|
+
]);
|
|
710
|
+
/**
|
|
711
|
+
* Spec-layer tools that survive the tiny-repo trim when the project has ≥1
|
|
712
|
+
* indexed spec (REQ-AUDFIX-009). `specship_jira_*` tools join them by prefix,
|
|
713
|
+
* but only when the JIRA integration is enabled.
|
|
714
|
+
*/
|
|
715
|
+
const SPEC_LAYER_TOOLS = new Set([
|
|
716
|
+
'specship_spec', 'specship_link_assert', 'specship_link_verify', 'specship_drifted',
|
|
717
|
+
]);
|
|
718
|
+
function applyLiteTierTrim(list, hint) {
|
|
719
|
+
if (!hint)
|
|
720
|
+
return list;
|
|
721
|
+
const root = (0, directory_1.findNearestSpecShipRoot)(hint);
|
|
722
|
+
if (!root || (0, model_context_1.detectModelTier)(root) !== 'lite')
|
|
723
|
+
return list;
|
|
724
|
+
return list.filter(t => !CODE_GRAPH_GROUP.has(t.name) || LITE_CORE_TOOLS.has(t.name));
|
|
725
|
+
}
|
|
632
726
|
/**
|
|
633
727
|
* Allowlist-filtered tool definitions WITHOUT an engine — the static surface the
|
|
634
728
|
* proxy answers `tools/list` with before any project is open. Mirrors
|
|
635
729
|
* `ToolHandler.getTools()` in the no-SpecShip case (the dynamic per-repo budget
|
|
636
730
|
* note in a description only adds once `cg` is loaded; the schemas are static).
|
|
731
|
+
* When a project-root hint is given, the lite-tier trim applies here too
|
|
732
|
+
* (REQ-LOWMODEL-004.A4) — the marker file needs no DB open.
|
|
637
733
|
*/
|
|
638
|
-
function getStaticTools() {
|
|
734
|
+
function getStaticTools(projectRootHint) {
|
|
639
735
|
const base = filterIntegrationTools(exports.tools);
|
|
640
736
|
const raw = process.env.SPECSHIP_MCP_TOOLS;
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
737
|
+
let visible = base;
|
|
738
|
+
if (raw && raw.trim()) {
|
|
739
|
+
const allow = new Set(raw.split(',').map(s => s.trim().replace(/^specship_/, '')).filter(Boolean));
|
|
740
|
+
if (allow.size)
|
|
741
|
+
visible = base.filter(t => allow.has(t.name.replace(/^specship_/, '')));
|
|
742
|
+
}
|
|
743
|
+
return applyLiteTierTrim(visible, projectRootHint ?? null);
|
|
645
744
|
}
|
|
646
745
|
/**
|
|
647
746
|
* Tool handler that executes tools against a SpecShip instance
|
|
@@ -726,6 +825,23 @@ class ToolHandler {
|
|
|
726
825
|
const allow = this.toolAllowlist();
|
|
727
826
|
return !allow || allow.has(name.replace(/^specship_/, ''));
|
|
728
827
|
}
|
|
828
|
+
/**
|
|
829
|
+
* Whether the default project has at least one indexed spec. One
|
|
830
|
+
* `LIMIT 1` probe on the `specs` primary key — cheap enough for every
|
|
831
|
+
* ListTools call. Any failure (pre-spec schema, closed DB) reads as "no
|
|
832
|
+
* specs", which keeps the tiny-repo list unchanged.
|
|
833
|
+
*/
|
|
834
|
+
hasIndexedSpecs() {
|
|
835
|
+
if (!this.cg)
|
|
836
|
+
return false;
|
|
837
|
+
try {
|
|
838
|
+
return this.cg.getSpecQueries().getRawDb()
|
|
839
|
+
.prepare('SELECT 1 FROM specs LIMIT 1').get() != null;
|
|
840
|
+
}
|
|
841
|
+
catch {
|
|
842
|
+
return false;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
729
845
|
/**
|
|
730
846
|
* Get tool definitions with dynamic descriptions based on project size.
|
|
731
847
|
* The specship_explore tool description includes a budget recommendation
|
|
@@ -772,29 +888,25 @@ class ToolHandler {
|
|
|
772
888
|
'specship_explore',
|
|
773
889
|
'specship_search',
|
|
774
890
|
'specship_node',
|
|
775
|
-
|
|
891
|
+
// Identity probe — folded into status (REQ-SURF-006), which therefore
|
|
892
|
+
// survives the tiny-repo trim the way specship_version used to.
|
|
893
|
+
'specship_status',
|
|
776
894
|
]);
|
|
777
895
|
if (stats.fileCount < TINY_REPO_FILE_THRESHOLD) {
|
|
778
896
|
// Designer tools are not code-graph tools — the tiny-repo flow-question
|
|
779
897
|
// economics that justify trimming don't apply, so they always survive.
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
'specship_callers', 'specship_callees', 'specship_impact',
|
|
793
|
-
'specship_files', 'specship_status',
|
|
794
|
-
'specship_maintainability', 'specship_fitness',
|
|
795
|
-
]);
|
|
796
|
-
visible = visible.filter(t => !CODE_GRAPH_GROUP.has(t.name) || HAIKU_CORE.has(t.name));
|
|
797
|
-
}
|
|
898
|
+
// Neither is the spec layer: when the project has ≥1 indexed spec, the
|
|
899
|
+
// spec/link/drift tools (and JIRA tools, only if already enabled —
|
|
900
|
+
// `visible` is post-integration-filter) survive too (REQ-AUDFIX-009).
|
|
901
|
+
// With no specs the list is exactly today's trim (A2).
|
|
902
|
+
const keepSpecLayer = this.hasIndexedSpecs();
|
|
903
|
+
visible = visible.filter(t => TINY_REPO_CORE_TOOLS.has(t.name)
|
|
904
|
+
|| t.name.startsWith('designer_')
|
|
905
|
+
|| (keepSpecLayer && (SPEC_LAYER_TOOLS.has(t.name) || t.name.startsWith('specship_jira_'))));
|
|
906
|
+
}
|
|
907
|
+
// Lite-tier menu trim — shared with the proxy's static list (A4);
|
|
908
|
+
// see applyLiteTierTrim above for the full contract.
|
|
909
|
+
visible = applyLiteTierTrim(visible, this.cg.getProjectRoot());
|
|
798
910
|
return visible.map(tool => {
|
|
799
911
|
if (tool.name === 'specship_explore') {
|
|
800
912
|
return {
|
|
@@ -982,11 +1094,11 @@ class ToolHandler {
|
|
|
982
1094
|
/**
|
|
983
1095
|
* Model-aware compaction (MODCTX-DOC, REQ-MODCTX-002/003). Resolves the
|
|
984
1096
|
* session's model tier (status-line marker / SPECSHIP_MODEL; SPECSHIP_COMPACT=0
|
|
985
|
-
* disables) and, on
|
|
1097
|
+
* disables) and, on the lite/standard tiers, compresses the response's prose
|
|
986
1098
|
* scaffolding — fenced code stays byte-verbatim. Full tier is identity.
|
|
987
1099
|
*/
|
|
988
1100
|
/**
|
|
989
|
-
* Tier-change listeners (LOWMODEL-DOC, REQ-LOWMODEL-004.A3): the
|
|
1101
|
+
* Tier-change listeners (LOWMODEL-DOC, REQ-LOWMODEL-004.A3): the lite-tier
|
|
990
1102
|
* menu trim changes `tools/list`, so a mid-session /model switch must ride
|
|
991
1103
|
* an MCP `notifications/tools/list_changed`. Sessions subscribe here; the
|
|
992
1104
|
* change is detected on the next code-graph call (the same funnel that
|
|
@@ -1166,11 +1278,13 @@ class ToolHandler {
|
|
|
1166
1278
|
// its own verbose worktree warning but still flows through the
|
|
1167
1279
|
// staleness wrapper so its pending-files section stays consistent
|
|
1168
1280
|
// with what the read tools surface.
|
|
1169
|
-
// specship_version (REQ-MCPVER-001): zero-arg identity probe
|
|
1170
|
-
//
|
|
1171
|
-
//
|
|
1281
|
+
// specship_version (REQ-MCPVER-001): zero-arg identity probe, folded into
|
|
1282
|
+
// specship_status (REQ-SURF-006) and off the menu. Still answered here for
|
|
1283
|
+
// clients holding a cached tool list. Runs before the
|
|
1284
|
+
// worktree/staleness/compaction wrappers so it works with no project open
|
|
1285
|
+
// and never touches the DB.
|
|
1172
1286
|
if (toolName === 'specship_version') {
|
|
1173
|
-
return this.
|
|
1287
|
+
return this.textResult(this.identityBlock());
|
|
1174
1288
|
}
|
|
1175
1289
|
let result;
|
|
1176
1290
|
switch (toolName) {
|
|
@@ -1212,6 +1326,11 @@ class ToolHandler {
|
|
|
1212
1326
|
case 'specship_drifted':
|
|
1213
1327
|
result = await (0, spec_tools_1.handleSpecshipDrifted)(this.getSpecShip(args.projectPath), args);
|
|
1214
1328
|
break;
|
|
1329
|
+
case 'specship_health':
|
|
1330
|
+
result = await (0, health_tool_1.handleSpecshipHealth)(this.getSpecShip(args.projectPath), args);
|
|
1331
|
+
break;
|
|
1332
|
+
// Folded into specship_health (REQ-SURF-007) and off the menu; still
|
|
1333
|
+
// answered for clients holding a cached tool list.
|
|
1215
1334
|
case 'specship_maintainability':
|
|
1216
1335
|
result = await (0, maintainability_tool_1.handleSpecshipMaintainability)(this.getSpecShip(args.projectPath), args);
|
|
1217
1336
|
break;
|
|
@@ -1336,7 +1455,7 @@ class ToolHandler {
|
|
|
1336
1455
|
}
|
|
1337
1456
|
const withWorktree = this.withWorktreeNotice(result, args.projectPath);
|
|
1338
1457
|
const withStaleness = this.withStalenessNotice(withWorktree, args.projectPath);
|
|
1339
|
-
// Model-aware compaction (MODCTX-DOC): on
|
|
1458
|
+
// Model-aware compaction (MODCTX-DOC): on lite/standard sessions the
|
|
1340
1459
|
// prose scaffolding compresses; code stays byte-verbatim. Only the
|
|
1341
1460
|
// code-graph tools reach this funnel — designer/jira returned above
|
|
1342
1461
|
// (REQ-MODCTX-004).
|
|
@@ -1765,7 +1884,7 @@ class ToolHandler {
|
|
|
1765
1884
|
out.push('## Flow (call path among the symbols you queried)', '');
|
|
1766
1885
|
for (let i = 0; i < best.length; i++) {
|
|
1767
1886
|
const step = best[i];
|
|
1768
|
-
if (tier === '
|
|
1887
|
+
if (tier === 'lite') {
|
|
1769
1888
|
// LOWMODEL-DOC REQ-LOWMODEL-003: small models don't synthesize
|
|
1770
1889
|
// the flow from evidence — render each hop as ONE explicit line
|
|
1771
1890
|
// with its mechanism inline. Additive formatting only; the code
|
|
@@ -2046,17 +2165,28 @@ class ToolHandler {
|
|
|
2046
2165
|
return query;
|
|
2047
2166
|
const cg = this.getSpecShip(args.projectPath);
|
|
2048
2167
|
const projectRoot = cg.getProjectRoot();
|
|
2049
|
-
// Resolve
|
|
2168
|
+
// Resolve the session's model tier ONCE and reuse it for both the output
|
|
2169
|
+
// budget and the flow spine below — detection is a couple of cheap file
|
|
2170
|
+
// reads, but calling it twice would add latency for nothing
|
|
2171
|
+
// (REQ-LOWEND-004.A4).
|
|
2172
|
+
const modelTier = (0, model_context_1.detectModelTier)(projectRoot);
|
|
2173
|
+
// Resolve adaptive output budget from project size, overlaid by the model
|
|
2174
|
+
// tier (lite trades breadth for depth — REQ-LOWEND-004). Falls back to the
|
|
2050
2175
|
// largest-tier defaults if stats aren't available, which preserves
|
|
2051
2176
|
// pre-#185 behavior for callers that hit the rare stats failure.
|
|
2052
2177
|
let budget;
|
|
2053
2178
|
try {
|
|
2054
|
-
budget = getExploreOutputBudget(cg.getStats().fileCount);
|
|
2179
|
+
budget = getExploreOutputBudget(cg.getStats().fileCount, modelTier);
|
|
2055
2180
|
}
|
|
2056
2181
|
catch {
|
|
2057
|
-
budget = getExploreOutputBudget(Infinity);
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2182
|
+
budget = getExploreOutputBudget(Infinity, modelTier);
|
|
2183
|
+
}
|
|
2184
|
+
// On lite tier a caller-supplied maxFiles may narrow but never widen the
|
|
2185
|
+
// overlay's breadth cut — otherwise the schema's advertised default (12)
|
|
2186
|
+
// hands the weakest model MORE output than full tier gets, inverting
|
|
2187
|
+
// REQ-LOWEND-004 (adversarial-review finding).
|
|
2188
|
+
const maxFilesCeiling = modelTier === 'lite' ? budget.defaultMaxFiles : 20;
|
|
2189
|
+
const maxFiles = (0, utils_1.clamp)(args.maxFiles || budget.defaultMaxFiles, 1, maxFilesCeiling);
|
|
2060
2190
|
// Step 1: Find relevant context with generous parameters.
|
|
2061
2191
|
// Use a large maxNodes budget — explore has its own 35k char output limit
|
|
2062
2192
|
// that prevents context bloat, so more nodes just means better coverage
|
|
@@ -2485,7 +2615,7 @@ class ToolHandler {
|
|
|
2485
2615
|
// Compute the flow spine once — used both to prepend the Flow section (below)
|
|
2486
2616
|
// and to gate adaptive source sizing: files on the spine get full source,
|
|
2487
2617
|
// off-spine peers skeletonize.
|
|
2488
|
-
const flow = this.buildFlowFromNamedSymbols(cg, query,
|
|
2618
|
+
const flow = this.buildFlowFromNamedSymbols(cg, query, modelTier);
|
|
2489
2619
|
// Polymorphic-sibling detector for adaptive sizing. A class that implements/
|
|
2490
2620
|
// extends a supertype shared by >= MIN_SIBLINGS classes is one of many
|
|
2491
2621
|
// INTERCHANGEABLE implementations (OkHttp's 14 `: Interceptor` classes —
|
|
@@ -3032,7 +3162,15 @@ class ToolHandler {
|
|
|
3032
3162
|
if (budget.includeCompletenessSignal) {
|
|
3033
3163
|
lines.push('');
|
|
3034
3164
|
lines.push('---');
|
|
3035
|
-
|
|
3165
|
+
if (budget.includeAdditionalFiles) {
|
|
3166
|
+
lines.push(`> **Complete source for ${filesIncluded} files is included above — do NOT re-read them.** If your question also needs files/symbols listed under "Not shown above" (or any area this call didn't cover), make ANOTHER specship_explore targeting those names — it returns the same source with line numbers and is cheaper and more complete than reading. Reserve Read for a single specific line range explore can't surface.`);
|
|
3167
|
+
}
|
|
3168
|
+
else {
|
|
3169
|
+
// Lite tier keeps the signal but renders no "Not shown above" list
|
|
3170
|
+
// (REQ-LOWEND-004.A2), so the clause pointing at it would name a
|
|
3171
|
+
// section that isn't there. Same one-line shape, no dangling reference.
|
|
3172
|
+
lines.push(`> **Complete source for ${filesIncluded} files is included above — do NOT re-read them.** If your question needs an area this call didn't cover, make ANOTHER specship_explore naming those symbols or files — it returns the same source with line numbers and is cheaper and more complete than reading. Reserve Read for a single specific line range explore can't surface.`);
|
|
3173
|
+
}
|
|
3036
3174
|
}
|
|
3037
3175
|
else if (anyFileTrimmed) {
|
|
3038
3176
|
lines.push('');
|
|
@@ -3232,12 +3370,13 @@ class ToolHandler {
|
|
|
3232
3370
|
return lines.join('\n');
|
|
3233
3371
|
}
|
|
3234
3372
|
/**
|
|
3235
|
-
*
|
|
3236
|
-
* server process — the version an
|
|
3237
|
-
* how it was installed, node version, and
|
|
3238
|
-
*
|
|
3373
|
+
* Server identity (REQ-MCPVER-001, folded into specship_status by
|
|
3374
|
+
* REQ-SURF-006). Identifies the running MCP server process — the version an
|
|
3375
|
+
* agent's tools are being served by, how it was installed, node version, and
|
|
3376
|
+
* (if bound) the project root. Synchronous, never touches the DB, safe with
|
|
3377
|
+
* no project open.
|
|
3239
3378
|
*/
|
|
3240
|
-
|
|
3379
|
+
identityBlock() {
|
|
3241
3380
|
const binDirname = (0, path_1.dirname)(__filename);
|
|
3242
3381
|
const installDir = (0, updater_1.resolveInstallDir)();
|
|
3243
3382
|
const installMethod = (0, updater_1.detectInstallMethod)(binDirname, installDir);
|
|
@@ -3265,13 +3404,24 @@ class ToolHandler {
|
|
|
3265
3404
|
`**node:** ${process.version}`,
|
|
3266
3405
|
`**projectRoot:** ${projectRoot ?? 'null'}`,
|
|
3267
3406
|
];
|
|
3268
|
-
return
|
|
3407
|
+
return lines.join('\n');
|
|
3269
3408
|
}
|
|
3270
3409
|
/**
|
|
3271
3410
|
* Handle specship_status
|
|
3272
3411
|
*/
|
|
3273
3412
|
async handleStatus(args) {
|
|
3274
|
-
|
|
3413
|
+
// Server identity leads the response (REQ-SURF-006.A1) and is answerable
|
|
3414
|
+
// with no project open, so a status call on an unindexed directory still
|
|
3415
|
+
// tells the agent which SpecShip is serving it.
|
|
3416
|
+
const identity = this.identityBlock();
|
|
3417
|
+
let cg;
|
|
3418
|
+
try {
|
|
3419
|
+
cg = this.getSpecShip(args.projectPath);
|
|
3420
|
+
}
|
|
3421
|
+
catch (err) {
|
|
3422
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
3423
|
+
return this.textResult(`${identity}\n\n## SpecShip Status\n\n${detail}`);
|
|
3424
|
+
}
|
|
3275
3425
|
// Same trick as withStalenessNotice — when an explicit projectPath
|
|
3276
3426
|
// resolves to the same project as the default session cg, prefer the
|
|
3277
3427
|
// default so getPendingFiles() (only populated by the default's watcher)
|
|
@@ -3292,6 +3442,8 @@ class ToolHandler {
|
|
|
3292
3442
|
// one-liner via withWorktreeNotice. Both share the cached detection.
|
|
3293
3443
|
const mismatch = this.worktreeMismatchFor(args.projectPath);
|
|
3294
3444
|
const lines = [
|
|
3445
|
+
identity,
|
|
3446
|
+
'',
|
|
3295
3447
|
'## SpecShip Status',
|
|
3296
3448
|
'',
|
|
3297
3449
|
];
|