opencode-ultra 0.9.1 → 0.9.3

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 (3) hide show
  1. package/README.md +32 -24
  2. package/dist/index.js +51 -11
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -87,10 +87,10 @@ evolve_exe({ proposals: "1,2", publish: true }) — 実行後に自動 publish
87
87
  | Phase | 内容 |
88
88
  |-------|------|
89
89
  | 1. GIT BRANCH | `evolve/{slug}` ブランチ作成 |
90
- | 2. IMPLEMENT | hephaestus ralph_loop パターンで自律実装 |
90
+ | 2. IMPLEMENT | implementAgent (default: hephaestus) が自律実装 |
91
91
  | 3. TEST | `bun test` 実行 (失敗 → rollback) |
92
92
  | 4. BUILD | `bun run build` 実行 (失敗 → rollback) |
93
- | 5. REVIEW | momus がコードレビュー (BLOCK はログ記録) |
93
+ | 5. REVIEW | reviewAgent (default: momus) がコードレビュー (BLOCK はログ記録) |
94
94
  | 6. MERGE | `--no-ff` で元ブランチにマージ、ブランチ削除 |
95
95
 
96
96
  実装後のパブリッシュ:
@@ -104,20 +104,22 @@ evolve_publish({ bump: "minor", deploy: "ssh-124" }) — publish + SSH デプロ
104
104
 
105
105
  Sisyphus (オーケストレーター) が読み込み・分析・計画を行い、実装はサブエージェントに委任する。
106
106
 
107
- | Agent | 役割 | モード |
108
- |-------|------|--------|
109
- | **sisyphus** | オーケストレーター — 読み込み+分析+計画+委任 | primary |
110
- | **oracle** | 設計・デバッグ・アーキテクチャ判断 | subagent |
111
- | **explore** | 高速コードベース偵察 | subagent |
112
- | **librarian** | ドキュメント・ベストプラクティス調査 | subagent |
113
- | **metis** | タスク分解・並列実行計画 | subagent |
114
- | **hephaestus** | 自律型実装ワーカー | subagent |
115
- | **momus** | コードレビュー・品質チェック | subagent |
116
- | **atlas** | タスク管理・進捗追跡 | subagent |
117
- | **multimodal-looker** | 画像・スクリーンショット解析 | subagent |
118
- | **scout** | プラグインエコシステム調査・信頼度メタデータ収集 | subagent |
119
-
120
- 全てのエージェントのモデルは `opencode-ultra.json` でオーバーライド可能。
107
+ | Agent | 役割 | デフォルトモデル | Tier |
108
+ |-------|------|----------------|------|
109
+ | **sisyphus** | オーケストレーター — 読み込み+分析+計画+委任 | `openai/gpt-5.3-codex` | High |
110
+ | **momus** | コードレビュー・品質チェック | `openai/gpt-5.3-codex` | High |
111
+ | **oracle** | 設計・デバッグ・アーキテクチャ判断 | `zai-coding-plan/glm-5` | Mid |
112
+ | **hephaestus** | 自律型実装ワーカー | `zai-coding-plan/glm-5` | Mid |
113
+ | **metis** | タスク分解・並列実行計画 | `kimi-for-coding/k2p5` | Mid |
114
+ | **multimodal-looker** | 画像・スクリーンショット解析 | `kimi-for-coding/k2p5` | Mid |
115
+ | **explore** | 高速コードベース偵察 | `openai/gpt-5.3-codex-spark` | Fast |
116
+ | **librarian** | ドキュメント・ベストプラクティス調査 | `openai/gpt-5.3-codex-spark` | Fast |
117
+ | **scout** | プラグインエコシステム調査 | `openai/gpt-5.3-codex-spark` | Fast |
118
+ | **atlas** | タスク管理・進捗追跡 | `minimax-coding-plan/MiniMax-M2.5` | Low |
119
+
120
+ 全てのエージェントのモデルは `opencode-ultra.json` で設定する。BUILTIN デフォルトと JSON 設定は一致させること。
121
+
122
+ > **重要**: `openai-codex/` や `anthropic/` など auth プラグイン由来のプロバイダーは sub-session で解決できない。`opencode.jsonc` の `provider` セクションまたは Coding Plan プラグインで定義されたプロバイダーのみ使用可能。
121
123
 
122
124
  ## キーワード検知
123
125
 
@@ -144,15 +146,18 @@ Sisyphus (オーケストレーター) が読み込み・分析・計画を行
144
146
 
