@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.
Files changed (118) 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 +634 -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/interceptor/base.js +7 -3
  26. package/bin/runners/lib/agent-firewall/session/collector.js +451 -0
  27. package/bin/runners/lib/agent-firewall/session/index.js +26 -0
  28. package/bin/runners/lib/artifact-envelope.js +540 -0
  29. package/bin/runners/lib/auth-shared.js +977 -0
  30. package/bin/runners/lib/checkpoint.js +941 -0
  31. package/bin/runners/lib/cleanup/engine.js +571 -0
  32. package/bin/runners/lib/cleanup/index.js +53 -0
  33. package/bin/runners/lib/cleanup/output.js +375 -0
  34. package/bin/runners/lib/cleanup/rules.js +1060 -0
  35. package/bin/runners/lib/doctor/diagnosis-receipt.js +454 -0
  36. package/bin/runners/lib/doctor/failure-signatures.js +526 -0
  37. package/bin/runners/lib/doctor/fix-script.js +336 -0
  38. package/bin/runners/lib/doctor/modules/build-tools.js +453 -0
  39. package/bin/runners/lib/doctor/modules/index.js +62 -3
  40. package/bin/runners/lib/doctor/modules/os-quirks.js +706 -0
  41. package/bin/runners/lib/doctor/modules/repo-integrity.js +485 -0
  42. package/bin/runners/lib/doctor/safe-repair.js +384 -0
  43. package/bin/runners/lib/engine/ast-cache.js +210 -210
  44. package/bin/runners/lib/engine/auth-extractor.js +211 -211
  45. package/bin/runners/lib/engine/billing-extractor.js +112 -112
  46. package/bin/runners/lib/engine/enforcement-extractor.js +100 -100
  47. package/bin/runners/lib/engine/env-extractor.js +207 -207
  48. package/bin/runners/lib/engine/express-extractor.js +208 -208
  49. package/bin/runners/lib/engine/extractors.js +849 -849
  50. package/bin/runners/lib/engine/index.js +207 -207
  51. package/bin/runners/lib/engine/repo-index.js +514 -514
  52. package/bin/runners/lib/engine/types.js +124 -124
  53. package/bin/runners/lib/engines/attack-detector.js +1192 -0
  54. package/bin/runners/lib/entitlements-v2.js +2 -2
  55. package/bin/runners/lib/missions/briefing.js +427 -0
  56. package/bin/runners/lib/missions/checkpoint.js +753 -0
  57. package/bin/runners/lib/missions/hardening.js +851 -0
  58. package/bin/runners/lib/missions/plan.js +421 -32
  59. package/bin/runners/lib/missions/safety-gates.js +645 -0
  60. package/bin/runners/lib/missions/schema.js +478 -0
  61. package/bin/runners/lib/packs/bundle.js +675 -0
  62. package/bin/runners/lib/packs/evidence-pack.js +671 -0
  63. package/bin/runners/lib/packs/pack-factory.js +837 -0
  64. package/bin/runners/lib/packs/permissions-pack.js +686 -0
  65. package/bin/runners/lib/packs/proof-graph-pack.js +779 -0
  66. package/bin/runners/lib/safelist/index.js +96 -0
  67. package/bin/runners/lib/safelist/integration.js +334 -0
  68. package/bin/runners/lib/safelist/matcher.js +696 -0
  69. package/bin/runners/lib/safelist/schema.js +948 -0
  70. package/bin/runners/lib/safelist/store.js +438 -0
  71. package/bin/runners/lib/schemas/ship-manifest.schema.json +251 -0
  72. package/bin/runners/lib/ship-gate.js +832 -0
  73. package/bin/runners/lib/ship-manifest.js +1153 -0
  74. package/bin/runners/lib/ship-output.js +1 -1
  75. package/bin/runners/lib/unified-cli-output.js +710 -383
  76. package/bin/runners/lib/upsell.js +3 -3
  77. package/bin/runners/lib/why-tree.js +650 -0
  78. package/bin/runners/runAllowlist.js +33 -4
  79. package/bin/runners/runApprove.js +240 -1122
  80. package/bin/runners/runAudit.js +692 -0
  81. package/bin/runners/runAuth.js +325 -29
  82. package/bin/runners/runCheckpoint.js +442 -494
  83. package/bin/runners/runCleanup.js +343 -0
  84. package/bin/runners/runDoctor.js +269 -19
  85. package/bin/runners/runFix.js +411 -32
  86. package/bin/runners/runForge.js +411 -0
  87. package/bin/runners/runIntent.js +906 -0
  88. package/bin/runners/runKickoff.js +878 -0
  89. package/bin/runners/runLaunch.js +2000 -0
  90. package/bin/runners/runLink.js +785 -0
  91. package/bin/runners/runMcp.js +1741 -837
  92. package/bin/runners/runPacks.js +2089 -0
  93. package/bin/runners/runPolish.js +41 -0
  94. package/bin/runners/runReality.js +178 -1
  95. package/bin/runners/runSafelist.js +1190 -0
  96. package/bin/runners/runScan.js +21 -9
  97. package/bin/runners/runShield.js +1282 -0
  98. package/bin/runners/runShip.js +395 -16
  99. package/bin/vibecheck.js +34 -6
  100. package/mcp-server/README.md +117 -158
  101. package/mcp-server/handlers/index.ts +2 -2
  102. package/mcp-server/handlers/tool-handler.ts +50 -11
  103. package/mcp-server/index.js +16 -0
  104. package/mcp-server/intent-firewall-interceptor.js +529 -0
  105. package/mcp-server/lib/executor.ts +5 -5
  106. package/mcp-server/lib/index.ts +14 -4
  107. package/mcp-server/lib/sandbox.test.ts +4 -4
  108. package/mcp-server/lib/sandbox.ts +2 -2
  109. package/mcp-server/manifest.json +473 -0
  110. package/mcp-server/package.json +1 -1
  111. package/mcp-server/registry/tool-registry.js +315 -523
  112. package/mcp-server/registry/tools.json +442 -428
  113. package/mcp-server/registry.test.ts +18 -12
  114. package/mcp-server/tier-auth.js +68 -11
  115. package/mcp-server/tools-v3.js +70 -16
  116. package/mcp-server/tsconfig.json +1 -0
  117. package/package.json +2 -1
  118. package/bin/runners/runProof.zip +0 -0
