stratumiops/scripts/nu/start-orchestrator.nu
Jesús Pérez 9095ea6d8e
Some checks failed
Nickel Type Check / Nickel Type Checking (push) Has been cancelled
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
feat: add stratum-orchestrator with graph, state, NATS, and Nickel action nodes
New crates: stratum-orchestrator (Cedar authz, Vault secrets, Nu/agent executors,
  saga runner), stratum-graph (petgraph DAG + SurrealDB repo), stratum-state
  (SurrealDB tracker), platform-nats (NKey auth client), ncl-import-resolver.

  Updates: stratum-embeddings (SurrealDB store + persistent cache), stratum-llm
  circuit breaker. Adds Nickel action-nodes, schemas, config, Nushell scripts,
  docker-compose dev stack, and ADR-003.
2026-02-22 21:33:26 +00:00

35 lines
1.1 KiB
Plaintext

#!/usr/bin/env nu
# start-orchestrator.nu — Start the stratum orchestrator with full pre-flight checks.
def main [
--config: string = "config/orchestrator-config.ncl",
--skip-typecheck = false,
]: nothing -> nothing {
print "Starting orchestrator..."
# 1. Typecheck all .ncl files
if (not $skip_typecheck) {
print "Running Nickel typecheck..."
let tc = (do { ^nu scripts/nu/typecheck-all-ncl.nu } | complete)
if ($tc.exit_code != 0) {
error make { msg: $"Nickel typecheck failed — fix errors before starting orchestrator:\n($tc.stderr)" }
}
print "Nickel typecheck passed"
}
# 2. Verify config file exists and typechecks
if (not ($config | path exists)) {
error make { msg: $"Config file not found: [$config]" }
}
let cfg_check = (do { ^nickel typecheck $config } | complete)
if ($cfg_check.exit_code != 0) {
error make { msg: $"Orchestrator config failed typecheck:\n($cfg_check.stderr)" }
}
print $"Config typechecked: [$config]"
# 3. Exec orchestrator binary
print "Launching orchestrator..."
^./target/debug/orchestrator --config $config
}