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>
2026-05-16 17:16:28 +00:00
3 changed files with 127 additions and 5 deletions
prompt:`תיק ${caseNumber} נכשל בבדיקת QA. עיין בתוצאות QA ותקן את הבעיות לפני שתמשיך.`,
reason:"qa_failed webhook",
});
pluginCtx.logger.info(`Invoked CEO agent for qa_failed`,{
caseNumber,
ceoId,
runId,
});
}catch(err){
pluginCtx.logger.error("Failed to invoke CEO agent for qa_failed",{
caseNumber,
error: String(err),
});
}
}else{
pluginCtx.logger.warn("onWebhook: no CEO agent mapped for company",{
companyId,
});
}
}
},
});
exportdefaultplugin;
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.