process.*), PTY terminals (terminal.*), skill installation and workspace backups. Each is advertised by a capability bit and served with a typed handler; a request for a capability you did not advertise is refused with capability_unavailable (-32012). The Go execution core serves process.* and skill.install for you (see Execution core).
Generated from bma-executor-sdk 1.3.0 and its contract (
contracts/bma/executor, protocol bma.executor.v1.1). Install, credentials and quick starts are on the bma-executor-sdk overview; the protocol itself is described in Executor Protocol.Methods
process.start
Start a process. 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. Direction: harness → executor · Kind:request · Capability: process.enabled · Idempotent by: session_id+process_id · Since: bma.executor.v1.1
Parameters
Result
ProcessState
In the SDK
process.read
Read process output from a cursor. 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. Direction: harness → executor · Kind:request · Capability: process.enabled · Since: bma.executor.v1.1
Parameters
Result
ProcessReadResult
In the SDK
process.write
Write to process stdin. 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”. Direction: harness → executor · Kind:request · Capability: process.enabled · Since: bma.executor.v1.1
Parameters
Result
ProcessWriteResult
In the SDK
process.interrupt
Interrupt a process (SIGINT). Harness to executor request (v1.1 §3.6). Direction: harness → executor · Kind:request · Capability: process.enabled · Since: bma.executor.v1.1
Parameters
Result
ProcessState
In the SDK
process.terminate
Terminate a process (SIGTERM, then SIGKILL after grace_ms). Harness to executor request (v1.1 §3.6). Direction: harness → executor · Kind:request · Capability: process.enabled · Since: bma.executor.v1.1
Parameters
Result
ProcessState
In the SDK
process.list
List the processes of a session. Harness to executor request (v1.1 §3.7). A new connection starts with an empty process table. Direction: harness → executor · Kind:request · Capability: process.enabled · Since: bma.executor.v1.1
Parameters
Result
ProcessListResult
In the SDK
process.status
Advise a process state change. Executor to harness notification (v1.1 §3.8). Advisory: the harness confirms state with process.read or process.list. Direction: executor → harness · Kind:notification · Capability: process.enabled · Since: bma.executor.v1.1
Parameters
Result
No result (notification).
In the SDK
terminal.open
Create or reuse a PTY. 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. Direction: harness → executor · Kind:request · Capability: terminal.enabled · Idempotent by: terminal_id · Since: bma.executor.v1.1
Parameters
Result
TerminalOpenResult
In the SDK
terminal.attach
Attach one consumer to a live PTY. 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. Direction: harness → executor · Kind:request · Capability: terminal.enabled · Since: bma.executor.v1.1
Parameters
Result
TerminalAttachResult
In the SDK
terminal.close
Close a PTY. Harness to executor request. Idempotent. Direction: harness → executor · Kind:request · Capability: terminal.enabled · Idempotent by: terminal_id · Since: bma.executor.v1.1
Parameters
Result
TerminalCloseResult
In the SDK
skill.install
Install one skill revision on the machine. Harness to executor request (machine-scoped). The executor downloads the revision archive with download_token, verifies digest, and installs it. Idempotent by (skill_id, revision_id, digest). Direction: harness → executor · Kind:request · Capability: skills.install · Idempotent by: skill_id+revision_id+digest · Since: bma.executor.v1.1
Parameters
Result
SkillInstallResult
In the SDK
workspace.backup
Upload one backup of the machine workspace. Harness to executor request (machine-scoped). The executor walks paths (absolute), skipping exclude entries and its own BMA_HOME, and streams a tar+zstd archive with PUT to /daemon/machine-backups/{backup_id}/archive over the machine token, with the tree fingerprint in X-BMA-Backup-Fingerprint. When the fingerprint equals skip_if_fingerprint nothing is uploaded and the result is “unchanged”. Restore has no method; a recreated executor fetches /daemon/machine-backup-restore before executor.register. Direction: harness → executor · Kind:request · Capability: workspace.backup · Idempotent by: backup_id · Since: bma.executor.v1.1
Parameters
Result
WorkspaceBackupResult
In the SDK