@mrclrchtr/supi-review 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/package.json +2 -2
- 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/node_modules/@mrclrchtr/supi-code-runtime/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-code-runtime/package.json +2 -2
- 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/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/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-code-runtime/package.json +2 -2
- 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/package.json +5 -5
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/package.json +3 -3
- package/src/config.ts +19 -1
- package/src/review.ts +7 -0
- package/src/tool/agent-review-tools.ts +8 -1
- package/src/tool/post-review-policy.ts +102 -0
package/README.md
CHANGED
|
@@ -104,15 +104,28 @@ Replays expire automatically after seven days. They are not included in normal r
|
|
|
104
104
|
|
|
105
105
|
Parent-facing text is stored as a bounded session artifact. Use `supi_review_output` with its returned opaque `artifactId` and offset to retrieve continuation pages.
|
|
106
106
|
|
|
107
|
+
## Post-review behavior
|
|
108
|
+
|
|
109
|
+
`review.postReviewPolicy` controls what the containing Agent does when a completed review returns findings on either `/supi-review` or `supi_review_run`:
|
|
110
|
+
|
|
111
|
+
- `ask` (default) — ask whether to verify, verify and fix, fix all or selected findings, or only report
|
|
112
|
+
- `verify` — independently confirm or refute findings, then ask what to fix
|
|
113
|
+
- `verify-and-fix` — verify every finding and fix those confirmed
|
|
114
|
+
- `fix` — fix every reported finding, re-verifying conflicts or stale live code first
|
|
115
|
+
- `report` — present the result without another action; `/supi-review` does not trigger an Agent turn
|
|
116
|
+
|
|
117
|
+
A direct user instruction about the current review's findings overrides this default when the Agent is already running. Reviews without findings do not trigger an extra command-originated turn.
|
|
118
|
+
|
|
107
119
|
## Models
|
|
108
120
|
|
|
109
121
|
`/supi-review` asks for the reviewer model. Agent-triggered runs use `review.agentModel`. Optional planning uses `review.plannerModel` at low thinking effort. Both default to the current session model.
|
|
110
122
|
|
|
111
|
-
Configure a single dependency setup command:
|
|
123
|
+
Configure post-review behavior and a single dependency setup command:
|
|
112
124
|
|
|
113
125
|
```json
|
|
114
126
|
{
|
|
115
127
|
"review": {
|
|
128
|
+
"postReviewPolicy": "ask",
|
|
116
129
|
"bootstrapCommand": "pnpm install --frozen-lockfile"
|
|
117
130
|
}
|
|
118
131
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-code-runtime",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "SuPi code-runtime — shared workspace context, capability contracts, and canonical types for the code-understanding stack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"!__tests__"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@mrclrchtr/supi-core": "4.
|
|
32
|
+
"@mrclrchtr/supi-core": "4.4.0"
|
|
33
33
|
},
|
|
34
34
|
"bundledDependencies": [
|
|
35
35
|
"@mrclrchtr/supi-core"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-code-runtime",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "SuPi code-runtime — shared workspace context, capability contracts, and canonical types for the code-understanding stack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"!__tests__"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@mrclrchtr/supi-core": "4.
|
|
32
|
+
"@mrclrchtr/supi-core": "4.4.0"
|
|
33
33
|
},
|
|
34
34
|
"bundledDependencies": [
|
|
35
35
|
"@mrclrchtr/supi-core"
|
package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-lsp",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "SuPi LSP runtime — Language Server Protocol integration library for pi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"vscode-jsonrpc": "^9.0.0",
|
|
38
38
|
"vscode-languageserver-protocol": "^3.17.5",
|
|
39
39
|
"vscode-languageserver-types": "^3.17.5",
|
|
40
|
-
"@mrclrchtr/supi-code-runtime": "4.
|
|
41
|
-
"@mrclrchtr/supi-core": "4.
|
|
40
|
+
"@mrclrchtr/supi-code-runtime": "4.4.0",
|
|
41
|
+
"@mrclrchtr/supi-core": "4.4.0"
|
|
42
42
|
},
|
|
43
43
|
"bundledDependencies": [
|
|
44
44
|
"@mrclrchtr/supi-code-runtime",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-code-runtime",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "SuPi code-runtime — shared workspace context, capability contracts, and canonical types for the code-understanding stack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"!__tests__"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@mrclrchtr/supi-core": "4.
|
|
32
|
+
"@mrclrchtr/supi-core": "4.4.0"
|
|
33
33
|
},
|
|
34
34
|
"bundledDependencies": [
|
|
35
35
|
"@mrclrchtr/supi-core"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-tree-sitter",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "SuPi Tree-sitter library — structural AST analysis for pi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"web-tree-sitter": "^0.26.8",
|
|
37
|
-
"@mrclrchtr/supi-
|
|
38
|
-
"@mrclrchtr/supi-
|
|
37
|
+
"@mrclrchtr/supi-core": "4.4.0",
|
|
38
|
+
"@mrclrchtr/supi-code-runtime": "4.4.0"
|
|
39
39
|
},
|
|
40
40
|
"bundledDependencies": [
|
|
41
41
|
"@mrclrchtr/supi-code-runtime",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-code-intelligence",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "SuPi Code Intelligence extension — workspace orientation, target resolution and inspection, relationship analysis, code-aware search, live health, and semantic refactoring for pi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"yaml": "^2.9.0",
|
|
37
|
-
"@mrclrchtr/supi-code-runtime": "4.
|
|
38
|
-
"@mrclrchtr/supi-lsp": "4.
|
|
39
|
-
"@mrclrchtr/supi-core": "4.
|
|
40
|
-
"@mrclrchtr/supi-tree-sitter": "4.
|
|
37
|
+
"@mrclrchtr/supi-code-runtime": "4.4.0",
|
|
38
|
+
"@mrclrchtr/supi-lsp": "4.4.0",
|
|
39
|
+
"@mrclrchtr/supi-core": "4.4.0",
|
|
40
|
+
"@mrclrchtr/supi-tree-sitter": "4.4.0"
|
|
41
41
|
},
|
|
42
42
|
"bundledDependencies": [
|
|
43
43
|
"@mrclrchtr/supi-code-runtime",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-review",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "SuPi Review extension — caller-defined Inspection-only review tasks for users and agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@mrclrchtr/supi-code-intelligence": "4.
|
|
35
|
-
"@mrclrchtr/supi-core": "4.
|
|
34
|
+
"@mrclrchtr/supi-code-intelligence": "4.4.0",
|
|
35
|
+
"@mrclrchtr/supi-core": "4.4.0"
|
|
36
36
|
},
|
|
37
37
|
"bundledDependencies": [
|
|
38
38
|
"@mrclrchtr/supi-code-intelligence",
|
package/src/config.ts
CHANGED
|
@@ -3,7 +3,12 @@ import { loadSupiConfig } from "@mrclrchtr/supi-core/config";
|
|
|
3
3
|
import { registerDeclarativeSettings } from "@mrclrchtr/supi-core/settings";
|
|
4
4
|
import { CURRENT_SESSION_REVIEW_MODEL } from "./model.ts";
|
|
5
5
|
|
|
6
|
-
/**
|
|
6
|
+
/** Supported containing-Agent behaviors after a review returns findings. */
|
|
7
|
+
export const POST_REVIEW_POLICIES = ["ask", "verify", "verify-and-fix", "fix", "report"] as const;
|
|
8
|
+
/** Configured default behavior after a review returns findings. */
|
|
9
|
+
export type PostReviewPolicy = (typeof POST_REVIEW_POLICIES)[number];
|
|
10
|
+
|
|
11
|
+
/** Persisted review settings. */
|
|
7
12
|
export interface ReviewConfig extends Record<string, unknown> {
|
|
8
13
|
/** Canonical reviewer model id, or `current` for the active session model. */
|
|
9
14
|
agentModel: string;
|
|
@@ -13,6 +18,8 @@ export interface ReviewConfig extends Record<string, unknown> {
|
|
|
13
18
|
auditEnabled: boolean;
|
|
14
19
|
/** Shell command run once before reviewers start. */
|
|
15
20
|
bootstrapCommand: string;
|
|
21
|
+
/** Default containing-Agent behavior after a review returns findings. */
|
|
22
|
+
postReviewPolicy: PostReviewPolicy;
|
|
16
23
|
}
|
|
17
24
|
|
|
18
25
|
/** Shared SuPi configuration section owned by this package. */
|
|
@@ -23,6 +30,7 @@ export const REVIEW_DEFAULTS: ReviewConfig = {
|
|
|
23
30
|
plannerModel: CURRENT_SESSION_REVIEW_MODEL,
|
|
24
31
|
auditEnabled: false,
|
|
25
32
|
bootstrapCommand: "",
|
|
33
|
+
postReviewPolicy: "ask",
|
|
26
34
|
};
|
|
27
35
|
|
|
28
36
|
/** Load merged and normalized review configuration. */
|
|
@@ -36,11 +44,14 @@ export function loadReviewConfig(cwd: string, homeDir?: string): ReviewConfig {
|
|
|
36
44
|
return fallback;
|
|
37
45
|
};
|
|
38
46
|
const readCommand = (value: unknown) => (typeof value === "string" ? value.trim() : "");
|
|
47
|
+
const readPostReviewPolicy = (value: unknown) =>
|
|
48
|
+
POST_REVIEW_POLICIES.find((policy) => policy === value) ?? REVIEW_DEFAULTS.postReviewPolicy;
|
|
39
49
|
return {
|
|
40
50
|
agentModel: readModel(raw.agentModel, REVIEW_DEFAULTS.agentModel),
|
|
41
51
|
plannerModel: readModel(raw.plannerModel, REVIEW_DEFAULTS.plannerModel),
|
|
42
52
|
auditEnabled: readBoolean(raw.auditEnabled, REVIEW_DEFAULTS.auditEnabled),
|
|
43
53
|
bootstrapCommand: readCommand(raw.bootstrapCommand),
|
|
54
|
+
postReviewPolicy: readPostReviewPolicy(raw.postReviewPolicy),
|
|
44
55
|
};
|
|
45
56
|
}
|
|
46
57
|
|
|
@@ -79,6 +90,13 @@ export function registerReviewSettings(pi: ExtensionAPI, homeDir?: string): void
|
|
|
79
90
|
description:
|
|
80
91
|
"Run once in the frozen Review Workspace before reviewers start. Empty lets reviewers bootstrap when needed.",
|
|
81
92
|
},
|
|
93
|
+
{
|
|
94
|
+
kind: "enum",
|
|
95
|
+
key: "postReviewPolicy",
|
|
96
|
+
label: "After review",
|
|
97
|
+
description: "Default Agent behavior when a completed review returns findings.",
|
|
98
|
+
values: [...POST_REVIEW_POLICIES],
|
|
99
|
+
},
|
|
82
100
|
{
|
|
83
101
|
kind: "boolean" as const,
|
|
84
102
|
key: "auditEnabled",
|
package/src/review.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { getSelectableReviewModels, resolveAgentReviewModel } from "./model.ts";
|
|
|
13
13
|
import { ReviewArtifactStore } from "./session/review-artifact-store.ts";
|
|
14
14
|
import { ReviewPlanStore } from "./session/review-plan-store.ts";
|
|
15
15
|
import { formatReviewBatch, registerAgentReviewTools } from "./tool/agent-review-tools.ts";
|
|
16
|
+
import { queuePostReviewTurn } from "./tool/post-review-policy.ts";
|
|
16
17
|
import { registerReviewAuditTool } from "./tool/review-audit-tool.ts";
|
|
17
18
|
import { createReviewOutput, registerReviewOutputTool } from "./tool/review-output-tool.ts";
|
|
18
19
|
import { prepareReview, runReview } from "./tool/review-workflow.ts";
|
|
@@ -299,6 +300,12 @@ async function runCommand(ctx: CommandContext, services: ReviewCommandServices):
|
|
|
299
300
|
display: true,
|
|
300
301
|
details: { ...outcome.details, output: output.reference, usage: outcome.usage },
|
|
301
302
|
});
|
|
303
|
+
queuePostReviewTurn(
|
|
304
|
+
pi,
|
|
305
|
+
loadReviewConfig(ctx.cwd).postReviewPolicy,
|
|
306
|
+
outcome.details,
|
|
307
|
+
output.reference,
|
|
308
|
+
);
|
|
302
309
|
}
|
|
303
310
|
|
|
304
311
|
export default function reviewExtension(pi: ExtensionAPI): void {
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
prepareReviewSchema,
|
|
19
19
|
runReviewSchema,
|
|
20
20
|
} from "./agent-review-schemas.ts";
|
|
21
|
+
import { withPostReviewInstruction } from "./post-review-policy.ts";
|
|
21
22
|
import { formatReviewBatch } from "./review-format.ts";
|
|
22
23
|
import { createReviewOutput } from "./review-output-tool.ts";
|
|
23
24
|
|
|
@@ -198,8 +199,14 @@ function makeRunReviewExecute(
|
|
|
198
199
|
});
|
|
199
200
|
if (outcome.kind !== "completed") throw new Error(outcome.reason);
|
|
200
201
|
const output = createReviewOutput(artifactStore, formatReviewBatch(outcome.details));
|
|
202
|
+
const text = withPostReviewInstruction(
|
|
203
|
+
output.text,
|
|
204
|
+
config.postReviewPolicy,
|
|
205
|
+
outcome.details,
|
|
206
|
+
output.reference,
|
|
207
|
+
);
|
|
201
208
|
return {
|
|
202
|
-
content: [{ type: "text", text
|
|
209
|
+
content: [{ type: "text", text }],
|
|
203
210
|
details: { ...outcome.details, output: output.reference },
|
|
204
211
|
...(outcome.usage ? { usage: outcome.usage } : {}),
|
|
205
212
|
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { wrapExtensionContext } from "@mrclrchtr/supi-core/context";
|
|
3
|
+
import type { PostReviewPolicy } from "../config.ts";
|
|
4
|
+
import type { ReviewBatchDetails, ReviewOutputReference } from "../types.ts";
|
|
5
|
+
|
|
6
|
+
function findingCount(details: ReviewBatchDetails): number {
|
|
7
|
+
return details.results.reduce(
|
|
8
|
+
(total, result) => total + (result.status === "completed" ? result.findings.length : 0),
|
|
9
|
+
0,
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function policyInstructions(policy: PostReviewPolicy): string[] {
|
|
14
|
+
switch (policy) {
|
|
15
|
+
case "ask":
|
|
16
|
+
return [
|
|
17
|
+
"Do not inspect or edit yet. Ask the user what to do, using ask_user when available and a plain question otherwise.",
|
|
18
|
+
"Offer: Verify findings, Verify + fix confirmed findings, Fix all, Fix selected, Report only. If Fix selected is chosen, ask which findings in a follow-up selection.",
|
|
19
|
+
];
|
|
20
|
+
case "verify":
|
|
21
|
+
return [
|
|
22
|
+
"Independently confirm or refute every finding against the reviewed target. Do not edit yet.",
|
|
23
|
+
"Present the verification, then ask whether to fix all confirmed findings, fix selected confirmed findings, or report only.",
|
|
24
|
+
];
|
|
25
|
+
case "verify-and-fix":
|
|
26
|
+
return [
|
|
27
|
+
"Independently confirm or refute every finding, then fix every confirmed finding that still applies in the live checkout.",
|
|
28
|
+
];
|
|
29
|
+
case "fix":
|
|
30
|
+
return ["Fix every reported finding, including non-blocking and low-confidence findings."];
|
|
31
|
+
case "report":
|
|
32
|
+
return [
|
|
33
|
+
"Report the review result and stop. Do not verify findings, edit code, or ask a post-review question.",
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Build the model-facing containing-Agent protocol for a review that returned findings. */
|
|
39
|
+
export function buildPostReviewInstruction(
|
|
40
|
+
policy: PostReviewPolicy,
|
|
41
|
+
details: ReviewBatchDetails,
|
|
42
|
+
output: ReviewOutputReference,
|
|
43
|
+
): string | undefined {
|
|
44
|
+
const findings = findingCount(details);
|
|
45
|
+
if (findings === 0) return undefined;
|
|
46
|
+
|
|
47
|
+
const lines = [
|
|
48
|
+
`The completed review reported ${findings} finding${findings === 1 ? "" : "s"}. The configured Post-Review Policy is \`${policy}\`.`,
|
|
49
|
+
"A direct user instruction specifically about what to do with this review's findings overrides the configured default. Generic authorization to edit code and your own prior plan do not.",
|
|
50
|
+
];
|
|
51
|
+
if (output.nextOffset !== undefined) {
|
|
52
|
+
lines.push(
|
|
53
|
+
`Before responding, retrieve every remaining output page with supi_review_output, starting with ${JSON.stringify({ artifactId: output.artifactId, offset: output.nextOffset })}.`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
if (details.results.some((result) => result.status !== "completed")) {
|
|
57
|
+
lines.push(
|
|
58
|
+
"Some Review Tasks did not complete. Act on available findings from completed tasks and report the incomplete tasks.",
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
lines.push(
|
|
62
|
+
...policyInstructions(policy),
|
|
63
|
+
"Whenever this flow results in fixes, reconcile duplicate findings and verify incompatible ones. If the live checkout differs from the reviewed after-state, re-verify affected findings against live code and fix those that still apply.",
|
|
64
|
+
"After non-trivial edits, run an existing targeted check when available; report what ran or why it was skipped.",
|
|
65
|
+
);
|
|
66
|
+
return wrapExtensionContext("supi-review", lines.join("\n"), {
|
|
67
|
+
kind: "post-review-policy",
|
|
68
|
+
policy,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Append the configured protocol to an agent-facing review tool result. */
|
|
73
|
+
export function withPostReviewInstruction(
|
|
74
|
+
text: string,
|
|
75
|
+
policy: PostReviewPolicy,
|
|
76
|
+
details: ReviewBatchDetails,
|
|
77
|
+
output: ReviewOutputReference,
|
|
78
|
+
): string {
|
|
79
|
+
const instruction = buildPostReviewInstruction(policy, details, output);
|
|
80
|
+
return instruction ? `${text}\n\n${instruction}` : text;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Queue the post-review Agent turn used by the interactive command surface. */
|
|
84
|
+
export function queuePostReviewTurn(
|
|
85
|
+
pi: ExtensionAPI,
|
|
86
|
+
policy: PostReviewPolicy,
|
|
87
|
+
details: ReviewBatchDetails,
|
|
88
|
+
output: ReviewOutputReference,
|
|
89
|
+
): void {
|
|
90
|
+
if (policy === "report") return;
|
|
91
|
+
const content = buildPostReviewInstruction(policy, details, output);
|
|
92
|
+
if (!content) return;
|
|
93
|
+
pi.sendMessage(
|
|
94
|
+
{
|
|
95
|
+
customType: "supi-review-followup",
|
|
96
|
+
content,
|
|
97
|
+
display: false,
|
|
98
|
+
details: { policy, output },
|
|
99
|
+
},
|
|
100
|
+
{ deliverAs: "followUp", triggerTurn: true },
|
|
101
|
+
);
|
|
102
|
+
}
|