Skip to main content

Module bundles

Module bundles 

Source
Expand description

Bundles — the agent’s personality and capability stack (provider, model, instructions, context files, MCP servers, skills).

Extracted from store.rs in Phase R.3 of the storage modularization plan (docs/specs/SPEC_STORE_MODULARIZATION_2026_05_27.md). The method surface is unchanged — Store::bundle_* still lives on Store via this impl block; callers stay on storage::store::Bundle thanks to the re-export.

Structs§

Bundle
A Bundle — the agent’s personality and capability stack. Provider, model, instructions, and JSON-encoded arrays of context files / MCP servers / skills. Agent definitions shadow-migrate into this table during the v7 migration.
GlobalMemorySection
One section of the Global Memory block: one global bundle with instructions, rendered as the startup file carries it.

Enums§

BundleReseedOutcome
Outcome of Store::bundle_reseed_system_if_owned — see that method’s own doc comment for what each variant means and why the decision is made atomically rather than by the caller.

Constants§

GLOBAL_SECTION_SEPARATOR
The rule between two sections of the Global Memory block.
REMOVE_SOURCE
The source of the version an entry gets when it leaves Global Memory: the content it held and the writer who removed it, so history can show the removal and a revert can bring the entry back.

Functions§

format_global_bundle_block
Format global bundles into the block injected into an agent’s CLAUDE.md. is_system sections (see Bundle::is_system) are split out and rendered FIRST, wrapped in explicit override wording, so they outrank every ordinary # [Workspace] <name> section that follows — see docs/specs/SPEC_GLOBAL_MEMORY_SYSTEM_TIER_2026_08_24.md §3.4. Bundles arrive already ordered by bundle_list_global (is_system DESC, sort_order, name), so this only needs to partition, not re-sort. Sections are separated by a --- rule (GLOBAL_SECTION_SEPARATOR). Returns an empty string when no section has instructions.
global_bundle_sections
The sections of the Global Memory block, system (is_system) first, each in the order bundle_list_global returns them. Bundles with no instructions are skipped.