@codexhost/cli-darwin-x64 0.24.0 → 0.25.1

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.
Files changed (52) hide show
  1. package/README.md +1 -1
  2. package/app/codexhost-distribution.json +1 -1
  3. package/app/console-server.mjs +3166 -3040
  4. package/app/console-web.js +1156 -585
  5. package/app/desktop-controller.mjs +645 -264
  6. package/app/host-runtime.mjs +10906 -10282
  7. package/app/plugins/antigravity/plugin.mjs +515 -369
  8. package/app/plugins/claude-code/plugin.mjs +583 -438
  9. package/app/plugins/codebuddy/plugin.mjs +551 -429
  10. package/app/plugins/codex-usage/plugin.mjs +344 -224
  11. package/app/plugins/copilot/plugin.mjs +408 -286
  12. package/app/plugins/cursor-cli/plugin.mjs +499 -360
  13. package/app/plugins/deepseek-harness/plugin.mjs +759 -520
  14. package/app/plugins/devin/plugin.mjs +385 -265
  15. package/app/plugins/grok/plugin.mjs +638 -516
  16. package/app/plugins/hermes/plugin.mjs +456 -334
  17. package/app/plugins/kimi-code/plugin.mjs +454 -332
  18. package/app/plugins/kiro-cli/plugin.mjs +445 -325
  19. package/app/plugins/omp/plugin.mjs +707 -339
  20. package/app/plugins/opencode/plugin.mjs +873 -741
  21. package/app/plugins/pi/plugin.mjs +481 -359
  22. package/app/plugins/qoder/plugin.mjs +682 -560
  23. package/app/plugins/qoder-cn/plugin.mjs +682 -560
  24. package/app/plugins/qwen-code/plugin.mjs +475 -355
  25. package/app/plugins/workbuddy/plugin.mjs +549 -429
  26. package/app/plugins/zcode/plugin.mjs +352 -232
  27. package/app/renderer-extension.js +1706 -945
  28. package/app/web/assets/{index-IvFk9KT-.js → index-DUOvhHbV.js} +82 -82
  29. package/app/web/codexhost-settings.js +416 -51
  30. package/app/web/index.html +1 -1
  31. package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +64 -64
  32. package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
  33. package/app/web/plugins/deepseek-ai__dsh-api-workspace-controller/client.js +1 -1
  34. package/app/web/plugins/deepseek-ai__dsh-client-shortcuts/client.js +1 -1
  35. package/app/web/plugins/deepseek-ai__dsh-client-ui-brand-official/client.js +1 -1
  36. package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +74 -74
  37. package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +72 -72
  38. package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +97 -97
  39. package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +1 -1
  40. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +2 -2
  41. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-files/client.js +1 -1
  42. package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
  43. package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -8
  44. package/app/web-modules/server.mjs +2132 -1312
  45. package/bin/codexhost +0 -0
  46. package/libexec/CodexHost.app/Contents/Info.plist +30 -0
  47. package/libexec/CodexHost.app/Contents/MacOS/CodexHost +0 -0
  48. package/libexec/CodexHost.app/Contents/PkgInfo +1 -0
  49. package/libexec/CodexHost.app/Contents/Resources/AppIcon.icns +0 -0
  50. package/libexec/codexhost-shim +0 -0
  51. package/libexec/codexhost-updater +0 -0
  52. package/package.json +1 -1
@@ -147,8 +147,8 @@ var VERSION_MANAGER_ROOTS = "<version-managers>";
147
147
  function installRootExtensions(platform) {
148
148
  return platform === "win32" ? [".exe", ".cmd"] : [""];
149
149
  }
150
- function resolveHomeDirectory(input) {
151
- return input.homeDirectory ?? environmentValue(input.environment, "HOME") ?? environmentValue(input.environment, "USERPROFILE") ?? os.homedir();
150
+ function resolveHomeDirectory(input2) {
151
+ return input2.homeDirectory ?? environmentValue(input2.environment, "HOME") ?? environmentValue(input2.environment, "USERPROFILE") ?? os.homedir();
152
152
  }
153
153
  function templateVariables(environment, platform, home) {
154
154
  const pathFlavor = targetPath(platform);
@@ -181,36 +181,36 @@ function expandInstallRoot(template, environment, platform, home) {
181
181
  });
182
182
  return unresolved ? void 0 : joinTemplate(platform, substituted);
183
183
  }
