@get-bb/plugin-sdk 0.6.94 → 0.6.99

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.
@@ -1030,7 +1030,7 @@ function withoutBridgeRuntimeEnv(env) {
1030
1030
  }
1031
1031
 
1032
1032
  // ../provider-bridge-protocol/src/bridge-kit/bridge-tool-calls.ts
1033
- import { z as z24 } from "zod";
1033
+ import { z as z25 } from "zod";
1034
1034
 
1035
1035
  // ../domain/src/context-snapshot.ts
1036
1036
  import { z as z3 } from "zod";
@@ -1397,7 +1397,7 @@ var sessionOptionSelectionsSchema = z5.record(
1397
1397
  var runtimeThreadExecutionBaseOptionsSchema = z5.object({
1398
1398
  model: z5.string().min(1),
1399
1399
  serviceTier: serviceTierSchema,
1400
- reasoningLevel: reasoningLevelSchema,
1400
+ reasoningLevel: reasoningLevelSchema.optional(),
1401
1401
  promptMode: promptModeSchema.optional(),
1402
1402
  sessionOptions: sessionOptionSelectionsSchema.optional(),
1403
1403
  providerOptions: jsonObjectSchema
@@ -2006,7 +2006,7 @@ var approvalPendingInteractionPayloadSchema = z14.object({
2006
2006
  reason: z14.string().nullable(),
2007
2007
  availableDecisions: z14.array(pendingInteractionApprovalDecisionSchema).min(1)
2008
2008
  });
2009
- var USER_QUESTION_MAX_QUESTIONS = 4;
2009
+ var USER_QUESTION_MAX_QUESTIONS = 10;
2010
2010
  var USER_QUESTION_MAX_OPTIONS = 4;
2011
2011
  var USER_QUESTION_MAX_SELECTED = 4;
2012
2012
  var USER_QUESTION_MAX_FREE_TEXT_LENGTH = 4096;
@@ -2048,7 +2048,8 @@ var pendingInteractionUserQuestionQuestionSchema = z14.object({
2048
2048
  USER_QUESTION_MAX_OPTIONS,
2049
2049
  `User questions cannot include more than ${USER_QUESTION_MAX_OPTIONS} options`
2050
2050
  ).optional(),
2051
- allowFreeText: z14.boolean()
2051
+ allowFreeText: z14.boolean(),
2052
+ required: z14.boolean().default(true)
2052
2053
  }).superRefine((question, context) => {
2053
2054
  const optionValues = /* @__PURE__ */ new Set();
2054
2055
  question.options?.forEach((option, index) => {
@@ -3307,17 +3308,13 @@ var threadEventSchema = z19.union([providerEventSchema, systemEventSchema]).supe
3307
3308
  });
3308
3309
 
3309
3310
  // ../domain/src/thread-provider-state.ts
3311
+ import { z as z22 } from "zod";
3312
+
3313
+ // ../domain/src/provider-types.ts
3314
+ import { z as z21 } from "zod";
3315
+
3316
+ // ../domain/src/thread-session-option.ts
3310
3317
  import { z as z20 } from "zod";
3311
- var THREAD_PROVIDER_COMMANDS_STATE_KIND = "bb/provider-commands";
3312
- var THREAD_SESSION_OPTIONS_STATE_KIND = "bb/session-options";
3313
- var threadProviderCommandSchema = z20.object({
3314
- name: z20.string().min(1),
3315
- description: z20.string(),
3316
- inputHint: z20.string().min(1).optional()
3317
- });
3318
- var threadProviderCommandsStateSchema = z20.object({
3319
- commands: z20.array(threadProviderCommandSchema).max(500)
3320
- });
3321
3318
  var threadSessionOptionValueSchema = z20.object({
3322
3319
  id: z20.string().min(1),
3323
3320
  label: z20.string().min(1),
@@ -3344,117 +3341,102 @@ var threadSessionOptionSchema = z20.discriminatedUnion("type", [
3344
3341
  fixed: z20.boolean().optional()
3345
3342
  })
3346
3343
  ]);
3347
- var threadSessionOptionsStateSchema = z20.object({
3348
- options: z20.array(threadSessionOptionSchema).max(64)
3349
- });
3350
- var threadSessionOptionSelectionsStateSchema = z20.object({
3351
- selections: sessionOptionSelectionsSchema
3352
- });
3353
- var CORE_THREAD_STATE_SCHEMAS = {
3354
- [THREAD_PROVIDER_COMMANDS_STATE_KIND]: threadProviderCommandsStateSchema,
3355
- [THREAD_SESSION_OPTIONS_STATE_KIND]: threadSessionOptionsStateSchema
3356
- };
3357
-
3358
- // ../domain/src/provider-fork.ts
3359
- import { z as z21 } from "zod";
3360
- var PROVIDER_FORK_VALUES = ["none", "tip", "checkpoint"];
3361
- var providerForkSchema = z21.enum(PROVIDER_FORK_VALUES);
3362
3344
 
3363
3345
  // ../domain/src/provider-types.ts
3364
- import { z as z22 } from "zod";
3365
- var modelReasoningEffortSchema = z22.object({
3346
+ var modelReasoningEffortSchema = z21.object({
3366
3347
  reasoningEffort: reasoningLevelSchema,
3367
- label: z22.string().min(1).optional(),
3368
- description: z22.string()
3348
+ label: z21.string().min(1).optional(),
3349
+ description: z21.string()
3369
3350
  });
3370
- var modelServiceTierSchema = z22.object({
3351
+ var modelServiceTierSchema = z21.object({
3371
3352
  id: serviceTierSchema,
3372
- label: z22.string().min(1).optional(),
3373
- description: z22.string().min(1).optional()
3374
- });
3375
- var availableModelSchema = z22.object({
3376
- id: z22.string(),
3377
- model: z22.string(),
3378
- displayName: z22.string(),
3379
- routeProviderId: z22.string().min(1).optional(),
3380
- description: z22.string(),
3381
- supportedReasoningEfforts: z22.array(modelReasoningEffortSchema),
3353
+ label: z21.string().min(1).optional(),
3354
+ description: z21.string().min(1).optional()
3355
+ });
3356
+ var availableModelSchema = z21.object({
3357
+ id: z21.string(),
3358
+ model: z21.string(),
3359
+ displayName: z21.string(),
3360
+ routeProviderId: z21.string().min(1).optional(),
3361
+ description: z21.string(),
3362
+ reasoningDiscovery: z21.enum(["unknown", "known"]).default("known"),
3363
+ supportedReasoningEfforts: z21.array(modelReasoningEffortSchema),
3382
3364
  defaultReasoningEffort: reasoningLevelSchema,
3383
- supportedServiceTiers: z22.array(modelServiceTierSchema).optional(),
3384
- sessionOptions: z22.array(threadSessionOptionSchema).max(64).optional(),
3385
- isDefault: z22.boolean()
3386
- });
3387
- var providerModelCatalogScopeSchema = z22.enum(["host", "workspace"]);
3388
- var providerCapabilitiesSchema = z22.object({
3389
- supportsThreadArchive: z22.boolean(),
3390
- supportsThreadRename: z22.boolean(),
3391
- supportsServiceTier: z22.boolean(),
3392
- supportsNativeUserQuestion: z22.boolean(),
3393
- supportsFork: z22.boolean(),
3394
- supportsSessionRewind: z22.boolean(),
3395
- permissionModes: z22.array(permissionModeSchema).min(1),
3365
+ supportedServiceTiers: z21.array(modelServiceTierSchema).optional(),
3366
+ sessionOptions: z21.array(threadSessionOptionSchema).max(64).optional(),
3367
+ isDefault: z21.boolean()
3368
+ });
3369
+ var providerModelCatalogScopeSchema = z21.enum(["host", "workspace"]);
3370
+ var providerCapabilitiesSchema = z21.object({
3371
+ supportsThreadArchive: z21.boolean(),
3372
+ supportsThreadRename: z21.boolean(),
3373
+ supportsServiceTier: z21.boolean(),
3374
+ supportsNativeUserQuestion: z21.boolean(),
3375
+ supportsFork: z21.boolean(),
3376
+ supportsSessionRewind: z21.boolean(),
3377
+ permissionModes: z21.array(permissionModeSchema).min(1),
3396
3378
  modelCatalogScope: providerModelCatalogScopeSchema
3397
3379
  });
3398
- var providerComposerCommandSchema = z22.object({
3380
+ var providerComposerCommandSchema = z21.object({
3399
3381
  trigger: promptMentionCommandTriggerSchema,
3400
- name: z22.string().min(1).regex(/^[^\s/$]+$/u),
3401
- trailingText: z22.string().regex(/^\s*$/u)
3382
+ name: z21.string().min(1).regex(/^[^\s/$]+$/u),
3383
+ trailingText: z21.string().regex(/^\s*$/u)
3402
3384
  });
3403
- var providerComposerActionSchema = z22.discriminatedUnion("kind", [
3404
- z22.object({
3405
- kind: z22.literal("skills"),
3385
+ var providerComposerActionSchema = z21.discriminatedUnion("kind", [
3386
+ z21.object({
3387
+ kind: z21.literal("skills"),
3406
3388
  trigger: promptMentionCommandTriggerSchema
3407
3389
  }),
3408
- z22.object({
3409
- kind: z22.literal("plan"),
3390
+ z21.object({
3391
+ kind: z21.literal("plan"),
3410
3392
  command: providerComposerCommandSchema
3411
3393
  }),
3412
- z22.object({
3413
- kind: z22.literal("goal"),
3394
+ z21.object({
3395
+ kind: z21.literal("goal"),
3414
3396
  command: providerComposerCommandSchema
3415
3397
  })
3416
3398
  ]);
3417
- var providerStringsSchema = z22.object({
3418
- signInHint: z22.string().min(1),
3419
- expiredHint: z22.string().min(1),
3420
- installUrl: z22.string().min(1),
3421
- brandPrefix: z22.string().min(1).optional(),
3422
- planModeCopy: z22.string().min(1).optional(),
3423
- iconTint: z22.object({ light: z22.string().min(1), dark: z22.string().min(1) }).optional()
3424
- });
3425
- var providerOptionDescriptorSchema = z22.object({
3426
- id: z22.string().min(1),
3427
- label: z22.string().min(1),
3428
- description: z22.string().min(1).optional(),
3429
- icon: z22.string().min(1).optional()
3430
- });
3431
- var providerExtensionKindInfoSchema = z22.object({
3432
- item: z22.boolean(),
3433
- state: z22.boolean()
3434
- });
3435
- var providerExtensionKindsSchema = z22.record(
3399
+ var providerStringsSchema = z21.object({
3400
+ signInHint: z21.string().min(1),
3401
+ expiredHint: z21.string().min(1),
3402
+ installUrl: z21.string().min(1),
3403
+ brandPrefix: z21.string().min(1).optional(),
3404
+ planModeCopy: z21.string().min(1).optional(),
3405
+ iconTint: z21.object({ light: z21.string().min(1), dark: z21.string().min(1) }).optional()
3406
+ });
3407
+ var providerOptionDescriptorSchema = z21.object({
3408
+ id: z21.string().min(1),
3409
+ label: z21.string().min(1),
3410
+ description: z21.string().min(1).optional(),
3411
+ icon: z21.string().min(1).optional()
3412
+ });
3413
+ var providerExtensionKindInfoSchema = z21.object({
3414
+ item: z21.boolean(),
3415
+ state: z21.boolean()
3416
+ });
3417
+ var providerExtensionKindsSchema = z21.record(
3436
3418
  extensionKindSchema,
3437
3419
  providerExtensionKindInfoSchema
3438
3420
  );
3439
- var providerInfoSchema = z22.object({
3440
- id: z22.string(),
3441
- pluginId: z22.string().min(1),
3442
- displayName: z22.string(),
3443
- family: z22.string().min(1).optional(),
3444
- icon: z22.object({ glyph: z22.string().min(1) }).optional(),
3445
- logoUrl: z22.string().min(1).nullable(),
3446
- maintenance: z22.object({
3447
- health: z22.boolean(),
3448
- usage: z22.boolean(),
3449
- installation: z22.boolean()
3421
+ var providerInfoSchema = z21.object({
3422
+ id: z21.string(),
3423
+ pluginId: z21.string().min(1),
3424
+ displayName: z21.string(),
3425
+ family: z21.string().min(1).optional(),
3426
+ icon: z21.object({ glyph: z21.string().min(1) }).optional(),
3427
+ logoUrl: z21.string().min(1).nullable(),
3428
+ maintenance: z21.object({
3429
+ health: z21.boolean(),
3430
+ usage: z21.boolean(),
3431
+ installation: z21.boolean()
3450
3432
  }),
3451
3433
  capabilities: providerCapabilitiesSchema,
3452
- composerActions: z22.array(providerComposerActionSchema),
3434
+ composerActions: z21.array(providerComposerActionSchema),
3453
3435
  completedTurnDisplay: completedTurnDisplaySchema,
3454
- available: z22.boolean(),
3436
+ available: z21.boolean(),
3455
3437
  strings: providerStringsSchema.optional(),
3456
- serviceTiers: z22.array(providerOptionDescriptorSchema).optional(),
3457
- reasoningLevels: z22.array(providerOptionDescriptorSchema).optional(),
3438
+ serviceTiers: z21.array(providerOptionDescriptorSchema).optional(),
3439
+ reasoningLevels: z21.array(providerOptionDescriptorSchema).optional(),
3458
3440
  extensionKinds: providerExtensionKindsSchema.optional()
3459
3441
  });
3460
3442
  var providerRecoveryKindValues = [
@@ -3464,37 +3446,70 @@ var providerRecoveryKindValues = [
3464
3446
  "staleTurn",
3465
3447
  "rateLimited"
3466
3448
  ];
3467
- var providerRecoveryKindSchema = z22.enum(providerRecoveryKindValues);
3468
- var toolCallOutputItemSchema = z22.discriminatedUnion("type", [
3469
- z22.object({
3470
- type: z22.literal("inputText"),
3471
- text: z22.string()
3449
+ var providerRecoveryKindSchema = z21.enum(providerRecoveryKindValues);
3450
+ var toolCallOutputItemSchema = z21.discriminatedUnion("type", [
3451
+ z21.object({
3452
+ type: z21.literal("inputText"),
3453
+ text: z21.string()
3472
3454
  }),
3473
- z22.object({
3474
- type: z22.literal("inputImage"),
3475
- imageUrl: z22.string()
3455
+ z21.object({
3456
+ type: z21.literal("inputImage"),
3457
+ imageUrl: z21.string()
3476
3458
  })
3477
3459
  ]);
3478
- var toolCallRequestSchema = z22.object({
3479
- requestId: z22.union([z22.string().min(1), z22.number()]),
3480
- threadId: z22.string().min(1),
3481
- providerThreadId: z22.string().min(1),
3482
- turnId: z22.string().min(1),
3483
- callId: z22.string().min(1),
3484
- tool: z22.string().min(1),
3485
- arguments: z22.unknown().optional()
3486
- });
3487
- var toolCallResponseSchema = z22.object({
3488
- contentItems: z22.array(toolCallOutputItemSchema),
3489
- success: z22.boolean()
3490
- });
3491
- var dynamicToolSchema = z22.object({
3492
- name: z22.string(),
3493
- description: z22.string(),
3494
- inputSchema: z22.unknown(),
3460
+ var toolCallRequestSchema = z21.object({
3461
+ requestId: z21.union([z21.string().min(1), z21.number()]),
3462
+ threadId: z21.string().min(1),
3463
+ providerThreadId: z21.string().min(1),
3464
+ turnId: z21.string().min(1),
3465
+ callId: z21.string().min(1),
3466
+ tool: z21.string().min(1),
3467
+ arguments: z21.unknown().optional()
3468
+ });
3469
+ var toolCallResponseSchema = z21.object({
3470
+ contentItems: z21.array(toolCallOutputItemSchema),
3471
+ success: z21.boolean()
3472
+ });
3473
+ var dynamicToolSchema = z21.object({
3474
+ name: z21.string(),
3475
+ description: z21.string(),
3476
+ inputSchema: z21.unknown(),
3495
3477
  presentation: threadEventItemPresentationSchema.optional()
3496
3478
  });
3497
3479
 
3480
+ // ../domain/src/thread-provider-state.ts
3481
+ var THREAD_PROVIDER_COMMANDS_STATE_KIND = "bb/provider-commands";
3482
+ var THREAD_SESSION_OPTIONS_STATE_KIND = "bb/session-options";
3483
+ var THREAD_PROVIDER_MODEL_CATALOG_STATE_KIND = "bb/provider-model-catalog";
3484
+ var threadProviderModelCatalogStateSchema = z22.object({
3485
+ models: z22.array(availableModelSchema).max(1e3),
3486
+ selectedOnlyModels: z22.array(availableModelSchema).max(1e3)
3487
+ });
3488
+ var threadProviderCommandSchema = z22.object({
3489
+ name: z22.string().min(1),
3490
+ description: z22.string(),
3491
+ inputHint: z22.string().min(1).optional()
3492
+ });
3493
+ var threadProviderCommandsStateSchema = z22.object({
3494
+ commands: z22.array(threadProviderCommandSchema).max(500)
3495
+ });
3496
+ var threadSessionOptionsStateSchema = z22.object({
3497
+ options: z22.array(threadSessionOptionSchema).max(64)
3498
+ });
3499
+ var threadSessionOptionSelectionsStateSchema = z22.object({
3500
+ selections: sessionOptionSelectionsSchema
3501
+ });
3502
+ var CORE_THREAD_STATE_SCHEMAS = {
3503
+ [THREAD_PROVIDER_MODEL_CATALOG_STATE_KIND]: threadProviderModelCatalogStateSchema,
3504
+ [THREAD_PROVIDER_COMMANDS_STATE_KIND]: threadProviderCommandsStateSchema,
3505
+ [THREAD_SESSION_OPTIONS_STATE_KIND]: threadSessionOptionsStateSchema
3506
+ };
3507
+
3508
+ // ../domain/src/provider-fork.ts
3509
+ import { z as z23 } from "zod";
3510
+ var PROVIDER_FORK_VALUES = ["none", "tip", "checkpoint"];
3511
+ var providerForkSchema = z23.enum(PROVIDER_FORK_VALUES);
3512
+
3498
3513
  // ../domain/src/reasoning-efforts.ts
3499
3514
  var NONE_REASONING_EFFORT = {
3500
3515
  reasoningEffort: "none",
@@ -3545,58 +3560,58 @@ function reasoningEffortsForLevels(levels) {
3545
3560
  }
3546
3561
 
3547
3562
  // ../provider-bridge-protocol/src/bridge-requests.ts
3548
- import { z as z23 } from "zod";
3563
+ import { z as z24 } from "zod";
3549
3564
  var BRIDGE_INBOUND_REQUEST_METHODS = {
3550
3565
  toolCall: "item/tool/call",
3551
3566
  interactionRequest: "interaction/request"
3552
3567
  };
3553
- var toolCallRequestParamsSchema = z23.object({
3554
- providerThreadId: z23.string().min(1),
3555
- threadId: z23.string().min(1).optional(),
3556
- turnId: z23.union([z23.string().min(1), z23.null()]),
3557
- callId: z23.string().min(1),
3558
- tool: z23.string().min(1),
3559
- arguments: z23.unknown()
3568
+ var toolCallRequestParamsSchema = z24.object({
3569
+ providerThreadId: z24.string().min(1),
3570
+ threadId: z24.string().min(1).optional(),
3571
+ turnId: z24.union([z24.string().min(1), z24.null()]),
3572
+ callId: z24.string().min(1),
3573
+ tool: z24.string().min(1),
3574
+ arguments: z24.unknown()
3560
3575
  }).passthrough();
3561
- var toolCallResultSchema = z23.object({
3562
- success: z23.boolean(),
3563
- contentItems: z23.array(
3564
- z23.discriminatedUnion("type", [
3565
- z23.object({ type: z23.literal("inputText"), text: z23.string() }),
3566
- z23.object({
3567
- type: z23.literal("inputImage"),
3568
- imageUrl: z23.string().min(1)
3576
+ var toolCallResultSchema = z24.object({
3577
+ success: z24.boolean(),
3578
+ contentItems: z24.array(
3579
+ z24.discriminatedUnion("type", [
3580
+ z24.object({ type: z24.literal("inputText"), text: z24.string() }),
3581
+ z24.object({
3582
+ type: z24.literal("inputImage"),
3583
+ imageUrl: z24.string().min(1)
3569
3584
  })
3570
3585
  ])
3571
3586
  )
3572
3587
  }).passthrough();
3573
- var interactionRequestParamsSchema = z23.object({
3574
- providerThreadId: z23.string().min(1),
3575
- threadId: z23.string().min(1).optional(),
3576
- turnId: z23.union([z23.string().min(1), z23.null()]),
3588
+ var interactionRequestParamsSchema = z24.object({
3589
+ providerThreadId: z24.string().min(1),
3590
+ threadId: z24.string().min(1).optional(),
3591
+ turnId: z24.union([z24.string().min(1), z24.null()]),
3577
3592
  payload: pendingInteractionPayloadSchema
3578
3593
  }).passthrough();
3579
3594
 
3580
3595
  // ../provider-bridge-protocol/src/bridge-kit/bridge-tool-calls.ts
3581
- var bridgeRequestEnvelopeSchema = z24.object({
3582
- jsonrpc: z24.literal("2.0"),
3583
- id: z24.union([z24.string(), z24.number()]),
3584
- method: z24.string(),
3585
- params: z24.record(z24.string(), z24.unknown()).optional()
3586
- });
3587
- var jsonRpcErrorSchema = z24.object({
3588
- code: z24.number(),
3589
- message: z24.string().optional(),
3590
- data: z24.unknown().optional()
3591
- });
3592
- var jsonRpcSuccessResponseSchema = z24.object({
3593
- jsonrpc: z24.literal("2.0"),
3594
- id: z24.union([z24.string(), z24.number()]),
3595
- result: z24.unknown()
3596
- });
3597
- var jsonRpcErrorResponseSchema = z24.object({
3598
- jsonrpc: z24.literal("2.0"),
3599
- id: z24.union([z24.string(), z24.number()]),
3596
+ var bridgeRequestEnvelopeSchema = z25.object({
3597
+ jsonrpc: z25.literal("2.0"),
3598
+ id: z25.union([z25.string(), z25.number()]),
3599
+ method: z25.string(),
3600
+ params: z25.record(z25.string(), z25.unknown()).optional()
3601
+ });
3602
+ var jsonRpcErrorSchema = z25.object({
3603
+ code: z25.number(),
3604
+ message: z25.string().optional(),
3605
+ data: z25.unknown().optional()
3606
+ });
3607
+ var jsonRpcSuccessResponseSchema = z25.object({
3608
+ jsonrpc: z25.literal("2.0"),
3609
+ id: z25.union([z25.string(), z25.number()]),
3610
+ result: z25.unknown()
3611
+ });
3612
+ var jsonRpcErrorResponseSchema = z25.object({
3613
+ jsonrpc: z25.literal("2.0"),
3614
+ id: z25.union([z25.string(), z25.number()]),
3600
3615
  error: jsonRpcErrorSchema
3601
3616
  });
3602
3617
  function isJsonRpcRequest(input) {
@@ -3684,47 +3699,47 @@ function buildBridgeToolCallContent(result) {
3684
3699
  }
3685
3700
 
3686
3701
  // ../provider-bridge-protocol/src/bridge-kit/json-rpc-envelope.ts
3687
- import { z as z25 } from "zod";
3688
- var recordSchema = z25.record(z25.string(), z25.unknown());
3689
- var jsonRpcEnvelopeSchema = z25.object({
3690
- jsonrpc: z25.literal("2.0"),
3691
- method: z25.string(),
3702
+ import { z as z26 } from "zod";
3703
+ var recordSchema = z26.record(z26.string(), z26.unknown());
3704
+ var jsonRpcEnvelopeSchema = z26.object({
3705
+ jsonrpc: z26.literal("2.0"),
3706
+ method: z26.string(),
3692
3707
  params: recordSchema.optional()
3693
3708
  }).passthrough();
3694
- var sdkMessageEnvelopeSchema = z25.object({
3695
- jsonrpc: z25.literal("2.0"),
3696
- method: z25.literal("sdk/message"),
3697
- params: z25.object({
3698
- message: z25.unknown(),
3699
- threadId: z25.string().optional(),
3700
- parent_tool_use_id: z25.string().optional()
3709
+ var sdkMessageEnvelopeSchema = z26.object({
3710
+ jsonrpc: z26.literal("2.0"),
3711
+ method: z26.literal("sdk/message"),
3712
+ params: z26.object({
3713
+ message: z26.unknown(),
3714
+ threadId: z26.string().optional(),
3715
+ parent_tool_use_id: z26.string().optional()
3701
3716
  }).passthrough()
3702
3717
  }).passthrough();
3703
- var threadIdentityEnvelopeSchema = z25.object({
3704
- jsonrpc: z25.literal("2.0"),
3705
- method: z25.literal("thread/identity"),
3706
- params: z25.object({
3707
- threadId: z25.string().optional(),
3708
- providerThreadId: z25.string().optional()
3718
+ var threadIdentityEnvelopeSchema = z26.object({
3719
+ jsonrpc: z26.literal("2.0"),
3720
+ method: z26.literal("thread/identity"),
3721
+ params: z26.object({
3722
+ threadId: z26.string().optional(),
3723
+ providerThreadId: z26.string().optional()
3709
3724
  }).passthrough()
3710
3725
  }).passthrough();
3711
- var threadContextWindowUsageEnvelopeSchema = z25.object({
3712
- jsonrpc: z25.literal("2.0"),
3713
- method: z25.literal("thread/contextWindowUsage/updated"),
3714
- params: z25.object({
3715
- threadId: z25.string().optional(),
3716
- contextWindowUsage: z25.object({
3717
- usedTokens: z25.number().nullable(),
3718
- modelContextWindow: z25.number().nullable(),
3719
- estimated: z25.boolean()
3726
+ var threadContextWindowUsageEnvelopeSchema = z26.object({
3727
+ jsonrpc: z26.literal("2.0"),
3728
+ method: z26.literal("thread/contextWindowUsage/updated"),
3729
+ params: z26.object({
3730
+ threadId: z26.string().optional(),
3731
+ contextWindowUsage: z26.object({
3732
+ usedTokens: z26.number().nullable(),
3733
+ modelContextWindow: z26.number().nullable(),
3734
+ estimated: z26.boolean()
3720
3735
  })
3721
3736
  }).passthrough()
3722
3737
  }).passthrough();
3723
- var errorEnvelopeSchema = z25.object({
3724
- jsonrpc: z25.literal("2.0"),
3725
- method: z25.literal("error"),
3726
- params: z25.object({
3727
- message: z25.string().optional()
3738
+ var errorEnvelopeSchema = z26.object({
3739
+ jsonrpc: z26.literal("2.0"),
3740
+ method: z26.literal("error"),
3741
+ params: z26.object({
3742
+ message: z26.string().optional()
3728
3743
  }).passthrough().optional()
3729
3744
  }).passthrough();
3730
3745
 
@@ -11820,7 +11835,7 @@ function sanitizeInheritedChildProcessEnv(args) {
11820
11835
  var import_compare = __toESM(require_compare(), 1);
11821
11836
  var import_valid = __toESM(require_valid(), 1);
11822
11837
  import path8 from "node:path";
11823
- import { z as z26 } from "zod";
11838
+ import { z as z27 } from "zod";
11824
11839
  var CLI_PROBE_TIMEOUT_MS = 5e3;
11825
11840
  var INSTALLATION_CHECK_TIMEOUT_MS = 15e3;
11826
11841
  async function resolveExecutablePath(command) {
@@ -11897,8 +11912,8 @@ function firstLine(value) {
11897
11912
  function npmGlobalPackageVersion(value, npmPackage) {
11898
11913
  if (value === null) return null;
11899
11914
  try {
11900
- const parsed = z26.object({
11901
- dependencies: z26.record(z26.string(), z26.object({ version: z26.string().min(1) })).default({})
11915
+ const parsed = z27.object({
11916
+ dependencies: z27.record(z27.string(), z27.object({ version: z27.string().min(1) })).default({})
11902
11917
  }).safeParse(JSON.parse(value));
11903
11918
  return parsed.success ? parsed.data.dependencies[npmPackage]?.version ?? null : null;
11904
11919
  } catch {
@@ -11949,9 +11964,9 @@ function clampPercent(value) {
11949
11964
  }
11950
11965
 
11951
11966
  // ../provider-bridge-protocol/src/bridge-kit/provider-tool-call-contract.ts
11952
- import { z as z27 } from "zod";
11953
- var providerToolCallCancellationSchema = z27.object({
11954
- requestId: z27.union([z27.string(), z27.number().int()])
11967
+ import { z as z28 } from "zod";
11968
+ var providerToolCallCancellationSchema = z28.object({
11969
+ requestId: z28.union([z28.string(), z28.number().int()])
11955
11970
  });
11956
11971
 
11957
11972
  // ../provider-bridge-protocol/src/bridge-kit/provider-visibility.ts
@@ -11966,10 +11981,10 @@ function createProviderVisibilityMetadata(args) {
11966
11981
  }
11967
11982
 
11968
11983
  // ../provider-bridge-protocol/src/bridge-kit/runtime-json-rpc.ts
11969
- import { z as z29 } from "zod";
11984
+ import { z as z30 } from "zod";
11970
11985
 
11971
11986
  // ../provider-bridge-protocol/src/errors.ts
11972
- import { z as z28 } from "zod";
11987
+ import { z as z29 } from "zod";
11973
11988
  var BRIDGE_JSON_RPC_ERRORS = {
11974
11989
  INVALID_PARAMS: -32602,
11975
11990
  METHOD_NOT_FOUND: -32601,
@@ -11979,12 +11994,12 @@ var BRIDGE_JSON_RPC_ERRORS = {
11979
11994
  FORK_CHECKPOINT_UNSUPPORTED: -32003,
11980
11995
  MISSING_EXECUTABLE: -32004
11981
11996
  };
11982
- var providerRecoveryHintSchema = z28.object({
11997
+ var providerRecoveryHintSchema = z29.object({
11983
11998
  kind: providerRecoveryKindSchema,
11984
- message: z28.string().min(1),
11985
- retryable: z28.boolean()
11999
+ message: z29.string().min(1),
12000
+ retryable: z29.boolean()
11986
12001
  });
11987
- var bridgeErrorDataSchema = z28.object({ recovery: providerRecoveryHintSchema.optional() }).passthrough();
12002
+ var bridgeErrorDataSchema = z29.object({ recovery: providerRecoveryHintSchema.optional() }).passthrough();
11988
12003
 
11989
12004
  // ../provider-bridge-protocol/src/bridge-kit/runtime-json-rpc.ts
11990
12005
  var JSON_RPC_INVALID_PARAMS_CODE = -32602;
@@ -12002,7 +12017,7 @@ var ProviderResponseEncodeError = class extends Error {
12002
12017
  this.name = "ProviderResponseEncodeError";
12003
12018
  }
12004
12019
  };
12005
- var ignoredJsonRpcResultSchema = z29.unknown();
12020
+ var ignoredJsonRpcResultSchema = z30.unknown();
12006
12021
 
12007
12022
  // ../provider-bridge-protocol/src/version.ts
12008
12023
  var PROVIDER_BRIDGE_PROTOCOL_VERSION = 2;
@@ -12010,69 +12025,69 @@ var THREAD_DELTA_GRAMMAR_V2 = PROVIDER_BRIDGE_PROTOCOL_VERSION;
12010
12025
  var THREAD_DELTA_GRAMMAR_V3 = 3;
12011
12026
 
12012
12027
  // ../provider-bridge-protocol/src/handshake.ts
12013
- import { z as z30 } from "zod";
12014
- var bridgeGrammarVersionsSchema = z30.tuple([z30.number().int().positive(), z30.number().int().positive()]).refine(([min, max]) => min <= max, {
12028
+ import { z as z31 } from "zod";
12029
+ var bridgeGrammarVersionsSchema = z31.tuple([z31.number().int().positive(), z31.number().int().positive()]).refine(([min, max]) => min <= max, {
12015
12030
  message: "grammarVersions must be an ascending [min, max] range"
12016
12031
  });
12017
- var bridgeSteerModeSchema = z30.enum(["inject", "queue"]);
12018
- var bridgeCapabilitiesSchema = z30.object({
12019
- sessionRestore: z30.boolean().default(false),
12020
- threadArchive: z30.boolean().default(false),
12021
- threadRename: z30.boolean().default(false),
12022
- threadGoalClear: z30.boolean().default(false),
12032
+ var bridgeSteerModeSchema = z31.enum(["inject", "queue"]);
12033
+ var bridgeCapabilitiesSchema = z31.object({
12034
+ sessionRestore: z31.boolean().default(false),
12035
+ threadArchive: z31.boolean().default(false),
12036
+ threadRename: z31.boolean().default(false),
12037
+ threadGoalClear: z31.boolean().default(false),
12023
12038
  fork: providerForkSchema.default("none"),
12024
- approvalEnforcedBy: z30.enum(["runtime", "provider"]).default("runtime"),
12039
+ approvalEnforcedBy: z31.enum(["runtime", "provider"]).default("runtime"),
12025
12040
  grammarVersions: bridgeGrammarVersionsSchema.default([
12026
12041
  PROVIDER_BRIDGE_PROTOCOL_VERSION,
12027
12042
  PROVIDER_BRIDGE_PROTOCOL_VERSION
12028
12043
  ]),
12029
12044
  steerMode: bridgeSteerModeSchema.default("queue"),
12030
- skills: z30.object({ configure: z30.boolean().default(false) }).default({ configure: false }),
12031
- commands: z30.object({ list: z30.boolean().default(false) }).default({ list: false })
12045
+ skills: z31.object({ configure: z31.boolean().default(false) }).default({ configure: false }),
12046
+ commands: z31.object({ list: z31.boolean().default(false) }).default({ list: false })
12032
12047
  }).passthrough();
12033
- var initializeParamsSchema = z30.object({
12034
- protocolVersion: z30.number().int().positive(),
12035
- client: z30.object({ name: z30.string().min(1), version: z30.string().min(1) }),
12048
+ var initializeParamsSchema = z31.object({
12049
+ protocolVersion: z31.number().int().positive(),
12050
+ client: z31.object({ name: z31.string().min(1), version: z31.string().min(1) }),
12036
12051
  grammarVersions: bridgeGrammarVersionsSchema.default([
12037
12052
  PROVIDER_BRIDGE_PROTOCOL_VERSION,
12038
12053
  PROVIDER_BRIDGE_PROTOCOL_VERSION
12039
12054
  ])
12040
12055
  }).passthrough();
12041
- var initializeResultSchema = z30.object({
12042
- protocolVersion: z30.number().int().positive(),
12043
- capabilities: z30.preprocess(
12056
+ var initializeResultSchema = z31.object({
12057
+ protocolVersion: z31.number().int().positive(),
12058
+ capabilities: z31.preprocess(
12044
12059
  (value) => value ?? {},
12045
12060
  bridgeCapabilitiesSchema
12046
12061
  )
12047
12062
  }).passthrough();
12048
12063
 
12049
12064
  // ../provider-bridge-protocol/src/execution-options.ts
12050
- import { z as z31 } from "zod";
12051
- var bridgeExecutionOptionsSchema = z31.object({
12052
- model: z31.string().min(1).optional(),
12065
+ import { z as z32 } from "zod";
12066
+ var bridgeExecutionOptionsSchema = z32.object({
12067
+ model: z32.string().min(1).optional(),
12053
12068
  serviceTier: serviceTierSchema.optional(),
12054
12069
  reasoningLevel: reasoningLevelSchema.optional(),
12055
12070
  promptMode: promptModeSchema.optional(),
12056
12071
  sessionOptions: sessionOptionSelectionsSchema.optional(),
12057
- instructions: z31.string().optional(),
12058
- envVars: z31.record(z31.string(), z31.string()).optional(),
12059
- providerOptions: z31.record(z31.string(), z31.unknown()).optional()
12072
+ instructions: z32.string().optional(),
12073
+ envVars: z32.record(z32.string(), z32.string()).optional(),
12074
+ providerOptions: z32.record(z32.string(), z32.unknown()).optional()
12060
12075
  }).and(runtimePermissionPolicySchema);
12061
12076
 
12062
12077
  // ../provider-bridge-protocol/src/provider-maintenance.ts
12063
- import { z as z32 } from "zod";
12064
- var providerMaintenanceParamsSchema = z32.object({
12065
- providerId: z32.string().min(1),
12066
- cwd: z32.string().min(1).optional(),
12067
- providerOptions: z32.record(z32.string(), z32.unknown()).optional()
12078
+ import { z as z33 } from "zod";
12079
+ var providerMaintenanceParamsSchema = z33.object({
12080
+ providerId: z33.string().min(1),
12081
+ cwd: z33.string().min(1).optional(),
12082
+ providerOptions: z33.record(z33.string(), z33.unknown()).optional()
12068
12083
  }).passthrough();
12069
- var providerInstallationRequirementSchema = z32.enum(["thread_rewind"]);
12084
+ var providerInstallationRequirementSchema = z33.enum(["thread_rewind"]);
12070
12085
  var providerInstallationStatusParamsSchema = providerMaintenanceParamsSchema.extend({
12071
12086
  requirement: providerInstallationRequirementSchema.optional(),
12072
- checkUpdates: z32.boolean().default(true)
12087
+ checkUpdates: z33.boolean().default(true)
12073
12088
  });
12074
- var providerHealthSchema = z32.object({
12075
- status: z32.enum([
12089
+ var providerHealthSchema = z33.object({
12090
+ status: z33.enum([
12076
12091
  "ready",
12077
12092
  "not_installed",
12078
12093
  "unauthenticated",
@@ -12080,115 +12095,115 @@ var providerHealthSchema = z32.object({
12080
12095
  "unsupported_version",
12081
12096
  "unknown"
12082
12097
  ]),
12083
- statusMessage: z32.string().min(1).nullable(),
12084
- accountEmail: z32.string().nullable(),
12085
- planLabel: z32.string().min(1).nullable(),
12086
- installedVersion: z32.string().min(1).nullable(),
12087
- minimumSupportedVersion: z32.string().min(1).nullable(),
12088
- canInstall: z32.boolean(),
12089
- canUpdate: z32.boolean(),
12090
- loginCommand: z32.string().min(1).nullable(),
12091
- localLoginCommand: z32.string().min(1).nullable().optional()
12098
+ statusMessage: z33.string().min(1).nullable(),
12099
+ accountEmail: z33.string().nullable(),
12100
+ planLabel: z33.string().min(1).nullable(),
12101
+ installedVersion: z33.string().min(1).nullable(),
12102
+ minimumSupportedVersion: z33.string().min(1).nullable(),
12103
+ canInstall: z33.boolean(),
12104
+ canUpdate: z33.boolean(),
12105
+ loginCommand: z33.string().min(1).nullable(),
12106
+ localLoginCommand: z33.string().min(1).nullable().optional()
12092
12107
  }).passthrough();
12093
- var providerUsageWindowSchema = z32.object({
12094
- label: z32.string().min(1),
12095
- usedPercent: z32.number().min(0).max(100),
12096
- resetsAt: z32.string().min(1).nullable(),
12097
- cost: z32.object({
12098
- usedUsdCents: z32.number().int().nonnegative(),
12099
- limitUsdCents: z32.number().int().positive()
12108
+ var providerUsageWindowSchema = z33.object({
12109
+ label: z33.string().min(1),
12110
+ usedPercent: z33.number().min(0).max(100),
12111
+ resetsAt: z33.string().min(1).nullable(),
12112
+ cost: z33.object({
12113
+ usedUsdCents: z33.number().int().nonnegative(),
12114
+ limitUsdCents: z33.number().int().positive()
12100
12115
  }).optional()
12101
12116
  }).passthrough();
12102
- var providerUsageSchema = z32.discriminatedUnion("status", [
12103
- z32.object({
12104
- status: z32.literal("ok"),
12105
- accountEmail: z32.string().email().nullable(),
12106
- planLabel: z32.string().min(1).nullable(),
12107
- windows: z32.array(providerUsageWindowSchema)
12117
+ var providerUsageSchema = z33.discriminatedUnion("status", [
12118
+ z33.object({
12119
+ status: z33.literal("ok"),
12120
+ accountEmail: z33.string().email().nullable(),
12121
+ planLabel: z33.string().min(1).nullable(),
12122
+ windows: z33.array(providerUsageWindowSchema)
12108
12123
  }).passthrough(),
12109
- z32.object({ status: z32.literal("not_installed") }).passthrough(),
12110
- z32.object({ status: z32.literal("unauthenticated") }).passthrough(),
12111
- z32.object({ status: z32.literal("expired") }).passthrough(),
12112
- z32.object({
12113
- status: z32.literal("error"),
12114
- message: z32.string().min(1),
12115
- planLabel: z32.string().min(1).nullable().default(null),
12116
- accountEmail: z32.string().nullable().default(null)
12124
+ z33.object({ status: z33.literal("not_installed") }).passthrough(),
12125
+ z33.object({ status: z33.literal("unauthenticated") }).passthrough(),
12126
+ z33.object({ status: z33.literal("expired") }).passthrough(),
12127
+ z33.object({
12128
+ status: z33.literal("error"),
12129
+ message: z33.string().min(1),
12130
+ planLabel: z33.string().min(1).nullable().default(null),
12131
+ accountEmail: z33.string().nullable().default(null)
12117
12132
  }).passthrough()
12118
12133
  ]);
12119
- var providerHealthResultSchema = z32.discriminatedUnion("supported", [
12120
- z32.object({ supported: z32.literal(false) }).passthrough(),
12121
- z32.object({
12122
- supported: z32.literal(true),
12134
+ var providerHealthResultSchema = z33.discriminatedUnion("supported", [
12135
+ z33.object({ supported: z33.literal(false) }).passthrough(),
12136
+ z33.object({
12137
+ supported: z33.literal(true),
12123
12138
  health: providerHealthSchema
12124
12139
  }).passthrough()
12125
12140
  ]);
12126
- var providerUsageResultSchema = z32.discriminatedUnion("supported", [
12127
- z32.object({ supported: z32.literal(false) }).passthrough(),
12128
- z32.object({
12129
- supported: z32.literal(true),
12141
+ var providerUsageResultSchema = z33.discriminatedUnion("supported", [
12142
+ z33.object({ supported: z33.literal(false) }).passthrough(),
12143
+ z33.object({
12144
+ supported: z33.literal(true),
12130
12145
  usage: providerUsageSchema
12131
12146
  }).passthrough()
12132
12147
  ]);
12133
- var providerInstallationActionKindSchema = z32.enum([
12148
+ var providerInstallationActionKindSchema = z33.enum([
12134
12149
  "install",
12135
12150
  "update"
12136
12151
  ]);
12137
- var providerInstallationActionSchema = z32.object({
12152
+ var providerInstallationActionSchema = z33.object({
12138
12153
  kind: providerInstallationActionKindSchema,
12139
- label: z32.enum(["Install", "Update"]),
12140
- command: z32.string().min(1)
12154
+ label: z33.enum(["Install", "Update"]),
12155
+ command: z33.string().min(1)
12141
12156
  }).passthrough();
12142
- var providerInstallationSourceSchema = z32.enum([
12157
+ var providerInstallationSourceSchema = z33.enum([
12143
12158
  "notInstalled",
12144
12159
  "npmGlobal",
12145
12160
  "external"
12146
12161
  ]);
12147
- var providerInstallationStatusSchema = z32.object({
12148
- executableName: z32.string().min(1),
12149
- executablePath: z32.string().min(1).nullable(),
12150
- installed: z32.boolean(),
12162
+ var providerInstallationStatusSchema = z33.object({
12163
+ executableName: z33.string().min(1),
12164
+ executablePath: z33.string().min(1).nullable(),
12165
+ installed: z33.boolean(),
12151
12166
  installSource: providerInstallationSourceSchema,
12152
- currentVersion: z32.string().min(1).nullable(),
12153
- latestVersion: z32.string().min(1).nullable(),
12154
- minimumSupportedVersion: z32.string().min(1).nullable(),
12155
- npmPackageName: z32.string().min(1).nullable(),
12156
- npmGlobalPackageVersion: z32.string().min(1).nullable(),
12167
+ currentVersion: z33.string().min(1).nullable(),
12168
+ latestVersion: z33.string().min(1).nullable(),
12169
+ minimumSupportedVersion: z33.string().min(1).nullable(),
12170
+ npmPackageName: z33.string().min(1).nullable(),
12171
+ npmGlobalPackageVersion: z33.string().min(1).nullable(),
12157
12172
  installAction: providerInstallationActionSchema.nullable(),
12158
- needsUpdate: z32.boolean(),
12159
- versionUnsupported: z32.boolean()
12173
+ needsUpdate: z33.boolean(),
12174
+ versionUnsupported: z33.boolean()
12160
12175
  }).passthrough();
12161
12176
  var providerInstallationRunParamsSchema = providerMaintenanceParamsSchema.extend({
12162
12177
  action: providerInstallationActionKindSchema
12163
12178
  });
12164
- var providerInstallationCommandSchema = z32.object({
12165
- command: z32.string().min(1),
12166
- args: z32.array(z32.string()).max(64),
12167
- displayCommand: z32.string().min(1)
12179
+ var providerInstallationCommandSchema = z33.object({
12180
+ command: z33.string().min(1),
12181
+ args: z33.array(z33.string()).max(64),
12182
+ displayCommand: z33.string().min(1)
12168
12183
  }).passthrough();
12169
- var providerInstallationVerificationSchema = z32.discriminatedUnion(
12184
+ var providerInstallationVerificationSchema = z33.discriminatedUnion(
12170
12185
  "kind",
12171
12186
  [
12172
- z32.object({ kind: z32.literal("installed") }).passthrough(),
12173
- z32.object({
12174
- kind: z32.literal("version_changed"),
12175
- previousVersion: z32.string().min(1)
12187
+ z33.object({ kind: z33.literal("installed") }).passthrough(),
12188
+ z33.object({
12189
+ kind: z33.literal("version_changed"),
12190
+ previousVersion: z33.string().min(1)
12176
12191
  }).passthrough(),
12177
- z32.object({
12178
- kind: z32.literal("version_at_least"),
12179
- version: z32.string().min(1)
12192
+ z33.object({
12193
+ kind: z33.literal("version_at_least"),
12194
+ version: z33.string().min(1)
12180
12195
  }).passthrough()
12181
12196
  ]
12182
12197
  );
12183
- var providerInstallationRunResultSchema = z32.discriminatedUnion(
12198
+ var providerInstallationRunResultSchema = z33.discriminatedUnion(
12184
12199
  "available",
12185
12200
  [
12186
- z32.object({
12187
- available: z32.literal(false),
12188
- message: z32.string().min(1)
12201
+ z33.object({
12202
+ available: z33.literal(false),
12203
+ message: z33.string().min(1)
12189
12204
  }).passthrough(),
12190
- z32.object({
12191
- available: z32.literal(true),
12205
+ z33.object({
12206
+ available: z33.literal(true),
12192
12207
  command: providerInstallationCommandSchema,
12193
12208
  verification: providerInstallationVerificationSchema
12194
12209
  }).passthrough()
@@ -12196,7 +12211,7 @@ var providerInstallationRunResultSchema = z32.discriminatedUnion(
12196
12211
  );
12197
12212
 
12198
12213
  // ../provider-bridge-protocol/src/requests.ts
12199
- import { z as z33 } from "zod";
12214
+ import { z as z34 } from "zod";
12200
12215
  var BRIDGE_REQUEST_METHODS = {
12201
12216
  initialize: "initialize",
12202
12217
  modelList: "model/list",
@@ -12219,83 +12234,84 @@ var BRIDGE_REQUEST_METHODS = {
12219
12234
  skillsConfigure: "skills/configure"
12220
12235
  };
12221
12236
  var sessionConstructionFields = {
12222
- threadId: z33.string().min(1),
12223
- cwd: z33.string().min(1),
12237
+ threadId: z34.string().min(1),
12238
+ cwd: z34.string().min(1),
12224
12239
  options: bridgeExecutionOptionsSchema,
12225
- dynamicTools: z33.array(dynamicToolSchema).optional(),
12226
- disallowedTools: z33.array(z33.string().min(1)).optional(),
12240
+ dynamicTools: z34.array(dynamicToolSchema).optional(),
12241
+ disallowedTools: z34.array(z34.string().min(1)).optional(),
12227
12242
  instructionMode: instructionModeSchema
12228
12243
  };
12229
- var modelListParamsSchema = z33.object({
12230
- cwd: z33.string().min(1).optional(),
12231
- envVars: z33.record(z33.string(), z33.string()).optional()
12244
+ var modelListParamsSchema = z34.object({
12245
+ cwd: z34.string().min(1).optional(),
12246
+ envVars: z34.record(z34.string(), z34.string()).optional(),
12247
+ selectedModel: z34.string().min(1).optional()
12232
12248
  }).passthrough();
12233
- var commandListParamsSchema = z33.object({ cwd: z33.string().min(1) }).passthrough();
12249
+ var commandListParamsSchema = z34.object({ cwd: z34.string().min(1) }).passthrough();
12234
12250
  var commandListResultSchema = threadProviderCommandsStateSchema;
12235
- var threadStartParamsSchema = z33.object({
12251
+ var threadStartParamsSchema = z34.object({
12236
12252
  ...sessionConstructionFields,
12237
- input: z33.array(promptInputSchema).optional()
12253
+ input: z34.array(promptInputSchema).optional()
12238
12254
  }).passthrough();
12239
- var threadResumeParamsSchema = z33.object({
12255
+ var threadResumeParamsSchema = z34.object({
12240
12256
  ...sessionConstructionFields,
12241
- providerThreadId: z33.string().min(1)
12257
+ providerThreadId: z34.string().min(1)
12242
12258
  }).passthrough();
12243
- var threadForkParamsSchema = z33.object({
12259
+ var threadForkParamsSchema = z34.object({
12244
12260
  ...sessionConstructionFields,
12245
- sourceProviderThreadId: z33.string().min(1),
12246
- sourceProviderCheckpointId: z33.string().min(1).optional()
12261
+ sourceProviderThreadId: z34.string().min(1),
12262
+ sourceProviderCheckpointId: z34.string().min(1).optional()
12247
12263
  }).passthrough();
12248
- var threadStopParamsSchema = z33.object({
12249
- threadId: z33.string().min(1),
12250
- providerThreadId: z33.string().min(1),
12251
- intent: z33.enum(["interrupt", "release"]),
12252
- activeTurnId: z33.string().min(1).nullable()
12264
+ var threadStopParamsSchema = z34.object({
12265
+ threadId: z34.string().min(1),
12266
+ providerThreadId: z34.string().min(1),
12267
+ intent: z34.enum(["interrupt", "release"]),
12268
+ activeTurnId: z34.string().min(1).nullable()
12253
12269
  }).passthrough();
12254
- var threadRefParams = z33.object({
12255
- threadId: z33.string().min(1),
12256
- providerThreadId: z33.string().min(1)
12270
+ var threadRefParams = z34.object({
12271
+ threadId: z34.string().min(1),
12272
+ providerThreadId: z34.string().min(1)
12257
12273
  }).passthrough();
12258
12274
  var threadDiscardParamsSchema = threadRefParams;
12259
12275
  var threadArchiveParamsSchema = threadRefParams;
12260
12276
  var threadUnarchiveParamsSchema = threadRefParams;
12261
12277
  var threadGoalClearParamsSchema = threadRefParams;
12262
- var threadNameSetParamsSchema = z33.object({
12263
- threadId: z33.string().min(1),
12264
- providerThreadId: z33.string().min(1),
12265
- title: z33.string().min(1)
12278
+ var threadNameSetParamsSchema = z34.object({
12279
+ threadId: z34.string().min(1),
12280
+ providerThreadId: z34.string().min(1),
12281
+ title: z34.string().min(1)
12266
12282
  }).passthrough();
12267
12283
  var turnInputFields = {
12268
- threadId: z33.string().min(1),
12269
- providerThreadId: z33.string().min(1),
12270
- input: z33.array(promptInputSchema),
12284
+ threadId: z34.string().min(1),
12285
+ providerThreadId: z34.string().min(1),
12286
+ input: z34.array(promptInputSchema),
12271
12287
  clientRequestId: clientTurnRequestIdSchema,
12272
12288
  options: bridgeExecutionOptionsSchema
12273
12289
  };
12274
- var turnStartParamsSchema = z33.object(turnInputFields).passthrough();
12275
- var turnSteerParamsSchema = z33.object({
12290
+ var turnStartParamsSchema = z34.object(turnInputFields).passthrough();
12291
+ var turnSteerParamsSchema = z34.object({
12276
12292
  ...turnInputFields,
12277
- expectedTurnId: z33.string().min(1)
12293
+ expectedTurnId: z34.string().min(1)
12278
12294
  }).passthrough();
12279
- var skillsConfigureRootSchema = z33.object({
12280
- id: z33.string().min(1),
12281
- path: z33.string().min(1),
12282
- skills: z33.array(
12283
- z33.object({
12284
- name: z33.string().min(1),
12285
- description: z33.string()
12295
+ var skillsConfigureRootSchema = z34.object({
12296
+ id: z34.string().min(1),
12297
+ path: z34.string().min(1),
12298
+ skills: z34.array(
12299
+ z34.object({
12300
+ name: z34.string().min(1),
12301
+ description: z34.string()
12286
12302
  }).passthrough()
12287
12303
  )
12288
12304
  }).passthrough();
12289
- var skillsConfigureParamsSchema = z33.object({
12290
- roots: z33.array(skillsConfigureRootSchema)
12305
+ var skillsConfigureParamsSchema = z34.object({
12306
+ roots: z34.array(skillsConfigureRootSchema)
12291
12307
  }).passthrough();
12292
- var threadIdentityResultSchema = z33.object({
12293
- providerThreadId: z33.string().min(1),
12294
- sessionRestorable: z33.boolean().optional()
12308
+ var threadIdentityResultSchema = z34.object({
12309
+ providerThreadId: z34.string().min(1),
12310
+ sessionRestorable: z34.boolean().optional()
12295
12311
  }).passthrough();
12296
12312
 
12297
12313
  // ../provider-bridge-protocol/src/notifications.ts
12298
- import { z as z34 } from "zod";
12314
+ import { z as z35 } from "zod";
12299
12315
  var BRIDGE_NOTIFICATION_METHODS = {
12300
12316
  threadIdentity: "thread/identity",
12301
12317
  sessionReplaced: "session/replaced",
@@ -12303,143 +12319,143 @@ var BRIDGE_NOTIFICATION_METHODS = {
12303
12319
  providerRecovery: "provider/recovery",
12304
12320
  error: "error"
12305
12321
  };
12306
- var threadIdentityNotificationSchema = z34.object({
12307
- threadId: z34.string().min(1),
12308
- providerThreadId: z34.string().min(1),
12309
- sessionRestorable: z34.boolean().optional()
12322
+ var threadIdentityNotificationSchema = z35.object({
12323
+ threadId: z35.string().min(1),
12324
+ providerThreadId: z35.string().min(1),
12325
+ sessionRestorable: z35.boolean().optional()
12310
12326
  }).passthrough();
12311
- var sessionReplacedNotificationSchema = z34.object({
12312
- threadId: z34.string().min(1),
12313
- providerThreadId: z34.string().min(1).nullable(),
12314
- reason: z34.string().min(1),
12315
- contextLost: z34.boolean().default(false),
12316
- showRuntimeNote: z34.boolean().default(false)
12327
+ var sessionReplacedNotificationSchema = z35.object({
12328
+ threadId: z35.string().min(1),
12329
+ providerThreadId: z35.string().min(1).nullable(),
12330
+ reason: z35.string().min(1),
12331
+ contextLost: z35.boolean().default(false),
12332
+ showRuntimeNote: z35.boolean().default(false)
12317
12333
  }).passthrough();
12318
- var providerRecoveryNotificationSchema = z34.object({
12319
- threadId: z34.string().min(1).optional(),
12334
+ var providerRecoveryNotificationSchema = z35.object({
12335
+ threadId: z35.string().min(1).optional(),
12320
12336
  ...providerRecoveryHintSchema.shape
12321
12337
  }).passthrough();
12322
- var errorNotificationSchema = z34.object({
12323
- threadId: z34.string().min(1).optional(),
12324
- providerThreadId: z34.string().min(1).optional(),
12325
- message: z34.string().min(1)
12338
+ var errorNotificationSchema = z35.object({
12339
+ threadId: z35.string().min(1).optional(),
12340
+ providerThreadId: z35.string().min(1).optional(),
12341
+ message: z35.string().min(1)
12326
12342
  }).passthrough();
12327
12343
 
12328
12344
  // ../provider-bridge-protocol/src/thread-delta.ts
12329
- import { z as z35 } from "zod";
12345
+ import { z as z36 } from "zod";
12330
12346
  var THREAD_DELTA_NOTIFICATION_METHOD = "thread/delta";
12331
12347
  var deltaPresentationSchema = threadEventItemPresentationSchema;
12332
12348
  var THREAD_DELTA_KEY_SEPARATOR = "";
12333
- var deltaKeyPartSchema = z35.string().min(1).refine((value) => !value.includes(THREAD_DELTA_KEY_SEPARATOR), {
12349
+ var deltaKeyPartSchema = z36.string().min(1).refine((value) => !value.includes(THREAD_DELTA_KEY_SEPARATOR), {
12334
12350
  message: "provider keys must not contain the internal key separator (\\u001f)"
12335
12351
  });
12336
- var deltaItemKeySchema = z35.object({
12352
+ var deltaItemKeySchema = z36.object({
12337
12353
  providerItemId: deltaKeyPartSchema.optional(),
12338
12354
  channel: deltaKeyPartSchema.optional(),
12339
12355
  parentRef: deltaKeyPartSchema.optional()
12340
12356
  });
12341
12357
  var providerTurnIdSchema = deltaKeyPartSchema;
12342
- var deltaFileChangeSchema = z35.object({
12343
- path: z35.string(),
12344
- kind: z35.enum(["add", "update", "delete"]),
12345
- movePath: z35.string().optional(),
12346
- diff: z35.string().optional(),
12347
- oldText: z35.string().optional(),
12348
- newText: z35.string().optional()
12349
- });
12350
- var deltaBackgroundTaskShapeSchema = z35.object({
12351
- type: z35.literal("backgroundTask"),
12352
- familyId: z35.string().min(1),
12353
- taskType: z35.string(),
12354
- description: z35.string(),
12358
+ var deltaFileChangeSchema = z36.object({
12359
+ path: z36.string(),
12360
+ kind: z36.enum(["add", "update", "delete"]),
12361
+ movePath: z36.string().optional(),
12362
+ diff: z36.string().optional(),
12363
+ oldText: z36.string().optional(),
12364
+ newText: z36.string().optional()
12365
+ });
12366
+ var deltaBackgroundTaskShapeSchema = z36.object({
12367
+ type: z36.literal("backgroundTask"),
12368
+ familyId: z36.string().min(1),
12369
+ taskType: z36.string(),
12370
+ description: z36.string(),
12355
12371
  status: threadEventItemStatusSchema,
12356
12372
  taskStatus: backgroundTaskStatusSchema,
12357
- skipTranscript: z35.boolean(),
12358
- foreground: z35.boolean().optional(),
12359
- workflowName: z35.string().optional(),
12373
+ skipTranscript: z36.boolean(),
12374
+ foreground: z36.boolean().optional(),
12375
+ workflowName: z36.string().optional(),
12360
12376
  workflow: workflowProgressSnapshotSchema.optional(),
12361
12377
  usage: backgroundTaskUsageSchema.optional(),
12362
- summary: z35.string().optional(),
12363
- error: z35.string().optional(),
12364
- outputFile: z35.string().optional()
12378
+ summary: z36.string().optional(),
12379
+ error: z36.string().optional(),
12380
+ outputFile: z36.string().optional()
12365
12381
  });
12366
- var deltaFileReadShapeSchema = z35.object({
12367
- type: z35.literal("fileRead"),
12368
- path: z35.string(),
12369
- cmd: z35.string().optional()
12382
+ var deltaFileReadShapeSchema = z36.object({
12383
+ type: z36.literal("fileRead"),
12384
+ path: z36.string(),
12385
+ cmd: z36.string().optional()
12370
12386
  });
12371
- var deltaSearchShapeSchema = z35.object({
12372
- type: z35.literal("search"),
12387
+ var deltaSearchShapeSchema = z36.object({
12388
+ type: z36.literal("search"),
12373
12389
  mode: threadEventSearchModeSchema,
12374
- query: z35.string(),
12375
- path: z35.string().optional(),
12376
- cmd: z35.string().optional()
12390
+ query: z36.string(),
12391
+ path: z36.string().optional(),
12392
+ cmd: z36.string().optional()
12377
12393
  });
12378
- var deltaDelegationShapeSchema = z35.object({
12379
- type: z35.literal("delegation"),
12394
+ var deltaDelegationShapeSchema = z36.object({
12395
+ type: z36.literal("delegation"),
12380
12396
  childRef: deltaKeyPartSchema,
12381
- label: z35.string(),
12382
- background: z35.boolean(),
12383
- summary: z35.string().optional()
12397
+ label: z36.string(),
12398
+ background: z36.boolean(),
12399
+ summary: z36.string().optional()
12384
12400
  });
12385
- var deltaPlanStepsShapeSchema = z35.object({
12386
- type: z35.literal("planSteps"),
12387
- steps: z35.array(threadEventPlanStepSchema),
12388
- explanation: z35.string().optional()
12401
+ var deltaPlanStepsShapeSchema = z36.object({
12402
+ type: z36.literal("planSteps"),
12403
+ steps: z36.array(threadEventPlanStepSchema),
12404
+ explanation: z36.string().optional()
12389
12405
  });
12390
- var deltaExtensionShapeSchema = z35.object({
12391
- type: z35.literal("extension"),
12406
+ var deltaExtensionShapeSchema = z36.object({
12407
+ type: z36.literal("extension"),
12392
12408
  kind: extensionKindSchema,
12393
12409
  payload: jsonValueSchema
12394
12410
  });
12395
- var deltaItemShapeSchema = z35.discriminatedUnion("type", [
12396
- z35.object({
12397
- type: z35.literal("command"),
12398
- command: z35.string(),
12399
- cwd: z35.string(),
12400
- aggregatedOutput: z35.string().optional(),
12401
- exitCode: z35.number().optional(),
12402
- durationMs: z35.number().optional()
12411
+ var deltaItemShapeSchema = z36.discriminatedUnion("type", [
12412
+ z36.object({
12413
+ type: z36.literal("command"),
12414
+ command: z36.string(),
12415
+ cwd: z36.string(),
12416
+ aggregatedOutput: z36.string().optional(),
12417
+ exitCode: z36.number().optional(),
12418
+ durationMs: z36.number().optional()
12403
12419
  }),
12404
- z35.object({
12405
- type: z35.literal("fileChange"),
12406
- changes: z35.array(deltaFileChangeSchema)
12420
+ z36.object({
12421
+ type: z36.literal("fileChange"),
12422
+ changes: z36.array(deltaFileChangeSchema)
12407
12423
  }),
12408
- z35.object({
12409
- type: z35.literal("tool"),
12410
- tool: z35.string(),
12411
- server: z35.string().optional(),
12412
- args: z35.unknown().optional(),
12413
- result: z35.unknown().optional(),
12414
- error: z35.string().optional(),
12415
- durationMs: z35.number().optional()
12424
+ z36.object({
12425
+ type: z36.literal("tool"),
12426
+ tool: z36.string(),
12427
+ server: z36.string().optional(),
12428
+ args: z36.unknown().optional(),
12429
+ result: z36.unknown().optional(),
12430
+ error: z36.string().optional(),
12431
+ durationMs: z36.number().optional()
12416
12432
  }),
12417
- z35.object({ type: z35.literal("compaction") }),
12418
- z35.object({ type: z35.literal("agentMessage"), text: z35.string() }),
12419
- z35.object({
12420
- type: z35.literal("reasoning"),
12421
- summary: z35.array(z35.string()),
12422
- content: z35.array(z35.string())
12433
+ z36.object({ type: z36.literal("compaction") }),
12434
+ z36.object({ type: z36.literal("agentMessage"), text: z36.string() }),
12435
+ z36.object({
12436
+ type: z36.literal("reasoning"),
12437
+ summary: z36.array(z36.string()),
12438
+ content: z36.array(z36.string())
12423
12439
  }),
12424
- z35.object({ type: z35.literal("plan"), text: z35.string() }),
12425
- z35.object({
12426
- type: z35.literal("webSearch"),
12427
- queries: z35.array(z35.string()).min(1)
12440
+ z36.object({ type: z36.literal("plan"), text: z36.string() }),
12441
+ z36.object({
12442
+ type: z36.literal("webSearch"),
12443
+ queries: z36.array(z36.string()).min(1)
12428
12444
  }),
12429
- z35.object({
12430
- type: z35.literal("webFetch"),
12431
- url: z35.string(),
12432
- prompt: z35.string().nullable().optional(),
12433
- pattern: z35.string().nullable()
12445
+ z36.object({
12446
+ type: z36.literal("webFetch"),
12447
+ url: z36.string(),
12448
+ prompt: z36.string().nullable().optional(),
12449
+ pattern: z36.string().nullable()
12434
12450
  }),
12435
- z35.object({ type: z35.literal("imageView"), path: z35.string() }),
12436
- z35.object({
12437
- type: z35.literal("imageGeneration"),
12438
- prompt: z35.string().nullable(),
12439
- path: z35.string().nullable(),
12440
- result: z35.string().optional(),
12441
- error: z35.string().nullable(),
12442
- transparentBackground: z35.boolean()
12451
+ z36.object({ type: z36.literal("imageView"), path: z36.string() }),
12452
+ z36.object({
12453
+ type: z36.literal("imageGeneration"),
12454
+ prompt: z36.string().nullable(),
12455
+ path: z36.string().nullable(),
12456
+ result: z36.string().optional(),
12457
+ error: z36.string().nullable(),
12458
+ transparentBackground: z36.boolean()
12443
12459
  }),
12444
12460
  deltaBackgroundTaskShapeSchema,
12445
12461
  deltaFileReadShapeSchema,
@@ -12448,22 +12464,22 @@ var deltaItemShapeSchema = z35.discriminatedUnion("type", [
12448
12464
  deltaPlanStepsShapeSchema,
12449
12465
  deltaExtensionShapeSchema
12450
12466
  ]);
12451
- var deltaProgressSnapshotSchema = z35.discriminatedUnion("type", [
12467
+ var deltaProgressSnapshotSchema = z36.discriminatedUnion("type", [
12452
12468
  deltaBackgroundTaskShapeSchema,
12453
12469
  deltaDelegationShapeSchema
12454
12470
  ]);
12455
- var deltaTextChannelSchema = z35.enum([
12471
+ var deltaTextChannelSchema = z36.enum([
12456
12472
  "agentMessage",
12457
12473
  "reasoningSummary",
12458
12474
  "reasoningText",
12459
12475
  "plan"
12460
12476
  ]);
12461
- var deltaOutputChannelSchema = z35.enum(["command", "fileChange"]);
12462
- var deltaErrorSchema = z35.object({ message: z35.string() });
12463
- var deltaAttachSchema = z35.enum(["open", "currentOrLast"]);
12464
- var deltaNoTurnFallbackSchema = z35.object({
12477
+ var deltaOutputChannelSchema = z36.enum(["command", "fileChange"]);
12478
+ var deltaErrorSchema = z36.object({ message: z36.string() });
12479
+ var deltaAttachSchema = z36.enum(["open", "currentOrLast"]);
12480
+ var deltaNoTurnFallbackSchema = z36.object({
12465
12481
  raw: providerRawEventSchema,
12466
- rawType: z35.string()
12482
+ rawType: z36.string()
12467
12483
  });
12468
12484
  function requireExtensionPresentation(delta, ctx) {
12469
12485
  if (delta.item.type === "extension" && delta.presentation === void 0) {
@@ -12474,36 +12490,36 @@ function requireExtensionPresentation(delta, ctx) {
12474
12490
  });
12475
12491
  }
12476
12492
  }
12477
- var threadDeltaSchema = z35.discriminatedUnion("kind", [
12478
- z35.object({
12479
- kind: z35.literal("input.accepted"),
12493
+ var threadDeltaSchema = z36.discriminatedUnion("kind", [
12494
+ z36.object({
12495
+ kind: z36.literal("input.accepted"),
12480
12496
  clientRequestId: clientTurnRequestIdSchema,
12481
12497
  providerTurnId: providerTurnIdSchema.optional()
12482
12498
  }),
12483
- z35.object({
12484
- kind: z35.literal("input.provider"),
12485
- text: z35.string().min(1),
12499
+ z36.object({
12500
+ kind: z36.literal("input.provider"),
12501
+ text: z36.string().min(1),
12486
12502
  parentRef: deltaKeyPartSchema.optional()
12487
12503
  }),
12488
- z35.object({
12489
- kind: z35.literal("turn.open"),
12504
+ z36.object({
12505
+ kind: z36.literal("turn.open"),
12490
12506
  providerTurnId: providerTurnIdSchema.optional(),
12491
12507
  parentRef: deltaKeyPartSchema.optional()
12492
12508
  }),
12493
- z35.object({
12494
- kind: z35.literal("turn.mainRun"),
12495
- state: z35.enum(["idle", "running"])
12509
+ z36.object({
12510
+ kind: z36.literal("turn.mainRun"),
12511
+ state: z36.enum(["idle", "running"])
12496
12512
  }),
12497
- z35.object({
12498
- kind: z35.literal("turn.boundary"),
12513
+ z36.object({
12514
+ kind: z36.literal("turn.boundary"),
12499
12515
  status: threadEventTurnStatusSchema,
12500
12516
  error: deltaErrorSchema.optional(),
12501
- providerCheckpointId: z35.string().min(1).optional(),
12502
- claimIfIdle: z35.boolean().optional(),
12517
+ providerCheckpointId: z36.string().min(1).optional(),
12518
+ claimIfIdle: z36.boolean().optional(),
12503
12519
  providerTurnId: providerTurnIdSchema.optional()
12504
12520
  }),
12505
- z35.object({
12506
- kind: z35.literal("item.open"),
12521
+ z36.object({
12522
+ kind: z36.literal("item.open"),
12507
12523
  key: deltaItemKeySchema,
12508
12524
  item: deltaItemShapeSchema,
12509
12525
  presentation: deltaPresentationSchema.optional(),
@@ -12511,153 +12527,153 @@ var threadDeltaSchema = z35.discriminatedUnion("kind", [
12511
12527
  providerTurnId: providerTurnIdSchema.optional(),
12512
12528
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
12513
12529
  }).superRefine(requireExtensionPresentation),
12514
- z35.object({
12515
- kind: z35.literal("item.close"),
12530
+ z36.object({
12531
+ kind: z36.literal("item.close"),
12516
12532
  key: deltaItemKeySchema,
12517
12533
  status: threadEventItemStatusSchema,
12518
- resultText: z35.string().optional(),
12519
- exitCode: z35.number().optional(),
12520
- aggregatedOutput: z35.string().optional(),
12521
- approvalStatus: z35.literal("denied").optional(),
12534
+ resultText: z36.string().optional(),
12535
+ exitCode: z36.number().optional(),
12536
+ aggregatedOutput: z36.string().optional(),
12537
+ approvalStatus: z36.literal("denied").optional(),
12522
12538
  item: deltaItemShapeSchema,
12523
12539
  presentation: deltaPresentationSchema.optional(),
12524
12540
  providerTurnId: providerTurnIdSchema.optional(),
12525
12541
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
12526
12542
  }).superRefine(requireExtensionPresentation),
12527
- z35.object({
12528
- kind: z35.literal("item.progress"),
12543
+ z36.object({
12544
+ kind: z36.literal("item.progress"),
12529
12545
  key: deltaItemKeySchema,
12530
- message: z35.string().optional(),
12546
+ message: z36.string().optional(),
12531
12547
  snapshot: deltaProgressSnapshotSchema.optional(),
12532
- flush: z35.boolean().optional(),
12548
+ flush: z36.boolean().optional(),
12533
12549
  providerTurnId: providerTurnIdSchema.optional(),
12534
12550
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
12535
12551
  }),
12536
- z35.object({
12537
- kind: z35.literal("item.textDelta"),
12552
+ z36.object({
12553
+ kind: z36.literal("item.textDelta"),
12538
12554
  key: deltaItemKeySchema,
12539
12555
  channel: deltaTextChannelSchema,
12540
- text: z35.string(),
12556
+ text: z36.string(),
12541
12557
  providerTurnId: providerTurnIdSchema.optional(),
12542
12558
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
12543
12559
  }),
12544
- z35.object({
12545
- kind: z35.literal("item.textClose"),
12560
+ z36.object({
12561
+ kind: z36.literal("item.textClose"),
12546
12562
  key: deltaItemKeySchema,
12547
12563
  channel: deltaTextChannelSchema,
12548
- text: z35.string().optional(),
12564
+ text: z36.string().optional(),
12549
12565
  providerTurnId: providerTurnIdSchema.optional(),
12550
12566
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
12551
12567
  }),
12552
- z35.object({
12553
- kind: z35.literal("item.outputDelta"),
12568
+ z36.object({
12569
+ kind: z36.literal("item.outputDelta"),
12554
12570
  key: deltaItemKeySchema,
12555
12571
  channel: deltaOutputChannelSchema,
12556
- text: z35.string(),
12572
+ text: z36.string(),
12557
12573
  providerTurnId: providerTurnIdSchema.optional(),
12558
12574
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
12559
12575
  }),
12560
- z35.object({
12561
- kind: z35.literal("command.outputSnapshot"),
12576
+ z36.object({
12577
+ kind: z36.literal("command.outputSnapshot"),
12562
12578
  key: deltaItemKeySchema,
12563
- text: z35.string(),
12579
+ text: z36.string(),
12564
12580
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
12565
12581
  }),
12566
- z35.object({
12567
- kind: z35.literal("usage"),
12582
+ z36.object({
12583
+ kind: z36.literal("usage"),
12568
12584
  total: threadEventTokenUsageBreakdownSchema,
12569
12585
  last: threadEventTokenUsageBreakdownSchema,
12570
- modelContextWindow: z35.number().nullable(),
12586
+ modelContextWindow: z36.number().nullable(),
12571
12587
  promptCacheTtlMs: promptCacheTtlMsSchema.optional(),
12572
12588
  providerTurnId: providerTurnIdSchema.optional()
12573
12589
  }),
12574
- z35.object({
12575
- kind: z35.literal("contextWindow"),
12590
+ z36.object({
12591
+ kind: z36.literal("contextWindow"),
12576
12592
  snapshot: contextSnapshotSchema.optional(),
12577
- used: z35.number().nullable(),
12578
- size: z35.number().nullable().optional(),
12579
- estimated: z35.boolean(),
12593
+ used: z36.number().nullable(),
12594
+ size: z36.number().nullable().optional(),
12595
+ estimated: z36.boolean(),
12580
12596
  cost: threadUsageCostSchema.optional(),
12581
12597
  attach: deltaAttachSchema,
12582
12598
  providerTurnId: providerTurnIdSchema.optional()
12583
12599
  }),
12584
- z35.object({
12585
- kind: z35.literal("context.compacted"),
12600
+ z36.object({
12601
+ kind: z36.literal("context.compacted"),
12586
12602
  providerTurnId: providerTurnIdSchema.optional(),
12587
12603
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
12588
12604
  }),
12589
- z35.object({ kind: z35.literal("context.cleared") }),
12590
- z35.object({
12591
- kind: z35.literal("turn.diff"),
12592
- diff: z35.string(),
12605
+ z36.object({ kind: z36.literal("context.cleared") }),
12606
+ z36.object({
12607
+ kind: z36.literal("turn.diff"),
12608
+ diff: z36.string(),
12593
12609
  providerTurnId: providerTurnIdSchema.optional()
12594
12610
  }),
12595
- z35.object({ kind: z35.literal("thread.started") }),
12596
- z35.object({
12597
- kind: z35.literal("thread.identity"),
12598
- providerThreadId: z35.string().min(1)
12611
+ z36.object({ kind: z36.literal("thread.started") }),
12612
+ z36.object({
12613
+ kind: z36.literal("thread.identity"),
12614
+ providerThreadId: z36.string().min(1)
12599
12615
  }),
12600
- z35.object({
12601
- kind: z35.literal("thread.name"),
12602
- name: z35.string().min(1),
12603
- source: z35.literal("agent").optional()
12616
+ z36.object({
12617
+ kind: z36.literal("thread.name"),
12618
+ name: z36.string().min(1),
12619
+ source: z36.literal("agent").optional()
12604
12620
  }),
12605
- z35.object({
12606
- kind: z35.literal("extension.state"),
12621
+ z36.object({
12622
+ kind: z36.literal("extension.state"),
12607
12623
  extensionKind: extensionKindSchema,
12608
12624
  payload: jsonValueSchema
12609
12625
  }),
12610
- z35.object({
12611
- kind: z35.literal("provider.rateLimits"),
12626
+ z36.object({
12627
+ kind: z36.literal("provider.rateLimits"),
12612
12628
  rateLimits: providerRateLimitStateSchema
12613
12629
  }),
12614
- z35.object({
12615
- kind: z35.literal("provider.error"),
12616
- message: z35.string(),
12617
- detail: z35.string().optional(),
12618
- willRetry: z35.boolean().optional(),
12630
+ z36.object({
12631
+ kind: z36.literal("provider.error"),
12632
+ message: z36.string(),
12633
+ detail: z36.string().optional(),
12634
+ willRetry: z36.boolean().optional(),
12619
12635
  category: providerErrorCategorySchema.optional(),
12620
12636
  errorInfo: providerErrorInfoSchema.optional(),
12621
- settlesTurn: z35.boolean().optional(),
12637
+ settlesTurn: z36.boolean().optional(),
12622
12638
  providerTurnId: providerTurnIdSchema.optional(),
12623
- threadScoped: z35.boolean().optional()
12639
+ threadScoped: z36.boolean().optional()
12624
12640
  }),
12625
- z35.object({
12626
- kind: z35.literal("provider.modelFallback"),
12627
- originalModel: z35.string().min(1),
12628
- fallbackModel: z35.string().min(1),
12629
- reason: z35.enum(["refusal", "provider"]),
12630
- message: z35.string()
12641
+ z36.object({
12642
+ kind: z36.literal("provider.modelFallback"),
12643
+ originalModel: z36.string().min(1),
12644
+ fallbackModel: z36.string().min(1),
12645
+ reason: z36.enum(["refusal", "provider"]),
12646
+ message: z36.string()
12631
12647
  }),
12632
- z35.object({
12633
- kind: z35.literal("provider.warning"),
12634
- summary: z35.string().optional(),
12635
- details: z35.string().optional(),
12648
+ z36.object({
12649
+ kind: z36.literal("provider.warning"),
12650
+ summary: z36.string().optional(),
12651
+ details: z36.string().optional(),
12636
12652
  category: threadEventWarningCategorySchema.optional(),
12637
- vouchedTurn: z35.boolean().optional()
12653
+ vouchedTurn: z36.boolean().optional()
12638
12654
  }),
12639
- z35.object({
12640
- kind: z35.literal("unhandled"),
12655
+ z36.object({
12656
+ kind: z36.literal("unhandled"),
12641
12657
  raw: providerRawEventSchema,
12642
- rawType: z35.string(),
12643
- vouchedTurn: z35.boolean(),
12644
- onlyIfNoTurn: z35.boolean().optional(),
12658
+ rawType: z36.string(),
12659
+ vouchedTurn: z36.boolean(),
12660
+ onlyIfNoTurn: z36.boolean().optional(),
12645
12661
  parentRef: deltaKeyPartSchema.optional(),
12646
12662
  providerTurnId: providerTurnIdSchema.optional()
12647
12663
  }),
12648
- z35.object({ kind: z35.literal("session.ended") }),
12649
- z35.object({ kind: z35.literal("session.reset") })
12664
+ z36.object({ kind: z36.literal("session.ended") }),
12665
+ z36.object({ kind: z36.literal("session.reset") })
12650
12666
  ]);
12651
- var threadDeltaNotificationParamsSchema = z35.object({
12652
- threadId: z35.string().min(1),
12653
- deltas: z35.array(threadDeltaSchema)
12667
+ var threadDeltaNotificationParamsSchema = z36.object({
12668
+ threadId: z36.string().min(1),
12669
+ deltas: z36.array(threadDeltaSchema)
12654
12670
  }).passthrough();
12655
12671
 
12656
12672
  // ../provider-bridge-acp/src/launch-spec.ts
12657
- import { z as z36 } from "zod";
12658
- var acpNativeSkillRootsSchema = z36.object({
12659
- user: z36.array(providerNativeRootInputSchema).default([]),
12660
- project: z36.array(providerNativeRootInputSchema).default([])
12673
+ import { z as z37 } from "zod";
12674
+ var acpNativeSkillRootsSchema = z37.object({
12675
+ user: z37.array(providerNativeRootInputSchema).default([]),
12676
+ project: z37.array(providerNativeRootInputSchema).default([])
12661
12677
  }).strict().superRefine((roots, context) => {
12662
12678
  const normalized = providerNativeRootsSchema.safeParse(
12663
12679
  normalizeProviderNativeRoots(roots)
@@ -12673,16 +12689,16 @@ var acpNativeSkillRootsSchema = z36.object({
12673
12689
  });
12674
12690
  }
12675
12691
  });
12676
- var acpLaunchSpecSchema = z36.object({
12677
- displayName: z36.string().min(1),
12678
- command: z36.string().min(1),
12679
- args: z36.array(z36.string()),
12680
- env: z36.record(z36.string().min(1), z36.string()),
12681
- cwd: z36.string().min(1).optional(),
12682
- modelCli: z36.object({
12683
- listArgs: z36.array(z36.string()),
12684
- selectFlag: z36.string().min(1).optional(),
12685
- primaryModels: z36.array(z36.string())
12692
+ var acpLaunchSpecSchema = z37.object({
12693
+ displayName: z37.string().min(1),
12694
+ command: z37.string().min(1),
12695
+ args: z37.array(z37.string()),
12696
+ env: z37.record(z37.string().min(1), z37.string()),
12697
+ cwd: z37.string().min(1).optional(),
12698
+ modelCli: z37.object({
12699
+ listArgs: z37.array(z37.string()),
12700
+ selectFlag: z37.string().min(1).optional(),
12701
+ primaryModels: z37.array(z37.string())
12686
12702
  }).strict().transform(
12687
12703
  (modelCli) => modelCli.listArgs.length > 0 ? modelCli : void 0
12688
12704
  ).optional(),
@@ -12720,35 +12736,35 @@ function normalizeAcpLaunchSpec(spec) {
12720
12736
  }
12721
12737
 
12722
12738
  // src/claude-task-tools.ts
12723
- import { z as z37 } from "zod";
12724
- var claudeTaskToolNameSchema = z37.enum([
12739
+ import { z as z38 } from "zod";
12740
+ var claudeTaskToolNameSchema = z38.enum([
12725
12741
  "TaskCreate",
12726
12742
  "TaskGet",
12727
12743
  "TaskList",
12728
12744
  "TaskUpdate"
12729
12745
  ]);
12730
- var claudeTaskStatusSchema = z37.enum(["pending", "in_progress", "completed"]);
12731
- var claudeTaskCreateOutputSchema = z37.object({
12732
- task: z37.object({
12733
- id: z37.string(),
12734
- subject: z37.string()
12746
+ var claudeTaskStatusSchema = z38.enum(["pending", "in_progress", "completed"]);
12747
+ var claudeTaskCreateOutputSchema = z38.object({
12748
+ task: z38.object({
12749
+ id: z38.string(),
12750
+ subject: z38.string()
12735
12751
  }).passthrough()
12736
12752
  }).passthrough();
12737
- var claudeTaskGetOutputSchema = z37.object({
12738
- task: z37.object({
12739
- id: z37.string(),
12753
+ var claudeTaskGetOutputSchema = z38.object({
12754
+ task: z38.object({
12755
+ id: z38.string(),
12740
12756
  status: claudeTaskStatusSchema,
12741
- subject: z37.string()
12757
+ subject: z38.string()
12742
12758
  }).passthrough().nullable()
12743
12759
  }).passthrough();
12744
- var claudeTaskUpdateOutputSchema = z37.object({
12745
- success: z37.boolean(),
12746
- taskId: z37.string()
12760
+ var claudeTaskUpdateOutputSchema = z38.object({
12761
+ success: z38.boolean(),
12762
+ taskId: z38.string()
12747
12763
  }).passthrough();
12748
- var claudeTaskListOutputSchema = z37.object({
12749
- tasks: z37.array(z37.unknown())
12764
+ var claudeTaskListOutputSchema = z38.object({
12765
+ tasks: z38.array(z38.unknown())
12750
12766
  }).passthrough();
12751
- var claudeTaskToolOutputSchema = z37.union([
12767
+ var claudeTaskToolOutputSchema = z38.union([
12752
12768
  claudeTaskCreateOutputSchema,
12753
12769
  claudeTaskGetOutputSchema,
12754
12770
  claudeTaskListOutputSchema,