Skip to content

ExecOptions

How an exec should be started. Every field optional; the defaults are the daemon’s.

optional cwd?: string;
null

optional env?: Record<string, string>;

optional execId?: string;

The idempotency key. Omitted, one is minted; supplied, the daemon returns success for a known id without spawning a second child — so a caller whose retry must be safe across its own restart passes a stable one.


optional group?: string | number;

A numeric gid, or a name the daemon resolves against the guest’s /etc/group.

null

optional inheritImageEnv?: boolean;

Start the child’s environment from the image’s ENV (minus AGENTD_*, never the token), beneath everything else (AGENTD-11). Off by default, which keeps the child’s environment exactly the launch environment plus env.


optional poweroffOnExit?: boolean;

Power off the guest after the original process group exits. Requires daemon support; all other VM work ends too, and acknowledgment and results may race shutdown. Off by default. Does not keep an idle VM awake.


optional reapGroupOnExit?: boolean;

Signal the whole process group once the command’s own child exits, so nothing it backgrounded outlives it. Off by default, which keeps the backgrounded-grandchild-output guarantee for callers who rely on it.


optional shell?: string | boolean;

true runs a single script string under /bin/sh -c; a string such as "bash" runs it under that shell, resolved by the daemon in the guest, and a shell the guest does not have is refused (unknown_shell) before anything starts.


optional stdin?: boolean;

Whether to open a stdin pipe. Writing without this is a 409.


optional timeout?: number;

The client-side deadline for runSync only.


optional timeoutSec?: number;

The daemon’s own kill deadline for the child, distinct from a client-side wait.

null

optional user?: string | number;

A numeric uid, or a name the daemon resolves against the guest’s /etc/passwd. An unknown name is refused (unknown_user) before anything starts. A user with a passwd row gets HOME, USER and LOGNAME from it, beneath the launch environment and env.

null

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.