cli: adapter schema --type / sensors --key + api-key create --store-secret#301
Merged
Merged
Conversation
…tore-secret Three FDE-acceleration additions found while profiling AI agent build runs: - cloud-adapter/external-adapter `schema --type <t>`: resolve one adapter type's config sub-schema from the hive JSON-Schema $defs and render the flat field table (reusing hive's _flatten_schema). Shows where each field lives (e.g. hostname under client_options), preventing "unknown field" rejections from hand-built records. Unknown type errors with the valid type list. - cloud-adapter/external-adapter `sensors --key <adapter>`: return the live sensor(s) an adapter produced by matching the record's installation_key (iid) against the sensor iid — the reliable way to get an adapter's SID without decoding the installation key. Falls back to hostname match; reports a clear "not registered yet" when the adapter hasn't delivered events. - `api-key create --store-secret <name>` (+ --store-secret-tag): atomically mint the key and write its value into the secret hive, collapsing the mint -> capture -> store -> reference chain into one call (the value never has to transit an intermediate file). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…r selector, etag-safe store-secret - adapter `schema --type` now respects --quiet (consistent with sensors/list-types) and its --output json carries the root $defs so nested $refs stay resolvable. - adapter `sensors --key` filters server-side via a sensor selector (iid == "…" / hostname == "…") instead of paging and scanning every sensor. - api-key create --store-secret reads any existing secret's etag and writes a conditional update (no silent lost-update; reports create vs overwrite), and on the no-value edge still surfaces the created key before failing. Tests updated for the selector path and added: schema CLI table/unknown-type, store-secret new-vs-existing(etag). 990 unit tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three CLI additions that remove friction in automated/agent build flows (split out of the merged #299; this is the remaining commit).
cloud-adapter/external-adapter schema --type <t>— resolve one adapter type's config sub-schema from the hive JSON-Schema$defsand render the flat field table (reusing hive's_flatten_schema). Shows where each field lives (e.g.hostnameunderclient_options), preventingunknown fieldrejections from hand-built records. Unknown--typeerrors with the valid type list.cloud-adapter/external-adapter sensors --key <adapter>— return the live sensor(s) an adapter produced by matching the record'sinstallation_key(iid) against the sensoriid— the reliable way to get an adapter's SID without decoding the installation key. Falls back to hostname match; reports a clear "not registered yet" when the adapter hasn't delivered events.api-key create --store-secret <name>(+--store-secret-tag) — atomically mint the key and write its value into the secret hive, collapsing the mint → capture → store → reference chain into one call (the value never transits an intermediate file).Unit-tested (986 passing; new coverage in
test_cli_ergonomics.py, adapter-group subcommand list updated in the lazy-loading regression test) and smoke-tested live.🤖 Generated with Claude Code