Methods for attaching virtual or native desktop sessions (desktop.attach, desktop.wallpaper), publishing live screens and coordinating input control leases (screen.live, screen.control, deprecated screen.start/screen.stop), flushing session output files (session_files.flush), installing skills (skill.install), mounting filesystems (fs.mount, fs.unmount) and backing up machine workspaces (workspace.backup).

Methods overview

screen.start

Deprecated method. Prefer the replacement described below.
Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: display.native_webrtc · Idempotent by: session_id Deprecated: a native screen producer publishes into the SFU with screen.live (display.screen_live) instead; screen.start and screen.stop are removed once no executor declares display.native_webrtc. Starts a single native screen relay for this machine; no shell or virtual desktop is created. The server-selected session is idempotent; another active session is rejected. The relay ticket must never be logged. Human input remains disabled until separately fenced and authorized.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

screen.stop

Deprecated method. Prefer the replacement described below.
Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: display.native_webrtc · Idempotent by: session_id Deprecated with screen.start. Fences human input and stops the named native screen producer, waiting for cleanup before returning. Never resumes an agent. A repeated stop is safe; it must not affect a replacement session.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

screen.live

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: display.screen_live · Idempotent by: session_id The platform’s command to the screen publisher of a machine (desktop-relay.md §5; ADR-0080). screen_live_start: join room at url with token as publisher_identity and publish one SCREEN_SHARE video track; answer published=true only once the track is published. screen_live_renew: extend the publisher’s local lease to expires_at_ms. screen_live_stop: unpublish and leave the room. The publisher stops on its own when the local lease passes without a renew. A start for the same session_id and generation is idempotent; a start with a higher generation replaces the current publication. width and height (start only, both or neither) are the size the session asked for; a physical screen keeps its own size. The token must never be logged. The publisher receives the holder’s signed input as SFU data (bma.input.v1) and hands it to the executor’s control gate; it holds no input authority itself. An executor declares at most one of display.screen_live and display.native_webrtc.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

screen.control

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: display.screen_control · Idempotent by: lease_id The executor’s input fence for screen live sessions (rewrite-realtime.md §1.2). grant and renew admit only signed input (desktop-relay.md §5b) from identity, signed with input_key (32-byte Ed25519 public key, base64url without padding), under epoch and lease_id until expires_at_ms, and refuse the agent’s input meanwhile; epoch never decreases within the executor process. release and handback drain the holder’s input and release everything it holds before answering; handback lets the agent resume. The executor answers accepted only after the fence is in effect.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

desktop.attach

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: display.desktop · Idempotent by: session_id Harness to executor request (machine-scoped executors that claim display.desktop). The machine’s desktop agent runs from machine start (desktop-relay.md §1); the executor hands it the session and answers once the agent accepted it. The agent then dials the session’s relay lanes at relay_url with the ticket (Authorization bearer) and serves the session until it is closed (session_close, or a lane refused with 4001/4003/4004) or attached again, which replaces the earlier attach. width and height, together, resize the desktop unless the same size was asked for last. wallpaper names the environment’s default wallpaper; the result asks for its bytes (desktop.wallpaper) when the machine lacks them. Waits at most 5 s for a desktop that is still starting, then answers ResourceUnavailable with data.reason desktop_starting and data.retryable true (the platform answers 409 machine_starting stage=desktop_starting with Retry-After). With capture_id, attach only the media relay of that already running screen_live capture on machine_id; session_id remains the desktop relay session. This requires an exact active machine/capture match and forbids width, height and wallpaper. It never starts a capture, the legacy peer-to-peer path or another input worker, and a missing capture is rejected.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

desktop.wallpaper

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: display.desktop Harness to executor request. Chunks follow each other from offset 0 (data is standard base64, at most max_process_write_bytes decoded); the chunk with done installs the image when its sha256 matches and applies it to the running desktop.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

skill.install

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: skills.install · Idempotent by: skill_id+revision_id+digest 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). Installed at $BMA_HOME/installations/executor/machines/{machine_id}/skills/{skill_id}/revisions/{revision_id}/ (the archive’s single top-level directory removed). The platform calls it (contract 2.3.0) on the session’s hands machine before a platform tool call runs there, and, for a session whose brain runs on the machine (turn.start without tools_mcp_*), on that machine before every turn.start, once per frozen skill revision of the session, in the order the session froze them. That turn’s config.system then names each installed revision’s SKILL.md at that path; an executor that sandboxes its brain lets it read those directories, never write them. A failed install ends the turn failed (session.error skills_install_failed) without a turn.start; when the executor does not declare skills.install the turn runs without the skills after a session.error skills_unsupported.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

workspace.backup

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: workspace.backup · Idempotent by: backup_id 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.

Parameters (Input)

Result (Output)

Errors

Wire frame & SDK usage

session_files.flush

Direction: Platform → Executor · Kind: request · Since: bma.executor.v1.1 · Capability: session_files Harness to executor request (machine-scoped, contract 1.13.0). Before the platform pauses or hibernates the machine it asks the executor to upload every changed file under the outputs of every session it shows (what the periodic scan would upload next, without waiting for the file to be seen stable) and answers when all uploads are done. “flushed” means no upload is outstanding; “failed” means at least one upload failed and may be retried, so the platform must not pause yet. A file the platform refuses for good (size, quota, name) is not a failure. Idempotent; an executor that does not know the method answers -32601, which the platform treats as nothing to flush.

Parameters (Input)

No parameters ({}).

Result (Output)

Errors

Wire frame & SDK usage