diffing 0.18.3 → 0.18.4

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/dist/cli.mjs CHANGED
@@ -711,6 +711,7 @@ startupLease?.release();
711
711
  startupLease = null;
712
712
  const localUrl = appendSessionToken(`http://${host === "0.0.0.0" ? "127.0.0.1" : host}:${actualPort}${prMode ? "/gh/pr" : ""}`, authToken ?? void 0);
713
713
  console.log(`diffing server running at ${localUrl}`);
714
+ console.error(`DIFFING_READY ${localUrl} mode=${prMode ? "gh-pr" : "web"} pid=${process.pid}`);
714
715
  if (openModulePromise) try {
715
716
  const settings = loadSettings();
716
717
  const openUrl = appendSessionToken(`http://${host === "0.0.0.0" ? "127.0.0.1" : host}:${actualPort}${prMode ? "/gh/pr" : ""}`, authToken ?? void 0);
@@ -194,6 +194,45 @@ async function refreshStatus(ctx: ExtensionContext): Promise<void> {
194
194
  }
195
195
  }
196
196
 
197
+ // ────────────────────────────────────────────────────────────────────────────
198
+ // Verdict notices (herdr-visible)
199
+ //
200
+ // After a review/plan/mockup await returns a real verdict, surface a compact,
201
+ // greppable `DIFFING_VERDICT …` line in the pi pane so a sibling herdr pane can
202
+ // observe review state via `herdr pane read` / `herdr wait output`. We use pi's
203
+ // own UI hooks (notify + widget) rather than `herdr pane send-text`, which would
204
+ // type raw bytes into the pi TUI input box instead of the rendered scrollback.
205
+ // ────────────────────────────────────────────────────────────────────────────
206
+
207
+ interface VerdictNotice {
208
+ kind: "plan" | "mockup" | "review";
209
+ decision: string;
210
+ }
211
+
212
+ function verdictNotice(stderr: string): VerdictNotice | null {
213
+ const plan = stderr.match(/DIFFING_PLAN_DECISION=(\S+)/);
214
+ if (plan) return { kind: "plan", decision: plan[1] };
215
+ const mockup = stderr.match(/DIFFING_MOCKUP_DECISION=(\S+)/);
216
+ if (mockup) return { kind: "mockup", decision: mockup[1] };
217
+ const review = stderr.match(/DIFFING_REVIEW_ROUND=(\S+)/);
218
+ if (review) return { kind: "review", decision: `released round=${review[1]}` };
219
+ return null;
220
+ }
221
+
222
+ function emitVerdictNotice(ctx: ExtensionContext, stderr: string): void {
223
+ const notice = verdictNotice(stderr);
224
+ if (!notice) return;
225
+ const line = `DIFFING_VERDICT ${notice.kind} decision=${notice.decision}`;
226
+ try {
227
+ if (ctx.hasUI) {
228
+ ctx.ui.notify(line, "info");
229
+ ctx.ui.setWidget("diffing-verdict", [line]);
230
+ }
231
+ } catch {
232
+ // UI hooks are best-effort; never break the tool result.
233
+ }
234
+ }
235
+
197
236
  // ────────────────────────────────────────────────────────────────────────────
198
237
  // Canonical skill root + self-heal
199
238
  // ────────────────────────────────────────────────────────────────────────────
@@ -560,6 +599,7 @@ export default function (pi: ExtensionAPI) {
560
599
  { parked: true, exitCode: result.exitCode },
561
600
  );
562
601
  }
602
+ emitVerdictNotice(ctx, result.stderr);
563
603
  return textResult(describe(result, "diffing await-review"), {
564
604
  parked: false,
565
605
  exitCode: result.exitCode,
@@ -667,6 +707,7 @@ export default function (pi: ExtensionAPI) {
667
707
  { parked: true, exitCode: result.exitCode },
668
708
  );
669
709
  }
710
+ emitVerdictNotice(ctx, result.stderr);
670
711
  return textResult(describe(result, "diffing plan await"), {
671
712
  parked: false,
672
713
  exitCode: result.exitCode,
@@ -920,6 +961,7 @@ export default function (pi: ExtensionAPI) {
920
961
  { parked: true, exitCode: result.exitCode },
921
962
  );
922
963
  }
964
+ emitVerdictNotice(ctx, result.stderr);
923
965
  return textResult(describe(result, "diffing mockup await"), {
924
966
  parked: false,
925
967
  exitCode: result.exitCode,
@@ -26,7 +26,7 @@ declare module "@earendil-works/pi-coding-agent" {
26
26
  text: string,
27
27
  level?: "info" | "error" | "success" | "warning",
28
28
  ): void;
29
- setWidget?(id: string, lines: string[]): void;
29
+ setWidget(id: string, lines: string[] | undefined): void;
30
30
  };
31
31
  }
32
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diffing",
3
- "version": "0.18.3",
3
+ "version": "0.18.4",
4
4
  "description": "local-first CLI for reviewing, navigating, and discussing git diffs with AI",
5
5
  "type": "module",
6
6
  "license": "MIT",