pi-goal-list-loop-audit 0.34.9 → 0.34.11
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 +34 -33
- package/extensions/loops/goal.ts +37 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ Most pi goal extensions — `pi-goal`, `pi-goal-x`, `pi-loop-mode`, `ralphi`, `t
|
|
|
25
25
|
Install:
|
|
26
26
|
```bash
|
|
27
27
|
pi install npm:pi-goal-list-loop-audit
|
|
28
|
+
pi install npm:@juicesharp/rpiv-ask-user-question # effectively required — see Recommended companions
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
Five top-level commands — `/goal`, `/list`, `/loop`, `/glla`, `/review`:
|
|
@@ -138,6 +139,39 @@ dry, not "done"), `max=` iterations, or the arbitrary bounds `time=<hours>` /
|
|
|
138
139
|
`propose_loop_refine` to sharpen the target or swap the measure — you confirm,
|
|
139
140
|
the orchestrator test-runs and re-baselines, and both eras stay in history.
|
|
140
141
|
|
|
142
|
+
## Recommended companions
|
|
143
|
+
|
|
144
|
+
glla is the goal plane — it drives, verifies, and notifies. It does not
|
|
145
|
+
try to be the whole rig. Four plugins round it out. The first is
|
|
146
|
+
**effectively required** — glla's drafting interviews, DECIDE findings,
|
|
147
|
+
and confirm dialogs are built around structured questions (it degrades
|
|
148
|
+
to plain-text prompts without it, but that is the fallback path, not the
|
|
149
|
+
product). The other three are optional; glla works without them:
|
|
150
|
+
|
|
151
|
+
- **`@juicesharp/rpiv-ask-user-question`** — **install this one.**
|
|
152
|
+
Structured questions with multi-select and markdown previews: the
|
|
153
|
+
/goal drafting interview, DECIDE findings, and every confirm dialog
|
|
154
|
+
render through it. Without it you get prose fallbacks — functional,
|
|
155
|
+
but not the intended UX.
|
|
156
|
+
- **`@tintinweb/pi-subagents`** — the `Agent` tool: parallel Explore /
|
|
157
|
+
Plan / general-purpose subagents. glla's prompts teach fan-out with ROI
|
|
158
|
+
(parallelize real work, never ceremony spawning) and brief discipline,
|
|
159
|
+
and big audit collects genuinely assume this exists. glla's subagent
|
|
160
|
+
guarantees (the main session owns the goal; workers can't clobber it)
|
|
161
|
+
are plugin-agnostic, but this is the provider we test against.
|
|
162
|
+
- **`@juicesharp/rpiv-advisor`** — a second opinion the executor model
|
|
163
|
+
can request mid-flight: the whole conversation branch is forwarded to a
|
|
164
|
+
stronger reviewer model, which answers with a plan, a correction, or a
|
|
165
|
+
stop signal. Drive the session with a cheap/fast model and buy strong
|
|
166
|
+
judgment per call. Role clarity: the advisor is *advisory*, never
|
|
167
|
+
verification — glla's isolated auditor remains the only completion
|
|
168
|
+
gate.
|
|
169
|
+
- **`@pi-unipi/notify`** — push beyond the desktop: Telegram, Gotify,
|
|
170
|
+
ntfy, with per-event routing. glla's built-in pushes cover the local
|
|
171
|
+
desktop case and fire only where there is something to DO; add this
|
|
172
|
+
for away-from-desk alerts — route it to critical events only, or every
|
|
173
|
+
glla pause/verdict pings twice.
|
|
174
|
+
|
|
141
175
|
## Which loop? (the decision rule)
|
|
142
176
|
|
|
143
177
|
**`/goal`** — one thing, judged *semantically*. Research, features, docs,
|
|
@@ -312,39 +346,6 @@ stuck backoff caps at 5 minutes then pauses, measure commands get a 10m
|
|
|
312
346
|
hard timeout, and the auditor aborts after 10m with zero session activity
|
|
313
347
|
(infrastructure error, never a verdict).
|
|
314
348
|
|
|
315
|
-
## Recommended companions
|
|
316
|
-
|
|
317
|
-
glla is the goal plane — it drives, verifies, and notifies. It does not
|
|
318
|
-
try to be the whole rig. Four plugins round it out. The first is
|
|
319
|
-
**effectively required** — glla's drafting interviews, DECIDE findings,
|
|
320
|
-
and confirm dialogs are built around structured questions (it degrades
|
|
321
|
-
to plain-text prompts without it, but that is the fallback path, not the
|
|
322
|
-
product). The other three are optional; glla works without them:
|
|
323
|
-
|
|
324
|
-
- **`@juicesharp/rpiv-ask-user-question`** — **install this one.**
|
|
325
|
-
Structured questions with multi-select and markdown previews: the
|
|
326
|
-
/goal drafting interview, DECIDE findings, and every confirm dialog
|
|
327
|
-
render through it. Without it you get prose fallbacks — functional,
|
|
328
|
-
but not the intended UX.
|
|
329
|
-
- **`@tintinweb/pi-subagents`** — the `Agent` tool: parallel Explore /
|
|
330
|
-
Plan / general-purpose subagents. glla's prompts teach fan-out with ROI
|
|
331
|
-
(parallelize real work, never ceremony spawning) and brief discipline,
|
|
332
|
-
and big audit collects genuinely assume this exists. glla's subagent
|
|
333
|
-
guarantees (the main session owns the goal; workers can't clobber it)
|
|
334
|
-
are plugin-agnostic, but this is the provider we test against.
|
|
335
|
-
- **`@juicesharp/rpiv-advisor`** — a second opinion the executor model
|
|
336
|
-
can request mid-flight: the whole conversation branch is forwarded to a
|
|
337
|
-
stronger reviewer model, which answers with a plan, a correction, or a
|
|
338
|
-
stop signal. Drive the session with a cheap/fast model and buy strong
|
|
339
|
-
judgment per call. Role clarity: the advisor is *advisory*, never
|
|
340
|
-
verification — glla's isolated auditor remains the only completion
|
|
341
|
-
gate.
|
|
342
|
-
- **`@pi-unipi/notify`** — push beyond the desktop: Telegram, Gotify,
|
|
343
|
-
ntfy, with per-event routing. glla's built-in pushes cover the local
|
|
344
|
-
desktop case and fire only where there is something to DO; add this
|
|
345
|
-
for away-from-desk alerts — route it to critical events only, or every
|
|
346
|
-
glla pause/verdict pings twice.
|
|
347
|
-
|
|
348
349
|
## Compatibility (what goes well, what conflicts)
|
|
349
350
|
|
|
350
351
|
**The Two-Driver Rule**: any plugin that drives agent turns on `agent_end`
|
package/extensions/loops/goal.ts
CHANGED
|
@@ -630,15 +630,30 @@ let heartbeatTimer: NodeJS.Timeout | null = null;
|
|
|
630
630
|
|
|
631
631
|
const ZOMBIE_RUN_SILENT_MS = 20 * 60_000;
|
|
632
632
|
const ZOMBIE_RUN_ALERT_THROTTLE_MS = 10 * 60_000;
|
|
633
|
+
// v0.34.11: unanswered-continuation watchdog. Hellhunter 2026-08-01: at a
|
|
634
|
+
// list-transition completion boundary pi ACCEPTED every continuation
|
|
635
|
+
// (sendMessage never threw; session reported idle) but started NO turn —
|
|
636
|
+
// transcript frozen, tokens flat, 10+ minutes of refires into the void.
|
|
637
|
+
// Same family as the post-compaction dropped trigger (v0.26.5), but the
|
|
638
|
+
// pending-latch watchdog needs idle&&pending and pi reported no pending
|
|
639
|
+
// here, and the zombie watchdog needs busy — this shape falls between both
|
|
640
|
+
// chairs. Disarm signal = real activity (agent_end/tool_call) AFTER the
|
|
641
|
+
// last send; a landed turn — even a lazy text-only one — disarms it.
|
|
642
|
+
const CONTINUATION_UNANSWERED_MS = 150_000;
|
|
643
|
+
const CONTINUATION_UNANSWERED_THROTTLE_MS = 300_000;
|
|
633
644
|
// v0.29.19: dead-turn caps (agent_end exemption path). 6 consecutive
|
|
634
645
|
// provider-error turns = a real outage, not bad luck — stop honestly.
|
|
635
646
|
// 3 consecutive user aborts = the user means it (user aborts mean STOP).
|
|
636
647
|
const LOOP_MAX_CONSECUTIVE_ERRORS = 6;
|
|
637
648
|
const LOOP_MAX_CONSECUTIVE_ABORTS = 3;
|
|
638
649
|
|
|
650
|
+
let lastRealActivityAt = 0;
|
|
651
|
+
let lastContinuationSentAt = 0;
|
|
652
|
+
let lastUnansweredAlertAt = 0;
|
|
653
|
+
|
|
639
654
|
function noteActivity(real = false): void {
|
|
640
655
|
lastActivityAt = Date.now();
|
|
641
|
-
if (real) consecutiveStalls = 0;
|
|
656
|
+
if (real) { consecutiveStalls = 0; lastRealActivityAt = lastActivityAt; }
|
|
642
657
|
}
|
|
643
658
|
|
|
644
659
|
function isSupervising(): boolean {
|
|
@@ -932,6 +947,25 @@ function heartbeatTick(): void {
|
|
|
932
947
|
notifyExternal(ctx, `glla: zombie run suspected (${Math.round(streamSilentMs / 60000)} min busy-silent) — press Esc to abort.`);
|
|
933
948
|
return;
|
|
934
949
|
}
|
|
950
|
+
// v0.34.11: unanswered-continuation watchdog — pi took the send but no
|
|
951
|
+
// turn started (no agent_end, no tool call, no stream). Re-sends don't
|
|
952
|
+
// unstick a dropped trigger (hegemon law) — this alert's job is to say
|
|
953
|
+
// the cure LOUDLY at ~2.5 min instead of leaving a silent 20-30 min gap
|
|
954
|
+
// before the zombie/wedge alerts. Does NOT return: the heartbeat refire
|
|
955
|
+
// below keeps sending underneath in case pi unsticks by itself.
|
|
956
|
+
if (
|
|
957
|
+
isSupervising() &&
|
|
958
|
+
lastContinuationSentAt > 0 &&
|
|
959
|
+
lastRealActivityAt < lastContinuationSentAt &&
|
|
960
|
+
Date.now() - lastContinuationSentAt >= CONTINUATION_UNANSWERED_MS &&
|
|
961
|
+
Date.now() - lastUnansweredAlertAt >= CONTINUATION_UNANSWERED_THROTTLE_MS
|
|
962
|
+
) {
|
|
963
|
+
lastUnansweredAlertAt = Date.now();
|
|
964
|
+
appendLedger(ctx.cwd, "continuation_unanswered", { silentMs: Date.now() - lastContinuationSentAt });
|
|
965
|
+
const msg = `glla: pi accepted the continuation ${Math.round((Date.now() - lastContinuationSentAt) / 60_000)}m ago but NO turn has started — no tool calls, no tokens, transcript frozen (the turn trigger is wedged; same pi failure family as the post-compaction blackhole). Re-sends don't unstick it. Cure: /reload — autoresume re-fires the ${isLoopActive() ? "loop" : "goal/list item"} automatically.`;
|
|
966
|
+
ctx.ui.notify(msg, "warning");
|
|
967
|
+
notifyExternal(ctx, msg);
|
|
968
|
+
}
|
|
935
969
|
// v0.29.1: stranded-audit recovery. A goal left in "auditing" with NO
|
|
936
970
|
// in-flight audit means the auditor's result never landed (wedged queue
|
|
937
971
|
// ate the tool result; compaction/restart mid-audit). Field-observed in
|
|
@@ -1164,6 +1198,7 @@ function sendContinuation(goalId: string): void {
|
|
|
1164
1198
|
if (resync) postCompactResyncPending = false; // consumed only by a landed send
|
|
1165
1199
|
continuationRearmStreak = 0; continuationRearmSince = 0; // v0.28.5 (E3): a landed send clears the storm
|
|
1166
1200
|
appendLedger(ctx.cwd, "goal_continuation_sent", { goalId });
|
|
1201
|
+
lastContinuationSentAt = Date.now();
|
|
1167
1202
|
} catch (err) {
|
|
1168
1203
|
appendLedger(ctx.cwd, "goal_continuation_send_failed", { goalId, error: err instanceof Error ? err.message : String(err) });
|
|
1169
1204
|
// v0.26.7: stale runtime = terminal (sends can never land); anything
|
|
@@ -2845,6 +2880,7 @@ function sendLoopTurn(): void {
|
|
|
2845
2880
|
// refires with zero visibility into whether sends were landing.
|
|
2846
2881
|
loopRearmStreak = 0; loopRearmSince = 0; // v0.28.5 (E3): a landed turn clears the storm
|
|
2847
2882
|
appendLedger(ctx.cwd, "loop_turn_sent", { iteration: loop.iteration });
|
|
2883
|
+
lastContinuationSentAt = Date.now();
|
|
2848
2884
|
} catch (err) {
|
|
2849
2885
|
// stale API — next agent_end reschedules (but if none comes, the
|
|
2850
2886
|
// heartbeat's stall escalation stops the spin — v0.26.1).
|
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.11",
|
|
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",
|