API Reference Spectre v#0.3.0

Copy Markdown View Source

Modules

OTP-native conversational runtime for Elixir agents.

Provider-neutral description of one action.

Port implemented by optional action-planning libraries.

Contract and safe invocation facade for action providers.

Built-in provider for ordinary Elixir action modules.

Trusted binding between a provider identifier and its implementation module.

Planner-facing description of an action exposed by a provider.

Resolves provider-neutral action configuration from an Agent definition.

Capability boundary for invoking one provider-neutral action effect.

Compatibility facade for the canonical Spectre.Execution workflow.

Runs before_action guards right before an action capability is invoked.

Runs lifecycle hooks for executed actions.

Provider-neutral facade over an optional action planner.

Matches action effects against agent protect declarations.

Declarative DSL for building Spectre agents.

Stable logical identity of a Spectre Agent.

Effective, portable authority granted to one canonical Definition.

Runtime state waiting for user input.

Portable, deterministic value codec used by content-addressed Spectre data.

Runtime for Spectre's lightweight local vector classifier.

Behaviour for classifier embedding adapters.

Default classifier embedding adapter backed by ExFastembed.

Configurable embedding boundary for Spectre classifier artifacts.

Small vector math helpers used by classifier and embedding strategies.

Builds a lightweight vector classifier artifact for Spectre routing.

Per-turn runtime context.

Compiled behavioral description shared by Agents and Skills.

Immutable Candidate admitted by the activation boundary.

Content-addressed identity of a bootstrap Definition Candidate.

Portable, immutable envelope for declared Spectre behavior.

One typed component in a canonical Definition envelope.

Trusted registry of component contracts understood by this runtime.

Sealed Manifest V2 for one canonical Definition.

Content-addressed identity of one canonical Spectre Definition.

Verified resolution of published canonical Definitions.

Immutable persistence boundary for canonical Definitions and Manifest V2.

Adapter-neutral Definition Store conformance checks.

Volatile in-memory reference implementation of Spectre.Definition.Store.

Compile-time validation for Agent definitions and mounted Skills.

Runtime or host work represented as data.

Safe capability port for extension-owned, non-action effects.

Immutable registration of one executor for a non-action effect kind.

Resolves extension-contributed executors for non-action effect kinds.

Route-only routing regression evaluation.

One version-controlled routing expectation.

Aggregate routing quality and LLM-use metrics for an evaluation corpus.

Result of comparing one routing receipt with its evaluation expectations.

Portable event envelope whose owner is fixed at Instance admission time.

Host-owned compatibility gate for global Event payload schemas.

Pure-lifecycle execution workflow for action and extension-owned effects.

Portable execution dependencies sealed into a Definition Manifest.

Closed expression language used by data-driven execution programs.

Typed Flow/Work exchange carried as portable data.

Exact, verified boundary between Skill routing and data-driven execution.

Resolves a runtime Skill Work route into an exact execution materialization.

Prepare/commit protocol for registered, pure Work state migrations.

Integrity receipt for one committed registered state migration.

Immutable, data-only program for a precise Work.

Deterministic replay of a data-driven Work from recorded operation results.

Privacy-safe receipt for a data-driven execution rehearsal.

Admission boundary for a verified data-driven execution materialization.

Compile-time DSL for declarative data-driven Work programs.

Opt-in boundary for recording and querying redacted operational evidence.

Immutable, redacted and non-canonical operational evidence.

Content-addressed identity of redacted Experience evidence.

Mechanical redaction boundary for opt-in Experience evidence.

Opt-in persistence boundary for redacted Experience evidence.

Volatile reference implementation of Spectre.Experience.Store.

Compile-time contract for on-demand Spectre libraries.

Compile-time registration of one optional Spectre extension.

Authenticated external principal presented by a channel boundary.

Namespaced constraint contributed to a compiled flow by an extension.

Data-only proposal plane for governed Definition changes.

Compiled adapter contract for model-backed Forge critique, including Prism.

Immutable result of one compiled Forge critic adapter.

Independent host approval binding one proposed evaluation case to an oracle.

