@descryy/mcp 0.11.3 → 0.11.5

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 (441) hide show
  1. package/package.json +20 -20
  2. package/dist/action-handshake.d.ts +0 -38
  3. package/dist/action-handshake.d.ts.map +0 -1
  4. package/dist/action-handshake.js +0 -127
  5. package/dist/action-handshake.js.map +0 -1
  6. package/dist/bin/descry-mcp.d.ts +0 -7
  7. package/dist/bin/descry-mcp.d.ts.map +0 -1
  8. package/dist/bin/descry-mcp.js +0 -72
  9. package/dist/bin/descry-mcp.js.map +0 -1
  10. package/dist/browser/auth.d.ts +0 -84
  11. package/dist/browser/auth.d.ts.map +0 -1
  12. package/dist/browser/auth.js +0 -233
  13. package/dist/browser/auth.js.map +0 -1
  14. package/dist/browser/capability-probe.d.ts +0 -109
  15. package/dist/browser/capability-probe.d.ts.map +0 -1
  16. package/dist/browser/capability-probe.js +0 -201
  17. package/dist/browser/capability-probe.js.map +0 -1
  18. package/dist/browser/driver.d.ts +0 -570
  19. package/dist/browser/driver.d.ts.map +0 -1
  20. package/dist/browser/driver.js +0 -116
  21. package/dist/browser/driver.js.map +0 -1
  22. package/dist/browser/evidence.d.ts +0 -28
  23. package/dist/browser/evidence.d.ts.map +0 -1
  24. package/dist/browser/evidence.js +0 -82
  25. package/dist/browser/evidence.js.map +0 -1
  26. package/dist/browser/fake-driver.d.ts +0 -116
  27. package/dist/browser/fake-driver.d.ts.map +0 -1
  28. package/dist/browser/fake-driver.js +0 -416
  29. package/dist/browser/fake-driver.js.map +0 -1
  30. package/dist/browser/fault-attribution.d.ts +0 -178
  31. package/dist/browser/fault-attribution.d.ts.map +0 -1
  32. package/dist/browser/fault-attribution.js +0 -266
  33. package/dist/browser/fault-attribution.js.map +0 -1
  34. package/dist/browser/graph-write.d.ts +0 -45
  35. package/dist/browser/graph-write.d.ts.map +0 -1
  36. package/dist/browser/graph-write.js +0 -103
  37. package/dist/browser/graph-write.js.map +0 -1
  38. package/dist/browser/identity-graph-write.d.ts +0 -55
  39. package/dist/browser/identity-graph-write.d.ts.map +0 -1
  40. package/dist/browser/identity-graph-write.js +0 -45
  41. package/dist/browser/identity-graph-write.js.map +0 -1
  42. package/dist/browser/page-probe.d.ts +0 -81
  43. package/dist/browser/page-probe.d.ts.map +0 -1
  44. package/dist/browser/page-probe.js +0 -202
  45. package/dist/browser/page-probe.js.map +0 -1
  46. package/dist/browser/playwright-driver.d.ts +0 -114
  47. package/dist/browser/playwright-driver.d.ts.map +0 -1
  48. package/dist/browser/playwright-driver.js +0 -1479
  49. package/dist/browser/playwright-driver.js.map +0 -1
  50. package/dist/browser/provider.d.ts +0 -26
  51. package/dist/browser/provider.d.ts.map +0 -1
  52. package/dist/browser/provider.js +0 -14
  53. package/dist/browser/provider.js.map +0 -1
  54. package/dist/browser/reach-recording-session.d.ts +0 -44
  55. package/dist/browser/reach-recording-session.d.ts.map +0 -1
  56. package/dist/browser/reach-recording-session.js +0 -143
  57. package/dist/browser/reach-recording-session.js.map +0 -1
  58. package/dist/browser/reachability.d.ts +0 -168
  59. package/dist/browser/reachability.d.ts.map +0 -1
  60. package/dist/browser/reachability.js +0 -294
  61. package/dist/browser/reachability.js.map +0 -1
  62. package/dist/browser/registry.d.ts +0 -126
  63. package/dist/browser/registry.d.ts.map +0 -1
  64. package/dist/browser/registry.js +0 -177
  65. package/dist/browser/registry.js.map +0 -1
  66. package/dist/browser/scenario-provenance.d.ts +0 -23
  67. package/dist/browser/scenario-provenance.d.ts.map +0 -1
  68. package/dist/browser/scenario-provenance.js +0 -73
  69. package/dist/browser/scenario-provenance.js.map +0 -1
  70. package/dist/browser/scenario-resolve.d.ts +0 -28
  71. package/dist/browser/scenario-resolve.d.ts.map +0 -1
  72. package/dist/browser/scenario-resolve.js +0 -96
  73. package/dist/browser/scenario-resolve.js.map +0 -1
  74. package/dist/browser/scenario-runner.d.ts +0 -72
  75. package/dist/browser/scenario-runner.d.ts.map +0 -1
  76. package/dist/browser/scenario-runner.js +0 -353
  77. package/dist/browser/scenario-runner.js.map +0 -1
  78. package/dist/browser/stack-parser.d.ts +0 -19
  79. package/dist/browser/stack-parser.d.ts.map +0 -1
  80. package/dist/browser/stack-parser.js +0 -85
  81. package/dist/browser/stack-parser.js.map +0 -1
  82. package/dist/browser/tool-support.d.ts +0 -71
  83. package/dist/browser/tool-support.d.ts.map +0 -1
  84. package/dist/browser/tool-support.js +0 -216
  85. package/dist/browser/tool-support.js.map +0 -1
  86. package/dist/browser/url-scheme.d.ts +0 -14
  87. package/dist/browser/url-scheme.d.ts.map +0 -1
  88. package/dist/browser/url-scheme.js +0 -38
  89. package/dist/browser/url-scheme.js.map +0 -1
  90. package/dist/browser/wait-target.d.ts +0 -37
  91. package/dist/browser/wait-target.d.ts.map +0 -1
  92. package/dist/browser/wait-target.js +0 -54
  93. package/dist/browser/wait-target.js.map +0 -1
  94. package/dist/cancellation.d.ts +0 -20
  95. package/dist/cancellation.d.ts.map +0 -1
  96. package/dist/cancellation.js +0 -41
  97. package/dist/cancellation.js.map +0 -1
  98. package/dist/capped.d.ts +0 -17
  99. package/dist/capped.d.ts.map +0 -1
  100. package/dist/capped.js +0 -15
  101. package/dist/capped.js.map +0 -1
  102. package/dist/credential-store.d.ts +0 -22
  103. package/dist/credential-store.d.ts.map +0 -1
  104. package/dist/credential-store.js +0 -33
  105. package/dist/credential-store.js.map +0 -1
  106. package/dist/disclosure-ledger.d.ts +0 -14
  107. package/dist/disclosure-ledger.d.ts.map +0 -1
  108. package/dist/disclosure-ledger.js +0 -18
  109. package/dist/disclosure-ledger.js.map +0 -1
  110. package/dist/evidence/observed-route-evidence.d.ts +0 -25
  111. package/dist/evidence/observed-route-evidence.d.ts.map +0 -1
  112. package/dist/evidence/observed-route-evidence.js +0 -76
  113. package/dist/evidence/observed-route-evidence.js.map +0 -1
  114. package/dist/heap.d.ts +0 -61
  115. package/dist/heap.d.ts.map +0 -1
  116. package/dist/heap.js +0 -82
  117. package/dist/heap.js.map +0 -1
  118. package/dist/heartbeat.d.ts +0 -46
  119. package/dist/heartbeat.d.ts.map +0 -1
  120. package/dist/heartbeat.js +0 -66
  121. package/dist/heartbeat.js.map +0 -1
  122. package/dist/index.d.ts +0 -32
  123. package/dist/index.d.ts.map +0 -1
  124. package/dist/index.js +0 -19
  125. package/dist/index.js.map +0 -1
  126. package/dist/module-trust.d.ts +0 -37
  127. package/dist/module-trust.d.ts.map +0 -1
  128. package/dist/module-trust.js +0 -77
  129. package/dist/module-trust.js.map +0 -1
  130. package/dist/path-confinement.d.ts +0 -31
  131. package/dist/path-confinement.d.ts.map +0 -1
  132. package/dist/path-confinement.js +0 -44
  133. package/dist/path-confinement.js.map +0 -1
  134. package/dist/planner/predict-then-propose.d.ts +0 -134
  135. package/dist/planner/predict-then-propose.d.ts.map +0 -1
  136. package/dist/planner/predict-then-propose.js +0 -138
  137. package/dist/planner/predict-then-propose.js.map +0 -1
  138. package/dist/planner/propose-journey.d.ts +0 -75
  139. package/dist/planner/propose-journey.d.ts.map +0 -1
  140. package/dist/planner/propose-journey.js +0 -96
  141. package/dist/planner/propose-journey.js.map +0 -1
  142. package/dist/protocol.d.ts +0 -57
  143. package/dist/protocol.d.ts.map +0 -1
  144. package/dist/protocol.js +0 -90
  145. package/dist/protocol.js.map +0 -1
  146. package/dist/registry.d.ts +0 -103
  147. package/dist/registry.d.ts.map +0 -1
  148. package/dist/registry.js +0 -319
  149. package/dist/registry.js.map +0 -1
  150. package/dist/render.d.ts +0 -580
  151. package/dist/render.d.ts.map +0 -1
  152. package/dist/render.js +0 -867
  153. package/dist/render.js.map +0 -1
  154. package/dist/runtime-registry.d.ts +0 -22
  155. package/dist/runtime-registry.d.ts.map +0 -1
  156. package/dist/runtime-registry.js +0 -142
  157. package/dist/runtime-registry.js.map +0 -1
  158. package/dist/sandbox-defaults.d.ts +0 -41
  159. package/dist/sandbox-defaults.d.ts.map +0 -1
  160. package/dist/sandbox-defaults.js +0 -14
  161. package/dist/sandbox-defaults.js.map +0 -1
  162. package/dist/scenarios/browser-run-plan-projection.d.ts +0 -161
  163. package/dist/scenarios/browser-run-plan-projection.d.ts.map +0 -1
  164. package/dist/scenarios/browser-run-plan-projection.js +0 -264
  165. package/dist/scenarios/browser-run-plan-projection.js.map +0 -1
  166. package/dist/scenarios/credential-ref.d.ts +0 -102
  167. package/dist/scenarios/credential-ref.d.ts.map +0 -1
  168. package/dist/scenarios/credential-ref.js +0 -148
  169. package/dist/scenarios/credential-ref.js.map +0 -1
  170. package/dist/scenarios/index.d.ts +0 -7
  171. package/dist/scenarios/index.d.ts.map +0 -1
  172. package/dist/scenarios/index.js +0 -7
  173. package/dist/scenarios/index.js.map +0 -1
  174. package/dist/scenarios/parse.d.ts +0 -18
  175. package/dist/scenarios/parse.d.ts.map +0 -1
  176. package/dist/scenarios/parse.js +0 -212
  177. package/dist/scenarios/parse.js.map +0 -1
  178. package/dist/scenarios/scenario.d.ts +0 -93
  179. package/dist/scenarios/scenario.d.ts.map +0 -1
  180. package/dist/scenarios/scenario.js +0 -27
  181. package/dist/scenarios/scenario.js.map +0 -1
  182. package/dist/scenarios/secret-ref.d.ts +0 -86
  183. package/dist/scenarios/secret-ref.d.ts.map +0 -1
  184. package/dist/scenarios/secret-ref.js +0 -125
  185. package/dist/scenarios/secret-ref.js.map +0 -1
  186. package/dist/scenarios/storage.d.ts +0 -21
  187. package/dist/scenarios/storage.d.ts.map +0 -1
  188. package/dist/scenarios/storage.js +0 -103
  189. package/dist/scenarios/storage.js.map +0 -1
  190. package/dist/server.d.ts +0 -61
  191. package/dist/server.d.ts.map +0 -1
  192. package/dist/server.js +0 -541
  193. package/dist/server.js.map +0 -1
  194. package/dist/session.d.ts +0 -243
  195. package/dist/session.d.ts.map +0 -1
  196. package/dist/session.js +0 -602
  197. package/dist/session.js.map +0 -1
  198. package/dist/tools/alias-kit.d.ts +0 -29
  199. package/dist/tools/alias-kit.d.ts.map +0 -1
  200. package/dist/tools/alias-kit.js +0 -21
  201. package/dist/tools/alias-kit.js.map +0 -1
  202. package/dist/tools/aliases.d.ts +0 -42
  203. package/dist/tools/aliases.d.ts.map +0 -1
  204. package/dist/tools/aliases.js +0 -52
  205. package/dist/tools/aliases.js.map +0 -1
  206. package/dist/tools/analyze-workspace.d.ts +0 -52
  207. package/dist/tools/analyze-workspace.d.ts.map +0 -1
  208. package/dist/tools/analyze-workspace.js +0 -207
  209. package/dist/tools/analyze-workspace.js.map +0 -1
  210. package/dist/tools/analyze.d.ts +0 -163
  211. package/dist/tools/analyze.d.ts.map +0 -1
  212. package/dist/tools/analyze.js +0 -724
  213. package/dist/tools/analyze.js.map +0 -1
  214. package/dist/tools/browser-click.d.ts +0 -18
  215. package/dist/tools/browser-click.d.ts.map +0 -1
  216. package/dist/tools/browser-click.js +0 -110
  217. package/dist/tools/browser-click.js.map +0 -1
  218. package/dist/tools/browser-close-session.d.ts +0 -39
  219. package/dist/tools/browser-close-session.d.ts.map +0 -1
  220. package/dist/tools/browser-close-session.js +0 -120
  221. package/dist/tools/browser-close-session.js.map +0 -1
  222. package/dist/tools/browser-fill.d.ts +0 -18
  223. package/dist/tools/browser-fill.d.ts.map +0 -1
  224. package/dist/tools/browser-fill.js +0 -117
  225. package/dist/tools/browser-fill.js.map +0 -1
  226. package/dist/tools/browser-navigate.d.ts +0 -15
  227. package/dist/tools/browser-navigate.d.ts.map +0 -1
  228. package/dist/tools/browser-navigate.js +0 -104
  229. package/dist/tools/browser-navigate.js.map +0 -1
  230. package/dist/tools/browser-read.d.ts +0 -33
  231. package/dist/tools/browser-read.d.ts.map +0 -1
  232. package/dist/tools/browser-read.js +0 -113
  233. package/dist/tools/browser-read.js.map +0 -1
  234. package/dist/tools/browser-run-scenario.d.ts +0 -28
  235. package/dist/tools/browser-run-scenario.d.ts.map +0 -1
  236. package/dist/tools/browser-run-scenario.js +0 -206
  237. package/dist/tools/browser-run-scenario.js.map +0 -1
  238. package/dist/tools/browser-save-scenario.d.ts +0 -19
  239. package/dist/tools/browser-save-scenario.d.ts.map +0 -1
  240. package/dist/tools/browser-save-scenario.js +0 -447
  241. package/dist/tools/browser-save-scenario.js.map +0 -1
  242. package/dist/tools/browser-select.d.ts +0 -20
  243. package/dist/tools/browser-select.d.ts.map +0 -1
  244. package/dist/tools/browser-select.js +0 -120
  245. package/dist/tools/browser-select.js.map +0 -1
  246. package/dist/tools/browser-snapshot.d.ts +0 -46
  247. package/dist/tools/browser-snapshot.d.ts.map +0 -1
  248. package/dist/tools/browser-snapshot.js +0 -127
  249. package/dist/tools/browser-snapshot.js.map +0 -1
  250. package/dist/tools/browser-start-session.d.ts +0 -24
  251. package/dist/tools/browser-start-session.d.ts.map +0 -1
  252. package/dist/tools/browser-start-session.js +0 -622
  253. package/dist/tools/browser-start-session.js.map +0 -1
  254. package/dist/tools/browser-submit.d.ts +0 -18
  255. package/dist/tools/browser-submit.d.ts.map +0 -1
  256. package/dist/tools/browser-submit.js +0 -106
  257. package/dist/tools/browser-submit.js.map +0 -1
  258. package/dist/tools/browser-type.d.ts +0 -18
  259. package/dist/tools/browser-type.d.ts.map +0 -1
  260. package/dist/tools/browser-type.js +0 -115
  261. package/dist/tools/browser-type.js.map +0 -1
  262. package/dist/tools/browser-wait-for.d.ts +0 -45
  263. package/dist/tools/browser-wait-for.d.ts.map +0 -1
  264. package/dist/tools/browser-wait-for.js +0 -150
  265. package/dist/tools/browser-wait-for.js.map +0 -1
  266. package/dist/tools/browser.d.ts +0 -69
  267. package/dist/tools/browser.d.ts.map +0 -1
  268. package/dist/tools/browser.js +0 -386
  269. package/dist/tools/browser.js.map +0 -1
  270. package/dist/tools/chain.d.ts +0 -41
  271. package/dist/tools/chain.d.ts.map +0 -1
  272. package/dist/tools/chain.js +0 -105
  273. package/dist/tools/chain.js.map +0 -1
  274. package/dist/tools/change-scope.d.ts +0 -25
  275. package/dist/tools/change-scope.d.ts.map +0 -1
  276. package/dist/tools/change-scope.js +0 -110
  277. package/dist/tools/change-scope.js.map +0 -1
  278. package/dist/tools/code-context.d.ts +0 -83
  279. package/dist/tools/code-context.d.ts.map +0 -1
  280. package/dist/tools/code-context.js +0 -416
  281. package/dist/tools/code-context.js.map +0 -1
  282. package/dist/tools/contracts.d.ts +0 -74
  283. package/dist/tools/contracts.d.ts.map +0 -1
  284. package/dist/tools/contracts.js +0 -196
  285. package/dist/tools/contracts.js.map +0 -1
  286. package/dist/tools/cross-pr.d.ts +0 -178
  287. package/dist/tools/cross-pr.d.ts.map +0 -1
  288. package/dist/tools/cross-pr.js +0 -321
  289. package/dist/tools/cross-pr.js.map +0 -1
  290. package/dist/tools/disclosure.d.ts +0 -75
  291. package/dist/tools/disclosure.d.ts.map +0 -1
  292. package/dist/tools/disclosure.js +0 -288
  293. package/dist/tools/disclosure.js.map +0 -1
  294. package/dist/tools/draw-conclusion.d.ts +0 -55
  295. package/dist/tools/draw-conclusion.d.ts.map +0 -1
  296. package/dist/tools/draw-conclusion.js +0 -259
  297. package/dist/tools/draw-conclusion.js.map +0 -1
  298. package/dist/tools/git-context.d.ts +0 -39
  299. package/dist/tools/git-context.d.ts.map +0 -1
  300. package/dist/tools/git-context.js +0 -364
  301. package/dist/tools/git-context.js.map +0 -1
  302. package/dist/tools/git-diff.d.ts +0 -45
  303. package/dist/tools/git-diff.d.ts.map +0 -1
  304. package/dist/tools/git-diff.js +0 -338
  305. package/dist/tools/git-diff.js.map +0 -1
  306. package/dist/tools/git-history.d.ts +0 -16
  307. package/dist/tools/git-history.d.ts.map +0 -1
  308. package/dist/tools/git-history.js +0 -86
  309. package/dist/tools/git-history.js.map +0 -1
  310. package/dist/tools/history.d.ts +0 -34
  311. package/dist/tools/history.d.ts.map +0 -1
  312. package/dist/tools/history.js +0 -121
  313. package/dist/tools/history.js.map +0 -1
  314. package/dist/tools/impact.d.ts +0 -46
  315. package/dist/tools/impact.d.ts.map +0 -1
  316. package/dist/tools/impact.js +0 -225
  317. package/dist/tools/impact.js.map +0 -1
  318. package/dist/tools/index.d.ts +0 -59
  319. package/dist/tools/index.d.ts.map +0 -1
  320. package/dist/tools/index.js +0 -70
  321. package/dist/tools/index.js.map +0 -1
  322. package/dist/tools/kit.d.ts +0 -165
  323. package/dist/tools/kit.d.ts.map +0 -1
  324. package/dist/tools/kit.js +0 -153
  325. package/dist/tools/kit.js.map +0 -1
  326. package/dist/tools/link-workspace.d.ts +0 -24
  327. package/dist/tools/link-workspace.d.ts.map +0 -1
  328. package/dist/tools/link-workspace.js +0 -131
  329. package/dist/tools/link-workspace.js.map +0 -1
  330. package/dist/tools/lookup.d.ts +0 -19
  331. package/dist/tools/lookup.d.ts.map +0 -1
  332. package/dist/tools/lookup.js +0 -63
  333. package/dist/tools/lookup.js.map +0 -1
  334. package/dist/tools/mark-incident.d.ts +0 -28
  335. package/dist/tools/mark-incident.d.ts.map +0 -1
  336. package/dist/tools/mark-incident.js +0 -188
  337. package/dist/tools/mark-incident.js.map +0 -1
  338. package/dist/tools/merged-browser.d.ts +0 -11
  339. package/dist/tools/merged-browser.d.ts.map +0 -1
  340. package/dist/tools/merged-browser.js +0 -20
  341. package/dist/tools/merged-browser.js.map +0 -1
  342. package/dist/tools/merged-context.d.ts +0 -11
  343. package/dist/tools/merged-context.d.ts.map +0 -1
  344. package/dist/tools/merged-context.js +0 -21
  345. package/dist/tools/merged-context.js.map +0 -1
  346. package/dist/tools/merged-observe.d.ts +0 -13
  347. package/dist/tools/merged-observe.d.ts.map +0 -1
  348. package/dist/tools/merged-observe.js +0 -21
  349. package/dist/tools/merged-observe.js.map +0 -1
  350. package/dist/tools/merged-workspace.d.ts +0 -14
  351. package/dist/tools/merged-workspace.d.ts.map +0 -1
  352. package/dist/tools/merged-workspace.js +0 -21
  353. package/dist/tools/merged-workspace.js.map +0 -1
  354. package/dist/tools/observe-runtime.d.ts +0 -250
  355. package/dist/tools/observe-runtime.d.ts.map +0 -1
  356. package/dist/tools/observe-runtime.js +0 -1753
  357. package/dist/tools/observe-runtime.js.map +0 -1
  358. package/dist/tools/observe-tests.d.ts +0 -57
  359. package/dist/tools/observe-tests.d.ts.map +0 -1
  360. package/dist/tools/observe-tests.js +0 -368
  361. package/dist/tools/observe-tests.js.map +0 -1
  362. package/dist/tools/observe.d.ts +0 -28
  363. package/dist/tools/observe.d.ts.map +0 -1
  364. package/dist/tools/observe.js +0 -330
  365. package/dist/tools/observe.js.map +0 -1
  366. package/dist/tools/pr-analysis.d.ts +0 -189
  367. package/dist/tools/pr-analysis.d.ts.map +0 -1
  368. package/dist/tools/pr-analysis.js +0 -299
  369. package/dist/tools/pr-analysis.js.map +0 -1
  370. package/dist/tools/pre-push.d.ts +0 -168
  371. package/dist/tools/pre-push.d.ts.map +0 -1
  372. package/dist/tools/pre-push.js +0 -416
  373. package/dist/tools/pre-push.js.map +0 -1
  374. package/dist/tools/predict-reach.d.ts +0 -57
  375. package/dist/tools/predict-reach.d.ts.map +0 -1
  376. package/dist/tools/predict-reach.js +0 -159
  377. package/dist/tools/predict-reach.js.map +0 -1
  378. package/dist/tools/propagation.d.ts +0 -37
  379. package/dist/tools/propagation.d.ts.map +0 -1
  380. package/dist/tools/propagation.js +0 -162
  381. package/dist/tools/propagation.js.map +0 -1
  382. package/dist/tools/propose-journey.d.ts +0 -16
  383. package/dist/tools/propose-journey.d.ts.map +0 -1
  384. package/dist/tools/propose-journey.js +0 -121
  385. package/dist/tools/propose-journey.js.map +0 -1
  386. package/dist/tools/prove-reach.d.ts +0 -74
  387. package/dist/tools/prove-reach.d.ts.map +0 -1
  388. package/dist/tools/prove-reach.js +0 -286
  389. package/dist/tools/prove-reach.js.map +0 -1
  390. package/dist/tools/questions.d.ts +0 -30
  391. package/dist/tools/questions.d.ts.map +0 -1
  392. package/dist/tools/questions.js +0 -232
  393. package/dist/tools/questions.js.map +0 -1
  394. package/dist/tools/refusal-fetch.d.ts +0 -35
  395. package/dist/tools/refusal-fetch.d.ts.map +0 -1
  396. package/dist/tools/refusal-fetch.js +0 -103
  397. package/dist/tools/refusal-fetch.js.map +0 -1
  398. package/dist/tools/runtime-incident.d.ts +0 -33
  399. package/dist/tools/runtime-incident.d.ts.map +0 -1
  400. package/dist/tools/runtime-incident.js +0 -67
  401. package/dist/tools/runtime-incident.js.map +0 -1
  402. package/dist/tools/runtime-journey-drive.d.ts +0 -102
  403. package/dist/tools/runtime-journey-drive.d.ts.map +0 -1
  404. package/dist/tools/runtime-journey-drive.js +0 -247
  405. package/dist/tools/runtime-journey-drive.js.map +0 -1
  406. package/dist/tools/scope.d.ts +0 -45
  407. package/dist/tools/scope.d.ts.map +0 -1
  408. package/dist/tools/scope.js +0 -186
  409. package/dist/tools/scope.js.map +0 -1
  410. package/dist/tools/similar-incidents.d.ts +0 -43
  411. package/dist/tools/similar-incidents.d.ts.map +0 -1
  412. package/dist/tools/similar-incidents.js +0 -179
  413. package/dist/tools/similar-incidents.js.map +0 -1
  414. package/dist/tools/validate.d.ts +0 -133
  415. package/dist/tools/validate.d.ts.map +0 -1
  416. package/dist/tools/validate.js +0 -442
  417. package/dist/tools/validate.js.map +0 -1
  418. package/dist/tools/verb.d.ts +0 -46
  419. package/dist/tools/verb.d.ts.map +0 -1
  420. package/dist/tools/verb.js +0 -78
  421. package/dist/tools/verb.js.map +0 -1
  422. package/dist/tools/verification-status.d.ts +0 -38
  423. package/dist/tools/verification-status.d.ts.map +0 -1
  424. package/dist/tools/verification-status.js +0 -203
  425. package/dist/tools/verification-status.js.map +0 -1
  426. package/dist/tools/verify-claim.d.ts +0 -29
  427. package/dist/tools/verify-claim.d.ts.map +0 -1
  428. package/dist/tools/verify-claim.js +0 -220
  429. package/dist/tools/verify-claim.js.map +0 -1
  430. package/dist/tools/workspace.d.ts +0 -28
  431. package/dist/tools/workspace.d.ts.map +0 -1
  432. package/dist/tools/workspace.js +0 -101
  433. package/dist/tools/workspace.js.map +0 -1
  434. package/dist/transport.d.ts +0 -32
  435. package/dist/transport.d.ts.map +0 -1
  436. package/dist/transport.js +0 -85
  437. package/dist/transport.js.map +0 -1
  438. package/dist/workspace-index.d.ts +0 -164
  439. package/dist/workspace-index.d.ts.map +0 -1
  440. package/dist/workspace-index.js +0 -381
  441. package/dist/workspace-index.js.map +0 -1
