@vibecheckai/cli 3.7.0 → 3.9.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.
- package/README.md +135 -63
- package/bin/_deprecations.js +447 -19
- package/bin/_router.js +1 -1
- package/bin/registry.js +347 -280
- package/bin/runners/context/generators/cursor-enhanced.js +2439 -0
- package/bin/runners/lib/agent-firewall/enforcement/gateway.js +1059 -0
- package/bin/runners/lib/agent-firewall/enforcement/index.js +98 -0
- package/bin/runners/lib/agent-firewall/enforcement/mode.js +318 -0
- package/bin/runners/lib/agent-firewall/enforcement/orchestrator.js +484 -0
- package/bin/runners/lib/agent-firewall/enforcement/proof-artifact.js +418 -0
- package/bin/runners/lib/agent-firewall/enforcement/schemas/change-event.schema.json +173 -0
- package/bin/runners/lib/agent-firewall/enforcement/schemas/intent.schema.json +181 -0
- package/bin/runners/lib/agent-firewall/enforcement/schemas/verdict.schema.json +222 -0
- package/bin/runners/lib/agent-firewall/enforcement/verdict-v2.js +333 -0
- package/bin/runners/lib/agent-firewall/index.js +200 -0
- package/bin/runners/lib/agent-firewall/integration/index.js +20 -0
- package/bin/runners/lib/agent-firewall/integration/ship-gate.js +437 -0
- package/bin/runners/lib/agent-firewall/intent/alignment-engine.js +634 -0
- package/bin/runners/lib/agent-firewall/intent/auto-detect.js +426 -0
- package/bin/runners/lib/agent-firewall/intent/index.js +102 -0
- package/bin/runners/lib/agent-firewall/intent/schema.js +352 -0
- package/bin/runners/lib/agent-firewall/intent/store.js +283 -0
- package/bin/runners/lib/agent-firewall/interception/fs-interceptor.js +502 -0
- package/bin/runners/lib/agent-firewall/interception/index.js +23 -0
- package/bin/runners/lib/agent-firewall/interceptor/base.js +7 -3
- package/bin/runners/lib/agent-firewall/session/collector.js +451 -0
- package/bin/runners/lib/agent-firewall/session/index.js +26 -0
- package/bin/runners/lib/artifact-envelope.js +540 -0
- package/bin/runners/lib/auth-shared.js +977 -0
- package/bin/runners/lib/checkpoint.js +941 -0
- package/bin/runners/lib/cleanup/engine.js +571 -0
- package/bin/runners/lib/cleanup/index.js +53 -0
- package/bin/runners/lib/cleanup/output.js +375 -0
- package/bin/runners/lib/cleanup/rules.js +1060 -0
- package/bin/runners/lib/doctor/diagnosis-receipt.js +454 -0
- package/bin/runners/lib/doctor/failure-signatures.js +526 -0
- package/bin/runners/lib/doctor/fix-script.js +336 -0
- package/bin/runners/lib/doctor/modules/build-tools.js +453 -0
- package/bin/runners/lib/doctor/modules/index.js +62 -3
- package/bin/runners/lib/doctor/modules/os-quirks.js +706 -0
- package/bin/runners/lib/doctor/modules/repo-integrity.js +485 -0
- package/bin/runners/lib/doctor/safe-repair.js +384 -0
- package/bin/runners/lib/engine/ast-cache.js +210 -210
- package/bin/runners/lib/engine/auth-extractor.js +211 -211
- package/bin/runners/lib/engine/billing-extractor.js +112 -112
- package/bin/runners/lib/engine/enforcement-extractor.js +100 -100
- package/bin/runners/lib/engine/env-extractor.js +207 -207
- package/bin/runners/lib/engine/express-extractor.js +208 -208
- package/bin/runners/lib/engine/extractors.js +849 -849
- package/bin/runners/lib/engine/index.js +207 -207
- package/bin/runners/lib/engine/repo-index.js +514 -514
- package/bin/runners/lib/engine/types.js +124 -124
- package/bin/runners/lib/engines/attack-detector.js +1192 -0
- package/bin/runners/lib/entitlements-v2.js +2 -2
- package/bin/runners/lib/missions/briefing.js +427 -0
- package/bin/runners/lib/missions/checkpoint.js +753 -0
- package/bin/runners/lib/missions/hardening.js +851 -0
- package/bin/runners/lib/missions/plan.js +421 -32
- package/bin/runners/lib/missions/safety-gates.js +645 -0
- package/bin/runners/lib/missions/schema.js +478 -0
- package/bin/runners/lib/packs/bundle.js +675 -0
- package/bin/runners/lib/packs/evidence-pack.js +671 -0
- package/bin/runners/lib/packs/pack-factory.js +837 -0
- package/bin/runners/lib/packs/permissions-pack.js +686 -0
- package/bin/runners/lib/packs/proof-graph-pack.js +779 -0
- package/bin/runners/lib/safelist/index.js +96 -0
- package/bin/runners/lib/safelist/integration.js +334 -0
- package/bin/runners/lib/safelist/matcher.js +696 -0
- package/bin/runners/lib/safelist/schema.js +948 -0
- package/bin/runners/lib/safelist/store.js +438 -0
- package/bin/runners/lib/schemas/ship-manifest.schema.json +251 -0
- package/bin/runners/lib/ship-gate.js +832 -0
- package/bin/runners/lib/ship-manifest.js +1153 -0
- package/bin/runners/lib/ship-output.js +1 -1
- package/bin/runners/lib/unified-cli-output.js +710 -383
- package/bin/runners/lib/upsell.js +3 -3
- package/bin/runners/lib/why-tree.js +650 -0
- package/bin/runners/runAllowlist.js +33 -4
- package/bin/runners/runApprove.js +240 -1122
- package/bin/runners/runAudit.js +692 -0
- package/bin/runners/runAuth.js +325 -29
- package/bin/runners/runCheckpoint.js +442 -494
- package/bin/runners/runCleanup.js +343 -0
- package/bin/runners/runDoctor.js +269 -19
- package/bin/runners/runFix.js +411 -32
- package/bin/runners/runForge.js +411 -0
- package/bin/runners/runIntent.js +906 -0
- package/bin/runners/runKickoff.js +878 -0
- package/bin/runners/runLaunch.js +2000 -0
- package/bin/runners/runLink.js +785 -0
- package/bin/runners/runMcp.js +1741 -837
- package/bin/runners/runPacks.js +2089 -0
- package/bin/runners/runPolish.js +41 -0
- package/bin/runners/runReality.js +178 -1
- package/bin/runners/runSafelist.js +1190 -0
- package/bin/runners/runScan.js +21 -9
- package/bin/runners/runShield.js +1282 -0
- package/bin/runners/runShip.js +395 -16
- package/bin/vibecheck.js +34 -6
- package/mcp-server/README.md +117 -158
- package/mcp-server/handlers/index.ts +2 -2
- package/mcp-server/handlers/tool-handler.ts +50 -11
- package/mcp-server/index.js +16 -0
- package/mcp-server/intent-firewall-interceptor.js +529 -0
- package/mcp-server/lib/executor.ts +5 -5
- package/mcp-server/lib/index.ts +14 -4
- package/mcp-server/lib/sandbox.test.ts +4 -4
- package/mcp-server/lib/sandbox.ts +2 -2
- package/mcp-server/manifest.json +473 -0
- package/mcp-server/package.json +1 -1
- package/mcp-server/registry/tool-registry.js +315 -523
- package/mcp-server/registry/tools.json +442 -428
- package/mcp-server/registry.test.ts +18 -12
- package/mcp-server/tier-auth.js +68 -11
- package/mcp-server/tools-v3.js +70 -16
- package/mcp-server/tsconfig.json +1 -0
- package/package.json +2 -1
- package/bin/runners/runProof.zip +0 -0
package/mcp-server/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# vibecheck MCP Server
|
|
1
|
+
# vibecheck MCP Server v4.0
|
|
2
2
|
|
|
3
3
|
Professional Model Context Protocol server for vibecheck AI.
|
|
4
4
|
|
|
@@ -7,12 +7,25 @@ Professional Model Context Protocol server for vibecheck AI.
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install -g
|
|
10
|
+
npm install -g @vibecheckai/cli
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Configuration
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Add to your AI IDE's MCP configuration:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": {
|
|
20
|
+
"vibecheck": {
|
|
21
|
+
"command": "npx",
|
|
22
|
+
"args": ["@vibecheckai/cli", "mcp"]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
See [MCP-QUICK-START.md](../docs/MCP-QUICK-START.md) for editor-specific setup.
|
|
16
29
|
|
|
17
30
|
## Development
|
|
18
31
|
|
|
@@ -22,231 +35,177 @@ npm install
|
|
|
22
35
|
npm start
|
|
23
36
|
```
|
|
24
37
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
These tools provide a top-notch, zero-friction UX:
|
|
38
|
+
---
|
|
28
39
|
|
|
29
|
-
|
|
30
|
-
- `run_ship` - vibecheck: Ship Check (GO/NO-GO)
|
|
31
|
-
- `run_reality` - vibecheck: Run Reality Mode
|
|
32
|
-
- `run_mockproof` - vibecheck: Run MockProof Gate
|
|
33
|
-
- `run_airlock` - vibecheck: Run Airlock (SupplyChain)
|
|
40
|
+
## Core MCP Tools (v4.0)
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
- `get_last_run` - vibecheck: Open Last Run Report
|
|
37
|
-
- `open_artifact` - Open Report/Replay/Trace/SARIF/Badge
|
|
38
|
-
- `rerun_last_check` - vibecheck: Re-run Last Check
|
|
39
|
-
- `export_sarif` - Export findings as SARIF
|
|
42
|
+
These are the primary tools available via MCP:
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
| Tool | Description |
|
|
45
|
+
|------|-------------|
|
|
46
|
+
| `vibecheck_audit` | 🔍 Static analysis - routes, secrets, contracts |
|
|
47
|
+
| `vibecheck_ship` | 🚀 Verdict engine - SHIP / WARN / BLOCK |
|
|
48
|
+
| `vibecheck_prove` | 🔬 Full proof loop: audit → reality → ship |
|
|
49
|
+
| `vibecheck_fix` | 🛠️ Mission-based auto-fix with safety gates |
|
|
50
|
+
| `vibecheck_reality` | 🧪 Browser-based runtime verification |
|
|
51
|
+
| `vibecheck_forge` | 📝 Generate AI IDE rules (.cursorrules, .windsurf) |
|
|
52
|
+
| `vibecheck_shield` | 🛡️ Agent Firewall controls |
|
|
53
|
+
| `vibecheck_doctor` | 🏥 Environment health check |
|
|
54
|
+
| `vibecheck_checkpoint` | 📍 Snapshot & restore, baseline comparison |
|
|
55
|
+
| `vibecheck_polish` | ✨ Production polish - final cleanup |
|
|
52
56
|
|
|
53
|
-
|
|
54
|
-
- `explain_finding` - Get detailed finding explanation
|
|
57
|
+
---
|
|
55
58
|
|
|
56
|
-
##
|
|
59
|
+
## Shield (Agent Firewall) Tools
|
|
57
60
|
|
|
58
|
-
|
|
61
|
+
Control the Agent Firewall via MCP:
|
|
59
62
|
|
|
60
63
|
| Tool | Description |
|
|
61
64
|
|------|-------------|
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `vibecheck.coverage` | 🧪 Test coverage mapping - identify untested components |
|
|
65
|
+
| `vibecheck_shield_status` | Get firewall status |
|
|
66
|
+
| `vibecheck_shield_enforce` | Enable enforcement mode |
|
|
67
|
+
| `vibecheck_shield_observe` | Enable observe-only mode |
|
|
68
|
+
| `vibecheck_shield_lock` | Hard lockdown (all rules enforced) |
|
|
69
|
+
| `vibecheck_shield_unlock` | Release lock |
|
|
70
|
+
| `vibecheck_shield_verify` | Verify claims/prompts |
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
---
|
|
71
73
|
|
|
72
|
-
|
|
73
|
-
// Verify AI-generated code before applying
|
|
74
|
-
{
|
|
75
|
-
"tool": "vibecheck.verify",
|
|
76
|
-
"arguments": {
|
|
77
|
-
"input": "{\"format\":\"vibecheck-v1\",\"diff\":\"...\",\"commands\":[]}",
|
|
78
|
-
"mode": "build"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
74
|
+
## Intent & Approval Tools
|
|
81
75
|
|
|
82
|
-
|
|
83
|
-
{
|
|
84
|
-
"tool": "vibecheck.quality",
|
|
85
|
-
"arguments": {
|
|
86
|
-
"projectPath": ".",
|
|
87
|
-
"threshold": 70
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// Detect code smells
|
|
92
|
-
{
|
|
93
|
-
"tool": "vibecheck.smells",
|
|
94
|
-
"arguments": {
|
|
95
|
-
"projectPath": ".",
|
|
96
|
-
"severity": "high"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Agent Checkpoint Tools
|
|
102
|
-
|
|
103
|
-
Pre-write validation that blocks AI agents until issues are fixed:
|
|
76
|
+
For declaring AI intent and approving changes:
|
|
104
77
|
|
|
105
78
|
| Tool | Description |
|
|
106
79
|
|------|-------------|
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
80
|
+
| `vibecheck_intent_start` | 🎯 Declare intent before making changes |
|
|
81
|
+
| `vibecheck_intent_check` | ✅ Check if changes align with stated intent |
|
|
82
|
+
| `vibecheck_intent_complete` | ✅ Complete step and generate proof artifact |
|
|
83
|
+
| `vibecheck_approve` | 👍 Review and approve session changes |
|
|
84
|
+
|
|
85
|
+
---
|
|
110
86
|
|
|
111
|
-
##
|
|
87
|
+
## Checkpoint Tools
|
|
112
88
|
|
|
113
|
-
|
|
89
|
+
Pre-write validation and time machine:
|
|
114
90
|
|
|
115
91
|
| Tool | Description |
|
|
116
92
|
|------|-------------|
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
93
|
+
| `vibecheck_checkpoint` | 🛡️ Validate code before writing - blocks on issues |
|
|
94
|
+
| `vibecheck_checkpoint_status` | 📊 Get current checkpoint status |
|
|
95
|
+
| `vibecheck_checkpoint_restore` | ⏪ Restore to a previous checkpoint |
|
|
96
|
+
| `vibecheck_checkpoint_compare` | 📈 Compare baseline vs current |
|
|
97
|
+
|
|
98
|
+
---
|
|
121
99
|
|
|
122
|
-
##
|
|
100
|
+
## Report & Artifact Tools
|
|
123
101
|
|
|
124
|
-
|
|
102
|
+
Generate outputs and evidence:
|
|
125
103
|
|
|
126
104
|
| Tool | Description |
|
|
127
105
|
|------|-------------|
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
106
|
+
| `vibecheck_packs_evidence` | 📦 Bundle videos, traces, screenshots |
|
|
107
|
+
| `vibecheck_packs_report` | 📄 Generate HTML/MD/SARIF reports |
|
|
108
|
+
| `vibecheck_packs_graph` | 📊 Proof graph visualization |
|
|
109
|
+
| `vibecheck_seal` | 🏆 Generate ship badge and attestation |
|
|
132
110
|
|
|
133
|
-
|
|
111
|
+
---
|
|
134
112
|
|
|
135
|
-
|
|
113
|
+
## Example Usage
|
|
136
114
|
|
|
137
|
-
|
|
138
|
-
|------|-------------|
|
|
139
|
-
| `checkpoint` | 🛡️ Block AI agents until issues are fixed (pre/post write) |
|
|
140
|
-
| `check` | 🔍 Verify code is real, wired, honest |
|
|
141
|
-
| `ship` | 🚀 Go/No-Go decision (GO / WARN / NO-GO) |
|
|
142
|
-
| `fix` | 🔧 Fix blocking issues safely |
|
|
143
|
-
| `status` | 📊 Health + version info |
|
|
144
|
-
| `set_strictness` | ⚙️ Set checkpoint strictness level |
|
|
115
|
+
### Run Analysis
|
|
145
116
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"tool": "vibecheck_audit",
|
|
120
|
+
"arguments": {
|
|
121
|
+
"path": ".",
|
|
122
|
+
"profile": "full"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
149
126
|
|
|
150
|
-
|
|
151
|
-
|------|-------------|
|
|
152
|
-
| `vibecheck_intent_start` | 🎯 Start a new step with explicit intent |
|
|
153
|
-
| `vibecheck_intent_check` | ✅ Check if code changes align with stated intent |
|
|
154
|
-
| `vibecheck_intent_validate_prompt` | 🔒 Validate new prompts against locked intent |
|
|
155
|
-
| `vibecheck_intent_status` | 📊 Get current Intent Drift Guard status |
|
|
156
|
-
| `vibecheck_intent_complete` | ✅ Complete step and generate proof artifact |
|
|
157
|
-
| `vibecheck_intent_lock` | 🔒 Lock intent to prevent scope expansion |
|
|
158
|
-
| `vibecheck_intent_unlock` | 🔓 Unlock intent, allow scope changes |
|
|
127
|
+
### Get Ship Verdict
|
|
159
128
|
|
|
160
|
-
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"tool": "vibecheck_ship",
|
|
132
|
+
"arguments": {
|
|
133
|
+
"path": "."
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
161
137
|
|
|
162
|
-
|
|
138
|
+
### Full Proof Loop
|
|
163
139
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"tool": "vibecheck_prove",
|
|
143
|
+
"arguments": {
|
|
144
|
+
"url": "http://localhost:3000",
|
|
145
|
+
"maxFixRounds": 3
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
170
149
|
|
|
171
|
-
###
|
|
150
|
+
### Runtime Verification
|
|
172
151
|
|
|
173
152
|
```json
|
|
174
153
|
{
|
|
175
|
-
"tool": "
|
|
154
|
+
"tool": "vibecheck_reality",
|
|
176
155
|
"arguments": {
|
|
177
156
|
"url": "http://localhost:3000",
|
|
178
|
-
"verifyAuth": true,
|
|
179
|
-
"auth": "user@example.com:password",
|
|
180
|
-
"storageState": ".vibecheck/reality/storageState.json",
|
|
181
|
-
"truthpack": ".vibecheck/truth/truthpack.json",
|
|
182
157
|
"headed": false,
|
|
183
158
|
"maxPages": 18,
|
|
184
|
-
"maxDepth": 2
|
|
185
|
-
"danger": false
|
|
159
|
+
"maxDepth": 2
|
|
186
160
|
}
|
|
187
161
|
}
|
|
188
162
|
```
|
|
189
163
|
|
|
190
|
-
###
|
|
164
|
+
### AI-Powered Fixes
|
|
191
165
|
|
|
192
166
|
```json
|
|
193
167
|
{
|
|
194
|
-
"tool": "
|
|
168
|
+
"tool": "vibecheck_fix",
|
|
195
169
|
"arguments": {
|
|
196
|
-
"promptOnly": false,
|
|
197
170
|
"apply": true,
|
|
198
|
-
"autopilot":
|
|
199
|
-
"
|
|
200
|
-
"maxMissions": 8,
|
|
201
|
-
"maxSteps": 10
|
|
171
|
+
"autopilot": false,
|
|
172
|
+
"maxMissions": 8
|
|
202
173
|
}
|
|
203
174
|
}
|
|
204
175
|
```
|
|
205
176
|
|
|
206
|
-
###
|
|
177
|
+
### Generate IDE Rules
|
|
207
178
|
|
|
208
179
|
```json
|
|
209
180
|
{
|
|
210
|
-
"tool": "
|
|
181
|
+
"tool": "vibecheck_forge",
|
|
211
182
|
"arguments": {
|
|
212
|
-
"
|
|
213
|
-
"
|
|
214
|
-
"maxFixRounds": 3,
|
|
215
|
-
"skipReality": false,
|
|
216
|
-
"skipFix": false
|
|
183
|
+
"format": "cursor",
|
|
184
|
+
"enhanced": true
|
|
217
185
|
}
|
|
218
186
|
}
|
|
219
187
|
```
|
|
220
188
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
- `validate_project` - Validate project structure and API endpoints
|
|
224
|
-
- `check_design_system` - Validate design system consistency
|
|
225
|
-
- `check_project_drift` - Check for architecture drift
|
|
226
|
-
- `setup_design_system` - Set up and lock design system
|
|
227
|
-
- `register_api_endpoint` - Register API endpoint
|
|
228
|
-
- `get_project_health` - Get project health score
|
|
229
|
-
- `get_vibechecks_rules` - Get vibechecks rules
|
|
230
|
-
- `architect_analyze` - Intelligent project analysis
|
|
231
|
-
- `build_knowledge_base` - Build codebase knowledge
|
|
232
|
-
- `semantic_search` - Search code by meaning
|
|
233
|
-
- `security_scan` - Full security scan
|
|
234
|
-
- `ship_check` - Ship readiness check
|
|
235
|
-
- `get_deploy_verdict` - Get deploy GO/NO-GO decision
|
|
189
|
+
---
|
|
236
190
|
|
|
237
191
|
## Resources
|
|
238
192
|
|
|
239
|
-
- `
|
|
240
|
-
- `
|
|
241
|
-
- `
|
|
193
|
+
- `vibecheck://rules` - Generated AI rules
|
|
194
|
+
- `vibecheck://truthpack` - Repo reality index
|
|
195
|
+
- `vibecheck://status` - Server status and health
|
|
196
|
+
|
|
197
|
+
---
|
|
242
198
|
|
|
243
199
|
## Documentation
|
|
244
200
|
|
|
245
|
-
|
|
201
|
+
- [MCP Quick Start](../docs/MCP-QUICK-START.md)
|
|
202
|
+
- [Full CLI Documentation](../docs/CLI-REFERENCE.md)
|
|
203
|
+
- [Agent Firewall Spec](../docs/AGENT_FIREWALL_V2_SPEC.md)
|
|
204
|
+
|
|
205
|
+
---
|
|
246
206
|
|
|
247
207
|
## Privacy & Trust
|
|
248
208
|
|
|
249
209
|
- Runs locally
|
|
250
210
|
- Artifacts saved to `.vibecheck/`
|
|
251
|
-
- No upload unless you export/share
|
|
252
|
-
|
|
211
|
+
- No upload unless you explicitly export/share
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
* 7) Return response with error envelope
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import * as fs from "fs";
|
|
17
|
-
import * as path from "path";
|
|
16
|
+
import * as fs from "node:fs";
|
|
17
|
+
import * as path from "node:path";
|
|
18
|
+
import { fileURLToPath } from "node:url";
|
|
18
19
|
import Ajv from "ajv";
|
|
19
20
|
import type {
|
|
20
21
|
RunRequest,
|
|
@@ -25,9 +26,46 @@ import type {
|
|
|
25
26
|
ToolResult,
|
|
26
27
|
ValidationError,
|
|
27
28
|
Finding,
|
|
28
|
-
} from "../lib/types";
|
|
29
|
-
import {
|
|
30
|
-
import { CliExecutor, parseCliOutput, sortFindings, buildCliArgs } from "../lib/executor";
|
|
29
|
+
} from "../lib/types.js";
|
|
30
|
+
import { resolveSandboxPath, configFromRunRequest, type SandboxConfig } from "../lib/sandbox.js";
|
|
31
|
+
import { CliExecutor, parseCliOutput, sortFindings, buildCliArgs } from "../lib/executor.js";
|
|
32
|
+
|
|
33
|
+
// ESM __dirname equivalent
|
|
34
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
35
|
+
const __dirname = path.dirname(__filename);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Simple PathSandbox wrapper class using the sandbox functions
|
|
39
|
+
*/
|
|
40
|
+
class PathSandbox {
|
|
41
|
+
private config: SandboxConfig;
|
|
42
|
+
|
|
43
|
+
constructor(options: { projectRoot: string }) {
|
|
44
|
+
this.config = {
|
|
45
|
+
workspaceRoot: options.projectRoot,
|
|
46
|
+
includeThirdParty: false,
|
|
47
|
+
includeGenerated: false,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
assertAllowed(inputPath: string): string {
|
|
52
|
+
const result = resolveSandboxPath(inputPath, this.config);
|
|
53
|
+
if (!result.valid) {
|
|
54
|
+
const error = new Error(result.error || "Path not allowed") as Error & { violationType?: string };
|
|
55
|
+
error.violationType = result.errorCode;
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
return result.resolvedPath!;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
validate(inputPath: string): { allowed: boolean; error?: string } {
|
|
62
|
+
const result = resolveSandboxPath(inputPath, this.config);
|
|
63
|
+
return {
|
|
64
|
+
allowed: result.valid,
|
|
65
|
+
error: result.error,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
31
69
|
|
|
32
70
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
33
71
|
// REGISTRY
|
|
@@ -78,7 +116,8 @@ function getToolDefinition(toolName: string): ToolDefinition | null {
|
|
|
78
116
|
// VALIDATION
|
|
79
117
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
80
118
|
|
|
81
|
-
const
|
|
119
|
+
const AjvClass = Ajv.default || Ajv;
|
|
120
|
+
const ajv = new AjvClass({ allErrors: true, strict: false });
|
|
82
121
|
|
|
83
122
|
/**
|
|
84
123
|
* Validate data against JSON schema
|
|
@@ -86,14 +125,14 @@ const ajv = new Ajv({ allErrors: true, strict: false });
|
|
|
86
125
|
function validateSchema(
|
|
87
126
|
data: unknown,
|
|
88
127
|
schema: unknown,
|
|
89
|
-
|
|
128
|
+
_schemaName: string
|
|
90
129
|
): ValidationError[] {
|
|
91
130
|
const validate = ajv.compile(schema as object);
|
|
92
131
|
const valid = validate(data);
|
|
93
132
|
|
|
94
133
|
if (valid) return [];
|
|
95
134
|
|
|
96
|
-
return (validate.errors || []).map((err) => ({
|
|
135
|
+
return (validate.errors || []).map((err: { instancePath?: string; message?: string; params?: { allowedValues?: string[] }; data?: unknown }) => ({
|
|
97
136
|
path: err.instancePath || "/",
|
|
98
137
|
message: err.message || "Validation failed",
|
|
99
138
|
expected: err.params?.allowedValues?.join(", "),
|
|
@@ -117,17 +156,17 @@ const ERROR_NEXT_STEPS: Record<ErrorCode, string[]> = {
|
|
|
117
156
|
"List available tools with the registry",
|
|
118
157
|
],
|
|
119
158
|
TIER_REQUIRED: [
|
|
120
|
-
"This tool requires a Pro subscription ($
|
|
159
|
+
"This tool requires a Pro subscription ($49/mo)",
|
|
121
160
|
"Upgrade at https://vibecheckai.dev/pricing",
|
|
122
161
|
"Some tools have free alternatives",
|
|
123
162
|
],
|
|
124
163
|
NOT_ENTITLED: [
|
|
125
|
-
"This tool requires a Pro subscription ($
|
|
164
|
+
"This tool requires a Pro subscription ($49/mo)",
|
|
126
165
|
"Upgrade at https://vibecheckai.dev/pricing",
|
|
127
166
|
"Run: vibecheck upgrade",
|
|
128
167
|
],
|
|
129
168
|
OPTION_NOT_ENTITLED: [
|
|
130
|
-
"This option requires a Pro subscription ($
|
|
169
|
+
"This option requires a Pro subscription ($49/mo)",
|
|
131
170
|
"The base tool is available on FREE tier",
|
|
132
171
|
"Upgrade at https://vibecheckai.dev/pricing",
|
|
133
172
|
],
|
package/mcp-server/index.js
CHANGED
|
@@ -553,6 +553,14 @@ import {
|
|
|
553
553
|
handleAgentFirewallIntercept,
|
|
554
554
|
} from "./agent-firewall-interceptor.js";
|
|
555
555
|
|
|
556
|
+
// Import Intent-Aware Firewall v2 - BLOCKING enforcement with intent alignment
|
|
557
|
+
import {
|
|
558
|
+
INTENT_FIREWALL_TOOL,
|
|
559
|
+
handleIntentFirewallIntercept,
|
|
560
|
+
INTENT_STATUS_TOOL,
|
|
561
|
+
handleIntentStatus,
|
|
562
|
+
} from "./intent-firewall-interceptor.js";
|
|
563
|
+
|
|
556
564
|
// Import Conductor tools - Multi-Agent Coordination (Phase 2)
|
|
557
565
|
import {
|
|
558
566
|
CONDUCTOR_TOOLS,
|
|
@@ -717,6 +725,14 @@ class VibecheckMCP {
|
|
|
717
725
|
addHandler("vibecheck_agent_firewall_intercept", handleAgentFirewallIntercept);
|
|
718
726
|
}
|
|
719
727
|
|
|
728
|
+
// Intent-Aware Firewall v2 - blocking enforcement with intent alignment
|
|
729
|
+
if (handleIntentFirewallIntercept && typeof handleIntentFirewallIntercept === 'function') {
|
|
730
|
+
addHandler("vibecheck_intent_firewall_intercept", handleIntentFirewallIntercept);
|
|
731
|
+
}
|
|
732
|
+
if (handleIntentStatus && typeof handleIntentStatus === 'function') {
|
|
733
|
+
addHandler("vibecheck_intent_status", handleIntentStatus);
|
|
734
|
+
}
|
|
735
|
+
|
|
720
736
|
// Conductor - multi-agent coordination tools
|
|
721
737
|
addHandler("vibecheck_conductor_register", (projectPath, args) => handleConductorToolCall("vibecheck_conductor_register", args, projectPath));
|
|
722
738
|
addHandler("vibecheck_conductor_acquire_lock", (projectPath, args) => handleConductorToolCall("vibecheck_conductor_acquire_lock", args, projectPath));
|