@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
@@ -5,7 +5,18 @@ exports.isDeclarationFile = isDeclarationFile;
5
5
  exports.isSupportPath = isSupportPath;
6
6
  exports.isTestPath = isTestPath;
7
7
  exports.isPublicApiNoisePath = isPublicApiNoisePath;
8
- /** True for dependency declarations outside the authored project graph. */
8
+ /**
9
+ * True for dependency declarations outside the authored project graph.
10
+ *
11
+ * @evidence contracts/common.md#principled-implementation Producer external status, bundled coordinates and node_modules path segments identify dependency boundaries in the graph's portable vocabulary.
12
+ * @evidence contracts/common.md#clear-and-simple-design One predicate owns external selection for projections.
13
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Selection follows provenance and dependency coordinates rather than named repositories.
14
+ * @evidence contracts/common.md#meaningful-documentation The native headline states dependency-boundary meaning; the predicate uses portable graph coordinates rather than native paths.
15
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources returns a boolean and retains nothing.
16
+ * @evidenceExclude contracts/performance.md#efficient-algorithms one flag read and two string tests on a single coordinate.
17
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work pure per-call work with no cache, so there is nothing to share or invalidate.
18
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation classifies a slash-normalized coordinate string from the dump and never touches the filesystem.
19
+ */
9
20
  function isExternalNode(node) {
10
21
  return (node.external ||
11
22
  node.file.startsWith("bundled://") ||
@@ -15,11 +26,34 @@ function isExternalNode(node) {
15
26
  * True for a `.d.ts` declaration file. Every declaration such a file holds is
16
27
  * ambient by construction, so none of them carries a body the graph can walk
17
28
  * into, whether or not the `declare` keyword is written out.
29
+ *
30
+ * @evidence contracts/common.md#principled-implementation The declaration-file suffix recognizes d.ts, d.cts and d.mts ambient files under TypeScript's supported filename conventions.
31
+ * @evidence contracts/common.md#clear-and-simple-design One suffix predicate is reused by body and support-file policies.
32
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Ambient status is not guessed from fixture names or missing written declare keywords.
33
+ * @evidence contracts/common.md#meaningful-documentation Native prose explains why ambient declarations are bodyless regardless of modifier spelling.
34
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources returns a boolean and retains nothing.
35
+ * @evidenceExclude contracts/performance.md#efficient-algorithms one suffix test on a single coordinate.
36
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work pure per-call work with no cache, so there is nothing to share or invalidate.
37
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation tests the suffix of a coordinate string and never touches the filesystem.
18
38
  */
19
39
  function isDeclarationFile(file) {
20
40
  return /\.d\.[cm]?ts$/.test(file);
21
41
  }
22
- /** True for tests, examples, fixtures, generated output, and build artifacts. */
42
+ /**
43
+ * True for conventional tests, examples, fixtures, generated output and builds.
44
+ *
45
+ * This is a projection heuristic over portable graph coordinates, not proof
46
+ * that a source is generated or a package's manifest classification.
47
+ *
48
+ * @evidence contracts/common.md#principled-implementation Segment and suffix conventions select likely support material; declaration-file and dependency checks share the established coordinate vocabulary.
49
+ * @evidence contracts/common.md#clear-and-simple-design One policy combines conventional support categories for rankers rather than duplicating regexes in each runner.
50
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The heuristic uses general path categories and does not hardcode benchmark repositories or expected symbols.
51
+ * @evidence contracts/common.md#meaningful-documentation Native prose states heuristic status and its provenance limitation rather than certifying generated source from naming.
52
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources returns a boolean and retains nothing.
53
+ * @evidenceExclude contracts/performance.md#efficient-algorithms a fixed handful of string and pattern tests on a single coordinate.
54
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work pure per-call work with no cache, so there is nothing to share or invalidate.
55
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation classifies a slash-normalized coordinate string from the dump and never touches the filesystem.
56
+ */
23
57
  function isSupportPath(file) {
24
58
  return (file === "" ||
25
59
  file.startsWith("bundled://") ||
@@ -30,12 +64,40 @@ function isSupportPath(file) {
30
64
  isDeclarationFile(file) ||
31
65
  /(^|\/)(dist|build|coverage|generated|__generated__)\//.test(file));
32
66
  }
33
- /** True for source files whose declarations are tests or test helpers. */
67
+ /**
68
+ * True for conventional test-directory or test/spec-suffixed source paths.
69
+ *
70
+ * This identifies likely test anchors by path convention; it does not execute
71
+ * tests or establish their behavioral coverage.
72
+ *
73
+ * @evidence contracts/common.md#principled-implementation Complete path segments and TypeScript/JavaScript test suffixes recognize conventional test locations without substring matches on arbitrary names.
74
+ * @evidence contracts/common.md#clear-and-simple-design The test subset has one predicate separate from the broader support-file policy.
75
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Returned test anchors follow general conventions rather than an expected benchmark answer list.
76
+ * @evidence contracts/common.md#meaningful-documentation Native prose explains conventional selection and its lack of behavioral verification.
77
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources returns a boolean and retains nothing.
78
+ * @evidenceExclude contracts/performance.md#efficient-algorithms two pattern tests on a single coordinate.
79
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work pure per-call work with no cache, so there is nothing to share or invalidate.
80
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation classifies a slash-normalized coordinate string from the dump and never touches the filesystem.
81
+ */
34
82
  function isTestPath(file) {
35
83
  return (/(^|\/)(test|tests|__tests__|spec)\//.test(file) ||
36
84
  /\.(test|spec)\.[cm]?tsx?$/.test(file));
37
85
  }
38
- /** True when exported symbols are unlikely to be authored public API. */
86
+ /**
87
+ * True when exported symbols are unlikely to be authored public API.
88
+ *
89
+ * Support material, ambient typings and internal directories are selection
90
+ * signals, not proof that a symbol cannot be imported.
91
+ *
92
+ * @evidence contracts/common.md#principled-implementation Shared support selection plus typings/internal conventions identify likely API noise while preserving actual compiler export facts elsewhere.
93
+ * @evidence contracts/common.md#clear-and-simple-design The API projection adds its own two exclusions to the common support predicate.
94
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Heuristic API visibility does not rewrite the producer's actual export table.
95
+ * @evidence contracts/common.md#meaningful-documentation Native prose distinguishes likely authored API from supported importability.
96
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources returns a boolean and retains nothing.
97
+ * @evidenceExclude contracts/performance.md#efficient-algorithms a fixed handful of pattern tests on a single coordinate.
98
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work pure per-call work with no cache, so there is nothing to share or invalidate.
99
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation classifies a slash-normalized coordinate string from the dump and never touches the filesystem.
100
+ */
39
101
  function isPublicApiNoisePath(file) {
40
102
  return (isSupportPath(file) ||
41
103
  /(^|\/|\.)typings\.[cm]?ts$/.test(file) ||
@@ -1 +1 @@
1
- {"version":3,"file":"pathPolicy.js","sourceRoot":"","sources":["../../src/server/pathPolicy.ts"],"names":[],"mappings":";;;;;;;AAEA,2EAA2E;AAC3E,wBAA+B,IAAoB;IACjD,OAAO,CACL,IAAI,CAAC,QAAQ;QACb,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;QAClC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CACvC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,2BAAkC,IAAY;IAC5C,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,iFAAiF;AACjF,uBAA8B,IAAY;IACxC,OAAO,CACL,IAAI,KAAK,EAAE;QACX,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;QAC7B,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC;QACjC,mGAAmG,CAAC,IAAI,CACtG,IAAI,CACL;QACD,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC;QACtC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC;QACpC,iBAAiB,CAAC,IAAI,CAAC;QACvB,uDAAuD,CAAC,IAAI,CAAC,IAAI,CAAC,CACnE,CAAC;AACJ,CAAC;AAED,0EAA0E;AAC1E,oBAA2B,IAAY;IACrC,OAAO,CACL,qCAAqC,CAAC,IAAI,CAAC,IAAI,CAAC;QAChD,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CACvC,CAAC;AACJ,CAAC;AAED,yEAAyE;AACzE,8BAAqC,IAAY;IAC/C,OAAO,CACL,aAAa,CAAC,IAAI,CAAC;QACnB,4BAA4B,CAAC,IAAI,CAAC,IAAI,CAAC;QACvC,kBAAkB,CAAC,IAAI,CAAC,IA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1,5 @@
1
1
  import { TtscGraphMemory } from "../model/TtscGraphMemory";
2
- import { ITtscGraphNode } from "../structures/ITtscGraphNode";
3
- export interface IResolvedGraphHandle {
4
- node?: ITtscGraphNode;
5
- candidates?: ITtscGraphNode[];
6
- }
2
+ import type { IResolvedGraphHandle } from "./IResolvedGraphHandle";
7
3
  /**
8
4
  * Resolve a tool handle as an id, an exact symbol name, a dotted suffix, or a
9
5
  * file-qualified name.
@@ -29,5 +25,14 @@ export interface IResolvedGraphHandle {
29
25
  * method (`db.query`, `app.listen`, `repo.save`), so the member is what it
30
26
  * means, and the candidates come back ranked when several classes declare
31
27
  * it.
28
+ *
29
+ * @evidence contracts/common.md#principled-implementation Exact id/name resolution precedes suffix and file/member fallbacks; unique outcomes preserve identity while multiple matches remain candidates.
30
+ * @evidence contracts/common.md#clear-and-simple-design Resolution helpers each own one handle form and one shared ranker orders ambiguity consistently.
31
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts General handle grammar and compiler export edges guide fallback, not repository-specific expected symbol lists.
32
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs describe supported stale-id, file-qualified and value-receiver spellings plus preserved ambiguity.
33
+ * @evidence contracts/performance.md#efficient-algorithms Exact id and symbol probes use generation indexes; a dotted-suffix miss can scan V nodes and collect C matches, while ranking their indexed edge neighborhoods retains the best K in O(CK) time and O(K) additional space for the normal small cap.
34
+ * @evidence contracts/performance.md#reuse-equivalent-work The graph shares id, symbol and adjacency indexes across handle resolutions; each call ranks a fresh candidate set because the spelling and requested limit can differ.
35
+ * @evidence contracts/performance.md#bound-retention-and-release-resources Candidate lists are request-local and returned to the caller; the resolver retains no history, handle or running task.
36
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation looks handles up in in-memory indexes; a path part of an id is matched as text.
32
37
  */
33
38
  export declare function resolveGraphHandle(graph: TtscGraphMemory, handle: string, candidateLimit?: number): IResolvedGraphHandle;
@@ -29,6 +29,15 @@ const pathPolicy_1 = require("./pathPolicy");
29
29
  * method (`db.query`, `app.listen`, `repo.save`), so the member is what it
30
30
  * means, and the candidates come back ranked when several classes declare
31
31
  * it.
32
+ *
33
+ * @evidence contracts/common.md#principled-implementation Exact id/name resolution precedes suffix and file/member fallbacks; unique outcomes preserve identity while multiple matches remain candidates.
34
+ * @evidence contracts/common.md#clear-and-simple-design Resolution helpers each own one handle form and one shared ranker orders ambiguity consistently.
35
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts General handle grammar and compiler export edges guide fallback, not repository-specific expected symbol lists.
36
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs describe supported stale-id, file-qualified and value-receiver spellings plus preserved ambiguity.
37
+ * @evidence contracts/performance.md#efficient-algorithms Exact id and symbol probes use generation indexes; a dotted-suffix miss can scan V nodes and collect C matches, while ranking their indexed edge neighborhoods retains the best K in O(CK) time and O(K) additional space for the normal small cap.
38
+ * @evidence contracts/performance.md#reuse-equivalent-work The graph shares id, symbol and adjacency indexes across handle resolutions; each call ranks a fresh candidate set because the spelling and requested limit can differ.
39
+ * @evidence contracts/performance.md#bound-retention-and-release-resources Candidate lists are request-local and returned to the caller; the resolver retains no history, handle or running task.
40
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation looks handles up in in-memory indexes; a path part of an id is matched as text.
32
41
  */
33
42
  function resolveGraphHandle(graph, handle, candidateLimit = 12) {
34
43
  const byId = graph.node(handle);
@@ -120,15 +129,38 @@ function fileStem(file) {
120
129
  function rank(graph, resolved, candidateLimit) {
121
130
  if (resolved.candidates === undefined)
122
131
  return resolved;
123
- const ranked = resolved.candidates
124
- .map((node) => ({ node, score: candidateScore(graph, node) }))
125
- .sort((a, b) => {
132
+ const candidates = resolved.candidates;
133
+ const cap = Math.trunc(candidateLimit);
134
+ const compare = (a, b) => {
126
135
  const score = b.score - a.score;
127
136
  return score !== 0 ? score : compareIdentity(a.node.id, b.node.id);
128
- })
129
- .slice(0, candidateLimit)
130
- .map(({ node }) => node);
131
- return { candidates: ranked };
137
+ };
138
+ // Large or unusual public caps retain Array.slice semantics; the normal
139
+ // small cap need not sort every ambiguous declaration in the project.
140
+ if (!Number.isFinite(cap) || cap < 0 || cap > 32) {
141
+ return {
142
+ candidates: candidates
143
+ .map((node) => ({ node, score: candidateScore(graph, node) }))
144
+ .sort(compare)
145
+ .slice(0, candidateLimit)
146
+ .map(({ node }) => node),
147
+ };
148
+ }
149
+ const ranked = [];
150
+ for (const node of candidates) {
151
+ const item = { node, score: candidateScore(graph, node) };
152
+ const position = ranked.findIndex((other) => compare(item, other) < 0);
153
+ if (position < 0) {
154
+ if (ranked.length < cap)
155
+ ranked.push(item);
156
+ }
157
+ else if (position < cap) {
158
+ ranked.splice(position, 0, item);
159
+ if (ranked.length > cap)
160
+ ranked.pop();
161
+ }
162
+ }
163
+ return { candidates: ranked.map(({ node }) => node) };
132
164
  }
133
165
  /** Compare position-invariant ids without locale-dependent collation. */
134
166
  function compareIdentity(left, right) {
@@ -1 +1 @@
1
- {"version":3,"file":"resolveHandle.js","sourceRoot":"","sources":["../../src/server/resolveHandle.ts"],"names":[],"mappings":";;;AACA,8DAAgE;AAEhE,mDAA8C;AAC9C,6CAA6C;AAO7C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,4BACE,KAAsB,EACtB,MAAc,EACd,cAAc,GAAG,EAAE;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAE9C,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/C,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS;QAC9D,OAAO,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAE7C,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,CAA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`TtscGraphMemory`, and it selects a constant by request type
39
39
  * (#818). What is true is stronger than it sounds and is what the text now
40
- * says: the compiler resolved these facts when the snapshot was built, the
41
- * graph holds what it resolved, and this result is a projection of exactly
42
- * those facts that adds none of its own. A reader who checks that claim finds
43
- * it holds; a reader who checked the old one found a promise the code could not
44
- * have kept.
40
+ * says: the compiler resolved these declaration facts when the snapshot was
41
+ * built, the graph holds what it resolved, and this result is a projection of
42
+ * them. The text then names what is not the compiler's, because "adds none of
43
+ * its own" was itself too strong: the memory layer derives `file` nodes,
44
+ * `contains` ownership and a member's `property` kind, a trace emits
45
+ * `dispatches` hops, and an artifact node arrives from a lint plugin's parser.
46
+ * A reader who checks the claim as now written finds it holds; a reader who
47
+ * checked the old ones found promises the code could not have kept.
45
48
  *
46
49
  * ## Two guarantees, not one
47
50
  *
48
51
  * A returned fact and the set it was chosen from are not audited to the same
49
52
  * standard, and one audit that conflated them was dishonest. Every operation
50
- * resolves each fact it returns — a name, a span, an edge, a signature — to the
51
- * type-checked program, so a returned fact cannot be wrong for the snapshot.
52
- * But `lookup`, `entrypoints`, and `tour` do not answer with the structure at a
53
- * handle you named; they match your natural-language question, score and rank
54
- * the graph against it, cap hits per file, and cut to a limit. Their `score`
55
- * and `truncated` fields say so, while the single old audit — "matched, ranked,
56
- * guessed, or inferred: none" — told the reader the opposite in the same
57
- * payload, and told it to stop where the shortlist's coverage was exactly what
58
- * needed judging.
53
+ * resolves each declaration fact it returns — a name, a span, an edge, a
54
+ * signature — to the type-checked program, so a returned compiler fact cannot
55
+ * be wrong for the snapshot. But `lookup`, `entrypoints`, and `tour` do not
56
+ * answer with the structure at a handle you named; they match your
57
+ * natural-language question, score and rank the graph against it, cap hits per
58
+ * file, and cut to a limit. Their `score` and `truncated` fields say so, while
59
+ * the single old audit — "matched, ranked, guessed, or inferred: none" — told
60
+ * the reader the opposite in the same payload, and told it to stop where the
61
+ * shortlist's coverage was exactly what needed judging.
59
62
  *
60
63
  * So the audits split by what the reader must judge. {@link RESULT_AUDIT} covers
61
64
  * the walks from an explicit handle or structure (`trace`, `overview`): the
@@ -1,6 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RESULT_AUDIT_ESCAPE = exports.RESULT_AUDIT_DETAILS_CAPPED = exports.RESULT_AUDIT_DETAILS = exports.RESULT_AUDIT_SELECTION = exports.RESULT_AUDIT = void 0;
4
+ const TtscGraphArtifactNodeKind_1 = require("../structures/TtscGraphArtifactNodeKind");
5
+ /**
6
+ * What the audits say about facts the compiler did not resolve.
7
+ *
8
+ * The graph holds two kinds of fact that no compiler pass resolved, and an
9
+ * audit that called every fact compiler-resolved claimed more than this layer
10
+ * checked. The memory layer derives structure from compiler-owned declarations:
11
+ * `file` containers, `contains` ownership, a class member's `property` kind, a
12
+ * `test` role or `tests` anchor chosen by path convention, and, in a trace,
13
+ * `dispatches` hops built from `overrides` and `implements`. And an artifact
14
+ * node is published by a lint plugin that parsed a document, a data model, or
15
+ * an API description in a process of its own, which is exactly what the dump's
16
+ * `artifactProducer` records. The text names both, and lists the artifact kinds
17
+ * from the one vocabulary the memory layer classifies by, so a kind added there
18
+ * cannot be left out of what the audit disclaims.
19
+ */
20
+ const NOT_COMPILER_RESOLVED = [
21
+ "The server adds only structure derived from those facts: `file` nodes, `contains` ownership,",
22
+ "`dispatches` hops, a class member's `property` kind, and the `test` role and `tests` anchors,",
23
+ "which it assigns from a file's conventional test location rather than from the compiler. A node whose kind is one of",
24
+ TtscGraphArtifactNodeKind_1.TTSC_GRAPH_ARTIFACT_NODE_KINDS.map((kind) => `\`${kind}\``).join(", ") +
25
+ " is not",
26
+ "the compiler's: a lint plugin parsed that artifact in its own process, and the graph returns its",
27
+ "address, kind, name, and line as that plugin reported them. Nothing else is the server's own,",
28
+ "so for this snapshot a compiler-resolved fact here cannot disagree with the program.",
29
+ ].join("\n");
4
30
  /**
5
31
  * The audit stamped as the first property of every
6
32
  * {@link ITtscGraphApplication.IOutput}. Because it serializes before `result`,
@@ -40,25 +66,28 @@ exports.RESULT_AUDIT_ESCAPE = exports.RESULT_AUDIT_DETAILS_CAPPED = exports.RESU
40
66
  * layer holds no `Program` and no checker, it runs one pure projection over an
41
67
  * in-memory `TtscGraphMemory`, and it selects a constant by request type
42
68
  * (#818). What is true is stronger than it sounds and is what the text now
43
- * says: the compiler resolved these facts when the snapshot was built, the
44
- * graph holds what it resolved, and this result is a projection of exactly
45
- * those facts that adds none of its own. A reader who checks that claim finds
46
- * it holds; a reader who checked the old one found a promise the code could not
47
- * have kept.
69
+ * says: the compiler resolved these declaration facts when the snapshot was
70
+ * built, the graph holds what it resolved, and this result is a projection of
71
+ * them. The text then names what is not the compiler's, because "adds none of
72
+ * its own" was itself too strong: the memory layer derives `file` nodes,
73
+ * `contains` ownership and a member's `property` kind, a trace emits
74
+ * `dispatches` hops, and an artifact node arrives from a lint plugin's parser.
75
+ * A reader who checks the claim as now written finds it holds; a reader who
76
+ * checked the old ones found promises the code could not have kept.
48
77
  *
49
78
  * ## Two guarantees, not one
50
79
  *
51
80
  * A returned fact and the set it was chosen from are not audited to the same
52
81
  * standard, and one audit that conflated them was dishonest. Every operation
53
- * resolves each fact it returns — a name, a span, an edge, a signature — to the
54
- * type-checked program, so a returned fact cannot be wrong for the snapshot.
55
- * But `lookup`, `entrypoints`, and `tour` do not answer with the structure at a
56
- * handle you named; they match your natural-language question, score and rank
57
- * the graph against it, cap hits per file, and cut to a limit. Their `score`
58
- * and `truncated` fields say so, while the single old audit — "matched, ranked,
59
- * guessed, or inferred: none" — told the reader the opposite in the same
60
- * payload, and told it to stop where the shortlist's coverage was exactly what
61
- * needed judging.
82
+ * resolves each declaration fact it returns — a name, a span, an edge, a
83
+ * signature — to the type-checked program, so a returned compiler fact cannot
84
+ * be wrong for the snapshot. But `lookup`, `entrypoints`, and `tour` do not
85
+ * answer with the structure at a handle you named; they match your
86
+ * natural-language question, score and rank the graph against it, cap hits per
87
+ * file, and cut to a limit. Their `score` and `truncated` fields say so, while
88
+ * the single old audit — "matched, ranked, guessed, or inferred: none" — told
89
+ * the reader the opposite in the same payload, and told it to stop where the
90
+ * shortlist's coverage was exactly what needed judging.
62
91
  *
63
92
  * So the audits split by what the reader must judge. {@link RESULT_AUDIT} covers
64
93
  * the walks from an explicit handle or structure (`trace`, `overview`): the
@@ -82,10 +111,10 @@ exports.RESULT_AUDIT_ESCAPE = exports.RESULT_AUDIT_DETAILS_CAPPED = exports.RESU
82
111
  exports.RESULT_AUDIT = `
83
112
  AUDITED BEFORE RETURNING. READ FIRST.
84
113
 
85
- Every fact in this \`result\` — each name, span, edge, signature, and step — was resolved by
86
- the TypeScript compiler against the program for the snapshot this call synced to, and the
87
- graph holds what it resolved. This \`result\` is a projection of exactly those facts and adds
88
- none of its own, so for this snapshot a fact here cannot disagree with the program.
114
+ Every declaration fact in this \`result\` — each name, span, edge, signature, and step — was
115
+ resolved by the TypeScript compiler against the program for the snapshot this call synced to,
116
+ and the graph holds what it resolved. This \`result\` is a projection of those facts.
117
+ ${NOT_COMPILER_RESOLVED}
89
118
 
90
119
  This is the structure the graph holds for the handles you named, not a shortlist matched
91
120
  against a natural-language question. Trust every fact it gives and re-verify none: a returned
@@ -104,11 +133,11 @@ after you edit the source.
104
133
  exports.RESULT_AUDIT_SELECTION = `
105
134
  AUDITED BEFORE RETURNING. READ FIRST.
106
135
 
107
- Each fact in this \`result\` — every name, span, edge, and signature — was resolved by the
108
- TypeScript compiler against the program for the snapshot this call synced to, and the graph
109
- holds what it resolved. This \`result\` is a projection of exactly those facts and adds none of
110
- its own, so for this snapshot a fact here cannot disagree with the program: a returned span
111
- is the citation, not a cue to open the file to confirm it.
136
+ Each declaration fact in this \`result\` — every name, span, edge, and signature — was resolved
137
+ by the TypeScript compiler against the program for the snapshot this call synced to, and the
138
+ graph holds what it resolved. This \`result\` is a projection of those facts.
139
+ ${NOT_COMPILER_RESOLVED}
140
+ A returned span is the citation, not a cue to open the file to confirm it.
112
141
 
113
142
  What was selected is heuristic, not exhaustive. This result was matched against your
114
143
  natural-language question, scored and ranked, held to a few hits per file, and cut to a
@@ -138,10 +167,10 @@ Follow \`next\` for where that leaves the question.
138
167
  exports.RESULT_AUDIT_DETAILS = `
139
168
  AUDITED BEFORE RETURNING. READ FIRST.
140
169
 
141
- Every fact in this \`result\` — each name, span, edge, signature, member, and value — was
142
- resolved by the TypeScript compiler against the program for the snapshot this call synced to,
143
- and the graph holds what it resolved. This \`result\` is a projection of exactly those facts
144
- and adds none of its own, so for this snapshot a fact here cannot disagree with the program.
170
+ Every declaration fact in this \`result\` — each name, span, edge, signature, member, and value —
171
+ was resolved by the TypeScript compiler against the program for the snapshot this call synced
172
+ to, and the graph holds what it resolved. This \`result\` is a projection of those facts.
173
+ ${NOT_COMPILER_RESOLVED}
145
174
 
146
175
  This is the structure the graph holds for the handles you named. What a symbol is — its
147
176
  members, its values, its signature — is complete: trust it and do not open the file to read
@@ -1 +1 @@
1
- {"version":3,"file":"resultAudit.js","sourceRoot":"","sources":["../../src/server/resultAudit.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACU,QAAA,YAAY,GAAW;;;;;;;;;;;;;;;CAenC,CAAC,IAAI,EAAE,CAAC;AAET;;;;;GAKG;AACU,QAAA,sBAAsB,GAAW;;;;;;;;;;;;;;;;;CAiB7C,CAAC,IAAI,EAAE,CAAC;AAET;;;;;;;;;;;;;;;GAeG;AACU,QAAA,oBAAoB,GAAW;;;;;;;;;;;;;;;;;CAiB3C,CAAC,IAAI,EAAE,CAAC;AAET;;;;;;;;;GASG;AACU,QAAA,2BAA2B,GAAW,QAAA,oBAAoB,CAAC,OAAO;AAC7E,2EAA2E;AAC3E,wEAAwE;AACxE,6EAA6E;AAC7E,iEAAiE;AACjE,gDAAgD,EAChD,4FAA4F;IAC1F,0FAA0F;IAC1F,0BAA0B,CAC7B,CAAC;AAEF,mEAAmE;AACtD,QAAA,mBAAmB,GAC9B,8CAA8C,CAAC"}
1
+ {"version":3,"file":"resultAudit.js","sourceRoot":"","sources":["../../src/server/resultAudit.ts"],"names":[],"mappings":";;;AAAA,uFAAyF;AAEzF;;;;;;;;;;;;;;GAcG;AACH,MAAM,qBAAqB,GAAW;IACpC,8FAA8F;IAC9F,+FAA+F;IAC/F,sHAAsH;IACtH,0DAA8B,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACpE,SAAS;IACX,kGAAkG;IAClG,+FAA+F;IAC/F,sFAAsF;CACvF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AACU,QAAA,YAAY,GAAW;;;;;;EAMlC,qBAAqB;;;;;;;;;CAStB,CAAC,IAAI,EAAE,CAAC;AAET;;;;;GAKG;AACU,QAAA,sBAAsB,GAAW;;;;;;EAM5C,qBAAqB;;;;;;;;;;;CAWtB,CAAC,IAAI,EAAE,CAAC;AAET;;;;;;;;;;;;;;;GAeG;AACU,QAAA,oBAAoB,GAAW;;;;;;EAM1C,qBAAqB;;;;;;;;;;;CAWtB,CAAC,IAAI,EAAE,CAAC;AAET;;;;;;;;;GASG;AACU,QAAA,2BAA2B,GAAW,QAAA,oBAAoB,CAAC,OAAO;AAC7E,2EAA2E;AAC3E,wEAAwE;AACxE,6EAA6E;AAC7E,iEAAiE;AACjE,gDAAgD,EAChD,4FAA4F;IAC1F,0FAA0F;IAC1F,0BAA0B,CAC7B,CAAC;AAEF,mEAAmE;AACtD,QAAA,mBAAmB,GAC9B,8CAA8C,CAAC"}
@@ -1,5 +1,16 @@
1
1
  import { ITtscGraphNext } from "../structures/ITtscGraphNext";
2
- /** A runner's result structure paired with the next-step calibration for it. */
2
+ /**
3
+ * A runner's result structure paired with the next-step calibration for it.
4
+ *
5
+ * @evidence contracts/common.md#principled-implementation The generic result remains its operation's typed shape while next and optional member truncation qualify how it may be used.
6
+ * @evidence contracts/common.md#clear-and-simple-design Shared control metadata wraps runner-specific facts without copying all result unions here.
7
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Member caps are explicit so audits cannot silently claim completeness after omission.
8
+ * @evidence contracts/common.md#meaningful-documentation Native member paragraphs explain next guidance and the capped-member audit consequence.
9
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
10
+ * @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
11
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
12
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
13
+ */
3
14
  export interface IRunnerOutput<T> {
4
15
  /** The graph result structure. */
5
16
  result: T;
@@ -11,4 +22,18 @@ export interface IRunnerOutput<T> {
11
22
  */
12
23
  membersCapped?: boolean;
13
24
  }
25
+ /**
26
+ * Construct a next decision, omitting the request field when none is supplied.
27
+ *
28
+ * Callers own the justification for action and any inspect request.
29
+ *
30
+ * @evidence contracts/common.md#principled-implementation Typed action/request values retain the supported decision vocabulary and optional-field semantics.
31
+ * @evidence contracts/common.md#clear-and-simple-design One constructor centralizes omission of absent request metadata without owning runner policy.
32
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The helper does not infer question intent or add a forced follow-up operation.
33
+ * @evidence contracts/common.md#meaningful-documentation Native prose states caller policy ownership and conditional field omission.
34
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources returns a plain object and retains nothing.
35
+ * @evidenceExclude contracts/performance.md#efficient-algorithms builds one small object.
36
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work pure constructor, nothing to share.
37
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation builds a plain object; no file, path or process.
38
+ */
14
39
  export declare function resultNext(action: ITtscGraphNext["action"], reason: string, request?: ITtscGraphNext["request"]): ITtscGraphNext;
@@ -1,6 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resultNext = resultNext;
4
+ /**
5
+ * Construct a next decision, omitting the request field when none is supplied.
6
+ *
7
+ * Callers own the justification for action and any inspect request.
8
+ *
9
+ * @evidence contracts/common.md#principled-implementation Typed action/request values retain the supported decision vocabulary and optional-field semantics.
10
+ * @evidence contracts/common.md#clear-and-simple-design One constructor centralizes omission of absent request metadata without owning runner policy.
11
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The helper does not infer question intent or add a forced follow-up operation.
12
+ * @evidence contracts/common.md#meaningful-documentation Native prose states caller policy ownership and conditional field omission.
13
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources returns a plain object and retains nothing.
14
+ * @evidenceExclude contracts/performance.md#efficient-algorithms builds one small object.
15
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work pure constructor, nothing to share.
16
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation builds a plain object; no file, path or process.
17
+ */
4
18
  function resultNext(action, reason, request) {
5
19
  return {
6
20
  action,
@@ -1 +1 @@
1
- {"version":3,"file":"resultNext.js","sourceRoot":"","sources":["../../src/server/resultNext.ts"],"names":[],"mappings":";;;AAiBA,oBACE,MAAgC,EAChC,MAAc,EACd,OAAmC;IAEnC,OAAO;QACL,MAAM;QACN,MAAM;QACN,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"resultNext.js","sourceRoot":"","sources":["../../src/server/resultNext.ts"],"names":[],"mappings":";;;AA4BA;;;;;;;;;;;;;GAaG;AACH,oBACE,MAAgC,EAChC,MAAc,EACd,OAAmC;IAEnC,OAAO;QACL,MAAM;QACN,MAAM;QACN,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,CAAC;AACJ,CAAC"}
@@ -1,18 +1,40 @@
1
1
  import { TtscGraphMemory } from "../model/TtscGraphMemory";
2
+ import { TtscGraphReadonly } from "../model/TtscGraphReadonly";
2
3
  import { ITtscGraphDecorator } from "../structures/ITtscGraphDecorator";
3
4
  import { ITtscGraphDetails } from "../structures/ITtscGraphDetails";
4
5
  import { ITtscGraphDocTag } from "../structures/ITtscGraphDocTag";
5
6
  import { ITtscGraphEdge } from "../structures/ITtscGraphEdge";
6
7
  import { ITtscGraphEvidence } from "../structures/ITtscGraphEvidence";
7
- import { ITtscGraphNode } from "../structures/ITtscGraphNode";
8
+ import { ITtscGraphNode as NodeShape } from "../structures/ITtscGraphNode";
8
9
  import { IRunnerOutput } from "./resultNext";
10
+ type ITtscGraphNode = TtscGraphReadonly<NodeShape>;
9
11
  /**
10
12
  * Resolve each handle to its declared shape: sourceSpan anchors, signature,
11
13
  * direct dependencies, and for containers, member outlines. It answers from the
12
14
  * graph's resolved structure instead of inlining implementation bodies.
15
+ *
16
+ * @evidence contracts/common.md#principled-implementation Resolved handles select exact node facts, complete literal/member identities and explicitly bounded relationship slices; ambiguity is returned separately.
17
+ * @evidence contracts/common.md#clear-and-simple-design Shape, relationship and source-display helpers each own one projection while this function assembles the selected details envelope.
18
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown and ambiguous handles are not converted to guessed declarations; capped members withdraw the corresponding completeness audit.
19
+ * @evidence contracts/common.md#meaningful-documentation Native prose distinguishes declared shape from implementation bodies; helper documentation explains member, reference and citation limits.
20
+ * @evidence contracts/performance.md#efficient-algorithms Each handle uses the shared resolver, whose dotted-suffix fallback may scan V nodes; resolved relationships inspect D incident edges and retain only K ranked references in O(DK) time and O(K) temporary space, where K is at most four, while member/literal output scales with the declaration's own members.
21
+ * @evidence contracts/performance.md#reuse-equivalent-work The graph shares generation indexes and source-line adjudications across handles and requests; this call builds fresh caller-owned projections because request limits and selected handles differ.
22
+ * @evidence contracts/performance.md#bound-retention-and-release-resources Detail, ambiguity and unknown arrays live for this request and transfer to its caller; no query history or native handle is retained by this operation.
23
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation reads in-memory facts; source lines arrive through graph.source, the reader that owns file access.
13
24
  */
14
25
  export declare function runDetails(graph: TtscGraphMemory, props: ITtscGraphDetails.IRequest): IRunnerOutput<ITtscGraphDetails>;
15
- /** Decorator facts already captured on a node, omitted when absent. */
26
+ /**
27
+ * Decorator facts already captured on a node, omitted when absent or empty.
28
+ *
29
+ * @evidence contracts/common.md#principled-implementation The adapter preserves collected decorator order and values while omitting an empty optional facet.
30
+ * @evidence contracts/common.md#clear-and-simple-design One accessor shares decorator projection across details, lookup and tour consumers.
31
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No framework-specific reinterpretation changes the collected decorator facts.
32
+ * @evidence contracts/common.md#meaningful-documentation The native headline states collected-fact and empty-facet behavior before the tags.
33
+ * @evidence contracts/performance.md#efficient-algorithms One pass copies each decorator and its arguments, costing their total population without scanning unrelated graph nodes.
34
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work This caller-owned projection performs no cross-request coordination; the graph owns the shared source facts.
35
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The returned array transfers to its caller and this helper retains no state or handle.
36
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation copies in-memory node fields; no file, path or process.
37
+ */
16
38
  export declare function decoratorsOf(node: ITtscGraphNode): ITtscGraphDecorator[] | undefined;
17
39
  /**
18
40
  * The declaration's documentation tags, with each text elided at the same
@@ -26,9 +48,29 @@ export declare function decoratorsOf(node: ITtscGraphNode): ITtscGraphDecorator[
26
48
  * The optional filter narrows to the tags a caller matched. It runs on the
27
49
  * node's own tags, before any elision, so a tag found by an address longer than
28
50
  * the budget is still recognized as the one that matched.
51
+ *
52
+ * @evidence contracts/common.md#principled-implementation Filtering original tags before eliding preserves matching addresses; the shared leading-token rule keeps whole citation prefixes intact.
53
+ * @evidence contracts/common.md#clear-and-simple-design One projection helper owns tag selection and display elision for every graph result consumer.
54
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Address matches are not re-evaluated against truncated text and long addresses are never cut into another target.
55
+ * @evidence contracts/common.md#meaningful-documentation Separate native paragraphs explain the display budget, protected address and filter-before-elision ordering.
56
+ * @evidence contracts/performance.md#efficient-algorithms Filtering and mapping visit the node's tags once each; elision examines the leading address and copies at most the needed display prefix.
57
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Selection depends on a caller predicate and returns a fresh mutable projection; this helper coordinates no reusable result.
58
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The selected and returned arrays are request-local and no historical tags are retained here.
59
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation copies and elides in-memory tag text; no file, path or process.
60
+ */
61
+ export declare function docTagsOf(node: ITtscGraphNode, keep?: (tag: TtscGraphReadonly<ITtscGraphDocTag>) => boolean): ITtscGraphDocTag[] | undefined;
62
+ /**
63
+ * Relationship evidence as public coordinates, omitted when absent.
64
+ *
65
+ * @evidence contracts/common.md#principled-implementation Copying the actual edge span preserves file and optional endpoints without inferring missing coordinates.
66
+ * @evidence contracts/common.md#clear-and-simple-design One coordinate mapper is shared by graph runners and node implementation evidence.
67
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Missing source evidence stays absent rather than being replaced with the caller's declaration span.
68
+ * @evidence contracts/common.md#meaningful-documentation The native headline explains public-coordinate projection and absent evidence behavior.
69
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Copying a fixed set of optional coordinates chooses no input-dependent processing strategy.
70
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work This fixed-size projection coordinates no cross-request computation.
71
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The returned value transfers to its caller without a retained handle or cache.
72
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation copies span coordinates of an in-memory edge; no file, path or process.
29
73
  */
30
- export declare function docTagsOf(node: ITtscGraphNode, keep?: (tag: ITtscGraphDocTag) => boolean): ITtscGraphDocTag[] | undefined;
31
- /** Relationship evidence as public coordinates, omitted when absent. */
32
74
  export declare function edgeEvidenceOf(edge: ITtscGraphEdge): ITtscGraphEvidence | undefined;
33
75
  /**
34
76
  * What the declaration says it is: the first sentence of the doc comment
@@ -41,18 +83,33 @@ export declare function edgeEvidenceOf(edge: ITtscGraphEdge): ITtscGraphEvidence
41
83
  * sentence above the declaration, and the compiler carries it. It is the
42
84
  * declaration's documentation, not the body of the work: an index that lists a
43
85
  * symbol with what it is for is doing an index's job.
86
+ *
87
+ * @evidence contracts/common.md#principled-implementation Provenance-gated lines are scanned immediately above the declaration for JSDoc prose, stopping before tags and returning its first sentence.
88
+ * @evidence contracts/common.md#clear-and-simple-design This helper owns a short documentation projection; the source reader owns immutable generation validation and caching.
89
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A missing or mismatched source yields absence rather than an inferred purpose from names or implementation text.
90
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs explain first-sentence purpose and distinguish declaration prose from implementation bodies.
91
+ * @evidence contracts/performance.md#efficient-algorithms The source reader supplies indexed, cached lines; this helper scans only the adjacent comment and joins its prose, costing the comment's lines and characters.
92
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Source-byte validation and line splitting are shared by the reader; this pure projection does not coordinate a separate result cache.
93
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Comment and prose arrays are local to this call and no history or handle is retained.
94
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation reads lines through graph.source, the reader that owns file access, and adds none of its own.
44
95
  */
45
96
  export declare function docOf(graph: TtscGraphMemory, node: ITtscGraphNode): string | undefined;
46
97
  /**
47
- * The declaration signature: the head of the declaration up to and including
48
- * the line that opens its body (`{`), or the single declaration line when there
49
- * is no brace, capped so a wrapped signature cannot run away.
50
- *
51
- * It never runs past the declaration's own span. The stop used to be the brace,
52
- * the trailing semicolon, or the line cap, and a declaration ending in none of
53
- * them read its neighbors instead: an enum member ends in a comma, so `VIEW`
54
- * came back as itself plus the two members after it and the closing brace. The
55
- * span is the fact that says where the declaration ends, and it was already on
56
- * the node.
98
+ * The producer's compiler-bounded declaration head, limited to display lines.
99
+ *
100
+ * Without a producer signature, return undefined. Physical lines cannot
101
+ * establish where a declaration head ends: a body may share its line and a
102
+ * parameter or return type may itself contain braces. The source span remains
103
+ * available when a caller needs to read the declaration.
104
+ *
105
+ * @evidence contracts/common.md#principled-implementation Only the AST-bounded producer head establishes a declaration-only signature; limiting its lines preserves that established boundary.
106
+ * @evidence contracts/common.md#clear-and-simple-design The producer owns declaration syntax boundaries and this helper owns display length, with no second partial TypeScript parser.
107
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Missing heads are not repaired by a line-scan heuristic that can leak implementation or neighboring declarations.
108
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs explain the producer requirement, missing-head absence and source-span escape path.
109
+ * @evidence contracts/performance.md#efficient-algorithms Splitting the producer head and selecting its first display lines costs the supplied signature's length; no source file or graph traversal occurs.
110
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work The producer head is already shared on the graph node, while this display projection coordinates no repeated work.
111
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The capped text is caller-owned and this helper retains no cache or native resource.
112
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation cuts the producer's signature text to a few lines; no file, path or process.
57
113
  */
58
- export declare function signatureOf(graph: TtscGraphMemory, node: ITtscGraphNode): string | undefined;
114
+ export declare function signatureOf(_graph: TtscGraphMemory, node: ITtscGraphNode): string | undefined;
115
+ export {};