@jsprismarine/script-host 0.0.0 → 0.23.0-unstable-20261120210452

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 (440) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/LICENSE +21 -0
  3. package/README.md +667 -28
  4. package/dist/ScriptEngine.d.ts +250 -0
  5. package/dist/ScriptEngine.d.ts.map +1 -0
  6. package/dist/ScriptEngine.js +427 -0
  7. package/dist/ScriptEngine.js.map +1 -0
  8. package/dist/absentGlobals.d.ts +29 -0
  9. package/dist/absentGlobals.d.ts.map +1 -0
  10. package/dist/absentGlobals.js +94 -0
  11. package/dist/absentGlobals.js.map +1 -0
  12. package/dist/debugger/DebugSession.d.ts +189 -0
  13. package/dist/debugger/DebugSession.d.ts.map +1 -0
  14. package/dist/debugger/DebugSession.js +588 -0
  15. package/dist/debugger/DebugSession.js.map +1 -0
  16. package/dist/debugger/EngineDebugger.d.ts +158 -0
  17. package/dist/debugger/EngineDebugger.d.ts.map +1 -0
  18. package/dist/debugger/EngineDebugger.js +174 -0
  19. package/dist/debugger/EngineDebugger.js.map +1 -0
  20. package/dist/debugger/channel.d.ts +67 -0
  21. package/dist/debugger/channel.d.ts.map +1 -0
  22. package/dist/debugger/channel.js +120 -0
  23. package/dist/debugger/channel.js.map +1 -0
  24. package/dist/debugger/connectionWorker.d.ts +2 -0
  25. package/dist/debugger/connectionWorker.d.ts.map +1 -0
  26. package/dist/debugger/connectionWorker.js +98 -0
  27. package/dist/debugger/connectionWorker.js.map +1 -0
  28. package/dist/debugger/framing.d.ts +46 -0
  29. package/dist/debugger/framing.d.ts.map +1 -0
  30. package/dist/debugger/framing.js +106 -0
  31. package/dist/debugger/framing.js.map +1 -0
  32. package/dist/debugger/profiler.d.ts +72 -0
  33. package/dist/debugger/profiler.d.ts.map +1 -0
  34. package/dist/debugger/profiler.js +92 -0
  35. package/dist/debugger/profiler.js.map +1 -0
  36. package/dist/debugger/protocol.d.ts +170 -0
  37. package/dist/debugger/protocol.d.ts.map +1 -0
  38. package/dist/debugger/protocol.js +141 -0
  39. package/dist/debugger/protocol.js.map +1 -0
  40. package/dist/debugger/thread.d.ts +85 -0
  41. package/dist/debugger/thread.d.ts.map +1 -0
  42. package/dist/debugger/thread.js +134 -0
  43. package/dist/debugger/thread.js.map +1 -0
  44. package/dist/debugger/transport.d.ts +80 -0
  45. package/dist/debugger/transport.d.ts.map +1 -0
  46. package/dist/debugger/transport.js +150 -0
  47. package/dist/debugger/transport.js.map +1 -0
  48. package/dist/engineSource.d.ts +14 -0
  49. package/dist/engineSource.d.ts.map +1 -0
  50. package/dist/engineSource.js +17 -0
  51. package/dist/engineSource.js.map +1 -0
  52. package/dist/errors.d.ts +62 -0
  53. package/dist/errors.d.ts.map +1 -0
  54. package/dist/errors.js +62 -0
  55. package/dist/errors.js.map +1 -0
  56. package/dist/ffi.d.ts +63 -0
  57. package/dist/ffi.d.ts.map +1 -0
  58. package/dist/ffi.js +156 -0
  59. package/dist/ffi.js.map +1 -0
  60. package/dist/generated/script-modules/common.d.ts +2 -0
  61. package/dist/generated/script-modules/common.js +262 -0
  62. package/dist/generated/script-modules/common.js.map +1 -0
  63. package/dist/generated/script-modules/common.json.d.ts +2 -0
  64. package/dist/generated/script-modules/debug-utilities.d.ts +2 -0
  65. package/dist/generated/script-modules/debug-utilities.js +23 -0
  66. package/dist/generated/script-modules/debug-utilities.js.map +1 -0
  67. package/dist/generated/script-modules/debug-utilities.json.d.ts +2 -0
  68. package/dist/generated/script-modules/diagnostics.d.ts +2 -0
  69. package/dist/generated/script-modules/diagnostics.js +281 -0
  70. package/dist/generated/script-modules/diagnostics.js.map +1 -0
  71. package/dist/generated/script-modules/diagnostics.json.d.ts +2 -0
  72. package/dist/generated/script-modules/server-admin.d.ts +2 -0
  73. package/dist/generated/script-modules/server-admin.js +23 -0
  74. package/dist/generated/script-modules/server-admin.js.map +1 -0
  75. package/dist/generated/script-modules/server-admin.json.d.ts +2 -0
  76. package/dist/generated/script-modules/server-gametest.d.ts +2 -0
  77. package/dist/generated/script-modules/server-gametest.js +23 -0
  78. package/dist/generated/script-modules/server-gametest.js.map +1 -0
  79. package/dist/generated/script-modules/server-gametest.json.d.ts +2 -0
  80. package/dist/generated/script-modules/server-graphics.d.ts +2 -0
  81. package/dist/generated/script-modules/server-graphics.js +30 -0
  82. package/dist/generated/script-modules/server-graphics.js.map +1 -0
  83. package/dist/generated/script-modules/server-graphics.json.d.ts +2 -0
  84. package/dist/generated/script-modules/server-net.d.ts +2 -0
  85. package/dist/generated/script-modules/server-net.js +24 -0
  86. package/dist/generated/script-modules/server-net.js.map +1 -0
  87. package/dist/generated/script-modules/server-net.json.d.ts +2 -0
  88. package/dist/generated/script-modules/server-ui.d.ts +2 -0
  89. package/dist/generated/script-modules/server-ui.js +110 -0
  90. package/dist/generated/script-modules/server-ui.js.map +1 -0
  91. package/dist/generated/script-modules/server-ui.json.d.ts +2 -0
  92. package/dist/generated/script-modules/server.d.ts +2 -0
  93. package/dist/generated/script-modules/server.js +251 -0
  94. package/dist/generated/script-modules/server.js.map +1 -0
  95. package/dist/generated/script-modules/server.json.d.ts +2 -0
  96. package/dist/generated/scriptApi.d.ts +3233 -0
  97. package/dist/generated/scriptApi.d.ts.map +1 -0
  98. package/dist/generated/scriptApi.js +0 -0
  99. package/dist/generated/scriptModules.d.ts +13 -0
  100. package/dist/generated/scriptModules.d.ts.map +1 -0
  101. package/dist/generated/scriptModules.js +34 -0
  102. package/dist/generated/scriptModules.js.map +1 -0
  103. package/dist/host/PackForms.d.ts +71 -0
  104. package/dist/host/PackForms.d.ts.map +1 -0
  105. package/dist/host/PackForms.js +164 -0
  106. package/dist/host/PackForms.js.map +1 -0
  107. package/dist/host/ScriptForms.d.ts +51 -0
  108. package/dist/host/ScriptForms.d.ts.map +1 -0
  109. package/dist/host/ScriptForms.js +103 -0
  110. package/dist/host/ScriptForms.js.map +1 -0
  111. package/dist/host/ScriptHttp.d.ts +54 -0
  112. package/dist/host/ScriptHttp.d.ts.map +1 -0
  113. package/dist/host/ScriptHttp.js +82 -0
  114. package/dist/host/ScriptHttp.js.map +1 -0
  115. package/dist/host/WorldScripts.d.ts +350 -0
  116. package/dist/host/WorldScripts.d.ts.map +1 -0
  117. package/dist/host/WorldScripts.js +1421 -0
  118. package/dist/host/WorldScripts.js.map +1 -0
  119. package/dist/host/blocksItems/blockComponents.d.ts +27 -0
  120. package/dist/host/blocksItems/blockComponents.d.ts.map +1 -0
  121. package/dist/host/blocksItems/blockComponents.js +73 -0
  122. package/dist/host/blocksItems/blockComponents.js.map +1 -0
  123. package/dist/host/blocksItems/blocks.d.ts +12 -0
  124. package/dist/host/blocksItems/blocks.d.ts.map +1 -0
  125. package/dist/host/blocksItems/blocks.js +247 -0
  126. package/dist/host/blocksItems/blocks.js.map +1 -0
  127. package/dist/host/blocksItems/componentFacts.d.ts +14 -0
  128. package/dist/host/blocksItems/componentFacts.d.ts.map +1 -0
  129. package/dist/host/blocksItems/componentFacts.js +34 -0
  130. package/dist/host/blocksItems/componentFacts.js.map +1 -0
  131. package/dist/host/blocksItems/containers.d.ts +18 -0
  132. package/dist/host/blocksItems/containers.d.ts.map +1 -0
  133. package/dist/host/blocksItems/containers.js +128 -0
  134. package/dist/host/blocksItems/containers.js.map +1 -0
  135. package/dist/host/blocksItems/handles.d.ts +10 -0
  136. package/dist/host/blocksItems/handles.d.ts.map +1 -0
  137. package/dist/host/blocksItems/handles.js +30 -0
  138. package/dist/host/blocksItems/handles.js.map +1 -0
  139. package/dist/host/blocksItems/implement.d.ts +22 -0
  140. package/dist/host/blocksItems/implement.d.ts.map +1 -0
  141. package/dist/host/blocksItems/implement.js +23 -0
  142. package/dist/host/blocksItems/implement.js.map +1 -0
  143. package/dist/host/blocksItems/itemExtras.d.ts +8 -0
  144. package/dist/host/blocksItems/itemExtras.d.ts.map +1 -0
  145. package/dist/host/blocksItems/itemExtras.js +106 -0
  146. package/dist/host/blocksItems/itemExtras.js.map +1 -0
  147. package/dist/host/blocksItems/itemLink.d.ts +12 -0
  148. package/dist/host/blocksItems/itemLink.d.ts.map +1 -0
  149. package/dist/host/blocksItems/itemLink.js +38 -0
  150. package/dist/host/blocksItems/itemLink.js.map +1 -0
  151. package/dist/host/blocksItems/items.d.ts +25 -0
  152. package/dist/host/blocksItems/items.d.ts.map +1 -0
  153. package/dist/host/blocksItems/items.js +427 -0
  154. package/dist/host/blocksItems/items.js.map +1 -0
  155. package/dist/host/blocksItems/tags.d.ts +24 -0
  156. package/dist/host/blocksItems/tags.d.ts.map +1 -0
  157. package/dist/host/blocksItems/tags.js +27 -0
  158. package/dist/host/blocksItems/tags.js.map +1 -0
  159. package/dist/host/blocksItems/types.d.ts +13 -0
  160. package/dist/host/blocksItems/types.d.ts.map +1 -0
  161. package/dist/host/blocksItems/types.js +83 -0
  162. package/dist/host/blocksItems/types.js.map +1 -0
  163. package/dist/host/blocksItems/volumes.d.ts +37 -0
  164. package/dist/host/blocksItems/volumes.d.ts.map +1 -0
  165. package/dist/host/blocksItems/volumes.js +361 -0
  166. package/dist/host/blocksItems/volumes.js.map +1 -0
  167. package/dist/host/coverage.d.ts +28 -0
  168. package/dist/host/coverage.d.ts.map +1 -0
  169. package/dist/host/coverage.js +45 -0
  170. package/dist/host/coverage.js.map +1 -0
  171. package/dist/host/customContent.d.ts +81 -0
  172. package/dist/host/customContent.d.ts.map +1 -0
  173. package/dist/host/customContent.js +213 -0
  174. package/dist/host/customContent.js.map +1 -0
  175. package/dist/host/debugUtilities.d.ts +192 -0
  176. package/dist/host/debugUtilities.d.ts.map +1 -0
  177. package/dist/host/debugUtilities.js +503 -0
  178. package/dist/host/debugUtilities.js.map +1 -0
  179. package/dist/host/entities/aimAssist.d.ts +11 -0
  180. package/dist/host/entities/aimAssist.d.ts.map +1 -0
  181. package/dist/host/entities/aimAssist.js +195 -0
  182. package/dist/host/entities/aimAssist.js.map +1 -0
  183. package/dist/host/entities/area.d.ts +14 -0
  184. package/dist/host/entities/area.d.ts.map +1 -0
  185. package/dist/host/entities/area.js +19 -0
  186. package/dist/host/entities/area.js.map +1 -0
  187. package/dist/host/entities/components.d.ts +61 -0
  188. package/dist/host/entities/components.d.ts.map +1 -0
  189. package/dist/host/entities/components.js +642 -0
  190. package/dist/host/entities/components.js.map +1 -0
  191. package/dist/host/entities/entityMembers.d.ts +35 -0
  192. package/dist/host/entities/entityMembers.d.ts.map +1 -0
  193. package/dist/host/entities/entityMembers.js +494 -0
  194. package/dist/host/entities/entityMembers.js.map +1 -0
  195. package/dist/host/entities/playerMembers.d.ts +23 -0
  196. package/dist/host/entities/playerMembers.d.ts.map +1 -0
  197. package/dist/host/entities/playerMembers.js +576 -0
  198. package/dist/host/entities/playerMembers.js.map +1 -0
  199. package/dist/host/entities/world.d.ts +315 -0
  200. package/dist/host/entities/world.d.ts.map +1 -0
  201. package/dist/host/entities/world.js +0 -0
  202. package/dist/host/events/componentEvents.d.ts +11 -0
  203. package/dist/host/events/componentEvents.d.ts.map +1 -0
  204. package/dist/host/events/componentEvents.js +23 -0
  205. package/dist/host/events/componentEvents.js.map +1 -0
  206. package/dist/host/events/eventOptions.d.ts +14 -0
  207. package/dist/host/events/eventOptions.d.ts.map +1 -0
  208. package/dist/host/events/eventOptions.js +224 -0
  209. package/dist/host/events/eventOptions.js.map +1 -0
  210. package/dist/host/events/eventValues.d.ts +41 -0
  211. package/dist/host/events/eventValues.d.ts.map +1 -0
  212. package/dist/host/events/eventValues.js +89 -0
  213. package/dist/host/events/eventValues.js.map +1 -0
  214. package/dist/host/events/worldEvents.d.ts +30 -0
  215. package/dist/host/events/worldEvents.d.ts.map +1 -0
  216. package/dist/host/events/worldEvents.js +207 -0
  217. package/dist/host/events/worldEvents.js.map +1 -0
  218. package/dist/host/formJson.d.ts +35 -0
  219. package/dist/host/formJson.d.ts.map +1 -0
  220. package/dist/host/formJson.js +84 -0
  221. package/dist/host/formJson.js.map +1 -0
  222. package/dist/host/formKit.d.ts +40 -0
  223. package/dist/host/formKit.d.ts.map +1 -0
  224. package/dist/host/formKit.js +124 -0
  225. package/dist/host/formKit.js.map +1 -0
  226. package/dist/host/forms.d.ts +92 -0
  227. package/dist/host/forms.d.ts.map +1 -0
  228. package/dist/host/forms.js +361 -0
  229. package/dist/host/forms.js.map +1 -0
  230. package/dist/host/gametest.d.ts +202 -0
  231. package/dist/host/gametest.d.ts.map +1 -0
  232. package/dist/host/gametest.js +316 -0
  233. package/dist/host/gametest.js.map +1 -0
  234. package/dist/host/inputs.d.ts +29 -0
  235. package/dist/host/inputs.d.ts.map +1 -0
  236. package/dist/host/inputs.js +110 -0
  237. package/dist/host/inputs.js.map +1 -0
  238. package/dist/host/jobs.d.ts +48 -0
  239. package/dist/host/jobs.d.ts.map +1 -0
  240. package/dist/host/jobs.js +62 -0
  241. package/dist/host/jobs.js.map +1 -0
  242. package/dist/host/jsprismarineServer.d.ts +65 -0
  243. package/dist/host/jsprismarineServer.d.ts.map +1 -0
  244. package/dist/host/jsprismarineServer.js +83 -0
  245. package/dist/host/jsprismarineServer.js.map +1 -0
  246. package/dist/host/minecraftServer.d.ts +229 -0
  247. package/dist/host/minecraftServer.d.ts.map +1 -0
  248. package/dist/host/minecraftServer.js +304 -0
  249. package/dist/host/minecraftServer.js.map +1 -0
  250. package/dist/host/minecraftServerUi.d.ts +30 -0
  251. package/dist/host/minecraftServerUi.d.ts.map +1 -0
  252. package/dist/host/minecraftServerUi.js +89 -0
  253. package/dist/host/minecraftServerUi.js.map +1 -0
  254. package/dist/host/netKit.d.ts +44 -0
  255. package/dist/host/netKit.d.ts.map +1 -0
  256. package/dist/host/netKit.js +87 -0
  257. package/dist/host/netKit.js.map +1 -0
  258. package/dist/host/pack.d.ts +71 -0
  259. package/dist/host/pack.d.ts.map +1 -0
  260. package/dist/host/pack.js +157 -0
  261. package/dist/host/pack.js.map +1 -0
  262. package/dist/host/serverAdmin.d.ts +44 -0
  263. package/dist/host/serverAdmin.d.ts.map +1 -0
  264. package/dist/host/serverAdmin.js +96 -0
  265. package/dist/host/serverAdmin.js.map +1 -0
  266. package/dist/host/serverBlocks.d.ts +32 -0
  267. package/dist/host/serverBlocks.d.ts.map +1 -0
  268. package/dist/host/serverBlocks.js +93 -0
  269. package/dist/host/serverBlocks.js.map +1 -0
  270. package/dist/host/serverComponents.d.ts +46 -0
  271. package/dist/host/serverComponents.d.ts.map +1 -0
  272. package/dist/host/serverComponents.js +297 -0
  273. package/dist/host/serverComponents.js.map +1 -0
  274. package/dist/host/serverCustom.d.ts +16 -0
  275. package/dist/host/serverCustom.d.ts.map +1 -0
  276. package/dist/host/serverCustom.js +161 -0
  277. package/dist/host/serverCustom.js.map +1 -0
  278. package/dist/host/serverEntities.d.ts +49 -0
  279. package/dist/host/serverEntities.d.ts.map +1 -0
  280. package/dist/host/serverEntities.js +358 -0
  281. package/dist/host/serverEntities.js.map +1 -0
  282. package/dist/host/serverFeedback.d.ts +15 -0
  283. package/dist/host/serverFeedback.d.ts.map +1 -0
  284. package/dist/host/serverFeedback.js +413 -0
  285. package/dist/host/serverFeedback.js.map +1 -0
  286. package/dist/host/serverGametest.d.ts +43 -0
  287. package/dist/host/serverGametest.d.ts.map +1 -0
  288. package/dist/host/serverGametest.js +246 -0
  289. package/dist/host/serverGametest.js.map +1 -0
  290. package/dist/host/serverItems.d.ts +17 -0
  291. package/dist/host/serverItems.d.ts.map +1 -0
  292. package/dist/host/serverItems.js +71 -0
  293. package/dist/host/serverItems.js.map +1 -0
  294. package/dist/host/serverNet.d.ts +41 -0
  295. package/dist/host/serverNet.d.ts.map +1 -0
  296. package/dist/host/serverNet.js +289 -0
  297. package/dist/host/serverNet.js.map +1 -0
  298. package/dist/host/serverObjects.d.ts +142 -0
  299. package/dist/host/serverObjects.d.ts.map +1 -0
  300. package/dist/host/serverObjects.js +326 -0
  301. package/dist/host/serverObjects.js.map +1 -0
  302. package/dist/host/serverProperties.d.ts +48 -0
  303. package/dist/host/serverProperties.d.ts.map +1 -0
  304. package/dist/host/serverProperties.js +193 -0
  305. package/dist/host/serverProperties.js.map +1 -0
  306. package/dist/host/serverScoreboard.d.ts +9 -0
  307. package/dist/host/serverScoreboard.d.ts.map +1 -0
  308. package/dist/host/serverScoreboard.js +198 -0
  309. package/dist/host/serverScoreboard.js.map +1 -0
  310. package/dist/host/serverStructures.d.ts +9 -0
  311. package/dist/host/serverStructures.d.ts.map +1 -0
  312. package/dist/host/serverStructures.js +243 -0
  313. package/dist/host/serverStructures.js.map +1 -0
  314. package/dist/host/tasks.d.ts +66 -0
  315. package/dist/host/tasks.d.ts.map +1 -0
  316. package/dist/host/tasks.js +107 -0
  317. package/dist/host/tasks.js.map +1 -0
  318. package/dist/host/world.d.ts +1359 -0
  319. package/dist/host/world.d.ts.map +1 -0
  320. package/dist/host/world.js +10 -0
  321. package/dist/host/world.js.map +1 -0
  322. package/dist/host/worldsystem/gameRules.d.ts +189 -0
  323. package/dist/host/worldsystem/gameRules.d.ts.map +1 -0
  324. package/dist/host/worldsystem/gameRules.js +86 -0
  325. package/dist/host/worldsystem/gameRules.js.map +1 -0
  326. package/dist/host/worldsystem/memoryWorldSystem.d.ts +18 -0
  327. package/dist/host/worldsystem/memoryWorldSystem.d.ts.map +1 -0
  328. package/dist/host/worldsystem/memoryWorldSystem.js +223 -0
  329. package/dist/host/worldsystem/memoryWorldSystem.js.map +1 -0
  330. package/dist/host/worldsystem/seam.d.ts +163 -0
  331. package/dist/host/worldsystem/seam.d.ts.map +1 -0
  332. package/dist/host/worldsystem/seam.js +0 -0
  333. package/dist/host/worldsystem/serverClocks.d.ts +18 -0
  334. package/dist/host/worldsystem/serverClocks.d.ts.map +1 -0
  335. package/dist/host/worldsystem/serverClocks.js +166 -0
  336. package/dist/host/worldsystem/serverClocks.js.map +1 -0
  337. package/dist/host/worldsystem/serverDimension.d.ts +10 -0
  338. package/dist/host/worldsystem/serverDimension.d.ts.map +1 -0
  339. package/dist/host/worldsystem/serverDimension.js +388 -0
  340. package/dist/host/worldsystem/serverDimension.js.map +1 -0
  341. package/dist/host/worldsystem/serverFog.d.ts +15 -0
  342. package/dist/host/worldsystem/serverFog.d.ts.map +1 -0
  343. package/dist/host/worldsystem/serverFog.js +66 -0
  344. package/dist/host/worldsystem/serverFog.js.map +1 -0
  345. package/dist/host/worldsystem/serverLoot.d.ts +9 -0
  346. package/dist/host/worldsystem/serverLoot.d.ts.map +1 -0
  347. package/dist/host/worldsystem/serverLoot.js +255 -0
  348. package/dist/host/worldsystem/serverLoot.js.map +1 -0
  349. package/dist/host/worldsystem/serverPrimitiveShapes.d.ts +9 -0
  350. package/dist/host/worldsystem/serverPrimitiveShapes.d.ts.map +1 -0
  351. package/dist/host/worldsystem/serverPrimitiveShapes.js +149 -0
  352. package/dist/host/worldsystem/serverPrimitiveShapes.js.map +1 -0
  353. package/dist/host/worldsystem/serverTickingAreas.d.ts +11 -0
  354. package/dist/host/worldsystem/serverTickingAreas.d.ts.map +1 -0
  355. package/dist/host/worldsystem/serverTickingAreas.js +176 -0
  356. package/dist/host/worldsystem/serverTickingAreas.js.map +1 -0
  357. package/dist/host/worldsystem/serverVolumes.d.ts +9 -0
  358. package/dist/host/worldsystem/serverVolumes.d.ts.map +1 -0
  359. package/dist/host/worldsystem/serverVolumes.js +248 -0
  360. package/dist/host/worldsystem/serverVolumes.js.map +1 -0
  361. package/dist/host/worldsystem/serverWorld.d.ts +18 -0
  362. package/dist/host/worldsystem/serverWorld.d.ts.map +1 -0
  363. package/dist/host/worldsystem/serverWorld.js +199 -0
  364. package/dist/host/worldsystem/serverWorld.js.map +1 -0
  365. package/dist/host/worldsystem/tags.d.ts +40 -0
  366. package/dist/host/worldsystem/tags.d.ts.map +1 -0
  367. package/dist/host/worldsystem/tags.js +43 -0
  368. package/dist/host/worldsystem/tags.js.map +1 -0
  369. package/dist/install.d.ts +39 -0
  370. package/dist/install.d.ts.map +1 -0
  371. package/dist/install.js +83 -0
  372. package/dist/install.js.map +1 -0
  373. package/dist/isRecord.d.ts +3 -0
  374. package/dist/isRecord.d.ts.map +1 -0
  375. package/dist/isRecord.js +6 -0
  376. package/dist/isRecord.js.map +1 -0
  377. package/dist/library.d.ts +40 -0
  378. package/dist/library.d.ts.map +1 -0
  379. package/dist/library.js +101 -0
  380. package/dist/library.js.map +1 -0
  381. package/dist/manifest.d.ts +37 -0
  382. package/dist/manifest.d.ts.map +1 -0
  383. package/dist/manifest.js +40 -0
  384. package/dist/manifest.js.map +1 -0
  385. package/dist/native/manifest.json.js +45 -0
  386. package/dist/native/manifest.json.js.map +1 -0
  387. package/dist/nativeHash.d.ts +16 -0
  388. package/dist/nativeHash.d.ts.map +1 -0
  389. package/dist/nativeHash.js +52 -0
  390. package/dist/nativeHash.js.map +1 -0
  391. package/dist/platform.d.ts +50 -0
  392. package/dist/platform.d.ts.map +1 -0
  393. package/dist/platform.js +77 -0
  394. package/dist/platform.js.map +1 -0
  395. package/dist/shape/binding.d.ts +112 -0
  396. package/dist/shape/binding.d.ts.map +1 -0
  397. package/dist/shape/binding.js +558 -0
  398. package/dist/shape/binding.js.map +1 -0
  399. package/dist/shape/engineRuntime.d.ts +55 -0
  400. package/dist/shape/engineRuntime.d.ts.map +1 -0
  401. package/dist/shape/engineRuntime.js +451 -0
  402. package/dist/shape/engineRuntime.js.map +1 -0
  403. package/dist/shape/format.d.ts +249 -0
  404. package/dist/shape/format.d.ts.map +1 -0
  405. package/dist/shape/format.js +43 -0
  406. package/dist/shape/format.js.map +1 -0
  407. package/dist/shape/history.d.ts +24 -0
  408. package/dist/shape/history.d.ts.map +1 -0
  409. package/dist/shape/history.js +65 -0
  410. package/dist/shape/history.js.map +1 -0
  411. package/dist/shape/implementations.d.ts +105 -0
  412. package/dist/shape/implementations.d.ts.map +1 -0
  413. package/dist/shape/implementations.js +62 -0
  414. package/dist/shape/implementations.js.map +1 -0
  415. package/dist/shape/plan.d.ts +138 -0
  416. package/dist/shape/plan.d.ts.map +1 -0
  417. package/dist/shape/plan.js +0 -0
  418. package/dist/shape/resolve.d.ts +56 -0
  419. package/dist/shape/resolve.d.ts.map +1 -0
  420. package/dist/shape/resolve.js +78 -0
  421. package/dist/shape/resolve.js.map +1 -0
  422. package/dist/shape/version.d.ts +15 -0
  423. package/dist/shape/version.d.ts.map +1 -0
  424. package/dist/shape/version.js +35 -0
  425. package/dist/shape/version.js.map +1 -0
  426. package/dist/testing/debuggerWorker.d.ts +15 -0
  427. package/dist/testing/debuggerWorker.d.ts.map +1 -0
  428. package/dist/testing/debuggerWorker.js +29 -0
  429. package/dist/testing/debuggerWorker.js.map +1 -0
  430. package/dist/testing/engineWorker.d.ts +7 -0
  431. package/dist/testing/engineWorker.d.ts.map +1 -0
  432. package/dist/testing/engineWorker.js +31 -0
  433. package/dist/testing/engineWorker.js.map +1 -0
  434. package/dist/values.d.ts +94 -0
  435. package/dist/values.d.ts.map +1 -0
  436. package/dist/values.js +204 -0
  437. package/dist/values.js.map +1 -0
  438. package/native/manifest.json +49 -0
  439. package/package.json +177 -6
  440. package/scripts/postinstall.mjs +54 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScriptEngine.js","names":[],"sources":["../src/ScriptEngine.ts"],"sourcesContent":["import { ScriptHostErrors } from '@jsprismarine/errors/script-host';\n\nimport { EngineDebugger, PauseReason } from './debugger/EngineDebugger';\nimport type { DebuggerListener } from './debugger/EngineDebugger';\nimport { scriptErrorParams } from './errors';\nimport { bindLibrary } from './ffi';\nimport type { BoundLibrary, NativePointer, NativeSymbols } from './ffi';\nimport { locateLibrary } from './library';\nimport { ScriptHandle, TransferBuffer, ValueReader, ValueWriter } from './values';\nimport type { ScriptValue } from './values';\n\n/** The C interface version this binding speaks, `JSH_ABI_VERSION` in the header. */\nexport const ABI_VERSION = 3;\n\n/** The `jsh_status` codes an entry returns instead of a handle or a count. */\nconst Status = { Thrown: -1, Terminated: -2, OutOfMemory: -3, Invalid: -4 } as const;\n\n/** The `jsh_op` requests the engine sends its callback. */\nconst Op = { Call: 0, LoadModule: 1, Grow: 2, DebugPaused: 3, DebugPoll: 4 } as const;\n\n/** The `jsh_stat` counters, by the field of {@link EngineStats} each fills. */\nconst Stat = {\n steps: 0,\n callbackSteps: 1,\n tickSteps: 2,\n hostCalls: 3,\n bytesToHost: 4,\n bytesFromHost: 5,\n stackOverflows: 6,\n memoryLimitHits: 7,\n memoryUsed: 8,\n handles: 9\n} as const;\n\n/**\n * An engine's counters. A step is one call of QuickJS's interrupt handler, which QuickJS makes once\n * every 10,000 of its polls at backward jumps and calls, so the same script takes the same steps on\n * every machine.\n */\nexport type EngineStats = { -readonly [Key in keyof typeof Stat]: number };\n\n/** The bytes a new engine's transfer buffer starts with. It grows when a value needs more. */\nexport const DEFAULT_BUFFER_SIZE = 64 * 1024;\n\n/**\n * The native stack a new engine's scripts may use, in bytes. A host callback runs on the same\n * stack, so this leaves room for Node.js's own frames under QuickJS's.\n */\nexport const DEFAULT_STACK_SIZE = 256 * 1024;\n\n/** A function scripts call to reach the host. It runs synchronously and must not return a promise. */\nexport type HostFunction = (...args: ScriptValue[]) => ScriptValue;\n\n/**\n * Returns a module for its normalized name: its source, or an object whose own enumerable\n * properties become its exports. Undefined when there is none.\n * @param name - The normalized module name.\n * @param context - The id of the context that imports it.\n */\nexport type ModuleLoader = (name: string, context: ScriptContextId) => string | ScriptHandle | undefined;\n\n/** A context's id in its engine. The context an engine is created with is {@link DEFAULT_CONTEXT}. */\nexport type ScriptContextId = number;\n\n/** The context an engine is created with. */\nexport const DEFAULT_CONTEXT: ScriptContextId = 0;\n\n/** How {@link ScriptHostLibrary.createEngine} sets up an engine. */\nexport interface ScriptEngineOptions {\n /** The bytes the engine may allocate; going over stops the script. Unlimited when absent. */\n readonly memoryLimit?: number;\n /** The native stack, in bytes, past which a script gets `InternalError: stack overflow`. */\n readonly stackSize?: number;\n /** The transfer buffer's first size in bytes. */\n readonly bufferSize?: number;\n /** Supplies the source of each module a script imports. */\n readonly loadModule?: ModuleLoader;\n}\n\n/** How {@link ScriptEngine.attachDebugger} attaches a debugger. */\nexport interface DebuggerOptions {\n /**\n * The context the debugger watches, {@link DEFAULT_CONTEXT} when absent. Only its scripts stop\n * and poll; the other contexts' scripts run as if no debugger were attached, even in a file\n * with a breakpoint. A stop's frames still include every context's, each queried in its own.\n */\n readonly context?: ScriptContextId;\n /**\n * How many lines a running script runs between {@link DebuggerListener.poll} calls, which let a\n * debugger pause a script that never ends. A count of lines, not a time, so a script polls at\n * the same lines every run. No polling when 0.\n */\n readonly pollLines?: number;\n}\n\n/** The lines between polls when {@link DebuggerOptions.pollLines} is absent. */\nexport const DEFAULT_POLL_LINES = 10_000;\n\n/** How many steps one entry from the host, and one tick, may take. Unlimited when absent. */\nexport interface StepBudget {\n readonly perCallback?: number;\n readonly perTick?: number;\n}\n\n/** The script host's native library, bound for this thread. Engines run on the thread that loaded it. */\nexport class ScriptHostLibrary {\n private readonly bound: BoundLibrary;\n\n private constructor(bound: BoundLibrary) {\n this.bound = bound;\n }\n\n /**\n * Loads the library and checks that it speaks this binding's interface.\n * @param path - The library's file; {@link locateLibrary} finds it when absent.\n * @returns The bound library.\n * @throws {NativeLibraryError} When there is no library, or it speaks another interface.\n */\n public static load(path: string = locateLibrary()): ScriptHostLibrary {\n const bound = bindLibrary(path);\n const version = bound.symbols.jsh_abi_version();\n if (version !== ABI_VERSION) {\n bound.close();\n throw new ScriptHostErrors.LibraryInterfaceMismatch({ path, version, abiVersion: ABI_VERSION });\n }\n return new ScriptHostLibrary(bound);\n }\n\n /**\n * Creates an engine: one QuickJS runtime and context, with the globals BDS lacks removed and\n * `Function` from a string refused.\n * @param options - Its limits and module loader.\n * @returns The engine.\n * @throws {Error} When the engine cannot be created.\n */\n public createEngine(options: ScriptEngineOptions = {}): ScriptEngine {\n return new ScriptEngine(this.bound, options);\n }\n\n /** Unloads the library. Destroy its engines first. */\n public close(): void {\n this.bound.close();\n }\n}\n\n/**\n * One script engine: a QuickJS runtime and context in native memory, its values held by handle.\n * Every method runs synchronously on the thread that created the engine.\n */\nexport class ScriptEngine {\n private readonly bound: BoundLibrary;\n private readonly native: NativeSymbols;\n private readonly pointer: NativePointer;\n private readonly callback: NativePointer;\n private readonly buffer: TransferBuffer;\n private readonly functions = new Map<number, HostFunction>();\n private readonly loadModule: ModuleLoader | undefined;\n private nextFunctionId = 1;\n private debuggerListener: DebuggerListener | undefined;\n /** How many callbacks from the engine are running. */\n private active = 0;\n /** Handles host functions returned, each with the depth of the host call, until the engine has read them. */\n private readonly released: { readonly handle: ScriptHandle; readonly depth: number }[] = [];\n private destroyed = false;\n\n /** Use {@link ScriptHostLibrary.createEngine}. */\n public constructor(bound: BoundLibrary, options: ScriptEngineOptions) {\n this.bound = bound;\n this.native = bound.symbols;\n this.loadModule = options.loadModule;\n // The engine is created after the buffer, so the first growth can only come later.\n let engine: NativePointer = 0n;\n this.buffer = new TransferBuffer(options.bufferSize ?? DEFAULT_BUFFER_SIZE, (memory) =>\n this.native.jsh_engine_set_buffer(engine, bound.pointerOf(memory), memory.byteLength)\n );\n this.callback = bound.registerHostCallback((op, id, length) => this.onHost(op, id, length));\n engine = this.native.jsh_engine_create(\n this.callback,\n bound.pointerOf(this.buffer.memory),\n this.buffer.capacity,\n options.memoryLimit ?? 0,\n options.stackSize ?? DEFAULT_STACK_SIZE\n );\n if (engine === 0n) {\n bound.unregisterHostCallback(this.callback);\n throw new ScriptHostErrors.EngineNotCreated();\n }\n this.pointer = engine;\n }\n\n /**\n * Runs a classic script.\n * @param source - The script's text.\n * @param name - The file name its stack traces show.\n * @returns Its completion value. A handle in it belongs to the caller, who frees it.\n * @throws {ScriptError} When the script throws, runs out of steps or goes over the memory limit.\n */\n public evaluate(source: string, name = '<eval>'): ScriptValue {\n const text = Buffer.from(`${source}\\0`, 'utf8');\n return this.settle(() =>\n this.take(this.check(this.native.jsh_eval_script(this.live(), name, text, text.length - 1)))\n );\n }\n\n /**\n * Runs a module, loading each module it imports through the engine's module loader.\n * @param name - The module's name, which relative imports resolve against.\n * @param source - The module's text.\n * @returns A handle to the module's namespace, which the caller frees.\n * @throws {ScriptError} When the module or one it imports throws, or does not load.\n */\n public evaluateModule(name: string, source: string): ScriptHandle {\n const text = Buffer.from(`${source}\\0`, 'utf8');\n return this.settle(\n () => new ScriptHandle(this.check(this.native.jsh_eval_module(this.live(), name, text, text.length - 1)))\n );\n }\n\n /**\n * Runs pending promise jobs until none is left, in the order they were queued.\n * @param context - Runs only this context's jobs, leaving the others queued. Every context's when absent.\n * @returns How many jobs ran.\n * @throws {ScriptError} When a job throws; the jobs after it stay pending.\n */\n public runJobs(context?: ScriptContextId): number {\n return this.settle(() => this.check(this.native.jsh_run_jobs(this.live(), context ?? -1)));\n }\n\n /**\n * Creates another context in the engine: a global object of its own, with the same limits as\n * the first. The current context stays as it was.\n * @returns The new context's id.\n * @throws {ScriptOutOfMemoryError} When the engine cannot make it.\n */\n public createContext(): ScriptContextId {\n return this.check(this.native.jsh_context_create(this.live()));\n }\n\n /**\n * Makes a context current, so evaluations, the global object and new host functions are its.\n * While a script calls the host, the calling script's context is current.\n * @returns The context that was current before.\n * @throws {RangeError} When the engine has no such context.\n */\n public useContext(context: ScriptContextId): ScriptContextId {\n return this.check(this.native.jsh_context_select(this.live(), context));\n }\n\n /**\n * Runs a function with a context current, and makes the one before current again after it.\n * @returns What the function returned.\n */\n public inContext<Result>(context: ScriptContextId, run: () => Result): Result {\n const previous = this.useContext(context);\n try {\n return run();\n } finally {\n this.useContext(previous);\n }\n }\n\n /**\n * Calls a script function.\n * @param fn - The function.\n * @param thisValue - Its `this`, or undefined.\n * @param args - Its arguments.\n * @returns What it returned. A handle in it belongs to the caller, who frees it.\n * @throws {ScriptError} When the function throws, runs out of steps or goes over the memory limit.\n */\n public call(fn: ScriptHandle, thisValue: ScriptHandle | undefined, ...args: ScriptValue[]): ScriptValue {\n const writer = new ValueWriter(this.buffer).list(args);\n return this.settle(() =>\n this.take(this.check(this.native.jsh_call(this.live(), fn.id, thisValue?.id ?? 0, writer.length)))\n );\n }\n\n /**\n * Frees a handle that a host function returns, once the engine has read the result. A host\n * function cannot free a handle it made for its result before it returns, and the engine\n * takes its own reference when it reads one.\n * @returns The handle, for the host function to return.\n */\n public release(handle: ScriptHandle): ScriptHandle {\n this.released.push({ handle, depth: this.active });\n return handle;\n }\n\n /** Returns a handle to the global object, which the caller frees. */\n public global(): ScriptHandle {\n return new ScriptHandle(this.check(this.native.jsh_global(this.live())));\n }\n\n /**\n * Reads a property, running a getter if it has one.\n * @returns The value. A handle in it belongs to the caller, who frees it.\n */\n public get(object: ScriptHandle, key: string): ScriptValue {\n return this.take(this.check(this.native.jsh_get(this.live(), object.id, key)));\n }\n\n /** Writes a property, running a setter if it has one. */\n public set(object: ScriptHandle, key: string, value: ScriptValue): void {\n const handle = value instanceof ScriptHandle ? value : this.make(value);\n try {\n this.check(this.native.jsh_set(this.live(), object.id, key, handle.id));\n } finally {\n if (handle !== value) this.free(handle);\n }\n }\n\n /**\n * Makes a script function that calls `fn` synchronously. Every call crosses into the host\n * once. A handle among its arguments lasts until `fn` returns; {@link duplicate} keeps one.\n * @param name - The function's `name`.\n * @param fn - What runs. An error it throws reaches the script with the same name and message.\n * @returns A handle to the function, which the caller frees.\n */\n public hostFunction(name: string, fn: HostFunction): ScriptHandle {\n const id = this.nextFunctionId++;\n this.functions.set(id, fn);\n return new ScriptHandle(this.check(this.native.jsh_host_function(this.live(), id, name, fn.length)));\n }\n\n /** Makes a host function and sets it on the global object under its name. */\n public defineGlobalFunction(name: string, fn: HostFunction): void {\n const global = this.global();\n const handle = this.hostFunction(name, fn);\n try {\n this.set(global, name, handle);\n } finally {\n this.free(handle);\n this.free(global);\n }\n }\n\n /** Returns a second handle to the same value, which outlives the first. */\n public duplicate(handle: ScriptHandle): ScriptHandle {\n return new ScriptHandle(this.check(this.native.jsh_dup(this.live(), handle.id)));\n }\n\n /**\n * Frees the released handles of host calls at `depth` or deeper, whose results the engine has\n * read: a host call that starts at a depth has seen the calls before it at that depth return.\n */\n private freeReleased(depth: number): void {\n for (let index = this.released.length - 1; index >= 0; index--) {\n const entry = this.released[index];\n if (entry === undefined || entry.depth < depth) continue;\n this.released.splice(index, 1);\n this.native.jsh_free(this.pointer, entry.handle.id);\n }\n }\n\n /** Runs one call into the engine, then frees what host functions released, once no host call is running. */\n private settle<Result>(run: () => Result): Result {\n try {\n return run();\n } finally {\n if (this.active === 0 && !this.destroyed) this.freeReleased(1);\n }\n }\n\n /** Releases a handle. The value lives on while the script still refers to it. */\n public free(handle: ScriptHandle): void {\n this.native.jsh_free(this.live(), handle.id);\n }\n\n /** Sets the step budget; the step past it stops the script with an uncatchable error. */\n public setBudget(budget: StepBudget): void {\n this.native.jsh_engine_set_budget(this.live(), budget.perCallback ?? 0, budget.perTick ?? 0);\n }\n\n /** Starts a tick, so the per-tick budget counts from 0 again. */\n public beginTick(): void {\n this.native.jsh_engine_begin_tick(this.live());\n }\n\n /**\n * Attaches a debugger to one context. Functions the engine enters from now on report their\n * lines; those already running do not, so attach between calls into the engine. A replay\n * never attaches one. While the listener handles a stop or a poll, the watched context is current.\n * @param listener - Handles each stop and poll, on this thread.\n * @returns The debugger, which detaches with {@link EngineDebugger.detach}.\n * @throws {Error} When a debugger is already attached.\n * @throws {RangeError} When the engine has no such context.\n */\n public attachDebugger(listener: DebuggerListener, options: DebuggerOptions = {}): EngineDebugger {\n if (this.debuggerListener !== undefined) throw new ScriptHostErrors.DebuggerAlreadyAttached();\n this.check(\n this.native.jsh_debug_attach(\n this.live(),\n options.context ?? DEFAULT_CONTEXT,\n options.pollLines ?? DEFAULT_POLL_LINES\n )\n );\n this.debuggerListener = listener;\n return new EngineDebugger({\n native: this.native,\n buffer: this.buffer,\n pointer: () => this.live(),\n check: (result) => this.check(result),\n take: (handle) => this.take(handle),\n detached: () => {\n this.debuggerListener = undefined;\n }\n });\n }\n\n /** Reads the engine's counters. */\n public stats(): EngineStats {\n const pointer = this.live();\n const read = (stat: number): number => this.native.jsh_engine_stat(pointer, stat);\n return {\n steps: read(Stat.steps),\n callbackSteps: read(Stat.callbackSteps),\n tickSteps: read(Stat.tickSteps),\n hostCalls: read(Stat.hostCalls),\n bytesToHost: read(Stat.bytesToHost),\n bytesFromHost: read(Stat.bytesFromHost),\n stackOverflows: read(Stat.stackOverflows),\n memoryLimitHits: read(Stat.memoryLimitHits),\n memoryUsed: read(Stat.memoryUsed),\n handles: read(Stat.handles)\n };\n }\n\n /**\n * Frees the engine, its handles and its callback.\n * @throws {Error} When called from inside one of the engine's host functions.\n */\n public destroy(): void {\n if (this.destroyed) return;\n if (this.active > 0) throw new ScriptHostErrors.EngineDestroyedDuringHostCall();\n this.destroyed = true;\n this.native.jsh_engine_destroy(this.pointer);\n this.bound.unregisterHostCallback(this.callback);\n this.functions.clear();\n this.released.length = 0;\n }\n\n private live(): NativePointer {\n if (this.destroyed) throw new ScriptHostErrors.EngineDestroyed();\n return this.pointer;\n }\n\n /** Turns a negative status into the error the engine described. */\n private check(result: number): number {\n if (result >= 0) return result;\n if (result === Status.Invalid) throw new ScriptHostErrors.EngineRejectedValue();\n const reader = new ValueReader(this.buffer.bytes, this.buffer.capacity);\n const params = scriptErrorParams({\n scriptName: reader.string(),\n scriptMessage: reader.string(),\n scriptStack: reader.string()\n });\n if (result === Status.Terminated) throw new ScriptHostErrors.ScriptTerminated(params);\n if (result === Status.OutOfMemory) throw new ScriptHostErrors.ScriptOutOfMemory(params);\n throw new ScriptHostErrors.ScriptThrew(params);\n }\n\n /** Reads a result handle's value, freeing the handle unless the value is an object. */\n private take(handle: number): ScriptValue {\n const length = this.check(this.native.jsh_encode(this.pointer, handle));\n const value = new ValueReader(this.buffer.bytes, length).value();\n if (!(value instanceof ScriptHandle)) this.native.jsh_free(this.pointer, handle);\n return value;\n }\n\n /** Makes a handle for a value from its bytes. */\n private make(value: ScriptValue): ScriptHandle {\n const writer = new ValueWriter(this.buffer).value(value);\n return new ScriptHandle(this.check(this.native.jsh_decode(this.pointer, writer.length)));\n }\n\n /** The engine's one callback. It never throws: `node:ffi` callbacks must not. */\n private onHost(op: number, id: number, length: number): number {\n this.active++;\n try {\n this.freeReleased(this.active);\n if (op === Op.Grow) {\n this.buffer.reserve(length);\n return 0;\n }\n if (op === Op.Call) return this.dispatch(id, length);\n if (op === Op.LoadModule) return this.load(id, length);\n if (op === Op.DebugPaused) return this.paused(id);\n if (op === Op.DebugPoll) {\n this.debuggerListener?.poll();\n return 0;\n }\n throw new ScriptHostErrors.UnknownEngineRequest({ op });\n } catch (error) {\n return this.describe(error);\n } finally {\n this.active--;\n }\n }\n\n private dispatch(id: number, length: number): number {\n // The arguments leave the buffer first: the function may run script, which reuses it.\n const args = new ValueReader(this.buffer.bytes, length).list();\n const fn = this.functions.get(id);\n if (fn === undefined) throw new ScriptHostErrors.UnknownHostFunction({ id });\n const result = fn(...args);\n return new ValueWriter(this.buffer).value(result).length;\n }\n\n private paused(code: number): number {\n const reason = PauseReason[code];\n if (reason === undefined) throw new ScriptHostErrors.UnknownPauseReason({ code });\n return this.debuggerListener?.paused(reason) === 'terminate' ? -1 : 0;\n }\n\n private load(context: ScriptContextId, length: number): number {\n const name = this.buffer.bytes.toString('utf8', 0, length);\n const module = this.loadModule?.(name, context);\n if (module === undefined) throw new ScriptHostErrors.ModuleNotFound({ name });\n return new ValueWriter(this.buffer).value(module).length;\n }\n\n /** Writes an error's name and message for the engine to throw, and returns the status for it. */\n private describe(error: unknown): number {\n try {\n const name = error instanceof Error ? error.name : 'Error';\n const message = error instanceof Error ? error.message : String(error);\n new ValueWriter(this.buffer).string(name).string(message);\n return -1;\n } catch {\n return -2;\n }\n }\n}\n"],"mappings":";;;;;;;;AAYA,IAAa,cAAc;;AAG3B,IAAM,SAAS;CAAE,QAAQ;CAAI,YAAY;CAAI,aAAa;CAAI,SAAS;AAAG;;AAG1E,IAAM,KAAK;CAAE,MAAM;CAAG,YAAY;CAAG,MAAM;CAAG,aAAa;CAAG,WAAW;AAAE;;AAG3E,IAAM,OAAO;CACT,OAAO;CACP,eAAe;CACf,WAAW;CACX,WAAW;CACX,aAAa;CACb,eAAe;CACf,gBAAgB;CA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AS,GAAG,GAAG,IAAI;EACzB,OAAO,IAAI,YAAY,KAAK,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC;CACtD;CAEA,OAAe,MAAsB;EACjC,MAAM,SAAS,YAAY;EAC3B,IAAI,WAAW,KAAA,GAAW,MAAM,IAAI,iBAAiB,mBAAmB,EAAE,KAAK,CAAC;EAChF,OAAO,KAAK,kBAAkB,OAAO,MAAM,MAAM,cAAc,KAAK;CACxE;CAEA,KAAa,SAA0B,QAAwB;EAC3D,MAAM,OAAO,KAAK,OAAO,MAAM,SAAS,QAAQ,GAAG,MAAM;EACzD,MAAM,SAAS,KAAK,aAAa,MAAM,OAAO;EAC9C,IAAI,WAAW,KAAA,GAAW,MAAM,IAAI,iBAAiB,eAAe,EAAE,KAAK,CAAC;EAC5E,OAAO,IAAI,YAAY,KAAK,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC;CACtD;;CAGA,SAAiB,OAAwB;EACrC,IAAI;GACA,MAAM,OAAO,iBAAiB,QAAQ,MAAM,OAAO;GACnD,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GACrE,IAAI,YAAY,KAAK,MAAM,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,OAAO;GACxD,OAAO;EACX,QAAQ;GACJ,OAAO;EACX;CACJ;AACJ"}
@@ -0,0 +1,29 @@
1
+ /** A global or a member that the pinned QuickJS defines and scripts on the pinned BDS cannot see. */
2
+ export interface AbsentGlobal {
3
+ /**
4
+ * A property path from the global object, such as `Set.prototype.union`. A last segment
5
+ * written `[Symbol.toStringTag]` names a well-known symbol key.
6
+ */
7
+ readonly path: string;
8
+ }
9
+ /** An {@link AbsentGlobal}'s path, split into the object that holds the property and its key. */
10
+ export interface AbsentPath {
11
+ /** The property names from the global object to the holder; empty for a global. */
12
+ readonly owner: readonly string[];
13
+ /** The property name, or the well-known symbol's name when {@link symbol} is true. */
14
+ readonly key: string;
15
+ /** Whether {@link key} names a well-known symbol, such as `toStringTag` for `Symbol.toStringTag`. */
16
+ readonly symbol: boolean;
17
+ }
18
+ /**
19
+ * The globals and members the C layer removes from every context.
20
+ * @returns The list, in the order the C layer reads it.
21
+ */
22
+ export declare const absentGlobals: () => readonly AbsentGlobal[];
23
+ /**
24
+ * Splits a path into the property names that lead to its holder and its key.
25
+ * @param path - A path in {@link AbsentGlobal.path}'s form.
26
+ * @returns The holder's names from the global object, and the key.
27
+ */
28
+ export declare const splitAbsentPath: (path: string) => AbsentPath;
29
+ //# sourceMappingURL=absentGlobals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"absentGlobals.d.ts","sources":["../src/absentGlobals.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB;AAED,iGAAiG;AACjG,MAAM,WAAW,UAAU;IACvB,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,sFAAsF;IACtF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,qGAAqG;IACrG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC5B;AAoED;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,SAAS,YAAY,EAAoB,CAAC;AAI3E;;;;GAIG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,UAO9C,CAAC"}
@@ -0,0 +1,94 @@
1
+ // src/absentGlobals.ts
2
+ /**
3
+ * What QuickJS 2026-06-04 defines and a script on the pinned Bedrock Dedicated Server cannot see.
4
+ * It is the difference between the two that the `scripting.engine` parity row's `globals`
5
+ * scenario records, `packages/parity/goldens/scripting/globals.json`, so a path QuickJS never
6
+ * defines does not belong here. The C layer deletes each path when it creates a context, members
7
+ * before globals. The native build writes this list into a C header, so this is its only copy.
8
+ */
9
+ var ABSENT_GLOBALS = [
10
+ { path: "eval" },
11
+ { path: "performance" },
12
+ { path: "Atomics" },
13
+ { path: "Float16Array" },
14
+ { path: "DataView.prototype.getFloat16" },
15
+ { path: "DataView.prototype.setFloat16" },
16
+ { path: "Math.f16round" },
17
+ { path: "Math.sumPrecise" },
18
+ { path: "Iterator" },
19
+ { path: "Iterator.from" },
20
+ { path: "Iterator.prototype.constructor" },
21
+ { path: "Iterator.prototype[Symbol.toStringTag]" },
22
+ { path: "Iterator.prototype.drop" },
23
+ { path: "Iterator.prototype.every" },
24
+ { path: "Iterator.prototype.filter" },
25
+ { path: "Iterator.prototype.find" },
26
+ { path: "Iterator.prototype.flatMap" },
27
+ { path: "Iterator.prototype.forEach" },
28
+ { path: "Iterator.prototype.map" },
29
+ { path: "Iterator.prototype.reduce" },
30
+ { path: "Iterator.prototype.some" },
31
+ { path: "Iterator.prototype.take" },
32
+ { path: "Iterator.prototype.toArray" },
33
+ { path: "ArrayBuffer.prototype.detached" },
34
+ { path: "ArrayBuffer.prototype.maxByteLength" },
35
+ { path: "ArrayBuffer.prototype.resizable" },
36
+ { path: "ArrayBuffer.prototype.resize" },
37
+ { path: "ArrayBuffer.prototype.transfer" },
38
+ { path: "ArrayBuffer.prototype.transferToFixedLength" },
39
+ { path: "SharedArrayBuffer.prototype.grow" },
40
+ { path: "SharedArrayBuffer.prototype.growable" },
41
+ { path: "SharedArrayBuffer.prototype.maxByteLength" },
42
+ { path: "Uint8Array.fromBase64" },
43
+ { path: "Uint8Array.fromHex" },
44
+ { path: "Uint8Array.prototype.setFromBase64" },
45
+ { path: "Uint8Array.prototype.setFromHex" },
46
+ { path: "Uint8Array.prototype.toBase64" },
47
+ { path: "Uint8Array.prototype.toHex" },
48
+ { path: "Map.prototype.getOrInsert" },
49
+ { path: "Map.prototype.getOrInsertComputed" },
50
+ { path: "WeakMap.prototype.getOrInsert" },
51
+ { path: "WeakMap.prototype.getOrInsertComputed" },
52
+ { path: "Set.prototype.union" },
53
+ { path: "Set.prototype.intersection" },
54
+ { path: "Set.prototype.difference" },
55
+ { path: "Set.prototype.symmetricDifference" },
56
+ { path: "Set.prototype.isSubsetOf" },
57
+ { path: "Set.prototype.isSupersetOf" },
58
+ { path: "Set.prototype.isDisjointFrom" },
59
+ { path: "JSON.isRawJSON" },
60
+ { path: "JSON.rawJSON" },
61
+ { path: "Error.isError" },
62
+ { path: "Promise.try" },
63
+ { path: "RegExp.escape" },
64
+ { path: "RegExp.prototype.unicodeSets" },
65
+ { path: "Function.prototype.columnNumber" }
66
+ ];
67
+ /**
68
+ * The globals and members the C layer removes from every context.
69
+ * @returns The list, in the order the C layer reads it.
70
+ */
71
+ var absentGlobals = () => ABSENT_GLOBALS;
72
+ var SYMBOL_KEY = /^(?<owner>.+)\[Symbol\.(?<key>\w+)\]$/;
73
+ /**
74
+ * Splits a path into the property names that lead to its holder and its key.
75
+ * @param path - A path in {@link AbsentGlobal.path}'s form.
76
+ * @returns The holder's names from the global object, and the key.
77
+ */
78
+ var splitAbsentPath = (path) => {
79
+ const symbolKey = SYMBOL_KEY.exec(path)?.groups;
80
+ if (symbolKey?.owner !== void 0 && symbolKey.key !== void 0) return {
81
+ owner: symbolKey.owner.split("."),
82
+ key: symbolKey.key,
83
+ symbol: true
84
+ };
85
+ const names = path.split(".");
86
+ return {
87
+ owner: names.slice(0, -1),
88
+ key: names.at(-1) ?? path,
89
+ symbol: false
90
+ };
91
+ };
92
+ export { absentGlobals, splitAbsentPath };
93
+
94
+ //# sourceMappingURL=absentGlobals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"absentGlobals.js","names":[],"sources":["../src/absentGlobals.ts"],"sourcesContent":["/** A global or a member that the pinned QuickJS defines and scripts on the pinned BDS cannot see. */\nexport interface AbsentGlobal {\n /**\n * A property path from the global object, such as `Set.prototype.union`. A last segment\n * written `[Symbol.toStringTag]` names a well-known symbol key.\n */\n readonly path: string;\n}\n\n/** An {@link AbsentGlobal}'s path, split into the object that holds the property and its key. */\nexport interface AbsentPath {\n /** The property names from the global object to the holder; empty for a global. */\n readonly owner: readonly string[];\n /** The property name, or the well-known symbol's name when {@link symbol} is true. */\n readonly key: string;\n /** Whether {@link key} names a well-known symbol, such as `toStringTag` for `Symbol.toStringTag`. */\n readonly symbol: boolean;\n}\n\n/**\n * What QuickJS 2026-06-04 defines and a script on the pinned Bedrock Dedicated Server cannot see.\n * It is the difference between the two that the `scripting.engine` parity row's `globals`\n * scenario records, `packages/parity/goldens/scripting/globals.json`, so a path QuickJS never\n * defines does not belong here. The C layer deletes each path when it creates a context, members\n * before globals. The native build writes this list into a C header, so this is its only copy.\n */\nconst ABSENT_GLOBALS = [\n { path: 'eval' },\n { path: 'performance' },\n { path: 'Atomics' },\n { path: 'Float16Array' },\n { path: 'DataView.prototype.getFloat16' },\n { path: 'DataView.prototype.setFloat16' },\n { path: 'Math.f16round' },\n { path: 'Math.sumPrecise' },\n { path: 'Iterator' },\n { path: 'Iterator.from' },\n { path: 'Iterator.prototype.constructor' },\n { path: 'Iterator.prototype[Symbol.toStringTag]' },\n { path: 'Iterator.prototype.drop' },\n { path: 'Iterator.prototype.every' },\n { path: 'Iterator.prototype.filter' },\n { path: 'Iterator.prototype.find' },\n { path: 'Iterator.prototype.flatMap' },\n { path: 'Iterator.prototype.forEach' },\n { path: 'Iterator.prototype.map' },\n { path: 'Iterator.prototype.reduce' },\n { path: 'Iterator.prototype.some' },\n { path: 'Iterator.prototype.take' },\n { path: 'Iterator.prototype.toArray' },\n { path: 'ArrayBuffer.prototype.detached' },\n { path: 'ArrayBuffer.prototype.maxByteLength' },\n { path: 'ArrayBuffer.prototype.resizable' },\n { path: 'ArrayBuffer.prototype.resize' },\n { path: 'ArrayBuffer.prototype.transfer' },\n { path: 'ArrayBuffer.prototype.transferToFixedLength' },\n { path: 'SharedArrayBuffer.prototype.grow' },\n { path: 'SharedArrayBuffer.prototype.growable' },\n { path: 'SharedArrayBuffer.prototype.maxByteLength' },\n { path: 'Uint8Array.fromBase64' },\n { path: 'Uint8Array.fromHex' },\n { path: 'Uint8Array.prototype.setFromBase64' },\n { path: 'Uint8Array.prototype.setFromHex' },\n { path: 'Uint8Array.prototype.toBase64' },\n { path: 'Uint8Array.prototype.toHex' },\n { path: 'Map.prototype.getOrInsert' },\n { path: 'Map.prototype.getOrInsertComputed' },\n { path: 'WeakMap.prototype.getOrInsert' },\n { path: 'WeakMap.prototype.getOrInsertComputed' },\n { path: 'Set.prototype.union' },\n { path: 'Set.prototype.intersection' },\n { path: 'Set.prototype.difference' },\n { path: 'Set.prototype.symmetricDifference' },\n { path: 'Set.prototype.isSubsetOf' },\n { path: 'Set.prototype.isSupersetOf' },\n { path: 'Set.prototype.isDisjointFrom' },\n { path: 'JSON.isRawJSON' },\n { path: 'JSON.rawJSON' },\n { path: 'Error.isError' },\n { path: 'Promise.try' },\n { path: 'RegExp.escape' },\n { path: 'RegExp.prototype.unicodeSets' },\n { path: 'Function.prototype.columnNumber' }\n] as const satisfies readonly AbsentGlobal[];\n\n/**\n * The globals and members the C layer removes from every context.\n * @returns The list, in the order the C layer reads it.\n */\nexport const absentGlobals = (): readonly AbsentGlobal[] => ABSENT_GLOBALS;\n\nconst SYMBOL_KEY = /^(?<owner>.+)\\[Symbol\\.(?<key>\\w+)\\]$/;\n\n/**\n * Splits a path into the property names that lead to its holder and its key.\n * @param path - A path in {@link AbsentGlobal.path}'s form.\n * @returns The holder's names from the global object, and the key.\n */\nexport const splitAbsentPath = (path: string): AbsentPath => {\n const symbolKey = SYMBOL_KEY.exec(path)?.groups;\n if (symbolKey?.owner !== undefined && symbolKey.key !== undefined) {\n return { owner: symbolKey.owner.split('.'), key: symbolKey.key, symbol: true };\n }\n const names = path.split('.');\n return { owner: names.slice(0, -1), key: names.at(-1) ?? path, symbol: false };\n};\n"],"mappings":";;;;;;;;AA0BA,IAAM,iBAAiB;CACnB,EAAE,MAAM,OAAO;CACf,EAAE,MAAM,cAAc;CACtB,EAAE,MAAM,UAAU;CAClB,EAAE,MAAM,eAAe;CACvB,EAAE,MAAM,gCAAgC;CACxC,EAAE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,gBAAgB;CACxB,EAAE,MAAM,cAAc;CACtB,EAAE,MAAM,gBAAgB;CACxB,EAAE,MAAM,+BAA+B;CACvC,EAAE,MAAM,kCAAkC;AAC9C;;;;;AAMA,IAAa,sBAA+C;AAE5D,IAAM,aAAa;;;;;;AAOnB,IAAa,mBAAmB,SAA6B;CACzD,MAAM,YAAY,WAAW,KAAK,IAAI,CAAC,EAAE;CACzC,IAAI,WAAW,UAAU,KAAA,KAAa,UAAU,QAAQ,KAAA,GACpD,OAAO;EAAE,OAAO,UAAU,MAAM,MAAM,GAAG;EAAG,KAAK,UAAU;EAAK,QAAQ;CAAK;CAEjF,MAAM,QAAQ,KAAK,MAAM,GAAG;CAC5B,OAAO;EAAE,OAAO,MAAM,MAAM,GAAG,EAAE;EAAG,KAAK,MAAM,GAAG,EAAE,KAAK;EAAM,QAAQ;CAAM;AACjF"}
@@ -0,0 +1,189 @@
1
+ /**
2
+ * One debugger connection, from the handshake to the detach, run on the engine's thread. It
3
+ * answers the VS Code extension's requests from an {@link EngineDebugger}, and blocks the thread
4
+ * while a script is stopped. The bytes travel elsewhere: a {@link DebuggerChannel} hands this
5
+ * session whole messages.
6
+ */
7
+ import type { ScriptContextId, ScriptEngine } from '../ScriptEngine.js';
8
+ import type { DebuggerPlugin, DebuggerStat, DiagnosticsTab, HostMessage } from './protocol.js';
9
+ /**
10
+ * Carries whole messages between a session and the extension. A session calls it only on the
11
+ * engine's thread.
12
+ */
13
+ export interface DebuggerChannel {
14
+ /** Sends one message to the extension. */
15
+ send(message: HostMessage): void;
16
+ /** Returns the next message, waiting as long as it takes; undefined once the connection has closed. */
17
+ receive(): unknown;
18
+ /** Returns the next message if one has arrived, without waiting; undefined otherwise. */
19
+ poll(): unknown;
20
+ /**
21
+ * Whether the connection has closed. `receive` and `poll` still return the messages that
22
+ * arrived before it closed.
23
+ */
24
+ readonly closed: boolean;
25
+ }
26
+ /** How a {@link ScriptDebugSession} presents the world's scripts to the extension. */
27
+ export interface DebugSessionOptions {
28
+ /** The script packs the extension may pick, by the UUID of each pack's script module. */
29
+ readonly plugins: readonly DebuggerPlugin[];
30
+ /** The `script-debugger-passcode` the extension must send. None when absent or empty. */
31
+ readonly passcode?: string;
32
+ /** The thread id the extension shows for the scripts. */
33
+ readonly threadId?: number;
34
+ /** Turns an engine file name into the path the extension knows it by. The same name when absent. */
35
+ readonly toDebuggerPath?: (file: string) => string;
36
+ /** Turns a path from the extension into the engine's file name. The same path when absent. */
37
+ readonly fromDebuggerPath?: (path: string) => string;
38
+ /** Whether the engine knows a file, so a breakpoint in it is verified. Every file when absent. */
39
+ readonly knowsFile?: (file: string) => boolean;
40
+ /**
41
+ * Runs a command the extension's command box sent, in the named dimension. It is called while
42
+ * the session handles a message, which can be inside a stopped or running script, so a host
43
+ * whose commands reach the scripts queues it for later.
44
+ */
45
+ readonly runCommand?: (command: string, dimension: string) => void;
46
+ /**
47
+ * The lines a running script runs between polls, {@link DebuggerOptions.pollLines}. The
48
+ * profiler samples the stack at each poll.
49
+ */
50
+ readonly pollLines?: number;
51
+ /** The tabs the `SchemaEvent` after the handshake describes; BDS's {@link DIAGNOSTICS_TABS} when absent. */
52
+ readonly diagnosticsTabs?: readonly DiagnosticsTab[];
53
+ /** The time in microseconds, which labels the profiler's samples; the system clock when absent. */
54
+ readonly profilerClock?: () => number;
55
+ }
56
+ /** The thread id a session reports when none is given. */
57
+ export declare const DEFAULT_THREAD_ID = 1;
58
+ /**
59
+ * One debugger connection over a {@link DebuggerChannel}. The world host runs {@link handshake},
60
+ * then {@link attach} with the engine and context of the pack the extension picked, then calls {@link poll}
61
+ * between ticks until the connection closes or {@link detach} ends it. Every method blocks the
62
+ * calling thread for as long as the extension keeps a script stopped, which is how a stopped
63
+ * script stops its world's tick.
64
+ */
65
+ export declare class ScriptDebugSession {
66
+ private readonly channel;
67
+ private readonly options;
68
+ private readonly threadId;
69
+ private engine;
70
+ private debug;
71
+ private closedValue;
72
+ private offered;
73
+ /** Set once the handshake has passed; only such a session ends with `terminated`. */
74
+ private accepted;
75
+ /** The reason the script is stopped for, while it is. */
76
+ private stopped;
77
+ /** Set while a script runs and polls, when no request may run script. */
78
+ private running;
79
+ private resumeMode;
80
+ private terminateRequested;
81
+ private references;
82
+ private nextReference;
83
+ /** Set once the extension's configuration has ended with `resume`; a later attach does not wait for it. */
84
+ private configured;
85
+ /** The breakpoints the extension set, by engine file, which an attach to a new engine sets again. */
86
+ private readonly breakpoints;
87
+ private stopOnException;
88
+ /** The profile `startProfiler` began, until `stopProfiler`. */
89
+ private profiler;
90
+ constructor(channel: DebuggerChannel, options: DebugSessionOptions);
91
+ /** Whether the connection has closed or the session has detached. */
92
+ get closed(): boolean;
93
+ /**
94
+ * Sends the protocol event, with the plugins and whether a passcode is needed, without waiting
95
+ * for the answer. A host that must not block until the extension answers offers first and
96
+ * calls {@link handshake} once a message has arrived. Only the first call sends anything.
97
+ */
98
+ offer(): void;
99
+ /**
100
+ * Offers the protocol and the plugins, unless {@link offer} already did, and checks the
101
+ * extension's answer as Bedrock Dedicated Server does: the same version, the passcode when one
102
+ * is set, and a target among the plugins.
103
+ * @returns The script module UUID the extension picked, lowercase, or undefined when it picked none.
104
+ * @throws {DebuggerConnectionError} With Bedrock Dedicated Server's message when the answer is refused or never comes.
105
+ */
106
+ handshake(): string | undefined;
107
+ /**
108
+ * Attaches to the picked pack's context, and handles the extension's configuration, its
109
+ * breakpoints and exception setting, until it sends `resume`. The engine runs no script until
110
+ * then. Only that context's scripts stop: another pack's file of the same name never does.
111
+ *
112
+ * After {@link detachEngine}, an attach to the new engine sets the breakpoints and the
113
+ * exception setting the extension sent before, and returns at once: the extension configures
114
+ * a session only once.
115
+ * @param engine - The engine the pack runs in.
116
+ * @param context - The pack's context in the engine.
117
+ */
118
+ attach(engine: ScriptEngine, context?: ScriptContextId): void;
119
+ /**
120
+ * Detaches from the engine and tells the extension the scripts' thread has exited, while the
121
+ * session stays open, as BDS does around `/reload`. {@link attach} with the new engine starts
122
+ * the thread again.
123
+ */
124
+ detachEngine(): void;
125
+ /** Whether the session is attached to an engine. */
126
+ get attached(): boolean;
127
+ /**
128
+ * Sends one tick's statistics, as BDS streams a `StatEvent2` each tick to an attached
129
+ * extension. Nothing is sent while no engine is attached.
130
+ */
131
+ stats(tick: number, stats: readonly DebuggerStat[]): void;
132
+ /**
133
+ * Handles what the extension has sent while no script ran, without waiting. A pause request
134
+ * stops the next script the engine runs at its first line. Once the connection has closed and
135
+ * its last messages are handled, the session closes and detaches.
136
+ */
137
+ poll(): void;
138
+ /** Shows script output in the extension's debug console. */
139
+ print(message: string, logLevel?: number): void;
140
+ /**
141
+ * Ends the session and detaches from the engine. A session whose handshake passed tells the
142
+ * extension it has terminated, as BDS does just before it closes the connection; after a
143
+ * refused handshake BDS sends its error line and closes.
144
+ */
145
+ detach(): void;
146
+ /** Ends the session after the connection closed or the session detached. */
147
+ private close;
148
+ /** Parses a received message; marks the session closed when there is none because the connection closed. */
149
+ private next;
150
+ /** The engine's stop: tells the extension, then answers it until it resumes or goes away. */
151
+ private paused;
152
+ /** The engine's poll while a script runs: handles what has arrived without running script. */
153
+ private pollRunning;
154
+ private handle;
155
+ private request;
156
+ private setBreakpoints;
157
+ private requireStopped;
158
+ /** The `stackTrace` body: koush's frame objects, innermost first, with their index as id. */
159
+ private stackTrace;
160
+ /** The `scopes` body, which the extension reads as `{ name, reference, expensive }` objects. */
161
+ private scopes;
162
+ /**
163
+ * The `variables` body: one page of an object's or a scope's properties. A scope is a copy of
164
+ * the frame's variables, so each request reads a new one, which an evaluation may have changed.
165
+ */
166
+ private variables;
167
+ /**
168
+ * One page of a value's properties, as the `variables` arguments ask for it. The `indexed` and
169
+ * `named` filters each page within their own group: the array indices, or every other name.
170
+ * Without a filter, `start` and `count` page through every name.
171
+ */
172
+ private page;
173
+ /**
174
+ * How many of a value's own property names are array indices. QuickJS lists those first, in
175
+ * ascending order, so they are a prefix of the names, and a binary search finds where it ends
176
+ * by reading one name at a time.
177
+ */
178
+ private indexCount;
179
+ /** The `evaluate` body. A failed evaluation is a result too: the extension never answers an error here. */
180
+ private evaluate;
181
+ /** Formats a value as VS Code shows it, giving an object a reference to expand it by. */
182
+ private variable;
183
+ private reference;
184
+ /** Frees every handle the stop handed out; references last only until the script goes on. */
185
+ private releaseReferences;
186
+ private respond;
187
+ private event;
188
+ }
189
+ //# sourceMappingURL=DebugSession.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugSession.d.ts","sources":["../../src/debugger/DebugSession.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAYrE,OAAO,KAAK,EAER,cAAc,EACd,YAAY,EACZ,cAAc,EAGd,WAAW,EACd,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,0CAA0C;IAC1C,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,uGAAuG;IACvG,OAAO,IAAI,OAAO,CAAC;IACnB,yFAAyF;IACzF,IAAI,IAAI,OAAO,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC5B;AAED,sFAAsF;AACtF,MAAM,WAAW,mBAAmB;IAChC,yFAAyF;IACzF,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAC5C,yFAAyF;IACzF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,oGAAoG;IACpG,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,8FAA8F;IAC9F,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACrD,kGAAkG;IAClG,QAAQ,CAAC,SAAS,C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