@mrclrchtr/supi-code-intelligence 1.16.1 → 2.0.1
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/README.md +373 -63
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +6 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +31 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +8 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config-settings.ts +10 -4
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config.ts +1 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +6 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/model-selection.ts +134 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +9 -2
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +109 -4
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +5 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/spinner-frames.ts +11 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/status-spinner.ts +68 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +3 -2
- package/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +7 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +56 -2
- package/node_modules/@mrclrchtr/supi-code-runtime/src/evidence-badge.ts +40 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +5 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +76 -3
- package/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/runtime.ts +37 -2
- package/node_modules/@mrclrchtr/supi-core/package.json +6 -1
- package/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +31 -0
- package/node_modules/@mrclrchtr/supi-core/src/api.ts +8 -0
- package/node_modules/@mrclrchtr/supi-core/src/config/config-settings.ts +10 -4
- package/node_modules/@mrclrchtr/supi-core/src/config.ts +1 -0
- package/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +1 -1
- package/node_modules/@mrclrchtr/supi-core/src/index.ts +6 -0
- package/node_modules/@mrclrchtr/supi-core/src/model-selection.ts +134 -0
- package/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +9 -2
- package/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +109 -4
- package/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +5 -1
- package/node_modules/@mrclrchtr/supi-core/src/spinner-frames.ts +11 -0
- package/node_modules/@mrclrchtr/supi-core/src/status-spinner.ts +68 -0
- package/node_modules/@mrclrchtr/supi-lsp/README.md +44 -56
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +6 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +31 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +8 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config-settings.ts +10 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config.ts +1 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +6 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/model-selection.ts +134 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +9 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +109 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +5 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/spinner-frames.ts +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/status-spinner.ts +68 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +3 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +7 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +56 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/evidence-badge.ts +40 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +5 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +76 -3
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/runtime.ts +37 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +6 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +31 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/api.ts +8 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config/config-settings.ts +10 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config.ts +1 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/index.ts +6 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/model-selection.ts +134 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +9 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +109 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +5 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/spinner-frames.ts +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/status-spinner.ts +68 -0
- package/node_modules/@mrclrchtr/supi-lsp/package.json +4 -31
- package/node_modules/@mrclrchtr/supi-lsp/src/api.ts +27 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-refresh.ts +5 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +246 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/client/transport.ts +4 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config/capabilities.ts +3 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config/config.ts +4 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/config/lsp-settings.ts +102 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config/server-actions.ts +59 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config/server-config.ts +4 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/index.ts +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/capability-index.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-project-info.ts +2 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +115 -26
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/lsp-semantic-provider.ts +177 -134
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/refactor-planning.ts +214 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-controller.ts +320 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registration.ts +26 -5
- package/node_modules/@mrclrchtr/supi-lsp/src/session/service-registry.ts +81 -4
- package/node_modules/@mrclrchtr/supi-lsp/src/summary.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/README.md +18 -37
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +6 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +31 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +8 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config-settings.ts +10 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config.ts +1 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +6 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/model-selection.ts +134 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +9 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +109 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +5 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/spinner-frames.ts +11 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/status-spinner.ts +68 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +3 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +56 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/evidence-badge.ts +40 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +5 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +76 -3
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/runtime.ts +37 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +6 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +31 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/api.ts +8 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/config/config-settings.ts +10 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/config.ts +1 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/index.ts +6 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/model-selection.ts +134 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +9 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +109 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +5 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/spinner-frames.ts +11 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/status-spinner.ts +68 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/LICENSE +21 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/README.md +265 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.cjs +4661 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.cjs.map +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.js +4605 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.js.map +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.wasm.map +57 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/package.json +100 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.cjs +4063 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.cjs.map +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts +1025 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts.map +58 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts +1025 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts.map +58 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js +4007 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js.map +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.wasm.map +55 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +6 -12
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/api.ts +29 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/index.ts +28 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/language.ts +5 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/provider/tree-sitter-provider.ts +14 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/session/runtime-controller.ts +157 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/session/session.ts +8 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/call-sites.ts +86 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/callees.ts +35 -16
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/structure.ts +1 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/types.ts +10 -0
- package/package.json +14 -9
- package/src/{model.ts → analysis/architecture/discovery.ts} +15 -72
- package/src/analysis/architecture/model.ts +76 -0
- package/src/analysis/brief/directory.ts +324 -0
- package/src/analysis/brief/enrich.ts +157 -0
- package/src/analysis/brief/file.ts +84 -0
- package/src/analysis/brief/inventory.ts +177 -0
- package/src/analysis/brief/main.ts +176 -0
- package/src/analysis/brief/models.ts +75 -0
- package/src/{brief.ts → analysis/brief/public-brief.ts} +21 -26
- package/src/analysis/brief/summarize.ts +208 -0
- package/src/analysis/brief/types.ts +27 -0
- package/src/{use-case/generate-brief.ts → analysis/brief/use-case.ts} +67 -144
- package/src/analysis/coverage/coverage-warnings.ts +224 -0
- package/src/analysis/evidence.ts +91 -0
- package/src/{semantic-action-helpers.ts → analysis/helpers.ts} +4 -4
- package/src/analysis/provider.ts +186 -0
- package/src/analysis/read-next.ts +126 -0
- package/src/analysis/readiness.ts +73 -0
- package/src/{refactor → analysis/refactor}/safety.ts +1 -1
- package/src/{use-case/support/semantic-references.ts → analysis/references/semantic-refs.ts} +58 -26
- package/src/analysis/search/pattern.ts +345 -0
- package/src/analysis/search/ripgrep.ts +473 -0
- package/src/{git-context.ts → analysis/signals/git.ts} +20 -7
- package/src/{prioritization-signals.ts → analysis/signals/project.ts} +33 -19
- package/src/analysis/target/anchored.ts +349 -0
- package/src/analysis/target/bridge.ts +152 -0
- package/src/analysis/target/file-resolution.ts +125 -0
- package/src/{targeting/resolve-file.ts → analysis/target/file.ts} +40 -20
- package/src/{planner → analysis/target}/planner.ts +30 -20
- package/src/{targeting → analysis/target}/query.ts +17 -3
- package/src/analysis/target/resolve-common.ts +115 -0
- package/src/analysis/target/service.ts +229 -0
- package/src/analysis/target/symbol.ts +196 -0
- package/src/{targeting → analysis/target}/types.ts +17 -1
- package/src/analysis/tests/likely-tests.ts +174 -0
- package/src/analysis/tests/test-discovery.ts +540 -0
- package/src/analysis/tests/vitest.ts +87 -0
- package/src/api.ts +34 -41
- package/src/app/app.ts +125 -0
- package/src/app/manager.ts +65 -0
- package/src/extension.ts +132 -1
- package/src/index.ts +1 -57
- package/src/session/refactor-plans.ts +82 -0
- package/src/session/session.ts +300 -0
- package/src/session/target-store.ts +293 -0
- package/src/substrate/lsp/diagnostic-injection.ts +218 -0
- package/src/substrate/lsp/lifecycle.ts +66 -0
- package/src/substrate/lsp/overrides.ts +132 -0
- package/src/substrate/lsp/recovery.ts +55 -0
- package/src/substrate/lsp/settings.ts +286 -0
- package/src/substrate/lsp/state.ts +46 -0
- package/src/substrate/lsp/utils.ts +17 -0
- package/src/substrate/tree-sitter/lifecycle.ts +52 -0
- package/src/tool/find/execute.ts +118 -0
- package/src/{presentation/markdown/pattern.ts → tool/find/markdown.ts} +102 -53
- package/src/{use-case/generate-pattern.ts → tool/find/orchestrate.ts} +67 -33
- package/src/tool/find/semantic-search.ts +114 -0
- package/src/tool/find/tui.ts +39 -0
- package/src/tool/graph/callees.ts +87 -0
- package/src/tool/graph/calls-md.ts +54 -0
- package/src/tool/graph/collect-relation.ts +371 -0
- package/src/tool/graph/execute.ts +95 -0
- package/src/tool/graph/implementations-md.ts +79 -0
- package/src/tool/graph/implementations.ts +76 -0
- package/src/tool/graph/markdown-base.ts +243 -0
- package/src/tool/graph/orchestrate.ts +285 -0
- package/src/tool/graph/references-md.ts +34 -0
- package/src/tool/graph/references.ts +81 -0
- package/src/tool/graph/tui.ts +120 -0
- package/src/tool/graph/types.ts +97 -0
- package/src/tool/guidance.ts +96 -49
- package/src/tool/health/execute.ts +76 -0
- package/src/tool/health/markdown.ts +280 -0
- package/src/tool/health/orchestrate.ts +159 -0
- package/src/tool/health/sections/diagnostics.ts +182 -0
- package/src/tool/health/sections/recovery.ts +89 -0
- package/src/tool/health/sections/signals.ts +89 -0
- package/src/tool/health/tui.ts +137 -0
- package/src/tool/impact/analysis.ts +247 -0
- package/src/tool/impact/change-set-impact.ts +151 -0
- package/src/tool/impact/execute.ts +98 -0
- package/src/tool/impact/file-level-impact.ts +81 -0
- package/src/tool/impact/markdown.ts +283 -0
- package/src/tool/impact/orchestrate.ts +97 -0
- package/src/tool/impact/result.ts +21 -0
- package/src/tool/impact/single-impact.ts +89 -0
- package/src/tool/impact/tui.ts +39 -0
- package/src/tool/impact/types.ts +34 -0
- package/src/tool/infra/cross-field.ts +335 -0
- package/src/tool/infra/error-results.ts +199 -0
- package/src/tool/infra/pipeline.ts +311 -0
- package/src/tool/infra/progress.ts +21 -0
- package/src/tool/infra/readiness-message.ts +5 -0
- package/src/tool/infra/truncate.ts +49 -0
- package/src/tool/inspect/execute.ts +76 -0
- package/src/tool/inspect/markdown.ts +169 -0
- package/src/tool/inspect/orchestrate.ts +156 -0
- package/src/tool/inspect/tui.ts +36 -0
- package/src/tool/orientation/deps.ts +63 -0
- package/src/tool/orientation/execute.ts +50 -0
- package/src/tool/orientation/markdown.ts +35 -0
- package/src/tool/orientation/mode.ts +88 -0
- package/src/tool/orientation/orchestrate.ts +478 -0
- package/src/tool/orientation/precise-target.ts +257 -0
- package/src/tool/orientation/tui.ts +131 -0
- package/src/{refactor/apply-workspace-edit.ts → tool/refactor-apply/apply.ts} +39 -16
- package/src/tool/refactor-apply/execute.ts +20 -0
- package/src/tool/refactor-apply/markdown.ts +118 -0
- package/src/tool/refactor-apply/orchestrate.ts +89 -0
- package/src/tool/refactor-apply/tui.ts +51 -0
- package/src/tool/refactor-plan/execute.ts +73 -0
- package/src/tool/refactor-plan/markdown.ts +118 -0
- package/src/tool/refactor-plan/orchestrate.ts +363 -0
- package/src/tool/refactor-plan/tui.ts +42 -0
- package/src/tool/register.ts +123 -0
- package/src/tool/resolve/execute.ts +82 -0
- package/src/tool/resolve/markdown.ts +150 -0
- package/src/tool/resolve/orchestrate.ts +134 -0
- package/src/tool/resolve/tui.ts +40 -0
- package/src/tool/schemas.ts +337 -0
- package/src/tool/specs.ts +257 -0
- package/src/types/details.ts +188 -0
- package/src/types/execution.ts +60 -0
- package/src/types/index.ts +28 -0
- package/src/{intent/types.ts → types/tool-names.ts} +15 -14
- package/src/ui/footer.ts +52 -0
- package/src/ui/markdown/brief.ts +218 -0
- package/src/ui/markdown/gather.ts +177 -0
- package/src/{use-case/build-overview.ts → ui/markdown/overview-data.ts} +2 -2
- package/src/{presentation → ui}/markdown/overview.ts +2 -2
- package/src/ui/markdown/types.ts +80 -0
- package/{node_modules/@mrclrchtr/supi-lsp/src/ui/renderer.ts → src/ui/message-renderer.ts} +11 -10
- package/src/ui/status-command.ts +260 -0
- package/src/ui/status-overlay.ts +500 -0
- package/src/ui/tui/common.ts +220 -0
- package/src/ui/tui/index.ts +37 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/extension.ts +0 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/format.ts +0 -373
- package/node_modules/@mrclrchtr/supi-lsp/src/handlers/diagnostic-injection.ts +0 -182
- package/node_modules/@mrclrchtr/supi-lsp/src/handlers/session-lifecycle.ts +0 -149
- package/node_modules/@mrclrchtr/supi-lsp/src/handlers/status-command.ts +0 -38
- package/node_modules/@mrclrchtr/supi-lsp/src/handlers/workspace-recovery.ts +0 -92
- package/node_modules/@mrclrchtr/supi-lsp/src/lsp.ts +0 -37
- package/node_modules/@mrclrchtr/supi-lsp/src/session/lsp-state.ts +0 -93
- package/node_modules/@mrclrchtr/supi-lsp/src/session/settings-registration.ts +0 -296
- package/node_modules/@mrclrchtr/supi-lsp/src/session/tree-persist.ts +0 -75
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/guidance.ts +0 -69
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/names.ts +0 -27
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/overrides.ts +0 -204
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/register-tools.ts +0 -69
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/service-actions.ts +0 -399
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/tool-specs.ts +0 -248
- package/node_modules/@mrclrchtr/supi-lsp/src/ui/ui.ts +0 -360
- package/node_modules/@mrclrchtr/supi-lsp/src/workspace-change.ts +0 -40
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/extension.ts +0 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/formatting.ts +0 -104
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/guidance.ts +0 -35
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/handlers.ts +0 -196
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/register-tools.ts +0 -107
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/tool-specs.ts +0 -117
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tree-sitter.ts +0 -47
- package/src/brief-focused.ts +0 -563
- package/src/code-intelligence.ts +0 -70
- package/src/pattern-structured.ts +0 -194
- package/src/presentation/markdown/affected.ts +0 -170
- package/src/presentation/markdown/brief.ts +0 -174
- package/src/presentation/markdown/map.ts +0 -54
- package/src/presentation/markdown/refactor.ts +0 -27
- package/src/presentation/markdown/relations.ts +0 -121
- package/src/resolve-target.ts +0 -130
- package/src/search-helpers.ts +0 -303
- package/src/substrates/types.ts +0 -30
- package/src/target-resolution.ts +0 -122
- package/src/targeting/resolve-anchored.ts +0 -80
- package/src/targeting/resolve-symbol.ts +0 -110
- package/src/tool/execute-affected.ts +0 -71
- package/src/tool/execute-brief.ts +0 -59
- package/src/tool/execute-map.ts +0 -35
- package/src/tool/execute-pattern.ts +0 -29
- package/src/tool/execute-refactor.ts +0 -101
- package/src/tool/execute-relations.ts +0 -79
- package/src/tool/register-tools.ts +0 -32
- package/src/tool/tool-specs.ts +0 -190
- package/src/tool/validation.ts +0 -43
- package/src/types.ts +0 -169
- package/src/use-case/generate-affected.ts +0 -297
- package/src/use-case/generate-map.ts +0 -176
- package/src/use-case/generate-relations.ts +0 -438
- package/src/use-case/types.ts +0 -43
- package/src/workspace/request-context.ts +0 -139
- /package/src/{query-params.ts → tool/params.ts} +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import {
|
|
3
|
-
CODE_INTELLIGENCE_TOOL_PROMPT_SURFACES,
|
|
4
|
-
type CodeIntelligenceToolPromptSurfaceMap,
|
|
5
|
-
} from "./guidance.ts";
|
|
6
|
-
import { CODE_INTELLIGENCE_TOOL_SPECS } from "./tool-specs.ts";
|
|
7
|
-
|
|
8
|
-
/** Register the focused code-intelligence tool surface from shared specs. */
|
|
9
|
-
export function registerCodeIntelligenceTools(
|
|
10
|
-
pi: ExtensionAPI,
|
|
11
|
-
promptSurfaces: CodeIntelligenceToolPromptSurfaceMap = CODE_INTELLIGENCE_TOOL_PROMPT_SURFACES,
|
|
12
|
-
): void {
|
|
13
|
-
for (const spec of CODE_INTELLIGENCE_TOOL_SPECS) {
|
|
14
|
-
const surface = promptSurfaces[spec.name];
|
|
15
|
-
pi.registerTool({
|
|
16
|
-
name: spec.name,
|
|
17
|
-
label: spec.label,
|
|
18
|
-
description: surface.description,
|
|
19
|
-
promptSnippet: surface.promptSnippet,
|
|
20
|
-
promptGuidelines: surface.promptGuidelines,
|
|
21
|
-
parameters: spec.parameters,
|
|
22
|
-
// biome-ignore lint/complexity/useMaxParams: pi ToolDefinition.execute signature
|
|
23
|
-
execute: async (_toolCallId, params, _signal, _onUpdate, ctx: ExtensionContext) => {
|
|
24
|
-
const { content, details } = await spec.run(params, { cwd: ctx.cwd });
|
|
25
|
-
return {
|
|
26
|
-
content: [{ type: "text" as const, text: content }],
|
|
27
|
-
details,
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
package/src/tool/tool-specs.ts
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { StringEnum } from "@earendil-works/pi-ai";
|
|
2
|
-
import { type TSchema, Type } from "typebox";
|
|
3
|
-
import type { CodeIntelResult } from "../types.ts";
|
|
4
|
-
import { executeAffectedTool } from "./execute-affected.ts";
|
|
5
|
-
import { executeBriefTool } from "./execute-brief.ts";
|
|
6
|
-
import { executeMapTool } from "./execute-map.ts";
|
|
7
|
-
import { executePatternTool } from "./execute-pattern.ts";
|
|
8
|
-
import { executeRefactorTool } from "./execute-refactor.ts";
|
|
9
|
-
import { executeRelationsTool } from "./execute-relations.ts";
|
|
10
|
-
|
|
11
|
-
const PathParam = Type.String({ description: "Scope path" });
|
|
12
|
-
const FileParam = Type.String({ description: "Target file" });
|
|
13
|
-
const LineParam = Type.Number({ description: "1-based line" });
|
|
14
|
-
const CharacterParam = Type.Number({ description: "1-based UTF-16 column" });
|
|
15
|
-
const SymbolParam = Type.String({ description: "Symbol name" });
|
|
16
|
-
const PatternParam = Type.String({ description: "Search pattern" });
|
|
17
|
-
const RegexParam = Type.Boolean({ description: "Regex search" });
|
|
18
|
-
const ExportedOnlyParam = Type.Boolean({ description: "Exported symbols only" });
|
|
19
|
-
const MaxResultsParam = Type.Number({ description: "Max results" });
|
|
20
|
-
const ContextLinesParam = Type.Number({ description: "Context lines" });
|
|
21
|
-
const SummaryParam = Type.Boolean({ description: "Summarize by directory" });
|
|
22
|
-
const StructuredPatternKindParam = Type.String({
|
|
23
|
-
description: "Structured kind: definition | export | import",
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export const CODE_INTELLIGENCE_TOOL_NAMES = [
|
|
27
|
-
"code_brief",
|
|
28
|
-
"code_map",
|
|
29
|
-
"code_relations",
|
|
30
|
-
"code_affected",
|
|
31
|
-
"code_pattern",
|
|
32
|
-
"code_refactor",
|
|
33
|
-
] as const;
|
|
34
|
-
export type CodeIntelligenceToolName = (typeof CODE_INTELLIGENCE_TOOL_NAMES)[number];
|
|
35
|
-
|
|
36
|
-
export const CODE_RELATION_KIND_NAMES = ["callers", "callees", "implementations"] as const;
|
|
37
|
-
export type CodeRelationsKind = (typeof CODE_RELATION_KIND_NAMES)[number];
|
|
38
|
-
|
|
39
|
-
const CodeRelationsKindEnum = StringEnum(CODE_RELATION_KIND_NAMES);
|
|
40
|
-
|
|
41
|
-
const CodeBriefParameters = Type.Object(
|
|
42
|
-
{
|
|
43
|
-
path: Type.Optional(PathParam),
|
|
44
|
-
file: Type.Optional(FileParam),
|
|
45
|
-
line: Type.Optional(LineParam),
|
|
46
|
-
character: Type.Optional(CharacterParam),
|
|
47
|
-
symbol: Type.Optional(SymbolParam),
|
|
48
|
-
maxResults: Type.Optional(MaxResultsParam),
|
|
49
|
-
},
|
|
50
|
-
{ additionalProperties: false },
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
const CodeMapParameters = Type.Object(
|
|
54
|
-
{
|
|
55
|
-
path: Type.Optional(Type.String({ description: "Project/package/dir path" })),
|
|
56
|
-
},
|
|
57
|
-
{ additionalProperties: false },
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
const CodeRelationsParameters = Type.Object(
|
|
61
|
-
{
|
|
62
|
-
kind: CodeRelationsKindEnum,
|
|
63
|
-
path: Type.Optional(PathParam),
|
|
64
|
-
file: Type.Optional(FileParam),
|
|
65
|
-
line: Type.Optional(LineParam),
|
|
66
|
-
character: Type.Optional(CharacterParam),
|
|
67
|
-
symbol: Type.Optional(SymbolParam),
|
|
68
|
-
exportedOnly: Type.Optional(ExportedOnlyParam),
|
|
69
|
-
maxResults: Type.Optional(MaxResultsParam),
|
|
70
|
-
},
|
|
71
|
-
{ additionalProperties: false },
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
const CodeAffectedParameters = Type.Object(
|
|
75
|
-
{
|
|
76
|
-
file: Type.Optional(FileParam),
|
|
77
|
-
line: Type.Optional(LineParam),
|
|
78
|
-
character: Type.Optional(CharacterParam),
|
|
79
|
-
symbol: Type.Optional(SymbolParam),
|
|
80
|
-
exportedOnly: Type.Optional(ExportedOnlyParam),
|
|
81
|
-
maxResults: Type.Optional(MaxResultsParam),
|
|
82
|
-
},
|
|
83
|
-
{ additionalProperties: false },
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
const CodePatternParameters = Type.Object(
|
|
87
|
-
{
|
|
88
|
-
path: Type.Optional(PathParam),
|
|
89
|
-
pattern: PatternParam,
|
|
90
|
-
regex: Type.Optional(RegexParam),
|
|
91
|
-
kind: Type.Optional(StructuredPatternKindParam),
|
|
92
|
-
maxResults: Type.Optional(MaxResultsParam),
|
|
93
|
-
contextLines: Type.Optional(ContextLinesParam),
|
|
94
|
-
summary: Type.Optional(SummaryParam),
|
|
95
|
-
},
|
|
96
|
-
{ additionalProperties: false },
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
const CodeRefactorParameters = Type.Object(
|
|
100
|
-
{
|
|
101
|
-
operation: Type.String({ description: "Refactor operation: rename" }),
|
|
102
|
-
file: FileParam,
|
|
103
|
-
line: LineParam,
|
|
104
|
-
character: CharacterParam,
|
|
105
|
-
newName: Type.String({ description: "New name for rename operation" }),
|
|
106
|
-
},
|
|
107
|
-
{ additionalProperties: false },
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
export interface CodeIntelligenceToolDefinitionSpec {
|
|
111
|
-
name: CodeIntelligenceToolName;
|
|
112
|
-
label: string;
|
|
113
|
-
description: string;
|
|
114
|
-
promptSnippet: string;
|
|
115
|
-
basePromptGuidelines: string[];
|
|
116
|
-
parameters: TSchema;
|
|
117
|
-
run: (params: unknown, ctx: { cwd: string }) => Promise<CodeIntelResult> | CodeIntelResult;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export const CODE_INTELLIGENCE_TOOL_SPECS = [
|
|
121
|
-
{
|
|
122
|
-
name: "code_brief",
|
|
123
|
-
label: "Code Brief",
|
|
124
|
-
description: "Prioritized brief for a project, package, directory, file, or symbol.",
|
|
125
|
-
promptSnippet: "code_brief — prioritized code orientation",
|
|
126
|
-
basePromptGuidelines: [
|
|
127
|
-
"Use code_brief for prioritized orientation on a project, package, file, or symbol.",
|
|
128
|
-
"Use code_brief before deeper drill-down when you need a start-here recommendation.",
|
|
129
|
-
],
|
|
130
|
-
parameters: CodeBriefParameters,
|
|
131
|
-
run: (params, ctx) => executeBriefTool(params as Parameters<typeof executeBriefTool>[0], ctx),
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: "code_map",
|
|
135
|
-
label: "Code Map",
|
|
136
|
-
description: "Factual map of a repo, package, or directory.",
|
|
137
|
-
promptSnippet: "code_map — factual repo or directory map",
|
|
138
|
-
basePromptGuidelines: ["Use code_map for counts, directories, language mix, and landmarks."],
|
|
139
|
-
parameters: CodeMapParameters,
|
|
140
|
-
run: (params, ctx) => executeMapTool(params as Parameters<typeof executeMapTool>[0], ctx),
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: "code_relations",
|
|
144
|
-
label: "Code Relations",
|
|
145
|
-
description: "Trace callers, callees, or implementations for a resolved target.",
|
|
146
|
-
promptSnippet: "code_relations — callers, callees, or implementations",
|
|
147
|
-
basePromptGuidelines: [
|
|
148
|
-
"Use code_relations(kind) for `callers`, `callees`, or `implementations`.",
|
|
149
|
-
],
|
|
150
|
-
parameters: CodeRelationsParameters,
|
|
151
|
-
run: (params, ctx) =>
|
|
152
|
-
executeRelationsTool(params as Parameters<typeof executeRelationsTool>[0], ctx),
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
name: "code_affected",
|
|
156
|
-
label: "Code Affected",
|
|
157
|
-
description: "Estimate blast radius and downstream impact for a target.",
|
|
158
|
-
promptSnippet: "code_affected — blast radius and impact",
|
|
159
|
-
basePromptGuidelines: [
|
|
160
|
-
"Use code_affected before edits to estimate blast radius and follow-up checks.",
|
|
161
|
-
],
|
|
162
|
-
parameters: CodeAffectedParameters,
|
|
163
|
-
run: (params, ctx) =>
|
|
164
|
-
executeAffectedTool(params as Parameters<typeof executeAffectedTool>[0], ctx),
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
name: "code_pattern",
|
|
168
|
-
label: "Code Pattern",
|
|
169
|
-
description: "Run explicit search with literal, regex, or structured matching.",
|
|
170
|
-
promptSnippet: "code_pattern — explicit code search",
|
|
171
|
-
basePromptGuidelines: [
|
|
172
|
-
"Use code_pattern for literal, regex, or structured search in a bounded path.",
|
|
173
|
-
],
|
|
174
|
-
parameters: CodePatternParameters,
|
|
175
|
-
run: (params, ctx) =>
|
|
176
|
-
executePatternTool(params as Parameters<typeof executePatternTool>[0], ctx),
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
name: "code_refactor",
|
|
180
|
-
label: "Code Refactor",
|
|
181
|
-
description: "Apply a precise semantic refactor (rename) with direct-apply safety checks.",
|
|
182
|
-
promptSnippet: "code_refactor — semantic refactor with direct apply",
|
|
183
|
-
basePromptGuidelines: [
|
|
184
|
-
"Use code_refactor for safe semantic rename operations with precise workspace edits.",
|
|
185
|
-
],
|
|
186
|
-
parameters: CodeRefactorParameters,
|
|
187
|
-
run: (params, ctx) =>
|
|
188
|
-
executeRefactorTool(params as Parameters<typeof executeRefactorTool>[0], ctx),
|
|
189
|
-
},
|
|
190
|
-
] as const satisfies readonly CodeIntelligenceToolDefinitionSpec[];
|
package/src/tool/validation.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
|
-
import type { CodeQueryParams } from "../query-params.ts";
|
|
3
|
-
import { normalizePath } from "../search-helpers.ts";
|
|
4
|
-
|
|
5
|
-
const STRUCTURED_PATTERN_KINDS = new Set(["definition", "export", "import"]);
|
|
6
|
-
|
|
7
|
-
/** Shared validation for focused tool inputs that can anchor into files. */
|
|
8
|
-
export function validateFocusedToolParams(
|
|
9
|
-
params: Pick<CodeQueryParams, "path" | "file" | "line" | "character">,
|
|
10
|
-
cwd: string,
|
|
11
|
-
): string | null {
|
|
12
|
-
if (params.path && (params.line != null || params.character != null)) {
|
|
13
|
-
return "**Error:** `line` and `character` require `file`, not `path`. Use `path` to scope/focus; use `file` to anchor a position.";
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if (params.file) {
|
|
17
|
-
const resolvedFile = normalizePath(params.file, cwd);
|
|
18
|
-
if (fs.existsSync(resolvedFile) && fs.statSync(resolvedFile).isDirectory()) {
|
|
19
|
-
return "**Error:** `file` points to a directory. Use `path` to scope a directory; use `file` to anchor a position in a file.";
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if ((params.line != null || params.character != null) && !params.file) {
|
|
24
|
-
return "**Error:** `line` and `character` require `file`.";
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/** Shared validation for explicit pattern-tool input. */
|
|
31
|
-
export function validatePatternToolParams(
|
|
32
|
-
params: Pick<CodeQueryParams, "path" | "file" | "line" | "character" | "kind">,
|
|
33
|
-
cwd: string,
|
|
34
|
-
): string | null {
|
|
35
|
-
const commonError = validateFocusedToolParams(params, cwd);
|
|
36
|
-
if (commonError) return commonError;
|
|
37
|
-
|
|
38
|
-
if (params.kind && !STRUCTURED_PATTERN_KINDS.has(params.kind)) {
|
|
39
|
-
return "**Error:** `code_pattern` `kind` must be one of `definition`, `export`, or `import`.";
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return null;
|
|
43
|
-
}
|
package/src/types.ts
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
// ── Canonical shared types for the code-understanding stack ─────────────
|
|
2
|
-
|
|
3
|
-
/** 0-based LSP position. */
|
|
4
|
-
export interface CodePosition {
|
|
5
|
-
line: number;
|
|
6
|
-
character: number;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/** A source range spanning two CodePositions. */
|
|
10
|
-
export interface SourceRange {
|
|
11
|
-
start: CodePosition;
|
|
12
|
-
end: CodePosition;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/** A code location (file URI + range). */
|
|
16
|
-
export interface CodeLocation {
|
|
17
|
-
uri: string;
|
|
18
|
-
range: SourceRange;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** A discovered symbol / declaration. */
|
|
22
|
-
export interface CodeSymbol {
|
|
23
|
-
name: string;
|
|
24
|
-
kind: string;
|
|
25
|
-
file: string;
|
|
26
|
-
line: number;
|
|
27
|
-
character: number;
|
|
28
|
-
container?: string | null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/** Discriminated result union for provider operations. */
|
|
32
|
-
export type CodeResult<T> =
|
|
33
|
-
| { kind: "success"; data: T }
|
|
34
|
-
| { kind: "unsupported-language"; file: string; message: string }
|
|
35
|
-
| { kind: "file-access-error"; file: string; message: string }
|
|
36
|
-
| { kind: "validation-error"; message: string }
|
|
37
|
-
| { kind: "runtime-error"; message: string }
|
|
38
|
-
| { kind: "unavailable"; message: string };
|
|
39
|
-
|
|
40
|
-
/** Result confidence classification. */
|
|
41
|
-
export type ConfidenceMode = "semantic" | "structural" | "heuristic" | "unavailable";
|
|
42
|
-
|
|
43
|
-
/** Provider availability states. */
|
|
44
|
-
export type ProviderAvailability =
|
|
45
|
-
| { kind: "pending" }
|
|
46
|
-
| { kind: "ready" }
|
|
47
|
-
| { kind: "disabled" }
|
|
48
|
-
| { kind: "inactive" }
|
|
49
|
-
| { kind: "unavailable"; reason: string };
|
|
50
|
-
|
|
51
|
-
// ── Structural data shapes (value types, range-flattened) ──────────────
|
|
52
|
-
|
|
53
|
-
export interface OutlineData {
|
|
54
|
-
name: string;
|
|
55
|
-
kind: string;
|
|
56
|
-
startLine: number;
|
|
57
|
-
startCharacter: number;
|
|
58
|
-
endLine: number;
|
|
59
|
-
endCharacter: number;
|
|
60
|
-
children?: OutlineData[];
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface ExportData {
|
|
64
|
-
name: string;
|
|
65
|
-
kind: string;
|
|
66
|
-
startLine: number;
|
|
67
|
-
startCharacter: number;
|
|
68
|
-
endLine: number;
|
|
69
|
-
endCharacter: number;
|
|
70
|
-
moduleSpecifier?: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface ImportData {
|
|
74
|
-
moduleSpecifier: string;
|
|
75
|
-
startLine: number;
|
|
76
|
-
startCharacter: number;
|
|
77
|
-
endLine: number;
|
|
78
|
-
endCharacter: number;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface NodeAtData {
|
|
82
|
-
type: string;
|
|
83
|
-
startLine: number;
|
|
84
|
-
startCharacter: number;
|
|
85
|
-
endLine: number;
|
|
86
|
-
endCharacter: number;
|
|
87
|
-
text: string;
|
|
88
|
-
ancestry: Array<{
|
|
89
|
-
type: string;
|
|
90
|
-
startLine: number;
|
|
91
|
-
startCharacter: number;
|
|
92
|
-
endLine: number;
|
|
93
|
-
endCharacter: number;
|
|
94
|
-
}>;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface CalleesData {
|
|
98
|
-
enclosingScope: { name: string; startLine: number; endLine: number };
|
|
99
|
-
callees: Array<{ name: string; startLine: number }>;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// ── Existing code-intelligence types ──────────────────────────────────
|
|
103
|
-
|
|
104
|
-
import type { PrioritySignalsSummary } from "./prioritization-signals.ts";
|
|
105
|
-
|
|
106
|
-
/** Structured details metadata returned alongside markdown brief content. */
|
|
107
|
-
export interface BriefDetails {
|
|
108
|
-
confidence: ConfidenceMode;
|
|
109
|
-
focusTarget: string | null;
|
|
110
|
-
startHere: Array<{ target: string; reason: string }>;
|
|
111
|
-
publicSurfaces: string[];
|
|
112
|
-
dependencySummary: { moduleCount: number; edgeCount: number } | null;
|
|
113
|
-
omittedCount: number;
|
|
114
|
-
nextQueries: string[];
|
|
115
|
-
prioritySignals?: PrioritySignalsSummary | null;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/** Structured details metadata for factual map results. */
|
|
119
|
-
export interface MapDetails {
|
|
120
|
-
scope: string | null;
|
|
121
|
-
totalFiles: number;
|
|
122
|
-
childDirectoryCount: number;
|
|
123
|
-
landmarkCount: number;
|
|
124
|
-
nextQueries: string[];
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/** Structured details metadata for relationship and pattern results. */
|
|
128
|
-
export interface SearchDetails {
|
|
129
|
-
confidence: ConfidenceMode;
|
|
130
|
-
scope: string | null;
|
|
131
|
-
candidateCount: number;
|
|
132
|
-
omittedCount: number;
|
|
133
|
-
nextQueries: string[];
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/** Structured details metadata for affected analysis results. */
|
|
137
|
-
export interface AffectedDetails {
|
|
138
|
-
confidence: ConfidenceMode;
|
|
139
|
-
directCount: number;
|
|
140
|
-
downstreamCount: number;
|
|
141
|
-
riskLevel: "low" | "medium" | "high";
|
|
142
|
-
checkNext: string[];
|
|
143
|
-
likelyTests: string[];
|
|
144
|
-
omittedCount: number;
|
|
145
|
-
nextQueries: string[];
|
|
146
|
-
prioritySignals?: PrioritySignalsSummary | null;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/** Disambiguation candidate for ambiguous symbol resolution. */
|
|
150
|
-
export interface DisambiguationCandidate {
|
|
151
|
-
name: string;
|
|
152
|
-
kind: string | null;
|
|
153
|
-
container: string | null;
|
|
154
|
-
file: string;
|
|
155
|
-
line: number;
|
|
156
|
-
character: number;
|
|
157
|
-
reason: string;
|
|
158
|
-
rank: number;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/** Tool result shape returned by executeAction. */
|
|
162
|
-
export interface CodeIntelResult {
|
|
163
|
-
content: string;
|
|
164
|
-
details?:
|
|
165
|
-
| { type: "brief"; data: BriefDetails }
|
|
166
|
-
| { type: "map"; data: MapDetails }
|
|
167
|
-
| { type: "search"; data: SearchDetails }
|
|
168
|
-
| { type: "affected"; data: AffectedDetails };
|
|
169
|
-
}
|