On this page

Crystallizer๏ƒ

Use md.Crystallizer from the public package namespace.

Implementation source

class Crystallizer(*args: object, **kwargs: object)[source]๏ƒ

Public facade and singleton ownership root for crystallizer behavior.

Purpose:

Present one stable public surface over the crystallizer's three V3 subsystems while keeping their implementation objects private:

  • PersistenceSystem: the in-process record and checkpoint ledger.

  • AssetManagementSystem: cache, formation files, and external mesh.

  • CrystalLoaderSystem: admission planning and runtime unfolding.

The package-level crystal classes remain value carriers, and crystal_analysis remains a shared service; neither becomes another root owned by callers.

Usage:

Importing melder constructs the hosting Aether, so subsequent Crystallizer() calls return its hosted facade. Create and activate a configuration, activate this root, then use facade verbs for profiles, checkpoints, formations, impact analysis, or restore. Treat the three owned subsystem classes as implementation boundaries; construct and operate them only through this facade.

Contract:

  • Process-wide singleton privately hosted by Aether.

  • Construction starts unconfigured and inactive unless an explicit configuration is supplied; activation remains a separate act.

  • Public record, asset, analysis, and load operations require an activated root and reject use after cleanup.

  • Callers exchange names, ids, detached dictionaries, and crystal carriers through this facade. Persistence profiles, load plans, engines, and asset managers do not escape as public state.

  • Recording is passive: runtime owners push twins into emit(); this root does not discover or walk the live world.

  • Crystallizer-off worlds preserve runtime behavior because inactive emission paths do not record.

Threading:

The class lock protects singleton publication. The instance lock serializes lifecycle and facade state transitions; owned subsystems apply their own narrower locking contracts.

Lifecycle / Cleanup:

Aether owns the singleton. Cleanup is terminal and orders borrowers before the record: loader, assets, persistence, then configuration. Singleton bookkeeping is reset only after child teardown completes.

Registration:

MELDER KERNEL - guarded, access=public. A process-wide singleton privately hosted by Aether; the user configures, activates, and drives it through its facade verbs but never registers it with bind() - the guard refuses that.

Subsystem Context:

The public facade and ownership ROOT of the crystallizer. It presents one stable surface over the three V3 subsystems it privately owns - PersistenceSystem (the in-process record + checkpoint ledger), AssetManagementSystem (cache, formation files, external mesh), and CrystalLoaderSystem (admission planning + runtime unfolding) - while the crystal-twin value carriers and the crystal_analysis service stay callable seams beneath it. Callers exchange names, ids, detached dicts, and crystal carriers here; the subsystem objects never escape as public state.

System Context:

Crystallization is the DGR's serialize-then-restore capability, and this root is where the design's key discipline lives: recording is PASSIVE - runtime owners push twins into emit(), the root never discovers or walks the live world - so an active crystallizer observes the world being built rather than snapshotting it, and a crystallizer-off world runs identically because inactive emit paths simply do nothing. Owning the three subsystems privately behind one facade (with a strict teardown order loader -> assets -> persistence -> configuration) is what keeps persistence a cohesive capability the rest of Melder uses through verbs, not a set of engines callers must wire together.

AGENT_ACCESS: public

AGENT_PURPOSE:

access: public. The persistence facade. Configure and activate it, then use the profile and checkpoint verbs (create_checkpoint, load_checkpoint, describe_profile, list_checkpoint_ids) plus analyze_impact(...). Every emit verb is a NO-OP while inactive.

cleanup() None[source]๏ƒ

Tear down the crystallizer root and release singleton publication.

Contract:

  • Idempotent and terminal; public methods reject later use.

  • Cleans the loader and asset borrowers before the persistence record they reference, preserving the V3 edge and lock laws.

  • Cleans the installed configuration after all three subsystems.

  • Resets class-level singleton state only after instance teardown.

Returns:

None.

Threading:

Serialized by the instance lock. Singleton publication is reset under the class lock after owned state has been released.

Lifecycle / Cleanup:

Called by the hosting Aether during root teardown. This method does not deactivate and preserve state; use deactivate() for that reversible lifecycle transition.

property id: str๏ƒ

Return the stable crystallizer root id.

Contract:

  • Identifies the singleton instance, assigned once at first successful initialization and stable for the process.

Threading:

Unsynchronized read; a snapshot only.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the object has been cleaned.

Returns:

Stable root id.

Return type:

str

property configured: bool๏ƒ

Return whether a configuration is installed.

Contract:

  • Reports that a configuration has been INSTALLED, not that recording is happening - that is activated.

Threading:

Unsynchronized read; a snapshot only.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the object has been cleaned.

Returns:

True when crystallizer has an installed configuration.

Return type:

bool

property is_configured: bool๏ƒ

Alias for the configured-state flag.

Contract:

  • ALIAS for the configured property, kept for call-site readability. Identical behaviour and identical guard.

Threading:

Unsynchronized read; a snapshot only.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the object has been cleaned.

Returns:

True when a configuration is installed.

Return type:

bool

property activated: bool๏ƒ

Return whether the crystallizer root is active.

Contract:

  • Reports that the crystallizer is LIVE and recording. Every emission seam in the codebase checks this before emitting, which is why a missing record never implies a failed operation.

Threading:

Unsynchronized read; a snapshot only.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the object has been cleaned.

Returns:

True when configuration is installed and activated.

Return type:

bool

property is_activated: bool๏ƒ

Alias for the activated-state flag.

Contract:

  • ALIAS for the activated property, kept for call-site readability. Identical behaviour and identical guard.

Threading:

