Files
oh-my-opencode/dist/hooks/rules-injector/hook.d.ts
T
2026-03-14 04:56:50 +00:00

29 lines
796 B
TypeScript

import type { PluginInput } from "@opencode-ai/plugin";
interface ToolExecuteInput {
tool: string;
sessionID: string;
callID: string;
}
interface ToolExecuteOutput {
title: string;
output: string;
metadata: unknown;
}
interface ToolExecuteBeforeOutput {
args: unknown;
}
interface EventInput {
event: {
type: string;
properties?: unknown;
};
}
export declare function createRulesInjectorHook(ctx: PluginInput, modelCacheState?: {
anthropicContext1MEnabled: boolean;
}): {
"tool.execute.before": (input: ToolExecuteInput, output: ToolExecuteBeforeOutput) => Promise<void>;
"tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
event: ({ event }: EventInput) => Promise<void>;
};
export {};