vgxness 1.6.0 → 1.8.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.
@@ -1,33 +1,38 @@
1
+ import { planClaudeCodeMcpInstall } from '../../mcp/client-install-claude-code-contract.js';
1
2
  import { createMcpClientSetupPreview } from '../../mcp/client-setup-preview.js';
2
- import { noWriteActionSafety } from './provider-setup-adapter.js';
3
+ import { externalProviderWriteSafety, noWriteActionSafety } from './provider-setup-adapter.js';
3
4
  export const claudeSetupAdapter = {
4
5
  id: 'claude',
5
6
  displayName: 'Claude',
6
- supportLevel: 'supported-secondary',
7
+ supportLevel: 'supported',
7
8
  capabilities: ['mcp-preview', 'mcp-install-plan', 'cli-mcp-plan', 'agent-preview', 'doctor', 'manual-guidance'],
8
9
  targets: [
9
10
  { kind: 'project-config', label: 'Project .mcp.json', path: '.mcp.json', writableBySetup: false },
10
11
  { kind: 'project-config', label: 'Project Claude agents', path: '.claude/agents/*.md', writableBySetup: false },
11
12
  { kind: 'project-config', label: 'Project Claude memory', path: 'CLAUDE.md', writableBySetup: false },
13
+ { kind: 'user-config', label: 'User Claude MCP config', path: '~/.claude.json', writableBySetup: false },
12
14
  { kind: 'user-config', label: 'User Claude agents', path: '~/.claude/agents/*.md', writableBySetup: false },
15
+ { kind: 'user-config', label: 'User Claude memory', path: '~/.claude/CLAUDE.md', writableBySetup: false },
13
16
  ],
14
17
  getStatus(context) {
18
+ const plan = this.getInstallPlan?.(context);
15
19
  return {
16
20
  providerId: 'claude',
17
- status: 'supported-secondary',
18
- summary: 'Claude is supported as a secondary, non-default provider for CLI MCP registration planning/apply, project .mcp.json compatibility, and project/user agent planning; explicit guarded apply is required for writes or CLI execution.',
21
+ status: plan?.status === 'blocked' ? 'blocked' : 'available',
22
+ summary: 'Claude provider setup is available for CLI MCP registration planning/apply, project .mcp.json compatibility, guarded CLAUDE.md memory, user ~/.claude.json MCP merge, and project/user agents; explicit guarded apply is required for writes or CLI execution.',
19
23
  evidence: context.databasePath !== undefined
20
24
  ? ['Claude MCP preview can be generated from the selected database path.']
21
25
  : ['Claude MCP preview uses a placeholder until a database path is selected.'],
22
- guidance: ['Use `vgxness mcp install claude --scope local|project|user --yes --run-id <id>` for explicit guarded apply. VGXNESS may write project-root CLAUDE.md only through confirmed, preflighted Claude project install; it never manually writes ~/.claude.json or .claude/CLAUDE.md. Read-only setup/status surfaces do not execute Claude Code.'],
26
+ guidance: ['Use `vgxness mcp install claude --scope local|project|user --yes --run-id <id>` for explicit guarded apply. Project scope may write .mcp.json, .claude/agents/*.md, and the project-root CLAUDE.md managed block. User/global scope narrowly merges only mcpServers.vgxness in ~/.claude.json, writes ~/.claude/agents/*.md, and manages only the VGXNESS block in ~/.claude/CLAUDE.md. Read-only setup/status surfaces do not execute Claude Code.'],
23
27
  actions: [
24
28
  {
25
29
  id: 'claude-manual-guidance',
26
30
  label: 'Review guarded Claude install guidance',
27
31
  kind: 'manual-guidance',
28
- description: 'Supported secondary guidance only in setup status; writes are available only through the guarded mcp install claude flow with run preflight metadata.',
32
+ description: 'Claude install guidance only in setup status; writes are available only through the guarded mcp install claude flow with run preflight metadata.',
29
33
  safety: noWriteActionSafety,
30
34
  },
35
+ ...(plan?.actions ?? []),
31
36
  ],
32
37
  };
33
38
  },
@@ -46,4 +51,44 @@ export const claudeSetupAdapter = {
46
51
  warnings: preview.warnings,
47
52
  };
48
53
  },
