@mrclrchtr/supi-review 13.0.0 → 14.1.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 +14 -0
- package/README.md +4 -2
- 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 +59 -13
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts +2 -0
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/spill.ts +2 -2
- package/node_modules/@mrclrchtr/supi-agent-runtime/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/session/agent-run-registry.ts +1 -1
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/session/transcript-format.ts +3 -1
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/session/transcript-store.ts +25 -10
- package/node_modules/@mrclrchtr/supi-code-intelligence/CHANGELOG.md +30 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/README.md +4 -4
- 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/query-result.ts +10 -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/debug-registry.ts +59 -13
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/session.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/spill.ts +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/README.md +6 -2
- 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/query-result.ts +10 -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/debug-registry.ts +59 -13
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/session.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/spill.ts +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-refresh.ts +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-request.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-timing.ts +14 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-typescript.ts +8 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +4 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-input-admission.ts +7 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +1 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/transport.ts +24 -8
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/server-config.ts +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/tsconfig-scope.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/debug-telemetry.ts +64 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-project-info.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-typescript-coverage.ts +27 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-symbol.ts +16 -112
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +521 -83
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/workspace-symbol-collection.ts +163 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/workspace-symbol-row-limit.ts +72 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-controller.ts +11 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registry.ts +36 -7
- 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/query-result.ts +10 -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/debug-registry.ts +59 -13
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/session.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/spill.ts +2 -2
- 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/sql/tree-sitter-sql.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/sql/tree-sitter-sql.wasm.json +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/CHANGELOG.md +6 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/lib/fxbuilder.min.js +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/lib/fxvalidator.min.js +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/node_modules/fast-xml-builder/CHANGELOG.md +4 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.cjs +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.min.js +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/node_modules/fast-xml-builder/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/fxb.js +13 -28
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/orderedJs2Xml.js +11 -26
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/util.js +31 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/src/validator.js +4 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +15 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/package.json +6 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/server-status.ts +32 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/signals.ts +1 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/instruction-files.ts +11 -7
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/relations/source-lines.ts +31 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/relations/types.ts +4 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/search/exclusions.ts +18 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/file-merge.ts +46 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/file-outline-omissions.ts +17 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/identity.ts +9 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/symbol-selection.ts +100 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/symbol.ts +48 -8
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/types.ts +8 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/app/app.ts +37 -21
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/extension.ts +1 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/headless.ts +4 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/find-workflow.ts +7 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/graph-workflow.ts +7 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/health-types.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation-types.ts +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation-workflow.ts +13 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/target-store.ts +38 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/target-workflow.ts +35 -14
- 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 +10 -11
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/result.ts +6 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/display.ts +4 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/guidance.ts +5 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/markdown.ts +26 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/section.ts +15 -13
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/structured.ts +10 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/markdown.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/structured-schema.ts +1 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/structured.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/markdown.ts +6 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/guidance.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/guidance.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/result.ts +2 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/structured.ts +6 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/infra/arguments.ts +53 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/register.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/candidate-selection.ts +17 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/footer.ts +147 -42
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-overlay.ts +13 -8
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +59 -13
- package/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
- package/node_modules/@mrclrchtr/supi-core/src/session.ts +2 -0
- package/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
- package/node_modules/@mrclrchtr/supi-core/src/spill.ts +2 -2
- package/package.json +4 -4
- package/src/target/file-manifest.ts +8 -4
- package/src/target/packet.ts +48 -3
- package/src/target/resolve.ts +30 -4
- package/src/tool/review_run/format.ts +17 -0
- package/src/tool/review_run/input-schema.ts +1 -1
- package/src/tool/review_run/render.ts +3 -0
- package/src/tool/review_run/schemas.ts +2 -1
- package/src/tool/review_run/system-prompt.ts +1 -0
- package/src/types.ts +5 -0
- package/src/workspace/cleanup-command.ts +43 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/prettifyJs2Xml.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [14.1.0]
|
|
4
|
+
|
|
5
|
+
- The changed-path manifest in a Reviewer Packet now lists up to 200 paths for ordinary path lengths. Before, a character budget cut a 154-file change at 102 paths and hid directories the review focused on. When paths are still omitted, the manifest names the exact Git command that lists them all.
|
|
6
|
+
- `review_run` warns when `from` is not an ancestor of the reviewed state, for example a base branch tip instead of the merge base. The target is unchanged, but the result and the Reviewer Packet name the merge base and say that the change also reverses commits only `from` contains. The `target` description now asks for the merge base for branch work.
|
|
7
|
+
- Reviewers apply a length limit from the Review Task to the summary and keep each finding as its own entry with its evidence. Before, "under 400 words" made Reviewers merge separate findings.
|
|
8
|
+
- Reviewer child sessions use the bundled Code Intelligence 14.1.0: `code_graph` shows the source line of each reference, `code_graph` and `code_find` show up to 50 results by default, target handles are 12 decimal digits, and nested arguments sent as JSON strings are accepted.
|
|
9
|
+
|
|
10
|
+
## [14.0.0]
|
|
11
|
+
|
|
12
|
+
- `review_run` asks callers to put the applicable criteria into each `criteriaSources` summary, quoted or closely paraphrased, and Reviewers retrieve a source only for what its summary lacks. One-line topic summaries made Reviewers read every source anyway.
|
|
13
|
+
- `code_orientation` no longer repeats an instruction file a Reviewer already read in full, and delivers instruction files again after a compaction ([#612](https://github.com/mrclrchtr/supi/issues/612)).
|
|
14
|
+
- `/supi-review-cleanup` reports one status row per workspace (`✓` removed, `✗` with the failure reason) instead of the raw `[supi-review-cleanup]` message.
|
|
15
|
+
- The Agent Run transcript (`/supi-agents`) of a Reviewer Session lists only the system prompts sent with a model request; before, one run could show up to four "Effective system prompt" entries ([#611](https://github.com/mrclrchtr/supi/issues/611)).
|
|
16
|
+
|
|
3
17
|
## [13.0.0]
|
|
4
18
|
|
|
5
19
|
- Reviews of a working tree with many untracked files start much faster. Their patches now come from one `git diff` instead of several Git processes per file; 205 untracked files took 0.5 s instead of 4.8 s. The repository's object store is not written.
|
package/README.md
CHANGED
|
@@ -75,7 +75,9 @@ Each task must set `mode` to `change` or `state`.
|
|
|
75
75
|
|
|
76
76
|
A committed change cannot use a root commit as `to`. A root commit is valid as `from`. Every Review requires a repository with `HEAD`.
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
`from` is compared directly with the after state (a two-dot diff). For branch work, pass the merge base with the base branch, for example the output of `git merge-base main HEAD`, not the base branch tip. Otherwise commits that landed on the base branch later appear as reversed changes. When `from` is not an ancestor of the after commit, the review still runs on the exact target; the Reviewer Packet and the result name the merge base and warn about the divergence.
|
|
79
|
+
|
|
80
|
+
Tasks can include `criteriaSources`. Each source has a `reference` and a `summary`. The summary states the criteria that apply, quoted or closely paraphrased; the reviewer retrieves the authoritative source for anything the summary lacks.
|
|
79
81
|
|
|
80
82
|
`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
83
|
|
|
@@ -121,7 +123,7 @@ The Reviewer Protocol owns finding eligibility:
|
|
|
121
123
|
- `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.
|
|
122
124
|
- `state` permits findings relevant to the Review Criteria anywhere in the frozen after state. A relevant pre-existing finding can block acceptance.
|
|
123
125
|
|
|
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.
|
|
126
|
+
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 manifest lists up to 200 paths; an omission row names the Git command that lists the rest. 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
127
|
|
|
126
128
|
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.
|
|
127
129
|
|
|
@@ -16,7 +16,10 @@ export interface DebugRegistryConfig {
|
|
|
16
16
|
agentAccess: DebugAgentAccess;
|
|
17
17
|
/** Whether Agent Run retrospective capture is explicitly enabled. */
|
|
18
18
|
agentRunRetrospectivesEnabled: boolean;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Maximum number of session-local events to keep in memory. `debug` events
|
|
21
|
+
* are evicted first; higher levels keep at most half of the buffer.
|
|
22
|
+
*/
|
|
20
23
|
maxEvents: number;
|
|
21
24
|
/**
|
|
22
25
|
* Minimum level forwarded to persistence sinks. Lower-level events stay in the
|
|
@@ -146,12 +149,51 @@ function normalizeMaxEvents(value: number): number {
|
|
|
146
149
|
return Math.floor(value);
|
|
147
150
|
}
|
|
148
151
|
|
|
152
|
+
function isSummary(event: DebugEvent): boolean {
|
|
153
|
+
return event.level !== "debug";
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function groupKey(event: DebugEvent): string {
|
|
157
|
+
return `${event.source}\u0000${event.category}`;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Return the index of the oldest event in the largest source/category group of
|
|
162
|
+
* one tier, so a high-volume category evicts its own events before rare ones.
|
|
163
|
+
*/
|
|
164
|
+
function evictionIndex(events: readonly DebugEvent[], summaryTier: boolean): number {
|
|
165
|
+
const counts = new Map<string, number>();
|
|
166
|
+
let largest = 0;
|
|
167
|
+
for (const event of events) {
|
|
168
|
+
if (isSummary(event) !== summaryTier) continue;
|
|
169
|
+
const key = groupKey(event);
|
|
170
|
+
const count = (counts.get(key) ?? 0) + 1;
|
|
171
|
+
counts.set(key, count);
|
|
172
|
+
largest = Math.max(largest, count);
|
|
173
|
+
}
|
|
174
|
+
return events.findIndex(
|
|
175
|
+
(event) => isSummary(event) === summaryTier && counts.get(groupKey(event)) === largest,
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Evict down to `maxEvents`. A `debug` event goes first, so high-volume
|
|
181
|
+
* timings cannot push out a summary recorded moments earlier. Higher-level
|
|
182
|
+
* events keep at most half the buffer; past that one of them goes instead, so
|
|
183
|
+
* recent `debug` events stay visible too. Within the chosen tier, the oldest
|
|
184
|
+
* event of the largest source/category group goes, so one flooding category
|
|
185
|
+
* such as `request.timing` cannot push out every other category.
|
|
186
|
+
*/
|
|
149
187
|
function trimToMaxEvents(state: DebugRegistryState): void {
|
|
150
188
|
const maxEvents = normalizeMaxEvents(state.config.maxEvents);
|
|
151
|
-
|
|
152
|
-
|
|
189
|
+
const summaryShare = Math.floor(maxEvents / 2);
|
|
190
|
+
let summaries = state.events.filter(isSummary).length;
|
|
191
|
+
while (state.events.length > maxEvents) {
|
|
192
|
+
const evictSummary = summaries > summaryShare;
|
|
193
|
+
const index = evictionIndex(state.events, evictSummary);
|
|
194
|
+
if (evictSummary) summaries--;
|
|
195
|
+
state.events.splice(Math.max(index, 0), 1);
|
|
153
196
|
}
|
|
154
|
-
state.events.splice(0, state.events.length - maxEvents);
|
|
155
197
|
}
|
|
156
198
|
|
|
157
199
|
/** Return whether a debug level is recognized by the registry. */
|
|
@@ -226,18 +268,22 @@ export function isDebugRegistryEnabled(): boolean {
|
|
|
226
268
|
}
|
|
227
269
|
|
|
228
270
|
/**
|
|
229
|
-
* Return whether
|
|
271
|
+
* Return whether an event at `level` would reach the session file now: Debug
|
|
230
272
|
* must be enabled, at least one persistence sink must be registered, and the
|
|
231
|
-
* persistence threshold must admit
|
|
273
|
+
* persistence threshold must admit the level.
|
|
232
274
|
*/
|
|
233
|
-
export function
|
|
275
|
+
export function canPersistDebugEvent(level: DebugLevel = "info"): boolean {
|
|
234
276
|
const state = getState();
|
|
235
|
-
return (
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
277
|
+
return state.config.enabled && state.persistenceSinks.size > 0 && shouldPersist(state, level);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Return whether a retrospective can be captured: an `info` event must be
|
|
282
|
+
* persistable (see {@link canPersistDebugEvent}) and the explicit Agent Run
|
|
283
|
+
* retrospective opt-in must be enabled.
|
|
284
|
+
*/
|
|
285
|
+
export function canRecordAgentRunRetrospective(): boolean {
|
|
286
|
+
return getState().config.agentRunRetrospectivesEnabled && canPersistDebugEvent("info");
|
|
241
287
|
}
|
|
242
288
|
|
|
243
289
|
/** Best-effort redaction helper for data exposed through sanitized debug views. */
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// Shared footer contribution registry for SuPi extensions.
|
|
2
2
|
//
|
|
3
|
-
// Extensions register
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// alongside the built-in metrics. Extensions can use PI's status API as a
|
|
3
|
+
// Extensions register text chunks with a placement hint. The custom footer in
|
|
4
|
+
// supi-extras reads these contributions and renders them alongside the
|
|
5
|
+
// built-in metrics. Extensions can use PI's status API with the same key as a
|
|
7
6
|
// fallback when the custom footer is not installed.
|
|
8
7
|
|
|
9
8
|
import { createRegistry } from "./registry-utils.ts";
|
|
@@ -11,8 +10,33 @@ import { createRegistry } from "./registry-utils.ts";
|
|
|
11
10
|
/** Event emitted when a dynamic footer contribution needs a new render. */
|
|
12
11
|
export const FOOTER_INVALIDATE_EVENT = "supi:footer:invalidate";
|
|
13
12
|
|
|
14
|
-
/**
|
|
15
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Where the contribution should appear in the footer.
|
|
15
|
+
*
|
|
16
|
+
* - `path-end`: right side of the workspace line (path and Git), for workspace state
|
|
17
|
+
* - `stats`: inside the cache section of the session line
|
|
18
|
+
* - `stats-end`: own sections after context usage on the session line
|
|
19
|
+
* - `model-start`: right side of the session line, before the model name
|
|
20
|
+
* - `status`: extension status line below the footer
|
|
21
|
+
*/
|
|
22
|
+
export type FooterPlacement = "path-end" | "stats" | "stats-end" | "model-start" | "status";
|
|
23
|
+
|
|
24
|
+
/** Icon set selected by the footer `icons` setting. */
|
|
25
|
+
export type FooterGlyphMode = "nerd" | "unicode" | "ascii";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Theme color names accepted by {@link FooterRenderContext.style}.
|
|
29
|
+
* Matches the Pi `ThemeColor` names SuPi contributions use.
|
|
30
|
+
*/
|
|
31
|
+
export type FooterColor = "accent" | "dim" | "muted" | "text" | "success" | "warning" | "error";
|
|
32
|
+
|
|
33
|
+
/** Render inputs supplied by the custom footer. */
|
|
34
|
+
export interface FooterRenderContext {
|
|
35
|
+
/** Apply a theme color. */
|
|
36
|
+
style: (color: FooterColor, text: string) => string;
|
|
37
|
+
/** Resolved icon mode; contributions choose matching glyphs. */
|
|
38
|
+
glyphMode: FooterGlyphMode;
|
|
39
|
+
}
|
|
16
40
|
|
|
17
41
|
/** A single footer contribution registered by an extension. */
|
|
18
42
|
export interface FooterContribution {
|
|
@@ -21,15 +45,18 @@ export interface FooterContribution {
|
|
|
21
45
|
* A same-key Pi status is treated as this contribution's built-in-footer fallback.
|
|
22
46
|
*/
|
|
23
47
|
key: string;
|
|
24
|
-
/** Which footer
|
|
48
|
+
/** Which footer area this belongs to. */
|
|
25
49
|
placement: FooterPlacement;
|
|
26
50
|
/**
|
|
27
51
|
* Sort order within the placement (lower values render further left). Default: 100.
|
|
28
52
|
* Priority 0 is reserved for the turn cache-hit part so it stays adjacent to CH.
|
|
29
53
|
*/
|
|
30
54
|
priority?: number;
|
|
31
|
-
/**
|
|
32
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Return the text for this contribution; empty hides it. Called on every render.
|
|
57
|
+
* Callers without a footer context (for example tests) may omit `ctx`.
|
|
58
|
+
*/
|
|
59
|
+
render: (ctx?: FooterRenderContext) => string;
|
|
33
60
|
}
|
|
34
61
|
|
|
35
62
|
const registry = createRegistry<FooterContribution>("footer-contributions");
|
|
@@ -57,6 +84,11 @@ export const footerContributions = {
|
|
|
57
84
|
.sort(sortByPriority);
|
|
58
85
|
},
|
|
59
86
|
|
|
87
|
+
/** Get every registered contribution regardless of placement. */
|
|
88
|
+
getAll(): FooterContribution[] {
|
|
89
|
+
return registry.getAll();
|
|
90
|
+
},
|
|
91
|
+
|
|
60
92
|
/** Remove all contributions (primarily for tests). */
|
|
61
93
|
clear(): void {
|
|
62
94
|
registry.clear();
|
package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts
CHANGED
|
@@ -57,3 +57,5 @@ export {
|
|
|
57
57
|
getActiveBranchEntries,
|
|
58
58
|
} from "./session-utils.ts";
|
|
59
59
|
export { BSD_SED_HINT, BSD_SED_HINT_MARKER, registerShellHints } from "./shell-hints.ts";
|
|
60
|
+
export type { SideRunEvent } from "./side-run.ts";
|
|
61
|
+
export { runSideRun, SIDE_RUN_END_EVENT, SIDE_RUN_START_EVENT } from "./side-run.ts";
|
package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/side-run.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Side-run signal shared over `pi.events`.
|
|
2
|
+
//
|
|
3
|
+
// A side run is agent work whose result the session will not continue from,
|
|
4
|
+
// such as a run on a branch that is abandoned afterwards. Listeners use the
|
|
5
|
+
// signal to skip work tied to the run's result, for example prompt suggestions.
|
|
6
|
+
|
|
7
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
8
|
+
|
|
9
|
+
/** Event emitted on `pi.events` when a side run starts. Payload: {@link SideRunEvent}. */
|
|
10
|
+
export const SIDE_RUN_START_EVENT = "supi:side-run:start";
|
|
11
|
+
|
|
12
|
+
/** Event emitted on `pi.events` when a side run ends. Payload: {@link SideRunEvent}. */
|
|
13
|
+
export const SIDE_RUN_END_EVENT = "supi:side-run:end";
|
|
14
|
+
|
|
15
|
+
/** Payload of {@link SIDE_RUN_START_EVENT} and {@link SIDE_RUN_END_EVENT}. */
|
|
16
|
+
export interface SideRunEvent {
|
|
17
|
+
/** Emitting package, such as `supi-debug`. */
|
|
18
|
+
readonly source: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Run `run` as a side run: emit {@link SIDE_RUN_START_EVENT} before it and
|
|
23
|
+
* {@link SIDE_RUN_END_EVENT} after it, also when it throws.
|
|
24
|
+
*
|
|
25
|
+
* After a session replacement or reload the captured `pi` is stale and its
|
|
26
|
+
* `events.emit` throws. That end signal is dropped instead of masking the
|
|
27
|
+
* run's result; listeners reset their side-run state on `session_start` and
|
|
28
|
+
* `session_shutdown`.
|
|
29
|
+
*/
|
|
30
|
+
export async function runSideRun<T>(
|
|
31
|
+
pi: Pick<ExtensionAPI, "events">,
|
|
32
|
+
source: string,
|
|
33
|
+
run: () => Promise<T>,
|
|
34
|
+
): Promise<T> {
|
|
35
|
+
const payload: SideRunEvent = { source };
|
|
36
|
+
pi.events.emit(SIDE_RUN_START_EVENT, payload);
|
|
37
|
+
try {
|
|
38
|
+
return await run();
|
|
39
|
+
} finally {
|
|
40
|
+
try {
|
|
41
|
+
pi.events.emit(SIDE_RUN_END_EVENT, payload);
|
|
42
|
+
} catch {
|
|
43
|
+
// Stale extension instance after session replacement; see JSDoc.
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/spill.ts
CHANGED
|
@@ -15,8 +15,8 @@ export interface SpillFileOptions {
|
|
|
15
15
|
owner: string;
|
|
16
16
|
/** Descriptive file name, e.g. `"snapshot.md"`. The content hash is inserted before the extension. */
|
|
17
17
|
name: string;
|
|
18
|
-
/** Full content to persist. */
|
|
19
|
-
content: string;
|
|
18
|
+
/** Full content to persist: text (written as UTF-8) or raw bytes. */
|
|
19
|
+
content: string | Uint8Array;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const SEGMENT = /^[a-z0-9][a-z0-9-]*$/;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-agent-runtime",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.1.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": "
|
|
31
|
+
"@mrclrchtr/supi-core": "14.1.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@earendil-works/pi-ai": "*",
|
|
@@ -145,7 +145,7 @@ export class AgentRunRegistry {
|
|
|
145
145
|
const live = run.live;
|
|
146
146
|
if (!live) return () => undefined;
|
|
147
147
|
const transcript = run.transcript;
|
|
148
|
-
transcript?.
|
|
148
|
+
transcript?.updateToolRenderers(session.getToolRenderers());
|
|
149
149
|
const unsubscribe = session.subscribe((event) => {
|
|
150
150
|
if (!this.#isCurrent(run)) return;
|
|
151
151
|
transcript?.observe(event, session.systemPrompt, session.getToolRenderers());
|
|
@@ -85,7 +85,9 @@ export function parseTranscript(
|
|
|
85
85
|
case "header":
|
|
86
86
|
metadata = record.metadata;
|
|
87
87
|
systemPrompt = record.systemPrompt;
|
|
88
|
-
systemPromptHistory =
|
|
88
|
+
systemPromptHistory = record.systemPrompt
|
|
89
|
+
? [{ occurredAt: record.occurredAt, text: record.systemPrompt }]
|
|
90
|
+
: [];
|
|
89
91
|
break;
|
|
90
92
|
case "message":
|
|
91
93
|
messages.push(record.message);
|
|
@@ -102,6 +102,7 @@ export class AgentRunTranscriptCapture implements AgentRunTranscriptSource {
|
|
|
102
102
|
#initialSystemPrompt: string;
|
|
103
103
|
#systemPrompt: string;
|
|
104
104
|
#systemPromptHistory: Array<{ occurredAt: number; text: string }>;
|
|
105
|
+
#agentActive = false;
|
|
105
106
|
#toolRenderers: AgentRunToolRenderer[];
|
|
106
107
|
#filePath: string | undefined;
|
|
107
108
|
#writeQueue: Promise<void>;
|
|
@@ -121,7 +122,9 @@ export class AgentRunTranscriptCapture implements AgentRunTranscriptSource {
|
|
|
121
122
|
this.onChange = onChange;
|
|
122
123
|
this.#initialSystemPrompt = systemPrompt;
|
|
123
124
|
this.#systemPrompt = systemPrompt;
|
|
124
|
-
this.#systemPromptHistory =
|
|
125
|
+
this.#systemPromptHistory = systemPrompt
|
|
126
|
+
? [{ occurredAt: Date.now(), text: systemPrompt }]
|
|
127
|
+
: [];
|
|
125
128
|
this.#toolRenderers = toolRenderers.map(copyToolRenderer);
|
|
126
129
|
this.#writeQueue = this.#createFile(getDirectory);
|
|
127
130
|
}
|
|
@@ -142,25 +145,29 @@ export class AgentRunTranscriptCapture implements AgentRunTranscriptSource {
|
|
|
142
145
|
});
|
|
143
146
|
}
|
|
144
147
|
|
|
145
|
-
/** Update the
|
|
146
|
-
|
|
148
|
+
/** Update the render-only tool definitions. */
|
|
149
|
+
updateToolRenderers(toolRenderers: readonly AgentRunToolRenderer[]): void {
|
|
147
150
|
if (this.#status !== "capturing") return;
|
|
148
151
|
this.#updateToolRenderers(toolRenderers);
|
|
149
|
-
if (systemPrompt === this.#systemPrompt) return;
|
|
150
|
-
this.#systemPrompt = systemPrompt;
|
|
151
|
-
const occurredAt = Date.now();
|
|
152
|
-
this.#systemPromptHistory.push({ occurredAt, text: systemPrompt });
|
|
153
|
-
void this.#enqueue({ kind: "system-prompt", text: systemPrompt, occurredAt });
|
|
154
152
|
}
|
|
155
153
|
|
|
156
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* Record finalized messages and allowlisted lifecycle details only.
|
|
156
|
+
*
|
|
157
|
+
* The system prompt is recorded only from `agent_start` through `agent_end`. Outside that
|
|
158
|
+
* span the session reports its base prompt, without the changes `before_agent_start`
|
|
159
|
+
* handlers make for a run, and no model request uses that text.
|
|
160
|
+
*/
|
|
157
161
|
observe(
|
|
158
162
|
event: AgentSessionEvent,
|
|
159
163
|
systemPrompt: string,
|
|
160
164
|
toolRenderers: readonly AgentRunToolRenderer[],
|
|
161
165
|
): void {
|
|
162
166
|
if (this.#status !== "capturing") return;
|
|
163
|
-
this
|
|
167
|
+
this.#updateToolRenderers(toolRenderers);
|
|
168
|
+
if (event.type === "agent_start") this.#agentActive = true;
|
|
169
|
+
if (this.#agentActive) this.#recordSystemPrompt(systemPrompt);
|
|
170
|
+
if (event.type === "agent_end") this.#agentActive = false;
|
|
164
171
|
if (event.type === "message_end") {
|
|
165
172
|
void this.#enqueue({ kind: "message", message: sanitizeMessage(event.message) });
|
|
166
173
|
}
|
|
@@ -239,6 +246,14 @@ export class AgentRunTranscriptCapture implements AgentRunTranscriptSource {
|
|
|
239
246
|
return this.#writeQueue;
|
|
240
247
|
}
|
|
241
248
|
|
|
249
|
+
#recordSystemPrompt(systemPrompt: string): void {
|
|
250
|
+
if (systemPrompt === this.#systemPrompt) return;
|
|
251
|
+
this.#systemPrompt = systemPrompt;
|
|
252
|
+
const occurredAt = Date.now();
|
|
253
|
+
this.#systemPromptHistory.push({ occurredAt, text: systemPrompt });
|
|
254
|
+
void this.#enqueue({ kind: "system-prompt", text: systemPrompt, occurredAt });
|
|
255
|
+
}
|
|
256
|
+
|
|
242
257
|
#updateToolRenderers(toolRenderers: readonly AgentRunToolRenderer[]): void {
|
|
243
258
|
for (const value of toolRenderers) {
|
|
244
259
|
const renderer = copyToolRenderer(value);
|
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [14.1.0]
|
|
4
|
+
|
|
5
|
+
- `code_graph` shows the source line of every reference and implementation site, so a result answers how a symbol is used without a follow-up `read` or `rg`. Sites are listed one row per source line under their file (`` - L120:25 — `const stashes = await git(["stash", "list", "--format=%gs"], cwd);` ``) instead of as bare positions (`L117:24, L120:25`). Structured output adds an optional `text` to each item of these relations, and the expanded transcript shows the same line. Lines are trimmed and shortened when long; a site whose file cannot be read keeps the position-only form. Callee rows are unchanged.
|
|
6
|
+
- The code tools accept a nested argument that a model sent as a JSON string, such as `target: "{\"symbol\":{…}}"` for `code_resolve`. Before, the call failed with `target: expected object, got string` and was retried; in a probe this happened on the first `code_resolve` call of every rename task. Only a string that parses to the object or array the schema declares is decoded; any other value still fails validation.
|
|
7
|
+
- The system-prompt guidelines for the code tools name the action that calls for a tool instead of a tool category. `code_graph`: before renaming, removing, or changing the signature of an exported symbol. `code_refactor_plan`: renaming a symbol across files. `code_resolve`: a search for the declaration of one identifier. The `code_find` guideline ("broad code-aware discovery") is removed, and the `code_graph` description adds that it is selected before changing or removing a symbol. In a probe of five runs per task, an agent that had only used `rg` now called `code_refactor_plan` for a rename (5 of 5) and `code_resolve` for a declaration (5 of 5).
|
|
8
|
+
- A new `code_graph` guideline covers several symbols: issue one `code_graph` call per symbol in the same turn instead of one text search for all of them. In a probe of five runs, an agent asked which files use three exported functions made three parallel `code_graph` calls in its first turn (5 of 5; 1 of 5 before). The guideline had no effect on a task that named the file to change; the agent read the file and used `rg` there (0 of 5).
|
|
9
|
+
- A new `code_find` guideline covers declarations searched by a name fragment: call `code_find` with AST kind `definition` instead of an `rg` keyword pattern, which also matches imports and misses methods. In a probe of five runs, an agent asked for the declarations whose name ends in `WorkflowDeps` called `code_find` first (5 of 5; 0 of 5 before) and named the two methods among the nine declarations in every answer (2 of 5 before).
|
|
10
|
+
- `code_graph` and `code_find` show up to 50 results when a call sets no `maxResults`, instead of 8. A result with 9 matches was cut to `showing 8 of 9; 1 omitted` and needed a second call; in persisted sessions 11 of 25 completed calls were cut. Larger results are still capped and report the omitted count, and `maxResults` still overrides the default. A call that only needs a sample of a larger result now returns more text: 21 references take about 740 estimated tokens instead of 470. The `code_resolve` file outline keeps its limit of 10.
|
|
11
|
+
- Target handles are 12 decimal digits (`676397776155`) instead of `tg-` and 28 hex characters (`tg-bf22b9ab5c9595a60e1dbeeacf87`). A handle in a result costs about 6 provider tokens instead of 23, measured on `claude-opus-5-5`; a file outline with 107 declarations shrinks from about 1,155 to 917 estimated tokens. Handles stay deterministic for unchanged files and are still passed as strings in `target.handle`. If two targets of one session would share a handle, the second gets another one. Handles from results issued before the update are not found; resolve the target again.
|
|
12
|
+
- The `code_resolve` file outline lists a TypeScript type alias and a `get`/`set` accessor once. With the native TypeScript server each appeared twice, once from the language server (`Class`, `Property`) and once from the syntax parser (`type alias`, `method`), with two handles for one declaration. In a sample of 225 source files, 71 had such duplicates (150 rows). A type alias could also be listed twice when the syntax lookup for its name was rejected under load; the merge no longer depends on that lookup. `export default function` is still listed twice.
|
|
13
|
+
- The `code_resolve` file outline shows up to 50 declarations when a call sets no `maxResults`, instead of 10. Top-level declarations are listed before members, and no file in a sample of 225 source files had more than 34 of them, so an outline now names every top-level declaration; with 10, 48 of the 225 files had top-level declarations cut off, and an agent needed a second call to get a handle for one. In that sample 209 files are now listed completely (114 before). An outline of a large file returns more text: 50 of 57 declarations take about 910 estimated tokens instead of 375 for 10. `maxResults` still overrides the default.
|
|
14
|
+
|
|
15
|
+
## [14.0.0]
|
|
16
|
+
|
|
17
|
+
- The LSP footer moved to the right side of the footer path line and is shorter: `λ 3✓ 1⟳ ◫43` instead of `λ lsp • 3 ✓ • 1 ⟳ • 43 open files`. Route counts are colored by severity (`✓` success, `⟳` accent, `↻` and `⊘` warning, `✗` error). The file count covers files synchronized to a language server, not files open in an editor; it uses `◫`, the Nerd Font file-with-eye outline (U+F0DCB), or `f` depending on the footer `icons` setting, and ASCII mode writes `lsp 3ok`. When LSP startup fails, the footer shows `λ ✗ config` for a configuration error and `λ ✗ unavailable` otherwise, instead of disappearing. Pi's built-in footer and other custom footers now show the LSP status too, on their extension status line. The footer renders the last published runtime state instead of re-querying every route on each render, and a route whose server command is missing or fails to start shows up without waiting for another state change.
|
|
18
|
+
- Symbol queries on TypeScript workspaces with several projects no longer return a short candidate list as complete. The language server searches only projects it has loaded, and the first query stopped after loading one. A query for `toolDescription` could list 13 of 26 declarations, and a name declared in two projects could be selected automatically from the one that was loaded. Every project root (up to 96) is now loaded before a symbol result is reported complete; roots past that limit are reported as a coverage limit ([#615](https://github.com/mrclrchtr/supi/issues/615)). Loading starts in the background when the TypeScript server is ready and takes a few seconds once per session. A symbol query that arrives earlier waits for it. While it runs, the LSP footer counts the TypeScript route under `⟳` instead of `✓`, and `code_health` and the `/supi-ci-status` inspector show it as `loading projects`; structured `code_health` servers carry `loadingProjects: true`. The opened files (one per project root) count as tracked files in `code_health` from then on, also in sessions that never run a symbol query ([#618](https://github.com/mrclrchtr/supi/issues/618)).
|
|
19
|
+
- `code_graph` references on a native TypeScript workspace no longer miss a test project whose first file in directory order is one the project excludes, such as `__tests__/fixtures/server.mjs`. Project warm-up opened only that file, which does not keep the project loaded, so references to `limitWorkspaceSymbolWarmRoots` came back provider-limited with `packages/supi-lsp/__tests__/tsconfig.json` is not loaded, and symbol queries could miss names declared only in that project. Warm-up now opens the project's next file and records the skipped one as a `workspace-symbol.warm-probe` debug event with outcome `excluded`. A project that includes the queried file but has no file of its own, such as a `__tests__/tsconfig.json` without tests, is no longer reported as not loaded: there was no file to open, so the advice could not be followed ([#616](https://github.com/mrclrchtr/supi/issues/616)).
|
|
20
|
+
- Several `code_*` calls in one parallel block no longer fail with `No routed LSP client could complete …` when together they open more than 32 new files, for example long candidate lists. Up to 1,024 first opens may now wait per language server. If that limit is reached, the result names the cause (`LSP could not open <file> for references: LSP input admission queue is full.`) instead of reporting a missing route.
|
|
21
|
+
- Two new LSP debug events are kept in the session file: `document.open-failed` (warning) names the server, file, and reason when a language server could not open a file, and `workspace-symbol.warm-pass` (info) summarizes one project warm-up pass with root counts and duration. Before, a failed open left no trace, and the per-file warm-up probes were `debug` events that high-volume request timings pushed out of the buffer.
|
|
22
|
+
- LSP batch operations no longer record one `request.timing` debug event per completed request. A diagnostic refresh over every open document and a project warm-up pass now report their completed requests on their own event (`diagnostics.timing` `refresh-open`, `workspace-symbol.warm-pass`) as `requests`, keyed by method with `count`, `totalMs`, and `maxMs`. Before, one refresh over 46 open documents recorded 46 near-identical timings and filled most of the 100-event debug buffer. Failed, timed-out, and cancelled requests are still recorded individually ([#619](https://github.com/mrclrchtr/supi/issues/619)).
|
|
23
|
+
- A project warm-up pass records far fewer debug events. It publishes one `runtime.transition` for all files it opened instead of one per file, and records a `workspace-symbol.warm-probe` event only for a file that did not load its project (`open-failed`, `probe-unavailable`, `inferred`); loaded projects are counted in `workspace-symbol.warm-pass`. Before, one pass over 46 projects recorded about 90 such events. The LSP footer therefore updates its open-file count less often during the pass ([#619](https://github.com/mrclrchtr/supi/issues/619)).
|
|
24
|
+
- A TypeScript symbol result at the native server's limit of 256 rows is reported as provider-limited instead of complete, so a target is not selected automatically from a truncated list. The limit is not applied to typescript-language-server (tsserver), which returns every match. The native server sorts exact names first and cuts afterwards, so a cut answer whose last row has another name still holds every declaration of the queried name. Such a result selects the only declaration of that name, with a note that partial-name matches may be missing: `code_resolve` for `git` scoped to `packages/supi-extras/src` resolves `footer-git-status.ts:102` instead of listing six candidates. Otherwise, when the query already has a scope, the note points to an anchor target (file, line, character) instead of suggesting a scope. If no row of a cut answer lies in the scope, the `code_resolve` failure no longer appends the readiness next steps, whose `target.file` advice led back to the same query ([#617](https://github.com/mrclrchtr/supi/issues/617), [#622](https://github.com/mrclrchtr/supi/issues/622)).
|
|
25
|
+
- A candidate list that is incomplete (for example provider-limited) ends with `Choose one candidate handle.` instead of also suggesting to narrow with `scope` or `symbolKind`. The list's own note names the step that applies, and the generic advice could contradict it ([#617](https://github.com/mrclrchtr/supi/issues/617)).
|
|
26
|
+
- A semantic `code_find` result that may be incomplete now states why: `more may exist — provider-limited; <reason>`, the same wording `code_resolve` uses. Before, it showed only `provider-limited`. The separate line about results excluded by the automatic path policy is omitted in that case, because the reason already contains it.
|
|
27
|
+
- Several reasons for an incomplete symbol result are no longer joined as `.;`. A reason that ends a sentence is followed by a space.
|
|
28
|
+
- Directory `code_orientation` in managed child sessions (Agent Runs and Reviewer Sessions) no longer repeats an instruction file the session already has: one loaded into its system prompt, or one it read in full with `read`. After a compaction the files are delivered again. The parent session already behaved this way ([#612](https://github.com/mrclrchtr/supi/issues/612)).
|
|
29
|
+
- Directory `code_orientation` names the instruction files it does not repeat: `Instruction files already supplied in this session, not repeated: …`. Before, the missing `## Instructions` section could not be told apart from a discovery failure. The workspace-root file is not listed, because nearly every session already has it.
|
|
30
|
+
- The note about results excluded by the automatic path policy is shorter: it names at most two example paths, and a path is written once unless the observed and canonical forms differ. Structured output still lists every collected example.
|
|
31
|
+
- Symbol targets in `code_resolve`, `code_graph`, and `code_orientation` select the only case-sensitive exact-name match instead of listing partial-name matches as candidates. A query for `registerSettings` no longer returns `# Multiple targets match` because `registerLspSettings` also exists; the result carries a note naming the matches that were not selected. An exact-name match that only imports or re-exports the name, such as the `alias` symbol TypeScript 6 and earlier report for `export { foo } from "./foo"`, no longer counts as a second declaration. Several declarations of one name still list candidates, now without the partial-name matches, which a note names instead. Incomplete provider results list every match.
|
|
32
|
+
|
|
3
33
|
## [13.0.0]
|
|
4
34
|
|
|
5
35
|
- **Breaking:** every `code_*` evidence list in structured details now carries `completeness`: `complete`, `capped`, `partial`, or `unbounded`. Scripts can read it directly instead of inferring completeness from a null `totalCount`. `code_orientation` source lists and context definitions replace `collectedCount`/`omittedCount` with one `evidence` list. Expanded TUI sections report rows hidden by the 20-row view separately (for example `25 of 30; 5 omitted; 5 rows hidden in view`), instead of adding them to the evidence omission count. Structured TUI chrome from sessions saved before this change falls back to the markdown output on resume.
|
|
@@ -76,8 +76,8 @@ code_health({ scope: "packages/api/src/index.ts", refresh: true })
|
|
|
76
76
|
|
|
77
77
|
Important tool rules:
|
|
78
78
|
|
|
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.
|
|
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.
|
|
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. A symbol query selects the only case-sensitive exact-name match, even beside partial-name matches such as `fooBar` for `foo`, and names those in a note. Exact-name matches inside an import statement or export list are bindings, not declarations, and do not count. With several declarations of one name it lists only those as candidates and names the other matches in a note. An incomplete provider result lists every match, exact names 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. 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. Each shown reference and implementation site carries its trimmed source line (`text` in structured output, at most 400 characters; agent output shortens it to 160), read from disk when the result is assembled; sites on one line share a row. A site whose file cannot be read is listed without text. 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
|
|
|
@@ -267,7 +267,7 @@ Press `h` (or F6) to **Refresh health**: run the existing workspace-scoped sessi
|
|
|
267
267
|
|
|
268
268
|
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.
|
|
269
269
|
|
|
270
|
-
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`.
|
|
270
|
+
The inspector does not replace the footer or add editor widgets. The extension's separate LSP footer contribution remains active: `λ 2✓ 1⟳ ◫17` on the right side of the footer path line counts ready routes (`✓`), routes still in progress (`⟳`), and files synchronized to a language server (`◫`; a Nerd Font file icon or `f`, depending on the footer `icons` setting). Recovering (`↻`), failed (`✗`), and unavailable (`⊘`) routes appear in warning or error colors, and a failed LSP startup shows `λ ✗ config` or `λ ✗ unavailable`. Without the SuPi footer, Pi's extension status line shows the same text. A route is in progress while its server starts or indexes, and while the TypeScript project warm-up after startup loads its projects; during the warm-up the route answers queries, and only symbol queries wait. The inspector and `code_health` name that state `loading projects`. Outside the interactive terminal, use `code_health`.
|
|
271
271
|
|
|
272
272
|
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.
|
|
273
273
|
|
|
@@ -344,7 +344,7 @@ Tool results and the hidden overview enter Pi's model context and can be saved i
|
|
|
344
344
|
|
|
345
345
|
The package-root export also re-exports types; prefer `/api`. See [the type exports](src/api.ts) for the complete list.
|
|
346
346
|
|
|
347
|
-
The headless factory registers only `code_resolve`, `code_inspect`, `code_orientation`, `code_graph`, `code_find`, and `code_health` for managed child sessions. It adds no refactor tools, settings, commands, UI, or overview. It is a tool profile, not a filesystem sandbox.
|
|
347
|
+
The headless factory registers only `code_resolve`, `code_inspect`, `code_orientation`, `code_graph`, `code_find`, and `code_health` for managed child sessions. It adds no refactor tools, settings, commands, UI, or overview. Directory orientation skips instruction files the child session already has, by the same rules as the full extension. It is a tool profile, not a filesystem sandbox.
|
|
348
348
|
|
|
349
349
|
## See it in action
|
|
350
350
|
|
|
@@ -14,6 +14,16 @@ export interface CodeQueryPartialMetadata {
|
|
|
14
14
|
* answer.
|
|
15
15
|
*/
|
|
16
16
|
readonly exclusionOnly?: boolean;
|
|
17
|
+
/** A provider cut its answer at a row limit; a narrower scope cannot avoid it. */
|
|
18
|
+
readonly rowLimit?: {
|
|
19
|
+
/**
|
|
20
|
+
* True when every declaration whose name equals the query is still in the
|
|
21
|
+
* result, though partial-name matches may be missing: the provider sorted
|
|
22
|
+
* exact names first. Set only when no provider failed and no coverage gap
|
|
23
|
+
* was observed, so exact-name selection stays sound.
|
|
24
|
+
*/
|
|
25
|
+
readonly exactNamesComplete: boolean;
|
|
26
|
+
};
|
|
17
27
|
}
|
|
18
28
|
|
|
19
29
|
/**
|