Core is a complete hand without hand-written tool handlers: bash with process-group cancellation, file tools confined to a session workspace, a stdio MCP supervisor, per-session cleanup and registered capabilities. One core can serve the BMA cloud and a local brain at the same time. It is Go only, and bash is not a sandbox: every brain runs as the executor’s OS user.
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.

NewCore

Validates the options and creates the work root.

Register

Adds a capability (a set of methods behind capability bits); call it before Attach.

Capabilities

What an attached client should advertise.

Attach

Serves session.assign, session.stop, tool.call and every registered capability for one brain on a client; call it before the client starts. Brain names must be unique per core.

Close

Stops every session of every brain without reporting session.ended.

Env

Builds a bash or process environment from the executor’s base environment, the request env (bounded; loader and denied variables rejected) and CoreOptions.Env.

NewProcessCapability

Serves process.start/read/write/interrupt/terminate/list and process.status on core sessions: pipes or a PTY, cursor-addressed output, idempotent starts and writes, timeouts and process-group signals; nil hooks leave their capability bits unset.

NewSkillInstallCapability

Serves skill.install with your installer; installs run one at a time.

CoreSession

One assigned session of one brain, as seen by a capability.