API Reference ASM v#0.10.0

Copy Markdown View Source

Modules

ASM

Public facade for the ASM session runtime.

Phase 6 adapter selection policy declaration for ASM provider resolution.

Content block variants shared across messages.

Plain text content emitted by a model response.

Provider thinking content, optionally signed when supported.

Tool response payload linked to a prior tool call.

Structured request to invoke a named tool with JSON input.

Control-layer payload variants.

Tool approval prompt emitted when the provider requires operator input.

Approval decision sent back to resume or block a tool call.

Incremental token and cost accounting update.

Signal that a policy/guardrail rule was triggered.

Provider-native control event preserved in normalized form.

Run lifecycle checkpoint emitted by the runtime.

Cost helpers for token usage projection and accumulation.

Lightweight model pricing lookup table for provider cost estimation.

Allowlist filter for the config/runtime.exs environment snapshot.

Canonical runtime error type for ASM.

Run-scoped envelope around normalized core runtime events.

Normalized execution-mode, execution-surface, and execution-environment configuration with precedence-aware merging.

Normalized runtime environment and policy context for ASM execution.

Boundary root for optional extension domains.

Public persistence extension API.

Store adapter contract for persistence extension implementations.

Durable append-only event store backed by a local file.

Non-blocking pipeline plug that forwards events to an async persistence writer.

Async writer process that persists events outside the run process path.

Public policy extension API.

Sync-only policy pipeline plug.

Normalized policy-violation descriptor with explicit action semantics.

Boundary root reserved for provider add-on extension domains.

Public discovery API for optional provider-native extension namespaces.

Discovery metadata and strict derivation helpers for the optional Amp-native ASM extension namespace.

Discovery metadata and bridge helpers for the optional Claude-native ASM extension namespace.

Discovery metadata and bridge helpers for the optional Codex-native ASM extension namespace.

Discovery metadata and strict derivation helpers for the optional Cursor-native ASM extension namespace.

Metadata contract for an optional provider-native ASM extension namespace.

Public PubSub extension API.

Behaviour for PubSub adapter implementations.

Local in-node PubSub adapter built on Registry duplicate keys.

Phoenix PubSub adapter.

Async broadcaster process that publishes %ASM.Event{} outside run-critical paths.

Canonical payload contract for PubSub broadcast events.

Non-blocking pipeline plug that forwards events to an async PubSub broadcaster.

Canonical topic strategy for PubSub event fanout.

Public rendering extension API.

Behaviour for rendering %ASM.Event{} values into display iodata.

Compact token renderer for %ASM.Event{} streams.

Verbose line-by-line renderer for %ASM.Event{} streams.

Behaviour for sink destinations that receive rendered iodata and events.

Sink that forwards events and rendered iodata to a callback function.

Sink that writes rendered output to a file with ANSI escape codes stripped.

Sink that writes events as newline-delimited JSON.

Sink that writes rendered output to an IO device (default: :stdio).

Public routing extension API.

Provider health state machine with temporary exclusion windows.

Extension-owned routing process for provider selection and failover.

Selection strategy contract for routing provider candidates.

Stable priority strategy that always picks the lowest priority value.

Deterministic round-robin strategy.

Deterministic weighted round-robin strategy.

Public workspace extension API.

Behavior contract for workspace snapshot backends.

Workspace diff result between two snapshots.

Git-backed workspace snapshots, diffs, and rollback.

Filesystem hash backend used when git snapshots are unavailable.

Immutable workspace snapshot descriptor.

Replay and rebuild helpers on top of ASM.Store.

Provider-neutral host dynamic tool contracts.

Host dynamic tool invocation request.

Host dynamic tool invocation response.

Host dynamic tool declaration.

Publishes CLI-backed ASM providers as endpoint-shaped inference targets.

Shared backend manifest contract for the ASM CLI inference endpoint facade.

Shared compatibility result contract for ASM endpoint publication.

Shared consumer manifest contract for the ASM inference endpoint facade.

