@air-jam/sdk 0.9.1 → 0.9.3
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 +25 -45
- package/dist/{agent-tooling-BSMGBix9.d.cts → agent-contract-CD2QnbBJ.d.cts} +1 -1
- package/dist/{agent-tooling-BSMGBix9.d.ts → agent-contract-CD2QnbBJ.d.ts} +1 -1
- package/dist/agent-tooling.cjs +139 -0
- package/dist/agent-tooling.cjs.map +1 -1
- package/dist/agent-tooling.d.cts +25 -1
- package/dist/agent-tooling.d.ts +25 -1
- package/dist/agent-tooling.js +138 -0
- package/dist/agent-tooling.js.map +1 -1
- package/dist/air-jam-context-BlLPvCup.d.cts +175 -0
- package/dist/air-jam-context-DTsxF-tP.d.ts +175 -0
- package/dist/arcade/bridge/controller.cjs +214 -194
- package/dist/arcade/bridge/controller.cjs.map +1 -1
- package/dist/arcade/bridge/controller.d.cts +2 -2
- package/dist/arcade/bridge/controller.d.ts +2 -2
- package/dist/arcade/bridge/controller.js +6 -4
- package/dist/arcade/bridge/host.cjs +1 -1
- package/dist/arcade/bridge/host.cjs.map +1 -1
- package/dist/arcade/bridge/host.d.cts +3 -3
- package/dist/arcade/bridge/host.d.ts +3 -3
- package/dist/arcade/bridge/host.js +4 -3
- package/dist/arcade/bridge/iframe.cjs +1 -1
- package/dist/arcade/bridge/iframe.cjs.map +1 -1
- package/dist/arcade/bridge/iframe.d.cts +2 -2
- package/dist/arcade/bridge/iframe.d.ts +2 -2
- package/dist/arcade/bridge/iframe.js +4 -4
- package/dist/arcade/bridge.cjs +251 -231
- package/dist/arcade/bridge.cjs.map +1 -1
- package/dist/arcade/bridge.d.cts +4 -4
- package/dist/arcade/bridge.d.ts +4 -4
- package/dist/arcade/bridge.js +9 -7
- package/dist/arcade/host.cjs +145 -122
- package/dist/arcade/host.cjs.map +1 -1
- package/dist/arcade/host.d.cts +5 -4
- package/dist/arcade/host.d.ts +5 -4
- package/dist/arcade/host.js +6 -5
- package/dist/arcade/runtime.cjs +6499 -0
- package/dist/arcade/runtime.cjs.map +1 -0
- package/dist/arcade/runtime.d.cts +22 -0
- package/dist/arcade/runtime.d.ts +22 -0
- package/dist/arcade/runtime.js +32 -0
- package/dist/arcade/runtime.js.map +1 -0
- package/dist/arcade/surface.cjs +9 -0
- package/dist/arcade/surface.cjs.map +1 -1
- package/dist/arcade/surface.d.cts +6 -1
- package/dist/arcade/surface.d.ts +6 -1
- package/dist/arcade/surface.js +6 -2
- package/dist/arcade/url.d.cts +4 -4
- package/dist/arcade/url.d.ts +4 -4
- package/dist/arcade/url.js +5 -5
- package/dist/arcade.cjs +322 -292
- package/dist/arcade.cjs.map +1 -1
- package/dist/arcade.d.cts +6 -6
- package/dist/arcade.d.ts +6 -6
- package/dist/arcade.js +35 -29
- package/dist/{chunk-CEJ5RFSG.js → chunk-2SZ2YYGJ.js} +8 -16
- package/dist/chunk-2SZ2YYGJ.js.map +1 -0
- package/dist/{chunk-VKBMZHMQ.js → chunk-32RSSFSF.js} +10 -12
- package/dist/chunk-32RSSFSF.js.map +1 -0
- package/dist/chunk-3YMUAKPU.js +10 -0
- package/dist/chunk-3YMUAKPU.js.map +1 -0
- package/dist/chunk-56DM2KEW.js +14 -0
- package/dist/chunk-56DM2KEW.js.map +1 -0
- package/dist/chunk-CM53YLT5.js +59 -0
- package/dist/chunk-CM53YLT5.js.map +1 -0
- package/dist/{chunk-JEHV5C2X.js → chunk-CV3PBXPT.js} +3 -3
- package/dist/chunk-D4VDEVTZ.js +80 -0
- package/dist/chunk-D4VDEVTZ.js.map +1 -0
- package/dist/{chunk-W3YA5BWR.js → chunk-FUA6EMSJ.js} +24 -60
- package/dist/chunk-FUA6EMSJ.js.map +1 -0
- package/dist/chunk-GMLU7RI5.js +70 -0
- package/dist/chunk-GMLU7RI5.js.map +1 -0
- package/dist/{chunk-NCL6WJCL.js → chunk-IG6GZZSS.js} +32 -1
- package/dist/chunk-IG6GZZSS.js.map +1 -0
- package/dist/{chunk-EDRQIOCV.js → chunk-ITMQSBTH.js} +3 -2
- package/dist/chunk-ITMQSBTH.js.map +1 -0
- package/dist/{chunk-32NYL7XI.js → chunk-J5MCII33.js} +189 -108
- package/dist/chunk-J5MCII33.js.map +1 -0
- package/dist/{chunk-ZLPL2R3R.js → chunk-K4OZ54UD.js} +7 -34
- package/dist/chunk-K4OZ54UD.js.map +1 -0
- package/dist/{chunk-KXAFI5OP.js → chunk-LIHEEAVE.js} +9 -11
- package/dist/chunk-LIHEEAVE.js.map +1 -0
- package/dist/{chunk-FAT2KJ3K.js → chunk-MIMPMB7O.js} +2 -2
- package/dist/{chunk-NUJBMV3O.js → chunk-O6X7FJ6N.js} +29 -32
- package/dist/chunk-O6X7FJ6N.js.map +1 -0
- package/dist/chunk-PSUYTD2L.js +16 -0
- package/dist/chunk-PSUYTD2L.js.map +1 -0
- package/dist/{chunk-7UXSWCZZ.js → chunk-QO4KFUEI.js} +2 -2
- package/dist/chunk-QTLYZADF.js +125 -0
- package/dist/chunk-QTLYZADF.js.map +1 -0
- package/dist/chunk-TTQDHKXL.js +3017 -0
- package/dist/chunk-TTQDHKXL.js.map +1 -0
- package/dist/chunk-UCPY7UJC.js +8 -0
- package/dist/chunk-UCPY7UJC.js.map +1 -0
- package/dist/{chunk-JO2HR5PV.js → chunk-UPV6YWT5.js} +4 -4
- package/dist/chunk-X35LLCWV.js +65 -0
- package/dist/chunk-X35LLCWV.js.map +1 -0
- package/dist/{controller-DxVchfiA.d.ts → controller-PZEM_1cH.d.ts} +6 -2
- package/dist/{controller-Bod8YYr1.d.cts → controller-vj82tKm4.d.cts} +6 -2
- package/dist/{dev-log-events-CVAM29hx.d.cts → dev-log-events-BCJKmygo.d.cts} +0 -3
- package/dist/{dev-log-events-CVAM29hx.d.ts → dev-log-events-BCJKmygo.d.ts} +0 -3
- package/dist/{host-8hmq_Sgc.d.cts → host-B9pRy0Aa.d.cts} +20 -7
- package/dist/{host-Cw-N6e-5.d.ts → host-DylGsX7p.d.ts} +20 -7
- package/dist/index.cjs +4275 -3813
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -642
- package/dist/index.d.ts +40 -642
- package/dist/index.js +1032 -3658
- package/dist/index.js.map +1 -1
- package/dist/metadata.cjs.map +1 -1
- package/dist/metadata.d.cts +2 -3
- package/dist/metadata.d.ts +2 -3
- package/dist/metadata.js.map +1 -1
- package/dist/{notices-CnGaaS8B.d.ts → notices-C4bao3oi.d.ts} +1 -1
- package/dist/{notices-NyDM5Mtz.d.cts → notices-DNdOjwtj.d.cts} +1 -1
- package/dist/platform-machine.cjs +115 -15
- package/dist/platform-machine.cjs.map +1 -1
- package/dist/platform-machine.d.cts +1338 -65
- package/dist/platform-machine.d.ts +1338 -65
- package/dist/platform-machine.js +88 -15
- package/dist/platform-machine.js.map +1 -1
- package/dist/{platform-settings-cuor3i11.d.cts → platform-settings-DUWs4JTy.d.cts} +1 -1
- package/dist/{platform-settings-cuor3i11.d.ts → platform-settings-DUWs4JTy.d.ts} +1 -1
- package/dist/preview.cjs +301 -253
- package/dist/preview.cjs.map +1 -1
- package/dist/preview.d.cts +6 -4
- package/dist/preview.d.ts +6 -4
- package/dist/preview.js +31 -21
- package/dist/preview.js.map +1 -1
- package/dist/protocol.cjs +282 -167
- package/dist/protocol.cjs.map +1 -1
- package/dist/protocol.d.cts +74 -21
- package/dist/protocol.d.ts +74 -21
- package/dist/protocol.js +28 -10
- package/dist/release.cjs +37 -0
- package/dist/release.cjs.map +1 -1
- package/dist/release.d.cts +27 -1
- package/dist/release.d.ts +27 -1
- package/dist/release.js +13 -1
- package/dist/runtime-control.cjs +46 -0
- package/dist/runtime-control.cjs.map +1 -0
- package/dist/runtime-control.d.cts +17 -0
- package/dist/runtime-control.d.ts +17 -0
- package/dist/runtime-control.js +8 -0
- package/dist/runtime-control.js.map +1 -0
- package/dist/runtime-inspection.cjs +655 -0
- package/dist/runtime-inspection.cjs.map +1 -0
- package/dist/runtime-inspection.d.cts +47 -0
- package/dist/runtime-inspection.d.ts +47 -0
- package/dist/runtime-inspection.js +30 -0
- package/dist/runtime-inspection.js.map +1 -0
- package/dist/runtime-reporting-pe-eryVz.d.cts +27 -0
- package/dist/runtime-reporting-pe-eryVz.d.ts +27 -0
- package/dist/signals-ZHftIKuc.d.cts +33 -0
- package/dist/signals-ZHftIKuc.d.ts +33 -0
- package/dist/{standard-match-phase-BucA5dYo.d.ts → standard-match-phase-BzSgBYFg.d.ts} +2 -2
- package/dist/{standard-match-phase-U2ra8J-0.d.cts → standard-match-phase-CvJUW8Oe.d.cts} +2 -2
- package/dist/{sync-B6QsNrXz.d.cts → sync-xtPfWhif.d.cts} +1 -45
- package/dist/{sync-B6QsNrXz.d.ts → sync-xtPfWhif.d.ts} +1 -45
- package/dist/ui.cjs +689 -629
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.d.cts +14 -4
- package/dist/ui.d.ts +14 -4
- package/dist/ui.js +117 -35
- package/dist/ui.js.map +1 -1
- package/dist/use-air-jam-host-COLy8t4s.d.ts +403 -0
- package/dist/use-air-jam-host-DM-ybB3C.d.cts +403 -0
- package/package.json +55 -21
- package/src/agent/agent-contract-conformance.ts +201 -0
- package/src/agent-tooling.ts +5 -0
- package/src/arcade/runtime.ts +6 -0
- package/src/arcade/surface.ts +1 -0
- package/src/components/join-qr-overlay.tsx +115 -31
- package/src/context/air-jam-context.tsx +8 -8
- package/src/context/socket-manager.ts +0 -7
- package/src/dev/browser-log-sink.ts +12 -15
- package/src/events.ts +0 -5
- package/src/hooks/internal/use-controller-runtime-api.ts +110 -21
- package/src/hooks/internal/use-host-runtime-api.ts +306 -49
- package/src/hooks/use-air-jam-controller.ts +9 -9
- package/src/hooks/use-air-jam-host.ts +7 -7
- package/src/hooks/use-get-input.ts +1 -1
- package/src/hooks/use-host-arcade-restore.ts +6 -1
- package/src/hooks/use-host-audio-mute-preference.ts +99 -0
- package/src/index.ts +6 -21
- package/src/metadata/manifest.ts +2 -3
- package/src/platform-machine.ts +109 -12
- package/src/preview/workspace.tsx +48 -29
- package/src/protocol/arcade-platform-actions.ts +19 -1
- package/src/protocol/controller.ts +8 -2
- package/src/protocol/dev-log-events.ts +0 -3
- package/src/protocol/host-grant.ts +58 -140
- package/src/protocol/host.ts +21 -9
- package/src/protocol/runtime-reporting.ts +32 -0
- package/src/protocol/signed-envelope.ts +176 -0
- package/src/protocol/socket-events.ts +8 -10
- package/src/protocol/sync.ts +0 -16
- package/src/protocol.ts +2 -0
- package/src/release.ts +32 -0
- package/src/runtime/admission-retry.ts +62 -0
- package/src/runtime/air-jam-config.ts +6 -16
- package/src/runtime/air-jam-error-boundary.tsx +46 -2
- package/src/runtime/bridge-envelope-args.ts +21 -0
- package/src/runtime/connected-runtime-error-boundary.tsx +31 -0
- package/src/runtime/contracts/control.ts +107 -59
- package/src/runtime/controller-bridge.ts +12 -24
- package/src/runtime/controller-identity.ts +55 -27
- package/src/runtime/controller-realtime-client.ts +8 -47
- package/src/runtime/create-air-jam-app.tsx +21 -13
- package/src/runtime/host-bridge.ts +16 -24
- package/src/runtime/local-reference-game-identity.ts +13 -0
- package/src/runtime/runtime-session-params.ts +4 -64
- package/src/runtime-control.ts +3 -8
- package/src/settings/platform-settings-runtime.tsx +1 -6
- package/src/settings/platform-settings.ts +7 -38
- package/src/state/connection-store.ts +13 -6
- package/src/store/create-air-jam-store.ts +59 -7
- package/src/utils/ids.ts +32 -5
- 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.map +0 -1
- package/dist/chunk-CABEUV65.js +0 -184
- package/dist/chunk-CABEUV65.js.map +0 -1
- package/dist/chunk-CEJ5RFSG.js.map +0 -1
- package/dist/chunk-EDRQIOCV.js.map +0 -1
- package/dist/chunk-KXAFI5OP.js.map +0 -1
- package/dist/chunk-NCL6WJCL.js.map +0 -1
- package/dist/chunk-NUJBMV3O.js.map +0 -1
- package/dist/chunk-VKBMZHMQ.js.map +0 -1
- package/dist/chunk-W3YA5BWR.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/src/capabilities/manifest.ts +0 -71
- package/src/capabilities.ts +0 -12
- package/src/hooks/internal/use-runtime-control-contract.ts +0 -15
- package/src/hooks/internal/use-runtime-observability-contract.ts +0 -24
- package/src/runtime/contracts/observability.ts +0 -94
- package/src/runtime-observability.ts +0 -9
- /package/dist/{chunk-JEHV5C2X.js.map → chunk-CV3PBXPT.js.map} +0 -0
- /package/dist/{chunk-FAT2KJ3K.js.map → chunk-MIMPMB7O.js.map} +0 -0
- /package/dist/{chunk-7UXSWCZZ.js.map → chunk-QO4KFUEI.js.map} +0 -0
- /package/dist/{chunk-JO2HR5PV.js.map → chunk-UPV6YWT5.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { R as RoomPlatformSettingsSnapshot } from './platform-settings-
|
|
2
|
+
import { R as RoomPlatformSettingsSnapshot } from './platform-settings-DUWs4JTy.cjs';
|
|
3
3
|
|
|
4
4
|
type RoomCode = string;
|
|
5
5
|
type ConnectionRole = "host" | "controller";
|
|
@@ -89,6 +89,7 @@ declare const controllerJoinSchema: z.ZodObject<{
|
|
|
89
89
|
nickname: z.ZodOptional<z.ZodString>;
|
|
90
90
|
avatarId: z.ZodOptional<z.ZodString>;
|
|
91
91
|
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
92
|
+
resumeCapabilityToken: z.ZodOptional<z.ZodString>;
|
|
92
93
|
}, z.core.$strip>;
|
|
93
94
|
type ControllerJoinPayload = z.infer<typeof controllerJoinSchema>;
|
|
94
95
|
declare const controllerLeaveSchema: z.ZodObject<{
|
|
@@ -142,8 +143,11 @@ interface ControllerJoinAck {
|
|
|
142
143
|
controllerId?: string;
|
|
143
144
|
roomId?: RoomCode;
|
|
144
145
|
resumed?: boolean;
|
|
146
|
+
/** Private to the joining client; never publish in presence or bridge state. */
|
|
147
|
+
resumeCapabilityToken?: string;
|
|
145
148
|
message?: string;
|
|
146
149
|
code?: ErrorCode | string;
|
|
150
|
+
retryAfterSeconds?: number;
|
|
147
151
|
}
|
|
148
152
|
declare const controllerPrivilegedGrantSchema: z.ZodEnum<{
|
|
149
153
|
system: "system";
|
|
@@ -169,4 +173,4 @@ interface ControllerSocketAuthority {
|
|
|
169
173
|
privilegedGrants: ControllerPrivilegedGrant[];
|
|
170
174
|
}
|
|
171
175
|
|
|
172
|
-
export {
|
|
176
|
+
export { controllerLeaveSchema as A, controllerSystemSchema as B, type ControllerPrivilegedCapability as C, playerProfilePatchSchema as D, ErrorCode as E, controllerUpdatePlayerProfileSchema as F, controllerPrivilegedGrantSchema as G, type ControllerPrivilegedGrant as H, controllerPrivilegedCapabilitySchema as I, type ConnectionRole as J, roomCodeSchema as K, type PlayerProfile as P, type RoomCode as R, type ServerErrorPayload as S, VIRTUAL_CONTROLLER_DEVICE_ID_PREFIX as V, type ControllerSource as a, type ConnectionStatus as b, type RuntimeState as c, type ControllerOrientation as d, type RunMode as e, type ControllerRoomSettingsState as f, type PlayerProfilePatch as g, type ControllerUpdatePlayerProfileAck as h, type ControllerLeaveAck as i, type ControllerStatePayload as j, type ControllerStateMessage as k, type ControllerJoinPayload as l, type ControllerJoinAck as m, type ControllerUpdatePlayerProfilePayload as n, type ControllerLeavePayload as o, type ControllerInputEvent as p, type ControllerSystemPayload as q, type ControllerSocketAuthority as r, controllerInputSchema as s, type ControllerInputPayload as t, controllerOrientationSchema as u, controllerSourceSchema as v, PREVIEW_CONTROLLER_DEVICE_ID_PREFIX as w, inferControllerSourceFromDeviceId as x, controllerStateSchema as y, controllerJoinSchema as z };
|
|
@@ -15,7 +15,6 @@ declare const AIRJAM_DEV_LOG_EVENTS: {
|
|
|
15
15
|
readonly modeMasterKey: "auth.mode.master_key";
|
|
16
16
|
readonly modeDatabaseAndHostGrant: "auth.mode.database_and_host_grant";
|
|
17
17
|
readonly modeDatabase: "auth.mode.database";
|
|
18
|
-
readonly modeHostGrantOnly: "auth.mode.host_grant_only";
|
|
19
18
|
readonly backendMissing: "auth.backend.missing";
|
|
20
19
|
readonly appIdLastUsedAtUpdateFailed: "auth.app_id_last_used_at_update.failed";
|
|
21
20
|
readonly appIdVerificationDatabaseError: "auth.app_id_verification.database_error";
|
|
@@ -59,8 +58,6 @@ declare const AIRJAM_DEV_LOG_EVENTS: {
|
|
|
59
58
|
readonly bootstrapRejected: "host.bootstrap.rejected";
|
|
60
59
|
readonly disconnectPendingRoomClose: "host.disconnect.pending_room_close";
|
|
61
60
|
readonly disconnectRoomClosed: "host.disconnect.room_closed";
|
|
62
|
-
readonly registerSystemAccepted: "host.register_system.accepted";
|
|
63
|
-
readonly registerSystemRejected: "host.register_system.rejected";
|
|
64
61
|
readonly createRoomAccepted: "host.create_room.accepted";
|
|
65
62
|
readonly createRoomRejected: "host.create_room.rejected";
|
|
66
63
|
readonly reconnectAccepted: "host.reconnect.accepted";
|
|
@@ -15,7 +15,6 @@ declare const AIRJAM_DEV_LOG_EVENTS: {
|
|
|
15
15
|
readonly modeMasterKey: "auth.mode.master_key";
|
|
16
16
|
readonly modeDatabaseAndHostGrant: "auth.mode.database_and_host_grant";
|
|
17
17
|
readonly modeDatabase: "auth.mode.database";
|
|
18
|
-
readonly modeHostGrantOnly: "auth.mode.host_grant_only";
|
|
19
18
|
readonly backendMissing: "auth.backend.missing";
|
|
20
19
|
readonly appIdLastUsedAtUpdateFailed: "auth.app_id_last_used_at_update.failed";
|
|
21
20
|
readonly appIdVerificationDatabaseError: "auth.app_id_verification.database_error";
|
|
@@ -59,8 +58,6 @@ declare const AIRJAM_DEV_LOG_EVENTS: {
|
|
|
59
58
|
readonly bootstrapRejected: "host.bootstrap.rejected";
|
|
60
59
|
readonly disconnectPendingRoomClose: "host.disconnect.pending_room_close";
|
|
61
60
|
readonly disconnectRoomClosed: "host.disconnect.room_closed";
|
|
62
|
-
readonly registerSystemAccepted: "host.register_system.accepted";
|
|
63
|
-
readonly registerSystemRejected: "host.register_system.rejected";
|
|
64
61
|
readonly createRoomAccepted: "host.create_room.accepted";
|
|
65
62
|
readonly createRoomRejected: "host.create_room.rejected";
|
|
66
63
|
readonly reconnectAccepted: "host.reconnect.accepted";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { E as ErrorCode, R as RoomCode, P as PlayerProfile, C as ControllerPrivilegedCapability } from './controller-
|
|
3
|
-
import { C as ControllerPresenceNotice } from './notices-
|
|
2
|
+
import { E as ErrorCode, R as RoomCode, P as PlayerProfile, C as ControllerPrivilegedCapability } from './controller-vj82tKm4.cjs';
|
|
3
|
+
import { C as ControllerPresenceNotice } from './notices-DNdOjwtj.cjs';
|
|
4
4
|
|
|
5
5
|
declare const hostSessionKindSchema: z.ZodEnum<{
|
|
6
6
|
system: "system";
|
|
@@ -12,6 +12,16 @@ declare const childHostCapabilitySchema: z.ZodObject<{
|
|
|
12
12
|
expiresAt: z.ZodNumber;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
type ChildHostCapability = z.infer<typeof childHostCapabilitySchema>;
|
|
15
|
+
declare const hostResumeCapabilitySchema: z.ZodObject<{
|
|
16
|
+
token: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
type HostResumeCapability = z.infer<typeof hostResumeCapabilitySchema>;
|
|
19
|
+
interface HostArcadeSurfaceCheckpoint {
|
|
20
|
+
/** Last Arcade surface epoch accepted by the room before this reconnect. */
|
|
21
|
+
epoch: number;
|
|
22
|
+
/** Last replicated Arcade surface revision accepted by the room. */
|
|
23
|
+
revision: number;
|
|
24
|
+
}
|
|
15
25
|
/**
|
|
16
26
|
* Active arcade game session as seen by the server (launch capability + catalog id).
|
|
17
27
|
* Returned on host reconnect so the platform can restore iframe + replicated surface after refresh.
|
|
@@ -25,14 +35,19 @@ interface HostRegistrationAck {
|
|
|
25
35
|
roomId?: RoomCode;
|
|
26
36
|
message?: string;
|
|
27
37
|
code?: ErrorCode | string;
|
|
38
|
+
retryAfterSeconds?: number;
|
|
28
39
|
/** When reconnecting, present if the room still has a launched game (launch pending or active). */
|
|
29
40
|
arcadeSession?: HostArcadeSessionSnapshot;
|
|
41
|
+
/** Last observed Arcade counters, used to keep a reconnect monotonic. */
|
|
42
|
+
arcadeSurfaceCheckpoint?: HostArcadeSurfaceCheckpoint;
|
|
30
43
|
/** Authoritative controller roster snapshot for the connected room. */
|
|
31
44
|
players?: PlayerProfile[];
|
|
32
45
|
/** Authoritative controller-session roster for the connected room. */
|
|
33
46
|
controllers?: ControllerPresenceNotice[];
|
|
34
47
|
/** Official Air Jam controller capability bundle for privileged controller channels. */
|
|
35
48
|
controllerCapability?: ControllerPrivilegedCapability;
|
|
49
|
+
/** Bearer capability required to reclaim this room after the master socket disconnects. */
|
|
50
|
+
hostResumeCapability?: HostResumeCapability;
|
|
36
51
|
}
|
|
37
52
|
interface HostBootstrapAck {
|
|
38
53
|
ok: boolean;
|
|
@@ -43,6 +58,7 @@ interface HostBootstrapAck {
|
|
|
43
58
|
interface HostSocketAuthority {
|
|
44
59
|
appId?: string;
|
|
45
60
|
gameId?: string;
|
|
61
|
+
creatorId?: string;
|
|
46
62
|
traceId: string;
|
|
47
63
|
verifiedAt: number;
|
|
48
64
|
verifiedVia?: "appId" | "hostGrant";
|
|
@@ -58,10 +74,6 @@ declare const hostBootstrapSchema: z.ZodObject<{
|
|
|
58
74
|
}>>;
|
|
59
75
|
}, z.core.$strip>;
|
|
60
76
|
type HostBootstrapPayload = z.infer<typeof hostBootstrapSchema>;
|
|
61
|
-
declare const hostRegisterSystemSchema: z.ZodObject<{
|
|
62
|
-
roomId: z.ZodString;
|
|
63
|
-
}, z.core.$strip>;
|
|
64
|
-
type HostRegisterSystemPayload = z.infer<typeof hostRegisterSystemSchema>;
|
|
65
77
|
declare const systemLaunchGameSchema: z.ZodObject<{
|
|
66
78
|
roomId: z.ZodString;
|
|
67
79
|
gameId: z.ZodString;
|
|
@@ -83,6 +95,7 @@ declare const hostCreateRoomSchema: z.ZodObject<{
|
|
|
83
95
|
type HostCreateRoomPayload = z.infer<typeof hostCreateRoomSchema>;
|
|
84
96
|
declare const hostReconnectSchema: z.ZodObject<{
|
|
85
97
|
roomId: z.ZodString;
|
|
98
|
+
resumeCapabilityToken: z.ZodString;
|
|
86
99
|
}, z.core.$strip>;
|
|
87
100
|
type HostReconnectPayload = z.infer<typeof hostReconnectSchema>;
|
|
88
101
|
declare const hostResetRoomSchema: z.ZodObject<{
|
|
@@ -106,4 +119,4 @@ interface SystemLaunchGameAck {
|
|
|
106
119
|
code?: ErrorCode | string;
|
|
107
120
|
}
|
|
108
121
|
|
|
109
|
-
export { type ChildHostCapability as C, type
|
|
122
|
+
export { type ChildHostCapability as C, type HostSessionKind as H, type SystemLaunchGamePayload as S, type HostControllerActionAck as a, type HostRegistrationAck as b, type HostBootstrapPayload as c, type HostBootstrapAck as d, type HostCreateRoomPayload as e, type HostReconnectPayload as f, type HostResetRoomPayload as g, type HostRemoveControllerPayload as h, type SystemLaunchGameAck as i, type HostJoinAsChildPayload as j, type HostActivateEmbeddedGamePayload as k, type HostSocketAuthority as l, hostSessionKindSchema as m, childHostCapabilitySchema as n, hostResumeCapabilitySchema as o, type HostResumeCapability as p, type HostArcadeSurfaceCheckpoint as q, type HostArcadeSessionSnapshot as r, hostBootstrapSchema as s, systemLaunchGameSchema as t, hostJoinAsChildSchema as u, hostActivateEmbeddedGameSchema as v, hostCreateRoomSchema as w, hostReconnectSchema as x, hostResetRoomSchema as y, hostRemoveControllerSchema as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { E as ErrorCode, R as RoomCode, P as PlayerProfile, C as ControllerPrivilegedCapability } from './controller-
|
|
3
|
-
import { C as ControllerPresenceNotice } from './notices-
|
|
2
|
+
import { E as ErrorCode, R as RoomCode, P as PlayerProfile, C as ControllerPrivilegedCapability } from './controller-PZEM_1cH.js';
|
|
3
|
+
import { C as ControllerPresenceNotice } from './notices-C4bao3oi.js';
|
|
4
4
|
|
|
5
5
|
declare const hostSessionKindSchema: z.ZodEnum<{
|
|
6
6
|
system: "system";
|
|
@@ -12,6 +12,16 @@ declare const childHostCapabilitySchema: z.ZodObject<{
|
|
|
12
12
|
expiresAt: z.ZodNumber;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
type ChildHostCapability = z.infer<typeof childHostCapabilitySchema>;
|
|
15
|
+
declare const hostResumeCapabilitySchema: z.ZodObject<{
|
|
16
|
+
token: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
type HostResumeCapability = z.infer<typeof hostResumeCapabilitySchema>;
|
|
19
|
+
interface HostArcadeSurfaceCheckpoint {
|
|
20
|
+
/** Last Arcade surface epoch accepted by the room before this reconnect. */
|
|
21
|
+
epoch: number;
|
|
22
|
+
/** Last replicated Arcade surface revision accepted by the room. */
|
|
23
|
+
revision: number;
|
|
24
|
+
}
|
|
15
25
|
/**
|
|
16
26
|
* Active arcade game session as seen by the server (launch capability + catalog id).
|
|
17
27
|
* Returned on host reconnect so the platform can restore iframe + replicated surface after refresh.
|
|
@@ -25,14 +35,19 @@ interface HostRegistrationAck {
|
|
|
25
35
|
roomId?: RoomCode;
|
|
26
36
|
message?: string;
|
|
27
37
|
code?: ErrorCode | string;
|
|
38
|
+
retryAfterSeconds?: number;
|
|
28
39
|
/** When reconnecting, present if the room still has a launched game (launch pending or active). */
|
|
29
40
|
arcadeSession?: HostArcadeSessionSnapshot;
|
|
41
|
+
/** Last observed Arcade counters, used to keep a reconnect monotonic. */
|
|
42
|
+
arcadeSurfaceCheckpoint?: HostArcadeSurfaceCheckpoint;
|
|
30
43
|
/** Authoritative controller roster snapshot for the connected room. */
|
|
31
44
|
players?: PlayerProfile[];
|
|
32
45
|
/** Authoritative controller-session roster for the connected room. */
|
|
33
46
|
controllers?: ControllerPresenceNotice[];
|
|
34
47
|
/** Official Air Jam controller capability bundle for privileged controller channels. */
|
|
35
48
|
controllerCapability?: ControllerPrivilegedCapability;
|
|
49
|
+
/** Bearer capability required to reclaim this room after the master socket disconnects. */
|
|
50
|
+
hostResumeCapability?: HostResumeCapability;
|
|
36
51
|
}
|
|
37
52
|
interface HostBootstrapAck {
|
|
38
53
|
ok: boolean;
|
|
@@ -43,6 +58,7 @@ interface HostBootstrapAck {
|
|
|
43
58
|
interface HostSocketAuthority {
|
|
44
59
|
appId?: string;
|
|
45
60
|
gameId?: string;
|
|
61
|
+
creatorId?: string;
|
|
46
62
|
traceId: string;
|
|
47
63
|
verifiedAt: number;
|
|
48
64
|
verifiedVia?: "appId" | "hostGrant";
|
|
@@ -58,10 +74,6 @@ declare const hostBootstrapSchema: z.ZodObject<{
|
|
|
58
74
|
}>>;
|
|
59
75
|
}, z.core.$strip>;
|
|
60
76
|
type HostBootstrapPayload = z.infer<typeof hostBootstrapSchema>;
|
|
61
|
-
declare const hostRegisterSystemSchema: z.ZodObject<{
|
|
62
|
-
roomId: z.ZodString;
|
|
63
|
-
}, z.core.$strip>;
|
|
64
|
-
type HostRegisterSystemPayload = z.infer<typeof hostRegisterSystemSchema>;
|
|
65
77
|
declare const systemLaunchGameSchema: z.ZodObject<{
|
|
66
78
|
roomId: z.ZodString;
|
|
67
79
|
gameId: z.ZodString;
|
|
@@ -83,6 +95,7 @@ declare const hostCreateRoomSchema: z.ZodObject<{
|
|
|
83
95
|
type HostCreateRoomPayload = z.infer<typeof hostCreateRoomSchema>;
|
|
84
96
|
declare const hostReconnectSchema: z.ZodObject<{
|
|
85
97
|
roomId: z.ZodString;
|
|
98
|
+
resumeCapabilityToken: z.ZodString;
|
|
86
99
|
}, z.core.$strip>;
|
|
87
100
|
type HostReconnectPayload = z.infer<typeof hostReconnectSchema>;
|
|
88
101
|
declare const hostResetRoomSchema: z.ZodObject<{
|
|
@@ -106,4 +119,4 @@ interface SystemLaunchGameAck {
|
|
|
106
119
|
code?: ErrorCode | string;
|
|
107
120
|
}
|
|
108
121
|
|
|
109
|
-
export { type ChildHostCapability as C, type
|
|
122
|
+
export { type ChildHostCapability as C, type HostSessionKind as H, type SystemLaunchGamePayload as S, type HostControllerActionAck as a, type HostRegistrationAck as b, type HostBootstrapPayload as c, type HostBootstrapAck as d, type HostCreateRoomPayload as e, type HostReconnectPayload as f, type HostResetRoomPayload as g, type HostRemoveControllerPayload as h, type SystemLaunchGameAck as i, type HostJoinAsChildPayload as j, type HostActivateEmbeddedGamePayload as k, type HostSocketAuthority as l, hostSessionKindSchema as m, childHostCapabilitySchema as n, hostResumeCapabilitySchema as o, type HostResumeCapability as p, type HostArcadeSurfaceCheckpoint as q, type HostArcadeSessionSnapshot as r, hostBootstrapSchema as s, systemLaunchGameSchema as t, hostJoinAsChildSchema as u, hostActivateEmbeddedGameSchema as v, hostCreateRoomSchema as w, hostReconnectSchema as x, hostResetRoomSchema as y, hostRemoveControllerSchema as z };
|