@wolfx/oh-my-openagent 4.0.0 → 4.1.2
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 +29 -4
- package/README.ko.md +29 -4
- package/README.md +29 -4
- package/README.ru.md +29 -4
- package/README.zh-cn.md +29 -4
- package/dist/agents/atlas/agent.d.ts +7 -12
- package/dist/agents/atlas/default-prompt-sections.d.ts +5 -5
- package/dist/agents/atlas/gemini-prompt-sections.d.ts +4 -4
- package/dist/agents/atlas/gpt-prompt-sections.d.ts +5 -5
- package/dist/agents/atlas/kimi-prompt-sections.d.ts +6 -0
- package/dist/agents/atlas/kimi.d.ts +2 -0
- package/dist/agents/atlas/opus-4-7-prompt-sections.d.ts +6 -0
- package/dist/agents/atlas/opus-4-7.d.ts +2 -0
- package/dist/agents/atlas/shared-prompt.d.ts +1 -1
- package/dist/agents/prometheus/plan-generation.d.ts +1 -1
- package/dist/config/schema/hooks.d.ts +1 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +1 -0
- package/dist/create-hooks.d.ts +1 -0
- package/dist/create-managers.d.ts +2 -0
- package/dist/features/background-agent/manager.d.ts +10 -0
- package/dist/features/background-agent/spawner.d.ts +4 -2
- package/dist/features/background-agent/task-poller.d.ts +1 -0
- package/dist/features/background-agent/types.d.ts +1 -0
- package/dist/features/boulder-state/format-duration.d.ts +1 -0
- package/dist/features/boulder-state/index.d.ts +1 -0
- package/dist/features/boulder-state/storage.d.ts +39 -1
- package/dist/features/boulder-state/types.d.ts +43 -0
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/team-mode/team-runtime/session-cleanup.d.ts +21 -0
- package/dist/features/team-mode/team-runtime/session-team-run-registry.d.ts +4 -0
- package/dist/features/tmux-subagent/cleanup.d.ts +10 -0
- package/dist/features/tmux-subagent/session-created-handler.d.ts +23 -0
- package/dist/features/tmux-subagent/session-deleted-handler.d.ts +16 -0
- package/dist/hooks/atlas/boulder-continuation-injector.d.ts +1 -1
- package/dist/hooks/atlas/system-reminder-templates.d.ts +1 -0
- package/dist/hooks/atlas/tool-execute-after.d.ts +1 -0
- package/dist/hooks/atlas/tool-execute-before.d.ts +1 -0
- package/dist/hooks/atlas/types.d.ts +2 -0
- package/dist/hooks/compaction-context-injector/recovery.d.ts +1 -1
- package/dist/hooks/compaction-context-injector/types.d.ts +1 -0
- package/dist/hooks/compaction-todo-preserver/hook.d.ts +11 -0
- package/dist/hooks/fsync-skip-warning/index.d.ts +18 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/ralph-loop/continuation-prompt-injector.d.ts +7 -1
- package/dist/hooks/ralph-loop/iteration-continuation.d.ts +10 -1
- package/dist/hooks/ralph-loop/loop-state-controller.d.ts +4 -3
- package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +4 -0
- package/dist/hooks/ralph-loop/ralph-loop-event-handler.d.ts +4 -2
- package/dist/hooks/ralph-loop/storage.d.ts +2 -2
- package/dist/hooks/ralph-loop/types.d.ts +5 -0
- package/dist/hooks/ralph-loop/verification-failure-handler.d.ts +4 -2
- package/dist/hooks/shared/session-idle-settle.d.ts +11 -0
- package/dist/hooks/team-session-events/team-idle-wake-hint.d.ts +5 -1
- package/dist/hooks/todo-description-override/description.d.ts +1 -1
- package/dist/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.d.ts +2 -0
- package/dist/index.js +11904 -3713
- package/dist/oh-my-opencode.schema.json +8 -0
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
- package/dist/plugin/session-compacting.d.ts +31 -0
- package/dist/plugin-dispose.d.ts +13 -0
- package/dist/plugin-handlers/agent-priority-order.d.ts +6 -6
- package/dist/shared/agent-ordering.d.ts +8 -0
- package/dist/shared/agent-sort-shim.d.ts +8 -8
- package/dist/shared/agent-tool-restrictions.d.ts +5 -1
- package/dist/shared/bun-file-shim.d.ts +8 -0
- package/dist/shared/bun-hash-shim.d.ts +1 -0
- package/dist/shared/bun-which-shim.d.ts +1 -0
- package/dist/shared/classify-path-environment.d.ts +3 -0
- package/dist/shared/event-session-id.d.ts +2 -0
- package/dist/shared/extract-semver.d.ts +1 -0
- package/dist/shared/fsync-skip-tracker.d.ts +12 -0
- package/dist/shared/fsync-skip-warning-formatter.d.ts +2 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/internal-initiator-marker.d.ts +8 -0
- package/dist/shared/model-capability-heuristics.d.ts +1 -0
- package/dist/shared/opencode-version.d.ts +14 -1
- package/dist/shared/session-route.d.ts +18 -0
- package/dist/shared/tmux/cmux-detect.d.ts +8 -0
- package/dist/shared/tmux/index.d.ts +1 -0
- package/dist/shared/tolerant-fsync.d.ts +5 -0
- package/dist/shared/write-file-atomically.d.ts +4 -1
- package/dist/tools/call-omo-agent/agent-resolver.d.ts +5 -12
- package/dist/tools/call-omo-agent/constants.d.ts +2 -2
- package/dist/tools/delegate-task/model-string-parser.d.ts +9 -0
- package/dist/tools/delegate-task/resolve-call-id.d.ts +2 -0
- package/dist/tools/delegate-task/subagent-discovery.d.ts +1 -0
- package/dist/tools/delegate-task/sync-prompt-sender.d.ts +1 -0
- package/dist/tools/delegate-task/sync-result-fetcher.d.ts +3 -1
- package/dist/tools/interactive-bash/constants.d.ts +1 -0
- package/dist/tools/interactive-bash/tmux-path-resolver.d.ts +1 -0
- package/package.json +16 -11
- package/dist/hooks/ralph-loop/completion-promise-detector-test-input.d.ts +0 -11
|
@@ -33,6 +33,7 @@ export declare function createCoreHooks(args: {
|
|
|
33
33
|
readImageResizer: ReturnType<typeof import("../../hooks").createReadImageResizerHook> | null;
|
|
34
34
|
todoDescriptionOverride: ReturnType<typeof import("../../hooks").createTodoDescriptionOverrideHook> | null;
|
|
35
35
|
webfetchRedirectGuard: ReturnType<typeof import("../../hooks").createWebFetchRedirectGuardHook> | null;
|
|
36
|
+
fsyncSkipWarning: ReturnType<typeof import("../../hooks").createFsyncSkipWarningHook> | null;
|
|
36
37
|
teamToolGating: ReturnType<typeof import("../../hooks").createTeamToolGating> | null;
|
|
37
38
|
contextWindowMonitor: ReturnType<typeof import("../../hooks").createContextWindowMonitorHook> | null;
|
|
38
39
|
preemptiveCompaction: ReturnType<typeof import("../../hooks").createPreemptiveCompactionHook> | null;
|
|
@@ -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, createBashFileReadGuardHook, createHashlineReadEnhancerHook, createReadImageResizerHook, createJsonErrorRecoveryHook, createTodoDescriptionOverrideHook, createWebFetchRedirectGuardHook, createTeamToolGating } from "../../hooks";
|
|
4
|
+
import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createBashFileReadGuardHook, createHashlineReadEnhancerHook, createReadImageResizerHook, createJsonErrorRecoveryHook, createTodoDescriptionOverrideHook, createWebFetchRedirectGuardHook, createTeamToolGating, createFsyncSkipWarningHook } from "../../hooks";
|
|
5
5
|
export type ToolGuardHooks = {
|
|
6
6
|
commentChecker: ReturnType<typeof createCommentCheckerHooks> | null;
|
|
7
7
|
toolOutputTruncator: ReturnType<typeof createToolOutputTruncatorHook> | null;
|
|
@@ -17,6 +17,7 @@ export type ToolGuardHooks = {
|
|
|
17
17
|
readImageResizer: ReturnType<typeof createReadImageResizerHook> | null;
|
|
18
18
|
todoDescriptionOverride: ReturnType<typeof createTodoDescriptionOverrideHook> | null;
|
|
19
19
|
webfetchRedirectGuard: ReturnType<typeof createWebFetchRedirectGuardHook> | null;
|
|
20
|
+
fsyncSkipWarning: ReturnType<typeof createFsyncSkipWarningHook> | null;
|
|
20
21
|
teamToolGating: ReturnType<typeof createTeamToolGating> | null;
|
|
21
22
|
};
|
|
22
23
|
export declare function createToolGuardHooks(args: {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Hooks } from "@opencode-ai/plugin";
|
|
2
|
+
type SessionCompactingHook = NonNullable<Hooks["experimental.session.compacting"]>;
|
|
3
|
+
export type CompactionAutocontinueInput = {
|
|
4
|
+
sessionID: string;
|
|
5
|
+
agent?: string;
|
|
6
|
+
model?: unknown;
|
|
7
|
+
provider?: unknown;
|
|
8
|
+
message?: unknown;
|
|
9
|
+
overflow?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type CompactionAutocontinueOutput = {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type CompactionAutocontinueHook = (input: CompactionAutocontinueInput, output: CompactionAutocontinueOutput) => Promise<void>;
|
|
15
|
+
type CompactionHookDependencies = {
|
|
16
|
+
compactionContextInjector?: {
|
|
17
|
+
capture?: (sessionID: string) => Promise<void>;
|
|
18
|
+
inject?: (sessionID: string) => string;
|
|
19
|
+
restore?: (sessionID: string) => Promise<boolean>;
|
|
20
|
+
} | null;
|
|
21
|
+
compactionTodoPreserver?: {
|
|
22
|
+
capture?: (sessionID: string) => Promise<void>;
|
|
23
|
+
restore?: (sessionID: string) => Promise<void>;
|
|
24
|
+
} | null;
|
|
25
|
+
claudeCodeHooks?: {
|
|
26
|
+
"experimental.session.compacting"?: SessionCompactingHook;
|
|
27
|
+
} | null;
|
|
28
|
+
};
|
|
29
|
+
export declare function createSessionCompactingHandler(hooks: CompactionHookDependencies): SessionCompactingHook;
|
|
30
|
+
export declare function createCompactionAutocontinueHandler(hooks: CompactionHookDependencies): CompactionAutocontinueHook;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* The order is: sisyphus → hephaestus → prometheus → atlas
|
|
2
|
+
* Default source of truth for core agent ordering.
|
|
3
|
+
* The default order is: sisyphus → hephaestus → prometheus → atlas.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* User config may override the runtime order through `agent_order`; missing
|
|
6
|
+
* core agents still fall back to this default order. Do not reintroduce sort
|
|
7
|
+
* key prefixes or a second ordering constant.
|
|
8
8
|
*
|
|
9
9
|
* See: src/plugin-handlers/AGENTS.md for architectural context.
|
|
10
10
|
*/
|
|
11
11
|
export declare const CANONICAL_CORE_AGENT_ORDER: readonly ["sisyphus", "hephaestus", "prometheus", "atlas"];
|
|
12
|
-
export declare function reorderAgentsByPriority(agents: Record<string, unknown
|
|
12
|
+
export declare function reorderAgentsByPriority(agents: Record<string, unknown>, agentOrder?: readonly string[]): Record<string, unknown>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const DEFAULT_AGENT_ORDER: readonly ["sisyphus", "hephaestus", "prometheus", "atlas"];
|
|
2
|
+
export type AgentOrderValidation = {
|
|
3
|
+
order: string[];
|
|
4
|
+
invalid: string[];
|
|
5
|
+
duplicates: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare function validateAgentOrder(agentOrder: readonly string[] | undefined): AgentOrderValidation;
|
|
8
|
+
export declare function resolveAgentOrderDisplayNames(agentOrder: readonly string[] | undefined): string[];
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* OpenCode 1.4.x ignores the agent `order` field (sst/opencode#19127) and
|
|
5
5
|
* sorts the agent list by `agent.name` via Remeda `sortBy(x => x.name, "asc")`
|
|
6
|
-
* at packages/opencode/src/agent/agent.ts. Without intervention,
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* order this project ships.
|
|
6
|
+
* at packages/opencode/src/agent/agent.ts. Without intervention, core agents
|
|
7
|
+
* collapse into name order, which can invert the default sisyphus -> hephaestus
|
|
8
|
+
* -> prometheus -> atlas order or a user's configured `agent_order`.
|
|
10
9
|
*
|
|
11
10
|
* Earlier attempts to bias the sort key with invisible characters (ZWSP,
|
|
12
11
|
* U+2060 WORD JOINER, U+00AD SOFT HYPHEN, ANSI escape) caused visible-gap
|
|
@@ -17,12 +16,13 @@
|
|
|
17
16
|
* 1. `isAgentArray` rejects any array element that is null, non-object, or
|
|
18
17
|
* lacks a string `name`, eliminating the throw-on-mixed-array failure
|
|
19
18
|
* mode that closed the original PR.
|
|
20
|
-
* 2. The activation predicate requires >= 2 elements whose `.name` is
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
* 2. The activation predicate requires >= 2 elements whose `.name` is ranked
|
|
20
|
+
* by the active agent order, so unrelated `.sort()` and `.toSorted()` calls
|
|
21
|
+
* (string arrays, number arrays, generic objects) execute native behavior
|
|
22
|
+
* unchanged.
|
|
24
23
|
*
|
|
25
24
|
* Remove this shim once OpenCode honors the agent `order` field
|
|
26
25
|
* (sst/opencode#19127).
|
|
27
26
|
*/
|
|
27
|
+
export declare function setAgentSortOrder(agentOrder: readonly string[] | undefined): void;
|
|
28
28
|
export declare function installAgentSortShim(): void;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type AgentToolRestrictionsOptions = {
|
|
2
|
+
includeTeamToolDenylist?: boolean;
|
|
3
|
+
};
|
|
4
|
+
export declare function getAgentToolRestrictions(agentName: string, options?: AgentToolRestrictionsOptions): Record<string, boolean>;
|
|
2
5
|
export declare function hasAgentToolRestrictions(agentName: string): boolean;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface BunFileLike {
|
|
2
|
+
text(): Promise<string>;
|
|
3
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
4
|
+
exists(): Promise<boolean>;
|
|
5
|
+
delete(): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare function bunFile(path: string): BunFileLike;
|
|
8
|
+
export declare function bunWrite(path: string, data: string | ArrayBuffer | Uint8Array): Promise<number>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function bunHashXxh32(input: string, seed: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function bunWhich(commandName: string): string | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type PathClassification = "icloud" | "onedrive" | "desktop-sync" | "network-drive" | "unknown";
|
|
2
|
+
export declare function classifyPathEnvironment(absolutePath: string): PathClassification;
|
|
3
|
+
export declare function describePathClassification(pathClassification: PathClassification): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function extractSemverFromOutput(output: string): string | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PathClassification } from "./classify-path-environment";
|
|
2
|
+
export type FsyncSkipEntry = {
|
|
3
|
+
filePath: string;
|
|
4
|
+
contextLabel: string;
|
|
5
|
+
errorCode: string;
|
|
6
|
+
message: string;
|
|
7
|
+
pathClassification: PathClassification;
|
|
8
|
+
timestamp: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function recordFsyncSkip(entry: Omit<FsyncSkipEntry, "timestamp">): void;
|
|
11
|
+
export declare function drainSkipsAfter(timestampMs: number): FsyncSkipEntry[];
|
|
12
|
+
export declare function clearAllSkips(): void;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export * from "./fallback-model-availability";
|
|
|
46
46
|
export * from "./connected-providers-cache";
|
|
47
47
|
export * from "./context-limit-resolver";
|
|
48
48
|
export * from "./session-utils";
|
|
49
|
+
export * from "./event-session-id";
|
|
49
50
|
export * from "./tmux";
|
|
50
51
|
export * from "./model-suggestion-retry";
|
|
51
52
|
export * from "./opencode-server-auth";
|
|
@@ -60,7 +61,9 @@ export * from "./opencode-message-dir";
|
|
|
60
61
|
export * from "./opencode-command-dirs";
|
|
61
62
|
export * from "./project-discovery-dirs";
|
|
62
63
|
export * from "./normalize-sdk-response";
|
|
64
|
+
export * from "./record-type-guard";
|
|
63
65
|
export * from "./session-directory-resolver";
|
|
66
|
+
export * from "./session-route";
|
|
64
67
|
export * from "./prompt-tools";
|
|
65
68
|
export * from "./compaction-marker";
|
|
66
69
|
export * from "./internal-initiator-marker";
|
|
@@ -4,3 +4,11 @@ export declare function createInternalAgentTextPart(text: string): {
|
|
|
4
4
|
type: "text";
|
|
5
5
|
text: string;
|
|
6
6
|
};
|
|
7
|
+
export declare function createInternalAgentContinuationTextPart(text: string): {
|
|
8
|
+
type: "text";
|
|
9
|
+
text: string;
|
|
10
|
+
synthetic: true;
|
|
11
|
+
metadata: {
|
|
12
|
+
compaction_continue: true;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -4,6 +4,7 @@ export type HeuristicModelFamilyDefinition = {
|
|
|
4
4
|
pattern?: RegExp;
|
|
5
5
|
variants?: string[];
|
|
6
6
|
reasoningEfforts?: string[];
|
|
7
|
+
reasoningEffortAliases?: Record<string, string>;
|
|
7
8
|
supportsThinking?: boolean;
|
|
8
9
|
};
|
|
9
10
|
export declare const HEURISTIC_MODEL_FAMILY_REGISTRY: ReadonlyArray<HeuristicModelFamilyDefinition>;
|
|
@@ -16,9 +16,22 @@ export declare const OPENCODE_NATIVE_AGENTS_INJECTION_VERSION = "1.1.37";
|
|
|
16
16
|
* When this version is detected AND opencode.db exists, SQLite backend is used.
|
|
17
17
|
*/
|
|
18
18
|
export declare const OPENCODE_SQLITE_VERSION = "1.1.53";
|
|
19
|
+
type ExecCommandOptions = {
|
|
20
|
+
encoding: "utf-8";
|
|
21
|
+
timeout: number;
|
|
22
|
+
stdio: ["pipe", "pipe", "pipe"];
|
|
23
|
+
};
|
|
24
|
+
export type OpenCodeVersionDeps = {
|
|
25
|
+
execCommand: (command: string, options: ExecCommandOptions) => string;
|
|
26
|
+
getBinaryPath: () => string | null;
|
|
27
|
+
exists: (filePath: string) => boolean;
|
|
28
|
+
realpath: (filePath: string) => string;
|
|
29
|
+
readText: (filePath: string) => string;
|
|
30
|
+
};
|
|
19
31
|
export declare function parseVersion(version: string): number[];
|
|
20
32
|
export declare function compareVersions(a: string, b: string): -1 | 0 | 1;
|
|
21
|
-
export declare function getOpenCodeVersion(): string | null;
|
|
33
|
+
export declare function getOpenCodeVersion(deps?: Partial<OpenCodeVersionDeps>): string | null;
|
|
22
34
|
export declare function isOpenCodeVersionAtLeast(version: string): boolean;
|
|
23
35
|
export declare function resetVersionCache(): void;
|
|
24
36
|
export declare function setVersionCache(version: string | null): void;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import { promptSyncWithModelSuggestionRetry, promptWithModelSuggestionRetry } from "./model-suggestion-retry";
|
|
3
|
+
type OpencodeClient = PluginInput["client"];
|
|
4
|
+
type PromptAsyncArgs = Parameters<OpencodeClient["session"]["promptAsync"]>[0];
|
|
5
|
+
type SessionMessagesArgs = Parameters<OpencodeClient["session"]["messages"]>[0];
|
|
6
|
+
type PromptRetryClient = Parameters<typeof promptWithModelSuggestionRetry>[0];
|
|
7
|
+
type PromptRetryArgs = Parameters<typeof promptWithModelSuggestionRetry>[1];
|
|
8
|
+
type PromptSyncRetryClient = Parameters<typeof promptSyncWithModelSuggestionRetry>[0];
|
|
9
|
+
type PromptSyncRetryArgs = Parameters<typeof promptSyncWithModelSuggestionRetry>[1];
|
|
10
|
+
export declare function routeSessionPrompt(args: PromptAsyncArgs, directory: string): PromptAsyncArgs;
|
|
11
|
+
export declare function routePromptRetry(args: PromptRetryArgs, directory: string): PromptRetryArgs;
|
|
12
|
+
export declare function routePromptSyncRetry(args: PromptSyncRetryArgs, directory: string): PromptSyncRetryArgs;
|
|
13
|
+
export declare function routeSessionMessages(args: SessionMessagesArgs, directory: string): SessionMessagesArgs;
|
|
14
|
+
export declare function promptAsyncInDirectory(client: OpencodeClient, args: PromptAsyncArgs, directory: string): Promise<unknown>;
|
|
15
|
+
export declare function promptWithRetryInDirectory(client: PromptRetryClient, args: PromptRetryArgs, directory: string): Promise<void>;
|
|
16
|
+
export declare function promptSyncWithRetryInDirectory(client: PromptSyncRetryClient, args: PromptSyncRetryArgs, directory: string): Promise<void>;
|
|
17
|
+
export declare function messagesInDirectory(client: OpencodeClient, args: SessionMessagesArgs, directory: string): Promise<unknown>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detect whether we are running inside cmux (cmux omo).
|
|
3
|
+
* When cmux-omo sets up the environment it injects a tmux shim and sets
|
|
4
|
+
* CMUX_SOCKET_PATH / TMUX. If detected, redirect tmux commands to
|
|
5
|
+
* `cmux __tmux-compat` so they become native cmux splits instead of
|
|
6
|
+
* failing because there is no real tmux server running.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isCmuxCompatEnvironment(): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { fsyncSync } from "node:fs";
|
|
2
|
+
import type { FileHandle } from "node:fs/promises";
|
|
3
|
+
export declare function isToleratedFsyncError(error: unknown): boolean;
|
|
4
|
+
export declare function tolerantFsync(fileHandle: FileHandle, contextLabel: string): Promise<void>;
|
|
5
|
+
export declare function tolerantFsyncSync(fileDescriptor: number, contextLabel: string, fsyncImpl?: typeof fsyncSync): void;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type fsyncSync as FsyncSync } from "node:fs";
|
|
2
|
+
export declare function writeFileAtomically(filePath: string, content: string, deps?: {
|
|
3
|
+
fsyncSync?: typeof FsyncSync;
|
|
4
|
+
}): void;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
export declare function clearCallableAgentsCache(): void;
|
|
3
3
|
/**
|
|
4
|
-
* Resolves the set of callable agent names
|
|
5
|
-
* hardcoded `ALLOWED_AGENTS` with any additional agents discovered dynamically
|
|
6
|
-
* via `client.app.agents()`. Custom agents loaded from registered agent
|
|
7
|
-
* directories appear here alongside built-ins.
|
|
4
|
+
* Resolves the set of callable agent names for call_omo_agent.
|
|
8
5
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @param client - The plugin client with access to the agent registry
|
|
14
|
-
* @param sessionId - Optional session ID for cache scoping
|
|
15
|
-
* @returns Array of lowercase callable agent names (excludes primary-mode agents)
|
|
6
|
+
* This tool is deliberately narrower than delegate-task: it may only launch
|
|
7
|
+
* the research lookup agents used by worker-style agents while they continue
|
|
8
|
+
* local work. Dynamic agents and other built-ins must go through task().
|
|
16
9
|
*/
|
|
17
|
-
export declare function resolveCallableAgents(
|
|
10
|
+
export declare function resolveCallableAgents(_client?: PluginInput["client"], _sessionId?: string): Promise<string[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ALLOWED_AGENTS: readonly ["explore", "librarian"
|
|
2
|
-
export declare const CALL_OMO_AGENT_DESCRIPTION = "Spawn explore/librarian agent
|
|
1
|
+
export declare const ALLOWED_AGENTS: readonly ["explore", "librarian"];
|
|
2
|
+
export declare const CALL_OMO_AGENT_DESCRIPTION = "Spawn explore/librarian agent. run_in_background REQUIRED (true=async with task_id, false=sync).\n\nAllowed agents:\n{agents}\n\nOther built-in agents, custom agents, and task categories are intentionally not supported by this tool.\n\nPass `session_id=<id>` to continue previous agent with full context. Nested subagent depth is tracked automatically and blocked past the configured limit. Prompts MUST be in English. Use `background_output` for async results.";
|
|
@@ -11,6 +11,7 @@ export declare function sendSyncPrompt(client: OpencodeClient, input: {
|
|
|
11
11
|
args: DelegateTaskArgs;
|
|
12
12
|
systemContent: string | undefined;
|
|
13
13
|
categoryModel: DelegatedModelConfig | undefined;
|
|
14
|
+
directory: string;
|
|
14
15
|
toastManager: {
|
|
15
16
|
removeTask: (id: string) => void;
|
|
16
17
|
} | null | undefined;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { OpencodeClient } from "./types";
|
|
2
|
-
export declare function fetchSyncResult(client: OpencodeClient, sessionID: string, anchorMessageCount?: number
|
|
2
|
+
export declare function fetchSyncResult(client: OpencodeClient, sessionID: string, anchorMessageCount?: number, options?: {
|
|
3
|
+
strictAbortRecovery?: boolean;
|
|
4
|
+
}): Promise<{
|
|
3
5
|
ok: true;
|
|
4
6
|
textContent: string;
|
|
5
7
|
} | {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const DEFAULT_TIMEOUT_MS = 60000;
|
|
2
2
|
export declare const BLOCKED_TMUX_SUBCOMMANDS: string[];
|
|
3
|
+
export declare const PROHIBITED_TMUX_SUBCOMMANDS: string[];
|
|
3
4
|
export declare const INTERACTIVE_BASH_DESCRIPTION = "WARNING: This is TMUX ONLY. Pass tmux subcommands directly (without 'tmux' prefix).\n\nExamples: new-session -d -s omo-dev, send-keys -t omo-dev \"vim\" Enter\n\nFor TUI apps needing ongoing interaction (vim, htop, pudb). One-shot commands \u2192 use Bash with &.";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wolfx/oh-my-openagent",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "A fork of oh-my-openagent",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"prepublishOnly": "bun run clean && bun run build",
|
|
29
29
|
"test:model-capabilities": "bun test src/shared/model-capability-aliases.test.ts src/shared/model-capability-guardrails.test.ts src/shared/model-capabilities.test.ts --bail",
|
|
30
30
|
"typecheck": "tsc --noEmit",
|
|
31
|
-
"test": "bun
|
|
31
|
+
"test": "bun run script/run-ci-tests.ts"
|
|
32
32
|
},
|
|
33
33
|
"keywords": [
|
|
34
34
|
"opencode",
|
|
@@ -54,25 +54,30 @@
|
|
|
54
54
|
"@ast-grep/napi": "^0.41.1",
|
|
55
55
|
"@clack/prompts": "^0.11.0",
|
|
56
56
|
"@wolfx/comment-checker": "0.7.0-beta.2",
|
|
57
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
57
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
58
58
|
"@opencode-ai/plugin": "^1.4.0",
|
|
59
59
|
"@opencode-ai/sdk": "^1.4.0",
|
|
60
|
-
"diff": "^8.0.
|
|
60
|
+
"diff": "^8.0.4",
|
|
61
61
|
"js-yaml": "^4.1.1",
|
|
62
62
|
"jsonc-parser": "^3.3.1",
|
|
63
63
|
"picomatch": "^4.0.4",
|
|
64
|
-
"vscode-jsonrpc": "^8.2.
|
|
64
|
+
"vscode-jsonrpc": "^8.2.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
+
"@typescript/native-preview": "7.0.0-dev.20260513.1",
|
|
67
68
|
"@types/js-yaml": "^4.0.9",
|
|
68
69
|
"@types/picomatch": "^3.0.2",
|
|
69
|
-
"bun-types": "1.3.
|
|
70
|
-
"typescript": "^5.
|
|
71
|
-
"zod": "^4.3
|
|
70
|
+
"bun-types": "1.3.12",
|
|
71
|
+
"typescript": "^5.9.3",
|
|
72
|
+
"zod": "^4.4.3"
|
|
73
|
+
},
|
|
74
|
+
"overrides": {
|
|
75
|
+
"hono": "^4.12.18",
|
|
76
|
+
"@hono/node-server": "^1.19.13",
|
|
77
|
+
"express-rate-limit": "^8.5.1",
|
|
78
|
+
"fast-uri": "^3.1.2",
|
|
79
|
+
"path-to-regexp": "^8.4.2"
|
|
72
80
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"overrides": {},
|
|
76
81
|
"trustedDependencies": [
|
|
77
82
|
"@ast-grep/cli",
|
|
78
83
|
"@ast-grep/napi",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
export type SessionMessage = {
|
|
3
|
-
info?: {
|
|
4
|
-
role?: string;
|
|
5
|
-
};
|
|
6
|
-
parts?: Array<{
|
|
7
|
-
type: string;
|
|
8
|
-
text?: string;
|
|
9
|
-
}>;
|
|
10
|
-
};
|
|
11
|
-
export declare function createPluginInput(messages: SessionMessage[]): PluginInput;
|