Expand description
Storage layer: SQLite-backed object store and file store. Port of Go’s pkg/mstore and pkg/filestore.
Re-exports§
pub use agent_bundles::agent_picked_bundles;pub use agent_bundles::format_agent_bundle_block;pub use agent_bundles::join_startup_blocks;pub use agent_native_memory_versions::NativeMemoryVersion;pub use agent_native_memory_versions::NativeMemoryVersionSummary;pub use bundle_versions::BundleVersion;pub use bundle_versions::BundleVersionSummary;pub use agents::AgentDefinition;pub use agents::InstanceUpdate;pub use content::AgentContent;pub use error::StoreError;pub use history::AgentHistory;pub use mcp_origin::McpBinding;pub use mcp_origin::McpOrigin;pub use mcp_servers::McpServer;pub use mcp_servers::McpServerReach;pub use bundles::format_global_bundle_block;pub use bundles::global_bundle_sections;pub use bundles::BundleReseedOutcome;pub use bundles::GlobalMemorySection;pub use skills::AgentSkill;pub use skills::Skill;
Modules§
- agent_
activity_ summaries - On-demand, once-per-definition activity summary — see
db_agent_activity_summariesin migrations.rs (OBJECT_SCHEMA_VERSIONv27) and docs/reports/REPORT_AGENT_PICKER_FIELD_ORDER_SORT_AND_DATA_GAPS_AUDIT_2026_08_24.md §5a. - agent_
bundles - An agent’s Bundles list: the bundles picked for it, in order
(
SPEC_RENAME_KNOWLEDGE_TO_MEMORY_2026_10_06.md§3.6). - agent_
credentials - Per-agent M2M Cognito credential for muxbus Tier-4 credential binding. See db_agent_credentials in migrations.rs (SHARED_STORE_SCHEMA_VERSION v4). The relay side is designed in the private cloud repo.
- agent_
groups - Saved fleet-control target groups — see
db_agent_groupsin migrations.rs (OBJECT_SCHEMA_VERSIONv24) and docs/specs/SPEC_MULTI_AGENT_FLEET_CONTROL_2026_08_20.md. - agent_
input_ history - What the user typed to each agent, kept with the agent
(
docs/specs/SPEC_AGENT_INPUT_HISTORY_2026_10_18.md):db_agent_input_history, one row per send (a run of the same text is one row countingsends), anddb_agent_input_drafts, the agent’s unsent draft. Both in the channel store besidedb_agents, so they are created, carried by an upgrade and deleted with the agent (agents/purge.rs). Local only: nothing here is sent anywhere, and no agent tool reads it. - agent_
jekt_ keys - Per-agent HMAC-SHA256 signing key for host-tier jekt sender verification. See db_agent_jekt_keys in migrations.rs (OBJECT_SCHEMA_VERSION v18) and docs/specs/SPEC_JEKT_TRUST_LAYER_COMPLETION_2026_08_13.md §2.2.
- agent_
lan_ keys - Per-agent Ed25519 keypair for LAN-tier jekt sender verification. See db_agent_lan_keys in migrations.rs (OBJECT_SCHEMA_VERSION v19) and docs/specs/SPEC_JEKT_LAN_TIER_SIGNING_2026_08_15.md §2.1.
- agent_
native_ memory - Durable, location-consistent mirror of each agent’s native (Claude Code) memory files. See db_agent_native_memory in migrations.rs (SHARED_STORE_SCHEMA_VERSION v6 / OBJECT_SCHEMA_VERSION v14) and docs/specs/SPEC_NATIVE_MEMORY_DURABLE_SYNC_2026_08_07.md for the full design.
- agent_
native_ memory_ versions - Append-only version history for native memory content. See
db_agent_native_memory_versionsin migrations.rs (SHARED_STORE_SCHEMA_VERSIONv8 /OBJECT_SCHEMA_VERSIONv24 /IDENTITY_STORE_SCHEMA_VERSIONv3) and docs/specs/SPEC_MEMORY_VERSION_CONTROL_AND_ARMORY_AUDIT_2026_08_19.md for the full design. - agent_
tokens - Per-agent local identity token, keyed by the agent’s UID (
db_agents.id). - agent_
uid_ keys - Identity M4d-2: each agent’s LAN and WAN signing keypairs filed under its
UID (
db_agents.id), beside the name-keyed tables they are copied from (SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md§6.5.10). - agent_
wan_ keys - Per-agent Ed25519 keypair for general agent-to-agent WAN-tier jekt
signing. See
db_agent_wan_keysin migrations.rs (OBJECT_SCHEMA_VERSION v36). - agents
- Agent subsystem — definitions, instances, and their lifecycle CRUD.
- agents_
consolidate - Phase 3a — one-shot backfill from
db_agent_definitions+db_agent_instancesinto the new consolidateddb_agentstable. - background_
container_ calls - What a container agent’s
agentmux-bashwrapreports about a Bash call, kept beside the durable background-task registry (background_tasks.rs) and never in it. - background_
tasks - Durable registry of declared long-running (
run_in_background: true) tasks attached to a block. Seedb_background_tasksin migrations.rs (OBJECT_SCHEMA_VERSIONv20) and docs/status/STATUS_ATTACHED_TASK_AXIS_AND_DEV_LOOP_2026_08_15.md. - builtin_
seeds - The record of what AgentMux has shipped into a store once (
backend::builtin_skills): a key per seeded item that stays after the user deletes the item, so a delete is final and the seed does not bring it back at the next start. The table is created on first use, likedb_skill_reach, with no schema bump. - bulletins
- The bulletin board: short posts an agent sees at its next real turn, never waking one
(
docs/specs/SPEC_CHEAPER_FLEET_MESSAGING_2026_10_30.md§4). A post lives here so an agent that is stopped or starts later still reads what it missed, and a restart of srv loses nothing. Each reader has a “seen” set, so a bulletin is shown to an agent once. - bundle_
scope - Which Global Memory entries follow the fleet (task #12439, “agents operate other machines”, section 4.6).
- bundle_
versions - Append-only version history for Global Memory entry content — mirrors
agent_native_memory_versions.rs’s shape exactly, adapted for a singlebundle_idkey instead of that table’s composite(agent_id, filename)(a Bundle’s identity is already a single id). Seedocs/specs/SPEC_AGENT_FACING_GLOBAL_MEMORY_API_2026_09_15.mdPhase 0 — Global Memory (db_bundles) previously had no audit trail at all, onlyupdated_at; this exists specifically because Global Memory is about to gain a write path an agent, not just a human in Memory, can reach. - bundles
- Bundles — the agent’s personality and capability stack (provider, model, instructions, context files, MCP servers, skills).
- container_
limits - A container agent’s own CPU and memory limits (
db_agent_container_limits), beside the agent definition rather than a column of it: a column ofdb_agentsis read and written in a few dozen places. An absent row, or an empty value, is “not set”: the app-wide setting and then the default computed from the Docker daemon decide (backend::container::limits).0is “no limit”.docs/specs/SPEC_CONTAINER_AGENT_RESOURCE_LIMITS_2026_10_29.md§3. - content
- Agent-content blobs — per-agent key/value content storage (e.g. the “instructions” panel content).
- conversation_
trust_ grants - Allowlist for a responding agent’s
conversation_visibility: trusted_peersmode. Seedb_conversation_trust_grantsin migrations.rs (OBJECT_SCHEMA_VERSION v26) and docs/specs/SPEC_MUXSPECT_CROSS_TIER_CONVERSATION_VISIBILITY_2026_08_21.md Phase B. - coord_
posts - Coordination posts: what an agent published to a repository’s channel for
any agent working on the same thing to read (
PostToChannel,ReadChannel,WhoIsWorkingOn’srecent_posts), and the claims and releases recorded there (docs/specs/SPEC_AGENT_COORDINATION_CHANNEL_2026_10_15.md). - cron
- Persistent job storage: CRUD on
db_jobs(docs/specs/SPEC_JOBS_AND_TEMPLATES_2026_10_24.md §5.1), in the same store as thedb_cron_jobsit replaced: the shared store (store.db), which is per channel under isolated auth.db_cron_jobsstays as it was for older builds;m0040_cron_jobs_to_db_jobscopied its rows here, keeping their ids. See alsoSPEC_CRON_LOOP_ROBUSTNESS_2026_06_25.md. - db_copy
- One way to copy a SQLite database file:
VACUUM INTOa temporary file beside the destination, then rename it into place. - def_
registry_ mirror - Global agent-definition registry mirror.
- dreams
- The record of Dreams: one row per pass of the memory organizer, and one row per file operation it proposes (docs/specs/SPEC_DREAMS_BACKGROUND_MEMORY_ORGANIZING_2026_11_27.md §9, build step 1).
- drone_
store - Store extension methods for
db_drone_definitions+db_drone_runs. They sit with the storage layer because the job store, the job templates and the migrations all read these rows;crate::drone::storagestill names this module. - drone_
types - Drone + run types. Mirrors the frontend shape so RPC payloads
flow through
serde_json::to_valuewithout manual mapping. They sit with the storage layer because the job store and job templates use them;crate::drone::typesstill names this module. - error
- Error types for the storage layer.
- filestore
- FileStore: file storage with write-through cache + background flusher. Port of Go’s pkg/filestore/blockstore.go, blockstore_cache.go, blockstore_dbops.go.
- google_
grants - Which agents may use which Google service of a connected account, and what they did with it (docs/specs/SPEC_GOOGLE_CONNECTORS_GMAIL_CALENDAR_DRIVE_2026_10_14.md D4, D7).
- history
- Agent session history — append-only per-agent entries with date-bucket + LIKE search.
- host_
lan_ keys - The host’s LAN signing keys: one per agent on this machine, whatever channel or build runs it.
- identities
- Identity subsystem — accounts and the direct junction that ties them to agents.
- jekt_
held - Jekts held for an absent agent —
SPEC_DURABLE_JEKT_DELIVERY_2026_09_24.mdPhase 1. A message to a known agent of this channel that no delivery tier could take is kept here for up to 24 h and replayed when the agent registers. The trust verdicts it was accepted with are explicit columns: onInjectionRequestthey areskip_deserializing, so they would not survive a JSON round-trip. - job_
cloud - Cloud job runs in the run ledger (docs/specs/SPEC_JOBS_AND_TEMPLATES_2026_10_24.md §4.1).
- job_
events - Which events a job has heard of (docs/specs/SPEC_DRONE_REAL_WORLD_JOBS_2026_11_11.md §3.7): delivery is at least
once, so a source may name the same event twice, and the job’s
(job_id, event_id)here is what turns the second into nothing. It sits beside the run ledger, in the identity store every channel and version on this computer shares, so two instances sharing a job don’t both start a run for one event. - job_
incidents - Job incidents: a job’s consecutive failures, from the first to the next success, and the one Kanban task that stands for them (docs/specs/SPEC_JOBS_AND_TEMPLATES_2026_10_24.md §2, §3.4).
- job_
run_ spend - What the run ledger knows about spending and sending, for the caps (docs/specs/SPEC_JOBS_AND_TEMPLATES_2026_10_24.md §5.3): a job’s or an account’s spend since the start of the operator’s day, the messages a job delivered, and the cap skips a day already holds. A day’s figures count the runs that started in it.
- job_
runs - The run ledger: one row per time a job was meant to run, including the times it didn’t (docs/specs/SPEC_JOBS_AND_TEMPLATES_2026_10_24.md §3.1).
- lan_
peer_ pin_ installs - Which install vouched for a LAN name’s pinned key, and the keys a name has moved off.
See
db_lan_pin_installsanddb_lan_retired_keysin migrations.rs (OBJECT_SCHEMA_VERSIONv45). - lan_
peer_ pubkey_ pins - Trust-on-first-use pin of a REMOTE agent_id’s LAN public key. See db_lan_peer_pubkey_pins in migrations.rs (OBJECT_SCHEMA_VERSION v20) and docs/specs/SPEC_JEKT_LAN_TIER_SIGNING_2026_08_15.md §2.2.
- lan_
peer_ uid_ pins - Trust-on-first-use pin of a REMOTE agent’s UID key, per (name, UID)
(identity M4d-6,
SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md§6.5.10). The LAN v2 counterpart oflan_peer_pubkey_pins.rs, and set only after that name pin matched: UIDs are public, so a pin keyed by UID alone could be squatted by a peer answering for its own name. - managed
- The “managed primitive” storage shape shared by standalone Skills and MCP Servers (v1 composable model, SPEC_V1_MCP_SKILLS_PRIMITIVES_2026_06_30.md; bundle-level refs per SPEC_BUNDLE_AS_CONTAINER_V2_2026_08_17.md).
- mcp_
origin - Who added, changed and bound an MCP server.
- mcp_
servers - Standalone MCP Server primitives (v1 composable model).
- migrations
- SQL schema setup for Store, FileStore, and the saga log.
- muxbus
- muxbus_
load - Finding a channel’s MuxBus tokens (
Store::muxbus_load_tokens): one step per place they can be, tried in this order, the first that has them wins: - muxbus_
presence - Whether a channel has a MuxBus sign-in of its own stored, asked of the store alone.
- project_
instructions - Tracking for what an agent reads as project instructions.
- registry_
mirror - Cross-version named-agent registry mirror.
- skill_
app - What makes a catalog skill a computer-use skill (docs/specs/SPEC_PACKS_2026_11_05.md §3, §7): its
manifest (
computer-use.json), the files that sit beside itsSKILL.md, and the records of tests that passed. They live indb_skill_app,db_skill_fileanddb_skill_verified, in the identity store besidedb_skills, and are created on first use without a schema bump (likedb_skill_source). A skill written by hand has nodb_skill_approw. - skill_
optout - An agent that opted out of a catalog skill that reaches everyone (“every agent” or “new
agents”). The opt-out only cancels the reach; an explicit bind to that agent still gives it the
skill. Rows live in
db_skill_optout, in the identity store besidedb_skills, created on first use without a schema bump (likedb_skill_reach). - skill_
reach - Who a catalog (global) skill reaches beyond the agents it is bound to: every agent, and/or every
agent created from a given time. The switches live in
db_skill_reach, in the identity store besidedb_skills, so they survive an upgrade (likedb_mcp_server_reach). Read when an agent’s files are written (Store::effective_skills), so no hook on agent creation is needed. - skill_
source - Where an imported catalog skill came from, so it can be checked for changes later. The source
lives in
db_skill_source, in the identity store besidedb_skills, and is created on first use without a schema bump (likedb_skill_reach). A skill written by hand has no row. - skills
- Agent skills — reusable capability records attached to an agent definition.
- snapshot
- Pre-migration snapshots — Increment B.2 lean cut from
docs/specs/SPEC_DATA_CHANNELS_2026_05_24.md§3.4. - spend_
day - What each agent has used through the model gateway, per route and UTC day (
db_agent_spend_day), so an srv restart does not start the day again (docs/specs/SPEC_ROUTE_AGENT_BRAKES_2026_11_10.mdsection 3.1).backend::model_gateway::spendkeeps the live table and writes each changed row here. - store
- Store: generic OID-based CRUD for StoreObj types. Port of Go’s pkg/mstore/mstore_dbops.go + mstore_dbsetup.go.
- stored_
keys_ withheld - The keys srv has stored for agents are withheld from transcripts from the start, not from the first time one is read.
- timed_
mutex - A mutex that says when it was waited on, or held, for a long time.
- user_
workspaces - Workspaces as the user means them: a named set of windows, saved as they
change (docs/specs/SPEC_WORKSPACES_2026_10_23.md §2, §4.2). Not the srv
Workspaceobject, which is one window’s contents. - vault
- The Vault’s rows in the identity store:
db_vault_entries(each entry, its secret parts sealed bybackend::vault::seal) anddb_vault_activity(what was done with them, never a value). docs/specs/SPEC_VAULT_PANE_AGENTS_USE_SECRETS_UNSEEN_2026_10_19.md §5.5. - vault_
changes - What the Vault keeps of changes agents made, for the person to look at (docs/specs/SPEC_VAULT_AGENT_ADDS_AND_EDITS_WITHOUT_ASKING_2026_11_25.md):
which entries hold a value an agent had the Vault read (an import or a capture), or a site an agent chose, that the person
has not yet seen; the details an agent’s edit replaced, kept 7 days; and the changes of where a login is offered that an
agent proposed on a login it did not make. The rules are in
backend::vault::agent_set,detailsandproposals; nothing here holds a value. - vault_
sync - What the Vault keeps for a Vault shared across machines, beside its own tables (
vault.rs): an entry’s link-id aliases and the ids of removed entries, and the activity lines other machines made. The rules that use them are inbackend::vault::sync_linksandsync_activity; nothing here holds a value. - vault_
versions - A Vault entry’s earlier values:
db_vault_versions(schema invault.rs). Each row is a sealed blob as the entry held it, never a value. - viewer_
devices - Paired devices: the viewer grants a device receives at pairing, and each
agent’s “hide from paired devices” flag. See
db_viewer_devicesanddb_agents.hide_from_devicesin migrations.rs (OBJECT_SCHEMA_VERSION v43) andbackend::viewer. - wan_
identity - The channel-wide WAN identity store,
<channel dir>/wan-identity/wan.db(SPEC_WAN_JEKT_VERIFICATION_2026_09_24.md§2.2, step D1). - widget_
storage - A widget package’s own key-value store, the
storagepermission (docs/specs/SPEC_USER_WIDGETS_AND_WIDGET_API_2026_10_09.md §6.3): per package, not per pane, values as JSON text. The limits are the caller’s (backend/widget/access.rs); this module only counts bytes. - work_
board - The Kanban side of the task queue (docs/specs/SPEC_WARDEN_KANBAN_2026_10_20.md).
- work_
board_ stages - The stages of a Kanban board: the named, coloured columns the person sets (docs/specs/SPEC_KANBAN_CUSTOM_STAGES_2026_11_16.md §4, §5).
- work_
boards - Several Kanban boards per person (docs/specs/SPEC_SHARED_KANBAN_ACROSS_MACHINES_2026_11_01.md §9).
- work_
card_ prs - A card’s pull requests: every one of them, in every repository, each with its state
(the Kanban and GitHub spec, §3). The card’s own
pr_urlstays as the newest open one; this list is what the board derives its “merged” and “open work” from. - work_
claims - Work claims: an agent saying “I’m working on this” about a path, branch
or topic, so others see it in
WhoIsWorkingOnand in overlap notes (docs/specs/SPEC_AGENT_OVERLAP_AWARENESS_2026_10_10.md §3.4). - work_
deps - Tasks that start after others (docs/specs/SPEC_WARDEN_KANBAN_2026_10_20.md §6.15): “#14 starts after #12”. A task waiting on a task that isn’t finished stays in the Backlog: no claim takes it, no reminder or “next” names it. Done or cancelled finishes a task for this; a failed one still holds its followers, since the operator decides what happens to it.
- work_
media - The files a Kanban task carries (docs/specs/SPEC_KANBAN_TASK_MEDIA_2026_10_25.md): screenshots and recordings an agent attached to show the operator what a UI change looks like.
- work_
pr_ match - Which card a pull request belongs to, and the list of those that belong to none (the Kanban and GitHub spec, §4).
- work_
prs - What GitHub said about a task’s PR, for the board’s last two columns
(docs/specs/SPEC_KANBAN_STAGES_COLOURS_AND_NARROW_VIEW_2026_10_23.md §4):
Merged when its PR merged, Released once a release of its
repository contains that merge. srv’s PR watcher writes it
(
backend/kanban/prs.rs); nothing else does. - work_
queue - Muxqueue — the universal agent work queue.
- work_
rollup - The board’s token roll-up (
docs/specs/SPEC_TOKEN_ANALYSIS_PER_KANBAN_TASK_2026_11_22.mdsection 5.3): what a board’s tasks spent in a range, as counts. A median and a 90th percentile (a mean hides the heavy few) for the tasks whose pull request merged, the same by task kind, the stages that took the most, the cache hit rate, and the tasks that ended without merging listed apart, so they are never taken for a cost per merged pull request. - work_
schema - The Kanban’s schema: one version and ordered steps, in the identity store.
- work_
spend - The token ledger of a Kanban task (
docs/specs/SPEC_TOKEN_ANALYSIS_PER_KANBAN_TASK_2026_11_22.mdsection 4.2): counters per(task, stage, agent, host, provider, model, cause, basis), added to when a call is counted, so the tally depends on no transcript and no history that is trimmed later. Counts only: no money column, no text. - work_
tokens - A task’s token tally in detail, and how it reads to an agent (
docs/specs/SPEC_TOKEN_ANALYSIS_PER_KANBAN_TASK_2026_11_22.mdsection 4.9): the one lineTasks getshows (about 40 tokens), and the detailTasks tokensreturns on request, never added to the answers an agent gets anyway. Counts only: nothing here can show a prompt, a message or a value. - work_
waste - What of a Kanban task’s spend looks like waste, as counts (
docs/specs/SPEC_TOKEN_ANALYSIS_PER_KANBAN_TASK_2026_11_22.mdsection 4.6), beside the token ledger (work_spend.rs). Nothing here holds a text, a path or a value: