The crate held the wire types but not the wire surface, so every consumer re-derived routes, URL construction and the error envelope. Adds `routes` (path constants, axum patterns, and a single fallible `ws_base`), the `ApiError` envelope, `DaemonInfo`, and a `DaemonClient` behind an optional `client` feature. `SpawnPreset` moves here because it rides `GET /api/info`; `maestro-config` re-exports it so the on-disk schema and the payload stay one type. `ws_base` now rejects a base with no recognised scheme. The five previous copies disagreed — the CLI errored, the web proxy trusted it, the TUI passed it through. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
28 lines
755 B
TOML
28 lines
755 B
TOML
[package]
|
|
name = "maestro-protocol"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish.workspace = true
|
|
description = "Shared wire types for Maestro daemon/client communication"
|
|
|
|
[features]
|
|
default = []
|
|
# Opt-in `reqwest`-backed client. Off by default so `maestro-web`, which only
|
|
# needs the wire types and route paths, does not pull an HTTP stack it has its
|
|
# own copy of.
|
|
client = ["dep:reqwest", "dep:tokio"]
|
|
|
|
[dependencies]
|
|
chrono.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
thiserror.workspace = true
|
|
uuid.workspace = true
|
|
reqwest = { workspace = true, optional = true }
|
|
tokio = { workspace = true, optional = true }
|
|
|
|
[dev-dependencies]
|
|
serde_json.workspace = true
|