@air-jam/devtools 0.0.0-stage → 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.
Files changed (135) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -2
  3. package/dist/agent.d.ts +15 -0
  4. package/dist/agent.js +19 -0
  5. package/dist/agent.js.map +1 -0
  6. package/dist/chunk-5YAARMW5.js +36 -0
  7. package/dist/chunk-5YAARMW5.js.map +1 -0
  8. package/dist/chunk-6WQODT37.js +1019 -0
  9. package/dist/chunk-6WQODT37.js.map +1 -0
  10. package/dist/chunk-CKFT2ZJE.js +801 -0
  11. package/dist/chunk-CKFT2ZJE.js.map +1 -0
  12. package/dist/chunk-ER3Q2C4G.js +358 -0
  13. package/dist/chunk-ER3Q2C4G.js.map +1 -0
  14. package/dist/chunk-GUEZP773.js +851 -0
  15. package/dist/chunk-GUEZP773.js.map +1 -0
  16. package/dist/chunk-HIDNI56E.js +33 -0
  17. package/dist/chunk-HIDNI56E.js.map +1 -0
  18. package/dist/chunk-QKXS5D35.js +43 -0
  19. package/dist/chunk-QKXS5D35.js.map +1 -0
  20. package/dist/chunk-S4LSCEVE.js +261 -0
  21. package/dist/chunk-S4LSCEVE.js.map +1 -0
  22. package/dist/chunk-VKMJO6VN.js +360 -0
  23. package/dist/chunk-VKMJO6VN.js.map +1 -0
  24. package/dist/chunk-WFUR3MXY.js +67 -0
  25. package/dist/chunk-WFUR3MXY.js.map +1 -0
  26. package/dist/chunk-XEMR7KUE.js +361 -0
  27. package/dist/chunk-XEMR7KUE.js.map +1 -0
  28. package/dist/chunk-ZLPD7FY5.js +191 -0
  29. package/dist/chunk-ZLPD7FY5.js.map +1 -0
  30. package/dist/context.d.ts +13 -0
  31. package/dist/context.js +9 -0
  32. package/dist/context.js.map +1 -0
  33. package/dist/controller.d.ts +41 -0
  34. package/dist/controller.js +30 -0
  35. package/dist/controller.js.map +1 -0
  36. package/dist/dev.d.ts +15 -0
  37. package/dist/dev.js +20 -0
  38. package/dist/dev.js.map +1 -0
  39. package/dist/game-session-broker.d.ts +57 -0
  40. package/dist/game-session-broker.js +235 -0
  41. package/dist/game-session-broker.js.map +1 -0
  42. package/dist/game-session.d.ts +13 -0
  43. package/dist/game-session.js +24 -0
  44. package/dist/game-session.js.map +1 -0
  45. package/dist/games.d.ts +21 -0
  46. package/dist/games.js +14 -0
  47. package/dist/games.js.map +1 -0
  48. package/dist/harness/visual.d.ts +321 -0
  49. package/dist/harness/visual.js +41 -0
  50. package/dist/harness/visual.js.map +1 -0
  51. package/dist/logs.d.ts +9 -0
  52. package/dist/logs.js +58 -0
  53. package/dist/logs.js.map +1 -0
  54. package/dist/mcp-config.d.ts +63 -0
  55. package/dist/mcp-config.js +190 -0
  56. package/dist/mcp-config.js.map +1 -0
  57. package/dist/platform-auth.d.ts +112 -0
  58. package/dist/platform-auth.js +37 -0
  59. package/dist/platform-auth.js.map +1 -0
  60. package/dist/platform-game-media.d.ts +309 -0
  61. package/dist/platform-game-media.js +168 -0
  62. package/dist/platform-game-media.js.map +1 -0
  63. package/dist/platform-games.d.ts +65 -0
  64. package/dist/platform-games.js +251 -0
  65. package/dist/platform-games.js.map +1 -0
  66. package/dist/quality.d.ts +10 -0
  67. package/dist/quality.js +63 -0
  68. package/dist/quality.js.map +1 -0
  69. package/dist/release.d.ts +1094 -0
  70. package/dist/release.js +1347 -0
  71. package/dist/release.js.map +1 -0
  72. package/dist/tooling/agent-contract.d.ts +2 -0
  73. package/dist/tooling/agent-contract.js +193 -0
  74. package/dist/tooling/agent-contract.js.map +1 -0
  75. package/dist/tooling/hold-runtime-host.d.ts +2 -0
  76. package/dist/tooling/hold-runtime-host.js +229 -0
  77. package/dist/tooling/hold-runtime-host.js.map +1 -0
  78. package/dist/tooling/inspect-airjam-agent.d.ts +2 -0
  79. package/dist/tooling/inspect-airjam-agent.js +37 -0
  80. package/dist/tooling/inspect-airjam-agent.js.map +1 -0
  81. package/dist/tooling/list-visual-scenarios.d.ts +2 -0
  82. package/dist/tooling/list-visual-scenarios.js +62 -0
  83. package/dist/tooling/list-visual-scenarios.js.map +1 -0
  84. package/dist/tooling/managed-dev-supervisor.d.ts +2 -0
  85. package/dist/tooling/managed-dev-supervisor.js +51 -0
  86. package/dist/tooling/managed-dev-supervisor.js.map +1 -0
  87. package/dist/tooling/run-visual-capture.d.ts +2 -0
  88. package/dist/tooling/run-visual-capture.js +167 -0
  89. package/dist/tooling/run-visual-capture.js.map +1 -0
  90. package/dist/types-C6NrHt88.d.ts +775 -0
  91. package/dist/visual.d.ts +15 -0
  92. package/dist/visual.js +263 -0
  93. package/dist/visual.js.map +1 -0
  94. package/package.json +113 -3
  95. package/src/agent.ts +380 -0
  96. package/src/commands.ts +40 -0
  97. package/src/context.ts +229 -0
  98. package/src/controller.ts +1376 -0
  99. package/src/dev.ts +999 -0
  100. package/src/fs-utils.ts +93 -0
  101. package/src/game-action-observation.ts +96 -0
  102. package/src/game-session-broker.ts +301 -0
  103. package/src/game-session.ts +459 -0
  104. package/src/games.ts +266 -0
  105. package/src/harness/visual/prefab-contract.ts +29 -0
  106. package/src/harness/visual/prefab-runner.ts +178 -0
  107. package/src/harness/visual/runner.ts +546 -0
  108. package/src/harness/visual/scenario-contract.ts +9 -0
  109. package/src/harness/visual/scenario-helpers.ts +63 -0
  110. package/src/harness/visual/session.ts +369 -0
  111. package/src/harness/visual/types.ts +181 -0
  112. package/src/harness/visual.ts +7 -0
  113. package/src/helper-scripts.ts +49 -0
  114. package/src/logs.ts +67 -0
  115. package/src/mcp-config.ts +262 -0
  116. package/src/platform-auth.ts +455 -0
  117. package/src/platform-game-media.ts +209 -0
  118. package/src/platform-games.ts +315 -0
  119. package/src/quality.ts +82 -0
  120. package/src/release.ts +1697 -0
  121. package/src/runtime-owner-protocol.ts +130 -0
  122. package/src/tooling/agent-contract.ts +232 -0
  123. package/src/tooling/agent-declaration.ts +36 -0
  124. package/src/tooling/airjam-agent-inspection.ts +45 -0
  125. package/src/tooling/airjam-agent.ts +118 -0
  126. package/src/tooling/hold-runtime-host.ts +224 -0
  127. package/src/tooling/inspect-airjam-agent.ts +20 -0
  128. package/src/tooling/list-visual-scenarios.ts +64 -0
  129. package/src/tooling/managed-dev-supervisor.ts +71 -0
  130. package/src/tooling/run-visual-capture.ts +217 -0
  131. package/src/tooling/runtime-owner-actions.ts +42 -0
  132. package/src/tooling/visual-pack.ts +46 -0
  133. package/src/types.ts +951 -0
  134. package/src/visual.ts +304 -0
  135. package/src/workspace-contract.ts +32 -0
