feat(messages): per-message send_at scheduling on cueapi_send_message (#623)#33
Merged
Conversation
… (#623) Adds optional `send_at` (ISO 8601 string) to `cueapi_send_message` — mirrors the private-monorepo cueapi #623 server-side port that's already shipped on POST /v1/messages. Server contract (app/schemas/message.py MessageCreate.send_at): NULL = send now (default). Future timestamp gates inbox-fetch + push delivery until send_at <= now(). Past timestamps treated as send-now (forgiving fallback). Same semantics as cue-fire send_at (PR #618). Wire format pinned: send_at flows in the BODY (NOT a header), unlike the messaging-primitive's `from` (X-Cueapi-From-Agent header) and `idempotency_key` (Idempotency-Key header). Per-endpoint transport verified against the server schema before adding. 4 new tests in tests/tools.test.ts: - send_at is omitted by default (matches pre-#623 wire format) - send_at passes through to body verbatim as ISO string - send_at is a body field, NOT a header (regression guard) - send_at + notify + idempotency_key all flow correctly together Parity manifest updated with PR #623 ported_pr_history entry. Closes Backlog row for cueapi-mcp #623 port. Parallels cueapi-python + cueapi-cli ports already shipped against the same server PR.
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.
Summary
Adds optional
send_at(ISO 8601 string) to thecueapi_send_messagetool — ports the private-monorepo cueapi #623 server-side change that's already shipped onPOST /v1/messages(MessageCreate.send_atinapp/schemas/message.py).Server contract pinned
NULLsend_at(default) → send now (server treats absent as send-now).send_at <= now(), then becomes fetchable. Push-delivery dispatch also gated viaDispatchOutbox.scheduled_at.send_at(PR #618, already ported ascueapi_fire_cue.send_at).Wire format
send_atflows in the body ofPOST /v1/messages, NOT a header. Unlike the messaging-primitive'sfrom(which goes viaX-Cueapi-From-Agentheader) andidempotency_key(Idempotency-Keyheader),send_atis a regular body field. Per-endpoint transport verified againstMessageCreate.send_atbefore adding.Changes
src/tools.ts: Addedsend_attosendMessageSchema(zod string, optional, ISO-8601 description). Wiredif (args.send_at) body.send_at = args.send_at;in thecueapi_send_messagehandler.tests/tools.test.ts: 4 new tests in asend_at parameter (cueapi #623 — scheduled send)describe block.parity-manifest.json: PR #623 entry added toported_pr_history.Tests
(130 → 134, +4 new tests for send_at coverage.)
Test plan
npm test— 134/134 pass locallynpx tsc --noEmit— cleanapp/schemas/message.pyMessageCreate.send_atmessages.send_at) and cueapi-cli (messages send --send-at)🤖 Generated with Claude Code