Skip to main content

Module alias_refs

Module alias_refs 

Expand description

Alias reference discovery for typed delete-with-cascade

Structs§

CascadeReport
Outcome of a (non-refused) delete_with_cascade.
ImpactReport
Dry-run plan for deleting an aliased entry: which references block the delete, which would be scrubbed, and whether the delete is allowed.
OwnedArtifact
RefSite
One concrete config site that references the target alias. path is the resolved dotted path (e.g. agents.researcher.channels[2]), built with the same format! templates Config::validate() emits so dashboard inline-error binding keeps working.
RenameReport
Outcome of a successful rename_with_cascade.

Enums§

AliasKind
CascadeError
Why a delete_with_cascade did not complete. Refused is an expected, renderable outcome (a hard reference blocks the delete), not a bug.
CascadePolicy
How a delete handles references and whether it mutates.
CreateError
Why a create_map_key_checked did not create the key.
ProviderCategory
Which typed provider section the alias lives in. Selects which referrer fields can point at it (model refs vs TTS vs transcription).
RefStrength
HARD = mandatory referrer; deleting the target invalidates config, so the delete must refuse. SOFT = removable; the delete scrubs the referrer.
RenameError
Why a rename_with_cascade did not complete. Unlike CascadeError there is no Refused variant: rename rewrites HARD references to follow the new name rather than refusing, so the only failures are bad inputs and the post-condition bug-guard.
ScrubAction
How a soft reference would be repaired on delete (applied in PR2+). Hard references carry ScrubAction::Refuse.

Functions§

alias_kind_for_map_path
create_map_key_checked
delete_with_cascade
dirty_entry_for
Truncate a RefSite dotted path to the entry/section path that an incremental save (apply_dirty_path) re-serialises wholesale, so a nested change (a dropped vec element or a removed/renamed map key) persists with the whole entry rather than needing a leaf-precise dirty path.
find_all_references
Enumerate every config site that references alias of kind. Pure / read-only; mirrors Config::validate() referrer-for-referrer.
find_bundle_refs
Enumerate every agent that references skill bundle alias (TRIM-matched, as Config::validate() does). All refs are SOFT (droppable from the list).
is_reserved_agent_alias
plan_delete
Build the dry-run ImpactReport for deleting alias of kind. Pure / read-only; owned-state is gathered separately by the surface cascade.
rename_with_cascade
rewrite_bundle_refs
Mutating mirror for rename: rewrite every agent’s skill_bundles entry naming old to name new. Returns the touched agents.<name> dirty paths.
scrub_bundle_refs
Mutating mirror of find_bundle_refs for delete: drop alias from every agent’s skill_bundles list. Returns the touched agents.<name> dirty paths.