MCPcopy Index your code
hub / github.com/codeaashu/claude-code / registerStructuredOutputEnforcement

Function registerStructuredOutputEnforcement

src/utils/hooks/hookHelpers.ts:70–83  ·  view source on GitHub ↗
(
  setAppState: SetAppState,
  sessionId: string,
)

Source from the content-addressed store, hash-verified

68 * Used by ask.tsx, execAgentHook.ts, and background verification.
69 */
70export function registerStructuredOutputEnforcement(
71 setAppState: SetAppState,
72 sessionId: string,
73): void {
74 addFunctionHook(
75 setAppState,
76 sessionId,
77 'Stop',
78 '', // No matcher - applies to all stops
79 messages => hasSuccessfulToolCall(messages, SYNTHETIC_OUTPUT_TOOL_NAME),
80 `You MUST call the ${SYNTHETIC_OUTPUT_TOOL_NAME} tool to complete this request. Call this tool now.`,
81 { timeout: 5000 },
82 )
83}
84

Callers 2

submitMessageMethod · 0.85
execAgentHookFunction · 0.85

Calls 2

addFunctionHookFunction · 0.85
hasSuccessfulToolCallFunction · 0.85

Tested by

no test coverage detected