Skip to main content

Module cli_binding

Module cli_binding 

Source
Expand description

Canonical typed config shape for BindingProtocol::Cli (SP-cli-binding-v2).

ToolBinding.config is wire-level serde_json::Value — kept untyped so third-party binding implementations can carry their own config without every change requiring a protocol bump. The CLI binding has a recurring shape that’s worth codifying as a typed sibling, so that:

  1. ATD servers wrapping arbitrary CLI tools (kubectl / gh / mycli / healthkit_cli) can describe their binding declaratively rather than each writing custom dispatch logic.
  2. Adopter CLI authors get a stable target schema to populate manifests against.
  3. A future SP-cli-dispatcher-v1 can read this typed shape from ToolBinding.config and spawn subprocesses without each server re-deriving the field meanings.

§Wire compatibility

The v1-era minimal config {"cmd": "cat"} parses unchanged through CliBindingConfig::from_value; every new field uses skip_serializing_if so default values stay off the wire. Pre-v2 parsers (serde_json::Value-typed consumers) see unchanged bytes for configs that haven’t started using the v2 fields.

Structs§

CliBindingConfig
Canonical CLI binding config (SP-cli-binding-v2).

Enums§

CliBindingConfigError
Errors from CliBindingConfig::from_value.
CliOutputFormat
How to parse subprocess stdout into the ATD ToolResult.data payload.