Skip to main content

bundle_import

Function bundle_import 

Source
pub(super) fn bundle_import(
    state: &AppState,
    req: BundleImportReq,
) -> Result<BundleImportResponse, String>
Expand description

bundle.import — ABF importer, Phase 2 of docs/specs/SPEC_ABF_V0_1_SINGLE_FILE_AND_IMPORTER_2026_08_01.md. Window- scoped like bundle.export (bundles aren’t agent-specific). Accepts EITHER zip_base64 (a .abf archive, mirroring bundle.export’s own zip_base64 response field) OR files (a raw [{path, content}] list) — exactly one must be present. Hands the bytes to the pure bundle_import module for parsing/validation, then owns every Store side-effect: creates the bundle row, creates one global Skill row per parsed skill, and performs READ-ONLY account-requirement lookups (never creates an account, never writes a secret anywhere — see the spec’s §4.5 correction for why this stopped short of “resolving” placeholders in place).