package/dist/protocol.js DELETED
@@ -1,90 +0,0 @@
1
- /**
2
- * JSON-RPC 2.0 + the MCP slice this server speaks — hand-written, not the SDK:
3
- * v1.30.0 pulls 17 deps, nearly all for HTTP/OAuth transports this stdio-only
4
- * server never opens (same call as `node:sqlite`, `node --test`, `tsc` elsewhere).
5
- * Spec-drift risk is mitigated by a pinned `PROTOCOL_VERSION` and exact-frame tests. */
6
- /** Standard JSON-RPC codes. MCP adds none of its own at this layer. */
7
- export const RPC_PARSE_ERROR = -32700;
8
- export const RPC_INVALID_REQUEST = -32600;
9
- export const RPC_METHOD_NOT_FOUND = -32601;
10
- export const RPC_INVALID_PARAMS = -32602;
11
- export const RPC_INTERNAL_ERROR = -32603;
12
- /** The version this server implements. Negotiation echoes the client's version if
13
- * it's on `SUPPORTED_PROTOCOL_VERSIONS`, else answers with this — never claims
14
- * compatibility with an unchecked client version. */
15
- export const PROTOCOL_VERSION = "2025-06-18";
16
- export const SUPPORTED_PROTOCOL_VERSIONS = [
17
- "2025-06-18",
18
- "2025-03-26",
19
- "2024-11-05",
20
- ];
21
- export function negotiateVersion(requested) {
22
- return typeof requested === "string" && SUPPORTED_PROTOCOL_VERSIONS.includes(requested)
23
- ? requested
24
- : PROTOCOL_VERSION;
25
- }
26
- /** A frame that couldn't be understood well enough to answer. Distinct from a
27
- * merely-wrong request — JSON-RPC says a message with no usable id gets no
28
- * response; replying with a fabricated id would be uncorrelatable. */
29
- export class ProtocolError extends Error {
30
- code;
31
- /** Null when the frame carried no usable id and must therefore go unanswered. */
32
- id;
33
- constructor(code, message, id) {
34
- super(message);
35
- this.name = "ProtocolError";
36
- this.code = code;
37
- this.id = id;
38
- }
39
- }
40
- function isRecord(value) {
41
- return typeof value === "object" && value !== null && !Array.isArray(value);
42
- }
43
- /** Parse one line into a request or notification, or throw `ProtocolError`. */
44
- export function parseMessage(line) {
45
- let raw;
46
- try {
47
- raw = JSON.parse(line);
48
- }
49
- catch {
50
- throw new ProtocolError(RPC_PARSE_ERROR, "not valid JSON", null);
51
- }
52
- if (!isRecord(raw)) {
53
- throw new ProtocolError(RPC_INVALID_REQUEST, "message must be a JSON object", null);
54
- }
55
- // Batch requests were removed from MCP in 2025-06-18; never supported here anyway —
56
- // an array reaches the same branch as any other non-object.
57
- const id = raw["id"];
58
- const usableId = typeof id === "string" || typeof id === "number" ? id : null;
59
- if (raw["jsonrpc"] !== "2.0") {
60
- throw new ProtocolError(RPC_INVALID_REQUEST, "jsonrpc must be \"2.0\"", usableId);
61
- }
62
- if (typeof raw["method"] !== "string") {
63
- throw new ProtocolError(RPC_INVALID_REQUEST, "method must be a string", usableId);
64
- }
65
- const params = raw["params"];
66
- if (params !== undefined && !isRecord(params)) {
67
- // Positional params are legal JSON-RPC, illegal MCP. Rejected, not coerced —
68
- // an array silently read as an object would be a wrong answer, not an error.
69
- throw new ProtocolError(RPC_INVALID_PARAMS, "params must be an object", usableId);
70
- }
71
- const method = raw["method"];
72
- const base = params === undefined ? {} : { params };
73
- return usableId === null
74
- ? { jsonrpc: "2.0", method, ...base }
75
- : { jsonrpc: "2.0", id: usableId, method, ...base };
76
- }
77
- export function isRequest(message) {
78
- return "id" in message;
79
- }
80
- export function ok(id, result) {
81
- return { jsonrpc: "2.0", id, result };
82
- }
83
- export function fail(id, code, message, data) {
84
- return {
85
- jsonrpc: "2.0",
86
- id,
87
- error: { code, message, ...(data === undefined ? {} : { data }) },
88
- };
89
- }
90
- //# sourceMappingURL=protocol.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;wFAIwF;AAiCxF,uEAAuE;AACvE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAK,CAAC;AACtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAK,CAAC;AAC1C,MAAM,CAAC,MAAM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AAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAmB;IAC3C,OAAO,IAAI,IAAI,OAAO,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,EAAE,CAAC,EAAS,EAAE,MAAe;IAC3C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,EAAS,EAAE,IAAY,EAAE,OAAe,EAAE,IAAc;IAC3E,OAAO;QACL,OAAO,EAAE,KAAK;QACd,EAAE;QACF,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;KAClE,CAAC;AACJ,CAAC"}
@@ -1,103 +0,0 @@
1
- /** How the server reaches adapters without depending on them: `descry-core` must never
2
- * import `descry-adapters` (rule 1, IR boundary) — sources are named as module specifiers
3
- * in config and loaded at runtime via a `create*Adapter` convention (an ambiguous match
4
- * errors, never guesses). A failed load is disclosed as `SourceLoadFailure`, never silently
5
- * skipped (§20.2). Specifiers resolve from the repo root first (npx isolates adapters there), then this package's own closure. */
6
- import type { IRSource, LanguageAdapter, RepoRoot, StructuredSkipEntry } from "@descryy/ir";
7
- /** One entry in the configured source list. A bare string is `{ module }`. */
8
- export interface SourceSpec {
9
- readonly module: string;
10
- /** Named export to call. Defaults to the `create*Adapter` convention. */
11
- readonly export?: string;
12
- /** Passed to the factory. Adapter-specific and opaque here. */
13
- readonly options?: Record<string, unknown>;
14
- }
15
- export interface LoadedSource {
16
- readonly spec: SourceSpec;
17
- readonly source: IRSource;
18
- /** Present when the source implements `LanguageAdapter`, so `detect` can run. */
19
- readonly adapter: LanguageAdapter | null;
20
- /**
21
- * The absolute path this specifier actually resolved to. `null` only when
22
- * the server's own module closure resolved it (`via: "server"`) and
23
- * `import.meta.resolve` itself could not report where from.
24
- *
25
- * UAT phase 4 F3/§13.2.2: a bare specifier can resolve to more than one
26
- * installed build with the same name (a stray `node_modules` above the
27
- * repository shadows the intended one via CJS resolution's upward walk),
28
- * and nothing previously said which build actually ran. This is that
29
- * disclosure.
30
- */
31
- readonly resolvedPath: string | null;
32
- /**
33
- * The version declared by the resolved module's own nearest
34
- * `package.json`, walking up from `resolvedPath` — the *installed
35
- * artifact's* version. Deliberately not the module's self-declared
36
- * version constant (`source.version`, if it sets one): those two can
37
- * disagree (an adapter's hardcoded `ADAPTER_VERSION` left stale while its
38
- * `package.json` moved on), and conflating them would hide exactly the
39
- * drift this field exists to catch. `null` when `resolvedPath` is `null`,
40
- * or when no `package.json` encloses it.
41
- */
42
- readonly packageVersion: string | null;
43
- /** Which resolution path found it: the scanned repository's own
44
- * `node_modules` (`"repo"`), or this server's own module closure
45
- * (`"server"`). Both are legitimate — the point is naming which. */
46
- readonly via: "repo" | "server";
47
- /**
48
- * UAT phase 5 §1b: set when a candidate resolved from the repository's own
49
- * `node_modules` existed but was rejected for landing outside the
50
- * repository root (a stray install in an ancestor directory, e.g.
51
- * `$HOME/node_modules`). Names the rejected path and why, so a repo whose
52
- * adapter keeps coming back stale can see that another candidate existed
53
- * and lost, not just which one won.
54
- */
55
- readonly rejectedRepoCandidate: string | null;
56
- }
57
- export interface SourceLoadFailure {
58
- readonly spec: SourceSpec;
59
- readonly reason: string;
60
- }
61
- export interface RegistryResult {
62
- readonly loaded: readonly LoadedSource[];
63
- readonly failed: readonly SourceLoadFailure[];
64
- }
65
- export declare function normaliseSpec(entry: string | SourceSpec): SourceSpec;
66
- /** @param repoPath Repo being analysed, when known — specifiers resolve from here first;
67
- * without it only this package's closure is searched (correct for absolute-path/`file:` callers). */
68
- export declare function loadSources(entries: readonly (string | SourceSpec)[], repoPath?: string): Promise<RegistryResult>;
69
- /**
70
- * Gap 1 (UAT phase 5, §0): a path-specifier refusal named only the environment-variable
71
- * escape hatch — "set DESCRY_ALLOW_PATH_ADAPTER_MODULES=1" — steering an operator toward
72
- * disabling a security control even when a safe fix exists right next to it. Measured case:
73
- * `.descry/config.json` named a local monorepo build
74
- * (`.../adapter-typescript/dist/index.js`) while the published package of the same name was
75
- * already installed and resolvable, and the refusal never mentioned it.
76
- *
77
- * Before handing back the refusal, this checks whether a published package of the same
78
- * name — read from the refused path's own nearest `package.json`, never guessed — is
79
- * already resolvable, and leads with that when it is. The environment variable is
80
- * mentioned last, as the operator-only escape hatch it is: "a security control people
81
- * routinely disable to get their work done is not a security control."
82
- */
83
- export declare function withSafeAlternative(reason: string, specifier: string, repoPath: string | undefined): Promise<string>;
84
- /** One adapter's `detect()`-time evidence, kept alongside `applicable`/`skipped` rather than
85
- * folded into either — `DetectionResult.evidence` is populated on a match as much as on a
86
- * skip (a matched adapter can still report "skipped 3: a separate checkout with its own
87
- * .git"), so it is collected independently of which bucket the source landed in. */
88
- export interface DetectionEvidence {
89
- readonly source: string;
90
- readonly entries: readonly (string | StructuredSkipEntry)[];
91
- }
92
- /** Asks each loaded adapter whether it claims this repository. A non-`LanguageAdapter`
93
- * source (the git reader) always runs. A throwing `detect` counts as "did not detect",
94
- * with the reason recorded — it can't fail the whole run, and can't hide either. */
95
- export declare function detectSources(sources: readonly LoadedSource[], root: RepoRoot): Promise<{
96
- readonly applicable: readonly LoadedSource[];
97
- readonly skipped: readonly {
98
- source: LoadedSource;
99
- reason: string;
100
- }[];
101
- readonly evidence: readonly DetectionEvidence[];
102
- }>;
103
- //# sourceMappingURL=registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;mIAImI;AAOnI,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAI5F,8EA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B;AAuCD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,OAAO,CAAC,MAAM,CAAC,CAejB;AAyLD;;;qFAGqF;AACrF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,mBAAmB,CAAC,EAAE,CAAC;CAC7D;AAED;;qFAEqF;AACrF,wBAAsB,aAAa,CACjC,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC;IACT,QAAQ,CAAC,UAAU,EAAE,SAAS,YAAY,EAAE,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,MAAM,EAAE,YAAY,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtE,QAAQ,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACjD,CAAC,CA2BD"}
package/dist/registry.js DELETED
@@ -1,319 +0,0 @@
1
- /** How the server reaches adapters without depending on them: `descry-core` must never
2
- * import `descry-adapters` (rule 1, IR boundary) — sources are named as module specifiers
3
- * in config and loaded at runtime via a `create*Adapter` convention (an ambiguous match
4
- * errors, never guesses). A failed load is disclosed as `SourceLoadFailure`, never silently
5
- * skipped (§20.2). Specifiers resolve from the repo root first (npx isolates adapters there), then this package's own closure. */
6
- var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
7
- if (typeof path === "string" && /^\.\.?\//.test(path)) {
8
- return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
9
- return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
10
- });
11
- }
12
- return path;
13
- };
14
- import { createRequire } from "node:module";
15
- import { readFileSync } from "node:fs";
16
- import { dirname, join } from "node:path";
17
- import { fileURLToPath, pathToFileURL } from "node:url";
18
- import { checkModuleTrust, checkRepoResolvedModuleTrust, resolvesInsideRepo } from "./module-trust.js";
19
- const FACTORY_PATTERN = /^create[A-Za-z0-9]*Adapter$/;
20
- export function normaliseSpec(entry) {
21
- return typeof entry === "string" ? { module: entry } : entry;
22
- }
23
- /** A loaded module is a `LanguageAdapter` when it can be asked what it supports. Duck-typed
24
- * on `detect`/`capabilities` — the two methods the server calls — since `instanceof` across
25
- * separately-compiled adapter packages is unreliable. */
26
- function asAdapter(source) {
27
- const candidate = source;
28
- return typeof candidate.detect === "function" && typeof candidate.capabilities === "function"
29
- ? source
30
- : null;
31
- }
32
- function describe(error) {
33
- if (error instanceof Error) {
34
- const code = error.code;
35
- return code === undefined ? error.message : `${code}: ${error.message}`;
36
- }
37
- return String(error);
38
- }
39
- /** @param repoPath Repo being analysed, when known — specifiers resolve from here first;
40
- * without it only this package's closure is searched (correct for absolute-path/`file:` callers). */
41
- export async function loadSources(entries, repoPath) {
42
- const loaded = [];
43
- const failed = [];
44
- for (const entry of entries) {
45
- const spec = normaliseSpec(entry);
46
- try {
47
- const instantiated = await instantiate(spec, repoPath);
48
- loaded.push({
49
- ...instantiated,
50
- spec,
51
- packageVersion: packageVersionFor(instantiated.resolvedPath),
52
- });
53
- }
54
- catch (error) {
55
- failed.push({ spec, reason: describe(error) });
56
- }
57
- }
58
- return { loaded, failed };
59
- }
60
- /** The filesystem path a path-like specifier names, when it names one at all. `file:` becomes
61
- * its path; a relative/absolute/drive/home-relative string is already one. Any other
62
- * URL-scheme specifier (`http:`, `data:`, …) has no filesystem path to derive a package name
63
- * from, so this returns `null` for it rather than guessing. */
64
- function filesystemPathOf(specifier) {
65
- if (specifier.startsWith("file:")) {
66
- try {
67
- return fileURLToPath(specifier);
68
- }
69
- catch {
70
- return null;
71
- }
72
- }
73
- if (specifier.startsWith(".") || specifier.startsWith("/") || specifier.startsWith("~"))
74
- return specifier;
75
- if (/^[a-zA-Z]:[\\/]/.test(specifier))
76
- return specifier;
77
- return null;
78
- }
79
- /** The published package a refused path is presumably a build of — read from the nearest
80
- * enclosing `package.json`'s own `name`, derived rather than guessed. `null` when none
81
- * encloses it. Mirrors `packageVersionFor`'s walk, for a different field. */
82
- function packageNameFor(startPath) {
83
- let dir = dirname(startPath);
84
- for (;;) {
85
- try {
86
- const pkg = JSON.parse(readFileSync(join(dir, "package.json"), "utf8"));
87
- if (typeof pkg.name === "string" && pkg.name !== "")
88
- return pkg.name;
89
- return null;
90
- }
91
- catch {
92
- // Not found at this level, or not parseable — keep walking up; a
93
- // malformed package.json above the real one must not stop the search.
94
- }
95
- const parent = dirname(dir);
96
- if (parent === dir)
97
- return null; // reached the filesystem root
98
- dir = parent;
99
- }
100
- }
101
- /**
102
- * Gap 1 (UAT phase 5, §0): a path-specifier refusal named only the environment-variable
103
- * escape hatch — "set DESCRY_ALLOW_PATH_ADAPTER_MODULES=1" — steering an operator toward
104
- * disabling a security control even when a safe fix exists right next to it. Measured case:
105
- * `.descry/config.json` named a local monorepo build
106
- * (`.../adapter-typescript/dist/index.js`) while the published package of the same name was
107
- * already installed and resolvable, and the refusal never mentioned it.
108
- *
109
- * Before handing back the refusal, this checks whether a published package of the same
110
- * name — read from the refused path's own nearest `package.json`, never guessed — is
111
- * already resolvable, and leads with that when it is. The environment variable is
112
- * mentioned last, as the operator-only escape hatch it is: "a security control people
113
- * routinely disable to get their work done is not a security control."
114
- */
115
- export async function withSafeAlternative(reason, specifier, repoPath) {
116
- const path = filesystemPathOf(specifier);
117
- const name = path === null ? null : packageNameFor(path);
118
- if (name === null)
119
- return reason;
120
- const led = `"${name}" is installed and can be used instead — set "sources" to the package name rather than the path. `;
121
- const fromRepo = repoPath === undefined ? { reason: "no repository root" } : resolveFromRepo(name, repoPath);
122
- if ("url" in fromRepo)
123
- return led + reason;
124
- try {
125
- import.meta.resolve(name);
126
- return led + reason;
127
- }
128
- catch {
129
- return `No published package named "${name}" is installed and resolvable, so ${reason.charAt(0).toLowerCase()}${reason.slice(1)}`;
130
- }
131
- }
132
- /** Resolves a specifier as the repo's own `node_modules` would, via `createRequire` anchored
133
- * at its `package.json` (CJS resolution, `require`/`default` conditions), then imports the
134
- * resolved path as ESM. Returns the reason on failure rather than throwing — not yet a failure until the fallback also fails. */
135
- function resolveFromRepo(specifier, repoPath) {
136
- try {
137
- const require = createRequire(pathToFileURL(join(repoPath, "package.json")));
138
- return { url: pathToFileURL(require.resolve(specifier)).href };
139
- }
140
- catch (error) {
141
- return { reason: describe(error) };
142
- }
143
- }
144
- async function instantiate(spec, repoPath) {
145
- const imported = await importSource(spec.module, repoPath);
146
- const module = imported.module;
147
- let factoryName = spec.export;
148
- if (factoryName === undefined) {
149
- const candidates = Object.keys(module).filter((key) => FACTORY_PATTERN.test(key) && typeof module[key] === "function");
150
- if (candidates.length === 0) {
151
- throw new Error(`no export matching create*Adapter. Name one explicitly with ` +
152
- `{ "module": "${spec.module}", "export": "..." }.`);
153
- }
154
- if (candidates.length > 1) {
155
- throw new Error(`${candidates.length} exports match create*Adapter (${candidates.sort().join(", ")}). ` +
156
- "Name the one to use explicitly rather than letting the choice depend on export order.");
157
- }
158
- factoryName = candidates[0];
159
- }
160
- const factory = module[factoryName];
161
- if (typeof factory !== "function") {
162
- throw new Error(`export "${factoryName}" is not a function`);
163
- }
164
- const source = factory(spec.options);
165
- if (typeof source?.emit !== "function" || typeof source.id !== "string") {
166
- throw new Error(`"${factoryName}" did not return an IRSource (needs \`id\` and \`emit\`)`);
167
- }
168
- return {
169
- source,
170
- adapter: asAdapter(source),
171
- resolvedPath: imported.resolvedPath,
172
- via: imported.via,
173
- rejectedRepoCandidate: imported.rejectedRepoCandidate ?? null,
174
- };
175
- }
176
- /** Reads the version of the nearest enclosing `package.json`, walking up from `startPath`'s
177
- * directory — the *installed artifact's* version, never the module's own self-declared
178
- * constant. `null` when `startPath` is `null` or no `package.json` encloses it (a bare
179
- * path-specifier source with no package boundary at all): a real absence, never a guess. */
180
- function packageVersionFor(startPath) {
181
- if (startPath === null)
182
- return null;
183
- let dir = dirname(startPath);
184
- for (;;) {
185
- try {
186
- const pkg = JSON.parse(readFileSync(join(dir, "package.json"), "utf8"));
187
- if (typeof pkg.version === "string")
188
- return pkg.version;
189
- return null;
190
- }
191
- catch {
192
- // Not found at this level, or not parseable — keep walking up; a
193
- // malformed package.json above the real one must not stop the search.
194
- }
195
- const parent = dirname(dir);
196
- if (parent === dir)
197
- return null; // reached the filesystem root
198
- dir = parent;
199
- }
200
- }
201
- /** Repository root first, the server's own closure second. Only a resolution failure falls
202
- * through — a module that resolves and then throws is that module's own failure, not "could not be found". */
203
- async function importSource(specifier, repoPath) {
204
- // A-F1: specifier can come straight from the repo's own .descry/config.json (module-trust.ts).
205
- // Checked on the raw string before either resolution attempt, since `resolveFromRepo` always
206
- // turns its result into a `file:` URL regardless of whether the specifier was path-like.
207
- const trust = checkModuleTrust(specifier);
208
- if (!trust.allowed)
209
- throw new Error(await withSafeAlternative(trust.reason, specifier, repoPath));
210
- // Plain optional strings rather than a discriminated union re-assigned in
211
- // place: the union narrows cleanly at each branch but not reliably across
212
- // the reassignment once "outside the repo" reduces a `{ url }` candidate
213
- // back to a failure — this shape keeps every branch's narrowing local.
214
- let repoUrl;
215
- let repoFailureReason;
216
- let rejectedRepoCandidate;
217
- if (repoPath === undefined) {
218
- repoFailureReason = "no repository root";
219
- }
220
- else {
221
- const resolved = resolveFromRepo(specifier, repoPath);
222
- if ("reason" in resolved) {
223
- repoFailureReason = resolved.reason;
224
- }
225
- else {
226
- const resolvedAbsolutePath = fileURLToPath(resolved.url);
227
- if (resolvesInsideRepo(repoPath, resolvedAbsolutePath)) {
228
- repoUrl = resolved.url;
229
- }
230
- else {
231
- // The intent of "the repo's own node_modules" is a resolution that
232
- // lands inside the repository. `resolveFromRepo` anchors
233
- // `createRequire` at the repo's `package.json` and lets Node's
234
- // ordinary CJS algorithm walk the entire ancestor chain, so a stray
235
- // install anywhere above the repository — `$HOME/node_modules`,
236
- // `/node_modules` — wins regardless of what the repository or the
237
- // server actually intended. Treated exactly like "no repo-local
238
- // candidate found", not like a legitimate repo-local pin, and the
239
- // rejected path is disclosed rather than silently discarded (F2's
240
- // server-bundled-adapter fix is only testable once this candidate
241
- // stops shadowing it).
242
- rejectedRepoCandidate =
243
- `a candidate resolved to ${resolvedAbsolutePath}, which is outside the repository root ` +
244
- `${repoPath} — Node's own upward node_modules search found it above the repository ` +
245
- "rather than inside it, so it was treated as the operator's environment, not the " +
246
- "repository's.";
247
- repoFailureReason = rejectedRepoCandidate;
248
- }
249
- }
250
- }
251
- if (repoUrl !== undefined) {
252
- // A-F1 follow-up: checkModuleTrust only sees the raw specifier, not that it resolves into
253
- // the repo's own git-tracked node_modules — closes the gap where a hostile repo commits
254
- // node_modules/<name> and delivers a payload on clone alone; override: DESCRY_ALLOW_TRACKED_NODE_MODULES=1.
255
- const resolvedAbsolutePath = fileURLToPath(repoUrl);
256
- const repoTrust = await checkRepoResolvedModuleTrust({ specifier, repoPath: repoPath, resolvedAbsolutePath });
257
- if (!repoTrust.allowed)
258
- throw new Error(repoTrust.reason);
259
- const module = await import(__rewriteRelativeImportExtension(repoUrl));
260
- return { module, resolvedPath: resolvedAbsolutePath, via: "repo" };
261
- }
262
- try {
263
- const module = await import(__rewriteRelativeImportExtension(specifier));
264
- // Best-effort only — `import.meta.resolve` reports where the server's
265
- // own module graph found it, but is not guaranteed to succeed for every
266
- // legal specifier shape a runtime `import()` accepts.
267
- let resolvedPath = null;
268
- try {
269
- resolvedPath = fileURLToPath(import.meta.resolve(specifier));
270
- }
271
- catch {
272
- resolvedPath = null;
273
- }
274
- return {
275
- module,
276
- resolvedPath,
277
- via: "server",
278
- ...(rejectedRepoCandidate === undefined ? {} : { rejectedRepoCandidate }),
279
- };
280
- }
281
- catch (error) {
282
- if (repoPath === undefined)
283
- throw error;
284
- throw new Error(`${describe(error)} — and it did not resolve from the repository root ${repoPath} either ` +
285
- `(${repoFailureReason})`, { cause: error });
286
- }
287
- }
288
- /** Asks each loaded adapter whether it claims this repository. A non-`LanguageAdapter`
289
- * source (the git reader) always runs. A throwing `detect` counts as "did not detect",
290
- * with the reason recorded — it can't fail the whole run, and can't hide either. */
291
- export async function detectSources(sources, root) {
292
- const applicable = [];
293
- const skipped = [];
294
- const evidence = [];
295
- for (const entry of sources) {
296
- if (entry.adapter === null) {
297
- applicable.push(entry);
298
- continue;
299
- }
300
- try {
301
- const detection = await entry.adapter.detect(root);
302
- if (detection.evidence.length > 0) {
303
- evidence.push({ source: entry.source.id, entries: detection.evidence });
304
- }
305
- if (detection.detected)
306
- applicable.push(entry);
307
- else
308
- skipped.push({
309
- source: entry,
310
- reason: "found nothing it recognises in this repository",
311
- });
312
- }
313
- catch (error) {
314
- skipped.push({ source: entry, reason: `detection failed — ${describe(error)}` });
315
- }
316
- }
317
- return { applicable, skipped, evidence };
318
- }
319
- //# sourceMappingURL=registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;mIAImI;;;;;;;;;AAEnI,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIxD,OAAO,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAgEvG,MAAM,eAAe,GAAG,6BAA6B,CAAC;AAEtD,MAAM,UAAU,aAAa,CAAC,KAA0B;IACtD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,E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