145
147
  ```jsonc
146
148
  {
147
- // エージェントオーバーライド
149
+ // エージェントモデル設定 (BUILTIN_AGENTS と一致させること)
148
150
  "agents": {
149
151
  "sisyphus": { "model": "openai/gpt-5.3-codex" },
150
- "oracle": { "model": "zai-coding-plan/glm-5" }
152
+ "oracle": { "model": "zai-coding-plan/glm-5" },
153
+ "hephaestus": { "model": "zai-coding-plan/glm-5" },
154
+ "explore": { "model": "openai/gpt-5.3-codex-spark" },
155
+ "momus": { "model": "openai/gpt-5.3-codex" }
151
156
  },
152
157
 
153
158
  // カテゴリ (spawn_agent の category パラメータでモデル一括切替)
154
159
  "categories": {
155
- "quick": { "model": "zai-coding-plan/glm-4.7-flash" },
160
+ "quick": { "model": "openai/gpt-5.3-codex-spark" },
156
161
  "deep": { "model": "openai/gpt-5.3-codex", "variant": "medium" }
157
162
  },
158
163
 
@@ -165,7 +170,7 @@ Sisyphus (オーケストレーター) が読み込み・分析・計画を行
165
170
  "prompt_renderer": {
166
171
  "default": "markdown",
167
172
  "model_overrides": {
168
- "anthropic/claude-sonnet-4-5": "xml"
173
+ "openai/gpt-5.3-codex": "markdown"
169
174
  }
170
175
  },
171
176
 
@@ -197,10 +202,13 @@ Sisyphus (オーケストレーター) が読み込み・分析・計画を行
197
202
 
198
203
  // Evolve Execution
199
204
  "evolve_exe": {
200
- "maxIterations": 10, // hephaestus の最大イテレーション (1-20)
201
- "iterationTimeoutMs": 300000, // per-iteration タイムアウト
202
- "skipReview": false, // momus レビューをスキップ
203
- "skipTests": false // bun test をスキップ
205
+ "maxIterations": 10, // 最大イテレーション (1-20)
206
+ "iterationTimeoutMs": 300000, // per-iteration タイムアウト
207
+ "totalTimeoutMs": 900000, // 1提案あたりの合計タイムアウト
208
+ "skipReview": false, // レビューをスキップ
209
+ "skipTests": false, // bun test をスキップ
210
+ "implementAgent": "hephaestus", // 実装エージェント (config.agents で定義されたもの)
211
+ "reviewAgent": "momus" // レビューエージェント
204
212
  },
205
213
 
206
214
  // Token Truncation
package/dist/index.js CHANGED
@@ -14801,7 +14801,7 @@ function loadConfig(projectDir) {
14801
14801
  // src/agents/index.ts
14802
14802
  var BUILTIN_AGENTS = {
14803
14803
  sisyphus: {
14804
- model: "openai-codex/gpt-5.3-codex",
14804
+ model: "openai/gpt-5.3-codex",
14805
14805
  description: "Primary orchestrator \u2014 analyzes requests, reads code directly, delegates implementation to specialists",
14806
14806
  prompt: "__DYNAMIC__",
14807
14807
  maxTokens: 64000,
@@ -14816,7 +14816,7 @@ var BUILTIN_AGENTS = {
14816
14816
  }
14817
14817
  },
14818
14818
  oracle: {
14819
- model: "openai-codex/gpt-5.3-codex",
14819
+ model: "zai-coding-plan/glm-5",
14820
14820
  description: "Design architect and debugger \u2014 conventional problem solving, architecture review",
14821
14821
  prompt: "You are Oracle, a design architect and debugging specialist. Focus on architecture decisions, debugging complex issues, and providing well-reasoned technical solutions.",
14822
14822
  mode: "subagent",
@@ -14824,49 +14824,49 @@ var BUILTIN_AGENTS = {
14824
14824
  maxTokens: 32000
14825
14825
  },
14826
14826
  explore: {
14827
- model: "anthropic/claude-haiku-4-5",
14827
+ model: "openai/gpt-5.3-codex-spark",
14828
14828
  description: "Fast codebase explorer \u2014 finds patterns, files, and implementations quickly",
14829
14829
  prompt: "You are Explore, a fast codebase search specialist. Use grep, glob, and file reading to find relevant code patterns, implementations, and file structures. Be thorough but fast. Return file paths with brief descriptions.",
14830
14830
  mode: "subagent",
14831
14831
  maxTokens: 16000
14832
14832
  },
14833
14833
  librarian: {
14834
- model: "anthropic/claude-sonnet-4-5",
14834
+ model: "openai/gpt-5.3-codex-spark",
14835
14835
  description: "Documentation researcher \u2014 finds official docs, best practices, and examples",
14836
14836
  prompt: "You are Librarian, a documentation research specialist. Find official documentation, production-quality examples, best practices, and common pitfalls for technologies and libraries. Skip beginner tutorials.",
14837
14837
  mode: "subagent",
14838
14838
  maxTokens: 32000
14839
14839
  },
14840
14840
  "multimodal-looker": {
14841
- model: "anthropic/claude-sonnet-4-5",
14841
+ model: "kimi-for-coding/k2p5",
14842
14842
  description: "Visual analyzer \u2014 inspects images, screenshots, and visual content",
14843
14843
  prompt: "You are Multimodal Looker, a visual analysis specialist. Analyze images, screenshots, UI mockups, and other visual content. Provide detailed observations about layout, design, and any issues found.",
14844
14844
  mode: "subagent",
14845
14845
  maxTokens: 16000
14846
14846
  },
14847
14847
  metis: {
14848
- model: "anthropic/claude-sonnet-4-5",
14848
+ model: "kimi-for-coding/k2p5",
14849
14849
  description: "Strategic planner \u2014 breaks down complex tasks into parallel execution waves",
14850
14850
  prompt: "You are Metis, a strategic planning specialist. Break complex tasks into structured, parallelizable work plans. Identify dependencies between tasks and group independent tasks into parallel execution waves.",
14851
14851
  mode: "subagent",
14852
14852
  maxTokens: 32000
14853
14853
  },
14854
14854
  momus: {
14855
- model: "anthropic/claude-sonnet-4-5",
14855
+ model: "openai/gpt-5.3-codex",
14856
14856
  description: "Code reviewer \u2014 finds bugs, quality issues, and suggests improvements",
14857
14857
  prompt: "You are Momus, a code review specialist. Analyze code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to conventions. Be critical but constructive.",
14858
14858
  mode: "subagent",
14859
14859
  maxTokens: 32000
14860
14860
  },
14861
14861
  atlas: {
14862
- model: "anthropic/claude-sonnet-4-5",
14862
+ model: "minimax-coding-plan/MiniMax-M2.5",
14863
14863
  description: "Task orchestrator \u2014 manages project tasks and coordinates agent work",
14864
14864
  prompt: "You are Atlas, a task orchestration specialist. Manage project tasks, coordinate agent work, track progress, and ensure all tasks are completed to specification.",
14865
14865
  mode: "subagent",
14866
14866
  maxTokens: 32000
14867
14867
  },
14868
14868
  hephaestus: {
14869
- model: "openai-codex/gpt-5.3-codex",
14869
+ model: "zai-coding-plan/glm-5",
14870
14870
  description: "Deep autonomous worker \u2014 handles complex implementation tasks independently",
14871
14871
  prompt: "You are Hephaestus, an autonomous implementation specialist. Handle complex coding tasks independently with high precision. Write clean, well-tested code that follows existing patterns.",
14872
14872
  mode: "subagent",
@@ -14874,7 +14874,7 @@ var BUILTIN_AGENTS = {
14874
14874
  maxTokens: 64000
14875
14875
  },
14876
14876
  scout: {
14877
- model: "anthropic/claude-sonnet-4-5",
14877
+ model: "openai/gpt-5.3-codex-spark",
14878
14878
  description: "Plugin ecosystem researcher \u2014 discovers features and techniques from other OpenCode plugins",
14879
14879
  prompt: `You are Scout, an OpenCode plugin ecosystem researcher.