Unsynchronized read; a snapshot only.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the object has been cleaned.

Returns:

True when the crystallizer root is active.

Return type:

bool

property configuration: CrystallizerConfiguration | None๏ƒ

Return the installed configuration, if any.

Contract:

  • Returns the INSTALLED configuration by reference, not a copy. None means nothing has been installed yet.

Threading:

Unsynchronized read; a snapshot only.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the object has been cleaned.

Returns:

Installed configuration.

Return type:

Optional[CrystallizerConfiguration]

create_configuration() CrystallizerConfiguration[source]๏ƒ

Create a fresh crystallizer configuration object.

Contract:

  • FACTORY ONLY: returns a FRESH, unattached CrystallizerConfiguration and does NOT install it. Note that activating that configuration marks only the policy object ready - installing it here is a separate step.

Threading:

Unsynchronized read; a snapshot only.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the object has been cleaned.

Returns:

New mutable config object.

Return type:

CrystallizerConfiguration

create_configuration_builder() CrystallizerConfigurationBuilder[source]๏ƒ

Create a fresh fluent builder for crystallizer configuration assembly.

Purpose:

Close the last hole in the configuration ladder. Aether and MutationResearch both expose this factory and CrystallizerConfigurationBuilder has always existed and been exported from the package root - the crystallizer just never published a door to it, so callers had to import the builder class themselves while the other two roots handed it over.

Contract:

  • FACTORY ONLY. Returns a fresh builder wrapping a new configuration and does NOT install anything here.

  • The builder's exits are one-shot and they are NOT the same rung: build() yields a MUTABLE configuration, finalize() a frozen one, activate() an activated one. Installing whichever you get is still a separate configure() / activate() call on this root - a built configuration is not a live crystallizer.

Threading:

Unsynchronized read of a plain flag; a snapshot only.

Lifecycle / Cleanup:

Guarded by check_cleaned(). The returned builder is the caller's to own; this root does not retain or clean it.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

Returns:

New builder instance.

Return type:

CrystallizerConfigurationBuilder

configure(configuration: CrystallizerConfiguration) None[source]๏ƒ

Install one configuration on the crystallizer root.

Contract:

  • INSTALLS ONLY - it does not validate, freeze or activate, and it accepts a configuration that is still mutable. Passing an unactivated one succeeds here and fails later at activate().

  • Type-checked: a non-CrystallizerConfiguration raises TypeError.

  • Replaces any previously installed configuration outright.

Parameters:

configuration -- Configuration object to install.

Returns:

None.

Raises:
  • TypeError -- If the supplied object is not a crystallizer configuration.

  • RuntimeError -- If crystallizer is already active.

activate(configuration: CrystallizerConfiguration | None = None) None[source]๏ƒ

Activate the crystallizer root using one activated configuration.

Contract:

  • ORDERING RULE: THE CONFIGURATION MUST BE ACTIVATED FIRST. Activating with a merely-frozen configuration raises, so configuration.activate() precedes this call.

  • Passing a configuration is a convenience that configures first; omitting it uses whatever is installed.

  • Two distinct failure modes: "not configured" and "configuration not activated".

  • This is the switch every emission seam in the codebase checks, which is why a missing record never implies a failed operation upstream.

Parameters:

configuration -- Optional configuration to install before activation.

Returns:

None.

Raises:

RuntimeError -- If no configuration is installed or the configuration has not itself been activated.

deactivate() None[source]๏ƒ

Deactivate the crystallizer root without dropping configuration.

Contract:

Stops activated-only facade operations and future recording while preserving the installed configuration and all subsystem state. Existing profiles, checkpoints, cache files, and formation files are not deleted.

Returns:

None.

Threading:

Serialized by the instance lock.

Lifecycle / Cleanup:

Reversible through activate(). This is not teardown and does not clean any owned object.

get_spell_crystal(spell_id: str) SpellCrystal[source]๏ƒ

Return the recorded custody crystal for one spell (active profile).

Purpose:

The runtime custody lookup: loaders (seed/unseed) and MutationResearch fetch a spell's crystal through this facade - the persistence model stays in the depths. Fetch fresh per use; the record cleans displaced crystals on re-emission, so long-lived references go stale by design.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • Returns the SEALED crystal for one spell id, which is a point-in-time record and not a live view of the spell.

Parameters:

spell_id -- The spell's SHA256 identity.

Returns:

The currently recorded crystal for the spell.

Return type:

SpellCrystal

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If the active profile records no crystal for spell_id.

describe_mutation_research_record() dict[str, object] | None[source]๏ƒ

Return the recorded MutationResearch twin payload (active profile).

Purpose:

The MR hydration read facade: at activation the MR root pulls the recorded composition to rebuild its research registry from the record. Detached dict only - the persistence model stays in the depths.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • Describes the recorded mutation-research state, not the live singleton - the two can disagree if recording was off for part of the run.

Returns:

The recorded twin's describe() payload (carrying configuration_payload and composition_payload), or None when the active profile has never recorded the MR twin.

Return type:

Optional[Dict[str, object]]

Raises:

RuntimeError -- If crystallizer is cleaned or not yet active.

analyze_impact(module_name: str | None = None, spell_id: str | None = None) dict[str, object][source]๏ƒ

Answer blast-radius questions over the recorded custody surface.

Purpose:

The S3 impact facade: "which spells does this module reach?", "what does changing this spell touch?", or - with no arguments - the full source-drift report ("what will my uncommitted edits break?"). Read-only over the record; the live runtime is never inspected.

