Expand description
Armory Bundle Format (ABF) exporter — Phase 1 of
docs/specs/REPORT_ARMORY_BUNDLE_STANDARD_RESEARCH_2026_07_16.md /
https://docs.agentmux.ai/abf/. Serializes a db_bundles row (the
Bundle struct — table/UI say “Bundles”, the type name predates the
rename) plus its referenced skills into the ABF on-disk layout:
<bundle-slug>/
├── bundle.json
├── instructions/
│ ├── AGENTS.md
│ └── context/…
└── skills/
└── <skill-slug>/
└── SKILL.mdPure functions only — no I/O, no Store access. Callers (the bundle.export
RPC handler) own fetching the Bundle row and resolving its skills
id-array into Skill rows before calling export_bundle.
No mcp/ or accounts/. A bundle carries no MCP servers; they belong
to Connectors (SPEC_BUNDLE_CONTENTS_MEMORY_NOT_MCP_2026_10_07.md §3.1).
accounts/requirements.json was inferred from those servers’ env keys,
so it went with them, as did the redaction of secrets out of their configs.
An importer still reads both from older archives.
Structs§
- Bundle
Export - Result of exporting one bundle: every file to write, plus bookkeeping about anything that couldn’t be represented in ABF and was left out (surfaced to the caller/UI rather than silently dropped).
- Bundle
Export File - One file within an exported bundle, path relative to the bundle root
(e.g.
"bundle.json","instructions/AGENTS.md"). - Context
File 🔒Entry
Functions§
- export_
bundle - Export a bundle + its already-resolved components into the ABF layout.
- parse_
json_ 🔒field_ or_ warn - Parse a
db_bundlesJSON column (context_files,instructions_by_provider), treating a blank/whitespace-only value as “genuinely no data” (not an error) but pushing a warning towarningsfor anything non-blank that fails to parse, rather than silently discarding it viaunwrap_or_default()— an export that quietly loses data defeats its own backup/portability purpose (#2333). - sanitize_
context_ 🔒relative_ path - Validate a relative path is safe to place under a bundle export/import
root: non-empty, not absolute, no drive letter, no
..traversal component. Pure string validation (no filesystem access) soexport_bundlecan stay a pure function. ReturnsNonefor anything that fails; callers skip that entry. - zip_
bundle_ export - Pack an export’s files into a zip archive in memory. First
ZipWriterusage in this workspace —tool_store.rsonly ever reads zips. No filesystem access: writes into an in-memory buffer, so this stays as side-effect-free as the exporter itself (the RPC handler decides what to do with the resulting bytes).