@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
22 lines • 1.41 kB
TypeScript
import type { CompactProducerStamp } from "./compact-producer-stamp.ts";
import { type SessionWorkerToHost } from "./session-worker-protocol.ts";
/**
* The worker half of the payload transport (S12b; RULING-63 Q3, RULING-64). Every bootstrap, output, snapshot and
* canonical message is built only after this isolate holds a host permit, and one permit pays for one physical frame.
* A message whose JSON fits one fragment is posted as it is; a larger one travels as fragments of at most D stored bytes
* of that JSON, each paid for by its own permit. In the ordered stream every fragment takes the next physical ordinal
* and the final fragment is the commit frame: it carries the message's own ordinal, binding and signals.
*/
export declare class WorkerTransfer {
private readonly post;
private readonly gate;
private readonly stamp;
private readonly fail;
/** A permit taken for a message whose builder threw: only the host adds credit, so the next message spends it. */
private spare;
constructor(post: (message: SessionWorkerToHost) => void, block: SharedArrayBuffer, stamp: CompactProducerStamp, fail: (error: string) => never);
send(build: () => SessionWorkerToHost): void;
/** A closed host ends the isolate cleanly; a deny that never cleared, or no answer, is a typed worker failure. */
private take;
}
//# sourceMappingURL=session-worker-transfer.d.ts.map