opencode-resolve 0.1.5 → 0.1.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/README.ko.md +8 -12
- package/README.md +8 -12
- package/dist/index.js +10 -7
- package/opencode-resolve.example.json +0 -1
- package/package.json +1 -1
- package/scripts/postinstall.mjs +0 -1
package/README.ko.md
CHANGED
|
@@ -232,7 +232,7 @@ opencode plugin opencode-resolve --global --force
|
|
|
232
232
|
|
|
233
233
|
**Companion 2 — `@slkiser/opencode-quota` (사용량/quota 추적)**
|
|
234
234
|
|
|
235
|
-
> _그리고 **`@slkiser/opencode-quota`** — 컨텍스트 윈도우를 오염시키지 않고 실시간 토큰/quota 사용량을 보여줍니다. GLM coding-plan, OpenAI Plus/Pro, Qwen 등 지원.
|
|
235
|
+
> _그리고 **`@slkiser/opencode-quota`** — 컨텍스트 윈도우를 오염시키지 않고 실시간 토큰/quota 사용량을 보여줍니다. GLM coding-plan, OpenAI Plus/Pro, Qwen 등 지원. 내 사용량/잔여 quota 확인용으로 유용. 설치할까요? (권장)_
|
|
236
236
|
|
|
237
237
|
사용자가 **예** (각 질문마다):
|
|
238
238
|
|
|
@@ -301,18 +301,15 @@ provider가 **하나도 설정되지 않은 경우** 진행을 멈추고, `openc
|
|
|
301
301
|
|
|
302
302
|
> _`coder`와 `explorer`를 `zai-coding-plan/glm-5.1`로, `resolver`/`reviewer`/`deep-reviewer`를 `openai/gpt-5.5`로 핀닝합니다. 진행할까요?_
|
|
303
303
|
|
|
304
|
-
#### 3d-bis.
|
|
304
|
+
#### 3d-bis. 사용자가 명시적으로 hard cap 원할 때만 `maxParallelSubagents` 설정
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
기본 흐름은 `maxParallelSubagents`를 `resolve.json`에 **쓰지 않습니다**. resolver prompt에 soft 가이드라인이 들어있어요 — 진짜 독립적인 작업이면 coder fan out, rate-limit 에러 보이면 backoff, explorer 무제한, reviewer/deep-reviewer/planner는 본질적으로 singleton. oh-my-openagent (per-model semaphore, 사실상 default 무제한) 와 OpenCode core (built-in concurrency 룰 없음) 의 처리와 동일한 결, rate limit을 이미 인지한 모델을 과제약하지 않음.
|
|
307
307
|
|
|
308
|
-
|
|
309
|
-
|---|---|
|
|
310
|
-
| `glm` (어떤 GLM이든 — 보통 GLM coding-plan) | **2** |
|
|
311
|
-
| 그 외 (GPT, Claude, Gemini, local, …) | **4** |
|
|
308
|
+
`maxParallelSubagents`는 사용자가 hard cap을 명시적으로 원할 때만 물어보세요. 흔한 케이스: GLM coding-plan 사용자가 "burst 절대 안 됨" 보장 원할 때. 권장 멘트:
|
|
312
309
|
|
|
313
|
-
|
|
310
|
+
> _(optional, 관련된 경우만)_ _`coder` 모델이 GLM이네요 — coding-plan은 burst 시 throttle 걸립니다. 안전하게 `maxParallelSubagents: 2`로 핀닝할까요?_
|
|
314
311
|
|
|
315
|
-
|
|
312
|
+
그 외엔 필드 자체를 생략.
|
|
316
313
|
|
|
317
314
|
#### 3e. `~/.config/opencode/resolve.json` 작성
|
|
318
315
|
|
|
@@ -348,8 +345,7 @@ GLM의 제약은 GLM coding-plan의 계정당 rate limit 때문 — 강력한 GL
|
|
|
348
345
|
"researcher": { "enabled": false }
|
|
349
346
|
},
|
|
350
347
|
"autoApprove": true,
|
|
351
|
-
"autoUpdate": true
|
|
352
|
-
"maxParallelSubagents": 2
|
|
348
|
+
"autoUpdate": true
|
|
353
349
|
}
|
|
354
350
|
```
|
|
355
351
|
|
|
@@ -382,7 +378,7 @@ GLM의 제약은 GLM coding-plan의 계정당 rate limit 때문 — 강력한 GL
|
|
|
382
378
|
}
|
|
383
379
|
```
|
|
384
380
|
|
|
385
|
-
`<provider>/<모델>` 플레이스홀더는 모두 사용자가 고른 **정확한** ID로 교체.
|
|
381
|
+
`<provider>/<모델>` 플레이스홀더는 모두 사용자가 고른 **정확한** ID로 교체. **`maxParallelSubagents`는 사용자가 명시적으로 hard cap 요청한 경우에만 추가** (3d-bis 참고).
|
|
386
382
|
|
|
387
383
|
`<provider>/<모델>` 플레이스홀더는 모두 사용자가 3b/3d에서 고른 **정확한** ID 문자열로 교체 — 임의 생성 금지, 자동완성 금지, 버전 드리프트 금지. 고른 모델을 `provider/model` 문자열로 매핑할 수 없으면 추측하지 말고 사용자에게 다시 물어보세요.
|
|
388
384
|
|
package/README.md
CHANGED
|
@@ -232,7 +232,7 @@ Before moving to model selection, ask the user about two **independent** compani
|
|
|
232
232
|
|
|
233
233
|
**Companion 2 — `@slkiser/opencode-quota` (quota & usage tracking)**
|
|
234
234
|
|
|
235
|
-
> _And **`@slkiser/opencode-quota`** — shows your live token/quota usage without polluting the context window. Supports GLM coding-plan, OpenAI Plus/Pro, Qwen, and more. Useful for
|
|
235
|
+
> _And **`@slkiser/opencode-quota`** — shows your live token/quota usage without polluting the context window. Supports GLM coding-plan, OpenAI Plus/Pro, Qwen, and more. Useful for keeping an eye on your own usage / remaining quota. Install it? (recommended)_
|
|
236
236
|
|
|
237
237
|
For each **yes** answer:
|
|
238
238
|
|
|
@@ -301,18 +301,15 @@ Confirm each pick back to the user before writing the file. Example:
|
|
|
301
301
|
|
|
302
302
|
> _I'll pin `coder` and `explorer` to `zai-coding-plan/glm-5.1`, and `resolver`/`reviewer`/`deep-reviewer` to `openai/gpt-5.5`. Proceed?_
|
|
303
303
|
|
|
304
|
-
#### 3d-bis.
|
|
304
|
+
#### 3d-bis. Skip `maxParallelSubagents` unless the user explicitly wants a hard cap
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
The default flow does **not** write `maxParallelSubagents` to `resolve.json`. The resolver prompt ships with soft fan-out guidance — fan out coders when work is genuinely independent, back off on rate-limit errors, explorer is unrestricted, reviewer/deep-reviewer/planner are singletons by nature. This matches how oh-my-openagent (per-model semaphore, default no real cap) and OpenCode core (no built-in concurrency rule) handle the same concern, and avoids overconstraining a model that's already aware of rate limits.
|
|
307
307
|
|
|
308
|
-
|
|
309
|
-
|---|---|
|
|
310
|
-
| `glm` (any GLM model — most often the GLM coding-plan) | **2** |
|
|
311
|
-
| anything else (GPT, Claude, Gemini, local, …) | **4** |
|
|
308
|
+
Only ask about `maxParallelSubagents` if the user explicitly mentions wanting to cap fan-out. Common case: GLM coding-plan users who want to **guarantee** they never burst beyond 1 or 2 coder calls. Suggested wording:
|
|
312
309
|
|
|
313
|
-
|
|
310
|
+
> _(optional, ask only if relevant)_ _Your `coder` model is GLM — the coding-plan throttles under bursts. Pin `maxParallelSubagents: 2` to be safe?_
|
|
314
311
|
|
|
315
|
-
|
|
312
|
+
Otherwise, omit the field entirely.
|
|
316
313
|
|
|
317
314
|
#### 3e. Write `~/.config/opencode/resolve.json`
|
|
318
315
|
|
|
@@ -348,8 +345,7 @@ For single-tier (A) and two-tier (B), apply the same rule to whichever model the
|
|
|
348
345
|
"researcher": { "enabled": false }
|
|
349
346
|
},
|
|
350
347
|
"autoApprove": true,
|
|
351
|
-
"autoUpdate": true
|
|
352
|
-
"maxParallelSubagents": 2
|
|
348
|
+
"autoUpdate": true
|
|
353
349
|
}
|
|
354
350
|
```
|
|
355
351
|
|
|
@@ -382,7 +378,7 @@ For single-tier (A) and two-tier (B), apply the same rule to whichever model the
|
|
|
382
378
|
}
|
|
383
379
|
```
|
|
384
380
|
|
|
385
|
-
Replace every `<provider>/<model>` placeholder with the **exact** ID strings the user picked.
|
|
381
|
+
Replace every `<provider>/<model>` placeholder with the **exact** ID strings the user picked. **Do not** add `maxParallelSubagents` unless the user explicitly asked for a hard cap (see 3d-bis).
|
|
386
382
|
|
|
387
383
|
Replace every `<provider>/<model>` placeholder with the **exact** ID strings the user picked in 3b/3d — no inventing, no autocompletion, no version drift. If you cannot map the picked model to a `provider/model` string, ask the user to clarify rather than guessing.
|
|
388
384
|
|
package/dist/index.js
CHANGED
|
@@ -76,10 +76,14 @@ const VALID_AGENT_KEYS = new Set([
|
|
|
76
76
|
"permission",
|
|
77
77
|
]);
|
|
78
78
|
function buildResolverPrompt(maxParallelSubagents) {
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
const explicitLimit = typeof maxParallelSubagents === "number" && Number.isFinite(maxParallelSubagents)
|
|
80
|
+
? Math.max(1, Math.trunc(maxParallelSubagents))
|
|
81
|
+
: undefined;
|
|
82
|
+
const parallelRule = explicitLimit === undefined
|
|
83
|
+
? "Parallel dispatch policy: fan out coder dispatches when the work is genuinely independent (different files, no shared state). Rate limits are per-model — coder/silver-tier models (e.g. GLM coding-plan) can throttle under heavy burst, so back off if you see rate-limit errors. Explorer runs on a lighter model and fans out freely when scope discovery genuinely needs it. Reviewer, deep-reviewer, and planner are dispatched as singletons by their nature."
|
|
84
|
+
: explicitLimit === 1
|
|
85
|
+
? "CRITICAL: User has pinned the coder concurrency cap to 1. Dispatch at most ONE coder concurrently. Wait for an in-flight coder to finish before dispatching another. Explorer is unrestricted (read-only, light model). Reviewer, deep-reviewer, and planner are singletons by nature."
|
|
86
|
+
: `CRITICAL: User has pinned the coder concurrency cap to ${explicitLimit}. Dispatch at most ${explicitLimit} coders concurrently. Wait for in-flight coders to finish before dispatching more. Explorer is unrestricted (read-only, light model). Reviewer, deep-reviewer, and planner are singletons by nature.`;
|
|
83
87
|
return [
|
|
84
88
|
"You are Resolver, the context-efficient orchestrator agent for OpenCode Resolve.",
|
|
85
89
|
"Your job is to drive the user's task to a verified resolution using minimal context and the fewest LLM calls possible.",
|
|
@@ -159,7 +163,7 @@ const DEFAULT_AGENT_CONFIG = {
|
|
|
159
163
|
color: "#FF7AC6",
|
|
160
164
|
maxSteps: 30,
|
|
161
165
|
description: "Primary orchestrator in the fixed-role verified loop (resolver→coder). Decomposes work into verified checkpoints, dispatches coder, verifies each, and carries forward progress. Internal subagents (explorer, reviewer, deep-reviewer) are available by default but dispatched only when justified.",
|
|
162
|
-
prompt: buildResolverPrompt(
|
|
166
|
+
prompt: buildResolverPrompt(undefined),
|
|
163
167
|
permission: {
|
|
164
168
|
edit: "ask",
|
|
165
169
|
bash: "ask",
|
|
@@ -389,7 +393,7 @@ function applyResolveConfig(config, resolveConfig) {
|
|
|
389
393
|
const models = { ...DEFAULT_MODELS, ...resolveConfig.models };
|
|
390
394
|
const defaultModel = typeof config.model === "string" ? config.model : undefined;
|
|
391
395
|
const autoApprove = resolveConfig.autoApprove !== false;
|
|
392
|
-
const maxParallelSubagents = resolveConfig.maxParallelSubagents
|
|
396
|
+
const maxParallelSubagents = resolveConfig.maxParallelSubagents;
|
|
393
397
|
config.agent ??= {};
|
|
394
398
|
for (const name of Object.keys(DEFAULT_AGENT_CONFIG)) {
|
|
395
399
|
const override = resolveConfig.agents?.[name];
|
|
@@ -451,7 +455,6 @@ function defaultResolveConfig() {
|
|
|
451
455
|
context7: true,
|
|
452
456
|
commands: false,
|
|
453
457
|
autoApprove: true,
|
|
454
|
-
maxParallelSubagents: DEFAULT_MAX_PARALLEL_SUBAGENTS,
|
|
455
458
|
autoUpdate: true,
|
|
456
459
|
};
|
|
457
460
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-resolve",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "OpenCode plugin that adds a small coder/reviewer agent set while preserving native plan/build behavior.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/jshsakura/opencode-resolve#readme",
|
package/scripts/postinstall.mjs
CHANGED