oz0 notify rule put
For: Operators and developers looking up a command.
Add a notification rule, or replace one with --id.
A rule names events (--event, repeatable): approval.waiting, approval.escalated, approval.expired, question.waiting, budget_request.waiting, job.failed, budget.share, eval.regression, model.changed, tool_rule.expiring, secret.expiring, quality.drift and model.retiring. It may narrow them to agents, tools (<tool> or <tool>.<function>, * for anything) and risk classes (read_only, destructive, open_world, undeclared), and it sends them to targets:
--email-role admin email to the tenant's members of a role (and the roles above it) --email-team payments email to a team's members --email-person ana email to an account, by name (never by address) --webhook URL --secret S a signed POST to URL; S is the tenant secret its HMAC key is in --channel CHANNEL:ROOM a chat channel's room, such as teams:19:[email protected] (a room a verified message came from, for Teams); its readers get the facts only, and an approval's buttons --channel-person teams:ana an account's private chat with the bot, through their linked chat identity; also --channel-team and --channel-role. The call's details only for people who may read them
People get mail at the address their identity provider gives, or the one they set with oz0 notify address; email needs the SMTP relay the operator configures (orchestrator-zero server --smtp-addr).
A notification carries the event's facts (tenant, agent, tool, the job's link, the deadline and the step), never the call's arguments unless the tenant's admins set notify-content to arguments, and never a link or code that decides: people decide in OZ, and a webhook's receiver decides through the runtime API with an API key, then polls ListApprovals for the outcome.
That key decides only the approvals its webhook was sent (or whose deciders name it): name it with --decide-key, the key's ID as oz0 apikey list shows it. Any other key is refused. A put that names a key, sends a named key other approvals or moves its webhook is a governance change: it takes --reason (default $OZ0_REASON), and where the tenant has four eyes on it waits for another admin; taking a key out applies at once.
Usage
oz0 notify rule put NAME [flags]
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--agent | strings | only this agent's events; repeatable, * matches anything | |
--channel | strings | post to a chat channel's room, CHANNEL:ROOM; repeatable | |
--channel-person | strings | post to an account's private chat with a channel's bot, CHANNEL:ACCOUNT; repeatable | |
--channel-role | strings | post to the private chats of a role's members with a channel's bot, CHANNEL:ROLE; repeatable | |
--channel-team | strings | post to a team's members' private chats with a channel's bot, CHANNEL:TEAM; repeatable | |
--decide-key | string | the ID of the API key the webhooks' receiver decides the approvals it is sent with | |
--decision-ref | string | the decision or case the change follows, such as a case number (at most 200 characters) | |
--disabled | bool | keep the rule but send nothing | |
--email-person | strings | email this account, by name; repeatable | |
--email-role | strings | email the tenant's members of this role: reader, operator, admin or owner; repeatable | |
--email-team | strings | email this team's members; repeatable | |
--event | strings | an event the rule sends; repeatable | |
--id | string | replace this rule | |
--json | bool | print JSON instead of a table | |
--reason | string | why, required for every governance change (at most 500 characters; default $OZ0_REASON); the audit log keeps it | |
--risk | strings | only calls of this risk class: read_only, destructive, open_world, undeclared; repeatable | |
--secret | string | the tenant secret webhooks are signed with (HMAC-SHA256): a signing key bound to the webhook's host (oz0 secret set NAME --host HOST --signing) | |
--tenant | string | default | tenant |
--tool | strings | only this tool's or function's events; repeatable | |
--webhook | strings | post signed JSON to this https URL; repeatable |
Inherited flags
| Flag | Type | Default | Description |
|---|---|---|---|
--context | string | $OZ0_CONTEXT or <config dir>/orchestrator-zero/context.json | CLI context file written by server init |
--log-level | string | info | log level: debug, info, warn or error |
See all oz0 commands and the global flags.