Skip to content

run agents through a versioned stdio process host - #447

Merged
xandreeddev merged 1 commit into
mainfrom
process-host
Oct 31, 2026
Merged

xandreeddev merged 1 commit into
mainfrom
process-host

Conversation

@xandreeddev

@xandreeddev xandreeddev commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

What

  • Add @xandreed/process-host with protocol version 1 over bounded stdio NDJSON. Hosts supply the Agent/TurnRunner, model and shared services; commands support begin, durable send/steer, helper answers, exact-turn cancellation, activity and shutdown.
  • Emit lifecycle frames only after actual journal acknowledgments for direct, queued, initial task and parent-reaction turns. Progress uses an explicit projection by default, with full JSON export opt-in.
  • Preserve accepted inputs across SIGTERM/SIGKILL and explicit takeover/resume. Keep native signal/hard-deadline handling independent of graceful work and scope finalizers. Ship peer conformance and a retained 45-frame protocol fixture.
  • Register and document the new package, protocol error codes and process guide. Stored format 16 and its complete fingerprint/history remain unchanged.

Checks

  • Repository typecheck, Foundry self-check and demo: pass, zero findings.
  • bun test: 3,662 pass, 4 environment-dependent skips, 0 fail; 18,134 assertions across 315 files.
  • Committed package build and packed Node/Bun consumers: pass; process-host peer kit and all 17 protocol/restart/deadline flags pass on both runtimes, alongside every prior recovery fixture.
  • Immutable 45-frame protocol fixture: strict public-codec decode and 37 exact output round-trips pass on Node/Bun, including all projection and full variants.
  • Generated docs: clean; stored format 16 and its complete fingerprint/history remain exact.
  • Website: 16 pages checked, all internal links resolve.
  • Models proxy checks on Bun 1.3.6: 46 pass, 2 environment-dependent skips, 0 fail.

Focused evidence covers held/lost journal acknowledgments, original successful receipts after output failure, real helper answer deferral/retries, responsive controls, bounded native output, shutdown deadlines and independently witnessed process restart. The default checks use scripted models without provider credentials.

Add a host-supplied agent binding with protocol version 1 over bounded stdio NDJSON. Route durable input, steering, helper answers, cancellation and activity through the shared services, and publish lifecycle frames from actual journal acknowledgments with projected progress by default.

Keep graceful shutdown and native hard deadlines independent, preserve accepted inputs through process death, and retain a protocol compatibility fixture. Verify the peer, all turn owners, deferred helper answers and real Node/Bun child-process recovery through public package APIs.
@xandreeddev
xandreeddev marked this pull request as ready for review October 31, 2026 14:58
@xandreeddev
xandreeddev merged commit d74d920 into main Oct 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant