Optional per-step and DAG-level cache config in dag.toml:
[[steps]]
cache = { enabled = true, ttl_sec = 3600 }
OR
[pipe]
cache = { enabled = true, ttl_sec = 3600 }
Cache gated by AtomKind — only query/transform cacheable; command/stream
always re-invoke even with cache.enabled=true.
StepReport.source: Some('cache'|'fresh') | None shows cache outcome.
Constructor Pattern: extracted src/config.rs (CacheConfig + StepKind
+ TOML raw types + split_pipe_cache parser) + src/topo.rs (topo-sort)
to keep dag.rs under 200 LOC.
Tests: 8/8 (was 5, +3: cache-hit reuse, cache-disabled always invokes,
command-kind not cached even if enabled).
kei-cache 22/22 preserved.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
695 B
TOML
31 lines
695 B
TOML
[package]
|
|
name = "kei-pipe"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.75"
|
|
description = "Atom DAG pipe runtime — topo-sorts steps, pipes JSON between atoms."
|
|
|
|
[[bin]]
|
|
name = "kei-pipe"
|
|
path = "src/main.rs"
|
|
|
|
[lib]
|
|
name = "kei_pipe"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
clap = { version = "4", features = ["derive"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
toml = "0.8"
|
|
anyhow = "1"
|
|
thiserror = "1"
|
|
kei-cache = { path = "../kei-cache" }
|
|
rusqlite = { version = "0.31", features = ["bundled"] }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
|
|
[package.metadata.keisei]
|
|
backend = "none"
|
|
description = "Atom DAG pipe runtime — topo-sorts steps, pipes JSON between atoms."
|