Skip to content

feat(subscriptions): add --inline-body flag (cueapi #791 / Item 1 parity)#54

Merged
mikemolinet merged 1 commit into
mainfrom
feat/subscriptions-inline-body-cli
May 12, 2026
Merged

feat(subscriptions): add --inline-body flag (cueapi #791 / Item 1 parity)#54
mikemolinet merged 1 commit into
mainfrom
feat/subscriptions-inline-body-cli

Conversation

@mikemolinet
Copy link
Copy Markdown
Collaborator

Summary

Wires server-side subscriptions.inline_body opt-in (hosted PR #791, Item 1) through the CLI via a new --inline-body flag on subscriptions create.

When set, the server embeds the source message body in the event payload as payload.body — eliminates the extra GET /v1/messages/{id} round-trip on the consumer side. Bodies > 32KB are NOT embedded; payload instead carries payload.body_omitted = "size_too_large" + payload.body_size_bytes = N so consumers can fall back to the fetch.

Wire shape

CLI invocation Wire inline_body field
(omitted) NOT sent — server default False applies
--inline-body true

Default-omit matches the existing pattern in cueapi-cli where flags default to no-op when unset, keeping the wire format identical to pre-#791 callers.

Companion PR

cueapi-python #42 — SDK kwarg with the same semantic. Merged 2026-05-12T00:20Z.

Tests (3 new)

  • test_subscriptions_create_inline_body_flag_default_omits_field — default case, no payload noise
  • test_subscriptions_create_inline_body_flag_opts_in--inline-body sends true
  • test_subscriptions_create_help_lists_inline_body--help mentions the flag + the 32KB cap

Full file: 215/215 passing.

Parity-impact checklist

  • Server contract (PR #791) reviewed
  • CLI flag additive (default-omit preserves pre-#791 wire format)
  • Tests cover both states (omitted / opted-in) + help text
  • Companion cueapi-python PR shipped (merged 00:20Z)
  • cueapi-mcp tool inline_body parameter (deferred — Backlog cmp1v39ih covers body-verify Phase 2 first; inline_body for MCP can ride on top)

Backlog row: cmp1v3azw.

🤖 Generated with Claude Code

…ity)

Server-side Item 1 (hosted PR #791) added `subscriptions.inline_body`
opt-in body embedding for pull subscriptions — when True, the source
message body is embedded in the event payload as `payload.body`,
eliminating the extra GET /v1/messages/{id} round-trip on the consumer
side.

This CLI port wires the kwarg through `subscriptions create` via a new
`--inline-body` click flag (is_flag, defaults False). When omitted,
the field is NOT sent on the wire — preserves pre-#791 wire format
for the common no-embed case. When set, sends `inline_body: true`
in the JSON body.

Companion to cueapi-python PR #42 (SDK `inline_body` kwarg on
`AgentsResource.subscriptions_create`). Same semantic, same default-
omit behavior. Mirrors the existing pattern in cueapi-cli where
default-omit avoids payload noise for unopted callers.

Tests (3 new):
- test_subscriptions_create_inline_body_flag_default_omits_field — no
  flag = no field on wire
- test_subscriptions_create_inline_body_flag_opts_in — --inline-body
  sends true
- test_subscriptions_create_help_lists_inline_body — --help mentions
  the flag + the 32KB cap

Backlog row: cmp1v3azw.
@govindkavaturi-art govindkavaturi-art enabled auto-merge (squash) May 12, 2026 00:21
@mikemolinet mikemolinet merged commit da66e1f into main May 12, 2026
5 checks passed
@mikemolinet mikemolinet deleted the feat/subscriptions-inline-body-cli branch May 12, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant