@zhin.js/harness
v1.1.2
Published
ADR 0048 Agent Harness: actors, mail, engagements, attenuated authority, budgets and the guard kernel
Readme
@zhin.js/harness
ADR 0048 Agent Harness (published as a dependency of @zhin.js/agent): actors exchange mail inside an engagement; every mail carries an authority that can only be attenuated and a budget grant carved from its parent; a guard kernel decides delivery; an engagement journal records everything.
See docs/adr/0048-agent-harness.md. The shared contracts live in src/contracts.ts; each component (authority, budget, guard, journal, mailbox) depends only on them.
Inbox policies (ADR 0048 H3)
The mailbox serializes turns per (actor, lane); a lane defaults to the engagement, and an IM session can use one lane for every human message it receives. An InboxPolicy (onPost / ready / staleOf) decides how queued mails become turns. createInboxPolicy (src/policies/) carries the IM admission rules that TurnAdmissionGate used to own: stop, same-sender supersede, burst coalescing, FIFO between members, merge windows, stale-reply discard and danmaku windows. Clock and timers can be injected.
