The best way to control Claude Code, Codex and more from any computer or phone
| 1 | /** |
| 2 | * A user message that marks its run as a monitor update or a delegated-completion wake: what |
| 3 | * `delegatedTaskProgress` and `delegatedTaskRuns` read. The partial index on it is only used when |
| 4 | * the read spells this text the same way. |
| 5 | */ |
| 6 | export const DELEGATED_TASK_MESSAGE_CONDITION = `role = 'user' AND json_valid(payload_json) AND ( |
| 7 | json_extract(payload_json, '$.notification.source.kind') = 'monitor' |
| 8 | OR json_extract(payload_json, '$.delegatedCompletion') IS NOT NULL |
| 9 | )`; |