import { z } from "zod"; import type { PlcReadResult, PlcStateResult, PlcWriteModeResult, TwinCatAdsRuntime } from "twincat-mcp-core"; import type { ExtensionRuntimeConfig } from "../config.js"; declare const emptyInputSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>; declare const toolCallInputSchema: z.ZodObject<{ toolName: z.ZodString; arguments: z.ZodOptional; }, "strict", z.ZodTypeAny, { toolName: string; arguments?: unknown; }, { toolName: string; arguments?: unknown; }>; export interface HookHandlerContext { readonly runtime: TwinCatAdsRuntime; readonly config: ExtensionRuntimeConfig; } export interface HookSuccessResult { readonly ok: true; readonly data: TOutput; } export interface HookFailureResult { readonly ok: false; readonly error: { readonly message: string; readonly code: "HOOK_INPUT_INVALID" | "HOOK_EXECUTION_FAILED"; }; } export type HookExecutionResult = HookSuccessResult | HookFailureResult; export interface HookDefinition { readonly name: string; readonly description: string; readonly inputSchema: z.ZodType; execute(rawInput: unknown, context: HookHandlerContext): Promise>; } export interface SessionStartHookOutput { readonly connected: true; readonly state: PlcStateResult; readonly snapshotCount: number; readonly failedSnapshots: string[]; } export interface AgentStartHookOutput { readonly summary: { readonly state: PlcStateResult; readonly snapshots: PlcReadResult[]; readonly failedSnapshots: string[]; readonly watches: ReturnType; }; } export interface ContextHookOutput { readonly context: { readonly snapshots: PlcReadResult[]; readonly failedSnapshots: string[]; readonly watchCount: number; readonly writeMode: PlcWriteModeResult; }; } export interface ToolCallHookOutput { readonly allow: boolean; readonly requiresConfirmation: boolean; readonly reason?: string; readonly writeMode: PlcWriteModeResult; } export interface SessionEndHookOutput { readonly disconnected: true; } export declare function createHookDefinitions(): HookDefinition[]; export { emptyInputSchema, toolCallInputSchema };