chore: include pre-built dist for github install
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import type { HookName, OhMyOpenCodeConfig } from "../../config";
|
||||
import type { BackgroundManager } from "../../features/background-agent";
|
||||
import type { PluginContext } from "../types";
|
||||
import { createGptPermissionContinuationHook, createTodoContinuationEnforcer, createBackgroundNotificationHook, createStopContinuationGuardHook, createCompactionContextInjector, createCompactionTodoPreserverHook, createAtlasHook } from "../../hooks";
|
||||
import { createUnstableAgentBabysitter } from "../unstable-agent-babysitter";
|
||||
export type ContinuationHooks = {
|
||||
gptPermissionContinuation: ReturnType<typeof createGptPermissionContinuationHook> | null;
|
||||
stopContinuationGuard: ReturnType<typeof createStopContinuationGuardHook> | null;
|
||||
compactionContextInjector: ReturnType<typeof createCompactionContextInjector> | null;
|
||||
compactionTodoPreserver: ReturnType<typeof createCompactionTodoPreserverHook> | null;
|
||||
todoContinuationEnforcer: ReturnType<typeof createTodoContinuationEnforcer> | null;
|
||||
unstableAgentBabysitter: ReturnType<typeof createUnstableAgentBabysitter> | null;
|
||||
backgroundNotificationHook: ReturnType<typeof createBackgroundNotificationHook> | null;
|
||||
atlasHook: ReturnType<typeof createAtlasHook> | null;
|
||||
};
|
||||
type SessionRecovery = {
|
||||
setOnAbortCallback: (callback: (sessionID: string) => void) => void;
|
||||
setOnRecoveryCompleteCallback: (callback: (sessionID: string) => void) => void;
|
||||
} | null;
|
||||
export declare function createContinuationHooks(args: {
|
||||
ctx: PluginContext;
|
||||
pluginConfig: OhMyOpenCodeConfig;
|
||||
isHookEnabled: (hookName: HookName) => boolean;
|
||||
safeHookEnabled: boolean;
|
||||
backgroundManager: BackgroundManager;
|
||||
sessionRecovery: SessionRecovery;
|
||||
}): ContinuationHooks;
|
||||
export {};
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
import type { HookName, OhMyOpenCodeConfig } from "../../config";
|
||||
import type { PluginContext } from "../types";
|
||||
import type { ModelCacheState } from "../../plugin-state";
|
||||
export declare function createCoreHooks(args: {
|
||||
ctx: PluginContext;
|
||||
pluginConfig: OhMyOpenCodeConfig;
|
||||
modelCacheState: ModelCacheState;
|
||||
isHookEnabled: (hookName: HookName) => boolean;
|
||||
safeHookEnabled: boolean;
|
||||
}): {
|
||||
claudeCodeHooks: ReturnType<typeof import("../../hooks").createClaudeCodeHooksHook> | null;
|
||||
keywordDetector: ReturnType<typeof import("../../hooks").createKeywordDetectorHook> | null;
|
||||
contextInjectorMessagesTransform: ReturnType<typeof import("../../features/context-injector").createContextInjectorMessagesTransformHook>;
|
||||
thinkingBlockValidator: ReturnType<typeof import("../../hooks").createThinkingBlockValidatorHook> | null;
|
||||
commentChecker: ReturnType<typeof import("../../hooks").createCommentCheckerHooks> | null;
|
||||
toolOutputTruncator: ReturnType<typeof import("../../hooks").createToolOutputTruncatorHook> | null;
|
||||
directoryAgentsInjector: ReturnType<typeof import("../../hooks").createDirectoryAgentsInjectorHook> | null;
|
||||
directoryReadmeInjector: ReturnType<typeof import("../../hooks").createDirectoryReadmeInjectorHook> | null;
|
||||
emptyTaskResponseDetector: ReturnType<typeof import("../../hooks").createEmptyTaskResponseDetectorHook> | null;
|
||||
rulesInjector: ReturnType<typeof import("../../hooks").createRulesInjectorHook> | null;
|
||||
tasksTodowriteDisabler: ReturnType<typeof import("../../hooks").createTasksTodowriteDisablerHook> | null;
|
||||
writeExistingFileGuard: ReturnType<typeof import("../../hooks").createWriteExistingFileGuardHook> | null;
|
||||
hashlineReadEnhancer: ReturnType<typeof import("../../hooks").createHashlineReadEnhancerHook> | null;
|
||||
jsonErrorRecovery: ReturnType<typeof import("../../hooks").createJsonErrorRecoveryHook> | null;
|
||||
readImageResizer: ReturnType<typeof import("../../hooks").createReadImageResizerHook> | null;
|
||||
contextWindowMonitor: ReturnType<typeof import("../../hooks").createContextWindowMonitorHook> | null;
|
||||
preemptiveCompaction: ReturnType<typeof import("../../hooks").createPreemptiveCompactionHook> | null;
|
||||
sessionRecovery: ReturnType<typeof import("../../hooks").createSessionRecoveryHook> | null;
|
||||
sessionNotification: ReturnType<typeof import("../../hooks").createSessionNotification> | null;
|
||||
thinkMode: ReturnType<typeof import("../../hooks").createThinkModeHook> | null;
|
||||
modelFallback: ReturnType<typeof import("../../hooks").createModelFallbackHook> | null;
|
||||
anthropicContextWindowLimitRecovery: ReturnType<typeof import("../../hooks").createAnthropicContextWindowLimitRecoveryHook> | null;
|
||||
autoUpdateChecker: ReturnType<typeof import("../../hooks").createAutoUpdateCheckerHook> | null;
|
||||
agentUsageReminder: ReturnType<typeof import("../../hooks").createAgentUsageReminderHook> | null;
|
||||
nonInteractiveEnv: ReturnType<typeof import("../../hooks").createNonInteractiveEnvHook> | null;
|
||||
interactiveBashSession: ReturnType<typeof import("../../hooks").createInteractiveBashSessionHook> | null;
|
||||
ralphLoop: ReturnType<typeof import("../../hooks").createRalphLoopHook> | null;
|
||||
editErrorRecovery: ReturnType<typeof import("../../hooks").createEditErrorRecoveryHook> | null;
|
||||
delegateTaskRetry: ReturnType<typeof import("../../hooks").createDelegateTaskRetryHook> | null;
|
||||
startWork: ReturnType<typeof import("../../hooks").createStartWorkHook> | null;
|
||||
prometheusMdOnly: ReturnType<typeof import("../../hooks").createPrometheusMdOnlyHook> | null;
|
||||
sisyphusJuniorNotepad: ReturnType<typeof import("../../hooks").createSisyphusJuniorNotepadHook> | null;
|
||||
noSisyphusGpt: ReturnType<typeof import("../../hooks").createNoSisyphusGptHook> | null;
|
||||
noHephaestusNonGpt: ReturnType<typeof import("../../hooks").createNoHephaestusNonGptHook> | null;
|
||||
questionLabelTruncator: ReturnType<typeof import("../../hooks").createQuestionLabelTruncatorHook> | null;
|
||||
taskResumeInfo: ReturnType<typeof import("../../hooks").createTaskResumeInfoHook> | null;
|
||||
anthropicEffort: ReturnType<typeof import("../../hooks/anthropic-effort").createAnthropicEffortHook> | null;
|
||||
runtimeFallback: ReturnType<typeof import("../../hooks").createRuntimeFallbackHook> | null;
|
||||
delegateTaskEnglishDirective: ReturnType<typeof import("../../hooks").createDelegateTaskEnglishDirectiveHook> | null;
|
||||
};
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
import type { OhMyOpenCodeConfig, HookName } from "../../config";
|
||||
import type { ModelCacheState } from "../../plugin-state";
|
||||
import type { PluginContext } from "../types";
|
||||
import { createContextWindowMonitorHook, createSessionRecoveryHook, createSessionNotification, createThinkModeHook, createModelFallbackHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createAgentUsageReminderHook, createNonInteractiveEnvHook, createInteractiveBashSessionHook, createRalphLoopHook, createEditErrorRecoveryHook, createDelegateTaskRetryHook, createDelegateTaskEnglishDirectiveHook, createTaskResumeInfoHook, createStartWorkHook, createPrometheusMdOnlyHook, createSisyphusJuniorNotepadHook, createNoSisyphusGptHook, createNoHephaestusNonGptHook, createQuestionLabelTruncatorHook, createPreemptiveCompactionHook, createRuntimeFallbackHook } from "../../hooks";
|
||||
import { createAnthropicEffortHook } from "../../hooks/anthropic-effort";
|
||||
export type SessionHooks = {
|
||||
contextWindowMonitor: ReturnType<typeof createContextWindowMonitorHook> | null;
|
||||
preemptiveCompaction: ReturnType<typeof createPreemptiveCompactionHook> | null;
|
||||
sessionRecovery: ReturnType<typeof createSessionRecoveryHook> | null;
|
||||
sessionNotification: ReturnType<typeof createSessionNotification> | null;
|
||||
thinkMode: ReturnType<typeof createThinkModeHook> | null;
|
||||
modelFallback: ReturnType<typeof createModelFallbackHook> | null;
|
||||
anthropicContextWindowLimitRecovery: ReturnType<typeof createAnthropicContextWindowLimitRecoveryHook> | null;
|
||||
autoUpdateChecker: ReturnType<typeof createAutoUpdateCheckerHook> | null;
|
||||
agentUsageReminder: ReturnType<typeof createAgentUsageReminderHook> | null;
|
||||
nonInteractiveEnv: ReturnType<typeof createNonInteractiveEnvHook> | null;
|
||||
interactiveBashSession: ReturnType<typeof createInteractiveBashSessionHook> | null;
|
||||
ralphLoop: ReturnType<typeof createRalphLoopHook> | null;
|
||||
editErrorRecovery: ReturnType<typeof createEditErrorRecoveryHook> | null;
|
||||
delegateTaskRetry: ReturnType<typeof createDelegateTaskRetryHook> | null;
|
||||
startWork: ReturnType<typeof createStartWorkHook> | null;
|
||||
prometheusMdOnly: ReturnType<typeof createPrometheusMdOnlyHook> | null;
|
||||
sisyphusJuniorNotepad: ReturnType<typeof createSisyphusJuniorNotepadHook> | null;
|
||||
noSisyphusGpt: ReturnType<typeof createNoSisyphusGptHook> | null;
|
||||
noHephaestusNonGpt: ReturnType<typeof createNoHephaestusNonGptHook> | null;
|
||||
questionLabelTruncator: ReturnType<typeof createQuestionLabelTruncatorHook> | null;
|
||||
taskResumeInfo: ReturnType<typeof createTaskResumeInfoHook> | null;
|
||||
anthropicEffort: ReturnType<typeof createAnthropicEffortHook> | null;
|
||||
runtimeFallback: ReturnType<typeof createRuntimeFallbackHook> | null;
|
||||
delegateTaskEnglishDirective: ReturnType<typeof createDelegateTaskEnglishDirectiveHook> | null;
|
||||
};
|
||||
export declare function createSessionHooks(args: {
|
||||
ctx: PluginContext;
|
||||
pluginConfig: OhMyOpenCodeConfig;
|
||||
modelCacheState: ModelCacheState;
|
||||
isHookEnabled: (hookName: HookName) => boolean;
|
||||
safeHookEnabled: boolean;
|
||||
}): SessionHooks;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import type { AvailableSkill } from "../../agents/dynamic-agent-prompt-builder";
|
||||
import type { HookName, OhMyOpenCodeConfig } from "../../config";
|
||||
import type { LoadedSkill } from "../../features/opencode-skill-loader/types";
|
||||
import type { PluginContext } from "../types";
|
||||
import { createAutoSlashCommandHook, createCategorySkillReminderHook } from "../../hooks";
|
||||
export type SkillHooks = {
|
||||
categorySkillReminder: ReturnType<typeof createCategorySkillReminderHook> | null;
|
||||
autoSlashCommand: ReturnType<typeof createAutoSlashCommandHook> | null;
|
||||
};
|
||||
export declare function createSkillHooks(args: {
|
||||
ctx: PluginContext;
|
||||
pluginConfig: OhMyOpenCodeConfig;
|
||||
isHookEnabled: (hookName: HookName) => boolean;
|
||||
safeHookEnabled: boolean;
|
||||
mergedSkills: LoadedSkill[];
|
||||
availableSkills: AvailableSkill[];
|
||||
}): SkillHooks;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import type { HookName, OhMyOpenCodeConfig } from "../../config";
|
||||
import type { ModelCacheState } from "../../plugin-state";
|
||||
import type { PluginContext } from "../types";
|
||||
import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createHashlineReadEnhancerHook, createReadImageResizerHook, createJsonErrorRecoveryHook } from "../../hooks";
|
||||
export type ToolGuardHooks = {
|
||||
commentChecker: ReturnType<typeof createCommentCheckerHooks> | null;
|
||||
toolOutputTruncator: ReturnType<typeof createToolOutputTruncatorHook> | null;
|
||||
directoryAgentsInjector: ReturnType<typeof createDirectoryAgentsInjectorHook> | null;
|
||||
directoryReadmeInjector: ReturnType<typeof createDirectoryReadmeInjectorHook> | null;
|
||||
emptyTaskResponseDetector: ReturnType<typeof createEmptyTaskResponseDetectorHook> | null;
|
||||
rulesInjector: ReturnType<typeof createRulesInjectorHook> | null;
|
||||
tasksTodowriteDisabler: ReturnType<typeof createTasksTodowriteDisablerHook> | null;
|
||||
writeExistingFileGuard: ReturnType<typeof createWriteExistingFileGuardHook> | null;
|
||||
hashlineReadEnhancer: ReturnType<typeof createHashlineReadEnhancerHook> | null;
|
||||
jsonErrorRecovery: ReturnType<typeof createJsonErrorRecoveryHook> | null;
|
||||
readImageResizer: ReturnType<typeof createReadImageResizerHook> | null;
|
||||
};
|
||||
export declare function createToolGuardHooks(args: {
|
||||
ctx: PluginContext;
|
||||
pluginConfig: OhMyOpenCodeConfig;
|
||||
modelCacheState: ModelCacheState;
|
||||
isHookEnabled: (hookName: HookName) => boolean;
|
||||
safeHookEnabled: boolean;
|
||||
}): ToolGuardHooks;
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import type { OhMyOpenCodeConfig } from "../../config";
|
||||
import type { PluginContext } from "../types";
|
||||
import { createClaudeCodeHooksHook, createKeywordDetectorHook, createThinkingBlockValidatorHook } from "../../hooks";
|
||||
import { createContextInjectorMessagesTransformHook } from "../../features/context-injector";
|
||||
export type TransformHooks = {
|
||||
claudeCodeHooks: ReturnType<typeof createClaudeCodeHooksHook> | null;
|
||||
keywordDetector: ReturnType<typeof createKeywordDetectorHook> | null;
|
||||
contextInjectorMessagesTransform: ReturnType<typeof createContextInjectorMessagesTransformHook>;
|
||||
thinkingBlockValidator: ReturnType<typeof createThinkingBlockValidatorHook> | null;
|
||||
};
|
||||
export declare function createTransformHooks(args: {
|
||||
ctx: PluginContext;
|
||||
pluginConfig: OhMyOpenCodeConfig;
|
||||
isHookEnabled: (hookName: string) => boolean;
|
||||
safeHookEnabled?: boolean;
|
||||
}): TransformHooks;
|
||||
Reference in New Issue
Block a user