@@ -0,0 +1,775 @@
1
+ import { AirJamActionInvocationResult } from '@air-jam/sdk';
2
+ import { PlatformMachineRequestOwnedGameMediaUploadTargetInput, PlatformMachineCreateOwnedGameInput, PlatformMachineUpdateOwnedGameInput, PlatformMachineRequestReleaseGenerationExportResult, PlatformMachineGetReleaseResult, PlatformMachineReleaseGeneration, PlatformMachineReleaseJob } from '@air-jam/sdk/platform-machine';
3
+
4
+ type AirJamRuntimeOwnerScreenshot = {
5
+ surface: "host" | "controller";
6
+ width: number;
7
+ height: number;
8
+ relativePath: string;
9
+ };
10
+
11
+ type AirJamProjectMode = "monorepo" | "standalone-game" | "unknown";
12
+ type JsonObject = Record<string, unknown>;
13
+ type PackageJson = JsonObject & {
14
+ name?: string;
15
+ version?: string;
16
+ private?: boolean;
17
+ packageManager?: string;
18
+ scripts?: Record<string, string>;
19
+ dependencies?: Record<string, string>;
20
+ devDependencies?: Record<string, string>;
21
+ peerDependencies?: Record<string, string>;
22
+ };
23
+ type AirJamPackageManager = "pnpm" | "npm" | "yarn" | "bun" | "unknown";
24
+ type AirJamProjectContext = {
25
+ rootDir: string;
26
+ mode: AirJamProjectMode;
27
+ packageManager: AirJamPackageManager;
28
+ packageJsonPath: string | null;
29
+ packageJson: PackageJson | null;
30
+ workspaceRoot: string | null;
31
+ reasons: string[];
32
+ };
33
+ type AirJamCapabilityGroup = "project" | "games" | "logs" | "runtime" | "quality" | "repo-workspace" | "ai-pack";
34
+ type AirJamProjectInspection = {
35
+ context: AirJamProjectContext;
36
+ capabilities: AirJamCapabilityGroup[];
37
+ scripts: Record<string, string>;
38
+ airJamPackages: Record<string, string>;
39
+ files: {
40
+ agents: string | null;
41
+ plan: string | null;
42
+ suggestions: string | null;
43
+ docsIndex: string | null;
44
+ };
45
+ };
46
+ type AirJamGameSummary = {
47
+ id: string;
48
+ name: string;
49
+ rootDir: string;
50
+ packageName: string | null;
51
+ description: string | null;
52
+ category: string | null;
53
+ scaffold: boolean | null;
54
+ manifestPath: string | null;
55
+ configPath: string | null;
56
+ };
57
+ type AirJamGameInspection = AirJamGameSummary & {
58
+ packageJsonPath: string | null;
59
+ scripts: Record<string, string>;
60
+ metadataExportLikely: boolean;
61
+ controllerPathLikely: string | null;
62
+ qualityGates: AirJamQualityGate[];
63
+ };
64
+ type AirJamLocalHostedGameDefaults = {
65
+ projectDir: string;
66
+ configPath: string | null;
67
+ manifestPath: string | null;
68
+ packageJsonPath: string | null;
69
+ packageName: string | null;
70
+ sourceUrl: string | null;
71
+ metadata: {
72
+ name: string | null;
73
+ slug: string | null;
74
+ description: string | null;
75
+ category: string | null;
76
+ tags: string[];
77
+ };
78
+ template: {
79
+ id: string | null;
80
+ name: string | null;
81
+ description: string | null;
82
+ category: string | null;
83
+ };
84
+ };
85
+ type AirJamQualityGate = "typecheck" | "lint" | "test" | "build" | "format-check" | "scaffold-smoke" | "release-check";
86
+ type AirJamLocalReleaseIssue = {
87
+ code: string;
88
+ severity: "error" | "warning";
89
+ message: string;
90
+ path: string | null;
91
+ };
92
+ type InspectLocalReleaseOptions = {
93
+ cwd?: string;
94
+ distDir?: string;
95
+ };
96
+ type AirJamLocalReleaseDoctor = {
97
+ projectDir: string;
98
+ packageJsonPath: string | null;
99
+ packageName: string | null;
100
+ packageVersion: string | null;
101
+ packageManager: AirJamPackageManager;
102
+ configPath: string | null;
103
+ buildScript: string | null;
104
+ metadataExportLikely: boolean;
105
+ controllerPath: string | null;
106
+ distDir: string;
107
+ distExists: boolean;
108
+ distEntryExists: boolean;
109
+ recommendedBundlePath: string;
110
+ canBundle: boolean;
111
+ issues: AirJamLocalReleaseIssue[];
112
+ hostedContract: {
113
+ entryPath: string;
114
+ manifestPath: string;
115
+ hostPath: string;
116
+ controllerPath: string;
117
+ };
118
+ };
119
+ type ValidateLocalReleaseOptions = {
120
+ cwd?: string;
121
+ distDir?: string;
122
+ bundlePath?: string;
123
+ skipBuild?: boolean;
124
+ };
125
+ type AirJamLocalReleaseValidation = {
126
+ source: {
127
+ kind: "project";
128
+ projectDir: string;
129
+ distDir: string;
130
+ bundlePath: null;
131
+ } | {
132
+ kind: "bundle";
133
+ projectDir: null;
134
+ distDir: null;
135
+ bundlePath: string;
136
+ };
137
+ ok: boolean;
138
+ issues: AirJamLocalReleaseIssue[];
139
+ manifest: JsonObject | null;
140
+ entryPath: string | null;
141
+ wrapperDirectory: string | null;
142
+ fileCount: number;
143
+ extractedSizeBytes: number;
144
+ };
145
+ type BundleLocalReleaseOptions = {
146
+ cwd?: string;
147
+ distDir?: string;
148
+ out?: string;
149
+ skipBuild?: boolean;
150
+ };
151
+ type BundleLocalReleaseResult = {
152
+ projectDir: string;
153
+ distDir: string;
154
+ outputFile: string;
155
+ built: boolean;
156
+ buildResult: CommandResult | null;
157
+ validation: AirJamLocalReleaseValidation;
158
+ };
159
+ type ListPlatformReleaseTargetsOptions = {
160
+ platformUrl?: string;
161
+ token?: string;
162
+ };
163
+ type ListPlatformGamesOptions = {
164
+ platformUrl?: string;
165
+ token?: string;
166
+ };
167
+ type InspectPlatformGameOptions = {
168
+ platformUrl?: string;
169
+ token?: string;
170
+ slugOrId: string;
171
+ };
172
+ type CreatePlatformGameOptions = {
173
+ platformUrl?: string;
174
+ token?: string;
175
+ input: PlatformMachineCreateOwnedGameInput;
176
+ };
177
+ type UpdatePlatformGameOptions = {
178
+ platformUrl?: string;
179
+ token?: string;
180
+ slugOrId: string;
181
+ input: PlatformMachineUpdateOwnedGameInput;
182
+ };
183
+ type InspectPlatformGameMediaOptions = {
184
+ platformUrl?: string;
185
+ token?: string;
186
+ slugOrId: string;
187
+ };
188
+ type RequestPlatformGameMediaUploadTargetOptions = {
189
+ platformUrl?: string;
190
+ token?: string;
191
+ slugOrId: string;
192
+ input: PlatformMachineRequestOwnedGameMediaUploadTargetInput;
193
+ };
194
+ type MutatePlatformGameMediaAssetOptions = {
195
+ platformUrl?: string;
196
+ token?: string;
197
+ slugOrId: string;
198
+ assetId: string;
199
+ };
200
+ type UploadPlatformGameMediaFileOptions = {
201
+ platformUrl?: string;
202
+ token?: string;
203
+ slugOrId: string;
204
+ kind: "thumbnail" | "cover" | "preview_video";
205
+ filePath: string;
206
+ };
207
+ type ListPlatformReleasesOptions = {
208
+ platformUrl?: string;
209
+ token?: string;
210
+ slugOrId: string;
211
+ };
212
+ type InspectPlatformReleaseOptions = {
213
+ platformUrl?: string;
214
+ token?: string;
215
+ releaseId: string;
216
+ };
217
+ type PublishPlatformReleaseOptions = {
218
+ platformUrl?: string;
219
+ token?: string;
220
+ releaseId: string;
221
+ };
222
+ type UploadPlatformReleaseGenerationOptions = {
223
+ platformUrl?: string;
224
+ token?: string;
225
+ releaseId: string;
226
+ cwd?: string;
227
+ bundlePath: string;
228
+ };
229
+ type FinalizePlatformReleaseGenerationOptions = {
230
+ platformUrl?: string;
231
+ token?: string;
232
+ releaseId: string;
233
+ generationId: string;
234
+ };
235
+ type ExportPlatformReleaseGenerationOptions = {
236
+ platformUrl?: string;
237
+ token?: string;
238
+ releaseId: string;
239
+ generationId: string;
240
+ cwd?: string;
241
+ out?: string;
242
+ };
243
+ type ExportPlatformReleaseGenerationResult = PlatformMachineRequestReleaseGenerationExportResult & {
244
+ outputFile: string;
245
+ sizeBytes: number;
246
+ };
247
+ type SubmitPlatformReleaseOptions = {
248
+ platformUrl?: string;
249
+ token?: string;
250
+ slugOrId: string;
251
+ versionLabel?: string;
252
+ cwd?: string;
253
+ distDir?: string;
254
+ bundlePath?: string;
255
+ skipBuild?: boolean;
256
+ waitForProcessing?: boolean;
257
+ processingTimeoutMs?: number;
258
+ processingPollIntervalMs?: number;
259
+ publish?: boolean;
260
+ };
261
+ type SubmitPlatformReleaseResult = {
262
+ bundlePath: string;
263
+ createdRelease: PlatformMachineGetReleaseResult["release"];
264
+ createdGeneration: PlatformMachineReleaseGeneration;
265
+ submittedRelease: PlatformMachineGetReleaseResult["release"];
266
+ submittedGeneration: PlatformMachineReleaseGeneration;
267
+ processingJob: PlatformMachineReleaseJob;
268
+ processedRelease: PlatformMachineGetReleaseResult["release"] | null;
269
+ publishedRelease: PlatformMachineGetReleaseResult["release"] | null;
270
+ };
271
+ type AirJamPlatformAuthStatus = {
272
+ authenticated: boolean;
273
+ storagePath: string;
274
+ platformBaseUrl: string | null;
275
+ clientName: string | null;
276
+ storedAt: string | null;
277
+ user: {
278
+ id: string;
279
+ name: string;
280
+ email: string;
281
+ role: "creator" | "ops_admin";
282
+ } | null;
283
+ session: {
284
+ id: string;
285
+ expiresAt: string;
286
+ createdAt: string;
287
+ userAgent: string;
288
+ } | null;
289
+ };
290
+ type CommandResult = {
291
+ command: string;
292
+ args: string[];
293
+ cwd: string;
294
+ exitCode: number | null;
295
+ signal: NodeJS.Signals | null;
296
+ stdout: string;
297
+ stderr: string;
298
+ durationMs: number;
299
+ ok: boolean;
300
+ };
301
+ type ReadDevLogsOptions = {
302
+ cwd?: string;
303
+ view?: "signal" | "full" | string;
304
+ source?: string;
305
+ trace?: string;
306
+ room?: string;
307
+ controller?: string;
308
+ event?: string;
309
+ process?: string;
310
+ level?: string;
311
+ runtime?: string;
312
+ epoch?: number;
313
+ consoleCategory?: string;
314
+ file?: string;
315
+ tail?: number;
316
+ };
317
+ type RunQualityGateOptions = {
318
+ cwd?: string;
319
+ gate: AirJamQualityGate;
320
+ packageFilter?: string;
321
+ };
322
+ type RunCompleteEvaluationOptions = {
323
+ cwd?: string;
324
+ };
325
+ type AirJamCompleteEvaluationResult = {
326
+ contract: "air-jam-complete-evaluation/v1";
327
+ status: "passed" | "failed";
328
+ startedAt: string;
329
+ endedAt: string;
330
+ gates: Array<{
331
+ gate: AirJamQualityGate;
332
+ result: CommandResult;
333
+ }>;
334
+ };
335
+ type AirJamDevMode = "standalone-dev" | "arcade-dev" | "arcade-test";
336
+ type AirJamVisualArtifactMode = "standalone-dev" | "arcade-built";
337
+ type AirJamVisualCaptureMode = "standalone-dev" | "arcade-test";
338
+ type AirJamManagedDevProcess = {
339
+ id: string;
340
+ pid: number;
341
+ cwd: string;
342
+ projectMode: Exclude<AirJamProjectMode, "unknown">;
343
+ mode: AirJamDevMode;
344
+ topologyMode: "standalone-dev" | "arcade-live" | "arcade-built";
345
+ secure: boolean;
346
+ gameId: string | null;
347
+ command: string;
348
+ args: string[];
349
+ logPath: string;
350
+ expectedLogPath: string | null;
351
+ startedAt: string;
352
+ };
353
+ type AirJamSurfaceUrlSummary = {
354
+ appOrigin: string | null;
355
+ hostUrl: string | null;
356
+ controllerBaseUrl: string | null;
357
+ publicHost: string | null;
358
+ localBuildUrl: string | null;
359
+ browserBuildUrl: string | null;
360
+ };
361
+ type AirJamRuntimeTopology = {
362
+ projectMode: Exclude<AirJamProjectMode, "unknown">;
363
+ mode: AirJamDevMode;
364
+ topologyMode: "standalone-dev" | "arcade-live" | "arcade-built";
365
+ gameId: string | null;
366
+ secure: boolean;
367
+ surfaces: Record<string, JsonObject>;
368
+ urls: AirJamSurfaceUrlSummary;
369
+ process: AirJamManagedDevProcess | null;
370
+ };
371
+ type StartDevOptions = {
372
+ cwd?: string;
373
+ gameId?: string;
374
+ mode?: AirJamDevMode;
375
+ secure?: boolean;
376
+ };
377
+ type StartDevResult = {
378
+ process: AirJamManagedDevProcess;
379
+ reusedExistingProcess: boolean;
380
+ topology: AirJamRuntimeTopology;
381
+ };
382
+ type StopDevOptions = {
383
+ cwd?: string;
384
+ processId?: string;
385
+ mode?: AirJamDevMode;
386
+ };
387
+ type StopDevResult = {
388
+ stopped: AirJamManagedDevProcess[];
389
+ };
390
+ type AirJamUnmanagedDevProcess = {
391
+ pid: number;
392
+ ports: number[];
393
+ command: string | null;
394
+ startedAt: string | null;
395
+ ageMs: number | null;
396
+ managed: false;
397
+ };
398
+ type GetDevStatusOptions = {
399
+ cwd?: string;
400
+ };
401
+ type AirJamDevStatus = {
402
+ processes: AirJamManagedDevProcess[];
403
+ unmanagedProcesses: AirJamUnmanagedDevProcess[];
404
+ knownPorts: number[];
405
+ };
406
+ type ResetLocalDevOptions = {
407
+ cwd?: string;
408
+ };
409
+ type ResetLocalDevResult = {
410
+ stoppedManaged: AirJamManagedDevProcess[];
411
+ stoppedUnmanaged: AirJamUnmanagedDevProcess[];
412
+ remainingUnmanaged: AirJamUnmanagedDevProcess[];
413
+ knownPorts: number[];
414
+ };
415
+ type GetTopologyOptions = {
416
+ cwd?: string;
417
+ gameId?: string;
418
+ mode?: AirJamDevMode;
419
+ secure?: boolean;
420
+ };
421
+ type AirJamVisualScenarioSummary = {
422
+ gameId: string;
423
+ scenarioId: string;
424
+ description: string | null;
425
+ supportedModes: AirJamVisualCaptureMode[];
426
+ };
427
+ type AirJamGameAgentActionDescriptor = {
428
+ actionId: string;
429
+ target: {
430
+ kind: "participant" | "host";
431
+ actionName: string;
432
+ storeDomain: string;
433
+ };
434
+ description: string | null;
435
+ availability: string | null;
436
+ payload: {
437
+ kind: "none" | "boolean" | "number" | "string" | "enum" | "json";
438
+ description: string | null;
439
+ allowedValues?: string[];
440
+ };
441
+ resultDescription: string | null;
442
+ };
443
+ type AirJamAgentContractInspection = {
444
+ gameId: string;
445
+ rootDir: string;
446
+ hasContract: boolean;
447
+ snapshotStoreDomains: string[];
448
+ snapshotDescription: string | null;
449
+ actions: AirJamGameAgentActionDescriptor[];
450
+ };
451
+ type InspectGameAgentContractOptions = {
452
+ cwd?: string;
453
+ gameId?: string;
454
+ };
455
+ type ReadGameSnapshotOptions = {
456
+ controllerSessionId: string;
457
+ requestSync?: boolean;
458
+ timeoutMs?: number;
459
+ };
460
+ type AirJamGameSnapshotInspection = {
461
+ controllerSessionId: string;
462
+ gameId: string;
463
+ /** Logical store names declared by the game contract. */
464
+ snapshotStoreDomains: string[];
465
+ /** Concrete replicated store domains used by the active runtime. */
466
+ runtimeStoreDomains: string[];
467
+ storeDomainBindings: Array<{
468
+ contractStoreDomain: string;
469
+ runtimeStoreDomain: string;
470
+ }>;
471
+ snapshotDescription: string | null;
472
+ actions: AirJamGameAgentActionDescriptor[];
473
+ snapshot: JsonObject;
474
+ rawStores: AirJamRuntimeStoreSnapshot[];
475
+ };
476
+ type InvokeGameActionOptions = {
477
+ controllerSessionId: string;
478
+ actionId: string;
479
+ payload?: unknown;
480
+ timeoutMs?: number;
481
+ };
482
+ type AirJamGameActionAcknowledgementObservation = "host-acknowledged" | "host-acknowledgement-not-observed";
483
+ type AirJamGameActionOutcome = "accepted" | "rejected" | "acknowledgement-not-observed-state-changed" | "acknowledgement-not-observed-no-state-change-observed";
484
+ type InvokeGameActionResult = AirJamVirtualControllerSessionSummary & {
485
+ actionId: string;
486
+ lane: "player" | "host";
487
+ actionName: string;
488
+ storeDomain: string;
489
+ payload?: unknown;
490
+ sentAt: string;
491
+ acknowledgement: AirJamActionInvocationResult;
492
+ acknowledgementObservation: AirJamGameActionAcknowledgementObservation;
493
+ outcome: AirJamGameActionOutcome;
494
+ snapshotBefore: AirJamGameSnapshotInspection;
495
+ snapshotAfter: AirJamGameSnapshotInspection;
496
+ snapshotAfterStatus: "committed-update-observed" | "no-new-commit-before-timeout";
497
+ observedStateChange: boolean;
498
+ };
499
+ type AirJamGameSessionActionDescriptor = {
500
+ actionId: string;
501
+ lane: "player" | "host";
502
+ source: "semantic-game";
503
+ description: string | null;
504
+ availability: string | null;
505
+ payload: {
506
+ kind: "none" | "boolean" | "number" | "string" | "enum" | "json";
507
+ description: string | null;
508
+ allowedValues?: string[];
509
+ };
510
+ resultDescription: string | null;
511
+ };
512
+ type AirJamVisualScenarioList = {
513
+ gameId: string;
514
+ scenarioModulePath: string | null;
515
+ scenarios: AirJamVisualScenarioSummary[];
516
+ };
517
+ type ListVisualScenariosOptions = {
518
+ cwd?: string;
519
+ gameId?: string;
520
+ };
521
+ type CaptureVisualsOptions = {
522
+ cwd?: string;
523
+ gameId?: string;
524
+ scenarioId?: string;
525
+ mode?: AirJamVisualCaptureMode;
526
+ secure?: boolean;
527
+ };
528
+ type AirJamVisualScenarioMetadata = {
529
+ gameId: string;
530
+ scenarioId: string;
531
+ scenarioDescription: string | null;
532
+ runtimeMode: AirJamVisualArtifactMode;
533
+ capturedAt: string;
534
+ status: "captured" | "failed";
535
+ urls: JsonObject;
536
+ screenshots: Array<{
537
+ surface: "host" | "controller";
538
+ viewportName: string;
539
+ width: number;
540
+ height: number;
541
+ fileName: string;
542
+ relativePath: string;
543
+ }>;
544
+ notes: string[];
545
+ error: {
546
+ message: string;
547
+ stack: string | null;
548
+ } | null;
549
+ };
550
+ type CaptureVisualsResult = {
551
+ gameId: string;
552
+ artifactRoot: string;
553
+ summaryPath: string;
554
+ summary: AirJamVisualCaptureSummary;
555
+ scenarios: AirJamVisualScenarioMetadata[];
556
+ };
557
+ type ConnectControllerOptions = {
558
+ cwd?: string;
559
+ gameId?: string;
560
+ mode?: AirJamDevMode;
561
+ secure?: boolean;
562
+ roomId?: string;
563
+ controllerJoinUrl?: string;
564
+ controllerId?: string;
565
+ deviceId?: string;
566
+ nickname?: string;
567
+ avatarId?: string;
568
+ capabilityToken?: string;
569
+ timeoutMs?: number;
570
+ };
571
+ type SendControllerInputOptions = {
572
+ controllerSessionId: string;
573
+ input: JsonObject;
574
+ };
575
+ type InvokeControllerActionOptions = {
576
+ controllerSessionId: string;
577
+ actionName: string;
578
+ storeDomain: string;
579
+ payload?: JsonObject;
580
+ };
581
+ type DisconnectControllerOptions = {
582
+ controllerSessionId: string;
583
+ };
584
+ type ReadRuntimeSnapshotOptions = {
585
+ controllerSessionId: string;
586
+ storeDomains?: string[];
587
+ requestSync?: boolean;
588
+ timeoutMs?: number;
589
+ };
590
+ type AirJamRuntimeStoreSnapshot = {
591
+ storeDomain: string;
592
+ data: JsonObject;
593
+ updatedAt: string;
594
+ revision: number;
595
+ };
596
+ type AirJamVirtualControllerSessionSummary = {
597
+ controllerSessionId: string;
598
+ gameId: string | null;
599
+ projectMode: AirJamProjectMode;
600
+ mode: AirJamDevMode | null;
601
+ topologyMode: "standalone-dev" | "arcade-live" | "arcade-built" | null;
602
+ secure: boolean;
603
+ process: AirJamManagedDevProcess | null;
604
+ roomId: string;
605
+ controllerId: string;
606
+ deviceId: string;
607
+ controllerJoinUrl: string;
608
+ socketOrigin: string;
609
+ connected: boolean;
610
+ connectedAt: string;
611
+ disconnectedAt: string | null;
612
+ disconnectReason: string | null;
613
+ };
614
+ type AirJamVirtualControllerSession = AirJamVirtualControllerSessionSummary & {
615
+ welcome: JsonObject | null;
616
+ controllerState: JsonObject | null;
617
+ players: JsonObject[];
618
+ storeSnapshots: AirJamRuntimeStoreSnapshot[];
619
+ lastSignal: JsonObject | null;
620
+ lastError: JsonObject | null;
621
+ requestedStoreDomains: string[];
622
+ missingStoreDomains: string[];
623
+ };
624
+ type SendControllerInputResult = AirJamVirtualControllerSessionSummary & {
625
+ input: JsonObject;
626
+ sentAt: string;
627
+ };
628
+ type InvokeControllerActionResult = AirJamVirtualControllerSessionSummary & {
629
+ actionName: string;
630
+ storeDomain: string;
631
+ payload?: JsonObject;
632
+ sentAt: string;
633
+ acknowledgement: AirJamActionInvocationResult;
634
+ };
635
+ type DisconnectControllerResult = {
636
+ disconnected: boolean;
637
+ session: AirJamVirtualControllerSessionSummary;
638
+ };
639
+ type AirJamRuntimeSnapshotInspection = AirJamVirtualControllerSession;
640
+ type OpenGameSessionOptions = ConnectControllerOptions;
641
+ type ReadGameSessionOptions = {
642
+ gameSessionId: string;
643
+ requestSync?: boolean;
644
+ timeoutMs?: number;
645
+ };
646
+ type SendGameSessionInputOptions = {
647
+ gameSessionId: string;
648
+ input: JsonObject;
649
+ };
650
+ type InvokeGameSessionActionOptions = {
651
+ gameSessionId: string;
652
+ actionId: string;
653
+ payload?: unknown;
654
+ timeoutMs?: number;
655
+ };
656
+ type CaptureGameSessionVisualsOptions = {
657
+ gameSessionId: string;
658
+ timeoutMs?: number;
659
+ };
660
+ type CloseGameSessionOptions = {
661
+ gameSessionId: string;
662
+ };
663
+ type AirJamGameSessionSummary = {
664
+ gameSessionId: string;
665
+ cwd: string;
666
+ gameId: string | null;
667
+ controllerSessionId: string;
668
+ projectMode: AirJamProjectMode;
669
+ mode: AirJamDevMode | null;
670
+ topologyMode: "standalone-dev" | "arcade-live" | "arcade-built" | null;
671
+ secure: boolean;
672
+ process: AirJamManagedDevProcess | null;
673
+ roomId: string;
674
+ controllerId: string;
675
+ deviceId: string;
676
+ controllerJoinUrl: string;
677
+ socketOrigin: string;
678
+ connected: boolean;
679
+ connectedAt: string;
680
+ disconnectedAt: string | null;
681
+ disconnectReason: string | null;
682
+ hasAgentContract: boolean;
683
+ actions: AirJamGameSessionActionDescriptor[];
684
+ };
685
+ type AirJamGameSessionInspection = AirJamGameSessionSummary & {
686
+ runtimeSnapshot: AirJamRuntimeSnapshotInspection;
687
+ gameSnapshot: AirJamGameSnapshotInspection | null;
688
+ };
689
+ type SendGameSessionInputResult = AirJamGameSessionSummary & {
690
+ input: JsonObject;
691
+ sentAt: string;
692
+ };
693
+ type InvokeGameSessionActionResult = AirJamGameSessionSummary & {
694
+ actionId: string;
695
+ lane: "player" | "host";
696
+ invocation: InvokeGameActionResult;
697
+ };
698
+ type AirJamGameSessionVisualCaptureResult = AirJamGameSessionSummary & {
699
+ contract: "air-jam-game-session-visual-capture/v1";
700
+ capturedAt: string;
701
+ artifactDir: string;
702
+ screenshots: Array<AirJamRuntimeOwnerScreenshot & {
703
+ filePath: string;
704
+ }>;
705
+ };
706
+ type CloseGameSessionResult = {
707
+ closed: boolean;
708
+ session: AirJamGameSessionSummary;
709
+ };
710
+ type AirJamVisualCaptureSummary = {
711
+ gameId: string;
712
+ mode: AirJamVisualArtifactMode;
713
+ secure: boolean;
714
+ capturedAt: string;
715
+ scenarios: Array<{
716
+ scenarioId: string;
717
+ status: "captured" | "failed";
718
+ screenshotCount: number;
719
+ relativeDir: string;
720
+ }>;
721
+ };
722
+ type AirJamVisualCaptureInspection = {
723
+ gameId: string;
724
+ summaryPath: string;
725
+ summary: AirJamVisualCaptureSummary;
726
+ };
727
+ type AirJamPlatformMachineSessionStore = {
728
+ version: 1;
729
+ platformBaseUrl: string;
730
+ clientName: string | null;
731
+ storedAt: string;
732
+ user: {
733
+ id: string;
734
+ name: string;
735
+ email: string;
736
+ role: "creator" | "ops_admin";
737
+ };
738
+ session: {
739
+ id: string;
740
+ token: string;
741
+ expiresAt: string;
742
+ createdAt: string;
743
+ userAgent: string;
744
+ };
745
+ };
746
+ type StartPlatformDeviceAuthorizationOptions = {
747
+ platformUrl?: string;
748
+ clientName?: string;
749
+ };
750
+ type PollPlatformDeviceAuthorizationOptions = {
751
+ platformUrl?: string;
752
+ deviceCode: string;
753
+ };
754
+ type LoginPlatformWithDeviceFlowOptions = {
755
+ platformUrl?: string;
756
+ clientName?: string;
757
+ onPrompt?: (payload: {
758
+ deviceCode: string;
759
+ userCode: string;
760
+ verificationUrl: string;
761
+ verificationUriComplete: string;
762
+ expiresAt: string;
763
+ intervalSeconds: number;
764
+ }) => void | Promise<void>;
765
+ };
766
+ type GetPlatformMachineProfileOptions = {
767
+ platformUrl?: string;
768
+ token?: string;
769
+ };
770
+ type LogoutPlatformMachineSessionOptions = {
771
+ platformUrl?: string;
772
+ token?: string;
773
+ };
774
+
775
+ export type { AirJamVisualCaptureSummary as $, AirJamAgentContractInspection as A, AirJamDevMode as B, ConnectControllerOptions as C, DisconnectControllerOptions as D, AirJamManagedDevProcess as E, AirJamSurfaceUrlSummary as F, GetTopologyOptions as G, AirJamGameSessionSummary as H, InspectGameAgentContractOptions as I, JsonObject as J, ReadGameSessionOptions as K, AirJamGameSessionInspection as L, SendGameSessionInputOptions as M, SendGameSessionInputResult as N, OpenGameSessionOptions as O, InvokeGameSessionActionOptions as P, InvokeGameSessionActionResult as Q, ReadGameSnapshotOptions as R, SendControllerInputOptions as S, CaptureGameSessionVisualsOptions as T, AirJamGameSessionVisualCaptureResult as U, CloseGameSessionOptions as V, CloseGameSessionResult as W, AirJamGameSessionActionDescriptor as X, AirJamGameSummary as Y, AirJamGameInspection as Z, AirJamVisualCaptureInspection as _, AirJamGameSnapshotInspection as a, ReadDevLogsOptions as a0, CommandResult as a1, AirJamPlatformMachineSessionStore as a2, StartPlatformDeviceAuthorizationOptions as a3, PollPlatformDeviceAuthorizationOptions as a4, LoginPlatformWithDeviceFlowOptions as a5, GetPlatformMachineProfileOptions as a6, LogoutPlatformMachineSessionOptions as a7, AirJamPlatformAuthStatus as a8, InspectPlatformGameMediaOptions as a9, SubmitPlatformReleaseOptions as aA, SubmitPlatformReleaseResult as aB, AirJamLocalReleaseIssue as aC, CaptureVisualsOptions as aD, AirJamVisualArtifactMode as aE, ListVisualScenariosOptions as aF, AirJamVisualScenarioList as aG, CaptureVisualsResult as aH, AirJamVisualScenarioMetadata as aI, RequestPlatformGameMediaUploadTargetOptions as aa, MutatePlatformGameMediaAssetOptions as ab, UploadPlatformGameMediaFileOptions as ac, AirJamLocalHostedGameDefaults as ad, ListPlatformGamesOptions as ae, InspectPlatformGameOptions as af, CreatePlatformGameOptions as ag, UpdatePlatformGameOptions as ah, RunQualityGateOptions as ai, RunCompleteEvaluationOptions as aj, AirJamCompleteEvaluationResult as ak, AirJamQualityGate as al, InspectLocalReleaseOptions as am, AirJamLocalReleaseDoctor as an, ValidateLocalReleaseOptions as ao, AirJamLocalReleaseValidation as ap, BundleLocalReleaseOptions as aq, BundleLocalReleaseResult as ar, ListPlatformReleaseTargetsOptions as as, ListPlatformReleasesOptions as at, InspectPlatformReleaseOptions as au, PublishPlatformReleaseOptions as av, UploadPlatformReleaseGenerationOptions as aw, FinalizePlatformReleaseGenerationOptions as ax, ExportPlatformReleaseGenerationOptions as ay, ExportPlatformReleaseGenerationResult as az, InvokeGameActionOptions as b, InvokeGameActionResult as c, AirJamProjectContext as d, AirJamProjectInspection as e, AirJamCapabilityGroup as f, AirJamPackageManager as g, AirJamRuntimeOwnerScreenshot as h, AirJamVirtualControllerSessionSummary as i, AirJamVirtualControllerSession as j, SendControllerInputResult as k, InvokeControllerActionOptions as l, InvokeControllerActionResult as m, ReadRuntimeSnapshotOptions as n, AirJamRuntimeSnapshotInspection as o, DisconnectControllerResult as p, AirJamRuntimeStoreSnapshot as q, AirJamRuntimeTopology as r, GetDevStatusOptions as s, AirJamDevStatus as t, StartDevOptions as u, StartDevResult as v, StopDevOptions as w, StopDevResult as x, ResetLocalDevOptions as y, ResetLocalDevResult as z };