diff --git a/src/hooks/index.ts b/src/hooks/index.ts index fe298303..db656017 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -49,4 +49,5 @@ export { createRuntimeFallbackHook, type RuntimeFallbackHook, type RuntimeFallba export { createWriteExistingFileGuardHook } from "./write-existing-file-guard"; export { createHashlineReadEnhancerHook } from "./hashline-read-enhancer"; export { createBeastModeSystemHook, BEAST_MODE_SYSTEM_PROMPT } from "./beast-mode-system"; -export { createHashlineEditDiffEnhancerHook } from "./hashline-edit-diff-enhancer"; +export { createHashlineEditDiffEnhancerHook } from "./hashline-edit-diff-enhancer" +export { createJsonErrorRecoveryHook, JSON_ERROR_TOOL_EXCLUDE_LIST, JSON_ERROR_PATTERNS, JSON_ERROR_REMINDER } from "./json-error-recovery"; diff --git a/src/plugin/event.ts b/src/plugin/event.ts index 20657ea9..248f207a 100644 --- a/src/plugin/event.ts +++ b/src/plugin/event.ts @@ -110,9 +110,7 @@ export function createEventHandler(args: { const lastHandledRetryStatusKey = new Map() const lastKnownModelBySession = new Map() - const dispatchToHooks = async (input: { event: { type: string; properties?: Record } }): Promise => { - -const dispatchToHooks = async (input: EventInput): Promise => { + const dispatchToHooks = async (input: EventInput): Promise => { await Promise.resolve(hooks.autoUpdateChecker?.event?.(input)) await Promise.resolve(hooks.claudeCodeHooks?.event?.(input)) await Promise.resolve(hooks.backgroundNotificationHook?.event?.(input))