Maka separates runtime infrastructure, domain plugins, and product assembly into three layers:
maka-event-log), Host service lifecycle, V8/Python sandboxes, OS process isolation, Computer Use, and NSH UI support.agent, workspace, skills, settings, interactions) and their public wire contracts.A plugin package (package.ts) is an authored deployment unit (host, ui, or composition), whereas a Cargo crate is a Rust compilation boundary. The two do not map 1:1: the Agent domain splits across multiple crates with strict one-way dependencies, while smaller plugin entries can share a single native crate.
.maka-plugin bytes and addresses them by content digest.maka-host-runtime reconciles enabled Host services in the background, while the NSH workbench observes the same source and mounts enabled UI contributions.Installing a package adds it to the local store without activating it; explicit composition nodes control what runs. Reconfiguring a deployment keeps unchanged service activations alive, while modified or removed instances stop admitting new requests and drain in-flight operations before retiring.
Both the terminal shell (cell grid or pixel graphics) and the desktop window execute the same TSX/NSH workbench in a single shared VM. Trusted UI modules export activate(context) to register roots, views, commands, panels, settings pages, and tool cards; an optional prepareReload() hands off JSON state across live UI reloads for the same instance identity.
maka-event-log owns persistence for each State Root: one exclusive OS file lock (RootOwner) and one SQLite database (RootStore). A single writer queue serializes commits, independent reader connections serve consistent snapshots, and a disposable background lane maintains derived transcript and FTS indexes. Domain crates register SQL migrations on RootStore instead of opening separate databases.
Persistent plugin state is keyed by (Root, deployment, instance). Updating package bytes or restarting an activation never creates a new state namespace.
Side-effecting Host calls use a two-phase ledger that separates caller intent from provider settlement:
CallerIntent) — Before a mutation reaches a provider, the Host records the caller's RecoveryRef (target instance, method, operation UUID, request fingerprint, and contract digest). On retry or restart, an owner inspects its own intent journal rather than blindly re-issuing mutations.Outcome and Cleanup — Provider receipts (application_operations) track business Outcome (NotExecuted, Returned, Unknown) separately from physical resource Cleanup (Unconfirmed, Confirmed, Failed). Both advance monotonically.Unknown, blocking automatic replay while still accepting late authoritative completion (OperationObserved) without rewriting historical cuts.Returned receipt, with no network or subprocess I/O inside the write lock.Unknown operations, unconfirmed cleanups, live Code Mode cells, and history snapshots pin their content-addressed blobs until both outcome and cleanup settle.The Agent domain enforces a one-way crate dependency chain:
facts, api, ports — persisted record types, public wire schemas, and execution traits (no live Host handles).state — SQLite migrations, canonical fact appends, and deterministic in-transaction projections (active run frontier, level-triggered waits, Code Mode cells, SessionData, artifacts, snapshots, catalog, usage, and Recall).engine — the deterministic reconciler and turn driver. Live turns, user approvals, model retries, context compaction, and cold-restart recovery all step through the same frontier loop.authority, native — live activation custody, workspace permission intersection, model/tool/executor bindings, and background run scheduling.Core execution guarantees:
RunId — One logical run keeps its RunId across approvals, retries, compaction, and Host restarts, decomposed into StepIds and upstream ModelAttempts. Continuing after a terminal Failed or Cancelled run starts a new RunId over a verified history cut.Cell and SessionData) — Code Mode persists cell lifecycles, nested tool bindings, and key-value SessionData (published atomically when a cell completes). Maka never snapshots V8/Python heaps or replays scripts on recovery.TaskOwner process custody, while the ACP service adapter (acp-executor) runs in an isolated workspace and publishes accepted edits through the Host.maka-schema (tools/schema) exports Rust contracts into @maka-agent/plugin-sdk without compiling V8 or the full product. CLI builds embed the default product bundle and workbench UI, while installed plugins load dynamically from the package store. Local just recipes and GitHub Actions share change-based test routing and cargo nextest archive execution in scripts/ci.mjs.