Methods that manage long-running child processes with cursor-based output reads (process.start, process.read, process.write, process.interrupt, process.terminate, process.list, process.status) and interactive PTY terminal streams (terminal.open, terminal.attach, terminal.close).

Methods overview

process.start

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: process.enabled · Idempotent by: session_id+process_id Harness to executor request (v1.1 §3.3). Idempotent by (session_id, process_id): a repeat returns the live state. wait_ms waits up to that long for the process to end before answering. A spawn failure is an error with data.reason “spawn_failed”. io_mode, file_transfer, package_install and git_credentials each require the matching process capability bit.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

process.read

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: process.enabled Harness to executor request (v1.1 §3.4). Long-polls up to wait_ms for new bytes. gap=true when bytes before earliest_cursor were dropped from the ring buffer.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

process.write

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: process.enabled Harness to executor request (v1.1 §3.5). Exactly one of data (base64, at most 32 KiB decoded) or close_stdin. close_stdin is rejected for io_mode “pty”.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

process.interrupt

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: process.enabled Harness to executor request (v1.1 §3.6).

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

process.terminate

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: process.enabled Harness to executor request (v1.1 §3.6).

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

process.list

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: process.enabled Harness to executor request (v1.1 §3.7). A new connection starts with an empty process table.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

process.status

Direction: Executor → Platform · Kind: notification · Since: bma.executor.v1.1 · Capability: process.enabled Executor to harness notification (v1.1 §3.8). Advisory: the harness confirms state with process.read or process.list.

Parameters (Input)

Result (Output)

Notification — no JSON-RPC response frame.

Errors

Wire frame & SDK usage

terminal.open

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: terminal.enabled · Idempotent by: terminal_id Harness to executor request (machine-scoped). Returns the live PTY with the same terminal_id; rows/cols only size a new PTY, and the rest of the spec must match a live terminal or the executor answers -32013.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

terminal.attach

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: terminal.enabled Harness to executor request. The executor dials host.url with the ticket, offering subprotocol bma.terminal.v1, and answers after the attached frame was written. from_seq/ack_seq resume output exactly as the bma.terminal.v1 attach frame does; can_write requests the single writer lease. Closing the host socket detaches; the PTY survives.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

terminal.close

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: terminal.enabled · Idempotent by: terminal_id Harness to executor request. Idempotent.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage