@skj1724/oh-my-opencode 3.18.21 → 3.18.24

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.
Files changed (42) hide show
  1. package/bin/oh-my-opencode.js +1 -1
  2. package/dist/agents/hephaestus/agent.d.ts +1 -1
  3. package/dist/agents/load-prompt-template.d.ts +1 -0
  4. package/dist/agents/sisyphus.d.ts +3 -2
  5. package/dist/cli/doctor/constants.d.ts +1 -1
  6. package/dist/cli/index.js +3084 -1976
  7. package/dist/features/builtin-commands/templates/open-plan.d.ts +1 -1
  8. package/dist/hooks/auto-update-checker/constants.d.ts +3 -3
  9. package/dist/index.js +3443 -2179
  10. package/dist/shared/logger.d.ts +1 -0
  11. package/dist/shared/plugin-identity.d.ts +4 -4
  12. package/package.json +98 -96
  13. package/postinstall.mjs +35 -133
  14. package/src/agents/prompts-zh/atlas.md +657 -0
  15. package/src/agents/prompts-zh/general-agents.md +401 -0
  16. package/src/agents/prompts-zh/hephaestus.md +391 -0
  17. package/src/agents/prompts-zh/index.ts +17 -0
  18. package/src/agents/prompts-zh/metis.md +284 -0
  19. package/src/agents/prompts-zh/momus.md +181 -0
  20. package/src/agents/prompts-zh/oracle.md +206 -0
  21. package/src/agents/prompts-zh/prometheus.md +1327 -0
  22. package/src/agents/prompts-zh/sisyphus.md +387 -0
  23. package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-16.d.ts +0 -1
  24. package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-17.d.ts +0 -1
  25. package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-18.d.ts +0 -1
  26. package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-19.d.ts +0 -1
  27. package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-20.d.ts +0 -1
  28. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-01.d.ts +0 -1
  29. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-02.d.ts +0 -1
  30. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-03.d.ts +0 -1
  31. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-04.d.ts +0 -1
  32. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-05.d.ts +0 -1
  33. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-06.d.ts +0 -1
  34. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-07.d.ts +0 -1
  35. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-08.d.ts +0 -1
  36. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-09.d.ts +0 -1
  37. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-10.d.ts +0 -1
  38. package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-11.d.ts +0 -1
  39. package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-12.d.ts +0 -1
  40. package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-13.d.ts +0 -1
  41. package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-14.d.ts +0 -1
  42. package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-15.d.ts +0 -1
@@ -1,2 +1,3 @@
1
+ export declare function logPerf(source: string, elapsedMs: number): void;
1
2
  export declare function log(message: string, data?: unknown): void;
2
3
  export declare function getLogFilePath(): string;
@@ -1,8 +1,8 @@
1
1
  export declare const PLUGIN_NAME = "@skj1724/oh-my-openagent";
2
- export declare const LEGACY_PLUGIN_NAME = "oh-my-opencode";
3
- export declare const PUBLISHED_PACKAGE_NAME = "oh-my-opencode";
4
- export declare const ACCEPTED_PACKAGE_NAMES: readonly ["oh-my-opencode", "@skj1724/oh-my-openagent"];
5
- export declare const CONFIG_BASENAME = "oh-my-openagent";
2
+ export declare const LEGACY_PLUGIN_NAME = "@skj1724/oh-my-opencode";
3
+ export declare const PUBLISHED_PACKAGE_NAME = "@skj1724/oh-my-opencode";
4
+ export declare const ACCEPTED_PACKAGE_NAMES: readonly ["@skj1724/oh-my-opencode", "@skj1724/oh-my-openagent"];
5
+ export declare const CONFIG_BASENAME = "oh-my-opencode";
6
6
  export declare const LEGACY_CONFIG_BASENAME = "oh-my-opencode";
7
7
  export declare const LOG_FILENAME = "oh-my-opencode.log";
8
8
  export declare const CACHE_DIR_NAME = "oh-my-opencode";
