process.*), PTY 터미널(terminal.*), 스킬 설치, 워크스페이스 백업. 각각 기능 비트로 선언하고 타입이 지정된 핸들러로 처리하며, 선언하지 않은 기능을 요청하면 capability_unavailable(-32012)로 거부됩니다. Go 실행 코어는 process.*와 skill.install을 대신 처리합니다(실행 코어 참고).
bma-executor-sdk 1.12.2과 그 계약(
contracts/bma/executor, 프로토콜 bma.executor.v1.1)에서 생성했습니다. 설치, 자격 증명, 빠른 시작은 bma-executor-sdk 개요를, 프로토콜 자체는 Executor Protocol을 참고하세요.메서드
process.start
프로세스를 시작합니다. 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. 방향: harness → executor · 종류:request · 기능: process.enabled · 멱등 키: session_id+process_id · 도입 버전: bma.executor.v1.1
매개변수
결과
ProcessState
SDK 사용법
process.read
커서 위치부터 프로세스 출력을 읽습니다. 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. 방향: harness → executor · 종류:request · 기능: process.enabled · 도입 버전: bma.executor.v1.1
매개변수
결과
ProcessReadResult
SDK 사용법
process.write
프로세스 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”. 방향: harness → executor · 종류:request · 기능: process.enabled · 도입 버전: bma.executor.v1.1
매개변수
결과
ProcessWriteResult
SDK 사용법
process.interrupt
프로세스를 인터럽트합니다(SIGINT). Harness to executor request (v1.1 §3.6). 방향: harness → executor · 종류:request · 기능: process.enabled · 도입 버전: bma.executor.v1.1
매개변수
결과
ProcessState
SDK 사용법
process.terminate
프로세스를 종료합니다(SIGTERM 후 grace_ms 뒤 SIGKILL). Harness to executor request (v1.1 §3.6). 방향: harness → executor · 종류:request · 기능: process.enabled · 도입 버전: bma.executor.v1.1
매개변수
결과
ProcessState
SDK 사용법
process.list
세션의 프로세스를 나열합니다. Harness to executor request (v1.1 §3.7). A new connection starts with an empty process table. 방향: harness → executor · 종류:request · 기능: process.enabled · 도입 버전: bma.executor.v1.1
매개변수
결과
ProcessListResult
SDK 사용법
process.status
프로세스 상태 변화를 알립니다. Executor to harness notification (v1.1 §3.8). Advisory: the harness confirms state with process.read or process.list. 방향: executor → harness · 종류:notification · 기능: process.enabled · 도입 버전: bma.executor.v1.1
매개변수
결과
결과 없음(알림).
SDK 사용법
terminal.open
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. 방향: harness → executor · 종류:request · 기능: terminal.enabled · 멱등 키: terminal_id · 도입 버전: bma.executor.v1.1
매개변수
결과
TerminalOpenResult
SDK 사용법
terminal.attach
살아 있는 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. 방향: harness → executor · 종류:request · 기능: terminal.enabled · 도입 버전: bma.executor.v1.1
매개변수
결과
TerminalAttachResult
SDK 사용법
terminal.close
PTY를 닫습니다. Harness to executor request. Idempotent. 방향: harness → executor · 종류:request · 기능: terminal.enabled · 멱등 키: terminal_id · 도입 버전: bma.executor.v1.1
매개변수
결과
TerminalCloseResult
SDK 사용법
skill.install
머신에 스킬 리비전 하나를 설치합니다. 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). 방향: harness → executor · 종류:request · 기능: skills.install · 멱등 키: skill_id+revision_id+digest · 도입 버전: bma.executor.v1.1
매개변수
결과
SkillInstallResult
SDK 사용법
workspace.backup
머신 워크스페이스 백업 하나를 업로드합니다. 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. 방향: harness → executor · 종류:request · 기능: workspace.backup · 멱등 키: backup_id · 도입 버전: bma.executor.v1.1
매개변수
결과
WorkspaceBackupResult
SDK 사용법