@ttsc/graph 0.30.3 → 0.31.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.
Files changed (292) hide show
  1. package/README.md +122 -30
  2. package/lib/CapturedProcessOutput.d.ts +47 -0
  3. package/lib/CapturedProcessOutput.js +3 -0
  4. package/lib/CapturedProcessOutput.js.map +1 -0
  5. package/lib/ILauncherOption.d.ts +22 -0
  6. package/lib/ILauncherOption.js +3 -0
  7. package/lib/ILauncherOption.js.map +1 -0
  8. package/lib/IProjectOptions.d.ts +18 -0
  9. package/lib/IProjectOptions.js +3 -0
  10. package/lib/IProjectOptions.js.map +1 -0
  11. package/lib/ParsedLauncherOptions.d.ts +13 -0
  12. package/lib/ParsedLauncherOptions.js +3 -0
  13. package/lib/ParsedLauncherOptions.js.map +1 -0
  14. package/lib/TtscGraphApplication.d.ts +38 -1
  15. package/lib/TtscGraphApplication.js +26 -1
  16. package/lib/TtscGraphApplication.js.map +1 -1
  17. package/lib/TtscGraphLauncherArguments.d.ts +115 -0
  18. package/lib/TtscGraphLauncherArguments.js +181 -0
  19. package/lib/TtscGraphLauncherArguments.js.map +1 -0
  20. package/lib/TtscGraphViewSnapshot.d.ts +35 -0
  21. package/lib/TtscGraphViewSnapshot.js +48 -0
  22. package/lib/TtscGraphViewSnapshot.js.map +1 -0
  23. package/lib/index.d.ts +9 -24
  24. package/lib/index.js +6 -128
  25. package/lib/index.js.map +1 -1
  26. package/lib/internal/GraphProcessTrace.d.ts +1 -0
  27. package/lib/internal/GraphProcessTrace.js +235 -0
  28. package/lib/internal/GraphProcessTrace.js.map +1 -0
  29. package/lib/launcherArgs.d.ts +75 -16
  30. package/lib/launcherArgs.js +77 -8
  31. package/lib/launcherArgs.js.map +1 -1
  32. package/lib/model/IArtifactDirectory.d.ts +26 -0
  33. package/lib/model/IArtifactDirectory.js +3 -0
  34. package/lib/model/IArtifactDirectory.js.map +1 -0
  35. package/lib/model/IArtifactInputs.d.ts +19 -0
  36. package/lib/model/IArtifactInputs.js +3 -0
  37. package/lib/model/IArtifactInputs.js.map +1 -0
  38. package/lib/model/IPublishedArtifacts.d.ts +76 -0
  39. package/lib/model/IPublishedArtifacts.js +3 -0
  40. package/lib/model/IPublishedArtifacts.js.map +1 -0
  41. package/lib/model/IPublishedArtifactsResident.d.ts +19 -0
  42. package/lib/model/IPublishedArtifactsResident.js +3 -0
  43. package/lib/model/IPublishedArtifactsResident.js.map +1 -0
  44. package/lib/model/ITtscLintDaemonTarget.d.ts +20 -0
  45. package/lib/model/ITtscLintDaemonTarget.js +3 -0
  46. package/lib/model/ITtscLintDaemonTarget.js.map +1 -0
  47. package/lib/model/TtscGraphLinePeer.d.ts +146 -0
  48. package/lib/model/TtscGraphLinePeer.js +213 -0
  49. package/lib/model/TtscGraphLinePeer.js.map +1 -0
  50. package/lib/model/TtscGraphMemory.d.ts +156 -16
  51. package/lib/model/TtscGraphMemory.js +228 -222
  52. package/lib/model/TtscGraphMemory.js.map +1 -1
  53. package/lib/model/TtscGraphNativeArguments.d.ts +40 -0
  54. package/lib/model/TtscGraphNativeArguments.js +64 -0
  55. package/lib/model/TtscGraphNativeArguments.js.map +1 -0
  56. package/lib/model/TtscGraphNodeId.d.ts +55 -3
  57. package/lib/model/TtscGraphNodeId.js +40 -2
  58. package/lib/model/TtscGraphNodeId.js.map +1 -1
  59. package/lib/model/TtscGraphProjection.d.ts +156 -0
  60. package/lib/model/TtscGraphProjection.js +390 -0
  61. package/lib/model/TtscGraphProjection.js.map +1 -0
  62. package/lib/model/TtscGraphProtocol.d.ts +28 -0
  63. package/lib/model/TtscGraphProtocol.js +928 -0
  64. package/lib/model/TtscGraphProtocol.js.map +1 -0
  65. package/lib/model/TtscGraphReadonly.d.ts +15 -0
  66. package/lib/model/TtscGraphReadonly.js +3 -0
  67. package/lib/model/TtscGraphReadonly.js.map +1 -0
  68. package/lib/model/TtscGraphRequestOptions.d.ts +16 -0
  69. package/lib/model/TtscGraphRequestOptions.js +3 -0
  70. package/lib/model/TtscGraphRequestOptions.js.map +1 -0
  71. package/lib/model/TtscGraphSession.d.ts +82 -36
  72. package/lib/model/TtscGraphSession.js +164 -1238
  73. package/lib/model/TtscGraphSession.js.map +1 -1
  74. package/lib/model/TtscGraphSessionOptions.d.ts +20 -0
  75. package/lib/model/TtscGraphSessionOptions.js +3 -0
  76. package/lib/model/TtscGraphSessionOptions.js.map +1 -0
  77. package/lib/model/TtscGraphSessionState.d.ts +187 -0
  78. package/lib/model/TtscGraphSessionState.js +417 -0
  79. package/lib/model/TtscGraphSessionState.js.map +1 -0
  80. package/lib/model/TtscGraphShardStore.d.ts +64 -3
  81. package/lib/model/TtscGraphShardStore.js +85 -15
  82. package/lib/model/TtscGraphShardStore.js.map +1 -1
  83. package/lib/model/TtscGraphSourceReader.d.ts +31 -8
  84. package/lib/model/TtscGraphSourceReader.js +37 -13
  85. package/lib/model/TtscGraphSourceReader.js.map +1 -1
  86. package/lib/model/TtscLintDaemon.d.ts +35 -17
  87. package/lib/model/TtscLintDaemon.js +39 -117
  88. package/lib/model/TtscLintDaemon.js.map +1 -1
  89. package/lib/model/TtscLintDaemonState.d.ts +69 -0
  90. package/lib/model/TtscLintDaemonState.js +166 -0
  91. package/lib/model/TtscLintDaemonState.js.map +1 -0
  92. package/lib/model/copyGraphRecords.d.ts +14 -0
  93. package/lib/model/copyGraphRecords.js +19 -0
  94. package/lib/model/copyGraphRecords.js.map +1 -0
  95. package/lib/model/copyGraphSnapshot.d.ts +17 -0
  96. package/lib/model/copyGraphSnapshot.js +33 -0
  97. package/lib/model/copyGraphSnapshot.js.map +1 -0
  98. package/lib/model/loadGraph.d.ts +19 -10
  99. package/lib/model/loadGraph.js +21 -12
  100. package/lib/model/loadGraph.js.map +1 -1
  101. package/lib/model/publishedArtifacts.d.ts +78 -97
  102. package/lib/model/publishedArtifacts.js +271 -85
  103. package/lib/model/publishedArtifacts.js.map +1 -1
  104. package/lib/nativeExecutable.d.ts +19 -8
  105. package/lib/nativeExecutable.js +75 -15
  106. package/lib/nativeExecutable.js.map +1 -1
  107. package/lib/reduce.d.ts +19 -45
  108. package/lib/reduce.js +19 -3
  109. package/lib/reduce.js.map +1 -1
  110. package/lib/resolveGraphBinary.d.ts +9 -0
  111. package/lib/resolveGraphBinary.js +11 -3
  112. package/lib/resolveGraphBinary.js.map +1 -1
  113. package/lib/runGraph.d.ts +21 -0
  114. package/lib/runGraph.js +83 -0
  115. package/lib/runGraph.js.map +1 -0
  116. package/lib/server/IResolvedGraphHandle.d.ts +22 -0
  117. package/lib/server/IResolvedGraphHandle.js +3 -0
  118. package/lib/server/IResolvedGraphHandle.js.map +1 -0
  119. package/lib/server/createServer.d.ts +14 -10
  120. package/lib/server/createServer.js +42 -39
  121. package/lib/server/createServer.js.map +1 -1
  122. package/lib/server/exportSurface.d.ts +23 -1
  123. package/lib/server/exportSurface.js +23 -1
  124. package/lib/server/exportSurface.js.map +1 -1
  125. package/lib/server/formatGraphFailure.d.ts +20 -0
  126. package/lib/server/formatGraphFailure.js +35 -0
  127. package/lib/server/formatGraphFailure.js.map +1 -0
  128. package/lib/server/pathPolicy.d.ts +70 -5
  129. package/lib/server/pathPolicy.js +66 -4
  130. package/lib/server/pathPolicy.js.map +1 -1
  131. package/lib/server/resolveHandle.d.ts +10 -5
  132. package/lib/server/resolveHandle.js +39 -7
  133. package/lib/server/resolveHandle.js.map +1 -1
  134. package/lib/server/resultAudit.d.ts +17 -14
  135. package/lib/server/resultAudit.js +56 -27
  136. package/lib/server/resultAudit.js.map +1 -1
  137. package/lib/server/resultNext.d.ts +26 -1
  138. package/lib/server/resultNext.js +14 -0
  139. package/lib/server/resultNext.js.map +1 -1
  140. package/lib/server/runDetails.d.ts +72 -15
  141. package/lib/server/runDetails.js +104 -69
  142. package/lib/server/runDetails.js.map +1 -1
  143. package/lib/server/runEntrypoints.d.ts +9 -0
  144. package/lib/server/runEntrypoints.js +9 -0
  145. package/lib/server/runEntrypoints.js.map +1 -1
  146. package/lib/server/runLookup.d.ts +13 -3
  147. package/lib/server/runLookup.js +19 -6
  148. package/lib/server/runLookup.js.map +1 -1
  149. package/lib/server/runOverview.d.ts +13 -4
  150. package/lib/server/runOverview.js +13 -4
  151. package/lib/server/runOverview.js.map +1 -1
  152. package/lib/server/runTour.d.ts +9 -0
  153. package/lib/server/runTour.js +33 -65
  154. package/lib/server/runTour.js.map +1 -1
  155. package/lib/server/runTrace.d.ts +25 -1
  156. package/lib/server/runTrace.js +133 -88
  157. package/lib/server/runTrace.js.map +1 -1
  158. package/lib/server/startServer.d.ts +16 -0
  159. package/lib/server/startServer.js +24 -1
  160. package/lib/server/startServer.js.map +1 -1
  161. package/lib/structures/ITtscGraphApplication.d.ts +95 -41
  162. package/lib/structures/ITtscGraphDecorator.d.ts +18 -0
  163. package/lib/structures/ITtscGraphDetails.d.ts +81 -6
  164. package/lib/structures/ITtscGraphDocTag.d.ts +17 -8
  165. package/lib/structures/ITtscGraphDump.d.ts +106 -8
  166. package/lib/structures/ITtscGraphEdge.d.ts +14 -2
  167. package/lib/structures/ITtscGraphEntrypoints.d.ts +81 -6
  168. package/lib/structures/ITtscGraphEscape.d.ts +24 -2
  169. package/lib/structures/ITtscGraphEvidence.d.ts +9 -0
  170. package/lib/structures/ITtscGraphLookup.d.ts +42 -9
  171. package/lib/structures/ITtscGraphNext.d.ts +12 -1
  172. package/lib/structures/ITtscGraphNode.d.ts +38 -11
  173. package/lib/structures/ITtscGraphOverview.d.ts +81 -6
  174. package/lib/structures/ITtscGraphSnapshot.d.ts +97 -2
  175. package/lib/structures/ITtscGraphSpan.d.ts +9 -0
  176. package/lib/structures/ITtscGraphTour.d.ts +83 -9
  177. package/lib/structures/ITtscGraphTrace.d.ts +99 -14
  178. package/lib/structures/RawDump.d.ts +22 -0
  179. package/lib/structures/RawDump.js +3 -0
  180. package/lib/structures/RawDump.js.map +1 -0
  181. package/lib/structures/RawEdge.d.ts +20 -0
  182. package/lib/structures/RawEdge.js +3 -0
  183. package/lib/structures/RawEdge.js.map +1 -0
  184. package/lib/structures/RawNode.d.ts +26 -0
  185. package/lib/structures/RawNode.js +3 -0
  186. package/lib/structures/RawNode.js.map +1 -0
  187. package/lib/structures/TtscGraphArtifactNodeKind.d.ts +9 -0
  188. package/lib/structures/TtscGraphArtifactNodeKind.js +9 -0
  189. package/lib/structures/TtscGraphArtifactNodeKind.js.map +1 -1
  190. package/lib/structures/TtscGraphDumpEdgeKind.d.ts +15 -1
  191. package/lib/structures/TtscGraphDumpNodeKind.d.ts +9 -0
  192. package/lib/structures/TtscGraphEdgeKind.d.ts +13 -4
  193. package/lib/structures/TtscGraphNodeKind.d.ts +9 -0
  194. package/lib/structures/TtscGraphNodeModifier.d.ts +9 -0
  195. package/lib/structures/ViewerLink.d.ts +20 -0
  196. package/lib/structures/ViewerLink.js +3 -0
  197. package/lib/structures/ViewerLink.js.map +1 -0
  198. package/lib/structures/ViewerNode.d.ts +24 -0
  199. package/lib/structures/ViewerNode.js +3 -0
  200. package/lib/structures/ViewerNode.js.map +1 -0
  201. package/lib/structures/ViewerPayload.d.ts +42 -0
  202. package/lib/structures/ViewerPayload.js +3 -0
  203. package/lib/structures/ViewerPayload.js.map +1 -0
  204. package/lib/view.d.ts +9 -0
  205. package/lib/view.js +203 -91
  206. package/lib/view.js.map +1 -1
  207. package/lib/viewer/viewer.js +1 -1
  208. package/package.json +8 -6
  209. package/src/CapturedProcessOutput.ts +50 -0
  210. package/src/ILauncherOption.ts +24 -0
  211. package/src/IProjectOptions.ts +19 -0
  212. package/src/ParsedLauncherOptions.ts +13 -0
  213. package/src/TtscGraphApplication.ts +38 -1
  214. package/src/TtscGraphLauncherArguments.ts +207 -0
  215. package/src/TtscGraphViewSnapshot.ts +46 -0
  216. package/src/index.ts +9 -160
  217. package/src/internal/GraphProcessTrace.ts +242 -0
  218. package/src/launcherArgs.ts +89 -23
  219. package/src/model/IArtifactDirectory.ts +27 -0
  220. package/src/model/IArtifactInputs.ts +21 -0
  221. package/src/model/IPublishedArtifacts.ts +81 -0
  222. package/src/model/IPublishedArtifactsResident.ts +24 -0
  223. package/src/model/ITtscLintDaemonTarget.ts +22 -0
  224. package/src/model/TtscGraphLinePeer.ts +318 -0
  225. package/src/model/TtscGraphMemory.ts +284 -246
  226. package/src/model/TtscGraphNativeArguments.ts +67 -0
  227. package/src/model/TtscGraphNodeId.ts +57 -3
  228. package/src/model/TtscGraphProjection.ts +473 -0
  229. package/src/model/TtscGraphProtocol.ts +90 -0
  230. package/src/model/TtscGraphReadonly.ts +17 -0
  231. package/src/model/TtscGraphRequestOptions.ts +16 -0
  232. package/src/model/TtscGraphSession.ts +196 -475
  233. package/src/model/TtscGraphSessionOptions.ts +22 -0
  234. package/src/model/TtscGraphSessionState.ts +558 -0
  235. package/src/model/TtscGraphShardStore.ts +99 -23
  236. package/src/model/TtscGraphSourceReader.ts +37 -15
  237. package/src/model/TtscLintDaemon.ts +55 -136
  238. package/src/model/TtscLintDaemonState.ts +174 -0
  239. package/src/model/copyGraphRecords.ts +17 -0
  240. package/src/model/copyGraphSnapshot.ts +30 -0
  241. package/src/model/loadGraph.ts +23 -12
  242. package/src/model/publishedArtifacts.ts +361 -182
  243. package/src/nativeExecutable.ts +93 -26
  244. package/src/reduce.ts +24 -51
  245. package/src/resolveGraphBinary.ts +13 -3
  246. package/src/runGraph.ts +90 -0
  247. package/src/server/IResolvedGraphHandle.ts +24 -0
  248. package/src/server/createServer.ts +16 -22
  249. package/src/server/exportSurface.ts +23 -1
  250. package/src/server/formatGraphFailure.ts +32 -0
  251. package/src/server/pathPolicy.ts +70 -5
  252. package/src/server/resolveHandle.ts +45 -14
  253. package/src/server/resultAudit.ts +58 -27
  254. package/src/server/resultNext.ts +26 -1
  255. package/src/server/runDetails.ts +138 -73
  256. package/src/server/runEntrypoints.ts +13 -1
  257. package/src/server/runLookup.ts +23 -7
  258. package/src/server/runOverview.ts +17 -5
  259. package/src/server/runTour.ts +44 -82
  260. package/src/server/runTrace.ts +175 -102
  261. package/src/server/startServer.ts +29 -1
  262. package/src/structures/ITtscGraphApplication.ts +95 -41
  263. package/src/structures/ITtscGraphDecorator.ts +18 -0
  264. package/src/structures/ITtscGraphDetails.ts +81 -6
  265. package/src/structures/ITtscGraphDocTag.ts +17 -8
  266. package/src/structures/ITtscGraphDump.ts +106 -8
  267. package/src/structures/ITtscGraphEdge.ts +14 -2
  268. package/src/structures/ITtscGraphEntrypoints.ts +81 -6
  269. package/src/structures/ITtscGraphEscape.ts +24 -2
  270. package/src/structures/ITtscGraphEvidence.ts +9 -0
  271. package/src/structures/ITtscGraphLookup.ts +42 -9
  272. package/src/structures/ITtscGraphNext.ts +12 -1
  273. package/src/structures/ITtscGraphNode.ts +38 -11
  274. package/src/structures/ITtscGraphOverview.ts +88 -6
  275. package/src/structures/ITtscGraphSnapshot.ts +117 -2
  276. package/src/structures/ITtscGraphSpan.ts +9 -0
  277. package/src/structures/ITtscGraphTour.ts +83 -9
  278. package/src/structures/ITtscGraphTrace.ts +100 -14
  279. package/src/structures/RawDump.ts +25 -0
  280. package/src/structures/RawEdge.ts +22 -0
  281. package/src/structures/RawNode.ts +31 -0
  282. package/src/structures/TtscGraphArtifactNodeKind.ts +9 -0
  283. package/src/structures/TtscGraphDumpEdgeKind.ts +15 -1
  284. package/src/structures/TtscGraphDumpNodeKind.ts +9 -0
  285. package/src/structures/TtscGraphEdgeKind.ts +13 -4
  286. package/src/structures/TtscGraphNodeKind.ts +9 -0
  287. package/src/structures/TtscGraphNodeModifier.ts +9 -0
  288. package/src/structures/ViewerLink.ts +22 -0
  289. package/src/structures/ViewerNode.ts +28 -0
  290. package/src/structures/ViewerPayload.ts +52 -0
  291. package/src/view.ts +208 -110
  292. package/src/viewer/legend.ts +119 -27
