@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,760 @@
1
+ /** How a runtime acquires memory data. [PROF-MEMORY-MODE] */
2
+ export type MemoryMode =
3
+ /** The editor evaluates a script inside the paused debuggee and posts the output back. */
4
+ {
5
+ readonly kind: "Courier";
6
+ }
7
+ /** The language server captures the snapshot itself from the process ID. */
8
+ | {
9
+ readonly kind: "Direct";
10
+ };
11
+ /** What the CPU profiler can do for one runtime. */
12
+ export interface CpuCapabilities {
13
+ /** Samples stream while recording, so live progress shows a sample count. */
14
+ readonly live_progress: boolean;
15
+ /** Frames carry file and line, so hot lines exist (not only hot functions). */
16
+ readonly line_level: boolean;
17
+ /** Native (non-managed) frames can be included on request. */
18
+ readonly native_frames: boolean;
19
+ /** The editor can inject a cooperative sampler into a debug session. */
20
+ readonly cooperative: boolean;
21
+ }
22
+ /** What the memory profiler can do for one runtime. */
23
+ export interface MemoryCapabilities {
24
+ /** How memory data is acquired. */
25
+ readonly mode: MemoryMode;
26
+ /** Allocation sites carry file and line. */
27
+ readonly allocation_sites: boolean;
28
+ /** Retention graphs (who keeps objects of a type alive) are available. */
29
+ readonly references: boolean;
30
+ /** Objects of one type can be listed. */
31
+ readonly objects_by_type: boolean;
32
+ /** A garbage collection can be forced. */
33
+ readonly gc_collect: boolean;
34
+ }
35
+ /** One runtime the language server can profile. */
36
+ export interface RuntimeInfo {
37
+ /** Stable identifier, e.g. `python`, `dotnet`, `native`. */
38
+ readonly id: string;
39
+ /** Human-readable name for the UI. */
40
+ readonly display_name: string;
41
+ /** A process's `entry` is a source file an editor can open (a script), never a binary or assembly. */
42
+ readonly source_entries: boolean;
43
+ /** CPU capabilities, absent when the runtime has no CPU profiler. */
44
+ readonly cpu?: CpuCapabilities;
45
+ /** Memory capabilities, absent when the runtime has no memory profiler. */
46
+ readonly memory?: MemoryCapabilities;
47
+ }
48
+ /** Result of `lspProfiler/capabilities`. */
49
+ export interface ProfilerCapabilities {
50
+ /** Every runtime this server profiles. */
51
+ readonly runtimes: Array<RuntimeInfo>;
52
+ }
53
+ /** One stack frame captured by a sampler. */
54
+ export interface StackFrame {
55
+ /** Function name as the runtime reports it. */
56
+ readonly name: string;
57
+ /** Source path, when the runtime knows it. */
58
+ readonly file?: string;
59
+ /** 1-based line, when the runtime knows it. */
60
+ readonly line?: number;
61
+ /** Module, assembly or library that owns the frame, when known. */
62
+ readonly module?: string;
63
+ }
64
+ /** One thread's stack at one sampling tick. */
65
+ export interface ThreadSample {
66
+ /** OS or runtime thread identifier. */
67
+ readonly thread_id: number;
68
+ /** Thread name, when known. */
69
+ readonly thread_name?: string;
70
+ /** The thread was running (not idle) when sampled. */
71
+ readonly active: boolean;
72
+ /** Frames, leaf (innermost) first. */
73
+ readonly frames: Array<StackFrame>;
74
+ }
75
+ /** Why attaching a sampler failed. [PROF-ERRORS] */
76
+ export type AttachErrorKind =
77
+ /** The process does not exist or exited before attach. */
78
+ {
79
+ readonly kind: "ProcessNotFound";
80
+ }
81
+ /** The process does not run the requested runtime. */
82
+ | {
83
+ readonly kind: "UnsupportedRuntime";
84
+ }
85
+ /** Attaching needs privileges the profiler does not have. */
86
+ | {
87
+ readonly kind: "PermissionDenied";
88
+ }
89
+ /** Any other attach failure. */
90
+ | {
91
+ readonly kind: "AttachFailed";
92
+ };
93
+ /** A command from the language server to the elevated sampling helper. */
94
+ export type HelperCommand =
95
+ /** Attach to a process and stream samples. */
96
+ {
97
+ readonly kind: "Attach";
98
+ /** Target process. */
99
+ readonly pid: number;
100
+ /** Samples per second. */
101
+ readonly sample_rate: number;
102
+ /** Include native frames. */
103
+ readonly include_native: boolean;
104
+ }
105
+ /** Stop sampling and exit. */
106
+ | {
107
+ readonly kind: "Stop";
108
+ };
109
+ /** A message from the elevated sampling helper to the language server. */
110
+ export type HelperMessage =
111
+ /** Attach succeeded. */
112
+ {
113
+ readonly kind: "Attached";
114
+ /** Target process. */
115
+ readonly pid: number;
116
+ /** Runtime version detected in the target. */
117
+ readonly runtime_version: string;
118
+ }
119
+ /** Samples from one sampling tick. */
120
+ | {
121
+ readonly kind: "Samples";
122
+ /** One stack per sampled thread. */
123
+ readonly samples: Array<ThreadSample>;
124
+ }
125
+ /** Sampling stopped; the helper is exiting. */
126
+ | {
127
+ readonly kind: "Stopped";
128
+ }
129
+ /** The helper failed; sent before exit so the cause is never a bare EOF. */
130
+ | {
131
+ readonly kind: "Failure";
132
+ /** Classified failure. */
133
+ readonly error_kind: AttachErrorKind;
134
+ /** Underlying cause. */
135
+ readonly message: string;
136
+ };
137
+ /** One process the profiler recognised as belonging to a supported runtime. */
138
+ export interface ProcessInfo {
139
+ /** Operating-system process ID. */
140
+ readonly pid: number;
141
+ /** Parent process ID, when known. */
142
+ readonly ppid?: number;
143
+ /** Process name as reported by the OS. */
144
+ readonly name: string;
145
+ /** Identifier of the runtime that recognised the process. */
146
+ readonly runtime: string;
147
+ /** Runtime version (interpreter or framework), when known. */
148
+ readonly runtime_version?: string;
149
+ /** Host executable (interpreter, `dotnet`, or the binary itself). */
150
+ readonly executable?: string;
151
+ /** What the process runs: a script, an assembly, or a binary path. */
152
+ readonly entry?: string;
153
+ /** CPU usage in percent of one core. */
154
+ readonly cpu_percent: number;
155
+ /** Resident memory in bytes. */
156
+ readonly memory_bytes: number;
157
+ /** Seconds since the process started. */
158
+ readonly runtime_secs: number;
159
+ /** Owning user, when known. */
160
+ readonly user?: string;
161
+ /** Attaching needs elevated privileges. */
162
+ readonly requires_elevation: boolean;
163
+ /** The process belongs to an open workspace root. */
164
+ readonly in_workspace: boolean;
165
+ /** Known launcher or framework (`uvicorn`, `pytest`, `aspnet`), when detected. */
166
+ readonly launcher?: string;
167
+ /** The profiler can attach to this process. */
168
+ readonly attachable: boolean;
169
+ /** Why the profiler cannot attach, when `attachable` is false. */
170
+ readonly unattachable_reason?: string;
171
+ }
172
+ /** Result of `lspProfiler/processes`. */
173
+ export interface ProcessList {
174
+ /** Recognised processes, attachable ones first. */
175
+ readonly processes: Array<ProcessInfo>;
176
+ }
177
+ /** Parameters of `lspProfiler/processes`. */
178
+ export interface ProcessListParams {
179
+ /** Workspace roots used to mark `in_workspace`. */
180
+ readonly workspace_roots: Array<string>;
181
+ }
182
+ /** Parameters of `lspProfiler/kill`. */
183
+ export interface KillProcessParams {
184
+ /** Process to terminate; refused unless a runtime recognises it. */
185
+ readonly pid: number;
186
+ }
187
+ /** Result of `lspProfiler/kill`. */
188
+ export interface KillProcessResult {
189
+ /** Terminated process ID. */
190
+ readonly pid: number;
191
+ /** Always true on success. */
192
+ readonly killed: boolean;
193
+ }
194
+ /** Parameters of `lspProfiler/cpu/start`. */
195
+ export interface StartProfileParams {
196
+ /** Process to attach to. */
197
+ readonly pid: number;
198
+ /** Runtime to use; detected from the process when absent. */
199
+ readonly runtime?: string;
200
+ /** Samples per second. */
201
+ readonly sample_rate?: number;
202
+ /** Include native frames when the runtime supports them. */
203
+ readonly include_native?: boolean;
204
+ /** Stop automatically after this many seconds. */
205
+ readonly duration_secs?: number;
206
+ /** Named preset (`quick`, `detailed`, `longRunning`); absent or `default` uses the defaults. */
207
+ readonly preset?: string;
208
+ }
209
+ /** Result of starting a CPU session. */
210
+ export interface StartProfileResult {
211
+ /** New session identifier. */
212
+ readonly session_id: string;
213
+ /** Profiled process. */
214
+ readonly pid: number;
215
+ /** Runtime that owns the session. */
216
+ readonly runtime: string;
217
+ /** Runtime version reported by the backend. */
218
+ readonly runtime_version: string;
219
+ /** RFC 3339 start time. */
220
+ readonly started_at: string;
221
+ }
222
+ /** Parameters of `lspProfiler/cpu/cooperativeScript`. */
223
+ export interface CooperativeScriptParams {
224
+ /** Runtime whose sampler script is wanted. */
225
+ readonly runtime: string;
226
+ /** Samples per second. */
227
+ readonly sample_rate?: number;
228
+ }
229
+ /** A sampler script for the editor to inject into a paused debuggee. */
230
+ export interface CooperativeScript {
231
+ /** Source to evaluate in the debuggee. */
232
+ readonly script: string;
233
+ /** File the injected sampler streams to; pass it to `cooperativeAttach`. */
234
+ readonly sample_file: string;
235
+ }
236
+ /** Parameters of `lspProfiler/cpu/cooperativeAttach`. */
237
+ export interface CooperativeAttachParams {
238
+ /** Runtime whose sampler was injected. */
239
+ readonly runtime: string;
240
+ /** File returned by `cooperativeScript`. */
241
+ readonly sample_file: string;
242
+ /** Samples per second. */
243
+ readonly sample_rate?: number;
244
+ }
245
+ /** Parameters naming one CPU session. */
246
+ export interface ProfileSessionParams {
247
+ /** Session to act on. */
248
+ readonly session_id: string;
249
+ }
250
+ /** A source line that crossed the hot-line threshold. */
251
+ export interface HotLine {
252
+ /** Absolute source path. */
253
+ readonly file: string;
254
+ /** 1-based line number. */
255
+ readonly line: number;
256
+ /** Samples touching the line. */
257
+ readonly samples: number;
258
+ /** Share of samples touching the line, 0–100. */
259
+ readonly percentage: number;
260
+ }
261
+ /** A function that crossed the hot-function threshold. */
262
+ export interface HotFunction {
263
+ /** Function name as the runtime reports it. */
264
+ readonly name: string;
265
+ /** Absolute source path, when the runtime or a source resolver knows it. */
266
+ readonly file?: string;
267
+ /** 1-based definition line, when known. */
268
+ readonly line?: number;
269
+ /** Samples with the function anywhere on the stack. */
270
+ readonly samples: number;
271
+ /** Inclusive share, 0–100. */
272
+ readonly percentage: number;
273
+ /** Samples with the function as the leaf. */
274
+ readonly self_samples: number;
275
+ /** Exclusive share, 0–100. */
276
+ readonly self_percentage: number;
277
+ }
278
+ /** Files written for a profile. */
279
+ export interface ProfileArtifacts {
280
+ /** Speedscope JSON. */
281
+ readonly speedscope_path?: string;
282
+ /** Self-contained flame graph SVG. */
283
+ readonly flamegraph_path?: string;
284
+ /** V8 `.cpuprofile` for the editor's built-in viewer. */
285
+ readonly cpuprofile_path?: string;
286
+ /** Why an export was refused or failed. */
287
+ readonly export_error?: string;
288
+ }
289
+ /** Severity of a profiler diagnostic. */
290
+ export type DiagnosticLevel =
291
+ /** Informational hint. */
292
+ {
293
+ readonly kind: "Hint";
294
+ }
295
+ /** Information. */
296
+ | {
297
+ readonly kind: "Information";
298
+ }
299
+ /** Warning. */
300
+ | {
301
+ readonly kind: "Warning";
302
+ }
303
+ /** Error. */
304
+ | {
305
+ readonly kind: "Error";
306
+ };
307
+ /** One diagnostic the editor shows in its own profiler collection. */
308
+ export interface ProfilerDiagnostic {
309
+ /** 1-based line. */
310
+ readonly line: number;
311
+ /** Message text. */
312
+ readonly message: string;
313
+ /** Stable diagnostic code. */
314
+ readonly code: string;
315
+ /** Severity. */
316
+ readonly severity: DiagnosticLevel;
317
+ /** Diagnostic source label. */
318
+ readonly source: string;
319
+ }
320
+ /** Diagnostics for one file. */
321
+ export interface FileDiagnostics {
322
+ /** `file://` URI. */
323
+ readonly uri: string;
324
+ /** Diagnostics for the file; empty clears it. */
325
+ readonly diagnostics: Array<ProfilerDiagnostic>;
326
+ }
327
+ /** Result of `lspProfiler/cpu/stop` and `lspProfiler/cpu/snapshot`. */
328
+ export interface ProfileReport {
329
+ /** Session identifier. */
330
+ readonly session_id: string;
331
+ /** Profiled process. */
332
+ readonly pid: number;
333
+ /** Runtime that owns the session. */
334
+ readonly runtime: string;
335
+ /** Seconds recorded. */
336
+ readonly duration_secs: number;
337
+ /** Sampling ticks taken. */
338
+ readonly total_samples: number;
339
+ /** Ticks in which a thread sample survived runtime filtering (user code): every share's denominator. */
340
+ readonly user_samples: number;
341
+ /** Samples per second. */
342
+ readonly sample_rate: number;
343
+ /** Hot functions, hottest first. */
344
+ readonly hot_functions: Array<HotFunction>;
345
+ /** Hot lines, hottest first. */
346
+ readonly hot_lines: Array<HotLine>;
347
+ /** Exported files. */
348
+ readonly artifacts: ProfileArtifacts;
349
+ /** Hotspot diagnostics to show. */
350
+ readonly diagnostics: Array<FileDiagnostics>;
351
+ }
352
+ /** One active CPU session. */
353
+ export interface ProfileSessionInfo {
354
+ /** Session identifier. */
355
+ readonly session_id: string;
356
+ /** Profiled process. */
357
+ readonly pid: number;
358
+ /** Runtime that owns the session. */
359
+ readonly runtime: string;
360
+ /** Runtime version. */
361
+ readonly runtime_version: string;
362
+ /** RFC 3339 start time. */
363
+ readonly started_at: string;
364
+ /** Samples so far. */
365
+ readonly sample_count: number;
366
+ /** Seconds so far. */
367
+ readonly duration_secs: number;
368
+ }
369
+ /** Result of `lspProfiler/cpu/list`. */
370
+ export interface ProfileSessionList {
371
+ /** Active sessions. */
372
+ readonly sessions: Array<ProfileSessionInfo>;
373
+ }
374
+ /** Notification `lspProfiler/cpu/progress`, sent once per second per session. */
375
+ export interface ProfileProgress {
376
+ /** Session identifier. */
377
+ readonly session_id: string;
378
+ /** Samples so far. */
379
+ readonly sample_count: number;
380
+ /** Seconds so far. */
381
+ readonly duration_secs: number;
382
+ /** Hottest function so far. */
383
+ readonly top_function?: string;
384
+ }
385
+ /** One frame of an allocation traceback. */
386
+ export interface TraceFrame {
387
+ /** Source path. */
388
+ readonly file: string;
389
+ /** 1-based line. */
390
+ readonly line: number;
391
+ }
392
+ /** Where memory was allocated: a source line, a type, or both. */
393
+ export interface AllocationSite {
394
+ /** Source path, when the runtime attributes allocations to lines. */
395
+ readonly file?: string;
396
+ /** 1-based line, when known. */
397
+ readonly line?: number;
398
+ /** Type name, when the runtime attributes allocations to types. */
399
+ readonly type_name?: string;
400
+ /** Live bytes. */
401
+ readonly size_bytes: number;
402
+ /** Live objects. */
403
+ readonly count: number;
404
+ /** Allocation call stack, root first. */
405
+ readonly traceback: Array<TraceFrame>;
406
+ }
407
+ /** Heap bytes for one runtime-named generation or heap region. */
408
+ export interface GenerationSize {
409
+ /** Runtime label, such as Gen 0 or LOH. */
410
+ readonly name: string;
411
+ /** Bytes retained in the region after collection. */
412
+ readonly size_bytes: number;
413
+ }
414
+ /** A point-in-time heap summary. */
415
+ export interface HeapSnapshot {
416
+ /** Snapshot identifier. */
417
+ readonly snapshot_id: string;
418
+ /** Live bytes now. */
419
+ readonly current_bytes: number;
420
+ /** Peak bytes since tracking began. */
421
+ readonly peak_bytes: number;
422
+ /** Live objects tracked. */
423
+ readonly object_count: number;
424
+ /** Collection counts per generation. */
425
+ readonly gc_generations: Array<number>;
426
+ /** Generation sizes, distinct from collection counts; absent when unsupported. */
427
+ readonly generation_sizes?: Array<GenerationSize>;
428
+ /** Largest allocation sites. */
429
+ readonly sites: Array<AllocationSite>;
430
+ }
431
+ /** Change at one allocation site between two snapshots. */
432
+ export interface SiteGrowth {
433
+ /** Source path, when known. */
434
+ readonly file?: string;
435
+ /** 1-based line, when known. */
436
+ readonly line?: number;
437
+ /** Type name, when known. */
438
+ readonly type_name?: string;
439
+ /** Byte change (negative when freed). */
440
+ readonly size_diff: number;
441
+ /** Object-count change. */
442
+ readonly count_diff: number;
443
+ /** Live bytes now. */
444
+ readonly size_bytes: number;
445
+ /** Live objects now. */
446
+ readonly count: number;
447
+ /** Allocation call stack, root first. */
448
+ readonly traceback: Array<TraceFrame>;
449
+ }
450
+ /** Comparison of the two most recent snapshots. */
451
+ export interface HeapDiff {
452
+ /** Bytes added across growing sites. */
453
+ readonly total_growth: number;
454
+ /** Bytes released across shrinking sites. */
455
+ readonly total_freed: number;
456
+ /** Growth minus freed. */
457
+ readonly net_growth: number;
458
+ /** Growing sites, largest first. */
459
+ readonly grown: Array<SiteGrowth>;
460
+ /** Shrinking sites, largest first. */
461
+ readonly freed: Array<SiteGrowth>;
462
+ }
463
+ /** Confidence that a growing site leaks. [PROF-MEMORY-CONFIDENCE] */
464
+ export type LeakConfidence =
465
+ /** One growth. */
466
+ {
467
+ readonly kind: "Low";
468
+ }
469
+ /** Two consecutive growths, or one growth over 10 MiB. */
470
+ | {
471
+ readonly kind: "Medium";
472
+ }
473
+ /** Three or more consecutive growths. */
474
+ | {
475
+ readonly kind: "High";
476
+ }
477
+ /** A finaliser-carrying object in an uncollectable cycle. */
478
+ | {
479
+ readonly kind: "Definite";
480
+ };
481
+ /** A growing allocation site scored for leak confidence. */
482
+ export interface SuspectedLeak {
483
+ /** Source path, when known. */
484
+ readonly file?: string;
485
+ /** 1-based line, when known. */
486
+ readonly line?: number;
487
+ /** Type name, when known. */
488
+ readonly type_name?: string;
489
+ /** Byte growth in the latest diff. */
490
+ readonly size_growth: number;
491
+ /** Object growth in the latest diff. */
492
+ readonly count_growth: number;
493
+ /** Live bytes now. */
494
+ readonly current_size: number;
495
+ /** Live objects now. */
496
+ readonly current_count: number;
497
+ /** Confidence level. */
498
+ readonly confidence: LeakConfidence;
499
+ /** Why the level was chosen. */
500
+ readonly reason: string;
501
+ /** Allocation call stack, root first. */
502
+ readonly traceback: Array<TraceFrame>;
503
+ }
504
+ /** An object the collector could not free. */
505
+ export interface UncollectableObject {
506
+ /** Runtime object identity. */
507
+ readonly id: string;
508
+ /** Type name. */
509
+ readonly type_name: string;
510
+ /** Short textual rendering. */
511
+ readonly label: string;
512
+ /** Shallow size in bytes. */
513
+ readonly size_bytes: number;
514
+ /** Why it cannot be collected. */
515
+ readonly reason: string;
516
+ }
517
+ /** Result of a forced collection. */
518
+ export interface GcResult {
519
+ /** Objects collected. */
520
+ readonly collected: number;
521
+ /** Objects that could not be collected. */
522
+ readonly uncollectable_count: number;
523
+ /** Bytes released. */
524
+ readonly freed_bytes: number;
525
+ /** Details of uncollectable objects. */
526
+ readonly uncollectable: Array<UncollectableObject>;
527
+ }
528
+ /** One object in a retention graph. */
529
+ export interface RefNode {
530
+ /** Runtime object identity. */
531
+ readonly id: string;
532
+ /** Type name. */
533
+ readonly type_name: string;
534
+ /** Short textual rendering. */
535
+ readonly label: string;
536
+ /** Shallow size in bytes. */
537
+ readonly size_bytes: number;
538
+ /** Retained size in bytes, when the runtime computes it. */
539
+ readonly retained_bytes?: number;
540
+ /** Distance from the target objects. */
541
+ readonly depth: number;
542
+ /** One of the objects the graph was built for. */
543
+ readonly is_target: boolean;
544
+ /** A garbage-collection root. */
545
+ readonly is_root: boolean;
546
+ /** Kind of root, when `is_root`. */
547
+ readonly root_kind?: string;
548
+ }
549
+ /** A reference from `from` (the holder) to `to` (the held object). */
550
+ export interface RefEdge {
551
+ /** Holder identity. */
552
+ readonly from: string;
553
+ /** Held identity. */
554
+ readonly to: string;
555
+ /** Field, key or index holding the reference. */
556
+ readonly label?: string;
557
+ }
558
+ /** Who keeps objects of one type alive. */
559
+ export interface RefGraph {
560
+ /** Objects. */
561
+ readonly nodes: Array<RefNode>;
562
+ /** References. */
563
+ readonly edges: Array<RefEdge>;
564
+ /** Reference cycles, as node-ID paths. */
565
+ readonly cycles: Array<Array<string>>;
566
+ /** The node budget cut the walk short. */
567
+ readonly truncated: boolean;
568
+ }
569
+ /** One live object of a requested type. */
570
+ export interface ObjectSample {
571
+ /** Runtime object identity. */
572
+ readonly id: string;
573
+ /** Type name. */
574
+ readonly type_name: string;
575
+ /** Shallow size in bytes. */
576
+ readonly size_bytes: number;
577
+ /** Reference count, when the runtime has one. */
578
+ readonly refcount?: number;
579
+ /** Short textual rendering. */
580
+ readonly label: string;
581
+ }
582
+ /** Aggregate count and size of one type. */
583
+ export interface TypeStat {
584
+ /** Type name. */
585
+ readonly type_name: string;
586
+ /** Live objects. */
587
+ readonly count: number;
588
+ /** Live bytes. */
589
+ readonly size_bytes: number;
590
+ }
591
+ /** Live objects of one type plus a per-type summary. */
592
+ export interface ObjectList {
593
+ /** Requested type. */
594
+ readonly type_name: string;
595
+ /** Live objects of the type. */
596
+ readonly total_count: number;
597
+ /** Live bytes of the type. */
598
+ readonly total_bytes: number;
599
+ /** Largest objects of the type. */
600
+ readonly objects: Array<ObjectSample>;
601
+ /** Largest types overall, then the requested type's own row when it is too small to rank. */
602
+ readonly type_summary: Array<TypeStat>;
603
+ }
604
+ /** One point on the memory timeline. */
605
+ export interface TimelinePoint {
606
+ /** Seconds since tracking began. */
607
+ readonly elapsed_secs: number;
608
+ /** Live bytes. */
609
+ readonly current_bytes: number;
610
+ /** Peak bytes. */
611
+ readonly peak_bytes: number;
612
+ /** Live objects. */
613
+ readonly object_count: number;
614
+ /** Snapshot that produced the point. */
615
+ readonly snapshot_id: string;
616
+ }
617
+ /** What one memory step produced. [PROF-MEMORY-OUTCOME] */
618
+ export type MemoryOutcome =
619
+ /** Acknowledged with no data (start/stop). */
620
+ {
621
+ readonly kind: "Ack";
622
+ }
623
+ /** A heap snapshot. */
624
+ | {
625
+ readonly kind: "Snapshot";
626
+ /** The snapshot. */
627
+ readonly snapshot: HeapSnapshot;
628
+ /** Every snapshot of the session so far, oldest first. */
629
+ readonly timeline: Array<TimelinePoint>;
630
+ /** Live bytes rose across the recent timeline. */
631
+ readonly trending_upward: boolean;
632
+ /** V8 `.heapprofile` export, when written. */
633
+ readonly heapprofile_path?: string;
634
+ }
635
+ /** A comparison with leak scoring. */
636
+ | {
637
+ readonly kind: "Diff";
638
+ /** The comparison. */
639
+ readonly diff: HeapDiff;
640
+ /** Growing sites scored for leak confidence. */
641
+ readonly leaks: Array<SuspectedLeak>;
642
+ }
643
+ /** A forced collection. */
644
+ | {
645
+ readonly kind: "Gc";
646
+ /** The collection result. */
647
+ readonly gc: GcResult;
648
+ }
649
+ /** A retention graph. */
650
+ | {
651
+ readonly kind: "Refs";
652
+ /** The retention graph. */
653
+ readonly graph: RefGraph;
654
+ }
655
+ /** Objects of one type. */
656
+ | {
657
+ readonly kind: "Objects";
658
+ /** The objects. */
659
+ readonly objects: ObjectList;
660
+ };
661
+ /** Scored outcome plus the diagnostics it implies. */
662
+ export interface MemoryResult {
663
+ /** Memory session the result belongs to. */
664
+ readonly memory_session_id: string;
665
+ /** What happened. */
666
+ readonly outcome: MemoryOutcome;
667
+ /** Diagnostics to show. */
668
+ readonly diagnostics: Array<FileDiagnostics>;
669
+ }
670
+ /** What the editor must do next for a memory step. [PROF-MEMORY-STEP] */
671
+ export type MemoryStep =
672
+ /** Evaluate `script` in the paused debuggee, then send its output to `lspProfiler/memory/ingest`. */
673
+ {
674
+ readonly kind: "Evaluate";
675
+ /** Source to evaluate in the debuggee. */
676
+ readonly script: string;
677
+ /** Text that marks the script's output as complete; the editor collects evaluate results and debuggee output until it appears. */
678
+ readonly output_marker: string;
679
+ }
680
+ /** The server already captured the data. */
681
+ | {
682
+ readonly kind: "Completed";
683
+ /** The captured result. */
684
+ readonly result: MemoryResult;
685
+ };
686
+ /** Parameters of `lspProfiler/memory/start`. */
687
+ export interface MemoryStartParams {
688
+ /** Process to track. */
689
+ readonly pid: number;
690
+ /** Runtime to use; detected from the process when absent. */
691
+ readonly runtime?: string;
692
+ /** Allocation traceback depth, for runtimes that record tracebacks. */
693
+ readonly traceback_depth?: number;
694
+ }
695
+ /** Result of `lspProfiler/memory/start`. */
696
+ export interface MemoryStartResult {
697
+ /** New memory session. */
698
+ readonly memory_session_id: string;
699
+ /** Runtime that owns the session. */
700
+ readonly runtime: string;
701
+ /** Mode the runtime uses. */
702
+ readonly mode: MemoryMode;
703
+ /** First step. */
704
+ readonly step: MemoryStep;
705
+ }
706
+ /** Parameters naming one memory session. */
707
+ export interface MemorySessionParams {
708
+ /** Session to act on. */
709
+ readonly memory_session_id: string;
710
+ }
711
+ /** Parameters of `references` and `objectsByType`. */
712
+ export interface MemoryTypeParams {
713
+ /** Session to act on. */
714
+ readonly memory_session_id: string;
715
+ /** Type to inspect. */
716
+ readonly type_name: string;
717
+ /** Maximum objects or nodes. */
718
+ readonly limit?: number;
719
+ /** Maximum retention depth. */
720
+ readonly max_depth?: number;
721
+ }
722
+ /** Parameters of `lspProfiler/memory/ingest`. */
723
+ export interface MemoryIngestParams {
724
+ /** Session the output belongs to. */
725
+ readonly memory_session_id: string;
726
+ /** Raw output of an evaluated script. */
727
+ readonly output: string;
728
+ }
729
+ /** JSON-RPC method names of the lsp-profiler protocol. [PROF-WIRE-METHODS] */
730
+ export declare const METHODS: {
731
+ readonly CAPABILITIES: "lspProfiler/capabilities";
732
+ readonly PROCESSES: "lspProfiler/processes";
733
+ readonly KILL: "lspProfiler/kill";
734
+ readonly CPU_START: "lspProfiler/cpu/start";
735
+ readonly CPU_STOP: "lspProfiler/cpu/stop";
736
+ readonly CPU_SNAPSHOT: "lspProfiler/cpu/snapshot";
737
+ readonly CPU_LIST: "lspProfiler/cpu/list";
738
+ readonly CPU_COOPERATIVE_SCRIPT: "lspProfiler/cpu/cooperativeScript";
739
+ readonly CPU_COOPERATIVE_ATTACH: "lspProfiler/cpu/cooperativeAttach";
740
+ readonly CPU_PROGRESS: "lspProfiler/cpu/progress";
741
+ readonly MEMORY_START: "lspProfiler/memory/start";
742
+ readonly MEMORY_SNAPSHOT: "lspProfiler/memory/snapshot";
743
+ readonly MEMORY_DIFF: "lspProfiler/memory/diff";
744
+ readonly MEMORY_REFERENCES: "lspProfiler/memory/references";
745
+ readonly MEMORY_OBJECTS_BY_TYPE: "lspProfiler/memory/objectsByType";
746
+ readonly MEMORY_GC_COLLECT: "lspProfiler/memory/gcCollect";
747
+ readonly MEMORY_STOP: "lspProfiler/memory/stop";
748
+ readonly MEMORY_INGEST: "lspProfiler/memory/ingest";
749
+ };
750
+ /** JSON-RPC error codes of the lsp-profiler protocol. [PROF-ERRORS] */
751
+ export declare const ERROR_CODES: {
752
+ readonly OTHER: -32000;
753
+ readonly PROCESS_NOT_FOUND: -32001;
754
+ readonly UNSUPPORTED_RUNTIME: -32002;
755
+ readonly PERMISSION_DENIED: -32003;
756
+ readonly ALREADY_PROFILING: -32004;
757
+ readonly ATTACH_FAILED: -32005;
758
+ readonly TOOL_MISSING: -32006;
759
+ readonly INVALID_PARAMS: -32602;
760
+ };