MCPcopy Create free account
hub / github.com/Noumena-Network/code / createStopHookSummaryMessage

Function createStopHookSummaryMessage

src/utils/messages.ts:4498–4526  ·  view source on GitHub ↗
(
  hookCount: number,
  hookInfos: StopHookInfo[],
  hookErrors: string[],
  preventedContinuation: boolean,
  stopReason: string | undefined,
  hasOutput: boolean,
  level: SystemMessageLevel,
  toolUseID?: string,
  hookLabel?: string,
  totalDurationMs?: number,
)

Source from the content-addressed store, hash-verified

4496}
4497
4498export function createStopHookSummaryMessage(
4499 hookCount: number,
4500 hookInfos: StopHookInfo[],
4501 hookErrors: string[],
4502 preventedContinuation: boolean,
4503 stopReason: string | undefined,
4504 hasOutput: boolean,
4505 level: SystemMessageLevel,
4506 toolUseID?: string,
4507 hookLabel?: string,
4508 totalDurationMs?: number,
4509): SystemStopHookSummaryMessage {
4510 return {
4511 type: 'system',
4512 subtype: 'stop_hook_summary',
4513 hookCount,
4514 hookInfos,
4515 hookErrors,
4516 preventedContinuation,
4517 stopReason,
4518 hasOutput,
4519 level,
4520 timestamp: new Date().toISOString(),
4521 uuid: randomUUID(),
4522 toolUseID,
4523 hookLabel,
4524 totalDurationMs,
4525 }
4526}
4527
4528export function createTurnDurationMessage(
4529 durationMs: number,

Callers 2

handleStopHooksFunction · 0.85

Calls 1

randomUUIDFunction · 0.90

Tested by

no test coverage detected