@nodesify/astria 1.0.4 → 1.0.6
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 +11 -3
- package/dist/commands/affected.d.ts +1 -0
- package/dist/commands/affected.d.ts.map +1 -1
- package/dist/commands/affected.js +9 -0
- package/dist/commands/affected.js.map +1 -1
- package/dist/commands/callflow.d.ts +7 -0
- package/dist/commands/callflow.d.ts.map +1 -0
- package/dist/commands/callflow.js +27 -0
- package/dist/commands/callflow.js.map +1 -0
- package/dist/commands/communities.d.ts +5 -0
- package/dist/commands/communities.d.ts.map +1 -0
- package/dist/commands/communities.js +31 -0
- package/dist/commands/communities.js.map +1 -0
- package/dist/commands/explain.d.ts +1 -0
- package/dist/commands/explain.d.ts.map +1 -1
- package/dist/commands/explain.js +4 -0
- package/dist/commands/explain.js.map +1 -1
- package/dist/commands/export.d.ts +5 -0
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +48 -2
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/god-nodes.d.ts +5 -0
- package/dist/commands/god-nodes.d.ts.map +1 -0
- package/dist/commands/god-nodes.js +26 -0
- package/dist/commands/god-nodes.js.map +1 -0
- package/dist/commands/health.d.ts +5 -0
- package/dist/commands/health.d.ts.map +1 -0
- package/dist/commands/health.js +29 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/llm-summary.d.ts +13 -0
- package/dist/commands/llm-summary.d.ts.map +1 -0
- package/dist/commands/llm-summary.js +18 -0
- package/dist/commands/llm-summary.js.map +1 -0
- package/dist/commands/map.d.ts +1 -0
- package/dist/commands/map.d.ts.map +1 -1
- package/dist/commands/map.js +4 -0
- package/dist/commands/map.js.map +1 -1
- package/dist/commands/neighbors.d.ts +6 -0
- package/dist/commands/neighbors.d.ts.map +1 -0
- package/dist/commands/neighbors.js +42 -0
- package/dist/commands/neighbors.js.map +1 -0
- package/dist/commands/path.d.ts +1 -0
- package/dist/commands/path.d.ts.map +1 -1
- package/dist/commands/path.js +2 -2
- package/dist/commands/path.js.map +1 -1
- package/dist/commands/query.d.ts +2 -0
- package/dist/commands/query.d.ts.map +1 -1
- package/dist/commands/query.js +20 -3
- package/dist/commands/query.js.map +1 -1
- package/dist/commands/risk.d.ts +6 -0
- package/dist/commands/risk.d.ts.map +1 -0
- package/dist/commands/risk.js +29 -0
- package/dist/commands/risk.js.map +1 -0
- package/dist/commands/run.d.ts +2 -0
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +8 -5
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/stats.d.ts +1 -0
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +4 -0
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +62 -6
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +4 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +2 -1
- package/dist/commands/watch.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -3
- package/dist/index.js.map +1 -1
- package/dist/install/index.d.ts.map +1 -1
- package/dist/install/index.js +12 -1
- package/dist/install/index.js.map +1 -1
- package/dist/install/platforms.d.ts +2 -0
- package/dist/install/platforms.d.ts.map +1 -1
- package/dist/install/platforms.js +3 -0
- package/dist/install/platforms.js.map +1 -1
- package/dist/native.d.ts +8 -0
- package/dist/native.d.ts.map +1 -1
- package/dist/native.js +9 -1
- package/dist/native.js.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +7 -0
- package/dist/version.js.map +1 -0
- package/package.json +6 -6
- package/skills/skill.md +25 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Turn any folder into a queryable knowledge graph.
|
|
|
8
8
|
npm install -g @nodesify/astria
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Requires Node.js >=
|
|
11
|
+
Requires Node.js >= 22. No Rust toolchain needed — ships prebuilt native binaries for macOS, Linux, and Windows.
|
|
12
12
|
|
|
13
13
|
> **Migrating from `@nodesify/graphify`?** Run `astria migrate` once (renames `.graphify/` → `.astria/` and the global store), then `astria install` to refresh AI-tool skills and hooks. `GRAPHIFY_*` env vars keep working; `ASTRIA_*` takes precedence.
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ Requires Node.js >= 20. No Rust toolchain needed — ships prebuilt native binar
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
astria run <path> # Full pipeline: detect → extract → build → cluster → analyze → report
|
|
19
|
-
astria update <path> #
|
|
19
|
+
astria update <path> # Reuse cached extraction; reconcile current corpus
|
|
20
20
|
astria watch <path> [--debounce 3000] # Watch for file changes, auto-rebuild
|
|
21
21
|
astria explain <node> [--graph .] # Explain a node and its connections
|
|
22
22
|
astria query <question> [--dfs] [--depth 2] [--budget 2000] [--graph .] # BFS/DFS traversal
|
|
@@ -36,6 +36,14 @@ Running `astria run .` creates `.astria/` with:
|
|
|
36
36
|
- `graph.json` — full graph export
|
|
37
37
|
- `graph_report.md` — report with hub nodes, communities, surprising connections
|
|
38
38
|
|
|
39
|
+
### Retrieval and upgrades
|
|
40
|
+
|
|
41
|
+
Scoped code definitions survive semantic deduplication. JS/TS assigned functions retain binding names and bodies; Python implementations take precedence over overload declarations. Queries favor complete identifiers while honoring explicit requests for tests or documentation. Static receiver matching does not infer runtime types or aliases.
|
|
42
|
+
|
|
43
|
+
`query --budget N` caps the full query text using `o200k_base`, including metadata. CLI and MCP share that text budget; MCP transport JSON is excluded. Budgets must fit metadata and the next complete record or the query returns an error. Use the returned `--cursor N` for the next page of node and edge records.
|
|
44
|
+
|
|
45
|
+
After upgrading, run `astria update .` to refresh extraction and restore definitions removed by older deduplication. Discard old pagination cursors after an upgrade or graph rebuild.
|
|
46
|
+
|
|
39
47
|
### HTML visualization modes
|
|
40
48
|
|
|
41
49
|
HTML export defaults to `--mode standard`, matching the original Graphify viewer's 5,000-node safety limit. Graphs above that limit require an explicit large-graph export:
|
|
@@ -48,7 +56,7 @@ Large mode uses precomputed positions and disabled physics, starts with key node
|
|
|
48
56
|
|
|
49
57
|
## Supported languages
|
|
50
58
|
|
|
51
|
-
Python, JavaScript, TypeScript, Rust, Go, Java, C, C++, Ruby, Swift, Scala, PHP, C#, Lua, Haskell, Elixir, Bash, Dart, Zig, CSS.
|
|
59
|
+
Python, JavaScript, TypeScript, Rust, Go, Java, C, C++, Ruby, Swift, Kotlin, Scala, PHP, C#, Lua, Haskell, Elixir, Bash, Dart, Zig, CSS, Terraform/HCL, PowerShell, Verilog/SystemVerilog, and Metal. See the [generated language table](https://nodesify.github.io/astria/docs/reference/language-support) for extensions and extraction details.
|
|
52
60
|
|
|
53
61
|
## AI platform integration
|
|
54
62
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affected.d.ts","sourceRoot":"","sources":["../../src/commands/affected.ts"],"names":[],"mappings":"AAEA,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"affected.d.ts","sourceRoot":"","sources":["../../src/commands/affected.ts"],"names":[],"mappings":"AAEA,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,iBAsCA"}
|
|
@@ -6,6 +6,15 @@ async function affectedCommand(node, opts) {
|
|
|
6
6
|
try {
|
|
7
7
|
const depth = parseInt(opts.depth, 10) || 2;
|
|
8
8
|
const result = (0, native_1.affectedNode)(opts.graph, node, depth, opts.relation);
|
|
9
|
+
if (opts.json) {
|
|
10
|
+
console.log(JSON.stringify({
|
|
11
|
+
seed: result.seed,
|
|
12
|
+
seedLabel: result.seedLabel,
|
|
13
|
+
total: result.total,
|
|
14
|
+
hits: result.hits,
|
|
15
|
+
}, null, 2));
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
9
18
|
if (result.total === 0) {
|
|
10
19
|
console.log(`Nothing references "${result.seedLabel}" — no blast radius.`);
|
|
11
20
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affected.js","sourceRoot":"","sources":["../../src/commands/affected.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"affected.js","sourceRoot":"","sources":["../../src/commands/affected.ts"],"names":[],"mappings":";;AAEA,0CA2CC;AA7CD,sCAAyC;AAElC,KAAK,UAAU,eAAe,CAAC,IAAY,EAAE,IAKnD;IACC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CACZ;gBACE,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB,EACD,IAAI,EACJ,CAAC,CACF,CACF,CAAC;YACF,OAAO;QACT,CAAC;QACD,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,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G,CAAC,EAAE,MAAM,CAAA;CAAE,iBAmB1E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.callflowCommand = callflowCommand;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const native_1 = require("../native");
|
|
6
|
+
async function callflowCommand(node, opts) {
|
|
7
|
+
try {
|
|
8
|
+
const depth = Math.max(1, Number(opts.depth ?? 2) || 2);
|
|
9
|
+
const direction = opts.direction || 'out';
|
|
10
|
+
if (!['in', 'out', 'both'].includes(direction)) {
|
|
11
|
+
throw new Error(`Unknown direction "${direction}". Valid: in, out, both`);
|
|
12
|
+
}
|
|
13
|
+
const mermaid = (0, native_1.callflowMermaid)(opts.graph, node, depth, direction);
|
|
14
|
+
if (opts.out) {
|
|
15
|
+
(0, fs_1.writeFileSync)(opts.out, mermaid + '\n');
|
|
16
|
+
console.log(`Call-flow written to: ${opts.out}`);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
console.log(mermaid);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
console.error(`Error: ${e.message || e}`);
|
|
24
|
+
process.exitCode = 1;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=callflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callflow.js","sourceRoot":"","sources":["../../src/commands/callflow.ts"],"names":[],"mappings":";;AAGA,0CAqBC;AAxBD,2BAAmC;AACnC,sCAA4C;AAErC,KAAK,UAAU,eAAe,CACnC,IAAY,EACZ,IAAyE;IAEzE,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACxD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC;QAC1C,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,yBAAyB,CAAC,CAAC;QAC5E,CAAC;QACD,MAAM,OAAO,GAAG,IAAA,wBAAe,EAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QACpE,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,IAAA,kBAAa,EAAC,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC,CAAC;YACxC,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACnD,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"communities.d.ts","sourceRoot":"","sources":["../../src/commands/communities.ts"],"names":[],"mappings":"AAEA,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,iBAwB/E"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.communitiesCommand = communitiesCommand;
|
|
4
|
+
const native_1 = require("../native");
|
|
5
|
+
async function communitiesCommand(opts) {
|
|
6
|
+
try {
|
|
7
|
+
const result = (0, native_1.listCommunities)(opts.graph);
|
|
8
|
+
if (opts.json) {
|
|
9
|
+
console.log(JSON.stringify(result, null, 2));
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const modularity = result.modularity != null ? ` (modularity ${result.modularity.toFixed(3)})` : '';
|
|
13
|
+
const llmNamed = result.communities.filter((c) => c.labelSource === 'llm').length;
|
|
14
|
+
console.log(`${result.communities.length} communities${modularity}:`);
|
|
15
|
+
for (const c of result.communities) {
|
|
16
|
+
// An LLM label is a summary of the code; a hub label is a fact about it.
|
|
17
|
+
const sourceTag = c.labelSource === 'llm' ? '' : ' [hub]';
|
|
18
|
+
const summary = c.summary ? ` — ${c.summary}` : '';
|
|
19
|
+
const cohesion = c.cohesion != null ? c.cohesion.toFixed(2) : '-';
|
|
20
|
+
console.log(` [${c.id}] ${c.label}${sourceTag} - ${c.size} nodes, cohesion ${cohesion}${summary}`);
|
|
21
|
+
}
|
|
22
|
+
if (llmNamed > 0) {
|
|
23
|
+
console.log(`\n${llmNamed} communities carry LLM thematic labels (astria run --label-communities).`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
console.error(`Error: ${e.message || e}`);
|
|
28
|
+
process.exitCode = 1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=communities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"communities.js","sourceRoot":"","sources":["../../src/commands/communities.ts"],"names":[],"mappings":";;AAEA,gDAwBC;AA1BD,sCAA4C;AAErC,KAAK,UAAU,kBAAkB,CAAC,IAAuC;IAC9E,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,wBAAe,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3C,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAA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O,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explain.d.ts","sourceRoot":"","sources":["../../src/commands/explain.ts"],"names":[],"mappings":"AAEA,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"explain.d.ts","sourceRoot":"","sources":["../../src/commands/explain.ts"],"names":[],"mappings":"AAEA,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,iBAsCzF"}
|
package/dist/commands/explain.js
CHANGED
|
@@ -9,6 +9,10 @@ async function explainCommand(node, opts) {
|
|
|
9
9
|
console.log(`Node "${node}" not found`);
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
+
if (opts.json) {
|
|
13
|
+
console.log(JSON.stringify(result, null, 2));
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
12
16
|
console.log(`Node: ${result.label}`);
|
|
13
17
|
console.log(` ID: ${result.id}`);
|
|
14
18
|
console.log(` File: ${result.sourceFile}${result.sourceLine != null ? `:${result.sourceLine}` : ''}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explain.js","sourceRoot":"","sources":["../../src/commands/explain.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"explain.js","sourceRoot":"","sources":["../../src/commands/explain.ts"],"names":[],"mappings":";;AAEA,wCAsCC;AAxCD,sCAAwC;AAEjC,KAAK,UAAU,cAAc,CAAC,IAAY,EAAE,IAAuC;IACxF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IA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,SAAS,EAAE,CAAC;gBACjC,MAAM,GAAG,GAAG,CAAC,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBACnF,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,aAAa,KAAK,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,UAAU,IAAI,GAAG,EAAE,CAAC,CAAC;YAClF,CAAC;YACD,IAAI,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;gBACnD,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;gBACjE,OAAO,CAAC,GAAG,CAAC,aAAa,SAAS,OAAO,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -3,5 +3,10 @@ export declare function exportCommand(opts: {
|
|
|
3
3
|
out: string;
|
|
4
4
|
format: string;
|
|
5
5
|
mode?: string;
|
|
6
|
+
neo4jPush?: string;
|
|
7
|
+
neo4jUser?: string;
|
|
8
|
+
neo4jPass?: string;
|
|
9
|
+
redisPush?: string;
|
|
10
|
+
graphName?: string;
|
|
6
11
|
}): Promise<void>;
|
|
7
12
|
//# sourceMappingURL=export.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAIA,wBAAsB,aAAa,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,iBA0E1M"}
|
package/dist/commands/export.js
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.exportCommand = exportCommand;
|
|
4
|
+
const node_child_process_1 = require("node:child_process");
|
|
5
|
+
const fs_1 = require("fs");
|
|
4
6
|
const native_1 = require("../native");
|
|
5
7
|
async function exportCommand(opts) {
|
|
6
8
|
try {
|
|
7
9
|
const format = opts.format || 'json';
|
|
8
|
-
if (!['json', 'html', 'graphml', 'cypher'].includes(format)) {
|
|
10
|
+
if (!['json', 'html', 'graphml', 'cypher', 'svg', 'falkordb'].includes(format)) {
|
|
9
11
|
const hint = format === 'obsidian' ? ' (obsidian is a wiki format: astria wiki --format obsidian)' : '';
|
|
10
|
-
throw new Error(`Unknown export format "${format}". Valid formats: json, html, graphml, cypher${hint}`);
|
|
12
|
+
throw new Error(`Unknown export format "${format}". Valid formats: json, html, graphml, cypher, svg, falkordb${hint}`);
|
|
13
|
+
}
|
|
14
|
+
// Live Neo4j push: same graph data the Cypher file carries, straight
|
|
15
|
+
// over Bolt. Credentials come from flags or NEO4J_USERNAME/NEO4J_PASSWORD.
|
|
16
|
+
if (opts.neo4jPush) {
|
|
17
|
+
if (format !== 'cypher') {
|
|
18
|
+
throw new Error('--neo4j-push pairs with --format cypher (it pushes the same graph live)');
|
|
19
|
+
}
|
|
20
|
+
const counts = (0, native_1.neo4jPushCmd)(opts.graph, opts.neo4jPush, opts.neo4jUser ?? null, opts.neo4jPass ?? null);
|
|
21
|
+
console.log(`Pushed to Neo4j at ${opts.neo4jPush}: ${counts.nodes} nodes, ${counts.edges} edges, ${counts.communities} communities (${counts.statements} statements)`);
|
|
22
|
+
return;
|
|
11
23
|
}
|
|
12
24
|
if (format === 'html') {
|
|
13
25
|
const outPath = opts.out.replace(/\.json$/, '.html');
|
|
@@ -24,6 +36,40 @@ async function exportCommand(opts) {
|
|
|
24
36
|
const statements = (0, native_1.exportCypherCmd)(opts.graph, outPath);
|
|
25
37
|
console.log(`Exported Cypher to: ${outPath} (${statements} MERGE statements — idempotent, safe to re-run)`);
|
|
26
38
|
}
|
|
39
|
+
else if (format === 'falkordb') {
|
|
40
|
+
const outPath = opts.out.replace(/\.json$/, '.falkordb.cypher');
|
|
41
|
+
const statements = (0, native_1.exportCypherCmd)(opts.graph, outPath);
|
|
42
|
+
const body = (0, fs_1.readFileSync)(outPath, 'utf-8');
|
|
43
|
+
const NL = String.fromCharCode(10);
|
|
44
|
+
const header = '// astria FalkorDB export - openCypher, idempotent (MERGE)' + NL +
|
|
45
|
+
'// Load into a running FalkorDB/Redis:' + NL +
|
|
46
|
+
`// redis-cli -h <host> -p <port> -x GRAPH.QUERY ${opts.graphName || 'astria'} < statement.cypher` + NL +
|
|
47
|
+
'// Or re-run this export with --redis-push <host:port> to push directly (requires redis-cli).' + NL;
|
|
48
|
+
(0, fs_1.writeFileSync)(outPath, header + body);
|
|
49
|
+
console.log(`Exported FalkorDB Cypher to: ${outPath} (${statements} MERGE statements)`);
|
|
50
|
+
if (opts.redisPush) {
|
|
51
|
+
const [host, port] = opts.redisPush.split(':');
|
|
52
|
+
const stmts = body.split(NL).filter((l) => l.trim() && !l.startsWith('//')).map((l) => l.replace(/;\s*$/, ''));
|
|
53
|
+
let sent = 0;
|
|
54
|
+
for (const stmt of stmts) {
|
|
55
|
+
const r = (0, node_child_process_1.spawnSync)('redis-cli', ['-h', host, '-p', port || '6379', '-x', `GRAPH.QUERY ${opts.graphName || 'astria'}`], {
|
|
56
|
+
input: stmt,
|
|
57
|
+
encoding: 'utf8',
|
|
58
|
+
});
|
|
59
|
+
if (r.status !== 0) {
|
|
60
|
+
throw new Error(`redis-cli failed on statement ${sent + 1}: ${r.stderr || r.stdout || 'unknown error'}`);
|
|
61
|
+
}
|
|
62
|
+
sent++;
|
|
63
|
+
}
|
|
64
|
+
console.log(`Pushed ${sent} statements to FalkorDB graph "${opts.graphName || 'astria'}"`);
|
|
65
|
+
}
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
else if (format === 'svg') {
|
|
69
|
+
const outPath = opts.out.replace(/\.json$/, '.svg');
|
|
70
|
+
const counts = (0, native_1.exportSvgCmd)(opts.graph, outPath);
|
|
71
|
+
console.log(`Exported SVG to: ${outPath} (${counts.nodes} nodes, ${counts.edges} edges, ${counts.communities} communities${counts.truncated ? ', capped' : ''})`);
|
|
72
|
+
}
|
|
27
73
|
else {
|
|
28
74
|
(0, native_1.exportJsonCmd)(opts.graph, opts.out);
|
|
29
75
|
console.log(`Exported JSON to: ${opts.out}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":";;AAIA,sCA0EC;AA9ED,2DAA+C;AAC/C,2BAAiD;AACjD,sCAAwH;AAEjH,KAAK,UAAU,aAAa,CAAC,IAAuK;IACzM,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC;QAErC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/E,MAAM,IAAI,G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CAAC,oBAAoB,OAAO,KAAK,MAAM,CAAC,KAAK,WAAW,MAAM,CAAC,KAAK,WAAW,MAAM,CAAC,WAAW,eAAe,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACpK,CAAC;aAAM,CAAC;YACN,IAAA,sBAAa,EAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"god-nodes.d.ts","sourceRoot":"","sources":["../../src/commands/god-nodes.ts"],"names":[],"mappings":"AAEA,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,iBAmB5E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.godNodesCommand = godNodesCommand;
|
|
4
|
+
const native_1 = require("../native");
|
|
5
|
+
async function godNodesCommand(opts) {
|
|
6
|
+
try {
|
|
7
|
+
const nodes = (0, native_1.godNodes)(opts.graph);
|
|
8
|
+
if (opts.json) {
|
|
9
|
+
console.log(JSON.stringify(nodes, null, 2));
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (nodes.length === 0) {
|
|
13
|
+
console.log('No hub nodes found');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
console.log('Top hubs:');
|
|
17
|
+
for (const n of nodes) {
|
|
18
|
+
console.log(` ${n.label} (degree ${n.degree}, community ${n.community ?? '-'})`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
console.error(`Error: ${e.message || e}`);
|
|
23
|
+
process.exitCode = 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=god-nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"god-nodes.js","sourceRoot":"","sources":["../../src/commands/god-nodes.ts"],"names":[],"mappings":";;AAEA,0CAmBC;AArBD,sCAAqC;AAE9B,KAAK,UAAU,eAAe,CAAC,IAAuC;IAC3E,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAA,iBAAQ,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC5C,OAAO;QACT,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;YAClC,OAAO;QACT,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACzB,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,MAAM,eAAe,CAAC,CAAC,SAAS,IAAI,GAAG,GAAG,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/commands/health.ts"],"names":[],"mappings":"AAEA,wBAAsB,aAAa,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,iBA2B1E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.healthCommand = healthCommand;
|
|
4
|
+
const native_1 = require("../native");
|
|
5
|
+
async function healthCommand(opts) {
|
|
6
|
+
try {
|
|
7
|
+
const report = (0, native_1.healthReport)(opts.graph);
|
|
8
|
+
if (opts.json) {
|
|
9
|
+
console.log(JSON.stringify({
|
|
10
|
+
score: report.score,
|
|
11
|
+
grade: report.grade,
|
|
12
|
+
ageDays: report.ageDays,
|
|
13
|
+
nodeCount: report.nodeCount,
|
|
14
|
+
edgeCount: report.edgeCount,
|
|
15
|
+
deadCode: report.deadCode,
|
|
16
|
+
cycles: report.cycles,
|
|
17
|
+
hubs: report.hubs,
|
|
18
|
+
}, null, 2));
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
console.log(report.text);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
console.error(`Error: ${e.message || e}`);
|
|
26
|
+
process.exitCode = 1;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.js","sourceRoot":"","sources":["../../src/commands/health.ts"],"names":[],"mappings":";;AAEA,sCA2BC;AA7BD,sCAAyC;AAElC,KAAK,UAAU,aAAa,CAAC,IAAuC;IACzE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CACZ;gBACE,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB,EACD,IAAI,EACJ,CAAC,CACF,CACF,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface PipelineResultSummary {
|
|
2
|
+
semanticCached: number;
|
|
3
|
+
llmInputTokens: number;
|
|
4
|
+
llmOutputTokens: number;
|
|
5
|
+
llmApiCalls: number;
|
|
6
|
+
communitiesLabeled: number;
|
|
7
|
+
communitiesReused: number;
|
|
8
|
+
communitiesFailed: number;
|
|
9
|
+
deepLinks: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function printLlmSummary(result: PipelineResultSummary): void;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=llm-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-summary.d.ts","sourceRoot":"","sources":["../../src/commands/llm-summary.ts"],"names":[],"mappings":"AAGA,UAAU,qBAAqB;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAenE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.printLlmSummary = printLlmSummary;
|
|
4
|
+
function printLlmSummary(result) {
|
|
5
|
+
if (result.llmApiCalls > 0) {
|
|
6
|
+
const cached = result.semanticCached > 0 ? `, ${result.semanticCached} files from cache` : '';
|
|
7
|
+
console.log(`LLM usage: ${result.llmApiCalls} API calls, ${result.llmInputTokens} in / ${result.llmOutputTokens} out tokens${cached}`);
|
|
8
|
+
}
|
|
9
|
+
if (result.communitiesLabeled >= 0) {
|
|
10
|
+
const reused = result.communitiesReused > 0 ? `, ${result.communitiesReused} unchanged` : '';
|
|
11
|
+
const failed = result.communitiesFailed > 0 ? `, ${result.communitiesFailed} failed (kept hub names)` : '';
|
|
12
|
+
console.log(`Communities labeled: ${result.communitiesLabeled}${reused}${failed} (--label-communities)`);
|
|
13
|
+
}
|
|
14
|
+
if (result.deepLinks >= 0) {
|
|
15
|
+
console.log(`Deep concept links: ${result.deepLinks} (--deep)`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=llm-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-summary.js","sourceRoot":"","sources":["../../src/commands/llm-summary.ts"],"names":[],"mappings":";;AAcA,0CAeC;AAfD,SAAgB,eAAe,CAAC,MAA6B;IAC3D,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":"","sources":["../../src/commands/map.ts"],"names":[],"mappings":"AAEA,wBAAsB,UAAU,CAAC,IAAI,EAAE;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,iBAaA"}
|
package/dist/commands/map.js
CHANGED
|
@@ -6,6 +6,10 @@ async function mapCommand(opts) {
|
|
|
6
6
|
try {
|
|
7
7
|
const budget = parseInt(opts.budget || '2000', 10);
|
|
8
8
|
const result = (0, native_1.repoMap)(opts.graph, budget, opts.detail);
|
|
9
|
+
if (opts.json) {
|
|
10
|
+
console.log(JSON.stringify({ filesShown: result.filesShown, text: result.text }, null, 2));
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
9
13
|
console.log(result.text);
|
|
10
14
|
}
|
|
11
15
|
catch (e) {
|
package/dist/commands/map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/commands/map.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/commands/map.ts"],"names":[],"mappings":";;AAEA,gCAkBC;AApBD,sCAAoC;AAE7B,KAAK,UAAU,UAAU,CAAC,IAKhC;IACC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,EAAE,EAAE,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,IAAA,gBAAO,EAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3F,OAAO;QACT,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neighbors.d.ts","sourceRoot":"","sources":["../../src/commands/neighbors.ts"],"names":[],"mappings":"AAEA,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,iBA0C3D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.neighborsCommand = neighborsCommand;
|
|
4
|
+
const native_1 = require("../native");
|
|
5
|
+
async function neighborsCommand(node, opts) {
|
|
6
|
+
try {
|
|
7
|
+
const result = (0, native_1.explainNode)(opts.graph, node);
|
|
8
|
+
if (!result) {
|
|
9
|
+
console.error(`Node not found: ${node}`);
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const neighbors = opts.relation
|
|
14
|
+
? result.neighbors.filter((n) => n.relation === opts.relation)
|
|
15
|
+
: result.neighbors;
|
|
16
|
+
if (opts.json) {
|
|
17
|
+
console.log(JSON.stringify({ node: result.label, id: result.id, file: result.sourceFile, neighbors }, null, 2));
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const filter = opts.relation ? ` via ${opts.relation}` : '';
|
|
21
|
+
console.log(`Neighbors of ${result.label} (${neighbors.length}${filter}):`);
|
|
22
|
+
if (neighbors.length === 0) {
|
|
23
|
+
console.log(' (no matching neighbors)');
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
for (const n of neighbors) {
|
|
27
|
+
const loc = n.neighborLine != null ? ` (${n.neighborFile}:${n.neighborLine})` : '';
|
|
28
|
+
console.log(` ${n.neighborLabel} [${n.relation}]${loc}`);
|
|
29
|
+
}
|
|
30
|
+
// The native layer caps the returned list; only the unfiltered view
|
|
31
|
+
// hides entries.
|
|
32
|
+
if (!opts.relation && result.neighborCount > result.neighbors.length) {
|
|
33
|
+
const remaining = result.neighborCount - result.neighbors.length;
|
|
34
|
+
console.log(` ... and ${remaining} more`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
console.error(`Error: ${e.message || e}`);
|
|
39
|
+
process.exitCode = 1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=neighbors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neighbors.js","sourceRoot":"","sources":["../../src/commands/neighbors.ts"],"names":[],"mappings":";;AAEA,4CA4CC;AA9CD,sCAAwC;AAEjC,KAAK,UAAU,gBAAgB,CACpC,IAAY,EACZ,IAA0D;IAE1D,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;YACzC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACT,CAAC;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ;YAC7B,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,K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AAM,CAAC,SAAS,CAAC,MAAM,CAAC;YACjE,OAAO,CAAC,GAAG,CAAC,aAAa,SAAS,OAAO,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
package/dist/commands/path.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/commands/path.ts"],"names":[],"mappings":"AAEA,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/commands/path.ts"],"names":[],"mappings":"AAEA,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,iBAkBA"}
|
package/dist/commands/path.js
CHANGED
|
@@ -5,8 +5,8 @@ const native_1 = require("../native");
|
|
|
5
5
|
async function pathCommand(source, target, opts) {
|
|
6
6
|
try {
|
|
7
7
|
const result = (0, native_1.findPath)(opts.graph, source, target, opts.directed ?? false, opts.detail);
|
|
8
|
-
if (
|
|
9
|
-
console.log(result.text);
|
|
8
|
+
if (opts.json) {
|
|
9
|
+
console.log(JSON.stringify({ source, target, found: result.found, hops: result.hops, text: result.text }, null, 2));
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
console.log(result.text);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/commands/path.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/commands/path.ts"],"names":[],"mappings":";;AAEA,kCAuBC;AAzBD,sCAAqC;AAE9B,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,MAAc,EAAE,IAKjE;IACC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,iBAAQ,EAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,QAAQ,IAAI,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACzF,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CACZ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,EAC7E,IAAI,EACJ,CAAC,CACF,CACF,CAAC;YACF,OAAO;QACT,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
package/dist/commands/query.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/commands/query.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/commands/query.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,iBA8CA"}
|