184
- function installRootDirectories(spec, input, dependencies, platform, home) {
184
+ function installRootDirectories(spec, input2, dependencies, platform, home) {
185
185
  const templates = (platform === "win32" ? spec.installRoots?.windows : spec.installRoots?.posix) ?? [];
186
186
  const directories = [];
187
187
  for (const template of templates) {
188
188
  if (template === VERSION_MANAGER_ROOTS) {
189
189
  directories.push(...versionManagerBinaryDirectories({
190
190
  platform,
191
- environment: input.environment,
191
+ environment: input2.environment,
192
192
  home,
193
193
  ...dependencies.subdirectories ? { subdirectories: dependencies.subdirectories } : {}
194
194
  }));
195
195
  continue;
196
196
  }
197
- const directory = expandInstallRoot(template, input.environment, platform, home);
197
+ const directory = expandInstallRoot(template, input2.environment, platform, home);
198
198
  if (directory !== void 0)
199
199
  directories.push(directory);
200
200
  }
201
201
  return directories;
202
202
  }
203
- function harnessCandidates(spec, input, dependencies = {}) {
204
- const platform = input.platform ?? process.platform;
203
+ function harnessCandidates(spec, input2, dependencies = {}) {
204
+ const platform = input2.platform ?? process.platform;
205
205
  const pathFlavor = targetPath(platform);
206
- const configured = input.command ?? (spec.commandEnvironmentVariable ? environmentValue(input.environment, spec.commandEnvironmentVariable) : void 0);
206
+ const configured = input2.command ?? (spec.commandEnvironmentVariable ? environmentValue(input2.environment, spec.commandEnvironmentVariable) : void 0);
207
207
  const command = configured ?? spec.command;
208
208
  if (pathFlavor.isAbsolute(command) || command.includes("/") || command.includes("\\")) {
209
209
  return [{ candidate: command, source: "configured" }];
210
210
  }
211
211
  const candidates = [];
212
- const extensions = executableExtensions(command, platform, input.environment);
213
- for (const directory of pathDirectories(input.environment, platform)) {
212
+ const extensions = executableExtensions(command, platform, input2.environment);
213
+ for (const directory of pathDirectories(input2.environment, platform)) {
214
214
  for (const extension of extensions) {
215
215
  candidates.push({
216
216
  candidate: pathFlavor.join(directory, command + extension),
@@ -220,8 +220,8 @@ function harnessCandidates(spec, input, dependencies = {}) {
220
220
  }
221
221
  if (configured !== void 0)
222
222
  return candidates;
223
- const home = resolveHomeDirectory(input);
224
- for (const directory of installRootDirectories(spec, input, dependencies, platform, home)) {
223
+ const home = resolveHomeDirectory(input2);
224
+ for (const directory of installRootDirectories(spec, input2, dependencies, platform, home)) {
225
225
  for (const extension of installRootExtensions(platform)) {
226
226
  candidates.push({
227
227
  candidate: pathFlavor.join(directory, spec.command + extension),
@@ -231,12 +231,12 @@ function harnessCandidates(spec, input, dependencies = {}) {
231
231
  }
232
232
  return candidates;
233
233
  }
234
- function resolveHarnessExecutable(spec, input, dependencies = {}) {
235
- const platform = input.platform ?? process.platform;
234
+ function resolveHarnessExecutable(spec, input2, dependencies = {}) {
235
+ const platform = input2.platform ?? process.platform;
236
236
  const isExecutable = dependencies.isExecutable ?? ((candidate) => isExecutableFile(candidate, platform));
237
237
  const runnable = spec.runnableCandidate ?? ((candidate) => candidate);
238
238
  const context = { platform, isExecutable };
239
- for (const { candidate, source } of harnessCandidates(spec, input, dependencies)) {
239
+ for (const { candidate, source } of harnessCandidates(spec, input2, dependencies)) {
240
240
  const executable = runnable(candidate, context);
241
241
  if (executable !== void 0 && isExecutable(executable))
242
242
  return { executable, source };
@@ -247,13 +247,13 @@ function resolveHarnessExecutable(spec, input, dependencies = {}) {
247
247
  // ../../harness-discovery/dist/installation.js
248
248
  import { execFile } from "node:child_process";
249
249
  import { homedir } from "node:os";
250
- function runInstallationCommand(command, args, environment, timeout = 3e4) {
250
+ function runInstallationCommand(command, args, environment, timeout = 3e4, cwd) {
251
251
  const env = withNodeRuntimeOnPath(environment);
252
252
  const invocation = /\.[cm]?js$/i.test(command) ? commandInvocation(process.execPath, [command, ...args], env) : commandInvocation(command, args, env);
253
253
  return new Promise((resolve, reject) => {
254
254
  const child = execFile(invocation.command, invocation.arguments, {
255
255
  env,
256
- cwd: env.HOME ?? env.USERPROFILE ?? homedir(),
256
+ cwd: cwd ?? env.HOME ?? env.USERPROFILE ?? homedir(),
257
257
  encoding: "utf8",
258
258
  timeout,
259
259
  killSignal: "SIGKILL",
@@ -1052,8 +1052,8 @@ function cached(getter) {
1052
1052
  }
1053
1053
  };
1054
1054
  }
1055
- function nullish(input) {
1056
- return input === null || input === void 0;
1055
+ function nullish(input2) {
1056
+ return input2 === null || input2 === void 0;
1057
1057
  }
1058
1058
  function cleanRegex(source) {
1059
1059
  const start = source.startsWith("^") ? 1 : 0;
@@ -1140,8 +1140,8 @@ function randomString(length = 10) {
1140
1140
  function esc(str) {
1141
1141
  return JSON.stringify(str);
1142
1142
  }
1143
- function slugify(input) {
1144
- return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
1143
+ function slugify(input2) {
1144
+ return input2.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
1145
1145
  }
1146
1146
  var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
1147
1147
  };
@@ -1546,19 +1546,19 @@ function finalizeIssue(iss, ctx, config2) {
1546
1546
  }
1547
1547
  return rest;
1548
1548
  }
1549
- function getSizableOrigin(input) {
1550
- if (input instanceof Set)
1549
+ function getSizableOrigin(input2) {
1550
+ if (input2 instanceof Set)
1551
1551
  return "set";
1552
- if (input instanceof Map)
1552
+ if (input2 instanceof Map)
1553
1553
  return "map";
1554
- if (input instanceof File)
1554
+ if (input2 instanceof File)
1555
1555
  return "file";
1556
1556
  return "unknown";
1557
1557
  }
1558
- function getLengthableOrigin(input) {
1559
- if (Array.isArray(input))
1558
+ function getLengthableOrigin(input2) {
1559
+ if (Array.isArray(input2))
1560
1560
  return "array";
1561
- if (typeof input === "string")
1561
+ if (typeof input2 === "string")
1562
1562
  return "string";
1563
1563
  return "unknown";
1564
1564
  }
@@ -1584,12 +1584,12 @@ function parsedType(data) {
1584
1584
  return t;
1585
1585
  }
1586
1586
  function issue(...args) {
1587
- const [iss, input, inst] = args;
1587
+ const [iss, input2, inst] = args;
1588
1588
  if (typeof iss === "string") {
1589
1589
  return {
1590
1590
  message: iss,
1591
1591
  code: "custom",
1592
- input,
1592
+ input: input2,
1593
1593
  inst
1594
1594
  };
1595
1595
  }
@@ -2133,23 +2133,23 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
2133
2133
  bag.pattern = integer;
2134
2134
  });
2135
2135
  inst._zod.check = (payload) => {
2136
- const input = payload.value;
2136
+ const input2 = payload.value;
2137
2137
  if (isInt) {
2138
- if (!Number.isInteger(input)) {
2138
+ if (!Number.isInteger(input2)) {
2139
2139
  payload.issues.push({
2140
2140
  expected: origin,
2141
2141
  format: def.format,
2142
2142
  code: "invalid_type",
2143
2143
  continue: false,
2144
- input,
2144
+ input: input2,
2145
2145
  inst
2146
2146
  });
2147
2147
  return;
2148
2148
  }
2149
- if (!Number.isSafeInteger(input)) {
2150
- if (input > 0) {
2149
+ if (!Number.isSafeInteger(input2)) {
2150
+ if (input2 > 0) {
2151
2151
  payload.issues.push({
2152
- input,
2152
+ input: input2,
2153
2153
  code: "too_big",
2154
2154
  maximum: Number.MAX_SAFE_INTEGER,
2155
2155
  note: "Integers must be within the safe integer range.",
@@ -2160,7 +2160,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
2160
2160
  });
2161
2161
  } else {
2162
2162
  payload.issues.push({
2163
- input,
2163
+ input: input2,
2164
2164
  code: "too_small",
2165
2165
  minimum: Number.MIN_SAFE_INTEGER,
2166
2166
  note: "Integers must be within the safe integer range.",
@@ -2173,10 +2173,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
2173
2173
  return;
2174
2174
  }
2175
2175
  }
2176
- if (input < minimum) {
2176
+ if (input2 < minimum) {
2177
2177
  payload.issues.push({
2178
2178
  origin: "number",
2179
- input,
2179
+ input: input2,
2180
2180
  code: "too_small",
2181
2181
  minimum,
2182
2182
  inclusive: true,
@@ -2184,10 +2184,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
2184
2184
  continue: !def.abort
2185
2185
  });
2186
2186
  }
2187
- if (input > maximum) {
2187
+ if (input2 > maximum) {
2188
2188
  payload.issues.push({
2189
2189
  origin: "number",
2190
- input,
2190
+ input: input2,
2191
2191
  code: "too_big",
2192
2192
  maximum,
2193
2193
  inclusive: true,
@@ -2207,11 +2207,11 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
2207
2207
  bag.maximum = maximum;
2208
2208
  });
2209
2209
  inst._zod.check = (payload) => {
2210
- const input = payload.value;
2211
- if (input < minimum) {
2210
+ const input2 = payload.value;
2211
+ if (input2 < minimum) {
2212
2212
  payload.issues.push({
2213
2213
  origin: "bigint",
2214
- input,
2214
+ input: input2,
2215
2215
  code: "too_small",
2216
2216
  minimum,
2217
2217
  inclusive: true,
@@ -2219,10 +2219,10 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
2219
2219
  continue: !def.abort
2220
2220
  });
2221
2221
  }
2222
- if (input > maximum) {
2222
+ if (input2 > maximum) {
2223
2223
  payload.issues.push({
2224
2224
  origin: "bigint",
2225
- input,
2225
+ input: input2,
2226
2226
  code: "too_big",
2227
2227
  maximum,
2228
2228
  inclusive: true,
@@ -2245,16 +2245,16 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
2245
2245
  inst2._zod.bag.maximum = def.maximum;
2246
2246
  });
2247
2247
  inst._zod.check = (payload) => {
2248
- const input = payload.value;
2249
- const size = input.size;
2248
+ const input2 = payload.value;
2249
+ const size = input2.size;
2250
2250
  if (size <= def.maximum)
2251
2251
  return;
2252
2252
  payload.issues.push({
2253
- origin: getSizableOrigin(input),
2253
+ origin: getSizableOrigin(input2),
2254
2254
  code: "too_big",
2255
2255
  maximum: def.maximum,
2256
2256
  inclusive: true,
2257
- input,
2257
+ input: input2,
2258
2258
  inst,
2259
2259
  continue: !def.abort
2260
2260
  });
@@ -2273,16 +2273,16 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
2273
2273
  inst2._zod.bag.minimum = def.minimum;
2274
2274
  });
2275
2275
  inst._zod.check = (payload) => {
2276
- const input = payload.value;
2277
- const size = input.size;
2276
+ const input2 = payload.value;
2277
+ const size = input2.size;
2278
2278
  if (size >= def.minimum)
2279
2279
  return;
2280
2280
  payload.issues.push({
2281
- origin: getSizableOrigin(input),
2281
+ origin: getSizableOrigin(input2),
2282
2282
  code: "too_small",
2283
2283
  minimum: def.minimum,
2284
2284
  inclusive: true,
2285
- input,
2285
+ input: input2,
2286
2286
  inst,
2287
2287
  continue: !def.abort
2288
2288
  });
@@ -2302,13 +2302,13 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
2302
2302
  bag.size = def.size;
2303
2303
  });
2304
2304
  inst._zod.check = (payload) => {
2305
- const input = payload.value;
2306
- const size = input.size;
2305
+ const input2 = payload.value;
2306
+ const size = input2.size;
2307
2307
  if (size === def.size)
2308
2308
  return;
2309
2309
  const tooBig = size > def.size;
2310
2310
  payload.issues.push({
2311
- origin: getSizableOrigin(input),
2311
+ origin: getSizableOrigin(input2),
2312
2312
  ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
2313
2313
  inclusive: true,
2314
2314
  exact: true,
@@ -2331,17 +2331,17 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
2331
2331
  inst2._zod.bag.maximum = def.maximum;
2332
2332
  });
2333
2333
  inst._zod.check = (payload) => {
2334
- const input = payload.value;
2335
- const length = input.length;
2334
+ const input2 = payload.value;
2335
+ const length = input2.length;
2336
2336
  if (length <= def.maximum)
2337
2337
  return;
2338
- const origin = getLengthableOrigin(input);
2338
+ const origin = getLengthableOrigin(input2);
2339
2339
  payload.issues.push({
2340
2340
  origin,
2341
2341
  code: "too_big",
2342
2342
  maximum: def.maximum,
2343
2343
  inclusive: true,
2344
- input,
2344
+ input: input2,
2345
2345
  inst,
2346
2346
  continue: !def.abort
2347
2347
  });
@@ -2360,17 +2360,17 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
2360
2360
  inst2._zod.bag.minimum = def.minimum;
2361
2361
  });
2362
2362
  inst._zod.check = (payload) => {
2363
- const input = payload.value;
2364
- const length = input.length;
2363
+ const input2 = payload.value;
2364
+ const length = input2.length;
2365
2365
  if (length >= def.minimum)
2366
2366
  return;
2367
- const origin = getLengthableOrigin(input);
2367
+ const origin = getLengthableOrigin(input2);
2368
2368
  payload.issues.push({
2369
2369
  origin,
2370
2370
  code: "too_small",
2371
2371
  minimum: def.minimum,
2372
2372
  inclusive: true,
2373
- input,
2373
+ input: input2,
2374
2374
  inst,
2375
2375
  continue: !def.abort
2376
2376
  });
@@ -2390,11 +2390,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
2390
2390
  bag.length = def.length;
2391
2391
  });
2392
2392
  inst._zod.check = (payload) => {
2393
- const input = payload.value;
2394
- const length = input.length;
2393
+ const input2 = payload.value;
2394
+ const length = input2.length;
2395
2395
  if (length === def.length)
2396
2396
  return;
2397
- const origin = getLengthableOrigin(input);
2397
+ const origin = getLengthableOrigin(input2);
2398
2398
  const tooBig = length > def.length;
2399
2399
  payload.issues.push({
2400
2400
  origin,
@@ -3065,15 +3065,15 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
3065
3065
  payload.value = Number(payload.value);
3066
3066
  } catch (_) {
3067
3067
  }
3068
- const input = payload.value;
3069
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
3068
+ const input2 = payload.value;
3069
+ if (typeof input2 === "number" && !Number.isNaN(input2) && Number.isFinite(input2)) {
3070
3070
  return payload;
3071
3071
  }
3072
- const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
3072
+ const received = typeof input2 === "number" ? Number.isNaN(input2) ? "NaN" : !Number.isFinite(input2) ? "Infinity" : void 0 : void 0;
3073
3073
  payload.issues.push({
3074
3074
  expected: "number",
3075
3075
  code: "invalid_type",
3076
- input,
3076
+ input: input2,
3077
3077
  inst,
3078
3078
  ...received ? { received } : {}
3079
3079
  });
@@ -3093,13 +3093,13 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
3093
3093
  payload.value = Boolean(payload.value);
3094
3094
  } catch (_) {
3095
3095
  }
3096
- const input = payload.value;
3097
- if (typeof input === "boolean")
3096
+ const input2 = payload.value;
3097
+ if (typeof input2 === "boolean")
3098
3098
  return payload;
3099
3099
  payload.issues.push({
3100
3100
  expected: "boolean",
3101
3101
  code: "invalid_type",
3102
- input,
3102
+ input: input2,
3103
3103
  inst
3104
3104
  });
3105
3105
  return payload;
@@ -3132,13 +3132,13 @@ var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, d
3132
3132
  var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
3133
3133
  $ZodType.init(inst, def);
3134
3134
  inst._zod.parse = (payload, _ctx) => {
3135
- const input = payload.value;
3136
- if (typeof input === "symbol")
3135
+ const input2 = payload.value;
3136
+ if (typeof input2 === "symbol")
3137
3137
  return payload;
3138
3138
  payload.issues.push({
3139
3139
  expected: "symbol",
3140
3140
  code: "invalid_type",
3141
- input,
3141
+ input: input2,
3142
3142
  inst
3143
3143
  });
3144
3144
  return payload;
@@ -3149,13 +3149,13 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
3149
3149
  inst._zod.pattern = _undefined;
3150
3150
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
3151
3151
  inst._zod.parse = (payload, _ctx) => {
3152
- const input = payload.value;
3153
- if (typeof input === "undefined")
3152
+ const input2 = payload.value;
3153
+ if (typeof input2 === "undefined")
3154
3154
  return payload;
3155
3155
  payload.issues.push({
3156
3156
  expected: "undefined",
3157
3157
  code: "invalid_type",
3158
- input,
3158
+ input: input2,
3159
3159
  inst
3160
3160
  });
3161
3161
  return payload;
@@ -3166,13 +3166,13 @@ var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
3166
3166
  inst._zod.pattern = _null;
3167
3167
  inst._zod.values = /* @__PURE__ */ new Set([null]);
3168
3168
  inst._zod.parse = (payload, _ctx) => {
3169
- const input = payload.value;
3170
- if (input === null)
3169
+ const input2 = payload.value;
3170
+ if (input2 === null)
3171
3171
  return payload;
3172
3172
  payload.issues.push({
3173
3173
  expected: "null",
3174
3174
  code: "invalid_type",
3175
- input,
3175
+ input: input2,
3176
3176
  inst
3177
3177
  });
3178
3178
  return payload;
@@ -3201,13 +3201,13 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
3201
3201
  var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
3202
3202
  $ZodType.init(inst, def);
3203
3203
  inst._zod.parse = (payload, _ctx) => {
3204
- const input = payload.value;
3205
- if (typeof input === "undefined")
3204
+ const input2 = payload.value;
3205
+ if (typeof input2 === "undefined")
3206
3206
  return payload;
3207
3207
  payload.issues.push({
3208
3208
  expected: "void",
3209
3209
  code: "invalid_type",
3210
- input,
3210
+ input: input2,
3211
3211
  inst
3212
3212
  });
3213
3213
  return payload;
@@ -3222,15 +3222,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
3222
3222
  } catch (_err) {
3223
3223
  }
3224
3224
  }
3225
- const input = payload.value;
3226
- const isDate = input instanceof Date;
3227
- const isValidDate = isDate && !Number.isNaN(input.getTime());
3225
+ const input2 = payload.value;
3226
+ const isDate = input2 instanceof Date;
3227
+ const isValidDate = isDate && !Number.isNaN(input2.getTime());
3228
3228
  if (isValidDate)
3229
3229
  return payload;
3230
3230
  payload.issues.push({
3231
3231
  expected: "date",
3232
3232
  code: "invalid_type",
3233
- input,
3233
+ input: input2,
3234
3234
  ...isDate ? { received: "Invalid Date" } : {},
3235
3235
  inst
3236
3236
  });
@@ -3246,20 +3246,20 @@ function handleArrayResult(result, final, index) {
3246
3246
  var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
3247
3247
  $ZodType.init(inst, def);
3248
3248
  inst._zod.parse = (payload, ctx) => {
3249
- const input = payload.value;
3250
- if (!Array.isArray(input)) {
3249
+ const input2 = payload.value;
3250
+ if (!Array.isArray(input2)) {
3251
3251
  payload.issues.push({
3252
3252
  expected: "array",
3253
3253
  code: "invalid_type",
3254
- input,
3254
+ input: input2,
3255
3255
  inst
3256
3256
  });
3257
3257
  return payload;
3258
3258
  }
3259
- payload.value = Array(input.length);
3259
+ payload.value = Array(input2.length);
3260
3260
  const proms = [];
3261
- for (let i = 0; i < input.length; i++) {
3262
- const item = input[i];
3261
+ for (let i = 0; i < input2.length; i++) {
3262
+ const item = input2[i];
3263
3263
  const result = def.element._zod.run({
3264
3264
  value: item,
3265
3265
  issues: []
@@ -3276,8 +3276,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
3276
3276
  return payload;
3277
3277
  };
3278
3278
  });
3279
- function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
3280
- const isPresent = key in input;
3279
+ function handlePropertyResult(result, final, key, input2, isOptionalIn, isOptionalOut) {
3280
+ const isPresent = key in input2;
3281
3281
  if (result.issues.length) {
3282
3282
  if (isOptionalIn && isOptionalOut && !isPresent) {
3283
3283
  return;
@@ -3319,14 +3319,14 @@ function normalizeDef(def) {
3319
3319
  optionalKeys: new Set(okeys)
3320
3320
  };
3321
3321
  }
3322
- function handleCatchall(proms, input, payload, ctx, def, inst) {
3322
+ function handleCatchall(proms, input2, payload, ctx, def, inst) {
3323
3323
  const unrecognized = [];
3324
3324
  const keySet = def.keySet;
3325
3325
  const _catchall = def.catchall._zod;
3326
3326
  const t = _catchall.def.type;
3327
3327
  const isOptionalIn = _catchall.optin === "optional";
3328
3328
  const isOptionalOut = _catchall.optout === "optional";
3329
- for (const key in input) {
3329
+ for (const key in input2) {
3330
3330
  if (key === "__proto__")
3331
3331
  continue;
3332
3332
  if (keySet.has(key))
@@ -3335,18 +3335,18 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
3335
3335
  unrecognized.push(key);
3336
3336
  continue;
3337
3337
  }
3338
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
3338
+ const r = _catchall.run({ value: input2[key], issues: [] }, ctx);
3339
3339
  if (r instanceof Promise) {
3340
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3340
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
3341
3341
  } else {
3342
- handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3342
+ handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
3343
3343
  }
3344
3344
  }
3345
3345
  if (unrecognized.length) {
3346
3346
  payload.issues.push({
3347
3347
  code: "unrecognized_keys",
3348
3348
  keys: unrecognized,
3349
- input,
3349
+ input: input2,
3350
3350
  inst
3351
3351
  });
3352
3352
  }
@@ -3390,12 +3390,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3390
3390
  let value;
3391
3391
  inst._zod.parse = (payload, ctx) => {
3392
3392
  value ?? (value = _normalized.value);
3393
- const input = payload.value;
3394
- if (!isObject2(input)) {
3393
+ const input2 = payload.value;
3394
+ if (!isObject2(input2)) {
3395
3395
  payload.issues.push({
3396
3396
  expected: "object",
3397
3397
  code: "invalid_type",
3398
- input,
3398
+ input: input2,
3399
3399
  inst
3400
3400
  });
3401
3401
  return payload;
@@ -3407,17 +3407,17 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3407
3407
  const el = shape[key];
3408
3408
  const isOptionalIn = el._zod.optin === "optional";
3409
3409
  const isOptionalOut = el._zod.optout === "optional";
3410
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
3410
+ const r = el._zod.run({ value: input2[key], issues: [] }, ctx);
3411
3411
  if (r instanceof Promise) {
3412
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3412
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
3413
3413
  } else {
3414
- handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3414
+ handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
3415
3415
  }
3416
3416
  }
3417
3417
  if (!catchall) {
3418
3418
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
3419
3419
  }
3420
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
3420
+ return handleCatchall(proms, input2, payload, ctx, _normalized.value, inst);
3421
3421
  };
3422
3422
  });
3423
3423
  var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
@@ -3526,12 +3526,12 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3526
3526
  let value;
3527
3527
  inst._zod.parse = (payload, ctx) => {
3528
3528
  value ?? (value = _normalized.value);
3529
- const input = payload.value;
3530
- if (!isObject2(input)) {
3529
+ const input2 = payload.value;
3530
+ if (!isObject2(input2)) {
3531
3531
  payload.issues.push({
3532
3532
  expected: "object",
3533
3533
  code: "invalid_type",
3534
- input,
3534
+ input: input2,
3535
3535
  inst
3536
3536
  });
3537
3537
  return payload;
@@ -3542,7 +3542,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3542
3542
  payload = fastpass(payload, ctx);
3543
3543
  if (!catchall)
3544
3544
  return payload;
3545
- return handleCatchall([], input, payload, ctx, value, inst);
3545
+ return handleCatchall([], input2, payload, ctx, value, inst);
3546
3546
  }
3547
3547
  return superParse(payload, ctx);
3548
3548
  };
@@ -3702,17 +3702,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3702
3702
  return map2;
3703
3703
  });
3704
3704
  inst._zod.parse = (payload, ctx) => {
3705
- const input = payload.value;
3706
- if (!isObject(input)) {
3705
+ const input2 = payload.value;
3706
+ if (!isObject(input2)) {
3707
3707
  payload.issues.push({
3708
3708
  code: "invalid_type",
3709
3709
  expected: "object",
3710
- input,
3710
+ input: input2,
3711
3711
  inst
3712
3712
  });
3713
3713
  return payload;
3714
3714
  }
3715
- const opt = disc.value.get(input?.[def.discriminator]);
3715
+ const opt = disc.value.get(input2?.[def.discriminator]);
3716
3716
  if (opt) {
3717
3717
  return opt._zod.run(payload, ctx);
3718
3718
  }
@@ -3725,7 +3725,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3725
3725
  note: "No matching discriminator",
3726
3726
  discriminator: def.discriminator,
3727
3727
  options: Array.from(disc.value.keys()),
3728
- input,
3728
+ input: input2,
3729
3729
  path: [def.discriminator],
3730
3730
  inst
3731
3731
  });
@@ -3735,9 +3735,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3735
3735
  var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
3736
3736
  $ZodType.init(inst, def);
3737
3737
  inst._zod.parse = (payload, ctx) => {
3738
- const input = payload.value;
3739
- const left = def.left._zod.run({ value: input, issues: [] }, ctx);
3740
- const right = def.right._zod.run({ value: input, issues: [] }, ctx);
3738
+ const input2 = payload.value;
3739
+ const left = def.left._zod.run({ value: input2, issues: [] }, ctx);
3740
+ const right = def.right._zod.run({ value: input2, issues: [] }, ctx);
3741
3741
  const async = left instanceof Promise || right instanceof Promise;
3742
3742
  if (async) {
3743
3743
  return Promise.all([left, right]).then(([left2, right2]) => {
@@ -3834,10 +3834,10 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3834
3834
  $ZodType.init(inst, def);
3835
3835
  const items = def.items;
3836
3836
  inst._zod.parse = (payload, ctx) => {
3837
- const input = payload.value;
3838
- if (!Array.isArray(input)) {
3837
+ const input2 = payload.value;
3838
+ if (!Array.isArray(input2)) {
3839
3839
  payload.issues.push({
3840
- input,
3840
+ input: input2,
3841
3841
  inst,
3842
3842
  expected: "tuple",
3843
3843
  code: "invalid_type"
@@ -3849,23 +3849,23 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3849
3849
  const optinStart = getTupleOptStart(items, "optin");
3850
3850
  const optoutStart = getTupleOptStart(items, "optout");
3851
3851
  if (!def.rest) {
3852
- if (input.length < optinStart) {
3852
+ if (input2.length < optinStart) {
3853
3853
  payload.issues.push({
3854
3854
  code: "too_small",
3855
3855
  minimum: optinStart,
3856
3856
  inclusive: true,
3857
- input,
3857
+ input: input2,
3858
3858
  inst,
3859
3859
  origin: "array"
3860
3860
  });
3861
3861
  return payload;
3862
3862
  }
3863
- if (input.length > items.length) {
3863
+ if (input2.length > items.length) {
3864
3864
  payload.issues.push({
3865
3865
  code: "too_big",
3866
3866
  maximum: items.length,
3867
3867
  inclusive: true,
3868
- input,
3868
+ input: input2,
3869
3869
  inst,
3870
3870
  origin: "array"
3871
3871
  });
@@ -3873,7 +3873,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3873
3873
  }
3874
3874
  const itemResults = new Array(items.length);
3875
3875
  for (let i = 0; i < items.length; i++) {
3876
- const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
3876
+ const r = items[i]._zod.run({ value: input2[i], issues: [] }, ctx);
3877
3877
  if (r instanceof Promise) {
3878
3878
  proms.push(r.then((rr) => {
3879
3879
  itemResults[i] = rr;
@@ -3884,7 +3884,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3884
3884
  }
3885
3885
  if (def.rest) {
3886
3886
  let i = items.length - 1;
3887
- const rest = input.slice(items.length);
3887
+ const rest = input2.slice(items.length);
3888
3888
  for (const el of rest) {
3889
3889
  i++;
3890
3890
  const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
@@ -3896,9 +3896,9 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3896
3896
  }
3897
3897
  }
3898
3898
  if (proms.length) {
3899
- return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
3899
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input2, optoutStart));
3900
3900
  }
3901
- return handleTupleResults(itemResults, payload, items, input, optoutStart);
3901
+ return handleTupleResults(itemResults, payload, items, input2, optoutStart);
3902
3902
  };
3903
3903
  });
3904
3904
  function getTupleOptStart(items, key) {
@@ -3914,10 +3914,10 @@ function handleTupleResult(result, final, index) {
3914
3914
  }
3915
3915
  final.value[index] = result.value;
3916
3916
  }
3917
- function handleTupleResults(itemResults, final, items, input, optoutStart) {
3917
+ function handleTupleResults(itemResults, final, items, input2, optoutStart) {
3918
3918
  for (let i = 0; i < items.length; i++) {
3919
3919
  const r = itemResults[i];
3920
- const isPresent = i < input.length;
3920
+ const isPresent = i < input2.length;
3921
3921
  if (r.issues.length) {
3922
3922
  if (!isPresent && i >= optoutStart) {
3923
3923
  final.value.length = i;
@@ -3927,7 +3927,7 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
3927
3927
  }
3928
3928
  final.value[i] = r.value;
3929
3929
  }
3930
- for (let i = final.value.length - 1; i >= input.length; i--) {
3930
+ for (let i = final.value.length - 1; i >= input2.length; i--) {
3931
3931
  if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
3932
3932
  final.value.length = i;
3933
3933
  } else {
@@ -3939,12 +3939,12 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
3939
3939
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3940
3940
  $ZodType.init(inst, def);
3941
3941
  inst._zod.parse = (payload, ctx) => {
3942
- const input = payload.value;
3943
- if (!isPlainObject(input)) {
3942
+ const input2 = payload.value;
3943
+ if (!isPlainObject(input2)) {
3944
3944
  payload.issues.push({
3945
3945
  expected: "record",
3946
3946
  code: "invalid_type",
3947
- input,
3947
+ input: input2,
3948
3948
  inst
3949
3949
  });
3950
3950
  return payload;
@@ -3973,7 +3973,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3973
3973
  continue;
3974
3974
  }
3975
3975
  const outKey = keyResult.value;
3976
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3976
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
3977
3977
  if (result instanceof Promise) {
3978
3978
  proms.push(result.then((result2) => {
3979
3979
  if (result2.issues.length) {
@@ -3990,7 +3990,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3990
3990
  }
3991
3991
  }
3992
3992
  let unrecognized;
3993
- for (const key in input) {
3993
+ for (const key in input2) {
3994
3994
  if (!recordKeys.has(key)) {
3995
3995
  unrecognized = unrecognized ?? [];
3996
3996
  unrecognized.push(key);
@@ -3999,17 +3999,17 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3999
3999
  if (unrecognized && unrecognized.length > 0) {
4000
4000
  payload.issues.push({
4001
4001
  code: "unrecognized_keys",
4002
- input,
4002
+ input: input2,
4003
4003
  inst,
4004
4004
  keys: unrecognized
4005
4005
  });
4006
4006
  }
4007
4007
  } else {
4008
4008
  payload.value = {};
4009
- for (const key of Reflect.ownKeys(input)) {
4009
+ for (const key of Reflect.ownKeys(input2)) {
4010
4010
  if (key === "__proto__")
4011
4011
  continue;
4012
- if (!Object.prototype.propertyIsEnumerable.call(input, key))
4012
+ if (!Object.prototype.propertyIsEnumerable.call(input2, key))
4013
4013
  continue;
4014
4014
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
4015
4015
  if (keyResult instanceof Promise) {
@@ -4027,7 +4027,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
4027
4027
  }
4028
4028
  if (keyResult.issues.length) {
4029
4029
  if (def.mode === "loose") {
4030
- payload.value[key] = input[key];
4030
+ payload.value[key] = input2[key];
4031
4031
  } else {
4032
4032
  payload.issues.push({
4033
4033
  code: "invalid_key",
@@ -4040,7 +4040,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
4040
4040
  }
4041
4041
  continue;
4042
4042
  }
4043
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
4043
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
4044
4044
  if (result instanceof Promise) {
4045
4045
  proms.push(result.then((result2) => {
4046
4046
  if (result2.issues.length) {
@@ -4065,27 +4065,27 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
4065
4065
  var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
4066
4066
  $ZodType.init(inst, def);
4067
4067
  inst._zod.parse = (payload, ctx) => {
4068
- const input = payload.value;
4069
- if (!(input instanceof Map)) {
4068
+ const input2 = payload.value;
4069
+ if (!(input2 instanceof Map)) {
4070
4070
  payload.issues.push({
4071
4071
  expected: "map",
4072
4072
  code: "invalid_type",
4073
- input,
4073
+ input: input2,
4074
4074
  inst
4075
4075
  });
4076
4076
  return payload;
4077
4077
  }
4078
4078
  const proms = [];
4079
4079
  payload.value = /* @__PURE__ */ new Map();
4080
- for (const [key, value] of input) {
4080
+ for (const [key, value] of input2) {
4081
4081
  const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
4082
4082
  const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
4083
4083
  if (keyResult instanceof Promise || valueResult instanceof Promise) {
4084
4084
  proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
4085
- handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx);
4085
+ handleMapResult(keyResult2, valueResult2, payload, key, input2, inst, ctx);
4086
4086
  }));
4087
4087
  } else {
4088
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
4088
+ handleMapResult(keyResult, valueResult, payload, key, input2, inst, ctx);
4089
4089
  }
4090
4090
  }
4091
4091
  if (proms.length)
@@ -4093,7 +4093,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
4093
4093
  return payload;
4094
4094
  };
4095
4095
  });
4096
- function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
4096
+ function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
4097
4097
  if (keyResult.issues.length) {
4098
4098
  if (propertyKeyTypes.has(typeof key)) {
4099
4099
  final.issues.push(...prefixIssues(key, keyResult.issues));
@@ -4101,7 +4101,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
4101
4101
  final.issues.push({
4102
4102
  code: "invalid_key",
4103
4103
  origin: "map",
4104
- input,
4104
+ input: input2,
4105
4105
  inst,
4106
4106
  issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
4107
4107
  });
@@ -4114,7 +4114,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
4114
4114
  final.issues.push({
4115
4115
  origin: "map",
4116
4116
  code: "invalid_element",
4117
- input,
4117
+ input: input2,
4118
4118
  inst,
4119
4119
  key,
4120
4120
  issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
@@ -4126,10 +4126,10 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
4126
4126
  var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
4127
4127
  $ZodType.init(inst, def);
4128
4128
  inst._zod.parse = (payload, ctx) => {
4129
- const input = payload.value;
4130
- if (!(input instanceof Set)) {
4129
+ const input2 = payload.value;
4130
+ if (!(input2 instanceof Set)) {
4131
4131
  payload.issues.push({
4132
- input,
4132
+ input: input2,
4133
4133
  inst,
4134
4134
  expected: "set",
4135
4135
  code: "invalid_type"
@@ -4138,7 +4138,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
4138
4138
  }
4139
4139
  const proms = [];
4140
4140
  payload.value = /* @__PURE__ */ new Set();
4141
- for (const item of input) {
4141
+ for (const item of input2) {
4142
4142
  const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
4143
4143
  if (result instanceof Promise) {
4144
4144
  proms.push(result.then((result2) => handleSetResult(result2, payload)));
@@ -4163,14 +4163,14 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
4163
4163
  inst._zod.values = valuesSet;
4164
4164
  inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
4165
4165
  inst._zod.parse = (payload, _ctx) => {
4166
- const input = payload.value;
4167
- if (valuesSet.has(input)) {
4166
+ const input2 = payload.value;
4167
+ if (valuesSet.has(input2)) {
4168
4168
  return payload;
4169
4169
  }
4170
4170
  payload.issues.push({
4171
4171
  code: "invalid_value",
4172
4172
  values,
4173
- input,
4173
+ input: input2,
4174
4174
  inst
4175
4175
  });
4176
4176
  return payload;
@@ -4185,14 +4185,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
4185
4185
  inst._zod.values = values;
4186
4186
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
4187
4187
  inst._zod.parse = (payload, _ctx) => {
4188
- const input = payload.value;
4189
- if (values.has(input)) {
4188
+ const input2 = payload.value;
4189
+ if (values.has(input2)) {
4190
4190
  return payload;
4191
4191
  }
4192
4192
  payload.issues.push({
4193
4193
  code: "invalid_value",
4194
4194
  values: def.values,
4195
- input,
4195
+ input: input2,
4196
4196
  inst
4197
4197
  });
4198
4198
  return payload;
@@ -4201,13 +4201,13 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
4201
4201
  var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
4202
4202
  $ZodType.init(inst, def);
4203
4203
  inst._zod.parse = (payload, _ctx) => {
4204
- const input = payload.value;
4205
- if (input instanceof File)
4204
+ const input2 = payload.value;
4205
+ if (input2 instanceof File)
4206
4206
  return payload;
4207
4207
  payload.issues.push({
4208
4208
  expected: "file",
4209
4209
  code: "invalid_type",
4210
- input,
4210
+ input: input2,
4211
4211
  inst
4212
4212
  });
4213
4213
  return payload;
@@ -4237,8 +4237,8 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
4237
4237
  return payload;
4238
4238
  };
4239
4239
  });
4240
- function handleOptionalResult(result, input) {
4241
- if (input === void 0 && (result.issues.length || result.fallback)) {
4240
+ function handleOptionalResult(result, input2) {
4241
+ if (input2 === void 0 && (result.issues.length || result.fallback)) {
4242
4242
  return { issues: [], value: void 0 };
4243
4243
  }
4244
4244
  return result;
@@ -4256,11 +4256,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
4256
4256
  });
4257
4257
  inst._zod.parse = (payload, ctx) => {
4258
4258
  if (def.innerType._zod.optin === "optional") {
4259
- const input = payload.value;
4259
+ const input2 = payload.value;
4260
4260
  const result = def.innerType._zod.run(payload, ctx);
4261
4261
  if (result instanceof Promise)
4262
- return result.then((r) => handleOptionalResult(r, input));
4263
- return handleOptionalResult(result, input);
4262
+ return result.then((r) => handleOptionalResult(r, input2));
4263
+ return handleOptionalResult(result, input2);
4264
4264
  }
4265
4265
  if (payload.value === void 0) {
4266
4266
  return payload;
@@ -4685,20 +4685,20 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
4685
4685
  return payload;
4686
4686
  };
4687
4687
  inst._zod.check = (payload) => {
4688
- const input = payload.value;
4689
- const r = def.fn(input);
4688
+ const input2 = payload.value;
4689
+ const r = def.fn(input2);
4690
4690
  if (r instanceof Promise) {
4691
- return r.then((r2) => handleRefineResult(r2, payload, input, inst));
4691
+ return r.then((r2) => handleRefineResult(r2, payload, input2, inst));
4692
4692
  }
4693
- handleRefineResult(r, payload, input, inst);
4693
+ handleRefineResult(r, payload, input2, inst);
4694
4694
  return;
4695
4695
  };
4696
4696
  });
4697
- function handleRefineResult(result, payload, input, inst) {
4697
+ function handleRefineResult(result, payload, input2, inst) {
4698
4698
  if (!result) {
4699
4699
  const _iss = {
4700
4700
  code: "custom",
4701
- input,
4701
+ input: input2,
4702
4702
  inst,
4703
4703
  // incorporates params.error into issue reporting
4704
4704
  path: [...inst._zod.def.path ?? []],
@@ -7985,8 +7985,8 @@ function ko_default() {
7985
7985
  }
7986
7986
 
7987
7987
  // ../../../node_modules/zod/v4/locales/lt.js
7988
- var capitalizeFirstCharacter = (text) => {
7989
- return text.charAt(0).toUpperCase() + text.slice(1);
7988
+ var capitalizeFirstCharacter = (text2) => {
7989
+ return text2.charAt(0).toUpperCase() + text2.slice(1);
7990
7990
  };
7991
7991
  function getUnitTypeFromNumber(number4) {
7992
7992
  const abs = Math.abs(number4);
@@ -11386,23 +11386,23 @@ function _overwrite(tx) {
11386
11386
  }
11387
11387
  // @__NO_SIDE_EFFECTS__
11388
11388
  function _normalize(form) {
11389
- return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
11389
+ return /* @__PURE__ */ _overwrite((input2) => input2.normalize(form));
11390
11390
  }
11391
11391
  // @__NO_SIDE_EFFECTS__
11392
11392
  function _trim() {
11393
- return /* @__PURE__ */ _overwrite((input) => input.trim());
11393
+ return /* @__PURE__ */ _overwrite((input2) => input2.trim());
11394
11394
  }
11395
11395
  // @__NO_SIDE_EFFECTS__
11396
11396
  function _toLowerCase() {
11397
- return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
11397
+ return /* @__PURE__ */ _overwrite((input2) => input2.toLowerCase());
11398
11398
  }
11399
11399
  // @__NO_SIDE_EFFECTS__
11400
11400
  function _toUpperCase() {
11401
- return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
11401
+ return /* @__PURE__ */ _overwrite((input2) => input2.toUpperCase());
11402
11402
  }
11403
11403
  // @__NO_SIDE_EFFECTS__
11404
11404
  function _slugify() {
11405
- return /* @__PURE__ */ _overwrite((input) => slugify(input));
11405
+ return /* @__PURE__ */ _overwrite((input2) => slugify(input2));
11406
11406
  }
11407
11407
  // @__NO_SIDE_EFFECTS__
11408
11408
  function _array(Class2, element, params) {
@@ -11707,8 +11707,8 @@ function _stringbool(Classes, _params) {
11707
11707
  type: "pipe",
11708
11708
  in: stringSchema,
11709
11709
  out: booleanSchema,
11710
- transform: ((input, payload) => {
11711
- let data = input;
11710
+ transform: ((input2, payload) => {
11711
+ let data = input2;
11712
11712
  if (params.case !== "sensitive")
11713
11713
  data = data.toLowerCase();
11714
11714
  if (truthySet.has(data)) {
@@ -11727,8 +11727,8 @@ function _stringbool(Classes, _params) {
11727
11727
  return {};
11728
11728
  }
11729
11729
  }),
11730
- reverseTransform: ((input, _payload) => {
11731
- if (input === true) {
11730
+ reverseTransform: ((input2, _payload) => {
11731
+ if (input2 === true) {
11732
11732
  return truthyArray[0] || "true";
11733
11733
  } else {
11734
11734
  return falsyArray[0] || "false";
@@ -12624,9 +12624,9 @@ var allProcessors = {
12624
12624
  optional: optionalProcessor,
12625
12625
  lazy: lazyProcessor
12626
12626
  };
12627
- function toJSONSchema(input, params) {
12628
- if ("_idmap" in input) {
12629
- const registry2 = input;
12627
+ function toJSONSchema(input2, params) {
12628
+ if ("_idmap" in input2) {
12629
+ const registry2 = input2;
12630
12630
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
12631
12631
  const defs = {};
12632
12632
  for (const entry of registry2._idmap.entries()) {
@@ -12654,9 +12654,9 @@ function toJSONSchema(input, params) {
12654
12654
  return { schemas };
12655
12655
  }
12656
12656
  const ctx = initializeContext({ ...params, processors: allProcessors });
12657
- process2(input, ctx);
12658
- extractDefs(ctx, input);
12659
- return finalize(ctx, input);
12657
+ process2(input2, ctx);
12658
+ extractDefs(ctx, input2);
12659
+ return finalize(ctx, input2);
12660
12660
  }
12661
12661
 
12662
12662
  // ../../../node_modules/zod/v4/core/json-schema-generator.js
@@ -14933,7 +14933,7 @@ var codexhostErrorSchema = external_exports.strictObject({
14933
14933
 
14934
14934
  // ../../shared-contracts/dist/harness-presentation.js
14935
14935
  var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
14936
- var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
14936
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text2) => text2.trim().length > 0);
14937
14937
  var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
14938
14938
  label: displayText(256).optional(),
14939
14939
  description: displayText(1024).optional()
@@ -15022,7 +15022,7 @@ var usageMeasurementsSchema = external_exports.object({
15022
15022
  outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
15023
15023
  timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
15024
15024
  }).strict();
15025
- var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
15025
+ var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
15026
15026
  var composerIndicatorsSchema = external_exports.array(external_exports.object({
15027
15027
  kind: external_exports.literal("countdown"),
15028
15028
  id: external_exports.string().min(1).max(64),
@@ -15405,6 +15405,8 @@ var externalThreadInspectionSchema = external_exports.object({
15405
15405
  effectiveThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
15406
15406
  availableThinkingOptions: harnessThinkingOptionsSchema.optional(),
15407
15407
  effectivePermissionModeId: harnessPermissionModeIdSchema.optional(),
15408
+ /** Live Session catalog when it, not the Adapter inspection, contains `effectiveModel`. */
15409
+ catalog: harnessModelCatalogSchema.optional(),
15408
15410
  history: harnessHistoryCapabilitiesSchema,
15409
15411
  usage: threadUsageSnapshotSchema.optional(),
15410
15412
  locked: external_exports.literal(true)
@@ -15463,9 +15465,9 @@ var threadSteeringInspectParamsSchema = external_exports.object({
15463
15465
  }).strict();
15464
15466
  var threadSteeringContextSchema = external_exports.object({
15465
15467
  kind: external_exports.literal("application"),
15466
- value: external_exports.string().transform((text, context) => {
15468
+ value: external_exports.string().transform((text2, context) => {
15467
15469
  try {
15468
- return JSON.parse(text);
15470
+ return JSON.parse(text2);
15469
15471
  } catch {
15470
15472
  context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
15471
15473
  return external_exports.NEVER;
@@ -15600,8 +15602,8 @@ var desktopExtensionHttpUrlSchema = external_exports.string().trim().max(2048).r
15600
15602
  const { username, password } = new URL(value);
15601
15603
  return !username && !password && !/[\\\s]/u.test(value);
15602
15604
  }, "URL must not contain credentials, backslashes, or whitespace");
15603
- function localizedText(text) {
15604
- return external_exports.strictObject({ en: text, "zh-CN": text });
15605
+ function localizedText(text2) {
15606
+ return external_exports.strictObject({ en: text2, "zh-CN": text2 });
15605
15607
  }
15606
15608
  var desktopExtensionLocalizedTextSchema = localizedText(external_exports.string().trim().min(1));
15607
15609
  var categoriesSchema = external_exports.array(desktopExtensionCategorySchema).max(desktopExtensionCategorySchema.options.length).refine((categories) => new Set(categories).size === categories.length, "Duplicate categories");
@@ -15718,8 +15720,8 @@ var desktopExtensionTrustTierSchema = external_exports.enum(["official", "commun
15718
15720
  function isGitHubDesktopExtensionZipballUrl(url2) {
15719
15721
  return url2.origin === "https://api.github.com" && /^\/repos\/[\w-]+\/[\w.-]+\/zipball(?:\/[^/]+)?\/?$/u.test(url2.pathname);
15720
15722
  }
15721
- var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input) => {
15722
- const url2 = new URL(input);
15723
+ var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input2) => {
15724
+ const url2 = new URL(input2);
15723
15725
  return /\.zip$/iu.test(url2.pathname) || isGitHubDesktopExtensionZipballUrl(url2) || url2.origin === "https://github.com" && /^\/[\w-]+\/[\w.-]+\/zipball(?:\/.+)?\/?$/u.test(url2.pathname) || url2.origin === "https://codeload.github.com" && /^\/[\w-]+\/[\w.-]+\/(?:zip|zipball|legacy\.zip)\/.+$/u.test(url2.pathname);
15724
15726
  }, "Expected a .zip download URL or a GitHub zipball URL");
15725
15727
  var desktopExtensionCatalogEntrySchema = external_exports.strictObject({
@@ -16070,6 +16072,8 @@ var CLIENT_CHANNEL_METHODS = [
16070
16072
  "codexhost/workspace/read",
16071
16073
  "codexhost/thread/tree/read",
16072
16074
  "codexhost/thread/pins/list",
16075
+ "codexhost/thread/sections/list",
16076
+ "codexhost/thread/sections/move",
16073
16077
  "codexhost/thread/pins/set",
16074
16078
  "codexhost/harness/plugins/list",
16075
16079
  "codexhost/harness/inspect",
@@ -16108,8 +16112,21 @@ var CLIENT_CHANNEL_METHODS = [
16108
16112
  "codexhost/update/check",
16109
16113
  "codexhost/update/start",
16110
16114
  "codexhost/update/status",
16115
+ "codexhost/announcement/get",
16116
+ "codexhost/announcement/acknowledge",
16111
16117
  "codexhost/sessions/loaded/list"
16112
16118
  ];
16119
+ var clientThreadSectionsSchema = external_exports.object({
16120
+ sections: external_exports.array(external_exports.object({
16121
+ id: external_exports.string().min(1),
16122
+ name: external_exports.string().min(1),
16123
+ threads: external_exports.array(jsonObjectSchema)
16124
+ }).strict())
16125
+ }).strict();
16126
+ var clientThreadSectionMoveSchema = external_exports.object({
16127
+ threadId: external_exports.string().min(1).max(1024),
16128
+ sectionId: external_exports.string().min(1).max(1024).nullable()
16129
+ }).strict();
16113
16130
  var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
16114
16131
  var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
16115
16132
  var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
@@ -16651,8 +16668,8 @@ var harnessPreferencePatchSchema = external_exports.strictObject({
16651
16668
  operations: external_exports.array(harnessPreferenceOperationSchema).min(1).max(256),
16652
16669
  initializeOnly: external_exports.boolean().optional(),
16653
16670
  expectedRevision: external_exports.number().int().nonnegative().optional()
16654
- }).superRefine((input, ctx) => {
16655
- for (const operation of input.operations) {
16671
+ }).superRefine((input2, ctx) => {
16672
+ for (const operation of input2.operations) {
16656
16673
  if (operation.kind === "newThread" && (!operation.lastHarness && !operation.configuration || Boolean(operation.harnessId) !== Boolean(operation.configuration)))
16657
16674
  ctx.addIssue({
16658
16675
  code: "custom",
@@ -17054,13 +17071,18 @@ var harnessLaunchSettingsSchema = external_exports.object({
17054
17071
  // ../../shared-contracts/dist/harness-installation.js
17055
17072
  var harnessInstallationParamsSchema = external_exports.object({
17056
17073
  harnessId: harnessIdSchema,
17057
- action: external_exports.enum(["check", "update", "install"])
17058
- }).strict();
17074
+ action: external_exports.enum(["check", "update", "install"]),
17075
+ confirmedVersion: external_exports.string().min(1).max(128).optional()
17076
+ }).strict().refine(({ action, confirmedVersion }) => action === "update" || confirmedVersion === void 0);
17059
17077
  var harnessInstallationStateSchema = external_exports.object({
17060
17078
  currentVersion: external_exports.string().min(1).max(128),
17061
17079
  latestVersion: external_exports.string().min(1).max(128),
17062
17080
  updateAvailable: external_exports.boolean(),
17063
17081
  canUpdate: external_exports.boolean(),
17082
+ /** Present when the Adapter has a verified list and the available target is outside it. */
17083
+ latestVerifiedVersion: external_exports.string().min(1).max(128).optional(),
17084
+ /** Update preflight stopped before running the installer; latestVersion needs confirmation. */
17085
+ confirmationRequired: external_exports.literal(true).optional(),
17064
17086
  /** Defaults to CLI; some Harnesses ship only inside a desktop application. */
17065
17087
  versionKind: external_exports.enum(["cli", "application"]).optional(),
17066
17088
  /** Official download opened by the user; does not imply an automatic installation. */
@@ -17390,6 +17412,38 @@ var updateStatusResultSchema = external_exports.strictObject({
17390
17412
  status: updateStatusSchema.nullable()
17391
17413
  });
17392
17414
 
17415
+ // ../../shared-contracts/dist/release-announcement.js
17416
+ var RELEASE_ANNOUNCEMENT_MAX_THEMES = 12;
17417
+ var releaseAnnouncementThemeSchema = external_exports.strictObject({
17418
+ icon: external_exports.string().min(1).max(16).optional(),
17419
+ title: external_exports.string().min(1).max(120),
17420
+ body: external_exports.string().min(1).max(1200),
17421
+ contributors: external_exports.array(external_exports.string().min(1).max(39)).max(30)
17422
+ });
17423
+ var releaseAnnouncementContentSchema = external_exports.strictObject({
17424
+ summary: external_exports.string().min(1).max(600).optional(),
17425
+ themes: external_exports.array(releaseAnnouncementThemeSchema).min(1).max(RELEASE_ANNOUNCEMENT_MAX_THEMES)
17426
+ });
17427
+ var releaseAnnouncementSchema = external_exports.strictObject({
17428
+ version: updateSemanticVersionSchema,
17429
+ publishedAt: external_exports.iso.datetime(),
17430
+ url: external_exports.string().max(300).regex(/^https:\/\/github\.com\/BytePioneer-AI\/codex-host\/releases\/tag\/v[0-9A-Za-z.+-]+$/u),
17431
+ zh: releaseAnnouncementContentSchema.nullable(),
17432
+ en: releaseAnnouncementContentSchema.nullable()
17433
+ }).refine((value) => value.zh !== null || value.en !== null, {
17434
+ message: "an announcement needs at least one language"
17435
+ });
17436
+ var releaseAnnouncementGetParamsSchema = external_exports.strictObject({
17437
+ manual: external_exports.boolean().optional()
17438
+ });
17439
+ var releaseAnnouncementGetResultSchema = external_exports.strictObject({
17440
+ announcement: releaseAnnouncementSchema.nullable(),
17441
+ unread: external_exports.boolean()
17442
+ });
17443
+ var releaseAnnouncementAcknowledgeParamsSchema = external_exports.strictObject({
17444
+ version: updateSemanticVersionSchema
17445
+ });
17446
+
17393
17447
  // ../../shared-contracts/dist/thread-watch-notice.js
17394
17448
  var THREAD_WATCH_NOTICE_OUTCOMES = [
17395
17449
  "completed",
@@ -17437,17 +17491,67 @@ var remoteSshSetupResultSchema = external_exports.object({ state: external_expor
17437
17491
 
17438
17492
  // ../../shared-contracts/dist/remote-sessions.js
17439
17493
  var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
17440
- var identity = external_exports.string().min(1).max(1024);
17494
+ var REMOTE_IDENTITY_MAX_LENGTH = 1024;
17495
+ var identity = external_exports.string().min(1).max(REMOTE_IDENTITY_MAX_LENGTH);
17441
17496
  var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
17442
17497
  var thread = { ...target, threadId: identity };
17498
+ var text = external_exports.string().min(1).max(8e3);
17499
+ var input = { text, requestId: identity };
17500
+ var remoteDeliveryReplySchema = external_exports.discriminatedUnion("accepted", [
17501
+ external_exports.object({ accepted: external_exports.literal(true), startQueuedItemId: identity.optional() }),
17502
+ external_exports.object({
17503
+ accepted: external_exports.literal(false),
17504
+ code: external_exports.enum([
17505
+ "remote/queue-unavailable",
17506
+ "remote/steer-unavailable",
17507
+ "remote/turn-changed",
17508
+ "remote/send-rejected",
17509
+ "session/queue-item-not-found",
17510
+ "session/queue-item-starting"
17511
+ ]),
17512
+ message: external_exports.string()
17513
+ })
17514
+ ]);
17515
+ var remoteQueueSnapshotSchema = external_exports.discriminatedUnion("available", [
17516
+ external_exports.object({ available: external_exports.literal(false) }),
17517
+ external_exports.object({
17518
+ available: external_exports.literal(true),
17519
+ items: external_exports.array(external_exports.object({ id: identity, clientUserMessageId: identity, preview: external_exports.string().max(801) })).max(100)
17520
+ })
17521
+ ]);
17443
17522
  var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
17444
17523
  external_exports.strictObject({ kind: external_exports.literal("hosts") }),
17524
+ external_exports.strictObject({
17525
+ kind: external_exports.literal("create"),
17526
+ ...target,
17527
+ cwd: external_exports.string().min(1).max(8192),
17528
+ epoch: identity
17529
+ }),
17530
+ external_exports.strictObject({ kind: external_exports.literal("projectHarnesses"), ...target, epoch: identity }),
17531
+ external_exports.strictObject({
17532
+ kind: external_exports.literal("inspectHarness"),
17533
+ ...target,
17534
+ epoch: identity,
17535
+ cwd: external_exports.string().min(1).max(8192),
17536
+ harnessId: identity
17537
+ }),
17538
+ external_exports.strictObject({
17539
+ kind: external_exports.literal("startSelected"),
17540
+ ...target,
17541
+ epoch: identity,
17542
+ cwd: external_exports.string().min(1).max(8192),
17543
+ harnessId: identity,
17544
+ model: external_exports.string().min(1).max(4096),
17545
+ serviceTier: external_exports.enum(["priority", "ultrafast"]).optional(),
17546
+ reasoningEffort: identity.optional()
17547
+ }),
17445
17548
  external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
17446
17549
  external_exports.strictObject({
17447
17550
  kind: external_exports.literal("list"),
17448
17551
  ...target,
17449
17552
  cursor: external_exports.string().nullable(),
17450
- archived: external_exports.boolean()
17553
+ archived: external_exports.boolean(),
17554
+ includeLoaded: external_exports.literal(true).optional()
17451
17555
  }),
17452
17556
  external_exports.strictObject({
17453
17557
  kind: external_exports.literal("read"),
@@ -17477,9 +17581,25 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
17477
17581
  kind: external_exports.literal("prompt"),
17478
17582
  ...thread,
17479
17583
  epoch: identity,
17480
- text: external_exports.string().min(1).max(8e3),
17584
+ text,
17481
17585
  requestId: identity.optional()
17482
17586
  }),
17587
+ external_exports.strictObject({ kind: external_exports.literal("queue"), ...thread, epoch: identity }),
17588
+ external_exports.strictObject({
17589
+ kind: external_exports.literal("delivery"),
17590
+ ...thread,
17591
+ epoch: identity,
17592
+ action: external_exports.discriminatedUnion("kind", [
17593
+ external_exports.strictObject({ kind: external_exports.literal("enqueue"), ...input }),
17594
+ external_exports.strictObject({ kind: external_exports.literal("steer"), ...input, turnId: identity }),
17595
+ external_exports.strictObject({ kind: external_exports.literal("remove"), itemId: identity }),
17596
+ external_exports.strictObject({
17597
+ kind: external_exports.literal("start"),
17598
+ itemId: identity,
17599
+ onlyIfHead: external_exports.literal(true).optional()
17600
+ })
17601
+ ])
17602
+ }),
17483
17603
  external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
17484
17604
  external_exports.strictObject({
17485
17605
  kind: external_exports.literal("rename"),
@@ -17976,8 +18096,8 @@ function liveHarnessCommandPrompt(catalog, idPrefix, commandId, argumentText) {
17976
18096
  const descriptor = catalog.commands.find(({ id: id2 }) => id2 === commandId);
17977
18097
  if (!descriptor)
17978
18098
  return null;
17979
- const text = typeof argumentText === "string" ? argumentText.trim() : "";
17980
- return text ? `${descriptor.invocation} ${text}` : descriptor.invocation;
18099
+ const text2 = typeof argumentText === "string" ? argumentText.trim() : "";
18100
+ return text2 ? `${descriptor.invocation} ${text2}` : descriptor.invocation;
17981
18101
  }
17982
18102
  function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
17983
18103
  if (!live)
@@ -18017,9 +18137,9 @@ function subagentConfiguration(value) {
18017
18137
  if (typeof value !== "object" || value === null || Array.isArray(value))
18018
18138
  return {};
18019
18139
  const row = value;
18020
- const text = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
18021
- const model2 = row.model === "inherit" ? void 0 : text(row.model);
18022
- const reasoningEffort = text(row.reasoningEffort) ?? text(row.reasoning_effort) ?? text(row.thinking);
18140
+ const text2 = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
18141
+ const model2 = row.model === "inherit" ? void 0 : text2(row.model);
18142
+ const reasoningEffort = text2(row.reasoningEffort) ?? text2(row.reasoning_effort) ?? text2(row.thinking);
18023
18143
  return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
18024
18144
  }
18025
18145
  function inheritSubagentConfiguration(child, parent) {
@@ -20764,7 +20884,7 @@ var LineBuffer = class {
20764
20884
  };
20765
20885
 
20766
20886
  // ../../../node_modules/@agentclientprotocol/sdk/dist/stream.js
20767
- function ndJsonStream(output, input) {
20887
+ function ndJsonStream(output, input2) {
20768
20888
  const textEncoder = new TextEncoder();
20769
20889
  const textDecoder = new TextDecoder();
20770
20890
  let cancelled = false;
@@ -20787,7 +20907,7 @@ function ndJsonStream(output, input) {
20787
20907
  }
20788
20908
  }
20789
20909
  };
20790
- const reader = input.getReader();
20910
+ const reader = input2.getReader();
20791
20911
  inputReader = reader;
20792
20912
  try {
20793
20913
  while (true) {
@@ -20870,8 +20990,8 @@ var zGuardCreateElicitationResponseCancel = object({
20870
20990
  });
20871
20991
 
20872
20992
  // ../../../node_modules/@agentclientprotocol/sdk/dist/acp.js
20873
- function ndJsonStream2(output, input) {
20874
- return ndJsonStream(output, input);
20993
+ function ndJsonStream2(output, input2) {
20994
+ return ndJsonStream(output, input2);
20875
20995
  }
20876
20996
  function emptyObjectResponse(response) {
20877
20997
  return response ?? {};
@@ -22289,12 +22409,12 @@ var kiroDiscoverySpec = {
22289
22409
  windows: ["${LOCALAPPDATA}/Kiro-Cli", "~/.kiro/bin", "${APPDATA}/npm", VERSION_MANAGER_ROOTS]
22290
22410
  }
22291
22411
  };
22292
- function resolveKiroExecutable(input = {}, dependencies = {}) {
22293
- const platform = input.platform ?? process.platform;
22412
+ function resolveKiroExecutable(input2 = {}, dependencies = {}) {
22413
+ const platform = input2.platform ?? process.platform;
22294
22414
  const resolution = resolveHarnessExecutable(kiroDiscoverySpec, {
22295
- ...input.command ? { command: input.command } : {},
22296
- environment: input.environment ?? process.env,
22297
- ...input.homeDirectory ? { homeDirectory: input.homeDirectory } : {},
22415
+ ...input2.command ? { command: input2.command } : {},
22416
+ environment: input2.environment ?? process.env,
22417
+ ...input2.homeDirectory ? { homeDirectory: input2.homeDirectory } : {},
22298
22418
  platform
22299
22419
  }, dependencies);
22300
22420
  if (!resolution)
@@ -22450,9 +22570,9 @@ function classifyStartupError(error51, stderr = "") {
22450
22570
  if (error51 instanceof KiroExecutableError) {
22451
22571
  return new KiroTransportError("notInstalled", error51.message, { cause: error51 });
22452
22572
  }
22453
- const text = `${errorText(error51)}
22573
+ const text2 = `${errorText(error51)}
22454
22574
  ${stderr}`.toLowerCase();
22455
- if (text.includes("auth_required") || text.includes("authentication") || text.includes("not logged in") || text.includes("not log in") || text.includes("sign in") || text.includes("unauthorized")) {
22575
+ if (text2.includes("auth_required") || text2.includes("authentication") || text2.includes("not logged in") || text2.includes("not log in") || text2.includes("sign in") || text2.includes("unauthorized")) {
22456
22576
  return new KiroTransportError("authenticationRequired", "Kiro CLI authentication is required (run `kiro-cli login`)", {
22457
22577
  cause: error51
22458
22578
  });
@@ -22572,7 +22692,7 @@ var KiroAcpTransport = class {
22572
22692
  throw classifyStartupError(error51, this.#stderrTail);
22573
22693
  }
22574
22694
  }
22575
- async open(input) {
22695
+ async open(input2) {
22576
22696
  if (this.#sessionId || this.#closed) {
22577
22697
  throw new Error("Kiro ACP Transport cannot be opened twice");
22578
22698
  }
@@ -22585,7 +22705,7 @@ var KiroAcpTransport = class {
22585
22705
  let session;
22586
22706
  let sessionId;
22587
22707
  let configOptions;
22588
- if (input.kind === "create") {
22708
+ if (input2.kind === "create") {
22589
22709
  const created = await withTimeout(connection.newSession({
22590
22710
  cwd: this.#options.cwd,
22591
22711
  mcpServers: []
@@ -22593,20 +22713,20 @@ var KiroAcpTransport = class {
22593
22713
  session = created;
22594
22714
  sessionId = created.sessionId;
22595
22715
  configOptions = created.configOptions;
22596
- if (input.modeId) {
22597
- await withTimeout(connection.setSessionMode({ sessionId, modeId: input.modeId }), this.#commandTimeoutMs, "Kiro initial mode");
22716
+ if (input2.modeId) {
22717
+ await withTimeout(connection.setSessionMode({ sessionId, modeId: input2.modeId }), this.#commandTimeoutMs, "Kiro initial mode");
22598
22718
  }
22599
- if (input.modelId) {
22600
- configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "model", input.modelId);
22719
+ if (input2.modelId) {
22720
+ configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "model", input2.modelId);
22601
22721
  }
22602
- if (input.autopilot) {
22603
- configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "autopilot", input.autopilot);
22722
+ if (input2.autopilot) {
22723
+ configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "autopilot", input2.autopilot);
22604
22724
  }
22605
- } else if (input.kind === "fork" || input.kind === "rollbackLastTurn") {
22725
+ } else if (input2.kind === "fork" || input2.kind === "rollbackLastTurn") {
22606
22726
  const forked = await this.#forkSession({
22607
- sourceSessionId: input.sourceSessionId,
22727
+ sourceSessionId: input2.sourceSessionId,
22608
22728
  targetCwd: this.#options.cwd,
22609
- checkpointMessageId: input.checkpointMessageId
22729
+ checkpointMessageId: input2.checkpointMessageId
22610
22730
  });
22611
22731
  sessionId = forked.sessionId;
22612
22732
  session = await withTimeout(connection.loadSession({
@@ -22615,36 +22735,36 @@ var KiroAcpTransport = class {
22615
22735
  sessionId
22616
22736
  }), this.#commandTimeoutMs, "Kiro Fork Session load");
22617
22737
  configOptions = session.configOptions;
22618
- if (input.modelId) {
22619
- configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "model", input.modelId);
22738
+ if (input2.modelId) {
22739
+ configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "model", input2.modelId);
22620
22740
  }
22621
- if (input.autopilot) {
22622
- configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "autopilot", input.autopilot);
22741
+ if (input2.autopilot) {
22742
+ configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "autopilot", input2.autopilot);
22623
22743
  }
22624
22744
  } else {
22625
22745
  session = await withTimeout(connection.loadSession({
22626
22746
  cwd: this.#options.cwd,
22627
22747
  mcpServers: [],
22628
- sessionId: input.sessionId
22748
+ sessionId: input2.sessionId
22629
22749
  }), this.#commandTimeoutMs, "Kiro Session load");
22630
- sessionId = input.sessionId;
22750
+ sessionId = input2.sessionId;
22631
22751
  configOptions = session.configOptions;
22632
- if (input.modelId) {
22633
- configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "model", input.modelId);
22752
+ if (input2.modelId) {
22753
+ configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "model", input2.modelId);
22634
22754
  }
22635
- if (input.autopilot) {
22636
- configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "autopilot", input.autopilot);
22755
+ if (input2.autopilot) {
22756
+ configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "autopilot", input2.autopilot);
22637
22757
  }
22638
22758
  }
22639
22759
  if (typeof sessionId !== "string" || sessionId.length === 0) {
22640
22760
  throw new KiroTransportError("protocolError", "Kiro ACP returned no Session identity");
22641
22761
  }
22642
- if (input.effortLevel !== void 0) {
22762
+ if (input2.effortLevel !== void 0) {
22643
22763
  const available = kiroThinkingState(configOptions).availableThinkingOptions ?? [];
22644
- if (!available.some(({ id: id2 }) => id2 === input.effortLevel)) {
22764
+ if (!available.some(({ id: id2 }) => id2 === input2.effortLevel)) {
22645
22765
  throw new KiroTransportError(available.length === 0 ? "unsupported" : "invalidRequest", "The current Kiro model does not support the requested effort level");
22646
22766
  }
22647
- configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "effortLevel", input.effortLevel);
22767
+ configOptions = await this.#setConfigOptionOnSession(connection, sessionId, "effortLevel", input2.effortLevel);
22648
22768
  }
22649
22769
  this.#sessionId = sessionId;
22650
22770
  const replay = this.#replay ?? [];
@@ -22743,7 +22863,7 @@ var KiroAcpTransport = class {
22743
22863
  throw new KiroTransportError("unavailable", "Kiro Native Fork failed", { cause: error51 });
22744
22864
  }
22745
22865
  }
22746
- async runTurn(text, onEvent, onPermission, onQuestion) {
22866
+ async runTurn(text2, onEvent, onPermission, onQuestion) {
22747
22867
  const connection = this.#connection;
22748
22868
  if (!connection || !this.#sessionId || this.#closed || this.#closing) {
22749
22869
  throw new KiroTransportError("unavailable", "Kiro ACP Session is unavailable");
@@ -22755,7 +22875,7 @@ var KiroAcpTransport = class {
22755
22875
  try {
22756
22876
  return await connection.prompt({
22757
22877
  sessionId: this.#sessionId,
22758
- prompt: [{ type: "text", text }]
22878
+ prompt: [{ type: "text", text: text2 }]
22759
22879
  });
22760
22880
  } finally {
22761
22881
  if (this.#activePrompt === active2)
@@ -22872,20 +22992,20 @@ var KiroAcpTransport = class {
22872
22992
  let event = null;
22873
22993
  if (update.sessionUpdate === "agent_message_chunk") {
22874
22994
  const isReplay = Boolean(kiroMeta?.replay);
22875
- const text = update.content?.type === "text" ? update.content.text : "";
22876
- if (text) {
22995
+ const text2 = update.content?.type === "text" ? update.content.text : "";
22996
+ if (text2) {
22877
22997
  event = {
22878
22998
  type: "agent.text",
22879
- text,
22999
+ text: text2,
22880
23000
  messageId: typeof kiroMeta?.replayId === "string" ? kiroMeta.replayId : typeof kiroMeta?.messageId === "string" ? kiroMeta.messageId : void 0,
22881
23001
  metadata: { isReplay }
22882
23002
  };
22883
23003
  }
22884
23004
  } else if (update.sessionUpdate === "user_message_chunk") {
22885
- const text = update.content?.type === "text" ? update.content.text : "";
23005
+ const text2 = update.content?.type === "text" ? update.content.text : "";
22886
23006
  event = {
22887
23007
  type: "user.text",
22888
- text,
23008
+ text: text2,
22889
23009
  messageId: typeof kiroMeta?.messageId === "string" ? kiroMeta.messageId : void 0
22890
23010
  };
22891
23011
  } else if (update.sessionUpdate === "tool_call") {
@@ -23135,11 +23255,11 @@ ${jsonBlock(json2)}`;
23135
23255
  }
23136
23256
  function jsonBlock(json2) {
23137
23257
  const limit = 64e3;
23138
- const text = json2.length > limit ? `${json2.slice(0, limit)}
23258
+ const text2 = json2.length > limit ? `${json2.slice(0, limit)}
23139
23259
  [Output truncated]` : json2;
23140
- const fence = "`".repeat(Math.max(3, ...(text.match(/`+/gu) ?? []).map((match) => match.length + 1)));
23260
+ const fence = "`".repeat(Math.max(3, ...(text2.match(/`+/gu) ?? []).map((match) => match.length + 1)));
23141
23261
  return `${fence}json
23142
- ${text}
23262
+ ${text2}
23143
23263
  ${fence}`;
23144
23264
  }
23145
23265
 
@@ -23552,9 +23672,9 @@ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader
23552
23672
  } }));
23553
23673
  }
23554
23674
  }
23555
- function splitLines(text) {
23556
- const hasTrailingNl = text.endsWith("\n");
23557
- const result = text.split("\n").map((line) => line + "\n");
23675
+ function splitLines(text2) {
23676
+ const hasTrailingNl = text2.endsWith("\n");
23677
+ const result = text2.split("\n").map((line) => line + "\n");
23558
23678
  if (hasTrailingNl) {
23559
23679
  result.pop();
23560
23680
  } else {
@@ -23880,23 +24000,23 @@ function projectKiroToolCall(itemId, toolCall) {
23880
24000
  const kiroMeta = meta3 && isRecord8(meta3.kiro) ? meta3.kiro : void 0;
23881
24001
  if (kiroMeta && kiroMeta.kind === "agent-subtask") {
23882
24002
  const subtaskId = typeof kiroMeta.agentSubtaskId === "string" ? kiroMeta.agentSubtaskId : toolCall.toolCallId;
23883
- const input = isRecord8(toolCall.rawInput) ? toolCall.rawInput : {};
24003
+ const input2 = isRecord8(toolCall.rawInput) ? toolCall.rawInput : {};
23884
24004
  const subagentState = {
23885
24005
  subagentId: subtaskId,
23886
24006
  nativeSubagentId: subtaskId,
23887
- description: typeof input.prompt === "string" ? input.prompt : "Subagent task",
23888
- ...subagentConfiguration(input),
24007
+ description: typeof input2.prompt === "string" ? input2.prompt : "Subagent task",
24008
+ ...subagentConfiguration(input2),
23889
24009
  ...subagentConfiguration(kiroMeta),
23890
24010
  background: false,
23891
24011
  status: toolCall.status === "pending" ? "pending" : toolCall.status === "completed" ? "completed" : toolCall.status === "failed" ? "failed" : "running",
23892
- ...typeof input.name === "string" ? { role: input.name } : {},
24012
+ ...typeof input2.name === "string" ? { role: input2.name } : {},
23893
24013
  ...typeof toolCall.rawOutput === "string" ? { resultSummary: toolCall.rawOutput } : {}
23894
24014
  };
23895
24015
  const subagentItem = {
23896
24016
  type: "subagentDelegation",
23897
24017
  itemId: hostItemId,
23898
24018
  operation: "spawn",
23899
- ...typeof input.prompt === "string" ? { prompt: input.prompt } : {},
24019
+ ...typeof input2.prompt === "string" ? { prompt: input2.prompt } : {},
23900
24020
  subagents: [subagentState]
23901
24021
  };
23902
24022
  return subagentItem;
@@ -23983,20 +24103,20 @@ var KiroVisibleText = class {
23983
24103
  return output;
23984
24104
  }
23985
24105
  #flushLine() {
23986
- const text = !this.#fence && this.#pending.trim() === TOOL_PREAMBLE ? "" : this.#pending;
24106
+ const text2 = !this.#fence && this.#pending.trim() === TOOL_PREAMBLE ? "" : this.#pending;
23987
24107
  this.#pending = "";
23988
24108
  this.#passthrough = false;
23989
- return text;
24109
+ return text2;
23990
24110
  }
23991
24111
  finish() {
23992
- const text = this.#flushLine();
24112
+ const text2 = this.#flushLine();
23993
24113
  this.#fence = void 0;
23994
- return text;
24114
+ return text2;
23995
24115
  }
23996
24116
  };
23997
- function kiroVisibleText(text) {
24117
+ function kiroVisibleText(text2) {
23998
24118
  const filter = new KiroVisibleText();
23999
- return filter.push(text) + filter.finish();
24119
+ return filter.push(text2) + filter.finish();
24000
24120
  }
24001
24121
 
24002
24122
  // dist/turn-output.js
@@ -24092,13 +24212,13 @@ var KiroTurnOutput = class {
24092
24212
  if (outcome && tool.file)
24093
24213
  this.#complete(tool.file, outcome.status === "succeeded" && !changes ? { status: "cancelled", reason: "Kiro did not confirm the previewed modification" } : outcome);
24094
24214
  }
24095
- #appendText(text) {
24096
- if (!text)
24215
+ #appendText(text2) {
24216
+ if (!text2)
24097
24217
  return;
24098
24218
  if (!this.#message) {
24099
- text = this.#leadingWhitespace + text;
24100
- if (!text.trim()) {
24101
- this.#leadingWhitespace = text;
24219
+ text2 = this.#leadingWhitespace + text2;
24220
+ if (!text2.trim()) {
24221
+ this.#leadingWhitespace = text2;
24102
24222
  return;
24103
24223
  }
24104
24224
  this.#leadingWhitespace = "";
@@ -24110,14 +24230,14 @@ var KiroTurnOutput = class {
24110
24230
  };
24111
24231
  this.#start(this.#message);
24112
24232
  }
24113
- this.#message = { ...this.#message, text: this.#message.text + text };
24233
+ this.#message = { ...this.#message, text: this.#message.text + text2 };
24114
24234
  this.emit({
24115
24235
  kind: "event",
24116
24236
  event: {
24117
24237
  type: "item.updated",
24118
24238
  turnId: this.turnId,
24119
24239
  itemId: this.#message.itemId,
24120
- update: { type: "text.append", text }
24240
+ update: { type: "text.append", text: text2 }
24121
24241
  }
24122
24242
  });
24123
24243
  }
@@ -24285,10 +24405,10 @@ function kiroHomeDir(environment = process.env) {
24285
24405
  const home = environment.HOME ?? environment.USERPROFILE ?? os2.homedir();
24286
24406
  return environment.KIRO_HOME ?? path6.join(home, ".kiro");
24287
24407
  }
24288
- async function locateKiroNativeSession(input, sessionId) {
24408
+ async function locateKiroNativeSession(input2, sessionId) {
24289
24409
  if (!sessionId || sessionId.trim().length === 0)
24290
24410
  return null;
24291
- const root = path6.join(input.homeDirectory ?? kiroHomeDir(input.environment), "sessions");
24411
+ const root = path6.join(input2.homeDirectory ?? kiroHomeDir(input2.environment), "sessions");
24292
24412
  let entries;
24293
24413
  try {
24294
24414
  entries = await readdir(root, { withFileTypes: true });
@@ -24482,23 +24602,23 @@ async function readKiroSnapshot(location) {
24482
24602
  if (row.payload.operationType === "Summary")
24483
24603
  continue;
24484
24604
  if (row.payload.operationType === "Reasoning") {
24485
- const text2 = historyText(row.payload);
24486
- if (text2.trim() && !/^[.\s\u2026]+$/u.test(text2)) {
24605
+ const text3 = historyText(row.payload);
24606
+ if (text3.trim() && !/^[.\s\u2026]+$/u.test(text3)) {
24487
24607
  items.push({
24488
- item: { type: "reasoning", itemId, text: text2 },
24608
+ item: { type: "reasoning", itemId, text: text3 },
24489
24609
  outcome: { status: "succeeded" }
24490
24610
  });
24491
24611
  }
24492
24612
  continue;
24493
24613
  }
24494
- const text = kiroVisibleText(historyText(row.payload));
24495
- if (!text.trim())
24614
+ const text2 = kiroVisibleText(historyText(row.payload));
24615
+ if (!text2.trim())
24496
24616
  continue;
24497
24617
  items.push({
24498
24618
  item: {
24499
24619
  type: "agentMessage",
24500
24620
  itemId,
24501
- text,
24621
+ text: text2,
24502
24622
  phase: row === lastContent && outcome.status === "succeeded" ? "final_answer" : "commentary"
24503
24623
  },
24504
24624
  outcome: { status: "succeeded" }
@@ -24637,15 +24757,15 @@ function sessionImportTitle(value, maxLength = HARNESS_SESSION_IMPORT_TITLE_MAX_
24637
24757
  return normalized;
24638
24758
  return `${characters.slice(0, maxLength - 1).join("").trimEnd()}…`;
24639
24759
  }
24640
- function sessionImportCandidate(input) {
24641
- const time3 = typeof input.updatedAt === "number" ? input.updatedAt : typeof input.updatedAt === "string" ? Date.parse(input.updatedAt) : Number.NaN;
24760
+ function sessionImportCandidate(input2) {
24761
+ const time3 = typeof input2.updatedAt === "number" ? input2.updatedAt : typeof input2.updatedAt === "string" ? Date.parse(input2.updatedAt) : Number.NaN;
24642
24762
  const parsed = harnessSessionImportCandidateSchema.safeParse({
24643
- nativeSessionId: input.nativeSessionId,
24644
- cwd: input.cwd,
24645
- title: typeof input.title === "string" && input.title.trim().length > 0 ? input.title : null,
24763
+ nativeSessionId: input2.nativeSessionId,
24764
+ cwd: input2.cwd,
24765
+ title: typeof input2.title === "string" && input2.title.trim().length > 0 ? input2.title : null,
24646
24766
  updatedAt: Math.floor(time3),
24647
24767
  // Unknown must stay unknown; only an explicit boolean is a native statement.
24648
- running: typeof input.running === "boolean" ? input.running : null
24768
+ running: typeof input2.running === "boolean" ? input2.running : null
24649
24769
  });
24650
24770
  return parsed.success ? parsed.data : null;
24651
24771
  }
@@ -24711,8 +24831,8 @@ function isRecord11(value) {
24711
24831
  return typeof value === "object" && value !== null && !Array.isArray(value);
24712
24832
  }
24713
24833
  function userText(row) {
24714
- const { content, text } = row.payload;
24715
- return kiroVisibleText(typeof content === "string" ? content : text ?? "");
24834
+ const { content, text: text2 } = row.payload;
24835
+ return kiroVisibleText(typeof content === "string" ? content : text2 ?? "");
24716
24836
  }
24717
24837
  var KiroSessionImport = class {
24718
24838
  #environment;
@@ -24916,10 +25036,10 @@ var KiroAdapter = class {
24916
25036
  this.#deps = deps;
24917
25037
  this.sessionImport = new KiroSessionImport({ ...process.env, ...options.environment });
24918
25038
  }
24919
- async inspect(input = {}) {
24920
- const cwd = path8.resolve(input.cwd ?? process.cwd());
25039
+ async inspect(input2 = {}) {
25040
+ const cwd = path8.resolve(input2.cwd ?? process.cwd());
24921
25041
  const cached2 = this.#inspectionCache.get(cwd);
24922
- if (input.refresh) {
25042
+ if (input2.refresh) {
24923
25043
  this.#inspectionCache.clear();
24924
25044
  if (cached2)
24925
25045
  this.#inspectionCache.set(cwd, cached2);
@@ -25035,8 +25155,8 @@ var KiroAdapter = class {
25035
25155
  await transport.close().catch(() => void 0);
25036
25156
  }
25037
25157
  }
25038
- async open(input) {
25039
- if (input.kind === "create" && input.executionPolicy === "unattended-full-access") {
25158
+ async open(input2) {
25159
+ if (input2.kind === "create" && input2.executionPolicy === "unattended-full-access") {
25040
25160
  return {
25041
25161
  ok: false,
25042
25162
  error: {
@@ -25046,10 +25166,10 @@ var KiroAdapter = class {
25046
25166
  }
25047
25167
  };
25048
25168
  }
25049
- const environment = { ...this.#options.environment, ...input.environment };
25169
+ const environment = { ...this.#options.environment, ...input2.environment };
25050
25170
  let session;
25051
25171
  const usage = new KiroUsage();
25052
- const transport = this.#createTransport(input.cwd, environment, (error51) => session?.fault(error51), (event) => {
25172
+ const transport = this.#createTransport(input2.cwd, environment, (error51) => session?.fault(error51), (event) => {
25053
25173
  if (session)
25054
25174
  session.observeUsage(event);
25055
25175
  else
@@ -25058,29 +25178,29 @@ var KiroAdapter = class {
25058
25178
  const locateSessionFn = this.#deps.locateSession ?? locateKiroNativeSession;
25059
25179
  const readSnapshotFn = this.#deps.readSnapshot ?? readKiroSnapshot;
25060
25180
  let openResult;
25061
- let createdEmptySession = input.kind === "create";
25181
+ let createdEmptySession = input2.kind === "create";
25062
25182
  let initialModel;
25063
25183
  let initialPermissionModeId;
25064
25184
  try {
25065
- if (input.kind === "create") {
25185
+ if (input2.kind === "create") {
25066
25186
  openResult = await transport.open({
25067
25187
  kind: "create",
25068
- ...input.model ? { modelId: input.model.id } : {},
25069
- ...input.thinkingOptionId ? { effortLevel: input.thinkingOptionId } : {},
25070
- ...input.permissionModeId ? { autopilot: decodeKiroPermissionMode(input.permissionModeId) } : {}
25188
+ ...input2.model ? { modelId: input2.model.id } : {},
25189
+ ...input2.thinkingOptionId ? { effortLevel: input2.thinkingOptionId } : {},
25190
+ ...input2.permissionModeId ? { autopilot: decodeKiroPermissionMode(input2.permissionModeId) } : {}
25071
25191
  });
25072
- } else if (input.kind === "resume") {
25073
- const sessionId = input.nativeRef.nativeSessionId;
25192
+ } else if (input2.kind === "resume") {
25193
+ const sessionId = input2.nativeRef.nativeSessionId;
25074
25194
  openResult = await transport.open({
25075
25195
  kind: "resume",
25076
25196
  sessionId,
25077
- autopilot: input.permissionModeId ? decodeKiroPermissionMode(input.permissionModeId) : void 0
25197
+ autopilot: input2.permissionModeId ? decodeKiroPermissionMode(input2.permissionModeId) : void 0
25078
25198
  });
25079
- if (input.permissionModeId) {
25080
- initialPermissionModeId = input.permissionModeId;
25199
+ if (input2.permissionModeId) {
25200
+ initialPermissionModeId = input2.permissionModeId;
25081
25201
  }
25082
- } else if (input.kind === "fork") {
25083
- const sourceSessionId = input.sourceRef.nativeSessionId;
25202
+ } else if (input2.kind === "fork") {
25203
+ const sourceSessionId = input2.sourceRef.nativeSessionId;
25084
25204
  const location = await locateSessionFn({ environment }, sourceSessionId);
25085
25205
  if (!location) {
25086
25206
  await transport.close().catch(() => void 0);
@@ -25095,7 +25215,7 @@ var KiroAdapter = class {
25095
25215
  }
25096
25216
  const rows = await readKiroSessionMessages(location);
25097
25217
  const summary = parseKiroHistory(rows);
25098
- const checkpointId = findForkBoundary(summary, input.checkpoint.checkpointId);
25218
+ const checkpointId = findForkBoundary(summary, input2.checkpoint.checkpointId);
25099
25219
  if (!checkpointId) {
25100
25220
  await transport.close().catch(() => void 0);
25101
25221
  return {
@@ -25123,7 +25243,7 @@ var KiroAdapter = class {
25123
25243
  }
25124
25244
  initialPermissionModeId = sourceAutopilot;
25125
25245
  } else {
25126
- const sourceSessionId = input.sourceRef.nativeSessionId;
25246
+ const sourceSessionId = input2.sourceRef.nativeSessionId;
25127
25247
  const location = await locateSessionFn({ environment }, sourceSessionId);
25128
25248
  if (!location) {
25129
25249
  await transport.close().catch(() => void 0);
@@ -25178,13 +25298,13 @@ var KiroAdapter = class {
25178
25298
  const autopilot = kiroConfigValue(openResult.configOptions, "autopilot");
25179
25299
  initialModel = modelId2 ? harnessModelRefSchema.parse({ id: modelId2 }) : void 0;
25180
25300
  initialPermissionModeId = autopilot === "on" || autopilot === "off" ? encodeKiroPermissionMode(autopilot) : void 0;
25181
- if (input.kind === "create" && input.model && initialModel?.id !== input.model.id) {
25301
+ if (input2.kind === "create" && input2.model && initialModel?.id !== input2.model.id) {
25182
25302
  throw new Error("Kiro did not confirm the requested initial model");
25183
25303
  }
25184
- if (input.kind === "create" && input.thinkingOptionId && thinking.effectiveThinkingOptionId !== input.thinkingOptionId) {
25304
+ if (input2.kind === "create" && input2.thinkingOptionId && thinking.effectiveThinkingOptionId !== input2.thinkingOptionId) {
25185
25305
  throw new KiroTransportError("invalidRequest", "Kiro did not confirm the requested effort level");
25186
25306
  }
25187
- if ((input.kind === "create" || input.kind === "resume") && input.permissionModeId && initialPermissionModeId !== input.permissionModeId) {
25307
+ if ((input2.kind === "create" || input2.kind === "resume") && input2.permissionModeId && initialPermissionModeId !== input2.permissionModeId) {
25188
25308
  throw new Error("Kiro did not confirm the requested initial permission mode");
25189
25309
  }
25190
25310
  try {
@@ -25200,7 +25320,7 @@ var KiroAdapter = class {
25200
25320
  session = new KiroSession({
25201
25321
  harnessId: this.harnessId,
25202
25322
  transport,
25203
- cwd: input.cwd,
25323
+ cwd: input2.cwd,
25204
25324
  sessionId: openResult.sessionId,
25205
25325
  modelCatalog,
25206
25326
  thinking,