@@ -0,0 +1,333 @@
1
+ /**
2
+ * Verdict System v2 - Deterministic Enforcement Verdicts
3
+ *
4
+ * ═══════════════════════════════════════════════════════════════════════════════
5
+ * AGENT FIREWALL™ - VERDICT SYSTEM
6
+ * ═══════════════════════════════════════════════════════════════════════════════
7
+ *
8
+ * Every Agent Firewall run MUST end in exactly one verdict:
9
+ * - PASS (intent + proof satisfied)
10
+ * - BLOCK (default on any violation)
11
+ *
12
+ * NO "partial success".
13
+ * NO "best effort".
14
+ * NO "WARN" as a final state in ENFORCE mode.
15
+ *
16
+ * Verdicts are:
17
+ * - Deterministic
18
+ * - Signed/hashed
19
+ * - Stored for reuse
20
+ *
21
+ * @module enforcement/verdict-v2
22
+ * @version 2.0.0
23
+ */
24
+
25
+ "use strict";
26
+
27
+ const crypto = require("crypto");
28
+
29
+ /**
30
+ * Verdict decisions - only two options
31
+ */
32
+ const VERDICT = {
33
+ PASS: "PASS",
34
+ BLOCK: "BLOCK",
35
+ };
36
+
37
+ /**
38
+ * Observation decision (for OBSERVE mode only)
39
+ */
40
+ const OBSERVATION = {
41
+ WOULD_PASS: "WOULD_PASS",
42
+ WOULD_BLOCK: "WOULD_BLOCK",
43
+ };
44
+
45
+ /**
46
+ * Firewall modes
47
+ */
48
+ const MODE = {
49
+ ENFORCE: "ENFORCE", // Default: block on violation
50
+ OBSERVE: "OBSERVE", // Log + warn only (returns WOULD_* verdicts)
51
+ CI: "CI", // Fail pipeline on BLOCK
52
+ IDE: "IDE", // Real-time interception, block writes
53
+ };
54
+
55
+ /**
56
+ * Verdict object structure
57
+ * @typedef {Object} Verdict
58
+ * @property {string} decision - PASS or BLOCK
59
+ * @property {string} mode - Mode used for evaluation
60
+ * @property {Object[]} violations - All violations found
61
+ * @property {Object[]} proofs - All proofs collected
62
+ * @property {string} intent_hash - Hash of intent used
63
+ * @property {string} verdict_hash - Hash of entire verdict for signing
64
+ * @property {string} timestamp - ISO timestamp
65
+ * @property {string} id - Unique verdict ID
66
+ */
67
+
68
+ /**
69
+ * Generate verdict ID
70
+ * @returns {string} Unique verdict ID
71
+ */
72
+ function generateVerdictId() {
73
+ return `vrd-${Date.now().toString(36)}-${crypto.randomBytes(4).toString("hex")}`;
74
+ }
75
+
76
+ /**
77
+ * Compute verdict hash for integrity/signing
78
+ * @param {Object} verdict - Verdict object (without hash)
79
+ * @returns {string} SHA-256 hash
80
+ */
81
+ function computeVerdictHash(verdict) {
82
+ const content = JSON.stringify({
83
+ decision: verdict.decision,
84
+ mode: verdict.mode,
85
+ violations: verdict.violations.map(v => ({
86
+ code: v.code,
87
+ resource: v.resource,
88
+ })),
89
+ proofs: verdict.proofs.map(p => ({
90
+ id: p.id,
91
+ status: p.status,
92
+ })),
93
+ intent_hash: verdict.intent_hash,
94
+ timestamp: verdict.timestamp,
95
+ });
96
+
97
+ return crypto.createHash("sha256").update(content).digest("hex");
98
+ }
99
+
100
+ /**
101
+ * Generate deterministic verdict from alignment and proof results
102
+ *
103
+ * RULES:
104
+ * - If ANY violation exists → BLOCK
105
+ * - If ANY required proof failed → BLOCK
106
+ * - If intent is missing → BLOCK
107
+ * - Only if ALL checks pass → PASS
108
+ *
109
+ * @param {Object} params - Verdict parameters
110
+ * @param {Object} params.alignmentResult - Result from alignment engine
111
+ * @param {Object[]} params.proofs - Array of proof artifacts
112
+ * @param {string} params.mode - Firewall mode
113
+ * @param {string} params.intent_hash - Hash of intent used
114
+ * @returns {Verdict} Final verdict
115
+ */
116
+ function generateVerdict({ alignmentResult, proofs = [], mode = MODE.ENFORCE, intent_hash = null }) {
117
+ const timestamp = new Date().toISOString();
118
+ const id = generateVerdictId();
119
+
120
+ // Collect all violations
121
+ const violations = alignmentResult?.violations || [];
122
+
123
+ // Check for failed proofs
124
+ const failedProofs = proofs.filter(p => p.status === "failed" || p.status === "unverified");
125
+ for (const proof of failedProofs) {
126
+ violations.push({
127
+ code: "PROOF_FAILED",
128
+ rule: `proof_${proof.type}`,
129
+ message: `Required proof failed: ${proof.type} - ${proof.id}`,
130
+ resource: proof.target || "unknown",
131
+ intent_ref: "reality_proof",
132
+ severity: "block",
133
+ });
134
+ }
135
+
136
+ // Determine decision
137
+ // In ENFORCE/CI mode: any violation = BLOCK
138
+ // In OBSERVE mode: violations generate WOULD_BLOCK but don't actually block
139
+ let decision;
140
+
141
+ if (mode === MODE.OBSERVE) {
142
+ decision = violations.length > 0 ? OBSERVATION.WOULD_BLOCK : OBSERVATION.WOULD_PASS;
143
+ } else {
144
+ // ENFORCE, CI, IDE - strict enforcement
145
+ decision = violations.length > 0 ? VERDICT.BLOCK : VERDICT.PASS;
146
+ }
147
+
148
+ const verdict = {
149
+ id,
150
+ decision,
151
+ mode,
152
+ violations,
153
+ proofs: proofs.map(p => ({
154
+ id: p.id,
155
+ type: p.type,
156
+ status: p.status,
157
+ trace: p.trace,
158
+ })),
159
+ intent_hash,
160
+ timestamp,
161
+ verdict_hash: "", // Will be computed
162
+
163
+ // Summary for humans
164
+ summary: generateSummary(decision, violations, proofs),
165
+
166
+ // Machine-readable status
167
+ passed: decision === VERDICT.PASS || decision === OBSERVATION.WOULD_PASS,
168
+ blocked: decision === VERDICT.BLOCK || decision === OBSERVATION.WOULD_BLOCK,
169
+ violation_count: violations.length,
170
+ proof_count: proofs.length,
171
+ failed_proof_count: failedProofs.length,
172
+ };
173
+
174
+ // Compute and set hash
175
+ verdict.verdict_hash = computeVerdictHash(verdict);
176
+
177
+ return verdict;
178
+ }
179
+
180
+ /**
181
+ * Generate human-readable summary
182
+ * @param {string} decision - Verdict decision
183
+ * @param {Object[]} violations - Violations array
184
+ * @param {Object[]} proofs - Proofs array
185
+ * @returns {string} Summary text
186
+ */
187
+ function generateSummary(decision, violations, proofs) {
188
+ if (decision === VERDICT.PASS || decision === OBSERVATION.WOULD_PASS) {
189
+ return `All checks passed. Intent aligned, ${proofs.length} proofs verified.`;
190
+ }
191
+
192
+ const violationSummary = violations.slice(0, 3)
193
+ .map(v => v.message)
194
+ .join("; ");
195
+
196
+ const extra = violations.length > 3 ? ` (+${violations.length - 3} more)` : "";
197
+
198
+ return `BLOCKED: ${violations.length} violation(s). ${violationSummary}${extra}`;
199
+ }
200
+
201
+ /**
202
+ * Generate block message with exact reason and reference
203
+ * @param {Object[]} violations - Violations array
204
+ * @returns {string} Formatted block message
205
+ */
206
+ function formatBlockMessage(violations) {
207
+ if (violations.length === 0) {
208
+ return "BLOCKED_BY_AGENT_FIREWALL: Unknown reason";
209
+ }
210
+
211
+ const lines = ["BLOCKED_BY_AGENT_FIREWALL:"];
212
+
213
+ for (const violation of violations) {
214
+ lines.push(`- reason: ${violation.code}`);
215
+ lines.push(` resource: ${violation.resource}`);
216
+ lines.push(` intent_ref: ${violation.intent_ref}`);
217
+ if (violation.message) {
218
+ lines.push(` message: ${violation.message}`);
219
+ }
220
+ lines.push("");
221
+ }
222
+
223
+ return lines.join("\n");
224
+ }
225
+
226
+ /**
227
+ * Verify verdict integrity
228
+ * @param {Object} verdict - Verdict to verify
229
+ * @returns {Object} Verification result
230
+ */
231
+ function verifyVerdictIntegrity(verdict) {
232
+ if (!verdict || !verdict.verdict_hash) {
233
+ return {
234
+ valid: false,
235
+ reason: "MISSING_HASH",
236
+ };
237
+ }
238
+
239
+ const computed = computeVerdictHash(verdict);
240
+
241
+ return {
242
+ valid: computed === verdict.verdict_hash,
243
+ reason: computed === verdict.verdict_hash ? "VERIFIED" : "HASH_MISMATCH",
244
+ computed_hash: computed,
245
+ stored_hash: verdict.verdict_hash,
246
+ };
247
+ }
248
+
249
+ /**
250
+ * Convert legacy verdict (ALLOW/WARN/BLOCK) to v2 format
251
+ * @param {Object} legacyVerdict - Legacy verdict object
252
+ * @param {string} mode - Firewall mode
253
+ * @returns {Verdict} V2 verdict
254
+ */
255
+ function convertLegacyVerdict(legacyVerdict, mode = MODE.ENFORCE) {
256
+ const violations = (legacyVerdict.violations || []).map(v => ({
257
+ code: v.rule?.toUpperCase().replace(/-/g, "_") || "UNKNOWN",
258
+ rule: v.rule || "unknown",
259
+ message: v.message || "No message",
260
+ resource: v.claimId || v.file || "unknown",
261
+ intent_ref: "legacy",
262
+ severity: v.severity || "block",
263
+ }));
264
+
265
+ // In v2, WARN becomes BLOCK in ENFORCE mode
266
+ let decision;
267
+ if (mode === MODE.OBSERVE) {
268
+ decision = legacyVerdict.decision === "ALLOW"
269
+ ? OBSERVATION.WOULD_PASS
270
+ : OBSERVATION.WOULD_BLOCK;
271
+ } else {
272
+ // ALLOW stays PASS, WARN and BLOCK become BLOCK
273
+ decision = legacyVerdict.decision === "ALLOW" ? VERDICT.PASS : VERDICT.BLOCK;
274
+ }
275
+
276
+ return generateVerdict({
277
+ alignmentResult: { violations },
278
+ proofs: [],
279
+ mode,
280
+ intent_hash: null,
281
+ });
282
+ }
283
+
284
+ /**
285
+ * Create verdict manifest for artifact storage
286
+ * @param {Object} verdict - Verdict object
287
+ * @param {Object} metadata - Additional metadata
288
+ * @returns {Object} Manifest object
289
+ */
290
+ function createVerdictManifest(verdict, metadata = {}) {
291
+ return {
292
+ schema_version: "2.0.0",
293
+ verdict: {
294
+ id: verdict.id,
295
+ decision: verdict.decision,
296
+ hash: verdict.verdict_hash,
297
+ timestamp: verdict.timestamp,
298
+ },
299
+ intent: {
300
+ hash: verdict.intent_hash,
301
+ },
302
+ violations: verdict.violations.map(v => ({
303
+ code: v.code,
304
+ resource: v.resource,
305
+ intent_ref: v.intent_ref,
306
+ })),
307
+ proofs: verdict.proofs.map(p => ({
308
+ id: p.id,
309
+ type: p.type,
310
+ status: p.status,
311
+ })),
312
+ summary: verdict.summary,
313
+ metadata: {
314
+ mode: verdict.mode,
315
+ ...metadata,
316
+ },
317
+ created_at: new Date().toISOString(),
318
+ };
319
+ }
320
+
321
+ module.exports = {
322
+ VERDICT,
323
+ OBSERVATION,
324
+ MODE,
325
+ generateVerdict,
326
+ generateVerdictId,
327
+ computeVerdictHash,
328
+ verifyVerdictIntegrity,
329
+ formatBlockMessage,
330
+ generateSummary,
331
+ convertLegacyVerdict,
332
+ createVerdictManifest,
333
+ };
@@ -0,0 +1,200 @@
1
+ /**
2
+ * Agent Firewall - Unified Entry Point
3
+ *
4
+ * ═══════════════════════════════════════════════════════════════════════════════
5
+ * AGENT FIREWALL™ v3.0 - ENFORCEMENT INFRASTRUCTURE
6
+ * ═══════════════════════════════════════════════════════════════════════════════
7
+ *
8
+ * THE SINGLE ENTRY POINT for all Agent Firewall functionality.
9
+ *
10
+ * This module consolidates:
11
+ * - Intent system (capture, store, validate)
12
+ * - Enforcement gateway (intercept, evaluate, verdict)
13
+ * - Interception layer (MCP, file writes, git hooks)
14
+ * - Integration layer (ship, packs, seal, CI)
15
+ *
16
+ * All code should import from this module.
17
+ *
18
+ * Example:
19
+ * ```javascript
20
+ * const { createGateway, intercept, canShip } = require("./lib/agent-firewall");
21
+ *
22
+ * // Create gateway for session
23
+ * const gateway = createGateway(projectRoot);
24
+ *
25
+ * // Intercept a change
26
+ * const verdict = await gateway.intercept(change, source);
27
+ *
28
+ * // Check if can ship
29
+ * const allowed = await canShip(projectRoot);
30
+ * ```
31
+ *
32
+ * @module agent-firewall
33
+ * @version 3.0.0
34
+ */
35
+
36
+ "use strict";
37
+
38
+ // ═══════════════════════════════════════════════════════════════════════════════
39
+ // CORE MODULES
40
+ // ═══════════════════════════════════════════════════════════════════════════════
41
+
42
+ // Intent system
43
+ const intent = require("./intent");
44
+
45
+ // Enforcement system
46
+ const enforcement = require("./enforcement");
47
+
48
+ // Session system
49
+ const session = require("./session");
50
+
51
+ // Interception layer
52
+ let interception;
53
+ try {
54
+ interception = require("./interception");
55
+ } catch {
56
+ interception = {};
57
+ }
58
+
59
+ // Integration layer
60
+ let integration;
61
+ try {
62
+ integration = require("./integration");
63
+ } catch {
64
+ integration = {};
65
+ }
66
+
67
+ // ═══════════════════════════════════════════════════════════════════════════════
68
+ // UNIFIED EXPORTS
69
+ // ═══════════════════════════════════════════════════════════════════════════════
70
+
71
+ module.exports = {
72
+ // ═══════════════════════════════════════════════════════════════════════════
73
+ // PRIMARY API - Gateway (THE entry point for enforcement)
74
+ // ═══════════════════════════════════════════════════════════════════════════
75
+
76
+ // Gateway creation and use
77
+ EnforcementGateway: enforcement.EnforcementGateway,
78
+ createGateway: enforcement.createGateway,
79
+ intercept: enforcement.intercept,
80
+ quickCheck: enforcement.quickCheck,
81
+
82
+ // Change event helpers
83
+ buildChangeEvent: enforcement.buildChangeEvent,
84
+ analyzeCodeQuality: enforcement.analyzeCodeQuality,
85
+ classifyDomain: enforcement.classifyDomain,
86
+
87
+ // ═══════════════════════════════════════════════════════════════════════════
88
+ // INTENT SYSTEM
89
+ // ═══════════════════════════════════════════════════════════════════════════
90
+
91
+ // Intent store
92
+ IntentStore: intent.IntentStore,
93
+
94
+ // Intent creation and validation
95
+ createIntent: intent.createIntent,
96
+ verifyIntentIntegrity: intent.verifyIntentIntegrity,
97
+ isIntentExpired: intent.isIntentExpired,
98
+ computeIntentHash: intent.computeIntentHash,
99
+
100
+ // Alignment checking
101
+ checkAlignment: intent.checkAlignment,
102
+ checkAlignmentBatch: intent.checkAlignmentBatch,
103
+ VIOLATION_CODES: intent.VIOLATION_CODES,
104
+
105
+ // Auto-detection
106
+ autoDetectIntent: intent.autoDetectIntent,
107
+ inferIntentFromGit: intent.inferIntentFromGit,
108
+
109
+ // ═══════════════════════════════════════════════════════════════════════════
110
+ // VERDICT SYSTEM
111
+ // ═══════════════════════════════════════════════════════════════════════════
112
+
113
+ // Verdict generation
114
+ generateVerdict: enforcement.generateVerdict,
115
+ generateVerdictId: enforcement.generateVerdictId,
116
+
117
+ // Verdict verification
118
+ computeVerdictHash: enforcement.computeVerdictHash,
119
+ verifyVerdictIntegrity: enforcement.verifyVerdictIntegrity,
120
+
121
+ // Verdict formatting
122
+ formatBlockMessage: enforcement.formatBlockMessage,
123
+ createVerdictManifest: enforcement.createVerdictManifest,
124
+
125
+ // Legacy conversion
126
+ convertLegacyVerdict: enforcement.convertLegacyVerdict,
127
+
128
+ // ═══════════════════════════════════════════════════════════════════════════
129
+ // PROOF SYSTEM
130
+ // ═══════════════════════════════════════════════════════════════════════════
131
+
132
+ ProofCollection: enforcement.ProofCollection,
133
+ determineRequiredProofs: enforcement.determineRequiredProofs,
134
+ PROOF_STATUS: enforcement.PROOF_STATUS,
135
+ PROOF_TYPE: enforcement.PROOF_TYPE,
136
+
137
+ // ═══════════════════════════════════════════════════════════════════════════
138
+ // SESSION SYSTEM
139
+ // ═══════════════════════════════════════════════════════════════════════════
140
+
141
+ SessionCollector: session.SessionCollector,
142
+ getCollector: session.getCollector,
143
+
144
+ // ═══════════════════════════════════════════════════════════════════════════
145
+ // INTERCEPTION LAYER
146
+ // ═══════════════════════════════════════════════════════════════════════════
147
+
148
+ // File system interception
149
+ activateFsInterceptor: interception.activateFsInterceptor,
150
+ deactivateFsInterceptor: interception.deactivateFsInterceptor,
151
+ isFsInterceptorActive: interception.isFsInterceptorActive,
152
+ BlockedWriteError: interception.BlockedWriteError,
153
+
154
+ // ═══════════════════════════════════════════════════════════════════════════
155
+ // INTEGRATION LAYER (ship/packs/seal/CI)
156
+ // ═══════════════════════════════════════════════════════════════════════════
157
+
158
+ // Ship gate
159
+ ShipGate: integration.ShipGate,
160
+ createShipGate: integration.createShipGate,
161
+ canShip: integration.canShip,
162
+ getCIStatus: integration.getCIStatus,
163
+ SHIP_GATE_STATUS: integration.SHIP_GATE_STATUS,
164
+
165
+ // ═══════════════════════════════════════════════════════════════════════════
166
+ // MODE & CONSTANTS
167
+ // ═══════════════════════════════════════════════════════════════════════════
168
+
169
+ MODE: enforcement.MODE,
170
+ VERDICT: enforcement.VERDICT,
171
+ OBSERVATION: enforcement.OBSERVATION,
172
+ BLOCK_PATTERNS: enforcement.BLOCK_PATTERNS,
173
+
174
+ // Mode configuration
175
+ ModeConfig: enforcement.ModeConfig,
176
+ formatModeBanner: enforcement.formatModeBanner,
177
+
178
+ // ═══════════════════════════════════════════════════════════════════════════
179
+ // LEGACY COMPATIBILITY
180
+ // ═══════════════════════════════════════════════════════════════════════════
181
+
182
+ // Orchestrator (use gateway for new code)
183
+ FirewallOrchestrator: enforcement.FirewallOrchestrator,
184
+ createOrchestrator: enforcement.createOrchestrator,
185
+ normalizeChangeEvent: enforcement.normalizeChangeEvent,
186
+ CHANGE_EVENT_TYPE: enforcement.CHANGE_EVENT_TYPE,
187
+
188
+ // ═══════════════════════════════════════════════════════════════════════════
189
+ // SUBMODULE ACCESS
190
+ // ═══════════════════════════════════════════════════════════════════════════
191
+
192
+ // For advanced use cases that need full submodule access
193
+ _modules: {
194
+ intent,
195
+ enforcement,
196
+ session,
197
+ interception,
198
+ integration,
199
+ },
200
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Agent Firewall Integration Index
3
+ *
4
+ * Exports integration modules for ship/packs/seal/CI.
5
+ *
6
+ * @module integration
7
+ */
8
+
9
+ "use strict";
10
+
11
+ const shipGate = require("./ship-gate");
12
+
13
+ module.exports = {
14
+ // Ship Gate
15
+ ShipGate: shipGate.ShipGate,
16
+ createShipGate: shipGate.createShipGate,
17
+ canShip: shipGate.canShip,
18
+ getCIStatus: shipGate.getCIStatus,
19
+ SHIP_GATE_STATUS: shipGate.SHIP_GATE_STATUS,
20
+ };