feat(messages): add send_at per-message scheduling (cueapi #623 parity)#34
Merged
Conversation
Adds the optional ``send_at`` kwarg to ``MessagesResource.send()``, covering server PR #623 (POST /v1/messages send_at). Caller can now schedule per-message delivery instead of always-immediate. Accepts ``str`` (ISO 8601) or ``datetime`` — auto-serialized via ``.isoformat()`` (same convention as ``cues.create(at=...)`` and the new ``cues.fire(send_at=...)`` from PR #33). Body field, not header (matches the server contract). Backwards compatible — defaults to None, omitted from the request body when unset; existing call sites unchanged. 3 new mock-based tests in test_messages_resource.py::TestSendAt (matches existing test style in this file: assert on the request body shape rather than against staging): - send_at as ISO 8601 string flows verbatim - send_at as datetime auto-isoformats with tz - send_at unset omits field from body entirely Source: drift audit handoff/cueapi-package-drift-2026-05-06; Backlog row "Parity port: PR #623 (POST /v1/messages send_at) → cueapi-python" (p1, CTO-SEC-DRIFT-AUDIT-AUTHORIZE 2026-05-06). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 7, 2026
mikemolinet
added a commit
that referenced
this pull request
May 9, 2026
…t recent ports (#36) Manifest was 3 days stale; many endpoints listed as missing have been ported since the last audit. Moved from endpoints_missing → endpoints_covered (with PR refs): - POST /v1/cues/{id}/fire (PR #23; in-flight kwargs in #33) - POST /v1/executions/{id}/replay (PR #25) - GET /v1/executions/claimable (PR #23) - POST /v1/executions/{id}/claim (PR #23) - POST /v1/executions/claim (PR #23) - GET /v1/workers + DELETE /v1/workers/{id} (PR #26) - GET /v1/usage (PR #26) - POST /v1/agents + GET/PATCH/DELETE /v1/agents/{ref} + GET /v1/agents/{ref}/webhook-secret + GET /v1/agents/{ref}/inbox + /sent (PR #27) - POST /v1/messages + GET/read/ack (PR #28) Added in-flight refs (open PRs): - GET /v1/agents/roster (in-flight PR #35; cueapi #630 parity) - GET /v1/agents/{ref}/presence (in-flight PR #35; cueapi #662 parity) - send_at + exit_criteria + idempotency_key kwargs on fire (PR #33) - send_at kwarg on messages.send (PR #34) New endpoints_missing items (post-audit): - POST /v1/agents/{ref}/webhook-secret/regenerate (destructive; tracked) - DELETE /v1/messages bulk (cueapi #650; bounded by cueapi-cli upstream) - POST /v1/executions/{id}/live-claim (cueapi #664; handler-runtime, not SDK) New "in_flight_ports_2026_05_07" section listing all 4 currently-open SDK PRs with PR-overlap notes (PR #30/#33 lane-flagged with cueapi-main). Bumped sdk_version_at_audit 0.1.3 → 0.2.x. This refresh closes the Backlog row "Refresh cueapi-python parity-manifest.json" filed earlier today (Self-flag 2026-05-07). Co-authored-by: Claude Opus 4.7 (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.
Summary
Adds
send_attoMessagesResource.send(), covering server PR #623 (per-message scheduling).Caller can now schedule message delivery to a specific timestamp instead of always-immediate:
Implementation notes
Optional[Union[str, datetime]]— auto-serialized via.isoformat()(same convention ascues.create(at=...)and the newcues.fire(send_at=...)from PR feat(cues): add send_at + exit_criteria + idempotency_key to fire() #33).None, omitted from the request body when unset. Existing call sites unchanged.Tests
3 new mock-based tests in
test_messages_resource.py::TestSendAt(matches existing test style in this file — asserts on the request body shape rather than against staging):test_send_with_send_at_iso_string— ISO string flows verbatimtest_send_with_send_at_datetime_auto_isoformats— datetime → ISO 8601 with tz preservedtest_send_without_send_at_omits_field— unset means field NOT in bodySource
Drift audit
handoff/cueapi-package-drift-2026-05-06. Backlog row "Parity port: PR #623 (POST /v1/messages send_at) → cueapi-python" (p1, CTO-SEC-DRIFT-AUDIT-AUTHORIZE 2026-05-06).Related
send_at+exit_criteria+idempotency_keytocues.fire()(cueapi #618 / #632 / #683 ports). Same datetime serialization pattern.messages-sendAction command but does not yet have asend-atinput. Follow-up PR will add it once cueapi-cli ports--send-at(Action drift bounded by upstream).Test plan
🤖 Generated with Claude Code