ceulen 0.26.2 → 0.28.0

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 CHANGED
@@ -1,5 +1,117 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.28.0 — 2026-11-18
4
+
5
+ **Rex is now a first-class subagent delegation backend.** ceulen's visible-pane
6
+ delegation knew the herdr TUI (`HERDR_ENV`) and the Herdr desktop app
7
+ (`HC_TERMINAL_ID`, herdr-app + `hc`) — inside **Rex** (the `rex` CLI + server,
8
+ `REX_SESSION`) every dispatch silently fell back to the in-process SDK runner
9
+ and the `herdr` control tool refused to run at all. New
10
+ `subagent/lib/rex.ts` plus a runner/control-tool rewire fixes that: one WINDOW
11
+ per agent type (`rex window new`, adopted when already labelled), one PANE per
12
+ instance (`rex split` beside the window's last tiled block), the child pi
13
+ started by the block's command with the same persona/model/thinking/tools
14
+ contract, and reports through the same file/inline delivery contract.
15
+
16
+ - **Auto-detection, no new settings.** `REX_SESSION` plus a `rex` binary that
17
+ answers `rex version` (Rex has no `--version`) selects the backend.
18
+ Resolution order is herdr TUI → rex → herdr-app → sdk, and an explicit
19
+ `runner:"herdr"` still keeps its "not running inside herdr" error instead of
20
+ silently re-routing. `subagent.herdr:"off"` and the `PI_SUBAGENT_HERDR=off`
21
+ child guard disable delegation on all three backends.
22
+ - **No turn-following primitive, so the turn proof is a timestamp.** `rex wait`
23
+ waits for a block to EXIT, which is useless for a long-lived pi, so
24
+ `promptRexAndWait` is built from `program_status` polling (OSC 7501, which pi
25
+ publishes): readiness gate → `block send` + `block send-key enter` → poll.
26
+ With no turn counter, a settle is accepted only when the ROOT status record's
27
+ `updated_at` moved past the pre-paste baseline (or the child was seen
28
+ working), so a paste that never submitted reports "pasted but never
29
+ submitted" instead of being collected as a success.
30
+ - **`format` answers a head slice.** Any reply carrying a blob `id` is re-read
31
+ from `total - N` via `blob_read`; asking for the whole scrollback would park
32
+ megabytes in the parent's context, and trusting the head silently returned
33
+ boot chrome instead of the child's reply (found live while gating this
34
+ release).
35
+ - **Rex children DO get environment variables** by way of a `/usr/bin/env`
36
+ command wrapper — unlike herdr-app — so they carry the advisor review marker
37
+ (the parent waits for the child's own advisor before collecting) *and* the
38
+ `PI_SUBAGENT_HERDR=off` recursion guard plus `CEULEN_THINK_GATE_OFF=1`.
39
+ - **Echo is never a report.** A pane capture is cut to the text after the
40
+ delivery contract (falling back to the task echo), and an echo-only pane
41
+ yields no output, so the dispatch fails loudly.
42
+ - **Full control surface, scoped.** The `herdr` tool gained a rex branch for
43
+ list/status/read/prompt/cancel/focus/close-tab/forget. Mutating actions only
44
+ touch agents this session delegated, `close-tab` closes the rex WINDOW and
45
+ refuses while a sibling is busy or its state is unverifiable, and adopted
46
+ windows (label match) are never close-eligible. `RunnerKind`,
47
+ `SubagentDetails.runner` and the widget's pane-label gate all carry `rex`.
48
+ - **CLI quirks encoded, each with a regression test:** `rex block call` takes
49
+ SHORT method names (the fully-qualified name is rejected), and
50
+ `rex session inspect` takes the session POSITIONALLY and rejects the global
51
+ `-s` prefix (the prefixed form made every window adoption fail with "window
52
+ has no block to split beside").
53
+
54
+ Verified: `tsc --noEmit` clean; full `npm test` **3019 pass / 0 fail / 3
55
+ env-gated skips** (32 of them in the new `test/rex.test.ts`); `npm pack
56
+ --dry-run` ships `lib/rex.ts` + its suite. Live-verified against a running Rex
57
+ server: single dispatch, window adoption, write-capable report-file agents,
58
+ parallel (multi-agent-type) and chain (`{previous}`) modes, read-only inline
59
+ collection, the full `herdr` control surface (including the busy-sibling
60
+ refusal and stale-entry `forget`), `runner:"sdk"` pinning, and
61
+ `background:true` correctly staying in-process with an honest receipt.
62
+
63
+ ## 0.27.0 — 2026-11-17
64
+
65
+ **herdr-app is now a first-class subagent delegation backend.** ceulen's
66
+ visible-pane delegation only knew the herdr TUI (`herdr` CLI, `HERDR_ENV`), so
67
+ inside the Herdr desktop app (`HC_TERMINAL_ID`, `herdr-app` + herdr-core `hc`)
68
+ every dispatch silently fell back to the in-process SDK runner and the `herdr`
69
+ control tool refused to run at all. New `subagent/lib/herdr-app.ts` plus a
70
+ runner/control-tool rewire fixes that: one tab per agent type
71
+ (`herdr-app do tab.new`), one pane per instance, tasks via `hc send --wait`,
72
+ reports via the same file/inline contract, and the full
73
+ list/status/read/prompt/cancel/focus/close-tab/forget surface driven by `hc`.
74
+
75
+ - **Auto-detection, no new settings.** `HC_TERMINAL_ID` selects the app
76
+ backend; `subagent.herdr:"off"` and the `PI_SUBAGENT_HERDR=off` child guard
77
+ still disable delegation everywhere, and an explicit `runner:"herdr"`
78
+ outside the TUI keeps its existing error.
79
+ - **Readiness gate + turn-advance proof (live incident).** `hc send` pastes
80
+ into whatever is on screen; against a booting child the task sat unsent in
81
+ its composer while `hc send --wait` still reported a settled turn, so the
82
+ parent collected its own echoed task as success. The backend now waits for a
83
+ live input-ready pi and refuses a "settled" reply whose turn never advanced.
84
+ - **No more echo collected as a report.** A pane capture is cut to the text
85
+ after the delivery contract; an echo-only pane yields no output, so the
86
+ dispatch fails loudly instead of returning a false success.
87
+ - **`done` counts as ready.** pi reports `done` for a turn that finished
88
+ unwatched; accepting only `idle` made every follow-up `herdr prompt` to a
89
+ settled agent wait 120 s and fail.
90
+ - **Pane-capture provenance is DATA, not a text prefix.** The
91
+ `[best-effort pane capture]` prefix travelled into `{previous}` chain
92
+ substitution, and the next child read the marker as a prompt-injection
93
+ signal and derailed. It is now `SubAgentResult.bestEffort`, rendered where a
94
+ human reads it (`⚠ best-effort pane capture`).
95
+ - **Chain results carry every step.** `formatChainReport` (lib/render.ts)
96
+ appends a per-step section (status, report, worktree patch, provenance)
97
+ after the final output — `{previous}` only ever forwards one step, so
98
+ intermediate findings used to vanish from the result.
99
+
100
+ Also fixed (test hygiene, found while gating this release): the web settings
101
+ suites scrubbed a HAND-LISTED subset of the mapped env vars before asserting
102
+ "settings supply this value". Any machine whose `.env.local` carries a var
103
+ missing from that list (here `WEB_CHAT_API_BASE_URL`) saw red locally while CI
104
+ stayed green, because env legitimately wins over settings. Both suites now
105
+ scrub `ENV_TO_SETTINGS_KEY` in full, so the assertions hold on a developer
106
+ machine and in CI alike.
107
+
108
+ Verified: `tsc --noEmit` clean; full `npm test` **2987 pass / 0 fail / 3
109
+ env-gated skips** (a2a mDNS, web a11y Chrome); `npm pack --dry-run` clean.
110
+ Live-verified end-to-end inside a running Herdr app: all five bundled agents
111
+ (scout/tester/worker/planner/reviewer) delegated to real app panes across
112
+ single, parallel and chain modes, through both the read-only inline channel
113
+ and the report-file channel.
114
+
3
115
  ## 0.26.2 — 2026-11-15
4
116
 
5
117
  Pi 1.5.2 support (pi 1.5.0 → 1.5.2 diffed surface by surface; the peer
@@ -152,7 +152,7 @@ export const MODULES: ModuleEntry[] = [
152
152
  // Subagent after ponytail: ponytail's tool_call hook injects into the
153
153
  // `subagent` tool's instructions param — hooks resolve at call time, so
154
154
  // order is not load-bearing; this is grouping readability.
155
- { name: "subagent", category: "Tasks", describe: "In-process subagents: scout/tester/worker/planner/reviewer agents, role-based model pools, classifier tier+thinking routing, background tasks with liveness, herdr delegation.", load: subagentModule, config: subagentConfig },
155
+ { name: "subagent", category: "Tasks", describe: "In-process subagents: scout/tester/worker/planner/reviewer agents, role-based model pools, classifier tier+thinking routing, background tasks with liveness, herdr/rex pane delegation.", load: subagentModule, config: subagentConfig },
156
156
  // Plan after subagent: its tool gating reads subagent agent frontmatter
157
157
  // (sandbox: read-only) and its before_agent_start must compose BEFORE
158
158
  // steering (the last prompt rewriter — see its entry below).