oh-my-opencode 3.7.4 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +206 -243
- package/README.ko.md +205 -244
- package/README.md +176 -174
- package/README.zh-cn.md +211 -255
- package/dist/agents/atlas/default.d.ts +1 -1
- package/dist/agents/atlas/gpt.d.ts +1 -1
- package/dist/agents/atlas/prompt-section-builder.d.ts +1 -1
- package/dist/agents/builtin-agents/environment-context.d.ts +5 -1
- package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
- package/dist/agents/builtin-agents/hephaestus-agent.d.ts +1 -0
- package/dist/agents/builtin-agents/sisyphus-agent.d.ts +1 -0
- package/dist/agents/builtin-agents.d.ts +1 -1
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +0 -5
- package/dist/agents/index.d.ts +2 -1
- package/dist/agents/prometheus/gpt.d.ts +24 -0
- package/dist/agents/prometheus/index.d.ts +3 -1
- package/dist/agents/prometheus/system-prompt.d.ts +12 -1
- package/dist/agents/types.d.ts +1 -0
- package/dist/cli/fallback-chain-resolution.d.ts +1 -1
- package/dist/cli/index.js +366 -118
- package/dist/cli/model-fallback-requirements.d.ts +3 -0
- package/dist/cli/model-fallback-types.d.ts +0 -5
- package/dist/cli/provider-model-id-transform.d.ts +1 -1
- package/dist/cli/run/timestamp-output.d.ts +5 -0
- package/dist/cli/run/types.d.ts +1 -0
- package/dist/config/index.d.ts +2 -2
- package/dist/config/schema/agent-overrides.d.ts +75 -60
- package/dist/config/schema/categories.d.ts +2 -0
- package/dist/config/schema/experimental.d.ts +2 -0
- package/dist/config/schema/fallback-models.d.ts +3 -0
- package/dist/config/schema/hooks.d.ts +3 -3
- package/dist/config/schema/oh-my-opencode-config.d.ts +87 -104
- package/dist/config/schema/ralph-loop.d.ts +4 -0
- package/dist/config/schema/runtime-fallback.d.ts +10 -0
- package/dist/config/schema.d.ts +2 -0
- package/dist/create-hooks.d.ts +7 -5
- package/dist/features/background-agent/manager.d.ts +3 -0
- package/dist/features/background-agent/types.d.ts +7 -0
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +1 -1
- package/dist/features/claude-code-session-state/state.d.ts +1 -0
- package/dist/features/task-toast-manager/manager.d.ts +5 -0
- package/dist/features/task-toast-manager/types.d.ts +2 -1
- package/dist/features/tmux-subagent/action-executor.d.ts +10 -3
- package/dist/features/tmux-subagent/grid-planning.d.ts +5 -3
- package/dist/features/tmux-subagent/manager.d.ts +12 -0
- package/dist/features/tmux-subagent/pane-split-availability.d.ts +0 -1
- package/dist/features/tmux-subagent/spawn-target-finder.d.ts +2 -2
- package/dist/features/tmux-subagent/tmux-grid-constants.d.ts +4 -0
- package/dist/features/tmux-subagent/types.d.ts +2 -0
- package/dist/hooks/hashline-edit-diff-enhancer/hook.d.ts +28 -0
- package/dist/hooks/hashline-edit-diff-enhancer/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +4 -2
- package/dist/hooks/model-fallback/hook.d.ts +60 -0
- package/dist/hooks/no-hephaestus-non-gpt/hook.d.ts +16 -0
- package/dist/hooks/no-hephaestus-non-gpt/index.d.ts +1 -0
- package/dist/hooks/ralph-loop/command-arguments.d.ts +8 -0
- package/dist/hooks/ralph-loop/continuation-prompt-injector.d.ts +1 -0
- package/dist/hooks/ralph-loop/iteration-continuation.d.ts +12 -0
- package/dist/hooks/ralph-loop/loop-state-controller.d.ts +2 -0
- package/dist/hooks/ralph-loop/ralph-loop-event-handler.d.ts +1 -0
- package/dist/hooks/ralph-loop/ralph-loop-hook.d.ts +1 -0
- package/dist/hooks/ralph-loop/session-reset-strategy.d.ts +3 -0
- package/dist/hooks/ralph-loop/types.d.ts +1 -0
- package/dist/hooks/runtime-fallback/agent-resolver.d.ts +5 -0
- package/dist/hooks/runtime-fallback/auto-retry.d.ts +10 -0
- package/dist/hooks/runtime-fallback/chat-message-handler.d.ts +20 -0
- package/dist/hooks/runtime-fallback/constants.d.ts +19 -0
- package/dist/hooks/runtime-fallback/error-classifier.d.ts +17 -0
- package/dist/hooks/runtime-fallback/event-handler.d.ts +8 -0
- package/dist/hooks/runtime-fallback/fallback-models.d.ts +2 -0
- package/dist/hooks/runtime-fallback/fallback-state.d.ts +6 -0
- package/dist/hooks/runtime-fallback/hook.d.ts +3 -0
- package/dist/hooks/runtime-fallback/index.d.ts +2 -0
- package/dist/hooks/runtime-fallback/message-update-handler.d.ts +5 -0
- package/dist/hooks/runtime-fallback/types.d.ts +59 -0
- package/dist/hooks/session-recovery/detect-error-type.d.ts +2 -1
- package/dist/hooks/session-recovery/recover-unavailable-tool.d.ts +5 -0
- package/dist/hooks/todo-continuation-enforcer/continuation-injection.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/countdown.d.ts +1 -0
- package/dist/hooks/write-existing-file-guard/hook.d.ts +1 -0
- package/dist/index.js +6179 -2820
- package/dist/oh-my-opencode.schema.json +3681 -0
- package/dist/plugin/chat-headers.d.ts +4 -0
- package/dist/plugin/chat-message.d.ts +9 -8
- package/dist/plugin/chat-params.d.ts +2 -3
- package/dist/plugin/event.d.ts +2 -6
- package/dist/plugin/hooks/create-core-hooks.d.ts +7 -5
- package/dist/plugin/hooks/create-session-hooks.d.ts +6 -6
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
- package/dist/plugin/hooks/create-transform-hooks.d.ts +1 -1
- package/dist/plugin/system-transform.d.ts +5 -0
- package/dist/plugin/types.d.ts +7 -1
- package/dist/plugin/ultrawork-db-model-override.d.ts +11 -0
- package/dist/plugin/ultrawork-model-override.d.ts +37 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/internal-initiator-marker.d.ts +5 -0
- package/dist/shared/model-error-classifier.d.ts +31 -0
- package/dist/shared/model-resolution-pipeline.d.ts +1 -0
- package/dist/shared/model-resolver.d.ts +6 -0
- package/dist/shared/provider-model-id-transform.d.ts +1 -0
- package/dist/shared/session-category-registry.d.ts +32 -0
- package/dist/shared/session-model-state.d.ts +7 -0
- package/dist/shared/tmux/tmux-utils/layout.d.ts +17 -2
- package/dist/tools/delegate-task/background-task.d.ts +2 -1
- package/dist/tools/delegate-task/category-resolver.d.ts +2 -0
- package/dist/tools/delegate-task/skill-resolver.d.ts +1 -0
- package/dist/tools/delegate-task/subagent-resolver.d.ts +2 -0
- package/dist/tools/delegate-task/sync-task.d.ts +1 -1
- package/dist/tools/hashline-edit/constants.d.ts +5 -2
- package/dist/tools/hashline-edit/diff-utils.d.ts +6 -0
- package/dist/tools/hashline-edit/edit-operations.d.ts +4 -4
- package/dist/tools/hashline-edit/hash-computation.d.ts +1 -1
- package/dist/tools/hashline-edit/index.d.ts +1 -1
- package/dist/tools/hashline-edit/types.d.ts +4 -4
- package/dist/tools/hashline-edit/validation.d.ts +1 -0
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/skill/constants.d.ts +2 -2
- package/dist/tools/skill/types.d.ts +4 -0
- package/dist/tools/slashcommand/index.d.ts +1 -1
- package/dist/tools/slashcommand/types.d.ts +1 -7
- package/package.json +10 -10
- package/dist/hooks/ultrawork-model-override/hook.d.ts +0 -6
- package/dist/hooks/ultrawork-model-override/index.d.ts +0 -1
- package/dist/tools/slashcommand/skill-command-converter.d.ts +0 -3
- package/dist/tools/slashcommand/slashcommand-description.d.ts +0 -3
- package/dist/tools/slashcommand/slashcommand-tool.d.ts +0 -4
- package/dist/tools/slashcommand/tools.d.ts +0 -2
|
@@ -10,21 +10,22 @@ type ChatMessagePart = {
|
|
|
10
10
|
text?: string;
|
|
11
11
|
[key: string]: unknown;
|
|
12
12
|
};
|
|
13
|
-
type ChatMessageHandlerOutput = {
|
|
13
|
+
export type ChatMessageHandlerOutput = {
|
|
14
14
|
message: Record<string, unknown>;
|
|
15
15
|
parts: ChatMessagePart[];
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
ctx: PluginContext;
|
|
19
|
-
pluginConfig: OhMyOpenCodeConfig;
|
|
20
|
-
firstMessageVariantGate: FirstMessageVariantGate;
|
|
21
|
-
hooks: CreatedHooks;
|
|
22
|
-
}): (input: {
|
|
17
|
+
export type ChatMessageInput = {
|
|
23
18
|
sessionID: string;
|
|
24
19
|
agent?: string;
|
|
25
20
|
model?: {
|
|
26
21
|
providerID: string;
|
|
27
22
|
modelID: string;
|
|
28
23
|
};
|
|
29
|
-
}
|
|
24
|
+
};
|
|
25
|
+
export declare function createChatMessageHandler(args: {
|
|
26
|
+
ctx: PluginContext;
|
|
27
|
+
pluginConfig: OhMyOpenCodeConfig;
|
|
28
|
+
firstMessageVariantGate: FirstMessageVariantGate;
|
|
29
|
+
hooks: CreatedHooks;
|
|
30
|
+
}): (input: ChatMessageInput, output: ChatMessageHandlerOutput) => Promise<void>;
|
|
30
31
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type ChatParamsInput = {
|
|
1
|
+
export type ChatParamsInput = {
|
|
2
2
|
sessionID: string;
|
|
3
3
|
agent: {
|
|
4
4
|
name?: string;
|
|
@@ -14,7 +14,7 @@ type ChatParamsInput = {
|
|
|
14
14
|
variant?: string;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
type ChatParamsOutput = {
|
|
17
|
+
export type ChatParamsOutput = {
|
|
18
18
|
temperature?: number;
|
|
19
19
|
topP?: number;
|
|
20
20
|
topK?: number;
|
|
@@ -25,4 +25,3 @@ export declare function createChatParamsHandler(args: {
|
|
|
25
25
|
"chat.params"?: (input: ChatParamsInput, output: ChatParamsOutput) => Promise<void>;
|
|
26
26
|
} | null;
|
|
27
27
|
}): (input: unknown, output: unknown) => Promise<void>;
|
|
28
|
-
export {};
|
package/dist/plugin/event.d.ts
CHANGED
|
@@ -10,16 +10,12 @@ type FirstMessageVariantGate = {
|
|
|
10
10
|
} | undefined) => void;
|
|
11
11
|
clear: (sessionID: string) => void;
|
|
12
12
|
};
|
|
13
|
+
type EventInput = Parameters<NonNullable<NonNullable<CreatedHooks["writeExistingFileGuard"]>["event"]>>[0];
|
|
13
14
|
export declare function createEventHandler(args: {
|
|
14
15
|
ctx: PluginContext;
|
|
15
16
|
pluginConfig: OhMyOpenCodeConfig;
|
|
16
17
|
firstMessageVariantGate: FirstMessageVariantGate;
|
|
17
18
|
managers: Managers;
|
|
18
19
|
hooks: CreatedHooks;
|
|
19
|
-
}): (input:
|
|
20
|
-
event: {
|
|
21
|
-
type: string;
|
|
22
|
-
properties?: Record<string, unknown>;
|
|
23
|
-
};
|
|
24
|
-
}) => Promise<void>;
|
|
20
|
+
}): (input: EventInput) => Promise<void>;
|
|
25
21
|
export {};
|
|
@@ -8,7 +8,7 @@ export declare function createCoreHooks(args: {
|
|
|
8
8
|
isHookEnabled: (hookName: HookName) => boolean;
|
|
9
9
|
safeHookEnabled: boolean;
|
|
10
10
|
}): {
|
|
11
|
-
claudeCodeHooks: ReturnType<typeof import("../../hooks").createClaudeCodeHooksHook
|
|
11
|
+
claudeCodeHooks: ReturnType<typeof import("../../hooks").createClaudeCodeHooksHook> | null;
|
|
12
12
|
keywordDetector: ReturnType<typeof import("../../hooks").createKeywordDetectorHook> | null;
|
|
13
13
|
contextInjectorMessagesTransform: ReturnType<typeof import("../../features/context-injector").createContextInjectorMessagesTransformHook>;
|
|
14
14
|
thinkingBlockValidator: ReturnType<typeof import("../../hooks").createThinkingBlockValidatorHook> | null;
|
|
@@ -21,11 +21,13 @@ export declare function createCoreHooks(args: {
|
|
|
21
21
|
tasksTodowriteDisabler: ReturnType<typeof import("../../hooks").createTasksTodowriteDisablerHook> | null;
|
|
22
22
|
writeExistingFileGuard: ReturnType<typeof import("../../hooks").createWriteExistingFileGuardHook> | null;
|
|
23
23
|
hashlineReadEnhancer: ReturnType<typeof import("../../hooks").createHashlineReadEnhancerHook> | null;
|
|
24
|
+
jsonErrorRecovery: ReturnType<typeof import("../../hooks").createJsonErrorRecoveryHook> | null;
|
|
24
25
|
contextWindowMonitor: ReturnType<typeof import("../../hooks").createContextWindowMonitorHook> | null;
|
|
25
26
|
preemptiveCompaction: ReturnType<typeof import("../../hooks").createPreemptiveCompactionHook> | null;
|
|
26
27
|
sessionRecovery: ReturnType<typeof import("../../hooks").createSessionRecoveryHook> | null;
|
|
27
28
|
sessionNotification: ReturnType<typeof import("../../hooks").createSessionNotification> | null;
|
|
28
29
|
thinkMode: ReturnType<typeof import("../../hooks").createThinkModeHook> | null;
|
|
30
|
+
modelFallback: ReturnType<typeof import("../../hooks").createModelFallbackHook> | null;
|
|
29
31
|
anthropicContextWindowLimitRecovery: ReturnType<typeof import("../../hooks").createAnthropicContextWindowLimitRecoveryHook> | null;
|
|
30
32
|
autoUpdateChecker: ReturnType<typeof import("../../hooks").createAutoUpdateCheckerHook> | null;
|
|
31
33
|
agentUsageReminder: ReturnType<typeof import("../../hooks").createAgentUsageReminderHook> | null;
|
|
@@ -33,14 +35,14 @@ export declare function createCoreHooks(args: {
|
|
|
33
35
|
interactiveBashSession: ReturnType<typeof import("../../hooks").createInteractiveBashSessionHook> | null;
|
|
34
36
|
ralphLoop: ReturnType<typeof import("../../hooks").createRalphLoopHook> | null;
|
|
35
37
|
editErrorRecovery: ReturnType<typeof import("../../hooks").createEditErrorRecoveryHook> | null;
|
|
36
|
-
jsonErrorRecovery: ReturnType<typeof import("../../hooks").createJsonErrorRecoveryHook> | null;
|
|
37
38
|
delegateTaskRetry: ReturnType<typeof import("../../hooks").createDelegateTaskRetryHook> | null;
|
|
38
39
|
startWork: ReturnType<typeof import("../../hooks").createStartWorkHook> | null;
|
|
39
40
|
prometheusMdOnly: ReturnType<typeof import("../../hooks").createPrometheusMdOnlyHook> | null;
|
|
40
41
|
sisyphusJuniorNotepad: ReturnType<typeof import("../../hooks").createSisyphusJuniorNotepadHook> | null;
|
|
41
42
|
noSisyphusGpt: ReturnType<typeof import("../../hooks").createNoSisyphusGptHook> | null;
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
noHephaestusNonGpt: ReturnType<typeof import("../../hooks").createNoHephaestusNonGptHook> | null;
|
|
44
|
+
questionLabelTruncator: ReturnType<typeof import("../../hooks").createQuestionLabelTruncatorHook> | null;
|
|
45
|
+
taskResumeInfo: ReturnType<typeof import("../../hooks").createTaskResumeInfoHook> | null;
|
|
44
46
|
anthropicEffort: ReturnType<typeof import("../../hooks/anthropic-effort").createAnthropicEffortHook> | null;
|
|
45
|
-
|
|
47
|
+
runtimeFallback: ReturnType<typeof import("../../hooks").createRuntimeFallbackHook> | null;
|
|
46
48
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { OhMyOpenCodeConfig, HookName } from "../../config";
|
|
2
2
|
import type { ModelCacheState } from "../../plugin-state";
|
|
3
3
|
import type { PluginContext } from "../types";
|
|
4
|
-
import { createContextWindowMonitorHook, createSessionRecoveryHook, createSessionNotification, createThinkModeHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createAgentUsageReminderHook, createNonInteractiveEnvHook, createInteractiveBashSessionHook, createRalphLoopHook, createEditErrorRecoveryHook,
|
|
4
|
+
import { createContextWindowMonitorHook, createSessionRecoveryHook, createSessionNotification, createThinkModeHook, createModelFallbackHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createAgentUsageReminderHook, createNonInteractiveEnvHook, createInteractiveBashSessionHook, createRalphLoopHook, createEditErrorRecoveryHook, createDelegateTaskRetryHook, createTaskResumeInfoHook, createStartWorkHook, createPrometheusMdOnlyHook, createSisyphusJuniorNotepadHook, createNoSisyphusGptHook, createNoHephaestusNonGptHook, createQuestionLabelTruncatorHook, createPreemptiveCompactionHook, createRuntimeFallbackHook } from "../../hooks";
|
|
5
5
|
import { createAnthropicEffortHook } from "../../hooks/anthropic-effort";
|
|
6
|
-
import { createUltraworkModelOverrideHook } from "../../hooks/ultrawork-model-override";
|
|
7
6
|
export type SessionHooks = {
|
|
8
7
|
contextWindowMonitor: ReturnType<typeof createContextWindowMonitorHook> | null;
|
|
9
8
|
preemptiveCompaction: ReturnType<typeof createPreemptiveCompactionHook> | null;
|
|
10
9
|
sessionRecovery: ReturnType<typeof createSessionRecoveryHook> | null;
|
|
11
10
|
sessionNotification: ReturnType<typeof createSessionNotification> | null;
|
|
12
11
|
thinkMode: ReturnType<typeof createThinkModeHook> | null;
|
|
12
|
+
modelFallback: ReturnType<typeof createModelFallbackHook> | null;
|
|
13
13
|
anthropicContextWindowLimitRecovery: ReturnType<typeof createAnthropicContextWindowLimitRecoveryHook> | null;
|
|
14
14
|
autoUpdateChecker: ReturnType<typeof createAutoUpdateCheckerHook> | null;
|
|
15
15
|
agentUsageReminder: ReturnType<typeof createAgentUsageReminderHook> | null;
|
|
@@ -17,16 +17,16 @@ export type SessionHooks = {
|
|
|
17
17
|
interactiveBashSession: ReturnType<typeof createInteractiveBashSessionHook> | null;
|
|
18
18
|
ralphLoop: ReturnType<typeof createRalphLoopHook> | null;
|
|
19
19
|
editErrorRecovery: ReturnType<typeof createEditErrorRecoveryHook> | null;
|
|
20
|
-
jsonErrorRecovery: ReturnType<typeof createJsonErrorRecoveryHook> | null;
|
|
21
20
|
delegateTaskRetry: ReturnType<typeof createDelegateTaskRetryHook> | null;
|
|
22
21
|
startWork: ReturnType<typeof createStartWorkHook> | null;
|
|
23
22
|
prometheusMdOnly: ReturnType<typeof createPrometheusMdOnlyHook> | null;
|
|
24
23
|
sisyphusJuniorNotepad: ReturnType<typeof createSisyphusJuniorNotepadHook> | null;
|
|
25
24
|
noSisyphusGpt: ReturnType<typeof createNoSisyphusGptHook> | null;
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
noHephaestusNonGpt: ReturnType<typeof createNoHephaestusNonGptHook> | null;
|
|
26
|
+
questionLabelTruncator: ReturnType<typeof createQuestionLabelTruncatorHook> | null;
|
|
27
|
+
taskResumeInfo: ReturnType<typeof createTaskResumeInfoHook> | null;
|
|
28
28
|
anthropicEffort: ReturnType<typeof createAnthropicEffortHook> | null;
|
|
29
|
-
|
|
29
|
+
runtimeFallback: ReturnType<typeof createRuntimeFallbackHook> | null;
|
|
30
30
|
};
|
|
31
31
|
export declare function createSessionHooks(args: {
|
|
32
32
|
ctx: PluginContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HookName, OhMyOpenCodeConfig } from "../../config";
|
|
2
2
|
import type { ModelCacheState } from "../../plugin-state";
|
|
3
3
|
import type { PluginContext } from "../types";
|
|
4
|
-
import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createHashlineReadEnhancerHook } from "../../hooks";
|
|
4
|
+
import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createHashlineReadEnhancerHook, createJsonErrorRecoveryHook } from "../../hooks";
|
|
5
5
|
export type ToolGuardHooks = {
|
|
6
6
|
commentChecker: ReturnType<typeof createCommentCheckerHooks> | null;
|
|
7
7
|
toolOutputTruncator: ReturnType<typeof createToolOutputTruncatorHook> | null;
|
|
@@ -12,6 +12,7 @@ export type ToolGuardHooks = {
|
|
|
12
12
|
tasksTodowriteDisabler: ReturnType<typeof createTasksTodowriteDisablerHook> | null;
|
|
13
13
|
writeExistingFileGuard: ReturnType<typeof createWriteExistingFileGuardHook> | null;
|
|
14
14
|
hashlineReadEnhancer: ReturnType<typeof createHashlineReadEnhancerHook> | null;
|
|
15
|
+
jsonErrorRecovery: ReturnType<typeof createJsonErrorRecoveryHook> | null;
|
|
15
16
|
};
|
|
16
17
|
export declare function createToolGuardHooks(args: {
|
|
17
18
|
ctx: PluginContext;
|
|
@@ -3,7 +3,7 @@ import type { PluginContext } from "../types";
|
|
|
3
3
|
import { createClaudeCodeHooksHook, createKeywordDetectorHook, createThinkingBlockValidatorHook } from "../../hooks";
|
|
4
4
|
import { createContextInjectorMessagesTransformHook } from "../../features/context-injector";
|
|
5
5
|
export type TransformHooks = {
|
|
6
|
-
claudeCodeHooks: ReturnType<typeof createClaudeCodeHooksHook
|
|
6
|
+
claudeCodeHooks: ReturnType<typeof createClaudeCodeHooksHook> | null;
|
|
7
7
|
keywordDetector: ReturnType<typeof createKeywordDetectorHook> | null;
|
|
8
8
|
contextInjectorMessagesTransform: ReturnType<typeof createContextInjectorMessagesTransformHook>;
|
|
9
9
|
thinkingBlockValidator: ReturnType<typeof createThinkingBlockValidatorHook> | null;
|
package/dist/plugin/types.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import type { Plugin, ToolDefinition } from "@opencode-ai/plugin";
|
|
2
2
|
export type PluginContext = Parameters<Plugin>[0];
|
|
3
3
|
export type PluginInstance = Awaited<ReturnType<Plugin>>;
|
|
4
|
-
|
|
4
|
+
type ChatHeadersHook = PluginInstance extends {
|
|
5
|
+
"chat.headers"?: infer T;
|
|
6
|
+
} ? T : (input: unknown, output: unknown) => Promise<void>;
|
|
7
|
+
export type PluginInterface = Omit<PluginInstance, "experimental.session.compacting" | "chat.headers"> & {
|
|
8
|
+
"chat.headers"?: ChatHeadersHook;
|
|
9
|
+
};
|
|
5
10
|
export type ToolsRecord = Record<string, ToolDefinition>;
|
|
6
11
|
export type TmuxConfig = {
|
|
7
12
|
enabled: boolean;
|
|
@@ -10,3 +15,4 @@ export type TmuxConfig = {
|
|
|
10
15
|
main_pane_min_width: number;
|
|
11
16
|
agent_pane_min_width: number;
|
|
12
17
|
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schedules a deferred SQLite update to change the message model in the DB
|
|
3
|
+
* WITHOUT triggering a Bus event. Uses microtask retry loop to wait for
|
|
4
|
+
* Session.updateMessage() to save the message first, then overwrites the model.
|
|
5
|
+
*
|
|
6
|
+
* Falls back to setTimeout(fn, 0) after 10 microtask attempts.
|
|
7
|
+
*/
|
|
8
|
+
export declare function scheduleDeferredModelOverride(messageId: string, targetModel: {
|
|
9
|
+
providerID: string;
|
|
10
|
+
modelID: string;
|
|
11
|
+
}, variant?: string): void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { OhMyOpenCodeConfig } from "../config";
|
|
2
|
+
export declare function detectUltrawork(text: string): boolean;
|
|
3
|
+
export type UltraworkOverrideResult = {
|
|
4
|
+
providerID?: string;
|
|
5
|
+
modelID?: string;
|
|
6
|
+
variant?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the ultrawork model override config for the given agent and prompt text.
|
|
10
|
+
* Returns null if no override should be applied.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveUltraworkOverride(pluginConfig: OhMyOpenCodeConfig, inputAgentName: string | undefined, output: {
|
|
13
|
+
message: Record<string, unknown>;
|
|
14
|
+
parts: Array<{
|
|
15
|
+
type: string;
|
|
16
|
+
text?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}>;
|
|
19
|
+
}, sessionID?: string): UltraworkOverrideResult | null;
|
|
20
|
+
/**
|
|
21
|
+
* Applies ultrawork model override using a deferred DB update strategy.
|
|
22
|
+
*
|
|
23
|
+
* Instead of directly mutating output.message.model (which would cause the TUI
|
|
24
|
+
* bottom bar to show the override model), this schedules a queueMicrotask that
|
|
25
|
+
* updates the message model directly in SQLite AFTER Session.updateMessage()
|
|
26
|
+
* saves the original model, but BEFORE loop() reads it for the API call.
|
|
27
|
+
*
|
|
28
|
+
* Result: API call uses opus, TUI bottom bar stays on sonnet.
|
|
29
|
+
*/
|
|
30
|
+
export declare function applyUltraworkModelOverrideOnMessage(pluginConfig: OhMyOpenCodeConfig, inputAgentName: string | undefined, output: {
|
|
31
|
+
message: Record<string, unknown>;
|
|
32
|
+
parts: Array<{
|
|
33
|
+
type: string;
|
|
34
|
+
text?: string;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}>;
|
|
37
|
+
}, tui: unknown, sessionID?: string): void;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from "./system-directive";
|
|
|
30
30
|
export * from "./agent-tool-restrictions";
|
|
31
31
|
export * from "./model-requirements";
|
|
32
32
|
export * from "./model-resolver";
|
|
33
|
+
export { normalizeFallbackModels } from "./model-resolver";
|
|
33
34
|
export { resolveModelPipeline } from "./model-resolution-pipeline";
|
|
34
35
|
export type { ModelResolutionRequest, ModelResolutionProvenance, ModelResolutionResult, } from "./model-resolution-types";
|
|
35
36
|
export * from "./model-availability";
|
|
@@ -49,3 +50,5 @@ export * from "./opencode-message-dir";
|
|
|
49
50
|
export * from "./normalize-sdk-response";
|
|
50
51
|
export * from "./session-directory-resolver";
|
|
51
52
|
export * from "./prompt-tools";
|
|
53
|
+
export * from "./internal-initiator-marker";
|
|
54
|
+
export { SessionCategoryRegistry } from "./session-category-registry";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { FallbackEntry } from "./model-requirements";
|
|
2
|
+
export interface ErrorInfo {
|
|
3
|
+
name?: string;
|
|
4
|
+
message?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Determines if an error is a retryable model error.
|
|
8
|
+
* Returns true if the error is a known retryable type OR matches retryable message patterns.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isRetryableModelError(error: ErrorInfo): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Determines if an error should trigger a fallback retry.
|
|
13
|
+
* Returns true for deadstop errors that completely halt the action loop.
|
|
14
|
+
*/
|
|
15
|
+
export declare function shouldRetryError(error: ErrorInfo): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Gets the next fallback model from the chain based on attempt count.
|
|
18
|
+
* Returns undefined if all fallbacks have been exhausted.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getNextFallback(fallbackChain: FallbackEntry[], attemptCount: number): FallbackEntry | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Checks if there are more fallbacks available after the current attempt.
|
|
23
|
+
*/
|
|
24
|
+
export declare function hasMoreFallbacks(fallbackChain: FallbackEntry[], attemptCount: number): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Selects the best provider for a fallback entry.
|
|
27
|
+
* Priority:
|
|
28
|
+
* 1) First connected provider in the entry's provider preference order
|
|
29
|
+
* 2) First provider listed in the fallback entry (when cache is missing)
|
|
30
|
+
*/
|
|
31
|
+
export declare function selectFallbackProvider(providers: string[], preferredProviderID?: string): string;
|
|
@@ -13,6 +13,7 @@ export type ModelResolutionResult = {
|
|
|
13
13
|
export type ExtendedModelResolutionInput = {
|
|
14
14
|
uiSelectedModel?: string;
|
|
15
15
|
userModel?: string;
|
|
16
|
+
userFallbackModels?: string[];
|
|
16
17
|
categoryDefaultModel?: string;
|
|
17
18
|
fallbackChain?: FallbackEntry[];
|
|
18
19
|
availableModels: Set<string>;
|
|
@@ -20,3 +21,8 @@ export type ExtendedModelResolutionInput = {
|
|
|
20
21
|
};
|
|
21
22
|
export declare function resolveModel(input: ModelResolutionInput): string | undefined;
|
|
22
23
|
export declare function resolveModelWithFallback(input: ExtendedModelResolutionInput): ModelResolutionResult | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Normalizes fallback_models config (which can be string or string[]) to string[]
|
|
26
|
+
* Centralized helper to avoid duplicated normalization logic
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizeFallbackModels(models: string | string[] | undefined): string[] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function transformModelForProvider(provider: string, model: string): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Category Registry
|
|
3
|
+
*
|
|
4
|
+
* Maintains a mapping of session IDs to their assigned categories.
|
|
5
|
+
* Used by runtime-fallback hook to lookup category-specific fallback_models.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SessionCategoryRegistry: {
|
|
8
|
+
/**
|
|
9
|
+
* Register a session with its category
|
|
10
|
+
*/
|
|
11
|
+
register: (sessionID: string, category: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Get the category for a session
|
|
14
|
+
*/
|
|
15
|
+
get: (sessionID: string) => string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Remove a session from the registry (cleanup)
|
|
18
|
+
*/
|
|
19
|
+
remove: (sessionID: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Check if a session is registered
|
|
22
|
+
*/
|
|
23
|
+
has: (sessionID: string) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Get the size of the registry (for debugging)
|
|
26
|
+
*/
|
|
27
|
+
size: () => number;
|
|
28
|
+
/**
|
|
29
|
+
* Clear all entries (use with caution, mainly for testing)
|
|
30
|
+
*/
|
|
31
|
+
clear: () => void;
|
|
32
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type SessionModel = {
|
|
2
|
+
providerID: string;
|
|
3
|
+
modelID: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function setSessionModel(sessionID: string, model: SessionModel): void;
|
|
6
|
+
export declare function getSessionModel(sessionID: string): SessionModel | undefined;
|
|
7
|
+
export declare function clearSessionModel(sessionID: string): void;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
import type { TmuxLayout } from "../../../config/schema";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type TmuxSpawnCommand = (args: string[], options: {
|
|
3
|
+
stdout: "ignore";
|
|
4
|
+
stderr: "ignore";
|
|
5
|
+
}) => {
|
|
6
|
+
exited: Promise<number>;
|
|
7
|
+
};
|
|
8
|
+
interface LayoutDeps {
|
|
9
|
+
spawnCommand?: TmuxSpawnCommand;
|
|
10
|
+
}
|
|
11
|
+
interface MainPaneWidthOptions {
|
|
12
|
+
mainPaneSize?: number;
|
|
13
|
+
mainPaneMinWidth?: number;
|
|
14
|
+
agentPaneMinWidth?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function applyLayout(tmux: string, layout: TmuxLayout, mainPaneSize: number, deps?: LayoutDeps): Promise<void>;
|
|
17
|
+
export declare function enforceMainPaneWidth(mainPaneId: string, windowWidth: number, mainPaneSizeOrOptions?: number | MainPaneWidthOptions): Promise<void>;
|
|
18
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { DelegateTaskArgs, ToolContextWithMetadata } from "./types";
|
|
2
2
|
import type { ExecutorContext, ParentContext } from "./executor-types";
|
|
3
|
+
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
3
4
|
export declare function executeBackgroundTask(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, parentContext: ParentContext, agentToUse: string, categoryModel: {
|
|
4
5
|
providerID: string;
|
|
5
6
|
modelID: string;
|
|
6
7
|
variant?: string;
|
|
7
|
-
} | undefined, systemContent: string | undefined): Promise<string>;
|
|
8
|
+
} | undefined, systemContent: string | undefined, fallbackChain?: FallbackEntry[]): Promise<string>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ModelFallbackInfo } from "../../features/task-toast-manager/types";
|
|
2
2
|
import type { DelegateTaskArgs } from "./types";
|
|
3
3
|
import type { ExecutorContext } from "./executor-types";
|
|
4
|
+
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
4
5
|
export interface CategoryResolutionResult {
|
|
5
6
|
agentToUse: string;
|
|
6
7
|
categoryModel: {
|
|
@@ -12,6 +13,7 @@ export interface CategoryResolutionResult {
|
|
|
12
13
|
modelInfo: ModelFallbackInfo | undefined;
|
|
13
14
|
actualModel: string | undefined;
|
|
14
15
|
isUnstableAgent: boolean;
|
|
16
|
+
fallbackChain?: FallbackEntry[];
|
|
15
17
|
error?: string;
|
|
16
18
|
}
|
|
17
19
|
export declare function resolveCategoryExecution(args: DelegateTaskArgs, executorCtx: ExecutorContext, inheritedModel: string | undefined, systemDefaultModel: string | undefined): Promise<CategoryResolutionResult>;
|
|
@@ -3,6 +3,7 @@ export declare function resolveSkillContent(skills: string[], options: {
|
|
|
3
3
|
gitMasterConfig?: GitMasterConfig;
|
|
4
4
|
browserProvider?: BrowserAutomationProvider;
|
|
5
5
|
disabledSkills?: Set<string>;
|
|
6
|
+
directory?: string;
|
|
6
7
|
}): Promise<{
|
|
7
8
|
content: string | undefined;
|
|
8
9
|
error: string | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DelegateTaskArgs } from "./types";
|
|
2
2
|
import type { ExecutorContext } from "./executor-types";
|
|
3
|
+
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
3
4
|
export declare function resolveSubagentExecution(args: DelegateTaskArgs, executorCtx: ExecutorContext, parentAgent: string | undefined, categoryExamples: string): Promise<{
|
|
4
5
|
agentToUse: string;
|
|
5
6
|
categoryModel: {
|
|
@@ -7,5 +8,6 @@ export declare function resolveSubagentExecution(args: DelegateTaskArgs, executo
|
|
|
7
8
|
modelID: string;
|
|
8
9
|
variant?: string;
|
|
9
10
|
} | undefined;
|
|
11
|
+
fallbackChain?: FallbackEntry[];
|
|
10
12
|
error?: string;
|
|
11
13
|
}>;
|
|
@@ -6,4 +6,4 @@ export declare function executeSyncTask(args: DelegateTaskArgs, ctx: ToolContext
|
|
|
6
6
|
providerID: string;
|
|
7
7
|
modelID: string;
|
|
8
8
|
variant?: string;
|
|
9
|
-
} | undefined, systemContent: string | undefined, modelInfo?: ModelFallbackInfo, deps?: SyncTaskDeps): Promise<string>;
|
|
9
|
+
} | undefined, systemContent: string | undefined, modelInfo?: ModelFallbackInfo, fallbackChain?: import("../../shared/model-requirements").FallbackEntry[], deps?: SyncTaskDeps): Promise<string>;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const NIBBLE_STR = "ZPMQVRWSNKTXJBYH";
|
|
2
|
+
export declare const HASHLINE_DICT: string[];
|
|
3
|
+
export declare const HASHLINE_REF_PATTERN: RegExp;
|
|
4
|
+
export declare const HASHLINE_OUTPUT_PATTERN: RegExp;
|
|
5
|
+
export declare const HASHLINE_LEGACY_REF_PATTERN: RegExp;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function toHashlineContent(content: string): string;
|
|
2
|
+
export declare function generateUnifiedDiff(oldContent: string, newContent: string, filePath: string): string;
|
|
3
|
+
export declare function countLineDiffs(oldContent: string, newContent: string): {
|
|
4
|
+
additions: number;
|
|
5
|
+
deletions: number;
|
|
6
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HashlineEdit } from "./types";
|
|
2
|
-
export declare function applySetLine(lines: string[], anchor: string, newText: string): string[];
|
|
3
|
-
export declare function applyReplaceLines(lines: string[], startAnchor: string, endAnchor: string, newText: string): string[];
|
|
4
|
-
export declare function applyInsertAfter(lines: string[], anchor: string, text: string): string[];
|
|
5
|
-
export declare function applyReplace(content: string, oldText: string, newText: string): string;
|
|
2
|
+
export declare function applySetLine(lines: string[], anchor: string, newText: string | string[]): string[];
|
|
3
|
+
export declare function applyReplaceLines(lines: string[], startAnchor: string, endAnchor: string, newText: string | string[]): string[];
|
|
4
|
+
export declare function applyInsertAfter(lines: string[], anchor: string, text: string | string[]): string[];
|
|
5
|
+
export declare function applyReplace(content: string, oldText: string, newText: string | string[]): string;
|
|
6
6
|
export declare function applyHashlineEdits(content: string, edits: HashlineEdit[]): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function computeLineHash(
|
|
1
|
+
export declare function computeLineHash(lineNumber: number, content: string): string;
|
|
2
2
|
export declare function formatHashLine(lineNumber: number, content: string): string;
|
|
3
3
|
export declare function formatHashLines(content: string): string;
|
|
@@ -2,6 +2,6 @@ export { computeLineHash, formatHashLine, formatHashLines } from "./hash-computa
|
|
|
2
2
|
export { parseLineRef, validateLineRef } from "./validation";
|
|
3
3
|
export type { LineRef } from "./validation";
|
|
4
4
|
export type { SetLine, ReplaceLines, InsertAfter, Replace, HashlineEdit } from "./types";
|
|
5
|
-
export {
|
|
5
|
+
export { NIBBLE_STR, HASHLINE_DICT, HASHLINE_REF_PATTERN, HASHLINE_OUTPUT_PATTERN } from "./constants";
|
|
6
6
|
export { applyHashlineEdits, applyInsertAfter, applyReplace, applyReplaceLines, applySetLine, } from "./edit-operations";
|
|
7
7
|
export { createHashlineEditTool } from "./tools";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export interface SetLine {
|
|
2
2
|
type: "set_line";
|
|
3
3
|
line: string;
|
|
4
|
-
text: string;
|
|
4
|
+
text: string | string[];
|
|
5
5
|
}
|
|
6
6
|
export interface ReplaceLines {
|
|
7
7
|
type: "replace_lines";
|
|
8
8
|
start_line: string;
|
|
9
9
|
end_line: string;
|
|
10
|
-
text: string;
|
|
10
|
+
text: string | string[];
|
|
11
11
|
}
|
|
12
12
|
export interface InsertAfter {
|
|
13
13
|
type: "insert_after";
|
|
14
14
|
line: string;
|
|
15
|
-
text: string;
|
|
15
|
+
text: string | string[];
|
|
16
16
|
}
|
|
17
17
|
export interface Replace {
|
|
18
18
|
type: "replace";
|
|
19
19
|
old_text: string;
|
|
20
|
-
new_text: string;
|
|
20
|
+
new_text: string | string[];
|
|
21
21
|
}
|
|
22
22
|
export type HashlineEdit = SetLine | ReplaceLines | InsertAfter | Replace;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ export { lspManager };
|
|
|
3
3
|
export { createAstGrepTools } from "./ast-grep";
|
|
4
4
|
export { createGrepTools } from "./grep";
|
|
5
5
|
export { createGlobTools } from "./glob";
|
|
6
|
-
export {
|
|
6
|
+
export { createSkillTool } from "./skill";
|
|
7
|
+
export { discoverCommandsSync } from "./slashcommand";
|
|
7
8
|
export { createSessionManagerTools } from "./session-manager";
|
|
8
9
|
export { sessionExists } from "./session-manager/storage";
|
|
9
10
|
export { interactive_bash, startBackgroundCheck as startTmuxCheck } from "./interactive-bash";
|
|
10
|
-
export { createSkillTool } from "./skill";
|
|
11
11
|
export { createSkillMcpTool } from "./skill-mcp";
|
|
12
12
|
import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin";
|
|
13
13
|
import type { BackgroundManager } from "../features/background-agent";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const TOOL_NAME: "skill";
|
|
2
|
-
export declare const TOOL_DESCRIPTION_NO_SKILLS = "Load a skill to get detailed instructions for a specific task. No skills are currently available.";
|
|
3
|
-
export declare const TOOL_DESCRIPTION_PREFIX = "Load a skill to get detailed instructions for a specific task.\n\nSkills provide specialized knowledge and step-by-step guidance.\nUse this when a task matches an available skill's description
|
|
2
|
+
export declare const TOOL_DESCRIPTION_NO_SKILLS = "Load a skill or execute a slash command to get detailed instructions for a specific task. No skills are currently available.";
|
|
3
|
+
export declare const TOOL_DESCRIPTION_PREFIX = "Load a skill or execute a slash command to get detailed instructions for a specific task.\n\nSkills and commands provide specialized knowledge and step-by-step guidance.\nUse this when a task matches an available skill's or command's description.\n\n**How to use:**\n- Call with a skill name: name='code-review'\n- Call with a command name (without leading slash): name='publish'\n- The tool will return detailed instructions with your context applied.\n";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { SkillScope, LoadedSkill } from "../../features/opencode-skill-loader/types";
|
|
2
2
|
import type { SkillMcpManager } from "../../features/skill-mcp-manager";
|
|
3
3
|
import type { GitMasterConfig } from "../../config/schema";
|
|
4
|
+
import type { CommandInfo } from "../slashcommand/types";
|
|
4
5
|
export interface SkillArgs {
|
|
5
6
|
name: string;
|
|
7
|
+
user_message?: string;
|
|
6
8
|
}
|
|
7
9
|
export interface SkillInfo {
|
|
8
10
|
name: string;
|
|
@@ -19,6 +21,8 @@ export interface SkillLoadOptions {
|
|
|
19
21
|
opencodeOnly?: boolean;
|
|
20
22
|
/** Pre-merged skills to use instead of discovering */
|
|
21
23
|
skills?: LoadedSkill[];
|
|
24
|
+
/** Pre-discovered commands to use instead of discovering */
|
|
25
|
+
commands?: CommandInfo[];
|
|
22
26
|
/** MCP manager for querying skill-embedded MCP servers */
|
|
23
27
|
mcpManager?: SkillMcpManager;
|
|
24
28
|
/** Session ID getter for MCP client identification */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
|
-
export {
|
|
2
|
+
export { discoverCommandsSync } from "./command-discovery";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LazyContentLoader } from "../../features/opencode-skill-loader";
|
|
2
2
|
export type CommandScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project";
|
|
3
3
|
export interface CommandMetadata {
|
|
4
4
|
name: string;
|
|
@@ -16,9 +16,3 @@ export interface CommandInfo {
|
|
|
16
16
|
scope: CommandScope;
|
|
17
17
|
lazyContentLoader?: LazyContentLoader;
|
|
18
18
|
}
|
|
19
|
-
export interface SlashcommandToolOptions {
|
|
20
|
-
/** Pre-loaded commands (skip discovery if provided) */
|
|
21
|
-
commands?: CommandInfo[];
|
|
22
|
-
/** Pre-loaded skills (skip discovery if provided) */
|
|
23
|
-
skills?: LoadedSkill[];
|
|
24
|
-
}
|