opencode-ultra 0.9.2 → 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.
- package/README.md +32 -24
- package/dist/index.js +41 -1
- 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 |
|
|
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** | オーケストレーター — 読み込み+分析+計画+委任 |
|
|
110
|
-
| **
|
|
111
|
-
| **
|
|
112
|
-
| **
|
|
113
|
-
| **metis** | タスク分解・並列実行計画 |
|
|
114
|
-
| **
|
|
115
|
-
| **
|
|
116
|
-
| **
|
|
117
|
-
| **
|
|
118
|
-
| **
|
|
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": "
|
|
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
|
-
"
|
|
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,
|
|
201
|
-
"iterationTimeoutMs": 300000,
|
|
202
|
-
"
|
|
203
|
-
"
|
|
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,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) {
|