@vibecheckai/cli 3.7.0 → 3.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.
Files changed (99) hide show
  1. package/README.md +135 -63
  2. package/bin/_deprecations.js +447 -19
  3. package/bin/_router.js +1 -1
  4. package/bin/registry.js +347 -280
  5. package/bin/runners/context/generators/cursor-enhanced.js +2439 -0
  6. package/bin/runners/lib/agent-firewall/enforcement/gateway.js +1059 -0
  7. package/bin/runners/lib/agent-firewall/enforcement/index.js +98 -0
  8. package/bin/runners/lib/agent-firewall/enforcement/mode.js +318 -0
  9. package/bin/runners/lib/agent-firewall/enforcement/orchestrator.js +484 -0
  10. package/bin/runners/lib/agent-firewall/enforcement/proof-artifact.js +418 -0
  11. package/bin/runners/lib/agent-firewall/enforcement/schemas/change-event.schema.json +173 -0
  12. package/bin/runners/lib/agent-firewall/enforcement/schemas/intent.schema.json +181 -0
  13. package/bin/runners/lib/agent-firewall/enforcement/schemas/verdict.schema.json +222 -0
  14. package/bin/runners/lib/agent-firewall/enforcement/verdict-v2.js +333 -0
  15. package/bin/runners/lib/agent-firewall/index.js +200 -0
  16. package/bin/runners/lib/agent-firewall/integration/index.js +20 -0
  17. package/bin/runners/lib/agent-firewall/integration/ship-gate.js +437 -0
  18. package/bin/runners/lib/agent-firewall/intent/alignment-engine.js +622 -0
  19. package/bin/runners/lib/agent-firewall/intent/auto-detect.js +426 -0
  20. package/bin/runners/lib/agent-firewall/intent/index.js +102 -0
  21. package/bin/runners/lib/agent-firewall/intent/schema.js +352 -0
  22. package/bin/runners/lib/agent-firewall/intent/store.js +283 -0
  23. package/bin/runners/lib/agent-firewall/interception/fs-interceptor.js +502 -0
  24. package/bin/runners/lib/agent-firewall/interception/index.js +23 -0
  25. package/bin/runners/lib/agent-firewall/session/collector.js +451 -0
  26. package/bin/runners/lib/agent-firewall/session/index.js +26 -0
  27. package/bin/runners/lib/artifact-envelope.js +540 -0
  28. package/bin/runners/lib/auth-shared.js +977 -0
  29. package/bin/runners/lib/checkpoint.js +941 -0
  30. package/bin/runners/lib/cleanup/engine.js +571 -0
  31. package/bin/runners/lib/cleanup/index.js +53 -0
  32. package/bin/runners/lib/cleanup/output.js +375 -0
  33. package/bin/runners/lib/cleanup/rules.js +1060 -0
  34. package/bin/runners/lib/doctor/diagnosis-receipt.js +454 -0
  35. package/bin/runners/lib/doctor/failure-signatures.js +526 -0
  36. package/bin/runners/lib/doctor/fix-script.js +336 -0
  37. package/bin/runners/lib/doctor/modules/build-tools.js +453 -0
  38. package/bin/runners/lib/doctor/modules/index.js +62 -3
  39. package/bin/runners/lib/doctor/modules/os-quirks.js +706 -0
  40. package/bin/runners/lib/doctor/modules/repo-integrity.js +485 -0
  41. package/bin/runners/lib/doctor/safe-repair.js +384 -0
  42. package/bin/runners/lib/engines/attack-detector.js +1192 -0
  43. package/bin/runners/lib/entitlements-v2.js +2 -2
  44. package/bin/runners/lib/missions/briefing.js +427 -0
  45. package/bin/runners/lib/missions/checkpoint.js +753 -0
  46. package/bin/runners/lib/missions/hardening.js +851 -0
  47. package/bin/runners/lib/missions/plan.js +421 -32
  48. package/bin/runners/lib/missions/safety-gates.js +645 -0
  49. package/bin/runners/lib/missions/schema.js +478 -0
  50. package/bin/runners/lib/packs/bundle.js +675 -0
  51. package/bin/runners/lib/packs/evidence-pack.js +671 -0
  52. package/bin/runners/lib/packs/pack-factory.js +837 -0
  53. package/bin/runners/lib/packs/permissions-pack.js +686 -0
  54. package/bin/runners/lib/packs/proof-graph-pack.js +779 -0
  55. package/bin/runners/lib/safelist/index.js +96 -0
  56. package/bin/runners/lib/safelist/integration.js +334 -0
  57. package/bin/runners/lib/safelist/matcher.js +696 -0
  58. package/bin/runners/lib/safelist/schema.js +948 -0
  59. package/bin/runners/lib/safelist/store.js +438 -0
  60. package/bin/runners/lib/schemas/ship-manifest.schema.json +251 -0
  61. package/bin/runners/lib/ship-gate.js +832 -0
  62. package/bin/runners/lib/ship-manifest.js +1153 -0
  63. package/bin/runners/lib/ship-output.js +1 -1
  64. package/bin/runners/lib/unified-cli-output.js +710 -383
  65. package/bin/runners/lib/upsell.js +3 -3
  66. package/bin/runners/lib/why-tree.js +650 -0
  67. package/bin/runners/runAllowlist.js +33 -4
  68. package/bin/runners/runApprove.js +240 -1122
  69. package/bin/runners/runAudit.js +692 -0
  70. package/bin/runners/runAuth.js +325 -29
  71. package/bin/runners/runCheckpoint.js +442 -494
  72. package/bin/runners/runCleanup.js +343 -0
  73. package/bin/runners/runDoctor.js +269 -19
  74. package/bin/runners/runFix.js +411 -32
  75. package/bin/runners/runForge.js +411 -0
  76. package/bin/runners/runIntent.js +906 -0
  77. package/bin/runners/runKickoff.js +878 -0
  78. package/bin/runners/runLaunch.js +2000 -0
  79. package/bin/runners/runLink.js +785 -0
  80. package/bin/runners/runMcp.js +1741 -837
  81. package/bin/runners/runPacks.js +2089 -0
  82. package/bin/runners/runPolish.js +41 -0
  83. package/bin/runners/runSafelist.js +1190 -0
  84. package/bin/runners/runScan.js +21 -9
  85. package/bin/runners/runShield.js +1282 -0
  86. package/bin/runners/runShip.js +395 -16
  87. package/bin/vibecheck.js +34 -6
  88. package/mcp-server/README.md +117 -158
  89. package/mcp-server/handlers/tool-handler.ts +3 -3
  90. package/mcp-server/index.js +16 -0
  91. package/mcp-server/intent-firewall-interceptor.js +529 -0
  92. package/mcp-server/manifest.json +473 -0
  93. package/mcp-server/package.json +1 -1
  94. package/mcp-server/registry/tool-registry.js +315 -523
  95. package/mcp-server/registry/tools.json +442 -428
  96. package/mcp-server/tier-auth.js +68 -11
  97. package/mcp-server/tools-v3.js +70 -16
  98. package/package.json +1 -1
  99. package/bin/runners/runProof.zip +0 -0
