@almadar/std 17.0.2 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/behaviors/lolo/auth/atoms/std-dev-personas.lolo +27 -2
  2. package/behaviors/lolo/cli/atoms/std-orb-goldens.lolo +6 -3
  3. package/behaviors/lolo/cli/atoms/std-orb-lint-mem-handles.lolo +54 -34
  4. package/behaviors/lolo/cli/atoms/std-orb-lint-os-grants.lolo +4 -4
  5. package/behaviors/lolo/cli/atoms/std-orb-mcp.lolo +16 -21
  6. package/behaviors/lolo/cli/atoms/std-orb-packages.lolo +26 -16
  7. package/behaviors/lolo/cli/atoms/std-orb-serve.lolo +24 -4
  8. package/behaviors/lolo/codec/atoms/std-lolo-kotlin.lolo +26 -3
  9. package/behaviors/lolo/codec/atoms/std-lolo-python.lolo +15 -2
  10. package/behaviors/lolo/codec/atoms/std-lolo-rust.lolo +27 -2
  11. package/behaviors/lolo/codec/atoms/std-lolo-source.lolo +251 -60
  12. package/behaviors/lolo/codec/atoms/std-lolo-swift.lolo +24 -1
  13. package/behaviors/lolo/codec/atoms/std-lolo-typescript.lolo +24 -3
  14. package/behaviors/lolo/connect/atoms/std-meta-ads.lolo +4 -4
  15. package/behaviors/lolo/connect/atoms/std-stdio-lines.lolo +7 -4
  16. package/behaviors/lolo/connect/atoms/std-youtube.lolo +9 -9
  17. package/behaviors/lolo/dev/atoms/std-guest-session.lolo +122 -10
  18. package/behaviors/lolo/dev/atoms/std-mock-seed-marks.lolo +66 -0
  19. package/behaviors/lolo/dev/organisms/std-behavior-playground.lolo +5 -2
  20. package/behaviors/lolo/dev/organisms/std-launchpad.lolo +4 -3
  21. package/behaviors/lolo/gpu/atoms/std-gpu-compute.lolo +329 -0
  22. package/behaviors/lolo/net/atoms/std-http-client.lolo +4 -4
  23. package/behaviors/lolo/net/atoms/std-http-fetch.lolo +6 -6
  24. package/behaviors/lolo/net/atoms/std-npm-lookup.lolo +1 -1
  25. package/behaviors/lolo/net/atoms/std-npm-registry.lolo +2 -2
  26. package/behaviors/lolo/spec/auth/dev-personas.replay.goldens.json +263 -2
  27. package/behaviors/lolo/spec/cli/lint-all.lolo +1 -0
  28. package/behaviors/lolo/spec/cli/lint-item-action-event.replay.goldens.json +9 -9
  29. package/behaviors/lolo/spec/cli/lint-mem-handles.replay.goldens.json +3021 -1
  30. package/behaviors/lolo/spec/cli/lint-os-grants.replay.goldens.json +284 -12
  31. package/behaviors/lolo/spec/cli/mcp-server.replay.goldens.json +51 -55
  32. package/behaviors/lolo/spec/cli/orb-compile.replay.goldens.json +10 -4
  33. package/behaviors/lolo/spec/cli/orb-packages.lolo +1 -1
  34. package/behaviors/lolo/spec/codec/lolo-kotlin.replay.goldens.json +7496 -7497
  35. package/behaviors/lolo/spec/codec/lolo-python.replay.goldens.json +341 -3
  36. package/behaviors/lolo/spec/codec/lolo-rust.replay.goldens.json +18931 -6142
  37. package/behaviors/lolo/spec/codec/lolo-source.fixtures/compose-pair.lolo +44 -0
  38. package/behaviors/lolo/spec/codec/lolo-source.fixtures/config-read.lolo +2 -1
  39. package/behaviors/lolo/spec/codec/lolo-source.fixtures/divide-default.lolo +2 -1
  40. package/behaviors/lolo/spec/codec/lolo-source.fixtures/divide-plain.lolo +2 -1
  41. package/behaviors/lolo/spec/codec/lolo-source.fixtures/get-past-end.lolo +2 -1
  42. package/behaviors/lolo/spec/codec/lolo-source.fixtures/list-call.lolo +2 -1
  43. package/behaviors/lolo/spec/codec/lolo-source.fixtures/list-plain.lolo +2 -1
  44. package/behaviors/lolo/spec/codec/lolo-source.fixtures/minus-binary.lolo +2 -1
  45. package/behaviors/lolo/spec/codec/lolo-source.fixtures/minus-unary.lolo +2 -1
  46. package/behaviors/lolo/spec/codec/lolo-source.fixtures/nested-let.lolo +2 -1
  47. package/behaviors/lolo/spec/codec/lolo-source.fixtures/no-machine.lolo +2 -1
  48. package/behaviors/lolo/spec/codec/lolo-source.fixtures/no-template.lolo +2 -1
  49. package/behaviors/lolo/spec/codec/lolo-source.fixtures/nth-past-end.lolo +2 -1
  50. package/behaviors/lolo/spec/codec/lolo-source.fixtures/nth-raw.lolo +2 -1
  51. package/behaviors/lolo/spec/codec/lolo-source.fixtures/ports-call.lolo +2 -1
  52. package/behaviors/lolo/spec/codec/lolo-source.fixtures/range-one.lolo +2 -1
  53. package/behaviors/lolo/spec/codec/lolo-source.fixtures/range-two.lolo +2 -1
  54. package/behaviors/lolo/spec/codec/lolo-source.fixtures/router-trio.lolo +88 -0
  55. package/behaviors/lolo/spec/codec/lolo-source.fixtures/store-pair.lolo +62 -0
  56. package/behaviors/lolo/spec/codec/lolo-source.fixtures/string-literal.lolo +2 -1
  57. package/behaviors/lolo/spec/codec/lolo-source.gen/knobs.py +27 -1
  58. package/behaviors/lolo/spec/codec/lolo-source.gen/src_assemble.in +54 -2
  59. package/behaviors/lolo/spec/codec/lolo-source.gen/src_finish.in +1 -1
  60. package/behaviors/lolo/spec/codec/lolo-source.gen/src_fold.in +24 -4
  61. package/behaviors/lolo/spec/codec/lolo-source.gen/src_head.in +8 -3
  62. package/behaviors/lolo/spec/codec/lolo-source.gen/src_prepare.in +6 -2
  63. package/behaviors/lolo/spec/codec/lolo-source.gen/src_trait.in +12 -2
  64. package/behaviors/lolo/spec/codec/lolo-source.parity/agent-step.lolo +2 -1
  65. package/behaviors/lolo/spec/codec/lolo-source.parity/agent-step.server.lolo +1 -0
  66. package/behaviors/lolo/spec/codec/lolo-source.parity/chunk.lolo +2 -1
  67. package/behaviors/lolo/spec/codec/lolo-source.parity/chunk.server.lolo +1 -0
  68. package/behaviors/lolo/spec/codec/lolo-source.parity/compose-pair.events.json +36 -0
  69. package/behaviors/lolo/spec/codec/lolo-source.parity/compose-pair.replay.goldens.json +91 -0
  70. package/behaviors/lolo/spec/codec/lolo-source.parity/cosine.lolo +2 -1
  71. package/behaviors/lolo/spec/codec/lolo-source.parity/cosine.server.lolo +1 -0
  72. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/kotlin/compose-pair.kt +31 -0
  73. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/kotlin/router-trio.kt +31 -0
  74. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/kotlin/store-pair.kt +31 -0
  75. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/python/compose-pair.py +18 -0
  76. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/python/router-trio.py +18 -0
  77. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/python/store-pair.py +17 -0
  78. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/rust/compose-pair.rs +37 -0
  79. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/rust/router-trio.rs +37 -0
  80. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/rust/store-pair.rs +36 -0
  81. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/swift/compose-pair.swift +24 -0
  82. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/swift/router-trio.swift +24 -0
  83. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/swift/store-pair.swift +23 -0
  84. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/typescript/compose-pair.mts +24 -0
  85. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/typescript/router-trio.mts +24 -0
  86. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/typescript/store-pair.mts +22 -0
  87. package/behaviors/lolo/spec/codec/lolo-source.parity/recall-at-k.lolo +2 -1
  88. package/behaviors/lolo/spec/codec/lolo-source.parity/recall-at-k.server.lolo +1 -0
  89. package/behaviors/lolo/spec/codec/lolo-source.parity/router-trio.events.json +18 -0
  90. package/behaviors/lolo/spec/codec/lolo-source.parity/router-trio.replay.goldens.json +87 -0
  91. package/behaviors/lolo/spec/codec/lolo-source.parity/store-pair.events.json +58 -0
  92. package/behaviors/lolo/spec/codec/lolo-source.parity/store-pair.replay.goldens.json +238 -0
  93. package/behaviors/lolo/spec/codec/lolo-swift.replay.goldens.json +15599 -2204
  94. package/behaviors/lolo/spec/codec/lolo-typescript.replay.goldens.json +28930 -28929
  95. package/behaviors/lolo/spec/connect/bearer-api.replay.goldens.json +1 -1
  96. package/behaviors/lolo/spec/connect/esign.replay.goldens.json +3 -3
  97. package/behaviors/lolo/spec/connect/github.replay.goldens.json +13 -13
  98. package/behaviors/lolo/spec/connect/google-calendar.replay.goldens.json +2 -2
  99. package/behaviors/lolo/spec/connect/image.replay.goldens.json +1 -1
  100. package/behaviors/lolo/spec/connect/meta-ads.replay.goldens.json +2 -2
  101. package/behaviors/lolo/spec/connect/stdio-lines.replay.goldens.json +90 -0
  102. package/behaviors/lolo/spec/connect/twilio.replay.goldens.json +2 -2
  103. package/behaviors/lolo/spec/connect/youtube.replay.goldens.json +1 -1
  104. package/behaviors/lolo/spec/dev/guest-session.replay.goldens.json +824 -0
  105. package/behaviors/lolo/spec/dev/mock-seed-marks.replay.goldens.json +365 -0
  106. package/behaviors/lolo/spec/dev/verify-walk.replay.goldens.json +2 -1
  107. package/behaviors/lolo/spec/gpu/gpu-compute.replay.goldens.json +784 -0
  108. package/behaviors/lolo/spec/mem/mem-buffer.replay.goldens.json +97 -1
  109. package/behaviors/lolo/spec/ml/vector-write.goldens.json +1 -1
  110. package/behaviors/lolo/spec/ml/vector-write.replay.goldens.json +2 -2
  111. package/behaviors/lolo/spec/net/http-client-call-host.replay.goldens.json +3 -3
  112. package/behaviors/lolo/spec/net/http-client-env-host.replay.goldens.json +3 -3
  113. package/behaviors/lolo/spec/net/http-client.replay.goldens.json +56 -56
  114. package/behaviors/lolo/spec/net/http-fetch.replay.goldens.json +2 -2
  115. package/behaviors/lolo/spec/net/npm-lookup.replay.goldens.json +1 -1
  116. package/behaviors/lolo/spec/net/npm-registry.replay.goldens.json +2 -2
  117. package/behaviors/lolo/spec/net/server-declared-traits.replay.goldens.json +6 -3
  118. package/behaviors/lolo/spec/net/server-external-inputs.replay.goldens.json +16 -8
  119. package/behaviors/lolo/spec/net/server-retargeted-leg.replay.goldens.json +4 -2
  120. package/behaviors/lolo/spec/net/server-untargeted-discovery.replay.goldens.json +50 -45
  121. package/behaviors/lolo/spec/ops/llm-spend-board.replay.goldens.json +112 -16
  122. package/behaviors/lolo/spec/store/firestore-twin.replay.goldens.json +1 -1
  123. package/behaviors/lolo/spec/store/row-store-postgres.gen/record_real_sql.py +1 -1
  124. package/behaviors/lolo/spec/ui/game/fx-particles.replay.goldens.json +37 -0
  125. package/behaviors/lolo/ui/avl/atoms/std-avl-cosmic-zoom.lolo +2 -2
  126. package/behaviors/lolo/ui/game/atoms/std-fx-particles.lolo +10 -1
  127. package/behaviors/lolo/ui/game/atoms/ui-draw-fx-layer.lolo +4 -4
  128. package/behaviors/lolo/ui/game/organisms/std-arcade-board-3d.lolo +9 -9
  129. package/behaviors/lolo/ui/game/organisms/std-crew-board-2d.lolo +4 -4
  130. package/behaviors/lolo/ui/game/organisms/std-dungeon-board-2d.lolo +5 -5
  131. package/behaviors/lolo/ui/game/organisms/std-market-board-3d.lolo +9 -9
  132. package/behaviors/lolo/ui/game/organisms/std-objective-board-3d.lolo +9 -9
  133. package/behaviors/lolo/ui/game/organisms/std-platformer-board-2d.lolo +5 -5
  134. package/behaviors/lolo/ui/game/organisms/std-platformer-puzzle.lolo +4 -4
  135. package/behaviors/lolo/ui/game/organisms/std-survival-board-3d.lolo +9 -9
  136. package/behaviors/lolo/ui/game/organisms/std-tactics-board-2d.lolo +5 -5
  137. package/behaviors/lolo/ui/game/organisms/std-tactics-board-3d.lolo +9 -9
  138. package/behaviors/registry/auth/atoms/std-dev-personas.orb +1 -1
  139. package/behaviors/registry/cli/atoms/std-orb-goldens.orb +1 -1
  140. package/behaviors/registry/cli/atoms/std-orb-lint-mem-handles.orb +1 -1
  141. package/behaviors/registry/cli/atoms/std-orb-lint-os-grants.orb +1 -1
  142. package/behaviors/registry/cli/atoms/std-orb-mcp.orb +1 -1
  143. package/behaviors/registry/cli/atoms/std-orb-packages.orb +1 -1
  144. package/behaviors/registry/cli/atoms/std-orb-serve.orb +1 -1
  145. package/behaviors/registry/codec/atoms/std-lolo-kotlin.orb +1 -1
  146. package/behaviors/registry/codec/atoms/std-lolo-python.orb +1 -1
  147. package/behaviors/registry/codec/atoms/std-lolo-rust.orb +1 -1
  148. package/behaviors/registry/codec/atoms/std-lolo-source.orb +1 -1
  149. package/behaviors/registry/codec/atoms/std-lolo-swift.orb +1 -1
  150. package/behaviors/registry/codec/atoms/std-lolo-typescript.orb +1 -1
  151. package/behaviors/registry/connect/atoms/std-meta-ads.orb +1 -1
  152. package/behaviors/registry/connect/atoms/std-stdio-lines.orb +1 -1
  153. package/behaviors/registry/connect/atoms/std-youtube.orb +1 -1
  154. package/behaviors/registry/dev/atoms/std-guest-session.orb +1 -1
  155. package/behaviors/registry/dev/atoms/std-mock-seed-marks.orb +1 -0
  156. package/behaviors/registry/dev/organisms/std-behavior-playground.orb +37 -0
  157. package/behaviors/registry/dev/organisms/std-launchpad.orb +25 -0
  158. package/behaviors/registry/gpu/atoms/std-gpu-compute.orb +1 -0
  159. package/behaviors/registry/net/atoms/std-http-client.orb +1 -1
  160. package/behaviors/registry/net/atoms/std-http-fetch.orb +1 -1
  161. package/behaviors/registry/net/atoms/std-npm-lookup.orb +1 -1
  162. package/behaviors/registry/net/atoms/std-npm-registry.orb +1 -1
  163. package/behaviors/registry/spec/cli/lint-all.orb +1 -1
  164. package/behaviors/registry/spec/cli/orb-packages.orb +1 -1
  165. package/behaviors/registry/spec/codec/lolo-source.fixtures/compose-pair.orb +1 -0
  166. package/behaviors/registry/spec/codec/lolo-source.fixtures/config-read.orb +1 -1
  167. package/behaviors/registry/spec/codec/lolo-source.fixtures/divide-default.orb +1 -1
  168. package/behaviors/registry/spec/codec/lolo-source.fixtures/divide-plain.orb +1 -1
  169. package/behaviors/registry/spec/codec/lolo-source.fixtures/get-past-end.orb +1 -1
  170. package/behaviors/registry/spec/codec/lolo-source.fixtures/list-call.orb +1 -1
  171. package/behaviors/registry/spec/codec/lolo-source.fixtures/list-plain.orb +1 -1
  172. package/behaviors/registry/spec/codec/lolo-source.fixtures/minus-binary.orb +1 -1
  173. package/behaviors/registry/spec/codec/lolo-source.fixtures/minus-unary.orb +1 -1
  174. package/behaviors/registry/spec/codec/lolo-source.fixtures/nested-let.orb +1 -1
  175. package/behaviors/registry/spec/codec/lolo-source.fixtures/no-machine.orb +1 -1
  176. package/behaviors/registry/spec/codec/lolo-source.fixtures/no-template.orb +1 -1
  177. package/behaviors/registry/spec/codec/lolo-source.fixtures/nth-past-end.orb +1 -1
  178. package/behaviors/registry/spec/codec/lolo-source.fixtures/nth-raw.orb +1 -1
  179. package/behaviors/registry/spec/codec/lolo-source.fixtures/ports-call.orb +1 -1
  180. package/behaviors/registry/spec/codec/lolo-source.fixtures/range-one.orb +1 -1
  181. package/behaviors/registry/spec/codec/lolo-source.fixtures/range-two.orb +1 -1
  182. package/behaviors/registry/spec/codec/lolo-source.fixtures/router-trio.orb +1 -0
  183. package/behaviors/registry/spec/codec/lolo-source.fixtures/store-pair.orb +1 -0
  184. package/behaviors/registry/spec/codec/lolo-source.fixtures/string-literal.orb +1 -1
  185. package/behaviors/registry/spec/codec/lolo-source.parity/agent-step.orb +1 -1
  186. package/behaviors/registry/spec/codec/lolo-source.parity/agent-step.server.orb +1 -1
  187. package/behaviors/registry/spec/codec/lolo-source.parity/chunk.orb +1 -1
  188. package/behaviors/registry/spec/codec/lolo-source.parity/chunk.server.orb +1 -1
  189. package/behaviors/registry/spec/codec/lolo-source.parity/cosine.orb +1 -1
  190. package/behaviors/registry/spec/codec/lolo-source.parity/cosine.server.orb +1 -1
  191. package/behaviors/registry/spec/codec/lolo-source.parity/recall-at-k.orb +1 -1
  192. package/behaviors/registry/spec/codec/lolo-source.parity/recall-at-k.server.orb +1 -1
  193. package/behaviors/registry/ui/avl/atoms/std-avl-cosmic-zoom.orb +1 -1
  194. package/behaviors/registry/ui/game/atoms/std-fx-particles.orb +1 -1
  195. package/behaviors/registry/ui/game/atoms/ui-draw-fx-layer.orb +1 -1
  196. package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +20 -13
  197. package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +9 -5
  198. package/behaviors/registry/ui/game/organisms/std-dungeon-board-2d.orb +17 -7
  199. package/behaviors/registry/ui/game/organisms/std-market-board-3d.orb +19 -15
  200. package/behaviors/registry/ui/game/organisms/std-objective-board-3d.orb +15 -12
  201. package/behaviors/registry/ui/game/organisms/std-platformer-board-2d.orb +17 -7
  202. package/behaviors/registry/ui/game/organisms/std-platformer-puzzle.orb +4 -0
  203. package/behaviors/registry/ui/game/organisms/std-survival-board-3d.orb +15 -12
  204. package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +13 -6
  205. package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +14 -12
  206. package/canonical-operators.json +1426 -103
  207. package/dist/{chunk-EK22WRB6.js → chunk-2UGHBVU2.js} +2 -2
  208. package/dist/{chunk-GDMH5T4J.js → chunk-3DK7GI2C.js} +2 -2
  209. package/dist/chunk-3MDASC5C.js +26 -0
  210. package/dist/{chunk-K5ZI27PB.js → chunk-3PHO4RRF.js} +1 -1
  211. package/dist/{chunk-7IEMMYM6.js → chunk-4MJCLAZW.js} +1 -1
  212. package/dist/{chunk-W4IEV4BY.js → chunk-55JPIL7A.js} +2 -2
  213. package/dist/{chunk-RUGBZTV3.js → chunk-66BLZLFI.js} +1 -1
  214. package/dist/{chunk-YWFISV7L.js → chunk-66RAJFOD.js} +1 -1
  215. package/dist/{chunk-JWOWWGNZ.js → chunk-6ED4SUC6.js} +1 -1
  216. package/dist/{chunk-LL7P6EII.js → chunk-6KFCHNE2.js} +2 -2
  217. package/dist/{chunk-GFBL2TW6.js → chunk-A4QB3Y6L.js} +1 -1
  218. package/dist/chunk-BVWMLS32.js +123 -0
  219. package/dist/{chunk-5KQCGSNC.js → chunk-CRKVDCY7.js} +1 -1
  220. package/dist/{chunk-WHQDLLC3.js → chunk-EKWEY4OJ.js} +1 -1
  221. package/dist/{chunk-Y3BRVNYK.js → chunk-EU22GCGV.js} +2 -2
  222. package/dist/{chunk-XQPYTDZ4.js → chunk-FB6PKNRS.js} +1 -1
  223. package/dist/{chunk-UX3MDFX6.js → chunk-FSVOJQLP.js} +1 -1
  224. package/dist/{chunk-LDBD2FBQ.js → chunk-GAKLBWBR.js} +1 -1
  225. package/dist/{chunk-C3IEMPRZ.js → chunk-GO3FKBV2.js} +2 -2
  226. package/dist/{chunk-LZSPEHSM.js → chunk-GPDTJHYY.js} +1 -1
  227. package/dist/{chunk-W5ABMOXU.js → chunk-JQBWLH5V.js} +1 -1
  228. package/dist/{chunk-63X6RNY6.js → chunk-KKW3JHTC.js} +1 -1
  229. package/dist/{chunk-5PLJE42Q.js → chunk-LF2EZVAM.js} +1 -1
  230. package/dist/{chunk-RXWBYWQB.js → chunk-LGCKOZP3.js} +2 -2
  231. package/dist/{chunk-JJEADYP7.js → chunk-LMZ6XJFB.js} +2 -2
  232. package/dist/{chunk-CWYSQZJU.js → chunk-M2YQNSAZ.js} +2 -2
  233. package/dist/{chunk-GNCKJV3P.js → chunk-MKWHYBIS.js} +1 -1
  234. package/dist/{chunk-ZB2CLGEG.js → chunk-MXBGYTYF.js} +1 -1
  235. package/dist/{chunk-UN76TRSK.js → chunk-NH6MXHZR.js} +41 -41
  236. package/dist/{chunk-II2VW7T6.js → chunk-ODBIX4DB.js} +1 -1
  237. package/dist/{chunk-3F3CNWOG.js → chunk-OYDQR6DT.js} +2 -2
  238. package/dist/{chunk-FVL6BT6L.js → chunk-PD6POR44.js} +1 -1
  239. package/dist/{chunk-U6USXZ5M.js → chunk-PHFT3QNS.js} +2 -2
  240. package/dist/{chunk-RJYKIZMS.js → chunk-PQZ6PVKG.js} +2 -2
  241. package/dist/{chunk-TQPQXCSZ.js → chunk-Q6NHXIOZ.js} +2 -2
  242. package/dist/{chunk-KYGWVCTM.js → chunk-QMDVYTB7.js} +1 -1
  243. package/dist/{chunk-XKTATY45.js → chunk-RW2KMSG5.js} +4 -4
  244. package/dist/{chunk-UHNSPTFT.js → chunk-SA2ZS24W.js} +1 -1
  245. package/dist/{chunk-6YPUQK36.js → chunk-SFWP4UMK.js} +2 -2
  246. package/dist/{chunk-ZZYLFHBU.js → chunk-TLNEQA4D.js} +1 -1
  247. package/dist/{chunk-RGTBRWWA.js → chunk-TOODE5AD.js} +2 -2
  248. package/dist/{chunk-QGWAHOFR.js → chunk-U57GY7SM.js} +2 -2
  249. package/dist/{chunk-FDJZKB7J.js → chunk-UIDQQJSX.js} +1 -1
  250. package/dist/{chunk-LLH3WXM3.js → chunk-UVFP2B7I.js} +1 -1
  251. package/dist/{chunk-4OF7727E.js → chunk-VEGZPCTZ.js} +2 -2
  252. package/dist/{chunk-73YUPNIT.js → chunk-VXN4V7LC.js} +1 -1
  253. package/dist/{chunk-4D3W6AAE.js → chunk-YHQVZWPG.js} +1 -1
  254. package/dist/{chunk-XXYBHYLM.js → chunk-YQO3TO66.js} +2 -2
  255. package/dist/{chunk-YZAYFR5A.js → chunk-ZSJ3GEOJ.js} +1 -1
  256. package/dist/index.d.ts +3 -3
  257. package/dist/index.js +50 -50
  258. package/dist/modules/anim.js +2 -2
  259. package/dist/modules/array.js +2 -2
  260. package/dist/modules/auth.js +3 -3
  261. package/dist/modules/behavior.js +2 -2
  262. package/dist/modules/bit.js +2 -2
  263. package/dist/modules/browser.js +2 -2
  264. package/dist/modules/bytes.js +2 -2
  265. package/dist/modules/codec.js +3 -3
  266. package/dist/modules/composition.js +2 -2
  267. package/dist/modules/core.js +2 -2
  268. package/dist/modules/csv.js +2 -2
  269. package/dist/modules/ffi.js +3 -3
  270. package/dist/modules/format.js +2 -2
  271. package/dist/modules/geo.js +2 -2
  272. package/dist/modules/gpu.d.ts +12 -0
  273. package/dist/modules/gpu.js +3 -0
  274. package/dist/modules/grid.js +2 -2
  275. package/dist/modules/i18n.js +2 -2
  276. package/dist/modules/index.d.ts +1 -2
  277. package/dist/modules/index.js +45 -46
  278. package/dist/modules/json.js +2 -2
  279. package/dist/modules/kernel.js +3 -3
  280. package/dist/modules/kv.js +3 -3
  281. package/dist/modules/llm.js +2 -2
  282. package/dist/modules/math.js +2 -2
  283. package/dist/modules/mem.js +3 -3
  284. package/dist/modules/object.js +2 -2
  285. package/dist/modules/os-common.d.ts +1 -1
  286. package/dist/modules/os-common.js +2 -2
  287. package/dist/modules/os-desktop.js +3 -3
  288. package/dist/modules/os-dev.js +3 -3
  289. package/dist/modules/os-dir.js +3 -3
  290. package/dist/modules/os-env-stdio.js +3 -3
  291. package/dist/modules/os-fs.js +3 -3
  292. package/dist/modules/os-net.js +3 -3
  293. package/dist/modules/os-path.js +3 -3
  294. package/dist/modules/os-process.js +3 -3
  295. package/dist/modules/os-sys.js +3 -3
  296. package/dist/modules/os-time-users.js +3 -3
  297. package/dist/modules/os.js +13 -13
  298. package/dist/modules/path.js +2 -2
  299. package/dist/modules/prob.js +2 -2
  300. package/dist/modules/program.js +2 -2
  301. package/dist/modules/session.js +2 -2
  302. package/dist/modules/str.js +2 -2
  303. package/dist/modules/time.js +2 -2
  304. package/dist/modules/validate.js +2 -2
  305. package/dist/modules/vector.js +2 -2
  306. package/dist/modules/workspace.js +2 -2
  307. package/dist/modules/xml.js +2 -2
  308. package/dist/modules/yaml.js +2 -2
  309. package/dist/registry.d.ts +2 -2
  310. package/dist/registry.js +49 -49
  311. package/dist/{types-BA4LkhNJ.d.ts → types-CgiGhK6t.d.ts} +17 -3
  312. package/package.json +5 -5
  313. package/dist/chunk-F5TP25JA.js +0 -26
  314. package/dist/chunk-NE4WSTN7.js +0 -26
  315. package/dist/modules/trace.d.ts +0 -15
  316. package/dist/modules/trace.js +0 -2
  317. /package/dist/{chunk-SHSBTDDX.js → chunk-QUQ33UXH.js} +0 -0
