@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.
- package/README.ja.md +16 -16
- package/README.ko.md +16 -16
- package/README.md +19 -19
- package/README.ru.md +8 -8
- package/README.zh-cn.md +16 -16
- package/bin/oh-my-opencode.js +4 -2
- package/bin/platform.js +2 -2
- package/bin/platform.test.ts +25 -0
- 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/agent.d.ts +2 -3
- package/dist/agents/atlas/default-prompt-sections.d.ts +6 -6
- package/dist/agents/atlas/gemini-prompt-sections.d.ts +6 -6
- package/dist/agents/atlas/gpt-prompt-sections.d.ts +6 -6
- package/dist/agents/atlas/prompt-section-builder.d.ts +3 -3
- package/dist/agents/builtin-agents/atlas-agent.d.ts +0 -2
- package/dist/agents/builtin-agents/environment-context.d.ts +0 -1
- package/dist/agents/builtin-agents/general-agents.d.ts +0 -1
- package/dist/agents/builtin-agents/hephaestus-agent.d.ts +0 -1
- package/dist/agents/builtin-agents/sisyphus-agent.d.ts +0 -1
- package/dist/agents/builtin-agents.d.ts +1 -1
- package/dist/agents/dynamic-agent-category-skills-guide.d.ts +1 -1
- package/dist/agents/dynamic-agent-core-sections.d.ts +14 -9
- package/dist/agents/dynamic-agent-policy-sections.d.ts +5 -5
- package/dist/agents/dynamic-agent-tool-categorization.d.ts +1 -1
- package/dist/agents/env-context.d.ts +7 -1
- package/dist/agents/hephaestus/agent.d.ts +2 -2
- package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +9 -9
- package/dist/agents/hephaestus/gpt-5-4.d.ts +18 -18
- package/dist/agents/hephaestus/gpt-5-5.d.ts +13 -0
- package/dist/agents/hephaestus/gpt.d.ts +1 -1
- package/dist/agents/metis.d.ts +9 -9
- package/dist/agents/momus.d.ts +10 -11
- package/dist/agents/prometheus/behavioral-summary.d.ts +3 -3
- package/dist/agents/prometheus/gemini.d.ts +7 -7
- package/dist/agents/prometheus/gpt.d.ts +6 -6
- package/dist/agents/prometheus/high-accuracy-mode.d.ts +3 -3
- package/dist/agents/prometheus/identity-constraints.d.ts +3 -4
- package/dist/agents/prometheus/interview-mode.d.ts +3 -3
- package/dist/agents/prometheus/plan-generation.d.ts +4 -4
- package/dist/agents/prometheus/plan-template.d.ts +4 -4
- package/dist/agents/prometheus/system-prompt.d.ts +10 -10
- package/dist/agents/sisyphus/default.d.ts +3 -3
- package/dist/agents/sisyphus/gemini.d.ts +10 -10
- package/dist/agents/sisyphus/gpt-5-4.d.ts +18 -18
- package/dist/agents/sisyphus/gpt-5-5.d.ts +18 -0
- package/dist/agents/sisyphus/index.d.ts +1 -0
- package/dist/agents/sisyphus-junior/agent.d.ts +2 -2
- package/dist/agents/sisyphus-junior/default.d.ts +5 -5
- package/dist/agents/sisyphus-junior/gemini.d.ts +6 -6
- package/dist/agents/sisyphus-junior/gpt-5-3-codex.d.ts +4 -4
- package/dist/agents/sisyphus-junior/gpt-5-4.d.ts +7 -7
- package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +12 -0
- package/dist/agents/sisyphus-junior/gpt.d.ts +5 -5
- package/dist/agents/sisyphus-junior/index.d.ts +1 -0
- package/dist/agents/sisyphus.d.ts +2 -3
- package/dist/agents/types.d.ts +2 -1
- package/dist/cli/index.js +2298 -3321
- package/dist/config/schema/agent-overrides.d.ts +0 -15
- package/dist/config/schema/commands.d.ts +0 -2
- package/dist/config/schema/oh-my-opencode-config.d.ts +0 -19
- package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +3 -3
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
- package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -1
- package/dist/features/builtin-commands/types.d.ts +1 -2
- package/dist/features/builtin-skills/skills/git-master-sections/commit-workflow.d.ts +1 -1
- package/dist/hooks/atlas/system-reminder-templates.d.ts +6 -6
- package/dist/hooks/auto-update-checker/constants.d.ts +1 -1
- package/dist/hooks/compaction-context-injector/compaction-context-prompt.d.ts +1 -1
- package/dist/hooks/keyword-detector/analyze/default.d.ts +8 -8
- package/dist/hooks/keyword-detector/search/default.d.ts +8 -8
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +6 -6
- package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +12 -12
- package/dist/hooks/keyword-detector/ultrawork/gpt.d.ts +7 -7
- package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +3 -3
- package/dist/hooks/prometheus-md-only/constants.d.ts +2 -2
- package/dist/hooks/todo-continuation-enforcer/constants.d.ts +1 -1
- package/dist/index.js +9436 -10471
- package/dist/oh-my-opencode.schema.json +3 -57
- package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +1 -5
- package/dist/shared/logger.d.ts +0 -1
- package/dist/shared/model-capabilities/supplemental-entries.d.ts +2 -0
- package/dist/shared/plugin-identity.d.ts +4 -4
- package/dist/shared/system-directive.d.ts +1 -2
- 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/constants.d.ts +1 -1
- package/dist/tools/delegate-task/prompt-builder.d.ts +2 -2
- package/package.json +104 -98
- package/postinstall.mjs +133 -35
- package/dist/agents/load-prompt-template.d.ts +0 -1
- package/dist/agents/prompts-zh/index.d.ts +0 -16
- package/dist/agents/types/language.d.ts +0 -3
- package/dist/config/schema/i18n.d.ts +0 -21
- package/dist/features/builtin-commands/templates/open-plan.d.ts +0 -1
- package/src/agents/prompts-zh/atlas.md +0 -657
- package/src/agents/prompts-zh/general-agents.md +0 -401
- package/src/agents/prompts-zh/hephaestus.md +0 -391
- package/src/agents/prompts-zh/index.ts +0 -17
- package/src/agents/prompts-zh/metis.md +0 -284
- package/src/agents/prompts-zh/momus.md +0 -181
- package/src/agents/prompts-zh/oracle.md +0 -206
- package/src/agents/prompts-zh/prometheus.md +0 -1327
- package/src/agents/prompts-zh/sisyphus-junior.md +0 -29
- 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/
|
|
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
|
-
"
|
|
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
|
-
|
|
25
|
-
language?: string;
|
|
26
|
-
disableOmoEnv?: boolean;
|
|
27
|
-
}): Promise<AgentConfig>;
|
|
23
|
+
}): Promise<Record<string, unknown>>;
|
|
28
24
|
export {};
|
package/dist/shared/logger.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const PLUGIN_NAME = "
|
|
2
|
-
export declare const LEGACY_PLUGIN_NAME = "
|
|
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", "
|
|
5
|
-
export declare const CONFIG_BASENAME = "oh-my-
|
|
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
|
|
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 = "
|
|
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
|
-
*
|
|
4
|
-
*
|
|
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.
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"build": "bun
|
|
27
|
-
"build:
|
|
28
|
-
"build:
|
|
29
|
-
"build:
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"@
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"oh-my-opencode-
|
|
84
|
-
"oh-my-opencode-
|
|
85
|
-
"oh-my-opencode-
|
|
86
|
-
"oh-my-opencode-
|
|
87
|
-
"oh-my-opencode-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
|
|
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
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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";
|
|
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;
|