@descryy/mcp 0.11.4 → 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 +7 -7
  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 -591
  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 -1518
  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 -151
  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 -39
  99. package/dist/capped.d.ts.map +0 -1
  100. package/dist/capped.js +0 -43
  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 -327
  149. package/dist/registry.js.map +0 -1
  150. package/dist/render.d.ts +0 -623
  151. package/dist/render.d.ts.map +0 -1
  152. package/dist/render.js +0 -968
  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 -651
  193. package/dist/server.js.map +0 -1
  194. package/dist/session.d.ts +0 -356
  195. package/dist/session.d.ts.map +0 -1
  196. package/dist/session.js +0 -779
  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 -225
  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 -640
  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 -444
  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 -370
  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 -307
  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 -385
  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 -106
  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 -262
  355. package/dist/tools/observe-runtime.d.ts.map +0 -1
  356. package/dist/tools/observe-runtime.js +0 -1901
  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 -374
  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 -123
  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 -217
  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 -203
  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 -520
  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
@@ -1,165 +0,0 @@
1
- /** What every tool is handed and returns. A tool produces a `ToolAnswer`, never content —
2
- * `render.ts` alone turns it into a reply, attaching the staleness stamp, reliability cap and
3
- * disclosures. A tool cannot ship a result with the caveats stripped off. */
4
- import type { ResolutionLevel, ResultState, ToolClass } from "@descryy/ir";
5
- import type { ReplyFit, ToolAnswer, ToolTier, TruncationDetail, WitnessedEvidence } from "../render.ts";
6
- import type { Session } from "../session.ts";
7
- /** Streaming narration, §22.2. A no-op when the client sent no progress token; tools call it
8
- * unconditionally and leave "is anyone listening" to the caller. */
9
- export type Progress = (message: string, current?: number, total?: number) => void;
10
- export interface ToolContext {
11
- readonly session: Session;
12
- readonly progress: Progress;
13
- readonly signal: AbortSignal;
14
- }
15
- export interface ToolDefinition {
16
- readonly name: string;
17
- readonly title: string;
18
- readonly description: string;
19
- /** DEC-278's three classes (`ai-tool-contract.md` §8). Not "does it write bytes" but "can this
20
- * change a later finding unannounced" — twelve of the registry's 34 tools are `action`, gated
21
- * by §4's handshake, capped at reliability B by DEC-223. No default: unset silently treats
22
- * writes as pure. */
23
- readonly class: ToolClass;
24
- /** MK-5 — does the output state a conclusion, or just a graph fact? Required, undefaulted, same
25
- * reasoning as `class`. See `ToolTier` in `../render.ts` for why the type lives there. */
26
- readonly tier: ToolTier;
27
- /** Contract §6 rule 8. Starts at `"1.0.0"`; a future bump invalidates golden investigations
28
- * that depended on the old behaviour (`ai-layer-plan.md` §9 layer 4). */
29
- readonly version: string;
30
- readonly inputSchema: Record<string, unknown>;
31
- run(args: Record<string, unknown>, ctx: ToolContext): Promise<ToolAnswer<unknown>>;
32
- /** Required iff `class === "action"` (enforced in `action-handshake.ts` and
33
- * `tool-classes.test.ts`, not by the type). Returns the "willDo" text, or `undefined` when this
34
- * call has nothing to confirm (e.g. `questions` with no `answer`). */
35
- describeAction?(args: Record<string, unknown>, ctx: ToolContext): string | undefined | Promise<string | undefined>;
36
- /**
37
- * The form of this call's arguments that may be kept — B1.
38
- *
39
- * `server.ts` records every completed call's arguments on the `Session` so
40
- * `verify_claim` can check a citation against what a tool actually
41
- * returned. That record lives for the life of the connection, and
42
- * `browser_start_session` is the first tool whose arguments can carry a
43
- * credential. A tool that takes one implements this and hands back a copy
44
- * with the values replaced; every other tool leaves it undefined and is
45
- * recorded verbatim, exactly as before.
46
- *
47
- * The tool's job rather than a generic pass in the server, deliberately:
48
- * only the tool knows which of its arguments is a secret, and a
49
- * server-side "looks sensitive" heuristic is the pattern-guessing this
50
- * repo's own redactor already refuses to be.
51
- */
52
- redactArgs?(args: Record<string, unknown>): Record<string, unknown>;
53
- }
54
- /** An argument the caller can fix — distinct from a thrown `Error` (a bug here). This becomes an
55
- * `isError` result the agent can read and retry from; a bug becomes an unreadable JSON-RPC error. */
56
- export declare class ToolInputError extends Error {
57
- constructor(message: string);
58
- }
59
- export declare function optionalString(args: Record<string, unknown>, key: string): string | undefined;
60
- export declare function requiredString(args: Record<string, unknown>, key: string): string;
61
- export declare function optionalStringArray(args: Record<string, unknown>, key: string): readonly string[] | undefined;
62
- export declare function optionalInteger(args: Record<string, unknown>, key: string, min: number): number | undefined;
63
- export declare function optionalEnum<T extends string>(args: Record<string, unknown>, key: string, allowed: readonly T[]): T | undefined;
64
- export declare function optionalBoolean(args: Record<string, unknown>, key: string): boolean | undefined;
65
- /** Wraps data that did not come from the query layer in the same envelope — e.g. `analyze`, which
66
- * writes rather than reads and has no `QueryResult`, so its reply still carries the same stamp. */
67
- export declare function answer<T>(options: {
68
- readonly headline: string;
69
- readonly data: T;
70
- readonly resolutionFloor: ResolutionLevel;
71
- readonly commitSha: string | null;
72
- readonly graphBuiltAt: number | null;
73
- readonly irSchemaVersion: number;
74
- readonly commitSpread: number;
75
- readonly repoCount: number;
76
- readonly notes: readonly string[];
77
- readonly truncated?: boolean;
78
- readonly truncatedDetail?: TruncationDetail;
79
- readonly nameLevel: boolean;
80
- /** One of the five result states (`ai-tool-contract.md` §1). Omitted means `"ok"`. */
81
- readonly state?: ResultState;
82
- /** §5.4 — see `render.ts`'s `ToolAnswer.refusalSummary` doc for which callers have one. */
83
- readonly refusalSummary?: {
84
- readonly count: number;
85
- readonly exemplar: string;
86
- readonly handle: string;
87
- };
88
- /** See `render.ts`'s `ToolAnswer.fitToBudget` — how this tool shrinks to the reply ceiling. */
89
- readonly fitToBudget?: (budgetBytes: number) => ReplyFit<T>;
90
- /** See `render.ts`'s `ToolAnswer.runtimeEvidence`. Set only by a tool that actually watched a
91
- * running app; omitted everywhere else, including every refusal. */
92
- readonly runtimeEvidence?: WitnessedEvidence;
93
- }): ToolAnswer<T>;
94
- /** An IR node as it appears in a reply. Optional fields are omitted, not `null`, keeping a
95
- * 1,000-node reply affordable — callers test for presence. `language` passes through verbatim;
96
- * nothing here reads or branches on it (rule 1 — no language name above the IR boundary). */
97
- export interface BriefNode {
98
- readonly id: string;
99
- readonly type: string;
100
- readonly name: string;
101
- readonly file?: string;
102
- /** Start line only — a reply carries where to look, not how much to read. */
103
- readonly line?: number;
104
- readonly language?: string;
105
- readonly resolution: number;
106
- }
107
- /** Returned when a symbol/path/id resolved to nothing or to more than one thing (shared by
108
- * `impact` and `propagation` via `resolveOneNode`): empty `candidates` means no match, two or
109
- * more means ambiguous — one is impossible, that case resolves. */
110
- export interface NodeCandidates {
111
- readonly candidates: readonly BriefNode[];
112
- }
113
- /** Trim an IR node down to what an agent needs, so a 1,000-node reply stays readable. */
114
- export declare function briefNode(node: {
115
- id: string;
116
- type: string;
117
- name: string;
118
- file: string | null;
119
- range: {
120
- startLine: number;
121
- endLine: number;
122
- } | null;
123
- language: string | null;
124
- resolution: number;
125
- }): BriefNode;
126
- /**
127
- * Descry's own state inside this repository, which is not the developer's
128
- * uncommitted change.
129
- *
130
- * ## Two paths, not one, and the second is the one that bit
131
- *
132
- * The first version derived this from the configured graph path alone. That is
133
- * right for a single repository, where the graph sits in this repo's own
134
- * `.descry/` — and wrong the moment two repositories share one graph, which is
135
- * exactly what `link_workspace` produces:
136
- *
137
- * ```json
138
- * // sherpa-backend/.descry/config.json
139
- * "graph": "/home/…/sherpa-frontend/.descry/graph.db"
140
- * ```
141
- *
142
- * The derived exclusion then pointed into the *other* repository, and this
143
- * repository's own `.descry/config.json` was excluded by nothing. Measured on a
144
- * real workspace: it was reported as the developer's uncommitted work. Not an
145
- * edge case — every shared-graph workspace has it.
146
- *
147
- * `.descry/evidence.db` escaped only because that repository's `.gitignore`
148
- * happened to carry `*.db`. **The exclusion must not depend on the user having
149
- * gitignored anything**, which is what that near-miss shows: a tool's own state
150
- * is excluded because it is the tool's, not because someone tidied up.
151
- *
152
- * ## Why the graph path is still consulted
153
- *
154
- * It is configurable, so it can be moved out of `.descry/` and stay inside the
155
- * repository. A path outside the repository costs nothing to list — it is not
156
- * in this working tree — and is kept rather than special-cased, because the
157
- * test for "is this path inside this repo" is the kind that is subtly wrong on
158
- * symlinks and relative paths.
159
- *
160
- * Returned as directory prefixes matched at a segment boundary by the git
161
- * helpers, so `.descry` excludes `.descry/config.json` and leaves
162
- * `src/.descryfile.py` alone.
163
- */
164
- export declare function descryOwnState(graphPath: string): readonly string[];
165
- //# sourceMappingURL=kit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kit.d.ts","sourceRoot":"","sources":["../../src/tools/kit.ts"],"names":[],"mappings":"AAAA;;8EAE8E;AAO9E,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE3E,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACxG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;qEACqE;AACrE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,E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S,CAAC,IAAI,EAAE;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACrD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,SAAS,CAUZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAWnE"}
package/dist/tools/kit.js DELETED
@@ -1,153 +0,0 @@
1
- /** What every tool is handed and returns. A tool produces a `ToolAnswer`, never content —
2
- * `render.ts` alone turns it into a reply, attaching the staleness stamp, reliability cap and
3
- * disclosures. A tool cannot ship a result with the caveats stripped off. */
4
- import { dirname } from "node:path";
5
- import { CONFIG_RELATIVE_PATH } from "../session.js";
6
- /** An argument the caller can fix — distinct from a thrown `Error` (a bug here). This becomes an
7
- * `isError` result the agent can read and retry from; a bug becomes an unreadable JSON-RPC error. */
8
- export class ToolInputError extends Error {
9
- constructor(message) {
10
- super(message);
11
- this.name = "ToolInputError";
12
- }
13
- }
14
- // Hand-written, not schema-validated: a validator would be a second source of truth for the
15
- // schemas already declared to the client.
16
- export function optionalString(args, key) {
17
- const value = args[key];
18
- if (value === undefined || value === null)
19
- return undefined;
20
- if (typeof value !== "string")
21
- throw new ToolInputError(`"${key}" must be a string`);
22
- return value;
23
- }
24
- export function requiredString(args, key) {
25
- const value = optionalString(args, key);
26
- if (value === undefined || value === "")
27
- throw new ToolInputError(`"${key}" is required`);
28
- return value;
29
- }
30
- export function optionalStringArray(args, key) {
31
- const value = args[key];
32
- if (value === undefined || value === null)
33
- return undefined;
34
- if (!Array.isArray(value) || value.some((v) => typeof v !== "string")) {
35
- throw new ToolInputError(`"${key}" must be an array of strings`);
36
- }
37
- return value;
38
- }
39
- export function optionalInteger(args, key, min) {
40
- const value = args[key];
41
- if (value === undefined || value === null)
42
- return undefined;
43
- if (typeof value !== "number" || !Number.isInteger(value) || value < min) {
44
- throw new ToolInputError(`"${key}" must be an integer of at least ${min}`);
45
- }
46
- return value;
47
- }
48
- export function optionalEnum(args, key, allowed) {
49
- const value = optionalString(args, key);
50
- if (value === undefined)
51
- return undefined;
52
- if (!allowed.includes(value)) {
53
- throw new ToolInputError(`"${key}" must be one of: ${allowed.join(", ")}`);
54
- }
55
- return value;
56
- }
57
- export function optionalBoolean(args, key) {
58
- const value = args[key];
59
- if (value === undefined || value === null)
60
- return undefined;
61
- if (typeof value !== "boolean")
62
- throw new ToolInputError(`"${key}" must be a boolean`);
63
- return value;
64
- }
65
- /** Wraps data that did not come from the query layer in the same envelope — e.g. `analyze`, which
66
- * writes rather than reads and has no `QueryResult`, so its reply still carries the same stamp. */
67
- export function answer(options) {
68
- const result = {
69
- data: options.data,
70
- stamp: {
71
- commitSha: options.commitSha,
72
- graphBuiltAt: options.graphBuiltAt,
73
- irSchemaVersion: options.irSchemaVersion,
74
- commitSpread: options.commitSpread,
75
- repoCount: options.repoCount,
76
- resolutionFloor: options.resolutionFloor,
77
- },
78
- truncated: options.truncated ?? false,
79
- notes: options.notes,
80
- };
81
- return {
82
- result,
83
- nameLevel: options.nameLevel,
84
- headline: options.headline,
85
- ...(options.state === undefined ? {} : { state: options.state }),
86
- ...(options.truncatedDetail === undefined ? {} : { truncatedDetail: options.truncatedDetail }),
87
- ...(options.refusalSummary === undefined ? {} : { refusalSummary: options.refusalSummary }),
88
- ...(options.fitToBudget === undefined ? {} : { fitToBudget: options.fitToBudget }),
89
- ...(options.runtimeEvidence === undefined ? {} : { runtimeEvidence: options.runtimeEvidence }),
90
- };
91
- }
92
- /** Trim an IR node down to what an agent needs, so a 1,000-node reply stays readable. */
93
- export function briefNode(node) {
94
- return {
95
- id: node.id,
96
- type: node.type,
97
- name: node.name,
98
- ...(node.file === null ? {} : { file: node.file }),
99
- ...(node.range === null ? {} : { line: node.range.startLine }),
100
- ...(node.language === null ? {} : { language: node.language }),
101
- resolution: node.resolution,
102
- };
103
- }
104
- /**
105
- * Descry's own state inside this repository, which is not the developer's
106
- * uncommitted change.
107
- *
108
- * ## Two paths, not one, and the second is the one that bit
109
- *
110
- * The first version derived this from the configured graph path alone. That is
111
- * right for a single repository, where the graph sits in this repo's own
112
- * `.descry/` — and wrong the moment two repositories share one graph, which is
113
- * exactly what `link_workspace` produces:
114
- *
115
- * ```json
116
- * // sherpa-backend/.descry/config.json
117
- * "graph": "/home/…/sherpa-frontend/.descry/graph.db"
118
- * ```
119
- *
120
- * The derived exclusion then pointed into the *other* repository, and this
121
- * repository's own `.descry/config.json` was excluded by nothing. Measured on a
122
- * real workspace: it was reported as the developer's uncommitted work. Not an
123
- * edge case — every shared-graph workspace has it.
124
- *
125
- * `.descry/evidence.db` escaped only because that repository's `.gitignore`
126
- * happened to carry `*.db`. **The exclusion must not depend on the user having
127
- * gitignored anything**, which is what that near-miss shows: a tool's own state
128
- * is excluded because it is the tool's, not because someone tidied up.
129
- *
130
- * ## Why the graph path is still consulted
131
- *
132
- * It is configurable, so it can be moved out of `.descry/` and stay inside the
133
- * repository. A path outside the repository costs nothing to list — it is not
134
- * in this working tree — and is kept rather than special-cased, because the
135
- * test for "is this path inside this repo" is the kind that is subtly wrong on
136
- * symlinks and relative paths.
137
- *
138
- * Returned as directory prefixes matched at a segment boundary by the git
139
- * helpers, so `.descry` excludes `.descry/config.json` and leaves
140
- * `src/.descryfile.py` alone.
141
- */
142
- export function descryOwnState(graphPath) {
143
- // This repository's own state directory, always — whatever the graph does.
144
- const out = new Set([dirname(CONFIG_RELATIVE_PATH)]);
145
- if (graphPath !== ":memory:" && graphPath !== "") {
146
- const normalised = graphPath.replace(/\\/g, "/").replace(/^\.\//, "");
147
- const slash = normalised.lastIndexOf("/");
148
- // The directory, not the file: SQLite writes `-wal` and `-shm` beside it.
149
- out.add(slash === -1 ? normalised : normalised.slice(0, slash));
150
- }
151
- return [...out];
152
- }
153
- //# sourceMappingURL=kit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kit.js","sourceRoot":"","sources":["../../src/tools/kit.ts"],"names":[],"mappings":"AAAA;;8EAE8E;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AA0DrD;sGACsG;AACtG,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED,4FAA4F;AAC5F,0CAA0C;AAE1C,MAAM,UAAU,cAAc,CAAC,IAA6B,EAAE,GAAW;IACvE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5D,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,MAAM,IAAI,cAAc,CAAC,IAAI,GAAG,oBAAoB,CAAC,CAAC;IACrF,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAA6B,EAAE,GAAW;IACvE,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,MAAM,IAAI,cAAc,CAAC,IAAI,GAAG,eAAe,CAAC,CAAC;IAC1F,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,IAA6B,EAC7B,GAAW;IAEX,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CA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AE,EAAE,CAAC;QACjD,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACtE,MAAM,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC1C,0EAA0E;QAC1E,GAAG,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AAClB,CAAC"}
@@ -1,24 +0,0 @@
1
- /** `link_workspace` — the agent-mediated door onto what `descry init` writes from the CLI
2
- * (shared `writeConfig`). Closes `analyze`'s "no workspace configured" disclosure (DEC-054),
3
- * previously a dead end. Never infers pairing — `repos` must come from the user's explicit
4
- * confirmation, not the caller's guess (workspace.ts's rule: never infer, always declare).
5
- * The only tool writing outside its session root; a path that fails to exist is disclosed, never silently skipped. */
6
- import { type ToolDefinition } from "./kit.ts";
7
- /** A repository the workspace id was actually written into. */
8
- export interface LinkedRepo {
9
- /** Resolved to absolute. */
10
- readonly path: string;
11
- readonly repo: string;
12
- /** The `.descry/config.json` that was written. */
13
- readonly configPath: string;
14
- }
15
- export interface LinkWorkspaceData {
16
- readonly workspace: string;
17
- /** Only the repositories actually written. A path that didn't exist is absent from this
18
- * list and disclosed — a partial link that looks complete is the failure this exists to catch. */
19
- readonly written: readonly LinkedRepo[];
20
- /** How many were asked for. Compare against `written.length`. */
21
- readonly requested: number;
22
- }
23
- export declare const linkWorkspaceTool: ToolDefinition;
24
- //# sourceMappingURL=link-workspace.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link-workspace.d.ts","sourceRoot":"","sources":["../../src/tools/link-workspace.ts"],"names":[],"mappings":"AAAA;;;;uHAIuH;AAMvH,OAAO,EAA4D,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAGzG,+DAA+D;AAC/D,MAAM,WAAW,UAAU;IACzB,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;uGACmG;IACnG,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAsID,eAAO,MAAM,iBAAiB,EAAE,cAe/B,CAAC"}
@@ -1,131 +0,0 @@
1
- /** `link_workspace` — the agent-mediated door onto what `descry init` writes from the CLI
2
- * (shared `writeConfig`). Closes `analyze`'s "no workspace configured" disclosure (DEC-054),
3
- * previously a dead end. Never infers pairing — `repos` must come from the user's explicit
4
- * confirmation, not the caller's guess (workspace.ts's rule: never infer, always declare).
5
- * The only tool writing outside its session root; a path that fails to exist is disclosed, never silently skipped. */
6
- import { existsSync, statSync } from "node:fs";
7
- import { resolve } from "node:path";
8
- import { writeConfig, writeWorkspaceRepos } from "../session.js";
9
- import { answer, requiredString, ToolInputError } from "./kit.js";
10
- const SCHEMA = {
11
- type: "object",
12
- properties: {
13
- workspace: {
14
- type: "string",
15
- description: "The workspace id to write into every repository listed in `repos`, byte-identical. " +
16
- "Choose a short, stable name — it becomes part of every workspace-scoped node id.",
17
- },
18
- repos: {
19
- type: "array",
20
- minItems: 2,
21
- items: {
22
- type: "object",
23
- properties: {
24
- path: { type: "string", description: "Absolute path to the repository on disk." },
25
- repo: {
26
- type: "string",
27
- description: "This repository's identity, written explicitly rather than defaulted.",
28
- },
29
- },
30
- required: ["path", "repo"],
31
- additionalProperties: false,
32
- },
33
- description: "Every repository that should share this workspace, INCLUDING the current one if it should " +
34
- "join. Only call this with repositories the user has explicitly confirmed belong together " +
35
- "— a directory sitting next to another is a suggestion to put in front of the user, never " +
36
- "a decision this tool or the caller makes on its own (workspace.ts's pairing rule, one " +
37
- "level up: never infer, always declare).",
38
- },
39
- },
40
- required: ["workspace", "repos"],
41
- additionalProperties: false,
42
- };
43
- function parseRepos(value) {
44
- if (!Array.isArray(value) || value.length < 2) {
45
- throw new ToolInputError('"repos" must be an array of at least two {path, repo} entries — a workspace of one ' +
46
- "repository joins nothing, so linking one is never the right call.");
47
- }
48
- return value.map((entry, index) => {
49
- if (typeof entry !== "object" || entry === null) {
50
- throw new ToolInputError(`repos[${index}] must be an object`);
51
- }
52
- const path = requiredString(entry, "path");
53
- const repo = requiredString(entry, "repo");
54
- return { path, repo };
55
- });
56
- }
57
- async function run(args, ctx) {
58
- const workspace = requiredString(args, "workspace");
59
- const repos = parseRepos(args["repos"]);
60
- const seen = new Set();
61
- for (const entry of repos) {
62
- const absolute = resolve(entry.path);
63
- if (seen.has(absolute)) {
64
- throw new ToolInputError(`"${entry.path}" is listed more than once`);
65
- }
66
- seen.add(absolute);
67
- }
68
- const written = [];
69
- const notes = [];
70
- for (const entry of repos) {
71
- const absolute = resolve(entry.path);
72
- if (!existsSync(absolute) || !statSync(absolute).isDirectory()) {
73
- notes.push(`"${entry.path}" does not exist or is not a directory — nothing was written there.`);
74
- continue;
75
- }
76
- ctx.progress(`Writing .descry/config.json in ${entry.repo}`, written.length, repos.length);
77
- const result = await writeConfig(absolute, { repo: entry.repo, workspace });
78
- written.push({ path: absolute, repo: entry.repo, configPath: result.path });
79
- if (result.previousWorkspace !== undefined && result.previousWorkspace !== workspace) {
80
- notes.push(`${entry.repo}: replaced previous workspace "${result.previousWorkspace}" with "${workspace}".`);
81
- }
82
- }
83
- // Membership list, written after the loop so it names repos the link actually reached, not
84
- // what it was asked about. A workspace name alone doesn't say where siblings live on disk
85
- // (DEC-NEXT-workspace-scoped-confirmed-facts). Still the caller's own list — nothing inferred.
86
- const members = written.map((w) => ({ path: w.path, repo: w.repo }));
87
- for (const member of members) {
88
- await writeWorkspaceRepos(member.path, members);
89
- }
90
- if (written.length < repos.length) {
91
- notes.push(`${repos.length - written.length} of ${repos.length} repositories were skipped. The workspace ` +
92
- "id is only byte-identical where it was actually written — re-run for the skipped paths " +
93
- "once they are correct.");
94
- }
95
- notes.push(`Run "analyze" again in each linked repository so its graph is rebuilt under the "${workspace}" ` +
96
- "workspace — writing the config here does not itself rebuild anything.");
97
- return answer({
98
- headline: written.length === 0
99
- ? `No repository was linked — every path in "repos" failed to resolve.`
100
- : `Linked ${written.length} of ${repos.length} repositor${repos.length === 1 ? "y" : "ies"} ` +
101
- `to workspace "${workspace}".`,
102
- state: written.length === 0 ? "refused" : "ok",
103
- nameLevel: true,
104
- // Writing a config file is not evidence about code — R0, the same choice `analyze`
105
- // makes when no code-reading source ran.
106
- resolutionFloor: 0,
107
- commitSha: null,
108
- graphBuiltAt: null,
109
- irSchemaVersion: ctx.session.provider().baseStamp().irSchemaVersion,
110
- commitSpread: ctx.session.provider().baseStamp().commitSpread,
111
- repoCount: ctx.session.provider().baseStamp().repoCount,
112
- notes,
113
- data: { workspace, written, requested: repos.length },
114
- });
115
- }
116
- export const linkWorkspaceTool = {
117
- name: "link_workspace",
118
- class: "stateful-read",
119
- tier: "evidence",
120
- version: "1.0.0",
121
- title: "Declare which repositories share a workspace",
122
- description: "Write the workspace id that lets multiple repositories' graphs join (DEC-054) into each " +
123
- "repository's .descry/config.json. Call this ONLY after the user has explicitly confirmed " +
124
- "which repositories belong together — you may point out sibling directories you can see as a " +
125
- "suggestion, but you must never decide on your own that they are related and call this " +
126
- "unprompted. The same file `descry init` writes from the command line; this is the " +
127
- "conversational door onto it.",
128
- inputSchema: SCHEMA,
129
- run,
130
- };
131
- //# sourceMappingURL=link-workspace.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link-workspace.js","sourceRoot":"","sources":["../../src/tools/link-work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,KAAK,EAAE,8CAA8C;IACrD,WAAW,EACT,0FAA0F;QAC1F,2FAA2F;QAC3F,8FAA8F;QAC9F,wFAAwF;QACxF,oFAAoF;QACpF,8BAA8B;IAChC,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
@@ -1,19 +0,0 @@
1
- /** Turns what a developer typed into exactly one node, or refuses to. With no signal to pick
2
- * between two nodes plausibly named `charge`, picking would be inventing evidence — so ambiguity
3
- * returns with candidates and how to narrow, the same discipline the graph builder applies to an
4
- * unresolvable edge (never stub a node) and adapters apply to an unreadable receiver. */
5
- import type { IRNode } from "@descryy/ir";
6
- import type { Session } from "../session.ts";
7
- export interface Lookup {
8
- /** Null when nothing matched, or when more than one thing did. */
9
- readonly node: IRNode | null;
10
- readonly candidates: readonly IRNode[];
11
- readonly headline: string;
12
- readonly notes: readonly string[];
13
- }
14
- export declare function resolveOneNode(session: Session, criteria: {
15
- readonly nodeId?: string | undefined;
16
- readonly symbol?: string | undefined;
17
- readonly file?: string | undefined;
18
- }): Lookup;
19
- //# sourceMappingURL=lookup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/tools/lookup.ts"],"names":[],"mappings":"AAAA;;;0FAG0F;AAG1F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,MAAM;IACrB,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE;IACR,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,GACA,MAAM,CA+DR"}
@@ -1,63 +0,0 @@
1
- /** Turns what a developer typed into exactly one node, or refuses to. With no signal to pick
2
- * between two nodes plausibly named `charge`, picking would be inventing evidence — so ambiguity
3
- * returns with candidates and how to narrow, the same discipline the graph builder applies to an
4
- * unresolvable edge (never stub a node) and adapters apply to an unreadable receiver. */
5
- import { findNodes, getNode } from "@descryy/core";
6
- export function resolveOneNode(session, criteria) {
7
- const driver = session.store().driver;
8
- if (criteria.nodeId !== undefined) {
9
- const node = getNode(driver, criteria.nodeId);
10
- return node === undefined
11
- ? {
12
- node: null,
13
- candidates: [],
14
- headline: `No node with id ${criteria.nodeId} is in the graph.`,
15
- notes: [
16
- "The id may be from an older graph. Node ids are hashes over the repository scope, " +
17
- "kind and qualified symbol path, so they survive file moves but not a change to the " +
18
- "configured repository name. Run analyze and use an id from its output.",
19
- ],
20
- }
21
- : { node, candidates: [node], headline: node.name, notes: [] };
22
- }
23
- const matches = findNodes(driver, {
24
- ...(criteria.symbol === undefined ? {} : { name: criteria.symbol }),
25
- ...(criteria.file === undefined ? {} : { file: criteria.file }),
26
- });
27
- const named = criteria.symbol ?? criteria.file ?? "";
28
- if (matches.length === 0) {
29
- return {
30
- node: null,
31
- candidates: [],
32
- headline: `Nothing named "${named}" is in the graph.`,
33
- notes: [
34
- "This does not mean it does not exist. It means no configured adapter read it, or the " +
35
- "graph predates it. Run analyze, and check its disclosures for languages that were not " +
36
- "analysable.",
37
- ],
38
- };
39
- }
40
- if (matches.length === 1) {
41
- return { node: matches[0], candidates: matches, headline: matches[0].name, notes: [] };
42
- }
43
- // More than one. Only a file narrows it, and only if the caller did not already
44
- // give one — in which case the file genuinely declares two things of that name.
45
- const where = matches
46
- .slice(0, 8)
47
- .map((m) => `${m.type} ${m.name}${m.file === null ? "" : ` (${m.file})`}`)
48
- .join(", ");
49
- return {
50
- node: null,
51
- candidates: matches,
52
- headline: `"${named}" is ambiguous — ${matches.length} nodes match.`,
53
- notes: [
54
- `Candidates: ${where}${matches.length > 8 ? ", …" : ""}. ` +
55
- (criteria.file === undefined
56
- ? 'Narrow it with "file", or pass "nodeId" directly.'
57
- : "They are in the same file, so pass \"nodeId\" directly."),
58
- "No answer was computed. Choosing one of these by a heuristic would produce a confident " +
59
- "answer about a symbol you did not ask about.",
60
- ],
61
- };
62
- }
63
- //# sourceMappingURL=lookup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lookup.js","sourceRoot":"","sources":["../../src/tools/lookup.ts"],"names":[],"mappings":"AAAA;;;0FAG0F;AAE1F,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAanD,MAAM,UAAU,cAAc,CAC5B,OAAgB,EAChB,QAIC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC;IAEtC,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC9C,OAAO,IAAI,KAAK,SAAS;YACvB,CAAC,CAAC;gBACE,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,mBAAmB,QAAQ,CAAC,MAAM,mBAAmB;gBAC/D,KAAK,EAAE;oBACL,oFAAoF;wBAClF,qFAAqF;wBACrF,wEAAwE;iBAC3E;aACF;YACH,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IACnE,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC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Ed,OAAO;QACL,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,OAAO;QACnB,QAAQ,EAAE,IAAI,KAAK,oBAAoB,OAAO,CAAC,MAAM,eAAe;QACpE,KAAK,EAAE;YACL,eAAe,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI;gBACxD,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS;oBAC1B,CAAC,CAAC,mDAAmD;oBACrD,CAAC,CAAC,yDAAyD,CAAC;YAChE,yFAAyF;gBACvF,8CAA8C;SACjD;KACF,CAAC;AACJ,CAAC"}
@@ -1,28 +0,0 @@
1
- /** `mark_incident` — "that was a bug, I fixed it": the only incident-minting path with
2
- * precision 1.0 (a person asserts it). Needed because automatic detection (reverts,
3
- * `Fixes #123`) found zero incidents in 3 repos, and a fix-forward heuristic scored 25%
4
- * against a 90% threshold and was refused. Stored in `.descry/config.json` (DEC-223,
5
- * DEC-017 — derived tables don't survive rebuilds) and capped at class B; `action` class per DEC-278, gated by the `confirmToken` handshake. */
6
- import type { ConfirmedIncident } from "@descryy/ir";
7
- import { type ToolDefinition } from "./kit.ts";
8
- export interface MarkIncidentData {
9
- /** The record as written. Read it back to see exactly what was stored. */
10
- readonly recorded: ConfirmedIncident;
11
- /** The `INCIDENT` node id, so a caller can query it immediately. */
12
- readonly incidentNodeId: string;
13
- /** Where the durable record lives — a file a person can read and correct. */
14
- readonly configPath: string;
15
- /** How many confirmed incidents this repository now has on record. */
16
- readonly totalConfirmed: number;
17
- /** Paths named that the graph has no node for. Still recorded and correlated — a
18
- * developer naming a file Descry can't read is a gap in Descry, not a mistake. */
19
- readonly filesNotInGraph: readonly string[];
20
- /** True when this call's content (same summary and error text) matched a record
21
- * already on file — merged into it rather than minting a second `INCIDENT` node
22
- * (UAT phase 5, F9). */
23
- readonly merged: boolean;
24
- /** How many times this exact content has now been reported, this call included. */
25
- readonly occurrences: number;
26
- }
27
- export declare const markIncidentTool: ToolDefinition;
28
- //# sourceMappingURL=mark-incident.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mark-incident.d.ts","sourceRoot":"","sources":["../../src/tools/mark-incident.ts"],"names":[],"mappings":"AAAA;;;;iJAIiJ;AAUjJ,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAGlB,MAAM,WAAW,gBAAgB;IAC/B,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,oEAAoE;IACpE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;uFACmF;IACnF,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C;;6BAEyB;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,mFAAmF;IACnF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAkMD,eAAO,MAAM,gBAAgB,EAAE,cAkB9B,CAAC"}