@mka-rainmaker/ama 0.1.1 → 0.2.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 +36 -2
- package/dist/analyzers/baseline/analyzer.d.ts +19 -0
- package/dist/analyzers/baseline/analyzer.d.ts.map +1 -1
- package/dist/analyzers/baseline/analyzer.js +10 -0
- package/dist/analyzers/baseline/analyzer.js.map +1 -1
- package/dist/analyzers/baseline/go.d.ts.map +1 -1
- package/dist/analyzers/baseline/go.js +67 -0
- package/dist/analyzers/baseline/go.js.map +1 -1
- package/dist/analyzers/baseline/java.d.ts.map +1 -1
- package/dist/analyzers/baseline/java.js +84 -0
- package/dist/analyzers/baseline/java.js.map +1 -1
- package/dist/analyzers/baseline/php.d.ts.map +1 -1
- package/dist/analyzers/baseline/php.js +56 -0
- package/dist/analyzers/baseline/php.js.map +1 -1
- package/dist/analyzers/baseline/python.d.ts.map +1 -1
- package/dist/analyzers/baseline/python.js +257 -0
- package/dist/analyzers/baseline/python.js.map +1 -1
- package/dist/analyzers/baseline/rust.d.ts.map +1 -1
- package/dist/analyzers/baseline/rust.js +80 -0
- package/dist/analyzers/baseline/rust.js.map +1 -1
- package/dist/analyzers/sidecar/protocol.d.ts +22 -22
- package/dist/analyzers/typescript/analyzer.d.ts.map +1 -1
- package/dist/analyzers/typescript/analyzer.js +51 -1
- package/dist/analyzers/typescript/analyzer.js.map +1 -1
- package/dist/api.d.ts +34 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +38 -0
- package/dist/api.js.map +1 -0
- package/dist/cli/agents.d.ts +37 -0
- package/dist/cli/agents.d.ts.map +1 -0
- package/dist/cli/agents.js +86 -0
- package/dist/cli/agents.js.map +1 -0
- package/dist/cli/commands/install.d.ts +20 -0
- package/dist/cli/commands/install.d.ts.map +1 -0
- package/dist/cli/commands/install.js +117 -0
- package/dist/cli/commands/install.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/graph/index.d.ts +2 -1
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/index.js +2 -1
- package/dist/graph/index.js.map +1 -1
- package/dist/graph/prisma-link.d.ts +9 -4
- package/dist/graph/prisma-link.d.ts.map +1 -1
- package/dist/graph/prisma-link.js +25 -10
- package/dist/graph/prisma-link.js.map +1 -1
- package/dist/graph/python-calls.d.ts +14 -0
- package/dist/graph/python-calls.d.ts.map +1 -0
- package/dist/graph/python-calls.js +0 -0
- package/dist/graph/python-calls.js.map +1 -0
- package/dist/graph/types.d.ts +1 -1
- package/dist/graph/types.d.ts.map +1 -1
- package/dist/indexer/indexer.d.ts.map +1 -1
- package/dist/indexer/indexer.js +12 -1
- package/dist/indexer/indexer.js.map +1 -1
- package/dist/mcp/server.d.ts +7 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +66 -30
- package/dist/mcp/server.js.map +1 -1
- package/dist/query/service.d.ts +3 -0
- package/dist/query/service.d.ts.map +1 -1
- package/dist/query/service.js +18 -2
- package/dist/query/service.js.map +1 -1
- package/package.json +10 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
|
+
import { CALL_REF_PREFIX, symbolId } from "../../graph/index.js";
|
|
2
3
|
/**
|
|
3
4
|
* Resolve a Python relative import (`from .x import y`, `from . import m`,
|
|
4
5
|
* `from ..pkg import z`) to candidate repo-relative module files. The leading
|
|
@@ -43,6 +44,260 @@ function pythonImports(node, importerRel) {
|
|
|
43
44
|
}
|
|
44
45
|
return groups;
|
|
45
46
|
}
|
|
47
|
+
/** Flask/FastAPI HTTP-verb decorator attributes (`@app.get(...)`); `route` is handled
|
|
48
|
+
* separately as Flask's any-/default-GET form. (ama-bvg) */
|
|
49
|
+
const ROUTE_METHOD_ATTRS = new Set(["get", "post", "put", "delete", "patch", "options", "head"]);
|
|
50
|
+
/** Normalize a framework route path to the `:param` form — Flask `<id>`/`<int:id>` and
|
|
51
|
+
* FastAPI `{id}` both become `:id` — and ensure a leading slash. (ama-bvg) */
|
|
52
|
+
function normalizeRoutePath(p) {
|
|
53
|
+
const s = p.replace(/<(?:[^:>]+:)?([^>]+)>/g, ":$1").replace(/\{([^}]+)\}/g, ":$1");
|
|
54
|
+
return s.startsWith("/") ? s : `/${s}`;
|
|
55
|
+
}
|
|
56
|
+
/** The first string-literal argument of a call's `arguments`, unquoted. */
|
|
57
|
+
function firstStringArg(args) {
|
|
58
|
+
if (!args)
|
|
59
|
+
return undefined;
|
|
60
|
+
for (const a of args.namedChildren) {
|
|
61
|
+
if (a.type === "string")
|
|
62
|
+
return a.namedChildren.find((c) => c.type === "string_content")?.text;
|
|
63
|
+
}
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
/** Method + normalized path for a Flask/FastAPI route decorator, else undefined. `@x.route(p)`
|
|
67
|
+
* → GET (Flask default; the `methods=` kwarg is a later refinement); `@x.get(p)` etc. take the
|
|
68
|
+
* verb from the attribute name. (ama-bvg) */
|
|
69
|
+
function routeFromDecorator(dec) {
|
|
70
|
+
const call = dec.namedChildren.find((c) => c.type === "call");
|
|
71
|
+
const fn = call?.childForFieldName("function");
|
|
72
|
+
if (!call || fn?.type !== "attribute")
|
|
73
|
+
return undefined;
|
|
74
|
+
const attr = fn.childForFieldName("attribute")?.text?.toLowerCase();
|
|
75
|
+
if (!attr || (attr !== "route" && !ROUTE_METHOD_ATTRS.has(attr)))
|
|
76
|
+
return undefined;
|
|
77
|
+
const raw = firstStringArg(call.childForFieldName("arguments"));
|
|
78
|
+
if (raw === undefined)
|
|
79
|
+
return undefined;
|
|
80
|
+
return { method: attr === "route" ? "GET" : attr.toUpperCase(), path: normalizeRoutePath(raw) };
|
|
81
|
+
}
|
|
82
|
+
/** The handler's qualified name, matching walkSymbols' nesting: prepend each enclosing
|
|
83
|
+
* class/function name (a class method is `Class.method`; a top-level def is just its name). */
|
|
84
|
+
function qualifiedNameOf(fn) {
|
|
85
|
+
const own = fn.childForFieldName("name")?.text;
|
|
86
|
+
if (!own)
|
|
87
|
+
return undefined;
|
|
88
|
+
const parts = [];
|
|
89
|
+
for (let p = fn.parent; p; p = p.parent) {
|
|
90
|
+
if (p.type === "class_definition" || p.type === "function_definition") {
|
|
91
|
+
const n = p.childForFieldName("name")?.text;
|
|
92
|
+
if (n)
|
|
93
|
+
parts.unshift(n);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
parts.push(own);
|
|
97
|
+
return parts.join(".");
|
|
98
|
+
}
|
|
99
|
+
function* eachDecorated(node) {
|
|
100
|
+
if (node.type === "decorated_definition")
|
|
101
|
+
yield node;
|
|
102
|
+
for (const c of node.namedChildren)
|
|
103
|
+
yield* eachDecorated(c);
|
|
104
|
+
}
|
|
105
|
+
/** Detect Flask/FastAPI routes: a decorated function whose decorator is `@<obj>.route(path)`
|
|
106
|
+
* or `@<obj>.<verb>(path)` becomes a `METHOD /path` Route referencing the function. (ama-bvg) */
|
|
107
|
+
function pythonRoutes(root, rel) {
|
|
108
|
+
const nodes = [];
|
|
109
|
+
const edges = [];
|
|
110
|
+
for (const dd of eachDecorated(root)) {
|
|
111
|
+
const fn = dd.childForFieldName("definition");
|
|
112
|
+
if (fn?.type !== "function_definition")
|
|
113
|
+
continue;
|
|
114
|
+
const handler = qualifiedNameOf(fn);
|
|
115
|
+
if (!handler)
|
|
116
|
+
continue;
|
|
117
|
+
for (const dec of dd.namedChildren) {
|
|
118
|
+
if (dec.type !== "decorator")
|
|
119
|
+
continue;
|
|
120
|
+
const route = routeFromDecorator(dec);
|
|
121
|
+
if (!route)
|
|
122
|
+
continue;
|
|
123
|
+
const name = `${route.method} ${route.path}`;
|
|
124
|
+
const routeId = symbolId({ file: rel, qualifiedName: name });
|
|
125
|
+
nodes.push({
|
|
126
|
+
id: routeId,
|
|
127
|
+
kind: "Route",
|
|
128
|
+
name,
|
|
129
|
+
file: rel,
|
|
130
|
+
qualifiedName: name,
|
|
131
|
+
tier: "baseline",
|
|
132
|
+
range: { startLine: fn.startPosition.row + 1, endLine: fn.endPosition.row + 1 },
|
|
133
|
+
});
|
|
134
|
+
edges.push({
|
|
135
|
+
from: routeId,
|
|
136
|
+
to: symbolId({ file: rel, qualifiedName: handler }),
|
|
137
|
+
kind: "References",
|
|
138
|
+
provenance: "heuristic",
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return { nodes, edges };
|
|
143
|
+
}
|
|
144
|
+
/** Django URL-pattern functions in `urls.py`. */
|
|
145
|
+
const DJANGO_URL_FUNCS = new Set(["path", "re_path"]);
|
|
146
|
+
function* eachCall(node) {
|
|
147
|
+
if (node.type === "call")
|
|
148
|
+
yield node;
|
|
149
|
+
for (const c of node.namedChildren)
|
|
150
|
+
yield* eachCall(c);
|
|
151
|
+
}
|
|
152
|
+
/** Detect Django URL patterns: `path("users/<int:pk>/", view)` / `re_path(...)` in urls.py —
|
|
153
|
+
* method-agnostic (the view handles every verb), so each forms an `ANY /path` Route. The view
|
|
154
|
+
* is a cross-module reference (`views.foo`), not a same-file symbol, so no handler edge. (ama-a2r) */
|
|
155
|
+
function djangoUrlRoutes(root, rel) {
|
|
156
|
+
const nodes = [];
|
|
157
|
+
for (const call of eachCall(root)) {
|
|
158
|
+
const fn = call.childForFieldName("function");
|
|
159
|
+
if (fn?.type !== "identifier" || !DJANGO_URL_FUNCS.has(fn.text))
|
|
160
|
+
continue;
|
|
161
|
+
const raw = firstStringArg(call.childForFieldName("arguments"));
|
|
162
|
+
if (raw === undefined)
|
|
163
|
+
continue;
|
|
164
|
+
const name = `ANY ${normalizeRoutePath(raw)}`;
|
|
165
|
+
nodes.push({
|
|
166
|
+
id: symbolId({ file: rel, qualifiedName: name }),
|
|
167
|
+
kind: "Route",
|
|
168
|
+
name,
|
|
169
|
+
file: rel,
|
|
170
|
+
qualifiedName: name,
|
|
171
|
+
tier: "baseline",
|
|
172
|
+
range: { startLine: call.startPosition.row + 1, endLine: call.endPosition.row + 1 },
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return { nodes, edges: [] };
|
|
176
|
+
}
|
|
177
|
+
/** Python route detection across shapes: Flask/FastAPI decorators + Django urls.py `path()`. */
|
|
178
|
+
function pythonRoutesAll(root, rel) {
|
|
179
|
+
const decorated = pythonRoutes(root, rel);
|
|
180
|
+
const django = djangoUrlRoutes(root, rel);
|
|
181
|
+
return {
|
|
182
|
+
nodes: [...decorated.nodes, ...django.nodes],
|
|
183
|
+
edges: [...decorated.edges, ...django.edges],
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/** The nearest enclosing `function_definition` of a node, or undefined (module-level). */
|
|
187
|
+
function enclosingFunction(node) {
|
|
188
|
+
for (let p = node.parent; p; p = p.parent) {
|
|
189
|
+
if (p.type === "function_definition")
|
|
190
|
+
return p;
|
|
191
|
+
}
|
|
192
|
+
return undefined;
|
|
193
|
+
}
|
|
194
|
+
function* eachFunction(node) {
|
|
195
|
+
if (node.type === "function_definition")
|
|
196
|
+
yield node;
|
|
197
|
+
for (const c of node.namedChildren)
|
|
198
|
+
yield* eachFunction(c);
|
|
199
|
+
}
|
|
200
|
+
/** The simple (last-segment) name a call targets: `foo()` → "foo", `obj.bar()` → "bar". */
|
|
201
|
+
function calleeName(call) {
|
|
202
|
+
const fn = call.childForFieldName("function");
|
|
203
|
+
if (fn?.type === "identifier")
|
|
204
|
+
return fn.text;
|
|
205
|
+
if (fn?.type === "attribute")
|
|
206
|
+
return fn.childForFieldName("attribute")?.text;
|
|
207
|
+
return undefined;
|
|
208
|
+
}
|
|
209
|
+
/** Common Python builtins — not emitted as cross-file call candidates (they resolve to no
|
|
210
|
+
* project function, so they'd only add dangling candidates). (ama-bnj) */
|
|
211
|
+
const PYTHON_BUILTINS = new Set([
|
|
212
|
+
"print",
|
|
213
|
+
"len",
|
|
214
|
+
"range",
|
|
215
|
+
"str",
|
|
216
|
+
"int",
|
|
217
|
+
"float",
|
|
218
|
+
"bool",
|
|
219
|
+
"list",
|
|
220
|
+
"dict",
|
|
221
|
+
"set",
|
|
222
|
+
"tuple",
|
|
223
|
+
"isinstance",
|
|
224
|
+
"issubclass",
|
|
225
|
+
"super",
|
|
226
|
+
"open",
|
|
227
|
+
"enumerate",
|
|
228
|
+
"zip",
|
|
229
|
+
"map",
|
|
230
|
+
"filter",
|
|
231
|
+
"sorted",
|
|
232
|
+
"reversed",
|
|
233
|
+
"sum",
|
|
234
|
+
"min",
|
|
235
|
+
"max",
|
|
236
|
+
"abs",
|
|
237
|
+
"round",
|
|
238
|
+
"getattr",
|
|
239
|
+
"setattr",
|
|
240
|
+
"hasattr",
|
|
241
|
+
"type",
|
|
242
|
+
"repr",
|
|
243
|
+
"format",
|
|
244
|
+
"iter",
|
|
245
|
+
"next",
|
|
246
|
+
"any",
|
|
247
|
+
"all",
|
|
248
|
+
]);
|
|
249
|
+
/** Heuristic baseline call edges. A call to a function/method defined in the SAME file resolves
|
|
250
|
+
* straight to a `Calls` edge (name-based; an ambiguous name defined more than once, and
|
|
251
|
+
* module-level calls with no enclosing function, are skipped). A call to a name NOT defined
|
|
252
|
+
* locally (and not a builtin) becomes a `call:<name>` candidate that {@link deriveCallEdges}
|
|
253
|
+
* resolves cross-file via the import graph. (ama-bnj) */
|
|
254
|
+
function pythonCalls(root, rel) {
|
|
255
|
+
const byName = new Map(); // simple name → id, or null when ambiguous
|
|
256
|
+
for (const fn of eachFunction(root)) {
|
|
257
|
+
const qn = qualifiedNameOf(fn);
|
|
258
|
+
if (!qn)
|
|
259
|
+
continue;
|
|
260
|
+
const simple = qn.slice(qn.lastIndexOf(".") + 1);
|
|
261
|
+
byName.set(simple, byName.has(simple) ? null : symbolId({ file: rel, qualifiedName: qn }));
|
|
262
|
+
}
|
|
263
|
+
const edges = [];
|
|
264
|
+
const seen = new Set();
|
|
265
|
+
for (const call of eachCall(root)) {
|
|
266
|
+
const enc = enclosingFunction(call);
|
|
267
|
+
const name = calleeName(call);
|
|
268
|
+
if (!enc || !name)
|
|
269
|
+
continue;
|
|
270
|
+
const callerQn = qualifiedNameOf(enc);
|
|
271
|
+
if (!callerQn)
|
|
272
|
+
continue;
|
|
273
|
+
const from = symbolId({ file: rel, qualifiedName: callerQn });
|
|
274
|
+
const local = byName.get(name);
|
|
275
|
+
if (local === null)
|
|
276
|
+
continue; // a name defined more than once locally — don't guess
|
|
277
|
+
if (local) {
|
|
278
|
+
// resolved within this file (slice 1)
|
|
279
|
+
const key = `c ${from} ${local}`;
|
|
280
|
+
if (from === local || seen.has(key))
|
|
281
|
+
continue; // skip self-recursion + duplicate sites
|
|
282
|
+
seen.add(key);
|
|
283
|
+
edges.push({ from, to: local, kind: "Calls", provenance: "heuristic" });
|
|
284
|
+
}
|
|
285
|
+
else if (!PYTHON_BUILTINS.has(name)) {
|
|
286
|
+
// not local — a cross-file candidate deriveCallEdges resolves via the import graph (slice 2)
|
|
287
|
+
const key = `r ${from} ${name}`;
|
|
288
|
+
if (seen.has(key))
|
|
289
|
+
continue;
|
|
290
|
+
seen.add(key);
|
|
291
|
+
edges.push({
|
|
292
|
+
from,
|
|
293
|
+
to: `${CALL_REF_PREFIX}${name}`,
|
|
294
|
+
kind: "References",
|
|
295
|
+
provenance: "call-ref",
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return { nodes: [], edges };
|
|
300
|
+
}
|
|
46
301
|
/**
|
|
47
302
|
* Baseline (syntactic) spec for Python. Functions and classes are the symbols
|
|
48
303
|
* worth a node; methods are `function_definition` too (Python doesn't
|
|
@@ -59,5 +314,7 @@ export const pythonSpec = {
|
|
|
59
314
|
class_definition: { kind: "Class" },
|
|
60
315
|
},
|
|
61
316
|
resolveImports: pythonImports,
|
|
317
|
+
collectRoutes: pythonRoutesAll,
|
|
318
|
+
collectCalls: pythonCalls,
|
|
62
319
|
};
|
|
63
320
|
//# sourceMappingURL=python.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"python.js","sour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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rust.d.ts","sourceRoot":"","sources":["../../../src/analyzers/baseline/rust.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rust.d.ts","sourceRoot":"","sources":["../../../src/analyzers/baseline/rust.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AA2GlD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,EAAE,YActB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
|
+
import { symbolId } from "../../graph/index.js";
|
|
2
3
|
/** Files whose `mod foo;` submodules live in the *same* directory (a crate root
|
|
3
4
|
* or a `mod.rs`); any other `foo.rs` owns a `foo/` directory for its submodules. */
|
|
4
5
|
const RUST_DIR_MODULES = new Set(["mod", "lib", "main"]);
|
|
@@ -21,6 +22,84 @@ function rustImports(node, importerRel) {
|
|
|
21
22
|
const base = baseDir === "." ? name : `${baseDir}/${name}`;
|
|
22
23
|
return [[`${base}.rs`, `${base}/mod.rs`]];
|
|
23
24
|
}
|
|
25
|
+
/** actix-web route attribute macros — `#[get("/x")]` — by macro name → HTTP verb. (ama-a2r) */
|
|
26
|
+
const RUST_ROUTE_VERBS = new Map([
|
|
27
|
+
["get", "GET"],
|
|
28
|
+
["post", "POST"],
|
|
29
|
+
["put", "PUT"],
|
|
30
|
+
["delete", "DELETE"],
|
|
31
|
+
["patch", "PATCH"],
|
|
32
|
+
["head", "HEAD"],
|
|
33
|
+
]);
|
|
34
|
+
function firstOfType(node, type) {
|
|
35
|
+
if (node.type === type)
|
|
36
|
+
return node;
|
|
37
|
+
for (const c of node.namedChildren) {
|
|
38
|
+
const found = firstOfType(c, type);
|
|
39
|
+
if (found)
|
|
40
|
+
return found;
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
/** Normalize an actix route path: `{id}` → `:id`; ensure a leading slash. (ama-a2r) */
|
|
45
|
+
function normalizeRustRoutePath(p) {
|
|
46
|
+
const s = p.replace(/\{([^}]+)\}/g, ":$1");
|
|
47
|
+
return s.startsWith("/") ? s : `/${s}`;
|
|
48
|
+
}
|
|
49
|
+
/** A route `{verb, path}` among the `attribute_item`s immediately preceding `siblings[fnIndex]`
|
|
50
|
+
* (a function_item), or undefined — `#[get("/x")]` → `attribute` (`get` + a string token). */
|
|
51
|
+
function rustRouteFromAttrs(siblings, fnIndex) {
|
|
52
|
+
for (let j = fnIndex - 1; j >= 0 && siblings[j]?.type === "attribute_item"; j--) {
|
|
53
|
+
const attr = siblings[j]?.namedChildren.find((c) => c.type === "attribute");
|
|
54
|
+
if (!attr)
|
|
55
|
+
continue;
|
|
56
|
+
const verb = RUST_ROUTE_VERBS.get(firstOfType(attr, "identifier")?.text ?? "");
|
|
57
|
+
const str = firstOfType(attr, "string_literal");
|
|
58
|
+
if (verb && str)
|
|
59
|
+
return { verb, path: str.text.replace(/^"|"$/g, "") };
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
/** Detect actix-web routes: a `#[get("/x")]`-style attribute on a `fn` becomes a `METHOD /x`
|
|
64
|
+
* Route referencing the function. Recurses so functions inside `mod` blocks are covered. (ama-a2r) */
|
|
65
|
+
function rustRoutes(root, rel) {
|
|
66
|
+
const nodes = [];
|
|
67
|
+
const edges = [];
|
|
68
|
+
const visit = (node) => {
|
|
69
|
+
const kids = node.namedChildren;
|
|
70
|
+
for (let i = 0; i < kids.length; i++) {
|
|
71
|
+
const k = kids[i];
|
|
72
|
+
if (!k)
|
|
73
|
+
continue;
|
|
74
|
+
if (k.type === "function_item") {
|
|
75
|
+
const route = rustRouteFromAttrs(kids, i);
|
|
76
|
+
const fnName = k.childForFieldName("name")?.text;
|
|
77
|
+
if (route && fnName) {
|
|
78
|
+
const name = `${route.verb} ${normalizeRustRoutePath(route.path)}`;
|
|
79
|
+
const routeId = symbolId({ file: rel, qualifiedName: name });
|
|
80
|
+
nodes.push({
|
|
81
|
+
id: routeId,
|
|
82
|
+
kind: "Route",
|
|
83
|
+
name,
|
|
84
|
+
file: rel,
|
|
85
|
+
qualifiedName: name,
|
|
86
|
+
tier: "baseline",
|
|
87
|
+
range: { startLine: k.startPosition.row + 1, endLine: k.endPosition.row + 1 },
|
|
88
|
+
});
|
|
89
|
+
edges.push({
|
|
90
|
+
from: routeId,
|
|
91
|
+
to: symbolId({ file: rel, qualifiedName: fnName }),
|
|
92
|
+
kind: "References",
|
|
93
|
+
provenance: "heuristic",
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
visit(k);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
visit(root);
|
|
101
|
+
return { nodes, edges };
|
|
102
|
+
}
|
|
24
103
|
/**
|
|
25
104
|
* Baseline (syntactic) spec for Rust. Rust gives each kind its own node type, so
|
|
26
105
|
* the plain map suffices: struct → Class, enum → Enum, trait → Interface, fn →
|
|
@@ -41,5 +120,6 @@ export const rustSpec = {
|
|
|
41
120
|
trait_item: { kind: "Interface" },
|
|
42
121
|
},
|
|
43
122
|
resolveImports: rustImports,
|
|
123
|
+
collectRoutes: rustRoutes,
|
|
44
124
|
};
|
|
45
125
|
//# sourceMappingURL=rust.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rust.js","sourceRoot":"","sources":["../../../src/analyzers/baseline/rust.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"rust.js","sourceRoot":"","sources":["../../../src/analyzers/baseline/rust.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAkC,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhF;qFACqF;AACrF,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,MA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I;wBACnB,IAAI,EAAE,UAAU;wBAChB,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC,EAAE;qBAC9E,CAAC,CAAC;oBACH,KAAK,CAAC,IAAI,CAAC;wBACT,IAAI,EAAE,OAAO;wBACb,EAAE,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC;wBAClD,IAAI,EAAE,YAAY;wBAClB,UAAU,EAAE,WAAW;qBACxB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YACD,KAAK,CAAC,CAAC,CAAC,CAAC;QACX,CAAC;IACH,CAAC,CAAC;IACF,KAAK,CAAC,IAAI,CAAC,CAAC;IACZ,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAiB;IACpC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,CAAC,KAAK,CAAC;IACnB,OAAO,EAAE,MAAM;IACf,OAAO,EAAE;QACP,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;QACnC,8EAA8E;QAC9E,uBAAuB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;QAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QAC9B,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QAC3B,UAAU,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;KAClC;IACD,cAAc,EAAE,WAAW;IAC3B,aAAa,EAAE,UAAU;CAC1B,CAAC"}
|
|
@@ -22,9 +22,9 @@ export declare const graphNodeSchema: z.ZodObject<{
|
|
|
22
22
|
kind: "File" | "Module" | "Class" | "Interface" | "Enum" | "TypeAlias" | "Function" | "Method" | "Property" | "Variable" | "Route" | "Component";
|
|
23
23
|
name: string;
|
|
24
24
|
id: string;
|
|
25
|
+
tier: "deep" | "baseline";
|
|
25
26
|
file: string;
|
|
26
27
|
qualifiedName: string;
|
|
27
|
-
tier: "deep" | "baseline";
|
|
28
28
|
range?: {
|
|
29
29
|
startLine: number;
|
|
30
30
|
endLine: number;
|
|
@@ -33,9 +33,9 @@ export declare const graphNodeSchema: z.ZodObject<{
|
|
|
33
33
|
kind: "File" | "Module" | "Class" | "Interface" | "Enum" | "TypeAlias" | "Function" | "Method" | "Property" | "Variable" | "Route" | "Component";
|
|
34
34
|
name: string;
|
|
35
35
|
id: string;
|
|
36
|
+
tier: "deep" | "baseline";
|
|
36
37
|
file: string;
|
|
37
38
|
qualifiedName: string;
|
|
38
|
-
tier: "deep" | "baseline";
|
|
39
39
|
range?: {
|
|
40
40
|
startLine: number;
|
|
41
41
|
endLine: number;
|
|
@@ -75,11 +75,11 @@ export declare const graphEdgeSchema: z.ZodObject<{
|
|
|
75
75
|
line: number;
|
|
76
76
|
column: number;
|
|
77
77
|
} | undefined;
|
|
78
|
-
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
79
78
|
sites?: {
|
|
80
79
|
line: number;
|
|
81
80
|
column: number;
|
|
82
81
|
}[] | undefined;
|
|
82
|
+
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
83
83
|
}, {
|
|
84
84
|
kind: "Defines" | "Calls" | "Instantiates" | "Overrides" | "Inherits" | "Implements" | "UsesType" | "Returns" | "Imports" | "ImportsType" | "References";
|
|
85
85
|
from: string;
|
|
@@ -88,11 +88,11 @@ export declare const graphEdgeSchema: z.ZodObject<{
|
|
|
88
88
|
line: number;
|
|
89
89
|
column: number;
|
|
90
90
|
} | undefined;
|
|
91
|
-
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
92
91
|
sites?: {
|
|
93
92
|
line: number;
|
|
94
93
|
column: number;
|
|
95
94
|
}[] | undefined;
|
|
95
|
+
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
96
96
|
}>;
|
|
97
97
|
/** Ama → sidecar: analyze these repo-relative `files` rooted at the absolute `root`.
|
|
98
98
|
* `id` correlates the matching `result`/`error`. */
|
|
@@ -104,13 +104,13 @@ export declare const analyzeRequestSchema: z.ZodObject<{
|
|
|
104
104
|
}, "strip", z.ZodTypeAny, {
|
|
105
105
|
type: "analyze";
|
|
106
106
|
id: number;
|
|
107
|
-
root: string;
|
|
108
107
|
files: string[];
|
|
108
|
+
root: string;
|
|
109
109
|
}, {
|
|
110
110
|
type: "analyze";
|
|
111
111
|
id: number;
|
|
112
|
-
root: string;
|
|
113
112
|
files: string[];
|
|
113
|
+
root: string;
|
|
114
114
|
}>;
|
|
115
115
|
/** Sidecar → Ama: the analysis of one request's files. */
|
|
116
116
|
declare const resultSchema: z.ZodObject<{
|
|
@@ -137,9 +137,9 @@ declare const resultSchema: z.ZodObject<{
|
|
|
137
137
|
kind: "File" | "Module" | "Class" | "Interface" | "Enum" | "TypeAlias" | "Function" | "Method" | "Property" | "Variable" | "Route" | "Component";
|
|
138
138
|
name: string;
|
|
139
139
|
id: string;
|
|
140
|
+
tier: "deep" | "baseline";
|
|
140
141
|
file: string;
|
|
141
142
|
qualifiedName: string;
|
|
142
|
-
tier: "deep" | "baseline";
|
|
143
143
|
range?: {
|
|
144
144
|
startLine: number;
|
|
145
145
|
endLine: number;
|
|
@@ -148,9 +148,9 @@ declare const resultSchema: z.ZodObject<{
|
|
|
148
148
|
kind: "File" | "Module" | "Class" | "Interface" | "Enum" | "TypeAlias" | "Function" | "Method" | "Property" | "Variable" | "Route" | "Component";
|
|
149
149
|
name: string;
|
|
150
150
|
id: string;
|
|
151
|
+
tier: "deep" | "baseline";
|
|
151
152
|
file: string;
|
|
152
153
|
qualifiedName: string;
|
|
153
|
-
tier: "deep" | "baseline";
|
|
154
154
|
range?: {
|
|
155
155
|
startLine: number;
|
|
156
156
|
endLine: number;
|
|
@@ -189,11 +189,11 @@ declare const resultSchema: z.ZodObject<{
|
|
|
189
189
|
line: number;
|
|
190
190
|
column: number;
|
|
191
191
|
} | undefined;
|
|
192
|
-
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
193
192
|
sites?: {
|
|
194
193
|
line: number;
|
|
195
194
|
column: number;
|
|
196
195
|
}[] | undefined;
|
|
196
|
+
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
197
197
|
}, {
|
|
198
198
|
kind: "Defines" | "Calls" | "Instantiates" | "Overrides" | "Inherits" | "Implements" | "UsesType" | "Returns" | "Imports" | "ImportsType" | "References";
|
|
199
199
|
from: string;
|
|
@@ -202,11 +202,11 @@ declare const resultSchema: z.ZodObject<{
|
|
|
202
202
|
line: number;
|
|
203
203
|
column: number;
|
|
204
204
|
} | undefined;
|
|
205
|
-
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
206
205
|
sites?: {
|
|
207
206
|
line: number;
|
|
208
207
|
column: number;
|
|
209
208
|
}[] | undefined;
|
|
209
|
+
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
210
210
|
}>, "many">;
|
|
211
211
|
resolution: z.ZodOptional<z.ZodObject<{
|
|
212
212
|
callsTotal: z.ZodNumber;
|
|
@@ -226,9 +226,9 @@ declare const resultSchema: z.ZodObject<{
|
|
|
226
226
|
kind: "File" | "Module" | "Class" | "Interface" | "Enum" | "TypeAlias" | "Function" | "Method" | "Property" | "Variable" | "Route" | "Component";
|
|
227
227
|
name: string;
|
|
228
228
|
id: string;
|
|
229
|
+
tier: "deep" | "baseline";
|
|
229
230
|
file: string;
|
|
230
231
|
qualifiedName: string;
|
|
231
|
-
tier: "deep" | "baseline";
|
|
232
232
|
range?: {
|
|
233
233
|
startLine: number;
|
|
234
234
|
endLine: number;
|
|
@@ -242,11 +242,11 @@ declare const resultSchema: z.ZodObject<{
|
|
|
242
242
|
line: number;
|
|
243
243
|
column: number;
|
|
244
244
|
} | undefined;
|
|
245
|
-
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
246
245
|
sites?: {
|
|
247
246
|
line: number;
|
|
248
247
|
column: number;
|
|
249
248
|
}[] | undefined;
|
|
249
|
+
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
250
250
|
}[];
|
|
251
251
|
type: "result";
|
|
252
252
|
id: number;
|
|
@@ -260,9 +260,9 @@ declare const resultSchema: z.ZodObject<{
|
|
|
260
260
|
kind: "File" | "Module" | "Class" | "Interface" | "Enum" | "TypeAlias" | "Function" | "Method" | "Property" | "Variable" | "Route" | "Component";
|
|
261
261
|
name: string;
|
|
262
262
|
id: string;
|
|
263
|
+
tier: "deep" | "baseline";
|
|
263
264
|
file: string;
|
|
264
265
|
qualifiedName: string;
|
|
265
|
-
tier: "deep" | "baseline";
|
|
266
266
|
range?: {
|
|
267
267
|
startLine: number;
|
|
268
268
|
endLine: number;
|
|
@@ -276,11 +276,11 @@ declare const resultSchema: z.ZodObject<{
|
|
|
276
276
|
line: number;
|
|
277
277
|
column: number;
|
|
278
278
|
} | undefined;
|
|
279
|
-
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
280
279
|
sites?: {
|
|
281
280
|
line: number;
|
|
282
281
|
column: number;
|
|
283
282
|
}[] | undefined;
|
|
283
|
+
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
284
284
|
}[];
|
|
285
285
|
type: "result";
|
|
286
286
|
id: number;
|
|
@@ -327,9 +327,9 @@ export declare const sidecarMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
327
327
|
kind: "File" | "Module" | "Class" | "Interface" | "Enum" | "TypeAlias" | "Function" | "Method" | "Property" | "Variable" | "Route" | "Component";
|
|
328
328
|
name: string;
|
|
329
329
|
id: string;
|
|
330
|
+
tier: "deep" | "baseline";
|
|
330
331
|
file: string;
|
|
331
332
|
qualifiedName: string;
|
|
332
|
-
tier: "deep" | "baseline";
|
|
333
333
|
range?: {
|
|
334
334
|
startLine: number;
|
|
335
335
|
endLine: number;
|
|
@@ -338,9 +338,9 @@ export declare const sidecarMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
338
338
|
kind: "File" | "Module" | "Class" | "Interface" | "Enum" | "TypeAlias" | "Function" | "Method" | "Property" | "Variable" | "Route" | "Component";
|
|
339
339
|
name: string;
|
|
340
340
|
id: string;
|
|
341
|
+
tier: "deep" | "baseline";
|
|
341
342
|
file: string;
|
|
342
343
|
qualifiedName: string;
|
|
343
|
-
tier: "deep" | "baseline";
|
|
344
344
|
range?: {
|
|
345
345
|
startLine: number;
|
|
346
346
|
endLine: number;
|
|
@@ -379,11 +379,11 @@ export declare const sidecarMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
379
379
|
line: number;
|
|
380
380
|
column: number;
|
|
381
381
|
} | undefined;
|
|
382
|
-
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
383
382
|
sites?: {
|
|
384
383
|
line: number;
|
|
385
384
|
column: number;
|
|
386
385
|
}[] | undefined;
|
|
386
|
+
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
387
387
|
}, {
|
|
388
388
|
kind: "Defines" | "Calls" | "Instantiates" | "Overrides" | "Inherits" | "Implements" | "UsesType" | "Returns" | "Imports" | "ImportsType" | "References";
|
|
389
389
|
from: string;
|
|
@@ -392,11 +392,11 @@ export declare const sidecarMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
392
392
|
line: number;
|
|
393
393
|
column: number;
|
|
394
394
|
} | undefined;
|
|
395
|
-
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
396
395
|
sites?: {
|
|
397
396
|
line: number;
|
|
398
397
|
column: number;
|
|
399
398
|
}[] | undefined;
|
|
399
|
+
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
400
400
|
}>, "many">;
|
|
401
401
|
resolution: z.ZodOptional<z.ZodObject<{
|
|
402
402
|
callsTotal: z.ZodNumber;
|
|
@@ -416,9 +416,9 @@ export declare const sidecarMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
416
416
|
kind: "File" | "Module" | "Class" | "Interface" | "Enum" | "TypeAlias" | "Function" | "Method" | "Property" | "Variable" | "Route" | "Component";
|
|
417
417
|
name: string;
|
|
418
418
|
id: string;
|
|
419
|
+
tier: "deep" | "baseline";
|
|
419
420
|
file: string;
|
|
420
421
|
qualifiedName: string;
|
|
421
|
-
tier: "deep" | "baseline";
|
|
422
422
|
range?: {
|
|
423
423
|
startLine: number;
|
|
424
424
|
endLine: number;
|
|
@@ -432,11 +432,11 @@ export declare const sidecarMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
432
432
|
line: number;
|
|
433
433
|
column: number;
|
|
434
434
|
} | undefined;
|
|
435
|
-
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
436
435
|
sites?: {
|
|
437
436
|
line: number;
|
|
438
437
|
column: number;
|
|
439
438
|
}[] | undefined;
|
|
439
|
+
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
440
440
|
}[];
|
|
441
441
|
type: "result";
|
|
442
442
|
id: number;
|
|
@@ -450,9 +450,9 @@ export declare const sidecarMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
450
450
|
kind: "File" | "Module" | "Class" | "Interface" | "Enum" | "TypeAlias" | "Function" | "Method" | "Property" | "Variable" | "Route" | "Component";
|
|
451
451
|
name: string;
|
|
452
452
|
id: string;
|
|
453
|
+
tier: "deep" | "baseline";
|
|
453
454
|
file: string;
|
|
454
455
|
qualifiedName: string;
|
|
455
|
-
tier: "deep" | "baseline";
|
|
456
456
|
range?: {
|
|
457
457
|
startLine: number;
|
|
458
458
|
endLine: number;
|
|
@@ -466,11 +466,11 @@ export declare const sidecarMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
466
466
|
line: number;
|
|
467
467
|
column: number;
|
|
468
468
|
} | undefined;
|
|
469
|
-
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
470
469
|
sites?: {
|
|
471
470
|
line: number;
|
|
472
471
|
column: number;
|
|
473
472
|
}[] | undefined;
|
|
473
|
+
provenance?: "resolved" | "heuristic" | "dispatch" | undefined;
|
|
474
474
|
}[];
|
|
475
475
|
type: "result";
|
|
476
476
|
id: number;
|