Contract:

  • module_name -> that module's transitive blast radius.

  • spell_id -> the spell's root-module radius (+ identity).

  • Both None -> the engine's full describe (custody counts + drift statuses + radii for every drifted/absent module).

  • Supplying BOTH refuses (one question per call).

  • Unknown modules/spells answer honestly with "unknown_*" markers, never a raise.

Parameters:
  • module_name -- Optional canonical module name at the blast center.

  • spell_id -- Optional spell SHA256 custody identity.

Returns:

The detached impact view.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • ValueError -- If both module_name and spell_id are supplied.

capture_index_graft(index_id: str) dict[str, object][source]๏ƒ

Capture one spell_index's graft record from the active profile.

Purpose:

The graft lane's capture half (owner ruling: the graft unit is the INDEX - all members, custody, selection). The record is a versioned, JSON-safe dict; store it wherever you like (mesh handlers, formations, plain files) and hand it to graft_index against any live conjured book.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • CAPTURES a graft for one index without applying it anywhere; capture and application are deliberately separate steps.

Parameters:

index_id -- The recorded index identity.

Returns:

The versioned graft record.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If no index twin is recorded under index_id.

graft_index(graft_record: dict[str, object], host_spellbook: Any, skip_resident: bool = False, merge_into_index: Any | None = None, adopt_recorded_selection: bool = False) dict[str, object][source]๏ƒ

Re-integrate one captured index into a LIVE host book.

Purpose:

The graft lane's restore half: the selected member binds ACTIVE (bind creates the fresh index and selects it), parked members ride bind_inactive onto it - normal verbs only, existing indexes never mutated. Blast-radius due diligence is one call away: analyze_impact BEFORE grafting into a world you care about.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • APPLIES a captured graft through the graft runner, so unlike capture_index_graft this one MUTATES live state.

  • The runner is imported lazily inside the call, following the loader's runtime-surface import law - so an import cost lands on first use rather than at module load.

Parameters:
  • graft_record -- The versioned record from capture_index_graft.

  • host_spellbook -- The live, CONJURED book receiving the graft (live-object facade per the create_spell_crystal precedent).

  • skip_resident -- True skips members already resident in the host frame (shortfall each); False refuses the whole graft on the first resident member (default - the conservative overlap rule).

  • merge_into_index -- MERGE MODE (slice 3, 2026-07-11): a LIVE SpellIndex in the host frame; members park onto IT via the public bind_inactive verb instead of minting a fresh index. Fresh-index-only remains the default.

  • adopt_recorded_selection -- Merge-mode only: notch the record's selected member active on the target after grafting (public notch verb; honest shortfall when the selection did not graft).

Returns:

The runner's detached report ({status, recorded/live index ids, merged_into_existing, selection_adopted, members_bound, members_parked, skipped_resident, shortfalls}).

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned/not active, the host is unconjured, or a resident member is met without skip_resident.

  • ValueError -- If the record is not a spell_index graft, was written by a newer record major, or its selected member cannot anchor.

emit_spell_crystal(crystal: SpellCrystal, active: bool = True) None[source]๏ƒ

Record one custody crystal into the active profile's locations.

Purpose:

The bind-seam emission verb: active binds record active; staged (bind_inactive) binds record inactive - mirroring the spellbook's own active/parked split.

Contract:

  • NO-OP while the crystallizer is not activated.

Parameters:
  • crystal -- The custody crystal to record.

  • active -- Which record location receives it (default active).

Returns:

None.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

emit_spell_removed(spell_id: str) None[source]๏ƒ

Evict one removed spell's custody from the record.

Purpose:

Called by the spellbook's true-removal seam (cleanup_and_remove_spell). Custody leaves both record locations so restore never rebuilds a shed spell. The module world is NOT touched here: the spell's own cleanup path owns its teardown.

Contract:

  • NO-OP while the crystallizer is not activated.

Parameters:

spell_id -- The removed spell's SHA256 identity.

Returns:

None.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

emit_spellbook_removed(spellbook_id: str) None[source]๏ƒ

Evict one dead spellbook's ENTIRE record subtree.

Purpose:

Called by Spellbook._cleanup_components at true book death (root-conduit teardown and direct cleanup both land there). The book twin, its conduit twin(s), and all its spell custody leave the record so restore never rebuilds a dead book's world. Lesser conduits share the root's book and never trigger this.

Contract:

  • NO-OP while the crystallizer is not activated.

Parameters:

spellbook_id -- The dead spellbook's identity.

Returns:

None.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

create_contract_crystal(contract: Contract) ContractCrystal[source]๏ƒ

Build one relationship twin from a live ward Contract.

Purpose:

Project the contract's full truth - both conduit endpoints and both sides' spell Details and lineage subscriptions - into detached plain data. Callers emit the result so replace-on-emit keeps exactly one snapshot per contract.

Contract:

  • Snapshots under the contract's own lock (consistent view of both detail maps).

  • Enum values project as .name strings; sources sets project as sorted lists; index identities are record-local ULIDs.

Parameters:

contract -- The live Contract to snapshot.

Returns:

Detached relationship snapshot.

Return type:

ContractCrystal

Raises:

RuntimeError -- If the crystallizer has been cleaned or is not activated.

emit_cluster_removed(cluster_id: str) None[source]๏ƒ

Evict one deleted cluster's twin from the record.

Contract:

  • NO-OP while the crystallizer is not activated.

Parameters:

cluster_id -- The deleted cluster's record-local ULID key.

Returns:

None.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

emit_contract_removed(contract_id: str) None[source]๏ƒ

Evict one severed contract's relationship twin from the record.

