salvor-cli 0.5.1

Salvor CLI: run, resume, list, history, and replay for durable agent runs
Documentation
[package]
name = "salvor-cli"
description = "Salvor CLI: run, resume, list, history, and replay for durable agent runs"
keywords.workspace = true
categories.workspace = true
version.workspace = true
edition.workspace = true
repository.workspace = true
license.workspace = true
# Homebrew formulae require a homepage; without it the tap-publish job warns.
homepage = "https://github.com/joseym/salvor"

# dist metadata for the released artifact. Building with default features OFF
# drops salvor-cli's `fixture` feature, and with it the three fixture-gated
# binaries (salvor-mcp-count-fixture, salvor-demo-research, salvor-demo-model)
# that exist only for tests and the demo. That leaves the real `salvor` binary
# as the sole artifact. The binary stays fully functional: MCP-client support
# and the wasm sandbox arrive through the unconditional lib dependencies
# (salvor-tools, salvor-wasm), not through this crate's own features.
#
# `binaries` is an explicit allowlist: dist enumerates a package's binaries from
# the manifest without evaluating required-features, so it would otherwise try
# to package the three fixture binaries and fail when the default-features-off
# build never produced them. Naming `salvor` alone ships exactly that binary.
# docs.rs builds under a time and memory budget, and the default features pull the whole
# wasmtime tree in for a binary crate whose docs do not describe it. Documenting the lean
# build keeps the crate page from failing.
[package.metadata.docs.rs]
no-default-features = true

[package.metadata.dist]
# No default features (the fixture binaries stay out of a release), but `ui` is named back in:
# a released binary that cannot serve the dashboard is the thing users report as broken.
default-features = false
features = ["ui"]

# `"*"` applies to every target triple.
[package.metadata.dist.binaries]
"*" = ["salvor"]

[features]
# `fixture` builds the two in-repo MCP servers: the counting server the CLI
# integration tests spawn (`src/bin/mcp_count_fixture.rs`) and the research
# server behind the demo/ reference agent (`src/bin/demo_research.rs`). Both
# pull in the server half of the rmcp SDK and schemars only for those
# binaries. The feature is on by default so a plain `cargo test --workspace`
# builds them and Cargo sets CARGO_BIN_EXE_salvor-mcp-count-fixture and
# CARGO_BIN_EXE_salvor-demo-research for the tests, exactly the pattern
# salvor-tools uses for its own fixture. `--no-default-features` drops both,
# and with them the server-side rmcp surface, leaving only the client MCP
# support the product uses (which arrives transitively through salvor-tools).
# Adding these deps costs the workspace nothing: salvor-tools already compiles
# rmcp with the server features on, so feature unification means no new
# crate.
default = ["fixture", "ui"]
fixture = ["dep:rmcp", "dep:schemars", "dep:async-trait"]
# Forwards the embedded dashboard through to salvor-server. On by default so the
# shipped `salvor serve` answers the web app and the API together;
# `--no-default-features` builds a headless, API-only binary.
ui = ["salvor-server/ui"]

[[bin]]
name = "salvor"
path = "src/main.rs"

# The counting MCP fixture server. Test-support only; gated on `fixture` so a
# no-default-features build never compiles it. See the feature comment above.
[[bin]]
name = "salvor-mcp-count-fixture"
path = "src/bin/mcp_count_fixture.rs"
required-features = ["fixture"]

# The research MCP server behind the demo/ reference agent.
# Demo-support, gated exactly like the counting fixture: a default-features
# `cargo build` produces it, `--no-default-features` drops it.
[[bin]]
name = "salvor-demo-research"
path = "src/bin/demo_research.rs"
required-features = ["fixture"]

# The scripted HTTP model server behind the demo GIF: it serves the same
# twenty-turn conversation as the demo_run test (from src/demo_script.rs) so
# `docs/demo.tape` records hermetically with no network or key. Demo-support,
# gated exactly like the two MCP fixtures above.
[[bin]]
name = "salvor-demo-model"
path = "src/bin/salvor_demo_model.rs"
required-features = ["fixture"]

[dependencies]
salvor-core.workspace = true
# The graph document format + validator behind `salvor graph`. A pure, IO-free
# leaf: the CLI depends on it, never the other way, so there is no cycle.
salvor-graph.workspace = true
# The graph engine behind `salvor graph run` (and a graph run's `salvor
# resume`): it drives a validated document over a `RunCtx`, exactly as the CLI
# drives an agent run over the runtime.
salvor-engine.workspace = true
salvor-store.workspace = true
salvor-llm.workspace = true
salvor-tools.workspace = true
salvor-runtime.workspace = true
# The control-plane server behind `salvor serve`. The CLI depends on it one
# way: it supplies the agent-building function (so the TOML schema stays owned
# here) and runs the server. The `serve` subcommand is the only consumer.
# Specified directly rather than inherited so default features can be turned
# off: the CLI's own `ui` feature then governs whether the dashboard is
# embedded, and `--no-default-features` yields a headless binary. (Cargo forbids
# overriding `default-features` on a workspace-inherited dependency.)
salvor-server = { path = "../salvor-server", version = "0.5.0", default-features = false }
# Sandboxed wasm tools ([[wasm_tools]] in the agent file). A direct, unguarded
# dependency: the CLI is the batteries-included tier; library users who must
# not compile a wasm runtime depend on the library crates, never on this one.
salvor-wasm.workspace = true
anyhow.workspace = true
tokio.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
clap.workspace = true
toml.workspace = true
# Process discovery + termination for `salvor serve --kill`; see the
# workspace Cargo.toml for the version/feature-weight justification.
sysinfo.workspace = true
# The process-group kill behind `salvor serve --dev`'s teardown of `ng
# serve`; see the workspace Cargo.toml for the justification.
libc.workspace = true
serde.workspace = true
serde_json.workspace = true
time.workspace = true
uuid.workspace = true
# Only the fixture binary uses these; optional and behind the `fixture` feature.
rmcp = { workspace = true, optional = true, features = [
    "server",
    "transport-io",
    "macros",
    "schemars",
] }
schemars = { workspace = true, optional = true }
# Only `demo_tools` (the `--demo-tools` registry) uses this, for its
# `ToolHandler` impls; optional and behind the `fixture` feature like the two
# deps above.
async-trait = { workspace = true, optional = true }

[dev-dependencies]
assert_cmd.workspace = true
predicates.workspace = true
tempfile.workspace = true
wiremock.workspace = true
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"] }