pi-goal-list-loop-audit 0.22.6 → 0.22.7

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.
@@ -93,7 +93,7 @@ export function buildStatusText(state: State, audit?: AuditDisplayProgress | nul
93
93
  return `glla: ${paint(theme, "accent", "auditing…")}${tool}`;
94
94
  }
95
95
  if (g.status === "paused") {
96
- const label = `paused ⏸ ${truncate(g.pauseReason ?? "", 40)}`;
96
+ const label = `${g.policy} paused ⏸ ${truncate(g.pauseReason ?? "", 40)}`;
97
97
  return `glla: ${paint(theme, pauseIsError(g) ? "error" : "warning", label)}`;
98
98
  }
99
99
  if (g.status === "active") {
@@ -565,6 +565,12 @@ async function cmdStatus(ctx: ExtensionContext): Promise<void> {
565
565
  async function cmdPause(ctx: ExtensionContext): Promise<void> {
566
566
  if (!state.goal) return;
567
567
  updateGoal({ status: "paused" }, ctx);
568
+ // v0.22.7: name WHAT was paused — a list item resumes through /list.
569
+ if (state.goal.policy === "list") {
570
+ const queued = listQueue().length;
571
+ ctx.ui.notify(`List item ${state.goal.id} paused${queued > 0 ? ` (${queued} queued in the list)` : ""}. /list resume to continue.`, "info");
572
+ return;
573
+ }
568
574
  ctx.ui.notify(`Goal ${state.goal.id} paused. /goal resume to continue.`, "info");
569
575
  }
570
576
 
@@ -580,9 +586,13 @@ async function cmdResume(ctx: ExtensionContext): Promise<void> {
580
586
  updateGoal({ status: "active", pauseReason: undefined, pauseSuggestedAction: undefined, ...(usage ? { usage } : {}) }, ctx);
581
587
  // v0.22.5: say what was resumed — with a non-empty list this also resumes
582
588
  // the queue (the active goal IS the list's head item).
589
+ // v0.22.7: name WHAT was resumed — list items resume through /list.
583
590
  const queued = listQueue().length;
591
+ const isListItem = state.goal.policy === "list";
584
592
  ctx.ui.notify(
585
- `Resumed goal [${state.goal.id}]: ${state.goal.objective.replace(/\s+/g, " ").slice(0, 70)}${queued > 0 ? ` (+${queued} queued in the list — resuming the list's head)` : ""}`,
593
+ isListItem
594
+ ? `Resumed list item [${state.goal.id}]: ${state.goal.objective.replace(/\s+/g, " ").slice(0, 70)}${queued > 0 ? ` (+${queued} queued in the list)` : ""}`
595
+ : `Resumed goal [${state.goal.id}]: ${state.goal.objective.replace(/\s+/g, " ").slice(0, 70)}${queued > 0 ? ` (+${queued} queued in the list — resuming the list's head)` : ""}`,
586
596
  "info",
587
597
  );
588
598
  scheduleContinuation(ctx, true);
@@ -730,6 +740,22 @@ async function cmdList(args: string, ctx: ExtensionContext): Promise<void> {
730
740
  const sub = (parts[0] ?? "").toLowerCase();
731
741
  const rest = args.trim().slice(sub.length).trim();
732
742
 
743
+ if (sub === "resume") {
744
+ // Resume the list's head. The head activates AS the active goal, so this
745
+ // is the same motion as /goal resume — named for the surface the user is
746
+ // looking at (v0.22.7: "we would just unpause, and that is next").
747
+ if (!state.goal || state.goal.status !== "paused") {
748
+ ctx.ui.notify("No paused list item to resume. /list show to see the queue.", "info");
749
+ return;
750
+ }
751
+ if (state.goal.policy !== "list") {
752
+ ctx.ui.notify("The paused goal didn't come from the list — /goal resume to continue it.", "info");
753
+ return;
754
+ }
755
+ await cmdResume(ctx);
756
+ return;
757
+ }
758
+
733
759
  if (!sub || sub === "show") {
734
760
  const queue = listQueue();
735
761
  const lines: string[] = [];
@@ -2300,9 +2326,10 @@ export default function (pi: ExtensionAPI): void {
2300
2326
  handler: settingsHandler,
2301
2327
  });
2302
2328
  pi.registerCommand("list", {
2303
- description: "Loop 2: the list of audited goals — order is the default, not the law. /list <describe tasks or name a plan file> (dumps get shaped into items, files import, 'Done when:' adds directly) | /list show | /list next [n] | /list remove <n> | /list clear",
2329
+ description: "Loop 2: the list of audited goals — order is the default, not the law. /list <describe tasks or name a plan file> (dumps get shaped into items, files import, 'Done when:' adds directly) | /list show | /list resume | /list next [n] | /list remove <n> | /list clear",
2304
2330
  getArgumentCompletions: completions([
2305
2331
  ["show", "display the queued items"],
2332
+ ["resume", "resume the paused list item (the list's head)"],
2306
2333
  ["next", "activate the next item (or /list next <n> for position n)"],
2307
2334
  ["remove", "remove an item: /list remove <n>"],
2308
2335
  ["clear", "empty the list"],
@@ -2380,29 +2407,30 @@ export default function (pi: ExtensionAPI): void {
2380
2407
  } else if (state.goal && state.goal.status === "active" && state.goal.autoContinue) {
2381
2408
  if (autoResume) {
2382
2409
  ctx.ui.notify(
2383
- `Resuming goal [${state.goal.id}]: ${state.goal.objective.slice(0, 70)}${listQueue().length > 0 ? ` (+${listQueue().length} queued)` : ""}`,
2410
+ `Resuming ${state.goal.policy === "list" ? "list item" : "goal"} [${state.goal.id}]: ${state.goal.objective.slice(0, 70)}${listQueue().length > 0 ? ` (+${listQueue().length} queued)` : ""}`,
2384
2411
  "info",
2385
2412
  );
2386
2413
  scheduleContinuation(ctx, true);
2387
2414
  } else {
2388
2415
  const queued = listQueue().length;
2389
- const resumeHint = queued > 0
2390
- ? `/goal resume to continue (+${queued} queued in the list) · /glla autoresume=on to auto-resume in this project`
2391
- : "/goal resume to continue · /glla autoresume=on to auto-resume in this project";
2416
+ // v0.22.7: name WHAT is held — a list head resumes through /list.
2417
+ const isListItem = state.goal.policy === "list";
2418
+ const resumeCmd = isListItem ? "/list resume" : "/goal resume";
2419
+ const resumeHint = `${resumeCmd} to continue${queued > 0 ? ` (+${queued} queued in the list)` : ""} · /glla autoresume=on to auto-resume in this project`;
2392
2420
  updateGoal({
2393
2421
  status: "paused",
2394
2422
  pauseReason: "restored in a fresh session — no work started",
2395
2423
  pauseSuggestedAction: resumeHint,
2396
2424
  }, ctx);
2397
2425
  ctx.ui.notify(
2398
- `Goal held on restore [${state.goal.id}]: ${state.goal.objective.slice(0, 70)}${queued > 0 ? ` (+${queued} queued in the list)` : ""} — /goal resume to continue.`,
2426
+ `${isListItem ? "List item" : "Goal"} held on restore [${state.goal.id}]: ${state.goal.objective.slice(0, 70)}${queued > 0 ? ` (+${queued} queued in the list)` : ""} — ${resumeCmd} to continue.`,
2399
2427
  "info",
2400
2428
  );
2401
2429
  }
2402
2430
  } else if (state.goal && state.goal.status === "active") {
2403
2431
  // Active but autoContinue off: nothing auto-fires — just surface it.
2404
2432
  ctx.ui.notify(
2405
- `Restored goal [${state.goal.id}]: ${state.goal.objective.slice(0, 70)}${listQueue().length > 0 ? ` (+${listQueue().length} queued)` : ""}`,
2433
+ `Restored ${state.goal.policy === "list" ? "list item" : "goal"} [${state.goal.id}]: ${state.goal.objective.slice(0, 70)}${listQueue().length > 0 ? ` (+${listQueue().length} queued)` : ""}`,
2406
2434
  "info",
2407
2435
  );
2408
2436
  } else if ((!state.goal || state.goal.status === "complete" || state.goal.status === "aborted") && listQueue().length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goal-list-loop-audit",
3
- "version": "0.22.6",
3
+ "version": "0.22.7",
4
4
  "description": "Goal. Loop. Audit. Done. — a pi-coding-agent extension that supervises long-running work, with isolated auditor on each completion. Beat bamboozling by design: the auditor runs in a fresh session with no extensions, no skills, no editor — only the read tools needed to verify your goal.",
5
5
  "license": "MIT",
6
6
  "author": "dracon",