@nimblesite/lsp-profiler-ui 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/LICENSE +21 -0
  2. package/out/src/bind-host.d.ts +3 -0
  3. package/out/src/bind-host.js +52 -0
  4. package/out/src/bind-host.js.map +1 -0
  5. package/out/src/context-keys.d.ts +4 -0
  6. package/out/src/context-keys.js +54 -0
  7. package/out/src/context-keys.js.map +1 -0
  8. package/out/src/dap-evaluate.d.ts +84 -0
  9. package/out/src/dap-evaluate.js +442 -0
  10. package/out/src/dap-evaluate.js.map +1 -0
  11. package/out/src/dap-output.d.ts +50 -0
  12. package/out/src/dap-output.js +177 -0
  13. package/out/src/dap-output.js.map +1 -0
  14. package/out/src/debug/adapter-resolution.d.ts +56 -0
  15. package/out/src/debug/adapter-resolution.js +112 -0
  16. package/out/src/debug/adapter-resolution.js.map +1 -0
  17. package/out/src/debug/dap-messages.d.ts +18 -0
  18. package/out/src/debug/dap-messages.js +71 -0
  19. package/out/src/debug/dap-messages.js.map +1 -0
  20. package/out/src/debug/index.d.ts +7 -0
  21. package/out/src/debug/index.js +27 -0
  22. package/out/src/debug/index.js.map +1 -0
  23. package/out/src/debug/launch-config.d.ts +42 -0
  24. package/out/src/debug/launch-config.js +73 -0
  25. package/out/src/debug/launch-config.js.map +1 -0
  26. package/out/src/debug/launch-lifecycle.d.ts +29 -0
  27. package/out/src/debug/launch-lifecycle.js +40 -0
  28. package/out/src/debug/launch-lifecycle.js.map +1 -0
  29. package/out/src/debug/poll.d.ts +25 -0
  30. package/out/src/debug/poll.js +70 -0
  31. package/out/src/debug/poll.js.map +1 -0
  32. package/out/src/debug/profiling.d.ts +34 -0
  33. package/out/src/debug/profiling.js +81 -0
  34. package/out/src/debug/profiling.js.map +1 -0
  35. package/out/src/debug/testing/assertions.d.ts +27 -0
  36. package/out/src/debug/testing/assertions.js +111 -0
  37. package/out/src/debug/testing/assertions.js.map +1 -0
  38. package/out/src/debug/testing/dap-client.d.ts +86 -0
  39. package/out/src/debug/testing/dap-client.js +204 -0
  40. package/out/src/debug/testing/dap-client.js.map +1 -0
  41. package/out/src/debug/testing/index.d.ts +7 -0
  42. package/out/src/debug/testing/index.js +31 -0
  43. package/out/src/debug/testing/index.js.map +1 -0
  44. package/out/src/debug/testing/vscode-harness.d.ts +44 -0
  45. package/out/src/debug/testing/vscode-harness.js +81 -0
  46. package/out/src/debug/testing/vscode-harness.js.map +1 -0
  47. package/out/src/debug/ui-stubs.d.ts +26 -0
  48. package/out/src/debug/ui-stubs.js +88 -0
  49. package/out/src/debug/ui-stubs.js.map +1 -0
  50. package/out/src/debug-link-setup.d.ts +4 -0
  51. package/out/src/debug-link-setup.js +19 -0
  52. package/out/src/debug-link-setup.js.map +1 -0
  53. package/out/src/debug-link-view.d.ts +4 -0
  54. package/out/src/debug-link-view.js +49 -0
  55. package/out/src/debug-link-view.js.map +1 -0
  56. package/out/src/debug-link.d.ts +6 -0
  57. package/out/src/debug-link.js +95 -0
  58. package/out/src/debug-link.js.map +1 -0
  59. package/out/src/debug-selection.d.ts +14 -0
  60. package/out/src/debug-selection.js +33 -0
  61. package/out/src/debug-selection.js.map +1 -0
  62. package/out/src/debuggee-pause.d.ts +11 -0
  63. package/out/src/debuggee-pause.js +109 -0
  64. package/out/src/debuggee-pause.js.map +1 -0
  65. package/out/src/editor-path-key.d.ts +52 -0
  66. package/out/src/editor-path-key.js +105 -0
  67. package/out/src/editor-path-key.js.map +1 -0
  68. package/out/src/failure.d.ts +5 -0
  69. package/out/src/failure.js +53 -0
  70. package/out/src/failure.js.map +1 -0
  71. package/out/src/file-log-sink.d.ts +20 -0
  72. package/out/src/file-log-sink.js +74 -0
  73. package/out/src/file-log-sink.js.map +1 -0
  74. package/out/src/flame-html.d.ts +8 -0
  75. package/out/src/flame-html.js +104 -0
  76. package/out/src/flame-html.js.map +1 -0
  77. package/out/src/flame-model.d.ts +93 -0
  78. package/out/src/flame-model.js +242 -0
  79. package/out/src/flame-model.js.map +1 -0
  80. package/out/src/flame-script-helpers.d.ts +26 -0
  81. package/out/src/flame-script-helpers.js +71 -0
  82. package/out/src/flame-script-helpers.js.map +1 -0
  83. package/out/src/flame-script.d.ts +1 -0
  84. package/out/src/flame-script.js +332 -0
  85. package/out/src/flame-script.js.map +1 -0
  86. package/out/src/flame-time-order.d.ts +14 -0
  87. package/out/src/flame-time-order.js +112 -0
  88. package/out/src/flame-time-order.js.map +1 -0
  89. package/out/src/flamegraph-artifact.d.ts +9 -0
  90. package/out/src/flamegraph-artifact.js +45 -0
  91. package/out/src/flamegraph-artifact.js.map +1 -0
  92. package/out/src/host.d.ts +31 -0
  93. package/out/src/host.js +6 -0
  94. package/out/src/host.js.map +1 -0
  95. package/out/src/ids.d.ts +27 -0
  96. package/out/src/ids.js +63 -0
  97. package/out/src/ids.js.map +1 -0
  98. package/out/src/index.d.ts +42 -0
  99. package/out/src/index.js +98 -0
  100. package/out/src/index.js.map +1 -0
  101. package/out/src/logger.d.ts +50 -0
  102. package/out/src/logger.js +86 -0
  103. package/out/src/logger.js.map +1 -0
  104. package/out/src/memory-autopilot.d.ts +64 -0
  105. package/out/src/memory-autopilot.js +306 -0
  106. package/out/src/memory-autopilot.js.map +1 -0
  107. package/out/src/memory-capture-ids.d.ts +17 -0
  108. package/out/src/memory-capture-ids.js +45 -0
  109. package/out/src/memory-capture-ids.js.map +1 -0
  110. package/out/src/memory-capture-ingest.d.ts +15 -0
  111. package/out/src/memory-capture-ingest.js +84 -0
  112. package/out/src/memory-capture-ingest.js.map +1 -0
  113. package/out/src/memory-capture-legs.d.ts +4 -0
  114. package/out/src/memory-capture-legs.js +55 -0
  115. package/out/src/memory-capture-legs.js.map +1 -0
  116. package/out/src/memory-capture-present.d.ts +32 -0
  117. package/out/src/memory-capture-present.js +71 -0
  118. package/out/src/memory-capture-present.js.map +1 -0
  119. package/out/src/memory-capture-roundtrip.d.ts +17 -0
  120. package/out/src/memory-capture-roundtrip.js +75 -0
  121. package/out/src/memory-capture-roundtrip.js.map +1 -0
  122. package/out/src/memory-capture-state.d.ts +23 -0
  123. package/out/src/memory-capture-state.js +89 -0
  124. package/out/src/memory-capture-state.js.map +1 -0
  125. package/out/src/memory-capture-types.d.ts +28 -0
  126. package/out/src/memory-capture-types.js +70 -0
  127. package/out/src/memory-capture-types.js.map +1 -0
  128. package/out/src/memory-capture.d.ts +24 -0
  129. package/out/src/memory-capture.js +51 -0
  130. package/out/src/memory-capture.js.map +1 -0
  131. package/out/src/memory-dashboard-html.d.ts +3 -0
  132. package/out/src/memory-dashboard-html.js +327 -0
  133. package/out/src/memory-dashboard-html.js.map +1 -0
  134. package/out/src/memory-dashboard-mapping.d.ts +34 -0
  135. package/out/src/memory-dashboard-mapping.js +135 -0
  136. package/out/src/memory-dashboard-mapping.js.map +1 -0
  137. package/out/src/memory-dashboard.d.ts +82 -0
  138. package/out/src/memory-dashboard.js +142 -0
  139. package/out/src/memory-dashboard.js.map +1 -0
  140. package/out/src/memory-decorations.d.ts +61 -0
  141. package/out/src/memory-decorations.js +247 -0
  142. package/out/src/memory-decorations.js.map +1 -0
  143. package/out/src/memory-finalize.d.ts +25 -0
  144. package/out/src/memory-finalize.js +207 -0
  145. package/out/src/memory-finalize.js.map +1 -0
  146. package/out/src/memory-guidance.d.ts +14 -0
  147. package/out/src/memory-guidance.js +36 -0
  148. package/out/src/memory-guidance.js.map +1 -0
  149. package/out/src/memory-inspect-commands.d.ts +20 -0
  150. package/out/src/memory-inspect-commands.js +114 -0
  151. package/out/src/memory-inspect-commands.js.map +1 -0
  152. package/out/src/memory-launch-direct.d.ts +12 -0
  153. package/out/src/memory-launch-direct.js +74 -0
  154. package/out/src/memory-launch-direct.js.map +1 -0
  155. package/out/src/memory-launch.d.ts +4 -0
  156. package/out/src/memory-launch.js +92 -0
  157. package/out/src/memory-launch.js.map +1 -0
  158. package/out/src/memory-leak-offer.d.ts +18 -0
  159. package/out/src/memory-leak-offer.js +51 -0
  160. package/out/src/memory-leak-offer.js.map +1 -0
  161. package/out/src/memory-profiler.d.ts +27 -0
  162. package/out/src/memory-profiler.js +71 -0
  163. package/out/src/memory-profiler.js.map +1 -0
  164. package/out/src/memory-ref-graph.d.ts +62 -0
  165. package/out/src/memory-ref-graph.js +248 -0
  166. package/out/src/memory-ref-graph.js.map +1 -0
  167. package/out/src/memory-ref-picker.d.ts +21 -0
  168. package/out/src/memory-ref-picker.js +103 -0
  169. package/out/src/memory-ref-picker.js.map +1 -0
  170. package/out/src/memory-registration.d.ts +4 -0
  171. package/out/src/memory-registration.js +63 -0
  172. package/out/src/memory-registration.js.map +1 -0
  173. package/out/src/memory-start-core.d.ts +8 -0
  174. package/out/src/memory-start-core.js +165 -0
  175. package/out/src/memory-start-core.js.map +1 -0
  176. package/out/src/memory-start-stop-commands.d.ts +10 -0
  177. package/out/src/memory-start-stop-commands.js +75 -0
  178. package/out/src/memory-start-stop-commands.js.map +1 -0
  179. package/out/src/memory-start.d.ts +6 -0
  180. package/out/src/memory-start.js +13 -0
  181. package/out/src/memory-start.js.map +1 -0
  182. package/out/src/memory-status.d.ts +24 -0
  183. package/out/src/memory-status.js +135 -0
  184. package/out/src/memory-status.js.map +1 -0
  185. package/out/src/palette-vscode.d.ts +2 -0
  186. package/out/src/palette-vscode.js +50 -0
  187. package/out/src/palette-vscode.js.map +1 -0
  188. package/out/src/palette.d.ts +70 -0
  189. package/out/src/palette.js +150 -0
  190. package/out/src/palette.js.map +1 -0
  191. package/out/src/process-bind-panel.d.ts +11 -0
  192. package/out/src/process-bind-panel.js +65 -0
  193. package/out/src/process-bind-panel.js.map +1 -0
  194. package/out/src/process-commands.d.ts +5 -0
  195. package/out/src/process-commands.js +112 -0
  196. package/out/src/process-commands.js.map +1 -0
  197. package/out/src/process-context-keys.d.ts +11 -0
  198. package/out/src/process-context-keys.js +48 -0
  199. package/out/src/process-context-keys.js.map +1 -0
  200. package/out/src/process-decoration.d.ts +18 -0
  201. package/out/src/process-decoration.js +76 -0
  202. package/out/src/process-decoration.js.map +1 -0
  203. package/out/src/process-explorer-rows.d.ts +59 -0
  204. package/out/src/process-explorer-rows.js +47 -0
  205. package/out/src/process-explorer-rows.js.map +1 -0
  206. package/out/src/process-explorer.d.ts +66 -0
  207. package/out/src/process-explorer.js +241 -0
  208. package/out/src/process-explorer.js.map +1 -0
  209. package/out/src/process-group-item.d.ts +8 -0
  210. package/out/src/process-group-item.js +55 -0
  211. package/out/src/process-group-item.js.map +1 -0
  212. package/out/src/process-launch-item.d.ts +12 -0
  213. package/out/src/process-launch-item.js +57 -0
  214. package/out/src/process-launch-item.js.map +1 -0
  215. package/out/src/process-launch.d.ts +47 -0
  216. package/out/src/process-launch.js +205 -0
  217. package/out/src/process-launch.js.map +1 -0
  218. package/out/src/process-message-item.d.ts +10 -0
  219. package/out/src/process-message-item.js +53 -0
  220. package/out/src/process-message-item.js.map +1 -0
  221. package/out/src/process-poll.d.ts +26 -0
  222. package/out/src/process-poll.js +125 -0
  223. package/out/src/process-poll.js.map +1 -0
  224. package/out/src/process-reactivity.d.ts +55 -0
  225. package/out/src/process-reactivity.js +188 -0
  226. package/out/src/process-reactivity.js.map +1 -0
  227. package/out/src/process-registration.d.ts +11 -0
  228. package/out/src/process-registration.js +55 -0
  229. package/out/src/process-registration.js.map +1 -0
  230. package/out/src/process-tree-item.d.ts +18 -0
  231. package/out/src/process-tree-item.js +219 -0
  232. package/out/src/process-tree-item.js.map +1 -0
  233. package/out/src/processes-state.d.ts +75 -0
  234. package/out/src/processes-state.js +76 -0
  235. package/out/src/processes-state.js.map +1 -0
  236. package/out/src/profile-on-launch.d.ts +4 -0
  237. package/out/src/profile-on-launch.js +16 -0
  238. package/out/src/profile-on-launch.js.map +1 -0
  239. package/out/src/profile-server.d.ts +24 -0
  240. package/out/src/profile-server.js +170 -0
  241. package/out/src/profile-server.js.map +1 -0
  242. package/out/src/profiler-attach.d.ts +19 -0
  243. package/out/src/profiler-attach.js +129 -0
  244. package/out/src/profiler-attach.js.map +1 -0
  245. package/out/src/profiler-commands.d.ts +8 -0
  246. package/out/src/profiler-commands.js +110 -0
  247. package/out/src/profiler-commands.js.map +1 -0
  248. package/out/src/profiler-decorations.d.ts +74 -0
  249. package/out/src/profiler-decorations.js +237 -0
  250. package/out/src/profiler-decorations.js.map +1 -0
  251. package/out/src/profiler-dispose.d.ts +6 -0
  252. package/out/src/profiler-dispose.js +20 -0
  253. package/out/src/profiler-dispose.js.map +1 -0
  254. package/out/src/profiler-flamegraph-html.d.ts +61 -0
  255. package/out/src/profiler-flamegraph-html.js +366 -0
  256. package/out/src/profiler-flamegraph-html.js.map +1 -0
  257. package/out/src/profiler-format.d.ts +10 -0
  258. package/out/src/profiler-format.js +28 -0
  259. package/out/src/profiler-format.js.map +1 -0
  260. package/out/src/profiler-launch-cooperative.d.ts +16 -0
  261. package/out/src/profiler-launch-cooperative.js +167 -0
  262. package/out/src/profiler-launch-cooperative.js.map +1 -0
  263. package/out/src/profiler-launch.d.ts +29 -0
  264. package/out/src/profiler-launch.js +123 -0
  265. package/out/src/profiler-launch.js.map +1 -0
  266. package/out/src/profiler-results.d.ts +22 -0
  267. package/out/src/profiler-results.js +104 -0
  268. package/out/src/profiler-results.js.map +1 -0
  269. package/out/src/profiler-session-core.d.ts +42 -0
  270. package/out/src/profiler-session-core.js +116 -0
  271. package/out/src/profiler-session-core.js.map +1 -0
  272. package/out/src/profiler-state.d.ts +87 -0
  273. package/out/src/profiler-state.js +83 -0
  274. package/out/src/profiler-state.js.map +1 -0
  275. package/out/src/profiler-status.d.ts +38 -0
  276. package/out/src/profiler-status.js +163 -0
  277. package/out/src/profiler-status.js.map +1 -0
  278. package/out/src/profiler-styles.d.ts +21 -0
  279. package/out/src/profiler-styles.js +160 -0
  280. package/out/src/profiler-styles.js.map +1 -0
  281. package/out/src/profiler-webview.d.ts +95 -0
  282. package/out/src/profiler-webview.js +243 -0
  283. package/out/src/profiler-webview.js.map +1 -0
  284. package/out/src/profiler.d.ts +23 -0
  285. package/out/src/profiler.js +113 -0
  286. package/out/src/profiler.js.map +1 -0
  287. package/out/src/progress-ops.d.ts +24 -0
  288. package/out/src/progress-ops.js +135 -0
  289. package/out/src/progress-ops.js.map +1 -0
  290. package/out/src/reactive-refresh.d.ts +24 -0
  291. package/out/src/reactive-refresh.js +33 -0
  292. package/out/src/reactive-refresh.js.map +1 -0
  293. package/out/src/sample-summary.d.ts +39 -0
  294. package/out/src/sample-summary.js +32 -0
  295. package/out/src/sample-summary.js.map +1 -0
  296. package/out/src/sampled-view.d.ts +15 -0
  297. package/out/src/sampled-view.js +56 -0
  298. package/out/src/sampled-view.js.map +1 -0
  299. package/out/src/server-command.d.ts +4 -0
  300. package/out/src/server-command.js +14 -0
  301. package/out/src/server-command.js.map +1 -0
  302. package/out/src/settings.d.ts +1 -0
  303. package/out/src/settings.js +22 -0
  304. package/out/src/settings.js.map +1 -0
  305. package/out/src/store.d.ts +34 -0
  306. package/out/src/store.js +64 -0
  307. package/out/src/store.js.map +1 -0
  308. package/out/src/testing/cpu-capture-assertions.d.ts +8 -0
  309. package/out/src/testing/cpu-capture-assertions.js +71 -0
  310. package/out/src/testing/cpu-capture-assertions.js.map +1 -0
  311. package/out/src/testing/cpu-capture-contract.d.ts +8 -0
  312. package/out/src/testing/cpu-capture-contract.js +123 -0
  313. package/out/src/testing/cpu-capture-contract.js.map +1 -0
  314. package/out/src/testing/webview-contract-helpers.d.ts +24 -0
  315. package/out/src/testing/webview-contract-helpers.js +125 -0
  316. package/out/src/testing/webview-contract-helpers.js.map +1 -0
  317. package/out/src/testing/webview-contract-leak.d.ts +2 -0
  318. package/out/src/testing/webview-contract-leak.js +80 -0
  319. package/out/src/testing/webview-contract-leak.js.map +1 -0
  320. package/out/src/testing/webview-contract-memory.d.ts +5 -0
  321. package/out/src/testing/webview-contract-memory.js +221 -0
  322. package/out/src/testing/webview-contract-memory.js.map +1 -0
  323. package/out/src/testing/webview-contract-palette.d.ts +6 -0
  324. package/out/src/testing/webview-contract-palette.js +121 -0
  325. package/out/src/testing/webview-contract-palette.js.map +1 -0
  326. package/out/src/testing/webview-contract-panel.d.ts +7 -0
  327. package/out/src/testing/webview-contract-panel.js +100 -0
  328. package/out/src/testing/webview-contract-panel.js.map +1 -0
  329. package/out/src/testing/webview-contract-results.d.ts +6 -0
  330. package/out/src/testing/webview-contract-results.js +136 -0
  331. package/out/src/testing/webview-contract-results.js.map +1 -0
  332. package/out/src/testing/webview-contract.d.ts +18 -0
  333. package/out/src/testing/webview-contract.js +23 -0
  334. package/out/src/testing/webview-contract.js.map +1 -0
  335. package/out/src/timeouts.d.ts +21 -0
  336. package/out/src/timeouts.js +30 -0
  337. package/out/src/timeouts.js.map +1 -0
  338. package/out/src/trace-actions.d.ts +33 -0
  339. package/out/src/trace-actions.js +135 -0
  340. package/out/src/trace-actions.js.map +1 -0
  341. package/out/src/unknown-shape.d.ts +58 -0
  342. package/out/src/unknown-shape.js +110 -0
  343. package/out/src/unknown-shape.js.map +1 -0
  344. package/out/src/wire-adapters.d.ts +18 -0
  345. package/out/src/wire-adapters.js +160 -0
  346. package/out/src/wire-adapters.js.map +1 -0
  347. package/out/src/wire-generated.d.ts +760 -0
  348. package/out/src/wire-generated.js +38 -0
  349. package/out/src/wire-generated.js.map +1 -0
  350. package/package.json +53 -4
  351. package/scripts/contributions.mjs +187 -0
  352. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dap-evaluate.js","sourceRoot":"","sources":["../../src/dap-evaluate.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D;;;;;;;;;;;;;GAaG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mDAA6E;AAC7E,+BAAkC;AAClC,MAAY,MAAM,mCAAe;AACjC,MAAY,EAAE,oCAAgB;AAC9B,qCAAkC;AAClC,uCAAsC;AACtC,6CAAkG;AAClG,yCAAkF;AAElF;8BAC8B;AAC9B,MAAM,aAAa,GAAG,YAAY,CAAC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IAAA,gCAAgB,EAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9E,CAAC;IAAC,MAAM,CAAC;QACP,wBAAwB;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Per-session debuggee state fed by the DAP tracker: output and stop-state.
