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

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":"ids.js","sourceRoot":"","sources":["../../src/ids.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,uEAAuE;;;;;;;;;;;;AAEvE,IAAI,MAAM,GAAG,aAAa,CAAC;AAC3B,IAAI,SAAS,GAAG,UAAU,CAAC;AAC3B,IAAI,OAAO,GAAG,aAAa,CAAC;AAC5B,IAAI,YAAY,GAAG,EAAE,CAAC;AAEtB,yEAAyE;AACzE,oBAA2B,GAK1B;IACC,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC;IACtB,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC;IACtB,OAAO,GAAG,GAAG,CAAC,aAAa,CAAC;IAC5B,YAAY,GAAG,GAAG,CAAC,SAAS,CAAC;AAC/B,CAAC;AAED,yEAAyE;AACzE;IACE,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,iGAAiG;AACjG;IACE,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,+EAA+E;AAC/E;IACE,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,+EAA+E;AAC/E,aAAoB,IAAY;IAC9B,OAAO,GAAG,MAAM,aAAa,IAAI,EAAE,CAAC;AACtC,CAAC;AAED,kEAAkE;AAClE,aAAoB,IAAY;IAC9B,OAAO,GAAG,MAAM,aAAa,IAAI,EAAE,CAAC;AACtC,CAAC;AAED,4DAA4D;AAC5D;IACE,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACxC,CAAC;AAED,uFAAuF;AACvF,aAAoB,IAAY;IAC9B,OAAO,GAAG,MAAM,gBAAgB,IAAI,EAAE,CAAC;AACzC,CAAC;AAED,oHAAoH;AACpH,kBAAqE,KAAY;IAC/E,OAAO,IAAI,KAAK,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AAC/H,CAAC;AAED,yDAAyD;AACzD;IACE,OAAO,GAAG,MAAM,UAAU,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,42 @@
1
+ import type * as vscode from "vscode";
2
+ import type { ProfilerHost } from "./host";
3
+ import type { ProcessesProvider } from "./process-explorer";
4
+ import type { ProfilerStore } from "./store";
5
+ export type { ProfilerHost, LaunchMetric } from "./host";
6
+ export type { ProfilerStore } from "./store";
7
+ export type { LogSink } from "./logger";
8
+ export { LogLevel, nullSink } from "./logger";
9
+ export { cmd, ctx, viewId, lsp, brand, configSection, processUriScheme } from "./ids";
10
+ export type { ProcessInfo, ProcessTreeItem } from "./process-explorer-rows";
11
+ export type { ProcessesProvider } from "./process-explorer";
12
+ export type { ProfileResult } from "./profiler-decorations";
13
+ export { PROFILER_SETTING_KEYS } from "./settings";
14
+ /** The registered profiler UI: its store and a way to tear it down. */
15
+ export interface ProfilerUi {
16
+ readonly store: ProfilerStore;
17
+ /** The processes tree's data provider: the rows the panel renders, for host suites to observe. */
18
+ readonly processes: ProcessesProvider;
19
+ dispose: () => void;
20
+ }
21
+ /** Register the complete profiler UI for `host`. */
22
+ export declare function registerProfilerUi(context: vscode.ExtensionContext, host: ProfilerHost): ProfilerUi;
23
+ export { profilerStatusText } from "./profiler-status";
24
+ export { memoryStatusText } from "./memory-status";
25
+ export { appliedProfileDecorations } from "./profiler-decorations";
26
+ export { appliedMemoryDecorations } from "./memory-decorations";
27
+ export { recordedOperations } from "./progress-ops";
28
+ export { panelMessage, panelBadge, processesViewState } from "./process-reactivity";
29
+ export { recordedAutopilotCaptures, recordedLeakOffers } from "./memory-autopilot";
30
+ export { flamegraphPanelOpen, flamegraphPanelState, profileHasNoUsableData, buildFlamegraphHtml } from "./profiler-flamegraph-html";
31
+ export { memoryDashboardState, buildMemoryDashboardHtml } from "./memory-dashboard";
32
+ export type { MemoryDashboardSnapshot } from "./memory-dashboard";
33
+ export { refGraphState, buildRefGraphHtml } from "./memory-ref-graph";
34
+ export { lastProfileResult } from "./profiler";
35
+ export { contextKeyValues } from "./context-keys";
36
+ export { lastMemorySnapshot } from "./memory-capture";
37
+ export { isDebuggeePaused } from "./debuggee-pause";
38
+ export { panelMessage as processesPanelMessage } from "./process-reactivity";
39
+ export type * as Wire from "./wire-generated";
40
+ export { type ProfilerPalette, resolvePalette, DEFAULT_PALETTE } from "./palette";
41
+ export { openFlamegraphWebview } from "./profiler-flamegraph-html";
42
+ export type { SampledView } from "./sampled-view";
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ // Public surface of @nimblesite/lsp-profiler-ui. Implements [PROF-UI].
3
+ //
4
+ // A host extension creates a store from its `ProfilerHost` and registers the
5
+ // whole profiler UI in one call: processes view, CPU profiler, memory
6
+ // profiler and autopilot. Everything renders from the store's signals.
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.openFlamegraphWebview = exports.DEFAULT_PALETTE = exports.resolvePalette = exports.processesPanelMessage = exports.isDebuggeePaused = exports.lastMemorySnapshot = exports.contextKeyValues = exports.lastProfileResult = exports.buildRefGraphHtml = exports.refGraphState = exports.buildMemoryDashboardHtml = exports.memoryDashboardState = exports.buildFlamegraphHtml = exports.profileHasNoUsableData = exports.flamegraphPanelState = exports.flamegraphPanelOpen = exports.recordedLeakOffers = exports.recordedAutopilotCaptures = exports.processesViewState = exports.panelBadge = exports.panelMessage = exports.recordedOperations = exports.appliedMemoryDecorations = exports.appliedProfileDecorations = exports.memoryStatusText = exports.profilerStatusText = exports.PROFILER_SETTING_KEYS = exports.processUriScheme = exports.configSection = exports.brand = exports.lsp = exports.viewId = exports.ctx = exports.cmd = exports.nullSink = exports.LogLevel = void 0;
9
+ exports.registerProfilerUi = registerProfilerUi;
10
+ const debug_link_setup_1 = require("./debug-link-setup");
11
+ const memory_profiler_1 = require("./memory-profiler");
12
+ const memory_autopilot_1 = require("./memory-autopilot");
13
+ const debuggee_pause_1 = require("./debuggee-pause");
14
+ const process_registration_1 = require("./process-registration");
15
+ const profiler_1 = require("./profiler");
16
+ const store_1 = require("./store");
17
+ var logger_1 = require("./logger");
18
+ Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return logger_1.LogLevel; } });
19
+ Object.defineProperty(exports, "nullSink", { enumerable: true, get: function () { return logger_1.nullSink; } });
20
+ var ids_1 = require("./ids");
21
+ Object.defineProperty(exports, "cmd", { enumerable: true, get: function () { return ids_1.cmd; } });
22
+ Object.defineProperty(exports, "ctx", { enumerable: true, get: function () { return ids_1.ctx; } });
23
+ Object.defineProperty(exports, "viewId", { enumerable: true, get: function () { return ids_1.viewId; } });
24
+ Object.defineProperty(exports, "lsp", { enumerable: true, get: function () { return ids_1.lsp; } });
25
+ Object.defineProperty(exports, "brand", { enumerable: true, get: function () { return ids_1.brand; } });
26
+ Object.defineProperty(exports, "configSection", { enumerable: true, get: function () { return ids_1.configSection; } });
27
+ Object.defineProperty(exports, "processUriScheme", { enumerable: true, get: function () { return ids_1.processUriScheme; } });
28
+ var settings_1 = require("./settings");
29
+ Object.defineProperty(exports, "PROFILER_SETTING_KEYS", { enumerable: true, get: function () { return settings_1.PROFILER_SETTING_KEYS; } });
30
+ /** Register the complete profiler UI for `host`. */
31
+ function registerProfilerUi(context, host) {
32
+ const store = (0, store_1.createProfilerStore)(host);
33
+ const view = (0, process_registration_1.registerProcessesView)(context, store);
34
+ const disposables = [
35
+ ...(0, debuggee_pause_1.registerDebuggeePauseTracking)(),
36
+ ...(0, debug_link_setup_1.registerDebugProfilerSetup)(store, host.debugType),
37
+ ...(0, profiler_1.registerProfiler)(store),
38
+ ...(0, memory_profiler_1.registerMemoryProfiler)(store),
39
+ ...(0, memory_autopilot_1.registerMemoryAutopilot)(store),
40
+ ...view.disposables,
41
+ ];
42
+ context.subscriptions.push(...disposables);
43
+ return { store, processes: view.provider, dispose: () => { disposeProfilerUi(store, disposables); } };
44
+ }
45
+ /** Tear down everything `registerProfilerUi` registered, and the store's state. */
46
+ function disposeProfilerUi(store, disposables) {
47
+ for (const disposable of disposables) {
48
+ disposable.dispose();
49
+ }
50
+ (0, profiler_1.disposeProfiler)();
51
+ (0, memory_profiler_1.disposeMemoryProfiler)();
52
+ store.reset();
53
+ }
54
+ // Observation seams for host test suites: what the UI last rendered.
55
+ var profiler_status_1 = require("./profiler-status");
56
+ Object.defineProperty(exports, "profilerStatusText", { enumerable: true, get: function () { return profiler_status_1.profilerStatusText; } });
57
+ var memory_status_1 = require("./memory-status");
58
+ Object.defineProperty(exports, "memoryStatusText", { enumerable: true, get: function () { return memory_status_1.memoryStatusText; } });
59
+ var profiler_decorations_1 = require("./profiler-decorations");
60
+ Object.defineProperty(exports, "appliedProfileDecorations", { enumerable: true, get: function () { return profiler_decorations_1.appliedProfileDecorations; } });
61
+ var memory_decorations_1 = require("./memory-decorations");
62
+ Object.defineProperty(exports, "appliedMemoryDecorations", { enumerable: true, get: function () { return memory_decorations_1.appliedMemoryDecorations; } });
63
+ var progress_ops_1 = require("./progress-ops");
64
+ Object.defineProperty(exports, "recordedOperations", { enumerable: true, get: function () { return progress_ops_1.recordedOperations; } });
65
+ var process_reactivity_1 = require("./process-reactivity");
66
+ Object.defineProperty(exports, "panelMessage", { enumerable: true, get: function () { return process_reactivity_1.panelMessage; } });
67
+ Object.defineProperty(exports, "panelBadge", { enumerable: true, get: function () { return process_reactivity_1.panelBadge; } });
68
+ Object.defineProperty(exports, "processesViewState", { enumerable: true, get: function () { return process_reactivity_1.processesViewState; } });
69
+ var memory_autopilot_2 = require("./memory-autopilot");
70
+ Object.defineProperty(exports, "recordedAutopilotCaptures", { enumerable: true, get: function () { return memory_autopilot_2.recordedAutopilotCaptures; } });
71
+ Object.defineProperty(exports, "recordedLeakOffers", { enumerable: true, get: function () { return memory_autopilot_2.recordedLeakOffers; } });
72
+ var profiler_flamegraph_html_1 = require("./profiler-flamegraph-html");
73
+ Object.defineProperty(exports, "flamegraphPanelOpen", { enumerable: true, get: function () { return profiler_flamegraph_html_1.flamegraphPanelOpen; } });
74
+ Object.defineProperty(exports, "flamegraphPanelState", { enumerable: true, get: function () { return profiler_flamegraph_html_1.flamegraphPanelState; } });
75
+ Object.defineProperty(exports, "profileHasNoUsableData", { enumerable: true, get: function () { return profiler_flamegraph_html_1.profileHasNoUsableData; } });
76
+ Object.defineProperty(exports, "buildFlamegraphHtml", { enumerable: true, get: function () { return profiler_flamegraph_html_1.buildFlamegraphHtml; } });
77
+ var memory_dashboard_1 = require("./memory-dashboard");
78
+ Object.defineProperty(exports, "memoryDashboardState", { enumerable: true, get: function () { return memory_dashboard_1.memoryDashboardState; } });
79
+ Object.defineProperty(exports, "buildMemoryDashboardHtml", { enumerable: true, get: function () { return memory_dashboard_1.buildMemoryDashboardHtml; } });
80
+ var memory_ref_graph_1 = require("./memory-ref-graph");
81
+ Object.defineProperty(exports, "refGraphState", { enumerable: true, get: function () { return memory_ref_graph_1.refGraphState; } });
82
+ Object.defineProperty(exports, "buildRefGraphHtml", { enumerable: true, get: function () { return memory_ref_graph_1.buildRefGraphHtml; } });
83
+ var profiler_2 = require("./profiler");
84
+ Object.defineProperty(exports, "lastProfileResult", { enumerable: true, get: function () { return profiler_2.lastProfileResult; } });
85
+ var context_keys_1 = require("./context-keys");
86
+ Object.defineProperty(exports, "contextKeyValues", { enumerable: true, get: function () { return context_keys_1.contextKeyValues; } });
87
+ var memory_capture_1 = require("./memory-capture");
88
+ Object.defineProperty(exports, "lastMemorySnapshot", { enumerable: true, get: function () { return memory_capture_1.lastMemorySnapshot; } });
89
+ var debuggee_pause_2 = require("./debuggee-pause");
90
+ Object.defineProperty(exports, "isDebuggeePaused", { enumerable: true, get: function () { return debuggee_pause_2.isDebuggeePaused; } });
91
+ var process_reactivity_2 = require("./process-reactivity");
92
+ Object.defineProperty(exports, "processesPanelMessage", { enumerable: true, get: function () { return process_reactivity_2.panelMessage; } });
93
+ var palette_1 = require("./palette");
94
+ Object.defineProperty(exports, "resolvePalette", { enumerable: true, get: function () { return palette_1.resolvePalette; } });
95
+ Object.defineProperty(exports, "DEFAULT_PALETTE", { enumerable: true, get: function () { return palette_1.DEFAULT_PALETTE; } });
96
+ var profiler_flamegraph_html_2 = require("./profiler-flamegraph-html");
97
+ Object.defineProperty(exports, "openFlamegraphWebview", { enumerable: true, get: function () { return profiler_flamegraph_html_2.openFlamegraphWebview; } });
98
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";A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IAAA,qBAAqB,OAAA"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Logging abstraction for the lsp-profiler UI library.
3
+ *
4
+ * Provides a backend-agnostic `Logger` interface so callers never depend on
5
+ * VS Code APIs or any concrete sink; only the `FileLogSink` in this module's
6
+ * sibling touches the filesystem. The active sink is stored in the centralized
7
+ * Store — no global mutable state lives in this module.
8
+ */
9
+ export { FileLogSink } from "./file-log-sink";
10
+ export declare enum LogLevel {
11
+ Trace = 0,
12
+ Debug = 1,
13
+ Info = 2,
14
+ Warn = 3,
15
+ Error = 4
16
+ }
17
+ /** Backend-agnostic logging interface. */
18
+ export interface LogSink {
19
+ trace: (message: string) => void;
20
+ debug: (message: string) => void;
21
+ info: (message: string) => void;
22
+ warn: (message: string) => void;
23
+ error: (message: string) => void;
24
+ }
25
+ /** Sink that silently discards all messages. */
26
+ export declare const nullSink: LogSink;
27
+ /** Sink that fans out to multiple backends. */
28
+ export declare class CompositeSink implements LogSink {
29
+ private readonly sinks;
30
+ constructor(sinks: LogSink[]);
31
+ trace(message: string): void;
32
+ debug(message: string): void;
33
+ info(message: string): void;
34
+ warn(message: string): void;
35
+ error(message: string): void;
36
+ }
37
+ /**
38
+ * Bind the Logger to a sink accessor function. Called once during
39
+ * activate() so the Logger reads from the store without importing it
40
+ * (avoiding circular deps).
41
+ */
42
+ export declare function bindLogger(accessor: () => LogSink): void;
43
+ /** The global logger. Always safe to call — defaults to a no-op sink. */
44
+ export declare const Logger: {
45
+ readonly trace: (message: string) => void;
46
+ readonly debug: (message: string) => void;
47
+ readonly info: (message: string) => void;
48
+ readonly warn: (message: string) => void;
49
+ readonly error: (message: string) => void;
50
+ };
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ // Implements [PROF-UI-HOST]. See docs/specs/LSP-PROFILER-SPEC.md
3
+ /**
4
+ * Logging abstraction for the lsp-profiler UI library.
5
+ *
6
+ * Provides a backend-agnostic `Logger` interface so callers never depend on
7
+ * VS Code APIs or any concrete sink; only the `FileLogSink` in this module's
8
+ * sibling touches the filesystem. The active sink is stored in the centralized
9
+ * Store — no global mutable state lives in this module.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Logger = exports.CompositeSink = exports.nullSink = exports.LogLevel = exports.FileLogSink = void 0;
13
+ exports.bindLogger = bindLogger;
14
+ var file_log_sink_1 = require("./file-log-sink");
15
+ Object.defineProperty(exports, "FileLogSink", { enumerable: true, get: function () { return file_log_sink_1.FileLogSink; } });
16
+ // ── Public interface ─────────────────────────────────────────────────────
17
+ var LogLevel;
18
+ (function (LogLevel) {
19
+ LogLevel[LogLevel["Trace"] = 0] = "Trace";
20
+ LogLevel[LogLevel["Debug"] = 1] = "Debug";
21
+ LogLevel[LogLevel["Info"] = 2] = "Info";
22
+ LogLevel[LogLevel["Warn"] = 3] = "Warn";
23
+ LogLevel[LogLevel["Error"] = 4] = "Error";
24
+ })(LogLevel || (exports.LogLevel = LogLevel = {}));
25
+ // ── Built-in sinks ──────────────────────────────────────────────────────
26
+ /** Sink that silently discards all messages. */
27
+ exports.nullSink = {
28
+ trace() {
29
+ // Noop.
30
+ },
31
+ debug() {
32
+ // Noop.
33
+ },
34
+ info() {
35
+ // Noop.
36
+ },
37
+ warn() {
38
+ // Noop.
39
+ },
40
+ error() {
41
+ // Noop.
42
+ },
43
+ };
44
+ /** Sink that fans out to multiple backends. */
45
+ class CompositeSink {
46
+ sinks;
47
+ constructor(sinks) {
48
+ this.sinks = sinks;
49
+ }
50
+ trace(message) { for (const sink of this.sinks) {
51
+ sink.trace(message);
52
+ } }
53
+ debug(message) { for (const sink of this.sinks) {
54
+ sink.debug(message);
55
+ } }
56
+ info(message) { for (const sink of this.sinks) {
57
+ sink.info(message);
58
+ } }
59
+ warn(message) { for (const sink of this.sinks) {
60
+ sink.warn(message);
61
+ } }
62
+ error(message) { for (const sink of this.sinks) {
63
+ sink.error(message);
64
+ } }
65
+ }
66
+ exports.CompositeSink = CompositeSink;
67
+ // ── Logger with injectable sink ─────────────────────────────────────────
68
+ /** Sink accessor — set once at startup by extension.ts via bindLogger(). */
69
+ let sinkAccessor = () => exports.nullSink;
70
+ /**
71
+ * Bind the Logger to a sink accessor function. Called once during
72
+ * activate() so the Logger reads from the store without importing it
73
+ * (avoiding circular deps).
74
+ */
75
+ function bindLogger(accessor) {
76
+ sinkAccessor = accessor;
77
+ }
78
+ /** The global logger. Always safe to call — defaults to a no-op sink. */
79
+ exports.Logger = {
80
+ trace(message) { sinkAccessor().trace(message); },
81
+ debug(message) { sinkAccessor().debug(message); },
82
+ info(message) { sinkAccessor().info(message); },
83
+ warn(message) { sinkAccessor().warn(message); },
84
+ error(message) { sinkAccessor().error(message); },
85
+ };
86
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE;;;;;;;GAOG;;;;AAEH,iDAA8C;AAArC,4GAAA,WAAW,OAAA;AAEpB,4EAA4E;AAE5E,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,yCAAS,CAAA;IACT,yCAAS,CAAA;IACT,uCAAQ,CAAA;IACR,uCAAQ,CAAA;IACR,yCAAS,CAAA;AACX,CAAC,EANW,QAAQ,aAAR,QAAQ,GAAR,QAAQ,QAMnB;AAWD,2EAA2E;AAE3E,gDAAgD;AACnC,QAAA,QAAQ,GAAY;IAC/B,KAAK;QACH,QAAQ;IACV,CAAC;IACD,KAAK;QACH,QAAQ;IACV,CAAC;IACD,IAAI;QACF,QAAQ;IACV,CAAC;IACD,IAAI;QACF,QAAQ;IACV,CAAC;IACD,KAAK;QACH,QAAQ;IACV,CAAC;CACF,CAAC;AAEF,+CAA+C;AAC/C;IACmB,KAAK,CAAY;IAClC,YAAmB,KAAgB;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IACM,KAAK,CAAC,OAAe,IAAU,KAAK,MAAM,IAAI,IAAI,IAAI,C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C,OAAe,IAAU,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7D,KAAK,CAAC,OAAe,IAAU,YAAY,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CACvD,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * The memory autopilot: captures snapshots automatically while tracking is
3
+ * active, so the interactive leak hunt is "set a breakpoint and press Continue"
4
+ * instead of a per-pause click treadmill.
5
+ *
6
+ * Two triggers, one capture core ([`captureSnapshotAndDiff`](./memory-capture.ts)):
7
+ * - every debugger pause — [PROF-UI-AUTOPILOT] (on by default)
8
+ * - a fixed interval — [PROF-UI-AUTOPILOT] (opt-in)
9
+ *
10
+ * It also surfaces one proactive leak action the first time a site escalates to
11
+ * High/Definite ([PROF-UI-MEMORY]).
12
+ *
13
+ * The interval timer's lifecycle follows the store's tracking signal — no timer
14
+ * outlives its session. Guards (a synchronous re-entrancy flag plus the shared
15
+ * `isMemoryOperationInFlight` flag) ensure a capture's own transparent pause, an
16
+ * in-progress manual op, or two near-simultaneous `stopped` events never trigger
17
+ * a duplicate capture.
18
+ */
19
+ import * as vscode from "vscode";
20
+ import type { ProfilerStore as Store } from "./store";
21
+ import type { LeakConfidence } from "./memory-decorations";
22
+ /** One recorded automatic capture. */
23
+ export interface AutopilotCapture {
24
+ /** What triggered it. */
25
+ readonly trigger: "pause" | "interval";
26
+ /** Suspected-leak count from the diff. */
27
+ readonly suspectedLeakCount: number;
28
+ /** Highest leak confidence in the diff, or "none". */
29
+ readonly maxConfidence: LeakConfidence | "none";
30
+ /** 1-based line numbers flagged as suspected leaks. */
31
+ readonly leakLines: readonly number[];
32
+ }
33
+ /** One recorded proactive leak-action offer. */
34
+ export interface LeakActionOffer {
35
+ /** Source file, or empty when the runtime placed the leak on no line. */
36
+ readonly file: string;
37
+ /** 1-based line, or 0 when the runtime placed the leak on no line. */
38
+ readonly line: number;
39
+ /** The growing type, or empty when the runtime named none. */
40
+ readonly typeName: string;
41
+ readonly confidence: LeakConfidence;
42
+ /** The notification the user was shown. */
43
+ readonly message: string;
44
+ }
45
+ /** The automatic captures performed this session (e2e seam). */
46
+ export declare function recordedAutopilotCaptures(): readonly AutopilotCapture[];
47
+ /** The proactive leak-action offers made this session (e2e seam). */
48
+ export declare function recordedLeakOffers(): readonly LeakActionOffer[];
49
+ /**
50
+ * Wire the autopilot to the store. The returned disposable tears down the
51
+ * tracking-signal effect and any live interval timer.
52
+ */
53
+ export declare function registerMemoryAutopilot(store: Store): vscode.Disposable[];
54
+ /** Clear all autopilot state (deactivation / test teardown). */
55
+ export declare function disposeMemoryAutopilot(): void;
56
+ /**
57
+ * Called by the DAP tracker on every `stopped` event ([PROF-UI-AUTOPILOT]).
58
+ * Captures automatically when tracking is active for *this* session, the pause
59
+ * is a genuine user pause (no memory op already in flight), and pause-capture is
60
+ * enabled. Fire-and-forget — never blocks the DAP tracker.
61
+ */
62
+ export declare function notifyDebuggeePause(sessionId: string): void;
63
+ /** Seconds between interval captures, or undefined while interval mode is off. */
64
+ export declare function captureIntervalSeconds(): number | undefined;