Content-addressed Forge output wrapping an inert governance ChangeSet.

Executable compatibility gate for Spectre's durable foundations.

Content-addressed evidence emitted by one trusted governance checker.

Content-addressed identity of a governance gate receipt.

Separate host approval commit for a reviewed Candidate.

Host-owned approval policy keyed by Candidate risk.

Immutable governance state attached to a Definition Candidate.

Immutable, non-executable proposal to derive a Definition from an observed Instance Activation.

Trusted implementation boundary for registered ChangeSet operations.

One inert operation in a governed Definition ChangeSet.

Host-owned registry mapping inert ChangeSet operation types to reviewed code.

Model-free replay and regression checker for closed declarative Skill replies.

Executes normalized evaluation cases against an exact loaded Definition.

Issues replay and regression receipts for one declarative evaluation delta.

Defines the closed live behavior that the declarative checker can replay.

Provides one stable shape vocabulary for declarative-checker errors.

Trusted host composer for governed Definition Candidates.

Accumulates the typed result of applying governed ChangeSet operations.

Deterministic comparison of parent and Candidate results on the same corpus.

Conservative administered GC planner for immutable governance artifacts.

Trusted host contract for a fenced, complete GC inventory snapshot.

Content-addressed conservative garbage-collection decision.

Host review commit for a composed Candidate.

Generates durable identifiers shared by runtime entities.

Neutral per-invocation cognitive selection and completion boundary.

Hard limits and soft preferences attached to one inference request.

Provider-neutral cognitive capability profile.

One typed, purpose-labelled inference invocation.

Normalized inference response with optional usage and provider metadata.

Frozen model selection for one inference attempt.

Behaviour implemented by inference-selection policies.

Compatibility selector for Agents without a cognitive-routing extension.

Normalized inbound user turn.

Runs input plugs before the Spectre runtime handles a turn.

Initialized input plug declaration.

Behaviour for Spectre input normalization/enrichment stages.

Normalizes input.text before Spectre handles a turn.

Provider-neutral origin attached to a normalized Spectre input.

Subject-scoped OTP owner and fair scheduler for Spectre Runs.

Canonical snapshot binding one Instance to an active Definition.

Durable adapter boundary for the complete canonical Agent checkpoint.

Independent admission, authority, retention and activation axes for a Definition.

Host contract for canonical Instance ownership and monotonic fencing.

Portable lease issued by an Instance ownership adapter.

Single-owner lease adapter paired with Spectre.Instance.Registry.

Logical key for one Agent Instance.

Race-safe local lookup for Agent Instances.

A concrete, revision-fenced request to execute one staged effect.

Correlated internal receipt returned to an Agent Instance mailbox.

Privacy-safe public journal boundary for optional Spectre extensions.

Bounded asynchronous delivery queue for observational journal writes.

Versioned, privacy-aware explanation record for one runtime decision.

Builds, filters, and delivers observational journal records.

Storage boundary for structured Spectre journal records.

Small LLM boundary used by Spectre.Runner.

Pure lifecycle state machine for effects and policy awaitables.

One bounded, explicit attempt to link a destination identity to a Subject.

Failure boundary for host delivery around a Spectre agent.

Host-facing facade for governed, declarative Agent evolution.

Transient pipeline value for one governed Agent change.

Declares the closed proposal surface of a compiled Agent.

Executes the durable governance commits behind the Spectre.Morph facade.

Validates the closed keyword contracts exposed by the Morph facade.

Builds the closed reply-only Skill proposals accepted by Morph.

Normalizes existing stable identifiers without creating runtime atoms.

Canonical, closed declaration of the changes an Agent is willing to review.

Derives mandatory evaluation cases from an immutable Definition diff.

Indexes canonical Skill mounts and derives their parent-to-candidate diff.

Describes one immutable Skill-mount difference between two Agent Definitions.

Applies the immutable Morph proposal ceiling to governance operations.

Portable reference to output produced by an operational loop.

Revision- and epoch-fenced identity for one temporary Runner.