@@ -0,0 +1,928 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.TtscGraphProtocol = void 0;
40
+ const _assertGuard_1 = __importStar(require("typia/lib/internal/_assertGuard"));
41
+ const typia_1 = __importDefault(require("typia"));
42
+ /**
43
+ * The serve protocol version this client speaks.
44
+ *
45
+ * Keep it equal to `serveProtocolVersion` in
46
+ * `packages/ttsc/cmd/ttscgraph/serve.go`. The two are hand-synchronized.
47
+ */
48
+ const PROTOCOL_VERSION = 1;
49
+ /**
50
+ * Decode the graph serve envelope before any state or body facts are consumed.
51
+ *
52
+ * @evidence contracts/common.md#principled-implementation JSON framing, protocol agreement and generated complete-envelope validation precede typed state admission.
53
+ * @evidence contracts/common.md#clear-and-simple-design The decoder owns the wire contract; state owns correlation and generation semantics after this boundary.
54
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The installed typia transform validates the declared envelope rather than a partial cast or handwritten schema replacement.
55
+ * @evidence contracts/common.md#meaningful-documentation Native comments explain why protocol agreement must precede shape validation and why routing fields belong in the envelope.
56
+ * @evidenceExclude contracts/performance.md#efficient-algorithms decode owns JSON and generated envelope validation; the namespace adds no processing algorithm.
57
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work decode validates each submitted line, while state establishes reuse of graph generations.
58
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The namespace retains no decoded frame or native handle; its caller owns typed results.
59
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation a JSON line decoder; it reads no file, path or process.
60
+ */
61
+ var TtscGraphProtocol;
62
+ (function (TtscGraphProtocol) {
63
+ /**
64
+ * Decode one line or throw the owned framing/version/schema diagnostic.
65
+ *
66
+ * @evidence contracts/common.md#principled-implementation JSON parsing precedes protocol agreement and generated complete-envelope validation, so no field is routed before its declared wire contract holds.
67
+ * @evidence contracts/common.md#clear-and-simple-design This single decoder supplies typed inputs to state; state owns pending correlation, schema body agreement and generation semantics.
68
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Installed typia validates the whole declared envelope rather than a handwritten partial guard or a fabricated trusted frame.
69
+ * @evidence contracts/common.md#meaningful-documentation The headline states owned failure behavior; private comments explain version-before-shape and routing-field validation.
70
+ * @evidence contracts/performance.md#efficient-algorithms JSON parsing and generated field traversal process the line and carried graph facts linearly; no project, directory or historical-frame scan occurs.
71
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Each submitted wire line requires validation; graph state alone coordinates current-model reuse.
72
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Parsed values and error text are local; the typed result transfers to state and no native reader, child or frame history is retained.
73
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation parses one line of JSON text and validates it; no file, path or process.
74
+ */
75
+ function decode(line) {
76
+ let parsed;
77
+ try {
78
+ parsed = JSON.parse(line);
79
+ }
80
+ catch (error) {
81
+ throw new Error(`@ttsc/graph: native session returned invalid JSON: ${asError(error).message}`);
82
+ }
83
+ // Read the version before the shape, because a server speaking another
84
+ // version is entitled to a different shape. Asserting first would report
85
+ // that mismatch as a field complaint — "expected string at $input.mode" —
86
+ // about a contract the other side never agreed to, which is the misparse
87
+ // this field exists to prevent. Ask what protocol it is first, then hold it
88
+ // to that protocol.
89
+ const version = (() => {
90
+ const _io0 = input => "number" === typeof input.protocolVersion;
91
+ return input => "object" === typeof input && null !== input && _io0(input);
92
+ })()(parsed) ? parsed.protocolVersion
93
+ : undefined;
94
+ if (version !== PROTOCOL_VERSION) {
95
+ // Session-wide: a version mismatch is not one bad frame, it is the wrong
96
+ // binary, and every request against it is equally doomed.
97
+ throw new Error(`@ttsc/graph: ttscgraph speaks serve protocol ${version === undefined ? "an unknown version" : `v${String(version)}`}, this client speaks v${String(PROTOCOL_VERSION)}. ` +
98
+ "Install a matching `ttsc` (the binary resolves from the target " +
99
+ "project, or from TTSC_GRAPH_BINARY).");
100
+ }
101
+ let response;
102
+ try {
103
+ // Validate the envelope, not just the dump it carries. The dump was
104
+ // typia-asserted while the envelope around it was a bare cast, so the
105
+ // fields the client actually branches on — the mode, and the id that
106
+ // routes the frame — were the unchecked ones. Anything added to the
107
+ // envelope belongs on this side of that line.
108
+ response = (() => {
109
+ const _ip0 = input => "number" === typeof input["protocolVersion"];
110
+ const _ip1 = input => Array.isArray(input["capabilities"]) && input["capabilities"].every(elem => "string" === typeof elem);
111
+ const _ip2 = input => "string" === typeof input["project"];
112
+ const _ip3 = input => "string" === typeof input["tsconfig"];
113
+ const _ip4 = input => Array.isArray(input["diagnostics"]) && input["diagnostics"].every(elem => "object" === typeof elem && null !== elem && _io8(elem));
114
+ const _ip5 = input => Array.isArray(input["nodes"]) && input["nodes"].every(elem => "object" === typeof elem && null !== elem && _io9(elem));
115
+ const _ip6 = input => Array.isArray(input["edges"]) && input["edges"].every(elem => "object" === typeof elem && null !== elem && _io16(elem));
116
+ const _ip7 = input => "number" === typeof input["schemaVersion"];
117
+ const _ip8 = input => "object" === typeof input["producer"] && null !== input["producer"] && _io3(input["producer"]);
118
+ const _ip9 = input => "object" === typeof input["universe"] && null !== input["universe"] && _io4(input["universe"]);
119
+ const _ip10 = input => "string" === typeof input["file"];
120
+ const _ip11 = input => "string" === typeof input["digest"];
121
+ const _ip12 = input => "string" === typeof input["id"];
122
+ const _ip13 = input => "string" === typeof input["name"];
123
+ const _ip14 = input => undefined === input["qualifiedName"] || "string" === typeof input["qualifiedName"];
124
+ const _ip15 = input => "boolean" === typeof input["external"];
125
+ const _ip16 = input => undefined === input["ignored"] || "boolean" === typeof input["ignored"];
126
+ const _ip17 = input => undefined === input["exported"] || "boolean" === typeof input["exported"];
127
+ const _ip18 = input => undefined === input["closure"] || "boolean" === typeof input["closure"];
128
+ const _ip19 = input => undefined === input["modifiers"] || Array.isArray(input["modifiers"]) && input["modifiers"].every(elem => true === _iv0.has(elem));
129
+ const _iv0 = new Set(["abstract", "async", "const", "declare", "default", "export", "private", "protected", "public", "readonly", "static"]);
130
+ const _ip20 = input => undefined === input["literals"] || Array.isArray(input["literals"]) && input["literals"].every(elem => "string" === typeof elem);
131
+ const _ip21 = input => undefined === input["enumMembers"] || Array.isArray(input["enumMembers"]) && input["enumMembers"].every(elem => "object" === typeof elem && null !== elem && _io10(elem));
132
+ const _ip22 = input => undefined === input["objectMembers"] || Array.isArray(input["objectMembers"]) && input["objectMembers"].every(elem => "object" === typeof elem && null !== elem && _io11(elem));
133
+ const _ip23 = input => undefined === input["decorators"] || Array.isArray(input["decorators"]) && input["decorators"].every(elem => "object" === typeof elem && null !== elem && _io12(elem));
134
+ const _ip24 = input => undefined === input["docTags"] || Array.isArray(input["docTags"]) && input["docTags"].every(elem => "object" === typeof elem && null !== elem && _io14(elem));
135
+ const _ip25 = input => undefined === input["signature"] || "string" === typeof input["signature"];
136
+ const _ip26 = input => true === _iv1.has(input["kind"]);
137
+ const _iv1 = new Set(["class", "enum", "function", "interface", "markdown_document", "markdown_section", "method", "module", "prisma_column", "prisma_model", "prisma_relation", "swagger_operation", "type", "variable"]);
138
+ const _ip27 = input => undefined === input["parent"] || "string" === typeof input["parent"];
139
+ const _ip28 = input => undefined === input["evidence"] || "object" === typeof input["evidence"] && null !== input["evidence"] && _io15(input["evidence"]);
140
+ const _ip29 = input => undefined === input["implementation"] || "object" === typeof input["implementation"] && null !== input["implementation"] && _io15(input["implementation"]);
141
+ const _iv2 = new Set(["accesses", "calls", "doc_ref", "exports", "extends", "implements", "instantiates", "overrides", "renders", "type_ref"]);
142
+ const _ip30 = input => "string" === typeof input["key"];
143
+ const _ap0 = (input, _path, _exceptionable = true) => "number" === typeof input["protocolVersion"] || _assertGuard_1._assertGuard(_exceptionable, {
144
+ method: "typia.assert",
145
+ path: _path + ".protocolVersion",
146
+ expected: "number",
147
+ value: input["protocolVersion"]
148
+ }, _errorFactory);
149
+ const _ap1 = (input, _path, _exceptionable = true) => (Array.isArray(input["capabilities"]) || _assertGuard_1._assertGuard(_exceptionable, {
150
+ method: "typia.assert",
151
+ path: _path + ".capabilities",
152
+ expected: "Array<string>",
153
+ value: input["capabilities"]
154
+ }, _errorFactory)) && input["capabilities"].every((elem, _index18) => "string" === typeof elem || _assertGuard_1._assertGuard(_exceptionable, {
155
+ method: "typia.assert",
156
+ path: _path + ".capabilities[" + _index18 + "]",
157
+ expected: "string",
158
+ value: elem
159
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
160
+ method: "typia.assert",
161
+ path: _path + ".capabilities",
162
+ expected: "Array<string>",
163
+ value: input["capabilities"]
164
+ }, _errorFactory);
165
+ const _ap2 = (input, _path, _exceptionable = true) => "string" === typeof input["project"] || _assertGuard_1._assertGuard(_exceptionable, {
166
+ method: "typia.assert",
167
+ path: _path + ".project",
168
+ expected: "string",
169
+ value: input["project"]
170
+ }, _errorFactory);
171
+ const _ap3 = (input, _path, _exceptionable = true) => "string" === typeof input["tsconfig"] || _assertGuard_1._assertGuard(_exceptionable, {
172
+ method: "typia.assert",
173
+ path: _path + ".tsconfig",
174
+ expected: "string",
175
+ value: input["tsconfig"]
176
+ }, _errorFactory);
177
+ const _ap4 = (input, _path, _exceptionable = true) => (Array.isArray(input["diagnostics"]) || _assertGuard_1._assertGuard(_exceptionable, {
178
+ method: "typia.assert",
179
+ path: _path + ".diagnostics",
180
+ expected: "Array<ITtscGraphDump.IDiagnostic>",
181
+ value: input["diagnostics"]
182
+ }, _errorFactory)) && input["diagnostics"].every((elem, _index19) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
183
+ method: "typia.assert",
184
+ path: _path + ".diagnostics[" + _index19 + "]",
185
+ expected: "ITtscGraphDump.IDiagnostic",
186
+ value: elem
187
+ }, _errorFactory)) && _ao8(elem, _path + ".diagnostics[" + _index19 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
188
+ method: "typia.assert",
189
+ path: _path + ".diagnostics[" + _index19 + "]",
190
+ expected: "ITtscGraphDump.IDiagnostic",
191
+ value: elem
192
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
193
+ method: "typia.assert",
194
+ path: _path + ".diagnostics",
195
+ expected: "Array<ITtscGraphDump.IDiagnostic>",
196
+ value: input["diagnostics"]
197
+ }, _errorFactory);
198
+ const _ap5 = (input, _path, _exceptionable = true) => (Array.isArray(input["nodes"]) || _assertGuard_1._assertGuard(_exceptionable, {
199
+ method: "typia.assert",
200
+ path: _path + ".nodes",
201
+ expected: "Array<ITtscGraphDump.INode>",
202
+ value: input["nodes"]
203
+ }, _errorFactory)) && input["nodes"].every((elem, _index20) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
204
+ method: "typia.assert",
205
+ path: _path + ".nodes[" + _index20 + "]",
206
+ expected: "ITtscGraphDump.INode",
207
+ value: elem
208
+ }, _errorFactory)) && _ao9(elem, _path + ".nodes[" + _index20 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
209
+ method: "typia.assert",
210
+ path: _path + ".nodes[" + _index20 + "]",
211
+ expected: "ITtscGraphDump.INode",
212
+ value: elem
213
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
214
+ method: "typia.assert",
215
+ path: _path + ".nodes",
216
+ expected: "Array<ITtscGraphDump.INode>",
217
+ value: input["nodes"]
218
+ }, _errorFactory);
219
+ const _ap6 = (input, _path, _exceptionable = true) => (Array.isArray(input["edges"]) || _assertGuard_1._assertGuard(_exceptionable, {
220
+ method: "typia.assert",
221
+ path: _path + ".edges",
222
+ expected: "Array<ITtscGraphDump.IEdge>",
223
+ value: input["edges"]
224
+ }, _errorFactory)) && input["edges"].every((elem, _index21) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
225
+ method: "typia.assert",
226
+ path: _path + ".edges[" + _index21 + "]",
227
+ expected: "ITtscGraphDump.IEdge",
228
+ value: elem
229
+ }, _errorFactory)) && _ao16(elem, _path + ".edges[" + _index21 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
230
+ method: "typia.assert",
231
+ path: _path + ".edges[" + _index21 + "]",
232
+ expected: "ITtscGraphDump.IEdge",
233
+ value: elem
234
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
235
+ method: "typia.assert",
236
+ path: _path + ".edges",
237
+ expected: "Array<ITtscGraphDump.IEdge>",
238
+ value: input["edges"]
239
+ }, _errorFactory);
240
+ const _ap7 = (input, _path, _exceptionable = true) => "number" === typeof input["schemaVersion"] || _assertGuard_1._assertGuard(_exceptionable, {
241
+ method: "typia.assert",
242
+ path: _path + ".schemaVersion",
243
+ expected: "number",
244
+ value: input["schemaVersion"]
245
+ }, _errorFactory);
246
+ const _ap8 = (input, _path, _exceptionable = true) => ("object" === typeof input["producer"] && null !== input["producer"] || _assertGuard_1._assertGuard(_exceptionable, {
247
+ method: "typia.assert",
248
+ path: _path + ".producer",
249
+ expected: "ITtscGraphDump.IProducer",
250
+ value: input["producer"]
251
+ }, _errorFactory)) && _ao3(input["producer"], _path + ".producer", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
252
+ method: "typia.assert",
253
+ path: _path + ".producer",
254
+ expected: "ITtscGraphDump.IProducer",
255
+ value: input["producer"]
256
+ }, _errorFactory);
257
+ const _ap9 = (input, _path, _exceptionable = true) => ("object" === typeof input["universe"] && null !== input["universe"] || _assertGuard_1._assertGuard(_exceptionable, {
258
+ method: "typia.assert",
259
+ path: _path + ".universe",
260
+ expected: "ITtscGraphDump.IUniverse",
261
+ value: input["universe"]
262
+ }, _errorFactory)) && _ao4(input["universe"], _path + ".universe", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
263
+ method: "typia.assert",
264
+ path: _path + ".universe",
265
+ expected: "ITtscGraphDump.IUniverse",
266
+ value: input["universe"]
267
+ }, _errorFactory);
268
+ const _ap10 = (input, _path, _exceptionable = true) => "string" === typeof input["file"] || _assertGuard_1._assertGuard(_exceptionable, {
269
+ method: "typia.assert",
270
+ path: _path + ".file",
271
+ expected: "string",
272
+ value: input["file"]
273
+ }, _errorFactory);
274
+ const _ap11 = (input, _path, _exceptionable = true) => "string" === typeof input["digest"] || _assertGuard_1._assertGuard(_exceptionable, {
275
+ method: "typia.assert",
276
+ path: _path + ".digest",
277
+ expected: "string",
278
+ value: input["digest"]
279
+ }, _errorFactory);
280
+ const _ap12 = (input, _path, _exceptionable = true) => "string" === typeof input["id"] || _assertGuard_1._assertGuard(_exceptionable, {
281
+ method: "typia.assert",
282
+ path: _path + ".id",
283
+ expected: "string",
284
+ value: input["id"]
285
+ }, _errorFactory);
286
+ const _ap13 = (input, _path, _exceptionable = true) => "string" === typeof input["name"] || _assertGuard_1._assertGuard(_exceptionable, {
287
+ method: "typia.assert",
288
+ path: _path + ".name",
289
+ expected: "string",
290
+ value: input["name"]
291
+ }, _errorFactory);
292
+ const _ap14 = (input, _path, _exceptionable = true) => undefined === input["qualifiedName"] || "string" === typeof input["qualifiedName"] || _assertGuard_1._assertGuard(_exceptionable, {
293
+ method: "typia.assert",
294
+ path: _path + ".qualifiedName",
295
+ expected: "(string | undefined)",
296
+ value: input["qualifiedName"]
297
+ }, _errorFactory);
298
+ const _ap15 = (input, _path, _exceptionable = true) => "boolean" === typeof input["external"] || _assertGuard_1._assertGuard(_exceptionable, {
299
+ method: "typia.assert",
300
+ path: _path + ".external",
301
+ expected: "boolean",
302
+ value: input["external"]
303
+ }, _errorFactory);
304
+ const _ap16 = (input, _path, _exceptionable = true) => undefined === input["ignored"] || "boolean" === typeof input["ignored"] || _assertGuard_1._assertGuard(_exceptionable, {
305
+ method: "typia.assert",
306
+ path: _path + ".ignored",
307
+ expected: "(boolean | undefined)",
308
+ value: input["ignored"]
309
+ }, _errorFactory);
310
+ const _ap17 = (input, _path, _exceptionable = true) => undefined === input["exported"] || "boolean" === typeof input["exported"] || _assertGuard_1._assertGuard(_exceptionable, {
311
+ method: "typia.assert",
312
+ path: _path + ".exported",
313
+ expected: "(boolean | undefined)",
314
+ value: input["exported"]
315
+ }, _errorFactory);
316
+ const _ap18 = (input, _path, _exceptionable = true) => undefined === input["closure"] || "boolean" === typeof input["closure"] || _assertGuard_1._assertGuard(_exceptionable, {
317
+ method: "typia.assert",
318
+ path: _path + ".closure",
319
+ expected: "(boolean | undefined)",
320
+ value: input["closure"]
321
+ }, _errorFactory);
322
+ const _ap19 = (input, _path, _exceptionable = true) => undefined === input["modifiers"] || (Array.isArray(input["modifiers"]) || _assertGuard_1._assertGuard(_exceptionable, {
323
+ method: "typia.assert",
324
+ path: _path + ".modifiers",
325
+ expected: "(Array<TtscGraphNodeModifier> | undefined)",
326
+ value: input["modifiers"]
327
+ }, _errorFactory)) && input["modifiers"].every((elem, _index25) => true === _av0.has(elem) || _assertGuard_1._assertGuard(_exceptionable, {
328
+ method: "typia.assert",
329
+ path: _path + ".modifiers[" + _index25 + "]",
330
+ expected: _ae0,
331
+ value: elem
332
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
333
+ method: "typia.assert",
334
+ path: _path + ".modifiers",
335
+ expected: "(Array<TtscGraphNodeModifier> | undefined)",
336
+ value: input["modifiers"]
337
+ }, _errorFactory);
338
+ const _av0 = new Set(["abstract", "async", "const", "declare", "default", "export", "private", "protected", "public", "readonly", "static"]);
339
+ const _ae0 = "(\"abstract\" | \"async\" | \"const\" | \"declare\" | \"default\" | \"export\" | \"private\" | \"protected\" | \"public\" | \"readonly\" | \"static\")";
340
+ const _ap20 = (input, _path, _exceptionable = true) => undefined === input["literals"] || (Array.isArray(input["literals"]) || _assertGuard_1._assertGuard(_exceptionable, {
341
+ method: "typia.assert",
342
+ path: _path + ".literals",
343
+ expected: "(Array<string> | undefined)",
344
+ value: input["literals"]
345
+ }, _errorFactory)) && input["literals"].every((elem, _index26) => "string" === typeof elem || _assertGuard_1._assertGuard(_exceptionable, {
346
+ method: "typia.assert",
347
+ path: _path + ".literals[" + _index26 + "]",
348
+ expected: "string",
349
+ value: elem
350
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
351
+ method: "typia.assert",
352
+ path: _path + ".literals",
353
+ expected: "(Array<string> | undefined)",
354
+ value: input["literals"]
355
+ }, _errorFactory);
356
+ const _ap21 = (input, _path, _exceptionable = true) => undefined === input["enumMembers"] || (Array.isArray(input["enumMembers"]) || _assertGuard_1._assertGuard(_exceptionable, {
357
+ method: "typia.assert",
358
+ path: _path + ".enumMembers",
359
+ expected: "(Array<ITtscGraphNode.IEnumMember> | undefined)",
360
+ value: input["enumMembers"]
361
+ }, _errorFactory)) && input["enumMembers"].every((elem, _index27) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
362
+ method: "typia.assert",
363
+ path: _path + ".enumMembers[" + _index27 + "]",
364
+ expected: "ITtscGraphNode.IEnumMember",
365
+ value: elem
366
+ }, _errorFactory)) && _ao10(elem, _path + ".enumMembers[" + _index27 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
367
+ method: "typia.assert",
368
+ path: _path + ".enumMembers[" + _index27 + "]",
369
+ expected: "ITtscGraphNode.IEnumMember",
370
+ value: elem
371
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
372
+ method: "typia.assert",
373
+ path: _path + ".enumMembers",
374
+ expected: "(Array<ITtscGraphNode.IEnumMember> | undefined)",
375
+ value: input["enumMembers"]
376
+ }, _errorFactory);
377
+ const _ap22 = (input, _path, _exceptionable = true) => undefined === input["objectMembers"] || (Array.isArray(input["objectMembers"]) || _assertGuard_1._assertGuard(_exceptionable, {
378
+ method: "typia.assert",
379
+ path: _path + ".objectMembers",
380
+ expected: "(Array<ITtscGraphNode.IObjectMember> | undefined)",
381
+ value: input["objectMembers"]
382
+ }, _errorFactory)) && input["objectMembers"].every((elem, _index28) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
383
+ method: "typia.assert",
384
+ path: _path + ".objectMembers[" + _index28 + "]",
385
+ expected: "ITtscGraphNode.IObjectMember",
386
+ value: elem
387
+ }, _errorFactory)) && _ao11(elem, _path + ".objectMembers[" + _index28 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
388
+ method: "typia.assert",
389
+ path: _path + ".objectMembers[" + _index28 + "]",
390
+ expected: "ITtscGraphNode.IObjectMember",
391
+ value: elem
392
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
393
+ method: "typia.assert",
394
+ path: _path + ".objectMembers",
395
+ expected: "(Array<ITtscGraphNode.IObjectMember> | undefined)",
396
+ value: input["objectMembers"]
397
+ }, _errorFactory);
398
+ const _ap23 = (input, _path, _exceptionable = true) => undefined === input["decorators"] || (Array.isArray(input["decorators"]) || _assertGuard_1._assertGuard(_exceptionable, {
399
+ method: "typia.assert",
400
+ path: _path + ".decorators",
401
+ expected: "(Array<ITtscGraphDecorator> | undefined)",
402
+ value: input["decorators"]
403
+ }, _errorFactory)) && input["decorators"].every((elem, _index29) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
404
+ method: "typia.assert",
405
+ path: _path + ".decorators[" + _index29 + "]",
406
+ expected: "ITtscGraphDecorator",
407
+ value: elem
408
+ }, _errorFactory)) && _ao12(elem, _path + ".decorators[" + _index29 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
409
+ method: "typia.assert",
410
+ path: _path + ".decorators[" + _index29 + "]",
411
+ expected: "ITtscGraphDecorator",
412
+ value: elem
413
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
414
+ method: "typia.assert",
415
+ path: _path + ".decorators",
416
+ expected: "(Array<ITtscGraphDecorator> | undefined)",
417
+ value: input["decorators"]
418
+ }, _errorFactory);
419
+ const _ap24 = (input, _path, _exceptionable = true) => undefined === input["docTags"] || (Array.isArray(input["docTags"]) || _assertGuard_1._assertGuard(_exceptionable, {
420
+ method: "typia.assert",
421
+ path: _path + ".docTags",
422
+ expected: "(Array<ITtscGraphDocTag> | undefined)",
423
+ value: input["docTags"]
424
+ }, _errorFactory)) && input["docTags"].every((elem, _index30) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
425
+ method: "typia.assert",
426
+ path: _path + ".docTags[" + _index30 + "]",
427
+ expected: "ITtscGraphDocTag",
428
+ value: elem
429
+ }, _errorFactory)) && _ao14(elem, _path + ".docTags[" + _index30 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
430
+ method: "typia.assert",
431
+ path: _path + ".docTags[" + _index30 + "]",
432
+ expected: "ITtscGraphDocTag",
433
+ value: elem
434
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
435
+ method: "typia.assert",
436
+ path: _path + ".docTags",
437
+ expected: "(Array<ITtscGraphDocTag> | undefined)",
438
+ value: input["docTags"]
439
+ }, _errorFactory);
440
+ const _ap25 = (input, _path, _exceptionable = true) => undefined === input["signature"] || "string" === typeof input["signature"] || _assertGuard_1._assertGuard(_exceptionable, {
441
+ method: "typia.assert",
442
+ path: _path + ".signature",
443
+ expected: "(string | undefined)",
444
+ value: input["signature"]
445
+ }, _errorFactory);
446
+ const _ap26 = (input, _path, _exceptionable = true) => true === _av1.has(input["kind"]) || _assertGuard_1._assertGuard(_exceptionable, {
447
+ method: "typia.assert",
448
+ path: _path + ".kind",
449
+ expected: _ae1,
450
+ value: input["kind"]
451
+ }, _errorFactory);
452
+ const _av1 = new Set(["class", "enum", "function", "interface", "markdown_document", "markdown_section", "method", "module", "prisma_column", "prisma_model", "prisma_relation", "swagger_operation", "type", "variable"]);
453
+ const _ae1 = "(\"class\" | \"enum\" | \"function\" | \"interface\" | \"markdown_document\" | \"markdown_section\" | \"method\" | \"module\" | \"prisma_column\" | \"prisma_model\" | \"prisma_relation\" | \"swagger_operation\" | \"type\" | \"variable\")";
454
+ const _ap27 = (input, _path, _exceptionable = true) => undefined === input["parent"] || "string" === typeof input["parent"] || _assertGuard_1._assertGuard(_exceptionable, {
455
+ method: "typia.assert",
456
+ path: _path + ".parent",
457
+ expected: "(string | undefined)",
458
+ value: input["parent"]
459
+ }, _errorFactory);
460
+ const _ap28 = (input, _path, _exceptionable = true) => undefined === input["evidence"] || ("object" === typeof input["evidence"] && null !== input["evidence"] || _assertGuard_1._assertGuard(_exceptionable, {
461
+ method: "typia.assert",
462
+ path: _path + ".evidence",
463
+ expected: "(ITtscGraphSpan | undefined)",
464
+ value: input["evidence"]
465
+ }, _errorFactory)) && _ao15(input["evidence"], _path + ".evidence", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
466
+ method: "typia.assert",
467
+ path: _path + ".evidence",
468
+ expected: "(ITtscGraphSpan | undefined)",
469
+ value: input["evidence"]
470
+ }, _errorFactory);
471
+ const _ap29 = (input, _path, _exceptionable = true) => undefined === input["implementation"] || ("object" === typeof input["implementation"] && null !== input["implementation"] || _assertGuard_1._assertGuard(_exceptionable, {
472
+ method: "typia.assert",
473
+ path: _path + ".implementation",
474
+ expected: "(ITtscGraphSpan | undefined)",
475
+ value: input["implementation"]
476
+ }, _errorFactory)) && _ao15(input["implementation"], _path + ".implementation", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
477
+ method: "typia.assert",
478
+ path: _path + ".implementation",
479
+ expected: "(ITtscGraphSpan | undefined)",
480
+ value: input["implementation"]
481
+ }, _errorFactory);
482
+ const _av2 = new Set(["accesses", "calls", "doc_ref", "exports", "extends", "implements", "instantiates", "overrides", "renders", "type_ref"]);
483
+ const _ae2 = "(\"accesses\" | \"calls\" | \"doc_ref\" | \"exports\" | \"extends\" | \"implements\" | \"instantiates\" | \"overrides\" | \"renders\" | \"type_ref\")";
484
+ const _ap30 = (input, _path, _exceptionable = true) => "string" === typeof input["key"] || _assertGuard_1._assertGuard(_exceptionable, {
485
+ method: "typia.assert",
486
+ path: _path + ".key",
487
+ expected: "string",
488
+ value: input["key"]
489
+ }, _errorFactory);
490
+ const _ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.id || _assertGuard_1._assertGuard(_exceptionable, {
491
+ method: "typia.assert",
492
+ path: _path + ".id",
493
+ expected: "number",
494
+ value: input.id
495
+ }, _errorFactory)) && _ap0(input, _path, true && _exceptionable) && ("error" === input.mode || "incremental" === input.mode || "initial" === input.mode || "rebuild" === input.mode || "reload" === input.mode || "unchanged" === input.mode || _assertGuard_1._assertGuard(_exceptionable, {
496
+ method: "typia.assert",
497
+ path: _path + ".mode",
498
+ expected: "(\"error\" | \"incremental\" | \"initial\" | \"rebuild\" | \"reload\" | \"unchanged\")",
499
+ value: input.mode
500
+ }, _errorFactory)) && _ap1(input, _path, true && _exceptionable) && ("boolean" === typeof input.changed || _assertGuard_1._assertGuard(_exceptionable, {
501
+ method: "typia.assert",
502
+ path: _path + ".changed",
503
+ expected: "boolean",
504
+ value: input.changed
505
+ }, _errorFactory)) && (undefined === input.dump || ("object" === typeof input.dump && null !== input.dump || _assertGuard_1._assertGuard(_exceptionable, {
506
+ method: "typia.assert",
507
+ path: _path + ".dump",
508
+ expected: "(ITtscGraphDump | undefined)",
509
+ value: input.dump
510
+ }, _errorFactory)) && _ao1(input.dump, _path + ".dump", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
511
+ method: "typia.assert",
512
+ path: _path + ".dump",
513
+ expected: "(ITtscGraphDump | undefined)",
514
+ value: input.dump
515
+ }, _errorFactory)) && (undefined === input.snapshot || ("object" === typeof input.snapshot && null !== input.snapshot || _assertGuard_1._assertGuard(_exceptionable, {
516
+ method: "typia.assert",
517
+ path: _path + ".snapshot",
518
+ expected: "(ITtscGraphSnapshot.ITransaction | undefined)",
519
+ value: input.snapshot
520
+ }, _errorFactory)) && _ao17(input.snapshot, _path + ".snapshot", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
521
+ method: "typia.assert",
522
+ path: _path + ".snapshot",
523
+ expected: "(ITtscGraphSnapshot.ITransaction | undefined)",
524
+ value: input.snapshot
525
+ }, _errorFactory)) && (undefined === input.error || "string" === typeof input.error || _assertGuard_1._assertGuard(_exceptionable, {
526
+ method: "typia.assert",
527
+ path: _path + ".error",
528
+ expected: "(string | undefined)",
529
+ value: input.error
530
+ }, _errorFactory));
531
+ const _ao1 = (input, _path, _exceptionable = true) => _ap2(input, _path, true && _exceptionable) && _ap3(input, _path, true && _exceptionable) && (("object" === typeof input.provenance && null !== input.provenance || _assertGuard_1._assertGuard(_exceptionable, {
532
+ method: "typia.assert",
533
+ path: _path + ".provenance",
534
+ expected: "ITtscGraphDump.IProvenance",
535
+ value: input.provenance
536
+ }, _errorFactory)) && _ao2(input.provenance, _path + ".provenance", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
537
+ method: "typia.assert",
538
+ path: _path + ".provenance",
539
+ expected: "ITtscGraphDump.IProvenance",
540
+ value: input.provenance
541
+ }, _errorFactory)) && _ap4(input, _path, true && _exceptionable) && _ap5(input, _path, true && _exceptionable) && _ap6(input, _path, true && _exceptionable);
542
+ const _ao10 = (input, _path, _exceptionable = true) => _ap13(input, _path, true && _exceptionable) && (undefined === input.value || "string" === typeof input.value || _assertGuard_1._assertGuard(_exceptionable, {
543
+ method: "typia.assert",
544
+ path: _path + ".value",
545
+ expected: "(string | undefined)",
546
+ value: input.value
547
+ }, _errorFactory));
548
+ const _ao11 = (input, _path, _exceptionable = true) => _ap13(input, _path, true && _exceptionable) && ("method" === input.kind || "property" === input.kind || _assertGuard_1._assertGuard(_exceptionable, {
549
+ method: "typia.assert",
550
+ path: _path + ".kind",
551
+ expected: "(\"method\" | \"property\")",
552
+ value: input.kind
553
+ }, _errorFactory)) && (undefined === input.line || "number" === typeof input.line || _assertGuard_1._assertGuard(_exceptionable, {
554
+ method: "typia.assert",
555
+ path: _path + ".line",
556
+ expected: "(number | undefined)",
557
+ value: input.line
558
+ }, _errorFactory)) && _ap25(input, _path, true && _exceptionable);
559
+ const _ao12 = (input, _path, _exceptionable = true) => _ap13(input, _path, true && _exceptionable) && ((Array.isArray(input.arguments) || _assertGuard_1._assertGuard(_exceptionable, {
560
+ method: "typia.assert",
561
+ path: _path + ".arguments",
562
+ expected: "Array<ITtscGraphDecorator.IArgument>",
563
+ value: input.arguments
564
+ }, _errorFactory)) && input.arguments.every((elem, _index31) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _assertGuard_1._assertGuard(_exceptionable, {
565
+ method: "typia.assert",
566
+ path: _path + ".arguments[" + _index31 + "]",
567
+ expected: "ITtscGraphDecorator.IArgument",
568
+ value: elem
569
+ }, _errorFactory)) && _ao13(elem, _path + ".arguments[" + _index31 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
570
+ method: "typia.assert",
571
+ path: _path + ".arguments[" + _index31 + "]",
572
+ expected: "ITtscGraphDecorator.IArgument",
573
+ value: elem
574
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
575
+ method: "typia.assert",
576
+ path: _path + ".arguments",
577
+ expected: "Array<ITtscGraphDecorator.IArgument>",
578
+ value: input.arguments
579
+ }, _errorFactory));
580
+ const _ao13 = (input, _path, _exceptionable = true) => undefined === input.literal || "string" === typeof input.literal || "number" === typeof input.literal || "boolean" === typeof input.literal || _assertGuard_1._assertGuard(_exceptionable, {
581
+ method: "typia.assert",
582
+ path: _path + ".literal",
583
+ expected: "(boolean | number | string | undefined)",
584
+ value: input.literal
585
+ }, _errorFactory);
586
+ const _ao14 = (input, _path, _exceptionable = true) => _ap13(input, _path, true && _exceptionable) && (undefined === input.text || "string" === typeof input.text || _assertGuard_1._assertGuard(_exceptionable, {
587
+ method: "typia.assert",
588
+ path: _path + ".text",
589
+ expected: "(string | undefined)",
590
+ value: input.text
591
+ }, _errorFactory));
592
+ const _ao15 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || _assertGuard_1._assertGuard(_exceptionable, {
593
+ method: "typia.assert",
594
+ path: _path + ".file",
595
+ expected: "(string | undefined)",
596
+ value: input.file
597
+ }, _errorFactory)) && ("number" === typeof input.startLine || _assertGuard_1._assertGuard(_exceptionable, {
598
+ method: "typia.assert",
599
+ path: _path + ".startLine",
600
+ expected: "number",
601
+ value: input.startLine
602
+ }, _errorFactory)) && (undefined === input.startCol || "number" === typeof input.startCol || _assertGuard_1._assertGuard(_exceptionable, {
603
+ method: "typia.assert",
604
+ path: _path + ".startCol",
605
+ expected: "(number | undefined)",
606
+ value: input.startCol
607
+ }, _errorFactory)) && (undefined === input.endLine || "number" === typeof input.endLine || _assertGuard_1._assertGuard(_exceptionable, {
608
+ method: "typia.assert",
609
+ path: _path + ".endLine",
610
+ expected: "(number | undefined)",
611
+ value: input.endLine
612
+ }, _errorFactory)) && (undefined === input.endCol || "number" === typeof input.endCol || _assertGuard_1._assertGuard(_exceptionable, {
613
+ method: "typia.assert",
614
+ path: _path + ".endCol",
615
+ expected: "(number | undefined)",
616
+ value: input.endCol
617
+ }, _errorFactory));
618
+ const _ao16 = (input, _path, _exceptionable = true) => ("string" === typeof input.from || _assertGuard_1._assertGuard(_exceptionable, {
619
+ method: "typia.assert",
620
+ path: _path + ".from",
621
+ expected: "string",
622
+ value: input.from
623
+ }, _errorFactory)) && ("string" === typeof input.to || _assertGuard_1._assertGuard(_exceptionable, {
624
+ method: "typia.assert",
625
+ path: _path + ".to",
626
+ expected: "string",
627
+ value: input.to
628
+ }, _errorFactory)) && (true === _av2.has(input.kind) || _assertGuard_1._assertGuard(_exceptionable, {
629
+ method: "typia.assert",
630
+ path: _path + ".kind",
631
+ expected: _ae2,
632
+ value: input.kind
633
+ }, _errorFactory)) && _ap28(input, _path, true && _exceptionable);
634
+ const _ao17 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && _ap7(input, _path, true && _exceptionable) && _ap2(input, _path, true && _exceptionable) && _ap3(input, _path, true && _exceptionable) && _ap8(input, _path, true && _exceptionable) && _ap1(input, _path, true && _exceptionable) && _ap9(input, _path, true && _exceptionable) && ("number" === typeof input.sequence || _assertGuard_1._assertGuard(_exceptionable, {
635
+ method: "typia.assert",
636
+ path: _path + ".sequence",
637
+ expected: "number",
638
+ value: input.sequence
639
+ }, _errorFactory)) && ("string" === typeof input.generation || _assertGuard_1._assertGuard(_exceptionable, {
640
+ method: "typia.assert",
641
+ path: _path + ".generation",
642
+ expected: "string",
643
+ value: input.generation
644
+ }, _errorFactory)) && (undefined === input.baseSequence || "number" === typeof input.baseSequence || _assertGuard_1._assertGuard(_exceptionable, {
645
+ method: "typia.assert",
646
+ path: _path + ".baseSequence",
647
+ expected: "(number | undefined)",
648
+ value: input.baseSequence
649
+ }, _errorFactory)) && (undefined === input.baseGeneration || "string" === typeof input.baseGeneration || _assertGuard_1._assertGuard(_exceptionable, {
650
+ method: "typia.assert",
651
+ path: _path + ".baseGeneration",
652
+ expected: "(string | undefined)",
653
+ value: input.baseGeneration
654
+ }, _errorFactory)) && ((Array.isArray(input.upserts) || _assertGuard_1._assertGuard(_exceptionable, {
655
+ method: "typia.assert",
656
+ path: _path + ".upserts",
657
+ expected: "Array<ITtscGraphSnapshot.IShardUpsert>",
658
+ value: input.upserts
659
+ }, _errorFactory)) && input.upserts.every((elem, _index32) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
660
+ method: "typia.assert",
661
+ path: _path + ".upserts[" + _index32 + "]",
662
+ expected: "ITtscGraphSnapshot.IShardUpsert",
663
+ value: elem
664
+ }, _errorFactory)) && _ao18(elem, _path + ".upserts[" + _index32 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
665
+ method: "typia.assert",
666
+ path: _path + ".upserts[" + _index32 + "]",
667
+ expected: "ITtscGraphSnapshot.IShardUpsert",
668
+ value: elem
669
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
670
+ method: "typia.assert",
671
+ path: _path + ".upserts",
672
+ expected: "Array<ITtscGraphSnapshot.IShardUpsert>",
673
+ value: input.upserts
674
+ }, _errorFactory)) && ((Array.isArray(input.deletes) || _assertGuard_1._assertGuard(_exceptionable, {
675
+ method: "typia.assert",
676
+ path: _path + ".deletes",
677
+ expected: "Array<string>",
678
+ value: input.deletes
679
+ }, _errorFactory)) && input.deletes.every((elem, _index33) => "string" === typeof elem || _assertGuard_1._assertGuard(_exceptionable, {
680
+ method: "typia.assert",
681
+ path: _path + ".deletes[" + _index33 + "]",
682
+ expected: "string",
683
+ value: elem
684
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
685
+ method: "typia.assert",
686
+ path: _path + ".deletes",
687
+ expected: "Array<string>",
688
+ value: input.deletes
689
+ }, _errorFactory)) && ((Array.isArray(input.manifest) || _assertGuard_1._assertGuard(_exceptionable, {
690
+ method: "typia.assert",
691
+ path: _path + ".manifest",
692
+ expected: "Array<ITtscGraphSnapshot.IShardReference>",
693
+ value: input.manifest
694
+ }, _errorFactory)) && input.manifest.every((elem, _index34) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
695
+ method: "typia.assert",
696
+ path: _path + ".manifest[" + _index34 + "]",
697
+ expected: "ITtscGraphSnapshot.IShardReference",
698
+ value: elem
699
+ }, _errorFactory)) && _ao20(elem, _path + ".manifest[" + _index34 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
700
+ method: "typia.assert",
701
+ path: _path + ".manifest[" + _index34 + "]",
702
+ expected: "ITtscGraphSnapshot.IShardReference",
703
+ value: elem
704
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
705
+ method: "typia.assert",
706
+ path: _path + ".manifest",
707
+ expected: "Array<ITtscGraphSnapshot.IShardReference>",
708
+ value: input.manifest
709
+ }, _errorFactory));
710
+ const _ao18 = (input, _path, _exceptionable = true) => _ap11(input, _path, true && _exceptionable) && (("object" === typeof input.shard && null !== input.shard || _assertGuard_1._assertGuard(_exceptionable, {
711
+ method: "typia.assert",
712
+ path: _path + ".shard",
713
+ expected: "ITtscGraphSnapshot.IShard",
714
+ value: input.shard
715
+ }, _errorFactory)) && _ao19(input.shard, _path + ".shard", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
716
+ method: "typia.assert",
717
+ path: _path + ".shard",
718
+ expected: "ITtscGraphSnapshot.IShard",
719
+ value: input.shard
720
+ }, _errorFactory));
721
+ const _ao19 = (input, _path, _exceptionable = true) => _ap30(input, _path, true && _exceptionable) && (undefined === input.source || ("object" === typeof input.source && null !== input.source || _assertGuard_1._assertGuard(_exceptionable, {
722
+ method: "typia.assert",
723
+ path: _path + ".source",
724
+ expected: "(ITtscGraphDump.ISourceDigest | undefined)",
725
+ value: input.source
726
+ }, _errorFactory)) && _ao7(input.source, _path + ".source", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
727
+ method: "typia.assert",
728
+ path: _path + ".source",
729
+ expected: "(ITtscGraphDump.ISourceDigest | undefined)",
730
+ value: input.source
731
+ }, _errorFactory)) && (undefined === input.config || ("object" === typeof input.config && null !== input.config || _assertGuard_1._assertGuard(_exceptionable, {
732
+ method: "typia.assert",
733
+ path: _path + ".config",
734
+ expected: "(ITtscGraphDump.IFileDigest | undefined)",
735
+ value: input.config
736
+ }, _errorFactory)) && _ao5(input.config, _path + ".config", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
737
+ method: "typia.assert",
738
+ path: _path + ".config",
739
+ expected: "(ITtscGraphDump.IFileDigest | undefined)",
740
+ value: input.config
741
+ }, _errorFactory)) && _ap5(input, _path, true && _exceptionable) && _ap6(input, _path, true && _exceptionable) && _ap4(input, _path, true && _exceptionable);
742
+ const _ao2 = (input, _path, _exceptionable = true) => _ap7(input, _path, true && _exceptionable) && _ap1(input, _path, true && _exceptionable) && _ap8(input, _path, true && _exceptionable) && (undefined === input.artifactProducer || ("object" === typeof input.artifactProducer && null !== input.artifactProducer || _assertGuard_1._assertGuard(_exceptionable, {
743
+ method: "typia.assert",
744
+ path: _path + ".artifactProducer",
745
+ expected: "(ITtscGraphDump.IProducer | undefined)",
746
+ value: input.artifactProducer
747
+ }, _errorFactory)) && _ao3(input.artifactProducer, _path + ".artifactProducer", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
748
+ method: "typia.assert",
749
+ path: _path + ".artifactProducer",
750
+ expected: "(ITtscGraphDump.IProducer | undefined)",
751
+ value: input.artifactProducer
752
+ }, _errorFactory)) && _ap9(input, _path, true && _exceptionable) && ((Array.isArray(input.sources) || _assertGuard_1._assertGuard(_exceptionable, {
753
+ method: "typia.assert",
754
+ path: _path + ".sources",
755
+ expected: "Array<ITtscGraphDump.ISourceDigest>",
756
+ value: input.sources
757
+ }, _errorFactory)) && input.sources.every((elem, _index22) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
758
+ method: "typia.assert",
759
+ path: _path + ".sources[" + _index22 + "]",
760
+ expected: "ITtscGraphDump.ISourceDigest",
761
+ value: elem
762
+ }, _errorFactory)) && _ao7(elem, _path + ".sources[" + _index22 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
763
+ method: "typia.assert",
764
+ path: _path + ".sources[" + _index22 + "]",
765
+ expected: "ITtscGraphDump.ISourceDigest",
766
+ value: elem
767
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
768
+ method: "typia.assert",
769
+ path: _path + ".sources",
770
+ expected: "Array<ITtscGraphDump.ISourceDigest>",
771
+ value: input.sources
772
+ }, _errorFactory));
773
+ const _ao20 = (input, _path, _exceptionable = true) => _ap30(input, _path, true && _exceptionable) && _ap11(input, _path, true && _exceptionable);
774
+ const _ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.tool || _assertGuard_1._assertGuard(_exceptionable, {
775
+ method: "typia.assert",
776
+ path: _path + ".tool",
777
+ expected: "string",
778
+ value: input.tool
779
+ }, _errorFactory)) && ("string" === typeof input.version || _assertGuard_1._assertGuard(_exceptionable, {
780
+ method: "typia.assert",
781
+ path: _path + ".version",
782
+ expected: "string",
783
+ value: input.version
784
+ }, _errorFactory)) && ("string" === typeof input.typescript || _assertGuard_1._assertGuard(_exceptionable, {
785
+ method: "typia.assert",
786
+ path: _path + ".typescript",
787
+ expected: "string",
788
+ value: input.typescript
789
+ }, _errorFactory));
790
+ const _ao4 = (input, _path, _exceptionable = true) => ((Array.isArray(input.configs) || _assertGuard_1._assertGuard(_exceptionable, {
791
+ method: "typia.assert",
792
+ path: _path + ".configs",
793
+ expected: "Array<ITtscGraphDump.IFileDigest>",
794
+ value: input.configs
795
+ }, _errorFactory)) && input.configs.every((elem, _index23) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
796
+ method: "typia.assert",
797
+ path: _path + ".configs[" + _index23 + "]",
798
+ expected: "ITtscGraphDump.IFileDigest",
799
+ value: elem
800
+ }, _errorFactory)) && _ao5(elem, _path + ".configs[" + _index23 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
801
+ method: "typia.assert",
802
+ path: _path + ".configs[" + _index23 + "]",
803
+ expected: "ITtscGraphDump.IFileDigest",
804
+ value: elem
805
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
806
+ method: "typia.assert",
807
+ path: _path + ".configs",
808
+ expected: "Array<ITtscGraphDump.IFileDigest>",
809
+ value: input.configs
810
+ }, _errorFactory)) && ((Array.isArray(input.roots) || _assertGuard_1._assertGuard(_exceptionable, {
811
+ method: "typia.assert",
812
+ path: _path + ".roots",
813
+ expected: "Array<ITtscGraphDump.IRootFile>",
814
+ value: input.roots
815
+ }, _errorFactory)) && input.roots.every((elem, _index24) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
816
+ method: "typia.assert",
817
+ path: _path + ".roots[" + _index24 + "]",
818
+ expected: "ITtscGraphDump.IRootFile",
819
+ value: elem
820
+ }, _errorFactory)) && _ao6(elem, _path + ".roots[" + _index24 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
821
+ method: "typia.assert",
822
+ path: _path + ".roots[" + _index24 + "]",
823
+ expected: "ITtscGraphDump.IRootFile",
824
+ value: elem
825
+ }, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
826
+ method: "typia.assert",
827
+ path: _path + ".roots",
828
+ expected: "Array<ITtscGraphDump.IRootFile>",
829
+ value: input.roots
830
+ }, _errorFactory));
831
+ const _ao5 = (input, _path, _exceptionable = true) => _ap10(input, _path, true && _exceptionable) && _ap11(input, _path, true && _exceptionable);
832
+ const _ao6 = (input, _path, _exceptionable = true) => ("string" === typeof input.config || _assertGuard_1._assertGuard(_exceptionable, {
833
+ method: "typia.assert",
834
+ path: _path + ".config",
835
+ expected: "string",
836
+ value: input.config
837
+ }, _errorFactory)) && _ap10(input, _path, true && _exceptionable);
838
+ const _ao7 = (input, _path, _exceptionable = true) => _ap10(input, _path, true && _exceptionable) && ("string" === typeof input.checkerDigest || _assertGuard_1._assertGuard(_exceptionable, {
839
+ method: "typia.assert",
840
+ path: _path + ".checkerDigest",
841
+ expected: "string",
842
+ value: input.checkerDigest
843
+ }, _errorFactory)) && ("string" === typeof input.diskDigest || _assertGuard_1._assertGuard(_exceptionable, {
844
+ method: "typia.assert",
845
+ path: _path + ".diskDigest",
846
+ expected: "string",
847
+ value: input.diskDigest
848
+ }, _errorFactory));
849
+ const _ao8 = (input, _path, _exceptionable = true) => _ap10(input, _path, true && _exceptionable) && ("number" === typeof input.line || _assertGuard_1._assertGuard(_exceptionable, {
850
+ method: "typia.assert",
851
+ path: _path + ".line",
852
+ expected: "number",
853
+ value: input.line
854
+ }, _errorFactory)) && ("number" === typeof input.column || _assertGuard_1._assertGuard(_exceptionable, {
855
+ method: "typia.assert",
856
+ path: _path + ".column",
857
+ expected: "number",
858
+ value: input.column
859
+ }, _errorFactory)) && ("number" === typeof input.code || _assertGuard_1._assertGuard(_exceptionable, {
860
+ method: "typia.assert",
861
+ path: _path + ".code",
862
+ expected: "number",
863
+ value: input.code
864
+ }, _errorFactory)) && ("error" === input.category || "warning" === input.category || _assertGuard_1._assertGuard(_exceptionable, {
865
+ method: "typia.assert",
866
+ path: _path + ".category",
867
+ expected: "(\"error\" | \"warning\")",
868
+ value: input.category
869
+ }, _errorFactory)) && ("string" === typeof input.message || _assertGuard_1._assertGuard(_exceptionable, {
870
+ method: "typia.assert",
871
+ path: _path + ".message",
872
+ expected: "string",
873
+ value: input.message
874
+ }, _errorFactory));
875
+ const _ao9 = (input, _path, _exceptionable = true) => _ap12(input, _path, true && _exceptionable) && _ap13(input, _path, true && _exceptionable) && _ap14(input, _path, true && _exceptionable) && _ap10(input, _path, true && _exceptionable) && _ap15(input, _path, true && _exceptionable) && _ap16(input, _path, true && _exceptionable) && _ap17(input, _path, true && _exceptionable) && _ap18(input, _path, true && _exceptionable) && _ap19(input, _path, true && _exceptionable) && _ap20(input, _path, true && _exceptionable) && _ap21(input, _path, true && _exceptionable) && _ap22(input, _path, true && _exceptionable) && _ap23(input, _path, true && _exceptionable) && _ap24(input, _path, true && _exceptionable) && _ap25(input, _path, true && _exceptionable) && _ap26(input, _path, true && _exceptionable) && _ap27(input, _path, true && _exceptionable) && _ap28(input, _path, true && _exceptionable) && _ap29(input, _path, true && _exceptionable);
876
+ const _io0 = input => "number" === typeof input.id && _ip0(input) && ("error" === input.mode || "incremental" === input.mode || "initial" === input.mode || "rebuild" === input.mode || "reload" === input.mode || "unchanged" === input.mode) && _ip1(input) && "boolean" === typeof input.changed && (undefined === input.dump || "object" === typeof input.dump && null !== input.dump && _io1(input.dump)) && (undefined === input.snapshot || "object" === typeof input.snapshot && null !== input.snapshot && _io17(input.snapshot)) && (undefined === input.error || "string" === typeof input.error);
877
+ const _io1 = input => _ip2(input) && _ip3(input) && ("object" === typeof input.provenance && null !== input.provenance && _io2(input.provenance)) && _ip4(input) && _ip5(input) && _ip6(input);
878
+ const _io10 = input => _ip13(input) && (undefined === input.value || "string" === typeof input.value);
879
+ const _io11 = input => _ip13(input) && ("method" === input.kind || "property" === input.kind) && (undefined === input.line || "number" === typeof input.line) && _ip25(input);
880
+ const _io12 = input => _ip13(input) && (Array.isArray(input.arguments) && input.arguments.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io13(elem)));
881
+ const _io13 = input => undefined === input.literal || "string" === typeof input.literal || "number" === typeof input.literal || "boolean" === typeof input.literal;
882
+ const _io14 = input => _ip13(input) && (undefined === input.text || "string" === typeof input.text);
883
+ const _io15 = input => (undefined === input.file || "string" === typeof input.file) && "number" === typeof input.startLine && (undefined === input.startCol || "number" === typeof input.startCol) && (undefined === input.endLine || "number" === typeof input.endLine) && (undefined === input.endCol || "number" === typeof input.endCol);
884
+ const _io16 = input => "string" === typeof input.from && "string" === typeof input.to && true === _iv2.has(input.kind) && _ip28(input);
885
+ const _io17 = input => _ip0(input) && _ip7(input) && _ip2(input) && _ip3(input) && _ip8(input) && _ip1(input) && _ip9(input) && "number" === typeof input.sequence && "string" === typeof input.generation && (undefined === input.baseSequence || "number" === typeof input.baseSequence) && (undefined === input.baseGeneration || "string" === typeof input.baseGeneration) && (Array.isArray(input.upserts) && input.upserts.every(elem => "object" === typeof elem && null !== elem && _io18(elem))) && (Array.isArray(input.deletes) && input.deletes.every(elem => "string" === typeof elem)) && (Array.isArray(input.manifest) && input.manifest.every(elem => "object" === typeof elem && null !== elem && _io20(elem)));
886
+ const _io18 = input => _ip11(input) && ("object" === typeof input.shard && null !== input.shard && _io19(input.shard));
887
+ const _io19 = input => _ip30(input) && (undefined === input.source || "object" === typeof input.source && null !== input.source && _io7(input.source)) && (undefined === input.config || "object" === typeof input.config && null !== input.config && _io5(input.config)) && _ip5(input) && _ip6(input) && _ip4(input);
888
+ const _io2 = input => _ip7(input) && _ip1(input) && _ip8(input) && (undefined === input.artifactProducer || "object" === typeof input.artifactProducer && null !== input.artifactProducer && _io3(input.artifactProducer)) && _ip9(input) && (Array.isArray(input.sources) && input.sources.every(elem => "object" === typeof elem && null !== elem && _io7(elem)));
889
+ const _io20 = input => _ip30(input) && _ip11(input);
890
+ const _io3 = input => "string" === typeof input.tool && "string" === typeof input.version && "string" === typeof input.typescript;
891
+ const _io4 = input => Array.isArray(input.configs) && input.configs.every(elem => "object" === typeof elem && null !== elem && _io5(elem)) && (Array.isArray(input.roots) && input.roots.every(elem => "object" === typeof elem && null !== elem && _io6(elem)));
892
+ const _io5 = input => _ip10(input) && _ip11(input);
893
+ const _io6 = input => "string" === typeof input.config && _ip10(input);
894
+ const _io7 = input => _ip10(input) && "string" === typeof input.checkerDigest && "string" === typeof input.diskDigest;
895
+ const _io8 = input => _ip10(input) && "number" === typeof input.line && "number" === typeof input.column && "number" === typeof input.code && ("error" === input.category || "warning" === input.category) && "string" === typeof input.message;
896
+ const _io9 = input => _ip12(input) && _ip13(input) && _ip14(input) && _ip10(input) && _ip15(input) && _ip16(input) && _ip17(input) && _ip18(input) && _ip19(input) && _ip20(input) && _ip21(input) && _ip22(input) && _ip23(input) && _ip24(input) && _ip25(input) && _ip26(input) && _ip27(input) && _ip28(input) && _ip29(input);
897
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
898
+ let _errorFactory;
899
+ return (input, errorFactory) => {
900
+ if (false === __is(input)) {
901
+ _errorFactory = errorFactory;
902
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard_1._assertGuard(true, {
903
+ method: "typia.assert",
904
+ path: _path + "",
905
+ expected: "ITtscGraphSnapshot",
906
+ value: input
907
+ }, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard_1._assertGuard(true, {
908
+ method: "typia.assert",
909
+ path: _path + "",
910
+ expected: "ITtscGraphSnapshot",
911
+ value: input
912
+ }, _errorFactory))(input, "$input", true);
913
+ }
914
+ return input;
915
+ };
916
+ })()(parsed);
917
+ }
918
+ catch (error) {
919
+ throw new Error(`@ttsc/graph: native session returned an unreadable response: ${asError(error).message}`);
920
+ }
921
+ return response;
922
+ }
923
+ TtscGraphProtocol.decode = decode;
924
+ })(TtscGraphProtocol || (exports.TtscGraphProtocol = TtscGraphProtocol = {}));
925
+ function asError(error) {
926
+ return error instanceof Error ? error : new Error(String(error));
927
+ }
928
+ //# sourceMappingURL=TtscGraphProtocol.js.map