Contract:

  • NO-OP while the crystallizer is not activated.

Parameters:

contract_id -- The severed contract's record-local ULID key.

Returns:

None.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

create_spell_index_crystal(spell_index: SpellIndex, spellbook_id: str) SpellIndexCrystal[source]๏ƒ

Build one membership twin from a live SpellIndex.

Purpose:

Snapshot the index's grouping truth (owner edge, selection, full member set) for the record; callers emit the result so replace-on-emit keeps exactly one snapshot per index.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • Builds a crystal from a live SpellIndex and a spellbook id. It CONSTRUCTS the record only; it does not seal, store or emit it.

Parameters:
  • spell_index -- The live index to snapshot.

  • spellbook_id -- The owning spellbook's identity.

Returns:

Detached membership snapshot.

Return type:

SpellIndexCrystal

Raises:

RuntimeError -- If the crystallizer has been cleaned or is not activated.

emit_spell_index_removed(index_id: str) None[source]๏ƒ

Evict one destroyed index's membership twin from the record.

Contract:

  • NO-OP while the crystallizer is not activated.

Parameters:

index_id -- The destroyed index's record-local ULID key.

Returns:

None.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

emit_frame_removed(frame_name: str) None[source]๏ƒ

Evict one dead frame's twin (+ leftover book subtrees).

Purpose:

Called by AethericFrame.cleanup after its teardown cascade: the frame genuinely leaves the live world (Aether detaches it), so its twin leaves the record. Books normally evicted themselves during the cascade; the profile's by-frame net covers the rest.

Contract:

  • NO-OP while the crystallizer is not activated.

Parameters:

frame_name -- The dead frame's canonical name.

Returns:

None.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

emit_nexus_state(state: RecordedUnitState) None[source]๏ƒ

Record a Nexus lifecycle flip (enabled / disabled / cleaned).

Purpose:

Nexus disable keeps its installed configuration, so the twin is RETAINED and this switch carries the truth (owner model: state-switch, not eviction, for MR/Nexus; Aether/Crystallizer are skipped - the record dies with them).

Contract:

  • NO-OP while the crystallizer is not activated.

Parameters:

state -- The new recorded state.

Returns:

None.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

emit_mutation_research_state(state: RecordedUnitState) None[source]๏ƒ

Record a MutationResearch lifecycle flip (enabled/disabled/cleaned).

Contract:

  • NO-OP while the crystallizer is not activated.

  • Twin retained; the switch is the recorded truth (see emit_nexus_state).

Parameters:

state -- The new recorded state.

Returns:

None.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

emit_spell_activity(spell_id: str, active: bool) None[source]๏ƒ

Mirror one runtime park/promote flip into the record and, when configured, into the live module world.

Purpose:

Called by the spellbook's park/promote seams. The record flip is unconditional (crystal moves between active/inactive locations). The module-world reaction is knob-gated:

  • promote (active=True): the spell's synthetic root module is re-published if it is registered (self-healing; a no-op when it never left sys.modules).

  • park (active=False): when remove_inactive_synthmodules is True, the synthetic root module is UNPUBLISHED (depth-2: reversible; registry + custody retained; captured references survive as ghosts per the hot-swap law).

Physical-authority spells never touch the module world here.

Contract:

  • NO-OP while the crystallizer is not activated.

  • Tolerates missing custody (activity for a spell the record never held is journaled without a crystal move).

Parameters:
  • spell_id -- The spell whose activity flipped.

  • active -- True = promoted to active; False = parked inactive.

Returns:

None.

Raises:

RuntimeError -- If the crystallizer has been cleaned.

emit(twin: Cleanable) None[source]๏ƒ

Record one emitted twin into the active persistence profile.

Purpose:

The single sink entry of the EMIT model: structural units push their twins here at configuration lock-in and at the pivotal runtime points; the crystallizer passively records into the ACTIVE profile. The sink never reaches into emitters.

Contract:

  • NO-OP while the crystallizer is not activated: hosts may call unconditionally without behavioral impact on non-recorded worlds (call-sites still pre-gate to avoid building payloads).

  • Twin-type validation is owned by the profile record path.

Parameters:

twin -- One twin from the persistence crystal family.

Returns:

None.

Raises:
  • RuntimeError -- If the crystallizer has been cleaned.

  • TypeError -- If the twin type is unsupported (raised by the profile).

create_spell_crystal(spell: Spell, spellbook_id: str | None = None) SpellCrystal[source]๏ƒ

Build one SpellCrystal using the installed crystallizer policy.

Purpose:

Capture one live spell's bind identity and module-world analysis into the carrier used by persistence and restore.

Contract:

SpellCrystal invokes a single-use CrystalAnalyzer, retains only its value-only CrystalAnalysisResult, and never owns the analyzer or strategy machinery. User-source text is retained only when the installed policy enables it; bind-time fingerprints are recorded independently of that opt-in.

Parameters:
  • spell -- Live spell whose module world should be crystallized.

  • spellbook_id -- Optional owning-spellbook identity recorded on the crystal as its parent edge inside a persistence profile.

Returns:

Loader-facing manifest for the given spell.

Return type:

SpellCrystal

Raises:

RuntimeError -- If crystallizer is not yet active.

property active_profile_name: str๏ƒ

Return the name of the persistence profile emissions currently target.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • Names the profile every unqualified profile operation resolves to.

Returns:

Active profile name ("default" unless switched).

Return type:

str

Raises:

RuntimeError -- If crystallizer is cleaned or not yet active.

create_profile(profile_name: str, activate: bool = True) None[source]๏ƒ

