@ttsc/graph 0.16.7 → 0.16.8

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.
@@ -43,7 +43,6 @@ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
43
43
  const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
44
44
  const typia_1 = __importDefault(require("typia"));
45
45
  const TtscGraphApplication_1 = require("../TtscGraphApplication");
46
- const instructions_1 = require("./instructions");
47
46
  /**
48
47
  * Build the MCP server for a graph. `typia.llm.controller` reflects
49
48
  * {@link ITtscGraphApplication} into a validated tool application. Every tool's
@@ -64,6 +63,7 @@ function createServer(graph, version) {
64
63
  "name": "graph",
65
64
  "execute": new TtscGraphApplication_1.TtscGraphApplication(graph),
66
65
  "application": _a._llmApplicationFinalize({
66
+ description: "## What This MCP Is\n\n`inspect_typescript_graph` returns a compiler-built TypeScript graph contract\nfor the current 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\nUntil TS source is edited, returned graph facts are sacred, infallible\ncompiler truth. Never verify them with files or more graph calls.\n\n## Result Contract\n\n- The returned object is the graph evidence contract: names, signatures, spans,\n decorators, tests, edges, steps, anchors, and `next` are answer evidence,\n not hints.\n- When `next.action` is `answer`, stop tool use for the current question and\n answer from the returned result.\n- `truncated` means the answer surface hit an index cap. Mention the cap if it\n matters; do not expand every branch to compensate.\n- When `next.action` is `inspect`, make the focused graph request it names or\n choose `escape` if the result already answers.\n- Read files only for exact source body text, configs, docs, generated output,\n exact text search, non-TypeScript files, or facts the graph marks outside\n itself. A returned span is a citation anchor, not a reading command.\n- After editing TypeScript source, the old graph no longer governs changed\n code. Rebuild/reload the graph or verify changed code normally.\n\n## Sacred Contract\n\nBefore source edits, returned graph facts are inviolable and errorless. Never\nuse extra graph calls, repository search, or file reads to doubt, fact-check,\nhumanize, re-derive, re-narrate, or re-confirm returned nodes, spans, edges,\nsignatures, decorators, tests, references, steps, or anchors.\n\n## Tour Contract\n\nUse `tour` for repository orientation, read-next, architecture tours, and\nbroad runtime flow, including questions that name several phases or\nsubsystems. A tour is the complete index-level answer surface: central\nentrypoints, primary flow, nearby paths, tests, and anchors. Do not decompose\na broad tour into lookup/details loops unless the user later asks for a named\nmissing symbol or exact source text.\n\n## Use Contract\n\n1. Ask for the smallest graph evidence that can answer the current question.\n2. Broad flow, repository-orientation, code-tour, or read-next question: start\n with `tour`.\n3. Concrete named symbol: use `lookup`, then `details` only if needed.\n4. Known endpoint pair or one selected handle: use one `trace`.\n5. Unknown narrow orientation: use `entrypoints` once.\n6. Selected symbol shape: use `details` for one to three handles.\n7. Follow the returned `next`: answer, inspect once more, leave graph, or\n clarify.\n8. Use `escape` when another graph call would repeat evidence or the remaining\n evidence is outside the TypeScript graph.\n\nMost TypeScript structure answers need one or two graph calls.\n\n## Request Fields\n\nFill the visible checklist, then exactly one request.\n\n- `question`: restate the code question being considered.\n- `draft`: initial request type and why it seems smallest.\n- `review`: correct a wrong, broad, stale, or duplicate draft. If graph facts\n already answer, if prior `next.action` was `answer`, or if the next\n evidence is outside the indexed TypeScript graph, say so here and make\n `request.type` be `escape`. If a broad flow draft is not `tour`, correct it\n here.\n- `request`: final request after review.\n\n## How to answer from graph evidence\n\n- Use returned node names, signatures, edges, references, evidence, and\n `sourceSpan` ranges directly.\n- Explain the central path first, then mention important branches.\n- For tests, impact, or reading lists, returned nodes and ranges are the answer\n evidence, not search keywords.\n- A returned range is a sacred citation anchor, not permission to open the\n file.",
67
67
  functions: [
68
68
  {
69
69
  description: "Inspect the TypeScript compiler graph contract.\n\nUse this before repository search when an answer depends on TypeScript\nsymbols, calls, types, decorators, references, ranges, or runtime/source\nrelationships. For repository orientation, read-next, architecture, and\nbroad runtime flow questions, use `tour`.\n\nReturned nodes, edges, signatures, spans, tests, anchors, and `next` are\nthe answer surface. If `next.action` is `answer`, stop tool use and answer\nfrom that result. Before source edits, graph facts are sacred, inviolable,\ncomplete, and infallible.",
@@ -114,6 +114,7 @@ function createServer(graph, version) {
114
114
  "result"
115
115
  ],
116
116
  additionalProperties: false,
117
+ description: "The selected request's output. `result.type` mirrors `request.type`.",
117
118
  $defs: {
118
119
  ITtscGraphDecorator: {
119
120
  type: "object",
@@ -134,7 +135,8 @@ function createServer(graph, version) {
134
135
  "name",
135
136
  "arguments"
136
137
  ],
137
- additionalProperties: false
138
+ additionalProperties: false,
139
+ description: "A decorator as written on a declaration, carried on the decorated\n's `decorators`.\n\nThe graph reports the decorator faithfully rather than interpreting any\nframework's convention: the `name` is the decorator as written (`Controller`,\n`Get`, `TypedRoute.Get`, ...), and statically resolvable literal arguments\nare preserved so a consumer can apply its own meaning without re-parsing\nsource."
138
140
  },
139
141
  "ITtscGraphDecorator.IArgument": {
140
142
  type: "object",
@@ -155,7 +157,8 @@ function createServer(graph, version) {
155
157
  }
156
158
  },
157
159
  required: [],
158
- additionalProperties: false
160
+ additionalProperties: false,
161
+ 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."
159
162
  },
160
163
  ITtscGraphDetails: {
161
164
  type: "object",
@@ -197,7 +200,8 @@ function createServer(graph, version) {
197
200
  "guide",
198
201
  "unknown"
199
202
  ],
200
- additionalProperties: false
203
+ additionalProperties: false,
204
+ description: "The source-free facts for a few selected handles.\n\nThis is not a file reader. It returns signatures, member outlines, direct\ncalls, direct types, implementation candidates, dependency summaries, and\nsourceSpan citation anchors."
201
205
  },
202
206
  "ITtscGraphDetails.IMember": {
203
207
  type: "object",
@@ -230,7 +234,8 @@ function createServer(graph, version) {
230
234
  "name",
231
235
  "kind"
232
236
  ],
233
- additionalProperties: false
237
+ additionalProperties: false,
238
+ description: "One member of a container node, with its signature but not its body."
234
239
  },
235
240
  "ITtscGraphDetails.INode": {
236
241
  type: "object",
@@ -330,7 +335,8 @@ function createServer(graph, version) {
330
335
  "kind",
331
336
  "file"
332
337
  ],
333
- additionalProperties: false
338
+ additionalProperties: false,
339
+ description: "One inspected node: its declared shape and graph coordinates."
334
340
  },
335
341
  "ITtscGraphDetails.IReference": {
336
342
  type: "object",
@@ -378,7 +384,8 @@ function createServer(graph, version) {
378
384
  "file",
379
385
  "relation"
380
386
  ],
381
- additionalProperties: false
387
+ additionalProperties: false,
388
+ description: "A dependency neighbor of an inspected node and the edge that links them."
382
389
  },
383
390
  ITtscGraphEntrypoints: {
384
391
  type: "object",
@@ -437,7 +444,8 @@ function createServer(graph, version) {
437
444
  "next",
438
445
  "guide"
439
446
  ],
440
- additionalProperties: false
447
+ additionalProperties: false,
448
+ description: "The first compact source-free handle list for a TypeScript code question."
441
449
  },
442
450
  "ITtscGraphEntrypoints.IHit": {
443
451
  type: "object",
@@ -485,7 +493,8 @@ function createServer(graph, version) {
485
493
  "file",
486
494
  "score"
487
495
  ],
488
- additionalProperties: false
496
+ additionalProperties: false,
497
+ description: "One ranked search hit."
489
498
  },
490
499
  "ITtscGraphEntrypoints.IMention": {
491
500
  type: "object",
@@ -509,7 +518,8 @@ function createServer(graph, version) {
509
518
  required: [
510
519
  "handle"
511
520
  ],
512
- additionalProperties: false
521
+ additionalProperties: false,
522
+ description: "A code handle written in the query, with its resolution status."
513
523
  },
514
524
  "ITtscGraphEntrypoints.INeighborhood": {
515
525
  type: "object",
@@ -568,7 +578,8 @@ function createServer(graph, version) {
568
578
  "dependsOn",
569
579
  "dependedOnBy"
570
580
  ],
571
- additionalProperties: false
581
+ additionalProperties: false,
582
+ description: "Direct dependency context around one indexed symbol."
572
583
  },
573
584
  "ITtscGraphEntrypoints.INode": {
574
585
  type: "object",
@@ -611,7 +622,8 @@ function createServer(graph, version) {
611
622
  "kind",
612
623
  "file"
613
624
  ],
614
- additionalProperties: false
625
+ additionalProperties: false,
626
+ description: "A compact symbol coordinate, optionally with its declaration signature."
615
627
  },
616
628
  "ITtscGraphEntrypoints.IReference": {
617
629
  type: "object",
@@ -652,7 +664,8 @@ function createServer(graph, version) {
652
664
  "file",
653
665
  "relation"
654
666
  ],
655
- additionalProperties: false
667
+ additionalProperties: false,
668
+ description: "One neighboring symbol and the relationship leading to it."
656
669
  },
657
670
  ITtscGraphEscape: {
658
671
  type: "object",
@@ -695,7 +708,8 @@ function createServer(graph, version) {
695
708
  "next",
696
709
  "guide"
697
710
  ],
698
- additionalProperties: false
711
+ additionalProperties: false,
712
+ description: "The no-op result for when graph is not the useful next evidence source."
699
713
  },
700
714
  ITtscGraphEvidence: {
701
715
  type: "object",
@@ -725,7 +739,8 @@ function createServer(graph, version) {
725
739
  "file",
726
740
  "startLine"
727
741
  ],
728
- additionalProperties: false
742
+ additionalProperties: false,
743
+ description: "A source location that grounds a node or edge in real code: the declaration\nspan for a node, or the expression range that produced an edge.\n\nEvidence is display and grounding only; it is never identity. A node's id is\nposition-invariant (see ), so an edit that shifts a span\ndoes not re-key anything. `startLine`/`startCol` are 1-based. MCP output\nkeeps evidence as coordinates; consumers can read the file themselves when\nthey truly need source text."
729
744
  },
730
745
  ITtscGraphLookup: {
731
746
  type: "object",
@@ -759,7 +774,8 @@ function createServer(graph, version) {
759
774
  "next",
760
775
  "guide"
761
776
  ],
762
- additionalProperties: false
777
+ additionalProperties: false,
778
+ description: "Targeted symbol lookup when a concrete name or handle is being resolved."
763
779
  },
764
780
  "ITtscGraphLookup.IHit": {
765
781
  type: "object",
@@ -807,7 +823,8 @@ function createServer(graph, version) {
807
823
  "file",
808
824
  "score"
809
825
  ],
810
- additionalProperties: false
826
+ additionalProperties: false,
827
+ description: "One ranked hit with a handle to follow via `details` or `trace`."
811
828
  },
812
829
  ITtscGraphNext: {
813
830
  type: "object",
@@ -843,7 +860,8 @@ function createServer(graph, version) {
843
860
  "action",
844
861
  "reason"
845
862
  ],
846
- additionalProperties: false
863
+ additionalProperties: false,
864
+ description: "The required next step from a compiler-derived graph result."
847
865
  },
848
866
  ITtscGraphOverview: {
849
867
  type: "object",
@@ -900,7 +918,8 @@ function createServer(graph, version) {
900
918
  "next",
901
919
  "guide"
902
920
  ],
903
- additionalProperties: false
921
+ additionalProperties: false,
922
+ description: "A compact, source-read-free project map for broad orientation only."
904
923
  },
905
924
  "ITtscGraphOverview.ICounts": {
906
925
  type: "object",
@@ -928,7 +947,8 @@ function createServer(graph, version) {
928
947
  "edges",
929
948
  "byKind"
930
949
  ],
931
- additionalProperties: false
950
+ additionalProperties: false,
951
+ description: "Size of the graph by node/edge totals and per-kind node counts."
932
952
  },
933
953
  "ITtscGraphOverview.IHotspot": {
934
954
  type: "object",
@@ -970,7 +990,8 @@ function createServer(graph, version) {
970
990
  "fanIn",
971
991
  "fanOut"
972
992
  ],
973
- additionalProperties: false
993
+ additionalProperties: false,
994
+ description: "A high-dependency symbol with its non-structural fan-in and fan-out."
974
995
  },
975
996
  "ITtscGraphOverview.ILayer": {
976
997
  type: "object",
@@ -993,7 +1014,8 @@ function createServer(graph, version) {
993
1014
  "files",
994
1015
  "exported"
995
1016
  ],
996
- additionalProperties: false
1017
+ additionalProperties: false,
1018
+ description: "One folder layer: its source files and export surface."
997
1019
  },
998
1020
  "ITtscGraphOverview.INode": {
999
1021
  type: "object",
@@ -1025,7 +1047,8 @@ function createServer(graph, version) {
1025
1047
  "kind",
1026
1048
  "file"
1027
1049
  ],
1028
- additionalProperties: false
1050
+ additionalProperties: false,
1051
+ description: "A compact symbol coordinate that can be passed to deeper graph tools."
1029
1052
  },
1030
1053
  ITtscGraphTour: {
1031
1054
  type: "object",
@@ -1100,7 +1123,8 @@ function createServer(graph, version) {
1100
1123
  "next",
1101
1124
  "guide"
1102
1125
  ],
1103
- additionalProperties: false
1126
+ additionalProperties: false,
1127
+ description: "Answer-ready, source-free tour evidence for broad code-flow questions."
1104
1128
  },
1105
1129
  "ITtscGraphTour.IAnchor": {
1106
1130
  type: "object",
@@ -1140,7 +1164,8 @@ function createServer(graph, version) {
1140
1164
  "file",
1141
1165
  "startLine"
1142
1166
  ],
1143
- additionalProperties: false
1167
+ additionalProperties: false,
1168
+ description: "A file/line citation chosen by the graph, not source body text."
1144
1169
  },
1145
1170
  "ITtscGraphTour.IFlow": {
1146
1171
  type: "object",
@@ -1181,7 +1206,8 @@ function createServer(graph, version) {
1181
1206
  "reached",
1182
1207
  "anchors"
1183
1208
  ],
1184
- additionalProperties: false
1209
+ additionalProperties: false,
1210
+ description: "A primary flow slice from one selected entrypoint."
1185
1211
  },
1186
1212
  "ITtscGraphTour.INode": {
1187
1213
  type: "object",
@@ -1228,7 +1254,8 @@ function createServer(graph, version) {
1228
1254
  "kind",
1229
1255
  "file"
1230
1256
  ],
1231
- additionalProperties: false
1257
+ additionalProperties: false,
1258
+ description: "A compact symbol coordinate for a tour."
1232
1259
  },
1233
1260
  "ITtscGraphTour.ISpan": {
1234
1261
  type: "object",
@@ -1250,7 +1277,8 @@ function createServer(graph, version) {
1250
1277
  "file",
1251
1278
  "startLine"
1252
1279
  ],
1253
- additionalProperties: false
1280
+ additionalProperties: false,
1281
+ description: "Source coordinates without source text."
1254
1282
  },
1255
1283
  ITtscGraphTrace: {
1256
1284
  type: "object",
@@ -1331,7 +1359,8 @@ function createServer(graph, version) {
1331
1359
  "next",
1332
1360
  "guide"
1333
1361
  ],
1334
- additionalProperties: false
1362
+ additionalProperties: false,
1363
+ description: "The compact dependency or caller flow returned from a selected start symbol."
1335
1364
  },
1336
1365
  "ITtscGraphTrace.IHop": {
1337
1366
  type: "object",
@@ -1370,7 +1399,8 @@ function createServer(graph, version) {
1370
1399
  "kind",
1371
1400
  "depth"
1372
1401
  ],
1373
- additionalProperties: false
1402
+ additionalProperties: false,
1403
+ description: "One traversed edge, with its depth from the start."
1374
1404
  },
1375
1405
  "ITtscGraphTrace.INode": {
1376
1406
  type: "object",
@@ -1421,7 +1451,8 @@ function createServer(graph, version) {
1421
1451
  "kind",
1422
1452
  "file"
1423
1453
  ],
1424
- additionalProperties: false
1454
+ additionalProperties: false,
1455
+ description: "A node on the trace: the start, a reached node, or a candidate."
1425
1456
  },
1426
1457
  PickITtscGraphEvidenceendLinefilestartLine: {
1427
1458
  type: "object",
@@ -1459,8 +1490,8 @@ function createServer(graph, version) {
1459
1490
  type: "object",
1460
1491
  properties: {
1461
1492
  draft: {
1462
- type: "string",
1463
- description: "Initial request plan before final arguments are filled.\n\nName the intended request type and why it seems smallest. Broad flow,\narchitecture, repository-orientation, and read-next questions should\nnormally draft `tour`; narrow named symbols can draft `lookup`, `trace`,\nor `details`."
1493
+ $ref: "#/$defs/ITtscGraphApplication.IDraft",
1494
+ description: "Initial request plan before final arguments are filled.\n\nName the intended request type in `type` and why it seems smallest in\n`reason`. Broad flow, architecture, repository-orientation, and read-next\nquestions should normally draft `tour`; narrow named symbols can draft\n`lookup`, `trace`, or `details`."
1464
1495
  },
1465
1496
  question: {
1466
1497
  type: "string",
@@ -1516,7 +1547,36 @@ function createServer(graph, version) {
1516
1547
  "request"
1517
1548
  ],
1518
1549
  additionalProperties: false,
1550
+ description: "Draft, review, then submit exactly one graph request or escape.",
1519
1551
  $defs: {
1552
+ "ITtscGraphApplication.IDraft": {
1553
+ type: "object",
1554
+ properties: {
1555
+ type: {
1556
+ type: "string",
1557
+ "enum": [
1558
+ "details",
1559
+ "entrypoints",
1560
+ "escape",
1561
+ "lookup",
1562
+ "overview",
1563
+ "tour",
1564
+ "trace"
1565
+ ],
1566
+ description: "The request type being considered, corrected later in `review`."
1567
+ },
1568
+ reason: {
1569
+ type: "string",
1570
+ description: "Why this request type looks like the smallest useful next step."
1571
+ }
1572
+ },
1573
+ required: [
1574
+ "reason",
1575
+ "type"
1576
+ ],
1577
+ additionalProperties: false,
1578
+ description: "First-pass request plan, filled before the final `request` arguments.\n\n`reason` comes before `type` so the justification is written before the\nchoice it justifies."
1579
+ },
1520
1580
  "ITtscGraphDetails.IRequest": {
1521
1581
  type: "object",
1522
1582
  properties: {
@@ -1559,7 +1619,8 @@ function createServer(graph, version) {
1559
1619
  "type",
1560
1620
  "handles"
1561
1621
  ],
1562
- additionalProperties: false
1622
+ additionalProperties: false,
1623
+ description: "Which selected handles to inspect, and how much of each to return."
1563
1624
  },
1564
1625
  "ITtscGraphEntrypoints.IRequest": {
1565
1626
  type: "object",
@@ -1588,7 +1649,8 @@ function createServer(graph, version) {
1588
1649
  "type",
1589
1650
  "query"
1590
1651
  ],
1591
- additionalProperties: false
1652
+ additionalProperties: false,
1653
+ description: "Ask for first handles when the question is narrow but the symbol is not yet\nknown. For broad tours, read-next, architecture, or multi-phase runtime\nflow, use `tour` instead of decomposing the answer into entrypoints and\nfollow-up calls."
1592
1654
  },
1593
1655
  "ITtscGraphEscape.IRequest": {
1594
1656
  type: "object",
@@ -1613,7 +1675,8 @@ function createServer(graph, version) {
1613
1675
  "type",
1614
1676
  "reason"
1615
1677
  ],
1616
- additionalProperties: false
1678
+ additionalProperties: false,
1679
+ description: "Skip graph work when graph evidence is unnecessary or exhausted."
1617
1680
  },
1618
1681
  "ITtscGraphLookup.IRequest": {
1619
1682
  type: "object",
@@ -1642,7 +1705,8 @@ function createServer(graph, version) {
1642
1705
  "type",
1643
1706
  "query"
1644
1707
  ],
1645
- additionalProperties: false
1708
+ additionalProperties: false,
1709
+ description: "Find a concrete class, method, function, property, type, or dotted handle."
1646
1710
  },
1647
1711
  "ITtscGraphOverview.IRequest": {
1648
1712
  type: "object",
@@ -1668,7 +1732,8 @@ function createServer(graph, version) {
1668
1732
  required: [
1669
1733
  "type"
1670
1734
  ],
1671
- additionalProperties: false
1735
+ additionalProperties: false,
1736
+ description: "Which broad architecture facets `overview` should return."
1672
1737
  },
1673
1738
  "ITtscGraphTour.IRequest": {
1674
1739
  type: "object",
@@ -1697,7 +1762,8 @@ function createServer(graph, version) {
1697
1762
  "type",
1698
1763
  "query"
1699
1764
  ],
1700
- additionalProperties: false
1765
+ additionalProperties: false,
1766
+ description: "Build the complete index-level answer surface for broad code tours: central\nentrypoints, primary flow, nearby paths, tests, and answer anchors. Use\nthis instead of decomposing repository-orientation, read-next,\narchitecture, or multi-phase runtime-flow questions into many\nlookup/details/trace calls."
1701
1767
  },
1702
1768
  "ITtscGraphTrace.IRequest": {
1703
1769
  type: "object",
@@ -1752,34 +1818,62 @@ function createServer(graph, version) {
1752
1818
  "type",
1753
1819
  "from"
1754
1820
  ],
1755
- additionalProperties: false
1821
+ additionalProperties: false,
1822
+ description: "Where and how far to trace dependency flow."
1756
1823
  }
1757
1824
  }
1758
1825
  },
1759
1826
  validate: (() => {
1760
- const _io0 = input => "string" === typeof input.question && "string" === typeof input.draft && "string" === typeof input.review && ("object" === typeof input.request && null !== input.request && _iu0(input.request));
1761
- const _io1 = input => "details" === input.type && (Array.isArray(input.handles) && input.handles.every(elem => "string" === typeof elem)) && (undefined === input.neighbors || "boolean" === typeof input.neighbors) && (undefined === input.neighborLimit || "number" === typeof input.neighborLimit) && (undefined === input.memberLimit || "number" === typeof input.memberLimit) && (undefined === input.dependencyLimit || "number" === typeof input.dependencyLimit) && (undefined === input.includeExternal || "boolean" === typeof input.includeExternal);
1762
- const _io2 = input => "entrypoints" === input.type && "string" === typeof input.query && (undefined === input.limit || "number" === typeof input.limit) && (undefined === input.neighbors || "number" === typeof input.neighbors);
1763
- const _io3 = input => "lookup" === input.type && "string" === typeof input.query && (undefined === input.limit || "number" === typeof input.limit) && (undefined === input.includeExternal || "boolean" === typeof input.includeExternal);
1764
- const _io4 = input => "overview" === input.type && (undefined === input.aspect || "all" === input.aspect || "hotspots" === input.aspect || "layers" === input.aspect || "publicApi" === input.aspect);
1765
- const _io5 = input => "tour" === input.type && "string" === typeof input.query && (undefined === input.limit || "number" === typeof input.limit) && (undefined === input.includeTests || "boolean" === typeof input.includeTests);
1766
- const _io6 = input => "trace" === input.type && "string" === typeof input.from && (undefined === input.to || "string" === typeof input.to) && (undefined === input.direction || "forward" === input.direction || "impact" === input.direction || "reverse" === input.direction) && (undefined === input.focus || "all" === input.focus || "execution" === input.focus || "types" === input.focus) && (undefined === input.maxDepth || "number" === typeof input.maxDepth) && (undefined === input.maxNodes || "number" === typeof input.maxNodes) && (undefined === input.includeExternal || "boolean" === typeof input.includeExternal);
1767
- const _io7 = input => "escape" === input.type && "string" === typeof input.reason && (undefined === input.nextStep || "string" === typeof input.nextStep);
1827
+ const _ip0 = input => "string" === typeof input["reason"];
1828
+ const _ip1 = input => undefined === input["includeExternal"] || "boolean" === typeof input["includeExternal"];
1829
+ const _ip2 = input => "string" === typeof input["query"];
1830
+ const _ip3 = input => undefined === input["limit"] || "number" === typeof input["limit"];
1831
+ const _ve0 = "(ITtscGraphDetails.IRequest | ITtscGraphEntrypoints.IRequest | ITtscGraphEscape.IRequest | ITtscGraphLookup.IRequest | ITtscGraphOverview.IRequest | ITtscGraphTour.IRequest | ITtscGraphTrace.IRequest)";
1832
+ const _vp0 = (input, _path, _exceptionable = true) => "string" === typeof input["reason"] || _report(_exceptionable, {
1833
+ path: _path + ".reason",
1834
+ expected: "string",
1835
+ value: input["reason"]
1836
+ });
1837
+ const _vp1 = (input, _path, _exceptionable = true) => undefined === input["includeExternal"] || "boolean" === typeof input["includeExternal"] || _report(_exceptionable, {
1838
+ path: _path + ".includeExternal",
1839
+ expected: "(boolean | undefined)",
1840
+ value: input["includeExternal"]
1841
+ });
1842
+ const _vp2 = (input, _path, _exceptionable = true) => "string" === typeof input["query"] || _report(_exceptionable, {
1843
+ path: _path + ".query",
1844
+ expected: "string",
1845
+ value: input["query"]
1846
+ });
1847
+ const _vp3 = (input, _path, _exceptionable = true) => undefined === input["limit"] || "number" === typeof input["limit"] || _report(_exceptionable, {
1848
+ path: _path + ".limit",
1849
+ expected: "(number | undefined)",
1850
+ value: input["limit"]
1851
+ });
1852
+ const _ve1 = "(ITtscGraphDetails.IRequest | ITtscGraphEntrypoints.IRequest | ITtscGraphLookup.IRequest | ITtscGraphOverview.IRequest | ITtscGraphTour.IRequest | ITtscGraphTrace.IRequest | ITtscGraphEscape.IRequest)";
1853
+ const _io0 = input => "string" === typeof input.question && ("object" === typeof input.draft && null !== input.draft && _io1(input.draft)) && "string" === typeof input.review && ("object" === typeof input.request && null !== input.request && _iu0(input.request));
1854
+ const _io1 = input => _ip0(input) && ("details" === input.type || "entrypoints" === input.type || "escape" === input.type || "lookup" === input.type || "overview" === input.type || "tour" === input.type || "trace" === input.type);
1855
+ const _io2 = input => "details" === input.type && (Array.isArray(input.handles) && input.handles.every(elem => "string" === typeof elem)) && (undefined === input.neighbors || "boolean" === typeof input.neighbors) && (undefined === input.neighborLimit || "number" === typeof input.neighborLimit) && (undefined === input.memberLimit || "number" === typeof input.memberLimit) && (undefined === input.dependencyLimit || "number" === typeof input.dependencyLimit) && _ip1(input);
1856
+ const _io3 = input => "entrypoints" === input.type && _ip2(input) && _ip3(input) && (undefined === input.neighbors || "number" === typeof input.neighbors);
1857
+ const _io4 = input => "lookup" === input.type && _ip2(input) && _ip3(input) && _ip1(input);
1858
+ const _io5 = input => "overview" === input.type && (undefined === input.aspect || "all" === input.aspect || "hotspots" === input.aspect || "layers" === input.aspect || "publicApi" === input.aspect);
1859
+ const _io6 = input => "tour" === input.type && _ip2(input) && _ip3(input) && (undefined === input.includeTests || "boolean" === typeof input.includeTests);
1860
+ const _io7 = input => "trace" === input.type && "string" === typeof input.from && (undefined === input.to || "string" === typeof input.to) && (undefined === input.direction || "forward" === input.direction || "impact" === input.direction || "reverse" === input.direction) && (undefined === input.focus || "all" === input.focus || "execution" === input.focus || "types" === input.focus) && (undefined === input.maxDepth || "number" === typeof input.maxDepth) && (undefined === input.maxNodes || "number" === typeof input.maxNodes) && _ip1(input);
1861
+ const _io8 = input => "escape" === input.type && _ip0(input) && (undefined === input.nextStep || "string" === typeof input.nextStep);
1768
1862
  const _iu0 = input => (() => {
1769
1863
  if ("details" === input.type)
1770
- return _io1(input);
1771
- else if ("entrypoints" === input.type)
1772
1864
  return _io2(input);
1773
- else if ("lookup" === input.type)
1865
+ else if ("entrypoints" === input.type)
1774
1866
  return _io3(input);
1775
- else if ("overview" === input.type)
1867
+ else if ("lookup" === input.type)
1776
1868
  return _io4(input);
1777
- else if ("tour" === input.type)
1869
+ else if ("overview" === input.type)
1778
1870
  return _io5(input);
1779
- else if ("trace" === input.type)
1871
+ else if ("tour" === input.type)
1780
1872
  return _io6(input);
1781
- else if ("escape" === input.type)
1873
+ else if ("trace" === input.type)
1782
1874
  return _io7(input);
1875
+ else if ("escape" === input.type)
1876
+ return _io8(input);
1783
1877
  else
1784
1878
  return false;
1785
1879
  })();
@@ -1787,9 +1881,13 @@ function createServer(graph, version) {
1787
1881
  path: _path + ".question",
1788
1882
  expected: "string",
1789
1883
  value: input.question
1790
- }), "string" === typeof input.draft || _report(_exceptionable, {
1884
+ }), ("object" === typeof input.draft && null !== input.draft || _report(_exceptionable, {
1791
1885
  path: _path + ".draft",
1792
- expected: "string",
1886
+ expected: "ITtscGraphApplication.IDraft",
1887
+ value: input.draft
1888
+ })) && _vo1(input.draft, _path + ".draft", true && _exceptionable) || _report(_exceptionable, {
1889
+ path: _path + ".draft",
1890
+ expected: "ITtscGraphApplication.IDraft",
1793
1891
  value: input.draft
1794
1892
  }), "string" === typeof input.review || _report(_exceptionable, {
1795
1893
  path: _path + ".review",
@@ -1797,14 +1895,19 @@ function createServer(graph, version) {
1797
1895
  value: input.review
1798
1896
  }), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
1799
1897
  path: _path + ".request",
1800
- expected: "(ITtscGraphDetails.IRequest | ITtscGraphEntrypoints.IRequest | ITtscGraphEscape.IRequest | ITtscGraphLookup.IRequest | ITtscGraphOverview.IRequest | ITtscGraphTour.IRequest | ITtscGraphTrace.IRequest)",
1898
+ expected: _ve0,
1801
1899
  value: input.request
1802
1900
  })) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
1803
1901
  path: _path + ".request",
1804
- expected: "(ITtscGraphDetails.IRequest | ITtscGraphEntrypoints.IRequest | ITtscGraphEscape.IRequest | ITtscGraphLookup.IRequest | ITtscGraphOverview.IRequest | ITtscGraphTour.IRequest | ITtscGraphTrace.IRequest)",
1902
+ expected: _ve0,
1805
1903
  value: input.request
1806
1904
  })].every(flag => flag);
1807
- const _vo1 = (input, _path, _exceptionable = true) => ["details" === input.type || _report(_exceptionable, {
1905
+ const _vo1 = (input, _path, _exceptionable = true) => [_vp0(input, _path, true && _exceptionable), "details" === input.type || "entrypoints" === input.type || "escape" === input.type || "lookup" === input.type || "overview" === input.type || "tour" === input.type || "trace" === input.type || _report(_exceptionable, {
1906
+ path: _path + ".type",
1907
+ expected: "(\"details\" | \"entrypoints\" | \"escape\" | \"lookup\" | \"overview\" | \"tour\" | \"trace\")",
1908
+ value: input.type
1909
+ })].every(flag => flag);
1910
+ const _vo2 = (input, _path, _exceptionable = true) => ["details" === input.type || _report(_exceptionable, {
1808
1911
  path: _path + ".type",
1809
1912
  expected: "\"details\"",
1810
1913
  value: input.type
@@ -1836,46 +1939,22 @@ function createServer(graph, version) {
1836
1939
  path: _path + ".dependencyLimit",
1837
1940
  expected: "(number | undefined)",
1838
1941
  value: input.dependencyLimit
1839
- }), undefined === input.includeExternal || "boolean" === typeof input.includeExternal || _report(_exceptionable, {
1840
- path: _path + ".includeExternal",
1841
- expected: "(boolean | undefined)",
1842
- value: input.includeExternal
1843
- })].every(flag => flag);
1844
- const _vo2 = (input, _path, _exceptionable = true) => ["entrypoints" === input.type || _report(_exceptionable, {
1942
+ }), _vp1(input, _path, true && _exceptionable)].every(flag => flag);
1943
+ const _vo3 = (input, _path, _exceptionable = true) => ["entrypoints" === input.type || _report(_exceptionable, {
1845
1944
  path: _path + ".type",
1846
1945
  expected: "\"entrypoints\"",
1847
1946
  value: input.type
1848
- }), "string" === typeof input.query || _report(_exceptionable, {
1849
- path: _path + ".query",
1850
- expected: "string",
1851
- value: input.query
1852
- }), undefined === input.limit || "number" === typeof input.limit || _report(_exceptionable, {
1853
- path: _path + ".limit",
1854
- expected: "(number | undefined)",
1855
- value: input.limit
1856
- }), undefined === input.neighbors || "number" === typeof input.neighbors || _report(_exceptionable, {
1947
+ }), _vp2(input, _path, true && _exceptionable), _vp3(input, _path, true && _exceptionable), undefined === input.neighbors || "number" === typeof input.neighbors || _report(_exceptionable, {
1857
1948
  path: _path + ".neighbors",
1858
1949
  expected: "(number | undefined)",
1859
1950
  value: input.neighbors
1860
1951
  })].every(flag => flag);
1861
- const _vo3 = (input, _path, _exceptionable = true) => ["lookup" === input.type || _report(_exceptionable, {
1952
+ const _vo4 = (input, _path, _exceptionable = true) => ["lookup" === input.type || _report(_exceptionable, {
1862
1953
  path: _path + ".type",
1863
1954
  expected: "\"lookup\"",
1864
1955
  value: input.type
1865
- }), "string" === typeof input.query || _report(_exceptionable, {
1866
- path: _path + ".query",
1867
- expected: "string",
1868
- value: input.query
1869
- }), undefined === input.limit || "number" === typeof input.limit || _report(_exceptionable, {
1870
- path: _path + ".limit",
1871
- expected: "(number | undefined)",
1872
- value: input.limit
1873
- }), undefined === input.includeExternal || "boolean" === typeof input.includeExternal || _report(_exceptionable, {
1874
- path: _path + ".includeExternal",
1875
- expected: "(boolean | undefined)",
1876
- value: input.includeExternal
1877
- })].every(flag => flag);
1878
- const _vo4 = (input, _path, _exceptionable = true) => ["overview" === input.type || _report(_exceptionable, {
1956
+ }), _vp2(input, _path, true && _exceptionable), _vp3(input, _path, true && _exceptionable), _vp1(input, _path, true && _exceptionable)].every(flag => flag);
1957
+ const _vo5 = (input, _path, _exceptionable = true) => ["overview" === input.type || _report(_exceptionable, {
1879
1958
  path: _path + ".type",
1880
1959
  expected: "\"overview\"",
1881
1960
  value: input.type
@@ -1884,24 +1963,16 @@ function createServer(graph, version) {
1884
1963
  expected: "(\"all\" | \"hotspots\" | \"layers\" | \"publicApi\" | undefined)",
1885
1964
  value: input.aspect
1886
1965
  })].every(flag => flag);
1887
- const _vo5 = (input, _path, _exceptionable = true) => ["tour" === input.type || _report(_exceptionable, {
1966
+ const _vo6 = (input, _path, _exceptionable = true) => ["tour" === input.type || _report(_exceptionable, {
1888
1967
  path: _path + ".type",
1889
1968
  expected: "\"tour\"",
1890
1969
  value: input.type
1891
- }), "string" === typeof input.query || _report(_exceptionable, {
1892
- path: _path + ".query",
1893
- expected: "string",
1894
- value: input.query
1895
- }), undefined === input.limit || "number" === typeof input.limit || _report(_exceptionable, {
1896
- path: _path + ".limit",
1897
- expected: "(number | undefined)",
1898
- value: input.limit
1899
- }), undefined === input.includeTests || "boolean" === typeof input.includeTests || _report(_exceptionable, {
1970
+ }), _vp2(input, _path, true && _exceptionable), _vp3(input, _path, true && _exceptionable), undefined === input.includeTests || "boolean" === typeof input.includeTests || _report(_exceptionable, {
1900
1971
  path: _path + ".includeTests",
1901
1972
  expected: "(boolean | undefined)",
1902
1973
  value: input.includeTests
1903
1974
  })].every(flag => flag);
1904
- const _vo6 = (input, _path, _exceptionable = true) => ["trace" === input.type || _report(_exceptionable, {
1975
+ const _vo7 = (input, _path, _exceptionable = true) => ["trace" === input.type || _report(_exceptionable, {
1905
1976
  path: _path + ".type",
1906
1977
  expected: "\"trace\"",
1907
1978
  value: input.type
@@ -1929,43 +2000,35 @@ function createServer(graph, version) {
1929
2000
  path: _path + ".maxNodes",
1930
2001
  expected: "(number | undefined)",
1931
2002
  value: input.maxNodes
1932
- }), undefined === input.includeExternal || "boolean" === typeof input.includeExternal || _report(_exceptionable, {
1933
- path: _path + ".includeExternal",
1934
- expected: "(boolean | undefined)",
1935
- value: input.includeExternal
1936
- })].every(flag => flag);
1937
- const _vo7 = (input, _path, _exceptionable = true) => ["escape" === input.type || _report(_exceptionable, {
2003
+ }), _vp1(input, _path, true && _exceptionable)].every(flag => flag);
2004
+ const _vo8 = (input, _path, _exceptionable = true) => ["escape" === input.type || _report(_exceptionable, {
1938
2005
  path: _path + ".type",
1939
2006
  expected: "\"escape\"",
1940
2007
  value: input.type
1941
- }), "string" === typeof input.reason || _report(_exceptionable, {
1942
- path: _path + ".reason",
1943
- expected: "string",
1944
- value: input.reason
1945
- }), undefined === input.nextStep || "string" === typeof input.nextStep || _report(_exceptionable, {
2008
+ }), _vp0(input, _path, true && _exceptionable), undefined === input.nextStep || "string" === typeof input.nextStep || _report(_exceptionable, {
1946
2009
  path: _path + ".nextStep",
1947
2010
  expected: "(string | undefined)",
1948
2011
  value: input.nextStep
1949
2012
  })].every(flag => flag);
1950
2013
  const _vu0 = (input, _path, _exceptionable = true) => (() => {
1951
2014
  if ("details" === input.type)
1952
- return _vo1(input, _path, true && _exceptionable);
1953
- else if ("entrypoints" === input.type)
1954
2015
  return _vo2(input, _path, true && _exceptionable);
1955
- else if ("lookup" === input.type)
2016
+ else if ("entrypoints" === input.type)
1956
2017
  return _vo3(input, _path, true && _exceptionable);
1957
- else if ("overview" === input.type)
2018
+ else if ("lookup" === input.type)
1958
2019
  return _vo4(input, _path, true && _exceptionable);
1959
- else if ("tour" === input.type)
2020
+ else if ("overview" === input.type)
1960
2021
  return _vo5(input, _path, true && _exceptionable);
1961
- else if ("trace" === input.type)
2022
+ else if ("tour" === input.type)
1962
2023
  return _vo6(input, _path, true && _exceptionable);
1963
- else if ("escape" === input.type)
2024
+ else if ("trace" === input.type)
1964
2025
  return _vo7(input, _path, true && _exceptionable);
2026
+ else if ("escape" === input.type)
2027
+ return _vo8(input, _path, true && _exceptionable);
1965
2028
  else
1966
2029
  return _report(_exceptionable, {
1967
2030
  path: _path,
1968
- expected: "(ITtscGraphDetails.IRequest | ITtscGraphEntrypoints.IRequest | ITtscGraphLookup.IRequest | ITtscGraphOverview.IRequest | ITtscGraphTour.IRequest | ITtscGraphTrace.IRequest | ITtscGraphEscape.IRequest)",
2031
+ expected: _ve1,
1969
2032
  value: input
1970
2033
  });
1971
2034
  })();
@@ -2007,7 +2070,13 @@ function createServer(graph, version) {
2007
2070
  };
2008
2071
  const functions = controller.application.functions;
2009
2072
  const execute = controller.execute;
2010
- const server = new mcp_js_1.McpServer({ name: "ttsc-graph", version }, { capabilities: { tools: {} }, instructions: instructions_1.instructions });
2073
+ const server = new mcp_js_1.McpServer({ name: "ttsc-graph", version }, {
2074
+ capabilities: { tools: {} },
2075
+ // The MCP `instructions` are the interface's JSDoc, which
2076
+ // `typia.llm.controller` reflects onto `application.description`. See
2077
+ // {@link ITtscGraphApplication}.
2078
+ instructions: controller.application.description,
2079
+ });
2011
2080
  const raw = server.server;
2012
2081
  raw.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({
2013
2082
  tools: functions.map((func) => ({