From cda0455bf77cc63d41f25195931a4af4d700f730 Mon Sep 17 00:00:00 2001 From: Tristan Cartledge Date: Fri, 2 Oct 2026 10:37:22 +1000 Subject: [PATCH 1/4] fix(cli): omit inherited body flags from intent commands --- .changesets/1790900058-eee5daf2.yaml | 10 ++ templates/templates/cli/README.md | 10 +- templates/templates/cli/includes/intents.ts | 104 +++--------------- templates/templates/cli/includes/usage.ts | 70 +----------- templates/templates/cli/intentcmd.go.stmpl | 85 +++----------- .../templates/cli/intenthint_test.go.stmpl | 21 ---- .../cli/tests/primary/intents_test.go.stmpl | 56 ++++++---- .../requestshape_additional_test.go.stmpl | 22 +--- tests/overlays/primary/cli/overlay.yaml | 4 + zSDKs/sdk-cli/.speakeasy/gen.lock | 18 +-- zSDKs/sdk-cli/docs/cli_enroll.md | 18 +-- zSDKs/sdk-cli/docs/cli_invite.md | 20 +--- zSDKs/sdk-cli/docs/cli_observe.md | 14 +-- zSDKs/sdk-cli/docs/cli_produce.md | 18 ++- zSDKs/sdk-cli/docs/cli_render.md | 12 +- zSDKs/sdk-cli/docs/cli_say.md | 2 +- zSDKs/sdk-cli/internal/cli/intent_enroll.go | 31 ++---- zSDKs/sdk-cli/internal/cli/intent_invite.go | 42 ++----- zSDKs/sdk-cli/internal/cli/intent_observe.go | 32 ++---- zSDKs/sdk-cli/internal/cli/intent_produce.go | 32 ++---- zSDKs/sdk-cli/internal/cli/intent_render.go | 32 ++---- zSDKs/sdk-cli/internal/cli/intent_say.go | 6 +- .../internal/cli/tag1/intent_tag1-recent.go | 5 +- zSDKs/sdk-cli/internal/usage/schema.go | 14 +-- zSDKs/sdk-cli/tests/intenthint_test.go | 23 ---- 25 files changed, 189 insertions(+), 512 deletions(-) create mode 100644 .changesets/1790900058-eee5daf2.yaml diff --git a/.changesets/1790900058-eee5daf2.yaml b/.changesets/1790900058-eee5daf2.yaml new file mode 100644 index 00000000..94cd1eeb --- /dev/null +++ b/.changesets/1790900058-eee5daf2.yaml @@ -0,0 +1,10 @@ +id: 1790900058-eee5daf2 +features: + - cliCommands +targets: + - cli +type: fix +bump: patch +description: omit inherited body flags from intent commands +author: TristanSpeakEasy +date: "2026-10-02" diff --git a/templates/templates/cli/README.md b/templates/templates/cli/README.md index dca3ca96..85378b05 100644 --- a/templates/templates/cli/README.md +++ b/templates/templates/cli/README.md @@ -572,7 +572,7 @@ Selection happens before route-local presets or schema defaults are applied. Aft `--body` remains the advanced escape and must contain a JSON object for dispatch. Its `@path`, `@-`, and stdin forms are resolved exactly once; the runtime selects from the object's keys, merges inputs and the selected preset, and replays the final object through the generic `--body` flag for the normal generated `BuildRequest` path. A body key unique to an unrouted union member returns a typed error naming the generated-operation escape. Unknown keys remain owned by `BuildRequest`'s normal body-key verification. Dispatch requires the generated operation to have flag metadata and the generic `--body` surface; pure `BuildRequestBody` operations are gated. -Dispatch commands never register backing request-body metadata: no whole-union JSON flag and no expanded body fields. They retain non-body path/query/header metadata, operation security, `--body`, `--schema`, and declared flags. Help puts route-specific flags under `