oh-my-opencode 3.15.3 → 3.16.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/dist/agents/dynamic-agent-core-sections.d.ts +7 -0
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +1 -1
- package/dist/cli/config-manager/backup-config.d.ts +6 -0
- package/dist/cli/config-manager/version-compatibility.d.ts +9 -0
- package/dist/cli/config-manager.d.ts +4 -0
- package/dist/cli/doctor/constants.d.ts +1 -1
- package/dist/cli/index.js +1421 -533
- package/dist/cli/minimum-opencode-version.d.ts +1 -0
- package/dist/cli/model-fallback-types.d.ts +3 -0
- package/dist/cli/types.d.ts +1 -0
- package/dist/create-managers.d.ts +14 -0
- package/dist/features/background-agent/compaction-aware-message-resolver.d.ts +5 -2
- package/dist/features/boulder-state/storage.d.ts +7 -0
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +1 -1
- package/dist/features/claude-code-mcp-loader/env-expander.d.ts +5 -2
- package/dist/features/claude-code-plugin-loader/loader.d.ts +15 -0
- package/dist/features/claude-code-plugin-loader/scope-filter.d.ts +2 -0
- package/dist/features/claude-code-plugin-loader/types.d.ts +11 -0
- package/dist/features/claude-code-session-state/state.d.ts +1 -0
- package/dist/features/mcp-oauth/provider.d.ts +1 -0
- package/dist/features/mcp-oauth/refresh-mutex.d.ts +26 -0
- package/dist/features/skill-mcp-manager/error-redaction.d.ts +10 -0
- package/dist/features/skill-mcp-manager/oauth-handler.d.ts +7 -0
- package/dist/features/skill-mcp-manager/types.d.ts +3 -1
- package/dist/hooks/atlas/types.d.ts +1 -0
- package/dist/hooks/auto-update-checker/constants.d.ts +2 -2
- package/dist/hooks/keyword-detector/hook.d.ts +2 -1
- package/dist/hooks/ralph-loop/constants.d.ts +1 -0
- package/dist/hooks/ralph-loop/oracle-verification-detector.d.ts +8 -0
- package/dist/hooks/read-image-resizer/png-fallback-resizer.d.ts +2 -0
- package/dist/hooks/runtime-fallback/auto-retry-signal.d.ts +4 -0
- package/dist/hooks/runtime-fallback/error-classifier.d.ts +1 -5
- package/dist/hooks/session-recovery/types.d.ts +2 -0
- package/dist/hooks/todo-continuation-enforcer/pending-question-detection.d.ts +1 -1
- package/dist/hooks/todo-continuation-enforcer/token-limit-detection.d.ts +4 -0
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +7 -0
- package/dist/hooks/unstable-agent-babysitter/task-message-analyzer.d.ts +1 -0
- package/dist/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.d.ts +2 -0
- package/dist/index.js +1957 -1020
- package/dist/plugin/chat-params.d.ts +1 -0
- package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -0
- package/dist/shared/agent-display-names.d.ts +9 -2
- package/dist/shared/compaction-marker.d.ts +12 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/internal-initiator-marker.d.ts +1 -0
- package/dist/shared/session-prompt-params-state.d.ts +1 -0
- package/dist/tools/background-task/constants.d.ts +1 -1
- package/package.json +16 -18
- package/postinstall.mjs +63 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { OhMyOpenCodeConfig } from "../../config";
|
|
2
2
|
import type { PluginContext } from "../types";
|
|
3
|
+
import type { RalphLoopHook } from "../../hooks/ralph-loop";
|
|
3
4
|
import { createClaudeCodeHooksHook, createKeywordDetectorHook, createThinkingBlockValidatorHook, createToolPairValidatorHook } from "../../hooks";
|
|
4
5
|
import { createContextInjectorMessagesTransformHook } from "../../features/context-injector";
|
|
5
6
|
export type TransformHooks = {
|
|
@@ -14,4 +15,5 @@ export declare function createTransformHooks(args: {
|
|
|
14
15
|
pluginConfig: OhMyOpenCodeConfig;
|
|
15
16
|
isHookEnabled: (hookName: string) => boolean;
|
|
16
17
|
safeHookEnabled?: boolean;
|
|
18
|
+
ralphLoop?: RalphLoopHook | null;
|
|
17
19
|
}): TransformHooks;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent config keys to display names mapping.
|
|
3
3
|
* Config keys are lowercase (e.g., "sisyphus", "atlas").
|
|
4
|
-
* Display names include suffixes for UI/logs (e.g., "Sisyphus
|
|
4
|
+
* Display names include suffixes for UI/logs (e.g., "Sisyphus - Ultraworker").
|
|
5
|
+
*
|
|
6
|
+
* IMPORTANT: Display names MUST NOT contain parentheses or other characters
|
|
7
|
+
* that are invalid in HTTP header values per RFC 7230. OpenCode passes the
|
|
8
|
+
* agent name in the `x-opencode-agent-name` header, and parentheses cause
|
|
9
|
+
* header validation failures that prevent agents from appearing in the UI
|
|
10
|
+
* type selector dropdown. Use ` - ` (space-dash-space) instead of `(...)`.
|
|
5
11
|
*/
|
|
6
12
|
export declare const AGENT_DISPLAY_NAMES: Record<string, string>;
|
|
13
|
+
export declare function stripAgentListSortPrefix(agentName: string): string;
|
|
7
14
|
/**
|
|
8
15
|
* Get display name for an agent config key.
|
|
9
16
|
* Uses case-insensitive lookup for backward compatibility.
|
|
@@ -13,7 +20,7 @@ export declare function getAgentDisplayName(configKey: string): string;
|
|
|
13
20
|
export declare function getAgentListDisplayName(configKey: string): string;
|
|
14
21
|
/**
|
|
15
22
|
* Resolve an agent name (display name or config key) to its lowercase config key.
|
|
16
|
-
* "Atlas
|
|
23
|
+
* "Atlas - Plan Executor" -> "atlas", "Atlas (Plan Executor)" -> "atlas", "atlas" -> "atlas"
|
|
17
24
|
*/
|
|
18
25
|
export declare function getAgentConfigKey(agentName: string): string;
|
|
19
26
|
/**
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type CompactionMessageLike = {
|
|
2
|
+
agent?: unknown;
|
|
3
|
+
info?: {
|
|
4
|
+
agent?: unknown;
|
|
5
|
+
};
|
|
6
|
+
parts?: unknown;
|
|
7
|
+
};
|
|
8
|
+
export declare function isCompactionAgent(agent: unknown): boolean;
|
|
9
|
+
export declare function hasCompactionPart(parts: unknown): boolean;
|
|
10
|
+
export declare function isCompactionMessage(message: CompactionMessageLike): boolean;
|
|
11
|
+
export declare function hasCompactionPartInStorage(messageID: string | undefined): boolean;
|
|
12
|
+
export {};
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ export * from "./project-discovery-dirs";
|
|
|
60
60
|
export * from "./normalize-sdk-response";
|
|
61
61
|
export * from "./session-directory-resolver";
|
|
62
62
|
export * from "./prompt-tools";
|
|
63
|
+
export * from "./compaction-marker";
|
|
63
64
|
export * from "./internal-initiator-marker";
|
|
64
65
|
export * from "./plugin-command-discovery";
|
|
65
66
|
export { SessionCategoryRegistry } from "./session-category-registry";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const BACKGROUND_TASK_DESCRIPTION = "Run agent task in background. Returns task_id immediately; notifies on completion.\n\nUse `background_output` to get results. Prompts MUST be in English.";
|
|
2
|
-
export declare const BACKGROUND_OUTPUT_DESCRIPTION = "Get output from background task. Use full_session=true to fetch session messages with filters. System notifies on completion, so block=true rarely needed. - Timeout values are in milliseconds (ms), NOT seconds.";
|
|
2
|
+
export declare const BACKGROUND_OUTPUT_DESCRIPTION = "Get output from background task. Use full_session=true to fetch session messages with filters. System notifies on completion, so block=true rarely needed. - Timeout values are in milliseconds (ms), NOT seconds.\n\nIMPORTANT: ONLY call this tool AFTER receiving a <system-reminder> notification for the task. Do NOT call immediately after launching a background task - wait for the notification first.";
|
|
3
3
|
export declare const BACKGROUND_CANCEL_DESCRIPTION = "Cancel running background task(s). Use all=true to cancel ALL before final answer.";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-opencode",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0",
|
|
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",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@clack/prompts": "^0.11.0",
|
|
60
60
|
"@code-yeongyu/comment-checker": "^0.7.0",
|
|
61
61
|
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
62
|
-
"@opencode-ai/plugin": "^1.
|
|
63
|
-
"@opencode-ai/sdk": "^1.
|
|
62
|
+
"@opencode-ai/plugin": "^1.4.0",
|
|
63
|
+
"@opencode-ai/sdk": "^1.4.0",
|
|
64
64
|
"commander": "^14.0.2",
|
|
65
65
|
"detect-libc": "^2.0.0",
|
|
66
66
|
"diff": "^8.0.3",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"picocolors": "^1.1.1",
|
|
70
70
|
"picomatch": "^4.0.2",
|
|
71
71
|
"vscode-jsonrpc": "^8.2.0",
|
|
72
|
-
"zod": "^4.
|
|
72
|
+
"zod": "^4.3.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/js-yaml": "^4.0.9",
|
|
@@ -78,21 +78,19 @@
|
|
|
78
78
|
"typescript": "^5.7.3"
|
|
79
79
|
},
|
|
80
80
|
"optionalDependencies": {
|
|
81
|
-
"oh-my-opencode-darwin-arm64": "3.
|
|
82
|
-
"oh-my-opencode-darwin-x64": "3.
|
|
83
|
-
"oh-my-opencode-darwin-x64-baseline": "3.
|
|
84
|
-
"oh-my-opencode-linux-arm64": "3.
|
|
85
|
-
"oh-my-opencode-linux-arm64-musl": "3.
|
|
86
|
-
"oh-my-opencode-linux-x64": "3.
|
|
87
|
-
"oh-my-opencode-linux-x64-baseline": "3.
|
|
88
|
-
"oh-my-opencode-linux-x64-musl": "3.
|
|
89
|
-
"oh-my-opencode-linux-x64-musl-baseline": "3.
|
|
90
|
-
"oh-my-opencode-windows-x64": "3.
|
|
91
|
-
"oh-my-opencode-windows-x64-baseline": "3.
|
|
92
|
-
},
|
|
93
|
-
"overrides": {
|
|
94
|
-
"@opencode-ai/sdk": "^1.2.24"
|
|
81
|
+
"oh-my-opencode-darwin-arm64": "3.16.0",
|
|
82
|
+
"oh-my-opencode-darwin-x64": "3.16.0",
|
|
83
|
+
"oh-my-opencode-darwin-x64-baseline": "3.16.0",
|
|
84
|
+
"oh-my-opencode-linux-arm64": "3.16.0",
|
|
85
|
+
"oh-my-opencode-linux-arm64-musl": "3.16.0",
|
|
86
|
+
"oh-my-opencode-linux-x64": "3.16.0",
|
|
87
|
+
"oh-my-opencode-linux-x64-baseline": "3.16.0",
|
|
88
|
+
"oh-my-opencode-linux-x64-musl": "3.16.0",
|
|
89
|
+
"oh-my-opencode-linux-x64-musl-baseline": "3.16.0",
|
|
90
|
+
"oh-my-opencode-windows-x64": "3.16.0",
|
|
91
|
+
"oh-my-opencode-windows-x64-baseline": "3.16.0"
|
|
95
92
|
},
|
|
93
|
+
"overrides": {},
|
|
96
94
|
"trustedDependencies": [
|
|
97
95
|
"@ast-grep/cli",
|
|
98
96
|
"@ast-grep/napi",
|
package/postinstall.mjs
CHANGED
|
@@ -7,6 +7,60 @@ import { getPlatformPackageCandidates, getBinaryPath } from "./bin/platform.js";
|
|
|
7
7
|
|
|
8
8
|
const require = createRequire(import.meta.url);
|
|
9
9
|
|
|
10
|
+
const MIN_OPENCODE_VERSION = "1.4.0";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Parse version string into numeric parts
|
|
14
|
+
* @param {string} version
|
|
15
|
+
* @returns {number[]}
|
|
16
|
+
*/
|
|
17
|
+
function parseVersion(version) {
|
|
18
|
+
return version
|
|
19
|
+
.replace(/^v/, "")
|
|
20
|
+
.split("-")[0]
|
|
21
|
+
.split(".")
|
|
22
|
+
.map((part) => Number.parseInt(part, 10) || 0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Compare two version strings
|
|
27
|
+
* @param {string} current
|
|
28
|
+
* @param {string} minimum
|
|
29
|
+
* @returns {boolean} true if current >= minimum
|
|
30
|
+
*/
|
|
31
|
+
function compareVersions(current, minimum) {
|
|
32
|
+
const currentParts = parseVersion(current);
|
|
33
|
+
const minimumParts = parseVersion(minimum);
|
|
34
|
+
const length = Math.max(currentParts.length, minimumParts.length);
|
|
35
|
+
|
|
36
|
+
for (let index = 0; index < length; index++) {
|
|
37
|
+
const currentPart = currentParts[index] ?? 0;
|
|
38
|
+
const minimumPart = minimumParts[index] ?? 0;
|
|
39
|
+
if (currentPart > minimumPart) return true;
|
|
40
|
+
if (currentPart < minimumPart) return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if opencode version meets minimum requirement
|
|
48
|
+
* @returns {{ok: boolean, version: string | null}}
|
|
49
|
+
*/
|
|
50
|
+
function checkOpenCodeVersion() {
|
|
51
|
+
try {
|
|
52
|
+
const result = require("child_process").execSync("opencode --version", {
|
|
53
|
+
encoding: "utf-8",
|
|
54
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
55
|
+
});
|
|
56
|
+
const version = result.trim();
|
|
57
|
+
const ok = compareVersions(version, MIN_OPENCODE_VERSION);
|
|
58
|
+
return { ok, version };
|
|
59
|
+
} catch {
|
|
60
|
+
return { ok: true, version: null };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
10
64
|
/**
|
|
11
65
|
* Detect libc family on Linux
|
|
12
66
|
*/
|
|
@@ -36,7 +90,15 @@ function main() {
|
|
|
36
90
|
const { platform, arch } = process;
|
|
37
91
|
const libcFamily = getLibcFamily();
|
|
38
92
|
const packageBaseName = getPackageBaseName();
|
|
39
|
-
|
|
93
|
+
|
|
94
|
+
// Check opencode version requirement
|
|
95
|
+
const versionCheck = checkOpenCodeVersion();
|
|
96
|
+
if (versionCheck.version && !versionCheck.ok) {
|
|
97
|
+
console.warn(`⚠ oh-my-opencode requires OpenCode >= ${MIN_OPENCODE_VERSION}`);
|
|
98
|
+
console.warn(` Detected: ${versionCheck.version}`);
|
|
99
|
+
console.warn(` Please update OpenCode to avoid compatibility issues.`);
|
|
100
|
+
}
|
|
101
|
+
|
|
40
102
|
try {
|
|
41
103
|
const packageCandidates = getPlatformPackageCandidates({
|
|
42
104
|
platform,
|