oh-my-opencode 2.14.0 → 3.0.0-beta.10
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 +173 -97
- package/README.md +247 -109
- package/README.zh-cn.md +708 -502
- package/bin/oh-my-opencode.js +80 -0
- package/bin/platform.js +38 -0
- package/bin/platform.test.ts +148 -0
- package/dist/agents/metis.d.ts +19 -0
- package/dist/agents/momus.d.ts +6 -0
- package/dist/agents/momus.test.d.ts +1 -0
- package/dist/agents/orchestrator-sisyphus.d.ts +20 -0
- package/dist/agents/prometheus-prompt.d.ts +29 -0
- package/dist/agents/prometheus-prompt.test.d.ts +1 -0
- package/dist/agents/sisyphus-junior.d.ts +8 -0
- package/dist/agents/sisyphus-junior.test.d.ts +1 -0
- package/dist/agents/types.d.ts +2 -1
- package/dist/agents/utils.d.ts +6 -2
- package/dist/cli/config-manager.d.ts +9 -1
- package/dist/cli/doctor/checks/opencode.d.ts +5 -1
- package/dist/cli/index.js +5394 -5052
- package/dist/cli/run/events.d.ts +1 -0
- package/dist/cli/types.d.ts +3 -0
- package/dist/config/schema.d.ts +756 -163
- package/dist/features/background-agent/concurrency.d.ts +17 -0
- package/dist/features/background-agent/manager.d.ts +53 -2
- package/dist/features/background-agent/types.d.ts +34 -1
- package/dist/features/boulder-state/constants.d.ts +10 -0
- package/dist/features/boulder-state/index.d.ts +3 -0
- package/dist/features/boulder-state/storage.d.ts +28 -0
- package/dist/features/boulder-state/storage.test.d.ts +1 -0
- package/dist/features/boulder-state/types.d.ts +24 -0
- package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -0
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/features/claude-code-session-state/state.d.ts +6 -1
- package/dist/features/claude-code-session-state/state.test.d.ts +1 -0
- package/dist/features/context-injector/index.d.ts +1 -1
- package/dist/features/context-injector/injector.d.ts +1 -1
- package/dist/features/hook-message-injector/index.d.ts +2 -2
- package/dist/features/hook-message-injector/injector.d.ts +9 -2
- package/dist/features/hook-message-injector/types.d.ts +3 -2
- package/dist/features/opencode-skill-loader/index.d.ts +1 -0
- package/dist/features/opencode-skill-loader/skill-content.d.ts +20 -0
- package/dist/features/opencode-skill-loader/skill-content.test.d.ts +1 -0
- package/dist/features/skill-mcp-manager/manager.d.ts +11 -0
- package/dist/features/task-toast-manager/index.d.ts +2 -0
- package/dist/features/task-toast-manager/manager.d.ts +57 -0
- package/dist/features/task-toast-manager/manager.test.d.ts +1 -0
- package/dist/features/task-toast-manager/types.d.ts +21 -0
- package/dist/hooks/agent-usage-reminder/constants.d.ts +1 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +1 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/index.d.ts +1 -2
- package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +0 -5
- package/dist/hooks/auto-update-checker/checker.d.ts +1 -1
- package/dist/hooks/auto-update-checker/checker.test.d.ts +1 -0
- package/dist/hooks/auto-update-checker/index.d.ts +4 -0
- package/dist/hooks/auto-update-checker/index.test.d.ts +1 -0
- package/dist/hooks/background-compaction/index.d.ts +19 -0
- package/dist/hooks/background-notification/index.d.ts +6 -0
- package/dist/hooks/claude-code-hooks/index.d.ts +2 -1
- package/dist/hooks/claude-code-hooks/types.d.ts +1 -0
- package/dist/hooks/comment-checker/cli.d.ts +0 -1
- package/dist/hooks/comment-checker/cli.test.d.ts +1 -0
- package/dist/hooks/compaction-context-injector/index.d.ts +7 -1
- package/dist/hooks/delegate-task-retry/index.d.ts +24 -0
- package/dist/hooks/delegate-task-retry/index.test.d.ts +1 -0
- package/dist/hooks/index.d.ts +5 -2
- package/dist/hooks/keyword-detector/index.d.ts +2 -1
- package/dist/hooks/prometheus-md-only/constants.d.ts +6 -0
- package/dist/hooks/prometheus-md-only/index.d.ts +12 -0
- package/dist/hooks/prometheus-md-only/index.test.d.ts +1 -0
- package/dist/hooks/ralph-loop/index.d.ts +1 -0
- package/dist/hooks/ralph-loop/types.d.ts +1 -0
- package/dist/hooks/sisyphus-orchestrator/index.d.ts +35 -0
- package/dist/hooks/sisyphus-orchestrator/index.test.d.ts +1 -0
- package/dist/hooks/start-work/index.d.ts +16 -0
- package/dist/hooks/start-work/index.test.d.ts +1 -0
- package/dist/hooks/task-resume-info/index.d.ts +11 -0
- package/dist/hooks/todo-continuation-enforcer.d.ts +1 -0
- package/dist/index.js +28035 -20876
- package/dist/mcp/context7.d.ts +1 -0
- package/dist/mcp/grep-app.d.ts +1 -0
- package/dist/mcp/index.d.ts +5 -2
- package/dist/mcp/websearch.d.ts +4 -0
- package/dist/plugin-config.test.d.ts +1 -0
- package/dist/plugin-handlers/config-handler.d.ts +2 -0
- package/dist/plugin-handlers/config-handler.test.d.ts +1 -0
- package/dist/shared/agent-tool-restrictions.d.ts +7 -0
- package/dist/shared/agent-variant.d.ts +5 -0
- package/dist/shared/agent-variant.test.d.ts +1 -0
- package/dist/shared/deep-merge.test.d.ts +1 -0
- package/dist/shared/external-plugin-detector.d.ts +18 -0
- package/dist/shared/external-plugin-detector.test.d.ts +1 -0
- package/dist/shared/first-message-variant.d.ts +11 -0
- package/dist/shared/first-message-variant.test.d.ts +1 -0
- package/dist/shared/index.d.ts +7 -0
- package/dist/shared/migration.d.ts +7 -0
- package/dist/shared/opencode-version.d.ts +6 -3
- package/dist/shared/permission-compat.d.ts +22 -7
- package/dist/shared/session-cursor.d.ts +13 -0
- package/dist/shared/session-cursor.test.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +41 -0
- package/dist/shared/shell-env.test.d.ts +1 -0
- package/dist/shared/system-directive.d.ts +31 -0
- package/dist/shared/zip-extractor.d.ts +1 -0
- package/dist/tools/background-task/index.d.ts +1 -1
- package/dist/tools/call-omo-agent/constants.d.ts +1 -1
- package/dist/tools/delegate-task/constants.d.ts +12 -0
- package/dist/tools/delegate-task/index.d.ts +3 -0
- package/dist/tools/delegate-task/tools.d.ts +18 -0
- package/dist/tools/delegate-task/tools.test.d.ts +1 -0
- package/dist/tools/delegate-task/types.d.ts +9 -0
- package/dist/tools/glob/cli.d.ts +4 -0
- package/dist/tools/glob/cli.test.d.ts +1 -0
- package/dist/tools/glob/types.d.ts +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/interactive-bash/constants.d.ts +1 -1
- package/dist/tools/look-at/tools.d.ts +7 -0
- package/dist/tools/look-at/tools.test.d.ts +1 -0
- package/dist/tools/lsp/client.d.ts +1 -3
- package/dist/tools/lsp/config.test.d.ts +1 -0
- package/dist/tools/lsp/index.d.ts +1 -1
- package/dist/tools/lsp/tools.d.ts +1 -6
- package/dist/tools/lsp/types.d.ts +0 -33
- package/dist/tools/lsp/utils.d.ts +1 -4
- package/dist/tools/skill/tools.d.ts +1 -7
- package/dist/tools/skill/types.d.ts +3 -0
- package/dist/tools/skill-mcp/types.d.ts +1 -1
- package/dist/tools/slashcommand/tools.d.ts +1 -7
- package/package.json +22 -14
- package/postinstall.mjs +43 -0
- package/dist/agents/build-prompt.d.ts +0 -31
- package/dist/agents/plan-prompt.d.ts +0 -61
- package/dist/auth/antigravity/constants.d.ts +0 -36
- package/dist/auth/antigravity/fetch.d.ts +0 -68
- package/dist/auth/antigravity/index.d.ts +0 -13
- package/dist/auth/antigravity/message-converter.d.ts +0 -54
- package/dist/auth/antigravity/oauth.d.ts +0 -85
- package/dist/auth/antigravity/plugin.d.ts +0 -54
- package/dist/auth/antigravity/project.d.ts +0 -10
- package/dist/auth/antigravity/request.d.ts +0 -104
- package/dist/auth/antigravity/response.d.ts +0 -137
- package/dist/auth/antigravity/thinking.d.ts +0 -234
- package/dist/auth/antigravity/thought-signature-store.d.ts +0 -52
- package/dist/auth/antigravity/token.d.ts +0 -38
- package/dist/auth/antigravity/tools.d.ts +0 -119
- package/dist/auth/antigravity/types.d.ts +0 -205
- package/dist/cli/ast-grep-napi.linux-x64-gnu-jfv8414z.node +0 -0
- package/dist/cli/ast-grep-napi.linux-x64-musl-8cj2e5cf.node +0 -0
- package/dist/google-auth.d.ts +0 -3
- package/dist/google-auth.js +0 -1865
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-executor.d.ts +0 -3
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-purge-errors.d.ts +0 -7
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-storage.d.ts +0 -2
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-supersede.d.ts +0 -6
- package/dist/hooks/comment-checker/constants.d.ts +0 -3
- package/dist/hooks/comment-checker/filters/bdd.d.ts +0 -2
- package/dist/hooks/comment-checker/filters/directive.d.ts +0 -2
- package/dist/hooks/comment-checker/filters/docstring.d.ts +0 -2
- package/dist/hooks/comment-checker/filters/index.d.ts +0 -7
- package/dist/hooks/comment-checker/filters/shebang.d.ts +0 -2
- package/dist/hooks/comment-checker/output/formatter.d.ts +0 -2
- package/dist/hooks/comment-checker/output/index.d.ts +0 -2
- package/dist/hooks/comment-checker/output/xml-builder.d.ts +0 -2
- package/dist/hooks/empty-message-sanitizer/index.d.ts +0 -12
- package/dist/hooks/preemptive-compaction/constants.d.ts +0 -3
- package/dist/hooks/preemptive-compaction/index.d.ts +0 -24
- package/dist/hooks/preemptive-compaction/types.d.ts +0 -17
- package/dist/tools/ast-grep/napi.d.ts +0 -13
- package/dist/tools/interactive-bash/types.d.ts +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AutoCompactState } from "./types";
|
|
2
2
|
import type { ExperimentalConfig } from "../../config";
|
|
3
3
|
export declare function getLastAssistant(sessionID: string, client: any, directory: string): Promise<Record<string, unknown> | null>;
|
|
4
|
-
export declare function executeCompact(sessionID: string, msg: Record<string, unknown>, autoCompactState: AutoCompactState, client: any, directory: string, experimental?: ExperimentalConfig
|
|
4
|
+
export declare function executeCompact(sessionID: string, msg: Record<string, unknown>, autoCompactState: AutoCompactState, client: any, directory: string, experimental?: ExperimentalConfig): Promise<void>;
|
|
@@ -2,7 +2,6 @@ import type { PluginInput } from "@opencode-ai/plugin";
|
|
|
2
2
|
import type { ExperimentalConfig } from "../../config";
|
|
3
3
|
export interface AnthropicContextWindowLimitRecoveryOptions {
|
|
4
4
|
experimental?: ExperimentalConfig;
|
|
5
|
-
dcpForCompaction?: boolean;
|
|
6
5
|
}
|
|
7
6
|
export declare function createAnthropicContextWindowLimitRecoveryHook(ctx: PluginInput, options?: AnthropicContextWindowLimitRecoveryOptions): {
|
|
8
7
|
event: ({ event }: {
|
|
@@ -12,6 +11,6 @@ export declare function createAnthropicContextWindowLimitRecoveryHook(ctx: Plugi
|
|
|
12
11
|
};
|
|
13
12
|
}) => Promise<void>;
|
|
14
13
|
};
|
|
15
|
-
export type { AutoCompactState,
|
|
14
|
+
export type { AutoCompactState, ParsedTokenLimitError, TruncateState } from "./types";
|
|
16
15
|
export { parseAnthropicTokenLimitError } from "./parser";
|
|
17
16
|
export { executeCompact, getLastAssistant } from "./executor";
|
|
@@ -15,16 +15,11 @@ export interface TruncateState {
|
|
|
15
15
|
truncateAttempt: number;
|
|
16
16
|
lastTruncatedPartId?: string;
|
|
17
17
|
}
|
|
18
|
-
export interface DcpState {
|
|
19
|
-
attempted: boolean;
|
|
20
|
-
itemsPruned: number;
|
|
21
|
-
}
|
|
22
18
|
export interface AutoCompactState {
|
|
23
19
|
pendingCompact: Set<string>;
|
|
24
20
|
errorDataBySession: Map<string, ParsedTokenLimitError>;
|
|
25
21
|
retryStateBySession: Map<string, RetryState>;
|
|
26
22
|
truncateStateBySession: Map<string, TruncateState>;
|
|
27
|
-
dcpStateBySession: Map<string, DcpState>;
|
|
28
23
|
emptyContentAttemptBySession: Map<string, number>;
|
|
29
24
|
compactionInProgress: Set<string>;
|
|
30
25
|
}
|
|
@@ -16,5 +16,5 @@ export declare function getCachedVersion(): string | null;
|
|
|
16
16
|
* Preserves JSONC comments and formatting via string replacement.
|
|
17
17
|
*/
|
|
18
18
|
export declare function updatePinnedVersion(configPath: string, oldEntry: string, newVersion: string): boolean;
|
|
19
|
-
export declare function getLatestVersion(): Promise<string | null>;
|
|
19
|
+
export declare function getLatestVersion(channel?: string): Promise<string | null>;
|
|
20
20
|
export declare function checkForUpdate(directory: string): Promise<UpdateCheckResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { AutoUpdateCheckerOptions } from "./types";
|
|
3
|
+
export declare function isPrereleaseVersion(version: string): boolean;
|
|
4
|
+
export declare function isDistTag(version: string): boolean;
|
|
5
|
+
export declare function isPrereleaseOrDistTag(pinnedVersion: string | null): boolean;
|
|
6
|
+
export declare function extractChannel(version: string | null): string;
|
|
3
7
|
export declare function createAutoUpdateCheckerHook(ctx: PluginInput, options?: AutoUpdateCheckerOptions): {
|
|
4
8
|
event: ({ event }: {
|
|
5
9
|
event: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BackgroundManager } from "../../features/background-agent";
|
|
2
|
+
interface CompactingInput {
|
|
3
|
+
sessionID: string;
|
|
4
|
+
}
|
|
5
|
+
interface CompactingOutput {
|
|
6
|
+
context: string[];
|
|
7
|
+
prompt?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Background agent compaction hook - preserves task state during context compaction.
|
|
11
|
+
*
|
|
12
|
+
* When OpenCode compacts session context to save tokens, this hook injects
|
|
13
|
+
* information about running and recently completed background tasks so the
|
|
14
|
+
* agent doesn't lose awareness of delegated work.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createBackgroundCompactionHook(manager: BackgroundManager): {
|
|
17
|
+
"experimental.session.compacting": (input: CompactingInput, output: CompactingOutput) => Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -6,6 +6,12 @@ interface Event {
|
|
|
6
6
|
interface EventInput {
|
|
7
7
|
event: Event;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Background notification hook - handles event routing to BackgroundManager.
|
|
11
|
+
*
|
|
12
|
+
* Notifications are now delivered directly via session.prompt({ noReply })
|
|
13
|
+
* from the manager, so this hook only needs to handle event routing.
|
|
14
|
+
*/
|
|
9
15
|
export declare function createBackgroundNotificationHook(manager: BackgroundManager): {
|
|
10
16
|
event: ({ event }: EventInput) => Promise<void>;
|
|
11
17
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { PluginConfig } from "./types";
|
|
3
|
-
|
|
3
|
+
import type { ContextCollector } from "../../features/context-injector";
|
|
4
|
+
export declare function createClaudeCodeHooksHook(ctx: PluginInput, config?: PluginConfig, contextCollector?: ContextCollector): {
|
|
4
5
|
"experimental.session.compacting": (input: {
|
|
5
6
|
sessionID: string;
|
|
6
7
|
}, output: {
|
|
@@ -13,7 +13,6 @@ export declare function getCommentCheckerPathSync(): string | null;
|
|
|
13
13
|
* Call this early to trigger download while other init happens.
|
|
14
14
|
*/
|
|
15
15
|
export declare function startBackgroundInit(): void;
|
|
16
|
-
export declare const COMMENT_CHECKER_CLI_PATH: string | null;
|
|
17
16
|
export interface HookInput {
|
|
18
17
|
session_id: string;
|
|
19
18
|
tool_name: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
export interface SummarizeContext {
|
|
2
|
+
sessionID: string;
|
|
3
|
+
providerID: string;
|
|
4
|
+
modelID: string;
|
|
5
|
+
usageRatio: number;
|
|
6
|
+
directory: string;
|
|
7
|
+
}
|
|
2
8
|
export declare function createCompactionContextInjector(): (ctx: SummarizeContext) => Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export interface DelegateTaskErrorPattern {
|
|
3
|
+
pattern: string;
|
|
4
|
+
errorType: string;
|
|
5
|
+
fixHint: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const DELEGATE_TASK_ERROR_PATTERNS: DelegateTaskErrorPattern[];
|
|
8
|
+
export interface DetectedError {
|
|
9
|
+
errorType: string;
|
|
10
|
+
originalOutput: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function detectDelegateTaskError(output: string): DetectedError | null;
|
|
13
|
+
export declare function buildRetryGuidance(errorInfo: DetectedError): string;
|
|
14
|
+
export declare function createDelegateTaskRetryHook(_ctx: PluginInput): {
|
|
15
|
+
"tool.execute.after": (input: {
|
|
16
|
+
tool: string;
|
|
17
|
+
sessionID: string;
|
|
18
|
+
callID: string;
|
|
19
|
+
}, output: {
|
|
20
|
+
title: string;
|
|
21
|
+
output: string;
|
|
22
|
+
metadata: unknown;
|
|
23
|
+
}) => Promise<void>;
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
|
|
|
8
8
|
export { createDirectoryReadmeInjectorHook } from "./directory-readme-injector";
|
|
9
9
|
export { createEmptyTaskResponseDetectorHook } from "./empty-task-response-detector";
|
|
10
10
|
export { createAnthropicContextWindowLimitRecoveryHook, type AnthropicContextWindowLimitRecoveryOptions } from "./anthropic-context-window-limit-recovery";
|
|
11
|
-
export { createPreemptiveCompactionHook, type PreemptiveCompactionOptions, type SummarizeContext, type BeforeSummarizeCallback } from "./preemptive-compaction";
|
|
12
11
|
export { createCompactionContextInjector } from "./compaction-context-injector";
|
|
13
12
|
export { createThinkModeHook } from "./think-mode";
|
|
14
13
|
export { createClaudeCodeHooksHook } from "./claude-code-hooks";
|
|
@@ -19,8 +18,12 @@ export { createAgentUsageReminderHook } from "./agent-usage-reminder";
|
|
|
19
18
|
export { createKeywordDetectorHook } from "./keyword-detector";
|
|
20
19
|
export { createNonInteractiveEnvHook } from "./non-interactive-env";
|
|
21
20
|
export { createInteractiveBashSessionHook } from "./interactive-bash-session";
|
|
22
|
-
export { createEmptyMessageSanitizerHook } from "./empty-message-sanitizer";
|
|
23
21
|
export { createThinkingBlockValidatorHook } from "./thinking-block-validator";
|
|
24
22
|
export { createRalphLoopHook, type RalphLoopHook } from "./ralph-loop";
|
|
25
23
|
export { createAutoSlashCommandHook } from "./auto-slash-command";
|
|
26
24
|
export { createEditErrorRecoveryHook } from "./edit-error-recovery";
|
|
25
|
+
export { createPrometheusMdOnlyHook } from "./prometheus-md-only";
|
|
26
|
+
export { createTaskResumeInfoHook } from "./task-resume-info";
|
|
27
|
+
export { createStartWorkHook } from "./start-work";
|
|
28
|
+
export { createSisyphusOrchestratorHook } from "./sisyphus-orchestrator";
|
|
29
|
+
export { createDelegateTaskRetryHook } from "./delegate-task-retry";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { ContextCollector } from "../../features/context-injector";
|
|
2
3
|
export * from "./detector";
|
|
3
4
|
export * from "./constants";
|
|
4
5
|
export * from "./types";
|
|
5
|
-
export declare function createKeywordDetectorHook(ctx: PluginInput): {
|
|
6
|
+
export declare function createKeywordDetectorHook(ctx: PluginInput, collector?: ContextCollector): {
|
|
6
7
|
"chat.message": (input: {
|
|
7
8
|
sessionID: string;
|
|
8
9
|
agent?: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const HOOK_NAME = "prometheus-md-only";
|
|
2
|
+
export declare const PROMETHEUS_AGENTS: string[];
|
|
3
|
+
export declare const ALLOWED_EXTENSIONS: string[];
|
|
4
|
+
export declare const ALLOWED_PATH_PREFIX = ".sisyphus";
|
|
5
|
+
export declare const BLOCKED_TOOLS: string[];
|
|
6
|
+
export declare const PLANNING_CONSULT_WARNING: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export * from "./constants";
|
|
3
|
+
export declare function createPrometheusMdOnlyHook(ctx: PluginInput): {
|
|
4
|
+
"tool.execute.before": (input: {
|
|
5
|
+
tool: string;
|
|
6
|
+
sessionID: string;
|
|
7
|
+
callID: string;
|
|
8
|
+
}, output: {
|
|
9
|
+
args: Record<string, unknown>;
|
|
10
|
+
message?: string;
|
|
11
|
+
}) => Promise<void>;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,6 +13,7 @@ export interface RalphLoopHook {
|
|
|
13
13
|
startLoop: (sessionID: string, prompt: string, options?: {
|
|
14
14
|
maxIterations?: number;
|
|
15
15
|
completionPromise?: string;
|
|
16
|
+
ultrawork?: boolean;
|
|
16
17
|
}) => boolean;
|
|
17
18
|
cancelLoop: (sessionID: string) => boolean;
|
|
18
19
|
getState: () => RalphLoopState | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
|
+
export declare const HOOK_NAME = "sisyphus-orchestrator";
|
|
4
|
+
interface ToolExecuteAfterInput {
|
|
5
|
+
tool: string;
|
|
6
|
+
sessionID?: string;
|
|
7
|
+
callID?: string;
|
|
8
|
+
}
|
|
9
|
+
interface ToolExecuteAfterOutput {
|
|
10
|
+
title: string;
|
|
11
|
+
output: string;
|
|
12
|
+
metadata: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export interface SisyphusOrchestratorHookOptions {
|
|
15
|
+
directory: string;
|
|
16
|
+
backgroundManager?: BackgroundManager;
|
|
17
|
+
}
|
|
18
|
+
export declare function createSisyphusOrchestratorHook(ctx: PluginInput, options?: SisyphusOrchestratorHookOptions): {
|
|
19
|
+
handler: ({ event }: {
|
|
20
|
+
event: {
|
|
21
|
+
type: string;
|
|
22
|
+
properties?: unknown;
|
|
23
|
+
};
|
|
24
|
+
}) => Promise<void>;
|
|
25
|
+
"tool.execute.before": (input: {
|
|
26
|
+
tool: string;
|
|
27
|
+
sessionID?: string;
|
|
28
|
+
callID?: string;
|
|
29
|
+
}, output: {
|
|
30
|
+
args: Record<string, unknown>;
|
|
31
|
+
message?: string;
|
|
32
|
+
}) => Promise<void>;
|
|
33
|
+
"tool.execute.after": (input: ToolExecuteAfterInput, output: ToolExecuteAfterOutput) => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export declare const HOOK_NAME = "start-work";
|
|
3
|
+
interface StartWorkHookInput {
|
|
4
|
+
sessionID: string;
|
|
5
|
+
messageID?: string;
|
|
6
|
+
}
|
|
7
|
+
interface StartWorkHookOutput {
|
|
8
|
+
parts: Array<{
|
|
9
|
+
type: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
export declare function createStartWorkHook(ctx: PluginInput): {
|
|
14
|
+
"chat.message": (input: StartWorkHookInput, output: StartWorkHookOutput) => Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import type { PluginInput } from "@opencode-ai/plugin";
|
|
|
2
2
|
import type { BackgroundManager } from "../features/background-agent";
|
|
3
3
|
export interface TodoContinuationEnforcerOptions {
|
|
4
4
|
backgroundManager?: BackgroundManager;
|
|
5
|
+
skipAgents?: string[];
|
|
5
6
|
}
|
|
6
7
|
export interface TodoContinuationEnforcer {
|
|
7
8
|
handler: (input: {
|