@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.
- package/LICENSE +21 -21
- package/README.md +65 -65
- package/dist/commands/add.d.ts +7 -7
- package/dist/commands/add.js +33 -33
- package/dist/commands/affected.d.ts +5 -5
- package/dist/commands/affected.js +29 -29
- package/dist/commands/cluster.d.ts +1 -1
- package/dist/commands/cluster.js +50 -50
- package/dist/commands/diagnose.d.ts +4 -4
- package/dist/commands/diagnose.js +19 -19
- package/dist/commands/diff.d.ts +1 -1
- package/dist/commands/diff.js +35 -35
- package/dist/commands/explain.d.ts +3 -3
- package/dist/commands/explain.js +37 -37
- package/dist/commands/export.d.ts +6 -6
- package/dist/commands/export.js +32 -32
- package/dist/commands/feedback.d.ts +11 -11
- package/dist/commands/feedback.js +40 -40
- package/dist/commands/global.d.ts +6 -6
- package/dist/commands/global.js +60 -60
- package/dist/commands/history.d.ts +4 -4
- package/dist/commands/history.js +27 -27
- package/dist/commands/hook-guard.d.ts +1 -1
- package/dist/commands/hook-guard.js +144 -144
- package/dist/commands/hook.d.ts +2 -2
- package/dist/commands/hook.js +52 -52
- package/dist/commands/install.d.ts +2 -2
- package/dist/commands/install.js +39 -39
- package/dist/commands/map.d.ts +5 -5
- package/dist/commands/map.js +15 -15
- package/dist/commands/mcp.d.ts +3 -3
- package/dist/commands/mcp.js +14 -14
- package/dist/commands/merge.d.ts +1 -1
- package/dist/commands/merge.js +50 -50
- package/dist/commands/migrate.d.ts +3 -3
- package/dist/commands/migrate.js +74 -74
- package/dist/commands/path.d.ts +5 -5
- package/dist/commands/path.js +18 -18
- package/dist/commands/prs.d.ts +4 -4
- package/dist/commands/prs.js +132 -132
- package/dist/commands/query.d.ts +9 -9
- package/dist/commands/query.js +21 -21
- package/dist/commands/run.d.ts +9 -9
- package/dist/commands/run.js +68 -68
- package/dist/commands/stats.d.ts +3 -3
- package/dist/commands/stats.js +17 -17
- package/dist/commands/status.d.ts +3 -3
- package/dist/commands/status.js +56 -56
- package/dist/commands/tree.d.ts +5 -5
- package/dist/commands/tree.js +52 -52
- package/dist/commands/update.d.ts +6 -6
- package/dist/commands/update.js +65 -65
- package/dist/commands/watch.d.ts +3 -3
- package/dist/commands/watch.js +113 -113
- package/dist/commands/wiki.d.ts +6 -6
- package/dist/commands/wiki.js +59 -59
- package/dist/index.d.ts +4 -4
- package/dist/index.js +249 -249
- package/dist/install/hooks.d.ts +11 -11
- package/dist/install/hooks.js +306 -306
- package/dist/install/index.d.ts +2 -2
- package/dist/install/index.js +361 -361
- package/dist/install/markdown-inject.d.ts +6 -6
- package/dist/install/markdown-inject.js +177 -177
- package/dist/install/platforms.d.ts +12 -12
- package/dist/install/platforms.js +129 -129
- package/dist/install/settings-inject.d.ts +17 -17
- package/dist/install/settings-inject.js +424 -424
- package/dist/native.d.ts +31 -31
- package/dist/native.js +106 -106
- package/package.json +72 -72
- package/skills/skill-aider.md +40 -40
- package/skills/skill-codex.md +46 -46
- package/skills/skill-copilot.md +46 -46
- package/skills/skill-cursor.md +39 -39
- package/skills/skill-gemini.md +46 -46
- package/skills/skill-kiro.md +39 -39
- package/skills/skill-opencode.md +44 -44
- package/skills/skill-trae.md +46 -46
- package/skills/skill.md +266 -266
- package/dist/graphify.node +0 -4
package/dist/commands/run.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare function runCommand(path: string, opts: {
|
|
2
|
-
dedup?: boolean;
|
|
3
|
-
backend?: string;
|
|
4
|
-
model?: string;
|
|
5
|
-
wiki?: boolean;
|
|
6
|
-
embed?: boolean;
|
|
7
|
-
global?: boolean;
|
|
8
|
-
as?: string;
|
|
9
|
-
}): Promise<void>;
|
|
1
|
+
export declare function runCommand(path: string, opts: {
|
|
2
|
+
dedup?: boolean;
|
|
3
|
+
backend?: string;
|
|
4
|
+
model?: string;
|
|
5
|
+
wiki?: boolean;
|
|
6
|
+
embed?: boolean;
|
|
7
|
+
global?: boolean;
|
|
8
|
+
as?: string;
|
|
9
|
+
}): Promise<void>;
|
|
10
10
|
//# sourceMappingURL=run.d.ts.map
|
package/dist/commands/run.js
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
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.runCommand = runCommand;
|
|
37
|
-
const pathMod = __importStar(require("path"));
|
|
38
|
-
const native_1 = require("../native");
|
|
39
|
-
async function runCommand(path, opts) {
|
|
40
|
-
if (opts.backend)
|
|
41
|
-
process.env.ASTRIA_LLM_BACKEND = opts.backend;
|
|
42
|
-
if (opts.model)
|
|
43
|
-
process.env.ASTRIA_LLM_MODEL = opts.model;
|
|
44
|
-
try {
|
|
45
|
-
console.log(`Running astria pipeline on: ${path}`);
|
|
46
|
-
const result = (0, native_1.runPipeline)(path, opts.dedup === false, opts.embed === true);
|
|
47
|
-
console.log(`Nodes added: ${result.nodesAdded}`);
|
|
48
|
-
console.log(`Edges added: ${result.edgesAdded}`);
|
|
49
|
-
console.log(`Communities: ${result.communities}`);
|
|
50
|
-
console.log(`Report written to: ${pathMod.join(path, '.astria', 'graph_report.md')}`);
|
|
51
|
-
if (opts.wiki) {
|
|
52
|
-
const outDir = pathMod.join(path, '.astria', 'wiki');
|
|
53
|
-
const articles = (0, native_1.exportWiki)(path, outDir, 25);
|
|
54
|
-
console.log(`Wiki written: ${articles} articles -> ${pathMod.join(outDir, 'index.md')}`);
|
|
55
|
-
if (opts.global) {
|
|
56
|
-
const merged = (0, native_1.globalAdd)(path, opts.as);
|
|
57
|
-
console.log(`Global graph: repo '${merged.tag}' merged (${merged.nodesAdded} nodes, ${merged.edgesAdded} edges, ${merged.sameTypeEdges} same_type_as, ${merged.crossRepoCallEdges} cross-repo calls)`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
const benchmark = (0, native_1.tokenBenchmark)(path);
|
|
61
|
-
if (benchmark)
|
|
62
|
-
console.log(benchmark);
|
|
63
|
-
}
|
|
64
|
-
catch (e) {
|
|
65
|
-
console.error(`Error: ${e.message || e}`);
|
|
66
|
-
process.exitCode = 1;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
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.runCommand = runCommand;
|
|
37
|
+
const pathMod = __importStar(require("path"));
|
|
38
|
+
const native_1 = require("../native");
|
|
39
|
+
async function runCommand(path, opts) {
|
|
40
|
+
if (opts.backend)
|
|
41
|
+
process.env.ASTRIA_LLM_BACKEND = opts.backend;
|
|
42
|
+
if (opts.model)
|
|
43
|
+
process.env.ASTRIA_LLM_MODEL = opts.model;
|
|
44
|
+
try {
|
|
45
|
+
console.log(`Running astria pipeline on: ${path}`);
|
|
46
|
+
const result = (0, native_1.runPipeline)(path, opts.dedup === false, opts.embed === true);
|
|
47
|
+
console.log(`Nodes added: ${result.nodesAdded}`);
|
|
48
|
+
console.log(`Edges added: ${result.edgesAdded}`);
|
|
49
|
+
console.log(`Communities: ${result.communities}`);
|
|
50
|
+
console.log(`Report written to: ${pathMod.join(path, '.astria', 'graph_report.md')}`);
|
|
51
|
+
if (opts.wiki) {
|
|
52
|
+
const outDir = pathMod.join(path, '.astria', 'wiki');
|
|
53
|
+
const articles = (0, native_1.exportWiki)(path, outDir, 25);
|
|
54
|
+
console.log(`Wiki written: ${articles} articles -> ${pathMod.join(outDir, 'index.md')}`);
|
|
55
|
+
if (opts.global) {
|
|
56
|
+
const merged = (0, native_1.globalAdd)(path, opts.as);
|
|
57
|
+
console.log(`Global graph: repo '${merged.tag}' merged (${merged.nodesAdded} nodes, ${merged.edgesAdded} edges, ${merged.sameTypeEdges} same_type_as, ${merged.crossRepoCallEdges} cross-repo calls)`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const benchmark = (0, native_1.tokenBenchmark)(path);
|
|
61
|
+
if (benchmark)
|
|
62
|
+
console.log(benchmark);
|
|
63
|
+
}
|
|
64
|
+
catch (e) {
|
|
65
|
+
console.error(`Error: ${e.message || e}`);
|
|
66
|
+
process.exitCode = 1;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
69
|
//# sourceMappingURL=run.js.map
|
package/dist/commands/stats.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function statsCommand(opts: {
|
|
2
|
-
graph: string;
|
|
3
|
-
}): Promise<void>;
|
|
1
|
+
export declare function statsCommand(opts: {
|
|
2
|
+
graph: string;
|
|
3
|
+
}): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=stats.d.ts.map
|
package/dist/commands/stats.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.statsCommand = statsCommand;
|
|
4
|
-
const native_1 = require("../native");
|
|
5
|
-
async function statsCommand(opts) {
|
|
6
|
-
try {
|
|
7
|
-
const stats = (0, native_1.graphStats)(opts.graph);
|
|
8
|
-
console.log(`Nodes: ${stats.nodeCount}`);
|
|
9
|
-
console.log(`Edges: ${stats.edgeCount}`);
|
|
10
|
-
console.log(`Communities: ${stats.communityCount}`);
|
|
11
|
-
console.log(`Files tracked: ${stats.fileCount}`);
|
|
12
|
-
}
|
|
13
|
-
catch (e) {
|
|
14
|
-
console.error(`Error: ${e.message || e}`);
|
|
15
|
-
process.exitCode = 1;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.statsCommand = statsCommand;
|
|
4
|
+
const native_1 = require("../native");
|
|
5
|
+
async function statsCommand(opts) {
|
|
6
|
+
try {
|
|
7
|
+
const stats = (0, native_1.graphStats)(opts.graph);
|
|
8
|
+
console.log(`Nodes: ${stats.nodeCount}`);
|
|
9
|
+
console.log(`Edges: ${stats.edgeCount}`);
|
|
10
|
+
console.log(`Communities: ${stats.communityCount}`);
|
|
11
|
+
console.log(`Files tracked: ${stats.fileCount}`);
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
console.error(`Error: ${e.message || e}`);
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
18
|
//# sourceMappingURL=stats.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function statusCommand(opts: {
|
|
2
|
-
graph: string;
|
|
3
|
-
}): Promise<void>;
|
|
1
|
+
export declare function statusCommand(opts: {
|
|
2
|
+
graph: string;
|
|
3
|
+
}): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=status.d.ts.map
|
package/dist/commands/status.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.statusCommand = statusCommand;
|
|
4
|
-
const fs_1 = require("fs");
|
|
5
|
-
const native_1 = require("../native");
|
|
6
|
-
const STALE_THRESHOLD = 30;
|
|
7
|
-
const VERY_STALE_THRESHOLD = 120;
|
|
8
|
-
async function statusCommand(opts) {
|
|
9
|
-
const dbPath = `${opts.graph}/.astria/db.sqlite`;
|
|
10
|
-
const graphJsonPath = `${opts.graph}/.astria/graph.json`;
|
|
11
|
-
if (!(0, fs_1.existsSync)(dbPath)) {
|
|
12
|
-
console.log('Status: no graph found');
|
|
13
|
-
console.log('Run `astria run .` to build the graph');
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
let stats;
|
|
17
|
-
try {
|
|
18
|
-
stats = (0, native_1.graphStats)(opts.graph);
|
|
19
|
-
}
|
|
20
|
-
catch (e) {
|
|
21
|
-
console.log('Status: error reading graph database');
|
|
22
|
-
console.log(e.message || String(e));
|
|
23
|
-
process.exitCode = 1;
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (stats.nodeCount === 0) {
|
|
27
|
-
console.log('Status: empty graph (0 nodes)');
|
|
28
|
-
console.log('Run `astria run .` to populate the graph');
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (!(0, fs_1.existsSync)(graphJsonPath)) {
|
|
32
|
-
console.log(`Status: incomplete (db has ${stats.nodeCount} nodes but no graph.json)`);
|
|
33
|
-
console.log('Run `astria run .` to complete the build');
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const mtime = (0, fs_1.statSync)(graphJsonPath).mtimeMs;
|
|
37
|
-
const ageMinutes = Math.round((Date.now() - mtime) / 60000);
|
|
38
|
-
let staleness;
|
|
39
|
-
if (ageMinutes <= STALE_THRESHOLD) {
|
|
40
|
-
staleness = 'fresh';
|
|
41
|
-
}
|
|
42
|
-
else if (ageMinutes <= VERY_STALE_THRESHOLD) {
|
|
43
|
-
staleness = 'stale';
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
staleness = 'very_stale';
|
|
47
|
-
}
|
|
48
|
-
console.log(`Status: ${staleness} (${ageMinutes} min ago)`);
|
|
49
|
-
console.log(`Nodes: ${stats.nodeCount}`);
|
|
50
|
-
console.log(`Edges: ${stats.edgeCount}`);
|
|
51
|
-
console.log(`Communities: ${stats.communityCount}`);
|
|
52
|
-
console.log(`Files tracked: ${stats.fileCount}`);
|
|
53
|
-
if (staleness === 'stale' || staleness === 'very_stale') {
|
|
54
|
-
console.log(`Recommendation: run \`astria update .\` to refresh`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.statusCommand = statusCommand;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const native_1 = require("../native");
|
|
6
|
+
const STALE_THRESHOLD = 30;
|
|
7
|
+
const VERY_STALE_THRESHOLD = 120;
|
|
8
|
+
async function statusCommand(opts) {
|
|
9
|
+
const dbPath = `${opts.graph}/.astria/db.sqlite`;
|
|
10
|
+
const graphJsonPath = `${opts.graph}/.astria/graph.json`;
|
|
11
|
+
if (!(0, fs_1.existsSync)(dbPath)) {
|
|
12
|
+
console.log('Status: no graph found');
|
|
13
|
+
console.log('Run `astria run .` to build the graph');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
let stats;
|
|
17
|
+
try {
|
|
18
|
+
stats = (0, native_1.graphStats)(opts.graph);
|
|
19
|
+
}
|
|
20
|
+
catch (e) {
|
|
21
|
+
console.log('Status: error reading graph database');
|
|
22
|
+
console.log(e.message || String(e));
|
|
23
|
+
process.exitCode = 1;
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (stats.nodeCount === 0) {
|
|
27
|
+
console.log('Status: empty graph (0 nodes)');
|
|
28
|
+
console.log('Run `astria run .` to populate the graph');
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (!(0, fs_1.existsSync)(graphJsonPath)) {
|
|
32
|
+
console.log(`Status: incomplete (db has ${stats.nodeCount} nodes but no graph.json)`);
|
|
33
|
+
console.log('Run `astria run .` to complete the build');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const mtime = (0, fs_1.statSync)(graphJsonPath).mtimeMs;
|
|
37
|
+
const ageMinutes = Math.round((Date.now() - mtime) / 60000);
|
|
38
|
+
let staleness;
|
|
39
|
+
if (ageMinutes <= STALE_THRESHOLD) {
|
|
40
|
+
staleness = 'fresh';
|
|
41
|
+
}
|
|
42
|
+
else if (ageMinutes <= VERY_STALE_THRESHOLD) {
|
|
43
|
+
staleness = 'stale';
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
staleness = 'very_stale';
|
|
47
|
+
}
|
|
48
|
+
console.log(`Status: ${staleness} (${ageMinutes} min ago)`);
|
|
49
|
+
console.log(`Nodes: ${stats.nodeCount}`);
|
|
50
|
+
console.log(`Edges: ${stats.edgeCount}`);
|
|
51
|
+
console.log(`Communities: ${stats.communityCount}`);
|
|
52
|
+
console.log(`Files tracked: ${stats.fileCount}`);
|
|
53
|
+
if (staleness === 'stale' || staleness === 'very_stale') {
|
|
54
|
+
console.log(`Recommendation: run \`astria update .\` to refresh`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
57
|
//# sourceMappingURL=status.js.map
|
package/dist/commands/tree.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare function treeCommand(opts: {
|
|
2
|
-
graph: string;
|
|
3
|
-
out: string;
|
|
4
|
-
maxChildren: string;
|
|
5
|
-
}): Promise<void>;
|
|
1
|
+
export declare function treeCommand(opts: {
|
|
2
|
+
graph: string;
|
|
3
|
+
out: string;
|
|
4
|
+
maxChildren: string;
|
|
5
|
+
}): Promise<void>;
|
|
6
6
|
//# sourceMappingURL=tree.d.ts.map
|
package/dist/commands/tree.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
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.treeCommand = treeCommand;
|
|
37
|
-
const path = __importStar(require("path"));
|
|
38
|
-
const native_1 = require("../native");
|
|
39
|
-
async function treeCommand(opts) {
|
|
40
|
-
try {
|
|
41
|
-
const maxChildren = parseInt(opts.maxChildren, 10) || 40;
|
|
42
|
-
const count = (0, native_1.exportTree)(opts.graph, opts.out, maxChildren);
|
|
43
|
-
const resolved = path.isAbsolute(opts.out)
|
|
44
|
-
? opts.out
|
|
45
|
-
: path.join(opts.graph, opts.out);
|
|
46
|
-
console.log(`Tree exported: ${count} symbols -> ${resolved}`);
|
|
47
|
-
}
|
|
48
|
-
catch (e) {
|
|
49
|
-
console.error(`Error: ${e.message || e}`);
|
|
50
|
-
process.exitCode = 1;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
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.treeCommand = treeCommand;
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const native_1 = require("../native");
|
|
39
|
+
async function treeCommand(opts) {
|
|
40
|
+
try {
|
|
41
|
+
const maxChildren = parseInt(opts.maxChildren, 10) || 40;
|
|
42
|
+
const count = (0, native_1.exportTree)(opts.graph, opts.out, maxChildren);
|
|
43
|
+
const resolved = path.isAbsolute(opts.out)
|
|
44
|
+
? opts.out
|
|
45
|
+
: path.join(opts.graph, opts.out);
|
|
46
|
+
console.log(`Tree exported: ${count} symbols -> ${resolved}`);
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
console.error(`Error: ${e.message || e}`);
|
|
50
|
+
process.exitCode = 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
53
|
//# sourceMappingURL=tree.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare function updateCommand(path: string, opts: {
|
|
2
|
-
dedup?: boolean;
|
|
3
|
-
backend?: string;
|
|
4
|
-
model?: string;
|
|
5
|
-
embed?: boolean;
|
|
6
|
-
}): Promise<void>;
|
|
1
|
+
export declare function updateCommand(path: string, opts: {
|
|
2
|
+
dedup?: boolean;
|
|
3
|
+
backend?: string;
|
|
4
|
+
model?: string;
|
|
5
|
+
embed?: boolean;
|
|
6
|
+
}): Promise<void>;
|
|
7
7
|
//# sourceMappingURL=update.d.ts.map
|
package/dist/commands/update.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
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.updateCommand = updateCommand;
|
|
37
|
-
const pathMod = __importStar(require("path"));
|
|
38
|
-
const fs_1 = require("fs");
|
|
39
|
-
const native_1 = require("../native");
|
|
40
|
-
async function updateCommand(path, opts) {
|
|
41
|
-
if (opts.backend)
|
|
42
|
-
process.env.ASTRIA_LLM_BACKEND = opts.backend;
|
|
43
|
-
if (opts.model)
|
|
44
|
-
process.env.ASTRIA_LLM_MODEL = opts.model;
|
|
45
|
-
try {
|
|
46
|
-
console.log(`Running incremental rebuild on: ${path}`);
|
|
47
|
-
const result = (0, native_1.updatePipeline)(path, opts.dedup === false, opts.embed === true);
|
|
48
|
-
console.log(`Nodes: ${result.nodesAdded}, Edges: ${result.edgesAdded}, Communities: ${result.communities}`);
|
|
49
|
-
console.log(`Report updated at: ${pathMod.join(path, '.astria', 'graph_report.md')}`);
|
|
50
|
-
// A wiki created via `run --wiki` or `wiki` would otherwise drift stale
|
|
51
|
-
// after incremental updates; regenerate it when it exists.
|
|
52
|
-
const wikiDir = pathMod.join(path, '.astria', 'wiki');
|
|
53
|
-
if ((0, fs_1.existsSync)(pathMod.join(wikiDir, 'index.md'))) {
|
|
54
|
-
const articles = (0, native_1.exportWiki)(path, wikiDir, 25);
|
|
55
|
-
console.log(`Wiki regenerated: ${articles} articles -> ${pathMod.join(wikiDir, 'index.md')}`);
|
|
56
|
-
}
|
|
57
|
-
const benchmark = (0, native_1.tokenBenchmark)(path);
|
|
58
|
-
if (benchmark)
|
|
59
|
-
console.log(benchmark);
|
|
60
|
-
}
|
|
61
|
-
catch (e) {
|
|
62
|
-
console.error(`Error: ${e.message || e}`);
|
|
63
|
-
process.exitCode = 1;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
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.updateCommand = updateCommand;
|
|
37
|
+
const pathMod = __importStar(require("path"));
|
|
38
|
+
const fs_1 = require("fs");
|
|
39
|
+
const native_1 = require("../native");
|
|
40
|
+
async function updateCommand(path, opts) {
|
|
41
|
+
if (opts.backend)
|
|
42
|
+
process.env.ASTRIA_LLM_BACKEND = opts.backend;
|
|
43
|
+
if (opts.model)
|
|
44
|
+
process.env.ASTRIA_LLM_MODEL = opts.model;
|
|
45
|
+
try {
|
|
46
|
+
console.log(`Running incremental rebuild on: ${path}`);
|
|
47
|
+
const result = (0, native_1.updatePipeline)(path, opts.dedup === false, opts.embed === true);
|
|
48
|
+
console.log(`Nodes: ${result.nodesAdded}, Edges: ${result.edgesAdded}, Communities: ${result.communities}`);
|
|
49
|
+
console.log(`Report updated at: ${pathMod.join(path, '.astria', 'graph_report.md')}`);
|
|
50
|
+
// A wiki created via `run --wiki` or `wiki` would otherwise drift stale
|
|
51
|
+
// after incremental updates; regenerate it when it exists.
|
|
52
|
+
const wikiDir = pathMod.join(path, '.astria', 'wiki');
|
|
53
|
+
if ((0, fs_1.existsSync)(pathMod.join(wikiDir, 'index.md'))) {
|
|
54
|
+
const articles = (0, native_1.exportWiki)(path, wikiDir, 25);
|
|
55
|
+
console.log(`Wiki regenerated: ${articles} articles -> ${pathMod.join(wikiDir, 'index.md')}`);
|
|
56
|
+
}
|
|
57
|
+
const benchmark = (0, native_1.tokenBenchmark)(path);
|
|
58
|
+
if (benchmark)
|
|
59
|
+
console.log(benchmark);
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
console.error(`Error: ${e.message || e}`);
|
|
63
|
+
process.exitCode = 1;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
66
|
//# sourceMappingURL=update.js.map
|
package/dist/commands/watch.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function watchCommand(watchPath: string, opts: {
|
|
2
|
-
debounce: string;
|
|
3
|
-
}): Promise<void>;
|
|
1
|
+
export declare function watchCommand(watchPath: string, opts: {
|
|
2
|
+
debounce: string;
|
|
3
|
+
}): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=watch.d.ts.map
|