54
+ getInstallPlan(context) {
55
+ const contract = planClaudeCodeMcpInstall({
56
+ cwd: context.workspaceRoot,
57
+ databasePath: context.databasePath ?? '<database-path>',
58
+ ...(context.databasePathSource !== undefined ? { databasePathSource: context.databasePathSource } : {}),
59
+ scope: 'project',
60
+ ...(context.env !== undefined ? { env: context.env } : {}),
61
+ ...(context.overwriteVgxness !== undefined ? { overwriteVgxness: context.overwriteVgxness } : {}),
62
+ });
63
+ return claudeInstallPlan(context, contract);
64
+ },
49
65
  };
66
+ function claudeInstallPlan(_context, contract) {
67
+ const actions = contract.status === 'would_install' ? [externalInstallAction(contract.targetPath, contract.overwriteVgxness)] : [];
68
+ return {
69
+ providerId: 'claude',
70
+ status: contract.status === 'would_install' ? 'available' : 'blocked',
71
+ readOnly: true,
72
+ mutating: false,
73
+ writesProviderConfig: false,
74
+ summary: contract.status === 'would_install'
75
+ ? 'Claude project install plan is available for external guarded application; the read-only setup status does not write provider config.'
76
+ : contract.message,
77
+ targetPath: contract.targetPath,
78
+ warnings: contract.warnings,
79
+ actions,
80
+ source: contract,
81
+ };
82
+ }
83
+ function externalInstallAction(targetPath, overwriteVgxness = false) {
84
+ return {
85
+ id: 'claude-mcp-install-project',
86
+ label: 'Copy external Claude project install command',
87
+ kind: 'copy-command',
88
+ command: ['vgxness', 'mcp', 'install', 'claude', '--scope', 'project', '--yes', ...(overwriteVgxness ? ['--overwrite-vgxness'] : [])],
89
+ description: overwriteVgxness
90
+ ? 'Copy and run this outside setup status only after reviewing that VGXNESS entries will be overwritten and unrelated config preserved.'
91
+ : 'Copy and run this outside setup status only after reviewing the read-only plan.',
92
+ safety: externalProviderWriteSafety(targetPath),
93
+ };
94
+ }
@@ -5,7 +5,7 @@ import { externalProviderWriteSafety, noWriteActionSafety, } from './provider-se
5
5
  export const openCodeSetupAdapter = {
6
6
  id: 'opencode',
7
7
  displayName: 'OpenCode',
8
- supportLevel: 'supported-primary',
8
+ supportLevel: 'supported',
9
9
  capabilities: ['mcp-preview', 'mcp-install-plan', 'mcp-install-apply-external', 'agent-preview', 'doctor', 'visibility-check'],
10
10
  targets: [
11
11
  { kind: 'user-config', label: 'User/global OpenCode config (default)', path: '$HOME/.config/opencode/opencode.json', writableBySetup: false },
@@ -19,7 +19,7 @@ export const openCodeSetupAdapter = {
19
19
  status: visibility?.ready === true ? 'ready' : 'available',
20
20
  summary: visibility?.ready === true
21
21
  ? 'OpenCode MCP visibility is ready.'
22
- : 'OpenCode is the supported primary provider; install/apply remains external and explicit.',
22
+ : 'OpenCode provider setup is available; install/apply remains external and explicit.',
23
23
  evidence: visibility?.evidence ?? ['OpenCode setup preview and install planning are available.'],
24
24
  guidance: visibility?.guidance ?? ['Preview setup first, then copy and run external install commands only after review.'],
25
25
  actions: plan?.actions ?? [],
@@ -1,3 +1,6 @@
1
+ export function isSupportedProviderLevel(level) {
2
+ return level === 'supported' || level === 'supported-primary' || level === 'supported-secondary';
3
+ }
1
4
  export const noWriteActionSafety = {
2
5
  mutating: false,
3
6
  writesProviderConfig: false,
@@ -1,3 +1,4 @@
1
+ import { isSupportedProviderLevel } from './providers/provider-setup-adapter.js';
1
2
  import { listProviderSetupAdapters } from './providers/provider-setup-registry.js';
2
3
  const agentName = 'vgxness-manager';
3
4
  export class SetupLifecycleService {
@@ -151,7 +152,7 @@ function verificationSummary(environment, project, providers, agents, mcp) {
151
152
  {
152
153
  id: 'providers',
153
154
  label: 'Providers',
154
- status: providers.some((provider) => provider.supportLevel === 'supported-primary') ? 'ready' : 'unknown',
155
+ status: providers.some((provider) => isSupportedProviderLevel(provider.supportLevel)) ? 'ready' : 'unknown',
155
156
  detail: `${providers.length} provider targets are available for read-only setup status.`,
156
157
  },
157
158
  {
@@ -87,7 +87,7 @@ export function createSetupPlan(input) {
87
87
  actions: [
88
88
  {
89
89
  id: 'claude-guarded-install',
90
- description: `Review supported secondary Claude plan for CLI MCP registration, .mcp.json compatibility, ${claude.agentNames.length} .claude/agents/*.md file(s), and guarded project-root CLAUDE.md managed block; apply only with vgxness mcp install claude --scope project --yes --run-id <id>.`,
90
+ description: `Review first-class supported Claude plan for CLI MCP registration, .mcp.json compatibility, ${claude.agentNames.length} .claude/agents/*.md file(s), and guarded project-root CLAUDE.md managed block; apply only with vgxness mcp install claude --scope project --yes --run-id <id>.`,
91
91
  mutating: false,
92
92
  targetPath,
93
93
  backupRequired: claude.backupRequired,
@@ -100,7 +100,7 @@ export function createSetupPlan(input) {
100
100
  targetPath: target.path,
101
101
  reason: target.kind === 'project-memory' ? 'A future guarded Claude apply would create a managed VGXNESS backup before appending or updating the project-root CLAUDE.md managed block.' : 'A future guarded Claude apply would create a managed VGXNESS backup before merging or updating Claude project configuration.',
102
102
  })),
103
- nextCommands: ['vgxness mcp install claude --plan --scope project', 'vgxness mcp install claude --scope project --yes --run-id <id>', 'OpenCode remains the default/primary provider.'],
103
+ nextCommands: ['vgxness mcp install claude --plan --scope project', 'vgxness mcp install claude --scope project --yes --run-id <id>', 'OpenCode remains the default guided setup provider.'],
104
104
  },
105
105
  };
106
106
  }
@@ -18,7 +18,7 @@ The user-facing shape is deliberately four-surface: **MCP for agents**, **CLI fo
18
18
  | Core workflow | SDD-first canonical state: explore → proposal → spec → design → tasks → apply-progress → verify → archive. |
19
19
  | Interfaces | MCP server for AI tools, CLI for automation/power users, TUI for guided install/status/profile/SDD workflows, and `vgxness code` runtime for bounded workspace work. |
20
20
  | Installation UX | Step-based guided setup with doctor checks, dry-run support, and no manual provider JSON editing on the happy path. |
21
- | Provider strategy | Provider-agnostic domain model with OpenCode as the primary/default supported provider; Claude Code is supported secondary for CLI MCP registration, project `.mcp.json` compatibility, guarded project-root `CLAUDE.md` managed memory, and project/user agent planning. Claude scopes are `local`, `project`, and `user` (`personal`/`global` map to `user`). Read-only status/doctor/change-plan never execute Claude Code or inspect private Claude config, and VGXNESS never manually mutates `~/.claude.json` or `.claude/CLAUDE.md`. Pi/`gentle-pi` compatibility is a future adapter/reference target. The code runtime speaks to any OpenAI-compatible endpoint through `src/code/providers/openai-compatible-provider-adapter.ts`. |
21
+ | Provider strategy | Provider-agnostic domain model with OpenCode as the primary/default supported provider; Claude Code is supported secondary for CLI MCP registration, project `.mcp.json` compatibility, guarded `CLAUDE.md` managed memory, direct user `~/.claude.json` MCP merge, and project/user agent files. Claude scopes are `local`, `project`, and `user` (`personal`/`global` map to `user`). Read-only status/doctor/change-plan never execute Claude Code; user/global apply mutates only `mcpServers.vgxness`, VGXNESS-owned `~/.claude/agents/*.md`, and the VGXNESS block in `~/.claude/CLAUDE.md` after confirmation/preflight. Pi/`gentle-pi` compatibility is a future adapter/reference target. The code runtime speaks to any OpenAI-compatible endpoint through `src/code/providers/openai-compatible-provider-adapter.ts`. |
22
22
  | Memory | Project memory plus personal/global memory, backed locally. |
23
23
  | Agents | Agents/subagents are registered in a neutral schema, then rendered into provider-specific config. |
24
24
  | Skills | Skills are first-class, versioned, attachable to agents/workflows/adapters, and improved through reviewable proposals. |
@@ -439,7 +439,7 @@ vgxness agents render --provider opencode --project vgxness --name apply-agent
439
439
  Rendering is intentionally read-only: it returns generated content in the CLI response. It does **not** write `.opencode/`, `.claude/`, or any user/global provider config.
440
440
  OpenCode agent keys are sanitized deterministically from registry names, and rendering rejects key collisions instead of overwriting generated config.
441
441
 
442
- Claude Code install planning/apply is supported through the guarded MCP install path. Rendering remains read-only; confirmed project compatibility writes are limited to `.mcp.json`, `.claude/agents/*.md`, and the project-root `CLAUDE.md` managed block with run preflight metadata. Local/user MCP registration is represented through Claude CLI argv after confirmation/preflight, not private config mutation.
442
+ Claude Code install planning/apply is supported through the guarded MCP install path. Rendering remains read-only; confirmed project compatibility writes are limited to `.mcp.json`, `.claude/agents/*.md`, and the project-root `CLAUDE.md` managed block with run preflight metadata. User/global install is a guarded direct path that backs up existing files, merges only `mcpServers.vgxness` in `~/.claude.json`, writes VGXNESS-owned `~/.claude/agents/*.md`, and manages only the VGXNESS block in `~/.claude/CLAUDE.md`.
443
443
 
444
444
  ### OpenCode injection preview
445
445
 
package/docs/cli.md CHANGED
@@ -232,7 +232,7 @@ bun run cli:bun -- sdd status --project vgxness --change my-change
232
232
  Provider support shown in the Installation surface is:
233
233
 
234
234
  - **OpenCode** — supported primary provider with preview/status/doctor and read-only install planning.
235
- - **Claude** — supported secondary provider for Claude CLI MCP registration, project `.mcp.json` compatibility, project-root `CLAUDE.md` managed memory, and project/user agent planning. Scopes are `local|project|user`; `personal`/`global` map to `user`. Explicit guarded apply is outside the guided OpenCode flow and requires `mcp install claude --scope <scope> --yes --run-id <id>`. Read-only status/doctor/change-plan do not read private Claude config or execute Claude Code.
235
+ - **Claude** — supported secondary provider for Claude CLI MCP registration, project `.mcp.json` compatibility, guarded `CLAUDE.md` managed memory, user `~/.claude.json` MCP merge, and project/user agents. Scopes are `local|project|user`; `personal`/`global` map to `user`. Explicit guarded apply is outside the guided OpenCode flow and requires `mcp install claude --scope <scope> --yes --run-id <id>`. Read-only status/doctor/change-plan do not execute Claude Code.
236
236
  - **Antigravity** — placeholder/coming-soon guidance only.
237
237
  - **Custom/future** — extension point with safe manual/default unsupported behavior.
238
238
 
@@ -508,7 +508,7 @@ Manual OpenCode verification checklist:
508
508
 
509
509
  ## Claude Code MCP install
510
510
 
511
- Claude Code is supported as a secondary, non-default provider for VGXNESS MCP/subagent configuration. Planning/status/doctor/change-plan are read-only and do not require Claude Code, network, or credentials. Scopes are `local`, `project`, and `user`; compatibility aliases `personal` and legacy `global` map to Claude `user` with warnings. MCP registration is represented as Claude CLI argv (`claude mcp add --scope <scope> vgxness -- vgxness mcp start`), never shell strings or manual `~/.claude.json` mutation.
511
+ Claude Code is supported as a secondary, non-default provider for VGXNESS MCP/subagent configuration. Planning/status/doctor/change-plan are read-only and do not require Claude Code, network, or credentials. Scopes are `local`, `project`, and `user`; compatibility aliases `personal` and legacy `global` map to Claude `user` with warnings. MCP registration is represented as structured config/argv (`claude mcp add --scope <scope> vgxness -- vgxness mcp start`), never shell strings. User/global apply narrowly merges only `mcpServers.vgxness` in `~/.claude.json` and preserves unknown keys/auth/session data.
512
512
 
513
513
  ```bash
514
514
  bun run cli:bun -- mcp install claude --plan --scope project --db <path>
@@ -526,8 +526,8 @@ User agent files target `~/.claude/agents/*.md` only when a future apply path ex
526
526
 
527
527
  Forbidden writes:
528
528
 
529
- - `~/.claude.json`
530
- - `.claude/CLAUDE.md`
529
+ - `~/.claude.json` except guarded user/global `mcpServers.vgxness` merge
530
+ - `.claude/CLAUDE.md`; user/global uses `~/.claude/CLAUDE.md` and manages only the VGXNESS block
531
531
 
532
532
  Malformed or conflicting VGXNESS markers in project-root `CLAUDE.md` refuse the full Claude project install before any Claude target is mutated.
533
533
 
package/docs/providers.md CHANGED
@@ -7,7 +7,7 @@ VGXNESS is provider-agnostic at the core: the registry stores provider-neutral d
7
7
  | Provider | Control plane | Code runtime | Notes |
8
8
  |---|---|---|---|
9
9
  | OpenCode | `managed` | n/a (target) | Primary supported provider. The configurator renders OpenCode MCP config and manager/SDD agent definitions into the chosen scope. |
10
- | Claude Code | `supported-secondary` | n/a | Supported for Claude CLI MCP registration planning/apply, project `.mcp.json` compatibility, project-root `CLAUDE.md` managed memory, and project/user agent planning. Scopes are `local`, `project`, and `user`; `personal`/`global` map to `user` for compatibility. Confirmed applies are explicit and guarded; read-only surfaces do not execute Claude Code and VGXNESS never manually mutates `~/.claude.json`. |
10
+ | Claude Code | `supported-secondary` | n/a | Supported for Claude CLI MCP registration planning/apply, project `.mcp.json` compatibility, guarded `CLAUDE.md` managed memory, user `~/.claude.json` MCP merge, and project/user agent files. Scopes are `local`, `project`, and `user`; `personal`/`global` map to `user` for compatibility. Confirmed applies are explicit and guarded; read-only surfaces inspect files without executing Claude Code. |
11
11
  | Antigravity | `placeholder` | n/a | Listed in the TUI Installation surface as coming-soon. |
12
12
  | Custom / future | `extension` | extension point | Per the [Architecture](./architecture.md) decision, anything not OpenCode or Claude is a custom extension. |
13
13
  | OpenAI-compatible | n/a | `openai-compatible-provider-adapter.ts` | Real adapter used by `vgxness code`. Speaks to any OpenAI-compatible endpoint. |
@@ -46,7 +46,7 @@ vgxness agents render --provider json --project vgxness --name apply-agent
46
46
 
47
47
  Claude Code is supported as a secondary, non-default control-plane target. Read-only status, doctor, setup plan, and change-plan surfaces can inspect or preview Claude targets without Claude Code installed and without writing files.
48
48
 
49
- Claude scopes are canonicalized to `local`, `project`, and `user`; VGXNESS compatibility aliases `personal` and legacy `global` map to Claude `user` with warnings. MCP registration is represented as argv only, for example `claude mcp add --scope user vgxness -- vgxness mcp start`; no shell strings or manual `~/.claude.json` edits are generated. Status/doctor/change-plan avoid private Claude config reads and do not execute Claude Code.
49
+ Claude scopes are canonicalized to `local`, `project`, and `user`; VGXNESS compatibility aliases `personal` and legacy `global` map to Claude `user` with warnings. MCP registration is represented as structured config/argv, for example `claude mcp add --scope user vgxness -- vgxness mcp start`; no shell strings are generated. For user/global apply, VGXNESS narrowly merges only `mcpServers.vgxness` in `~/.claude.json`, preserves unknown keys, backs up existing files, and does not manage auth/session data. Status/doctor/change-plan are read-only and do not execute Claude Code.
50
50
 
51
51
  Allowed project-scope writes, only after explicit guarded apply with run preflight metadata (`vgxness mcp install claude --scope project --yes --run-id <id>`):
52
52
 
@@ -58,8 +58,8 @@ User-scoped agent files target `~/.claude/agents/*.md` only as an explicit exter
58
58
 
59
59
  Forbidden writes:
60
60
 
61
- - `~/.claude.json`
62
- - `.claude/CLAUDE.md`
61
+ - `~/.claude.json` except the guarded user/global merge of `mcpServers.vgxness`
62
+ - `.claude/CLAUDE.md`; user/global memory is `~/.claude/CLAUDE.md` and only the VGXNESS managed block is touched
63
63
 
64
64
  Malformed, duplicate, partial, or conflicting VGXNESS markers in `CLAUDE.md` cause the full Claude project install to be refused before `.mcp.json`, `.claude/agents/*.md`, or `CLAUDE.md` are mutated.
65
65
 
@@ -140,7 +140,7 @@ Writes happen only through `apply` with explicit consent. Plans, status, doctor,
140
140
 
141
141
  Adapters and renderers must not:
142
142
 
143
- - Write provider config outside explicit guarded apply. OpenCode install writes only its selected target; Claude project compatibility apply writes only `.mcp.json`, `.claude/agents/*.md`, and the guarded project-root `CLAUDE.md` managed block; Claude local/user MCP registration uses Claude CLI argv after confirmation/preflight and never manual private-config mutation.
143
+ - Write provider config outside explicit guarded apply. OpenCode install writes only its selected target; Claude project compatibility apply writes only `.mcp.json`, `.claude/agents/*.md`, and the guarded project-root `CLAUDE.md` managed block. Claude user/global apply narrowly merges `mcpServers.vgxness` in `~/.claude.json`, writes VGXNESS-owned `~/.claude/agents/*.md`, and manages only the VGXNESS block in `~/.claude/CLAUDE.md` after confirmation/preflight.
144
144
  - Call providers (`opencode`, `claude`, etc.) during preview or status.
145
145
  - Install global memory.
146
146
  - Create `openspec/`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vgxness",
3
- "version": "1.6.0",
3
+ "version": "1.8.0",
4
4
  "description": "CLI and MCP control plane for guided AI-agent workflows, SDD, memory, and OpenCode setup.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {