Repository navigation
Releases
Releases · murtazox04/Cue
Cue v0.6.1
Security
- The Docker image now ships opentelemetry-api 1.45.2, which fixes CVE-2026-126360.
pip install cue-notifywas not pinned to the affected version; upgrade the package
in your environment if it resolved 1.45.1.
Cue v0.6.0
Added
- Cue as a library:
cue_notify.embedded.Gatemakes the same decisions in your own
process, with state in a SQLite file or in memory, without the HTTP server, a worker or
PostgreSQL.check()returnssend,defer,suppressordigestwith a time and a
reason;sent()records a delivery;due()returns deferred messages and closed
digest batches, checking quiet hours again in the person's current time zone. It
covers quiet hours, frequency caps, cooldowns, per-sender budgets, digests (window or
local time of day), expiry,criticalbreakthrough in essential categories and
idempotency keys. Importing it loads no server code. See
Use Cue as a library and
examples/library/night.py.
Changed
- The send-time loop (quiet hours with legal texting hours), importance capping,
criticalbreakthrough, expiry and the cap and budget reasons moved from the composer
intocue_notify.core.policyas pure functions that the server and the library both
call. Server behaviour is unchanged.
Cue v0.5.4
Changed
- The MCP server's tools now describe every parameter (format, limits, default and where
the value comes from) and say when to use each tool instead of its siblings, which
scope it needs, what can fail (404for unknown ids or, for agent keys, other senders'
ids;403;429) and which fields the result holds.get_eventexplains its
per-ruleoutcomeandget_messagelists the message fields. The server
instructions now also point agents atget_event,get_messageandexplainto
understand outcomes, and say that quiet hours may delay a message. - The test suite runs against PostgreSQL 18 as well as 17 in CI. Docker Compose stays on
PostgreSQL 17: from 18 the official image keeps its data in a different directory and
refuses to start on a volume created by 17, so existing local stacks would stop working.
Cue v0.5.3
Fixed
- An event an agent reported, still waiting to be processed when the agent was deleted,
was processed as if your own backend had sent it: its messages skipped the agent's
frequency_caps,max_importance,categoriesandapproval. Its matching rules now
reportagent_deletedand send nothing. Events from an agent that was disabled or lost
the rule's category before they were processed already reportedagent_not_allowed;
that is unchanged and now tested. - Messages an agent had already queued (direct sends, and held messages approved
later) were still delivered after the agent was deleted, disabled or lost the
message's category. They are now checked again at send time andsuppressedwith
reasonagent_deletedoragent_not_allowed, before screening runs. Broadcasts are
unaffected: only admin keys create them, so they never carry an agent.
Cue v0.5.2
Upgrading
- Run the migrations (
cuectl db upgrade, orserve --migrate):0018addsagent_key
to digests and lets an agent's digest stay open next to your backend's for the same
rule, person and key. Digests already open when you upgrade carry no agent and are sent
as before.
Added
examples/agents-demo: a script that starts Cue with SQLite and the console connector
and has three agents message one engineer, showing agent budgets, importance ceilings,
quiet hours, a digest and an approval through a review link. Its VHS tape records the
GIF at the top of the README.
Changed
- The README and the documentation home page now lead with per-person attention budgets
for agents; product notifications follow as the second use case.
Fixed
- Digest messages built from an agent's events were not attributed to the agent, so they
did not count against itsfrequency_caps(agent_budget), were not capped at its
max_importanceand skipped itsapprovalcondition. Events are now grouped per agent
as well as per rule, recipient and key, so a digest never mixes producers: an agent's
digest message carriesagent, and every agent limit applies to it. A digest whose
agent was disabled, deleted or lost the rule's category before it closed is cancelled
instead of sent. Digests from your own backend are unchanged.GET /v1/digestsshows
theagent. Migration0018. - The README's demo GIF is linked by absolute URL, so it shows on PyPI.
Cue v0.5.1
Security
- The one-time review page sent an unknown form action back with a redirect to the raw
token from the URL, so a crafted link such as/review/%5C%5Cexample.comcould
redirect a reviewer's browser to another site. It now redirects to the page's own path. - TypeScript SDK 0.3.1 trims trailing slashes from
baseUrlwithout a regular
expression that could backtrack on long inputs. - The SDK release workflow pins the npm version it installs.
Cue v0.5.0
Upgrading
- Run the migrations (
cuectl db upgrade, orserve --migrate):0016adds the
provider-id index and soft-bounce counts,0017adds per-address delivery records,
processed feedback reports andcomplained_aton addresses. - A spam complaint now marks the address (
complained_at) and stops every optional
message to it, including categories created later. It no longer unsubscribes the
person from categories on their other channels. - SMTP
4xxreplies toRCPTare retried instead of disabling the address. - Provider callbacks (
/v1/inbound/twilio/status,/v1/inbound/resend/…,
/v1/inbound/ses/…) have their own rate-limit bucket,api.rate_limit.feedback; tune it
if a high-volume sender sees429on them. - The new connectors need extras:
pip install 'cue-notify[apns]'for APNs and
'cue-notify[ses]'for Amazon SES. The container image includes both. - Python SDK 0.4.0 and TypeScript SDK 0.3.0 add
report_feedback/reportFeedback.
Added
- Delivery feedback:
POST /v1/feedbacktakes deliveries, bounces, soft bounces and spam
complaints. A bounce disables the address (and fails asentmessage once every
address it went to bounced), soft bounces in a row disable it
(delivery.soft_bounce_limit, one per message and address), a complaint stops every
optional message to the address, in categories that exist now and later
(complained_at, sourcecomplaintin the consent ledger), and the first delivery
marks the message delivered. Provider ids are kept per address, so a report about any
address of a message finds it. A repeatedreport_idis ignored. Recipient ids in the
response needrecipients:read. Migrations0016and0017. - Python SDK 0.4.0
report_feedbackand TypeScript SDK 0.3.0reportFeedback. - Twilio delivery status callbacks at
/v1/inbound/twilio/status: signed over the
exact URL with its query string, matched byMessageSidacross the Twilio channels of
the account, counted once when repeated, and limited by their own
api.rate_limit.feedbackbucket. - Connectors for Slack (
slack), Resend (resend), Amazon SES (ses, API v2 signed
with SigV4, no AWS SDK) and APNs (apns, HTTP/2 with ES256 provider tokens). New
extrasapnsandses; the container image includes both. - Resend webhooks (
/v1/inbound/resend/<channel>, Svix signatures) and SES
notifications through Amazon SNS (/v1/inbound/ses/<channel>: signatures checked
against Amazon's certificate, only the topics insns_topic_arns, subscriptions
confirmed automatically) feed delivery feedback. SNS messages more than an hour old
are refused, and a repeated SNSMessageIdor Svixsvix-idis applied once. Delivery
delays are not soft bounces. When Amazon's certificate or confirmation URL is
unreachable Cue answers503, so SNS retries. - Channel health: a channel with
delivery.breaker_failurestransient failures in a
row is skipped fordelivery.breaker_cooldown_secondsby messages that have another
channel planned, instead of every message waiting to retry it. After the cooldown one
message probes it; the last attempt of a message always tries its first choice.
Changed
- SMTP: a
4xxreply toRCPT(greylisting, a full mailbox) is retried instead of
disabling the address.4xxreplies toRCPTandDATA, other than421, do not
count against the channel's health. - Re-adding an address clears its soft-bounce count.
Cue v0.4.0
A security and reliability release. Read Upgrading before deploying it: several
defaults are stricter, and a public URL now needs a secret key.
Upgrading
- Set
CUE_API__SECRET_KEY(at least 32 random characters, the same value on every API
and worker process) before upgrading. It is required wheneverapi.public_urlis set,
and without itpreference_tokenand templates'links.tokenarenull(guard them
with{% if links.token %}as you wouldlinks.unsubscribe).
Changing it later invalidates every preference link already sent. Generate it with
python -c 'import secrets; print(secrets.token_urlsafe(32))'; with Helm pass it
throughsecretEnv, and the Render Blueprint generates one. cuectl servenow binds to127.0.0.1by default instead of0.0.0.0. The container
image,compose.yaml, the Helm chart and the Render Blueprint pass--host 0.0.0.0
explicitly; if you startcuectl serveyourself (Railway, Heroku, systemd…), add
--host 0.0.0.0to keep accepting outside connections.- Give the keys your people approve with the
approvals:decidescope, for example
cuectl keys create approvals-ui -s approvals:decide -s messages:read. Keys with only
messages:writenow get403on…/approveand…/reject. - Agent keys holding
recipients:*orapprovals:decidelose those scopes; recreate
them without, and give profile updates to your backend's own key. - Event producers that change people's region, attributes, addresses, locale or time
zone inline needrecipients:write. cuectl checkexits with status 1 when it finds an unsafe setting (listed under
warnings), so CI or deploy scripts that run it may now fail until you fix it.- Behind a reverse proxy, set
api.trusted_proxiesso rate limits apply per client
instead of to the proxy's address. - Migration
0013hashes existing preference tokens in place. It cannot be undone:
downgrading issues new random tokens, and links sent before then stop working. preference_tokeninGET /v1/recipients/{id}is a new, longer token after the
upgrade; the old one still works until you rotate it, but it is no longer shown.
Security
POST /v1/broadcastsaccepts bodies up toapi.max_broadcast_body_bytes(64 MiB) only
with an admin key; the key is checked before the body is read. Anyone else gets the
ordinaryapi.max_body_byteslimit, for announced and streamed bodies alike.
Unauthenticated clients could make the server read 64 MiB per request before.- Per-client rate limits (token buckets, in each process) on the routes reachable
without a key —/preferences/…,/review/…,/v1/preferences/…,/v1/track/…,
/v1/inbound/…— and on failed authentication: after too many401s on/v1, requests
from that address get429withRetry-Afteruntil its budget refills, unless they
carry a valid key, so guessing cannot lock out a legitimate client sharing the address.
Configure withapi.rate_limit;X-Forwarded-Foris believed only from
api.trusted_proxies. cuectl mcp --transport streamable-httprefuses a non-loopback--hostunless a bearer
token is set (CUE_MCP_AUTH_TOKENor--auth-token, at least 32 characters), and then
requiresAuthorization: Bearer <token>on every request. Before, anyone who could
reach the port acted with the server's API key.cuectl mcpwarns when--api-keyor--auth-tokenis given on the command line,
where other users can read it inps; useCUE_API_KEYandCUE_MCP_AUTH_TOKEN.- A webhook channel with a fixed
urland nosecretlogs a warning at startup and fails
cuectl check, since receivers cannot verify its requests. Setallow_unsigned = true
on the channel to accept that. - A plain-
httpapi.public_url(other thanlocalhost) logs a warning at startup and
failscuectl check: preference, unsubscribe and review links carry tokens. - Release images are built without the GitHub Actions cache that pushes to
mainalso
write, so a poisoned cache entry cannot reach a signed release. Manual release runs
are refused outside the default branch. - The docs workflow no longer leaves the token in the checkout; only the publishing step
receives it. - Approving or rejecting held messages and approval requests through the API needs the
newapprovals:decidescope (oradmin). Any key withmessages:writecould decide
before, including keys that only send. One-time review links keep working. - The MCP server no longer has a
review_messagetool: AI clients ask for approval,
people decide. - Keys bound to an agent can no longer hold
recipients:read,recipients:writeor
approvals:decide(noradmin, as before). Existing agent keys with these scopes are
denied them on every request. - Event producers can no longer rewrite profiles inline:
region,attributesand
addresseson an event or direct send needrecipients:write, and changing a stored
localeortimezonedoes too. Creating a recipient inline, filling an empty locale or
time zone, or repeating the stored values still works withevents:write. - Review links are redacted for every non-admin key in every response that carries
message content or digest items: engagement reports, approve and reject responses and
/v1/digestsshowed them before. - Wildcard rules (
*,cue.*) no longer match Cue's owncue.*events; a rule or
digest sees them only when it names the event exactly, so a catch-all rule cannot copy
review links into other messages. - Preference tokens are no longer stored. New tokens are signed with
api.secret_key
(HMAC-SHA256 over a random per-recipient id) and verified on use; tokens issued before
this release are kept only as SHA-256 hashes, so links in e-mails already sent,
including one-click unsubscribe, keep working until the token is rotated. - Screening replaces preference, unsubscribe and review links and preference tokens with
fixed placeholders before the message reaches the screening model.
Added
cuectl --version, alongsidecuectl version.worker.job_timeout(120 s): a job running longer is cancelled and retried like any
other failure.worker.max_defer_seconds(24 h): how long a job may keep deferring before it is
marked dead.cuectl prune --batch-size N(1000), and indexes onmessages.created_at,
events.received_atanddigests.message_idfor it (migration0014).
Changed
cuectl keys create NAME --agent Xwithout-sgives the keyevents:write,
messages:writeandmessages:read, the scopes an agent key may hold. It defaulted to
adminbefore and was then refused. Keys without--agentstill default toadmin.cuectl servebinds to127.0.0.1by default (see Upgrading).cuectl checklists configuration warnings and exits with status 1 when there are any.- The body limit and rate limiter honour
api.root_pathonly when the request path
starts with it.
Fixed
- Waits that are part of the plan (a message held until quiet hours end, an approval
request waiting for its expiry) are no longer treated like provider throttling: they
keep their full delay instead of being capped atworker.retry_max_seconds, and they
never count towardworker.max_defer_seconds, so a request that expires in a week is
not given up on after a day. GET /v1/approvalsshows requests past their expiry asexpired, and thestatus
filter agrees, even before the expiry job has run.- Quiet hours and US texting hours are checked again right before sending. A message
that comes due at a time no longer allowed (preferences changed, a retry backoff, a
slow queue) waits for the next allowed moment instead of going out. - Approving a held message schedules it for the next allowed moment; it could be sent
during quiet hours or outside legal texting hours before. - Legal texting hours could move a marketing text into the recipient's quiet hours.
Both are now applied together until neither moves the send time. - Frequency caps, cooldowns, agent budgets and the state texting caps counted every
message scheduled for later, so one send planned for next week could suppress
today's. They now count the messages within the period around the send time. - Quiet hours ending inside the repeated hour on the night clocks go back could resume
before the message was due, sending it during the second pass of quiet hours. - A daily digest opened during the repeated hour on the night clocks go back could be
scheduled in the past. - An address disabled by delivery (an unregistered push token, a blocked bot) came back
to life whenever your app sent the same value inline with an event or message, or in
a profile update. OnlyPOST /v1/recipients/{id}/addressesre-enables it now. cuectl jobs retry-deaddid nothing useful: the job came back, but the event,
message, broadcast or digest it had marked failed stayed failed, so the job ended at
once. Retrying now reopens those rows in the same transaction, and only rows that job
itself gave up on.- A job that crashed its worker every time was claimed again forever. Once it has used
max_attemptsit is marked dead when next claimed, and its failure is recorded. - A worker that lost a job's lease kept running it alongside the new owner. The
heartbeat now notices and cancels the job. On PostgreSQL, leases are measured with
the database clock, so workers with skewed clocks no longer steal running jobs. - If recording a job's outcome failed (the database went away), the error was lost. It
is now logged with the job id and kind, and the job runs again once its lease expires. - Rate-limit deferrals (
Retry-After) used up a job's attempts, so a busy provider
could make a message fail. Deferrals are now free and bounded by
worker.max_defer_secondsinstead (migration0015). - A
Retry-Afterofinf,nanor a huge number broke the job's bookk...
typescript SDK 0.3.1
cue-client 0.3.1 for typescript. See SDKs.
typescript SDK 0.3.0
cue-client 0.3.0 for typescript. See SDKs.