Skip to content
Français

ClaudeHookDecisions

import type { ClaudeHookDecisions } from "@elie-laloum/outpost/core";
  • SessionStartRequired
    string | { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "SessionStart"; readonly additionalContext?: string; readonly initialUserMessage?: string; readonly sessionTitle?: string; readonly watchPaths?: readonly string[]; readonly reloadSkills?: boolean; }; readonly terminalSequence?: string; }
    Accepted native output for SessionStart; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • SetupRequired
    { readonly terminalSequence?: string; }
    Accepted native output for Setup; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • UserPromptSubmitRequired
    string | { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly decision?: "block"; readonly reason?: string; readonly hookSpecificOutput?: { readonly hookEventName: "UserPromptSubmit"; readonly additionalContext?: string; }; readonly terminalSequence?: string; }
    Accepted native output for UserPromptSubmit; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • UserPromptExpansionRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly decision?: "block"; readonly reason?: string; readonly hookSpecificOutput?: { readonly hookEventName: "UserPromptExpansion"; readonly additionalContext?: string; }; readonly terminalSequence?: string; }
    Accepted native output for UserPromptExpansion; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • PreToolUseRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "PreToolUse"; readonly permissionDecision?: "allow" | "deny" | "ask" | "defer"; readonly permissionDecisionReason?: string; readonly updatedInput?: Readonly<Record<string, unknown>>; readonly additionalContext?: string; }; readonly terminalSequence?: string; }
    Accepted native output for PreToolUse; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • PermissionRequestRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "PermissionRequest"; readonly decision?: { readonly behavior: "allow" | "deny"; readonly updatedInput?: Readonly<Record<string, unknown>>; readonly updatedPermissions?: readonly unknown[]; readonly message?: string; readonly interrupt?: boolean; }; }; readonly terminalSequence?: string; }
    Accepted native output for PermissionRequest; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • PermissionDeniedRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "PermissionDenied"; readonly retry?: boolean; }; readonly terminalSequence?: string; }
    Accepted native output for PermissionDenied; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • PostToolUseRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly decision?: "block"; readonly reason?: string; readonly hookSpecificOutput?: { readonly hookEventName: "PostToolUse"; readonly additionalContext?: string; readonly classifierContext?: string; readonly updatedToolOutput?: unknown; readonly updatedMCPToolOutput?: unknown; }; readonly terminalSequence?: string; }
    Accepted native output for PostToolUse; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • PostToolUseFailureRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "PostToolUseFailure"; readonly additionalContext?: string; }; readonly terminalSequence?: string; }
    Accepted native output for PostToolUseFailure; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • PostToolBatchRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly decision?: "block"; readonly reason?: string; readonly hookSpecificOutput?: { readonly hookEventName: "PostToolBatch"; readonly additionalContext?: string; }; readonly terminalSequence?: string; }
    Accepted native output for PostToolBatch; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • NotificationRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "Notification"; readonly additionalContext?: string; }; readonly terminalSequence?: string; }
    Accepted native output for Notification; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • MessageDisplayRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "MessageDisplay"; readonly displayContent?: string; }; readonly terminalSequence?: string; }
    Accepted native output for MessageDisplay; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • SubagentStartRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "SubagentStart"; readonly additionalContext?: string; }; readonly terminalSequence?: string; }
    Accepted native output for SubagentStart; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • SubagentStopRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly decision?: "block"; readonly reason?: string; readonly hookSpecificOutput?: { readonly hookEventName: "SubagentStop"; readonly additionalContext?: string; }; readonly terminalSequence?: string; }
    Accepted native output for SubagentStop; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • TaskCreatedRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly decision?: "block"; readonly reason?: string; readonly terminalSequence?: string; }
    Accepted native output for TaskCreated; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • TaskCompletedRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly terminalSequence?: string; }
    Accepted native output for TaskCompleted; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • StopRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly decision?: "block"; readonly reason?: string; readonly hookSpecificOutput?: { readonly hookEventName: "Stop"; readonly additionalContext?: string; }; readonly terminalSequence?: string; }
    Accepted native output for Stop; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • StopFailureRequired
    { readonly terminalSequence?: string; }
    Accepted native output for StopFailure; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • TeammateIdleRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly terminalSequence?: string; }
    Accepted native output for TeammateIdle; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • InstructionsLoadedRequired
    { readonly terminalSequence?: string; }
    Accepted native output for InstructionsLoaded; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • ConfigChangeRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly decision?: "block"; readonly reason?: string; readonly terminalSequence?: string; }
    Accepted native output for ConfigChange; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • CwdChangedRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "CwdChanged"; readonly watchPaths?: readonly string[]; }; readonly terminalSequence?: string; }
    Accepted native output for CwdChanged; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • DirectoryAddedRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly terminalSequence?: string; }
    Accepted native output for DirectoryAdded; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • FileChangedRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "FileChanged"; readonly watchPaths?: readonly string[]; }; readonly terminalSequence?: string; }
    Accepted native output for FileChanged; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • WorktreeCreateRequired
    string
    Accepted native output for WorktreeCreate; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • WorktreeRemoveRequired
    { readonly terminalSequence?: string; }
    Accepted native output for WorktreeRemove; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • PreCompactRequired
    { readonly decision?: "block"; readonly reason?: string; readonly terminalSequence?: string; }
    Accepted native output for PreCompact; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • PostCompactRequired
    { readonly terminalSequence?: string; }
    Accepted native output for PostCompact; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • PreModelSwitchRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly decision?: "block"; readonly reason?: string; readonly hookSpecificOutput?: { readonly hookEventName: "PreModelSwitch"; readonly permissionDecision?: "allow" | "deny" | "ask"; readonly permissionDecisionReason?: string; }; readonly terminalSequence?: string; }
    Accepted native output for PreModelSwitch; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • PostModelSwitchRequired
    string | { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "PostModelSwitch"; readonly additionalContext?: string; }; readonly terminalSequence?: string; }
    Accepted native output for PostModelSwitch; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • ElicitationRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "Elicitation"; readonly action?: "accept" | "decline" | "cancel"; readonly content?: Readonly<Record<string, unknown>>; }; readonly decision?: "block"; readonly terminalSequence?: string; }
    Accepted native output for Elicitation; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • ElicitationResultRequired
    { readonly continue?: boolean; readonly stopReason?: string; readonly suppressOutput?: boolean; readonly systemMessage?: string; readonly hookSpecificOutput?: { readonly hookEventName: "ElicitationResult"; readonly action?: "accept" | "decline" | "cancel"; readonly content?: Readonly<Record<string, unknown>>; }; readonly decision?: "block"; readonly terminalSequence?: string; }
    Accepted native output for ElicitationResult; never means this event accepts no callback decision. Returning nothing preserves the native flow.
  • SessionEndRequired
    { readonly terminalSequence?: string; }
    Accepted native output for SessionEnd; never means this event accepts no callback decision. Returning nothing preserves the native flow.
