sc-command
sc-command 0.1.0 is published on crates.io under the MIT license. The repository is https://github.com/randlee/sc-runtime.
Lossless response envelope for a JSON-first CLI or API, plus the conversions that put that envelope on an Axum response or an rmcp tool result.
The default build is the envelope and OpError. The server feature adds
the Axum and rmcp conversions and is off by default.
use ;
use ;
let error = new
.with_suggestion;
let envelope = from;
let value = to_value?;
assert_eq!;
assert_eq!;
assert_eq!;
let again: = from_value?;
assert!;
# Ok::
with_suggestion stores sc_observability_types::Remediation. The wire field
suggested_action is that remediation as a JSON string, or JSON null when
no remediation is set.