pi-goal-list-loop-audit 0.26.7 → 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 +1 -1
- package/extensions/goal-loop-core.ts +14 -1
- package/extensions/loops/goal.ts +13 -11
- package/package.json +1 -1
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 #
|
|
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,8 +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.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.
|
|
663
675
|
if (autoResume === true) return true;
|
|
664
|
-
|
|
676
|
+
if (autoResume === false) return false;
|
|
677
|
+
return reason === "reload" || reason === "fork";
|
|
665
678
|
}
|
|
666
679
|
|
|
667
680
|
/**
|
package/extensions/loops/goal.ts
CHANGED
|
@@ -3221,7 +3221,7 @@ async function cmdSettings(args: string, ctx: ExtensionContext): Promise<void> {
|
|
|
3221
3221
|
patch.autoResume = true;
|
|
3222
3222
|
changed = true;
|
|
3223
3223
|
} else if (["off", "false", "0", "no", "unset"].includes(value)) {
|
|
3224
|
-
patch.autoResume = undefined
|
|
3224
|
+
patch.autoResume = false; // v0.26.8: explicit off must persist — undefined now means ON
|
|
3225
3225
|
changed = true;
|
|
3226
3226
|
} else {
|
|
3227
3227
|
ctx.ui.notify(`autoresume must be on or off, got: ${value}`, "warning");
|
|
@@ -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 === true ? "on" : "off"} 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=", "
|
|
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.
|
|
3645
|
-
//
|
|
3646
|
-
//
|
|
3647
|
-
//
|
|
3648
|
-
//
|
|
3649
|
-
//
|
|
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
|
|
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
|
|
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.
|
|
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",
|