Immutable, host-governed registry for compiled and runtime Skills.
Mount, replacement and disable are explicit authority-checked operations with revision compare-and-swap. Routing is fail-closed, prompt capacity reserves the kernel window first, and continuations remain pinned to the exact content-addressed Skill generation that created them.
Summary
Functions
Returns the stable host capability required for one lifecycle action.
Pins a caller-owned continuation to the current exact Skill generation.
Resolves the exact active or retired Definition pinned by a continuation.
Disables a mount immediately or drains its owned continuations.
Mounts one compiled or runtime Definition after all gates pass.
Returns a deterministic summary of all current mounts.
Creates an empty Skill runtime under an effective Authority Envelope.
Creates a Skill runtime or raises with its stable validation reason.
Releases one continuation and completes any exhausted drain.
Atomically replaces a mount and drains its pinned generation if needed.
Builds a reply or registered Operation Request without executing it.
Returns the active route selected across mounted Skills.
Returns a stable lifecycle projection for one mount.
Types
@type entry() :: %{ mount_id: term(), definition: Spectre.Skill.Definition.t(), state: lifecycle(), mounted_revision: non_neg_integer(), routing_projection: Spectre.Projection.t() }
@type lifecycle() :: :active | :draining | :disabled
@type t() :: %Spectre.Skill.Runtime{ agent: module(), authority: Spectre.Authority.Envelope.t(), continuations: %{optional(String.t()) => continuation()}, index_profile: Spectre.Router.IndexProfile.t(), kernel_prompt_tokens: non_neg_integer(), max_prompt_tokens: pos_integer(), mounts: %{optional(term()) => entry()}, per_skill_prompt_cap: pos_integer(), retired: %{optional({term(), String.t()}) => entry()}, revision: non_neg_integer() }
Functions
@spec capability(:mount | :replace | :disable) :: String.t()
Returns the stable host capability required for one lifecycle action.
Pins a caller-owned continuation to the current exact Skill generation.
@spec continuation(t(), String.t()) :: {:ok, Spectre.Skill.Definition.t()} | {:error, term()}
Resolves the exact active or retired Definition pinned by a continuation.
Disables a mount immediately or drains its owned continuations.
Mounts one compiled or runtime Definition after all gates pass.
Returns a deterministic summary of all current mounts.
@spec new(module(), Spectre.Authority.Envelope.t() | map() | keyword(), keyword()) :: {:ok, t()} | {:error, term()}
Creates an empty Skill runtime under an effective Authority Envelope.
Creates a Skill runtime or raises with its stable validation reason.
Releases one continuation and completes any exhausted drain.
Atomically replaces a mount and drains its pinned generation if needed.
@spec respond(t(), term(), map(), keyword()) :: {:ok, Spectre.Skill.Runtime.Response.t(), t()} | {:error, term()}
Builds a reply or registered Operation Request without executing it.
Returns the active route selected across mounted Skills.
Returns a stable lifecycle projection for one mount.