Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
9aabe3b
feat(bin): defer the wedge escalation for a lane parked at a supervis…
aminry Sep 20, 2026
1b1b3cd
fix(bin): reclaim a task whose herdr endpoint was destroyed (#5007)
RooseveltAdvisors Sep 20, 2026
a09090d
feat(bin): stamp status events with their emission time (#3764)
tiago-peixoto Sep 20, 2026
c443d8c
fix(bin): unify Lavish host and disconnect handling (#5060)
kunchenguid Sep 20, 2026
dee119b
feat: act on captain's away words during AFK supervision (#5076)
kunchenguid Sep 20, 2026
804394e
fix(bin): render the remote charter's steering-inbox path host-local …
kesslerio Sep 21, 2026
bd65e4a
feat: route Lavish feedback directly to owning workers (#5099)
kunchenguid Sep 21, 2026
b8ab735
fix(bin): fit pull observation within the contribution poll budget (#…
sdivanl Sep 21, 2026
631bc26
feat(bin): add idempotent inbox capture, replies, receipts, and readi…
cliflacata-svg Sep 21, 2026
d08e327
fix(bin): stop harness footer rows below a composer from reading as p…
puntkoen Sep 21, 2026
fcbaa73
feat(bin): append optional home-local include to briefs (#5115)
guanchengh-lgtm Sep 21, 2026
43bf6d3
fix(bin): report a branch with no validation run as absent instead of…
Authentis Sep 21, 2026
dbc0bc4
fix(bin): require a non-draft pull request before a PR-based done rep…
mremond Sep 21, 2026
259a669
fix: support quota-axi schema 6 snapshots (#4904)
pedromuller-del Sep 21, 2026
aec043c
test: fix Claude session-start drain live E2E (#5165)
kunchenguid Sep 21, 2026
8c1cdb7
ci: pin the no-mistakes required check to v1.80.1 (#5195)
kunchenguid Sep 21, 2026
3fcbc6c
fix(bin): retain Pi watcher predecessor to stop false down alarms (#5…
sdivanl Sep 22, 2026
da9607d
fix(bin): allow cleanup of windowless legacy task records (#5236)
kunchenguid Sep 22, 2026
f9f74a1
ci: exempt kunchenguid from the no-mistakes required check (#5256)
kunchenguid Sep 22, 2026
6f0f139
fix(bin): surface launches parked on an interactive prompt as not-sta…
sdivanl Sep 22, 2026
f5735dc
fix: record away posture immediately on /afk (#5260)
kunchenguid Sep 22, 2026
c5131a3
fix(bin): recognize passed-with-override as a passing outcome (#5294)
mremond Sep 22, 2026
ada21f5
fix: clean up workers after their pull requests land (#5317)
kunchenguid Sep 22, 2026
d92cea0
fix: surface green no-mistakes PRs awaiting merge (#5327)
kunchenguid Sep 22, 2026
884d76b
fix: derive Lavish polling route from board session (#5334)
kunchenguid Sep 22, 2026
dd9f2b4
fix(bin): stop secondmate relaunch failing when watcher scratch files…
tiago-peixoto Sep 22, 2026
39f4c2a
fix(bin): stop each keyed answer from re-waking this home (#4907)
tiago-peixoto Sep 22, 2026
706254d
fix: deliver failed public follow-ups with updated AXI floors (#5350)
kunchenguid Sep 23, 2026
a8a2959
fix(bin): refuse ship done: when the named head exists only in the wo…
tiago-peixoto Sep 23, 2026
82dec2e
fix(bin): ring a proven-idle secondmate before raising a wake-loop st…
tiago-peixoto Sep 23, 2026
a5d78f8
test(watch-arm): size re-arm waits off the real loaded recovery cost …
tiago-peixoto Sep 23, 2026
52fca51
fix: stop watchers reliably during blocked polls (#5362)
kunchenguid Sep 23, 2026
c576c2b
fix: submit stuck inbox doorbells instead of skipping them (#5374)
kunchenguid Sep 23, 2026
f2ab14a
feat: add opt-in fleet activity ledger (#5375)
kunchenguid Sep 23, 2026
e7cb23e
fix: validate public follow-up deliverables and wake on rejection (#5…
kunchenguid Sep 23, 2026
697d94d
feat: add Devin CLI crewmate and scout adapter (#5380)
kunchenguid Sep 23, 2026
7c8f9ee
fix(bin): recognize passed-with-skips as a passing outcome (#5322)
mremond Sep 23, 2026
2efa581
fix(bin): refuse unavailable backend adapters before sourcing (#5382)
Lakescape Sep 23, 2026
77e5af9
test: repair base-red liveness, export-DOM, and wake-queue self-tests…
blackxwhite88 Sep 23, 2026
fef37b9
fix: keep watcher status classification bounded to new log spans (#5383)
kunchenguid Sep 23, 2026
f0da72c
test: close pr-check watcher test gaps (original flake already fixed …
kunchenguid Sep 23, 2026
c00d5e1
feat: record fleet status immediately and emit PR-ready events (#5385)
kunchenguid Sep 23, 2026
1e0e773
test: synchronize foreign queue stall checks with watcher progress (#…
kunchenguid Sep 23, 2026
8c47279
test: isolate the bearings render fixture from the shared Lavish stor…
kunchenguid Sep 23, 2026
7e0e60a
fix(bin): prune a torn-down task's wake rows at teardown (#5390)
blackxwhite88 Sep 23, 2026
9296f9b
test: align portable test expectations with resolved host paths and f…
sandeepsalwan1 Sep 23, 2026
5df1294
test: make sibling secondmate stall tests wait for watcher observatio…
kunchenguid Sep 23, 2026
1d3ac67
fix(bin): refuse a Herdr Claude submit that would send only a message…
tiago-peixoto Sep 23, 2026
fdd3687
feat(bin): publish and watch Gerrit changes on forge-bound projects (…
slnkjthien Sep 23, 2026
0afc6b4
feat(bin): opt-in per-home Claude and Pi worker account pin (#5358)
tiago-peixoto Sep 23, 2026
5bbb978
fix(bin): keep Herdr lab session selection before passthrough argumen…
yasuhito Sep 23, 2026
ac2ed3b
fix: enforce supervision guards across harnesses (#5471)
kunchenguid Sep 23, 2026
67130f1
feat(bin): make the ship-branch prefix configurable per project (#2648)
wesleymatosdev Sep 24, 2026
795e4b5
feat(bin): send dispatch router only the brief's task sections and ad…
zachlandes Sep 24, 2026
9284978
feat: add opt-in Claude away supervision host (#5488)
kunchenguid Sep 24, 2026
d4f3b78
docs: correct the Grok harness reference on folder trust, training op…
Courtneyezra Sep 24, 2026
5842d42
fix(bin): bound the startup-network worker's lock waits by its budget…
karotkriss Sep 24, 2026
e1d6cf9
fix(bin): make the ps-fallback watcher identity immune to terminal wi…
karotkriss Sep 24, 2026
474c6ee
fix(bin): ignore fenced and indented Captain lines when extracting au…
karotkriss Sep 24, 2026
0d983d2
fix(bin): forbid administering the shared worktree pool in crewmate b…
karotkriss Sep 24, 2026
977a81e
fix(bin): refuse tasks-axi add/create --start so In flight always has…
karotkriss Sep 24, 2026
e1b7f4f
feat: extend opt-in away supervision to non-Pi primaries (#5503)
kunchenguid Sep 24, 2026
d1ce6b6
fix: auto-relaunch dead secondmates during supervision (#5496)
kunchenguid Sep 24, 2026
31c47af
fix(bin): start a successor when the Claude Stop-hook arm's attached …
karotkriss Sep 24, 2026
b42d4fa
fix(bin): report a Lavish source armed only after its listener is run…
tiago-peixoto Sep 24, 2026
52e679b
fix(bin): stop repeating unknown-wake escalations that were already d…
tiago-peixoto Sep 25, 2026
c6e816f
fix(bin): keep a stated default-key retraction from cancelling a keyl…
tiago-peixoto Sep 25, 2026
a8572f6
fix(bin): terminate a remote job worker that lost ownership on TERM (…
tiago-peixoto Sep 25, 2026
4be8a40
docs: make configuration settings easier to find and understand (#5589)
tmchow Sep 25, 2026
b52d401
fix: limit project memory edits to factual corrections (#5636)
kunchenguid Sep 25, 2026
ca8c293
feat: permit gate lifecycle calls against disposable lab homes (#5635)
kunchenguid Sep 25, 2026
b575497
fix(bin): evict a watcher whose beacon stalls past a hard bound inste…
karotkriss Sep 25, 2026
5cec4e2
fix(pi): hide queued Firstmate inputs under Calm only when the sessio…
tiago-peixoto Sep 25, 2026
756f64e
fix(bin): refuse teardown when a required source disappears (#5548)
tiago-peixoto Sep 25, 2026
4e99de7
docs: make supervision-host easier to read (#5605)
tmchow Sep 25, 2026
660fa4a
docs: make the Herdr backend guide easier to read (#5606)
tmchow Sep 25, 2026
5323582
docs: make pi-supervision-branch easier to read (#5607)
tmchow Sep 25, 2026
d18a220
docs: make watcher-continuity easier to read (#5608)
tmchow Sep 25, 2026
70e41a8
docs: make sessionstart-nudge easier to read (#5609)
tmchow Sep 25, 2026
7c501a1
docs: make captain-hold-lifecycle easier to read (#5610)
tmchow Sep 25, 2026
c60f0ab
docs: make remote-secondmates easier to read (#5612)
tmchow Sep 25, 2026
683b3eb
fix(bin): bound the away digest and log why a delivery failed (#5554)
Sophylax Sep 25, 2026
dbe124d
test: add a gated harness seam and stabilize lifecycle fixtures (#5638)
kunchenguid Sep 25, 2026
1a814e4
fix(bin): refuse watchers from disposable checkouts and exit when the…
karotkriss Sep 25, 2026
84362f6
fix(bin): surface unrecognized status prefixes instead of reading the…
tiago-peixoto Sep 25, 2026
e97390a
fix(bin): report the failing item when remote inheritance fails (#5658)
karotkriss Sep 25, 2026
c643b57
fix(bin): stand down the Claude Stop auto-arm on pi-code-delivered pa…
karotkriss Sep 25, 2026
d1abcd6
fix(bin): match whole multi-word project names in the registry lookup…
karotkriss Sep 25, 2026
b805823
fix(bin): classify shell stdin payloads after -s operands (#5546)
coreldh Sep 25, 2026
83a4bbd
fix(bin): strip AI co-author trailers from fleet-launched commits (#5…
tiago-peixoto Sep 25, 2026
67f6c27
fix(bin): treat Pi's dollar-first cost footer as furniture (#5683)
tiago-peixoto Sep 25, 2026
8d2ee29
fix(bin): refuse merges with unreported required checks (#5534)
mremond Sep 25, 2026
0154324
fix: keep persistent secondmates out of landed-work cleanup (#5696)
kunchenguid Sep 25, 2026
f54aa00
fix: reject invalid X reply and follow-up arguments before posting (#…
kunchenguid Sep 25, 2026
3c14a54
fix: pause broken supervision-host sessions between engine probes (#5…
kunchenguid Sep 25, 2026
97365aa
fix(bin): absorb routine secondmate working and paused status appends…
karotkriss Sep 25, 2026
c4c9d63
fix(bin): use gh-axi for the ship DoD draft check (#5519)
karotkriss Sep 25, 2026
f1ea9ed
fix(bin): bind inactive-outcome receipt identity to structured fields…
karotkriss Sep 25, 2026
4299683
feat: record the Claude and Cursor dialog for the supervision host (#…
kunchenguid Sep 25, 2026
c33b3f6
fix(bin): retire check-row receipts on branch acknowledgement so away…
kunchenguid Sep 26, 2026
1fe1a67
fix(bin): deliver Claude-bound operational input as a record-backed d…
kunchenguid Sep 26, 2026
ef595d8
test: isolate lint fixture from tracked suite (#5727)
kunchenguid Sep 26, 2026
e789e52
fix(bin): republish parent metadata after a remote secondmate relaunc…
tiago-peixoto Sep 26, 2026
9a4cfbb
fix(bin): give slow watcher suites headroom under the changed-suite b…
karotkriss Sep 26, 2026
df4ae5d
fix(bin): stop nested steal-lock recursion and mid-steal watcher TERM…
kunchenguid Sep 26, 2026
873c923
test: make supervision-host park-boundary tests deterministic (#5710)
kunchenguid Sep 26, 2026
ea7c7f7
fix: stage remote home clones before publication (#5733)
kunchenguid Sep 26, 2026
920a7d9
fix: preserve Herdr status on Pi relaunch (#5161)
sdivanl Sep 26, 2026
65c53fb
Seed the relaunch-ordering PR poll fixture without fm-pr-check.sh (#5…
kunchenguid Sep 26, 2026
9b52cf5
feat: add attended supervision for Claude and Cursor hosts (#5748)
kunchenguid Sep 26, 2026
72b63ee
fix(bin): dedup directed source expansions in fm-pending-reply-lib (#…
kunchenguid Sep 26, 2026
d1a332c
fix(bin): avoid bash 5.2 sibling $() in recovery mint and delivery lo…
Lakescape Sep 26, 2026
3948170
fix(bin): name the recovery for a declined Claude imports dialog and …
karotkriss Sep 26, 2026
062d7a8
fix(bin): report the newest status event in the voice status reader (…
karotkriss Sep 26, 2026
e9a6675
fix(bin): gate a self-announcing tool's update-available report on a …
karotkriss Sep 26, 2026
cf20836
fix(bin): pass the dispatch profile effort to OpenCode workers throug…
karotkriss Sep 26, 2026
9d56cf6
fix: stop cancelled validation runs from reporting false failures (#5…
mremond Sep 26, 2026
bb69be6
fix: require declared waits for workers awaiting their own work (#5812)
mremond Sep 26, 2026
503ba82
fix: bound ShellCheck to one canonical root per process (#5770)
kunchenguid Sep 26, 2026
5700baa
fix: bound watcher cleanup wait on the downtime-marker lock (#5732)
kunchenguid Sep 26, 2026
62d643c
test: stop the remote secondmate e2e watcher before temp-root cleanup…
aminry Sep 26, 2026
30ef650
fix(bin): stop reporting untouched shared-captain copies as drift (#4…
tiago-peixoto Sep 26, 2026
f62a7d9
docs: restructure calm.md for readability (#5604)
tmchow Sep 27, 2026
3b68997
docs: restructure turnend-guard.md for readability (#5611)
tmchow Sep 27, 2026
49a218b
docs: move situational AGENTS.md sections into on-demand skills (#5872)
kunchenguid Sep 27, 2026
5a9880b
fix: route second-mate signal wakes by presented status span (#5879)
kunchenguid Sep 27, 2026
fd88ea0
fix(bin): take the source lock before the lifecycle lock in register-…
FocalFactotum Sep 27, 2026
b4561ad
fix: chain repository hooks under git -c overrides (#5877)
FocalFactotum Sep 27, 2026
fba81cb
fix(bin): withhold never-send values from dispatch resolver requests …
zachlandes Sep 27, 2026
6839202
feat(jev): add the guard framework contract and the memory RSS/swap t…
RooseveltAdvisors Sep 27, 2026
d051e6f
fix: prevent contribution poll starvation on slow GitHub reads (#5900)
0x7067 Sep 27, 2026
bff6454
feat(bin): add config/keep-ai-trailers opt-out to keep AI co-author t…
kiatng Sep 27, 2026
050a446
fix(bin): capture the full viewport for Herdr composer reads so a sla…
andrewesweet Sep 27, 2026
8a18fe2
fix(bin): isolate per-task endpoint reads in bounded children with a …
andrewesweet Sep 27, 2026
f93f0d3
fix: keep lab tmux sockets private and short under deep worktrees (#5…
kunchenguid Sep 27, 2026
ade7133
fix: silence routine no-change supervision outcomes (#5808)
jcpoyser Sep 27, 2026
8c5493a
feat: make /quiet a statement when attended supervision is ready (#5928)
kunchenguid Sep 27, 2026
c19c240
fix: grant Claude workers access to Firstmate task channels (#5884)
kunchenguid Sep 27, 2026
90e88d7
fix(bin): prevent idle recovery loops without stranding wakes (#4819)
jokim1 Sep 27, 2026
3d14792
fix: reduce remote worker and polling helper process churn (#5889)
kunchenguid Sep 27, 2026
022250d
fix: keep remote reply listeners and watcher cycles running (#5941)
kunchenguid Sep 27, 2026
3c2a91d
fix: make attended cutover outcome re-presentation check-first (#5925)
kunchenguid Sep 28, 2026
1b82b77
fix: restore primary rewakes after attended main-only closes (#5961)
kunchenguid Sep 28, 2026
9096504
Clarify live Claude login for opted-in tests (#5975)
kunchenguid Sep 28, 2026
fa48367
fix(bin): ensure resumed worker launches enter their recorded worktre…
mehulbhagwani Sep 28, 2026
6b0f5a0
fix(bin): retire task-keyed watcher markers and orphan journals at te…
karotkriss Sep 28, 2026
29213a0
test: guard the live harness gate against Claude Code's auto-updater …
karotkriss Sep 28, 2026
d5c2507
fix(bin): ring the worker inbox doorbell only for a newly written pro…
karotkriss Sep 28, 2026
b3dbc67
fix: prevent manual Claude Stop hook calls from arming supervision (#…
kunchenguid Sep 28, 2026
a256cb5
feat(firstmate-calm): show supervision notes in Claude Code (#6039)
kunchenguid Sep 28, 2026
4e158e6
fix: stop quiet mode from holding requested actions for return (#6033)
kunchenguid Sep 28, 2026
d9a89b2
Say ahoy impact order is the first mate's pick. (#6065)
kunchenguid Sep 28, 2026
eb219c8
fix(bin): accept a task's next PR after its bound PR merges in fm-pr-…
karotkriss Sep 28, 2026
2d833ff
fix: treat quiet records as attended across supervision (#6064)
kunchenguid Sep 29, 2026
00679ae
fix: report supervision host latches accurately in away return briefs…
kunchenguid Sep 29, 2026
40e981d
fix: shorten Claude Code Calm supervision note label (#6086)
kunchenguid Sep 29, 2026
b5fdf74
feat(bin): add a disposable live supervision lab builder (#6037)
kunchenguid Sep 29, 2026
46d58d6
fix: keep watcher arms and reply listeners alive through slow cycles …
kunchenguid Sep 29, 2026
c5f48e4
fix(bin): retry fm-pr-merge a bounded number of times when GitHub mer…
karotkriss Sep 29, 2026
260c4f0
fix(bin): converge every open owner onto a known terminal contributio…
karotkriss Sep 29, 2026
0a2cdf9
feat: enable supervision host by default for Claude primaries (#6124)
kunchenguid Sep 29, 2026
5bddfc4
fix(bin): create the state dir on a fresh primary before the session-…
karotkriss Sep 29, 2026
1f2c954
fix(bin): measure pending-reply grace from turn completion, not deliv…
karotkriss Sep 29, 2026
a774c44
fix(bin): stop provider-table lookup from writing broken-pipe errors …
tiago-peixoto Sep 29, 2026
e2668de
fix: restore portable CI behavior across Pi rendering and remote prov…
kunchenguid Sep 30, 2026
b3d4133
fix: confirm Lavish board replies before worker handoff (#6169)
kunchenguid Sep 30, 2026
3d8c097
Merge upstream b3d41332 into fm/fm-slowness-scout
keenvc Sep 30, 2026
4f8581a
perf(bin): eliminate subshell fork storm in wake drain and optimize s…
keenvc Sep 30, 2026
9036165
test: pin git identity in fm-backlog-read-bound e2e fixture
keenvc Sep 30, 2026
f0bc77c
fix(bootstrap): restore per-record backlog probes in reconcile sweep
keenvc Sep 30, 2026
e9dc713
test: drop queued-list bootstrap optimization test after reconcile re…
keenvc Sep 30, 2026
37bad4e
no-mistakes(review): Scope herdr cap to endpoint reads; launch summar…
keenvc Sep 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .agents/skills/captain-hold-lifecycle/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The agent performs the semantic inventory because scripts must not infer captain
## Policy

Every unresolved question that belongs to the captain and is discovered while producing, reading, presenting, or ending an investigation or visual review must be carried by a captain-held task in the authoritative backlog of the home that owns the originating work before that work or review may be treated as complete.
For a Lavish board-backed handoff, pass the reply through `bin/fm-procevent-lavish.sh arm --agent-reply-file` before appending the status; the adapter owns version-specific acceptance ordering.
Prefer holding the work item the question gates over minting a new row; create a new task only when no work item exists to hold.
Put the question and its options in the hold reason, and keep one held task per genuine gate: a multi-question review is one held task pointing at its report, not a row per question. Represent that task with exactly one board card that consolidates its questions and options; never fan one task id into duplicate same-key cards.
Register or re-hold through `bin/fm-captain-hold.sh hold`, which is idempotent per task id.
Expand Down
8 changes: 3 additions & 5 deletions .agents/skills/process-event-sources/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ description: >-
Owns the arming commands, the condition->action eligibility boundary, the
durable result read, which wakes must be routed to their adapter instead of
acknowledged generically, the handled acknowledgement contract, the one-owner
rule, the precise durability boundary, and the Lavish adapter's loss
limitation.
rule, and the precise durability boundary.
user-invocable: false
metadata:
internal: true
Expand All @@ -35,10 +34,9 @@ bin/fm-procevent-lavish.sh arm <artifact.html>
```

A worker-owned board uses `bin/fm-procevent-lavish.sh arm <artifact.html> --for <task-id>` and re-arms with its reply after each nonterminal round; the existing handled marker is the acknowledgement.
Arm it once, then re-arm only when a round is actually waiting: arming again with nothing to acknowledge is refused, because it would discard the reply your listener is still holding.
Posting that reply is best effort: a rare crash while the listener consumes the staged file drops that one round's reply rather than posting it twice, and robust reply delivery waits on lavish-axi's exclusive listener.
Arm it once, then re-arm only when a round is actually waiting: arming again with nothing to acknowledge is refused.
A terminal round is never re-armed: the board stays yours until you acknowledge it with `bin/fm-procevent.sh handled <source-id> <sequence>`, which retires it, and until then `retire` refuses the board too.
Never arm a board that a live task hosts; follow the crew-hosted Lavish board contract in [`docs/configuration.md`](../../../docs/configuration.md#crew-hosted-lavish-review-boards).
Never arm a board that a live task hosts; follow the [crew-hosted Lavish board contract](../../../docs/configuration.md#crew-hosted-lavish-review-boards) for reply acceptance and older-version limits.

Registering a source is not the same fact as listening to it.
Lavish `arm` waits until this registration's listener is confirmed running and does not report ready without that evidence; other adapters still record the source for the watcher's next reconcile.
Expand Down
64 changes: 38 additions & 26 deletions .pi/extensions/fm-branch-supervision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ import {
type ModelRegistry,
SessionManager,
ToolExecutionComponent,
VERSION,
type AgentSession,
type ExtensionAPI,
type ExtensionCommandContext,
Expand Down Expand Up @@ -2155,30 +2156,6 @@ ${context.command}
call?: Text;
result?: Text | Container;
};
const COLLAPSED_ARGS_CHARS = 100;
const formatOutcomesCallHeader = (
title: string,
args: unknown,
theme: Parameters<NonNullable<ToolDefinition["renderCall"]>>[1],
expanded: boolean,
): string => {
const header = theme.fg("toolTitle", theme.bold(title));
if (args == null) return header;
const entries = typeof args === "object" && !Array.isArray(args)
? Object.entries(args as Record<string, unknown>)
: [["args", args]];
if (entries.length === 0) return header;
if (expanded) {
const lines = entries.map(([key, value]) => {
const text = typeof value === "string" ? value : (JSON.stringify(value, null, 2) ?? String(value));
return ` ${key}: ${text.replace(/\t/g, " ").replace(/\r/g, "").split("\n").join("\n ")}`;
});
return `${header}\n${theme.fg("muted", lines.join("\n"))}`;
}
const pairs = entries.map(([key, value]) => `${key}=${JSON.stringify(value) ?? String(value)}`).join(" ");
const preview = pairs.length > COLLAPSED_ARGS_CHARS ? `${pairs.slice(0, COLLAPSED_ARGS_CHARS - 3)}...` : pairs;
return `${header} ${theme.fg("muted", preview)}`;
};
const refreshOutcomesToolShell = (
shellState: OutcomesToolShellState,
theme: Parameters<NonNullable<ToolDefinition["renderCall"]>>[1],
Expand All @@ -2198,6 +2175,41 @@ ${context.command}
return shell;
};

// Pi's stock call header (formatToolCallWithArgs) is not a public export.
// Before Pi 0.99 it is the bold title alone. Since Pi 0.99 a collapsed call
// is `title key=json` on the title line, cut at 100 characters, and an
// expanded call puts one muted `key: value` line under the title. Calm-off
// rendering has to match the installed Pi or the stock comparison fails.
// Keep this in step with that function.
const [stockMajor = 0, stockMinor = 0] = VERSION.split(".").map((part) => Number.parseInt(part, 10) || 0);
const stockCallHeaderShowsArgs = stockMajor > 0 || stockMinor >= 99;
const stockCollapsedArgsChars = 100;
const stockToolCallHeader = (
title: string,
args: unknown,
theme: Parameters<NonNullable<ToolDefinition["renderCall"]>>[1],
expanded: boolean,
): string => {
const header = theme.fg("toolTitle", theme.bold(title));
if (!stockCallHeaderShowsArgs || args == null) return header;
const entries = typeof args === "object" && !Array.isArray(args)
? Object.entries(args)
: [["args", args] as [string, unknown]];
if (entries.length === 0) return header;
if (expanded) {
const lines = entries.map(([key, value]) => {
const text = typeof value === "string" ? value : (JSON.stringify(value, null, 2) ?? String(value));
return ` ${key}: ${text.replace(/\t/g, " ").replace(/\r/g, "").split("\n").join("\n ")}`;
});
return `${header}\n${theme.fg("muted", lines.join("\n"))}`;
}
const pairs = entries.map(([key, value]) => `${key}=${JSON.stringify(value) ?? String(value)}`).join(" ");
const preview = pairs.length > stockCollapsedArgsChars
? `${pairs.slice(0, stockCollapsedArgsChars - 3)}...`
: pairs;
return `${header} ${theme.fg("muted", preview)}`;
};

registerFirstmateTool(pi, {
name: "fm_branch_outcomes",
label: "Read supervision branch outcomes",
Expand All @@ -2212,7 +2224,7 @@ ${context.command}
if (calmPresentation.stockExportRendering) throw new Error("Use Pi stock export rendering");
if (calmHides("assistant-tool-call")) return new Container();
const shellState = context.state as OutcomesToolShellState;
shellState.call = new Text(formatOutcomesCallHeader("fm_branch_outcomes", args, theme, Boolean(context.expanded)), 0, 0);
shellState.call = new Text(stockToolCallHeader("fm_branch_outcomes", args, theme, context.expanded), 0, 0);
return refreshOutcomesToolShell(shellState, theme, context);
},
renderResult: (result, options, theme, context) => {
Expand Down Expand Up @@ -2274,7 +2286,7 @@ ${context.command}
if (calmPresentation.stockExportRendering) throw new Error("Use Pi stock export rendering");
if (calmHides("assistant-tool-call")) return new Container();
const shellState = context.state as OutcomesToolShellState;
shellState.call = new Text(formatOutcomesCallHeader("fm_branch_processed", args, theme, Boolean(context.expanded)), 0, 0);
shellState.call = new Text(stockToolCallHeader("fm_branch_processed", args, theme, context.expanded), 0, 0);
return refreshOutcomesToolShell(shellState, theme, context);
},
renderResult: (result, _options, theme, context) => {
Expand Down
20 changes: 10 additions & 10 deletions bin/fm-afk-return.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ scan_open_blockers() { # -> tab-separated blocker rows
STATUS_SCAN_ERROR=$status
return 1
fi
while IFS="$(printf '\t')" read -r key verb summary; do
while IFS=$'\t' read -r key verb summary; do
[ "$verb" = blocked ] || continue
clean_summary=$(printf '%s' "$summary" | clean_field)
printf 'blocker\t%s\t%s\t%s\n' "$id" "$key" "$clean_summary"
Expand Down Expand Up @@ -241,15 +241,15 @@ write_gate() { # <evidence-file> <blockers-file>

print_evidence() { # <file>
local file=$1 kind text
while IFS="$(printf '\t')" read -r tag kind text; do
while IFS=$'\t' read -r tag kind text; do
[ "$tag" = evidence ] || continue
printf 'catch-up %s: %s\n' "$kind" "$text"
done < "$file"
}

print_blockers() { # <file>
local file=$1 tag id key summary
while IFS="$(printf '\t')" read -r tag id key summary; do
while IFS=$'\t' read -r tag id key summary; do
[ "$tag" = blocker ] || continue
printf 'firstmate-actionable blocker: %s [key=%s] %s\n' "$id" "$key" "$summary"
done < "$file"
Expand All @@ -267,7 +267,7 @@ clear_delivery_artifacts() {
# gate was retained for open blockers alone.
gate_retention_reasons() { # <file>
local file=$1 tag kind text
while IFS="$(printf '\t')" read -r tag kind text; do
while IFS=$'\t' read -r tag kind text; do
[ "$tag" = evidence ] && [ "$kind" = lifecycle ] || continue
printf '%s\n' "$text"
done < "$file"
Expand Down Expand Up @@ -604,7 +604,7 @@ render_return_brief() { # <evidence-file> <blockers-file> <since-epoch> <drain-
task=$(basename "$meta"); task=${task%.meta}
status="$STATE/$task.status"
status_path_readable "$status" || continue
while IFS="$(printf '\t')" read -r key verb summary; do
while IFS=$'\t' read -r key verb summary; do
[ "$verb" = needs-decision ] || continue
count=$((count + 1))
printf ' - %s [key=%s] needs your decision: %s\n' "$task" "$key" "$(printf '%s' "$summary" | clean_field)"
Expand All @@ -627,12 +627,12 @@ EOF
# 4. tried and failed, or could not be fixed.
printf 'Tried and failed, or could not be fixed:\n'
count=0
while IFS="$(printf '\t')" read -r tag kind text; do
while IFS=$'\t' read -r tag kind text; do
[ "$tag" = evidence ] && [ "$kind" = engine ] || continue
count=$((count + 1))
printf ' - %s\n' "$text"
done < "$evidence"
while IFS="$(printf '\t')" read -r tag task key summary; do
while IFS=$'\t' read -r tag task key summary; do
[ "$tag" = blocker ] || continue
count=$((count + 1))
printf ' - %s [key=%s] still blocked, firstmate remediates before ordinary work: %s\n' "$task" "$key" "$summary"
Expand All @@ -654,7 +654,7 @@ EOF
# overlooked. The cleanup itself is ordinary fleet work and waits for the gate.
printf 'Landed, cleanup due:\n'
count=0
while IFS="$(printf '\t')" read -r task url; do
while IFS=$'\t' read -r task url; do
[ -n "$task" ] || continue
count=$((count + 1))
printf ' - %s: %s is merged and the worker is still up; close it with bin/fm-teardown.sh %s once catch-up clears\n' "$task" "$url" "$task"
Expand Down Expand Up @@ -711,7 +711,7 @@ return_reconcile() {
engine_snapshot "$evidence" "$since"
fi

while IFS="$(printf '\t')" read -r tag kind text; do
while IFS=$'\t' read -r tag kind text; do
[ "$tag" = evidence ] && [ "$kind" = lifecycle ] || continue
case "$text" in
'away-posture record unreadable: '*'; catch-up stays gated')
Expand Down Expand Up @@ -795,7 +795,7 @@ EOF
remove_evidence_prefix lifecycle 'archived away-posture record unreadable' "$evidence" || lifecycle_ok=0
fi

while IFS="$(printf '\t')" read -r tag retained_record; do
while IFS=$'\t' read -r tag retained_record; do
[ "$tag" = superseded ] || continue
if [ ! -f "$retained_record" ]; then
remove_evidence lifecycle "superseded away-posture record unreadable: $retained_record; catch-up stays gated" "$evidence" || lifecycle_ok=0
Expand Down
51 changes: 39 additions & 12 deletions bin/fm-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
# The AXI-family floor policy is owned beside GH_AXI_MIN and
# LAVISH_AXI_MIN below; the per-tool owners point there. An installed
# essential build below its floor reports MISSING like no-mistakes.
# Missing or incompatible lavish-axi reports PRESENTATION_UNAVAILABLE:
# nonvisual dispatch continues with plain-text decisions and reports,
# but Lavish use still requires a compatible build at or above its floor.
# Missing or incompatible lavish-axi reports PRESENTATION_UNAVAILABLE;
# a compatible older build keeps legacy boards and reports a BOOTSTRAP_INFO
# upgrade recommendation for synchronous reply acceptance.
# tasks-axi feature probes remain a separate defense-in-depth check.
# tasks-axi and quota-axi are essential bootstrap tools.
# A compatible tasks-axi default backend is silent.
Expand Down Expand Up @@ -157,8 +157,14 @@
# fm-bootstrap.sh install <tool>...
# Install the named tools (only ones the captain approved).
# fm-bootstrap.sh lavish-compatible
# Exit 0 when lavish-axi meets LAVISH_AXI_MIN, 1 otherwise, printing
# nothing; bin/fm-brief.sh uses it to gate scout Lavish hosting.
# Exit 0 when lavish-axi meets LAVISH_AXI_BOARD_MIN, 1 otherwise,
# printing nothing; bin/fm-brief.sh uses it to gate scout Lavish hosting.
# fm-bootstrap.sh lavish-reply-compatible
# Exit 0 when lavish-axi meets LAVISH_AXI_MIN and supports synchronous
# reply acceptance, 1 when one version probe confirms an older release
# meeting LAVISH_AXI_BOARD_MIN, and 2 when lavish-axi is absent, its
# version cannot be read, or it is below LAVISH_AXI_BOARD_MIN, printing
# nothing.
set -u

TYPESAFE_API_KEY_PRIVATE=${TYPESAFE_API_KEY:-}
Expand Down Expand Up @@ -918,7 +924,8 @@ NO_MISTAKES_MIN=1.46.0
# tasks-axi feature probes are an independent defense-in-depth concern, not part
# of its floor.
GH_AXI_MIN=0.1.29
LAVISH_AXI_MIN=0.1.77
LAVISH_AXI_MIN=0.1.80
LAVISH_AXI_BOARD_MIN=0.1.77

treehouse_supports_lease() {
treehouse get --help 2>&1 | grep -Eq '(^|[^[:alnum:]_-])--lease([^[:alnum:]_-]|$)'
Expand All @@ -928,14 +935,19 @@ treehouse_supports_lease() {
# cannot be parsed into exactly one major.minor.patch triple is incompatible,
# never assumed current, so a development or vendored build cannot pass a floor
# it was never checked against.
tool_version_at_least() { # <tool> <min-version>
local tool=$1 min=$2 output parts major minor patch extra
local min_major min_minor min_patch min_extra
tool_version_parts() { # <tool>
local tool=$1 output parts major minor patch extra
command -v "$tool" >/dev/null 2>&1 || return 1
output=$("$tool" --version 2>/dev/null) || return 1
parts=$(printf '%s\n' "$output" | sed -nE 's/.*[vV]?([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 \2 \3/p' | head -n 1)
IFS=' ' read -r major minor patch extra <<< "$parts"
[ -n "$major" ] && [ -n "$minor" ] && [ -n "$patch" ] && [ -z "$extra" ] || return 1
printf '%s %s %s\n' "$major" "$minor" "$patch"
}

version_parts_at_least() { # <major minor patch> <min-version>
local major minor patch min=$2 min_major min_minor min_patch min_extra
IFS=' ' read -r major minor patch <<< "$1"
IFS='.' read -r min_major min_minor min_patch min_extra <<< "$min"
[ -n "$min_major" ] && [ -n "$min_minor" ] && [ -n "$min_patch" ] && [ -z "$min_extra" ] || return 1
[ "$major" -gt "$min_major" ] && return 0
Expand All @@ -945,6 +957,12 @@ tool_version_at_least() { # <tool> <min-version>
[ "$patch" -ge "$min_patch" ]
}

tool_version_at_least() { # <tool> <min-version>
local parts
parts=$(tool_version_parts "$1") || return 1
version_parts_at_least "$parts" "$2"
}

x_mode_write_if_changed() {
local dest=$1 content=$2 mode=$3 parent tmp parent_device current_mode
parent=${dest%/*}
Expand Down Expand Up @@ -1392,10 +1410,17 @@ startup_memory_budget_setup() {
}

if [ "${1:-}" = "lavish-compatible" ]; then
tool_version_at_least lavish-axi "$LAVISH_AXI_MIN"
tool_version_at_least lavish-axi "$LAVISH_AXI_BOARD_MIN"
exit
fi

if [ "${1:-}" = "lavish-reply-compatible" ]; then
lavish_parts=$(tool_version_parts lavish-axi) || exit 2
version_parts_at_least "$lavish_parts" "$LAVISH_AXI_MIN" && exit 0
version_parts_at_least "$lavish_parts" "$LAVISH_AXI_BOARD_MIN" && exit 1
exit 2
fi

if [ "${1:-}" = "install" ]; then
shift
[ $# -gt 0 ] || { echo "usage: fm-bootstrap.sh install <tool>..." >&2; exit 1; }
Expand Down Expand Up @@ -1492,8 +1517,10 @@ detect_local_tools() {
if command -v gh-axi >/dev/null 2>&1 && ! tool_version_at_least gh-axi "$GH_AXI_MIN"; then
echo "MISSING: gh-axi (install: $(install_cmd gh-axi))"
fi
if ! tool_version_at_least lavish-axi "$LAVISH_AXI_MIN"; then
echo "PRESENTATION_UNAVAILABLE: lavish-axi (requires >=$LAVISH_AXI_MIN; install: $(install_cmd lavish-axi)) - nonvisual work may proceed with plain-text decisions and reports; install or upgrade before using Lavish"
if ! tool_version_at_least lavish-axi "$LAVISH_AXI_BOARD_MIN"; then
echo "PRESENTATION_UNAVAILABLE: lavish-axi (requires >=$LAVISH_AXI_BOARD_MIN; install: $(install_cmd lavish-axi)) - nonvisual work may proceed with plain-text decisions and reports; install or upgrade before using Lavish"
elif ! tool_version_at_least lavish-axi "$LAVISH_AXI_MIN"; then
echo "BOOTSTRAP_INFO: lavish-axi >=$LAVISH_AXI_MIN enables confirmed board replies; this older compatible version retains the legacy reply path, but upgrade to prevent handing back a board before its reply is accepted"
fi
if command -v quota-axi >/dev/null 2>&1 && ! fm_quota_axi_compatible; then
echo "MISSING: quota-axi (install: $(install_cmd quota-axi))"
Expand Down
2 changes: 1 addition & 1 deletion bin/fm-branch-outcome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ rebuild_outcome_indexes() {
((.statusEndpoint // "") | tostring), (.statusIdent // "")]
| @tsv
' "$STORE") || return 1
while IFS=$(printf '\t') read -r task seq epoch endpoint ident; do
while IFS=$'\t' read -r task seq epoch endpoint ident; do
[ -n "$task" ] || continue
if [ -z "$endpoint" ] || [ -z "$ident" ]; then
f="$STATE/$task.status"
Expand Down
4 changes: 2 additions & 2 deletions bin/fm-brief-heading-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ fm_brief_heading_present() { # <file> <heading>
fm_brief_task_heading_body() { # <file> <heading>
local task
task=$(fm_brief_heading_body "$1" "# Task")
printf '%s\n' "$task" | fm_brief_heading_parse - "$2" body
fm_brief_heading_parse - "$2" body <<<"$task"
}

fm_brief_task_heading_present() { # <file> <heading>
local task
task=$(fm_brief_heading_body "$1" "# Task")
printf '%s\n' "$task" | fm_brief_heading_parse - "$2" present >/dev/null
fm_brief_heading_parse - "$2" present >/dev/null <<<"$task"
}

2 changes: 1 addition & 1 deletion bin/fm-brief.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# --scout writes the scout contract instead: the deliverable is a report at
# data/<task-id>/report.md (no branch, no push, no PR) and the worktree is scratch.
# It offers the Lavish review loop only when `fm-bootstrap.sh lavish-compatible`
# confirms the supported lavish-axi floor; otherwise it asks for a text report.
# confirms the legacy board-compatibility floor; otherwise it asks for a text report.
# --secondmate writes a persistent secondmate charter. The project list
# is cloned into the secondmate home, while the natural-language scope
# tells the main firstmate when to route work there; routine churn stays in its own home;
Expand Down
Loading
Loading