package/package.json CHANGED
@@ -1,96 +1,98 @@
1
- {
2
- "name": "@skj1724/oh-my-opencode",
3
- "version": "3.18.21",
4
- "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
- "main": "./dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "type": "module",
8
- "bin": {
9
- "oh-my-opencode": "bin/oh-my-opencode.js",
10
- "oh-my-openagent": "bin/oh-my-opencode.js"
11
- },
12
- "files": [
13
- "dist",
14
- "bin",
15
- "postinstall.mjs"
16
- ],
17
- "exports": {
18
- ".": {
19
- "types": "./dist/index.d.ts",
20
- "import": "./dist/index.js"
21
- },
22
- "./schema.json": "./dist/oh-my-opencode.schema.json"
23
- },
24
- "scripts": {
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",
26
- "build:all": "bun run build && bun run build:binaries",
27
- "build:binaries": "bun run script/build-binaries.ts",
28
- "build:schema": "bun run script/build-schema.ts",
29
- "build:model-capabilities": "bun run script/build-model-capabilities.ts",
30
- "clean": "rm -rf dist",
31
- "prepare": "bun run build",
32
- "postinstall": "node postinstall.mjs",
33
- "prepublishOnly": "bun run clean && bun run build",
34
- "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 src/cli/doctor/checks/model-resolution.test.ts --bail",
35
- "typecheck": "tsc --noEmit",
36
- "test": "bun test"
37
- },
38
- "keywords": [
39
- "opencode",
40
- "plugin",
41
- "oracle",
42
- "librarian",
43
- "agents",
44
- "ai",
45
- "llm"
46
- ],
47
- "author": "YeonGyu-Kim",
48
- "license": "SUL-1.0",
49
- "dependencies": {
50
- "@ast-grep/cli": "^0.41.1",
51
- "@ast-grep/napi": "^0.41.1",
52
- "@clack/prompts": "^0.11.0",
53
- "@code-yeongyu/comment-checker": "^0.7.0",
54
- "@modelcontextprotocol/sdk": "^1.25.2",
55
- "@opencode-ai/plugin": "^1.4.0",
56
- "@opencode-ai/sdk": "^1.4.0",
57
- "commander": "^14.0.2",
58
- "detect-libc": "^2.0.0",
59
- "diff": "^8.0.3",
60
- "js-yaml": "^4.1.1",
61
- "jsonc-parser": "^3.3.1",
62
- "picocolors": "^1.1.1",
63
- "picomatch": "^4.0.4",
64
- "posthog-node": "5.28.11",
65
- "vscode-jsonrpc": "^8.2.0"
66
- },
67
- "devDependencies": {
68
- "@types/js-yaml": "^4.0.9",
69
- "@types/picomatch": "^3.0.2",
70
- "bun-types": "1.3.11",
71
- "typescript": "^5.7.3",
72
- "zod": "^4.3.0"
73
- },
74
- "optionalDependencies": {
75
- "oh-my-opencode-darwin-arm64": "3.17.4",
76
- "oh-my-opencode-darwin-x64": "3.17.4",
77
- "oh-my-opencode-darwin-x64-baseline": "3.17.4",
78
- "oh-my-opencode-linux-arm64": "3.17.4",
79
- "oh-my-opencode-linux-arm64-musl": "3.17.4",
80
- "oh-my-opencode-linux-x64": "3.17.4",
81
- "oh-my-opencode-linux-x64-baseline": "3.17.4",
82
- "oh-my-opencode-linux-x64-musl": "3.17.4",
83
- "oh-my-opencode-linux-x64-musl-baseline": "3.17.4",
84
- "@skj1724/oh-my-opencode-windows-x64": "3.18.19",
85
- "oh-my-opencode-windows-x64-baseline": "3.17.4"
86
- },
87
- "overrides": {},
88
- "trustedDependencies": [
89
- "@ast-grep/cli",
90
- "@ast-grep/napi",
91
- "@code-yeongyu/comment-checker"
92
- ],
93
- "peerDependencies": {
94
- "zod": "^4.0.0"
95
- }
96
- }
1
+ {
2
+ "name": "@skj1724/oh-my-opencode",
3
+ "version": "3.18.24",
4
+ "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
+ "main": "./dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "type": "module",
8
+ "bin": {
9
+ "oh-my-opencode": "bin/oh-my-opencode.js",
10
+ "oh-my-openagent": "bin/oh-my-opencode.js"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "bin",
15
+ "postinstall.mjs",
16
+ "src/agents/prompts-zh/"
17
+ ],
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.js"
22
+ },
23
+ "./schema.json": "./dist/oh-my-opencode.schema.json"
24
+ },
25
+ "scripts": {
26
+ "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",
27
+ "build:all": "bun run build && bun run build:binaries",
28
+ "build:binaries": "bun run script/build-binaries.ts",
29
+ "build:schema": "bun run script/build-schema.ts",
30
+ "build:model-capabilities": "bun run script/build-model-capabilities.ts",
31
+ "clean": "rm -rf dist",
32
+ "prepare": "bun run build",
33
+ "postinstall": "node postinstall.mjs",
34
+ "prepublishOnly": "bun run clean && bun run build",
35
+ "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 src/cli/doctor/checks/model-resolution.test.ts --bail",
36
+ "typecheck": "tsc --noEmit",
37
+ "test": "bun test",
38
+ "link-to-project": "node script/link-to-project.mjs"
39
+ },
40
+ "keywords": [
41
+ "opencode",
42
+ "plugin",
43
+ "oracle",
44
+ "librarian",
45
+ "agents",
46
+ "ai",
47
+ "llm"
48
+ ],
49
+ "author": "YeonGyu-Kim",
50
+ "license": "SUL-1.0",
51
+ "dependencies": {
52
+ "@ast-grep/cli": "^0.41.1",
53
+ "@ast-grep/napi": "^0.41.1",
54
+ "@clack/prompts": "^0.11.0",
55
+ "@code-yeongyu/comment-checker": "^0.7.0",
56
+ "@modelcontextprotocol/sdk": "^1.25.2",
57
+ "@opencode-ai/plugin": "^1.4.0",
58
+ "@opencode-ai/sdk": "^1.4.0",
59
+ "commander": "^14.0.2",
60
+ "detect-libc": "^2.0.0",
61
+ "diff": "^8.0.3",
62
+ "js-yaml": "^4.1.1",
63
+ "jsonc-parser": "^3.3.1",
64
+ "picocolors": "^1.1.1",
65
+ "picomatch": "^4.0.4",
66
+ "posthog-node": "5.28.11",
67
+ "vscode-jsonrpc": "^8.2.0"
68
+ },
69
+ "devDependencies": {
70
+ "@types/js-yaml": "^4.0.9",
71
+ "@types/picomatch": "^3.0.2",
72
+ "bun-types": "1.3.11",
73
+ "typescript": "^5.7.3",
74
+ "zod": "^4.3.0"
75
+ },
76
+ "optionalDependencies": {
77
+ "oh-my-opencode-darwin-arm64": "3.17.4",
78
+ "oh-my-opencode-darwin-x64": "3.17.4",
79
+ "oh-my-opencode-darwin-x64-baseline": "3.17.4",
80
+ "oh-my-opencode-linux-arm64": "3.17.4",
81
+ "oh-my-opencode-linux-arm64-musl": "3.17.4",
82
+ "oh-my-opencode-linux-x64": "3.17.4",
83
+ "oh-my-opencode-linux-x64-baseline": "3.17.4",
84
+ "oh-my-opencode-linux-x64-musl": "3.17.4",
85
+ "oh-my-opencode-linux-x64-musl-baseline": "3.17.4",
86
+ "oh-my-opencode-windows-x64": "3.17.5",
87
+ "oh-my-opencode-windows-x64-baseline": "3.17.4"
88
+ },
89
+ "overrides": {},
90
+ "trustedDependencies": [
91
+ "@ast-grep/cli",
92
+ "@ast-grep/napi",
93
+ "@code-yeongyu/comment-checker"
94
+ ],
95
+ "peerDependencies": {
96
+ "zod": "^4.0.0"
97
+ }
98
+ }
package/postinstall.mjs CHANGED
@@ -1,133 +1,35 @@
1
- // postinstall.mjs
2
- // Runs after npm install to verify platform binary is available
3
-
4
- import { readFileSync } from "node:fs";
5
- import { createRequire } from "node:module";
6
- import { getPlatformPackageCandidates, getBinaryPath } from "./bin/platform.js";
7
-
8
- const require = createRequire(import.meta.url);
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
-
64
- /**
65
- * Detect libc family on Linux
66
- */
67
- function getLibcFamily() {
68
- if (process.platform !== "linux") {
69
- return undefined;
70
- }
71
-
72
- try {
73
- const detectLibc = require("detect-libc");
74
- return detectLibc.familySync();
75
- } catch {
76
- return null;
77
- }
78
- }
79
-
80
- function getPackageBaseName() {
81
- try {
82
- const packageJson = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8"));
83
- return packageJson.name || "oh-my-opencode" || "@skj1724/oh-my-opencode";
84
- } catch {
85
- return "oh-my-opencode";
86
- }
87
- }
88
-
89
- function main() {
90
- const { platform, arch } = process;
91
- const libcFamily = getLibcFamily();
92
- const packageBaseName = getPackageBaseName();
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
-
102
- try {
103
- const packageCandidates = getPlatformPackageCandidates({
104
- platform,
105
- arch,
106
- libcFamily,
107
- packageBaseName,
108
- });
109
-
110
- const resolvedPackage = packageCandidates.find((pkg) => {
111
- try {
112
- require.resolve(getBinaryPath(pkg, platform));
113
- return true;
114
- } catch {
115
- return false;
116
- }
117
- });
118
-
119
- if (!resolvedPackage) {
120
- throw new Error(
121
- `No platform binary package installed. Tried: ${packageCandidates.join(", ")}`
122
- );
123
- }
124
-
125
- console.log(`✓ oh-my-opencode binary installed for ${platform}-${arch} (${resolvedPackage})`);
126
- } catch (error) {
127
- console.warn(`⚠ oh-my-opencode: ${error.message}`);
128
- console.warn(` The CLI may not work on this platform.`);
129
- // Don't fail installation - let user try anyway
130
- }
131
- }
132
-
133
- main();
1
+ // postinstall.mjs
2
+ // Runs after npm install - verifies OpenCode is installed
3
+
4
+ import { execSync } from "node:child_process";
5
+
6
+ const MIN_OPENCODE_VERSION = "1.4.0";
7
+
8
+ function parseVersion(version) {
9
+ return version.replace(/^v/, "").split("-")[0].split(".").map((n) => Number.parseInt(n, 10) || 0);
10
+ }
11
+
12
+ function compareVersions(current, minimum) {
13
+ const a = parseVersion(current);
14
+ const b = parseVersion(minimum);
15
+ const len = Math.max(a.length, b.length);
16
+ for (let i = 0; i < len; i++) {
17
+ if ((a[i] ?? 0) > (b[i] ?? 0)) return true;
18
+ if ((a[i] ?? 0) < (b[i] ?? 0)) return false;
19
+ }
20
+ return true;
21
+ }
22
+
23
+ function main() {
24
+ try {
25
+ const version = execSync("opencode --version", { encoding: "utf-8", stdio: ["pipe", "pipe", "ignore"] }).trim();
26
+ if (!compareVersions(version, MIN_OPENCODE_VERSION)) {
27
+ console.warn(`oh-my-opencode requires OpenCode >= ${MIN_OPENCODE_VERSION} (detected: ${version})`);
28
+ }
29
+ } catch {
30
+ // OpenCode not found - OK, plugin can still be installed
31
+ }
32
+ console.log("oh-my-openagent installed");
33
+ }
34
+
35
+ main();