@osovv/vv-opencode 0.1.0 → 0.2.1
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/AGENTS.md +62 -50
- package/README.md +237 -20
- package/dist/commands/doctor.d.ts +1 -7
- package/dist/commands/doctor.js +3 -20
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/guardian.js +1 -1
- package/dist/commands/guardian.js.map +1 -1
- package/dist/commands/install.d.ts +1 -7
- package/dist/commands/install.js +4 -16
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.js +2 -5
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts +1 -7
- package/dist/commands/sync.js +4 -15
- package/dist/commands/sync.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/opencode.d.ts +3 -18
- package/dist/lib/opencode.js +39 -111
- package/dist/lib/opencode.js.map +1 -1
- package/dist/lib/opencode.test.js +23 -6
- package/dist/lib/opencode.test.js.map +1 -1
- package/dist/lib/vvoc-paths.d.ts +6 -0
- package/dist/lib/vvoc-paths.js +25 -0
- package/dist/lib/vvoc-paths.js.map +1 -0
- package/dist/plugins/guardian.js +20 -21
- package/dist/plugins/guardian.js.map +1 -1
- package/dist/plugins/memory-store.d.ts +49 -0
- package/dist/plugins/memory-store.js +452 -0
- package/dist/plugins/memory-store.js.map +1 -0
- package/dist/plugins/memory.d.ts +2 -0
- package/dist/plugins/memory.js +323 -0
- package/dist/plugins/memory.js.map +1 -0
- package/dist/plugins/memory.test.d.ts +1 -0
- package/dist/plugins/memory.test.js +151 -0
- package/dist/plugins/memory.test.js.map +1 -0
- package/docs/development-plan.xml +100 -20
- package/docs/knowledge-graph.xml +30 -6
- package/docs/requirements.xml +30 -19
- package/docs/technology.xml +23 -14
- package/docs/verification-plan.xml +92 -25
- package/package.json +14 -2
package/AGENTS.md
CHANGED
|
@@ -6,6 +6,26 @@ opencode, plugins, workflow
|
|
|
6
6
|
## Annotation
|
|
7
7
|
Portable OpenCode workflow package with plugins and a Bun CLI for install, sync, and cross-device setup.
|
|
8
8
|
|
|
9
|
+
## Project Snapshot
|
|
10
|
+
|
|
11
|
+
- package name: `@osovv/vv-opencode`
|
|
12
|
+
- CLI binary: `vvoc`
|
|
13
|
+
- primary runtime: `Bun`
|
|
14
|
+
- language: `TypeScript`
|
|
15
|
+
- CLI framework: `citty`
|
|
16
|
+
- current exported plugins:
|
|
17
|
+
- `GuardianPlugin`
|
|
18
|
+
- `MemoryPlugin`
|
|
19
|
+
- current command set: `install`, `sync`, `status`, `doctor`, `guardian config`
|
|
20
|
+
|
|
21
|
+
## Repository Rules
|
|
22
|
+
|
|
23
|
+
1. `src/` is the source of truth.
|
|
24
|
+
2. `dist/` is generated output. Never edit it manually.
|
|
25
|
+
3. Publishing is manual from the terminal with `npm publish`. Do not add CI publish workflows unless explicitly requested.
|
|
26
|
+
4. If CLI behavior, package exports, setup flow, or config locations change, update `README.md` in the same change.
|
|
27
|
+
5. This package manages user config, so prefer conservative, idempotent writes over aggressive rewrites.
|
|
28
|
+
|
|
9
29
|
## Core Principles
|
|
10
30
|
|
|
11
31
|
### 1. Never Write Code Without a Contract
|
|
@@ -32,6 +52,38 @@ Never jump straight to code when requirements, architecture, or verification int
|
|
|
32
52
|
### 6. Governed Autonomy
|
|
33
53
|
Agents have freedom in HOW to implement, but not in WHAT to build. Contracts, plans, graph references, and verification requirements define the allowed space.
|
|
34
54
|
|
|
55
|
+
## Working Conventions
|
|
56
|
+
|
|
57
|
+
### CLI and packaging
|
|
58
|
+
|
|
59
|
+
- Local consumers of a project dependency should run `vvoc` through `bun x vvoc` or `bun run vvoc`.
|
|
60
|
+
- Root package exports must stay valid:
|
|
61
|
+
- `@osovv/vv-opencode`
|
|
62
|
+
- `@osovv/vv-opencode/plugins/guardian`
|
|
63
|
+
- `@osovv/vv-opencode/plugins/memory`
|
|
64
|
+
- Local quality tooling uses `oxlint`, `oxfmt`, and `lefthook`.
|
|
65
|
+
- `lefthook` owns the `pre-commit` hook and should keep running lint + format checks.
|
|
66
|
+
- Before release, run:
|
|
67
|
+
- `bun run typecheck`
|
|
68
|
+
- `bun run lint`
|
|
69
|
+
- `bun run fmt:check`
|
|
70
|
+
- `bun test`
|
|
71
|
+
- `bun run build`
|
|
72
|
+
|
|
73
|
+
### Config safety
|
|
74
|
+
|
|
75
|
+
- OpenCode config remains in OpenCode-managed paths.
|
|
76
|
+
- vvoc-managed config must live in `$XDG_CONFIG_HOME/vvoc/` or project-local `.vvoc/`.
|
|
77
|
+
- `guardian.jsonc` may only be auto-rewritten when it is clearly managed by `vvoc`, unless the user explicitly forces overwrite.
|
|
78
|
+
- `MemoryPlugin` stores entries in `.vvoc/memory/` and must stay explicit-only. Never inject stored entries into prompts automatically.
|
|
79
|
+
- Never silently clobber user-owned config.
|
|
80
|
+
|
|
81
|
+
### Documentation sync
|
|
82
|
+
|
|
83
|
+
- If command names, flags, examples, install flow, or vvoc config paths change, update `README.md`.
|
|
84
|
+
- If modules or public exports change, update `docs/knowledge-graph.xml`.
|
|
85
|
+
- If commands, test strategy, or critical scenarios change, update `docs/verification-plan.xml`.
|
|
86
|
+
|
|
35
87
|
## Semantic Markup Reference
|
|
36
88
|
|
|
37
89
|
### Module Level
|
|
@@ -88,22 +140,6 @@ Use `ROLE` and `MAP_MODE` only when the file should be linted differently from a
|
|
|
88
140
|
- `TYPES` + `EXPORTS`: pure type/interface modules
|
|
89
141
|
- `SCRIPT` + `LOCALS`: CLI/bootstrap/smoke scripts
|
|
90
142
|
|
|
91
|
-
## Logging and Trace Convention
|
|
92
|
-
|
|
93
|
-
All important logs must point back to semantic blocks:
|
|
94
|
-
```
|
|
95
|
-
logger.info(`[ModuleName][functionName][BLOCK_NAME] message`, {
|
|
96
|
-
correlationId,
|
|
97
|
-
stableField: value,
|
|
98
|
-
});
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Rules:
|
|
102
|
-
- prefer structured fields over prose-heavy log lines
|
|
103
|
-
- redact secrets and high-risk payloads
|
|
104
|
-
- treat missing log anchors on critical branches as a verification defect
|
|
105
|
-
- update tests when log markers change intentionally
|
|
106
|
-
|
|
107
143
|
## Verification Conventions
|
|
108
144
|
|
|
109
145
|
`docs/verification-plan.xml` is the project-wide verification contract. Keep it current when module scope, test files, commands, critical log markers, or gate expectations change. Use `docs/operational-packets.xml` as the canonical schema for execution packets, graph deltas, verification deltas, and failure handoff packets.
|
|
@@ -111,49 +147,25 @@ Rules:
|
|
|
111
147
|
Testing rules:
|
|
112
148
|
- deterministic assertions first
|
|
113
149
|
- trace or log assertions when trajectory matters
|
|
114
|
-
- test files may also carry MODULE_CONTRACT, MODULE_MAP, semantic blocks, and CHANGE_SUMMARY when they are substantial
|
|
115
150
|
- module-local tests should stay close to the module they verify
|
|
116
151
|
- wave-level and phase-level checks should be explicit in the verification plan
|
|
117
152
|
|
|
118
153
|
## File Structure
|
|
119
154
|
```
|
|
120
155
|
docs/
|
|
121
|
-
requirements.xml
|
|
122
|
-
technology.xml
|
|
123
|
-
development-plan.xml
|
|
124
|
-
verification-plan.xml
|
|
125
|
-
knowledge-graph.xml
|
|
126
|
-
operational-packets.xml
|
|
156
|
+
requirements.xml
|
|
157
|
+
technology.xml
|
|
158
|
+
development-plan.xml
|
|
159
|
+
verification-plan.xml
|
|
160
|
+
knowledge-graph.xml
|
|
161
|
+
operational-packets.xml
|
|
127
162
|
src/
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
163
|
+
cli.ts
|
|
164
|
+
commands/
|
|
165
|
+
lib/
|
|
166
|
+
plugins/
|
|
131
167
|
```
|
|
132
168
|
|
|
133
|
-
## Documentation Artifacts - Unique Tag Convention
|
|
134
|
-
|
|
135
|
-
In `docs/*.xml`, repeated entities must use their unique ID as the XML tag name instead of a generic tag with an `ID` attribute. This reduces closing-tag ambiguity and gives LLMs stronger anchors.
|
|
136
|
-
|
|
137
|
-
### Tag naming conventions
|
|
138
|
-
|
|
139
|
-
| Entity type | Anti-pattern | Correct (unique tags) |
|
|
140
|
-
|---|---|---|
|
|
141
|
-
| Module | `<Module ID="M-CONFIG">...</Module>` | `<M-CONFIG NAME="Config" TYPE="UTILITY">...</M-CONFIG>` |
|
|
142
|
-
| Verification module | `<Verification ID="V-M-AUTH">...</Verification>` | `<V-M-AUTH MODULE="M-AUTH">...</V-M-AUTH>` |
|
|
143
|
-
| Phase | `<Phase number="1">...</Phase>` | `<Phase-1 name="Foundation">...</Phase-1>` |
|
|
144
|
-
| Flow | `<Flow ID="DF-SEARCH">...</Flow>` | `<DF-SEARCH NAME="...">...</DF-SEARCH>` |
|
|
145
|
-
| Use case | `<UseCase ID="UC-001">...</UseCase>` | `<UC-001>...</UC-001>` |
|
|
146
|
-
| Step | `<step order="1">...</step>` | `<step-1>...</step-1>` |
|
|
147
|
-
| Export | `<export name="config" .../>` | `<export-config .../>` |
|
|
148
|
-
| Function | `<function name="search" .../>` | `<fn-search .../>` |
|
|
149
|
-
| Type | `<type name="SearchResult" .../>` | `<type-SearchResult .../>` |
|
|
150
|
-
| Class | `<class name="Error" .../>` | `<class-Error .../>` |
|
|
151
|
-
|
|
152
|
-
### What NOT to change
|
|
153
|
-
- `CrossLink` tags stay self-closing
|
|
154
|
-
- single-use structural wrappers like `<contract>`, `<inputs>`, `<outputs>`, `<annotations>`, `<test-files>`, `<module-checks>`, and `<phase-gates>` stay generic
|
|
155
|
-
- code-level markup already uses unique names and stays as-is
|
|
156
|
-
|
|
157
169
|
## Rules for Modifications
|
|
158
170
|
|
|
159
171
|
1. Read the MODULE_CONTRACT before editing any file.
|
package/README.md
CHANGED
|
@@ -1,39 +1,53 @@
|
|
|
1
|
-
# vv-opencode
|
|
1
|
+
# @osovv/vv-opencode
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Portable OpenCode workflow package with plugins and a Bun CLI for install, sync, and cross-device setup.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Current package scope:
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
7
|
+
- `GuardianPlugin` for permission review
|
|
8
|
+
- `MemoryPlugin` for explicit persistent memory
|
|
9
|
+
- `vvoc` CLI for bootstrap, sync, and diagnostics
|
|
10
|
+
- vvoc-managed config kept separate from OpenCode config
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
+
## What is included
|
|
12
13
|
|
|
13
|
-
- npm
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
14
|
+
- npm package: `@osovv/vv-opencode`
|
|
15
|
+
- binary: `vvoc`
|
|
16
|
+
- exported plugins:
|
|
17
|
+
- `GuardianPlugin`
|
|
18
|
+
- `MemoryPlugin`
|
|
19
|
+
- CLI commands:
|
|
20
|
+
- `install`
|
|
21
|
+
- `sync`
|
|
22
|
+
- `status`
|
|
23
|
+
- `doctor`
|
|
24
|
+
- `guardian config`
|
|
17
25
|
|
|
18
|
-
##
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
Install into the current project:
|
|
19
29
|
|
|
20
30
|
```bash
|
|
21
|
-
bun
|
|
22
|
-
bun run build
|
|
23
|
-
bun test
|
|
31
|
+
bun add @osovv/vv-opencode
|
|
24
32
|
```
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
If installed locally, run the binary as:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
bun x vvoc --help
|
|
38
|
+
```
|
|
27
39
|
|
|
28
|
-
|
|
40
|
+
or:
|
|
29
41
|
|
|
30
42
|
```bash
|
|
31
|
-
|
|
43
|
+
bun run vvoc --help
|
|
32
44
|
```
|
|
33
45
|
|
|
34
|
-
|
|
46
|
+
Plain `vvoc` only works when the binary is available in your `PATH`, for example after a global install.
|
|
35
47
|
|
|
36
|
-
|
|
48
|
+
## OpenCode usage
|
|
49
|
+
|
|
50
|
+
Add the package to your OpenCode config:
|
|
37
51
|
|
|
38
52
|
```json
|
|
39
53
|
{
|
|
@@ -41,3 +55,206 @@ CLI добавит `@osovv/vv-opencode` в `opencode` config и при необ
|
|
|
41
55
|
"plugin": ["@osovv/vv-opencode"]
|
|
42
56
|
}
|
|
43
57
|
```
|
|
58
|
+
|
|
59
|
+
OpenCode loads all exported plugin functions from the package, so this enables both `GuardianPlugin` and `MemoryPlugin`.
|
|
60
|
+
|
|
61
|
+
## Config layout
|
|
62
|
+
|
|
63
|
+
OpenCode config stays in OpenCode-managed locations:
|
|
64
|
+
|
|
65
|
+
- global: `$XDG_CONFIG_HOME/opencode/opencode.json` or `~/.config/opencode/opencode.json`
|
|
66
|
+
- project: `./opencode.json` or `./opencode.jsonc`
|
|
67
|
+
|
|
68
|
+
vvoc-managed config stays separate:
|
|
69
|
+
|
|
70
|
+
- global: `$XDG_CONFIG_HOME/vvoc/` or `~/.config/vvoc/`
|
|
71
|
+
- project: `./.vvoc/`
|
|
72
|
+
|
|
73
|
+
Examples:
|
|
74
|
+
|
|
75
|
+
- global Guardian config: `~/.config/vvoc/guardian.jsonc`
|
|
76
|
+
- project Guardian config: `./.vvoc/guardian.jsonc`
|
|
77
|
+
- project memory store: `./.vvoc/memory/`
|
|
78
|
+
- project memory settings: `./.vvoc/memory.jsonc`
|
|
79
|
+
|
|
80
|
+
This keeps vvoc state clearly separated from native OpenCode config and avoids future clashes if OpenCode adds its own memory features.
|
|
81
|
+
|
|
82
|
+
## CLI
|
|
83
|
+
|
|
84
|
+
Show help:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bun x vvoc --help
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Install package config and bootstrap Guardian config:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
bun x vvoc install
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Use project scope instead of global scope:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
bun x vvoc install --scope project
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Override the global config home used for both `opencode/` and `vvoc/`:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
bun x vvoc install --config-dir /tmp/vvoc-home
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
This writes:
|
|
109
|
+
|
|
110
|
+
- `/tmp/vvoc-home/opencode/opencode.json`
|
|
111
|
+
- `/tmp/vvoc-home/vvoc/guardian.jsonc`
|
|
112
|
+
|
|
113
|
+
Sync managed config files:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
bun x vvoc sync
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Inspect current setup:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
bun x vvoc status
|
|
123
|
+
bun x vvoc doctor
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Generate or print `guardian.jsonc`:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
bun x vvoc guardian config --print
|
|
130
|
+
bun x vvoc guardian config --model "anthropic/claude-sonnet-4-5" --variant high
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Guardian config behavior
|
|
134
|
+
|
|
135
|
+
`vvoc` creates a managed `guardian.jsonc` with a marker header.
|
|
136
|
+
|
|
137
|
+
- managed files can be resynced safely
|
|
138
|
+
- existing unmanaged files are not overwritten unless `--force` is passed
|
|
139
|
+
- Guardian now reads vvoc-managed config from `.vvoc/` or `$XDG_CONFIG_HOME/vvoc/`
|
|
140
|
+
|
|
141
|
+
## Memory plugin
|
|
142
|
+
|
|
143
|
+
`MemoryPlugin` adds explicit memory tools to OpenCode.
|
|
144
|
+
|
|
145
|
+
Available tools:
|
|
146
|
+
|
|
147
|
+
- `memory_search`
|
|
148
|
+
- `memory_get`
|
|
149
|
+
- `memory_put`
|
|
150
|
+
- `memory_update`
|
|
151
|
+
- `memory_delete`
|
|
152
|
+
- `memory_list`
|
|
153
|
+
|
|
154
|
+
Memory is explicit-only:
|
|
155
|
+
|
|
156
|
+
- stored entries are never injected into the prompt automatically
|
|
157
|
+
- the agent must call memory tools directly when it needs durable context
|
|
158
|
+
- memory lives in `./.vvoc/memory/`
|
|
159
|
+
- the plugin adds a short system instruction that reminds the agent to consider memory tools proactively when durable context may help
|
|
160
|
+
|
|
161
|
+
Supported scopes:
|
|
162
|
+
|
|
163
|
+
- `session`
|
|
164
|
+
- `branch`
|
|
165
|
+
- `project`
|
|
166
|
+
- `shared`
|
|
167
|
+
|
|
168
|
+
### Memory review
|
|
169
|
+
|
|
170
|
+
The package also installs a bundled reviewer subagent named `memory-reviewer`.
|
|
171
|
+
|
|
172
|
+
Use it when you want a report-only audit of stored memory:
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
@memory-reviewer review the current memory and suggest keep/update/merge/delete actions
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The reviewer can read memory with `memory_list`, `memory_get`, and `memory_search`, but it does not modify entries.
|
|
179
|
+
|
|
180
|
+
## Package API
|
|
181
|
+
|
|
182
|
+
Root exports:
|
|
183
|
+
|
|
184
|
+
```ts
|
|
185
|
+
import { GuardianPlugin, MemoryPlugin } from "@osovv/vv-opencode";
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Subpath exports:
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
import { GuardianPlugin } from "@osovv/vv-opencode/plugins/guardian";
|
|
192
|
+
import { MemoryPlugin } from "@osovv/vv-opencode/plugins/memory";
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Local development
|
|
196
|
+
|
|
197
|
+
Install dependencies:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
bun install
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Run checks:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
bun run typecheck
|
|
207
|
+
bun run lint
|
|
208
|
+
bun run fmt:check
|
|
209
|
+
bun test
|
|
210
|
+
bun run build
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Format source files:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
bun run fmt
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Git hooks are managed with `lefthook`.
|
|
220
|
+
|
|
221
|
+
- `bun install` runs `lefthook install --force` through the `prepare` script
|
|
222
|
+
- the `pre-commit` hook runs `bun run lint` and `bun run fmt:check`
|
|
223
|
+
|
|
224
|
+
Smoke-test the CLI against a temporary config home:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
tmpdir="$(mktemp -d)"
|
|
228
|
+
bun run build
|
|
229
|
+
bun dist/cli.js install --config-dir "$tmpdir"
|
|
230
|
+
bun dist/cli.js status --config-dir "$tmpdir"
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Publishing
|
|
234
|
+
|
|
235
|
+
This project is published manually from the terminal. There is no CI publish workflow.
|
|
236
|
+
|
|
237
|
+
Typical release flow:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
bun run check
|
|
241
|
+
bun run build
|
|
242
|
+
npm publish
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## Repository layout
|
|
246
|
+
|
|
247
|
+
- `src/plugins/guardian.ts` - Guardian OpenCode plugin
|
|
248
|
+
- `src/plugins/memory.ts` - Memory OpenCode plugin and reviewer subagent config
|
|
249
|
+
- `src/plugins/memory-store.ts` - file-based memory store and search logic
|
|
250
|
+
- `src/lib/opencode.ts` - config path resolution and JSONC helpers for the CLI
|
|
251
|
+
- `src/lib/vvoc-paths.ts` - shared vvoc/openCode path helpers
|
|
252
|
+
- `src/commands/` - `vvoc` commands
|
|
253
|
+
- `src/cli.ts` - CLI entrypoint
|
|
254
|
+
- `docs/` - GRACE planning, verification, and graph artifacts
|
|
255
|
+
|
|
256
|
+
## Notes
|
|
257
|
+
|
|
258
|
+
- `src/` is the source of truth
|
|
259
|
+
- `dist/` is generated output for packaging and local smoke tests
|
|
260
|
+
- if you change CLI behavior, plugin exports, vvoc config paths, or memory workflow, keep this README in sync
|
|
@@ -5,15 +5,9 @@ declare const _default: import("citty").CommandDef<{
|
|
|
5
5
|
readonly default: "global";
|
|
6
6
|
readonly description: "Inspect global or project config.";
|
|
7
7
|
};
|
|
8
|
-
readonly source: {
|
|
9
|
-
readonly type: "enum";
|
|
10
|
-
readonly options: ["local", "npm"];
|
|
11
|
-
readonly default: "local";
|
|
12
|
-
readonly description: "Validate local plugin shim or npm package configuration.";
|
|
13
|
-
};
|
|
14
8
|
readonly "config-dir": {
|
|
15
9
|
readonly type: "string";
|
|
16
|
-
readonly description: "Override the global
|
|
10
|
+
readonly description: "Override the global config home used for opencode/ and vvoc/.";
|
|
17
11
|
};
|
|
18
12
|
}>;
|
|
19
13
|
export default _default;
|
package/dist/commands/doctor.js
CHANGED
|
@@ -12,15 +12,9 @@ export default defineCommand({
|
|
|
12
12
|
default: "global",
|
|
13
13
|
description: "Inspect global or project config.",
|
|
14
14
|
},
|
|
15
|
-
source: {
|
|
16
|
-
type: "enum",
|
|
17
|
-
options: ["local", "npm"],
|
|
18
|
-
default: "local",
|
|
19
|
-
description: "Validate local plugin shim or npm package configuration.",
|
|
20
|
-
},
|
|
21
15
|
"config-dir": {
|
|
22
16
|
type: "string",
|
|
23
|
-
description: "Override the global
|
|
17
|
+
description: "Override the global config home used for opencode/ and vvoc/.",
|
|
24
18
|
},
|
|
25
19
|
},
|
|
26
20
|
async run({ args }) {
|
|
@@ -32,21 +26,10 @@ export default defineCommand({
|
|
|
32
26
|
configDir,
|
|
33
27
|
});
|
|
34
28
|
const inspection = await inspectInstallation(paths);
|
|
35
|
-
const problems = [...inspection.problems];
|
|
36
|
-
if (args.source === "npm") {
|
|
37
|
-
if (!inspection.opencode.packageConfigured) {
|
|
38
|
-
problems.push(`${inspection.opencode.path} does not include ${"@osovv/vv-opencode"}`);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else if (!inspection.localPlugin.exists) {
|
|
42
|
-
problems.push(`${inspection.localPlugin.path} is missing`);
|
|
43
|
-
}
|
|
44
29
|
console.log(`Scope: ${inspection.scope}`);
|
|
45
30
|
console.log(`OpenCode config: ${inspection.opencode.path}`);
|
|
46
31
|
console.log(`OpenCode config parse: ${inspection.opencode.parseError ? inspection.opencode.parseError : "ok"}`);
|
|
47
32
|
console.log(`Configured plugins: ${inspection.opencode.plugins.length > 0 ? inspection.opencode.plugins.join(", ") : "<none>"}`);
|
|
48
|
-
console.log(`Local plugin shim: ${inspection.localPlugin.path}`);
|
|
49
|
-
console.log(`Local plugin shim state: ${inspection.localPlugin.exists ? inspection.localPlugin.managed ? "managed" : "unmanaged" : "missing"}`);
|
|
50
33
|
console.log(`Guardian config: ${inspection.guardian.path}`);
|
|
51
34
|
console.log(`Guardian config parse: ${inspection.guardian.parseError ? inspection.guardian.parseError : inspection.guardian.exists ? "ok" : "missing"}`);
|
|
52
35
|
console.log(`Guardian config managed by vvoc: ${inspection.guardian.managed ? "yes" : "no"}`);
|
|
@@ -56,9 +39,9 @@ export default defineCommand({
|
|
|
56
39
|
console.log(`- ${warning}`);
|
|
57
40
|
}
|
|
58
41
|
}
|
|
59
|
-
if (problems.length > 0) {
|
|
42
|
+
if (inspection.problems.length > 0) {
|
|
60
43
|
console.error("Problems:");
|
|
61
|
-
for (const problem of problems) {
|
|
44
|
+
for (const problem of inspection.problems) {
|
|
62
45
|
console.error(`- ${problem}`);
|
|
63
46
|
}
|
|
64
47
|
process.exitCode = 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAc,MAAM,oBAAoB,CAAC;AAEnF,eAAe,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,2CAA2C;KACzD;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ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,CAAC;YACnC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YAC3B,KAAK,MAAM,OAAO,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBAC1C,OAAO,CAAC,KAAK,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC;YAChC,CAAC;YACD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardian.js","sourceRoot":"","sources":["../../src/commands/guardian.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,GAGpB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,GAAG,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,gCAAgC;KAC9C;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;YAC9B,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,0CAA0C;SACxD;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"guardian.js","sourceRoot":"","sources":["../../src/commands/guardian.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,GAGpB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,GAAG,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,WAAW,E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IAAI,KAAK,CAAC,GAAG,KAAK,mBAAmB,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -5,15 +5,9 @@ declare const _default: import("citty").CommandDef<{
|
|
|
5
5
|
readonly default: "global";
|
|
6
6
|
readonly description: "Write to global or project config.";
|
|
7
7
|
};
|
|
8
|
-
readonly source: {
|
|
9
|
-
readonly type: "enum";
|
|
10
|
-
readonly options: ["local", "npm"];
|
|
11
|
-
readonly default: "local";
|
|
12
|
-
readonly description: "Install a local plugin shim or npm package reference.";
|
|
13
|
-
};
|
|
14
8
|
readonly "config-dir": {
|
|
15
9
|
readonly type: "string";
|
|
16
|
-
readonly description: "Override the global
|
|
10
|
+
readonly description: "Override the global config home used for opencode/ and vvoc/.";
|
|
17
11
|
};
|
|
18
12
|
readonly force: {
|
|
19
13
|
readonly type: "boolean";
|
package/dist/commands/install.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineCommand } from "citty";
|
|
2
|
-
import { describeWriteResult, ensurePackageInstalled, installGuardianConfig,
|
|
2
|
+
import { describeWriteResult, ensurePackageInstalled, installGuardianConfig, resolvePaths, } from "../lib/opencode.js";
|
|
3
3
|
export default defineCommand({
|
|
4
4
|
meta: {
|
|
5
5
|
name: "install",
|
|
@@ -12,15 +12,9 @@ export default defineCommand({
|
|
|
12
12
|
default: "global",
|
|
13
13
|
description: "Write to global or project config.",
|
|
14
14
|
},
|
|
15
|
-
source: {
|
|
16
|
-
type: "enum",
|
|
17
|
-
options: ["local", "npm"],
|
|
18
|
-
default: "local",
|
|
19
|
-
description: "Install a local plugin shim or npm package reference.",
|
|
20
|
-
},
|
|
21
15
|
"config-dir": {
|
|
22
16
|
type: "string",
|
|
23
|
-
description: "Override the global
|
|
17
|
+
description: "Override the global config home used for opencode/ and vvoc/.",
|
|
24
18
|
},
|
|
25
19
|
force: {
|
|
26
20
|
type: "boolean",
|
|
@@ -40,14 +34,8 @@ export default defineCommand({
|
|
|
40
34
|
cwd: process.cwd(),
|
|
41
35
|
configDir,
|
|
42
36
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
console.log(`${opencode.changed ? "Updated" : "Kept"} ${opencode.path}`);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
const localPlugin = await installLocalPlugin(paths, { force: Boolean(args.force) });
|
|
49
|
-
console.log(describeWriteResult(localPlugin));
|
|
50
|
-
}
|
|
37
|
+
const opencode = await ensurePackageInstalled(paths);
|
|
38
|
+
console.log(`${opencode.changed ? "Updated" : "Kept"} ${opencode.path}`);
|
|
51
39
|
if (args["guardian-config"] === false) {
|
|
52
40
|
console.log(`Skipped ${paths.guardianConfigPath} (guardian config disabled)`);
|
|
53
41
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,YAAY,GAEb,MAAM,oBAAoB,CAAC;AAE5B,eAAe,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,2CAA2C;KACzD;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;YAC9B,OAAO,EAAE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pF,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7C,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -7,7 +7,7 @@ declare const _default: import("citty").CommandDef<{
|
|
|
7
7
|
};
|
|
8
8
|
readonly "config-dir": {
|
|
9
9
|
readonly type: "string";
|
|
10
|
-
readonly description: "Override the global
|
|
10
|
+
readonly description: "Override the global config home used for opencode/ and vvoc/.";
|
|
11
11
|
};
|
|
12
12
|
}>;
|
|
13
13
|
export default _default;
|
package/dist/commands/status.js
CHANGED
|
@@ -14,7 +14,7 @@ export default defineCommand({
|
|
|
14
14
|
},
|
|
15
15
|
"config-dir": {
|
|
16
16
|
type: "string",
|
|
17
|
-
description: "Override the global
|
|
17
|
+
description: "Override the global config home used for opencode/ and vvoc/.",
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
async run({ args }) {
|
|
@@ -29,10 +29,7 @@ export default defineCommand({
|
|
|
29
29
|
console.log(`Scope: ${inspection.scope}`);
|
|
30
30
|
console.log(`OpenCode config: ${inspection.opencode.path}`);
|
|
31
31
|
console.log(`OpenCode config exists: ${inspection.opencode.exists ? "yes" : "no"}`);
|
|
32
|
-
console.log(`Package configured
|
|
33
|
-
console.log(`Local plugin shim: ${inspection.localPlugin.path}`);
|
|
34
|
-
console.log(`Local plugin shim exists: ${inspection.localPlugin.exists ? "yes" : "no"}`);
|
|
35
|
-
console.log(`Local plugin shim managed by vvoc: ${inspection.localPlugin.managed ? "yes" : "no"}`);
|
|
32
|
+
console.log(`Package configured: ${inspection.opencode.pluginConfigured ? "yes" : "no"}`);
|
|
36
33
|
console.log(`Guardian config: ${inspection.guardian.path}`);
|
|
37
34
|
console.log(`Guardian config exists: ${inspection.guardian.exists ? "yes" : "no"}`);
|
|
38
35
|
console.log(`Guardian config managed by vvoc: ${inspection.guardian.managed ? "yes" : "no"}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAc,MAAM,oBAAoB,CAAC;AAEnF,eAAe,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,uCAAuC;KACrD;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;YAC9B,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,mCAAmC;SACjD;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAc,MAAM,oBAAoB,CAAC;AAEnF,eAAe,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,uCAAuC;KACrD;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;YAC9B,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,mCAAmC;SACjD;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,+DAA+D;SAC7E;KACF;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC9D,MAAM,SAAS,GAAG,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,QA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