Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Ergo

[![CI](https://github.com/ergo-engine/ergo/actions/workflows/runtime-surface.yml/badge.svg?branch=main)](https://github.com/ergo-engine/ergo/actions/workflows/runtime-surface.yml)

Ergo is a deterministic graph execution engine built in Rust.

It implements a four-primitive ontological model — **Source, Compute, Trigger, Action** — representing universal causal roles. Graphs are authored declaratively in YAML or JSON. Execution is deterministic: same inputs, same decisions, same outputs. Ergo can produce replayable capture artifacts or bundles for audit, debugging, and verification.
Expand Down
11 changes: 5 additions & 6 deletions crates/prod/CODE_MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Sibling: `crates/kernel/CODE_MAP.md` for the kernel half.

---

## 1. The six prod crates
## 1. The five prod crates

The prod tree has two layers (`core/`, `clients/`) plus a small `shared/`
helper crate. Every prod crate ultimately re-exports or composes the
Expand All @@ -40,7 +40,6 @@ meaning.
| **`ergo-host`** | `crates/prod/core/host` | The full host orchestration loop: usecases facade, `HostedRunner`, `BufferingRuntimeInvoker`, effect handlers, handler coverage, egress, capture enrichment. | Kernel runtime/adapter/supervisor semantics; loader transport; CLI/SDK shape. | `ergo-adapter`, `ergo-runtime`, `ergo-supervisor`, `ergo-loader`, `ergo-prod-duration`. |
| **`ergo-sdk`** | `crates/prod/clients/sdk-rust` | The SDK `Ergo` engine, `ErgoBuilder`, `ProfileRunner`, `StopHandle`, SDK-branded `Ergo*Error` taxonomy, in-memory project plumbing. | Host orchestration internals; loader internals; kernel semantics. | `ergo-adapter`, `ergo-host`, `ergo-loader`, `ergo-runtime`. |
| **`ergo-cli`** | `crates/prod/clients/cli` | The `ergo` binary entry, argument parsing, CLI subcommand dispatch, exit codes, text/JSON output rendering. | Host orchestration; SDK engine; kernel semantics. | `ergo-host`, plus `ergo-adapter`/`ergo-runtime`/`ergo-supervisor` for replay/test paths; `ergo-fixtures`. |
| **`ergo-sdk-types`** | `crates/prod/clients/sdk-types` | Lightweight cross-binding serde types (currently `SdkVersion` only). | Anything else. | `serde` only. |
| **`ergo-prod-duration`** | `crates/prod/shared/duration` | The shared `ms\|s\|m\|h` duration-literal parser used by host egress config and loader profile literals. | Serde wrappers; runtime timing policy. | `std` only. |

Every prod-side crate carries a `//! crate_name` header in
Expand Down Expand Up @@ -72,8 +71,8 @@ matches: see `crates/kernel/runtime/src/lib.rs`,
ergo-adapter ─ ergo-runtime ─ ergo-supervisor
```

`ergo-sdk-types` and `ergo-prod-duration` sit outside this main chain;
they are leaf helpers consumed by `sdk-rust` / `host` / `loader`.
`ergo-prod-duration` sits outside this main chain; it is a leaf helper
consumed by `host` / `loader`.

---

Expand Down Expand Up @@ -953,9 +952,9 @@ grep -A6 "pub trait RuntimeInvoker" crates/kernel/adapter/src/lib.rs | grep -qE
### C. Crate inventory check

```sh
# §1 — prod tree must still have exactly six crates
# §1 — prod tree must still have exactly five crates
count=$(find crates/prod -name Cargo.toml -not -path "*/target/*" | wc -l | tr -d ' ')
[ "$count" = "6" ] || echo "PROD CRATE COUNT DRIFT: expected 6, got $count (update §1)"
[ "$count" = "5" ] || echo "PROD CRATE COUNT DRIFT: expected 5, got $count (update §1)"
```

If any check above fails, update the relevant section of this doc in
Expand Down
3 changes: 2 additions & 1 deletion crates/prod/clients/cli/src/cli/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ fn dispatch_help(args: impl Iterator<Item = String>) -> Result<DispatchOutput, S
return Ok(DispatchOutput::Text(output::text::usage()));
}
let topic = topic_parts.join(" ").to_ascii_lowercase();
if let Some(help_text) = output::text::help_topic(&topic, &crate::fixture_ops::fixture_usage()) {
if let Some(help_text) = output::text::help_topic(&topic, &crate::fixture_ops::fixture_usage())
{
Ok(DispatchOutput::Text(help_text))
} else {
Err(output::errors::unknown_help_topic(&topic_parts.join(" ")))
Expand Down
9 changes: 4 additions & 5 deletions tools/verify_code_map_drift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,12 @@ fi
# Prod CODE_MAP citations
# =====================================================================

# §1 — six prod crates
# §1 — five prod crates
prod_crates=( \
"crates/prod/core/loader" \
"crates/prod/core/host" \
"crates/prod/clients/sdk-rust" \
"crates/prod/clients/cli" \
"crates/prod/clients/sdk-types" \
"crates/prod/shared/duration" \
)
for c in "${prod_crates[@]}"; do
Expand Down Expand Up @@ -296,10 +295,10 @@ if grep -A6 "pub trait RuntimeInvoker" crates/kernel/adapter/src/lib.rs | grep -
fail=1
fi

# §1 — prod tree must still have exactly six crates
# §1 — prod tree must still have exactly five crates
prod_crate_count=$(find crates/prod -name Cargo.toml -not -path "*/target/*" | wc -l | tr -d ' ')
if [[ "$prod_crate_count" != "6" ]]; then
echo "PROD CRATE COUNT DRIFT: expected 6, got $prod_crate_count (update prod CODE_MAP §1)"
if [[ "$prod_crate_count" != "5" ]]; then
echo "PROD CRATE COUNT DRIFT: expected 5, got $prod_crate_count (update prod CODE_MAP §1)"
fail=1
fi

Expand Down
Loading