@get-bb/plugin-sdk 0.4.88 → 0.4.94

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.
@@ -679,6 +679,12 @@ function addTokenUsage(total, last) {
679
679
  totalTokens: total.totalTokens + last.totalTokens,
680
680
  inputTokens: total.inputTokens + last.inputTokens,
681
681
  cachedInputTokens: total.cachedInputTokens + last.cachedInputTokens,
682
+ ...total.cacheReadInputTokens === void 0 && last.cacheReadInputTokens === void 0 ? {} : {
683
+ cacheReadInputTokens: (total.cacheReadInputTokens ?? 0) + (last.cacheReadInputTokens ?? 0)
684
+ },
685
+ ...total.cacheWriteInputTokens === void 0 && last.cacheWriteInputTokens === void 0 ? {} : {
686
+ cacheWriteInputTokens: (total.cacheWriteInputTokens ?? 0) + (last.cacheWriteInputTokens ?? 0)
687
+ },
682
688
  outputTokens: total.outputTokens + last.outputTokens,
683
689
  reasoningOutputTokens: total.reasoningOutputTokens + last.reasoningOutputTokens
684
690
  };
@@ -2805,6 +2811,8 @@ var threadEventTokenUsageBreakdownSchema = z17.object({
2805
2811
  totalTokens: z17.number(),
2806
2812
  inputTokens: z17.number(),
2807
2813
  cachedInputTokens: z17.number(),
2814
+ cacheReadInputTokens: z17.number().nonnegative().optional(),
2815
+ cacheWriteInputTokens: z17.number().nonnegative().optional(),
2808
2816
  outputTokens: z17.number(),
2809
2817
  reasoningOutputTokens: z17.number()
2810
2818
  });
@@ -3975,6 +3983,12 @@ function clampPercent(value) {
3975
3983
  );
3976
3984
  }
3977
3985
 
3986
+ // ../provider-bridge-protocol/src/bridge-kit/provider-tool-call-contract.ts
3987
+ import { z as z24 } from "zod";
3988
+ var providerToolCallCancellationSchema = z24.object({
3989
+ requestId: z24.union([z24.string(), z24.number().int()])
3990
+ });
3991
+
3978
3992
  // ../provider-bridge-protocol/src/bridge-kit/provider-visibility.ts
