/** * Hooks Module for Oh-My-ClaudeCode * * This module provides the TypeScript bridge for Claude Code's native shell hook system. * Shell scripts call these TypeScript functions for complex logic processing. * * Architecture: * - Claude Code runs shell scripts on hook events (UserPromptSubmit, Stop, etc.) * - Shell scripts invoke Node.js bridge for complex processing * - Bridge returns JSON response that shell passes back to Claude Code */ export { detectKeywordsWithType, extractPromptText, removeCodeBlocks, type DetectedKeyword, type KeywordType } from './keyword-detector/index.js'; export { createRalphLoopHook, readRalphState, writeRalphState, clearRalphState, clearLinkedUltraworkState, incrementRalphIteration, isUltraQAActive, hasPrd, getPrdCompletionStatus, getRalphContext, setCurrentStory, enablePrdMode, recordStoryProgress, recordPattern, shouldCompleteByPrd, readPrd, writePrd, findPrdPath, getPrdPath, getOmcPrdPath, getPrdStatus, markStoryComplete, markStoryIncomplete, getStory, getNextStory, createPrd, createSimplePrd, initPrd, formatPrdStatus, formatStory, formatPrd, formatNextStoryPrompt, PRD_FILENAME, PRD_EXAMPLE_FILENAME, readProgress, readProgressRaw, parseProgress, findProgressPath, getProgressPath, getOmcProgressPath, initProgress, appendProgress, addPattern, getPatterns, getRecentLearnings, formatPatternsForContext, formatProgressForContext, formatLearningsForContext, getProgressContext, PROGRESS_FILENAME, PATTERNS_HEADER, ENTRY_SEPARATOR, readVerificationState, writeVerificationState, clearVerificationState, startVerification, recordArchitectFeedback, getArchitectVerificationPrompt, getArchitectRejectionContinuationPrompt, detectArchitectApproval, detectArchitectRejection, type RalphLoopState, type RalphLoopOptions, type RalphLoopHook, type PRD, type PRDStatus, type UserStory, type UserStoryInput, type ProgressEntry, type CodebasePattern, type ProgressLog, type VerificationState } from './ralph/index.js'; export { createTodoContinuationHook, checkIncompleteTodos, type TodoContinuationHook } from './todo-continuation/index.js'; export { processHook, type HookInput, type HookOutput } from './bridge.js'; export { createThinkModeHook, detectThinkKeyword, detectUltrathinkKeyword, extractPromptText as extractThinkPromptText, removeCodeBlocks as removeThinkCodeBlocks, getHighVariant, isAlreadyHighVariant, getThinkingConfig, getClaudeThinkingConfig, clearThinkModeState, getThinkModeState, isThinkModeActive, processThinkMode, shouldActivateThinkMode, shouldActivateUltrathink, THINKING_CONFIGS, type ThinkModeState, type ModelRef, type MessageWithModel, type ThinkModeInput, type ClaudeThinkingConfig, type ThinkingConfig } from './think-mode/index.js'; export { createRulesInjectorHook, getRulesForPath, findProjectRoot, findRuleFiles, parseRuleFrontmatter, shouldApplyRule, createContentHash, isDuplicateByRealPath, isDuplicateByContentHash, loadInjectedRules, saveInjectedRules, clearInjectedRules, RULES_INJECTOR_STORAGE, PROJECT_MARKERS, PROJECT_RULE_SUBDIRS, PROJECT_RULE_FILES, USER_RULE_DIR, RULE_EXTENSIONS, TRACKED_TOOLS, type RuleMetadata, type RuleInfo, type RuleFileCandidate, type InjectedRulesData, type RuleToInject, type MatchResult, type RuleFrontmatterResult } from './rules-injector/index.js'; export { createOmcOrchestratorHook, isAllowedPath, isWriteEditTool, getGitDiffStats, formatFileChanges, buildVerificationReminder, buildOrchestratorReminder, buildBoulderContinuation, checkBoulderContinuation, processOrchestratorPreTool, processOrchestratorPostTool, HOOK_NAME as OMC_ORCHESTRATOR_HOOK_NAME, ALLOWED_PATH_PREFIX, WRITE_EDIT_TOOLS, DIRECT_WORK_REMINDER, ORCHESTRATOR_DELEGATION_REQUIRED, BOULDER_CONTINUATION_PROMPT, VERIFICATION_REMINDER, SINGLE_TASK_DIRECTIVE, type ToolExecuteInput as OrchestratorToolInput, type ToolExecuteOutput as OrchestratorToolOutput } from './omc-orchestrator/index.js'; export { createAutoSlashCommandHook, processSlashCommand, detectSlashCommand, extractPromptText as extractSlashPromptText, parseSlashCommand, removeCodeBlocks as removeSlashCodeBlocks, isExcludedCommand, executeSlashCommand, findCommand, discoverAllCommands, listAvailableCommands, HOOK_NAME as AUTO_SLASH_COMMAND_HOOK_NAME, AUTO_SLASH_COMMAND_TAG_OPEN, AUTO_SLASH_COMMAND_TAG_CLOSE, SLASH_COMMAND_PATTERN, EXCLUDED_COMMANDS, type AutoSlashCommandHookInput, type AutoSlashCommandHookOutput, type ParsedSlashCommand, type AutoSlashCommandResult, type CommandInfo, type CommandMetadata, type CommandScope, type ExecuteResult } from './auto-slash-command/index.js'; export { createCommentCheckerHook, checkForComments, applyFilters as applyCommentFilters, BDD_KEYWORDS, TYPE_CHECKER_PREFIXES, HOOK_MESSAGE_HEADER as COMMENT_CHECKER_MESSAGE_HEADER, LINE_COMMENT_PATTERNS, EXTENSION_TO_LANGUAGE, type CommentInfo, type CommentCheckResult, type PendingCall as CommentPendingCall, type CommentCheckerConfig } from './comment-checker/index.js'; export { createRecoveryHook, handleRecovery, detectRecoverableError, handleContextWindowRecovery, detectContextLimitError, detectContextLimitErrorInText, parseContextLimitError, parseTokenLimitError, containsTokenLimitError, handleEditErrorRecovery, detectEditError, detectEditErrorInOutput, detectEditErrorInText, processEditOutput, handleSessionRecovery, detectSessionErrorType, isRecoverableError, isSessionRecoverable, readMessages as readRecoveryMessages, readParts as readRecoveryParts, findEmptyMessages as findRecoveryEmptyMessages, findMessagesWithThinkingBlocks as findRecoveryThinkingBlocks, findMessagesWithOrphanThinking as findRecoveryOrphanThinking, injectTextPart as injectRecoveryTextPart, prependThinkingPart as prependRecoveryThinkingPart, stripThinkingParts as stripRecoveryThinkingParts, replaceEmptyTextParts as replaceRecoveryEmptyTextParts, TOKEN_LIMIT_PATTERNS, TOKEN_LIMIT_KEYWORDS, CONTEXT_LIMIT_RECOVERY_MESSAGE, CONTEXT_LIMIT_SHORT_MESSAGE, NON_EMPTY_CONTENT_RECOVERY_MESSAGE, TRUNCATION_APPLIED_MESSAGE, RECOVERY_FAILED_MESSAGE, EDIT_ERROR_PATTERNS, EDIT_ERROR_REMINDER, RETRY_CONFIG, TRUNCATE_CONFIG, RECOVERY_MESSAGES, PLACEHOLDER_TEXT as RECOVERY_PLACEHOLDER_TEXT, type ParsedTokenLimitError, type RetryState, type TruncateState, type RecoveryResult, type RecoveryConfig, type RecoveryErrorType, type MessageData as RecoveryMessageData, type StoredMessageMeta as RecoveryStoredMessageMeta, type StoredPart as RecoveryStoredPart, type StoredTextPart as RecoveryStoredTextPart, type StoredToolPart as RecoveryStoredToolPart, type StoredReasoningPart as RecoveryStoredReasoningPart } from './recovery/index.js'; export { createPreemptiveCompactionHook, estimateTokens, analyzeContextUsage, getSessionTokenEstimate, resetSessionTokenEstimate, clearRapidFireDebounce, RAPID_FIRE_DEBOUNCE_MS, DEFAULT_THRESHOLD as PREEMPTIVE_DEFAULT_THRESHOLD, CRITICAL_THRESHOLD, COMPACTION_COOLDOWN_MS, MAX_WARNINGS, CLAUDE_DEFAULT_CONTEXT_LIMIT, CHARS_PER_TOKEN, CONTEXT_WARNING_MESSAGE, CONTEXT_CRITICAL_MESSAGE, type ContextUsageResult, type PreemptiveCompactionConfig } from './preemptive-compaction/index.js'; export { createBackgroundNotificationHook, processBackgroundNotification, processBackgroundNotificationHook, checkBackgroundNotifications, handleBackgroundEvent, HOOK_NAME as BACKGROUND_NOTIFICATION_HOOK_NAME, type BackgroundNotificationHookConfig, type BackgroundNotificationHookInput, type BackgroundNotificationHookOutput, type NotificationCheckResult } from './background-notification/index.js'; export { createDirectoryReadmeInjectorHook, getReadmesForPath, loadInjectedPaths, saveInjectedPaths, clearInjectedPaths, README_INJECTOR_STORAGE, README_FILENAME, AGENTS_FILENAME, CONTEXT_FILENAMES, TRACKED_TOOLS as README_TRACKED_TOOLS, type InjectedPathsData } from './directory-readme-injector/index.js'; export { createEmptyMessageSanitizerHook, sanitizeMessages, sanitizeMessage, hasTextContent, isToolPart, hasValidContent, PLACEHOLDER_TEXT, TOOL_PART_TYPES, HOOK_NAME as EMPTY_MESSAGE_SANITIZER_HOOK_NAME, DEBUG_PREFIX as EMPTY_MESSAGE_SANITIZER_DEBUG_PREFIX, ERROR_PATTERNS as EMPTY_MESSAGE_SANITIZER_ERROR_PATTERNS, type MessagePart, type MessageInfo, type MessageWithParts, type EmptyMessageSanitizerInput, type EmptyMessageSanitizerOutput, type EmptyMessageSanitizerConfig } from './empty-message-sanitizer/index.js'; export { createThinkingBlockValidatorHook, isExtendedThinkingModel, hasContentParts, startsWithThinkingBlock, findPreviousThinkingContent, prependThinkingBlock, validateMessage, validateMessages, getValidationStats, HOOK_NAME as THINKING_BLOCK_VALIDATOR_HOOK_NAME, CONTENT_PART_TYPES, THINKING_PART_TYPES, THINKING_MODEL_PATTERNS, DEFAULT_THINKING_CONTENT, SYNTHETIC_THINKING_ID_PREFIX, PREVENTED_ERROR, type MessagePart as ThinkingValidatorMessagePart, type MessageInfo as ThinkingValidatorMessageInfo, type MessageWithParts as ThinkingValidatorMessageWithParts, type MessagesTransformInput, type MessagesTransformOutput, type MessagesTransformHook, type ValidationResult } from './thinking-block-validator/index.js'; export { nonInteractiveEnvHook, isNonInteractive, HOOK_NAME as NON_INTERACTIVE_ENV_HOOK_NAME, NON_INTERACTIVE_ENV, SHELL_COMMAND_PATTERNS, type NonInteractiveEnvConfig, type ShellHook } from './non-interactive-env/index.js'; export { createAgentUsageReminderHook, loadAgentUsageState, saveAgentUsageState, clearAgentUsageState, TARGET_TOOLS, AGENT_TOOLS, REMINDER_MESSAGE, type AgentUsageState } from './agent-usage-reminder/index.js'; export { activateUltrawork, deactivateUltrawork, readUltraworkState, writeUltraworkState, incrementReinforcement, shouldReinforceUltrawork, getUltraworkPersistenceMessage, createUltraworkStateHook, type UltraworkState } from './ultrawork/index.js'; export { checkPersistentModes, createHookOutput, type PersistentModeResult } from './persistent-mode/index.js'; export { getFormatter, isFormatterAvailable, formatFile, getLinter, lintFile, validateCommitMessage, runTypeCheck, runTests, runLint, runPreCommitChecks, getPreCommitReminderMessage, getAutoFormatMessage, type FormatConfig, type LintConfig, type CommitConfig, type PreCommitResult } from './plugin-patterns/index.js'; export { readUltraQAState, writeUltraQAState, clearUltraQAState, startUltraQA, recordFailure, completeUltraQA, stopUltraQA, cancelUltraQA, getGoalCommand, formatProgressMessage, type UltraQAState, type UltraQAGoalType, type UltraQAOptions, type UltraQAResult } from './ultraqa/index.js'; export { initNotepad, readNotepad, getPriorityContext, getWorkingMemory, getManualSection, setPriorityContext, addWorkingMemoryEntry, addManualEntry, pruneOldEntries, getNotepadStats, formatNotepadContext, formatFullNotepad, getNotepadPath, DEFAULT_CONFIG as NOTEPAD_DEFAULT_CONFIG, NOTEPAD_FILENAME, PRIORITY_HEADER, WORKING_MEMORY_HEADER, MANUAL_HEADER, type NotepadConfig, type NotepadStats, type PriorityContextResult, type PruneResult } from './notepad/index.js'; export { createLearnedSkillsHook, processMessageForSkills, isLearnerEnabled, getAllSkills, clearSkillSession, findMatchingSkills, loadAllSkills, loadSkillById, findSkillFiles, getSkillsDir, ensureSkillsDir, parseSkillFile, generateSkillFrontmatter, validateExtractionRequest, validateSkillMetadata, writeSkill, checkDuplicateTriggers, detectExtractableMoment, shouldPromptExtraction, generateExtractionPrompt, processResponseForDetection, getLastDetection, clearDetectionState, getDetectionStats, getPromotionCandidates, promoteLearning, listPromotableLearnings, loadConfig as loadLearnerConfig, saveConfig as saveLearnerConfig, getConfigValue as getLearnerConfigValue, setConfigValue as setLearnerConfigValue, USER_SKILLS_DIR, PROJECT_SKILLS_SUBDIR, SKILL_EXTENSION, FEATURE_FLAG_KEY, MAX_SKILL_CONTENT_LENGTH, MIN_QUALITY_SCORE, MAX_SKILLS_PER_SESSION, type SkillMetadata, type LearnedSkill, type SkillFileCandidate, type QualityValidation, type SkillExtractionRequest, type InjectedSkillsData, type HookContext as SkillHookContext, type DetectionResult, type DetectionConfig, type PromotionCandidate, type LearnerConfig, type WriteSkillResult, type SkillParseResult } from './learner/index.js'; export { readAutopilotState, writeAutopilotState, clearAutopilotState, isAutopilotActive, getAutopilotStateAge, initAutopilot, transitionPhase, incrementAgentCount, updateExpansion, updatePlanning, updateExecution, updateQA, updateValidation, ensureAutopilotDir, getSpecPath, getPlanPath, transitionRalphToUltraQA, transitionUltraQAToValidation, transitionToComplete, transitionToFailed, getTransitionPrompt, getExpansionPrompt, getDirectPlanningPrompt, getExecutionPrompt, getQAPrompt, getValidationPrompt, getPhasePrompt, recordValidationVerdict, getValidationStatus, startValidationRound, shouldRetryValidation, getIssuesToFix, getValidationSpawnPrompt, formatValidationResults, generateSummary, formatSummary, formatCompactSummary, formatFailureSummary, formatFileList, cancelAutopilot, clearAutopilot, canResumeAutopilot, resumeAutopilot, formatCancelMessage, STALE_STATE_MAX_AGE_MS, DEFAULT_CONFIG, type AutopilotPhase, type AutopilotState, type AutopilotConfig, type AutopilotResult, type AutopilotSummary, type AutopilotExpansion, type AutopilotPlanning, type AutopilotExecution, type AutopilotQA, type AutopilotValidation, type ValidationResult as AutopilotValidationResult, type ValidationVerdictType, type ValidationVerdict, type QAStatus, type AutopilotSignal, type TransitionResult, type ValidationCoordinatorResult, type CancelResult } from './autopilot/index.js'; export { MODE_CONFIGS, getStateDir, ensureStateDir as ensureModeStateDir, getStateFilePath as getModeStateFilePath, getMarkerFilePath as getModeMarkerFilePath, getGlobalStateFilePath, clearModeState, hasModeState, getActiveModes, clearAllModeStates, isModeActive, getActiveExclusiveMode, canStartMode, getAllModeStatuses, createModeMarker, removeModeMarker, readModeMarker, type ExecutionMode, type ModeConfig, type ModeStatus, type CanStartResult } from './mode-registry/index.js'; export { ensureDirectoryStructure, validateConfigFiles, setEnvironmentVariables, processSetupInit, pruneOldStateFiles, cleanupOrphanedState, processSetupMaintenance, processSetup, type SetupInput, type SetupResult, type HookOutput as SetupHookOutput } from './setup/index.js'; export { getBeadsInstructions, getBeadsContextConfig, registerBeadsContext, clearBeadsContext, BEADS_INSTRUCTIONS, BEADS_RUST_INSTRUCTIONS, type TaskTool, type BeadsContextConfig } from './beads-context/index.js'; export { processSubagentStart, processSubagentStop, handleSubagentStart, handleSubagentStop, readTrackingState, writeTrackingState, getStateFilePath as getSubagentStateFilePath, getStaleAgents, cleanupStaleAgents, getActiveAgentCount, getAgentsByType, getRunningAgents, getTrackingStats, clearTrackingState, type SubagentInfo, type SubagentTrackingState, type SubagentStartInput, type SubagentStopInput, type HookOutput as SubagentHookOutput } from './subagent-tracker/index.js'; export { processPreCompact, getCheckpointPath, exportWisdomToNotepad, saveModeSummary, createCompactCheckpoint, formatCompactSummary as formatPreCompactSummary, isCompactionInProgress, getCompactionQueueDepth, type PreCompactInput, type CompactCheckpoint, type HookOutput as PreCompactHookOutput } from './pre-compact/index.js'; export { processPermissionRequest, handlePermissionRequest, isSafeCommand, isActiveModeRunning, type PermissionRequestInput, type HookOutput as PermissionHookOutput } from './permission-handler/index.js'; export { processSessionEnd, handleSessionEnd, recordSessionMetrics, cleanupTransientState, exportSessionSummary, type SessionEndInput, type SessionMetrics, type HookOutput as SessionEndHookOutput } from './session-end/index.js'; export { registerProjectMemoryContext, clearProjectMemorySession, rescanProjectEnvironment, loadProjectMemory, saveProjectMemory, detectProjectEnvironment, formatContextSummary, formatFullContext, learnFromToolOutput, addCustomNote, processPreCompact as processProjectMemoryPreCompact, mapDirectoryStructure, updateDirectoryAccess, trackAccess, getTopHotPaths, decayHotPaths, detectDirectivesFromMessage, addDirective, formatDirectivesForContext, type ProjectMemory, type TechStack, type BuildInfo, type CodeConventions, type ProjectStructure, type LanguageDetection, type FrameworkDetection, type GitBranchPattern, type CustomNote, type DirectoryInfo, type HotPath, type UserDirective } from './project-memory/index.js'; export { recordHookFire, recordHookResult, recordKeywordDetected, recordSkillActivated, recordSkillInvoked, recordModeChange, } from './subagent-tracker/flow-tracer.js'; export { generateCodebaseMap, buildTree, renderTree, shouldSkipEntry, extractPackageMetadata, type CodebaseMapOptions, type CodebaseMapResult, } from './codebase-map.js'; export { buildAgentsOverlay, type AgentsOverlayResult, } from './agents-overlay.js'; export { processCodeSimplifier, isCodeSimplifierEnabled, getModifiedFiles, readOmcConfig, isAlreadyTriggered, writeTriggerMarker, clearTriggerMarker, buildSimplifierMessage, TRIGGER_MARKER_FILENAME, type CodeSimplifierConfig, type CodeSimplifierHookResult, } from './code-simplifier/index.js'; //# sourceMappingURL=index.d.ts.map