Skip to content

feat(messages): per-message send_at scheduling on cueapi_send_message (#623)#33

Merged
mikemolinet merged 1 commit into
mainfrom
feat/messages-send-at
May 10, 2026
Merged

feat(messages): per-message send_at scheduling on cueapi_send_message (#623)#33
mikemolinet merged 1 commit into
mainfrom
feat/messages-send-at

Conversation

@mikemolinet
Copy link
Copy Markdown
Collaborator

Summary

Adds optional send_at (ISO 8601 string) to the cueapi_send_message tool — ports the private-monorepo cueapi #623 server-side change that's already shipped on POST /v1/messages (MessageCreate.send_at in app/schemas/message.py).

Server contract pinned

  • NULL send_at (default) → send now (server treats absent as send-now).
  • Future timestamp → message sits in recipient's inbox-query gate until send_at <= now(), then becomes fetchable. Push-delivery dispatch also gated via DispatchOutbox.scheduled_at.
  • Past timestamps → forgiving fallback (treated as send-now).
  • Same semantics as cue-fire send_at (PR #618, already ported as cueapi_fire_cue.send_at).

Wire format

send_at flows in the body of POST /v1/messages, NOT a header. Unlike the messaging-primitive's from (which goes via X-Cueapi-From-Agent header) and idempotency_key (Idempotency-Key header), send_at is a regular body field. Per-endpoint transport verified against MessageCreate.send_at before adding.

Changes

  • src/tools.ts: Added send_at to sendMessageSchema (zod string, optional, ISO-8601 description). Wired if (args.send_at) body.send_at = args.send_at; in the cueapi_send_message handler.
  • tests/tools.test.ts: 4 new tests in a send_at parameter (cueapi #623 — scheduled send) describe block.
  • parity-manifest.json: PR #623 entry added to ported_pr_history.

Tests

Test Files  5 passed (5)
     Tests  134 passed (134)

(130 → 134, +4 new tests for send_at coverage.)

Test plan

  • npm test — 134/134 pass locally
  • npx tsc --noEmit — clean
  • Verified server contract via private monorepo app/schemas/message.py MessageCreate.send_at
  • Verified parity wording matches cueapi-python (messages.send_at) and cueapi-cli (messages send --send-at)
  • CI green
  • Admin-merge per agents-merge-own-PRs directive

🤖 Generated with Claude Code

… (#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.
@mikemolinet mikemolinet merged commit e45f0a3 into main May 10, 2026
2 checks passed
@mikemolinet mikemolinet deleted the feat/messages-send-at branch May 10, 2026 18:18
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