@skj1724/oh-my-opencode 3.18.26 → 3.18.28

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 (124) hide show
  1. package/README.ja.md +16 -16
  2. package/README.ko.md +16 -16
  3. package/README.md +19 -19
  4. package/README.ru.md +8 -8
  5. package/README.zh-cn.md +16 -16
  6. package/bin/oh-my-opencode.js +4 -2
  7. package/bin/platform.js +2 -2
  8. package/bin/platform.test.ts +25 -0
  9. package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-16.d.ts +1 -0
  10. package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-17.d.ts +1 -0
  11. package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-18.d.ts +1 -0
  12. package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-19.d.ts +1 -0
  13. package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-20.d.ts +1 -0
  14. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-01.d.ts +1 -0
  15. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-02.d.ts +1 -0
  16. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-03.d.ts +1 -0
  17. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-04.d.ts +1 -0
  18. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-05.d.ts +1 -0
  19. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-06.d.ts +1 -0
  20. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-07.d.ts +1 -0
  21. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-08.d.ts +1 -0
  22. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-09.d.ts +1 -0
  23. package/dist/__tests__/perf/fixtures/in-tree/src/app/file-10.d.ts +1 -0
  24. package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-11.d.ts +1 -0
  25. package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-12.d.ts +1 -0
  26. package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-13.d.ts +1 -0
  27. package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-14.d.ts +1 -0
  28. package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-15.d.ts +1 -0
  29. package/dist/agents/atlas/agent.d.ts +2 -3
  30. package/dist/agents/atlas/default-prompt-sections.d.ts +6 -6
  31. package/dist/agents/atlas/gemini-prompt-sections.d.ts +6 -6
  32. package/dist/agents/atlas/gpt-prompt-sections.d.ts +6 -6
  33. package/dist/agents/atlas/prompt-section-builder.d.ts +3 -3
  34. package/dist/agents/builtin-agents/atlas-agent.d.ts +0 -2
  35. package/dist/agents/builtin-agents/environment-context.d.ts +0 -1
  36. package/dist/agents/builtin-agents/general-agents.d.ts +0 -1
  37. package/dist/agents/builtin-agents/hephaestus-agent.d.ts +0 -1
  38. package/dist/agents/builtin-agents/sisyphus-agent.d.ts +0 -1
  39. package/dist/agents/builtin-agents.d.ts +1 -1
  40. package/dist/agents/dynamic-agent-category-skills-guide.d.ts +1 -1
  41. package/dist/agents/dynamic-agent-core-sections.d.ts +14 -9
  42. package/dist/agents/dynamic-agent-policy-sections.d.ts +5 -5
  43. package/dist/agents/dynamic-agent-tool-categorization.d.ts +1 -1
  44. package/dist/agents/env-context.d.ts +7 -1
  45. package/dist/agents/hephaestus/agent.d.ts +2 -2
  46. package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +9 -9
  47. package/dist/agents/hephaestus/gpt-5-4.d.ts +18 -18
  48. package/dist/agents/hephaestus/gpt-5-5.d.ts +13 -0
  49. package/dist/agents/hephaestus/gpt.d.ts +1 -1
  50. package/dist/agents/metis.d.ts +9 -9
  51. package/dist/agents/momus.d.ts +10 -11
  52. package/dist/agents/prometheus/behavioral-summary.d.ts +3 -3
  53. package/dist/agents/prometheus/gemini.d.ts +7 -7
  54. package/dist/agents/prometheus/gpt.d.ts +6 -6
  55. package/dist/agents/prometheus/high-accuracy-mode.d.ts +3 -3
  56. package/dist/agents/prometheus/identity-constraints.d.ts +3 -4
  57. package/dist/agents/prometheus/interview-mode.d.ts +3 -3
  58. package/dist/agents/prometheus/plan-generation.d.ts +4 -4
  59. package/dist/agents/prometheus/plan-template.d.ts +4 -4
  60. package/dist/agents/prometheus/system-prompt.d.ts +10 -10
  61. package/dist/agents/sisyphus/default.d.ts +3 -3
  62. package/dist/agents/sisyphus/gemini.d.ts +10 -10
  63. package/dist/agents/sisyphus/gpt-5-4.d.ts +18 -18
  64. package/dist/agents/sisyphus/gpt-5-5.d.ts +18 -0
  65. package/dist/agents/sisyphus/index.d.ts +1 -0
  66. package/dist/agents/sisyphus-junior/agent.d.ts +2 -2
  67. package/dist/agents/sisyphus-junior/default.d.ts +5 -5
  68. package/dist/agents/sisyphus-junior/gemini.d.ts +6 -6
  69. package/dist/agents/sisyphus-junior/gpt-5-3-codex.d.ts +4 -4
  70. package/dist/agents/sisyphus-junior/gpt-5-4.d.ts +7 -7
  71. package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +12 -0
  72. package/dist/agents/sisyphus-junior/gpt.d.ts +5 -5
  73. package/dist/agents/sisyphus-junior/index.d.ts +1 -0
  74. package/dist/agents/sisyphus.d.ts +2 -3
  75. package/dist/agents/types.d.ts +2 -1
  76. package/dist/cli/index.js +2298 -3321
  77. package/dist/config/schema/agent-overrides.d.ts +0 -15
  78. package/dist/config/schema/commands.d.ts +0 -2
  79. package/dist/config/schema/oh-my-opencode-config.d.ts +0 -19
  80. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
  81. package/dist/features/builtin-commands/templates/ralph-loop.d.ts +3 -3
  82. package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
  83. package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -1
  84. package/dist/features/builtin-commands/types.d.ts +1 -2
  85. package/dist/features/builtin-skills/skills/git-master-sections/commit-workflow.d.ts +1 -1
  86. package/dist/hooks/atlas/system-reminder-templates.d.ts +6 -6
  87. package/dist/hooks/auto-update-checker/constants.d.ts +1 -1
  88. package/dist/hooks/compaction-context-injector/compaction-context-prompt.d.ts +1 -1
  89. package/dist/hooks/keyword-detector/analyze/default.d.ts +8 -8
  90. package/dist/hooks/keyword-detector/search/default.d.ts +8 -8
  91. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +6 -6
  92. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +12 -12
  93. package/dist/hooks/keyword-detector/ultrawork/gpt.d.ts +7 -7
  94. package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +3 -3
  95. package/dist/hooks/prometheus-md-only/constants.d.ts +2 -2
  96. package/dist/hooks/todo-continuation-enforcer/constants.d.ts +1 -1
  97. package/dist/index.js +9436 -10471
  98. package/dist/oh-my-opencode.schema.json +3 -57
  99. package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +1 -5
  100. package/dist/shared/logger.d.ts +0 -1
  101. package/dist/shared/model-capabilities/supplemental-entries.d.ts +2 -0
  102. package/dist/shared/plugin-identity.d.ts +4 -4
  103. package/dist/shared/system-directive.d.ts +1 -2
  104. package/dist/tools/ast-grep/pattern-hints.d.ts +4 -0
  105. package/dist/tools/ast-grep/tool-descriptions.d.ts +3 -0
  106. package/dist/tools/call-omo-agent/constants.d.ts +1 -1
  107. package/dist/tools/delegate-task/prompt-builder.d.ts +2 -2
  108. package/package.json +104 -98
  109. package/postinstall.mjs +133 -35
  110. package/dist/agents/load-prompt-template.d.ts +0 -1
  111. package/dist/agents/prompts-zh/index.d.ts +0 -16
  112. package/dist/agents/types/language.d.ts +0 -3
  113. package/dist/config/schema/i18n.d.ts +0 -21
  114. package/dist/features/builtin-commands/templates/open-plan.d.ts +0 -1
  115. package/src/agents/prompts-zh/atlas.md +0 -657
  116. package/src/agents/prompts-zh/general-agents.md +0 -401
  117. package/src/agents/prompts-zh/hephaestus.md +0 -391
  118. package/src/agents/prompts-zh/index.ts +0 -17
  119. package/src/agents/prompts-zh/metis.md +0 -284
  120. package/src/agents/prompts-zh/momus.md +0 -181
  121. package/src/agents/prompts-zh/oracle.md +0 -206
  122. package/src/agents/prompts-zh/prometheus.md +0 -1327
  123. package/src/agents/prompts-zh/sisyphus-junior.md +0 -29
  124. package/src/agents/prompts-zh/sisyphus.md +0 -387
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/oh-my-opencode.schema.json",
3
+ "$id": "https://raw.githubusercontent.com/skj1724/oh-my-openagent/dev/assets/oh-my-opencode.schema.json",
4
4
  "title": "Oh My OpenCode Configuration",
