@skj1724/oh-my-opencode 3.11.3 → 3.11.6
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/atlas/gemini.d.ts +0 -9
- package/dist/agents/sisyphus/gemini.d.ts +10 -10
- package/dist/agents/sisyphus/gpt-5-4.d.ts +18 -18
- package/dist/cli/index.js +7 -6
- package/dist/config/schema/experimental.d.ts +0 -1
- package/dist/config/schema/oh-my-opencode-config.d.ts +0 -1
- package/dist/hooks/think-mode/switcher.d.ts +12 -11
- package/dist/hooks/thinking-block-validator/hook.d.ts +11 -10
- package/dist/index.js +1063 -1060
- package/dist/oh-my-opencode.schema.json +0 -3
- package/dist/shared/context-limit-resolver.d.ts +1 -2
- package/package.json +103 -103
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gemini-optimized Atlas System Prompt
|
|
3
|
-
*
|
|
4
|
-
* Key differences from Claude/GPT variants:
|
|
5
|
-
* - EXTREME delegation enforcement (Gemini strongly prefers doing work itself)
|
|
6
|
-
* - Aggressive verification language (Gemini trusts subagent claims too readily)
|
|
7
|
-
* - Repeated tool-call mandates (Gemini skips tool calls in favor of reasoning)
|
|
8
|
-
* - Consequence-driven framing (Gemini ignores soft warnings)
|
|
9
|
-
*/
|
|
10
1
|
export declare const ATLAS_GEMINI_SYSTEM_PROMPT: string;
|
|
11
2
|
export declare function getGeminiAtlasPrompt(): string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Gemini
|
|
2
|
+
* Gemini 专用 Sisyphus prompt 覆盖 sections。
|
|
3
3
|
*
|
|
4
|
-
* Gemini
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
4
|
+
* Gemini 模型天生过度乐观,倾向于:
|
|
5
|
+
* - 用内部推理替代 tool calls
|
|
6
|
+
* - 回避委托,偏好亲力亲为
|
|
7
|
+
* - 声称完成但未经验证
|
|
8
|
+
* - 将约束视为建议
|
|
9
|
+
* - 跳过 intent 分类 gate(直接跳到行动)
|
|
10
|
+
* - 混淆调查与实现("查一下 X" → 开始写代码)
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* 这些覆盖层在动态 Sisyphus prompt 的战略位置注入纠正性 sections,
|
|
13
|
+
* 以对抗上述倾向。
|
|
14
14
|
*/
|
|
15
15
|
export declare function buildGeminiToolMandate(): string;
|
|
16
16
|
export declare function buildGeminiToolGuide(): string;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GPT-5.4
|
|
2
|
+
* GPT-5.4 原生 Sisyphus prompt — 采用 8-block 架构重写。
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* - reasoning.effort
|
|
7
|
-
* - GPT-5.4
|
|
8
|
-
* - GPT-5.4
|
|
9
|
-
* - GPT-5.4
|
|
10
|
-
* - GPT-5.4
|
|
11
|
-
* - "
|
|
4
|
+
* 设计原则(源自 OpenAI 的 GPT-5.4 prompt 指导):
|
|
5
|
+
* - 使用 XML 标签 + 命名 sub-anchors 的紧凑块结构 prompts
|
|
6
|
+
* - reasoning.effort 默认为 "none" — 需要显式鼓励思考
|
|
7
|
+
* - GPT-5.4 原生生成开场白 — 不要添加 preamble 指令
|
|
8
|
+
* - GPT-5.4 指令遵循度高 — 减少重复,减少威胁式表达
|
|
9
|
+
* - GPT-5.4 受益于:output contracts、verification loops、dependency checks、completeness contracts
|
|
10
|
+
* - GPT-5.4 可能过于字面 — 添加 intent inference 层以实现细腻行为
|
|
11
|
+
* - "使用通过 evals 的最小 prompt" — 保持高密度
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
* 1. <identity> —
|
|
15
|
-
* 2. <constraints> — Hard blocks + anti-patterns
|
|
16
|
-
* 3. <intent> — Think-first + intent gate + autonomy
|
|
17
|
-
* 4. <explore> —
|
|
18
|
-
* 5. <execution_loop> — EXPLORE→PLAN→ROUTE→EXECUTE_OR_SUPERVISE→VERIFY→RETRY→DONE
|
|
19
|
-
* 6. <delegation> — Category+skills
|
|
20
|
-
* 7. <tasks> — Task/todo
|
|
21
|
-
* 8. <style> —
|
|
13
|
+
* 架构(8 个 blocks,约 9 个命名 sub-anchors):
|
|
14
|
+
* 1. <identity> — 角色、指令优先级、编排器倾向
|
|
15
|
+
* 2. <constraints> — Hard blocks + anti-patterns(前置以引起 GPT-5.4 关注)
|
|
16
|
+
* 3. <intent> — Think-first + intent gate + autonomy(合并,domain_guess 路由)
|
|
17
|
+
* 4. <explore> — 代码库评估 + 研究 + tool 规则(保留命名 sub-anchors)
|
|
18
|
+
* 5. <execution_loop> — EXPLORE→PLAN→ROUTE→EXECUTE_OR_SUPERVISE→VERIFY→RETRY→DONE(prompt 核心)
|
|
19
|
+
* 6. <delegation> — Category+skills、6 段式 prompt、session 连续性、oracle
|
|
20
|
+
* 7. <tasks> — Task/todo 管理
|
|
21
|
+
* 8. <style> — 语气(prose)+ output contract + 进度更新
|
|
22
22
|
*/
|
|
23
23
|
import type { AvailableAgent, AvailableTool, AvailableSkill, AvailableCategory } from "../dynamic-agent-prompt-builder";
|
|
24
24
|
import { categorizeTools } from "../dynamic-agent-prompt-builder";
|
package/dist/cli/index.js
CHANGED
|
@@ -5018,7 +5018,7 @@ function resolveSymlink(filePath) {
|
|
|
5018
5018
|
var init_file_utils = () => {};
|
|
5019
5019
|
|
|
5020
5020
|
// src/shared/context-limit-resolver.ts
|
|
5021
|
-
var ANTHROPIC_NO_HEADER_GA_MODEL_IDS;
|
|
5021
|
+
var ANTHROPIC_NO_HEADER_GA_MODEL_IDS, MINIMAX_PROVIDER_IDS, MINIMAX_4M_MODELS;
|
|
5022
5022
|
var init_context_limit_resolver = __esm(() => {
|
|
5023
5023
|
ANTHROPIC_NO_HEADER_GA_MODEL_IDS = new Set([
|
|
5024
5024
|
"claude-opus-4-6",
|
|
@@ -5026,6 +5026,8 @@ var init_context_limit_resolver = __esm(() => {
|
|
|
5026
5026
|
"claude-sonnet-4-6",
|
|
5027
5027
|
"claude-sonnet-4.6"
|
|
5028
5028
|
]);
|
|
5029
|
+
MINIMAX_PROVIDER_IDS = new Set(["minimax-cn-coding-plan"]);
|
|
5030
|
+
MINIMAX_4M_MODELS = new Set(["minimax-m2.7-highspeed"]);
|
|
5029
5031
|
});
|
|
5030
5032
|
|
|
5031
5033
|
// src/shared/normalize-sdk-response.ts
|
|
@@ -16442,8 +16444,8 @@ var init_model_capabilities_generated = __esm(() => {
|
|
|
16442
16444
|
]
|
|
16443
16445
|
},
|
|
16444
16446
|
limit: {
|
|
16445
|
-
context:
|
|
16446
|
-
output:
|
|
16447
|
+
context: 2000000,
|
|
16448
|
+
output: 262144
|
|
16447
16449
|
}
|
|
16448
16450
|
},
|
|
16449
16451
|
"zai-org/autoglm-phone-9b-multilingual": {
|
|
@@ -50376,7 +50378,7 @@ var {
|
|
|
50376
50378
|
// package.json
|
|
50377
50379
|
var package_default = {
|
|
50378
50380
|
name: "@skj1724/oh-my-opencode",
|
|
50379
|
-
version: "3.11.
|
|
50381
|
+
version: "3.11.6",
|
|
50380
50382
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
50381
50383
|
main: "dist/index.js",
|
|
50382
50384
|
types: "dist/index.d.ts",
|
|
@@ -65985,8 +65987,7 @@ var ExperimentalConfigSchema = exports_external.object({
|
|
|
65985
65987
|
safe_hook_creation: exports_external.boolean().optional(),
|
|
65986
65988
|
disable_omo_env: exports_external.boolean().optional(),
|
|
65987
65989
|
hashline_edit: exports_external.boolean().optional(),
|
|
65988
|
-
model_fallback_title: exports_external.boolean().optional()
|
|
65989
|
-
minimax_4m_context_enabled: exports_external.boolean().optional()
|
|
65990
|
+
model_fallback_title: exports_external.boolean().optional()
|
|
65990
65991
|
});
|
|
65991
65992
|
// src/config/schema/git-env-prefix.ts
|
|
65992
65993
|
var GIT_ENV_ASSIGNMENT_PATTERN = /^(?:[A-Za-z_][A-Za-z0-9_]*=[A-Za-z0-9_-]*)(?: [A-Za-z_][A-Za-z0-9_]*=[A-Za-z0-9_-]*)*$/;
|
|
@@ -36,6 +36,5 @@ export declare const ExperimentalConfigSchema: z.ZodObject<{
|
|
|
36
36
|
disable_omo_env: z.ZodOptional<z.ZodBoolean>;
|
|
37
37
|
hashline_edit: z.ZodOptional<z.ZodBoolean>;
|
|
38
38
|
model_fallback_title: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
-
minimax_4m_context_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
40
39
|
}, z.core.$strip>;
|
|
41
40
|
export type ExperimentalConfig = z.infer<typeof ExperimentalConfigSchema>;
|
|
@@ -1636,7 +1636,6 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1636
1636
|
disable_omo_env: z.ZodOptional<z.ZodBoolean>;
|
|
1637
1637
|
hashline_edit: z.ZodOptional<z.ZodBoolean>;
|
|
1638
1638
|
model_fallback_title: z.ZodOptional<z.ZodBoolean>;
|
|
1639
|
-
minimax_4m_context_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1640
1639
|
}, z.core.$strip>>;
|
|
1641
1640
|
auto_update: z.ZodOptional<z.ZodBoolean>;
|
|
1642
1641
|
skills: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Think Mode
|
|
2
|
+
* Think Mode Switcher
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* This module handles "thinking mode" activation for reasoning-capable models.
|
|
5
|
+
* When a user includes "think" keywords in their prompt, models are upgraded to
|
|
6
|
+
* their high-reasoning variants with extended thinking budgets.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* GitHub Copilot
|
|
10
|
-
|
|
11
|
-
*
|
|
8
|
+
* PROVIDER ALIASING:
|
|
9
|
+
* GitHub Copilot acts as a proxy provider that routes to underlying providers
|
|
10
|
+
* (Anthropic, Google, OpenAI). We resolve the proxy to the actual provider
|
|
11
|
+
* based on model name patterns, allowing GitHub Copilot to inherit thinking
|
|
12
|
+
* configurations without duplication.
|
|
12
13
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* NORMALIZATION:
|
|
15
|
+
* Model IDs are normalized (dots → hyphens in version numbers) to handle API
|
|
16
|
+
* inconsistencies defensively while maintaining backwards compatibility.
|
|
16
17
|
*/
|
|
17
18
|
export declare function getHighVariant(modelID: string): string | null;
|
|
18
19
|
export declare function isAlreadyHighVariant(modelID: string): boolean;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Proactive Thinking Block Validator Hook
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Prevents "Expected thinking/redacted_thinking but found tool_use" errors
|
|
5
|
+
* by validating and fixing message structure BEFORE sending to Anthropic API.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* This hook runs on the "experimental.chat.messages.transform" hook point,
|
|
8
|
+
* which is called before messages are converted to ModelMessage format and
|
|
9
|
+
* sent to the API.
|
|
9
10
|
*
|
|
10
|
-
*
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
13
|
-
* -
|
|
11
|
+
* Key differences from session-recovery hook:
|
|
12
|
+
* - PROACTIVE (prevents error) vs REACTIVE (fixes after error)
|
|
13
|
+
* - Runs BEFORE API call vs AFTER API error
|
|
14
|
+
* - User never sees the error vs User sees error then recovery
|
|
14
15
|
*/
|
|
15
16
|
import type { Message, Part } from "@opencode-ai/sdk";
|
|
16
17
|
interface MessageWithParts {
|
|
@@ -23,7 +24,7 @@ type MessagesTransformHook = {
|
|
|
23
24
|
}) => Promise<void>;
|
|
24
25
|
};
|
|
25
26
|
/**
|
|
26
|
-
*
|
|
27
|
+
* Validate and fix assistant messages that have tool_use but no thinking block
|
|
27
28
|
*/
|
|
28
29
|
export declare function createThinkingBlockValidatorHook(): MessagesTransformHook;
|
|
29
30
|
export {};
|