Skip to content

feat(cues): client.cues.fire(send_at=...) (hosted PR #618 port)#30

Open
mikemolinet wants to merge 1 commit intomainfrom
feat/sdk-fire-send-at-port-618
Open

feat(cues): client.cues.fire(send_at=...) (hosted PR #618 port)#30
mikemolinet wants to merge 1 commit intomainfrom
feat/sdk-fire-send-at-port-618

Conversation

@mikemolinet
Copy link
Copy Markdown
Collaborator

Summary

Parity port for hosted cueapi/cueapi#618. Adds optional send_at kwarg to client.cues.fire() for per-fire scheduling.

client.cues.fire("cue_x", send_at="2026-05-04T20:00:00Z")
client.cues.fire("cue_x", payload_override={"task": "demo"}, send_at="2026-05-04T22:00:00Z")

Behavior

  • Server gates dispatch on dispatch_outbox.scheduled_at <= now(). Past timestamps are forgiving (server treats as 'fire now' — idempotent, no error).
  • ISO 8601 string passed through as-is. Server's FireRequest.send_at is Optional[datetime]; Pydantic parses ISO strings cleanly.

Tests

3 new (4 → 7 in TestFire). Pinned:

  • send_at as ISO string lands in body unchanged
  • send_at omitted from body when default None (no null leakage)
  • Combines correctly with payload_override + merge_strategy

Depends on

cueapi/cueapi#618 merging to staging → prod for user-visible behavior. PR can merge independently — sending an unknown send_at field against an old server is silently ignored.

Companion

cueapi-cli parity PR ships the same surface as cueapi fire --send-at.

🤖 Generated with Claude Code

Adds optional `send_at` kwarg to `client.cues.fire()` for per-fire
scheduling. Server-side FireRequest gained `send_at: Optional[datetime]`
in #618; the dispatcher gates on dispatch_outbox.scheduled_at.

Past timestamps are forgiving (server treats as 'fire now', idempotent —
no error for a few-ms-late caller).

Tests: 3 new (4 → 7 in TestFire). Pinned: send_at omitted from body when
default None; combines correctly with payload_override + merge_strategy.

Depends on cueapi/cueapi#618 merging to staging then prod for user-visible
behavior. PR can merge independently — sending an unknown send_at field
against an old server is silently ignored (Pydantic extra='ignore'
default on FireRequest).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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