5
- "description": "Configuration schema for oh-my-opencode plugin",
5
+ "description": "Configuration schema for @skj1724/oh-my-opencode plugin",
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "$schema": {
@@ -67,9 +67,7 @@
67
67
  "refactor",
68
68
  "start-work",
69
69
  "stop-continuation",
70
- "handoff",
71
- "remove-ai-slops",
72
- "open-plan"
70
+ "remove-ai-slops"
73
71
  ]
74
72
  }
75
73
  },
@@ -270,9 +268,6 @@
270
268
  "prompt_append": {
271
269
  "type": "string"
272
270
  },
273
- "language": {
274
- "type": "string"
275
- },
276
271
  "tools": {
277
272
  "type": "object",
278
273
  "propertyNames": {
@@ -623,9 +618,6 @@
623
618
  "prompt_append": {
624
619
  "type": "string"
625
620
  },
626
- "language": {
627
- "type": "string"
628
- },
629
621
  "tools": {
630
622
  "type": "object",
631
623
  "propertyNames": {
@@ -976,9 +968,6 @@
976
968
  "prompt_append": {
977
969
  "type": "string"
978
970
  },
979
- "language": {
980
- "type": "string"
981
- },
982
971
  "tools": {
983
972
  "type": "object",
984
973
  "propertyNames": {
@@ -1329,9 +1318,6 @@
1329
1318
  "prompt_append": {
1330
1319
  "type": "string"
1331
1320
  },
1332
- "language": {
1333
- "type": "string"
1334
- },
1335
1321
  "tools": {
1336
1322
  "type": "object",
1337
1323
  "propertyNames": {
@@ -1685,9 +1671,6 @@
1685
1671
  "prompt_append": {
1686
1672
  "type": "string"
1687
1673
  },
1688
- "language": {
1689
- "type": "string"
1690
- },
1691
1674
  "tools": {
1692
1675
  "type": "object",
1693
1676
  "propertyNames": {
@@ -2038,9 +2021,6 @@
2038
2021
  "prompt_append": {
2039
2022
  "type": "string"
2040
2023
  },
2041
- "language": {
2042
- "type": "string"
2043
- },
2044
2024
  "tools": {
2045
2025
  "type": "object",
2046
2026
  "propertyNames": {
@@ -2391,9 +2371,6 @@
2391
2371
  "prompt_append": {
2392
2372
  "type": "string"
2393
2373
  },
2394
- "language": {
2395
- "type": "string"
2396
- },
2397
2374
  "tools": {
2398
2375
  "type": "object",
2399
2376
  "propertyNames": {
@@ -2744,9 +2721,6 @@
2744
2721
  "prompt_append": {
2745
2722
  "type": "string"
2746
2723
  },
2747
- "language": {
2748
- "type": "string"
2749
- },
2750
2724
  "tools": {
2751
2725
  "type": "object",
2752
2726
  "propertyNames": {
@@ -3097,9 +3071,6 @@
3097
3071
  "prompt_append": {
3098
3072
  "type": "string"
3099
3073
  },
3100
- "language": {
3101
- "type": "string"
3102
- },
3103
3074
  "tools": {
3104
3075
  "type": "object",
3105
3076
  "propertyNames": {
@@ -3450,9 +3421,6 @@
3450
3421
  "prompt_append": {
3451
3422
  "type": "string"
3452
3423
  },
3453
- "language": {
3454
- "type": "string"
3455
- },
3456
3424
  "tools": {
3457
3425
  "type": "object",
3458
3426
  "propertyNames": {
@@ -3803,9 +3771,6 @@
3803
3771
  "prompt_append": {
3804
3772
  "type": "string"
3805
3773
  },
3806
- "language": {
3807
- "type": "string"
3808
- },
3809
3774
  "tools": {
3810
3775
  "type": "object",
3811
3776
  "propertyNames": {
@@ -4156,9 +4121,6 @@
4156
4121
  "prompt_append": {
4157
4122
  "type": "string"
4158
4123
  },
4159
- "language": {
4160
- "type": "string"
4161
- },
4162
4124
  "tools": {
4163
4125
  "type": "object",
4164
4126
  "propertyNames": {
@@ -4509,9 +4471,6 @@
4509
4471
  "prompt_append": {
4510
4472
  "type": "string"
4511
4473
  },
4512
- "language": {
4513
- "type": "string"
4514
- },
4515
4474
  "tools": {
4516
4475
  "type": "object",
4517
4476
  "propertyNames": {
@@ -4862,9 +4821,6 @@
4862
4821
  "prompt_append": {
4863
4822
  "type": "string"
4864
4823
  },
4865
- "language": {
4866
- "type": "string"
4867
- },
4868
4824
  "tools": {
4869
4825
  "type": "object",
4870
4826
  "propertyNames": {
@@ -6107,16 +6063,6 @@
6107
6063
  ],
6108
6064
  "additionalProperties": false
6109
6065
  },
6110
- "i18n": {
6111
- "type": "object",
6112
- "properties": {
6113
- "language": {
6114
- "type": "string",
6115
- "minLength": 1
6116
- }
6117
- },
6118
- "additionalProperties": false
6119
- },
6120
6066
  "_migrations": {
6121
6067
  "type": "array",
6122
6068
  "items": {
@@ -1,4 +1,3 @@
1
- import type { AgentConfig } from "@opencode-ai/sdk";
2
1
  import type { CategoryConfig } from "../config/schema";
3
2
  type PrometheusOverride = Record<string, unknown> & {
4
3
  category?: string;
@@ -21,8 +20,5 @@ export declare function buildPrometheusAgentConfig(params: {
21
20
  userCategories: Record<string, CategoryConfig> | undefined;
22
21
  currentModel: string | undefined;
23
22
  disabledTools?: readonly string[];
24
- directory: string;
25
- language?: string;
26
- disableOmoEnv?: boolean;
27
- }): Promise<AgentConfig>;
23
+ }): Promise<Record<string, unknown>>;
28
24
  export {};
@@ -1,3 +1,2 @@
1
- export declare function logPerf(source: string, elapsedMs: number): void;
2
1
  export declare function log(message: string, data?: unknown): void;
3
2
  export declare function getLogFilePath(): string;
@@ -0,0 +1,2 @@
1
+ import type { ModelCapabilitiesSnapshotEntry } from "./types";
2
+ export declare const SUPPLEMENTAL_MODEL_CAPABILITIES: Record<string, ModelCapabilitiesSnapshotEntry>;
@@ -1,8 +1,8 @@
1
- export declare const PLUGIN_NAME = "@skj1724/oh-my-opencode";
2
- export declare const LEGACY_PLUGIN_NAME = "@skj1724/oh-my-openagent";
1
+ export declare const PLUGIN_NAME = "oh-my-openagent";
2
+ export declare const LEGACY_PLUGIN_NAME = "oh-my-opencode";
3
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-opencode"];
5
- export declare const CONFIG_BASENAME = "oh-my-opencode";
4
+ export declare const ACCEPTED_PACKAGE_NAMES: readonly ["@skj1724/oh-my-opencode", "oh-my-openagent"];
5
+ export declare const CONFIG_BASENAME = "oh-my-openagent";
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";
@@ -8,10 +8,9 @@ export declare const SYSTEM_DIRECTIVE_PREFIX = "[SYSTEM DIRECTIVE: OH-MY-OPENCOD
8
8
  /**
9
9
  * Creates a system directive header with the given type.
10
10
  * @param type - The directive type (e.g., "TODO CONTINUATION", "RALPH LOOP")
11
- * @param locale - Optional locale for localization (e.g., "zh-CN")
12
11
  * @returns Formatted directive string like "[SYSTEM DIRECTIVE: OH-MY-OPENCODE - TODO CONTINUATION]"
13
12
  */
14
- export declare function createSystemDirective(type: string, locale?: string): string;
13
+ export declare function createSystemDirective(type: string): string;
15
14
  /**
16
15
  * Checks if a message starts with the oh-my-opencode system directive prefix.
17
16
  * Used by keyword-detector and other hooks to skip system-generated messages.
@@ -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,2 +1,2 @@
1
1
  export declare const ALLOWED_AGENTS: readonly ["explore", "librarian", "oracle", "hephaestus", "metis", "momus", "multimodal-looker"];
2
- export declare const CALL_OMO_AGENT_DESCRIPTION = "\u542F\u52A8 explore/librarian \u4EE3\u7406\u6216\u81EA\u5B9A\u4E49\u4EE3\u7406\u3002\u5FC5\u987B\u63D0\u4F9B run_in_background (true=\u5F02\u6B65\u8FD4\u56DE task_id, false=\u540C\u6B65)\u3002\n\n\u5185\u7F6E\u4EE3\u7406:\n{agents}\n\n\u4E5F\u652F\u6301\u901A\u8FC7\u7528\u6237\u6216\u9879\u76EE\u4EE3\u7406\u76EE\u5F55\u6CE8\u518C\u7684\u81EA\u5B9A\u4E49\u4EE3\u7406\u3002\n\n\u4F20\u9012 `session_id=<id>` \u53EF\u7EE7\u7EED\u4E4B\u524D\u7684\u4EE3\u7406\u5E76\u4FDD\u7559\u5B8C\u6574\u4E0A\u4E0B\u6587\u3002\u5D4C\u5957 subagent \u6DF1\u5EA6\u81EA\u52A8\u8FFD\u8E2A\uFF0C\u8D85\u8FC7\u914D\u7F6E\u9650\u5236\u540E\u4F1A\u88AB\u963B\u6B62\u3002\u4F7F\u7528 `background_output` \u83B7\u53D6\u5F02\u6B65\u7ED3\u679C\u3002**\u63D0\u793A\u8BCD\u5FC5\u987B\u4F7F\u7528\u4E2D\u6587,\u4E0D\u5F97\u4F7F\u7528\u5176\u4ED6\u8BED\u8A00\u3002**";
2
+ export declare const CALL_OMO_AGENT_DESCRIPTION = "Spawn explore/librarian agent or custom agents. run_in_background REQUIRED (true=async with task_id, false=sync).\n\nBuilt-in agents:\n{agents}\n\nCustom agents registered via user or project agent directories are also supported.\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.";
@@ -1,7 +1,7 @@
1
1
  import type { BuildSystemContentInput } from "./types";
2
2
  /**
3
- * Build the system content to inject into the agent prompt.
4
- * Combines skill content, category prompt append, and plan agent system prepend.
3
+ * 构建系统内容以注入代理提示中。
4
+ * 合并技能内容、分类提示附加内容以及规划代理系统前置内容。
5
5
  */
6
6
  export declare function buildSystemContent(input: BuildSystemContentInput): string | undefined;
7
7
  export declare function buildTaskPrompt(prompt: string, agentName: string | undefined, tddEnabled?: boolean): string;
package/package.json CHANGED
@@ -1,98 +1,104 @@
1
- {
2
- "name": "@skj1724/oh-my-opencode",
3
- "version": "3.18.26",
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
- }
1
+ {
2
+ "name": "@skj1724/oh-my-opencode",
3
+ "version": "3.18.28",
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
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/skj1724/oh-my-openagent.git"
52
+ },
53
+ "bugs": {
54
+ "url": "https://github.com/skj1724/oh-my-openagent/issues"
55
+ },
56
+ "homepage": "https://github.com/skj1724/oh-my-openagent#readme",
57
+ "dependencies": {
58
+ "@ast-grep/cli": "^0.41.1",
59
+ "@ast-grep/napi": "^0.41.1",
60
+ "@clack/prompts": "^0.11.0",
61
+ "@code-yeongyu/comment-checker": "^0.7.0",
62
+ "@modelcontextprotocol/sdk": "^1.25.2",
63
+ "@opencode-ai/plugin": "^1.4.0",
64
+ "@opencode-ai/sdk": "^1.4.0",
65
+ "commander": "^14.0.2",
66
+ "detect-libc": "^2.0.0",
67
+ "diff": "^8.0.3",
68
+ "js-yaml": "^4.1.1",
69
+ "jsonc-parser": "^3.3.1",
70
+ "picocolors": "^1.1.1",
71
+ "picomatch": "^4.0.2",
72
+ "posthog-node": "^5.29.2",
73
+ "vscode-jsonrpc": "^8.2.0"
74
+ },
75
+ "devDependencies": {
76
+ "@types/js-yaml": "^4.0.9",
77
+ "@types/picomatch": "^3.0.2",
78
+ "bun-types": "1.3.11",
79
+ "typescript": "^5.7.3",
80
+ "zod": "^4.3.0"
81
+ },
82
+ "optionalDependencies": {
83
+ "oh-my-opencode-darwin-arm64": "3.17.4",
84
+ "oh-my-opencode-darwin-x64": "3.17.4",
85
+ "oh-my-opencode-darwin-x64-baseline": "3.17.4",
86
+ "oh-my-opencode-linux-arm64": "3.17.4",
87
+ "oh-my-opencode-linux-arm64-musl": "3.17.4",
88
+ "oh-my-opencode-linux-x64": "3.17.4",
89
+ "oh-my-opencode-linux-x64-baseline": "3.17.4",
90
+ "oh-my-opencode-linux-x64-musl": "3.17.4",
91
+ "oh-my-opencode-linux-x64-musl-baseline": "3.17.4",
92
+ "oh-my-opencode-windows-x64": "3.17.4",
93
+ "oh-my-opencode-windows-x64-baseline": "3.17.4"
94
+ },
95
+ "overrides": {},
96
+ "trustedDependencies": [
97
+ "@ast-grep/cli",
98
+ "@ast-grep/napi",
99
+ "@code-yeongyu/comment-checker"
100
+ ],
101
+ "peerDependencies": {
102
+ "zod": "^4.0.0"
103
+ }
104
+ }
package/postinstall.mjs CHANGED
@@ -1,35 +1,133 @@
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();
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";
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 +0,0 @@
1
- export declare function loadPromptTemplate(language: string, agentName: string): string | null;
@@ -1,16 +0,0 @@
1
- export declare const CHINESE_PROMPTS: {
2
- readonly sisyphus: "file://./src/agents/prompts-zh/sisyphus.md";
3
- readonly hephaestus: "file://./src/agents/prompts-zh/hephaestus.md";
4
- readonly prometheus: "file://./src/agents/prompts-zh/prometheus.md";
5
- readonly atlas: "file://./src/agents/prompts-zh/atlas.md";
6
- readonly oracle: "file://./src/agents/prompts-zh/oracle.md";
7
- readonly metis: "file://./src/agents/prompts-zh/metis.md";
8
- readonly momus: "file://./src/agents/prompts-zh/momus.md";
9
- readonly "sisyphus-junior": "file://./src/agents/prompts-zh/sisyphus-junior.md";
10
- readonly general: {
11
- readonly librarian: "file://./src/agents/prompts-zh/general-agents.md";
12
- readonly explore: "file://./src/agents/prompts-zh/general-agents.md";
13
- readonly "multimodal-looker": "file://./src/agents/prompts-zh/general-agents.md";
14
- };
15
- };
16
- export type ChinesePromptKey = keyof typeof CHINESE_PROMPTS;