@mrclrchtr/supi-review 1.8.0 → 1.9.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.
Files changed (3) hide show
  1. package/README.md +10 -2
  2. package/package.json +3 -2
  3. package/src/review.ts +42 -0
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ ![SuPi](assets/logo.png)
2
+
1
3
  # @mrclrchtr/supi-review
2
4
 
3
5
  Adds an interactive `/supi-review` command to the [pi coding agent](https://github.com/earendil-works/pi) for session-aware code review.
@@ -16,8 +18,6 @@ For local development:
16
18
  pi install ./packages/supi-review
17
19
  ```
18
20
 
19
- After editing the source, run `/reload`.
20
-
21
21
  ## What you get
22
22
 
23
23
  After install, pi gets one command:
@@ -29,6 +29,14 @@ The reviewer runs in managed child agent sessions:
29
29
  - a **brief synthesizer** creates a structured review brief from the active session branch
30
30
  - a **read-only reviewer** inspects the selected snapshot (without receiving bulk inline diffs) and submits structured findings
31
31
 
32
+ ![Review target selection](https://raw.githubusercontent.com/mrclrchtr/supi/main/screenshots/supi-review-1.png)
33
+
34
+ ![Review brief preview](https://raw.githubusercontent.com/mrclrchtr/supi/main/screenshots/supi-review-2.png)
35
+
36
+ ![Review result](https://raw.githubusercontent.com/mrclrchtr/supi/main/screenshots/supi-review-3.png)
37
+
38
+ ![Review progress](https://raw.githubusercontent.com/mrclrchtr/supi/main/screenshots/supi-review-4.png)
39
+
32
40
  ## Review flow
33
41
 
34
42
  `/supi-review` walks you through:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-review",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "SuPi Review extension — structured code review via /supi-review command",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,7 +42,8 @@
42
42
  "pi": {
43
43
  "extensions": [
44
44
  "./src/extension.ts"
45
- ]
45
+ ],
46
+ "image": "https://raw.githubusercontent.com/mrclrchtr/supi/main/packages/supi-review/assets/logo.png"
46
47
  },
47
48
  "main": "src/api.ts",
48
49
  "exports": {
package/src/review.ts CHANGED
@@ -65,6 +65,8 @@ async function handleInteractive(ctx: CommandContext, pi: ExtensionAPI): Promise
65
65
  }),
66
66
  });
67
67
 
68
+ notifyBriefDone(pi, synthesis, snapshot, model.canonicalId);
69
+
68
70
  if (synthesis.kind !== "success") {
69
71
  notifySynthesisFailure(synthesis, ctx);
70
72
  return;
@@ -82,6 +84,8 @@ async function handleInteractive(ctx: CommandContext, pi: ExtensionAPI): Promise
82
84
  if (!approved) return;
83
85
 
84
86
  const result = await runReviewWithLoader(plan, ctx, pi);
87
+
88
+ notifyReviewDone(pi, result);
85
89
  injectReviewMessage(pi, result);
86
90
  }
87
91
 
@@ -223,6 +227,44 @@ function notifySynthesisFailure(
223
227
  }
224
228
  }
225
229
 
230
+ /** Ring the terminal bell so the user knows to check back. */
231
+ function ringBell(): void {
232
+ process.stdout.write("\x07");
233
+ }
234
+
235
+ /**
236
+ * Emit a `supi:review:brief-done` event and ring the terminal bell after
237
+ * brief synthesis completes (success, failure, cancel, or timeout).
238
+ */
239
+ function notifyBriefDone(
240
+ pi: ExtensionAPI,
241
+ result: BriefSynthesisRunResult,
242
+ snapshot: ReviewSnapshot,
243
+ modelId: string,
244
+ ): void {
245
+ pi.events.emit("supi:review:brief-done", {
246
+ kind: result.kind,
247
+ snapshot: snapshot.title,
248
+ modelId,
249
+ brief: result.kind === "success" ? result.brief : undefined,
250
+ });
251
+ ringBell();
252
+ }
253
+
254
+ /**
255
+ * Emit a `supi:review:review-done` event and ring the terminal bell after
256
+ * the review child session completes.
257
+ */
258
+ function notifyReviewDone(pi: ExtensionAPI, result: ReviewResult): void {
259
+ pi.events.emit("supi:review:review-done", {
260
+ kind: result.kind,
261
+ snapshot: result.snapshot.title,
262
+ modelId: result.modelId,
263
+ findingsCount: result.kind === "success" ? result.output.findings.length : 0,
264
+ });
265
+ ringBell();
266
+ }
267
+
226
268
  function injectReviewMessage(pi: ExtensionAPI, result: ReviewResult): void {
227
269
  pi.sendMessage({
228
270
  customType: "supi-review",