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

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
package/CHANGELOG.md ADDED
@@ -0,0 +1,99 @@
1
+ # @jsprismarine/script-host
2
+
3
+ ## 0.23.0-unstable-20261120205454
4
+
5
+ ### Minor Changes
6
+
7
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`f656667`](https://github.com/JSPrismarine/JSPrismarine/commit/f656667b4343bfb2a1f4db9b5ffea4a04924dcdf) Thanks [@filiphsps](https://github.com/filiphsps)! - Behavior pack scripts can now declare the beta Script API versions the pinned Bedrock Dedicated Server ships, such as `@minecraft/server` 2.12.0-beta, `@minecraft/server-ui` 2.4.0-beta and the 1.0.0-beta of `server-gametest`, `server-admin`, `server-net` and `debug-utilities`. A pack that declares one needs the Beta APIs experiment, which a `worlds.<name>` entry turns on with `"experiments": ["gametest"]`. The level writes the experiment into `level.dat` and sends it to joining clients, and a world whose `level.dat` already has it on, such as one from BDS, keeps it. Without the experiment the pack does not load, and the content log gives BDS's message.
8
+
9
+ Version resolution follows BDS: a pack gets a beta only when it is the one beta the server ships, and the version `beta` names that one. Any other version, beta or stable, such as `2.13.0-beta` or `2.12.0`, is refused with BDS's "requested invalid version" message, where the script host logged the unknown-module message before.
10
+
11
+ `world.beforeEvents.chatSend` now runs as a guard on a player's chat, before the `chat` event, and a script can cancel the line. `system.beforeEvents.watchdogTerminate` runs before the watchdog shuts the server down for a hang or a stack overflow, and a cancel keeps the server running.
12
+
13
+ Breaking for code that embeds the script host: `resolveDependency` takes the pack as `{ name, version }`, `ScriptWorld` needs `guardChat`, and `LevelScripts`' `sources` need `chat`, which takes the server's `ChatManager`.
14
+
15
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`38bc19f`](https://github.com/JSPrismarine/JSPrismarine/commit/38bc19f577e873fb7121694b90d50412e3d11bcf) Thanks [@filiphsps](https://github.com/filiphsps)! - Implement the next `@minecraft/server` members the add-on corpus uses most. `World.getEntity` finds an entity by its id, `Dimension.getPlayers` lists a dimension's players, `Entity` reads its rotation, head location, view direction and sneaking and takes `applyDamage`, `Player` reads its game mode and reads and sets `selectedSlotIndex`, and `Container.addItem` fills a container onto matching stacks first and hands back what does not fit. `world.afterEvents.entitySpawn`, `entityHurt` and `entityDie` reach scripts with the cause, the damage and an `EntityDamageSource`. Errors follow the pinned Bedrock Dedicated Server, as the `entity-members`, `entity-events` and `players` parity scenarios recorded.
16
+
17
+ `ScriptEntityState` gains optional rotation, head location, sneaking, game mode and hotbar slot fields, `ScriptWorld` gains optional `setSelectedSlot` and `applyDamage`, and `ScriptWorldEvent` has the entity events.
18
+
19
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`cf88d2f`](https://github.com/JSPrismarine/JSPrismarine/commit/cf88d2f8c2184bd4e116db888d4528fa27f5338d) Thanks [@filiphsps](https://github.com/filiphsps)! - Implement the third batch of `@minecraft/server` members the add-on corpus uses most. `system.runJob` advances a generator from the next tick, a step for every job and then each job to its end within a step budget, and `clearJob` stops one. `Player.onScreenDisplay` shows titles, subtitles and the action bar, `Player.playSound` and `Dimension.playSound` play sounds and return a `SoundInstance`, `Dimension.spawnParticle` takes a `MolangVariableMap`, and `Entity.addEffect`, `getEffect`, `getEffects` and `removeEffect` manage status effects, with each `Effect`'s display name. `Entity.isSneaking` can be set. A block's `minecraft:inventory` component holds a container a script reads and writes as an entity's, and an item stack's `minecraft:durability` component reads and writes its damage. `world.beforeEvents.itemUse` and `playerBreakBlock` can cancel a player's use and break, and their after-events report what went on. An entity event subscriber's `EntityEventOptions` pick the entities and types it hears. Values and errors follow the pinned Bedrock Dedicated Server, as the `system-jobs`, `entity-event-options`, `entity-effects`, `block-inventory` and `player-feedback` parity scenarios recorded.
20
+
21
+ `ScriptWorld` gains optional `setSneaking`, `showTitle`, `playSound`, `spawnParticle`, effect, block container and guard members, `ScriptItem` an optional `damage`, `ScriptItemType` an optional `maxDurability`, `ScriptWorldEvent` the `playerBreakBlock` and `itemUse` events, and `ScriptCall` `setStateOf`.
22
+
23
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`2be554b`](https://github.com/JSPrismarine/JSPrismarine/commit/2be554bdd2a862075c586442ec3f66ae813f092d) Thanks [@filiphsps](https://github.com/filiphsps)! - Implement the fourth batch of `@minecraft/server` members the add-on corpus uses most. `world.structureManager` copies a volume of the world into a structure, reads and writes its blocks, places it by id or object, turned or flipped, saves it under another id, lists and deletes structures. A player's `minecraft:equippable` component reads and writes what they wear and hold, an entity's `minecraft:health`, `minecraft:movement` and other attribute components read and write the attribute, and `Container.getSlot` and `EntityEquippableComponent.getEquipmentSlot` return a `ContainerSlot` that reads and writes the stack in place. `Entity.hasComponent` answers for every component the host has. `DimensionTypes` and `EffectTypes` list the types the world has, `Effect.isValid` turns false once the effect is gone, and `Player.spawnParticle` shows a particle to one player. `world.beforeEvents.playerInteractWithBlock` and `playerInteractWithEntity` can cancel a player's click, and their after-events report the clicks that went on. The GameTest `Test.spawn` spawns an entity in a test's structure. Values and errors follow the pinned Bedrock Dedicated Server, as the `structures` and `entity-components` parity scenarios recorded.
24
+
25
+ `ScriptWorld` gains optional `structures`, `equipment`, `setEquipment`, `attribute`, `setAttribute`, `effectTypes`, `guardBlockInteract` and `guardEntityInteract` members, `spawnParticle` an optional player, and `ScriptWorldEvent` the `playerInteractWithBlock` and `playerInteractWithEntity` events.
26
+
27
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`8f4e856`](https://github.com/JSPrismarine/JSPrismarine/commit/8f4e856447fdd41ba5bca9e623725db7709ffc4f) Thanks [@filiphsps](https://github.com/filiphsps)! - Implement the `@minecraft/server` members the add-on corpus uses most, in the stable and beta shapes. `world.getAllPlayers` and `getPlayers` with the basic `EntityQueryOptions`, `Dimension.getEntities`, `spawnEntity`, `getBlock` and `runCommand`, `Entity` and `Player` with their id, type, location, dimension, name tag, name, tags, `teleport`, `kill`, `remove`, `runCommand`, `sendMessage` and the inventory's `Container`, `Block` with `setType` and `setPermutation`, `BlockPermutation.resolve`, `getAllStates` and `getState`, and `ItemStack` with its amount, name tag and lore. The player join, spawn and leave events, `world.beforeEvents.playerLeave` and `system.afterEvents.scriptEventReceive` reach scripts. Errors and edge cases follow what the pinned Bedrock Dedicated Server does, as the `scripting.world`, `entities`, `blocks` and `items` parity scenarios recorded.
28
+
29
+ A script's entity or block is a handle that carries an id or a position, and reads the world each time a member runs; a pack gets one object per entity. `entity.location` costs one host call, since a member that returns plain data passes it as JSON. A value set on a property outside its bounds throws BDS's `PropertyOutOfBoundsError`, and `engine.release` frees a handle a host function returns, which `world.getAllPlayers` used to leave behind.
30
+
31
+ Breaking for code that embeds the script host: `ScriptWorld` needs the entity, block, item, command and player-leave members, and `ScriptWorldEvent` has the player and script events.
32
+
33
+ ### Patch Changes
34
+
35
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`df9a0bb`](https://github.com/JSPrismarine/JSPrismarine/commit/df9a0bb24c979d47fc0a73953b890e48491bab83) Thanks [@filiphsps](https://github.com/filiphsps)! - Behavior packs listed in `content-world-packs` now run their `@minecraft/server` scripts, when the script host is installed and built for the machine (Linux x64 for now). Each pack runs in a QuickJS context of its own in the default level's runtime, with the version 1 and version 2 lifecycles, `system.run`, `runTimeout` and `runInterval`, the `weatherChange` events, `world.sendMessage`, `world.getDimension` and `Dimension.setWeather`, in the order Bedrock Dedicated Server runs them. `config/` beside the server holds BDS's `permissions.json`, `variables.json` and `secrets.json`. The new optional `script-watchdog-enable-shutdown`, `script-watchdog-hang-threshold` and `script-watchdog-memory-limit` settings take BDS's names and defaults; the hang threshold is converted to a count of steps, so a script stops at the same point on every machine.
36
+
37
+ `/reload` now reloads the behavior pack scripts, as on BDS, and the server keeps running. It no longer disables and re-enables the whole server; restart the server to reload everything else.
38
+
39
+ Weather changes now go through a guard stage, which a script's `world.beforeEvents.weatherChange` can cancel or change, and `WorldWeather.onChange` hears every change.
40
+
41
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`fe5bae7`](https://github.com/JSPrismarine/JSPrismarine/commit/fe5bae7595e2b6983823bf9bc9e9c7d977e6bedd) Thanks [@filiphsps](https://github.com/filiphsps)! - A behavior pack script can now read which server it runs on from `@jsprismarine/server`: its `jsprismarine` export holds the server's `name`, `version`, `minecraftVersion` and `protocolVersion`. A pack leaves the module out of its manifest and loads it with `import()` inside `try`, so on Bedrock Dedicated Server the import rejects and the pack falls back. The new `@jsprismarine/script-types` package holds the TypeScript declarations for the module.
42
+
43
+ An `async` callback passed straight to `system.run` or an event's `subscribe` now runs past its first `await`.
44
+
45
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`afb6ef5`](https://github.com/JSPrismarine/JSPrismarine/commit/afb6ef5bbfc805a7ef2831117094c168d2a585c5) Thanks [@filiphsps](https://github.com/filiphsps)! - Implement `@minecraft/server`'s block volumes, `BlockBoundingBoxUtils`, `BlockVolume`, `ListBlockVolume` and their `BlockLocationIterator`, with the corner rounding, walk order and closest-block order the pinned Bedrock Dedicated Server gives.
46
+
47
+ Implement the block, item and container members the pinned server answers from its registries: `BlockTypes`, `BlockStates`, `ItemTypes`, `EnchantmentTypes` and `Potions`; a block's neighbors, tags, localization key, item, liquid answers, light, `isSolid`, `getMapColor`, `getParts`, `trySetPermutation` and components; `BlockPermutation.withState` and `matches`; an item stack's type facts, weight, block lists, lock, `clone` and `isStackableWith`; the enchantable, food, cooldown, compostable, dyeable, potion, book and block dynamic property item components; the movable, map color, precipitation and vibration block components; and `Container`'s `find`, `contains`, `moveItem`, `swapItems`, `transferItem`, `clearAll` and `weight`, with `ContainerSlot`'s stack members. The `block-volumes`, `block-members`, `item-members` and `containers` parity scenarios recorded each on BDS.
48
+
49
+ `ScriptWorld` gains an optional `catalog` of the game's types, and optional `blockLight`, `waterlogged`, `setWaterlogged` and `redstonePower`. `ScriptItem` gains optional block lists, lock, keep-on-death, enchantments, data value, book, dye color, unbreakable flag and block properties.
50
+
51
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`e1c982e`](https://github.com/JSPrismarine/JSPrismarine/commit/e1c982eeed0dfd682b5680c45c69159e21fd9ec0) Thanks [@filiphsps](https://github.com/filiphsps)! - Behavior packs that declare `@minecraft/debug-utilities` can draw debug shapes. `DebugArrow`, `DebugBox`, `DebugCircle`, `DebugCone`, `DebugCylinder`, `DebugEllipsoid`, `DebugLine`, `DebugPyramid`, `DebugSphere` and `DebugText` keep what a script sets with Bedrock Dedicated Server's defaults, and `debugDrawer.addShape`, `removeShape` and `removeAll` and a shape's `remove` send them to the level's players as `PrimitiveShapesPacket`s, again only when a script changes one, and all of them to a player who joins. A drawn shape's `timeLeft` loses 0.05 seconds each tick, where BDS takes off each frame's time, so a replay counts it the same. `disableWatchdogTimingWarnings` does nothing, since the watchdog never warns about time.
52
+
53
+ A setter's conversion error now names the `Function return value` and an object the host did not make has `no native handle`, a float property's bounds error gives the float range, and a variant's types are listed primitives first, then classes and interfaces, then arrays, all as BDS words them. `ScriptWorld` gains an optional `drawDebugShapes`, and `ScriptApiContext` a `setState`. The error catalog's `InterfacePropertyMissing` takes the `target` it names, and gains `InterfacePropertyNotFinite`.
54
+
55
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`d483677`](https://github.com/JSPrismarine/JSPrismarine/commit/d48367736a4735a0fdeeae2241c892f0a47a7fcb) Thanks [@filiphsps](https://github.com/filiphsps)! - `ScriptDebugSession` now speaks the rest of the VS Code debugger protocol as Bedrock Dedicated Server does on the wire. A passed handshake sends a `SchemaEvent` with BDS's diagnostics tabs, `stats` sends a tick's `StatEvent2`, and `detach` sends `terminated` instead of `ThreadEvent` `exited`. `detachEngine` keeps the session open across a reload: the next `attach` sends `ThreadEvent` `new` and sets the breakpoints again without waiting for the extension. `startProfiler` and `stopProfiler` record the debugged pack's stack at each debugger poll and send it back as a `.cpuprofile` in a `ProfilerCapture`.
56
+
57
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`3667c4a`](https://github.com/JSPrismarine/JSPrismarine/commit/3667c4a640e23fe12d79822f2335cfc977999879) Thanks [@filiphsps](https://github.com/filiphsps)! - Behavior packs that declare `@minecraft/server-gametest` can now register GameTests and spawn simulated players. `/gametest run <testName>`, `/gametest runset [tag]`, `/gametest stopall` and `/gametest clearall` run them as Bedrock Dedicated Server does: tests that name a batch first, a test's delays, `idle` and `succeedWhen` on the ticks counted from its start, and a test that does not end within `maxTicks` fails. A simulated player is a player of the level with no client, so commands, chat, other players and scripts see it as any other player, and it saves no player record. Its `chat` goes through the chat guards, and `world.afterEvents.chatSend` now fires for a player's line that goes out. A GameTest's `.mcstructure` is placed at the test's location.
58
+
59
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`e3f1c86`](https://github.com/JSPrismarine/JSPrismarine/commit/e3f1c8637bd1c850aca0a3d56e22f02ea682f0d9) Thanks [@filiphsps](https://github.com/filiphsps)! - Add the Script API's shape, generated from the `metadata/script_modules` files of the pinned `bedrock-samples`: every stable version of `@minecraft/server`, `@minecraft/server-ui`, `@minecraft/server-graphics` and `@minecraft/common`, with their classes, members, argument checks, enums, constants, error classes and privileges. `resolveDependency` serves a pack the newest stable minor version of the major version it declares, as Bedrock Dedicated Server does, or returns the server's message for a module it refuses. `ScriptApiContext` installs a served version into an engine, where every member checks its arguments and then runs the implementation registered with `ScriptApiImplementations.implement`, or throws `NotImplementedError`.
60
+
61
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`e8b329d`](https://github.com/JSPrismarine/JSPrismarine/commit/e8b329d3470a38fe4af4a6bbcebba991e599178d) Thanks [@filiphsps](https://github.com/filiphsps)! - `system.beforeEvents.startup` hands a pack `customCommandRegistry`, `blockComponentRegistry` and `itemComponentRegistry`, and a version 1 pack's `world.beforeEvents.worldInitialize` hands it the two component registries. Each registration throws the error the pinned BDS throws when BDS refuses it. After `startup`, `WorldScripts` hands the world its custom commands through the new optional `ScriptWorld.registerCommands` and runs each callback in restricted execution while the command runs, and hands it a `ScriptComponentSink` through `ScriptWorld.bindComponents`. `beforeOnPlayerPlace` runs at once and returns its cancel; every other hook runs in the script flush.
62
+
63
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`9ef6b07`](https://github.com/JSPrismarine/JSPrismarine/commit/9ef6b0754a9392ff526d8a7c65fb01247ca2c8c7) Thanks [@filiphsps](https://github.com/filiphsps)! - `DebuggerThread` (`@jsprismarine/script-host/debugger/thread`) runs the debugger's listener and connection on a worker thread and hands each connection to the starting thread as a channel endpoint, with an event after every message, so the world's thread still has its socket read while a script is stopped. `ScriptDebugSession.offer` sends the protocol event without waiting for the answer, `DebuggerSocket.peer` names the extension's address and port, and `WorldScripts`' `onPackLoaded` option names each pack once its context is ready and before its first line runs.
64
+
65
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`57910b4`](https://github.com/JSPrismarine/JSPrismarine/commit/57910b474b94404ebaa7cc02689a5c3077de7cff) Thanks [@filiphsps](https://github.com/filiphsps)! - Add a script debugger to the engine. `engine.attachDebugger` stops a script at a breakpoint, after a step over, in or out, on a pause request, and on thrown values when asked, and blocks the engine call that ran it until the listener resumes it. While a script is stopped, the debugger reads its stack, the local, closure and global variables of each frame, and object properties without running getters, and evaluates source inside a frame with write access to its variables. It reads no clock and costs no steps, so a script stops at the same line every run and keeps its step counts. The QuickJS patch behind it ports the debugger hooks of koush's QuickJS fork, and with no debugger attached the interpreter runs as before. `ScriptDebugSession` speaks the protocol of Mojang's Minecraft Bedrock Debugger for VS Code over a channel to the engine's thread, with BDS's handshake checks and messages, and `listenForDebugger` and `connectToDebugger` carry it over TCP, refusing a listener on a non-loopback address without a passcode.
66
+
67
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`52d6c72`](https://github.com/JSPrismarine/JSPrismarine/commit/52d6c72947e0bb80076c1971382122b485b77597) Thanks [@filiphsps](https://github.com/filiphsps)! - Scripts reach most of `@minecraft/server`'s entity and player surface. Every entity component a definition can give an entity reads its JSON with the defaults BDS reports, `Entity.getComponents` lists them, and riding, leashing, taming, fire, projectiles, NPCs, breathing and inventories write through the world. `Entity` gains its motion and states, its box, the blocks it stands on and looks at, the entities it looks at, properties, definition events, `matches`, `tryTeleport`, `lookAt`, `setRotation` and `addItem`; `EntityTypes` lists the world's types. `Player` gains experience, the spawn point, permission levels, the camera, the HUD's elements, input permissions and input, the client's system info, aim assist, item cooldowns, the control scheme, chat name decorations, sounds and music. `world.getAimAssist()` reads the vanilla aim assist registry and registers a script's categories and presets.
68
+
69
+ A world gives these members their behavior through the new optional `ScriptWorld.entitySystems`, typed by `@jsprismarine/script-host/host/entities/world`.
70
+
71
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`9579362`](https://github.com/JSPrismarine/JSPrismarine/commit/9579362b4070e246d6300d2f4e2dca2ab4715124) Thanks [@filiphsps](https://github.com/filiphsps)! - `@jsprismarine/script-host` throws errors from a new `script-host` catalog in `@jsprismarine/errors`, each with a code and a page in the error reference. Messages are unchanged. Import `ScriptError`, `ScriptTerminatedError`, `ScriptOutOfMemoryError`, `NativeLibraryError`, `DebuggerConnectionError`, `DebuggerFramingError` and `DebuggerTransportError` from `@jsprismarine/errors/script-host`; `ScriptError` keeps `scriptName`, `scriptMessage` and `scriptStack`. `NotImplementedError` and `ScriptApiError` stay in `@jsprismarine/script-host/errors`, and `DebuggerMessages` is gone, since the catalog now holds those messages. Errors that code inside the engine throws to a script remain the engine's own `TypeError`, `RangeError` and `ReferenceError`, as on Bedrock Dedicated Server.
72
+
73
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`f18ef7c`](https://github.com/JSPrismarine/JSPrismarine/commit/f18ef7c595f58a267b5371baab96390d0282616d) Thanks [@filiphsps](https://github.com/filiphsps)! - `@jsprismarine/script-host` and `@jsprismarine/script-types` are published to npm. The script host's install script downloads the QuickJS library built for the machine, on macOS on Apple silicon, Windows on x64, and Linux on x64 and arm64 with glibc or musl, and checks its SHA-256, so scripts run on an installed server without a compiler. `JSP_SCRIPT_HOST_LIBRARY` names a library file to load instead.
74
+
75
+ `ScriptHostErrors.LibraryNotBuilt` is replaced by `LibraryNotInstalled`, whose message says how to approve the install script for npm, pnpm or Bun. New entries cover a failed or corrupt download, a malformed manifest, and a library that is not the published build.
76
+
77
+ `@jsprismarine/native-network` exports `PUBLISHED_PLATFORMS`, the platforms it publishes builds for.
78
+
79
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`cf6cc4e`](https://github.com/JSPrismarine/JSPrismarine/commit/cf6cc4e7d98666f7938861654c07f1d29a2a0eac) Thanks [@filiphsps](https://github.com/filiphsps)! - Add `@jsprismarine/script-host`, the engine JSPrismarine will run Bedrock behavior pack scripts in: Fabrice Bellard's QuickJS with a C layer of our own, bound through `node:ffi`. An engine evaluates scripts and modules, calls synchronous host functions, stops a script at a step budget counted in interrupt handler calls, and enforces memory and stack limits. Each context has the same globals and built-in members as Bedrock Dedicated Server's QuickJS, and refuses `eval`, `Function` from a string and the regular expression syntax that BDS rejects. This release builds the library from source on Linux only.
80
+
81
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`0afbafd`](https://github.com/JSPrismarine/JSPrismarine/commit/0afbafda42c8517746dcf4ee50ac3de13fe950f9) Thanks [@filiphsps](https://github.com/filiphsps)! - Scripts now have dynamic properties and a scoreboard. `World`, `Entity` and `ItemStack` implement `getDynamicProperty`, `setDynamicProperty`, `setDynamicProperties`, `getDynamicPropertyIds`, `getDynamicPropertyTotalByteCount` and `clearDynamicProperties`, keyed by the pack's header UUID on the world and on entities and by its script module UUID on item stacks, with Bedrock Dedicated Server's checks, byte counts and error messages. Only an item that does not stack holds properties. `world.scoreboard`, `ScoreboardObjective`, `ScoreboardIdentity`, `ScoreboardScoreInfo` and `Entity.scoreboardIdentity` read and write the world's scoreboard. `ScriptWorld` gains `dynamicProperties`, `setDynamicProperties`, `clearDynamicProperties` and `scoreboard`, and `ScriptItem` gains `dynamicProperties`.
82
+
83
+ `ScriptApiImplementations.implement` takes a `converts` option naming the arguments an implementation converts itself, which the binding then passes on unchecked. An argument out of bounds now writes its value as BDS does, with two decimals past the 32-bit range.
84
+
85
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`d6c69e4`](https://github.com/JSPrismarine/JSPrismarine/commit/d6c69e43051eb091f0b4a17c0f33799f5944caf3) Thanks [@filiphsps](https://github.com/filiphsps)! - Behavior packs that declare `@minecraft/server-net` can send HTTP requests with `http.get` and `http.request`, build them with `HttpRequest` and `HttpHeader`, read the `HttpResponse`, and cancel them with `http.cancelAll`, as Bedrock Dedicated Server does: the same default headers, no redirects followed, `MalformedUriError` for a scheme other than `http` or `https`, and `InternalHttpRequestError` with the system's error code for a request that fails. A request runs off the tick, and its result enters the world in a later tick's input step. `Server.getScriptHttp()` records each admitted result and replays them, so a replay settles the same requests in the same ticks without the network. Packs that declare `@minecraft/server-admin` read `variables` and `secrets` from their `config/<script module uuid>/variables.json` and `secrets.json`, with each secret as an opaque `SecretString` that only a request header sends, and can move a player to another server with `transferPlayer`. As on Bedrock Dedicated Server, a pack needs the Beta APIs experiment and a `permissions.json` that allows `@minecraft/server-net`, which the default one does not.
86
+
87
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`1fbb6a2`](https://github.com/JSPrismarine/JSPrismarine/commit/1fbb6a2a3fd17723619cacd503fa4267c7fdd422) Thanks [@filiphsps](https://github.com/filiphsps)! - Behavior pack scripts can now show `@minecraft/server-ui` forms: `ActionFormData`, `ModalFormData` and `MessageFormData`, with their version 1 and version 2 signatures, `show()`, the three responses and `uiManager.closeAllForms`. The form JSON is byte for byte what Bedrock Dedicated Server sends, and a client's answer settles `show()` in the next script flush with what BDS settles it with: a selection, the form values, a cancel with its reason, or a `FormRejectError` for an answer that does not fit the form or a player who left. A world sends forms through the new optional `ScriptWorld.forms` channel. `ScriptApiContext` gains `tagOf`, the tag of an instance the host made, and `makeError`, which makes one of the API's errors without throwing it.
88
+
89
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`0792e2a`](https://github.com/JSPrismarine/JSPrismarine/commit/0792e2a7e6e5e98729b80df412262fd549ea3cb9) Thanks [@filiphsps](https://github.com/filiphsps)! - Behavior pack scripts hear most of the remaining `world.afterEvents` and `world.beforeEvents` of `@minecraft/server`: a player's block placement, game mode change, change of dimension, emote, button input, input mode, hotbar slot, inventory changes, cursor, crafting, mining, arm swing, item use stages, dropped and picked-up stacks, containers opened and closed, name tags and script messages; an entity's load and removal, melee hits, projectile hits, status effects, heals, health changes, taming and data-driven events; explosions and the blocks they clear, game rule changes, and pistons, levers, buttons and pressure plates. The before-events run as guards of their actions and can cancel them or change what they allow, such as an effect's duration, a blow's damage, a heal's amount, a game mode or the blocks a blast clears. Each subscriber's options pick the events it gets. Block custom components get `onStepOn`, `onEntityFallOn`, `onEntity`, `onRedstoneUpdate` and `onBlockStateChange`.
90
+
91
+ The server raises a kernel event for each of these, which plugins can listen to as well: `playerPlaceBlock` and `playerBlockPlaced`, `playerGamemodeChanged`, `playerDimensionChanged`, `entityRemove` and `entityRemoved`, `entityEffectAdd` and `entityEffectAdded`, `entityHeal`, `entityHealed` and `entityHealthChanged`, `explosion` and `exploded`, and the rest that `docs/guide/extending.md` lists. `playerSetGamemode`'s mode is writable.
92
+
93
+ For code that embeds these packages: `ScriptWorld` has an optional `guardGameEvents`, `ScriptWorldEvent` has a `game` variant, engine-systems' `ExplosionOptions` takes a `guard`, entities' `EntityEnvironment` takes `eventApplied`, block-behaviors' `WorldActions` takes `redstoneActivated`, and protocol exports `ScriptMessagePacket`.
94
+
95
+ - [#3218](https://github.com/JSPrismarine/JSPrismarine/pull/3218) [`5e5c465`](https://github.com/JSPrismarine/JSPrismarine/commit/5e5c46591205225dfb8339e6279fdf686d84244d) Thanks [@filiphsps](https://github.com/filiphsps)! - Give the world and system members of `@minecraft/server` behavior: the world's time of day, day, moon phase, default spawn, difficulty, cheats, music and every game rule; `system.sendScriptEvent`, `waitTicks`, `isEditorWorld` and `serverSystemInfo`; a dimension's block writes, block searches, block and entity rays, light, biomes, spawned items and experience, explosions, fills, block queries and clones; `BiomeTypes`; `world.tickingAreaManager`; `world.primitiveShapesManager` with `TextPrimitive`, drawn through the debug drawer every pack now has; the loot table manager with every loot table, pool, entry, function and condition class; the overworld clock and its time markers; `LinearSpline`, `CatmullRomSpline` and `Trigger`; and a player's `fogSettings`. Values and errors follow the pinned Bedrock Dedicated Server.
96
+
97
+ `ScriptWorld` gains an optional `worldSystem` seam, and a debug shape optional `visibleTo`, `hiddenFrom` and `defaultVisibleToAll`.
98
+ - Updated dependencies [[`b41035b`](https://github.com/JSPrismarine/JSPrismarine/commit/b41035be9b61570008b3405aa169418b19081915), [`3e71a8d`](https://github.com/JSPrismarine/JSPrismarine/commit/3e71a8dd75bd0a97e0f8587666f60f160844ff0b), [`5d2fb0e`](https://github.com/JSPrismarine/JSPrismarine/commit/5d2fb0eb3730e59260a09e60c130e57e5fdb099c), [`c500335`](https://github.com/JSPrismarine/JSPrismarine/commit/c5003358e3a7199593c6ddcdbe4bdf63f8c29fac), [`6e758f9`](https://github.com/JSPrismarine/JSPrismarine/commit/6e758f9de80c357c12d992bf473f1bdac86fb274), [`93a1b61`](https://github.com/JSPrismarine/JSPrismarine/commit/93a1b610493f401c4ac62881f70b3dee8c882f33), [`e1c982e`](https://github.com/JSPrismarine/JSPrismarine/commit/e1c982eeed0dfd682b5680c45c69159e21fd9ec0), [`9579362`](https://github.com/JSPrismarine/JSPrismarine/commit/9579362b4070e246d6300d2f4e2dca2ab4715124), [`f18ef7c`](https://github.com/JSPrismarine/JSPrismarine/commit/f18ef7c595f58a267b5371baab96390d0282616d), [`cf88d2f`](https://github.com/JSPrismarine/JSPrismarine/commit/cf88d2f8c2184bd4e116db888d4528fa27f5338d), [`d6c69e4`](https://github.com/JSPrismarine/JSPrismarine/commit/d6c69e43051eb091f0b4a17c0f33799f5944caf3), [`0792e2a`](https://github.com/JSPrismarine/JSPrismarine/commit/0792e2a7e6e5e98729b80df412262fd549ea3cb9), [`db04d85`](https://github.com/JSPrismarine/JSPrismarine/commit/db04d8520c1d43b88196c14229f36f5c8e71f3c1)]:
99
+ - @jsprismarine/errors@0.23.0-unstable-20261120205454
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JSPrismarine Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.