swarmctl hand-mirrored the controller's forge make-admin response and the /api/schedules bodies. Both now import them from a new serde-only crate, swarm-controller-api, the way hivectl and hive-c0re share hive-host-sock. ToSchema sits behind its schema feature, which only the controller turns on. The wire format is unchanged: round-trip tests in the new crate pin each type against the JSON the controller and swarmctl produced, and the controller's OpenAPI document for these routes is byte-identical. Files: swarm-controller-api/ is the new crate; swarm-controller and swarmctl (src, Cargo.toml, Cargo.lock, root Cargo.toml) switch to it; CLAUDE.md lists the crate and which swarmctl shapes are still local mirrors; swarmctl/README.md says the forge and schedule bodies come from the crate, so none of its lines still call them mirrored. Part of #5472.
43 lines
1.2 KiB
TOML
43 lines
1.2 KiB
TOML
[package]
|
|
name = "swarmctl"
|
|
version.workspace = true
|
|
readme = "README.md"
|
|
edition.workspace = true
|
|
|
|
[[bin]]
|
|
name = "swarmctl"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
# PKCE verifier, state and S256 challenge for `swarmctl login`.
|
|
base64.workspace = true
|
|
chrono.workspace = true
|
|
# `agent create` — bare HTTP/1.1 client over swarm-controller's unix
|
|
# socket. No new workspace dependency: `bytes`, `http-body-util`,
|
|
# `hyper` and `hyper-util` are all already pinned in the root manifest.
|
|
bytes = "1"
|
|
clap.workspace = true
|
|
clap-markdown = "0.1"
|
|
clap_complete.workspace = true
|
|
getrandom.workspace = true
|
|
hive-types.workspace = true
|
|
http-body-util.workspace = true
|
|
# `server`: the loopback listener `swarmctl login` receives its code on.
|
|
hyper = { workspace = true, features = ["server"] }
|
|
hyper-util.workspace = true
|
|
# HTTPS to the swarm domain and its SSO provider, for `--swarm`.
|
|
reqwest.workspace = true
|
|
# `flock` on the login cache, which a refresh must not race.
|
|
rustix.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
serde_norway = "0.9.42"
|
|
sha2.workspace = true
|
|
# The forge and schedule bodies, shared with swarm-controller.
|
|
swarm-controller-api.workspace = true
|
|
tokio.workspace = true
|
|
url.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|