@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.
- package/behaviors/lolo/auth/atoms/std-dev-personas.lolo +27 -2
- package/behaviors/lolo/cli/atoms/std-orb-goldens.lolo +6 -3
- package/behaviors/lolo/cli/atoms/std-orb-lint-mem-handles.lolo +54 -34
- package/behaviors/lolo/cli/atoms/std-orb-lint-os-grants.lolo +4 -4
- package/behaviors/lolo/cli/atoms/std-orb-mcp.lolo +16 -21
- package/behaviors/lolo/cli/atoms/std-orb-packages.lolo +26 -16
- package/behaviors/lolo/cli/atoms/std-orb-serve.lolo +24 -4
- package/behaviors/lolo/codec/atoms/std-lolo-kotlin.lolo +26 -3
- package/behaviors/lolo/codec/atoms/std-lolo-python.lolo +15 -2
- package/behaviors/lolo/codec/atoms/std-lolo-rust.lolo +27 -2
- package/behaviors/lolo/codec/atoms/std-lolo-source.lolo +251 -60
- package/behaviors/lolo/codec/atoms/std-lolo-swift.lolo +24 -1
- package/behaviors/lolo/codec/atoms/std-lolo-typescript.lolo +24 -3
- package/behaviors/lolo/connect/atoms/std-meta-ads.lolo +4 -4
- package/behaviors/lolo/connect/atoms/std-stdio-lines.lolo +7 -4
- package/behaviors/lolo/connect/atoms/std-youtube.lolo +9 -9
- package/behaviors/lolo/dev/atoms/std-guest-session.lolo +122 -10
- package/behaviors/lolo/dev/atoms/std-mock-seed-marks.lolo +66 -0
- package/behaviors/lolo/dev/organisms/std-behavior-playground.lolo +5 -2
- package/behaviors/lolo/dev/organisms/std-launchpad.lolo +4 -3
- package/behaviors/lolo/gpu/atoms/std-gpu-compute.lolo +329 -0
- package/behaviors/lolo/net/atoms/std-http-client.lolo +4 -4
- package/behaviors/lolo/net/atoms/std-http-fetch.lolo +6 -6
- package/behaviors/lolo/net/atoms/std-npm-lookup.lolo +1 -1
- package/behaviors/lolo/net/atoms/std-npm-registry.lolo +2 -2
- package/behaviors/lolo/spec/auth/dev-personas.replay.goldens.json +263 -2
- package/behaviors/lolo/spec/cli/lint-all.lolo +1 -0
- package/behaviors/lolo/spec/cli/lint-item-action-event.replay.goldens.json +9 -9
- package/behaviors/lolo/spec/cli/lint-mem-handles.replay.goldens.json +3021 -1
- package/behaviors/lolo/spec/cli/lint-os-grants.replay.goldens.json +284 -12
- package/behaviors/lolo/spec/cli/mcp-server.replay.goldens.json +51 -55
- package/behaviors/lolo/spec/cli/orb-compile.replay.goldens.json +10 -4
- package/behaviors/lolo/spec/cli/orb-packages.lolo +1 -1
- package/behaviors/lolo/spec/codec/lolo-kotlin.replay.goldens.json +7496 -7497
- package/behaviors/lolo/spec/codec/lolo-python.replay.goldens.json +341 -3
- package/behaviors/lolo/spec/codec/lolo-rust.replay.goldens.json +18931 -6142
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/compose-pair.lolo +44 -0
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/config-read.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/divide-default.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/divide-plain.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/get-past-end.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/list-call.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/list-plain.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/minus-binary.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/minus-unary.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/nested-let.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/no-machine.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/no-template.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/nth-past-end.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/nth-raw.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/ports-call.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/range-one.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/range-two.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/router-trio.lolo +88 -0
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/store-pair.lolo +62 -0
- package/behaviors/lolo/spec/codec/lolo-source.fixtures/string-literal.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.gen/knobs.py +27 -1
- package/behaviors/lolo/spec/codec/lolo-source.gen/src_assemble.in +54 -2
- package/behaviors/lolo/spec/codec/lolo-source.gen/src_finish.in +1 -1
- package/behaviors/lolo/spec/codec/lolo-source.gen/src_fold.in +24 -4
- package/behaviors/lolo/spec/codec/lolo-source.gen/src_head.in +8 -3
- package/behaviors/lolo/spec/codec/lolo-source.gen/src_prepare.in +6 -2
- package/behaviors/lolo/spec/codec/lolo-source.gen/src_trait.in +12 -2
- package/behaviors/lolo/spec/codec/lolo-source.parity/agent-step.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.parity/agent-step.server.lolo +1 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/chunk.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.parity/chunk.server.lolo +1 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/compose-pair.events.json +36 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/compose-pair.replay.goldens.json +91 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/cosine.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.parity/cosine.server.lolo +1 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/kotlin/compose-pair.kt +31 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/kotlin/router-trio.kt +31 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/kotlin/store-pair.kt +31 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/python/compose-pair.py +18 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/python/router-trio.py +18 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/python/store-pair.py +17 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/rust/compose-pair.rs +37 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/rust/router-trio.rs +37 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/rust/store-pair.rs +36 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/swift/compose-pair.swift +24 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/swift/router-trio.swift +24 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/swift/store-pair.swift +23 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/typescript/compose-pair.mts +24 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/typescript/router-trio.mts +24 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/typescript/store-pair.mts +22 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/recall-at-k.lolo +2 -1
- package/behaviors/lolo/spec/codec/lolo-source.parity/recall-at-k.server.lolo +1 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/router-trio.events.json +18 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/router-trio.replay.goldens.json +87 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/store-pair.events.json +58 -0
- package/behaviors/lolo/spec/codec/lolo-source.parity/store-pair.replay.goldens.json +238 -0
- package/behaviors/lolo/spec/codec/lolo-swift.replay.goldens.json +15599 -2204
- package/behaviors/lolo/spec/codec/lolo-typescript.replay.goldens.json +28930 -28929
- package/behaviors/lolo/spec/connect/bearer-api.replay.goldens.json +1 -1
- package/behaviors/lolo/spec/connect/esign.replay.goldens.json +3 -3
- package/behaviors/lolo/spec/connect/github.replay.goldens.json +13 -13
- package/behaviors/lolo/spec/connect/google-calendar.replay.goldens.json +2 -2
- package/behaviors/lolo/spec/connect/image.replay.goldens.json +1 -1
- package/behaviors/lolo/spec/connect/meta-ads.replay.goldens.json +2 -2
- package/behaviors/lolo/spec/connect/stdio-lines.replay.goldens.json +90 -0
- package/behaviors/lolo/spec/connect/twilio.replay.goldens.json +2 -2
- package/behaviors/lolo/spec/connect/youtube.replay.goldens.json +1 -1
- package/behaviors/lolo/spec/dev/guest-session.replay.goldens.json +824 -0
- package/behaviors/lolo/spec/dev/mock-seed-marks.replay.goldens.json +365 -0
- package/behaviors/lolo/spec/dev/verify-walk.replay.goldens.json +2 -1
- package/behaviors/lolo/spec/gpu/gpu-compute.replay.goldens.json +784 -0
- package/behaviors/lolo/spec/mem/mem-buffer.replay.goldens.json +97 -1
- package/behaviors/lolo/spec/ml/vector-write.goldens.json +1 -1
- package/behaviors/lolo/spec/ml/vector-write.replay.goldens.json +2 -2
- package/behaviors/lolo/spec/net/http-client-call-host.replay.goldens.json +3 -3
- package/behaviors/lolo/spec/net/http-client-env-host.replay.goldens.json +3 -3
- package/behaviors/lolo/spec/net/http-client.replay.goldens.json +56 -56
- package/behaviors/lolo/spec/net/http-fetch.replay.goldens.json +2 -2
- package/behaviors/lolo/spec/net/npm-lookup.replay.goldens.json +1 -1
- package/behaviors/lolo/spec/net/npm-registry.replay.goldens.json +2 -2
- package/behaviors/lolo/spec/net/server-declared-traits.replay.goldens.json +6 -3
- package/behaviors/lolo/spec/net/server-external-inputs.replay.goldens.json +16 -8
- package/behaviors/lolo/spec/net/server-retargeted-leg.replay.goldens.json +4 -2
- package/behaviors/lolo/spec/net/server-untargeted-discovery.replay.goldens.json +50 -45
- package/behaviors/lolo/spec/ops/llm-spend-board.replay.goldens.json +112 -16
- package/behaviors/lolo/spec/store/firestore-twin.replay.goldens.json +1 -1
- package/behaviors/lolo/spec/store/row-store-postgres.gen/record_real_sql.py +1 -1
- package/behaviors/lolo/spec/ui/game/fx-particles.replay.goldens.json +37 -0
- package/behaviors/lolo/ui/avl/atoms/std-avl-cosmic-zoom.lolo +2 -2
- package/behaviors/lolo/ui/game/atoms/std-fx-particles.lolo +10 -1
- package/behaviors/lolo/ui/game/atoms/ui-draw-fx-layer.lolo +4 -4
- package/behaviors/lolo/ui/game/organisms/std-arcade-board-3d.lolo +9 -9
- package/behaviors/lolo/ui/game/organisms/std-crew-board-2d.lolo +4 -4
- package/behaviors/lolo/ui/game/organisms/std-dungeon-board-2d.lolo +5 -5
- package/behaviors/lolo/ui/game/organisms/std-market-board-3d.lolo +9 -9
- package/behaviors/lolo/ui/game/organisms/std-objective-board-3d.lolo +9 -9
- package/behaviors/lolo/ui/game/organisms/std-platformer-board-2d.lolo +5 -5
- package/behaviors/lolo/ui/game/organisms/std-platformer-puzzle.lolo +4 -4
- package/behaviors/lolo/ui/game/organisms/std-survival-board-3d.lolo +9 -9
- package/behaviors/lolo/ui/game/organisms/std-tactics-board-2d.lolo +5 -5
- package/behaviors/lolo/ui/game/organisms/std-tactics-board-3d.lolo +9 -9
- package/behaviors/registry/auth/atoms/std-dev-personas.orb +1 -1
- package/behaviors/registry/cli/atoms/std-orb-goldens.orb +1 -1
- package/behaviors/registry/cli/atoms/std-orb-lint-mem-handles.orb +1 -1
- package/behaviors/registry/cli/atoms/std-orb-lint-os-grants.orb +1 -1
- package/behaviors/registry/cli/atoms/std-orb-mcp.orb +1 -1
- package/behaviors/registry/cli/atoms/std-orb-packages.orb +1 -1
- package/behaviors/registry/cli/atoms/std-orb-serve.orb +1 -1
- package/behaviors/registry/codec/atoms/std-lolo-kotlin.orb +1 -1
- package/behaviors/registry/codec/atoms/std-lolo-python.orb +1 -1
- package/behaviors/registry/codec/atoms/std-lolo-rust.orb +1 -1
- package/behaviors/registry/codec/atoms/std-lolo-source.orb +1 -1
- package/behaviors/registry/codec/atoms/std-lolo-swift.orb +1 -1
- package/behaviors/registry/codec/atoms/std-lolo-typescript.orb +1 -1
- package/behaviors/registry/connect/atoms/std-meta-ads.orb +1 -1
- package/behaviors/registry/connect/atoms/std-stdio-lines.orb +1 -1
- package/behaviors/registry/connect/atoms/std-youtube.orb +1 -1
- package/behaviors/registry/dev/atoms/std-guest-session.orb +1 -1
- package/behaviors/registry/dev/atoms/std-mock-seed-marks.orb +1 -0
- package/behaviors/registry/dev/organisms/std-behavior-playground.orb +37 -0
- package/behaviors/registry/dev/organisms/std-launchpad.orb +25 -0
- package/behaviors/registry/gpu/atoms/std-gpu-compute.orb +1 -0
- package/behaviors/registry/net/atoms/std-http-client.orb +1 -1
- package/behaviors/registry/net/atoms/std-http-fetch.orb +1 -1
- package/behaviors/registry/net/atoms/std-npm-lookup.orb +1 -1
- package/behaviors/registry/net/atoms/std-npm-registry.orb +1 -1
- package/behaviors/registry/spec/cli/lint-all.orb +1 -1
- package/behaviors/registry/spec/cli/orb-packages.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/compose-pair.orb +1 -0
- package/behaviors/registry/spec/codec/lolo-source.fixtures/config-read.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/divide-default.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/divide-plain.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/get-past-end.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/list-call.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/list-plain.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/minus-binary.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/minus-unary.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/nested-let.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/no-machine.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/no-template.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/nth-past-end.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/nth-raw.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/ports-call.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/range-one.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/range-two.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.fixtures/router-trio.orb +1 -0
- package/behaviors/registry/spec/codec/lolo-source.fixtures/store-pair.orb +1 -0
- package/behaviors/registry/spec/codec/lolo-source.fixtures/string-literal.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.parity/agent-step.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.parity/agent-step.server.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.parity/chunk.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.parity/chunk.server.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.parity/cosine.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.parity/cosine.server.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.parity/recall-at-k.orb +1 -1
- package/behaviors/registry/spec/codec/lolo-source.parity/recall-at-k.server.orb +1 -1
- package/behaviors/registry/ui/avl/atoms/std-avl-cosmic-zoom.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-fx-particles.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-fx-layer.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +20 -13
- package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +9 -5
- package/behaviors/registry/ui/game/organisms/std-dungeon-board-2d.orb +17 -7
- package/behaviors/registry/ui/game/organisms/std-market-board-3d.orb +19 -15
- package/behaviors/registry/ui/game/organisms/std-objective-board-3d.orb +15 -12
- package/behaviors/registry/ui/game/organisms/std-platformer-board-2d.orb +17 -7
- package/behaviors/registry/ui/game/organisms/std-platformer-puzzle.orb +4 -0
- package/behaviors/registry/ui/game/organisms/std-survival-board-3d.orb +15 -12
- package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +13 -6
- package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +14 -12
- package/canonical-operators.json +1426 -103
- package/dist/{chunk-EK22WRB6.js → chunk-2UGHBVU2.js} +2 -2
- package/dist/{chunk-GDMH5T4J.js → chunk-3DK7GI2C.js} +2 -2
- package/dist/chunk-3MDASC5C.js +26 -0
- package/dist/{chunk-K5ZI27PB.js → chunk-3PHO4RRF.js} +1 -1
- package/dist/{chunk-7IEMMYM6.js → chunk-4MJCLAZW.js} +1 -1
- package/dist/{chunk-W4IEV4BY.js → chunk-55JPIL7A.js} +2 -2
- package/dist/{chunk-RUGBZTV3.js → chunk-66BLZLFI.js} +1 -1
- package/dist/{chunk-YWFISV7L.js → chunk-66RAJFOD.js} +1 -1
- package/dist/{chunk-JWOWWGNZ.js → chunk-6ED4SUC6.js} +1 -1
- package/dist/{chunk-LL7P6EII.js → chunk-6KFCHNE2.js} +2 -2
- package/dist/{chunk-GFBL2TW6.js → chunk-A4QB3Y6L.js} +1 -1
- package/dist/chunk-BVWMLS32.js +123 -0
- package/dist/{chunk-5KQCGSNC.js → chunk-CRKVDCY7.js} +1 -1
- package/dist/{chunk-WHQDLLC3.js → chunk-EKWEY4OJ.js} +1 -1
- package/dist/{chunk-Y3BRVNYK.js → chunk-EU22GCGV.js} +2 -2
- package/dist/{chunk-XQPYTDZ4.js → chunk-FB6PKNRS.js} +1 -1
- package/dist/{chunk-UX3MDFX6.js → chunk-FSVOJQLP.js} +1 -1
- package/dist/{chunk-LDBD2FBQ.js → chunk-GAKLBWBR.js} +1 -1
- package/dist/{chunk-C3IEMPRZ.js → chunk-GO3FKBV2.js} +2 -2
- package/dist/{chunk-LZSPEHSM.js → chunk-GPDTJHYY.js} +1 -1
- package/dist/{chunk-W5ABMOXU.js → chunk-JQBWLH5V.js} +1 -1
- package/dist/{chunk-63X6RNY6.js → chunk-KKW3JHTC.js} +1 -1
- package/dist/{chunk-5PLJE42Q.js → chunk-LF2EZVAM.js} +1 -1
- package/dist/{chunk-RXWBYWQB.js → chunk-LGCKOZP3.js} +2 -2
- package/dist/{chunk-JJEADYP7.js → chunk-LMZ6XJFB.js} +2 -2
- package/dist/{chunk-CWYSQZJU.js → chunk-M2YQNSAZ.js} +2 -2
- package/dist/{chunk-GNCKJV3P.js → chunk-MKWHYBIS.js} +1 -1
- package/dist/{chunk-ZB2CLGEG.js → chunk-MXBGYTYF.js} +1 -1
- package/dist/{chunk-UN76TRSK.js → chunk-NH6MXHZR.js} +41 -41
- package/dist/{chunk-II2VW7T6.js → chunk-ODBIX4DB.js} +1 -1
- package/dist/{chunk-3F3CNWOG.js → chunk-OYDQR6DT.js} +2 -2
- package/dist/{chunk-FVL6BT6L.js → chunk-PD6POR44.js} +1 -1
- package/dist/{chunk-U6USXZ5M.js → chunk-PHFT3QNS.js} +2 -2
- package/dist/{chunk-RJYKIZMS.js → chunk-PQZ6PVKG.js} +2 -2
- package/dist/{chunk-TQPQXCSZ.js → chunk-Q6NHXIOZ.js} +2 -2
- package/dist/{chunk-KYGWVCTM.js → chunk-QMDVYTB7.js} +1 -1
- package/dist/{chunk-XKTATY45.js → chunk-RW2KMSG5.js} +4 -4
- package/dist/{chunk-UHNSPTFT.js → chunk-SA2ZS24W.js} +1 -1
- package/dist/{chunk-6YPUQK36.js → chunk-SFWP4UMK.js} +2 -2
- package/dist/{chunk-ZZYLFHBU.js → chunk-TLNEQA4D.js} +1 -1
- package/dist/{chunk-RGTBRWWA.js → chunk-TOODE5AD.js} +2 -2
- package/dist/{chunk-QGWAHOFR.js → chunk-U57GY7SM.js} +2 -2
- package/dist/{chunk-FDJZKB7J.js → chunk-UIDQQJSX.js} +1 -1
- package/dist/{chunk-LLH3WXM3.js → chunk-UVFP2B7I.js} +1 -1
- package/dist/{chunk-4OF7727E.js → chunk-VEGZPCTZ.js} +2 -2
- package/dist/{chunk-73YUPNIT.js → chunk-VXN4V7LC.js} +1 -1
- package/dist/{chunk-4D3W6AAE.js → chunk-YHQVZWPG.js} +1 -1
- package/dist/{chunk-XXYBHYLM.js → chunk-YQO3TO66.js} +2 -2
- package/dist/{chunk-YZAYFR5A.js → chunk-ZSJ3GEOJ.js} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +50 -50
- package/dist/modules/anim.js +2 -2
- package/dist/modules/array.js +2 -2
- package/dist/modules/auth.js +3 -3
- package/dist/modules/behavior.js +2 -2
- package/dist/modules/bit.js +2 -2
- package/dist/modules/browser.js +2 -2
- package/dist/modules/bytes.js +2 -2
- package/dist/modules/codec.js +3 -3
- package/dist/modules/composition.js +2 -2
- package/dist/modules/core.js +2 -2
- package/dist/modules/csv.js +2 -2
- package/dist/modules/ffi.js +3 -3
- package/dist/modules/format.js +2 -2
- package/dist/modules/geo.js +2 -2
- package/dist/modules/gpu.d.ts +12 -0
- package/dist/modules/gpu.js +3 -0
- package/dist/modules/grid.js +2 -2
- package/dist/modules/i18n.js +2 -2
- package/dist/modules/index.d.ts +1 -2
- package/dist/modules/index.js +45 -46
- package/dist/modules/json.js +2 -2
- package/dist/modules/kernel.js +3 -3
- package/dist/modules/kv.js +3 -3
- package/dist/modules/llm.js +2 -2
- package/dist/modules/math.js +2 -2
- package/dist/modules/mem.js +3 -3
- package/dist/modules/object.js +2 -2
- package/dist/modules/os-common.d.ts +1 -1
- package/dist/modules/os-common.js +2 -2
- package/dist/modules/os-desktop.js +3 -3
- package/dist/modules/os-dev.js +3 -3
- package/dist/modules/os-dir.js +3 -3
- package/dist/modules/os-env-stdio.js +3 -3
- package/dist/modules/os-fs.js +3 -3
- package/dist/modules/os-net.js +3 -3
- package/dist/modules/os-path.js +3 -3
- package/dist/modules/os-process.js +3 -3
- package/dist/modules/os-sys.js +3 -3
- package/dist/modules/os-time-users.js +3 -3
- package/dist/modules/os.js +13 -13
- package/dist/modules/path.js +2 -2
- package/dist/modules/prob.js +2 -2
- package/dist/modules/program.js +2 -2
- package/dist/modules/session.js +2 -2
- package/dist/modules/str.js +2 -2
- package/dist/modules/time.js +2 -2
- package/dist/modules/validate.js +2 -2
- package/dist/modules/vector.js +2 -2
- package/dist/modules/workspace.js +2 -2
- package/dist/modules/xml.js +2 -2
- package/dist/modules/yaml.js +2 -2
- package/dist/registry.d.ts +2 -2
- package/dist/registry.js +49 -49
- package/dist/{types-BA4LkhNJ.d.ts → types-CgiGhK6t.d.ts} +17 -3
- package/package.json +5 -5
- package/dist/chunk-F5TP25JA.js +0 -26
- package/dist/chunk-NE4WSTN7.js +0 -26
- package/dist/modules/trace.d.ts +0 -15
- package/dist/modules/trace.js +0 -2
- /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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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
|