vgxness 1.5.1 → 1.5.2

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.
Files changed (42) hide show
  1. package/README.md +23 -2
  2. package/dist/agents/agent-seed-service.js +10 -0
  3. package/dist/agents/canonical-agent-manifest.js +177 -0
  4. package/dist/agents/canonical-agent-projection.js +146 -0
  5. package/dist/agents/renderers/claude-renderer.js +30 -52
  6. package/dist/cli/bun-bin.js +6 -0
  7. package/dist/cli/cli-help.js +3 -0
  8. package/dist/cli/commands/agent-skill-dispatcher.js +6 -5
  9. package/dist/cli/commands/mcp-dispatcher.js +65 -3
  10. package/dist/cli/index.js +1 -1
  11. package/dist/governance/governance-report-builder.js +45 -26
  12. package/dist/mcp/claude-code-agent-config.js +79 -0
  13. package/dist/mcp/claude-code-config.js +84 -0
  14. package/dist/mcp/client-install-claude-code-contract.js +86 -0
  15. package/dist/mcp/client-install-claude-code.js +85 -0
  16. package/dist/mcp/index.js +5 -0
  17. package/dist/mcp/opencode-default-agent-config.js +7 -113
  18. package/dist/mcp/provider-canonical-agent-manifest.js +39 -0
  19. package/dist/mcp/provider-change-plan.js +57 -1
  20. package/dist/mcp/provider-doctor.js +54 -0
  21. package/dist/mcp/provider-status.js +82 -2
  22. package/dist/mcp/schema.js +2 -2
  23. package/dist/mcp/validation.js +1 -1
  24. package/dist/memory/memory-service.js +4 -0
  25. package/dist/sdd/sdd-workflow-service.js +129 -59
  26. package/dist/setup/providers/claude-setup-adapter.js +7 -4
  27. package/docs/architecture.md +54 -112
  28. package/docs/cli.md +53 -0
  29. package/docs/code-runtime.md +218 -0
  30. package/docs/contributing.md +120 -0
  31. package/docs/glossary.md +211 -0
  32. package/docs/mcp.md +144 -0
  33. package/docs/prd.md +23 -26
  34. package/docs/providers.md +123 -0
  35. package/docs/roadmap.md +88 -0
  36. package/docs/safety.md +147 -0
  37. package/docs/storage.md +93 -0
  38. package/package.json +1 -1
  39. package/docs/funcionamiento-del-sistema.md +0 -865
  40. package/docs/harness-gap-analysis.md +0 -243
  41. package/docs/vgxcode.md +0 -87
  42. package/docs/vgxness-code.md +0 -48
