Files
rhema-claw/tools/common/Cargo.toml
T
vhaudiquet 29099add9d feat(tools): the shared client plumbing
A client tool is three moves: read the connection from the
environment, make one HTTP call carrying the bearer and the contract
header, and print either the answer as one JSON line or the one error
shape — then exit with the code that says which happened. Common is
those three moves, so no client reimplements them and all clients
fail identically: `Config::from_env` (`RHEMA_URL`, `RHEMA_TOKEN`),
the `Client` call with the contract envelope, `print`/`fail` and
the `ToolError` exit codes.

The HTTP client is `ureq`, blocking, no TLS: the contract speaks to
a loopback or otherwise trusted daemon, and a remote TLS endpoint is
a stated non-goal in v1 — a thin client stays thin.
2026-10-24 01:02:28 +02:00

21 lines
562 B
TOML

[package]
name = "rhema-tools-common"
description = "Shared plumbing for the rhema claw's thin client tools: connection config, the HTTP calls, the one error shape, the exit codes"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
[dependencies]
rhema-tools-contract = { path = "../contract" }
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
ureq.workspace = true
[lints.rust]
unsafe_code = "forbid"
missing_docs = "deny"