milens 0.6.3 → 0.6.4
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/.agents/skills/adapters/SKILL.md +31 -0
- package/.agents/skills/analyzer/SKILL.md +55 -0
- package/.agents/skills/apps/SKILL.md +42 -0
- package/.agents/skills/docs/SKILL.md +46 -0
- package/.agents/skills/milens/SKILL.md +168 -0
- package/.agents/skills/milens-code-review/SKILL.md +186 -0
- package/.agents/skills/milens-eval/SKILL.md +221 -0
- package/.agents/skills/milens-plan/SKILL.md +227 -0
- package/.agents/skills/milens-refactor-clean/SKILL.md +209 -0
- package/.agents/skills/milens-security-review/SKILL.md +224 -0
- package/.agents/skills/milens-tdd/SKILL.md +156 -0
- package/.agents/skills/parser/SKILL.md +60 -0
- package/.agents/skills/root/SKILL.md +64 -0
- package/.agents/skills/scripts/SKILL.md +27 -0
- package/.agents/skills/security/SKILL.md +44 -0
- package/.agents/skills/server/SKILL.md +46 -0
- package/.agents/skills/store/SKILL.md +53 -0
- package/.agents/skills/test/SKILL.md +73 -0
- package/LICENSE +75 -75
- package/README.md +508 -432
- package/adapters/README.md +107 -0
- package/adapters/claude-code/.claude/mcp.json +9 -0
- package/adapters/claude-code/CLAUDE.md +58 -0
- package/adapters/codex/.codex/codex.md +52 -0
- package/adapters/copilot/.github/copilot-instructions.md +62 -0
- package/adapters/cursor/.cursorrules +9 -0
- package/adapters/gemini/.gemini/context.md +58 -0
- package/adapters/opencode/.opencode/config.json +9 -0
- package/adapters/opencode/AGENTS.md +58 -0
- package/adapters/zed/.zed/settings.json +8 -0
- package/dist/agents-md.d.ts +3 -0
- package/dist/agents-md.d.ts.map +1 -0
- package/dist/agents-md.js +112 -0
- package/dist/agents-md.js.map +1 -0
- package/dist/analyzer/engine.js +1 -1
- package/dist/analyzer/engine.js.map +1 -1
- package/dist/cli.js +1190 -401
- package/dist/cli.js.map +1 -1
- package/dist/metrics.d.ts +51 -0
- package/dist/metrics.d.ts.map +1 -0
- package/dist/metrics.js +64 -0
- package/dist/metrics.js.map +1 -0
- package/dist/parser/lang-go.js +47 -47
- package/dist/parser/lang-java.js +29 -29
- package/dist/parser/lang-js.js +105 -105
- package/dist/parser/lang-php.js +38 -38
- package/dist/parser/lang-py.js +34 -34
- package/dist/parser/lang-ruby.js +14 -14
- package/dist/parser/lang-rust.js +30 -30
- package/dist/parser/lang-ts.js +191 -191
- package/dist/security/deps.d.ts +38 -0
- package/dist/security/deps.d.ts.map +1 -0
- package/dist/security/deps.js +685 -0
- package/dist/security/deps.js.map +1 -0
- package/dist/security/rules.d.ts +42 -0
- package/dist/security/rules.d.ts.map +1 -0
- package/dist/security/rules.js +940 -0
- package/dist/security/rules.js.map +1 -0
- package/dist/server/hooks.d.ts +26 -0
- package/dist/server/hooks.d.ts.map +1 -0
- package/dist/server/hooks.js +253 -0
- package/dist/server/hooks.js.map +1 -0
- package/dist/server/mcp-prompts.d.ts +277 -0
- package/dist/server/mcp-prompts.d.ts.map +1 -0
- package/dist/server/mcp-prompts.js +627 -0
- package/dist/server/mcp-prompts.js.map +1 -0
- package/dist/server/mcp.d.ts.map +1 -1
- package/dist/server/mcp.js +618 -643
- package/dist/server/mcp.js.map +1 -1
- package/dist/server/test-plan.d.ts +20 -0
- package/dist/server/test-plan.d.ts.map +1 -0
- package/dist/server/test-plan.js +100 -0
- package/dist/server/test-plan.js.map +1 -0
- package/dist/skills.js +152 -152
- package/dist/store/annotations.d.ts +41 -0
- package/dist/store/annotations.d.ts.map +1 -0
- package/dist/store/annotations.js +192 -0
- package/dist/store/annotations.js.map +1 -0
- package/dist/store/confidence.d.ts +18 -0
- package/dist/store/confidence.d.ts.map +1 -0
- package/dist/store/confidence.js +82 -0
- package/dist/store/confidence.js.map +1 -0
- package/dist/store/db.d.ts +37 -14
- package/dist/store/db.d.ts.map +1 -1
- package/dist/store/db.js +332 -239
- package/dist/store/db.js.map +1 -1
- package/dist/store/schema.sql +128 -116
- package/dist/store/vectors.js +2 -2
- package/dist/types.d.ts +101 -0
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +24 -0
- package/package.json +80 -66
- package/dist/gateway/analyzer.d.ts +0 -6
- package/dist/gateway/analyzer.d.ts.map +0 -1
- package/dist/gateway/analyzer.js +0 -218
- package/dist/gateway/analyzer.js.map +0 -1
- package/dist/gateway/cache.d.ts +0 -35
- package/dist/gateway/cache.d.ts.map +0 -1
- package/dist/gateway/cache.js +0 -175
- package/dist/gateway/cache.js.map +0 -1
- package/dist/gateway/config.d.ts +0 -10
- package/dist/gateway/config.d.ts.map +0 -1
- package/dist/gateway/config.js +0 -167
- package/dist/gateway/config.js.map +0 -1
- package/dist/gateway/context-memory.d.ts +0 -68
- package/dist/gateway/context-memory.d.ts.map +0 -1
- package/dist/gateway/context-memory.js +0 -157
- package/dist/gateway/context-memory.js.map +0 -1
- package/dist/gateway/observability.d.ts +0 -83
- package/dist/gateway/observability.d.ts.map +0 -1
- package/dist/gateway/observability.js +0 -152
- package/dist/gateway/observability.js.map +0 -1
- package/dist/gateway/privacy.d.ts +0 -27
- package/dist/gateway/privacy.d.ts.map +0 -1
- package/dist/gateway/privacy.js +0 -139
- package/dist/gateway/privacy.js.map +0 -1
- package/dist/gateway/providers.d.ts +0 -66
- package/dist/gateway/providers.d.ts.map +0 -1
- package/dist/gateway/providers.js +0 -377
- package/dist/gateway/providers.js.map +0 -1
- package/dist/gateway/router.d.ts +0 -18
- package/dist/gateway/router.d.ts.map +0 -1
- package/dist/gateway/router.js +0 -102
- package/dist/gateway/router.js.map +0 -1
- package/dist/gateway/server.d.ts +0 -20
- package/dist/gateway/server.d.ts.map +0 -1
- package/dist/gateway/server.js +0 -387
- package/dist/gateway/server.js.map +0 -1
- package/dist/gateway/translator.d.ts +0 -19
- package/dist/gateway/translator.d.ts.map +0 -1
- package/dist/gateway/translator.js +0 -340
- package/dist/gateway/translator.js.map +0 -1
- package/dist/gateway/types.d.ts +0 -215
- package/dist/gateway/types.d.ts.map +0 -1
- package/dist/gateway/types.js +0 -3
- package/dist/gateway/types.js.map +0 -1
- package/dist/store/gateway-schema.sql +0 -53
package/dist/parser/lang-ts.js
CHANGED
|
@@ -5,212 +5,212 @@ const spec = {
|
|
|
5
5
|
extensions: ['.ts', '.tsx'],
|
|
6
6
|
wasmName: 'tree-sitter-tsx',
|
|
7
7
|
queries: {
|
|
8
|
-
functions: `[
|
|
9
|
-
(function_declaration name: (identifier) @name) @def
|
|
10
|
-
(generator_function_declaration name: (identifier) @name) @def
|
|
11
|
-
(lexical_declaration
|
|
12
|
-
(variable_declarator
|
|
13
|
-
name: (identifier) @name
|
|
14
|
-
value: (arrow_function)
|
|
15
|
-
)
|
|
16
|
-
) @def
|
|
8
|
+
functions: `[
|
|
9
|
+
(function_declaration name: (identifier) @name) @def
|
|
10
|
+
(generator_function_declaration name: (identifier) @name) @def
|
|
11
|
+
(lexical_declaration
|
|
12
|
+
(variable_declarator
|
|
13
|
+
name: (identifier) @name
|
|
14
|
+
value: (arrow_function)
|
|
15
|
+
)
|
|
16
|
+
) @def
|
|
17
17
|
]`,
|
|
18
18
|
classes: `(class_declaration name: (type_identifier) @name) @def`,
|
|
19
19
|
methods: `(method_definition name: (property_identifier) @name) @def`,
|
|
20
20
|
interfaces: `(interface_declaration name: (type_identifier) @name) @def`,
|
|
21
21
|
enums: `(enum_declaration name: (identifier) @name) @def`,
|
|
22
22
|
types: `(type_alias_declaration name: (type_identifier) @name) @def`,
|
|
23
|
-
variables: `(program (lexical_declaration
|
|
23
|
+
variables: `(program (lexical_declaration
|
|
24
24
|
(variable_declarator name: (identifier) @name)) @def)`,
|
|
25
|
-
imports: `[
|
|
26
|
-
(import_statement
|
|
27
|
-
source: (string (string_fragment) @source)
|
|
28
|
-
) @def
|
|
29
|
-
(call_expression
|
|
30
|
-
function: (import)
|
|
31
|
-
arguments: (arguments (string (string_fragment) @source))
|
|
32
|
-
) @def
|
|
33
|
-
(lexical_declaration
|
|
34
|
-
(variable_declarator
|
|
35
|
-
value: (call_expression
|
|
36
|
-
function: (identifier) @_req
|
|
37
|
-
arguments: (arguments (string (string_fragment) @source))
|
|
38
|
-
)
|
|
39
|
-
)
|
|
40
|
-
) @def
|
|
25
|
+
imports: `[
|
|
26
|
+
(import_statement
|
|
27
|
+
source: (string (string_fragment) @source)
|
|
28
|
+
) @def
|
|
29
|
+
(call_expression
|
|
30
|
+
function: (import)
|
|
31
|
+
arguments: (arguments (string (string_fragment) @source))
|
|
32
|
+
) @def
|
|
33
|
+
(lexical_declaration
|
|
34
|
+
(variable_declarator
|
|
35
|
+
value: (call_expression
|
|
36
|
+
function: (identifier) @_req
|
|
37
|
+
arguments: (arguments (string (string_fragment) @source))
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
) @def
|
|
41
41
|
]`,
|
|
42
|
-
exports: `[
|
|
43
|
-
(export_statement
|
|
44
|
-
declaration: (function_declaration name: (identifier) @name)
|
|
45
|
-
)
|
|
46
|
-
(export_statement
|
|
47
|
-
declaration: (class_declaration name: (type_identifier) @name)
|
|
48
|
-
)
|
|
49
|
-
(export_statement
|
|
50
|
-
declaration: (interface_declaration name: (type_identifier) @name)
|
|
51
|
-
)
|
|
52
|
-
(export_statement
|
|
53
|
-
declaration: (enum_declaration name: (identifier) @name)
|
|
54
|
-
)
|
|
55
|
-
(export_statement
|
|
56
|
-
declaration: (lexical_declaration
|
|
57
|
-
(variable_declarator name: (identifier) @name)
|
|
58
|
-
)
|
|
59
|
-
)
|
|
60
|
-
(export_statement
|
|
61
|
-
(export_clause (export_specifier name: (identifier) @name))
|
|
62
|
-
)
|
|
63
|
-
(export_statement
|
|
64
|
-
declaration: (type_alias_declaration name: (type_identifier) @name)
|
|
65
|
-
)
|
|
66
|
-
(export_statement
|
|
67
|
-
declaration: (generator_function_declaration name: (identifier) @name)
|
|
68
|
-
)
|
|
69
|
-
(export_statement
|
|
70
|
-
value: (identifier) @name
|
|
71
|
-
)
|
|
42
|
+
exports: `[
|
|
43
|
+
(export_statement
|
|
44
|
+
declaration: (function_declaration name: (identifier) @name)
|
|
45
|
+
)
|
|
46
|
+
(export_statement
|
|
47
|
+
declaration: (class_declaration name: (type_identifier) @name)
|
|
48
|
+
)
|
|
49
|
+
(export_statement
|
|
50
|
+
declaration: (interface_declaration name: (type_identifier) @name)
|
|
51
|
+
)
|
|
52
|
+
(export_statement
|
|
53
|
+
declaration: (enum_declaration name: (identifier) @name)
|
|
54
|
+
)
|
|
55
|
+
(export_statement
|
|
56
|
+
declaration: (lexical_declaration
|
|
57
|
+
(variable_declarator name: (identifier) @name)
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
(export_statement
|
|
61
|
+
(export_clause (export_specifier name: (identifier) @name))
|
|
62
|
+
)
|
|
63
|
+
(export_statement
|
|
64
|
+
declaration: (type_alias_declaration name: (type_identifier) @name)
|
|
65
|
+
)
|
|
66
|
+
(export_statement
|
|
67
|
+
declaration: (generator_function_declaration name: (identifier) @name)
|
|
68
|
+
)
|
|
69
|
+
(export_statement
|
|
70
|
+
value: (identifier) @name
|
|
71
|
+
)
|
|
72
72
|
]`,
|
|
73
|
-
calls: `[
|
|
74
|
-
(call_expression function: (identifier) @callee) @def
|
|
75
|
-
(call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee)) @def
|
|
76
|
-
(new_expression constructor: (identifier) @callee) @def
|
|
77
|
-
(new_expression constructor: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
78
|
-
(decorator (identifier) @callee) @def
|
|
79
|
-
(decorator (call_expression arguments: (arguments (identifier) @callee))) @def
|
|
80
|
-
(decorator (call_expression arguments: (arguments (object (pair value: (identifier) @callee))))) @def
|
|
81
|
-
(decorator (call_expression arguments: (arguments (object (pair value: (array (identifier) @callee)))))) @def
|
|
82
|
-
(decorator (call_expression arguments: (arguments (object (pair value: (array (object (pair value: (identifier) @callee)))))))) @def
|
|
83
|
-
(decorator (call_expression arguments: (arguments (arrow_function body: (identifier) @callee)))) @def
|
|
84
|
-
(decorator (call_expression arguments: (arguments (object (pair value: (arrow_function body: (identifier) @callee)))))) @def
|
|
85
|
-
(call_expression arguments: (arguments (identifier) @callee)) @def
|
|
86
|
-
(call_expression arguments: (arguments (object (pair value: (identifier) @callee)))) @def
|
|
87
|
-
(call_expression arguments: (arguments (object (pair value: (array (identifier) @callee))))) @def
|
|
88
|
-
(jsx_self_closing_element name: (identifier) @callee) @def
|
|
89
|
-
(jsx_opening_element name: (identifier) @callee) @def
|
|
90
|
-
(jsx_self_closing_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
91
|
-
(jsx_opening_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
73
|
+
calls: `[
|
|
74
|
+
(call_expression function: (identifier) @callee) @def
|
|
75
|
+
(call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee)) @def
|
|
76
|
+
(new_expression constructor: (identifier) @callee) @def
|
|
77
|
+
(new_expression constructor: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
78
|
+
(decorator (identifier) @callee) @def
|
|
79
|
+
(decorator (call_expression arguments: (arguments (identifier) @callee))) @def
|
|
80
|
+
(decorator (call_expression arguments: (arguments (object (pair value: (identifier) @callee))))) @def
|
|
81
|
+
(decorator (call_expression arguments: (arguments (object (pair value: (array (identifier) @callee)))))) @def
|
|
82
|
+
(decorator (call_expression arguments: (arguments (object (pair value: (array (object (pair value: (identifier) @callee)))))))) @def
|
|
83
|
+
(decorator (call_expression arguments: (arguments (arrow_function body: (identifier) @callee)))) @def
|
|
84
|
+
(decorator (call_expression arguments: (arguments (object (pair value: (arrow_function body: (identifier) @callee)))))) @def
|
|
85
|
+
(call_expression arguments: (arguments (identifier) @callee)) @def
|
|
86
|
+
(call_expression arguments: (arguments (object (pair value: (identifier) @callee)))) @def
|
|
87
|
+
(call_expression arguments: (arguments (object (pair value: (array (identifier) @callee))))) @def
|
|
88
|
+
(jsx_self_closing_element name: (identifier) @callee) @def
|
|
89
|
+
(jsx_opening_element name: (identifier) @callee) @def
|
|
90
|
+
(jsx_self_closing_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
91
|
+
(jsx_opening_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
92
92
|
]`,
|
|
93
|
-
heritage: `[
|
|
94
|
-
(class_declaration
|
|
95
|
-
name: (type_identifier) @child
|
|
96
|
-
(class_heritage (extends_clause value: (identifier) @parent))
|
|
97
|
-
) @def
|
|
98
|
-
(class_declaration
|
|
99
|
-
name: (type_identifier) @child
|
|
100
|
-
(class_heritage (implements_clause (type_identifier) @parent))
|
|
101
|
-
) @def
|
|
93
|
+
heritage: `[
|
|
94
|
+
(class_declaration
|
|
95
|
+
name: (type_identifier) @child
|
|
96
|
+
(class_heritage (extends_clause value: (identifier) @parent))
|
|
97
|
+
) @def
|
|
98
|
+
(class_declaration
|
|
99
|
+
name: (type_identifier) @child
|
|
100
|
+
(class_heritage (implements_clause (type_identifier) @parent))
|
|
101
|
+
) @def
|
|
102
102
|
]`,
|
|
103
|
-
reExports: `[
|
|
104
|
-
(export_statement
|
|
105
|
-
source: (string (string_fragment) @source)
|
|
106
|
-
(export_clause (export_specifier name: (identifier) @name))
|
|
107
|
-
) @def
|
|
108
|
-
(export_statement
|
|
109
|
-
source: (string (string_fragment) @source)
|
|
110
|
-
"*"
|
|
111
|
-
) @def
|
|
103
|
+
reExports: `[
|
|
104
|
+
(export_statement
|
|
105
|
+
source: (string (string_fragment) @source)
|
|
106
|
+
(export_clause (export_specifier name: (identifier) @name))
|
|
107
|
+
) @def
|
|
108
|
+
(export_statement
|
|
109
|
+
source: (string (string_fragment) @source)
|
|
110
|
+
"*"
|
|
111
|
+
) @def
|
|
112
112
|
]`,
|
|
113
|
-
typeBindings: `[
|
|
114
|
-
(lexical_declaration
|
|
115
|
-
(variable_declarator
|
|
116
|
-
name: (identifier) @var
|
|
117
|
-
value: (new_expression constructor: (identifier) @type)
|
|
118
|
-
)
|
|
119
|
-
)
|
|
120
|
-
(lexical_declaration
|
|
121
|
-
(variable_declarator
|
|
122
|
-
name: (identifier) @var
|
|
123
|
-
type: (type_annotation (type_identifier) @type)
|
|
124
|
-
)
|
|
125
|
-
)
|
|
126
|
-
(required_parameter
|
|
127
|
-
pattern: (identifier) @var
|
|
128
|
-
type: (type_annotation (type_identifier) @type)
|
|
129
|
-
)
|
|
130
|
-
(public_field_definition
|
|
131
|
-
name: (property_identifier) @var
|
|
132
|
-
type: (type_annotation (type_identifier) @type)
|
|
133
|
-
)
|
|
134
|
-
(lexical_declaration
|
|
135
|
-
(variable_declarator
|
|
136
|
-
name: (identifier) @var
|
|
137
|
-
type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
|
|
138
|
-
)
|
|
139
|
-
)
|
|
140
|
-
(required_parameter
|
|
141
|
-
pattern: (identifier) @var
|
|
142
|
-
type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
|
|
143
|
-
)
|
|
144
|
-
(public_field_definition
|
|
145
|
-
name: (property_identifier) @var
|
|
146
|
-
type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
|
|
147
|
-
)
|
|
113
|
+
typeBindings: `[
|
|
114
|
+
(lexical_declaration
|
|
115
|
+
(variable_declarator
|
|
116
|
+
name: (identifier) @var
|
|
117
|
+
value: (new_expression constructor: (identifier) @type)
|
|
118
|
+
)
|
|
119
|
+
)
|
|
120
|
+
(lexical_declaration
|
|
121
|
+
(variable_declarator
|
|
122
|
+
name: (identifier) @var
|
|
123
|
+
type: (type_annotation (type_identifier) @type)
|
|
124
|
+
)
|
|
125
|
+
)
|
|
126
|
+
(required_parameter
|
|
127
|
+
pattern: (identifier) @var
|
|
128
|
+
type: (type_annotation (type_identifier) @type)
|
|
129
|
+
)
|
|
130
|
+
(public_field_definition
|
|
131
|
+
name: (property_identifier) @var
|
|
132
|
+
type: (type_annotation (type_identifier) @type)
|
|
133
|
+
)
|
|
134
|
+
(lexical_declaration
|
|
135
|
+
(variable_declarator
|
|
136
|
+
name: (identifier) @var
|
|
137
|
+
type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
|
|
138
|
+
)
|
|
139
|
+
)
|
|
140
|
+
(required_parameter
|
|
141
|
+
pattern: (identifier) @var
|
|
142
|
+
type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
|
|
143
|
+
)
|
|
144
|
+
(public_field_definition
|
|
145
|
+
name: (property_identifier) @var
|
|
146
|
+
type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
|
|
147
|
+
)
|
|
148
148
|
]`,
|
|
149
|
-
assignmentChains: `[
|
|
150
|
-
(lexical_declaration
|
|
151
|
-
(variable_declarator
|
|
152
|
-
name: (identifier) @target
|
|
153
|
-
value: (identifier) @source
|
|
154
|
-
)
|
|
155
|
-
)
|
|
149
|
+
assignmentChains: `[
|
|
150
|
+
(lexical_declaration
|
|
151
|
+
(variable_declarator
|
|
152
|
+
name: (identifier) @target
|
|
153
|
+
value: (identifier) @source
|
|
154
|
+
)
|
|
155
|
+
)
|
|
156
156
|
]`,
|
|
157
|
-
returnTypes: `[
|
|
158
|
-
(function_declaration
|
|
159
|
-
name: (identifier) @name
|
|
160
|
-
return_type: (type_annotation (type_identifier) @returnType)
|
|
161
|
-
)
|
|
162
|
-
(lexical_declaration
|
|
163
|
-
(variable_declarator
|
|
164
|
-
name: (identifier) @name
|
|
165
|
-
value: (arrow_function
|
|
166
|
-
return_type: (type_annotation (type_identifier) @returnType)
|
|
167
|
-
)
|
|
168
|
-
)
|
|
169
|
-
)
|
|
170
|
-
(class_declaration
|
|
171
|
-
name: (type_identifier) @className
|
|
172
|
-
body: (class_body
|
|
173
|
-
(method_definition
|
|
174
|
-
name: (property_identifier) @name
|
|
175
|
-
return_type: (type_annotation (type_identifier) @returnType)
|
|
176
|
-
)
|
|
177
|
-
)
|
|
178
|
-
)
|
|
179
|
-
(function_declaration
|
|
180
|
-
name: (identifier) @name
|
|
181
|
-
return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
|
|
182
|
-
)
|
|
183
|
-
(lexical_declaration
|
|
184
|
-
(variable_declarator
|
|
185
|
-
name: (identifier) @name
|
|
186
|
-
value: (arrow_function
|
|
187
|
-
return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
|
|
188
|
-
)
|
|
189
|
-
)
|
|
190
|
-
)
|
|
191
|
-
(class_declaration
|
|
192
|
-
name: (type_identifier) @className
|
|
193
|
-
body: (class_body
|
|
194
|
-
(method_definition
|
|
195
|
-
name: (property_identifier) @name
|
|
196
|
-
return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
|
|
197
|
-
)
|
|
198
|
-
)
|
|
199
|
-
)
|
|
157
|
+
returnTypes: `[
|
|
158
|
+
(function_declaration
|
|
159
|
+
name: (identifier) @name
|
|
160
|
+
return_type: (type_annotation (type_identifier) @returnType)
|
|
161
|
+
)
|
|
162
|
+
(lexical_declaration
|
|
163
|
+
(variable_declarator
|
|
164
|
+
name: (identifier) @name
|
|
165
|
+
value: (arrow_function
|
|
166
|
+
return_type: (type_annotation (type_identifier) @returnType)
|
|
167
|
+
)
|
|
168
|
+
)
|
|
169
|
+
)
|
|
170
|
+
(class_declaration
|
|
171
|
+
name: (type_identifier) @className
|
|
172
|
+
body: (class_body
|
|
173
|
+
(method_definition
|
|
174
|
+
name: (property_identifier) @name
|
|
175
|
+
return_type: (type_annotation (type_identifier) @returnType)
|
|
176
|
+
)
|
|
177
|
+
)
|
|
178
|
+
)
|
|
179
|
+
(function_declaration
|
|
180
|
+
name: (identifier) @name
|
|
181
|
+
return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
|
|
182
|
+
)
|
|
183
|
+
(lexical_declaration
|
|
184
|
+
(variable_declarator
|
|
185
|
+
name: (identifier) @name
|
|
186
|
+
value: (arrow_function
|
|
187
|
+
return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
|
|
188
|
+
)
|
|
189
|
+
)
|
|
190
|
+
)
|
|
191
|
+
(class_declaration
|
|
192
|
+
name: (type_identifier) @className
|
|
193
|
+
body: (class_body
|
|
194
|
+
(method_definition
|
|
195
|
+
name: (property_identifier) @name
|
|
196
|
+
return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
|
|
197
|
+
)
|
|
198
|
+
)
|
|
199
|
+
)
|
|
200
200
|
]`,
|
|
201
|
-
callResultBindings: `[
|
|
202
|
-
(lexical_declaration
|
|
203
|
-
(variable_declarator
|
|
204
|
-
name: (identifier) @var
|
|
205
|
-
value: (call_expression function: (identifier) @callee)
|
|
206
|
-
)
|
|
207
|
-
)
|
|
208
|
-
(lexical_declaration
|
|
209
|
-
(variable_declarator
|
|
210
|
-
name: (identifier) @var
|
|
211
|
-
value: (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee))
|
|
212
|
-
)
|
|
213
|
-
)
|
|
201
|
+
callResultBindings: `[
|
|
202
|
+
(lexical_declaration
|
|
203
|
+
(variable_declarator
|
|
204
|
+
name: (identifier) @var
|
|
205
|
+
value: (call_expression function: (identifier) @callee)
|
|
206
|
+
)
|
|
207
|
+
)
|
|
208
|
+
(lexical_declaration
|
|
209
|
+
(variable_declarator
|
|
210
|
+
name: (identifier) @var
|
|
211
|
+
value: (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee))
|
|
212
|
+
)
|
|
213
|
+
)
|
|
214
214
|
]`,
|
|
215
215
|
},
|
|
216
216
|
resolveImport(raw, fromFile, root, aliases) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type Ecosystem = 'npm' | 'python' | 'rust' | 'go' | 'java' | 'unknown';
|
|
2
|
+
export interface Dependency {
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
ecosystem: Ecosystem;
|
|
6
|
+
}
|
|
7
|
+
export interface Vulnerability {
|
|
8
|
+
id: string;
|
|
9
|
+
cve?: string;
|
|
10
|
+
severity: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
|
|
11
|
+
package: string;
|
|
12
|
+
affectedVersions: string;
|
|
13
|
+
fixedVersion?: string;
|
|
14
|
+
description: string;
|
|
15
|
+
}
|
|
16
|
+
export interface VulnerabilityReport {
|
|
17
|
+
ecosystem: Ecosystem;
|
|
18
|
+
totalDependencies: number;
|
|
19
|
+
vulnerableDependencies: number;
|
|
20
|
+
findings: Vulnerability[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Detect which package ecosystem a project uses by checking for manifest files.
|
|
24
|
+
*/
|
|
25
|
+
export declare function detectEcosystem(rootPath: string): Ecosystem;
|
|
26
|
+
/**
|
|
27
|
+
* Parse dependencies from manifest files.
|
|
28
|
+
*/
|
|
29
|
+
export declare function parseDependencies(rootPath: string, ecosystem: Ecosystem): Dependency[];
|
|
30
|
+
/**
|
|
31
|
+
* Check dependencies against known vulnerabilities (offline database).
|
|
32
|
+
*/
|
|
33
|
+
export declare function checkVulnerabilities(deps: Dependency[]): VulnerabilityReport;
|
|
34
|
+
/**
|
|
35
|
+
* Full audit: detect ecosystem → parse dependencies → check vulnerabilities.
|
|
36
|
+
*/
|
|
37
|
+
export declare function auditDependencies(rootPath: string): VulnerabilityReport;
|
|
38
|
+
//# sourceMappingURL=deps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/security/deps.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;AAE9E,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,SAAS,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AA8dD;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAO3D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,UAAU,EAAE,CAetF;AAiJD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,mBAAmB,CAwC5E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,CAIvE"}
|