Skip to main content

Crate nika_engine

Crate nika_engine 

Source
Expand description

Nika Engine — Embeddable workflow execution engine

§Module Architecture

┌──────────────────────────────────────────────────────────────┐
│                        DOMAIN MODEL                          │
│  ast/       YAML → Rust types (Workflow, Task, TaskAction)   │
└──────────────────────────────────────────────────────────────┘
                             │
                             ▼
┌──────────────────────────────────────────────────────────────┐
│                      APPLICATION LAYER                       │
│  runtime/   DAG execution (Runner, TaskExecutor)             │
│  dag/       DAG structure (Dag, validate)                    │
│  binding/   Data binding (WithSpec, ResolvedBindings)        │
└──────────────────────────────────────────────────────────────┘
                             │
                             ▼
┌──────────────────────────────────────────────────────────────┐
│                    INFRASTRUCTURE LAYER                      │
│  store/     State management (RunContext, TaskResult)         │
│  event/     Event sourcing (EventLog, EventKind)             │
│  provider/  LLM abstraction (rig-core wrapper)               │
└──────────────────────────────────────────────────────────────┘

Re-exports§

pub use error::NikaError;
pub use ast::AgentParams;
pub use ast::ExecParams;
pub use ast::FetchParams;
pub use ast::InferParams;
pub use ast::InvokeParams;
pub use ast::Task;
pub use ast::TaskAction;
pub use ast::Workflow;
pub use runtime::Runner;
pub use runtime::TaskExecutor;
pub use dag::validate_bindings;
pub use dag::Dag;
pub use dag::StableDag;
pub use binding::validate_task_id;
pub use binding::ResolvedBindings;
pub use store::RunContext;
pub use store::TaskResult;
pub use serde_saphyr as serde_yaml;
pub use nika_init as init;

Modules§

ast
AST Module - Abstract Syntax Tree for YAML workflows
binding
Binding Module - Data binding between tasks.
config
Nika Configuration Module
core
Core types for Nika — zero-dependency provider, model, and MCP definitions.
dag
DAG Module - Directed Acyclic Graph structure
display
CLI display — header, event stream, summary renderers.
error
Nika Error Types with Error Codes
error_domains
Domain-specific error types for ARCH-3 incremental migration.
event
Event Module — re-exports from nika-event crate.
io
I/O utilities for Nika
mcp
MCP Integration Module — re-exports from nika-mcp crate.
media
Media pipeline — re-exports from nika-media crate.
new
nika new - Workflow scaffolding module
provider
Provider abstraction layer
registry
SuperNovae Package Registry
runtime
Runtime Module - Workflow execution
secrets
Secrets management – env vars + optional keyring.
source
Source span tracking — re-exported from nika-core.
store
Store Module - state management
tools
File Tools Module - Claude Code-like filesystem operations
util
Utilities Module - shared infrastructure

Structs§

BindingEntry
Unified with entry - supports both string and extended object syntax
ByteOffset
A byte offset in a source file.
Event
Single event in the workflow execution log
EventLog
FileId
Unique identifier for a source file in the SourceRegistry.
McpClient
MCP Client for connecting to and interacting with MCP servers.
McpConfig
MCP server configuration.
SourceFile
A single source file with its content and path.
SourceRegistry
Registry of all source files in a compilation unit.
Span
A span in a source file (byte range + file ID).
Spanned
A value with an associated span.

Enums§

EventKind
All possible event types (3 levels)

Functions§

list_traces
List all trace files
prune_traces
Prune old trace files, enforcing both max_traces and retention_days.

Type Aliases§

BindingSpec
Binding spec - map of alias to entry (YAML with: block)