fix(plugin): remove stale hook wiring for missing hooks

This commit is contained in:
YeonGyu-Kim 2026-02-21 02:40:00 +09:00
parent e6883a45e2
commit 414099534e
5 changed files with 0 additions and 18 deletions

View File

@ -130,7 +130,6 @@ export function createEventHandler(args: {
await Promise.resolve(hooks.ralphLoop?.event?.(input)) await Promise.resolve(hooks.ralphLoop?.event?.(input))
await Promise.resolve(hooks.stopContinuationGuard?.event?.(input)) await Promise.resolve(hooks.stopContinuationGuard?.event?.(input))
await Promise.resolve(hooks.compactionTodoPreserver?.event?.(input)) await Promise.resolve(hooks.compactionTodoPreserver?.event?.(input))
await Promise.resolve(hooks.writeExistingFileGuard?.event?.(input))
await Promise.resolve(hooks.atlasHook?.handler?.(input)) await Promise.resolve(hooks.atlasHook?.handler?.(input))
} }

View File

@ -15,7 +15,6 @@ import {
createInteractiveBashSessionHook, createInteractiveBashSessionHook,
createRalphLoopHook, createRalphLoopHook,
createEditErrorRecoveryHook, createEditErrorRecoveryHook,
createJsonErrorRecoveryHook,
createDelegateTaskRetryHook, createDelegateTaskRetryHook,
createTaskResumeInfoHook, createTaskResumeInfoHook,
createStartWorkHook, createStartWorkHook,
@ -51,7 +50,6 @@ export type SessionHooks = {
interactiveBashSession: ReturnType<typeof createInteractiveBashSessionHook> | null interactiveBashSession: ReturnType<typeof createInteractiveBashSessionHook> | null
ralphLoop: ReturnType<typeof createRalphLoopHook> | null ralphLoop: ReturnType<typeof createRalphLoopHook> | null
editErrorRecovery: ReturnType<typeof createEditErrorRecoveryHook> | null editErrorRecovery: ReturnType<typeof createEditErrorRecoveryHook> | null
jsonErrorRecovery: ReturnType<typeof createJsonErrorRecoveryHook> | null
delegateTaskRetry: ReturnType<typeof createDelegateTaskRetryHook> | null delegateTaskRetry: ReturnType<typeof createDelegateTaskRetryHook> | null
startWork: ReturnType<typeof createStartWorkHook> | null startWork: ReturnType<typeof createStartWorkHook> | null
prometheusMdOnly: ReturnType<typeof createPrometheusMdOnlyHook> | null prometheusMdOnly: ReturnType<typeof createPrometheusMdOnlyHook> | null
@ -212,10 +210,6 @@ export function createSessionHooks(args: {
? safeHook("edit-error-recovery", () => createEditErrorRecoveryHook(ctx)) ? safeHook("edit-error-recovery", () => createEditErrorRecoveryHook(ctx))
: null : null
const jsonErrorRecovery = isHookEnabled("json-error-recovery")
? safeHook("json-error-recovery", () => createJsonErrorRecoveryHook(ctx))
: null
const delegateTaskRetry = isHookEnabled("delegate-task-retry") const delegateTaskRetry = isHookEnabled("delegate-task-retry")
? safeHook("delegate-task-retry", () => createDelegateTaskRetryHook(ctx)) ? safeHook("delegate-task-retry", () => createDelegateTaskRetryHook(ctx))
: null : null
@ -268,7 +262,6 @@ export function createSessionHooks(args: {
interactiveBashSession, interactiveBashSession,
ralphLoop, ralphLoop,
editErrorRecovery, editErrorRecovery,
jsonErrorRecovery,
delegateTaskRetry, delegateTaskRetry,
startWork, startWork,
prometheusMdOnly, prometheusMdOnly,

View File

@ -12,7 +12,6 @@ import {
createTasksTodowriteDisablerHook, createTasksTodowriteDisablerHook,
createWriteExistingFileGuardHook, createWriteExistingFileGuardHook,
createHashlineReadEnhancerHook, createHashlineReadEnhancerHook,
createHashlineEditDiffEnhancerHook,
} from "../../hooks" } from "../../hooks"
import { import {
getOpenCodeVersion, getOpenCodeVersion,
@ -32,7 +31,6 @@ export type ToolGuardHooks = {
tasksTodowriteDisabler: ReturnType<typeof createTasksTodowriteDisablerHook> | null tasksTodowriteDisabler: ReturnType<typeof createTasksTodowriteDisablerHook> | null
writeExistingFileGuard: ReturnType<typeof createWriteExistingFileGuardHook> | null writeExistingFileGuard: ReturnType<typeof createWriteExistingFileGuardHook> | null
hashlineReadEnhancer: ReturnType<typeof createHashlineReadEnhancerHook> | null hashlineReadEnhancer: ReturnType<typeof createHashlineReadEnhancerHook> | null
hashlineEditDiffEnhancer: ReturnType<typeof createHashlineEditDiffEnhancerHook> | null
} }
export function createToolGuardHooks(args: { export function createToolGuardHooks(args: {
@ -101,10 +99,6 @@ export function createToolGuardHooks(args: {
? safeHook("hashline-read-enhancer", () => createHashlineReadEnhancerHook(ctx, { hashline_edit: { enabled: pluginConfig.hashline_edit ?? true } })) ? safeHook("hashline-read-enhancer", () => createHashlineReadEnhancerHook(ctx, { hashline_edit: { enabled: pluginConfig.hashline_edit ?? true } }))
: null : null
const hashlineEditDiffEnhancer = isHookEnabled("hashline-edit-diff-enhancer")
? safeHook("hashline-edit-diff-enhancer", () => createHashlineEditDiffEnhancerHook({ hashline_edit: { enabled: pluginConfig.hashline_edit ?? true } }))
: null
return { return {
commentChecker, commentChecker,
toolOutputTruncator, toolOutputTruncator,
@ -115,6 +109,5 @@ export function createToolGuardHooks(args: {
tasksTodowriteDisabler, tasksTodowriteDisabler,
writeExistingFileGuard, writeExistingFileGuard,
hashlineReadEnhancer, hashlineReadEnhancer,
hashlineEditDiffEnhancer,
} }
} }

View File

@ -40,11 +40,9 @@ export function createToolExecuteAfterHandler(args: {
await hooks.categorySkillReminder?.["tool.execute.after"]?.(input, output) await hooks.categorySkillReminder?.["tool.execute.after"]?.(input, output)
await hooks.interactiveBashSession?.["tool.execute.after"]?.(input, output) await hooks.interactiveBashSession?.["tool.execute.after"]?.(input, output)
await hooks.editErrorRecovery?.["tool.execute.after"]?.(input, output) await hooks.editErrorRecovery?.["tool.execute.after"]?.(input, output)
await hooks.jsonErrorRecovery?.["tool.execute.after"]?.(input, output)
await hooks.delegateTaskRetry?.["tool.execute.after"]?.(input, output) await hooks.delegateTaskRetry?.["tool.execute.after"]?.(input, output)
await hooks.atlasHook?.["tool.execute.after"]?.(input, output) await hooks.atlasHook?.["tool.execute.after"]?.(input, output)
await hooks.taskResumeInfo?.["tool.execute.after"]?.(input, output) await hooks.taskResumeInfo?.["tool.execute.after"]?.(input, output)
await hooks.hashlineReadEnhancer?.["tool.execute.after"]?.(input, output) await hooks.hashlineReadEnhancer?.["tool.execute.after"]?.(input, output)
await hooks.hashlineEditDiffEnhancer?.["tool.execute.after"]?.(input, output)
} }
} }

View File

@ -29,7 +29,6 @@ export function createToolExecuteBeforeHandler(args: {
await hooks.prometheusMdOnly?.["tool.execute.before"]?.(input, output) await hooks.prometheusMdOnly?.["tool.execute.before"]?.(input, output)
await hooks.sisyphusJuniorNotepad?.["tool.execute.before"]?.(input, output) await hooks.sisyphusJuniorNotepad?.["tool.execute.before"]?.(input, output)
await hooks.atlasHook?.["tool.execute.before"]?.(input, output) await hooks.atlasHook?.["tool.execute.before"]?.(input, output)
await hooks.hashlineEditDiffEnhancer?.["tool.execute.before"]?.(input, output)
if (input.tool === "task") { if (input.tool === "task") {
const argsObject = output.args const argsObject = output.args
const category = typeof argsObject.category === "string" ? argsObject.category : undefined const category = typeof argsObject.category === "string" ? argsObject.category : undefined