@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,1036 @@
1
+ import { PlatformMachineErrorCode, PlatformMachineRequestOwnedGameMediaUploadTargetInput, PlatformMachineCreateOwnedGameInput, PlatformMachineUpdateOwnedGameInput, PlatformMachineRequestReleaseGenerationExportResult, PlatformMachineGetReleaseResult, PlatformMachineReleaseGeneration, PlatformMachineReleaseJob } from '@air-jam/sdk/platform-machine';
2
+ import * as zod from 'zod';
3
+ import { z } from 'zod';
4
+ import * as _air_jam_sdk_agent_tooling from '@air-jam/sdk/agent-tooling';
5
+ import { g as getGameSessionBrokerStatus, s as stopGameSessionBroker } from './game-session-broker-CUvORfMd.js';
6
+ import { AirJamActionInvocationResult } from '@air-jam/sdk';
7
+ import { AirJamGameDescription } from '@air-jam/sdk/core';
8
+
9
+ declare const resolveAirJamStateDirectory: () => string;
10
+ declare const storedPlatformSessionSchema: z.ZodObject<{
11
+ platformBaseUrl: z.ZodString;
12
+ clientName: z.ZodNullable<z.ZodString>;
13
+ storedAt: z.ZodString;
14
+ user: z.ZodObject<{
15
+ id: z.ZodString;
16
+ name: z.ZodString;
17
+ email: z.ZodString;
18
+ role: z.ZodEnum<{
19
+ creator: "creator";
20
+ ops_admin: "ops_admin";
21
+ }>;
22
+ }, z.core.$strip>;
23
+ version: z.ZodLiteral<2>;
24
+ session: z.ZodObject<{
25
+ id: z.ZodString;
26
+ token: z.ZodString;
27
+ expiresAt: z.ZodISODateTime;
28
+ refreshToken: z.ZodString;
29
+ refreshExpiresAt: z.ZodISODateTime;
30
+ createdAt: z.ZodISODateTime;
31
+ userAgent: z.ZodString;
32
+ }, z.core.$strip>;
33
+ }, z.core.$strip>;
34
+ declare class AirJamPlatformApiError extends Error {
35
+ readonly code: PlatformMachineErrorCode;
36
+ readonly status: number;
37
+ readonly details: Record<string, unknown> | undefined;
38
+ readonly retryAfterSeconds: number | null;
39
+ constructor({ code, message, status, details, retryAfterSeconds, }: {
40
+ code: PlatformMachineErrorCode;
41
+ message: string;
42
+ status: number;
43
+ details?: Record<string, unknown>;
44
+ retryAfterSeconds?: number | null;
45
+ });
46
+ }
47
+ declare class AirJamStoredPlatformSessionError extends Error {
48
+ readonly storagePath: string;
49
+ constructor(storagePath: string, cause: unknown);
50
+ }
51
+ declare const resolvePlatformBaseUrl: (value?: string | undefined) => string;
52
+ declare const requestPlatformMachineApi: <T>({ baseUrl, pathname, method, body, token, schema, }: {
53
+ baseUrl: string;
54
+ pathname: string;
55
+ method?: "GET" | "POST" | "PATCH";
56
+ body?: unknown;
57
+ token?: string;
58
+ schema: {
59
+ parse: (value: unknown) => T;
60
+ };
61
+ }) => Promise<T>;
62
+ declare const readStoredPlatformMachineSession: () => Promise<{
63
+ platformBaseUrl: string;
64
+ clientName: string | null;
65
+ storedAt: string;
66
+ user: {
67
+ id: string;
68
+ name: string;
69
+ email: string;
70
+ role: "creator" | "ops_admin";
71
+ };
72
+ version: 2;
73
+ session: {
74
+ id: string;
75
+ token: string;
76
+ expiresAt: string;
77
+ refreshToken: string;
78
+ refreshExpiresAt: string;
79
+ createdAt: string;
80
+ userAgent: string;
81
+ };
82
+ } | {
83
+ platformBaseUrl: string;
84
+ clientName: string | null;
85
+ storedAt: string;
86
+ user: {
87
+ id: string;
88
+ name: string;
89
+ email: string;
90
+ role: "creator" | "ops_admin";
91
+ };
92
+ version: 1;
93
+ session: {
94
+ createdAt: string;
95
+ id: string;
96
+ token: string;
97
+ expiresAt: string;
98
+ userAgent: string;
99
+ };
100
+ } | null>;
101
+ declare const writeStoredPlatformMachineSession: (value: AirJamPlatformMachineSessionStore) => Promise<void>;
102
+ declare const clearStoredPlatformMachineSession: () => Promise<void>;
103
+ declare const startPlatformDeviceAuthorization: ({ platformUrl, clientName, }?: StartPlatformDeviceAuthorizationOptions) => Promise<{
104
+ deviceCode: string;
105
+ userCode: string;
106
+ verificationUrl: string;
107
+ verificationUriComplete: string;
108
+ expiresAt: string;
109
+ intervalSeconds: number;
110
+ }>;
111
+ declare const pollPlatformDeviceAuthorization: ({ platformUrl, deviceCode, }: PollPlatformDeviceAuthorizationOptions) => Promise<{
112
+ platformBaseUrl: string;
113
+ user: {
114
+ id: string;
115
+ name: string;
116
+ email: string;
117
+ role: "creator" | "ops_admin";
118
+ };
119
+ session: {
120
+ id: string;
121
+ token: string;
122
+ expiresAt: string;
123
+ refreshToken: string;
124
+ refreshExpiresAt: string;
125
+ createdAt: string;
126
+ userAgent: string;
127
+ };
128
+ }>;
129
+ declare const loginPlatformWithDeviceFlow: ({ platformUrl, clientName, onPrompt, }?: LoginPlatformWithDeviceFlowOptions) => Promise<{
130
+ authorization: {
131
+ deviceCode: string;
132
+ userCode: string;
133
+ verificationUrl: string;
134
+ verificationUriComplete: string;
135
+ expiresAt: string;
136
+ intervalSeconds: number;
137
+ };
138
+ authenticated: {
139
+ platformBaseUrl: string;
140
+ user: {
141
+ id: string;
142
+ name: string;
143
+ email: string;
144
+ role: "creator" | "ops_admin";
145
+ };
146
+ session: {
147
+ id: string;
148
+ token: string;
149
+ expiresAt: string;
150
+ refreshToken: string;
151
+ refreshExpiresAt: string;
152
+ createdAt: string;
153
+ userAgent: string;
154
+ };
155
+ };
156
+ storedSession: {
157
+ platformBaseUrl: string;
158
+ clientName: string | null;
159
+ storedAt: string;
160
+ user: {
161
+ id: string;
162
+ name: string;
163
+ email: string;
164
+ role: "creator" | "ops_admin";
165
+ };
166
+ version: 2;
167
+ session: {
168
+ id: string;
169
+ token: string;
170
+ expiresAt: string;
171
+ refreshToken: string;
172
+ refreshExpiresAt: string;
173
+ createdAt: string;
174
+ userAgent: string;
175
+ };
176
+ };
177
+ }>;
178
+ declare const resolvePlatformMachineAuth: (options: {
179
+ platformUrl?: string;
180
+ token?: string;
181
+ }) => Promise<{
182
+ baseUrl: string;
183
+ token: string;
184
+ }>;
185
+ declare const listPlatformMachineSessions: (options?: GetPlatformMachineProfileOptions) => Promise<{
186
+ sessions: {
187
+ id: string;
188
+ clientName: string | null;
189
+ createdAt: string;
190
+ lastUsedAt: string;
191
+ }[];
192
+ }>;
193
+ declare const revokePlatformMachineSession: (options: GetPlatformMachineProfileOptions & {
194
+ id: string;
195
+ }) => Promise<{
196
+ ok: true;
197
+ }>;
198
+ declare const getPlatformMachineProfile: ({ platformUrl, token, }?: GetPlatformMachineProfileOptions) => Promise<{
199
+ platformBaseUrl: string;
200
+ user: {
201
+ id: string;
202
+ name: string;
203
+ email: string;
204
+ role: "creator" | "ops_admin";
205
+ };
206
+ session: {
207
+ id: string;
208
+ expiresAt: string;
209
+ refreshExpiresAt: string;
210
+ createdAt: string;
211
+ userAgent: string;
212
+ };
213
+ }>;
214
+ declare const updatePlatformMachineProfile: ({ platformUrl, token, displayName, }: GetPlatformMachineProfileOptions & {
215
+ displayName: string;
216
+ }) => Promise<{
217
+ id: string;
218
+ name: string;
219
+ email: string;
220
+ role: "creator" | "ops_admin";
221
+ }>;
222
+ declare const logoutPlatformMachineSession: ({ platformUrl, token, }?: LogoutPlatformMachineSessionOptions) => Promise<{
223
+ ok: true;
224
+ }>;
225
+ declare const getPlatformMachineAuthStatus: () => Promise<AirJamPlatformAuthStatus>;
226
+ declare const getPlatformAuthStoragePath: () => string;
227
+
228
+ declare const controllerDisconnectionSchema: z.ZodObject<{
229
+ release: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
230
+ status: z.ZodLiteral<"applied">;
231
+ leaseId: z.ZodUUID;
232
+ sequence: z.ZodNumber;
233
+ replayed: z.ZodBoolean;
234
+ operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
235
+ kind: z.ZodLiteral<"input">;
236
+ }, z.core.$strict>, z.ZodObject<{
237
+ kind: z.ZodLiteral<"release">;
238
+ }, z.core.$strict>, z.ZodObject<{
239
+ kind: z.ZodLiteral<"action">;
240
+ result: z.ZodDiscriminatedUnion<[z.ZodObject<{
241
+ ok: z.ZodLiteral<true>;
242
+ status: z.ZodLiteral<"accepted">;
243
+ source: z.ZodEnum<{
244
+ host: "host";
245
+ client: "client";
246
+ }>;
247
+ result: z.ZodOptional<z.ZodUnknown>;
248
+ }, z.core.$strip>, z.ZodObject<{
249
+ ok: z.ZodLiteral<false>;
250
+ status: z.ZodLiteral<"rejected">;
251
+ source: z.ZodEnum<{
252
+ host: "host";
253
+ client: "client";
254
+ server: "server";
255
+ }>;
256
+ reason: z.ZodString;
257
+ message: z.ZodString;
258
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
259
+ }, z.core.$strip>, z.ZodObject<{
260
+ ok: z.ZodLiteral<false>;
261
+ status: z.ZodLiteral<"unconfirmed">;
262
+ source: z.ZodLiteral<"client">;
263
+ }, z.core.$strip>], "status">;
264
+ }, z.core.$strict>], "kind">;
265
+ }, z.core.$strict>, z.ZodObject<{
266
+ status: z.ZodLiteral<"rejected">;
267
+ reason: z.ZodEnum<{
268
+ busy: "busy";
269
+ invalid_request: "invalid_request";
270
+ rate_limited: "rate_limited";
271
+ invalid_input: "invalid_input";
272
+ invalid_action: "invalid_action";
273
+ invalid_action_lane: "invalid_action_lane";
274
+ room_not_found: "room_not_found";
275
+ unauthorized: "unauthorized";
276
+ active_host_missing: "active_host_missing";
277
+ stale_identity: "stale_identity";
278
+ stale_decision: "stale_decision";
279
+ invalid_deadline: "invalid_deadline";
280
+ lease_conflict: "lease_conflict";
281
+ stale_sequence: "stale_sequence";
282
+ sequence_conflict: "sequence_conflict";
283
+ unsupported: "unsupported";
284
+ }>;
285
+ }, z.core.$strict>, z.ZodObject<{
286
+ status: z.ZodLiteral<"unconfirmed">;
287
+ reason: z.ZodEnum<{
288
+ host_ack_unavailable: "host_ack_unavailable";
289
+ transport_ack_unavailable: "transport_ack_unavailable";
290
+ runtime_replaced: "runtime_replaced";
291
+ invalid_acknowledgement: "invalid_acknowledgement";
292
+ runtime_unavailable: "runtime_unavailable";
293
+ }>;
294
+ }, z.core.$strict>], "status">, z.ZodObject<{
295
+ status: z.ZodLiteral<"not-leased">;
296
+ }, z.core.$strict>]>;
297
+ leave: z.ZodDiscriminatedUnion<[z.ZodObject<{
298
+ status: z.ZodLiteral<"acknowledged">;
299
+ }, z.core.$strict>, z.ZodObject<{
300
+ status: z.ZodLiteral<"not-connected">;
301
+ }, z.core.$strict>, z.ZodObject<{
302
+ status: z.ZodLiteral<"rejected">;
303
+ message: z.ZodString;
304
+ }, z.core.$strict>, z.ZodObject<{
305
+ status: z.ZodLiteral<"unconfirmed">;
306
+ message: z.ZodString;
307
+ }, z.core.$strict>], "status">;
308
+ }, z.core.$strict>;
309
+ type ControllerDisconnection = z.infer<typeof controllerDisconnectionSchema>;
310
+
311
+ type AirJamRuntimeOwnerScreenshot = {
312
+ surface: "host" | "controller";
313
+ width: number;
314
+ height: number;
315
+ relativePath: string;
316
+ };
317
+
318
+ type AirJamProjectMode = "monorepo" | "standalone-game" | "unknown";
319
+ type JsonObject = Record<string, unknown>;
320
+ type PackageJson = JsonObject & {
321
+ name?: string;
322
+ version?: string;
323
+ private?: boolean;
324
+ packageManager?: string;
325
+ scripts?: Record<string, string>;
326
+ dependencies?: Record<string, string>;
327
+ devDependencies?: Record<string, string>;
328
+ peerDependencies?: Record<string, string>;
329
+ };
330
+ type AirJamPackageManager = "pnpm" | "npm" | "yarn" | "bun" | "unknown";
331
+ type AirJamProjectContext = {
332
+ rootDir: string;
333
+ mode: AirJamProjectMode;
334
+ packageManager: AirJamPackageManager;
335
+ packageJsonPath: string | null;
336
+ packageJson: PackageJson | null;
337
+ workspaceRoot: string | null;
338
+ reasons: string[];
339
+ };
340
+ type AirJamCapabilityGroup = "project" | "games" | "logs" | "runtime" | "quality" | "repo-workspace" | "ai-pack";
341
+ type AirJamProjectInspection = {
342
+ context: AirJamProjectContext;
343
+ capabilities: AirJamCapabilityGroup[];
344
+ scripts: Record<string, string>;
345
+ airJamPackages: Record<string, string>;
346
+ files: {
347
+ agents: string | null;
348
+ plan: string | null;
349
+ suggestions: string | null;
350
+ docsIndex: string | null;
351
+ };
352
+ };
353
+ type AirJamGameSummary = {
354
+ id: string;
355
+ name: string;
356
+ rootDir: string;
357
+ packageName: string | null;
358
+ description: string | null;
359
+ category: string | null;
360
+ scaffold: boolean | null;
361
+ manifestPath: string | null;
362
+ configPath: string;
363
+ declaration: AirJamGameDescription;
364
+ };
365
+ type AirJamGameInspection = AirJamGameSummary & {
366
+ packageJsonPath: string | null;
367
+ scripts: Record<string, string>;
368
+ qualityGates: AirJamQualityGate[];
369
+ };
370
+ type AirJamLocalHostedGameDefaults = {
371
+ projectDir: string;
372
+ configPath: string | null;
373
+ manifestPath: string | null;
374
+ packageJsonPath: string | null;
375
+ packageName: string | null;
376
+ sourceUrl: string | null;
377
+ metadata: {
378
+ name: string | null;
379
+ slug: string | null;
380
+ description: string | null;
381
+ category: string | null;
382
+ tags: string[];
383
+ };
384
+ template: {
385
+ id: string | null;
386
+ name: string | null;
387
+ description: string | null;
388
+ category: string | null;
389
+ };
390
+ };
391
+ type AirJamQualityGate = "typecheck" | "lint" | "test" | "build" | "format-check" | "scaffold-smoke" | "release-check";
392
+ type AirJamLocalReleaseIssue = {
393
+ code: string;
394
+ severity: "error" | "warning";
395
+ message: string;
396
+ path: string | null;
397
+ };
398
+ type InspectLocalReleaseOptions = {
399
+ cwd?: string;
400
+ distDir?: string;
401
+ };
402
+ type AirJamLocalReleaseDoctor = {
403
+ projectDir: string;
404
+ packageJsonPath: string | null;
405
+ packageName: string | null;
406
+ packageVersion: string | null;
407
+ packageManager: AirJamPackageManager;
408
+ configPath: string | null;
409
+ buildScript: string | null;
410
+ gameSlug: string | null;
411
+ controllerPath: string | null;
412
+ distDir: string;
413
+ distExists: boolean;
414
+ distEntryExists: boolean;
415
+ recommendedBundlePath: string;
416
+ canBundle: boolean;
417
+ issues: AirJamLocalReleaseIssue[];
418
+ hostedContract: {
419
+ entryPath: string;
420
+ manifestPath: string;
421
+ hostPath: string;
422
+ controllerPath: string;
423
+ };
424
+ };
425
+ type ValidateLocalReleaseOptions = {
426
+ cwd?: string;
427
+ distDir?: string;
428
+ bundlePath?: string;
429
+ skipBuild?: boolean;
430
+ };
431
+ type AirJamLocalReleaseValidation = {
432
+ source: {
433
+ kind: "project";
434
+ projectDir: string;
435
+ distDir: string;
436
+ bundlePath: null;
437
+ } | {
438
+ kind: "bundle";
439
+ projectDir: null;
440
+ distDir: null;
441
+ bundlePath: string;
442
+ };
443
+ ok: boolean;
444
+ issues: AirJamLocalReleaseIssue[];
445
+ manifest: JsonObject | null;
446
+ entryPath: string | null;
447
+ wrapperDirectory: string | null;
448
+ fileCount: number;
449
+ extractedSizeBytes: number;
450
+ };
451
+ type BundleLocalReleaseOptions = {
452
+ cwd?: string;
453
+ distDir?: string;
454
+ out?: string;
455
+ skipBuild?: boolean;
456
+ };
457
+ type BundleLocalReleaseResult = {
458
+ projectDir: string;
459
+ distDir: string;
460
+ outputFile: string;
461
+ built: boolean;
462
+ buildResult: CommandResult | null;
463
+ validation: AirJamLocalReleaseValidation;
464
+ };
465
+ type ListPlatformReleaseTargetsOptions = {
466
+ platformUrl?: string;
467
+ token?: string;
468
+ };
469
+ type ListPlatformGamesOptions = {
470
+ platformUrl?: string;
471
+ token?: string;
472
+ };
473
+ type InspectPlatformGameOptions = {
474
+ platformUrl?: string;
475
+ token?: string;
476
+ slugOrId: string;
477
+ };
478
+ type CreatePlatformGameOptions = {
479
+ platformUrl?: string;
480
+ token?: string;
481
+ input: PlatformMachineCreateOwnedGameInput;
482
+ };
483
+ type UpdatePlatformGameOptions = {
484
+ platformUrl?: string;
485
+ token?: string;
486
+ slugOrId: string;
487
+ input: PlatformMachineUpdateOwnedGameInput;
488
+ };
489
+ type InspectPlatformGameMediaOptions = {
490
+ platformUrl?: string;
491
+ token?: string;
492
+ slugOrId: string;
493
+ };
494
+ type RequestPlatformGameMediaUploadTargetOptions = {
495
+ platformUrl?: string;
496
+ token?: string;
497
+ slugOrId: string;
498
+ input: PlatformMachineRequestOwnedGameMediaUploadTargetInput;
499
+ };
500
+ type MutatePlatformGameMediaAssetOptions = {
501
+ platformUrl?: string;
502
+ token?: string;
503
+ slugOrId: string;
504
+ assetId: string;
505
+ };
506
+ type UploadPlatformGameMediaFileOptions = {
507
+ platformUrl?: string;
508
+ token?: string;
509
+ slugOrId: string;
510
+ kind: "thumbnail" | "cover" | "preview_video";
511
+ filePath: string;
512
+ };
513
+ type ListPlatformReleasesOptions = {
514
+ platformUrl?: string;
515
+ token?: string;
516
+ slugOrId: string;
517
+ };
518
+ type InspectPlatformReleaseOptions = {
519
+ platformUrl?: string;
520
+ token?: string;
521
+ releaseId: string;
522
+ };
523
+ type ArchivePlatformReleaseOptions = InspectPlatformReleaseOptions;
524
+ type PublishPlatformReleaseOptions = {
525
+ platformUrl?: string;
526
+ token?: string;
527
+ releaseId: string;
528
+ };
529
+ type UploadPlatformReleaseGenerationOptions = {
530
+ platformUrl?: string;
531
+ token?: string;
532
+ releaseId: string;
533
+ cwd?: string;
534
+ bundlePath: string;
535
+ };
536
+ type FinalizePlatformReleaseGenerationOptions = {
537
+ platformUrl?: string;
538
+ token?: string;
539
+ releaseId: string;
540
+ generationId: string;
541
+ };
542
+ type ExportPlatformReleaseGenerationOptions = {
543
+ platformUrl?: string;
544
+ token?: string;
545
+ releaseId: string;
546
+ generationId: string;
547
+ cwd?: string;
548
+ out?: string;
549
+ };
550
+ type ExportPlatformReleaseGenerationResult = PlatformMachineRequestReleaseGenerationExportResult & {
551
+ outputFile: string;
552
+ sizeBytes: number;
553
+ };
554
+ type SubmitPlatformReleaseOptions = {
555
+ platformUrl?: string;
556
+ token?: string;
557
+ slugOrId: string;
558
+ versionLabel?: string;
559
+ cwd?: string;
560
+ distDir?: string;
561
+ bundlePath?: string;
562
+ skipBuild?: boolean;
563
+ waitForProcessing?: boolean;
564
+ processingTimeoutMs?: number;
565
+ processingPollIntervalMs?: number;
566
+ publish?: boolean;
567
+ };
568
+ type SubmitPlatformReleaseResult = {
569
+ bundlePath: string;
570
+ createdRelease: PlatformMachineGetReleaseResult["release"];
571
+ createdGeneration: PlatformMachineReleaseGeneration;
572
+ submittedRelease: PlatformMachineGetReleaseResult["release"];
573
+ submittedGeneration: PlatformMachineReleaseGeneration;
574
+ processingJob: PlatformMachineReleaseJob;
575
+ processedRelease: PlatformMachineGetReleaseResult["release"] | null;
576
+ publishedRelease: PlatformMachineGetReleaseResult["release"] | null;
577
+ };
578
+ type AirJamPlatformAuthStatus = {
579
+ authenticated: boolean;
580
+ storagePath: string;
581
+ platformBaseUrl: string | null;
582
+ clientName: string | null;
583
+ storedAt: string | null;
584
+ user: {
585
+ id: string;
586
+ name: string;
587
+ email: string;
588
+ role: "creator" | "ops_admin";
589
+ } | null;
590
+ session: {
591
+ id: string;
592
+ expiresAt: string;
593
+ refreshExpiresAt: string;
594
+ createdAt: string;
595
+ userAgent: string;
596
+ } | null;
597
+ };
598
+ type CommandResult = {
599
+ command: string;
600
+ args: string[];
601
+ cwd: string;
602
+ exitCode: number | null;
603
+ signal: NodeJS.Signals | null;
604
+ stdout: string;
605
+ stderr: string;
606
+ durationMs: number;
607
+ ok: boolean;
608
+ };
609
+ type ReadDevLogsOptions = {
610
+ cwd?: string;
611
+ view?: "signal" | "full" | string;
612
+ source?: string;
613
+ trace?: string;
614
+ room?: string;
615
+ controller?: string;
616
+ event?: string;
617
+ process?: string;
618
+ level?: string;
619
+ runtime?: string;
620
+ epoch?: number;
621
+ consoleCategory?: string;
622
+ file?: string;
623
+ tail?: number;
624
+ };
625
+ type RunQualityGateOptions = {
626
+ cwd?: string;
627
+ gate: AirJamQualityGate;
628
+ packageFilter?: string;
629
+ };
630
+ type RunCompleteEvaluationOptions = {
631
+ cwd?: string;
632
+ };
633
+ type AirJamCompleteEvaluationResult = {
634
+ contract: "air-jam-complete-evaluation/v1";
635
+ status: "passed" | "failed";
636
+ startedAt: string;
637
+ endedAt: string;
638
+ gates: Array<{
639
+ gate: AirJamQualityGate;
640
+ result: CommandResult;
641
+ }>;
642
+ };
643
+ type AirJamDevMode = "standalone-dev" | "arcade-dev" | "arcade-test";
644
+ type AirJamVisualArtifactMode = "standalone-dev" | "arcade-built";
645
+ type AirJamVisualCaptureMode = "standalone-dev" | "arcade-test";
646
+ type AirJamManagedDevProcess = {
647
+ id: string;
648
+ pid: number;
649
+ cwd: string;
650
+ projectMode: Exclude<AirJamProjectMode, "unknown">;
651
+ mode: AirJamDevMode;
652
+ topologyMode: "standalone-dev" | "arcade-live" | "arcade-built";
653
+ secure: boolean;
654
+ gameId: string | null;
655
+ command: string;
656
+ args: string[];
657
+ logPath: string;
658
+ expectedLogPath: string | null;
659
+ startedAt: string;
660
+ };
661
+ type AirJamSurfaceUrlSummary = {
662
+ appOrigin: string | null;
663
+ hostUrl: string | null;
664
+ controllerBaseUrl: string | null;
665
+ publicHost: string | null;
666
+ localBuildUrl: string | null;
667
+ browserBuildUrl: string | null;
668
+ };
669
+ type AirJamRuntimeTopology = {
670
+ projectMode: Exclude<AirJamProjectMode, "unknown">;
671
+ mode: AirJamDevMode;
672
+ topologyMode: "standalone-dev" | "arcade-live" | "arcade-built";
673
+ gameId: string | null;
674
+ secure: boolean;
675
+ surfaces: Record<string, JsonObject>;
676
+ urls: AirJamSurfaceUrlSummary;
677
+ process: AirJamManagedDevProcess | null;
678
+ };
679
+ type StartDevOptions = {
680
+ cwd?: string;
681
+ gameId?: string;
682
+ mode?: AirJamDevMode;
683
+ secure?: boolean;
684
+ };
685
+ type StartDevResult = {
686
+ process: AirJamManagedDevProcess;
687
+ reusedExistingProcess: boolean;
688
+ topology: AirJamRuntimeTopology;
689
+ };
690
+ type StopDevOptions = {
691
+ cwd?: string;
692
+ processId?: string;
693
+ mode?: AirJamDevMode;
694
+ };
695
+ type StopDevResult = {
696
+ stopped: AirJamManagedDevProcess[];
697
+ };
698
+ type AirJamUnmanagedDevProcess = {
699
+ pid: number;
700
+ ports: number[];
701
+ command: string | null;
702
+ startedAt: string | null;
703
+ ageMs: number | null;
704
+ managed: false;
705
+ };
706
+ type GetDevStatusOptions = {
707
+ cwd?: string;
708
+ };
709
+ type AirJamDevStatus = {
710
+ gameSessionBroker: Awaited<ReturnType<typeof getGameSessionBrokerStatus>>;
711
+ processes: AirJamManagedDevProcess[];
712
+ unmanagedProcesses: AirJamUnmanagedDevProcess[];
713
+ knownPorts: number[];
714
+ };
715
+ type ResetLocalDevOptions = {
716
+ cwd?: string;
717
+ };
718
+ type ResetLocalDevResult = {
719
+ gameSessionBroker: Awaited<ReturnType<typeof stopGameSessionBroker>>;
720
+ stoppedManaged: AirJamManagedDevProcess[];
721
+ stoppedUnmanaged: AirJamUnmanagedDevProcess[];
722
+ remainingUnmanaged: AirJamUnmanagedDevProcess[];
723
+ knownPorts: number[];
724
+ };
725
+ type GetTopologyOptions = {
726
+ cwd?: string;
727
+ gameId?: string;
728
+ mode?: AirJamDevMode;
729
+ secure?: boolean;
730
+ };
731
+ type AirJamVisualScenarioSummary = {
732
+ gameId: string;
733
+ scenarioId: string;
734
+ description: string | null;
735
+ supportedModes: AirJamVisualCaptureMode[];
736
+ };
737
+ type AirJamGameAgentActionDescriptor = zod.z.infer<typeof _air_jam_sdk_agent_tooling.agentActionDescriptorSchema>;
738
+ type AirJamGameSnapshotInspection = {
739
+ contractId: string;
740
+ runtimeId: string;
741
+ controllerSessionId: string;
742
+ gameId: string;
743
+ /** Logical store names declared by the game contract. */
744
+ snapshotStoreDomains: string[];
745
+ /** Concrete replicated store domains used by the active runtime. */
746
+ runtimeStoreDomains: string[];
747
+ storeDomainBindings: Array<{
748
+ contractStoreDomain: string;
749
+ runtimeStoreDomain: string;
750
+ }>;
751
+ snapshotDescription: string | null;
752
+ actions: AirJamGameAgentActionDescriptor[];
753
+ snapshot: JsonObject;
754
+ rawStores: AirJamRuntimeStoreSnapshot[];
755
+ };
756
+ type AirJamGameActionAcknowledgementObservation = "host-acknowledged" | "host-acknowledgement-not-observed";
757
+ type AirJamGameActionOutcome = "contract_changed" | "runtime_replaced" | "accepted" | "rejected" | "acknowledgement-not-observed-state-changed" | "acknowledgement-not-observed-no-state-change-observed";
758
+ type InvokeGameActionResult = AirJamVirtualControllerSessionSummary & {
759
+ actionId: string;
760
+ lane: "player" | "host";
761
+ actionName: string;
762
+ storeDomain: string;
763
+ payload?: unknown;
764
+ sentAt: string;
765
+ acknowledgement: AirJamActionInvocationResult;
766
+ acknowledgementObservation: AirJamGameActionAcknowledgementObservation;
767
+ outcome: AirJamGameActionOutcome;
768
+ snapshotBefore: AirJamGameSnapshotInspection;
769
+ snapshotAfter: AirJamGameSnapshotInspection;
770
+ snapshotAfterStatus: "committed-update-observed" | "no-new-commit-before-timeout" | "contract_changed" | "runtime_replaced";
771
+ observedStateChange: boolean;
772
+ };
773
+ type AirJamGameSessionActionDescriptor = {
774
+ actionId: string;
775
+ lane: "player" | "host";
776
+ source: "semantic-game";
777
+ description: string | null;
778
+ availability: string | null;
779
+ payload: {
780
+ kind: "none" | "boolean" | "number" | "string" | "enum" | "json";
781
+ description: string | null;
782
+ allowedValues?: string[];
783
+ };
784
+ resultDescription: string | null;
785
+ };
786
+ type AirJamVisualScenarioList = {
787
+ gameId: string;
788
+ configPath: string;
789
+ scenarios: AirJamVisualScenarioSummary[];
790
+ };
791
+ type ListVisualScenariosOptions = {
792
+ cwd?: string;
793
+ gameId?: string;
794
+ };
795
+ type CaptureVisualsOptions = {
796
+ cwd?: string;
797
+ gameId?: string;
798
+ scenarioId?: string;
799
+ mode?: AirJamVisualCaptureMode;
800
+ secure?: boolean;
801
+ };
802
+ type AirJamVisualScenarioMetadata = {
803
+ gameId: string;
804
+ scenarioId: string;
805
+ scenarioDescription: string | null;
806
+ runtimeMode: AirJamVisualArtifactMode;
807
+ capturedAt: string;
808
+ status: "captured" | "failed";
809
+ urls: JsonObject;
810
+ screenshots: Array<{
811
+ surface: "host" | "controller";
812
+ viewportName: string;
813
+ width: number;
814
+ height: number;
815
+ fileName: string;
816
+ relativePath: string;
817
+ }>;
818
+ notes: string[];
819
+ error: {
820
+ message: string;
821
+ stack: string | null;
822
+ } | null;
823
+ };
824
+ type CaptureVisualsResult = {
825
+ gameId: string;
826
+ artifactRoot: string;
827
+ summaryPath: string;
828
+ summary: AirJamVisualCaptureSummary;
829
+ scenarios: AirJamVisualScenarioMetadata[];
830
+ };
831
+ type ConnectControllerOptions = {
832
+ cwd?: string;
833
+ gameId?: string;
834
+ mode?: AirJamDevMode;
835
+ secure?: boolean;
836
+ roomId?: string;
837
+ controllerJoinUrl?: string;
838
+ nickname?: string;
839
+ avatarId?: string;
840
+ timeoutMs?: number;
841
+ };
842
+ type SendControllerInputOptions = {
843
+ controllerSessionId: string;
844
+ input: JsonObject;
845
+ };
846
+ type InvokeControllerActionOptions = {
847
+ timeoutMs?: number;
848
+ controllerSessionId: string;
849
+ actionName: string;
850
+ storeDomain: string;
851
+ payload?: JsonObject;
852
+ };
853
+ type DisconnectControllerOptions = {
854
+ controllerSessionId: string;
855
+ };
856
+ type ReadRuntimeSnapshotOptions = {
857
+ controllerSessionId: string;
858
+ storeDomains?: string[];
859
+ requestSync?: boolean;
860
+ timeoutMs?: number;
861
+ };
862
+ type AirJamRuntimeStoreSnapshot = {
863
+ storeDomain: string;
864
+ data: JsonObject;
865
+ updatedAt: string;
866
+ revision: number;
867
+ };
868
+ type AirJamVirtualControllerSessionSummary = {
869
+ controllerSessionId: string;
870
+ gameId: string | null;
871
+ projectMode: AirJamProjectMode;
872
+ mode: AirJamDevMode | null;
873
+ topologyMode: "standalone-dev" | "arcade-live" | "arcade-built" | "self-hosted-production" | null;
874
+ secure: boolean;
875
+ process: AirJamManagedDevProcess | null;
876
+ roomId: string;
877
+ /** The seat the room gave this phone. */
878
+ controllerId: string;
879
+ controllerJoinUrl: string;
880
+ socketOrigin: string;
881
+ connected: boolean;
882
+ connectedAt: string;
883
+ disconnectedAt: string | null;
884
+ disconnectReason: string | null;
885
+ };
886
+ type AirJamVirtualControllerSession = AirJamVirtualControllerSessionSummary & {
887
+ welcome: JsonObject | null;
888
+ controllerState: JsonObject | null;
889
+ players: JsonObject[];
890
+ storeSnapshots: AirJamRuntimeStoreSnapshot[];
891
+ lastSignal: JsonObject | null;
892
+ lastError: JsonObject | null;
893
+ requestedStoreDomains: string[];
894
+ missingStoreDomains: string[];
895
+ };
896
+ type SendControllerInputResult = AirJamVirtualControllerSessionSummary & {
897
+ input: JsonObject;
898
+ sentAt: string;
899
+ };
900
+ type InvokeControllerActionResult = AirJamVirtualControllerSessionSummary & {
901
+ actionName: string;
902
+ storeDomain: string;
903
+ payload?: JsonObject;
904
+ sentAt: string;
905
+ acknowledgement: AirJamActionInvocationResult;
906
+ };
907
+ type DisconnectControllerResult = ControllerDisconnection & {
908
+ disconnected: boolean;
909
+ session: AirJamVirtualControllerSessionSummary;
910
+ };
911
+ type AirJamRuntimeSnapshotInspection = AirJamVirtualControllerSession;
912
+ type OpenGameSessionOptions = ConnectControllerOptions;
913
+ type ReadGameSessionOptions = {
914
+ cwd?: string;
915
+ gameSessionId: string;
916
+ timeoutMs?: number;
917
+ };
918
+ type SendGameSessionInputOptions = {
919
+ cwd?: string;
920
+ gameSessionId: string;
921
+ input: JsonObject;
922
+ };
923
+ type InvokeGameSessionActionOptions = {
924
+ cwd?: string;
925
+ gameSessionId: string;
926
+ actionId: string;
927
+ payload?: unknown;
928
+ timeoutMs?: number;
929
+ };
930
+ type CaptureGameSessionVisualsOptions = {
931
+ cwd?: string;
932
+ gameSessionId: string;
933
+ timeoutMs?: number;
934
+ };
935
+ type CloseGameSessionOptions = {
936
+ cwd?: string;
937
+ gameSessionId: string;
938
+ };
939
+ type AirJamGameSessionSummary = {
940
+ ownerInstanceId: string;
941
+ semanticAccess: "owned-host" | "delegated-host" | "participant-only";
942
+ gameSessionId: string;
943
+ cwd: string;
944
+ gameId: string | null;
945
+ controllerSessionId: string;
946
+ projectMode: AirJamProjectMode;
947
+ mode: AirJamDevMode | null;
948
+ topologyMode: "standalone-dev" | "arcade-live" | "arcade-built" | "self-hosted-production" | null;
949
+ secure: boolean;
950
+ process: AirJamManagedDevProcess | null;
951
+ roomId: string;
952
+ /** The seat the room gave this phone. */
953
+ controllerId: string;
954
+ controllerJoinUrl: string;
955
+ socketOrigin: string;
956
+ connected: boolean;
957
+ connectedAt: string;
958
+ disconnectedAt: string | null;
959
+ disconnectReason: string | null;
960
+ hasAgentContract: boolean;
961
+ actions: AirJamGameSessionActionDescriptor[];
962
+ };
963
+ type AirJamGameSessionInspection = AirJamGameSessionSummary & {
964
+ runtimeSnapshot: AirJamRuntimeSnapshotInspection;
965
+ gameSnapshot: AirJamGameSnapshotInspection | null;
966
+ };
967
+ type SendGameSessionInputResult = AirJamGameSessionSummary & {
968
+ input: JsonObject;
969
+ sentAt: string;
970
+ };
971
+ type InvokeGameSessionActionResult = AirJamGameSessionSummary & {
972
+ actionId: string;
973
+ lane: "player" | "host";
974
+ invocation: InvokeGameActionResult;
975
+ };
976
+ type AirJamGameSessionVisualCaptureResult = AirJamGameSessionSummary & {
977
+ contract: "air-jam-game-session-visual-capture/v1";
978
+ capturedAt: string;
979
+ artifactDir: string;
980
+ screenshots: Array<AirJamRuntimeOwnerScreenshot & {
981
+ filePath: string;
982
+ }>;
983
+ };
984
+ type CloseGameSessionResult = {
985
+ closed: boolean;
986
+ disconnection: Pick<DisconnectControllerResult, "release" | "leave">;
987
+ session: AirJamGameSessionSummary;
988
+ };
989
+ type AirJamVisualCaptureSummary = {
990
+ gameId: string;
991
+ mode: AirJamVisualArtifactMode;
992
+ secure: boolean;
993
+ capturedAt: string;
994
+ scenarios: Array<{
995
+ scenarioId: string;
996
+ status: "captured" | "failed";
997
+ screenshotCount: number;
998
+ relativeDir: string;
999
+ }>;
1000
+ };
1001
+ type AirJamVisualCaptureInspection = {
1002
+ gameId: string;
1003
+ summaryPath: string;
1004
+ summary: AirJamVisualCaptureSummary;
1005
+ };
1006
+ type AirJamPlatformMachineSessionStore = zod.infer<typeof storedPlatformSessionSchema>;
1007
+ type StartPlatformDeviceAuthorizationOptions = {
1008
+ platformUrl?: string;
1009
+ clientName?: string;
1010
+ };
1011
+ type PollPlatformDeviceAuthorizationOptions = {
1012
+ platformUrl?: string;
1013
+ deviceCode: string;
1014
+ };
1015
+ type LoginPlatformWithDeviceFlowOptions = {
1016
+ platformUrl?: string;
1017
+ clientName?: string;
1018
+ onPrompt?: (payload: {
1019
+ deviceCode: string;
1020
+ userCode: string;
1021
+ verificationUrl: string;
1022
+ verificationUriComplete: string;
1023
+ expiresAt: string;
1024
+ intervalSeconds: number;
1025
+ }) => void | Promise<void>;
1026
+ };
1027
+ type GetPlatformMachineProfileOptions = {
1028
+ platformUrl?: string;
1029
+ token?: string;
1030
+ };
1031
+ type LogoutPlatformMachineSessionOptions = {
1032
+ platformUrl?: string;
1033
+ token?: string;
1034
+ };
1035
+
1036
+ export { type BundleLocalReleaseOptions as $, type AirJamProjectContext as A, type AirJamVisualCaptureSummary as B, type ConnectControllerOptions as C, type DisconnectControllerOptions as D, type ReadDevLogsOptions as E, type CommandResult as F, type GetTopologyOptions as G, type InspectPlatformGameMediaOptions as H, type InvokeControllerActionOptions as I, type RequestPlatformGameMediaUploadTargetOptions as J, type AirJamLocalHostedGameDefaults as K, type ListPlatformGamesOptions as L, type MutatePlatformGameMediaAssetOptions as M, type InspectPlatformGameOptions as N, type CreatePlatformGameOptions as O, type UpdatePlatformGameOptions as P, type RunQualityGateOptions as Q, type ReadRuntimeSnapshotOptions as R, type SendControllerInputOptions as S, type RunCompleteEvaluationOptions as T, type UploadPlatformGameMediaFileOptions as U, type AirJamCompleteEvaluationResult as V, type AirJamQualityGate as W, type InspectLocalReleaseOptions as X, type AirJamLocalReleaseDoctor as Y, type ValidateLocalReleaseOptions as Z, type AirJamLocalReleaseValidation as _, type AirJamProjectInspection as a, type BundleLocalReleaseResult as a0, type ListPlatformReleaseTargetsOptions as a1, type ListPlatformReleasesOptions as a2, type InspectPlatformReleaseOptions as a3, type PublishPlatformReleaseOptions as a4, type ArchivePlatformReleaseOptions as a5, type UploadPlatformReleaseGenerationOptions as a6, type FinalizePlatformReleaseGenerationOptions as a7, type ExportPlatformReleaseGenerationOptions as a8, type ExportPlatformReleaseGenerationResult as a9, AirJamPlatformApiError as aA, AirJamStoredPlatformSessionError as aB, resolvePlatformBaseUrl as aC, requestPlatformMachineApi as aD, readStoredPlatformMachineSession as aE, writeStoredPlatformMachineSession as aF, clearStoredPlatformMachineSession as aG, startPlatformDeviceAuthorization as aH, pollPlatformDeviceAuthorization as aI, loginPlatformWithDeviceFlow as aJ, resolvePlatformMachineAuth as aK, listPlatformMachineSessions as aL, revokePlatformMachineSession as aM, getPlatformMachineProfile as aN, updatePlatformMachineProfile as aO, logoutPlatformMachineSession as aP, getPlatformMachineAuthStatus as aQ, getPlatformAuthStoragePath as aR, type AirJamPlatformAuthStatus as aS, type AirJamPlatformMachineSessionStore as aT, type GetPlatformMachineProfileOptions as aU, type LoginPlatformWithDeviceFlowOptions as aV, type LogoutPlatformMachineSessionOptions as aW, type PollPlatformDeviceAuthorizationOptions as aX, type StartPlatformDeviceAuthorizationOptions as aY, type SubmitPlatformReleaseOptions as aa, type SubmitPlatformReleaseResult as ab, type AirJamLocalReleaseIssue as ac, type CaptureVisualsOptions as ad, type AirJamVisualArtifactMode as ae, type ListVisualScenariosOptions as af, type AirJamVisualScenarioList as ag, type CaptureVisualsResult as ah, type AirJamVisualScenarioMetadata as ai, type InvokeGameActionResult as aj, type OpenGameSessionOptions as ak, type AirJamGameSessionSummary as al, type ReadGameSessionOptions as am, type AirJamGameSessionInspection as an, type SendGameSessionInputOptions as ao, type SendGameSessionInputResult as ap, type InvokeGameSessionActionOptions as aq, type InvokeGameSessionActionResult as ar, type CaptureGameSessionVisualsOptions as as, type AirJamGameSessionVisualCaptureResult as at, type CloseGameSessionOptions as au, type CloseGameSessionResult as av, type ControllerDisconnection as aw, type AirJamGameSessionActionDescriptor as ax, resolveAirJamStateDirectory as ay, storedPlatformSessionSchema as az, type AirJamCapabilityGroup as b, type AirJamPackageManager as c, type AirJamRuntimeOwnerScreenshot as d, type AirJamVirtualControllerSessionSummary as e, type AirJamGameInspection as f, type AirJamVirtualControllerSession as g, type SendControllerInputResult as h, type InvokeControllerActionResult as i, type AirJamRuntimeSnapshotInspection as j, type DisconnectControllerResult as k, type AirJamRuntimeStoreSnapshot as l, type AirJamRuntimeTopology as m, type GetDevStatusOptions as n, type AirJamDevStatus as o, type StartDevOptions as p, type StartDevResult as q, type StopDevOptions as r, type StopDevResult as s, type ResetLocalDevOptions as t, type ResetLocalDevResult as u, type AirJamDevMode as v, type AirJamManagedDevProcess as w, type AirJamSurfaceUrlSummary as x, type AirJamGameSummary as y, type AirJamVisualCaptureInspection as z };