1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
//! Nika - DAG workflow runner for AI tasks (v0.1)
//!
//! ## Module Architecture (DDD-Inspired)
//!
//! ```text
//! ┌──────────────────────────────────────────────────────────────┐
//! │ DOMAIN MODEL │
//! │ ast/ YAML → Rust types (Workflow, Task, TaskAction) │
//! └──────────────────────────────────────────────────────────────┘
//! │
//! ▼
//! ┌──────────────────────────────────────────────────────────────┐
//! │ APPLICATION LAYER │
//! │ runtime/ DAG execution (Runner, TaskExecutor) │
//! │ dag/ DAG structure (Dag, validate) │
//! │ binding/ Data binding (WiringSpec, ResolvedBindings) │
//! └──────────────────────────────────────────────────────────────┘
//! │
//! ▼
//! ┌──────────────────────────────────────────────────────────────┐
//! │ INFRASTRUCTURE LAYER │
//! │ store/ State management (DataStore, TaskResult) │
//! │ event/ Event sourcing (EventLog, EventKind) │
//! │ provider/ LLM abstraction (rig-core v0.31 wrapper) │
//! │ util/ Utilities (interner, jsonpath) │
//! └──────────────────────────────────────────────────────────────┘
//! ```
//!
//! ## Module Responsibilities
//!
//! | Module | Responsibility |
//! |--------|----------------|
//! | [`ast`] | YAML parsing → `Workflow`, `Task`, `TaskAction`, `OutputPolicy` |
//! | [`runtime`] | DAG execution with tokio concurrency |
//! | [`dag`] | Dependency graph with FxHashMap optimization |
//! | [`binding`] | Use block system: entry, resolve, template |
//! | [`store`] | Thread-safe task output storage (DashMap) |
//! | [`event`] | Event sourcing for audit trail |
//! | [`provider`] | LLM provider abstraction (rig-core v0.31) |
//! | [`util`] | String interning, JSONPath parser |
//! | [`error`] | Error types with fix suggestions |
// ═══════════════════════════════════════════════════════════════
// YAML PARSING - serde-saphyr (replaces deprecated serde_yaml)
// Migration: 2026-02-27 - serde_yaml v0.9.34 is deprecated
// This alias allows all modules to continue using `serde_yaml::` syntax
// See: docs/plans/2026-02-27-v014-complete-plan.md Section 14.1
// ═══════════════════════════════════════════════════════════════
pub use serde_saphyr as serde_yaml;
// ═══════════════════════════════════════════════════════════════
// v0.19 FOUNDATION - Two-Phase IR Architecture
// Source tracking for precise error locations (line:col)
// See: docs/plans/2026-03-04-v0.19-foundation-implementation.md
// ═══════════════════════════════════════════════════════════════
// ═══════════════════════════════════════════════════════════════
// DOMAIN MODEL - YAML → Rust types
// ═══════════════════════════════════════════════════════════════
// ═══════════════════════════════════════════════════════════════
// APPLICATION LAYER - Execution logic
// ═══════════════════════════════════════════════════════════════
// ═══════════════════════════════════════════════════════════════
// INFRASTRUCTURE LAYER - Storage, events, providers
// ═══════════════════════════════════════════════════════════════
// ═══════════════════════════════════════════════════════════════
// CROSS-CUTTING - Error handling, configuration, secrets
// ═══════════════════════════════════════════════════════════════
// ═══════════════════════════════════════════════════════════════
// WORKFLOW SCAFFOLDING - nika new command (v0.19.3)
// ═══════════════════════════════════════════════════════════════
// ═══════════════════════════════════════════════════════════════
// JOBS DAEMON - Background workflow scheduler (feature-gated)
// ═══════════════════════════════════════════════════════════════
// ═══════════════════════════════════════════════════════════════
// TEST UTILITIES (cfg(test) or cfg(feature = "test-fixtures"))
// ═══════════════════════════════════════════════════════════════
// ═══════════════════════════════════════════════════════════════
// PUBLIC API RE-EXPORTS
// ═══════════════════════════════════════════════════════════════
// Source tracking types (v0.19 Foundation)
pub use ;
// Error types
pub use NikaError;
// Config types
pub use ;
// AST types (Domain Model)
pub use ;
// Runtime types (Application Layer)
pub use ;
// DAG types
pub use ;
// StableGraph types (v0.9.0) - Stable NodeIndex after deletion
pub use ;
pub use ;
// Binding types
pub use ;
// Event types
pub use ;
// Store types
pub use ;
// MCP types (v0.2)
pub use ;