@@ -0,0 +1,93 @@
1
+ # Storage
2
+
3
+ VGXNESS keeps all durable state in local SQLite. There is no required cloud account, no remote sync in v1.5.1, and no implicit sharing between scopes. Project data and personal/global data must not be collapsed into one scope.
4
+
5
+ ## Database location
6
+
7
+ The default is a per-user global database. The path is resolved by `resolveMemoryDatabasePath(...)` in `src/memory/storage-paths.ts` with this precedence:
8
+
9
+ 1. `--db <path>` flag (`source: 'flag'`).
10
+ 2. `VGXNESS_DB_PATH` env var (`source: 'environment'`).
11
+ 3. Global default (`source: 'global-default'`).
12
+
13
+ | Platform | Global default |
14
+ |---|---|
15
+ | macOS | `~/Library/Application Support/vgxness/memory.sqlite` |
16
+ | Linux | `${XDG_DATA_HOME:-~/.local/share}/vgxness/memory.sqlite` |
17
+ | Windows | `%LOCALAPPDATA%\\vgxness\\memory.sqlite` when available; otherwise `%APPDATA%\\vgxness\\memory.sqlite` |
18
+
19
+ If the global default cannot be resolved (for example, `HOME` is not set on Linux), the resolver returns a `store_unavailable` error rather than falling back to the current working directory. The fix is to pass `--db` or set `VGXNESS_DB_PATH`.
20
+
21
+ The parent directory is created on demand by `prepareMemoryDatabasePath(...)`. Existing project-local databases remain compatible; opt in explicitly when needed:
22
+
23
+ ```bash
24
+ vgxness memory search --project vgxness --db .vgx/memory.sqlite
25
+ ```
26
+
27
+ ## Runtime engine
28
+
29
+ Local SQLite storage is supported through `bun:sqlite`. Node.js is not the storage runtime; it remains development/build/test tooling. The release gate `bun run verify:bun-sqlite` proves SQLite readiness on a clean database by:
30
+
31
+ - Copying the source migrations into a temporary directory.
32
+ - Applying them against a temporary database.
33
+ - Checking foreign keys, busy timeout, FTS/search, transaction rollback, integrity, and cleanup.
34
+
35
+ ## Migration layout
36
+
37
+ SQL migrations live in `src/memory/sqlite/migrations/` and are applied in lexicographic order. The package build copies them into `dist/memory/sqlite/migrations` so installed bins can apply them on first use. The full list as of v1.5.1:
38
+
39
+ | # | File | Adds |
40
+ |---|---|---|
41
+ | 001 | `001_initial.sql` | Base memory observations table. |
42
+ | 002 | `002_observation_revisions.sql` | Observation revision history. |
43
+ | 003 | `003_agent_registry.sql` | Agent and subagent registry. |
44
+ | 004 | `004_run_runtime.sql` | Run records, events, checkpoints. |
45
+ | 005 | `005_run_approvals.sql` | Approval records linked to permission-decision events. |
46
+ | 006 | `006_run_operation_attempts.sql` | Reserved operation attempts. |
47
+ | 007 | `007_abandoned_operation_attempts.sql` | Recovery-only `abandoned` state. |
48
+ | 008 | `008_run_execution_plan_events.sql` | Execution isolation plan events. |
49
+ | 009 | `009_multiple_operation_attempts.sql` | Multiple ordered attempts per approval. |
50
+ | 010 | `010_skill_registry.sql` | Skill identity, versions, source metadata. |
51
+ | 011 | `011_skill_usage_resolution_outcomes.sql` | Skill usage records from resolution. |
52
+ | 012 | `012_skill_improvement_proposals.sql` | Versioned, reviewable skill proposals. |
53
+ | 013 | `013_skill_evaluation_scenarios.sql` | Skill evaluation harness. |
54
+ | 014 | `014_manager_profile_overlays.sql` | Manager profile overlays. |
55
+ | 015 | `015_artifact_metadata.sql` | Artifact metadata for SDD. |
56
+
57
+ ## Scopes
58
+
59
+ Two scopes share the database:
60
+
61
+ | Scope | Purpose |
62
+ |---|---|
63
+ | `project` | Repo-specific memory, SDD artifacts, run history, project agents/skills, project manager profile overlay. |
64
+ | `personal` | User preferences, reusable skills, cross-project patterns, personal manager profile overlay. |
65
+
66
+ Scopes are not stored in separate databases in v1.5.1; they are columns on the relevant tables. Code that wants to read or write a scope must pass it explicitly. Memory writes default to `project`; pass `scope: "personal"` for personal/global observations.
67
+
68
+ ## Tables and lifecycle
69
+
70
+ The schema follows a small set of conventions:
71
+
72
+ - **Memory observations** are immutable for content; updates create revisions tracked by `observation_revisions`. `topicKey` is the durable upsert key: re-saving with the same key updates the existing observation rather than creating a duplicate.
73
+ - **SDD artifacts** are stored under canonical topic keys `sdd/{change}/{phase}`. Acceptance is recorded separately on `SddArtifactAcceptanceRecord` and is not a content column.
74
+ - **Runs** are append-only in spirit. `RunRecord.status` transitions through the lifecycle described in [Safety model](./safety.md); `RunEvent` is the audit trail; `RunCheckpoint` is the resumable JSON state. Terminal runs cannot be finalized again, and the final `outcome` must match the terminal `status`.
75
+ - **Operation attempts** are reserved through `RunService.executeOperation(...)` and finalized in one transaction. `reserved` is exclusive; once finalized, a new attempt requires a fresh reservation and policy admission.
76
+ - **Skills** are versioned, with `currentVersionId` pointing at the active version. Skill improvement proposals do not mutate the active skill until `applySkillImprovementProposal(...)` is called on an `approved` proposal.
77
+ - **Manager profile overlays** are a thin layer over the canonical agent manifest; they record per-user/per-project model and prompt-contract preferences without mutating the built-in manifest.
78
+
79
+ ## Backup and recovery
80
+
81
+ There is no automatic backup of the SQLite database in v1.5.1. The recommended pattern is to treat the database file as a normal file in the user's data directory and use OS-level snapshots if needed.
82
+
83
+ Provider config (OpenCode) has its own backup/rollback path through `vgxness setup rollback --backup <path>`. That is separate from the database and is documented in the [CLI reference](./cli.md).
84
+
85
+ ## Wiping and migrating
86
+
87
+ To reset state for a project, point `--db` at a new path; do not delete a database file that another `vgxness` process might still be using. Migrations are forward-only and idempotent within a single database version. If a downgrade is required, restore the previous database file from a snapshot — VGXNESS does not support automatic down-migrations.
88
+
89
+ ## Safety
90
+
91
+ - The database file holds potentially sensitive content (memory observations, run transcripts, prompt excerpts). Treat it as you would any other local credential-bearing file. The redaction helpers in `src/code/reporting/redaction.ts` are applied at the prompt/report/checkpoint boundary, not at the storage boundary.
92
+ - `--db` accepts any path the calling user can write to. VGXNESS refuses to write through symlinks that escape the parent directory of the resolved path.
93
+ - `*.sqlite*`, `.vgx/`, and `.opencode/` are git-ignored.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vgxness",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
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": {