pi-goal-list-loop-audit 0.24.0 → 0.24.1

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 CHANGED
@@ -57,6 +57,7 @@ matches `/list show`.
57
57
  /list next # skip current, activate next
58
58
  /list remove <n> # drop item n from the list
59
59
  /list clear # empty the list
60
+ /list cancel # stop the whole list: abort the active item + drop all waiting
60
61
  /loop # draft the loop (agent grills; measure is test-run before you confirm)
61
62
  /loop start "keep polishing the UI" # infinite metricless loop (v0.23.6): no plateau, no cap — ends at time=/tokens= or /loop stop
62
63
  /loop start "reduce TODOs" measure="grep -c TODO src.txt | head -1" direction=min
@@ -849,7 +849,32 @@ async function cmdList(args: string, ctx: ExtensionContext): Promise<void> {
849
849
  state = { ...state, list: [] };
850
850
  persistState(ctx);
851
851
  appendLedger(ctx.cwd, "list_cleared", {});
852
- ctx.ui.notify("List cleared. Active goal (if any) is untouched — /goal cancel for that.", "info");
852
+ ctx.ui.notify("List cleared. Active goal (if any) is untouched — /goal cancel for that, /list cancel to stop the whole list.", "info");
853
+ return;
854
+ }
855
+
856
+ // v0.24.1: ONE verb for "stop this whole list" — aborts the active item
857
+ // when it's list-sourced AND drops the waiting items. Before this the user
858
+ // had to know to combine /goal cancel + /list clear.
859
+ if (sub === "cancel") {
860
+ const waiting = listQueue().length;
861
+ const activeIsListItem = state.goal?.policy === "list" && (state.goal.status === "active" || state.goal.status === "paused");
862
+ if (waiting === 0 && !activeIsListItem) {
863
+ ctx.ui.notify("No list to cancel — nothing waiting, and the active goal (if any) isn't a list item. /goal cancel aborts a standalone goal.", "info");
864
+ return;
865
+ }
866
+ const dropped = waiting;
867
+ state = { ...state, list: [] };
868
+ persistState(ctx);
869
+ if (activeIsListItem) {
870
+ archiveCurrentGoal(ctx, "aborted", "list cancelled");
871
+ ctx.abort();
872
+ }
873
+ appendLedger(ctx.cwd, "list_cancelled", { abortedActive: activeIsListItem, dropped });
874
+ ctx.ui.notify(
875
+ `List cancelled: ${activeIsListItem ? "active item aborted + " : ""}${dropped} waiting item(s) dropped.${!activeIsListItem && state.goal && state.goal.status === "active" ? " Active goal is not a list item — untouched (/goal cancel for that)." : ""}`,
876
+ "info",
877
+ );
853
878
  return;
854
879
  }
855
880
 
@@ -2549,13 +2574,14 @@ export default function (pi: ExtensionAPI): void {
2549
2574
  handler: settingsHandler,
2550
2575
  });
2551
2576
  pi.registerCommand("list", {
2552
- 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",
2577
+ 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 | /list cancel",
2553
2578
  getArgumentCompletions: completions([
2554
2579
  ["show", "display the waiting items"],
2555
2580
  ["resume", "resume the paused list item (the list's head)"],
2556
2581
  ["next", "activate the next item (or /list next <n> for position n)"],
2557
2582
  ["remove", "remove an item: /list remove <n>"],
2558
2583
  ["clear", "empty the list"],
2584
+ ["cancel", "stop the whole list: abort the active item + drop all waiting"],
2559
2585
  ]),
2560
2586
  handler: (args: string, ctx: ExtensionContext) => { rememberCtx(ctx); return cmdList(args, ctx); },
2561
2587
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goal-list-loop-audit",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
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",