Portable limits and consumption counters for one operational loop.

Portable control plane for pause, update, resume and terminal stop.

Durable, idempotent command for controlling one operational loop.

Behaviour shared by Work, Vigil and library-owned operational controllers.

Versioned definition loaded from a Work, Vigil or external controller.

Authorizes proactive delivery without performing transport I/O.

Revocable, expiring consent for proactive delivery to one destination.

Deterministic consent, deduplication, rate and quiet-hours policy.

Portable audit receipt for one governed delivery decision.

Committed event envelope shared by Work, Vigil and external controllers.

Local subscription boundary for already-committed operational events.

Portable output envelope produced by an operational executor.

Ephemeral context passed to one registered operation executor.

Executes one closed-catalog operation inside a temporary Runner.

Canonical portable state of one operational loop.

Selective post-commit port for Mnemonic or an application memory adapter.

Classifies Runner termination without deciding retry outside the Agent.

Typed terminal outcome of an operational loop.

Deterministic authorization gate for a registered operational capability.

Revision-fenced, rate-limited progress emitted by a temporary Runner.

Stable, portable reference to a Work, Vigil or external controller loop.

Resolves the closed operation catalog visible to one loop step.

One portable request for a registered operation.

Correlated terminal result of exactly one operational attempt.

Portable retry and backoff policy for a registered operation.

Temporary supervised process for one operation and one fenced attempt.

Dynamic supervisor for isolated one-attempt operational Runners.

Pure transition engine for Work, Vigil and external operational controllers.

Definition and declaration validation for the operation runtime.

Control-plane command handling for the operation runtime.

Restart recovery and checkpoint validation for the operation runtime.

Result reduction and completion evaluation for the operation runtime.

Shared vocabulary for the operation runtime modules.

Pure loop-state transition builders for the operation runtime.

Immutable registry entry for one operation available to an operational loop.

One committed update to a loop's effective context.

Safe validation boundary for registered operation input, output and updates.

Privacy-safe, read-only projection of a committed operational loop.

Portable wait boundary retained by an operational loop without a live Runner.

Minimal Plug-style pipeline executor for Spectre router stages.

Initialized router plug declaration.

Policy gate evaluator for pending effects.

Pure matcher for policy accept and reject branches.

Validated policy matcher decision shared by user text and trusted hosts.

Deterministic projection interface for canonical Definitions.

Exact structural projection of a canonical Definition.

Deterministic, privacy-safe view of one data-driven Work materialization.

Mechanical human-review projection for one governed Definition change.

Mechanical self-model projection with separate Declared, Effective and Observed planes.

Deterministic, non-executable routing view of a canonical Definition.

Prompt resolver, renderer, and typed composition boundary.

Resolved or canonical prompt content with its composition metadata.

Closed renderer for canonical prompt fragments.

One typed prompt-composition declaration compiled from inject.

Pure, typed prompt composition plan.

Privacy-safe evidence for one effective governed prompt fragment.

Isolated timeout and crash boundary for external provider calls.

Sanitized infrastructure failure returned by a provider call boundary.

Policy-gated host boundary for inspecting the active canonical Definition.

Compiled, policy-gated operation executor for Reflection.

Host-owned authorization policy for the Reflection operation.

Strips Spectre control tokens from model output before it becomes a user-visible reply.

Output of a handled turn.

Normalized routing decision returned by Spectre.

Routes inbound input to a compiled Spectre rule.

Input passed to a router arbitrator.

Behaviour for final route selection from collected routing evidence.

Default evidence arbitrator for Spectre routers.

A single routing signal produced by a router evidence provider.

Shared data passed through a Spectre router pipeline.

Default router pipeline for Spectre agents.

Versioned identity for a rebuildable routing cache or index.

One-label LLM fallback classifier for Spectre routes.

Adapter boundary for local intent classifiers.

Behaviour for Spectre router pipeline stages.

Turns accumulated routing evidence into a route decision.

Bag-distance evidence provider for short example matching.

Embedding similarity evidence provider.

Jaro-distance evidence provider for typo-tolerant short examples.

