@openclaw/gateway-protocol 2026.11.3 → 2026.11.5-beta.2

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 (36) hide show
  1. package/CHANGELOG.md +17 -10
  2. package/README.md +10 -2
  3. package/dist/.source-module-urls/5712ecf2b505e1ffe07307c66aedeadc7e26051742412d27b27f0c2a96ba2443.json +1 -0
  4. package/dist/catalog-CjRscarz.mjs +23370 -0
  5. package/dist/client-info.d.mts +10 -0
  6. package/dist/client-info.mjs +14 -8
  7. package/dist/connect-error-details.d.mts +2 -1
  8. package/dist/connect-error-details.mjs +5 -7
  9. package/dist/frame-guards.d.mts +2 -1
  10. package/dist/frame-guards.mjs +4 -6
  11. package/dist/{frames-CP0Lw0m-.d.mts → frames-clYGKOGE.d.mts} +18 -61
  12. package/dist/gateway-error-details-1bwo8ogl.d.mts +236 -0
  13. package/dist/gateway-error-details.d.mts +2 -2
  14. package/dist/gateway-error-details.mjs +7 -5
  15. package/dist/index.d.mts +7333 -6554
  16. package/dist/index.mjs +715 -545
  17. package/dist/number-coercion-C3Y6DVez.mjs +9 -0
  18. package/dist/{schema-modules-BIMQGSeA.d.mts → schema-modules-mv6kLPga.d.mts} +3571 -762
  19. package/dist/schema.d.mts +7 -5
  20. package/dist/schema.mjs +105 -59
  21. package/dist/server-capabilities-CYIhEfgo.d.mts +55 -0
  22. package/dist/{server-capabilities-DRQ3mUjT.mjs → server-capabilities-DA3Gf1Rp.mjs} +3 -0
  23. package/dist/session-row-deltas.d.mts +21 -0
  24. package/dist/session-row-deltas.mjs +8 -0
  25. package/dist/startup-unavailable.d.mts +4 -1
  26. package/dist/startup-unavailable.mjs +3 -1
  27. package/dist/system-agent-context.d.mts +2 -1
  28. package/dist/{theme-BshtYPJX.mjs → theme-DRGRYAgn.mjs} +1 -1
  29. package/dist/theme.d.mts +1 -1
  30. package/dist/theme.mjs +1 -2
  31. package/dist/themes-GZs9U79C.d.mts +293 -0
  32. package/package.json +7 -2
  33. package/protocol.schema.json +36150 -26351
  34. package/dist/catalog-SevQOEU4.mjs +0 -16823
  35. package/dist/gateway-error-details-BqRYhh5h.d.mts +0 -1489
  36. package/dist/theme-dtBTRSNj.d.mts +0 -109
@@ -1,1489 +0,0 @@
1
- import { Static, Type } from "typebox";
2
- //#region packages/gateway-protocol/src/schema/session-placement.d.ts
3
- /** Durable gateway ownership states for one session execution placement.
4
- * The literal list stays explicit because Type.Union needs a tuple for
5
- * Static inference (a mapped array collapses Static to never); the guard
6
- * below keeps it in lockstep with SESSION_PLACEMENT_STATES. */
7
- declare const SessionPlacementStateSchema: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"requested">, Type.TLiteral<"provisioning">, Type.TLiteral<"syncing">, Type.TLiteral<"starting">, Type.TLiteral<"active">, Type.TLiteral<"draining">, Type.TLiteral<"reconciling">, Type.TLiteral<"reclaimed">, Type.TLiteral<"failed">]>;
8
- declare const SessionPlacementDiskSpaceSchema: Type.TObject<{
9
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
10
- availableBytes: Type.TInteger;
11
- totalBytes: Type.TInteger;
12
- observedAtMs: Type.TInteger;
13
- }>;
14
- declare const SessionPlacementWorkerRuntimeInstallSchema: Type.TObject<{
15
- phase: Type.TUnion<[Type.TLiteral<"transferring">, Type.TLiteral<"installing">]>;
16
- transferredBytes: Type.TInteger;
17
- totalBytes: Type.TInteger;
18
- startedAtMs: Type.TInteger;
19
- updatedAtMs: Type.TInteger;
20
- }>;
21
- declare const SessionPlacementRunnerSchema: Type.TObject<{
22
- kind: Type.TLiteral<"device">;
23
- status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
24
- deviceId: Type.TOptional<Type.TString>;
25
- }>;
26
- declare const SessionPlacementMachineSchema: Type.TObject<{
27
- class: Type.TOptional<Type.TString>;
28
- os: Type.TOptional<Type.TString>;
29
- osLabel: Type.TOptional<Type.TString>;
30
- cpu: Type.TOptional<Type.TInteger>;
31
- memoryGb: Type.TOptional<Type.TInteger>;
32
- }>;
33
- /** Gateway-visible placement projection; `state` remains the closed discriminator. */
34
- declare const SessionPlacementSchema: Type.TUnion<[Type.TObject<{
35
- generation: Type.TInteger;
36
- createdAtMs: Type.TInteger;
37
- updatedAtMs: Type.TInteger;
38
- stateChangedAtMs: Type.TInteger;
39
- state: Type.TLiteral<"local">;
40
- }>, Type.TObject<{
41
- generation: Type.TInteger;
42
- createdAtMs: Type.TInteger;
43
- updatedAtMs: Type.TInteger;
44
- stateChangedAtMs: Type.TInteger;
45
- state: Type.TLiteral<"requested">;
46
- }>, Type.TObject<{
47
- generation: Type.TInteger;
48
- createdAtMs: Type.TInteger;
49
- updatedAtMs: Type.TInteger;
50
- stateChangedAtMs: Type.TInteger;
51
- providerId: Type.TOptional<Type.TString>;
52
- profileId: Type.TOptional<Type.TString>;
53
- machine: Type.TOptional<Type.TObject<{
54
- class: Type.TOptional<Type.TString>;
55
- os: Type.TOptional<Type.TString>;
56
- osLabel: Type.TOptional<Type.TString>;
57
- cpu: Type.TOptional<Type.TInteger>;
58
- memoryGb: Type.TOptional<Type.TInteger>;
59
- }>>;
60
- state: Type.TLiteral<"provisioning">;
61
- environmentId: Type.TOptional<Type.TString>;
62
- workerRuntimeInstall: Type.TOptional<Type.TObject<{
63
- phase: Type.TUnion<[Type.TLiteral<"transferring">, Type.TLiteral<"installing">]>;
64
- transferredBytes: Type.TInteger;
65
- totalBytes: Type.TInteger;
66
- startedAtMs: Type.TInteger;
67
- updatedAtMs: Type.TInteger;
68
- }>>;
69
- startStatus: Type.TOptional<Type.TUnion<[Type.TObject<{
70
- mode: Type.TLiteral<"snapshot">;
71
- phase: Type.TOptional<Type.TLiteral<"saving">>;
72
- }>, Type.TObject<{
73
- mode: Type.TLiteral<"cold">;
74
- reason: Type.TUnion<[Type.TLiteral<"no-snapshot-yet">, Type.TLiteral<"setup-changed">, Type.TLiteral<"snapshot-retiring">, Type.TLiteral<"snapshot-unavailable">, Type.TLiteral<"os-unsupported">, Type.TLiteral<"warm-images-off">, Type.TLiteral<"capture-paused">, Type.TLiteral<"backend-cannot-snapshot">, Type.TLiteral<"class-unknown">]>;
75
- phase: Type.TUnion<[Type.TLiteral<"provisioning">, Type.TLiteral<"preparing">, Type.TLiteral<"saving">]>;
76
- }>]>>;
77
- }>, Type.TObject<{
78
- generation: Type.TInteger;
79
- createdAtMs: Type.TInteger;
80
- updatedAtMs: Type.TInteger;
81
- stateChangedAtMs: Type.TInteger;
82
- providerId: Type.TOptional<Type.TString>;
83
- profileId: Type.TOptional<Type.TString>;
84
- machine: Type.TOptional<Type.TObject<{
85
- class: Type.TOptional<Type.TString>;
86
- os: Type.TOptional<Type.TString>;
87
- osLabel: Type.TOptional<Type.TString>;
88
- cpu: Type.TOptional<Type.TInteger>;
89
- memoryGb: Type.TOptional<Type.TInteger>;
90
- }>>;
91
- state: Type.TLiteral<"syncing">;
92
- environmentId: Type.TString;
93
- workerBundleHash: Type.TString;
94
- }>, Type.TObject<{
95
- generation: Type.TInteger;
96
- createdAtMs: Type.TInteger;
97
- updatedAtMs: Type.TInteger;
98
- stateChangedAtMs: Type.TInteger;
99
- workspaceBaseManifestRef: Type.TString;
100
- remoteWorkspaceDir: Type.TString;
101
- providerId: Type.TOptional<Type.TString>;
102
- profileId: Type.TOptional<Type.TString>;
103
- machine: Type.TOptional<Type.TObject<{
104
- class: Type.TOptional<Type.TString>;
105
- os: Type.TOptional<Type.TString>;
106
- osLabel: Type.TOptional<Type.TString>;
107
- cpu: Type.TOptional<Type.TInteger>;
108
- memoryGb: Type.TOptional<Type.TInteger>;
109
- }>>;
110
- state: Type.TLiteral<"starting">;
111
- environmentId: Type.TString;
112
- workerBundleHash: Type.TString;
113
- }>, Type.TObject<{
114
- generation: Type.TInteger;
115
- createdAtMs: Type.TInteger;
116
- updatedAtMs: Type.TInteger;
117
- stateChangedAtMs: Type.TInteger;
118
- workspaceBaseManifestRef: Type.TString;
119
- remoteWorkspaceDir: Type.TString;
120
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
121
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
122
- diskSpace: Type.TOptional<Type.TObject<{
123
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
124
- availableBytes: Type.TInteger;
125
- totalBytes: Type.TInteger;
126
- observedAtMs: Type.TInteger;
127
- }>>;
128
- providerId: Type.TOptional<Type.TString>;
129
- profileId: Type.TOptional<Type.TString>;
130
- machine: Type.TOptional<Type.TObject<{
131
- class: Type.TOptional<Type.TString>;
132
- os: Type.TOptional<Type.TString>;
133
- osLabel: Type.TOptional<Type.TString>;
134
- cpu: Type.TOptional<Type.TInteger>;
135
- memoryGb: Type.TOptional<Type.TInteger>;
136
- }>>;
137
- workspaceResultConflict: Type.TOptional<Type.TObject<{
138
- paths: Type.TArray<Type.TString>;
139
- stagedResultRef: Type.TString;
140
- totalCount: Type.TOptional<Type.TInteger>;
141
- }>>;
142
- workspaceResultReconciling: Type.TOptional<Type.TLiteral<true>>;
143
- state: Type.TLiteral<"active">;
144
- environmentId: Type.TString;
145
- activeOwnerEpoch: Type.TInteger;
146
- workerBundleHash: Type.TString;
147
- inference: Type.TOptional<Type.TLiteral<"worker">>;
148
- runner: Type.TOptional<Type.TObject<{
149
- kind: Type.TLiteral<"device">;
150
- status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
151
- deviceId: Type.TOptional<Type.TString>;
152
- }>>;
153
- workerRuntimeInstall: Type.TOptional<Type.TObject<{
154
- phase: Type.TUnion<[Type.TLiteral<"transferring">, Type.TLiteral<"installing">]>;
155
- transferredBytes: Type.TInteger;
156
- totalBytes: Type.TInteger;
157
- startedAtMs: Type.TInteger;
158
- updatedAtMs: Type.TInteger;
159
- }>>;
160
- }>, Type.TObject<{
161
- generation: Type.TInteger;
162
- createdAtMs: Type.TInteger;
163
- updatedAtMs: Type.TInteger;
164
- stateChangedAtMs: Type.TInteger;
165
- workspaceBaseManifestRef: Type.TString;
166
- remoteWorkspaceDir: Type.TString;
167
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
168
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
169
- diskSpace: Type.TOptional<Type.TObject<{
170
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
171
- availableBytes: Type.TInteger;
172
- totalBytes: Type.TInteger;
173
- observedAtMs: Type.TInteger;
174
- }>>;
175
- providerId: Type.TOptional<Type.TString>;
176
- profileId: Type.TOptional<Type.TString>;
177
- machine: Type.TOptional<Type.TObject<{
178
- class: Type.TOptional<Type.TString>;
179
- os: Type.TOptional<Type.TString>;
180
- osLabel: Type.TOptional<Type.TString>;
181
- cpu: Type.TOptional<Type.TInteger>;
182
- memoryGb: Type.TOptional<Type.TInteger>;
183
- }>>;
184
- workspaceResultConflict: Type.TOptional<Type.TObject<{
185
- paths: Type.TArray<Type.TString>;
186
- stagedResultRef: Type.TString;
187
- totalCount: Type.TOptional<Type.TInteger>;
188
- }>>;
189
- workspaceResultReconciling: Type.TOptional<Type.TLiteral<true>>;
190
- state: Type.TLiteral<"draining">;
191
- environmentId: Type.TString;
192
- activeOwnerEpoch: Type.TInteger;
193
- workerBundleHash: Type.TString;
194
- }>, Type.TObject<{
195
- generation: Type.TInteger;
196
- createdAtMs: Type.TInteger;
197
- updatedAtMs: Type.TInteger;
198
- stateChangedAtMs: Type.TInteger;
199
- workspaceBaseManifestRef: Type.TString;
200
- remoteWorkspaceDir: Type.TString;
201
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
202
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
203
- diskSpace: Type.TOptional<Type.TObject<{
204
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
205
- availableBytes: Type.TInteger;
206
- totalBytes: Type.TInteger;
207
- observedAtMs: Type.TInteger;
208
- }>>;
209
- providerId: Type.TOptional<Type.TString>;
210
- profileId: Type.TOptional<Type.TString>;
211
- machine: Type.TOptional<Type.TObject<{
212
- class: Type.TOptional<Type.TString>;
213
- os: Type.TOptional<Type.TString>;
214
- osLabel: Type.TOptional<Type.TString>;
215
- cpu: Type.TOptional<Type.TInteger>;
216
- memoryGb: Type.TOptional<Type.TInteger>;
217
- }>>;
218
- workspaceResultConflict: Type.TOptional<Type.TObject<{
219
- paths: Type.TArray<Type.TString>;
220
- stagedResultRef: Type.TString;
221
- totalCount: Type.TOptional<Type.TInteger>;
222
- }>>;
223
- state: Type.TLiteral<"reconciling">;
224
- environmentId: Type.TString;
225
- activeOwnerEpoch: Type.TInteger;
226
- workerBundleHash: Type.TString;
227
- }>, Type.TObject<{
228
- generation: Type.TInteger;
229
- createdAtMs: Type.TInteger;
230
- updatedAtMs: Type.TInteger;
231
- stateChangedAtMs: Type.TInteger;
232
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
233
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
234
- providerId: Type.TOptional<Type.TString>;
235
- profileId: Type.TOptional<Type.TString>;
236
- machine: Type.TOptional<Type.TObject<{
237
- class: Type.TOptional<Type.TString>;
238
- os: Type.TOptional<Type.TString>;
239
- osLabel: Type.TOptional<Type.TString>;
240
- cpu: Type.TOptional<Type.TInteger>;
241
- memoryGb: Type.TOptional<Type.TInteger>;
242
- }>>;
243
- workspaceResultConflict: Type.TOptional<Type.TObject<{
244
- paths: Type.TArray<Type.TString>;
245
- stagedResultRef: Type.TString;
246
- totalCount: Type.TOptional<Type.TInteger>;
247
- }>>;
248
- environmentId: Type.TOptional<Type.TString>;
249
- activeOwnerEpoch: Type.TOptional<Type.TInteger>;
250
- workspaceBaseManifestRef: Type.TOptional<Type.TString>;
251
- remoteWorkspaceDir: Type.TOptional<Type.TString>;
252
- workerBundleHash: Type.TOptional<Type.TString>;
253
- terminalReason: Type.TOptional<Type.TString>;
254
- terminalAtMs: Type.TOptional<Type.TInteger>;
255
- state: Type.TLiteral<"reclaimed">;
256
- }>, Type.TObject<{
257
- generation: Type.TInteger;
258
- createdAtMs: Type.TInteger;
259
- updatedAtMs: Type.TInteger;
260
- stateChangedAtMs: Type.TInteger;
261
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
262
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
263
- providerId: Type.TOptional<Type.TString>;
264
- profileId: Type.TOptional<Type.TString>;
265
- machine: Type.TOptional<Type.TObject<{
266
- class: Type.TOptional<Type.TString>;
267
- os: Type.TOptional<Type.TString>;
268
- osLabel: Type.TOptional<Type.TString>;
269
- cpu: Type.TOptional<Type.TInteger>;
270
- memoryGb: Type.TOptional<Type.TInteger>;
271
- }>>;
272
- workspaceResultConflict: Type.TOptional<Type.TObject<{
273
- paths: Type.TArray<Type.TString>;
274
- stagedResultRef: Type.TString;
275
- totalCount: Type.TOptional<Type.TInteger>;
276
- }>>;
277
- environmentId: Type.TOptional<Type.TString>;
278
- activeOwnerEpoch: Type.TOptional<Type.TInteger>;
279
- workspaceBaseManifestRef: Type.TOptional<Type.TString>;
280
- remoteWorkspaceDir: Type.TOptional<Type.TString>;
281
- workerBundleHash: Type.TOptional<Type.TString>;
282
- terminalReason: Type.TOptional<Type.TString>;
283
- terminalAtMs: Type.TOptional<Type.TInteger>;
284
- state: Type.TLiteral<"failed">;
285
- recoveryError: Type.TString;
286
- recoveryAction: Type.TOptional<Type.TEnum<["restart", "stop-first"]>>;
287
- retryOnSend: Type.TOptional<Type.TLiteral<true>>;
288
- }>]>;
289
- /**
290
- * Requests one-way dispatch to an explicit or automatically selected device (`operator.write`),
291
- * an explicit profile (`operator.admin`), or an `operator.admin`-only
292
- * `cloudWorkers.projectProfiles` lookup when no target is supplied. Target modes are exclusive.
293
- * An absent, unmatched, or invalid mapping is rejected with `INVALID_REQUEST` instead of
294
- * provisioning or falling back to another target.
295
- */
296
- declare const SessionsDispatchParamsSchema: Type.TObject<{
297
- key: Type.TString;
298
- agentId: Type.TOptional<Type.TString>;
299
- profileId: Type.TOptional<Type.TString>;
300
- deviceId: Type.TOptional<Type.TString>;
301
- autoDevice: Type.TOptional<Type.TLiteral<true>>;
302
- machineClass: Type.TOptional<Type.TString>;
303
- os: Type.TOptional<Type.TString>;
304
- }>;
305
- /** Result returned once session dispatch reaches durable worker ownership. */
306
- declare const SessionsDispatchResultSchema: Type.TObject<{
307
- ok: Type.TLiteral<true>;
308
- key: Type.TString;
309
- sessionId: Type.TString;
310
- placement: Type.TObject<{
311
- generation: Type.TInteger;
312
- createdAtMs: Type.TInteger;
313
- updatedAtMs: Type.TInteger;
314
- stateChangedAtMs: Type.TInteger;
315
- workspaceBaseManifestRef: Type.TString;
316
- remoteWorkspaceDir: Type.TString;
317
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
318
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
319
- diskSpace: Type.TOptional<Type.TObject<{
320
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
321
- availableBytes: Type.TInteger;
322
- totalBytes: Type.TInteger;
323
- observedAtMs: Type.TInteger;
324
- }>>;
325
- providerId: Type.TOptional<Type.TString>;
326
- profileId: Type.TOptional<Type.TString>;
327
- machine: Type.TOptional<Type.TObject<{
328
- class: Type.TOptional<Type.TString>;
329
- os: Type.TOptional<Type.TString>;
330
- osLabel: Type.TOptional<Type.TString>;
331
- cpu: Type.TOptional<Type.TInteger>;
332
- memoryGb: Type.TOptional<Type.TInteger>;
333
- }>>;
334
- workspaceResultConflict: Type.TOptional<Type.TObject<{
335
- paths: Type.TArray<Type.TString>;
336
- stagedResultRef: Type.TString;
337
- totalCount: Type.TOptional<Type.TInteger>;
338
- }>>;
339
- workspaceResultReconciling: Type.TOptional<Type.TLiteral<true>>;
340
- state: Type.TLiteral<"active">;
341
- environmentId: Type.TString;
342
- activeOwnerEpoch: Type.TInteger;
343
- workerBundleHash: Type.TString;
344
- inference: Type.TOptional<Type.TLiteral<"worker">>;
345
- runner: Type.TOptional<Type.TObject<{
346
- kind: Type.TLiteral<"device">;
347
- status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
348
- deviceId: Type.TOptional<Type.TString>;
349
- }>>;
350
- workerRuntimeInstall: Type.TOptional<Type.TObject<{
351
- phase: Type.TUnion<[Type.TLiteral<"transferring">, Type.TLiteral<"installing">]>;
352
- transferredBytes: Type.TInteger;
353
- totalBytes: Type.TInteger;
354
- startedAtMs: Type.TInteger;
355
- updatedAtMs: Type.TInteger;
356
- }>>;
357
- }>;
358
- }>;
359
- /** Stops a worker or explicitly recovers one failed placement onto the Gateway. */
360
- declare const SessionsReclaimParamsSchema: Type.TObject<{
361
- key: Type.TString;
362
- agentId: Type.TOptional<Type.TString>;
363
- recoverToGateway: Type.TOptional<Type.TObject<{
364
- expectedGeneration: Type.TInteger;
365
- }>>;
366
- }>;
367
- /** Terminal placement returned after a worker reclaim operation. */
368
- declare const SessionsReclaimResultPlacementSchema: Type.TUnion<[Type.TObject<{
369
- generation: Type.TInteger;
370
- createdAtMs: Type.TInteger;
371
- updatedAtMs: Type.TInteger;
372
- stateChangedAtMs: Type.TInteger;
373
- state: Type.TLiteral<"local">;
374
- }>, Type.TObject<{
375
- generation: Type.TInteger;
376
- createdAtMs: Type.TInteger;
377
- updatedAtMs: Type.TInteger;
378
- stateChangedAtMs: Type.TInteger;
379
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
380
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
381
- providerId: Type.TOptional<Type.TString>;
382
- profileId: Type.TOptional<Type.TString>;
383
- machine: Type.TOptional<Type.TObject<{
384
- class: Type.TOptional<Type.TString>;
385
- os: Type.TOptional<Type.TString>;
386
- osLabel: Type.TOptional<Type.TString>;
387
- cpu: Type.TOptional<Type.TInteger>;
388
- memoryGb: Type.TOptional<Type.TInteger>;
389
- }>>;
390
- workspaceResultConflict: Type.TOptional<Type.TObject<{
391
- paths: Type.TArray<Type.TString>;
392
- stagedResultRef: Type.TString;
393
- totalCount: Type.TOptional<Type.TInteger>;
394
- }>>;
395
- environmentId: Type.TOptional<Type.TString>;
396
- activeOwnerEpoch: Type.TOptional<Type.TInteger>;
397
- workspaceBaseManifestRef: Type.TOptional<Type.TString>;
398
- remoteWorkspaceDir: Type.TOptional<Type.TString>;
399
- workerBundleHash: Type.TOptional<Type.TString>;
400
- terminalReason: Type.TOptional<Type.TString>;
401
- terminalAtMs: Type.TOptional<Type.TInteger>;
402
- state: Type.TLiteral<"reclaimed">;
403
- }>]>;
404
- /** Result returned once worker ownership is reclaimed or a failed placement is cleared. */
405
- declare const SessionsReclaimResultSchema: Type.TObject<{
406
- ok: Type.TLiteral<true>;
407
- key: Type.TString;
408
- sessionId: Type.TString;
409
- placement: Type.TUnion<[Type.TObject<{
410
- generation: Type.TInteger;
411
- createdAtMs: Type.TInteger;
412
- updatedAtMs: Type.TInteger;
413
- stateChangedAtMs: Type.TInteger;
414
- state: Type.TLiteral<"local">;
415
- }>, Type.TObject<{
416
- generation: Type.TInteger;
417
- createdAtMs: Type.TInteger;
418
- updatedAtMs: Type.TInteger;
419
- stateChangedAtMs: Type.TInteger;
420
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
421
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
422
- providerId: Type.TOptional<Type.TString>;
423
- profileId: Type.TOptional<Type.TString>;
424
- machine: Type.TOptional<Type.TObject<{
425
- class: Type.TOptional<Type.TString>;
426
- os: Type.TOptional<Type.TString>;
427
- osLabel: Type.TOptional<Type.TString>;
428
- cpu: Type.TOptional<Type.TInteger>;
429
- memoryGb: Type.TOptional<Type.TInteger>;
430
- }>>;
431
- workspaceResultConflict: Type.TOptional<Type.TObject<{
432
- paths: Type.TArray<Type.TString>;
433
- stagedResultRef: Type.TString;
434
- totalCount: Type.TOptional<Type.TInteger>;
435
- }>>;
436
- environmentId: Type.TOptional<Type.TString>;
437
- activeOwnerEpoch: Type.TOptional<Type.TInteger>;
438
- workspaceBaseManifestRef: Type.TOptional<Type.TString>;
439
- remoteWorkspaceDir: Type.TOptional<Type.TString>;
440
- workerBundleHash: Type.TOptional<Type.TString>;
441
- terminalReason: Type.TOptional<Type.TString>;
442
- terminalAtMs: Type.TOptional<Type.TInteger>;
443
- state: Type.TLiteral<"reclaimed">;
444
- }>]>;
445
- }>;
446
- /** Exact active source observed before a session placement move. */
447
- declare const SessionMoveExpectedSourceSchema: Type.TObject<{
448
- generation: Type.TInteger;
449
- environmentId: Type.TString;
450
- ownerEpoch: Type.TInteger;
451
- }>;
452
- /** Moves the session back to the Gateway without redispatching it. */
453
- declare const SessionMoveGatewayTargetSchema: Type.TObject<{
454
- kind: Type.TLiteral<"gateway">;
455
- }>;
456
- /** Moves the session to one configured cloud worker profile. */
457
- declare const SessionMoveProfileTargetSchema: Type.TObject<{
458
- kind: Type.TLiteral<"profile">;
459
- profileId: Type.TString;
460
- machineClass: Type.TOptional<Type.TString>;
461
- os: Type.TOptional<Type.TString>;
462
- }>;
463
- /** Moves the session to one paired device worker. */
464
- declare const SessionMoveDeviceTargetSchema: Type.TObject<{
465
- kind: Type.TLiteral<"device">;
466
- deviceId: Type.TString;
467
- }>;
468
- /** Closed destination union for session placement moves. */
469
- declare const SessionMoveTargetSchema: Type.TUnion<[Type.TObject<{
470
- kind: Type.TLiteral<"gateway">;
471
- }>, Type.TObject<{
472
- kind: Type.TLiteral<"profile">;
473
- profileId: Type.TString;
474
- machineClass: Type.TOptional<Type.TString>;
475
- os: Type.TOptional<Type.TString>;
476
- }>, Type.TObject<{
477
- kind: Type.TLiteral<"device">;
478
- deviceId: Type.TString;
479
- }>]>;
480
- /** Durable progress and the original request facts needed after a failed move. */
481
- declare const SessionPlacementMoveSchema: Type.TObject<{
482
- target: Type.TUnion<[Type.TObject<{
483
- kind: Type.TLiteral<"gateway">;
484
- }>, Type.TObject<{
485
- kind: Type.TLiteral<"profile">;
486
- profileId: Type.TString;
487
- machineClass: Type.TOptional<Type.TString>;
488
- os: Type.TOptional<Type.TString>;
489
- }>, Type.TObject<{
490
- kind: Type.TLiteral<"device">;
491
- deviceId: Type.TString;
492
- }>]>;
493
- updatedAtMs: Type.TInteger;
494
- error: Type.TOptional<Type.TString>;
495
- retry: Type.TOptional<Type.TObject<{
496
- expected: Type.TObject<{
497
- generation: Type.TInteger;
498
- environmentId: Type.TString;
499
- ownerEpoch: Type.TInteger;
500
- }>;
501
- target: Type.TUnion<[Type.TObject<{
502
- kind: Type.TLiteral<"gateway">;
503
- }>, Type.TObject<{
504
- kind: Type.TLiteral<"profile">;
505
- profileId: Type.TString;
506
- machineClass: Type.TOptional<Type.TString>;
507
- os: Type.TOptional<Type.TString>;
508
- }>, Type.TObject<{
509
- kind: Type.TLiteral<"device">;
510
- deviceId: Type.TString;
511
- }>]>;
512
- abandonSource: Type.TOptional<Type.TLiteral<true>>;
513
- }>>;
514
- }>;
515
- /** Requests one exact-source placement move without replaying active work. */
516
- declare const SessionsMoveParamsSchema: Type.TObject<{
517
- expected: Type.TObject<{
518
- generation: Type.TInteger;
519
- environmentId: Type.TString;
520
- ownerEpoch: Type.TInteger;
521
- }>;
522
- target: Type.TUnion<[Type.TObject<{
523
- kind: Type.TLiteral<"gateway">;
524
- }>, Type.TObject<{
525
- kind: Type.TLiteral<"profile">;
526
- profileId: Type.TString;
527
- machineClass: Type.TOptional<Type.TString>;
528
- os: Type.TOptional<Type.TString>;
529
- }>, Type.TObject<{
530
- kind: Type.TLiteral<"device">;
531
- deviceId: Type.TString;
532
- }>]>;
533
- abandonSource: Type.TOptional<Type.TLiteral<true>>;
534
- key: Type.TString;
535
- agentId: Type.TOptional<Type.TString>;
536
- }>;
537
- /** Successful terminal states returned by sessions.move. */
538
- declare const SessionMovePlacementStateSchema: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"active">]>;
539
- /** Bounded placement state returned by sessions.move. */
540
- declare const SessionMovePlacementSchema: Type.TObject<{
541
- state: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"active">]>;
542
- generation: Type.TInteger;
543
- }>;
544
- /** Result returned after the requested placement move reaches its destination. */
545
- declare const SessionsMoveResultSchema: Type.TObject<{
546
- ok: Type.TLiteral<true>;
547
- key: Type.TString;
548
- sessionId: Type.TString;
549
- placement: Type.TObject<{
550
- state: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"active">]>;
551
- generation: Type.TInteger;
552
- }>;
553
- }>;
554
- declare const SessionPlacementProtocolSchemas: {
555
- readonly SessionPlacementState: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"requested">, Type.TLiteral<"provisioning">, Type.TLiteral<"syncing">, Type.TLiteral<"starting">, Type.TLiteral<"active">, Type.TLiteral<"draining">, Type.TLiteral<"reconciling">, Type.TLiteral<"reclaimed">, Type.TLiteral<"failed">]>;
556
- readonly SessionPlacementDiskSpace: Type.TObject<{
557
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
558
- availableBytes: Type.TInteger;
559
- totalBytes: Type.TInteger;
560
- observedAtMs: Type.TInteger;
561
- }>;
562
- readonly SessionPlacementWorkerRuntimeInstall: Type.TObject<{
563
- phase: Type.TUnion<[Type.TLiteral<"transferring">, Type.TLiteral<"installing">]>;
564
- transferredBytes: Type.TInteger;
565
- totalBytes: Type.TInteger;
566
- startedAtMs: Type.TInteger;
567
- updatedAtMs: Type.TInteger;
568
- }>;
569
- readonly SessionPlacementRunner: Type.TObject<{
570
- kind: Type.TLiteral<"device">;
571
- status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
572
- deviceId: Type.TOptional<Type.TString>;
573
- }>;
574
- readonly SessionPlacementMachine: Type.TObject<{
575
- class: Type.TOptional<Type.TString>;
576
- os: Type.TOptional<Type.TString>;
577
- osLabel: Type.TOptional<Type.TString>;
578
- cpu: Type.TOptional<Type.TInteger>;
579
- memoryGb: Type.TOptional<Type.TInteger>;
580
- }>;
581
- readonly LocalSessionPlacement: Type.TObject<{
582
- generation: Type.TInteger;
583
- createdAtMs: Type.TInteger;
584
- updatedAtMs: Type.TInteger;
585
- stateChangedAtMs: Type.TInteger;
586
- state: Type.TLiteral<"local">;
587
- }>;
588
- readonly RequestedSessionPlacement: Type.TObject<{
589
- generation: Type.TInteger;
590
- createdAtMs: Type.TInteger;
591
- updatedAtMs: Type.TInteger;
592
- stateChangedAtMs: Type.TInteger;
593
- state: Type.TLiteral<"requested">;
594
- }>;
595
- readonly ProvisioningSessionPlacement: Type.TObject<{
596
- generation: Type.TInteger;
597
- createdAtMs: Type.TInteger;
598
- updatedAtMs: Type.TInteger;
599
- stateChangedAtMs: Type.TInteger;
600
- providerId: Type.TOptional<Type.TString>;
601
- profileId: Type.TOptional<Type.TString>;
602
- machine: Type.TOptional<Type.TObject<{
603
- class: Type.TOptional<Type.TString>;
604
- os: Type.TOptional<Type.TString>;
605
- osLabel: Type.TOptional<Type.TString>;
606
- cpu: Type.TOptional<Type.TInteger>;
607
- memoryGb: Type.TOptional<Type.TInteger>;
608
- }>>;
609
- state: Type.TLiteral<"provisioning">;
610
- environmentId: Type.TOptional<Type.TString>;
611
- workerRuntimeInstall: Type.TOptional<Type.TObject<{
612
- phase: Type.TUnion<[Type.TLiteral<"transferring">, Type.TLiteral<"installing">]>;
613
- transferredBytes: Type.TInteger;
614
- totalBytes: Type.TInteger;
615
- startedAtMs: Type.TInteger;
616
- updatedAtMs: Type.TInteger;
617
- }>>;
618
- startStatus: Type.TOptional<Type.TUnion<[Type.TObject<{
619
- mode: Type.TLiteral<"snapshot">;
620
- phase: Type.TOptional<Type.TLiteral<"saving">>;
621
- }>, Type.TObject<{
622
- mode: Type.TLiteral<"cold">;
623
- reason: Type.TUnion<[Type.TLiteral<"no-snapshot-yet">, Type.TLiteral<"setup-changed">, Type.TLiteral<"snapshot-retiring">, Type.TLiteral<"snapshot-unavailable">, Type.TLiteral<"os-unsupported">, Type.TLiteral<"warm-images-off">, Type.TLiteral<"capture-paused">, Type.TLiteral<"backend-cannot-snapshot">, Type.TLiteral<"class-unknown">]>;
624
- phase: Type.TUnion<[Type.TLiteral<"provisioning">, Type.TLiteral<"preparing">, Type.TLiteral<"saving">]>;
625
- }>]>>;
626
- }>;
627
- readonly SyncingSessionPlacement: Type.TObject<{
628
- generation: Type.TInteger;
629
- createdAtMs: Type.TInteger;
630
- updatedAtMs: Type.TInteger;
631
- stateChangedAtMs: Type.TInteger;
632
- providerId: Type.TOptional<Type.TString>;
633
- profileId: Type.TOptional<Type.TString>;
634
- machine: Type.TOptional<Type.TObject<{
635
- class: Type.TOptional<Type.TString>;
636
- os: Type.TOptional<Type.TString>;
637
- osLabel: Type.TOptional<Type.TString>;
638
- cpu: Type.TOptional<Type.TInteger>;
639
- memoryGb: Type.TOptional<Type.TInteger>;
640
- }>>;
641
- state: Type.TLiteral<"syncing">;
642
- environmentId: Type.TString;
643
- workerBundleHash: Type.TString;
644
- }>;
645
- readonly StartingSessionPlacement: Type.TObject<{
646
- generation: Type.TInteger;
647
- createdAtMs: Type.TInteger;
648
- updatedAtMs: Type.TInteger;
649
- stateChangedAtMs: Type.TInteger;
650
- workspaceBaseManifestRef: Type.TString;
651
- remoteWorkspaceDir: Type.TString;
652
- providerId: Type.TOptional<Type.TString>;
653
- profileId: Type.TOptional<Type.TString>;
654
- machine: Type.TOptional<Type.TObject<{
655
- class: Type.TOptional<Type.TString>;
656
- os: Type.TOptional<Type.TString>;
657
- osLabel: Type.TOptional<Type.TString>;
658
- cpu: Type.TOptional<Type.TInteger>;
659
- memoryGb: Type.TOptional<Type.TInteger>;
660
- }>>;
661
- state: Type.TLiteral<"starting">;
662
- environmentId: Type.TString;
663
- workerBundleHash: Type.TString;
664
- }>;
665
- readonly ActiveWorkerSessionPlacement: Type.TObject<{
666
- generation: Type.TInteger;
667
- createdAtMs: Type.TInteger;
668
- updatedAtMs: Type.TInteger;
669
- stateChangedAtMs: Type.TInteger;
670
- workspaceBaseManifestRef: Type.TString;
671
- remoteWorkspaceDir: Type.TString;
672
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
673
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
674
- diskSpace: Type.TOptional<Type.TObject<{
675
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
676
- availableBytes: Type.TInteger;
677
- totalBytes: Type.TInteger;
678
- observedAtMs: Type.TInteger;
679
- }>>;
680
- providerId: Type.TOptional<Type.TString>;
681
- profileId: Type.TOptional<Type.TString>;
682
- machine: Type.TOptional<Type.TObject<{
683
- class: Type.TOptional<Type.TString>;
684
- os: Type.TOptional<Type.TString>;
685
- osLabel: Type.TOptional<Type.TString>;
686
- cpu: Type.TOptional<Type.TInteger>;
687
- memoryGb: Type.TOptional<Type.TInteger>;
688
- }>>;
689
- workspaceResultConflict: Type.TOptional<Type.TObject<{
690
- paths: Type.TArray<Type.TString>;
691
- stagedResultRef: Type.TString;
692
- totalCount: Type.TOptional<Type.TInteger>;
693
- }>>;
694
- workspaceResultReconciling: Type.TOptional<Type.TLiteral<true>>;
695
- state: Type.TLiteral<"active">;
696
- environmentId: Type.TString;
697
- activeOwnerEpoch: Type.TInteger;
698
- workerBundleHash: Type.TString;
699
- inference: Type.TOptional<Type.TLiteral<"worker">>;
700
- runner: Type.TOptional<Type.TObject<{
701
- kind: Type.TLiteral<"device">;
702
- status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
703
- deviceId: Type.TOptional<Type.TString>;
704
- }>>;
705
- workerRuntimeInstall: Type.TOptional<Type.TObject<{
706
- phase: Type.TUnion<[Type.TLiteral<"transferring">, Type.TLiteral<"installing">]>;
707
- transferredBytes: Type.TInteger;
708
- totalBytes: Type.TInteger;
709
- startedAtMs: Type.TInteger;
710
- updatedAtMs: Type.TInteger;
711
- }>>;
712
- }>;
713
- readonly DrainingSessionPlacement: Type.TObject<{
714
- generation: Type.TInteger;
715
- createdAtMs: Type.TInteger;
716
- updatedAtMs: Type.TInteger;
717
- stateChangedAtMs: Type.TInteger;
718
- workspaceBaseManifestRef: Type.TString;
719
- remoteWorkspaceDir: Type.TString;
720
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
721
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
722
- diskSpace: Type.TOptional<Type.TObject<{
723
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
724
- availableBytes: Type.TInteger;
725
- totalBytes: Type.TInteger;
726
- observedAtMs: Type.TInteger;
727
- }>>;
728
- providerId: Type.TOptional<Type.TString>;
729
- profileId: Type.TOptional<Type.TString>;
730
- machine: Type.TOptional<Type.TObject<{
731
- class: Type.TOptional<Type.TString>;
732
- os: Type.TOptional<Type.TString>;
733
- osLabel: Type.TOptional<Type.TString>;
734
- cpu: Type.TOptional<Type.TInteger>;
735
- memoryGb: Type.TOptional<Type.TInteger>;
736
- }>>;
737
- workspaceResultConflict: Type.TOptional<Type.TObject<{
738
- paths: Type.TArray<Type.TString>;
739
- stagedResultRef: Type.TString;
740
- totalCount: Type.TOptional<Type.TInteger>;
741
- }>>;
742
- workspaceResultReconciling: Type.TOptional<Type.TLiteral<true>>;
743
- state: Type.TLiteral<"draining">;
744
- environmentId: Type.TString;
745
- activeOwnerEpoch: Type.TInteger;
746
- workerBundleHash: Type.TString;
747
- }>;
748
- readonly ReconcilingSessionPlacement: Type.TObject<{
749
- generation: Type.TInteger;
750
- createdAtMs: Type.TInteger;
751
- updatedAtMs: Type.TInteger;
752
- stateChangedAtMs: Type.TInteger;
753
- workspaceBaseManifestRef: Type.TString;
754
- remoteWorkspaceDir: Type.TString;
755
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
756
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
757
- diskSpace: Type.TOptional<Type.TObject<{
758
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
759
- availableBytes: Type.TInteger;
760
- totalBytes: Type.TInteger;
761
- observedAtMs: Type.TInteger;
762
- }>>;
763
- providerId: Type.TOptional<Type.TString>;
764
- profileId: Type.TOptional<Type.TString>;
765
- machine: Type.TOptional<Type.TObject<{
766
- class: Type.TOptional<Type.TString>;
767
- os: Type.TOptional<Type.TString>;
768
- osLabel: Type.TOptional<Type.TString>;
769
- cpu: Type.TOptional<Type.TInteger>;
770
- memoryGb: Type.TOptional<Type.TInteger>;
771
- }>>;
772
- workspaceResultConflict: Type.TOptional<Type.TObject<{
773
- paths: Type.TArray<Type.TString>;
774
- stagedResultRef: Type.TString;
775
- totalCount: Type.TOptional<Type.TInteger>;
776
- }>>;
777
- state: Type.TLiteral<"reconciling">;
778
- environmentId: Type.TString;
779
- activeOwnerEpoch: Type.TInteger;
780
- workerBundleHash: Type.TString;
781
- }>;
782
- readonly ReclaimedSessionPlacement: Type.TObject<{
783
- generation: Type.TInteger;
784
- createdAtMs: Type.TInteger;
785
- updatedAtMs: Type.TInteger;
786
- stateChangedAtMs: Type.TInteger;
787
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
788
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
789
- providerId: Type.TOptional<Type.TString>;
790
- profileId: Type.TOptional<Type.TString>;
791
- machine: Type.TOptional<Type.TObject<{
792
- class: Type.TOptional<Type.TString>;
793
- os: Type.TOptional<Type.TString>;
794
- osLabel: Type.TOptional<Type.TString>;
795
- cpu: Type.TOptional<Type.TInteger>;
796
- memoryGb: Type.TOptional<Type.TInteger>;
797
- }>>;
798
- workspaceResultConflict: Type.TOptional<Type.TObject<{
799
- paths: Type.TArray<Type.TString>;
800
- stagedResultRef: Type.TString;
801
- totalCount: Type.TOptional<Type.TInteger>;
802
- }>>;
803
- environmentId: Type.TOptional<Type.TString>;
804
- activeOwnerEpoch: Type.TOptional<Type.TInteger>;
805
- workspaceBaseManifestRef: Type.TOptional<Type.TString>;
806
- remoteWorkspaceDir: Type.TOptional<Type.TString>;
807
- workerBundleHash: Type.TOptional<Type.TString>;
808
- terminalReason: Type.TOptional<Type.TString>;
809
- terminalAtMs: Type.TOptional<Type.TInteger>;
810
- state: Type.TLiteral<"reclaimed">;
811
- }>;
812
- readonly FailedSessionPlacement: Type.TObject<{
813
- generation: Type.TInteger;
814
- createdAtMs: Type.TInteger;
815
- updatedAtMs: Type.TInteger;
816
- stateChangedAtMs: Type.TInteger;
817
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
818
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
819
- providerId: Type.TOptional<Type.TString>;
820
- profileId: Type.TOptional<Type.TString>;
821
- machine: Type.TOptional<Type.TObject<{
822
- class: Type.TOptional<Type.TString>;
823
- os: Type.TOptional<Type.TString>;
824
- osLabel: Type.TOptional<Type.TString>;
825
- cpu: Type.TOptional<Type.TInteger>;
826
- memoryGb: Type.TOptional<Type.TInteger>;
827
- }>>;
828
- workspaceResultConflict: Type.TOptional<Type.TObject<{
829
- paths: Type.TArray<Type.TString>;
830
- stagedResultRef: Type.TString;
831
- totalCount: Type.TOptional<Type.TInteger>;
832
- }>>;
833
- environmentId: Type.TOptional<Type.TString>;
834
- activeOwnerEpoch: Type.TOptional<Type.TInteger>;
835
- workspaceBaseManifestRef: Type.TOptional<Type.TString>;
836
- remoteWorkspaceDir: Type.TOptional<Type.TString>;
837
- workerBundleHash: Type.TOptional<Type.TString>;
838
- terminalReason: Type.TOptional<Type.TString>;
839
- terminalAtMs: Type.TOptional<Type.TInteger>;
840
- state: Type.TLiteral<"failed">;
841
- recoveryError: Type.TString;
842
- recoveryAction: Type.TOptional<Type.TEnum<["restart", "stop-first"]>>;
843
- retryOnSend: Type.TOptional<Type.TLiteral<true>>;
844
- }>;
845
- readonly SessionPlacement: Type.TUnion<[Type.TObject<{
846
- generation: Type.TInteger;
847
- createdAtMs: Type.TInteger;
848
- updatedAtMs: Type.TInteger;
849
- stateChangedAtMs: Type.TInteger;
850
- state: Type.TLiteral<"local">;
851
- }>, Type.TObject<{
852
- generation: Type.TInteger;
853
- createdAtMs: Type.TInteger;
854
- updatedAtMs: Type.TInteger;
855
- stateChangedAtMs: Type.TInteger;
856
- state: Type.TLiteral<"requested">;
857
- }>, Type.TObject<{
858
- generation: Type.TInteger;
859
- createdAtMs: Type.TInteger;
860
- updatedAtMs: Type.TInteger;
861
- stateChangedAtMs: Type.TInteger;
862
- providerId: Type.TOptional<Type.TString>;
863
- profileId: Type.TOptional<Type.TString>;
864
- machine: Type.TOptional<Type.TObject<{
865
- class: Type.TOptional<Type.TString>;
866
- os: Type.TOptional<Type.TString>;
867
- osLabel: Type.TOptional<Type.TString>;
868
- cpu: Type.TOptional<Type.TInteger>;
869
- memoryGb: Type.TOptional<Type.TInteger>;
870
- }>>;
871
- state: Type.TLiteral<"provisioning">;
872
- environmentId: Type.TOptional<Type.TString>;
873
- workerRuntimeInstall: Type.TOptional<Type.TObject<{
874
- phase: Type.TUnion<[Type.TLiteral<"transferring">, Type.TLiteral<"installing">]>;
875
- transferredBytes: Type.TInteger;
876
- totalBytes: Type.TInteger;
877
- startedAtMs: Type.TInteger;
878
- updatedAtMs: Type.TInteger;
879
- }>>;
880
- startStatus: Type.TOptional<Type.TUnion<[Type.TObject<{
881
- mode: Type.TLiteral<"snapshot">;
882
- phase: Type.TOptional<Type.TLiteral<"saving">>;
883
- }>, Type.TObject<{
884
- mode: Type.TLiteral<"cold">;
885
- reason: Type.TUnion<[Type.TLiteral<"no-snapshot-yet">, Type.TLiteral<"setup-changed">, Type.TLiteral<"snapshot-retiring">, Type.TLiteral<"snapshot-unavailable">, Type.TLiteral<"os-unsupported">, Type.TLiteral<"warm-images-off">, Type.TLiteral<"capture-paused">, Type.TLiteral<"backend-cannot-snapshot">, Type.TLiteral<"class-unknown">]>;
886
- phase: Type.TUnion<[Type.TLiteral<"provisioning">, Type.TLiteral<"preparing">, Type.TLiteral<"saving">]>;
887
- }>]>>;
888
- }>, Type.TObject<{
889
- generation: Type.TInteger;
890
- createdAtMs: Type.TInteger;
891
- updatedAtMs: Type.TInteger;
892
- stateChangedAtMs: Type.TInteger;
893
- providerId: Type.TOptional<Type.TString>;
894
- profileId: Type.TOptional<Type.TString>;
895
- machine: Type.TOptional<Type.TObject<{
896
- class: Type.TOptional<Type.TString>;
897
- os: Type.TOptional<Type.TString>;
898
- osLabel: Type.TOptional<Type.TString>;
899
- cpu: Type.TOptional<Type.TInteger>;
900
- memoryGb: Type.TOptional<Type.TInteger>;
901
- }>>;
902
- state: Type.TLiteral<"syncing">;
903
- environmentId: Type.TString;
904
- workerBundleHash: Type.TString;
905
- }>, Type.TObject<{
906
- generation: Type.TInteger;
907
- createdAtMs: Type.TInteger;
908
- updatedAtMs: Type.TInteger;
909
- stateChangedAtMs: Type.TInteger;
910
- workspaceBaseManifestRef: Type.TString;
911
- remoteWorkspaceDir: Type.TString;
912
- providerId: Type.TOptional<Type.TString>;
913
- profileId: Type.TOptional<Type.TString>;
914
- machine: Type.TOptional<Type.TObject<{
915
- class: Type.TOptional<Type.TString>;
916
- os: Type.TOptional<Type.TString>;
917
- osLabel: Type.TOptional<Type.TString>;
918
- cpu: Type.TOptional<Type.TInteger>;
919
- memoryGb: Type.TOptional<Type.TInteger>;
920
- }>>;
921
- state: Type.TLiteral<"starting">;
922
- environmentId: Type.TString;
923
- workerBundleHash: Type.TString;
924
- }>, Type.TObject<{
925
- generation: Type.TInteger;
926
- createdAtMs: Type.TInteger;
927
- updatedAtMs: Type.TInteger;
928
- stateChangedAtMs: Type.TInteger;
929
- workspaceBaseManifestRef: Type.TString;
930
- remoteWorkspaceDir: Type.TString;
931
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
932
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
933
- diskSpace: Type.TOptional<Type.TObject<{
934
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
935
- availableBytes: Type.TInteger;
936
- totalBytes: Type.TInteger;
937
- observedAtMs: Type.TInteger;
938
- }>>;
939
- providerId: Type.TOptional<Type.TString>;
940
- profileId: Type.TOptional<Type.TString>;
941
- machine: Type.TOptional<Type.TObject<{
942
- class: Type.TOptional<Type.TString>;
943
- os: Type.TOptional<Type.TString>;
944
- osLabel: Type.TOptional<Type.TString>;
945
- cpu: Type.TOptional<Type.TInteger>;
946
- memoryGb: Type.TOptional<Type.TInteger>;
947
- }>>;
948
- workspaceResultConflict: Type.TOptional<Type.TObject<{
949
- paths: Type.TArray<Type.TString>;
950
- stagedResultRef: Type.TString;
951
- totalCount: Type.TOptional<Type.TInteger>;
952
- }>>;
953
- workspaceResultReconciling: Type.TOptional<Type.TLiteral<true>>;
954
- state: Type.TLiteral<"active">;
955
- environmentId: Type.TString;
956
- activeOwnerEpoch: Type.TInteger;
957
- workerBundleHash: Type.TString;
958
- inference: Type.TOptional<Type.TLiteral<"worker">>;
959
- runner: Type.TOptional<Type.TObject<{
960
- kind: Type.TLiteral<"device">;
961
- status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
962
- deviceId: Type.TOptional<Type.TString>;
963
- }>>;
964
- workerRuntimeInstall: Type.TOptional<Type.TObject<{
965
- phase: Type.TUnion<[Type.TLiteral<"transferring">, Type.TLiteral<"installing">]>;
966
- transferredBytes: Type.TInteger;
967
- totalBytes: Type.TInteger;
968
- startedAtMs: Type.TInteger;
969
- updatedAtMs: Type.TInteger;
970
- }>>;
971
- }>, Type.TObject<{
972
- generation: Type.TInteger;
973
- createdAtMs: Type.TInteger;
974
- updatedAtMs: Type.TInteger;
975
- stateChangedAtMs: Type.TInteger;
976
- workspaceBaseManifestRef: Type.TString;
977
- remoteWorkspaceDir: Type.TString;
978
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
979
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
980
- diskSpace: Type.TOptional<Type.TObject<{
981
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
982
- availableBytes: Type.TInteger;
983
- totalBytes: Type.TInteger;
984
- observedAtMs: Type.TInteger;
985
- }>>;
986
- providerId: Type.TOptional<Type.TString>;
987
- profileId: Type.TOptional<Type.TString>;
988
- machine: Type.TOptional<Type.TObject<{
989
- class: Type.TOptional<Type.TString>;
990
- os: Type.TOptional<Type.TString>;
991
- osLabel: Type.TOptional<Type.TString>;
992
- cpu: Type.TOptional<Type.TInteger>;
993
- memoryGb: Type.TOptional<Type.TInteger>;
994
- }>>;
995
- workspaceResultConflict: Type.TOptional<Type.TObject<{
996
- paths: Type.TArray<Type.TString>;
997
- stagedResultRef: Type.TString;
998
- totalCount: Type.TOptional<Type.TInteger>;
999
- }>>;
1000
- workspaceResultReconciling: Type.TOptional<Type.TLiteral<true>>;
1001
- state: Type.TLiteral<"draining">;
1002
- environmentId: Type.TString;
1003
- activeOwnerEpoch: Type.TInteger;
1004
- workerBundleHash: Type.TString;
1005
- }>, Type.TObject<{
1006
- generation: Type.TInteger;
1007
- createdAtMs: Type.TInteger;
1008
- updatedAtMs: Type.TInteger;
1009
- stateChangedAtMs: Type.TInteger;
1010
- workspaceBaseManifestRef: Type.TString;
1011
- remoteWorkspaceDir: Type.TString;
1012
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
1013
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
1014
- diskSpace: Type.TOptional<Type.TObject<{
1015
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
1016
- availableBytes: Type.TInteger;
1017
- totalBytes: Type.TInteger;
1018
- observedAtMs: Type.TInteger;
1019
- }>>;
1020
- providerId: Type.TOptional<Type.TString>;
1021
- profileId: Type.TOptional<Type.TString>;
1022
- machine: Type.TOptional<Type.TObject<{
1023
- class: Type.TOptional<Type.TString>;
1024
- os: Type.TOptional<Type.TString>;
1025
- osLabel: Type.TOptional<Type.TString>;
1026
- cpu: Type.TOptional<Type.TInteger>;
1027
- memoryGb: Type.TOptional<Type.TInteger>;
1028
- }>>;
1029
- workspaceResultConflict: Type.TOptional<Type.TObject<{
1030
- paths: Type.TArray<Type.TString>;
1031
- stagedResultRef: Type.TString;
1032
- totalCount: Type.TOptional<Type.TInteger>;
1033
- }>>;
1034
- state: Type.TLiteral<"reconciling">;
1035
- environmentId: Type.TString;
1036
- activeOwnerEpoch: Type.TInteger;
1037
- workerBundleHash: Type.TString;
1038
- }>, Type.TObject<{
1039
- generation: Type.TInteger;
1040
- createdAtMs: Type.TInteger;
1041
- updatedAtMs: Type.TInteger;
1042
- stateChangedAtMs: Type.TInteger;
1043
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
1044
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
1045
- providerId: Type.TOptional<Type.TString>;
1046
- profileId: Type.TOptional<Type.TString>;
1047
- machine: Type.TOptional<Type.TObject<{
1048
- class: Type.TOptional<Type.TString>;
1049
- os: Type.TOptional<Type.TString>;
1050
- osLabel: Type.TOptional<Type.TString>;
1051
- cpu: Type.TOptional<Type.TInteger>;
1052
- memoryGb: Type.TOptional<Type.TInteger>;
1053
- }>>;
1054
- workspaceResultConflict: Type.TOptional<Type.TObject<{
1055
- paths: Type.TArray<Type.TString>;
1056
- stagedResultRef: Type.TString;
1057
- totalCount: Type.TOptional<Type.TInteger>;
1058
- }>>;
1059
- environmentId: Type.TOptional<Type.TString>;
1060
- activeOwnerEpoch: Type.TOptional<Type.TInteger>;
1061
- workspaceBaseManifestRef: Type.TOptional<Type.TString>;
1062
- remoteWorkspaceDir: Type.TOptional<Type.TString>;
1063
- workerBundleHash: Type.TOptional<Type.TString>;
1064
- terminalReason: Type.TOptional<Type.TString>;
1065
- terminalAtMs: Type.TOptional<Type.TInteger>;
1066
- state: Type.TLiteral<"reclaimed">;
1067
- }>, Type.TObject<{
1068
- generation: Type.TInteger;
1069
- createdAtMs: Type.TInteger;
1070
- updatedAtMs: Type.TInteger;
1071
- stateChangedAtMs: Type.TInteger;
1072
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
1073
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
1074
- providerId: Type.TOptional<Type.TString>;
1075
- profileId: Type.TOptional<Type.TString>;
1076
- machine: Type.TOptional<Type.TObject<{
1077
- class: Type.TOptional<Type.TString>;
1078
- os: Type.TOptional<Type.TString>;
1079
- osLabel: Type.TOptional<Type.TString>;
1080
- cpu: Type.TOptional<Type.TInteger>;
1081
- memoryGb: Type.TOptional<Type.TInteger>;
1082
- }>>;
1083
- workspaceResultConflict: Type.TOptional<Type.TObject<{
1084
- paths: Type.TArray<Type.TString>;
1085
- stagedResultRef: Type.TString;
1086
- totalCount: Type.TOptional<Type.TInteger>;
1087
- }>>;
1088
- environmentId: Type.TOptional<Type.TString>;
1089
- activeOwnerEpoch: Type.TOptional<Type.TInteger>;
1090
- workspaceBaseManifestRef: Type.TOptional<Type.TString>;
1091
- remoteWorkspaceDir: Type.TOptional<Type.TString>;
1092
- workerBundleHash: Type.TOptional<Type.TString>;
1093
- terminalReason: Type.TOptional<Type.TString>;
1094
- terminalAtMs: Type.TOptional<Type.TInteger>;
1095
- state: Type.TLiteral<"failed">;
1096
- recoveryError: Type.TString;
1097
- recoveryAction: Type.TOptional<Type.TEnum<["restart", "stop-first"]>>;
1098
- retryOnSend: Type.TOptional<Type.TLiteral<true>>;
1099
- }>]>;
1100
- readonly SessionsDispatchParams: Type.TObject<{
1101
- key: Type.TString;
1102
- agentId: Type.TOptional<Type.TString>;
1103
- profileId: Type.TOptional<Type.TString>;
1104
- deviceId: Type.TOptional<Type.TString>;
1105
- autoDevice: Type.TOptional<Type.TLiteral<true>>;
1106
- machineClass: Type.TOptional<Type.TString>;
1107
- os: Type.TOptional<Type.TString>;
1108
- }>;
1109
- readonly SessionsDispatchResult: Type.TObject<{
1110
- ok: Type.TLiteral<true>;
1111
- key: Type.TString;
1112
- sessionId: Type.TString;
1113
- placement: Type.TObject<{
1114
- generation: Type.TInteger;
1115
- createdAtMs: Type.TInteger;
1116
- updatedAtMs: Type.TInteger;
1117
- stateChangedAtMs: Type.TInteger;
1118
- workspaceBaseManifestRef: Type.TString;
1119
- remoteWorkspaceDir: Type.TString;
1120
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
1121
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
1122
- diskSpace: Type.TOptional<Type.TObject<{
1123
- status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
1124
- availableBytes: Type.TInteger;
1125
- totalBytes: Type.TInteger;
1126
- observedAtMs: Type.TInteger;
1127
- }>>;
1128
- providerId: Type.TOptional<Type.TString>;
1129
- profileId: Type.TOptional<Type.TString>;
1130
- machine: Type.TOptional<Type.TObject<{
1131
- class: Type.TOptional<Type.TString>;
1132
- os: Type.TOptional<Type.TString>;
1133
- osLabel: Type.TOptional<Type.TString>;
1134
- cpu: Type.TOptional<Type.TInteger>;
1135
- memoryGb: Type.TOptional<Type.TInteger>;
1136
- }>>;
1137
- workspaceResultConflict: Type.TOptional<Type.TObject<{
1138
- paths: Type.TArray<Type.TString>;
1139
- stagedResultRef: Type.TString;
1140
- totalCount: Type.TOptional<Type.TInteger>;
1141
- }>>;
1142
- workspaceResultReconciling: Type.TOptional<Type.TLiteral<true>>;
1143
- state: Type.TLiteral<"active">;
1144
- environmentId: Type.TString;
1145
- activeOwnerEpoch: Type.TInteger;
1146
- workerBundleHash: Type.TString;
1147
- inference: Type.TOptional<Type.TLiteral<"worker">>;
1148
- runner: Type.TOptional<Type.TObject<{
1149
- kind: Type.TLiteral<"device">;
1150
- status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
1151
- deviceId: Type.TOptional<Type.TString>;
1152
- }>>;
1153
- workerRuntimeInstall: Type.TOptional<Type.TObject<{
1154
- phase: Type.TUnion<[Type.TLiteral<"transferring">, Type.TLiteral<"installing">]>;
1155
- transferredBytes: Type.TInteger;
1156
- totalBytes: Type.TInteger;
1157
- startedAtMs: Type.TInteger;
1158
- updatedAtMs: Type.TInteger;
1159
- }>>;
1160
- }>;
1161
- }>;
1162
- readonly SessionsReclaimParams: Type.TObject<{
1163
- key: Type.TString;
1164
- agentId: Type.TOptional<Type.TString>;
1165
- recoverToGateway: Type.TOptional<Type.TObject<{
1166
- expectedGeneration: Type.TInteger;
1167
- }>>;
1168
- }>;
1169
- readonly SessionsReclaimResultPlacement: Type.TUnion<[Type.TObject<{
1170
- generation: Type.TInteger;
1171
- createdAtMs: Type.TInteger;
1172
- updatedAtMs: Type.TInteger;
1173
- stateChangedAtMs: Type.TInteger;
1174
- state: Type.TLiteral<"local">;
1175
- }>, Type.TObject<{
1176
- generation: Type.TInteger;
1177
- createdAtMs: Type.TInteger;
1178
- updatedAtMs: Type.TInteger;
1179
- stateChangedAtMs: Type.TInteger;
1180
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
1181
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
1182
- providerId: Type.TOptional<Type.TString>;
1183
- profileId: Type.TOptional<Type.TString>;
1184
- machine: Type.TOptional<Type.TObject<{
1185
- class: Type.TOptional<Type.TString>;
1186
- os: Type.TOptional<Type.TString>;
1187
- osLabel: Type.TOptional<Type.TString>;
1188
- cpu: Type.TOptional<Type.TInteger>;
1189
- memoryGb: Type.TOptional<Type.TInteger>;
1190
- }>>;
1191
- workspaceResultConflict: Type.TOptional<Type.TObject<{
1192
- paths: Type.TArray<Type.TString>;
1193
- stagedResultRef: Type.TString;
1194
- totalCount: Type.TOptional<Type.TInteger>;
1195
- }>>;
1196
- environmentId: Type.TOptional<Type.TString>;
1197
- activeOwnerEpoch: Type.TOptional<Type.TInteger>;
1198
- workspaceBaseManifestRef: Type.TOptional<Type.TString>;
1199
- remoteWorkspaceDir: Type.TOptional<Type.TString>;
1200
- workerBundleHash: Type.TOptional<Type.TString>;
1201
- terminalReason: Type.TOptional<Type.TString>;
1202
- terminalAtMs: Type.TOptional<Type.TInteger>;
1203
- state: Type.TLiteral<"reclaimed">;
1204
- }>]>;
1205
- readonly SessionsReclaimResult: Type.TObject<{
1206
- ok: Type.TLiteral<true>;
1207
- key: Type.TString;
1208
- sessionId: Type.TString;
1209
- placement: Type.TUnion<[Type.TObject<{
1210
- generation: Type.TInteger;
1211
- createdAtMs: Type.TInteger;
1212
- updatedAtMs: Type.TInteger;
1213
- stateChangedAtMs: Type.TInteger;
1214
- state: Type.TLiteral<"local">;
1215
- }>, Type.TObject<{
1216
- generation: Type.TInteger;
1217
- createdAtMs: Type.TInteger;
1218
- updatedAtMs: Type.TInteger;
1219
- stateChangedAtMs: Type.TInteger;
1220
- lastTranscriptAckCursor: Type.TOptional<Type.TInteger>;
1221
- lastLiveEventAckCursor: Type.TOptional<Type.TInteger>;
1222
- providerId: Type.TOptional<Type.TString>;
1223
- profileId: Type.TOptional<Type.TString>;
1224
- machine: Type.TOptional<Type.TObject<{
1225
- class: Type.TOptional<Type.TString>;
1226
- os: Type.TOptional<Type.TString>;
1227
- osLabel: Type.TOptional<Type.TString>;
1228
- cpu: Type.TOptional<Type.TInteger>;
1229
- memoryGb: Type.TOptional<Type.TInteger>;
1230
- }>>;
1231
- workspaceResultConflict: Type.TOptional<Type.TObject<{
1232
- paths: Type.TArray<Type.TString>;
1233
- stagedResultRef: Type.TString;
1234
- totalCount: Type.TOptional<Type.TInteger>;
1235
- }>>;
1236
- environmentId: Type.TOptional<Type.TString>;
1237
- activeOwnerEpoch: Type.TOptional<Type.TInteger>;
1238
- workspaceBaseManifestRef: Type.TOptional<Type.TString>;
1239
- remoteWorkspaceDir: Type.TOptional<Type.TString>;
1240
- workerBundleHash: Type.TOptional<Type.TString>;
1241
- terminalReason: Type.TOptional<Type.TString>;
1242
- terminalAtMs: Type.TOptional<Type.TInteger>;
1243
- state: Type.TLiteral<"reclaimed">;
1244
- }>]>;
1245
- }>;
1246
- readonly SessionMoveExpectedSource: Type.TObject<{
1247
- generation: Type.TInteger;
1248
- environmentId: Type.TString;
1249
- ownerEpoch: Type.TInteger;
1250
- }>;
1251
- readonly SessionMoveGatewayTarget: Type.TObject<{
1252
- kind: Type.TLiteral<"gateway">;
1253
- }>;
1254
- readonly SessionMoveProfileTarget: Type.TObject<{
1255
- kind: Type.TLiteral<"profile">;
1256
- profileId: Type.TString;
1257
- machineClass: Type.TOptional<Type.TString>;
1258
- os: Type.TOptional<Type.TString>;
1259
- }>;
1260
- readonly SessionMoveDeviceTarget: Type.TObject<{
1261
- kind: Type.TLiteral<"device">;
1262
- deviceId: Type.TString;
1263
- }>;
1264
- readonly SessionMoveTarget: Type.TUnion<[Type.TObject<{
1265
- kind: Type.TLiteral<"gateway">;
1266
- }>, Type.TObject<{
1267
- kind: Type.TLiteral<"profile">;
1268
- profileId: Type.TString;
1269
- machineClass: Type.TOptional<Type.TString>;
1270
- os: Type.TOptional<Type.TString>;
1271
- }>, Type.TObject<{
1272
- kind: Type.TLiteral<"device">;
1273
- deviceId: Type.TString;
1274
- }>]>;
1275
- readonly SessionPlacementMove: Type.TObject<{
1276
- target: Type.TUnion<[Type.TObject<{
1277
- kind: Type.TLiteral<"gateway">;
1278
- }>, Type.TObject<{
1279
- kind: Type.TLiteral<"profile">;
1280
- profileId: Type.TString;
1281
- machineClass: Type.TOptional<Type.TString>;
1282
- os: Type.TOptional<Type.TString>;
1283
- }>, Type.TObject<{
1284
- kind: Type.TLiteral<"device">;
1285
- deviceId: Type.TString;
1286
- }>]>;
1287
- updatedAtMs: Type.TInteger;
1288
- error: Type.TOptional<Type.TString>;
1289
- retry: Type.TOptional<Type.TObject<{
1290
- expected: Type.TObject<{
1291
- generation: Type.TInteger;
1292
- environmentId: Type.TString;
1293
- ownerEpoch: Type.TInteger;
1294
- }>;
1295
- target: Type.TUnion<[Type.TObject<{
1296
- kind: Type.TLiteral<"gateway">;
1297
- }>, Type.TObject<{
1298
- kind: Type.TLiteral<"profile">;
1299
- profileId: Type.TString;
1300
- machineClass: Type.TOptional<Type.TString>;
1301
- os: Type.TOptional<Type.TString>;
1302
- }>, Type.TObject<{
1303
- kind: Type.TLiteral<"device">;
1304
- deviceId: Type.TString;
1305
- }>]>;
1306
- abandonSource: Type.TOptional<Type.TLiteral<true>>;
1307
- }>>;
1308
- }>;
1309
- readonly SessionsMoveParams: Type.TObject<{
1310
- expected: Type.TObject<{
1311
- generation: Type.TInteger;
1312
- environmentId: Type.TString;
1313
- ownerEpoch: Type.TInteger;
1314
- }>;
1315
- target: Type.TUnion<[Type.TObject<{
1316
- kind: Type.TLiteral<"gateway">;
1317
- }>, Type.TObject<{
1318
- kind: Type.TLiteral<"profile">;
1319
- profileId: Type.TString;
1320
- machineClass: Type.TOptional<Type.TString>;
1321
- os: Type.TOptional<Type.TString>;
1322
- }>, Type.TObject<{
1323
- kind: Type.TLiteral<"device">;
1324
- deviceId: Type.TString;
1325
- }>]>;
1326
- abandonSource: Type.TOptional<Type.TLiteral<true>>;
1327
- key: Type.TString;
1328
- agentId: Type.TOptional<Type.TString>;
1329
- }>;
1330
- readonly SessionMovePlacementState: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"active">]>;
1331
- readonly SessionMovePlacement: Type.TObject<{
1332
- state: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"active">]>;
1333
- generation: Type.TInteger;
1334
- }>;
1335
- readonly SessionsMoveResult: Type.TObject<{
1336
- ok: Type.TLiteral<true>;
1337
- key: Type.TString;
1338
- sessionId: Type.TString;
1339
- placement: Type.TObject<{
1340
- state: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"active">]>;
1341
- generation: Type.TInteger;
1342
- }>;
1343
- }>;
1344
- };
1345
- type SessionPlacement = Static<typeof SessionPlacementSchema>;
1346
- type SessionPlacementDiskSpace = Static<typeof SessionPlacementDiskSpaceSchema>;
1347
- type SessionPlacementWorkerRuntimeInstall = Static<typeof SessionPlacementWorkerRuntimeInstallSchema>;
1348
- type SessionPlacementRunner = Static<typeof SessionPlacementRunnerSchema>;
1349
- type SessionPlacementMachine = Static<typeof SessionPlacementMachineSchema>;
1350
- type SessionsDispatchParams = Static<typeof SessionsDispatchParamsSchema>;
1351
- type SessionsDispatchResult = Static<typeof SessionsDispatchResultSchema>;
1352
- type SessionsReclaimParams = Static<typeof SessionsReclaimParamsSchema>;
1353
- type SessionsReclaimResultPlacement = Static<typeof SessionsReclaimResultPlacementSchema>;
1354
- type SessionsReclaimResult = Static<typeof SessionsReclaimResultSchema>;
1355
- type SessionMoveExpectedSource = Static<typeof SessionMoveExpectedSourceSchema>;
1356
- type SessionMoveTarget = Static<typeof SessionMoveTargetSchema>;
1357
- type SessionPlacementMove = Static<typeof SessionPlacementMoveSchema>;
1358
- type SessionsMoveParams = Static<typeof SessionsMoveParamsSchema>;
1359
- type SessionMovePlacementState = Static<typeof SessionMovePlacementStateSchema>;
1360
- type SessionMovePlacement = Static<typeof SessionMovePlacementSchema>;
1361
- type SessionsMoveResult = Static<typeof SessionsMoveResultSchema>;
1362
- //#endregion
1363
- //#region packages/gateway-protocol/src/gateway-error-details.d.ts
1364
- /** Display projection for an assistant failure without visible reply content. */
1365
- declare const GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT = "The agent run failed before producing a reply.";
1366
- /** Gateway JSON-RPC style error codes shared by clients and server handlers. */
1367
- declare const ErrorCodes: {
1368
- /** @deprecated Retained for source compatibility; no current server emitter. */
1369
- readonly NOT_LINKED: "NOT_LINKED";
1370
- /** Device exists but still needs an explicit pairing approval. */
1371
- readonly NOT_PAIRED: "NOT_PAIRED";
1372
- /** @deprecated Retained for source compatibility; no current server emitter. */
1373
- readonly AGENT_TIMEOUT: "AGENT_TIMEOUT";
1374
- /** Request payload failed protocol validation or method preconditions. */
1375
- readonly INVALID_REQUEST: "INVALID_REQUEST";
1376
- /** Authenticated caller lacks permission for the requested operation. */
1377
- readonly FORBIDDEN: "FORBIDDEN";
1378
- /** Approval resolution referenced a missing or expired approval request. */
1379
- readonly APPROVAL_NOT_FOUND: "APPROVAL_NOT_FOUND";
1380
- /** Gateway service or required backend is temporarily unavailable. */
1381
- readonly UNAVAILABLE: "UNAVAILABLE";
1382
- };
1383
- /** Closed set of canonical gateway error code strings. */
1384
- type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
1385
- /** Stable discriminants for structured method-level failures. */
1386
- declare const GatewayErrorDetailCodes: {
1387
- readonly CRON_JOB_NOT_FOUND: "CRON_JOB_NOT_FOUND";
1388
- readonly MISSING_SCOPE: "MISSING_SCOPE";
1389
- readonly MCP_APP_VIEW_EXPIRED: "MCP_APP_VIEW_EXPIRED";
1390
- readonly OUTBOUND_DELIVERY_QUEUED: "OUTBOUND_DELIVERY_QUEUED";
1391
- readonly USER_PREFS_LIMIT_EXCEEDED: "USER_PREFS_LIMIT_EXCEEDED";
1392
- readonly SESSION_COMPANION_BUSY: "SESSION_COMPANION_BUSY";
1393
- readonly PROJECT_CLONE_FAILED: "PROJECT_CLONE_FAILED";
1394
- readonly UNKNOWN_AGENT_ID: "UNKNOWN_AGENT_ID";
1395
- readonly WIZARD_NOT_FOUND: "WIZARD_NOT_FOUND";
1396
- readonly SETUP_ADMISSION_BUSY: "SETUP_ADMISSION_BUSY";
1397
- readonly GITHUB_PUBLICATION_SELECTION_REJECTED: "GITHUB_PUBLICATION_SELECTION_REJECTED";
1398
- readonly SESSION_WORKSPACE_RECOVERY_REQUIRED: "SESSION_WORKSPACE_RECOVERY_REQUIRED";
1399
- readonly TASK_WORKTREE_SOURCE_REQUIRED: "TASK_WORKTREE_SOURCE_REQUIRED";
1400
- readonly TASK_HISTORY_PREVIEW_CAPACITY: "TASK_HISTORY_PREVIEW_CAPACITY";
1401
- readonly CLAWHUB_RISK_ACKNOWLEDGEMENT_REQUIRED: "CLAWHUB_RISK_ACKNOWLEDGEMENT_REQUIRED";
1402
- readonly CLAW_REVIEW_REQUIRED: "CLAW_REVIEW_REQUIRED";
1403
- };
1404
- /** Missing cron automation identified by its exact store key. */
1405
- type CronJobNotFoundErrorDetails = {
1406
- code: typeof GatewayErrorDetailCodes.CRON_JOB_NOT_FOUND;
1407
- jobId: string;
1408
- };
1409
- /** Missing operator-scope details shared by WebSocket and HTTP responses. */
1410
- type MissingScopeErrorDetails = {
1411
- code: typeof GatewayErrorDetailCodes.MISSING_SCOPE;
1412
- missingScope: string;
1413
- requiredScopes: string[];
1414
- };
1415
- type McpAppViewExpiredErrorDetails = {
1416
- code: typeof GatewayErrorDetailCodes.MCP_APP_VIEW_EXPIRED;
1417
- };
1418
- type OutboundDeliveryQueuedErrorDetails = {
1419
- code: typeof GatewayErrorDetailCodes.OUTBOUND_DELIVERY_QUEUED;
1420
- };
1421
- /** Per-profile preference quota details returned by users.prefs.set. */
1422
- type UserPrefsLimitExceededErrorDetails = {
1423
- code: typeof GatewayErrorDetailCodes.USER_PREFS_LIMIT_EXCEEDED;
1424
- limit: number;
1425
- currentCount: number;
1426
- };
1427
- /** Unknown agent details carried by agent-scoped method validation failures. */
1428
- type UnknownAgentIdErrorDetails = {
1429
- code: typeof GatewayErrorDetailCodes.UNKNOWN_AGENT_ID;
1430
- agentId: string;
1431
- };
1432
- /** Setup rejected before its task or wizard session was admitted. */
1433
- type SetupAdmissionBusyErrorDetails = {
1434
- code: typeof GatewayErrorDetailCodes.SETUP_ADMISSION_BUSY;
1435
- };
1436
- /** This invocation rejected its selection before admission; earlier calls may still be pending. */
1437
- type GitHubPublicationSelectionRejectedErrorDetails = {
1438
- code: typeof GatewayErrorDetailCodes.GITHUB_PUBLICATION_SELECTION_REJECTED;
1439
- idempotencyKey: string;
1440
- };
1441
- /** Missing or expired process-local setup wizard session. */
1442
- type WizardNotFoundErrorDetails = {
1443
- code: typeof GatewayErrorDetailCodes.WIZARD_NOT_FOUND;
1444
- };
1445
- type ProjectCloneFailureCause = "invalid_url" | "auth_required" | "not_found" | "network" | "target_exists" | "clone_failed";
1446
- type ProjectCloneErrorDetails = {
1447
- code: typeof GatewayErrorDetailCodes.PROJECT_CLONE_FAILED;
1448
- cause: ProjectCloneFailureCause;
1449
- };
1450
- /** Exact retained workspace owner that must be recovered or explicitly abandoned. */
1451
- type SessionWorkspaceRecoveryRequiredErrorDetails = {
1452
- code: typeof GatewayErrorDetailCodes.SESSION_WORKSPACE_RECOVERY_REQUIRED;
1453
- cause: "device_offline";
1454
- recoveryAction: "continue_on_gateway";
1455
- sessionId: string;
1456
- source: SessionMoveExpectedSource;
1457
- };
1458
- /** Structured details emitted by method-level failures. */
1459
- type TaskWorktreeSourceRequiredErrorDetails = {
1460
- code: typeof GatewayErrorDetailCodes.TASK_WORKTREE_SOURCE_REQUIRED;
1461
- cwd: string;
1462
- };
1463
- type ClawHubRiskAcknowledgementRequiredErrorDetails = {
1464
- code: typeof GatewayErrorDetailCodes.CLAWHUB_RISK_ACKNOWLEDGEMENT_REQUIRED;
1465
- warning: string;
1466
- };
1467
- type ClawReviewRequiredErrorDetails = {
1468
- code: typeof GatewayErrorDetailCodes.CLAW_REVIEW_REQUIRED;
1469
- kind: "plugin" | "skill";
1470
- };
1471
- /** Structured details emitted by method-level failures. */
1472
- type GatewayErrorDetails = CronJobNotFoundErrorDetails | MissingScopeErrorDetails | McpAppViewExpiredErrorDetails | OutboundDeliveryQueuedErrorDetails | UserPrefsLimitExceededErrorDetails | ProjectCloneErrorDetails | UnknownAgentIdErrorDetails | WizardNotFoundErrorDetails | SetupAdmissionBusyErrorDetails | GitHubPublicationSelectionRejectedErrorDetails | SessionWorkspaceRecoveryRequiredErrorDetails | TaskWorktreeSourceRequiredErrorDetails | ClawHubRiskAcknowledgementRequiredErrorDetails | ClawReviewRequiredErrorDetails | {
1473
- code: typeof GatewayErrorDetailCodes.TASK_HISTORY_PREVIEW_CAPACITY;
1474
- };
1475
- declare function readClawHubRiskAcknowledgementRequiredError(error: unknown): ClawHubRiskAcknowledgementRequiredErrorDetails | null;
1476
- declare function readClawReviewRequiredError(error: unknown): ClawReviewRequiredErrorDetails | null;
1477
- declare function readGitHubPublicationSelectionRejectedError(error: unknown): GitHubPublicationSelectionRejectedErrorDetails | null;
1478
- /** Reads a typed cron lookup miss without parsing operator-facing prose. */
1479
- declare function readCronJobNotFoundError(error: unknown): CronJobNotFoundErrorDetails | null;
1480
- /** Reads validated missing-scope details from an untrusted protocol payload. */
1481
- declare function readMissingScopeErrorDetails(details: unknown): MissingScopeErrorDetails | null;
1482
- declare function isMcpAppViewExpiredError(error: unknown): boolean;
1483
- /**
1484
- * Reads a method-level missing-scope failure, preferring structured details.
1485
- * The message fallback keeps clients compatible with gateways predating structured details.
1486
- */
1487
- declare function readMissingScopeError(error: unknown): MissingScopeErrorDetails | null;
1488
- //#endregion
1489
- export { SessionsDispatchParams as $, SessionMoveExpectedSourceSchema as A, SessionPlacementDiskSpace as B, readClawReviewRequiredError as C, readMissingScopeErrorDetails as D, readMissingScopeError as E, SessionMovePlacementStateSchema as F, SessionPlacementMoveSchema as G, SessionPlacementMachine as H, SessionMoveProfileTargetSchema as I, SessionPlacementRunnerSchema as J, SessionPlacementProtocolSchemas as K, SessionMoveTarget as L, SessionMovePlacement as M, SessionMovePlacementSchema as N, SessionMoveDeviceTargetSchema as O, SessionMovePlacementState as P, SessionPlacementWorkerRuntimeInstallSchema as Q, SessionMoveTargetSchema as R, readClawHubRiskAcknowledgementRequiredError as S, readGitHubPublicationSelectionRejectedError as T, SessionPlacementMachineSchema as U, SessionPlacementDiskSpaceSchema as V, SessionPlacementMove as W, SessionPlacementStateSchema as X, SessionPlacementSchema as Y, SessionPlacementWorkerRuntimeInstall as Z, TaskWorktreeSourceRequiredErrorDetails as _, ErrorCodes as a, SessionsMoveResult as at, WizardNotFoundErrorDetails as b, GatewayErrorDetails as c, SessionsReclaimParamsSchema as ct, MissingScopeErrorDetails as d, SessionsReclaimResultPlacementSchema as dt, SessionsDispatchParamsSchema as et, OutboundDeliveryQueuedErrorDetails as f, SessionsReclaimResultSchema as ft, SetupAdmissionBusyErrorDetails as g, SessionWorkspaceRecoveryRequiredErrorDetails as h, ErrorCode as i, SessionsMoveParamsSchema as it, SessionMoveGatewayTargetSchema as j, SessionMoveExpectedSource as k, GitHubPublicationSelectionRejectedErrorDetails as l, SessionsReclaimResult as lt, ProjectCloneFailureCause as m, ClawReviewRequiredErrorDetails as n, SessionsDispatchResultSchema as nt, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT as o, SessionsMoveResultSchema as ot, ProjectCloneErrorDetails as p, SessionPlacementRunner as q, CronJobNotFoundErrorDetails as r, SessionsMoveParams as rt, GatewayErrorDetailCodes as s, SessionsReclaimParams as st, ClawHubRiskAcknowledgementRequiredErrorDetails as t, SessionsDispatchResult as tt, McpAppViewExpiredErrorDetails as u, SessionsReclaimResultPlacement as ut, UnknownAgentIdErrorDetails as v, readCronJobNotFoundError as w, isMcpAppViewExpiredError as x, UserPrefsLimitExceededErrorDetails as y, SessionPlacement as z };