@air-jam/sdk 0.9.2 → 1.0.0-beta.1
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/README.md +185 -242
- package/dist/actions-D4eh6Xaa.d.cts +72 -0
- package/dist/actions-D4eh6Xaa.d.ts +72 -0
- package/dist/{agent-tooling-BSMGBix9.d.cts → agent-contract-DfLm4Mf-.d.ts} +3 -19
- package/dist/{agent-tooling-BSMGBix9.d.ts → agent-contract-TINzp-5Y.d.cts} +3 -19
- package/dist/agent-tooling.cjs +270 -42
- package/dist/agent-tooling.cjs.map +1 -1
- package/dist/agent-tooling.d.cts +117 -2
- package/dist/agent-tooling.d.ts +117 -2
- package/dist/agent-tooling.js +150 -11
- package/dist/agent-tooling.js.map +1 -1
- package/dist/air-jam-context-BCVCWiaT.d.ts +410 -0
- package/dist/air-jam-context-DavligpM.d.cts +410 -0
- package/dist/arcade/bridge/controller.cjs +872 -582
- package/dist/arcade/bridge/controller.cjs.map +1 -1
- package/dist/arcade/bridge/controller.d.cts +28 -76
- package/dist/arcade/bridge/controller.d.ts +28 -76
- package/dist/arcade/bridge/controller.js +27 -26
- package/dist/arcade/bridge/controller.js.map +1 -1
- package/dist/arcade/bridge/host.cjs +1017 -252
- package/dist/arcade/bridge/host.cjs.map +1 -1
- package/dist/arcade/bridge/host.d.cts +6 -72
- package/dist/arcade/bridge/host.d.ts +6 -72
- package/dist/arcade/bridge/host.js +19 -21
- package/dist/arcade/bridge/host.js.map +1 -1
- package/dist/arcade/bridge/iframe.cjs +3 -31
- package/dist/arcade/bridge/iframe.cjs.map +1 -1
- package/dist/arcade/bridge/iframe.d.cts +4 -46
- package/dist/arcade/bridge/iframe.d.ts +4 -46
- package/dist/arcade/bridge/iframe.js +6 -18
- package/dist/arcade/bridge/iframe.js.map +1 -1
- package/dist/arcade/host.cjs +0 -479
- package/dist/arcade/host.cjs.map +1 -1
- package/dist/arcade/host.d.cts +1 -18
- package/dist/arcade/host.d.ts +1 -18
- package/dist/arcade/host.js +0 -13
- package/dist/arcade/host.js.map +1 -1
- package/dist/arcade/runtime.cjs +12163 -0
- package/dist/arcade/runtime.cjs.map +1 -0
- package/dist/arcade/runtime.d.cts +54 -0
- package/dist/arcade/runtime.d.ts +54 -0
- package/dist/arcade/runtime.js +45 -0
- package/dist/arcade/runtime.js.map +1 -0
- package/dist/arcade/surface.cjs +12 -35
- package/dist/arcade/surface.cjs.map +1 -1
- package/dist/arcade/surface.d.cts +19 -2
- package/dist/arcade/surface.d.ts +19 -2
- package/dist/arcade/surface.js +12 -14
- package/dist/arcade/surface.js.map +1 -1
- package/dist/arcade/url.cjs +45 -283
- package/dist/arcade/url.cjs.map +1 -1
- package/dist/arcade/url.d.cts +3 -56
- package/dist/arcade/url.d.ts +3 -56
- package/dist/arcade/url.js +33 -16
- package/dist/arcade/url.js.map +1 -1
- package/dist/chunk-24NZZOIO.js +700 -0
- package/dist/chunk-24NZZOIO.js.map +1 -0
- package/dist/chunk-27QLKLZL.js +469 -0
- package/dist/chunk-27QLKLZL.js.map +1 -0
- package/dist/{chunk-UWJOIVON.js → chunk-2H2FGF3H.js} +3 -6
- package/dist/chunk-2H2FGF3H.js.map +1 -0
- package/dist/chunk-2QZADUGA.js +188 -0
- package/dist/chunk-2QZADUGA.js.map +1 -0
- package/dist/chunk-3LDQCQL2.js +307 -0
- package/dist/chunk-3LDQCQL2.js.map +1 -0
- package/dist/chunk-3M7656SU.js +389 -0
- package/dist/chunk-3M7656SU.js.map +1 -0
- package/dist/{chunk-ZLPL2R3R.js → chunk-5CRZFIN6.js} +2 -82
- package/dist/chunk-5CRZFIN6.js.map +1 -0
- package/dist/chunk-5TVVPBQI.js +7 -0
- package/dist/chunk-5TVVPBQI.js.map +1 -0
- package/dist/chunk-6Y3F6Y2K.js +343 -0
- package/dist/chunk-6Y3F6Y2K.js.map +1 -0
- package/dist/{chunk-EVZJA6RN.js → chunk-6ZJUA63D.js} +183 -2
- package/dist/chunk-6ZJUA63D.js.map +1 -0
- package/dist/chunk-A6EOGRRG.js +49 -0
- package/dist/chunk-A6EOGRRG.js.map +1 -0
- package/dist/chunk-BEM77SVQ.js +57 -0
- package/dist/chunk-BEM77SVQ.js.map +1 -0
- package/dist/chunk-C5722GTG.js +176 -0
- package/dist/chunk-C5722GTG.js.map +1 -0
- package/dist/{chunk-DY67S3LR.js → chunk-C5GS2GMK.js} +99 -105
- package/dist/chunk-C5GS2GMK.js.map +1 -0
- package/dist/chunk-CDL7LYZH.js +19 -0
- package/dist/chunk-CDL7LYZH.js.map +1 -0
- package/dist/chunk-DA3TE4OP.js +16 -0
- package/dist/chunk-DA3TE4OP.js.map +1 -0
- package/dist/chunk-DBF7NJ3S.js +72 -0
- package/dist/chunk-DBF7NJ3S.js.map +1 -0
- package/dist/chunk-DHFKL3DI.js +2477 -0
- package/dist/chunk-DHFKL3DI.js.map +1 -0
- package/dist/chunk-DRBPVG47.js +89 -0
- package/dist/chunk-DRBPVG47.js.map +1 -0
- package/dist/{chunk-7OTQTT6H.js → chunk-EG25EXSA.js} +24 -3
- package/dist/chunk-EG25EXSA.js.map +1 -0
- package/dist/chunk-FCG42U7D.js +131 -0
- package/dist/chunk-FCG42U7D.js.map +1 -0
- package/dist/chunk-FJ4J2BEC.js +26 -0
- package/dist/chunk-FJ4J2BEC.js.map +1 -0
- package/dist/chunk-H4DEVMTO.js +221 -0
- package/dist/chunk-H4DEVMTO.js.map +1 -0
- package/dist/chunk-I6TSHJF7.js +63 -0
- package/dist/chunk-I6TSHJF7.js.map +1 -0
- package/dist/{chunk-NCL6WJCL.js → chunk-JCGTL77W.js} +32 -1
- package/dist/chunk-JCGTL77W.js.map +1 -0
- package/dist/chunk-JJVCBUYM.js +98 -0
- package/dist/chunk-JJVCBUYM.js.map +1 -0
- package/dist/chunk-K6BJJJJM.js +138 -0
- package/dist/chunk-K6BJJJJM.js.map +1 -0
- package/dist/chunk-KSYN4I5Y.js +50 -0
- package/dist/chunk-KSYN4I5Y.js.map +1 -0
- package/dist/chunk-KUGROY5S.js +265 -0
- package/dist/chunk-KUGROY5S.js.map +1 -0
- package/dist/chunk-LX6CTPDW.js +16 -0
- package/dist/chunk-LX6CTPDW.js.map +1 -0
- package/dist/{chunk-BE6Z4SIT.js → chunk-M5553I2G.js} +2 -11
- package/dist/chunk-M5553I2G.js.map +1 -0
- package/dist/{chunk-X24K52DG.js → chunk-MD25536W.js} +1 -1
- package/dist/chunk-MD25536W.js.map +1 -0
- package/dist/{chunk-3USU7GY2.js → chunk-MJAWAHLT.js} +1 -1
- package/dist/chunk-MJAWAHLT.js.map +1 -0
- package/dist/chunk-OAXCFPZ7.js +14 -0
- package/dist/chunk-OAXCFPZ7.js.map +1 -0
- package/dist/chunk-QHBRHYMV.js +81 -0
- package/dist/chunk-QHBRHYMV.js.map +1 -0
- package/dist/chunk-QTNYGAZ7.js +45 -0
- package/dist/chunk-QTNYGAZ7.js.map +1 -0
- package/dist/chunk-S3TN7Y7L.js +921 -0
- package/dist/chunk-S3TN7Y7L.js.map +1 -0
- package/dist/chunk-SMKD4JY3.js +129 -0
- package/dist/chunk-SMKD4JY3.js.map +1 -0
- package/dist/{chunk-NUJBMV3O.js → chunk-TFW4NJW2.js} +619 -646
- package/dist/chunk-TFW4NJW2.js.map +1 -0
- package/dist/chunk-UBBP2UY3.js +83 -0
- package/dist/chunk-UBBP2UY3.js.map +1 -0
- package/dist/chunk-URVBMQCK.js +802 -0
- package/dist/chunk-URVBMQCK.js.map +1 -0
- package/dist/chunk-VGX2274F.js +1995 -0
- package/dist/chunk-VGX2274F.js.map +1 -0
- package/dist/chunk-WAFGYJZN.js +1513 -0
- package/dist/chunk-WAFGYJZN.js.map +1 -0
- package/dist/chunk-WGHNGQUS.js +78 -0
- package/dist/chunk-WGHNGQUS.js.map +1 -0
- package/dist/chunk-XLY44PXZ.js +46 -0
- package/dist/chunk-XLY44PXZ.js.map +1 -0
- package/dist/connection-store-BYpQ50W2.d.ts +41 -0
- package/dist/connection-store-D6QqzXU1.d.cts +41 -0
- package/dist/control-Bv8dWjyp.d.ts +1400 -0
- package/dist/control-CNzybWMd.d.cts +1400 -0
- package/dist/controller-0CVO1t_3.d.cts +26 -0
- package/dist/controller-agent-vOiuK7T6.d.cts +130 -0
- package/dist/controller-agent-vOiuK7T6.d.ts +130 -0
- package/dist/controller-bridge.cjs +992 -0
- package/dist/controller-bridge.cjs.map +1 -0
- package/dist/controller-bridge.d.cts +52 -0
- package/dist/controller-bridge.d.ts +52 -0
- package/dist/controller-bridge.js +23 -0
- package/dist/controller-bridge.js.map +1 -0
- package/dist/controller-capture-2GKKGHJ2.js +8 -0
- package/dist/controller-capture-2GKKGHJ2.js.map +1 -0
- package/dist/controller-h9M2Nngd.d.ts +26 -0
- package/dist/controller-press-EWWIMVXP.js +231 -0
- package/dist/controller-press-EWWIMVXP.js.map +1 -0
- package/dist/core-BAO0pHrJ.d.cts +15 -0
- package/dist/core-BAO0pHrJ.d.ts +15 -0
- package/dist/core.cjs +5931 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +232 -0
- package/dist/core.d.ts +232 -0
- package/dist/core.js +906 -0
- package/dist/core.js.map +1 -0
- package/dist/dev-events-BffobOfb.d.ts +31 -0
- package/dist/dev-events-Ct7QEgKb.d.cts +31 -0
- package/dist/dev-log-events-B1_B3guZ.d.cts +47 -0
- package/dist/dev-log-events-B1_B3guZ.d.ts +47 -0
- package/dist/frames-D-xKuODS.d.cts +686 -0
- package/dist/frames-D-xKuODS.d.ts +686 -0
- package/dist/game-Db58JNk3.d.cts +77 -0
- package/dist/game-bySEy-QO.d.ts +77 -0
- package/dist/host-runtime-BuLhGQx5.d.ts +399 -0
- package/dist/host-runtime-_06jpW5v.d.cts +399 -0
- package/dist/index.cjs +12406 -8020
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +106 -973
- package/dist/index.d.ts +106 -973
- package/dist/index.js +451 -4637
- package/dist/index.js.map +1 -1
- package/dist/input-Xvs80gqG.d.cts +92 -0
- package/dist/input-Xvs80gqG.d.ts +92 -0
- package/dist/input-bindings-BaEFrgRb.d.cts +129 -0
- package/dist/input-bindings-BgsJRLPm.d.ts +129 -0
- package/dist/leased-control-BEg4JuXA.d.cts +158 -0
- package/dist/leased-control-BEg4JuXA.d.ts +158 -0
- package/dist/metadata.cjs +3 -9
- package/dist/metadata.cjs.map +1 -1
- package/dist/metadata.d.cts +6 -17
- package/dist/metadata.d.ts +6 -17
- package/dist/metadata.js +8 -76
- package/dist/metadata.js.map +1 -1
- package/dist/phone-room-session-Ca6rlxJr.d.ts +439 -0
- package/dist/phone-room-session-DkPR-K6e.d.cts +439 -0
- package/dist/platform-machine.cjs +248 -18
- package/dist/platform-machine.cjs.map +1 -1
- package/dist/platform-machine.d.cts +1867 -96
- package/dist/platform-machine.d.ts +1867 -96
- package/dist/platform-machine.js +206 -18
- package/dist/platform-machine.js.map +1 -1
- package/dist/{platform-settings-cuor3i11.d.cts → platform-settings-Yb0fQ1dl.d.cts} +1 -3
- package/dist/{platform-settings-cuor3i11.d.ts → platform-settings-Yb0fQ1dl.d.ts} +1 -3
- package/dist/prefabs.cjs +134 -3
- package/dist/prefabs.cjs.map +1 -1
- package/dist/prefabs.d.cts +23 -47
- package/dist/prefabs.d.ts +23 -47
- package/dist/prefabs.js +23 -4
- package/dist/prefabs.js.map +1 -1
- package/dist/preview.cjs +2269 -774
- package/dist/preview.cjs.map +1 -1
- package/dist/preview.d.cts +195 -38
- package/dist/preview.d.ts +195 -38
- package/dist/preview.js +494 -260
- package/dist/preview.js.map +1 -1
- package/dist/protocol.cjs +705 -396
- package/dist/protocol.cjs.map +1 -1
- package/dist/protocol.d.cts +49 -100
- package/dist/protocol.d.ts +49 -100
- package/dist/protocol.js +56 -75
- package/dist/protocol.js.map +1 -1
- package/dist/release.cjs +37 -0
- package/dist/release.cjs.map +1 -1
- package/dist/release.d.cts +29 -3
- package/dist/release.d.ts +29 -3
- package/dist/release.js +13 -1
- package/dist/release.js.map +1 -1
- package/dist/replay-input-log-BvX4As2f.d.ts +31 -0
- package/dist/replay-input-log-Vcl0VDIy.d.cts +31 -0
- package/dist/room-protocol.cjs +794 -0
- package/dist/room-protocol.cjs.map +1 -0
- package/dist/room-protocol.d.cts +63 -0
- package/dist/room-protocol.d.ts +63 -0
- package/dist/room-protocol.js +143 -0
- package/dist/room-protocol.js.map +1 -0
- package/dist/room-session.cjs +2336 -0
- package/dist/room-session.cjs.map +1 -0
- package/dist/room-session.d.cts +77 -0
- package/dist/room-session.d.ts +77 -0
- package/dist/room-session.js +103 -0
- package/dist/room-session.js.map +1 -0
- package/dist/runtime/prefab-inspection-bridge.cjs +207 -0
- package/dist/runtime/prefab-inspection-bridge.cjs.map +1 -0
- package/dist/runtime/prefab-inspection-bridge.d.cts +156 -0
- package/dist/runtime/prefab-inspection-bridge.d.ts +156 -0
- package/dist/runtime/prefab-inspection-bridge.js +22 -0
- package/dist/runtime/prefab-inspection-bridge.js.map +1 -0
- package/dist/runtime-control.cjs +2150 -0
- package/dist/runtime-control.cjs.map +1 -0
- package/dist/runtime-control.d.cts +985 -0
- package/dist/runtime-control.d.ts +985 -0
- package/dist/runtime-control.js +268 -0
- package/dist/runtime-control.js.map +1 -0
- package/dist/runtime-inspection.cjs +1319 -0
- package/dist/runtime-inspection.cjs.map +1 -0
- package/dist/runtime-inspection.d.cts +555 -0
- package/dist/runtime-inspection.d.ts +555 -0
- package/dist/runtime-inspection.js +29 -0
- package/dist/runtime-inspection.js.map +1 -0
- package/dist/runtime-reporting-K_ZXpubu.d.cts +43 -0
- package/dist/runtime-reporting-K_ZXpubu.d.ts +43 -0
- package/dist/runtime-topology.cjs +2 -5
- package/dist/runtime-topology.cjs.map +1 -1
- package/dist/runtime-topology.d.cts +1 -1
- package/dist/runtime-topology.d.ts +1 -1
- package/dist/runtime-topology.js +1 -1
- package/dist/runtime-topology.js.map +1 -1
- package/dist/scoped-connector-CiiWu06D.d.ts +66 -0
- package/dist/scoped-connector-D7252pn0.d.cts +66 -0
- package/dist/sdk-channels-S6j6AH8v.d.cts +103 -0
- package/dist/sdk-channels-S6j6AH8v.d.ts +103 -0
- package/dist/simulation-BfRnC4rg.d.ts +782 -0
- package/dist/simulation-BwZx2pgt.d.cts +782 -0
- package/dist/{standard-match-phase-BucA5dYo.d.ts → standard-match-phase-D4N-AU0d.d.cts} +3 -13
- package/dist/{standard-match-phase-U2ra8J-0.d.cts → standard-match-phase-abt8ZjCh.d.ts} +3 -13
- package/dist/transport-CWF29jU6.d.cts +173 -0
- package/dist/transport-CWF29jU6.d.ts +173 -0
- package/dist/types-p28maMEo.d.cts +102 -0
- package/dist/types-p28maMEo.d.ts +102 -0
- package/dist/ui.cjs +2324 -1051
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.d.cts +75 -17
- package/dist/ui.d.ts +75 -17
- package/dist/ui.js +555 -389
- package/dist/ui.js.map +1 -1
- package/package.json +88 -37
- package/src/agent/agent-action.ts +0 -39
- package/src/agent/agent-contract-conformance.ts +208 -0
- package/src/agent/agent-contract.ts +2 -4
- package/src/agent/agent-evaluator.ts +95 -0
- package/src/agent/capture-canvas.ts +79 -0
- package/src/agent/host-canvas-capture.ts +189 -0
- package/src/agent-tooling.ts +8 -18
- package/src/arcade/bridge/controller.ts +8 -11
- package/src/arcade/bridge/host.ts +6 -11
- package/src/arcade/bridge/iframe.ts +1 -50
- package/src/arcade/host.ts +0 -1
- package/src/arcade/runtime.ts +6 -0
- package/src/arcade/surface.ts +6 -1
- package/src/arcade/url.ts +2 -9
- package/src/audio/audio-manager.ts +23 -47
- package/src/audio/hooks.tsx +59 -72
- package/src/components/controller-player-name-field.tsx +2 -2
- package/src/components/controller-primary-action.tsx +1 -1
- package/src/components/controls.tsx +398 -0
- package/src/components/gamepad-layout.tsx +69 -0
- package/src/components/join-url-controls.tsx +5 -1
- package/src/components/lifecycle-action-group.tsx +1 -1
- package/src/components/player-avatar.tsx +50 -3
- package/src/components/room-qr-code.tsx +36 -77
- package/src/components/stage-capture-surface.tsx +91 -0
- package/src/components/surface-viewport.tsx +16 -3
- package/src/components/ui/button.tsx +1 -1
- package/src/constants.ts +0 -15
- package/src/context/air-jam-context.tsx +64 -195
- package/src/context/session-providers.tsx +13 -10
- package/src/controller-bridge.ts +7 -0
- package/src/core/assets.ts +48 -0
- package/src/core/config.ts +70 -0
- package/src/core/connection-store.ts +77 -0
- package/src/core/controller-input.ts +147 -0
- package/src/core/controller-runtime.ts +427 -0
- package/src/core/dev-events.ts +18 -0
- package/src/core/environment.ts +132 -0
- package/src/core/game-description.ts +44 -0
- package/src/core/game.ts +130 -0
- package/src/core/host-input.ts +207 -0
- package/src/core/host-runtime.ts +988 -0
- package/src/core/hosted-rooms.ts +26 -0
- package/src/core/input-bindings.ts +180 -0
- package/src/core/input-log.ts +144 -0
- package/src/core/input.ts +228 -0
- package/src/core/local-input.ts +319 -0
- package/src/core/replay-input-log.ts +298 -0
- package/src/core/replicated-store.ts +1178 -0
- package/src/core/room-action-ack.ts +43 -0
- package/src/core/settings.ts +202 -0
- package/src/core/simulation.ts +307 -0
- package/src/core/theme.ts +33 -0
- package/src/core.ts +162 -0
- package/src/dev/browser-log-sink.ts +47 -27
- package/src/diagnostics.ts +5 -6
- package/src/hooks/internal/use-controller-runtime-api.ts +58 -836
- package/src/hooks/internal/use-host-runtime-api.ts +98 -1013
- package/src/hooks/internal/use-runtime-inspection-contract.ts +14 -2
- package/src/hooks/use-air-jam-controller.ts +41 -62
- package/src/hooks/use-air-jam-host.ts +66 -107
- package/src/hooks/use-air-jam-settings.ts +27 -0
- package/src/hooks/use-controller-toasts.ts +16 -19
- package/src/hooks/use-host-agent-capture.ts +31 -0
- package/src/hooks/use-lifecycle-action-group-model.ts +1 -1
- package/src/hooks/use-send-signal.ts +23 -156
- package/src/hooks/use-simulation.ts +83 -0
- package/src/index.ts +26 -106
- package/src/lifecycle/index.ts +0 -4
- package/src/lifecycle/standard-match-phase.ts +1 -22
- package/src/metadata/manifest.ts +8 -20
- package/src/metadata.ts +1 -1
- package/src/platform-machine.ts +236 -15
- package/src/prefabs/types.ts +91 -20
- package/src/prefabs/view.ts +82 -0
- package/src/prefabs.ts +19 -0
- package/src/preview/host-workspace.tsx +4 -9
- package/src/preview/identity.ts +31 -23
- package/src/preview/layout.ts +5 -1
- package/src/preview/manager.ts +205 -78
- package/src/preview/messages.ts +47 -0
- package/src/preview/ownership.ts +6 -1
- package/src/preview/url.ts +46 -23
- package/src/preview/window.tsx +26 -69
- package/src/preview/workspace-local-seats.ts +166 -0
- package/src/preview/workspace.tsx +137 -66
- package/src/preview.ts +27 -15
- package/src/protocol/actions.ts +58 -0
- package/src/protocol/arcade-platform-actions.ts +20 -16
- package/src/protocol/controller.ts +15 -169
- package/src/protocol/core.ts +8 -15
- package/src/protocol/dev-log-events.ts +5 -84
- package/src/protocol/leased-control.ts +177 -0
- package/src/protocol/room/addressing.ts +35 -0
- package/src/protocol/room/close-codes.ts +33 -0
- package/src/protocol/room/frames.ts +343 -0
- package/src/protocol/room/input-codec.ts +182 -0
- package/src/protocol/room/limits.ts +58 -0
- package/src/protocol/room/patch.ts +135 -0
- package/src/protocol/room/sdk-channels.ts +81 -0
- package/src/protocol/room/seat-id.ts +31 -0
- package/src/protocol/room/transport.ts +63 -0
- package/src/protocol/room/weight.ts +58 -0
- package/src/protocol/runtime-reporting.ts +78 -0
- package/src/protocol/signed-envelope.ts +176 -0
- package/src/protocol.ts +4 -7
- package/src/qrcode.d.ts +3 -13
- package/src/release.ts +32 -0
- package/src/room-protocol.ts +10 -0
- package/src/room-session/browser-wake-events.ts +14 -0
- package/src/room-session/channel-state.ts +293 -0
- package/src/room-session/clock.ts +24 -0
- package/src/room-session/host-room-session.ts +379 -0
- package/src/room-session/input-lane.ts +125 -0
- package/src/room-session/listeners.ts +22 -0
- package/src/room-session/loopback-link.ts +58 -0
- package/src/room-session/phone-room-session.ts +368 -0
- package/src/room-session/port-link.ts +116 -0
- package/src/room-session/room-key.ts +9 -0
- package/src/room-session/roster.ts +23 -0
- package/src/room-session/scoped-connector.ts +577 -0
- package/src/room-session/session-link.ts +306 -0
- package/src/room-session/web-socket-link.ts +57 -0
- package/src/room-session.ts +12 -0
- package/src/runtime/air-jam-config.ts +53 -51
- package/src/runtime/air-jam-error-boundary.tsx +52 -2
- package/src/runtime/arcade-runtime-url.ts +8 -9
- package/src/runtime/browser-controller-environment.ts +116 -0
- package/src/runtime/browser-host-environment.ts +137 -0
- package/src/runtime/browser-replay.ts +211 -0
- package/src/runtime/browser-room.ts +41 -0
- package/src/runtime/connected-runtime-error-boundary.tsx +58 -0
- package/src/runtime/contracts/agent-control.ts +195 -0
- package/src/runtime/contracts/clip.ts +169 -0
- package/src/runtime/contracts/control.ts +744 -59
- package/src/runtime/contracts/controller-agent.ts +130 -0
- package/src/runtime/contracts/input-log.ts +38 -0
- package/src/runtime/contracts/inspection.ts +25 -22
- package/src/runtime/contracts/observation.ts +186 -0
- package/src/runtime/contracts/runtime-identity.ts +43 -0
- package/src/runtime/contracts/timeline.ts +59 -0
- package/src/runtime/controller-agent-bridge.ts +152 -0
- package/src/runtime/controller-bridge-context.ts +29 -0
- package/src/runtime/controller-capture.ts +50 -0
- package/src/runtime/controller-identity.ts +54 -115
- package/src/runtime/controller-presentation.ts +47 -17
- package/src/runtime/controller-press.ts +271 -0
- package/src/runtime/create-air-jam-app.tsx +120 -83
- package/src/runtime/dev-runtime-events.ts +6 -18
- package/src/runtime/embedded-parent.ts +22 -0
- package/src/runtime/embedded-runtime-adapters.ts +10 -9
- package/src/runtime/host-agent-bridge.ts +127 -0
- package/src/runtime/host-capture-boundary.tsx +92 -0
- package/src/runtime/host-capture-context.ts +7 -0
- package/src/runtime/host-clip-reader.ts +93 -0
- package/src/runtime/host-clip-recorder.ts +342 -0
- package/src/runtime/host-input-log-reader.ts +120 -0
- package/src/runtime/host-observation.ts +207 -0
- package/src/runtime/host-pace.ts +36 -0
- package/src/runtime/host-runtime-fault.ts +51 -0
- package/src/runtime/host-timeline.ts +152 -0
- package/src/runtime/local-players.tsx +96 -0
- package/src/runtime/local-reference-game-identity.ts +13 -0
- package/src/runtime/local-seats.ts +612 -0
- package/src/runtime/participant-control.ts +162 -0
- package/src/runtime/prefab-inspection-bridge.ts +174 -0
- package/src/runtime/prefab-inspection-clock.ts +12 -0
- package/src/runtime/prefab-inspection-context.ts +20 -0
- package/src/runtime/prefab-inspection-runtime.tsx +328 -0
- package/src/runtime/preview-inspection-bridge.ts +130 -0
- package/src/runtime/replay-runtime.tsx +101 -0
- package/src/runtime/room-bridge.ts +110 -0
- package/src/runtime/runtime-owner-contexts.tsx +9 -0
- package/src/runtime/runtime-session-params.ts +23 -86
- package/src/runtime/session-runtimes.tsx +231 -64
- package/src/runtime/stage-capture.ts +25 -0
- package/src/runtime-control.ts +44 -8
- package/src/runtime-inspection.ts +14 -7
- package/src/runtime-topology.ts +7 -8
- package/src/settings/platform-settings-runtime.tsx +48 -8
- package/src/settings/platform-settings.ts +0 -96
- package/src/store/use-air-jam-store.ts +73 -0
- package/src/ui.ts +3 -3
- package/src/utils/is-rpc-serializable.ts +11 -19
- package/src/utils/url-builder.ts +0 -7
- package/dist/arcade/bridge.cjs +0 -1067
- package/dist/arcade/bridge.cjs.map +0 -1
- package/dist/arcade/bridge.d.cts +0 -11
- package/dist/arcade/bridge.d.ts +0 -11
- package/dist/arcade/bridge.js +0 -76
- package/dist/arcade/bridge.js.map +0 -1
- package/dist/arcade-runtime-url-BW-MUAOY.d.cts +0 -28
- package/dist/arcade-runtime-url-l8qj01Pg.d.ts +0 -28
- package/dist/arcade.cjs +0 -1737
- package/dist/arcade.cjs.map +0 -1
- package/dist/arcade.d.cts +0 -18
- package/dist/arcade.d.ts +0 -18
- package/dist/arcade.js +0 -123
- package/dist/arcade.js.map +0 -1
- package/dist/capabilities.cjs +0 -39
- package/dist/capabilities.cjs.map +0 -1
- package/dist/capabilities.d.cts +0 -31
- package/dist/capabilities.d.ts +0 -31
- package/dist/capabilities.js +0 -12
- package/dist/capabilities.js.map +0 -1
- package/dist/chunk-32NYL7XI.js +0 -539
- package/dist/chunk-32NYL7XI.js.map +0 -1
- package/dist/chunk-3USU7GY2.js.map +0 -1
- package/dist/chunk-6CMB356F.js +0 -193
- package/dist/chunk-6CMB356F.js.map +0 -1
- package/dist/chunk-7OTQTT6H.js.map +0 -1
- package/dist/chunk-BE6Z4SIT.js.map +0 -1
- package/dist/chunk-CVYR5RJT.js +0 -184
- package/dist/chunk-CVYR5RJT.js.map +0 -1
- package/dist/chunk-DY67S3LR.js.map +0 -1
- package/dist/chunk-E5PVHEAX.js +0 -126
- package/dist/chunk-E5PVHEAX.js.map +0 -1
- package/dist/chunk-EDRQIOCV.js +0 -25
- package/dist/chunk-EDRQIOCV.js.map +0 -1
- package/dist/chunk-EVZJA6RN.js.map +0 -1
- package/dist/chunk-IKKDONQL.js +0 -1
- package/dist/chunk-IKKDONQL.js.map +0 -1
- package/dist/chunk-JO2HR5PV.js +0 -43
- package/dist/chunk-JO2HR5PV.js.map +0 -1
- package/dist/chunk-JTF47B56.js +0 -1
- package/dist/chunk-JTF47B56.js.map +0 -1
- package/dist/chunk-KOB73SPD.js +0 -216
- package/dist/chunk-KOB73SPD.js.map +0 -1
- package/dist/chunk-LIXPF4P6.js +0 -22
- package/dist/chunk-LIXPF4P6.js.map +0 -1
- package/dist/chunk-M4DKOI42.js +0 -32
- package/dist/chunk-M4DKOI42.js.map +0 -1
- package/dist/chunk-MPDMJIX5.js +0 -1
- package/dist/chunk-MPDMJIX5.js.map +0 -1
- package/dist/chunk-NCL6WJCL.js.map +0 -1
- package/dist/chunk-NUJBMV3O.js.map +0 -1
- package/dist/chunk-Q4UALQO4.js +0 -288
- package/dist/chunk-Q4UALQO4.js.map +0 -1
- package/dist/chunk-TGRTEWYV.js +0 -195
- package/dist/chunk-TGRTEWYV.js.map +0 -1
- package/dist/chunk-UWJOIVON.js.map +0 -1
- package/dist/chunk-W2VK36RO.js +0 -11
- package/dist/chunk-W2VK36RO.js.map +0 -1
- package/dist/chunk-X24K52DG.js.map +0 -1
- package/dist/chunk-YXHH3MQT.js +0 -230
- package/dist/chunk-YXHH3MQT.js.map +0 -1
- package/dist/chunk-ZLPL2R3R.js.map +0 -1
- package/dist/chunk-ZTQ5SP4H.js +0 -9
- package/dist/chunk-ZTQ5SP4H.js.map +0 -1
- package/dist/controller-Bod8YYr1.d.cts +0 -172
- package/dist/controller-DxVchfiA.d.ts +0 -172
- package/dist/dev-log-events-CVAM29hx.d.cts +0 -123
- package/dist/dev-log-events-CVAM29hx.d.ts +0 -123
- package/dist/handshake-CC_LrK5g.d.cts +0 -31
- package/dist/handshake-CC_LrK5g.d.ts +0 -31
- package/dist/host-8hmq_Sgc.d.cts +0 -109
- package/dist/host-Cw-N6e-5.d.ts +0 -109
- package/dist/notices-CnGaaS8B.d.ts +0 -38
- package/dist/notices-NyDM5Mtz.d.cts +0 -38
- package/dist/realtime-client-Cu8yVJFw.d.cts +0 -15
- package/dist/realtime-client-Cu8yVJFw.d.ts +0 -15
- package/dist/sync-B6QsNrXz.d.cts +0 -125
- package/dist/sync-B6QsNrXz.d.ts +0 -125
- package/src/arcade/bridge.ts +0 -3
- package/src/arcade.ts +0 -4
- package/src/capabilities/manifest.ts +0 -71
- package/src/capabilities.ts +0 -12
- package/src/context/socket-manager.ts +0 -79
- package/src/events.ts +0 -124
- package/src/hooks/internal/use-runtime-control-contract.ts +0 -15
- package/src/hooks/internal/use-runtime-observability-contract.ts +0 -24
- package/src/hooks/use-connection-status.ts +0 -8
- package/src/hooks/use-controller-tick.ts +0 -65
- package/src/hooks/use-get-input.ts +0 -100
- package/src/hooks/use-host-arcade-restore.ts +0 -30
- package/src/hooks/use-host-tick.ts +0 -171
- package/src/hooks/use-input-writer.ts +0 -83
- package/src/hooks/use-players.ts +0 -12
- package/src/internal/input-manager.ts +0 -356
- package/src/protocol/errors.ts +0 -21
- package/src/protocol/host-grant.ts +0 -185
- package/src/protocol/host.ts +0 -138
- package/src/protocol/notices.ts +0 -43
- package/src/protocol/signals.ts +0 -38
- package/src/protocol/socket-events.ts +0 -154
- package/src/protocol/sync.ts +0 -121
- package/src/runtime/contracts/observability.ts +0 -94
- package/src/runtime/controller-bridge.ts +0 -451
- package/src/runtime/controller-realtime-client.ts +0 -591
- package/src/runtime/host-bridge.ts +0 -388
- package/src/runtime/host-realtime-client.ts +0 -550
- package/src/runtime/realtime-client.ts +0 -20
- package/src/runtime/validate-arcade-bridge-attach.ts +0 -14
- package/src/runtime-observability.ts +0 -9
- package/src/state/connection-store.ts +0 -152
- package/src/store/create-air-jam-store.ts +0 -1141
- package/src/store/index.ts +0 -1
- package/src/utils/ids.ts +0 -31
|
@@ -0,0 +1,686 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A channel's state travels as patches against a revision. A patch names the
|
|
5
|
+
* keys that changed, descending only through plain objects; arrays and other
|
|
6
|
+
* values are replaced whole. Unlike JSON Merge Patch it can set a value to
|
|
7
|
+
* `null`, which stores do constantly.
|
|
8
|
+
*/
|
|
9
|
+
type StateDocument = Record<string, unknown>;
|
|
10
|
+
type StatePath = readonly string[];
|
|
11
|
+
interface StatePatch {
|
|
12
|
+
readonly set: ReadonlyArray<readonly [StatePath, unknown]>;
|
|
13
|
+
readonly unset: readonly StatePath[];
|
|
14
|
+
}
|
|
15
|
+
declare const isPlainObject: (value: unknown) => value is StateDocument;
|
|
16
|
+
/** The value at `path`, or undefined when the path does not lead to one. */
|
|
17
|
+
declare const readStatePath: (document: StateDocument, path: StatePath) => unknown;
|
|
18
|
+
/**
|
|
19
|
+
* The patch that turns `previous` into `next`. Stores update immutably, so an
|
|
20
|
+
* unchanged branch is skipped by identity without being walked. A key whose
|
|
21
|
+
* value is `undefined` counts as absent, as it does in JSON.
|
|
22
|
+
*/
|
|
23
|
+
declare const diffState: (previous: StateDocument, next: StateDocument) => StatePatch;
|
|
24
|
+
declare const isEmptyStatePatch: (patch: StatePatch) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Applies removals, then assignments, without touching `document`. Each
|
|
27
|
+
* object on a changed path is copied once however many operations reach it,
|
|
28
|
+
* so a frame costs what it changes rather than what it changes times the
|
|
29
|
+
* size of the objects it changes. `replaced` hears each operation's key and
|
|
30
|
+
* the values before and after it, `undefined` meaning absent. Returns null
|
|
31
|
+
* when the patch does not fit: a path runs through something that is not a
|
|
32
|
+
* plain object, or removes a key that is not there. A receiver that gets null
|
|
33
|
+
* has diverged and needs the full document.
|
|
34
|
+
*/
|
|
35
|
+
declare const applyStatePatch: (document: StateDocument, patch: StatePatch, replaced?: (key: string, previous: unknown, next: unknown) => void) => StateDocument | null;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Text frames are JSON objects with a `type`. Within a protocol version change
|
|
39
|
+
* is additive: a receiver ignores frame types and fields it does not know, so
|
|
40
|
+
* no schema here is strict. The literal text frames `ping` and `pong` are the
|
|
41
|
+
* heartbeat.
|
|
42
|
+
*/
|
|
43
|
+
declare const ROOM_PROTOCOL_VERSION = 1;
|
|
44
|
+
declare const PING_FRAME = "ping";
|
|
45
|
+
declare const PONG_FRAME = "pong";
|
|
46
|
+
/** How deeply a frame's JSON may nest; nothing walks a deeper frame. */
|
|
47
|
+
declare const MAXIMUM_FRAME_DEPTH = 32;
|
|
48
|
+
declare const seatKindSchema: z.ZodEnum<{
|
|
49
|
+
phone: "phone";
|
|
50
|
+
preview: "preview";
|
|
51
|
+
agent: "agent";
|
|
52
|
+
}>;
|
|
53
|
+
type SeatKind = z.infer<typeof seatKindSchema>;
|
|
54
|
+
declare const seatProfileSchema: z.ZodObject<{
|
|
55
|
+
label: z.ZodOptional<z.ZodString>;
|
|
56
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
57
|
+
localSeatLabel: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
type SeatProfile = z.infer<typeof seatProfileSchema>;
|
|
60
|
+
declare const hostHelloSchema: z.ZodObject<{
|
|
61
|
+
credential: z.ZodOptional<z.ZodString>;
|
|
62
|
+
seats: z.ZodNumber;
|
|
63
|
+
type: z.ZodLiteral<"hello">;
|
|
64
|
+
key: z.ZodString;
|
|
65
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
66
|
+
sdk: z.ZodString;
|
|
67
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
type HostHello = z.infer<typeof hostHelloSchema>;
|
|
70
|
+
declare const phoneHelloSchema: z.ZodObject<{
|
|
71
|
+
kind: z.ZodEnum<{
|
|
72
|
+
phone: "phone";
|
|
73
|
+
preview: "preview";
|
|
74
|
+
agent: "agent";
|
|
75
|
+
}>;
|
|
76
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
label: z.ZodOptional<z.ZodString>;
|
|
78
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
79
|
+
localSeatLabel: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
page: z.ZodOptional<z.ZodString>;
|
|
82
|
+
type: z.ZodLiteral<"hello">;
|
|
83
|
+
key: z.ZodString;
|
|
84
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
85
|
+
sdk: z.ZodString;
|
|
86
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
type PhoneHello = z.infer<typeof phoneHelloSchema>;
|
|
89
|
+
declare const hostStateFrameSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
90
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
91
|
+
private: z.ZodOptional<z.ZodString>;
|
|
92
|
+
type: z.ZodLiteral<"state">;
|
|
93
|
+
channel: z.ZodString;
|
|
94
|
+
revision: z.ZodNumber;
|
|
95
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
96
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
+
type: z.ZodLiteral<"state">;
|
|
98
|
+
channel: z.ZodString;
|
|
99
|
+
revision: z.ZodNumber;
|
|
100
|
+
base: z.ZodNumber;
|
|
101
|
+
set: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodArray<z.ZodString>, z.ZodUnknown], null>>>;
|
|
102
|
+
unset: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
103
|
+
}, z.core.$strip>]>;
|
|
104
|
+
type HostStateFrame = z.infer<typeof hostStateFrameSchema>;
|
|
105
|
+
declare const hostToRoomFrameSchemas: {
|
|
106
|
+
readonly state: z.ZodUnion<readonly [z.ZodObject<{
|
|
107
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
108
|
+
private: z.ZodOptional<z.ZodString>;
|
|
109
|
+
type: z.ZodLiteral<"state">;
|
|
110
|
+
channel: z.ZodString;
|
|
111
|
+
revision: z.ZodNumber;
|
|
112
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
113
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"state">;
|
|
115
|
+
channel: z.ZodString;
|
|
116
|
+
revision: z.ZodNumber;
|
|
117
|
+
base: z.ZodNumber;
|
|
118
|
+
set: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodArray<z.ZodString>, z.ZodUnknown], null>>>;
|
|
119
|
+
unset: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
120
|
+
}, z.core.$strip>]>;
|
|
121
|
+
readonly response: z.ZodObject<{
|
|
122
|
+
type: z.ZodLiteral<"response">;
|
|
123
|
+
seat: z.ZodString;
|
|
124
|
+
id: z.ZodNumber;
|
|
125
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
readonly signal: z.ZodObject<{
|
|
128
|
+
type: z.ZodLiteral<"signal">;
|
|
129
|
+
seat: z.ZodOptional<z.ZodString>;
|
|
130
|
+
kind: z.ZodString;
|
|
131
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
readonly room: z.ZodObject<{
|
|
134
|
+
type: z.ZodLiteral<"room">;
|
|
135
|
+
seats: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
locked: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
readonly remove: z.ZodObject<{
|
|
139
|
+
type: z.ZodLiteral<"remove">;
|
|
140
|
+
seat: z.ZodString;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
readonly drop: z.ZodObject<{
|
|
143
|
+
type: z.ZodLiteral<"drop">;
|
|
144
|
+
channel: z.ZodString;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
readonly activity: z.ZodObject<{
|
|
147
|
+
type: z.ZodLiteral<"activity">;
|
|
148
|
+
activity: z.ZodNullable<z.ZodString>;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
readonly end: z.ZodObject<{
|
|
151
|
+
type: z.ZodLiteral<"end">;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
};
|
|
154
|
+
declare const phoneToRoomFrameSchemas: {
|
|
155
|
+
readonly request: z.ZodObject<{
|
|
156
|
+
type: z.ZodLiteral<"request">;
|
|
157
|
+
id: z.ZodNumber;
|
|
158
|
+
channel: z.ZodString;
|
|
159
|
+
name: z.ZodString;
|
|
160
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
readonly profile: z.ZodObject<{
|
|
163
|
+
type: z.ZodLiteral<"profile">;
|
|
164
|
+
label: z.ZodOptional<z.ZodString>;
|
|
165
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
readonly leave: z.ZodObject<{
|
|
168
|
+
type: z.ZodLiteral<"leave">;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
/** This seat's controls start again from zero, as a newly loaded controller frame's do. */
|
|
171
|
+
readonly baseline: z.ZodObject<{
|
|
172
|
+
type: z.ZodLiteral<"baseline">;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
};
|
|
175
|
+
type FramesOf<Schemas extends Record<string, z.ZodType>> = {
|
|
176
|
+
[Type in keyof Schemas]: z.infer<Schemas[Type]>;
|
|
177
|
+
}[keyof Schemas];
|
|
178
|
+
type HostToRoomFrame = FramesOf<typeof hostToRoomFrameSchemas>;
|
|
179
|
+
type PhoneToRoomFrame = FramesOf<typeof phoneToRoomFrameSchemas>;
|
|
180
|
+
declare const seatViewSchema: z.ZodObject<{
|
|
181
|
+
id: z.ZodString;
|
|
182
|
+
label: z.ZodString;
|
|
183
|
+
color: z.ZodString;
|
|
184
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
185
|
+
kind: z.ZodEnum<{
|
|
186
|
+
phone: "phone";
|
|
187
|
+
preview: "preview";
|
|
188
|
+
agent: "agent";
|
|
189
|
+
}>;
|
|
190
|
+
connected: z.ZodBoolean;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
type SeatView = z.infer<typeof seatViewSchema>;
|
|
193
|
+
declare const channelCopySchema: z.ZodObject<{
|
|
194
|
+
channel: z.ZodString;
|
|
195
|
+
revision: z.ZodNumber;
|
|
196
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
197
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
198
|
+
private: z.ZodOptional<z.ZodString>;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
type ChannelCopy = z.infer<typeof channelCopySchema>;
|
|
201
|
+
declare const roomStateFrameSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
202
|
+
type: z.ZodLiteral<"state">;
|
|
203
|
+
channel: z.ZodString;
|
|
204
|
+
revision: z.ZodNumber;
|
|
205
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
206
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
207
|
+
type: z.ZodLiteral<"state">;
|
|
208
|
+
channel: z.ZodString;
|
|
209
|
+
revision: z.ZodNumber;
|
|
210
|
+
base: z.ZodNumber;
|
|
211
|
+
set: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodArray<z.ZodString>, z.ZodUnknown], null>>>;
|
|
212
|
+
unset: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
213
|
+
}, z.core.$strip>]>;
|
|
214
|
+
type RoomStateFrame = z.infer<typeof roomStateFrameSchema>;
|
|
215
|
+
declare const roomToHostFrameSchemas: {
|
|
216
|
+
readonly welcome: z.ZodObject<{
|
|
217
|
+
seatsWanted: z.ZodNumber;
|
|
218
|
+
locked: z.ZodBoolean;
|
|
219
|
+
activity: z.ZodNullable<z.ZodString>;
|
|
220
|
+
type: z.ZodLiteral<"welcome">;
|
|
221
|
+
code: z.ZodString;
|
|
222
|
+
instance: z.ZodString;
|
|
223
|
+
seats: z.ZodArray<z.ZodObject<{
|
|
224
|
+
id: z.ZodString;
|
|
225
|
+
label: z.ZodString;
|
|
226
|
+
color: z.ZodString;
|
|
227
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
228
|
+
kind: z.ZodEnum<{
|
|
229
|
+
phone: "phone";
|
|
230
|
+
preview: "preview";
|
|
231
|
+
agent: "agent";
|
|
232
|
+
}>;
|
|
233
|
+
connected: z.ZodBoolean;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
channels: z.ZodArray<z.ZodObject<{
|
|
236
|
+
channel: z.ZodString;
|
|
237
|
+
revision: z.ZodNumber;
|
|
238
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
239
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
240
|
+
private: z.ZodOptional<z.ZodString>;
|
|
241
|
+
}, z.core.$strip>>;
|
|
242
|
+
limits: z.ZodObject<{
|
|
243
|
+
seats: z.ZodNumber;
|
|
244
|
+
channels: z.ZodNumber;
|
|
245
|
+
inputIntervalMs: z.ZodNumber;
|
|
246
|
+
inputBytes: z.ZodNumber;
|
|
247
|
+
inputsPerSecond: z.ZodNumber;
|
|
248
|
+
stateBytes: z.ZodNumber;
|
|
249
|
+
statesPerSecond: z.ZodNumber;
|
|
250
|
+
frameBytes: z.ZodNumber;
|
|
251
|
+
framesPerSecond: z.ZodNumber;
|
|
252
|
+
strikesPerSecond: z.ZodNumber;
|
|
253
|
+
seatHoldMs: z.ZodNumber;
|
|
254
|
+
hostGraceMs: z.ZodNumber;
|
|
255
|
+
maximumAgeMs: z.ZodNumber;
|
|
256
|
+
}, z.core.$strip>;
|
|
257
|
+
features: z.ZodArray<z.ZodString>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
readonly wait: z.ZodObject<{
|
|
260
|
+
type: z.ZodLiteral<"wait">;
|
|
261
|
+
position: z.ZodNumber;
|
|
262
|
+
}, z.core.$strip>;
|
|
263
|
+
readonly seat: z.ZodObject<{
|
|
264
|
+
type: z.ZodLiteral<"seat">;
|
|
265
|
+
seat: z.ZodObject<{
|
|
266
|
+
id: z.ZodString;
|
|
267
|
+
label: z.ZodString;
|
|
268
|
+
color: z.ZodString;
|
|
269
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
270
|
+
kind: z.ZodEnum<{
|
|
271
|
+
phone: "phone";
|
|
272
|
+
preview: "preview";
|
|
273
|
+
agent: "agent";
|
|
274
|
+
}>;
|
|
275
|
+
connected: z.ZodBoolean;
|
|
276
|
+
}, z.core.$strip>;
|
|
277
|
+
inputBaseline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
readonly left: z.ZodObject<{
|
|
280
|
+
type: z.ZodLiteral<"left">;
|
|
281
|
+
seat: z.ZodString;
|
|
282
|
+
}, z.core.$strip>;
|
|
283
|
+
readonly need: z.ZodObject<{
|
|
284
|
+
type: z.ZodLiteral<"need">;
|
|
285
|
+
channel: z.ZodString;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
readonly request: z.ZodObject<{
|
|
288
|
+
type: z.ZodLiteral<"request">;
|
|
289
|
+
seat: z.ZodString;
|
|
290
|
+
id: z.ZodNumber;
|
|
291
|
+
channel: z.ZodString;
|
|
292
|
+
name: z.ZodString;
|
|
293
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
294
|
+
}, z.core.$strip>;
|
|
295
|
+
};
|
|
296
|
+
declare const roomToPhoneFrameSchemas: {
|
|
297
|
+
readonly welcome: z.ZodObject<{
|
|
298
|
+
seat: z.ZodString;
|
|
299
|
+
host: z.ZodBoolean;
|
|
300
|
+
type: z.ZodLiteral<"welcome">;
|
|
301
|
+
code: z.ZodString;
|
|
302
|
+
instance: z.ZodString;
|
|
303
|
+
seats: z.ZodArray<z.ZodObject<{
|
|
304
|
+
id: z.ZodString;
|
|
305
|
+
label: z.ZodString;
|
|
306
|
+
color: z.ZodString;
|
|
307
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
308
|
+
kind: z.ZodEnum<{
|
|
309
|
+
phone: "phone";
|
|
310
|
+
preview: "preview";
|
|
311
|
+
agent: "agent";
|
|
312
|
+
}>;
|
|
313
|
+
connected: z.ZodBoolean;
|
|
314
|
+
}, z.core.$strip>>;
|
|
315
|
+
channels: z.ZodArray<z.ZodObject<{
|
|
316
|
+
channel: z.ZodString;
|
|
317
|
+
revision: z.ZodNumber;
|
|
318
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
319
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
320
|
+
private: z.ZodOptional<z.ZodString>;
|
|
321
|
+
}, z.core.$strip>>;
|
|
322
|
+
limits: z.ZodObject<{
|
|
323
|
+
seats: z.ZodNumber;
|
|
324
|
+
channels: z.ZodNumber;
|
|
325
|
+
inputIntervalMs: z.ZodNumber;
|
|
326
|
+
inputBytes: z.ZodNumber;
|
|
327
|
+
inputsPerSecond: z.ZodNumber;
|
|
328
|
+
stateBytes: z.ZodNumber;
|
|
329
|
+
statesPerSecond: z.ZodNumber;
|
|
330
|
+
frameBytes: z.ZodNumber;
|
|
331
|
+
framesPerSecond: z.ZodNumber;
|
|
332
|
+
strikesPerSecond: z.ZodNumber;
|
|
333
|
+
seatHoldMs: z.ZodNumber;
|
|
334
|
+
hostGraceMs: z.ZodNumber;
|
|
335
|
+
maximumAgeMs: z.ZodNumber;
|
|
336
|
+
}, z.core.$strip>;
|
|
337
|
+
features: z.ZodArray<z.ZodString>;
|
|
338
|
+
}, z.core.$strip>;
|
|
339
|
+
readonly seat: z.ZodObject<{
|
|
340
|
+
type: z.ZodLiteral<"seat">;
|
|
341
|
+
seat: z.ZodObject<{
|
|
342
|
+
id: z.ZodString;
|
|
343
|
+
label: z.ZodString;
|
|
344
|
+
color: z.ZodString;
|
|
345
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
346
|
+
kind: z.ZodEnum<{
|
|
347
|
+
phone: "phone";
|
|
348
|
+
preview: "preview";
|
|
349
|
+
agent: "agent";
|
|
350
|
+
}>;
|
|
351
|
+
connected: z.ZodBoolean;
|
|
352
|
+
}, z.core.$strip>;
|
|
353
|
+
inputBaseline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
354
|
+
}, z.core.$strip>;
|
|
355
|
+
readonly left: z.ZodObject<{
|
|
356
|
+
type: z.ZodLiteral<"left">;
|
|
357
|
+
seat: z.ZodString;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
readonly host: z.ZodObject<{
|
|
360
|
+
type: z.ZodLiteral<"host">;
|
|
361
|
+
present: z.ZodBoolean;
|
|
362
|
+
}, z.core.$strip>;
|
|
363
|
+
readonly state: z.ZodUnion<readonly [z.ZodObject<{
|
|
364
|
+
type: z.ZodLiteral<"state">;
|
|
365
|
+
channel: z.ZodString;
|
|
366
|
+
revision: z.ZodNumber;
|
|
367
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
368
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
369
|
+
type: z.ZodLiteral<"state">;
|
|
370
|
+
channel: z.ZodString;
|
|
371
|
+
revision: z.ZodNumber;
|
|
372
|
+
base: z.ZodNumber;
|
|
373
|
+
set: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodArray<z.ZodString>, z.ZodUnknown], null>>>;
|
|
374
|
+
unset: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
375
|
+
}, z.core.$strip>]>;
|
|
376
|
+
readonly drop: z.ZodObject<{
|
|
377
|
+
type: z.ZodLiteral<"drop">;
|
|
378
|
+
channel: z.ZodString;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
readonly response: z.ZodUnion<readonly [z.ZodObject<{
|
|
381
|
+
type: z.ZodLiteral<"response">;
|
|
382
|
+
id: z.ZodNumber;
|
|
383
|
+
refused: z.ZodLiteral<"host-away">;
|
|
384
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
385
|
+
type: z.ZodLiteral<"response">;
|
|
386
|
+
id: z.ZodNumber;
|
|
387
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
388
|
+
}, z.core.$strip>]>;
|
|
389
|
+
readonly signal: z.ZodObject<{
|
|
390
|
+
type: z.ZodLiteral<"signal">;
|
|
391
|
+
kind: z.ZodString;
|
|
392
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
393
|
+
}, z.core.$strip>;
|
|
394
|
+
};
|
|
395
|
+
type RoomToHostFrame = FramesOf<typeof roomToHostFrameSchemas>;
|
|
396
|
+
type RoomToPhoneFrame = FramesOf<typeof roomToPhoneFrameSchemas>;
|
|
397
|
+
type ParsedFrame<Frame> = {
|
|
398
|
+
readonly status: "frame";
|
|
399
|
+
readonly frame: Frame;
|
|
400
|
+
}
|
|
401
|
+
/** A newer peer's frame type; ignored, not an error. */
|
|
402
|
+
| {
|
|
403
|
+
readonly status: "unknown";
|
|
404
|
+
} | {
|
|
405
|
+
readonly status: "invalid";
|
|
406
|
+
}
|
|
407
|
+
/** Nested past `MAXIMUM_FRAME_DEPTH`; a limit broken, not a mistake. */
|
|
408
|
+
| {
|
|
409
|
+
readonly status: "too-deep";
|
|
410
|
+
};
|
|
411
|
+
declare const parseHostToRoomFrame: (text: string) => ParsedFrame<FramesOf<{
|
|
412
|
+
readonly state: z.ZodUnion<readonly [z.ZodObject<{
|
|
413
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
414
|
+
private: z.ZodOptional<z.ZodString>;
|
|
415
|
+
type: z.ZodLiteral<"state">;
|
|
416
|
+
channel: z.ZodString;
|
|
417
|
+
revision: z.ZodNumber;
|
|
418
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
419
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
420
|
+
type: z.ZodLiteral<"state">;
|
|
421
|
+
channel: z.ZodString;
|
|
422
|
+
revision: z.ZodNumber;
|
|
423
|
+
base: z.ZodNumber;
|
|
424
|
+
set: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodArray<z.ZodString>, z.ZodUnknown], null>>>;
|
|
425
|
+
unset: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
426
|
+
}, z.core.$strip>]>;
|
|
427
|
+
readonly response: z.ZodObject<{
|
|
428
|
+
type: z.ZodLiteral<"response">;
|
|
429
|
+
seat: z.ZodString;
|
|
430
|
+
id: z.ZodNumber;
|
|
431
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
432
|
+
}, z.core.$strip>;
|
|
433
|
+
readonly signal: z.ZodObject<{
|
|
434
|
+
type: z.ZodLiteral<"signal">;
|
|
435
|
+
seat: z.ZodOptional<z.ZodString>;
|
|
436
|
+
kind: z.ZodString;
|
|
437
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
438
|
+
}, z.core.$strip>;
|
|
439
|
+
readonly room: z.ZodObject<{
|
|
440
|
+
type: z.ZodLiteral<"room">;
|
|
441
|
+
seats: z.ZodOptional<z.ZodNumber>;
|
|
442
|
+
locked: z.ZodOptional<z.ZodBoolean>;
|
|
443
|
+
}, z.core.$strip>;
|
|
444
|
+
readonly remove: z.ZodObject<{
|
|
445
|
+
type: z.ZodLiteral<"remove">;
|
|
446
|
+
seat: z.ZodString;
|
|
447
|
+
}, z.core.$strip>;
|
|
448
|
+
readonly drop: z.ZodObject<{
|
|
449
|
+
type: z.ZodLiteral<"drop">;
|
|
450
|
+
channel: z.ZodString;
|
|
451
|
+
}, z.core.$strip>;
|
|
452
|
+
readonly activity: z.ZodObject<{
|
|
453
|
+
type: z.ZodLiteral<"activity">;
|
|
454
|
+
activity: z.ZodNullable<z.ZodString>;
|
|
455
|
+
}, z.core.$strip>;
|
|
456
|
+
readonly end: z.ZodObject<{
|
|
457
|
+
type: z.ZodLiteral<"end">;
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
}>>;
|
|
460
|
+
declare const parsePhoneToRoomFrame: (text: string) => ParsedFrame<FramesOf<{
|
|
461
|
+
readonly request: z.ZodObject<{
|
|
462
|
+
type: z.ZodLiteral<"request">;
|
|
463
|
+
id: z.ZodNumber;
|
|
464
|
+
channel: z.ZodString;
|
|
465
|
+
name: z.ZodString;
|
|
466
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
467
|
+
}, z.core.$strip>;
|
|
468
|
+
readonly profile: z.ZodObject<{
|
|
469
|
+
type: z.ZodLiteral<"profile">;
|
|
470
|
+
label: z.ZodOptional<z.ZodString>;
|
|
471
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
472
|
+
}, z.core.$strip>;
|
|
473
|
+
readonly leave: z.ZodObject<{
|
|
474
|
+
type: z.ZodLiteral<"leave">;
|
|
475
|
+
}, z.core.$strip>;
|
|
476
|
+
/** This seat's controls start again from zero, as a newly loaded controller frame's do. */
|
|
477
|
+
readonly baseline: z.ZodObject<{
|
|
478
|
+
type: z.ZodLiteral<"baseline">;
|
|
479
|
+
}, z.core.$strip>;
|
|
480
|
+
}>>;
|
|
481
|
+
declare const parseRoomToHostFrame: (text: string) => ParsedFrame<FramesOf<{
|
|
482
|
+
readonly welcome: z.ZodObject<{
|
|
483
|
+
seatsWanted: z.ZodNumber;
|
|
484
|
+
locked: z.ZodBoolean;
|
|
485
|
+
activity: z.ZodNullable<z.ZodString>;
|
|
486
|
+
type: z.ZodLiteral<"welcome">;
|
|
487
|
+
code: z.ZodString;
|
|
488
|
+
instance: z.ZodString;
|
|
489
|
+
seats: z.ZodArray<z.ZodObject<{
|
|
490
|
+
id: z.ZodString;
|
|
491
|
+
label: z.ZodString;
|
|
492
|
+
color: z.ZodString;
|
|
493
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
494
|
+
kind: z.ZodEnum<{
|
|
495
|
+
phone: "phone";
|
|
496
|
+
preview: "preview";
|
|
497
|
+
agent: "agent";
|
|
498
|
+
}>;
|
|
499
|
+
connected: z.ZodBoolean;
|
|
500
|
+
}, z.core.$strip>>;
|
|
501
|
+
channels: z.ZodArray<z.ZodObject<{
|
|
502
|
+
channel: z.ZodString;
|
|
503
|
+
revision: z.ZodNumber;
|
|
504
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
505
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
506
|
+
private: z.ZodOptional<z.ZodString>;
|
|
507
|
+
}, z.core.$strip>>;
|
|
508
|
+
limits: z.ZodObject<{
|
|
509
|
+
seats: z.ZodNumber;
|
|
510
|
+
channels: z.ZodNumber;
|
|
511
|
+
inputIntervalMs: z.ZodNumber;
|
|
512
|
+
inputBytes: z.ZodNumber;
|
|
513
|
+
inputsPerSecond: z.ZodNumber;
|
|
514
|
+
stateBytes: z.ZodNumber;
|
|
515
|
+
statesPerSecond: z.ZodNumber;
|
|
516
|
+
frameBytes: z.ZodNumber;
|
|
517
|
+
framesPerSecond: z.ZodNumber;
|
|
518
|
+
strikesPerSecond: z.ZodNumber;
|
|
519
|
+
seatHoldMs: z.ZodNumber;
|
|
520
|
+
hostGraceMs: z.ZodNumber;
|
|
521
|
+
maximumAgeMs: z.ZodNumber;
|
|
522
|
+
}, z.core.$strip>;
|
|
523
|
+
features: z.ZodArray<z.ZodString>;
|
|
524
|
+
}, z.core.$strip>;
|
|
525
|
+
readonly wait: z.ZodObject<{
|
|
526
|
+
type: z.ZodLiteral<"wait">;
|
|
527
|
+
position: z.ZodNumber;
|
|
528
|
+
}, z.core.$strip>;
|
|
529
|
+
readonly seat: z.ZodObject<{
|
|
530
|
+
type: z.ZodLiteral<"seat">;
|
|
531
|
+
seat: z.ZodObject<{
|
|
532
|
+
id: z.ZodString;
|
|
533
|
+
label: z.ZodString;
|
|
534
|
+
color: z.ZodString;
|
|
535
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
536
|
+
kind: z.ZodEnum<{
|
|
537
|
+
phone: "phone";
|
|
538
|
+
preview: "preview";
|
|
539
|
+
agent: "agent";
|
|
540
|
+
}>;
|
|
541
|
+
connected: z.ZodBoolean;
|
|
542
|
+
}, z.core.$strip>;
|
|
543
|
+
inputBaseline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
544
|
+
}, z.core.$strip>;
|
|
545
|
+
readonly left: z.ZodObject<{
|
|
546
|
+
type: z.ZodLiteral<"left">;
|
|
547
|
+
seat: z.ZodString;
|
|
548
|
+
}, z.core.$strip>;
|
|
549
|
+
readonly need: z.ZodObject<{
|
|
550
|
+
type: z.ZodLiteral<"need">;
|
|
551
|
+
channel: z.ZodString;
|
|
552
|
+
}, z.core.$strip>;
|
|
553
|
+
readonly request: z.ZodObject<{
|
|
554
|
+
type: z.ZodLiteral<"request">;
|
|
555
|
+
seat: z.ZodString;
|
|
556
|
+
id: z.ZodNumber;
|
|
557
|
+
channel: z.ZodString;
|
|
558
|
+
name: z.ZodString;
|
|
559
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
560
|
+
}, z.core.$strip>;
|
|
561
|
+
}>>;
|
|
562
|
+
declare const parseRoomToPhoneFrame: (text: string) => ParsedFrame<FramesOf<{
|
|
563
|
+
readonly welcome: z.ZodObject<{
|
|
564
|
+
seat: z.ZodString;
|
|
565
|
+
host: z.ZodBoolean;
|
|
566
|
+
type: z.ZodLiteral<"welcome">;
|
|
567
|
+
code: z.ZodString;
|
|
568
|
+
instance: z.ZodString;
|
|
569
|
+
seats: z.ZodArray<z.ZodObject<{
|
|
570
|
+
id: z.ZodString;
|
|
571
|
+
label: z.ZodString;
|
|
572
|
+
color: z.ZodString;
|
|
573
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
574
|
+
kind: z.ZodEnum<{
|
|
575
|
+
phone: "phone";
|
|
576
|
+
preview: "preview";
|
|
577
|
+
agent: "agent";
|
|
578
|
+
}>;
|
|
579
|
+
connected: z.ZodBoolean;
|
|
580
|
+
}, z.core.$strip>>;
|
|
581
|
+
channels: z.ZodArray<z.ZodObject<{
|
|
582
|
+
channel: z.ZodString;
|
|
583
|
+
revision: z.ZodNumber;
|
|
584
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
585
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
586
|
+
private: z.ZodOptional<z.ZodString>;
|
|
587
|
+
}, z.core.$strip>>;
|
|
588
|
+
limits: z.ZodObject<{
|
|
589
|
+
seats: z.ZodNumber;
|
|
590
|
+
channels: z.ZodNumber;
|
|
591
|
+
inputIntervalMs: z.ZodNumber;
|
|
592
|
+
inputBytes: z.ZodNumber;
|
|
593
|
+
inputsPerSecond: z.ZodNumber;
|
|
594
|
+
stateBytes: z.ZodNumber;
|
|
595
|
+
statesPerSecond: z.ZodNumber;
|
|
596
|
+
frameBytes: z.ZodNumber;
|
|
597
|
+
framesPerSecond: z.ZodNumber;
|
|
598
|
+
strikesPerSecond: z.ZodNumber;
|
|
599
|
+
seatHoldMs: z.ZodNumber;
|
|
600
|
+
hostGraceMs: z.ZodNumber;
|
|
601
|
+
maximumAgeMs: z.ZodNumber;
|
|
602
|
+
}, z.core.$strip>;
|
|
603
|
+
features: z.ZodArray<z.ZodString>;
|
|
604
|
+
}, z.core.$strip>;
|
|
605
|
+
readonly seat: z.ZodObject<{
|
|
606
|
+
type: z.ZodLiteral<"seat">;
|
|
607
|
+
seat: z.ZodObject<{
|
|
608
|
+
id: z.ZodString;
|
|
609
|
+
label: z.ZodString;
|
|
610
|
+
color: z.ZodString;
|
|
611
|
+
avatarId: z.ZodOptional<z.ZodString>;
|
|
612
|
+
kind: z.ZodEnum<{
|
|
613
|
+
phone: "phone";
|
|
614
|
+
preview: "preview";
|
|
615
|
+
agent: "agent";
|
|
616
|
+
}>;
|
|
617
|
+
connected: z.ZodBoolean;
|
|
618
|
+
}, z.core.$strip>;
|
|
619
|
+
inputBaseline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
620
|
+
}, z.core.$strip>;
|
|
621
|
+
readonly left: z.ZodObject<{
|
|
622
|
+
type: z.ZodLiteral<"left">;
|
|
623
|
+
seat: z.ZodString;
|
|
624
|
+
}, z.core.$strip>;
|
|
625
|
+
readonly host: z.ZodObject<{
|
|
626
|
+
type: z.ZodLiteral<"host">;
|
|
627
|
+
present: z.ZodBoolean;
|
|
628
|
+
}, z.core.$strip>;
|
|
629
|
+
readonly state: z.ZodUnion<readonly [z.ZodObject<{
|
|
630
|
+
type: z.ZodLiteral<"state">;
|
|
631
|
+
channel: z.ZodString;
|
|
632
|
+
revision: z.ZodNumber;
|
|
633
|
+
document: z.ZodCustom<StateDocument, StateDocument>;
|
|
634
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
635
|
+
type: z.ZodLiteral<"state">;
|
|
636
|
+
channel: z.ZodString;
|
|
637
|
+
revision: z.ZodNumber;
|
|
638
|
+
base: z.ZodNumber;
|
|
639
|
+
set: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodArray<z.ZodString>, z.ZodUnknown], null>>>;
|
|
640
|
+
unset: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
641
|
+
}, z.core.$strip>]>;
|
|
642
|
+
readonly drop: z.ZodObject<{
|
|
643
|
+
type: z.ZodLiteral<"drop">;
|
|
644
|
+
channel: z.ZodString;
|
|
645
|
+
}, z.core.$strip>;
|
|
646
|
+
readonly response: z.ZodUnion<readonly [z.ZodObject<{
|
|
647
|
+
type: z.ZodLiteral<"response">;
|
|
648
|
+
id: z.ZodNumber;
|
|
649
|
+
refused: z.ZodLiteral<"host-away">;
|
|
650
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
651
|
+
type: z.ZodLiteral<"response">;
|
|
652
|
+
id: z.ZodNumber;
|
|
653
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
654
|
+
}, z.core.$strip>]>;
|
|
655
|
+
readonly signal: z.ZodObject<{
|
|
656
|
+
type: z.ZodLiteral<"signal">;
|
|
657
|
+
kind: z.ZodString;
|
|
658
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
659
|
+
}, z.core.$strip>;
|
|
660
|
+
}>>;
|
|
661
|
+
declare const parseHostHello: (text: string) => {
|
|
662
|
+
seats: number;
|
|
663
|
+
type: "hello";
|
|
664
|
+
key: string;
|
|
665
|
+
sdk: string;
|
|
666
|
+
credential?: string | undefined;
|
|
667
|
+
instance?: string | undefined;
|
|
668
|
+
features?: string[] | undefined;
|
|
669
|
+
} | null;
|
|
670
|
+
declare const parsePhoneHello: (text: string) => {
|
|
671
|
+
kind: "phone" | "preview" | "agent";
|
|
672
|
+
type: "hello";
|
|
673
|
+
key: string;
|
|
674
|
+
sdk: string;
|
|
675
|
+
profile?: {
|
|
676
|
+
label?: string | undefined;
|
|
677
|
+
avatarId?: string | undefined;
|
|
678
|
+
localSeatLabel?: string | undefined;
|
|
679
|
+
} | undefined;
|
|
680
|
+
page?: string | undefined;
|
|
681
|
+
instance?: string | undefined;
|
|
682
|
+
features?: string[] | undefined;
|
|
683
|
+
} | null;
|
|
684
|
+
declare const encodeFrame: (frame: HostHello | PhoneHello | HostToRoomFrame | PhoneToRoomFrame | RoomToHostFrame | RoomToPhoneFrame) => string;
|
|
685
|
+
|
|
686
|
+
export { parsePhoneToRoomFrame as A, parseRoomToHostFrame as B, type ChannelCopy as C, parseRoomToPhoneFrame as D, parseHostHello as E, parsePhoneHello as F, encodeFrame as G, type HostHello as H, type StatePath as I, isPlainObject as J, readStatePath as K, diffState as L, MAXIMUM_FRAME_DEPTH as M, isEmptyStatePatch as N, applyStatePatch as O, PING_FRAME as P, ROOM_PROTOCOL_VERSION as R, type SeatView as S, type StateDocument as a, type StatePatch as b, PONG_FRAME as c, type SeatKind as d, seatProfileSchema as e, type SeatProfile as f, type PhoneHello as g, hostHelloSchema as h, hostStateFrameSchema as i, type HostStateFrame as j, hostToRoomFrameSchemas as k, phoneToRoomFrameSchemas as l, type HostToRoomFrame as m, type PhoneToRoomFrame as n, seatViewSchema as o, phoneHelloSchema as p, channelCopySchema as q, roomStateFrameSchema as r, seatKindSchema as s, type RoomStateFrame as t, roomToHostFrameSchemas as u, roomToPhoneFrameSchemas as v, type RoomToHostFrame as w, type RoomToPhoneFrame as x, type ParsedFrame as y, parseHostToRoomFrame as z };
|