@pstdio/pocketcoder-sdk 0.6.1 → 0.8.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<{
289
568
  path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
569
+ method: z.ZodDefault<z.ZodNullable<z.ZodString>>;
290
570
  occurred_at: z.ZodISODateTime;
291
- decision: z.ZodEnum<{
292
- allow: "allow";
293
- deny: "deny";
294
- }>;
295
571
  transport: z.ZodEnum<{
296
572
  http: "http";
297
573
  https: "https";
298
574
  }>;
299
- host: z.ZodString;
300
575
  port: z.ZodNumber;
301
- method: z.ZodDefault<z.ZodNullable<z.ZodString>>;
302
- matched_rule: z.ZodDefault<z.ZodNullable<z.ZodString>>;
303
576
  reason: z.ZodString;
577
+ decision: z.ZodEnum<{
578
+ allow: "allow";
579
+ deny: "deny";
580
+ }>;
581
+ host: z.ZodString;
582
+ matched_rule: z.ZodDefault<z.ZodNullable<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";
650
+ failed: "failed";
324
651
  creating: "creating";
325
652
  ready: "ready";
326
- 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,17 +677,17 @@ 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";
360
685
  }>;
361
686
  state: z.ZodEnum<{
362
- failed: "failed";
363
687
  pending: "pending";
364
688
  running: "running";
365
689
  succeeded: "succeeded";
690
+ failed: "failed";
366
691
  }>;
367
692
  workspace_id: z.ZodNullable<z.ZodUUID>;
368
693
  checkpoint_id: z.ZodNullable<z.ZodUUID>;
@@ -382,9 +707,21 @@ declare const RestoreRequestSchema: z.ZodObject<{
382
707
  external_id: z.ZodString;
383
708
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
384
709
  launch_input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
710
+ template_version: z.ZodOptional<z.ZodString>;
385
711
  }, z.core.$strip>;
386
712
  type RestoreRequest = z.infer<typeof RestoreRequestSchema>;
387
713
  //#endregion
714
+ //#region ../contracts/src/previews/view-session.d.ts
715
+ declare const ViewSessionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
716
+ mode: z.ZodLiteral<"local">;
717
+ }, z.core.$strict>, z.ZodObject<{
718
+ mode: z.ZodLiteral<"top_level">;
719
+ }, z.core.$strict>, z.ZodObject<{
720
+ mode: z.ZodLiteral<"embedded">;
721
+ parentOrigin: z.ZodString;
722
+ }, z.core.$strict>], "mode">;
723
+ type ViewSessionOptions = z.infer<typeof ViewSessionSchema>;
724
+ //#endregion
388
725
  //#region ../contracts/src/protocol/api.d.ts
389
726
  declare const OutputResourceSchema: z.ZodObject<{
390
727
  seq: z.ZodNumber;
@@ -399,6 +736,13 @@ declare const WORKSPACE_STATES: readonly ["queued", "provisioning", "connected",
399
736
  type WorkspaceState = (typeof WORKSPACE_STATES)[number];
400
737
  declare const AGENT_STATES: readonly ["unknown", "running", "stable"];
401
738
  type AgentState = (typeof AGENT_STATES)[number];
739
+ declare const AgentInterruptResponseSchema: z.ZodObject<{
740
+ status: z.ZodEnum<{
741
+ requested: "requested";
742
+ idle: "idle";
743
+ }>;
744
+ }, z.core.$strip>;
745
+ type AgentInterruptResponse = z.infer<typeof AgentInterruptResponseSchema>;
402
746
  declare const WorkspaceCreateRequestSchema: z.ZodObject<{
403
747
  external_id: z.ZodString;
404
748
  template: z.ZodObject<{
@@ -422,20 +766,31 @@ declare const WorkspaceResourceSchema: z.ZodObject<{
422
766
  version: z.ZodString;
423
767
  digest: z.ZodString;
424
768
  }, z.core.$strip>;
769
+ agent: z.ZodNullable<z.ZodObject<{
770
+ type: z.ZodString;
771
+ model: z.ZodNullable<z.ZodString>;
772
+ }, z.core.$strip>>;
425
773
  state: z.ZodEnum<{
774
+ succeeded: "succeeded";
775
+ failed: "failed";
776
+ ready: "ready";
426
777
  queued: "queued";
427
778
  provisioning: "provisioning";
428
779
  connected: "connected";
429
- ready: "ready";
430
780
  preserving: "preserving";
431
781
  terminating: "terminating";
432
- succeeded: "succeeded";
433
- failed: "failed";
434
782
  canceled: "canceled";
435
783
  expired: "expired";
436
784
  preserved: "preserved";
437
785
  }>;
438
786
  reason_code: z.ZodNullable<z.ZodEnum<{
787
+ admission_global_capacity: "admission_global_capacity";
788
+ admission_principal_capacity: "admission_principal_capacity";
789
+ admission_template_capacity: "admission_template_capacity";
790
+ admission_policy_global_capacity: "admission_policy_global_capacity";
791
+ admission_actor_capacity: "admission_actor_capacity";
792
+ admission_denied: "admission_denied";
793
+ admission_unavailable: "admission_unavailable";
439
794
  child_exit_success: "child_exit_success";
440
795
  child_exit_failure: "child_exit_failure";
441
796
  setup_failed: "setup_failed";
@@ -478,8 +833,8 @@ declare const WorkspaceResourceSchema: z.ZodObject<{
478
833
  }>>;
479
834
  network: z.ZodObject<{
480
835
  state: z.ZodEnum<{
481
- ready: "ready";
482
836
  disabled: "disabled";
837
+ ready: "ready";
483
838
  starting: "starting";
484
839
  degraded: "degraded";
485
840
  }>;
@@ -523,6 +878,13 @@ declare const WorkspaceResourceSchema: z.ZodObject<{
523
878
  outputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
524
879
  failure: z.ZodNullable<z.ZodObject<{
525
880
  reason_code: z.ZodEnum<{
881
+ admission_global_capacity: "admission_global_capacity";
882
+ admission_principal_capacity: "admission_principal_capacity";
883
+ admission_template_capacity: "admission_template_capacity";
884
+ admission_policy_global_capacity: "admission_policy_global_capacity";
885
+ admission_actor_capacity: "admission_actor_capacity";
886
+ admission_denied: "admission_denied";
887
+ admission_unavailable: "admission_unavailable";
526
888
  child_exit_success: "child_exit_success";
527
889
  child_exit_failure: "child_exit_failure";
528
890
  setup_failed: "setup_failed";
@@ -562,6 +924,10 @@ declare const TemplateListItemSchema: z.ZodObject<{
562
924
  name: z.ZodString;
563
925
  version: z.ZodString;
564
926
  digest: z.ZodString;
927
+ agent: z.ZodNullable<z.ZodObject<{
928
+ type: z.ZodString;
929
+ model: z.ZodNullable<z.ZodString>;
930
+ }, z.core.$strip>>;
565
931
  description: z.ZodOptional<z.ZodString>;
566
932
  status: z.ZodEnum<{
567
933
  active: "active";
@@ -580,6 +946,1262 @@ declare const LogChunkSchema: z.ZodObject<{
580
946
  }, z.core.$strip>;
581
947
  type LogChunk = z.infer<typeof LogChunkSchema>;
582
948
  //#endregion
949
+ //#region ../contracts/src/templates/workload-input-schema.d.ts
950
+ type WorkloadInputProperty = {
951
+ type: "string" | "number" | "integer" | "boolean" | "null";
952
+ } | {
953
+ type: "array";
954
+ items: WorkloadInputProperty;
955
+ } | WorkloadInputObject;
956
+ interface WorkloadInputObject {
957
+ type: "object";
958
+ properties: Record<string, WorkloadInputProperty>;
959
+ required: string[];
960
+ additionalProperties: false;
961
+ }
962
+ //#endregion
963
+ //#region ../contracts/src/templates/workload-template.d.ts
964
+ declare const WorkloadOperationSchema: z.ZodObject<{
965
+ adapter: z.ZodString;
966
+ inputSchema: z.ZodObject<{
967
+ type: z.ZodLiteral<"object">;
968
+ properties: z.ZodRecord<z.ZodString, z.ZodType<WorkloadInputProperty, unknown, z.core.$ZodTypeInternals<WorkloadInputProperty, unknown>>>;
969
+ required: z.ZodDefault<z.ZodArray<z.ZodString>>;
970
+ additionalProperties: z.ZodLiteral<false>;
971
+ }, z.core.$strict>;
972
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
973
+ "ready-without-task": "ready-without-task";
974
+ "live-inputs": "live-inputs";
975
+ "immutable-inputs": "immutable-inputs";
976
+ "serial-operations": "serial-operations";
977
+ "retained-exports": "retained-exports";
978
+ "explicit-start": "explicit-start";
979
+ "exact-exit": "exact-exit";
980
+ "targeted-cancel": "targeted-cancel";
981
+ "stop-before-export": "stop-before-export";
982
+ "request-lookup": "request-lookup";
983
+ "deduplicated-accept": "deduplicated-accept";
984
+ "explicit-publication": "explicit-publication";
985
+ "workspace-services": "workspace-services";
986
+ "revocable-preview-grants": "revocable-preview-grants";
987
+ "workspace-cancel": "workspace-cancel";
988
+ "unknown-outcome": "unknown-outcome";
989
+ }>>;
990
+ outputRoots: z.ZodArray<z.ZodString>;
991
+ }, z.core.$strict>;
992
+ type WorkloadOperation = z.infer<typeof WorkloadOperationSchema>;
993
+ declare const WorkloadTemplateBaseSchema: z.ZodObject<{
994
+ apiVersion: z.ZodLiteral<"pocketcoder.dev/v1">;
995
+ kind: z.ZodLiteral<"Template">;
996
+ metadata: z.ZodObject<{
997
+ name: z.ZodString;
998
+ description: z.ZodOptional<z.ZodString>;
999
+ }, z.core.$strict>;
1000
+ spec: z.ZodObject<{
1001
+ version: z.ZodString;
1002
+ image: z.ZodString;
1003
+ runtime: z.ZodObject<{
1004
+ digest: z.ZodString;
1005
+ protocol: z.ZodLiteral<"pocketcoder.workload/v1">;
1006
+ }, z.core.$strict>;
1007
+ profile: z.ZodEnum<{
1008
+ "finite-process": "finite-process";
1009
+ "cloud-interactive": "cloud-interactive";
1010
+ service: "service";
1011
+ }>;
1012
+ adapters: z.ZodRecord<z.ZodString, z.ZodObject<{
1013
+ kind: z.ZodEnum<{
1014
+ agentapi: "agentapi";
1015
+ service: "service";
1016
+ process: "process";
1017
+ pi: "pi";
1018
+ }>;
1019
+ digest: z.ZodString;
1020
+ protocol: z.ZodString;
1021
+ command: z.ZodOptional<z.ZodArray<z.ZodString>>;
1022
+ cwd: z.ZodOptional<z.ZodString>;
1023
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1024
+ service: z.ZodOptional<z.ZodString>;
1025
+ }, z.core.$strict>>;
1026
+ operations: z.ZodRecord<z.ZodString, z.ZodObject<{
1027
+ adapter: z.ZodString;
1028
+ inputSchema: z.ZodObject<{
1029
+ type: z.ZodLiteral<"object">;
1030
+ properties: z.ZodRecord<z.ZodString, z.ZodType<WorkloadInputProperty, unknown, z.core.$ZodTypeInternals<WorkloadInputProperty, unknown>>>;
1031
+ required: z.ZodDefault<z.ZodArray<z.ZodString>>;
1032
+ additionalProperties: z.ZodLiteral<false>;
1033
+ }, z.core.$strict>;
1034
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1035
+ "ready-without-task": "ready-without-task";
1036
+ "live-inputs": "live-inputs";
1037
+ "immutable-inputs": "immutable-inputs";
1038
+ "serial-operations": "serial-operations";
1039
+ "retained-exports": "retained-exports";
1040
+ "explicit-start": "explicit-start";
1041
+ "exact-exit": "exact-exit";
1042
+ "targeted-cancel": "targeted-cancel";
1043
+ "stop-before-export": "stop-before-export";
1044
+ "request-lookup": "request-lookup";
1045
+ "deduplicated-accept": "deduplicated-accept";
1046
+ "explicit-publication": "explicit-publication";
1047
+ "workspace-services": "workspace-services";
1048
+ "revocable-preview-grants": "revocable-preview-grants";
1049
+ "workspace-cancel": "workspace-cancel";
1050
+ "unknown-outcome": "unknown-outcome";
1051
+ }>>;
1052
+ outputRoots: z.ZodArray<z.ZodString>;
1053
+ }, z.core.$strict>>;
1054
+ services: z.ZodRecord<z.ZodString, z.ZodObject<{
1055
+ baseUrl: z.ZodString;
1056
+ required: z.ZodDefault<z.ZodBoolean>;
1057
+ healthPath: z.ZodDefault<z.ZodString>;
1058
+ routes: z.ZodArray<z.ZodObject<{
1059
+ method: z.ZodEnum<{
1060
+ POST: "POST";
1061
+ DELETE: "DELETE";
1062
+ PATCH: "PATCH";
1063
+ PUT: "PUT";
1064
+ GET: "GET";
1065
+ }>;
1066
+ path: z.ZodString;
1067
+ query: z.ZodDefault<z.ZodArray<z.ZodString>>;
1068
+ responseMode: z.ZodDefault<z.ZodEnum<{
1069
+ buffered: "buffered";
1070
+ stream: "stream";
1071
+ }>>;
1072
+ maxRequestBytes: z.ZodDefault<z.ZodNumber>;
1073
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
1074
+ deadlineSeconds: z.ZodDefault<z.ZodNumber>;
1075
+ }, z.core.$strip>>;
1076
+ process: z.ZodOptional<z.ZodObject<{
1077
+ command: z.ZodArray<z.ZodString>;
1078
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1079
+ cwd: z.ZodOptional<z.ZodString>;
1080
+ }, z.core.$strict>>;
1081
+ }, z.core.$strict>>;
1082
+ previews: z.ZodRecord<z.ZodString, z.ZodObject<{
1083
+ port: z.ZodNumber;
1084
+ }, z.core.$strict>>;
1085
+ credentialSlots: z.ZodRecord<z.ZodString, z.ZodObject<{
1086
+ policyRef: z.ZodString;
1087
+ policyVersion: z.ZodString;
1088
+ binding: z.ZodEnum<{
1089
+ "fixed-scope": "fixed-scope";
1090
+ "post-create-grant": "post-create-grant";
1091
+ }>;
1092
+ delivery: z.ZodLiteral<"workspace-expiring-file">;
1093
+ maxLeaseSeconds: z.ZodNumber;
1094
+ }, z.core.$strict>>;
1095
+ resources: z.ZodObject<{
1096
+ cpu: z.ZodString;
1097
+ memory: z.ZodString;
1098
+ ephemeralStorage: z.ZodOptional<z.ZodString>;
1099
+ }, z.core.$strict>;
1100
+ network: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1101
+ mode: z.ZodLiteral<"unrestricted">;
1102
+ }, z.core.$strip>, z.ZodObject<{
1103
+ mode: z.ZodLiteral<"restricted">;
1104
+ allow: z.ZodDefault<z.ZodArray<z.ZodObject<{
1105
+ domain: z.ZodString;
1106
+ ports: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
1107
+ allowPrivate: z.ZodDefault<z.ZodBoolean>;
1108
+ }, z.core.$strip>>>;
1109
+ }, z.core.$strip>], "mode">>;
1110
+ security: z.ZodObject<{
1111
+ uid: z.ZodDefault<z.ZodNumber>;
1112
+ gid: z.ZodDefault<z.ZodNumber>;
1113
+ readOnlyRoot: z.ZodDefault<z.ZodBoolean>;
1114
+ writableMemoryPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
1115
+ dropCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
1116
+ allowPrivilegeEscalation: z.ZodDefault<z.ZodLiteral<false>>;
1117
+ seccomp: z.ZodDefault<z.ZodLiteral<"RuntimeDefault">>;
1118
+ }, z.core.$strict>;
1119
+ limits: z.ZodObject<{
1120
+ deadlineSeconds: z.ZodNumber;
1121
+ finalizationSeconds: z.ZodNumber;
1122
+ inputFileBytes: z.ZodNumber;
1123
+ stagedInputBytes: z.ZodNumber;
1124
+ inputFiles: z.ZodNumber;
1125
+ inFlightTransfers: z.ZodNumber;
1126
+ exportBytes: z.ZodNumber;
1127
+ exportFiles: z.ZodNumber;
1128
+ unreferencedInputRetentionSeconds: z.ZodNumber;
1129
+ exportRetentionSeconds: z.ZodNumber;
1130
+ }, z.core.$strict>;
1131
+ lifecycle: z.ZodOptional<z.ZodObject<{
1132
+ persistence: z.ZodPrefault<z.ZodObject<{
1133
+ mounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
1134
+ name: z.ZodString;
1135
+ target: z.ZodString;
1136
+ maxBytes: z.ZodNumber;
1137
+ maxFiles: z.ZodNumber;
1138
+ }, z.core.$strip>>>;
1139
+ conversationRestore: z.ZodDefault<z.ZodEnum<{
1140
+ unknown: "unknown";
1141
+ supported: "supported";
1142
+ filesystem_only: "filesystem_only";
1143
+ }>>;
1144
+ conversationRetention: z.ZodDefault<z.ZodString>;
1145
+ sessionCompatibility: z.ZodOptional<z.ZodString>;
1146
+ checkpoint: z.ZodPrefault<z.ZodObject<{
1147
+ onIdle: z.ZodDefault<z.ZodEnum<{
1148
+ preserve: "preserve";
1149
+ destroy: "destroy";
1150
+ }>>;
1151
+ onDeadline: z.ZodDefault<z.ZodEnum<{
1152
+ preserve: "preserve";
1153
+ destroy: "destroy";
1154
+ }>>;
1155
+ onCleanExit: z.ZodDefault<z.ZodEnum<{
1156
+ preserve: "preserve";
1157
+ destroy: "destroy";
1158
+ }>>;
1159
+ onFailure: z.ZodDefault<z.ZodEnum<{
1160
+ preserve: "preserve";
1161
+ destroy: "destroy";
1162
+ "retain-for-recovery": "retain-for-recovery";
1163
+ }>>;
1164
+ retention: z.ZodDefault<z.ZodString>;
1165
+ }, z.core.$strip>>;
1166
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1167
+ name: z.ZodString;
1168
+ mount: z.ZodString;
1169
+ pattern: z.ZodString;
1170
+ maxBytes: z.ZodDefault<z.ZodNumber>;
1171
+ }, z.core.$strip>>>;
1172
+ }, z.core.$strip>>;
1173
+ checkpointHook: z.ZodOptional<z.ZodObject<{
1174
+ command: z.ZodArray<z.ZodString>;
1175
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1176
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1177
+ cwd: z.ZodOptional<z.ZodString>;
1178
+ }, z.core.$strip>>;
1179
+ timeouts: z.ZodOptional<z.ZodObject<{
1180
+ start: z.ZodDefault<z.ZodString>;
1181
+ maxAge: z.ZodDefault<z.ZodString>;
1182
+ idle: z.ZodDefault<z.ZodString>;
1183
+ disconnectGrace: z.ZodDefault<z.ZodString>;
1184
+ terminateGrace: z.ZodDefault<z.ZodString>;
1185
+ }, z.core.$strip>>;
1186
+ maxLaunchInputBytes: z.ZodDefault<z.ZodNumber>;
1187
+ }, z.core.$strict>>;
1188
+ }, z.core.$strict>;
1189
+ }, z.core.$strict>;
1190
+ type WorkloadTemplate = z.infer<typeof WorkloadTemplateBaseSchema>;
1191
+ declare const WorkloadTemplateSnapshotSchema: z.ZodObject<{
1192
+ format: z.ZodLiteral<"pocketcoder.dev/v1">;
1193
+ name: z.ZodString;
1194
+ version: z.ZodString;
1195
+ digest: z.ZodString;
1196
+ manifest: z.ZodObject<{
1197
+ apiVersion: z.ZodLiteral<"pocketcoder.dev/v1">;
1198
+ kind: z.ZodLiteral<"Template">;
1199
+ metadata: z.ZodObject<{
1200
+ name: z.ZodString;
1201
+ description: z.ZodOptional<z.ZodString>;
1202
+ }, z.core.$strict>;
1203
+ spec: z.ZodObject<{
1204
+ version: z.ZodString;
1205
+ image: z.ZodString;
1206
+ runtime: z.ZodObject<{
1207
+ digest: z.ZodString;
1208
+ protocol: z.ZodLiteral<"pocketcoder.workload/v1">;
1209
+ }, z.core.$strict>;
1210
+ profile: z.ZodEnum<{
1211
+ "finite-process": "finite-process";
1212
+ "cloud-interactive": "cloud-interactive";
1213
+ service: "service";
1214
+ }>;
1215
+ adapters: z.ZodRecord<z.ZodString, z.ZodObject<{
1216
+ kind: z.ZodEnum<{
1217
+ agentapi: "agentapi";
1218
+ service: "service";
1219
+ process: "process";
1220
+ pi: "pi";
1221
+ }>;
1222
+ digest: z.ZodString;
1223
+ protocol: z.ZodString;
1224
+ command: z.ZodOptional<z.ZodArray<z.ZodString>>;
1225
+ cwd: z.ZodOptional<z.ZodString>;
1226
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1227
+ service: z.ZodOptional<z.ZodString>;
1228
+ }, z.core.$strict>>;
1229
+ operations: z.ZodRecord<z.ZodString, z.ZodObject<{
1230
+ adapter: z.ZodString;
1231
+ inputSchema: z.ZodObject<{
1232
+ type: z.ZodLiteral<"object">;
1233
+ properties: z.ZodRecord<z.ZodString, z.ZodType<WorkloadInputProperty, unknown, z.core.$ZodTypeInternals<WorkloadInputProperty, unknown>>>;
1234
+ required: z.ZodDefault<z.ZodArray<z.ZodString>>;
1235
+ additionalProperties: z.ZodLiteral<false>;
1236
+ }, z.core.$strict>;
1237
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1238
+ "ready-without-task": "ready-without-task";
1239
+ "live-inputs": "live-inputs";
1240
+ "immutable-inputs": "immutable-inputs";
1241
+ "serial-operations": "serial-operations";
1242
+ "retained-exports": "retained-exports";
1243
+ "explicit-start": "explicit-start";
1244
+ "exact-exit": "exact-exit";
1245
+ "targeted-cancel": "targeted-cancel";
1246
+ "stop-before-export": "stop-before-export";
1247
+ "request-lookup": "request-lookup";
1248
+ "deduplicated-accept": "deduplicated-accept";
1249
+ "explicit-publication": "explicit-publication";
1250
+ "workspace-services": "workspace-services";
1251
+ "revocable-preview-grants": "revocable-preview-grants";
1252
+ "workspace-cancel": "workspace-cancel";
1253
+ "unknown-outcome": "unknown-outcome";
1254
+ }>>;
1255
+ outputRoots: z.ZodArray<z.ZodString>;
1256
+ }, z.core.$strict>>;
1257
+ services: z.ZodRecord<z.ZodString, z.ZodObject<{
1258
+ baseUrl: z.ZodString;
1259
+ required: z.ZodDefault<z.ZodBoolean>;
1260
+ healthPath: z.ZodDefault<z.ZodString>;
1261
+ routes: z.ZodArray<z.ZodObject<{
1262
+ method: z.ZodEnum<{
1263
+ POST: "POST";
1264
+ DELETE: "DELETE";
1265
+ PATCH: "PATCH";
1266
+ PUT: "PUT";
1267
+ GET: "GET";
1268
+ }>;
1269
+ path: z.ZodString;
1270
+ query: z.ZodDefault<z.ZodArray<z.ZodString>>;
1271
+ responseMode: z.ZodDefault<z.ZodEnum<{
1272
+ buffered: "buffered";
1273
+ stream: "stream";
1274
+ }>>;
1275
+ maxRequestBytes: z.ZodDefault<z.ZodNumber>;
1276
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
1277
+ deadlineSeconds: z.ZodDefault<z.ZodNumber>;
1278
+ }, z.core.$strip>>;
1279
+ process: z.ZodOptional<z.ZodObject<{
1280
+ command: z.ZodArray<z.ZodString>;
1281
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1282
+ cwd: z.ZodOptional<z.ZodString>;
1283
+ }, z.core.$strict>>;
1284
+ }, z.core.$strict>>;
1285
+ previews: z.ZodRecord<z.ZodString, z.ZodObject<{
1286
+ port: z.ZodNumber;
1287
+ }, z.core.$strict>>;
1288
+ credentialSlots: z.ZodRecord<z.ZodString, z.ZodObject<{
1289
+ policyRef: z.ZodString;
1290
+ policyVersion: z.ZodString;
1291
+ binding: z.ZodEnum<{
1292
+ "fixed-scope": "fixed-scope";
1293
+ "post-create-grant": "post-create-grant";
1294
+ }>;
1295
+ delivery: z.ZodLiteral<"workspace-expiring-file">;
1296
+ maxLeaseSeconds: z.ZodNumber;
1297
+ }, z.core.$strict>>;
1298
+ resources: z.ZodObject<{
1299
+ cpu: z.ZodString;
1300
+ memory: z.ZodString;
1301
+ ephemeralStorage: z.ZodOptional<z.ZodString>;
1302
+ }, z.core.$strict>;
1303
+ network: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1304
+ mode: z.ZodLiteral<"unrestricted">;
1305
+ }, z.core.$strip>, z.ZodObject<{
1306
+ mode: z.ZodLiteral<"restricted">;
1307
+ allow: z.ZodDefault<z.ZodArray<z.ZodObject<{
1308
+ domain: z.ZodString;
1309
+ ports: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
1310
+ allowPrivate: z.ZodDefault<z.ZodBoolean>;
1311
+ }, z.core.$strip>>>;
1312
+ }, z.core.$strip>], "mode">>;
1313
+ security: z.ZodObject<{
1314
+ uid: z.ZodDefault<z.ZodNumber>;
1315
+ gid: z.ZodDefault<z.ZodNumber>;
1316
+ readOnlyRoot: z.ZodDefault<z.ZodBoolean>;
1317
+ writableMemoryPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
1318
+ dropCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
1319
+ allowPrivilegeEscalation: z.ZodDefault<z.ZodLiteral<false>>;
1320
+ seccomp: z.ZodDefault<z.ZodLiteral<"RuntimeDefault">>;
1321
+ }, z.core.$strict>;
1322
+ limits: z.ZodObject<{
1323
+ deadlineSeconds: z.ZodNumber;
1324
+ finalizationSeconds: z.ZodNumber;
1325
+ inputFileBytes: z.ZodNumber;
1326
+ stagedInputBytes: z.ZodNumber;
1327
+ inputFiles: z.ZodNumber;
1328
+ inFlightTransfers: z.ZodNumber;
1329
+ exportBytes: z.ZodNumber;
1330
+ exportFiles: z.ZodNumber;
1331
+ unreferencedInputRetentionSeconds: z.ZodNumber;
1332
+ exportRetentionSeconds: z.ZodNumber;
1333
+ }, z.core.$strict>;
1334
+ lifecycle: z.ZodOptional<z.ZodObject<{
1335
+ persistence: z.ZodPrefault<z.ZodObject<{
1336
+ mounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
1337
+ name: z.ZodString;
1338
+ target: z.ZodString;
1339
+ maxBytes: z.ZodNumber;
1340
+ maxFiles: z.ZodNumber;
1341
+ }, z.core.$strip>>>;
1342
+ conversationRestore: z.ZodDefault<z.ZodEnum<{
1343
+ unknown: "unknown";
1344
+ supported: "supported";
1345
+ filesystem_only: "filesystem_only";
1346
+ }>>;
1347
+ conversationRetention: z.ZodDefault<z.ZodString>;
1348
+ sessionCompatibility: z.ZodOptional<z.ZodString>;
1349
+ checkpoint: z.ZodPrefault<z.ZodObject<{
1350
+ onIdle: z.ZodDefault<z.ZodEnum<{
1351
+ preserve: "preserve";
1352
+ destroy: "destroy";
1353
+ }>>;
1354
+ onDeadline: z.ZodDefault<z.ZodEnum<{
1355
+ preserve: "preserve";
1356
+ destroy: "destroy";
1357
+ }>>;
1358
+ onCleanExit: z.ZodDefault<z.ZodEnum<{
1359
+ preserve: "preserve";
1360
+ destroy: "destroy";
1361
+ }>>;
1362
+ onFailure: z.ZodDefault<z.ZodEnum<{
1363
+ preserve: "preserve";
1364
+ destroy: "destroy";
1365
+ "retain-for-recovery": "retain-for-recovery";
1366
+ }>>;
1367
+ retention: z.ZodDefault<z.ZodString>;
1368
+ }, z.core.$strip>>;
1369
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1370
+ name: z.ZodString;
1371
+ mount: z.ZodString;
1372
+ pattern: z.ZodString;
1373
+ maxBytes: z.ZodDefault<z.ZodNumber>;
1374
+ }, z.core.$strip>>>;
1375
+ }, z.core.$strip>>;
1376
+ checkpointHook: z.ZodOptional<z.ZodObject<{
1377
+ command: z.ZodArray<z.ZodString>;
1378
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1379
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1380
+ cwd: z.ZodOptional<z.ZodString>;
1381
+ }, z.core.$strip>>;
1382
+ timeouts: z.ZodOptional<z.ZodObject<{
1383
+ start: z.ZodDefault<z.ZodString>;
1384
+ maxAge: z.ZodDefault<z.ZodString>;
1385
+ idle: z.ZodDefault<z.ZodString>;
1386
+ disconnectGrace: z.ZodDefault<z.ZodString>;
1387
+ terminateGrace: z.ZodDefault<z.ZodString>;
1388
+ }, z.core.$strip>>;
1389
+ maxLaunchInputBytes: z.ZodDefault<z.ZodNumber>;
1390
+ }, z.core.$strict>>;
1391
+ }, z.core.$strict>;
1392
+ }, z.core.$strict>;
1393
+ }, z.core.$strict>;
1394
+ type WorkloadTemplateSnapshot = z.infer<typeof WorkloadTemplateSnapshotSchema>;
1395
+ //#endregion
1396
+ //#region ../contracts/src/secrets/credential-slot.d.ts
1397
+ declare const CredentialSlotSchema: z.ZodObject<{
1398
+ policyRef: z.ZodString;
1399
+ policyVersion: z.ZodString;
1400
+ binding: z.ZodEnum<{
1401
+ "fixed-scope": "fixed-scope";
1402
+ "post-create-grant": "post-create-grant";
1403
+ }>;
1404
+ delivery: z.ZodLiteral<"workspace-expiring-file">;
1405
+ maxLeaseSeconds: z.ZodNumber;
1406
+ }, z.core.$strict>;
1407
+ type CredentialSlot = z.infer<typeof CredentialSlotSchema>;
1408
+ //#endregion
1409
+ //#region ../contracts/src/secrets/secret.d.ts
1410
+ declare const SecretPutRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1411
+ type: z.ZodLiteral<"setup-issuer">;
1412
+ value: z.ZodObject<{
1413
+ url: z.ZodURL;
1414
+ authorization: z.ZodString;
1415
+ policy: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1416
+ }, z.core.$strict>;
1417
+ }, z.core.$strict>, z.ZodObject<{
1418
+ type: z.ZodLiteral<"runtime-issuer">;
1419
+ value: z.ZodObject<{
1420
+ url: z.ZodURL;
1421
+ authorization: z.ZodString;
1422
+ policy: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1423
+ }, z.core.$strict>;
1424
+ }, z.core.$strict>, z.ZodObject<{
1425
+ type: z.ZodLiteral<"registry">;
1426
+ value: z.ZodObject<{
1427
+ server: z.ZodString;
1428
+ username: z.ZodString;
1429
+ password: z.ZodString;
1430
+ }, z.core.$strict>;
1431
+ }, z.core.$strict>], "type">;
1432
+ type SecretPutRequest = z.infer<typeof SecretPutRequestSchema>;
1433
+ declare const SecretResourceSchema: z.ZodObject<{
1434
+ name: z.ZodString;
1435
+ type: z.ZodEnum<{
1436
+ "setup-issuer": "setup-issuer";
1437
+ "runtime-issuer": "runtime-issuer";
1438
+ registry: "registry";
1439
+ }>;
1440
+ updated_at: z.ZodISODateTime;
1441
+ retired_at: z.ZodNullable<z.ZodISODateTime>;
1442
+ }, z.core.$strict>;
1443
+ type SecretResource = z.infer<typeof SecretResourceSchema>;
1444
+ //#endregion
1445
+ //#region ../contracts/src/templates/template-alpha-schema.d.ts
1446
+ declare const HarnessSchema: z.ZodObject<{
1447
+ command: z.ZodArray<z.ZodString>;
1448
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1449
+ cwd: z.ZodOptional<z.ZodString>;
1450
+ }, z.core.$strip>;
1451
+ declare const AgentSchema: z.ZodObject<{
1452
+ command: z.ZodArray<z.ZodString>;
1453
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1454
+ cwd: z.ZodOptional<z.ZodString>;
1455
+ model: z.ZodOptional<z.ZodString>;
1456
+ type: z.ZodDefault<z.ZodString>;
1457
+ transport: z.ZodDefault<z.ZodEnum<{
1458
+ pty: "pty";
1459
+ acp: "acp";
1460
+ }>>;
1461
+ termWidth: z.ZodOptional<z.ZodNumber>;
1462
+ stateFile: z.ZodOptional<z.ZodString>;
1463
+ interruptKeys: z.ZodOptional<z.ZodString>;
1464
+ }, z.core.$strip>;
1465
+ declare const ServiceSchema: z.ZodObject<{
1466
+ baseUrl: z.ZodString;
1467
+ required: z.ZodDefault<z.ZodBoolean>;
1468
+ healthPath: z.ZodDefault<z.ZodString>;
1469
+ routes: z.ZodArray<z.ZodObject<{
1470
+ method: z.ZodEnum<{
1471
+ POST: "POST";
1472
+ DELETE: "DELETE";
1473
+ PATCH: "PATCH";
1474
+ PUT: "PUT";
1475
+ GET: "GET";
1476
+ }>;
1477
+ path: z.ZodString;
1478
+ query: z.ZodDefault<z.ZodArray<z.ZodString>>;
1479
+ responseMode: z.ZodDefault<z.ZodEnum<{
1480
+ buffered: "buffered";
1481
+ stream: "stream";
1482
+ }>>;
1483
+ maxRequestBytes: z.ZodDefault<z.ZodNumber>;
1484
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
1485
+ deadlineSeconds: z.ZodDefault<z.ZodNumber>;
1486
+ }, z.core.$strip>>;
1487
+ }, z.core.$strip>;
1488
+ declare const CheckpointHookSchema: z.ZodObject<{
1489
+ command: z.ZodArray<z.ZodString>;
1490
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1491
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1492
+ cwd: z.ZodOptional<z.ZodString>;
1493
+ }, z.core.$strip>;
1494
+ declare const TemplateSpecInputSchema: z.ZodObject<{
1495
+ version: z.ZodString;
1496
+ image: z.ZodString;
1497
+ imagePullSecret: z.ZodOptional<z.ZodString>;
1498
+ command: z.ZodDefault<z.ZodArray<z.ZodString>>;
1499
+ setup: z.ZodDefault<z.ZodArray<z.ZodObject<{
1500
+ name: z.ZodString;
1501
+ command: z.ZodArray<z.ZodString>;
1502
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1503
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1504
+ cwd: z.ZodOptional<z.ZodString>;
1505
+ runOn: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1506
+ restore: "restore";
1507
+ create: "create";
1508
+ }>>>;
1509
+ }, z.core.$strip>>>;
1510
+ agent: z.ZodOptional<z.ZodObject<{
1511
+ command: z.ZodArray<z.ZodString>;
1512
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1513
+ cwd: z.ZodOptional<z.ZodString>;
1514
+ model: z.ZodOptional<z.ZodString>;
1515
+ type: z.ZodDefault<z.ZodString>;
1516
+ transport: z.ZodDefault<z.ZodEnum<{
1517
+ pty: "pty";
1518
+ acp: "acp";
1519
+ }>>;
1520
+ termWidth: z.ZodOptional<z.ZodNumber>;
1521
+ stateFile: z.ZodOptional<z.ZodString>;
1522
+ interruptKeys: z.ZodOptional<z.ZodString>;
1523
+ }, z.core.$strip>>;
1524
+ harness: z.ZodOptional<z.ZodObject<{
1525
+ command: z.ZodArray<z.ZodString>;
1526
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1527
+ cwd: z.ZodOptional<z.ZodString>;
1528
+ }, z.core.$strip>>;
1529
+ terminal: z.ZodOptional<z.ZodObject<{
1530
+ command: z.ZodArray<z.ZodString>;
1531
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1532
+ cwd: z.ZodOptional<z.ZodString>;
1533
+ maxSessions: z.ZodDefault<z.ZodNumber>;
1534
+ idleTimeout: z.ZodDefault<z.ZodString>;
1535
+ }, z.core.$strip>>;
1536
+ previews: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1537
+ port: z.ZodNumber;
1538
+ }, z.core.$strict>>>;
1539
+ display: z.ZodOptional<z.ZodObject<{
1540
+ mode: z.ZodEnum<{
1541
+ desktop: "desktop";
1542
+ browser: "browser";
1543
+ }>;
1544
+ }, z.core.$strict>>;
1545
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1546
+ resources: z.ZodObject<{
1547
+ cpu: z.ZodString;
1548
+ memory: z.ZodString;
1549
+ ephemeralStorage: z.ZodOptional<z.ZodString>;
1550
+ }, z.core.$strip>;
1551
+ timeouts: z.ZodPrefault<z.ZodObject<{
1552
+ start: z.ZodDefault<z.ZodString>;
1553
+ maxAge: z.ZodDefault<z.ZodString>;
1554
+ idle: z.ZodDefault<z.ZodString>;
1555
+ disconnectGrace: z.ZodDefault<z.ZodString>;
1556
+ terminateGrace: z.ZodDefault<z.ZodString>;
1557
+ }, z.core.$strip>>;
1558
+ services: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1559
+ baseUrl: z.ZodString;
1560
+ required: z.ZodDefault<z.ZodBoolean>;
1561
+ healthPath: z.ZodDefault<z.ZodString>;
1562
+ routes: z.ZodArray<z.ZodObject<{
1563
+ method: z.ZodEnum<{
1564
+ POST: "POST";
1565
+ DELETE: "DELETE";
1566
+ PATCH: "PATCH";
1567
+ PUT: "PUT";
1568
+ GET: "GET";
1569
+ }>;
1570
+ path: z.ZodString;
1571
+ query: z.ZodDefault<z.ZodArray<z.ZodString>>;
1572
+ responseMode: z.ZodDefault<z.ZodEnum<{
1573
+ buffered: "buffered";
1574
+ stream: "stream";
1575
+ }>>;
1576
+ maxRequestBytes: z.ZodDefault<z.ZodNumber>;
1577
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
1578
+ deadlineSeconds: z.ZodDefault<z.ZodNumber>;
1579
+ }, z.core.$strip>>;
1580
+ }, z.core.$strip>>>;
1581
+ security: z.ZodPrefault<z.ZodObject<{
1582
+ uid: z.ZodDefault<z.ZodNumber>;
1583
+ gid: z.ZodDefault<z.ZodNumber>;
1584
+ readOnlyRoot: z.ZodDefault<z.ZodBoolean>;
1585
+ writableMemoryPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
1586
+ dropCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
1587
+ allowPrivilegeEscalation: z.ZodDefault<z.ZodLiteral<false>>;
1588
+ seccomp: z.ZodDefault<z.ZodLiteral<"RuntimeDefault">>;
1589
+ }, z.core.$strip>>;
1590
+ network: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1591
+ mode: z.ZodLiteral<"unrestricted">;
1592
+ }, z.core.$strip>, z.ZodObject<{
1593
+ mode: z.ZodLiteral<"restricted">;
1594
+ allow: z.ZodDefault<z.ZodArray<z.ZodObject<{
1595
+ domain: z.ZodString;
1596
+ ports: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
1597
+ allowPrivate: z.ZodDefault<z.ZodBoolean>;
1598
+ }, z.core.$strip>>>;
1599
+ }, z.core.$strip>], "mode">>;
1600
+ maxLaunchInputBytes: z.ZodDefault<z.ZodNumber>;
1601
+ compat: z.ZodDefault<z.ZodObject<{
1602
+ agent: z.ZodOptional<z.ZodString>;
1603
+ agentapi: z.ZodOptional<z.ZodString>;
1604
+ }, z.core.$strip>>;
1605
+ persistence: z.ZodPrefault<z.ZodObject<{
1606
+ mounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
1607
+ name: z.ZodString;
1608
+ target: z.ZodString;
1609
+ maxBytes: z.ZodNumber;
1610
+ maxFiles: z.ZodNumber;
1611
+ }, z.core.$strip>>>;
1612
+ conversationRestore: z.ZodDefault<z.ZodEnum<{
1613
+ unknown: "unknown";
1614
+ supported: "supported";
1615
+ filesystem_only: "filesystem_only";
1616
+ }>>;
1617
+ conversationRetention: z.ZodDefault<z.ZodString>;
1618
+ sessionCompatibility: z.ZodOptional<z.ZodString>;
1619
+ checkpoint: z.ZodPrefault<z.ZodObject<{
1620
+ onIdle: z.ZodDefault<z.ZodEnum<{
1621
+ preserve: "preserve";
1622
+ destroy: "destroy";
1623
+ }>>;
1624
+ onDeadline: z.ZodDefault<z.ZodEnum<{
1625
+ preserve: "preserve";
1626
+ destroy: "destroy";
1627
+ }>>;
1628
+ onCleanExit: z.ZodDefault<z.ZodEnum<{
1629
+ preserve: "preserve";
1630
+ destroy: "destroy";
1631
+ }>>;
1632
+ onFailure: z.ZodDefault<z.ZodEnum<{
1633
+ preserve: "preserve";
1634
+ destroy: "destroy";
1635
+ "retain-for-recovery": "retain-for-recovery";
1636
+ }>>;
1637
+ retention: z.ZodDefault<z.ZodString>;
1638
+ }, z.core.$strip>>;
1639
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1640
+ name: z.ZodString;
1641
+ mount: z.ZodString;
1642
+ pattern: z.ZodString;
1643
+ maxBytes: z.ZodDefault<z.ZodNumber>;
1644
+ }, z.core.$strip>>>;
1645
+ }, z.core.$strip>>;
1646
+ source: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1647
+ kind: z.ZodLiteral<"git">;
1648
+ destinationMount: z.ZodString;
1649
+ repositories: z.ZodRecord<z.ZodString, z.ZodObject<{
1650
+ url: z.ZodURL;
1651
+ credential: z.ZodOptional<z.ZodString>;
1652
+ }, z.core.$strip>>;
1653
+ allowedRevision: z.ZodDefault<z.ZodLiteral<"branch-tag-or-commit">>;
1654
+ }, z.core.$strip>>>;
1655
+ checkpointHook: z.ZodOptional<z.ZodObject<{
1656
+ command: z.ZodArray<z.ZodString>;
1657
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1658
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1659
+ cwd: z.ZodOptional<z.ZodString>;
1660
+ }, z.core.$strip>>;
1661
+ outputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1662
+ type: z.ZodLiteral<"gitSha">;
1663
+ }, z.core.$strip>, z.ZodObject<{
1664
+ type: z.ZodLiteral<"string">;
1665
+ maxLength: z.ZodDefault<z.ZodNumber>;
1666
+ }, z.core.$strip>, z.ZodObject<{
1667
+ type: z.ZodLiteral<"httpsUrl">;
1668
+ maxLength: z.ZodDefault<z.ZodNumber>;
1669
+ }, z.core.$strip>], "type">>>;
1670
+ }, z.core.$strip>;
1671
+ type TemplateSpecCommon = Omit<z.infer<typeof TemplateSpecInputSchema>, "agent" | "harness" | "services" | "checkpointHook">;
1672
+ type Agent = z.infer<typeof AgentSchema>;
1673
+ type Harness = z.infer<typeof HarnessSchema>;
1674
+ type CheckpointHook = z.infer<typeof CheckpointHookSchema>;
1675
+ type TemplateService = z.infer<typeof ServiceSchema>;
1676
+ declare const TemplateManifestBaseSchema: z.ZodObject<{
1677
+ apiVersion: z.ZodLiteral<"pocketcoder.dev/v1alpha1">;
1678
+ kind: z.ZodLiteral<"Template">;
1679
+ metadata: z.ZodObject<{
1680
+ name: z.ZodString;
1681
+ description: z.ZodOptional<z.ZodString>;
1682
+ }, z.core.$strip>;
1683
+ spec: z.ZodPipe<z.ZodObject<{
1684
+ version: z.ZodString;
1685
+ image: z.ZodString;
1686
+ imagePullSecret: z.ZodOptional<z.ZodString>;
1687
+ command: z.ZodDefault<z.ZodArray<z.ZodString>>;
1688
+ setup: z.ZodDefault<z.ZodArray<z.ZodObject<{
1689
+ name: z.ZodString;
1690
+ command: z.ZodArray<z.ZodString>;
1691
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1692
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1693
+ cwd: z.ZodOptional<z.ZodString>;
1694
+ runOn: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1695
+ restore: "restore";
1696
+ create: "create";
1697
+ }>>>;
1698
+ }, z.core.$strip>>>;
1699
+ agent: z.ZodOptional<z.ZodObject<{
1700
+ command: z.ZodArray<z.ZodString>;
1701
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1702
+ cwd: z.ZodOptional<z.ZodString>;
1703
+ model: z.ZodOptional<z.ZodString>;
1704
+ type: z.ZodDefault<z.ZodString>;
1705
+ transport: z.ZodDefault<z.ZodEnum<{
1706
+ pty: "pty";
1707
+ acp: "acp";
1708
+ }>>;
1709
+ termWidth: z.ZodOptional<z.ZodNumber>;
1710
+ stateFile: z.ZodOptional<z.ZodString>;
1711
+ interruptKeys: z.ZodOptional<z.ZodString>;
1712
+ }, z.core.$strip>>;
1713
+ harness: z.ZodOptional<z.ZodObject<{
1714
+ command: z.ZodArray<z.ZodString>;
1715
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1716
+ cwd: z.ZodOptional<z.ZodString>;
1717
+ }, z.core.$strip>>;
1718
+ terminal: z.ZodOptional<z.ZodObject<{
1719
+ command: z.ZodArray<z.ZodString>;
1720
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1721
+ cwd: z.ZodOptional<z.ZodString>;
1722
+ maxSessions: z.ZodDefault<z.ZodNumber>;
1723
+ idleTimeout: z.ZodDefault<z.ZodString>;
1724
+ }, z.core.$strip>>;
1725
+ previews: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1726
+ port: z.ZodNumber;
1727
+ }, z.core.$strict>>>;
1728
+ display: z.ZodOptional<z.ZodObject<{
1729
+ mode: z.ZodEnum<{
1730
+ desktop: "desktop";
1731
+ browser: "browser";
1732
+ }>;
1733
+ }, z.core.$strict>>;
1734
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1735
+ resources: z.ZodObject<{
1736
+ cpu: z.ZodString;
1737
+ memory: z.ZodString;
1738
+ ephemeralStorage: z.ZodOptional<z.ZodString>;
1739
+ }, z.core.$strip>;
1740
+ timeouts: z.ZodPrefault<z.ZodObject<{
1741
+ start: z.ZodDefault<z.ZodString>;
1742
+ maxAge: z.ZodDefault<z.ZodString>;
1743
+ idle: z.ZodDefault<z.ZodString>;
1744
+ disconnectGrace: z.ZodDefault<z.ZodString>;
1745
+ terminateGrace: z.ZodDefault<z.ZodString>;
1746
+ }, z.core.$strip>>;
1747
+ services: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1748
+ baseUrl: z.ZodString;
1749
+ required: z.ZodDefault<z.ZodBoolean>;
1750
+ healthPath: z.ZodDefault<z.ZodString>;
1751
+ routes: z.ZodArray<z.ZodObject<{
1752
+ method: z.ZodEnum<{
1753
+ POST: "POST";
1754
+ DELETE: "DELETE";
1755
+ PATCH: "PATCH";
1756
+ PUT: "PUT";
1757
+ GET: "GET";
1758
+ }>;
1759
+ path: z.ZodString;
1760
+ query: z.ZodDefault<z.ZodArray<z.ZodString>>;
1761
+ responseMode: z.ZodDefault<z.ZodEnum<{
1762
+ buffered: "buffered";
1763
+ stream: "stream";
1764
+ }>>;
1765
+ maxRequestBytes: z.ZodDefault<z.ZodNumber>;
1766
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
1767
+ deadlineSeconds: z.ZodDefault<z.ZodNumber>;
1768
+ }, z.core.$strip>>;
1769
+ }, z.core.$strip>>>;
1770
+ security: z.ZodPrefault<z.ZodObject<{
1771
+ uid: z.ZodDefault<z.ZodNumber>;
1772
+ gid: z.ZodDefault<z.ZodNumber>;
1773
+ readOnlyRoot: z.ZodDefault<z.ZodBoolean>;
1774
+ writableMemoryPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
1775
+ dropCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
1776
+ allowPrivilegeEscalation: z.ZodDefault<z.ZodLiteral<false>>;
1777
+ seccomp: z.ZodDefault<z.ZodLiteral<"RuntimeDefault">>;
1778
+ }, z.core.$strip>>;
1779
+ network: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1780
+ mode: z.ZodLiteral<"unrestricted">;
1781
+ }, z.core.$strip>, z.ZodObject<{
1782
+ mode: z.ZodLiteral<"restricted">;
1783
+ allow: z.ZodDefault<z.ZodArray<z.ZodObject<{
1784
+ domain: z.ZodString;
1785
+ ports: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
1786
+ allowPrivate: z.ZodDefault<z.ZodBoolean>;
1787
+ }, z.core.$strip>>>;
1788
+ }, z.core.$strip>], "mode">>;
1789
+ maxLaunchInputBytes: z.ZodDefault<z.ZodNumber>;
1790
+ compat: z.ZodDefault<z.ZodObject<{
1791
+ agent: z.ZodOptional<z.ZodString>;
1792
+ agentapi: z.ZodOptional<z.ZodString>;
1793
+ }, z.core.$strip>>;
1794
+ persistence: z.ZodPrefault<z.ZodObject<{
1795
+ mounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
1796
+ name: z.ZodString;
1797
+ target: z.ZodString;
1798
+ maxBytes: z.ZodNumber;
1799
+ maxFiles: z.ZodNumber;
1800
+ }, z.core.$strip>>>;
1801
+ conversationRestore: z.ZodDefault<z.ZodEnum<{
1802
+ unknown: "unknown";
1803
+ supported: "supported";
1804
+ filesystem_only: "filesystem_only";
1805
+ }>>;
1806
+ conversationRetention: z.ZodDefault<z.ZodString>;
1807
+ sessionCompatibility: z.ZodOptional<z.ZodString>;
1808
+ checkpoint: z.ZodPrefault<z.ZodObject<{
1809
+ onIdle: z.ZodDefault<z.ZodEnum<{
1810
+ preserve: "preserve";
1811
+ destroy: "destroy";
1812
+ }>>;
1813
+ onDeadline: z.ZodDefault<z.ZodEnum<{
1814
+ preserve: "preserve";
1815
+ destroy: "destroy";
1816
+ }>>;
1817
+ onCleanExit: z.ZodDefault<z.ZodEnum<{
1818
+ preserve: "preserve";
1819
+ destroy: "destroy";
1820
+ }>>;
1821
+ onFailure: z.ZodDefault<z.ZodEnum<{
1822
+ preserve: "preserve";
1823
+ destroy: "destroy";
1824
+ "retain-for-recovery": "retain-for-recovery";
1825
+ }>>;
1826
+ retention: z.ZodDefault<z.ZodString>;
1827
+ }, z.core.$strip>>;
1828
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1829
+ name: z.ZodString;
1830
+ mount: z.ZodString;
1831
+ pattern: z.ZodString;
1832
+ maxBytes: z.ZodDefault<z.ZodNumber>;
1833
+ }, z.core.$strip>>>;
1834
+ }, z.core.$strip>>;
1835
+ source: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1836
+ kind: z.ZodLiteral<"git">;
1837
+ destinationMount: z.ZodString;
1838
+ repositories: z.ZodRecord<z.ZodString, z.ZodObject<{
1839
+ url: z.ZodURL;
1840
+ credential: z.ZodOptional<z.ZodString>;
1841
+ }, z.core.$strip>>;
1842
+ allowedRevision: z.ZodDefault<z.ZodLiteral<"branch-tag-or-commit">>;
1843
+ }, z.core.$strip>>>;
1844
+ checkpointHook: z.ZodOptional<z.ZodObject<{
1845
+ command: z.ZodArray<z.ZodString>;
1846
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1847
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1848
+ cwd: z.ZodOptional<z.ZodString>;
1849
+ }, z.core.$strip>>;
1850
+ outputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1851
+ type: z.ZodLiteral<"gitSha">;
1852
+ }, z.core.$strip>, z.ZodObject<{
1853
+ type: z.ZodLiteral<"string">;
1854
+ maxLength: z.ZodDefault<z.ZodNumber>;
1855
+ }, z.core.$strip>, z.ZodObject<{
1856
+ type: z.ZodLiteral<"httpsUrl">;
1857
+ maxLength: z.ZodDefault<z.ZodNumber>;
1858
+ }, z.core.$strip>], "type">>>;
1859
+ }, z.core.$strip>, z.ZodTransform<(TemplateSpecCommon & {
1860
+ agent: Agent;
1861
+ harness?: never;
1862
+ services?: never;
1863
+ checkpointHook?: never;
1864
+ }) | (TemplateSpecCommon & {
1865
+ agent?: never;
1866
+ harness: Harness;
1867
+ services: Record<string, TemplateService>;
1868
+ checkpointHook?: CheckpointHook;
1869
+ }), {
1870
+ version: string;
1871
+ image: string;
1872
+ command: string[];
1873
+ setup: {
1874
+ name: string;
1875
+ command: string[];
1876
+ timeoutSeconds: number;
1877
+ env: Record<string, string>;
1878
+ runOn: ("restore" | "create")[];
1879
+ cwd?: string | undefined;
1880
+ }[];
1881
+ env: Record<string, string>;
1882
+ resources: {
1883
+ cpu: string;
1884
+ memory: string;
1885
+ ephemeralStorage?: string | undefined;
1886
+ };
1887
+ timeouts: {
1888
+ start: string;
1889
+ maxAge: string;
1890
+ idle: string;
1891
+ disconnectGrace: string;
1892
+ terminateGrace: string;
1893
+ };
1894
+ security: {
1895
+ uid: number;
1896
+ gid: number;
1897
+ readOnlyRoot: boolean;
1898
+ writableMemoryPaths: string[];
1899
+ dropCapabilities: string[];
1900
+ allowPrivilegeEscalation: false;
1901
+ seccomp: "RuntimeDefault";
1902
+ };
1903
+ network: {
1904
+ mode: "unrestricted";
1905
+ } | {
1906
+ mode: "restricted";
1907
+ allow: {
1908
+ domain: string;
1909
+ ports: number[];
1910
+ allowPrivate: boolean;
1911
+ }[];
1912
+ };
1913
+ maxLaunchInputBytes: number;
1914
+ compat: {
1915
+ agent?: string | undefined;
1916
+ agentapi?: string | undefined;
1917
+ };
1918
+ persistence: {
1919
+ mounts: {
1920
+ name: string;
1921
+ target: string;
1922
+ maxBytes: number;
1923
+ maxFiles: number;
1924
+ }[];
1925
+ conversationRestore: "unknown" | "supported" | "filesystem_only";
1926
+ conversationRetention: string;
1927
+ checkpoint: {
1928
+ onIdle: "preserve" | "destroy";
1929
+ onDeadline: "preserve" | "destroy";
1930
+ onCleanExit: "preserve" | "destroy";
1931
+ onFailure: "preserve" | "destroy" | "retain-for-recovery";
1932
+ retention: string;
1933
+ };
1934
+ sessionCompatibility?: string | undefined;
1935
+ artifacts?: {
1936
+ name: string;
1937
+ mount: string;
1938
+ pattern: string;
1939
+ maxBytes: number;
1940
+ }[] | undefined;
1941
+ };
1942
+ source: {
1943
+ kind: "git";
1944
+ destinationMount: string;
1945
+ repositories: Record<string, {
1946
+ url: string;
1947
+ credential?: string | undefined;
1948
+ }>;
1949
+ allowedRevision: "branch-tag-or-commit";
1950
+ } | null;
1951
+ outputs: Record<string, {
1952
+ type: "gitSha";
1953
+ } | {
1954
+ type: "string";
1955
+ maxLength: number;
1956
+ } | {
1957
+ type: "httpsUrl";
1958
+ maxLength: number;
1959
+ }>;
1960
+ imagePullSecret?: string | undefined;
1961
+ agent?: {
1962
+ command: string[];
1963
+ env: Record<string, string>;
1964
+ type: string;
1965
+ transport: "pty" | "acp";
1966
+ cwd?: string | undefined;
1967
+ model?: string | undefined;
1968
+ termWidth?: number | undefined;
1969
+ stateFile?: string | undefined;
1970
+ interruptKeys?: string | undefined;
1971
+ } | undefined;
1972
+ harness?: {
1973
+ command: string[];
1974
+ env: Record<string, string>;
1975
+ cwd?: string | undefined;
1976
+ } | undefined;
1977
+ terminal?: {
1978
+ command: string[];
1979
+ env: Record<string, string>;
1980
+ maxSessions: number;
1981
+ idleTimeout: string;
1982
+ cwd?: string | undefined;
1983
+ } | undefined;
1984
+ previews?: Record<string, {
1985
+ port: number;
1986
+ }> | undefined;
1987
+ display?: {
1988
+ mode: "desktop" | "browser";
1989
+ } | undefined;
1990
+ services?: Record<string, {
1991
+ baseUrl: string;
1992
+ required: boolean;
1993
+ healthPath: string;
1994
+ routes: {
1995
+ method: "POST" | "DELETE" | "PATCH" | "PUT" | "GET";
1996
+ path: string;
1997
+ query: string[];
1998
+ responseMode: "buffered" | "stream";
1999
+ maxRequestBytes: number;
2000
+ maxResponseBytes: number;
2001
+ deadlineSeconds: number;
2002
+ }[];
2003
+ }> | undefined;
2004
+ checkpointHook?: {
2005
+ command: string[];
2006
+ timeoutSeconds: number;
2007
+ env: Record<string, string>;
2008
+ cwd?: string | undefined;
2009
+ } | undefined;
2010
+ }>>;
2011
+ }, z.core.$strip>;
2012
+ type TemplateManifest = z.infer<typeof TemplateManifestBaseSchema>;
2013
+ //#endregion
2014
+ //#region ../contracts/src/templates/workload-admission.d.ts
2015
+ declare const WorkloadDeploymentSchema: z.ZodObject<{
2016
+ workspaceId: z.ZodUUID;
2017
+ incarnationId: z.ZodString;
2018
+ profiles: z.ZodArray<z.ZodEnum<{
2019
+ "finite-process": "finite-process";
2020
+ "cloud-interactive": "cloud-interactive";
2021
+ service: "service";
2022
+ }>>;
2023
+ storageProfiles: z.ZodArray<z.ZodEnum<{
2024
+ "controller-readonly/v1": "controller-readonly/v1";
2025
+ "shared-writer-readonly/v1": "shared-writer-readonly/v1";
2026
+ }>>;
2027
+ ceilings: z.ZodObject<{
2028
+ deadlineSeconds: z.ZodNumber;
2029
+ finalizationSeconds: z.ZodNumber;
2030
+ inputFileBytes: z.ZodNumber;
2031
+ stagedInputBytes: z.ZodNumber;
2032
+ inputFiles: z.ZodNumber;
2033
+ inFlightTransfers: z.ZodNumber;
2034
+ exportBytes: z.ZodNumber;
2035
+ exportFiles: z.ZodNumber;
2036
+ unreferencedInputRetentionSeconds: z.ZodNumber;
2037
+ exportRetentionSeconds: z.ZodNumber;
2038
+ }, z.core.$strict>;
2039
+ now: z.ZodISODateTime;
2040
+ expiresAt: z.ZodISODateTime;
2041
+ installed: z.ZodOptional<z.ZodObject<{
2042
+ workspaceId: z.ZodUUID;
2043
+ incarnationId: z.ZodString;
2044
+ templateDigest: z.ZodString;
2045
+ image: z.ZodString;
2046
+ runtime: z.ZodObject<{
2047
+ digest: z.ZodString;
2048
+ protocol: z.ZodLiteral<"pocketcoder.workload/v1">;
2049
+ }, z.core.$strict>;
2050
+ storage: z.ZodObject<{
2051
+ identity: z.ZodString;
2052
+ profile: z.ZodEnum<{
2053
+ "controller-readonly/v1": "controller-readonly/v1";
2054
+ "shared-writer-readonly/v1": "shared-writer-readonly/v1";
2055
+ }>;
2056
+ }, z.core.$strict>;
2057
+ capabilities: z.ZodArray<z.ZodEnum<{
2058
+ "ready-without-task": "ready-without-task";
2059
+ "live-inputs": "live-inputs";
2060
+ "immutable-inputs": "immutable-inputs";
2061
+ "serial-operations": "serial-operations";
2062
+ "retained-exports": "retained-exports";
2063
+ "explicit-start": "explicit-start";
2064
+ "exact-exit": "exact-exit";
2065
+ "targeted-cancel": "targeted-cancel";
2066
+ "stop-before-export": "stop-before-export";
2067
+ "request-lookup": "request-lookup";
2068
+ "deduplicated-accept": "deduplicated-accept";
2069
+ "explicit-publication": "explicit-publication";
2070
+ "workspace-services": "workspace-services";
2071
+ "revocable-preview-grants": "revocable-preview-grants";
2072
+ "workspace-cancel": "workspace-cancel";
2073
+ "unknown-outcome": "unknown-outcome";
2074
+ }>>;
2075
+ adapters: z.ZodRecord<z.ZodString, z.ZodObject<{
2076
+ kind: z.ZodEnum<{
2077
+ agentapi: "agentapi";
2078
+ service: "service";
2079
+ process: "process";
2080
+ pi: "pi";
2081
+ }>;
2082
+ digest: z.ZodString;
2083
+ protocol: z.ZodString;
2084
+ capabilities: z.ZodArray<z.ZodEnum<{
2085
+ "ready-without-task": "ready-without-task";
2086
+ "live-inputs": "live-inputs";
2087
+ "immutable-inputs": "immutable-inputs";
2088
+ "serial-operations": "serial-operations";
2089
+ "retained-exports": "retained-exports";
2090
+ "explicit-start": "explicit-start";
2091
+ "exact-exit": "exact-exit";
2092
+ "targeted-cancel": "targeted-cancel";
2093
+ "stop-before-export": "stop-before-export";
2094
+ "request-lookup": "request-lookup";
2095
+ "deduplicated-accept": "deduplicated-accept";
2096
+ "explicit-publication": "explicit-publication";
2097
+ "workspace-services": "workspace-services";
2098
+ "revocable-preview-grants": "revocable-preview-grants";
2099
+ "workspace-cancel": "workspace-cancel";
2100
+ "unknown-outcome": "unknown-outcome";
2101
+ }>>;
2102
+ }, z.core.$strict>>;
2103
+ }, z.core.$strict>>;
2104
+ }, z.core.$strict>;
2105
+ type WorkloadDeployment = z.infer<typeof WorkloadDeploymentSchema>;
2106
+ //#endregion
2107
+ //#region ../contracts/src/templates/workload-capabilities.d.ts
2108
+ declare const WorkloadCapabilitySchema: z.ZodEnum<{
2109
+ "ready-without-task": "ready-without-task";
2110
+ "live-inputs": "live-inputs";
2111
+ "immutable-inputs": "immutable-inputs";
2112
+ "serial-operations": "serial-operations";
2113
+ "retained-exports": "retained-exports";
2114
+ "explicit-start": "explicit-start";
2115
+ "exact-exit": "exact-exit";
2116
+ "targeted-cancel": "targeted-cancel";
2117
+ "stop-before-export": "stop-before-export";
2118
+ "request-lookup": "request-lookup";
2119
+ "deduplicated-accept": "deduplicated-accept";
2120
+ "explicit-publication": "explicit-publication";
2121
+ "workspace-services": "workspace-services";
2122
+ "revocable-preview-grants": "revocable-preview-grants";
2123
+ "workspace-cancel": "workspace-cancel";
2124
+ "unknown-outcome": "unknown-outcome";
2125
+ }>;
2126
+ type WorkloadCapability = z.infer<typeof WorkloadCapabilitySchema>;
2127
+ declare const WorkloadLimitsSchema: z.ZodObject<{
2128
+ deadlineSeconds: z.ZodNumber;
2129
+ finalizationSeconds: z.ZodNumber;
2130
+ inputFileBytes: z.ZodNumber;
2131
+ stagedInputBytes: z.ZodNumber;
2132
+ inputFiles: z.ZodNumber;
2133
+ inFlightTransfers: z.ZodNumber;
2134
+ exportBytes: z.ZodNumber;
2135
+ exportFiles: z.ZodNumber;
2136
+ unreferencedInputRetentionSeconds: z.ZodNumber;
2137
+ exportRetentionSeconds: z.ZodNumber;
2138
+ }, z.core.$strict>;
2139
+ type WorkloadLimits = z.infer<typeof WorkloadLimitsSchema>;
2140
+ declare const InstalledWorkloadSchema: z.ZodObject<{
2141
+ workspaceId: z.ZodUUID;
2142
+ incarnationId: z.ZodString;
2143
+ templateDigest: z.ZodString;
2144
+ image: z.ZodString;
2145
+ runtime: z.ZodObject<{
2146
+ digest: z.ZodString;
2147
+ protocol: z.ZodLiteral<"pocketcoder.workload/v1">;
2148
+ }, z.core.$strict>;
2149
+ storage: z.ZodObject<{
2150
+ identity: z.ZodString;
2151
+ profile: z.ZodEnum<{
2152
+ "controller-readonly/v1": "controller-readonly/v1";
2153
+ "shared-writer-readonly/v1": "shared-writer-readonly/v1";
2154
+ }>;
2155
+ }, z.core.$strict>;
2156
+ capabilities: z.ZodArray<z.ZodEnum<{
2157
+ "ready-without-task": "ready-without-task";
2158
+ "live-inputs": "live-inputs";
2159
+ "immutable-inputs": "immutable-inputs";
2160
+ "serial-operations": "serial-operations";
2161
+ "retained-exports": "retained-exports";
2162
+ "explicit-start": "explicit-start";
2163
+ "exact-exit": "exact-exit";
2164
+ "targeted-cancel": "targeted-cancel";
2165
+ "stop-before-export": "stop-before-export";
2166
+ "request-lookup": "request-lookup";
2167
+ "deduplicated-accept": "deduplicated-accept";
2168
+ "explicit-publication": "explicit-publication";
2169
+ "workspace-services": "workspace-services";
2170
+ "revocable-preview-grants": "revocable-preview-grants";
2171
+ "workspace-cancel": "workspace-cancel";
2172
+ "unknown-outcome": "unknown-outcome";
2173
+ }>>;
2174
+ adapters: z.ZodRecord<z.ZodString, z.ZodObject<{
2175
+ kind: z.ZodEnum<{
2176
+ agentapi: "agentapi";
2177
+ service: "service";
2178
+ process: "process";
2179
+ pi: "pi";
2180
+ }>;
2181
+ digest: z.ZodString;
2182
+ protocol: z.ZodString;
2183
+ capabilities: z.ZodArray<z.ZodEnum<{
2184
+ "ready-without-task": "ready-without-task";
2185
+ "live-inputs": "live-inputs";
2186
+ "immutable-inputs": "immutable-inputs";
2187
+ "serial-operations": "serial-operations";
2188
+ "retained-exports": "retained-exports";
2189
+ "explicit-start": "explicit-start";
2190
+ "exact-exit": "exact-exit";
2191
+ "targeted-cancel": "targeted-cancel";
2192
+ "stop-before-export": "stop-before-export";
2193
+ "request-lookup": "request-lookup";
2194
+ "deduplicated-accept": "deduplicated-accept";
2195
+ "explicit-publication": "explicit-publication";
2196
+ "workspace-services": "workspace-services";
2197
+ "revocable-preview-grants": "revocable-preview-grants";
2198
+ "workspace-cancel": "workspace-cancel";
2199
+ "unknown-outcome": "unknown-outcome";
2200
+ }>>;
2201
+ }, z.core.$strict>>;
2202
+ }, z.core.$strict>;
2203
+ type InstalledWorkload = z.infer<typeof InstalledWorkloadSchema>;
2204
+ //#endregion
583
2205
  //#region ../contracts/src/terminals/terminal.d.ts
584
2206
  declare const ServerTerminalMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
585
2207
  type: z.ZodLiteral<"opened">;
@@ -591,10 +2213,10 @@ declare const ServerTerminalMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
591
2213
  }, z.core.$strip>, z.ZodObject<{
592
2214
  type: z.ZodLiteral<"closed">;
593
2215
  reason: z.ZodEnum<{
2216
+ idle: "idle";
594
2217
  checkpoint: "checkpoint";
595
- workspace_ended: "workspace_ended";
596
2218
  exit: "exit";
597
- idle: "idle";
2219
+ workspace_ended: "workspace_ended";
598
2220
  agent_detached: "agent_detached";
599
2221
  }>;
600
2222
  exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -613,10 +2235,10 @@ declare const TerminalSessionSchema: z.ZodObject<{
613
2235
  closed_at: z.ZodNullable<z.ZodISODateTime>;
614
2236
  duration_ms: z.ZodNullable<z.ZodNumber>;
615
2237
  close_reason: z.ZodNullable<z.ZodEnum<{
2238
+ idle: "idle";
616
2239
  checkpoint: "checkpoint";
617
- workspace_ended: "workspace_ended";
618
2240
  exit: "exit";
619
- idle: "idle";
2241
+ workspace_ended: "workspace_ended";
620
2242
  agent_detached: "agent_detached";
621
2243
  client_closed: "client_closed";
622
2244
  }>>;
@@ -627,6 +2249,73 @@ declare const TerminalSessionSchema: z.ZodObject<{
627
2249
  type ServerTerminalMessage = z.infer<typeof ServerTerminalMessageSchema>;
628
2250
  type TerminalSession = z.infer<typeof TerminalSessionSchema>;
629
2251
  //#endregion
2252
+ //#region ../contracts/src/workspaces/workload-operation.d.ts
2253
+ declare const WorkloadExecutionReferenceSchema: z.ZodObject<{
2254
+ workspaceId: z.ZodUUID;
2255
+ incarnationId: z.ZodString;
2256
+ owner: z.ZodEnum<{
2257
+ process: "process";
2258
+ "conversation-request": "conversation-request";
2259
+ }>;
2260
+ requestId: z.ZodUUID;
2261
+ }, z.core.$strict>;
2262
+ type WorkloadExecutionReference = z.infer<typeof WorkloadExecutionReferenceSchema>;
2263
+ declare const WorkloadAcceptanceSchema: z.ZodObject<{
2264
+ execution: z.ZodObject<{
2265
+ workspaceId: z.ZodUUID;
2266
+ incarnationId: z.ZodString;
2267
+ owner: z.ZodEnum<{
2268
+ process: "process";
2269
+ "conversation-request": "conversation-request";
2270
+ }>;
2271
+ requestId: z.ZodUUID;
2272
+ }, z.core.$strict>;
2273
+ callerPrincipalId: z.ZodUUID;
2274
+ templateDigest: z.ZodString;
2275
+ adapterDigest: z.ZodString;
2276
+ operation: z.ZodString;
2277
+ input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
2278
+ inputs: z.ZodObject<{
2279
+ workspaceId: z.ZodUUID;
2280
+ incarnationId: z.ZodString;
2281
+ digest: z.ZodString;
2282
+ objects: z.ZodArray<z.ZodObject<{
2283
+ workspaceId: z.ZodUUID;
2284
+ fileId: z.ZodUUID;
2285
+ objectVersion: z.ZodString;
2286
+ name: z.ZodString;
2287
+ mediaType: z.ZodString;
2288
+ sizeBytes: z.ZodNumber;
2289
+ digest: z.ZodString;
2290
+ visibility: z.ZodEnum<{
2291
+ ready: "ready";
2292
+ expired: "expired";
2293
+ unavailable: "unavailable";
2294
+ }>;
2295
+ }, z.core.$strict>>;
2296
+ }, z.core.$strict>;
2297
+ bindingSetDigest: z.ZodString;
2298
+ fingerprint: z.ZodString;
2299
+ }, z.core.$strict>;
2300
+ type WorkloadAcceptance = z.infer<typeof WorkloadAcceptanceSchema>;
2301
+ declare const WorkloadCancelSchema: z.ZodObject<{
2302
+ execution: z.ZodObject<{
2303
+ workspaceId: z.ZodUUID;
2304
+ incarnationId: z.ZodString;
2305
+ owner: z.ZodEnum<{
2306
+ process: "process";
2307
+ "conversation-request": "conversation-request";
2308
+ }>;
2309
+ requestId: z.ZodUUID;
2310
+ }, z.core.$strict>;
2311
+ cancelId: z.ZodUUID;
2312
+ scope: z.ZodEnum<{
2313
+ workspace: "workspace";
2314
+ operation: "operation";
2315
+ }>;
2316
+ }, z.core.$strict>;
2317
+ type WorkloadCancel = z.infer<typeof WorkloadCancelSchema>;
2318
+ //#endregion
630
2319
  //#region src/transport/transport.d.ts
631
2320
  type FetchLike = typeof fetch;
632
2321
  type WebSocketFactory = (url: string, headers: Record<string, string>) => WebSocket;
@@ -651,6 +2340,7 @@ declare class PocketCoderTransport {
651
2340
  constructor(config: PocketCoderClientConfig, fetchImpl?: FetchLike);
652
2341
  webSocket(path: string): WebSocket;
653
2342
  raw(path: string, init?: RequestInit): Promise<Response>;
2343
+ stream(path: string, signal?: AbortSignal): Promise<Response>;
654
2344
  request<T>(path: string, schema: z.ZodType<T>, init?: RequestInit): Promise<T>;
655
2345
  }
656
2346
  //#endregion
@@ -714,14 +2404,18 @@ declare class WorkspacesApi {
714
2404
  version: string;
715
2405
  digest: string;
716
2406
  };
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;
2407
+ agent: {
2408
+ type: string;
2409
+ model: string | null;
2410
+ } | null;
2411
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2412
+ 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
2413
  agent_state: "unknown" | "running" | "stable";
720
2414
  change_cursor: number;
721
2415
  provider_kind: string | null;
722
2416
  provisioning_mode: "cold" | "warm" | null;
723
2417
  network: {
724
- state: "ready" | "disabled" | "starting" | "degraded";
2418
+ state: "disabled" | "ready" | "starting" | "degraded";
725
2419
  };
726
2420
  health: Record<string, string>;
727
2421
  created_at: string;
@@ -750,7 +2444,7 @@ declare class WorkspacesApi {
750
2444
  };
751
2445
  outputs: Record<string, unknown>;
752
2446
  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";
2447
+ 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
2448
  log_tail: string;
755
2449
  log_tail_truncated: boolean;
756
2450
  last_log_seq: number | null;
@@ -764,14 +2458,18 @@ declare class WorkspacesApi {
764
2458
  version: string;
765
2459
  digest: string;
766
2460
  };
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;
2461
+ agent: {
2462
+ type: string;
2463
+ model: string | null;
2464
+ } | null;
2465
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2466
+ 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
2467
  agent_state: "unknown" | "running" | "stable";
770
2468
  change_cursor: number;
771
2469
  provider_kind: string | null;
772
2470
  provisioning_mode: "cold" | "warm" | null;
773
2471
  network: {
774
- state: "ready" | "disabled" | "starting" | "degraded";
2472
+ state: "disabled" | "ready" | "starting" | "degraded";
775
2473
  };
776
2474
  health: Record<string, string>;
777
2475
  created_at: string;
@@ -800,7 +2498,7 @@ declare class WorkspacesApi {
800
2498
  };
801
2499
  outputs: Record<string, unknown>;
802
2500
  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";
2501
+ 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
2502
  log_tail: string;
805
2503
  log_tail_truncated: boolean;
806
2504
  last_log_seq: number | null;
@@ -814,14 +2512,18 @@ declare class WorkspacesApi {
814
2512
  version: string;
815
2513
  digest: string;
816
2514
  };
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;
2515
+ agent: {
2516
+ type: string;
2517
+ model: string | null;
2518
+ } | null;
2519
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2520
+ 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
2521
  agent_state: "unknown" | "running" | "stable";
820
2522
  change_cursor: number;
821
2523
  provider_kind: string | null;
822
2524
  provisioning_mode: "cold" | "warm" | null;
823
2525
  network: {
824
- state: "ready" | "disabled" | "starting" | "degraded";
2526
+ state: "disabled" | "ready" | "starting" | "degraded";
825
2527
  };
826
2528
  health: Record<string, string>;
827
2529
  created_at: string;
@@ -850,7 +2552,7 @@ declare class WorkspacesApi {
850
2552
  };
851
2553
  outputs: Record<string, unknown>;
852
2554
  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";
2555
+ 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
2556
  log_tail: string;
855
2557
  log_tail_truncated: boolean;
856
2558
  last_log_seq: number | null;
@@ -864,14 +2566,18 @@ declare class WorkspacesApi {
864
2566
  version: string;
865
2567
  digest: string;
866
2568
  };
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;
2569
+ agent: {
2570
+ type: string;
2571
+ model: string | null;
2572
+ } | null;
2573
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2574
+ 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
2575
  agent_state: "unknown" | "running" | "stable";
870
2576
  change_cursor: number;
871
2577
  provider_kind: string | null;
872
2578
  provisioning_mode: "cold" | "warm" | null;
873
2579
  network: {
874
- state: "ready" | "disabled" | "starting" | "degraded";
2580
+ state: "disabled" | "ready" | "starting" | "degraded";
875
2581
  };
876
2582
  health: Record<string, string>;
877
2583
  created_at: string;
@@ -900,7 +2606,7 @@ declare class WorkspacesApi {
900
2606
  };
901
2607
  outputs: Record<string, unknown>;
902
2608
  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";
2609
+ 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
2610
  log_tail: string;
905
2611
  log_tail_truncated: boolean;
906
2612
  last_log_seq: number | null;
@@ -914,14 +2620,18 @@ declare class WorkspacesApi {
914
2620
  version: string;
915
2621
  digest: string;
916
2622
  };
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;
2623
+ agent: {
2624
+ type: string;
2625
+ model: string | null;
2626
+ } | null;
2627
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2628
+ 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
2629
  agent_state: "unknown" | "running" | "stable";
920
2630
  change_cursor: number;
921
2631
  provider_kind: string | null;
922
2632
  provisioning_mode: "cold" | "warm" | null;
923
2633
  network: {
924
- state: "ready" | "disabled" | "starting" | "degraded";
2634
+ state: "disabled" | "ready" | "starting" | "degraded";
925
2635
  };
926
2636
  health: Record<string, string>;
927
2637
  created_at: string;
@@ -950,7 +2660,7 @@ declare class WorkspacesApi {
950
2660
  };
951
2661
  outputs: Record<string, unknown>;
952
2662
  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";
2663
+ 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
2664
  log_tail: string;
955
2665
  log_tail_truncated: boolean;
956
2666
  last_log_seq: number | null;
@@ -967,14 +2677,18 @@ declare class WorkspacesApi {
967
2677
  version: string;
968
2678
  digest: string;
969
2679
  };
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;
2680
+ agent: {
2681
+ type: string;
2682
+ model: string | null;
2683
+ } | null;
2684
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2685
+ 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
2686
  agent_state: "unknown" | "running" | "stable";
973
2687
  change_cursor: number;
974
2688
  provider_kind: string | null;
975
2689
  provisioning_mode: "cold" | "warm" | null;
976
2690
  network: {
977
- state: "ready" | "disabled" | "starting" | "degraded";
2691
+ state: "disabled" | "ready" | "starting" | "degraded";
978
2692
  };
979
2693
  health: Record<string, string>;
980
2694
  created_at: string;
@@ -1003,7 +2717,7 @@ declare class WorkspacesApi {
1003
2717
  };
1004
2718
  outputs: Record<string, unknown>;
1005
2719
  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";
2720
+ 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
2721
  log_tail: string;
1008
2722
  log_tail_truncated: boolean;
1009
2723
  last_log_seq: number | null;
@@ -1020,14 +2734,18 @@ declare class WorkspacesApi {
1020
2734
  version: string;
1021
2735
  digest: string;
1022
2736
  };
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;
2737
+ agent: {
2738
+ type: string;
2739
+ model: string | null;
2740
+ } | null;
2741
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2742
+ 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
2743
  agent_state: "unknown" | "running" | "stable";
1026
2744
  change_cursor: number;
1027
2745
  provider_kind: string | null;
1028
2746
  provisioning_mode: "cold" | "warm" | null;
1029
2747
  network: {
1030
- state: "ready" | "disabled" | "starting" | "degraded";
2748
+ state: "disabled" | "ready" | "starting" | "degraded";
1031
2749
  };
1032
2750
  health: Record<string, string>;
1033
2751
  created_at: string;
@@ -1056,7 +2774,7 @@ declare class WorkspacesApi {
1056
2774
  };
1057
2775
  outputs: Record<string, unknown>;
1058
2776
  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";
2777
+ 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
2778
  log_tail: string;
1061
2779
  log_tail_truncated: boolean;
1062
2780
  last_log_seq: number | null;
@@ -1070,14 +2788,18 @@ declare class WorkspacesApi {
1070
2788
  version: string;
1071
2789
  digest: string;
1072
2790
  };
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;
2791
+ agent: {
2792
+ type: string;
2793
+ model: string | null;
2794
+ } | null;
2795
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2796
+ 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
2797
  agent_state: "unknown" | "running" | "stable";
1076
2798
  change_cursor: number;
1077
2799
  provider_kind: string | null;
1078
2800
  provisioning_mode: "cold" | "warm" | null;
1079
2801
  network: {
1080
- state: "ready" | "disabled" | "starting" | "degraded";
2802
+ state: "disabled" | "ready" | "starting" | "degraded";
1081
2803
  };
1082
2804
  health: Record<string, string>;
1083
2805
  created_at: string;
@@ -1106,7 +2828,7 @@ declare class WorkspacesApi {
1106
2828
  };
1107
2829
  outputs: Record<string, unknown>;
1108
2830
  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";
2831
+ 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
2832
  log_tail: string;
1111
2833
  log_tail_truncated: boolean;
1112
2834
  last_log_seq: number | null;
@@ -1121,14 +2843,18 @@ declare class WorkspacesApi {
1121
2843
  version: string;
1122
2844
  digest: string;
1123
2845
  };
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;
2846
+ agent: {
2847
+ type: string;
2848
+ model: string | null;
2849
+ } | null;
2850
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2851
+ 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
2852
  agent_state: "unknown" | "running" | "stable";
1127
2853
  change_cursor: number;
1128
2854
  provider_kind: string | null;
1129
2855
  provisioning_mode: "cold" | "warm" | null;
1130
2856
  network: {
1131
- state: "ready" | "disabled" | "starting" | "degraded";
2857
+ state: "disabled" | "ready" | "starting" | "degraded";
1132
2858
  };
1133
2859
  health: Record<string, string>;
1134
2860
  created_at: string;
@@ -1157,7 +2883,7 @@ declare class WorkspacesApi {
1157
2883
  };
1158
2884
  outputs: Record<string, unknown>;
1159
2885
  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";
2886
+ 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
2887
  log_tail: string;
1162
2888
  log_tail_truncated: boolean;
1163
2889
  last_log_seq: number | null;
@@ -1166,7 +2892,7 @@ declare class WorkspacesApi {
1166
2892
  checkpoint: {
1167
2893
  id: string;
1168
2894
  workspace_id: string;
1169
- state: "deleted" | "failed" | "ready" | "creating" | "deleting";
2895
+ state: "deleted" | "failed" | "creating" | "ready" | "deleting";
1170
2896
  reason_code: string | null;
1171
2897
  template: {
1172
2898
  name: string;
@@ -1187,7 +2913,7 @@ declare class WorkspacesApi {
1187
2913
  operation: {
1188
2914
  id: string;
1189
2915
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1190
- state: "failed" | "succeeded" | "running" | "pending";
2916
+ state: "pending" | "running" | "succeeded" | "failed";
1191
2917
  workspace_id: string | null;
1192
2918
  checkpoint_id: string | null;
1193
2919
  result_workspace_id: string | null;
@@ -1200,7 +2926,7 @@ declare class WorkspacesApi {
1200
2926
  purge(id: string, key: string, options?: RequestOptions): Promise<{
1201
2927
  id: string;
1202
2928
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1203
- state: "failed" | "succeeded" | "running" | "pending";
2929
+ state: "pending" | "running" | "succeeded" | "failed";
1204
2930
  workspace_id: string | null;
1205
2931
  checkpoint_id: string | null;
1206
2932
  result_workspace_id: string | null;
@@ -1218,14 +2944,18 @@ declare class WorkspacesApi {
1218
2944
  version: string;
1219
2945
  digest: string;
1220
2946
  };
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;
2947
+ agent: {
2948
+ type: string;
2949
+ model: string | null;
2950
+ } | null;
2951
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
2952
+ 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
2953
  agent_state: "unknown" | "running" | "stable";
1224
2954
  change_cursor: number;
1225
2955
  provider_kind: string | null;
1226
2956
  provisioning_mode: "cold" | "warm" | null;
1227
2957
  network: {
1228
- state: "ready" | "disabled" | "starting" | "degraded";
2958
+ state: "disabled" | "ready" | "starting" | "degraded";
1229
2959
  };
1230
2960
  health: Record<string, string>;
1231
2961
  created_at: string;
@@ -1254,7 +2984,7 @@ declare class WorkspacesApi {
1254
2984
  };
1255
2985
  outputs: Record<string, unknown>;
1256
2986
  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";
2987
+ 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
2988
  log_tail: string;
1259
2989
  log_tail_truncated: boolean;
1260
2990
  last_log_seq: number | null;
@@ -1263,7 +2993,7 @@ declare class WorkspacesApi {
1263
2993
  operation: {
1264
2994
  id: string;
1265
2995
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1266
- state: "failed" | "succeeded" | "running" | "pending";
2996
+ state: "pending" | "running" | "succeeded" | "failed";
1267
2997
  workspace_id: string | null;
1268
2998
  checkpoint_id: string | null;
1269
2999
  result_workspace_id: string | null;
@@ -1282,14 +3012,18 @@ declare class WorkspacesApi {
1282
3012
  version: string;
1283
3013
  digest: string;
1284
3014
  };
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;
3015
+ agent: {
3016
+ type: string;
3017
+ model: string | null;
3018
+ } | null;
3019
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
3020
+ 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
3021
  agent_state: "unknown" | "running" | "stable";
1288
3022
  change_cursor: number;
1289
3023
  provider_kind: string | null;
1290
3024
  provisioning_mode: "cold" | "warm" | null;
1291
3025
  network: {
1292
- state: "ready" | "disabled" | "starting" | "degraded";
3026
+ state: "disabled" | "ready" | "starting" | "degraded";
1293
3027
  };
1294
3028
  health: Record<string, string>;
1295
3029
  created_at: string;
@@ -1318,7 +3052,7 @@ declare class WorkspacesApi {
1318
3052
  };
1319
3053
  outputs: Record<string, unknown>;
1320
3054
  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";
3055
+ 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
3056
  log_tail: string;
1323
3057
  log_tail_truncated: boolean;
1324
3058
  last_log_seq: number | null;
@@ -1327,7 +3061,7 @@ declare class WorkspacesApi {
1327
3061
  operation: {
1328
3062
  id: string;
1329
3063
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1330
- state: "failed" | "succeeded" | "running" | "pending";
3064
+ state: "pending" | "running" | "succeeded" | "failed";
1331
3065
  workspace_id: string | null;
1332
3066
  checkpoint_id: string | null;
1333
3067
  result_workspace_id: string | null;
@@ -1346,6 +3080,23 @@ declare class WorkspacesApi {
1346
3080
  private jsonOperation;
1347
3081
  }
1348
3082
  //#endregion
3083
+ //#region src/resources/agent/agent.d.ts
3084
+ interface AgentMessageInput {
3085
+ content: string;
3086
+ attachmentIds?: string[];
3087
+ signal?: AbortSignal;
3088
+ readyTimeoutMs?: number;
3089
+ }
3090
+ declare class AgentApi {
3091
+ private readonly transport;
3092
+ private readonly workspaces;
3093
+ constructor(transport: PocketCoderTransport, workspaces: WorkspacesApi);
3094
+ sendMessage(workspaceId: string, input: AgentMessageInput): Promise<void>;
3095
+ interrupt(workspaceId: string, options?: RequestOptions): Promise<{
3096
+ status: "requested" | "idle";
3097
+ }>;
3098
+ }
3099
+ //#endregion
1349
3100
  //#region src/resources/attachments/attachments.d.ts
1350
3101
  type UploadBody = NonNullable<RequestInit["body"]>;
1351
3102
  interface AttachmentUploadInput {
@@ -1354,25 +3105,14 @@ interface AttachmentUploadInput {
1354
3105
  mediaType?: string;
1355
3106
  body: UploadBody;
1356
3107
  sizeBytes: number;
3108
+ sha256?: string;
1357
3109
  signal?: AbortSignal;
1358
3110
  onProgress?: (uploadedBytes: number, totalBytes: number) => void;
1359
3111
  }
1360
- interface AgentMessageInput {
1361
- content: string;
1362
- attachmentIds?: string[];
1363
- signal?: AbortSignal;
1364
- readyTimeoutMs?: number;
1365
- }
1366
3112
  declare class AttachmentsApi {
1367
3113
  private readonly transport;
1368
3114
  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>;
3115
+ upload(workspaceId: string, input: AttachmentUploadInput): Promise<InputObjectReference>;
1376
3116
  }
1377
3117
  //#endregion
1378
3118
  //#region src/transport/common.d.ts
@@ -1394,7 +3134,7 @@ declare class CheckpointsApi {
1394
3134
  }, options?: RequestOptions): Promise<Page<{
1395
3135
  id: string;
1396
3136
  workspace_id: string;
1397
- state: "deleted" | "failed" | "ready" | "creating" | "deleting";
3137
+ state: "deleted" | "failed" | "creating" | "ready" | "deleting";
1398
3138
  reason_code: string | null;
1399
3139
  template: {
1400
3140
  name: string;
@@ -1415,7 +3155,7 @@ declare class CheckpointsApi {
1415
3155
  get(id: string, options?: RequestOptions): Promise<{
1416
3156
  id: string;
1417
3157
  workspace_id: string;
1418
- state: "deleted" | "failed" | "ready" | "creating" | "deleting";
3158
+ state: "deleted" | "failed" | "creating" | "ready" | "deleting";
1419
3159
  reason_code: string | null;
1420
3160
  template: {
1421
3161
  name: string;
@@ -1436,7 +3176,7 @@ declare class CheckpointsApi {
1436
3176
  verify(id: string, key: string, options?: RequestOptions): Promise<{
1437
3177
  id: string;
1438
3178
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1439
- state: "failed" | "succeeded" | "running" | "pending";
3179
+ state: "pending" | "running" | "succeeded" | "failed";
1440
3180
  workspace_id: string | null;
1441
3181
  checkpoint_id: string | null;
1442
3182
  result_workspace_id: string | null;
@@ -1448,7 +3188,7 @@ declare class CheckpointsApi {
1448
3188
  delete(id: string, key: string, options?: RequestOptions): Promise<{
1449
3189
  id: string;
1450
3190
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1451
- state: "failed" | "succeeded" | "running" | "pending";
3191
+ state: "pending" | "running" | "succeeded" | "failed";
1452
3192
  workspace_id: string | null;
1453
3193
  checkpoint_id: string | null;
1454
3194
  result_workspace_id: string | null;
@@ -1466,14 +3206,18 @@ declare class CheckpointsApi {
1466
3206
  version: string;
1467
3207
  digest: string;
1468
3208
  };
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;
3209
+ agent: {
3210
+ type: string;
3211
+ model: string | null;
3212
+ } | null;
3213
+ state: "succeeded" | "failed" | "ready" | "queued" | "provisioning" | "connected" | "preserving" | "terminating" | "canceled" | "expired" | "preserved";
3214
+ 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
3215
  agent_state: "unknown" | "running" | "stable";
1472
3216
  change_cursor: number;
1473
3217
  provider_kind: string | null;
1474
3218
  provisioning_mode: "cold" | "warm" | null;
1475
3219
  network: {
1476
- state: "ready" | "disabled" | "starting" | "degraded";
3220
+ state: "disabled" | "ready" | "starting" | "degraded";
1477
3221
  };
1478
3222
  health: Record<string, string>;
1479
3223
  created_at: string;
@@ -1502,7 +3246,7 @@ declare class CheckpointsApi {
1502
3246
  };
1503
3247
  outputs: Record<string, unknown>;
1504
3248
  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";
3249
+ 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
3250
  log_tail: string;
1507
3251
  log_tail_truncated: boolean;
1508
3252
  last_log_seq: number | null;
@@ -1511,7 +3255,7 @@ declare class CheckpointsApi {
1511
3255
  operation: {
1512
3256
  id: string;
1513
3257
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1514
- state: "failed" | "succeeded" | "running" | "pending";
3258
+ state: "pending" | "running" | "succeeded" | "failed";
1515
3259
  workspace_id: string | null;
1516
3260
  checkpoint_id: string | null;
1517
3261
  result_workspace_id: string | null;
@@ -1529,7 +3273,7 @@ declare class OperationsApi {
1529
3273
  get(id: string, options?: RequestOptions): Promise<{
1530
3274
  id: string;
1531
3275
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1532
- state: "failed" | "succeeded" | "running" | "pending";
3276
+ state: "pending" | "running" | "succeeded" | "failed";
1533
3277
  workspace_id: string | null;
1534
3278
  checkpoint_id: string | null;
1535
3279
  result_workspace_id: string | null;
@@ -1583,17 +3327,20 @@ declare class ConversationsApi {
1583
3327
  } | {
1584
3328
  type: "activity_started";
1585
3329
  activity_id: string;
1586
- kind: "tool" | "attachment" | "workspace" | "retrieval";
3330
+ kind: "workspace" | "tool" | "attachment" | "retrieval";
1587
3331
  label: string;
1588
3332
  started_at: string | null;
3333
+ action?: string | undefined;
3334
+ subject?: string | undefined;
1589
3335
  } | {
1590
3336
  type: "activity_finished";
1591
3337
  activity_id: string;
1592
3338
  ended_at: string | null;
1593
- outcome: "completed" | "failed" | "interrupted" | "canceled";
3339
+ outcome: "failed" | "canceled" | "completed" | "interrupted";
1594
3340
  } | {
1595
3341
  type: "turn_terminal";
1596
- outcome: "completed" | "failed" | "interrupted" | "canceled" | "lost";
3342
+ outcome: "failed" | "canceled" | "completed" | "interrupted" | "lost";
3343
+ reason?: string | undefined;
1597
3344
  } | undefined;
1598
3345
  } | null;
1599
3346
  }[];
@@ -1611,6 +3358,136 @@ declare class ConversationsApi {
1611
3358
  };
1612
3359
  accepted_at: string;
1613
3360
  }>;
3361
+ listConversations(id: string, options?: RequestOptions): Promise<{
3362
+ conversation_id: string | null;
3363
+ workspace_id: string;
3364
+ legacy: boolean;
3365
+ status: "deleted" | "expired" | "retained";
3366
+ message_count: number;
3367
+ turn_count: number;
3368
+ last_activity_at: string;
3369
+ expires_at: string | null;
3370
+ }[]>;
3371
+ read(id: string, conversationId: string, query?: CursorListQuery, options?: RequestOptions): Promise<{
3372
+ conversation: {
3373
+ conversation_id: string | null;
3374
+ workspace_id: string;
3375
+ legacy: boolean;
3376
+ status: "deleted" | "expired" | "retained";
3377
+ message_count: number;
3378
+ turn_count: number;
3379
+ last_activity_at: string;
3380
+ expires_at: string | null;
3381
+ };
3382
+ protocol: {
3383
+ schema: "pocketcoder.conversation/v2";
3384
+ request_identity_authorities: ("external" | "generic")[];
3385
+ producer_capabilities: null;
3386
+ };
3387
+ items: {
3388
+ message_id: string;
3389
+ role: "user" | "assistant" | "system" | "tool";
3390
+ content: string;
3391
+ occurred_at: string;
3392
+ metadata: Record<string, string>;
3393
+ seq: number;
3394
+ identity: {
3395
+ schema: "pocketcoder.conversation/v2";
3396
+ authority: "external" | "generic";
3397
+ conversation_id: string;
3398
+ request_id: string;
3399
+ turn_id: string;
3400
+ request_fingerprint: string;
3401
+ event_id: string;
3402
+ message_id: string;
3403
+ sequence: number;
3404
+ revision: number;
3405
+ fact?: {
3406
+ type: "intermediate";
3407
+ } | {
3408
+ type: "final_response";
3409
+ } | {
3410
+ type: "tool_only";
3411
+ } | {
3412
+ type: "activity_started";
3413
+ activity_id: string;
3414
+ kind: "workspace" | "tool" | "attachment" | "retrieval";
3415
+ label: string;
3416
+ started_at: string | null;
3417
+ action?: string | undefined;
3418
+ subject?: string | undefined;
3419
+ } | {
3420
+ type: "activity_finished";
3421
+ activity_id: string;
3422
+ ended_at: string | null;
3423
+ outcome: "failed" | "canceled" | "completed" | "interrupted";
3424
+ } | {
3425
+ type: "turn_terminal";
3426
+ outcome: "failed" | "canceled" | "completed" | "interrupted" | "lost";
3427
+ reason?: string | undefined;
3428
+ } | undefined;
3429
+ } | null;
3430
+ }[];
3431
+ nextCursor: string | null;
3432
+ }>;
3433
+ delete(id: string, conversationId: string, options?: RequestOptions): Promise<void>;
3434
+ live(id: string, options?: {
3435
+ conversationId?: string;
3436
+ signal?: AbortSignal;
3437
+ }): AsyncGenerator<{
3438
+ type: "turn";
3439
+ conversation_id: string;
3440
+ turn_id: string;
3441
+ messages: {
3442
+ metadata: Record<string, string>;
3443
+ occurred_at: string;
3444
+ message_id: string;
3445
+ role: "user" | "assistant" | "system" | "tool";
3446
+ content: string;
3447
+ identity: {
3448
+ schema: "pocketcoder.conversation/v2";
3449
+ authority: "external" | "generic";
3450
+ conversation_id: string;
3451
+ request_id: string;
3452
+ turn_id: string;
3453
+ request_fingerprint: string;
3454
+ event_id: string;
3455
+ message_id: string;
3456
+ sequence: number;
3457
+ revision: number;
3458
+ fact?: {
3459
+ type: "intermediate";
3460
+ } | {
3461
+ type: "final_response";
3462
+ } | {
3463
+ type: "tool_only";
3464
+ } | {
3465
+ type: "activity_started";
3466
+ activity_id: string;
3467
+ kind: "workspace" | "tool" | "attachment" | "retrieval";
3468
+ label: string;
3469
+ started_at: string | null;
3470
+ action?: string | undefined;
3471
+ subject?: string | undefined;
3472
+ } | {
3473
+ type: "activity_finished";
3474
+ activity_id: string;
3475
+ ended_at: string | null;
3476
+ outcome: "failed" | "canceled" | "completed" | "interrupted";
3477
+ } | {
3478
+ type: "turn_terminal";
3479
+ outcome: "failed" | "canceled" | "completed" | "interrupted" | "lost";
3480
+ reason?: string | undefined;
3481
+ } | undefined;
3482
+ } | null;
3483
+ }[];
3484
+ } | {
3485
+ type: "committed";
3486
+ conversation_id: string | null;
3487
+ turn_id: string | null;
3488
+ status: "message" | "failed" | "canceled" | "completed" | "interrupted" | "lost" | "legacy";
3489
+ last_seq: number;
3490
+ }, void, any>;
1614
3491
  }
1615
3492
  //#endregion
1616
3493
  //#region src/resources/diagnostics/diagnostics.d.ts
@@ -1631,7 +3508,30 @@ declare class NetworkEventsApi extends WorkspaceCursorApi<NetworkEvent> {
1631
3508
  constructor(transport: PocketCoderTransport);
1632
3509
  }
1633
3510
  declare class OutputsApi extends WorkspaceCursorApi<OutputResource> {
3511
+ private readonly binaryTransport;
3512
+ download(workspaceId: string, outputId: string, options?: RequestOptions): Promise<Response>;
3513
+ constructor(transport: PocketCoderTransport);
3514
+ }
3515
+ //#endregion
3516
+ //#region src/resources/displays/displays.d.ts
3517
+ declare class DisplaysApi {
3518
+ private readonly transport;
1634
3519
  constructor(transport: PocketCoderTransport);
3520
+ capture(workspaceId: string, options?: RequestOptions): Promise<{
3521
+ kind: "screenshot";
3522
+ id: string;
3523
+ workspace_id: string;
3524
+ content_type: "image/png";
3525
+ bytes: number;
3526
+ digest: string;
3527
+ expires_at: string;
3528
+ }>;
3529
+ open(workspaceId: string, control?: boolean, options?: RequestOptions & {
3530
+ session?: ViewSessionOptions;
3531
+ }): Promise<{
3532
+ url: string;
3533
+ expires_at: string;
3534
+ }>;
1635
3535
  }
1636
3536
  //#endregion
1637
3537
  //#region src/resources/keys/keys.d.ts
@@ -1649,6 +3549,8 @@ declare class KeysApi {
1649
3549
  principal_id: string;
1650
3550
  scopes: string[];
1651
3551
  effective_scopes: string[];
3552
+ templates: string[] | null;
3553
+ effective_templates: string[];
1652
3554
  managed_principal_ids: string[];
1653
3555
  issuance_request_id: string | null;
1654
3556
  created_at: string;
@@ -1663,6 +3565,8 @@ declare class KeysApi {
1663
3565
  principal_id: string;
1664
3566
  scopes: string[];
1665
3567
  effective_scopes: string[];
3568
+ templates: string[] | null;
3569
+ effective_templates: string[];
1666
3570
  managed_principal_ids: string[];
1667
3571
  issuance_request_id: string | null;
1668
3572
  created_at: string;
@@ -1670,12 +3574,50 @@ declare class KeysApi {
1670
3574
  revoked_at: string | null;
1671
3575
  last_used_at: string | null;
1672
3576
  }, void, unknown>;
3577
+ expiring(query?: {
3578
+ withinHours?: number;
3579
+ }, options?: RequestOptions): Promise<{
3580
+ items: {
3581
+ id: string;
3582
+ principal_id: string;
3583
+ scopes: string[];
3584
+ effective_scopes: string[];
3585
+ templates: string[] | null;
3586
+ effective_templates: string[];
3587
+ managed_principal_ids: string[];
3588
+ issuance_request_id: string | null;
3589
+ created_at: string;
3590
+ expires_at: string | null;
3591
+ revoked_at: string | null;
3592
+ last_used_at: string | null;
3593
+ principal_name: string;
3594
+ }[];
3595
+ }>;
1673
3596
  issue(principalId: string, input: KeyIssueRequest, options?: RequestOptions): Promise<{
1674
3597
  key: {
1675
3598
  id: string;
1676
3599
  principal_id: string;
1677
3600
  scopes: string[];
1678
3601
  effective_scopes: string[];
3602
+ templates: string[] | null;
3603
+ effective_templates: string[];
3604
+ managed_principal_ids: string[];
3605
+ issuance_request_id: string | null;
3606
+ created_at: string;
3607
+ expires_at: string | null;
3608
+ revoked_at: string | null;
3609
+ last_used_at: string | null;
3610
+ };
3611
+ token: string | null;
3612
+ }>;
3613
+ rotate(principalId: string, keyId: string, input: KeyRotateRequest, options?: RequestOptions): Promise<{
3614
+ key: {
3615
+ id: string;
3616
+ principal_id: string;
3617
+ scopes: string[];
3618
+ effective_scopes: string[];
3619
+ templates: string[] | null;
3620
+ effective_templates: string[];
1679
3621
  managed_principal_ids: string[];
1680
3622
  issuance_request_id: string | null;
1681
3623
  created_at: string;
@@ -1698,7 +3640,7 @@ declare class RecoveryApi {
1698
3640
  purge(principalId: string, workspaceId: string, executionKey: string, options?: RequestOptions): Promise<{
1699
3641
  id: string;
1700
3642
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1701
- state: "failed" | "succeeded" | "running" | "pending";
3643
+ state: "pending" | "running" | "succeeded" | "failed";
1702
3644
  workspace_id: string | null;
1703
3645
  checkpoint_id: string | null;
1704
3646
  result_workspace_id: string | null;
@@ -1710,7 +3652,7 @@ declare class RecoveryApi {
1710
3652
  operation(principalId: string, operationId: string, options?: RequestOptions): Promise<{
1711
3653
  id: string;
1712
3654
  kind: "preserve" | "restore" | "verify" | "delete" | "purge";
1713
- state: "failed" | "succeeded" | "running" | "pending";
3655
+ state: "pending" | "running" | "succeeded" | "failed";
1714
3656
  workspace_id: string | null;
1715
3657
  checkpoint_id: string | null;
1716
3658
  result_workspace_id: string | null;
@@ -1721,6 +3663,86 @@ declare class RecoveryApi {
1721
3663
  }>;
1722
3664
  }
1723
3665
  //#endregion
3666
+ //#region src/resources/previews/previews.d.ts
3667
+ declare class PreviewsApi {
3668
+ private readonly transport;
3669
+ constructor(transport: PocketCoderTransport);
3670
+ list(workspaceId: string, options?: RequestOptions): Promise<{
3671
+ name: string;
3672
+ port: number;
3673
+ }[]>;
3674
+ open(workspaceId: string, name: string, options?: RequestOptions & {
3675
+ session?: ViewSessionOptions;
3676
+ }): Promise<{
3677
+ url: string;
3678
+ expires_at: string;
3679
+ }>;
3680
+ }
3681
+ //#endregion
3682
+ //#region src/resources/principals/principals.d.ts
3683
+ declare class PrincipalsApi {
3684
+ private readonly transport;
3685
+ constructor(transport: PocketCoderTransport);
3686
+ list(options?: RequestOptions): Promise<{
3687
+ items: {
3688
+ id: string;
3689
+ name: string;
3690
+ scopes: string[];
3691
+ templates: string[];
3692
+ disabled_at: string | null;
3693
+ created_at: string;
3694
+ }[];
3695
+ }>;
3696
+ get(principalId: string, options?: RequestOptions): Promise<{
3697
+ id: string;
3698
+ name: string;
3699
+ scopes: string[];
3700
+ templates: string[];
3701
+ disabled_at: string | null;
3702
+ created_at: string;
3703
+ }>;
3704
+ create(input: PrincipalCreateRequest, options?: RequestOptions): Promise<{
3705
+ id: string;
3706
+ name: string;
3707
+ scopes: string[];
3708
+ templates: string[];
3709
+ disabled_at: string | null;
3710
+ created_at: string;
3711
+ }>;
3712
+ update(principalId: string, input: PrincipalUpdateRequest, options?: RequestOptions): Promise<{
3713
+ id: string;
3714
+ name: string;
3715
+ scopes: string[];
3716
+ templates: string[];
3717
+ disabled_at: string | null;
3718
+ created_at: string;
3719
+ }>;
3720
+ }
3721
+ //#endregion
3722
+ //#region src/resources/secrets/secrets.d.ts
3723
+ declare class SecretsApi {
3724
+ private readonly transport;
3725
+ constructor(transport: PocketCoderTransport);
3726
+ put(name: string, input: SecretPutRequest, options?: RequestOptions): Promise<{
3727
+ name: string;
3728
+ type: "setup-issuer" | "runtime-issuer" | "registry";
3729
+ updated_at: string;
3730
+ retired_at: string | null;
3731
+ }>;
3732
+ list(options?: RequestOptions): Promise<{
3733
+ name: string;
3734
+ type: "setup-issuer" | "runtime-issuer" | "registry";
3735
+ updated_at: string;
3736
+ retired_at: string | null;
3737
+ }[]>;
3738
+ retire(name: string, options?: RequestOptions): Promise<{
3739
+ name: string;
3740
+ type: "setup-issuer" | "runtime-issuer" | "registry";
3741
+ updated_at: string;
3742
+ retired_at: string | null;
3743
+ }>;
3744
+ }
3745
+ //#endregion
1724
3746
  //#region src/resources/templates/templates.d.ts
1725
3747
  type TemplateSummary = TemplateListItem;
1726
3748
  declare class TemplatesApi {
@@ -1730,6 +3752,10 @@ declare class TemplatesApi {
1730
3752
  name: string;
1731
3753
  version: string;
1732
3754
  digest: string;
3755
+ agent: {
3756
+ type: string;
3757
+ model: string | null;
3758
+ } | null;
1733
3759
  status: "active" | "available" | "retired";
1734
3760
  description?: string | undefined;
1735
3761
  }>>;
@@ -1737,9 +3763,35 @@ declare class TemplatesApi {
1737
3763
  name: string;
1738
3764
  version: string;
1739
3765
  digest: string;
3766
+ agent: {
3767
+ type: string;
3768
+ model: string | null;
3769
+ } | null;
1740
3770
  status: "active" | "available" | "retired";
1741
3771
  description?: string | undefined;
1742
3772
  }[]>;
3773
+ publish(manifest: TemplateManifest | WorkloadTemplate, options?: RequestOptions): Promise<{
3774
+ name: string;
3775
+ version: string;
3776
+ digest: string;
3777
+ agent: {
3778
+ type: string;
3779
+ model: string | null;
3780
+ } | null;
3781
+ status: "active" | "available" | "retired";
3782
+ description?: string | undefined;
3783
+ }>;
3784
+ retire(name: string, version: string, options?: RequestOptions): Promise<{
3785
+ name: string;
3786
+ version: string;
3787
+ digest: string;
3788
+ agent: {
3789
+ type: string;
3790
+ model: string | null;
3791
+ } | null;
3792
+ status: "active" | "available" | "retired";
3793
+ description?: string | undefined;
3794
+ }>;
1743
3795
  }
1744
3796
  //#endregion
1745
3797
  //#region src/resources/terminals/terminals.d.ts
@@ -1782,8 +3834,11 @@ declare class TerminalsApi {
1782
3834
  //#region src/client.d.ts
1783
3835
  declare class PocketCoderClient {
1784
3836
  private readonly transport;
3837
+ readonly secrets: SecretsApi;
1785
3838
  readonly templates: TemplatesApi;
1786
3839
  readonly workspaces: WorkspacesApi;
3840
+ readonly previews: PreviewsApi;
3841
+ readonly displays: DisplaysApi;
1787
3842
  readonly attachments: AttachmentsApi;
1788
3843
  readonly agent: AgentApi;
1789
3844
  readonly conversations: ConversationsApi;
@@ -1794,6 +3849,7 @@ declare class PocketCoderClient {
1794
3849
  readonly outputs: OutputsApi;
1795
3850
  readonly administration: AdministrationApi;
1796
3851
  readonly terminals: TerminalsApi;
3852
+ readonly principals: PrincipalsApi;
1797
3853
  readonly keys: KeysApi;
1798
3854
  readonly recovery: RecoveryApi;
1799
3855
  constructor(config: PocketCoderClientConfig, fetchImpl?: typeof fetch);
@@ -1868,4 +3924,4 @@ declare class AgentNotReadyError extends Error {
1868
3924
  }
1869
3925
  declare function isPocketCoderErrorCode(value: unknown): value is ErrorCode;
1870
3926
  //#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 };
3927
+ 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 };