@ttsc/graph 0.19.3 → 0.20.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/lib/TtscGraphApplication.js +3 -1
- package/lib/TtscGraphApplication.js.map +1 -1
- package/lib/bin.js +15 -3
- package/lib/bin.js.map +1 -1
- package/lib/index.d.ts +13 -2
- package/lib/index.js +24 -30
- package/lib/index.js.map +1 -1
- package/lib/launcherArgs.d.ts +24 -0
- package/lib/launcherArgs.js +136 -0
- package/lib/launcherArgs.js.map +1 -0
- package/lib/model/TtscGraphMemory.d.ts +9 -5
- package/lib/model/TtscGraphMemory.js +35 -58
- package/lib/model/TtscGraphMemory.js.map +1 -1
- package/lib/model/TtscGraphNodeId.d.ts +17 -0
- package/lib/model/TtscGraphNodeId.js +69 -0
- package/lib/model/TtscGraphNodeId.js.map +1 -0
- package/lib/model/TtscGraphSession.d.ts +23 -7
- package/lib/model/TtscGraphSession.js +402 -210
- package/lib/model/TtscGraphSession.js.map +1 -1
- package/lib/model/TtscGraphSourceReader.d.ts +27 -0
- package/lib/model/TtscGraphSourceReader.js +97 -0
- package/lib/model/TtscGraphSourceReader.js.map +1 -0
- package/lib/model/loadGraph.d.ts +4 -4
- package/lib/model/loadGraph.js +233 -168
- package/lib/model/loadGraph.js.map +1 -1
- package/lib/reduce.d.ts +4 -1
- package/lib/reduce.js +112 -29
- package/lib/reduce.js.map +1 -1
- package/lib/server/createServer.js +17 -6
- package/lib/server/createServer.js.map +1 -1
- package/lib/server/pathPolicy.d.ts +6 -0
- package/lib/server/pathPolicy.js +10 -1
- package/lib/server/pathPolicy.js.map +1 -1
- package/lib/server/resolveHandle.js +22 -18
- package/lib/server/resolveHandle.js.map +1 -1
- package/lib/server/resultAudit.d.ts +41 -20
- package/lib/server/resultAudit.js +62 -34
- package/lib/server/resultAudit.js.map +1 -1
- package/lib/server/resultNext.d.ts +5 -0
- package/lib/server/resultNext.js.map +1 -1
- package/lib/server/runDetails.d.ts +2 -2
- package/lib/server/runDetails.js +54 -108
- package/lib/server/runDetails.js.map +1 -1
- package/lib/server/runEntrypoints.js +1 -1
- package/lib/server/runEntrypoints.js.map +1 -1
- package/lib/server/runLookup.js +1 -1
- package/lib/server/runLookup.js.map +1 -1
- package/lib/server/runTour.js +113 -30
- package/lib/server/runTour.js.map +1 -1
- package/lib/server/runTrace.d.ts +22 -0
- package/lib/server/runTrace.js +293 -63
- package/lib/server/runTrace.js.map +1 -1
- package/lib/structures/ITtscGraphDump.d.ts +13 -13
- package/lib/structures/ITtscGraphNode.d.ts +34 -0
- package/lib/structures/ITtscGraphTrace.d.ts +1 -1
- package/lib/view.js +18 -28
- package/lib/view.js.map +1 -1
- package/package.json +5 -5
- package/src/TtscGraphApplication.ts +5 -1
- package/src/bin.ts +13 -3
- package/src/index.ts +34 -27
- package/src/launcherArgs.ts +168 -0
- package/src/model/TtscGraphMemory.ts +34 -60
- package/src/model/TtscGraphNodeId.ts +77 -0
- package/src/model/TtscGraphSession.ts +228 -55
- package/src/model/TtscGraphSourceReader.ts +117 -0
- package/src/model/loadGraph.ts +4 -4
- package/src/reduce.ts +136 -31
- package/src/server/createServer.ts +12 -2
- package/src/server/pathPolicy.ts +10 -1
- package/src/server/resolveHandle.ts +21 -22
- package/src/server/resultAudit.ts +64 -33
- package/src/server/resultNext.ts +6 -0
- package/src/server/runDetails.ts +57 -113
- package/src/server/runEntrypoints.ts +1 -1
- package/src/server/runLookup.ts +1 -1
- package/src/server/runTour.ts +133 -39
- package/src/server/runTrace.ts +401 -65
- package/src/structures/ITtscGraphDump.ts +13 -13
- package/src/structures/ITtscGraphNode.ts +40 -0
- package/src/structures/ITtscGraphTrace.ts +1 -1
- package/src/view.ts +25 -23
package/lib/reduce.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface RawNode {
|
|
|
4
4
|
kind: string;
|
|
5
5
|
file: string;
|
|
6
6
|
external?: boolean;
|
|
7
|
+
ignored?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export interface RawEdge {
|
|
9
10
|
from: string;
|
|
@@ -35,12 +36,14 @@ export interface ViewerPayload {
|
|
|
35
36
|
nodes: number;
|
|
36
37
|
links: number;
|
|
37
38
|
droppedExternal: number;
|
|
39
|
+
droppedIgnored: number;
|
|
38
40
|
droppedByCap: number;
|
|
39
41
|
};
|
|
40
42
|
nodes: ViewerNode[];
|
|
41
43
|
links: ViewerLink[];
|
|
42
44
|
}
|
|
43
|
-
export declare function reduce(raw: RawDump, { maxNodes, keepExternal }?: {
|
|
45
|
+
export declare function reduce(raw: RawDump, { maxNodes, keepExternal, keepIgnored }?: {
|
|
44
46
|
maxNodes?: number;
|
|
45
47
|
keepExternal?: boolean;
|
|
48
|
+
keepIgnored?: boolean;
|
|
46
49
|
}): ViewerPayload;
|
package/lib/reduce.js
CHANGED
|
@@ -8,18 +8,34 @@ exports.reduce = reduce;
|
|
|
8
8
|
function posix(p) {
|
|
9
9
|
return p.replace(/\\/g, "/");
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
11
|
+
/** Absolute POSIX, Windows drive, or UNC path; relative dumps skip rerooting. */
|
|
12
12
|
function isAbsolute(p) {
|
|
13
13
|
return /^(?:[A-Za-z]:)?\//.test(posix(p));
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
15
|
+
function isWindowsPath(p) {
|
|
16
|
+
const normalized = posix(p);
|
|
17
|
+
return /^[A-Za-z]:(?:\/|$)/.test(normalized) || normalized.startsWith("//");
|
|
18
|
+
}
|
|
19
|
+
function directoryOf(file) {
|
|
20
|
+
const normalized = posix(file).replace(/\/+$/, "");
|
|
21
|
+
const slash = normalized.lastIndexOf("/");
|
|
22
|
+
if (slash < 0)
|
|
23
|
+
return "";
|
|
24
|
+
return slash === 0 ? "/" : normalized.slice(0, slash);
|
|
25
|
+
}
|
|
26
|
+
function commonRoot(directories) {
|
|
27
|
+
if (directories.length === 0)
|
|
17
28
|
return "";
|
|
18
|
-
let parts = posix(
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
let parts = posix(directories[0]).split("/");
|
|
30
|
+
const caseInsensitive = directories.every(isWindowsPath);
|
|
31
|
+
for (const directory of directories.slice(1)) {
|
|
32
|
+
const other = posix(directory).split("/");
|
|
21
33
|
let i = 0;
|
|
22
|
-
while (i < parts.length &&
|
|
34
|
+
while (i < parts.length &&
|
|
35
|
+
i < other.length &&
|
|
36
|
+
(caseInsensitive
|
|
37
|
+
? parts[i].toLowerCase() === other[i].toLowerCase()
|
|
38
|
+
: parts[i] === other[i]))
|
|
23
39
|
i++;
|
|
24
40
|
parts = parts.slice(0, i);
|
|
25
41
|
if (parts.length === 0)
|
|
@@ -27,26 +43,72 @@ function commonRoot(files) {
|
|
|
27
43
|
}
|
|
28
44
|
return parts.join("/");
|
|
29
45
|
}
|
|
30
|
-
//
|
|
31
|
-
//
|
|
46
|
+
// A null root means the dump's paths are already project-relative (the current
|
|
47
|
+
// `ttscgraph dump` contract); they pass through structure-intact.
|
|
32
48
|
function relativize(abs, root) {
|
|
33
49
|
const a = posix(abs);
|
|
34
|
-
|
|
35
|
-
if (!r)
|
|
50
|
+
if (root === null)
|
|
36
51
|
return a;
|
|
37
|
-
|
|
52
|
+
const normalizedRoot = posix(root);
|
|
53
|
+
const r = normalizedRoot === "/" ? "/" : normalizedRoot.replace(/\/+$/, "");
|
|
54
|
+
const caseInsensitive = isWindowsPath(a) && isWindowsPath(r);
|
|
55
|
+
const comparedPath = caseInsensitive ? a.toLowerCase() : a;
|
|
56
|
+
const comparedRoot = caseInsensitive ? r.toLowerCase() : r;
|
|
57
|
+
if (comparedRoot &&
|
|
58
|
+
(comparedRoot === "/" ||
|
|
59
|
+
comparedPath === comparedRoot ||
|
|
60
|
+
comparedPath.startsWith(comparedRoot + "/")))
|
|
38
61
|
return a.slice(r.length).replace(/^\/+/, "");
|
|
39
62
|
const nm = a.lastIndexOf("node_modules/");
|
|
63
|
+
// A package tail is a deliberate normalization: the same dependency reached
|
|
64
|
+
// through two roots is one thing to look at.
|
|
40
65
|
if (nm >= 0)
|
|
41
66
|
return a.slice(nm);
|
|
42
|
-
|
|
43
|
-
|
|
67
|
+
// Anything else keeps its whole path. Collapsing to the basename made the
|
|
68
|
+
// projection non-injective, and node ids are rewritten with it, so two
|
|
69
|
+
// declarations in two files could become one viewer node and an edge could
|
|
70
|
+
// resolve back to the wrong end. A longer label is a cosmetic cost; a
|
|
71
|
+
// collided id is a wrong picture.
|
|
72
|
+
return a;
|
|
44
73
|
}
|
|
45
74
|
function rewriteId(id, root) {
|
|
46
|
-
const hash = id
|
|
75
|
+
const hash = graphNodeIdHash(id);
|
|
47
76
|
if (hash < 0)
|
|
48
77
|
return id;
|
|
49
|
-
return relativize(id.slice(0, hash), root) + id.slice(hash);
|
|
78
|
+
return (escapeGraphNodeIdPart(relativize(unescapeGraphNodeIdPart(id.slice(0, hash)), root)) + id.slice(hash));
|
|
79
|
+
}
|
|
80
|
+
function escapeGraphNodeIdPart(value) {
|
|
81
|
+
return value.replaceAll("\\", "\\\\").replaceAll("#", "\\#");
|
|
82
|
+
}
|
|
83
|
+
function unescapeGraphNodeIdPart(value) {
|
|
84
|
+
let result = "";
|
|
85
|
+
for (let index = 0; index < value.length; index++) {
|
|
86
|
+
const next = value[index + 1];
|
|
87
|
+
if (value[index] === "\\" && next !== undefined) {
|
|
88
|
+
if (next === "#" || (next === "\\" && !legacyUNCStart(value, index))) {
|
|
89
|
+
result += next;
|
|
90
|
+
index++;
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
result += value[index];
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
function legacyUNCStart(value, index) {
|
|
99
|
+
return (index === 0 && value.length > 2 && value[2] !== "\\" && value[2] !== "#");
|
|
100
|
+
}
|
|
101
|
+
function graphNodeIdHash(id) {
|
|
102
|
+
for (let index = 0; index < id.length; index++) {
|
|
103
|
+
if (id[index] !== "#")
|
|
104
|
+
continue;
|
|
105
|
+
let slashes = 0;
|
|
106
|
+
for (let slash = index - 1; slash >= 0 && id[slash] === "\\"; slash--)
|
|
107
|
+
slashes++;
|
|
108
|
+
if (slashes % 2 === 0)
|
|
109
|
+
return index;
|
|
110
|
+
}
|
|
111
|
+
return -1;
|
|
50
112
|
}
|
|
51
113
|
function degreeOf(nodes, edges) {
|
|
52
114
|
const degree = new Map(nodes.map((n) => [n.id, 0]));
|
|
@@ -60,9 +122,9 @@ function degreeOf(nodes, edges) {
|
|
|
60
122
|
}
|
|
61
123
|
/**
|
|
62
124
|
* Collapse the fine-grained wire kinds `ttscgraph dump` emits (calls,
|
|
63
|
-
* instantiates, renders, accesses, type_ref, extends, implements)
|
|
64
|
-
* three display families the viewer colors and its legend name. An
|
|
65
|
-
* passes through and renders with the fallback color.
|
|
125
|
+
* instantiates, renders, accesses, type_ref, extends, implements, overrides)
|
|
126
|
+
* into the three display families the viewer colors and its legend name. An
|
|
127
|
+
* unknown kind passes through and renders with the fallback color.
|
|
66
128
|
*/
|
|
67
129
|
const DISPLAY_KIND = {
|
|
68
130
|
calls: "value-call",
|
|
@@ -72,28 +134,41 @@ const DISPLAY_KIND = {
|
|
|
72
134
|
type_ref: "type-ref",
|
|
73
135
|
extends: "heritage",
|
|
74
136
|
implements: "heritage",
|
|
137
|
+
overrides: "heritage",
|
|
75
138
|
};
|
|
76
139
|
function displayKind(kind) {
|
|
77
140
|
return DISPLAY_KIND[kind] ?? kind;
|
|
78
141
|
}
|
|
79
|
-
function reduce(raw, { maxNodes = 1200, keepExternal = false, } = {}) {
|
|
80
|
-
|
|
142
|
+
function reduce(raw, { maxNodes = 1200, keepExternal = false, keepIgnored = false, } = {}) {
|
|
143
|
+
// Drop external boundary leaves and git-ignored generated code (a Prisma
|
|
144
|
+
// client and the like, tagged `ignored` by the dump) so the authored graph is
|
|
145
|
+
// not buried under codegen. The cap is by degree, and generated clients are
|
|
146
|
+
// large and densely connected, so leaving them in does not merely add noise:
|
|
147
|
+
// they outrank authored code for the surviving slots.
|
|
148
|
+
const keep = (n) => (keepExternal || !n.external) && (keepIgnored || !n.ignored);
|
|
149
|
+
const keptByBoundary = raw.nodes.filter(keep);
|
|
81
150
|
// Reroot only absolute paths (the legacy dump contract); a current dump's
|
|
82
151
|
// paths are already project-relative and keep their structure as-is.
|
|
83
|
-
const projectFiles = raw.nodes
|
|
152
|
+
const projectFiles = raw.nodes
|
|
153
|
+
.filter((n) => !n.external && !n.ignored)
|
|
154
|
+
.map((n) => n.file);
|
|
84
155
|
const root = projectFiles.length > 0 && isAbsolute(projectFiles[0])
|
|
85
|
-
?
|
|
86
|
-
|
|
87
|
-
|
|
156
|
+
? // A dump may mix path forms from one valid project: in-project sources
|
|
157
|
+
// are relative, package sources carry a node_modules tail, and other
|
|
158
|
+
// out-of-project sources stay absolute. Mixing those into one common
|
|
159
|
+
// root yields the empty string, so only absolute directories vote.
|
|
160
|
+
commonRoot(projectFiles.filter(isAbsolute).map(directoryOf))
|
|
161
|
+
: null;
|
|
162
|
+
const liveIds = new Set(keptByBoundary.map((n) => n.id));
|
|
88
163
|
const liveEdges = raw.edges.filter((e) => liveIds.has(e.from) && liveIds.has(e.to));
|
|
89
|
-
const degree = degreeOf(
|
|
90
|
-
let kept =
|
|
164
|
+
const degree = degreeOf(keptByBoundary, liveEdges);
|
|
165
|
+
let kept = keptByBoundary;
|
|
91
166
|
let droppedByCap = 0;
|
|
92
167
|
if (kept.length > maxNodes) {
|
|
93
168
|
kept = [...kept]
|
|
94
169
|
.sort((a, b) => (degree.get(b.id) ?? 0) - (degree.get(a.id) ?? 0))
|
|
95
170
|
.slice(0, maxNodes);
|
|
96
|
-
droppedByCap =
|
|
171
|
+
droppedByCap = keptByBoundary.length - kept.length;
|
|
97
172
|
}
|
|
98
173
|
const keptIds = new Set(kept.map((n) => n.id));
|
|
99
174
|
const edges = liveEdges.filter((e) => keptIds.has(e.from) && keptIds.has(e.to));
|
|
@@ -122,7 +197,15 @@ function reduce(raw, { maxNodes = 1200, keepExternal = false, } = {}) {
|
|
|
122
197
|
rawEdges: raw.edges.length,
|
|
123
198
|
nodes: nodes.length,
|
|
124
199
|
links: links.length,
|
|
125
|
-
|
|
200
|
+
// Each counter reports what its own filter dropped, and reports zero when
|
|
201
|
+
// that filter was turned off. The two are disjoint: an external node is
|
|
202
|
+
// counted as external whether or not it is also ignored.
|
|
203
|
+
droppedExternal: keepExternal
|
|
204
|
+
? 0
|
|
205
|
+
: raw.nodes.filter((n) => n.external).length,
|
|
206
|
+
droppedIgnored: keepIgnored
|
|
207
|
+
? 0
|
|
208
|
+
: raw.nodes.filter((n) => n.ignored && !n.external).length,
|
|
126
209
|
droppedByCap,
|
|
127
210
|
},
|
|
128
211
|
nodes,
|
package/lib/reduce.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reduce.js","sourceRoot":"","sources":["../src/reduce.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,0EAA0E;AAC1E,+EAA+E;AAC/E,mEAAmE;;;
|
|
1
|
+
{"version":3,"file":"reduce.js","sourceRoot":"","sources":["../src/reduce.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,0EAA0E;AAC1E,+EAA+E;AAC/E,mEAAmE;;;AAoDnE,SAAS,KAAK,CAAC,CAAS;IACtB,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,iFAAiF;AACjF,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,aAAa,CAAC,CAAS;IAC9B,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5B,OAAO,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,WAAW,CAAC,IAAY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W,CAAC,CAAC,CAAC,IAAI,CAAC;KAC1B,CAAC,CAAC;SACF,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAEjE,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE;QAC1B,MAAM,EAAE;YACN,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM;YAC1B,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM;YAC1B,KAAK,EAAE,KAAK,CAAC,MAAM;YACnB,KAAK,EAAE,KAAK,CAAC,MAAM;YACnB,0EAA0E;YAC1E,wEAAwE;YACxE,yDAAyD;YACzD,eAAe,EAAE,YAAY;gBAC3B,CAAC,CAAC,CAAC;gBACH,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM;YAC9C,cAAc,EAAE,WAAW;gBACzB,CAAC,CAAC,CAAC;gBACH,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM;YAC5D,YAAY;SACb;QACD,KAAK;QACL,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -62,13 +62,15 @@ const TtscGraphApplication_1 = require("../TtscGraphApplication");
|
|
|
62
62
|
* and the library owns the registration again.
|
|
63
63
|
*/
|
|
64
64
|
function createServer(graph, version) {
|
|
65
|
-
|
|
66
|
-
return (0, mcp_1.createMcpServer)({
|
|
65
|
+
const server = (0, mcp_1.createMcpServer)({
|
|
67
66
|
"protocol": "class",
|
|
68
67
|
"name": "ttsc-graph",
|
|
69
68
|
"execute": new TtscGraphApplication_1.TtscGraphApplication(graph),
|
|
70
69
|
"application": _llmApplicationFinalize_1._llmApplicationFinalize({
|
|
71
70
|
description: "## Code Graph MCP\n\n`inspect_typescript_graph` returns a compiler-built TypeScript graph contract\nfor the current on-disk source snapshot.\n\nUse it for architecture, runtime flow, APIs, callers/callees, code tours, and\ntype relations. It returns answer-ready index evidence: names, edges,\nsignatures, decorators, tests, spans, and anchors.\n\nEvery returned fact \u2014 each name, edge, signature, and span \u2014 is\ncompiler-resolved and verified for the snapshot that call synchronized, so\ntrust it without re-checking against files. Where an operation ranks a\nshortlist against your question (`lookup`, `entrypoints`, `tour`), the facts\nstay verified but the selection is heuristic: judge whether its coverage\nanswers you, and a follow-up request or a read of a cited span is fair when\nit does not.\n\n## Requests\n\nA request is a union: pick the single type below that best fits the question,\nand submit exactly that one.\n\n- `tour`: architecture, runtime flow, orientation, or a code tour. One call is\n the whole answer; do not split it. Name the machinery you expect it to be\n made of in its `reinterpretations`, or send none.\n- `entrypoints`: find where execution starts when entry points are unknown.\n- `lookup`: locate a named symbol.\n- `trace`: follow calls or data flow forward or backward from a symbol, or \u2014\n with `to` \u2014 the path between two symbols when both ends are known, which is\n the one call that answers \"how does A reach B\".\n- `details`: signatures, members, and relations of named symbols \u2014 including\n the classes that implement an interface, which is the one call that answers\n \"what actually implements this\".\n- `overview`: project layers and folder structure.\n- `escape`: the answer is outside the graph (source body text, non-TypeScript\n files, exact search).\n\n## Chain of Thought\n\nFill these fields in order before the call; each one narrows the reasoning\ntoward the single request you submit.\n\n- `question`: the code question, in the user's own words.\n- `draft`: `{ reason, type }` \u2014 why the smallest request that could answer it,\n then that request's `type`.\n- `review`: fix a broad, stale, or duplicate draft. If the graph already\n answered, or the evidence is outside it, escape.\n- `request`: the final choice. Each branch documents its own fields; fill them\n from what the branch says, not from what another branch wanted.\n\n## What to trust\n\nBefore source edits, every returned fact is compiler-resolved and verified.\nNever use extra graph calls, repository search, or file reads to doubt,\nfact-check, re-derive, re-narrate, or re-confirm a returned node, span, edge,\nsignature, decorator, test, reference, step, or anchor. The server resolved\neach one to the type-checked program for the snapshot the call synced to, and\n`audit` says so on every result.\n\nSelection is the separate question. `lookup`, `entrypoints`, and `tour` match\nyour question and return a scored, ranked, per-file-capped, limited\nshortlist; their facts are still verified, but whether the shortlist covers\nwhat you asked is yours to judge, and their `audit` says that instead of\nclaiming completeness. A follow-up request or a read of a cited span for\nmissed coverage is legitimate \u2014 re-confirming a fact the graph already\nresolved is not.\n\n## Stop\n\nLet the result's `next` set the pace, and do not re-confirm what the graph\nresolved.\n\n- A span is a citation, not a cue to open the file to re-check a fact.\n- Follow the result's `next`: `answer` means stop and answer from it, `inspect`\n means make exactly the one request it names, `outside` means escape,\n `clarify` means restate the request.\n- For a ranked shortlist (`lookup`, `entrypoints`, `tour`), `next` and\n `truncated` say whether coverage is settled; when it is not, one more\n request is the right move \u2014 not a file read to re-verify facts already\n given.",
|
|
71
|
+
config: {
|
|
72
|
+
strict: false
|
|
73
|
+
},
|
|
72
74
|
functions: [
|
|
73
75
|
{
|
|
74
76
|
description: "Answer a TypeScript question from the compiler's own index of this\nrepository.\n\nThe graph holds every symbol, call, type, decorator and test, each with its\nfile and line, resolved from the source on disk now. Submit exactly one\nrequest:\n\n- `tour`: architecture, the runtime flow from the public API to the code that\n does the work, nearby paths, and the tests to read \u2014 a whole orientation\n in one call\n- `trace`: what a symbol calls, what calls it, or the path from A to B\n- `details`: signatures, members, and what implements an interface\n- `lookup`: where a named symbol is declared\n- `entrypoints`: where execution starts, when the entry is unknown\n- `overview`: the project's layers and folder structure\n\nEvery fact in a result is the checker's own resolution, audited before\nreturn, so no fact needs verifying; for the ranked operations (`lookup`,\n`entrypoints`, `tour`), judge whether the shortlist covers your question.\nRead a file for what the graph does not carry: a body, the text in a span.",
|
|
@@ -151,7 +153,7 @@ function createServer(graph, version) {
|
|
|
151
153
|
"arguments"
|
|
152
154
|
],
|
|
153
155
|
additionalProperties: false,
|
|
154
|
-
description: "A decorator as written on a declaration, carried on the decorated\
|
|
156
|
+
description: "A decorator as written on a declaration, carried on the decorated\nITtscGraphNode's `decorators`. Reported faithfully, not interpreted\nper framework: `name` is the decorator as written (`Controller`, `Get`,\n`TypedRoute.Get`, ...), and statically resolvable literal arguments are\npreserved so a consumer applies its own meaning without re-parsing source."
|
|
155
157
|
},
|
|
156
158
|
"ITtscGraphDecorator.IArgument": {
|
|
157
159
|
type: "object",
|
|
@@ -173,7 +175,7 @@ function createServer(graph, version) {
|
|
|
173
175
|
},
|
|
174
176
|
required: [],
|
|
175
177
|
additionalProperties: false,
|
|
176
|
-
description: "One argument of an . `literal` is set only when\nthe argument is a string, number, or boolean literal the producer could\nresolve statically, so a consumer can use it without evaluating code."
|
|
178
|
+
description: "One argument of an ITtscGraphDecorator. `literal` is set only when\nthe argument is a string, number, or boolean literal the producer could\nresolve statically, so a consumer can use it without evaluating code."
|
|
177
179
|
},
|
|
178
180
|
ITtscGraphDetails: {
|
|
179
181
|
type: "object",
|
|
@@ -779,7 +781,7 @@ function createServer(graph, version) {
|
|
|
779
781
|
"startLine"
|
|
780
782
|
],
|
|
781
783
|
additionalProperties: false,
|
|
782
|
-
description: "A source location grounding a node or edge in real code: the declaration span\nfor a node, or the expression range that produced an edge. Display and\ngrounding only, never identity (a node's id is position-invariant, see\
|
|
784
|
+
description: "A source location grounding a node or edge in real code: the declaration span\nfor a node, or the expression range that produced an edge. Display and\ngrounding only, never identity (a node's id is position-invariant, see\nITtscGraphNode). Lines and columns are 1-based; MCP keeps evidence as\ncoordinates, so read the file yourself when you truly need source text."
|
|
783
785
|
},
|
|
784
786
|
ITtscGraphLookup: {
|
|
785
787
|
type: "object",
|
|
@@ -1337,7 +1339,7 @@ function createServer(graph, version) {
|
|
|
1337
1339
|
},
|
|
1338
1340
|
truncated: {
|
|
1339
1341
|
type: "boolean",
|
|
1340
|
-
description: "
|
|
1342
|
+
description: "In an open trace, true when a bound omitted an eligible node or hop."
|
|
1341
1343
|
},
|
|
1342
1344
|
target: {
|
|
1343
1345
|
$ref: "#/$defs/ITtscGraphTrace.INode",
|
|
@@ -2162,5 +2164,14 @@ function createServer(graph, version) {
|
|
|
2162
2164
|
]
|
|
2163
2165
|
})
|
|
2164
2166
|
});
|
|
2167
|
+
// @typia/mcp 13.1.0 exposes no class-controller version option. The MCP SDK
|
|
2168
|
+
// keeps the initialize implementation on its public inner Server, so update
|
|
2169
|
+
// that already-constructed implementation before any transport connects.
|
|
2170
|
+
const inner = server.server;
|
|
2171
|
+
if (inner._serverInfo === undefined) {
|
|
2172
|
+
throw new Error("@ttsc/graph: MCP SDK omitted the server implementation");
|
|
2173
|
+
}
|
|
2174
|
+
inner._serverInfo.version = version;
|
|
2175
|
+
return server;
|
|
2165
2176
|
}
|
|
2166
2177
|
//# sourceMappingURL=createServer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createServer.js","sourceRoot":"","sources":["../../src/server/createServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oCAA6C;AAC7C,kDAA0B;AAE1B,kEAAgF;AAGhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,sBACE,KAAsB,EACtB,OAAe;IAEf,
|
|
1
|
+
{"version":3,"file":"createServer.js","sourceRoot":"","sources":["../../src/server/createServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oCAA6C;AAC7C,kDAA0B;AAE1B,kEAAgF;AAGhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,sBACE,KAAsB,EACtB,OAAe;IAEf,MAAM,MAAM,GAAG,IAAA,qBAAe;;gBAE1B,YAAY;mBACZ,IAAI,2CAAoB,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AM,CAAC,MAEpB,CAAC;IACF,IAAI,KAAK,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC;IACpC,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { ITtscGraphNode } from "../structures/ITtscGraphNode";
|
|
2
2
|
/** True for dependency declarations outside the authored project graph. */
|
|
3
3
|
export declare function isExternalNode(node: ITtscGraphNode): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* True for a `.d.ts` declaration file. Every declaration such a file holds is
|
|
6
|
+
* ambient by construction, so none of them carries a body the graph can walk
|
|
7
|
+
* into, whether or not the `declare` keyword is written out.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isDeclarationFile(file: string): boolean;
|
|
4
10
|
/** True for tests, examples, fixtures, generated output, and build artifacts. */
|
|
5
11
|
export declare function isSupportPath(file: string): boolean;
|
|
6
12
|
/** True for source files whose declarations are tests or test helpers. */
|
package/lib/server/pathPolicy.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isExternalNode = isExternalNode;
|
|
4
|
+
exports.isDeclarationFile = isDeclarationFile;
|
|
4
5
|
exports.isSupportPath = isSupportPath;
|
|
5
6
|
exports.isTestPath = isTestPath;
|
|
6
7
|
exports.isPublicApiNoisePath = isPublicApiNoisePath;
|
|
@@ -10,6 +11,14 @@ function isExternalNode(node) {
|
|
|
10
11
|
node.file.startsWith("bundled://") ||
|
|
11
12
|
/(^|\/)node_modules\//.test(node.file));
|
|
12
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* True for a `.d.ts` declaration file. Every declaration such a file holds is
|
|
16
|
+
* ambient by construction, so none of them carries a body the graph can walk
|
|
17
|
+
* into, whether or not the `declare` keyword is written out.
|
|
18
|
+
*/
|
|
19
|
+
function isDeclarationFile(file) {
|
|
20
|
+
return /\.d\.[cm]?ts$/.test(file);
|
|
21
|
+
}
|
|
13
22
|
/** True for tests, examples, fixtures, generated output, and build artifacts. */
|
|
14
23
|
function isSupportPath(file) {
|
|
15
24
|
return (file === "" ||
|
|
@@ -18,7 +27,7 @@ function isSupportPath(file) {
|
|
|
18
27
|
/(^|\/)(test|tests|__tests__|spec|sample|samples|fixture|fixtures|__fixtures__|example|examples)\//.test(file) ||
|
|
19
28
|
/\.(test|spec)\.[cm]?tsx?$/.test(file) ||
|
|
20
29
|
/(^|\/)typings\.[cm]?ts$/.test(file) ||
|
|
21
|
-
|
|
30
|
+
isDeclarationFile(file) ||
|
|
22
31
|
/(^|\/)(dist|build|coverage|generated|__generated__)\//.test(file));
|
|
23
32
|
}
|
|
24
33
|
/** True for source files whose declarations are tests or test helpers. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathPolicy.js","sourceRoot":"","sources":["../../src/server/pathPolicy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pathPolicy.js","sourceRoot":"","sources":["../../src/server/pathPolicy.ts"],"names":[],"mappings":";;;;;;;AAEA,2EAA2E;AAC3E,wBAA+B,IAAoB;IACjD,OAAO,CACL,IAAI,CAAC,QAAQ;QACb,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;QAClC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CACvC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,2BAAkC,IAAY;IAC5C,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,iFAAiF;AACjF,uBAA8B,IAAY;IACxC,OAAO,CACL,IAAI,KAAK,EAAE;QACX,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;QAC7B,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC;QACjC,mGAAmG,CAAC,IAAI,CACtG,IAAI,CACL;QACD,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC;QACtC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC;QACpC,iBAAiB,CAAC,IAAI,CAAC;QACvB,uDAAuD,CAAC,IAAI,CAAC,IAAI,CAAC,CACnE,CAAC;AACJ,CAAC;AAED,0EAA0E;AAC1E,oBAA2B,IAAY;IACrC,OAAO,CACL,qCAAqC,CAAC,IAAI,CAAC,IAAI,CAAC;QAChD,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CACvC,CAAC;AACJ,CAAC;AAED,yEAAyE;AACzE,8BAAqC,IAAY;IAC/C,OAAO,CACL,aAAa,CAAC,IAAI,CAAC;QACnB,4BAA4B,CAAC,IAAI,CAAC,IAAI,CAAC;QACvC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveGraphHandle = resolveGraphHandle;
|
|
4
|
+
const TtscGraphNodeId_1 = require("../model/TtscGraphNodeId");
|
|
4
5
|
const exportSurface_1 = require("./exportSurface");
|
|
5
6
|
const pathPolicy_1 = require("./pathPolicy");
|
|
6
7
|
/**
|
|
@@ -33,15 +34,15 @@ function resolveGraphHandle(graph, handle, candidateLimit = 12) {
|
|
|
33
34
|
const byId = graph.node(handle);
|
|
34
35
|
if (byId !== undefined)
|
|
35
36
|
return { node: byId };
|
|
36
|
-
const byName = resolveGraphName(graph, handle
|
|
37
|
+
const byName = resolveGraphName(graph, handle);
|
|
37
38
|
if (byName.node !== undefined || byName.candidates !== undefined)
|
|
38
39
|
return rank(graph, byName, candidateLimit);
|
|
39
|
-
const byFile = resolveFileQualified(graph, handle
|
|
40
|
+
const byFile = resolveFileQualified(graph, handle);
|
|
40
41
|
if (byFile.node !== undefined || byFile.candidates !== undefined)
|
|
41
42
|
return rank(graph, byFile, candidateLimit);
|
|
42
43
|
const symbol = symbolPartOf(handle) ?? memberPartOf(handle);
|
|
43
44
|
if (symbol !== undefined)
|
|
44
|
-
return rank(graph, resolveGraphName(graph, symbol
|
|
45
|
+
return rank(graph, resolveGraphName(graph, symbol), candidateLimit);
|
|
45
46
|
return {};
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
@@ -61,27 +62,21 @@ function memberPartOf(handle) {
|
|
|
61
62
|
}
|
|
62
63
|
/** The symbol an id-shaped handle names: `dir/file.ts#Class.method:kind`. */
|
|
63
64
|
function symbolPartOf(handle) {
|
|
64
|
-
|
|
65
|
-
if (hash < 0)
|
|
66
|
-
return undefined;
|
|
67
|
-
const symbol = handle.slice(hash + 1);
|
|
68
|
-
const kind = symbol.lastIndexOf(":");
|
|
69
|
-
const name = kind < 0 ? symbol : symbol.slice(0, kind);
|
|
70
|
-
return name.length > 0 ? name : undefined;
|
|
65
|
+
return (0, TtscGraphNodeId_1.parseTtscGraphNodeId)(handle)?.name;
|
|
71
66
|
}
|
|
72
|
-
function resolveGraphName(graph, name
|
|
67
|
+
function resolveGraphName(graph, name) {
|
|
73
68
|
const exact = graph.symbols(name);
|
|
74
69
|
if (exact.length === 1)
|
|
75
70
|
return { node: exact[0] };
|
|
76
71
|
if (exact.length > 1)
|
|
77
|
-
return { candidates: exact
|
|
72
|
+
return { candidates: [...exact] };
|
|
78
73
|
if (name.includes(".")) {
|
|
79
74
|
const suffix = `.${name}`;
|
|
80
75
|
const suffixMatches = graph.nodes.filter((node) => node.kind !== "file" && node.qualifiedName?.endsWith(suffix) === true);
|
|
81
76
|
if (suffixMatches.length === 1)
|
|
82
77
|
return { node: suffixMatches[0] };
|
|
83
78
|
if (suffixMatches.length > 1) {
|
|
84
|
-
return { candidates: suffixMatches
|
|
79
|
+
return { candidates: suffixMatches };
|
|
85
80
|
}
|
|
86
81
|
}
|
|
87
82
|
return {};
|
|
@@ -92,7 +87,7 @@ function resolveGraphName(graph, name, candidateLimit) {
|
|
|
92
87
|
* disambiguates a common name from what the graph just showed it, and it names
|
|
93
88
|
* exactly one node whenever that file declares the symbol.
|
|
94
89
|
*/
|
|
95
|
-
function resolveFileQualified(graph, handle
|
|
90
|
+
function resolveFileQualified(graph, handle) {
|
|
96
91
|
const dot = handle.indexOf(".");
|
|
97
92
|
if (dot <= 0)
|
|
98
93
|
return {};
|
|
@@ -106,7 +101,7 @@ function resolveFileQualified(graph, handle, candidateLimit) {
|
|
|
106
101
|
if (matches.length === 1)
|
|
107
102
|
return { node: matches[0] };
|
|
108
103
|
if (matches.length > 1)
|
|
109
|
-
return { candidates: matches
|
|
104
|
+
return { candidates: matches };
|
|
110
105
|
return {};
|
|
111
106
|
}
|
|
112
107
|
/** `packages/core/src/renderer.ts` -> `renderer`. */
|
|
@@ -125,11 +120,20 @@ function fileStem(file) {
|
|
|
125
120
|
function rank(graph, resolved, candidateLimit) {
|
|
126
121
|
if (resolved.candidates === undefined)
|
|
127
122
|
return resolved;
|
|
128
|
-
const ranked =
|
|
129
|
-
.
|
|
130
|
-
.
|
|
123
|
+
const ranked = resolved.candidates
|
|
124
|
+
.map((node) => ({ node, score: candidateScore(graph, node) }))
|
|
125
|
+
.sort((a, b) => {
|
|
126
|
+
const score = b.score - a.score;
|
|
127
|
+
return score !== 0 ? score : compareIdentity(a.node.id, b.node.id);
|
|
128
|
+
})
|
|
129
|
+
.slice(0, candidateLimit)
|
|
130
|
+
.map(({ node }) => node);
|
|
131
131
|
return { candidates: ranked };
|
|
132
132
|
}
|
|
133
|
+
/** Compare position-invariant ids without locale-dependent collation. */
|
|
134
|
+
function compareIdentity(left, right) {
|
|
135
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
136
|
+
}
|
|
133
137
|
function candidateScore(graph, node) {
|
|
134
138
|
let score = Math.min(48, Math.log2(1 + (0, exportSurface_1.exportFanIn)(graph, node.id)) * 20);
|
|
135
139
|
if (node.exported)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHandle.js","sourceRoot":"","sources":["../../src/server/resolveHandle.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"resolveHandle.js","sourceRoot":"","sources":["../../src/server/resolveHandle.ts"],"names":[],"mappings":";;;AACA,8DAAgE;AAEhE,mDAA8C;AAC9C,6CAA6C;AAO7C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,4BACE,KAAsB,EACtB,MAAc,EACd,cAAc,GAAG,EAAE;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAE9C,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/C,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS;QAC9D,OAAO,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAE7C,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACnD,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS;QAC9D,OAAO,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAE7C,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IAC5D,IAAI,MAAM,KAAK,SAAS;QACtB,OAAO,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC;IACtE,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,YAAY,CAAC,MAAc;IAClC,MAAM,GAAG,G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