Distinguish top-level review wakes from subtask completion

Top-level tasks submitted to in_review fired the same
subtask_completed wake as the subtree leaves, so the reviewer's
prompt framed the work as "a subtask you delegated". Add a dedicated
task_review_requested wake reason with a reviewer-specific title and
step list, and route the parent-less branch of the task PATCH handler
through it.
This commit is contained in:
ZacharyZhang-NY committed 2026-04-19 19:26:05 -04:00
1 parent 8bf480236f
commit 2e60ecc0e0
4 files changed
+21 -3

No files matched your search

+1 -1
View File
@@ -49,5 +49,5 @@ export const heartbeatSettingsSchema = z.object({
export const triggerHeartbeatSchema = z.object({
agentId: z.string().uuid(),
companyId: z.string().uuid(),
trigger: z.enum(["manual", "timer", "assignment", "goal_activated", "approval_resolved", "subtask_completed", "comment", "report_blocked", "report_failed", "recovery", "message", "peer_request", "task_continuation"]).default("manual"),
trigger: z.enum(["manual", "timer", "assignment", "goal_activated", "approval_resolved", "subtask_completed", "task_review_requested", "comment", "report_blocked", "report_failed", "recovery", "message", "peer_request", "task_continuation"]).default("manual"),
});