Event types, field mappings and the stored-delivery inspector move into
modules/events: copied from internal/domain/eventtype and
internal/domain/mapping, which the old services still import. Each stored
event records how its delivery was verified; a source that checks nothing
refuses deliveries until approved; triggers gain approve, pause, resume,
event-type and mapping binding, dispatch history and delete. The captures,
mappings and bindings sections are reported as served.
A disabled workflow is never started by a trigger, another workflow or a
person. Delete is refused while a trigger, another workflow or a run in
progress names it. A parked or ended run restarts from a step.
The organisation's standing instructions are stored per organisation and
join the system prompt of chat turns and workflow agent steps. The Org
configuration group is served: schedules, alert webhook, playbooks,
models, connections and credential bindings open the page that already
owns the concept.
Trigger dispatch, run start, every run claim, every delivery attempt and
webhook intake now ask the policy chain. Background work acts as the
workload principal; a refusal is final and recorded on the run or the
delivery, and an undecidable chain leaves the work queued for another
attempt. Intake applies the per-source delivery policy after source
verification.
Operations register through httpapi.Register with Public, Authorized or
AdminAuthorized, and the guard asks the policy chain for the declared
action and resource kind before the handler runs. An undeclared operation
and an undecidable chain are refused. The workload principal, its shipped
policy, a self-service policy and Recording for denials are added in
governance.
Connector actions and lookups now declare privilege change and secret access,
and an MCP server declares both per installation. Chat withholds and refuses
any tool that has either effect or declared nothing, in judgement and at
execution, so an approval cannot convert the refusal. Workflows and the
dashboard are unchanged.
When a connector loads with new declarations, the saved workflows that
reference it are re-checked against them (via a Recheck hook wired to
runs.Engine.RecheckConnector); if any would become invalid, the new
declarations are refused and the connector fails to start, so the breakage
surfaces at update time instead of mid-run. The previous declarations stay
in force.
A connector that declares the message or chat_message delivery now has its
declared input schema checked against every payload shape core sends on it
when it loads; a rejecting schema fails the connector. The delivery names
are exported from the connectors module and used by core's senders, so the
contract has one definition.
POST /api/runs/{id}/cancel now reaches Engine.Cancel, which cancels the
run and the runs it started with workflow.call, and returns the run.
Cancelling a run that has already ended is refused with a 409, and a run
from another organisation is not found. The run page shows a Cancel
action for a run that has not ended.
Add workflow.finish (completed, parked, waiting_approval, declined). A failed
step parks the run unless it continues on failure, and a parked run retries
from a top-level step, replaying the earlier steps' recorded results. Adds the
retry-run operation and a Retry button on the run page.
A PUT that names no verification keeps the stored scheme, token hash and
sealed secret, and an hmac save with a blank secret keeps the sealed one.
The sources page gains an Edit action that reuses the add dialog.
A source now declares how its deliveries prove themselves: token (the
default, unchanged), hmac (HMAC-SHA256 over the raw body, per-source header
and prefix, secret sealed at rest and write-only) or none. The events module
verifies before the connector parses, answers 401 and logs the refusal.
The digest comparison is ported from internal/webhookguard/hmac.go and the
header-borne signature from internal/infrastructure/captureintake/receiver.go;
the old copies stay until their service goes. The seal package moves to
internal/platform/seal so events can seal the secret.