opencode-ultra 0.9.2 → 0.9.4

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 +42 -1
  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
@@ -15013,7 +15013,35 @@ 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: spawn momus for review, then spawn hephaestus for git commit`;
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
+ - Phase 4: spawn_agent hephaestus to run \`git add -A && git commit -m 'feat: initial implementation'\`
15041
+ - Report final summary`;
15042
+ var AUTONOMOUS_MODE_ANCHOR = `
15043
+
15044
+ [\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. Final step: spawn hephaestus to run git add -A && git commit.]`;
15017
15045
  function buildAgents(config2) {
15018
15046
  const disabled = new Set(config2.disabled_agents ?? []);
15019
15047
  const overrides = config2.agents ?? {};
@@ -30669,6 +30697,10 @@ var OpenCodeUltra = async (ctx) => {
30669
30697
  const agents = buildAgents(pluginConfig);
30670
30698
  const disabledHooks = new Set(pluginConfig.disabled_hooks ?? []);
30671
30699
  const disabledTools = new Set(pluginConfig.disabled_tools ?? []);
30700
+ const isNonInteractive = !process.stdout.isTTY;
30701
+ if (isNonInteractive) {
30702
+ log("Non-interactive mode detected \u2014 autonomous execution enabled");
30703
+ }
30672
30704
  const internalSessions = new Set;
30673
30705
  const pool = pluginConfig.background_task ? new ConcurrencyPool(pluginConfig.background_task) : undefined;
30674
30706
  const resolveAgentModel = (agent) => {
@@ -30820,6 +30852,12 @@ var OpenCodeUltra = async (ctx) => {
30820
30852
  if (internalSessions.has(input.sessionID)) {
30821
30853
  return;
30822
30854
  }
30855
+ if (isNonInteractive && !disabledHooks.has("autonomous-mode")) {
30856
+ const lastText = [...output.parts].reverse().find((p) => p.type === "text");
30857
+ if (lastText) {
30858
+ lastText.text = (lastText.text ?? "") + AUTONOMOUS_MODE_ANCHOR;
30859
+ }
30860
+ }
30823
30861
  if (!disabledHooks.has("keyword-detector")) {
30824
30862
  const promptText = extractPromptText(output.parts);
30825
30863
  const evolveCtx = buildEvolveCtx(Object.keys(toolRegistry));
@@ -30893,6 +30931,9 @@ DO NOT skip tools. Text-only output is FORBIDDEN. Every phase requires tool call
30893
30931
  if (input.sessionID && internalSessions.has(input.sessionID)) {
30894
30932
  return;
30895
30933
  }
30934
+ if (isNonInteractive && !disabledHooks.has("autonomous-mode")) {
30935
+ output.system.push(AUTONOMOUS_MODE_SYSTEM);
30936
+ }
30896
30937
  if (input.sessionID) {
30897
30938
  const keywords = pendingKeywords.get(input.sessionID);
30898
30939
  if (keywords && keywords.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-ultra",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "Lightweight OpenCode 1.2.x plugin — ultrawork mode, multi-agent orchestration, rules injection",
5
5
  "keywords": [
6
6
  "opencode",