Skip to main content

Crate starweaver_runtime

Crate starweaver_runtime 

Source
Expand description

Agent-loop graph and runtime executor primitives.

Re-exports§

pub use agent::Agent;
pub use agent::AgentEndStrategy;
pub use agent::AgentError;
pub use agent::AgentInput;
pub use agent::AgentOverride;
pub use agent::AgentResult;
pub use agent::AgentRuntimePolicy;
pub use agent::AgentToolExecutionMode;
pub use capability::AgentCapability;
pub use capability::CapabilityBundle;
pub use capability::CapabilityError;
pub use capability::CapabilityId;
pub use capability::CapabilityOrderError;
pub use capability::CapabilityOrdering;
pub use capability::CapabilityResult;
pub use capability::CapabilitySpec;
pub use capability::RUNTIME_CONTEXT_CAPABILITY_ID;
pub use capability::RetryEventKind;
pub use capability::StaticCapabilityBundle;
pub use capability::resolve_capability_order;
pub use direct::DirectModelRequest;
pub use direct::model_request;
pub use direct::model_request_stream;
pub use direct::tool_call;
pub use executor::AgentCheckpoint;
pub use executor::AgentExecutionDecision;
pub use executor::AgentExecutionNode;
pub use executor::AgentExecutor;
pub use executor::AgentExecutorError;
pub use executor::AgentResumeCursor;
pub use executor::AgentResumeEvidence;
pub use executor::DirectAgentExecutor;
pub use executor::DynAgentExecutor;
pub use goal::GOAL_CAPABILITY_ID;
pub use goal::GOAL_COMPLETE_EVENT_KIND;
pub use goal::GOAL_COMPLETE_MARKER;
pub use goal::GOAL_ITERATION_EVENT_KIND;
pub use goal::GoalCapability;
pub use goal::GoalCompleteReason;
pub use goal::GoalRunOptions;
pub use goal::build_goal_check_prompt;
pub use goal::build_post_restore_goal_audit_prompt;
pub use goal::has_completion_marker;
pub use graph::AgentGraphStep;
pub use graph::AgentGraphTrace;
pub use graph::AgentNode;
pub use graph::GraphDecision;
pub use graph::GraphError;
pub use graph::inspect_graph;
pub use graph::inspect_next_node;
pub use graph::next_node;
pub use instructions::DynDynamicInstruction;
pub use instructions::DynamicInstruction;
pub use instructions::DynamicInstructionError;
pub use instructions::DynamicInstructionResult;
pub use instructions::FunctionDynamicInstruction;
pub use iteration::AgentIterResult;
pub use iteration::AgentIterationKind;
pub use iteration::AgentIterationStep;
pub use iteration::AgentIterationTrace;
pub use output::DynOutputFunction;
pub use output::FunctionOutputFunction;
pub use output::FunctionOutputValidator;
pub use output::OutputFunction;
pub use output::OutputFunctionContext;
pub use output::OutputFunctionDefinition;
pub use output::OutputMedia;
pub use output::OutputPolicy;
pub use output::OutputSchema;
pub use output::OutputValidationError;
pub use output::OutputValidationResult;
pub use output::OutputValidator;
pub use output::OutputValue;
pub use output::SchemaOutputFunction;
pub use output::parse_output;
pub use retry_recovery::DEFAULT_MODEL_ERROR_RESUME_PROMPT;
pub use retry_recovery::RetryRecoveryResult;
pub use retry_recovery::heal_context_overflow_history;
pub use retry_recovery::heal_openai_item_reference_history;
pub use retry_recovery::recover_retry_message_history;
pub use run::AgentRunResult;
pub use run::AgentRunState;
pub use run::RunStatus;
pub use stream::AgentSidebandEvent;
pub use stream::AgentSidebandEventCategory;
pub use stream::AgentStreamEvent;
pub use stream::AgentStreamRecord;
pub use stream::AgentStreamResult;
pub use stream::AgentStreamSink;
pub use stream::AgentStreamSource;
pub use stream::AgentStreamSourceKind;
pub use trace::AdapterTraceRecorder;
pub use trace::DynTraceRecorder;
pub use trace::InMemoryTraceRecorder;
pub use trace::NoopTraceRecorder;
pub use trace::OtelGenAiSpan;
pub use trace::PolicyTraceRecorder;
pub use trace::RecordedSpan;
pub use trace::SpanEvent;
pub use trace::SpanHandle;
pub use trace::SpanKind;
pub use trace::SpanSpec;
pub use trace::SpanStatus;
pub use trace::TraceDebugPolicy;
pub use trace::TraceLevel;
pub use trace::TraceRecorder;
pub use trace::TraceRecorderHandle;
pub use trace::TraceRedactionPolicy;
pub use trace::export_otel_gen_ai_spans;

Modules§

agent
Bare agent runtime.
capability
Capability hooks and bundles for the bare agent runtime.
direct
Direct model and tool execution helpers.
executor
Durable execution checkpoints for agent runs.
goal
Runtime goal-mode output validator capability.
graph
Deterministic agent-loop graph transitions.
instructions
Dynamic instructions for agent runs.
iteration
Run iteration inspection records derived from typed stream events.
output
Structured output schemas and validators for agent runs.
retry_recovery
Error-aware retry recovery for model request retries.
run
Runtime run state and result types.
stream
Typed agent stream event foundations.
trace
Runtime trace recording contract and deterministic in-memory recorder.

Structs§

PartDelta
Part delta event.
PartEnd
Part end event.
PartStart
Part start event.

Enums§

ModelResponseStreamEvent
Stream event emitted by model adapters.