3979
3993
  function createProviderVisibilityMetadata(args) {
3980
3994
  return {
@@ -3987,10 +4001,10 @@ function createProviderVisibilityMetadata(args) {
3987
4001
  }
3988
4002
 
3989
4003
  // ../provider-bridge-protocol/src/bridge-kit/runtime-json-rpc.ts
3990
- import { z as z25 } from "zod";
4004
+ import { z as z26 } from "zod";
3991
4005
 
3992
4006
  // ../provider-bridge-protocol/src/errors.ts
3993
- import { z as z24 } from "zod";
4007
+ import { z as z25 } from "zod";
3994
4008
  var BRIDGE_JSON_RPC_ERRORS = {
3995
4009
  INVALID_PARAMS: -32602,
3996
4010
  METHOD_NOT_FOUND: -32601,
@@ -3999,12 +4013,12 @@ var BRIDGE_JSON_RPC_ERRORS = {
3999
4013
  SESSION_NOT_RESTORABLE: -32002,
4000
4014
  FORK_CHECKPOINT_UNSUPPORTED: -32003
4001
4015
  };
4002
- var providerRecoveryHintSchema = z24.object({
4016
+ var providerRecoveryHintSchema = z25.object({
4003
4017
  kind: providerRecoveryKindSchema,
4004
- message: z24.string().min(1),
4005
- retryable: z24.boolean()
4018
+ message: z25.string().min(1),
4019
+ retryable: z25.boolean()
4006
4020
  });
4007
- var bridgeErrorDataSchema = z24.object({ recovery: providerRecoveryHintSchema.optional() }).passthrough();
4021
+ var bridgeErrorDataSchema = z25.object({ recovery: providerRecoveryHintSchema.optional() }).passthrough();
4008
4022
 
4009
4023
  // ../provider-bridge-protocol/src/bridge-kit/runtime-json-rpc.ts
4010
4024
  var JSON_RPC_INVALID_PARAMS_CODE = -32602;
@@ -4022,7 +4036,7 @@ var ProviderResponseEncodeError = class extends Error {
4022
4036
  this.name = "ProviderResponseEncodeError";
4023
4037
  }
4024
4038
  };
4025
- var ignoredJsonRpcResultSchema = z25.unknown();
4039
+ var ignoredJsonRpcResultSchema = z26.unknown();
4026
4040
 
4027
4041
  // ../provider-bridge-protocol/src/version.ts
4028
4042
  var PROVIDER_BRIDGE_PROTOCOL_VERSION = 2;
@@ -4030,66 +4044,66 @@ var THREAD_DELTA_GRAMMAR_V2 = PROVIDER_BRIDGE_PROTOCOL_VERSION;
4030
4044
  var THREAD_DELTA_GRAMMAR_V3 = 3;
4031
4045
 
4032
4046
  // ../provider-bridge-protocol/src/handshake.ts
4033
- import { z as z26 } from "zod";
4034
- var bridgeGrammarVersionsSchema = z26.tuple([z26.number().int().positive(), z26.number().int().positive()]).refine(([min, max]) => min <= max, {
4047
+ import { z as z27 } from "zod";
4048
+ var bridgeGrammarVersionsSchema = z27.tuple([z27.number().int().positive(), z27.number().int().positive()]).refine(([min, max]) => min <= max, {
4035
4049
  message: "grammarVersions must be an ascending [min, max] range"
4036
4050
  });
4037
- var bridgeSteerModeSchema = z26.enum(["inject", "queue"]);
4038
- var bridgeCapabilitiesSchema = z26.object({
4039
- sessionRestore: z26.boolean().default(false),
4040
- threadArchive: z26.boolean().default(false),
4041
- threadRename: z26.boolean().default(false),
4042
- threadGoalClear: z26.boolean().default(false),
4051
+ var bridgeSteerModeSchema = z27.enum(["inject", "queue"]);
4052
+ var bridgeCapabilitiesSchema = z27.object({
4053
+ sessionRestore: z27.boolean().default(false),
4054
+ threadArchive: z27.boolean().default(false),
4055
+ threadRename: z27.boolean().default(false),
4056
+ threadGoalClear: z27.boolean().default(false),
4043
4057
  fork: providerForkSchema.default("none"),
4044
- approvalEnforcedBy: z26.enum(["runtime", "provider"]).default("runtime"),
4058
+ approvalEnforcedBy: z27.enum(["runtime", "provider"]).default("runtime"),
4045
4059
  grammarVersions: bridgeGrammarVersionsSchema.default([
4046
4060
  PROVIDER_BRIDGE_PROTOCOL_VERSION,
4047
4061
  PROVIDER_BRIDGE_PROTOCOL_VERSION
4048
4062
  ]),
4049
4063
  steerMode: bridgeSteerModeSchema.default("queue"),
4050
- skills: z26.object({ configure: z26.boolean().default(false) }).default({ configure: false })
4064
+ skills: z27.object({ configure: z27.boolean().default(false) }).default({ configure: false })
4051
4065
  }).passthrough();
4052
- var initializeParamsSchema = z26.object({
4053
- protocolVersion: z26.number().int().positive(),
4054
- client: z26.object({ name: z26.string().min(1), version: z26.string().min(1) }),
4066
+ var initializeParamsSchema = z27.object({
4067
+ protocolVersion: z27.number().int().positive(),
4068
+ client: z27.object({ name: z27.string().min(1), version: z27.string().min(1) }),
4055
4069
  grammarVersions: bridgeGrammarVersionsSchema.default([
4056
4070
  PROVIDER_BRIDGE_PROTOCOL_VERSION,
4057
4071
  PROVIDER_BRIDGE_PROTOCOL_VERSION
4058
4072
  ])
4059
4073
  }).passthrough();
4060
- var initializeResultSchema = z26.object({
4061
- protocolVersion: z26.number().int().positive(),
4062
- capabilities: z26.preprocess(
4074
+ var initializeResultSchema = z27.object({
4075
+ protocolVersion: z27.number().int().positive(),
4076
+ capabilities: z27.preprocess(
4063
4077
  (value) => value ?? {},
4064
4078
  bridgeCapabilitiesSchema
4065
4079
  )
4066
4080
  }).passthrough();
4067
4081
 
4068
4082
  // ../provider-bridge-protocol/src/execution-options.ts
4069
- import { z as z27 } from "zod";
4070
- var bridgeExecutionOptionsSchema = z27.object({
4071
- model: z27.string().min(1).optional(),
4083
+ import { z as z28 } from "zod";
4084
+ var bridgeExecutionOptionsSchema = z28.object({
4085
+ model: z28.string().min(1).optional(),
4072
4086
  serviceTier: serviceTierSchema.optional(),
4073
4087
  reasoningLevel: reasoningLevelSchema.optional(),
4074
4088
  promptMode: promptModeSchema.optional(),
4075
- instructions: z27.string().optional(),
4076
- envVars: z27.record(z27.string(), z27.string()).optional(),
4077
- providerOptions: z27.record(z27.string(), z27.unknown()).optional()
4089
+ instructions: z28.string().optional(),
4090
+ envVars: z28.record(z28.string(), z28.string()).optional(),
4091
+ providerOptions: z28.record(z28.string(), z28.unknown()).optional()
4078
4092
  }).and(runtimePermissionPolicySchema);
4079
4093
 
4080
4094
  // ../provider-bridge-protocol/src/provider-maintenance.ts
4081
- import { z as z28 } from "zod";
4082
- var providerMaintenanceParamsSchema = z28.object({
4083
- providerId: z28.string().min(1),
4084
- cwd: z28.string().min(1).optional(),
4085
- providerOptions: z28.record(z28.string(), z28.unknown()).optional()
4095
+ import { z as z29 } from "zod";
4096
+ var providerMaintenanceParamsSchema = z29.object({
4097
+ providerId: z29.string().min(1),
4098
+ cwd: z29.string().min(1).optional(),
4099
+ providerOptions: z29.record(z29.string(), z29.unknown()).optional()
4086
4100
  }).passthrough();
4087
- var providerInstallationRequirementSchema = z28.enum(["thread_rewind"]);
4101
+ var providerInstallationRequirementSchema = z29.enum(["thread_rewind"]);
4088
4102
  var providerInstallationStatusParamsSchema = providerMaintenanceParamsSchema.extend({
4089
4103
  requirement: providerInstallationRequirementSchema.optional()
4090
4104
  });
4091
- var providerHealthSchema = z28.object({
4092
- status: z28.enum([
4105
+ var providerHealthSchema = z29.object({
4106
+ status: z29.enum([
4093
4107
  "ready",
4094
4108
  "not_installed",
4095
4109
  "unauthenticated",
@@ -4097,114 +4111,114 @@ var providerHealthSchema = z28.object({
4097
4111
  "unsupported_version",
4098
4112
  "unknown"
4099
4113
  ]),
4100
- statusMessage: z28.string().min(1).nullable(),
4101
- accountEmail: z28.string().nullable(),
4102
- planLabel: z28.string().min(1).nullable(),
4103
- installedVersion: z28.string().min(1).nullable(),
4104
- minimumSupportedVersion: z28.string().min(1).nullable(),
4105
- canInstall: z28.boolean(),
4106
- canUpdate: z28.boolean(),
4107
- loginCommand: z28.string().min(1).nullable()
4114
+ statusMessage: z29.string().min(1).nullable(),
4115
+ accountEmail: z29.string().nullable(),
4116
+ planLabel: z29.string().min(1).nullable(),
4117
+ installedVersion: z29.string().min(1).nullable(),
4118
+ minimumSupportedVersion: z29.string().min(1).nullable(),
4119
+ canInstall: z29.boolean(),
4120
+ canUpdate: z29.boolean(),
4121
+ loginCommand: z29.string().min(1).nullable()
4108
4122
  }).passthrough();
4109
- var providerUsageWindowSchema = z28.object({
4110
- label: z28.string().min(1),
4111
- usedPercent: z28.number().min(0).max(100),
4112
- resetsAt: z28.string().min(1).nullable(),
4113
- cost: z28.object({
4114
- usedUsdCents: z28.number().int().nonnegative(),
4115
- limitUsdCents: z28.number().int().positive()
4123
+ var providerUsageWindowSchema = z29.object({
4124
+ label: z29.string().min(1),
4125
+ usedPercent: z29.number().min(0).max(100),
4126
+ resetsAt: z29.string().min(1).nullable(),
4127
+ cost: z29.object({
4128
+ usedUsdCents: z29.number().int().nonnegative(),
4129
+ limitUsdCents: z29.number().int().positive()
4116
4130
  }).optional()
4117
4131
  }).passthrough();
4118
- var providerUsageSchema = z28.discriminatedUnion("status", [
4119
- z28.object({
4120
- status: z28.literal("ok"),
4121
- accountEmail: z28.string().email().nullable(),
4122
- planLabel: z28.string().min(1).nullable(),
4123
- windows: z28.array(providerUsageWindowSchema)
4132
+ var providerUsageSchema = z29.discriminatedUnion("status", [
4133
+ z29.object({
4134
+ status: z29.literal("ok"),
4135
+ accountEmail: z29.string().email().nullable(),
4136
+ planLabel: z29.string().min(1).nullable(),
4137
+ windows: z29.array(providerUsageWindowSchema)
4124
4138
  }).passthrough(),
4125
- z28.object({ status: z28.literal("not_installed") }).passthrough(),
4126
- z28.object({ status: z28.literal("unauthenticated") }).passthrough(),
4127
- z28.object({ status: z28.literal("expired") }).passthrough(),
4128
- z28.object({
4129
- status: z28.literal("error"),
4130
- message: z28.string().min(1),
4131
- planLabel: z28.string().min(1).nullable().default(null),
4132
- accountEmail: z28.string().nullable().default(null)
4139
+ z29.object({ status: z29.literal("not_installed") }).passthrough(),
4140
+ z29.object({ status: z29.literal("unauthenticated") }).passthrough(),
4141
+ z29.object({ status: z29.literal("expired") }).passthrough(),
4142
+ z29.object({
4143
+ status: z29.literal("error"),
4144
+ message: z29.string().min(1),
4145
+ planLabel: z29.string().min(1).nullable().default(null),
4146
+ accountEmail: z29.string().nullable().default(null)
4133
4147
  }).passthrough()
4134
4148
  ]);
4135
- var providerHealthResultSchema = z28.discriminatedUnion("supported", [
4136
- z28.object({ supported: z28.literal(false) }).passthrough(),
4137
- z28.object({
4138
- supported: z28.literal(true),
4149
+ var providerHealthResultSchema = z29.discriminatedUnion("supported", [
4150
+ z29.object({ supported: z29.literal(false) }).passthrough(),
4151
+ z29.object({
4152
+ supported: z29.literal(true),
4139
4153
  health: providerHealthSchema
4140
4154
  }).passthrough()
4141
4155
  ]);
4142
- var providerUsageResultSchema = z28.discriminatedUnion("supported", [
4143
- z28.object({ supported: z28.literal(false) }).passthrough(),
4144
- z28.object({
4145
- supported: z28.literal(true),
4156
+ var providerUsageResultSchema = z29.discriminatedUnion("supported", [
4157
+ z29.object({ supported: z29.literal(false) }).passthrough(),
4158
+ z29.object({
4159
+ supported: z29.literal(true),
4146
4160
  usage: providerUsageSchema
4147
4161
  }).passthrough()
4148
4162
  ]);
4149
- var providerInstallationActionKindSchema = z28.enum([
4163
+ var providerInstallationActionKindSchema = z29.enum([
4150
4164
  "install",
4151
4165
  "update"
4152
4166
  ]);
4153
- var providerInstallationActionSchema = z28.object({
4167
+ var providerInstallationActionSchema = z29.object({
4154
4168
  kind: providerInstallationActionKindSchema,
4155
- label: z28.enum(["Install", "Update"]),
4156
- command: z28.string().min(1)
4169
+ label: z29.enum(["Install", "Update"]),
4170
+ command: z29.string().min(1)
4157
4171
  }).passthrough();
4158
- var providerInstallationSourceSchema = z28.enum([
4172
+ var providerInstallationSourceSchema = z29.enum([
4159
4173
  "notInstalled",
4160
4174
  "npmGlobal",
4161
4175
  "external"
4162
4176
  ]);
4163
- var providerInstallationStatusSchema = z28.object({
4164
- executableName: z28.string().min(1),
4165
- executablePath: z28.string().min(1).nullable(),
4166
- installed: z28.boolean(),
4177
+ var providerInstallationStatusSchema = z29.object({
4178
+ executableName: z29.string().min(1),
4179
+ executablePath: z29.string().min(1).nullable(),
4180
+ installed: z29.boolean(),
4167
4181
  installSource: providerInstallationSourceSchema,
4168
- currentVersion: z28.string().min(1).nullable(),
4169
- latestVersion: z28.string().min(1).nullable(),
4170
- minimumSupportedVersion: z28.string().min(1).nullable(),
4171
- npmPackageName: z28.string().min(1).nullable(),
4172
- npmGlobalPackageVersion: z28.string().min(1).nullable(),
4182
+ currentVersion: z29.string().min(1).nullable(),
4183
+ latestVersion: z29.string().min(1).nullable(),
4184
+ minimumSupportedVersion: z29.string().min(1).nullable(),
4185
+ npmPackageName: z29.string().min(1).nullable(),
4186
+ npmGlobalPackageVersion: z29.string().min(1).nullable(),
4173
4187
  installAction: providerInstallationActionSchema.nullable(),
4174
- needsUpdate: z28.boolean(),
4175
- versionUnsupported: z28.boolean()
4188
+ needsUpdate: z29.boolean(),
4189
+ versionUnsupported: z29.boolean()
4176
4190
  }).passthrough();
4177
4191
  var providerInstallationRunParamsSchema = providerMaintenanceParamsSchema.extend({
4178
4192
  action: providerInstallationActionKindSchema
4179
4193
  });
4180
- var providerInstallationCommandSchema = z28.object({
4181
- command: z28.string().min(1),
4182
- args: z28.array(z28.string()).max(64),
4183
- displayCommand: z28.string().min(1)
4194
+ var providerInstallationCommandSchema = z29.object({
4195
+ command: z29.string().min(1),
4196
+ args: z29.array(z29.string()).max(64),
4197
+ displayCommand: z29.string().min(1)
4184
4198
  }).passthrough();
4185
- var providerInstallationVerificationSchema = z28.discriminatedUnion(
4199
+ var providerInstallationVerificationSchema = z29.discriminatedUnion(
4186
4200
  "kind",
4187
4201
  [
4188
- z28.object({ kind: z28.literal("installed") }).passthrough(),
4189
- z28.object({
4190
- kind: z28.literal("version_changed"),
4191
- previousVersion: z28.string().min(1)
4202
+ z29.object({ kind: z29.literal("installed") }).passthrough(),
4203
+ z29.object({
4204
+ kind: z29.literal("version_changed"),
4205
+ previousVersion: z29.string().min(1)
4192
4206
  }).passthrough(),
4193
- z28.object({
4194
- kind: z28.literal("version_at_least"),
4195
- version: z28.string().min(1)
4207
+ z29.object({
4208
+ kind: z29.literal("version_at_least"),
4209
+ version: z29.string().min(1)
4196
4210
  }).passthrough()
4197
4211
  ]
4198
4212
  );
4199
- var providerInstallationRunResultSchema = z28.discriminatedUnion(
4213
+ var providerInstallationRunResultSchema = z29.discriminatedUnion(
4200
4214
  "available",
4201
4215
  [
4202
- z28.object({
4203
- available: z28.literal(false),
4204
- message: z28.string().min(1)
4216
+ z29.object({
4217
+ available: z29.literal(false),
4218
+ message: z29.string().min(1)
4205
4219
  }).passthrough(),
4206
- z28.object({
4207
- available: z28.literal(true),
4220
+ z29.object({
4221
+ available: z29.literal(true),
4208
4222
  command: providerInstallationCommandSchema,
4209
4223
  verification: providerInstallationVerificationSchema
4210
4224
  }).passthrough()
@@ -4212,7 +4226,7 @@ var providerInstallationRunResultSchema = z28.discriminatedUnion(
4212
4226
  );
4213
4227
 
4214
4228
  // ../provider-bridge-protocol/src/requests.ts
4215
- import { z as z29 } from "zod";
4229
+ import { z as z30 } from "zod";
4216
4230
  var BRIDGE_REQUEST_METHODS = {
4217
4231
  initialize: "initialize",
4218
4232
  modelList: "model/list",
@@ -4234,78 +4248,78 @@ var BRIDGE_REQUEST_METHODS = {
4234
4248
  skillsConfigure: "skills/configure"
4235
4249
  };
4236
4250
  var sessionConstructionFields = {
4237
- threadId: z29.string().min(1),
4238
- cwd: z29.string().min(1),
4251
+ threadId: z30.string().min(1),
4252
+ cwd: z30.string().min(1),
4239
4253
  options: bridgeExecutionOptionsSchema,
4240
- dynamicTools: z29.array(dynamicToolSchema).optional(),
4241
- disallowedTools: z29.array(z29.string().min(1)).optional(),
4254
+ dynamicTools: z30.array(dynamicToolSchema).optional(),
4255
+ disallowedTools: z30.array(z30.string().min(1)).optional(),
4242
4256
  instructionMode: instructionModeSchema
4243
4257
  };
4244
- var modelListParamsSchema = z29.object({ cwd: z29.string().min(1).optional() }).passthrough();
4245
- var threadStartParamsSchema = z29.object({
4258
+ var modelListParamsSchema = z30.object({ cwd: z30.string().min(1).optional() }).passthrough();
4259
+ var threadStartParamsSchema = z30.object({
4246
4260
  ...sessionConstructionFields,
4247
- input: z29.array(promptInputSchema).optional()
4261
+ input: z30.array(promptInputSchema).optional()
4248
4262
  }).passthrough();
4249
- var threadResumeParamsSchema = z29.object({
4263
+ var threadResumeParamsSchema = z30.object({
4250
4264
  ...sessionConstructionFields,
4251
- providerThreadId: z29.string().min(1)
4265
+ providerThreadId: z30.string().min(1)
4252
4266
  }).passthrough();
4253
- var threadForkParamsSchema = z29.object({
4267
+ var threadForkParamsSchema = z30.object({
4254
4268
  ...sessionConstructionFields,
4255
- sourceProviderThreadId: z29.string().min(1),
4256
- sourceProviderCheckpointId: z29.string().min(1).optional()
4269
+ sourceProviderThreadId: z30.string().min(1),
4270
+ sourceProviderCheckpointId: z30.string().min(1).optional()
4257
4271
  }).passthrough();
4258
- var threadStopParamsSchema = z29.object({
4259
- threadId: z29.string().min(1),
4260
- providerThreadId: z29.string().min(1),
4261
- intent: z29.enum(["interrupt", "release"]),
4262
- activeTurnId: z29.string().min(1).nullable()
4272
+ var threadStopParamsSchema = z30.object({
4273
+ threadId: z30.string().min(1),
4274
+ providerThreadId: z30.string().min(1),
4275
+ intent: z30.enum(["interrupt", "release"]),
4276
+ activeTurnId: z30.string().min(1).nullable()
4263
4277
  }).passthrough();
4264
- var threadRefParams = z29.object({
4265
- threadId: z29.string().min(1),
4266
- providerThreadId: z29.string().min(1)
4278
+ var threadRefParams = z30.object({
4279
+ threadId: z30.string().min(1),
4280
+ providerThreadId: z30.string().min(1)
4267
4281
  }).passthrough();
4268
4282
  var threadDiscardParamsSchema = threadRefParams;
4269
4283
  var threadArchiveParamsSchema = threadRefParams;
4270
4284
  var threadUnarchiveParamsSchema = threadRefParams;
4271
4285
  var threadGoalClearParamsSchema = threadRefParams;
4272
- var threadNameSetParamsSchema = z29.object({
4273
- threadId: z29.string().min(1),
4274
- providerThreadId: z29.string().min(1),
4275
- title: z29.string().min(1)
4286
+ var threadNameSetParamsSchema = z30.object({
4287
+ threadId: z30.string().min(1),
4288
+ providerThreadId: z30.string().min(1),
4289
+ title: z30.string().min(1)
4276
4290
  }).passthrough();
4277
4291
  var turnInputFields = {
4278
- threadId: z29.string().min(1),
4279
- providerThreadId: z29.string().min(1),
4280
- input: z29.array(promptInputSchema),
4292
+ threadId: z30.string().min(1),
4293
+ providerThreadId: z30.string().min(1),
4294
+ input: z30.array(promptInputSchema),
4281
4295
  clientRequestId: clientTurnRequestIdSchema,
4282
4296
  options: bridgeExecutionOptionsSchema
4283
4297
  };
4284
- var turnStartParamsSchema = z29.object(turnInputFields).passthrough();
4285
- var turnSteerParamsSchema = z29.object({
4298
+ var turnStartParamsSchema = z30.object(turnInputFields).passthrough();
4299
+ var turnSteerParamsSchema = z30.object({
4286
4300
  ...turnInputFields,
4287
- expectedTurnId: z29.string().min(1)
4301
+ expectedTurnId: z30.string().min(1)
4288
4302
  }).passthrough();
4289
- var skillsConfigureRootSchema = z29.object({
4290
- id: z29.string().min(1),
4291
- path: z29.string().min(1),
4292
- skills: z29.array(
4293
- z29.object({
4294
- name: z29.string().min(1),
4295
- description: z29.string()
4303
+ var skillsConfigureRootSchema = z30.object({
4304
+ id: z30.string().min(1),
4305
+ path: z30.string().min(1),
4306
+ skills: z30.array(
4307
+ z30.object({
4308
+ name: z30.string().min(1),
4309
+ description: z30.string()
4296
4310
  }).passthrough()
4297
4311
  )
4298
4312
  }).passthrough();
4299
- var skillsConfigureParamsSchema = z29.object({
4300
- roots: z29.array(skillsConfigureRootSchema)
4313
+ var skillsConfigureParamsSchema = z30.object({
4314
+ roots: z30.array(skillsConfigureRootSchema)
4301
4315
  }).passthrough();
4302
- var threadIdentityResultSchema = z29.object({
4303
- providerThreadId: z29.string().min(1),
4304
- sessionRestorable: z29.boolean().optional()
4316
+ var threadIdentityResultSchema = z30.object({
4317
+ providerThreadId: z30.string().min(1),
4318
+ sessionRestorable: z30.boolean().optional()
4305
4319
  }).passthrough();
4306
4320
 
4307
4321
  // ../provider-bridge-protocol/src/notifications.ts
4308
- import { z as z30 } from "zod";
4322
+ import { z as z31 } from "zod";
4309
4323
  var BRIDGE_NOTIFICATION_METHODS = {
4310
4324
  threadIdentity: "thread/identity",
4311
4325
  sessionReplaced: "session/replaced",
@@ -4313,142 +4327,142 @@ var BRIDGE_NOTIFICATION_METHODS = {
4313
4327
  providerRecovery: "provider/recovery",
4314
4328
  error: "error"
4315
4329
  };
4316
- var threadIdentityNotificationSchema = z30.object({
4317
- threadId: z30.string().min(1),
4318
- providerThreadId: z30.string().min(1),
4319
- sessionRestorable: z30.boolean().optional()
4330
+ var threadIdentityNotificationSchema = z31.object({
4331
+ threadId: z31.string().min(1),
4332
+ providerThreadId: z31.string().min(1),
4333
+ sessionRestorable: z31.boolean().optional()
4320
4334
  }).passthrough();
4321
- var sessionReplacedNotificationSchema = z30.object({
4322
- threadId: z30.string().min(1),
4323
- providerThreadId: z30.string().min(1).nullable(),
4324
- reason: z30.string().min(1),
4325
- contextLost: z30.boolean().default(false),
4326
- showRuntimeNote: z30.boolean().default(false)
4335
+ var sessionReplacedNotificationSchema = z31.object({
4336
+ threadId: z31.string().min(1),
4337
+ providerThreadId: z31.string().min(1).nullable(),
4338
+ reason: z31.string().min(1),
4339
+ contextLost: z31.boolean().default(false),
4340
+ showRuntimeNote: z31.boolean().default(false)
4327
4341
  }).passthrough();
4328
- var providerRecoveryNotificationSchema = z30.object({
4329
- threadId: z30.string().min(1).optional(),
4342
+ var providerRecoveryNotificationSchema = z31.object({
4343
+ threadId: z31.string().min(1).optional(),
4330
4344
  ...providerRecoveryHintSchema.shape
4331
4345
  }).passthrough();
4332
- var errorNotificationSchema = z30.object({
4333
- threadId: z30.string().min(1).optional(),
4334
- providerThreadId: z30.string().min(1).optional(),
4335
- message: z30.string().min(1)
4346
+ var errorNotificationSchema = z31.object({
4347
+ threadId: z31.string().min(1).optional(),
4348
+ providerThreadId: z31.string().min(1).optional(),
4349
+ message: z31.string().min(1)
4336
4350
  }).passthrough();
4337
4351
 
4338
4352
  // ../provider-bridge-protocol/src/thread-delta.ts
4339
- import { z as z31 } from "zod";
4353
+ import { z as z32 } from "zod";
4340
4354
  var THREAD_DELTA_NOTIFICATION_METHOD = "thread/delta";
4341
4355
  var deltaPresentationSchema = threadEventItemPresentationSchema;
4342
4356
  var THREAD_DELTA_KEY_SEPARATOR = "";
4343
- var deltaKeyPartSchema = z31.string().min(1).refine((value) => !value.includes(THREAD_DELTA_KEY_SEPARATOR), {
4357
+ var deltaKeyPartSchema = z32.string().min(1).refine((value) => !value.includes(THREAD_DELTA_KEY_SEPARATOR), {
4344
4358
  message: "provider keys must not contain the internal key separator (\\u001f)"
4345
4359
  });
4346
- var deltaItemKeySchema = z31.object({
4360
+ var deltaItemKeySchema = z32.object({
4347
4361
  providerItemId: deltaKeyPartSchema.optional(),
4348
4362
  channel: deltaKeyPartSchema.optional(),
4349
4363
  parentRef: deltaKeyPartSchema.optional()
4350
4364
  });
4351
4365
  var providerTurnIdSchema = deltaKeyPartSchema;
4352
- var deltaFileChangeSchema = z31.object({
4353
- path: z31.string(),
4354
- kind: z31.enum(["add", "update", "delete"]),
4355
- movePath: z31.string().optional(),
4356
- diff: z31.string().optional(),
4357
- oldText: z31.string().optional(),
4358
- newText: z31.string().optional()
4359
- });
4360
- var deltaBackgroundTaskShapeSchema = z31.object({
4361
- type: z31.literal("backgroundTask"),
4362
- familyId: z31.string().min(1),
4363
- taskType: z31.string(),
4364
- description: z31.string(),
4366
+ var deltaFileChangeSchema = z32.object({
4367
+ path: z32.string(),
4368
+ kind: z32.enum(["add", "update", "delete"]),
4369
+ movePath: z32.string().optional(),
4370
+ diff: z32.string().optional(),
4371
+ oldText: z32.string().optional(),
4372
+ newText: z32.string().optional()
4373
+ });
4374
+ var deltaBackgroundTaskShapeSchema = z32.object({
4375
+ type: z32.literal("backgroundTask"),
4376
+ familyId: z32.string().min(1),
4377
+ taskType: z32.string(),
4378
+ description: z32.string(),
4365
4379
  status: threadEventItemStatusSchema,
4366
4380
  taskStatus: backgroundTaskStatusSchema,
4367
- skipTranscript: z31.boolean(),
4368
- workflowName: z31.string().optional(),
4381
+ skipTranscript: z32.boolean(),
4382
+ workflowName: z32.string().optional(),
4369
4383
  workflow: workflowProgressSnapshotSchema.optional(),
4370
4384
  usage: backgroundTaskUsageSchema.optional(),
4371
- summary: z31.string().optional(),
4372
- error: z31.string().optional(),
4373
- outputFile: z31.string().optional()
4385
+ summary: z32.string().optional(),
4386
+ error: z32.string().optional(),
4387
+ outputFile: z32.string().optional()
4374
4388
  });
4375
- var deltaFileReadShapeSchema = z31.object({
4376
- type: z31.literal("fileRead"),
4377
- path: z31.string(),
4378
- cmd: z31.string().optional()
4389
+ var deltaFileReadShapeSchema = z32.object({
4390
+ type: z32.literal("fileRead"),
4391
+ path: z32.string(),
4392
+ cmd: z32.string().optional()
4379
4393
  });
4380
- var deltaSearchShapeSchema = z31.object({
4381
- type: z31.literal("search"),
4394
+ var deltaSearchShapeSchema = z32.object({
4395
+ type: z32.literal("search"),
4382
4396
  mode: threadEventSearchModeSchema,
4383
- query: z31.string(),
4384
- path: z31.string().optional(),
4385
- cmd: z31.string().optional()
4397
+ query: z32.string(),
4398
+ path: z32.string().optional(),
4399
+ cmd: z32.string().optional()
4386
4400
  });
4387
- var deltaDelegationShapeSchema = z31.object({
4388
- type: z31.literal("delegation"),
4401
+ var deltaDelegationShapeSchema = z32.object({
4402
+ type: z32.literal("delegation"),
4389
4403
  childRef: deltaKeyPartSchema,
4390
- label: z31.string(),
4391
- background: z31.boolean(),
4392
- summary: z31.string().optional()
4404
+ label: z32.string(),
4405
+ background: z32.boolean(),
4406
+ summary: z32.string().optional()
4393
4407
  });
4394
- var deltaPlanStepsShapeSchema = z31.object({
4395
- type: z31.literal("planSteps"),
4396
- steps: z31.array(threadEventPlanStepSchema),
4397
- explanation: z31.string().optional()
4408
+ var deltaPlanStepsShapeSchema = z32.object({
4409
+ type: z32.literal("planSteps"),
4410
+ steps: z32.array(threadEventPlanStepSchema),
4411
+ explanation: z32.string().optional()
4398
4412
  });
4399
- var deltaExtensionShapeSchema = z31.object({
4400
- type: z31.literal("extension"),
4413
+ var deltaExtensionShapeSchema = z32.object({
4414
+ type: z32.literal("extension"),
4401
4415
  kind: extensionKindSchema,
4402
4416
  payload: jsonValueSchema
4403
4417
  });
4404
- var deltaItemShapeSchema = z31.discriminatedUnion("type", [
4405
- z31.object({
4406
- type: z31.literal("command"),
4407
- command: z31.string(),
4408
- cwd: z31.string(),
4409
- aggregatedOutput: z31.string().optional(),
4410
- exitCode: z31.number().optional(),
4411
- durationMs: z31.number().optional()
4418
+ var deltaItemShapeSchema = z32.discriminatedUnion("type", [
4419
+ z32.object({
4420
+ type: z32.literal("command"),
4421
+ command: z32.string(),
4422
+ cwd: z32.string(),
4423
+ aggregatedOutput: z32.string().optional(),
4424
+ exitCode: z32.number().optional(),
4425
+ durationMs: z32.number().optional()
4412
4426
  }),
4413
- z31.object({
4414
- type: z31.literal("fileChange"),
4415
- changes: z31.array(deltaFileChangeSchema)
4427
+ z32.object({
4428
+ type: z32.literal("fileChange"),
4429
+ changes: z32.array(deltaFileChangeSchema)
4416
4430
  }),
4417
- z31.object({
4418
- type: z31.literal("tool"),
4419
- tool: z31.string(),
4420
- server: z31.string().optional(),
4421
- args: z31.unknown().optional(),
4422
- result: z31.unknown().optional(),
4423
- error: z31.string().optional(),
4424
- durationMs: z31.number().optional()
4431
+ z32.object({
4432
+ type: z32.literal("tool"),
4433
+ tool: z32.string(),
4434
+ server: z32.string().optional(),
4435
+ args: z32.unknown().optional(),
4436
+ result: z32.unknown().optional(),
4437
+ error: z32.string().optional(),
4438
+ durationMs: z32.number().optional()
4425
4439
  }),
4426
- z31.object({ type: z31.literal("compaction") }),
4427
- z31.object({ type: z31.literal("agentMessage"), text: z31.string() }),
4428
- z31.object({
4429
- type: z31.literal("reasoning"),
4430
- summary: z31.array(z31.string()),
4431
- content: z31.array(z31.string())
4440
+ z32.object({ type: z32.literal("compaction") }),
4441
+ z32.object({ type: z32.literal("agentMessage"), text: z32.string() }),
4442
+ z32.object({
4443
+ type: z32.literal("reasoning"),
4444
+ summary: z32.array(z32.string()),
4445
+ content: z32.array(z32.string())
4432
4446
  }),
4433
- z31.object({ type: z31.literal("plan"), text: z31.string() }),
4434
- z31.object({
4435
- type: z31.literal("webSearch"),
4436
- queries: z31.array(z31.string()).min(1)
4447
+ z32.object({ type: z32.literal("plan"), text: z32.string() }),
4448
+ z32.object({
4449
+ type: z32.literal("webSearch"),
4450
+ queries: z32.array(z32.string()).min(1)
4437
4451
  }),
4438
- z31.object({
4439
- type: z31.literal("webFetch"),
4440
- url: z31.string(),
4441
- prompt: z31.string().nullable().optional(),
4442
- pattern: z31.string().nullable()
4452
+ z32.object({
4453
+ type: z32.literal("webFetch"),
4454
+ url: z32.string(),
4455
+ prompt: z32.string().nullable().optional(),
4456
+ pattern: z32.string().nullable()
4443
4457
  }),
4444
- z31.object({ type: z31.literal("imageView"), path: z31.string() }),
4445
- z31.object({
4446
- type: z31.literal("imageGeneration"),
4447
- prompt: z31.string().nullable(),
4448
- path: z31.string().nullable(),
4449
- result: z31.string().optional(),
4450
- error: z31.string().nullable(),
4451
- transparentBackground: z31.boolean()
4458
+ z32.object({ type: z32.literal("imageView"), path: z32.string() }),
4459
+ z32.object({
4460
+ type: z32.literal("imageGeneration"),
4461
+ prompt: z32.string().nullable(),
4462
+ path: z32.string().nullable(),
4463
+ result: z32.string().optional(),
4464
+ error: z32.string().nullable(),
4465
+ transparentBackground: z32.boolean()
4452
4466
  }),
4453
4467
  deltaBackgroundTaskShapeSchema,
4454
4468
  deltaFileReadShapeSchema,
@@ -4457,22 +4471,22 @@ var deltaItemShapeSchema = z31.discriminatedUnion("type", [
4457
4471
  deltaPlanStepsShapeSchema,
4458
4472
  deltaExtensionShapeSchema
4459
4473
  ]);
4460
- var deltaProgressSnapshotSchema = z31.discriminatedUnion("type", [
4474
+ var deltaProgressSnapshotSchema = z32.discriminatedUnion("type", [
4461
4475
  deltaBackgroundTaskShapeSchema,
4462
4476
  deltaDelegationShapeSchema
4463
4477
  ]);
4464
- var deltaTextChannelSchema = z31.enum([
4478
+ var deltaTextChannelSchema = z32.enum([
4465
4479
  "agentMessage",
4466
4480
  "reasoningSummary",
4467
4481
  "reasoningText",
4468
4482
  "plan"
4469
4483
  ]);
4470
- var deltaOutputChannelSchema = z31.enum(["command", "fileChange"]);
4471
- var deltaErrorSchema = z31.object({ message: z31.string() });
4472
- var deltaAttachSchema = z31.enum(["open", "currentOrLast"]);
4473
- var deltaNoTurnFallbackSchema = z31.object({
4484
+ var deltaOutputChannelSchema = z32.enum(["command", "fileChange"]);
4485
+ var deltaErrorSchema = z32.object({ message: z32.string() });
4486
+ var deltaAttachSchema = z32.enum(["open", "currentOrLast"]);
4487
+ var deltaNoTurnFallbackSchema = z32.object({
4474
4488
  raw: providerRawEventSchema,
4475
- rawType: z31.string()
4489
+ rawType: z32.string()
4476
4490
  });
4477
4491
  function requireExtensionPresentation(delta, ctx) {
4478
4492
  if (delta.item.type === "extension" && delta.presentation === void 0) {
@@ -4483,32 +4497,32 @@ function requireExtensionPresentation(delta, ctx) {
4483
4497
  });
4484
4498
  }
4485
4499
  }
4486
- var threadDeltaSchema = z31.discriminatedUnion("kind", [
4487
- z31.object({
4488
- kind: z31.literal("input.accepted"),
4500
+ var threadDeltaSchema = z32.discriminatedUnion("kind", [
4501
+ z32.object({
4502
+ kind: z32.literal("input.accepted"),
4489
4503
  clientRequestId: clientTurnRequestIdSchema,
4490
4504
  providerTurnId: providerTurnIdSchema.optional()
4491
4505
  }),
4492
- z31.object({
4493
- kind: z31.literal("input.provider"),
4494
- text: z31.string().min(1),
4506
+ z32.object({
4507
+ kind: z32.literal("input.provider"),
4508
+ text: z32.string().min(1),
4495
4509
  parentRef: deltaKeyPartSchema.optional()
4496
4510
  }),
4497
- z31.object({
4498
- kind: z31.literal("turn.open"),
4511
+ z32.object({
4512
+ kind: z32.literal("turn.open"),
4499
4513
  providerTurnId: providerTurnIdSchema.optional(),
4500
4514
  parentRef: deltaKeyPartSchema.optional()
4501
4515
  }),
4502
- z31.object({
4503
- kind: z31.literal("turn.boundary"),
4516
+ z32.object({
4517
+ kind: z32.literal("turn.boundary"),
4504
4518
  status: threadEventTurnStatusSchema,
4505
4519
  error: deltaErrorSchema.optional(),
4506
- providerCheckpointId: z31.string().min(1).optional(),
4507
- claimIfIdle: z31.boolean().optional(),
4520
+ providerCheckpointId: z32.string().min(1).optional(),
4521
+ claimIfIdle: z32.boolean().optional(),
4508
4522
  providerTurnId: providerTurnIdSchema.optional()
4509
4523
  }),
4510
- z31.object({
4511
- kind: z31.literal("item.open"),
4524
+ z32.object({
4525
+ kind: z32.literal("item.open"),
4512
4526
  key: deltaItemKeySchema,
4513
4527
  item: deltaItemShapeSchema,
4514
4528
  presentation: deltaPresentationSchema.optional(),
@@ -4516,140 +4530,140 @@ var threadDeltaSchema = z31.discriminatedUnion("kind", [
4516
4530
  providerTurnId: providerTurnIdSchema.optional(),
4517
4531
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
4518
4532
  }).superRefine(requireExtensionPresentation),
4519
- z31.object({
4520
- kind: z31.literal("item.close"),
4533
+ z32.object({
4534
+ kind: z32.literal("item.close"),
4521
4535
  key: deltaItemKeySchema,
4522
4536
  status: threadEventItemStatusSchema,
4523
- resultText: z31.string().optional(),
4524
- exitCode: z31.number().optional(),
4525
- aggregatedOutput: z31.string().optional(),
4526
- approvalStatus: z31.literal("denied").optional(),
4537
+ resultText: z32.string().optional(),
4538
+ exitCode: z32.number().optional(),
4539
+ aggregatedOutput: z32.string().optional(),
4540
+ approvalStatus: z32.literal("denied").optional(),
4527
4541
  item: deltaItemShapeSchema,
4528
4542
  presentation: deltaPresentationSchema.optional(),
4529
4543
  providerTurnId: providerTurnIdSchema.optional(),
4530
4544
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
4531
4545
  }).superRefine(requireExtensionPresentation),
4532
- z31.object({
4533
- kind: z31.literal("item.progress"),
4546
+ z32.object({
4547
+ kind: z32.literal("item.progress"),
4534
4548
  key: deltaItemKeySchema,
4535
- message: z31.string().optional(),
4549
+ message: z32.string().optional(),
4536
4550
  snapshot: deltaProgressSnapshotSchema.optional(),
4537
- flush: z31.boolean().optional(),
4551
+ flush: z32.boolean().optional(),
4538
4552
  providerTurnId: providerTurnIdSchema.optional(),
4539
4553
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
4540
4554
  }),
4541
- z31.object({
4542
- kind: z31.literal("item.textDelta"),
4555
+ z32.object({
4556
+ kind: z32.literal("item.textDelta"),
4543
4557
  key: deltaItemKeySchema,
4544
4558
  channel: deltaTextChannelSchema,
4545
- text: z31.string(),
4559
+ text: z32.string(),
4546
4560
  providerTurnId: providerTurnIdSchema.optional(),
4547
4561
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
4548
4562
  }),
4549
- z31.object({
4550
- kind: z31.literal("item.textClose"),
4563
+ z32.object({
4564
+ kind: z32.literal("item.textClose"),
4551
4565
  key: deltaItemKeySchema,
4552
4566
  channel: deltaTextChannelSchema,
4553
- text: z31.string().optional(),
4567
+ text: z32.string().optional(),
4554
4568
  providerTurnId: providerTurnIdSchema.optional(),
4555
4569
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
4556
4570
  }),
4557
- z31.object({
4558
- kind: z31.literal("item.outputDelta"),
4571
+ z32.object({
4572
+ kind: z32.literal("item.outputDelta"),
4559
4573
  key: deltaItemKeySchema,
4560
4574
  channel: deltaOutputChannelSchema,
4561
- text: z31.string(),
4575
+ text: z32.string(),
4562
4576
  providerTurnId: providerTurnIdSchema.optional(),
4563
4577
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
4564
4578
  }),
4565
- z31.object({
4566
- kind: z31.literal("command.outputSnapshot"),
4579
+ z32.object({
4580
+ kind: z32.literal("command.outputSnapshot"),
4567
4581
  key: deltaItemKeySchema,
4568
- text: z31.string(),
4582
+ text: z32.string(),
4569
4583
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
4570
4584
  }),
4571
- z31.object({
4572
- kind: z31.literal("usage"),
4585
+ z32.object({
4586
+ kind: z32.literal("usage"),
4573
4587
  total: threadEventTokenUsageBreakdownSchema,
4574
4588
  last: threadEventTokenUsageBreakdownSchema,
4575
- modelContextWindow: z31.number().nullable(),
4589
+ modelContextWindow: z32.number().nullable(),
4576
4590
  providerTurnId: providerTurnIdSchema.optional()
4577
4591
  }),
4578
- z31.object({
4579
- kind: z31.literal("contextWindow"),
4592
+ z32.object({
4593
+ kind: z32.literal("contextWindow"),
4580
4594
  snapshot: contextSnapshotSchema.optional(),
4581
- used: z31.number().nullable(),
4582
- size: z31.number().nullable().optional(),
4583
- estimated: z31.boolean(),
4595
+ used: z32.number().nullable(),
4596
+ size: z32.number().nullable().optional(),
4597
+ estimated: z32.boolean(),
4584
4598
  attach: deltaAttachSchema,
4585
4599
  providerTurnId: providerTurnIdSchema.optional()
4586
4600
  }),
4587
- z31.object({
4588
- kind: z31.literal("context.compacted"),
4601
+ z32.object({
4602
+ kind: z32.literal("context.compacted"),
4589
4603
  providerTurnId: providerTurnIdSchema.optional(),
4590
4604
  noTurnFallback: deltaNoTurnFallbackSchema.optional()
4591
4605
  }),
4592
- z31.object({ kind: z31.literal("context.cleared") }),
4593
- z31.object({
4594
- kind: z31.literal("turn.diff"),
4595
- diff: z31.string(),
4606
+ z32.object({ kind: z32.literal("context.cleared") }),
4607
+ z32.object({
4608
+ kind: z32.literal("turn.diff"),
4609
+ diff: z32.string(),
4596
4610
  providerTurnId: providerTurnIdSchema.optional()
4597
4611
  }),
4598
- z31.object({ kind: z31.literal("thread.started") }),
4599
- z31.object({
4600
- kind: z31.literal("thread.identity"),
4601
- providerThreadId: z31.string().min(1)
4612
+ z32.object({ kind: z32.literal("thread.started") }),
4613
+ z32.object({
4614
+ kind: z32.literal("thread.identity"),
4615
+ providerThreadId: z32.string().min(1)
4602
4616
  }),
4603
- z31.object({ kind: z31.literal("thread.name"), name: z31.string().min(1) }),
4604
- z31.object({
4605
- kind: z31.literal("extension.state"),
4617
+ z32.object({ kind: z32.literal("thread.name"), name: z32.string().min(1) }),
4618
+ z32.object({
4619
+ kind: z32.literal("extension.state"),
4606
4620
  extensionKind: extensionKindSchema,
4607
4621
  payload: jsonValueSchema
4608
4622
  }),
4609
- z31.object({
4610
- kind: z31.literal("provider.rateLimits"),
4623
+ z32.object({
4624
+ kind: z32.literal("provider.rateLimits"),
4611
4625
  rateLimits: providerRateLimitStateSchema
4612
4626
  }),
4613
- z31.object({
4614
- kind: z31.literal("provider.error"),
4615
- message: z31.string(),
4616
- detail: z31.string().optional(),
4617
- willRetry: z31.boolean().optional(),
4627
+ z32.object({
4628
+ kind: z32.literal("provider.error"),
4629
+ message: z32.string(),
4630
+ detail: z32.string().optional(),
4631
+ willRetry: z32.boolean().optional(),
4618
4632
  category: providerErrorCategorySchema.optional(),
4619
4633
  errorInfo: providerErrorInfoSchema.optional(),
4620
- settlesTurn: z31.boolean().optional(),
4634
+ settlesTurn: z32.boolean().optional(),
4621
4635
  providerTurnId: providerTurnIdSchema.optional(),
4622
- threadScoped: z31.boolean().optional()
4636
+ threadScoped: z32.boolean().optional()
4623
4637
  }),
4624
- z31.object({
4625
- kind: z31.literal("provider.modelFallback"),
4626
- originalModel: z31.string().min(1),
4627
- fallbackModel: z31.string().min(1),
4628
- reason: z31.enum(["refusal", "provider"]),
4629
- message: z31.string()
4638
+ z32.object({
4639
+ kind: z32.literal("provider.modelFallback"),
4640
+ originalModel: z32.string().min(1),
4641
+ fallbackModel: z32.string().min(1),
4642
+ reason: z32.enum(["refusal", "provider"]),
4643
+ message: z32.string()
4630
4644
  }),
4631
- z31.object({
4632
- kind: z31.literal("provider.warning"),
4633
- summary: z31.string().optional(),
4634
- details: z31.string().optional(),
4645
+ z32.object({
4646
+ kind: z32.literal("provider.warning"),
4647
+ summary: z32.string().optional(),
4648
+ details: z32.string().optional(),
4635
4649
  category: threadEventWarningCategorySchema.optional(),
4636
- vouchedTurn: z31.boolean().optional()
4650
+ vouchedTurn: z32.boolean().optional()
4637
4651
  }),
4638
- z31.object({
4639
- kind: z31.literal("unhandled"),
4652
+ z32.object({
4653
+ kind: z32.literal("unhandled"),
4640
4654
  raw: providerRawEventSchema,
4641
- rawType: z31.string(),
4642
- vouchedTurn: z31.boolean(),
4643
- onlyIfNoTurn: z31.boolean().optional(),
4655
+ rawType: z32.string(),
4656
+ vouchedTurn: z32.boolean(),
4657
+ onlyIfNoTurn: z32.boolean().optional(),
4644
4658
  parentRef: deltaKeyPartSchema.optional(),
4645
4659
  providerTurnId: providerTurnIdSchema.optional()
4646
4660
  }),
4647
- z31.object({ kind: z31.literal("session.ended") }),
4648
- z31.object({ kind: z31.literal("session.reset") })
4661
+ z32.object({ kind: z32.literal("session.ended") }),
4662
+ z32.object({ kind: z32.literal("session.reset") })
4649
4663
  ]);
4650
- var threadDeltaNotificationParamsSchema = z31.object({
4651
- threadId: z31.string().min(1),
4652
- deltas: z31.array(threadDeltaSchema)
4664
+ var threadDeltaNotificationParamsSchema = z32.object({
4665
+ threadId: z32.string().min(1),
4666
+ deltas: z32.array(threadDeltaSchema)
4653
4667
  }).passthrough();
4654
4668
 
4655
4669
  // ../process-utils/src/index.ts
@@ -4672,10 +4686,10 @@ function sanitizeInheritedChildProcessEnv(args) {
4672
4686
  }
4673
4687
 
4674
4688
  // ../provider-bridge-acp/src/launch-spec.ts
4675
- import { z as z32 } from "zod";
4676
- var acpNativeSkillRootsSchema = z32.object({
4677
- user: z32.array(providerNativeRootInputSchema).default([]),
4678
- project: z32.array(providerNativeRootInputSchema).default([])
4689
+ import { z as z33 } from "zod";
4690
+ var acpNativeSkillRootsSchema = z33.object({
4691
+ user: z33.array(providerNativeRootInputSchema).default([]),
4692
+ project: z33.array(providerNativeRootInputSchema).default([])
4679
4693
  }).strict().superRefine((roots, context) => {
4680
4694
  const normalized = providerNativeRootsSchema.safeParse(
4681
4695
  normalizeProviderNativeRoots(roots)
@@ -4691,16 +4705,16 @@ var acpNativeSkillRootsSchema = z32.object({
4691
4705
  });
4692
4706
  }
4693
4707
  });
4694
- var acpLaunchSpecSchema = z32.object({
4695
- displayName: z32.string().min(1),
4696
- command: z32.string().min(1),
4697
- args: z32.array(z32.string()),
4698
- env: z32.record(z32.string().min(1), z32.string()),
4699
- cwd: z32.string().min(1).optional(),
4700
- modelCli: z32.object({
4701
- listArgs: z32.array(z32.string()),
4702
- selectFlag: z32.string().min(1).optional(),
4703
- primaryModels: z32.array(z32.string())
4708
+ var acpLaunchSpecSchema = z33.object({
4709
+ displayName: z33.string().min(1),
4710
+ command: z33.string().min(1),
4711
+ args: z33.array(z33.string()),
4712
+ env: z33.record(z33.string().min(1), z33.string()),
4713
+ cwd: z33.string().min(1).optional(),
4714
+ modelCli: z33.object({
4715
+ listArgs: z33.array(z33.string()),
4716
+ selectFlag: z33.string().min(1).optional(),
4717
+ primaryModels: z33.array(z33.string())
4704
4718
  }).strict().transform(
4705
4719
  (modelCli) => modelCli.listArgs.length > 0 ? modelCli : void 0
4706
4720
  ).optional(),
@@ -4738,35 +4752,35 @@ function normalizeAcpLaunchSpec(spec) {
4738
4752
  }
4739
4753
 
4740
4754
  // src/claude-task-tools.ts
4741
- import { z as z33 } from "zod";
4742
- var claudeTaskToolNameSchema = z33.enum([
4755
+ import { z as z34 } from "zod";
4756
+ var claudeTaskToolNameSchema = z34.enum([
4743
4757
  "TaskCreate",
4744
4758
  "TaskGet",
4745
4759
  "TaskList",
4746
4760
  "TaskUpdate"
4747
4761
  ]);
4748
- var claudeTaskStatusSchema = z33.enum(["pending", "in_progress", "completed"]);
4749
- var claudeTaskCreateOutputSchema = z33.object({
4750
- task: z33.object({
4751
- id: z33.string(),
4752
- subject: z33.string()
4762
+ var claudeTaskStatusSchema = z34.enum(["pending", "in_progress", "completed"]);
4763
+ var claudeTaskCreateOutputSchema = z34.object({
4764
+ task: z34.object({
4765
+ id: z34.string(),
4766
+ subject: z34.string()
4753
4767
  }).passthrough()
4754
4768
  }).passthrough();
4755
- var claudeTaskGetOutputSchema = z33.object({
4756
- task: z33.object({
4757
- id: z33.string(),
4769
+ var claudeTaskGetOutputSchema = z34.object({
4770
+ task: z34.object({
4771
+ id: z34.string(),
4758
4772
  status: claudeTaskStatusSchema,
4759
- subject: z33.string()
4773
+ subject: z34.string()
4760
4774
  }).passthrough().nullable()
4761
4775
  }).passthrough();
4762
- var claudeTaskUpdateOutputSchema = z33.object({
4763
- success: z33.boolean(),
4764
- taskId: z33.string()
4776
+ var claudeTaskUpdateOutputSchema = z34.object({
4777
+ success: z34.boolean(),
4778
+ taskId: z34.string()
4765
4779
  }).passthrough();
4766
- var claudeTaskListOutputSchema = z33.object({
4767
- tasks: z33.array(z33.unknown())
4780
+ var claudeTaskListOutputSchema = z34.object({
4781
+ tasks: z34.array(z34.unknown())
4768
4782
  }).passthrough();
4769
- var claudeTaskToolOutputSchema = z33.union([
4783
+ var claudeTaskToolOutputSchema = z34.union([
4770
4784
  claudeTaskCreateOutputSchema,
4771
4785
  claudeTaskGetOutputSchema,
4772
4786
  claudeTaskListOutputSchema,