14880
14880
 
@@ -15013,7 +15013,34 @@ Summarize all results with evidence.
15013
15013
  ## EXISTING PLANS
15014
15014
  If a plan already exists (from plan mode or prior conversation):
15015
15015
  - Read the plan. Do NOT re-plan.
15016
- - Execute step by step, spawn_agent for parallelizable steps.`;
15016
+ - Execute step by step, spawn_agent for parallelizable steps.
15017
+
15018
+ ## AUTONOMOUS MODE (Non-Interactive CLI)
15019
+ When the system prompt contains "\u26A1 AUTONOMOUS MODE ACTIVE":
15020
+ - The user is NOT present \u2014 do NOT ask for approval, do NOT output plans for review
15021
+ - **Read \u2192 Plan (internal) \u2192 Execute immediately** \u2014 no waiting
15022
+ - **Delegate ALL file operations to spawn_agent** \u2014 do NOT use Write, Edit, apply_patch, Bash yourself
15023
+ - Spawn parallel agents for independent implementation tasks
15024
+ - After implementation completes, spawn momus for review`;
15025
+ var AUTONOMOUS_MODE_SYSTEM = `## \u26A1 AUTONOMOUS MODE ACTIVE
15026
+
15027
+ You are running via CLI without a human present (opencode run --format json or non-TTY mode).
15028
+
15029
+ MANDATORY BEHAVIOR:
15030
+ 1. **Skip plan approval entirely** \u2014 no "\u3053\u306E\u30D7\u30E9\u30F3\u3067\u9032\u3081\u307E\u3059\u304B\uFF1F", no waiting
15031
+ 2. Read the task \u2192 plan internally \u2192 execute immediately
15032
+ 3. **Delegate ALL file writes to spawn_agent** \u2014 do NOT use Write, Edit, apply_patch, or Bash yourself
15033
+ 4. Run spawn_agent calls IN PARALLEL for independent components
15034
+ 5. After implementation, spawn momus for code review
15035
+
15036
+ EXECUTION ORDER:
15037
+ - Phase 1: Read specs (Grep/Glob/Read) \u2014 do this yourself
15038
+ - Phase 2: spawn_agent hephaestus for each major component (in parallel)
15039
+ - Phase 3: spawn_agent momus for review after Phase 2 completes
15040
+ - Report final summary`;
15041
+ var AUTONOMOUS_MODE_ANCHOR = `
15042
+
15043
+ [\u26A1 AUTONOMOUS MODE: No user present. Execute immediately. Delegate ALL file writing to spawn_agent(hephaestus). Do NOT use Write/Edit/apply_patch/Bash. Spawn parallel agents now.]`;
15017
15044
  function buildAgents(config2) {
15018
15045
  const disabled = new Set(config2.disabled_agents ?? []);
15019
15046
  const overrides = config2.agents ?? {};
@@ -30669,6 +30696,10 @@ var OpenCodeUltra = async (ctx) => {
30669
30696
  const agents = buildAgents(pluginConfig);
30670
30697
  const disabledHooks = new Set(pluginConfig.disabled_hooks ?? []);
30671
30698
  const disabledTools = new Set(pluginConfig.disabled_tools ?? []);
30699
+ const isNonInteractive = !process.stdout.isTTY;
30700
+ if (isNonInteractive) {
30701
+ log("Non-interactive mode detected \u2014 autonomous execution enabled");
30702
+ }
30672
30703
  const internalSessions = new Set;
30673
30704
  const pool = pluginConfig.background_task ? new ConcurrencyPool(pluginConfig.background_task) : undefined;
30674
30705
  const resolveAgentModel = (agent) => {
@@ -30820,6 +30851,12 @@ var OpenCodeUltra = async (ctx) => {
30820
30851
  if (internalSessions.has(input.sessionID)) {
30821
30852
  return;
30822
30853
  }
30854
+ if (isNonInteractive && !disabledHooks.has("autonomous-mode")) {
30855
+ const lastText = [...output.parts].reverse().find((p) => p.type === "text");
30856
+ if (lastText) {
30857
+ lastText.text = (lastText.text ?? "") + AUTONOMOUS_MODE_ANCHOR;
30858
+ }
30859
+ }
30823
30860
  if (!disabledHooks.has("keyword-detector")) {
30824
30861
  const promptText = extractPromptText(output.parts);
30825
30862
  const evolveCtx = buildEvolveCtx(Object.keys(toolRegistry));
@@ -30893,6 +30930,9 @@ DO NOT skip tools. Text-only output is FORBIDDEN. Every phase requires tool call
30893
30930
  if (input.sessionID && internalSessions.has(input.sessionID)) {
30894
30931
  return;
30895
30932
  }
30933
+ if (isNonInteractive && !disabledHooks.has("autonomous-mode")) {
30934
+ output.system.push(AUTONOMOUS_MODE_SYSTEM);
30935
+ }
30896
30936
  if (input.sessionID) {
30897
30937
  const keywords = pendingKeywords.get(input.sessionID);
30898
30938
  if (keywords && keywords.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-ultra",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "description": "Lightweight OpenCode 1.2.x plugin — ultrawork mode, multi-agent orchestration, rules injection",
5
5
  "keywords": [
6
6
  "opencode",