pi-goal-list-loop-audit 0.26.8 → 0.26.9

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
@@ -199,7 +199,7 @@ No external watchdog plugin needed.
199
199
  /glla tokenlimit=10000000 # per-goal token budget (default: off) → GLOBAL
200
200
  /glla tokenlimit=0 # explicitly no cap (the default)
201
201
  /glla wedgealert=30 # hung-command alert minutes (default: 30, 0 = off)
202
- /glla autoresume=on # held goals/loops auto-resume in fresh sessions (unattended rigs)
202
+ /glla autoresume=on # auto-resume goals/loops on session LOAD too (default: hold on load, auto-resume on reload/fork; off: never)
203
203
  /glla auditcap=5 # pause the goal after N consecutive auditor disapprovals (default 5, 0 = unlimited)
204
204
  /glla aggressivemode=on # keep-going defaults: autoResume, cap 10, stuck 10, wedge off, quota auto-retry, cap→TODOs
205
205
  /glla quotaretryminutes=60 # minutes before auto-retrying a quota-exhausted auditor
@@ -660,16 +660,21 @@ export function cloneGoal(goal: Goal): Goal {
660
660
  * setting for unattended restarts). One mechanical predicate; no heuristics.
661
661
  */
662
662
  export function shouldAutoResumeOnSessionStart(reason: string | undefined, autoResume: boolean | undefined): boolean {
663
- // v0.26.8: default flipped to ON — keep pushing forward on every session
664
- // start unless the user explicitly opts out (/glla autoresume=off). The
665
- // "super stuck" brakes (stall escalation, stale-api terminal, pending-
666
- // latch watchdog) still stop the machine loudly; a mere process restart
667
- // is not a reason to hold work. Explicit off preserves the v0.21.0 gate:
668
- // only sessions with history (resume/reload/fork) auto-resume.
669
- if (autoResume === false) {
670
- return reason === "resume" || reason === "reload" || reason === "fork";
671
- }
672
- return true;
663
+ // v0.26.9 tri-state:
664
+ // true → auto-resume on EVERY session start (unattended rigs).
665
+ // false → never auto-resume; always hold for an explicit resume.
666
+ // undefined DEFAULT: a human LOADING a session ("startup"/"new"/
667
+ // "resume", or old pi reporting no reason) must not trigger
668
+ // work show the held popup, they resume explicitly.
669
+ // In-session MACHINERY ("reload"/"fork") auto-resumes so an
670
+ // extension reload or session fork never strands work.
671
+ // Mid-session continuation (agent_end chains, heartbeat refires,
672
+ // post-compaction, list/loop transitions) is not gated here at all — it
673
+ // auto-continues forever unless a super-stuck brake (stall escalation,
674
+ // stale-api terminal, pending-latch watchdog) stops it loudly.
675
+ if (autoResume === true) return true;
676
+ if (autoResume === false) return false;
677
+ return reason === "reload" || reason === "fork";
673
678
  }
674
679
 