Create one new persistence profile and (by default) switch to it.

Purpose:

Facade over the buried persistence model: users and agents create worlds by name only; PersistenceProfile objects never escape the depths.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • activate decides whether the new profile also becomes ACTIVE; creating without activating leaves the current active profile in place.

Parameters:
  • profile_name -- New profile name; must not collide with an existing profile.

  • activate -- When True (default), the new profile becomes the emission target immediately (owner model: create and default to it).

Returns:

None.

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • ValueError -- If profile_name is empty or already exists.

set_active_profile(profile_name: str) None[source]๏ƒ

Switch the emission target to one existing persistence profile.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • Repoints which profile unqualified operations resolve to. It moves the pointer only - no data is copied or migrated between profiles.

Parameters:

profile_name -- Name of an existing profile to activate.

Returns:

None.

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If no profile exists under profile_name.

describe_profile(profile_name: str | None = None) dict[str, object][source]๏ƒ

Return a detached structural summary of one persistence profile.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • profile_name=None resolves to the ACTIVE profile rather than meaning "all profiles".

  • Read-only description; it neither creates a missing profile nor activates the one it describes.

Parameters:

profile_name -- Profile to describe; None means the active profile.

Returns:

Profile summary (name, per-level twin counts, emission sequence).

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If profile_name names no existing profile.

list_profile_names() list[str][source]๏ƒ

Return the names of all persistence profiles.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • Lists profiles that EXIST, including empty ones and the active one.

Returns:

Sorted, detached profile-name list.

Return type:

List[str]

Raises:

RuntimeError -- If crystallizer is cleaned or not yet active.

clear_profile(profile_name: str) None[source]๏ƒ

Reset one persistence profile's recorded content to empty.

Purpose:

The generalized clear_bootstrap: clearing "default" resets the default bootstrap record.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • EMPTIES a profile but KEEPS IT. This is the non-destructive reset - the profile remains listed and can still be activated afterwards. Use delete_profile to remove it entirely.

Parameters:

profile_name -- Name of an existing profile to clear.

Returns:

None.

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If no profile exists under profile_name.

delete_profile(profile_name: str) None[source]๏ƒ

Delete one NAMED persistence profile ("default" is never deletable).

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • REMOVES the profile entirely, unlike clear_profile which only empties it. After this the name no longer appears in list_profile_names().

Parameters:

profile_name -- Name of the named profile to delete.

Returns:

None.

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • ValueError -- If asked to delete the default profile.

  • KeyError -- If no profile exists under profile_name.

create_checkpoint(profile_name: str | None = None, description: str | None = None) str[source]๏ƒ

Snapshot one persistence profile and return the checkpoint's ULID id.

Contract:

  • Checkpoint ids are ULIDs, while exact chronology comes from the ledger's insertion order (including same-millisecond seals).

  • The crystallizer policy twin is emitted into the window before sealing, so every checkpoint identifies the policy that made it.

  • PersistenceSystem captures the current incremental window as value-only twin custody and advances that profile's journal mark.

  • Sealing updates the in-process ledger only. Use flush_checkpoint() to ship the sealed artifact to local cache and the optional external mesh.

Parameters:
  • profile_name -- Profile to checkpoint; None means the active profile.

  • description -- Optional caller note stored on the checkpoint record.

Returns:

The new checkpoint's ULID id.

Return type:

str

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If profile_name names no existing profile.

describe_checkpoint(checkpoint_id: str) dict[str, object][source]๏ƒ

Return a detached copy of one checkpoint's metadata record.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • Describes one checkpoint by id without replaying or loading it.

Parameters:

checkpoint_id -- ULID identity returned by create_checkpoint.

Returns:

Detached checkpoint record.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If no checkpoint exists under checkpoint_id.

list_checkpoint_ids() list[str][source]๏ƒ

Return all checkpoint ids in exact ledger creation order.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • Lists RECORDED checkpoint ids, which is a different set from list_cached_checkpoint_ids() - recorded does not imply cached to disk.

Returns:

Chronologically sorted, detached checkpoint-id list.

Return type:

List[str]

Raises:

RuntimeError -- If crystallizer is cleaned or not yet active.

describe_record() dict[str, object][source]๏ƒ

Return the whole record's one-shot operational summary (profiles + twin counts + ledger + cache, in one call).

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • Merges a RECORD-side description with an ASSET-side count: the cached_checkpoint_count key is computed from the asset system, so this is the one description that spans both halves.

Returns:

The persistence system's describe() payload, enriched with the asset system's cached checkpoint count (disk truth moved custody in S3; the facade payload stays complete).

Return type:

Dict[str, object]

Raises:

RuntimeError -- If the crystallizer has been cleaned or is not activated.

checkpoint_replay_data(checkpoint_id: str) dict[str, object][source]๏ƒ

Return one checkpoint's detached replay inputs (journal window + captured payloads) - the restore engine's read surface.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • Returns the data needed to replay a checkpoint; it does NOT perform the replay.

Parameters:

checkpoint_id -- ULID identity returned by create_checkpoint.

Returns:

{"journal": [[sequence, kind, key], ...],

"payloads": {kind: {key: payload}}}.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If the crystallizer has been cleaned or is not activated.

  • KeyError -- If no checkpoint exists under checkpoint_id.

flush_checkpoint(checkpoint_id: str | None = None) list[str][source]๏ƒ

