Expand description
Runtime Module - Workflow execution
Contains the runtime execution components:
runner: DAG execution with tokio concurrencyexecutor: Individual task execution (infer, exec, fetch, invoke, agent)- Includes decompose: modifier expansion
output: Output format handling and schema validationstructured_output: 5-layer defense system for ~99.99% JSON compliance- Layer 0: DynamicSubmitTool injection (executor/verbs.rs + rig_agent_loop)
- Layers 2-4: Extract+Validate, Retry, LLM Repair (StructuredOutputEngine)
submit_tool: DynamicSubmitTool for provider-native structured output (Layer 0)rig_agent_loop: Rig-based agentic executionspawn: Nested agent spawningchat_workflow: Chat-as-DAG wrapperbuiltin: Builtin nika:* toolshitl: Human-In-The-Loop handler traitcontext_loader: Context file loading at workflow startresolver: Agent and skill resolutionboot: Boot sequence with 6-phase initializationpolicy: Security policy enforcement for exec/fetch/tokenssecurity: Command validation and blocklistartifact_processor: Task output file persistencelimit_tracker: Agent execution limits trackingpartial: Partial completion checkpointing
This module represents the “how” - runtime execution.
For static structure, see the ast module.
Re-exports§
pub use builtin::AssertTool;pub use builtin::BuiltinTool;pub use builtin::BuiltinToolRouter;pub use builtin::EmitTool;pub use builtin::LogLevel;pub use builtin::LogTool;pub use builtin::NikaBuiltinToolAdapter;pub use builtin::PromptParams;pub use builtin::PromptResponse;pub use builtin::PromptTool;pub use builtin::RunParams;pub use builtin::RunResponse;pub use builtin::RunTool;pub use chat_workflow::ChatMessage;pub use chat_workflow::ChatWorkflow;pub use chat_workflow::Role;pub use context::WorkflowMeta;pub use context_loader::load_context;pub use context_loader::LoadedContext;pub use hitl::DefaultHitlHandler;pub use hitl::HitlError;pub use hitl::HitlHandler;pub use hitl::HitlRequest;pub use hitl::HitlResponse;pub use output::make_task_result;pub use resolver::resolve_assets;pub use resolver::AgentSource;pub use resolver::ResolvedAgent;pub use resolver::ResolvedAgents;pub use resolver::ResolvedAssets;pub use resolver::ResolvedSkills;pub use spawn::SpawnAgentParams;pub use spawn::SpawnAgentTool;pub use boot::BootContext;pub use boot::BootPhase;pub use boot::BootSequence;pub use boot::BootstrapConfig;pub use boot::EditorConfig;pub use boot::PhaseResult;pub use boot::PolicyConfig;pub use boot::ProviderConfig;pub use boot::SessionConfig;pub use boot::ToolsConfig;pub use boot::TraceConfig;pub use policy::PolicyDecision;pub use policy::PolicyEnforcer;pub use policy::TokenBudget;pub use security::check_blocklist;pub use security::check_shell_mode_blocklist;pub use security::validate_command_string;pub use security::validate_exec_command;pub use security::validate_exec_command_with_shell;pub use artifact_processor::process_task_artifacts;pub use artifact_processor::ArtifactProcessResult;pub use structured_output::validate_structured_output;pub use structured_output::InferCallback;pub use structured_output::StructuredOutputEngine;pub use structured_output::StructuredOutputResult;pub use limit_tracker::LimitTracker;pub use submit_tool::DynamicSubmitTool;pub use partial::PartialCheckpoint;pub use partial::PartialResult;pub use partial::StopReason;
Modules§
- artifact_
processor - Artifact Processor - Write task outputs to disk
- boot
- Boot Sequence - 7-phase startup with progress reporting
- builtin
- Builtin Tools Module - nika:* tools for HITL, workflow composition, file operations, and completion
- chat_
workflow - ChatWorkflow - DAG wrapper for chat conversations
- context
- WorkflowMeta — read-only workflow metadata for execution.
- context_
loader - Context Loader - Load files at workflow start
- hitl
- Human-In-The-Loop (HITL) Handler for interactive workflows
- limit_
tracker - LimitTracker - Runtime limit tracking for agent execution
- output
- Output Handling - task result processing
- partial
- Partial completion support for agent execution
- policy
- Policy Enforcer - Security policy enforcement
- resolver
- Agent and Skill Resolver
- security
- Security Module - Command validation and blocklist
- spawn
- Spawn Agent Tool (MVP 8 Phase 2)
- structured_
output - Structured Output Engine
- submit_
tool - DynamicSubmitTool — Provider-native structured output via tool injection
Structs§
- RigAgent
Loop - Rig-based agentic execution loop
- RigAgent
Loop Result - Result of running the rig-based agent loop
- Runner
- DAG workflow runner with event sourcing
- Skill
Injector - Thread-safe skill content cache
- Task
Executor - Task executor with cached providers, shared HTTP client, and event logging
Enums§
- RigAgent
Status - Status of the rig-based agent execution