3
+ *
4
+ * **Output**: memory injection scripts `print('__LSPPROF_MEM*__' + json)` —
5
+ * and debugpy delivers that stdout as DAP `output` events, **not** in the
6
+ * `evaluate` response result (the debuggee's stdout is redirected). So to
7
+ * recover a marker payload after running a script, we accumulate the
8
+ * session's output here and slice out what arrived after the `evaluate` was
9
+ * issued. See `dap-evaluate.ts`.
10
+ *
11
+ * **Stop-state**: debugpy answers `stackTrace` for a RUNNING thread with a
12
+ * sampled frame whose id is not evaluable (`evaluate` then fails with
13
+ * "Unable to find thread for evaluation"), so "is anything paused?" cannot
14
+ * be probed via requests — it must be tracked from `stopped`/`continued`
15
+ * events, exactly as VS Code's own debug UI does. The `continued` event is
16
+ * OPTIONAL per the DAP spec ("a debug adapter is not expected to send this
17
+ * event in response to a request that implies that execution continues"),
18
+ * so a successful resume-implying RESPONSE (`continue`, steps) must clear
19
+ * the bookkeeping too — otherwise there is a stale window between the
20
+ * response and the (late, optional) event where a courier evaluates against
21
+ * a sampled frame of a running thread and fails.
22
+ */
23
+ /** Sentinel for a `stopped` event carrying `allThreadsStopped` but no id. */
24
+ export declare const ALL_THREADS = -1;
25
+ /**
26
+ * Record a `stopped`/`continued` event from the DAP tracker. A continue
27
+ * always invalidates the ALL_THREADS marker — when in doubt we prefer
28
+ * "running" (an honest "pause first" beats an unevaluable stale frame).
29
+ */
30
+ export declare function trackSuspensionEvent(sessionId: string, event: "stopped" | "continued", body: unknown): void;
31
+ /** Thread ids currently stopped (may contain [`ALL_THREADS`]); empty = running. */
32
+ export declare function stoppedThreadIds(sessionId: string): readonly number[];
33
+ /** Remember an outgoing resume-implying request (DAP tracker, editor → adapter). */
34
+ export declare function trackResumeRequest(sessionId: string, message: unknown): void;
35
+ /**
36
+ * Clear stop-state when a resume-implying request SUCCEEDS (adapter → editor).
37
+ * A failed resume did not move anything, so the pause survives. A `continue`
38
+ * clears every thread unless the adapter narrows it (`allThreadsContinued:
39
+ * false`); a step clears only the stepped thread — its own `stopped` event
40
+ * re-arms the bookkeeping when the step lands.
41
+ */
42
+ export declare function trackResumeResponse(sessionId: string, message: unknown): void;
43
+ /** Append a chunk of debuggee output for a session (called by the DAP tracker). */
44
+ export declare function appendDebugOutput(sessionId: string, text: string): void;
45
+ /** Current length of a session's output buffer — a cursor for [`debugOutputSince`]. */
46
+ export declare function debugOutputCursor(sessionId: string): number;
47
+ /** Output appended after `cursor` (everything, if the buffer was trimmed past it). */
48
+ export declare function debugOutputSince(sessionId: string, cursor: number): string;
49
+ /** Drop a session's buffer and stop-state (called when the debug session ends). */
50
+ export declare function clearDebugOutput(sessionId: string): void;
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ // Implements [PROF-UI]. See docs/specs/LSP-PROFILER-SPEC.md
3
+ /**
4
+ * Per-session debuggee state fed by the DAP tracker: output and stop-state.
5
+ *
6
+ * **Output**: memory injection scripts `print('__LSPPROF_MEM*__' + json)` —
7
+ * and debugpy delivers that stdout as DAP `output` events, **not** in the
8
+ * `evaluate` response result (the debuggee's stdout is redirected). So to
9
+ * recover a marker payload after running a script, we accumulate the
10
+ * session's output here and slice out what arrived after the `evaluate` was
11
+ * issued. See `dap-evaluate.ts`.
12
+ *
13
+ * **Stop-state**: debugpy answers `stackTrace` for a RUNNING thread with a
14
+ * sampled frame whose id is not evaluable (`evaluate` then fails with
15
+ * "Unable to find thread for evaluation"), so "is anything paused?" cannot
16
+ * be probed via requests — it must be tracked from `stopped`/`continued`
17
+ * events, exactly as VS Code's own debug UI does. The `continued` event is
18
+ * OPTIONAL per the DAP spec ("a debug adapter is not expected to send this
19
+ * event in response to a request that implies that execution continues"),
20
+ * so a successful resume-implying RESPONSE (`continue`, steps) must clear
21
+ * the bookkeeping too — otherwise there is a stale window between the
22
+ * response and the (late, optional) event where a courier evaluates against
23
+ * a sampled frame of a running thread and fails.
24
+ */
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.ALL_THREADS = void 0;
27
+ exports.trackSuspensionEvent = trackSuspensionEvent;
28
+ exports.stoppedThreadIds = stoppedThreadIds;
29
+ exports.trackResumeRequest = trackResumeRequest;
30
+ exports.trackResumeResponse = trackResumeResponse;
31
+ exports.appendDebugOutput = appendDebugOutput;
32
+ exports.debugOutputCursor = debugOutputCursor;
33
+ exports.debugOutputSince = debugOutputSince;
34
+ exports.clearDebugOutput = clearDebugOutput;
35
+ /** Cap per-session buffer so a long-lived session can't grow it unbounded. */
36
+ const unknown_shape_1 = require("./unknown-shape");
37
+ const MAX_BUFFER_CHARS = 1_000_000;
38
+ /** Maps sessionId → accumulated output text. */
39
+ const buffers = new Map();
40
+ /** Maps sessionId → thread ids reported stopped (empty/absent = running). */
41
+ const stoppedThreads = new Map();
42
+ /** Sentinel for a `stopped` event carrying `allThreadsStopped` but no id. */
43
+ exports.ALL_THREADS = -1;
44
+ /**
45
+ * Record a `stopped`/`continued` event from the DAP tracker. A continue
46
+ * always invalidates the ALL_THREADS marker — when in doubt we prefer
47
+ * "running" (an honest "pause first" beats an unevaluable stale frame).
48
+ */
49
+ function trackSuspensionEvent(sessionId, event, body) {
50
+ if (event === "stopped") {
51
+ trackStopped(sessionId, body);
52
+ }
53
+ else {
54
+ trackContinued(sessionId, body);
55
+ }
56
+ }
57
+ function trackStopped(sessionId, body) {
58
+ const threadId = (0, unknown_shape_1.numberField)(body, "threadId");
59
+ const set = stoppedThreads.get(sessionId) ?? new Set();
60
+ if (threadId !== undefined) {
61
+ set.add(threadId);
62
+ }
63
+ if ((0, unknown_shape_1.booleanField)(body, "allThreadsStopped") === true) {
64
+ set.add(exports.ALL_THREADS);
65
+ }
66
+ if (set.size > 0) {
67
+ stoppedThreads.set(sessionId, set);
68
+ }
69
+ }
70
+ function trackContinued(sessionId, body) {
71
+ const threadId = (0, unknown_shape_1.numberField)(body, "threadId");
72
+ if ((0, unknown_shape_1.booleanField)(body, "allThreadsContinued") !== false || threadId === undefined) {
73
+ stoppedThreads.delete(sessionId);
74
+ return;
75
+ }
76
+ const set = stoppedThreads.get(sessionId);
77
+ set?.delete(threadId);
78
+ set?.delete(exports.ALL_THREADS);
79
+ if (set?.size === 0) {
80
+ stoppedThreads.delete(sessionId);
81
+ }
82
+ }
83
+ /** Thread ids currently stopped (may contain [`ALL_THREADS`]); empty = running. */
84
+ function stoppedThreadIds(sessionId) {
85
+ return [...(stoppedThreads.get(sessionId) ?? [])];
86
+ }
87
+ /** Requests whose successful response means execution resumed (DAP spec:
88
+ * the `continued` event is optional after these, so the response is the
89
+ * only guaranteed signal). */
90
+ const RESUME_COMMANDS = new Set([
91
+ "continue", "reverseContinue", "next", "stepIn", "stepOut", "stepBack", "goto", "restartFrame",
92
+ ]);
93
+ /** Resume commands whose response covers every thread unless the adapter
94
+ * says otherwise (`allThreadsContinued` defaults to true per the spec). */
95
+ const ALL_THREAD_RESUMES = new Set(["continue", "reverseContinue"]);
96
+ /** Maps sessionId → seq of an in-flight resume request → its command + threadId. */
97
+ const pendingResumes = new Map();
98
+ /** Remember an outgoing resume-implying request (DAP tracker, editor → adapter). */
99
+ function trackResumeRequest(sessionId, message) {
100
+ const seq = (0, unknown_shape_1.numberField)(message, "seq");
101
+ if ((0, unknown_shape_1.stringField)(message, "type") !== "request" || seq === undefined) {
102
+ return;
103
+ }
104
+ const command = (0, unknown_shape_1.stringField)(message, "command");
105
+ if (command === undefined || !RESUME_COMMANDS.has(command)) {
106
+ return;
107
+ }
108
+ const pending = pendingResumes.get(sessionId) ?? new Map();
109
+ pending.set(seq, { command, threadId: (0, unknown_shape_1.numberField)((0, unknown_shape_1.rawField)(message, "arguments"), "threadId") });
110
+ pendingResumes.set(sessionId, pending);
111
+ }
112
+ /**
113
+ * Clear stop-state when a resume-implying request SUCCEEDS (adapter → editor).
114
+ * A failed resume did not move anything, so the pause survives. A `continue`
115
+ * clears every thread unless the adapter narrows it (`allThreadsContinued:
116
+ * false`); a step clears only the stepped thread — its own `stopped` event
117
+ * re-arms the bookkeeping when the step lands.
118
+ */
119
+ function trackResumeResponse(sessionId, message) {
120
+ const pending = pendingResumeFor(sessionId, message);
121
+ if (pending === undefined) {
122
+ return;
123
+ }
124
+ clearPendingResume(sessionId, pending.requestSeq);
125
+ if ((0, unknown_shape_1.booleanField)(message, "success") !== true) {
126
+ return;
127
+ }
128
+ trackSuspensionEvent(sessionId, "continued", {
129
+ threadId: pending.request.threadId,
130
+ allThreadsContinued: resumeCoversAllThreads(message, pending.request),
131
+ });
132
+ }
133
+ /** The in-flight resume request `message` answers, when it is a successful-looking response. */
134
+ function pendingResumeFor(sessionId, message) {
135
+ const requestSeq = (0, unknown_shape_1.numberField)(message, "request_seq");
136
+ if ((0, unknown_shape_1.stringField)(message, "type") !== "response" || requestSeq === undefined) {
137
+ return undefined;
138
+ }
139
+ const request = pendingResumes.get(sessionId)?.get(requestSeq);
140
+ return request === undefined ? undefined : { requestSeq, request };
141
+ }
142
+ /** Drop one in-flight resume request and, when it was the last, the session's map. */
143
+ function clearPendingResume(sessionId, requestSeq) {
144
+ const pending = pendingResumes.get(sessionId);
145
+ pending?.delete(requestSeq);
146
+ if (pending !== undefined && pending.size === 0) {
147
+ pendingResumes.delete(sessionId);
148
+ }
149
+ }
150
+ /** Whether a successful resume covers every thread (`allThreadsContinued` defaults true). */
151
+ function resumeCoversAllThreads(message, request) {
152
+ return ALL_THREAD_RESUMES.has(request.command)
153
+ && (0, unknown_shape_1.booleanField)((0, unknown_shape_1.rawField)(message, "body"), "allThreadsContinued") !== false;
154
+ }
155
+ /** Append a chunk of debuggee output for a session (called by the DAP tracker). */
156
+ function appendDebugOutput(sessionId, text) {
157
+ const combined = (buffers.get(sessionId) ?? "") + text;
158
+ buffers.set(sessionId, combined.length > MAX_BUFFER_CHARS
159
+ ? combined.slice(combined.length - MAX_BUFFER_CHARS)
160
+ : combined);
161
+ }
162
+ /** Current length of a session's output buffer — a cursor for [`debugOutputSince`]. */
163
+ function debugOutputCursor(sessionId) {
164
+ return (buffers.get(sessionId) ?? "").length;
165
+ }
166
+ /** Output appended after `cursor` (everything, if the buffer was trimmed past it). */
167
+ function debugOutputSince(sessionId, cursor) {
168
+ const all = buffers.get(sessionId) ?? "";
169
+ return cursor < all.length ? all.slice(cursor) : "";
170
+ }
171
+ /** Drop a session's buffer and stop-state (called when the debug session ends). */
172
+ function clearDebugOutput(sessionId) {
173
+ buffers.delete(sessionId);
174
+ stoppedThreads.delete(sessionId);
175
+ pendingResumes.delete(sessionId);
176
+ }
177
+ //# sourceMappingURL=dap-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dap-output.js","sourceRoot":"","sources":["../../src/dap-output.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,8EAA8E;AAC9E,mDAAmF;AAEnF,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEnC,gDAAgD;AAChD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE1C,6EAA6E;AAC7E,MAAM,cAAc,GAAG,IAAI,GAAG,EAAuB,CAAC;AAEtD,6EAA6E;AAChE,QAAA,WAAW,GAAG,CAAC,CAAC,CAAC;AAE9B;;;;GAIG;AACH,8BACE,SAAiB,EACjB,KAA8B,EAC9B,IAAa;IAEb,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;SAAM,CAAC;QACN,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,SAAiB,EAAE,IAAa;IACpD,MAAM,QAAQ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MAAM,CAAC,SAAS,CAAC,CAAC;AACnC,CAAC"}
@@ -0,0 +1,56 @@
1
+ /** All host effects the resolver needs, injected so it is unit-testable. */
2
+ export interface AdapterResolutionRequest {
3
+ /** Per-launch override from the debug configuration (highest priority). */
4
+ configValue?: string;
5
+ /** User/workspace setting value (second priority). */
6
+ settingValue?: string;
7
+ /** Bare adapter command, e.g. "lldb-dap" or "netcoredbg". */
8
+ commandName: string;
9
+ /** Alternate bare names to also try on PATH, e.g. ["lldb-vscode"]. */
10
+ legacyNames?: string[];
11
+ /** Common absolute install locations, scanned in order. */
12
+ candidates: string[];
13
+ /** Node platform string. */
14
+ platform: NodeJS.Platform;
15
+ /** Process environment (for PATH). */
16
+ env: NodeJS.ProcessEnv;
17
+ /** Filesystem existence check. */
18
+ existsSync: (filePath: string) => boolean;
19
+ /**
20
+ * Optional platform tool probe, e.g. running `xcrun -f lldb-dap` on macOS.
21
+ * Returns the resolved absolute path or undefined/throws when unavailable.
22
+ */
23
+ probe?: (command: string, args: readonly string[]) => string | undefined;
24
+ }
25
+ /** True when `value` is a filesystem path rather than a bare PATH command. */
26
+ export declare function looksLikePath(value: string): boolean;
27
+ /** First directory on PATH that contains `command`, or undefined. */
28
+ export declare function findExecutableOnPath(command: string, env: NodeJS.ProcessEnv, fileExists: (filePath: string) => boolean): string | undefined;
29
+ /**
30
+ * Resolve the adapter to an absolute, existing path, or undefined when nothing
31
+ * usable is found. A configured value that is an explicit path but missing
32
+ * resolves to undefined (so the caller surfaces a precise error rather than
33
+ * spawning a non-existent binary).
34
+ */
35
+ export declare function resolveAdapterPath(req: AdapterResolutionRequest): string | undefined;
36
+ /**
37
+ * Resolve to an absolute path when possible, otherwise the bare command name so
38
+ * the OS can still try to spawn it from PATH at launch time. Mirrors the
39
+ * lenient "always return something" callers (e.g. legacy descriptor factories).
40
+ */
41
+ export declare function resolveAdapterCommand(req: AdapterResolutionRequest): string;
42
+ /** Inputs for {@link missingAdapterMessage}. */
43
+ export interface MissingAdapterMessageInput {
44
+ /** Display name of the adapter, e.g. "lldb-dap". */
45
+ adapterName: string;
46
+ /** The setting key a user can set, e.g. "osprey.debug.lldbDapPath". */
47
+ settingKey: string;
48
+ /** How to obtain it, e.g. "Install LLVM/LLDB". */
49
+ installHint: string;
50
+ /** The configured value that failed, if any (echoed back). */
51
+ configuredValue?: string;
52
+ /** Extra probe sources checked, appended to the "Checked …" list. */
53
+ checkedSources?: string[];
54
+ }
55
+ /** A precise, actionable "adapter not found" message. */
56
+ export declare function missingAdapterMessage(input: MissingAdapterMessageInput): string;
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ // DAP adapter binary resolution, language-neutral.
3
+ //
4
+ // Every LspKit editor needs the same resolution chain to find its debug
5
+ // adapter executable (lldb-dap for Osprey, netcoredbg for SharpLsp, debugpy for
6
+ // Basilisk): a launch-config override, then a user setting, then PATH, then an
7
+ // optional platform probe (e.g. `xcrun -f`), then a list of common install
8
+ // locations. This file owns that chain so no extension re-implements it.
9
+ var __importDefault = (this && this.__importDefault) || function (mod) {
10
+ return (mod && mod.__esModule) ? mod : { "default": mod };
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.looksLikePath = looksLikePath;
14
+ exports.findExecutableOnPath = findExecutableOnPath;
15
+ exports.resolveAdapterPath = resolveAdapterPath;
16
+ exports.resolveAdapterCommand = resolveAdapterCommand;
17
+ exports.missingAdapterMessage = missingAdapterMessage;
18
+ const node_path_1 = __importDefault(require("node:path"));
19
+ /** True when `value` is a filesystem path rather than a bare PATH command. */
20
+ function looksLikePath(value) {
21
+ return value.includes("/") || value.includes("\\");
22
+ }
23
+ /** True when `value` holds actual text rather than being absent or empty. */
24
+ function hasText(value) {
25
+ return value !== undefined && value !== "";
26
+ }
27
+ /** First value that holds text, so an empty setting never shadows a real one. */
28
+ function firstNonEmpty(values) {
29
+ return values.find((value) => hasText(value));
30
+ }
31
+ /** Split PATH into its non-empty directories. */
32
+ function pathDirectories(env) {
33
+ return (env.PATH ?? "").split(node_path_1.default.delimiter).filter((dir) => dir !== "");
34
+ }
35
+ /** First directory on PATH that contains `command`, or undefined. */
36
+ function findExecutableOnPath(command, env, fileExists) {
37
+ return pathDirectories(env)
38
+ .map((dir) => node_path_1.default.join(dir, command))
39
+ .find((candidate) => fileExists(candidate));
40
+ }
41
+ function resolveConfigured(configured, req) {
42
+ const { existsSync: fileExists } = req;
43
+ if (looksLikePath(configured)) {
44
+ return fileExists(configured) ? configured : undefined;
45
+ }
46
+ return findExecutableOnPath(configured, req.env, fileExists);
47
+ }
48
+ /** Every bare command name to try on PATH, primary name first. */
49
+ function adapterCommandNames(req) {
50
+ return [req.commandName, ...(req.legacyNames ?? [])];
51
+ }
52
+ function resolveFromPathNames(req) {
53
+ const { existsSync: fileExists } = req;
54
+ return adapterCommandNames(req)
55
+ .map((name) => findExecutableOnPath(name, req.env, fileExists))
56
+ .find((found) => hasText(found));
57
+ }
58
+ function findExistingCandidate(req) {
59
+ const { existsSync: fileExists } = req;
60
+ return req.candidates.find((candidate) => fileExists(candidate));
61
+ }
62
+ function probePlatform(req) {
63
+ if (req.probe === undefined) {
64
+ return undefined;
65
+ }
66
+ const { existsSync: fileExists } = req;
67
+ try {
68
+ const resolved = req.probe("xcrun", ["-f", req.commandName]);
69
+ return hasText(resolved) && fileExists(resolved) ? resolved : undefined;
70
+ }
71
+ catch {
72
+ return undefined;
73
+ }
74
+ }
75
+ /**
76
+ * Resolve the adapter to an absolute, existing path, or undefined when nothing
77
+ * usable is found. A configured value that is an explicit path but missing
78
+ * resolves to undefined (so the caller surfaces a precise error rather than
79
+ * spawning a non-existent binary).
80
+ */
81
+ function resolveAdapterPath(req) {
82
+ const configured = firstNonEmpty([req.configValue, req.settingValue]);
83
+ if (configured !== undefined) {
84
+ return resolveConfigured(configured, req);
85
+ }
86
+ return (resolveFromPathNames(req) ??
87
+ probePlatform(req) ??
88
+ findExistingCandidate(req));
89
+ }
90
+ /**
91
+ * Resolve to an absolute path when possible, otherwise the bare command name so
92
+ * the OS can still try to spawn it from PATH at launch time. Mirrors the
93
+ * lenient "always return something" callers (e.g. legacy descriptor factories).
94
+ */
95
+ function resolveAdapterCommand(req) {
96
+ return resolveAdapterPath(req) ?? req.commandName;
97
+ }
98
+ /** The "Checked …" list every message ends with. */
99
+ function checkedSourcesOf(input) {
100
+ return ["launch config", "VS Code setting", "PATH", ...(input.checkedSources ?? [])].join(", ");
101
+ }
102
+ /** The "Configured …" clause, present only when a value was configured. */
103
+ function configuredClauseOf(input) {
104
+ return hasText(input.configuredValue)
105
+ ? ` Configured ${input.settingKey}: ${input.configuredValue}.`
106
+ : "";
107
+ }
108
+ /** A precise, actionable "adapter not found" message. */
109
+ function missingAdapterMessage(input) {
110
+ return `${input.adapterName} was not found. ${input.installHint} or set ${input.settingKey} to an existing ${input.adapterName} executable. Checked ${checkedSourcesOf(input)}.${configuredClauseOf(input)}`;
111
+ }
112
+ //# sourceMappingURL=adapter-resolution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter-resolution.js","sourceRoot":"","sources":["../../../src/debug/adapter-resolution.ts"],"names":[],"mappings":";AAAA,mDAAmD;AACnD,EAAE;AACF,wEAAwE;AACxE,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAC3E,yEAAyE;;;;;;;;;;AAEzE,0DAA6B;AA2B7B,8EAA8E;AAC9E,uBAA8B,KAAa;IACzC,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACrD,CAAC;AAED,6EAA6E;AAC7E,SAAS,OAAO,CAAC,KAAyB;IACxC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC;AAC7C,CAAC;AAED,iFAAiF;AACjF,SAAS,aAAa,CAAC,MAAuC;IAC5D,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC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qBAAqB,CAAC,GAAG,CAAC,CAC3B,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,+BAAsC,GAA6B;IACjE,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,WAAW,CAAC;AACpD,CAAC;AAgBD,oDAAoD;AACpD,SAAS,gBAAgB,CAAC,KAAiC;IACzD,OAAO,CAAC,eAAe,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CACvF,IAAI,CACL,CAAC;AACJ,CAAC;AAED,2EAA2E;AAC3E,SAAS,kBAAkB,CAAC,KAAiC;IAC3D,OAAO,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC;QACnC,CAAC,CAAC,eAAe,KAAK,CAAC,UAAU,KAAK,KAAK,CAAC,eAAe,GAAG;QAC9D,CAAC,CAAC,EAAE,CAAC;AACT,CAAC;AAED,yDAAyD;AACzD,+BAAsC,KAAiC;IACrE,OAAO,GAAG,KAAK,CAAC,WAAW,mBAAmB,KAAK,CAAC,WAAW,WAAW,KAAK,CAAC,UAAU,mBAAmB,KAAK,CAAC,WAAW,wBAAwB,gBAAgB,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;AAC/M,CAAC"}
@@ -0,0 +1,18 @@
1
+ /** A single Debug Adapter Protocol message (request, response, or event). */
2
+ export interface DapMessage {
3
+ /** "request" | "response" | "event". */
4
+ type: string;
5
+ seq?: number;
6
+ request_seq?: number;
7
+ /** Request/response command, e.g. "setBreakpoints", "stackTrace". */
8
+ command?: string;
9
+ /** Event name, e.g. "stopped", "continued", "exited". */
10
+ event?: string;
11
+ success?: boolean;
12
+ body?: unknown;
13
+ arguments?: Record<string, unknown>;
14
+ }
15
+ /** Compact one-line summary of a DAP request's arguments for tracing. */
16
+ export declare function summarizeArgs(args: unknown): string;
17
+ /** Compact one-line summary of a DAP response/event body for tracing. */
18
+ export declare function summarizeBody(body: unknown): string;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ // Debug Adapter Protocol wire-message shape plus compact summarizers used for
3
+ // human-readable DAP tracing. Language-neutral: every DAP adapter speaks these.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.summarizeArgs = summarizeArgs;
6
+ exports.summarizeBody = summarizeBody;
7
+ /** Request-argument fields rendered in order by {@link summarizeArgs}. */
8
+ const ARG_KEYS = ["threadId", "frameId", "variablesReference", "expression"];
9
+ /** Body fields whose array length is rendered by {@link summarizeBody}. */
10
+ const BODY_COUNT_KEYS = ["stackFrames", "scopes", "variables", "threads"];
11
+ function isRecord(value) {
12
+ return typeof value === "object" && value !== null;
13
+ }
14
+ /** Render a traced field without relying on Object's default stringification. */
15
+ function traceValue(value) {
16
+ if (typeof value === "string") {
17
+ return value;
18
+ }
19
+ if (typeof value === "number" ||
20
+ typeof value === "boolean" ||
21
+ typeof value === "bigint") {
22
+ return String(value);
23
+ }
24
+ return JSON.stringify(value);
25
+ }
26
+ function isPresent(part) {
27
+ return part !== undefined;
28
+ }
29
+ /** `key=value` for one argument field, or undefined when it is absent. */
30
+ function argPart(record, key) {
31
+ const value = record[key];
32
+ return value === undefined ? undefined : `${key}=${traceValue(value)}`;
33
+ }
34
+ /** `key=<count>` for one array field, or undefined when it is absent. */
35
+ function countPart(record, key) {
36
+ const value = record[key];
37
+ return Array.isArray(value) ? `${key}=${value.length}` : undefined;
38
+ }
39
+ function reasonPart(record) {
40
+ return typeof record.reason === "string" ? `reason=${record.reason}` : undefined;
41
+ }
42
+ function resultPart(record) {
43
+ return typeof record.result === "string" ? `result=${record.result}` : undefined;
44
+ }
45
+ /** Compact one-line summary of a DAP request's arguments for tracing. */
46
+ function summarizeArgs(args) {
47
+ if (!isRecord(args)) {
48
+ return "";
49
+ }
50
+ return [
51
+ ...ARG_KEYS.map((key) => argPart(args, key)),
52
+ countPart(args, "breakpoints"),
53
+ ]
54
+ .filter((part) => isPresent(part))
55
+ .join(" ");
56
+ }
57
+ /** Compact one-line summary of a DAP response/event body for tracing. */
58
+ function summarizeBody(body) {
59
+ if (!isRecord(body)) {
60
+ return "";
61
+ }
62
+ return [
63
+ reasonPart(body),
64
+ argPart(body, "threadId"),
65
+ ...BODY_COUNT_KEYS.map((key) => countPart(body, key)),
66
+ resultPart(body),
67
+ ]
68
+ .filter((part) => isPresent(part))
69
+ .join(" ");
70
+ }
71
+ //# sourceMappingURL=dap-messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dap-messages.js","sourceRoot":"","sources":["../../../src/debug/dap-messages.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,gFAAgF;;;;AAiBhF,0EAA0E;AAC1E,MAAM,QAAQ,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,oBAAoB,EAAE,YAAY,CAAU,CAAC;AAEtF,2EAA2E;AAC3E,MAAM,eAAe,GAAG,CAAC,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,CAAU,CAAC;AAEnF,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC;AAED,iFAAiF;AACjF,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,KAAK,KAAK,SAAS;QAC1B,OAAO,KAAK,KAAK,QAAQ,EACzB,CAAC;QACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,SAAS,CAAC,IAAwB;IACzC,OAAO,IAAI,KAAK,SAAS,CAAC;AAC5B,CAAC;AAED,0EAA0E;AAC1E,SAAS,OAAO,CAAC,MAA+B,EAA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AAyE;AACzE,uBAA8B,IAAa;IACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO;QACL,UAAU,CAAC,IAAI,CAAC;QAChB,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC;QACzB,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACrD,UAAU,CAAC,IAAI,CAAC;KACjB;SACE,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;SACjC,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./adapter-resolution";
2
+ export * from "./launch-config";
3
+ export * from "./launch-lifecycle";
4
+ export * from "./profiling";
5
+ export * from "./dap-messages";
6
+ export * from "./poll";
7
+ export * from "./ui-stubs";
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // @nimblesite/lsp-profiler-ui/out/src/debug — language-neutral VS Code DAP glue for LspKit
3
+ // editors. The runtime entry point exports the pure (vscode-free) building
4
+ // blocks; the test harness lives under the "./testing" subpath export.
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ __exportStar(require("./adapter-resolution"), exports);
21
+ __exportStar(require("./launch-config"), exports);
22
+ __exportStar(require("./launch-lifecycle"), exports);
23
+ __exportStar(require("./profiling"), exports);
24
+ __exportStar(require("./dap-messages"), exports);
25
+ __exportStar(require("./poll"), exports);
26
+ __exportStar(require("./ui-stubs"), exports);
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/debug/index.ts"],"names":[],"mappings":";AAAA,2FAA2F;AAC3F,2EAA2E;AAC3E,uEAAuE;;;;;;;;;;;;;;;;AAEvE,uDAAqC;AACrC,kDAAgC;AAChC,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,6CAA2B"}
@@ -0,0 +1,42 @@
1
+ /** The fields of the active editor's document the synthesizer reads. */
2
+ export interface DebugDocumentLike {
3
+ languageId: string;
4
+ fileName: string;
5
+ }
6
+ /** A minimal active-editor stand-in. */
7
+ export interface ActiveEditorLike {
8
+ document: DebugDocumentLike;
9
+ }
10
+ /** A debug configuration is an open bag of fields (DAP-defined + custom). */
11
+ export type DebugConfigLike = Record<string, unknown>;
12
+ /** Policy describing how to fill an empty config for one language. */
13
+ export interface LaunchConfigPolicy {
14
+ /** Debug type id, e.g. "osprey". */
15
+ type: string;
16
+ /** Human-facing config name, e.g. "Debug Osprey File". */
17
+ name: string;
18
+ /** Request kind; defaults to "launch". */
19
+ request?: string;
20
+ /** True when the document belongs to this language. */
21
+ isLanguageDocument: (document: DebugDocumentLike) => boolean;
22
+ /**
23
+ * Extra fields derived from the resolved program path, e.g. `{ cwd }`.
24
+ * Merged into the synthesized config. Defaults to `{ cwd: dirname(program) }`.
25
+ */
26
+ deriveFields?: (program: string) => DebugConfigLike;
27
+ }
28
+ /** True when a config has none of type/request/name (a blank F5 config). */
29
+ export declare function isBlankConfig(config: DebugConfigLike): boolean;
30
+ /**
31
+ * Fill a blank config from the active editor when it holds a document of this
32
+ * language; an already-populated config is returned untouched. Pure: it mutates
33
+ * and returns `config` but reads nothing global.
34
+ */
35
+ export declare function applyLaunchConfigDefaults(config: DebugConfigLike, activeEditor: ActiveEditorLike | undefined, policy: LaunchConfigPolicy): DebugConfigLike;
36
+ /** Build a complete default config for a given document (or `{}` if foreign). */
37
+ export declare function defaultLaunchConfigForEditor(activeEditor: ActiveEditorLike | undefined, policy: LaunchConfigPolicy): DebugConfigLike;
38
+ /**
39
+ * A stable, per-source output path for a compiled debug artifact, e.g.
40
+ * `<dir>/.lspkit-debug/<basename><exe>`. `subdir` defaults to ".lspkit-debug".
41
+ */
42
+ export declare function defaultDebugOutputPath(program: string, platform: NodeJS.Platform, subdir?: string): string;