aidoc-kit 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -5
- package/dist/cli.js +183 -25
- package/dist/cli.js.map +1 -1
- package/dist/codegraph/detect.d.ts +16 -0
- package/dist/codegraph/detect.d.ts.map +1 -0
- package/dist/codegraph/detect.js +68 -0
- package/dist/codegraph/detect.js.map +1 -0
- package/dist/codegraph/loader.d.ts +9 -0
- package/dist/codegraph/loader.d.ts.map +1 -0
- package/dist/codegraph/loader.js +161 -0
- package/dist/codegraph/loader.js.map +1 -0
- package/dist/codegraph/runner.d.ts +18 -0
- package/dist/codegraph/runner.d.ts.map +1 -0
- package/dist/codegraph/runner.js +60 -0
- package/dist/codegraph/runner.js.map +1 -0
- package/dist/core/scanner.js +1 -1
- package/dist/core/scanner.js.map +1 -1
- package/dist/core/writer.d.ts.map +1 -1
- package/dist/core/writer.js +8 -2
- package/dist/core/writer.js.map +1 -1
- package/dist/enricher/basicEnricher.d.ts +27 -0
- package/dist/enricher/basicEnricher.d.ts.map +1 -0
- package/dist/enricher/basicEnricher.js +157 -0
- package/dist/enricher/basicEnricher.js.map +1 -0
- package/dist/graph/query.d.ts +28 -0
- package/dist/graph/query.d.ts.map +1 -0
- package/dist/graph/query.js +24 -0
- package/dist/graph/query.js.map +1 -0
- package/dist/graph/serializer.d.ts +10 -0
- package/dist/graph/serializer.d.ts.map +1 -0
- package/dist/graph/serializer.js +51 -0
- package/dist/graph/serializer.js.map +1 -0
- package/dist/graph/types.d.ts +101 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +27 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -2
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GRAPH_FILENAME = void 0;
|
|
4
|
+
exports.writeEnrichedGraph = writeEnrichedGraph;
|
|
5
|
+
exports.readEnrichedGraph = readEnrichedGraph;
|
|
6
|
+
/**
|
|
7
|
+
* @ai-agent general-expert
|
|
8
|
+
* @ai-agent-hint If you are not the general-expert specialist, consider switching to a specialized agent in Copilot Chat. Run `npx aidoc-kit agents` to generate agent instruction files.
|
|
9
|
+
* @ai-runtime UNIVERSEL
|
|
10
|
+
*
|
|
11
|
+
* @ai-context
|
|
12
|
+
* [GENERATED] This file exports: GRAPH_FILENAME, writeEnrichedGraph, readEnrichedGraph
|
|
13
|
+
* Imported by: src/cli.ts
|
|
14
|
+
*
|
|
15
|
+
* @ai-when-modifying
|
|
16
|
+
* 1. Check cascade files below before modifying
|
|
17
|
+
* 2. After modifying, ask the developer to run @ai-validate
|
|
18
|
+
* 3. If you have no terminal access, report the command to run
|
|
19
|
+
*
|
|
20
|
+
* @ai-cascade
|
|
21
|
+
* - src/cli.ts
|
|
22
|
+
*
|
|
23
|
+
* @ai-validate
|
|
24
|
+
* npm run typecheck
|
|
25
|
+
*/
|
|
26
|
+
const node_fs_1 = require("node:fs");
|
|
27
|
+
const node_path_1 = require("node:path");
|
|
28
|
+
exports.GRAPH_FILENAME = 'aidoc-graph.json';
|
|
29
|
+
/**
|
|
30
|
+
* Write the enriched graph at the project root. Files and edges are already
|
|
31
|
+
* sorted by path in the loader, so successive runs produce stable diffs.
|
|
32
|
+
*/
|
|
33
|
+
function writeEnrichedGraph(graph, projectRoot) {
|
|
34
|
+
const outPath = (0, node_path_1.join)(projectRoot, exports.GRAPH_FILENAME);
|
|
35
|
+
(0, node_fs_1.writeFileSync)(outPath, JSON.stringify(graph, null, 2) + '\n', 'utf-8');
|
|
36
|
+
return outPath;
|
|
37
|
+
}
|
|
38
|
+
/** Read a previously generated aidoc-graph.json, or null when absent/invalid. */
|
|
39
|
+
function readEnrichedGraph(projectRoot) {
|
|
40
|
+
const path = (0, node_path_1.join)(projectRoot, exports.GRAPH_FILENAME);
|
|
41
|
+
if (!(0, node_fs_1.existsSync)(path))
|
|
42
|
+
return null;
|
|
43
|
+
try {
|
|
44
|
+
const parsed = JSON.parse((0, node_fs_1.readFileSync)(path, 'utf-8'));
|
|
45
|
+
return parsed.version === 1 ? parsed : null;
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=serializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../../src/graph/serializer.ts"],"names":[],"mappings":";;;AA8BA,gDAIC;AAGD,8CASC;AA9CD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qCAAiE;AACjE,yCAAgC;AAGnB,QAAA,cAAc,GAAG,kBAAkB,CAAA;AAEhD;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,KAAoB,EAAE,WAAmB;IAC1E,MAAM,OAAO,GAAG,IAAA,gBAAI,EAAC,WAAW,EAAE,sBAAc,CAAC,CAAA;IACjD,IAAA,uBAAa,EAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC,CAAA;IACtE,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,iFAAiF;AACjF,SAAgB,iBAAiB,CAAC,WAAmB;IACnD,MAAM,IAAI,GAAG,IAAA,gBAAI,EAAC,WAAW,EAAE,sBAAc,CAAC,CAAA;IAC9C,IAAI,CAAC,IAAA,oBAAU,EAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IAClC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,IAAI,EAAE,OAAO,CAAC,CAAkB,CAAA;QACvE,OAAO,MAAM,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ai-agent types-expert
|
|
3
|
+
* @ai-agent-hint If you are not the types-expert specialist, consider switching to a specialized agent in Copilot Chat. Run `npx aidoc-kit agents` to generate agent instruction files.
|
|
4
|
+
* @ai-runtime UNIVERSEL
|
|
5
|
+
*
|
|
6
|
+
* @ai-context
|
|
7
|
+
* [GENERATED] This file exports: RawFile, RawSymbol, RawFileEdge, RawGraph, FileRole, CriticalityLevel, EnrichedFile, EnrichedGraph
|
|
8
|
+
* Imported by: src/codegraph/loader.ts, src/enricher/basicEnricher.ts, src/graph/query.ts, src/graph/serializer.ts
|
|
9
|
+
*
|
|
10
|
+
* @ai-when-modifying
|
|
11
|
+
* 1. Check cascade files below before modifying
|
|
12
|
+
* 2. After modifying, ask the developer to run @ai-validate
|
|
13
|
+
* 3. If you have no terminal access, report the command to run
|
|
14
|
+
*
|
|
15
|
+
* @ai-cascade
|
|
16
|
+
* - src/codegraph/loader.ts
|
|
17
|
+
* - src/enricher/basicEnricher.ts
|
|
18
|
+
* - src/graph/query.ts
|
|
19
|
+
* - src/graph/serializer.ts
|
|
20
|
+
*
|
|
21
|
+
* @ai-validate
|
|
22
|
+
* npm run typecheck
|
|
23
|
+
*/
|
|
24
|
+
/** One indexed source file, as reported by CodeGraph. */
|
|
25
|
+
export interface RawFile {
|
|
26
|
+
/** Project-relative path */
|
|
27
|
+
path: string;
|
|
28
|
+
language: string;
|
|
29
|
+
symbolCount: number;
|
|
30
|
+
}
|
|
31
|
+
/** A symbol extracted by CodeGraph (subset of its `nodes` table). */
|
|
32
|
+
export interface RawSymbol {
|
|
33
|
+
id: string;
|
|
34
|
+
/** function, method, class, interface, constant, type_alias… */
|
|
35
|
+
kind: string;
|
|
36
|
+
name: string;
|
|
37
|
+
qualifiedName: string;
|
|
38
|
+
/** Project-relative path of the declaring file */
|
|
39
|
+
file: string;
|
|
40
|
+
startLine: number;
|
|
41
|
+
endLine: number;
|
|
42
|
+
exported: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** A file-to-file relation aggregated from CodeGraph's symbol-level edges. */
|
|
45
|
+
export interface RawFileEdge {
|
|
46
|
+
from: string;
|
|
47
|
+
to: string;
|
|
48
|
+
/** imports, calls, references, extends… */
|
|
49
|
+
kind: string;
|
|
50
|
+
/** Number of symbol-level edges collapsed into this file-level edge */
|
|
51
|
+
count: number;
|
|
52
|
+
}
|
|
53
|
+
/** The raw knowledge graph read from `.codegraph/codegraph.db`. */
|
|
54
|
+
export interface RawGraph {
|
|
55
|
+
files: RawFile[];
|
|
56
|
+
symbols: RawSymbol[];
|
|
57
|
+
/** Cross-file edges only (same-file edges are dropped during aggregation) */
|
|
58
|
+
fileEdges: RawFileEdge[];
|
|
59
|
+
/** CodeGraph version that produced the index, when recorded */
|
|
60
|
+
codegraphVersion: string | null;
|
|
61
|
+
}
|
|
62
|
+
/** Execution role of a file, inferred by the enricher. */
|
|
63
|
+
export type FileRole = 'client' | 'server' | 'universal';
|
|
64
|
+
export type CriticalityLevel = 'low' | 'medium' | 'high' | 'critical';
|
|
65
|
+
/** One file with aidoc-kit's enrichment layered on top of the raw graph. */
|
|
66
|
+
export interface EnrichedFile {
|
|
67
|
+
file: string;
|
|
68
|
+
language: string;
|
|
69
|
+
role: FileRole;
|
|
70
|
+
/** How the role was determined — directive, path rule or content heuristic */
|
|
71
|
+
roleReason: string;
|
|
72
|
+
/** 0-100, see basicEnricher for the formula */
|
|
73
|
+
criticality: number;
|
|
74
|
+
criticalityLevel: CriticalityLevel;
|
|
75
|
+
/** Distinct files that import/call/reference this one */
|
|
76
|
+
inDegree: number;
|
|
77
|
+
/** Distinct files this one imports/calls/references */
|
|
78
|
+
outDegree: number;
|
|
79
|
+
/** Domain tags inferred from the path: api, auth, billing, payment… */
|
|
80
|
+
tags: string[];
|
|
81
|
+
symbolCount: number;
|
|
82
|
+
}
|
|
83
|
+
/** The enriched graph serialized to `aidoc-graph.json`. */
|
|
84
|
+
export interface EnrichedGraph {
|
|
85
|
+
/** Format version — bump on breaking changes to this shape */
|
|
86
|
+
version: 1;
|
|
87
|
+
generatedAt: string;
|
|
88
|
+
codegraph: {
|
|
89
|
+
version: string | null;
|
|
90
|
+
};
|
|
91
|
+
stats: {
|
|
92
|
+
files: number;
|
|
93
|
+
edges: number;
|
|
94
|
+
client: number;
|
|
95
|
+
server: number;
|
|
96
|
+
universal: number;
|
|
97
|
+
};
|
|
98
|
+
files: EnrichedFile[];
|
|
99
|
+
edges: RawFileEdge[];
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/graph/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,yDAAyD;AACzD,MAAM,WAAW,OAAO;IACtB,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,qEAAqE;AACrE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;IACrB,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,8EAA8E;AAC9E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,2CAA2C;IAC3C,IAAI,EAA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AM,CAAA;KAClB,CAAA;IACD,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @ai-agent types-expert
|
|
4
|
+
* @ai-agent-hint If you are not the types-expert specialist, consider switching to a specialized agent in Copilot Chat. Run `npx aidoc-kit agents` to generate agent instruction files.
|
|
5
|
+
* @ai-runtime UNIVERSEL
|
|
6
|
+
*
|
|
7
|
+
* @ai-context
|
|
8
|
+
* [GENERATED] This file exports: RawFile, RawSymbol, RawFileEdge, RawGraph, FileRole, CriticalityLevel, EnrichedFile, EnrichedGraph
|
|
9
|
+
* Imported by: src/codegraph/loader.ts, src/enricher/basicEnricher.ts, src/graph/query.ts, src/graph/serializer.ts
|
|
10
|
+
*
|
|
11
|
+
* @ai-when-modifying
|
|
12
|
+
* 1. Check cascade files below before modifying
|
|
13
|
+
* 2. After modifying, ask the developer to run @ai-validate
|
|
14
|
+
* 3. If you have no terminal access, report the command to run
|
|
15
|
+
*
|
|
16
|
+
* @ai-cascade
|
|
17
|
+
* - src/codegraph/loader.ts
|
|
18
|
+
* - src/enricher/basicEnricher.ts
|
|
19
|
+
* - src/graph/query.ts
|
|
20
|
+
* - src/graph/serializer.ts
|
|
21
|
+
*
|
|
22
|
+
* @ai-validate
|
|
23
|
+
* npm run typecheck
|
|
24
|
+
*/
|
|
25
|
+
// ─── Raw graph (read from CodeGraph's SQLite index) ────────────────────────
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/graph/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,8EAA8E"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,4 +23,11 @@ export { writeKnowledgeBase, writeAgentsMd, writeDocBlock } from './core/writer'
|
|
|
23
23
|
export { loadConfig, isIgnored } from './core/config';
|
|
24
24
|
export { defaultRules, removeConsoleLogs, replaceAnyWithUnknown } from './rules/index';
|
|
25
25
|
export type { AiDocBlock, Rule, ScanResult, KnowledgeBase, AidocConfig } from './types';
|
|
26
|
+
export { detectCodegraph, codegraphInstallHint } from './codegraph/detect';
|
|
27
|
+
export { runCodegraphIndex, codegraphDbPath } from './codegraph/runner';
|
|
28
|
+
export { loadRawGraph } from './codegraph/loader';
|
|
29
|
+
export { enrichGraph, inferRole, inferTags, computeCriticality } from './enricher/basicEnricher';
|
|
30
|
+
export { writeEnrichedGraph, readEnrichedGraph, GRAPH_FILENAME } from './graph/serializer';
|
|
31
|
+
export { getDependents, getDependencies, getCriticalFiles } from './graph/query';
|
|
32
|
+
export type { RawGraph, RawFile, RawSymbol, RawFileEdge, EnrichedGraph, EnrichedFile, FileRole, CriticalityLevel, } from './graph/types';
|
|
26
33
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAClF,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AACtF,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAClF,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AACtF,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAGvF,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC1E,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAChG,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAC1F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChF,YAAY,EACV,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EACzC,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,GACxD,MAAM,eAAe,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceAnyWithUnknown = exports.removeConsoleLogs = exports.defaultRules = exports.isIgnored = exports.loadConfig = exports.writeDocBlock = exports.writeAgentsMd = exports.writeKnowledgeBase = exports.applyRules = exports.generateAiDocBlock = exports.buildReverseImportMap = exports.extractAiDocs = exports.scanProject = void 0;
|
|
3
|
+
exports.getCriticalFiles = exports.getDependencies = exports.getDependents = exports.GRAPH_FILENAME = exports.readEnrichedGraph = exports.writeEnrichedGraph = exports.computeCriticality = exports.inferTags = exports.inferRole = exports.enrichGraph = exports.loadRawGraph = exports.codegraphDbPath = exports.runCodegraphIndex = exports.codegraphInstallHint = exports.detectCodegraph = exports.replaceAnyWithUnknown = exports.removeConsoleLogs = exports.defaultRules = exports.isIgnored = exports.loadConfig = exports.writeDocBlock = exports.writeAgentsMd = exports.writeKnowledgeBase = exports.applyRules = exports.generateAiDocBlock = exports.buildReverseImportMap = exports.extractAiDocs = exports.scanProject = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* @ai-agent general-expert
|
|
6
6
|
* @ai-runtime UNIVERSEL
|
|
@@ -39,4 +39,26 @@ var index_1 = require("./rules/index");
|
|
|
39
39
|
Object.defineProperty(exports, "defaultRules", { enumerable: true, get: function () { return index_1.defaultRules; } });
|
|
40
40
|
Object.defineProperty(exports, "removeConsoleLogs", { enumerable: true, get: function () { return index_1.removeConsoleLogs; } });
|
|
41
41
|
Object.defineProperty(exports, "replaceAnyWithUnknown", { enumerable: true, get: function () { return index_1.replaceAnyWithUnknown; } });
|
|
42
|
+
// Enriched code graph (CodeGraph integration)
|
|
43
|
+
var detect_1 = require("./codegraph/detect");
|
|
44
|
+
Object.defineProperty(exports, "detectCodegraph", { enumerable: true, get: function () { return detect_1.detectCodegraph; } });
|
|
45
|
+
Object.defineProperty(exports, "codegraphInstallHint", { enumerable: true, get: function () { return detect_1.codegraphInstallHint; } });
|
|
46
|
+
var runner_1 = require("./codegraph/runner");
|
|
47
|
+
Object.defineProperty(exports, "runCodegraphIndex", { enumerable: true, get: function () { return runner_1.runCodegraphIndex; } });
|
|
48
|
+
Object.defineProperty(exports, "codegraphDbPath", { enumerable: true, get: function () { return runner_1.codegraphDbPath; } });
|
|
49
|
+
var loader_1 = require("./codegraph/loader");
|
|
50
|
+
Object.defineProperty(exports, "loadRawGraph", { enumerable: true, get: function () { return loader_1.loadRawGraph; } });
|
|
51
|
+
var basicEnricher_1 = require("./enricher/basicEnricher");
|
|
52
|
+
Object.defineProperty(exports, "enrichGraph", { enumerable: true, get: function () { return basicEnricher_1.enrichGraph; } });
|
|
53
|
+
Object.defineProperty(exports, "inferRole", { enumerable: true, get: function () { return basicEnricher_1.inferRole; } });
|
|
54
|
+
Object.defineProperty(exports, "inferTags", { enumerable: true, get: function () { return basicEnricher_1.inferTags; } });
|
|
55
|
+
Object.defineProperty(exports, "computeCriticality", { enumerable: true, get: function () { return basicEnricher_1.computeCriticality; } });
|
|
56
|
+
var serializer_1 = require("./graph/serializer");
|
|
57
|
+
Object.defineProperty(exports, "writeEnrichedGraph", { enumerable: true, get: function () { return serializer_1.writeEnrichedGraph; } });
|
|
58
|
+
Object.defineProperty(exports, "readEnrichedGraph", { enumerable: true, get: function () { return serializer_1.readEnrichedGraph; } });
|
|
59
|
+
Object.defineProperty(exports, "GRAPH_FILENAME", { enumerable: true, get: function () { return serializer_1.GRAPH_FILENAME; } });
|
|
60
|
+
var query_1 = require("./graph/query");
|
|
61
|
+
Object.defineProperty(exports, "getDependents", { enumerable: true, get: function () { return query_1.getDependents; } });
|
|
62
|
+
Object.defineProperty(exports, "getDependencies", { enumerable: true, get: function () { return query_1.getDependencies; } });
|
|
63
|
+
Object.defineProperty(exports, "getCriticalFiles", { enumerable: true, get: function () { return query_1.getCriticalFiles; } });
|
|
42
64
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;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AAA,WAAW,OAAA;AAAE,0GAAA,SAAS,OAAA;AAAE,0GAAA,SAAS,OAAA;AAAE,mHAAA,kBAAkB,OAAA;AAC9D,iDAA0F;AAAjF,gHAAA,kBAAkB,OAAA;AAAE,+GAAA,iBAAiB,OAAA;AAAE,4GAAA,cAAc,OAAA;AAC9D,uCAAgF;AAAvE,sGAAA,aAAa,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,yGAAA,gBAAgB,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aidoc-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "AI-native documentation scanner for JS/TS projects — gives AI agents persistent memory across sessions",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -45,11 +45,18 @@
|
|
|
45
45
|
"url": "https://github.com/Clemsrec/aidoc-kit/issues"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
+
"@colbymchenry/codegraph": "^1.6.0",
|
|
48
49
|
"@types/node": "^25.6.0",
|
|
49
50
|
"typescript": "^5.0.0"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
|
-
"typescript": ">=5.0.0"
|
|
53
|
+
"typescript": ">=5.0.0",
|
|
54
|
+
"@colbymchenry/codegraph": ">=1.6.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"@colbymchenry/codegraph": {
|
|
58
|
+
"optional": true
|
|
59
|
+
}
|
|
53
60
|
},
|
|
54
61
|
"engines": {
|
|
55
62
|
"node": ">=18.0.0"
|