MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / emitTaskTerminatedSdk

Function emitTaskTerminatedSdk

source code/utils/sdkEventQueue.ts:116–136  ·  view source on GitHub ↗
(
  taskId: string,
  status: 'completed' | 'failed' | 'stopped',
  opts?: {
    toolUseId?: string
    summary?: string
    outputFile?: string
    usage?: { total_tokens: number; tool_uses: number; duration_ms: number }
  },
)

Source from the content-addressed store, hash-verified

114 * (Scuttle's bg-task dot, VS Code subagent panel) see the task close.
115 */
116export function emitTaskTerminatedSdk(
117 taskId: string,
118 status: 'completed' | 'failed' | 'stopped',
119 opts?: {
120 toolUseId?: string
121 summary?: string
122 outputFile?: string
123 usage?: { total_tokens: number; tool_uses: number; duration_ms: number }
124 },
125): void {
126 enqueueSdkEvent({
127 type: 'system',
128 subtype: 'task_notification',
129 task_id: taskId,
130 tool_use_id: opts?.toolUseId,
131 status,
132 output_file: opts?.outputFile ?? '',
133 summary: opts?.summary ?? '',
134 usage: opts?.usage,
135 })
136}

Callers 7

killInProcessTeammateFunction · 0.85
runInProcessTeammateFunction · 0.85
stopTaskFunction · 0.85
completeMainSessionTaskFunction · 0.85
startBackgroundSessionFunction · 0.85
killFunction · 0.85
CancelRequestHandlerFunction · 0.85

Calls 1

enqueueSdkEventFunction · 0.85

Tested by

no test coverage detected