@@ -0,0 +1,329 @@
1
+ app std-gpu-compute [
2
+ version: "1.0.0",
3
+ gpu: { "device:16777216": [open, compute, readback] },
4
+ description: "One compute job on a GPU device, owning the whole device lifecycle. GPU_OPEN opens the device; GPU_RUN creates three storage buffers sized to input a, builds the shader, pipeline and bind group from config, then submits one job that writes a and b, runs the compute dispatch and reads the output buffer back, and emits GPU_RESULT with the bytes. After that job GPU_STEP runs again on the buffers in place: one job that, for each params blob in order, writes it at the start of input b and runs the dispatch, then reads the output buffer back and emits GPU_RESULT (with readback off it reads nothing and emits GPU_STEPPED with the output buffer, which a canvas draws where it lies), so a simulation keeps its state on the device between steps and a multi-pass step selects its pass from b; GPU_CLOSE releases every handle and closes the device. Every failure lands in failed carrying the kernel's error and kind and emits GPU_ERROR; GPU_CLOSE from failed releases what exists. The WGSL, entry point, workgroup counts and buffer usages are config; the default program adds two f32 vectors. Every gpu call is keyed, so a host that answers it later (a browser client) can bring its outcome back. The grant caps the device at 16 MiB; a call site that needs more grants its own cap."
5
+ ]
6
+
7
+ orbital GpuComputeOrbital {
8
+ entity GpuJob [runtime] {
9
+ id : string!
10
+ device : GpuDevice?
11
+ bufA : GpuBuffer?
12
+ bufB : GpuBuffer?
13
+ bufOut : GpuBuffer?
14
+ shader : GpuShader?
15
+ pipeline : GpuPipeline?
16
+ bindGroup : GpuBindGroup?
17
+ inputA : bytes = ""
18
+ inputB : bytes = ""
19
+ size : int = 0
20
+ resultBytes : int = 0
21
+ errorText : string = ""
22
+ errorKind : string = ""
23
+ }
24
+
25
+ trait GpuCompute -> GpuJob [optimistic] {
26
+ initial: idle
27
+
28
+ state idle {
29
+ GPU_OPEN -> opening
30
+ (gpu/device-open { powerPreference: @config.powerPreference } { key: "gpu-open", emit: { success: GPU_DEVICE, failure: GPU_FAILED } })
31
+ GPU_RUN -> idle
32
+ (emit GPU_ERROR { error: "the device is not open", kind: "closed" })
33
+ GPU_STEP -> idle
34
+ (emit GPU_ERROR { error: "the device is not open", kind: "closed" })
35
+ GPU_CLOSE -> idle
36
+ }
37
+
38
+ state opening {
39
+ INIT -> opening
40
+ GPU_DEVICE -> ready
41
+ (set @entity.device @payload.device)
42
+ (emit GPU_OPENED {})
43
+ GPU_FAILED -> failed
44
+ (set @entity.errorText @payload.error)
45
+ (set @entity.errorKind @payload.kind)
46
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
47
+ }
48
+
49
+ state ready {
50
+ GPU_OPEN -> ready
51
+ (emit GPU_ERROR { error: "the device is already open", kind: "invalid" })
52
+ GPU_STEP -> ready
53
+ (emit GPU_ERROR { error: "run the job before stepping it", kind: "invalid" })
54
+ GPU_RUN -> creatingA when (not (= @entity.device null))
55
+ (set @entity.inputA @payload.a)
56
+ (set @entity.inputB @payload.b)
57
+ (set @entity.size (bytes/length @payload.a))
58
+ (gpu/buffer-create @entity.device { size: (bytes/length @payload.a), usage: @config.inputUsage } { key: "gpu-buffer", emit: { success: GPU_BUFFER, failure: GPU_FAILED } })
59
+ GPU_RUN -> failed when (= @entity.device null)
60
+ (emit GPU_ERROR { error: "the device holds no handle", kind: "closed" })
61
+ GPU_CLOSE -> releasing
62
+ (emit GPU_RELEASE_NEXT {})
63
+ }
64
+
65
+ state creatingA {
66
+ INIT -> creatingA
67
+ GPU_BUFFER -> creatingB when (not (= @entity.device null))
68
+ (set @entity.bufA @payload.buffer)
69
+ (gpu/buffer-create @entity.device { size: @entity.size, usage: @config.inputUsage } { key: "gpu-buffer", emit: { success: GPU_BUFFER, failure: GPU_FAILED } })
70
+ GPU_BUFFER -> failed when (not (not (= @entity.device null)))
71
+ (set @entity.errorText "the job holds no device")
72
+ (set @entity.errorKind "closed")
73
+ (emit GPU_ERROR { error: "the job holds no device", kind: "closed" })
74
+ GPU_FAILED -> failed
75
+ (set @entity.errorText @payload.error)
76
+ (set @entity.errorKind @payload.kind)
77
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
78
+ }
79
+
80
+ state creatingB {
81
+ INIT -> creatingB
82
+ GPU_BUFFER -> creatingOut when (not (= @entity.device null))
83
+ (set @entity.bufB @payload.buffer)
84
+ (gpu/buffer-create @entity.device { size: @entity.size, usage: @config.outputUsage } { key: "gpu-buffer", emit: { success: GPU_BUFFER, failure: GPU_FAILED } })
85
+ GPU_BUFFER -> failed when (not (not (= @entity.device null)))
86
+ (set @entity.errorText "the job holds no device")
87
+ (set @entity.errorKind "closed")
88
+ (emit GPU_ERROR { error: "the job holds no device", kind: "closed" })
89
+ GPU_FAILED -> failed
90
+ (set @entity.errorText @payload.error)
91
+ (set @entity.errorKind @payload.kind)
92
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
93
+ }
94
+
95
+ state creatingOut {
96
+ INIT -> creatingOut
97
+ GPU_BUFFER -> shading when (not (= @entity.device null))
98
+ (set @entity.bufOut @payload.buffer)
99
+ (gpu/shader-create @entity.device @config.wgsl { key: "gpu-shader", emit: { success: GPU_SHADER, failure: GPU_FAILED } })
100
+ GPU_BUFFER -> failed when (not (not (= @entity.device null)))
101
+ (set @entity.errorText "the job holds no device")
102
+ (set @entity.errorKind "closed")
103
+ (emit GPU_ERROR { error: "the job holds no device", kind: "closed" })
104
+ GPU_FAILED -> failed
105
+ (set @entity.errorText @payload.error)
106
+ (set @entity.errorKind @payload.kind)
107
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
108
+ }
109
+
110
+ state shading {
111
+ INIT -> shading
112
+ GPU_SHADER -> pipelining when (not (= @entity.device null))
113
+ (set @entity.shader @payload.shader)
114
+ (gpu/pipeline-create @entity.device { kind: "compute", shader: @payload.shader, entry: @config.entry } { key: "gpu-pipeline", emit: { success: GPU_PIPELINE, failure: GPU_FAILED } })
115
+ GPU_SHADER -> failed when (not (not (= @entity.device null)))
116
+ (set @entity.errorText "the job holds no device")
117
+ (set @entity.errorKind "closed")
118
+ (emit GPU_ERROR { error: "the job holds no device", kind: "closed" })
119
+ GPU_FAILED -> failed
120
+ (set @entity.errorText @payload.error)
121
+ (set @entity.errorKind @payload.kind)
122
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
123
+ }
124
+
125
+ state pipelining {
126
+ INIT -> pipelining
127
+ GPU_PIPELINE -> binding when (and (not (= @entity.bufA null)) (not (= @entity.bufB null)) (not (= @entity.bufOut null)))
128
+ (set @entity.pipeline @payload.pipeline)
129
+ (gpu/bind-group-create @payload.pipeline 0 [{ binding: 0, buffer: @entity.bufA }, { binding: 1, buffer: @entity.bufB }, { binding: 2, buffer: @entity.bufOut }] { key: "gpu-bind", emit: { success: GPU_BINDGROUP, failure: GPU_FAILED } })
130
+ GPU_PIPELINE -> failed when (not (and (not (= @entity.bufA null)) (not (= @entity.bufB null)) (not (= @entity.bufOut null))))
131
+ (set @entity.errorText "the job holds no buffers")
132
+ (set @entity.errorKind "closed")
133
+ (emit GPU_ERROR { error: "the job holds no buffers", kind: "closed" })
134
+ GPU_FAILED -> failed
135
+ (set @entity.errorText @payload.error)
136
+ (set @entity.errorKind @payload.kind)
137
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
138
+ }
139
+
140
+ state binding {
141
+ INIT -> binding
142
+ GPU_BINDGROUP -> submitting when (and (not (= @entity.device null)) (not (= @entity.pipeline null)) (not (= @entity.bufA null)) (not (= @entity.bufB null)) (not (= @entity.bufOut null)))
143
+ (set @entity.bindGroup @payload.bindGroup)
144
+ (gpu/submit @entity.device (array/concat [{ write: { buffer: @entity.bufA, data: @entity.inputA } }, { write: { buffer: @entity.bufB, data: @entity.inputB } }, { compute: { pipeline: @entity.pipeline, bindGroups: [@payload.bindGroup], dispatch: @config.workgroups } }] (if @config.readback [{ read: { buffer: @entity.bufOut } }] [])) { key: "gpu-submit", emit: { success: GPU_SUBMITTED, failure: GPU_FAILED } })
145
+ GPU_BINDGROUP -> failed when (not (and (not (= @entity.device null)) (not (= @entity.pipeline null)) (not (= @entity.bufA null)) (not (= @entity.bufB null)) (not (= @entity.bufOut null))))
146
+ (set @entity.errorText "the job holds no device, pipeline or buffers")
147
+ (set @entity.errorKind "closed")
148
+ (emit GPU_ERROR { error: "the job holds no device, pipeline or buffers", kind: "closed" })
149
+ GPU_FAILED -> failed
150
+ (set @entity.errorText @payload.error)
151
+ (set @entity.errorKind @payload.kind)
152
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
153
+ }
154
+
155
+ state submitting {
156
+ INIT -> submitting
157
+ GPU_SUBMITTED -> done when (and (not @config.readback) (not (= @entity.bufOut null)))
158
+ (emit GPU_STEPPED { buffer: @entity.bufOut })
159
+ GPU_SUBMITTED -> done when @config.readback
160
+ (let ((out (array/first @payload.reads))) (if (= @out null) (do (set @entity.errorText "the job's read answered no bytes") (set @entity.errorKind "io") (emit GPU_ERROR { error: "the job's read answered no bytes", kind: "io" })) (do (set @entity.resultBytes (bytes/length @out)) (emit GPU_RESULT { data: @out }))))
161
+ GPU_FAILED -> failed
162
+ (set @entity.errorText @payload.error)
163
+ (set @entity.errorKind @payload.kind)
164
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
165
+ }
166
+
167
+ state done {
168
+ GPU_RUN -> done
169
+ (emit GPU_ERROR { error: "close the job before running another", kind: "invalid" })
170
+ GPU_STEP -> stepping when (and (not (= @entity.device null)) (not (= @entity.pipeline null)) (not (= @entity.bindGroup null)) (not (= @entity.bufB null)) (not (= @entity.bufOut null)))
171
+ (gpu/submit @entity.device (array/concat (array/flatten (array/map @payload.params (fn p [{ write: { buffer: @entity.bufB, data: @p } }, { compute: { pipeline: @entity.pipeline, bindGroups: [@entity.bindGroup], dispatch: @config.workgroups } }]))) (if @config.readback [{ read: { buffer: @entity.bufOut } }] [])) { key: "gpu-submit", emit: { success: GPU_SUBMITTED, failure: GPU_FAILED } })
172
+ GPU_STEP -> failed when (not (and (not (= @entity.device null)) (not (= @entity.pipeline null)) (not (= @entity.bindGroup null)) (not (= @entity.bufB null)) (not (= @entity.bufOut null))))
173
+ (set @entity.errorText "the job holds no device, pipeline, bind group or buffers")
174
+ (set @entity.errorKind "closed")
175
+ (emit GPU_ERROR { error: "the job holds no device, pipeline, bind group or buffers", kind: "closed" })
176
+ GPU_CLOSE -> releasing
177
+ (emit GPU_RELEASE_NEXT {})
178
+ }
179
+
180
+ state stepping {
181
+ INIT -> stepping
182
+ GPU_STEP -> stepping
183
+ (emit GPU_ERROR { error: "a step is already running", kind: "invalid" })
184
+ GPU_SUBMITTED -> done when (and (not @config.readback) (not (= @entity.bufOut null)))
185
+ (emit GPU_STEPPED { buffer: @entity.bufOut })
186
+ GPU_SUBMITTED -> done when @config.readback
187
+ (let ((out (array/first @payload.reads))) (if (= @out null) (do (set @entity.errorText "the step's read answered no bytes") (set @entity.errorKind "io") (emit GPU_ERROR { error: "the step's read answered no bytes", kind: "io" })) (do (set @entity.resultBytes (bytes/length @out)) (emit GPU_RESULT { data: @out }))))
188
+ GPU_FAILED -> failed
189
+ (set @entity.errorText @payload.error)
190
+ (set @entity.errorKind @payload.kind)
191
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
192
+ }
193
+
194
+ state failed {
195
+ GPU_RUN -> failed
196
+ (emit GPU_ERROR { error: "the job failed; close it", kind: "invalid" })
197
+ GPU_STEP -> failed
198
+ (emit GPU_ERROR { error: "the job failed; close it", kind: "invalid" })
199
+ GPU_CLOSE -> releasing
200
+ (emit GPU_RELEASE_NEXT {})
201
+ }
202
+
203
+ state releasing {
204
+ INIT -> releasing
205
+ GPU_RELEASE_NEXT -> releasing when (not (= @entity.bindGroup null))
206
+ (gpu/release @entity.bindGroup { key: "gpu-release", emit: { success: GPU_RELEASED, failure: GPU_FAILED } })
207
+ (set @entity.bindGroup null)
208
+ GPU_RELEASE_NEXT -> releasing when (and (= @entity.bindGroup null) (not (= @entity.pipeline null)))
209
+ (gpu/release @entity.pipeline { key: "gpu-release", emit: { success: GPU_RELEASED, failure: GPU_FAILED } })
210
+ (set @entity.pipeline null)
211
+ GPU_RELEASE_NEXT -> releasing when (and (= @entity.bindGroup null) (= @entity.pipeline null) (not (= @entity.shader null)))
212
+ (gpu/release @entity.shader { key: "gpu-release", emit: { success: GPU_RELEASED, failure: GPU_FAILED } })
213
+ (set @entity.shader null)
214
+ GPU_RELEASE_NEXT -> releasing when (and (= @entity.bindGroup null) (= @entity.pipeline null) (= @entity.shader null) (not (= @entity.bufOut null)))
215
+ (gpu/release @entity.bufOut { key: "gpu-release", emit: { success: GPU_RELEASED, failure: GPU_FAILED } })
216
+ (set @entity.bufOut null)
217
+ GPU_RELEASE_NEXT -> releasing when (and (= @entity.bindGroup null) (= @entity.pipeline null) (= @entity.shader null) (= @entity.bufOut null) (not (= @entity.bufB null)))
218
+ (gpu/release @entity.bufB { key: "gpu-release", emit: { success: GPU_RELEASED, failure: GPU_FAILED } })
219
+ (set @entity.bufB null)
220
+ GPU_RELEASE_NEXT -> releasing when (and (= @entity.bindGroup null) (= @entity.pipeline null) (= @entity.shader null) (= @entity.bufOut null) (= @entity.bufB null) (not (= @entity.bufA null)))
221
+ (gpu/release @entity.bufA { key: "gpu-release", emit: { success: GPU_RELEASED, failure: GPU_FAILED } })
222
+ (set @entity.bufA null)
223
+ GPU_RELEASE_NEXT -> closing when (and (= @entity.bindGroup null) (= @entity.pipeline null) (= @entity.shader null) (= @entity.bufOut null) (= @entity.bufB null) (= @entity.bufA null) (not (= @entity.device null)))
224
+ (gpu/device-close @entity.device { key: "gpu-close", emit: { success: GPU_DEVICE_CLOSED, failure: GPU_FAILED } })
225
+ GPU_RELEASE_NEXT -> idle when (and (= @entity.bindGroup null) (= @entity.pipeline null) (= @entity.shader null) (= @entity.bufOut null) (= @entity.bufB null) (= @entity.bufA null) (= @entity.device null))
226
+ (emit GPU_CLOSED {})
227
+ GPU_RELEASED -> releasing
228
+ (emit GPU_RELEASE_NEXT {})
229
+ GPU_FAILED -> failed
230
+ (set @entity.errorText @payload.error)
231
+ (set @entity.errorKind @payload.kind)
232
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
233
+ }
234
+
235
+ state closing {
236
+ INIT -> closing
237
+ GPU_DEVICE_CLOSED -> idle
238
+ (set @entity.device null)
239
+ (emit GPU_CLOSED {})
240
+ GPU_FAILED -> failed
241
+ (set @entity.errorText @payload.error)
242
+ (set @entity.errorKind @payload.kind)
243
+ (emit GPU_ERROR { error: @payload.error, kind: @payload.kind })
244
+ }
245
+
246
+ emits {
247
+ GPU_OPENED -> external {}
248
+ @description "The device is open; the job accepts GPU_RUN."
249
+ GPU_RESULT -> external { data : bytes! }
250
+ @description "The output buffer's bytes after the dispatch (GPU_RUN) or after a step's dispatches (GPU_STEP), read back in the same job."
251
+ GPU_STEPPED -> external { buffer : GpuBuffer! }
252
+ @description "With readback off: the job or a step finished on the queue; buffer is the output buffer where it lies, for a drawable to draw without a readback (EXEC-GPU-7)."
253
+ GPU_CLOSED -> external {}
254
+ @description "Every handle was released and the device closed."
255
+ GPU_ERROR -> external { error : string! kind : string! }
256
+ @description "A gpu call failed or was refused; kind is the kernel's answer (denied, invalid, closed, lost)."
257
+ GPU_DEVICE { device : GpuDevice! }
258
+ @description "Internal: the device opened."
259
+ @tier "internal"
260
+ GPU_BUFFER { buffer : GpuBuffer! }
261
+ @description "Internal: a buffer was created."
262
+ @tier "internal"
263
+ GPU_SHADER { shader : GpuShader! }
264
+ @description "Internal: the shader module was created."
265
+ @tier "internal"
266
+ GPU_PIPELINE { pipeline : GpuPipeline! }
267
+ @description "Internal: the compute pipeline was created."
268
+ @tier "internal"
269
+ GPU_BINDGROUP { bindGroup : GpuBindGroup! }
270
+ @description "Internal: the bind group was created."
271
+ @tier "internal"
272
+ GPU_SUBMITTED { reads : [bytes]! }
273
+ @description "Internal: the job finished on the queue; reads holds the output buffer's bytes."
274
+ @tier "internal"
275
+ GPU_RELEASE_NEXT {}
276
+ @description "Internal: release the next live handle."
277
+ @tier "internal"
278
+ GPU_RELEASED {}
279
+ @description "Internal: a handle was released."
280
+ @tier "internal"
281
+ GPU_DEVICE_CLOSED {}
282
+ @description "Internal: the device closed."
283
+ @tier "internal"
284
+ GPU_FAILED { error : string! kind : string! }
285
+ @description "Internal: a gpu call failed."
286
+ @tier "internal"
287
+ }
288
+
289
+ listens {
290
+ GPU_OPEN {}
291
+ @description "Open the device."
292
+ GPU_RUN { a : bytes! b : bytes! }
293
+ @description "Add a and b on the device; both must be the same length."
294
+ GPU_STEP { params : [bytes]! }
295
+ @description "After GPU_RUN: one job that, for each params blob in order, writes it at offset 0 of input b and runs the dispatch, then reads the output back; the buffers keep their contents between steps."
296
+ GPU_CLOSE {}
297
+ @description "Release every handle and close the device."
298
+ GPU_DEVICE { device : GpuDevice! }
299
+ GPU_BUFFER { buffer : GpuBuffer! }
300
+ GPU_SHADER { shader : GpuShader! }
301
+ GPU_PIPELINE { pipeline : GpuPipeline! }
302
+ GPU_BINDGROUP { bindGroup : GpuBindGroup! }
303
+ GPU_SUBMITTED { reads : [bytes]! }
304
+ GPU_RELEASE_NEXT {}
305
+ GPU_RELEASED {}
306
+ GPU_DEVICE_CLOSED {}
307
+ GPU_FAILED { error : string! kind : string! }
308
+ }
309
+
310
+ config {
311
+ powerPreference : "low-power" | "high-performance" = "high-performance"
312
+ @description "Adapter preference passed to gpu/device-open: low-power or high-performance."
313
+ wgsl : string = "// vector add: out = a + b\n@group(0) @binding(0) var<storage, read> a : array<f32>;\n@group(0) @binding(1) var<storage, read> b : array<f32>;\n@group(0) @binding(2) var<storage, read_write> out : array<f32>;\n@compute @workgroup_size(64)\nfn main(@builtin(global_invocation_id) id : vec3<u32>) {\n if (id.x < arrayLength(&out)) {\n out[id.x] = a[id.x] + b[id.x];\n }\n}\n"
314
+ @description "WGSL source of the compute program; a string that starts with @ is read as a binding, so keep a leading comment."
315
+ entry : string = "main"
316
+ @description "Entry point of the compute program."
317
+ workgroups : [int] = [1, 1, 1]
318
+ @description "Workgroup counts x, y, z of the single dispatch."
319
+ inputUsage : ["map-read" | "map-write" | "copy-src" | "copy-dst" | "index" | "vertex" | "uniform" | "storage" | "indirect" | "query-resolve"] = ["storage", "copy-dst"]
320
+ @description "Usage of the two input buffers (buffer usage vocabulary: map-read map-write copy-src copy-dst index vertex uniform storage indirect query-resolve)."
321
+ readback : boolean = true
322
+ @description "Read the output buffer back after the job and each step (GPU_RESULT with its bytes); off, emit GPU_STEPPED with the buffer itself, for a canvas that draws it on the device (its outputUsage then needs vertex)."
323
+ outputUsage : ["map-read" | "map-write" | "copy-src" | "copy-dst" | "index" | "vertex" | "uniform" | "storage" | "indirect" | "query-resolve"] = ["storage", "copy-src"]
324
+ @description "Usage of the output buffer; it must include copy-src for the read in the job."
325
+ }
326
+ }
327
+
328
+ page boot as GpuComputeOrbitalStart -> GpuCompute
329
+ }
@@ -510,7 +510,7 @@ orbital HttpClientOrbital {
510
510
  (set @entity.sock @payload.sock)
511
511
  (os/send @payload.sock [{ bytes: @entity.head, credential: @config.credential, scope: "user", encode: "form" }, { bytes: @entity.request, credential: "" }] { key: "send" emit: { success: HC_SENT, failure: HC_IO_FAILED } })
512
512
  HC_IO_FAILED -> ready
513
- (emit HTTP_FAILED { key: @entity.key, error: @payload.error, kind: (if (array/includes ["denied", "timeout", "tls"] @payload.kind) @payload.kind "io") })
513
+ (emit HTTP_FAILED { key: @entity.key, error: @payload.error, kind: (if (array/includes ["denied", "unsupported", "timeout", "tls"] @payload.kind) @payload.kind "io") })
514
514
  }
