@mrclrchtr/supi-review 11.0.1 → 11.2.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/README.md +40 -4
- package/node_modules/@mrclrchtr/supi-agent-runtime/README.md +45 -1
- 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/debug-registry.ts +41 -1
- package/node_modules/@mrclrchtr/supi-agent-runtime/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/api.ts +9 -4
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/auxiliary-models.ts +86 -0
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/debug-retrospective.ts +64 -0
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/provider-authority.ts +176 -60
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/run.ts +139 -15
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/session/agent-run-registry.ts +7 -2
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/types.ts +27 -2
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/ui/agents-run-viewer-render.ts +2 -1
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/ui/agents-run-viewer.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/README.md +68 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/README.md +48 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/build.sh +73 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/lib/gradle-tooling-api-9.4.0.jar +0 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/lib/slf4j-api-2.0.17.jar +0 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/lib/slf4j-simple-2.0.17.jar +0 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/lib/supi-gradle-observation.jar +0 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/licenses/DEPENDENCIES.md +11 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/licenses/LICENSE-gradle-tooling-api.txt +422 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/licenses/LICENSE-slf4j.txt +21 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/licenses/NOTICE-gradle.txt +21 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/gradle-helper/src/GradleObservation.java +597 -0
- 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-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +41 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/README.md +43 -6
- 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-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +41 -1
- 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/node_modules/vscode-jsonrpc/README.md +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/browser/ril.js +8 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/connection.js +7 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/ral.d.ts +8 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/node/main.d.ts +14 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/node/main.js +6 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/node/ril.js +5 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/package.json +4 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/package.json +4 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/lib/esm/main.js +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/lib/umd/main.js +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/package.json +2 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/package.json +8 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +44 -5
- 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/manager/manager-project-info.ts +22 -10
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +53 -20
- 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/scanner.ts +27 -15
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/README.md +1 -0
- 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-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +41 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/package.json +5 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/LICENSE +21 -0
- 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 +19 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/LICENSE +21 -0
- 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 +19 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/ignore/README.md +36 -10
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/ignore/index.d.ts +3 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/ignore/index.js +57 -53
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/ignore/legacy.js +50 -46
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/ignore/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/package.json +11 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/capability/capability-warnings.ts +18 -12
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/gradle/query.ts +273 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/gradle/runtime.ts +173 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/gradle/types.ts +65 -0
- 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 +8 -0
- 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/read-next.ts +1 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/refactor/apply.ts +19 -10
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/refactor/mutation-authority.ts +4 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/search/ast-scan.ts +143 -18
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/workspace/safe-path.ts +14 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/workspace/types.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/extension.ts +10 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/gradle/consent.ts +279 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/headless.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/overview/collect.ts +11 -3
- 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/orientation/collect.ts +138 -12
- 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 +47 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/facts.ts +124 -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 +59 -28
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation-types.ts +16 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation-workflow.ts +5 -2
- 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 +4 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/session.ts +8 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/execute.ts +1 -1
- 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/markdown.ts +24 -17
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/result.ts +18 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/spec.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/structured.ts +161 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/result.ts +32 -15
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/spec.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/structured.ts +142 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/markdown.ts +17 -17
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/result.ts +15 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/spec.ts +2 -0
- 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/markdown.ts +19 -11
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/result.ts +12 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/spec.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/structured.ts +232 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/directory-navigation.ts +66 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/gradle-sections.ts +68 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/markdown.ts +19 -8
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/result.ts +95 -11
- 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 +607 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/structured-workspace.ts +193 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/structured.ts +195 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-format.ts +2 -1
- 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 +45 -13
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-projects.ts +180 -75
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-sections.ts +46 -31
- 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 +13 -5
- 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 +16 -8
- 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 +128 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/markdown.ts +4 -10
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/result.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/spec.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/structured.ts +103 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/infra/truncate.ts +12 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/register.ts +10 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/display.ts +17 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/model-budget.ts +195 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/structured.ts +62 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/types.ts +10 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/schemas.ts +7 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/specs.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/types/execution.ts +5 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-command.ts +110 -321
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-overlay.ts +564 -420
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/tui/display.ts +10 -4
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +41 -1
- package/package.json +4 -4
- package/src/config.ts +14 -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 +12 -3
- package/src/tool/review_run/child-session.ts +18 -1
- package/src/tool/review_run/child-tools.ts +2 -0
- package/src/tool/review_run/execute.ts +1 -0
- package/src/tool/review_run/execution.ts +8 -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 +9 -3
- package/src/tool/review_run/runner.ts +97 -35
- package/src/tool/review_run/schemas.ts +4 -2
- package/src/tool/review_run/system-prompt.ts +18 -3
- package/src/tool/review_run/workflow.ts +26 -0
- package/src/tui/review-command.ts +2 -0
- package/src/types.ts +7 -0
|
@@ -20,18 +20,24 @@ export function renderToolDisplaySections(
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function formatDisplayBounds(section: ToolDisplaySection): string {
|
|
23
|
+
const summary = section.preview?.evidenceSummary;
|
|
24
|
+
const prefix = summary ? `${summary}; ` : "";
|
|
25
|
+
const unit = section.preview?.unit;
|
|
26
|
+
const label = (count: number) => (unit ? ` preview ${unit}${count === 1 ? "" : "s"}` : "");
|
|
23
27
|
if (section.totalCount === null) {
|
|
24
|
-
const omitted = section.omittedCount
|
|
28
|
+
const omitted = section.omittedCount
|
|
29
|
+
? `; ${section.omittedCount}${label(section.omittedCount)} collected omitted`
|
|
30
|
+
: "";
|
|
25
31
|
const reason = section.partialReason
|
|
26
32
|
? `; more may exist — ${section.partialReason}`
|
|
27
33
|
: "; partial";
|
|
28
34
|
const message = section.partialMessage ? `; ${section.partialMessage}` : "";
|
|
29
|
-
return ` (${section.shownCount}${omitted}${reason}${message})`;
|
|
35
|
+
return ` (${prefix}${section.shownCount}${label(section.shownCount)}${omitted}${reason}${message})`;
|
|
30
36
|
}
|
|
31
37
|
if (section.omittedCount && section.omittedCount > 0) {
|
|
32
|
-
return ` (${section.shownCount} of ${section.totalCount}; ${section.omittedCount} omitted)`;
|
|
38
|
+
return ` (${prefix}${section.shownCount} of ${section.totalCount}${label(section.totalCount)}; ${section.omittedCount}${label(section.omittedCount)} omitted)`;
|
|
33
39
|
}
|
|
34
|
-
return ` (${section.totalCount})`;
|
|
40
|
+
return ` (${prefix}${section.totalCount}${label(section.totalCount)})`;
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
/** Format one call argument for a compact human transcript row. */
|
|
@@ -14,6 +14,8 @@ export interface DebugRegistryConfig {
|
|
|
14
14
|
enabled: boolean;
|
|
15
15
|
/** What the agent-callable debug tool may return. */
|
|
16
16
|
agentAccess: DebugAgentAccess;
|
|
17
|
+
/** Whether Agent Run retrospective capture is explicitly enabled. */
|
|
18
|
+
agentRunRetrospectivesEnabled: boolean;
|
|
17
19
|
/** Maximum number of session-local events to keep in memory. */
|
|
18
20
|
maxEvents: number;
|
|
19
21
|
}
|
|
@@ -21,6 +23,7 @@ export interface DebugRegistryConfig {
|
|
|
21
23
|
export const DEBUG_REGISTRY_DEFAULTS: DebugRegistryConfig = {
|
|
22
24
|
enabled: false,
|
|
23
25
|
agentAccess: "sanitized",
|
|
26
|
+
agentRunRetrospectivesEnabled: false,
|
|
24
27
|
maxEvents: 100,
|
|
25
28
|
};
|
|
26
29
|
|
|
@@ -75,6 +78,9 @@ export interface DebugEventQueryResult {
|
|
|
75
78
|
/** Receives a sanitized event whenever the registry records one. */
|
|
76
79
|
export type DebugEventListener = (event: DebugEventView) => void;
|
|
77
80
|
|
|
81
|
+
/** Receives sanitized events for persistence; separate from ordinary event subscriptions. */
|
|
82
|
+
export type DebugPersistenceSink = (event: DebugEventView) => void;
|
|
83
|
+
|
|
78
84
|
export interface DebugSummary {
|
|
79
85
|
total: number;
|
|
80
86
|
byLevel: Partial<Record<DebugLevel, number>>;
|
|
@@ -85,6 +91,7 @@ interface DebugRegistryState {
|
|
|
85
91
|
config: DebugRegistryConfig;
|
|
86
92
|
events: DebugEvent[];
|
|
87
93
|
listeners: Set<DebugEventListener>;
|
|
94
|
+
persistenceSinks: Set<DebugPersistenceSink>;
|
|
88
95
|
nextId: number;
|
|
89
96
|
}
|
|
90
97
|
|
|
@@ -111,13 +118,15 @@ function getState(): DebugRegistryState {
|
|
|
111
118
|
config: cloneConfig(DEBUG_REGISTRY_DEFAULTS),
|
|
112
119
|
events: [],
|
|
113
120
|
listeners: new Set(),
|
|
121
|
+
persistenceSinks: new Set(),
|
|
114
122
|
nextId: 1,
|
|
115
123
|
};
|
|
116
124
|
(globalThis as Record<symbol, unknown>)[REGISTRY_KEY] = state;
|
|
117
125
|
}
|
|
118
126
|
// Keep the shared registry compatible with extension reloads that reuse an
|
|
119
|
-
// instance created before
|
|
127
|
+
// instance created before listener sets existed.
|
|
120
128
|
if (!state.listeners) state.listeners = new Set();
|
|
129
|
+
if (!state.persistenceSinks) state.persistenceSinks = new Set();
|
|
121
130
|
return state;
|
|
122
131
|
}
|
|
123
132
|
|
|
@@ -200,6 +209,19 @@ export function isDebugRegistryEnabled(): boolean {
|
|
|
200
209
|
return getState().config.enabled;
|
|
201
210
|
}
|
|
202
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Return whether a retrospective can be captured: Debug and its explicit opt-in
|
|
214
|
+
* must be enabled, and at least one persistence sink must be registered.
|
|
215
|
+
*/
|
|
216
|
+
export function canRecordAgentRunRetrospective(): boolean {
|
|
217
|
+
const state = getState();
|
|
218
|
+
return (
|
|
219
|
+
state.config.enabled &&
|
|
220
|
+
state.config.agentRunRetrospectivesEnabled &&
|
|
221
|
+
state.persistenceSinks.size > 0
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
203
225
|
/** Best-effort redaction helper for data exposed through sanitized debug views. */
|
|
204
226
|
export function redactDebugData<T>(value: T): T {
|
|
205
227
|
return redactValue(value, 8) as T;
|
|
@@ -226,6 +248,16 @@ export function subscribeDebugEvents(listener: DebugEventListener): () => void {
|
|
|
226
248
|
return () => state.listeners.delete(listener);
|
|
227
249
|
}
|
|
228
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Register a sanitized event persistence sink. Sinks are tracked separately from
|
|
253
|
+
* ordinary listeners so eligibility checks only succeed when logging is active.
|
|
254
|
+
*/
|
|
255
|
+
export function subscribeDebugPersistence(sink: DebugPersistenceSink): () => void {
|
|
256
|
+
const state = getState();
|
|
257
|
+
state.persistenceSinks.add(sink);
|
|
258
|
+
return () => state.persistenceSinks.delete(sink);
|
|
259
|
+
}
|
|
260
|
+
|
|
229
261
|
/** Record a session-local debug event if debugging is enabled. */
|
|
230
262
|
export function recordDebugEvent(input: DebugEventInput): DebugEvent | null {
|
|
231
263
|
const state = getState();
|
|
@@ -251,6 +283,13 @@ export function recordDebugEvent(input: DebugEventInput): DebugEvent | null {
|
|
|
251
283
|
// Debug-event consumers must not alter producer behavior.
|
|
252
284
|
}
|
|
253
285
|
}
|
|
286
|
+
for (const sink of state.persistenceSinks) {
|
|
287
|
+
try {
|
|
288
|
+
sink(toSanitizedView(event));
|
|
289
|
+
} catch {
|
|
290
|
+
// Persistence failures must not alter producer behavior.
|
|
291
|
+
}
|
|
292
|
+
}
|
|
254
293
|
return {
|
|
255
294
|
...event,
|
|
256
295
|
data: event.data === undefined ? undefined : redactDebugData(event.data),
|
|
@@ -309,5 +348,6 @@ export function resetDebugRegistry(): void {
|
|
|
309
348
|
state.config = cloneConfig(DEBUG_REGISTRY_DEFAULTS);
|
|
310
349
|
state.events = [];
|
|
311
350
|
state.listeners.clear();
|
|
351
|
+
state.persistenceSinks.clear();
|
|
312
352
|
state.nextId = 1;
|
|
313
353
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-review",
|
|
3
|
-
"version": "11.0
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "Parallel inspection-only reviews of exact Git targets",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@mrclrchtr/supi-agent-runtime": "11.0
|
|
35
|
-
"@mrclrchtr/supi-
|
|
36
|
-
"@mrclrchtr/supi-
|
|
34
|
+
"@mrclrchtr/supi-agent-runtime": "11.2.0",
|
|
35
|
+
"@mrclrchtr/supi-core": "11.2.0",
|
|
36
|
+
"@mrclrchtr/supi-code-intelligence": "11.2.0"
|
|
37
37
|
},
|
|
38
38
|
"bundledDependencies": [
|
|
39
39
|
"@mrclrchtr/supi-agent-runtime",
|
package/src/config.ts
CHANGED
|
@@ -20,6 +20,8 @@ export type PostReviewPolicy = (typeof POST_REVIEW_POLICIES)[number];
|
|
|
20
20
|
export interface ReviewConfig extends Record<string, unknown> {
|
|
21
21
|
/** Enable tools that start reviews and retrieve audits. */
|
|
22
22
|
agentToolEnabled: boolean;
|
|
23
|
+
/** Enable PI codemode scripting and scoped auxiliary models for Reviewer investigation. */
|
|
24
|
+
reviewerCodemodeEnabled: boolean;
|
|
23
25
|
/** Canonical reviewer model id, or `current` for the active session model. */
|
|
24
26
|
agentModel: string;
|
|
25
27
|
/** Canonical Planner model id, or `current` for the active session model. */
|
|
@@ -43,6 +45,7 @@ export const REVIEW_CONFIG_SECTION = "review";
|
|
|
43
45
|
/** Availability-safe defaults; users can configure a separate lightweight Planner model. */
|
|
44
46
|
export const REVIEW_DEFAULTS: ReviewConfig = {
|
|
45
47
|
agentToolEnabled: true,
|
|
48
|
+
reviewerCodemodeEnabled: false,
|
|
46
49
|
agentModel: CURRENT_SESSION_REVIEW_MODEL,
|
|
47
50
|
plannerModel: CURRENT_SESSION_REVIEW_MODEL,
|
|
48
51
|
reviewerThinkingLevel: REVIEWER_DEFAULT_THINKING_LEVEL,
|
|
@@ -70,6 +73,10 @@ export function loadReviewConfig(cwd: string, homeDir?: string): ReviewConfig {
|
|
|
70
73
|
POST_REVIEW_POLICIES.find((policy) => policy === value) ?? REVIEW_DEFAULTS.postReviewPolicy;
|
|
71
74
|
return {
|
|
72
75
|
agentToolEnabled: readBoolean(raw.agentToolEnabled, REVIEW_DEFAULTS.agentToolEnabled),
|
|
76
|
+
reviewerCodemodeEnabled: readBoolean(
|
|
77
|
+
raw.reviewerCodemodeEnabled,
|
|
78
|
+
REVIEW_DEFAULTS.reviewerCodemodeEnabled,
|
|
79
|
+
),
|
|
73
80
|
agentModel: readModel(raw.agentModel, REVIEW_DEFAULTS.agentModel),
|
|
74
81
|
plannerModel: readModel(raw.plannerModel, REVIEW_DEFAULTS.plannerModel),
|
|
75
82
|
reviewerThinkingLevel: readThinkingLevel(
|
|
@@ -124,6 +131,13 @@ export function registerReviewSettings(pi: ExtensionAPI, homeDir?: string): void
|
|
|
124
131
|
label: "Agent tools",
|
|
125
132
|
description: "Enable review start and audit tools for agents.",
|
|
126
133
|
},
|
|
134
|
+
{
|
|
135
|
+
kind: "boolean",
|
|
136
|
+
key: "reviewerCodemodeEnabled",
|
|
137
|
+
label: "Reviewer codemode",
|
|
138
|
+
description:
|
|
139
|
+
"Enable codemode scripting and auxiliary-model requests during Reviewer investigation; may transmit repository evidence and incur provider costs.",
|
|
140
|
+
},
|
|
127
141
|
{
|
|
128
142
|
kind: "modelPicker",
|
|
129
143
|
key: "agentModel",
|
|
@@ -65,9 +65,14 @@ export class ReviewArtifactStore {
|
|
|
65
65
|
|
|
66
66
|
/** Read one page without consuming the artifact so callers may retry pages. */
|
|
67
67
|
read(id: string, offset?: number, limit?: number, maxLines?: number): TextPage | undefined {
|
|
68
|
+
const text = this.readReport(id);
|
|
69
|
+
return text === undefined ? undefined : pageText(text, offset, limit, maxLines);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Read complete stored report text under the same expiry and eviction policy as pages. */
|
|
73
|
+
readReport(id: string): string | undefined {
|
|
68
74
|
this.#pruneExpired();
|
|
69
|
-
|
|
70
|
-
return entry ? pageText(entry.text, offset, limit, maxLines) : undefined;
|
|
75
|
+
return this.#entries.get(id)?.text;
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
clear(): void {
|
|
@@ -19,6 +19,30 @@ export function formatReviewChange(change: ReviewChange): string {
|
|
|
19
19
|
return `${change.status} ${formatLineStats(change)} ${path}`;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/** Summarize the complete captured inventory, without inferring behavioral preservation. */
|
|
23
|
+
export function buildChangeSummary(changes: readonly ReviewChange[]): string {
|
|
24
|
+
const groups = [
|
|
25
|
+
["M", "modified", "modified"],
|
|
26
|
+
["A", "added", "added"],
|
|
27
|
+
["D", "deleted", "deleted"],
|
|
28
|
+
["R", "detected rename", "detected renames"],
|
|
29
|
+
["C", "detected copy", "detected copies"],
|
|
30
|
+
["T", "type change", "type changes"],
|
|
31
|
+
["other", "other", "other"],
|
|
32
|
+
] as const;
|
|
33
|
+
const counts = new Map<string, number>();
|
|
34
|
+
for (const change of changes) {
|
|
35
|
+
const status = change.status.charAt(0);
|
|
36
|
+
const group = groups.some(([code]) => code === status) ? status : "other";
|
|
37
|
+
counts.set(group, (counts.get(group) ?? 0) + 1);
|
|
38
|
+
}
|
|
39
|
+
const summary = groups.flatMap(([code, singular, plural]) => {
|
|
40
|
+
const count = counts.get(code) ?? 0;
|
|
41
|
+
return count ? [`${count} ${count === 1 ? singular : plural}`] : [];
|
|
42
|
+
});
|
|
43
|
+
return `Change summary: ${summary.join(", ") || "no changes"}.`;
|
|
44
|
+
}
|
|
45
|
+
|
|
22
46
|
/** Render a deterministic bounded change manifest with an explicit omission count. */
|
|
23
47
|
export function buildFileManifest(
|
|
24
48
|
changes: ReviewChange[],
|
package/src/target/packet.ts
CHANGED
|
@@ -8,10 +8,10 @@ import type {
|
|
|
8
8
|
ReviewSnapshot,
|
|
9
9
|
ReviewTask,
|
|
10
10
|
} from "../types.ts";
|
|
11
|
-
import { buildFileManifest } from "./file-manifest.ts";
|
|
11
|
+
import { buildChangeSummary, buildFileManifest } from "./file-manifest.ts";
|
|
12
12
|
|
|
13
13
|
/** Protocol version included in every canonical reviewer packet for future evolution. */
|
|
14
|
-
export const REVIEW_PACKET_PROTOCOL_VERSION = "
|
|
14
|
+
export const REVIEW_PACKET_PROTOCOL_VERSION = "8";
|
|
15
15
|
|
|
16
16
|
function sha256(value: string): string {
|
|
17
17
|
return createHash("sha256").update(value, "utf8").digest("hex");
|
|
@@ -101,6 +101,7 @@ export function buildReviewPacket(
|
|
|
101
101
|
parts.push(
|
|
102
102
|
`Target diff SHA-256: ${snapshot.diffHash}`,
|
|
103
103
|
`Changed files: ${snapshot.changes.length}`,
|
|
104
|
+
buildChangeSummary(snapshot.changes),
|
|
104
105
|
`Diff stats: +${snapshot.stats.additions} / -${snapshot.stats.deletions}`,
|
|
105
106
|
);
|
|
106
107
|
}
|
package/src/tool/output-page.ts
CHANGED
|
@@ -17,6 +17,8 @@ const CONTINUATION_FOOTER_RESERVE = MIN_PAGE_CHARACTERS;
|
|
|
17
17
|
|
|
18
18
|
/** One page of paged tool or rendering output with an optional continuation offset. */
|
|
19
19
|
export interface TextPage {
|
|
20
|
+
/** Clean source slice, without synthetic notices or the empty-page presentation marker. */
|
|
21
|
+
body: string;
|
|
20
22
|
text: string;
|
|
21
23
|
offset: number;
|
|
22
24
|
nextOffset?: number;
|
|
@@ -45,8 +47,7 @@ export function modelFacingPage(
|
|
|
45
47
|
page: TextPage,
|
|
46
48
|
): string {
|
|
47
49
|
if (page.nextOffset === undefined) return page.text;
|
|
48
|
-
const
|
|
49
|
-
const body = page.text.slice(0, page.text.lastIndexOf(marker));
|
|
50
|
+
const body = page.body;
|
|
50
51
|
const call = JSON.stringify({ ...nextInput, offset: page.nextOffset });
|
|
51
52
|
return [
|
|
52
53
|
body,
|
|
@@ -77,13 +78,14 @@ export function pageText(
|
|
|
77
78
|
: proposedEnd;
|
|
78
79
|
let end = lineBoundedEnd(text, offset, characterEnd, maxLines);
|
|
79
80
|
if (end < text.length && end > offset && /[\uD800-\uDBFF]/.test(text[end - 1] ?? "")) end--;
|
|
80
|
-
const body = text.slice(offset, end)
|
|
81
|
+
const body = text.slice(offset, end);
|
|
81
82
|
const nextOffset = end < text.length ? end : undefined;
|
|
82
83
|
const notice = nextOffset
|
|
83
84
|
? `\n\n[output paged; next offset: ${nextOffset}; total characters: ${text.length}]`
|
|
84
85
|
: "";
|
|
85
86
|
return {
|
|
86
|
-
|
|
87
|
+
body,
|
|
88
|
+
text: `${body || "[no content]"}${notice}`,
|
|
87
89
|
offset,
|
|
88
90
|
...(nextOffset !== undefined ? { nextOffset } : {}),
|
|
89
91
|
totalCharacters: text.length,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
formatReplayOutline,
|
|
3
|
+
projectReplayOutline,
|
|
4
|
+
type ReplayOutlineRow,
|
|
5
|
+
} from "../../audit/replay-outline.ts";
|
|
2
6
|
import { modelFacingPage, pageText, type TextPage } from "../output-page.ts";
|
|
3
7
|
import { REVIEW_AUDIT_TOOL_NAME } from "./spec.ts";
|
|
8
|
+
import type { ReviewAuditOutput } from "./structured.ts";
|
|
4
9
|
|
|
5
10
|
export interface AuditPageDetails {
|
|
6
11
|
offset: number;
|
|
@@ -25,20 +30,15 @@ function formatAuditList(audits: Array<{ artifactId: string; expiresAt: string }
|
|
|
25
30
|
].join("\n");
|
|
26
31
|
}
|
|
27
32
|
|
|
28
|
-
function
|
|
29
|
-
if (text === "[no messages]") return [];
|
|
30
|
-
const starts: Array<{ index: number; start: number; end: number }> = [];
|
|
33
|
+
function completeOutlineRows(rows: readonly ReplayOutlineRow[], page: TextPage) {
|
|
31
34
|
let start = 0;
|
|
32
|
-
for (const line of text.split("\n")) {
|
|
33
|
-
const match = /^\[(\d+)\]/.exec(line);
|
|
34
|
-
const end = start + line.length;
|
|
35
|
-
if (match) starts.push({ index: Number(match[1]), start, end });
|
|
36
|
-
start = end + 1;
|
|
37
|
-
}
|
|
38
35
|
const pageEnd = page.nextOffset ?? page.totalCharacters;
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
.
|
|
36
|
+
return rows.filter((row) => {
|
|
37
|
+
const end = start + formatReplayOutline([row]).length;
|
|
38
|
+
const visible = start >= page.offset && end <= pageEnd;
|
|
39
|
+
start = end + 1;
|
|
40
|
+
return visible;
|
|
41
|
+
});
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/** Assemble the model-facing result listing non-expired local reviewer replays. */
|
|
@@ -50,9 +50,16 @@ export function buildAuditListResult(
|
|
|
50
50
|
const page = pageText(formatAuditList(audits), params.offset, params.limit);
|
|
51
51
|
const visibleAudits = audits.filter((audit) => {
|
|
52
52
|
signal?.throwIfAborted();
|
|
53
|
-
return page.
|
|
53
|
+
return page.body.includes(audit.artifactId);
|
|
54
54
|
});
|
|
55
55
|
return {
|
|
56
|
+
structuredContent: {
|
|
57
|
+
mode: "list",
|
|
58
|
+
audits: visibleAudits.map(({ artifactId, expiresAt }) => ({ artifactId, expiresAt })),
|
|
59
|
+
totalAudits: audits.length,
|
|
60
|
+
text: page.body,
|
|
61
|
+
...pageDetails(page),
|
|
62
|
+
} satisfies ReviewAuditOutput,
|
|
56
63
|
content: [{ type: "text" as const, text: modelFacingPage(REVIEW_AUDIT_TOOL_NAME, {}, page) }],
|
|
57
64
|
details: {
|
|
58
65
|
kind: "review-audit" as const,
|
|
@@ -72,6 +79,12 @@ export function buildAuditRawResult(
|
|
|
72
79
|
) {
|
|
73
80
|
const page = pageText(raw, params.offset, params.limit);
|
|
74
81
|
return {
|
|
82
|
+
structuredContent: {
|
|
83
|
+
mode: "raw",
|
|
84
|
+
artifactId,
|
|
85
|
+
text: page.body,
|
|
86
|
+
...pageDetails(page),
|
|
87
|
+
} satisfies ReviewAuditOutput,
|
|
75
88
|
content: [
|
|
76
89
|
{
|
|
77
90
|
type: "text" as const,
|
|
@@ -96,6 +109,13 @@ export function buildAuditMessageResult(
|
|
|
96
109
|
) {
|
|
97
110
|
const page = pageText(text, params.offset, params.limit);
|
|
98
111
|
return {
|
|
112
|
+
structuredContent: {
|
|
113
|
+
mode: "message",
|
|
114
|
+
artifactId,
|
|
115
|
+
messageIndex,
|
|
116
|
+
text: page.body,
|
|
117
|
+
...pageDetails(page),
|
|
118
|
+
} satisfies ReviewAuditOutput,
|
|
99
119
|
content: [
|
|
100
120
|
{
|
|
101
121
|
type: "text" as const,
|
|
@@ -125,7 +145,22 @@ export function buildAuditOutlineResult(
|
|
|
125
145
|
const rows = projectReplayOutline(messages);
|
|
126
146
|
const text = formatReplayOutline(rows);
|
|
127
147
|
const page = pageText(text, params.offset, params.limit);
|
|
148
|
+
const visibleRows = completeOutlineRows(rows, page);
|
|
149
|
+
const messageIndexes = visibleRows.map((row) => row.index);
|
|
128
150
|
return {
|
|
151
|
+
structuredContent: {
|
|
152
|
+
mode: "outline",
|
|
153
|
+
artifactId,
|
|
154
|
+
rows: visibleRows.map((row) => ({
|
|
155
|
+
...row,
|
|
156
|
+
contentKinds: [...row.contentKinds],
|
|
157
|
+
toolNames: [...row.toolNames],
|
|
158
|
+
})),
|
|
159
|
+
messageIndexes,
|
|
160
|
+
totalMessages: rows.length,
|
|
161
|
+
text: page.body,
|
|
162
|
+
...pageDetails(page),
|
|
163
|
+
} satisfies ReviewAuditOutput,
|
|
129
164
|
content: [
|
|
130
165
|
{
|
|
131
166
|
type: "text" as const,
|
|
@@ -137,7 +172,7 @@ export function buildAuditOutlineResult(
|
|
|
137
172
|
mode: "outline" as const,
|
|
138
173
|
artifactId,
|
|
139
174
|
totalMessages: rows.length,
|
|
140
|
-
messageIndexes
|
|
175
|
+
messageIndexes,
|
|
141
176
|
...pageDetails(page),
|
|
142
177
|
},
|
|
143
178
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
2
|
import { pageLimitSchema, pageOffsetSchema } from "../page-schemas.ts";
|
|
3
|
+
import { reviewAuditOutputSchema } from "./structured.ts";
|
|
3
4
|
|
|
4
5
|
export const REVIEW_AUDIT_TOOL_NAME = "review_audit";
|
|
5
6
|
export const REVIEW_AUDIT_TOOL_LABEL = "Inspect Review Replay";
|
|
@@ -41,4 +42,5 @@ export const reviewAuditSpec = {
|
|
|
41
42
|
name: REVIEW_AUDIT_TOOL_NAME,
|
|
42
43
|
label: REVIEW_AUDIT_TOOL_LABEL,
|
|
43
44
|
parameters: reviewAuditParameters,
|
|
45
|
+
outputSchema: reviewAuditOutputSchema,
|
|
44
46
|
} as const;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type Static, Type } from "typebox";
|
|
2
|
+
|
|
3
|
+
const pageProperties = {
|
|
4
|
+
text: Type.String({
|
|
5
|
+
description: "Selected page only, without synthetic paging notices or empty-page markers.",
|
|
6
|
+
}),
|
|
7
|
+
offset: Type.Integer({ minimum: 0 }),
|
|
8
|
+
nextOffset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
9
|
+
totalCharacters: Type.Integer({ minimum: 0 }),
|
|
10
|
+
};
|
|
11
|
+
const outlineRow = Type.Object(
|
|
12
|
+
{
|
|
13
|
+
index: Type.Integer({ minimum: 0 }),
|
|
14
|
+
role: Type.String(),
|
|
15
|
+
contentKinds: Type.Array(Type.String()),
|
|
16
|
+
contentCharacters: Type.Integer({ minimum: 0 }),
|
|
17
|
+
toolNames: Type.Array(Type.String()),
|
|
18
|
+
stopReason: Type.Optional(Type.String()),
|
|
19
|
+
hasError: Type.Boolean(),
|
|
20
|
+
},
|
|
21
|
+
{ additionalProperties: false },
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
/** Native data for exactly the selected audit view/page, never an implicit full replay. */
|
|
25
|
+
export const reviewAuditOutputSchema = Type.Union([
|
|
26
|
+
Type.Object(
|
|
27
|
+
{
|
|
28
|
+
mode: Type.Literal("list"),
|
|
29
|
+
audits: Type.Array(
|
|
30
|
+
Type.Object(
|
|
31
|
+
{ artifactId: Type.String(), expiresAt: Type.String() },
|
|
32
|
+
{ additionalProperties: false },
|
|
33
|
+
),
|
|
34
|
+
),
|
|
35
|
+
totalAudits: Type.Integer({ minimum: 0 }),
|
|
36
|
+
...pageProperties,
|
|
37
|
+
},
|
|
38
|
+
{ additionalProperties: false },
|
|
39
|
+
),
|
|
40
|
+
Type.Object(
|
|
41
|
+
{
|
|
42
|
+
mode: Type.Literal("outline"),
|
|
43
|
+
artifactId: Type.String(),
|
|
44
|
+
rows: Type.Array(outlineRow),
|
|
45
|
+
messageIndexes: Type.Array(Type.Integer({ minimum: 0 })),
|
|
46
|
+
totalMessages: Type.Integer({ minimum: 0 }),
|
|
47
|
+
...pageProperties,
|
|
48
|
+
},
|
|
49
|
+
{ additionalProperties: false },
|
|
50
|
+
),
|
|
51
|
+
Type.Object(
|
|
52
|
+
{
|
|
53
|
+
mode: Type.Literal("message"),
|
|
54
|
+
artifactId: Type.String(),
|
|
55
|
+
messageIndex: Type.Integer({ minimum: 0 }),
|
|
56
|
+
...pageProperties,
|
|
57
|
+
},
|
|
58
|
+
{ additionalProperties: false },
|
|
59
|
+
),
|
|
60
|
+
Type.Object(
|
|
61
|
+
{ mode: Type.Literal("raw"), artifactId: Type.String(), ...pageProperties },
|
|
62
|
+
{ additionalProperties: false },
|
|
63
|
+
),
|
|
64
|
+
]);
|
|
65
|
+
|
|
66
|
+
/** Mode-discriminated script contract; page completion says nothing about Criteria Coverage. */
|
|
67
|
+
export type ReviewAuditOutput = Static<typeof reviewAuditOutputSchema>;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import type { Static } from "typebox";
|
|
2
2
|
import type { ReviewArtifactStore } from "../../session/review-artifact-store.ts";
|
|
3
|
+
import { pageText } from "../output-page.ts";
|
|
3
4
|
import { buildOutputPageResult } from "./result.ts";
|
|
4
5
|
import type { reviewOutputSpec } from "./spec.ts";
|
|
5
6
|
|
|
6
7
|
export type ReviewOutputParams = Static<(typeof reviewOutputSpec)["parameters"]>;
|
|
7
8
|
|
|
8
|
-
/** Read
|
|
9
|
+
/** Read a bounded direct-call page and the complete native report from one stored artifact. */
|
|
9
10
|
export function executeReviewOutput(store: ReviewArtifactStore) {
|
|
10
11
|
return async (_toolCallId: string, params: ReviewOutputParams) => {
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
12
|
+
const text = store.readReport(params.artifactId);
|
|
13
|
+
if (text === undefined) {
|
|
13
14
|
throw new Error(
|
|
14
15
|
`Review output ${params.artifactId} was not found or has expired from this session.`,
|
|
15
16
|
);
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
const page = pageText(text, params.offset, params.limit);
|
|
19
|
+
return buildOutputPageResult(params.artifactId, text, page);
|
|
18
20
|
};
|
|
19
21
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const toolDescription =
|
|
2
|
-
"Read a current-process Review continuation page. Use only with an artifact id from review_run or /supi-review. Artifacts expire after 30 minutes, reload, resume, or a branch change.";
|
|
2
|
+
"Read a current-process Review report: direct calls return a continuation page; scripts receive complete stored text. Use only with an artifact id from review_run or /supi-review. Artifacts expire after 30 minutes, reload, resume, or a branch change.";
|
|
3
3
|
|
|
4
4
|
export const promptSnippet = "Continue paged review output";
|
|
5
5
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AgentToolResult } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import type { Static } from "typebox";
|
|
2
3
|
import { modelFacingPage, type TextPage } from "../output-page.ts";
|
|
3
|
-
import { REVIEW_OUTPUT_TOOL_NAME } from "./spec.ts";
|
|
4
|
+
import { REVIEW_OUTPUT_TOOL_NAME, type reviewOutputSpec } from "./spec.ts";
|
|
4
5
|
|
|
5
6
|
export interface ReviewOutputPageDetails {
|
|
6
7
|
kind: "review-output-page";
|
|
@@ -10,11 +11,14 @@ export interface ReviewOutputPageDetails {
|
|
|
10
11
|
totalCharacters: number;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
/** Assemble
|
|
14
|
+
/** Assemble a readable page and complete native text without changing the UI/state contract. */
|
|
14
15
|
export function buildOutputPageResult(
|
|
15
16
|
artifactId: string,
|
|
17
|
+
text: string,
|
|
16
18
|
page: TextPage,
|
|
17
|
-
): AgentToolResult<ReviewOutputPageDetails> {
|
|
19
|
+
): AgentToolResult<ReviewOutputPageDetails> & {
|
|
20
|
+
structuredContent: Static<typeof reviewOutputSpec.outputSchema>;
|
|
21
|
+
} {
|
|
18
22
|
return {
|
|
19
23
|
content: [
|
|
20
24
|
{
|
|
@@ -22,6 +26,7 @@ export function buildOutputPageResult(
|
|
|
22
26
|
text: modelFacingPage(REVIEW_OUTPUT_TOOL_NAME, { artifactId }, page),
|
|
23
27
|
},
|
|
24
28
|
],
|
|
29
|
+
structuredContent: { artifactId, text, totalCharacters: page.totalCharacters },
|
|
25
30
|
details: {
|
|
26
31
|
kind: "review-output-page",
|
|
27
32
|
artifactId,
|
|
@@ -26,4 +26,14 @@ export const reviewOutputSpec = {
|
|
|
26
26
|
name: REVIEW_OUTPUT_TOOL_NAME,
|
|
27
27
|
label: REVIEW_OUTPUT_TOOL_LABEL,
|
|
28
28
|
parameters: reviewOutputParameters,
|
|
29
|
+
outputSchema: Type.Object(
|
|
30
|
+
{
|
|
31
|
+
artifactId: Type.String(),
|
|
32
|
+
text: Type.String({
|
|
33
|
+
description: "Complete stored report, independent of the direct-call page.",
|
|
34
|
+
}),
|
|
35
|
+
totalCharacters: Type.Integer({ minimum: 0 }),
|
|
36
|
+
},
|
|
37
|
+
{ additionalProperties: false },
|
|
38
|
+
),
|
|
29
39
|
} as const;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
createCodemodeExtension,
|
|
3
|
+
DefaultResourceLoader,
|
|
4
|
+
SettingsManager,
|
|
5
|
+
} from "@earendil-works/pi-coding-agent";
|
|
2
6
|
import headlessInspectionProfile from "@mrclrchtr/supi-code-intelligence/headless";
|
|
3
7
|
|
|
4
8
|
/** Loader and settings manager preconfigured for an isolated child session. */
|
|
@@ -10,6 +14,8 @@ export interface IsolatedChildResources {
|
|
|
10
14
|
/** Optional Reviewer Extension Set settings for one isolated child. */
|
|
11
15
|
export interface IsolatedChildResourceOptions {
|
|
12
16
|
headlessInspection?: boolean;
|
|
17
|
+
/** Load PI codemode only for an explicitly opted-in Reviewer. */
|
|
18
|
+
codemode?: boolean;
|
|
13
19
|
projectTrusted?: boolean;
|
|
14
20
|
}
|
|
15
21
|
|
|
@@ -34,10 +40,13 @@ export function createIsolatedChildResources(
|
|
|
34
40
|
agentDir,
|
|
35
41
|
settingsManager,
|
|
36
42
|
noExtensions: true,
|
|
37
|
-
...(options.headlessInspection
|
|
43
|
+
...(options.headlessInspection || options.codemode
|
|
38
44
|
? {
|
|
39
45
|
extensionFactories: [
|
|
40
|
-
|
|
46
|
+
...(options.headlessInspection
|
|
47
|
+
? [{ name: "supi-code-intelligence-headless", factory: headlessInspectionProfile }]
|
|
48
|
+
: []),
|
|
49
|
+
...(options.codemode ? [createCodemodeExtension({ models: true, mode: "on" })] : []),
|
|
41
50
|
],
|
|
42
51
|
}
|
|
43
52
|
: {}),
|