feat(fleet): F3-m2 — native Pi heartbeat + model surface + mosaic_mission_status tool #602
Reference in New Issue
Block a user
Delete Branch "feat/f3-m2-pi-harness"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
F3-m2 — Custom Pi harness: native heartbeat + model surface + model-callable tool
Rebased onto
main(on top of #5996ffb277). Refs #588.What this delivers
1. Native Pi heartbeat writer (
runtime/pi/mosaic-extension.ts).hbcontractfleet psreads (ts/pid/status[/model]) on aMOSAIC_HEARTBEAT_INTERVALtimer.turn_start/turn_endflipstatusbusy↔ok, sofleet psreflects real turn activity (more accurate than the pane-PID-only sidecar).ctx.model.tmp+renamewrite; touches a.hb.nativeprecedence marker.2. Sidecar reconciliation (
tools/fleet/start-agent-session.sh).hb.nativemarker exists (< 2×interval), else writes thestatus=okfallback — native precedence, sidecar fallback, same contract sofleet psis runtime-agnostic.%qquoting on the printf format (merged with the deferral block during rebase).3. Model surfaced end-to-end in
fleet ps(commands/fleet.ts)parseHeartbeatreads an optionalmodel=line intoHeartbeatInfo.model.fleet psshows aMODELcolumn (table) and emits it in--json(rows[].heartbeat.model).model=null→ column shows-.4.
mosaic_mission_statusmodel-callable tool (R14 proper tool usage)registerToolso the Pi agent can load its active mission, milestone progress, task counts, and latest scratchpad as a tool call before planning.@earendil-works/pi-coding-agent@0.79.9ToolDefinition.Bug fixes folded in
session_end→session_shutdown: the prior handler never fired — repo hooks + session-lock cleanup were dead. Now runs on shutdown (+ clears HB timer/marker).@mariozechner/...→@earendil-works/pi-coding-agent.Verification
.ts(prettier@3.8.1).fleet.spec.ts(legacy beat →null/-; native beat → parsed id, busy, healthy).status=ok; defer leaves the nativestatus=busy/modeluntouched; generated scriptbash -nclean.fleet psshows self-reported MODEL + busy/ok flipping on turn boundaries) — the situational gate.🤖 Generated with Claude Code