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