oh-my-opencode 3.17.4 → 3.17.5
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 +2 -2
- package/README.ko.md +2 -2
- package/README.md +2 -2
- package/README.ru.md +2 -2
- package/README.zh-cn.md +2 -2
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-16.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-17.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-18.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-19.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-20.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-01.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-02.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-03.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-04.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-05.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-06.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-07.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-08.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-09.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-10.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-11.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-12.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-13.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-14.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-15.d.ts +1 -0
- package/dist/agents/atlas/default-prompt-sections.d.ts +2 -2
- package/dist/agents/atlas/gemini-prompt-sections.d.ts +1 -1
- package/dist/agents/atlas/gpt-prompt-sections.d.ts +1 -1
- package/dist/cli/index.js +17349 -15303
- package/dist/config/schema/background-task.d.ts +0 -1
- package/dist/config/schema/oh-my-opencode-config.d.ts +0 -1
- package/dist/create-hooks.d.ts +2 -0
- package/dist/create-managers.d.ts +2 -0
- package/dist/create-tools.d.ts +1 -1
- package/dist/features/background-agent/process-cleanup.test-helpers.d.ts +4 -0
- package/dist/features/background-agent/subagent-spawn-limits.d.ts +0 -7
- package/dist/features/claude-code-command-loader/loader-cache.d.ts +6 -0
- package/dist/features/claude-code-command-loader/loader.d.ts +2 -0
- package/dist/features/team-mode/index.d.ts +2 -0
- package/dist/features/team-mode/team-layout-tmux/index.d.ts +1 -0
- package/dist/features/team-mode/team-layout-tmux/layout.d.ts +15 -0
- package/dist/features/team-mode/team-worktree/cleanup.d.ts +3 -0
- package/dist/features/team-mode/team-worktree/index.d.ts +2 -0
- package/dist/features/team-mode/team-worktree/manager.d.ts +15 -0
- package/dist/features/team-mode/types.d.ts +210 -0
- package/dist/features/tmux-subagent/event-handlers.d.ts +0 -4
- package/dist/features/tmux-subagent/index.d.ts +0 -3
- package/dist/features/tmux-subagent/manager.d.ts +4 -0
- package/dist/features/tmux-subagent/polling-manager.d.ts +2 -1
- package/dist/hooks/auto-update-checker/hook/deferred-startup-check.d.ts +1 -0
- package/dist/hooks/comment-checker/initialization-gate.d.ts +1 -0
- package/dist/hooks/directory-agents-injector/finder.d.ts +1 -1
- package/dist/hooks/directory-readme-injector/finder.d.ts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +1 -1
- package/dist/hooks/model-fallback/controller-accessor.d.ts +8 -0
- package/dist/hooks/model-fallback/fallback-state-controller.d.ts +26 -0
- package/dist/hooks/model-fallback/hook.d.ts +21 -16
- package/dist/hooks/model-fallback/index.d.ts +2 -0
- package/dist/hooks/preemptive-compaction-trigger.d.ts +13 -0
- package/dist/hooks/preemptive-compaction-types.d.ts +53 -0
- package/dist/hooks/preemptive-compaction.d.ts +3 -15
- package/dist/hooks/rules-injector/cache.d.ts +5 -0
- package/dist/hooks/rules-injector/injector.d.ts +2 -0
- package/dist/hooks/rules-injector/project-root-finder.d.ts +1 -0
- package/dist/hooks/rules-injector/rule-file-finder.d.ts +2 -19
- package/dist/hooks/rules-injector/rule-scan-cache.d.ts +6 -0
- package/dist/hooks/session-notification-event-properties.d.ts +5 -0
- package/dist/hooks/session-notification-init.d.ts +7 -0
- package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +1 -0
- package/dist/hooks/write-existing-file-guard/tool-execute-before-handler.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +48536 -71710
- package/dist/oh-my-opencode.schema.json +0 -5
- package/dist/plugin/hooks/create-core-hooks.d.ts +2 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts +2 -0
- package/dist/plugin/tool-registry.d.ts +1 -1
- package/dist/shared/excluded-dirs.d.ts +1 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/jsonc-parser.d.ts +8 -5
- package/dist/shared/load-opencode-plugins.d.ts +1 -0
- package/dist/shared/migration/migrations-sidecar.d.ts +1 -1
- package/dist/shared/model-capabilities/supplemental-entries.d.ts +2 -0
- package/dist/shared/permission-compat.d.ts +1 -1
- package/dist/shared/project-discovery-dirs.d.ts +2 -0
- package/dist/shared/ripgrep-cli.d.ts +8 -0
- package/dist/shared/tmux/tmux-utils/index.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/session-kill.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/session-spawn.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/spawn-process.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/stale-session-sweep.d.ts +11 -0
- package/dist/shared/tmux/tmux-utils.d.ts +3 -1
- package/dist/tools/ast-grep/pattern-hints.d.ts +4 -0
- package/dist/tools/ast-grep/tool-descriptions.d.ts +3 -0
- package/dist/tools/call-omo-agent/sync-executor.d.ts +2 -3
- package/dist/tools/call-omo-agent/tools.d.ts +2 -1
- package/dist/tools/delegate-task/background-continuation.d.ts +1 -1
- package/dist/tools/delegate-task/executor-types.d.ts +2 -0
- package/dist/tools/delegate-task/resolve-metadata-model.d.ts +9 -0
- package/dist/tools/delegate-task/sync-continuation.d.ts +2 -2
- package/dist/tools/delegate-task/task-id.d.ts +2 -0
- package/dist/tools/delegate-task/tool-argument-preparation.d.ts +2 -0
- package/dist/tools/delegate-task/tool-description.d.ts +9 -0
- package/dist/tools/delegate-task/types.d.ts +4 -5
- package/dist/tools/glob/constants.d.ts +1 -1
- package/dist/tools/grep/cli.d.ts +1 -1
- package/dist/tools/grep/constants.d.ts +0 -8
- package/dist/tools/look-at/look-at-input-preparer.d.ts +22 -0
- package/dist/tools/look-at/look-at-prompt.d.ts +2 -0
- package/dist/tools/look-at/look-at-session-runner.d.ts +12 -0
- package/dist/tools/skill/description-formatter.d.ts +1 -1
- package/dist/tools/skill/session-skill-cache.d.ts +1 -0
- package/dist/tools/skill-mcp/parse-skill-mcp-arguments.d.ts +1 -0
- package/package.json +22 -18
- package/dist/features/tmux-subagent/cleanup.d.ts +0 -9
- package/dist/features/tmux-subagent/session-created-handler.d.ts +0 -22
- package/dist/features/tmux-subagent/session-deleted-handler.d.ts +0 -15
- package/dist/plugin-dispose.d.ts +0 -13
- /package/dist/{tools/delegate-task → shared}/model-string-parser.d.ts +0 -0
|
@@ -5673,11 +5673,6 @@
|
|
|
5673
5673
|
"minimum": 1,
|
|
5674
5674
|
"maximum": 9007199254740991
|
|
5675
5675
|
},
|
|
5676
|
-
"maxDescendants": {
|
|
5677
|
-
"type": "integer",
|
|
5678
|
-
"minimum": 1,
|
|
5679
|
-
"maximum": 9007199254740991
|
|
5680
|
-
},
|
|
5681
5676
|
"staleTimeoutMs": {
|
|
5682
5677
|
"type": "number",
|
|
5683
5678
|
"minimum": 60000
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { HookName, OhMyOpenCodeConfig } from "../../config";
|
|
2
|
+
import type { ModelFallbackControllerAccessor } from "../../hooks/model-fallback";
|
|
2
3
|
import type { PluginContext } from "../types";
|
|
3
4
|
import type { ModelCacheState } from "../../plugin-state";
|
|
4
5
|
export declare function createCoreHooks(args: {
|
|
5
6
|
ctx: PluginContext;
|
|
6
7
|
pluginConfig: OhMyOpenCodeConfig;
|
|
7
8
|
modelCacheState: ModelCacheState;
|
|
9
|
+
modelFallbackControllerAccessor?: ModelFallbackControllerAccessor;
|
|
8
10
|
isHookEnabled: (hookName: HookName) => boolean;
|
|
9
11
|
safeHookEnabled: boolean;
|
|
10
12
|
}): {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OhMyOpenCodeConfig, HookName } from "../../config";
|
|
2
|
+
import type { ModelFallbackControllerAccessor } from "../../hooks/model-fallback";
|
|
2
3
|
import type { ModelCacheState } from "../../plugin-state";
|
|
3
4
|
import type { PluginContext } from "../types";
|
|
4
5
|
import { createContextWindowMonitorHook, createSessionRecoveryHook, createSessionNotification, createThinkModeHook, createModelFallbackHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createAgentUsageReminderHook, createNonInteractiveEnvHook, createInteractiveBashSessionHook, createRalphLoopHook, createEditErrorRecoveryHook, createDelegateTaskRetryHook, createTaskResumeInfoHook, createStartWorkHook, createPrometheusMdOnlyHook, createSisyphusJuniorNotepadHook, createNoSisyphusGptHook, createNoHephaestusNonGptHook, createQuestionLabelTruncatorHook, createPreemptiveCompactionHook, createRuntimeFallbackHook, createLegacyPluginToastHook } from "../../hooks";
|
|
@@ -33,6 +34,7 @@ export declare function createSessionHooks(args: {
|
|
|
33
34
|
ctx: PluginContext;
|
|
34
35
|
pluginConfig: OhMyOpenCodeConfig;
|
|
35
36
|
modelCacheState: ModelCacheState;
|
|
37
|
+
modelFallbackControllerAccessor?: ModelFallbackControllerAccessor;
|
|
36
38
|
isHookEnabled: (hookName: HookName) => boolean;
|
|
37
39
|
safeHookEnabled: boolean;
|
|
38
40
|
}): SessionHooks;
|
|
@@ -32,7 +32,7 @@ export declare function trimToolsToCap(filteredTools: ToolsRecord, maxTools: num
|
|
|
32
32
|
export declare function createToolRegistry(args: {
|
|
33
33
|
ctx: PluginContext;
|
|
34
34
|
pluginConfig: OhMyOpenCodeConfig;
|
|
35
|
-
managers: Pick<Managers, "backgroundManager" | "tmuxSessionManager" | "skillMcpManager">;
|
|
35
|
+
managers: Pick<Managers, "backgroundManager" | "tmuxSessionManager" | "skillMcpManager" | "modelFallbackControllerAccessor">;
|
|
36
36
|
skillContext: SkillContext;
|
|
37
37
|
availableCategories: AvailableCategory[];
|
|
38
38
|
interactiveBashEnabled?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EXCLUDED_DIRS: ReadonlySet<string>;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -70,3 +70,5 @@ export * from "./plugin-identity";
|
|
|
70
70
|
export * from "./log-legacy-plugin-startup-warning";
|
|
71
71
|
export * from "./task-system-enabled";
|
|
72
72
|
export * from "./parse-tools-config";
|
|
73
|
+
export { parseModelString } from "./model-string-parser";
|
|
74
|
+
export { EXCLUDED_DIRS } from "./excluded-dirs";
|
|
@@ -6,6 +6,11 @@ export interface JsoncParseResult<T> {
|
|
|
6
6
|
length: number;
|
|
7
7
|
}>;
|
|
8
8
|
}
|
|
9
|
+
type DetectPluginConfigResult = {
|
|
10
|
+
format: "json" | "jsonc" | "none";
|
|
11
|
+
path: string;
|
|
12
|
+
legacyPath?: string;
|
|
13
|
+
};
|
|
9
14
|
export declare function parseJsonc<T = unknown>(content: string): T;
|
|
10
15
|
export declare function parseJsoncSafe<T = unknown>(content: string): JsoncParseResult<T>;
|
|
11
16
|
export declare function readJsoncFile<T = unknown>(filePath: string): T | null;
|
|
@@ -13,8 +18,6 @@ export declare function detectConfigFile(basePath: string): {
|
|
|
13
18
|
format: "json" | "jsonc" | "none";
|
|
14
19
|
path: string;
|
|
15
20
|
};
|
|
16
|
-
export declare function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
legacyPath?: string;
|
|
20
|
-
};
|
|
21
|
+
export declare function clearPluginConfigFileDetectionCache(): void;
|
|
22
|
+
export declare function detectPluginConfigFile(dir: string): DetectPluginConfigResult;
|
|
23
|
+
export {};
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* {
|
|
18
18
|
* "appliedMigrations": [
|
|
19
19
|
* "model-version:openai/gpt-5.3-codex->openai/gpt-5.4",
|
|
20
|
-
* "model-version:anthropic/claude-opus-4-5->anthropic/claude-opus-4-
|
|
20
|
+
* "model-version:anthropic/claude-opus-4-5->anthropic/claude-opus-4-7"
|
|
21
21
|
* ]
|
|
22
22
|
* }
|
|
23
23
|
*/
|
|
@@ -9,7 +9,7 @@ export interface PermissionFormat {
|
|
|
9
9
|
/**
|
|
10
10
|
* Creates tool restrictions that deny specified tools.
|
|
11
11
|
*/
|
|
12
|
-
export declare function createAgentToolRestrictions(denyTools: string[]): PermissionFormat;
|
|
12
|
+
export declare function createAgentToolRestrictions(denyTools: string[], allowTools?: string[]): PermissionFormat;
|
|
13
13
|
/**
|
|
14
14
|
* Creates tool restrictions that ONLY allow specified tools.
|
|
15
15
|
* All other tools are denied by default using `*: deny` pattern.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export declare function clearWorktreeCache(): void;
|
|
2
|
+
export declare function detectWorktreePath(directory: string): string | undefined;
|
|
1
3
|
export declare function findProjectClaudeSkillDirs(startDirectory: string, stopDirectory?: string): string[];
|
|
2
4
|
export declare function findProjectAgentsSkillDirs(startDirectory: string, stopDirectory?: string): string[];
|
|
3
5
|
export declare function findProjectOpencodeSkillDirs(startDirectory: string, stopDirectory?: string): string[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type GrepBackend = "rg" | "grep";
|
|
2
|
+
export interface ResolvedCli {
|
|
3
|
+
path: string;
|
|
4
|
+
backend: GrepBackend;
|
|
5
|
+
}
|
|
6
|
+
export declare const DEFAULT_RG_THREADS = 4;
|
|
7
|
+
export declare function resolveGrepCli(): ResolvedCli;
|
|
8
|
+
export declare function resolveGrepCliWithAutoInstall(): Promise<ResolvedCli>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { killTmuxSessionIfExists } from "./session-kill";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function killTmuxSessionIfExists(sessionName: string): Promise<boolean>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { TmuxConfig } from "../../../config/schema";
|
|
2
2
|
import type { SpawnPaneResult } from "../types";
|
|
3
|
+
export declare function getIsolatedSessionName(pid?: number): string;
|
|
3
4
|
export declare function spawnTmuxSession(sessionId: string, description: string, config: TmuxConfig, serverUrl: string, sourcePaneId?: string): Promise<SpawnPaneResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { spawn } from "bun";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type SweepDeps = {
|
|
2
|
+
isInsideTmux: () => boolean;
|
|
3
|
+
getTmuxPath: () => Promise<string | null | undefined>;
|
|
4
|
+
listCandidateSessions: (tmux: string) => Promise<string[]>;
|
|
5
|
+
killSession: (sessionName: string) => Promise<boolean>;
|
|
6
|
+
processAlive: (pid: number) => boolean;
|
|
7
|
+
currentPid: number;
|
|
8
|
+
log: (message: string, payload?: unknown) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function sweepStaleOmoAgentSessionsWith(deps: SweepDeps): Promise<number>;
|
|
11
|
+
export declare function sweepStaleOmoAgentSessions(): Promise<number>;
|
|
@@ -7,5 +7,7 @@ export { spawnTmuxPane } from "./tmux-utils/pane-spawn";
|
|
|
7
7
|
export { closeTmuxPane } from "./tmux-utils/pane-close";
|
|
8
8
|
export { replaceTmuxPane } from "./tmux-utils/pane-replace";
|
|
9
9
|
export { spawnTmuxWindow } from "./tmux-utils/window-spawn";
|
|
10
|
-
export { spawnTmuxSession } from "./tmux-utils/session-spawn";
|
|
10
|
+
export { spawnTmuxSession, getIsolatedSessionName } from "./tmux-utils/session-spawn";
|
|
11
|
+
export { killTmuxSessionIfExists } from "./tmux-utils/session-kill";
|
|
12
|
+
export { sweepStaleOmoAgentSessions } from "./tmux-utils/stale-session-sweep";
|
|
11
13
|
export { applyLayout, enforceMainPaneWidth } from "./tmux-utils/layout";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CliLanguage } from "./types";
|
|
2
|
+
export declare function detectRegexMisuse(pattern: string): string | null;
|
|
3
|
+
export declare function detectLanguageSpecificMistake(pattern: string, lang: CliLanguage): string | null;
|
|
4
|
+
export declare function getPatternHint(pattern: string, lang: CliLanguage): string | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const AST_GREP_SEARCH_DESCRIPTION: string;
|
|
2
|
+
export declare const AST_GREP_SEARCH_PATTERN_PARAM = "AST pattern - valid, parseable code using $VAR (one node) and $$$ (many nodes). NOT regex: no `|`, no `.*`, no `\\w`, no `[a-z]`. For text or alternation, use grep instead.";
|
|
3
|
+
export declare const AST_GREP_REPLACE_DESCRIPTION: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { CallOmoAgentArgs } from "./types";
|
|
2
2
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
3
|
-
import { clearSessionFallbackChain, setSessionFallbackChain } from "../../hooks/model-fallback/hook";
|
|
4
3
|
import type { DelegatedModelConfig } from "../../shared/model-resolution-types";
|
|
5
4
|
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
6
5
|
import { waitForCompletion } from "./completion-poller";
|
|
@@ -10,8 +9,8 @@ type ExecuteSyncDeps = {
|
|
|
10
9
|
createOrGetSession: typeof createOrGetSession;
|
|
11
10
|
waitForCompletion: typeof waitForCompletion;
|
|
12
11
|
processMessages: typeof processMessages;
|
|
13
|
-
setSessionFallbackChain:
|
|
14
|
-
clearSessionFallbackChain:
|
|
12
|
+
setSessionFallbackChain: (sessionID: string, fallbackChain: FallbackEntry[] | undefined) => void;
|
|
13
|
+
clearSessionFallbackChain: (sessionID: string) => void;
|
|
15
14
|
};
|
|
16
15
|
type SpawnReservation = {
|
|
17
16
|
commit: () => number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
2
|
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
|
+
import type { ModelFallbackControllerAccessor } from "../../hooks/model-fallback";
|
|
3
4
|
import type { CategoriesConfig, AgentOverrides } from "../../config/schema";
|
|
4
|
-
export declare function createCallOmoAgent(ctx: PluginInput, backgroundManager: BackgroundManager, disabledAgents?: string[], agentOverrides?: AgentOverrides, userCategories?: CategoriesConfig): ToolDefinition;
|
|
5
|
+
export declare function createCallOmoAgent(ctx: PluginInput, backgroundManager: BackgroundManager, disabledAgents?: string[], agentOverrides?: AgentOverrides, userCategories?: CategoriesConfig, modelFallbackControllerAccessor?: ModelFallbackControllerAccessor): ToolDefinition;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DelegateTaskArgs, ToolContextWithMetadata } from "./types";
|
|
2
2
|
import type { ExecutorContext, ParentContext } from "./executor-types";
|
|
3
|
-
export declare function executeBackgroundContinuation(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, parentContext: ParentContext): Promise<string>;
|
|
3
|
+
export declare function executeBackgroundContinuation(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, parentContext: ParentContext, systemContent?: string): Promise<string>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BackgroundManager } from "../../features/background-agent";
|
|
2
2
|
import type { CategoriesConfig, GitMasterConfig, BrowserAutomationProvider, AgentOverrides, SisyphusAgentConfig } from "../../config/schema";
|
|
3
|
+
import type { ModelFallbackControllerAccessor } from "../../hooks/model-fallback";
|
|
3
4
|
import type { OpencodeClient } from "./types";
|
|
4
5
|
export interface ExecutorContext {
|
|
5
6
|
manager: BackgroundManager;
|
|
@@ -11,6 +12,7 @@ export interface ExecutorContext {
|
|
|
11
12
|
browserProvider?: BrowserAutomationProvider;
|
|
12
13
|
agentOverrides?: AgentOverrides;
|
|
13
14
|
sisyphusAgentConfig?: SisyphusAgentConfig;
|
|
15
|
+
modelFallbackControllerAccessor?: ModelFallbackControllerAccessor;
|
|
14
16
|
onSyncSessionCreated?: (event: {
|
|
15
17
|
sessionID: string;
|
|
16
18
|
parentID: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DelegatedModelConfig } from "./types";
|
|
2
|
+
interface MetadataModel {
|
|
3
|
+
providerID: string;
|
|
4
|
+
modelID: string;
|
|
5
|
+
variant?: string;
|
|
6
|
+
}
|
|
7
|
+
type ModelLike = Pick<DelegatedModelConfig, "providerID" | "modelID" | "variant"> | MetadataModel;
|
|
8
|
+
export declare function resolveMetadataModel(primary: ModelLike | undefined, fallback: ModelLike | undefined): MetadataModel | undefined;
|
|
9
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DelegateTaskArgs, ToolContextWithMetadata } from "./types";
|
|
2
|
-
import type { ExecutorContext } from "./executor-types";
|
|
2
|
+
import type { ExecutorContext, ParentContext } from "./executor-types";
|
|
3
3
|
import { type SyncContinuationDeps } from "./sync-continuation-deps";
|
|
4
|
-
export declare function executeSyncContinuation(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, deps?: SyncContinuationDeps): Promise<string>;
|
|
4
|
+
export declare function executeSyncContinuation(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, parentContext: ParentContext, deps?: SyncContinuationDeps, systemContent?: string): Promise<string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AvailableCategory, AvailableSkill } from "../../agents/dynamic-agent-prompt-builder";
|
|
2
|
+
import type { DelegateTaskToolOptions } from "./types";
|
|
3
|
+
export interface DelegateTaskPresentation {
|
|
4
|
+
availableCategories: AvailableCategory[];
|
|
5
|
+
availableSkills: AvailableSkill[];
|
|
6
|
+
categoryExamples: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function createDelegateTaskPresentation(options: DelegateTaskToolOptions): DelegateTaskPresentation;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
3
|
import type { CategoriesConfig, GitMasterConfig, BrowserAutomationProvider, AgentOverrides, SisyphusAgentConfig } from "../../config/schema";
|
|
4
|
+
import type { ModelFallbackControllerAccessor } from "../../hooks/model-fallback";
|
|
4
5
|
import type { AvailableCategory, AvailableSkill } from "../../agents/dynamic-agent-prompt-builder";
|
|
5
6
|
export type OpencodeClient = PluginInput["client"];
|
|
6
7
|
export interface DelegateTaskArgs {
|
|
@@ -8,14 +9,11 @@ export interface DelegateTaskArgs {
|
|
|
8
9
|
prompt: string;
|
|
9
10
|
category?: string;
|
|
10
11
|
subagent_type?: string;
|
|
12
|
+
requested_subagent_type?: string;
|
|
11
13
|
run_in_background: boolean;
|
|
12
|
-
|
|
14
|
+
task_id?: string;
|
|
13
15
|
command?: string;
|
|
14
16
|
load_skills: string[];
|
|
15
|
-
execute?: {
|
|
16
|
-
task_id: string;
|
|
17
|
-
task_dir?: string;
|
|
18
|
-
};
|
|
19
17
|
}
|
|
20
18
|
export interface ToolContextWithMetadata {
|
|
21
19
|
sessionID: string;
|
|
@@ -63,6 +61,7 @@ export interface DelegateTaskToolOptions {
|
|
|
63
61
|
availableSkills?: AvailableSkill[];
|
|
64
62
|
agentOverrides?: AgentOverrides;
|
|
65
63
|
sisyphusAgentConfig?: SisyphusAgentConfig;
|
|
64
|
+
modelFallbackControllerAccessor?: ModelFallbackControllerAccessor;
|
|
66
65
|
onSyncSessionCreated?: (event: SyncSessionCreatedEvent) => Promise<void>;
|
|
67
66
|
syncPollTimeoutMs?: number;
|
|
68
67
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { resolveGrepCli, resolveGrepCliWithAutoInstall, type GrepBackend, DEFAULT_RG_THREADS } from "
|
|
1
|
+
export { resolveGrepCli, resolveGrepCliWithAutoInstall, type GrepBackend, DEFAULT_RG_THREADS } from "../../shared/ripgrep-cli";
|
|
2
2
|
export declare const DEFAULT_TIMEOUT_MS = 60000;
|
|
3
3
|
export declare const DEFAULT_LIMIT = 100;
|
|
4
4
|
export declare const DEFAULT_MAX_DEPTH = 20;
|
package/dist/tools/grep/cli.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ResolvedCli } from "
|
|
1
|
+
import { type ResolvedCli } from "../../shared/ripgrep-cli";
|
|
2
2
|
import type { GrepOptions, GrepResult, CountResult } from "./types";
|
|
3
3
|
export declare function runRg(options: GrepOptions, resolvedCli?: ResolvedCli): Promise<GrepResult>;
|
|
4
4
|
export declare function runRgCount(options: Omit<GrepOptions, "context">, resolvedCli?: ResolvedCli): Promise<CountResult[]>;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
export type GrepBackend = "rg" | "grep";
|
|
2
|
-
export interface ResolvedCli {
|
|
3
|
-
path: string;
|
|
4
|
-
backend: GrepBackend;
|
|
5
|
-
}
|
|
6
|
-
export declare function resolveGrepCli(): ResolvedCli;
|
|
7
|
-
export declare function resolveGrepCliWithAutoInstall(): Promise<ResolvedCli>;
|
|
8
1
|
export declare const DEFAULT_MAX_DEPTH = 20;
|
|
9
2
|
export declare const DEFAULT_MAX_FILESIZE = "10M";
|
|
10
3
|
export declare const DEFAULT_MAX_COUNT = 500;
|
|
@@ -12,6 +5,5 @@ export declare const DEFAULT_MAX_COLUMNS = 1000;
|
|
|
12
5
|
export declare const DEFAULT_CONTEXT = 2;
|
|
13
6
|
export declare const DEFAULT_TIMEOUT_MS = 60000;
|
|
14
7
|
export declare const DEFAULT_MAX_OUTPUT_BYTES: number;
|
|
15
|
-
export declare const DEFAULT_RG_THREADS = 4;
|
|
16
8
|
export declare const RG_SAFETY_FLAGS: readonly ["--no-follow", "--color=never", "--no-heading", "--line-number", "--with-filename"];
|
|
17
9
|
export declare const GREP_SAFETY_FLAGS: readonly ["-n", "-H", "--color=never"];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LookAtArgs } from "./types";
|
|
2
|
+
export interface LookAtFilePart {
|
|
3
|
+
type: "file";
|
|
4
|
+
mime: string;
|
|
5
|
+
url: string;
|
|
6
|
+
filename: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PreparedLookAtInput {
|
|
9
|
+
readonly filePart: LookAtFilePart;
|
|
10
|
+
readonly isBase64Input: boolean;
|
|
11
|
+
readonly sourceDescription: string;
|
|
12
|
+
cleanup(): void;
|
|
13
|
+
}
|
|
14
|
+
type PrepareLookAtInputResult = {
|
|
15
|
+
ok: true;
|
|
16
|
+
value: PreparedLookAtInput;
|
|
17
|
+
} | {
|
|
18
|
+
ok: false;
|
|
19
|
+
error: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function prepareLookAtInput(args: LookAtArgs): PrepareLookAtInputResult;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { ToolContext } from "@opencode-ai/plugin/tool";
|
|
3
|
+
import type { LookAtFilePart } from "./look-at-input-preparer";
|
|
4
|
+
interface RunLookAtSessionInput {
|
|
5
|
+
ctx: PluginInput;
|
|
6
|
+
toolContext: ToolContext;
|
|
7
|
+
goal: string;
|
|
8
|
+
filePart: LookAtFilePart;
|
|
9
|
+
isBase64Input: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function runLookAtSession({ ctx, toolContext, goal, filePart, isBase64Input, }: RunLookAtSessionInput): Promise<string>;
|
|
12
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { SkillInfo } from "./types";
|
|
2
2
|
import type { CommandInfo } from "../slashcommand/types";
|
|
3
|
-
export declare function formatCombinedDescription(skills
|
|
3
|
+
export declare function formatCombinedDescription(skills?: SkillInfo[], commands?: CommandInfo[]): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function shouldInvalidateSkillCacheForSession(sessionID?: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseSkillMcpArguments(argsJson: string | Record<string, unknown> | undefined): Record<string, unknown>;
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-opencode",
|
|
3
|
-
"version": "3.17.
|
|
3
|
+
"version": "3.17.5",
|
|
4
4
|
"description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bin": {
|
|
9
|
-
"oh-my-opencode": "bin/oh-my-opencode.js"
|
|
9
|
+
"oh-my-opencode": "bin/oh-my-opencode.js",
|
|
10
|
+
"oh-my-openagent": "bin/oh-my-opencode.js"
|
|
10
11
|
},
|
|
11
12
|
"files": [
|
|
12
13
|
"dist",
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
"./schema.json": "./dist/oh-my-opencode.schema.json"
|
|
22
23
|
},
|
|
23
24
|
"scripts": {
|
|
24
|
-
"build": "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
|
|
25
|
+
"build": "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi --external zod && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
|
|
25
26
|
"build:all": "bun run build && bun run build:binaries",
|
|
26
27
|
"build:binaries": "bun run script/build-binaries.ts",
|
|
27
28
|
"build:schema": "bun run script/build-schema.ts",
|
|
@@ -69,32 +70,35 @@
|
|
|
69
70
|
"picocolors": "^1.1.1",
|
|
70
71
|
"picomatch": "^4.0.2",
|
|
71
72
|
"posthog-node": "^5.29.2",
|
|
72
|
-
"vscode-jsonrpc": "^8.2.0"
|
|
73
|
-
"zod": "^4.3.0"
|
|
73
|
+
"vscode-jsonrpc": "^8.2.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/js-yaml": "^4.0.9",
|
|
77
77
|
"@types/picomatch": "^3.0.2",
|
|
78
78
|
"bun-types": "1.3.11",
|
|
79
|
-
"typescript": "^5.7.3"
|
|
79
|
+
"typescript": "^5.7.3",
|
|
80
|
+
"zod": "^4.3.0"
|
|
80
81
|
},
|
|
81
82
|
"optionalDependencies": {
|
|
82
|
-
"oh-my-opencode-darwin-arm64": "3.17.
|
|
83
|
-
"oh-my-opencode-darwin-x64": "3.17.
|
|
84
|
-
"oh-my-opencode-darwin-x64-baseline": "3.17.
|
|
85
|
-
"oh-my-opencode-linux-arm64": "3.17.
|
|
86
|
-
"oh-my-opencode-linux-arm64-musl": "3.17.
|
|
87
|
-
"oh-my-opencode-linux-x64": "3.17.
|
|
88
|
-
"oh-my-opencode-linux-x64-baseline": "3.17.
|
|
89
|
-
"oh-my-opencode-linux-x64-musl": "3.17.
|
|
90
|
-
"oh-my-opencode-linux-x64-musl-baseline": "3.17.
|
|
91
|
-
"oh-my-opencode-windows-x64": "3.17.
|
|
92
|
-
"oh-my-opencode-windows-x64-baseline": "3.17.
|
|
83
|
+
"oh-my-opencode-darwin-arm64": "3.17.5",
|
|
84
|
+
"oh-my-opencode-darwin-x64": "3.17.5",
|
|
85
|
+
"oh-my-opencode-darwin-x64-baseline": "3.17.5",
|
|
86
|
+
"oh-my-opencode-linux-arm64": "3.17.5",
|
|
87
|
+
"oh-my-opencode-linux-arm64-musl": "3.17.5",
|
|
88
|
+
"oh-my-opencode-linux-x64": "3.17.5",
|
|
89
|
+
"oh-my-opencode-linux-x64-baseline": "3.17.5",
|
|
90
|
+
"oh-my-opencode-linux-x64-musl": "3.17.5",
|
|
91
|
+
"oh-my-opencode-linux-x64-musl-baseline": "3.17.5",
|
|
92
|
+
"oh-my-opencode-windows-x64": "3.17.5",
|
|
93
|
+
"oh-my-opencode-windows-x64-baseline": "3.17.5"
|
|
93
94
|
},
|
|
94
95
|
"overrides": {},
|
|
95
96
|
"trustedDependencies": [
|
|
96
97
|
"@ast-grep/cli",
|
|
97
98
|
"@ast-grep/napi",
|
|
98
99
|
"@code-yeongyu/comment-checker"
|
|
99
|
-
]
|
|
100
|
+
],
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"zod": "^4.0.0"
|
|
103
|
+
}
|
|
100
104
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { TmuxConfig } from "../../config/schema";
|
|
2
|
-
import type { TrackedSession } from "./types";
|
|
3
|
-
export declare function cleanupTmuxSessions(params: {
|
|
4
|
-
tmuxConfig: TmuxConfig;
|
|
5
|
-
serverUrl: string;
|
|
6
|
-
sourcePaneId: string | undefined;
|
|
7
|
-
sessions: Map<string, TrackedSession>;
|
|
8
|
-
stopPolling: () => void;
|
|
9
|
-
}): Promise<void>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
import type { TmuxConfig } from "../../config/schema";
|
|
3
|
-
import type { CapacityConfig, TrackedSession } from "./types";
|
|
4
|
-
import { type SessionMapping } from "./decision-engine";
|
|
5
|
-
import type { SessionCreatedEvent } from "./session-created-event";
|
|
6
|
-
type OpencodeClient = PluginInput["client"];
|
|
7
|
-
export interface SessionCreatedHandlerDeps {
|
|
8
|
-
client: OpencodeClient;
|
|
9
|
-
tmuxConfig: TmuxConfig;
|
|
10
|
-
serverUrl: string;
|
|
11
|
-
sourcePaneId: string | undefined;
|
|
12
|
-
sessions: Map<string, TrackedSession>;
|
|
13
|
-
pendingSessions: Set<string>;
|
|
14
|
-
isInsideTmux: () => boolean;
|
|
15
|
-
isEnabled: () => boolean;
|
|
16
|
-
getCapacityConfig: () => CapacityConfig;
|
|
17
|
-
getSessionMappings: () => SessionMapping[];
|
|
18
|
-
waitForSessionReady: (sessionId: string) => Promise<boolean>;
|
|
19
|
-
startPolling: () => void;
|
|
20
|
-
}
|
|
21
|
-
export declare function handleSessionCreated(deps: SessionCreatedHandlerDeps, event: SessionCreatedEvent): Promise<void>;
|
|
22
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { TmuxConfig } from "../../config/schema";
|
|
2
|
-
import type { TrackedSession } from "./types";
|
|
3
|
-
import { type SessionMapping } from "./decision-engine";
|
|
4
|
-
export interface SessionDeletedHandlerDeps {
|
|
5
|
-
tmuxConfig: TmuxConfig;
|
|
6
|
-
serverUrl: string;
|
|
7
|
-
sourcePaneId: string | undefined;
|
|
8
|
-
sessions: Map<string, TrackedSession>;
|
|
9
|
-
isEnabled: () => boolean;
|
|
10
|
-
getSessionMappings: () => SessionMapping[];
|
|
11
|
-
stopPolling: () => void;
|
|
12
|
-
}
|
|
13
|
-
export declare function handleSessionDeleted(deps: SessionDeletedHandlerDeps, event: {
|
|
14
|
-
sessionID: string;
|
|
15
|
-
}): Promise<void>;
|
package/dist/plugin-dispose.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type PluginDispose = () => Promise<void>;
|
|
2
|
-
export declare function createPluginDispose(args: {
|
|
3
|
-
backgroundManager: {
|
|
4
|
-
shutdown: () => void | Promise<void>;
|
|
5
|
-
};
|
|
6
|
-
skillMcpManager: {
|
|
7
|
-
disconnectAll: () => Promise<void>;
|
|
8
|
-
};
|
|
9
|
-
lspManager: {
|
|
10
|
-
stopAll: () => Promise<void>;
|
|
11
|
-
};
|
|
12
|
-
disposeHooks: () => void;
|
|
13
|
-
}): PluginDispose;
|
|
File without changes
|