@air-jam/devtools 0.0.0-stage → 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.
Files changed (256) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +112 -2
  3. package/dist/chunk-2O67AXCU.js +470 -0
  4. package/dist/chunk-2O67AXCU.js.map +1 -0
  5. package/dist/chunk-AO3ZDXF6.js +142 -0
  6. package/dist/chunk-AO3ZDXF6.js.map +1 -0
  7. package/dist/chunk-ART5TEYT.js +472 -0
  8. package/dist/chunk-ART5TEYT.js.map +1 -0
  9. package/dist/chunk-ASC2CK2R.js +77 -0
  10. package/dist/chunk-ASC2CK2R.js.map +1 -0
  11. package/dist/chunk-E3UZZGAV.js +50 -0
  12. package/dist/chunk-E3UZZGAV.js.map +1 -0
  13. package/dist/chunk-EJTE7UKX.js +64 -0
  14. package/dist/chunk-EJTE7UKX.js.map +1 -0
  15. package/dist/chunk-ESFKNN75.js +110 -0
  16. package/dist/chunk-ESFKNN75.js.map +1 -0
  17. package/dist/chunk-EU7A6PXW.js +1339 -0
  18. package/dist/chunk-EU7A6PXW.js.map +1 -0
  19. package/dist/chunk-FN7E6EA7.js +549 -0
  20. package/dist/chunk-FN7E6EA7.js.map +1 -0
  21. package/dist/chunk-GDFAWHGA.js +190 -0
  22. package/dist/chunk-GDFAWHGA.js.map +1 -0
  23. package/dist/chunk-HZUGBH4Y.js +347 -0
  24. package/dist/chunk-HZUGBH4Y.js.map +1 -0
  25. package/dist/chunk-ITKAOEGX.js +93 -0
  26. package/dist/chunk-ITKAOEGX.js.map +1 -0
  27. package/dist/chunk-JBCUTWRI.js +897 -0
  28. package/dist/chunk-JBCUTWRI.js.map +1 -0
  29. package/dist/chunk-JSI5S4WP.js +1174 -0
  30. package/dist/chunk-JSI5S4WP.js.map +1 -0
  31. package/dist/chunk-L4D675BG.js +97 -0
  32. package/dist/chunk-L4D675BG.js.map +1 -0
  33. package/dist/chunk-M6CJ7GQC.js +133 -0
  34. package/dist/chunk-M6CJ7GQC.js.map +1 -0
  35. package/dist/chunk-MEIMOSZC.js +749 -0
  36. package/dist/chunk-MEIMOSZC.js.map +1 -0
  37. package/dist/chunk-O3XG3FNL.js +1014 -0
  38. package/dist/chunk-O3XG3FNL.js.map +1 -0
  39. package/dist/chunk-OM6SCJ7H.js +18 -0
  40. package/dist/chunk-OM6SCJ7H.js.map +1 -0
  41. package/dist/chunk-PKD4WVX5.js +63 -0
  42. package/dist/chunk-PKD4WVX5.js.map +1 -0
  43. package/dist/chunk-PMBLXGFM.js +3384 -0
  44. package/dist/chunk-PMBLXGFM.js.map +1 -0
  45. package/dist/chunk-PMNE5GIN.js +279 -0
  46. package/dist/chunk-PMNE5GIN.js.map +1 -0
  47. package/dist/chunk-QAWI64VR.js +148 -0
  48. package/dist/chunk-QAWI64VR.js.map +1 -0
  49. package/dist/chunk-QGADSPHZ.js +449 -0
  50. package/dist/chunk-QGADSPHZ.js.map +1 -0
  51. package/dist/chunk-SPYN66UV.js +338 -0
  52. package/dist/chunk-SPYN66UV.js.map +1 -0
  53. package/dist/context.d.ts +19 -0
  54. package/dist/context.js +10 -0
  55. package/dist/context.js.map +1 -0
  56. package/dist/controller.d.ts +67 -0
  57. package/dist/controller.js +40 -0
  58. package/dist/controller.js.map +1 -0
  59. package/dist/dependencies.d.ts +44 -0
  60. package/dist/dependencies.js +10 -0
  61. package/dist/dependencies.js.map +1 -0
  62. package/dist/dev.d.ts +21 -0
  63. package/dist/dev.js +19 -0
  64. package/dist/dev.js.map +1 -0
  65. package/dist/game-builds.d.ts +200 -0
  66. package/dist/game-builds.js +16 -0
  67. package/dist/game-builds.js.map +1 -0
  68. package/dist/game-run-watch-CEd_SpAT.d.ts +84 -0
  69. package/dist/game-runs.d.ts +1452 -0
  70. package/dist/game-runs.js +76 -0
  71. package/dist/game-runs.js.map +1 -0
  72. package/dist/game-session-broker-CUvORfMd.d.ts +439 -0
  73. package/dist/game-session-broker.d.ts +4 -0
  74. package/dist/game-session-broker.js +40 -0
  75. package/dist/game-session-broker.js.map +1 -0
  76. package/dist/game-session.d.ts +3934 -0
  77. package/dist/game-session.js +195 -0
  78. package/dist/game-session.js.map +1 -0
  79. package/dist/game-settings.d.ts +16 -0
  80. package/dist/game-settings.js +237 -0
  81. package/dist/game-settings.js.map +1 -0
  82. package/dist/games.d.ts +28 -0
  83. package/dist/games.js +16 -0
  84. package/dist/games.js.map +1 -0
  85. package/dist/harness/visual.d.ts +204 -0
  86. package/dist/harness/visual.js +46 -0
  87. package/dist/harness/visual.js.map +1 -0
  88. package/dist/logs.d.ts +15 -0
  89. package/dist/logs.js +57 -0
  90. package/dist/logs.js.map +1 -0
  91. package/dist/managed-process-scope-BicYi_t9.d.ts +3 -0
  92. package/dist/mcp-config.d.ts +63 -0
  93. package/dist/mcp-config.js +191 -0
  94. package/dist/mcp-config.js.map +1 -0
  95. package/dist/platform-auth.d.ts +9 -0
  96. package/dist/platform-auth.js +45 -0
  97. package/dist/platform-auth.js.map +1 -0
  98. package/dist/platform-game-analytics.d.ts +51 -0
  99. package/dist/platform-game-analytics.js +49 -0
  100. package/dist/platform-game-analytics.js.map +1 -0
  101. package/dist/platform-game-app-id.d.ts +46 -0
  102. package/dist/platform-game-app-id.js +93 -0
  103. package/dist/platform-game-app-id.js.map +1 -0
  104. package/dist/platform-game-media.d.ts +347 -0
  105. package/dist/platform-game-media.js +168 -0
  106. package/dist/platform-game-media.js.map +1 -0
  107. package/dist/platform-games.d.ts +87 -0
  108. package/dist/platform-games.js +183 -0
  109. package/dist/platform-games.js.map +1 -0
  110. package/dist/quality.d.ts +16 -0
  111. package/dist/quality.js +62 -0
  112. package/dist/quality.js.map +1 -0
  113. package/dist/release.d.ts +1304 -0
  114. package/dist/release.js +34 -0
  115. package/dist/release.js.map +1 -0
  116. package/dist/rooms-check.d.ts +90 -0
  117. package/dist/rooms-check.js +717 -0
  118. package/dist/rooms-check.js.map +1 -0
  119. package/dist/source-tree-contract.d.ts +16 -0
  120. package/dist/source-tree-contract.js +13 -0
  121. package/dist/source-tree-contract.js.map +1 -0
  122. package/dist/testing.d.ts +464 -0
  123. package/dist/testing.js +27 -0
  124. package/dist/testing.js.map +1 -0
  125. package/dist/tooling/describe-game.d.ts +2 -0
  126. package/dist/tooling/describe-game.js +54 -0
  127. package/dist/tooling/describe-game.js.map +1 -0
  128. package/dist/tooling/game-session-broker.d.ts +2 -0
  129. package/dist/tooling/game-session-broker.js +28 -0
  130. package/dist/tooling/game-session-broker.js.map +1 -0
  131. package/dist/tooling/hold-runtime-host.d.ts +2 -0
  132. package/dist/tooling/hold-runtime-host.js +931 -0
  133. package/dist/tooling/hold-runtime-host.js.map +1 -0
  134. package/dist/tooling/list-visual-scenarios.d.ts +2 -0
  135. package/dist/tooling/list-visual-scenarios.js +25 -0
  136. package/dist/tooling/list-visual-scenarios.js.map +1 -0
  137. package/dist/tooling/managed-dev-supervisor.d.ts +2 -0
  138. package/dist/tooling/managed-dev-supervisor.js +51 -0
  139. package/dist/tooling/managed-dev-supervisor.js.map +1 -0
  140. package/dist/tooling/process-scope-bootstrap.mjs +24 -0
  141. package/dist/tooling/process-scope-guard.d.ts +2 -0
  142. package/dist/tooling/process-scope-guard.js +388 -0
  143. package/dist/tooling/process-scope-guard.js.map +1 -0
  144. package/dist/tooling/process-scope-windows.ps1 +148 -0
  145. package/dist/tooling/rooms-check-device.d.ts +2 -0
  146. package/dist/tooling/rooms-check-device.js +498 -0
  147. package/dist/tooling/rooms-check-device.js.map +1 -0
  148. package/dist/tooling/run-headless-room.d.ts +2 -0
  149. package/dist/tooling/run-headless-room.js +287 -0
  150. package/dist/tooling/run-headless-room.js.map +1 -0
  151. package/dist/tooling/run-test-profile.d.ts +2 -0
  152. package/dist/tooling/run-test-profile.js +181 -0
  153. package/dist/tooling/run-test-profile.js.map +1 -0
  154. package/dist/tooling/run-visual-capture.d.ts +2 -0
  155. package/dist/tooling/run-visual-capture.js +203 -0
  156. package/dist/tooling/run-visual-capture.js.map +1 -0
  157. package/dist/tooling/seal-game-build.d.ts +2 -0
  158. package/dist/tooling/seal-game-build.js +120 -0
  159. package/dist/tooling/seal-game-build.js.map +1 -0
  160. package/dist/types-CdYrgrG_.d.ts +1036 -0
  161. package/dist/types-DyRD-ym1.d.ts +141 -0
  162. package/dist/visual.d.ts +21 -0
  163. package/dist/visual.js +219 -0
  164. package/dist/visual.js.map +1 -0
  165. package/package.json +150 -3
  166. package/src/bounded-response.ts +28 -0
  167. package/src/built-game-runtime.ts +152 -0
  168. package/src/commands.ts +40 -0
  169. package/src/context.ts +218 -0
  170. package/src/controller-protocol.ts +22 -0
  171. package/src/controller.ts +1526 -0
  172. package/src/current-room-host.ts +166 -0
  173. package/src/decision-provider.ts +102 -0
  174. package/src/dependencies.ts +176 -0
  175. package/src/dependency-install-contract.ts +12 -0
  176. package/src/dev.ts +995 -0
  177. package/src/fs-utils.ts +93 -0
  178. package/src/game-action-observation.ts +106 -0
  179. package/src/game-build-protocol.ts +72 -0
  180. package/src/game-build.ts +483 -0
  181. package/src/game-run-owner.ts +2358 -0
  182. package/src/game-run-protocol.ts +448 -0
  183. package/src/game-run-record.ts +92 -0
  184. package/src/game-run-replay.ts +95 -0
  185. package/src/game-run-watch.ts +155 -0
  186. package/src/game-session-broker.ts +793 -0
  187. package/src/game-session-operations.ts +61 -0
  188. package/src/game-session-protocol.ts +180 -0
  189. package/src/game-session-runtime.ts +861 -0
  190. package/src/game-session.ts +206 -0
  191. package/src/game-settings.ts +295 -0
  192. package/src/games.ts +262 -0
  193. package/src/harness/visual/browser.ts +100 -0
  194. package/src/harness/visual/controller-observation.ts +181 -0
  195. package/src/harness/visual/prefab-contract.ts +29 -0
  196. package/src/harness/visual/prefab-runner.ts +178 -0
  197. package/src/harness/visual/runner.ts +549 -0
  198. package/src/harness/visual/runtime-controller-observations.ts +151 -0
  199. package/src/harness/visual/scenario-contract.ts +8 -0
  200. package/src/harness/visual/scenario-helpers.ts +67 -0
  201. package/src/harness/visual/screencast.ts +155 -0
  202. package/src/harness/visual/session.ts +400 -0
  203. package/src/harness/visual/types.ts +184 -0
  204. package/src/harness/visual.ts +7 -0
  205. package/src/headless-room-protocol.ts +112 -0
  206. package/src/headless-room.ts +222 -0
  207. package/src/helper-channel.ts +229 -0
  208. package/src/helper-scripts.ts +69 -0
  209. package/src/installed-dependencies.ts +74 -0
  210. package/src/logs.ts +67 -0
  211. package/src/managed-process-scope.ts +481 -0
  212. package/src/mcp-config.ts +262 -0
  213. package/src/node-process-environment.ts +10 -0
  214. package/src/platform-auth.ts +594 -0
  215. package/src/platform-game-analytics.ts +50 -0
  216. package/src/platform-game-app-id.ts +99 -0
  217. package/src/platform-game-media.ts +209 -0
  218. package/src/platform-games.ts +217 -0
  219. package/src/policy-artifact-contract.ts +52 -0
  220. package/src/policy-artifacts.ts +134 -0
  221. package/src/process-scope-admission.ts +50 -0
  222. package/src/process-scope-protocol.ts +66 -0
  223. package/src/process-scope.ts +327 -0
  224. package/src/quality.ts +82 -0
  225. package/src/release.ts +1683 -0
  226. package/src/rooms-check-fleet.ts +194 -0
  227. package/src/rooms-check-link.ts +138 -0
  228. package/src/rooms-check-protocol.ts +244 -0
  229. package/src/rooms-check.ts +797 -0
  230. package/src/runtime-owner-protocol.ts +218 -0
  231. package/src/source-tree-contract.ts +70 -0
  232. package/src/source-tree.ts +84 -0
  233. package/src/test-profile-process.ts +153 -0
  234. package/src/test-profile-protocol.ts +116 -0
  235. package/src/testing.ts +430 -0
  236. package/src/tooling/declaration-hook.ts +52 -0
  237. package/src/tooling/describe-game.ts +49 -0
  238. package/src/tooling/game-session-broker.ts +7 -0
  239. package/src/tooling/hold-runtime-host.ts +441 -0
  240. package/src/tooling/list-visual-scenarios.ts +21 -0
  241. package/src/tooling/load-game.ts +79 -0
  242. package/src/tooling/managed-dev-supervisor.ts +71 -0
  243. package/src/tooling/process-scope-bootstrap.mjs +24 -0
  244. package/src/tooling/process-scope-guard.ts +213 -0
  245. package/src/tooling/process-scope-windows.ps1 +148 -0
  246. package/src/tooling/rooms-check-device.ts +493 -0
  247. package/src/tooling/run-headless-room.ts +326 -0
  248. package/src/tooling/run-test-profile.ts +190 -0
  249. package/src/tooling/run-visual-capture.ts +231 -0
  250. package/src/tooling/runtime-owner-actions.ts +65 -0
  251. package/src/tooling/seal-game-build.ts +118 -0
  252. package/src/tooling/visual-pack.ts +11 -0
  253. package/src/types.ts +928 -0
  254. package/src/visual.ts +296 -0
  255. package/src/windows-process-scopes.ts +189 -0
  256. package/src/workspace-contract.ts +32 -0
