@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,38 @@
1
+ "use strict";
2
+ // @generated by scripts/typediagram/generate.mjs from docs/models/profiler.td.
3
+ // DO NOT EDIT BY HAND — edit the .td model and rebuild. This file is gitignored.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ERROR_CODES = exports.METHODS = void 0;
6
+ /** JSON-RPC method names of the lsp-profiler protocol. [PROF-WIRE-METHODS] */
7
+ exports.METHODS = {
8
+ CAPABILITIES: "lspProfiler/capabilities",
9
+ PROCESSES: "lspProfiler/processes",
10
+ KILL: "lspProfiler/kill",
11
+ CPU_START: "lspProfiler/cpu/start",
12
+ CPU_STOP: "lspProfiler/cpu/stop",
13
+ CPU_SNAPSHOT: "lspProfiler/cpu/snapshot",
14
+ CPU_LIST: "lspProfiler/cpu/list",
15
+ CPU_COOPERATIVE_SCRIPT: "lspProfiler/cpu/cooperativeScript",
16
+ CPU_COOPERATIVE_ATTACH: "lspProfiler/cpu/cooperativeAttach",
17
+ CPU_PROGRESS: "lspProfiler/cpu/progress",
18
+ MEMORY_START: "lspProfiler/memory/start",
19
+ MEMORY_SNAPSHOT: "lspProfiler/memory/snapshot",
20
+ MEMORY_DIFF: "lspProfiler/memory/diff",
21
+ MEMORY_REFERENCES: "lspProfiler/memory/references",
22
+ MEMORY_OBJECTS_BY_TYPE: "lspProfiler/memory/objectsByType",
23
+ MEMORY_GC_COLLECT: "lspProfiler/memory/gcCollect",
24
+ MEMORY_STOP: "lspProfiler/memory/stop",
25
+ MEMORY_INGEST: "lspProfiler/memory/ingest",
26
+ };
27
+ /** JSON-RPC error codes of the lsp-profiler protocol. [PROF-ERRORS] */
28
+ exports.ERROR_CODES = {
29
+ OTHER: -32000,
30
+ PROCESS_NOT_FOUND: -32001,
31
+ UNSUPPORTED_RUNTIME: -32002,
32
+ PERMISSION_DENIED: -32003,
33
+ ALREADY_PROFILING: -32004,
34
+ ATTACH_FAILED: -32005,
35
+ TOOL_MISSING: -32006,
36
+ INVALID_PARAMS: -32602,
37
+ };
38
+ //# sourceMappingURL=wire-generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire-generated.js","sourceRoot":"","sources":["../../src/wire-generated.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,iFAAiF;;;AAgvBjF,8EAA8E;AACjE,QAAA,OAAO,GAAG;IACrB,YAAY,EAAE,0BAA0B;IACxC,SAAS,EAAE,uBAAuB;IAClC,IAAI,EAAE,kBAAkB;IACxB,SAAS,EAAE,uBAAuB;IAClC,QAAQ,EAAE,sBAAsB;IAChC,YAAY,EAAE,0BAA0B;IACxC,QAAQ,EAAE,sBAAsB;IAChC,sBAAsB,EAAE,mCAAmC;IAC3D,sBAAsB,EAAE,mCAAmC;IAC3D,YAAY,EAAE,0BAA0B;IACxC,YAAY,EAAE,0BAA0B;IACxC,eAAe,EAAE,6BAA6B;IAC9C,WAAW,EAAE,yBAAyB;IACtC,iBAAiB,EAAE,+BAA+B;IAClD,sBAAsB,EAAE,kCAAkC;IAC1D,iBAAiB,EAAE,8BAA8B;IACjD,WAAW,EAAE,yBAAyB;IACtC,aAAa,EAAE,2BAA2B;CAClC,CAAC;AAEX,uEAAuE;AAC1D,QAAA,WAAW,GAAG;IACzB,KAAK,EAAE,CAAC,KAAK;IACb,iBAAiB,EAAE,CAAC,KAAK;IACzB,mBAAmB,EAAE,CAAC,KAAK;IAC3B,iBAAiB,EAAE,CAAC,KAAK;IACzB,iBAAiB,EAAE,CAAC,KAAK;IACzB,aAAa,EAAE,CAAC,KAAK;IACrB,YAAY,EAAE,CAAC,KAAK;IACpB,cAAc,EAAE,CAAC,KAAK;CACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,55 @@
1
1
  {
2
+ "dependencies": {
3
+ "@preact/signals-core": "^1.14.4"
4
+ },
5
+ "description": "Editor-neutral VS Code UI for the lsp-profiler protocol (processes view, CPU heat map, flame graph, memory dashboard, retention graph, autopilot) plus language-neutral Debug Adapter Protocol glue and test harness (debug, debug/testing).",
6
+ "devDependencies": {
7
+ "@types/mocha": "^10.0.10",
8
+ "@types/node": "^26.1.2",
9
+ "@types/vscode": "^1.99.0",
10
+ "@vscode/test-cli": "^0.0.15",
11
+ "@vscode/test-electron": "^3.1.0",
12
+ "c8": "^12.0.0",
13
+ "glob": "^14.0.3",
14
+ "mocha": "^12.0.3",
15
+ "oxlint": "^1.90.0",
16
+ "oxlint-tsgolint": "^7.0.2005",
17
+ "typescript": "^7.0.2",
18
+ "vscode-languageclient": "^10.1.0",
19
+ "vscode-languageserver": "^10.0.0",
20
+ "vscode-languageserver-textdocument": "^1.0.15"
21
+ },
22
+ "engines": {
23
+ "vscode": "^1.99.0"
24
+ },
25
+ "files": [
26
+ "out/src",
27
+ "!out/src/test",
28
+ "!out/src/debug/test",
29
+ "scripts/contributions.mjs"
30
+ ],
31
+ "license": "MIT",
32
+ "main": "./out/src/index.js",
2
33
  "name": "@nimblesite/lsp-profiler-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
34
+ "overrides": {
35
+ "glob": "$glob",
36
+ "minimatch": "^11.0.3",
37
+ "mocha": "$mocha"
38
+ },
39
+ "peerDependencies": {
40
+ "vscode-languageclient": "^9.0.1 || ^10.1.0"
41
+ },
42
+ "repository": "https://github.com/Nimblesite/lspkit",
43
+ "scripts": {
44
+ "build": "npm run compile",
45
+ "compile": "tsc -p ./",
46
+ "lint": "tsc -p ./ --noEmit && oxlint -c ../.oxlintrc.json --type-aware --deny-warnings src",
47
+ "pretest": "node scripts/write-test-host-manifest.mjs",
48
+ "test": "vscode-test && npm run test:debug",
49
+ "test:debug": "c8 mocha --ui tdd --timeout 10000 \"out/src/debug/test/**/*.test.js\"",
50
+ "test:paths": "mocha --ui tdd out/src/test/suite/editor-path-key.test.js",
51
+ "watch": "tsc -watch -p ./"
52
+ },
53
+ "types": "./out/src/index.d.ts",
54
+ "version": "0.3.0"
55
+ }
@@ -0,0 +1,187 @@
1
+ // The package.json contributions a host declares for the profiler UI.
2
+ // Implements [PROF-UI-IDS]: one generator, parameterised by the host's prefix,
3
+ // so a host's manifest and the library's command registrations never drift.
4
+ //
5
+ // import { profilerContributions } from "@nimblesite/lsp-profiler-ui/scripts/contributions.mjs";
6
+ // const { commands, views, viewsWelcome, menus, configuration, keybindings } =
7
+ // profilerContributions({ prefix: "sharplsp", brand: "SharpLsp", container: "sharplsp-explorer", debugType: "coreclr" });
8
+ //
9
+ // A host whose runtimes have no memory backend passes `memory: false`: no
10
+ // memory command, menu, launch link or autopilot setting is contributed, so
11
+ // the editor never offers what the server cannot do ([PROF-UI-CAPABILITIES]).
12
+
13
+ /** The client commands that only a memory backend can serve. */
14
+ const MEMORY_COMMANDS = new Set(["memoryMenu", "memoryStart", "memorySnapshot", "memoryStop", "memoryDiff",
15
+ "memoryGcCollect", "memoryReferences", "trackMemoryCurrentFile", "memoryTrackProcess"]);
16
+ /** The settings that only tune memory tracking. */
17
+ const MEMORY_SETTINGS = new Set(["autoSnapshotOnPause", "autoSnapshot", "autoSnapshotInterval"]);
18
+
19
+ /** @param {{ prefix: string, brand: string, container: string, debugType: string, restartCommand?: string, memory?: boolean }} host */
20
+ export function profilerContributions(host) {
21
+ const all = allContributions(host);
22
+ return host.memory === false ? withoutMemory(all, `${host.prefix}.profiler.`) : all;
23
+ }
24
+
25
+ /** `contributions` with every memory command, its menu entries and the memory settings removed. */
26
+ function withoutMemory(contributions, prefix) {
27
+ const cpuOnly = (entry) => !MEMORY_COMMANDS.has(entry.command.slice(prefix.length));
28
+ const menus = Object.fromEntries(Object.entries(contributions.menus)
29
+ .map(([menu, entries]) => [menu, entries.filter(cpuOnly)])
30
+ .filter(([, entries]) => entries.length > 0));
31
+ const configuration = Object.fromEntries(Object.entries(contributions.configuration)
32
+ .filter(([key]) => !MEMORY_SETTINGS.has(key.slice(prefix.length))));
33
+ return { ...contributions, commands: contributions.commands.filter(cpuOnly), menus, configuration,
34
+ keybindings: contributions.keybindings.filter(cpuOnly) };
35
+ }
36
+
37
+ /** Each command: its name under `<prefix>.profiler.`, its title, and its icon when it has one. */
38
+ const COMMANDS = [
39
+ ["profileStart", "Start Profiling", "$(flame)"],
40
+ ["profileStop", "Stop Profiling", "$(debug-stop)"],
41
+ ["profileSnapshot", "Take Profile Snapshot", "$(device-camera)"],
42
+ ["profileAttachToDebug", "Profile Debug Session", "$(debug-alt)"],
43
+ ["profileShowResults", "Show Profile Results", "$(flame)"],
44
+ ["memoryMenu", "Memory…", "$(database)"],
45
+ ["memoryStart", "Start Memory Tracking", "$(database)"],
46
+ ["memorySnapshot", "Take Memory Snapshot", "$(device-camera)"],
47
+ ["memoryStop", "Stop Memory Tracking", "$(debug-stop)"],
48
+ ["memoryDiff", "Compare Memory Snapshots", "$(diff)"],
49
+ ["memoryGcCollect", "Force Garbage Collection", "$(trash)"],
50
+ ["inspectVariable", "Inspect Variable in Profiler", "$(graph)"],
51
+ ["inspectVariableType", "Inspect Variable Type", "$(symbol-parameter)"],
52
+ ["watchVariable", "Add Variable to Watch", "$(eye)"],
53
+ ["memoryReferences", "Show Reference Graph", "$(type-hierarchy)"],
54
+ ["refreshProcesses", "Refresh Processes", "$(refresh)"],
55
+ ["sortProcesses", "Sort Processes", "$(sort-precedence)"],
56
+ ["groupProcesses", "Group Processes", "$(group-by-ref-type)"],
57
+ ["filterProcesses", "Filter Processes", "$(filter)"],
58
+ ["profileCurrentFileCpu", "Run & Profile CPU (Current File)", "$(flame)"],
59
+ ["trackMemoryCurrentFile", "Run & Track Memory (Current File)", "$(database)"],
60
+ ["profileProcess", "Profile CPU", "$(flame)"],
61
+ ["memoryTrackProcess", "Track Memory", "$(database)"],
62
+ ["copyProcessPid", "Copy PID"],
63
+ ["revealProcessScript", "Reveal Entry in Editor"],
64
+ ["killProcess", "Kill Process", "$(close)"],
65
+ ];
66
+
67
+ /** Each setting under `<prefix>.profiler.`. */
68
+ const SETTINGS = {
69
+ sampleRate: { type: "number", default: 100, description: "Sampling rate in Hz for CPU profiling (1-1000)." },
70
+ includeNative: { type: "boolean", default: false, description: "Include native frames in profile results." },
71
+ lineThreshold: { type: "number", default: 1, description: "Minimum percentage of total samples for a line to appear as a hotspot (0.1-100)." },
72
+ functionThreshold: { type: "number", default: 2, description: "Minimum percentage of total samples for a function to appear as a hotspot (0.1-100)." },
73
+ maxDiagnosticsPerFile: { type: "number", default: 20, description: "Maximum number of profiling diagnostics per file." },
74
+ showInlineHeatMap: { type: "boolean", default: true, description: "Show inline heat map decorations for hot lines after profiling." },
75
+ profileOnLaunch: { type: "boolean", default: false, description: "Automatically start CPU profiling when a debug session launches." },
76
+ processRefreshMs: { type: "number", default: 2000, minimum: 250, description: "Poll interval (ms) for refreshing the Processes panel while it is visible." },
77
+ preset: {
78
+ type: "string",
79
+ enum: ["default", "quick", "detailed", "longRunning"],
80
+ enumDescriptions: [
81
+ "Use the sampleRate / includeNative settings",
82
+ "Short burst: 10 seconds at 100 Hz, for quick hotspot checks",
83
+ "Thorough: 60 seconds at 200 Hz, higher-fidelity data",
84
+ "No time limit at 50 Hz, for long-running servers and batch jobs",
85
+ ],
86
+ default: "default",
87
+ description: "Profiling preset that configures sample rate and duration.",
88
+ },
89
+ palette: { type: "object", default: {}, additionalProperties: { type: "string", pattern: "^#[0-9a-fA-F]{6}$" }, description: "Override profiler colors: critical, hot, warm, memory, memoryHot, memoryWarm, memoryCool, leak, success." },
90
+ autoSnapshotOnPause: { type: "boolean", default: true, description: "Memory autopilot: while memory tracking is active, automatically take and compare a snapshot every time the debugger pauses." },
91
+ autoSnapshot: { type: "boolean", default: false, description: "Memory autopilot: while memory tracking is active, automatically take a memory snapshot every few seconds even when the program never pauses." },
92
+ autoSnapshotInterval: { type: "number", default: 30, minimum: 1, description: "Seconds between automatic memory snapshots when autoSnapshot is enabled." },
93
+ };
94
+
95
+ /** @param {{ prefix: string, brand: string, container: string, debugType: string, restartCommand?: string, memory?: boolean }} host */
96
+ function allContributions(host) {
97
+ const id = (name) => `${host.prefix}.profiler.${name}`;
98
+ const view = id("processes");
99
+ return {
100
+ commands: COMMANDS.map(([name, title, icon]) => ({ command: id(name), title, category: host.brand, ...(icon ? { icon } : {}) })),
101
+ views: { [host.container]: [{ id: view, name: "Processes", icon: "$(pulse)" }] },
102
+ viewsWelcome: welcomeContents(host, id, view),
103
+ menus: { ...hiddenFromPalette(id), ...debugMenus(host, id), "view/title": viewTitleMenu(id, view), "view/item/context": rowMenu(id, view) },
104
+ configuration: Object.fromEntries(Object.entries(SETTINGS).map(([name, setting]) => [id(name), setting])),
105
+ keybindings: [
106
+ { command: id("profileStart"), key: "ctrl+alt+p", mac: "cmd+alt+p" },
107
+ { command: id("profileStop"), key: "ctrl+alt+shift+p", mac: "cmd+alt+shift+p" },
108
+ ],
109
+ };
110
+ }
111
+
112
+ /** The Processes view's welcome copy for each server and fetch state, with the current-file launches. */
113
+ function welcomeContents(host, id, view) {
114
+ const launchLinks = [
115
+ `[Run & Profile CPU (Current File)](command:${id("profileCurrentFileCpu")})`,
116
+ ...(host.memory === false ? [] : [`[Run & Track Memory (Current File)](command:${id("trackMemoryCurrentFile")})`]),
117
+ ].join("\n");
118
+ const server = id("serverState");
119
+ const running = `${server} == running`;
120
+ const restart = host.restartCommand ? `\n[Restart Server](command:${host.restartCommand})` : "";
121
+ return [
122
+ { view, contents: `Connecting to the ${host.brand} language server…`, when: `${server} != running && ${server} != stopped` },
123
+ { view, contents: `The ${host.brand} language server is not running.${restart}`, when: `${server} == stopped` },
124
+ { view, contents: `Loading processes…\n${launchLinks}`, when: `${running} && ${id("processesState")} == loading` },
125
+ { view, contents: `Couldn't load the process list.\n${launchLinks}`, when: `${running} && ${id("processesState")} == error` },
126
+ { view, contents: `No processes running.\n${launchLinks}`, when: `${running} && ${id("processesState")} == loaded` },
127
+ ];
128
+ }
129
+
130
+ /** Row actions need a row, so the palette never offers them. */
131
+ function hiddenFromPalette(id) {
132
+ const rowOnly = ["profileProcess", "memoryTrackProcess", "copyProcessPid", "revealProcessScript", "killProcess"];
133
+ return { commandPalette: rowOnly.map((name) => ({ command: id(name), when: "false" })) };
134
+ }
135
+
136
+ /** The debugger's variable and watch actions, and the memory toolbar while tracking. */
137
+ function debugMenus(host, id) {
138
+ const debugging = `debugType == ${host.debugType}`;
139
+ const tracking = `${debugging} && ${id("memoryTracking")}`;
140
+ const inspect = [{ command: id("inspectVariable"), when: debugging, group: "inline@10" }];
141
+ return {
142
+ "debug/variables/context": inspect,
143
+ "debug/watch/context": inspect,
144
+ "debug/toolBar": [
145
+ { command: id("memorySnapshot"), when: tracking, group: "navigation@1" },
146
+ { command: id("memoryDiff"), when: tracking, group: "navigation@2" },
147
+ { command: id("memoryStop"), when: tracking, group: "navigation@3" },
148
+ ],
149
+ };
150
+ }
151
+
152
+ /** The Processes view's title bar: launches while idle, session controls while busy, then ordering. */
153
+ function viewTitleMenu(id, view) {
154
+ const inView = `view == ${view}`;
155
+ const tracking = `${inView} && ${id("memoryTracking")}`;
156
+ return [
157
+ { command: id("profileCurrentFileCpu"), when: `${inView} && !${id("cpuBusy")}`, group: "navigation@1" },
158
+ { command: id("trackMemoryCurrentFile"), when: `${inView} && !${id("memoryBusy")}`, group: "navigation@2" },
159
+ { command: id("profileStop"), when: `${inView} && ${id("profiling")}`, group: "navigation@1" },
160
+ { command: id("memorySnapshot"), when: tracking, group: "navigation@1" },
161
+ { command: id("memoryDiff"), when: tracking, group: "navigation@2" },
162
+ { command: id("memoryStop"), when: tracking, group: "navigation@3" },
163
+ { command: id("refreshProcesses"), when: inView, group: "navigation@3" },
164
+ { command: id("sortProcesses"), when: inView, group: "1_order@1" },
165
+ { command: id("groupProcesses"), when: inView, group: "1_order@2" },
166
+ { command: id("filterProcesses"), when: inView, group: "1_order@3" },
167
+ ];
168
+ }
169
+
170
+ /** A row's inline buttons and context menu, gated by its contextValue. */
171
+ function rowMenu(id, view) {
172
+ const profiling = `view == ${view} && viewItem == processProfiling`;
173
+ const profilable = `view == ${view} && viewItem =~ /^process/ && !${id("cpuBusy")}`;
174
+ const trackable = `view == ${view} && viewItem == processDebuggee && !${id("memoryBusy")}`;
175
+ const anyRow = `view == ${view} && viewItem =~ /^(process|blockedProcess)/`;
176
+ return [
177
+ { command: id("profileStop"), when: profiling, group: "inline@0" },
178
+ { command: id("profileProcess"), when: profilable, group: "inline@1" },
179
+ { command: id("memoryTrackProcess"), when: trackable, group: "inline@2" },
180
+ { command: id("profileStop"), when: profiling, group: "1_profile@0" },
181
+ { command: id("profileProcess"), when: profilable, group: "1_profile@1" },
182
+ { command: id("memoryTrackProcess"), when: trackable, group: "1_profile@2" },
183
+ { command: id("copyProcessPid"), when: anyRow, group: "9_copy@1" },
184
+ { command: id("revealProcessScript"), when: anyRow, group: "9_copy@2" },
185
+ { command: id("killProcess"), when: anyRow, group: "9_danger@1" },
186
+ ];
187
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.