@mrclrchtr/supi-review 11.1.0 → 11.3.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/CHANGELOG.md +6 -0
- package/README.md +39 -3
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/child-web-tools.ts +110 -0
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts +11 -0
- package/node_modules/@mrclrchtr/supi-agent-runtime/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/run.ts +2 -0
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/usage.ts +15 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/CHANGELOG.md +19 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/README.md +41 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +9 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/child-web-tools.ts +110 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/session.ts +11 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/README.md +81 -7
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +9 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/child-web-tools.ts +110 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/session.ts +11 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/LICENSE +15 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/README.md +680 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/classes/index.js +7 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/classes/range.js +577 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/major.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/index.js +93 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/re.js +223 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/package.json +78 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/preload.js +4 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/range.bnf +17 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/package.json +5 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-collection.ts +11 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +77 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-input-admission.ts +149 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-typescript-project.ts +40 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +174 -49
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/config.ts +53 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/operation-support.ts +19 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/server-config.ts +22 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/typescript-launch.ts +276 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/evidence.ts +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-project-info.ts +22 -10
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-symbol.ts +157 -23
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +306 -75
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/provider/refactor-planning.ts +4 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-controller.ts +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registry.ts +19 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-rename.ts +1 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/scanner.ts +27 -15
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/workspace-lsp-runtime.ts +5 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/README.md +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +9 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/child-web-tools.ts +110 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/session.ts +11 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm.json +5 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm.json +5 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/call-sites.ts +40 -25
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/callees.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/worker/call-context.ts +44 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/package.json +6 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/capability/capability-warnings.ts +18 -12
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/check.ts +115 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/diagnostics.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/file-scope.ts +2 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/semantic-state.ts +38 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/server-status.ts +14 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/signals.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/status.ts +82 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/refactor/apply.ts +17 -8
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/search/exclusions.ts +47 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/search/paths.ts +32 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/anchored-structural.ts +3 -8
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/anchored.ts +4 -20
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/identity.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/latex-label-container.ts +6 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/latex-section-anchor.ts +6 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/resolution.ts +18 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/symbol.ts +39 -11
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/types.ts +6 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/extension.ts +17 -11
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/graph/collect.ts +1 -10
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/graph-types.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/graph-workflow.ts +1 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/health-types.ts +7 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/health-workflow.ts +8 -43
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/inspect/collect.ts +8 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/inspect/file-point.ts +2 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/inspect-workflow.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/collect.ts +184 -20
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/context-facts.ts +27 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/context-sections.ts +49 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/facts.ts +132 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/gather.ts +98 -11
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/workspace-context.ts +16 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation-types.ts +8 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation-workflow.ts +20 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/refactor-identity.ts +76 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/refactor-plans.ts +5 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/refactor-workflow.ts +15 -17
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/target-store.ts +3 -18
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/target-workflow.ts +33 -16
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/substrate/lsp/recovery.ts +5 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/guidance.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/render.ts +8 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/result.ts +78 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/spec.ts +4 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/structured.ts +25 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/details.ts +1 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/display.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/guidance.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/markdown.ts +11 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/read-next.ts +38 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/reference-selection.ts +30 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/result.ts +25 -118
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/section.ts +133 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/spec.ts +3 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/structured.ts +17 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/display-paths.ts +92 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/file-scope-markdown.ts +3 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/markdown.ts +12 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/result.ts +18 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/spec.ts +5 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/structured-schema.ts +250 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/structured.ts +256 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/result.ts +11 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/spec.ts +7 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/structured.ts +231 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/execute.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/result.ts +31 -8
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/spec.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/structured-schema.ts +617 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/structured-workspace.ts +194 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/structured.ts +189 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-format.ts +2 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-observations.ts +81 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-output.ts +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-projects.ts +16 -31
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-sections.ts +46 -32
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_apply/execute.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_apply/result.ts +14 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_apply/spec.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_apply/structured.ts +49 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/result.ts +18 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/spec.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/structured.ts +127 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/markdown.ts +6 -30
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/result.ts +24 -11
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/structured.ts +7 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/refactor.ts +8 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/structured.ts +8 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/types.ts +18 -14
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/schemas.ts +12 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-command.ts +147 -322
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-overlay.ts +584 -421
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-presentation.ts +108 -0
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-core/src/child-web-tools.ts +110 -0
- package/node_modules/@mrclrchtr/supi-core/src/session.ts +11 -0
- package/package.json +5 -4
- package/src/config.ts +11 -0
- package/src/session/review-artifact-store.ts +7 -2
- package/src/target/file-manifest.ts +24 -0
- package/src/target/packet.ts +3 -2
- package/src/tool/output-page.ts +6 -4
- package/src/tool/review_audit/result.ts +50 -15
- package/src/tool/review_audit/spec.ts +2 -0
- package/src/tool/review_audit/structured.ts +67 -0
- package/src/tool/review_output/execute.ts +6 -4
- package/src/tool/review_output/guidance.ts +1 -1
- package/src/tool/review_output/result.ts +8 -3
- package/src/tool/review_output/spec.ts +10 -0
- package/src/tool/review_run/child-resources.ts +18 -10
- package/src/tool/review_run/child-session.ts +4 -0
- package/src/tool/review_run/execute.ts +4 -0
- package/src/tool/review_run/execution.ts +3 -0
- package/src/tool/review_run/guidance.ts +1 -1
- package/src/tool/review_run/planner-input.ts +2 -1
- package/src/tool/review_run/planner.ts +14 -3
- package/src/tool/review_run/register.ts +1 -1
- package/src/tool/review_run/runner.ts +18 -5
- package/src/tool/review_run/schemas.ts +12 -7
- package/src/tool/review_run/system-prompt.ts +10 -1
- package/src/tool/review_run/workflow.ts +7 -0
- package/src/tui/review-command.ts +8 -0
- package/src/types.ts +5 -0
- package/src/web-access.ts +15 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [11.3.0]
|
|
4
|
+
|
|
5
|
+
- Added opt-in `review.reviewerWebEnabled`: Reviewer investigation can use the Web tools the session provides, as untrusted support that never replaces Target Evidence.
|
|
6
|
+
- Added package-specific release notes for inspection-only code reviews.
|
package/README.md
CHANGED
|
@@ -79,6 +79,15 @@ Tasks can include `criteriaSources`. Each source has a `reference` and a `summar
|
|
|
79
79
|
|
|
80
80
|
`paths` is an optional top-level Review Scope. Each path is workspace-relative. The Review Engine validates each path in the frozen after state before it starts Reviewer Sessions. Paths are advisory. They focus every task, but they do not restrict inspection, evidence, or findings.
|
|
81
81
|
|
|
82
|
+
### Compact handoffs
|
|
83
|
+
|
|
84
|
+
- Use `sharedContext` for batch-wide context and reported verification: completed, pending, or not checked, with the checked revision when known. Omit full logs.
|
|
85
|
+
- Keep each task's objective, criteria, and known requirement-to-source/test locations in its `instructions`. Paths, symbols, or test names are sufficient navigation hints; do not investigate just to fill missing mappings.
|
|
86
|
+
- Omit unknown mappings and revision associations rather than guessing. The interactive Planner preserves only relevant hints and reported checks supplied in its bounded input; it does not inspect or verify them.
|
|
87
|
+
- Reviewers independently inspect the implementation and test coverage. Navigation hints are not proof of coverage, and reported checks are not independently verified results.
|
|
88
|
+
|
|
89
|
+
For example, a task's `instructions` may include `Cancellation during setup → src/run.ts: startRun; cancellation.test.ts: "disposes late session"`. Its batch's `sharedContext` may report `Focused cancellation tests completed on <commit>; full verification pending; browser behavior not checked`.
|
|
90
|
+
|
|
82
91
|
## Review Workspaces
|
|
83
92
|
|
|
84
93
|
The Review Engine records exact commit state before it starts a Review Workspace.
|
|
@@ -95,6 +104,8 @@ Workspaces are marked and locked in the Git worktree list. Normal cleanup remove
|
|
|
95
104
|
|
|
96
105
|
`review.reviewerCodemodeEnabled` defaults to `false`. When enabled, both `review_run` and `/supi-review` give Reviewer investigation PI codemode scripting and the invocation's scoped classifier/image-model catalogue. This does not enable codemode for Planner Drafts or Submission Recovery, inherit parent codemode settings, add MCP servers, load ambient extensions, or expand Reviewer tool permissions. Auxiliary-model calls may transmit supplied inputs, including repository evidence, to external providers and may incur provider costs; availability does not guarantee provider entitlement or success.
|
|
97
106
|
|
|
107
|
+
`review.reviewerWebEnabled` defaults to `false`. When enabled, both `review_run` and `/supi-review` give Reviewer investigation the Web tools (`web_fetch_md`, `web_search`, `web_docs_search`, `web_docs_fetch`) that the loaded `@mrclrchtr/supi-web` extension currently makes callable in the containing session. This Reviewer Web Access is captured once per Review. Unavailable tools are silently absent, and `supi-review` does not depend on `supi-web`. Planner Drafts and Submission Recovery never receive Web tools. Web content is untrusted supporting material. It can explain Review Criteria or library behavior, but it is never Target Evidence: every finding must still be supported by inspected code. Queries and URLs reach external services under the existing Web settings.
|
|
108
|
+
|
|
98
109
|
`review.reviewerThinkingLevel` selects the PI reasoning level for Reviewer Sessions. It defaults to `max`. `review.plannerThinkingLevel` selects the level for Planner Drafts. It defaults to `low`. Both settings use `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Project and global values are independent. The selected level is clamped to the selected model's capabilities. Invalid hand-written values stop the affected Review flow with a role-specific error.
|
|
99
110
|
|
|
100
111
|
`review.recoveryModel` selects one optional explicit model for Submission Recovery. It defaults to `disabled`. `current` is not a valid implicit Recovery Model. If the configured model is unavailable, the original review still runs. Recovery records the failed model switch only if the chain reaches that model.
|
|
@@ -110,7 +121,9 @@ The Reviewer Protocol owns finding eligibility:
|
|
|
110
121
|
- `change` permits findings attributable to the selected change. A pre-existing issue is permitted only in a changed file or a directly affected symbol. It stays advisory unless the selected change worsens or newly exposes it.
|
|
111
122
|
- `state` permits findings relevant to the Review Criteria anywhere in the frozen after state. A relevant pre-existing finding can block acceptance.
|
|
112
123
|
|
|
113
|
-
A change packet gives exact before and after guidance, a changed-path manifest, and
|
|
124
|
+
A change packet gives exact before and after guidance, a changed-path manifest, change statistics, and a compact status breakdown of the complete captured inventory, even when the manifest omits paths. The breakdown reports captured Git statuses; it does not perform additional rename detection or establish behavioral preservation. Planner input uses the same breakdown. A state packet gives only after-state guidance. When it uses a filesystem workspace, staged changes are freeze mechanics and are not Target Evidence.
|
|
125
|
+
|
|
126
|
+
Change reviews start with the changed-path inventory and relevant diffs, splitting large changes into bounded groups. Reviewers retrieve surrounding code, callers, and dependencies as needed and avoid rereading evidence unless resolving a specific question; full-file inspection remains appropriate when needed.
|
|
114
127
|
|
|
115
128
|
Repository content is untrusted evidence. It cannot override the Reviewer Protocol or a Review Task. Reviewer Sessions use repository documents as Review Criteria only.
|
|
116
129
|
|
|
@@ -143,7 +156,15 @@ Each task result includes its Review Mode, packet SHA-256, verdict, finding coun
|
|
|
143
156
|
|
|
144
157
|
`blocksAcceptance` keeps its existing meaning. The Review Engine derives `issues` for a blocking finding. It derives `incomplete` for incomplete Criteria Coverage without a blocking finding, `pass_with_findings` for only non-blocking findings, and `pass` for no findings.
|
|
145
158
|
|
|
146
|
-
Parent-facing output from `review_run` or `/supi-review` is stored as a bounded session artifact. Use `review_output` with its returned `artifactId` and offset to read more output.
|
|
159
|
+
Parent-facing output from `review_run` or `/supi-review` is stored as a bounded session artifact. Use `review_output` with its returned `artifactId` and offset to read more output. Artifacts retain the existing session limits and expire after 30 minutes, reload, resume, or a branch change.
|
|
160
|
+
|
|
161
|
+
`review_output` declares a native output schema. Direct calls remain paged: `offset` and `limit` select the readable page, with continuation instructions when needed. Codemode receives `{ artifactId, text, totalCharacters }`, where `text` is the **complete stored report**, independent of that page selection. It contains no synthetic paging notice or empty-page marker. `totalCharacters` counts UTF-16 code units. This is formatted report text, not typed findings or Task Verdict data.
|
|
162
|
+
|
|
163
|
+
```js
|
|
164
|
+
const report = await tools.review_output({ artifactId });
|
|
165
|
+
// Select what reaches the model; the script receives the full stored report.
|
|
166
|
+
return report.text.slice(-2000);
|
|
167
|
+
```
|
|
147
168
|
|
|
148
169
|
## Local reviewer replay
|
|
149
170
|
|
|
@@ -151,7 +172,22 @@ Parent-facing output from `review_run` or `/supi-review` is stored as a bounded
|
|
|
151
172
|
|
|
152
173
|
With an artifact id, the audit tool now returns **Replay Outline** by default. The outline gives one metadata-only row for each stable zero-based position in the persisted captured-message array. It includes role, content kinds and size, tool names, stop reason, and error presence. It does not include message prose, provider error text, tool arguments, tool results, arbitrary message fields, or file paths.
|
|
153
174
|
|
|
154
|
-
Use `view: "message"` with `messageIndex` to page one selected persisted message. Use `view: "raw"` to page the exact
|
|
175
|
+
Use `view: "message"` with `messageIndex` to page one selected persisted message. Use `view: "raw"` to page the exact persisted replay JSON. Message and raw views remain private opt-in audit access and can contain repository evidence, provider errors, tool arguments, and tool output. New records keep `thinkingLevel` as the effective level and add `requestedThinkingLevel`; older records have no requested level.
|
|
176
|
+
|
|
177
|
+
`review_audit` declares mode-discriminated native data for the **selected page only**, unlike `review_output`:
|
|
178
|
+
|
|
179
|
+
| `mode` | Native selection |
|
|
180
|
+
| --- | --- |
|
|
181
|
+
| `list` | `audits` (page-visible `{ artifactId, expiresAt }` entries) and `totalAudits`. An entry is included only when its full artifact ID is on the page, even if the rest of its row is split. |
|
|
182
|
+
| `outline` | `artifactId`, allowlisted `rows`, their `messageIndexes`, and `totalMessages`. Only complete rows on the page are included; split rows remain in page text only. |
|
|
183
|
+
| `message` | Explicitly selected `artifactId` and `messageIndex`; text is only that message's selected page. |
|
|
184
|
+
| `raw` | Explicitly selected `artifactId`; text is only the raw JSON page, never an implicit full replay. |
|
|
185
|
+
|
|
186
|
+
Every mode includes clean `text`, `offset`, `totalCharacters`, and optional `nextOffset`. Offsets and totals count UTF-16 code units. Native text excludes synthetic continuation notices and is `""` at end-of-content; direct-call text retains continuation instructions and `[no content]`. Follow `nextOffset` with the same view/identity to continue. Empty lists and outlines remain successful metadata-only results. Reaching the last page establishes neither complete review evidence nor Criteria Coverage.
|
|
187
|
+
|
|
188
|
+
List and outline results do not include message contents, provider error text, tool arguments/results, file paths, or unselected replay evidence. Auditing consent, activation, seven-day expiry, and cancellation/error behavior are unchanged. Existing renderer/state `details` are separate from native script data.
|
|
189
|
+
|
|
190
|
+
After updating the extension, active Pi sessions require `/reload` or a restart.
|
|
155
191
|
|
|
156
192
|
## Post-review behavior
|
|
157
193
|
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Session-provided Web tools for SuPi child sessions (Agent Runs and Reviewer Sessions).
|
|
2
|
+
//
|
|
3
|
+
// The loaded supi-web extension answers a synchronous request on the parent event bus.
|
|
4
|
+
// Consumers never depend on supi-web; when it is absent or provides no tools, the
|
|
5
|
+
// request returns undefined and the child simply lacks Web tools.
|
|
6
|
+
|
|
7
|
+
import type { ExtensionAPI, ExtensionFactory } from "@earendil-works/pi-coding-agent";
|
|
8
|
+
|
|
9
|
+
/** Web tools that child sessions may receive when the containing session provides them. */
|
|
10
|
+
export const CHILD_WEB_TOOL_NAMES = [
|
|
11
|
+
"web_fetch_md",
|
|
12
|
+
"web_search",
|
|
13
|
+
"web_docs_search",
|
|
14
|
+
"web_docs_fetch",
|
|
15
|
+
] as const;
|
|
16
|
+
|
|
17
|
+
/** One session-provided Web tool name. */
|
|
18
|
+
export type ChildWebToolName = (typeof CHILD_WEB_TOOL_NAMES)[number];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Web tools currently callable in the containing session plus a child-only extension
|
|
22
|
+
* factory that registers them. The factory must not capture the parent session; it may
|
|
23
|
+
* capture plain data such as the containing session's configuration directory.
|
|
24
|
+
*/
|
|
25
|
+
export interface ChildWebToolProvision {
|
|
26
|
+
readonly toolNames: readonly ChildWebToolName[];
|
|
27
|
+
/** Register the requested subset of `toolNames` in a child session. */
|
|
28
|
+
readonly createFactory: (toolNames: readonly ChildWebToolName[]) => ExtensionFactory;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Plain containing-session data supplied with a child Web tool request. */
|
|
32
|
+
export interface ChildWebToolsRequestContext {
|
|
33
|
+
/**
|
|
34
|
+
* Working directory whose SuPi configuration governs Web settings such as Firecrawl.
|
|
35
|
+
* Children with a different cwd (for example a frozen Review Workspace) keep this policy.
|
|
36
|
+
*/
|
|
37
|
+
readonly configCwd: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type EventBusLike = Pick<ExtensionAPI["events"], "on" | "emit">;
|
|
41
|
+
|
|
42
|
+
const REQUEST_CHANNEL = "supi:child-web-tools:request";
|
|
43
|
+
const RESPONSE_CHANNEL = "supi:child-web-tools:response";
|
|
44
|
+
|
|
45
|
+
interface ChildWebToolsRequest extends ChildWebToolsRequestContext {
|
|
46
|
+
readonly requestId: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface ChildWebToolsResponse {
|
|
50
|
+
readonly requestId: string;
|
|
51
|
+
readonly provision: ChildWebToolProvision;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let nextRequestId = 0;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Answer child Web tool requests on the parent event bus. The callback must be synchronous
|
|
58
|
+
* because Pi's event bus does not await listeners. Returns an unsubscribe function.
|
|
59
|
+
*/
|
|
60
|
+
export function provideChildWebTools(
|
|
61
|
+
events: EventBusLike,
|
|
62
|
+
resolve: (context: ChildWebToolsRequestContext) => ChildWebToolProvision | undefined,
|
|
63
|
+
): () => void {
|
|
64
|
+
return events.on(REQUEST_CHANNEL, (data) => {
|
|
65
|
+
const request = data as Partial<ChildWebToolsRequest> | undefined;
|
|
66
|
+
if (typeof request?.requestId !== "string" || typeof request.configCwd !== "string") return;
|
|
67
|
+
const { requestId, configCwd } = request;
|
|
68
|
+
const provision = resolve({ configCwd });
|
|
69
|
+
if (!provision || provision.toolNames.length === 0) return;
|
|
70
|
+
events.emit(RESPONSE_CHANNEL, { requestId, provision } satisfies ChildWebToolsResponse);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Capture the Web tools the containing session currently provides, if any. */
|
|
75
|
+
export function requestChildWebTools(
|
|
76
|
+
events: EventBusLike,
|
|
77
|
+
context: ChildWebToolsRequestContext,
|
|
78
|
+
): ChildWebToolProvision | undefined {
|
|
79
|
+
const requestId = `child-web-${process.pid}-${++nextRequestId}`;
|
|
80
|
+
let provision: ChildWebToolProvision | undefined;
|
|
81
|
+
const unsubscribe = events.on(RESPONSE_CHANNEL, (data) => {
|
|
82
|
+
const response = data as Partial<ChildWebToolsResponse> | undefined;
|
|
83
|
+
if (response?.requestId === requestId && response.provision) provision = response.provision;
|
|
84
|
+
});
|
|
85
|
+
try {
|
|
86
|
+
events.emit(REQUEST_CHANNEL, { requestId, ...context } satisfies ChildWebToolsRequest);
|
|
87
|
+
} finally {
|
|
88
|
+
unsubscribe();
|
|
89
|
+
}
|
|
90
|
+
return provision;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Return the Web tools callable in a session under Pi's exposure rules: active `direct`
|
|
95
|
+
* tools, plus registered `codemode` and `deferred` tools. `model-only` and `hidden`
|
|
96
|
+
* tools are not callable.
|
|
97
|
+
*/
|
|
98
|
+
export function callableChildWebToolNames(
|
|
99
|
+
pi: Pick<ExtensionAPI, "getAllTools" | "getActiveTools">,
|
|
100
|
+
): ChildWebToolName[] {
|
|
101
|
+
const active = new Set(pi.getActiveTools());
|
|
102
|
+
const exposures = new Map(
|
|
103
|
+
pi.getAllTools().map((tool) => [tool.name, tool.exposure ?? "direct"] as const),
|
|
104
|
+
);
|
|
105
|
+
return CHILD_WEB_TOOL_NAMES.filter((name) => {
|
|
106
|
+
const exposure = exposures.get(name);
|
|
107
|
+
if (exposure === "direct") return active.has(name);
|
|
108
|
+
return exposure === "codemode" || exposure === "deferred";
|
|
109
|
+
});
|
|
110
|
+
}
|
package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
// supi-core session domain — session utilities and registries.
|
|
2
2
|
|
|
3
|
+
export type {
|
|
4
|
+
ChildWebToolName,
|
|
5
|
+
ChildWebToolProvision,
|
|
6
|
+
ChildWebToolsRequestContext,
|
|
7
|
+
} from "./child-web-tools.ts";
|
|
8
|
+
export {
|
|
9
|
+
CHILD_WEB_TOOL_NAMES,
|
|
10
|
+
callableChildWebToolNames,
|
|
11
|
+
provideChildWebTools,
|
|
12
|
+
requestChildWebTools,
|
|
13
|
+
} from "./child-web-tools.ts";
|
|
3
14
|
export { createRegistry, createSessionStateRegistry } from "./registry-utils.ts";
|
|
4
15
|
export type {
|
|
5
16
|
SessionCapabilitySkill,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-agent-runtime",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0",
|
|
4
4
|
"description": "SuPi Agent Run runtime — neutral lifecycle management for in-process pi sessions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"!__tests__"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@mrclrchtr/supi-core": "11.
|
|
31
|
+
"@mrclrchtr/supi-core": "11.3.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@earendil-works/pi-ai": "*",
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
type AgentRunUsageBaseline,
|
|
46
46
|
collectAgentRunUsage,
|
|
47
47
|
createAgentRunUsageBaseline,
|
|
48
|
+
isProviderReportedUsageDelta,
|
|
48
49
|
} from "./usage.ts";
|
|
49
50
|
|
|
50
51
|
/** Grace period for a provider abort before disposal continues. */
|
|
@@ -1349,6 +1350,7 @@ function subtractUsage(after: Usage | undefined, before: Usage | undefined): Usa
|
|
|
1349
1350
|
cacheRead: nonNegative(after.cost.cacheRead - (before?.cost.cacheRead ?? 0)),
|
|
1350
1351
|
cacheWrite: nonNegative(after.cost.cacheWrite - (before?.cost.cacheWrite ?? 0)),
|
|
1351
1352
|
total: nonNegative(after.cost.total - (before?.cost.total ?? 0)),
|
|
1353
|
+
totalFromProvider: isProviderReportedUsageDelta(after, before),
|
|
1352
1354
|
},
|
|
1353
1355
|
...(cacheWrite1h === undefined ? {} : { cacheWrite1h }),
|
|
1354
1356
|
...(reasoning === undefined ? {} : { reasoning }),
|
|
@@ -5,7 +5,15 @@ function addOptional(first: number | undefined, second: number | undefined): num
|
|
|
5
5
|
return first === undefined && second === undefined ? undefined : (first ?? 0) + (second ?? 0);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
/**
|
|
8
|
+
/** A usage delta is provider-reported only when all contributing snapshots are. */
|
|
9
|
+
export function isProviderReportedUsageDelta(after: Usage, before: Usage | undefined): boolean {
|
|
10
|
+
return (
|
|
11
|
+
after.cost.totalFromProvider === true &&
|
|
12
|
+
(before === undefined || before.cost.totalFromProvider === true)
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Add PI Usage records; the total is provider-reported only when both parts are. */
|
|
9
17
|
export function addAgentRunUsage(first: Usage, second: Usage): Usage {
|
|
10
18
|
const cacheWrite1h = addOptional(first.cacheWrite1h, second.cacheWrite1h);
|
|
11
19
|
const reasoning = addOptional(first.reasoning, second.reasoning);
|
|
@@ -23,6 +31,8 @@ export function addAgentRunUsage(first: Usage, second: Usage): Usage {
|
|
|
23
31
|
cacheRead: first.cost.cacheRead + second.cost.cacheRead,
|
|
24
32
|
cacheWrite: first.cost.cacheWrite + second.cost.cacheWrite,
|
|
25
33
|
total: first.cost.total + second.cost.total,
|
|
34
|
+
totalFromProvider:
|
|
35
|
+
first.cost.totalFromProvider === true && second.cost.totalFromProvider === true,
|
|
26
36
|
},
|
|
27
37
|
};
|
|
28
38
|
}
|
|
@@ -272,6 +282,7 @@ function subtractUsage(after: Usage | undefined, before: Usage | undefined): Usa
|
|
|
272
282
|
cacheRead: difference(after.cost.cacheRead, before?.cost.cacheRead),
|
|
273
283
|
cacheWrite: difference(after.cost.cacheWrite, before?.cost.cacheWrite),
|
|
274
284
|
total: difference(after.cost.total, before?.cost.total),
|
|
285
|
+
totalFromProvider: isProviderReportedUsageDelta(after, before),
|
|
275
286
|
},
|
|
276
287
|
};
|
|
277
288
|
return usage.input || usage.output || usage.cacheRead || usage.cacheWrite || usage.cost.total
|
|
@@ -319,6 +330,9 @@ function normalizeUsage(value: unknown): Usage | undefined {
|
|
|
319
330
|
cacheRead: numberOrZero(costRecord.cacheRead),
|
|
320
331
|
cacheWrite: numberOrZero(costRecord.cacheWrite),
|
|
321
332
|
total: numberOrZero(costRecord.total),
|
|
333
|
+
...(typeof costRecord.totalFromProvider === "boolean"
|
|
334
|
+
? { totalFromProvider: costRecord.totalFromProvider }
|
|
335
|
+
: {}),
|
|
322
336
|
},
|
|
323
337
|
...(cacheWrite1h === undefined ? {} : { cacheWrite1h }),
|
|
324
338
|
...(reasoning === undefined ? {} : { reasoning }),
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [11.3.0]
|
|
4
|
+
|
|
5
|
+
- Added package-specific release notes for code navigation, diagnostics, and refactoring.
|
|
6
|
+
- Capped `code_graph` reference results distribute sites across files, with matching source-reading suggestions.
|
|
7
|
+
- Fixed transient navigation failures when parallel requests first access different files, while retaining freshness checks.
|
|
8
|
+
- Rename and code-action planning now coordinate concurrent first file accesses without blocking parallel reads or weakening edit freshness checks.
|
|
9
|
+
- Scoped symbol queries no longer become incomplete solely because generated results were excluded outside the requested scope; ambiguous or genuinely incomplete evidence still requires explicit selection.
|
|
10
|
+
- Symbol queries scoped to an explicitly selected generated file or directory no longer report a false "Symbol not found" before the server has loaded that scope.
|
|
11
|
+
- Semantic symbol search with the TypeScript 6 or earlier server (tsserver) no longer reports existing symbols as missing at session start when a root config file, such as a dotfile excluded by `tsconfig.json`, sorts first; `code_find` and symbol targets now find them without opening a file first, and report an incomplete search instead of "not found" when no project file could be loaded.
|
|
12
|
+
- Symbol targets no longer require choosing from a single candidate when the only gap is an automatically excluded generated copy, such as a `dist/*.d.ts` declaration; the target resolves and notes the excluded path. Route failures and coverage gaps still require explicit selection. `code_graph` shows the same target notes, and semantic `code_find` reports an exact count and a null `partialReason` for such results while still disclosing the excluded paths in `automaticPathExclusion`.
|
|
13
|
+
- When a language server exits during startup, `code_health` and the status overlay now show the server's own error output instead of a transport error such as `write EPIPE` ([#570](https://github.com/mrclrchtr/supi/issues/570)).
|
|
14
|
+
- The status inspector adds **Refresh health** (`h` or F6), which runs the same bounded recovery and diagnostic refresh as `code_health({ refresh: true })` and reports its outcome separately from diagnostic confirmation ([#371](https://github.com/mrclrchtr/supi/issues/371)). Expanded file details now use only that file's diagnostic evidence, and a clean summary requires every requested tracked file to be confirmed.
|
|
15
|
+
- Health output distinguishes files without a compatible configured language server from configured servers that fail to start, and keeps a startup failure's explanation on later requests without retrying the server. Ownership roots outside the workspace are shown as absolute paths.
|
|
16
|
+
- An exact-file `code_health` refresh no longer rejects healthy routes for files outside the workspace or in automatically excluded paths.
|
|
17
|
+
- `code_graph` relations stay complete when only the display cap hides rows, and source paths use one canonical form across all code tools.
|
|
18
|
+
- `code_graph` callees and calls no longer report type-only `import("...")` references as calls, and TypeScript import types inside generic call arguments now parse correctly.
|
|
19
|
+
- `code_refactor_plan` omits edits that would leave text unchanged; a refactor with no real changes, such as renaming a symbol to its current name, no longer produces an applicable plan.
|
|
@@ -77,17 +77,42 @@ code_health({ scope: "packages/api/src/index.ts", refresh: true })
|
|
|
77
77
|
Important tool rules:
|
|
78
78
|
|
|
79
79
|
- **Resolve:** new target handles require semantic readiness. A comment or whitespace point is not a symbol; use `code_inspect` there. Handles are session-local and become stale when file contents change. Resolve the symbol again rather than reuse a stale handle. Symbol queries put case-sensitive exact-name matches first, before the display cap. Provider order stays unchanged within exact-name and other matches. An incomplete provider result never selects a target automatically.
|
|
80
|
-
- **Graph:** relations are `references` (default), `callees`, and `implements`. Use `["all"]` for all three. Callee depth is `direct` by default; `deep` includes nested scopes, not transitive calls. Callees match source shape, not symbol identity. Counts include each distinct call site; repeated expressions share one agent-output row with all shown line/column coordinates. Each relation reports its counts and limits once. Provider-limited results have unknown totals; invalid locations are disclosed separately. Callee previews shorten receiver argument lists from syntax without changing grouping by the full expression. Matching previews get local expression numbers so distinct source expressions remain clear. Unavailable references and implementations keep the provider reason. If no provider exists, the result names that gap. Unavailable callees keep the provider reason and a source-inspection next step. Ambiguous targets ask for candidate selection, not input correction. Candidate limits retain exact totals, or unknown totals when the provider returns partial data. Agent output and both transcript views disclose omissions. Only shown candidates receive target handles. The human transcript shows the resolved target and per-relation evidence types and status. The expanded view groups up to 20 sites per relation by file, without a duplicate Markdown body. If this display limit hides returned sites, the transcript links to a temporary file with all returned evidence. This file does not include evidence beyond `maxResults`, and its path does not add text to an otherwise complete agent result. Merged read ranges use neutral guidance.
|
|
80
|
+
- **Graph:** relations are `references` (default), `callees`, and `implements`. Use `["all"]` for all three. Callee depth is `direct` by default; `deep` includes nested scopes, not transitive calls. Callees match source shape, not symbol identity. Counts include each distinct call site; repeated expressions share one agent-output row with all shown line/column coordinates. Each relation reports its counts and limits once. Relation status describes evidence collection, not display size: a fully collected relation remains `complete` when `maxResults` hides sites; `shownCount`, `totalCount`, and `omittedCount` disclose that cap. Actual evidence gaps remain `partial`, and unavailable capabilities remain `unavailable`. Capped references select one site per file per round in stable file/source order, then display the selected sites grouped by file; `maxResults` still counts individual references, not files. This distributes the available slots without ranking semantic importance or promising that every file is represented. Provider-limited results have unknown totals; invalid locations are disclosed separately. Callee previews shorten receiver argument lists from syntax without changing grouping by the full expression. Matching previews get local expression numbers so distinct source expressions remain clear. Unavailable references and implementations keep the provider reason. If no provider exists, the result names that gap. Unavailable callees keep the provider reason and a source-inspection next step. Ambiguous targets ask for candidate selection, not input correction. Candidate limits retain exact totals, or unknown totals when the provider returns partial data. Agent output and both transcript views disclose omissions. Only shown candidates receive target handles. The human transcript shows the resolved target and per-relation evidence types and status. The expanded view groups up to 20 sites per relation by file, without a duplicate Markdown body. If this display limit hides returned sites, the transcript links to a temporary file with all returned evidence. This file does not include evidence beyond `maxResults`, and its path does not add text to an otherwise complete agent result. Reference read-next suggestions use selected sites and prefer different files not already covered by the target recommendation. Merged read ranges use neutral guidance.
|
|
81
81
|
- **Find:** AST mode requires `kind`: `definition`, `import`, `export`, `call`, `type`, `interface`, `class`, `method`, or `enum`. Semantic mode does not accept `kind`. A supplied `scope` is a non-empty array.
|
|
82
82
|
- **Health:** `include` accepts `diagnostics` and `servers` (both by default); `level` is `summary` (default) or `detailed`. Server inventory and route counts remain workspace-wide, even with a diagnostic scope. A diagnostic snapshot does not prove that the whole workspace is clean. Tsconfig and jsconfig coverage applies only to TypeScript and JavaScript-family files; other-language files have no `Tsconfig` label.
|
|
83
83
|
|
|
84
|
-
`code_health({ refresh: true })` retries failed startup and exhausted process-crash routes in scope, with at most one attempt per route per call. It collects fresh diagnostic evidence and reports recovery separately from diagnostic confirmation. A broad maintenance attempt can include active tracked files outside a requested directory, but the diagnostic result keeps the requested directory and tracked-file boundary. The report labels maintenance evidence separately from result coverage. A later refresh can retry a failed route. Reports show up to 16 route entries per recovery list and disclose omitted entries. Use an exact file scope when a route reports `use-exact-file`.
|
|
84
|
+
`code_health({ refresh: true })` retries failed startup and exhausted process-crash routes in scope, with at most one attempt per route per call. It collects fresh diagnostic evidence and reports recovery separately from diagnostic confirmation. A broad maintenance attempt can include active tracked files outside a requested directory, but the diagnostic result keeps the requested directory and tracked-file boundary. The report labels maintenance evidence separately from result coverage. A later refresh can retry a failed route. Reports show up to 16 route entries per recovery list and disclose omitted entries. Use an exact file scope when a route reports `use-exact-file`. Exact-file refresh, like other explicit file queries, can route external or automatically excluded files; it does not include them in later automatic discovery. File health distinguishes a missing compatible server configuration from a configured route that cannot start; neither establishes diagnostic confirmation. A retained initial-start failure keeps its startup-failure explanation on subsequent non-refresh requests, without triggering another startup attempt.
|
|
85
85
|
|
|
86
86
|
### Structured codemode results
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
All eight tools declare native output schemas and return JSON-serializable `structuredContent`. Direct calls retain readable `content`; Pi's default codemode route resolves to native data instead of Markdown. `details` remains a separate UI/state contract, not the script API. Text, script data, and UI details project the same collected facts; no representation is recovered by parsing another.
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
| Tool | Native data |
|
|
91
|
+
|---|---|
|
|
92
|
+
| Resolve | `targets` with reusable `handle` values, candidate selection, and evidence counts |
|
|
93
|
+
| Inspect | `point`, independently completed/partial/unavailable `sections` with `data`, recovery, bounded definitions/diagnostics, provenance, and next queries |
|
|
94
|
+
| Orientation | `focusKind`, named section `facts`, selected `workspace` inventories/declarations/relationships and Gradle observations when applicable, instructions, limitations, and optional captured `snapshot` |
|
|
95
|
+
| Graph | Per-relation `sections` with bounded `items` and evidence |
|
|
96
|
+
| Find | Bounded `matches`; AST scan policy, exclusions, limitations, and failures |
|
|
97
|
+
| Health | Requested `includedSections` and `level`, actual `diagnostics` with scope and confirmation evidence, all collected `servers`, workspace inventory scope, capability state, warnings, and separate `refresh` outcomes |
|
|
98
|
+
| Refactor Plan | `planId`, operation, safe target facts, every exact edit in `edits`, file/edit counts, provenance, and `nextAction` |
|
|
99
|
+
| Refactor Apply | Explicit `kind: "applied"`, changed `files` with per-file counts, and total file/edit counts |
|
|
100
|
+
|
|
101
|
+
Check `kind` before consuming evidence. Invalid input and candidate selection remain corrective returned outcomes; real execution/capability failures and cancellation throw. Internal providers, target records, fingerprints, mutation authority, and session state are not exposed. Apply recovery consumes original document identities in `details.data.recoveryFiles`, independently of display paths and script data.
|
|
102
|
+
|
|
103
|
+
Limits belong to their representation. Inspect's `maxResults` caps each definition and diagnostic list, not syntax or hover text. Orientation native records retain the focus, ordering, `maxResults`, and collection limits even when text budgets hide descriptions or navigation rows. A captured snapshot describes the same observation; reading it does not refresh facts. Health returns all collected diagnostic-file/server entries, with at most three error/warning messages per file in detailed mode; neither a complete returned list nor successful maintenance proves workspace-wide diagnostic completeness. Plan returns every edit even when text previews only five. Text-preview omission counts do not describe these complete native lists. Evidence metadata preserves exact versus unknown totals and partial reasons.
|
|
104
|
+
|
|
105
|
+
Source and navigation locations use workspace-relative paths inside the canonical workspace and canonical absolute paths outside it, consistently in text, native records, and transcript details. Symlink aliases follow the same rule; missing files use normalized paths with any existing ancestors resolved. This display policy does not change target identity, search scope, or mutation authority. Orientation context-definition entries expose local `file` locations; non-file provider URIs remain `uri` observations with explicit unavailable filesystem navigation rather than fabricated paths. Original document identities used for post-Apply synchronization are retained separately from display paths. Technical ownership roots, focus-relative inventory records, project-relative declaration identities, declared values, user-input echoes, commands, and captured-result metadata keep their own semantics. Health renders ownership roots relative when lexically inside the workspace and absolute outside, without resolving symlinks or merging alias routes. Server inventory identities remain unchanged; current and retained recovery reports use the same readable labels, including in the status inspector.
|
|
106
|
+
|
|
107
|
+
Resolve and symbol-focused Orientation expose `targets[].resolution` only for the current anchored request. Reusing a target does not replay earlier request coordinates or snap notes; symbol queries, file discovery, and handle lookups omit that metadata. Handles remain stable while target evidence can improve across requests. Across providers, `snapped` is true exactly when the requested and resolved coordinates differ, including normalization from inside an identifier to its name anchor. Resolve and Orientation share the same resolution notes; a coordinate adjustment does not imply a declaration-header request.
|
|
108
|
+
|
|
109
|
+
Semantic exclusion examples distinguish the original `observedPath` rejected by policy from its navigable `canonicalPath`. A retained match and an excluded alias can refer to the same canonical source. Find exposes both fields in `automaticPathExclusion.examples`; candidate limitation messages use the same labeled explanation. Display canonicalization alone does not change exclusion counts, search completeness, or provider failure reasons. Scoped semantic searches count policy exclusions against completeness only when they may affect the requested scope; proven-disjoint excluded siblings do not force an otherwise unique target into disambiguation. When policy exclusions are the only gap (`exclusionOnly` metadata), a unique in-policy candidate resolves and the result notes the excluded paths; `code_graph` repeats those target notes, and semantic Find counts the in-policy matches exactly while keeping the exclusion disclosure. Route failures and coverage gaps still require explicit candidate selection.
|
|
110
|
+
|
|
111
|
+
Orientation groups equivalent syntax-recovery warnings by source, reason, and error ranges, listing all affected operations once. Native recovery facts retain every per-operation observation; distinct warnings remain separate.
|
|
112
|
+
|
|
113
|
+
Source points, target positions, Inspect source coordinates, and Orientation source-item coordinates use one-based lines and UTF-16 columns. Refactor edit ranges and Orientation provider ranges (hover, definitions, diagnostics), like syntax-recovery ranges, use zero-based lines and UTF-16 columns; range ends are exclusive. Health messages use one-based lines.
|
|
114
|
+
|
|
115
|
+
Registered-tool tests validate results against the registered output schemas and JSON round-tripping; Pi does not validate output schemas at runtime. Separate deterministic integration tests execute all five migrated tools through Pi's real default codemode route, including fixture mutation by Apply. These tests use controlled providers, not live language-server qualification.
|
|
91
116
|
|
|
92
117
|
Example codemode script that returns counts rather than every reference:
|
|
93
118
|
|
|
@@ -116,7 +141,7 @@ Automatic collection stays within the session working directory. Ancestor Git ro
|
|
|
116
141
|
- Captured directory diagrams retain separate dependency categories and declared values. Unique declared-name matches do not prove installed dependency resolution or runtime architecture.
|
|
117
142
|
- The inventory retains at most 10,000 entries. An explicit in-root directory is collected before unrelated paths use that budget. External directory focus uses its own observation. Metadata files have a 1 MiB read limit. The first-turn collector has a 10-second deadline; tool calls use their request control. Results disclose incomplete collection.
|
|
118
143
|
|
|
119
|
-
Estimated tokens are `ceil(characters / 4)`. The overview warns above 1,000 and has a 2,000-token hard cap. Workspace and directory navigation warn above 2,000 and have a 4,000-token hard cap. Warnings go to UI and debug only. `maxResults` can reduce a list, but cannot bypass the
|
|
144
|
+
Estimated tokens are `ceil(characters / 4)`. The overview warns above 1,000 and has a 2,000-token hard cap. Workspace and directory navigation warn above 2,000 and have a 4,000-token hard cap. Warnings go to UI and debug only. `maxResults` can reduce a list, but cannot bypass the text cap. Native records retain their caller-limited selection independently of that text budget.
|
|
120
145
|
|
|
121
146
|
The overview links captured details only when navigation rows or descriptions are omitted. Explicit workspace/directory Orientation also preserves raw inventory evidence. Captured-result files contain the complete collected observation, not just the selected rows. Reading them does not refresh facts or establish that every possible fact was collected. Instruction snippets have a separate budget and still respect Pi's final output safety limit. Unread instruction text is identified and is not recorded as supplied. File- and symbol-focused navigation retain their existing output.
|
|
122
147
|
|
|
@@ -143,6 +168,8 @@ Candidate selection for Graph, Resolve, and Orientation uses one structured tran
|
|
|
143
168
|
|
|
144
169
|
The planner accepts one target handle or anchor and one operation: `rename_symbol`, `extract_function`, `extract_variable`, `update_imports`, or `delete_dead_code`. Rename, import updates, and dead-code removal depend on the language server and validated edits. Function and variable extraction are currently unavailable for all languages: standard LSP code actions do not provide a safe exact extraction-name contract. Unsupported operations do not fall back to text edits.
|
|
145
170
|
|
|
171
|
+
`delete_dead_code` accepts precise `source.removeUnused` or `source.removeUnusedImports` actions (including dotted descendants), not title-based guesses or `source.fixAll`. Native TypeScript 7.0.2 is qualified for unused-import removal only; it does not imply removal of arbitrary unused declarations or TLS/native parity. An imports-only advertisement appears as limited SuPi support with the reason in `code_health`. Different matching edit plans remain ambiguous rather than selecting an action automatically.
|
|
172
|
+
|
|
146
173
|
Rename can discover affected files and repeat the request once after validated same-route enrollment, with a limit of 64 files. A null server document version for an open file is accepted only with a verified request snapshot of synchronized content. Plans retain its content fingerprint and client version; unknown or mismatched state remains unavailable.
|
|
147
174
|
|
|
148
175
|
Plans are held in memory for the current session. Apply accepts only the returned `planId`; it does not create or regenerate a plan. It checks SHA-256 file fingerprints, provider-authorized roots, document versions when available, edit ranges, and overlaps before writing. Changed files require a new plan. A successful apply removes the plan.
|
|
@@ -224,7 +251,15 @@ In interactive Pi, open the status overlay:
|
|
|
224
251
|
/supi-ci-status
|
|
225
252
|
```
|
|
226
253
|
|
|
227
|
-
|
|
254
|
+
The inspector shows semantic and structural readiness, error and warning counts, diagnostic confirmation evidence, server routes and roots, negotiated operation support, capability warnings, and active code tools. The **Diagnostic files** list includes tracked filenames even when clean; unconfirmed, failed, removed, skipped, and unavailable files are labeled separately. Exact requested, confirmed, unconfirmed, failed, and removed counts remain visible alongside messages. Expanded details use the selected file's own evidence, not workspace-wide confirmation. Unconfirmed evidence does not establish staleness. Diagnostic counts describe tracked files, not a workspace-wide check; ready servers do not establish file coverage. Zero requested files means **No tracked diagnostic evidence**, unless diagnostics are unavailable. A clean summary names the confirmed tracked-file count and requires positive coverage, every requested file confirmed, no unconfirmed/failed/removed files, and no errors or warnings.
|
|
255
|
+
|
|
256
|
+
Use Up/Down (or `j`/`k`) to scroll the entire inspector, Page Up/Page Down to scroll by page, and Home/End to jump to the beginning/end. Use Tab/Shift+Tab to select the next/previous diagnostic file and Enter or Space to expand it. Press `c` or F5 to **Check diagnostics**: discover automatically eligible source files and request diagnostics for up to 32 files under one 30-second deadline. The result reports the selected range, remaining files in the pass, and discovery or time limits. Check again to continue the next batch; after the final batch, another check starts a new pass. This is bounded file coverage, not a whole-project guarantee. Closing the inspector cancels its wait and prevents further file requests; already-dispatched shared LSP work can settle independently.
|
|
257
|
+
|
|
258
|
+
Press `h` (or F6) to **Refresh health**: run the existing workspace-scoped session health workflow with diagnostics and servers under the same 60-second caller deadline as `code_health`. This uses existing bounded source discovery/tracking and route recovery policy; it does not enroll the whole workspace or guarantee recovery. After the workflow returns, one passive snapshot owns the current diagnostic, file, and server view. A separate interaction-local outcome reports completion, failure or unavailability, elapsed time, relevant route outcomes, and source-discovery limits. Action completion is not diagnostic confirmation. A workflow or snapshot-collection exception retains the previous coherent view and identifies the failed stage.
|
|
259
|
+
|
|
260
|
+
Press `r` to reload the passive snapshot, `a` to collapse details, and Escape to close. Opening, rendering, expanding details, and reloading do not enroll files, start or retry routes, or request fresh diagnostics. Only one reload, check, or health action runs at a time; scrolling and details remain usable while the spinner runs. Closing aborts the caller's wait and prevents subsequent snapshot collection or late UI updates; shared LSP work may still settle independently. Scrolling, Tab, confirmation, and cancel actions honor Pi's configured keybindings. Configured actions take priority over `c`/F5 and `h`/F6; the inspector advertises an available shortcut for each action, or marks it unbound. The viewport adjusts to terminal size, with controls kept visible.
|
|
261
|
+
|
|
262
|
+
The inspector does not replace the footer or add editor widgets. The extension's separate LSP footer contribution remains active. Outside the interactive terminal, use `code_health`.
|
|
228
263
|
|
|
229
264
|
The package registers **Code Intelligence** and **LSP** settings. If `@mrclrchtr/supi-settings` is installed, use `/supi-settings` to edit them. A standalone Code Intelligence install does not include that settings UI.
|
|
230
265
|
|
|
@@ -77,7 +77,9 @@ export interface SemanticProvider {
|
|
|
77
77
|
): Promise<CodeQueryResult<DocumentCodeSymbol[]>>;
|
|
78
78
|
/**
|
|
79
79
|
* Collect workspace symbols from routes that can contribute within the
|
|
80
|
-
* optional
|
|
80
|
+
* optional path scopes. Completeness is relative to those scopes, but data
|
|
81
|
+
* may include out-of-scope rows; consumers must filter rows themselves.
|
|
82
|
+
* Policy exclusions proven outside every scope do not make the query partial.
|
|
81
83
|
*/
|
|
82
84
|
workspaceSymbols(
|
|
83
85
|
query: string,
|
|
@@ -3,8 +3,17 @@ export interface CodeQueryPartialMetadata {
|
|
|
3
3
|
/** Automatic path-policy evidence removed from a collected result. */
|
|
4
4
|
readonly automaticPathExclusion?: {
|
|
5
5
|
readonly excludedCount: number;
|
|
6
|
+
/** Observed policy paths, not canonical navigation paths; retain aliases when presenting exclusions. */
|
|
6
7
|
readonly examples: readonly string[];
|
|
7
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* True when automatic path-policy exclusions are the only reason the result
|
|
11
|
+
* is partial: every contributing provider branch completed and no coverage
|
|
12
|
+
* gap was observed. Excluded rows matched paths the workspace policy treats
|
|
13
|
+
* as out of automatic scope, so the retained rows are the complete in-policy
|
|
14
|
+
* answer.
|
|
15
|
+
*/
|
|
16
|
+
readonly exclusionOnly?: boolean;
|
|
8
17
|
}
|
|
9
18
|
|
|
10
19
|
/**
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Session-provided Web tools for SuPi child sessions (Agent Runs and Reviewer Sessions).
|
|
2
|
+
//
|
|
3
|
+
// The loaded supi-web extension answers a synchronous request on the parent event bus.
|
|
4
|
+
// Consumers never depend on supi-web; when it is absent or provides no tools, the
|
|
5
|
+
// request returns undefined and the child simply lacks Web tools.
|
|
6
|
+
|
|
7
|
+
import type { ExtensionAPI, ExtensionFactory } from "@earendil-works/pi-coding-agent";
|
|
8
|
+
|
|
9
|
+
/** Web tools that child sessions may receive when the containing session provides them. */
|
|
10
|
+
export const CHILD_WEB_TOOL_NAMES = [
|
|
11
|
+
"web_fetch_md",
|
|
12
|
+
"web_search",
|
|
13
|
+
"web_docs_search",
|
|
14
|
+
"web_docs_fetch",
|
|
15
|
+
] as const;
|
|
16
|
+
|
|
17
|
+
/** One session-provided Web tool name. */
|
|
18
|
+
export type ChildWebToolName = (typeof CHILD_WEB_TOOL_NAMES)[number];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Web tools currently callable in the containing session plus a child-only extension
|
|
22
|
+
* factory that registers them. The factory must not capture the parent session; it may
|
|
23
|
+
* capture plain data such as the containing session's configuration directory.
|
|
24
|
+
*/
|
|
25
|
+
export interface ChildWebToolProvision {
|
|
26
|
+
readonly toolNames: readonly ChildWebToolName[];
|
|
27
|
+
/** Register the requested subset of `toolNames` in a child session. */
|
|
28
|
+
readonly createFactory: (toolNames: readonly ChildWebToolName[]) => ExtensionFactory;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Plain containing-session data supplied with a child Web tool request. */
|
|
32
|
+
export interface ChildWebToolsRequestContext {
|
|
33
|
+
/**
|
|
34
|
+
* Working directory whose SuPi configuration governs Web settings such as Firecrawl.
|
|
35
|
+
* Children with a different cwd (for example a frozen Review Workspace) keep this policy.
|
|
36
|
+
*/
|
|
37
|
+
readonly configCwd: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type EventBusLike = Pick<ExtensionAPI["events"], "on" | "emit">;
|
|
41
|
+
|
|
42
|
+
const REQUEST_CHANNEL = "supi:child-web-tools:request";
|
|
43
|
+
const RESPONSE_CHANNEL = "supi:child-web-tools:response";
|
|
44
|
+
|
|
45
|
+
interface ChildWebToolsRequest extends ChildWebToolsRequestContext {
|
|
46
|
+
readonly requestId: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface ChildWebToolsResponse {
|
|
50
|
+
readonly requestId: string;
|
|
51
|
+
readonly provision: ChildWebToolProvision;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let nextRequestId = 0;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Answer child Web tool requests on the parent event bus. The callback must be synchronous
|
|
58
|
+
* because Pi's event bus does not await listeners. Returns an unsubscribe function.
|
|
59
|
+
*/
|
|
60
|
+
export function provideChildWebTools(
|
|
61
|
+
events: EventBusLike,
|
|
62
|
+
resolve: (context: ChildWebToolsRequestContext) => ChildWebToolProvision | undefined,
|
|
63
|
+
): () => void {
|
|
64
|
+
return events.on(REQUEST_CHANNEL, (data) => {
|
|
65
|
+
const request = data as Partial<ChildWebToolsRequest> | undefined;
|
|
66
|
+
if (typeof request?.requestId !== "string" || typeof request.configCwd !== "string") return;
|
|
67
|
+
const { requestId, configCwd } = request;
|
|
68
|
+
const provision = resolve({ configCwd });
|
|
69
|
+
if (!provision || provision.toolNames.length === 0) return;
|
|
70
|
+
events.emit(RESPONSE_CHANNEL, { requestId, provision } satisfies ChildWebToolsResponse);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Capture the Web tools the containing session currently provides, if any. */
|
|
75
|
+
export function requestChildWebTools(
|
|
76
|
+
events: EventBusLike,
|
|
77
|
+
context: ChildWebToolsRequestContext,
|
|
78
|
+
): ChildWebToolProvision | undefined {
|
|
79
|
+
const requestId = `child-web-${process.pid}-${++nextRequestId}`;
|
|
80
|
+
let provision: ChildWebToolProvision | undefined;
|
|
81
|
+
const unsubscribe = events.on(RESPONSE_CHANNEL, (data) => {
|
|
82
|
+
const response = data as Partial<ChildWebToolsResponse> | undefined;
|
|
83
|
+
if (response?.requestId === requestId && response.provision) provision = response.provision;
|
|
84
|
+
});
|
|
85
|
+
try {
|
|
86
|
+
events.emit(REQUEST_CHANNEL, { requestId, ...context } satisfies ChildWebToolsRequest);
|
|
87
|
+
} finally {
|
|
88
|
+
unsubscribe();
|
|
89
|
+
}
|
|
90
|
+
return provision;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Return the Web tools callable in a session under Pi's exposure rules: active `direct`
|
|
95
|
+
* tools, plus registered `codemode` and `deferred` tools. `model-only` and `hidden`
|
|
96
|
+
* tools are not callable.
|
|
97
|
+
*/
|
|
98
|
+
export function callableChildWebToolNames(
|
|
99
|
+
pi: Pick<ExtensionAPI, "getAllTools" | "getActiveTools">,
|
|
100
|
+
): ChildWebToolName[] {
|
|
101
|
+
const active = new Set(pi.getActiveTools());
|
|
102
|
+
const exposures = new Map(
|
|
103
|
+
pi.getAllTools().map((tool) => [tool.name, tool.exposure ?? "direct"] as const),
|
|
104
|
+
);
|
|
105
|
+
return CHILD_WEB_TOOL_NAMES.filter((name) => {
|
|
106
|
+
const exposure = exposures.get(name);
|
|
107
|
+
if (exposure === "direct") return active.has(name);
|
|
108
|
+
return exposure === "codemode" || exposure === "deferred";
|
|
109
|
+
});
|
|
110
|
+
}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
// supi-core session domain — session utilities and registries.
|
|
2
2
|
|
|
3
|
+
export type {
|
|
4
|
+
ChildWebToolName,
|
|
5
|
+
ChildWebToolProvision,
|
|
6
|
+
ChildWebToolsRequestContext,
|
|
7
|
+
} from "./child-web-tools.ts";
|
|
8
|
+
export {
|
|
9
|
+
CHILD_WEB_TOOL_NAMES,
|
|
10
|
+
callableChildWebToolNames,
|
|
11
|
+
provideChildWebTools,
|
|
12
|
+
requestChildWebTools,
|
|
13
|
+
} from "./child-web-tools.ts";
|
|
3
14
|
export { createRegistry, createSessionStateRegistry } from "./registry-utils.ts";
|
|
4
15
|
export type {
|
|
5
16
|
SessionCapabilitySkill,
|