export interface ClaudeHookDecisions {
  readonly SessionStart:
    | string
    | {
        readonly continue?: boolean;
        readonly stopReason?: string;
        readonly suppressOutput?: boolean;
        readonly systemMessage?: string;
        readonly hookSpecificOutput?: {
          readonly hookEventName: "SessionStart";
          readonly additionalContext?: string;
          readonly initialUserMessage?: string;
          readonly sessionTitle?: string;
          readonly watchPaths?: readonly string[];
          readonly reloadSkills?: boolean;
        };
        readonly terminalSequence?: string;
      };
  readonly Setup: {
    readonly terminalSequence?: string;
  };
  readonly UserPromptSubmit:
    | string
    | {
        readonly continue?: boolean;
        readonly stopReason?: string;
        readonly suppressOutput?: boolean;
        readonly systemMessage?: string;
        readonly decision?: "block";
        readonly reason?: string;
        readonly hookSpecificOutput?: {
          readonly hookEventName: "UserPromptSubmit";
          readonly additionalContext?: string;
        };
        readonly terminalSequence?: string;
      };
  readonly UserPromptExpansion: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly decision?: "block";
    readonly reason?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "UserPromptExpansion";
      readonly additionalContext?: string;
    };
    readonly terminalSequence?: string;
  };
  readonly PreToolUse: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "PreToolUse";
      readonly permissionDecision?: "allow" | "deny" | "ask" | "defer";
      readonly permissionDecisionReason?: string;
      readonly updatedInput?: Readonly<Record<string, unknown>>;
      readonly additionalContext?: string;
    };
    readonly terminalSequence?: string;
  };
  readonly PermissionRequest: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "PermissionRequest";
      readonly decision?: {
        readonly behavior: "allow" | "deny";
        readonly updatedInput?: Readonly<Record<string, unknown>>;
        readonly updatedPermissions?: readonly unknown[];
        readonly message?: string;
        readonly interrupt?: boolean;
      };
    };
    readonly terminalSequence?: string;
  };
  readonly PermissionDenied: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "PermissionDenied";
      readonly retry?: boolean;
    };
    readonly terminalSequence?: string;
  };
  readonly PostToolUse: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly decision?: "block";
    readonly reason?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "PostToolUse";
      readonly additionalContext?: string;
      readonly classifierContext?: string;
      readonly updatedToolOutput?: unknown;
      readonly updatedMCPToolOutput?: unknown;
    };
    readonly terminalSequence?: string;
  };
  readonly PostToolUseFailure: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "PostToolUseFailure";
      readonly additionalContext?: string;
    };
    readonly terminalSequence?: string;
  };
  readonly PostToolBatch: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly decision?: "block";
    readonly reason?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "PostToolBatch";
      readonly additionalContext?: string;
    };
    readonly terminalSequence?: string;
  };
  readonly Notification: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "Notification";
      readonly additionalContext?: string;
    };
    readonly terminalSequence?: string;
  };
  readonly MessageDisplay: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "MessageDisplay";
      readonly displayContent?: string;
    };
    readonly terminalSequence?: string;
  };
  readonly SubagentStart: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "SubagentStart";
      readonly additionalContext?: string;
    };
    readonly terminalSequence?: string;
  };
  readonly SubagentStop: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly decision?: "block";
    readonly reason?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "SubagentStop";
      readonly additionalContext?: string;
    };
    readonly terminalSequence?: string;
  };
  readonly TaskCreated: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly decision?: "block";
    readonly reason?: string;
    readonly terminalSequence?: string;
  };
  readonly TaskCompleted: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly terminalSequence?: string;
  };
  readonly Stop: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly decision?: "block";
    readonly reason?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "Stop";
      readonly additionalContext?: string;
    };
    readonly terminalSequence?: string;
  };
  readonly StopFailure: {
    readonly terminalSequence?: string;
  };
  readonly TeammateIdle: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly terminalSequence?: string;
  };
  readonly InstructionsLoaded: {
    readonly terminalSequence?: string;
  };
  readonly ConfigChange: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly decision?: "block";
    readonly reason?: string;
    readonly terminalSequence?: string;
  };
  readonly CwdChanged: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "CwdChanged";
      readonly watchPaths?: readonly string[];
    };
    readonly terminalSequence?: string;
  };
  readonly DirectoryAdded: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly terminalSequence?: string;
  };
  readonly FileChanged: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "FileChanged";
      readonly watchPaths?: readonly string[];
    };
    readonly terminalSequence?: string;
  };
  readonly WorktreeCreate: string;
  readonly WorktreeRemove: {
    readonly terminalSequence?: string;
  };
  readonly PreCompact: {
    readonly decision?: "block";
    readonly reason?: string;
    readonly terminalSequence?: string;
  };
  readonly PostCompact: {
    readonly terminalSequence?: string;
  };
  readonly PreModelSwitch: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly decision?: "block";
    readonly reason?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "PreModelSwitch";
      readonly permissionDecision?: "allow" | "deny" | "ask";
      readonly permissionDecisionReason?: string;
    };
    readonly terminalSequence?: string;
  };
  readonly PostModelSwitch:
    | string
    | {
        readonly continue?: boolean;
        readonly stopReason?: string;
        readonly suppressOutput?: boolean;
        readonly systemMessage?: string;
        readonly hookSpecificOutput?: {
          readonly hookEventName: "PostModelSwitch";
          readonly additionalContext?: string;
        };
        readonly terminalSequence?: string;
      };
  readonly Elicitation: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "Elicitation";
      readonly action?: "accept" | "decline" | "cancel";
      readonly content?: Readonly<Record<string, unknown>>;
    };
    readonly decision?: "block";
    readonly terminalSequence?: string;
  };
  readonly ElicitationResult: {
    readonly continue?: boolean;
    readonly stopReason?: string;
    readonly suppressOutput?: boolean;
    readonly systemMessage?: string;
    readonly hookSpecificOutput?: {
      readonly hookEventName: "ElicitationResult";
      readonly action?: "accept" | "decline" | "cancel";
      readonly content?: Readonly<Record<string, unknown>>;
    };
    readonly decision?: "block";
    readonly terminalSequence?: string;
  };
  readonly SessionEnd: {
    readonly terminalSequence?: string;
  };
}