@get-bb/plugin-sdk 0.4.48 → 0.4.50

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.
@@ -9,6 +9,7 @@ import * as react from 'react';
9
9
  import { ComponentType, ComponentPropsWithoutRef, ReactNode } from 'react';
10
10
  import * as z from 'zod';
11
11
  import { z as z$1 } from 'zod';
12
+ import { StandardSchemaV1 as StandardSchemaV1$1, PluginEnvironmentProviderRequirements as PluginEnvironmentProviderRequirements$1, StandardSchemaV1InferOutput as StandardSchemaV1InferOutput$1, PluginEnvironmentValidateDecision as PluginEnvironmentValidateDecision$1, JsonValue as JsonValue$2 } from '@get-bb/plugin-sdk';
12
13
  import Database from 'better-sqlite3';
13
14
  import { Context } from 'hono';
14
15
 
@@ -46,12 +47,31 @@ declare const appSettingsSchema: z$1.ZodObject<{
46
47
  defaultProviderId: z$1.ZodNullable<z$1.ZodString>;
47
48
  managedBranchPrefix: z$1.ZodString;
48
49
  providerOrder: z$1.ZodArray<z$1.ZodString>;
50
+ showDiagnosticEvents: z$1.ZodBoolean;
49
51
  showKeyboardHints: z$1.ZodBoolean;
50
- showUnhandledProviderEvents: z$1.ZodBoolean;
51
52
  steerActiveThreadOnEnter: z$1.ZodBoolean;
52
53
  streamerMode: z$1.ZodBoolean;
53
54
  }, z$1.core.$strict>;
54
55
  type AppSettings = z$1.infer<typeof appSettingsSchema>;
56
+ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
57
+ defaultProviderId: z$1.ZodNullable<z$1.ZodString>;
58
+ managedBranchPrefix: z$1.ZodString;
59
+ providerOrder: z$1.ZodArray<z$1.ZodString>;
60
+ showDiagnosticEvents: z$1.ZodBoolean;
61
+ showKeyboardHints: z$1.ZodBoolean;
62
+ showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
63
+ steerActiveThreadOnEnter: z$1.ZodBoolean;
64
+ streamerMode: z$1.ZodBoolean;
65
+ }, z$1.core.$strict>, z$1.ZodObject<{
66
+ defaultProviderId: z$1.ZodNullable<z$1.ZodString>;
67
+ managedBranchPrefix: z$1.ZodString;
68
+ providerOrder: z$1.ZodArray<z$1.ZodString>;
69
+ showKeyboardHints: z$1.ZodBoolean;
70
+ showUnhandledProviderEvents: z$1.ZodBoolean;
71
+ steerActiveThreadOnEnter: z$1.ZodBoolean;
72
+ streamerMode: z$1.ZodBoolean;
73
+ }, z$1.core.$strict>]>;
74
+ type AppSettingsUpdate = z$1.infer<typeof appSettingsUpdateSchema>;
55
75
 
56
76
  declare const appKeybindingOverridesSchema: z$1.ZodArray<z$1.ZodObject<{
57
77
  command: z$1.ZodEnum<{
@@ -277,15 +297,61 @@ declare const changedMessageSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
277
297
  }, z$1.core.$strict>], "entity">;
278
298
  type ChangedMessage = z$1.infer<typeof changedMessageSchema>;
279
299
 
300
+ declare const environmentStatusSchema: z$1.ZodEnum<{
301
+ destroyed: "destroyed";
302
+ error: "error";
303
+ provisioning: "provisioning";
304
+ ready: "ready";
305
+ }>;
306
+ type EnvironmentStatus = z$1.infer<typeof environmentStatusSchema>;
307
+ declare const workspaceProvisionTypeSchema: z$1.ZodEnum<{
308
+ "managed-worktree": "managed-worktree";
309
+ personal: "personal";
310
+ unmanaged: "unmanaged";
311
+ }>;
312
+ type WorkspaceProvisionType = z$1.infer<typeof workspaceProvisionTypeSchema>;
313
+ declare const environmentWorkspaceDisplayKindSchema: z$1.ZodEnum<{
314
+ "managed-worktree": "managed-worktree";
315
+ "unmanaged-worktree": "unmanaged-worktree";
316
+ other: "other";
317
+ }>;
318
+ type EnvironmentWorkspaceDisplayKind = z$1.infer<typeof environmentWorkspaceDisplayKindSchema>;
280
319
  declare const environmentSchema: z$1.ZodObject<{
281
320
  baseBranch: z$1.ZodNullable<z$1.ZodString>;
282
321
  branchName: z$1.ZodNullable<z$1.ZodString>;
283
322
  createdAt: z$1.ZodNumber;
284
323
  defaultBranch: z$1.ZodNullable<z$1.ZodString>;
324
+ environmentProviderId: z$1.ZodNullable<z$1.ZodString>;
325
+ environmentProviderInstanceKey: z$1.ZodNullable<z$1.ZodString>;
326
+ environmentProviderSelection: z$1.ZodNullable<z$1.ZodObject<{
327
+ inputs: z$1.ZodNullable<z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>>;
328
+ machine: z$1.ZodObject<{
329
+ hostId: z$1.ZodString;
330
+ type: z$1.ZodLiteral<"existing">;
331
+ }, z$1.core.$strip>;
332
+ }, z$1.core.$strip>>;
285
333
  hostId: z$1.ZodString;
286
334
  id: z$1.ZodString;
287
335
  isGitRepo: z$1.ZodBoolean;
288
336
  isWorktree: z$1.ZodBoolean;
337
+ lifecycle: z$1.ZodObject<{
338
+ phase: z$1.ZodEnum<{
339
+ active: "active";
340
+ destroyed: "destroyed";
341
+ retiring: "retiring";
342
+ teardown: "teardown";
343
+ }>;
344
+ retireAt: z$1.ZodNullable<z$1.ZodNumber>;
345
+ teardown: z$1.ZodNullable<z$1.ZodObject<{
346
+ attempt: z$1.ZodNumber;
347
+ message: z$1.ZodOptional<z$1.ZodString>;
348
+ status: z$1.ZodEnum<{
349
+ failed: "failed";
350
+ removed: "removed";
351
+ running: "running";
352
+ }>;
353
+ }, z$1.core.$strip>>;
354
+ }, z$1.core.$strip>;
289
355
  managed: z$1.ZodBoolean;
290
356
  mergeBaseBranch: z$1.ZodNullable<z$1.ZodString>;
291
357
  name: z$1.ZodNullable<z$1.ZodString>;
@@ -293,18 +359,16 @@ declare const environmentSchema: z$1.ZodObject<{
293
359
  projectId: z$1.ZodString;
294
360
  status: z$1.ZodEnum<{
295
361
  destroyed: "destroyed";
296
- destroying: "destroying";
297
362
  error: "error";
298
363
  provisioning: "provisioning";
299
364
  ready: "ready";
300
- retiring: "retiring";
301
365
  }>;
302
366
  updatedAt: z$1.ZodNumber;
303
- workspaceProvisionType: z$1.ZodEnum<{
367
+ workspaceProvisionType: z$1.ZodNullable<z$1.ZodEnum<{
304
368
  "managed-worktree": "managed-worktree";
305
369
  personal: "personal";
306
370
  unmanaged: "unmanaged";
307
- }>;
371
+ }>>;
308
372
  }, z$1.core.$strip>;
309
373
  type Environment = z$1.infer<typeof environmentSchema>;
310
374
 
@@ -317,6 +381,27 @@ declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
317
381
  }>, z$1.ZodBoolean>;
318
382
  type Experiments = z$1.infer<typeof experimentsSchema>;
319
383
 
384
+ declare const workspaceGitOperationSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
385
+ kind: z$1.ZodLiteral<"none">;
386
+ }, z$1.core.$strip>, z$1.ZodObject<{
387
+ hasConflicts: z$1.ZodBoolean;
388
+ kind: z$1.ZodLiteral<"merge">;
389
+ }, z$1.core.$strip>, z$1.ZodObject<{
390
+ hasConflicts: z$1.ZodBoolean;
391
+ kind: z$1.ZodLiteral<"rebase">;
392
+ }, z$1.core.$strip>, z$1.ZodObject<{
393
+ hasConflicts: z$1.ZodBoolean;
394
+ kind: z$1.ZodLiteral<"cherry-pick">;
395
+ }, z$1.core.$strip>, z$1.ZodObject<{
396
+ hasConflicts: z$1.ZodBoolean;
397
+ kind: z$1.ZodLiteral<"revert">;
398
+ }, z$1.core.$strip>, z$1.ZodObject<{
399
+ hasConflicts: z$1.ZodBoolean;
400
+ kind: z$1.ZodLiteral<"unknown">;
401
+ reason: z$1.ZodString;
402
+ }, z$1.core.$strip>], "kind">;
403
+ type WorkspaceGitOperation = z$1.infer<typeof workspaceGitOperationSchema>;
404
+
320
405
  declare const hostSchema: z$1.ZodObject<{
321
406
  createdAt: z$1.ZodNumber;
322
407
  id: z$1.ZodString;
@@ -366,437 +451,140 @@ declare const threadEventItemPresentationSchema: z$1.ZodObject<{
366
451
  }, z$1.core.$strip>;
367
452
  type ThreadEventItemPresentation = z$1.infer<typeof threadEventItemPresentationSchema>;
368
453
 
369
- declare const pendingInteractionResolutionSchema: z$1.ZodUnion<readonly [z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
370
- decision: z$1.ZodLiteral<"allow_once">;
371
- grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
372
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
373
- read: z$1.ZodArray<z$1.ZodString>;
374
- write: z$1.ZodArray<z$1.ZodString>;
375
- }, z$1.core.$strip>>;
376
- network: z$1.ZodNullable<z$1.ZodObject<{
377
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
378
- }, z$1.core.$strip>>;
379
- }, z$1.core.$strict>>;
454
+ declare const providerErrorInfoSchema: z$1.ZodObject<{
455
+ category: z$1.ZodEnum<{
456
+ "active-turn-not-steerable": "active-turn-not-steerable";
457
+ "bad-request": "bad-request";
458
+ "budget-exceeded": "budget-exceeded";
459
+ "connection-failed": "connection-failed";
460
+ "context-window-exceeded": "context-window-exceeded";
461
+ "max-output-tokens": "max-output-tokens";
462
+ "max-turns": "max-turns";
463
+ "rate-limit": "rate-limit";
464
+ "stream-disconnected": "stream-disconnected";
465
+ "structured-output-retries": "structured-output-retries";
466
+ "thread-rollback-failed": "thread-rollback-failed";
467
+ "too-many-failed-attempts": "too-many-failed-attempts";
468
+ billing: "billing";
469
+ internal: "internal";
470
+ overloaded: "overloaded";
471
+ policy: "policy";
472
+ sandbox: "sandbox";
473
+ unauthorized: "unauthorized";
474
+ unknown: "unknown";
475
+ }>;
476
+ httpStatusCode: z$1.ZodNullable<z$1.ZodNumber>;
477
+ providerCode: z$1.ZodNullable<z$1.ZodString>;
478
+ }, z$1.core.$strip>;
479
+ type ProviderErrorInfo = z$1.infer<typeof providerErrorInfoSchema>;
480
+ declare const providerRateLimitStateSchema: z$1.ZodObject<{
481
+ kind: z$1.ZodEnum<{
482
+ "spend-control": "spend-control";
483
+ "subscription-window": "subscription-window";
484
+ credits: "credits";
485
+ unknown: "unknown";
486
+ }>;
487
+ overageReason: z$1.ZodNullable<z$1.ZodString>;
488
+ overageStatus: z$1.ZodNullable<z$1.ZodEnum<{
489
+ allowed: "allowed";
490
+ rejected: "rejected";
491
+ unavailable: "unavailable";
492
+ warning: "warning";
493
+ }>>;
494
+ providerId: z$1.ZodString;
495
+ reachedReason: z$1.ZodNullable<z$1.ZodString>;
496
+ status: z$1.ZodEnum<{
497
+ allowed: "allowed";
498
+ blocked: "blocked";
499
+ unknown: "unknown";
500
+ warning: "warning";
501
+ }>;
502
+ windows: z$1.ZodArray<z$1.ZodObject<{
503
+ label: z$1.ZodNullable<z$1.ZodString>;
504
+ providerKey: z$1.ZodNullable<z$1.ZodString>;
505
+ resetsAtMs: z$1.ZodNullable<z$1.ZodNumber>;
506
+ status: z$1.ZodEnum<{
507
+ allowed: "allowed";
508
+ blocked: "blocked";
509
+ unknown: "unknown";
510
+ warning: "warning";
511
+ }>;
512
+ }, z$1.core.$strip>>;
513
+ }, z$1.core.$strip>;
514
+ type ProviderRateLimitState = z$1.infer<typeof providerRateLimitStateSchema>;
515
+ declare const threadEventSchema: z$1.ZodPipe<z$1.ZodUnknown, z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
516
+ threadId: z$1.ZodString;
517
+ type: z$1.ZodLiteral<"thread/started">;
380
518
  }, z$1.core.$strip>, z$1.ZodObject<{
381
- decision: z$1.ZodLiteral<"allow_for_session">;
382
- grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
383
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
384
- read: z$1.ZodArray<z$1.ZodString>;
385
- write: z$1.ZodArray<z$1.ZodString>;
386
- }, z$1.core.$strip>>;
387
- network: z$1.ZodNullable<z$1.ZodObject<{
388
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
389
- }, z$1.core.$strip>>;
390
- }, z$1.core.$strict>>;
519
+ providerThreadId: z$1.ZodString;
520
+ threadId: z$1.ZodString;
521
+ type: z$1.ZodLiteral<"thread/identity">;
391
522
  }, z$1.core.$strip>, z$1.ZodObject<{
392
- decision: z$1.ZodLiteral<"deny">;
393
- }, z$1.core.$strip>], "decision">, z$1.ZodObject<{
394
- answers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
395
- freeText: z$1.ZodOptional<z$1.ZodString>;
396
- selected: z$1.ZodArray<z$1.ZodString>;
523
+ parentToolCallId: z$1.ZodOptional<z$1.ZodString>;
524
+ providerThreadId: z$1.ZodString;
525
+ threadId: z$1.ZodString;
526
+ type: z$1.ZodLiteral<"turn/started">;
527
+ }, z$1.core.$strip>, z$1.ZodObject<{
528
+ error: z$1.ZodOptional<z$1.ZodObject<{
529
+ message: z$1.ZodString;
397
530
  }, z$1.core.$strip>>;
398
- kind: z$1.ZodLiteral<"user_answer">;
531
+ providerCheckpointId: z$1.ZodOptional<z$1.ZodString>;
532
+ providerThreadId: z$1.ZodNullable<z$1.ZodString>;
533
+ status: z$1.ZodEnum<{
534
+ completed: "completed";
535
+ failed: "failed";
536
+ interrupted: "interrupted";
537
+ }>;
538
+ threadId: z$1.ZodString;
539
+ type: z$1.ZodLiteral<"turn/completed">;
399
540
  }, z$1.core.$strip>, z$1.ZodObject<{
400
- kind: z$1.ZodLiteral<"plugin_submitted">;
541
+ clientRequestId: z$1.ZodString;
542
+ providerThreadId: z$1.ZodString;
543
+ scope: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
544
+ kind: z$1.ZodLiteral<"thread">;
545
+ }, z$1.core.$strip>, z$1.ZodObject<{
546
+ kind: z$1.ZodLiteral<"turn">;
547
+ turnId: z$1.ZodString;
548
+ }, z$1.core.$strip>], "kind">;
549
+ threadId: z$1.ZodString;
550
+ type: z$1.ZodLiteral<"turn/input/accepted">;
551
+ }, z$1.core.$strict>, z$1.ZodObject<{
552
+ providerThreadId: z$1.ZodString;
553
+ threadId: z$1.ZodString;
554
+ threadName: z$1.ZodString;
555
+ type: z$1.ZodLiteral<"thread/name/updated">;
401
556
  }, z$1.core.$strip>, z$1.ZodObject<{
402
- kind: z$1.ZodLiteral<"request_answer">;
403
- value: z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>;
404
- }, z$1.core.$strip>]>;
405
- type PendingInteractionResolution = z$1.infer<typeof pendingInteractionResolutionSchema>;
406
- declare const providerPendingInteractionSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
407
- createdAt: z$1.ZodNumber;
408
- expiresAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
409
- id: z$1.ZodString;
410
- origin: z$1.ZodOptional<z$1.ZodObject<{
411
- kind: z$1.ZodLiteral<"provider">;
412
- providerId: z$1.ZodString;
413
- providerRequestId: z$1.ZodString;
414
- providerThreadId: z$1.ZodString;
415
- }, z$1.core.$strip>>;
416
- payload: z$1.ZodObject<{
417
- availableDecisions: z$1.ZodArray<z$1.ZodEnum<{
418
- allow_for_session: "allow_for_session";
419
- allow_once: "allow_once";
420
- deny: "deny";
421
- }>>;
422
- kind: z$1.ZodLiteral<"approval">;
423
- reason: z$1.ZodNullable<z$1.ZodString>;
424
- subject: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
425
- actions: z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
426
- command: z$1.ZodString;
427
- name: z$1.ZodString;
428
- path: z$1.ZodString;
429
- type: z$1.ZodLiteral<"read">;
430
- }, z$1.core.$strip>, z$1.ZodObject<{
431
- command: z$1.ZodString;
432
- path: z$1.ZodNullable<z$1.ZodString>;
433
- type: z$1.ZodLiteral<"listFiles">;
434
- }, z$1.core.$strip>, z$1.ZodObject<{
435
- command: z$1.ZodString;
436
- path: z$1.ZodNullable<z$1.ZodString>;
437
- query: z$1.ZodNullable<z$1.ZodString>;
438
- type: z$1.ZodLiteral<"search">;
439
- }, z$1.core.$strip>, z$1.ZodObject<{
440
- command: z$1.ZodString;
441
- type: z$1.ZodLiteral<"unknown">;
442
- }, z$1.core.$strip>], "type">>;
443
- command: z$1.ZodString;
444
- cwd: z$1.ZodNullable<z$1.ZodString>;
445
- itemId: z$1.ZodString;
446
- kind: z$1.ZodLiteral<"command">;
447
- sessionGrant: z$1.ZodNullable<z$1.ZodObject<{
448
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
449
- read: z$1.ZodArray<z$1.ZodString>;
450
- write: z$1.ZodArray<z$1.ZodString>;
451
- }, z$1.core.$strip>>;
452
- network: z$1.ZodNullable<z$1.ZodObject<{
453
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
454
- }, z$1.core.$strip>>;
455
- }, z$1.core.$strict>>;
456
- }, z$1.core.$strip>, z$1.ZodObject<{
457
- itemId: z$1.ZodString;
458
- kind: z$1.ZodLiteral<"file_change">;
459
- sessionGrant: z$1.ZodNullable<z$1.ZodObject<{
460
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
461
- read: z$1.ZodArray<z$1.ZodString>;
462
- write: z$1.ZodArray<z$1.ZodString>;
463
- }, z$1.core.$strip>>;
464
- network: z$1.ZodNullable<z$1.ZodObject<{
465
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
466
- }, z$1.core.$strip>>;
467
- }, z$1.core.$strict>>;
468
- writeScope: z$1.ZodNullable<z$1.ZodString>;
469
- }, z$1.core.$strip>, z$1.ZodObject<{
470
- itemId: z$1.ZodString;
471
- kind: z$1.ZodLiteral<"permission_grant">;
472
- permissions: z$1.ZodObject<{
473
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
474
- read: z$1.ZodArray<z$1.ZodString>;
475
- write: z$1.ZodArray<z$1.ZodString>;
476
- }, z$1.core.$strip>>;
477
- network: z$1.ZodNullable<z$1.ZodObject<{
478
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
479
- }, z$1.core.$strip>>;
480
- }, z$1.core.$strict>;
481
- toolName: z$1.ZodNullable<z$1.ZodString>;
482
- }, z$1.core.$strip>, z$1.ZodObject<{
483
- itemId: z$1.ZodString;
484
- kind: z$1.ZodLiteral<"plan">;
485
- plan: z$1.ZodString;
486
- planFilePath: z$1.ZodNullable<z$1.ZodString>;
487
- }, z$1.core.$strip>, z$1.ZodObject<{
488
- itemId: z$1.ZodString;
489
- kind: z$1.ZodLiteral<"tool_use">;
490
- presentation: z$1.ZodObject<{
491
- badge: z$1.ZodOptional<z$1.ZodObject<{
492
- glyph: z$1.ZodString;
493
- hint: z$1.ZodString;
494
- label: z$1.ZodString;
495
- tone: z$1.ZodEnum<{
496
- destructive: "destructive";
497
- neutral: "neutral";
498
- }>;
499
- }, z$1.core.$strip>>;
500
- detail: z$1.ZodOptional<z$1.ZodString>;
501
- icon: z$1.ZodObject<{
502
- glyph: z$1.ZodString;
503
- }, z$1.core.$strip>;
504
- label: z$1.ZodObject<{
505
- completed: z$1.ZodString;
506
- pending: z$1.ZodString;
507
- }, z$1.core.$strip>;
508
- suppress: z$1.ZodOptional<z$1.ZodBoolean>;
509
- tint: z$1.ZodOptional<z$1.ZodObject<{
510
- dark: z$1.ZodString;
511
- light: z$1.ZodString;
512
- }, z$1.core.$strip>>;
513
- title: z$1.ZodOptional<z$1.ZodString>;
514
- }, z$1.core.$strip>;
515
- tool: z$1.ZodString;
516
- }, z$1.core.$strip>], "kind">;
517
- }, z$1.core.$strip>;
518
- providerId: z$1.ZodString;
519
- providerRequestId: z$1.ZodString;
520
- providerThreadId: z$1.ZodString;
521
- resolution: z$1.ZodNullable<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
522
- decision: z$1.ZodLiteral<"allow_once">;
523
- grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
524
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
525
- read: z$1.ZodArray<z$1.ZodString>;
526
- write: z$1.ZodArray<z$1.ZodString>;
527
- }, z$1.core.$strip>>;
528
- network: z$1.ZodNullable<z$1.ZodObject<{
529
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
530
- }, z$1.core.$strip>>;
531
- }, z$1.core.$strict>>;
532
- }, z$1.core.$strip>, z$1.ZodObject<{
533
- decision: z$1.ZodLiteral<"allow_for_session">;
534
- grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
535
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
536
- read: z$1.ZodArray<z$1.ZodString>;
537
- write: z$1.ZodArray<z$1.ZodString>;
538
- }, z$1.core.$strip>>;
539
- network: z$1.ZodNullable<z$1.ZodObject<{
540
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
541
- }, z$1.core.$strip>>;
542
- }, z$1.core.$strict>>;
543
- }, z$1.core.$strip>, z$1.ZodObject<{
544
- decision: z$1.ZodLiteral<"deny">;
545
- }, z$1.core.$strip>], "decision">>;
546
- resolvedAt: z$1.ZodNullable<z$1.ZodNumber>;
547
- status: z$1.ZodEnum<{
548
- interrupted: "interrupted";
549
- pending: "pending";
550
- resolved: "resolved";
551
- resolving: "resolving";
552
- }>;
553
- statusReason: z$1.ZodNullable<z$1.ZodString>;
554
- threadId: z$1.ZodString;
555
- turnId: z$1.ZodString;
556
- }, z$1.core.$strip>, z$1.ZodObject<{
557
- createdAt: z$1.ZodNumber;
558
- expiresAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
559
- id: z$1.ZodString;
560
- origin: z$1.ZodOptional<z$1.ZodObject<{
561
- kind: z$1.ZodLiteral<"provider">;
562
- providerId: z$1.ZodString;
563
- providerRequestId: z$1.ZodString;
564
- providerThreadId: z$1.ZodString;
565
- }, z$1.core.$strip>>;
566
- payload: z$1.ZodObject<{
567
- kind: z$1.ZodLiteral<"user_question">;
568
- questions: z$1.ZodArray<z$1.ZodObject<{
569
- allowFreeText: z$1.ZodBoolean;
570
- id: z$1.ZodString;
571
- multiSelect: z$1.ZodBoolean;
572
- options: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
573
- description: z$1.ZodOptional<z$1.ZodString>;
574
- label: z$1.ZodString;
575
- value: z$1.ZodString;
576
- }, z$1.core.$strip>>>;
577
- prompt: z$1.ZodString;
578
- shortLabel: z$1.ZodOptional<z$1.ZodString>;
579
- }, z$1.core.$strip>>;
580
- }, z$1.core.$strip>;
581
- providerId: z$1.ZodString;
582
- providerRequestId: z$1.ZodString;
583
- providerThreadId: z$1.ZodString;
584
- resolution: z$1.ZodNullable<z$1.ZodObject<{
585
- answers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
586
- freeText: z$1.ZodOptional<z$1.ZodString>;
587
- selected: z$1.ZodArray<z$1.ZodString>;
588
- }, z$1.core.$strip>>;
589
- kind: z$1.ZodLiteral<"user_answer">;
590
- }, z$1.core.$strip>>;
591
- resolvedAt: z$1.ZodNullable<z$1.ZodNumber>;
592
- status: z$1.ZodEnum<{
593
- interrupted: "interrupted";
594
- pending: "pending";
595
- resolved: "resolved";
596
- resolving: "resolving";
597
- }>;
598
- statusReason: z$1.ZodNullable<z$1.ZodString>;
599
- threadId: z$1.ZodString;
600
- turnId: z$1.ZodString;
601
- }, z$1.core.$strip>, z$1.ZodObject<{
602
- createdAt: z$1.ZodNumber;
603
- expiresAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
604
- id: z$1.ZodString;
605
- origin: z$1.ZodOptional<z$1.ZodObject<{
606
- kind: z$1.ZodLiteral<"provider">;
607
- providerId: z$1.ZodString;
608
- providerRequestId: z$1.ZodString;
609
- providerThreadId: z$1.ZodString;
610
- }, z$1.core.$strip>>;
611
- payload: z$1.ZodObject<{
612
- data: z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>;
613
- kind: z$1.ZodString & z$1.ZodType<`${string}/${string}`, string, z$1.core.$ZodTypeInternals<`${string}/${string}`, string>>;
614
- title: z$1.ZodString;
615
- }, z$1.core.$strip>;
616
- providerId: z$1.ZodString;
617
- providerRequestId: z$1.ZodString;
618
- providerThreadId: z$1.ZodString;
619
- resolution: z$1.ZodNullable<z$1.ZodObject<{
620
- kind: z$1.ZodLiteral<"request_answer">;
621
- value: z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>;
622
- }, z$1.core.$strip>>;
623
- resolvedAt: z$1.ZodNullable<z$1.ZodNumber>;
624
- status: z$1.ZodEnum<{
625
- interrupted: "interrupted";
626
- pending: "pending";
627
- resolved: "resolved";
628
- resolving: "resolving";
629
- }>;
630
- statusReason: z$1.ZodNullable<z$1.ZodString>;
631
- threadId: z$1.ZodString;
632
- turnId: z$1.ZodString;
633
- }, z$1.core.$strip>]>;
634
- type ProviderPendingInteraction = z$1.infer<typeof providerPendingInteractionSchema>;
635
- declare const pluginPendingInteractionSchema: z$1.ZodObject<{
636
- createdAt: z$1.ZodNumber;
637
- expiresAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
638
- id: z$1.ZodString;
639
- origin: z$1.ZodObject<{
640
- kind: z$1.ZodLiteral<"plugin">;
641
- pluginId: z$1.ZodString;
642
- rendererId: z$1.ZodString;
643
- }, z$1.core.$strip>;
644
- payload: z$1.ZodObject<{
645
- data: z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>;
646
- kind: z$1.ZodLiteral<"plugin">;
647
- title: z$1.ZodString;
648
- }, z$1.core.$strip>;
649
- resolution: z$1.ZodNullable<z$1.ZodObject<{
650
- kind: z$1.ZodLiteral<"plugin_submitted">;
651
- }, z$1.core.$strip>>;
652
- resolvedAt: z$1.ZodNullable<z$1.ZodNumber>;
653
- status: z$1.ZodEnum<{
654
- interrupted: "interrupted";
655
- pending: "pending";
656
- resolved: "resolved";
657
- resolving: "resolving";
658
- }>;
659
- statusReason: z$1.ZodNullable<z$1.ZodString>;
660
- threadId: z$1.ZodString;
661
- turnId: z$1.ZodNullable<z$1.ZodString>;
662
- }, z$1.core.$strip>;
663
- type PluginPendingInteraction = z$1.infer<typeof pluginPendingInteractionSchema>;
664
- type PendingInteraction = ProviderPendingInteraction | PluginPendingInteraction;
665
-
666
- declare const providerErrorInfoSchema: z$1.ZodObject<{
667
- category: z$1.ZodEnum<{
668
- "active-turn-not-steerable": "active-turn-not-steerable";
669
- "bad-request": "bad-request";
670
- "budget-exceeded": "budget-exceeded";
671
- "connection-failed": "connection-failed";
672
- "context-window-exceeded": "context-window-exceeded";
673
- "max-output-tokens": "max-output-tokens";
674
- "max-turns": "max-turns";
675
- "rate-limit": "rate-limit";
676
- "stream-disconnected": "stream-disconnected";
677
- "structured-output-retries": "structured-output-retries";
678
- "thread-rollback-failed": "thread-rollback-failed";
679
- "too-many-failed-attempts": "too-many-failed-attempts";
680
- billing: "billing";
681
- internal: "internal";
682
- overloaded: "overloaded";
683
- policy: "policy";
684
- sandbox: "sandbox";
685
- unauthorized: "unauthorized";
686
- unknown: "unknown";
687
- }>;
688
- httpStatusCode: z$1.ZodNullable<z$1.ZodNumber>;
689
- providerCode: z$1.ZodNullable<z$1.ZodString>;
690
- }, z$1.core.$strip>;
691
- type ProviderErrorInfo = z$1.infer<typeof providerErrorInfoSchema>;
692
- declare const providerRateLimitStateSchema: z$1.ZodObject<{
693
- kind: z$1.ZodEnum<{
694
- "spend-control": "spend-control";
695
- "subscription-window": "subscription-window";
696
- credits: "credits";
697
- unknown: "unknown";
698
- }>;
699
- overageReason: z$1.ZodNullable<z$1.ZodString>;
700
- overageStatus: z$1.ZodNullable<z$1.ZodEnum<{
701
- allowed: "allowed";
702
- rejected: "rejected";
703
- unavailable: "unavailable";
704
- warning: "warning";
705
- }>>;
706
- providerId: z$1.ZodString;
707
- reachedReason: z$1.ZodNullable<z$1.ZodString>;
708
- status: z$1.ZodEnum<{
709
- allowed: "allowed";
710
- blocked: "blocked";
711
- unknown: "unknown";
712
- warning: "warning";
713
- }>;
714
- windows: z$1.ZodArray<z$1.ZodObject<{
715
- label: z$1.ZodNullable<z$1.ZodString>;
716
- providerKey: z$1.ZodNullable<z$1.ZodString>;
717
- resetsAtMs: z$1.ZodNullable<z$1.ZodNumber>;
718
- status: z$1.ZodEnum<{
719
- allowed: "allowed";
720
- blocked: "blocked";
721
- unknown: "unknown";
722
- warning: "warning";
723
- }>;
724
- }, z$1.core.$strip>>;
725
- }, z$1.core.$strip>;
726
- type ProviderRateLimitState = z$1.infer<typeof providerRateLimitStateSchema>;
727
- declare const threadEventSchema: z$1.ZodPipe<z$1.ZodUnknown, z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
728
- threadId: z$1.ZodString;
729
- type: z$1.ZodLiteral<"thread/started">;
730
- }, z$1.core.$strip>, z$1.ZodObject<{
731
- providerThreadId: z$1.ZodString;
732
- threadId: z$1.ZodString;
733
- type: z$1.ZodLiteral<"thread/identity">;
734
- }, z$1.core.$strip>, z$1.ZodObject<{
735
- parentToolCallId: z$1.ZodOptional<z$1.ZodString>;
736
- providerThreadId: z$1.ZodString;
737
- threadId: z$1.ZodString;
738
- type: z$1.ZodLiteral<"turn/started">;
739
- }, z$1.core.$strip>, z$1.ZodObject<{
740
- error: z$1.ZodOptional<z$1.ZodObject<{
741
- message: z$1.ZodString;
742
- }, z$1.core.$strip>>;
743
- providerCheckpointId: z$1.ZodOptional<z$1.ZodString>;
744
- providerThreadId: z$1.ZodNullable<z$1.ZodString>;
745
- status: z$1.ZodEnum<{
746
- completed: "completed";
747
- failed: "failed";
748
- interrupted: "interrupted";
749
- }>;
750
- threadId: z$1.ZodString;
751
- type: z$1.ZodLiteral<"turn/completed">;
752
- }, z$1.core.$strip>, z$1.ZodObject<{
753
- clientRequestId: z$1.ZodString;
754
- providerThreadId: z$1.ZodString;
755
- scope: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
756
- kind: z$1.ZodLiteral<"thread">;
757
- }, z$1.core.$strip>, z$1.ZodObject<{
758
- kind: z$1.ZodLiteral<"turn">;
759
- turnId: z$1.ZodString;
760
- }, z$1.core.$strip>], "kind">;
761
- threadId: z$1.ZodString;
762
- type: z$1.ZodLiteral<"turn/input/accepted">;
763
- }, z$1.core.$strict>, z$1.ZodObject<{
764
- providerThreadId: z$1.ZodString;
765
- threadId: z$1.ZodString;
766
- threadName: z$1.ZodString;
767
- type: z$1.ZodLiteral<"thread/name/updated">;
768
- }, z$1.core.$strip>, z$1.ZodObject<{
769
- providerThreadId: z$1.ZodString;
770
- threadId: z$1.ZodString;
771
- type: z$1.ZodLiteral<"thread/compacted">;
772
- }, z$1.core.$strip>, z$1.ZodObject<{
773
- providerThreadId: z$1.ZodString;
774
- threadId: z$1.ZodString;
775
- type: z$1.ZodLiteral<"thread/context/cleared">;
776
- }, z$1.core.$strip>, z$1.ZodObject<{
777
- objective: z$1.ZodString;
778
- providerThreadId: z$1.ZodString;
779
- status: z$1.ZodEnum<{
780
- active: "active";
781
- budgetLimited: "budgetLimited";
782
- complete: "complete";
783
- paused: "paused";
784
- }>;
785
- threadId: z$1.ZodString;
786
- timeUsedSeconds: z$1.ZodNumber;
787
- tokenBudget: z$1.ZodNullable<z$1.ZodNumber>;
788
- tokensUsed: z$1.ZodNumber;
789
- type: z$1.ZodLiteral<"thread/goal/updated">;
790
- }, z$1.core.$strip>, z$1.ZodObject<{
791
- providerThreadId: z$1.ZodString;
792
- threadId: z$1.ZodString;
793
- type: z$1.ZodLiteral<"thread/goal/cleared">;
794
- }, z$1.core.$strip>, z$1.ZodObject<{
795
- item: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
796
- clientRequestId: z$1.ZodOptional<z$1.ZodString>;
797
- content: z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
798
- text: z$1.ZodString;
799
- type: z$1.ZodLiteral<"text">;
557
+ providerThreadId: z$1.ZodString;
558
+ threadId: z$1.ZodString;
559
+ type: z$1.ZodLiteral<"thread/compacted">;
560
+ }, z$1.core.$strip>, z$1.ZodObject<{
561
+ providerThreadId: z$1.ZodString;
562
+ threadId: z$1.ZodString;
563
+ type: z$1.ZodLiteral<"thread/context/cleared">;
564
+ }, z$1.core.$strip>, z$1.ZodObject<{
565
+ objective: z$1.ZodString;
566
+ providerThreadId: z$1.ZodString;
567
+ status: z$1.ZodEnum<{
568
+ active: "active";
569
+ budgetLimited: "budgetLimited";
570
+ complete: "complete";
571
+ paused: "paused";
572
+ }>;
573
+ threadId: z$1.ZodString;
574
+ timeUsedSeconds: z$1.ZodNumber;
575
+ tokenBudget: z$1.ZodNullable<z$1.ZodNumber>;
576
+ tokensUsed: z$1.ZodNumber;
577
+ type: z$1.ZodLiteral<"thread/goal/updated">;
578
+ }, z$1.core.$strip>, z$1.ZodObject<{
579
+ providerThreadId: z$1.ZodString;
580
+ threadId: z$1.ZodString;
581
+ type: z$1.ZodLiteral<"thread/goal/cleared">;
582
+ }, z$1.core.$strip>, z$1.ZodObject<{
583
+ item: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
584
+ clientRequestId: z$1.ZodOptional<z$1.ZodString>;
585
+ content: z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
586
+ text: z$1.ZodString;
587
+ type: z$1.ZodLiteral<"text">;
800
588
  }, z$1.core.$strip>, z$1.ZodObject<{
801
589
  type: z$1.ZodLiteral<"image">;
802
590
  url: z$1.ZodString;
@@ -1047,6 +835,66 @@ declare const threadEventSchema: z$1.ZodPipe<z$1.ZodUnknown, z$1.ZodUnion<readon
1047
835
  title: z$1.ZodOptional<z$1.ZodString>;
1048
836
  }, z$1.core.$strip>>;
1049
837
  type: z$1.ZodLiteral<"imageView">;
838
+ }, z$1.core.$strip>, z$1.ZodObject<{
839
+ error: z$1.ZodNullable<z$1.ZodString>;
840
+ id: z$1.ZodString;
841
+ parentToolCallId: z$1.ZodOptional<z$1.ZodString>;
842
+ path: z$1.ZodNullable<z$1.ZodString>;
843
+ presentation: z$1.ZodOptional<z$1.ZodObject<{
844
+ badge: z$1.ZodOptional<z$1.ZodObject<{
845
+ glyph: z$1.ZodString;
846
+ hint: z$1.ZodString;
847
+ label: z$1.ZodString;
848
+ tone: z$1.ZodEnum<{
849
+ destructive: "destructive";
850
+ neutral: "neutral";
851
+ }>;
852
+ }, z$1.core.$strip>>;
853
+ detail: z$1.ZodOptional<z$1.ZodString>;
854
+ icon: z$1.ZodObject<{
855
+ glyph: z$1.ZodString;
856
+ }, z$1.core.$strip>;
857
+ label: z$1.ZodObject<{
858
+ completed: z$1.ZodString;
859
+ pending: z$1.ZodString;
860
+ }, z$1.core.$strip>;
861
+ suppress: z$1.ZodOptional<z$1.ZodBoolean>;
862
+ tint: z$1.ZodOptional<z$1.ZodObject<{
863
+ dark: z$1.ZodString;
864
+ light: z$1.ZodString;
865
+ }, z$1.core.$strip>>;
866
+ title: z$1.ZodOptional<z$1.ZodString>;
867
+ }, z$1.core.$strip>>;
868
+ prompt: z$1.ZodNullable<z$1.ZodString>;
869
+ result: z$1.ZodOptional<z$1.ZodString>;
870
+ status: z$1.ZodEnum<{
871
+ completed: "completed";
872
+ failed: "failed";
873
+ interrupted: "interrupted";
874
+ pending: "pending";
875
+ }>;
876
+ transparentBackground: z$1.ZodBoolean;
877
+ truncation: z$1.ZodOptional<z$1.ZodObject<{
878
+ aggregatedOutput: z$1.ZodOptional<z$1.ZodObject<{
879
+ originalLength: z$1.ZodNumber;
880
+ retainedHeadLength: z$1.ZodNumber;
881
+ retainedTailLength: z$1.ZodNumber;
882
+ truncatedAt: z$1.ZodNumber;
883
+ }, z$1.core.$strip>>;
884
+ result: z$1.ZodOptional<z$1.ZodObject<{
885
+ originalLength: z$1.ZodNumber;
886
+ retainedHeadLength: z$1.ZodNumber;
887
+ retainedTailLength: z$1.ZodNumber;
888
+ truncatedAt: z$1.ZodNumber;
889
+ }, z$1.core.$strip>>;
890
+ resultText: z$1.ZodOptional<z$1.ZodObject<{
891
+ originalLength: z$1.ZodNumber;
892
+ retainedHeadLength: z$1.ZodNumber;
893
+ retainedTailLength: z$1.ZodNumber;
894
+ truncatedAt: z$1.ZodNumber;
895
+ }, z$1.core.$strip>>;
896
+ }, z$1.core.$strip>>;
897
+ type: z$1.ZodLiteral<"imageGeneration">;
1050
898
  }, z$1.core.$strip>, z$1.ZodObject<{
1051
899
  cmd: z$1.ZodOptional<z$1.ZodString>;
1052
900
  id: z$1.ZodString;
@@ -1749,9 +1597,69 @@ declare const threadEventSchema: z$1.ZodPipe<z$1.ZodUnknown, z$1.ZodUnion<readon
1749
1597
  dark: z$1.ZodString;
1750
1598
  light: z$1.ZodString;
1751
1599
  }, z$1.core.$strip>>;
1752
- title: z$1.ZodOptional<z$1.ZodString>;
1600
+ title: z$1.ZodOptional<z$1.ZodString>;
1601
+ }, z$1.core.$strip>>;
1602
+ type: z$1.ZodLiteral<"imageView">;
1603
+ }, z$1.core.$strip>, z$1.ZodObject<{
1604
+ error: z$1.ZodNullable<z$1.ZodString>;
1605
+ id: z$1.ZodString;
1606
+ parentToolCallId: z$1.ZodOptional<z$1.ZodString>;
1607
+ path: z$1.ZodNullable<z$1.ZodString>;
1608
+ presentation: z$1.ZodOptional<z$1.ZodObject<{
1609
+ badge: z$1.ZodOptional<z$1.ZodObject<{
1610
+ glyph: z$1.ZodString;
1611
+ hint: z$1.ZodString;
1612
+ label: z$1.ZodString;
1613
+ tone: z$1.ZodEnum<{
1614
+ destructive: "destructive";
1615
+ neutral: "neutral";
1616
+ }>;
1617
+ }, z$1.core.$strip>>;
1618
+ detail: z$1.ZodOptional<z$1.ZodString>;
1619
+ icon: z$1.ZodObject<{
1620
+ glyph: z$1.ZodString;
1621
+ }, z$1.core.$strip>;
1622
+ label: z$1.ZodObject<{
1623
+ completed: z$1.ZodString;
1624
+ pending: z$1.ZodString;
1625
+ }, z$1.core.$strip>;
1626
+ suppress: z$1.ZodOptional<z$1.ZodBoolean>;
1627
+ tint: z$1.ZodOptional<z$1.ZodObject<{
1628
+ dark: z$1.ZodString;
1629
+ light: z$1.ZodString;
1630
+ }, z$1.core.$strip>>;
1631
+ title: z$1.ZodOptional<z$1.ZodString>;
1632
+ }, z$1.core.$strip>>;
1633
+ prompt: z$1.ZodNullable<z$1.ZodString>;
1634
+ result: z$1.ZodOptional<z$1.ZodString>;
1635
+ status: z$1.ZodEnum<{
1636
+ completed: "completed";
1637
+ failed: "failed";
1638
+ interrupted: "interrupted";
1639
+ pending: "pending";
1640
+ }>;
1641
+ transparentBackground: z$1.ZodBoolean;
1642
+ truncation: z$1.ZodOptional<z$1.ZodObject<{
1643
+ aggregatedOutput: z$1.ZodOptional<z$1.ZodObject<{
1644
+ originalLength: z$1.ZodNumber;
1645
+ retainedHeadLength: z$1.ZodNumber;
1646
+ retainedTailLength: z$1.ZodNumber;
1647
+ truncatedAt: z$1.ZodNumber;
1648
+ }, z$1.core.$strip>>;
1649
+ result: z$1.ZodOptional<z$1.ZodObject<{
1650
+ originalLength: z$1.ZodNumber;
1651
+ retainedHeadLength: z$1.ZodNumber;
1652
+ retainedTailLength: z$1.ZodNumber;
1653
+ truncatedAt: z$1.ZodNumber;
1654
+ }, z$1.core.$strip>>;
1655
+ resultText: z$1.ZodOptional<z$1.ZodObject<{
1656
+ originalLength: z$1.ZodNumber;
1657
+ retainedHeadLength: z$1.ZodNumber;
1658
+ retainedTailLength: z$1.ZodNumber;
1659
+ truncatedAt: z$1.ZodNumber;
1660
+ }, z$1.core.$strip>>;
1753
1661
  }, z$1.core.$strip>>;
1754
- type: z$1.ZodLiteral<"imageView">;
1662
+ type: z$1.ZodLiteral<"imageGeneration">;
1755
1663
  }, z$1.core.$strip>, z$1.ZodObject<{
1756
1664
  cmd: z$1.ZodOptional<z$1.ZodString>;
1757
1665
  id: z$1.ZodString;
@@ -2984,176 +2892,503 @@ declare const threadEventSchema: z$1.ZodPipe<z$1.ZodUnknown, z$1.ZodUnion<readon
2984
2892
  expectedTurnId: z$1.ZodNullable<z$1.ZodString>;
2985
2893
  kind: z$1.ZodLiteral<"auto">;
2986
2894
  }, z$1.core.$strip>, z$1.ZodObject<{
2987
- expectedTurnId: z$1.ZodNullable<z$1.ZodString>;
2988
- kind: z$1.ZodLiteral<"steer">;
2989
- }, z$1.core.$strip>], "kind">;
2990
- threadId: z$1.ZodString;
2991
- type: z$1.ZodLiteral<"client/turn/requested">;
2992
- }, z$1.core.$strip>, z$1.ZodObject<{
2993
- message: z$1.ZodString;
2994
- reason: z$1.ZodString;
2995
- requestId: z$1.ZodString;
2895
+ expectedTurnId: z$1.ZodNullable<z$1.ZodString>;
2896
+ kind: z$1.ZodLiteral<"steer">;
2897
+ }, z$1.core.$strip>], "kind">;
2898
+ threadId: z$1.ZodString;
2899
+ type: z$1.ZodLiteral<"client/turn/requested">;
2900
+ }, z$1.core.$strip>, z$1.ZodObject<{
2901
+ message: z$1.ZodString;
2902
+ reason: z$1.ZodString;
2903
+ requestId: z$1.ZodString;
2904
+ threadId: z$1.ZodString;
2905
+ type: z$1.ZodLiteral<"client/turn/rejected">;
2906
+ }, z$1.core.$strip>, z$1.ZodObject<{
2907
+ direction: z$1.ZodLiteral<"outbound">;
2908
+ initiator: z$1.ZodEnum<{
2909
+ agent: "agent";
2910
+ system: "system";
2911
+ user: "user";
2912
+ }>;
2913
+ request: z$1.ZodObject<{
2914
+ method: z$1.ZodEnum<{
2915
+ "thread/start": "thread/start";
2916
+ "turn/start": "turn/start";
2917
+ }>;
2918
+ params: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
2919
+ }, z$1.core.$strip>;
2920
+ source: z$1.ZodEnum<{
2921
+ spawn: "spawn";
2922
+ tell: "tell";
2923
+ }>;
2924
+ threadId: z$1.ZodString;
2925
+ type: z$1.ZodLiteral<"client/turn/start">;
2926
+ }, z$1.core.$strip>, z$1.ZodObject<{
2927
+ code: z$1.ZodOptional<z$1.ZodString>;
2928
+ detail: z$1.ZodOptional<z$1.ZodString>;
2929
+ message: z$1.ZodString;
2930
+ reconnectAttempt: z$1.ZodOptional<z$1.ZodNumber>;
2931
+ reconnectTotal: z$1.ZodOptional<z$1.ZodNumber>;
2932
+ threadId: z$1.ZodString;
2933
+ type: z$1.ZodLiteral<"system/error">;
2934
+ }, z$1.core.$strip>, z$1.ZodObject<{
2935
+ text: z$1.ZodString;
2936
+ threadId: z$1.ZodString;
2937
+ toolCallId: z$1.ZodOptional<z$1.ZodString>;
2938
+ turnId: z$1.ZodOptional<z$1.ZodString>;
2939
+ type: z$1.ZodLiteral<"system/manager/user_message">;
2940
+ }, z$1.core.$strip>, z$1.ZodObject<{
2941
+ cause: z$1.ZodOptional<z$1.ZodLiteral<"host-connection-lost">>;
2942
+ reason: z$1.ZodEnum<{
2943
+ "host-daemon-restarted": "host-daemon-restarted";
2944
+ "manual-stop": "manual-stop";
2945
+ "provider-turn-idle": "provider-turn-idle";
2946
+ }>;
2947
+ threadId: z$1.ZodString;
2948
+ type: z$1.ZodLiteral<"system/thread/interrupted">;
2949
+ }, z$1.core.$strip>, z$1.ZodObject<{
2950
+ message: z$1.ZodString;
2951
+ metadata: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>>>;
2952
+ operation: z$1.ZodString;
2953
+ operationId: z$1.ZodString;
2954
+ status: z$1.ZodString;
2955
+ threadId: z$1.ZodString;
2956
+ type: z$1.ZodLiteral<"system/operation">;
2957
+ }, z$1.core.$strip>, z$1.ZodObject<{
2958
+ interaction: z$1.ZodUnion<readonly [z$1.ZodObject<{
2959
+ id: z$1.ZodString;
2960
+ origin: z$1.ZodObject<{
2961
+ kind: z$1.ZodLiteral<"provider">;
2962
+ providerId: z$1.ZodString;
2963
+ providerRequestId: z$1.ZodString;
2964
+ }, z$1.core.$strip>;
2965
+ payload: z$1.ZodObject<{
2966
+ kind: z$1.ZodLiteral<"approval">;
2967
+ reason: z$1.ZodNullable<z$1.ZodString>;
2968
+ subject: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
2969
+ actions: z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
2970
+ command: z$1.ZodString;
2971
+ name: z$1.ZodString;
2972
+ path: z$1.ZodString;
2973
+ type: z$1.ZodLiteral<"read">;
2974
+ }, z$1.core.$strip>, z$1.ZodObject<{
2975
+ command: z$1.ZodString;
2976
+ path: z$1.ZodNullable<z$1.ZodString>;
2977
+ type: z$1.ZodLiteral<"listFiles">;
2978
+ }, z$1.core.$strip>, z$1.ZodObject<{
2979
+ command: z$1.ZodString;
2980
+ path: z$1.ZodNullable<z$1.ZodString>;
2981
+ query: z$1.ZodNullable<z$1.ZodString>;
2982
+ type: z$1.ZodLiteral<"search">;
2983
+ }, z$1.core.$strip>, z$1.ZodObject<{
2984
+ command: z$1.ZodString;
2985
+ type: z$1.ZodLiteral<"unknown">;
2986
+ }, z$1.core.$strip>], "type">>;
2987
+ command: z$1.ZodString;
2988
+ cwd: z$1.ZodNullable<z$1.ZodString>;
2989
+ itemId: z$1.ZodString;
2990
+ kind: z$1.ZodLiteral<"command">;
2991
+ sessionGrant: z$1.ZodNullable<z$1.ZodObject<{
2992
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
2993
+ read: z$1.ZodArray<z$1.ZodString>;
2994
+ write: z$1.ZodArray<z$1.ZodString>;
2995
+ }, z$1.core.$strip>>;
2996
+ network: z$1.ZodNullable<z$1.ZodObject<{
2997
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
2998
+ }, z$1.core.$strip>>;
2999
+ }, z$1.core.$strict>>;
3000
+ }, z$1.core.$strip>, z$1.ZodObject<{
3001
+ itemId: z$1.ZodString;
3002
+ kind: z$1.ZodLiteral<"file_change">;
3003
+ sessionGrant: z$1.ZodNullable<z$1.ZodObject<{
3004
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3005
+ read: z$1.ZodArray<z$1.ZodString>;
3006
+ write: z$1.ZodArray<z$1.ZodString>;
3007
+ }, z$1.core.$strip>>;
3008
+ network: z$1.ZodNullable<z$1.ZodObject<{
3009
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3010
+ }, z$1.core.$strip>>;
3011
+ }, z$1.core.$strict>>;
3012
+ writeScope: z$1.ZodNullable<z$1.ZodString>;
3013
+ }, z$1.core.$strip>, z$1.ZodObject<{
3014
+ itemId: z$1.ZodString;
3015
+ kind: z$1.ZodLiteral<"permission_grant">;
3016
+ permissions: z$1.ZodObject<{
3017
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3018
+ read: z$1.ZodArray<z$1.ZodString>;
3019
+ write: z$1.ZodArray<z$1.ZodString>;
3020
+ }, z$1.core.$strip>>;
3021
+ network: z$1.ZodNullable<z$1.ZodObject<{
3022
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3023
+ }, z$1.core.$strip>>;
3024
+ }, z$1.core.$strict>;
3025
+ toolName: z$1.ZodNullable<z$1.ZodString>;
3026
+ }, z$1.core.$strip>, z$1.ZodObject<{
3027
+ itemId: z$1.ZodString;
3028
+ kind: z$1.ZodLiteral<"plan">;
3029
+ plan: z$1.ZodString;
3030
+ planFilePath: z$1.ZodNullable<z$1.ZodString>;
3031
+ }, z$1.core.$strip>, z$1.ZodObject<{
3032
+ itemId: z$1.ZodString;
3033
+ kind: z$1.ZodLiteral<"tool_use">;
3034
+ presentation: z$1.ZodObject<{
3035
+ badge: z$1.ZodOptional<z$1.ZodObject<{
3036
+ glyph: z$1.ZodString;
3037
+ hint: z$1.ZodString;
3038
+ label: z$1.ZodString;
3039
+ tone: z$1.ZodEnum<{
3040
+ destructive: "destructive";
3041
+ neutral: "neutral";
3042
+ }>;
3043
+ }, z$1.core.$strip>>;
3044
+ detail: z$1.ZodOptional<z$1.ZodString>;
3045
+ icon: z$1.ZodObject<{
3046
+ glyph: z$1.ZodString;
3047
+ }, z$1.core.$strip>;
3048
+ label: z$1.ZodObject<{
3049
+ completed: z$1.ZodString;
3050
+ pending: z$1.ZodString;
3051
+ }, z$1.core.$strip>;
3052
+ suppress: z$1.ZodOptional<z$1.ZodBoolean>;
3053
+ tint: z$1.ZodOptional<z$1.ZodObject<{
3054
+ dark: z$1.ZodString;
3055
+ light: z$1.ZodString;
3056
+ }, z$1.core.$strip>>;
3057
+ title: z$1.ZodOptional<z$1.ZodString>;
3058
+ }, z$1.core.$strip>;
3059
+ tool: z$1.ZodString;
3060
+ }, z$1.core.$strip>], "kind">;
3061
+ }, z$1.core.$strip>;
3062
+ resolution: z$1.ZodNullable<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3063
+ decision: z$1.ZodLiteral<"allow_once">;
3064
+ grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
3065
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3066
+ read: z$1.ZodArray<z$1.ZodString>;
3067
+ write: z$1.ZodArray<z$1.ZodString>;
3068
+ }, z$1.core.$strip>>;
3069
+ network: z$1.ZodNullable<z$1.ZodObject<{
3070
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3071
+ }, z$1.core.$strip>>;
3072
+ }, z$1.core.$strict>>;
3073
+ }, z$1.core.$strip>, z$1.ZodObject<{
3074
+ decision: z$1.ZodLiteral<"allow_for_session">;
3075
+ grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
3076
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3077
+ read: z$1.ZodArray<z$1.ZodString>;
3078
+ write: z$1.ZodArray<z$1.ZodString>;
3079
+ }, z$1.core.$strip>>;
3080
+ network: z$1.ZodNullable<z$1.ZodObject<{
3081
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3082
+ }, z$1.core.$strip>>;
3083
+ }, z$1.core.$strict>>;
3084
+ }, z$1.core.$strip>, z$1.ZodObject<{
3085
+ decision: z$1.ZodLiteral<"deny">;
3086
+ }, z$1.core.$strip>], "decision">>;
3087
+ status: z$1.ZodEnum<{
3088
+ interrupted: "interrupted";
3089
+ pending: "pending";
3090
+ resolved: "resolved";
3091
+ resolving: "resolving";
3092
+ }>;
3093
+ statusReason: z$1.ZodNullable<z$1.ZodString>;
3094
+ }, z$1.core.$strip>, z$1.ZodObject<{
3095
+ id: z$1.ZodString;
3096
+ origin: z$1.ZodObject<{
3097
+ kind: z$1.ZodLiteral<"provider">;
3098
+ providerId: z$1.ZodString;
3099
+ providerRequestId: z$1.ZodString;
3100
+ }, z$1.core.$strip>;
3101
+ payload: z$1.ZodObject<{
3102
+ kind: z$1.ZodLiteral<"user_question">;
3103
+ questions: z$1.ZodArray<z$1.ZodObject<{
3104
+ allowFreeText: z$1.ZodBoolean;
3105
+ id: z$1.ZodString;
3106
+ multiSelect: z$1.ZodBoolean;
3107
+ options: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
3108
+ description: z$1.ZodOptional<z$1.ZodString>;
3109
+ label: z$1.ZodString;
3110
+ value: z$1.ZodString;
3111
+ }, z$1.core.$strip>>>;
3112
+ prompt: z$1.ZodString;
3113
+ shortLabel: z$1.ZodOptional<z$1.ZodString>;
3114
+ }, z$1.core.$strip>>;
3115
+ }, z$1.core.$strip>;
3116
+ resolution: z$1.ZodNullable<z$1.ZodObject<{
3117
+ answers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
3118
+ freeText: z$1.ZodOptional<z$1.ZodString>;
3119
+ selected: z$1.ZodArray<z$1.ZodString>;
3120
+ }, z$1.core.$strip>>;
3121
+ kind: z$1.ZodLiteral<"user_answer">;
3122
+ }, z$1.core.$strip>>;
3123
+ status: z$1.ZodEnum<{
3124
+ interrupted: "interrupted";
3125
+ pending: "pending";
3126
+ resolved: "resolved";
3127
+ resolving: "resolving";
3128
+ }>;
3129
+ statusReason: z$1.ZodNullable<z$1.ZodString>;
3130
+ }, z$1.core.$strip>, z$1.ZodObject<{
3131
+ id: z$1.ZodString;
3132
+ origin: z$1.ZodObject<{
3133
+ kind: z$1.ZodLiteral<"plugin">;
3134
+ pluginId: z$1.ZodString;
3135
+ rendererId: z$1.ZodString;
3136
+ }, z$1.core.$strip>;
3137
+ payload: z$1.ZodObject<{
3138
+ kind: z$1.ZodLiteral<"plugin">;
3139
+ title: z$1.ZodString;
3140
+ }, z$1.core.$strip>;
3141
+ resolution: z$1.ZodNullable<z$1.ZodObject<{
3142
+ kind: z$1.ZodLiteral<"plugin_submitted">;
3143
+ }, z$1.core.$strip>>;
3144
+ status: z$1.ZodEnum<{
3145
+ interrupted: "interrupted";
3146
+ pending: "pending";
3147
+ resolved: "resolved";
3148
+ resolving: "resolving";
3149
+ }>;
3150
+ statusReason: z$1.ZodNullable<z$1.ZodString>;
3151
+ }, z$1.core.$strip>, z$1.ZodObject<{
3152
+ id: z$1.ZodString;
3153
+ origin: z$1.ZodObject<{
3154
+ kind: z$1.ZodLiteral<"provider">;
3155
+ providerId: z$1.ZodString;
3156
+ providerRequestId: z$1.ZodString;
3157
+ }, z$1.core.$strip>;
3158
+ payload: z$1.ZodObject<{
3159
+ kind: z$1.ZodString & z$1.ZodType<`${string}/${string}`, string, z$1.core.$ZodTypeInternals<`${string}/${string}`, string>>;
3160
+ title: z$1.ZodString;
3161
+ }, z$1.core.$strip>;
3162
+ resolution: z$1.ZodNullable<z$1.ZodObject<{
3163
+ kind: z$1.ZodLiteral<"request_answer">;
3164
+ }, z$1.core.$strip>>;
3165
+ status: z$1.ZodEnum<{
3166
+ interrupted: "interrupted";
3167
+ pending: "pending";
3168
+ resolved: "resolved";
3169
+ resolving: "resolving";
3170
+ }>;
3171
+ statusReason: z$1.ZodNullable<z$1.ZodString>;
3172
+ }, z$1.core.$strip>]>;
2996
3173
  threadId: z$1.ZodString;
2997
- type: z$1.ZodLiteral<"client/turn/rejected">;
3174
+ type: z$1.ZodLiteral<"system/interaction/lifecycle">;
2998
3175
  }, z$1.core.$strip>, z$1.ZodObject<{
2999
- direction: z$1.ZodLiteral<"outbound">;
3000
- initiator: z$1.ZodEnum<{
3001
- agent: "agent";
3002
- system: "system";
3003
- user: "user";
3176
+ interactionId: z$1.ZodString;
3177
+ providerId: z$1.ZodString;
3178
+ providerRequestId: z$1.ZodString;
3179
+ resolution: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3180
+ decision: z$1.ZodLiteral<"allow_once">;
3181
+ grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
3182
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3183
+ read: z$1.ZodArray<z$1.ZodString>;
3184
+ write: z$1.ZodArray<z$1.ZodString>;
3185
+ }, z$1.core.$strip>>;
3186
+ network: z$1.ZodNullable<z$1.ZodObject<{
3187
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3188
+ }, z$1.core.$strip>>;
3189
+ }, z$1.core.$strict>>;
3190
+ }, z$1.core.$strip>, z$1.ZodObject<{
3191
+ decision: z$1.ZodLiteral<"allow_for_session">;
3192
+ grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
3193
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3194
+ read: z$1.ZodArray<z$1.ZodString>;
3195
+ write: z$1.ZodArray<z$1.ZodString>;
3196
+ }, z$1.core.$strip>>;
3197
+ network: z$1.ZodNullable<z$1.ZodObject<{
3198
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3199
+ }, z$1.core.$strip>>;
3200
+ }, z$1.core.$strict>>;
3201
+ }, z$1.core.$strip>, z$1.ZodObject<{
3202
+ decision: z$1.ZodLiteral<"deny">;
3203
+ }, z$1.core.$strip>], "decision">>>;
3204
+ status: z$1.ZodEnum<{
3205
+ interrupted: "interrupted";
3206
+ pending: "pending";
3207
+ resolved: "resolved";
3208
+ resolving: "resolving";
3004
3209
  }>;
3005
- request: z$1.ZodObject<{
3006
- method: z$1.ZodEnum<{
3007
- "thread/start": "thread/start";
3008
- "turn/start": "turn/start";
3009
- }>;
3010
- params: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
3210
+ statusReason: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodString>>;
3211
+ subject: z$1.ZodObject<{
3212
+ itemId: z$1.ZodString;
3213
+ kind: z$1.ZodLiteral<"permission_grant">;
3214
+ permissions: z$1.ZodObject<{
3215
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3216
+ read: z$1.ZodArray<z$1.ZodString>;
3217
+ write: z$1.ZodArray<z$1.ZodString>;
3218
+ }, z$1.core.$strip>>;
3219
+ network: z$1.ZodNullable<z$1.ZodObject<{
3220
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3221
+ }, z$1.core.$strip>>;
3222
+ }, z$1.core.$strict>;
3223
+ toolName: z$1.ZodNullable<z$1.ZodString>;
3011
3224
  }, z$1.core.$strip>;
3012
- source: z$1.ZodEnum<{
3013
- spawn: "spawn";
3014
- tell: "tell";
3015
- }>;
3016
- threadId: z$1.ZodString;
3017
- type: z$1.ZodLiteral<"client/turn/start">;
3018
- }, z$1.core.$strip>, z$1.ZodObject<{
3019
- code: z$1.ZodOptional<z$1.ZodString>;
3020
- detail: z$1.ZodOptional<z$1.ZodString>;
3021
- message: z$1.ZodString;
3022
- reconnectAttempt: z$1.ZodOptional<z$1.ZodNumber>;
3023
- reconnectTotal: z$1.ZodOptional<z$1.ZodNumber>;
3024
3225
  threadId: z$1.ZodString;
3025
- type: z$1.ZodLiteral<"system/error">;
3226
+ type: z$1.ZodLiteral<"system/permissionGrant/lifecycle">;
3026
3227
  }, z$1.core.$strip>, z$1.ZodObject<{
3027
- text: z$1.ZodString;
3228
+ interactionId: z$1.ZodString;
3229
+ payload: z$1.ZodObject<{
3230
+ kind: z$1.ZodLiteral<"user_question">;
3231
+ questions: z$1.ZodArray<z$1.ZodObject<{
3232
+ allowFreeText: z$1.ZodBoolean;
3233
+ id: z$1.ZodString;
3234
+ multiSelect: z$1.ZodBoolean;
3235
+ options: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
3236
+ description: z$1.ZodOptional<z$1.ZodString>;
3237
+ label: z$1.ZodString;
3238
+ value: z$1.ZodString;
3239
+ }, z$1.core.$strip>>>;
3240
+ prompt: z$1.ZodString;
3241
+ shortLabel: z$1.ZodOptional<z$1.ZodString>;
3242
+ }, z$1.core.$strip>>;
3243
+ }, z$1.core.$strip>;
3244
+ providerId: z$1.ZodString;
3245
+ providerRequestId: z$1.ZodString;
3246
+ resolution: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
3247
+ answers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
3248
+ freeText: z$1.ZodOptional<z$1.ZodString>;
3249
+ selected: z$1.ZodArray<z$1.ZodString>;
3250
+ }, z$1.core.$strip>>;
3251
+ kind: z$1.ZodLiteral<"user_answer">;
3252
+ }, z$1.core.$strip>>>;
3253
+ status: z$1.ZodEnum<{
3254
+ interrupted: "interrupted";
3255
+ pending: "pending";
3256
+ resolved: "resolved";
3257
+ resolving: "resolving";
3258
+ }>;
3259
+ statusReason: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodString>>;
3028
3260
  threadId: z$1.ZodString;
3029
- toolCallId: z$1.ZodOptional<z$1.ZodString>;
3030
- turnId: z$1.ZodOptional<z$1.ZodString>;
3031
- type: z$1.ZodLiteral<"system/manager/user_message">;
3261
+ type: z$1.ZodLiteral<"system/userQuestion/lifecycle">;
3032
3262
  }, z$1.core.$strip>, z$1.ZodObject<{
3033
- cause: z$1.ZodOptional<z$1.ZodLiteral<"host-connection-lost">>;
3034
- reason: z$1.ZodEnum<{
3035
- "host-daemon-restarted": "host-daemon-restarted";
3036
- "manual-stop": "manual-stop";
3037
- "provider-turn-idle": "provider-turn-idle";
3263
+ entries: z$1.ZodArray<z$1.ZodObject<{
3264
+ key: z$1.ZodString;
3265
+ metadata: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
3266
+ startedAt: z$1.ZodOptional<z$1.ZodNumber>;
3267
+ status: z$1.ZodOptional<z$1.ZodEnum<{
3268
+ completed: "completed";
3269
+ failed: "failed";
3270
+ started: "started";
3271
+ }>>;
3272
+ text: z$1.ZodString;
3273
+ type: z$1.ZodEnum<{
3274
+ output: "output";
3275
+ step: "step";
3276
+ }>;
3277
+ }, z$1.core.$strip>>;
3278
+ environmentId: z$1.ZodNullable<z$1.ZodString>;
3279
+ provisioningId: z$1.ZodString;
3280
+ status: z$1.ZodEnum<{
3281
+ active: "active";
3282
+ cancelled: "cancelled";
3283
+ completed: "completed";
3284
+ failed: "failed";
3038
3285
  }>;
3039
3286
  threadId: z$1.ZodString;
3040
- type: z$1.ZodLiteral<"system/thread/interrupted">;
3287
+ type: z$1.ZodLiteral<"system/thread-provisioning">;
3041
3288
  }, z$1.core.$strip>, z$1.ZodObject<{
3042
- message: z$1.ZodString;
3043
- metadata: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>>>;
3044
- operation: z$1.ZodString;
3045
- operationId: z$1.ZodString;
3046
- status: z$1.ZodString;
3289
+ activeTurnId: z$1.ZodString;
3290
+ activeTurnStartedAt: z$1.ZodNumber;
3291
+ elapsedMs: z$1.ZodNumber;
3292
+ firedAt: z$1.ZodNumber;
3293
+ lastActivityEventAt: z$1.ZodNumber;
3294
+ lastActivityEventSequence: z$1.ZodNumber;
3295
+ lastActivityEventType: z$1.ZodString;
3296
+ providerId: z$1.ZodString;
3297
+ providerThreadId: z$1.ZodNullable<z$1.ZodString>;
3298
+ reason: z$1.ZodLiteral<"provider-turn-idle">;
3047
3299
  threadId: z$1.ZodString;
3048
- type: z$1.ZodLiteral<"system/operation">;
3300
+ thresholdMs: z$1.ZodNumber;
3301
+ type: z$1.ZodLiteral<"system/provider-turn-watchdog">;
3302
+ }, z$1.core.$strip>], "type">, z$1.ZodObject<{
3303
+ scope: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3304
+ kind: z$1.ZodLiteral<"thread">;
3305
+ }, z$1.core.$strip>, z$1.ZodObject<{
3306
+ kind: z$1.ZodLiteral<"turn">;
3307
+ turnId: z$1.ZodString;
3308
+ }, z$1.core.$strip>], "kind">;
3309
+ }, z$1.core.$strip>>]>>;
3310
+ type ThreadEvent = z$1.infer<typeof threadEventSchema>;
3311
+ type ThreadEventType = ThreadEvent["type"];
3312
+
3313
+ declare const pendingInteractionResolutionSchema: z$1.ZodUnion<readonly [z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3314
+ decision: z$1.ZodLiteral<"allow_once">;
3315
+ grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
3316
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3317
+ read: z$1.ZodArray<z$1.ZodString>;
3318
+ write: z$1.ZodArray<z$1.ZodString>;
3319
+ }, z$1.core.$strip>>;
3320
+ network: z$1.ZodNullable<z$1.ZodObject<{
3321
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3322
+ }, z$1.core.$strip>>;
3323
+ }, z$1.core.$strict>>;
3049
3324
  }, z$1.core.$strip>, z$1.ZodObject<{
3050
- interaction: z$1.ZodUnion<readonly [z$1.ZodObject<{
3051
- id: z$1.ZodString;
3052
- origin: z$1.ZodObject<{
3053
- kind: z$1.ZodLiteral<"provider">;
3054
- providerId: z$1.ZodString;
3055
- providerRequestId: z$1.ZodString;
3056
- }, z$1.core.$strip>;
3057
- payload: z$1.ZodObject<{
3058
- kind: z$1.ZodLiteral<"approval">;
3059
- reason: z$1.ZodNullable<z$1.ZodString>;
3060
- subject: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3061
- actions: z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3062
- command: z$1.ZodString;
3063
- name: z$1.ZodString;
3064
- path: z$1.ZodString;
3065
- type: z$1.ZodLiteral<"read">;
3066
- }, z$1.core.$strip>, z$1.ZodObject<{
3067
- command: z$1.ZodString;
3068
- path: z$1.ZodNullable<z$1.ZodString>;
3069
- type: z$1.ZodLiteral<"listFiles">;
3070
- }, z$1.core.$strip>, z$1.ZodObject<{
3071
- command: z$1.ZodString;
3072
- path: z$1.ZodNullable<z$1.ZodString>;
3073
- query: z$1.ZodNullable<z$1.ZodString>;
3074
- type: z$1.ZodLiteral<"search">;
3075
- }, z$1.core.$strip>, z$1.ZodObject<{
3076
- command: z$1.ZodString;
3077
- type: z$1.ZodLiteral<"unknown">;
3078
- }, z$1.core.$strip>], "type">>;
3325
+ decision: z$1.ZodLiteral<"allow_for_session">;
3326
+ grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
3327
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3328
+ read: z$1.ZodArray<z$1.ZodString>;
3329
+ write: z$1.ZodArray<z$1.ZodString>;
3330
+ }, z$1.core.$strip>>;
3331
+ network: z$1.ZodNullable<z$1.ZodObject<{
3332
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3333
+ }, z$1.core.$strip>>;
3334
+ }, z$1.core.$strict>>;
3335
+ }, z$1.core.$strip>, z$1.ZodObject<{
3336
+ decision: z$1.ZodLiteral<"deny">;
3337
+ }, z$1.core.$strip>], "decision">, z$1.ZodObject<{
3338
+ answers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
3339
+ freeText: z$1.ZodOptional<z$1.ZodString>;
3340
+ selected: z$1.ZodArray<z$1.ZodString>;
3341
+ }, z$1.core.$strip>>;
3342
+ kind: z$1.ZodLiteral<"user_answer">;
3343
+ }, z$1.core.$strip>, z$1.ZodObject<{
3344
+ kind: z$1.ZodLiteral<"plugin_submitted">;
3345
+ }, z$1.core.$strip>, z$1.ZodObject<{
3346
+ kind: z$1.ZodLiteral<"request_answer">;
3347
+ value: z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>;
3348
+ }, z$1.core.$strip>]>;
3349
+ type PendingInteractionResolution = z$1.infer<typeof pendingInteractionResolutionSchema>;
3350
+ declare const providerPendingInteractionSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
3351
+ createdAt: z$1.ZodNumber;
3352
+ expiresAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
3353
+ id: z$1.ZodString;
3354
+ origin: z$1.ZodOptional<z$1.ZodObject<{
3355
+ kind: z$1.ZodLiteral<"provider">;
3356
+ providerId: z$1.ZodString;
3357
+ providerRequestId: z$1.ZodString;
3358
+ providerThreadId: z$1.ZodString;
3359
+ }, z$1.core.$strip>>;
3360
+ payload: z$1.ZodObject<{
3361
+ availableDecisions: z$1.ZodArray<z$1.ZodEnum<{
3362
+ allow_for_session: "allow_for_session";
3363
+ allow_once: "allow_once";
3364
+ deny: "deny";
3365
+ }>>;
3366
+ kind: z$1.ZodLiteral<"approval">;
3367
+ reason: z$1.ZodNullable<z$1.ZodString>;
3368
+ subject: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3369
+ actions: z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3079
3370
  command: z$1.ZodString;
3080
- cwd: z$1.ZodNullable<z$1.ZodString>;
3081
- itemId: z$1.ZodString;
3082
- kind: z$1.ZodLiteral<"command">;
3083
- sessionGrant: z$1.ZodNullable<z$1.ZodObject<{
3084
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3085
- read: z$1.ZodArray<z$1.ZodString>;
3086
- write: z$1.ZodArray<z$1.ZodString>;
3087
- }, z$1.core.$strip>>;
3088
- network: z$1.ZodNullable<z$1.ZodObject<{
3089
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3090
- }, z$1.core.$strip>>;
3091
- }, z$1.core.$strict>>;
3092
- }, z$1.core.$strip>, z$1.ZodObject<{
3093
- itemId: z$1.ZodString;
3094
- kind: z$1.ZodLiteral<"file_change">;
3095
- sessionGrant: z$1.ZodNullable<z$1.ZodObject<{
3096
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3097
- read: z$1.ZodArray<z$1.ZodString>;
3098
- write: z$1.ZodArray<z$1.ZodString>;
3099
- }, z$1.core.$strip>>;
3100
- network: z$1.ZodNullable<z$1.ZodObject<{
3101
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3102
- }, z$1.core.$strip>>;
3103
- }, z$1.core.$strict>>;
3104
- writeScope: z$1.ZodNullable<z$1.ZodString>;
3371
+ name: z$1.ZodString;
3372
+ path: z$1.ZodString;
3373
+ type: z$1.ZodLiteral<"read">;
3105
3374
  }, z$1.core.$strip>, z$1.ZodObject<{
3106
- itemId: z$1.ZodString;
3107
- kind: z$1.ZodLiteral<"permission_grant">;
3108
- permissions: z$1.ZodObject<{
3109
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3110
- read: z$1.ZodArray<z$1.ZodString>;
3111
- write: z$1.ZodArray<z$1.ZodString>;
3112
- }, z$1.core.$strip>>;
3113
- network: z$1.ZodNullable<z$1.ZodObject<{
3114
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3115
- }, z$1.core.$strip>>;
3116
- }, z$1.core.$strict>;
3117
- toolName: z$1.ZodNullable<z$1.ZodString>;
3375
+ command: z$1.ZodString;
3376
+ path: z$1.ZodNullable<z$1.ZodString>;
3377
+ type: z$1.ZodLiteral<"listFiles">;
3118
3378
  }, z$1.core.$strip>, z$1.ZodObject<{
3119
- itemId: z$1.ZodString;
3120
- kind: z$1.ZodLiteral<"plan">;
3121
- plan: z$1.ZodString;
3122
- planFilePath: z$1.ZodNullable<z$1.ZodString>;
3379
+ command: z$1.ZodString;
3380
+ path: z$1.ZodNullable<z$1.ZodString>;
3381
+ query: z$1.ZodNullable<z$1.ZodString>;
3382
+ type: z$1.ZodLiteral<"search">;
3123
3383
  }, z$1.core.$strip>, z$1.ZodObject<{
3124
- itemId: z$1.ZodString;
3125
- kind: z$1.ZodLiteral<"tool_use">;
3126
- presentation: z$1.ZodObject<{
3127
- badge: z$1.ZodOptional<z$1.ZodObject<{
3128
- glyph: z$1.ZodString;
3129
- hint: z$1.ZodString;
3130
- label: z$1.ZodString;
3131
- tone: z$1.ZodEnum<{
3132
- destructive: "destructive";
3133
- neutral: "neutral";
3134
- }>;
3135
- }, z$1.core.$strip>>;
3136
- detail: z$1.ZodOptional<z$1.ZodString>;
3137
- icon: z$1.ZodObject<{
3138
- glyph: z$1.ZodString;
3139
- }, z$1.core.$strip>;
3140
- label: z$1.ZodObject<{
3141
- completed: z$1.ZodString;
3142
- pending: z$1.ZodString;
3143
- }, z$1.core.$strip>;
3144
- suppress: z$1.ZodOptional<z$1.ZodBoolean>;
3145
- tint: z$1.ZodOptional<z$1.ZodObject<{
3146
- dark: z$1.ZodString;
3147
- light: z$1.ZodString;
3148
- }, z$1.core.$strip>>;
3149
- title: z$1.ZodOptional<z$1.ZodString>;
3150
- }, z$1.core.$strip>;
3151
- tool: z$1.ZodString;
3152
- }, z$1.core.$strip>], "kind">;
3153
- }, z$1.core.$strip>;
3154
- resolution: z$1.ZodNullable<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3155
- decision: z$1.ZodLiteral<"allow_once">;
3156
- grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
3384
+ command: z$1.ZodString;
3385
+ type: z$1.ZodLiteral<"unknown">;
3386
+ }, z$1.core.$strip>], "type">>;
3387
+ command: z$1.ZodString;
3388
+ cwd: z$1.ZodNullable<z$1.ZodString>;
3389
+ itemId: z$1.ZodString;
3390
+ kind: z$1.ZodLiteral<"command">;
3391
+ sessionGrant: z$1.ZodNullable<z$1.ZodObject<{
3157
3392
  fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3158
3393
  read: z$1.ZodArray<z$1.ZodString>;
3159
3394
  write: z$1.ZodArray<z$1.ZodString>;
@@ -3163,8 +3398,9 @@ declare const threadEventSchema: z$1.ZodPipe<z$1.ZodUnknown, z$1.ZodUnion<readon
3163
3398
  }, z$1.core.$strip>>;
3164
3399
  }, z$1.core.$strict>>;
3165
3400
  }, z$1.core.$strip>, z$1.ZodObject<{
3166
- decision: z$1.ZodLiteral<"allow_for_session">;
3167
- grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
3401
+ itemId: z$1.ZodString;
3402
+ kind: z$1.ZodLiteral<"file_change">;
3403
+ sessionGrant: z$1.ZodNullable<z$1.ZodObject<{
3168
3404
  fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3169
3405
  read: z$1.ZodArray<z$1.ZodString>;
3170
3406
  write: z$1.ZodArray<z$1.ZodString>;
@@ -3173,102 +3409,60 @@ declare const threadEventSchema: z$1.ZodPipe<z$1.ZodUnknown, z$1.ZodUnion<readon
3173
3409
  enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3174
3410
  }, z$1.core.$strip>>;
3175
3411
  }, z$1.core.$strict>>;
3412
+ writeScope: z$1.ZodNullable<z$1.ZodString>;
3176
3413
  }, z$1.core.$strip>, z$1.ZodObject<{
3177
- decision: z$1.ZodLiteral<"deny">;
3178
- }, z$1.core.$strip>], "decision">>;
3179
- status: z$1.ZodEnum<{
3180
- interrupted: "interrupted";
3181
- pending: "pending";
3182
- resolved: "resolved";
3183
- resolving: "resolving";
3184
- }>;
3185
- statusReason: z$1.ZodNullable<z$1.ZodString>;
3186
- }, z$1.core.$strip>, z$1.ZodObject<{
3187
- id: z$1.ZodString;
3188
- origin: z$1.ZodObject<{
3189
- kind: z$1.ZodLiteral<"provider">;
3190
- providerId: z$1.ZodString;
3191
- providerRequestId: z$1.ZodString;
3192
- }, z$1.core.$strip>;
3193
- payload: z$1.ZodObject<{
3194
- kind: z$1.ZodLiteral<"user_question">;
3195
- questions: z$1.ZodArray<z$1.ZodObject<{
3196
- allowFreeText: z$1.ZodBoolean;
3197
- id: z$1.ZodString;
3198
- multiSelect: z$1.ZodBoolean;
3199
- options: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
3200
- description: z$1.ZodOptional<z$1.ZodString>;
3414
+ itemId: z$1.ZodString;
3415
+ kind: z$1.ZodLiteral<"permission_grant">;
3416
+ permissions: z$1.ZodObject<{
3417
+ fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3418
+ read: z$1.ZodArray<z$1.ZodString>;
3419
+ write: z$1.ZodArray<z$1.ZodString>;
3420
+ }, z$1.core.$strip>>;
3421
+ network: z$1.ZodNullable<z$1.ZodObject<{
3422
+ enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3423
+ }, z$1.core.$strip>>;
3424
+ }, z$1.core.$strict>;
3425
+ toolName: z$1.ZodNullable<z$1.ZodString>;
3426
+ }, z$1.core.$strip>, z$1.ZodObject<{
3427
+ itemId: z$1.ZodString;
3428
+ kind: z$1.ZodLiteral<"plan">;
3429
+ plan: z$1.ZodString;
3430
+ planFilePath: z$1.ZodNullable<z$1.ZodString>;
3431
+ }, z$1.core.$strip>, z$1.ZodObject<{
3432
+ itemId: z$1.ZodString;
3433
+ kind: z$1.ZodLiteral<"tool_use">;
3434
+ presentation: z$1.ZodObject<{
3435
+ badge: z$1.ZodOptional<z$1.ZodObject<{
3436
+ glyph: z$1.ZodString;
3437
+ hint: z$1.ZodString;
3201
3438
  label: z$1.ZodString;
3202
- value: z$1.ZodString;
3203
- }, z$1.core.$strip>>>;
3204
- prompt: z$1.ZodString;
3205
- shortLabel: z$1.ZodOptional<z$1.ZodString>;
3206
- }, z$1.core.$strip>>;
3207
- }, z$1.core.$strip>;
3208
- resolution: z$1.ZodNullable<z$1.ZodObject<{
3209
- answers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
3210
- freeText: z$1.ZodOptional<z$1.ZodString>;
3211
- selected: z$1.ZodArray<z$1.ZodString>;
3212
- }, z$1.core.$strip>>;
3213
- kind: z$1.ZodLiteral<"user_answer">;
3214
- }, z$1.core.$strip>>;
3215
- status: z$1.ZodEnum<{
3216
- interrupted: "interrupted";
3217
- pending: "pending";
3218
- resolved: "resolved";
3219
- resolving: "resolving";
3220
- }>;
3221
- statusReason: z$1.ZodNullable<z$1.ZodString>;
3222
- }, z$1.core.$strip>, z$1.ZodObject<{
3223
- id: z$1.ZodString;
3224
- origin: z$1.ZodObject<{
3225
- kind: z$1.ZodLiteral<"plugin">;
3226
- pluginId: z$1.ZodString;
3227
- rendererId: z$1.ZodString;
3228
- }, z$1.core.$strip>;
3229
- payload: z$1.ZodObject<{
3230
- kind: z$1.ZodLiteral<"plugin">;
3231
- title: z$1.ZodString;
3232
- }, z$1.core.$strip>;
3233
- resolution: z$1.ZodNullable<z$1.ZodObject<{
3234
- kind: z$1.ZodLiteral<"plugin_submitted">;
3235
- }, z$1.core.$strip>>;
3236
- status: z$1.ZodEnum<{
3237
- interrupted: "interrupted";
3238
- pending: "pending";
3239
- resolved: "resolved";
3240
- resolving: "resolving";
3241
- }>;
3242
- statusReason: z$1.ZodNullable<z$1.ZodString>;
3243
- }, z$1.core.$strip>, z$1.ZodObject<{
3244
- id: z$1.ZodString;
3245
- origin: z$1.ZodObject<{
3246
- kind: z$1.ZodLiteral<"provider">;
3247
- providerId: z$1.ZodString;
3248
- providerRequestId: z$1.ZodString;
3249
- }, z$1.core.$strip>;
3250
- payload: z$1.ZodObject<{
3251
- kind: z$1.ZodString & z$1.ZodType<`${string}/${string}`, string, z$1.core.$ZodTypeInternals<`${string}/${string}`, string>>;
3252
- title: z$1.ZodString;
3253
- }, z$1.core.$strip>;
3254
- resolution: z$1.ZodNullable<z$1.ZodObject<{
3255
- kind: z$1.ZodLiteral<"request_answer">;
3256
- }, z$1.core.$strip>>;
3257
- status: z$1.ZodEnum<{
3258
- interrupted: "interrupted";
3259
- pending: "pending";
3260
- resolved: "resolved";
3261
- resolving: "resolving";
3262
- }>;
3263
- statusReason: z$1.ZodNullable<z$1.ZodString>;
3264
- }, z$1.core.$strip>]>;
3265
- threadId: z$1.ZodString;
3266
- type: z$1.ZodLiteral<"system/interaction/lifecycle">;
3267
- }, z$1.core.$strip>, z$1.ZodObject<{
3268
- interactionId: z$1.ZodString;
3439
+ tone: z$1.ZodEnum<{
3440
+ destructive: "destructive";
3441
+ neutral: "neutral";
3442
+ }>;
3443
+ }, z$1.core.$strip>>;
3444
+ detail: z$1.ZodOptional<z$1.ZodString>;
3445
+ icon: z$1.ZodObject<{
3446
+ glyph: z$1.ZodString;
3447
+ }, z$1.core.$strip>;
3448
+ label: z$1.ZodObject<{
3449
+ completed: z$1.ZodString;
3450
+ pending: z$1.ZodString;
3451
+ }, z$1.core.$strip>;
3452
+ suppress: z$1.ZodOptional<z$1.ZodBoolean>;
3453
+ tint: z$1.ZodOptional<z$1.ZodObject<{
3454
+ dark: z$1.ZodString;
3455
+ light: z$1.ZodString;
3456
+ }, z$1.core.$strip>>;
3457
+ title: z$1.ZodOptional<z$1.ZodString>;
3458
+ }, z$1.core.$strip>;
3459
+ tool: z$1.ZodString;
3460
+ }, z$1.core.$strip>], "kind">;
3461
+ }, z$1.core.$strip>;
3269
3462
  providerId: z$1.ZodString;
3270
3463
  providerRequestId: z$1.ZodString;
3271
- resolution: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3464
+ providerThreadId: z$1.ZodString;
3465
+ resolution: z$1.ZodNullable<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3272
3466
  decision: z$1.ZodLiteral<"allow_once">;
3273
3467
  grantedPermissions: z$1.ZodNullable<z$1.ZodObject<{
3274
3468
  fileSystem: z$1.ZodNullable<z$1.ZodObject<{
@@ -3292,32 +3486,27 @@ declare const threadEventSchema: z$1.ZodPipe<z$1.ZodUnknown, z$1.ZodUnion<readon
3292
3486
  }, z$1.core.$strict>>;
3293
3487
  }, z$1.core.$strip>, z$1.ZodObject<{
3294
3488
  decision: z$1.ZodLiteral<"deny">;
3295
- }, z$1.core.$strip>], "decision">>>;
3489
+ }, z$1.core.$strip>], "decision">>;
3490
+ resolvedAt: z$1.ZodNullable<z$1.ZodNumber>;
3296
3491
  status: z$1.ZodEnum<{
3297
3492
  interrupted: "interrupted";
3298
3493
  pending: "pending";
3299
3494
  resolved: "resolved";
3300
3495
  resolving: "resolving";
3301
3496
  }>;
3302
- statusReason: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodString>>;
3303
- subject: z$1.ZodObject<{
3304
- itemId: z$1.ZodString;
3305
- kind: z$1.ZodLiteral<"permission_grant">;
3306
- permissions: z$1.ZodObject<{
3307
- fileSystem: z$1.ZodNullable<z$1.ZodObject<{
3308
- read: z$1.ZodArray<z$1.ZodString>;
3309
- write: z$1.ZodArray<z$1.ZodString>;
3310
- }, z$1.core.$strip>>;
3311
- network: z$1.ZodNullable<z$1.ZodObject<{
3312
- enabled: z$1.ZodNullable<z$1.ZodBoolean>;
3313
- }, z$1.core.$strip>>;
3314
- }, z$1.core.$strict>;
3315
- toolName: z$1.ZodNullable<z$1.ZodString>;
3316
- }, z$1.core.$strip>;
3497
+ statusReason: z$1.ZodNullable<z$1.ZodString>;
3317
3498
  threadId: z$1.ZodString;
3318
- type: z$1.ZodLiteral<"system/permissionGrant/lifecycle">;
3499
+ turnId: z$1.ZodString;
3319
3500
  }, z$1.core.$strip>, z$1.ZodObject<{
3320
- interactionId: z$1.ZodString;
3501
+ createdAt: z$1.ZodNumber;
3502
+ expiresAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
3503
+ id: z$1.ZodString;
3504
+ origin: z$1.ZodOptional<z$1.ZodObject<{
3505
+ kind: z$1.ZodLiteral<"provider">;
3506
+ providerId: z$1.ZodString;
3507
+ providerRequestId: z$1.ZodString;
3508
+ providerThreadId: z$1.ZodString;
3509
+ }, z$1.core.$strip>>;
3321
3510
  payload: z$1.ZodObject<{
3322
3511
  kind: z$1.ZodLiteral<"user_question">;
3323
3512
  questions: z$1.ZodArray<z$1.ZodObject<{
@@ -3335,72 +3524,88 @@ declare const threadEventSchema: z$1.ZodPipe<z$1.ZodUnknown, z$1.ZodUnion<readon
3335
3524
  }, z$1.core.$strip>;
3336
3525
  providerId: z$1.ZodString;
3337
3526
  providerRequestId: z$1.ZodString;
3338
- resolution: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
3527
+ providerThreadId: z$1.ZodString;
3528
+ resolution: z$1.ZodNullable<z$1.ZodObject<{
3339
3529
  answers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
3340
3530
  freeText: z$1.ZodOptional<z$1.ZodString>;
3341
3531
  selected: z$1.ZodArray<z$1.ZodString>;
3342
3532
  }, z$1.core.$strip>>;
3343
3533
  kind: z$1.ZodLiteral<"user_answer">;
3344
- }, z$1.core.$strip>>>;
3534
+ }, z$1.core.$strip>>;
3535
+ resolvedAt: z$1.ZodNullable<z$1.ZodNumber>;
3345
3536
  status: z$1.ZodEnum<{
3346
3537
  interrupted: "interrupted";
3347
3538
  pending: "pending";
3348
3539
  resolved: "resolved";
3349
3540
  resolving: "resolving";
3350
3541
  }>;
3351
- statusReason: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodString>>;
3542
+ statusReason: z$1.ZodNullable<z$1.ZodString>;
3352
3543
  threadId: z$1.ZodString;
3353
- type: z$1.ZodLiteral<"system/userQuestion/lifecycle">;
3544
+ turnId: z$1.ZodString;
3354
3545
  }, z$1.core.$strip>, z$1.ZodObject<{
3355
- entries: z$1.ZodArray<z$1.ZodObject<{
3356
- key: z$1.ZodString;
3357
- metadata: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
3358
- startedAt: z$1.ZodOptional<z$1.ZodNumber>;
3359
- status: z$1.ZodOptional<z$1.ZodEnum<{
3360
- completed: "completed";
3361
- failed: "failed";
3362
- started: "started";
3363
- }>>;
3364
- text: z$1.ZodString;
3365
- type: z$1.ZodEnum<{
3366
- output: "output";
3367
- step: "step";
3368
- }>;
3546
+ createdAt: z$1.ZodNumber;
3547
+ expiresAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
3548
+ id: z$1.ZodString;
3549
+ origin: z$1.ZodOptional<z$1.ZodObject<{
3550
+ kind: z$1.ZodLiteral<"provider">;
3551
+ providerId: z$1.ZodString;
3552
+ providerRequestId: z$1.ZodString;
3553
+ providerThreadId: z$1.ZodString;
3369
3554
  }, z$1.core.$strip>>;
3370
- environmentId: z$1.ZodString;
3371
- provisioningId: z$1.ZodString;
3555
+ payload: z$1.ZodObject<{
3556
+ data: z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>;
3557
+ kind: z$1.ZodString & z$1.ZodType<`${string}/${string}`, string, z$1.core.$ZodTypeInternals<`${string}/${string}`, string>>;
3558
+ title: z$1.ZodString;
3559
+ }, z$1.core.$strip>;
3560
+ providerId: z$1.ZodString;
3561
+ providerRequestId: z$1.ZodString;
3562
+ providerThreadId: z$1.ZodString;
3563
+ resolution: z$1.ZodNullable<z$1.ZodObject<{
3564
+ kind: z$1.ZodLiteral<"request_answer">;
3565
+ value: z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>;
3566
+ }, z$1.core.$strip>>;
3567
+ resolvedAt: z$1.ZodNullable<z$1.ZodNumber>;
3372
3568
  status: z$1.ZodEnum<{
3373
- active: "active";
3374
- cancelled: "cancelled";
3375
- completed: "completed";
3376
- failed: "failed";
3569
+ interrupted: "interrupted";
3570
+ pending: "pending";
3571
+ resolved: "resolved";
3572
+ resolving: "resolving";
3377
3573
  }>;
3574
+ statusReason: z$1.ZodNullable<z$1.ZodString>;
3378
3575
  threadId: z$1.ZodString;
3379
- type: z$1.ZodLiteral<"system/thread-provisioning">;
3380
- }, z$1.core.$strip>, z$1.ZodObject<{
3381
- activeTurnId: z$1.ZodString;
3382
- activeTurnStartedAt: z$1.ZodNumber;
3383
- elapsedMs: z$1.ZodNumber;
3384
- firedAt: z$1.ZodNumber;
3385
- lastActivityEventAt: z$1.ZodNumber;
3386
- lastActivityEventSequence: z$1.ZodNumber;
3387
- lastActivityEventType: z$1.ZodString;
3388
- providerId: z$1.ZodString;
3389
- providerThreadId: z$1.ZodNullable<z$1.ZodString>;
3390
- reason: z$1.ZodLiteral<"provider-turn-idle">;
3576
+ turnId: z$1.ZodString;
3577
+ }, z$1.core.$strip>]>;
3578
+ type ProviderPendingInteraction = z$1.infer<typeof providerPendingInteractionSchema>;
3579
+ declare const pluginPendingInteractionSchema: z$1.ZodObject<{
3580
+ createdAt: z$1.ZodNumber;
3581
+ expiresAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
3582
+ id: z$1.ZodString;
3583
+ origin: z$1.ZodObject<{
3584
+ kind: z$1.ZodLiteral<"plugin">;
3585
+ pluginId: z$1.ZodString;
3586
+ rendererId: z$1.ZodString;
3587
+ }, z$1.core.$strip>;
3588
+ payload: z$1.ZodObject<{
3589
+ data: z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>;
3590
+ kind: z$1.ZodLiteral<"plugin">;
3591
+ title: z$1.ZodString;
3592
+ }, z$1.core.$strip>;
3593
+ resolution: z$1.ZodNullable<z$1.ZodObject<{
3594
+ kind: z$1.ZodLiteral<"plugin_submitted">;
3595
+ }, z$1.core.$strip>>;
3596
+ resolvedAt: z$1.ZodNullable<z$1.ZodNumber>;
3597
+ status: z$1.ZodEnum<{
3598
+ interrupted: "interrupted";
3599
+ pending: "pending";
3600
+ resolved: "resolved";
3601
+ resolving: "resolving";
3602
+ }>;
3603
+ statusReason: z$1.ZodNullable<z$1.ZodString>;
3391
3604
  threadId: z$1.ZodString;
3392
- thresholdMs: z$1.ZodNumber;
3393
- type: z$1.ZodLiteral<"system/provider-turn-watchdog">;
3394
- }, z$1.core.$strip>], "type">, z$1.ZodObject<{
3395
- scope: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3396
- kind: z$1.ZodLiteral<"thread">;
3397
- }, z$1.core.$strip>, z$1.ZodObject<{
3398
- kind: z$1.ZodLiteral<"turn">;
3399
- turnId: z$1.ZodString;
3400
- }, z$1.core.$strip>], "kind">;
3401
- }, z$1.core.$strip>>]>>;
3402
- type ThreadEvent = z$1.infer<typeof threadEventSchema>;
3403
- type ThreadEventType = ThreadEvent["type"];
3605
+ turnId: z$1.ZodNullable<z$1.ZodString>;
3606
+ }, z$1.core.$strip>;
3607
+ type PluginPendingInteraction = z$1.infer<typeof pluginPendingInteractionSchema>;
3608
+ type PendingInteraction = ProviderPendingInteraction | PluginPendingInteraction;
3404
3609
 
3405
3610
  declare const projectSchema: z$1.ZodObject<{
3406
3611
  createdAt: z$1.ZodNumber;
@@ -3831,6 +4036,11 @@ declare const threadQueuedMessageSchema: z$1.ZodObject<{
3831
4036
  failureReason: z$1.ZodNullable<z$1.ZodString>;
3832
4037
  groupWithNext: z$1.ZodBoolean;
3833
4038
  id: z$1.ZodString;
4039
+ initiator: z$1.ZodEnum<{
4040
+ agent: "agent";
4041
+ system: "system";
4042
+ user: "user";
4043
+ }>;
3834
4044
  model: z$1.ZodString;
3835
4045
  payload: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
3836
4046
  kind: z$1.ZodLiteral<"inline">;
@@ -3856,6 +4066,7 @@ declare const threadQueuedMessageSchema: z$1.ZodObject<{
3856
4066
  xhigh: "xhigh";
3857
4067
  }>;
3858
4068
  sendAt: z$1.ZodNullable<z$1.ZodNumber>;
4069
+ senderThreadId: z$1.ZodNullable<z$1.ZodString>;
3859
4070
  serviceTier: z$1.ZodEnum<{
3860
4071
  default: "default";
3861
4072
  fast: "fast";
@@ -3912,6 +4123,14 @@ declare const createThreadEnvironmentArgsSchema: z$1.ZodDiscriminatedUnion<[z$1.
3912
4123
  }, z$1.core.$strip>], "type">;
3913
4124
  }, z$1.core.$strip>, z$1.ZodObject<{
3914
4125
  type: z$1.ZodLiteral<"project-default">;
4126
+ }, z$1.core.$strip>, z$1.ZodObject<{
4127
+ environmentProviderId: z$1.ZodString;
4128
+ inputs: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>>>;
4129
+ machine: z$1.ZodObject<{
4130
+ hostId: z$1.ZodString;
4131
+ type: z$1.ZodLiteral<"existing">;
4132
+ }, z$1.core.$strip>;
4133
+ type: z$1.ZodLiteral<"provider">;
3915
4134
  }, z$1.core.$strip>], "type">;
3916
4135
  type CreateThreadEnvironmentArgs = z$1.infer<typeof createThreadEnvironmentArgsSchema>;
