ci / rust (push) Successful in 1m7s
Closes NAP-216. Thin client for the registry HTTP API + per-session daemon WebSocket. Becomes the headless test harness for NAP-217 and unblocks the demo-by-script path before the web client lands (NAP-218). Crate layout (`crates/maestro-cli/`): - `cli.rs` — clap-derive parser. Commands: `list`, `spawn`, `attach`, `kill`, `set-registry`. Global `--registry-url` (env `MAESTRO_REGISTRY_URL`), `--config`, repeatable `-v`. - `config.rs` — `CliConfig` persisted at `~/.config/maestro/cli.toml`, storing the default registry URL + the session cookie issued by the registry's cookie middleware. - `http.rs` — `RegistryClient` wrapping `reqwest`. Attaches the persisted cookie, captures `Set-Cookie` responses (first-contact bootstrap and rotation), atomically writes the new value back to the config file. - `sessions.rs` — `list/spawn/kill` + connect-info fetch. `list` prints a per-daemon grouped table; `--json` for scripting. - `attach.rs` — raw-TTY WS proxy. Termios cfmakeraw with an RAII guard for restore-on-drop, SIGWINCH → `ClientControl::Resize` text frame, configurable detach key (default Ctrl-q; accepts `^X` form), echoes `Ping`/`Pong` for keepalive symmetry with the daemon side. Workspace deps added: clap (derive+env), reqwest (rustls+cookies), nix (term+signal). Smoke-tested against the live registry at maestro-registry.n62.casa: `maestro list` issued + persisted the cookie and printed the empty catalog cleanly. 19 new unit tests (parser, config round-trip, table-printing, cookie extraction, attach URL/detach-key parsing). Full workspace `cargo test`: 97 passed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
38 lines
945 B
TOML
38 lines
945 B
TOML
[package]
|
|
name = "maestro-cli"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish.workspace = true
|
|
description = "`maestro` CLI: list, spawn, attach, kill sessions across daemons"
|
|
|
|
[lib]
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "maestro"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
chrono.workspace = true
|
|
clap.workspace = true
|
|
dirs.workspace = true
|
|
futures-util.workspace = true
|
|
libc.workspace = true
|
|
maestro-protocol.workspace = true
|
|
nix.workspace = true
|
|
reqwest.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
thiserror.workspace = true
|
|
tokio = { workspace = true, features = ["macros", "rt", "sync", "time", "io-util", "io-std", "signal"] }
|
|
tokio-tungstenite = { workspace = true, features = ["rustls-tls-webpki-roots"] }
|
|
toml.workspace = true
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
uuid.workspace = true
|
|
|
|
[dev-dependencies]
|
|
tempfile.workspace = true
|