pi-goal-list-loop-audit 0.34.1 → 0.34.3
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/extensions/loops/goal.ts +49 -1
- package/package.json +1 -1
package/extensions/loops/goal.ts
CHANGED
|
@@ -2002,6 +2002,23 @@ async function cmdPause(ctx: ExtensionContext): Promise<void> {
|
|
|
2002
2002
|
}
|
|
2003
2003
|
|
|
2004
2004
|
async function cmdResume(ctx: ExtensionContext): Promise<void> {
|
|
2005
|
+
// v0.34.3: /goal resume on an ACTIVE-but-idle goal re-kicks its
|
|
2006
|
+
// continuation (was: silent return — the user got NOTHING while the
|
|
2007
|
+
// widget said "active"). One-active-thing still holds: an active loop
|
|
2008
|
+
// wins over the re-kick.
|
|
2009
|
+
if (state.goal && state.goal.status === "active") {
|
|
2010
|
+
if (isLoopActive()) {
|
|
2011
|
+
ctx.ui.notify("A loop is active — one active thing at a time. /loop stop it first, then resume the goal.", "warning");
|
|
2012
|
+
return;
|
|
2013
|
+
}
|
|
2014
|
+
appendLedger(ctx.cwd, "resume_rekick", { goalId: state.goal.id, policy: state.goal.policy, via: "/goal resume" });
|
|
2015
|
+
ctx.ui.notify(
|
|
2016
|
+
`The ${state.goal.policy === "list" ? "list item" : "goal"} is ACTIVE but idle — re-firing its continuation: ${state.goal.objective.replace(/\s+/g, " ").slice(0, 70)}`,
|
|
2017
|
+
"info",
|
|
2018
|
+
);
|
|
2019
|
+
scheduleContinuation(ctx, true);
|
|
2020
|
+
return;
|
|
2021
|
+
}
|
|
2005
2022
|
if (!state.goal || state.goal.status !== "paused") return;
|
|
2006
2023
|
// v0.28.21: one-active-thing — the LAST unguarded activation path. A
|
|
2007
2024
|
// paused goal/list-item must not resume over a live loop (covers
|
|
@@ -2023,7 +2040,14 @@ async function cmdResume(ctx: ExtensionContext): Promise<void> {
|
|
|
2023
2040
|
const usage = state.goal.usage
|
|
2024
2041
|
? { tokensUsed: state.goal.usage.tokensUsed, tokensLimit: freshLimit }
|
|
2025
2042
|
: undefined;
|
|
2026
|
-
|
|
2043
|
+
// v0.34.2: clear the stale-handle interrupt marker on a MANUAL resume too —
|
|
2044
|
+
// the only clear-site used to be the autoResume restore path, so with
|
|
2045
|
+
// autoresume=off a resumed goal kept the red "⚠ interrupted — stale handle"
|
|
2046
|
+
// status line forever while actively working (hegemon, 2026-08-01). The
|
|
2047
|
+
// marker's promise ("a fresh session will resume you") is fulfilled by a
|
|
2048
|
+
// manual resume exactly as by an automatic one. (staleEntry still re-marks
|
|
2049
|
+
// below — a resume inside a stale session is a NEW interrupt.)
|
|
2050
|
+
updateGoal({ status: "active", pauseReason: undefined, pauseSuggestedAction: undefined, pauseKind: undefined, pauseOptions: undefined, pauseRecommended: undefined, pauseResumeAt: undefined, interruptedAt: undefined, interruptedReason: undefined, ...(staleEntry ? { interruptedAt: nowIso(), interruptedReason: "resumed in a stale session" } : {}), ...(usage ? { usage } : {}) }, ctx);
|
|
2027
2051
|
if (staleEntry) return;
|
|
2028
2052
|
// v0.22.5: say what was resumed — with a non-empty list this also resumes
|
|
2029
2053
|
// the queue (the active goal IS the list's head item).
|
|
@@ -5308,6 +5332,30 @@ async function cmdGllaResume(ctx: ExtensionContext): Promise<void> {
|
|
|
5308
5332
|
await cmdLoop("resume", ctx);
|
|
5309
5333
|
return;
|
|
5310
5334
|
}
|
|
5335
|
+
// v0.34.3: an ACTIVE-but-idle goal is exactly what the user means by
|
|
5336
|
+
// "resume" (hellhunter 2026-08-01: widget said "list item · active", the
|
|
5337
|
+
// agent sat idle after a prose-only turn — the continuation that should
|
|
5338
|
+
// drive the new head never landed — and /glla resume shrugged "Nothing to
|
|
5339
|
+
// resume"). Re-kick the continuation instead of shrugging.
|
|
5340
|
+
if (g && g.status === "active") {
|
|
5341
|
+
appendLedger(ctx.cwd, "resume_rekick", { goalId: g.id, policy: g.policy });
|
|
5342
|
+
ctx.ui.notify(
|
|
5343
|
+
`The ${g.policy === "list" ? "list item" : "goal"} is ACTIVE but idle — re-firing its continuation: ${g.objective.replace(/\s+/g, " ").slice(0, 70)}`,
|
|
5344
|
+
"info",
|
|
5345
|
+
);
|
|
5346
|
+
scheduleContinuation(ctx, true);
|
|
5347
|
+
return;
|
|
5348
|
+
}
|
|
5349
|
+
if (g && g.status === "auditing") {
|
|
5350
|
+
ctx.ui.notify("An audit is in flight — wait for the isolated auditor's verdict (the status line shows auditing…).", "info");
|
|
5351
|
+
return;
|
|
5352
|
+
}
|
|
5353
|
+
if (state.loop?.active) {
|
|
5354
|
+
appendLedger(ctx.cwd, "resume_rekick", { loop: true, iteration: state.loop.iteration });
|
|
5355
|
+
ctx.ui.notify(`The loop is ACTIVE — re-firing its tick (iteration ${state.loop.iteration}). If it wedges again, /loop status for the diagnostics.`, "info");
|
|
5356
|
+
scheduleLoopTick(ctx);
|
|
5357
|
+
return;
|
|
5358
|
+
}
|
|
5311
5359
|
ctx.ui.notify("Nothing to resume — no paused goal/list-item, no held loop. /goal, /list, or /loop to start something.", "info");
|
|
5312
5360
|
}
|
|
5313
5361
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-goal-list-loop-audit",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.3",
|
|
4
4
|
"description": "Mission control for autonomous pi: interview-drafted goals, an audited task queue, and forever-loops (metric, spec, project-audit) that run for hours. An isolated extension-less auditor re-verifies every completion with raw evidence; confirmed drafts, decision pauses and consent gates keep you in charge.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dracon",
|