mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 11:20:37 +09:00
Refine mention-triggered wake behavior and self-assign rules
Update agent skill to allow self-assign only on explicit @-mention handoff with PAPERCLIP_WAKE_COMMENT_ID. Enrich wake contextSnapshot with taskId, wakeCommentId, and wakeReason fields so agents can identify mention-triggered runs. Clarify api-reference exception for handoff-by-mention pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a4ba4a72cd
commit
a621b55e90
3 changed files with 33 additions and 9 deletions
|
|
@ -282,11 +282,18 @@ export function issueRoutes(db: Db, storage: StorageService) {
|
|||
heartbeat.wakeup(mentionedId, {
|
||||
source: "automation",
|
||||
triggerDetail: "system",
|
||||
reason: `Mentioned in comment on issue ${id}`,
|
||||
reason: "issue_comment_mentioned",
|
||||
payload: { issueId: id, commentId: comment!.id },
|
||||
requestedByActorType: actor.actorType,
|
||||
requestedByActorId: actor.actorId,
|
||||
contextSnapshot: { issueId: id, commentId: comment!.id, source: "comment.mention" },
|
||||
contextSnapshot: {
|
||||
issueId: id,
|
||||
taskId: id,
|
||||
commentId: comment!.id,
|
||||
wakeCommentId: comment!.id,
|
||||
wakeReason: "issue_comment_mentioned",
|
||||
source: "comment.mention",
|
||||
},
|
||||
}).catch((err) => logger.warn({ err, agentId: mentionedId }, "failed to wake mentioned agent"));
|
||||
}
|
||||
}).catch((err) => logger.warn({ err, issueId: id }, "failed to resolve @-mentions"));
|
||||
|
|
@ -504,11 +511,18 @@ export function issueRoutes(db: Db, storage: StorageService) {
|
|||
heartbeat.wakeup(mentionedId, {
|
||||
source: "automation",
|
||||
triggerDetail: "system",
|
||||
reason: `Mentioned in comment on issue ${id}`,
|
||||
reason: "issue_comment_mentioned",
|
||||
payload: { issueId: id, commentId: comment.id },
|
||||
requestedByActorType: actor.actorType,
|
||||
requestedByActorId: actor.actorId,
|
||||
contextSnapshot: { issueId: id, commentId: comment.id, source: "comment.mention" },
|
||||
contextSnapshot: {
|
||||
issueId: id,
|
||||
taskId: id,
|
||||
commentId: comment.id,
|
||||
wakeCommentId: comment.id,
|
||||
wakeReason: "issue_comment_mentioned",
|
||||
source: "comment.mention",
|
||||
},
|
||||
}).catch((err) => logger.warn({ err, agentId: mentionedId }, "failed to wake mentioned agent"));
|
||||
}
|
||||
}).catch((err) => logger.warn({ err, issueId: id }, "failed to resolve @-mentions"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue