Skip to main content

Module storage

Module storage 

Source
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_summaries in migrations.rs (OBJECT_SCHEMA_VERSION v27) 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_groups in migrations.rs (OBJECT_SCHEMA_VERSION v24) 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 counting sends), and db_agent_input_drafts, the agent’s unsent draft. Both in the channel store beside db_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_versions in migrations.rs (SHARED_STORE_SCHEMA_VERSION v8 / OBJECT_SCHEMA_VERSION v24 / IDENTITY_STORE_SCHEMA_VERSION v3) 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_keys in 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_instances into the new consolidated db_agents table.
background_container_calls
What a container agent’s agentmux-bashwrap reports 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. See db_background_tasks in migrations.rs (OBJECT_SCHEMA_VERSION v20) 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, like db_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 single bundle_id key instead of that table’s composite (agent_id, filename) (a Bundle’s identity is already a single id). See docs/specs/SPEC_AGENT_FACING_GLOBAL_MEMORY_API_2026_09_15.md Phase 0 — Global Memory (db_bundles) previously had no audit trail at all, only updated_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 of db_agents is 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). 0 is “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_peers mode. See db_conversation_trust_grants in 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’s recent_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 the db_cron_jobs it replaced: the shared store (store.db), which is per channel under isolated auth. db_cron_jobs stays as it was for older builds; m0040_cron_jobs_to_db_jobs copied its rows here, keeping their ids. See also SPEC_CRON_LOOP_ROBUSTNESS_2026_06_25.md.
db_copy
One way to copy a SQLite database file: VACUUM INTO a 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::storage still names this module.
drone_types
Drone + run types. Mirrors the frontend shape so RPC payloads flow through serde_json::to_value without manual mapping. They sit with the storage layer because the job store and job templates use them; crate::drone::types still 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.md Phase 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: on InjectionRequest they are skip_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_installs and db_lan_retired_keys in migrations.rs (OBJECT_SCHEMA_VERSION v45).
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 of lan_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 its SKILL.md, and the records of tests that passed. They live in db_skill_app, db_skill_file and db_skill_verified, in the identity store beside db_skills, and are created on first use without a schema bump (like db_skill_source). A skill written by hand has no db_skill_app row.
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 beside db_skills, created on first use without a schema bump (like db_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 beside db_skills, so they survive an upgrade (like db_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 beside db_skills, and is created on first use without a schema bump (like db_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.md section 3.1). backend::model_gateway::spend keeps 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 Workspace object, which is one window’s contents.
vault
The Vault’s rows in the identity store: db_vault_entries (each entry, its secret parts sealed by backend::vault::seal) and db_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, details and proposals; 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 in backend::vault::sync_links and sync_activity; nothing here holds a value.
vault_versions
A Vault entry’s earlier values: db_vault_versions (schema in vault.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_devices and db_agents.hide_from_devices in migrations.rs (OBJECT_SCHEMA_VERSION v43) and backend::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 storage permission (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_url stays 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 WhoIsWorkingOn and 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.md section 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.md section 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.md section 4.9): the one line Tasks get shows (about 40 tokens), and the detail Tasks tokens returns 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.md section 4.6), beside the token ledger (work_spend.rs). Nothing here holds a text, a path or a value: