@pstdio/pocketcoder-sdk 0.6.1 → 0.7.0

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.
package/dist/index.d.ts CHANGED
@@ -14,16 +14,56 @@ declare function splitAttachmentManifest(content: string): {
14
14
  attachments: AttachmentDescriptor[] | null;
15
15
  };
16
16
  //#endregion
17
+ //#region ../contracts/src/attachments/input-reference.d.ts
18
+ declare const InputObjectReferenceSchema: z.ZodObject<{
19
+ workspaceId: z.ZodUUID;
20
+ fileId: z.ZodUUID;
21
+ objectVersion: z.ZodString;
22
+ name: z.ZodString;
23
+ mediaType: z.ZodString;
24
+ sizeBytes: z.ZodNumber;
25
+ digest: z.ZodString;
26
+ visibility: z.ZodEnum<{
27
+ ready: "ready";
28
+ expired: "expired";
29
+ unavailable: "unavailable";
30
+ }>;
31
+ }, z.core.$strict>;
32
+ type InputObjectReference = z.infer<typeof InputObjectReferenceSchema>;
33
+ declare const AcceptedInputManifestSchema: z.ZodObject<{
34
+ workspaceId: z.ZodUUID;
35
+ incarnationId: z.ZodString;
36
+ digest: z.ZodString;
37
+ objects: z.ZodArray<z.ZodObject<{
38
+ workspaceId: z.ZodUUID;
39
+ fileId: z.ZodUUID;
40
+ objectVersion: z.ZodString;
41
+ name: z.ZodString;
42
+ mediaType: z.ZodString;
43
+ sizeBytes: z.ZodNumber;
44
+ digest: z.ZodString;
45
+ visibility: z.ZodEnum<{
46
+ ready: "ready";
47
+ expired: "expired";
48
+ unavailable: "unavailable";
49
+ }>;
50
+ }, z.core.$strict>>;
51
+ }, z.core.$strict>;
52
+ type AcceptedInputManifest = z.infer<typeof AcceptedInputManifestSchema>;
53
+ //#endregion
17
54
  //#region ../contracts/src/auth/keys.d.ts
18
55
  declare const KeyIssueRequestSchema: z.ZodObject<{
19
56
  request_id: z.ZodString;
20
57
  scopes: z.ZodArray<z.ZodEnum<{
21
58
  "templates:read": "templates:read";
59
+ "templates:write": "templates:write";
60
+ "secrets:write": "secrets:write";
22
61
  "workspaces:create": "workspaces:create";
23
62
  "workspaces:read": "workspaces:read";
24
63
  "workspaces:cancel": "workspaces:cancel";
25
64
  "workspaces:purge": "workspaces:purge";
26
65
  "workspaces:recover": "workspaces:recover";
66
+ "principals:admin": "principals:admin";
27
67
  "keys:read": "keys:read";
28
68
  "keys:write": "keys:write";
29
69
  "workspaces:preserve": "workspaces:preserve";
@@ -35,6 +75,9 @@ declare const KeyIssueRequestSchema: z.ZodObject<{
35
75
  "conversations:write": "conversations:write";
36
76
  "conversations:delete": "conversations:delete";
37
77
  "services:relay": "services:relay";
78
+ "previews:open": "previews:open";
79
+ "display:view": "display:view";
80
+ "display:control": "display:control";
38
81
  "attachments:write": "attachments:write";
39
82
  "logs:read": "logs:read";
40
83
  "network:read": "network:read";
@@ -42,14 +85,23 @@ declare const KeyIssueRequestSchema: z.ZodObject<{
42
85
  "terminal:read": "terminal:read";
43
86
  admin: "admin";
44
87
  }>>;
88
+ templates: z.ZodOptional<z.ZodArray<z.ZodString>>;
89
+ managed_principal_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
45
90
  expires_at: z.ZodISODateTime;
46
91
  }, z.core.$strict>;
47
92
  type KeyIssueRequest = z.infer<typeof KeyIssueRequestSchema>;
93
+ declare const KeyRotateRequestSchema: z.ZodObject<{
94
+ expires_at: z.ZodOptional<z.ZodISODateTime>;
95
+ request_id: z.ZodString;
96
+ }, z.core.$strict>;
97
+ type KeyRotateRequest = z.infer<typeof KeyRotateRequestSchema>;
48
98
  declare const KeyResourceSchema: z.ZodObject<{
49
99
  id: z.ZodUUID;
50
100
  principal_id: z.ZodUUID;
51
101
  scopes: z.ZodArray<z.ZodString>;
52
102
  effective_scopes: z.ZodArray<z.ZodString>;
103
+ templates: z.ZodNullable<z.ZodArray<z.ZodString>>;
104
+ effective_templates: z.ZodArray<z.ZodString>;
53
105
  managed_principal_ids: z.ZodArray<z.ZodUUID>;
54
106
  issuance_request_id: z.ZodNullable<z.ZodString>;
55
107
  created_at: z.ZodISODateTime;
@@ -64,6 +116,8 @@ declare const KeyIssueResponseSchema: z.ZodObject<{
64
116
  principal_id: z.ZodUUID;
65
117
  scopes: z.ZodArray<z.ZodString>;
66
118
  effective_scopes: z.ZodArray<z.ZodString>;
119
+ templates: z.ZodNullable<z.ZodArray<z.ZodString>>;
120
+ effective_templates: z.ZodArray<z.ZodString>;
67
121
  managed_principal_ids: z.ZodArray<z.ZodUUID>;
68
122
  issuance_request_id: z.ZodNullable<z.ZodString>;
69
123
  created_at: z.ZodISODateTime;
@@ -80,6 +134,8 @@ declare const KeyListResponseSchema: z.ZodObject<{
80
134
  principal_id: z.ZodUUID;
81
135
  scopes: z.ZodArray<z.ZodString>;
82
136
  effective_scopes: z.ZodArray<z.ZodString>;
137
+ templates: z.ZodNullable<z.ZodArray<z.ZodString>>;
138
+ effective_templates: z.ZodArray<z.ZodString>;
83
139
  managed_principal_ids: z.ZodArray<z.ZodUUID>;
84
140
  issuance_request_id: z.ZodNullable<z.ZodString>;
85
141
  created_at: z.ZodISODateTime;
@@ -91,19 +147,105 @@ declare const KeyListResponseSchema: z.ZodObject<{
91
147
  }, z.core.$strip>;
92
148
  type KeyListResponse = z.infer<typeof KeyListResponseSchema>;
93
149
  //#endregion
150
+ //#region ../contracts/src/auth/principals.d.ts
151
+ declare const PrincipalCreateRequestSchema: z.ZodObject<{
152
+ scopes: z.ZodArray<z.ZodEnum<{
153
+ "templates:read": "templates:read";
154
+ "templates:write": "templates:write";
155
+ "secrets:write": "secrets:write";
156
+ "workspaces:create": "workspaces:create";
157
+ "workspaces:read": "workspaces:read";
158
+ "workspaces:cancel": "workspaces:cancel";
159
+ "workspaces:purge": "workspaces:purge";
160
+ "workspaces:recover": "workspaces:recover";
161
+ "principals:admin": "principals:admin";
162
+ "keys:read": "keys:read";
163
+ "keys:write": "keys:write";
164
+ "workspaces:preserve": "workspaces:preserve";
165
+ "workspaces:restore": "workspaces:restore";
166
+ "checkpoints:read": "checkpoints:read";
167
+ "checkpoints:delete": "checkpoints:delete";
168
+ "outputs:read": "outputs:read";
169
+ "conversations:read": "conversations:read";
170
+ "conversations:write": "conversations:write";
171
+ "conversations:delete": "conversations:delete";
172
+ "services:relay": "services:relay";
173
+ "previews:open": "previews:open";
174
+ "display:view": "display:view";
175
+ "display:control": "display:control";
176
+ "attachments:write": "attachments:write";
177
+ "logs:read": "logs:read";
178
+ "network:read": "network:read";
179
+ "terminal:attach": "terminal:attach";
180
+ "terminal:read": "terminal:read";
181
+ admin: "admin";
182
+ }>>;
183
+ templates: z.ZodArray<z.ZodString>;
184
+ name: z.ZodString;
185
+ }, z.core.$strict>;
186
+ type PrincipalCreateRequest = z.infer<typeof PrincipalCreateRequestSchema>;
187
+ declare const PrincipalResourceSchema: z.ZodObject<{
188
+ id: z.ZodUUID;
189
+ name: z.ZodString;
190
+ scopes: z.ZodArray<z.ZodString>;
191
+ templates: z.ZodArray<z.ZodString>;
192
+ disabled_at: z.ZodNullable<z.ZodISODateTime>;
193
+ created_at: z.ZodISODateTime;
194
+ }, z.core.$strip>;
195
+ type PrincipalResource = z.infer<typeof PrincipalResourceSchema>;
196
+ declare const PrincipalUpdateRequestSchema: z.ZodObject<{
197
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
198
+ "templates:read": "templates:read";
199
+ "templates:write": "templates:write";
200
+ "secrets:write": "secrets:write";
201
+ "workspaces:create": "workspaces:create";
202
+ "workspaces:read": "workspaces:read";
203
+ "workspaces:cancel": "workspaces:cancel";
204
+ "workspaces:purge": "workspaces:purge";
205
+ "workspaces:recover": "workspaces:recover";
206
+ "principals:admin": "principals:admin";
207
+ "keys:read": "keys:read";
208
+ "keys:write": "keys:write";
209
+ "workspaces:preserve": "workspaces:preserve";
210
+ "workspaces:restore": "workspaces:restore";
211
+ "checkpoints:read": "checkpoints:read";
212
+ "checkpoints:delete": "checkpoints:delete";
213
+ "outputs:read": "outputs:read";
214
+ "conversations:read": "conversations:read";
215
+ "conversations:write": "conversations:write";
216
+ "conversations:delete": "conversations:delete";
217
+ "services:relay": "services:relay";
218
+ "previews:open": "previews:open";
219
+ "display:view": "display:view";
220
+ "display:control": "display:control";
221
+ "attachments:write": "attachments:write";
222
+ "logs:read": "logs:read";
223
+ "network:read": "network:read";
224
+ "terminal:attach": "terminal:attach";
225
+ "terminal:read": "terminal:read";
226
+ admin: "admin";
227
+ }>>>;
228
+ templates: z.ZodOptional<z.ZodArray<z.ZodString>>;
229
+ disabled: z.ZodOptional<z.ZodBoolean>;
230
+ }, z.core.$strict>;
231
+ type PrincipalUpdateRequest = z.infer<typeof PrincipalUpdateRequestSchema>;
232
+ //#endregion
94
233
  //#region ../contracts/src/common/errors.d.ts
95
234
  declare const ERROR_CODES: {
96
235
  readonly "auth.invalid_key": 401;
97
236
  readonly "auth.missing_scope": 403;
98
237
  readonly "auth.disabled_principal": 403;
99
238
  readonly "principal.not_found": 404;
239
+ readonly "principal.name_conflict": 409;
100
240
  readonly "key.not_found": 404;
241
+ readonly "request.body_too_large": 413;
101
242
  readonly "validation.invalid": 400;
102
243
  readonly "idempotency.conflict": 409;
103
244
  readonly "capacity.queue_full": 429;
104
245
  readonly "capacity.waiters_full": 429;
105
246
  readonly "template.not_found": 404;
106
247
  readonly "template.version_not_found": 404;
248
+ readonly "template.version_immutable": 409;
107
249
  readonly "template.not_authorized": 403;
108
250
  readonly "workspace.not_found": 404;
109
251
  readonly "workspace.external_id_conflict": 409;
@@ -118,6 +260,10 @@ declare const ERROR_CODES: {
118
260
  readonly "workspace.persistence_not_enabled": 409;
119
261
  readonly "workspace.preserving": 409;
120
262
  readonly "checkpoint.not_found": 404;
263
+ readonly "checkpoint.unsupported": 409;
264
+ readonly "artifact.not_found": 404;
265
+ readonly "artifact.workspace_active": 409;
266
+ readonly "artifact.too_large": 413;
121
267
  readonly "checkpoint.not_ready": 409;
122
268
  readonly "checkpoint.none_ready": 409;
123
269
  readonly "checkpoint.corrupt": 409;
@@ -127,29 +273,108 @@ declare const ERROR_CODES: {
127
273
  readonly "restore.image_unavailable": 409;
128
274
  readonly "restore.incompatible": 409;
129
275
  readonly "resume.unsupported": 409;
276
+ readonly "conversation.not_found": 404;
130
277
  readonly "conversation.expired": 410;
131
278
  readonly "conversation.deleted": 410;
132
279
  readonly "operation.conflict": 409;
133
280
  readonly "source.not_allowed": 422;
134
281
  readonly "source.invalid_revision": 422;
135
282
  readonly "secret.unavailable": 503;
283
+ readonly "secret.not_found": 404;
136
284
  readonly "storage.capacity_exhausted": 507;
137
285
  readonly "relay.body_too_large": 413;
138
286
  readonly "relay.route_not_allowed": 422;
139
287
  readonly "relay.streaming_unsupported": 409;
140
288
  readonly "relay.deadline_exceeded": 504;
141
289
  readonly "relay.upstream_error": 502;
290
+ readonly "agent.interrupt_unsupported": 409;
142
291
  readonly "attachment.invalid": 400;
143
292
  readonly "attachment.too_large": 413;
144
293
  readonly "attachment.not_found": 404;
145
294
  readonly "attachment.conflict": 409;
146
295
  readonly "attachment.unsupported": 409;
147
296
  readonly "attachment.interrupted": 503;
297
+ readonly "maintenance.active": 503;
298
+ readonly "maintenance.timeout": 503;
299
+ readonly "backup.failed": 409;
300
+ readonly "journal.pending": 503;
301
+ readonly "account.purged": 409;
302
+ readonly "account.purge_pending": 503;
303
+ readonly "recovery.required": 503;
304
+ readonly "recovery.failed": 409;
148
305
  readonly "internal.error": 500;
149
306
  };
150
307
  type ErrorCode = keyof typeof ERROR_CODES;
151
308
  //#endregion
152
309
  //#region ../contracts/src/conversations/conversation.d.ts
310
+ declare const ConversationMessageInputSchema: z.ZodObject<{
311
+ message_id: z.ZodString;
312
+ role: z.ZodEnum<{
313
+ user: "user";
314
+ assistant: "assistant";
315
+ system: "system";
316
+ tool: "tool";
317
+ }>;
318
+ content: z.ZodString;
319
+ occurred_at: z.ZodISODateTime;
320
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
321
+ identity: z.ZodOptional<z.ZodNullable<z.ZodObject<{
322
+ schema: z.ZodLiteral<"pocketcoder.conversation/v2">;
323
+ authority: z.ZodEnum<{
324
+ external: "external";
325
+ generic: "generic";
326
+ }>;
327
+ conversation_id: z.ZodUUID;
328
+ request_id: z.ZodUUID;
329
+ turn_id: z.ZodUUID;
330
+ request_fingerprint: z.ZodString;
331
+ event_id: z.ZodUUID;
332
+ message_id: z.ZodString;
333
+ sequence: z.ZodNumber;
334
+ revision: z.ZodNumber;
335
+ fact: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
336
+ type: z.ZodLiteral<"intermediate">;
337
+ }, z.core.$strip>, z.ZodObject<{
338
+ type: z.ZodLiteral<"final_response">;
339
+ }, z.core.$strip>, z.ZodObject<{
340
+ type: z.ZodLiteral<"tool_only">;
341
+ }, z.core.$strip>, z.ZodObject<{
342
+ type: z.ZodLiteral<"activity_started">;
343
+ activity_id: z.ZodUUID;
344
+ kind: z.ZodEnum<{
345
+ workspace: "workspace";
346
+ tool: "tool";
347
+ attachment: "attachment";
348
+ retrieval: "retrieval";
349
+ }>;
350
+ label: z.ZodString;
351
+ started_at: z.ZodNullable<z.ZodISODateTime>;
352
+ action: z.ZodOptional<z.ZodString>;
353
+ subject: z.ZodOptional<z.ZodString>;
354
+ }, z.core.$strip>, z.ZodObject<{
355
+ type: z.ZodLiteral<"activity_finished">;
356
+ activity_id: z.ZodUUID;
357
+ ended_at: z.ZodNullable<z.ZodISODateTime>;
358
+ outcome: z.ZodEnum<{
359
+ failed: "failed";
360
+ canceled: "canceled";
361
+ completed: "completed";
362
+ interrupted: "interrupted";
363
+ }>;
364
+ }, z.core.$strip>, z.ZodObject<{
365
+ type: z.ZodLiteral<"turn_terminal">;
366
+ outcome: z.ZodEnum<{
367
+ failed: "failed";
368
+ canceled: "canceled";
369
+ completed: "completed";
370
+ interrupted: "interrupted";
371
+ lost: "lost";
372
+ }>;
373
+ reason: z.ZodOptional<z.ZodString>;
374
+ }, z.core.$strip>], "type">>;
375
+ }, z.core.$strip>>>;
376
+ }, z.core.$strip>;
377
+ type ConversationMessageInput = z.infer<typeof ConversationMessageInputSchema>;
153
378
  declare const ConversationMessageResourceSchema: z.ZodObject<{
154
379
  message_id: z.ZodString;
155
380
  role: z.ZodEnum<{
@@ -186,32 +411,35 @@ declare const ConversationMessageResourceSchema: z.ZodObject<{
186
411
  type: z.ZodLiteral<"activity_started">;
187
412
  activity_id: z.ZodUUID;
188
413
  kind: z.ZodEnum<{
414
+ workspace: "workspace";
189
415
  tool: "tool";
190
416
  attachment: "attachment";
191
- workspace: "workspace";
192
417
  retrieval: "retrieval";
193
418
  }>;
194
419
  label: z.ZodString;
195
420
  started_at: z.ZodNullable<z.ZodISODateTime>;
421
+ action: z.ZodOptional<z.ZodString>;
422
+ subject: z.ZodOptional<z.ZodString>;
196
423
  }, z.core.$strip>, z.ZodObject<{
197
424
  type: z.ZodLiteral<"activity_finished">;
198
425
  activity_id: z.ZodUUID;
199
426
  ended_at: z.ZodNullable<z.ZodISODateTime>;
200
427
  outcome: z.ZodEnum<{
201
- completed: "completed";
202
428
  failed: "failed";
203
- interrupted: "interrupted";
204
429
  canceled: "canceled";
430
+ completed: "completed";
431
+ interrupted: "interrupted";
205
432
  }>;
206
433
  }, z.core.$strip>, z.ZodObject<{
207
434
  type: z.ZodLiteral<"turn_terminal">;
208
435
  outcome: z.ZodEnum<{
209
- completed: "completed";
210
436
  failed: "failed";
211
- interrupted: "interrupted";
212
437
  canceled: "canceled";
438
+ completed: "completed";
439
+ interrupted: "interrupted";
213
440
  lost: "lost";
214
441
  }>;
442
+ reason: z.ZodOptional<z.ZodString>;
215
443
  }, z.core.$strip>], "type">>;
216
444
  }, z.core.$strip>>>;
217
445
  }, z.core.$strip>;
@@ -254,53 +482,104 @@ declare const ConversationMessageIdentitySchema: z.ZodObject<{
254
482
  type: z.ZodLiteral<"activity_started">;
255
483
  activity_id: z.ZodUUID;
256
484
  kind: z.ZodEnum<{
485
+ workspace: "workspace";
257
486
  tool: "tool";
258
487
  attachment: "attachment";
259
- workspace: "workspace";
260
488
  retrieval: "retrieval";
261
489
  }>;
262
490
  label: z.ZodString;
263
491
  started_at: z.ZodNullable<z.ZodISODateTime>;
492
+ action: z.ZodOptional<z.ZodString>;
493
+ subject: z.ZodOptional<z.ZodString>;
264
494
  }, z.core.$strip>, z.ZodObject<{
265
495
  type: z.ZodLiteral<"activity_finished">;
266
496
  activity_id: z.ZodUUID;
267
497
  ended_at: z.ZodNullable<z.ZodISODateTime>;
268
498
  outcome: z.ZodEnum<{
269
- completed: "completed";
270
499
  failed: "failed";
271
- interrupted: "interrupted";
272
500
  canceled: "canceled";
501
+ completed: "completed";
502
+ interrupted: "interrupted";
273
503
  }>;
274
504
  }, z.core.$strip>, z.ZodObject<{
275
505
  type: z.ZodLiteral<"turn_terminal">;
276
506
  outcome: z.ZodEnum<{
277
- completed: "completed";
278
507
  failed: "failed";
279
- interrupted: "interrupted";
280
508
  canceled: "canceled";
509
+ completed: "completed";
510
+ interrupted: "interrupted";
281
511
  lost: "lost";
282
512
  }>;
513
+ reason: z.ZodOptional<z.ZodString>;
283
514
  }, z.core.$strip>], "type">>;
284
515
  }, z.core.$strip>;
285
516
  type ConversationMessageIdentity = z.infer<typeof ConversationMessageIdentitySchema>;
286
517
  //#endregion
518
+ //#region ../contracts/src/displays/display.d.ts
519
+ declare const BrowserActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
520
+ action: z.ZodLiteral<"navigate">;
521
+ url: z.ZodString;
522
+ }, z.core.$strict>, z.ZodObject<{
523
+ action: z.ZodLiteral<"click">;
524
+ x: z.ZodNumber;
525
+ y: z.ZodNumber;
526
+ }, z.core.$strict>, z.ZodObject<{
527
+ action: z.ZodLiteral<"text">;
528
+ text: z.ZodString;
529
+ }, z.core.$strict>, z.ZodObject<{
530
+ action: z.ZodLiteral<"key">;
531
+ key: z.ZodEnum<{
532
+ Enter: "Enter";
533
+ Tab: "Tab";
534
+ Backspace: "Backspace";
535
+ Delete: "Delete";
536
+ Escape: "Escape";
537
+ ArrowLeft: "ArrowLeft";
538
+ ArrowRight: "ArrowRight";
539
+ ArrowUp: "ArrowUp";
540
+ ArrowDown: "ArrowDown";
541
+ Home: "Home";
542
+ End: "End";
543
+ PageUp: "PageUp";
544
+ PageDown: "PageDown";
545
+ }>;
546
+ }, z.core.$strict>, z.ZodObject<{
547
+ action: z.ZodLiteral<"scroll">;
548
+ x: z.ZodNumber;
549
+ y: z.ZodNumber;
550
+ deltaY: z.ZodNumber;
551
+ }, z.core.$strict>], "action">;
552
+ type BrowserAction = z.infer<typeof BrowserActionSchema>;
553
+ //#endregion
554
+ //#region ../contracts/src/displays/screenshot.d.ts
555
+ declare const ScreenshotResourceSchema: z.ZodObject<{
556
+ kind: z.ZodLiteral<"screenshot">;
557
+ id: z.ZodUUID;
558
+ workspace_id: z.ZodUUID;
559
+ content_type: z.ZodLiteral<"image/png">;
560
+ bytes: z.ZodNumber;
561
+ digest: z.ZodString;
562
+ expires_at: z.ZodISODateTime;
563
+ }, z.core.$strict>;
564
+ type ScreenshotResource = z.infer<typeof ScreenshotResourceSchema>;
565
+ //#endregion
287
566
  //#region ../contracts/src/network/network.d.ts
288
567
  declare const NetworkEventSchema: z.ZodObject<{
568
+ method: z.ZodDefault<z.ZodNullable<z.ZodString>>;
289
569
  path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
570
+ reason: z.ZodString;
290
571
  occurred_at: z.ZodISODateTime;
291
- decision: z.ZodEnum<{
292
- allow: "allow";
293
- deny: "deny";
294
- }>;
295
572
  transport: z.ZodEnum<{
296
573
  http: "http";
297
574
  https: "https";
298
575
  }>;
299
- host: z.ZodString;
300
576
  port: z.ZodNumber;
301
- method: z.ZodDefault<z.ZodNullable<z.ZodString>>;
577
+ decision: z.ZodEnum<{
578
+ allow: "allow";
579
+ deny: "deny";
580
+ }>;
581
+ host: z.ZodString;
302
582
  matched_rule: z.ZodDefault<z.ZodNullable<z.ZodString>>;
303
- reason: z.ZodString;
304
583
  seq: z.ZodNumber;
305
584
  workspace_id: z.ZodUUID;
306
585
  source_session_id: z.ZodUUID;
@@ -308,6 +587,52 @@ declare const NetworkEventSchema: z.ZodObject<{
308
587
  }, z.core.$strip>;
309
588
  type NetworkEvent = z.infer<typeof NetworkEventSchema>;
310
589
  //#endregion
590
+ //#region ../contracts/src/outputs/export-reference.d.ts
591
+ declare const ExportObjectReferenceSchema: z.ZodObject<{
592
+ objectId: z.ZodUUID;
593
+ objectVersion: z.ZodString;
594
+ name: z.ZodString;
595
+ sizeBytes: z.ZodNumber;
596
+ mediaType: z.ZodString;
597
+ digest: z.ZodString;
598
+ }, z.core.$strict>;
599
+ type ExportObjectReference = z.infer<typeof ExportObjectReferenceSchema>;
600
+ declare const WorkloadExportReferenceSchema: z.ZodObject<{
601
+ exportId: z.ZodUUID;
602
+ execution: z.ZodObject<{
603
+ workspaceId: z.ZodUUID;
604
+ incarnationId: z.ZodString;
605
+ owner: z.ZodEnum<{
606
+ process: "process";
607
+ "conversation-request": "conversation-request";
608
+ }>;
609
+ requestId: z.ZodUUID;
610
+ }, z.core.$strict>;
611
+ manifestDigest: z.ZodString;
612
+ completeness: z.ZodEnum<{
613
+ lost: "lost";
614
+ complete: "complete";
615
+ partial: "partial";
616
+ }>;
617
+ publication: z.ZodEnum<{
618
+ expired: "expired";
619
+ unavailable: "unavailable";
620
+ published: "published";
621
+ }>;
622
+ objects: z.ZodArray<z.ZodObject<{
623
+ objectId: z.ZodUUID;
624
+ objectVersion: z.ZodString;
625
+ name: z.ZodString;
626
+ sizeBytes: z.ZodNumber;
627
+ mediaType: z.ZodString;
628
+ digest: z.ZodString;
629
+ }, z.core.$strict>>;
630
+ errors: z.ZodArray<z.ZodString>;
631
+ publishedAt: z.ZodISODateTime;
632
+ expiresAt: z.ZodISODateTime;
633
+ }, z.core.$strict>;
634
+ type WorkloadExportReference = z.infer<typeof WorkloadExportReferenceSchema>;
635
+ //#endregion
311
636
  //#region ../contracts/src/persistence/persistence.d.ts
312
637
  declare const CHECKPOINT_STATES: readonly ["creating", "ready", "failed", "deleting", "deleted"];
313
638
  type CheckpointState = (typeof CHECKPOINT_STATES)[number];
@@ -321,11 +646,11 @@ declare const CheckpointResourceSchema: z.ZodObject<{
321
646
  id: z.ZodUUID;
322
647
  workspace_id: z.ZodUUID;
323
648
  state: z.ZodEnum<{
649
+ deleted: "deleted";
324
650
  creating: "creating";
325
651
  ready: "ready";
326
652
  failed: "failed";
327
653
  deleting: "deleting";
328
- deleted: "deleted";
329
654
  }>;
330
655
  reason_code: z.ZodNullable<z.ZodString>;
331
656
  template: z.ZodObject<{
@@ -339,9 +664,9 @@ declare const CheckpointResourceSchema: z.ZodObject<{
339
664
  file_count: z.ZodNullable<z.ZodNumber>;
340
665
  mounts: z.ZodArray<z.ZodString>;
341
666
  conversation_restore: z.ZodEnum<{
667
+ unknown: "unknown";
342
668
  supported: "supported";
343
669
  filesystem_only: "filesystem_only";
344
- unknown: "unknown";
345
670
  }>;
346
671
  label: z.ZodNullable<z.ZodString>;
347
672
  created_at: z.ZodISODateTime;
@@ -352,8 +677,8 @@ type CheckpointResource = z.infer<typeof CheckpointResourceSchema>;
352
677
  declare const OperationResourceSchema: z.ZodObject<{
353
678
  id: z.ZodUUID;
354
679
  kind: z.ZodEnum<{
355
- restore: "restore";
356
680
  preserve: "preserve";
681
+ restore: "restore";
357
682
  verify: "verify";
358
683
  delete: "delete";
359
684
  purge: "purge";
@@ -385,6 +710,17 @@ declare const RestoreRequestSchema: z.ZodObject<{
385
710
  }, z.core.$strip>;
386
711
  type RestoreRequest = z.infer<typeof RestoreRequestSchema>;
387
712
  //#endregion
713
+ //#region ../contracts/src/previews/view-session.d.ts
714
+ declare const ViewSessionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
715
+ mode: z.ZodLiteral<"local">;
716
+ }, z.core.$strict>, z.ZodObject<{
717
+ mode: z.ZodLiteral<"top_level">;
718
+ }, z.core.$strict>, z.ZodObject<{
719
+ mode: z.ZodLiteral<"embedded">;
720
+ parentOrigin: z.ZodString;
721
+ }, z.core.$strict>], "mode">;
722
+ type ViewSessionOptions = z.infer<typeof ViewSessionSchema>;
723
+ //#endregion
388
724
  //#region ../contracts/src/protocol/api.d.ts
389
725
  declare const OutputResourceSchema: z.ZodObject<{
390
726
  seq: z.ZodNumber;
@@ -399,6 +735,13 @@ declare const WORKSPACE_STATES: readonly ["queued", "provisioning", "connected",
399
735
  type WorkspaceState = (typeof WORKSPACE_STATES)[number];
400
736
  declare const AGENT_STATES: readonly ["unknown", "running", "stable"];
401
737
  type AgentState = (typeof AGENT_STATES)[number];
738
+ declare const AgentInterruptResponseSchema: z.ZodObject<{
739
+ status: z.ZodEnum<{
740
+ requested: "requested";
741
+ idle: "idle";
742
+ }>;
743
+ }, z.core.$strip>;
744
+ type AgentInterruptResponse = z.infer<typeof AgentInterruptResponseSchema>;
402
745
  declare const WorkspaceCreateRequestSchema: z.ZodObject<{
403
746
  external_id: z.ZodString;
404
747
  template: z.ZodObject<{
@@ -422,20 +765,31 @@ declare const WorkspaceResourceSchema: z.ZodObject<{
422
765
  version: z.ZodString;
423
766
  digest: z.ZodString;
424
767
  }, z.core.$strip>;
768
+ agent: z.ZodNullable<z.ZodObject<{
769
+ type: z.ZodString;
770
+ model: z.ZodNullable<z.ZodString>;
771
+ }, z.core.$strip>>;
425
772
  state: z.ZodEnum<{
773
+ ready: "ready";
774
+ failed: "failed";
775
+ succeeded: "succeeded";
426
776
  queued: "queued";
427
777
  provisioning: "provisioning";
428
778
  connected: "connected";
429
- ready: "ready";
430
779
  preserving: "preserving";
431
780
  terminating: "terminating";
432
- succeeded: "succeeded";
433
- failed: "failed";
434
781
  canceled: "canceled";
435
782
  expired: "expired";
436
783
  preserved: "preserved";
437
784
  }>;
438
785
  reason_code: z.ZodNullable<z.ZodEnum<{
786
+ admission_global_capacity: "admission_global_capacity";
787
+ admission_principal_capacity: "admission_principal_capacity";
788
+ admission_template_capacity: "admission_template_capacity";
789
+ admission_policy_global_capacity: "admission_policy_global_capacity";
790
+ admission_actor_capacity: "admission_actor_capacity";
791
+ admission_denied: "admission_denied";
792
+ admission_unavailable: "admission_unavailable";
439
793
  child_exit_success: "child_exit_success";
440
794
  child_exit_failure: "child_exit_failure";
441
795
  setup_failed: "setup_failed";
@@ -523,6 +877,13 @@ declare const WorkspaceResourceSchema: z.ZodObject<{
523
877
  outputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
524
878
  failure: z.ZodNullable<z.ZodObject<{
525
879
  reason_code: z.ZodEnum<{
880
+ admission_global_capacity: "admission_global_capacity";
881
+ admission_principal_capacity: "admission_principal_capacity";
882
+ admission_template_capacity: "admission_template_capacity";
883
+ admission_policy_global_capacity: "admission_policy_global_capacity";
884
+ admission_actor_capacity: "admission_actor_capacity";
885
+ admission_denied: "admission_denied";
886
+ admission_unavailable: "admission_unavailable";
526
887
  child_exit_success: "child_exit_success";
527
888
  child_exit_failure: "child_exit_failure";
528
889
  setup_failed: "setup_failed";
@@ -562,6 +923,10 @@ declare const TemplateListItemSchema: z.ZodObject<{
562
923
  name: z.ZodString;
563
924
  version: z.ZodString;
564
925
  digest: z.ZodString;
926
+ agent: z.ZodNullable<z.ZodObject<{
927
+ type: z.ZodString;
928
+ model: z.ZodNullable<z.ZodString>;
929
+ }, z.core.$strip>>;
565
930
  description: z.ZodOptional<z.ZodString>;
566
931
  status: z.ZodEnum<{
567
932
  active: "active";
@@ -580,6 +945,1262 @@ declare const LogChunkSchema: z.ZodObject<{
580
945
  }, z.core.$strip>;
581
946
  type LogChunk = z.infer<typeof LogChunkSchema>;
582
947
  //#endregion
948
+ //#region ../contracts/src/templates/workload-input-schema.d.ts
949
+ type WorkloadInputProperty = {
950
+ type: "string" | "number" | "integer" | "boolean" | "null";
951
+ } | {
952
+ type: "array";
953
+ items: WorkloadInputProperty;
954
+ } | WorkloadInputObject;
955
+ interface WorkloadInputObject {
956
+ type: "object";
957
+ properties: Record<string, WorkloadInputProperty>;
958
+ required: string[];
959
+ additionalProperties: false;
960
+ }
961
+ //#endregion
962
+ //#region ../contracts/src/templates/workload-template.d.ts
963
+ declare const WorkloadOperationSchema: z.ZodObject<{
964
+ adapter: z.ZodString;
965
+ inputSchema: z.ZodObject<{
966
+ type: z.ZodLiteral<"object">;
967
+ properties: z.ZodRecord<z.ZodString, z.ZodType<WorkloadInputProperty, unknown, z.core.$ZodTypeInternals<WorkloadInputProperty, unknown>>>;
968
+ required: z.ZodDefault<z.ZodArray<z.ZodString>>;
969
+ additionalProperties: z.ZodLiteral<false>;
970
+ }, z.core.$strict>;
971
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
972
+ "ready-without-task": "ready-without-task";
973
+ "live-inputs": "live-inputs";
974
+ "immutable-inputs": "immutable-inputs";
975
+ "serial-operations": "serial-operations";
976
+ "retained-exports": "retained-exports";
977
+ "explicit-start": "explicit-start";
978
+ "exact-exit": "exact-exit";
979
+ "targeted-cancel": "targeted-cancel";
980
+ "stop-before-export": "stop-before-export";
981
+ "request-lookup": "request-lookup";
982
+ "deduplicated-accept": "deduplicated-accept";
983
+ "explicit-publication": "explicit-publication";
984
+ "workspace-services": "workspace-services";
985
+ "revocable-preview-grants": "revocable-preview-grants";
986
+ "workspace-cancel": "workspace-cancel";
987
+ "unknown-outcome": "unknown-outcome";
988
+ }>>;
989
+ outputRoots: z.ZodArray<z.ZodString>;
990
+ }, z.core.$strict>;
991
+ type WorkloadOperation = z.infer<typeof WorkloadOperationSchema>;
992
+ declare const WorkloadTemplateBaseSchema: z.ZodObject<{
993
+ apiVersion: z.ZodLiteral<"pocketcoder.dev/v1">;
994
+ kind: z.ZodLiteral<"Template">;
995
+ metadata: z.ZodObject<{
996
+ name: z.ZodString;
997
+ description: z.ZodOptional<z.ZodString>;
998
+ }, z.core.$strict>;
999
+ spec: z.ZodObject<{
1000
+ version: z.ZodString;
1001
+ image: z.ZodString;
1002
+ runtime: z.ZodObject<{
1003
+ digest: z.ZodString;
1004
+ protocol: z.ZodLiteral<"pocketcoder.workload/v1">;
1005
+ }, z.core.$strict>;
1006
+ profile: z.ZodEnum<{
1007
+ "finite-process": "finite-process";
1008
+ "cloud-interactive": "cloud-interactive";
1009
+ service: "service";
1010
+ }>;
1011
+ adapters: z.ZodRecord<z.ZodString, z.ZodObject<{
1012
+ kind: z.ZodEnum<{
1013
+ agentapi: "agentapi";
1014
+ service: "service";
1015
+ process: "process";
1016
+ pi: "pi";
1017
+ }>;
1018
+ digest: z.ZodString;
1019
+ protocol: z.ZodString;
1020
+ command: z.ZodOptional<z.ZodArray<z.ZodString>>;
1021
+ cwd: z.ZodOptional<z.ZodString>;
1022
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1023
+ service: z.ZodOptional<z.ZodString>;
1024
+ }, z.core.$strict>>;
1025
+ operations: z.ZodRecord<z.ZodString, z.ZodObject<{
1026
+ adapter: z.ZodString;
1027
+ inputSchema: z.ZodObject<{
1028
+ type: z.ZodLiteral<"object">;
1029
+ properties: z.ZodRecord<z.ZodString, z.ZodType<WorkloadInputProperty, unknown, z.core.$ZodTypeInternals<WorkloadInputProperty, unknown>>>;
1030
+ required: z.ZodDefault<z.ZodArray<z.ZodString>>;
1031
+ additionalProperties: z.ZodLiteral<false>;
1032
+ }, z.core.$strict>;
1033
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1034
+ "ready-without-task": "ready-without-task";
1035
+ "live-inputs": "live-inputs";
1036
+ "immutable-inputs": "immutable-inputs";
1037
+ "serial-operations": "serial-operations";
1038
+ "retained-exports": "retained-exports";
1039
+ "explicit-start": "explicit-start";
1040
+ "exact-exit": "exact-exit";
1041
+ "targeted-cancel": "targeted-cancel";
1042
+ "stop-before-export": "stop-before-export";
1043
+ "request-lookup": "request-lookup";
1044
+ "deduplicated-accept": "deduplicated-accept";
1045
+ "explicit-publication": "explicit-publication";
1046
+ "workspace-services": "workspace-services";
1047
+ "revocable-preview-grants": "revocable-preview-grants";
1048
+ "workspace-cancel": "workspace-cancel";
1049
+ "unknown-outcome": "unknown-outcome";
1050
+ }>>;
1051
+ outputRoots: z.ZodArray<z.ZodString>;
1052
+ }, z.core.$strict>>;
1053
+ services: z.ZodRecord<z.ZodString, z.ZodObject<{
1054
+ baseUrl: z.ZodString;
1055
+ required: z.ZodDefault<z.ZodBoolean>;
1056
+ healthPath: z.ZodDefault<z.ZodString>;
1057
+ routes: z.ZodArray<z.ZodObject<{
1058
+ method: z.ZodEnum<{
1059
+ POST: "POST";
1060
+ DELETE: "DELETE";
1061
+ GET: "GET";
1062
+ PUT: "PUT";
1063
+ PATCH: "PATCH";
1064
+ }>;
1065
+ path: z.ZodString;
1066
+ query: z.ZodDefault<z.ZodArray<z.ZodString>>;
1067
+ responseMode: z.ZodDefault<z.ZodEnum<{
1068
+ buffered: "buffered";
1069
+ stream: "stream";
1070
+ }>>;
1071
+ maxRequestBytes: z.ZodDefault<z.ZodNumber>;
1072
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
1073
+ deadlineSeconds: z.ZodDefault<z.ZodNumber>;
1074
+ }, z.core.$strip>>;
1075
+ process: z.ZodOptional<z.ZodObject<{
1076
+ command: z.ZodArray<z.ZodString>;
1077
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1078
+ cwd: z.ZodOptional<z.ZodString>;
1079
+ }, z.core.$strict>>;
1080
+ }, z.core.$strict>>;
1081
+ previews: z.ZodRecord<z.ZodString, z.ZodObject<{
1082
+ port: z.ZodNumber;
1083
+ }, z.core.$strict>>;
1084
+ credentialSlots: z.ZodRecord<z.ZodString, z.ZodObject<{
1085
+ policyRef: z.ZodString;
1086
+ policyVersion: z.ZodString;
1087
+ binding: z.ZodEnum<{
1088
+ "fixed-scope": "fixed-scope";
1089
+ "post-create-grant": "post-create-grant";
1090
+ }>;
1091
+ delivery: z.ZodLiteral<"workspace-expiring-file">;
1092
+ maxLeaseSeconds: z.ZodNumber;
1093
+ }, z.core.$strict>>;
1094
+ resources: z.ZodObject<{
1095
+ cpu: z.ZodString;
1096
+ memory: z.ZodString;
1097
+ ephemeralStorage: z.ZodOptional<z.ZodString>;
1098
+ }, z.core.$strict>;
1099
+ network: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1100
+ mode: z.ZodLiteral<"unrestricted">;
1101
+ }, z.core.$strip>, z.ZodObject<{
1102
+ mode: z.ZodLiteral<"restricted">;
1103
+ allow: z.ZodDefault<z.ZodArray<z.ZodObject<{
1104
+ domain: z.ZodString;
1105
+ ports: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
1106
+ allowPrivate: z.ZodDefault<z.ZodBoolean>;
1107
+ }, z.core.$strip>>>;
1108
+ }, z.core.$strip>], "mode">>;
1109
+ security: z.ZodObject<{
1110
+ uid: z.ZodDefault<z.ZodNumber>;
1111
+ gid: z.ZodDefault<z.ZodNumber>;
1112
+ readOnlyRoot: z.ZodDefault<z.ZodBoolean>;
1113
+ writableMemoryPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
1114
+ dropCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
1115
+ allowPrivilegeEscalation: z.ZodDefault<z.ZodLiteral<false>>;
1116
+ seccomp: z.ZodDefault<z.ZodLiteral<"RuntimeDefault">>;
1117
+ }, z.core.$strict>;
1118
+ limits: z.ZodObject<{
1119
+ deadlineSeconds: z.ZodNumber;
1120
+ finalizationSeconds: z.ZodNumber;
1121
+ inputFileBytes: z.ZodNumber;
1122
+ stagedInputBytes: z.ZodNumber;
1123
+ inputFiles: z.ZodNumber;
1124
+ inFlightTransfers: z.ZodNumber;
1125
+ exportBytes: z.ZodNumber;
1126
+ exportFiles: z.ZodNumber;
1127
+ unreferencedInputRetentionSeconds: z.ZodNumber;
1128
+ exportRetentionSeconds: z.ZodNumber;
1129
+ }, z.core.$strict>;
1130
+ lifecycle: z.ZodOptional<z.ZodObject<{
1131
+ persistence: z.ZodPrefault<z.ZodObject<{
1132
+ mounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
1133
+ name: z.ZodString;
1134
+ target: z.ZodString;
1135
+ maxBytes: z.ZodNumber;
1136
+ maxFiles: z.ZodNumber;
1137
+ }, z.core.$strip>>>;
1138
+ conversationRestore: z.ZodDefault<z.ZodEnum<{
1139
+ unknown: "unknown";
1140
+ supported: "supported";
1141
+ filesystem_only: "filesystem_only";
1142
+ }>>;
1143
+ conversationRetention: z.ZodDefault<z.ZodString>;
1144
+ sessionCompatibility: z.ZodOptional<z.ZodString>;
1145
+ checkpoint: z.ZodPrefault<z.ZodObject<{
1146
+ onIdle: z.ZodDefault<z.ZodEnum<{
1147
+ preserve: "preserve";
1148
+ destroy: "destroy";
1149
+ }>>;
1150
+ onDeadline: z.ZodDefault<z.ZodEnum<{
1151
+ preserve: "preserve";
1152
+ destroy: "destroy";
1153
+ }>>;
1154
+ onCleanExit: z.ZodDefault<z.ZodEnum<{
1155
+ preserve: "preserve";
1156
+ destroy: "destroy";
1157
+ }>>;
1158
+ onFailure: z.ZodDefault<z.ZodEnum<{
1159
+ preserve: "preserve";
1160
+ destroy: "destroy";
1161
+ "retain-for-recovery": "retain-for-recovery";
1162
+ }>>;
1163
+ retention: z.ZodDefault<z.ZodString>;
1164
+ }, z.core.$strip>>;
1165
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1166
+ name: z.ZodString;
1167
+ mount: z.ZodString;
1168
+ pattern: z.ZodString;
1169
+ maxBytes: z.ZodDefault<z.ZodNumber>;
1170
+ }, z.core.$strip>>>;
1171
+ }, z.core.$strip>>;
1172
+ checkpointHook: z.ZodOptional<z.ZodObject<{
1173
+ command: z.ZodArray<z.ZodString>;
1174
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1175
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1176
+ cwd: z.ZodOptional<z.ZodString>;
1177
+ }, z.core.$strip>>;
1178
+ timeouts: z.ZodOptional<z.ZodObject<{
1179
+ start: z.ZodDefault<z.ZodString>;
1180
+ maxAge: z.ZodDefault<z.ZodString>;
1181
+ idle: z.ZodDefault<z.ZodString>;
1182
+ disconnectGrace: z.ZodDefault<z.ZodString>;
1183
+ terminateGrace: z.ZodDefault<z.ZodString>;
1184
+ }, z.core.$strip>>;
1185
+ maxLaunchInputBytes: z.ZodDefault<z.ZodNumber>;
1186
+ }, z.core.$strict>>;
1187
+ }, z.core.$strict>;
1188
+ }, z.core.$strict>;
1189
+ type WorkloadTemplate = z.infer<typeof WorkloadTemplateBaseSchema>;
1190
+ declare const WorkloadTemplateSnapshotSchema: z.ZodObject<{
1191
+ format: z.ZodLiteral<"pocketcoder.dev/v1">;
1192
+ name: z.ZodString;
1193
+ version: z.ZodString;
1194
+ digest: z.ZodString;
1195
+ manifest: z.ZodObject<{
1196
+ apiVersion: z.ZodLiteral<"pocketcoder.dev/v1">;
1197
+ kind: z.ZodLiteral<"Template">;
1198
+ metadata: z.ZodObject<{
1199
+ name: z.ZodString;
1200
+ description: z.ZodOptional<z.ZodString>;
1201
+ }, z.core.$strict>;
1202
+ spec: z.ZodObject<{
1203
+ version: z.ZodString;
1204
+ image: z.ZodString;
1205
+ runtime: z.ZodObject<{
1206
+ digest: z.ZodString;
1207
+ protocol: z.ZodLiteral<"pocketcoder.workload/v1">;
1208
+ }, z.core.$strict>;
1209
+ profile: z.ZodEnum<{
1210
+ "finite-process": "finite-process";
1211
+ "cloud-interactive": "cloud-interactive";
1212
+ service: "service";
1213
+ }>;
1214
+ adapters: z.ZodRecord<z.ZodString, z.ZodObject<{
1215
+ kind: z.ZodEnum<{
1216
+ agentapi: "agentapi";
1217
+ service: "service";
1218
+ process: "process";
1219
+ pi: "pi";
1220
+ }>;
1221
+ digest: z.ZodString;
1222
+ protocol: z.ZodString;
1223
+ command: z.ZodOptional<z.ZodArray<z.ZodString>>;
1224
+ cwd: z.ZodOptional<z.ZodString>;
1225
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1226
+ service: z.ZodOptional<z.ZodString>;
1227
+ }, z.core.$strict>>;
1228
+ operations: z.ZodRecord<z.ZodString, z.ZodObject<{
1229
+ adapter: z.ZodString;
1230
+ inputSchema: z.ZodObject<{
1231
+ type: z.ZodLiteral<"object">;
1232
+ properties: z.ZodRecord<z.ZodString, z.ZodType<WorkloadInputProperty, unknown, z.core.$ZodTypeInternals<WorkloadInputProperty, unknown>>>;
1233
+ required: z.ZodDefault<z.ZodArray<z.ZodString>>;
1234
+ additionalProperties: z.ZodLiteral<false>;
1235
+ }, z.core.$strict>;
1236
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1237
+ "ready-without-task": "ready-without-task";
1238
+ "live-inputs": "live-inputs";
1239
+ "immutable-inputs": "immutable-inputs";
1240
+ "serial-operations": "serial-operations";
1241
+ "retained-exports": "retained-exports";
1242
+ "explicit-start": "explicit-start";
1243
+ "exact-exit": "exact-exit";
1244
+ "targeted-cancel": "targeted-cancel";
1245
+ "stop-before-export": "stop-before-export";
1246
+ "request-lookup": "request-lookup";
1247
+ "deduplicated-accept": "deduplicated-accept";
1248
+ "explicit-publication": "explicit-publication";
1249
+ "workspace-services": "workspace-services";
1250
+ "revocable-preview-grants": "revocable-preview-grants";
1251
+ "workspace-cancel": "workspace-cancel";
1252
+ "unknown-outcome": "unknown-outcome";
1253
+ }>>;
1254
+ outputRoots: z.ZodArray<z.ZodString>;
1255
+ }, z.core.$strict>>;
1256
+ services: z.ZodRecord<z.ZodString, z.ZodObject<{
1257
+ baseUrl: z.ZodString;
1258
+ required: z.ZodDefault<z.ZodBoolean>;
1259
+ healthPath: z.ZodDefault<z.ZodString>;
1260
+ routes: z.ZodArray<z.ZodObject<{
1261
+ method: z.ZodEnum<{
1262
+ POST: "POST";
1263
+ DELETE: "DELETE";
1264
+ GET: "GET";
1265
+ PUT: "PUT";
1266
+ PATCH: "PATCH";
1267
+ }>;
1268
+ path: z.ZodString;
1269
+ query: z.ZodDefault<z.ZodArray<z.ZodString>>;
1270
+ responseMode: z.ZodDefault<z.ZodEnum<{
1271
+ buffered: "buffered";
1272
+ stream: "stream";
1273
+ }>>;
1274
+ maxRequestBytes: z.ZodDefault<z.ZodNumber>;
1275
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
1276
+ deadlineSeconds: z.ZodDefault<z.ZodNumber>;
1277
+ }, z.core.$strip>>;
1278
+ process: z.ZodOptional<z.ZodObject<{
1279
+ command: z.ZodArray<z.ZodString>;
1280
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1281
+ cwd: z.ZodOptional<z.ZodString>;
1282
+ }, z.core.$strict>>;
1283
+ }, z.core.$strict>>;
1284
+ previews: z.ZodRecord<z.ZodString, z.ZodObject<{
1285
+ port: z.ZodNumber;
1286
+ }, z.core.$strict>>;
1287
+ credentialSlots: z.ZodRecord<z.ZodString, z.ZodObject<{
1288
+ policyRef: z.ZodString;
1289
+ policyVersion: z.ZodString;
1290
+ binding: z.ZodEnum<{
1291
+ "fixed-scope": "fixed-scope";
1292
+ "post-create-grant": "post-create-grant";
1293
+ }>;
1294
+ delivery: z.ZodLiteral<"workspace-expiring-file">;
1295
+ maxLeaseSeconds: z.ZodNumber;
1296
+ }, z.core.$strict>>;
1297
+ resources: z.ZodObject<{
1298
+ cpu: z.ZodString;
1299
+ memory: z.ZodString;
1300
+ ephemeralStorage: z.ZodOptional<z.ZodString>;
1301
+ }, z.core.$strict>;
1302
+ network: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1303
+ mode: z.ZodLiteral<"unrestricted">;
1304
+ }, z.core.$strip>, z.ZodObject<{
1305
+ mode: z.ZodLiteral<"restricted">;
1306
+ allow: z.ZodDefault<z.ZodArray<z.ZodObject<{
1307
+ domain: z.ZodString;
1308
+ ports: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
1309
+ allowPrivate: z.ZodDefault<z.ZodBoolean>;
1310
+ }, z.core.$strip>>>;
1311
+ }, z.core.$strip>], "mode">>;
1312
+ security: z.ZodObject<{
1313
+ uid: z.ZodDefault<z.ZodNumber>;
1314
+ gid: z.ZodDefault<z.ZodNumber>;
1315
+ readOnlyRoot: z.ZodDefault<z.ZodBoolean>;
1316
+ writableMemoryPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
1317
+ dropCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
1318
+ allowPrivilegeEscalation: z.ZodDefault<z.ZodLiteral<false>>;
1319
+ seccomp: z.ZodDefault<z.ZodLiteral<"RuntimeDefault">>;
1320
+ }, z.core.$strict>;
1321
+ limits: z.ZodObject<{
1322
+ deadlineSeconds: z.ZodNumber;
1323
+ finalizationSeconds: z.ZodNumber;
1324
+ inputFileBytes: z.ZodNumber;
1325
+ stagedInputBytes: z.ZodNumber;
1326
+ inputFiles: z.ZodNumber;
1327
+ inFlightTransfers: z.ZodNumber;
1328
+ exportBytes: z.ZodNumber;
1329
+ exportFiles: z.ZodNumber;
1330
+ unreferencedInputRetentionSeconds: z.ZodNumber;
1331
+ exportRetentionSeconds: z.ZodNumber;
1332
+ }, z.core.$strict>;
1333
+ lifecycle: z.ZodOptional<z.ZodObject<{
1334
+ persistence: z.ZodPrefault<z.ZodObject<{
1335
+ mounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
1336
+ name: z.ZodString;
1337
+ target: z.ZodString;
1338
+ maxBytes: z.ZodNumber;
1339
+ maxFiles: z.ZodNumber;
1340
+ }, z.core.$strip>>>;
1341
+ conversationRestore: z.ZodDefault<z.ZodEnum<{
1342
+ unknown: "unknown";
1343
+ supported: "supported";
1344
+ filesystem_only: "filesystem_only";
1345
+ }>>;
1346
+ conversationRetention: z.ZodDefault<z.ZodString>;
1347
+ sessionCompatibility: z.ZodOptional<z.ZodString>;
1348
+ checkpoint: z.ZodPrefault<z.ZodObject<{
1349
+ onIdle: z.ZodDefault<z.ZodEnum<{
1350
+ preserve: "preserve";
1351
+ destroy: "destroy";
1352
+ }>>;
1353
+ onDeadline: z.ZodDefault<z.ZodEnum<{
1354
+ preserve: "preserve";
1355
+ destroy: "destroy";
1356
+ }>>;
1357
+ onCleanExit: z.ZodDefault<z.ZodEnum<{
1358
+ preserve: "preserve";
1359
+ destroy: "destroy";
1360
+ }>>;
1361
+ onFailure: z.ZodDefault<z.ZodEnum<{
1362
+ preserve: "preserve";
1363
+ destroy: "destroy";
1364
+ "retain-for-recovery": "retain-for-recovery";
1365
+ }>>;
1366
+ retention: z.ZodDefault<z.ZodString>;
1367
+ }, z.core.$strip>>;
1368
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1369
+ name: z.ZodString;
1370
+ mount: z.ZodString;
1371
+ pattern: z.ZodString;
1372
+ maxBytes: z.ZodDefault<z.ZodNumber>;
1373
+ }, z.core.$strip>>>;
1374
+ }, z.core.$strip>>;
1375
+ checkpointHook: z.ZodOptional<z.ZodObject<{
1376
+ command: z.ZodArray<z.ZodString>;
1377
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1378
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1379
+ cwd: z.ZodOptional<z.ZodString>;
1380
+ }, z.core.$strip>>;
1381
+ timeouts: z.ZodOptional<z.ZodObject<{
1382
+ start: z.ZodDefault<z.ZodString>;
1383
+ maxAge: z.ZodDefault<z.ZodString>;
1384
+ idle: z.ZodDefault<z.ZodString>;
1385
+ disconnectGrace: z.ZodDefault<z.ZodString>;
1386
+ terminateGrace: z.ZodDefault<z.ZodString>;
1387
+ }, z.core.$strip>>;
1388
+ maxLaunchInputBytes: z.ZodDefault<z.ZodNumber>;
1389
+ }, z.core.$strict>>;
1390
+ }, z.core.$strict>;
1391
+ }, z.core.$strict>;
1392
+ }, z.core.$strict>;
1393
+ type WorkloadTemplateSnapshot = z.infer<typeof WorkloadTemplateSnapshotSchema>;
1394
+ //#endregion
1395
+ //#region ../contracts/src/secrets/credential-slot.d.ts
1396
+ declare const CredentialSlotSchema: z.ZodObject<{
1397
+ policyRef: z.ZodString;
1398
+ policyVersion: z.ZodString;
1399
+ binding: z.ZodEnum<{
1400
+ "fixed-scope": "fixed-scope";
1401
+ "post-create-grant": "post-create-grant";
1402
+ }>;
1403
+ delivery: z.ZodLiteral<"workspace-expiring-file">;
1404
+ maxLeaseSeconds: z.ZodNumber;
1405
+ }, z.core.$strict>;
1406
+ type CredentialSlot = z.infer<typeof CredentialSlotSchema>;
1407
+ //#endregion
1408
+ //#region ../contracts/src/secrets/secret.d.ts
1409
+ declare const SecretPutRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1410
+ type: z.ZodLiteral<"setup-issuer">;
1411
+ value: z.ZodObject<{
1412
+ url: z.ZodURL;
1413
+ authorization: z.ZodString;
1414
+ policy: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1415
+ }, z.core.$strict>;
1416
+ }, z.core.$strict>, z.ZodObject<{
1417
+ type: z.ZodLiteral<"runtime-issuer">;
1418
+ value: z.ZodObject<{
1419
+ url: z.ZodURL;
1420
+ authorization: z.ZodString;
1421
+ policy: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1422
+ }, z.core.$strict>;
1423
+ }, z.core.$strict>, z.ZodObject<{
1424
+ type: z.ZodLiteral<"registry">;
1425
+ value: z.ZodObject<{
1426
+ server: z.ZodString;
1427
+ username: z.ZodString;
1428
+ password: z.ZodString;
1429
+ }, z.core.$strict>;
1430
+ }, z.core.$strict>], "type">;
1431
+ type SecretPutRequest = z.infer<typeof SecretPutRequestSchema>;
1432
+ declare const SecretResourceSchema: z.ZodObject<{
1433
+ name: z.ZodString;
1434
+ type: z.ZodEnum<{
1435
+ "setup-issuer": "setup-issuer";
1436
+ "runtime-issuer": "runtime-issuer";
1437
+ registry: "registry";
1438
+ }>;
1439
+ updated_at: z.ZodISODateTime;
1440
+ retired_at: z.ZodNullable<z.ZodISODateTime>;
1441
+ }, z.core.$strict>;
1442
+ type SecretResource = z.infer<typeof SecretResourceSchema>;
1443
+ //#endregion
1444
+ //#region ../contracts/src/templates/template-alpha-schema.d.ts
1445
+ declare const HarnessSchema: z.ZodObject<{
1446
+ command: z.ZodArray<z.ZodString>;
1447
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1448
+ cwd: z.ZodOptional<z.ZodString>;
1449
+ }, z.core.$strip>;
1450
+ declare const AgentSchema: z.ZodObject<{
1451
+ command: z.ZodArray<z.ZodString>;
1452
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1453
+ cwd: z.ZodOptional<z.ZodString>;
1454
+ model: z.ZodOptional<z.ZodString>;
1455
+ type: z.ZodDefault<z.ZodString>;
1456
+ transport: z.ZodDefault<z.ZodEnum<{
1457
+ pty: "pty";
1458
+ acp: "acp";
1459
+ }>>;
1460
+ termWidth: z.ZodOptional<z.ZodNumber>;
1461
+ stateFile: z.ZodOptional<z.ZodString>;
1462
+ interruptKeys: z.ZodOptional<z.ZodString>;
1463
+ }, z.core.$strip>;
1464
+ declare const ServiceSchema: z.ZodObject<{
1465
+ baseUrl: z.ZodString;
1466
+ required: z.ZodDefault<z.ZodBoolean>;
1467
+ healthPath: z.ZodDefault<z.ZodString>;
1468
+ routes: z.ZodArray<z.ZodObject<{
1469
+ method: z.ZodEnum<{
1470
+ POST: "POST";
1471
+ DELETE: "DELETE";
1472
+ GET: "GET";
1473
+ PUT: "PUT";
1474
+ PATCH: "PATCH";
1475
+ }>;
1476
+ path: z.ZodString;
1477
+ query: z.ZodDefault<z.ZodArray<z.ZodString>>;
1478
+ responseMode: z.ZodDefault<z.ZodEnum<{
1479
+ buffered: "buffered";
1480
+ stream: "stream";
1481
+ }>>;
1482
+ maxRequestBytes: z.ZodDefault<z.ZodNumber>;
1483
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
1484
+ deadlineSeconds: z.ZodDefault<z.ZodNumber>;
1485
+ }, z.core.$strip>>;
1486
+ }, z.core.$strip>;
1487
+ declare const CheckpointHookSchema: z.ZodObject<{
1488
+ command: z.ZodArray<z.ZodString>;
1489
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1490
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1491
+ cwd: z.ZodOptional<z.ZodString>;
1492
+ }, z.core.$strip>;
1493
+ declare const TemplateSpecInputSchema: z.ZodObject<{
1494
+ version: z.ZodString;
1495
+ image: z.ZodString;
1496
+ imagePullSecret: z.ZodOptional<z.ZodString>;
1497
+ command: z.ZodDefault<z.ZodArray<z.ZodString>>;
1498
+ setup: z.ZodDefault<z.ZodArray<z.ZodObject<{
1499
+ name: z.ZodString;
1500
+ command: z.ZodArray<z.ZodString>;
1501
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1502
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1503
+ cwd: z.ZodOptional<z.ZodString>;
1504
+ runOn: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1505
+ restore: "restore";
1506
+ create: "create";
1507
+ }>>>;
1508
+ }, z.core.$strip>>>;
1509
+ agent: z.ZodOptional<z.ZodObject<{
1510
+ command: z.ZodArray<z.ZodString>;
1511
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1512
+ cwd: z.ZodOptional<z.ZodString>;
1513
+ model: z.ZodOptional<z.ZodString>;
1514
+ type: z.ZodDefault<z.ZodString>;
1515
+ transport: z.ZodDefault<z.ZodEnum<{
1516
+ pty: "pty";
1517
+ acp: "acp";
1518
+ }>>;
1519
+ termWidth: z.ZodOptional<z.ZodNumber>;
1520
+ stateFile: z.ZodOptional<z.ZodString>;
1521
+ interruptKeys: z.ZodOptional<z.ZodString>;
1522
+ }, z.core.$strip>>;
1523
+ harness: z.ZodOptional<z.ZodObject<{
1524
+ command: z.ZodArray<z.ZodString>;
1525
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1526
+ cwd: z.ZodOptional<z.ZodString>;
1527
+ }, z.core.$strip>>;
1528
+ terminal: z.ZodOptional<z.ZodObject<{
1529
+ command: z.ZodArray<z.ZodString>;
1530
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1531
+ cwd: z.ZodOptional<z.ZodString>;
1532
+ maxSessions: z.ZodDefault<z.ZodNumber>;
1533
+ idleTimeout: z.ZodDefault<z.ZodString>;
1534
+ }, z.core.$strip>>;
1535
+ previews: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1536
+ port: z.ZodNumber;
1537
+ }, z.core.$strict>>>;
1538
+ display: z.ZodOptional<z.ZodObject<{
1539
+ mode: z.ZodEnum<{
1540
+ desktop: "desktop";
1541
+ browser: "browser";
1542
+ }>;
1543
+ }, z.core.$strict>>;
1544
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1545
+ resources: z.ZodObject<{
1546
+ cpu: z.ZodString;
1547
+ memory: z.ZodString;
1548
+ ephemeralStorage: z.ZodOptional<z.ZodString>;
1549
+ }, z.core.$strip>;
1550
+ timeouts: z.ZodPrefault<z.ZodObject<{
1551
+ start: z.ZodDefault<z.ZodString>;
1552
+ maxAge: z.ZodDefault<z.ZodString>;
1553
+ idle: z.ZodDefault<z.ZodString>;
1554
+ disconnectGrace: z.ZodDefault<z.ZodString>;
1555
+ terminateGrace: z.ZodDefault<z.ZodString>;
1556
+ }, z.core.$strip>>;
1557
+ services: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1558
+ baseUrl: z.ZodString;
1559
+ required: z.ZodDefault<z.ZodBoolean>;
1560
+ healthPath: z.ZodDefault<z.ZodString>;
1561
+ routes: z.ZodArray<z.ZodObject<{
1562
+ method: z.ZodEnum<{
1563
+ POST: "POST";
1564
+ DELETE: "DELETE";
1565
+ GET: "GET";
1566
+ PUT: "PUT";
1567
+ PATCH: "PATCH";
1568
+ }>;
1569
+ path: z.ZodString;
1570
+ query: z.ZodDefault<z.ZodArray<z.ZodString>>;
1571
+ responseMode: z.ZodDefault<z.ZodEnum<{
1572
+ buffered: "buffered";
1573
+ stream: "stream";
1574
+ }>>;
1575
+ maxRequestBytes: z.ZodDefault<z.ZodNumber>;
1576
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
1577
+ deadlineSeconds: z.ZodDefault<z.ZodNumber>;
1578
+ }, z.core.$strip>>;
1579
+ }, z.core.$strip>>>;
1580
+ security: z.ZodPrefault<z.ZodObject<{
1581
+ uid: z.ZodDefault<z.ZodNumber>;
1582
+ gid: z.ZodDefault<z.ZodNumber>;
1583
+ readOnlyRoot: z.ZodDefault<z.ZodBoolean>;
1584
+ writableMemoryPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
1585
+ dropCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
1586
+ allowPrivilegeEscalation: z.ZodDefault<z.ZodLiteral<false>>;
1587
+ seccomp: z.ZodDefault<z.ZodLiteral<"RuntimeDefault">>;
1588
+ }, z.core.$strip>>;
1589
+ network: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1590
+ mode: z.ZodLiteral<"unrestricted">;
1591
+ }, z.core.$strip>, z.ZodObject<{
1592
+ mode: z.ZodLiteral<"restricted">;
1593
+ allow: z.ZodDefault<z.ZodArray<z.ZodObject<{
1594
+ domain: z.ZodString;
1595
+ ports: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
1596
+ allowPrivate: z.ZodDefault<z.ZodBoolean>;
1597
+ }, z.core.$strip>>>;
1598
+ }, z.core.$strip>], "mode">>;
1599
+ maxLaunchInputBytes: z.ZodDefault<z.ZodNumber>;
1600
+ compat: z.ZodDefault<z.ZodObject<{
1601
+ agent: z.ZodOptional<z.ZodString>;
1602
+ agentapi: z.ZodOptional<z.ZodString>;
1603
+ }, z.core.$strip>>;
1604
+ persistence: z.ZodPrefault<z.ZodObject<{
1605
+ mounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
1606
+ name: z.ZodString;
1607
+ target: z.ZodString;
1608
+ maxBytes: z.ZodNumber;
1609
+ maxFiles: z.ZodNumber;
1610
+ }, z.core.$strip>>>;
1611
+ conversationRestore: z.ZodDefault<z.ZodEnum<{
1612
+ unknown: "unknown";
1613
+ supported: "supported";
1614
+ filesystem_only: "filesystem_only";
1615
+ }>>;
1616
+ conversationRetention: z.ZodDefault<z.ZodString>;
1617
+ sessionCompatibility: z.ZodOptional<z.ZodString>;
1618
+ checkpoint: z.ZodPrefault<z.ZodObject<{
1619
+ onIdle: z.ZodDefault<z.ZodEnum<{
1620
+ preserve: "preserve";
1621
+ destroy: "destroy";
1622
+ }>>;
1623
+ onDeadline: z.ZodDefault<z.ZodEnum<{
1624
+ preserve: "preserve";
1625
+ destroy: "destroy";
1626
+ }>>;
1627
+ onCleanExit: z.ZodDefault<z.ZodEnum<{
1628
+ preserve: "preserve";
1629
+ destroy: "destroy";
1630
+ }>>;
1631
+ onFailure: z.ZodDefault<z.ZodEnum<{
1632
+ preserve: "preserve";
1633
+ destroy: "destroy";
1634
+ "retain-for-recovery": "retain-for-recovery";
1635
+ }>>;
1636
+ retention: z.ZodDefault<z.ZodString>;
1637
+ }, z.core.$strip>>;
1638
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1639
+ name: z.ZodString;
1640
+ mount: z.ZodString;
1641
+ pattern: z.ZodString;
1642
+ maxBytes: z.ZodDefault<z.ZodNumber>;
1643
+ }, z.core.$strip>>>;
1644
+ }, z.core.$strip>>;
1645
+ source: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1646
+ kind: z.ZodLiteral<"git">;
1647
+ destinationMount: z.ZodString;
1648
+ repositories: z.ZodRecord<z.ZodString, z.ZodObject<{
1649
+ url: z.ZodURL;
1650
+ credential: z.ZodOptional<z.ZodString>;
1651
+ }, z.core.$strip>>;
1652
+ allowedRevision: z.ZodDefault<z.ZodLiteral<"branch-tag-or-commit">>;
1653
+ }, z.core.$strip>>>;
1654
+ checkpointHook: z.ZodOptional<z.ZodObject<{
1655
+ command: z.ZodArray<z.ZodString>;
1656
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1657
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1658
+ cwd: z.ZodOptional<z.ZodString>;
1659
+ }, z.core.$strip>>;
1660
+ outputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1661
+ type: z.ZodLiteral<"gitSha">;
1662
+ }, z.core.$strip>, z.ZodObject<{
1663
+ type: z.ZodLiteral<"string">;
1664
+ maxLength: z.ZodDefault<z.ZodNumber>;
1665
+ }, z.core.$strip>, z.ZodObject<{
1666
+ type: z.ZodLiteral<"httpsUrl">;
1667
+ maxLength: z.ZodDefault<z.ZodNumber>;
1668
+ }, z.core.$strip>], "type">>>;
1669
+ }, z.core.$strip>;
1670
+ type TemplateSpecCommon = Omit<z.infer<typeof TemplateSpecInputSchema>, "agent" | "harness" | "services" | "checkpointHook">;
1671
+ type Agent = z.infer<typeof AgentSchema>;
1672
+ type Harness = z.infer<typeof HarnessSchema>;
1673
+ type CheckpointHook = z.infer<typeof CheckpointHookSchema>;
1674
+ type TemplateService = z.infer<typeof ServiceSchema>;
1675
+ declare const TemplateManifestBaseSchema: z.ZodObject<{
1676
+ apiVersion: z.ZodLiteral<"pocketcoder.dev/v1alpha1">;
1677
+ kind: z.ZodLiteral<"Template">;
1678
+ metadata: z.ZodObject<{
1679
+ name: z.ZodString;
1680
+ description: z.ZodOptional<z.ZodString>;
1681
+ }, z.core.$strip>;
1682
+ spec: z.ZodPipe<z.ZodObject<{
1683
+ version: z.ZodString;
1684
+ image: z.ZodString;
1685
+ imagePullSecret: z.ZodOptional<z.ZodString>;
1686
+ command: z.ZodDefault<z.ZodArray<z.ZodString>>;
1687
+ setup: z.ZodDefault<z.ZodArray<z.ZodObject<{
1688
+ name: z.ZodString;
1689
+ command: z.ZodArray<z.ZodString>;
1690
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1691
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1692
+ cwd: z.ZodOptional<z.ZodString>;
1693
+ runOn: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1694
+ restore: "restore";
1695
+ create: "create";
1696
+ }>>>;
1697
+ }, z.core.$strip>>>;
1698
+ agent: z.ZodOptional<z.ZodObject<{
1699
+ command: z.ZodArray<z.ZodString>;
1700
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1701
+ cwd: z.ZodOptional<z.ZodString>;
1702
+ model: z.ZodOptional<z.ZodString>;
1703
+ type: z.ZodDefault<z.ZodString>;
1704
+ transport: z.ZodDefault<z.ZodEnum<{
1705
+ pty: "pty";
1706
+ acp: "acp";
1707
+ }>>;
1708
+ termWidth: z.ZodOptional<z.ZodNumber>;
1709
+ stateFile: z.ZodOptional<z.ZodString>;
1710
+ interruptKeys: z.ZodOptional<z.ZodString>;
1711
+ }, z.core.$strip>>;
1712
+ harness: z.ZodOptional<z.ZodObject<{
1713
+ command: z.ZodArray<z.ZodString>;
1714
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1715
+ cwd: z.ZodOptional<z.ZodString>;
1716
+ }, z.core.$strip>>;
1717
+ terminal: z.ZodOptional<z.ZodObject<{
1718
+ command: z.ZodArray<z.ZodString>;
1719
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1720
+ cwd: z.ZodOptional<z.ZodString>;
1721
+ maxSessions: z.ZodDefault<z.ZodNumber>;
1722
+ idleTimeout: z.ZodDefault<z.ZodString>;
1723
+ }, z.core.$strip>>;
1724
+ previews: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1725
+ port: z.ZodNumber;
1726
+ }, z.core.$strict>>>;
1727
+ display: z.ZodOptional<z.ZodObject<{
1728
+ mode: z.ZodEnum<{
1729
+ desktop: "desktop";
1730
+ browser: "browser";
1731
+ }>;
1732
+ }, z.core.$strict>>;
1733
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1734
+ resources: z.ZodObject<{
1735
+ cpu: z.ZodString;
1736
+ memory: z.ZodString;
1737
+ ephemeralStorage: z.ZodOptional<z.ZodString>;
1738
+ }, z.core.$strip>;
1739
+ timeouts: z.ZodPrefault<z.ZodObject<{
1740
+ start: z.ZodDefault<z.ZodString>;
1741
+ maxAge: z.ZodDefault<z.ZodString>;
1742
+ idle: z.ZodDefault<z.ZodString>;
1743
+ disconnectGrace: z.ZodDefault<z.ZodString>;
1744
+ terminateGrace: z.ZodDefault<z.ZodString>;
1745
+ }, z.core.$strip>>;
1746
+ services: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1747
+ baseUrl: z.ZodString;
1748
+ required: z.ZodDefault<z.ZodBoolean>;
1749
+ healthPath: z.ZodDefault<z.ZodString>;
1750
+ routes: z.ZodArray<z.ZodObject<{
1751
+ method: z.ZodEnum<{
1752
+ POST: "POST";
1753
+ DELETE: "DELETE";
1754
+ GET: "GET";
1755
+ PUT: "PUT";
1756
+ PATCH: "PATCH";
1757
+ }>;
1758
+ path: z.ZodString;
1759
+ query: z.ZodDefault<z.ZodArray<z.ZodString>>;
1760
+ responseMode: z.ZodDefault<z.ZodEnum<{
1761
+ buffered: "buffered";
1762
+ stream: "stream";
1763
+ }>>;
1764
+ maxRequestBytes: z.ZodDefault<z.ZodNumber>;
1765
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
1766
+ deadlineSeconds: z.ZodDefault<z.ZodNumber>;
1767
+ }, z.core.$strip>>;
1768
+ }, z.core.$strip>>>;
1769
+ security: z.ZodPrefault<z.ZodObject<{
1770
+ uid: z.ZodDefault<z.ZodNumber>;
1771
+ gid: z.ZodDefault<z.ZodNumber>;
1772
+ readOnlyRoot: z.ZodDefault<z.ZodBoolean>;
1773
+ writableMemoryPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
1774
+ dropCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
1775
+ allowPrivilegeEscalation: z.ZodDefault<z.ZodLiteral<false>>;
1776
+ seccomp: z.ZodDefault<z.ZodLiteral<"RuntimeDefault">>;
1777
+ }, z.core.$strip>>;
1778
+ network: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1779
+ mode: z.ZodLiteral<"unrestricted">;
1780
+ }, z.core.$strip>, z.ZodObject<{
1781
+ mode: z.ZodLiteral<"restricted">;
1782
+ allow: z.ZodDefault<z.ZodArray<z.ZodObject<{
1783
+ domain: z.ZodString;
1784
+ ports: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
1785
+ allowPrivate: z.ZodDefault<z.ZodBoolean>;
1786
+ }, z.core.$strip>>>;
1787
+ }, z.core.$strip>], "mode">>;
1788
+ maxLaunchInputBytes: z.ZodDefault<z.ZodNumber>;
1789
+ compat: z.ZodDefault<z.ZodObject<{
1790
+ agent: z.ZodOptional<z.ZodString>;
1791
+ agentapi: z.ZodOptional<z.ZodString>;
1792
+ }, z.core.$strip>>;
1793
+ persistence: z.ZodPrefault<z.ZodObject<{
1794
+ mounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
1795
+ name: z.ZodString;
1796
+ target: z.ZodString;
1797
+ maxBytes: z.ZodNumber;
1798
+ maxFiles: z.ZodNumber;
1799
+ }, z.core.$strip>>>;
1800
+ conversationRestore: z.ZodDefault<z.ZodEnum<{
1801
+ unknown: "unknown";
1802
+ supported: "supported";
1803
+ filesystem_only: "filesystem_only";
1804
+ }>>;
1805
+ conversationRetention: z.ZodDefault<z.ZodString>;
1806
+ sessionCompatibility: z.ZodOptional<z.ZodString>;
1807
+ checkpoint: z.ZodPrefault<z.ZodObject<{
1808
+ onIdle: z.ZodDefault<z.ZodEnum<{
1809
+ preserve: "preserve";
1810
+ destroy: "destroy";
1811
+ }>>;
1812
+ onDeadline: z.ZodDefault<z.ZodEnum<{
1813
+ preserve: "preserve";
1814
+ destroy: "destroy";
1815
+ }>>;
1816
+ onCleanExit: z.ZodDefault<z.ZodEnum<{
1817
+ preserve: "preserve";
1818
+ destroy: "destroy";
1819
+ }>>;
1820
+ onFailure: z.ZodDefault<z.ZodEnum<{
1821
+ preserve: "preserve";
1822
+ destroy: "destroy";
1823
+ "retain-for-recovery": "retain-for-recovery";
1824
+ }>>;
1825
+ retention: z.ZodDefault<z.ZodString>;
1826
+ }, z.core.$strip>>;
1827
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1828
+ name: z.ZodString;
1829
+ mount: z.ZodString;
1830
+ pattern: z.ZodString;
1831
+ maxBytes: z.ZodDefault<z.ZodNumber>;
1832
+ }, z.core.$strip>>>;
1833
+ }, z.core.$strip>>;
1834
+ source: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1835
+ kind: z.ZodLiteral<"git">;
1836
+ destinationMount: z.ZodString;
1837
+ repositories: z.ZodRecord<z.ZodString, z.ZodObject<{
1838
+ url: z.ZodURL;
1839
+ credential: z.ZodOptional<z.ZodString>;
1840
+ }, z.core.$strip>>;
1841
+ allowedRevision: z.ZodDefault<z.ZodLiteral<"branch-tag-or-commit">>;
1842
+ }, z.core.$strip>>>;
1843
+ checkpointHook: z.ZodOptional<z.ZodObject<{
1844
+ command: z.ZodArray<z.ZodString>;
1845
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1846
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1847
+ cwd: z.ZodOptional<z.ZodString>;
1848
+ }, z.core.$strip>>;
1849
+ outputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1850
+ type: z.ZodLiteral<"gitSha">;
1851
+ }, z.core.$strip>, z.ZodObject<{
1852
+ type: z.ZodLiteral<"string">;
1853
+ maxLength: z.ZodDefault<z.ZodNumber>;
1854
+ }, z.core.$strip>, z.ZodObject<{
1855
+ type: z.ZodLiteral<"httpsUrl">;
1856
+ maxLength: z.ZodDefault<z.ZodNumber>;
1857
+ }, z.core.$strip>], "type">>>;
1858
+ }, z.core.$strip>, z.ZodTransform<(TemplateSpecCommon & {
1859
+ agent: Agent;
1860
+ harness?: never;
1861
+ services?: never;
1862
+ checkpointHook?: never;
1863
+ }) | (TemplateSpecCommon & {
1864
+ agent?: never;
1865
+ harness: Harness;
1866
+ services: Record<string, TemplateService>;
1867
+ checkpointHook?: CheckpointHook;
1868
+ }), {
1869
+ version: string;
1870
+ image: string;
1871
+ command: string[];
1872
+ setup: {
1873
+ name: string;
1874
+ command: string[];
1875
+ timeoutSeconds: number;
1876
+ env: Record<string, string>;
1877
+ runOn: ("restore" | "create")[];
1878
+ cwd?: string | undefined;
1879
+ }[];
1880
+ env: Record<string, string>;
1881
+ resources: {
1882
+ cpu: string;
1883
+ memory: string;
1884
+ ephemeralStorage?: string | undefined;
1885
+ };
1886
+ timeouts: {
1887
+ start: string;
1888
+ maxAge: string;
1889
+ idle: string;
1890
+ disconnectGrace: string;
1891
+ terminateGrace: string;
1892
+ };
1893
+ security: {
1894
+ uid: number;
1895
+ gid: number;
1896
+ readOnlyRoot: boolean;
1897
+ writableMemoryPaths: string[];
1898
+ dropCapabilities: string[];
1899
+ allowPrivilegeEscalation: false;
1900
+ seccomp: "RuntimeDefault";
1901
+ };
1902
+ network: {
1903
+ mode: "unrestricted";
1904
+ } | {
1905
+ mode: "restricted";
1906
+ allow: {
1907
+ domain: string;
1908
+ ports: number[];
1909
+ allowPrivate: boolean;
1910
+ }[];
1911
+ };
1912
+ maxLaunchInputBytes: number;
1913
+ compat: {
1914
+ agent?: string | undefined;
1915
+ agentapi?: string | undefined;
1916
+ };
1917
+ persistence: {
1918
+ mounts: {
1919
+ name: string;
1920
+ target: string;
1921
+ maxBytes: number;
1922
+ maxFiles: number;
1923
+ }[];
1924
+ conversationRestore: "unknown" | "supported" | "filesystem_only";
1925
+ conversationRetention: string;
1926
+ checkpoint: {
1927
+ onIdle: "preserve" | "destroy";
1928
+ onDeadline: "preserve" | "destroy";
1929
+ onCleanExit: "preserve" | "destroy";
1930
+ onFailure: "preserve" | "destroy" | "retain-for-recovery";
1931
+ retention: string;
1932
+ };
1933
+ sessionCompatibility?: string | undefined;
1934
+ artifacts?: {
1935
+ name: string;
1936
+ mount: string;
1937
+ pattern: string;
1938
+ maxBytes: number;
1939
+ }[] | undefined;
1940
+ };
1941
+ source: {
1942
+ kind: "git";
1943
+ destinationMount: string;
1944
+ repositories: Record<string, {
1945
+ url: string;
1946
+ credential?: string | undefined;
1947
+ }>;
1948
+ allowedRevision: "branch-tag-or-commit";
1949
+ } | null;
1950
+ outputs: Record<string, {
1951
+ type: "gitSha";
1952
+ } | {
1953
+ type: "string";
1954
+ maxLength: number;
1955
+ } | {
1956
+ type: "httpsUrl";
1957
+ maxLength: number;
1958
+ }>;
1959
+ imagePullSecret?: string | undefined;
1960
+ agent?: {
1961
+ command: string[];
1962
+ env: Record<string, string>;
1963
+ type: string;
1964
+ transport: "pty" | "acp";
1965
+ cwd?: string | undefined;
1966
+ model?: string | undefined;
1967
+ termWidth?: number | undefined;
1968
+ stateFile?: string | undefined;
1969
+ interruptKeys?: string | undefined;
1970
+ } | undefined;
1971
+ harness?: {
1972
+ command: string[];
1973
+ env: Record<string, string>;
1974
+ cwd?: string | undefined;
1975
+ } | undefined;
1976
+ terminal?: {
1977
+ command: string[];
1978
+ env: Record<string, string>;
1979
+ maxSessions: number;
1980
+ idleTimeout: string;
1981
+ cwd?: string | undefined;
1982
+ } | undefined;
1983
+ previews?: Record<string, {
1984
+ port: number;
1985
+ }> | undefined;
1986
+ display?: {
1987
+ mode: "desktop" | "browser";
1988
+ } | undefined;
1989
+ services?: Record<string, {
1990
+ baseUrl: string;
1991
+ required: boolean;
1992
+ healthPath: string;
1993
+ routes: {
1994
+ method: "POST" | "DELETE" | "GET" | "PUT" | "PATCH";
1995
+ path: string;
1996
+ query: string[];
1997
+ responseMode: "buffered" | "stream";
1998
+ maxRequestBytes: number;
1999
+ maxResponseBytes: number;
2000
+ deadlineSeconds: number;
2001
+ }[];
2002
+ }> | undefined;
2003
+ checkpointHook?: {
2004
+ command: string[];
2005
+ timeoutSeconds: number;
2006
+ env: Record<string, string>;
2007
+ cwd?: string | undefined;
2008
+ } | undefined;
2009
+ }>>;
2010
+ }, z.core.$strip>;
2011
+ type TemplateManifest = z.infer<typeof TemplateManifestBaseSchema>;
2012
+ //#endregion
2013
+ //#region ../contracts/src/templates/workload-admission.d.ts
2014
+ declare const WorkloadDeploymentSchema: z.ZodObject<{
2015
+ workspaceId: z.ZodUUID;
2016
+ incarnationId: z.ZodString;
2017
+ profiles: z.ZodArray<z.ZodEnum<{
2018
+ "finite-process": "finite-process";
2019
+ "cloud-interactive": "cloud-interactive";
2020
+ service: "service";
2021
+ }>>;
2022
+ storageProfiles: z.ZodArray<z.ZodEnum<{
2023
+ "controller-readonly/v1": "controller-readonly/v1";
2024
+ "shared-writer-readonly/v1": "shared-writer-readonly/v1";
2025
+ }>>;
2026
+ ceilings: z.ZodObject<{
2027
+ deadlineSeconds: z.ZodNumber;
2028
+ finalizationSeconds: z.ZodNumber;
2029
+ inputFileBytes: z.ZodNumber;
2030
+ stagedInputBytes: z.ZodNumber;
2031
+ inputFiles: z.ZodNumber;
2032
+ inFlightTransfers: z.ZodNumber;
2033
+ exportBytes: z.ZodNumber;
2034
+ exportFiles: z.ZodNumber;
2035
+ unreferencedInputRetentionSeconds: z.ZodNumber;
2036
+ exportRetentionSeconds: z.ZodNumber;
2037
+ }, z.core.$strict>;
2038
+ now: z.ZodISODateTime;
2039
+ expiresAt: z.ZodISODateTime;
2040
+ installed: z.ZodOptional<z.ZodObject<{
2041
+ workspaceId: z.ZodUUID;
2042
+ incarnationId: z.ZodString;
2043
+ templateDigest: z.ZodString;
2044
+ image: z.ZodString;
2045
+ runtime: z.ZodObject<{
2046
+ digest: z.ZodString;
2047
+ protocol: z.ZodLiteral<"pocketcoder.workload/v1">;
2048
+ }, z.core.$strict>;
2049
+ storage: z.ZodObject<{
2050
+ identity: z.ZodString;
2051
+ profile: z.ZodEnum<{
2052
+ "controller-readonly/v1": "controller-readonly/v1";
2053
+ "shared-writer-readonly/v1": "shared-writer-readonly/v1";
2054
+ }>;
2055
+ }, z.core.$strict>;
2056
+ capabilities: z.ZodArray<z.ZodEnum<{
2057
+ "ready-without-task": "ready-without-task";
2058
+ "live-inputs": "live-inputs";
2059
+ "immutable-inputs": "immutable-inputs";
2060
+ "serial-operations": "serial-operations";
2061
+ "retained-exports": "retained-exports";
2062
+ "explicit-start": "explicit-start";
2063
+ "exact-exit": "exact-exit";
2064
+ "targeted-cancel": "targeted-cancel";
2065
+ "stop-before-export": "stop-before-export";
2066
+ "request-lookup": "request-lookup";
2067
+ "deduplicated-accept": "deduplicated-accept";
2068
+ "explicit-publication": "explicit-publication";
2069
+ "workspace-services": "workspace-services";
2070
+ "revocable-preview-grants": "revocable-preview-grants";
2071
+ "workspace-cancel": "workspace-cancel";
2072
+ "unknown-outcome": "unknown-outcome";
2073
+ }>>;
2074
+ adapters: z.ZodRecord<z.ZodString, z.ZodObject<{
2075
+ kind: z.ZodEnum<{
2076
+ agentapi: "agentapi";
2077
+ service: "service";
2078
+ process: "process";
2079
+ pi: "pi";
2080
+ }>;
2081
+ digest: z.ZodString;
2082
+ protocol: z.ZodString;
2083
+ capabilities: z.ZodArray<z.ZodEnum<{
2084
+ "ready-without-task": "ready-without-task";
2085
+ "live-inputs": "live-inputs";
2086
+ "immutable-inputs": "immutable-inputs";
2087
+ "serial-operations": "serial-operations";
2088
+ "retained-exports": "retained-exports";
2089
+ "explicit-start": "explicit-start";
2090
+ "exact-exit": "exact-exit";
2091
+ "targeted-cancel": "targeted-cancel";
2092
+ "stop-before-export": "stop-before-export";
2093
+ "request-lookup": "request-lookup";
2094
+ "deduplicated-accept": "deduplicated-accept";
2095
+ "explicit-publication": "explicit-publication";
2096
+ "workspace-services": "workspace-services";
2097
+ "revocable-preview-grants": "revocable-preview-grants";
2098
+ "workspace-cancel": "workspace-cancel";
2099
+ "unknown-outcome": "unknown-outcome";
2100
+ }>>;
2101
+ }, z.core.$strict>>;
2102
+ }, z.core.$strict>>;
2103
+ }, z.core.$strict>;
2104
+ type WorkloadDeployment = z.infer<typeof WorkloadDeploymentSchema>;
2105
+ //#endregion
2106
+ //#region ../contracts/src/templates/workload-capabilities.d.ts
2107
+ declare const WorkloadCapabilitySchema: z.ZodEnum<{
2108
+ "ready-without-task": "ready-without-task";
2109
+ "live-inputs": "live-inputs";
2110
+ "immutable-inputs": "immutable-inputs";
2111
+ "serial-operations": "serial-operations";
2112
+ "retained-exports": "retained-exports";
2113
+ "explicit-start": "explicit-start";
2114
+ "exact-exit": "exact-exit";
2115
+ "targeted-cancel": "targeted-cancel";
2116
+ "stop-before-export": "stop-before-export";
2117
+ "request-lookup": "request-lookup";
2118
+ "deduplicated-accept": "deduplicated-accept";
2119
+ "explicit-publication": "explicit-publication";
2120
+ "workspace-services": "workspace-services";
2121
+ "revocable-preview-grants": "revocable-preview-grants";
2122
+ "workspace-cancel": "workspace-cancel";
2123
+ "unknown-outcome": "unknown-outcome";
2124
+ }>;
2125
+ type WorkloadCapability = z.infer<typeof WorkloadCapabilitySchema>;
2126
+ declare const WorkloadLimitsSchema: z.ZodObject<{
2127
+ deadlineSeconds: z.ZodNumber;
2128
+ finalizationSeconds: z.ZodNumber;
2129
+ inputFileBytes: z.ZodNumber;
2130
+ stagedInputBytes: z.ZodNumber;
2131
+ inputFiles: z.ZodNumber;
2132
+ inFlightTransfers: z.ZodNumber;
2133
+ exportBytes: z.ZodNumber;
2134
+ exportFiles: z.ZodNumber;
2135
+ unreferencedInputRetentionSeconds: z.ZodNumber;
2136
+ exportRetentionSeconds: z.ZodNumber;
2137
+ }, z.core.$strict>;
2138
+ type WorkloadLimits = z.infer<typeof WorkloadLimitsSchema>;
2139
+ declare const InstalledWorkloadSchema: z.ZodObject<{
2140
+ workspaceId: z.ZodUUID;
2141
+ incarnationId: z.ZodString;
2142
+ templateDigest: z.ZodString;
2143
+ image: z.ZodString;
2144
+ runtime: z.ZodObject<{
2145
+ digest: z.ZodString;
2146
+ protocol: z.ZodLiteral<"pocketcoder.workload/v1">;
2147
+ }, z.core.$strict>;
2148
+ storage: z.ZodObject<{
2149
+ identity: z.ZodString;
2150
+ profile: z.ZodEnum<{
2151
+ "controller-readonly/v1": "controller-readonly/v1";
2152
+ "shared-writer-readonly/v1": "shared-writer-readonly/v1";
2153
+ }>;
2154
+ }, z.core.$strict>;
2155
+ capabilities: z.ZodArray<z.ZodEnum<{
2156
+ "ready-without-task": "ready-without-task";
2157
+ "live-inputs": "live-inputs";
2158
+ "immutable-inputs": "immutable-inputs";
2159
+ "serial-operations": "serial-operations";
2160
+ "retained-exports": "retained-exports";
2161
+ "explicit-start": "explicit-start";
2162
+ "exact-exit": "exact-exit";
2163
+ "targeted-cancel": "targeted-cancel";
2164
+ "stop-before-export": "stop-before-export";
2165
+ "request-lookup": "request-lookup";
2166
+ "deduplicated-accept": "deduplicated-accept";
2167
+ "explicit-publication": "explicit-publication";
2168
+ "workspace-services": "workspace-services";
2169
+ "revocable-preview-grants": "revocable-preview-grants";
2170
+ "workspace-cancel": "workspace-cancel";
2171
+ "unknown-outcome": "unknown-outcome";
2172
+ }>>;
2173
+ adapters: z.ZodRecord<z.ZodString, z.ZodObject<{
2174
+ kind: z.ZodEnum<{
2175
+ agentapi: "agentapi";
2176
+ service: "service";
2177
+ process: "process";
2178
+ pi: "pi";
2179
+ }>;
2180
+ digest: z.ZodString;
2181
+ protocol: z.ZodString;
2182
+ capabilities: z.ZodArray<z.ZodEnum<{
2183
+ "ready-without-task": "ready-without-task";
2184
+ "live-inputs": "live-inputs";
2185
+ "immutable-inputs": "immutable-inputs";
2186
+ "serial-operations": "serial-operations";
2187
+ "retained-exports": "retained-exports";
2188
+ "explicit-start": "explicit-start";
2189
+ "exact-exit": "exact-exit";
2190
+ "targeted-cancel": "targeted-cancel";
2191
+ "stop-before-export": "stop-before-export";
2192
+ "request-lookup": "request-lookup";
2193
+ "deduplicated-accept": "deduplicated-accept";
2194
+ "explicit-publication": "explicit-publication";
2195
+ "workspace-services": "workspace-services";
2196
+ "revocable-preview-grants": "revocable-preview-grants";
2197
+ "workspace-cancel": "workspace-cancel";
2198
+ "unknown-outcome": "unknown-outcome";
2199
+ }>>;
2200
+ }, z.core.$strict>>;
2201
+ }, z.core.$strict>;
2202
+ type InstalledWorkload = z.infer<typeof InstalledWorkloadSchema>;
2203
+ //#endregion
583
2204
  //#region ../contracts/src/terminals/terminal.d.ts
584
2205
  declare const ServerTerminalMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
585
2206
  type: z.ZodLiteral<"opened">;
@@ -591,10 +2212,10 @@ declare const ServerTerminalMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
591
2212
  }, z.core.$strip>, z.ZodObject<{
592
2213
  type: z.ZodLiteral<"closed">;
593
2214
  reason: z.ZodEnum<{
2215
+ idle: "idle";
594
2216
  checkpoint: "checkpoint";
595
- workspace_ended: "workspace_ended";
596
2217
  exit: "exit";
597
- idle: "idle";
2218
+ workspace_ended: "workspace_ended";
598
2219
  agent_detached: "agent_detached";
599
2220
  }>;
600
2221
  exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -613,10 +2234,10 @@ declare const TerminalSessionSchema: z.ZodObject<{
613
2234
  closed_at: z.ZodNullable<z.ZodISODateTime>;
614
2235
  duration_ms: z.ZodNullable<z.ZodNumber>;
615
2236
  close_reason: z.ZodNullable<z.ZodEnum<{
2237
+ idle: "idle";
616
2238
  checkpoint: "checkpoint";
617
- workspace_ended: "workspace_ended";
618
2239
  exit: "exit";
619
- idle: "idle";
2240
+ workspace_ended: "workspace_ended";
620
2241
  agent_detached: "agent_detached";
621
2242
  client_closed: "client_closed";
622
2243
  }>>;
@@ -627,6 +2248,73 @@ declare const TerminalSessionSchema: z.ZodObject<{
627
2248
  type ServerTerminalMessage = z.infer<typeof ServerTerminalMessageSchema>;
628
2249
  type TerminalSession = z.infer<typeof TerminalSessionSchema>;
629
2250
  //#endregion
2251
+ //#region ../contracts/src/workspaces/workload-operation.d.ts
2252
+ declare const WorkloadExecutionReferenceSchema: z.ZodObject<{
2253
+ workspaceId: z.ZodUUID;
2254
+ incarnationId: z.ZodString;
2255
+ owner: z.ZodEnum<{
2256
+ process: "process";
2257
+ "conversation-request": "conversation-request";
2258
+ }>;
2259
+ requestId: z.ZodUUID;
2260
+ }, z.core.$strict>;
2261
+ type WorkloadExecutionReference = z.infer<typeof WorkloadExecutionReferenceSchema>;
2262
+ declare const WorkloadAcceptanceSchema: z.ZodObject<{
2263
+ execution: z.ZodObject<{
2264
+ workspaceId: z.ZodUUID;
2265
+ incarnationId: z.ZodString;
2266
+ owner: z.ZodEnum<{
2267
+ process: "process";
2268
+ "conversation-request": "conversation-request";
2269
+ }>;
2270
+ requestId: z.ZodUUID;
2271
+ }, z.core.$strict>;
2272
+ callerPrincipalId: z.ZodUUID;
2273
+ templateDigest: z.ZodString;
2274
+ adapterDigest: z.ZodString;
2275
+ operation: z.ZodString;
2276
+ input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
2277
+ inputs: z.ZodObject<{
2278
+ workspaceId: z.ZodUUID;
2279
+ incarnationId: z.ZodString;
2280
+ digest: z.ZodString;
2281
+ objects: z.ZodArray<z.ZodObject<{
2282
+ workspaceId: z.ZodUUID;
2283
+ fileId: z.ZodUUID;
2284
+ objectVersion: z.ZodString;
2285
+ name: z.ZodString;
2286
+ mediaType: z.ZodString;
2287
+ sizeBytes: z.ZodNumber;
2288
+ digest: z.ZodString;
2289
+ visibility: z.ZodEnum<{
2290
+ ready: "ready";
2291
+ expired: "expired";
2292
+ unavailable: "unavailable";
2293
+ }>;
2294
+ }, z.core.$strict>>;
2295
+ }, z.core.$strict>;
2296
+ bindingSetDigest: z.ZodString;
2297
+ fingerprint: z.ZodString;
2298
+ }, z.core.$strict>;
2299
+ type WorkloadAcceptance = z.infer<typeof WorkloadAcceptanceSchema>;
2300
+ declare const WorkloadCancelSchema: z.ZodObject<{
2301
+ execution: z.ZodObject<{
2302
+ workspaceId: z.ZodUUID;
2303
+ incarnationId: z.ZodString;
2304
+ owner: z.ZodEnum<{
2305
+ process: "process";
2306
+ "conversation-request": "conversation-request";
2307
+ }>;
2308
+ requestId: z.ZodUUID;
2309
+ }, z.core.$strict>;
2310
+ cancelId: z.ZodUUID;
2311
+ scope: z.ZodEnum<{
2312
+ workspace: "workspace";
2313
+ operation: "operation";
2314
+ }>;
2315
+ }, z.core.$strict>;
2316
+ type WorkloadCancel = z.infer<typeof WorkloadCancelSchema>;
2317
+ //#endregion
630
2318
  //#region src/transport/transport.d.ts
631
2319
  type FetchLike = typeof fetch;
632
2320
  type WebSocketFactory = (url: string, headers: Record<string, string>) => WebSocket;
@@ -651,6 +2339,7 @@ declare class PocketCoderTransport {
651
2339
  constructor(config: PocketCoderClientConfig, fetchImpl?: FetchLike);
652
2340
  webSocket(path: string): WebSocket;
653
2341
  raw(path: string, init?: RequestInit): Promise<Response>;
2342
+ stream(path: string, signal?: AbortSignal): Promise<Response>;
654
2343
  request<T>(path: string, schema: z.ZodType<T>, init?: RequestInit): Promise<T>;
655
2344
  }
656
2345
  //#endregion
@@ -714,8 +2403,12 @@ declare class WorkspacesApi {
714
2403
  version: string;
715
2404
  digest: string;
716
2405
  };
717
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
718
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
2406
+ agent: {
2407
+ type: string;
2408
+ model: string | null;
2409
+ } | null;
2410
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2411
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
719
2412
  agent_state: "unknown" | "running" | "stable";
720
2413
  change_cursor: number;
721
2414
  provider_kind: string | null;
@@ -750,7 +2443,7 @@ declare class WorkspacesApi {
750
2443
  };
751
2444
  outputs: Record<string, unknown>;
752
2445
  failure: {
753
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
2446
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
754
2447
  log_tail: string;
755
2448
  log_tail_truncated: boolean;
756
2449
  last_log_seq: number | null;
@@ -764,8 +2457,12 @@ declare class WorkspacesApi {
764
2457
  version: string;
765
2458
  digest: string;
766
2459
  };
767
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
768
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
2460
+ agent: {
2461
+ type: string;
2462
+ model: string | null;
2463
+ } | null;
2464
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2465
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
769
2466
  agent_state: "unknown" | "running" | "stable";
770
2467
  change_cursor: number;
771
2468
  provider_kind: string | null;
@@ -800,7 +2497,7 @@ declare class WorkspacesApi {
800
2497
  };
801
2498
  outputs: Record<string, unknown>;
802
2499
  failure: {
803
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
2500
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
804
2501
  log_tail: string;
805
2502
  log_tail_truncated: boolean;
806
2503
  last_log_seq: number | null;
@@ -814,8 +2511,12 @@ declare class WorkspacesApi {
814
2511
  version: string;
815
2512
  digest: string;
816
2513
  };
817
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
818
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
2514
+ agent: {
2515
+ type: string;
2516
+ model: string | null;
2517
+ } | null;
2518
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2519
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
819
2520
  agent_state: "unknown" | "running" | "stable";
820
2521
  change_cursor: number;
821
2522
  provider_kind: string | null;
@@ -850,7 +2551,7 @@ declare class WorkspacesApi {
850
2551
  };
851
2552
  outputs: Record<string, unknown>;
852
2553
  failure: {
853
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
2554
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
854
2555
  log_tail: string;
855
2556
  log_tail_truncated: boolean;
856
2557
  last_log_seq: number | null;
@@ -864,8 +2565,12 @@ declare class WorkspacesApi {
864
2565
  version: string;
865
2566
  digest: string;
866
2567
  };
867
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
868
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
2568
+ agent: {
2569
+ type: string;
2570
+ model: string | null;
2571
+ } | null;
2572
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2573
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
869
2574
  agent_state: "unknown" | "running" | "stable";
870
2575
  change_cursor: number;
871
2576
  provider_kind: string | null;
@@ -900,7 +2605,7 @@ declare class WorkspacesApi {
900
2605
  };
901
2606
  outputs: Record<string, unknown>;
902
2607
  failure: {
903
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
2608
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
904
2609
  log_tail: string;
905
2610
  log_tail_truncated: boolean;
906
2611
  last_log_seq: number | null;
@@ -914,8 +2619,12 @@ declare class WorkspacesApi {
914
2619
  version: string;
915
2620
  digest: string;
916
2621
  };
917
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
918
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
2622
+ agent: {
2623
+ type: string;
2624
+ model: string | null;
2625
+ } | null;
2626
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2627
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
919
2628
  agent_state: "unknown" | "running" | "stable";
920
2629
  change_cursor: number;
921
2630
  provider_kind: string | null;
@@ -950,7 +2659,7 @@ declare class WorkspacesApi {
950
2659
  };
951
2660
  outputs: Record<string, unknown>;
952
2661
  failure: {
953
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
2662
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
954
2663
  log_tail: string;
955
2664
  log_tail_truncated: boolean;
956
2665
  last_log_seq: number | null;
@@ -967,8 +2676,12 @@ declare class WorkspacesApi {
967
2676
  version: string;
968
2677
  digest: string;
969
2678
  };
970
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
971
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
2679
+ agent: {
2680
+ type: string;
2681
+ model: string | null;
2682
+ } | null;
2683
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2684
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
972
2685
  agent_state: "unknown" | "running" | "stable";
973
2686
  change_cursor: number;
974
2687
  provider_kind: string | null;
@@ -1003,7 +2716,7 @@ declare class WorkspacesApi {
1003
2716
  };
1004
2717
  outputs: Record<string, unknown>;
1005
2718
  failure: {
1006
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
2719
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
1007
2720
  log_tail: string;
1008
2721
  log_tail_truncated: boolean;
1009
2722
  last_log_seq: number | null;
@@ -1020,8 +2733,12 @@ declare class WorkspacesApi {
1020
2733
  version: string;
1021
2734
  digest: string;
1022
2735
  };
1023
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
1024
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
2736
+ agent: {
2737
+ type: string;
2738
+ model: string | null;
2739
+ } | null;
2740
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2741
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
1025
2742
  agent_state: "unknown" | "running" | "stable";
1026
2743
  change_cursor: number;
1027
2744
  provider_kind: string | null;
@@ -1056,7 +2773,7 @@ declare class WorkspacesApi {
1056
2773
  };
1057
2774
  outputs: Record<string, unknown>;
1058
2775
  failure: {
1059
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
2776
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
1060
2777
  log_tail: string;
1061
2778
  log_tail_truncated: boolean;
1062
2779
  last_log_seq: number | null;
@@ -1070,8 +2787,12 @@ declare class WorkspacesApi {
1070
2787
  version: string;
1071
2788
  digest: string;
1072
2789
  };
1073
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
1074
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
2790
+ agent: {
2791
+ type: string;
2792
+ model: string | null;
2793
+ } | null;
2794
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2795
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
1075
2796
  agent_state: "unknown" | "running" | "stable";
1076
2797
  change_cursor: number;
1077
2798
  provider_kind: string | null;
@@ -1106,7 +2827,7 @@ declare class WorkspacesApi {
1106
2827
  };
1107
2828
  outputs: Record<string, unknown>;
1108
2829
  failure: {
1109
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
2830
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
1110
2831
  log_tail: string;
1111
2832
  log_tail_truncated: boolean;
1112
2833
  last_log_seq: number | null;
@@ -1121,8 +2842,12 @@ declare class WorkspacesApi {
1121
2842
  version: string;
1122
2843
  digest: string;
1123
2844
  };
1124
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
1125
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
2845
+ agent: {
2846
+ type: string;
2847
+ model: string | null;
2848
+ } | null;
2849
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2850
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
1126
2851
  agent_state: "unknown" | "running" | "stable";
1127
2852
  change_cursor: number;
1128
2853
  provider_kind: string | null;
@@ -1157,7 +2882,7 @@ declare class WorkspacesApi {
1157
2882
  };
1158
2883
  outputs: Record<string, unknown>;
1159
2884
  failure: {
1160
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
2885
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
1161
2886
  log_tail: string;
1162
2887
  log_tail_truncated: boolean;
1163
2888
  last_log_seq: number | null;
@@ -1166,7 +2891,7 @@ declare class WorkspacesApi {
1166
2891
  checkpoint: {
1167
2892
  id: string;
1168
2893
  workspace_id: string;
1169
- state: "deleted" | "failed" | "ready" | "creating" | "deleting";
2894
+ state: "deleted" | "creating" | "ready" | "failed" | "deleting";
1170
2895
  reason_code: string | null;
1171
2896
  template: {
1172
2897
  name: string;
@@ -1187,7 +2912,7 @@ declare class WorkspacesApi {
1187
2912
  operation: {
1188
2913
  id: string;
1189
2914
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1190
- state: "failed" | "succeeded" | "running" | "pending";
2915
+ state: "failed" | "pending" | "running" | "succeeded";
1191
2916
  workspace_id: string | null;
1192
2917
  checkpoint_id: string | null;
1193
2918
  result_workspace_id: string | null;
@@ -1200,7 +2925,7 @@ declare class WorkspacesApi {
1200
2925
  purge(id: string, key: string, options?: RequestOptions): Promise<{
1201
2926
  id: string;
1202
2927
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1203
- state: "failed" | "succeeded" | "running" | "pending";
2928
+ state: "failed" | "pending" | "running" | "succeeded";
1204
2929
  workspace_id: string | null;
1205
2930
  checkpoint_id: string | null;
1206
2931
  result_workspace_id: string | null;
@@ -1218,8 +2943,12 @@ declare class WorkspacesApi {
1218
2943
  version: string;
1219
2944
  digest: string;
1220
2945
  };
1221
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
1222
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
2946
+ agent: {
2947
+ type: string;
2948
+ model: string | null;
2949
+ } | null;
2950
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2951
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
1223
2952
  agent_state: "unknown" | "running" | "stable";
1224
2953
  change_cursor: number;
1225
2954
  provider_kind: string | null;
@@ -1254,7 +2983,7 @@ declare class WorkspacesApi {
1254
2983
  };
1255
2984
  outputs: Record<string, unknown>;
1256
2985
  failure: {
1257
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
2986
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
1258
2987
  log_tail: string;
1259
2988
  log_tail_truncated: boolean;
1260
2989
  last_log_seq: number | null;
@@ -1263,7 +2992,7 @@ declare class WorkspacesApi {
1263
2992
  operation: {
1264
2993
  id: string;
1265
2994
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1266
- state: "failed" | "succeeded" | "running" | "pending";
2995
+ state: "failed" | "pending" | "running" | "succeeded";
1267
2996
  workspace_id: string | null;
1268
2997
  checkpoint_id: string | null;
1269
2998
  result_workspace_id: string | null;
@@ -1282,8 +3011,12 @@ declare class WorkspacesApi {
1282
3011
  version: string;
1283
3012
  digest: string;
1284
3013
  };
1285
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
1286
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
3014
+ agent: {
3015
+ type: string;
3016
+ model: string | null;
3017
+ } | null;
3018
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
3019
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
1287
3020
  agent_state: "unknown" | "running" | "stable";
1288
3021
  change_cursor: number;
1289
3022
  provider_kind: string | null;
@@ -1318,7 +3051,7 @@ declare class WorkspacesApi {
1318
3051
  };
1319
3052
  outputs: Record<string, unknown>;
1320
3053
  failure: {
1321
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
3054
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
1322
3055
  log_tail: string;
1323
3056
  log_tail_truncated: boolean;
1324
3057
  last_log_seq: number | null;
@@ -1327,7 +3060,7 @@ declare class WorkspacesApi {
1327
3060
  operation: {
1328
3061
  id: string;
1329
3062
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1330
- state: "failed" | "succeeded" | "running" | "pending";
3063
+ state: "failed" | "pending" | "running" | "succeeded";
1331
3064
  workspace_id: string | null;
1332
3065
  checkpoint_id: string | null;
1333
3066
  result_workspace_id: string | null;
@@ -1346,6 +3079,23 @@ declare class WorkspacesApi {
1346
3079
  private jsonOperation;
1347
3080
  }
1348
3081
  //#endregion
3082
+ //#region src/resources/agent/agent.d.ts
3083
+ interface AgentMessageInput {
3084
+ content: string;
3085
+ attachmentIds?: string[];
3086
+ signal?: AbortSignal;
3087
+ readyTimeoutMs?: number;
3088
+ }
3089
+ declare class AgentApi {
3090
+ private readonly transport;
3091
+ private readonly workspaces;
3092
+ constructor(transport: PocketCoderTransport, workspaces: WorkspacesApi);
3093
+ sendMessage(workspaceId: string, input: AgentMessageInput): Promise<void>;
3094
+ interrupt(workspaceId: string, options?: RequestOptions): Promise<{
3095
+ status: "requested" | "idle";
3096
+ }>;
3097
+ }
3098
+ //#endregion
1349
3099
  //#region src/resources/attachments/attachments.d.ts
1350
3100
  type UploadBody = NonNullable<RequestInit["body"]>;
1351
3101
  interface AttachmentUploadInput {
@@ -1354,25 +3104,14 @@ interface AttachmentUploadInput {
1354
3104
  mediaType?: string;
1355
3105
  body: UploadBody;
1356
3106
  sizeBytes: number;
3107
+ sha256?: string;
1357
3108
  signal?: AbortSignal;
1358
3109
  onProgress?: (uploadedBytes: number, totalBytes: number) => void;
1359
3110
  }
1360
- interface AgentMessageInput {
1361
- content: string;
1362
- attachmentIds?: string[];
1363
- signal?: AbortSignal;
1364
- readyTimeoutMs?: number;
1365
- }
1366
3111
  declare class AttachmentsApi {
1367
3112
  private readonly transport;
1368
3113
  constructor(transport: PocketCoderTransport);
1369
- upload(workspaceId: string, input: AttachmentUploadInput): Promise<AttachmentDescriptor>;
1370
- }
1371
- declare class AgentApi {
1372
- private readonly transport;
1373
- private readonly workspaces;
1374
- constructor(transport: PocketCoderTransport, workspaces: WorkspacesApi);
1375
- sendMessage(workspaceId: string, input: AgentMessageInput): Promise<void>;
3114
+ upload(workspaceId: string, input: AttachmentUploadInput): Promise<InputObjectReference>;
1376
3115
  }
1377
3116
  //#endregion
1378
3117
  //#region src/transport/common.d.ts
@@ -1394,7 +3133,7 @@ declare class CheckpointsApi {
1394
3133
  }, options?: RequestOptions): Promise<Page<{
1395
3134
  id: string;
1396
3135
  workspace_id: string;
1397
- state: "deleted" | "failed" | "ready" | "creating" | "deleting";
3136
+ state: "deleted" | "creating" | "ready" | "failed" | "deleting";
1398
3137
  reason_code: string | null;
1399
3138
  template: {
1400
3139
  name: string;
@@ -1415,7 +3154,7 @@ declare class CheckpointsApi {
1415
3154
  get(id: string, options?: RequestOptions): Promise<{
1416
3155
  id: string;
1417
3156
  workspace_id: string;
1418
- state: "deleted" | "failed" | "ready" | "creating" | "deleting";
3157
+ state: "deleted" | "creating" | "ready" | "failed" | "deleting";
1419
3158
  reason_code: string | null;
1420
3159
  template: {
1421
3160
  name: string;
@@ -1436,7 +3175,7 @@ declare class CheckpointsApi {
1436
3175
  verify(id: string, key: string, options?: RequestOptions): Promise<{
1437
3176
  id: string;
1438
3177
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1439
- state: "failed" | "succeeded" | "running" | "pending";
3178
+ state: "failed" | "pending" | "running" | "succeeded";
1440
3179
  workspace_id: string | null;
1441
3180
  checkpoint_id: string | null;
1442
3181
  result_workspace_id: string | null;
@@ -1448,7 +3187,7 @@ declare class CheckpointsApi {
1448
3187
  delete(id: string, key: string, options?: RequestOptions): Promise<{
1449
3188
  id: string;
1450
3189
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1451
- state: "failed" | "succeeded" | "running" | "pending";
3190
+ state: "failed" | "pending" | "running" | "succeeded";
1452
3191
  workspace_id: string | null;
1453
3192
  checkpoint_id: string | null;
1454
3193
  result_workspace_id: string | null;
@@ -1466,8 +3205,12 @@ declare class CheckpointsApi {
1466
3205
  version: string;
1467
3206
  digest: string;
1468
3207
  };
1469
- state: "failed" | "canceled" | "queued" | "provisioning" | "connected" | "ready" | "preserving" | "terminating" | "succeeded" | "expired" | "preserved";
1470
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
3208
+ agent: {
3209
+ type: string;
3210
+ model: string | null;
3211
+ } | null;
3212
+ state: "ready" | "failed" | "succeeded" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
3213
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed" | null;
1471
3214
  agent_state: "unknown" | "running" | "stable";
1472
3215
  change_cursor: number;
1473
3216
  provider_kind: string | null;
@@ -1502,7 +3245,7 @@ declare class CheckpointsApi {
1502
3245
  };
1503
3246
  outputs: Record<string, unknown>;
1504
3247
  failure: {
1505
- reason_code: "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
3248
+ reason_code: "admission_global_capacity" | "admission_principal_capacity" | "admission_template_capacity" | "admission_policy_global_capacity" | "admission_actor_capacity" | "admission_denied" | "admission_unavailable" | "child_exit_success" | "child_exit_failure" | "setup_failed" | "bootstrap_failed" | "registration_timeout" | "health_failed" | "child_crash" | "provider_lost" | "disconnect_timeout" | "canceled_by_caller" | "deadline_expired" | "idle_expired" | "queue_timeout" | "launch_failed" | "preserve_requested" | "preserved_by_policy" | "checkpoint_created" | "checkpoint_failed" | "checkpoint_corrupt" | "checkpoint_quota_exceeded" | "checkpoint_storage_lost" | "restore_requested" | "restore_failed" | "image_unavailable" | "source_resolution_failed" | "secret_resolution_failed" | "operation_conflict" | "network_policy_failed";
1506
3249
  log_tail: string;
1507
3250
  log_tail_truncated: boolean;
1508
3251
  last_log_seq: number | null;
@@ -1511,7 +3254,7 @@ declare class CheckpointsApi {
1511
3254
  operation: {
1512
3255
  id: string;
1513
3256
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1514
- state: "failed" | "succeeded" | "running" | "pending";
3257
+ state: "failed" | "pending" | "running" | "succeeded";
1515
3258
  workspace_id: string | null;
1516
3259
  checkpoint_id: string | null;
1517
3260
  result_workspace_id: string | null;
@@ -1529,7 +3272,7 @@ declare class OperationsApi {
1529
3272
  get(id: string, options?: RequestOptions): Promise<{
1530
3273
  id: string;
1531
3274
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1532
- state: "failed" | "succeeded" | "running" | "pending";
3275
+ state: "failed" | "pending" | "running" | "succeeded";
1533
3276
  workspace_id: string | null;
1534
3277
  checkpoint_id: string | null;
1535
3278
  result_workspace_id: string | null;
@@ -1583,17 +3326,20 @@ declare class ConversationsApi {
1583
3326
  } | {
1584
3327
  type: "activity_started";
1585
3328
  activity_id: string;
1586
- kind: "tool" | "attachment" | "workspace" | "retrieval";
3329
+ kind: "workspace" | "tool" | "attachment" | "retrieval";
1587
3330
  label: string;
1588
3331
  started_at: string | null;
3332
+ action?: string | undefined;
3333
+ subject?: string | undefined;
1589
3334
  } | {
1590
3335
  type: "activity_finished";
1591
3336
  activity_id: string;
1592
3337
  ended_at: string | null;
1593
- outcome: "completed" | "failed" | "interrupted" | "canceled";
3338
+ outcome: "failed" | "canceled" | "completed" | "interrupted";
1594
3339
  } | {
1595
3340
  type: "turn_terminal";
1596
- outcome: "completed" | "failed" | "interrupted" | "canceled" | "lost";
3341
+ outcome: "failed" | "canceled" | "completed" | "interrupted" | "lost";
3342
+ reason?: string | undefined;
1597
3343
  } | undefined;
1598
3344
  } | null;
1599
3345
  }[];
@@ -1611,6 +3357,136 @@ declare class ConversationsApi {
1611
3357
  };
1612
3358
  accepted_at: string;
1613
3359
  }>;
3360
+ listConversations(id: string, options?: RequestOptions): Promise<{
3361
+ conversation_id: string | null;
3362
+ workspace_id: string;
3363
+ legacy: boolean;
3364
+ status: "deleted" | "expired" | "retained";
3365
+ message_count: number;
3366
+ turn_count: number;
3367
+ last_activity_at: string;
3368
+ expires_at: string | null;
3369
+ }[]>;
3370
+ read(id: string, conversationId: string, query?: CursorListQuery, options?: RequestOptions): Promise<{
3371
+ conversation: {
3372
+ conversation_id: string | null;
3373
+ workspace_id: string;
3374
+ legacy: boolean;
3375
+ status: "deleted" | "expired" | "retained";
3376
+ message_count: number;
3377
+ turn_count: number;
3378
+ last_activity_at: string;
3379
+ expires_at: string | null;
3380
+ };
3381
+ protocol: {
3382
+ schema: "pocketcoder.conversation/v2";
3383
+ request_identity_authorities: ("external" | "generic")[];
3384
+ producer_capabilities: null;
3385
+ };
3386
+ items: {
3387
+ message_id: string;
3388
+ role: "user" | "assistant" | "system" | "tool";
3389
+ content: string;
3390
+ occurred_at: string;
3391
+ metadata: Record<string, string>;
3392
+ seq: number;
3393
+ identity: {
3394
+ schema: "pocketcoder.conversation/v2";
3395
+ authority: "external" | "generic";
3396
+ conversation_id: string;
3397
+ request_id: string;
3398
+ turn_id: string;
3399
+ request_fingerprint: string;
3400
+ event_id: string;
3401
+ message_id: string;
3402
+ sequence: number;
3403
+ revision: number;
3404
+ fact?: {
3405
+ type: "intermediate";
3406
+ } | {
3407
+ type: "final_response";
3408
+ } | {
3409
+ type: "tool_only";
3410
+ } | {
3411
+ type: "activity_started";
3412
+ activity_id: string;
3413
+ kind: "workspace" | "tool" | "attachment" | "retrieval";
3414
+ label: string;
3415
+ started_at: string | null;
3416
+ action?: string | undefined;
3417
+ subject?: string | undefined;
3418
+ } | {
3419
+ type: "activity_finished";
3420
+ activity_id: string;
3421
+ ended_at: string | null;
3422
+ outcome: "failed" | "canceled" | "completed" | "interrupted";
3423
+ } | {
3424
+ type: "turn_terminal";
3425
+ outcome: "failed" | "canceled" | "completed" | "interrupted" | "lost";
3426
+ reason?: string | undefined;
3427
+ } | undefined;
3428
+ } | null;
3429
+ }[];
3430
+ nextCursor: string | null;
3431
+ }>;
3432
+ delete(id: string, conversationId: string, options?: RequestOptions): Promise<void>;
3433
+ live(id: string, options?: {
3434
+ conversationId?: string;
3435
+ signal?: AbortSignal;
3436
+ }): AsyncGenerator<{
3437
+ type: "turn";
3438
+ conversation_id: string;
3439
+ turn_id: string;
3440
+ messages: {
3441
+ metadata: Record<string, string>;
3442
+ message_id: string;
3443
+ role: "user" | "assistant" | "system" | "tool";
3444
+ content: string;
3445
+ occurred_at: string;
3446
+ identity: {
3447
+ schema: "pocketcoder.conversation/v2";
3448
+ authority: "external" | "generic";
3449
+ conversation_id: string;
3450
+ request_id: string;
3451
+ turn_id: string;
3452
+ request_fingerprint: string;
3453
+ event_id: string;
3454
+ message_id: string;
3455
+ sequence: number;
3456
+ revision: number;
3457
+ fact?: {
3458
+ type: "intermediate";
3459
+ } | {
3460
+ type: "final_response";
3461
+ } | {
3462
+ type: "tool_only";
3463
+ } | {
3464
+ type: "activity_started";
3465
+ activity_id: string;
3466
+ kind: "workspace" | "tool" | "attachment" | "retrieval";
3467
+ label: string;
3468
+ started_at: string | null;
3469
+ action?: string | undefined;
3470
+ subject?: string | undefined;
3471
+ } | {
3472
+ type: "activity_finished";
3473
+ activity_id: string;
3474
+ ended_at: string | null;
3475
+ outcome: "failed" | "canceled" | "completed" | "interrupted";
3476
+ } | {
3477
+ type: "turn_terminal";
3478
+ outcome: "failed" | "canceled" | "completed" | "interrupted" | "lost";
3479
+ reason?: string | undefined;
3480
+ } | undefined;
3481
+ } | null;
3482
+ }[];
3483
+ } | {
3484
+ type: "committed";
3485
+ conversation_id: string | null;
3486
+ turn_id: string | null;
3487
+ status: "message" | "failed" | "canceled" | "completed" | "interrupted" | "lost" | "legacy";
3488
+ last_seq: number;
3489
+ }, void, any>;
1614
3490
  }
1615
3491
  //#endregion
1616
3492
  //#region src/resources/diagnostics/diagnostics.d.ts
@@ -1631,7 +3507,30 @@ declare class NetworkEventsApi extends WorkspaceCursorApi<NetworkEvent> {
1631
3507
  constructor(transport: PocketCoderTransport);
1632
3508
  }
1633
3509
  declare class OutputsApi extends WorkspaceCursorApi<OutputResource> {
3510
+ private readonly binaryTransport;
3511
+ download(workspaceId: string, outputId: string, options?: RequestOptions): Promise<Response>;
3512
+ constructor(transport: PocketCoderTransport);
3513
+ }
3514
+ //#endregion
3515
+ //#region src/resources/displays/displays.d.ts
3516
+ declare class DisplaysApi {
3517
+ private readonly transport;
1634
3518
  constructor(transport: PocketCoderTransport);
3519
+ capture(workspaceId: string, options?: RequestOptions): Promise<{
3520
+ kind: "screenshot";
3521
+ id: string;
3522
+ workspace_id: string;
3523
+ content_type: "image/png";
3524
+ bytes: number;
3525
+ digest: string;
3526
+ expires_at: string;
3527
+ }>;
3528
+ open(workspaceId: string, control?: boolean, options?: RequestOptions & {
3529
+ session?: ViewSessionOptions;
3530
+ }): Promise<{
3531
+ url: string;
3532
+ expires_at: string;
3533
+ }>;
1635
3534
  }
1636
3535
  //#endregion
1637
3536
  //#region src/resources/keys/keys.d.ts
@@ -1649,6 +3548,8 @@ declare class KeysApi {
1649
3548
  principal_id: string;
1650
3549
  scopes: string[];
1651
3550
  effective_scopes: string[];
3551
+ templates: string[] | null;
3552
+ effective_templates: string[];
1652
3553
  managed_principal_ids: string[];
1653
3554
  issuance_request_id: string | null;
1654
3555
  created_at: string;
@@ -1663,6 +3564,8 @@ declare class KeysApi {
1663
3564
  principal_id: string;
1664
3565
  scopes: string[];
1665
3566
  effective_scopes: string[];
3567
+ templates: string[] | null;
3568
+ effective_templates: string[];
1666
3569
  managed_principal_ids: string[];
1667
3570
  issuance_request_id: string | null;
1668
3571
  created_at: string;
@@ -1670,12 +3573,50 @@ declare class KeysApi {
1670
3573
  revoked_at: string | null;
1671
3574
  last_used_at: string | null;
1672
3575
  }, void, unknown>;
3576
+ expiring(query?: {
3577
+ withinHours?: number;
3578
+ }, options?: RequestOptions): Promise<{
3579
+ items: {
3580
+ id: string;
3581
+ principal_id: string;
3582
+ scopes: string[];
3583
+ effective_scopes: string[];
3584
+ templates: string[] | null;
3585
+ effective_templates: string[];
3586
+ managed_principal_ids: string[];
3587
+ issuance_request_id: string | null;
3588
+ created_at: string;
3589
+ expires_at: string | null;
3590
+ revoked_at: string | null;
3591
+ last_used_at: string | null;
3592
+ principal_name: string;
3593
+ }[];
3594
+ }>;
1673
3595
  issue(principalId: string, input: KeyIssueRequest, options?: RequestOptions): Promise<{
1674
3596
  key: {
1675
3597
  id: string;
1676
3598
  principal_id: string;
1677
3599
  scopes: string[];
1678
3600
  effective_scopes: string[];
3601
+ templates: string[] | null;
3602
+ effective_templates: string[];
3603
+ managed_principal_ids: string[];
3604
+ issuance_request_id: string | null;
3605
+ created_at: string;
3606
+ expires_at: string | null;
3607
+ revoked_at: string | null;
3608
+ last_used_at: string | null;
3609
+ };
3610
+ token: string | null;
3611
+ }>;
3612
+ rotate(principalId: string, keyId: string, input: KeyRotateRequest, options?: RequestOptions): Promise<{
3613
+ key: {
3614
+ id: string;
3615
+ principal_id: string;
3616
+ scopes: string[];
3617
+ effective_scopes: string[];
3618
+ templates: string[] | null;
3619
+ effective_templates: string[];
1679
3620
  managed_principal_ids: string[];
1680
3621
  issuance_request_id: string | null;
1681
3622
  created_at: string;
@@ -1698,7 +3639,7 @@ declare class RecoveryApi {
1698
3639
  purge(principalId: string, workspaceId: string, executionKey: string, options?: RequestOptions): Promise<{
1699
3640
  id: string;
1700
3641
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1701
- state: "failed" | "succeeded" | "running" | "pending";
3642
+ state: "failed" | "pending" | "running" | "succeeded";
1702
3643
  workspace_id: string | null;
1703
3644
  checkpoint_id: string | null;
1704
3645
  result_workspace_id: string | null;
@@ -1710,7 +3651,7 @@ declare class RecoveryApi {
1710
3651
  operation(principalId: string, operationId: string, options?: RequestOptions): Promise<{
1711
3652
  id: string;
1712
3653
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1713
- state: "failed" | "succeeded" | "running" | "pending";
3654
+ state: "failed" | "pending" | "running" | "succeeded";
1714
3655
  workspace_id: string | null;
1715
3656
  checkpoint_id: string | null;
1716
3657
  result_workspace_id: string | null;
@@ -1721,6 +3662,86 @@ declare class RecoveryApi {
1721
3662
  }>;
1722
3663
  }
1723
3664
  //#endregion
3665
+ //#region src/resources/previews/previews.d.ts
3666
+ declare class PreviewsApi {
3667
+ private readonly transport;
3668
+ constructor(transport: PocketCoderTransport);
3669
+ list(workspaceId: string, options?: RequestOptions): Promise<{
3670
+ name: string;
3671
+ port: number;
3672
+ }[]>;
3673
+ open(workspaceId: string, name: string, options?: RequestOptions & {
3674
+ session?: ViewSessionOptions;
3675
+ }): Promise<{
3676
+ url: string;
3677
+ expires_at: string;
3678
+ }>;
3679
+ }
3680
+ //#endregion
3681
+ //#region src/resources/principals/principals.d.ts
3682
+ declare class PrincipalsApi {
3683
+ private readonly transport;
3684
+ constructor(transport: PocketCoderTransport);
3685
+ list(options?: RequestOptions): Promise<{
3686
+ items: {
3687
+ id: string;
3688
+ name: string;
3689
+ scopes: string[];
3690
+ templates: string[];
3691
+ disabled_at: string | null;
3692
+ created_at: string;
3693
+ }[];
3694
+ }>;
3695
+ get(principalId: string, options?: RequestOptions): Promise<{
3696
+ id: string;
3697
+ name: string;
3698
+ scopes: string[];
3699
+ templates: string[];
3700
+ disabled_at: string | null;
3701
+ created_at: string;
3702
+ }>;
3703
+ create(input: PrincipalCreateRequest, options?: RequestOptions): Promise<{
3704
+ id: string;
3705
+ name: string;
3706
+ scopes: string[];
3707
+ templates: string[];
3708
+ disabled_at: string | null;
3709
+ created_at: string;
3710
+ }>;
3711
+ update(principalId: string, input: PrincipalUpdateRequest, options?: RequestOptions): Promise<{
3712
+ id: string;
3713
+ name: string;
3714
+ scopes: string[];
3715
+ templates: string[];
3716
+ disabled_at: string | null;
3717
+ created_at: string;
3718
+ }>;
3719
+ }
3720
+ //#endregion
3721
+ //#region src/resources/secrets/secrets.d.ts
3722
+ declare class SecretsApi {
3723
+ private readonly transport;
3724
+ constructor(transport: PocketCoderTransport);
3725
+ put(name: string, input: SecretPutRequest, options?: RequestOptions): Promise<{
3726
+ name: string;
3727
+ type: "setup-issuer" | "runtime-issuer" | "registry";
3728
+ updated_at: string;
3729
+ retired_at: string | null;
3730
+ }>;
3731
+ list(options?: RequestOptions): Promise<{
3732
+ name: string;
3733
+ type: "setup-issuer" | "runtime-issuer" | "registry";
3734
+ updated_at: string;
3735
+ retired_at: string | null;
3736
+ }[]>;
3737
+ retire(name: string, options?: RequestOptions): Promise<{
3738
+ name: string;
3739
+ type: "setup-issuer" | "runtime-issuer" | "registry";
3740
+ updated_at: string;
3741
+ retired_at: string | null;
3742
+ }>;
3743
+ }
3744
+ //#endregion
1724
3745
  //#region src/resources/templates/templates.d.ts
1725
3746
  type TemplateSummary = TemplateListItem;
1726
3747
  declare class TemplatesApi {
@@ -1730,6 +3751,10 @@ declare class TemplatesApi {
1730
3751
  name: string;
1731
3752
  version: string;
1732
3753
  digest: string;
3754
+ agent: {
3755
+ type: string;
3756
+ model: string | null;
3757
+ } | null;
1733
3758
  status: "active" | "available" | "retired";
1734
3759
  description?: string | undefined;
1735
3760
  }>>;
@@ -1737,9 +3762,35 @@ declare class TemplatesApi {
1737
3762
  name: string;
1738
3763
  version: string;
1739
3764
  digest: string;
3765
+ agent: {
3766
+ type: string;
3767
+ model: string | null;
3768
+ } | null;
1740
3769
  status: "active" | "available" | "retired";
1741
3770
  description?: string | undefined;
1742
3771
  }[]>;
3772
+ publish(manifest: TemplateManifest | WorkloadTemplate, options?: RequestOptions): Promise<{
3773
+ name: string;
3774
+ version: string;
3775
+ digest: string;
3776
+ agent: {
3777
+ type: string;
3778
+ model: string | null;
3779
+ } | null;
3780
+ status: "active" | "available" | "retired";
3781
+ description?: string | undefined;
3782
+ }>;
3783
+ retire(name: string, version: string, options?: RequestOptions): Promise<{
3784
+ name: string;
3785
+ version: string;
3786
+ digest: string;
3787
+ agent: {
3788
+ type: string;
3789
+ model: string | null;
3790
+ } | null;
3791
+ status: "active" | "available" | "retired";
3792
+ description?: string | undefined;
3793
+ }>;
1743
3794
  }
1744
3795
  //#endregion
1745
3796
  //#region src/resources/terminals/terminals.d.ts
@@ -1782,8 +3833,11 @@ declare class TerminalsApi {
1782
3833
  //#region src/client.d.ts
1783
3834
  declare class PocketCoderClient {
1784
3835
  private readonly transport;
3836
+ readonly secrets: SecretsApi;
1785
3837
  readonly templates: TemplatesApi;
1786
3838
  readonly workspaces: WorkspacesApi;
3839
+ readonly previews: PreviewsApi;
3840
+ readonly displays: DisplaysApi;
1787
3841
  readonly attachments: AttachmentsApi;
1788
3842
  readonly agent: AgentApi;
1789
3843
  readonly conversations: ConversationsApi;
@@ -1794,6 +3848,7 @@ declare class PocketCoderClient {
1794
3848
  readonly outputs: OutputsApi;
1795
3849
  readonly administration: AdministrationApi;
1796
3850
  readonly terminals: TerminalsApi;
3851
+ readonly principals: PrincipalsApi;
1797
3852
  readonly keys: KeysApi;
1798
3853
  readonly recovery: RecoveryApi;
1799
3854
  constructor(config: PocketCoderClientConfig, fetchImpl?: typeof fetch);
@@ -1868,4 +3923,4 @@ declare class AgentNotReadyError extends Error {
1868
3923
  }
1869
3924
  declare function isPocketCoderErrorCode(value: unknown): value is ErrorCode;
1870
3925
  //#endregion
1871
- export { AdministrationApi, AgentApi, type AgentMessageInput, AgentNotReadyError, type AttachmentDescriptor, type AttachmentUploadInput, AttachmentsApi, type CheckpointResource, type CheckpointState, CheckpointsApi, type ClientErrorCode, ConversationGoneError, type ConversationMessage, type ConversationMessageIdentity, type ConversationPage, type ConversationRequestIdentity, ConversationsApi, type CursorListQuery, type KeyIssueRequest, type KeyIssueResponse, type KeyListQuery, type KeyListResponse, type KeyResource, KeysApi, type LogChunk, LogsApi, type NetworkEvent, NetworkEventsApi, type OperationKind, type OperationResource, type OperationState, OperationsApi, type OutputResource, OutputsApi, type Page, PocketCoderClient, type PocketCoderClientConfig, PocketCoderError, type PreserveRequest, RecoveryApi, type RequestOptions, type ResolveWorkspaceTurnOptions, type ResolvedWorkspaceTurn, type RestoreRequest, type ResumeWorkspaceContext, type ServerTerminalMessage, type StorageState, TERMINAL_WORKSPACE_STATES, type TemplateSummary, TemplatesApi, type TerminalConnectOptions, TerminalConnection, type TerminalSession, TerminalsApi, type WebSocketFactory, type WorkspaceCreateInput, type WorkspaceListQuery, type WorkspaceResource, type WorkspaceState, type WorkspaceSummary, WorkspaceTerminalError, WorkspaceTurnResolutionError, type WorkspaceTurnResolutionErrorCode, WorkspaceTurnResolver, type WorkspaceTurnResolverOptions, WorkspacesApi, isPocketCoderErrorCode, splitAttachmentManifest };
3926
+ export { type AcceptedInputManifest, AdministrationApi, AgentApi, type AgentInterruptResponse, type AgentMessageInput, AgentNotReadyError, type AttachmentDescriptor, type AttachmentUploadInput, AttachmentsApi, type BrowserAction, type CheckpointResource, type CheckpointState, CheckpointsApi, type ClientErrorCode, ConversationGoneError, type ConversationMessage, type ConversationMessageIdentity, type ConversationMessageInput, type ConversationPage, type ConversationRequestIdentity, ConversationsApi, type CredentialSlot, type CursorListQuery, type ExportObjectReference, type InputObjectReference, type InstalledWorkload, type KeyIssueRequest, type KeyIssueResponse, type KeyListQuery, type KeyListResponse, type KeyResource, KeysApi, type LogChunk, LogsApi, type NetworkEvent, NetworkEventsApi, type OperationKind, type OperationResource, type OperationState, OperationsApi, type OutputResource, OutputsApi, type Page, PocketCoderClient, type PocketCoderClientConfig, PocketCoderError, type PreserveRequest, type PrincipalCreateRequest, type PrincipalResource, type PrincipalUpdateRequest, PrincipalsApi, RecoveryApi, type RequestOptions, type ResolveWorkspaceTurnOptions, type ResolvedWorkspaceTurn, type RestoreRequest, type ResumeWorkspaceContext, type ScreenshotResource, type SecretPutRequest, type SecretResource, SecretsApi, type ServerTerminalMessage, type StorageState, TERMINAL_WORKSPACE_STATES, type TemplateSummary, TemplatesApi, type TerminalConnectOptions, TerminalConnection, type TerminalSession, TerminalsApi, type ViewSessionOptions, type WebSocketFactory, type WorkloadAcceptance, type WorkloadCancel, type WorkloadCapability, type WorkloadDeployment, type WorkloadExecutionReference, type WorkloadExportReference, type WorkloadInputObject, type WorkloadInputProperty, type WorkloadLimits, type WorkloadOperation, type WorkloadTemplate, type WorkloadTemplateSnapshot, type WorkspaceCreateInput, type WorkspaceListQuery, type WorkspaceResource, type WorkspaceState, type WorkspaceSummary, WorkspaceTerminalError, WorkspaceTurnResolutionError, type WorkspaceTurnResolutionErrorCode, WorkspaceTurnResolver, type WorkspaceTurnResolverOptions, WorkspacesApi, isPocketCoderErrorCode, splitAttachmentManifest };