Skip to main content

Module process

Module process 

Source
Expand description

Process execution & management methods + supporting types.

Ported from packages/core/src/agent-os.ts (process methods) and runtime-compat.ts (ExecOptions, ExecResult, ProcessInfo, etc.).

Two distinct process views: SDK-spawned processes (processes map, keyed by user-facing pid) back spawn + the stdin/stdout/stderr/exit subscriptions + wait/list/get/stop/kill; the kernel process table backs exec, all_processes, process_tree.

Structs§

ExecOptions
Base options shared by exec and spawn.
ExecResult
Result of exec.
ProcessExit
ProcessInfo
Full kernel process info (TS KernelProcessInfo).
ProcessOutput
ProcessTreeNode
A node in the process forest (ProcessInfo + children).
SpawnHandle
The pid returned by spawn.
SpawnOptions
Callback-free options for portable spawn.
SpawnedProcessInfo
Public JSON info for SDK-spawned processes.

Enums§

ProcessStatus
Process status from the kernel process table.
ProcessStream
SpawnStdio
stdio mode for a spawn.
StdinInput
stdin value: a string or raw bytes.
TimingMitigation
Timing-mitigation mode for an execution.

Type Aliases§

OutputCallback
A raw-byte streaming callback for stdout/stderr (TS (data: Uint8Array) => void). Invoked once per output chunk as it arrives. Never assume UTF-8: chunks are delivered as raw bytes.