Flush sealed checkpoint(s) into the local crystallizer cache.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • SEAL-THEN-SHIP, one verb covering both halves: the asset system pulls feedstock from the record, writes the cache, FIFO-caps it, and then runs the remote upload leg when a manager is attached.

  • THE REMOTE LEG IS LENIENT BY DEFAULT. Under the default posture an upload failure is logged and counted rather than raised, so a successful return does NOT prove the remote received anything - the local seal is what is guaranteed. Set strict_uploads if that must be an error.

  • The FIFO cap means an old cached checkpoint can be evicted as a side effect of this call.

Parameters:

checkpoint_id -- One ledger ULID, or None to flush the whole ledger.

Returns:

The flushed checkpoint ids.

Return type:

List[str]

Raises:
  • RuntimeError -- If the crystallizer has been cleaned or is not activated.

  • KeyError -- If checkpoint_id names no ledger crystal.

reload_cached_checkpoint(checkpoint_id: str) dict[str, object][source]๏ƒ

Reload one cached checkpoint back into the ledger (history recovery; world restore remains load_checkpoint).

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • Reads from the LOCAL CACHE only; it does not consult any remote. A checkpoint that was recorded but never flushed is not reloadable here.

Parameters:

checkpoint_id -- ULID of a previously flushed checkpoint.

Returns:

The (re)loaded checkpoint's describe() summary.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If the crystallizer has been cleaned or is not activated.

  • KeyError -- If no cached item exists for checkpoint_id.

list_cached_checkpoint_ids() list[str][source]๏ƒ

Return every checkpoint id present in the local cache.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • Lists what is ON DISK, which is a subset of list_checkpoint_ids() - anything never flushed, or evicted by the FIFO cap, is absent.

Returns:

Sorted cached checkpoint ids.

Return type:

List[str]

Raises:

RuntimeError -- If the crystallizer has been cleaned or is not activated.

verify_checkpoint_chain(profile_name: str | None = None) dict[str, object][source]๏ƒ

Report one profile's checkpoint-chain fold-safety (read-only).

Purpose:

Answer BEFORE a restore whether the retained chain is safe to fold: "intact", "truncated_prefix" (head history dropped), or "broken" (number/window damage with evidence rows).

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • RECORD SIDE: delegates to the persistence system, which owns the ledger.

  • profile_name=None resolves to the ACTIVE profile rather than meaning "all profiles".

  • Verifies chain integrity and REPORTS; it does not repair anything.

Parameters:

profile_name -- Profile to audit; None means the active profile.

Returns:

The detached chain-integrity report.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If profile_name names no existing profile.

reload_profile_from_cache(profile_name: str) dict[str, object][source]๏ƒ

Reload EVERY cached checkpoint of one profile into the ledger.

Purpose:

Facade over PersistenceSystem.reload_profile_from_cache: a profile's cache folder IS its portable form - copy the folder, reload it here, then load_checkpoint unfolds the chain.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • Local cache only - the external counterpart is reload_profile_from_external.

Parameters:

profile_name -- Profile whose cached checkpoints should reload.

Returns:

{"profile_name", "inserted", "skipped_existing"}.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If the profile has no cached checkpoints.

save_formation(formation_name: str, conduit_id: str | None = None, frame_name: str | None = None, profile_name: str | None = None, description: str = '') str[source]๏ƒ

Capture and store one user-named formation.

Purpose:

Facade over PersistenceSystem.save_formation: keep a conduit formation you like (its spellbook rides along) or a whole frame subtree, under your own name, durable in the cache.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • SPANS BOTH HALVES: the record side captures and assembles the formation record, then the asset side persists it to a file. A failure can therefore leave a captured record with no file.

Parameters:
  • formation_name -- The user's filesystem-safe name.

  • conduit_id -- Conduit-scope anchor (exactly one scope required).

  • frame_name -- Frame-scope anchor.

  • profile_name -- Profile to capture from; None means the active profile.

  • description -- Optional user note.

Returns:

Absolute path of the stored formation file.

Return type:

str

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • ValueError/KeyError -- Per the system verb's contract.

restore_formation(formation_name: str, profile_name: str | None = None, target_frame_name: str | None = None, skip_existing: bool = False) dict[str, object][source]๏ƒ

Rebuild one stored formation directly (scoped restore).

Purpose:

Facade over PersistenceSystem.restore_formation: reload JUST the formation - not the world - with the engine's normal all-or-nothing and shortfall semantics. S1 load-scope maturity: formations COMPOSE into live worlds - optionally retargeted onto another frame, optionally skipping host name collisions instead of refusing on them.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • THREE-STAGE: the asset side loads the stored record, the loader mints a SCOPED PLAN, and a gated engine runs it. The ledger deliberately no longer replays anything itself.

  • Restoration is PLANNED AND GATED rather than a blind replay, so it can legitimately refuse or partially apply - read the result rather than assuming a full restore.

Parameters:
  • formation_name -- The stored formation's name.

  • profile_name -- Profile whose formation store is read; None = active.

  • target_frame_name -- Optional frame the formation should compose into instead of its recorded frame (the rewrite happens in the detached window; the stored record is never mutated).

  • skip_existing -- When True, host name-collision blockers downgrade to "skipped_existing" in the admission view and the engine runs its skip lanes (a taken conduit name builds unnamed with a shortfall; an existing cluster is reused and recorded members join it).

Returns:

The detached restore report (+ "admission"

view carrying the additive "host" findings key).

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active, admission refused the load (host-collision or preflight blockers), or the replay failed (torn down; cause chained).

  • KeyError -- If the formation does not exist.

  • ValueError -- If a retarget hits a multi-frame window or an invalid target name.

list_formations(profile_name: str | None = None) list[str][source]๏ƒ

