@maka/computer-use@maka/computer-use adapts Maka's Runtime-owned Computer Use contracts to the native maka-cu executor. It owns backend selection, the executor process and protocol lifecycle, host-side result decoding, display snapshot mapping, and the cursor-overlay hook. Runtime owns the model-facing tools and session state; Desktop supplies the executable and presentation dependencies.
The package exposes one root entry point through src/index.ts:
selectComputerUseBackend() selects the available executor and builds the Runtime tool set. CU_BACKEND_IDS currently contains only maka-cu.createMakaCuBackend() adapts the native executor to Runtime's CuDispatchBackend contract.MakaCuService supervises the executor process and owns the JSON-RPC request, cancellation, restart, and generation lifecycle.maka-cu-protocol exports decode and validate maka.cu/2 envelopes, snapshots, dispatch results, domain errors, and key chords.resolveCuaDisplaySnapshots() maps executor screenshots to Electron display coordinates without guessing when the display geometry is ambiguous.createComputerUseOverlayHook() projects action lifecycle events to a presentation-only cursor sink. It does not choose or authorize targets.Other packages should import these exports from @maka/computer-use, not from undeclared internal source paths.
The shipped selector enables Computer Use only when all of these conditions hold:
process.platform === 'darwin');maka-cu executable path; andOn another platform, with missing inputs, or when backend construction fails, selection fails closed to backendId: 'none' with an empty tool set. This package does not discover, download, or choose an unpinned executable.
The executable's build, provenance, signing, and distribution status are separate release concerns. See computer-use-provenance.md rather than assuming that installing this workspace supplies a runnable binary.
Cross-platform work is tracked separately:
The host and executor communicate over line-delimited JSON-RPC using the versioned maka.cu/2 protocol. MakaCuService verifies that the executable is usable and checks any configured digest before spawning it, completes a host.hello handshake, and exposes the executor version, capabilities, limits, and process generation. The product selector always supplies the required digest.
Lifecycle and protocol failures remain distinct:
MakaCuLifecycleError reports unavailable, mismatched, aborted, or outcome-unknown process states;MakaCuRpcError reports a JSON-RPC error response for one method; andMakaCuProtocolViolation reports malformed or contradictory wire data.An executor exit releases affected sessions and invalidates their observations. Requests that may have reached the executor surface as outcome-unknown rather than being replayed automatically. Runtime must re-observe before another action.
@maka/core and @maka/runtime.apps/desktop.CU_BACKEND_IDS with a placeholder.The cross-layer safety and evidence rules live in the Computer Use foundation contract and host events contract.
Install dependencies once at the repository root, then run:
npm run build npm --workspace @maka/computer-use run test:dist npm --workspace @maka/computer-use run typecheck
The package tests cover protocol decoding, process lifecycle, backend behavior, host-event propagation, display mapping, overlay projection, and the cumulative Computer Use path.