@osovv/vv-opencode 0.17.2 → 0.17.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 +123 -332
- package/dist/cli.js +7 -5
- package/dist/cli.js.map +1 -1
- package/dist/commands/completion.js +14 -12
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/patch-provider.d.ts +59 -0
- package/dist/commands/patch-provider.js +101 -0
- package/dist/commands/patch-provider.js.map +1 -0
- package/dist/lib/opencode.d.ts +2 -0
- package/dist/lib/opencode.js +59 -3
- package/dist/lib/opencode.js.map +1 -1
- package/dist/lib/vvoc-config.js +3 -3
- package/dist/lib/vvoc-config.js.map +1 -1
- package/package.json +1 -1
- package/schemas/vvoc/v2.json +1 -1
- package/dist/commands/path-provider.d.ts +0 -31
- package/dist/commands/path-provider.js +0 -77
- package/dist/commands/path-provider.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
# @osovv/vv-opencode
|
|
2
2
|
|
|
3
|
-
Portable OpenCode workflow package with
|
|
3
|
+
Portable OpenCode workflow package with a Bun CLI that installs and maintains OpenCode plugins, managed agent prompts, and a canonical `vvoc.json` config.
|
|
4
4
|
|
|
5
|
-
## What
|
|
5
|
+
## What This Package Does
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- `GuardianPlugin`
|
|
9
|
-
- `
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- managed primary agent `enhancer` for meta-prompting raw intent into structured XML
|
|
7
|
+
- installs one pinned `@osovv/vv-opencode@<version>` entry into OpenCode
|
|
8
|
+
- that package entry exports four plugins: `GuardianPlugin`, `MemoryPlugin`, `SystemContextInjectionPlugin`, `SecretsRedactionPlugin`
|
|
9
|
+
- creates and maintains canonical `vvoc` config at `$XDG_CONFIG_HOME/vvoc/vvoc.json`
|
|
10
|
+
- scaffolds managed prompt files under `vvoc/agents/`
|
|
11
|
+
- registers managed OpenCode agents: `enhancer`, `implementer`, `spec-reviewer`, `code-reviewer`, `investitagor`
|
|
12
|
+
- installs plugin-managed agents: `guardian`, `memory-reviewer`
|
|
13
|
+
- ships model-target presets, diagnostics, and shell completion through the `vvoc` CLI
|
|
15
14
|
|
|
16
15
|
## Quick Start
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
If the package is installed as a project dependency, run it via `bun x vvoc` or `bun run vvoc`.
|
|
19
18
|
|
|
20
|
-
Install
|
|
19
|
+
Install globally:
|
|
21
20
|
|
|
22
21
|
```bash
|
|
23
22
|
bun add -g @osovv/vv-opencode
|
|
@@ -27,137 +26,119 @@ Bootstrap the default global setup:
|
|
|
27
26
|
|
|
28
27
|
```bash
|
|
29
28
|
vvoc install
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Inspect the result:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
29
|
vvoc status
|
|
36
30
|
```
|
|
37
31
|
|
|
38
|
-
|
|
32
|
+
Write OpenCode config and managed prompts into the current repository instead of the global OpenCode config:
|
|
39
33
|
|
|
40
34
|
```bash
|
|
41
35
|
vvoc install --scope project
|
|
42
36
|
```
|
|
43
37
|
|
|
44
|
-
`
|
|
45
|
-
|
|
46
|
-
- adds a pinned `@osovv/vv-opencode@<installed-version>` entry to the OpenCode `plugin` array
|
|
47
|
-
- registers vvoc-managed OpenCode agents, including the primary `enhancer` agent
|
|
48
|
-
- creates managed prompt files under `vvoc/agents/` when missing
|
|
49
|
-
- creates and fully seeds the canonical `vvoc.json` file at `$XDG_CONFIG_HOME/vvoc/vvoc.json`
|
|
50
|
-
- seeds default `openai` and `zai` agent-model presets inside canonical `vvoc.json`
|
|
51
|
-
- keeps vvoc-managed config in one canonical file separate from native OpenCode config
|
|
52
|
-
- leaves unmanaged files alone unless `--force` is passed
|
|
38
|
+
## What `install` And `sync` Do
|
|
53
39
|
|
|
54
|
-
|
|
40
|
+
`vvoc install` and `vvoc sync`:
|
|
55
41
|
|
|
56
|
-
|
|
42
|
+
- ensure OpenCode has a pinned `@osovv/vv-opencode@<version>` package entry
|
|
43
|
+
- register managed agents and scaffold their prompt files
|
|
44
|
+
- create or refresh canonical `vvoc.json`
|
|
45
|
+
- seed starter presets: `openai`, `zai`, `minimax`
|
|
57
46
|
|
|
58
|
-
|
|
59
|
-
1. Start a fresh session with the enhancer agent
|
|
60
|
-
2. Paste the rough request in plain language
|
|
61
|
-
3. Answer any short follow-up questions
|
|
62
|
-
4. Copy the final XML prompt into the execution session
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
The OpenCode config entry written by `install` looks like this:
|
|
66
|
-
|
|
67
|
-
```json
|
|
68
|
-
{
|
|
69
|
-
"$schema": "https://opencode.ai/config.json",
|
|
70
|
-
"plugin": ["@osovv/vv-opencode@<installed-version>"]
|
|
71
|
-
}
|
|
72
|
-
```
|
|
47
|
+
That package entry exports four plugins:
|
|
73
48
|
|
|
74
|
-
|
|
49
|
+
- `GuardianPlugin`
|
|
50
|
+
- `MemoryPlugin`
|
|
51
|
+
- `SystemContextInjectionPlugin`
|
|
52
|
+
- `SecretsRedactionPlugin`
|
|
75
53
|
|
|
76
|
-
##
|
|
54
|
+
## Config And Data Layout
|
|
77
55
|
|
|
78
|
-
|
|
56
|
+
OpenCode config stays in OpenCode-managed paths:
|
|
79
57
|
|
|
80
|
-
|
|
58
|
+
- global: `$XDG_CONFIG_HOME/opencode/opencode.json` or `~/.config/opencode/opencode.json`
|
|
59
|
+
- project: `./opencode.json` or `./opencode.jsonc`
|
|
81
60
|
|
|
82
|
-
|
|
83
|
-
vvoc init
|
|
84
|
-
vvoc init --scope project
|
|
85
|
-
```
|
|
61
|
+
vvoc-owned config stays separate from OpenCode config:
|
|
86
62
|
|
|
87
|
-
|
|
63
|
+
- canonical config: `$XDG_CONFIG_HOME/vvoc/vvoc.json` or `~/.config/vvoc/vvoc.json`
|
|
88
64
|
|
|
89
|
-
|
|
90
|
-
vvoc init --non-interactive --scope project
|
|
91
|
-
```
|
|
65
|
+
Managed prompt files live here:
|
|
92
66
|
|
|
93
|
-
|
|
67
|
+
- global: `$XDG_CONFIG_HOME/vvoc/agents/*.md`
|
|
68
|
+
- project: `./.vvoc/agents/*.md`
|
|
94
69
|
|
|
95
|
-
|
|
70
|
+
For CLI commands that accept `--scope project`, only the OpenCode config target and managed prompt directory become project-local. Canonical `vvoc.json` stays global.
|
|
96
71
|
|
|
97
|
-
|
|
98
|
-
vvoc install
|
|
99
|
-
vvoc install --scope project
|
|
100
|
-
vvoc install --config-dir /tmp/vvoc-home
|
|
101
|
-
```
|
|
72
|
+
Persisted vvoc data lives here:
|
|
102
73
|
|
|
103
|
-
|
|
74
|
+
- global data root: `$XDG_DATA_HOME/vvoc/` or `~/.local/share/vvoc/`
|
|
75
|
+
- project-local memory: `$XDG_DATA_HOME/vvoc/projects/<project-id>/memory/`
|
|
76
|
+
- shared memory: `$XDG_DATA_HOME/vvoc/memory/shared/<namespace>/`
|
|
104
77
|
|
|
105
|
-
|
|
78
|
+
`vvoc.json` currently contains these top-level sections:
|
|
106
79
|
|
|
107
|
-
|
|
80
|
+
- `guardian`
|
|
81
|
+
- `memory`
|
|
82
|
+
- `secretsRedaction`
|
|
83
|
+
- `presets`
|
|
108
84
|
|
|
109
|
-
|
|
85
|
+
The current schema is versioned and published with the package:
|
|
110
86
|
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
vvoc
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"$schema": "https://cdn.jsdelivr.net/npm/@osovv/vv-opencode@<installed-version>/schemas/vvoc/v2.json",
|
|
90
|
+
"version": 2
|
|
91
|
+
}
|
|
114
92
|
```
|
|
115
93
|
|
|
116
|
-
|
|
94
|
+
Schema source of truth lives in this repository at `schemas/vvoc/v2.json`.
|
|
117
95
|
|
|
118
|
-
|
|
119
|
-
vvoc status
|
|
120
|
-
vvoc doctor
|
|
121
|
-
vvoc config validate
|
|
122
|
-
```
|
|
96
|
+
## CLI Overview
|
|
123
97
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
98
|
+
| Command | Purpose |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| `vvoc init` | Interactive bootstrap flow |
|
|
101
|
+
| `vvoc install` | Non-interactive setup and scaffolding |
|
|
102
|
+
| `vvoc sync` | Refresh plugin entry, managed agents, prompts, and `vvoc.json` |
|
|
103
|
+
| `vvoc status` | Show current installation state |
|
|
104
|
+
| `vvoc doctor` | Diagnose setup problems and exit non-zero if problems are found |
|
|
105
|
+
| `vvoc config validate` | Validate canonical `vvoc.json` |
|
|
106
|
+
| `vvoc agent list/set/unset` | Manage model target overrides |
|
|
107
|
+
| `vvoc preset list`, `vvoc preset show <name>`, `vvoc preset <name>` | Inspect or apply named presets |
|
|
108
|
+
| `vvoc guardian config` | Print or write the `guardian` section of `vvoc.json` |
|
|
109
|
+
| `vvoc plugin list` | List plugin entries from OpenCode config |
|
|
110
|
+
| `vvoc patch-provider stepfun-ai|zai` | Patch a global OpenCode config preset |
|
|
111
|
+
| `vvoc completion` | Install shell completions |
|
|
112
|
+
| `vvoc upgrade` | Upgrade the global package and run a follow-up sync |
|
|
113
|
+
| `vvoc version` | Print the installed package version |
|
|
127
114
|
|
|
128
|
-
|
|
115
|
+
## Model Targets And Presets
|
|
129
116
|
|
|
130
|
-
|
|
117
|
+
Inspect current model targets:
|
|
131
118
|
|
|
132
119
|
```bash
|
|
133
120
|
vvoc agent list
|
|
134
121
|
```
|
|
135
122
|
|
|
136
|
-
Set
|
|
123
|
+
Set overrides:
|
|
137
124
|
|
|
138
125
|
```bash
|
|
139
|
-
vvoc agent set default openai/gpt-5
|
|
140
|
-
vvoc agent set small-model openai/gpt-5-mini
|
|
141
|
-
vvoc agent set general openai/gpt-5-nano
|
|
142
|
-
vvoc agent set explore openai/gpt-5-nano
|
|
143
|
-
vvoc agent set enhancer openai/gpt-5
|
|
144
|
-
vvoc agent set implementer openai/gpt-5
|
|
145
|
-
vvoc agent set code-reviewer anthropic/claude-sonnet-4-20250514
|
|
126
|
+
vvoc agent set default openai/gpt-5.4
|
|
127
|
+
vvoc agent set small-model openai/gpt-5.4-mini
|
|
146
128
|
vvoc agent set guardian anthropic/claude-sonnet-4-5:high
|
|
147
129
|
vvoc agent set memory-reviewer openai/gpt-5:high
|
|
130
|
+
vvoc agent set explore openai/gpt-5.4-mini
|
|
148
131
|
```
|
|
149
132
|
|
|
150
133
|
Remove overrides:
|
|
151
134
|
|
|
152
135
|
```bash
|
|
153
136
|
vvoc agent unset default
|
|
154
|
-
vvoc agent unset
|
|
155
|
-
vvoc agent unset spec-reviewer
|
|
137
|
+
vvoc agent unset explore
|
|
156
138
|
vvoc agent unset guardian
|
|
157
|
-
vvoc agent unset memory-reviewer
|
|
158
139
|
```
|
|
159
140
|
|
|
160
|
-
Supported
|
|
141
|
+
Supported target IDs:
|
|
161
142
|
|
|
162
143
|
- `default`
|
|
163
144
|
- `small-model`
|
|
@@ -171,201 +152,39 @@ Supported model target IDs:
|
|
|
171
152
|
- `code-reviewer`
|
|
172
153
|
- `investitagor`
|
|
173
154
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
`guardian` and `memory-reviewer` accept `provider/model[:variant]` syntax. The other targets use `provider/model`.
|
|
155
|
+
Model syntax rules:
|
|
177
156
|
|
|
178
|
-
|
|
157
|
+
- `guardian` and `memory-reviewer` accept `provider/model[:variant]`
|
|
158
|
+
- all other targets use `provider/model`
|
|
159
|
+
- OpenCode-side targets respect `--scope`
|
|
160
|
+
- `guardian` and `memory-reviewer` live in canonical `vvoc.json`, so they remain global even when `--scope project` is passed
|
|
179
161
|
|
|
180
|
-
|
|
162
|
+
Presets are stored in canonical `vvoc.json` and are useful when you want to switch several model targets together:
|
|
181
163
|
|
|
182
164
|
```bash
|
|
183
165
|
vvoc preset list
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
Show a preset definition:
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
166
|
vvoc preset show openai
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
Apply a preset in one command:
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
167
|
vvoc preset openai
|
|
196
168
|
vvoc preset zai --scope project
|
|
197
|
-
vvoc preset minimax
|
|
198
169
|
```
|
|
199
170
|
|
|
200
|
-
Preset rules
|
|
171
|
+
Preset rules:
|
|
201
172
|
|
|
202
|
-
- presets
|
|
203
|
-
- presets manage only model-target overrides in v1
|
|
173
|
+
- starter presets are `openai`, `zai`, and `minimax`
|
|
204
174
|
- presets may be partial
|
|
205
|
-
-
|
|
206
|
-
- targets
|
|
207
|
-
-
|
|
208
|
-
|
|
209
|
-
This replaces the common workflow of running many `vvoc agent set ...` commands when you want to switch a known group of model targets together.
|
|
210
|
-
|
|
211
|
-
The canonical config ships with starter `openai`, `zai`, and `minimax` presets and uses this format:
|
|
212
|
-
|
|
213
|
-
```json
|
|
214
|
-
{
|
|
215
|
-
"presets": {
|
|
216
|
-
"openai": {
|
|
217
|
-
"description": "Starter OpenAI overrides for common vvoc model targets.",
|
|
218
|
-
"agents": {
|
|
219
|
-
"default": "openai/gpt-5.4:xhigh",
|
|
220
|
-
"small-model": "openai/gpt-5.4-mini",
|
|
221
|
-
"guardian": "openai/gpt-5.4-mini",
|
|
222
|
-
"explore": "openai/gpt-5.4-mini"
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
"zai": {
|
|
226
|
-
"description": "Starter ZAI overrides for common vvoc model targets.",
|
|
227
|
-
"agents": {
|
|
228
|
-
"default": "zai-coding-plan/glm-5.1",
|
|
229
|
-
"small-model": "zai-coding-plan/glm-4.5-air",
|
|
230
|
-
"guardian": "zai-coding-plan/glm-4.5-air",
|
|
231
|
-
"explore": "zai-coding-plan/glm-4.5-air"
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
"minimax": {
|
|
235
|
-
"description": "Starter MiniMax overrides for common vvoc model targets.",
|
|
236
|
-
"agents": {
|
|
237
|
-
"default": "minimax-coding-plan/minimax-m2.7",
|
|
238
|
-
"small-model": "minimax-coding-plan/minimax-m2.1",
|
|
239
|
-
"guardian": "minimax-coding-plan/minimax-m2.1",
|
|
240
|
-
"explore": "minimax-coding-plan/minimax-m2.1"
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
Preset `agents` support the same target IDs as `vvoc agent set`:
|
|
248
|
-
|
|
249
|
-
- `default`
|
|
250
|
-
- `small-model`
|
|
251
|
-
- `guardian`
|
|
252
|
-
- `memory-reviewer`
|
|
253
|
-
- `general`
|
|
254
|
-
- `explore`
|
|
255
|
-
- `enhancer`
|
|
256
|
-
- `implementer`
|
|
257
|
-
- `spec-reviewer`
|
|
258
|
-
- `code-reviewer`
|
|
259
|
-
- `investitagor`
|
|
260
|
-
|
|
261
|
-
### Plugin Inspection, Provider Presets, And Shell Completion
|
|
262
|
-
|
|
263
|
-
```bash
|
|
264
|
-
vvoc plugin list
|
|
265
|
-
vvoc plugin list --verbose
|
|
266
|
-
vvoc path-provider stepfun-ai
|
|
267
|
-
vvoc completion
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
- `plugin list` shows plugin entries from OpenCode config
|
|
271
|
-
- `path-provider stepfun-ai` patches the global OpenCode provider base URL for StepFun
|
|
272
|
-
- `completion` installs completions for the current shell (`bash`, `zsh`, or `fish`)
|
|
273
|
-
|
|
274
|
-
### Check For Upgrades
|
|
275
|
-
|
|
276
|
-
```bash
|
|
277
|
-
vvoc upgrade
|
|
278
|
-
vvoc version
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
- `vvoc upgrade` checks npm for a newer `@osovv/vv-opencode`, runs `bun add -g @osovv/vv-opencode@<latest>` when one exists, and then runs the default global `vvoc sync` flow.
|
|
282
|
-
- If the package upgrade succeeds but the follow-up sync cannot run, rerun `vvoc sync` manually.
|
|
283
|
-
|
|
284
|
-
## Command Reference
|
|
285
|
-
|
|
286
|
-
| Command | Purpose |
|
|
287
|
-
| --- | --- |
|
|
288
|
-
| `vvoc init` | Interactive bootstrap flow |
|
|
289
|
-
| `vvoc install` | Non-interactive setup and scaffolding |
|
|
290
|
-
| `vvoc sync` | Refresh managed config and prompt files |
|
|
291
|
-
| `vvoc status` | Show current installation state |
|
|
292
|
-
| `vvoc doctor` | Diagnose setup problems |
|
|
293
|
-
| `vvoc agent list/set/unset` | Manage model targets and overrides |
|
|
294
|
-
| `vvoc preset <name>/list/show <name>` | Switch or inspect declarative named presets |
|
|
295
|
-
| `vvoc guardian config` | Print or write the `guardian` section of `vvoc.json` |
|
|
296
|
-
| `vvoc config validate` | Validate canonical `vvoc.json` |
|
|
297
|
-
| `vvoc plugin list` | List OpenCode plugins from config |
|
|
298
|
-
| `vvoc path-provider stepfun-ai` | Patch a global provider endpoint preset |
|
|
299
|
-
| `vvoc completion` | Install shell completions |
|
|
300
|
-
| `vvoc upgrade` | Check npm, globally install the latest package with Bun, then run `vvoc sync` |
|
|
301
|
-
| `vvoc version` | Print the installed `vvoc` version |
|
|
302
|
-
|
|
303
|
-
## Config And Data Layout
|
|
304
|
-
|
|
305
|
-
OpenCode config stays in OpenCode-managed paths:
|
|
306
|
-
|
|
307
|
-
- global: `$XDG_CONFIG_HOME/opencode/opencode.json` or `~/.config/opencode/opencode.json`
|
|
308
|
-
- project: `./opencode.json` or `./opencode.jsonc`
|
|
309
|
-
|
|
310
|
-
vvoc-managed config stays separate from OpenCode config and now has one canonical file:
|
|
311
|
-
|
|
312
|
-
- canonical config: `$XDG_CONFIG_HOME/vvoc/vvoc.json` or `~/.config/vvoc/vvoc.json`
|
|
313
|
-
|
|
314
|
-
That canonical config contains the `guardian`, `memory`, `secretsRedaction`, and `presets` sections.
|
|
315
|
-
|
|
316
|
-
Project scope still uses `./.vvoc/agents/` for managed prompt files, but vvoc's own settings always live in the canonical global config file.
|
|
317
|
-
|
|
318
|
-
Persisted vvoc data lives under the XDG data root:
|
|
319
|
-
|
|
320
|
-
- global data root: `$XDG_DATA_HOME/vvoc/` or `~/.local/share/vvoc/`
|
|
321
|
-
- project-local memory: `$XDG_DATA_HOME/vvoc/projects/<project-id>/memory/`
|
|
322
|
-
- shared memory: `$XDG_DATA_HOME/vvoc/memory/shared/<namespace>/`
|
|
323
|
-
|
|
324
|
-
Managed prompt files live here:
|
|
325
|
-
|
|
326
|
-
- global: `~/.config/vvoc/agents/*.md`
|
|
327
|
-
- project: `./.vvoc/agents/*.md`
|
|
328
|
-
|
|
329
|
-
Scope rules:
|
|
330
|
-
|
|
331
|
-
- vvoc settings are always read from the canonical global `vvoc.json` file
|
|
332
|
-
- project scope only changes the OpenCode config target and the managed prompt directory
|
|
333
|
-
- existing unmanaged prompt files are not rewritten unless `--force` is passed
|
|
334
|
-
|
|
335
|
-
## JSON Schema
|
|
336
|
-
|
|
337
|
-
`vvoc.json` includes a versioned `$schema` URL:
|
|
338
|
-
|
|
339
|
-
```json
|
|
340
|
-
{
|
|
341
|
-
"$schema": "https://cdn.jsdelivr.net/npm/@osovv/vv-opencode@<installed-version>/schemas/vvoc/v2.json",
|
|
342
|
-
"version": 2
|
|
343
|
-
}
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
Schema source of truth and hosting strategy:
|
|
347
|
-
|
|
348
|
-
- the current schema is checked into this repository at `schemas/vvoc/v2.json`
|
|
349
|
-
- the legacy schema remains checked in at `schemas/vvoc/v1.json`
|
|
350
|
-
- the package publishes that file to npm by shipping the `schemas/` directory
|
|
351
|
-
- the canonical hosted schema URL is version-pinned: `https://cdn.jsdelivr.net/npm/@osovv/vv-opencode@<installed-version>/schemas/vvoc/v2.json`
|
|
352
|
-
- `v1.json` is immutable once published; breaking schema changes must ship as `v2.json` instead of rewriting `v1.json`
|
|
353
|
-
- existing `version: 1` configs still load during the migration window, and `vvoc install` or `vvoc sync` rewrites them to canonical `version: 2`
|
|
175
|
+
- applying a preset only changes the targets listed in that preset
|
|
176
|
+
- OpenCode-side targets respect `--scope`
|
|
177
|
+
- special targets such as `guardian` and `memory-reviewer` still write to canonical `vvoc.json`
|
|
354
178
|
|
|
355
179
|
## Plugins Included
|
|
356
180
|
|
|
357
181
|
### GuardianPlugin
|
|
358
182
|
|
|
359
|
-
`GuardianPlugin` reviews OpenCode permission requests with a constrained
|
|
183
|
+
`GuardianPlugin` reviews OpenCode permission requests with a constrained `guardian` agent and safe deny behavior.
|
|
360
184
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
```bash
|
|
364
|
-
vvoc guardian config --print
|
|
365
|
-
vvoc guardian config --model "anthropic/claude-sonnet-4-5" --variant high
|
|
366
|
-
```
|
|
185
|
+
Runtime settings live in the `guardian` section of canonical `vvoc.json`.
|
|
367
186
|
|
|
368
|
-
Supported
|
|
187
|
+
Supported `guardian` fields:
|
|
369
188
|
|
|
370
189
|
- `model`
|
|
371
190
|
- `variant`
|
|
@@ -373,11 +192,20 @@ Supported Guardian config fields:
|
|
|
373
192
|
- `approvalRiskThreshold`
|
|
374
193
|
- `reviewToastDurationMs`
|
|
375
194
|
|
|
376
|
-
|
|
195
|
+
Print or update the `guardian` section:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
vvoc guardian config --print
|
|
199
|
+
vvoc guardian config --model "anthropic/claude-sonnet-4-5" --variant high
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The runtime prompt is loaded from `guardian.md`, preferring `./.vvoc/agents/guardian.md` over the global `vvoc` agents directory.
|
|
377
203
|
|
|
378
204
|
### MemoryPlugin
|
|
379
205
|
|
|
380
|
-
`MemoryPlugin` adds explicit persistent memory tools
|
|
206
|
+
`MemoryPlugin` adds explicit persistent memory tools and installs a report-only `memory-reviewer` subagent.
|
|
207
|
+
|
|
208
|
+
Memory scopes are `session`, `branch`, `project`, and `shared`. Writes default to `project`; `shared` is cross-project, the rest are repository-local.
|
|
381
209
|
|
|
382
210
|
Available tools:
|
|
383
211
|
|
|
@@ -390,47 +218,38 @@ Available tools:
|
|
|
390
218
|
|
|
391
219
|
Memory is explicit-only:
|
|
392
220
|
|
|
393
|
-
- stored entries are never injected into
|
|
221
|
+
- stored entries are never injected into prompts automatically
|
|
394
222
|
- the agent must call memory tools directly when durable context is useful
|
|
395
|
-
-
|
|
396
|
-
|
|
397
|
-
Supported scopes:
|
|
223
|
+
- `memory-reviewer` can read memory but cannot modify it
|
|
398
224
|
|
|
399
|
-
|
|
400
|
-
- `branch` for the current git branch in the current project
|
|
401
|
-
- `project` for repository-specific memory
|
|
402
|
-
- `shared` for cross-project memory
|
|
403
|
-
|
|
404
|
-
The `memory` section supports these fields:
|
|
225
|
+
Supported `memory` fields:
|
|
405
226
|
|
|
406
227
|
- `enabled`
|
|
407
228
|
- `defaultSearchLimit`
|
|
408
229
|
- `reviewerModel`
|
|
409
230
|
- `reviewerVariant`
|
|
410
231
|
|
|
411
|
-
The package also installs a bundled reviewer subagent named `memory-reviewer`.
|
|
412
|
-
|
|
413
232
|
Example:
|
|
414
233
|
|
|
415
234
|
```text
|
|
416
235
|
@memory-reviewer review the current memory and suggest keep/update/merge/delete actions
|
|
417
236
|
```
|
|
418
237
|
|
|
419
|
-
The
|
|
238
|
+
The runtime prompt is loaded from `memory-reviewer.md`, preferring `./.vvoc/agents/memory-reviewer.md` over the global `vvoc` agents directory.
|
|
420
239
|
|
|
421
240
|
### SystemContextInjectionPlugin
|
|
422
241
|
|
|
423
|
-
`SystemContextInjectionPlugin` injects reusable system guidance into primary
|
|
242
|
+
`SystemContextInjectionPlugin` injects reusable system guidance into primary sessions without polluting known subagent prompts.
|
|
424
243
|
|
|
425
244
|
The default injected guidance tells the main session to proactively use the `explore` subagent when the task depends on unfamiliar code, unclear scope, or multiple candidate implementation areas.
|
|
426
245
|
|
|
427
|
-
The plugin currently injects guidance through the `chat.message` hook so it can inspect the resolved agent name and skip known subagents such as `general`, `explore`, `implementer`, and `memory-reviewer`.
|
|
428
|
-
|
|
429
246
|
### SecretsRedactionPlugin
|
|
430
247
|
|
|
431
|
-
`SecretsRedactionPlugin` redacts secrets from chat content before LLM requests and restores placeholders
|
|
248
|
+
`SecretsRedactionPlugin` redacts secrets from chat content before LLM requests and restores placeholders afterward where needed.
|
|
249
|
+
|
|
250
|
+
Settings live in the `secretsRedaction` section of canonical `vvoc.json`.
|
|
432
251
|
|
|
433
|
-
|
|
252
|
+
The default seeded config uses:
|
|
434
253
|
|
|
435
254
|
```json
|
|
436
255
|
{
|
|
@@ -440,35 +259,32 @@ The plugin currently injects guidance through the `chat.message` hook so it can
|
|
|
440
259
|
|
|
441
260
|
Set `VVOC_SECRET` if you want placeholder restoration to stay stable across restarts.
|
|
442
261
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
Built-in patterns cover common identifiers and tokens such as:
|
|
262
|
+
Built-in patterns cover common identifiers and tokens such as email addresses, UUIDs, IP and MAC addresses, bearer tokens, and common OpenAI, Anthropic, GitHub, AWS, and Stripe-style keys.
|
|
446
263
|
|
|
447
|
-
|
|
448
|
-
- UUIDs
|
|
449
|
-
- IP and MAC addresses
|
|
450
|
-
- OpenAI, Anthropic, GitHub, AWS, and Stripe-style keys
|
|
451
|
-
- bearer tokens and generic hex-like tokens
|
|
264
|
+
## Managed Prompts And Agents
|
|
452
265
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
`vvoc` manages prompt files for:
|
|
266
|
+
Managed prompt files are created for:
|
|
456
267
|
|
|
457
268
|
- `guardian`
|
|
458
269
|
- `memory-reviewer`
|
|
270
|
+
- `enhancer`
|
|
459
271
|
- `implementer`
|
|
460
272
|
- `spec-reviewer`
|
|
461
273
|
- `code-reviewer`
|
|
462
274
|
- `investitagor`
|
|
463
275
|
|
|
464
|
-
`install` and `sync`
|
|
276
|
+
OpenCode agent registrations written by `vvoc install` and `vvoc sync` are:
|
|
465
277
|
|
|
278
|
+
- `enhancer`
|
|
466
279
|
- `implementer`
|
|
467
280
|
- `spec-reviewer`
|
|
468
281
|
- `code-reviewer`
|
|
469
282
|
- `investitagor`
|
|
470
283
|
|
|
471
|
-
|
|
284
|
+
Plugin runtime agents are:
|
|
285
|
+
|
|
286
|
+
- `guardian`
|
|
287
|
+
- `memory-reviewer`
|
|
472
288
|
|
|
473
289
|
If a managed prompt file is missing, rerun one of these commands:
|
|
474
290
|
|
|
@@ -477,28 +293,6 @@ vvoc install
|
|
|
477
293
|
vvoc sync
|
|
478
294
|
```
|
|
479
295
|
|
|
480
|
-
## Package API
|
|
481
|
-
|
|
482
|
-
Root exports:
|
|
483
|
-
|
|
484
|
-
```ts
|
|
485
|
-
import {
|
|
486
|
-
GuardianPlugin,
|
|
487
|
-
MemoryPlugin,
|
|
488
|
-
SystemContextInjectionPlugin,
|
|
489
|
-
SecretsRedactionPlugin,
|
|
490
|
-
} from "@osovv/vv-opencode";
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
Subpath exports:
|
|
494
|
-
|
|
495
|
-
```ts
|
|
496
|
-
import { GuardianPlugin } from "@osovv/vv-opencode/plugins/guardian";
|
|
497
|
-
import { MemoryPlugin } from "@osovv/vv-opencode/plugins/memory";
|
|
498
|
-
import { SystemContextInjectionPlugin } from "@osovv/vv-opencode/plugins/system-context-injection";
|
|
499
|
-
import { SecretsRedactionPlugin } from "@osovv/vv-opencode/plugins/secrets-redaction";
|
|
500
|
-
```
|
|
501
|
-
|
|
502
296
|
## Local Development
|
|
503
297
|
|
|
504
298
|
Install dependencies:
|
|
@@ -507,7 +301,7 @@ Install dependencies:
|
|
|
507
301
|
bun install
|
|
508
302
|
```
|
|
509
303
|
|
|
510
|
-
Run the
|
|
304
|
+
Run the local verification stack:
|
|
511
305
|
|
|
512
306
|
```bash
|
|
513
307
|
bun run typecheck
|
|
@@ -524,11 +318,6 @@ Format source files:
|
|
|
524
318
|
bun run fmt
|
|
525
319
|
```
|
|
526
320
|
|
|
527
|
-
Git hooks are managed with `lefthook`.
|
|
528
|
-
|
|
529
|
-
- `bun install` runs `lefthook install --force` through the `prepare` script
|
|
530
|
-
- the `pre-commit` hook runs `bun run lint` and `bun run fmt:check`
|
|
531
|
-
|
|
532
321
|
Smoke-test the built CLI against a temporary config root:
|
|
533
322
|
|
|
534
323
|
```bash
|
|
@@ -538,9 +327,11 @@ bun dist/cli.js install --config-dir "$tmpdir"
|
|
|
538
327
|
bun dist/cli.js status --config-dir "$tmpdir"
|
|
539
328
|
```
|
|
540
329
|
|
|
330
|
+
Git hooks are managed with `lefthook`.
|
|
331
|
+
|
|
541
332
|
## Publishing
|
|
542
333
|
|
|
543
|
-
|
|
334
|
+
Publishing is manual from the terminal.
|
|
544
335
|
|
|
545
336
|
Typical release flow:
|
|
546
337
|
|
|
@@ -556,4 +347,4 @@ npm publish
|
|
|
556
347
|
|
|
557
348
|
## Optional: RTK
|
|
558
349
|
|
|
559
|
-
[RTK](https://github.com/rtk-ai/rtk) is a CLI proxy that
|
|
350
|
+
[RTK](https://github.com/rtk-ai/rtk) is a CLI proxy that can reduce token usage for common developer commands. The interactive `vvoc init` flow recommends it after setup.
|