@nodesify/astria 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +65 -65
  3. package/dist/commands/add.d.ts +7 -7
  4. package/dist/commands/add.js +33 -33
  5. package/dist/commands/affected.d.ts +5 -5
  6. package/dist/commands/affected.js +29 -29
  7. package/dist/commands/cluster.d.ts +1 -1
  8. package/dist/commands/cluster.js +50 -50
  9. package/dist/commands/diagnose.d.ts +4 -4
  10. package/dist/commands/diagnose.js +19 -19
  11. package/dist/commands/diff.d.ts +1 -1
  12. package/dist/commands/diff.js +35 -35
  13. package/dist/commands/explain.d.ts +3 -3
  14. package/dist/commands/explain.js +37 -37
  15. package/dist/commands/export.d.ts +6 -6
  16. package/dist/commands/export.js +32 -32
  17. package/dist/commands/feedback.d.ts +11 -11
  18. package/dist/commands/feedback.js +40 -40
  19. package/dist/commands/global.d.ts +6 -6
  20. package/dist/commands/global.js +60 -60
  21. package/dist/commands/history.d.ts +4 -4
  22. package/dist/commands/history.js +27 -27
  23. package/dist/commands/hook-guard.d.ts +1 -1
  24. package/dist/commands/hook-guard.js +144 -144
  25. package/dist/commands/hook.d.ts +2 -2
  26. package/dist/commands/hook.js +52 -52
  27. package/dist/commands/install.d.ts +2 -2
  28. package/dist/commands/install.js +39 -39
  29. package/dist/commands/map.d.ts +5 -5
  30. package/dist/commands/map.js +15 -15
  31. package/dist/commands/mcp.d.ts +3 -3
  32. package/dist/commands/mcp.js +14 -14
  33. package/dist/commands/merge.d.ts +1 -1
  34. package/dist/commands/merge.js +50 -50
  35. package/dist/commands/migrate.d.ts +3 -3
  36. package/dist/commands/migrate.js +74 -74
  37. package/dist/commands/path.d.ts +5 -5
  38. package/dist/commands/path.js +18 -18
  39. package/dist/commands/prs.d.ts +4 -4
  40. package/dist/commands/prs.js +132 -132
  41. package/dist/commands/query.d.ts +9 -9
  42. package/dist/commands/query.js +21 -21
  43. package/dist/commands/run.d.ts +9 -9
  44. package/dist/commands/run.js +68 -68
  45. package/dist/commands/stats.d.ts +3 -3
  46. package/dist/commands/stats.js +17 -17
  47. package/dist/commands/status.d.ts +3 -3
  48. package/dist/commands/status.js +56 -56
  49. package/dist/commands/tree.d.ts +5 -5
  50. package/dist/commands/tree.js +52 -52
  51. package/dist/commands/update.d.ts +6 -6
  52. package/dist/commands/update.js +65 -65
  53. package/dist/commands/watch.d.ts +3 -3
  54. package/dist/commands/watch.js +113 -113
  55. package/dist/commands/wiki.d.ts +6 -6
  56. package/dist/commands/wiki.js +59 -59
  57. package/dist/index.d.ts +4 -4
  58. package/dist/index.js +249 -249
  59. package/dist/install/hooks.d.ts +11 -11
  60. package/dist/install/hooks.js +306 -306
  61. package/dist/install/index.d.ts +2 -2
  62. package/dist/install/index.js +361 -361
  63. package/dist/install/markdown-inject.d.ts +6 -6
  64. package/dist/install/markdown-inject.js +177 -177
  65. package/dist/install/platforms.d.ts +12 -12
  66. package/dist/install/platforms.js +129 -129
  67. package/dist/install/settings-inject.d.ts +17 -17
  68. package/dist/install/settings-inject.js +424 -424
  69. package/dist/native.d.ts +31 -31
  70. package/dist/native.js +106 -106
  71. package/package.json +72 -72
  72. package/skills/skill-aider.md +40 -40
  73. package/skills/skill-codex.md +46 -46
  74. package/skills/skill-copilot.md +46 -46
  75. package/skills/skill-cursor.md +39 -39
  76. package/skills/skill-gemini.md +46 -46
  77. package/skills/skill-kiro.md +39 -39
  78. package/skills/skill-opencode.md +44 -44
  79. package/skills/skill-trae.md +46 -46
  80. package/skills/skill.md +266 -266
  81. package/dist/graphify.node +0 -4
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Nodesify
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nodesify
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,65 +1,65 @@
1
- # @nodesify/astria
2
-
3
- Turn any folder into a queryable knowledge graph.
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install -g @nodesify/astria
9
- ```
10
-
11
- Requires Node.js >= 20. No Rust toolchain needed — ships prebuilt native binaries for macOS, Linux, and Windows.
12
-
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
-
15
- ## Usage
16
-
17
- ```bash
18
- astria run <path> # Full pipeline: detect → extract → build → cluster → analyze → report
19
- astria update <path> # Incremental rebuild (only changed files)
20
- astria watch <path> [--debounce 3000] # Watch for file changes, auto-rebuild
21
- astria explain <node> [--graph .] # Explain a node and its connections
22
- astria query <question> [--dfs] [--depth 2] [--budget 2000] [--graph .] # BFS/DFS traversal
23
- astria path <A> <B> [--graph .] # Shortest path between two concepts
24
- astria stats [--graph .] # Node/edge/community counts
25
- astria export [--graph .] [--out graph.json] [--format json|html|graphml] [--mode standard|large] # Export graph; HTML defaults to standard
26
- astria merge <pathA> <pathB> <outPath> # Merge two graphs
27
- astria diff <pathA> <pathB> # Compare two graphs
28
- astria history [--limit 20] [--graph .] # Show recent query history
29
- astria install [--platform claude] # Install skill files for AI coding assistants
30
- astria hook install # Install git post-commit/post-checkout hooks
31
- ```
32
-
33
- Running `astria run .` creates `.astria/` with:
34
-
35
- - `db.sqlite` — the graph database
36
- - `graph.json` — full graph export
37
- - `graph_report.md` — report with hub nodes, communities, surprising connections
38
-
39
- ### HTML visualization modes
40
-
41
- 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:
42
-
43
- ```bash
44
- astria export --graph . --format html --mode large --out graph-view.html
45
- ```
46
-
47
- Large mode uses precomputed positions and disabled physics, starts with key nodes visible, and provides debounced search plus a “Show all nodes” toggle. The `--mode` option only affects HTML export; JSON and GraphML remain unchanged.
48
-
49
- ## Supported languages
50
-
51
- Python, JavaScript, TypeScript, Rust, Go, Java, C, C++, Ruby, Swift, Scala, PHP, C#, Lua, Haskell, Elixir, Bash, Dart, Zig, CSS.
52
-
53
- ## AI platform integration
54
-
55
- ```bash
56
- astria install --platform claude # or: codex, gemini, cursor, copilot, aider, opencode, kiro, trae, zcode
57
- ```
58
-
59
- ## .astriaignore
60
-
61
- Place a `.astriaignore` file in your project root (gitignore syntax) to exclude files from the graph.
62
-
63
- ## License
64
-
65
- MIT
1
+ # @nodesify/astria
2
+
3
+ Turn any folder into a queryable knowledge graph.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @nodesify/astria
9
+ ```
10
+
11
+ Requires Node.js >= 20. No Rust toolchain needed — ships prebuilt native binaries for macOS, Linux, and Windows.
12
+
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
+
15
+ ## Usage
16
+
17
+ ```bash
18
+ astria run <path> # Full pipeline: detect → extract → build → cluster → analyze → report
19
+ astria update <path> # Incremental rebuild (only changed files)
20
+ astria watch <path> [--debounce 3000] # Watch for file changes, auto-rebuild
21
+ astria explain <node> [--graph .] # Explain a node and its connections
22
+ astria query <question> [--dfs] [--depth 2] [--budget 2000] [--graph .] # BFS/DFS traversal
23
+ astria path <A> <B> [--graph .] # Shortest path between two concepts
24
+ astria stats [--graph .] # Node/edge/community counts
25
+ astria export [--graph .] [--out graph.json] [--format json|html|graphml] [--mode standard|large] # Export graph; HTML defaults to standard
26
+ astria merge <pathA> <pathB> <outPath> # Merge two graphs
27
+ astria diff <pathA> <pathB> # Compare two graphs
28
+ astria history [--limit 20] [--graph .] # Show recent query history
29
+ astria install [--platform claude] # Install skill files for AI coding assistants
30
+ astria hook install # Install git post-commit/post-checkout hooks
31
+ ```
32
+
33
+ Running `astria run .` creates `.astria/` with:
34
+
35
+ - `db.sqlite` — the graph database
36
+ - `graph.json` — full graph export
37
+ - `graph_report.md` — report with hub nodes, communities, surprising connections
38
+
39
+ ### HTML visualization modes
40
+
41
+ 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:
42
+
43
+ ```bash
44
+ astria export --graph . --format html --mode large --out graph-view.html
45
+ ```
46
+
47
+ Large mode uses precomputed positions and disabled physics, starts with key nodes visible, and provides debounced search plus a “Show all nodes” toggle. The `--mode` option only affects HTML export; JSON and GraphML remain unchanged.
48
+
49
+ ## Supported languages
50
+
51
+ Python, JavaScript, TypeScript, Rust, Go, Java, C, C++, Ruby, Swift, Scala, PHP, C#, Lua, Haskell, Elixir, Bash, Dart, Zig, CSS.
52
+
53
+ ## AI platform integration
54
+
55
+ ```bash
56
+ astria install --platform claude # or: codex, gemini, cursor, copilot, aider, opencode, kiro, trae, zcode
57
+ ```
58
+
59
+ ## .astriaignore
60
+
61
+ Place a `.astriaignore` file in your project root (gitignore syntax) to exclude files from the graph.
62
+
63
+ ## License
64
+
65
+ MIT
@@ -1,8 +1,8 @@
1
- export declare function addCommand(url: string, opts: {
2
- graph: string;
3
- author?: string;
4
- contributor?: string;
5
- scip?: string;
6
- postgres?: string;
7
- }): Promise<void>;
1
+ export declare function addCommand(url: string, opts: {
2
+ graph: string;
3
+ author?: string;
4
+ contributor?: string;
5
+ scip?: string;
6
+ postgres?: string;
7
+ }): Promise<void>;
8
8
  //# sourceMappingURL=add.d.ts.map