@@ -0,0 +1,181 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://vibecheckai.dev/schemas/intent/v3",
4
+ "title": "Agent Firewall Intent Schema v3",
5
+ "description": "User-declared intent that constrains AI agent behavior. Immutable once created.",
6
+ "type": "object",
7
+ "required": ["summary", "constraints", "created_at", "hash", "version"],
8
+ "properties": {
9
+ "summary": {
10
+ "type": "string",
11
+ "description": "Human-written summary of intended change (10-500 chars)",
12
+ "minLength": 10,
13
+ "maxLength": 500
14
+ },
15
+ "constraints": {
16
+ "type": "array",
17
+ "description": "Hard constraints that MUST be respected. Violations = BLOCK.",
18
+ "items": {
19
+ "type": "string",
20
+ "minLength": 5
21
+ },
22
+ "minItems": 0
23
+ },
24
+ "allowed_changes": {
25
+ "type": "array",
26
+ "description": "Explicit whitelist of allowed modifications",
27
+ "items": {
28
+ "$ref": "#/definitions/AllowedChange"
29
+ }
30
+ },
31
+ "blocked_patterns": {
32
+ "type": "array",
33
+ "description": "Patterns that are explicitly blocked regardless of other rules",
34
+ "items": {
35
+ "type": "object",
36
+ "required": ["pattern", "reason"],
37
+ "properties": {
38
+ "pattern": { "type": "string" },
39
+ "reason": { "type": "string" },
40
+ "severity": { "enum": ["block", "warn"] }
41
+ }
42
+ }
43
+ },
44
+ "scope": {
45
+ "$ref": "#/definitions/IntentScope"
46
+ },
47
+ "created_at": {
48
+ "type": "string",
49
+ "format": "date-time"
50
+ },
51
+ "expires_at": {
52
+ "type": "string",
53
+ "format": "date-time",
54
+ "description": "Intent automatically expires after this time"
55
+ },
56
+ "hash": {
57
+ "type": "string",
58
+ "pattern": "^[a-f0-9]{64}$",
59
+ "description": "SHA-256 hash of (summary + constraints + allowed_changes) for immutability"
60
+ },
61
+ "version": {
62
+ "type": "integer",
63
+ "minimum": 1,
64
+ "description": "Intent version, increments on amendments"
65
+ },
66
+ "parent_hash": {
67
+ "type": "string",
68
+ "pattern": "^[a-f0-9]{64}$",
69
+ "description": "Hash of parent intent if this is an amendment"
70
+ },
71
+ "session_id": {
72
+ "type": "string",
73
+ "description": "IDE/session identifier"
74
+ },
75
+ "author": {
76
+ "type": "string",
77
+ "description": "User who declared the intent"
78
+ },
79
+ "reality_requirements": {
80
+ "type": "array",
81
+ "description": "Required proofs before shipping",
82
+ "items": {
83
+ "$ref": "#/definitions/RealityRequirement"
84
+ }
85
+ }
86
+ },
87
+ "definitions": {
88
+ "AllowedChange": {
89
+ "type": "object",
90
+ "required": ["type"],
91
+ "properties": {
92
+ "type": {
93
+ "enum": [
94
+ "file_create",
95
+ "file_modify",
96
+ "file_delete",
97
+ "route_add",
98
+ "route_modify",
99
+ "route_delete",
100
+ "env_add",
101
+ "env_modify",
102
+ "permission_add",
103
+ "permission_modify",
104
+ "config_change",
105
+ "migration_add",
106
+ "test_add"
107
+ ]
108
+ },
109
+ "target": {
110
+ "type": "string",
111
+ "description": "Exact path or identifier"
112
+ },
113
+ "pattern": {
114
+ "type": "string",
115
+ "description": "Glob pattern for matching multiple targets"
116
+ },
117
+ "reason": {
118
+ "type": "string",
119
+ "description": "Why this change is allowed"
120
+ },
121
+ "max_lines": {
122
+ "type": "integer",
123
+ "description": "Maximum lines that can be changed"
124
+ },
125
+ "requires_test": {
126
+ "type": "boolean",
127
+ "description": "Change requires accompanying test"
128
+ }
129
+ }
130
+ },
131
+ "IntentScope": {
132
+ "type": "object",
133
+ "properties": {
134
+ "directories": {
135
+ "type": "array",
136
+ "items": { "type": "string" },
137
+ "description": "Allowed directories"
138
+ },
139
+ "file_patterns": {
140
+ "type": "array",
141
+ "items": { "type": "string" },
142
+ "description": "Allowed file patterns (glob)"
143
+ },
144
+ "domains": {
145
+ "type": "array",
146
+ "items": {
147
+ "enum": ["auth", "payments", "routes", "contracts", "ui", "database", "config", "general", "tests"]
148
+ },
149
+ "description": "Allowed domains"
150
+ },
151
+ "excluded_paths": {
152
+ "type": "array",
153
+ "items": { "type": "string" },
154
+ "description": "Paths explicitly excluded from any changes"
155
+ },
156
+ "protected_files": {
157
+ "type": "array",
158
+ "items": { "type": "string" },
159
+ "description": "Files that cannot be modified under any circumstances"
160
+ }
161
+ }
162
+ },
163
+ "RealityRequirement": {
164
+ "type": "object",
165
+ "required": ["type", "target"],
166
+ "properties": {
167
+ "type": {
168
+ "enum": ["route_reachable", "auth_enforced", "env_exists", "test_passes", "ui_renders"]
169
+ },
170
+ "target": {
171
+ "type": "string",
172
+ "description": "What to verify"
173
+ },
174
+ "method": {
175
+ "enum": ["http", "browser", "cli", "unit"],
176
+ "description": "Verification method"
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
@@ -0,0 +1,222 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://vibecheckai.dev/schemas/verdict/v3",
4
+ "title": "Agent Firewall Verdict Schema v3",
5
+ "description": "Immutable, signed verdict produced by the enforcement system",
6
+ "type": "object",
7
+ "required": ["id", "decision", "mode", "timestamp", "verdict_hash", "intent_hash"],
8
+ "properties": {
9
+ "id": {
10
+ "type": "string",
11
+ "pattern": "^vrd-[a-z0-9]{12,}$",
12
+ "description": "Unique verdict ID"
13
+ },
14
+ "decision": {
15
+ "enum": ["PASS", "BLOCK", "WOULD_PASS", "WOULD_BLOCK"],
16
+ "description": "Final decision. WOULD_* used in OBSERVE mode only."
17
+ },
18
+ "mode": {
19
+ "enum": ["ENFORCE", "OBSERVE", "CI", "IDE"],
20
+ "description": "Mode used during evaluation"
21
+ },
22
+ "violations": {
23
+ "type": "array",
24
+ "description": "All violations that contributed to BLOCK decision",
25
+ "items": {
26
+ "$ref": "#/definitions/Violation"
27
+ }
28
+ },
29
+ "proofs": {
30
+ "type": "array",
31
+ "description": "Proof artifacts collected during evaluation",
32
+ "items": {
33
+ "$ref": "#/definitions/ProofArtifact"
34
+ }
35
+ },
36
+ "intent_hash": {
37
+ "type": ["string", "null"],
38
+ "description": "Hash of intent used for evaluation (null if no intent)"
39
+ },
40
+ "change_events": {
41
+ "type": "array",
42
+ "description": "IDs of change events evaluated",
43
+ "items": { "type": "string" }
44
+ },
45
+ "timestamp": {
46
+ "type": "string",
47
+ "format": "date-time"
48
+ },
49
+ "verdict_hash": {
50
+ "type": "string",
51
+ "pattern": "^[a-f0-9]{64}$",
52
+ "description": "SHA-256 hash of verdict content for integrity"
53
+ },
54
+ "signature": {
55
+ "type": "object",
56
+ "description": "Cryptographic signature for audit trail",
57
+ "properties": {
58
+ "algorithm": {
59
+ "enum": ["sha256-hmac", "ed25519", "none"]
60
+ },
61
+ "value": { "type": "string" },
62
+ "key_id": { "type": "string" },
63
+ "signed_at": { "type": "string", "format": "date-time" }
64
+ }
65
+ },
66
+ "chain": {
67
+ "type": "object",
68
+ "description": "Hash chain for audit trail",
69
+ "properties": {
70
+ "previous_verdict_hash": {
71
+ "type": ["string", "null"],
72
+ "description": "Hash of previous verdict in session"
73
+ },
74
+ "sequence_number": {
75
+ "type": "integer",
76
+ "description": "Verdict sequence number in session"
77
+ },
78
+ "session_id": { "type": "string" }
79
+ }
80
+ },
81
+ "summary": {
82
+ "type": "string",
83
+ "description": "Human-readable summary"
84
+ },
85
+ "block_message": {
86
+ "type": "string",
87
+ "description": "Formatted block message for agent consumption"
88
+ },
89
+ "fix_guidance": {
90
+ "type": "array",
91
+ "description": "Actionable fix suggestions",
92
+ "items": {
93
+ "$ref": "#/definitions/FixGuidance"
94
+ }
95
+ },
96
+ "metadata": {
97
+ "type": "object",
98
+ "properties": {
99
+ "run_id": { "type": "string" },
100
+ "agent_id": { "type": "string" },
101
+ "project_root": { "type": "string" },
102
+ "file_count": { "type": "integer" },
103
+ "evaluation_duration_ms": { "type": "integer" },
104
+ "vibecheck_version": { "type": "string" }
105
+ }
106
+ }
107
+ },
108
+ "definitions": {
109
+ "Violation": {
110
+ "type": "object",
111
+ "required": ["code", "rule", "message", "resource", "severity"],
112
+ "properties": {
113
+ "code": {
114
+ "type": "string",
115
+ "description": "Unique violation code (e.g., UNDECLARED_ROUTE)"
116
+ },
117
+ "rule": {
118
+ "type": "string",
119
+ "description": "Rule that was violated"
120
+ },
121
+ "message": {
122
+ "type": "string",
123
+ "description": "Human-readable message"
124
+ },
125
+ "resource": {
126
+ "type": "string",
127
+ "description": "What was violated (file path, route, etc)"
128
+ },
129
+ "intent_ref": {
130
+ "type": "string",
131
+ "description": "Which part of intent was violated"
132
+ },
133
+ "severity": {
134
+ "enum": ["block", "warn"]
135
+ },
136
+ "evidence": {
137
+ "type": "object",
138
+ "description": "Evidence of violation",
139
+ "properties": {
140
+ "file": { "type": "string" },
141
+ "line": { "type": "integer" },
142
+ "snippet": { "type": "string" },
143
+ "expected": { "type": "string" },
144
+ "actual": { "type": "string" }
145
+ }
146
+ },
147
+ "fix_hint": {
148
+ "type": "string",
149
+ "description": "Quick fix suggestion"
150
+ }
151
+ }
152
+ },
153
+ "ProofArtifact": {
154
+ "type": "object",
155
+ "required": ["id", "type", "status", "target"],
156
+ "properties": {
157
+ "id": {
158
+ "type": "string",
159
+ "pattern": "^prf-[a-z]+-[a-z0-9]+$"
160
+ },
161
+ "type": {
162
+ "enum": ["route", "auth", "ui", "integration", "env", "contract", "test"]
163
+ },
164
+ "status": {
165
+ "enum": ["verified", "failed", "pending", "skipped"]
166
+ },
167
+ "target": {
168
+ "type": "string",
169
+ "description": "What was verified"
170
+ },
171
+ "trace": {
172
+ "type": "string",
173
+ "description": "Reference to evidence (file, screenshot, log)"
174
+ },
175
+ "verified_at": {
176
+ "type": "string",
177
+ "format": "date-time"
178
+ },
179
+ "method": {
180
+ "enum": ["static", "runtime", "browser", "http"]
181
+ },
182
+ "details": {
183
+ "type": "object",
184
+ "description": "Type-specific verification details"
185
+ },
186
+ "error": {
187
+ "type": "string",
188
+ "description": "Error message if failed"
189
+ }
190
+ }
191
+ },
192
+ "FixGuidance": {
193
+ "type": "object",
194
+ "required": ["violation_code", "action"],
195
+ "properties": {
196
+ "violation_code": {
197
+ "type": "string",
198
+ "description": "Code of violation this fixes"
199
+ },
200
+ "action": {
201
+ "enum": ["update_intent", "add_file", "modify_file", "add_env", "add_route", "add_test", "remove_code"]
202
+ },
203
+ "target": {
204
+ "type": "string",
205
+ "description": "What to modify"
206
+ },
207
+ "command": {
208
+ "type": "string",
209
+ "description": "CLI command to run (if applicable)"
210
+ },
211
+ "explanation": {
212
+ "type": "string",
213
+ "description": "Why this fix works"
214
+ },
215
+ "auto_fixable": {
216
+ "type": "boolean",
217
+ "description": "Can this be auto-fixed by vibecheck fix?"
218
+ }
219
+ }
220
+ }
221
+ }
222
+ }