One event off an exec’s output stream.
One object with a kind discriminant rather than three classes, because JS has no
instanceof over a union a caller can switch on cleanly and the TypeScript idiom is a
tagged union. kind is "output", "gap", or "exit", and the fields for the other
two shapes are null — which keeps [Self::exit_code] distinguishable from an output
chunk that happens to be last. The absence of an exit event is what tells a cut
connection from a finished command; the byte sequences are otherwise identical.
Properties
Section titled “Properties”optional data?: Buffer<ArrayBufferLike>;The bytes, for an output event.
optional end?: number;One past an output chunk’s last byte, or a gap’s exclusive end — either way, where a
cursor resumes. null on an exit event, whose offset is a total rather than a
position, so resuming from it would ask the daemon to replay from the end.
exitCode?
Section titled “exitCode?”optional exitCode?: number;kind: string;"output", "gap", or "exit".
offset?
Section titled “offset?”optional offset?: number;Where an output chunk starts, or where a gap starts.
signal?
Section titled “signal?”optional signal?: number;stream?
Section titled “stream?”optional stream?: string;"stdout" or "stderr", for an output event. Both share one offset space, so a
caller holds one cursor rather than two that can disagree about ordering.
optional text?: string;The bytes as text, replacing anything undecodable. data is the lossless form.
timedOut?
Section titled “timedOut?”optional timedOut?: boolean;Present on exit: whether the remote execution deadline expired.
totalOffset?
Section titled “totalOffset?”optional totalOffset?: number;Total bytes published, on an exit event.
truncated?
Section titled “truncated?”optional truncated?: boolean;writersMayBeAlive?
Section titled “writersMayBeAlive?”optional writersMayBeAlive?: boolean;Provenance
Section titled “Provenance”This page is generated from bindings/microvms-js/index.d.ts by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.
To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run dts. mise run dts:check fails when the committed file no longer matches the source.