@@ -0,0 +1,76 @@
1
+ import {
2
+ GAME_RUN_PROTOCOL_VERSION,
3
+ GAME_SESSION_BROKER_STATE_FILE,
4
+ MAXIMUM_CURRENT_ROOM_SEATS,
5
+ MAXIMUM_GAME_RUN_BUILD_LOG_BYTES,
6
+ MAXIMUM_GAME_RUN_MS,
7
+ MAXIMUM_GAME_RUN_STEERING_CHANGES,
8
+ MAXIMUM_GAME_RUN_TRACE_BYTES,
9
+ currentRoomAttachmentSchema,
10
+ currentRoomHostRequestSchema,
11
+ currentRoomSeatClaimSchema,
12
+ gameRunAddressSchema,
13
+ gameRunBuildLogSchema,
14
+ gameRunCancellationSchema,
15
+ gameRunDiscoverySchema,
16
+ gameRunEndReasonSchema,
17
+ gameRunRecordSchema,
18
+ gameRunSessionIdentitySchema,
19
+ gameRunSteerSchema,
20
+ gameRunWaitSchema,
21
+ seatIntentSchema,
22
+ startGameRunSchema,
23
+ startPlayGameRunSchema,
24
+ startTestGameRunSchema,
25
+ steeringSourceSchema
26
+ } from "./chunk-HZUGBH4Y.js";
27
+ import "./chunk-PMNE5GIN.js";
28
+ import "./chunk-ASC2CK2R.js";
29
+ import "./chunk-OM6SCJ7H.js";
30
+ import {
31
+ GAME_WATCH_HEARTBEAT_MS,
32
+ GameRunWatchWriter,
33
+ MAXIMUM_GAME_WATCH_FRAME_BASE64,
34
+ formatGameRunWatchSurface,
35
+ gameRunWatchEventSchema,
36
+ gameRunWatchRequestSchema,
37
+ gameRunWatchSurfaceSchema,
38
+ parseGameRunWatchSurface,
39
+ readGameRunWatchStream
40
+ } from "./chunk-AO3ZDXF6.js";
41
+ export {
42
+ GAME_RUN_PROTOCOL_VERSION,
43
+ GAME_SESSION_BROKER_STATE_FILE,
44
+ GAME_WATCH_HEARTBEAT_MS,
45
+ GameRunWatchWriter,
46
+ MAXIMUM_CURRENT_ROOM_SEATS,
47
+ MAXIMUM_GAME_RUN_BUILD_LOG_BYTES,
48
+ MAXIMUM_GAME_RUN_MS,
49
+ MAXIMUM_GAME_RUN_STEERING_CHANGES,
50
+ MAXIMUM_GAME_RUN_TRACE_BYTES,
51
+ MAXIMUM_GAME_WATCH_FRAME_BASE64,
52
+ currentRoomAttachmentSchema,
53
+ currentRoomHostRequestSchema,
54
+ currentRoomSeatClaimSchema,
55
+ formatGameRunWatchSurface,
56
+ gameRunAddressSchema,
57
+ gameRunBuildLogSchema,
58
+ gameRunCancellationSchema,
59
+ gameRunDiscoverySchema,
60
+ gameRunEndReasonSchema,
61
+ gameRunRecordSchema,
62
+ gameRunSessionIdentitySchema,
63
+ gameRunSteerSchema,
64
+ gameRunWaitSchema,
65
+ gameRunWatchEventSchema,
66
+ gameRunWatchRequestSchema,
67
+ gameRunWatchSurfaceSchema,
68
+ parseGameRunWatchSurface,
69
+ readGameRunWatchStream,
70
+ seatIntentSchema,
71
+ startGameRunSchema,
72
+ startPlayGameRunSchema,
73
+ startTestGameRunSchema,
74
+ steeringSourceSchema
75
+ };
76
+ //# sourceMappingURL=game-runs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,439 @@
1
+ import { z } from 'zod';
2
+ import { e as GameRunWatchEvent } from './game-run-watch-CEd_SpAT.js';
3
+
4
+ declare const gameSessionOperationSchemas: {
5
+ open: z.ZodObject<{
6
+ gameId: z.ZodOptional<z.ZodString>;
7
+ mode: z.ZodOptional<z.ZodEnum<{
8
+ "standalone-dev": "standalone-dev";
9
+ "arcade-dev": "arcade-dev";
10
+ "arcade-test": "arcade-test";
11
+ }>>;
12
+ secure: z.ZodOptional<z.ZodBoolean>;
13
+ roomId: z.ZodOptional<z.ZodString>;
14
+ controllerJoinUrl: z.ZodOptional<z.ZodURL>;
15
+ nickname: z.ZodOptional<z.ZodString>;
16
+ avatarId: z.ZodOptional<z.ZodString>;
17
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
18
+ cwd: z.ZodOptional<z.ZodString>;
19
+ }, z.core.$strict>;
20
+ read: z.ZodObject<{
21
+ gameSessionId: z.ZodUUID;
22
+ cwd: z.ZodOptional<z.ZodString>;
23
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
24
+ }, z.core.$strict>;
25
+ observe: z.ZodObject<{
26
+ gameSessionId: z.ZodUUID;
27
+ cwd: z.ZodOptional<z.ZodString>;
28
+ scope: z.ZodOptional<z.ZodEnum<{
29
+ diagnostic: "diagnostic";
30
+ player: "player";
31
+ }>>;
32
+ includeImage: z.ZodOptional<z.ZodBoolean>;
33
+ expected: z.ZodOptional<z.ZodOptional<z.ZodObject<{
34
+ documentId: z.ZodString;
35
+ roomId: z.ZodString;
36
+ contractId: z.ZodString;
37
+ runtimeId: z.ZodString;
38
+ surfaceId: z.ZodNullable<z.ZodString>;
39
+ participantId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
40
+ }, z.core.$strip>>>;
41
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
42
+ }, z.core.$strict>;
43
+ "settings-read": z.ZodObject<{
44
+ gameSessionId: z.ZodUUID;
45
+ cwd: z.ZodOptional<z.ZodString>;
46
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
47
+ }, z.core.$strict>;
48
+ "settings-update": z.ZodObject<{
49
+ gameSessionId: z.ZodUUID;
50
+ cwd: z.ZodOptional<z.ZodString>;
51
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
52
+ patch: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString]>>;
53
+ expectedRevision: z.ZodNumber;
54
+ }, z.core.$strict>;
55
+ control: z.ZodObject<{
56
+ gameSessionId: z.ZodUUID;
57
+ cwd: z.ZodOptional<z.ZodString>;
58
+ lease: z.ZodObject<{
59
+ id: z.ZodUUID;
60
+ sequence: z.ZodNumber;
61
+ }, z.core.$strict>;
62
+ expected: z.ZodObject<{
63
+ documentId: z.ZodString;
64
+ roomId: z.ZodString;
65
+ contractId: z.ZodString;
66
+ runtimeId: z.ZodString;
67
+ surfaceId: z.ZodNullable<z.ZodString>;
68
+ participantId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
69
+ }, z.core.$strict>;
70
+ operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
71
+ kind: z.ZodLiteral<"input">;
72
+ deadlineMs: z.ZodNumber;
73
+ input: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodJSONSchema>>;
74
+ ttlMs: z.ZodNumber;
75
+ }, z.core.$strict>, z.ZodObject<{
76
+ kind: z.ZodLiteral<"release">;
77
+ }, z.core.$strict>, z.ZodObject<{
78
+ kind: z.ZodLiteral<"action">;
79
+ deadlineMs: z.ZodNumber;
80
+ actionId: z.ZodString;
81
+ input: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodJSONSchema>>;
82
+ }, z.core.$strict>], "kind">;
83
+ }, z.core.$strict>;
84
+ input: z.ZodObject<{
85
+ gameSessionId: z.ZodUUID;
86
+ cwd: z.ZodOptional<z.ZodString>;
87
+ input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
88
+ }, z.core.$strict>;
89
+ invoke: z.ZodObject<{
90
+ gameSessionId: z.ZodUUID;
91
+ cwd: z.ZodOptional<z.ZodString>;
92
+ actionId: z.ZodString;
93
+ payload: z.ZodOptional<z.ZodJSONSchema>;
94
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
95
+ }, z.core.$strict>;
96
+ capture: z.ZodObject<{
97
+ gameSessionId: z.ZodUUID;
98
+ cwd: z.ZodOptional<z.ZodString>;
99
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
100
+ }, z.core.$strict>;
101
+ close: z.ZodObject<{
102
+ gameSessionId: z.ZodUUID;
103
+ cwd: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strict>;
105
+ };
106
+ declare const gameSessionBrokerRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
107
+ operation: z.ZodLiteral<"run.start">;
108
+ input: z.ZodUnion<readonly [z.ZodObject<{
109
+ cwd: z.ZodOptional<z.ZodString>;
110
+ runId: z.ZodUUID;
111
+ gameId: z.ZodOptional<z.ZodString>;
112
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
113
+ kind: z.ZodLiteral<"owned">;
114
+ }, z.core.$strict>, z.ZodObject<{
115
+ kind: z.ZodLiteral<"current">;
116
+ }, z.core.$strict>, z.ZodObject<{
117
+ kind: z.ZodLiteral<"headless">;
118
+ }, z.core.$strict>], "kind">;
119
+ settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString]>>>;
120
+ seed: z.ZodDefault<z.ZodNumber>;
121
+ kind: z.ZodDefault<z.ZodLiteral<"test">>;
122
+ profileId: z.ZodString;
123
+ policyId: z.ZodString;
124
+ budget: z.ZodObject<{
125
+ durationMs: z.ZodNumber;
126
+ steps: z.ZodNumber;
127
+ }, z.core.$strict>;
128
+ intents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
129
+ }, z.core.$strict>, z.ZodObject<{
130
+ cwd: z.ZodOptional<z.ZodString>;
131
+ runId: z.ZodUUID;
132
+ gameId: z.ZodOptional<z.ZodString>;
133
+ seed: z.ZodDefault<z.ZodNumber>;
134
+ kind: z.ZodLiteral<"play">;
135
+ target: z.ZodObject<{
136
+ kind: z.ZodLiteral<"current">;
137
+ }, z.core.$strict>;
138
+ intent: z.ZodOptional<z.ZodString>;
139
+ }, z.core.$strict>]>;
140
+ attachment: z.ZodOptional<z.ZodObject<{
141
+ controllerJoinUrl: z.ZodURL;
142
+ seats: z.ZodNumber;
143
+ host: z.ZodObject<{
144
+ endpoint: z.ZodURL;
145
+ targetId: z.ZodString;
146
+ }, z.core.$strict>;
147
+ }, z.core.$strict>>;
148
+ }, z.core.$strict>, z.ZodObject<{
149
+ operation: z.ZodLiteral<"run.read">;
150
+ input: z.ZodObject<{
151
+ cwd: z.ZodOptional<z.ZodString>;
152
+ runId: z.ZodUUID;
153
+ }, z.core.$strict>;
154
+ }, z.core.$strict>, z.ZodObject<{
155
+ operation: z.ZodLiteral<"run.wait">;
156
+ input: z.ZodObject<{
157
+ cwd: z.ZodOptional<z.ZodString>;
158
+ runId: z.ZodUUID;
159
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
160
+ }, z.core.$strict>;
161
+ }, z.core.$strict>, z.ZodObject<{
162
+ operation: z.ZodLiteral<"run.stop">;
163
+ input: z.ZodObject<{
164
+ cwd: z.ZodOptional<z.ZodString>;
165
+ runId: z.ZodUUID;
166
+ }, z.core.$strict>;
167
+ }, z.core.$strict>, z.ZodObject<{
168
+ operation: z.ZodLiteral<"run.steer">;
169
+ input: z.ZodObject<{
170
+ cwd: z.ZodOptional<z.ZodString>;
171
+ runId: z.ZodUUID;
172
+ seatId: z.ZodString;
173
+ intent: z.ZodNullable<z.ZodString>;
174
+ source: z.ZodDefault<z.ZodEnum<{
175
+ creator: "creator";
176
+ agent: "agent";
177
+ operator: "operator";
178
+ }>>;
179
+ }, z.core.$strict>;
180
+ }, z.core.$strict>, z.ZodObject<{
181
+ operation: z.ZodLiteral<"run.cancel">;
182
+ input: z.ZodObject<{
183
+ cwd: z.ZodOptional<z.ZodString>;
184
+ runId: z.ZodUUID;
185
+ }, z.core.$strict>;
186
+ }, z.core.$strict>, z.ZodObject<{
187
+ operation: z.ZodLiteral<"run.list">;
188
+ input: z.ZodObject<{
189
+ cwd: z.ZodOptional<z.ZodString>;
190
+ }, z.core.$strict>;
191
+ }, z.core.$strict>, z.ZodObject<{
192
+ operation: z.ZodLiteral<"run.stop-all">;
193
+ input: z.ZodObject<{
194
+ cwd: z.ZodOptional<z.ZodString>;
195
+ }, z.core.$strict>;
196
+ }, z.core.$strict>, z.ZodObject<{
197
+ operation: z.ZodLiteral<"run.profiles">;
198
+ input: z.ZodObject<{
199
+ cwd: z.ZodOptional<z.ZodString>;
200
+ gameId: z.ZodOptional<z.ZodString>;
201
+ }, z.core.$strict>;
202
+ }, z.core.$strict>, z.ZodObject<{
203
+ operation: z.ZodLiteral<"run.watch">;
204
+ input: z.ZodObject<{
205
+ cwd: z.ZodOptional<z.ZodString>;
206
+ runId: z.ZodUUID;
207
+ surface: z.ZodDiscriminatedUnion<[z.ZodObject<{
208
+ kind: z.ZodLiteral<"host">;
209
+ }, z.core.$strict>, z.ZodObject<{
210
+ kind: z.ZodLiteral<"controller">;
211
+ seatId: z.ZodString;
212
+ }, z.core.$strict>], "kind">;
213
+ }, z.core.$strict>;
214
+ }, z.core.$strict>, z.ZodObject<{
215
+ operation: z.ZodLiteral<"health">;
216
+ }, z.core.$strict>, z.ZodObject<{
217
+ operation: z.ZodLiteral<"open">;
218
+ input: z.ZodObject<{
219
+ gameId: z.ZodOptional<z.ZodString>;
220
+ mode: z.ZodOptional<z.ZodEnum<{
221
+ "standalone-dev": "standalone-dev";
222
+ "arcade-dev": "arcade-dev";
223
+ "arcade-test": "arcade-test";
224
+ }>>;
225
+ secure: z.ZodOptional<z.ZodBoolean>;
226
+ roomId: z.ZodOptional<z.ZodString>;
227
+ controllerJoinUrl: z.ZodOptional<z.ZodURL>;
228
+ nickname: z.ZodOptional<z.ZodString>;
229
+ avatarId: z.ZodOptional<z.ZodString>;
230
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
231
+ cwd: z.ZodOptional<z.ZodString>;
232
+ }, z.core.$strict>;
233
+ }, z.core.$strict>, z.ZodObject<{
234
+ operation: z.ZodLiteral<"read">;
235
+ input: z.ZodObject<{
236
+ gameSessionId: z.ZodUUID;
237
+ cwd: z.ZodOptional<z.ZodString>;
238
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
239
+ }, z.core.$strict>;
240
+ }, z.core.$strict>, z.ZodObject<{
241
+ operation: z.ZodLiteral<"observe">;
242
+ input: z.ZodObject<{
243
+ gameSessionId: z.ZodUUID;
244
+ cwd: z.ZodOptional<z.ZodString>;
245
+ scope: z.ZodOptional<z.ZodEnum<{
246
+ diagnostic: "diagnostic";
247
+ player: "player";
248
+ }>>;
249
+ includeImage: z.ZodOptional<z.ZodBoolean>;
250
+ expected: z.ZodOptional<z.ZodOptional<z.ZodObject<{
251
+ documentId: z.ZodString;
252
+ roomId: z.ZodString;
253
+ contractId: z.ZodString;
254
+ runtimeId: z.ZodString;
255
+ surfaceId: z.ZodNullable<z.ZodString>;
256
+ participantId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
257
+ }, z.core.$strip>>>;
258
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
259
+ }, z.core.$strict>;
260
+ }, z.core.$strict>, z.ZodObject<{
261
+ operation: z.ZodLiteral<"control">;
262
+ input: z.ZodObject<{
263
+ gameSessionId: z.ZodUUID;
264
+ cwd: z.ZodOptional<z.ZodString>;
265
+ lease: z.ZodObject<{
266
+ id: z.ZodUUID;
267
+ sequence: z.ZodNumber;
268
+ }, z.core.$strict>;
269
+ expected: z.ZodObject<{
270
+ documentId: z.ZodString;
271
+ roomId: z.ZodString;
272
+ contractId: z.ZodString;
273
+ runtimeId: z.ZodString;
274
+ surfaceId: z.ZodNullable<z.ZodString>;
275
+ participantId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
276
+ }, z.core.$strict>;
277
+ operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
278
+ kind: z.ZodLiteral<"input">;
279
+ deadlineMs: z.ZodNumber;
280
+ input: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodJSONSchema>>;
281
+ ttlMs: z.ZodNumber;
282
+ }, z.core.$strict>, z.ZodObject<{
283
+ kind: z.ZodLiteral<"release">;
284
+ }, z.core.$strict>, z.ZodObject<{
285
+ kind: z.ZodLiteral<"action">;
286
+ deadlineMs: z.ZodNumber;
287
+ actionId: z.ZodString;
288
+ input: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodJSONSchema>>;
289
+ }, z.core.$strict>], "kind">;
290
+ }, z.core.$strict>;
291
+ }, z.core.$strict>, z.ZodObject<{
292
+ operation: z.ZodLiteral<"input">;
293
+ input: z.ZodObject<{
294
+ gameSessionId: z.ZodUUID;
295
+ cwd: z.ZodOptional<z.ZodString>;
296
+ input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
297
+ }, z.core.$strict>;
298
+ }, z.core.$strict>, z.ZodObject<{
299
+ operation: z.ZodLiteral<"invoke">;
300
+ input: z.ZodObject<{
301
+ gameSessionId: z.ZodUUID;
302
+ cwd: z.ZodOptional<z.ZodString>;
303
+ actionId: z.ZodString;
304
+ payload: z.ZodOptional<z.ZodJSONSchema>;
305
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
306
+ }, z.core.$strict>;
307
+ }, z.core.$strict>, z.ZodObject<{
308
+ operation: z.ZodLiteral<"capture">;
309
+ input: z.ZodObject<{
310
+ gameSessionId: z.ZodUUID;
311
+ cwd: z.ZodOptional<z.ZodString>;
312
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
313
+ }, z.core.$strict>;
314
+ }, z.core.$strict>, z.ZodObject<{
315
+ operation: z.ZodLiteral<"close">;
316
+ input: z.ZodObject<{
317
+ gameSessionId: z.ZodUUID;
318
+ cwd: z.ZodOptional<z.ZodString>;
319
+ }, z.core.$strict>;
320
+ }, z.core.$strict>, z.ZodObject<{
321
+ operation: z.ZodLiteral<"settings-read">;
322
+ input: z.ZodObject<{
323
+ gameSessionId: z.ZodUUID;
324
+ cwd: z.ZodOptional<z.ZodString>;
325
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
326
+ }, z.core.$strict>;
327
+ }, z.core.$strict>, z.ZodObject<{
328
+ operation: z.ZodLiteral<"settings-update">;
329
+ input: z.ZodObject<{
330
+ gameSessionId: z.ZodUUID;
331
+ cwd: z.ZodOptional<z.ZodString>;
332
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
333
+ patch: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString]>>;
334
+ expectedRevision: z.ZodNumber;
335
+ }, z.core.$strict>;
336
+ }, z.core.$strict>, z.ZodObject<{
337
+ operation: z.ZodLiteral<"shutdown">;
338
+ }, z.core.$strict>], "operation">;
339
+ type GameSessionBrokerRequest = z.infer<typeof gameSessionBrokerRequestSchema>;
340
+
341
+ declare const stateSchema: z.ZodObject<{
342
+ schemaVersion: z.ZodLiteral<1>;
343
+ instanceId: z.ZodUUID;
344
+ pid: z.ZodNumber;
345
+ projectDir: z.ZodString;
346
+ origin: z.ZodString;
347
+ secret: z.ZodString;
348
+ startedAt: z.ZodISODateTime;
349
+ }, z.core.$strict>;
350
+ type AirJamGameSessionBrokerState = z.infer<typeof stateSchema>;
351
+ type AirJamGameSessionBrokerOperation = GameSessionBrokerRequest;
352
+ type AirJamGameSessionBrokerHealth = {
353
+ ok: true;
354
+ instanceId: string;
355
+ pid: number;
356
+ projectDir: string;
357
+ activeSessionCount: number;
358
+ startedAt: string;
359
+ draining: boolean;
360
+ processScopeError: string | null;
361
+ gameRunProtocolVersion: number;
362
+ cleanupFailures: Array<{
363
+ gameSessionId: string;
364
+ message: string;
365
+ }>;
366
+ };
367
+ declare const resolveGameSessionBrokerStatePath: (projectDir: string) => string;
368
+ declare function readGameSessionBrokerState(projectDir: string): Promise<{
369
+ schemaVersion: 1;
370
+ instanceId: string;
371
+ pid: number;
372
+ projectDir: string;
373
+ origin: string;
374
+ secret: string;
375
+ startedAt: string;
376
+ } | null>;
377
+ declare function requestGameSessionBroker<TResult>({ state, request, }: {
378
+ state: AirJamGameSessionBrokerState;
379
+ request: AirJamGameSessionBrokerOperation;
380
+ }): Promise<TResult>;
381
+ declare function readGameSessionBrokerHealth(state: AirJamGameSessionBrokerState): Promise<AirJamGameSessionBrokerHealth | null>;
382
+ declare function ensureGameSessionBroker(projectDir: string): Promise<{
383
+ schemaVersion: 1;
384
+ instanceId: string;
385
+ pid: number;
386
+ projectDir: string;
387
+ origin: string;
388
+ secret: string;
389
+ startedAt: string;
390
+ }>;
391
+ declare function getGameSessionBrokerStatus(projectDir: string): Promise<{
392
+ ok: true;
393
+ instanceId: string;
394
+ pid: number;
395
+ projectDir: string;
396
+ activeSessionCount: number;
397
+ startedAt: string;
398
+ draining: boolean;
399
+ processScopeError: string | null;
400
+ gameRunProtocolVersion: number;
401
+ cleanupFailures: Array<{
402
+ gameSessionId: string;
403
+ message: string;
404
+ }>;
405
+ running: true;
406
+ } | {
407
+ staleState?: boolean | undefined;
408
+ pid?: number | undefined;
409
+ instanceId?: string | undefined;
410
+ running: false;
411
+ projectDir: string;
412
+ }>;
413
+ declare function stopGameSessionBroker(projectDir: string): Promise<{
414
+ stopped: true;
415
+ instanceId: string;
416
+ } | {
417
+ stopped: boolean;
418
+ running: boolean;
419
+ projectDir: string;
420
+ staleStateRemoved?: undefined;
421
+ instanceId?: undefined;
422
+ } | {
423
+ stopped: boolean;
424
+ running: boolean;
425
+ staleStateRemoved: boolean;
426
+ instanceId: string;
427
+ projectDir: string;
428
+ }>;
429
+ declare function runGameSessionBroker({ projectDir, }: {
430
+ projectDir: string;
431
+ }): Promise<void>;
432
+ declare function watchGameSessionBroker({ state, input, onEvent, signal, }: {
433
+ state: AirJamGameSessionBrokerState;
434
+ input: unknown;
435
+ onEvent: (event: GameRunWatchEvent) => void;
436
+ signal: AbortSignal;
437
+ }): Promise<void>;
438
+
439
+ export { type AirJamGameSessionBrokerState as A, gameSessionOperationSchemas as a, type AirJamGameSessionBrokerOperation as b, type AirJamGameSessionBrokerHealth as c, readGameSessionBrokerState as d, requestGameSessionBroker as e, readGameSessionBrokerHealth as f, getGameSessionBrokerStatus as g, ensureGameSessionBroker as h, runGameSessionBroker as i, resolveGameSessionBrokerStatePath as r, stopGameSessionBroker as s, watchGameSessionBroker as w };
@@ -0,0 +1,4 @@
1
+ import 'zod';
2
+ import './game-run-watch-CEd_SpAT.js';
3
+ export { c as AirJamGameSessionBrokerHealth, b as AirJamGameSessionBrokerOperation, A as AirJamGameSessionBrokerState, h as ensureGameSessionBroker, g as getGameSessionBrokerStatus, f as readGameSessionBrokerHealth, d as readGameSessionBrokerState, e as requestGameSessionBroker, r as resolveGameSessionBrokerStatePath, i as runGameSessionBroker, s as stopGameSessionBroker, w as watchGameSessionBroker } from './game-session-broker-CUvORfMd.js';
4
+ import 'node:stream';
@@ -0,0 +1,40 @@
1
+ import {
2
+ ensureGameSessionBroker,
3
+ getGameSessionBrokerStatus,
4
+ readGameSessionBrokerHealth,
5
+ readGameSessionBrokerState,
6
+ requestGameSessionBroker,
7
+ resolveGameSessionBrokerStatePath,
8
+ runGameSessionBroker,
9
+ stopGameSessionBroker,
10
+ watchGameSessionBroker
11
+ } from "./chunk-JBCUTWRI.js";
12
+ import "./chunk-PMBLXGFM.js";
13
+ import "./chunk-FN7E6EA7.js";
14
+ import "./chunk-L4D675BG.js";
15
+ import "./chunk-ITKAOEGX.js";
16
+ import "./chunk-HZUGBH4Y.js";
17
+ import "./chunk-PMNE5GIN.js";
18
+ import "./chunk-ASC2CK2R.js";
19
+ import "./chunk-OM6SCJ7H.js";
20
+ import "./chunk-EJTE7UKX.js";
21
+ import "./chunk-JSI5S4WP.js";
22
+ import "./chunk-M6CJ7GQC.js";
23
+ import "./chunk-QGADSPHZ.js";
24
+ import "./chunk-AO3ZDXF6.js";
25
+ import "./chunk-SPYN66UV.js";
26
+ import "./chunk-MEIMOSZC.js";
27
+ import "./chunk-ART5TEYT.js";
28
+ import "./chunk-PKD4WVX5.js";
29
+ export {
30
+ ensureGameSessionBroker,
31
+ getGameSessionBrokerStatus,
32
+ readGameSessionBrokerHealth,
33
+ readGameSessionBrokerState,
34
+ requestGameSessionBroker,
35
+ resolveGameSessionBrokerStatePath,
36
+ runGameSessionBroker,
37
+ stopGameSessionBroker,
38
+ watchGameSessionBroker
39
+ };
40
+ //# sourceMappingURL=game-session-broker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}