Add advisor trigger create verbs
Epic 5336 — Event-driven Task triggers. Upstream: PRD = Task 5337 `prd.md`; Architecture = Task 5338 `architecture.md` (artifact 3566). Read §9 IN FULL. `task_triggers.created_by_task_id` is already migrated by the engine child.
## Original requirement (epic body, verbatim)
> Every trigger files a Task shape in its own project under the licence of the human who created it (R30)
## Requirement (PRD R19, verbatim)
The advisor persona gets trigger create/update/delete verbs mirroring `task_cron_create`/`_update`/`_delete` (D5), with the same executor-authority check. The webhook secret is shown to the human in the console, never returned to the agent.
## Approach (architecture §9, settled)
- `task_trigger_create` / `task_trigger_update` / `task_trigger_delete` as `ToolSpec`s in `apps/jaahd/agent_vocabulary.py` beside `_TOOL_CRON_*`.
- `routes/agent_triggers.py` mirrors `agent_crons.py`: `_require_filing_caller(shape=SHAPE_TRIGGER)`, then `_executor_authority` (org admin or operator); update/delete own rows only via `created_by_task_id`.
- `SHAPE_TRIGGER = "trigger"` added to the advisor's licence ONLY (`persona_registry.py`). The acyclicity test models a trigger edge exactly as `SHAPE_CRON`: a trigger files only `SCHEDULABLE_PERSONAS ∪ {epic}`, none of which holds `SHAPE_TRIGGER`.
- The response never carries the secret: it returns the trigger's console URL and "Reveal the signing secret once in the console: <url>" (the console's "Reveal secret (one time)" button already exists).
## Acceptance (PRD, verbatim)
- **AC-19.1** In a dev advisor chat, asking to "create a webhook trigger that files a coder task" creates it. It shows on the Triggers tab, and the reply tells the user to reveal the secret in the console. → verify: on dev.
Out of scope: Do NOT grant `SHAPE_TRIGGER` (or any trigger filing) to plan, finish, coder or any persona other than advisor. Do NOT return the secret to the agent. PRD §5 (verbatim, binds): No deferred source in this epic. No skill attachment. No budget enforcement. No GitHub reads that decide filing. No public exposure beyond the two fenced paths. Cron behaviour is unchanged. No new licence for any persona other than advisor (R30 acyclicity). Slack: no Events API. Secrets: no webhook secret, bearer token or credential in any prompt, task body, log, digest, deliveries log or artifact.
Done means:
- AC-19.1 — in a dev advisor chat, ask "create a webhook trigger that files a coder task": the trigger appears on `/triggers` with a readable name; the advisor's reply contains the console URL and the reveal-once sentence and NO secret; the detail page shows "Reveal secret (one time)" and revealing works once.
- Tests: verb response never contains the secret; non-advisor persona → 403 quoting the licence; update/delete of a trigger not created by the caller → refused; the persona-creation-graph acyclicity test passes with the trigger edge.
- `./dc check full` green.
Outcome
Advisor task_trigger_create/update/delete shipped. Own project, executor authority, own triggers only, secret never returned (the reply carries the console reveal link). CI gate green, PR #4735 merged, Jaah Deploy succeeded. The local full gate was reaped for low memory. Follow-up: agent triggers start live.
Artifacts
Activity
- Draft
- Ready
- Runner started
- Awaiting response
- Awaiting response
- Runner resumed
- Runner ended (done)