You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(messaging,cli): messaging + triggers capability tokens; notify-by-email resolves to user id (#1426)
* feat(messaging,cli): wire messaging + triggers capability tokens; resolve notify-by-email to user id
Two related platform improvements that make the `notify` flow node and
auto-firing flows usable from a plain `defineStack({ requires: [...] })`,
without hand-wiring plugin instances.
CLI / runtime — new capability tokens
• `messaging` → MessagingServicePlugin, so the `notify` node delivers to a
user's inbox channel (sys_inbox_message rows) instead of degrading to a
logged no-op.
• `triggers` → RecordChangeTriggerPlugin (+ ScheduleTriggerPlugin extra), so
autolaunched / schedule flows actually fire. The automation engine ships
the FlowTrigger wiring; these plugins are the concrete triggers. Pair
`triggers` with `job` for cron/interval schedules.
Mirrored in both the CLI CAPABILITY_PROVIDERS table (serve.ts) and the
runtime capability-loader so dev `objectstack serve` and the cloud
artifact kernel resolve them identically. CLI package.json gains the
workspace deps so the dynamic imports resolve.
Inbox channel — notify-by-email lands in the right inbox
Flows commonly address recipients by email (e.g. a `{record.assignee}`
field), but sys_inbox_message is keyed by user id. The inbox channel now
resolves an email-shaped recipient to its sys_user.id via findOne, with a
verbatim fallback when the recipient is not email-shaped, no user matches,
or the lookup fails — so a failed resolution can never drop the row.
Adds InboxChannelOptions.userObject for the lookup target. Fully covered
by new unit tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: add changeset for messaging + triggers capability tokens
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments