@fungi.computer/agar 0.0.0-stage → 0.0.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 (159) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +766 -2
  3. package/dist/agent-message-meta.d.ts +74 -0
  4. package/dist/agent-message-meta.js +63 -0
  5. package/dist/agents.d.ts +170 -0
  6. package/dist/agents.js +218 -0
  7. package/dist/app-build-contract.d.ts +43 -0
  8. package/dist/app-build-contract.js +24 -0
  9. package/dist/apps.d.ts +66 -0
  10. package/dist/apps.js +47 -0
  11. package/dist/backend-declaration.d.ts +6 -0
  12. package/dist/backend-declaration.js +65 -0
  13. package/dist/backend-definition.d.ts +88 -0
  14. package/dist/backend-definition.js +158 -0
  15. package/dist/backend-refusal.d.ts +10 -0
  16. package/dist/backend-refusal.js +10 -0
  17. package/dist/backend.d.ts +30 -0
  18. package/dist/backend.js +28 -0
  19. package/dist/capabilities.d.ts +30 -0
  20. package/dist/capabilities.js +50 -0
  21. package/dist/channels.d.ts +142 -0
  22. package/dist/channels.js +97 -0
  23. package/dist/commands.d.ts +33 -0
  24. package/dist/commands.js +46 -0
  25. package/dist/computer-contracts.d.ts +73 -0
  26. package/dist/computer-contracts.js +57 -0
  27. package/dist/computer.d.ts +294 -0
  28. package/dist/computer.js +319 -0
  29. package/dist/connect.d.ts +11 -0
  30. package/dist/connect.js +211 -0
  31. package/dist/errors.d.ts +34 -0
  32. package/dist/errors.js +106 -0
  33. package/dist/failure.d.ts +2 -0
  34. package/dist/failure.js +9 -0
  35. package/dist/files.d.ts +25 -0
  36. package/dist/files.js +84 -0
  37. package/dist/game-servers.d.ts +530 -0
  38. package/dist/game-servers.js +244 -0
  39. package/dist/gills.d.ts +43 -0
  40. package/dist/gills.js +174 -0
  41. package/dist/git-commit.d.ts +143 -0
  42. package/dist/git-commit.js +251 -0
  43. package/dist/git-rpc.d.ts +310 -0
  44. package/dist/git-rpc.js +166 -0
  45. package/dist/git-steps.d.ts +579 -0
  46. package/dist/git-steps.js +804 -0
  47. package/dist/git-wire.d.ts +33 -0
  48. package/dist/git-wire.js +240 -0
  49. package/dist/git.d.ts +322 -0
  50. package/dist/git.js +98 -0
  51. package/dist/host.d.ts +97 -0
  52. package/dist/host.js +732 -0
  53. package/dist/inbox.d.ts +99 -0
  54. package/dist/inbox.js +184 -0
  55. package/dist/index.d.ts +31 -0
  56. package/dist/index.js +15 -0
  57. package/dist/inference.d.ts +17 -0
  58. package/dist/inference.js +115 -0
  59. package/dist/internal/app-error.d.ts +8 -0
  60. package/dist/internal/app-error.js +36 -0
  61. package/dist/internal/app-session.d.ts +8 -0
  62. package/dist/internal/app-session.js +551 -0
  63. package/dist/internal/back-inputs.d.ts +22 -0
  64. package/dist/internal/back-inputs.js +93 -0
  65. package/dist/internal/browser-bridge.d.ts +30 -0
  66. package/dist/internal/browser-bridge.js +203 -0
  67. package/dist/internal/capabilities.d.ts +13 -0
  68. package/dist/internal/capabilities.js +138 -0
  69. package/dist/internal/commands.d.ts +9 -0
  70. package/dist/internal/commands.js +257 -0
  71. package/dist/internal/disconnect-host.d.ts +7 -0
  72. package/dist/internal/disconnect-host.js +19 -0
  73. package/dist/internal/git-edit-tree.d.ts +6 -0
  74. package/dist/internal/git-edit-tree.js +46 -0
  75. package/dist/internal/memory-fs.d.ts +39 -0
  76. package/dist/internal/memory-fs.js +154 -0
  77. package/dist/internal/protocol.d.ts +116 -0
  78. package/dist/internal/protocol.js +6 -0
  79. package/dist/internal/query-feed.d.ts +23 -0
  80. package/dist/internal/query-feed.js +111 -0
  81. package/dist/internal/result.d.ts +22 -0
  82. package/dist/internal/result.js +61 -0
  83. package/dist/internal/rpc-contract.d.ts +24 -0
  84. package/dist/internal/rpc-contract.js +78 -0
  85. package/dist/internal/schemas.d.ts +307 -0
  86. package/dist/internal/schemas.js +524 -0
  87. package/dist/internal/store.d.ts +8 -0
  88. package/dist/internal/store.js +30 -0
  89. package/dist/internal/terminal-gate.d.ts +17 -0
  90. package/dist/internal/terminal-gate.js +94 -0
  91. package/dist/lifecycle.d.ts +44 -0
  92. package/dist/lifecycle.js +1 -0
  93. package/dist/marketplace.d.ts +159 -0
  94. package/dist/marketplace.js +102 -0
  95. package/dist/media-json.d.ts +181 -0
  96. package/dist/media-json.js +204 -0
  97. package/dist/media-library.d.ts +11 -0
  98. package/dist/media-library.js +15 -0
  99. package/dist/media-request-id.d.ts +7 -0
  100. package/dist/media-request-id.js +16 -0
  101. package/dist/media.d.ts +354 -0
  102. package/dist/media.js +654 -0
  103. package/dist/method-refusal.d.ts +64 -0
  104. package/dist/method-refusal.js +48 -0
  105. package/dist/pending.d.ts +10 -0
  106. package/dist/pending.js +10 -0
  107. package/dist/query.d.ts +76 -0
  108. package/dist/query.js +195 -0
  109. package/dist/react-mount.d.ts +23 -0
  110. package/dist/react-mount.js +108 -0
  111. package/dist/react.d.ts +41 -0
  112. package/dist/react.js +111 -0
  113. package/dist/read-copy.d.ts +103 -0
  114. package/dist/read-copy.js +195 -0
  115. package/dist/roles/files.d.ts +295 -0
  116. package/dist/roles/files.js +184 -0
  117. package/dist/root.d.ts +21 -0
  118. package/dist/root.js +1 -0
  119. package/dist/rpc.d.ts +1 -0
  120. package/dist/rpc.js +1 -0
  121. package/dist/status.d.ts +17 -0
  122. package/dist/status.js +50 -0
  123. package/dist/storage-wire.d.ts +167 -0
  124. package/dist/storage-wire.js +115 -0
  125. package/dist/storage.d.ts +72 -0
  126. package/dist/storage.js +143 -0
  127. package/dist/store.d.ts +11 -0
  128. package/dist/store.js +1 -0
  129. package/dist/test-kit/git.d.ts +31 -0
  130. package/dist/test-kit/git.js +174 -0
  131. package/dist/ui.d.ts +169 -0
  132. package/dist/ui.js +10 -0
  133. package/dist/window.d.ts +41 -0
  134. package/dist/window.js +15 -0
  135. package/dist/world.d.ts +16 -0
  136. package/dist/world.js +17 -0
  137. package/docs/api/README.md +28 -0
  138. package/docs/api/app-build-contract.md +113 -0
  139. package/docs/api/backend-declaration.md +62 -0
  140. package/docs/api/backend-definition.md +215 -0
  141. package/docs/api/backend.md +269 -0
  142. package/docs/api/errors.md +169 -0
  143. package/docs/api/files.md +91 -0
  144. package/docs/api/gills.md +164 -0
  145. package/docs/api/git-commit.md +279 -0
  146. package/docs/api/git-rpc.md +243 -0
  147. package/docs/api/git-steps.md +1010 -0
  148. package/docs/api/git-wire.md +197 -0
  149. package/docs/api/git.md +579 -0
  150. package/docs/api/index.md +2880 -0
  151. package/docs/api/media-json.md +507 -0
  152. package/docs/api/media-request-id.md +32 -0
  153. package/docs/api/modules.md +32 -0
  154. package/docs/api/query.md +253 -0
  155. package/docs/api/react.md +216 -0
  156. package/docs/api/read-copy.md +204 -0
  157. package/docs/api/rpc.md +128 -0
  158. package/docs/api/storage.md +620 -0
  159. package/package.json +197 -3
@@ -0,0 +1,530 @@
1
+ import * as z from "zod";
2
+ import type { CapabilityContract, CapabilityDirectory } from "./capabilities.js";
3
+ /** The games supported by the on-box controller's current catalog. */
4
+ export declare const gameIdSchema: z.ZodEnum<{
5
+ minecraft: "minecraft";
6
+ terraria: "terraria";
7
+ factorio: "factorio";
8
+ valheim: "valheim";
9
+ "project-zomboid": "project-zomboid";
10
+ }>;
11
+ export type GameId = z.output<typeof gameIdSchema>;
12
+ export declare const gameServerSizeTierSchema: z.ZodEnum<{
13
+ squad: "squad";
14
+ raid: "raid";
15
+ }>;
16
+ export type GameServerSizeTier = z.output<typeof gameServerSizeTierSchema>;
17
+ export declare const gameServerSizes: {
18
+ readonly minecraft: {
19
+ readonly squad: {
20
+ readonly memoryMiB: 2048;
21
+ readonly vcpuCount: 1;
22
+ };
23
+ readonly raid: {
24
+ readonly memoryMiB: 4096;
25
+ readonly vcpuCount: 2;
26
+ };
27
+ };
28
+ readonly terraria: {
29
+ readonly squad: {
30
+ readonly memoryMiB: 2048;
31
+ readonly vcpuCount: 1;
32
+ };
33
+ readonly raid: {
34
+ readonly memoryMiB: 4096;
35
+ readonly vcpuCount: 2;
36
+ };
37
+ };
38
+ readonly factorio: {
39
+ readonly squad: {
40
+ readonly memoryMiB: 3072;
41
+ readonly vcpuCount: 1;
42
+ };
43
+ readonly raid: {
44
+ readonly memoryMiB: 6144;
45
+ readonly vcpuCount: 2;
46
+ };
47
+ };
48
+ readonly valheim: {
49
+ readonly squad: {
50
+ readonly memoryMiB: 4096;
51
+ readonly vcpuCount: 2;
52
+ };
53
+ readonly raid: {
54
+ readonly memoryMiB: 6144;
55
+ readonly vcpuCount: 3;
56
+ };
57
+ };
58
+ readonly "project-zomboid": {
59
+ readonly squad: {
60
+ readonly memoryMiB: 8192;
61
+ readonly vcpuCount: 2;
62
+ };
63
+ readonly raid: {
64
+ readonly memoryMiB: 12288;
65
+ readonly vcpuCount: 3;
66
+ };
67
+ };
68
+ };
69
+ export declare const gameServerBillingModeSchema: z.ZodEnum<{
70
+ "insert-coin": "insert-coin";
71
+ hardcore: "hardcore";
72
+ }>;
73
+ export type GameServerBillingMode = z.output<typeof gameServerBillingModeSchema>;
74
+ export declare const gameServerPassIdSchema: z.ZodEnum<{
75
+ "booster-pack": "booster-pack";
76
+ "battle-pass": "battle-pass";
77
+ }>;
78
+ export type GameServerPassId = z.output<typeof gameServerPassIdSchema>;
79
+ export declare const gameServerSizeSchema: z.ZodObject<{
80
+ tier: z.ZodEnum<{
81
+ squad: "squad";
82
+ raid: "raid";
83
+ }>;
84
+ memoryMiB: z.ZodNumber;
85
+ vcpuCount: z.ZodNumber;
86
+ }, z.core.$strict>;
87
+ export type GameServerSize = z.output<typeof gameServerSizeSchema>;
88
+ export declare const gameServerBackupSchema: z.ZodObject<{
89
+ backupId: z.ZodString;
90
+ createdAt: z.ZodNumber;
91
+ sizeBytes: z.ZodNumber;
92
+ }, z.core.$strict>;
93
+ export type GameServerBackup = z.output<typeof gameServerBackupSchema>;
94
+ export declare const gameServerCatalogSchema: z.ZodObject<{
95
+ games: z.ZodArray<z.ZodObject<{
96
+ game: z.ZodEnum<{
97
+ minecraft: "minecraft";
98
+ terraria: "terraria";
99
+ factorio: "factorio";
100
+ valheim: "valheim";
101
+ "project-zomboid": "project-zomboid";
102
+ }>;
103
+ variants: z.ZodArray<z.ZodString>;
104
+ sizes: z.ZodObject<{
105
+ squad: z.ZodObject<{
106
+ size: z.ZodObject<{
107
+ tier: z.ZodEnum<{
108
+ squad: "squad";
109
+ raid: "raid";
110
+ }>;
111
+ memoryMiB: z.ZodNumber;
112
+ vcpuCount: z.ZodNumber;
113
+ }, z.core.$strict>;
114
+ hourlyPriceUsd: z.ZodNullable<z.ZodNumber>;
115
+ monthlyCapUsd: z.ZodNullable<z.ZodNumber>;
116
+ hardcoreMonthlyPriceUsd: z.ZodNullable<z.ZodNumber>;
117
+ }, z.core.$strict>;
118
+ raid: z.ZodObject<{
119
+ size: z.ZodObject<{
120
+ tier: z.ZodEnum<{
121
+ squad: "squad";
122
+ raid: "raid";
123
+ }>;
124
+ memoryMiB: z.ZodNumber;
125
+ vcpuCount: z.ZodNumber;
126
+ }, z.core.$strict>;
127
+ hourlyPriceUsd: z.ZodNullable<z.ZodNumber>;
128
+ monthlyCapUsd: z.ZodNullable<z.ZodNumber>;
129
+ hardcoreMonthlyPriceUsd: z.ZodNullable<z.ZodNumber>;
130
+ }, z.core.$strict>;
131
+ }, z.core.$strict>;
132
+ }, z.core.$strict>>;
133
+ pricing: z.ZodNullable<z.ZodObject<{
134
+ labels: z.ZodObject<{
135
+ modes: z.ZodObject<{
136
+ insertCoin: z.ZodString;
137
+ hardcore: z.ZodString;
138
+ }, z.core.$strict>;
139
+ sizes: z.ZodObject<{
140
+ squad: z.ZodString;
141
+ raid: z.ZodString;
142
+ }, z.core.$strict>;
143
+ passes: z.ZodObject<{
144
+ "booster-pack": z.ZodString;
145
+ "battle-pass": z.ZodString;
146
+ }, z.core.$strict>;
147
+ }, z.core.$strict>;
148
+ passes: z.ZodArray<z.ZodObject<{
149
+ id: z.ZodEnum<{
150
+ "booster-pack": "booster-pack";
151
+ "battle-pass": "battle-pass";
152
+ }>;
153
+ displayName: z.ZodString;
154
+ monthlyPriceUsd: z.ZodNumber;
155
+ playerHours: z.ZodNumber;
156
+ serverLimit: z.ZodNumber;
157
+ eligibleGames: z.ZodArray<z.ZodEnum<{
158
+ minecraft: "minecraft";
159
+ terraria: "terraria";
160
+ factorio: "factorio";
161
+ valheim: "valheim";
162
+ "project-zomboid": "project-zomboid";
163
+ }>>;
164
+ includesRaid: z.ZodBoolean;
165
+ includedWithPro: z.ZodBoolean;
166
+ }, z.core.$strict>>;
167
+ alwaysOnMemoryCapMiB: z.ZodNumber;
168
+ }, z.core.$strict>>;
169
+ creditRemainingUsd: z.ZodNumber;
170
+ }, z.core.$strict>;
171
+ export type GameServerCatalog = z.output<typeof gameServerCatalogSchema>;
172
+ export declare const gameServerStateSchema: z.ZodObject<{
173
+ serverId: z.ZodString;
174
+ teamId: z.ZodString;
175
+ name: z.ZodString;
176
+ game: z.ZodEnum<{
177
+ minecraft: "minecraft";
178
+ terraria: "terraria";
179
+ factorio: "factorio";
180
+ valheim: "valheim";
181
+ "project-zomboid": "project-zomboid";
182
+ }>;
183
+ variant: z.ZodString;
184
+ size: z.ZodObject<{
185
+ tier: z.ZodEnum<{
186
+ squad: "squad";
187
+ raid: "raid";
188
+ }>;
189
+ memoryMiB: z.ZodNumber;
190
+ vcpuCount: z.ZodNumber;
191
+ }, z.core.$strict>;
192
+ billingMode: z.ZodEnum<{
193
+ "insert-coin": "insert-coin";
194
+ hardcore: "hardcore";
195
+ }>;
196
+ passId: z.ZodNullable<z.ZodEnum<{
197
+ "booster-pack": "booster-pack";
198
+ "battle-pass": "battle-pass";
199
+ }>>;
200
+ tunnelStatus: z.ZodEnum<{
201
+ configured: "configured";
202
+ not_configured: "not_configured";
203
+ }>;
204
+ desiredState: z.ZodEnum<{
205
+ running: "running";
206
+ stopped: "stopped";
207
+ }>;
208
+ phase: z.ZodEnum<{
209
+ failed: "failed";
210
+ sleeping: "sleeping";
211
+ starting: "starting";
212
+ stopped: "stopped";
213
+ awake: "awake";
214
+ }>;
215
+ players: z.ZodNumber;
216
+ maxPlayers: z.ZodNullable<z.ZodNumber>;
217
+ connections: z.ZodArray<z.ZodObject<{
218
+ purpose: z.ZodString;
219
+ protocol: z.ZodEnum<{
220
+ tcp: "tcp";
221
+ udp: "udp";
222
+ }>;
223
+ host: z.ZodString;
224
+ port: z.ZodNumber;
225
+ }, z.core.$strict>>;
226
+ version: z.ZodNumber;
227
+ createdAt: z.ZodNumber;
228
+ updatedAt: z.ZodNumber;
229
+ }, z.core.$strict>;
230
+ export type GameServerState = z.output<typeof gameServerStateSchema>;
231
+ export declare const gameServerSchema: z.ZodObject<{
232
+ serverId: z.ZodString;
233
+ teamId: z.ZodString;
234
+ name: z.ZodString;
235
+ game: z.ZodEnum<{
236
+ minecraft: "minecraft";
237
+ terraria: "terraria";
238
+ factorio: "factorio";
239
+ valheim: "valheim";
240
+ "project-zomboid": "project-zomboid";
241
+ }>;
242
+ variant: z.ZodString;
243
+ size: z.ZodObject<{
244
+ tier: z.ZodEnum<{
245
+ squad: "squad";
246
+ raid: "raid";
247
+ }>;
248
+ memoryMiB: z.ZodNumber;
249
+ vcpuCount: z.ZodNumber;
250
+ }, z.core.$strict>;
251
+ billingMode: z.ZodEnum<{
252
+ "insert-coin": "insert-coin";
253
+ hardcore: "hardcore";
254
+ }>;
255
+ passId: z.ZodNullable<z.ZodEnum<{
256
+ "booster-pack": "booster-pack";
257
+ "battle-pass": "battle-pass";
258
+ }>>;
259
+ tunnelStatus: z.ZodEnum<{
260
+ configured: "configured";
261
+ not_configured: "not_configured";
262
+ }>;
263
+ desiredState: z.ZodEnum<{
264
+ running: "running";
265
+ stopped: "stopped";
266
+ }>;
267
+ phase: z.ZodEnum<{
268
+ failed: "failed";
269
+ sleeping: "sleeping";
270
+ starting: "starting";
271
+ stopped: "stopped";
272
+ awake: "awake";
273
+ }>;
274
+ players: z.ZodNumber;
275
+ maxPlayers: z.ZodNullable<z.ZodNumber>;
276
+ connections: z.ZodArray<z.ZodObject<{
277
+ purpose: z.ZodString;
278
+ protocol: z.ZodEnum<{
279
+ tcp: "tcp";
280
+ udp: "udp";
281
+ }>;
282
+ host: z.ZodString;
283
+ port: z.ZodNumber;
284
+ }, z.core.$strict>>;
285
+ version: z.ZodNumber;
286
+ createdAt: z.ZodNumber;
287
+ updatedAt: z.ZodNumber;
288
+ monthToDateCostUsd: z.ZodNumber;
289
+ teamMonthToDateCostUsd: z.ZodNumber;
290
+ }, z.core.$strict>;
291
+ export type GameServer = z.output<typeof gameServerSchema>;
292
+ /** Passwords are write-only and never appear in GameServer or catalog responses. */
293
+ export type GameServerCreate = Readonly<{
294
+ name: string;
295
+ variant: string;
296
+ requestId: string;
297
+ sizeTier: GameServerSizeTier;
298
+ billingMode: z.output<typeof gameServerBillingModeSchema>;
299
+ passId: z.output<typeof gameServerPassIdSchema> | null;
300
+ }> & ({
301
+ game: "minecraft";
302
+ settings: {
303
+ eulaAcceptedByOperator: true;
304
+ onlineMode?: boolean;
305
+ };
306
+ } | {
307
+ game: "terraria" | "factorio";
308
+ settings: Record<string, never>;
309
+ } | {
310
+ game: "valheim";
311
+ settings: {
312
+ password: string;
313
+ };
314
+ } | {
315
+ game: "project-zomboid";
316
+ settings: {
317
+ adminPassword: string;
318
+ };
319
+ });
320
+ export type GameServerAction = Readonly<{
321
+ serverId: string;
322
+ requestId: string;
323
+ }>;
324
+ export declare const gameServerPageSchema: z.ZodObject<{
325
+ servers: z.ZodArray<z.ZodObject<{
326
+ serverId: z.ZodString;
327
+ teamId: z.ZodString;
328
+ name: z.ZodString;
329
+ game: z.ZodEnum<{
330
+ minecraft: "minecraft";
331
+ terraria: "terraria";
332
+ factorio: "factorio";
333
+ valheim: "valheim";
334
+ "project-zomboid": "project-zomboid";
335
+ }>;
336
+ variant: z.ZodString;
337
+ size: z.ZodObject<{
338
+ tier: z.ZodEnum<{
339
+ squad: "squad";
340
+ raid: "raid";
341
+ }>;
342
+ memoryMiB: z.ZodNumber;
343
+ vcpuCount: z.ZodNumber;
344
+ }, z.core.$strict>;
345
+ billingMode: z.ZodEnum<{
346
+ "insert-coin": "insert-coin";
347
+ hardcore: "hardcore";
348
+ }>;
349
+ passId: z.ZodNullable<z.ZodEnum<{
350
+ "booster-pack": "booster-pack";
351
+ "battle-pass": "battle-pass";
352
+ }>>;
353
+ tunnelStatus: z.ZodEnum<{
354
+ configured: "configured";
355
+ not_configured: "not_configured";
356
+ }>;
357
+ desiredState: z.ZodEnum<{
358
+ running: "running";
359
+ stopped: "stopped";
360
+ }>;
361
+ phase: z.ZodEnum<{
362
+ failed: "failed";
363
+ sleeping: "sleeping";
364
+ starting: "starting";
365
+ stopped: "stopped";
366
+ awake: "awake";
367
+ }>;
368
+ players: z.ZodNumber;
369
+ maxPlayers: z.ZodNullable<z.ZodNumber>;
370
+ connections: z.ZodArray<z.ZodObject<{
371
+ purpose: z.ZodString;
372
+ protocol: z.ZodEnum<{
373
+ tcp: "tcp";
374
+ udp: "udp";
375
+ }>;
376
+ host: z.ZodString;
377
+ port: z.ZodNumber;
378
+ }, z.core.$strict>>;
379
+ version: z.ZodNumber;
380
+ createdAt: z.ZodNumber;
381
+ updatedAt: z.ZodNumber;
382
+ monthToDateCostUsd: z.ZodNumber;
383
+ teamMonthToDateCostUsd: z.ZodNumber;
384
+ }, z.core.$strict>>;
385
+ nextOffset: z.ZodNullable<z.ZodNumber>;
386
+ teamMonthToDateCostUsd: z.ZodNumber;
387
+ }, z.core.$strict>;
388
+ export type GameServerPage = z.output<typeof gameServerPageSchema>;
389
+ export declare const gameServerErrorCodeSchema: z.ZodEnum<{
390
+ unavailable: "unavailable";
391
+ denied: "denied";
392
+ conflict: "conflict";
393
+ not_found: "not_found";
394
+ credit_exhausted: "credit_exhausted";
395
+ pricing_not_configured: "pricing_not_configured";
396
+ pass_not_included: "pass_not_included";
397
+ pass_not_active: "pass_not_active";
398
+ pass_game_not_eligible: "pass_game_not_eligible";
399
+ pass_size_not_eligible: "pass_size_not_eligible";
400
+ pass_server_limit: "pass_server_limit";
401
+ pass_mode_incompatible: "pass_mode_incompatible";
402
+ always_on_capacity: "always_on_capacity";
403
+ capacity: "capacity";
404
+ tunnel_unavailable: "tunnel_unavailable";
405
+ unsupported_variant: "unsupported_variant";
406
+ }>;
407
+ export type GameServerErrorCode = z.output<typeof gameServerErrorCodeSchema>;
408
+ /** Versioned command delivered from the Team projection outbox to the box. */
409
+ export declare const gameServerHostCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
410
+ kind: z.ZodLiteral<"create">;
411
+ schemaVersion: z.ZodLiteral<1>;
412
+ teamId: z.ZodString;
413
+ serverId: z.ZodString;
414
+ version: z.ZodNumber;
415
+ game: z.ZodEnum<{
416
+ minecraft: "minecraft";
417
+ terraria: "terraria";
418
+ factorio: "factorio";
419
+ valheim: "valheim";
420
+ "project-zomboid": "project-zomboid";
421
+ }>;
422
+ variant: z.ZodString;
423
+ sizeTier: z.ZodEnum<{
424
+ squad: "squad";
425
+ raid: "raid";
426
+ }>;
427
+ billingMode: z.ZodEnum<{
428
+ "insert-coin": "insert-coin";
429
+ hardcore: "hardcore";
430
+ }>;
431
+ passId: z.ZodNullable<z.ZodEnum<{
432
+ "booster-pack": "booster-pack";
433
+ "battle-pass": "battle-pass";
434
+ }>>;
435
+ settings: z.ZodUnion<readonly [z.ZodObject<{
436
+ eulaAcceptedByOperator: z.ZodLiteral<true>;
437
+ onlineMode: z.ZodOptional<z.ZodBoolean>;
438
+ }, z.core.$strict>, z.ZodObject<{
439
+ password: z.ZodString;
440
+ }, z.core.$strict>, z.ZodObject<{
441
+ adminPassword: z.ZodString;
442
+ }, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>;
443
+ }, z.core.$strict>, ...z.ZodObject<{
444
+ kind: z.ZodLiteral<"start" | "stop" | "delete" | "backup-now">;
445
+ schemaVersion: z.ZodLiteral<1>;
446
+ teamId: z.ZodString;
447
+ serverId: z.ZodString;
448
+ version: z.ZodNumber;
449
+ }, z.core.$strict>[], z.ZodObject<{
450
+ kind: z.ZodLiteral<"restore">;
451
+ schemaVersion: z.ZodLiteral<1>;
452
+ teamId: z.ZodString;
453
+ serverId: z.ZodString;
454
+ version: z.ZodNumber;
455
+ backupId: z.ZodString;
456
+ }, z.core.$strict>], "kind">;
457
+ export type GameServerHostCommand = z.output<typeof gameServerHostCommandSchema>;
458
+ /** Signed host observation; sequence and version reject stale or replayed reports. */
459
+ export declare const gameServerHostReportSchema: z.ZodObject<{
460
+ schemaVersion: z.ZodLiteral<1>;
461
+ hostId: z.ZodString;
462
+ teamId: z.ZodString;
463
+ serverId: z.ZodString;
464
+ version: z.ZodNumber;
465
+ sequence: z.ZodNumber;
466
+ observedAt: z.ZodNumber;
467
+ phase: z.ZodEnum<{
468
+ failed: "failed";
469
+ sleeping: "sleeping";
470
+ starting: "starting";
471
+ stopped: "stopped";
472
+ awake: "awake";
473
+ }>;
474
+ players: z.ZodNumber;
475
+ maxPlayers: z.ZodNullable<z.ZodNumber>;
476
+ connections: z.ZodArray<z.ZodObject<{
477
+ purpose: z.ZodString;
478
+ protocol: z.ZodEnum<{
479
+ tcp: "tcp";
480
+ udp: "udp";
481
+ }>;
482
+ host: z.ZodString;
483
+ port: z.ZodNumber;
484
+ }, z.core.$strict>>;
485
+ tunnelStatus: z.ZodEnum<{
486
+ configured: "configured";
487
+ not_configured: "not_configured";
488
+ }>;
489
+ backups: z.ZodArray<z.ZodObject<{
490
+ backupId: z.ZodString;
491
+ createdAt: z.ZodNumber;
492
+ sizeBytes: z.ZodNumber;
493
+ }, z.core.$strict>>;
494
+ runtime: z.ZodNullable<z.ZodObject<{
495
+ runtimeId: z.ZodString;
496
+ startedAt: z.ZodNumber;
497
+ ended: z.ZodBoolean;
498
+ }, z.core.$strict>>;
499
+ }, z.core.$strict>;
500
+ export type GameServerHostReport = z.output<typeof gameServerHostReportSchema>;
501
+ /** A public or App game-server request refused by the Team decision. */
502
+ export declare class GameServerRequestError extends Error {
503
+ readonly code: GameServerErrorCode;
504
+ readonly status: number;
505
+ constructor(code: GameServerErrorCode, status: number);
506
+ }
507
+ /** Ordinary App capability, granted by the Team to any declared App. */
508
+ export type GameServersHandle = {
509
+ list(input?: {
510
+ limit?: number;
511
+ offset?: number;
512
+ }): Promise<GameServerPage>;
513
+ catalog(): Promise<GameServerCatalog>;
514
+ create(input: GameServerCreate): Promise<GameServer>;
515
+ status(serverId: string): Promise<GameServer>;
516
+ start(input: GameServerAction): Promise<GameServer>;
517
+ stop(input: GameServerAction): Promise<GameServer>;
518
+ delete(input: GameServerAction): Promise<void>;
519
+ backups(serverId: string): Promise<readonly GameServerBackup[]>;
520
+ backupNow(input: GameServerAction): Promise<void>;
521
+ restore(input: GameServerAction & {
522
+ backupId: string;
523
+ }): Promise<GameServer>;
524
+ };
525
+ export declare const gamesServers: CapabilityContract<GameServersHandle>;
526
+ /** Decode the host's listing at the App boundary. */
527
+ export declare function listGameServers(capabilities: CapabilityDirectory, input?: {
528
+ limit?: number;
529
+ offset?: number;
530
+ }): Promise<GameServerPage>;