Documentation
¶
Overview ¶
Command sandboxed-folder runs this machine as a BMA executor whose processes work in a local folder chosen per session, inside a macOS sandbox-exec profile that only allows writes to that folder and the session's outputs.
The caller creates the session on this machine's environment and puts two opaque references in the session metadata, for example {"workspace_ref": "ws_7", "owner": "u_42"}. Before each process starts, the Launch hook reads the session context, refuses a session of another owner (session_rejected), resolves workspace_ref with this machine's own folder table (BMA never stores the path; an unknown reference is workspace_unavailable), refuses a cwd outside the folder (workspace_boundary) and wraps the command in sandbox-exec. A process without agent_session_id is refused with session_rejected, unless the platform started it on its own (metadata initiator "platform", for example the machine desktop agent) and -platform-dir is set: that runs in its own directory by this machine's policy, never in a session folder. A package install is refused (local_confirmation_denied), which writes outside the folder.
BMA_BASE_URL=https://executor.<env>.beeos.ai BMA_MACHINE_TOKEN=... \ go run ./examples/sandboxed-folder -owner u_42 -folder ws_7=$HOME/projects/site \ -session-files "$HOME/Library/Application Support/example/sessions" \ -platform-dir "$HOME/Library/Application Support/example/platform"