feat(hooks): surface fsync-skip warnings to AI agent via tool output

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-08 15:08:34 +09:00
parent 6b69505940
commit 43b0529557
9 changed files with 300 additions and 2 deletions
@@ -18,6 +18,7 @@ import {
createTodoDescriptionOverrideHook,
createWebFetchRedirectGuardHook,
createTeamToolGating,
createFsyncSkipWarningHook,
} from "../../hooks"
import {
getOpenCodeVersion,
@@ -42,6 +43,7 @@ export type ToolGuardHooks = {
readImageResizer: ReturnType<typeof createReadImageResizerHook> | null
todoDescriptionOverride: ReturnType<typeof createTodoDescriptionOverrideHook> | null
webfetchRedirectGuard: ReturnType<typeof createWebFetchRedirectGuardHook> | null
fsyncSkipWarning: ReturnType<typeof createFsyncSkipWarningHook> | null
teamToolGating: ReturnType<typeof createTeamToolGating> | null
}
@@ -139,6 +141,10 @@ export function createToolGuardHooks(args: {
? safeHook("team-tool-gating", () => createTeamToolGating(ctx, pluginConfig.team_mode))
: null
const fsyncSkipWarning = isHookEnabled("fsync-skip-warning")
? safeHook("fsync-skip-warning", () => createFsyncSkipWarningHook())
: null
return {
commentChecker,
toolOutputTruncator,
@@ -154,6 +160,7 @@ export function createToolGuardHooks(args: {
readImageResizer,
todoDescriptionOverride,
webfetchRedirectGuard,
fsyncSkipWarning,
teamToolGating,
}
}
+1
View File
@@ -153,6 +153,7 @@ export function createToolExecuteAfterHandler(args: {
await hooks.readImageResizer?.["tool.execute.after"]?.(hookInput, output)
await hooks.hashlineReadEnhancer?.["tool.execute.after"]?.(hookInput, output)
await hooks.webfetchRedirectGuard?.["tool.execute.after"]?.(hookInput, output)
await hooks.fsyncSkipWarning?.["tool.execute.after"]?.(hookInput, output)
await hooks.jsonErrorRecovery?.["tool.execute.after"]?.(hookInput, output)
}
+3 -2
View File
@@ -72,8 +72,9 @@ export function createToolExecuteBeforeHandler(args: {
await hooks.directoryReadmeInjector?.["tool.execute.before"]?.(input, output)
await hooks.rulesInjector?.["tool.execute.before"]?.(input, output)
await hooks.tasksTodowriteDisabler?.["tool.execute.before"]?.(input, output)
await hooks.webfetchRedirectGuard?.["tool.execute.before"]?.(input, output)
await hooks.prometheusMdOnly?.["tool.execute.before"]?.(input, output)
await hooks.webfetchRedirectGuard?.["tool.execute.before"]?.(input, output)
await hooks.fsyncSkipWarning?.["tool.execute.before"]?.(input, output)
await hooks.prometheusMdOnly?.["tool.execute.before"]?.(input, output)
await hooks.sisyphusJuniorNotepad?.["tool.execute.before"]?.(input, output)
await hooks.atlasHook?.["tool.execute.before"]?.(input, output)
await hooks.teamToolGating?.["tool.execute.before"]?.(input, output)