3917
4136
  declare const workspaceFileListResponseSchema: z$1.ZodObject<{
@@ -4058,6 +4277,7 @@ declare const projectBranchesResponseSchema: z$1.ZodObject<{
4058
4277
  }>>;
4059
4278
  defaultWorktreeBaseBranch: z$1.ZodNullable<z$1.ZodString>;
4060
4279
  hasUncommittedChanges: z$1.ZodBoolean;
4280
+ isWorktree: z$1.ZodBoolean;
4061
4281
  operation: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
4062
4282
  kind: z$1.ZodLiteral<"none">;
4063
4283
  }, z$1.core.$strip>, z$1.ZodObject<{
@@ -4325,7 +4545,10 @@ declare const projectWithThreadsResponseSchema: z$1.ZodObject<{
4325
4545
  environmentBranchName: z$1.ZodNullable<z$1.ZodString>;
4326
4546
  environmentHostId: z$1.ZodNullable<z$1.ZodString>;
4327
4547
  environmentId: z$1.ZodNullable<z$1.ZodString>;
4548
+ environmentIsWorktree: z$1.ZodNullable<z$1.ZodBoolean>;
4328
4549
  environmentName: z$1.ZodNullable<z$1.ZodString>;
4550
+ environmentPath: z$1.ZodNullable<z$1.ZodString>;
4551
+ environmentProviderId: z$1.ZodNullable<z$1.ZodString>;
4329
4552
  environmentWorkspaceDisplayKind: z$1.ZodEnum<{
4330
4553
  "managed-worktree": "managed-worktree";
4331
4554
  "unmanaged-worktree": "unmanaged-worktree";
@@ -4441,7 +4664,10 @@ declare const sidebarBootstrapResponseSchema: z$1.ZodObject<{
4441
4664
  environmentBranchName: z$1.ZodNullable<z$1.ZodString>;
4442
4665
  environmentHostId: z$1.ZodNullable<z$1.ZodString>;
4443
4666
  environmentId: z$1.ZodNullable<z$1.ZodString>;
4667
+ environmentIsWorktree: z$1.ZodNullable<z$1.ZodBoolean>;
4444
4668
  environmentName: z$1.ZodNullable<z$1.ZodString>;
4669
+ environmentPath: z$1.ZodNullable<z$1.ZodString>;
4670
+ environmentProviderId: z$1.ZodNullable<z$1.ZodString>;
4445
4671
  environmentWorkspaceDisplayKind: z$1.ZodEnum<{
4446
4672
  "managed-worktree": "managed-worktree";
4447
4673
  "unmanaged-worktree": "unmanaged-worktree";
@@ -4555,7 +4781,10 @@ declare const sidebarBootstrapResponseSchema: z$1.ZodObject<{
4555
4781
  environmentBranchName: z$1.ZodNullable<z$1.ZodString>;
4556
4782
  environmentHostId: z$1.ZodNullable<z$1.ZodString>;
4557
4783
  environmentId: z$1.ZodNullable<z$1.ZodString>;
4784
+ environmentIsWorktree: z$1.ZodNullable<z$1.ZodBoolean>;
4558
4785
  environmentName: z$1.ZodNullable<z$1.ZodString>;
4786
+ environmentPath: z$1.ZodNullable<z$1.ZodString>;
4787
+ environmentProviderId: z$1.ZodNullable<z$1.ZodString>;
4559
4788
  environmentWorkspaceDisplayKind: z$1.ZodEnum<{
4560
4789
  "managed-worktree": "managed-worktree";
4561
4790
  "unmanaged-worktree": "unmanaged-worktree";
@@ -4946,7 +5175,6 @@ declare const environmentStatusResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.Zo
4946
5175
  failure: z$1.ZodObject<{
4947
5176
  code: z$1.ZodEnum<{
4948
5177
  not_git_repo: "not_git_repo";
4949
- not_worktree: "not_worktree";
4950
5178
  path_not_found: "path_not_found";
4951
5179
  permission_denied: "permission_denied";
4952
5180
  unknown: "unknown";
@@ -5060,7 +5288,6 @@ declare const environmentDiffResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodO
5060
5288
  failure: z$1.ZodObject<{
5061
5289
  code: z$1.ZodEnum<{
5062
5290
  not_git_repo: "not_git_repo";
5063
- not_worktree: "not_worktree";
5064
5291
  path_not_found: "path_not_found";
5065
5292
  permission_denied: "permission_denied";
5066
5293
  unknown: "unknown";
@@ -5117,7 +5344,6 @@ declare const environmentDiffFilesResponseSchema: z$1.ZodDiscriminatedUnion<[z$1
5117
5344
  failure: z$1.ZodObject<{
5118
5345
  code: z$1.ZodEnum<{
5119
5346
  not_git_repo: "not_git_repo";
5120
- not_worktree: "not_worktree";
5121
5347
  path_not_found: "path_not_found";
5122
5348
  permission_denied: "permission_denied";
5123
5349
  unknown: "unknown";
@@ -5147,7 +5373,6 @@ declare const environmentDiffPatchResponseSchema: z$1.ZodDiscriminatedUnion<[z$1
5147
5373
  failure: z$1.ZodObject<{
5148
5374
  code: z$1.ZodEnum<{
5149
5375
  not_git_repo: "not_git_repo";
5150
- not_worktree: "not_worktree";
5151
5376
  path_not_found: "path_not_found";
5152
5377
  permission_denied: "permission_denied";
5153
5378
  unknown: "unknown";
@@ -5518,11 +5743,6 @@ declare const hostDaemonCommandRegistry: {
5518
5743
  type: z$1.ZodLiteral<"thread.rewind.prepare">;
5519
5744
  workspaceContext: z$1.ZodObject<{
5520
5745
  workspacePath: z$1.ZodString;
5521
- workspaceProvisionType: z$1.ZodEnum<{
5522
- "managed-worktree": "managed-worktree";
5523
- personal: "personal";
5524
- unmanaged: "unmanaged";
5525
- }>;
5526
5746
  }, z$1.core.$strip>;
5527
5747
  }, z$1.core.$strict>, z$1.ZodObject<{
5528
5748
  providerThreadId: z$1.ZodString;
@@ -5844,11 +6064,6 @@ declare const hostDaemonCommandRegistry: {
5844
6064
  type: z$1.ZodLiteral<"thread.start">;
5845
6065
  workspaceContext: z$1.ZodObject<{
5846
6066
  workspacePath: z$1.ZodString;
5847
- workspaceProvisionType: z$1.ZodEnum<{
5848
- "managed-worktree": "managed-worktree";
5849
- personal: "personal";
5850
- unmanaged: "unmanaged";
5851
- }>;
5852
6067
  }, z$1.core.$strip>;
5853
6068
  }, z$1.core.$strict>, z$1.ZodObject<{
5854
6069
  providerThreadId: z$1.ZodString;
@@ -6191,11 +6406,6 @@ declare const hostDaemonCommandRegistry: {
6191
6406
  providerThreadId: z$1.ZodString;
6192
6407
  workspaceContext: z$1.ZodObject<{
6193
6408
  workspacePath: z$1.ZodString;
6194
- workspaceProvisionType: z$1.ZodEnum<{
6195
- "managed-worktree": "managed-worktree";
6196
- personal: "personal";
6197
- unmanaged: "unmanaged";
6198
- }>;
6199
6409
  }, z$1.core.$strip>;
6200
6410
  }, z$1.core.$strict>;
6201
6411
  target: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
@@ -6401,11 +6611,6 @@ declare const hostDaemonCommandRegistry: {
6401
6611
  providerThreadId: z$1.ZodString;
6402
6612
  workspaceContext: z$1.ZodObject<{
6403
6613
  workspacePath: z$1.ZodString;
6404
- workspaceProvisionType: z$1.ZodEnum<{
6405
- "managed-worktree": "managed-worktree";
6406
- personal: "personal";
6407
- unmanaged: "unmanaged";
6408
- }>;
6409
6614
  }, z$1.core.$strip>;
6410
6615
  }, z$1.core.$strict>;
6411
6616
  threadId: z$1.ZodString;
@@ -6461,11 +6666,6 @@ declare const hostDaemonCommandRegistry: {
6461
6666
  type: z$1.ZodLiteral<"thread.archive">;
6462
6667
  workspaceContext: z$1.ZodObject<{
6463
6668
  workspacePath: z$1.ZodString;
6464
- workspaceProvisionType: z$1.ZodEnum<{
6465
- "managed-worktree": "managed-worktree";
6466
- personal: "personal";
6467
- unmanaged: "unmanaged";
6468
- }>;
6469
6669
  }, z$1.core.$strip>;
6470
6670
  }, z$1.core.$strict>, z$1.ZodObject<{}, z$1.core.$strip>, "settled", false>;
6471
6671
  "thread.unarchive": HostDaemonCommandDescriptor<"thread.unarchive", z$1.ZodObject<{
@@ -6546,66 +6746,20 @@ declare const hostDaemonCommandRegistry: {
6546
6746
  threadId: z$1.ZodString;
6547
6747
  type: z$1.ZodLiteral<"interactive.resolve">;
6548
6748
  }, z$1.core.$strict>, z$1.ZodObject<{}, z$1.core.$strip>, "settled", false>;
6549
- "environment.provision": HostDaemonCommandDescriptor<"environment.provision", z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
6550
- checkout: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
6551
- kind: z$1.ZodLiteral<"existing">;
6552
- name: z$1.ZodString;
6553
- }, z$1.core.$strict>, z$1.ZodObject<{
6554
- baseBranch: z$1.ZodString;
6555
- kind: z$1.ZodLiteral<"new">;
6556
- name: z$1.ZodString;
6557
- }, z$1.core.$strict>], "kind">>;
6749
+ "environment.attach": HostDaemonCommandDescriptor<"environment.attach", z$1.ZodObject<{
6558
6750
  environmentId: z$1.ZodString;
6559
6751
  initiator: z$1.ZodNullable<z$1.ZodObject<{
6560
6752
  provisioningId: z$1.ZodString;
6561
6753
  threadId: z$1.ZodString;
6562
6754
  }, z$1.core.$strict>>;
6563
6755
  path: z$1.ZodString;
6564
- type: z$1.ZodLiteral<"environment.provision">;
6565
- workspaceProvisionType: z$1.ZodLiteral<"unmanaged">;
6566
- }, z$1.core.$strict>, z$1.ZodObject<{
6567
- baseBranch: z$1.ZodNullable<z$1.ZodString>;
6568
- branchName: z$1.ZodString;
6569
- environmentId: z$1.ZodString;
6570
- initiator: z$1.ZodNullable<z$1.ZodObject<{
6571
- provisioningId: z$1.ZodString;
6572
- threadId: z$1.ZodString;
6573
- }, z$1.core.$strict>>;
6574
- setupTimeoutMs: z$1.ZodNumber;
6575
- sourcePath: z$1.ZodString;
6576
- targetPath: z$1.ZodString;
6577
- type: z$1.ZodLiteral<"environment.provision">;
6578
- workspaceProvisionType: z$1.ZodLiteral<"managed-worktree">;
6756
+ type: z$1.ZodLiteral<"environment.attach">;
6579
6757
  }, z$1.core.$strict>, z$1.ZodObject<{
6580
- environmentId: z$1.ZodString;
6581
- initiator: z$1.ZodNullable<z$1.ZodObject<{
6582
- provisioningId: z$1.ZodString;
6583
- threadId: z$1.ZodString;
6584
- }, z$1.core.$strict>>;
6585
- targetPath: z$1.ZodString;
6586
- type: z$1.ZodLiteral<"environment.provision">;
6587
- workspaceProvisionType: z$1.ZodLiteral<"personal">;
6588
- }, z$1.core.$strict>], "workspaceProvisionType">, z$1.ZodObject<{
6589
6758
  branchName: z$1.ZodNullable<z$1.ZodString>;
6590
6759
  defaultBranch: z$1.ZodNullable<z$1.ZodString>;
6591
6760
  isGitRepo: z$1.ZodBoolean;
6592
6761
  isWorktree: z$1.ZodBoolean;
6593
6762
  path: z$1.ZodString;
6594
- transcript: z$1.ZodArray<z$1.ZodObject<{
6595
- key: z$1.ZodString;
6596
- metadata: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
6597
- startedAt: z$1.ZodOptional<z$1.ZodNumber>;
6598
- status: z$1.ZodOptional<z$1.ZodEnum<{
6599
- completed: "completed";
6600
- failed: "failed";
6601
- started: "started";
6602
- }>>;
6603
- text: z$1.ZodString;
6604
- type: z$1.ZodEnum<{
6605
- output: "output";
6606
- step: "step";
6607
- }>;
6608
- }, z$1.core.$strip>>;
6609
6763
  }, z$1.core.$strip>, "settled", false>;
6610
6764
  "project.clone": HostDaemonCommandDescriptor<"project.clone", z$1.ZodObject<{
6611
6765
  projectSlug: z$1.ZodString;
@@ -6616,52 +6770,18 @@ declare const hostDaemonCommandRegistry: {
6616
6770
  gitRemoteUrl: z$1.ZodNullable<z$1.ZodString>;
6617
6771
  path: z$1.ZodString;
6618
6772
  }, z$1.core.$strict>, "settled", false>;
6619
- "environment.provision.cancel": HostDaemonCommandDescriptor<"environment.provision.cancel", z$1.ZodObject<{
6773
+ "environment.attach.cancel": HostDaemonCommandDescriptor<"environment.attach.cancel", z$1.ZodObject<{
6620
6774
  environmentId: z$1.ZodString;
6621
- type: z$1.ZodLiteral<"environment.provision.cancel">;
6775
+ type: z$1.ZodLiteral<"environment.attach.cancel">;
6622
6776
  }, z$1.core.$strict>, z$1.ZodObject<{
6623
6777
  aborted: z$1.ZodBoolean;
6624
6778
  }, z$1.core.$strip>, "settled", false>;
6625
- "environment.destroy": HostDaemonCommandDescriptor<"environment.destroy", z$1.ZodObject<{
6626
- environmentId: z$1.ZodString;
6627
- teardownTimeoutMs: z$1.ZodNumber;
6628
- type: z$1.ZodLiteral<"environment.destroy">;
6629
- workspaceContext: z$1.ZodObject<{
6630
- workspacePath: z$1.ZodString;
6631
- workspaceProvisionType: z$1.ZodEnum<{
6632
- "managed-worktree": "managed-worktree";
6633
- personal: "personal";
6634
- unmanaged: "unmanaged";
6635
- }>;
6636
- }, z$1.core.$strip>;
6637
- }, z$1.core.$strict>, z$1.ZodObject<{
6638
- transcript: z$1.ZodArray<z$1.ZodObject<{
6639
- key: z$1.ZodString;
6640
- metadata: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
6641
- startedAt: z$1.ZodOptional<z$1.ZodNumber>;
6642
- status: z$1.ZodOptional<z$1.ZodEnum<{
6643
- completed: "completed";
6644
- failed: "failed";
6645
- started: "started";
6646
- }>>;
6647
- text: z$1.ZodString;
6648
- type: z$1.ZodEnum<{
6649
- output: "output";
6650
- step: "step";
6651
- }>;
6652
- }, z$1.core.$strip>>;
6653
- }, z$1.core.$strict>, "settled", false>;
6654
6779
  "workspace.commit": HostDaemonCommandDescriptor<"workspace.commit", z$1.ZodObject<{
6655
6780
  environmentId: z$1.ZodString;
6656
6781
  message: z$1.ZodString;
6657
6782
  type: z$1.ZodLiteral<"workspace.commit">;
6658
6783
  workspaceContext: z$1.ZodObject<{
6659
6784
  workspacePath: z$1.ZodString;
6660
- workspaceProvisionType: z$1.ZodEnum<{
6661
- "managed-worktree": "managed-worktree";
6662
- personal: "personal";
6663
- unmanaged: "unmanaged";
6664
- }>;
6665
6785
  }, z$1.core.$strip>;
6666
6786
  }, z$1.core.$strict>, z$1.ZodObject<{
6667
6787
  commitSha: z$1.ZodString;
@@ -6673,11 +6793,6 @@ declare const hostDaemonCommandRegistry: {
6673
6793
  type: z$1.ZodLiteral<"workspace.pull_request_action">;
6674
6794
  workspaceContext: z$1.ZodObject<{
6675
6795
  workspacePath: z$1.ZodString;
6676
- workspaceProvisionType: z$1.ZodEnum<{
6677
- "managed-worktree": "managed-worktree";
6678
- personal: "personal";
6679
- unmanaged: "unmanaged";
6680
- }>;
6681
6796
  }, z$1.core.$strip>;
6682
6797
  }, z$1.core.$strict>, z$1.ZodObject<{
6683
6798
  environmentId: z$1.ZodString;
@@ -6685,11 +6800,6 @@ declare const hostDaemonCommandRegistry: {
6685
6800
  type: z$1.ZodLiteral<"workspace.pull_request_action">;
6686
6801
  workspaceContext: z$1.ZodObject<{
6687
6802
  workspacePath: z$1.ZodString;
6688
- workspaceProvisionType: z$1.ZodEnum<{
6689
- "managed-worktree": "managed-worktree";
6690
- personal: "personal";
6691
- unmanaged: "unmanaged";
6692
- }>;
6693
6803
  }, z$1.core.$strip>;
6694
6804
  }, z$1.core.$strict>, z$1.ZodObject<{
6695
6805
  environmentId: z$1.ZodString;
@@ -6702,11 +6812,6 @@ declare const hostDaemonCommandRegistry: {
6702
6812
  type: z$1.ZodLiteral<"workspace.pull_request_action">;
6703
6813
  workspaceContext: z$1.ZodObject<{
6704
6814
  workspacePath: z$1.ZodString;
6705
- workspaceProvisionType: z$1.ZodEnum<{
6706
- "managed-worktree": "managed-worktree";
6707
- personal: "personal";
6708
- unmanaged: "unmanaged";
6709
- }>;
6710
6815
  }, z$1.core.$strip>;
6711
6816
  }, z$1.core.$strict>], "operation">, z$1.ZodObject<{}, z$1.core.$strict>, "settled", false>;
6712
6817
  "host.list_files": HostDaemonCommandDescriptor<"host.list_files", z$1.ZodObject<{
@@ -6804,6 +6909,26 @@ declare const hostDaemonCommandRegistry: {
6804
6909
  }, z$1.core.$strict>, z$1.ZodObject<{
6805
6910
  path: z$1.ZodNullable<z$1.ZodString>;
6806
6911
  }, z$1.core.$strip>, "onlineRpc", false>;
6912
+ "environment.hook.run": HostDaemonCommandDescriptor<"environment.hook.run", z$1.ZodObject<{
6913
+ kind: z$1.ZodEnum<{
6914
+ setup: "setup";
6915
+ teardown: "teardown";
6916
+ }>;
6917
+ operationId: z$1.ZodString;
6918
+ path: z$1.ZodString;
6919
+ resumeOnly: z$1.ZodBoolean;
6920
+ timeoutMs: z$1.ZodNumber;
6921
+ type: z$1.ZodLiteral<"environment.hook.run">;
6922
+ }, z$1.core.$strict>, z$1.ZodObject<{}, z$1.core.$strip>, "onlineRpc", false>;
6923
+ "environment.hook.cancel": HostDaemonCommandDescriptor<"environment.hook.cancel", z$1.ZodObject<{
6924
+ operationId: z$1.ZodString;
6925
+ type: z$1.ZodLiteral<"environment.hook.cancel">;
6926
+ }, z$1.core.$strict>, z$1.ZodObject<{
6927
+ status: z$1.ZodEnum<{
6928
+ terminated: "terminated";
6929
+ unknown: "unknown";
6930
+ }>;
6931
+ }, z$1.core.$strict>, "onlineRpc", true>;
6807
6932
  "plugin.host.call": HostDaemonCommandDescriptor<"plugin.host.call", z$1.ZodObject<{
6808
6933
  artifact: z$1.ZodObject<{
6809
6934
  byteLength: z$1.ZodNumber;
@@ -7116,6 +7241,7 @@ declare const hostDaemonCommandRegistry: {
7116
7241
  unknown: "unknown";
7117
7242
  }>>;
7118
7243
  hasUncommittedChanges: z$1.ZodBoolean;
7244
+ isWorktree: z$1.ZodBoolean;
7119
7245
  operation: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
7120
7246
  kind: z$1.ZodLiteral<"none">;
7121
7247
  }, z$1.core.$strip>, z$1.ZodObject<{
@@ -7171,22 +7297,39 @@ declare const hostDaemonCommandRegistry: {
7171
7297
  sizeBytes: z$1.ZodNumber;
7172
7298
  }, z$1.core.$strip>, "onlineRpc", true>;
7173
7299
  "host.read_file": HostDaemonCommandDescriptor<"host.read_file", z$1.ZodObject<{
7300
+ ifNoneMatch: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
7301
+ kind: z$1.ZodLiteral<"any">;
7302
+ }, z$1.core.$strict>, z$1.ZodObject<{
7303
+ kind: z$1.ZodLiteral<"sha256">;
7304
+ values: z$1.ZodArray<z$1.ZodString>;
7305
+ }, z$1.core.$strict>], "kind">>;
7174
7306
  path: z$1.ZodString;
7175
7307
  ref: z$1.ZodOptional<z$1.ZodString>;
7176
7308
  rootPath: z$1.ZodOptional<z$1.ZodString>;
7177
7309
  type: z$1.ZodLiteral<"host.read_file">;
7310
+ }, z$1.core.$strip>, z$1.ZodUnion<readonly [z$1.ZodObject<{
7311
+ content: z$1.ZodString;
7312
+ contentEncoding: z$1.ZodEnum<{
7313
+ base64: "base64";
7314
+ utf8: "utf8";
7315
+ }>;
7316
+ mimeType: z$1.ZodOptional<z$1.ZodString>;
7317
+ modifiedAtMs: z$1.ZodOptional<z$1.ZodNumber>;
7318
+ path: z$1.ZodString;
7319
+ sha256: z$1.ZodString;
7320
+ sizeBytes: z$1.ZodNumber;
7178
7321
  }, z$1.core.$strip>, z$1.ZodObject<{
7179
- content: z$1.ZodString;
7180
7322
  contentEncoding: z$1.ZodEnum<{
7181
7323
  base64: "base64";
7182
7324
  utf8: "utf8";
7183
7325
  }>;
7184
7326
  mimeType: z$1.ZodOptional<z$1.ZodString>;
7185
7327
  modifiedAtMs: z$1.ZodOptional<z$1.ZodNumber>;
7328
+ notModified: z$1.ZodLiteral<true>;
7186
7329
  path: z$1.ZodString;
7187
7330
  sha256: z$1.ZodString;
7188
7331
  sizeBytes: z$1.ZodNumber;
7189
- }, z$1.core.$strip>, "onlineRpc", true>;
7332
+ }, z$1.core.$strip>]>, "onlineRpc", true>;
7190
7333
  "host.read_file_relative": HostDaemonCommandDescriptor<"host.read_file_relative", z$1.ZodObject<{
7191
7334
  dotfiles: z$1.ZodEnum<{
7192
7335
  allow: "allow";
@@ -7560,11 +7703,6 @@ declare const hostDaemonCommandRegistry: {
7560
7703
  type: z$1.ZodLiteral<"workspace.status">;
7561
7704
  workspaceContext: z$1.ZodObject<{
7562
7705
  workspacePath: z$1.ZodString;
7563
- workspaceProvisionType: z$1.ZodEnum<{
7564
- "managed-worktree": "managed-worktree";
7565
- personal: "personal";
7566
- unmanaged: "unmanaged";
7567
- }>;
7568
7706
  }, z$1.core.$strip>;
7569
7707
  }, z$1.core.$strict>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
7570
7708
  outcome: z$1.ZodLiteral<"available">;
@@ -7652,7 +7790,6 @@ declare const hostDaemonCommandRegistry: {
7652
7790
  failure: z$1.ZodObject<{
7653
7791
  code: z$1.ZodEnum<{
7654
7792
  not_git_repo: "not_git_repo";
7655
- not_worktree: "not_worktree";
7656
7793
  path_not_found: "path_not_found";
7657
7794
  permission_denied: "permission_denied";
7658
7795
  unknown: "unknown";
@@ -7684,11 +7821,6 @@ declare const hostDaemonCommandRegistry: {
7684
7821
  type: z$1.ZodLiteral<"workspace.diff">;
7685
7822
  workspaceContext: z$1.ZodObject<{
7686
7823
  workspacePath: z$1.ZodString;
7687
- workspaceProvisionType: z$1.ZodEnum<{
7688
- "managed-worktree": "managed-worktree";
7689
- personal: "personal";
7690
- unmanaged: "unmanaged";
7691
- }>;
7692
7824
  }, z$1.core.$strip>;
7693
7825
  }, z$1.core.$strict>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
7694
7826
  diff: z$1.ZodObject<{
@@ -7703,7 +7835,6 @@ declare const hostDaemonCommandRegistry: {
7703
7835
  failure: z$1.ZodObject<{
7704
7836
  code: z$1.ZodEnum<{
7705
7837
  not_git_repo: "not_git_repo";
7706
- not_worktree: "not_worktree";
7707
7838
  path_not_found: "path_not_found";
7708
7839
  permission_denied: "permission_denied";
7709
7840
  unknown: "unknown";
@@ -7733,11 +7864,6 @@ declare const hostDaemonCommandRegistry: {
7733
7864
  type: z$1.ZodLiteral<"workspace.diffFiles">;
7734
7865
  workspaceContext: z$1.ZodObject<{
7735
7866
  workspacePath: z$1.ZodString;
7736
- workspaceProvisionType: z$1.ZodEnum<{
7737
- "managed-worktree": "managed-worktree";
7738
- personal: "personal";
7739
- unmanaged: "unmanaged";
7740
- }>;
7741
7867
  }, z$1.core.$strip>;
7742
7868
  }, z$1.core.$strict>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
7743
7869
  files: z$1.ZodArray<z$1.ZodObject<{
@@ -7767,7 +7893,6 @@ declare const hostDaemonCommandRegistry: {
7767
7893
  failure: z$1.ZodObject<{
7768
7894
  code: z$1.ZodEnum<{
7769
7895
  not_git_repo: "not_git_repo";
7770
- not_worktree: "not_worktree";
7771
7896
  path_not_found: "path_not_found";
7772
7897
  permission_denied: "permission_denied";
7773
7898
  unknown: "unknown";
@@ -7798,11 +7923,6 @@ declare const hostDaemonCommandRegistry: {
7798
7923
  type: z$1.ZodLiteral<"workspace.diffPatch">;
7799
7924
  workspaceContext: z$1.ZodObject<{
7800
7925
  workspacePath: z$1.ZodString;
7801
- workspaceProvisionType: z$1.ZodEnum<{
7802
- "managed-worktree": "managed-worktree";
7803
- personal: "personal";
7804
- unmanaged: "unmanaged";
7805
- }>;
7806
7926
  }, z$1.core.$strip>;
7807
7927
  }, z$1.core.$strict>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
7808
7928
  outcome: z$1.ZodLiteral<"available">;
@@ -7815,7 +7935,6 @@ declare const hostDaemonCommandRegistry: {
7815
7935
  failure: z$1.ZodObject<{
7816
7936
  code: z$1.ZodEnum<{
7817
7937
  not_git_repo: "not_git_repo";
7818
- not_worktree: "not_worktree";
7819
7938
  path_not_found: "path_not_found";
7820
7939
  permission_denied: "permission_denied";
7821
7940
  unknown: "unknown";
@@ -7832,11 +7951,6 @@ declare const hostDaemonCommandRegistry: {
7832
7951
  type: z$1.ZodLiteral<"workspace.pull_request">;
7833
7952
  workspaceContext: z$1.ZodObject<{
7834
7953
  workspacePath: z$1.ZodString;
7835
- workspaceProvisionType: z$1.ZodEnum<{
7836
- "managed-worktree": "managed-worktree";
7837
- personal: "personal";
7838
- unmanaged: "unmanaged";
7839
- }>;
7840
7954
  }, z$1.core.$strip>;
7841
7955
  }, z$1.core.$strict>, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
7842
7956
  outcome: z$1.ZodLiteral<"available">;
@@ -8153,7 +8267,9 @@ interface CreateFilePreviewResponse {
8153
8267
  baseUrl: string;
8154
8268
  expiresAtMs: number;
8155
8269
  }
8156
- type HostFileReadResponse = HostDaemonOnlineRpcResultByType["host.read_file"];
8270
+ type HostFileReadResponse = Exclude<HostDaemonOnlineRpcResultByType["host.read_file"], {
8271
+ notModified: true;
8272
+ }>;
8157
8273
  type HostFileWriteResponse = HostDaemonOnlineRpcResultByType["host.write_file"];
8158
8274
  type HostFileListResponse = HostDaemonOnlineRpcResultByType["host.list_files"];
8159
8275
  type HostPathListResponse = HostDaemonOnlineRpcResultByType["host.list_paths"];
@@ -9198,8 +9314,9 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
9198
9314
  defaultProviderId: z$1.ZodNullable<z$1.ZodString>;
9199
9315
  managedBranchPrefix: z$1.ZodString;
9200
9316
  providerOrder: z$1.ZodArray<z$1.ZodString>;
9317
+ showDiagnosticEvents: z$1.ZodBoolean;
9201
9318
  showKeyboardHints: z$1.ZodBoolean;
9202
- showUnhandledProviderEvents: z$1.ZodBoolean;
9319
+ showUnhandledProviderEvents: z$1.ZodOptional<z$1.ZodBoolean>;
9203
9320
  steerActiveThreadOnEnter: z$1.ZodBoolean;
9204
9321
  streamerMode: z$1.ZodBoolean;
9205
9322
  }, z$1.core.$strict>;
@@ -9483,6 +9600,31 @@ declare const systemInstallCliSkillsResponseSchema: z$1.ZodObject<{
9483
9600
  }, z$1.core.$strip>;
9484
9601
  type SystemInstallCliSkillsResponse = z$1.infer<typeof systemInstallCliSkillsResponseSchema>;
9485
9602
  type SystemConfigReloadResponse = z$1.infer<typeof systemConfigReloadResponseSchema>;
9603
+ declare const systemEnvironmentProviderSchema: z$1.ZodObject<{
9604
+ acceptsEmptyInputs: z$1.ZodBoolean;
9605
+ availability: z$1.ZodNullable<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
9606
+ status: z$1.ZodLiteral<"available">;
9607
+ }, z$1.core.$strip>, z$1.ZodObject<{
9608
+ message: z$1.ZodString;
9609
+ status: z$1.ZodLiteral<"setup-required">;
9610
+ }, z$1.core.$strip>, z$1.ZodObject<{
9611
+ message: z$1.ZodString;
9612
+ status: z$1.ZodLiteral<"unavailable">;
9613
+ }, z$1.core.$strip>], "status">>;
9614
+ displayName: z$1.ZodString;
9615
+ icon: z$1.ZodNullable<z$1.ZodString>;
9616
+ id: z$1.ZodString;
9617
+ inputs: z$1.ZodNullable<z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>>;
9618
+ logoUrl: z$1.ZodNullable<z$1.ZodString>;
9619
+ pluginId: z$1.ZodString;
9620
+ requires: z$1.ZodObject<{
9621
+ gitCheckout: z$1.ZodBoolean;
9622
+ gitRemote: z$1.ZodBoolean;
9623
+ projectCheckout: z$1.ZodBoolean;
9624
+ projectless: z$1.ZodBoolean;
9625
+ }, z$1.core.$strip>;
9626
+ }, z$1.core.$strip>;
9627
+ type SystemEnvironmentProvider = z$1.infer<typeof systemEnvironmentProviderSchema>;
9486
9628
 
9487
9629
  declare const terminalSessionSchema: z$1.ZodObject<{
9488
9630
  closeReason: z$1.ZodNullable<z$1.ZodEnum<{
@@ -9781,8 +9923,10 @@ declare const timelineSystemRowSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
9781
9923
  compaction: "compaction";
9782
9924
  deprecation: "deprecation";
9783
9925
  generic: "generic";
9926
+ reasoning: "reasoning";
9784
9927
  warning: "warning";
9785
9928
  }>;
9929
+ reasoningId: z$1.ZodOptional<z$1.ZodString>;
9786
9930
  sourceSeqEnd: z$1.ZodNumber;
9787
9931
  sourceSeqStart: z$1.ZodNumber;
9788
9932
  startedAt: z$1.ZodNumber;
@@ -9867,6 +10011,11 @@ declare const timelineCommandWorkRowSchema: z$1.ZodObject<{
9867
10011
  kind: z$1.ZodLiteral<"work">;
9868
10012
  output: z$1.ZodString;
9869
10013
  outputPreview: z$1.ZodOptional<z$1.ZodObject<{
10014
+ experimental_fullOutputAvailability: z$1.ZodEnum<{
10015
+ "detail-limit": "detail-limit";
10016
+ "retention-expired": "retention-expired";
10017
+ available: "available";
10018
+ }>;
9870
10019
  totalChars: z$1.ZodNumber;
9871
10020
  }, z$1.core.$strip>>;
9872
10021
  presentation: z$1.ZodOptional<z$1.ZodObject<{
@@ -9921,6 +10070,11 @@ declare const timelineToolWorkRowSchema: z$1.ZodObject<{
9921
10070
  kind: z$1.ZodLiteral<"work">;
9922
10071
  output: z$1.ZodString;
9923
10072
  outputPreview: z$1.ZodOptional<z$1.ZodObject<{
10073
+ experimental_fullOutputAvailability: z$1.ZodEnum<{
10074
+ "detail-limit": "detail-limit";
10075
+ "retention-expired": "retention-expired";
10076
+ available: "available";
10077
+ }>;
9924
10078
  totalChars: z$1.ZodNumber;
9925
10079
  }, z$1.core.$strip>>;
9926
10080
  presentation: z$1.ZodOptional<z$1.ZodObject<{
@@ -10164,6 +10318,55 @@ declare const timelineImageViewWorkRowSchema: z$1.ZodObject<{
10164
10318
  workKind: z$1.ZodLiteral<"image-view">;
10165
10319
  }, z$1.core.$strip>;
10166
10320
  type TimelineImageViewWorkRow = z$1.infer<typeof timelineImageViewWorkRowSchema>;
10321
+ declare const timelineImageGenerationWorkRowSchema: z$1.ZodObject<{
10322
+ callId: z$1.ZodString;
10323
+ completedAt: z$1.ZodNullable<z$1.ZodNumber>;
10324
+ createdAt: z$1.ZodNumber;
10325
+ error: z$1.ZodNullable<z$1.ZodString>;
10326
+ id: z$1.ZodString;
10327
+ kind: z$1.ZodLiteral<"work">;
10328
+ path: z$1.ZodNullable<z$1.ZodString>;
10329
+ presentation: z$1.ZodOptional<z$1.ZodObject<{
10330
+ badge: z$1.ZodOptional<z$1.ZodObject<{
10331
+ glyph: z$1.ZodString;
10332
+ hint: z$1.ZodString;
10333
+ label: z$1.ZodString;
10334
+ tone: z$1.ZodEnum<{
10335
+ destructive: "destructive";
10336
+ neutral: "neutral";
10337
+ }>;
10338
+ }, z$1.core.$strip>>;
10339
+ detail: z$1.ZodOptional<z$1.ZodString>;
10340
+ icon: z$1.ZodObject<{
10341
+ glyph: z$1.ZodString;
10342
+ }, z$1.core.$strip>;
10343
+ label: z$1.ZodObject<{
10344
+ completed: z$1.ZodString;
10345
+ pending: z$1.ZodString;
10346
+ }, z$1.core.$strip>;
10347
+ suppress: z$1.ZodOptional<z$1.ZodBoolean>;
10348
+ tint: z$1.ZodOptional<z$1.ZodObject<{
10349
+ dark: z$1.ZodString;
10350
+ light: z$1.ZodString;
10351
+ }, z$1.core.$strip>>;
10352
+ title: z$1.ZodOptional<z$1.ZodString>;
10353
+ }, z$1.core.$strip>>;
10354
+ prompt: z$1.ZodNullable<z$1.ZodString>;
10355
+ sourceSeqEnd: z$1.ZodNumber;
10356
+ sourceSeqStart: z$1.ZodNumber;
10357
+ startedAt: z$1.ZodNumber;
10358
+ status: z$1.ZodEnum<{
10359
+ completed: "completed";
10360
+ error: "error";
10361
+ interrupted: "interrupted";
10362
+ pending: "pending";
10363
+ }>;
10364
+ threadId: z$1.ZodString;
10365
+ transparentBackground: z$1.ZodBoolean;
10366
+ turnId: z$1.ZodNullable<z$1.ZodString>;
10367
+ workKind: z$1.ZodLiteral<"image-generation">;
10368
+ }, z$1.core.$strip>;
10369
+ type TimelineImageGenerationWorkRow = z$1.infer<typeof timelineImageGenerationWorkRowSchema>;
10167
10370
  declare const timelineFileReadWorkRowSchema: z$1.ZodObject<{
10168
10371
  callId: z$1.ZodString;
10169
10372
  cmd: z$1.ZodNullable<z$1.ZodString>;
@@ -10584,7 +10787,7 @@ declare const timelineWorkflowWorkRowSchema: z$1.ZodObject<{
10584
10787
  workflowName: z$1.ZodNullable<z$1.ZodString>;
10585
10788
  }, z$1.core.$strip>;
10586
10789
  type TimelineWorkflowWorkRow = z$1.infer<typeof timelineWorkflowWorkRowSchema>;
10587
- type TimelineWorkRow = TimelineCommandWorkRow | TimelineToolWorkRow | TimelineFileChangeWorkRow | TimelineWebSearchWorkRow | TimelineWebFetchWorkRow | TimelineImageViewWorkRow | TimelineFileReadWorkRow | TimelineSearchWorkRow | TimelinePlanStepsWorkRow | TimelineExtensionWorkRow | TimelineApprovalWorkRow | TimelineQuestionWorkRow | TimelineDelegationWorkRow | TimelineWorkflowWorkRow;
10790
+ type TimelineWorkRow = TimelineCommandWorkRow | TimelineToolWorkRow | TimelineFileChangeWorkRow | TimelineWebSearchWorkRow | TimelineWebFetchWorkRow | TimelineImageGenerationWorkRow | TimelineImageViewWorkRow | TimelineFileReadWorkRow | TimelineSearchWorkRow | TimelinePlanStepsWorkRow | TimelineExtensionWorkRow | TimelineApprovalWorkRow | TimelineQuestionWorkRow | TimelineDelegationWorkRow | TimelineWorkflowWorkRow;
10588
10791
  interface TimelineTurnRow extends TimelineRowBase {
10589
10792
  kind: "turn";
10590
10793
  turnId: string;
@@ -10665,6 +10868,14 @@ declare const createThreadRequestSchema: z$1.ZodObject<{
10665
10868
  }, z$1.core.$strip>], "type">;
10666
10869
  }, z$1.core.$strip>, z$1.ZodObject<{
10667
10870
  type: z$1.ZodLiteral<"project-default">;
10871
+ }, z$1.core.$strip>, z$1.ZodObject<{
10872
+ environmentProviderId: z$1.ZodString;
10873
+ inputs: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>>>;
10874
+ machine: z$1.ZodObject<{
10875
+ hostId: z$1.ZodString;
10876
+ type: z$1.ZodLiteral<"existing">;
10877
+ }, z$1.core.$strip>;
10878
+ type: z$1.ZodLiteral<"provider">;
10668
10879
  }, z$1.core.$strip>], "type">;
10669
10880
  executionInputSources: z$1.ZodOptional<z$1.ZodObject<{
10670
10881
  model: z$1.ZodOptional<z$1.ZodEnum<{
@@ -10933,6 +11144,14 @@ declare const forkThreadRequestSchema: z$1.ZodObject<{
10933
11144
  }, z$1.core.$strip>], "type">;
10934
11145
  }, z$1.core.$strip>, z$1.ZodObject<{
10935
11146
  type: z$1.ZodLiteral<"project-default">;
11147
+ }, z$1.core.$strip>, z$1.ZodObject<{
11148
+ environmentProviderId: z$1.ZodString;
11149
+ inputs: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>>>;
11150
+ machine: z$1.ZodObject<{
11151
+ hostId: z$1.ZodString;
11152
+ type: z$1.ZodLiteral<"existing">;
11153
+ }, z$1.core.$strip>;
11154
+ type: z$1.ZodLiteral<"provider">;
10936
11155
  }, z$1.core.$strip>], "type">>;
10937
11156
  input: z$1.ZodOptional<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
10938
11157
  mentions: z$1.ZodDefault<z$1.ZodArray<z$1.ZodObject<{
@@ -11265,6 +11484,11 @@ declare const sendMessageResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObjec
11265
11484
  failureReason: z$1.ZodNullable<z$1.ZodString>;
11266
11485
  groupWithNext: z$1.ZodBoolean;
11267
11486
  id: z$1.ZodString;
11487
+ initiator: z$1.ZodEnum<{
11488
+ agent: "agent";
11489
+ system: "system";
11490
+ user: "user";
11491
+ }>;
11268
11492
  model: z$1.ZodString;
11269
11493
  payload: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
11270
11494
  kind: z$1.ZodLiteral<"inline">;
@@ -11290,6 +11514,7 @@ declare const sendMessageResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObjec
11290
11514
  xhigh: "xhigh";
11291
11515
  }>;
11292
11516
  sendAt: z$1.ZodNullable<z$1.ZodNumber>;
11517
+ senderThreadId: z$1.ZodNullable<z$1.ZodString>;
11293
11518
  serviceTier: z$1.ZodEnum<{
11294
11519
  default: "default";
11295
11520
  fast: "fast";
@@ -11806,6 +12031,11 @@ declare const sendQueuedMessageResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.Zo
11806
12031
  failureReason: z$1.ZodNullable<z$1.ZodString>;
11807
12032
  groupWithNext: z$1.ZodBoolean;
11808
12033
  id: z$1.ZodString;
12034
+ initiator: z$1.ZodEnum<{
12035
+ agent: "agent";
12036
+ system: "system";
12037
+ user: "user";
12038
+ }>;
11809
12039
  model: z$1.ZodString;
11810
12040
  payload: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
11811
12041
  kind: z$1.ZodLiteral<"inline">;
@@ -11831,6 +12061,7 @@ declare const sendQueuedMessageResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.Zo
11831
12061
  xhigh: "xhigh";
11832
12062
  }>;
11833
12063
  sendAt: z$1.ZodNullable<z$1.ZodNumber>;
12064
+ senderThreadId: z$1.ZodNullable<z$1.ZodString>;
11834
12065
  serviceTier: z$1.ZodEnum<{
11835
12066
  default: "default";
11836
12067
  fast: "fast";
@@ -11872,7 +12103,10 @@ declare const threadListResponseSchema: z$1.ZodArray<z$1.ZodObject<{
11872
12103
  environmentBranchName: z$1.ZodNullable<z$1.ZodString>;
11873
12104
  environmentHostId: z$1.ZodNullable<z$1.ZodString>;
11874
12105
  environmentId: z$1.ZodNullable<z$1.ZodString>;
12106
+ environmentIsWorktree: z$1.ZodNullable<z$1.ZodBoolean>;
11875
12107
  environmentName: z$1.ZodNullable<z$1.ZodString>;
12108
+ environmentPath: z$1.ZodNullable<z$1.ZodString>;
12109
+ environmentProviderId: z$1.ZodNullable<z$1.ZodString>;
11876
12110
  environmentWorkspaceDisplayKind: z$1.ZodEnum<{
11877
12111
  "managed-worktree": "managed-worktree";
11878
12112
  "unmanaged-worktree": "unmanaged-worktree";
@@ -11971,7 +12205,10 @@ declare const threadSearchResponseSchema: z$1.ZodObject<{
11971
12205
  environmentBranchName: z$1.ZodNullable<z$1.ZodString>;
11972
12206
  environmentHostId: z$1.ZodNullable<z$1.ZodString>;
11973
12207
  environmentId: z$1.ZodNullable<z$1.ZodString>;
12208
+ environmentIsWorktree: z$1.ZodNullable<z$1.ZodBoolean>;
11974
12209
  environmentName: z$1.ZodNullable<z$1.ZodString>;
12210
+ environmentPath: z$1.ZodNullable<z$1.ZodString>;
12211
+ environmentProviderId: z$1.ZodNullable<z$1.ZodString>;
11975
12212
  environmentWorkspaceDisplayKind: z$1.ZodEnum<{
11976
12213
  "managed-worktree": "managed-worktree";
11977
12214
  "unmanaged-worktree": "unmanaged-worktree";
@@ -12061,7 +12298,10 @@ declare const threadSearchResponseSchema: z$1.ZodObject<{
12061
12298
  environmentBranchName: z$1.ZodNullable<z$1.ZodString>;
12062
12299
  environmentHostId: z$1.ZodNullable<z$1.ZodString>;
12063
12300
  environmentId: z$1.ZodNullable<z$1.ZodString>;
12301
+ environmentIsWorktree: z$1.ZodNullable<z$1.ZodBoolean>;
12064
12302
  environmentName: z$1.ZodNullable<z$1.ZodString>;
12303
+ environmentPath: z$1.ZodNullable<z$1.ZodString>;
12304
+ environmentProviderId: z$1.ZodNullable<z$1.ZodString>;
12065
12305
  environmentWorkspaceDisplayKind: z$1.ZodEnum<{
12066
12306
  "managed-worktree": "managed-worktree";
12067
12307
  "unmanaged-worktree": "unmanaged-worktree";
@@ -12189,10 +12429,37 @@ declare const threadWithIncludesResponseSchema: z$1.ZodObject<{
12189
12429
  branchName: z$1.ZodNullable<z$1.ZodString>;
12190
12430
  createdAt: z$1.ZodNumber;
12191
12431
  defaultBranch: z$1.ZodNullable<z$1.ZodString>;
12432
+ environmentProviderId: z$1.ZodNullable<z$1.ZodString>;
12433
+ environmentProviderInstanceKey: z$1.ZodNullable<z$1.ZodString>;
12434
+ environmentProviderSelection: z$1.ZodNullable<z$1.ZodObject<{
12435
+ inputs: z$1.ZodNullable<z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>>;
12436
+ machine: z$1.ZodObject<{
12437
+ hostId: z$1.ZodString;
12438
+ type: z$1.ZodLiteral<"existing">;
12439
+ }, z$1.core.$strip>;
12440
+ }, z$1.core.$strip>>;
12192
12441
  hostId: z$1.ZodString;
12193
12442
  id: z$1.ZodString;
12194
12443
  isGitRepo: z$1.ZodBoolean;
12195
12444
  isWorktree: z$1.ZodBoolean;
12445
+ lifecycle: z$1.ZodObject<{
12446
+ phase: z$1.ZodEnum<{
12447
+ active: "active";
12448
+ destroyed: "destroyed";
12449
+ retiring: "retiring";
12450
+ teardown: "teardown";
12451
+ }>;
12452
+ retireAt: z$1.ZodNullable<z$1.ZodNumber>;
12453
+ teardown: z$1.ZodNullable<z$1.ZodObject<{
12454
+ attempt: z$1.ZodNumber;
12455
+ message: z$1.ZodOptional<z$1.ZodString>;
12456
+ status: z$1.ZodEnum<{
12457
+ failed: "failed";
12458
+ removed: "removed";
12459
+ running: "running";
12460
+ }>;
12461
+ }, z$1.core.$strip>>;
12462
+ }, z$1.core.$strip>;
12196
12463
  managed: z$1.ZodBoolean;
12197
12464
  mergeBaseBranch: z$1.ZodNullable<z$1.ZodString>;
12198
12465
  name: z$1.ZodNullable<z$1.ZodString>;
@@ -12200,18 +12467,16 @@ declare const threadWithIncludesResponseSchema: z$1.ZodObject<{
12200
12467
  projectId: z$1.ZodString;
12201
12468
  status: z$1.ZodEnum<{
12202
12469
  destroyed: "destroyed";
12203
- destroying: "destroying";
12204
12470
  error: "error";
12205
12471
  provisioning: "provisioning";
12206
12472
  ready: "ready";
12207
- retiring: "retiring";
12208
12473
  }>;
12209
12474
  updatedAt: z$1.ZodNumber;
12210
- workspaceProvisionType: z$1.ZodEnum<{
12475
+ workspaceProvisionType: z$1.ZodNullable<z$1.ZodEnum<{
12211
12476
  "managed-worktree": "managed-worktree";
12212
12477
  personal: "personal";
12213
12478
  unmanaged: "unmanaged";
12214
- }>;
12479
+ }>>;
12215
12480
  }, z$1.core.$strip>>>;
12216
12481
  environmentId: z$1.ZodNullable<z$1.ZodString>;
12217
12482
  host: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
@@ -12622,6 +12887,11 @@ declare const threadQueuedMessageListResponseSchema: z$1.ZodArray<z$1.ZodObject<
12622
12887
  failureReason: z$1.ZodNullable<z$1.ZodString>;
12623
12888
  groupWithNext: z$1.ZodBoolean;
12624
12889
  id: z$1.ZodString;
12890
+ initiator: z$1.ZodEnum<{
12891
+ agent: "agent";
12892
+ system: "system";
12893
+ user: "user";
12894
+ }>;
12625
12895
  model: z$1.ZodString;
12626
12896
  payload: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
12627
12897
  kind: z$1.ZodLiteral<"inline">;
@@ -12647,6 +12917,7 @@ declare const threadQueuedMessageListResponseSchema: z$1.ZodArray<z$1.ZodObject<
12647
12917
  xhigh: "xhigh";
12648
12918
  }>;
12649
12919
  sendAt: z$1.ZodNullable<z$1.ZodNumber>;
12920
+ senderThreadId: z$1.ZodNullable<z$1.ZodString>;
12650
12921
  serviceTier: z$1.ZodEnum<{
12651
12922
  default: "default";
12652
12923
  fast: "fast";
@@ -12750,6 +13021,7 @@ declare const threadListQuerySchema: z$1.ZodObject<{
12750
13021
  false: "false";
12751
13022
  true: "true";
12752
13023
  }>>;
13024
+ environmentId: z$1.ZodOptional<z$1.ZodString>;
12753
13025
  hasParent: z$1.ZodOptional<z$1.ZodEnum<{
12754
13026
  false: "false";
12755
13027
  true: "true";
@@ -14274,11 +14546,6 @@ interface ExperimentalSidebarFooter {
14274
14546
  * one.
14275
14547
  */
14276
14548
  type PluginSidebarThreadIndicator = "background-agent" | "background-command" | "draft" | "goal" | "none" | "plan-mode" | "runtime" | "unread-error" | "unread-success" | "waiting-for-input" | "workflow" | "working-draft";
14277
- /**
14278
- * How a thread's environment presents its workspace: a worktree bb manages,
14279
- * a worktree the user manages, or anything else (a plain checkout).
14280
- */
14281
- type PluginSidebarWorkspaceKind = "managed-worktree" | "other" | "unmanaged-worktree";
14282
14549
  /** Live work counts on a thread. All zero means nothing is running. */
14283
14550
  interface PluginSidebarThreadActivity {
14284
14551
  workflows: number;
@@ -14327,7 +14594,14 @@ interface PluginSidebarThread {
14327
14594
  id: string | null;
14328
14595
  name: string | null;
14329
14596
  branchName: string | null;
14330
- workspaceDisplayKind: PluginSidebarWorkspaceKind;
14597
+ /**
14598
+ * The id of the environment provider that produced this environment, or
14599
+ * null for a project's own checkout. Resolve it against
14600
+ * `GET /system/environment-providers` for a display name and icon.
14601
+ */
14602
+ providerId: string | null;
14603
+ /** @deprecated Use providerId and the environment provider catalog instead. */
14604
+ workspaceDisplayKind: EnvironmentWorkspaceDisplayKind | null;
14331
14605
  } | null;
14332
14606
  /**
14333
14607
  * The machine this thread's work runs on, with the name resolved for you.
@@ -14860,6 +15134,52 @@ interface PluginTimelineRendererRegistration {
14860
15134
  kind: string;
14861
15135
  component: ComponentType<PluginTimelineRendererProps>;
14862
15136
  }
15137
+ /**
15138
+ * Props passed to an `experimental_environmentProviderInputs` component — the
15139
+ * control the New Thread environment picker renders beside this plugin's
15140
+ * selected environment provider, for the provider's declared `inputs`.
15141
+ */
15142
+ interface PluginEnvironmentProviderInputsProps {
15143
+ /** Project selected in the composer; null in projectless compose. */
15144
+ projectId: string | null;
15145
+ /**
15146
+ * The enrolled machine the selection names; null before one is picked.
15147
+ */
15148
+ hostId: string | null;
15149
+ /**
15150
+ * The `inputs` value the selection will carry: null until `onChange`
15151
+ * supplies one.
15152
+ * The server parses it with the provider's `inputs` schema at create time,
15153
+ * so the component only has to produce a value that schema accepts.
15154
+ */
15155
+ value: JsonValue | null;
15156
+ /**
15157
+ * Replace the inputs that will be submitted or block submission with the
15158
+ * reason the control should show.
15159
+ */
15160
+ onChange(next: PluginEnvironmentProviderInputsChange): void;
15161
+ }
15162
+ type PluginEnvironmentProviderInputsChange = {
15163
+ status: "ready";
15164
+ value: JsonValue;
15165
+ } | {
15166
+ status: "blocked";
15167
+ reason: string;
15168
+ };
15169
+ /**
15170
+ * Supply the control for one of this plugin's environment providers that
15171
+ * declared `inputs` (registered server-side via
15172
+ * `bb.experimental_environments.register`). The New Thread environment picker
15173
+ * renders the component beside the picker while that provider is selected and
15174
+ * submits the component's latest `onChange` value as the selection's `inputs`.
15175
+ * A provider whose schema rejects empty inputs cannot be submitted without a
15176
+ * registration that reports ready inputs.
15177
+ */
15178
+ interface PluginEnvironmentProviderInputsRegistration {
15179
+ /** The environment provider id this control supplies inputs for. */
15180
+ environmentProviderId: string;
15181
+ component: ComponentType<PluginEnvironmentProviderInputsProps>;
15182
+ }
14863
15183
  interface PluginAppSlots {
14864
15184
  homepageSection(registration: PluginHomepageSectionRegistration): void;
14865
15185
  settingsSection(registration: PluginSettingsSectionRegistration): void;
@@ -14918,8 +15238,8 @@ interface PluginAppSlots {
14918
15238
  */
14919
15239
  commandPaletteAction(registration: PluginCommandPaletteActionRegistration): void;
14920
15240
  /**
14921
- * Draw one agent provider's icon with an inline React component instead of
14922
- * its `<img>`-rendered logo file (see
15241
+ * Draw one agent or environment provider's icon with an inline
15242
+ * React component instead of its `<img>`-rendered logo file (see
14923
15243
  * {@link PluginProviderIconRegistration}). Experimental: see
14924
15244
  * docs/api_to_audit.md.
14925
15245
  */
@@ -14931,6 +15251,13 @@ interface PluginAppSlots {
14931
15251
  * docs/api_to_audit.md.
14932
15252
  */
14933
15253
  experimental_timelineRenderer(registration: PluginTimelineRendererRegistration): void;
15254
+ /**
15255
+ * Supply the inputs control the New Thread environment picker renders
15256
+ * beside one of this plugin's selected environment providers (see
15257
+ * {@link PluginEnvironmentProviderInputsRegistration}). Experimental:
15258
+ * see docs/api_to_audit.md.
15259
+ */
15260
+ experimental_environmentProviderInputs(registration: PluginEnvironmentProviderInputsRegistration): void;
14934
15261
  }
14935
15262
  interface PluginAppComposer {
14936
15263
  customize(registration: ComposerCustomization): void;
@@ -15338,6 +15665,65 @@ interface ExperimentalProviderModelPickerProps {
15338
15665
  disabled?: boolean;
15339
15666
  className?: string;
15340
15667
  }
15668
+ /**
15669
+ * Props of the host-owned `experimental_BranchPicker` component — bb's branch
15670
+ * picker bundled with its branch-options loading for the given host and
15671
+ * project, the control bb's own New Thread composer renders as "Branch from".
15672
+ * The host owns fetching, searching, and refreshing the branch list; the
15673
+ * caller owns only the selection.
15674
+ */
15675
+ interface BranchPickerProps {
15676
+ /**
15677
+ * The enrolled machine whose project checkout supplies the branch list.
15678
+ * Null renders the picker disabled with no options.
15679
+ */
15680
+ hostId: string | null;
15681
+ /** The project whose source on `hostId` is listed; null disables loading. */
15682
+ projectId: string | null;
15683
+ /**
15684
+ * The selected branch name, or null when no branch is chosen (the host
15685
+ * shows its placeholder and the consumer falls back to its own default).
15686
+ */
15687
+ value: string | null;
15688
+ /** Called with the picked branch name, or null when the pick is cleared. */
15689
+ onChange(next: string | null): void;
15690
+ /**
15691
+ * Text placed before the branch on the trigger, e.g. "Base:". Omitted, the
15692
+ * trigger is the branch alone.
15693
+ */
15694
+ label?: string;
15695
+ /**
15696
+ * The trigger while nothing is picked. Omitted, the host shows the resolved
15697
+ * default worktree base branch muted, or a neutral `default` placeholder
15698
+ * when the base cannot be resolved.
15699
+ */
15700
+ placeholder?: string;
15701
+ /** Render the current selection without allowing changes. */
15702
+ disabled?: boolean;
15703
+ }
15704
+ interface UseBranchesArgs {
15705
+ hostId: string | null;
15706
+ projectId: string | null;
15707
+ query?: string;
15708
+ }
15709
+ interface BranchesState {
15710
+ branches: readonly string[];
15711
+ remoteBranches: readonly string[];
15712
+ isLoading: boolean;
15713
+ refresh(): Promise<void>;
15714
+ }
15715
+ interface UseCheckoutStateArgs {
15716
+ hostId: string | null;
15717
+ projectId: string | null;
15718
+ }
15719
+ interface CheckoutState {
15720
+ isGit: boolean | null;
15721
+ unborn: boolean;
15722
+ detached: boolean;
15723
+ dirty: boolean;
15724
+ currentBranch: string | null;
15725
+ operation: WorkspaceGitOperation;
15726
+ }
15341
15727
  /** Props of BB's controlled, host-resolved permission-mode picker. */
15342
15728
  interface ExperimentalPermissionModePickerProps {
15343
15729
  /** Provider whose supported modes determine the available choices. */
@@ -15743,6 +16129,23 @@ interface PluginSdkApp {
15743
16129
  * see docs/api_to_audit.md.
15744
16130
  */
15745
16131
  experimental_PermissionModePicker: ComponentType<ExperimentalPermissionModePickerProps>;
16132
+ /**
16133
+ * BB's branch picker with its branch-options loading for one host and
16134
+ * project (see {@link BranchPickerProps}) — the same control
16135
+ * the New Thread composer renders as "Branch from". Experimental: see
16136
+ * docs/api_to_audit.md.
16137
+ */
16138
+ experimental_BranchPicker: ComponentType<BranchPickerProps>;
16139
+ /**
16140
+ * Search and refresh the branch list for one project source. Experimental:
16141
+ * see docs/api_to_audit.md.
16142
+ */
16143
+ experimental_useBranches(args: UseBranchesArgs): BranchesState;
16144
+ /**
16145
+ * Inspect the checkout state for one project source. Experimental: see
16146
+ * docs/api_to_audit.md.
16147
+ */
16148
+ experimental_useCheckoutState(args: UseCheckoutStateArgs): CheckoutState;
15746
16149
  /**
15747
16150
  * The host-owned source viewer (see {@link SourceCodeProps}). Renders
15748
16151
  * supplied source text with BB's syntax highlighting, gutters, and live code
@@ -15762,6 +16165,112 @@ interface PluginSdkApp {
15762
16165
  useComposerView(): ComposerView;
15763
16166
  }
15764
16167
 
16168
+ type PluginEnvironmentProviderInputsSchema = StandardSchemaV1$1 | undefined;
16169
+ type Fact<R, K extends PropertyKey, T> = R extends Record<K, true> ? T : T | null;
16170
+ type Checkout<R> = R extends {
16171
+ projectCheckout: true;
16172
+ } | {
16173
+ gitCheckout: true;
16174
+ } ? {
16175
+ path: string;
16176
+ } : {
16177
+ path: string;
16178
+ } | null;
16179
+ type InputsValue<S> = S extends StandardSchemaV1$1 ? StandardSchemaV1InferOutput$1<S> : null;
16180
+ /** Attempt-scoped updates; core persists each update before this call returns. */
16181
+ interface PluginEnvironmentProviderProgress {
16182
+ step(text: string): void;
16183
+ log(text: string): void;
16184
+ }
16185
+ interface PluginEnvironmentProviderValidateContext<R extends PluginEnvironmentProviderRequirements$1 = PluginEnvironmentProviderRequirements$1, S extends PluginEnvironmentProviderInputsSchema = PluginEnvironmentProviderInputsSchema> {
16186
+ project: Project;
16187
+ host: Host;
16188
+ projectCheckout: Checkout<R>;
16189
+ gitRemote: Fact<R, "gitRemote", string>;
16190
+ inputs: InputsValue<S>;
16191
+ }
16192
+ interface PluginEnvironmentProviderAvailabilityContext {
16193
+ project: Project;
16194
+ host: Host | null;
16195
+ projectCheckout: {
16196
+ path: string;
16197
+ } | null;
16198
+ gitRemote: string | null;
16199
+ }
16200
+ type PluginEnvironmentProviderAvailability = {
16201
+ status: "available";
16202
+ } | {
16203
+ status: "setup-required";
16204
+ message: string;
16205
+ } | {
16206
+ status: "unavailable";
16207
+ message: string;
16208
+ };
16209
+ interface PluginEnvironmentProviderCreateContext<R extends PluginEnvironmentProviderRequirements$1 = PluginEnvironmentProviderRequirements$1, S extends PluginEnvironmentProviderInputsSchema = PluginEnvironmentProviderInputsSchema> extends PluginEnvironmentProviderValidateContext<R, S> {
16210
+ thread: ThreadResponse;
16211
+ suggestedBranchName: string;
16212
+ attempt: number;
16213
+ pathKey: string;
16214
+ rebuild: boolean;
16215
+ experimental_claimPath(path: string): Promise<boolean>;
16216
+ /** Resource is private to this provider; null after completed removal. */
16217
+ previous: {
16218
+ environment: Environment;
16219
+ resource: JsonValue$2 | null;
16220
+ } | null;
16221
+ report: PluginEnvironmentProviderProgress;
16222
+ signal: AbortSignal;
16223
+ }
16224
+ type PluginEnvironmentProviderCreateResult = {
16225
+ status: "created";
16226
+ path: string;
16227
+ ownsPath: boolean;
16228
+ mergeBaseBranch?: string;
16229
+ resource?: JsonValue$2;
16230
+ } | {
16231
+ status: "failed";
16232
+ failure: "terminal" | "transient";
16233
+ message: string;
16234
+ };
16235
+ interface PluginEnvironmentProviderRemoveContext {
16236
+ environment: Environment | null;
16237
+ hostId: string | null;
16238
+ path: string | null;
16239
+ pathKey: string;
16240
+ resource: JsonValue$2 | null;
16241
+ attempt: number;
16242
+ report: PluginEnvironmentProviderProgress;
16243
+ signal: AbortSignal;
16244
+ }
16245
+ type PluginEnvironmentProviderRemoveResult = {
16246
+ status: "removed";
16247
+ } | {
16248
+ status: "failed";
16249
+ message: string;
16250
+ };
16251
+ /** Core normalizes omitted policy members once at registration. */
16252
+ interface PluginEnvironmentProviderPolicy {
16253
+ /** Default five minutes; null keeps the environment indefinitely. */
16254
+ retireGraceMs: number | null;
16255
+ /** Default per-thread; rebuilds use a fresh key to avoid dead paths. */
16256
+ pathKeys: "per-attempt" | "per-thread";
16257
+ }
16258
+ /** Resource operations only. Core owns durable launches, retries and retirement. */
16259
+ interface PluginEnvironmentProviderDefinition<R extends PluginEnvironmentProviderRequirements$1 = PluginEnvironmentProviderRequirements$1, S extends PluginEnvironmentProviderInputsSchema = PluginEnvironmentProviderInputsSchema> {
16260
+ id: string;
16261
+ displayName: string;
16262
+ /** Host glyph, plugin-relative icon path, or this plugin’s declared namespaced icon. */
16263
+ icon?: string;
16264
+ requires?: R;
16265
+ inputs?: S;
16266
+ policy?: Partial<PluginEnvironmentProviderPolicy>;
16267
+ /** Experimental: see docs/api_to_audit.md. */
16268
+ availability?(context: PluginEnvironmentProviderAvailabilityContext): PluginEnvironmentProviderAvailability | Promise<PluginEnvironmentProviderAvailability>;
16269
+ validate?(context: PluginEnvironmentProviderValidateContext<R, S>): PluginEnvironmentValidateDecision$1 | Promise<PluginEnvironmentValidateDecision$1>;
16270
+ create(context: PluginEnvironmentProviderCreateContext<R, S>): Promise<PluginEnvironmentProviderCreateResult>;
16271
+ remove(context: PluginEnvironmentProviderRemoveContext): Promise<PluginEnvironmentProviderRemoveResult>;
16272
+ }
16273
+
15765
16274
  interface ExperimentalDesktopBrowsersArea {
15766
16275
  listInstances(input: ExperimentalDesktopBrowserHostRequest): Promise<ExperimentalDesktopBrowserInstances>;
15767
16276
  listTabs(input: ExperimentalDesktopBrowserScope): Promise<ExperimentalDesktopBrowserTabs>;
@@ -15852,6 +16361,30 @@ type EnvironmentPathsResult = WorkspacePathListResponse;
15852
16361
  type EnvironmentPullRequestResult = EnvironmentPullRequestResponse;
15853
16362
  type EnvironmentStatusResult = EnvironmentStatusResponse;
15854
16363
  type EnvironmentUpdateResult = Environment;
16364
+ interface EnvironmentListArgs {
16365
+ environmentProviderId?: string;
16366
+ hostId?: string;
16367
+ instanceKey?: string;
16368
+ limit?: number;
16369
+ offset?: number;
16370
+ path?: string;
16371
+ projectId?: string;
16372
+ signal?: AbortSignal;
16373
+ status?: EnvironmentStatus;
16374
+ }
16375
+ type EnvironmentListResult = Environment[];
16376
+ interface EnvironmentDeleteArgs {
16377
+ environmentId: string;
16378
+ }
16379
+ type EnvironmentDeleteResult = {
16380
+ ok: true;
16381
+ };
16382
+ interface EnvironmentListProvidersArgs {
16383
+ projectId?: string;
16384
+ hostId?: string;
16385
+ signal?: AbortSignal;
16386
+ }
16387
+ type EnvironmentListProvidersResult = SystemEnvironmentProvider[];
15855
16388
  interface EnvironmentsArea {
15856
16389
  archiveThreads(args: EnvironmentActionArgs): Promise<EnvironmentArchiveThreadsResult>;
15857
16390
  commit(args: EnvironmentCommitArgs): Promise<EnvironmentCommitResult>;
@@ -15861,6 +16394,9 @@ interface EnvironmentsArea {
15861
16394
  diffFiles(args: EnvironmentDiffArgs): Promise<EnvironmentDiffFilesResult>;
15862
16395
  diffPatch(args: EnvironmentDiffPatchArgs): Promise<EnvironmentDiffPatchResult>;
15863
16396
  get(args: EnvironmentGetArgs): Promise<EnvironmentGetResult>;
16397
+ list(args?: EnvironmentListArgs): Promise<EnvironmentListResult>;
16398
+ listProviders(args?: EnvironmentListProvidersArgs): Promise<EnvironmentListProvidersResult>;
16399
+ delete(args: EnvironmentDeleteArgs): Promise<EnvironmentDeleteResult>;
15864
16400
  pullRequest(args: EnvironmentGetArgs): Promise<EnvironmentPullRequestResult>;
15865
16401
  markPullRequestDraft(args: EnvironmentActionArgs): Promise<EnvironmentMarkPullRequestDraftResult>;
15866
16402
  markPullRequestReady(args: EnvironmentActionArgs): Promise<EnvironmentMarkPullRequestReadyResult>;
@@ -16487,15 +17023,21 @@ type ThemeGetResult = AppTheme;
16487
17023
  type ThemeCatalogResult = ThemeCatalogResponse;
16488
17024
  type ThemeSetInput = AppThemeSelection;
16489
17025
  type ThemeSetResult = AppTheme;
17026
+ type ThemeResolveResult = AppTheme;
16490
17027
  interface ThemeCatalogArgs {
16491
17028
  signal?: AbortSignal;
16492
17029
  }
16493
17030
  interface ThemeGetArgs {
16494
17031
  signal?: AbortSignal;
16495
17032
  }
17033
+ interface ThemeResolveArgs {
17034
+ themeId: string;
17035
+ signal?: AbortSignal;
17036
+ }
16496
17037
  interface ThemeArea {
16497
17038
  get(args?: ThemeGetArgs): Promise<ThemeGetResult>;
16498
17039
  catalog(args?: ThemeCatalogArgs): Promise<ThemeCatalogResult>;
17040
+ resolve(args: ThemeResolveArgs): Promise<ThemeResolveResult>;
16499
17041
  set(selection: ThemeSetInput): Promise<ThemeSetResult>;
16500
17042
  set(themeId: string): Promise<ThemeSetResult>;
16501
17043
  }
@@ -16534,7 +17076,9 @@ type SystemCliSkillsStatusResult = SystemCliSkillsStatusResponse;
16534
17076
  type SystemInstallCliSkillsResult = SystemInstallCliSkillsResponse;
16535
17077
  type SystemVoiceTranscriptionResult = SystemVoiceTranscriptionResponse;
16536
17078
  type SystemUpdateExperimentsResult = Experiments;
16537
- type SystemUpdateGeneralSettingsResult = AppSettings;
17079
+ type SystemUpdateGeneralSettingsResult = AppSettings & {
17080
+ showUnhandledProviderEvents?: boolean;
17081
+ };
16538
17082
  type SystemUpdateKeyboardSettingsResult = AppKeybindingOverrides;
16539
17083
  type SystemUsageLimitsResult = ProviderUsageResponse;
16540
17084
  interface SystemProviderStatesArgs extends SystemProvidersQuery {
@@ -16551,7 +17095,7 @@ interface SystemArea {
16551
17095
  reloadConfig(): Promise<SystemReloadConfigResult>;
16552
17096
  transcribeVoice(args: SystemVoiceTranscriptionArgs): Promise<SystemVoiceTranscriptionResult>;
16553
17097
  updateExperiments(args: Experiments): Promise<SystemUpdateExperimentsResult>;
16554
- updateGeneralSettings(args: AppSettings): Promise<SystemUpdateGeneralSettingsResult>;
17098
+ updateGeneralSettings(args: AppSettingsUpdate): Promise<SystemUpdateGeneralSettingsResult>;
16555
17099
  updateKeyboardSettings(args: AppKeybindingOverrides): Promise<SystemUpdateKeyboardSettingsResult>;
16556
17100
  providerStates(args?: SystemProviderStatesArgs): Promise<SystemProviderStatesResult>;
16557
17101
  usageLimits(args?: SystemUsageLimitsArgs): Promise<SystemUsageLimitsResult>;
@@ -16648,6 +17192,7 @@ interface TerminalsArea {
16648
17192
 
16649
17193
  interface ThreadListArgs {
16650
17194
  archived?: boolean;
17195
+ environmentId?: string;
16651
17196
  sectionId?: string;
16652
17197
  hasParent?: boolean;
16653
17198
  includeHidden?: boolean;
@@ -17092,6 +17637,13 @@ type ExperimentalHostSignals = Readonly<Record<string, ExperimentalHostSignalCon
17092
17637
  interface ExperimentalHostCallOptions {
17093
17638
  readonly hostId: string;
17094
17639
  readonly signal?: AbortSignal;
17640
+ /**
17641
+ * How long the call may run before it fails, in milliseconds. Defaults to
17642
+ * 30 seconds; capped at 30 minutes. Work that legitimately runs longer —
17643
+ * a setup script, a clone — should either set this or be split into a
17644
+ * job the host entry runs in the background and reports on.
17645
+ */
17646
+ readonly timeoutMs?: number;
17095
17647
  }
17096
17648
  interface ExperimentalHostClient<Contract extends PluginRpcContract, Signals extends ExperimentalHostSignals = {}> {
17097
17649
  call<MethodName extends keyof Contract & string>(method: MethodName, input: StandardSchemaV1InferInput<Contract[MethodName]["input"]>, options: ExperimentalHostCallOptions): Promise<PluginRpcResult<Contract[MethodName]>>;
@@ -17387,6 +17939,16 @@ interface PluginThreadEventPayloads {
17387
17939
  "thread.archived": {
17388
17940
  thread: ThreadResponse;
17389
17941
  };
17942
+ /**
17943
+ * Fired after a thread comes back from the archive. Nothing is provisioned
17944
+ * here: a provider that tore its environment down on archive is asked to
17945
+ * provide one again when the thread next needs to run, with that
17946
+ * environment in the ask's context. This is the moment to start warming
17947
+ * one up ahead of that ask.
17948
+ */
17949
+ "thread.unarchived": {
17950
+ thread: ThreadResponse;
17951
+ };
17390
17952
  /** Fired after a thread is soft-deleted. */
17391
17953
  "thread.deleted": {
17392
17954
  thread: ThreadResponse;
@@ -17430,9 +17992,96 @@ interface PluginThreadEventPayloads {
17430
17992
  * that is at capacity instead of jumping the queue.
17431
17993
  */
17432
17994
  "turn.failed": PluginTurnFailedEvent;
17995
+ /**
17996
+ * Fired after a queued row is removed before it ever dispatched — the user
17997
+ * deleted it from the queued card or `bb thread queue`. This is the only
17998
+ * signal for that removal: a plugin holding external resources for a
17999
+ * waiting message (a sandbox mid-provision, a reserved slot) releases them
18000
+ * here. Rows that dispatch fire `message.dispatched` instead, and rows that
18001
+ * vanish because their thread was archived or deleted fire the thread
18002
+ * event, not this one.
18003
+ */
18004
+ "message.cancelled": {
18005
+ entry: ThreadQueuedMessage;
18006
+ };
17433
18007
  }
17434
18008
  type PluginThreadEventName = keyof PluginThreadEventPayloads;
17435
18009
  type PluginThreadEventHandler<E extends PluginThreadEventName> = (payload: PluginThreadEventPayloads[E]) => void | Promise<void>;
18010
+ /**
18011
+ * The facts this provider consumes, in one declaration. Every member is
18012
+ * something core can evaluate before the thread exists and supply to
18013
+ * `create`, so it is also the whole of what decides where the provider is
18014
+ * offered, and the picker needs to know no provider by name. Every member
18015
+ * defaults to false.
18016
+ *
18017
+ * - `projectCheckout` — the provider works from this project's directory on
18018
+ * that machine, git or not, so core refuses a machine with no checkout of
18019
+ * the project at create time and `context.projectCheckout` is non-null.
18020
+ * - `gitCheckout` — that directory must also be a git repository with at
18021
+ * least one commit. The picker greys the row out where it is not, and core
18022
+ * rejects an explicit selection using the same machine inspection before
18023
+ * creating the thread. Implies `projectCheckout`.
18024
+ * - `gitRemote` — the provider clones the project itself, so it is greyed out
18025
+ * in a project with no git remote and an explicit selection is rejected.
18026
+ * - `projectless` — this provider serves only threads that have no project,
18027
+ * so it is offered for those and nowhere else. It cannot be combined with
18028
+ * `projectCheckout`, `gitCheckout` or `gitRemote`, which need a project.
18029
+ */
18030
+ interface PluginEnvironmentProviderRequirements {
18031
+ projectCheckout?: boolean;
18032
+ gitCheckout?: boolean;
18033
+ gitRemote?: boolean;
18034
+ projectless?: boolean;
18035
+ }
18036
+ /**
18037
+ * What `validate` answers. `refuse` fails the create request with `message`
18038
+ * as the caller's error, before a thread or an environment row exists.
18039
+ */
18040
+ type PluginEnvironmentValidateDecision = {
18041
+ action: "accept";
18042
+ } | {
18043
+ action: "refuse";
18044
+ message: string;
18045
+ };
18046
+ /**
18047
+ * Resource operations for one place a thread can run. Core persists progress,
18048
+ * retries, cancellation and retirement. Operations must be idempotent for the
18049
+ * supplied pathKey. Provider ids are unique across running plugins.
18050
+ */
18051
+ type PluginEnvironmentProviderDeclaration<Requires extends PluginEnvironmentProviderRequirements = PluginEnvironmentProviderRequirements, Inputs extends PluginEnvironmentProviderInputsSchema = PluginEnvironmentProviderInputsSchema> = PluginEnvironmentProviderDefinition<Requires, Inputs>;
18052
+ interface PluginEnvironments {
18053
+ /**
18054
+ * Offer a place threads can run. Registering an id this plugin already
18055
+ * registered replaces it. Experimental: see docs/api_to_audit.md.
18056
+ */
18057
+ register<const Requires extends PluginEnvironmentProviderRequirements, const Inputs extends PluginEnvironmentProviderInputsSchema = undefined>(declaration: PluginEnvironmentProviderDeclaration<Requires, Inputs>): void;
18058
+ /**
18059
+ * Ask core to re-ask this plugin's waiting providers now instead of at their
18060
+ * `sendAt` — call it whenever a launch advances (progress text changed, the
18061
+ * environment became ready, a failure was recorded). Resolves on
18062
+ * scheduling, exactly like `experimental_hooks.recheck`.
18063
+ */
18064
+ recheck(): Promise<void>;
18065
+ }
18066
+ /**
18067
+ * Where a thread is going to run, as far as core knows at the checkpoint.
18068
+ * Before provisioning attaches an environment this is the start intent the
18069
+ * thread was created with; afterwards it is the environment itself.
18070
+ */
18071
+ type PluginDispatchEnvironmentIntent = {
18072
+ kind: "environment";
18073
+ environmentId: string;
18074
+ }
18075
+ /** Ask a registered environment provider for the environment. */
18076
+ | {
18077
+ kind: "provider";
18078
+ environmentProviderId: string;
18079
+ machine: {
18080
+ type: "existing";
18081
+ hostId: string;
18082
+ };
18083
+ inputs: JsonValue | null;
18084
+ };
17436
18085
  /**
17437
18086
  * What a `message.dispatch` hook answers.
17438
18087
  *
@@ -17534,6 +18183,13 @@ interface MessageDispatchHookContext {
17534
18183
  * about to occupy. Null only when neither names a machine.
17535
18184
  */
17536
18185
  host: Host | null;
18186
+ /**
18187
+ * What kind of environment the thread will run in, so a policy can tell a
18188
+ * worktree on this machine from a cloud sandbox from an attached directory
18189
+ * before any of them exists. Null only for a thread with neither an
18190
+ * environment nor a start intent.
18191
+ */
18192
+ environmentIntent: PluginDispatchEnvironmentIntent | null;
17537
18193
  input: PluginDispatchInput;
17538
18194
  requestedExecution: PluginDispatchExecution;
17539
18195
  /** Where each execution value came from. */
@@ -17901,8 +18557,9 @@ interface PluginAgentConfigurationContext {
17901
18557
  id: string;
17902
18558
  name: string | null;
17903
18559
  path: string | null;
17904
- workspaceProvisionType: "managed-worktree" | "personal" | "unmanaged";
17905
18560
  branchName: string | null;
18561
+ /** @deprecated Use environment provider identity and capabilities instead. */
18562
+ workspaceProvisionType: WorkspaceProvisionType | null;
17906
18563
  };
17907
18564
  host: {
17908
18565
  id: string;
@@ -18612,6 +19269,12 @@ interface BbPluginApi {
18612
19269
  * reason, or refuse.
18613
19270
  */
18614
19271
  readonly experimental_hooks: PluginHooks;
19272
+ /**
19273
+ * Environment targets: places a thread can run that this plugin
19274
+ * provisions (plans/plugin-environment-providers.md). Experimental: see
19275
+ * docs/api_to_audit.md.
19276
+ */
19277
+ readonly experimental_environments: PluginEnvironments;
18615
19278
  /** Plugin-reported status (needs-configuration). */
18616
19279
  readonly status: PluginStatusApi;
18617
19280
  /** Read-only facts about the running server (loopback base URL). */
@@ -18641,4 +19304,4 @@ interface BbPluginApi {
18641
19304
  }
18642
19305
 
18643
19306
  export { PLUGIN_CLI_OUTPUT_MAX_BYTES, defineRpcContract, experimental_defineHostEntry };
18644
- export type { BbContext, BbNavigate, BbPluginApi, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSubmitOptions, ExperimentalDesktopBrowserAcquireInput, ExperimentalDesktopBrowserCreateInput, ExperimentalDesktopBrowserLease, ExperimentalDesktopBrowserScope, ExperimentalDesktopBrowsersArea, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalHostCallOptions, ExperimentalHostClient, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignalEvent, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginFixedTabReference, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealth, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginWebSocket, ExperimentalPluginWebSocketContext, ExperimentalPluginWebSocketHandler, ExperimentalPluginWebSocketHandlers, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, JsonValue, MarkdownProps, MessageDispatchHookContext, MessageDispatchHookDecision, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolLabels, PluginAgentToolPresentation, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAiServiceDeclaration, PluginAiServiceKind, PluginAiServices, PluginAppBuilder, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginCli, PluginCliCommandInfo, PluginCliContext, PluginCliExecutionResult, PluginCliOutputLimitError, PluginCliRegistration, PluginCliResult, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginDispatchAttemptKind, PluginDispatchExecution, PluginDispatchExecutionSources, PluginDispatchInput, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginHookHandler, PluginHookName, PluginHookSignatures, PluginHooks, PluginHosts, PluginHttp, PluginHttpAuthMode, PluginHttpHandler, PluginInteractionCancelReason, PluginInteractionRequest, PluginInteractionResult, PluginKvStorage, PluginLogger, PluginMentionItem, PluginMentionProviderRegistration, PluginMentionSearchContext, PluginMentionTrigger, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderCapabilities, PluginProviderComposerAction, PluginProviderDeclaration, PluginProviderExtensionKindDeclaration, PluginProviderFallbackModel, PluginProviderIconRegistration, PluginProviderMaintenance, PluginProviderModelCatalogScope, PluginProviderNativeRootEntry, PluginProviderNativeRoots, PluginProviderOptionDescriptor, PluginProviderOptionsContext, PluginProviderPermissionMode, PluginProviderReasoningLevel, PluginProviderStrings, PluginProviders, PluginProvidersState, PluginRealtime, PluginRealtimeConnectionState, PluginRpc, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginServerApi, PluginSettingDescriptor, PluginSettingDescriptors, PluginSettingValue, PluginSettings, PluginSettingsHandle, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSettingsValues, PluginSharedPortTunnelIdentity, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSidebarWorkspaceKind, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginTargetedPanelActionOpenOptions, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginTurnFailedEvent, PluginUi, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps };
19307
+ export type { BbContext, BbNavigate, BbPluginApi, BranchPickerProps, BranchesState, CheckoutState, CodeOverflowMode, ComposerCustomization, ComposerPlusMenuItem, ComposerRichTextSpec, ComposerStructuredDraft, ComposerView, DiffProps, DiffViewMode, ExperimentalAppOverlayProps, ExperimentalAppOverlayRegistration, ExperimentalAppPanel, ExperimentalAppPanelSurface, ExperimentalComposerSubmitOptions, ExperimentalDesktopBrowserAcquireInput, ExperimentalDesktopBrowserCreateInput, ExperimentalDesktopBrowserLease, ExperimentalDesktopBrowserScope, ExperimentalDesktopBrowsersArea, ExperimentalDiffFileContent, ExperimentalDiffFullFileContents, ExperimentalFileLinkProps, ExperimentalFileLocation, ExperimentalFileOpenOptions, ExperimentalFixedTabTargetContract, ExperimentalFixedTabTargetState, ExperimentalHostCallOptions, ExperimentalHostClient, ExperimentalHostEntry, ExperimentalHostPaths, ExperimentalHostRpcContext, ExperimentalHostRpcHandlers, ExperimentalHostSignalContract, ExperimentalHostSignalEvent, ExperimentalHostSignals, ExperimentalHostWatchChange, ExperimentalHostWatchChangeType, ExperimentalHostWatchEvent, ExperimentalHostWatchListener, ExperimentalHostWatchOptions, ExperimentalHostWatchSubscription, ExperimentalHostWorkerLease, ExperimentalLiveFileTarget, ExperimentalOpenFixedTabOptions, ExperimentalPermissionModePickerProps, ExperimentalPluginFixedTabReference, ExperimentalPluginProviderEnvContext, ExperimentalPluginProviderEnvEntry, ExperimentalPluginProviderEnvHealth, ExperimentalPluginProviderEnvHealthContext, ExperimentalPluginWebSocket, ExperimentalPluginWebSocketContext, ExperimentalPluginWebSocketHandler, ExperimentalPluginWebSocketHandlers, ExperimentalProviderModelPickerProps, ExperimentalProviderModelPickerRouting, ExperimentalProviderModelPickerValue, ExperimentalSidebarFooter, ExperimentalSidebarFooterActionContext, ExperimentalSidebarFooterActionRegistration, ExperimentalSidebarFooterDisclosureController, ExperimentalSidebarFooterDisclosureProps, ExperimentalSidebarFooterDisclosureRegistration, ExperimentalSidebarFooterItemBase, ExperimentalSidebarFooterItemRegistration, ExperimentalSidebarNavigationAction, ExperimentalSidebarNavigationActivationOptions, ExperimentalSidebarNavigationIcon, ExperimentalSidebarNavigationItem, ExperimentalSidebarNavigationProps, ExperimentalSidebarNavigationRegistration, ExperimentalSidebarNavigationShortcut, JsonValue, MarkdownProps, MessageDispatchHookContext, MessageDispatchHookDecision, NewThreadComposerProps, NewThreadRequest, PluginAgentConfiguration, PluginAgentConfigurationContext, PluginAgentToolContentPart, PluginAgentToolContext, PluginAgentToolLabels, PluginAgentToolPresentation, PluginAgentToolRegistrationBase, PluginAgentToolResult, PluginAgentToolSelection, PluginAgents, PluginAiServiceDeclaration, PluginAiServiceKind, PluginAiServices, PluginAppBuilder, PluginAppComposer, PluginAppContentScripts, PluginAppDefinition, PluginAppSetup, PluginAppSlots, PluginBackground, PluginCli, PluginCliCommandInfo, PluginCliContext, PluginCliExecutionResult, PluginCliOutputLimitError, PluginCliRegistration, PluginCliResult, PluginCodeThemeData, PluginCodeThemeState, PluginCodeThemeTokenRule, PluginCommandPaletteActionContext, PluginCommandPaletteActionRegistration, PluginComposerApi, PluginComposerMention, PluginComposerScope, PluginComposerTextEffect, PluginComposerThreadRowStatus, PluginContentScriptContext, PluginContentScriptDisposer, PluginContentScriptRegistration, PluginDiffRendererProps, PluginDiffRendererRegistration, PluginDispatchAttemptKind, PluginDispatchEnvironmentIntent, PluginDispatchExecution, PluginDispatchExecutionSources, PluginDispatchInput, PluginEnvironmentProviderDeclaration, PluginEnvironmentProviderInputsChange, PluginEnvironmentProviderInputsProps, PluginEnvironmentProviderInputsRegistration, PluginEnvironmentProviderRequirements, PluginEnvironmentValidateDecision, PluginEnvironments, PluginEvents, PluginFileOpenerProps, PluginFileOpenerRegistration, PluginFileOpenerSource, PluginFixedTabDeclaration, PluginFixedTabRegistration, PluginHomepageSectionProps, PluginHomepageSectionRegistration, PluginHookHandler, PluginHookName, PluginHookSignatures, PluginHooks, PluginHosts, PluginHttp, PluginHttpAuthMode, PluginHttpHandler, PluginInteractionCancelReason, PluginInteractionRequest, PluginInteractionResult, PluginKvStorage, PluginLogger, PluginMentionItem, PluginMentionProviderRegistration, PluginMentionSearchContext, PluginMentionTrigger, PluginMessageActionContext, PluginMessageActionRegistration, PluginMessageDirectiveMessage, PluginMessageDirectiveOpenWorkspaceFile, PluginMessageDirectiveProps, PluginMessageDirectiveRegistration, PluginNavPanelProps, PluginNavPanelRegistration, PluginNewThreadPanelActionContext, PluginNewThreadPanelActionRegistration, PluginNewThreadPanelProps, PluginPanelActionOpenOptions, PluginPendingInteractionProps, PluginPendingInteractionRegistration, PluginPendingInteractionView, PluginProviderCapabilities, PluginProviderComposerAction, PluginProviderDeclaration, PluginProviderExtensionKindDeclaration, PluginProviderFallbackModel, PluginProviderIconRegistration, PluginProviderMaintenance, PluginProviderModelCatalogScope, PluginProviderNativeRootEntry, PluginProviderNativeRoots, PluginProviderOptionDescriptor, PluginProviderOptionsContext, PluginProviderPermissionMode, PluginProviderReasoningLevel, PluginProviderStrings, PluginProviders, PluginProvidersState, PluginRealtime, PluginRealtimeConnectionState, PluginRpc, PluginRpcCallArgs, PluginRpcClient, PluginRpcContract, PluginRpcError, PluginRpcErrorCode, PluginRpcHandlers, PluginRpcIssuePathSegment, PluginRpcMethodContract, PluginRpcResult, PluginRpcValidationIssue, PluginSdkApp, PluginServerApi, PluginSettingDescriptor, PluginSettingDescriptors, PluginSettingValue, PluginSettings, PluginSettingsHandle, PluginSettingsSectionProps, PluginSettingsSectionRegistration, PluginSettingsState, PluginSettingsValues, PluginSharedPortTunnelIdentity, PluginSidebarFooterActionContext, PluginSidebarFooterActionProps, PluginSidebarFooterActionRegistration, PluginSidebarProject, PluginSidebarPullRequest, PluginSidebarSplitPane, PluginSidebarThread, PluginSidebarThreadActions, PluginSidebarThreadActivity, PluginSidebarThreadIndicator, PluginSidebarThreadPullRequestState, PluginSidebarThreadSplit, PluginSidebarThreadsState, PluginSourceCodeRendererProps, PluginSourceCodeRendererRegistration, PluginStatusApi, PluginStorage, PluginTargetedPanelActionOpenOptions, PluginThreadEventHandler, PluginThreadEventName, PluginThreadEventPayloads, PluginThreadHeaderActionProps, PluginThreadHeaderActionRegistration, PluginThreadListProps, PluginThreadListRegistration, PluginThreadPanelActionContext, PluginThreadPanelActionRegistration, PluginThreadPanelProps, PluginTimelineRendererProps, PluginTimelineRendererRegistration, PluginTimelineRendererRow, PluginTimelineRowPresentation, PluginTimelineRowStatus, PluginTurnFailedEvent, PluginUi, SourceCodeLineRange, SourceCodeProps, StandardSchemaV1, StandardSchemaV1InferInput, StandardSchemaV1InferOutput, StandardSchemaV1Issue, StandardSchemaV1Result, ThreadChatMessageAction, ThreadChatMessageReference, ThreadChatProps, UrlLinkProps, UseBranchesArgs, UseCheckoutStateArgs };