/** * PermissionDenied hook event. * * Fires when Claude Code's auto-mode classifier denies a tool call. The * denial has already happened; a handler can set `retry: true` to tell * the model it may try again (possibly with different input). Supports * a matcher on `tool_name`. * See https://code.claude.com/docs/en/hooks#permissiondenied. * * @since 0.1.0 */ import * as Effect from 'effect/Effect'; import * as Schema from 'effect/Schema'; import type { HookContext } from '../Context.js'; import type { HookDefinition } from '../Runner.js'; declare const Input_base: Schema.Class; readonly tool_name: Schema.String; readonly tool_input: Schema.$Record; readonly tool_use_id: Schema.optional; readonly reason: Schema.String; readonly session_id: Schema.String; readonly transcript_path: Schema.String; readonly cwd: Schema.String; readonly permission_mode: Schema.optionalKey; readonly effort: Schema.optionalKey; readonly agent_id: Schema.optionalKey; readonly agent_type: Schema.optionalKey; }>, {}>; export declare class Input extends Input_base { } declare const HookSpecificOutput_base: Schema.Class; readonly retry: Schema.optional; }>, {}>; export declare class HookSpecificOutput extends HookSpecificOutput_base { } declare const Output_base: Schema.Class; readonly stopReason: Schema.optional; readonly suppressOutput: Schema.optional; readonly systemMessage: Schema.optional; readonly terminalSequence: Schema.optional; readonly hookSpecificOutput: Schema.optional; }>, {}>; export declare class Output extends Output_base { } /** * Acknowledge the denial without allowing a retry. * * @category Decisions * @since 0.1.0 */ export declare const accept: () => Output; /** * No-op output — the denial stands and the model is not instructed to retry. * * @category Decisions * @since 0.1.0 */ export declare const passthrough: () => Output; /** * Tell the model it may retry the denied call, typically with adjusted * input. * * @category Decisions * @since 0.1.0 */ export declare const retry: () => Output; export declare const define: (config: { readonly handler: (input: Input) => Effect.Effect; }) => HookDefinition; /** * Build a PermissionDenied hook that only handles matching `tool_name` values. * * @category Constructors * @since 0.1.0 */ export declare const onMatcher: (config: { readonly matcher: string | RegExp; readonly handler: (input: Input) => Effect.Effect; readonly onMismatch?: (input: Input) => Effect.Effect; }) => HookDefinition; export {}; //# sourceMappingURL=PermissionDenied.d.ts.map