opencode-resolve 0.1.20 → 0.2.0

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 CHANGED
@@ -29,7 +29,6 @@ opencode-resolve setup
29
29
  - [모델 설정](#모델-설정)
30
30
  - [에이전트](#에이전트)
31
31
  - [권한](#권한)
32
- - [Context7](#context7)
33
32
  - [프로젝트 컨텍스트](#프로젝트-컨텍스트)
34
33
  - [업그레이드](#업그레이드)
35
34
  - [개발](#개발)
@@ -40,7 +39,6 @@ opencode-resolve setup
40
39
  - 작은 패치와 검증 증거를 중시하는 `resolver -> coder` 루프
41
40
  - 코드베이스 탐색과 리뷰 갭 점검을 위한 읽기 전용 서브에이전트
42
41
  - 선택적 명령어: `/resolve`, `/resolve-code`, `/resolve-review`
43
- - 선택적 Context7 MCP 자동 등록
44
42
  - 엄격한 설정 검증: 알 수 없는 키, 잘못된 모드, 잘못된 에이전트 이름, 잘못된 타입은 즉시 실패
45
43
  - 보수적 마이그레이션: 기존 값은 동의 없이 덮어쓰지 않음
46
44
 
@@ -75,7 +73,7 @@ opencode plugin opencode-resolve --global --force
75
73
  opencode
76
74
  ```
77
75
 
78
- npm `postinstall`이 `~/.config/opencode/opencode.json`에 플러그인을 등록하고, 없을 때만 `~/.config/opencode/resolve.json`을 만들고, 기존 모델 핀을 보존하며 (`--reset-config`로 명시 시 초기화), `~/.cache/opencode/packages/` 의 OpenCode 플러그인 캐시를 새로고침합니다.
76
+ npm `postinstall`이 `~/.config/opencode/opencode.json`에 플러그인을 등록하고, 없을 때만 `~/.config/opencode/resolve.json`을 만들고, 기존 설정을 보존하며 (`--reset`으로 명시 시 완전 초기화), `~/.cache/opencode/packages/` 의 OpenCode 플러그인 캐시를 새로고침합니다.
79
77
 
80
78
  ### 다시 셋업하기
81
79
 
@@ -83,8 +81,8 @@ npm `postinstall`이 `~/.config/opencode/opencode.json`에 플러그인을 등
83
81
 
84
82
  | 명령 | 언제 사용 |
85
83
  | --- | --- |
86
- | `opencode-resolve setup --fresh` | `resolve.json` 재생성, 기존 모델 핀 유지 |
87
- | `opencode-resolve setup --reset-config` | `resolve.json` 재생성 + 모델 초기화 |
84
+ | `opencode-resolve setup --reset` | `resolve.json`을 백업 완전히 지우고(모델 핀 포함) 재생성. 별칭: `--fresh`, `--reset-config`, `--nuke`. |
85
+ | `opencode-resolve setup --update` | `resolve.json`을 유지하고 빠진 기본값만 추가. |
88
86
  | `opencode-resolve setup --models` | 모델 핀만 다시 감지 |
89
87
  | `opencode-resolve setup --force-cache` | OpenCode 플러그인 캐시만 새로고침 |
90
88
 
@@ -94,11 +92,6 @@ npm `postinstall`이 `~/.config/opencode/opencode.json`에 플러그인을 등
94
92
  OPENCODE_RESOLVE_SKIP_POSTINSTALL=1 npm install -g opencode-resolve
95
93
  ```
96
94
 
97
- ### 선택적 companion 플러그인
98
-
99
- - `@tarquinen/opencode-dcp@latest` — 긴 루프에서 오래된 tool output을 줄여 토큰 비용을 낮춥니다.
100
- - `@slkiser/opencode-quota@latest` — 컨텍스트를 오염시키지 않고 토큰/quota 사용량을 보여줍니다.
101
-
102
95
  ### 수동 설정
103
96
 
104
97
  `~/.config/opencode/opencode.json`에 플러그인을 추가합니다.
@@ -115,7 +108,6 @@ OPENCODE_RESOLVE_SKIP_POSTINSTALL=1 npm install -g opencode-resolve
115
108
  {
116
109
  "enabled": ["coder", "resolver", "explorer", "reviewer", "deep-reviewer", "planner"],
117
110
  "preserveNative": true,
118
- "context7": true,
119
111
  "commands": false,
120
112
  "models": {},
121
113
  "agents": {
@@ -194,18 +186,17 @@ irm https://raw.githubusercontent.com/jshsakura/awesome-opencode-skills/main/ins
194
186
 
195
187
  | 키 | 타입 | 기본값 | 용도 |
196
188
  | --- | --- | --- | --- |
197
- | `profile` | `mix` / `glm` / `gpt` | `mix` | 프롬프트/profile preset. |
198
189
  | `tier` | `bronze` / `silver` / `gold` | 미설정 | 설정된 tier preset 활성화. |
199
190
  | `enabled` | 에이전트 이름 배열 | 기본 에이전트 | 주입할 resolve 에이전트. |
200
191
  | `models` | object | `{}` | 모델 별칭과 역할별 모델 핀. |
201
192
  | `agents` | object | `{}` | 에이전트별 override. |
202
193
  | `preserveNative` | boolean | `true` | 명시 override가 없으면 OpenCode 기본 에이전트 보존. |
203
- | `context7` | boolean | `true` | 없을 때 Context7 MCP 등록. |
204
194
  | `commands` | boolean | `false` | `/resolve`, `/resolve-code`, `/resolve-review` 추가. |
205
195
  | `autoApprove` | boolean | `true` | 하위 호환용 플래그. 현재 권한은 명시 설정과 분류기가 제어. |
206
- | `autoUpdate` | boolean | `true` | 설치/업데이트 추가적 설정 마이그레이션 허용. |
196
+ | `autoUpdate` | boolean | (no-op) | **사용 중단.** 하위 호환을 위해 필드는 받되 무시합니다. 기존 auto-update는 `hooks.config()` 호출마다 `opencode plugin`을 spawn했고, 여러 OpenCode 인스턴스가 동시에 플러그인을 로드하면 수백 건의 병렬 설치로 폭주했습니다. 업데이트는 `npm i -g opencode-resolve`로 수동 실행하세요. |
207
197
  | `language` | `auto` / `en` / `ko` | `auto` | 프롬프트 언어 선호. |
208
198
  | `maxParallelSubagents` | positive integer | 미설정 | 동시 coder 디스패치에 대한 선택적 프롬프트 수준 soft limit. |
199
+ | `singleAgentMode` | boolean | `false` | `true`면 resolver가 `coder` 서브에이전트를 디스패치하지 않고 모든 편집을 직접 수행합니다. 단순 작업에서 지연과 토큰 비용을 절약합니다. 정보/진단용 서브에이전트(explorer/debugger)는 여전히 사용 가능합니다. |
209
200
 
210
201
  ### 에이전트 override
211
202
 
@@ -241,9 +232,9 @@ irm https://raw.githubusercontent.com/jshsakura/awesome-opencode-skills/main/ins
241
232
  ```json
242
233
  {
243
234
  "models": {
244
- "bronze": "zai-coding-plan/glm-4.5",
245
- "silver": "zai-coding-plan/glm-5.1",
246
- "gold": "openai/gpt-5.5",
235
+ "bronze": "zai-coding-plan/glm-5.2",
236
+ "silver": "zai-coding-plan/glm-5.2",
237
+ "gold": "zai-coding-plan/glm-5.2",
247
238
  "explorer": "bronze",
248
239
  "coder": "silver",
249
240
  "resolver": "gold",
@@ -257,10 +248,8 @@ irm https://raw.githubusercontent.com/jshsakura/awesome-opencode-skills/main/ins
257
248
  지원 모델 별칭:
258
249
 
259
250
  ```text
260
- fast, strong, mini, codex, quick, deep, glm, gpt,
251
+ fast, strong, mini, quick, deep,
261
252
  bronze, silver, gold,
262
- gpt-bronze, gpt-silver, gpt-gold,
263
- glm-bronze, glm-silver, glm-gold,
264
253
  모든 지원 에이전트 이름
265
254
  ```
266
255
 
@@ -274,11 +263,7 @@ glm-bronze, glm-silver, glm-gold,
274
263
  | `reviewer` | yes | `subagent` | deny | deny | allow | 읽기 전용 검증 갭 리뷰. |
275
264
  | `deep-reviewer` | yes | `subagent` | deny | deny | allow | 위험/고영향 변경 리뷰. |
276
265
  | `planner` | yes | `subagent` | deny | deny | allow | 필요할 때만 읽기 전용 계획. |
277
- | `gpt` | no | `all` | allow | ask | allow | GPT 최적화 primary resolver. |
278
- | `glm` | no | `all` | allow | ask | allow | GLM/ZAI 최적화 primary resolver. |
279
- | `codex` | no | `all` | allow | ask | allow | 레거시 Codex 최적화 primary resolver. |
280
266
  | `architect` | no | `subagent` | deny | deny | allow | 설계/분해 보조. |
281
- | `gpt-coder` | no | `subagent` | allow | ask | allow | 더 강한 구현 보조. |
282
267
  | `debugger` | no | `subagent` | allow | ask | allow | 재현/root-cause 보조. |
283
268
  | `researcher` | no | `subagent` | deny | deny | allow | 코드베이스/문서 리서치 보조. |
284
269
 
@@ -296,27 +281,6 @@ resolve 에이전트의 bash는 기본적으로 `ask`입니다. 플러그인의
296
281
 
297
282
  값을 설정하면 resolver 프롬프트에 삽입됩니다. 런타임 semaphore는 아닙니다. 변경 후 OpenCode를 재시작하세요. `agents.resolver.prompt`를 직접 지정하면 템플릿된 규칙은 대체됩니다.
298
283
 
299
- ## Context7
300
-
301
- `context7: true`이면 `mcp.context7`이 없을 때 Context7 MCP를 등록합니다.
302
-
303
- ```json
304
- {
305
- "mcp": {
306
- "context7": {
307
- "type": "remote",
308
- "url": "https://mcp.context7.com/mcp"
309
- }
310
- }
311
- }
312
- ```
313
-
314
- 끄려면:
315
-
316
- ```json
317
- { "context7": false }
318
- ```
319
-
320
284
  ## 프로젝트 컨텍스트
321
285
 
322
286
  플러그인은 repo 전체를 프롬프트에 밀어 넣지 않고, 커밋된 프로젝트 컨텍스트 위치만 노출합니다. 감지 대상:
@@ -370,7 +334,7 @@ Git hook:
370
334
  npm run hooks:install
371
335
  ```
372
336
 
373
- 테스트는 에이전트 주입, 설정 로딩, 모델 별칭, 권한, 선택적 명령어, Context7 보존, 네이티브 에이전트 보존, postinstall 동작을 검증합니다.
337
+ 테스트는 에이전트 주입, 설정 로딩, 모델 별칭, 권한, 선택적 명령어, 네이티브 에이전트 보존, postinstall 동작을 검증합니다.
374
338
 
375
339
  ## 릴리스
376
340
 
package/README.md CHANGED
@@ -29,7 +29,6 @@ opencode-resolve setup
29
29
  - [Model Setup](#model-setup)
30
30
  - [Agents](#agents)
31
31
  - [Permissions](#permissions)
32
- - [Context7](#context7)
33
32
  - [Project Context](#project-context)
34
33
  - [Upgrade](#upgrade)
35
34
  - [Development](#development)
@@ -40,7 +39,6 @@ opencode-resolve setup
40
39
  - A verified `resolver -> coder` loop that favors small patches and evidence-backed completion.
41
40
  - Read-only scout/review subagents for targeted discovery and verification gaps.
42
41
  - Optional command aliases: `/resolve`, `/resolve-code`, `/resolve-review`.
43
- - Optional Context7 MCP registration for documentation lookup.
44
42
  - Strict config validation: unknown keys, bad modes, bad agent names, and invalid types fail early.
45
43
  - Conservative migration: generated config is additive and existing values are not overwritten without consent.
46
44
 
@@ -75,7 +73,7 @@ opencode plugin opencode-resolve --global --force
75
73
  opencode
76
74
  ```
77
75
 
78
- The npm `postinstall` script registers the plugin in `~/.config/opencode/opencode.json`, creates `~/.config/opencode/resolve.json` if missing, preserves existing model pins (unless you opt out with `--reset-config`), and refreshes the OpenCode plugin cache under `~/.cache/opencode/packages/`.
76
+ The npm `postinstall` script registers the plugin in `~/.config/opencode/opencode.json`, creates `~/.config/opencode/resolve.json` if missing, preserves existing settings (unless you opt out with `--reset`), and refreshes the OpenCode plugin cache under `~/.cache/opencode/packages/`.
79
77
 
80
78
  ### Re-run setup
81
79
 
@@ -83,8 +81,8 @@ Re-run the installer any time with the `opencode-resolve setup` CLI:
83
81
 
84
82
  | Command | When to use |
85
83
  | --- | --- |
86
- | `opencode-resolve setup --fresh` | Regenerate `resolve.json`; keep existing model pins |
87
- | `opencode-resolve setup --reset-config` | Regenerate `resolve.json` and reset model pins |
84
+ | `opencode-resolve setup --reset` | Back up and wipe `resolve.json` completely (model pins included) and regenerate it. Aliases: `--fresh`, `--reset-config`, `--nuke`. |
85
+ | `opencode-resolve setup --update` | Keep `resolve.json` and only add missing defaults. |
88
86
  | `opencode-resolve setup --models` | Re-detect model pins only |
89
87
  | `opencode-resolve setup --force-cache` | Refresh OpenCode plugin cache only |
90
88
 
@@ -94,11 +92,6 @@ Skip postinstall automation:
94
92
  OPENCODE_RESOLVE_SKIP_POSTINSTALL=1 npm install -g opencode-resolve
95
93
  ```
96
94
 
97
- ### Optional companion plugins
98
-
99
- - `@tarquinen/opencode-dcp@latest` — trims obsolete tool output during long loops.
100
- - `@slkiser/opencode-quota@latest` — shows token/quota usage without polluting context.
101
-
102
95
  ### Manual setup
103
96
 
104
97
  Add the plugin to `~/.config/opencode/opencode.json`:
@@ -115,7 +108,6 @@ Create `~/.config/opencode/resolve.json`:
115
108
  {
116
109
  "enabled": ["coder", "resolver", "explorer", "reviewer", "deep-reviewer", "planner"],
117
110
  "preserveNative": true,
118
- "context7": true,
119
111
  "commands": false,
120
112
  "models": {},
121
113
  "agents": {
@@ -194,18 +186,17 @@ Full commented reference: [opencode-resolve.reference.jsonc](./opencode-resolve.
194
186
 
195
187
  | Key | Type | Default | Purpose |
196
188
  | --- | --- | --- | --- |
197
- | `profile` | `mix` / `glm` / `gpt` | `mix` | Prompt/profile preset. |
198
189
  | `tier` | `bronze` / `silver` / `gold` | unset | Enables the matching tier preset when configured. |
199
190
  | `enabled` | agent name array | default agents | Which resolve agents to inject. |
200
191
  | `models` | object | `{}` | Model aliases and per-role model pins. |
201
192
  | `agents` | object | `{}` | Per-agent overrides. |
202
193
  | `preserveNative` | boolean | `true` | Keep native OpenCode agents unless explicitly overridden. |
203
- | `context7` | boolean | `true` | Register Context7 MCP if missing. |
204
194
  | `commands` | boolean | `false` | Add `/resolve`, `/resolve-code`, and `/resolve-review`. |
205
195
  | `autoApprove` | boolean | `true` | Backward-compatible config flag; current permissions remain explicit. |
206
- | `autoUpdate` | boolean | `true` | Allow additive config migrations during install/update. |
196
+ | `autoUpdate` | boolean | (no-op) | **Deprecated.** Field is accepted for backward compatibility but ignored. Auto-update spawned `opencode plugin` per `hooks.config()` call, which fanned out into hundreds of parallel installs when multiple OpenCode instances loaded the plugin at once. Update manually with `npm i -g opencode-resolve`. |
207
197
  | `language` | `auto` / `en` / `ko` | `auto` | Prompt language preference. |
208
198
  | `maxParallelSubagents` | positive integer | unset | Optional prompt-level soft limit for concurrent coder dispatch. |
199
+ | `singleAgentMode` | boolean | `false` | When `true`, the resolver makes all edits directly instead of dispatching a `coder` subagent — lower latency and token cost on simple tasks. Information/diagnostic subagents (explorer/debugger) are still available. |
209
200
 
210
201
  ### Agent Overrides
211
202
 
@@ -241,9 +232,9 @@ Example three-tier setup:
241
232
  ```json
242
233
  {
243
234
  "models": {
244
- "bronze": "zai-coding-plan/glm-4.5",
245
- "silver": "zai-coding-plan/glm-5.1",
246
- "gold": "openai/gpt-5.5",
235
+ "bronze": "zai-coding-plan/glm-5.2",
236
+ "silver": "zai-coding-plan/glm-5.2",
237
+ "gold": "zai-coding-plan/glm-5.2",
247
238
  "explorer": "bronze",
248
239
  "coder": "silver",
249
240
  "resolver": "gold",
@@ -257,10 +248,8 @@ Example three-tier setup:
257
248
  Supported model alias keys:
258
249
 
259
250
  ```text
260
- fast, strong, mini, codex, quick, deep, glm, gpt,
251
+ fast, strong, mini, quick, deep,
261
252
  bronze, silver, gold,
262
- gpt-bronze, gpt-silver, gpt-gold,
263
- glm-bronze, glm-silver, glm-gold,
264
253
  and every supported agent name
265
254
  ```
266
255
 
@@ -274,11 +263,7 @@ and every supported agent name
274
263
  | `reviewer` | yes | `subagent` | deny | deny | allow | Read-only verification-gap review. |
275
264
  | `deep-reviewer` | yes | `subagent` | deny | deny | allow | Read-only review for risky/high-impact changes. |
276
265
  | `planner` | yes | `subagent` | deny | deny | allow | Read-only planning when explicitly useful. |
277
- | `gpt` | no | `all` | allow | ask | allow | GPT-optimized primary resolver. |
278
- | `glm` | no | `all` | allow | ask | allow | GLM/ZAI-optimized primary resolver. |
279
- | `codex` | no | `all` | allow | ask | allow | Legacy Codex-optimized primary resolver. |
280
266
  | `architect` | no | `subagent` | deny | deny | allow | Design/decomposition helper. |
281
- | `gpt-coder` | no | `subagent` | allow | ask | allow | Stronger implementation helper. |
282
267
  | `debugger` | no | `subagent` | allow | ask | allow | Failure reproduction/root-cause helper. |
283
268
  | `researcher` | no | `subagent` | deny | deny | allow | Codebase/docs research helper. |
284
269
 
@@ -296,27 +281,6 @@ Use a sandbox or VM for untrusted repositories.
296
281
 
297
282
  When set, the value is inserted into the resolver prompt. It is not a runtime semaphore. Restart OpenCode after changing it. A custom `agents.resolver.prompt` replaces the templated rule.
298
283
 
299
- ## Context7
300
-
301
- When `context7: true`, the plugin registers Context7 MCP if `mcp.context7` is not already present:
302
-
303
- ```json
304
- {
305
- "mcp": {
306
- "context7": {
307
- "type": "remote",
308
- "url": "https://mcp.context7.com/mcp"
309
- }
310
- }
311
- }
312
- ```
313
-
314
- Disable it with:
315
-
316
- ```json
317
- { "context7": false }
318
- ```
319
-
320
284
  ## Project Context
321
285
 
322
286
  The plugin exposes committed project context without stuffing the entire repo into prompts. It detects:
@@ -370,7 +334,7 @@ Git hooks:
370
334
  npm run hooks:install
371
335
  ```
372
336
 
373
- Verification covered by tests includes agent injection, config loading, model aliases, permissions, optional commands, Context7 preservation, native agent preservation, and postinstall behavior.
337
+ Verification covered by tests includes agent injection, config loading, model aliases, permissions, optional commands, native agent preservation, and postinstall behavior.
374
338
 
375
339
  ## Release
376
340
 
package/dist/agents.d.ts CHANGED
@@ -1,27 +1,11 @@
1
1
  import { ResolveAgentName, ResolveAgentConfig, ModelAlias, TierName } from "./types.js";
2
2
  export declare const DEFAULT_MODELS: Partial<Record<ModelAlias, string>>;
3
3
  export declare const DEFAULT_ENABLED: ResolveAgentName[];
4
- export declare const VALID_AGENT_NAMES: readonly ["coder", "reviewer", "resolver", "codex", "gpt", "glm", "architect", "gpt-coder", "debugger", "researcher", "explorer", "deep-reviewer", "planner"];
4
+ export declare const VALID_AGENT_NAMES: readonly ["coder", "reviewer", "resolver", "architect", "debugger", "researcher", "explorer", "deep-reviewer", "planner"];
5
5
  export declare const VALID_AGENT_NAME_SET: Set<string>;
6
6
  export declare const DEFAULT_AGENT_CONFIG: Record<ResolveAgentName, Required<Pick<ResolveAgentConfig, "mode" | "description" | "prompt" | "color">> & ResolveAgentConfig>;
7
- export declare const GLM_CODER_PROMPT: string;
8
- export declare const GPT_CODER_PROMPT: string;
9
- export declare function buildGLMResolverPrompt(maxParallelSubagents: number | undefined): string;
10
- export declare function buildGPTResolverPrompt(): string;
11
- export declare function buildCodexResolverPrompt(): string;
12
- export declare function buildResolverPrompt(maxParallelSubagents: number | undefined): string;
13
- export declare const VALID_MODEL_ALIASES: readonly ["coder", "reviewer", "resolver", "codex", "gpt", "glm", "architect", "gpt-coder", "debugger", "researcher", "explorer", "deep-reviewer", "planner", "glm", "gpt", "quick", "deep", "fast", "strong", "mini", "codex", "bronze", "silver", "gold", "gpt-bronze", "gpt-silver", "gpt-gold", "glm-bronze", "glm-silver", "glm-gold"];
7
+ export declare function buildResolverPrompt(maxParallelSubagents: number | undefined, singleAgentMode?: boolean): string;
8
+ export declare const VALID_MODEL_ALIASES: readonly ["coder", "reviewer", "resolver", "architect", "debugger", "researcher", "explorer", "deep-reviewer", "planner", "quick", "deep", "fast", "strong", "mini", "bronze", "silver", "gold"];
14
9
  export declare const VALID_MODEL_ALIAS_SET: Set<string>;
15
- export declare const VALID_PROFILES: Set<string>;
16
10
  export declare const VALID_TIERS: Set<string>;
17
- export declare const GLM_ENABLED: ResolveAgentName[];
18
- export declare const GPT_ENABLED: ResolveAgentName[];
19
11
  export declare const TIER_ENABLED: Record<TierName, ResolveAgentName[]>;
20
- export declare const GLM_AGENT_OVERRIDES: Partial<Record<ResolveAgentName, {
21
- maxSteps?: number;
22
- description?: string;
23
- }>>;
24
- export declare const GPT_AGENT_OVERRIDES: Partial<Record<ResolveAgentName, {
25
- maxSteps?: number;
26
- description?: string;
27
- }>>;