Shared endpoint publication contract for CLI-backed ASM inference routes.

Supervised runtime override owner for inference endpoint tests and examples.

Conversation-layer payload variants.

Assistant-authored message composed of one or more content blocks.

Structured error message emitted by the provider/runtime.

Incremental text or thinking delta emitted during streaming.

Provider-native message event preserved in normalized form.

Terminal metadata describing why a run completed.

System-level initialization payloads.

Provider thinking payload emitted as a top-level message.

Result returned to the model for a previously requested tool call.

Request from the model to execute a tool.

User-authored message composed of one or more content blocks.

Compatibility helpers for migrating main SessionManager input/event shapes to the rebuild ASM runtime.

Shared runtime options validation and normalization.

Amp provider-specific option schema.

Antigravity CLI provider-specific option schema.

Claude provider-specific option schema.

Codex exec provider-specific option schema.

Cursor Agent CLI provider-specific option schema.

Returned when a partial/discovery feature is used as if it were common.

Returned when an API receives conflicting positional and option providers.

Returned when provider-native behavior is passed through the generic ASM path.

Shell provider-specific option schema.

Returned when preflight cannot normalize an execution surface.

Returned when a strict ASM common preflight receives an unsupported option.

Structured compatibility warning returned by ASM.Options.preflight/3.

Normalizes permission modes into a common runtime model.

Synchronous event pipeline with optional event injection.

Pipeline plug that emits :cost_update control events from result usage.

Behaviour for synchronous run-event pipeline plugs.

Pipeline plug that enforces lightweight policy checks on events.

Provider definition data used by the backend registry.

Provider-specific values used by examples and setup guidance.

Session admission defaults for a provider.

Runtime contract for provider backends.

Backend that runs the shared CLI runtime from cli_subprocess_core.

ASM-owned event delivery envelope emitted by provider backends.

ASM-owned backend metadata contract consumed by the orchestration kernel.

Backend that runs provider SDK runtime kits when available locally.

Stable cause category for explicit SDK-lane requests that cannot run.

Public provider feature manifests for ASM.

Resolves providers to backend lanes and runtime metadata.

ASM view of configured CLI core provider runtime profiles.

Remote RPC entrypoint for starting backend sessions.

Remote node capability and compatibility handshake helpers.

Remote node connection and preflight checks.

Final run projection returned by ASM.query/3.

Pure state helper for approval ownership indexing.

Deterministic reducer from run-scoped events to result projections.

Per-run worker that owns backend lifecycle and event fanout.

Run process state with reducer-owned projection fields.

Dynamic supervisor for per-run workers.

ASM-local runtime-auth context for standalone provider execution.

Codex-specific governed materialization guard owned by ASM.

Per-run connector binding evidence consumed by ASM run metadata.

Concrete standalone connector identity selected for a provider call.

Runtime invocation context owned by ASM standalone execution.

Ref-only ASM handoff packet for governed session transfer.

Redacted provider account evidence, distinct from connector identity.

Schema-backed parser for ASM runtime event envelopes before projection into %ASM.Event{}.

ASM-owned schema validation for provider option maps and provider profile limits.

Schema-backed parser for remote node execution configuration owned by ASM.

Session checkpoint helpers for capture and restore seams.

Session aggregate root for run admission, approval routing, and cost totals.

Aggregate state owned by ASM.Session.Server.

Per-session supervision subtree.

Root dynamic supervisor for session subtrees.

Provider-native session control helpers for historical resume and interrupt-then-intervene flows.

Standardized provider-native resumable session entry.

Persistence contract for event storage and replay.

In-memory event store with idempotent append by event id.

Stream helpers for run event consumption and final result projection.

Telemetry helpers for standard ASM runtime lifecycle signals.

Test helpers for quickly creating sessions and provider fixtures.

Builders for normalized runtime structs used in tests.

Behaviour for run-time tool handlers.

Synchronous tool execution adapter used by ASM.Run.Server.

Optional MCP tool bridge placeholder.