@mrclrchtr/supi-review 11.3.0 → 12.0.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 +9 -0
- package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-agent-runtime/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-agent-runtime/src/debug-retrospective.ts +9 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/CHANGELOG.md +33 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/README.md +15 -9
- 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/api.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/declaration-level.ts +34 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +64 -28
- 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-lsp/README.md +22 -17
- 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/api.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/declaration-level.ts +34 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +64 -28
- 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/semver/classes/range.js +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/constants.js +30 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/package.json +1 -1
- 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/api.ts +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-capabilities.ts +13 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +25 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-document-sync.ts +7 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-edit-capture.ts +258 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +64 -11
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/capabilities.ts +8 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/operation-support.ts +48 -79
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/tsconfig-scope.ts +10 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-typescript-coverage.ts +118 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +67 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/typescript-file-local.ts +87 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/provider/lsp-refactor-provider.ts +21 -35
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/provider/refactor-command-capture.ts +139 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/provider/refactor-planning.ts +202 -47
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/provider/semantic-symbol-mapper.ts +22 -17
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/route-boundary.ts +26 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registry.ts +106 -16
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-rename.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/workspace-lsp-runtime.ts +22 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/README.md +1 -1
- 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/api.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/declaration-level.ts +34 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +64 -28
- 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/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm.json +5 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm.json +5 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/coordinates.ts +16 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/session/structural-worker-client.ts +3 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/syntax-errors.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/call-range.ts +94 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/call-sites.ts +26 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/callees.ts +6 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/exports.ts +13 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/worker/runtime.ts +1 -9
- package/node_modules/@mrclrchtr/supi-code-intelligence/package.json +5 -5
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/server-status.ts +41 -12
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/helpers.ts +0 -7
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/relations/implementations.ts +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/relations/references.ts +5 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/anchored-structural.ts +4 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/file-merge.ts +162 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/file-outline-omissions.ts +146 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/file-refinement.ts +7 -7
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/file.ts +44 -156
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/symbol.ts +5 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/types.ts +32 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/api.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/app/app.ts +9 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/find-types.ts +8 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/find-workflow.ts +11 -16
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/graph/collect.ts +2 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/graph-types.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/graph-workflow.ts +5 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/input/health-refactor.ts +48 -34
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/input/workflows.ts +45 -46
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/inspect/file-point.ts +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/inspect-types.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/inspect-workflow.ts +3 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/workspace-context.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation-workflow.ts +6 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/refactor-file-actions.ts +122 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/refactor-plan-pipeline.ts +152 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/refactor-plans.ts +18 -15
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/refactor-types.ts +24 -12
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/refactor-workflow.ts +70 -244
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/session.ts +87 -12
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/target-workflow.ts +23 -21
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/execute.ts +6 -7
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/spec.ts +9 -16
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/tui.ts +12 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/section.ts +4 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/spec.ts +6 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/spec.ts +6 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/structured-schema.ts +4 -4
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/structured.ts +15 -17
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/execute.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/markdown.ts +33 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/result.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/spec.ts +14 -6
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/structured.ts +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/tui.ts +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/directory-navigation.ts +20 -31
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/spec.ts +8 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-output.ts +40 -13
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-sections.ts +45 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_apply/result.ts +2 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_apply/spec.ts +7 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/execute.ts +0 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/result.ts +23 -13
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/spec.ts +8 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/structured.ts +59 -12
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/tui.ts +14 -17
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/guidance.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/markdown.ts +121 -34
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/result.ts +18 -15
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/spec.ts +6 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/structured.ts +43 -10
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/namespace.ts +14 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/refactor-markdown.ts +55 -15
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/register.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/model-budget.ts +2 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/refactor-preview.ts +118 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/refactor-unavailable.ts +16 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/refactor.ts +8 -2
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/types.ts +13 -10
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/schemas.ts +63 -20
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/specs.ts +3 -0
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-overlay.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/tui/common.ts +10 -10
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/package.json +4 -4
- package/src/tool/namespace.ts +11 -0
- package/src/tool/review_audit/register.ts +2 -0
- package/src/tool/review_audit/spec.ts +7 -0
- package/src/tool/review_output/register.ts +2 -0
- package/src/tool/review_output/spec.ts +6 -0
- package/src/tool/review_run/child-tools.ts +15 -0
- package/src/tool/review_run/spec.ts +8 -0
|
@@ -5,6 +5,7 @@ import { toDisplayPath } from "../../analysis/search/paths.ts";
|
|
|
5
5
|
import type { RefactorPlan } from "../../session/refactor-plans.ts";
|
|
6
6
|
import { assembledNextQueries, assembleToolResult, type ToolResultAssembly } from "./assembly.ts";
|
|
7
7
|
import { createToolDisplaySection } from "./display.ts";
|
|
8
|
+
import { previewEditCount } from "./refactor-preview.ts";
|
|
8
9
|
import type { SearchDetails, ToolDisplaySection } from "./types.ts";
|
|
9
10
|
|
|
10
11
|
export interface RefactorPlanAssemblyData {
|
|
@@ -45,7 +46,7 @@ export function assembleRefactorPlanDetails(
|
|
|
45
46
|
const edits = createEvidenceList({
|
|
46
47
|
key: "refactor.edits",
|
|
47
48
|
items: [...plan.edits.edits],
|
|
48
|
-
maxResults,
|
|
49
|
+
maxResults: previewEditCount(plan.edits.edits, maxResults),
|
|
49
50
|
});
|
|
50
51
|
const evidenceSource = plan.evidenceSource ?? "semantic";
|
|
51
52
|
const provenance = [
|
|
@@ -67,7 +68,12 @@ export function assembleRefactorPlanDetails(
|
|
|
67
68
|
},
|
|
68
69
|
],
|
|
69
70
|
evidenceLists: [edits.metadata],
|
|
70
|
-
nextQueries: [
|
|
71
|
+
nextQueries: [
|
|
72
|
+
`Use code_refactor_apply with planId: "${plan.id}" to apply this refactor`,
|
|
73
|
+
...(plan.operation === "code_action"
|
|
74
|
+
? ["After applying, use rename_symbol to rename any server-generated names"]
|
|
75
|
+
: []),
|
|
76
|
+
],
|
|
71
77
|
candidateCount: edits.metadata.totalCount ?? edits.metadata.shownCount,
|
|
72
78
|
confidence: evidenceSource,
|
|
73
79
|
provenance,
|
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
StructuredMatch,
|
|
10
10
|
StructuredScanSummary,
|
|
11
11
|
} from "../../analysis/search/pattern.ts";
|
|
12
|
+
import type { FileOutlineNotListed } from "../../analysis/target/types.ts";
|
|
12
13
|
import type {
|
|
13
14
|
HealthDiagnosticObservation,
|
|
14
15
|
HealthRefreshState,
|
|
@@ -123,20 +124,22 @@ export type { DisambiguationCandidateData as DisambiguationCandidate } from "../
|
|
|
123
124
|
export interface ResolveDetails {
|
|
124
125
|
resultKind:
|
|
125
126
|
| "resolved"
|
|
126
|
-
| "
|
|
127
|
+
| "file-outline"
|
|
127
128
|
| "disambiguation"
|
|
128
129
|
| "kind-mismatch"
|
|
129
130
|
| "invalid-input"
|
|
130
131
|
| "unavailable";
|
|
131
|
-
/** Workspace-relative source file
|
|
132
|
-
|
|
133
|
-
/** Providers that successfully enumerated
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
|
|
137
|
-
/** Provider recovery that makes this
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
/** Workspace-relative source file of a File outline. */
|
|
133
|
+
outlineFile?: string;
|
|
134
|
+
/** Providers that successfully enumerated the File outline's file. */
|
|
135
|
+
outlineDiscoveryProvenance?: readonly TargetProviderProvenance[];
|
|
136
|
+
/** Outline declarations whose provider reported no enclosing declaration. */
|
|
137
|
+
outlineUnknownLevelCount?: number;
|
|
138
|
+
/** Provider recovery that makes this File outline incomplete. */
|
|
139
|
+
outlinePartialReason?: string | null;
|
|
140
|
+
outlineErrorRanges?: readonly SourceRange[];
|
|
141
|
+
/** Discovered declarations left out of the File outline, with exact counts. */
|
|
142
|
+
outlineNotListed?: FileOutlineNotListed;
|
|
140
143
|
/** Strict provider kind that produced a near-match result. */
|
|
141
144
|
requestedKind?: TargetSymbolKind;
|
|
142
145
|
confidence: ConfidenceMode;
|
|
@@ -4,11 +4,12 @@ import {
|
|
|
4
4
|
type PublicRefactorOperationName,
|
|
5
5
|
} from "../session/refactor-types.ts";
|
|
6
6
|
import { TARGET_SYMBOL_KINDS } from "../session/target-input.ts";
|
|
7
|
+
import { CODE_FIND_AST_KINDS } from "./code_find/ast-kinds.ts";
|
|
7
8
|
|
|
8
9
|
export const ScopeParam = Type.String({
|
|
9
10
|
description: "Workspace-relative file or directory scope.",
|
|
10
11
|
});
|
|
11
|
-
export const
|
|
12
|
+
export const FindScopesParam = Type.Array(
|
|
12
13
|
Type.String({ description: "Workspace-relative search scope." }),
|
|
13
14
|
{
|
|
14
15
|
description: "One or more workspace-relative search scopes.",
|
|
@@ -20,11 +21,6 @@ export const QueryParam = Type.String({
|
|
|
20
21
|
description: "Human or code reference to resolve or search for.",
|
|
21
22
|
minLength: 1,
|
|
22
23
|
});
|
|
23
|
-
export const FindQueryParam = Type.String({
|
|
24
|
-
description:
|
|
25
|
-
"AST mode: name or import module-specifier substring. Semantic mode: workspace-symbol query.",
|
|
26
|
-
minLength: 1,
|
|
27
|
-
});
|
|
28
24
|
const LineParam = Type.Integer({ description: "1-based line.", minimum: 1 });
|
|
29
25
|
const CharacterParam = Type.Integer({
|
|
30
26
|
description: "1-based UTF-16 column.",
|
|
@@ -74,6 +70,29 @@ function exactOneSelector(properties: Record<string, TSchema>, description: stri
|
|
|
74
70
|
});
|
|
75
71
|
}
|
|
76
72
|
|
|
73
|
+
export const FindSearchParam = exactOneSelector(
|
|
74
|
+
{
|
|
75
|
+
ast: Type.Object(
|
|
76
|
+
{
|
|
77
|
+
kind: Type.Enum(CODE_FIND_AST_KINDS, {
|
|
78
|
+
type: "string",
|
|
79
|
+
description: "AST structure kind.",
|
|
80
|
+
}),
|
|
81
|
+
query: Type.String({
|
|
82
|
+
description: "Name or import module-specifier substring.",
|
|
83
|
+
minLength: 1,
|
|
84
|
+
}),
|
|
85
|
+
},
|
|
86
|
+
{ additionalProperties: false, description: "Structural search over syntax trees." },
|
|
87
|
+
),
|
|
88
|
+
semantic: Type.Object(
|
|
89
|
+
{ query: Type.String({ description: "Workspace-symbol query.", minLength: 1 }) },
|
|
90
|
+
{ additionalProperties: false, description: "Language-server workspace-symbol search." },
|
|
91
|
+
),
|
|
92
|
+
},
|
|
93
|
+
"Exactly one search mode.",
|
|
94
|
+
);
|
|
95
|
+
|
|
77
96
|
export const ResolveTargetParam = exactOneSelector(
|
|
78
97
|
{
|
|
79
98
|
anchor: SourcePointParam,
|
|
@@ -112,7 +131,7 @@ export const OrientationFocusParam = exactOneSelector(
|
|
|
112
131
|
"Exactly one Orientation focus.",
|
|
113
132
|
);
|
|
114
133
|
|
|
115
|
-
|
|
134
|
+
const RefactorTargetParam = exactOneSelector(
|
|
116
135
|
{
|
|
117
136
|
handle: Type.String({ description: "Target handle from a previous code tool result." }),
|
|
118
137
|
anchor: SourcePointParam,
|
|
@@ -131,28 +150,52 @@ const RangeParam = Type.Object(
|
|
|
131
150
|
{ additionalProperties: false },
|
|
132
151
|
),
|
|
133
152
|
},
|
|
134
|
-
{
|
|
153
|
+
{
|
|
154
|
+
additionalProperties: false,
|
|
155
|
+
description: "Source range; end is exclusive. Equal start and end mark a cursor position.",
|
|
156
|
+
},
|
|
135
157
|
);
|
|
136
158
|
|
|
137
159
|
const NewNameParam = Type.String({ description: "New symbol name.", minLength: 1 });
|
|
160
|
+
const ActionTitleParam = Type.String({
|
|
161
|
+
description:
|
|
162
|
+
"Exact action title from a previous ambiguous result; selects one of several matching actions.",
|
|
163
|
+
minLength: 1,
|
|
164
|
+
});
|
|
138
165
|
|
|
139
166
|
const RefactorOperationProperties = {
|
|
140
|
-
rename_symbol: Type.Object(
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
{ additionalProperties: false },
|
|
144
|
-
),
|
|
145
|
-
extract_variable: Type.Object(
|
|
146
|
-
{ newName: NewNameParam, range: RangeParam },
|
|
147
|
-
{ additionalProperties: false },
|
|
167
|
+
rename_symbol: Type.Object(
|
|
168
|
+
{ target: RefactorTargetParam, newName: NewNameParam },
|
|
169
|
+
{ additionalProperties: false, description: "Rename one symbol across the workspace." },
|
|
148
170
|
),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
171
|
+
code_action: Type.Object(
|
|
172
|
+
{
|
|
173
|
+
file: FileParam,
|
|
174
|
+
range: RangeParam,
|
|
175
|
+
kind: Type.String({
|
|
176
|
+
description:
|
|
177
|
+
'CodeActionKind prefix under "refactor", such as "refactor.extract" or "refactor.inline". Sub-kinds match.',
|
|
178
|
+
pattern: "^refactor(\\..+)?$",
|
|
179
|
+
}),
|
|
180
|
+
title: Type.Optional(ActionTitleParam),
|
|
181
|
+
},
|
|
152
182
|
{
|
|
153
183
|
additionalProperties: false,
|
|
154
|
-
description:
|
|
184
|
+
description:
|
|
185
|
+
"Server refactor action for one range. Generated names (e.g. extracted variables) appear in the preview; rename them afterwards with rename_symbol.",
|
|
186
|
+
},
|
|
187
|
+
),
|
|
188
|
+
source_action: Type.Object(
|
|
189
|
+
{
|
|
190
|
+
file: FileParam,
|
|
191
|
+
kind: Type.String({
|
|
192
|
+
description:
|
|
193
|
+
'CodeActionKind prefix under "source", such as "source.organizeImports" or "source.fixAll". Sub-kinds match.',
|
|
194
|
+
pattern: "^source(\\..+)?$",
|
|
195
|
+
}),
|
|
196
|
+
title: Type.Optional(ActionTitleParam),
|
|
155
197
|
},
|
|
198
|
+
{ additionalProperties: false, description: "Server source action for one whole file." },
|
|
156
199
|
),
|
|
157
200
|
} satisfies Record<PublicRefactorOperationName, TSchema>;
|
|
158
201
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ToolAnnotations } from "@earendil-works/pi-coding-agent";
|
|
1
2
|
import type { Component } from "@earendil-works/pi-tui";
|
|
2
3
|
import type { TSchema } from "typebox";
|
|
3
4
|
import type {
|
|
@@ -27,6 +28,8 @@ export type CodeToolRendererFn = (...args: any[]) => Component;
|
|
|
27
28
|
export interface CodeIntelligenceToolDefinitionSpec {
|
|
28
29
|
name: CodeIntelligenceToolName;
|
|
29
30
|
label: string;
|
|
31
|
+
/** Audited behavior hints for permission extensions (MCP tool-annotation semantics). */
|
|
32
|
+
annotations: ToolAnnotations;
|
|
30
33
|
parameters: TSchema;
|
|
31
34
|
/** Machine-readable success and recoverable-input outcomes for programmatic callers. */
|
|
32
35
|
outputSchema?: TSchema;
|
|
@@ -618,7 +618,7 @@ export class CiStatusDialog {
|
|
|
618
618
|
text(
|
|
619
619
|
t.fg(
|
|
620
620
|
"dim",
|
|
621
|
-
` ${operation}: server ${support.server}; SuPi ${support.supi}${support.reason ? ` — ${support.reason}` : ""}`,
|
|
621
|
+
` ${operation}: server ${support.server}; SuPi ${support.supi}${support.kinds?.length ? `; kinds ${support.kinds.join(", ")}` : ""}${support.anyKind ? "; may return any kind" : ""}${support.reason ? ` — ${support.reason}` : ""}`,
|
|
622
622
|
),
|
|
623
623
|
);
|
|
624
624
|
}
|
|
@@ -310,13 +310,13 @@ export function buildSimpleCompact(data: Record<string, unknown> | undefined, th
|
|
|
310
310
|
const confidence = typeof data.confidence === "string" ? data.confidence : "";
|
|
311
311
|
const dot = theme.fg("dim", "·");
|
|
312
312
|
const segments = badges.map((badge) => theme.fg("success", theme.bold(badge)));
|
|
313
|
-
const
|
|
313
|
+
const unknownLevelCount = data.outlineUnknownLevelCount;
|
|
314
314
|
if (
|
|
315
|
-
typeof
|
|
316
|
-
Number.isInteger(
|
|
317
|
-
|
|
315
|
+
typeof unknownLevelCount === "number" &&
|
|
316
|
+
Number.isInteger(unknownLevelCount) &&
|
|
317
|
+
unknownLevelCount > 0
|
|
318
318
|
) {
|
|
319
|
-
segments.push(theme.fg("warning", `${
|
|
319
|
+
segments.push(theme.fg("warning", `${unknownLevelCount} position unknown`));
|
|
320
320
|
}
|
|
321
321
|
if (confidence) {
|
|
322
322
|
segments.push(`${theme.fg("dim", "confidence")} ${theme.fg("muted", confidence)}`);
|
|
@@ -349,13 +349,13 @@ function structuredDetailLines(data: Record<string, unknown>): string[] {
|
|
|
349
349
|
|
|
350
350
|
lines.push(...inspectSectionStatusLines(data.sections));
|
|
351
351
|
|
|
352
|
-
const
|
|
352
|
+
const unknownLevelCount = data.outlineUnknownLevelCount;
|
|
353
353
|
if (
|
|
354
|
-
typeof
|
|
355
|
-
Number.isInteger(
|
|
356
|
-
|
|
354
|
+
typeof unknownLevelCount === "number" &&
|
|
355
|
+
Number.isInteger(unknownLevelCount) &&
|
|
356
|
+
unknownLevelCount > 0
|
|
357
357
|
) {
|
|
358
|
-
lines.push(`
|
|
358
|
+
lines.push(`position unknown: ${unknownLevelCount}`);
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
const checkNext = data.checkNext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-review",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "Parallel inspection-only reviews of exact Git targets",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"README.md"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@mrclrchtr/supi-agent-runtime": "
|
|
36
|
-
"@mrclrchtr/supi-code-intelligence": "
|
|
37
|
-
"@mrclrchtr/supi-core": "
|
|
35
|
+
"@mrclrchtr/supi-agent-runtime": "12.0.0",
|
|
36
|
+
"@mrclrchtr/supi-code-intelligence": "12.0.0",
|
|
37
|
+
"@mrclrchtr/supi-core": "12.0.0"
|
|
38
38
|
},
|
|
39
39
|
"bundledDependencies": [
|
|
40
40
|
"@mrclrchtr/supi-agent-runtime",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ToolNamespace } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
|
|
3
|
+
/** Codemode namespace shared by the script-callable Review tools. */
|
|
4
|
+
export const REVIEW_TOOL_NAMESPACE: ToolNamespace = {
|
|
5
|
+
name: "review",
|
|
6
|
+
description: "Read Review reports and reviewer replays produced by review_run or /supi-review.",
|
|
7
|
+
instructions: [
|
|
8
|
+
"review_output reads a report artifact by the artifactId that review_run or /supi-review returned.",
|
|
9
|
+
"review_audit lists local reviewer replays; start with the Replay Outline before message or raw views.",
|
|
10
|
+
].join("\n"),
|
|
11
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import type { LocalReviewAuditStore } from "../../audit/local-review-audit-store.ts";
|
|
3
|
+
import { REVIEW_TOOL_NAMESPACE } from "../namespace.ts";
|
|
3
4
|
import { executeReviewAudit } from "./execute.ts";
|
|
4
5
|
import { promptGuidelines, promptSnippet, toolDescription } from "./guidance.ts";
|
|
5
6
|
import { renderAuditCall, renderAuditResult } from "./render.ts";
|
|
@@ -9,6 +10,7 @@ import { reviewAuditSpec } from "./spec.ts";
|
|
|
9
10
|
export function registerReviewAuditTool(pi: ExtensionAPI, store: LocalReviewAuditStore): void {
|
|
10
11
|
pi.registerTool({
|
|
11
12
|
...reviewAuditSpec,
|
|
13
|
+
namespace: REVIEW_TOOL_NAMESPACE,
|
|
12
14
|
description: toolDescription,
|
|
13
15
|
promptSnippet,
|
|
14
16
|
promptGuidelines: [...promptGuidelines],
|
|
@@ -41,6 +41,13 @@ const reviewAuditParameters = Type.Object(
|
|
|
41
41
|
export const reviewAuditSpec = {
|
|
42
42
|
name: REVIEW_AUDIT_TOOL_NAME,
|
|
43
43
|
label: REVIEW_AUDIT_TOOL_LABEL,
|
|
44
|
+
// Reading prunes only expired SuPi-owned replay files that no call can return.
|
|
45
|
+
annotations: {
|
|
46
|
+
readOnlyHint: true,
|
|
47
|
+
destructiveHint: false,
|
|
48
|
+
idempotentHint: true,
|
|
49
|
+
openWorldHint: false,
|
|
50
|
+
},
|
|
44
51
|
parameters: reviewAuditParameters,
|
|
45
52
|
outputSchema: reviewAuditOutputSchema,
|
|
46
53
|
} as const;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import type { ReviewArtifactStore } from "../../session/review-artifact-store.ts";
|
|
3
|
+
import { REVIEW_TOOL_NAMESPACE } from "../namespace.ts";
|
|
3
4
|
import { executeReviewOutput } from "./execute.ts";
|
|
4
5
|
import { promptGuidelines, promptSnippet, toolDescription } from "./guidance.ts";
|
|
5
6
|
import { renderOutputCall, renderOutputResult } from "./render.ts";
|
|
@@ -9,6 +10,7 @@ import { reviewOutputSpec } from "./spec.ts";
|
|
|
9
10
|
export function registerReviewOutputTool(pi: ExtensionAPI, store: ReviewArtifactStore): void {
|
|
10
11
|
pi.registerTool({
|
|
11
12
|
...reviewOutputSpec,
|
|
13
|
+
namespace: REVIEW_TOOL_NAMESPACE,
|
|
12
14
|
description: toolDescription,
|
|
13
15
|
promptSnippet,
|
|
14
16
|
promptGuidelines: [...promptGuidelines],
|
|
@@ -25,6 +25,12 @@ const reviewOutputParameters = Type.Object(
|
|
|
25
25
|
export const reviewOutputSpec = {
|
|
26
26
|
name: REVIEW_OUTPUT_TOOL_NAME,
|
|
27
27
|
label: REVIEW_OUTPUT_TOOL_LABEL,
|
|
28
|
+
annotations: {
|
|
29
|
+
readOnlyHint: true,
|
|
30
|
+
destructiveHint: false,
|
|
31
|
+
idempotentHint: true,
|
|
32
|
+
openWorldHint: false,
|
|
33
|
+
},
|
|
28
34
|
parameters: reviewOutputParameters,
|
|
29
35
|
outputSchema: Type.Object(
|
|
30
36
|
{
|
|
@@ -17,6 +17,18 @@ const declineReviewRecoverySchema = Type.Object(
|
|
|
17
17
|
{ additionalProperties: false },
|
|
18
18
|
);
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Hints shared by the child-only tools: each records one in-memory result and ends its child
|
|
22
|
+
* session without touching files or the network. A repeated call overwrites or conflicts with
|
|
23
|
+
* the first, so none is idempotent.
|
|
24
|
+
*/
|
|
25
|
+
const CHILD_TOOL_ANNOTATIONS = {
|
|
26
|
+
readOnlyHint: false,
|
|
27
|
+
destructiveHint: false,
|
|
28
|
+
idempotentHint: false,
|
|
29
|
+
openWorldHint: false,
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
20
32
|
/** Canonical metadata for the child-session tools owned by the review_run workflow. */
|
|
21
33
|
export const REVIEW_CHILD_TOOL_SPECS = {
|
|
22
34
|
submitReview: {
|
|
@@ -25,6 +37,7 @@ export const REVIEW_CHILD_TOOL_SPECS = {
|
|
|
25
37
|
description:
|
|
26
38
|
"Submit the one final structured result for this review task. A successful call ends the Reviewer Session.",
|
|
27
39
|
exposure: "model-only",
|
|
40
|
+
annotations: CHILD_TOOL_ANNOTATIONS,
|
|
28
41
|
parameters: reviewSubmissionSchema,
|
|
29
42
|
},
|
|
30
43
|
declineReviewRecovery: {
|
|
@@ -33,6 +46,7 @@ export const REVIEW_CHILD_TOOL_SPECS = {
|
|
|
33
46
|
description:
|
|
34
47
|
"End Submission Recovery without a Task Verdict when retained history cannot support a valid review submission.",
|
|
35
48
|
exposure: "model-only",
|
|
49
|
+
annotations: CHILD_TOOL_ANNOTATIONS,
|
|
36
50
|
parameters: declineReviewRecoverySchema,
|
|
37
51
|
},
|
|
38
52
|
submitPlannerDraft: {
|
|
@@ -40,6 +54,7 @@ export const REVIEW_CHILD_TOOL_SPECS = {
|
|
|
40
54
|
label: "Submit Planner Draft",
|
|
41
55
|
description:
|
|
42
56
|
"Submit the one advisory Planner Draft. A successful call ends the Planner Session.",
|
|
57
|
+
annotations: CHILD_TOOL_ANNOTATIONS,
|
|
43
58
|
parameters: plannerDraftSchema,
|
|
44
59
|
},
|
|
45
60
|
} as const;
|
|
@@ -7,6 +7,14 @@ export const REVIEW_RUN_TOOL_LABEL = "Run Review";
|
|
|
7
7
|
export const reviewRunSpec = {
|
|
8
8
|
name: REVIEW_RUN_TOOL_NAME,
|
|
9
9
|
label: REVIEW_RUN_TOOL_LABEL,
|
|
10
|
+
// Starts model-backed Reviewer Sessions (optionally with Web tools) and may store replays.
|
|
11
|
+
// Reviewers get bash; inspection-only is a protocol, not access control.
|
|
12
|
+
annotations: {
|
|
13
|
+
readOnlyHint: false,
|
|
14
|
+
destructiveHint: true,
|
|
15
|
+
idempotentHint: false,
|
|
16
|
+
openWorldHint: true,
|
|
17
|
+
},
|
|
10
18
|
parameters: runReviewSchema,
|
|
11
19
|
// Start Reviews only through direct model calls.
|
|
12
20
|
exposure: "model-only",
|