@ttsc/graph 0.30.4 → 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
@@ -9,6 +9,15 @@ import { ITtscGraphDump } from "./ITtscGraphDump";
9
9
  * checks them; `TtscGraphSession` validates every frame against this shape
10
10
  * rather than casting it, so a drift surfaces as a precise error on the first
11
11
  * frame instead of an `undefined` several layers downstream.
12
+ *
13
+ * @evidence contracts/common.md#principled-implementation Request identity, independent protocol version and changed/error state qualify the optional full dump or shard transaction.
14
+ * @evidence contracts/common.md#clear-and-simple-design One transport envelope keeps response routing and computation mode outside the content payload.
15
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Mode is a producer report rather than a guessed interpretation of generation counters.
16
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs explain hand-maintained wire synchronization, version independence and error/changed payload semantics.
17
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
18
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
19
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
20
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
12
21
  */
13
22
  export interface ITtscGraphSnapshot {
14
23
  /** Echoes the request's id, so a response finds its caller. */
@@ -52,41 +61,138 @@ export interface ITtscGraphSnapshot {
52
61
  }
53
62
 
54
63
  export namespace ITtscGraphSnapshot {
55
- /** Versioned content-addressed transaction emitted by `ttscgraph serve`. */
64
+ /**
65
+ * Versioned content-addressed transaction emitted by `ttscgraph serve`.
66
+ *
67
+ * Sequence and generation name this commit and its optional preceding base.
68
+ * The complete manifest describes the resulting shard set; upserts and
69
+ * deletes specify the change needed to reach it.
70
+ *
71
+ * @evidence contracts/common.md#principled-implementation Base coordinates and a complete digest manifest permit atomic validation of a delta against its preceding generation.
72
+ * @evidence contracts/common.md#clear-and-simple-design Transaction metadata and three shard-change collections separate generation authority from fact storage.
73
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A delta cannot silently substitute an unrelated generation; its claimed base is explicit.
74
+ * @evidence contracts/common.md#meaningful-documentation Native prose explains base and manifest semantics, and member comments distinguish versions, generation coordinates and payload populations.
75
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
76
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
77
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
78
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
79
+ */
56
80
  export interface ITransaction {
81
+ /** Shard transaction protocol version. */
57
82
  protocolVersion: number;
83
+
84
+ /** Schema version of the graph facts inside the shards. */
58
85
  schemaVersion: number;
86
+
87
+ /** Producer-local absolute project locator. */
59
88
  project: string;
89
+
90
+ /** Configuration coordinate in the dump path vocabulary. */
60
91
  tsconfig: string;
92
+
93
+ /** Native binary and checker that produced the transaction. */
61
94
  producer: ITtscGraphDump.IProducer;
95
+
96
+ /** Evidence capabilities reported for this generation. */
62
97
  capabilities: string[];
98
+
99
+ /** Complete configuration and root membership inputs. */
63
100
  universe: ITtscGraphDump.IUniverse;
101
+
102
+ /** Positive consecutive transaction number within the resident session. */
64
103
  sequence: number;
104
+
105
+ /** Content-derived identity of the resulting generation. */
65
106
  generation: string;
107
+
108
+ /** Preceding transaction number, absent on the initial complete frame. */
66
109
  baseSequence?: number;
110
+
111
+ /** Preceding generation identity, absent on the initial complete frame. */
67
112
  baseGeneration?: string;
113
+
114
+ /** New or changed shard contents, qualified by their digest. */
68
115
  upserts: IShardUpsert[];
116
+
117
+ /** Keys removed from the preceding committed generation. */
69
118
  deletes: string[];
119
+
120
+ /** Complete key/digest set after applying this transaction. */
70
121
  manifest: IShardReference[];
71
122
  }
72
123
 
124
+ /**
125
+ * One replacement shard and the digest used to verify its contents.
126
+ *
127
+ * @evidence contracts/common.md#principled-implementation Pairing content with its digest lets the receiver reject a changed or incorrectly labeled shard.
128
+ * @evidence contracts/common.md#clear-and-simple-design The upsert contains only the payload and its content witness.
129
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The digest qualifies actual content rather than a filename or timestamp proxy.
130
+ * @evidence contracts/common.md#meaningful-documentation Native member comments distinguish content witness from the replacement payload.
131
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
132
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
133
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
134
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
135
+ */
73
136
  export interface IShardUpsert {
137
+ /** Hex SHA-256 of the canonical Go JSON shard representation. */
74
138
  digest: string;
139
+
140
+ /** Complete replacement contents for the shard key inside this payload. */
75
141
  shard: IShard;
76
142
  }
77
143
 
144
+ /**
145
+ * A shard's membership and content identity in a generation manifest.
146
+ *
147
+ * @evidence contracts/common.md#principled-implementation Key and digest identify one retained shard version without requiring its content to be resent.
148
+ * @evidence contracts/common.md#clear-and-simple-design The manifest reference stays distinct from an upsert because unchanged entries have no payload.
149
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A retained entry is identified by content digest rather than assumed unchanged from its key alone.
150
+ * @evidence contracts/common.md#meaningful-documentation Native comments explain membership key and canonical-content digest.
151
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
152
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
153
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
154
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
155
+ */
78
156
  export interface IShardReference {
157
+ /** Logical shard ownership key. */
79
158
  key: string;
159
+
160
+ /** Hex SHA-256 of the canonical Go JSON shard representation. */
80
161
  digest: string;
81
162
  }
82
163
 
83
- /** One source/config or metadata-owned raw compiler fact shard. */
164
+ /**
165
+ * One source/config or metadata-owned raw compiler fact shard.
166
+ *
167
+ * Source and config attribution are mutually exclusive. With neither, this is
168
+ * the metadata shard for external leaves and published artifacts.
169
+ *
170
+ * @evidence contracts/common.md#principled-implementation Key plus optional input attribution defines ownership of the node, edge and diagnostic arrays validated by the shard store.
171
+ * @evidence contracts/common.md#clear-and-simple-design One shard carries complete owner-local facts while the transaction controls cross-shard membership.
172
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Metadata ownership cannot be used to hide authored declarations from source attribution checks.
173
+ * @evidence contracts/common.md#meaningful-documentation Native prose explains mutually exclusive source/config attribution and the separate metadata role; members identify each fact population.
174
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
175
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
176
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
177
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
178
+ */
84
179
  export interface IShard {
180
+ /** Ownership coordinate shared with the generation manifest. */
85
181
  key: string;
182
+
183
+ /** Source-byte witnesses when one compiler source owns this shard. */
86
184
  source?: ITtscGraphDump.ISourceDigest;
185
+
186
+ /** Configuration-byte witness when a build configuration owns this shard. */
87
187
  config?: ITtscGraphDump.IFileDigest;
188
+
189
+ /** Raw native nodes owned by this source or metadata shard. */
88
190
  nodes: ITtscGraphDump.INode[];
191
+
192
+ /** Raw native edges whose source node this source shard owns. */
89
193
  edges: ITtscGraphDump.IEdge[];
194
+
195
+ /** Compiler findings attributed to the shard's input or metadata. */
90
196
  diagnostics: ITtscGraphDump.IDiagnostic[];
91
197
  }
92
198
 
@@ -99,6 +205,15 @@ export namespace ITtscGraphSnapshot {
99
205
  * - `incremental`: edits applied onto the reused resident program.
100
206
  * - `rebuild`: edits applied, but graph projection required a complete build.
101
207
  * - `error`: no snapshot was produced.
208
+ *
209
+ * @evidence contracts/common.md#principled-implementation Literal computation modes preserve the producer's distinction between reuse, updates, full reloads and failure.
210
+ * @evidence contracts/common.md#clear-and-simple-design One shared union types mode reports independently of payload availability.
211
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The client cannot rename a rebuild incremental solely to claim better performance.
212
+ * @evidence contracts/common.md#meaningful-documentation Each mode's native bullet explains the producer event and whether a new snapshot exists.
213
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
214
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
215
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
216
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
102
217
  */
103
218
  export type Mode =
104
219
  | "initial"
@@ -11,6 +11,15 @@
11
11
  * the graph engine and the MCP results see is the whole
12
12
  * {@link ITtscGraphEvidence}. This shape exists only between the Go builder and
13
13
  * the loader.
14
+ *
15
+ * @evidence contracts/common.md#principled-implementation One-based coordinates and an optional non-derivable file preserve exact wire spans with reconstructible ordinary paths omitted.
16
+ * @evidence contracts/common.md#clear-and-simple-design The compact wire shape stays separate from the fully qualified memory evidence shape.
17
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Cross-file implementations retain their explicit file instead of being forced into the owner's path.
18
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs explain reconstruction ownership and member comments state coordinate units and file absence semantics.
19
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
20
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
21
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
22
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
14
23
  */
15
24
  export interface ITtscGraphSpan {
16
25
  /**
@@ -1,6 +1,17 @@
1
1
  import { ITtscGraphDecorator } from "./ITtscGraphDecorator";
2
2
 
3
- /** Answer-ready, source-free tour evidence for broad code-flow questions. */
3
+ /**
4
+ * Answer-ready, source-free tour evidence for broad code-flow questions.
5
+ *
6
+ * @evidence contracts/common.md#principled-implementation Separate seeds, graph flows and citation collections express a selected index tour without claiming complete runtime execution.
7
+ * @evidence contracts/common.md#clear-and-simple-design Each tour facet has one collection; shared coordinates avoid embedding source bodies.
8
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Truncation reports omitted extras rather than hiding a cutoff to improve tool-call metrics.
9
+ * @evidence contracts/common.md#meaningful-documentation Native comments distinguish flow facts, nearby/test anchors and citation-only answer anchors.
10
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
11
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
12
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
13
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
14
+ */
4
15
  export interface ITtscGraphTour {
5
16
  /** Discriminator for code-tour indexing. */
6
17
  type: "tour";
@@ -28,8 +39,17 @@ export namespace ITtscGraphTour {
28
39
  /**
29
40
  * A broad code tour: entrypoints, primary flow, nearby paths, and tests.
30
41
  *
31
- * It asks for no question of its own — it ranks against the `question` the
32
- * caller has already written, in the user's words.
42
+ * It uses the outer question for explicit handles and the caller's symbol
43
+ * reinterpretations for identifier alignment, alongside graph centrality.
44
+ *
45
+ * @evidence contracts/common.md#principled-implementation Reinterpretations supply resolved candidate handles and identifier alignment; the outer question supplies explicit mentions, and optional limits select entries.
46
+ * @evidence contracts/common.md#clear-and-simple-design Caller-supplied symbol guesses remain distinct from the outer question rather than being merged into another prose query.
47
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts An empty guess list is supported; unknown or ambiguous guesses do not fabricate seeds.
48
+ * @evidence contracts/common.md#meaningful-documentation Separate member paragraphs explain guesses, empty input, seed allocation and defaults rather than requiring repository reconnaissance.
49
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
50
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
51
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
52
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
33
53
  */
34
54
  export interface IRequest {
35
55
  /** Discriminator for code-tour indexing. */
@@ -63,8 +83,9 @@ export namespace ITtscGraphTour {
63
83
  reinterpretations: string[];
64
84
 
65
85
  /**
66
- * Central entrypoints to seed the tour. Raise only when the question names
67
- * several public paths that must all appear in one answer.
86
+ * Central entrypoints to seed the tour, from 1 to 5. The default is the
87
+ * maximum, so a larger value changes nothing and a smaller one narrows the
88
+ * tour.
68
89
  *
69
90
  * @default 5
70
91
  */
@@ -78,7 +99,18 @@ export namespace ITtscGraphTour {
78
99
  includeTests?: boolean;
79
100
  }
80
101
 
81
- /** A compact symbol coordinate for a tour. */
102
+ /**
103
+ * A compact symbol coordinate for a tour.
104
+ *
105
+ * @evidence contracts/common.md#principled-implementation Stable identity, coordinates and optional declaration facts describe a selected symbol without implementation bodies.
106
+ * @evidence contracts/common.md#clear-and-simple-design One compact node is reused by entrypoints and flow starts.
107
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Optional documentation remains a declaration fact rather than an inferred purpose from naming.
108
+ * @evidence contracts/common.md#meaningful-documentation Member comments explain one-based coordinates, declaration heads and the first doc sentence's role.
109
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
110
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
111
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
112
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
113
+ */
82
114
  export interface INode {
83
115
  /** Stable node id for later graph calls. */
84
116
  id: string;
@@ -112,7 +144,18 @@ export namespace ITtscGraphTour {
112
144
  decorators?: ITtscGraphDecorator[];
113
145
  }
114
146
 
115
- /** A primary flow slice from one selected entrypoint. */
147
+ /**
148
+ * A primary flow slice from one selected entrypoint.
149
+ *
150
+ * @evidence contracts/common.md#principled-implementation Start, ordered edge summaries and reached handles distinguish a selected flow slice from a complete call graph.
151
+ * @evidence contracts/common.md#clear-and-simple-design Prose steps serve display while reached records supply actionable identities without parsing that prose.
152
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A truncation flag reports omitted steps; summaries cannot invent bridges between unrelated seeds.
153
+ * @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain why reached handles accompany step text and what truncation means.
154
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
155
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
156
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
157
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
158
+ */
116
159
  export interface IFlow {
117
160
  /** Flow start node. */
118
161
  start: ITtscGraphTour.INode;
@@ -142,6 +185,15 @@ export namespace ITtscGraphTour {
142
185
  * three times. Across the benchmark corpus that repetition was 15% of every
143
186
  * tour, and a tour is re-sent whole on every turn of the conversation it
144
187
  * opened.
188
+ *
189
+ * @evidence contracts/common.md#principled-implementation Stable id preserves file and kind coordinates; name and optional line add presentation without losing follow-up identity.
190
+ * @evidence contracts/common.md#clear-and-simple-design The reached record omits coordinates already carried in the id instead of copying the full tour node.
191
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Compacting retains the actual node id rather than substituting abbreviated names.
192
+ * @evidence contracts/common.md#meaningful-documentation Native comments explain id grammar and one-based line units, separated from acknowledgments.
193
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
194
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
195
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
196
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
145
197
  */
146
198
  export interface IReached {
147
199
  /** Stable node id for later graph calls: `file#Qualified.Name:kind`. */
@@ -154,7 +206,18 @@ export namespace ITtscGraphTour {
154
206
  line?: number;
155
207
  }
156
208
 
157
- /** A file/line citation chosen by the graph, not source body text. */
209
+ /**
210
+ * A file/line citation chosen by the graph, not source body text.
211
+ *
212
+ * @evidence contracts/common.md#principled-implementation Required file/start line ground a citation; optional identity and kind allow node and edge anchors in one representation.
213
+ * @evidence contracts/common.md#clear-and-simple-design Reason and coordinates are sufficient to present an anchor without carrying the referenced body.
214
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Missing node identity is represented as optional rather than fabricated for non-node citations.
215
+ * @evidence contracts/common.md#meaningful-documentation Member comments explain node-dependent optional fields, citation purpose and one-based endpoints.
216
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
217
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
218
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
219
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
220
+ */
158
221
  export interface IAnchor {
159
222
  /** Why this anchor matters in the tour. */
160
223
  reason: string;
@@ -178,7 +241,18 @@ export namespace ITtscGraphTour {
178
241
  endLine?: number;
179
242
  }
180
243
 
181
- /** Source coordinates without source text. */
244
+ /**
245
+ * Source coordinates without source text.
246
+ *
247
+ * @evidence contracts/common.md#principled-implementation File and one-based endpoints express the available source range without attaching source bytes.
248
+ * @evidence contracts/common.md#clear-and-simple-design Three fields carry only the citation range needed by tour nodes.
249
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown end lines stay absent instead of being guessed from another declaration.
250
+ * @evidence contracts/common.md#meaningful-documentation Native comments state project-relative file spelling and optional endpoint meaning.
251
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
252
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
253
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
254
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
255
+ */
182
256
  export interface ISpan {
183
257
  /** Project-relative file. */
184
258
  file: string;
@@ -1,6 +1,17 @@
1
1
  import { ITtscGraphEvidence } from "./ITtscGraphEvidence";
2
2
 
3
- /** The compact dependency or caller flow returned from a selected start symbol. */
3
+ /**
4
+ * The compact dependency or caller flow returned from a selected start symbol.
5
+ *
6
+ * @evidence contracts/common.md#principled-implementation Start, reached nodes, hops and optional target/path distinguish open traversal from requested-path outcomes and ambiguity.
7
+ * @evidence contracts/common.md#clear-and-simple-design Optional path and junction facets extend one trace result without disguising a shared junction as a path.
8
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Unreachable paths remain empty and ambiguity retains candidates rather than invented execution edges.
9
+ * @evidence contracts/common.md#meaningful-documentation Native comments explain breadth-first order, truncation, unreachable paths and the difference between a junction and a call path.
10
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
11
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
12
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
13
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
14
+ */
4
15
  export interface ITtscGraphTrace {
5
16
  /** Discriminator for dependency tracing. */
6
17
  type: "trace";
@@ -14,10 +25,10 @@ export interface ITtscGraphTrace {
14
25
  /** Edges traversed, in breadth-first order. */
15
26
  hops: ITtscGraphTrace.IHop[];
16
27
 
17
- /** Unique nodes reached (excluding the start), each with its depth and roles. */
28
+ /** Unique nodes reached (excluding the start), each with its depth, and its roles on an impact trace. */
18
29
  reached: ITtscGraphTrace.INode[];
19
30
 
20
- /** In an open trace, true when a bound omitted an eligible node or hop. */
31
+ /** True when an open walk omitted an eligible node or hop, or an unsuccessful path search stopped on a depth or dispatch bound. */
21
32
  truncated: boolean;
22
33
 
23
34
  /** The resolved `to` target, when a path was requested. */
@@ -29,11 +40,12 @@ export interface ITtscGraphTrace {
29
40
  */
30
41
  path?: ITtscGraphTrace.INode[];
31
42
 
32
- /** Compact hop summaries preserving node names and edge evidence, capped. */
43
+ /** Hop summaries preserving names and evidence. First twelve by default; every returned hop with `complete: true`. */
33
44
  steps?: string[];
34
45
 
35
46
  /**
36
- * Symbols both ends touch, when no call path runs between them.
47
+ * Up to four ranked symbols both ends touch, when no call path runs between
48
+ * them. This diagnostic summary does not change path-search completeness.
37
49
  *
38
50
  * Nothing calls across the gap because in an event-driven codebase nothing
39
51
  * does: a handler registers a listener on an emitter, the emitter's `emit()`
@@ -52,7 +64,18 @@ export interface ITtscGraphTrace {
52
64
  candidates?: ITtscGraphTrace.INode[];
53
65
  }
54
66
  export namespace ITtscGraphTrace {
55
- /** A symbol both ends of an unreachable path touch, and how each touches it. */
67
+ /**
68
+ * A symbol both ends of an unreachable path touch, and how each touches it.
69
+ *
70
+ * @evidence contracts/common.md#principled-implementation A resolved shared node and two directional edge descriptions establish contact, not an execution bridge.
71
+ * @evidence contracts/common.md#clear-and-simple-design The record pairs each endpoint's relationship with one common symbol coordinate.
72
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Shared references do not become guessed callbacks or synthetic calls.
73
+ * @evidence contracts/common.md#meaningful-documentation Native members explain stable follow-up identity and which endpoint each edge describes.
74
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
75
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
76
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
77
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
78
+ */
56
79
  export interface IJunction {
57
80
  /** Stable node id: trace or inspect this symbol to cross the seam. */
58
81
  id: string;
@@ -76,7 +99,18 @@ export namespace ITtscGraphTrace {
76
99
  fromTarget: IJunctionEdge;
77
100
  }
78
101
 
79
- /** One edge between an end of the requested path and the junction. */
102
+ /**
103
+ * One edge between an end of the requested path and the junction.
104
+ *
105
+ * @evidence contracts/common.md#principled-implementation Relation kind and outgoing distinguish endpoint-to-junction from junction-to-endpoint, with optional source evidence.
106
+ * @evidence contracts/common.md#clear-and-simple-design Three fields retain the direction and cause needed beside an already identified junction.
107
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The relation is the graph edge's kind, not a guessed event-flow label.
108
+ * @evidence contracts/common.md#meaningful-documentation Native comments explain the directional boolean and evidence coordinates beside separate members.
109
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
110
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
111
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
112
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
113
+ */
80
114
  export interface IJunctionEdge {
81
115
  /** `calls`, `accesses`, `instantiates`, `type_ref`, ... */
82
116
  kind: string;
@@ -88,7 +122,18 @@ export namespace ITtscGraphTrace {
88
122
  evidence?: ITtscGraphEvidence;
89
123
  }
90
124
 
91
- /** Where and how far to trace dependency flow. */
125
+ /**
126
+ * Where and how far to trace dependency flow.
127
+ *
128
+ * @evidence contracts/common.md#principled-implementation Handles, direction, edge family and depth/node bounds specify graph traversal rather than inferring execution from text.
129
+ * @evidence contracts/common.md#clear-and-simple-design Optional target selects path mode within the same traversal request; orthogonal options govern the inspected population.
130
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts External inclusion and bounds are supported request choices, not agent-specific throttles.
131
+ * @evidence contracts/common.md#meaningful-documentation Separate member paragraphs explain ambiguity, path preference, direction/focus unions, bounds and defaults.
132
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
133
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
134
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
135
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
136
+ */
92
137
  export interface IRequest {
93
138
  /** Discriminator for dependency tracing. */
94
139
  type: "trace";
@@ -135,15 +180,34 @@ export namespace ITtscGraphTrace {
135
180
  focus?: "all" | "execution" | "types";
136
181
 
137
182
  /**
138
- * Hops deep to follow (open forward/reverse cap at 8, impact at 4, path
139
- * mode at 12). Raise it to follow a runtime chain to its end in one call.
183
+ * Exhaust the finite graph admitted by direction, focus and external-node
184
+ * policy, including every eligible dispatch relation. Overrides maxDepth,
185
+ * maxNodes, hop budgets and limits on hop summaries. Path mode returns one shortest path.
186
+ *
187
+ * Output and synchronous traversal can grow with the entire graph; there is
188
+ * no per-request cancellation or fixed response-size bound. Resource or
189
+ * transport failures fail the request rather than return partial success.
190
+ *
191
+ * @default false
192
+ */
193
+ complete?: boolean;
194
+
195
+ /**
196
+ * Hops deep to follow. Positive finite values have no upper clamp and are
197
+ * rounded down; invalid or omitted values use 3 (12 in path mode).
198
+ * Values below one become one. Ignored with complete true.
140
199
  *
141
200
  * @default 3
142
201
  */
143
202
  maxDepth?: number;
144
203
 
145
204
  /**
146
- * Cap on reached nodes (open forward/reverse cap at 32, impact at 16).
205
+ * Cap on unique reached nodes, excluding the start. Positive finite values
206
+ * have no upper clamp and are rounded down; invalid or omitted values use
207
+ * 12. Values below one become one. Open walks also limit hops to twice this
208
+ * budget and withhold dispatch fanouts of twelve or more implementations.
209
+ * Use complete true to remove every traversal budget. Path mode ignores
210
+ * maxNodes.
147
211
  *
148
212
  * @default 12
149
213
  */
@@ -158,7 +222,18 @@ export namespace ITtscGraphTrace {
158
222
  includeExternal?: boolean;
159
223
  }
160
224
 
161
- /** One traversed edge, with its depth from the start. */
225
+ /**
226
+ * One traversed edge, with its depth from the start.
227
+ *
228
+ * @evidence contracts/common.md#principled-implementation Original endpoints and kind preserve the graph edge; depth records traversal distance rather than altering relation identity.
229
+ * @evidence contracts/common.md#clear-and-simple-design A hop adds depth and optional coordinates without embedding endpoint nodes.
230
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Source evidence refers to the actual edge rather than a generated path explanation.
231
+ * @evidence contracts/common.md#meaningful-documentation Member comments identify depth units and distinguish source and target ids.
232
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
233
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
234
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
235
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
236
+ */
162
237
  export interface IHop {
163
238
  /** Source node id for this traversed edge. */
164
239
  from: string;
@@ -176,7 +251,18 @@ export namespace ITtscGraphTrace {
176
251
  evidence?: ITtscGraphEvidence;
177
252
  }
178
253
 
179
- /** A node on the trace: the start, a reached node, or a candidate. */
254
+ /**
255
+ * A node on the trace: the start, a reached node, or a candidate.
256
+ *
257
+ * @evidence contracts/common.md#principled-implementation Stable coordinates identify every trace node while optional depth, signature and roles represent facts applicable to particular trace positions.
258
+ * @evidence contracts/common.md#clear-and-simple-design One coordinate record serves starts, candidates and reached nodes instead of duplicating nearly identical shapes.
259
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Candidate identities remain distinct; role text describes graph selection rather than certainty about a user's question.
260
+ * @evidence contracts/common.md#meaningful-documentation Native comments specify optional facts' contexts and one-based source coordinates with separated member documentation.
261
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
262
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
263
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
264
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
265
+ */
180
266
  export interface INode {
181
267
  /** Stable node id for subsequent graph calls. */
182
268
  id: string;
@@ -202,7 +288,7 @@ export namespace ITtscGraphTrace {
202
288
  /** The node's signature, carried on path nodes so the path explains itself. */
203
289
  signature?: string;
204
290
 
205
- /** Why this node matters to an impact trace: `exported`, `test`. */
291
+ /** Why this node matters to an impact trace: `exported` (a compiler fact) or `test` (assigned by the server from a conventional test path, not by the compiler). */
206
292
  roles?: string[];
207
293
  }
208
294
  }
@@ -0,0 +1,25 @@
1
+ import { RawEdge } from "./RawEdge";
2
+ import { RawNode } from "./RawNode";
3
+
4
+ /**
5
+ * Minimal graph dump accepted by the pure viewer projection.
6
+ *
7
+ * @evidence contracts/common.md#principled-implementation Node and edge arrays carry the complete input population while optional project preserves legacy dump compatibility.
8
+ * @evidence contracts/common.md#clear-and-simple-design The projection boundary omits provenance validation owned by parseDump and direct producer consumers.
9
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Reduction does not treat this minimal structural type as proof of compiler correctness.
10
+ * @evidence contracts/common.md#meaningful-documentation Native members explain input populations and optional project label.
11
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
12
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
13
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
14
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
15
+ */
16
+ export interface RawDump {
17
+ /** Project locator or display label, absent on older inputs. */
18
+ project?: string;
19
+
20
+ /** All nodes available before viewer selection. */
21
+ nodes: RawNode[];
22
+
23
+ /** All directed edges before endpoint selection. */
24
+ edges: RawEdge[];
25
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Directed native relationship before viewer display-family grouping.
3
+ *
4
+ * @evidence contracts/common.md#principled-implementation From/to ids and native kind retain relation direction without carrying duplicate node payloads.
5
+ * @evidence contracts/common.md#clear-and-simple-design Three fields suffice for filtering, degree calculation and display grouping.
6
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Endpoints remain producer identities rather than shortened display-name guesses.
7
+ * @evidence contracts/common.md#meaningful-documentation Native member comments distinguish directed ids from the ungrouped relationship kind.
8
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
9
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
10
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
11
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
12
+ */
13
+ export interface RawEdge {
14
+ /** Native source node identity. */
15
+ from: string;
16
+
17
+ /** Native target node identity. */
18
+ to: string;
19
+
20
+ /** Producer relationship category before display-family mapping. */
21
+ kind: string;
22
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Minimal native node facts consumed by the viewer reduction.
3
+ *
4
+ * @evidence contracts/common.md#principled-implementation Stable id and declaration coordinates preserve node identity; optional external/ignored flags permit older dumps without inventing provenance.
5
+ * @evidence contracts/common.md#clear-and-simple-design The reducer accepts only the wire facts it needs rather than the complete MCP node model.
6
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Authored selection uses producer boundary flags instead of named consumer fixtures.
7
+ * @evidence contracts/common.md#meaningful-documentation Native member comments document portable coordinates and optional producer flags.
8
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
9
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
10
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
11
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
12
+ */
13
+ export interface RawNode {
14
+ /** Position-invariant native identity or a published artifact address. */
15
+ id: string;
16
+
17
+ /** Producer's display name. */
18
+ name: string;
19
+
20
+ /** Native declaration or artifact category. */
21
+ kind: string;
22
+
23
+ /** Portable dump coordinate, or a legacy native path. */
24
+ file: string;
25
+
26
+ /** Dependency-boundary declaration when reported by the producer. */
27
+ external?: boolean;
28
+
29
+ /** Git-ignored generated source when reported by the producer. */
30
+ ignored?: boolean;
31
+ }
@@ -29,6 +29,15 @@ export const TTSC_GRAPH_ARTIFACT_NODE_KINDS = [
29
29
  * {@link TtscGraphNodeId} assumes: a Prisma address carries no path because a
30
30
  * model name is unique across the schema folder, and an operation has no file
31
31
  * at all.
32
+ *
33
+ * @evidence contracts/common.md#principled-implementation Membership in the declared artifact-kind vocabulary distinguishes non-TypeScript addresses before symbol-id parsing.
34
+ * @evidence contracts/common.md#clear-and-simple-design The predicate shares the exported kind list instead of maintaining a second classification switch.
35
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The check concerns semantic kinds, not heuristics about address punctuation or fixture paths.
36
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs explain why artifact identities cannot use the TypeScript id parser.
37
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources returns a boolean and retains nothing.
38
+ * @evidenceExclude contracts/performance.md#efficient-algorithms one includes test over six constant kinds.
39
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work pure per-call work with no cache, so there is nothing to share or invalidate.
40
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation tests a kind name, which is not a path.
32
41
  */
33
42
  export function isArtifactNodeKind(kind: string): boolean {
34
43
  return (TTSC_GRAPH_ARTIFACT_NODE_KINDS as readonly string[]).includes(kind);