Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
docs(autopilots): document required assignee and webhook payload conditions (MUL-10032) (#11374)
Bohan Jiangafd37594bbec
diff --git a/server/cmd/multica/cmd_autopilot.go b/server/cmd/multica/cmd_autopilot.goindex 6aa675669d..e51b13179b 100644--- a/server/cmd/multica/cmd_autopilot.go+++ b/server/cmd/multica/cmd_autopilot.go@@ -131,7 +131,7 @@ func init() {// createautopilotCreateCmd.Flags().String("title", "", "Autopilot title (required)")autopilotCreateCmd.Flags().String("description", "", "Autopilot description (used as the run prompt)")- autopilotCreateCmd.Flags().String("agent", "", "Assignee agent (name or ID)")+ autopilotCreateCmd.Flags().String("agent", "", "Assignee agent (name or ID); one of --agent, --squad, --squad-id is required")autopilotCreateCmd.Flags().String("squad", "", "Assignee squad (name or ID)")autopilotCreateCmd.Flags().String("squad-id", "", "Assignee squad ID (canonical UUID)")autopilotCreateCmd.Flags().String("mode", "", "Execution mode: create_issue or run_only (required)")@@ -170,7 +170,7 @@ func init() {autopilotTriggerAddCmd.Flags().String("cron", "", "Cron expression (required for --kind schedule)")autopilotTriggerAddCmd.Flags().String("timezone", "", "IANA timezone (default UTC; schedule only)")autopilotTriggerAddCmd.Flags().String("label", "", "Optional human-readable label")- autopilotTriggerAddCmd.Flags().String("event-filters-file", "", "Read webhook event/action filters from a JSON array file (webhook only)")+ autopilotTriggerAddCmd.Flags().String("event-filters-file", "", "Read webhook event/action filters, each with optional payload conditions, from a JSON array file (webhook only)")autopilotTriggerAddCmd.Flags().String("output", "json", "Output format: table or json")// trigger-list@@ -186,7 +186,7 @@ func init() {autopilotTriggerUpdateCmd.Flags().String("cron", "", "New cron expression")autopilotTriggerUpdateCmd.Flags().String("timezone", "", "New IANA timezone")autopilotTriggerUpdateCmd.Flags().String("label", "", "New label")- autopilotTriggerUpdateCmd.Flags().String("event-filters-file", "", "Replace webhook event/action filters from a JSON array file (webhook only)")+ autopilotTriggerUpdateCmd.Flags().String("event-filters-file", "", "Replace webhook event/action filters, each with optional payload conditions, from a JSON array file (webhook only)")autopilotTriggerUpdateCmd.Flags().Bool("clear-event-filters", false, "Remove webhook filters and accept all events (webhook only)")autopilotTriggerUpdateCmd.Flags().String("output", "json", "Output format: table or json")}diff --git a/server/internal/service/builtin_skills/multica-platform/references/autopilots.md b/server/internal/service/builtin_skills/multica-platform/references/autopilots.mdindex 17ac166acd..d76222487c 100644--- a/server/internal/service/builtin_skills/multica-platform/references/autopilots.md+++ b/server/internal/service/builtin_skills/multica-platform/references/autopilots.md@@ -35,11 +35,14 @@ multica autopilot update <autopilot-id> --status active|paused --output jsonmultica autopilot runs <autopilot-id> --output jsonmultica autopilot trigger-add <autopilot-id> --kind schedule --cron "0 9 * * *" --timezone Asia/Shanghai --output jsonmultica autopilot trigger-add <autopilot-id> --kind webhook --label "ci" --output json+multica autopilot trigger-add <autopilot-id> --kind webhook --event-filters-file ./filters.json --output json+multica autopilot trigger-update <autopilot-id> <trigger-id> --event-filters-file ./filters.json --output jsonmultica autopilot trigger <autopilot-id> --output jsonmultica autopilot trigger-rotate-url <autopilot-id> <trigger-id> --yes --output json```-The assignee flags `--agent`, `--squad`, and `--squad-id` are mutually exclusive.+The assignee flags `--agent`, `--squad`, and `--squad-id` are mutually exclusive,+and `create` requires exactly one of them.On `update`, any of them retargets the autopilot (`--agent` moves a squadautopilot back to a single agent); leave them all out to keep the currentassignee.@@ -63,6 +66,33 @@ healthy-looking `STATUS=active` row with `LAST_STATUS=failed` as a failingautopilot; inspect `multica autopilot runs <id> --output json` for the failurereason.+A webhook trigger accepts every event until it has event filters.+`--event-filters-file` takes a JSON array of rows; a delivery is accepted when+any row matches. A row matches when `event` equals the event name, `actions`+(omit for any action) contains the action, and every one of its optional+`conditions` holds on the payload:++```json+[+ {+ "event": "pull_request",+ "actions": ["opened", "synchronize"],+ "conditions": [+ { "path": "pull_request.draft", "op": "equals", "value": false },+ { "path": "pull_request.labels.*.name", "op": "equals", "value": "needs-review" },+ { "path": "pull_request.base.ref", "op": "in", "values": ["main", "release"] }+ ]+ }+]+```++`path` is dot-separated; a number indexes an array and `*` matches any element.+`op` is `equals`, `not_equals`, `contains` (text), `in` (takes `values`), or+`exists` (takes no value; a JSON `null` counts as absent); `ignore_case` applies to text. Values are compared+with their JSON type, so `"false"` does not match `false`. A missing path never+matches. A row holds at most 20 conditions. `trigger-update` without a filter+flag keeps the current filters; `--clear-event-filters` removes them.+A schedule trigger without `--timezone` runs in **UTC**. Name the zone whenevera human confirmed a wall-clock time, or they will confirm a morning job andreceive an afternoon one.@@ -80,6 +110,7 @@ material into comments, logs, docs, or PRs.3. If assigned to a squad, inspect the squad: `multica squad get <squad-id> --output json`; execution goes to the leader.4. Inspect the target agent/runtime: `multica agent get <agent-id> --output json` and `multica runtime list --output json`.5. For webhooks, inspect delivery status: `queued` means the worker has not completed dispatch; `failed` carries the worker error. A provider retry with the same `X-GitHub-Delivery` / `Idempotency-Key` reuses the original delivery.+ An `ignored` delivery created no run, so `runs` shows nothing for it. `trigger_disabled`, `autopilot_paused`, and `autopilot_archived` are recorded in its `error`; `quota_exceeded`, `event_filtered`, and `payload_filtered` in its `reason_code`. `event_filtered` means no row matched the event or action, and `payload_filtered` means a row matched but one of its `conditions` failed — `payload_condition_failure` names that condition and the payload value it saw.6. For `create_issue`, inspect the created issue if the run records one.## Access