675
680
  /**
@@ -3329,7 +3329,7 @@ async function cmdSettings(args: string, ctx: ExtensionContext): Promise<void> {
3329
3329
  saveSettings(scope, ctx.cwd, patch);
3330
3330
  const effective = loadSettings(ctx.cwd);
3331
3331
  ctx.ui.notify(
3332
- `Saved to ${scope} config. Effective now: model=${effective.auditorModel ?? "(session model)"} thinking=${effective.auditorThinkingLevel ?? "(session)"} notify=${effective.notifyCmd ?? "(off)"} tokenLimit=${effective.tokenLimit ?? 0}${(effective.tokenLimit ?? 0) > 0 ? "" : " (off)"} autoResume=${effective.autoResume === false ? "off" : "on (default)"} auditFeedbackChars=${effective.auditFeedbackChars ?? DEFAULT_AUDIT_FEEDBACK_CHARS}${(effective.auditFeedbackChars ?? DEFAULT_AUDIT_FEEDBACK_CHARS) === 0 ? " (full report)" : ""}\n` +
3332
+ `Saved to ${scope} config. Effective now: model=${effective.auditorModel ?? "(session model)"} thinking=${effective.auditorThinkingLevel ?? "(session)"} notify=${effective.notifyCmd ?? "(off)"} tokenLimit=${effective.tokenLimit ?? 0}${(effective.tokenLimit ?? 0) > 0 ? "" : " (off)"} autoResume=${effective.autoResume === true ? "on" : effective.autoResume === false ? "off" : "default (hold on load)"} auditFeedbackChars=${effective.auditFeedbackChars ?? DEFAULT_AUDIT_FEEDBACK_CHARS}${(effective.auditFeedbackChars ?? DEFAULT_AUDIT_FEEDBACK_CHARS) === 0 ? " (full report)" : ""}\n` +
3333
3333
  `Note: the auditor runs without extensions — it must be a built-in provider, not an extension-registered one.`,
3334
3334
  "info",
3335
3335
  );
@@ -3444,7 +3444,7 @@ export default function (pi: ExtensionAPI): void {
3444
3444
  ["thinking=", "auditor thinking level: /glla thinking=high"],
3445
3445
  ["notify=", "desktop push command: /glla notify='notify-send pi \"$1\"'"],
3446
3446
  ["tokenlimit=", "per-goal token budget (0 = off): /glla tokenlimit=2000000"],
3447
- ["autoresume=", "on (default): auto-resume goals/loops on every session start; off: hold on fresh sessions"],
3447
+ ["autoresume=", "default: hold when a session is loaded, auto-resume on reload/fork; on: always auto-resume; off: never"],
3448
3448
  ["auditcap=", "N: pause goal after N consecutive auditor disapprovals (default 5, 0 = unlimited)"],
3449
3449
  ["auditfeedbackchars=", "cap on executor-visible disapproval report chars (0 = full report, the default)"],
3450
3450
  ["aggressivemode=", "on: keep-going defaults — autoResume, cap 10, stuck 10, wedge off, quota auto-retry, cap→TODOs"],
@@ -3641,12 +3641,14 @@ export default function (pi: ExtensionAPI): void {
3641
3641
  } catch (err) {
3642
3642
  ctx.ui.notify(`glla subagent override sync failed: ${err instanceof Error ? err.message : String(err)}`, "warning");
3643
3643
  }
3644
- // Restore gate (v0.21.0, default flipped v0.26.8): auto-resume on EVERY
3645
- // session start by defaultkeep pushing forward unless super stuck
3646
- // (the stall escalation / stale-api / latch brakes still stop loudly).
3647
- // /glla autoresume=off restores the v0.21.0 gate: fresh sessions
3648
- // ("startup"/"new", or a pi too old to report a reason) HOLD, only
3649
- // sessions with history ("resume"/"reload"/"fork") auto-resume.
3644
+ // Restore gate (v0.26.9 tri-state): a human LOADING a session
3645
+ // ("startup"/"new"/"resume", or no reason) HOLDS the popup shows what
3646
+ // is waiting and nothing starts until they resume explicitly. In-session
3647
+ // machinery ("reload"/"fork") auto-resumes. /glla autoresume=on opts a
3648
+ // project into auto-resume everywhere (unattended rigs); autoresume=off
3649
+ // never auto-resumes. Once running, the chain auto-continues forever
3650
+ // unless a super-stuck brake (stall escalation / stale-api / latch)
3651
+ // stops it loudly.
3650
3652
  const autoResume = shouldAutoResumeOnSessionStart(event?.reason, resolveEffectiveAggressiveSettings(loadSettings(ctx.cwd)).autoResume);
3651
3653
  // v0.25.0 (contract item 6): aggressiveMode announces every auto-event.
3652
3654
  if (
@@ -3668,7 +3670,7 @@ export default function (pi: ExtensionAPI): void {
3668
3670
  state.loop = { ...l, active: false, stopReason: HELD_ON_RESTORE };
3669
3671
  persistState(ctx);
3670
3672
  ctx.ui.notify(
3671
- `Loop held on restore (/glla autoresume=off): ${l.target.slice(0, 60)} — /loop to resume, /glla autoresume=on to auto-resume in this project.`,
3673
+ `Loop held on restore: ${l.target.slice(0, 60)} — /loop to resume, /glla autoresume=on to auto-resume on session load in this project.`,
3672
3674
  "info",
3673
3675
  );
3674
3676
  }
@@ -3687,7 +3689,7 @@ export default function (pi: ExtensionAPI): void {
3687
3689
  const resumeHint = `${resumeCmd} to continue${queued > 0 ? ` (+${queued} waiting in the list)` : ""} · /glla autoresume=on to auto-resume in this project`;
3688
3690
  updateGoal({
3689
3691
  status: "paused",
3690
- pauseReason: "restored in a fresh session — held because /glla autoresume=off",
3692
+ pauseReason: "restored on session load — held for explicit resume",
3691
3693
  pauseSuggestedAction: resumeHint,
3692
3694
  }, ctx);
3693
3695
  ctx.ui.notify(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goal-list-loop-audit",
3
- "version": "0.26.8",
3
+ "version": "0.26.9",
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",