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
# build.nu — run cargo build --release.
# Reads JSON inputs from stdin (linted-code, formatted-code).
# Emits JSON result to stdout.
def main []: nothing -> nothing {
let inputs = ($in | from json)
# Verify upstream capabilities are present
let linted = ($inputs | get "linted-code")
let formatted = ($inputs | get "formatted-code")
if (not ($linted.ok)) {
error make { msg: "linted-code.ok is false — refusing to build" }
}
if (not ($formatted.ok)) {
error make { msg: "formatted-code.ok is false — refusing to build" }
}
let result = (do { ^cargo build --release } | complete)
if ($result.exit_code != 0) {
error make { msg: $"cargo build failed:\n($result.stderr)" }
}
# Locate the produced binary (assumes single binary workspace)
let binary = (
^find target/release -maxdepth 1 -type f -perm /111 -not -name "*.d" -not -name "*.rlib"
| lines
| first
)
let crate_name = ($binary | path basename)
{ "built-artifact": { ok: true, path: $binary, crate_name: $crate_name } } | to json | print
}