Return the targeted profile's stored formation names.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • profile_name=None resolves to the ACTIVE profile rather than meaning "all profiles".

Parameters:

profile_name -- Profile to list; None means the active profile.

Returns:

Sorted formation names.

Return type:

List[str]

Raises:

RuntimeError -- If crystallizer is cleaned or not yet active.

analyze_formation(formation_name: str, profile_name: str | None = None) dict[str, object][source]๏ƒ

Pre-flight one stored formation's bootload viability.

Purpose:

Run the complete default PersistenceAnalyzer strategy set over the stored formation before the user trusts a restore. The set covers topology, hydration, configuration, frame/cluster posture, synthetic and retained-source integrity, mutation-research composition, and live source drift.

Contract:

Analysis is read-only over the stored payload bundle. It does not execute admission, claim the LoadGate, or replay any runtime unit.

Parameters:
  • formation_name -- The stored formation's name.

  • profile_name -- Profile whose formation store is read; None = active.

Returns:

{"findings", "counts", "verdict"} analyzer report.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If the formation does not exist.

analyze_checkpoint(checkpoint_id: str) dict[str, object][source]๏ƒ

Pre-flight one sealed checkpoint's bootload viability.

Purpose:

Run the complete default PersistenceAnalyzer strategy set over this checkpoint's captured window.

Contract:

This method analyzes the named checkpoint window only; it does not fold the target's complete profile chain and does not replay any runtime unit. load_checkpoint() owns chain detachment, folded preflight, blocker refusal, and execution.

Parameters:

checkpoint_id -- One ledger checkpoint's ULID.

Returns:

{"findings", "counts", "verdict"} analyzer report.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active.

  • KeyError -- If no checkpoint exists under the id.

configure_external_persistence_manager(manager_configuration: ExternalPersistenceManagerConfiguration) None[source]๏ƒ

Attach an external transport at the configuration step.

Purpose:

Attach optional durability beyond the built-in local cache. An integration may register generic mesh callables or use a provider such as SqliteMeshAdapter; this verb builds the asset-owned manager while credentials, connection policy, and remote-store operation remain application responsibilities.

Guidance:

Prefer the generic store/fetch/list/delete handlers for new code because they carry checkpoints, formations, grafts, and emission events. The legacy upload/download/list trio remains supported for checkpoint-only integrations.

Contract:

  • Freezes the configuration if the caller has not (load it in, freeze it - the reload-lane law).

  • Re-configuring replaces the previous manager (the old one cleans); attach BEFORE relying on upload-on-flush.

Parameters:

manager_configuration -- The handler-bearing configuration (ownership transfers to the built manager).

Returns:

None.

Raises:
  • RuntimeError -- If the crystallizer has been cleaned.

  • TypeError/ValueError -- Propagated from the manager's construction contract.

describe_external_persistence_manager() dict[str, object][source]๏ƒ

Return the attached manager's record-safe presence description.

Contract:

  • DOES NOT REQUIRE ACTIVATION - one of the few crystallizer surfaces that only checks the cleaned state. You can inspect whether a remote is attached before the crystallizer is live.

  • Describes ATTACHMENT AND POSTURE, not remote health; it performs no network call.

Returns:

Presence flags + knobs + failure diagnostics; an {"attached": False} stub when no manager is configured.

Return type:

Dict[str, object]

Raises:

RuntimeError -- If the crystallizer has been cleaned.

reload_profile_from_external(profile_name: str) dict[str, object][source]๏ƒ

Download and insert EVERY remote checkpoint of one profile.

Purpose:

The remote import lane: the manager downloads the profile's stored cached items (list + per-id download through the user's callables) and the persistence system inserts them insert-if-absent - then load_checkpoint unfolds as usual.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • Reads from the REMOTE, so it requires an attached manager with a working download or fetch lane; a missing lane means unavailable, not empty.

Parameters:

profile_name -- Profile whose remote history should reload.

Returns:

{"profile_name", "inserted", "skipped_existing"}.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If cleaned, not yet active, no manager is attached, or download/list handlers are missing.

  • ValueError -- If the remote lists an id it cannot return.

reload_formations_from_external(profile_name: str | None = None) dict[str, object][source]๏ƒ

Download and store EVERY remote formation of one profile.

Purpose:

The formation half of the remote import lane (external_mesh 2026-07-12): the manager lists + fetches through the user's generic callables, the local formation store inserts-if- absent, and restore_formation reads them as usual afterwards.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • profile_name=None resolves to the ACTIVE profile rather than meaning "all profiles".

  • Pulls formations from the remote rather than the local cache.

Parameters:

profile_name -- Profile whose remote formations reload; None = active.

Returns:

{"profile_name", "inserted", "skipped_existing"}.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If cleaned, not yet active, no manager is attached, or the generic fetch/list lanes are missing.

  • ValueError -- If the remote lists a formation it cannot return.

apply_external_retention(profile_name: str | None = None, max_checkpoints: int | None = None) list[str][source]๏ƒ

Trim the remote checkpoint history to one retention cap.

Purpose:

Melder-driven remote retention (owner ruling 2026-07-12, opt-in via the delete handler): mirrors the local FIFO - the newest max_checkpoints survive, everything older deletes through the user's callable.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • profile_name=None resolves to the ACTIVE profile rather than meaning "all profiles".

  • APPLIES A RETENTION POLICY REMOTELY, which can DELETE remote artifacts. This is a destructive maintenance operation, not a query.

Parameters:
  • profile_name -- Profile to trim; None = active.

  • max_checkpoints -- Survivor cap; None = the crystallizer configuration's max_persistence_crystals (the same knob the local FIFO honors).

