pi-goal-list-loop-audit 0.36.1 โ 0.37.2
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/CHANGELOG.md +91 -0
- package/INSTALL.md +11 -8
- package/LIST-PHILOSOPHY.md +1 -1
- package/README.md +41 -22
- package/docs/DESIGN.md +40 -0
- package/docs/INDEX.md +8 -8
- package/extensions/goal-agents-panel.ts +32 -5
- package/extensions/goal-commands.ts +21 -2
- package/extensions/goal-continuation.ts +12 -1
- package/extensions/goal-heartbeat.ts +259 -14
- package/extensions/goal-loop-auditor-process.ts +51 -5
- package/extensions/goal-loop-auditor.ts +18 -5
- package/extensions/goal-loop-core.ts +40 -0
- package/extensions/goal-loop-display.ts +55 -16
- package/extensions/goal-loop-forever.ts +5 -5
- package/extensions/goal-loop-subagents.ts +177 -201
- package/extensions/goal-loop.ts +10 -0
- package/extensions/goal-recovery.ts +35 -10
- package/extensions/goal-settings.ts +66 -11
- package/extensions/loops/goal-activation.ts +128 -9
- package/extensions/loops/goal-auditor-hooks.ts +82 -19
- package/extensions/loops/goal-list-queue.ts +3 -2
- package/extensions/loops/goal-orchestrator.ts +51 -3
- package/extensions/loops/goal-runtime-globals.ts +2 -0
- package/extensions/loops/goal-session.ts +30 -18
- package/extensions/loops/goal-settings-ui.ts +85 -34
- package/extensions/loops/goal-tools.ts +61 -6
- package/extensions/loops/goal-ui.ts +107 -21
- package/extensions/loops/goal.ts +1 -1
- package/extensions/model-selector.ts +3 -2
- package/extensions/settings-menu.ts +28 -2
- package/package.json +2 -2
- package/prompts/goal-loop-continuation.md +3 -3
- package/prompts/goal-loop-draft.md +2 -2
- package/prompts/goal-loop-forever-metricless.md +3 -3
- package/prompts/goal-loop-forever.md +3 -3
- package/prompts/goal-loop-plan-loop.md +1 -1
- package/prompts/goal-loop-plan.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,96 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.37.2 โ queued vs monitoring visuals and long-running daemon handling (2026-09-01)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
Monitor icon for long-running daemon/supervisor goals: goals matching
|
|
7
|
+
`daemon|supervisor|keep.*running|monitor|healthz` or with `total >1h` are
|
|
8
|
+
displayed as `๐ MONITORING` (dim) instead of `โณ QUEUED` (accent), with
|
|
9
|
+
"next check" instead of "awaiting pi turn", and are scheduled with
|
|
10
|
+
`GLLA_MONITOR_INTERVAL_MS` (default 120s) instead of immediate continuation
|
|
11
|
+
to avoid constant queued churn.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
`QUEUED` now renders as `โณ QUEUED` in accent blue (distinct from `BUSY`
|
|
15
|
+
warning yellow) with `awaiting pi turn` detail, fixing the "mistook it
|
|
16
|
+
for stuck" report (note.md 2026-09-01, screenshots 190127/193438/193529).
|
|
17
|
+
`LIVE ยท WORKING` remains success-accent with signal.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
Stale `followUp` continuations that survived `archiveCurrentGoal` via Pi's
|
|
21
|
+
`followUpQueue` are sanitized at `message_end` (ExtensionRunner โ
|
|
22
|
+
AgentSession) plus timer disarm at archival โ `LENGTH_CONTINUE` and foreign
|
|
23
|
+
ctx are exempt.
|
|
24
|
+
|
|
25
|
+
## 0.37.1 โ auditor watchdogs, continuous list handoff, and audit hardening (2026-09-01)
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
Configurable detached-auditor watchdog budgets (`auditorToolTimeoutMs` and
|
|
29
|
+
`auditorStallMs`, global-scope settings edited via `/glla` with plain-ms or
|
|
30
|
+
s/m/h duration input) replace the hardcoded 5-minute per-tool and 10-minute
|
|
31
|
+
no-progress defaults. Both dispatch sites now thread the configured values
|
|
32
|
+
into the parent watchdogs AND into the worker environment
|
|
33
|
+
(`GLLA_AUDITOR_TOOL_TIMEOUT_MS` / `GLLA_AUDITOR_STALL_MS`), so parent and
|
|
34
|
+
worker can never disagree about who kills first.
|
|
35
|
+
|
|
36
|
+
Adaptive timeout escalation for stalled auditor attempts: each consecutive
|
|
37
|
+
kill-and-restart of the same claim doubles the per-tool and first-event
|
|
38
|
+
budgets (capped at 4x the configured base), persisted on the durable claim
|
|
39
|
+
as `timeoutEscalation` so slow local models get a growing budget instead of
|
|
40
|
+
an identical kill-and-restart loop on every restart.
|
|
41
|
+
|
|
42
|
+
Progress-aware watchdog: the parent progress signature now includes streamed
|
|
43
|
+
report bytes, so an actively-streaming model (including extended thinking
|
|
44
|
+
between tool calls) registers as live progress instead of tripping the
|
|
45
|
+
no-progress kill; the quiet-phase UI warning is suppressed while a tool is
|
|
46
|
+
legitimately running inside its effective budget and shows the budget on
|
|
47
|
+
the live tool line.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
The recommended parallel-orchestration companion is now **pinned**
|
|
51
|
+
`pi-subagents@0.62.0` โ the power-max choice for GLLA. GLLA tracks its
|
|
52
|
+
versioned `subagent:*` lifecycle, durable async status artifacts, and v1
|
|
53
|
+
stop RPC while retaining a bounded compatibility path for older providers.
|
|
54
|
+
The model settings surface now uses the current `scout`/`researcher`/
|
|
55
|
+
`worker`/`reviewer`/`oracle`/`delegate` roles; current built-ins inherit
|
|
56
|
+
the parent model by default. Do not stack `@tintinweb/pi-subagents` or
|
|
57
|
+
`@quintinshaw/pi-dynamic-workflows` as a second orchestrator alongside it.
|
|
58
|
+
See `audit/SUBAGENT-PACKAGE-SELECTION-2026-09-01.md` (five-package power audit).
|
|
59
|
+
|
|
60
|
+
### Fixed
|
|
61
|
+
Completed standalone goals now hand off to an already-waiting list and arm
|
|
62
|
+
the same bounded completion-settle window used by list-item cascades. The
|
|
63
|
+
explicit `/glla resume` surface now hydrates and starts a waiting-only queue,
|
|
64
|
+
while aborts, loop ownership, suspicious-objective, sidecar, and persistence
|
|
65
|
+
fences remain intact. Waiting-list cards name `/glla resume` as the recovery
|
|
66
|
+
action and retain `/list next` for deliberate skip/selection.
|
|
67
|
+
|
|
68
|
+
Durable state transitions and deferred settle repaints now bypass the
|
|
69
|
+
periodic UI throttle, while unchanged activity/ticker updates remain
|
|
70
|
+
cadence-limited. A replacement host therefore gets its first paint and
|
|
71
|
+
meaningful durable status changes cannot remain visually stale.
|
|
72
|
+
|
|
73
|
+
Detached-auditor payload blocks now escape XML-like delimiters in goal,
|
|
74
|
+
completion, verification, and shield data so untrusted text cannot close a
|
|
75
|
+
prompt boundary or impersonate prompt structure.
|
|
76
|
+
|
|
77
|
+
TUI jitter under scout fan-out is fixed: the above-editor widget now shows
|
|
78
|
+
only the compact one-line summary `โ N agents ยท <busiest> silent Xm`
|
|
79
|
+
(bucketed 5s/<1m, 15s/<5m, 30s otherwise) instead of splicing 2 lines per
|
|
80
|
+
scout into the card. Detailed per-agent rows remain in `/glla agents` and
|
|
81
|
+
`--tail` as designed (docs/DESIGN-subagent-visibility.md), so height no
|
|
82
|
+
longer swings 4โ10 lines and the editor layout stays stable under
|
|
83
|
+
`scout x3` / 150+ tool-use fan-outs.
|
|
84
|
+
|
|
85
|
+
Recovery and session-handoff freshness now rejects future-dated sidecars,
|
|
86
|
+
preventing an edited or clock-skewed marker from triggering an unexpected
|
|
87
|
+
resume or deferred-list replay.
|
|
88
|
+
|
|
89
|
+
Tracked child transcript tails use the persisted session id for direct
|
|
90
|
+
lookup, so older children remain inspectable without an unbounded directory
|
|
91
|
+
scan. List-audit fan-out now reads the configured state root, including
|
|
92
|
+
`sessionDir`, instead of assuming `<cwd>/.pi-glla`.
|
|
93
|
+
|
|
3
94
|
## 0.36.1 โ crash-safe persistence and packed-release verification (2026-08-31)
|
|
4
95
|
|
|
5
96
|
### Fixed
|
package/INSTALL.md
CHANGED
|
@@ -38,19 +38,22 @@ and confirmation UX:
|
|
|
38
38
|
pi install npm:@juicesharp/rpiv-ask-user-question
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
add the optional parallel-worker companion:
|
|
41
|
+
For best automation and quality, add the **pinned parallel-orchestration companion** (`pi-subagents` 0.62.0) โ GLLA's power-max choice for `runs.all` fan-out, `runs.lanes` workerโreviewโfix chains, structured verification, worktree isolation, and durable recovery:
|
|
43
42
|
|
|
44
43
|
```bash
|
|
45
|
-
pi install npm
|
|
44
|
+
pi install npm:pi-subagents@0.62.0
|
|
46
45
|
```
|
|
47
46
|
|
|
48
47
|
GLLA's main continuation, queue, recovery, and detached auditor work without
|
|
49
|
-
it
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
it, but parallelism pays for its coordination when a goal has independent
|
|
49
|
+
research or implementation. Other companions are optional: `@pi-unipi/notify`
|
|
50
|
+
sends remote notifications, and `pi-chrome` enables logged-in browser research.
|
|
51
|
+
For a deeper completion check, choose a stronger auditor model in `/glla`;
|
|
52
|
+
a separate advisor extension is not required. Do not run `@tintinweb/pi-subagents`
|
|
53
|
+
or `@quintinshaw/pi-dynamic-workflows` as a second orchestrator alongside GLLA +
|
|
54
|
+
`pi-subagents` in the same session.
|
|
55
|
+
|
|
56
|
+
None of these companions is required for a basic GLLA goal.
|
|
54
57
|
|
|
55
58
|
Do not run another extension that drives agent turns at the same time as GLLA.
|
|
56
59
|
Likewise, avoid a second task queue or overlapping retry/compaction supervisor
|
package/LIST-PHILOSOPHY.md
CHANGED
|
@@ -85,6 +85,6 @@ Speculative feature branching across autonomous subagents creates **stale contex
|
|
|
85
85
|
### The Single-Trunk Operating Rule:
|
|
86
86
|
* **Serial Queue on `main`**: All queue items drain sequentially on the single primary working tree. Item $N+1$ always executes with 100% truthful, up-to-date context left by item $N$.
|
|
87
87
|
* **Transactional Green-or-Revert**: Every task either lands green (verified by tests and the detached auditor) and commits, or cleanly rolls back on `main` before the next backlog item is touched.
|
|
88
|
-
* **Safe Subagent Parallelism**: Subagents are used for **read-only research fan-out** (e.g. concurrent `
|
|
88
|
+
* **Safe Subagent Parallelism**: Subagents are used for **read-only research fan-out** (e.g. concurrent `scout` queries across subsystems in a single turn) or standalone verification, rather than speculative mutating branches.
|
|
89
89
|
|
|
90
90
|
See `INSTALL.md` for the command surface.
|
package/README.md
CHANGED
|
@@ -37,7 +37,9 @@ the long-running policy.
|
|
|
37
37
|
|
|
38
38
|
Use `/glla version` to inspect the installed version and compare it with the
|
|
39
39
|
registry. This checkout may contain unreleased changes; npm is authoritative
|
|
40
|
-
for published versions.
|
|
40
|
+
for published versions. The npm/Pi package listing displays this README from
|
|
41
|
+
the published tarball, so release the package after updating it when store
|
|
42
|
+
readers need the latest guidance.
|
|
41
43
|
|
|
42
44
|
## Is GLLA the right tool?
|
|
43
45
|
|
|
@@ -157,8 +159,8 @@ quietly inventing an unbounded backlog.
|
|
|
157
159
|
/list plan.md # import a checklist or plan file
|
|
158
160
|
/list # show active and waiting items
|
|
159
161
|
/list start # activate the queued head, or draft one clear recent request
|
|
160
|
-
/list next #
|
|
161
|
-
/list next <n> # choose a specific item
|
|
162
|
+
/list next # explicitly skip/activate the next item
|
|
163
|
+
/list next <n> # explicitly choose a specific item
|
|
162
164
|
/list resume # explicitly retry/resume the list
|
|
163
165
|
/list remove <n>
|
|
164
166
|
/list clear
|
|
@@ -167,13 +169,16 @@ quietly inventing an unbounded backlog.
|
|
|
167
169
|
|
|
168
170
|
Order is the default, not the law. Automatic advance normally uses the head of
|
|
169
171
|
the queue, while `/list next <n>` or the agent's `list_activate` tool can choose
|
|
170
|
-
another item. Numbering always matches `/list` output.
|
|
172
|
+
another item. Numbering always matches `/list` output. After a list item is
|
|
173
|
+
approved and archived, the next queued item starts automatically; no manual
|
|
174
|
+
`/list next` is needed between items.
|
|
171
175
|
|
|
172
176
|
If a saved item is malformed or needs a repair, the repair card preserves the
|
|
173
177
|
full original target, explains the concrete recovery action, and permits one
|
|
174
178
|
bounded bootstrap turn containing `propose_task_list`. Confirm the redraft;
|
|
175
|
-
automatic repeats are fenced. Use `/list resume`
|
|
176
|
-
|
|
179
|
+
automatic repeats are fenced. Use `/list resume` or `/glla resume` for an
|
|
180
|
+
intentional retry of a waiting/restored queue, and `/list next` when you
|
|
181
|
+
intentionally want to skip or choose another queued item. `/list start` is
|
|
177
182
|
also explicit: it activates the queued head, orโwhen the queue is emptyโuses
|
|
178
183
|
one clear recent user request as a seed for the normal Confirm-gated list
|
|
179
184
|
drafting flow. Ambiguous context is never queued automatically.
|
|
@@ -273,28 +278,40 @@ GLLA is the supervisor. These companions add capabilities around it:
|
|
|
273
278
|
previews, and Confirm dialogs for drafting and decisions. GLLA has a prose
|
|
274
279
|
fallback, but this is the intended UX.
|
|
275
280
|
|
|
276
|
-
###
|
|
277
|
-
|
|
278
|
-
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
281
|
+
### Recommended for power โ parallel orchestration (`pi-subagents`)
|
|
282
|
+
|
|
283
|
+
- **`pi-subagents` 0.62.0 (pinned) โ the power-max choice for GLLA.** Use it
|
|
284
|
+
when you want the best automation and quality: `runs.all` parallel fan-out,
|
|
285
|
+
`runs.lanes` workerโreviewโfix chains, `outputSchema` + `acceptance` structured
|
|
286
|
+
verification, `runs.host` gated shell, worktree isolation, model routing
|
|
287
|
+
(`subagents.defaultModel` / `subagentModelOverrides` / `modelScope`), durable
|
|
288
|
+
missions/schedules/recovery, and versioned control RPC. Built-ins are `scout`,
|
|
289
|
+
`researcher`, `worker`, `reviewer`, `oracle`, `delegate` plus external-CLI
|
|
290
|
+
writers (`claude-code-writer` etc.); all inherit the parent model by default
|
|
291
|
+
so there is no hidden Explore/Plan quota pool. This is the companion GLLA
|
|
292
|
+
supervises via `subagent:*` lifecycle events + durable `status.json` + versioned
|
|
293
|
+
stop RPC (ownership/generation-checked). GLLA's `subagentModelOverrides`
|
|
294
|
+
can still pin an individual role.
|
|
284
295
|
|
|
285
296
|
The main pi session remains the owner of the goal/list/loop; subagents are
|
|
286
|
-
workers and cannot silently replace the parent's objective.
|
|
297
|
+
workers and cannot silently replace the parent's objective. A short or mostly
|
|
298
|
+
sequential goal can still run cleanly without workers โ install when
|
|
299
|
+
parallelism will pay for its coordination and model usage.
|
|
287
300
|
|
|
288
|
-
Install
|
|
301
|
+
Install (or keep pinned):
|
|
289
302
|
|
|
290
303
|
```bash
|
|
291
|
-
pi install npm
|
|
304
|
+
pi install npm:pi-subagents@0.62.0
|
|
292
305
|
```
|
|
293
306
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
different
|
|
307
|
+
Do not install the older `@tintinweb/pi-subagents` provider alongside this
|
|
308
|
+
recommendation in the same session. Existing Tintin-era agent files are
|
|
309
|
+
cleaned only when GLLA's management marker proves that GLLA owns them; old
|
|
310
|
+
settings are not silently remapped to a different role. Do not stack
|
|
311
|
+
`@quintinshaw/pi-dynamic-workflows` as a competing orchestrator alongside
|
|
312
|
+
GLLA + `pi-subagents` in the same session โ duplicate tools and competing
|
|
313
|
+
orchestration events create ambiguous ownership. Use its quality helpers
|
|
314
|
+
(`verify`/`judgePanel`/`loopUntilDry`) only as isolated complements if needed.
|
|
298
315
|
|
|
299
316
|
### Useful, but optional
|
|
300
317
|
|
|
@@ -342,7 +359,9 @@ tree.
|
|
|
342
359
|
The state is inspectable: active JSONL, goal markdown, queue state, audit jobs,
|
|
343
360
|
ledger history, and archived goals are kept under `.pi-glla/` (or the selected
|
|
344
361
|
session root). Repository audit findings remain repository-only; the npm package
|
|
345
|
-
ships the user-facing docs, not local audit history.
|
|
362
|
+
ships the user-facing docs, not local audit history. The list-audit findings
|
|
363
|
+
file and its fan-out follow the same selected state root, including the
|
|
364
|
+
opt-in `sessionDir` root.
|
|
346
365
|
|
|
347
366
|
### Recovery behavior
|
|
348
367
|
|
package/docs/DESIGN.md
CHANGED
|
@@ -633,6 +633,46 @@ shapes (details in CHANGELOG.md; each is pinned by tests):
|
|
|
633
633
|
that NEVER moves gets its own loud bounded stop. Audit loops keep their
|
|
634
634
|
purpose-built deferred-baseline + reprieve semantics verbatim.
|
|
635
635
|
|
|
636
|
+
## Addendum v0.36.3 (subagent orchestration โ power-max pin)
|
|
637
|
+
|
|
638
|
+
- **One pinned orchestrator**: `pi-subagents@0.62.0` is the power-max companion
|
|
639
|
+
for GLLA. Capability ceiling chosen over minimalism: `runs.all` parallel
|
|
640
|
+
fan-out, `runs.lanes` workerโreviewโfix chains, `outputSchema` +
|
|
641
|
+
`acceptance` structured verification, `runs.host` gated shell, worktree
|
|
642
|
+
isolation, model routing (`subagents.defaultModel` / `subagentModelOverrides`
|
|
643
|
+
/ `modelScope`), missions/schedules, and durable recovery. GLLA supervises
|
|
644
|
+
via `subagent:async-started` + durable `status.json` + versioned stop RPC
|
|
645
|
+
(ownership/generation-checked). The 0.x pin is exact because the 93k-line
|
|
646
|
+
surface moves fast; upgrades run a compatibility canary.
|
|
647
|
+
- **One owner, no stacking**: `@tintinweb/pi-subagents` (legacy),
|
|
648
|
+
`@narumitw/pi-subagents` (minimal without durable status/workflow), and
|
|
649
|
+
`@quintinshaw/pi-dynamic-workflows` (complement-only LLM-vote helpers) are
|
|
650
|
+
not stacked as second orchestrators in the same session โ duplicate tools and
|
|
651
|
+
competing events create ambiguous ownership. `@juicesharp/rpiv-advisor`
|
|
652
|
+
remains a composable second-opinion reviewer.
|
|
653
|
+
|
|
654
|
+
## Addendum v0.36.2 (continuous list handoff)
|
|
655
|
+
|
|
656
|
+
- **A list is a continuous work plan**: after a standalone goal reaches a
|
|
657
|
+
successful terminal archive, an already-waiting queue is handed to the same
|
|
658
|
+
activation choke point used by list-item completion. The bounded
|
|
659
|
+
`LIST_COMPLETION_SETTLE_MS` window still protects the first successor
|
|
660
|
+
continuation from the host's completion acknowledgement settling. User
|
|
661
|
+
aborts do not auto-advance, and one-active-thing, suspicious-objective,
|
|
662
|
+
sidecar, persistence, carryover, and loop-owner fences remain authoritative.
|
|
663
|
+
- **Resume repairs waiting queues**: `/glla resume` hydrates durable queue
|
|
664
|
+
sidecars, records `list_queue_resume`, and explicitly activates the waiting
|
|
665
|
+
head when no higher-priority goal, loop, auditor, or provider-recovery plane
|
|
666
|
+
owns the surface. Cold-load automation remains consent-gated; this command
|
|
667
|
+
is the consent boundary.
|
|
668
|
+
- **Selection remains explicit**: `/list next` is still available for a
|
|
669
|
+
deliberate skip or non-head choice. It is no longer required between
|
|
670
|
+
successful list items.
|
|
671
|
+
|
|
672
|
+
## Addendum v0.37.1 (folder-scoped audits)
|
|
673
|
+
|
|
674
|
+
- **Primary scope is the cwd project**: `listAuditCollectTarget`, `projectAuditTarget`, and `auditTarget` now state "current project rooted at the cwd where pi was opened (treat any nested .git as a separate project boundary โ do not walk into parent or sibling projects)". The TIGHT scout brief is "named directories under cwd" โ external code outside cwd may be READ only to diagnose a failure that blocks the current project, and a finding about external code is valid only when it affects the current project (a typo in an unrelated sibling project is out of scope and never auto-queued). This closes the "audit the parent when you opened a subproject" leak observed when hellhunter was audited from the dracon-platform root and vice-versa.
|
|
675
|
+
|
|
636
676
|
## Files
|
|
637
677
|
|
|
638
678
|
- `docs/DESIGN.md` โ **this file**
|
package/docs/INDEX.md
CHANGED
|
@@ -10,15 +10,15 @@ shipped in the npm tarball (see "Repository-only material" below).
|
|
|
10
10
|
|
|
11
11
|
For shipped docs, the relevant entry points are:
|
|
12
12
|
|
|
13
|
-
- `../CHANGELOG.md` โ user-facing changelog;
|
|
14
|
-
current
|
|
13
|
+
- `../CHANGELOG.md` โ user-facing changelog; an `Unreleased` section may lead
|
|
14
|
+
the file, followed by the current released version. v0.35.5 adopted the six-label completion
|
|
15
15
|
recap; v0.35.6 added typed-boundary regression pins; v0.35.7 added
|
|
16
16
|
deterministic fast-fail pre-audits, zero-pause autonomous execution, and
|
|
17
17
|
task milestone gating; v0.35.8 added main-model preferred-primary
|
|
18
18
|
failback; v0.35.9 hardened cross-version npm tarball checks; v0.35.10
|
|
19
19
|
handles multi-entry npm dry-run reports; v0.35.11 accepts both npm report
|
|
20
20
|
shapes; v0.35.12 supports npm 12's keyed pack reports; v0.35.13 fixes stale-API recovery loops.
|
|
21
|
-
v0.35.14โv0.
|
|
21
|
+
v0.35.14โv0.37.2 continue through the supervisor freeze (`/glla pause`),
|
|
22
22
|
load hold, auditor picker parity, Windows launch fix, zombie-watchdog
|
|
23
23
|
subagent carve-out, due-wait backstop, the `/glla agents` visibility panel,
|
|
24
24
|
durable state-root selection, blank-until-resume auditor context, frozen
|
|
@@ -29,16 +29,16 @@ For shipped docs, the relevant entry points are:
|
|
|
29
29
|
trail.
|
|
30
30
|
- `../README.md` โ what the plugin is, install, quickstart, and the
|
|
31
31
|
architectural guarantee (drafting + confirm + detached auditor).
|
|
32
|
-
- `../INSTALL.md` โ
|
|
32
|
+
- `../INSTALL.md` โ source install / local development setup; the recommended
|
|
33
33
|
companion plugins and the `auditor reads / writes are path-checked`
|
|
34
34
|
note.
|
|
35
35
|
|
|
36
36
|
## Entry points
|
|
37
37
|
- `../README.md` โ what the plugin is, install, quickstart
|
|
38
|
-
- `../INSTALL.md` โ
|
|
39
|
-
- `../CHANGELOG.md` โ user-facing changelog;
|
|
40
|
-
|
|
41
|
-
registry).
|
|
38
|
+
- `../INSTALL.md` โ source install / local development setup
|
|
39
|
+
- `../CHANGELOG.md` โ user-facing changelog; the first versioned heading is
|
|
40
|
+
the current released package version (use `/glla version` to compare with
|
|
41
|
+
the registry); post-release work may appear in `Unreleased` above it.
|
|
42
42
|
|
|
43
43
|
## Architecture
|
|
44
44
|
- `DESIGN.md` โ plugin design (types, state, extension lifecycle)
|
|
@@ -29,6 +29,8 @@ export type AgentPhase = "queued" | "active" | "hung" | "ended" | "unknown";
|
|
|
29
29
|
|
|
30
30
|
export interface AgentsPanelRow {
|
|
31
31
|
recordId: string;
|
|
32
|
+
/** Persisted pi session id, when the subagent runtime exposes it. */
|
|
33
|
+
sessionId?: string;
|
|
32
34
|
agentType?: string;
|
|
33
35
|
summary?: string;
|
|
34
36
|
status: AgentStatus;
|
|
@@ -163,7 +165,11 @@ export function renderAgentsWidgetLines(rows: AgentsPanelRow[], now = Date.now()
|
|
|
163
165
|
return lines;
|
|
164
166
|
}
|
|
165
167
|
|
|
166
|
-
/** The compact footer summary: count + the least-live child.
|
|
168
|
+
/** The compact footer summary: count + the least-live child.
|
|
169
|
+
* v0.37.1 (ui-jitter fix): bucket the silent age so the status/widget
|
|
170
|
+
* text stays stable between ticks โ a per-second change made the footer
|
|
171
|
+
* and widget keys differ every 2s, forcing a TUI re-layout that looked
|
|
172
|
+
* like "jumping" under heavy scout fan-out. */
|
|
167
173
|
export function renderAgentsWidgetLine(rows: AgentsPanelRow[]): string | undefined {
|
|
168
174
|
const active = rows.filter((r) => r.status !== "ended");
|
|
169
175
|
if (active.length === 0) return undefined;
|
|
@@ -173,7 +179,16 @@ export function renderAgentsWidgetLine(rows: AgentsPanelRow[]): string | undefin
|
|
|
173
179
|
: busiest.status === "hung"
|
|
174
180
|
? " โ "
|
|
175
181
|
: "";
|
|
176
|
-
return `โ ${active.length} agent${active.length === 1 ? "" : "s"} ยท ${cleanField(busiest.agentType ?? "subagent", 18)} silent ${fmtDuration(busiest.silentMs)}${hung}`;
|
|
182
|
+
return `โ ${active.length} agent${active.length === 1 ? "" : "s"} ยท ${cleanField(busiest.agentType ?? "subagent", 18)} silent ${fmtDuration(bucketSilentMs(busiest.silentMs))}${hung}`;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** Bucket silentMs to coarser granularity for display stability:
|
|
186
|
+
* <1m โ 5s buckets, <5m โ 15s, otherwise 30s. The underlying
|
|
187
|
+
* hung classification still uses the exact value. */
|
|
188
|
+
function bucketSilentMs(ms: number): number {
|
|
189
|
+
if (ms < 60_000) return Math.floor(ms / 5000) * 5000;
|
|
190
|
+
if (ms < 300_000) return Math.floor(ms / 15_000) * 15_000;
|
|
191
|
+
return Math.floor(ms / 30_000) * 30_000;
|
|
177
192
|
}
|
|
178
193
|
|
|
179
194
|
export interface TranscriptTailResult {
|
|
@@ -206,7 +221,7 @@ function parsedSessionInfoName(content: Buffer): string | undefined {
|
|
|
206
221
|
* tail/head readers. */
|
|
207
222
|
export function tailChildTranscript(
|
|
208
223
|
sessionsDir: string,
|
|
209
|
-
row: { recordId: string; agentType?: string; summary?: string },
|
|
224
|
+
row: { recordId: string; sessionId?: string; agentType?: string; summary?: string },
|
|
210
225
|
opts: {
|
|
211
226
|
lines?: number;
|
|
212
227
|
readFile?: (file: string, maxBytes?: number) => Buffer;
|
|
@@ -246,7 +261,19 @@ export function tailChildTranscript(
|
|
|
246
261
|
.map((f) => ({ f, mtime: statMtime(f) }))
|
|
247
262
|
.sort((a, b) => b.mtime - a.mtime);
|
|
248
263
|
let matched: string | undefined;
|
|
249
|
-
|
|
264
|
+
// Pi names session files `<timestamp>_<sessionId>.jsonl`. Prefer the exact
|
|
265
|
+
// session id from the manager/event record so an old tracked child remains
|
|
266
|
+
// discoverable without turning the main-thread fallback into an unbounded
|
|
267
|
+
// full-directory scan. Identity in session_info.name remains authoritative.
|
|
268
|
+
const sessionId = row.sessionId?.trim();
|
|
269
|
+
const directCandidates = sessionId
|
|
270
|
+
? candidates.filter(({ f }) => {
|
|
271
|
+
const base = path.basename(f);
|
|
272
|
+
return base === `${sessionId}.jsonl` || base.endsWith(`_${sessionId}.jsonl`);
|
|
273
|
+
})
|
|
274
|
+
: [];
|
|
275
|
+
const recentCandidates = candidates.filter((candidate) => !directCandidates.includes(candidate)).slice(0, 25);
|
|
276
|
+
const candidatesToScan = [...directCandidates, ...recentCandidates];
|
|
250
277
|
if (expectedSessionName) for (const candidate of candidatesToScan) {
|
|
251
278
|
try {
|
|
252
279
|
// Check the bounded tail first so the existing scan remains the first
|
|
@@ -266,7 +293,7 @@ export function tailChildTranscript(
|
|
|
266
293
|
return {
|
|
267
294
|
ok: false,
|
|
268
295
|
lines: [],
|
|
269
|
-
detail: `no session file in ${sessionsDir} matches this child (searched ${candidatesToScan.length}${
|
|
296
|
+
detail: `no session file in ${sessionsDir} matches this child (searched ${candidatesToScan.length}${candidatesToScan.length < candidates.length ? ` of ${candidates.length}` : ""} transcripts for exact identity in session_info.name: ${expectedSessionName ? `"${truncate(expectedSessionName, 32)}"` : "none"}) โ the child may not persist a session, or it lives under another working directory`,
|
|
270
297
|
};
|
|
271
298
|
}
|
|
272
299
|
try {
|
|
@@ -36,7 +36,7 @@ import type { SettingsSectionId } from "./settings-menu.js";
|
|
|
36
36
|
import { cmdLoop, clearLoopTimer, finishLoopGit, isLoopActive, scheduleLoopTick } from "./goal-loop.js";
|
|
37
37
|
import { chooseObjectiveConflict, liveObjectives } from "./goal-objective-conflict.js";
|
|
38
38
|
import { formatGllaVersion } from "./glla-version.js";
|
|
39
|
-
import { cancelDetachedGoalCompletionAuditor, cleanupDeadAuditJobs, inspectAuditJobHealth } from "./goal-loop-auditor-process.js";
|
|
39
|
+
import { cancelDetachedGoalCompletionAuditor, cleanupDeadAuditJobs, inspectAuditJobHealth, DEFAULT_AUDITOR_STALL_MS, DEFAULT_AUDITOR_TOOL_TIMEOUT_MS } from "./goal-loop-auditor-process.js";
|
|
40
40
|
import { releaseAuditorSurface } from "./loops/goal-auditor-surface.js";
|
|
41
41
|
import { inferStartFromSession, type StartContextInference } from "./start-context.js";
|
|
42
42
|
|
|
@@ -2245,12 +2245,29 @@ async function cmdGllaResume(ctx: ExtensionContext): Promise<void> {
|
|
|
2245
2245
|
scheduleLoopTick(ctx);
|
|
2246
2246
|
return;
|
|
2247
2247
|
}
|
|
2248
|
+
// A waiting queue is resumable work even when its previous goal has already
|
|
2249
|
+
// archived. `/glla resume` is explicit consent for this handoff, so it must
|
|
2250
|
+
// start the head instead of reporting "Nothing to resume". Normal list
|
|
2251
|
+
// completion still advances automatically; this branch covers a waiting
|
|
2252
|
+
// queue left by a legacy run, a completed standalone goal, or a cold load.
|
|
2253
|
+
// Hydrate sidecars too: a prior process may have published queue work after
|
|
2254
|
+
// the last state snapshot, and `/glla resume` must not mistake that durable
|
|
2255
|
+
// queue for an empty one.
|
|
2256
|
+
hydrateListQueueFromDisk(ctx);
|
|
2257
|
+
const waitingListCount = listQueue().length;
|
|
2258
|
+
if (waitingListCount > 0) {
|
|
2259
|
+
appendLedger(ctx.cwd, "list_queue_resume", { waiting: waitingListCount, via: "glla-resume" });
|
|
2260
|
+
ctx.ui.notify(`Resuming the waiting list โ starting its next item (${waitingListCount} waiting).`, "info");
|
|
2261
|
+
if (activateNextListItem(ctx)) return;
|
|
2262
|
+
ctx.ui.notify("The waiting list remains queued because its head could not be activated. Use /list show for the reason.", "warning");
|
|
2263
|
+
return;
|
|
2264
|
+
}
|
|
2248
2265
|
if (clearedSupervisorPause) {
|
|
2249
2266
|
// The pause was the only thing being resumed โ do not follow it with a
|
|
2250
2267
|
// misleading "Nothing to resume".
|
|
2251
2268
|
return;
|
|
2252
2269
|
}
|
|
2253
|
-
ctx.ui.notify("Nothing to resume โ no paused goal/list-item, no held loop. /goal, /list, or /loop to start something.", "info");
|
|
2270
|
+
ctx.ui.notify("Nothing to resume โ no paused goal/list-item, no held loop, or waiting list. /goal, /list, or /loop to start something.", "info");
|
|
2254
2271
|
}
|
|
2255
2272
|
|
|
2256
2273
|
/**
|
|
@@ -2673,6 +2690,8 @@ async function cmdSettings(args: string, ctx: ExtensionContext): Promise<void> {
|
|
|
2673
2690
|
fmt("auditorSameSessionSwap", "auditorSameSessionSwap"),
|
|
2674
2691
|
fmt("auditorSilent", "auditorSilent"),
|
|
2675
2692
|
fmt("auditorProgressSignals", "auditorProgressSignals"),
|
|
2693
|
+
`auditorToolTimeoutMs: ${((effectiveSettings.auditorToolTimeoutMs ?? DEFAULT_AUDITOR_TOOL_TIMEOUT_MS) / 60000).toString()}m [${prov.auditorToolTimeoutMs?.source ?? "default"}]`,
|
|
2694
|
+
`auditorStallMs: ${((effectiveSettings.auditorStallMs ?? DEFAULT_AUDITOR_STALL_MS) / 60000).toString()}m [${prov.auditorStallMs?.source ?? "default"}]`,
|
|
2676
2695
|
fmt("hourlyRetryProbe", "hourlyRetryProbe"),
|
|
2677
2696
|
fmt("subagentModelStrategy", "subagentModelStrategy"),
|
|
2678
2697
|
fmt("subagentModelOverrides", "subagentModelOverrides"),
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
isStaleApiError,
|
|
48
48
|
supervisorPaused,
|
|
49
49
|
objectiveIsUserSeeded,
|
|
50
|
+
isMonitorGoal,
|
|
50
51
|
type Goal,
|
|
51
52
|
type ObjectiveRepairTarget,
|
|
52
53
|
} from "./goal-loop-core.js";
|
|
@@ -63,6 +64,12 @@ import {
|
|
|
63
64
|
} from "./goal-loop-dispatch.js";
|
|
64
65
|
import { BACKOFF_IDLE_RETRY_MS, HEARTBEAT_MAX_NUDGES } from "./goal-loop-backoff.js";
|
|
65
66
|
import { LENGTH_CONTINUE_MAX, LENGTH_CONTINUE_TEXT } from "./length-continue.js";
|
|
67
|
+
|
|
68
|
+
const DEFAULT_MONITOR_CHECK_INTERVAL_MS = 120_000;
|
|
69
|
+
const configuredMonitorIntervalMs = Number(process.env.GLLA_MONITOR_INTERVAL_MS);
|
|
70
|
+
const MONITOR_CHECK_INTERVAL_MS = Number.isFinite(configuredMonitorIntervalMs) && configuredMonitorIntervalMs > 0
|
|
71
|
+
? Math.max(1_000, configuredMonitorIntervalMs)
|
|
72
|
+
: DEFAULT_MONITOR_CHECK_INTERVAL_MS;
|
|
66
73
|
import { VISION_ASSIST_GUIDANCE } from "./vision-assist.js";
|
|
67
74
|
import { loadSettings } from "./goal-settings.js";
|
|
68
75
|
import { clearLoopTimer, isLoopActive } from "./goal-loop.js";
|
|
@@ -991,6 +998,10 @@ export function scheduleContinuation(ctx: ExtensionContext, force = false, delay
|
|
|
991
998
|
} catch {
|
|
992
999
|
return;
|
|
993
1000
|
}
|
|
1001
|
+
// v0.37.x: monitor goals (daemon, long-running >1h) check less frequently to avoid constant QUEUED churn.
|
|
1002
|
+
if (delayMs === undefined && state.goal && isMonitorGoal(state.goal)) {
|
|
1003
|
+
delay = Math.max(delay, MONITOR_CHECK_INTERVAL_MS);
|
|
1004
|
+
}
|
|
994
1005
|
// v0.34.104 ([Image-#1]): the post-list-completion settle window delays
|
|
995
1006
|
// the first continuation after a queue auto-advance. Any real agent
|
|
996
1007
|
// activity during the window clears `postCompletionSettleUntil`, so a
|
|
@@ -1259,7 +1270,7 @@ export function continuationPrompt(goal: Goal): string {
|
|
|
1259
1270
|
}
|
|
1260
1271
|
if (effSettings.aggressiveMode && isFullAuditObjective(goal.objective)) {
|
|
1261
1272
|
directives.push(
|
|
1262
|
-
"## FULL-AUDIT MODE (aggressiveMode + survey objective)\n\nThis objective is a survey, not a single fix. Spawn 3+ `
|
|
1273
|
+
"## FULL-AUDIT MODE (aggressiveMode + survey objective)\n\nThis objective is a survey, not a single fix. Spawn 3+ `scout` subagents NOW โ one per subsystem, in a single message so they run in parallel โ synthesize their findings, and call `propose_task_list` with the result. Do not start fixing before the task list exists.",
|
|
1263
1274
|
);
|
|
1264
1275
|
}
|
|
1265
1276
|
// v0.35.x: include the latest auditor report in the continuation prompt so
|