Commit f10548a
committed
feat(cli): per-message send_at scheduling on messages send + message-to (#623)
Adds optional `--send-at` (ISO 8601 string) to `cueapi messages send`
and `cueapi message-to` — 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
- Future timestamp → message gates inbox-fetch + push delivery until
send_at <= now()
- Past timestamps → forgiving fallback (treated as send-now)
- Same semantics as cue-fire send_at (PR #618, already shipped)
Wire format: send_at flows in the BODY of POST /v1/messages, NOT a
header. Mirrors the cue-fire send_at transport. Different from
idempotency_key, which is a header. Verify-server-transport-per-
endpoint pinned in tests so a refactor doesn't accidentally promote
it to a header.
Tests:
- messages_send: 2 new (send_at_omitted_by_default, send_at_passed_in_body)
- message_to: 2 new (send_at_passed_in_body, send_at_omitted_when_unset)
- 171/171 pass total
This unblocks the cueapi-action port (its messages-send shell branch
needs the underlying CLI flag to surface --send-at to GitHub Actions
callers). Parallels cueapi-python (already shipped) and cueapi-mcp
(just shipped via PR #33) ports of the same private-monorepo PR #623.1 parent 7da34a6 commit f10548a
2 files changed
Lines changed: 143 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1932 | 1932 | | |
1933 | 1933 | | |
1934 | 1934 | | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
1935 | 1948 | | |
1936 | 1949 | | |
1937 | 1950 | | |
| |||
1945 | 1958 | | |
1946 | 1959 | | |
1947 | 1960 | | |
| 1961 | + | |
1948 | 1962 | | |
1949 | 1963 | | |
1950 | 1964 | | |
| |||
1965 | 1979 | | |
1966 | 1980 | | |
1967 | 1981 | | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
1968 | 1987 | | |
1969 | 1988 | | |
1970 | 1989 | | |
| |||
2237 | 2256 | | |
2238 | 2257 | | |
2239 | 2258 | | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
2240 | 2272 | | |
2241 | 2273 | | |
2242 | 2274 | | |
| |||
2251 | 2283 | | |
2252 | 2284 | | |
2253 | 2285 | | |
| 2286 | + | |
2254 | 2287 | | |
2255 | 2288 | | |
2256 | 2289 | | |
| |||
2280 | 2313 | | |
2281 | 2314 | | |
2282 | 2315 | | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
2283 | 2321 | | |
2284 | 2322 | | |
2285 | 2323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1969 | 1969 | | |
1970 | 1970 | | |
1971 | 1971 | | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
1972 | 2027 | | |
1973 | 2028 | | |
1974 | 2029 | | |
| |||
2611 | 2666 | | |
2612 | 2667 | | |
2613 | 2668 | | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
2614 | 2719 | | |
2615 | 2720 | | |
2616 | 2721 | | |
| |||
0 commit comments