Returns:

The deleted checkpoint ids, oldest first.

Return type:

List[str]

Raises:
  • RuntimeError -- If cleaned, not yet active, no manager is attached, or the list-units/delete lanes are missing.

  • ValueError -- If the resolved cap is not a positive int.

delete_cached_checkpoint(checkpoint_id: str) str[source]๏ƒ

Evict one checkpoint cached-item from the local cache by id.

Purpose:

Facade of the asset system's single-item delete (asset CRUD completion, 2026-07-11): the FIFO cap trims by age; this removes one specific cached snapshot.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • Deletes the LOCAL cached copy only. The recorded checkpoint and any remote copy are untouched, so this narrows disk use without losing the record.

Parameters:

checkpoint_id -- ULID identity of a previously flushed checkpoint.

Returns:

The deleted file's path.

Return type:

str

Raises:
  • RuntimeError -- If cleaned or not yet active.

  • KeyError -- If no cached item exists for checkpoint_id.

delete_formation(formation_name: str, profile_name: str | None = None, include_remote: bool = False) dict[str, object][source]๏ƒ

Delete one stored formation locally and, optionally, remotely.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • profile_name=None resolves to the ACTIVE profile rather than meaning "all profiles".

  • Deletes the stored formation file; the operation is destructive and not undone by a later save under the same name.

Parameters:
  • formation_name -- The user-chosen formation name to delete.

  • profile_name -- Owning profile; None = the active profile.

  • include_remote -- When True, also delete the remote copy (STRICT leg via the user's delete handler).

Returns:

{"deleted_local_path", "remote_deleted"}.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If cleaned, not active, or include_remote is set without a manager/delete lane.

  • KeyError -- If the local formation file does not exist.

store_index_graft_external(graft_record: dict[str, object], profile_name: str | None = None) str[source]๏ƒ

Ship one captured spell-index graft through the generic mesh.

Purpose:

First-class graft lane (asset CRUD completion): the record ships under kind "index_graft" keyed by its own index_id, so capture -> store -> fetch -> graft_index round-trips without the user naming a kind.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • profile_name=None resolves to the ACTIVE profile rather than meaning "all profiles".

  • Pushes a captured graft to the remote. Subject to the same lenient-upload posture as other remote writes unless strict_uploads is set.

Parameters:
  • graft_record -- The dict from capture_index_graft(...), unmodified.

  • profile_name -- Recording profile; None = the active profile.

Returns:

The unit id the record shipped under (its index_id).

Return type:

str

Raises:
  • RuntimeError -- If cleaned, not active, or no store lane.

  • ValueError -- If the record carries no "index_id".

fetch_index_graft_external(index_id: str) dict[str, object][source]๏ƒ

Fetch one graft record back from the user's store, version-gated.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • Fetches one graft from the remote by index id; it does not apply it. Application is graft_index.

Parameters:

index_id -- The captured index id the graft shipped under.

Returns:

The graft record, ready for graft_index.

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If cleaned, not active, or no fetch lane.

  • ValueError -- If the record's version MAJOR is newer than this melder reads (the reader-gate law).

  • KeyError -- If the remote store has no such graft.

list_index_grafts_external(profile_name: str | None = None) list[str][source]๏ƒ

List one profile's stored graft ids through the generic lane.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • profile_name=None resolves to the ACTIVE profile rather than meaning "all profiles".

  • Lists what the REMOTE holds, which need not match anything captured locally.

Parameters:

profile_name -- Profile to list; None = the active profile.

Returns:

Unit ids (captured index ids) the store reports.

Return type:

List[str]

Raises:

RuntimeError -- If cleaned, not active, or no list lane.

describe_external_interface() dict[str, object][source]๏ƒ

Emit the mesh interface contract joined with live presence.

Purpose:

The owner's "emit the table and the shape" verb: the static kind/shape/signature table (MeshInterfaceContract) plus this world's live handler presence, so users build storage and register callables from the emitted contract alone.

Contract:

  • REQUIRES AN ACTIVATED CRYSTALLIZER: it calls the activation guard before doing anything, so a configured-but-not-activated crystallizer raises rather than silently no-opping. Recording is opt-in and this is where that shows up.

  • ASSET SIDE: delegates to the asset system, which owns cache files and any attached remote.

  • Describes the SHAPE of the external interface - which lanes are attached - rather than performing any remote call, so it is safe to call when the remote is unreachable.

Returns:

The stamped contract dict plus "live_manager" (the attached manager's presence flags, or None when nothing is attached).

Return type:

Dict[str, object]

Raises:

RuntimeError -- If cleaned or not yet active.

load_checkpoint(checkpoint_id: str) dict[str, object][source]๏ƒ

Unfold one checkpoint's world into the live runtime (boot verb).

Purpose:

Public seat of the restore engine: folds the target's profile chain and replays it through the public runtime verbs in canon order (all-or-nothing; shortfalls reported, never silently under-built).

Contract:

The owned loader builds a world-scoped LoadPlan, claims Aether's load authority for the replay span, refuses blocker verdicts before activation, and always releases authority. Successful payloads include the additive, detached admission view alongside the restore report.

Parameters:

checkpoint_id -- ULID identity of the checkpoint to load.

Returns:

The detached RestoreReport payload (status, built counts, shortfall entries, identity translation map).

Return type:

Dict[str, object]

Raises:
  • RuntimeError -- If crystallizer is cleaned or not yet active, or a replay stage failed (after teardown; original error chained).

  • KeyError -- If no checkpoint exists under checkpoint_id.

Topic reference ยท Full contents