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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Cross-package release notes for relayburn. Package changelogs contain package-le

## [Unreleased]

- `relayburn-cli` (Rust): wire `burn run <harness>` driver + claude adapter (eager unit-struct in `EAGER_ADAPTERS`); `afterExit` ingest folds into `[burn] claude ingest: ...` summary line. (#248 D5)
- `relayburn-cli` (Rust): wire `burn ingest` (no-flag scan, `--watch` poll loop, `--hook claude --quiet`) and `burn mcp-server` stdio subcommand exposing `burn__sessionCost`; closes #210. (#248 D8)
- `relayburn-cli` (Rust): wire codex `HarnessAdapter` via `pending_stamp::adapter_static` factory; registered in `RUNTIME_ADAPTERS`. (#248 D6)
- `relayburn-cli` (Rust): wire `burn compare` as a presenter over `relayburn_sdk::analyze::compare` building blocks (`build_compare_table` + the per-turn fidelity gate), matching the TS CLI flag set (positional comma-separated model list, `--include-partial` / `--fidelity` / `--since` / `--project` / `--session` / `--min-sample` / `--csv` / `--no-archive`) and producing byte-equivalent stdout for the cli-golden `compare` / `compare-json` invocations. (#248 D3)
Expand Down
5 changes: 4 additions & 1 deletion crates/relayburn-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@ thiserror = { workspace = true }
# bodies via a current-thread runtime.
async-trait = "0.1"
phf = { version = "0.11", features = ["macros"] }
# `process` is needed by `commands/run.rs` so the `burn run` driver can
# `await` the child via `tokio::process::Command::status()` rather than
# blocking the current-thread runtime with `std::process::Command::status()`.
# `signal` is needed for the `burn ingest --watch` SIGINT/SIGTERM trap
# (#248 D8); the watch loop blocks the foreground until a stop signal
# comes in. `rt` drives the current-thread runtime that wraps the SDK's
# async ingest verb from otherwise-sync presenter bodies.
tokio = { workspace = true, features = ["sync", "rt", "signal"] }
tokio = { workspace = true, features = ["sync", "rt", "process", "signal"] }

# `IndexMap` preserves first-seen iteration order, which matters for the
# Wave 2 read-path commands so their grouped output (`summary --by-model`,
Expand Down
36 changes: 35 additions & 1 deletion crates/relayburn-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub enum Command {

/// Run an agent CLI under a harness wrapper that ingests its
/// session log on exit.
Run,
Run(RunArgs),

/// Inspect or rebuild derived state under `~/.relayburn`.
State(StateArgs),
Expand Down Expand Up @@ -188,6 +188,40 @@ pub struct McpServerArgs {
pub debug: bool,
}

/// `burn run <harness> [--tag k=v ...] [-- <harness args>]` — flags +
/// trailing argv for the harness driver. Mirrors the TS surface in
/// `packages/cli/src/commands/run.ts`.
///
/// The first positional is the harness name (`claude`, `codex`,
/// `opencode`). Everything after `--` (or any unknown flag, courtesy of
/// `trailing_var_arg`) is captured into `passthrough` and forwarded to
/// the spawned binary verbatim. `--tag k=v` may be repeated; bad shapes
/// (no `=`, empty key) are rejected at runtime by the driver with the
/// same error message as the TS sibling.
#[derive(Debug, Clone, ClapArgs)]
pub struct RunArgs {
/// Lowercase harness identifier (`claude`, `codex`, `opencode`).
/// Optional so `burn run --help` and `burn run` both succeed; the
/// driver translates a missing name to a help-or-exit-2 outcome
/// matching the TS sibling.
#[arg(value_name = "HARNESS")]
pub harness: Option<String>,

/// User-supplied stamp enrichment. Repeatable — `--tag workflow=foo
/// --tag agent=bar` produces `{"workflow":"foo","agent":"bar"}` on
/// the resulting [`relayburn_sdk::Stamp`].
#[arg(long = "tag", value_name = "K=V")]
pub tag: Vec<String>,

/// Everything after the harness name (or `--`). Forwarded to the
/// spawned binary in `SpawnPlan::args` after the adapter's own
/// transport-level args. `trailing_var_arg = true` makes clap stop
/// option parsing at the first non-flag token so `burn run claude
/// --resume` works without an explicit `--`.
#[arg(trailing_var_arg = true, allow_hyphen_values = true, value_name = "ARGS")]
pub passthrough: Vec<String>,
}

/// Per-command flag set for `burn compare`. Mirrors
/// `packages/cli/src/commands/compare.ts` so the CLI surfaces match
/// byte-for-byte; see that file for the canonical help text.
Expand Down
6 changes: 6 additions & 0 deletions crates/relayburn-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ use crate::render::error::report_unimplemented;

/// Shared "not yet implemented" exit path for every subcommand stub.
/// Honors `--json` via [`crate::render::error::report_unimplemented`].
//
// All Wave 2 D1–D8 PRs have wired their presenters; no command currently
// calls this helper. Kept in place (with `#[allow(dead_code)]`) so a
// future scaffold of a new stub subcommand has a ready landing pad and
// doesn't have to re-derive the JSON-aware error envelope here.
#[allow(dead_code)]
pub(crate) fn not_yet_implemented(name: &str, globals: &GlobalArgs) -> i32 {
report_unimplemented(name, globals)
}
Loading
Loading