515
515
 
516
516
  state sending {
@@ -586,7 +586,7 @@ orbital HttpClientOrbital {
586
586
  HC_IO_FAILED -> ready when (not @entity.reused)
587
587
  (os/close @entity.sock { key: "close" emit: { success: HC_CLOSED, failure: HC_CLOSED } })
588
588
  (set @entity.sock -1)
589
- (emit HTTP_FAILED { key: @entity.key, error: @payload.error, kind: (if (array/includes ["denied", "timeout", "tls"] @payload.kind) @payload.kind "io") })
589
+ (emit HTTP_FAILED { key: @entity.key, error: @payload.error, kind: (if (array/includes ["denied", "unsupported", "timeout", "tls"] @payload.kind) @payload.kind "io") })
590
590
  }
591
591
 
592
592
  state reading {
@@ -626,7 +626,7 @@ orbital HttpClientOrbital {
626
626
  HC_IO_FAILED -> ready when (not (and @entity.reused (= @entity.stage "head") (= (bytes/length @entity.buf) 0)))
627
627
  (os/close @entity.sock { key: "close" emit: { success: HC_CLOSED, failure: HC_CLOSED } })
628
628
  (set @entity.sock -1)
629
- (emit HTTP_FAILED { key: @entity.key, error: @payload.error, kind: (if (array/includes ["denied", "timeout", "tls"] @payload.kind) @payload.kind "io") })
629
+ (emit HTTP_FAILED { key: @entity.key, error: @payload.error, kind: (if (array/includes ["denied", "unsupported", "timeout", "tls"] @payload.kind) @payload.kind "io") })
630
630
 
631
631
  HC_READ -> reading
632
632
  (set @entity.buf (bytes/concat [@entity.buf, @payload.data]))
@@ -826,7 +826,7 @@ orbital HttpClientOrbital {
826
826
  error : string!
827
827
  kind : string!
828
828
  }
829
- @description "The call produced no response: kind refused (nothing opened), denied, timeout, tls or io."
829
+ @description "The call produced no response: kind refused (nothing opened), denied, unsupported (the host cannot open sockets), timeout, tls or io."
830
830
  @tier "primary"
831
831
  HC_BUILT -> internal {
832
832
  head : bytes!
@@ -96,7 +96,7 @@ orbital HttpFetchOrbital {
96
96
  HF_REPLIED -> ready
97
97
  (emit HTTP_REPLIED { key: @payload.key, status: @payload.status, headers: (default (object/fromEntries (array/map @payload.headers (fn h [(str/lower @h.name), (str/join (array/map (array/filter @payload.headers (fn g (= (str/lower @g.name) (str/lower @h.name)))) (fn g @g.value)) ", ")]))) {}), body: @payload.body })
98
98
  HF_FAILED -> ready
99
- (emit HTTP_FAILED { key: @payload.key, error: @payload.error, kind: (if (or (= @payload.kind "denied") (= @payload.kind "timeout")) @payload.kind "io") })
99
+ (emit HTTP_FAILED { key: @payload.key, error: @payload.error, kind: (if (array/includes ["denied", "unsupported", "timeout"] @payload.kind) @payload.kind "io") })
100
100
  HF_CLOSED -> ready
101
101
  }
102
102
 
@@ -107,7 +107,7 @@ orbital HttpFetchOrbital {
107
107
  HF_REPLIED -> opening
108
108
  (emit HTTP_REPLIED { key: @payload.key, status: @payload.status, headers: (default (object/fromEntries (array/map @payload.headers (fn h [(str/lower @h.name), (str/join (array/map (array/filter @payload.headers (fn g (= (str/lower @g.name) (str/lower @h.name)))) (fn g @g.value)) ", ")]))) {}), body: @payload.body })
109
109
  HF_FAILED -> opening
110
- (emit HTTP_FAILED { key: @payload.key, error: @payload.error, kind: (if (or (= @payload.kind "denied") (= @payload.kind "timeout")) @payload.kind "io") })
110
+ (emit HTTP_FAILED { key: @payload.key, error: @payload.error, kind: (if (array/includes ["denied", "unsupported", "timeout"] @payload.kind) @payload.kind "io") })
111
111
  HF_CLOSED -> opening
112
112
  HF_HEAD -> ready when (== @payload.handle null)
113
113
  (emit HTTP_FAILED { key: @entity.key, error: "the host answered a streamed fetch with no handle", kind: "io" })
@@ -117,7 +117,7 @@ orbital HttpFetchOrbital {
117
117
  (set @entity.headers (array/map @payload.headers (fn h { name: (str/lower @h.name), value: @h.value })))
118
118
  (os/recv @payload.handle @config.recvBytes { key: "read" emit: { success: HF_READ, failure: HF_IO_FAILED } })
119
119
  HF_HEAD_FAILED -> ready
120
- (emit HTTP_FAILED { key: @entity.key, error: @payload.error, kind: (if (or (= @payload.kind "denied") (= @payload.kind "timeout")) @payload.kind "io") })
120
+ (emit HTTP_FAILED { key: @entity.key, error: @payload.error, kind: (if (array/includes ["denied", "unsupported", "timeout"] @payload.kind) @payload.kind "io") })
121
121
  }
122
122
 
123
123
  state streaming {
@@ -127,12 +127,12 @@ orbital HttpFetchOrbital {
127
127
  HF_REPLIED -> streaming
128
128
  (emit HTTP_REPLIED { key: @payload.key, status: @payload.status, headers: (default (object/fromEntries (array/map @payload.headers (fn h [(str/lower @h.name), (str/join (array/map (array/filter @payload.headers (fn g (= (str/lower @g.name) (str/lower @h.name)))) (fn g @g.value)) ", ")]))) {}), body: @payload.body })
129
129
  HF_FAILED -> streaming
130
- (emit HTTP_FAILED { key: @payload.key, error: @payload.error, kind: (if (or (= @payload.kind "denied") (= @payload.kind "timeout")) @payload.kind "io") })
130
+ (emit HTTP_FAILED { key: @payload.key, error: @payload.error, kind: (if (array/includes ["denied", "unsupported", "timeout"] @payload.kind) @payload.kind "io") })
131
131
  HF_CLOSED -> streaming
132
132
  HF_IO_FAILED -> ready
133
133
  (os/close @entity.handle { key: "close" emit: { success: HF_CLOSED, failure: HF_CLOSED } })
134
134
  (set @entity.handle -1)
135
- (emit HTTP_FAILED { key: @entity.key, error: @payload.error, kind: (if (or (= @payload.kind "denied") (= @payload.kind "timeout")) @payload.kind "io") })
135
+ (emit HTTP_FAILED { key: @entity.key, error: @payload.error, kind: (if (array/includes ["denied", "unsupported", "timeout"] @payload.kind) @payload.kind "io") })
136
136
 
137
137
  HF_READ -> streaming
138
138
  (set @entity.dec (bytes/concat [@entity.dec, @payload.data]))
@@ -190,7 +190,7 @@ orbital HttpFetchOrbital {
190
190
  error : string!
191
191
  kind : string!
192
192
  }
193
- @description "The call produced no response: kind refused (nothing sent), denied, timeout, encoding (a stream frame is not UTF-8) or io."
193
+ @description "The call produced no response: kind refused (nothing sent), denied, unsupported (the host cannot fetch), timeout, encoding (a stream frame is not UTF-8) or io."
194
194
  @tier "primary"
195
195
  HF_HEAD {
196
196
  key : string
@@ -85,7 +85,7 @@ orbital NpmLookupOrbital {
85
85
  NPM_LOOKUP_PACKUMENT -> idle when (!= @payload.status 200)
86
86
  (emit NPM_LOOKUP_REFUSED { requestId: @entity.requestId, name: @entity.name, code: (if (or (= @payload.status 401) (= @payload.status 403)) "auth" (if (= @payload.status 404) "absent" (if (>= @payload.status 500) "unreachable" "unexpected"))), status: @payload.status, error: (str/concat "the registry answered " @payload.status " for " @entity.name) })
87
87
  NPM_LOOKUP_UNREACHABLE -> idle
88
- (emit NPM_LOOKUP_REFUSED { requestId: @entity.requestId, name: @entity.name, code: (if (= @payload.kind "denied") "unconfigured" "unreachable"), status: 0, error: @payload.error })
88
+ (emit NPM_LOOKUP_REFUSED { requestId: @entity.requestId, name: @entity.name, code: (if (array/includes ["denied", "unsupported"] @payload.kind) "unconfigured" "unreachable"), status: 0, error: @payload.error })
89
89
  }
90
90
 
91
91
  emits {
@@ -206,10 +206,10 @@ orbital NpmRegistryOrbital {
206
206
  (emit NPM_FAILED { name: @entity.name, code: "auth", status: @payload.status, error: (str/concat "the registry refused the token (" @payload.status ") for the tarball of " @entity.name (quote "@") @entity.version) })
207
207
  NPM_WAIT_TARBALL_REPLIED -> waiting when (not (or (= @payload.status 200) (= @payload.status 206) (= @payload.status 401) (= @payload.status 403)))
208
208
  (emit NPM_WAIT_RETRY_FAILED { key: (as (str/concat "npm-wait:" (+ @entity.seq 1)) CallKey), error: (str/concat "version listed but its tarball is not downloadable yet (" @payload.status ")") })
209
- NPM_WAIT_UNREACHABLE -> idle when (= @payload.kind "denied")
209
+ NPM_WAIT_UNREACHABLE -> idle when (array/includes ["denied", "unsupported"] @payload.kind)
210
210
  (emit NPM_WAIT_RETRY_CANCEL { })
211
211
  (emit NPM_FAILED { name: @entity.name, code: "unconfigured", status: 0, error: @payload.error })
212
- NPM_WAIT_UNREACHABLE -> waiting when (!= @payload.kind "denied")
212
+ NPM_WAIT_UNREACHABLE -> waiting when (not (array/includes ["denied", "unsupported"] @payload.kind))
213
213
  (emit NPM_WAIT_RETRY_FAILED { key: (as (str/concat "npm-wait:" (+ @entity.seq 1)) CallKey), error: @payload.error })
214
214
 
215
215
  NPM_WAIT_DONE -> idle