@vibecheckai/cli 3.8.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/bin/runners/lib/agent-firewall/enforcement/index.js +98 -98
- package/bin/runners/lib/agent-firewall/enforcement/mode.js +318 -318
- package/bin/runners/lib/agent-firewall/enforcement/orchestrator.js +484 -484
- package/bin/runners/lib/agent-firewall/enforcement/proof-artifact.js +418 -418
- package/bin/runners/lib/agent-firewall/enforcement/verdict-v2.js +333 -333
- package/bin/runners/lib/agent-firewall/intent/alignment-engine.js +634 -622
- package/bin/runners/lib/agent-firewall/intent/index.js +102 -102
- package/bin/runners/lib/agent-firewall/intent/schema.js +352 -352
- package/bin/runners/lib/agent-firewall/intent/store.js +283 -283
- package/bin/runners/lib/agent-firewall/interceptor/base.js +7 -3
- 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/runIntent.js +906 -906
- package/bin/runners/runPacks.js +2089 -2089
- package/bin/runners/runReality.js +178 -1
- package/bin/runners/runShield.js +1282 -1282
- package/mcp-server/handlers/index.ts +2 -2
- package/mcp-server/handlers/tool-handler.ts +47 -8
- 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/package.json +1 -1
- package/mcp-server/registry.test.ts +18 -12
- package/mcp-server/tsconfig.json +1 -0
- package/package.json +2 -1
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
// bin/runners/lib/engine/types.js
|
|
2
|
-
// JSDoc type definitions for the engine
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @typedef {Object} FileRecord
|
|
6
|
-
* @property {string} abs - Absolute path
|
|
7
|
-
* @property {string} rel - Relative path from repo root (forward slashes)
|
|
8
|
-
* @property {number} size - File size in bytes
|
|
9
|
-
* @property {number} mtime - Last modified time (ms since epoch)
|
|
10
|
-
* @property {string} hash - Content hash (sha256)
|
|
11
|
-
* @property {string} [ext] - File extension (e.g., ".ts", ".js")
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @typedef {Object} RepoSignals
|
|
16
|
-
* @property {boolean} hasPackageJson
|
|
17
|
-
* @property {boolean} hasRequirementsTxt
|
|
18
|
-
* @property {boolean} hasPyprojectToml
|
|
19
|
-
* @property {boolean} hasGoMod
|
|
20
|
-
* @property {boolean} hasGemfile
|
|
21
|
-
* @property {boolean} hasNextApp - has app/ directory
|
|
22
|
-
* @property {boolean} hasNextPages - has pages/ directory
|
|
23
|
-
* @property {boolean} hasOpenAPI
|
|
24
|
-
* @property {boolean} hasGraphQL
|
|
25
|
-
* @property {Set<string>} detectedFrameworks
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @typedef {Object} RepoIndexResult
|
|
30
|
-
* @property {FileRecord[]} files - All indexed files
|
|
31
|
-
* @property {RepoSignals} signals - Detected signals
|
|
32
|
-
* @property {Map<string, string>} contentCache - abs -> content
|
|
33
|
-
* @property {Map<string, Set<string>>} tokenIndex - token -> Set<abs>
|
|
34
|
-
* @property {Object} stats
|
|
35
|
-
* @property {number} stats.totalFiles
|
|
36
|
-
* @property {number} stats.totalSize
|
|
37
|
-
* @property {number} stats.indexTimeMs
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @typedef {Object} Evidence
|
|
42
|
-
* @property {string} id - Unique evidence ID (ev_xxxx)
|
|
43
|
-
* @property {string} file - Relative file path
|
|
44
|
-
* @property {string} lines - Line range (e.g., "10-15")
|
|
45
|
-
* @property {string} snippetHash - SHA256 of snippet
|
|
46
|
-
* @property {string} reason - Why this is evidence
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @typedef {Object} RouteFact
|
|
51
|
-
* @property {string} method - HTTP method (GET, POST, *, etc.)
|
|
52
|
-
* @property {string} path - Canonicalized route path
|
|
53
|
-
* @property {string} handler - Relative file path
|
|
54
|
-
* @property {string} framework - Source framework
|
|
55
|
-
* @property {"high"|"med"|"low"} confidence
|
|
56
|
-
* @property {Evidence[]} evidence
|
|
57
|
-
* @property {string[]} [hooks] - Fastify hooks if present
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* @typedef {Object} ClientRefFact
|
|
62
|
-
* @property {string} method - HTTP method or "*"
|
|
63
|
-
* @property {string} path - Canonicalized path
|
|
64
|
-
* @property {string} source - Relative file path
|
|
65
|
-
* @property {"high"|"med"|"low"} confidence
|
|
66
|
-
* @property {string} kind - fetch, axios_member, axios_config, useSWR, useQuery
|
|
67
|
-
* @property {Evidence[]} evidence
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @typedef {Object} EnvFact
|
|
72
|
-
* @property {string} name - Environment variable name
|
|
73
|
-
* @property {string[]} files - Files where it's referenced
|
|
74
|
-
* @property {boolean} hasDefault - Whether a default value exists
|
|
75
|
-
* @property {string} [defaultValue] - Default value if any
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @typedef {Object} Gap
|
|
80
|
-
* @property {string} kind - Gap type (e.g., "fastify_plugin_unresolved")
|
|
81
|
-
* @property {string} [file] - Related file
|
|
82
|
-
* @property {string} [spec] - Module specifier
|
|
83
|
-
* @property {string} [name] - Identifier name
|
|
84
|
-
* @property {string} [note] - Additional notes
|
|
85
|
-
* @property {string} [error] - Error message if from catch
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* @typedef {Object} AdapterResult
|
|
90
|
-
* @property {RouteFact[]} routes
|
|
91
|
-
* @property {ClientRefFact[]} clientRefs
|
|
92
|
-
* @property {Gap[]} gaps
|
|
93
|
-
* @property {Object} stats
|
|
94
|
-
* @property {number} stats.filesScanned
|
|
95
|
-
* @property {number} stats.parseErrors
|
|
96
|
-
* @property {number} [quality] - 0-1 extraction quality score
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @typedef {Object} Finding
|
|
101
|
-
* @property {string} id - Stable finding ID
|
|
102
|
-
* @property {string} title
|
|
103
|
-
* @property {string} description
|
|
104
|
-
* @property {"info"|"warn"|"block"} severity
|
|
105
|
-
* @property {"high"|"med"|"low"} confidence
|
|
106
|
-
* @property {Evidence[]} evidence
|
|
107
|
-
* @property {Gap[]} [gaps]
|
|
108
|
-
* @property {string} [suggestedFix]
|
|
109
|
-
* @property {string} [category]
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* @typedef {Object} ScanResult
|
|
114
|
-
* @property {Finding[]} findings
|
|
115
|
-
* @property {Object} truthpack
|
|
116
|
-
* @property {Object} stats
|
|
117
|
-
* @property {number} stats.scanTimeMs
|
|
118
|
-
* @property {number} stats.filesIndexed
|
|
119
|
-
* @property {number} stats.routesFound
|
|
120
|
-
* @property {number} stats.clientRefsFound
|
|
121
|
-
* @property {number} stats.gapsFound
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
|
-
module.exports = {};
|
|
1
|
+
// bin/runners/lib/engine/types.js
|
|
2
|
+
// JSDoc type definitions for the engine
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {Object} FileRecord
|
|
6
|
+
* @property {string} abs - Absolute path
|
|
7
|
+
* @property {string} rel - Relative path from repo root (forward slashes)
|
|
8
|
+
* @property {number} size - File size in bytes
|
|
9
|
+
* @property {number} mtime - Last modified time (ms since epoch)
|
|
10
|
+
* @property {string} hash - Content hash (sha256)
|
|
11
|
+
* @property {string} [ext] - File extension (e.g., ".ts", ".js")
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {Object} RepoSignals
|
|
16
|
+
* @property {boolean} hasPackageJson
|
|
17
|
+
* @property {boolean} hasRequirementsTxt
|
|
18
|
+
* @property {boolean} hasPyprojectToml
|
|
19
|
+
* @property {boolean} hasGoMod
|
|
20
|
+
* @property {boolean} hasGemfile
|
|
21
|
+
* @property {boolean} hasNextApp - has app/ directory
|
|
22
|
+
* @property {boolean} hasNextPages - has pages/ directory
|
|
23
|
+
* @property {boolean} hasOpenAPI
|
|
24
|
+
* @property {boolean} hasGraphQL
|
|
25
|
+
* @property {Set<string>} detectedFrameworks
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @typedef {Object} RepoIndexResult
|
|
30
|
+
* @property {FileRecord[]} files - All indexed files
|
|
31
|
+
* @property {RepoSignals} signals - Detected signals
|
|
32
|
+
* @property {Map<string, string>} contentCache - abs -> content
|
|
33
|
+
* @property {Map<string, Set<string>>} tokenIndex - token -> Set<abs>
|
|
34
|
+
* @property {Object} stats
|
|
35
|
+
* @property {number} stats.totalFiles
|
|
36
|
+
* @property {number} stats.totalSize
|
|
37
|
+
* @property {number} stats.indexTimeMs
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @typedef {Object} Evidence
|
|
42
|
+
* @property {string} id - Unique evidence ID (ev_xxxx)
|
|
43
|
+
* @property {string} file - Relative file path
|
|
44
|
+
* @property {string} lines - Line range (e.g., "10-15")
|
|
45
|
+
* @property {string} snippetHash - SHA256 of snippet
|
|
46
|
+
* @property {string} reason - Why this is evidence
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @typedef {Object} RouteFact
|
|
51
|
+
* @property {string} method - HTTP method (GET, POST, *, etc.)
|
|
52
|
+
* @property {string} path - Canonicalized route path
|
|
53
|
+
* @property {string} handler - Relative file path
|
|
54
|
+
* @property {string} framework - Source framework
|
|
55
|
+
* @property {"high"|"med"|"low"} confidence
|
|
56
|
+
* @property {Evidence[]} evidence
|
|
57
|
+
* @property {string[]} [hooks] - Fastify hooks if present
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @typedef {Object} ClientRefFact
|
|
62
|
+
* @property {string} method - HTTP method or "*"
|
|
63
|
+
* @property {string} path - Canonicalized path
|
|
64
|
+
* @property {string} source - Relative file path
|
|
65
|
+
* @property {"high"|"med"|"low"} confidence
|
|
66
|
+
* @property {string} kind - fetch, axios_member, axios_config, useSWR, useQuery
|
|
67
|
+
* @property {Evidence[]} evidence
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @typedef {Object} EnvFact
|
|
72
|
+
* @property {string} name - Environment variable name
|
|
73
|
+
* @property {string[]} files - Files where it's referenced
|
|
74
|
+
* @property {boolean} hasDefault - Whether a default value exists
|
|
75
|
+
* @property {string} [defaultValue] - Default value if any
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @typedef {Object} Gap
|
|
80
|
+
* @property {string} kind - Gap type (e.g., "fastify_plugin_unresolved")
|
|
81
|
+
* @property {string} [file] - Related file
|
|
82
|
+
* @property {string} [spec] - Module specifier
|
|
83
|
+
* @property {string} [name] - Identifier name
|
|
84
|
+
* @property {string} [note] - Additional notes
|
|
85
|
+
* @property {string} [error] - Error message if from catch
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @typedef {Object} AdapterResult
|
|
90
|
+
* @property {RouteFact[]} routes
|
|
91
|
+
* @property {ClientRefFact[]} clientRefs
|
|
92
|
+
* @property {Gap[]} gaps
|
|
93
|
+
* @property {Object} stats
|
|
94
|
+
* @property {number} stats.filesScanned
|
|
95
|
+
* @property {number} stats.parseErrors
|
|
96
|
+
* @property {number} [quality] - 0-1 extraction quality score
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @typedef {Object} Finding
|
|
101
|
+
* @property {string} id - Stable finding ID
|
|
102
|
+
* @property {string} title
|
|
103
|
+
* @property {string} description
|
|
104
|
+
* @property {"info"|"warn"|"block"} severity
|
|
105
|
+
* @property {"high"|"med"|"low"} confidence
|
|
106
|
+
* @property {Evidence[]} evidence
|
|
107
|
+
* @property {Gap[]} [gaps]
|
|
108
|
+
* @property {string} [suggestedFix]
|
|
109
|
+
* @property {string} [category]
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @typedef {Object} ScanResult
|
|
114
|
+
* @property {Finding[]} findings
|
|
115
|
+
* @property {Object} truthpack
|
|
116
|
+
* @property {Object} stats
|
|
117
|
+
* @property {number} stats.scanTimeMs
|
|
118
|
+
* @property {number} stats.filesIndexed
|
|
119
|
+
* @property {number} stats.routesFound
|
|
120
|
+
* @property {number} stats.clientRefsFound
|
|
121
|
+
* @property {number} stats.gapsFound
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
module.exports = {};
|