vectorforce 0.3.1 → 0.3.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 (3) hide show
  1. package/LICENSE +1 -1
  2. package/package.json +1 -2
  3. package/AGENTS.md +0 -115
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Learn With Ohm
3
+ Copyright (c) 2026 VectorForce (getvectorforce)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vectorforce",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Portable engineering context platform - Git for AI context",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -21,7 +21,6 @@
21
21
  "bin",
22
22
  "src",
23
23
  "studio/dist",
24
- "AGENTS.md",
25
24
  "CHANGELOG.md"
26
25
  ],
27
26
  "keywords": [
package/AGENTS.md DELETED
@@ -1,115 +0,0 @@
1
- # VectorForce Workspace Architecture & Agent Continuity Guide (`AGENTS.md`)
2
-
3
- This repository is the core workspace for **VectorForce** — a local-first, zero-dependency, privacy-preserving engineering context platform ("Git for AI Context") across **Google Antigravity**, **Meta Muse**, **Claude Code**, **Command Code**, and **OpenAI Codex**.
4
-
5
- ---
6
-
7
- ## 1. Context Protocol Workflow (Mandatory for All AI Agents)
8
-
9
- ### At the Start of a Task / Resuming Work:
10
- 1. **Discover active tasks:**
11
- - MCP: `list_tasks({ status: "active" })` | CLI: `node bin/vf.js tasks active`
12
- 2. **Check for workspace or document drift:**
13
- - MCP: `check_workspace_drift({ task_id: "<task_id>" })` | CLI: `node bin/vf.js drift --task <task_id>`
14
- 3. **Retrieve the authorized briefing:**
15
- - MCP: `get_resume_briefing({ task_id: "<task_id>", destination_harness: "antigravity" })` (`"antigravity" | "muse-code" | "command-code" | "codex"`)
16
- - CLI: `node bin/vf.js resume --task <task_id> --dest antigravity`
17
- 4. **Reason over the context (AI memory):**
18
- - MCP: `reason_about_task({ task_id: "<task_id>" })` | CLI: `node bin/vf.js reason --task <task_id>`
19
- 5. **Adhere to Invariant Constraints:** Respect all rules under `# Invariant Constraints` in the briefing.
20
-
21
- ### At the End of a Task Phase / Before Switching Harnesses:
22
- 1. **Capture an immutable checkpoint:**
23
- - MCP: `save_checkpoint({ task_id, summary, goals, constraints, decisions, next_steps, requested_documents })`
24
- - CLI:
25
- ```bash
26
- node bin/vf.js checkpoint --task <id> --summary "<summary>" \
27
- --goal "<goal>" --constraint "<constraint>" \
28
- --decision "<ID>:<Title>:<Rationale>" \
29
- --next "<next_step>" --doc "AGENTS.md"
30
- ```
31
- 2. **Verify Receipt:** Ensure the operation receipt returns `status: "committed"`.
32
-
33
- ---
34
-
35
- ## 2. Security & Policy Invariants
36
-
37
- - **Zero External Runtime Dependencies:** Core CLI, MCP server, and Studio backend use **only** Node.js built-ins (`node:sqlite`, `node:http`, `node:crypto`, `node:fs`, `node:child_process`).
38
- - **Claims vs Evidence Distinction:** Human/model inputs (`goals`, `constraints`, `decisions`, `next_steps`) are stored as unverifiable **`claims`**. Git commit SHAs, dirty states, and SHA-256 document digests are recorded as verifiable **`evidence`**.
39
- - **Strict Document Allowlist & Size Cap:** Only `.md`/`.txt` files in `node bin/vf.js policy list` (max `8 KiB` per file, `64 KiB` total) may be collected. `AGENTS.md` must stay `< 8192` bytes. Symlinks and path traversal (`..`) are strictly rejected.
40
- - **Safe Receipts:** Receipts and audit logs never contain raw document bodies or API credentials.
41
-
42
- ---
43
-
44
- ## 3. Workspace Directory & Module Map
45
-
46
- ```text
47
- VectorForce/
48
- ├── AGENTS.md # Workspace guide & agent protocol (< 8 KiB)
49
- ├── README.md # Public documentation & quickstart
50
- ├── package.json # Zero-dependency ESM package (Node >= 22.5.0)
51
- ├── bin/vf.js # Unified CLI (init, status, checkpoint, resume, reason, studio, mcp, handoff, config)
52
- ├── src/
53
- │ ├── index.js # Public programmatic SDK exports
54
- │ ├── core/ # errors.js, hash.js (SHA-256 / HMAC), types.js (schema validators)
55
- │ ├── policy/authorizer.js # Workspace containment, symlink rejection, allowlist & harness auth
56
- │ ├── storage/sqlite-store.js # Local SQLite WAL engine (.vectorforce/vectorforce.db)
57
- │ ├── providers/
58
- │ │ ├── code-index-provider.js # Zero-dep AST/symbol & dependency graph indexer
59
- │ │ ├── document-provider.js # Policy-enforced doc reader & SHA-256 evidence collector
60
- │ │ ├── git-provider.js # Git branch, HEAD SHA, dirty status, and file diff observer
61
- │ │ └── llm-provider.js # AI adapter (Fireworks, Muse, OpenRouter, Ollama, OpenAI, Anthropic, BYOK)
62
- │ ├── operations/
63
- │ │ ├── project-service.js # Project & task lifecycle + allowlist management
64
- │ │ ├── checkpoint-service.js # Immutable checkpoint creation + evidence collection
65
- │ │ ├── briefing-service.js # Cross-harness resume briefing + live Git/doc drift reconciliation
66
- │ │ ├── reasoning-service.js # AI reasoning synthesis over checkpoints + code index + drift
67
- │ │ └── handoff-service.js # HMAC-SHA256 signed handoff export/import + lineage verification
68
- │ ├── mcp/
69
- │ │ ├── mcp-server.js # JSON-RPC 2.0 stdio MCP server exposing 9 tools + 3 resources
70
- │ │ └── harness-config.js # Auto-generator for Antigravity, Claude, Command Code, Muse, Codex configs
71
- │ └── studio/server.js # Local HTTP server (127.0.0.1:3210) + REST API for VectorForce Studio
72
- ├── studio/ # React + Vite + Tailwind + XYFlow frontend for VectorForce Studio
73
- ├── samples/ # Runnable sample architectures, multi-agent workflows & integrations
74
- ├── scripts/practical-test-env.js # 7-stage cross-OS practical E2E simulation (Git + CLI + MCP + Handoff)
75
- ├── test/ # 75 automated unit, security, MCP, and cross-harness tests
76
- └── wiki/ # Local-only ADRs (001-014) and phase planning (gitignored)
77
- ```
78
-
79
- ### Generated Harness Configs in Workspace Root (`vf init`):
80
- - `.mcp.json`, `.commandcode/mcp.json`, `commandcode.json` — Claude Code & Command Code
81
- - `.agents/mcp_config.json`, `~/.gemini/antigravity/mcp_config.json` — Google Antigravity
82
- - `.muse/mcp_config.json`, `musecode.json` — Meta Muse
83
- - `.codex/config.toml`, `codex.json` — OpenAI Codex CLI
84
-
85
- ---
86
-
87
- ## 4. MCP Tools & AI Provider Reference
88
-
89
- | MCP Tool (`src/mcp/mcp-server.js`) | Service Method | Purpose |
90
- | :--- | :--- | :--- |
91
- | `list_tasks` | `ProjectService.listTasks` | Discover active/completed tasks |
92
- | `save_checkpoint` | `CheckpointService.saveCheckpoint` | Commit claims + Git/doc evidence to SQLite |
93
- | `get_resume_briefing` | `BriefingService.generateBriefing` | Deterministic cross-harness briefing |
94
- | `check_workspace_drift` | `BriefingService.checkWorkspaceDrift` | Compare live Git & doc hashes vs checkpoint |
95
- | `reason_about_task` | `ReasoningService.reasonAboutTask` | AI architectural briefing + risk analysis |
96
- | `set_document_policy` | `ProjectService.setDocumentPolicy` | Update workspace document allowlist |
97
- | `export_handoff` | `HandoffService.exportHandoff` | Export HMAC-SHA256 signed `.vfhandoff.json` |
98
- | `import_handoff` | `HandoffService.importHandoff` | Verify signature/hashes & import handoff |
99
- | `get_timeline` | `SqliteStore.getAuditEvents` | Inspect chronological audit trail |
100
-
101
- ### Supported AI Reasoning Providers (`src/providers/llm-provider.js`):
102
- 1. **Fireworks AI (`Muse Spark Open`)**: `vf config fireworks <KEY>` (`accounts/fireworks/models/muse-spark-open`)
103
- 2. **Meta Muse Direct**: `vf config muse <KEY>` (`muse-spark-1.3`)
104
- 3. **OpenRouter (`Muse Spark Open`)**: `vf config openrouter <KEY> --model meta/muse-spark-open`
105
- 4. **Local Ollama**: `vf config ollama --model llama3.3` (`http://127.0.0.1:11434`)
106
- 5. **OpenAI / Anthropic / BYOK**: `vf config openai <KEY>` | `vf config anthropic <KEY>` | `vf config byok <URL> <KEY> --model <ID>`
107
-
108
- ---
109
-
110
- ## 5. Extension Playbook (Samples & Production Upgrades)
111
-
112
- 1. **Adding Samples (`samples/`)**: Place runnable workflows, reference architectures, and multi-agent demos inside `samples/` using `src/index.js` or CLI/MCP bridges.
113
- 2. **Adding/Upgrading MCP Tools**: Add business logic in `src/operations/*`, persistence in `src/storage/sqlite-store.js`, MCP registration in `src/mcp/mcp-server.js`, SDK export in `src/index.js`, and CLI command in `bin/vf.js`.
114
- 3. **Upgrading Studio UI**: Add REST routes in `src/studio/server.js` and React views in `studio/src/components/`, then build via `npm --prefix studio run build`.
115
- 4. **Verification Gate**: Always run `npm test` (75 unit/security tests) and `npm run test:practical` (7-stage E2E test) before committing.