Adds the onWebhook lifecycle hook to the definePlugin() call. When
legal-ai POSTs to /webhooks/case-status, the handler finds the linked
Paperclip issue (via plugin state scan), posts a Hebrew status comment,
and wakes the CEO agent on qa_failed. Hoists PluginContext and
CEO_AGENT_IDS to module scope so onWebhook can access them after setup().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add event handler that intercepts user comments on issues and wakes the
CEO agent (instead of only the assigned agent). The CEO reads the comment,
checks for attachments, and routes to the appropriate agent.
- Add issue.comment.created event subscription
- Add agents.read, agents.invoke, issue.comments.read capabilities
- CEO receives comment body + issue context in the invoke prompt
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>