@@ -1,34 +1,34 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addCommand = addCommand;
4
- const native_1 = require("../native");
5
- async function addCommand(url, opts) {
6
- if (!url && !opts.scip && !opts.postgres) {
7
- console.error('Error: provide a URL, or --scip <file>, or --postgres <dsn>');
8
- process.exitCode = 1;
9
- return;
10
- }
11
- try {
12
- if (opts.scip) {
13
- const counts = (0, native_1.ingestScip)(opts.graph, opts.scip);
14
- console.log(`SCIP index ingested: ${counts.nodesAdded} nodes, ${counts.edgesAdded} edges`);
15
- return;
16
- }
17
- if (opts.postgres) {
18
- const counts = (0, native_1.ingestPostgres)(opts.graph, opts.postgres);
19
- console.log(`Postgres schema ingested: ${counts.nodesAdded} nodes, ${counts.edgesAdded} edges`);
20
- return;
21
- }
22
- console.log(`Fetching ${url}...`);
23
- const result = (0, native_1.ingestUrl)(opts.graph, url, opts.author, opts.contributor);
24
- console.log(`Saved: ${result.savedPath}`);
25
- if (result.graphUpdated) {
26
- console.log('Graph updated with the new content.');
27
- }
28
- }
29
- catch (e) {
30
- console.error(`Error: ${e.message || e}`);
31
- process.exitCode = 1;
32
- }
33
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addCommand = addCommand;
4
+ const native_1 = require("../native");
5
+ async function addCommand(url, opts) {
6
+ if (!url && !opts.scip && !opts.postgres) {
7
+ console.error('Error: provide a URL, or --scip <file>, or --postgres <dsn>');
8
+ process.exitCode = 1;
9
+ return;
10
+ }
11
+ try {
12
+ if (opts.scip) {
13
+ const counts = (0, native_1.ingestScip)(opts.graph, opts.scip);
14
+ console.log(`SCIP index ingested: ${counts.nodesAdded} nodes, ${counts.edgesAdded} edges`);
15
+ return;
16
+ }
17
+ if (opts.postgres) {
18
+ const counts = (0, native_1.ingestPostgres)(opts.graph, opts.postgres);
19
+ console.log(`Postgres schema ingested: ${counts.nodesAdded} nodes, ${counts.edgesAdded} edges`);
20
+ return;
21
+ }
22
+ console.log(`Fetching ${url}...`);
23
+ const result = (0, native_1.ingestUrl)(opts.graph, url, opts.author, opts.contributor);
24
+ console.log(`Saved: ${result.savedPath}`);
25
+ if (result.graphUpdated) {
26
+ console.log('Graph updated with the new content.');
27
+ }
28
+ }
29
+ catch (e) {
30
+ console.error(`Error: ${e.message || e}`);
31
+ process.exitCode = 1;
32
+ }
33
+ }
34
34
  //# sourceMappingURL=add.js.map
@@ -1,6 +1,6 @@
1
- export declare function affectedCommand(node: string, opts: {
2
- graph: string;
3
- depth: string;
4
- relation?: string;
5
- }): Promise<void>;
1
+ export declare function affectedCommand(node: string, opts: {
2
+ graph: string;
3
+ depth: string;
4
+ relation?: string;
5
+ }): Promise<void>;
6
6
  //# sourceMappingURL=affected.d.ts.map
@@ -1,30 +1,30 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.affectedCommand = affectedCommand;
4
- const native_1 = require("../native");
5
- async function affectedCommand(node, opts) {
6
- try {
7
- const depth = parseInt(opts.depth, 10) || 2;
8
- const result = (0, native_1.affectedNode)(opts.graph, node, depth, opts.relation);
9
- if (result.total === 0) {
10
- console.log(`Nothing references "${result.seedLabel}" — no blast radius.`);
11
- return;
12
- }
13
- console.log(`Blast radius of "${result.seedLabel}" (depth ≤ ${depth}): ${result.total} node(s)`);
14
- console.log();
15
- let lastDepth = 0;
16
- for (const hit of result.hits) {
17
- if (hit.depth !== lastDepth) {
18
- lastDepth = hit.depth;
19
- console.log(` depth ${hit.depth}:`);
20
- }
21
- const via = hit.viaFile ? ` [${hit.viaFile}]` : '';
22
- console.log(` ${hit.label} (${hit.relation})${via}`);
23
- }
24
- }
25
- catch (e) {
26
- console.error(`Error: ${e.message || e}`);
27
- process.exitCode = 1;
28
- }
29
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.affectedCommand = affectedCommand;
4
+ const native_1 = require("../native");
5
+ async function affectedCommand(node, opts) {
6
+ try {
7
+ const depth = parseInt(opts.depth, 10) || 2;
8
+ const result = (0, native_1.affectedNode)(opts.graph, node, depth, opts.relation);
9
+ if (result.total === 0) {
10
+ console.log(`Nothing references "${result.seedLabel}" — no blast radius.`);
11
+ return;
12
+ }
13
+ console.log(`Blast radius of "${result.seedLabel}" (depth ≤ ${depth}): ${result.total} node(s)`);
14
+ console.log();
15
+ let lastDepth = 0;
16
+ for (const hit of result.hits) {
17
+ if (hit.depth !== lastDepth) {
18
+ lastDepth = hit.depth;
19
+ console.log(` depth ${hit.depth}:`);
20
+ }
21
+ const via = hit.viaFile ? ` [${hit.viaFile}]` : '';
22
+ console.log(` ${hit.label} (${hit.relation})${via}`);
23
+ }
24
+ }
25
+ catch (e) {
26
+ console.error(`Error: ${e.message || e}`);
27
+ process.exitCode = 1;
28
+ }
29
+ }
30
30
  //# sourceMappingURL=affected.js.map
@@ -1,2 +1,2 @@
1
- export declare function clusterCommand(path: string): Promise<void>;
1
+ export declare function clusterCommand(path: string): Promise<void>;
2
2
  //# sourceMappingURL=cluster.d.ts.map
@@ -1,51 +1,51 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.clusterCommand = clusterCommand;
37
- const pathMod = __importStar(require("path"));
38
- const native_1 = require("../native");
39
- async function clusterCommand(path) {
40
- try {
41
- console.log(`Running cluster + analyze on: ${path}`);
42
- const result = (0, native_1.clusterOnly)(path);
43
- console.log(`Communities: ${result.communities}`);
44
- console.log(`Report updated at: ${pathMod.join(path, '.astria', 'graph_report.md')}`);
45
- }
46
- catch (e) {
47
- console.error(`Error: ${e.message || e}`);
48
- process.exitCode = 1;
49
- }
50
- }
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.clusterCommand = clusterCommand;
37
+ const pathMod = __importStar(require("path"));
38
+ const native_1 = require("../native");
39
+ async function clusterCommand(path) {
40
+ try {
41
+ console.log(`Running cluster + analyze on: ${path}`);
42
+ const result = (0, native_1.clusterOnly)(path);
43
+ console.log(`Communities: ${result.communities}`);
44
+ console.log(`Report updated at: ${pathMod.join(path, '.astria', 'graph_report.md')}`);
45
+ }
46
+ catch (e) {
47
+ console.error(`Error: ${e.message || e}`);
48
+ process.exitCode = 1;
49
+ }
50
+ }
51
51
  //# sourceMappingURL=cluster.js.map
@@ -1,5 +1,5 @@
1
- export declare function diagnoseCommand(opts: {
2
- graph: string;
3
- json?: boolean;
4
- }): Promise<void>;
1
+ export declare function diagnoseCommand(opts: {
2
+ graph: string;
3
+ json?: boolean;
4
+ }): Promise<void>;
5
5
  //# sourceMappingURL=diagnose.d.ts.map
@@ -1,20 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.diagnoseCommand = diagnoseCommand;
4
- const native_1 = require("../native");
5
- async function diagnoseCommand(opts) {
6
- try {
7
- const report = (0, native_1.diagnoseGraph)(opts.graph);
8
- if (opts.json) {
9
- const { text: _text, ...rest } = report;
10
- console.log(JSON.stringify(rest, null, 2));
11
- return;
12
- }
13
- console.log(report.text);
14
- }
15
- catch (e) {
16
- console.error(`Error: ${e.message || e}`);
17
- process.exitCode = 1;
18
- }
19
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.diagnoseCommand = diagnoseCommand;
4
+ const native_1 = require("../native");
5
+ async function diagnoseCommand(opts) {
6
+ try {
7
+ const report = (0, native_1.diagnoseGraph)(opts.graph);
8
+ if (opts.json) {
9
+ const { text: _text, ...rest } = report;
10
+ console.log(JSON.stringify(rest, null, 2));
11
+ return;
12
+ }
13
+ console.log(report.text);
14
+ }
15
+ catch (e) {
16
+ console.error(`Error: ${e.message || e}`);
17
+ process.exitCode = 1;
18
+ }
19
+ }
20
20
  //# sourceMappingURL=diagnose.js.map
@@ -1,2 +1,2 @@
1
- export declare function diffCommand(pathA: string, pathB: string): Promise<void>;
1
+ export declare function diffCommand(pathA: string, pathB: string): Promise<void>;
2
2
  //# sourceMappingURL=diff.d.ts.map
@@ -1,36 +1,36 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.diffCommand = diffCommand;
4
- const native_1 = require("../native");
5
- async function diffCommand(pathA, pathB) {
6
- try {
7
- const result = (0, native_1.diffGraphs)(pathA, pathB);
8
- console.log(`Nodes added: ${result.nodesAdded}`);
9
- console.log(`Nodes removed: ${result.nodesRemoved}`);
10
- console.log(`Edges added: ${result.edgesAdded}`);
11
- console.log(`Edges removed: ${result.edgesRemoved}`);
12
- if (result.addedNodeLabels.length > 0) {
13
- console.log('\nAdded nodes:');
14
- for (const label of result.addedNodeLabels.slice(0, 20)) {
15
- console.log(` + ${label}`);
16
- }
17
- if (result.addedNodeLabels.length > 20) {
18
- console.log(` ... and ${result.addedNodeLabels.length - 20} more`);
19
- }
20
- }
21
- if (result.removedNodeLabels.length > 0) {
22
- console.log('\nRemoved nodes:');
23
- for (const label of result.removedNodeLabels.slice(0, 20)) {
24
- console.log(` - ${label}`);
25
- }
26
- if (result.removedNodeLabels.length > 20) {
27
- console.log(` ... and ${result.removedNodeLabels.length - 20} more`);
28
- }
29
- }
30
- }
31
- catch (e) {
32
- console.error(`Error: ${e.message || e}`);
33
- process.exitCode = 1;
34
- }
35
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.diffCommand = diffCommand;
4
+ const native_1 = require("../native");
5
+ async function diffCommand(pathA, pathB) {
6
+ try {
7
+ const result = (0, native_1.diffGraphs)(pathA, pathB);
8
+ console.log(`Nodes added: ${result.nodesAdded}`);
9
+ console.log(`Nodes removed: ${result.nodesRemoved}`);
10
+ console.log(`Edges added: ${result.edgesAdded}`);
11
+ console.log(`Edges removed: ${result.edgesRemoved}`);
12
+ if (result.addedNodeLabels.length > 0) {
13
+ console.log('\nAdded nodes:');
14
+ for (const label of result.addedNodeLabels.slice(0, 20)) {
15
+ console.log(` + ${label}`);
16
+ }
17
+ if (result.addedNodeLabels.length > 20) {
18
+ console.log(` ... and ${result.addedNodeLabels.length - 20} more`);
19
+ }
20
+ }
21
+ if (result.removedNodeLabels.length > 0) {
22
+ console.log('\nRemoved nodes:');
23
+ for (const label of result.removedNodeLabels.slice(0, 20)) {
24
+ console.log(` - ${label}`);
25
+ }
26
+ if (result.removedNodeLabels.length > 20) {
27
+ console.log(` ... and ${result.removedNodeLabels.length - 20} more`);
28
+ }
29
+ }
30
+ }
31
+ catch (e) {
32
+ console.error(`Error: ${e.message || e}`);
33
+ process.exitCode = 1;
34
+ }
35
+ }
36
36
  //# sourceMappingURL=diff.js.map
@@ -1,4 +1,4 @@
1
- export declare function explainCommand(node: string, opts: {
2
- graph: string;
3
- }): Promise<void>;
1
+ export declare function explainCommand(node: string, opts: {
2
+ graph: string;
3
+ }): Promise<void>;
4
4
  //# sourceMappingURL=explain.d.ts.map