Legacy LLM fallback classifier plug.

Local classifier evidence provider.

Deterministic regex evidence provider for the router pipeline.

Exact semantic-cache lookup before classifier fallback.

Semantic-cache search after local classifier evidence.

Applies terminal-route metadata after arbitration.

Privacy-safe summary of one router-only evaluation.

Adapter boundary for semantic cache lookups.

Built-in semantic cache backed by static dataset rows and online examples.

Vettore-backed semantic index and embedding acquisition for the learned cache.

ETS-backed store for online learned semantic-cache examples.

Row and label vocabulary for the built-in learned semantic cache.

Portable snapshot export and import for the learned semantic cache.

Static row sources for the learned semantic cache.

Stable owner for the built-in semantic-cache ETS tables and collection lifecycle operations.

Shared router normalization and logging helpers.

Declarative routing rule compiled from Spectre.Agent DSL.

Serializable continuation for one unit of Spectre work.

Observable boundary emitted while advancing a Spectre.Run.

Serializes a Spectre.Run to and from its portable checkpoint binary.

Opaque, revision-fenced reference to an observable point in a Spectre.Run.

Transport-safe description of a Run policy request.

Portable value codec for run state.

Executes routed handlers without crossing action boundaries accidentally.

Turn-level orchestration for Spectre agents.

State and memory persistence boundaries for Spectre.Runtime.

Dispatches runtime-authored Skills from the Definition pinned to a Run.

Conversation-scoped GenServer for running a Spectre agent under supervision.

Organizational DSL for reusable, scoped Spectre behavior.

Structured, portable applicability contract for one Skill.

Unified view of compiled and runtime Skill Definitions.

Compile-time mount of a reusable Spectre.Skill inside an Agent.

Closed per-Skill prompt budget derived from canonical fragments.

Immutable, host-governed registry for compiled and runtime Skills.

Restores the governed Skill runtime for one exact Agent Definition Ref.

Public result of one declarative runtime Skill response.

Portable, generation-fenced state owned by one stable Skill and Definition.

Compile-time installer and resolver for Spectre packages.

Binds an immutable Stack installation to one Agent definition.

Executable whole-Stack conformance gate for package ecosystems.

Executable version-one conformance contract for Stack packages.

Mandatory runtime Stack contract for reflective Definition Manifests.

Parser helper for package-local Stack declarations.

Compiled, immutable environment installed for an Agent.

Versioned contract implemented by packages that can be installed in a Stack.

Immutable result of compiling one package inside a Stack.

Versioned, immutable manifest published by a Stack-installable package.

Logical reference to one capability or runtime resource in a resolved Stack.

Caller-owned supervisor for resources declared by a resolved Stack.

Portability checks and identity helpers for stack entry values.

Conversation state owned by Spectre.

Strict, versioned serialization for durable Spectre state.

Durable state-adapter contract with optimistic concurrency.

Canonical person or entity identity owned by an Agent Instance.

Authoritative in-memory resolver for Subjects and authenticated identities.

Explicit, auditable association between a Subject and an external identity.

Dynamic supervisor for Spectre Sessions and Agent Instances.

Privacy-safe operational telemetry boundary.

Builds classifier datasets from Spectre agent routing metadata.

Immutable result of one validated lifecycle transition.

High-level host-facing turn result.

Reduces a %Spectre.Result{} into the host's next lifecycle decision.

Drives a %Spectre.Turn{} decision to a delivered outcome.

Optional boundary through which another runtime may own a normal turn before Spectre routes it.

Safe, typed reply returned by a Spectre.Turn.Handler.

Loaded request presented to an optional Spectre.Turn.Handler.

Versioned durable observation loop built on the shared operational runtime.

Versioned definition for a precise, asynchronous operational procedure.

Mix Tasks

Exports classifier training rows from a Spectre agent.

Downloads/loads the embedding model used by Spectre classifier artifacts.

Trains Spectre's local classifier artifact from a JSON dataset.

Evaluates Spectre routing accuracy and LLM usage from a JSONL corpus.