MCPcopy
hub / github.com/codeaashu/claude-code / createIdleNotification

Function createIdleNotification

src/utils/teammateMailbox.ts:410–430  ·  view source on GitHub ↗
(
  agentId: string,
  options?: {
    idleReason?: IdleNotificationMessage['idleReason']
    summary?: string
    completedTaskId?: string
    completedStatus?: 'resolved' | 'blocked' | 'failed'
    failureReason?: string
  },
)

Source from the content-addressed store, hash-verified

408 * Creates an idle notification message to send to the team leader
409 */
410export function createIdleNotification(
411 agentId: string,
412 options?: {
413 idleReason?: IdleNotificationMessage['idleReason']
414 summary?: string
415 completedTaskId?: string
416 completedStatus?: 'resolved' | 'blocked' | 'failed'
417 failureReason?: string
418 },
419): IdleNotificationMessage {
420 return {
421 type: 'idle_notification',
422 from: agentId,
423 timestamp: new Date().toISOString(),
424 idleReason: options?.idleReason,
425 summary: options?.summary,
426 completedTaskId: options?.completedTaskId,
427 completedStatus: options?.completedStatus,
428 failureReason: options?.failureReason,
429 }
430}
431
432/**
433 * Checks if a message text contains an idle notification

Callers 2

initializeTeammateHooksFunction · 0.85
sendIdleNotificationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected