claude-use 11.22.0 → 11.23.0

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.
package/dist/cli.cjs CHANGED
@@ -318,10 +318,10 @@ function mergeDefs(...defs) {
318
318
  function cloneDef(schema) {
319
319
  return mergeDefs(schema._zod.def);
320
320
  }
321
- function getElementAtPath(obj, path63) {
322
- if (!path63)
321
+ function getElementAtPath(obj, path64) {
322
+ if (!path64)
323
323
  return obj;
324
- return path63.reduce((acc, key) => acc?.[key], obj);
324
+ return path64.reduce((acc, key) => acc?.[key], obj);
325
325
  }
326
326
  function promiseAllObject(promisesObj) {
327
327
  const keys = Object.keys(promisesObj);
@@ -580,11 +580,11 @@ function explicitlyAborted(x, startIndex = 0) {
580
580
  }
581
581
  return false;
582
582
  }
583
- function prefixIssues(path63, issues) {
583
+ function prefixIssues(path64, issues) {
584
584
  return issues.map((iss) => {
585
585
  var _a4;
586
586
  (_a4 = iss).path ?? (_a4.path = []);
587
- iss.path.unshift(path63);
587
+ iss.path.unshift(path64);
588
588
  return iss;
589
589
  });
590
590
  }
@@ -1105,16 +1105,16 @@ function flattenError(error63, mapper = (issue2) => issue2.message) {
1105
1105
  }
1106
1106
  function formatError(error63, mapper = (issue2) => issue2.message) {
1107
1107
  const fieldErrors = { _errors: [] };
1108
- const processError = (error64, path63 = []) => {
1108
+ const processError = (error64, path64 = []) => {
1109
1109
  for (const issue2 of error64.issues) {
1110
1110
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1111
- issue2.errors.map((issues) => processError({ issues }, [...path63, ...issue2.path]));
1111
+ issue2.errors.map((issues) => processError({ issues }, [...path64, ...issue2.path]));
1112
1112
  } else if (issue2.code === "invalid_key") {
1113
- processError({ issues: issue2.issues }, [...path63, ...issue2.path]);
1113
+ processError({ issues: issue2.issues }, [...path64, ...issue2.path]);
1114
1114
  } else if (issue2.code === "invalid_element") {
1115
- processError({ issues: issue2.issues }, [...path63, ...issue2.path]);
1115
+ processError({ issues: issue2.issues }, [...path64, ...issue2.path]);
1116
1116
  } else {
1117
- const fullpath = [...path63, ...issue2.path];
1117
+ const fullpath = [...path64, ...issue2.path];
1118
1118
  if (fullpath.length === 0) {
1119
1119
  fieldErrors._errors.push(mapper(issue2));
1120
1120
  } else {
@@ -1153,17 +1153,17 @@ function formatError(error63, mapper = (issue2) => issue2.message) {
1153
1153
  }
1154
1154
  function treeifyError(error63, mapper = (issue2) => issue2.message) {
1155
1155
  const result = { errors: [] };
1156
- const processError = (error64, path63 = []) => {
1156
+ const processError = (error64, path64 = []) => {
1157
1157
  var _a4;
1158
1158
  for (const issue2 of error64.issues) {
1159
1159
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1160
- issue2.errors.map((issues) => processError({ issues }, [...path63, ...issue2.path]));
1160
+ issue2.errors.map((issues) => processError({ issues }, [...path64, ...issue2.path]));
1161
1161
  } else if (issue2.code === "invalid_key") {
1162
- processError({ issues: issue2.issues }, [...path63, ...issue2.path]);
1162
+ processError({ issues: issue2.issues }, [...path64, ...issue2.path]);
1163
1163
  } else if (issue2.code === "invalid_element") {
1164
- processError({ issues: issue2.issues }, [...path63, ...issue2.path]);
1164
+ processError({ issues: issue2.issues }, [...path64, ...issue2.path]);
1165
1165
  } else {
1166
- const fullpath = [...path63, ...issue2.path];
1166
+ const fullpath = [...path64, ...issue2.path];
1167
1167
  if (fullpath.length === 0) {
1168
1168
  result.errors.push(mapper(issue2));
1169
1169
  continue;
@@ -1202,8 +1202,8 @@ function treeifyError(error63, mapper = (issue2) => issue2.message) {
1202
1202
  }
1203
1203
  function toDotPath(_path) {
1204
1204
  const segs = [];
1205
- const path63 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
1206
- for (const seg of path63) {
1205
+ const path64 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
1206
+ for (const seg of path64) {
1207
1207
  if (typeof seg === "number")
1208
1208
  segs.push(`[${seg}]`);
1209
1209
  else if (typeof seg === "symbol")
@@ -19199,13 +19199,13 @@ function resolveRef(ref, ctx) {
19199
19199
  if (!ref.startsWith("#")) {
19200
19200
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
19201
19201
  }
19202
- const path63 = ref.slice(1).split("/").filter(Boolean);
19203
- if (path63.length === 0) {
19202
+ const path64 = ref.slice(1).split("/").filter(Boolean);
19203
+ if (path64.length === 0) {
19204
19204
  return ctx.rootSchema;
19205
19205
  }
19206
19206
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
19207
- if (path63[0] === defsKey) {
19208
- const key = path63[1] === void 0 ? void 0 : decodeJSONPointerSegment(path63[1]);
19207
+ if (path64[0] === defsKey) {
19208
+ const key = path64[1] === void 0 ? void 0 : decodeJSONPointerSegment(path64[1]);
19209
19209
  if (!key || !ctx.defs[key]) {
19210
19210
  throw new Error(`Reference not found: ${ref}`);
19211
19211
  }
@@ -23712,42 +23712,42 @@ var require_defaults = __commonJS({
23712
23712
  var require_env_paths = __commonJS({
23713
23713
  "node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js"(exports2, module2) {
23714
23714
  "use strict";
23715
- var path63 = require("path");
23715
+ var path64 = require("path");
23716
23716
  var os13 = require("os");
23717
23717
  var homedir = os13.homedir();
23718
23718
  var tmpdir = os13.tmpdir();
23719
23719
  var { env } = process;
23720
23720
  var macos = (name) => {
23721
- const library = path63.join(homedir, "Library");
23721
+ const library = path64.join(homedir, "Library");
23722
23722
  return {
23723
- data: path63.join(library, "Application Support", name),
23724
- config: path63.join(library, "Preferences", name),
23725
- cache: path63.join(library, "Caches", name),
23726
- log: path63.join(library, "Logs", name),
23727
- temp: path63.join(tmpdir, name)
23723
+ data: path64.join(library, "Application Support", name),
23724
+ config: path64.join(library, "Preferences", name),
23725
+ cache: path64.join(library, "Caches", name),
23726
+ log: path64.join(library, "Logs", name),
23727
+ temp: path64.join(tmpdir, name)
23728
23728
  };
23729
23729
  };
23730
23730
  var windows = (name) => {
23731
- const appData = env.APPDATA || path63.join(homedir, "AppData", "Roaming");
23732
- const localAppData = env.LOCALAPPDATA || path63.join(homedir, "AppData", "Local");
23731
+ const appData = env.APPDATA || path64.join(homedir, "AppData", "Roaming");
23732
+ const localAppData = env.LOCALAPPDATA || path64.join(homedir, "AppData", "Local");
23733
23733
  return {
23734
23734
  // Data/config/cache/log are invented by me as Windows isn't opinionated about this
23735
- data: path63.join(localAppData, name, "Data"),
23736
- config: path63.join(appData, name, "Config"),
23737
- cache: path63.join(localAppData, name, "Cache"),
23738
- log: path63.join(localAppData, name, "Log"),
23739
- temp: path63.join(tmpdir, name)
23735
+ data: path64.join(localAppData, name, "Data"),
23736
+ config: path64.join(appData, name, "Config"),
23737
+ cache: path64.join(localAppData, name, "Cache"),
23738
+ log: path64.join(localAppData, name, "Log"),
23739
+ temp: path64.join(tmpdir, name)
23740
23740
  };
23741
23741
  };
23742
23742
  var linux = (name) => {
23743
- const username = path63.basename(homedir);
23743
+ const username = path64.basename(homedir);
23744
23744
  return {
23745
- data: path63.join(env.XDG_DATA_HOME || path63.join(homedir, ".local", "share"), name),
23746
- config: path63.join(env.XDG_CONFIG_HOME || path63.join(homedir, ".config"), name),
23747
- cache: path63.join(env.XDG_CACHE_HOME || path63.join(homedir, ".cache"), name),
23745
+ data: path64.join(env.XDG_DATA_HOME || path64.join(homedir, ".local", "share"), name),
23746
+ config: path64.join(env.XDG_CONFIG_HOME || path64.join(homedir, ".config"), name),
23747
+ cache: path64.join(env.XDG_CACHE_HOME || path64.join(homedir, ".cache"), name),
23748
23748
  // https://wiki.debian.org/XDGBaseDirectorySpecification#state
23749
- log: path63.join(env.XDG_STATE_HOME || path63.join(homedir, ".local", "state"), name),
23750
- temp: path63.join(tmpdir, username, name)
23749
+ log: path64.join(env.XDG_STATE_HOME || path64.join(homedir, ".local", "state"), name),
23750
+ temp: path64.join(tmpdir, username, name)
23751
23751
  };
23752
23752
  };
23753
23753
  var envPaths = (name, options) => {
@@ -23815,11 +23815,11 @@ var require_util = __commonJS({
23815
23815
  return result;
23816
23816
  }
23817
23817
  exports2.emplace = emplace;
23818
- function getPropertyByPath(source, path63) {
23819
- if (typeof path63 === "string" && Object.prototype.hasOwnProperty.call(source, path63)) {
23820
- return source[path63];
23818
+ function getPropertyByPath(source, path64) {
23819
+ if (typeof path64 === "string" && Object.prototype.hasOwnProperty.call(source, path64)) {
23820
+ return source[path64];
23821
23821
  }
23822
- const parsedPath = typeof path63 === "string" ? path63.split(".") : path63;
23822
+ const parsedPath = typeof path64 === "string" ? path64.split(".") : path64;
23823
23823
  return parsedPath.reduce((previous, key) => {
23824
23824
  if (previous === void 0) {
23825
23825
  return previous;
@@ -23842,9 +23842,9 @@ var require_util = __commonJS({
23842
23842
  return Object.fromEntries(Object.entries(options).filter(([, value2]) => value2 !== void 0));
23843
23843
  }
23844
23844
  exports2.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject;
23845
- async function isDirectory(path63) {
23845
+ async function isDirectory(path64) {
23846
23846
  try {
23847
- const stat = await fs_1.promises.stat(path63);
23847
+ const stat = await fs_1.promises.stat(path64);
23848
23848
  return stat.isDirectory();
23849
23849
  } catch (e14) {
23850
23850
  if (e14.code === "ENOENT") {
@@ -23854,9 +23854,9 @@ var require_util = __commonJS({
23854
23854
  }
23855
23855
  }
23856
23856
  exports2.isDirectory = isDirectory;
23857
- function isDirectorySync(path63) {
23857
+ function isDirectorySync(path64) {
23858
23858
  try {
23859
- const stat = fs_1.default.statSync(path63);
23859
+ const stat = fs_1.default.statSync(path64);
23860
23860
  return stat.isDirectory();
23861
23861
  } catch (e14) {
23862
23862
  if (e14.code === "ENOENT") {
@@ -23954,7 +23954,7 @@ var require_ExplorerBase = __commonJS({
23954
23954
  const idx = importStack.indexOf(fullPath);
23955
23955
  if (idx !== -1) {
23956
23956
  throw new Error(`Circular import detected:
23957
- ${[...importStack, fullPath].map((path63, i10) => `${i10 + 1}. ${path63}`).join("\n")} (same as ${idx + 1}.)`);
23957
+ ${[...importStack, fullPath].map((path64, i10) => `${i10 + 1}. ${path64}`).join("\n")} (same as ${idx + 1}.)`);
23958
23958
  }
23959
23959
  }
23960
23960
  }
@@ -24142,9 +24142,9 @@ var require_Explorer = __commonJS({
24142
24142
  throw error63;
24143
24143
  }
24144
24144
  }
24145
- async #fileExists(path63) {
24145
+ async #fileExists(path64) {
24146
24146
  try {
24147
- await promises_1.default.stat(path63);
24147
+ await promises_1.default.stat(path64);
24148
24148
  return true;
24149
24149
  } catch (e14) {
24150
24150
  return false;
@@ -24304,9 +24304,9 @@ var require_ExplorerSync = __commonJS({
24304
24304
  throw error63;
24305
24305
  }
24306
24306
  }
24307
- #fileExists(path63) {
24307
+ #fileExists(path64) {
24308
24308
  try {
24309
- fs_1.default.statSync(path63);
24309
+ fs_1.default.statSync(path64);
24310
24310
  return true;
24311
24311
  } catch (e14) {
24312
24312
  return false;
@@ -24430,7 +24430,7 @@ var require_dist = __commonJS({
24430
24430
  };
24431
24431
  }
24432
24432
  function getResolvedSearchPlaces(moduleName, toolDefinedSearchPlaces, userConfiguredOptions) {
24433
- const userConfiguredSearchPlaces = userConfiguredOptions.searchPlaces?.map((path63) => path63.replace("{name}", moduleName));
24433
+ const userConfiguredSearchPlaces = userConfiguredOptions.searchPlaces?.map((path64) => path64.replace("{name}", moduleName));
24434
24434
  if (userConfiguredOptions.mergeSearchPlaces) {
24435
24435
  return [...userConfiguredSearchPlaces ?? [], ...toolDefinedSearchPlaces];
24436
24436
  }
@@ -24560,7 +24560,7 @@ function parseIgnoringUnrecognisedKeys(schema, raw) {
24560
24560
  return second.success ? { success: true, data: second.data, ignored } : { success: false, issues: second.error.issues };
24561
24561
  }
24562
24562
  function describeIgnoredKeys(filePath, ignored) {
24563
- const places = ignored.map(({ path: path63, keys }) => `${path63.length === 0 ? "" : `${path63.map(String).join(".")}.`}${keys.join(", ")}`);
24563
+ const places = ignored.map(({ path: path64, keys }) => `${path64.length === 0 ? "" : `${path64.map(String).join(".")}.`}${keys.join(", ")}`);
24564
24564
  return `${filePath} has settings this version of agent-shim does not know and ignores: ${places.join("; ")}. A newer release may read them.`;
24565
24565
  }
24566
24566
  function noteIgnoredKeys(filePath, ignored) {
@@ -24582,9 +24582,9 @@ function restoreIgnoredKeys(filePath, value2) {
24582
24582
  return value2;
24583
24583
  }
24584
24584
  const restored = structuredClone(value2);
24585
- for (const { path: path63, values } of ignored) {
24585
+ for (const { path: path64, values } of ignored) {
24586
24586
  let holder = restored;
24587
- for (const step2 of path63) {
24587
+ for (const step2 of path64) {
24588
24588
  holder = isRecord(holder) ? holder[step2] : void 0;
24589
24589
  }
24590
24590
  if (isRecord(holder)) {
@@ -29770,8 +29770,8 @@ var require_utils = __commonJS({
29770
29770
  }
29771
29771
  return output2;
29772
29772
  };
29773
- exports2.basename = (path63, { windows } = {}) => {
29774
- const segs = path63.split(windows ? /[\\/]/ : "/");
29773
+ exports2.basename = (path64, { windows } = {}) => {
29774
+ const segs = path64.split(windows ? /[\\/]/ : "/");
29775
29775
  const last = segs[segs.length - 1];
29776
29776
  if (last === "") {
29777
29777
  return segs[segs.length - 2];
@@ -34181,7 +34181,7 @@ var init_package = __esm({
34181
34181
  "package.json"() {
34182
34182
  package_default = {
34183
34183
  name: "claude-use",
34184
- version: "11.22.0",
34184
+ version: "11.23.0",
34185
34185
  description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
34186
34186
  license: "MIT",
34187
34187
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -34454,11 +34454,11 @@ function identifyRequest(headers) {
34454
34454
  function directOrigin2(port) {
34455
34455
  return `http://127.0.0.1:${String(port)}`;
34456
34456
  }
34457
- function parseProviderPath(path63) {
34458
- if (!path63.startsWith(PROVIDER_PATH_PREFIX)) {
34457
+ function parseProviderPath(path64) {
34458
+ if (!path64.startsWith(PROVIDER_PATH_PREFIX)) {
34459
34459
  return void 0;
34460
34460
  }
34461
- const tail = path63.slice(PROVIDER_PATH_PREFIX.length);
34461
+ const tail = path64.slice(PROVIDER_PATH_PREFIX.length);
34462
34462
  const slash = tail.indexOf("/");
34463
34463
  if (slash <= 0) {
34464
34464
  return void 0;
@@ -34785,12 +34785,12 @@ function decoderFor(encoding) {
34785
34785
  return void 0;
34786
34786
  }
34787
34787
  }
34788
- function destinationOf(path63, sessionProvider) {
34789
- const scoped = parseProviderPath(path63);
34788
+ function destinationOf(path64, sessionProvider) {
34789
+ const scoped = parseProviderPath(path64);
34790
34790
  if (scoped !== void 0) {
34791
34791
  return { provider: scoped.provider, endpoint: scoped.rest };
34792
34792
  }
34793
- return { provider: sessionProvider ?? ANTHROPIC_PROVIDER, endpoint: path63 };
34793
+ return { provider: sessionProvider ?? ANTHROPIC_PROVIDER, endpoint: path64 };
34794
34794
  }
34795
34795
  function buildRecord(event, context) {
34796
34796
  const { scan } = context;
@@ -36070,6 +36070,49 @@ var init_providersStore = __esm({
36070
36070
  }
36071
36071
  });
36072
36072
 
36073
+ // src/usage/signIn.ts
36074
+ function claudeCodeKeychainService(configDir) {
36075
+ return `${KEYCHAIN_SERVICE_PREFIX}-${(0, import_node_crypto6.createHash)("sha256").update(configDir).digest("hex").slice(0, KEYCHAIN_SERVICE_HASH_DIGITS)}`;
36076
+ }
36077
+ function keychainHasItem(run, configDir) {
36078
+ return run.run("security", ["find-generic-password", "-s", claudeCodeKeychainService(configDir)]).status === 0;
36079
+ }
36080
+ function decideSignIn(facts) {
36081
+ if (facts.hasCredentialBlock) {
36082
+ return { state: "token", detail: "supplies its own credential through a credential block, so a stored login is not what a launch uses" };
36083
+ }
36084
+ if (facts.keychainItem === true) {
36085
+ return { state: "signed-in", detail: "a login is stored in the macOS Keychain" };
36086
+ }
36087
+ if (facts.credentialsFile) {
36088
+ return { state: "signed-in", detail: `a login is stored in ${CREDENTIALS_FILE}` };
36089
+ }
36090
+ return { state: "signed-out", detail: facts.platform === "darwin" ? `no Keychain item and no ${CREDENTIALS_FILE}` : `no ${CREDENTIALS_FILE}` };
36091
+ }
36092
+ function credentialsFilePath(farmRoot) {
36093
+ return import_node_path30.default.join(farmRoot, CREDENTIALS_FILE);
36094
+ }
36095
+ function identitySignIn(fs25, probe, identity) {
36096
+ const probing = !identity.hasCredentialBlock;
36097
+ return decideSignIn({
36098
+ hasCredentialBlock: identity.hasCredentialBlock,
36099
+ keychainItem: probing && probe.platform === "darwin" && probe.run !== void 0 ? keychainHasItem(probe.run, identity.farmRoot) : void 0,
36100
+ credentialsFile: probing && fs25.lstat(credentialsFilePath(identity.farmRoot)) !== void 0,
36101
+ platform: probe.platform
36102
+ });
36103
+ }
36104
+ var import_node_crypto6, import_node_path30, CREDENTIALS_FILE, KEYCHAIN_SERVICE_PREFIX, KEYCHAIN_SERVICE_HASH_DIGITS;
36105
+ var init_signIn = __esm({
36106
+ "src/usage/signIn.ts"() {
36107
+ "use strict";
36108
+ import_node_crypto6 = require("node:crypto");
36109
+ import_node_path30 = __toESM(require("node:path"), 1);
36110
+ CREDENTIALS_FILE = ".credentials.json";
36111
+ KEYCHAIN_SERVICE_PREFIX = "Claude Code-credentials";
36112
+ KEYCHAIN_SERVICE_HASH_DIGITS = 8;
36113
+ }
36114
+ });
36115
+
36073
36116
  // src/cli/envBool.ts
36074
36117
  function parseEnvBool(variable, value2) {
36075
36118
  if (value2 === void 0 || value2 === "") {
@@ -37298,14 +37341,14 @@ var require_util2 = __commonJS({
37298
37341
  }
37299
37342
  const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80;
37300
37343
  let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`;
37301
- let path63 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`;
37344
+ let path64 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`;
37302
37345
  if (origin[origin.length - 1] === "/") {
37303
37346
  origin = origin.slice(0, origin.length - 1);
37304
37347
  }
37305
- if (path63 && path63[0] !== "/") {
37306
- path63 = `/${path63}`;
37348
+ if (path64 && path64[0] !== "/") {
37349
+ path64 = `/${path64}`;
37307
37350
  }
37308
- return new URL(`${origin}${path63}`);
37351
+ return new URL(`${origin}${path64}`);
37309
37352
  }
37310
37353
  if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) {
37311
37354
  throw new InvalidArgumentError2("Invalid URL protocol: the URL must start with `http:` or `https:`.");
@@ -38126,9 +38169,9 @@ var require_diagnostics = __commonJS({
38126
38169
  "undici:client:sendHeaders",
38127
38170
  (evt) => {
38128
38171
  const {
38129
- request: { method, path: path63, origin }
38172
+ request: { method, path: path64, origin }
38130
38173
  } = evt;
38131
- debugLog("sending request to %s %s%s", method, origin, path63);
38174
+ debugLog("sending request to %s %s%s", method, origin, path64);
38132
38175
  }
38133
38176
  );
38134
38177
  }
@@ -38146,14 +38189,14 @@ var require_diagnostics = __commonJS({
38146
38189
  "undici:request:headers",
38147
38190
  (evt) => {
38148
38191
  const {
38149
- request: { method, path: path63, origin },
38192
+ request: { method, path: path64, origin },
38150
38193
  response: { statusCode }
38151
38194
  } = evt;
38152
38195
  debugLog(
38153
38196
  "received response to %s %s%s - HTTP %d",
38154
38197
  method,
38155
38198
  origin,
38156
- path63,
38199
+ path64,
38157
38200
  statusCode
38158
38201
  );
38159
38202
  }
@@ -38162,23 +38205,23 @@ var require_diagnostics = __commonJS({
38162
38205
  "undici:request:trailers",
38163
38206
  (evt) => {
38164
38207
  const {
38165
- request: { method, path: path63, origin }
38208
+ request: { method, path: path64, origin }
38166
38209
  } = evt;
38167
- debugLog("trailers received from %s %s%s", method, origin, path63);
38210
+ debugLog("trailers received from %s %s%s", method, origin, path64);
38168
38211
  }
38169
38212
  );
38170
38213
  diagnosticsChannel.subscribe(
38171
38214
  "undici:request:error",
38172
38215
  (evt) => {
38173
38216
  const {
38174
- request: { method, path: path63, origin },
38217
+ request: { method, path: path64, origin },
38175
38218
  error: error63
38176
38219
  } = evt;
38177
38220
  debugLog(
38178
38221
  "request to %s %s%s errored - %s",
38179
38222
  method,
38180
38223
  origin,
38181
- path63,
38224
+ path64,
38182
38225
  error63.message
38183
38226
  );
38184
38227
  }
@@ -38293,7 +38336,7 @@ var require_request = __commonJS({
38293
38336
  var kHandler = /* @__PURE__ */ Symbol("handler");
38294
38337
  var Request2 = class {
38295
38338
  constructor(origin, {
38296
- path: path63,
38339
+ path: path64,
38297
38340
  method,
38298
38341
  body,
38299
38342
  headers,
@@ -38310,11 +38353,11 @@ var require_request = __commonJS({
38310
38353
  maxRedirections,
38311
38354
  typeOfService
38312
38355
  }, handler) {
38313
- if (typeof path63 !== "string") {
38356
+ if (typeof path64 !== "string") {
38314
38357
  throw new InvalidArgumentError2("path must be a string");
38315
- } else if (path63[0] !== "/" && !(path63.startsWith("http://") || path63.startsWith("https://")) && method !== "CONNECT") {
38358
+ } else if (path64[0] !== "/" && !(path64.startsWith("http://") || path64.startsWith("https://")) && method !== "CONNECT") {
38316
38359
  throw new InvalidArgumentError2("path must be an absolute URL or start with a slash");
38317
- } else if (invalidPathRegex.test(path63)) {
38360
+ } else if (invalidPathRegex.test(path64)) {
38318
38361
  throw new InvalidArgumentError2("invalid request path");
38319
38362
  }
38320
38363
  if (typeof method !== "string") {
@@ -38389,7 +38432,7 @@ var require_request = __commonJS({
38389
38432
  this.completed = false;
38390
38433
  this.aborted = false;
38391
38434
  this.upgrade = upgrade || null;
38392
- this.path = query ? serializePathWithQuery(path63, query) : path63;
38435
+ this.path = query ? serializePathWithQuery(path64, query) : path64;
38393
38436
  this.origin = origin;
38394
38437
  this.protocol = getProtocolFromUrlString(origin);
38395
38438
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
@@ -43571,7 +43614,7 @@ var require_client_h1 = __commonJS({
43571
43614
  return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
43572
43615
  }
43573
43616
  function writeH1(client, request7) {
43574
- const { method, path: path63, host, upgrade, blocking, reset } = request7;
43617
+ const { method, path: path64, host, upgrade, blocking, reset } = request7;
43575
43618
  let { body, headers, contentLength } = request7;
43576
43619
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
43577
43620
  if (util2.isFormDataLike(body)) {
@@ -43649,7 +43692,7 @@ var require_client_h1 = __commonJS({
43649
43692
  if (socket.setTypeOfService) {
43650
43693
  socket.setTypeOfService(request7.typeOfService);
43651
43694
  }
43652
- let header = `${method} ${path63} HTTP/1.1\r
43695
+ let header = `${method} ${path64} HTTP/1.1\r
43653
43696
  `;
43654
43697
  if (typeof host === "string") {
43655
43698
  header += `host: ${host}\r
@@ -44328,7 +44371,7 @@ var require_client_h2 = __commonJS({
44328
44371
  const headersTimeout = request7.headersTimeout ?? client[kHeadersTimeout];
44329
44372
  const bodyTimeout = request7.bodyTimeout ?? client[kBodyTimeout];
44330
44373
  const session = client[kHTTP2Session];
44331
- const { method, path: path63, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request7;
44374
+ const { method, path: path64, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request7;
44332
44375
  let { body } = request7;
44333
44376
  if (upgrade != null && upgrade !== "websocket") {
44334
44377
  util2.errorRequest(client, request7, new InvalidArgumentError2(`Custom upgrade "${upgrade}" not supported over HTTP/2`));
@@ -44397,7 +44440,7 @@ var require_client_h2 = __commonJS({
44397
44440
  }
44398
44441
  headers[HTTP2_HEADER_METHOD] = "CONNECT";
44399
44442
  headers[HTTP2_HEADER_PROTOCOL] = "websocket";
44400
- headers[HTTP2_HEADER_PATH] = path63;
44443
+ headers[HTTP2_HEADER_PATH] = path64;
44401
44444
  if (protocol === "ws:" || protocol === "wss:") {
44402
44445
  headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
44403
44446
  } else {
@@ -44439,7 +44482,7 @@ var require_client_h2 = __commonJS({
44439
44482
  stream.setTimeout(headersTimeout);
44440
44483
  return true;
44441
44484
  }
44442
- headers[HTTP2_HEADER_PATH] = path63;
44485
+ headers[HTTP2_HEADER_PATH] = path64;
44443
44486
  headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
44444
44487
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
44445
44488
  if (body && typeof body.read === "function") {
@@ -46791,10 +46834,10 @@ var require_proxy_agent = __commonJS({
46791
46834
  };
46792
46835
  const {
46793
46836
  origin,
46794
- path: path63 = "/",
46837
+ path: path64 = "/",
46795
46838
  headers = {}
46796
46839
  } = opts;
46797
- opts.path = origin + path63;
46840
+ opts.path = origin + path64;
46798
46841
  if (!("host" in headers) && !("Host" in headers)) {
46799
46842
  const { host } = new URL(origin);
46800
46843
  headers.host = host;
@@ -48903,20 +48946,20 @@ var require_mock_utils = __commonJS({
48903
48946
  }
48904
48947
  return normalizedQp;
48905
48948
  }
48906
- function safeUrl(path63) {
48907
- if (typeof path63 !== "string") {
48908
- return path63;
48949
+ function safeUrl(path64) {
48950
+ if (typeof path64 !== "string") {
48951
+ return path64;
48909
48952
  }
48910
- const pathSegments = path63.split("?", 3);
48953
+ const pathSegments = path64.split("?", 3);
48911
48954
  if (pathSegments.length !== 2) {
48912
- return path63;
48955
+ return path64;
48913
48956
  }
48914
48957
  const qp2 = new URLSearchParams(pathSegments.pop());
48915
48958
  qp2.sort();
48916
48959
  return [...pathSegments, qp2.toString()].join("?");
48917
48960
  }
48918
- function matchKey(mockDispatch2, { path: path63, method, body, headers }) {
48919
- const pathMatch = matchValue(mockDispatch2.path, path63);
48961
+ function matchKey(mockDispatch2, { path: path64, method, body, headers }) {
48962
+ const pathMatch = matchValue(mockDispatch2.path, path64);
48920
48963
  const methodMatch = matchValue(mockDispatch2.method, method);
48921
48964
  const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
48922
48965
  const headersMatch = matchHeaders(mockDispatch2, headers);
@@ -48941,8 +48984,8 @@ var require_mock_utils = __commonJS({
48941
48984
  const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path;
48942
48985
  const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
48943
48986
  const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
48944
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path63, ignoreTrailingSlash }) => {
48945
- return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path63)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path63), resolvedPath);
48987
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path64, ignoreTrailingSlash }) => {
48988
+ return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path64)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path64), resolvedPath);
48946
48989
  });
48947
48990
  if (matchedMockDispatches.length === 0) {
48948
48991
  throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
@@ -48981,19 +49024,19 @@ var require_mock_utils = __commonJS({
48981
49024
  mockDispatches.splice(index, 1);
48982
49025
  }
48983
49026
  }
48984
- function removeTrailingSlash(path63) {
48985
- while (path63.endsWith("/")) {
48986
- path63 = path63.slice(0, -1);
49027
+ function removeTrailingSlash(path64) {
49028
+ while (path64.endsWith("/")) {
49029
+ path64 = path64.slice(0, -1);
48987
49030
  }
48988
- if (path63.length === 0) {
48989
- path63 = "/";
49031
+ if (path64.length === 0) {
49032
+ path64 = "/";
48990
49033
  }
48991
- return path63;
49034
+ return path64;
48992
49035
  }
48993
49036
  function buildKey(opts) {
48994
- const { path: path63, method, body, headers, query } = opts;
49037
+ const { path: path64, method, body, headers, query } = opts;
48995
49038
  return {
48996
- path: path63,
49039
+ path: path64,
48997
49040
  method,
48998
49041
  body,
48999
49042
  headers,
@@ -49683,10 +49726,10 @@ var require_pending_interceptors_formatter = __commonJS({
49683
49726
  }
49684
49727
  format(pendingInterceptors) {
49685
49728
  const withPrettyHeaders = pendingInterceptors.map(
49686
- ({ method, path: path63, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
49729
+ ({ method, path: path64, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
49687
49730
  Method: method,
49688
49731
  Origin: origin,
49689
- Path: path63,
49732
+ Path: path64,
49690
49733
  "Status code": statusCode,
49691
49734
  Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
49692
49735
  Invocations: timesInvoked,
@@ -49768,9 +49811,9 @@ var require_mock_agent = __commonJS({
49768
49811
  const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
49769
49812
  const dispatchOpts = { ...opts };
49770
49813
  if (acceptNonStandardSearchParameters && dispatchOpts.path) {
49771
- const [path63, searchParams] = dispatchOpts.path.split("?");
49814
+ const [path64, searchParams] = dispatchOpts.path.split("?");
49772
49815
  const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters);
49773
- dispatchOpts.path = `${path63}?${normalizedSearchParams}`;
49816
+ dispatchOpts.path = `${path64}?${normalizedSearchParams}`;
49774
49817
  }
49775
49818
  return this[kAgent].dispatch(dispatchOpts, handler);
49776
49819
  }
@@ -50171,12 +50214,12 @@ var require_snapshot_recorder = __commonJS({
50171
50214
  * @return {Promise<void>} - Resolves when snapshots are loaded
50172
50215
  */
50173
50216
  async loadSnapshots(filePath) {
50174
- const path63 = filePath || this.#snapshotPath;
50175
- if (!path63) {
50217
+ const path64 = filePath || this.#snapshotPath;
50218
+ if (!path64) {
50176
50219
  throw new InvalidArgumentError2("Snapshot path is required");
50177
50220
  }
50178
50221
  try {
50179
- const data = await readFile(resolve2(path63), "utf8");
50222
+ const data = await readFile(resolve2(path64), "utf8");
50180
50223
  const parsed = JSON.parse(data);
50181
50224
  if (Array.isArray(parsed)) {
50182
50225
  this.#snapshots.clear();
@@ -50190,7 +50233,7 @@ var require_snapshot_recorder = __commonJS({
50190
50233
  if (error63.code === "ENOENT") {
50191
50234
  this.#snapshots.clear();
50192
50235
  } else {
50193
- throw new UndiciError(`Failed to load snapshots from ${path63}`, { cause: error63 });
50236
+ throw new UndiciError(`Failed to load snapshots from ${path64}`, { cause: error63 });
50194
50237
  }
50195
50238
  }
50196
50239
  }
@@ -50201,11 +50244,11 @@ var require_snapshot_recorder = __commonJS({
50201
50244
  * @returns {Promise<void>} - Resolves when snapshots are saved
50202
50245
  */
50203
50246
  async saveSnapshots(filePath) {
50204
- const path63 = filePath || this.#snapshotPath;
50205
- if (!path63) {
50247
+ const path64 = filePath || this.#snapshotPath;
50248
+ if (!path64) {
50206
50249
  throw new InvalidArgumentError2("Snapshot path is required");
50207
50250
  }
50208
- const resolvedPath = resolve2(path63);
50251
+ const resolvedPath = resolve2(path64);
50209
50252
  await mkdir(dirname3(resolvedPath), { recursive: true });
50210
50253
  const data = Array.from(this.#snapshots.entries()).map(([hash2, snapshot]) => ({
50211
50254
  hash: hash2,
@@ -50837,15 +50880,15 @@ var require_redirect_handler = __commonJS({
50837
50880
  return;
50838
50881
  }
50839
50882
  const { origin, pathname, search } = util2.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
50840
- const path63 = search ? `${pathname}${search}` : pathname;
50841
- const redirectUrlString = `${origin}${path63}`;
50883
+ const path64 = search ? `${pathname}${search}` : pathname;
50884
+ const redirectUrlString = `${origin}${path64}`;
50842
50885
  for (const historyUrl of this.history) {
50843
50886
  if (historyUrl.toString() === redirectUrlString) {
50844
50887
  throw new InvalidArgumentError2(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);
50845
50888
  }
50846
50889
  }
50847
50890
  this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
50848
- this.opts.path = path63;
50891
+ this.opts.path = path64;
50849
50892
  this.opts.origin = origin;
50850
50893
  this.opts.query = null;
50851
50894
  }
@@ -52605,10 +52648,10 @@ var require_cache_handler = __commonJS({
52605
52648
  }
52606
52649
  return locationUrl.pathname + locationUrl.search;
52607
52650
  }
52608
- function deleteCachedUri(store, cacheKey, path63) {
52651
+ function deleteCachedUri(store, cacheKey, path64) {
52609
52652
  deleteCachedValue(store, {
52610
52653
  ...cacheKey,
52611
- path: path63
52654
+ path: path64
52612
52655
  });
52613
52656
  for (let i10 = 0; i10 < util2.safeHTTPMethods.length; i10++) {
52614
52657
  const method = util2.safeHTTPMethods[i10];
@@ -52616,7 +52659,7 @@ var require_cache_handler = __commonJS({
52616
52659
  deleteCachedValue(store, {
52617
52660
  ...cacheKey,
52618
52661
  method,
52619
- path: path63
52662
+ path: path64
52620
52663
  });
52621
52664
  }
52622
52665
  }
@@ -52627,9 +52670,9 @@ var require_cache_handler = __commonJS({
52627
52670
  }
52628
52671
  const values = Array.isArray(headerValue2) ? headerValue2 : [headerValue2];
52629
52672
  for (let i10 = 0; i10 < values.length; i10++) {
52630
- const path63 = getSameOriginPath(cacheKey, values[i10]);
52631
- if (path63 !== void 0) {
52632
- deleteCachedUri(store, cacheKey, path63);
52673
+ const path64 = getSameOriginPath(cacheKey, values[i10]);
52674
+ if (path64 !== void 0) {
52675
+ deleteCachedUri(store, cacheKey, path64);
52633
52676
  }
52634
52677
  }
52635
52678
  }
@@ -57629,11 +57672,11 @@ var require_fetch = __commonJS({
57629
57672
  function dispatch({ body }) {
57630
57673
  const url2 = requestCurrentURL(request7);
57631
57674
  const agent = fetchParams.controller.dispatcher;
57632
- const path63 = url2.pathname + url2.search;
57675
+ const path64 = url2.pathname + url2.search;
57633
57676
  const hasTrailingQuestionMark = url2.search.length === 0 && url2.href[url2.href.length - url2.hash.length - 1] === "?";
57634
57677
  return new Promise((resolve2, reject) => agent.dispatch(
57635
57678
  {
57636
- path: hasTrailingQuestionMark ? `${path63}?` : path63,
57679
+ path: hasTrailingQuestionMark ? `${path64}?` : path64,
57637
57680
  origin: url2.origin,
57638
57681
  method: request7.method,
57639
57682
  body: agent.isMockActive ? request7.body && (request7.body.source || request7.body.stream) : body,
@@ -58580,9 +58623,9 @@ var require_util5 = __commonJS({
58580
58623
  }
58581
58624
  }
58582
58625
  }
58583
- function validateCookiePath(path63) {
58584
- for (let i10 = 0; i10 < path63.length; ++i10) {
58585
- const code = path63.charCodeAt(i10);
58626
+ function validateCookiePath(path64) {
58627
+ for (let i10 = 0; i10 < path64.length; ++i10) {
58628
+ const code = path64.charCodeAt(i10);
58586
58629
  if (code < 32 || // exclude CTLs (0-31)
58587
58630
  code > 126 || // exclude DEL and non-ascii
58588
58631
  code === 59) {
@@ -61930,11 +61973,11 @@ var require_undici = __commonJS({
61930
61973
  if (typeof opts.path !== "string") {
61931
61974
  throw new InvalidArgumentError2("invalid opts.path");
61932
61975
  }
61933
- let path63 = opts.path;
61976
+ let path64 = opts.path;
61934
61977
  if (!opts.path.startsWith("/")) {
61935
- path63 = `/${path63}`;
61978
+ path64 = `/${path64}`;
61936
61979
  }
61937
- url2 = new URL(util2.parseOrigin(url2).origin + path63);
61980
+ url2 = new URL(util2.parseOrigin(url2).origin + path64);
61938
61981
  } else {
61939
61982
  if (!opts) {
61940
61983
  opts = typeof url2 === "object" ? url2 : {};
@@ -62084,7 +62127,7 @@ function ensureFrontDoor(params) {
62084
62127
  if (supervisorPid !== void 0 && !distrusted.has(supervisorPid) && ports.isRunning(supervisorPid)) {
62085
62128
  if (state?.port !== void 0 && state.connectPort !== void 0) {
62086
62129
  if (supervisorPid === params.launcherPid && params.replace !== true && ports.isFrontDoorSupervisor(supervisorPid)) {
62087
- const token = (0, import_node_crypto10.randomUUID)();
62130
+ const token = (0, import_node_crypto11.randomUUID)();
62088
62131
  writeFrontDoorSession(ports.fs, paths.frontdoorSessionsDir, { pid: params.launcherPid, startedAt: ports.now(), token, supervisorPid });
62089
62132
  return { port: state.port, connectPort: state.connectPort, token };
62090
62133
  }
@@ -62098,7 +62141,7 @@ function ensureFrontDoor(params) {
62098
62141
  continue;
62099
62142
  }
62100
62143
  if (verdict.ok) {
62101
- const token = (0, import_node_crypto10.randomUUID)();
62144
+ const token = (0, import_node_crypto11.randomUUID)();
62102
62145
  writeFrontDoorSession(ports.fs, paths.frontdoorSessionsDir, { pid: params.launcherPid, startedAt: ports.now(), token, supervisorPid });
62103
62146
  return { port: state.port, connectPort: state.connectPort, token };
62104
62147
  }
@@ -62168,11 +62211,11 @@ function restartFrontDoor(params) {
62168
62211
  }
62169
62212
  return { action: "restarted", previousPid, pid };
62170
62213
  }
62171
- var import_node_crypto10, FRONTDOOR_START_TIMEOUT_MS, FRONTDOOR_LAUNCHER_POLL_MS, FRONTDOOR_PROBE_ATTEMPTS, FRONTDOOR_EXIT_GRACE_MS, FrontDoorStartError;
62214
+ var import_node_crypto11, FRONTDOOR_START_TIMEOUT_MS, FRONTDOOR_LAUNCHER_POLL_MS, FRONTDOOR_PROBE_ATTEMPTS, FRONTDOOR_EXIT_GRACE_MS, FrontDoorStartError;
62172
62215
  var init_ensure2 = __esm({
62173
62216
  "src/frontdoor/ensure.ts"() {
62174
62217
  "use strict";
62175
- import_node_crypto10 = require("node:crypto");
62218
+ import_node_crypto11 = require("node:crypto");
62176
62219
  init_cliError();
62177
62220
  init_state2();
62178
62221
  init_state();
@@ -62306,7 +62349,7 @@ var init_selfIdentity = __esm({
62306
62349
  // src/frontdoor/trust.ts
62307
62350
  function resolveTrustBundle(params) {
62308
62351
  const { caCertFile, bundlesDir, variable, inherited, fs: fs25 } = params;
62309
- if (inherited === void 0 || inherited === "" || import_node_path35.default.resolve(inherited) === import_node_path35.default.resolve(caCertFile)) {
62352
+ if (inherited === void 0 || inherited === "" || import_node_path36.default.resolve(inherited) === import_node_path36.default.resolve(caCertFile)) {
62310
62353
  return { path: caCertFile };
62311
62354
  }
62312
62355
  const caPem = fs25.readFileUtf8(caCertFile);
@@ -62324,19 +62367,19 @@ function resolveTrustBundle(params) {
62324
62367
  }
62325
62368
  const combined = `${inheritedPem.trimEnd()}
62326
62369
  ${caPem}`;
62327
- const bundle = import_node_path35.default.join(bundlesDir, `${(0, import_node_crypto11.createHash)("sha256").update(combined).digest("hex").slice(0, BUNDLE_NAME_HEX_DIGITS)}.pem`);
62370
+ const bundle = import_node_path36.default.join(bundlesDir, `${(0, import_node_crypto12.createHash)("sha256").update(combined).digest("hex").slice(0, BUNDLE_NAME_HEX_DIGITS)}.pem`);
62328
62371
  if (!fs25.exists(bundle)) {
62329
62372
  fs25.mkdirp(bundlesDir);
62330
62373
  fs25.writeFileAtomic(bundle, combined);
62331
62374
  }
62332
62375
  return { path: bundle };
62333
62376
  }
62334
- var import_node_crypto11, import_node_path35, BUNDLE_NAME_HEX_DIGITS;
62377
+ var import_node_crypto12, import_node_path36, BUNDLE_NAME_HEX_DIGITS;
62335
62378
  var init_trust = __esm({
62336
62379
  "src/frontdoor/trust.ts"() {
62337
62380
  "use strict";
62338
- import_node_crypto11 = require("node:crypto");
62339
- import_node_path35 = __toESM(require("node:path"), 1);
62381
+ import_node_crypto12 = require("node:crypto");
62382
+ import_node_path36 = __toESM(require("node:path"), 1);
62340
62383
  BUNDLE_NAME_HEX_DIGITS = 16;
62341
62384
  }
62342
62385
  });
@@ -62528,19 +62571,19 @@ async function downloadAndInstall(ports, asset, target) {
62528
62571
  const tempDir = ports.fs.mkdtemp();
62529
62572
  try {
62530
62573
  const assetUrl = `${DOWNLOAD_BASE_URL}/${asset}`;
62531
- ports.fs.writeFileBytes(import_node_path36.default.join(tempDir, asset), await mustDownload(ports.http, assetUrl));
62532
- ports.fs.writeFileUtf8(import_node_path36.default.join(tempDir, `${asset}.sha256`), Buffer.from(await mustDownload(ports.http, `${assetUrl}.sha256`)).toString("utf8"));
62533
- const downloaded = ports.fs.readFileBytes(import_node_path36.default.join(tempDir, asset));
62534
- const sidecar = ports.fs.readFileUtf8(import_node_path36.default.join(tempDir, `${asset}.sha256`));
62574
+ ports.fs.writeFileBytes(import_node_path37.default.join(tempDir, asset), await mustDownload(ports.http, assetUrl));
62575
+ ports.fs.writeFileUtf8(import_node_path37.default.join(tempDir, `${asset}.sha256`), Buffer.from(await mustDownload(ports.http, `${assetUrl}.sha256`)).toString("utf8"));
62576
+ const downloaded = ports.fs.readFileBytes(import_node_path37.default.join(tempDir, asset));
62577
+ const sidecar = ports.fs.readFileUtf8(import_node_path37.default.join(tempDir, `${asset}.sha256`));
62535
62578
  if (downloaded === void 0 || sidecar === void 0) {
62536
62579
  throw new UpdateDownloadError(`the downloaded files for ${asset} are missing from ${tempDir}`);
62537
62580
  }
62538
62581
  const expected = expectedSha256(sidecar);
62539
- const actual = (0, import_node_crypto12.createHash)("sha256").update(downloaded).digest("hex");
62582
+ const actual = (0, import_node_crypto13.createHash)("sha256").update(downloaded).digest("hex");
62540
62583
  if (expected === void 0 || expected !== actual) {
62541
62584
  throw new UpdateDownloadError(`checksum mismatch for ${asset} (expected ${expected ?? "(none)"}, got ${actual})`);
62542
62585
  }
62543
- const tempBinary = import_node_path36.default.join(import_node_path36.default.dirname(target), `.${import_node_path36.default.basename(target)}.${String(process.pid)}.${(0, import_node_crypto12.randomUUID)()}.tmp`);
62586
+ const tempBinary = import_node_path37.default.join(import_node_path37.default.dirname(target), `.${import_node_path37.default.basename(target)}.${String(process.pid)}.${(0, import_node_crypto13.randomUUID)()}.tmp`);
62544
62587
  ports.fs.writeFileBytes(tempBinary, downloaded);
62545
62588
  try {
62546
62589
  ports.fs.chmod(tempBinary, EXECUTABLE_MODE);
@@ -62587,12 +62630,12 @@ async function runSelfUpdate(ports, options) {
62587
62630
  }
62588
62631
  return { current: options.currentVersion, latest, action: "updated" };
62589
62632
  }
62590
- var import_node_crypto12, import_node_path36, LATEST_RELEASE_URL, DOWNLOAD_BASE_URL, MACOS_X64_NOTE, BREW_PREFIXES, EXECUTABLE_MODE, UpdateChannelError, UpdateConflictError, UpdateDownloadError;
62633
+ var import_node_crypto13, import_node_path37, LATEST_RELEASE_URL, DOWNLOAD_BASE_URL, MACOS_X64_NOTE, BREW_PREFIXES, EXECUTABLE_MODE, UpdateChannelError, UpdateConflictError, UpdateDownloadError;
62591
62634
  var init_update = __esm({
62592
62635
  "src/update/update.ts"() {
62593
62636
  "use strict";
62594
- import_node_crypto12 = require("node:crypto");
62595
- import_node_path36 = __toESM(require("node:path"), 1);
62637
+ import_node_crypto13 = require("node:crypto");
62638
+ import_node_path37 = __toESM(require("node:path"), 1);
62596
62639
  init_cliError();
62597
62640
  LATEST_RELEASE_URL = "https://github.com/ExaDev/agent-shim/releases/latest";
62598
62641
  DOWNLOAD_BASE_URL = "https://github.com/ExaDev/agent-shim/releases/latest/download";
@@ -62763,13 +62806,13 @@ function agentShimCliPath(distDir = typeof __AGENT_SHIM_DIST_DIR__ === "string"
62763
62806
  if (distDir === void 0) {
62764
62807
  throw new OwnCliPathUnknownError();
62765
62808
  }
62766
- return import_node_path38.default.join(distDir, OWN_CLI_FILE_NAME);
62809
+ return import_node_path39.default.join(distDir, OWN_CLI_FILE_NAME);
62767
62810
  }
62768
- var import_node_path38, OWN_CLI_FILE_NAME, OwnCliPathUnknownError;
62811
+ var import_node_path39, OWN_CLI_FILE_NAME, OwnCliPathUnknownError;
62769
62812
  var init_ownCli = __esm({
62770
62813
  "src/ownCli.ts"() {
62771
62814
  "use strict";
62772
- import_node_path38 = __toESM(require("node:path"), 1);
62815
+ import_node_path39 = __toESM(require("node:path"), 1);
62773
62816
  init_cliError();
62774
62817
  OWN_CLI_FILE_NAME = "cli.cjs";
62775
62818
  OwnCliPathUnknownError = class extends CliError {
@@ -63080,22 +63123,22 @@ function capabilityFromProxyAuthorization(value2) {
63080
63123
  return password === "" ? void 0 : password;
63081
63124
  }
63082
63125
  function digest(token) {
63083
- return (0, import_node_crypto13.createHash)("sha256").update(token, "utf8").digest();
63126
+ return (0, import_node_crypto14.createHash)("sha256").update(token, "utf8").digest();
63084
63127
  }
63085
63128
  function isLiveCapability(presented, live) {
63086
63129
  const presentedDigest = digest(presented);
63087
63130
  let matched = false;
63088
63131
  for (const token of live) {
63089
- const equal = (0, import_node_crypto13.timingSafeEqual)(presentedDigest, digest(token));
63132
+ const equal = (0, import_node_crypto14.timingSafeEqual)(presentedDigest, digest(token));
63090
63133
  matched = equal || matched;
63091
63134
  }
63092
63135
  return matched;
63093
63136
  }
63094
- var import_node_crypto13, CONNECT_PROXY_USER, CONNECT_PROXY_REALM, BASIC_SCHEME;
63137
+ var import_node_crypto14, CONNECT_PROXY_USER, CONNECT_PROXY_REALM, BASIC_SCHEME;
63095
63138
  var init_capability = __esm({
63096
63139
  "src/frontdoor/capability.ts"() {
63097
63140
  "use strict";
63098
- import_node_crypto13 = require("node:crypto");
63141
+ import_node_crypto14 = require("node:crypto");
63099
63142
  CONNECT_PROXY_USER = "agent-shim";
63100
63143
  CONNECT_PROXY_REALM = "agent-shim front door";
63101
63144
  BASIC_SCHEME = "basic";
@@ -63133,7 +63176,7 @@ function buildEnv(params) {
63133
63176
  const parentCustomHeaders = params.baseEnv.ANTHROPIC_CUSTOM_HEADERS;
63134
63177
  let providerCustomHeaders;
63135
63178
  if (!params.configDirEscapeHatch && params.resolvedIdentityName !== void 0) {
63136
- env.CLAUDE_CONFIG_DIR = import_node_path39.default.join(params.identitiesDir, params.resolvedIdentityName);
63179
+ env.CLAUDE_CONFIG_DIR = import_node_path40.default.join(params.identitiesDir, params.resolvedIdentityName);
63137
63180
  }
63138
63181
  if (params.provider !== void 0) {
63139
63182
  const providerEnv = params.provider.definition.env ?? {};
@@ -63145,7 +63188,7 @@ function buildEnv(params) {
63145
63188
  }
63146
63189
  }
63147
63190
  if (params.provider !== void 0) {
63148
- env.ANTHROPIC_AUTH_TOKEN = void 0;
63191
+ env.ANTHROPIC_AUTH_TOKEN = params.remoteControl ? void 0 : PROVIDER_SESSION_PLACEHOLDER;
63149
63192
  env.ANTHROPIC_API_KEY = void 0;
63150
63193
  env.CLAUDE_CODE_OAUTH_TOKEN = void 0;
63151
63194
  } else if (params.identityCredential !== void 0) {
@@ -63177,17 +63220,18 @@ function buildEnv(params) {
63177
63220
  }
63178
63221
  return env;
63179
63222
  }
63180
- var import_node_path39, LOOPBACK_HOSTS;
63223
+ var import_node_path40, LOOPBACK_HOSTS, PROVIDER_SESSION_PLACEHOLDER;
63181
63224
  var init_flags = __esm({
63182
63225
  "src/launcher/flags.ts"() {
63183
63226
  "use strict";
63184
- import_node_path39 = __toESM(require("node:path"), 1);
63227
+ import_node_path40 = __toESM(require("node:path"), 1);
63185
63228
  init_envBool();
63186
63229
  init_credential();
63187
63230
  init_headers();
63188
63231
  init_capability();
63189
63232
  init_route();
63190
63233
  LOOPBACK_HOSTS = ["127.0.0.1", "localhost", "::1"];
63234
+ PROVIDER_SESSION_PLACEHOLDER = "agent-shim-provider-session";
63191
63235
  }
63192
63236
  });
63193
63237
 
@@ -63266,7 +63310,7 @@ function newestTranscript(fs25, projectDir) {
63266
63310
  if (!name.endsWith(".jsonl")) {
63267
63311
  continue;
63268
63312
  }
63269
- const candidate = import_node_path40.default.join(projectDir, name);
63313
+ const candidate = import_node_path41.default.join(projectDir, name);
63270
63314
  const stat = fs25.lstat(candidate);
63271
63315
  if (stat?.kind === "file" && stat.mtimeMs > newestMs) {
63272
63316
  newestMs = stat.mtimeMs;
@@ -63276,24 +63320,24 @@ function newestTranscript(fs25, projectDir) {
63276
63320
  return newest;
63277
63321
  }
63278
63322
  function latestConversationId(fs25, params) {
63279
- const file2 = newestTranscript(fs25, import_node_path40.default.join(params.claudeHome, "projects", projectDirNameOf(params.cwd)));
63280
- return file2 === void 0 ? void 0 : import_node_path40.default.basename(file2, ".jsonl");
63323
+ const file2 = newestTranscript(fs25, import_node_path41.default.join(params.claudeHome, "projects", projectDirNameOf(params.cwd)));
63324
+ return file2 === void 0 ? void 0 : import_node_path41.default.basename(file2, ".jsonl");
63281
63325
  }
63282
63326
  function resumedContextTokens(fs25, params) {
63283
63327
  const target = resumeTargetOf(params.passthrough);
63284
63328
  if (target === void 0) {
63285
63329
  return void 0;
63286
63330
  }
63287
- const projectDir = import_node_path40.default.join(params.claudeHome, "projects", projectDirNameOf(params.cwd));
63288
- const file2 = target.kind === "id" ? import_node_path40.default.join(projectDir, `${target.id}.jsonl`) : newestTranscript(fs25, projectDir);
63331
+ const projectDir = import_node_path41.default.join(params.claudeHome, "projects", projectDirNameOf(params.cwd));
63332
+ const file2 = target.kind === "id" ? import_node_path41.default.join(projectDir, `${target.id}.jsonl`) : newestTranscript(fs25, projectDir);
63289
63333
  const text2 = file2 === void 0 ? void 0 : fs25.readFileUtf8(file2);
63290
63334
  return text2 === void 0 ? void 0 : contextTokensOfTranscript(text2);
63291
63335
  }
63292
- var import_node_path40;
63336
+ var import_node_path41;
63293
63337
  var init_resumeContext = __esm({
63294
63338
  "src/usage/resumeContext.ts"() {
63295
63339
  "use strict";
63296
- import_node_path40 = __toESM(require("node:path"), 1);
63340
+ import_node_path41 = __toESM(require("node:path"), 1);
63297
63341
  }
63298
63342
  });
63299
63343
 
@@ -63688,7 +63732,7 @@ function decideLaunch(params, readOnly) {
63688
63732
  identityDefaultConfigProfile: loadedIdentity?.config.defaultConfigProfile,
63689
63733
  globalDefaultConfigProfile: params.globalDefaultConfigProfile
63690
63734
  });
63691
- if (configProfileDecision.name !== void 0 && params.allowMissingConfigProfile !== true && fs25.readConfigFile(import_node_path41.default.join(paths.configProfilesDir, `${configProfileDecision.name}.json`)) === void 0) {
63735
+ if (configProfileDecision.name !== void 0 && params.allowMissingConfigProfile !== true && fs25.readConfigFile(import_node_path42.default.join(paths.configProfilesDir, `${configProfileDecision.name}.json`)) === void 0) {
63692
63736
  log.error(
63693
63737
  `agent-shim: no configuration profile named "${configProfileDecision.name}" (selected via ${configProfileDecision.source}). Run \`agent-shim profile add ${configProfileDecision.name}\` first.`
63694
63738
  );
@@ -63783,7 +63827,7 @@ function decideLaunch(params, readOnly) {
63783
63827
  }
63784
63828
  const pinnedVersion = resolveClaudeVersion({ env, ...parsedArgv.claudeVersion === void 0 ? {} : { flag: parsedArgv.claudeVersion }, ...cascadeLaunch?.claudeVersion === void 0 ? {} : { cascade: cascadeLaunch.claudeVersion } });
63785
63829
  const discovered = params.resolveClaudeBinary(pinnedVersion === void 0 ? void 0 : { version: pinnedVersion.version });
63786
- const flags = resolveLaunchFlags({
63830
+ const requestedFlags = resolveLaunchFlags({
63787
63831
  env,
63788
63832
  ...cascadeLaunch === void 0 ? {} : { cascade: cascadeLaunch },
63789
63833
  flags: {
@@ -63793,12 +63837,17 @@ function decideLaunch(params, readOnly) {
63793
63837
  ...parsedArgv.trackUsage === void 0 ? {} : { trackUsage: parsedArgv.trackUsage }
63794
63838
  }
63795
63839
  });
63840
+ const loginlessProvider = requestedFlags.remoteControl && selectedProvider !== void 0 && farmIdentity !== void 0 && params.hasStoredLogin?.(farmIdentity) === false ? { identity: farmIdentity, provider: selectedProvider.name } : void 0;
63841
+ if (loginlessProvider !== void 0 && !readOnly) {
63842
+ log.info(`agent-shim: identity ${loginlessProvider.identity} has no stored login, so Remote Control, which needs one, is off for this launch; provider ${loginlessProvider.provider} runs without it`);
63843
+ }
63844
+ const flags = loginlessProvider === void 0 ? requestedFlags : { ...requestedFlags, remoteControl: false };
63796
63845
  const args = buildArgv({
63797
63846
  toolFlags: buildFlagArgs(flags),
63798
63847
  extraFlags: splitExtraFlags(env.CLAUDE_EXTRA_FLAGS),
63799
63848
  passthrough: params.supervised === void 0 ? parsedArgv.rest : withSupervision(parsedArgv.rest, params.supervised)
63800
63849
  });
63801
- const configDir = configDirEscapeHatchApplies || identityDecision.name === void 0 ? env.CLAUDE_CONFIG_DIR : import_node_path41.default.join(paths.identitiesDir, identityDecision.name);
63850
+ const configDir = configDirEscapeHatchApplies || identityDecision.name === void 0 ? env.CLAUDE_CONFIG_DIR : import_node_path42.default.join(paths.identitiesDir, identityDecision.name);
63802
63851
  const decision = {
63803
63852
  identitySource: identityDecision.source,
63804
63853
  configDirEscapeHatch: identityDecision.configDirEscapeHatch,
@@ -63839,7 +63888,7 @@ function prepareLaunch(params) {
63839
63888
  );
63840
63889
  const updateCheck = runLaunchUpdateCheck({
63841
63890
  mode: params.updateMode ?? "off",
63842
- checkPath: import_node_path41.default.join(paths.root, "update.check"),
63891
+ checkPath: import_node_path42.default.join(paths.root, "update.check"),
63843
63892
  currentVersion: package_default.version,
63844
63893
  port: params.update
63845
63894
  });
@@ -63908,7 +63957,7 @@ function prepareLaunch(params) {
63908
63957
  log.info(`agent-shim: routing through the front door on 127.0.0.1:${String(frontDoor.port)}${resolvedProvider === void 0 ? ` (OAuth via the door's CONNECT surface on 127.0.0.1:${String(frontDoor.connectPort)}, usage recorded)` : ` (provider ${resolvedProvider.name})`}`);
63909
63958
  }
63910
63959
  const frontDoorRelease = frontDoor === void 0 ? void 0 : frontDoorPort?.release;
63911
- const sessionId = params.supervised?.sessionId ?? (0, import_node_crypto14.randomUUID)();
63960
+ const sessionId = params.supervised?.sessionId ?? (0, import_node_crypto15.randomUUID)();
63912
63961
  const finalEnv = buildEnv({
63913
63962
  baseEnv: env,
63914
63963
  configDirEscapeHatch: configDirEscapeHatchApplies,
@@ -63918,7 +63967,8 @@ function prepareLaunch(params) {
63918
63967
  ...identityCredential === void 0 ? {} : { identityCredential },
63919
63968
  ...frontDoor === void 0 ? {} : { frontdoor: frontDoor },
63920
63969
  ...headroom === void 0 ? {} : { headroom },
63921
- sessionId
63970
+ sessionId,
63971
+ remoteControl: resolvedFlags.remoteControl
63922
63972
  });
63923
63973
  const releases = [...headroom === void 0 || headroomPort === void 0 ? [] : [headroomPort.release], ...frontDoorRelease === void 0 ? [] : [frontDoorRelease]];
63924
63974
  const release = () => {
@@ -63940,7 +63990,8 @@ function resolveLaunch(params) {
63940
63990
  ...decided.provider === void 0 ? {} : { provider: decided.provider },
63941
63991
  ...frontDoor ? { frontdoor: { port: 0, connectPort: 0, trustBundlePath: "", sessionToken: "" } } : {},
63942
63992
  ...decided.flags.headroom ? { headroom: { socketPath: "", projectId: "" } } : {},
63943
- sessionId: ""
63993
+ sessionId: "",
63994
+ remoteControl: decided.flags.remoteControl
63944
63995
  });
63945
63996
  const credentialNames = decided.identityCredentialBlock === void 0 ? [] : Object.keys(credentialVariables(decided.identityCredentialBlock.target ?? "bearer", ""));
63946
63997
  const environment = [.../* @__PURE__ */ new Set([...Object.keys(built).filter((name) => built[name] !== env[name]), ...credentialNames])].sort();
@@ -63971,12 +64022,12 @@ function runLaunchPlan(plan, spawn8) {
63971
64022
  function runLauncher(params) {
63972
64023
  params.proc.exit(runLaunchPlan(prepareLaunch(params), params.spawn));
63973
64024
  }
63974
- var import_node_crypto14, import_node_path41;
64025
+ var import_node_crypto15, import_node_path42;
63975
64026
  var init_launcher = __esm({
63976
64027
  "src/launcher.ts"() {
63977
64028
  "use strict";
63978
- import_node_crypto14 = require("node:crypto");
63979
- import_node_path41 = __toESM(require("node:path"), 1);
64029
+ import_node_crypto15 = require("node:crypto");
64030
+ import_node_path42 = __toESM(require("node:path"), 1);
63980
64031
  init_package();
63981
64032
  init_envBool();
63982
64033
  init_argv();
@@ -64031,7 +64082,7 @@ function buildFarmRuntime(paths, cwd) {
64031
64082
  ...cliOverride === void 0 ? {} : { cliOverride }
64032
64083
  }).input,
64033
64084
  now: () => Date.now(),
64034
- uniqueSuffix: `${String(process.pid)}.${(0, import_node_crypto15.randomUUID)()}`,
64085
+ uniqueSuffix: `${String(process.pid)}.${(0, import_node_crypto16.randomUUID)()}`,
64035
64086
  // Zombie-aware on purpose: a previous launcher that crashed out of a resync without releasing the lock may sit unreaped, still answering signal 0 as alive, and must read as a dead holder so this launch takes the lock over instead of timing out.
64036
64087
  lock: { pid: process.pid, isRunning: realIsProcessRunning, sleep: realSleepSync }
64037
64088
  },
@@ -64057,6 +64108,7 @@ function realPrepareLaunchParams(paths, options) {
64057
64108
  headroom: realHeadroomPort(paths, { spawnDaemon: options.spawnDaemon, cwd: farm.runtime.cwd }),
64058
64109
  frontdoor: realFrontDoorPort(paths, options.spawnDaemon),
64059
64110
  credentials: { ...realCredentialPort, cache: realCredentialCacheEnv(paths) },
64111
+ hasStoredLogin: (identity) => identitySignIn(realFarmFs, { platform: process.platform, run: realRunPort }, { farmRoot: import_node_path43.default.join(paths.identitiesDir, identity), hasCredentialBlock: false }).state !== "signed-out",
64060
64112
  ...farm.directoryIdentity === void 0 ? {} : { directoryPinnedIdentity: farm.directoryIdentity },
64061
64113
  ...farm.directoryConfigProfile === void 0 ? {} : { directoryRuleConfigProfile: farm.directoryConfigProfile },
64062
64114
  ...farm.globalDefaultConfigProfile === void 0 ? {} : { globalDefaultConfigProfile: farm.globalDefaultConfigProfile },
@@ -64093,12 +64145,13 @@ function resolveClaudeLaunch(options) {
64093
64145
  };
64094
64146
  return { resolution: resolveLaunch(realPrepareLaunchParams(paths, { proc, log, spawnDaemon, farm: buildFarmRuntime(paths, options.cwd) })), warnings };
64095
64147
  }
64096
- var import_node_os9, import_node_crypto15, LaunchRefusedError;
64148
+ var import_node_os9, import_node_path43, import_node_crypto16, LaunchRefusedError;
64097
64149
  var init_launchWiring = __esm({
64098
64150
  "src/launchWiring.ts"() {
64099
64151
  "use strict";
64100
64152
  import_node_os9 = __toESM(require("node:os"), 1);
64101
- import_node_crypto15 = require("node:crypto");
64153
+ import_node_path43 = __toESM(require("node:path"), 1);
64154
+ import_node_crypto16 = require("node:crypto");
64102
64155
  init_cliError();
64103
64156
  init_claudeShim();
64104
64157
  init_classify();
@@ -64110,6 +64163,7 @@ var init_launchWiring = __esm({
64110
64163
  init_launchHook();
64111
64164
  init_cascade();
64112
64165
  init_paths();
64166
+ init_signIn();
64113
64167
  init_realPorts();
64114
64168
  LaunchRefusedError = class extends CliError {
64115
64169
  exitCode;
@@ -64211,7 +64265,7 @@ function buildCloudRequestBody(params) {
64211
64265
  if (isCcpaEndpoint(base)) {
64212
64266
  return JSON.stringify({
64213
64267
  project: params.config.cloud.projectId ?? CCPA_DEFAULT_PROJECT_ID,
64214
- requestId: `agent/${(0, import_node_crypto16.randomUUID)()}/${String(Date.now())}/1`,
64268
+ requestId: `agent/${(0, import_node_crypto17.randomUUID)()}/${String(Date.now())}/1`,
64215
64269
  request: params.request,
64216
64270
  model: params.model,
64217
64271
  userAgent: "antigravity"
@@ -64271,11 +64325,11 @@ async function* callCloudAntigravity(params, fetchFn = fetch) {
64271
64325
  }
64272
64326
  }
64273
64327
  }
64274
- var import_node_crypto16, CCPA_ENDPOINT, CCPA_DEFAULT_PROJECT_ID, CCPA_USER_AGENT, AntigravityUpstreamError;
64328
+ var import_node_crypto17, CCPA_ENDPOINT, CCPA_DEFAULT_PROJECT_ID, CCPA_USER_AGENT, AntigravityUpstreamError;
64275
64329
  var init_cloudUpstream = __esm({
64276
64330
  "src/antigravity/cloudUpstream.ts"() {
64277
64331
  "use strict";
64278
- import_node_crypto16 = require("node:crypto");
64332
+ import_node_crypto17 = require("node:crypto");
64279
64333
  CCPA_ENDPOINT = "https://daily-cloudcode-pa.googleapis.com";
64280
64334
  CCPA_DEFAULT_PROJECT_ID = "aicode-consumers";
64281
64335
  CCPA_USER_AGENT = "antigravity/cli/1.3.5 (aidev_client; os_type=darwin; arch=arm64; cl=998863838; auth_method=consumer)";
@@ -78866,7 +78920,7 @@ async function jGe(e14, t10, n10, r10) {
78866
78920
  if (d.length === 0) return [];
78867
78921
  return iv(Buffer.from(gZ(d)), { limit: r10.limit, offset: r10.offset }, l, c10);
78868
78922
  }
78869
- var import_node_module, import_crypto, import_crypto2, import_path, import_node_fs15, import_node_process4, import_fs, import_os, import_path2, yy, import_fs2, import_promises, import_path3, import_readline, import_promises2, import_path4, import_os2, import_path5, Se, import_promises3, xe, import_promises4, import_fs3, import_promises5, import_os3, import_path6, import_promises6, import_os4, import_node_path42, import_node_os10, import_node_process5, import_path7, import_events, import_fs4, import_promises7, import_path8, import_child_process, import_util9, import_child_process2, import_fs5, import_path9, import_path10, import_crypto3, import_fs6, import_path11, import_promises8, import_path12, import_path13, import_promises9, import_path14, import_path15, import_fs7, import_promises10, import_path16, import_crypto4, import_path17, import_async_hooks, import_fs8, import_promises11, import_crypto5, import_fs9, import_promises12, import_path18, import_promises13, import_path19, import_crypto6, import_path20, import_path21, import_path22, import_path23, import_promises14, import_fs10, import_promises15, import_path24, import_util10, import_path25, import_os5, import_path26, import_path27, import_path28, import_path29, import_path30, import_net, import_os6, import_child_process3, import_fs11, import_child_process4, import_crypto7, import_promises16, import_module, import_os7, import_path31, import_url, import_events2, import_child_process5, import_fs12, import_readline2, import_string_decoder, import_fs13, import_promises17, import_os8, import_path32, import_crypto8, import_os9, import_fs14, import_path33, import_crypto9, import_fs15, import_promises18, import_path34, IZ, DZ, v_, LZ, OT, NZ, UZ, kT, X, FZ, dr, HZ, jZ, BZ, ot, st, ed, Kv, Te, Me, Oo, nd, hF, Xv, Qv, rd, LF, or, WF, ZF, sA, XF, od, sd, hg, id, Sg, Oz, fA, $z, Wz, Zz, s$, a$, d$, f$, g$, _$, E$, v$, T$, O$, I$, L$, wg, z$, j$, G$, V$, yA, SA, rH, lH, uH, _H, EH, EA, RH, TH, kH, DH, NH, zH, jH, GH, VH, ZH, JH, ej, nj, ij, cj, uj, CA, bj, Aj, wj, PT, KZ, GZ, VGe, VZ, MT, wr, jo, JZ, XZ, NT, UT, FT, zT, Bo, $T, HT, jT, BT, a4, sp, l4, c4, vt, u4, Nt, KT, d4, p4, uc, GT, m4, g4, WT, _4, y4, VT, Dn, Et, b4, C4, v4, A4, ra, x4, ip, qT, ZT, w4, O4, ro, P4, I4, D4, L4, M4, N4, U4, YT, JT, Sn, H4, Ko, j4, oo, XT, QT, G4, W4, V4, ew, Z4, Y4, tw, X4, nw, R_, rw, ow, Go, sw, iw, aw, lw, ei, aY, cw, Or, cY, uw, dw, lp, pw, cp, mY, gY, up, _Y, aa, fw, la, EY, bY, CY, vY, AY, RY, xY, TY, wY, OY, kY, PY, IY, mw, x_, gw, ca, MY, et, dp, hw, pp, zY, $Y, _w, HY, ua, yw, wt, KY, T_, Sw, WY, VY, qY, so, mp, Ew, vw, bw, YY, Cw, JY, XY, kr, QY, e9, Wo, n9, da, o9, s9, i9, a9, l9, c9, u9, d9, p9, f9, m9, g9, h9, _9, y9, S9, E9, b9, C9, v9, A9, R9, x9, T9, Qe, Aw, pa, hp, Rw, dc, k9, w_, P9, Pr, xw, I9, fa, D9, L9, _p, N9, ma, yp, z9, Tw, $9, H9, ww, Vo, Ir, pc, W9, V9, q9, Ow, Y9, Sp, J9, Ep, X9, qo, Q9, bp, kw, eJ, Pw, Iw, Dw, Lw, tJ, nJ, rJ, oJ, sJ, ti, io, iJ, Mw, Nw, Cp, aJ, Uw, Fw, ga, pr, uJ, Fe, $w, O_, k_, I_, ha, Bw, D_, qw, Vw, N_, U_, yJ, _a3, Yo, Zw, bJ, Rp, Yw, vJ, AJ, Jw, xp, Xw, Tp, Qw, kJ, ya, IJ, DJ, Sa, MJ, fc, NJ, eO, FJ, zJ, $J, tO, Ea, jJ, nO, rO, sO, iO, Vn, GJ, Ln, Jo, aO, lO, cO, wp, XJ, QJ, uO, ba, dO, pO, fO, Dr, ao, mO, Ca, gO, z_, $_, H_, j_, B_, K_, G_, W_, V_, q_, Z_, _O, Y_, J_, yO, X_, c3, Q_, ey, ty, ny, ry, oy, sy, iy, ay, ly, cy, we, SO, en, d3, Pp, vO, g3, gy, wO, S3, BO, KO, Ip, Dp, v3, GO, WO, F9e, IO, A3, hy, x3, NO, I3, Ay, Ry, D3, xy, L3, bc, xa, Ty, wy, Oy, ky, XO, Py, Iy, Dy, Ly, My, Ny, Uy, Fy, zy, nk, rk, d3e, p3e, f3e, m3e, g3e, U3, jp, jy, ik, By, Ky, lk, $3, uk, ck, G3, W3, V3, it, Y3, J3, hk, tXe, Q3, kt, We, gX, Ta, SX, mr, Yp, Jp, eS, nS, yXe, IX, DX, rS, ka, oS, Ok, kk, HX, jX, ef, bXe, Uk, Mr, wc, Fk, Pa, OXe, kXe, iS, PXe, IXe, DXe, GX, YX, JX, XX, QX, e6, t6, Yk, n6, r6, o6, s6, i6, a6, l6, c6, Vk, uS, lf, dS, Qk, eP, uf, os10, qXe, ZXe, h6, tP, df, _6, y6, S6, E6, b6, Jn, gr, nP, rP, Dc, pS, oP, gS, lP, C6, mS, lS, sP, w6, O6, dP, k6, YXe, JXe, P6, I6, pf, L6, fP, XXe, QXe, M6, SS, z6, $6, j6, bP, CP, G6, Lc, si, Z6, ES, bS, X6, Q6, e5, t5, n5, u5, r5, o5, s5, i5, a5, l5, c5, u52, d5, p5, f5, m5, g5, h5, _5, y5, S5, E5, b5, C5, v5, A5, R5, x5, T5, w5, O5, k5, P5, I5, D5, L5, M5, N5, U5, F5, z5, $5, H5, j5, B5, K5, G5, W5, V5, q5, Z5, Y5, J5, X5, Q5, e8, t8, n8, r8, o8, s8, i8, a8, l8, c8, u8, d8, CS, p8, f8, m8, g8, h8, _8, y8, S8, E8, b8, C8, v8, A8, R8, x8, T8, w8, O8, k8, P8, I8, D8, L8, M8, N8, U8, F8, z8, $8, H8, j8, B8, K8, G8, W8, V8, q8, Z8, Y8, J8, X8, Q8, e7, t7, n7, r7, o7, s7, i7, a7, l7, c7, u7, d7, p7, f7, m7, g7, h7, _7, y7, S7, E7, b7, C7, TP, v7, L6e, RP, A7, x7, kP, ff, U6e, F6e, Ua, z6e, $6e, H6e, j6e, PP, IP, vS, DP, w7, LP, O7, k7, P7, AS, RS, xS, I7, MP, NP, D7, G6e, L7, W6e, M7, N7, UP, V6e, U7, F7, z7, $7, H7, j7, B7, q6e, is, wS, Fa, K7, G7, W7, i5e, X7, Q7, HP, $P, BP, tQ, WP, VP, JP, _Q, QP, eI, xQ, Uc, DS, $a, wQ, OQ, kQ, PQ, IQ, DQ, LQ, MQ, NQ, UQ, FQ, zQ, $Q, HQ, jQ, BQ, KQ, GQ, WQ, VQ, qQ, ZQ, YQ, JQ, XQ, QQ, eee, tee, nee, ree, oee, see, iee, aee, lee, cee, uee, dee, pee, fee, mee, gee, hee, _ee, yee, See, Eee, bee, Cee, vee, Aee, Ree, xee, Tee, wee, Oee, kee, Pee, Iee, Dee, Lee, Mee, Nee, Uee, Fee, zee, $ee, Hee, jee, Bee, Kee, Gee, Wee, Vee, qee, Zee, Yee, Jee, Xee, Qee, ete, tte, nte, rte, ote, ste, ite, ate, lte, cte, ute, dte, pte, fte, mte, gte, hte, _te, yte, Ste, Ete, bte, Cte, vte, Ate, Rte, xte, Tte, wte, Ote, kte, Pte, Ite, Dte, Lte, Mte, Nte, Ute, Fte, zte, $te, Hte, jte, Bte, Kte, Gte, Wte, Vte, qte, Zte, Yte, Jte, Xte, Qte, ene, tne, nne, rne, one, sne, ine, ane, lne, cne, une, dne, pne, fne, mne, gne, hne, _ne, yne, Sne, Ene, bne, Cne, vne, Ane, Rne, xne, Tne, wne, One, kne, Pne, Ine, Dne, Lne, Mne, Nne, Une, Fne, zne, $ne, Hne, jne, Bne, Kne, Gne, Wne, Vne, qne, Zne, Yne, Jne, Xne, Qne, ere, tre, nre, rre, ore, sre, ire, are, lre, cre, ure, dre, pre, fre, mre, gre, hre, _re, yre, Sre, Ere, bre, Cre, vre, Are, Rre, xre, Tre, wre, Ore, kre, Pre, Ire, Dre, Lre, Mre, Nre, Ure, Fre, zre, $re, Hre, jre, Bre, Kre, Gre, Wre, Vre, qre, Zre, Yre, Jre, Xre, Qre, eoe, toe, noe, roe, ooe, soe, ioe, aoe, loe, coe, uoe, doe, poe, foe, moe, goe, hoe, _oe, yoe, Soe, Eoe, boe, Coe, voe, Aoe, Roe, xoe, Toe, woe, Ooe, koe, Poe, Ioe, Doe, Loe, Moe, Noe, Uoe, Foe, zoe, $oe, Hoe, joe, Boe, Koe, Goe, Woe, Voe, qoe, Zoe, Yoe, Joe, Xoe, Qoe, ese, tse, nse, rse, ose, sse, ise, ase, lse, cse, use, dse, pse, fse, mse, gse, hse, _se, yse, Sse, Ese, LS, bse, Cse, vse, Ase, Rse, xse, Tse, wse, Ose, kse, Pse, Ise, Dse, Lse, Mse, Nse, Use, Fse, zse, $se, Hse, jse, Bse, Kse, Gse, Wse, Vse, qse, Zse, Yse, Jse, Xse, Qse, eie, tie, nie, rie, oie, sie, iie, aie, lie, cie, uie, die, pie, fie, mie, gie, hie, _ie, yie, Sie, Eie, bie, Cie, vie, Aie, Rie, xie, Tie, wie, Oie, kie, Pie, Iie, Die, Lie, Mie, Nie, Uie, Fie, zie, $ie, Hie, jie, Bie, Kie, Gie, Wie, Vie, qie, Zie, Yie, Jie, Xie, Qie, eae, tae, nae, rae, oae, sae, iae, aae, lae, cae, uae, dae, pae, fae, mae, gae, hae, _ae, yae, Sae, Eae, bae, Cae, vae, Aae, Rae, xae, Tae, wae, Oae, kae, Pae, Iae, Dae, Lae, Mae, Nae, Uae, Fae, zae, $ae, Hae, jae, Bae, Kae, Gae, Wae, Vae, qae, Zae, Yae, Jae, Xae, Qae, ele, tle, nle, rle, ole, sle, ile, ale, lle, cle, ule, dle, ple, fle, mle, gle, hle, _le, yle, Sle, Ele, ble, Cle, vle, Ale, Rle, xle, Tle, wle, Ole, kle, Ple, Ile, Dle, Lle, Mle, Nle, Ule, Fle, zle, $le, Hle, jle, Ble, Kle, Gle, Wle, Vle, qle, Zle, Yle, Jle, MS, Xle, Qle, ece, tce, nce, rce, oce, sce, ice, ace, lce, cce, uce, dce, pce, fce, mce, gce, hce, _ce, yce, Sce, Ece, bce, Cce, vce, Ace, Rce, xce, Tce, wce, Oce, kce, Pce, Ice, Dce, Lce, Mce, Nce, Uce, Fce, zce, $ce, Hce, jce, Bce, Kce, Gce, Wce, Vce, qce, Zce, Yce, Jce, Xce, Qce, eue, tue, nue, rue, oue, sue, iue, aue, lue, cue, uue, due, pue, fue, mue, gue, hue, _ue, yue, Sue, Eue, bue, Cue, vue, Aue, Rue, xue, Tue, wue, Oue, kue, Pue, Iue, Due, Lue, Mue, Nue, Uue, Fue, zue, $ue, Hue, jue, Bue, Kue, Gue, Wue, Vue, que, Zue, Yue, Jue, Xue, Que, ede, tde, nde, rde, ode, sde, ide, ade, lde, cde, ude, dde, pde, fde, mde, gde, hde, _de, yde, Sde, Ede, bde, Cde, vde, Ade, Rde, xde, Tde, wde, Ode, kde, Pde, Ide, Dde, Lde, Mde, Nde, Ude, Fde, zde, $de, Hde, jde, Bde, Kde, Gde, Wde, Vde, qde, Zde, Yde, Jde, Xde, Qde, epe, tpe, npe, rpe, ope, spe, ipe, ape, lpe, cpe, upe, dpe, ppe, fpe, mpe, gpe, hpe, _pe, ype, Spe, Epe, bpe, Cpe, vpe, Ape, Rpe, xpe, Tpe, wpe, Ope, kpe, Ppe, Ipe, Dpe, Lpe, Mpe, Npe, Upe, Fpe, zpe, $pe, Hpe, jpe, Bpe, Kpe, Gpe, Wpe, Vpe, qpe, Zpe, Ype, Jpe, Xpe, Qpe, efe, tfe, nfe, rfe, ofe, sfe, ife, afe, lfe, cfe, ufe, dfe, pfe, ffe, mfe, gfe, hfe, _fe, yfe, Sfe, Efe, bfe, Cfe, vfe, Afe, Rfe, xfe, Tfe, wfe, Ofe, kfe, Pfe, Ife, Dfe, Lfe, Mfe, Nfe, Ufe, Ffe, zfe, $fe, Hfe, jfe, Bfe, Kfe, Gfe, Wfe, Vfe, qfe, Zfe, Yfe, Jfe, Xfe, Qfe, eme, tme, nme, rme, ome, sme, ime, ame, lme, cme, ume, dme, pme, fme, mme, gme, hme, _me, yme, Sme, Eme, bme, Cme, vme, Ame, Rme, xme, Tme, wme, Ome, kme, Pme, Ime, Dme, Lme, Mme, Nme, Ume, Fme, zme, $me, Hme, jme, Bme, Kme, Gme, Wme, Vme, qme, Zme, Yme, Jme, NS, Xme, Qme, ege, tge, nge, rge, oge, sge, ige, age, lge, cge, uge, dge, pge, fge, mge, gge, hge, _ge, yge, Sge, Ege, bge, Cge, vge, Age, Rge, xge, Tge, wge, Oge, kge, Pge, Ige, Dge, Lge, Mge, Nge, Uge, Fge, zge, $ge, Hge, US, jge, Bge, Kge, Gge, Wge, Vge, qge, Zge, Yge, Jge, Xge, Qge, ehe, the, nhe, rhe, ohe, she, ihe, ahe, lhe, che, uhe, dhe, phe, fhe, mhe, ghe, hhe, _he, yhe, She, Ehe, bhe, Che, vhe, Ahe, Rhe, xhe, The, whe, Ohe, khe, Phe, Ihe, Dhe, Lhe, Mhe, Nhe, FS, rI, oI, Uhe, Fhe, zhe, $he, Hhe, jhe, Bhe, Khe, Ghe, Whe, Vhe, qhe, Zhe, Yhe, Jhe, Xhe, Qhe, e_e, t_e, n_e, r_e, o_e, s_e, i_e, a_e, l_e, c_e, u_e, d_e, p_e, f_e, m_e, g_e, h_e, __e, y_e, S_e, E_e, b_e, C_e, v_e, A_e, R_e, x_e, T_e, w_e, O_e, k_e, P_e, I_e, D_e, L_e, M_e, N_e, U_e, F_e, z_e, $_e, H_e, j_e, B_e, K_e, G_e, W_e, V_e, q_e, Z_e, Y_e, J_e, Q_e, Xn, eye, F8e, tye, z8e, nye, iI, rye, oye, lI, cye, uye, dye, _ye, on, vye, Aye, dI, C7e, v7e, ho, kI, PI, Dye, Sf, Lye, jc, Mye, Nye, LI, NI, Fye, VS, zye, $ye, x7e, zI, YS, KI, GI, VI, Hye, qS, ls, Kye, Gye, oD, nE, sD, So, Yc, vn, Zye, oE, sE, iD, aD, wf, Jc, Xc, kf, Qc, Pf, eu, fi, tu, mi, lD, cD, uD, dD, pD, fD, mD, gD, hD, _D, yD, SD, ED, bD, vD, AD, cE, RD, Xye, TD, wD, OD, kD, PD, uE, ID, DD, LD, MD, FD, If, nu, zD, $D, HD, jD, BD, zt, dE, Df, pE, fE, KD, GD, WD, VD, qD, ru, ZD, YD, JD, XD, QD, eL, tL, mE, yr, He, rL, ou, Je, yE, SE, EE, fL, mL, tSe, bE, CE, vE, AE, RE, xE, TE, wE, gL, hL, _L, yL, OE, sSe, kE, PE, IE, DE, LE, ME, NE, Nf, UE, FE, zE, $E, HE, jE, BE, cSe, gE, KE, vL, Uf, GE, WE, VE, qE, ZE, YE, Ff, JE, XE, QE, eb, tb, nb, zf, AL, rb, ob, sb, TL, ab, RL, xL, $f, Hf, dSe, fSe, OL, kL, Sr, FL, ML, zL, lu, hSe, iC, aC, lC, HL, jL, cC, uC, BL, dC, KL, pC, GL, fC, mC, WL, VL, qL, ZL, gC, YL, hC, JL, XL, _C, yC, SC, EC, QL, sC, bC, CC, vC, AC, RC, xC, TC, wC, OC, tM, qf, kC, $L, rM, ASe, Fn, oM, sM, iM, aM, lM, cM, uM, dM, pM, fM, mM, gM, Be, SM, LC, ct, MC, EM, bM, CM, pEe, fEe, Yf, mEe, gEe, hEe, _Ee, yEe, SEe, EEe, bEe, CEe, vEe, AEe, REe, xEe, TEe, wEe, OEe, NC, kEe, vM, PEe, IEe, DEe, LEe, MEe, fu, AM, NEe, UEe, IC, DC, FEe, zEe, qa, TM, HEe, jEe, KEe, wM, em, mu, qEe, ZEe, JEe, OM, Qn, kM, LM, nbe, rbe, abe, lbe, cbe, rm, pbe, At, hbe, BC, BM, Zet, WM, VM, qM, ZM, Cbe, vbe, YM, Abe, Rbe, JM, xbe, Tbe, QM, Ibe, eN, Lbe, nN, Mbe, Nbe, sm, rN, iN, Fbe, aN, $be, jbe, Kbe, Gbe, yu, lN, uN, dN, Xbe, KM, Qbe, eCe, tCe, oCe, iCe, _N, yN, wN, Ytt, ON, OCe, DCe, LN, $Ce, HCe, Cu, BCe, MN, VCe, QCe, ive, uve, VN, pve, fve, _rt, gve, Sve, nv, tv, GN, tU, Fve, Hve, iU, tAe, sAe, iAe, aAe, cAe, Ie, bU, Q, vo, F, zn, fAe, ms, mAe, _m, nn, he, Xa, an, lv, cv, Si, wu, se, br, CU, Oe, gAe, hAe, _Ae, yAe, SAe, EAe, bAe, CAe, vAe, uv, AAe, RAe, xAe, TAe, wAe, OAe, vU, kAe, Ro, el, tl, ym, ku, Sm, Pu, Iu, Em, Ei, xo, bm, Fr, ft, Du, Ao, pv, Lu, To, Cm, vm, nl, Ou, Mu, Nu, bi, Uu, rl, $r, zr, gs, Fu, zu, Am, fv, Rm, $u, wot, H, Oot, kot, Pot, Iot, Dot, Lot, Mot, Not, Uot, Fot, zot, $ot, Hot, jot, xU, Bot, Kot, Got, Wot, Vot, qot, Zot, Yot, Jot, Xot, Qot, est, tst, nst, rst, ost, sst, ist, ast, FAe, zAe, gv, OU, Ss, km, Mt, kU, PU, kst, HAe, jAe, hv, $n, Hu, IU, Yt, tr, nr, Jt, Pm, DU, _v, LU, MU, yv, ju, le, Sv, NU, Pst, Ist, Im, BAe, Dm, KAe, Bu, ol, UU, GAe, WAe, VAe, qAe, ZAe, YAe, Ev, JAe, XAe, bv, Lm, QAe, eRe, Mm, tRe, Ku, Gu, nRe, Wu, sl, rRe, Vu, Nm, Um, Fm, Dst, zm, $m, Hm, FU, zU, $U, Cv, HU, qu, il, jU, oRe, jm, sRe, Bm, iRe, vv, aRe, Km, lRe, cRe, uRe, dRe, pRe, fRe, mRe, gRe, hRe, _Re, Gm, yRe, SRe, Wm, Av, Rv, xv, ERe, bRe, CRe, Tv, vRe, ARe, RRe, xRe, TRe, BU, Vm, wRe, qm, Lst, ORe, al, kRe, Mst, Zu, PRe, wv, IRe, DRe, LRe, MRe, NRe, URe, FRe, Om, zRe, $Re, HRe, Yu, Ov, jRe, BRe, KRe, GRe, WRe, VRe, qRe, ZRe, YRe, JRe, XRe, QRe, exe, txe, nxe, rxe, oxe, sxe, ll, ixe, axe, lxe, Zm, cxe, uxe, dxe, kv, pxe, Nst, Ust, Fst, zst, $st, Hst, ae, WU, qU, VU, ZU, YU, Ym, e0, fxe, mxe, Dv, Cr, gxe, Ju, d0, h0, _0, v0, A0, Sxe, Exe, Mv, Cxe, Fv, Oj, kj, PA, IA, DA, Lj, Dj, aLe, NA, FA, uLe, dd, fLe, Po, SLe, ELe, zA, bLe, xLe, TLe, wLe, OLe, kLe, $j, qj, ILe, DLe, LLe, MLe, Ce, NLe, Wg, Oi, VA, Do, Jj, Xj, Qj, eB, tB, nB, qA, ZA, jA, Bj, jLe, BLe, GLe, rB, BA, Gg, GA, WA, VLe, qLe, Kj, Hs, sB, QLe, YA, iB, uB, eMe, dB, pB, fB, mB, tMe, XA, aB, QA, gB, hB, _B, yB, jn, lMe, SB, dMe, bB, mMe, fd, RB, hMe, Rr, TB, SMe, EMe, Pl, wB, Vg, AMe, Il, RMe, xMe, qg, OB, wMe, OMe, kB, eo, Dl, Zg, DB, NMe, FB, WMe, VMe, $B, HB, jB, BB, Ml, GB, nR, WB, Jg, KB, eNe, Bs, VB, gd, Nl, Xg, tNe, YB, qB, Pi, rK, iK, pNe, hd, _d, to, yd, nh, uK, aK, _Ne, lK, cK, Sd, Ul, rh, oh, dK, CNe, pK, sh, fK, RNe, xNe, TNe, mK, wNe, ONe, ih, Ed, lr, gK, hK, yK, SK, EK, ah, bK, FNe, CK, zNe, $Ne, HNe, vK, BNe, lh, AK, RK, xK, VNe, dn, TK, wK, OK, kK, PK, QNe, eUe, IK, DK, rUe, LK, MK, NK, UK, iUe, aUe, lUe, cUe, uUe, dUe, pUe, fUe, mUe, gUe, hUe, _Ue, yUe, SUe, EUe, bUe, CUe, vUe, AUe, FK, xUe, zK, $K, wUe, HK, OUe, jK, BK, PUe, KK, IUe, DUe, LUe, GK, MUe, NUe, UUe, FUe, WK, zUe, $Ue, HUe, VK, jUe, BUe, KUe, GUe, WUe, VUe, qUe, ZUe, YUe, JUe, XUe, QUe, e0e, t0e, n0e, r0e, Xe, qK, ZK, YK, JK, a0e, l0e, uh, XK, QK, e1, n1, r1, dh, m0e, g0e, h0e, _0e, bd, o1, S0e, Fl, s1, b0e, i1, Di, a1, l1, c1, u1, d1, p1, f1, P0e, I0e, m1, D0e, g1, h1, _1, vyt, U0e, y1, Ayt, iR, F0e, z0e, $0e, Gs, zl, fh, E1, b1, H0e, j0e, B0e, K0e, mh, $l, gh, Ws, aR, hh, _h, G0e, W0e, lR, R1, x1, V0e, uR, k1, P1, I1, D1, L1, Y0e, dR, J0e, Fyt, pR, X0e, fR, mR, Q0e, zyt, eFe, gR, hR, _R, $yt, M1, yR, N1, U1, tFe, nFe, rFe, oFe, iFe, Mi, cFe, $1, Wyt, Vyt, H1, j1, B1, K1, uFe, G1, W1, V1, q1, dFe, pFe, SR, fFe, eSt, tSt, mFe, jl, Vs, gFe, Y1, hFe, _Fe, X1, Q1, eG, yFe, SFe, tG, EFe, bFe, CFe, vFe, bR, CR, RFe, xFe, vR, TFe, Eh, nSt, Cd, wFe, OFe, aSt, rG, PFe, IFe, _St, oG, sG, bSt, CSt, HFe, jFe, $St, BFe, KFe, HSt, JSt, XSt, lG, OR, VFe, YFe, uG, eze, nze, gG, vd, vh, kR, zi, sze, yG, ize, yEt, Ad, $i, bG, Kn, AEt, REt, xEt, aze, AG, wG, $R, dze, $G, pze, fze, mze, gze, hze, BR, HG, jG, fbt, yze, Sze, Eze, Gn, ji, kG, PG, NR, UR, KR, GG, Cze, vze, Rze, GR, xze, Tze, xh, WR, Oze, kze, mbt, Pze, Ize, Dze, Lze, Mze, Nze, qG, Uze, Fze, zze, $ze, ZG, Hze, IG, jze, Bze, YG, Kze, Gze, DG, Wze, Vze, JG, qze, Zze, Yze, Jze, QG, Xze, Qze, e$e, t$e, r$e, o$e, s$e, i$e, a$e, eW, nW, c$e, m$e, xd, VR, gbt, hbt, _bt, h$e, qR, Th, MR, aW, _$e, S$e, lW, E$e, b$e, C$e, v$e, A$e, x$e, w$e, O$e, k$e, P$e, I$e, N$e, ybt, FR, Sbt, U$e, MG, Td, Ebt, bbt, uW, z$e, $$e, H$e, Cbt, j$e, B$e, vbt, Abt, K$e, Rbt, Oh, kh, G$e, YR, Ph, W$e, Ih, Mbt, Nbt, Ubt, Dh, V$e, Z$e, tx, EW, Id, Fh, X$e, xCt, Q$e, eHe, ix, ax, lx, cx, zh, $h, MW, tHe, nHe, aHe, uHe, dHe, Zs, pHe, CW, vW, AW, Nh, UW, fHe, mHe, gHe, hHe, _He, yHe, SHe, EHe, pn, dx, nx, Mh, Bi, AHe, TCt, xHe, Pd, RW, THe, xW, wHe, OHe, Hh, kHe, TW, fx, Bh, Ki, KW, Gl, PHe, Kh, kW, Wl, NHe, Ld, UHe, tV, rV, jHe, XHe, cvt, tje, fV, mV, sje, aje, _V, yV, pje, zvt, $vt, gje, yje, Sje, Kvt, Gvt, eAt, RV, Eje, bje, mAt, Cje, gAt, xV, wV, OV, Js, Lje, FV, Yh, Jh, Md, Tx, zV, $V, HV, Xh, jV, cr, KV, Mo, Fje, zje, yRt, jje, Gje, Vje, sBe, YV, e22, o_, gBe, t2, s_, kx, o2, LBe, UBe, $x, Vi, R2, KBe, GBe, Dx, ZBe, k2, n_, l2, sKe, lKe, z2, bKe, RKe, ec, W2, H2, xKe, wKe, PKe, IKe, $Ke, X2, HKe, jKe, BKe, KKe, VKe, eTt, qKe, tTt, nTt, ZKe, rTt, YKe, oTt, JKe, Wx, XKe, iTt, eq, tq, QKe, nq, rq, e1e, t1e, oq, sq, n1e, r1e, aTt, lTt, c1e, Zx, cq, u1e, uq, a_, d1e, Xx, nc, S1e, c_, mq, gq, Qx, hq, _q, E1e, Sq, u_, rc, d_, b1e, bq, Uo, Cq, vq, A1e, Yd, Jd, R1e, x1e, Aq, gn, T1e, w1e, O1e, Xs, k1e, P1e, xq, Pwt, I1e, Oq, kq, Pq, D1e, L1e, Iq, M1e, N1e, nT, U1e, p_, rT, Dq, oT, iT, F1e, Uq, aT, jq, K1e, Gq, yOt, sGe, cGe, uGe, yGe;
78923
+ var import_node_module, import_crypto, import_crypto2, import_path, import_node_fs15, import_node_process4, import_fs, import_os, import_path2, yy, import_fs2, import_promises, import_path3, import_readline, import_promises2, import_path4, import_os2, import_path5, Se, import_promises3, xe, import_promises4, import_fs3, import_promises5, import_os3, import_path6, import_promises6, import_os4, import_node_path44, import_node_os10, import_node_process5, import_path7, import_events, import_fs4, import_promises7, import_path8, import_child_process, import_util9, import_child_process2, import_fs5, import_path9, import_path10, import_crypto3, import_fs6, import_path11, import_promises8, import_path12, import_path13, import_promises9, import_path14, import_path15, import_fs7, import_promises10, import_path16, import_crypto4, import_path17, import_async_hooks, import_fs8, import_promises11, import_crypto5, import_fs9, import_promises12, import_path18, import_promises13, import_path19, import_crypto6, import_path20, import_path21, import_path22, import_path23, import_promises14, import_fs10, import_promises15, import_path24, import_util10, import_path25, import_os5, import_path26, import_path27, import_path28, import_path29, import_path30, import_net, import_os6, import_child_process3, import_fs11, import_child_process4, import_crypto7, import_promises16, import_module, import_os7, import_path31, import_url, import_events2, import_child_process5, import_fs12, import_readline2, import_string_decoder, import_fs13, import_promises17, import_os8, import_path32, import_crypto8, import_os9, import_fs14, import_path33, import_crypto9, import_fs15, import_promises18, import_path34, IZ, DZ, v_, LZ, OT, NZ, UZ, kT, X, FZ, dr, HZ, jZ, BZ, ot, st, ed, Kv, Te, Me, Oo, nd, hF, Xv, Qv, rd, LF, or, WF, ZF, sA, XF, od, sd, hg, id, Sg, Oz, fA, $z, Wz, Zz, s$, a$, d$, f$, g$, _$, E$, v$, T$, O$, I$, L$, wg, z$, j$, G$, V$, yA, SA, rH, lH, uH, _H, EH, EA, RH, TH, kH, DH, NH, zH, jH, GH, VH, ZH, JH, ej, nj, ij, cj, uj, CA, bj, Aj, wj, PT, KZ, GZ, VGe, VZ, MT, wr, jo, JZ, XZ, NT, UT, FT, zT, Bo, $T, HT, jT, BT, a4, sp, l4, c4, vt, u4, Nt, KT, d4, p4, uc, GT, m4, g4, WT, _4, y4, VT, Dn, Et, b4, C4, v4, A4, ra, x4, ip, qT, ZT, w4, O4, ro, P4, I4, D4, L4, M4, N4, U4, YT, JT, Sn, H4, Ko, j4, oo, XT, QT, G4, W4, V4, ew, Z4, Y4, tw, X4, nw, R_, rw, ow, Go, sw, iw, aw, lw, ei, aY, cw, Or, cY, uw, dw, lp, pw, cp, mY, gY, up, _Y, aa, fw, la, EY, bY, CY, vY, AY, RY, xY, TY, wY, OY, kY, PY, IY, mw, x_, gw, ca, MY, et, dp, hw, pp, zY, $Y, _w, HY, ua, yw, wt, KY, T_, Sw, WY, VY, qY, so, mp, Ew, vw, bw, YY, Cw, JY, XY, kr, QY, e9, Wo, n9, da, o9, s9, i9, a9, l9, c9, u9, d9, p9, f9, m9, g9, h9, _9, y9, S9, E9, b9, C9, v9, A9, R9, x9, T9, Qe, Aw, pa, hp, Rw, dc, k9, w_, P9, Pr, xw, I9, fa, D9, L9, _p, N9, ma, yp, z9, Tw, $9, H9, ww, Vo, Ir, pc, W9, V9, q9, Ow, Y9, Sp, J9, Ep, X9, qo, Q9, bp, kw, eJ, Pw, Iw, Dw, Lw, tJ, nJ, rJ, oJ, sJ, ti, io, iJ, Mw, Nw, Cp, aJ, Uw, Fw, ga, pr, uJ, Fe, $w, O_, k_, I_, ha, Bw, D_, qw, Vw, N_, U_, yJ, _a3, Yo, Zw, bJ, Rp, Yw, vJ, AJ, Jw, xp, Xw, Tp, Qw, kJ, ya, IJ, DJ, Sa, MJ, fc, NJ, eO, FJ, zJ, $J, tO, Ea, jJ, nO, rO, sO, iO, Vn, GJ, Ln, Jo, aO, lO, cO, wp, XJ, QJ, uO, ba, dO, pO, fO, Dr, ao, mO, Ca, gO, z_, $_, H_, j_, B_, K_, G_, W_, V_, q_, Z_, _O, Y_, J_, yO, X_, c3, Q_, ey, ty, ny, ry, oy, sy, iy, ay, ly, cy, we, SO, en, d3, Pp, vO, g3, gy, wO, S3, BO, KO, Ip, Dp, v3, GO, WO, F9e, IO, A3, hy, x3, NO, I3, Ay, Ry, D3, xy, L3, bc, xa, Ty, wy, Oy, ky, XO, Py, Iy, Dy, Ly, My, Ny, Uy, Fy, zy, nk, rk, d3e, p3e, f3e, m3e, g3e, U3, jp, jy, ik, By, Ky, lk, $3, uk, ck, G3, W3, V3, it, Y3, J3, hk, tXe, Q3, kt, We, gX, Ta, SX, mr, Yp, Jp, eS, nS, yXe, IX, DX, rS, ka, oS, Ok, kk, HX, jX, ef, bXe, Uk, Mr, wc, Fk, Pa, OXe, kXe, iS, PXe, IXe, DXe, GX, YX, JX, XX, QX, e6, t6, Yk, n6, r6, o6, s6, i6, a6, l6, c6, Vk, uS, lf, dS, Qk, eP, uf, os10, qXe, ZXe, h6, tP, df, _6, y6, S6, E6, b6, Jn, gr, nP, rP, Dc, pS, oP, gS, lP, C6, mS, lS, sP, w6, O6, dP, k6, YXe, JXe, P6, I6, pf, L6, fP, XXe, QXe, M6, SS, z6, $6, j6, bP, CP, G6, Lc, si, Z6, ES, bS, X6, Q6, e5, t5, n5, u5, r5, o5, s5, i5, a5, l5, c5, u52, d5, p5, f5, m5, g5, h5, _5, y5, S5, E5, b5, C5, v5, A5, R5, x5, T5, w5, O5, k5, P5, I5, D5, L5, M5, N5, U5, F5, z5, $5, H5, j5, B5, K5, G5, W5, V5, q5, Z5, Y5, J5, X5, Q5, e8, t8, n8, r8, o8, s8, i8, a8, l8, c8, u8, d8, CS, p8, f8, m8, g8, h8, _8, y8, S8, E8, b8, C8, v8, A8, R8, x8, T8, w8, O8, k8, P8, I8, D8, L8, M8, N8, U8, F8, z8, $8, H8, j8, B8, K8, G8, W8, V8, q8, Z8, Y8, J8, X8, Q8, e7, t7, n7, r7, o7, s7, i7, a7, l7, c7, u7, d7, p7, f7, m7, g7, h7, _7, y7, S7, E7, b7, C7, TP, v7, L6e, RP, A7, x7, kP, ff, U6e, F6e, Ua, z6e, $6e, H6e, j6e, PP, IP, vS, DP, w7, LP, O7, k7, P7, AS, RS, xS, I7, MP, NP, D7, G6e, L7, W6e, M7, N7, UP, V6e, U7, F7, z7, $7, H7, j7, B7, q6e, is, wS, Fa, K7, G7, W7, i5e, X7, Q7, HP, $P, BP, tQ, WP, VP, JP, _Q, QP, eI, xQ, Uc, DS, $a, wQ, OQ, kQ, PQ, IQ, DQ, LQ, MQ, NQ, UQ, FQ, zQ, $Q, HQ, jQ, BQ, KQ, GQ, WQ, VQ, qQ, ZQ, YQ, JQ, XQ, QQ, eee, tee, nee, ree, oee, see, iee, aee, lee, cee, uee, dee, pee, fee, mee, gee, hee, _ee, yee, See, Eee, bee, Cee, vee, Aee, Ree, xee, Tee, wee, Oee, kee, Pee, Iee, Dee, Lee, Mee, Nee, Uee, Fee, zee, $ee, Hee, jee, Bee, Kee, Gee, Wee, Vee, qee, Zee, Yee, Jee, Xee, Qee, ete, tte, nte, rte, ote, ste, ite, ate, lte, cte, ute, dte, pte, fte, mte, gte, hte, _te, yte, Ste, Ete, bte, Cte, vte, Ate, Rte, xte, Tte, wte, Ote, kte, Pte, Ite, Dte, Lte, Mte, Nte, Ute, Fte, zte, $te, Hte, jte, Bte, Kte, Gte, Wte, Vte, qte, Zte, Yte, Jte, Xte, Qte, ene, tne, nne, rne, one, sne, ine, ane, lne, cne, une, dne, pne, fne, mne, gne, hne, _ne, yne, Sne, Ene, bne, Cne, vne, Ane, Rne, xne, Tne, wne, One, kne, Pne, Ine, Dne, Lne, Mne, Nne, Une, Fne, zne, $ne, Hne, jne, Bne, Kne, Gne, Wne, Vne, qne, Zne, Yne, Jne, Xne, Qne, ere, tre, nre, rre, ore, sre, ire, are, lre, cre, ure, dre, pre, fre, mre, gre, hre, _re, yre, Sre, Ere, bre, Cre, vre, Are, Rre, xre, Tre, wre, Ore, kre, Pre, Ire, Dre, Lre, Mre, Nre, Ure, Fre, zre, $re, Hre, jre, Bre, Kre, Gre, Wre, Vre, qre, Zre, Yre, Jre, Xre, Qre, eoe, toe, noe, roe, ooe, soe, ioe, aoe, loe, coe, uoe, doe, poe, foe, moe, goe, hoe, _oe, yoe, Soe, Eoe, boe, Coe, voe, Aoe, Roe, xoe, Toe, woe, Ooe, koe, Poe, Ioe, Doe, Loe, Moe, Noe, Uoe, Foe, zoe, $oe, Hoe, joe, Boe, Koe, Goe, Woe, Voe, qoe, Zoe, Yoe, Joe, Xoe, Qoe, ese, tse, nse, rse, ose, sse, ise, ase, lse, cse, use, dse, pse, fse, mse, gse, hse, _se, yse, Sse, Ese, LS, bse, Cse, vse, Ase, Rse, xse, Tse, wse, Ose, kse, Pse, Ise, Dse, Lse, Mse, Nse, Use, Fse, zse, $se, Hse, jse, Bse, Kse, Gse, Wse, Vse, qse, Zse, Yse, Jse, Xse, Qse, eie, tie, nie, rie, oie, sie, iie, aie, lie, cie, uie, die, pie, fie, mie, gie, hie, _ie, yie, Sie, Eie, bie, Cie, vie, Aie, Rie, xie, Tie, wie, Oie, kie, Pie, Iie, Die, Lie, Mie, Nie, Uie, Fie, zie, $ie, Hie, jie, Bie, Kie, Gie, Wie, Vie, qie, Zie, Yie, Jie, Xie, Qie, eae, tae, nae, rae, oae, sae, iae, aae, lae, cae, uae, dae, pae, fae, mae, gae, hae, _ae, yae, Sae, Eae, bae, Cae, vae, Aae, Rae, xae, Tae, wae, Oae, kae, Pae, Iae, Dae, Lae, Mae, Nae, Uae, Fae, zae, $ae, Hae, jae, Bae, Kae, Gae, Wae, Vae, qae, Zae, Yae, Jae, Xae, Qae, ele, tle, nle, rle, ole, sle, ile, ale, lle, cle, ule, dle, ple, fle, mle, gle, hle, _le, yle, Sle, Ele, ble, Cle, vle, Ale, Rle, xle, Tle, wle, Ole, kle, Ple, Ile, Dle, Lle, Mle, Nle, Ule, Fle, zle, $le, Hle, jle, Ble, Kle, Gle, Wle, Vle, qle, Zle, Yle, Jle, MS, Xle, Qle, ece, tce, nce, rce, oce, sce, ice, ace, lce, cce, uce, dce, pce, fce, mce, gce, hce, _ce, yce, Sce, Ece, bce, Cce, vce, Ace, Rce, xce, Tce, wce, Oce, kce, Pce, Ice, Dce, Lce, Mce, Nce, Uce, Fce, zce, $ce, Hce, jce, Bce, Kce, Gce, Wce, Vce, qce, Zce, Yce, Jce, Xce, Qce, eue, tue, nue, rue, oue, sue, iue, aue, lue, cue, uue, due, pue, fue, mue, gue, hue, _ue, yue, Sue, Eue, bue, Cue, vue, Aue, Rue, xue, Tue, wue, Oue, kue, Pue, Iue, Due, Lue, Mue, Nue, Uue, Fue, zue, $ue, Hue, jue, Bue, Kue, Gue, Wue, Vue, que, Zue, Yue, Jue, Xue, Que, ede, tde, nde, rde, ode, sde, ide, ade, lde, cde, ude, dde, pde, fde, mde, gde, hde, _de, yde, Sde, Ede, bde, Cde, vde, Ade, Rde, xde, Tde, wde, Ode, kde, Pde, Ide, Dde, Lde, Mde, Nde, Ude, Fde, zde, $de, Hde, jde, Bde, Kde, Gde, Wde, Vde, qde, Zde, Yde, Jde, Xde, Qde, epe, tpe, npe, rpe, ope, spe, ipe, ape, lpe, cpe, upe, dpe, ppe, fpe, mpe, gpe, hpe, _pe, ype, Spe, Epe, bpe, Cpe, vpe, Ape, Rpe, xpe, Tpe, wpe, Ope, kpe, Ppe, Ipe, Dpe, Lpe, Mpe, Npe, Upe, Fpe, zpe, $pe, Hpe, jpe, Bpe, Kpe, Gpe, Wpe, Vpe, qpe, Zpe, Ype, Jpe, Xpe, Qpe, efe, tfe, nfe, rfe, ofe, sfe, ife, afe, lfe, cfe, ufe, dfe, pfe, ffe, mfe, gfe, hfe, _fe, yfe, Sfe, Efe, bfe, Cfe, vfe, Afe, Rfe, xfe, Tfe, wfe, Ofe, kfe, Pfe, Ife, Dfe, Lfe, Mfe, Nfe, Ufe, Ffe, zfe, $fe, Hfe, jfe, Bfe, Kfe, Gfe, Wfe, Vfe, qfe, Zfe, Yfe, Jfe, Xfe, Qfe, eme, tme, nme, rme, ome, sme, ime, ame, lme, cme, ume, dme, pme, fme, mme, gme, hme, _me, yme, Sme, Eme, bme, Cme, vme, Ame, Rme, xme, Tme, wme, Ome, kme, Pme, Ime, Dme, Lme, Mme, Nme, Ume, Fme, zme, $me, Hme, jme, Bme, Kme, Gme, Wme, Vme, qme, Zme, Yme, Jme, NS, Xme, Qme, ege, tge, nge, rge, oge, sge, ige, age, lge, cge, uge, dge, pge, fge, mge, gge, hge, _ge, yge, Sge, Ege, bge, Cge, vge, Age, Rge, xge, Tge, wge, Oge, kge, Pge, Ige, Dge, Lge, Mge, Nge, Uge, Fge, zge, $ge, Hge, US, jge, Bge, Kge, Gge, Wge, Vge, qge, Zge, Yge, Jge, Xge, Qge, ehe, the, nhe, rhe, ohe, she, ihe, ahe, lhe, che, uhe, dhe, phe, fhe, mhe, ghe, hhe, _he, yhe, She, Ehe, bhe, Che, vhe, Ahe, Rhe, xhe, The, whe, Ohe, khe, Phe, Ihe, Dhe, Lhe, Mhe, Nhe, FS, rI, oI, Uhe, Fhe, zhe, $he, Hhe, jhe, Bhe, Khe, Ghe, Whe, Vhe, qhe, Zhe, Yhe, Jhe, Xhe, Qhe, e_e, t_e, n_e, r_e, o_e, s_e, i_e, a_e, l_e, c_e, u_e, d_e, p_e, f_e, m_e, g_e, h_e, __e, y_e, S_e, E_e, b_e, C_e, v_e, A_e, R_e, x_e, T_e, w_e, O_e, k_e, P_e, I_e, D_e, L_e, M_e, N_e, U_e, F_e, z_e, $_e, H_e, j_e, B_e, K_e, G_e, W_e, V_e, q_e, Z_e, Y_e, J_e, Q_e, Xn, eye, F8e, tye, z8e, nye, iI, rye, oye, lI, cye, uye, dye, _ye, on, vye, Aye, dI, C7e, v7e, ho, kI, PI, Dye, Sf, Lye, jc, Mye, Nye, LI, NI, Fye, VS, zye, $ye, x7e, zI, YS, KI, GI, VI, Hye, qS, ls, Kye, Gye, oD, nE, sD, So, Yc, vn, Zye, oE, sE, iD, aD, wf, Jc, Xc, kf, Qc, Pf, eu, fi, tu, mi, lD, cD, uD, dD, pD, fD, mD, gD, hD, _D, yD, SD, ED, bD, vD, AD, cE, RD, Xye, TD, wD, OD, kD, PD, uE, ID, DD, LD, MD, FD, If, nu, zD, $D, HD, jD, BD, zt, dE, Df, pE, fE, KD, GD, WD, VD, qD, ru, ZD, YD, JD, XD, QD, eL, tL, mE, yr, He, rL, ou, Je, yE, SE, EE, fL, mL, tSe, bE, CE, vE, AE, RE, xE, TE, wE, gL, hL, _L, yL, OE, sSe, kE, PE, IE, DE, LE, ME, NE, Nf, UE, FE, zE, $E, HE, jE, BE, cSe, gE, KE, vL, Uf, GE, WE, VE, qE, ZE, YE, Ff, JE, XE, QE, eb, tb, nb, zf, AL, rb, ob, sb, TL, ab, RL, xL, $f, Hf, dSe, fSe, OL, kL, Sr, FL, ML, zL, lu, hSe, iC, aC, lC, HL, jL, cC, uC, BL, dC, KL, pC, GL, fC, mC, WL, VL, qL, ZL, gC, YL, hC, JL, XL, _C, yC, SC, EC, QL, sC, bC, CC, vC, AC, RC, xC, TC, wC, OC, tM, qf, kC, $L, rM, ASe, Fn, oM, sM, iM, aM, lM, cM, uM, dM, pM, fM, mM, gM, Be, SM, LC, ct, MC, EM, bM, CM, pEe, fEe, Yf, mEe, gEe, hEe, _Ee, yEe, SEe, EEe, bEe, CEe, vEe, AEe, REe, xEe, TEe, wEe, OEe, NC, kEe, vM, PEe, IEe, DEe, LEe, MEe, fu, AM, NEe, UEe, IC, DC, FEe, zEe, qa, TM, HEe, jEe, KEe, wM, em, mu, qEe, ZEe, JEe, OM, Qn, kM, LM, nbe, rbe, abe, lbe, cbe, rm, pbe, At, hbe, BC, BM, Zet, WM, VM, qM, ZM, Cbe, vbe, YM, Abe, Rbe, JM, xbe, Tbe, QM, Ibe, eN, Lbe, nN, Mbe, Nbe, sm, rN, iN, Fbe, aN, $be, jbe, Kbe, Gbe, yu, lN, uN, dN, Xbe, KM, Qbe, eCe, tCe, oCe, iCe, _N, yN, wN, Ytt, ON, OCe, DCe, LN, $Ce, HCe, Cu, BCe, MN, VCe, QCe, ive, uve, VN, pve, fve, _rt, gve, Sve, nv, tv, GN, tU, Fve, Hve, iU, tAe, sAe, iAe, aAe, cAe, Ie, bU, Q, vo, F, zn, fAe, ms, mAe, _m, nn, he, Xa, an, lv, cv, Si, wu, se, br, CU, Oe, gAe, hAe, _Ae, yAe, SAe, EAe, bAe, CAe, vAe, uv, AAe, RAe, xAe, TAe, wAe, OAe, vU, kAe, Ro, el, tl, ym, ku, Sm, Pu, Iu, Em, Ei, xo, bm, Fr, ft, Du, Ao, pv, Lu, To, Cm, vm, nl, Ou, Mu, Nu, bi, Uu, rl, $r, zr, gs, Fu, zu, Am, fv, Rm, $u, wot, H, Oot, kot, Pot, Iot, Dot, Lot, Mot, Not, Uot, Fot, zot, $ot, Hot, jot, xU, Bot, Kot, Got, Wot, Vot, qot, Zot, Yot, Jot, Xot, Qot, est, tst, nst, rst, ost, sst, ist, ast, FAe, zAe, gv, OU, Ss, km, Mt, kU, PU, kst, HAe, jAe, hv, $n, Hu, IU, Yt, tr, nr, Jt, Pm, DU, _v, LU, MU, yv, ju, le, Sv, NU, Pst, Ist, Im, BAe, Dm, KAe, Bu, ol, UU, GAe, WAe, VAe, qAe, ZAe, YAe, Ev, JAe, XAe, bv, Lm, QAe, eRe, Mm, tRe, Ku, Gu, nRe, Wu, sl, rRe, Vu, Nm, Um, Fm, Dst, zm, $m, Hm, FU, zU, $U, Cv, HU, qu, il, jU, oRe, jm, sRe, Bm, iRe, vv, aRe, Km, lRe, cRe, uRe, dRe, pRe, fRe, mRe, gRe, hRe, _Re, Gm, yRe, SRe, Wm, Av, Rv, xv, ERe, bRe, CRe, Tv, vRe, ARe, RRe, xRe, TRe, BU, Vm, wRe, qm, Lst, ORe, al, kRe, Mst, Zu, PRe, wv, IRe, DRe, LRe, MRe, NRe, URe, FRe, Om, zRe, $Re, HRe, Yu, Ov, jRe, BRe, KRe, GRe, WRe, VRe, qRe, ZRe, YRe, JRe, XRe, QRe, exe, txe, nxe, rxe, oxe, sxe, ll, ixe, axe, lxe, Zm, cxe, uxe, dxe, kv, pxe, Nst, Ust, Fst, zst, $st, Hst, ae, WU, qU, VU, ZU, YU, Ym, e0, fxe, mxe, Dv, Cr, gxe, Ju, d0, h0, _0, v0, A0, Sxe, Exe, Mv, Cxe, Fv, Oj, kj, PA, IA, DA, Lj, Dj, aLe, NA, FA, uLe, dd, fLe, Po, SLe, ELe, zA, bLe, xLe, TLe, wLe, OLe, kLe, $j, qj, ILe, DLe, LLe, MLe, Ce, NLe, Wg, Oi, VA, Do, Jj, Xj, Qj, eB, tB, nB, qA, ZA, jA, Bj, jLe, BLe, GLe, rB, BA, Gg, GA, WA, VLe, qLe, Kj, Hs, sB, QLe, YA, iB, uB, eMe, dB, pB, fB, mB, tMe, XA, aB, QA, gB, hB, _B, yB, jn, lMe, SB, dMe, bB, mMe, fd, RB, hMe, Rr, TB, SMe, EMe, Pl, wB, Vg, AMe, Il, RMe, xMe, qg, OB, wMe, OMe, kB, eo, Dl, Zg, DB, NMe, FB, WMe, VMe, $B, HB, jB, BB, Ml, GB, nR, WB, Jg, KB, eNe, Bs, VB, gd, Nl, Xg, tNe, YB, qB, Pi, rK, iK, pNe, hd, _d, to, yd, nh, uK, aK, _Ne, lK, cK, Sd, Ul, rh, oh, dK, CNe, pK, sh, fK, RNe, xNe, TNe, mK, wNe, ONe, ih, Ed, lr, gK, hK, yK, SK, EK, ah, bK, FNe, CK, zNe, $Ne, HNe, vK, BNe, lh, AK, RK, xK, VNe, dn, TK, wK, OK, kK, PK, QNe, eUe, IK, DK, rUe, LK, MK, NK, UK, iUe, aUe, lUe, cUe, uUe, dUe, pUe, fUe, mUe, gUe, hUe, _Ue, yUe, SUe, EUe, bUe, CUe, vUe, AUe, FK, xUe, zK, $K, wUe, HK, OUe, jK, BK, PUe, KK, IUe, DUe, LUe, GK, MUe, NUe, UUe, FUe, WK, zUe, $Ue, HUe, VK, jUe, BUe, KUe, GUe, WUe, VUe, qUe, ZUe, YUe, JUe, XUe, QUe, e0e, t0e, n0e, r0e, Xe, qK, ZK, YK, JK, a0e, l0e, uh, XK, QK, e1, n1, r1, dh, m0e, g0e, h0e, _0e, bd, o1, S0e, Fl, s1, b0e, i1, Di, a1, l1, c1, u1, d1, p1, f1, P0e, I0e, m1, D0e, g1, h1, _1, vyt, U0e, y1, Ayt, iR, F0e, z0e, $0e, Gs, zl, fh, E1, b1, H0e, j0e, B0e, K0e, mh, $l, gh, Ws, aR, hh, _h, G0e, W0e, lR, R1, x1, V0e, uR, k1, P1, I1, D1, L1, Y0e, dR, J0e, Fyt, pR, X0e, fR, mR, Q0e, zyt, eFe, gR, hR, _R, $yt, M1, yR, N1, U1, tFe, nFe, rFe, oFe, iFe, Mi, cFe, $1, Wyt, Vyt, H1, j1, B1, K1, uFe, G1, W1, V1, q1, dFe, pFe, SR, fFe, eSt, tSt, mFe, jl, Vs, gFe, Y1, hFe, _Fe, X1, Q1, eG, yFe, SFe, tG, EFe, bFe, CFe, vFe, bR, CR, RFe, xFe, vR, TFe, Eh, nSt, Cd, wFe, OFe, aSt, rG, PFe, IFe, _St, oG, sG, bSt, CSt, HFe, jFe, $St, BFe, KFe, HSt, JSt, XSt, lG, OR, VFe, YFe, uG, eze, nze, gG, vd, vh, kR, zi, sze, yG, ize, yEt, Ad, $i, bG, Kn, AEt, REt, xEt, aze, AG, wG, $R, dze, $G, pze, fze, mze, gze, hze, BR, HG, jG, fbt, yze, Sze, Eze, Gn, ji, kG, PG, NR, UR, KR, GG, Cze, vze, Rze, GR, xze, Tze, xh, WR, Oze, kze, mbt, Pze, Ize, Dze, Lze, Mze, Nze, qG, Uze, Fze, zze, $ze, ZG, Hze, IG, jze, Bze, YG, Kze, Gze, DG, Wze, Vze, JG, qze, Zze, Yze, Jze, QG, Xze, Qze, e$e, t$e, r$e, o$e, s$e, i$e, a$e, eW, nW, c$e, m$e, xd, VR, gbt, hbt, _bt, h$e, qR, Th, MR, aW, _$e, S$e, lW, E$e, b$e, C$e, v$e, A$e, x$e, w$e, O$e, k$e, P$e, I$e, N$e, ybt, FR, Sbt, U$e, MG, Td, Ebt, bbt, uW, z$e, $$e, H$e, Cbt, j$e, B$e, vbt, Abt, K$e, Rbt, Oh, kh, G$e, YR, Ph, W$e, Ih, Mbt, Nbt, Ubt, Dh, V$e, Z$e, tx, EW, Id, Fh, X$e, xCt, Q$e, eHe, ix, ax, lx, cx, zh, $h, MW, tHe, nHe, aHe, uHe, dHe, Zs, pHe, CW, vW, AW, Nh, UW, fHe, mHe, gHe, hHe, _He, yHe, SHe, EHe, pn, dx, nx, Mh, Bi, AHe, TCt, xHe, Pd, RW, THe, xW, wHe, OHe, Hh, kHe, TW, fx, Bh, Ki, KW, Gl, PHe, Kh, kW, Wl, NHe, Ld, UHe, tV, rV, jHe, XHe, cvt, tje, fV, mV, sje, aje, _V, yV, pje, zvt, $vt, gje, yje, Sje, Kvt, Gvt, eAt, RV, Eje, bje, mAt, Cje, gAt, xV, wV, OV, Js, Lje, FV, Yh, Jh, Md, Tx, zV, $V, HV, Xh, jV, cr, KV, Mo, Fje, zje, yRt, jje, Gje, Vje, sBe, YV, e22, o_, gBe, t2, s_, kx, o2, LBe, UBe, $x, Vi, R2, KBe, GBe, Dx, ZBe, k2, n_, l2, sKe, lKe, z2, bKe, RKe, ec, W2, H2, xKe, wKe, PKe, IKe, $Ke, X2, HKe, jKe, BKe, KKe, VKe, eTt, qKe, tTt, nTt, ZKe, rTt, YKe, oTt, JKe, Wx, XKe, iTt, eq, tq, QKe, nq, rq, e1e, t1e, oq, sq, n1e, r1e, aTt, lTt, c1e, Zx, cq, u1e, uq, a_, d1e, Xx, nc, S1e, c_, mq, gq, Qx, hq, _q, E1e, Sq, u_, rc, d_, b1e, bq, Uo, Cq, vq, A1e, Yd, Jd, R1e, x1e, Aq, gn, T1e, w1e, O1e, Xs, k1e, P1e, xq, Pwt, I1e, Oq, kq, Pq, D1e, L1e, Iq, M1e, N1e, nT, U1e, p_, rT, Dq, oT, iT, F1e, Uq, aT, jq, K1e, Gq, yOt, sGe, cGe, uGe, yGe;
78870
78924
  var init_sdk = __esm({
78871
78925
  "node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.3.292_@anthropic-ai+sdk@0.131.0_zod@4.6.5__@modelconte_9caa915130557974815a7ac66b010e49/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs"() {
78872
78926
  import_node_module = require("node:module");
@@ -78897,7 +78951,7 @@ var init_sdk = __esm({
78897
78951
  import_path6 = require("path");
78898
78952
  import_promises6 = require("fs/promises");
78899
78953
  import_os4 = require("os");
78900
- import_node_path42 = __toESM(require("node:path"), 1);
78954
+ import_node_path44 = __toESM(require("node:path"), 1);
78901
78955
  import_node_os10 = __toESM(require("node:os"), 1);
78902
78956
  import_node_process5 = __toESM(require("node:process"), 1);
78903
78957
  import_path7 = require("path");
@@ -87348,16 +87402,16 @@ var init_sdk = __esm({
87348
87402
  wS = import_node_os10.default.tmpdir();
87349
87403
  ({ env: Fa } = import_node_process5.default);
87350
87404
  K7 = (e14) => {
87351
- let t10 = import_node_path42.default.join(is, "Library");
87352
- return { data: import_node_path42.default.join(t10, "Application Support", e14), config: import_node_path42.default.join(t10, "Preferences", e14), cache: import_node_path42.default.join(t10, "Caches", e14), log: import_node_path42.default.join(t10, "Logs", e14), temp: import_node_path42.default.join(wS, e14) };
87405
+ let t10 = import_node_path44.default.join(is, "Library");
87406
+ return { data: import_node_path44.default.join(t10, "Application Support", e14), config: import_node_path44.default.join(t10, "Preferences", e14), cache: import_node_path44.default.join(t10, "Caches", e14), log: import_node_path44.default.join(t10, "Logs", e14), temp: import_node_path44.default.join(wS, e14) };
87353
87407
  };
87354
87408
  G7 = (e14) => {
87355
- let t10 = Fa.APPDATA || import_node_path42.default.join(is, "AppData", "Roaming"), n10 = Fa.LOCALAPPDATA || import_node_path42.default.join(is, "AppData", "Local");
87356
- return { data: import_node_path42.default.join(n10, e14, "Data"), config: import_node_path42.default.join(t10, e14, "Config"), cache: import_node_path42.default.join(n10, e14, "Cache"), log: import_node_path42.default.join(n10, e14, "Log"), temp: import_node_path42.default.join(wS, e14) };
87409
+ let t10 = Fa.APPDATA || import_node_path44.default.join(is, "AppData", "Roaming"), n10 = Fa.LOCALAPPDATA || import_node_path44.default.join(is, "AppData", "Local");
87410
+ return { data: import_node_path44.default.join(n10, e14, "Data"), config: import_node_path44.default.join(t10, e14, "Config"), cache: import_node_path44.default.join(n10, e14, "Cache"), log: import_node_path44.default.join(n10, e14, "Log"), temp: import_node_path44.default.join(wS, e14) };
87357
87411
  };
87358
87412
  W7 = (e14) => {
87359
- let t10 = import_node_path42.default.basename(is);
87360
- return { data: import_node_path42.default.join(Fa.XDG_DATA_HOME || import_node_path42.default.join(is, ".local", "share"), e14), config: import_node_path42.default.join(Fa.XDG_CONFIG_HOME || import_node_path42.default.join(is, ".config"), e14), cache: import_node_path42.default.join(Fa.XDG_CACHE_HOME || import_node_path42.default.join(is, ".cache"), e14), log: import_node_path42.default.join(Fa.XDG_STATE_HOME || import_node_path42.default.join(is, ".local", "state"), e14), temp: import_node_path42.default.join(wS, t10, e14) };
87413
+ let t10 = import_node_path44.default.basename(is);
87414
+ return { data: import_node_path44.default.join(Fa.XDG_DATA_HOME || import_node_path44.default.join(is, ".local", "share"), e14), config: import_node_path44.default.join(Fa.XDG_CONFIG_HOME || import_node_path44.default.join(is, ".config"), e14), cache: import_node_path44.default.join(Fa.XDG_CACHE_HOME || import_node_path44.default.join(is, ".cache"), e14), log: import_node_path44.default.join(Fa.XDG_STATE_HOME || import_node_path44.default.join(is, ".local", "state"), e14), temp: import_node_path44.default.join(wS, t10, e14) };
87361
87415
  };
87362
87416
  i5e = OS("claude-cli");
87363
87417
  X7 = 100;
@@ -101410,8 +101464,8 @@ var require_utils3 = __commonJS({
101410
101464
  }
101411
101465
  return ind;
101412
101466
  }
101413
- function removeDotSegments(path63) {
101414
- let input2 = path63;
101467
+ function removeDotSegments(path64) {
101468
+ let input2 = path64;
101415
101469
  const output2 = [];
101416
101470
  let nextSlash = -1;
101417
101471
  let len = 0;
@@ -101820,8 +101874,8 @@ var require_schemes = __commonJS({
101820
101874
  }
101821
101875
  if (wsComponent.resourceName) {
101822
101876
  const queryIndex = wsComponent.resourceName.indexOf("?");
101823
- const path63 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
101824
- wsComponent.path = path63 && path63 !== "/" ? path63 : void 0;
101877
+ const path64 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
101878
+ wsComponent.path = path64 && path64 !== "/" ? path64 : void 0;
101825
101879
  wsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);
101826
101880
  wsComponent.resourceName = void 0;
101827
101881
  }
@@ -105348,7 +105402,7 @@ var require_dist2 = __commonJS({
105348
105402
  });
105349
105403
 
105350
105404
  // src/cli.ts
105351
- var import_node_path62 = __toESM(require("node:path"), 1);
105405
+ var import_node_path63 = __toESM(require("node:path"), 1);
105352
105406
 
105353
105407
  // node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/error.js
105354
105408
  var CommanderError = class extends Error {
@@ -108461,9 +108515,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
108461
108515
  * @param {string} [path]
108462
108516
  * @return {(string|null|Command)}
108463
108517
  */
108464
- executableDir(path63) {
108465
- if (path63 === void 0) return this._executableDir;
108466
- this._executableDir = path63;
108518
+ executableDir(path64) {
108519
+ if (path64 === void 0) return this._executableDir;
108520
+ this._executableDir = path64;
108467
108521
  return this;
108468
108522
  }
108469
108523
  /**
@@ -110112,19 +110166,19 @@ function writePools(paths, pools) {
110112
110166
  applyPatch(paths.globalConfigFile, GlobalConfigSchema, { pools }, { defaults: {} });
110113
110167
  }
110114
110168
  function poolCycleOf(pools, name) {
110115
- const walk2 = (current, path63) => {
110169
+ const walk2 = (current, path64) => {
110116
110170
  for (const entry of pools[current]?.identities ?? []) {
110117
110171
  const nested = poolNameOf(poolMemberIdentity(entry));
110118
110172
  if (nested === void 0) {
110119
110173
  continue;
110120
110174
  }
110121
110175
  if (nested === name) {
110122
- return [...path63, nested];
110176
+ return [...path64, nested];
110123
110177
  }
110124
- if (path63.includes(nested)) {
110178
+ if (path64.includes(nested)) {
110125
110179
  continue;
110126
110180
  }
110127
- const found = walk2(nested, [...path63, nested]);
110181
+ const found = walk2(nested, [...path64, nested]);
110128
110182
  if (found !== void 0) {
110129
110183
  return found;
110130
110184
  }
@@ -111735,7 +111789,7 @@ init_paths();
111735
111789
  init_package();
111736
111790
 
111737
111791
  // src/check.ts
111738
- var import_node_path31 = __toESM(require("node:path"), 1);
111792
+ var import_node_path32 = __toESM(require("node:path"), 1);
111739
111793
  init_commandDeps();
111740
111794
 
111741
111795
  // src/checkReport.ts
@@ -111833,8 +111887,9 @@ init_cascade();
111833
111887
  init_paths();
111834
111888
  init_realCredentialCache();
111835
111889
  init_providersStore();
111890
+ init_signIn();
111836
111891
  init_realPorts();
111837
- var import_node_path30 = __toESM(require("node:path"), 1);
111892
+ var import_node_path31 = __toESM(require("node:path"), 1);
111838
111893
  init_zod();
111839
111894
  init_envBool();
111840
111895
  init_load();
@@ -111902,26 +111957,18 @@ function formatDecision(decision) {
111902
111957
  const eliminatedNote = decision.eliminated !== void 0 && decision.eliminated.length > 0 ? ` [${String(decision.eliminated.length)} more specific rule(s) eliminated by a failing when-condition]` : "";
111903
111958
  return `${decision.relPath}: ${status} \u2014 ${reason}${eliminatedNote}`;
111904
111959
  }
111905
- function parseKeychainServiceName(stderr) {
111906
- const match = /"svce"<blob>="([^"]*)"/.exec(stderr);
111907
- return match?.[1];
111908
- }
111909
111960
  function lookupKeychainService(run, farmRoot) {
111910
- const result = run.run("security", ["find-generic-password", "-a", farmRoot, "-g"]);
111961
+ const serviceName = claudeCodeKeychainService(farmRoot);
111962
+ const result = run.run("security", ["find-generic-password", "-s", serviceName]);
111911
111963
  if (result.status !== 0) {
111912
111964
  return {
111913
111965
  checked: true,
111914
111966
  found: false,
111915
- note: `No Keychain entry found for account "${farmRoot}" (security exited ${result.status === null ? "with no status" : String(result.status)}).`
111967
+ serviceName,
111968
+ note: `No Keychain entry found for service "${serviceName}" (security exited ${result.status === null ? "with no status" : String(result.status)}).`
111916
111969
  };
111917
111970
  }
111918
- const serviceName = parseKeychainServiceName(result.stderr);
111919
- return {
111920
- checked: true,
111921
- found: true,
111922
- ...serviceName === void 0 ? {} : { serviceName },
111923
- note: serviceName === void 0 ? `A Keychain entry was found for account "${farmRoot}" but its service name could not be parsed from security's output.` : `Keychain service name for this identity: "${serviceName}".`
111924
- };
111971
+ return { checked: true, found: true, serviceName, note: `Keychain service name for this identity: "${serviceName}".` };
111925
111972
  }
111926
111973
  var SettingsSecretsShapeSchema = external_exports.looseObject({
111927
111974
  env: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
@@ -112183,10 +112230,10 @@ function collectCheckReport(params) {
112183
112230
  }).input;
112184
112231
  const providerName = cascadeProviderName(cascade);
112185
112232
  const provider = providerName === void 0 ? void 0 : loadCheckProvider(paths, providerName);
112186
- const farmRoot = identityDecision.name === void 0 ? void 0 : import_node_path30.default.join(paths.identitiesDir, identityDecision.name);
112233
+ const farmRoot = identityDecision.name === void 0 ? void 0 : import_node_path31.default.join(paths.identitiesDir, identityDecision.name);
112187
112234
  const settingsFiles = {
112188
- "settings.json": realFsPort.readFileUtf8(import_node_path30.default.join(claudeHome, "settings.json")),
112189
- "settings.local.json": realFsPort.readFileUtf8(import_node_path30.default.join(claudeHome, "settings.local.json"))
112235
+ "settings.json": realFsPort.readFileUtf8(import_node_path31.default.join(claudeHome, "settings.json")),
112236
+ "settings.local.json": realFsPort.readFileUtf8(import_node_path31.default.join(claudeHome, "settings.local.json"))
112190
112237
  };
112191
112238
  const report = runCheck({
112192
112239
  cwd,
@@ -112222,7 +112269,7 @@ function registerCheckCommand(program2, deps) {
112222
112269
  const command = program2.command("check [path]").description(
112223
112270
  "Show what a launch in a directory would share or hide and why, plus credential and settings diagnostics. Never touches the farm or spawns claude."
112224
112271
  ).option("--identity <name>", "Identity to check (defaults to the identity a launch there would resolve).").option("--json", "Print the report as JSON.").option("--strict", "Exit 1 when the report carries any warning, not only on errors.").action((pathArg, options) => {
112225
- const cwd = pathArg === void 0 ? process.cwd() : import_node_path31.default.resolve(pathArg);
112272
+ const cwd = pathArg === void 0 ? process.cwd() : import_node_path32.default.resolve(pathArg);
112226
112273
  const report = collectCheckReport({ paths, cwd, ...options.identity === void 0 ? {} : { identity: options.identity }, env: process.env });
112227
112274
  if (options.json === true) {
112228
112275
  printJson(checkReportToJson(report));
@@ -112239,10 +112286,10 @@ function registerCheckCommand(program2, deps) {
112239
112286
  }
112240
112287
 
112241
112288
  // src/codex/commands.ts
112242
- var import_node_crypto9 = require("node:crypto");
112289
+ var import_node_crypto10 = require("node:crypto");
112243
112290
  var import_node_fs11 = __toESM(require("node:fs"), 1);
112244
112291
  var import_node_os6 = __toESM(require("node:os"), 1);
112245
- var import_node_path32 = __toESM(require("node:path"), 1);
112292
+ var import_node_path33 = __toESM(require("node:path"), 1);
112246
112293
  init_commandDeps();
112247
112294
  init_state();
112248
112295
  init_schema();
@@ -112398,7 +112445,7 @@ function createCodexAuthStore(authPath, ports) {
112398
112445
  }
112399
112446
 
112400
112447
  // src/codex/siwc.ts
112401
- var import_node_crypto6 = require("node:crypto");
112448
+ var import_node_crypto7 = require("node:crypto");
112402
112449
  init_zod();
112403
112450
  var SIWC_AUTHORIZE_URL = "https://auth.openai.com/api/accounts/authorize";
112404
112451
  var SIWC_TOKEN_URL = "https://auth.openai.com/api/accounts/oauth/token";
@@ -112432,7 +112479,7 @@ function base64Url(bytes) {
112432
112479
  }
112433
112480
  function newPkce(randomBytes5) {
112434
112481
  const verifier = base64Url(randomBytes5(SIWC_RANDOM_BYTES));
112435
- return { verifier, challenge: (0, import_node_crypto6.createHash)("sha256").update(verifier).digest("base64url") };
112482
+ return { verifier, challenge: (0, import_node_crypto7.createHash)("sha256").update(verifier).digest("base64url") };
112436
112483
  }
112437
112484
  function newOpaqueValue(randomBytes5) {
112438
112485
  return base64Url(randomBytes5(SIWC_RANDOM_BYTES));
@@ -112560,7 +112607,7 @@ async function verifyIdToken(ports, idToken, expected) {
112560
112607
  throw new SiwcError("the issuer's key set has no key for the ID token's signature");
112561
112608
  }
112562
112609
  const signed = Buffer.from(`${headerSegment}.${payloadSegment}`);
112563
- if (!(0, import_node_crypto6.verify)("sha256", signed, (0, import_node_crypto6.createPublicKey)({ key: jwk, format: "jwk" }), Buffer.from(signatureSegment, "base64url"))) {
112610
+ if (!(0, import_node_crypto7.verify)("sha256", signed, (0, import_node_crypto7.createPublicKey)({ key: jwk, format: "jwk" }), Buffer.from(signatureSegment, "base64url"))) {
112564
112611
  throw new SiwcError("the ID token's signature did not verify");
112565
112612
  }
112566
112613
  const claims = IdTokenClaimsSchema.parse(decodeSegment(payloadSegment));
@@ -112663,7 +112710,7 @@ async function runSiwcLogout(ports) {
112663
112710
 
112664
112711
  // src/codex/siwcPorts.ts
112665
112712
  var import_node_child_process4 = require("node:child_process");
112666
- var import_node_crypto7 = require("node:crypto");
112713
+ var import_node_crypto8 = require("node:crypto");
112667
112714
  var import_node_http = __toESM(require("node:http"), 1);
112668
112715
 
112669
112716
  // src/codex/http.ts
@@ -112685,7 +112732,7 @@ var HTTP_STATUS = {
112685
112732
 
112686
112733
  // src/codex/siwcPorts.ts
112687
112734
  function realSiwcPorts(fetch3) {
112688
- return { fetch: fetch3, randomBytes: (size) => (0, import_node_crypto7.randomBytes)(size), now: () => /* @__PURE__ */ new Date() };
112735
+ return { fetch: fetch3, randomBytes: (size) => (0, import_node_crypto8.randomBytes)(size), now: () => /* @__PURE__ */ new Date() };
112689
112736
  }
112690
112737
  var CALLBACK_PAGE = "<!doctype html><meta charset=utf-8><title>Signed in</title><p>You can close this tab and return to the terminal.</p>";
112691
112738
  async function listenForCallback(port, state) {
@@ -112834,7 +112881,7 @@ function createSiwcStore(filePath, ports) {
112834
112881
  }
112835
112882
 
112836
112883
  // src/codex/upstream.ts
112837
- var import_node_crypto8 = require("node:crypto");
112884
+ var import_node_crypto9 = require("node:crypto");
112838
112885
  var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
112839
112886
  var CODEX_UPSTREAM_TIMEOUT_MS = 3e5;
112840
112887
  var CODEX_HEADERS_TIMEOUT_MS = 15e3;
@@ -112870,7 +112917,7 @@ function sessionIdFor(userId, randomId) {
112870
112917
  if (userId === void 0 || userId === "") {
112871
112918
  return randomId();
112872
112919
  }
112873
- const hex3 = (0, import_node_crypto8.createHash)("sha256").update(`agent-shim codex session
112920
+ const hex3 = (0, import_node_crypto9.createHash)("sha256").update(`agent-shim codex session
112874
112921
  ${userId}`).digest("hex");
112875
112922
  let next = 0;
112876
112923
  return UUID_TEMPLATE.replace(/x/g, () => hex3.charAt(next++));
@@ -112911,10 +112958,10 @@ async function callCodex(ports, request7, sessionId, signal) {
112911
112958
  // src/codex/commands.ts
112912
112959
  function codexHome(env, home) {
112913
112960
  const fromEnv = env.CODEX_HOME;
112914
- return fromEnv !== void 0 && fromEnv !== "" ? fromEnv : import_node_path32.default.join(home, ".codex");
112961
+ return fromEnv !== void 0 && fromEnv !== "" ? fromEnv : import_node_path33.default.join(home, ".codex");
112915
112962
  }
112916
112963
  function codexUsageSnapshotPath() {
112917
- return import_node_path32.default.join(resolveClaudeHome(), "codex-quota.json");
112964
+ return import_node_path33.default.join(resolveClaudeHome(), "codex-quota.json");
112918
112965
  }
112919
112966
  function isEnoent4(error63) {
112920
112967
  return typeof error63 === "object" && error63 !== null && "code" in error63 && error63.code === "ENOENT";
@@ -112932,7 +112979,7 @@ var realCodexAuthFs = {
112932
112979
  }
112933
112980
  },
112934
112981
  writePrivate: (filePath, contents) => {
112935
- import_node_fs11.default.mkdirSync(import_node_path32.default.dirname(filePath), { recursive: true });
112982
+ import_node_fs11.default.mkdirSync(import_node_path33.default.dirname(filePath), { recursive: true });
112936
112983
  import_node_fs11.default.writeFileSync(filePath, contents, { encoding: "utf8", mode: PRIVATE_FILE_MODE });
112937
112984
  import_node_fs11.default.chmodSync(filePath, PRIVATE_FILE_MODE);
112938
112985
  },
@@ -112944,7 +112991,7 @@ function writeUsageSnapshot(log, snapshot) {
112944
112991
  const target = codexUsageSnapshotPath();
112945
112992
  const temp = `${target}.${String(process.pid)}.tmp`;
112946
112993
  try {
112947
- import_node_fs11.default.mkdirSync(import_node_path32.default.dirname(target), { recursive: true });
112994
+ import_node_fs11.default.mkdirSync(import_node_path33.default.dirname(target), { recursive: true });
112948
112995
  import_node_fs11.default.writeFileSync(temp, `${JSON.stringify(snapshot, null, 2)}
112949
112996
  `);
112950
112997
  import_node_fs11.default.renameSync(temp, target);
@@ -112955,8 +113002,8 @@ function writeUsageSnapshot(log, snapshot) {
112955
113002
  function createCodexRoutePorts(log, signInFile, options) {
112956
113003
  const agent = createUpstreamAgent();
112957
113004
  const upstreamFetch = createUpstreamFetch(agent);
112958
- const tempSuffix = `${String(process.pid)}.${(0, import_node_crypto9.randomUUID)()}`;
112959
- const auth = createCodexAuthStore(import_node_path32.default.join(codexHome(process.env, import_node_os6.default.homedir()), "auth.json"), {
113005
+ const tempSuffix = `${String(process.pid)}.${(0, import_node_crypto10.randomUUID)()}`;
113006
+ const auth = createCodexAuthStore(import_node_path33.default.join(codexHome(process.env, import_node_os6.default.homedir()), "auth.json"), {
112960
113007
  fs: realCodexAuthFs,
112961
113008
  fetch: upstreamFetch,
112962
113009
  now: () => /* @__PURE__ */ new Date(),
@@ -112965,8 +113012,8 @@ function createCodexRoutePorts(log, signInFile, options) {
112965
113012
  const signIn = createSiwcStore(signInFile, { fs: realCodexAuthFs, siwc: realSiwcPorts(upstreamFetch), tempSuffix });
112966
113013
  return {
112967
113014
  upstreams: {
112968
- "codex-cli": { fetch: upstreamFetch, auth, timers: realTimers, randomId: import_node_crypto9.randomUUID },
112969
- "chatgpt-sign-in": { fetch: upstreamFetch, auth: signIn.auth, timers: realTimers, randomId: import_node_crypto9.randomUUID, target: RESPONSES_API_TARGET }
113015
+ "codex-cli": { fetch: upstreamFetch, auth, timers: realTimers, randomId: import_node_crypto10.randomUUID },
113016
+ "chatgpt-sign-in": { fetch: upstreamFetch, auth: signIn.auth, timers: realTimers, randomId: import_node_crypto10.randomUUID, target: RESPONSES_API_TARGET }
112970
113017
  },
112971
113018
  ...options?.enableUsageSnapshot === true ? {
112972
113019
  writeUsageSnapshot: (snapshot) => {
@@ -113045,7 +113092,7 @@ async function runCodexLogout(paths) {
113045
113092
  }
113046
113093
  function realSiwcLoginPorts(paths) {
113047
113094
  const siwc = realSiwcPorts(createUpstreamFetch(createUpstreamAgent()));
113048
- const store = createSiwcStore(paths.chatgptSignInFile, { fs: realCodexAuthFs, siwc, tempSuffix: `${String(process.pid)}.${(0, import_node_crypto9.randomUUID)()}` });
113095
+ const store = createSiwcStore(paths.chatgptSignInFile, { fs: realCodexAuthFs, siwc, tempSuffix: `${String(process.pid)}.${(0, import_node_crypto10.randomUUID)()}` });
113049
113096
  return {
113050
113097
  store,
113051
113098
  siwc,
@@ -113103,8 +113150,8 @@ function registerCodexCommand(program2, deps) {
113103
113150
  }
113104
113151
 
113105
113152
  // src/frontdoor/commands.ts
113106
- var import_node_crypto24 = require("node:crypto");
113107
- var import_node_path51 = __toESM(require("node:path"), 1);
113153
+ var import_node_crypto25 = require("node:crypto");
113154
+ var import_node_path52 = __toESM(require("node:path"), 1);
113108
113155
  var import_node_fs19 = __toESM(require("node:fs"), 1);
113109
113156
  init_commandDeps();
113110
113157
  init_schema();
@@ -113125,11 +113172,11 @@ var realSessionFs = {
113125
113172
  };
113126
113173
 
113127
113174
  // src/agents/sessions.ts
113128
- var import_node_path34 = __toESM(require("node:path"), 1);
113175
+ var import_node_path35 = __toESM(require("node:path"), 1);
113129
113176
  init_cliError();
113130
113177
 
113131
113178
  // src/agents/read.ts
113132
- var import_node_path33 = __toESM(require("node:path"), 1);
113179
+ var import_node_path34 = __toESM(require("node:path"), 1);
113133
113180
  init_zod();
113134
113181
 
113135
113182
  // src/agents/schema.ts
@@ -113248,15 +113295,15 @@ function parseEntry2(project, entry) {
113248
113295
  }
113249
113296
  function listSessions2(fs25, configDir) {
113250
113297
  const found = [];
113251
- for (const project of fs25.readdir(import_node_path33.default.join(configDir, PROJECTS_DIR))) {
113252
- const projectDir = import_node_path33.default.join(configDir, PROJECTS_DIR, project);
113298
+ for (const project of fs25.readdir(import_node_path34.default.join(configDir, PROJECTS_DIR))) {
113299
+ const projectDir = import_node_path34.default.join(configDir, PROJECTS_DIR, project);
113253
113300
  const entries = /* @__PURE__ */ new Set();
113254
113301
  for (const name of fs25.readdir(projectDir)) {
113255
113302
  if (name.endsWith(TRANSCRIPT_SUFFIX)) {
113256
113303
  entries.add(name.slice(0, -TRANSCRIPT_SUFFIX.length));
113257
113304
  continue;
113258
113305
  }
113259
- const children = fs25.readdir(import_node_path33.default.join(projectDir, name));
113306
+ const children = fs25.readdir(import_node_path34.default.join(projectDir, name));
113260
113307
  if (children.includes(SUBAGENTS_DIR) || children.includes(WORKFLOWS_DIR)) {
113261
113308
  entries.add(name);
113262
113309
  }
@@ -113276,8 +113323,8 @@ function locateAgents(fs25, configDir, relativeDir, workflowRunId, report) {
113276
113323
  const id2 = name.slice(AGENT_FILE_PREFIX.length, -META_SUFFIX.length);
113277
113324
  located.push({
113278
113325
  id: id2,
113279
- metaPath: import_node_path33.default.join(relativeDir, name),
113280
- transcriptPath: import_node_path33.default.join(relativeDir, `${AGENT_FILE_PREFIX}${id2}${TRANSCRIPT_SUFFIX}`),
113326
+ metaPath: import_node_path34.default.join(relativeDir, name),
113327
+ transcriptPath: import_node_path34.default.join(relativeDir, `${AGENT_FILE_PREFIX}${id2}${TRANSCRIPT_SUFFIX}`),
113281
113328
  workflowRunId
113282
113329
  });
113283
113330
  }
@@ -113320,7 +113367,7 @@ function describeFailure(error63) {
113320
113367
  }
113321
113368
  function readFileOrReport(fs25, configDir, relative, report) {
113322
113369
  try {
113323
- return fs25.readFileUtf8(import_node_path33.default.join(configDir, relative));
113370
+ return fs25.readFileUtf8(import_node_path34.default.join(configDir, relative));
113324
113371
  } catch (error63) {
113325
113372
  report({ path: relative, reason: `could not be read: ${describeFailure(error63)}` });
113326
113373
  return void 0;
@@ -113328,7 +113375,7 @@ function readFileOrReport(fs25, configDir, relative, report) {
113328
113375
  }
113329
113376
  function listDirOrReport(fs25, configDir, relative, report) {
113330
113377
  try {
113331
- return fs25.readdir(import_node_path33.default.join(configDir, relative));
113378
+ return fs25.readdir(import_node_path34.default.join(configDir, relative));
113332
113379
  } catch (error63) {
113333
113380
  report({ path: relative, reason: `could not be listed: ${describeFailure(error63)}` });
113334
113381
  return [];
@@ -113352,18 +113399,18 @@ var WorkflowRunFileSchema = external_exports.object({
113352
113399
  summary: external_exports.string().optional()
113353
113400
  });
113354
113401
  function summariseSession(fs25, configDir, ref) {
113355
- const sessionRelative = import_node_path33.default.join(PROJECTS_DIR, ref.project, ref.entry);
113356
- const subagentsRelative = import_node_path33.default.join(sessionRelative, SUBAGENTS_DIR);
113357
- const workflowsUnderSubagents = import_node_path33.default.join(subagentsRelative, WORKFLOWS_DIR);
113402
+ const sessionRelative = import_node_path34.default.join(PROJECTS_DIR, ref.project, ref.entry);
113403
+ const subagentsRelative = import_node_path34.default.join(sessionRelative, SUBAGENTS_DIR);
113404
+ const workflowsUnderSubagents = import_node_path34.default.join(subagentsRelative, WORKFLOWS_DIR);
113358
113405
  const isMeta = (name) => name.startsWith(AGENT_FILE_PREFIX) && name.endsWith(META_SUFFIX);
113359
- let agentCount = fs25.readdir(import_node_path33.default.join(configDir, subagentsRelative)).filter(isMeta).length;
113360
- for (const runDir of fs25.readdir(import_node_path33.default.join(configDir, workflowsUnderSubagents))) {
113406
+ let agentCount = fs25.readdir(import_node_path34.default.join(configDir, subagentsRelative)).filter(isMeta).length;
113407
+ for (const runDir of fs25.readdir(import_node_path34.default.join(configDir, workflowsUnderSubagents))) {
113361
113408
  if (runDir.startsWith(WORKFLOW_RUN_PREFIX)) {
113362
- agentCount += fs25.readdir(import_node_path33.default.join(configDir, workflowsUnderSubagents, runDir)).filter(isMeta).length;
113409
+ agentCount += fs25.readdir(import_node_path34.default.join(configDir, workflowsUnderSubagents, runDir)).filter(isMeta).length;
113363
113410
  }
113364
113411
  }
113365
- const workflowRunCount = fs25.readdir(import_node_path33.default.join(configDir, sessionRelative, WORKFLOWS_DIR)).filter((name) => name.startsWith(WORKFLOW_RUN_PREFIX) && name.endsWith(JSON_SUFFIX)).length;
113366
- const transcript = fs25.lstat(import_node_path33.default.join(configDir, PROJECTS_DIR, ref.project, `${ref.entry}${TRANSCRIPT_SUFFIX}`));
113412
+ const workflowRunCount = fs25.readdir(import_node_path34.default.join(configDir, sessionRelative, WORKFLOWS_DIR)).filter((name) => name.startsWith(WORKFLOW_RUN_PREFIX) && name.endsWith(JSON_SUFFIX)).length;
113413
+ const transcript = fs25.lstat(import_node_path34.default.join(configDir, PROJECTS_DIR, ref.project, `${ref.entry}${TRANSCRIPT_SUFFIX}`));
113367
113414
  return { ...ref, agentCount, workflowRunCount, ...transcript === void 0 ? {} : { updatedAt: new Date(transcript.mtimeMs).toISOString() } };
113368
113415
  }
113369
113416
  function readSessionAgentTree(fs25, configDir, ref, options = {}) {
@@ -113371,13 +113418,13 @@ function readSessionAgentTree(fs25, configDir, ref, options = {}) {
113371
113418
  const report = (problem) => {
113372
113419
  problems.push(problem);
113373
113420
  };
113374
- const sessionRelative = import_node_path33.default.join(PROJECTS_DIR, ref.project, ref.entry);
113375
- const subagentsRelative = import_node_path33.default.join(sessionRelative, SUBAGENTS_DIR);
113376
- const workflowsUnderSubagents = import_node_path33.default.join(subagentsRelative, WORKFLOWS_DIR);
113421
+ const sessionRelative = import_node_path34.default.join(PROJECTS_DIR, ref.project, ref.entry);
113422
+ const subagentsRelative = import_node_path34.default.join(sessionRelative, SUBAGENTS_DIR);
113423
+ const workflowsUnderSubagents = import_node_path34.default.join(subagentsRelative, WORKFLOWS_DIR);
113377
113424
  const located = locateAgents(fs25, configDir, subagentsRelative, void 0, report);
113378
113425
  for (const runDir of listDirOrReport(fs25, configDir, workflowsUnderSubagents, report)) {
113379
113426
  if (runDir.startsWith(WORKFLOW_RUN_PREFIX)) {
113380
- located.push(...locateAgents(fs25, configDir, import_node_path33.default.join(workflowsUnderSubagents, runDir), runDir, report));
113427
+ located.push(...locateAgents(fs25, configDir, import_node_path34.default.join(workflowsUnderSubagents, runDir), runDir, report));
113381
113428
  }
113382
113429
  }
113383
113430
  const agents = /* @__PURE__ */ new Map();
@@ -113418,7 +113465,7 @@ function readSessionAgentTree(fs25, configDir, ref, options = {}) {
113418
113465
  superseded: ref.superseded,
113419
113466
  agents: roots.sort().map(build),
113420
113467
  tasks: readTasks(fs25, configDir, ownTaskLists(ref.sessionId), [.../* @__PURE__ */ new Set([...teamNames, ...options.taskListIds ?? []])].filter((id2) => !ownTaskLists(ref.sessionId).includes(id2)), report),
113421
- workflowRuns: readWorkflowRuns(fs25, configDir, import_node_path33.default.join(sessionRelative, WORKFLOWS_DIR), report),
113468
+ workflowRuns: readWorkflowRuns(fs25, configDir, import_node_path34.default.join(sessionRelative, WORKFLOWS_DIR), report),
113422
113469
  problems
113423
113470
  };
113424
113471
  }
@@ -113483,12 +113530,12 @@ function ownTaskLists(sessionId) {
113483
113530
  function readTasks(fs25, configDir, ownLists, sharedLists, report) {
113484
113531
  const tasks = [];
113485
113532
  [...ownLists, ...sharedLists].forEach((scope, index) => {
113486
- const relativeDir = import_node_path33.default.join(TASKS_DIR, scope);
113533
+ const relativeDir = import_node_path34.default.join(TASKS_DIR, scope);
113487
113534
  for (const name of [...listDirOrReport(fs25, configDir, relativeDir, report)].sort()) {
113488
113535
  if (name.startsWith(".") || !name.endsWith(JSON_SUFFIX)) {
113489
113536
  continue;
113490
113537
  }
113491
- const relative = import_node_path33.default.join(relativeDir, name);
113538
+ const relative = import_node_path34.default.join(relativeDir, name);
113492
113539
  const text2 = readFileOrReport(fs25, configDir, relative, report);
113493
113540
  const parsed = TaskFileSchema.safeParse(text2 === void 0 ? void 0 : parseJson3(text2));
113494
113541
  if (parsed.success) {
@@ -113506,7 +113553,7 @@ function readWorkflowRuns(fs25, configDir, relativeDir, report) {
113506
113553
  if (!name.startsWith(WORKFLOW_RUN_PREFIX) || !name.endsWith(JSON_SUFFIX)) {
113507
113554
  continue;
113508
113555
  }
113509
- const relative = import_node_path33.default.join(relativeDir, name);
113556
+ const relative = import_node_path34.default.join(relativeDir, name);
113510
113557
  const text2 = readFileOrReport(fs25, configDir, relative, report);
113511
113558
  const parsed = WorkflowRunFileSchema.safeParse(text2 === void 0 ? void 0 : parseJson3(text2));
113512
113559
  if (!parsed.success) {
@@ -113529,13 +113576,13 @@ var SessionLookupError = class extends CliError {
113529
113576
  }
113530
113577
  };
113531
113578
  function identityConfigDir(identitiesDir, identity) {
113532
- return import_node_path34.default.join(identitiesDir, identity);
113579
+ return import_node_path35.default.join(identitiesDir, identity);
113533
113580
  }
113534
113581
  function historyStores(fs25, identitiesDir, identities) {
113535
113582
  const byRealPath = /* @__PURE__ */ new Map();
113536
113583
  for (const identity of identities) {
113537
113584
  const configDir = identityConfigDir(identitiesDir, identity);
113538
- const real = fs25.realpath(import_node_path34.default.join(configDir, "projects"));
113585
+ const real = fs25.realpath(import_node_path35.default.join(configDir, "projects"));
113539
113586
  if (real === void 0) {
113540
113587
  continue;
113541
113588
  }
@@ -113599,7 +113646,7 @@ init_realPorts();
113599
113646
  // src/update/commands.ts
113600
113647
  var import_node_fs14 = __toESM(require("node:fs"), 1);
113601
113648
  var import_node_os7 = __toESM(require("node:os"), 1);
113602
- var import_node_path37 = __toESM(require("node:path"), 1);
113649
+ var import_node_path38 = __toESM(require("node:path"), 1);
113603
113650
  init_package();
113604
113651
  init_commandDeps();
113605
113652
  init_store();
@@ -113702,7 +113749,7 @@ var realUpdatePorts = {
113702
113749
  chmod: (filePath, mode) => {
113703
113750
  import_node_fs14.default.chmodSync(filePath, mode);
113704
113751
  },
113705
- mkdtemp: () => import_node_fs14.default.mkdtempSync(import_node_path37.default.join(import_node_os7.default.tmpdir(), "agent-shim-update-")),
113752
+ mkdtemp: () => import_node_fs14.default.mkdtempSync(import_node_path38.default.join(import_node_os7.default.tmpdir(), "agent-shim-update-")),
113706
113753
  rmRecursive: (targetPath) => {
113707
113754
  import_node_fs14.default.rmSync(targetPath, { recursive: true, force: true });
113708
113755
  }
@@ -113723,7 +113770,7 @@ function selfUpdateOptions(paths, checkOnly) {
113723
113770
  platform: process.platform,
113724
113771
  arch: process.arch,
113725
113772
  executablePath: realOwnExecutablePath(),
113726
- lockPath: import_node_path37.default.join(paths.root, "update.lock"),
113773
+ lockPath: import_node_path38.default.join(paths.root, "update.lock"),
113727
113774
  checkOnly,
113728
113775
  pid: process.pid
113729
113776
  };
@@ -113955,7 +114002,7 @@ function createRealWindowOpener(params) {
113955
114002
  init_conditions();
113956
114003
 
113957
114004
  // src/usage/handledStamps.ts
113958
- var import_node_path43 = __toESM(require("node:path"), 1);
114005
+ var import_node_path45 = __toESM(require("node:path"), 1);
113959
114006
  init_zod();
113960
114007
  var STAMPS_SCHEMA_VERSION = 1;
113961
114008
  var StampsFileSchema = external_exports.strictObject({
@@ -113978,7 +114025,7 @@ function readHandled(fs25, file2) {
113978
114025
  }
113979
114026
  function writeHandled(fs25, file2, handled) {
113980
114027
  const next = { schemaVersion: STAMPS_SCHEMA_VERSION, handled: Object.fromEntries(Object.entries(handled).map(([key, at2]) => [key, new Date(at2).toISOString()])) };
113981
- fs25.mkdirPrivate(import_node_path43.default.dirname(file2));
114028
+ fs25.mkdirPrivate(import_node_path45.default.dirname(file2));
113982
114029
  fs25.writeFilePrivate(file2, `${JSON.stringify(next, null, 2)}
113983
114030
  `);
113984
114031
  }
@@ -114386,11 +114433,11 @@ init_capability();
114386
114433
  init_capture();
114387
114434
 
114388
114435
  // src/frontdoor/connect.ts
114389
- var import_node_crypto18 = require("node:crypto");
114436
+ var import_node_crypto19 = require("node:crypto");
114390
114437
  var fs17 = __toESM(require("node:fs"), 1);
114391
114438
 
114392
114439
  // src/frontdoor/x509.ts
114393
- var import_node_crypto17 = require("node:crypto");
114440
+ var import_node_crypto18 = require("node:crypto");
114394
114441
  var import_node_net = __toESM(require("node:net"), 1);
114395
114442
  var TAG_BOOLEAN = 1;
114396
114443
  var TAG_INTEGER = 2;
@@ -114542,7 +114589,7 @@ function ipBytes(address) {
114542
114589
  return bytes;
114543
114590
  }
114544
114591
  function keyIdentifier(publicKey) {
114545
- return (0, import_node_crypto17.createHash)("sha1").update(publicKey.export({ type: "pkcs1", format: "der" })).digest();
114592
+ return (0, import_node_crypto18.createHash)("sha1").update(publicKey.export({ type: "pkcs1", format: "der" })).digest();
114546
114593
  }
114547
114594
  function readElement(buffer2, offset) {
114548
114595
  const tag = buffer2[offset];
@@ -114588,7 +114635,7 @@ ${body.join("\n")}
114588
114635
  `;
114589
114636
  }
114590
114637
  function randomSerial() {
114591
- const bytes = (0, import_node_crypto17.randomBytes)(SERIAL_NUMBER_BYTES);
114638
+ const bytes = (0, import_node_crypto18.randomBytes)(SERIAL_NUMBER_BYTES);
114592
114639
  bytes[0] = (bytes[0] ?? 0) & BASE_128_PAYLOAD_MASK | HIGH_BIT >> 1;
114593
114640
  return bytes;
114594
114641
  }
@@ -114603,7 +114650,7 @@ function assemble(spec) {
114603
114650
  spec.subjectPublicKey.export({ type: "spki", format: "der" }),
114604
114651
  tlv(TAG_EXTENSIONS, sequence(...spec.extensions))
114605
114652
  );
114606
- const signature = (0, import_node_crypto17.sign)("sha256", tbs, spec.signingKey);
114653
+ const signature = (0, import_node_crypto18.sign)("sha256", tbs, spec.signingKey);
114607
114654
  return sequence(tbs, SIGNATURE_ALGORITHM, wholeBitString(signature));
114608
114655
  }
114609
114656
  function subjectKeyIdentifierExtension(publicKey) {
@@ -114613,7 +114660,7 @@ function basicConstraintsExtension(isCa) {
114613
114660
  return extension(OID_BASIC_CONSTRAINTS, true, sequence(...isCa ? [boolean4(true)] : []));
114614
114661
  }
114615
114662
  function rsaKeyPair() {
114616
- return (0, import_node_crypto17.generateKeyPairSync)("rsa", { modulusLength: RSA_MODULUS_BITS });
114663
+ return (0, import_node_crypto18.generateKeyPairSync)("rsa", { modulusLength: RSA_MODULUS_BITS });
114617
114664
  }
114618
114665
  function keyPem(privateKey) {
114619
114666
  return privateKey.export({ type: "pkcs8", format: "pem" });
@@ -114637,8 +114684,8 @@ function issueLeafCertificate(ca2, names, notBefore, notAfter) {
114637
114684
  if (commonName === void 0) {
114638
114685
  throw new Error("a leaf certificate needs at least one name");
114639
114686
  }
114640
- const caCertificate = new import_node_crypto17.X509Certificate(ca2.certPem);
114641
- const caPrivateKey = (0, import_node_crypto17.createPrivateKey)(ca2.keyPem);
114687
+ const caCertificate = new import_node_crypto18.X509Certificate(ca2.certPem);
114688
+ const caPrivateKey = (0, import_node_crypto18.createPrivateKey)(ca2.keyPem);
114642
114689
  const { publicKey, privateKey } = rsaKeyPair();
114643
114690
  const generalNames = names.map((name) => import_node_net.default.isIP(name) === 0 ? tlv(TAG_GENERAL_NAME_DNS, Buffer.from(name, "ascii")) : tlv(TAG_GENERAL_NAME_IP, ipBytes(name)));
114644
114691
  const der = assemble({
@@ -114718,14 +114765,14 @@ init_state();
114718
114765
 
114719
114766
  // src/frontdoor/supervisor.ts
114720
114767
  init_processRole();
114721
- var import_node_path44 = __toESM(require("node:path"), 1);
114768
+ var import_node_path46 = __toESM(require("node:path"), 1);
114722
114769
  init_state();
114723
114770
  function watchedInstallEntry(resolvedOwnExecutablePath, siblingExists) {
114724
- const parsed = import_node_path44.default.parse(resolvedOwnExecutablePath);
114771
+ const parsed = import_node_path46.default.parse(resolvedOwnExecutablePath);
114725
114772
  if (parsed.name === "agent-shim") {
114726
114773
  return resolvedOwnExecutablePath;
114727
114774
  }
114728
- const sibling = import_node_path44.default.join(parsed.dir, `agent-shim${parsed.ext}`);
114775
+ const sibling = import_node_path46.default.join(parsed.dir, `agent-shim${parsed.ext}`);
114729
114776
  return siblingExists(sibling) ? sibling : resolvedOwnExecutablePath;
114730
114777
  }
114731
114778
  var AWAIT_PID_POLL_MS = 50;
@@ -114933,8 +114980,8 @@ function parseConnectTarget(authority) {
114933
114980
  }
114934
114981
  return { host, port };
114935
114982
  }
114936
- function servedByPipeline(path63) {
114937
- return path63?.startsWith(ROUTED_PATH_PREFIX) === true;
114983
+ function servedByPipeline(path64) {
114984
+ return path64?.startsWith(ROUTED_PATH_PREFIX) === true;
114938
114985
  }
114939
114986
  var HOP_BY_HOP_HEADERS = /* @__PURE__ */ new Set([
114940
114987
  "connection",
@@ -114994,8 +115041,8 @@ function ensureCa(store, generate) {
114994
115041
  }
114995
115042
  function caParses(ca2) {
114996
115043
  try {
114997
- new import_node_crypto18.X509Certificate(ca2.certPem);
114998
- (0, import_node_crypto18.createPrivateKey)(ca2.keyPem);
115044
+ new import_node_crypto19.X509Certificate(ca2.certPem);
115045
+ (0, import_node_crypto19.createPrivateKey)(ca2.keyPem);
114999
115046
  return true;
115000
115047
  } catch {
115001
115048
  return false;
@@ -115619,11 +115666,11 @@ function createRcSessionTracker(deps) {
115619
115666
  };
115620
115667
  const observeExchange = (request7) => {
115621
115668
  const method = (request7.method ?? "").toUpperCase();
115622
- const path63 = new URL(request7.url ?? "/", "http://127.0.0.1").pathname;
115623
- if (!path63.startsWith(RC_SESSIONS_PATH_PREFIX)) {
115669
+ const path64 = new URL(request7.url ?? "/", "http://127.0.0.1").pathname;
115670
+ if (!path64.startsWith(RC_SESSIONS_PATH_PREFIX)) {
115624
115671
  return void 0;
115625
115672
  }
115626
- const tail = path63.slice(RC_SESSIONS_PATH_PREFIX.length);
115673
+ const tail = path64.slice(RC_SESSIONS_PATH_PREFIX.length);
115627
115674
  const facts = {
115628
115675
  oauthAuthorization: oauthAuthorizationOf(request7.headers),
115629
115676
  anthropicVersion: singleHeader(request7.headers, "anthropic-version"),
@@ -115992,8 +116039,8 @@ var RC_READ_FILE_ENCODINGS = ["utf-8", "base64"];
115992
116039
  function isRcReadFileEncoding(value2) {
115993
116040
  return RC_READ_FILE_ENCODINGS.some((encoding) => encoding === value2);
115994
116041
  }
115995
- function buildRcReadFilePayload(requestId, path63, options) {
115996
- return buildRcControlRequestPayload(requestId, { subtype: "read_file", path: path63, ...options?.maxBytes === void 0 ? {} : { max_bytes: options.maxBytes }, ...options?.encoding === void 0 ? {} : { encoding: options.encoding } });
116042
+ function buildRcReadFilePayload(requestId, path64, options) {
116043
+ return buildRcControlRequestPayload(requestId, { subtype: "read_file", path: path64, ...options?.maxBytes === void 0 ? {} : { max_bytes: options.maxBytes }, ...options?.encoding === void 0 ? {} : { encoding: options.encoding } });
115997
116044
  }
115998
116045
  function buildRcFileSuggestionsPayload(requestId, query) {
115999
116046
  return buildRcControlRequestPayload(requestId, { subtype: "file_suggestions", query });
@@ -116095,15 +116142,15 @@ async function getRcSessionContextUsage(deps, sessionId, detail) {
116095
116142
  const result = await deliverRcClientPayload(deps, sessionId, buildRcGetContextUsagePayload(requestId, detail), `request the context usage of session ${sessionId}`);
116096
116143
  return result.ok ? { ...result, requestId } : result;
116097
116144
  }
116098
- async function readRcSessionFile(deps, sessionId, path63, options) {
116099
- if (path63 === "") {
116145
+ async function readRcSessionFile(deps, sessionId, path64, options) {
116146
+ if (path64 === "") {
116100
116147
  return { ok: false, message: "a read-file write needs a non-empty path: the SDK's own field names the file the worker resolves against the session's cwd, and an empty string names none" };
116101
116148
  }
116102
116149
  if (options?.maxBytes !== void 0 && (!Number.isInteger(options.maxBytes) || options.maxBytes <= 0)) {
116103
116150
  return { ok: false, message: "a read-file write's max-bytes is a positive whole number of bytes: the SDK's own field caps the read, and a zero or negative cap reads nothing" };
116104
116151
  }
116105
116152
  const requestId = deps.newUuid();
116106
- const result = await deliverRcClientPayload(deps, sessionId, buildRcReadFilePayload(requestId, path63, options), `read ${path63} from session ${sessionId}`);
116153
+ const result = await deliverRcClientPayload(deps, sessionId, buildRcReadFilePayload(requestId, path64, options), `read ${path64} from session ${sessionId}`);
116107
116154
  return result.ok ? { ...result, requestId } : result;
116108
116155
  }
116109
116156
  async function suggestRcSessionFiles(deps, sessionId, query) {
@@ -116274,11 +116321,11 @@ function createRcControlHandler(deps) {
116274
116321
  path: "read-file",
116275
116322
  read: (body) => {
116276
116323
  const session = bodyString(body, "session");
116277
- const path63 = bodyString(body, "path");
116324
+ const path64 = bodyString(body, "path");
116278
116325
  const maxBytes = "maxBytes" in body ? bodyPositiveInteger(body, "maxBytes") : void 0;
116279
116326
  const encoding = "encoding" in body && isRcReadFileEncoding(body.encoding) ? body.encoding : void 0;
116280
- const refused2 = session === void 0 || path63 === void 0 || "maxBytes" in body && maxBytes === void 0 || "encoding" in body && encoding === void 0;
116281
- return refused2 ? { error: `the read-file body must be JSON naming a non-empty session id and path, maxBytes only as a positive whole number or absent, and an encoding the SDK's own type permits (${RC_READ_FILE_ENCODINGS.join(", ")}) or none` } : { session, run: async () => await deps.readFile(session, path63, { ...maxBytes === void 0 ? {} : { maxBytes }, ...encoding === void 0 ? {} : { encoding } }) };
116327
+ const refused2 = session === void 0 || path64 === void 0 || "maxBytes" in body && maxBytes === void 0 || "encoding" in body && encoding === void 0;
116328
+ return refused2 ? { error: `the read-file body must be JSON naming a non-empty session id and path, maxBytes only as a positive whole number or absent, and an encoding the SDK's own type permits (${RC_READ_FILE_ENCODINGS.join(", ")}) or none` } : { session, run: async () => await deps.readFile(session, path64, { ...maxBytes === void 0 ? {} : { maxBytes }, ...encoding === void 0 ? {} : { encoding } }) };
116282
116329
  }
116283
116330
  },
116284
116331
  {
@@ -116588,9 +116635,9 @@ function requestIdOfBody(body) {
116588
116635
  }
116589
116636
  function frontDoorRcControl(transport, token) {
116590
116637
  const headers = { authorization: `Bearer ${token}` };
116591
- const listAnswerOf = async (path63, what) => {
116638
+ const listAnswerOf = async (path64, what) => {
116592
116639
  try {
116593
- return await transport.request({ method: "GET", path: path63, headers });
116640
+ return await transport.request({ method: "GET", path: path64, headers });
116594
116641
  } catch (error63) {
116595
116642
  throw new Error(`${what}: could not reach the front door's control listener: ${error63 instanceof Error ? error63.message : String(error63)}`, { cause: error63 });
116596
116643
  }
@@ -116662,10 +116709,10 @@ function frontDoorRcControl(transport, token) {
116662
116709
  }
116663
116710
  return pending;
116664
116711
  };
116665
- const writeOf = async (path63, body, describeFailure2) => {
116712
+ const writeOf = async (path64, body, describeFailure2) => {
116666
116713
  let answer;
116667
116714
  try {
116668
- answer = await transport.request({ method: "POST", path: path63, headers: { ...headers, "content-type": "application/json" }, body });
116715
+ answer = await transport.request({ method: "POST", path: path64, headers: { ...headers, "content-type": "application/json" }, body });
116669
116716
  } catch (error63) {
116670
116717
  return { ok: false, message: `could not reach the front door's control listener: ${error63 instanceof Error ? error63.message : String(error63)}` };
116671
116718
  }
@@ -116696,10 +116743,10 @@ function frontDoorRcControl(transport, token) {
116696
116743
  endSession: async (sessionId, reason) => await writeOf(`${CONTROL_PATH_PREFIX}/end-session`, JSON.stringify({ session: sessionId, ...reason === void 0 ? {} : { reason } }), (status, message) => `ending ${sessionId} failed (HTTP ${String(status)}): ${message}`),
116697
116744
  getUsage: async (sessionId, skipBehaviors) => await writeOf(`${CONTROL_PATH_PREFIX}/get-usage`, JSON.stringify({ session: sessionId, ...skipBehaviors === void 0 ? {} : { skipBehaviors } }), (status, message) => `requesting the usage of ${sessionId} failed (HTTP ${String(status)}): ${message}`),
116698
116745
  getContextUsage: async (sessionId, detail) => await writeOf(`${CONTROL_PATH_PREFIX}/get-context-usage`, JSON.stringify({ session: sessionId, ...detail === void 0 ? {} : { detail } }), (status, message) => `requesting the context usage of ${sessionId} failed (HTTP ${String(status)}): ${message}`),
116699
- readFile: async (sessionId, path63, options) => await writeOf(
116746
+ readFile: async (sessionId, path64, options) => await writeOf(
116700
116747
  `${CONTROL_PATH_PREFIX}/read-file`,
116701
- JSON.stringify({ session: sessionId, path: path63, ...options?.maxBytes === void 0 ? {} : { maxBytes: options.maxBytes }, ...options?.encoding === void 0 ? {} : { encoding: options.encoding } }),
116702
- (status, message) => `reading ${path63} from ${sessionId} failed (HTTP ${String(status)}): ${message}`
116748
+ JSON.stringify({ session: sessionId, path: path64, ...options?.maxBytes === void 0 ? {} : { maxBytes: options.maxBytes }, ...options?.encoding === void 0 ? {} : { encoding: options.encoding } }),
116749
+ (status, message) => `reading ${path64} from ${sessionId} failed (HTTP ${String(status)}): ${message}`
116703
116750
  ),
116704
116751
  fileSuggestions: async (sessionId, query) => await writeOf(`${CONTROL_PATH_PREFIX}/file-suggestions`, JSON.stringify({ session: sessionId, query }), (status, message) => `requesting file suggestions from ${sessionId} failed (HTTP ${String(status)}): ${message}`),
116705
116752
  keepAlive: async (sessionId) => await writeOf(`${CONTROL_PATH_PREFIX}/keep-alive`, JSON.stringify({ session: sessionId }), (status, message) => `keeping ${sessionId} alive failed (HTTP ${String(status)}): ${message}`),
@@ -116993,12 +117040,12 @@ function tlsFacts(options) {
116993
117040
  }
116994
117041
  function realRcEventDial(target = { host: CONNECT_INTERCEPT_HOST, port: HTTPS_PORT }) {
116995
117042
  const agent = new ExemptTlsAgent();
116996
- const post = async (path63, headers, body) => await new Promise((resolve2, reject) => {
117043
+ const post = async (path64, headers, body) => await new Promise((resolve2, reject) => {
116997
117044
  const options = {
116998
117045
  host: target.host,
116999
117046
  port: target.port,
117000
117047
  method: "POST",
117001
- path: path63,
117048
+ path: path64,
117002
117049
  // The Host header names the host whose API this is, not the address dialled: a redirected test dials a loopback stand-in while still speaking to the API host by name, exactly as the forwarded paths present their SNI.
117003
117050
  headers: { ...headers, host: target.servername ?? target.host, "content-length": String(Buffer.byteLength(body, "utf8")) },
117004
117051
  agent
@@ -117063,12 +117110,12 @@ function lateRcStreamDial(resolve2) {
117063
117110
  }
117064
117111
  function realRcStreamDial(target = { host: CONNECT_INTERCEPT_HOST, port: HTTPS_PORT }) {
117065
117112
  const agent = new ExemptTlsAgent();
117066
- const request7 = async (method, path63, headers, body, signal) => await new Promise((resolve2, reject) => {
117113
+ const request7 = async (method, path64, headers, body, signal) => await new Promise((resolve2, reject) => {
117067
117114
  const options = {
117068
117115
  host: target.host,
117069
117116
  port: target.port,
117070
117117
  method,
117071
- path: path63,
117118
+ path: path64,
117072
117119
  // The Host header names the host whose API this is, not the address dialled: a redirected test dials a loopback stand-in while still speaking to the API host by name, exactly as the forwarded paths present their SNI.
117073
117120
  headers: { ...headers, host: target.servername ?? target.host, ...body === void 0 ? {} : { "content-length": String(Buffer.byteLength(body, "utf8")) } },
117074
117121
  agent,
@@ -117110,9 +117157,9 @@ function realRcStreamDial(target = { host: CONNECT_INTERCEPT_HOST, port: HTTPS_P
117110
117157
  return { status, body: await readAll(response) };
117111
117158
  },
117112
117159
  openStream: async (sessionId, headers, resume, signal) => {
117113
- const path63 = resume === void 0 ? `/v1/code/sessions/${encodeURIComponent(sessionId)}/events/stream` : `/v1/code/sessions/${encodeURIComponent(sessionId)}/events/stream?from_sequence_num=${String(resume.fromSequenceNum)}`;
117160
+ const path64 = resume === void 0 ? `/v1/code/sessions/${encodeURIComponent(sessionId)}/events/stream` : `/v1/code/sessions/${encodeURIComponent(sessionId)}/events/stream?from_sequence_num=${String(resume.fromSequenceNum)}`;
117114
117161
  const streamHeaders = resume === void 0 ? headers : { ...headers, "last-event-id": String(resume.fromSequenceNum) };
117115
- const { status, response } = await request7("GET", path63, streamHeaders, void 0, signal);
117162
+ const { status, response } = await request7("GET", path64, streamHeaders, void 0, signal);
117116
117163
  if (!isSuccessful2(status)) {
117117
117164
  await readAll(response);
117118
117165
  return { status, chunks: NO_CHUNKS };
@@ -117328,40 +117375,8 @@ init_claudeShim();
117328
117375
  init_store();
117329
117376
  init_realPorts();
117330
117377
  var import_node_fs18 = __toESM(require("node:fs"), 1);
117331
- var import_node_path46 = __toESM(require("node:path"), 1);
117332
-
117333
- // src/usage/signIn.ts
117334
- var import_node_path45 = __toESM(require("node:path"), 1);
117335
- var CREDENTIALS_FILE = ".credentials.json";
117336
- function keychainHasItem(run, account) {
117337
- return run.run("security", ["find-generic-password", "-a", account]).status === 0;
117338
- }
117339
- function decideSignIn(facts) {
117340
- if (facts.hasCredentialBlock) {
117341
- return { state: "token", detail: "supplies its own credential through a credential block, so a stored login is not what a launch uses" };
117342
- }
117343
- if (facts.keychainItem === true) {
117344
- return { state: "signed-in", detail: "a login is stored in the macOS Keychain" };
117345
- }
117346
- if (facts.credentialsFile) {
117347
- return { state: "signed-in", detail: `a login is stored in ${CREDENTIALS_FILE}` };
117348
- }
117349
- return { state: "signed-out", detail: facts.platform === "darwin" ? `no Keychain item and no ${CREDENTIALS_FILE}` : `no ${CREDENTIALS_FILE}` };
117350
- }
117351
- function credentialsFilePath(farmRoot) {
117352
- return import_node_path45.default.join(farmRoot, CREDENTIALS_FILE);
117353
- }
117354
- function identitySignIn(fs25, probe, identity) {
117355
- const probing = !identity.hasCredentialBlock;
117356
- return decideSignIn({
117357
- hasCredentialBlock: identity.hasCredentialBlock,
117358
- keychainItem: probing && probe.platform === "darwin" && probe.run !== void 0 ? keychainHasItem(probe.run, identity.farmRoot) : void 0,
117359
- credentialsFile: probing && fs25.lstat(credentialsFilePath(identity.farmRoot)) !== void 0,
117360
- platform: probe.platform
117361
- });
117362
- }
117363
-
117364
- // src/doctorReport.ts
117378
+ var import_node_path47 = __toESM(require("node:path"), 1);
117379
+ init_signIn();
117365
117380
  init_load();
117366
117381
  init_unrecognisedKeys();
117367
117382
  init_schema();
@@ -117591,7 +117606,7 @@ function tcpPortEraRecord(raw) {
117591
117606
  return (has("port") || has("lastPort")) && !has("socketPath");
117592
117607
  }
117593
117608
  function pushPathResolution(push, resolution) {
117594
- const ownDir = import_node_path46.default.dirname(resolution.ownExecutablePath);
117609
+ const ownDir = import_node_path47.default.dirname(resolution.ownExecutablePath);
117595
117610
  switch (resolution.agentShim.status) {
117596
117611
  case "ok":
117597
117612
  push("path-resolution", "pass", `\`agent-shim\` on PATH resolves to this running executable, ${resolution.ownExecutablePath}.`, "agent-shim");
@@ -117693,14 +117708,14 @@ function pushProvider(push, entry, cacheEnv, signIn) {
117693
117708
  }
117694
117709
  function pushLegacyName(push, params) {
117695
117710
  const legacyVariables = Object.keys(params.env).filter((name) => name.startsWith(LEGACY_ENV_PREFIX) && params.env[name] !== void 0).sort();
117696
- if (legacyVariables.length === 0 && import_node_path46.default.basename(params.rootPath) !== LEGACY_HOME_DIRNAME) {
117711
+ if (legacyVariables.length === 0 && import_node_path47.default.basename(params.rootPath) !== LEGACY_HOME_DIRNAME) {
117697
117712
  push("legacy-name", "pass", "Nothing here still uses the former `claude-use` name.");
117698
117713
  return;
117699
117714
  }
117700
117715
  for (const name of legacyVariables) {
117701
117716
  push("legacy-name", "warn", `${name} is the former name of ${name.replace(LEGACY_ENV_PREFIX, ENV_PREFIX)}. Rename it; the old name still works but is only a fallback.`, name);
117702
117717
  }
117703
- if (import_node_path46.default.basename(params.rootPath) === LEGACY_HOME_DIRNAME) {
117718
+ if (import_node_path47.default.basename(params.rootPath) === LEGACY_HOME_DIRNAME) {
117704
117719
  push(
117705
117720
  "legacy-name",
117706
117721
  "warn",
@@ -118084,18 +118099,18 @@ function collectDoctorReport(params) {
118084
118099
  const { paths } = params;
118085
118100
  const identityNames = import_node_fs18.default.existsSync(paths.identitiesDir) ? import_node_fs18.default.readdirSync(paths.identitiesDir, { withFileTypes: true }).filter((entry) => entry.isDirectory() && isIdentityDirectoryName(entry.name)).map((entry) => entry.name).sort() : [];
118086
118101
  const identities = identityNames.map((name) => {
118087
- const farmRoot = import_node_path46.default.join(paths.identitiesDir, name);
118088
- const identityPath = import_node_path46.default.join(farmRoot, "identity.json");
118102
+ const farmRoot = import_node_path47.default.join(paths.identitiesDir, name);
118103
+ const identityPath = import_node_path47.default.join(farmRoot, "identity.json");
118089
118104
  return { name, path: identityPath, raw: realFsPort.readFileUtf8(identityPath), farmRoot, credentialsFilePresent: import_node_fs18.default.existsSync(credentialsFilePath(farmRoot)) };
118090
118105
  });
118091
118106
  const profileNames = import_node_fs18.default.existsSync(paths.configProfilesDir) ? import_node_fs18.default.readdirSync(paths.configProfilesDir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => entry.name.slice(0, -".json".length)).sort() : [];
118092
118107
  const configProfiles = profileNames.map((name) => {
118093
- const profilePath = import_node_path46.default.join(paths.configProfilesDir, `${name}.json`);
118108
+ const profilePath = import_node_path47.default.join(paths.configProfilesDir, `${name}.json`);
118094
118109
  return { name, path: profilePath, raw: realFsPort.readFileUtf8(profilePath) };
118095
118110
  });
118096
118111
  const providerNames = import_node_fs18.default.existsSync(paths.providersDir) ? import_node_fs18.default.readdirSync(paths.providersDir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => entry.name.slice(0, -".json".length)).sort() : [];
118097
118112
  const providers = providerNames.map((name) => {
118098
- const providerPath = import_node_path46.default.join(paths.providersDir, `${name}.json`);
118113
+ const providerPath = import_node_path47.default.join(paths.providersDir, `${name}.json`);
118099
118114
  return { name, path: providerPath, raw: realFsPort.readFileUtf8(providerPath) };
118100
118115
  });
118101
118116
  const ownExecutablePath = realOwnExecutablePath();
@@ -118107,12 +118122,12 @@ function collectDoctorReport(params) {
118107
118122
  binaryDiscovery = { ok: false, message: error63 instanceof Error ? error63.message : String(error63) };
118108
118123
  }
118109
118124
  const shimState = readJson(paths.claudeShimFile, ClaudeShimStateSchema);
118110
- const pathDirs = (params.env.PATH ?? "").split(import_node_path46.default.delimiter).filter((dir) => dir !== "");
118125
+ const pathDirs = (params.env.PATH ?? "").split(import_node_path47.default.delimiter).filter((dir) => dir !== "");
118111
118126
  const claudeShimShadow = shimState === void 0 ? void 0 : refinePathShadow(
118112
118127
  findPathShadow({
118113
118128
  pathDirs,
118114
- targetDir: import_node_path46.default.dirname(shimState.targetPath),
118115
- targetFilename: import_node_path46.default.basename(shimState.targetPath),
118129
+ targetDir: import_node_path47.default.dirname(shimState.targetPath),
118130
+ targetFilename: import_node_path47.default.basename(shimState.targetPath),
118116
118131
  findExecutableInDir
118117
118132
  }),
118118
118133
  shimState.targetPath,
@@ -118145,7 +118160,7 @@ function collectDoctorReport(params) {
118145
118160
  agentShim: refinePathShadow(
118146
118161
  findPathShadow({
118147
118162
  pathDirs,
118148
- targetDir: import_node_path46.default.dirname(ownExecutablePath),
118163
+ targetDir: import_node_path47.default.dirname(ownExecutablePath),
118149
118164
  targetFilename: commandFilename(ownExecutablePath, "agent-shim"),
118150
118165
  findExecutableInDir
118151
118166
  }),
@@ -118417,11 +118432,11 @@ function tryOrUndefined(fn2) {
118417
118432
  return void 0;
118418
118433
  }
118419
118434
  }
118420
- function pathToHttpPath(path63) {
118421
- return `/${path63.map(safeEncodeURIComponent).join("/")}`;
118435
+ function pathToHttpPath(path64) {
118436
+ return `/${path64.map(safeEncodeURIComponent).join("/")}`;
118422
118437
  }
118423
- function normalizeHttpPath(path63) {
118424
- const paths = path63.split("/");
118438
+ function normalizeHttpPath(path64) {
118439
+ const paths = path64.split("/");
118425
118440
  if (paths.at(0) === "") {
118426
118441
  paths.shift();
118427
118442
  }
@@ -118606,9 +118621,9 @@ function isPlainObject2(value2) {
118606
118621
  function getOwn(object3, key) {
118607
118622
  return Object.hasOwn(object3, key) ? object3[key] : void 0;
118608
118623
  }
118609
- function get(object3, path63) {
118624
+ function get(object3, path64) {
118610
118625
  let current = object3;
118611
- for (const key of path63) {
118626
+ for (const key of path64) {
118612
118627
  if (!isTypescriptObject(current)) {
118613
118628
  return void 0;
118614
118629
  }
@@ -119831,7 +119846,7 @@ function resolveClientRest(rest) {
119831
119846
  // rest[1] can be undefined if all fields of FriendlyClientOptions are optional
119832
119847
  ];
119833
119848
  }
119834
- function createORPCClient(link, { path: path63 = [], ...options } = {}) {
119849
+ function createORPCClient(link, { path: path64 = [], ...options } = {}) {
119835
119850
  const procedureClient = (...rest) => {
119836
119851
  const [input2, callOptions] = resolveClientRest(rest);
119837
119852
  const interceptors = [
@@ -119840,7 +119855,7 @@ function createORPCClient(link, { path: path63 = [], ...options } = {}) {
119840
119855
  ];
119841
119856
  return intercept(
119842
119857
  interceptors,
119843
- { ...callOptions, input: input2, path: path63 },
119858
+ { ...callOptions, input: input2, path: path64 },
119844
119859
  ({ path: path210, input: input22, ...callOptions2 }) => link.call(path210, input22, callOptions2)
119845
119860
  );
119846
119861
  };
@@ -119854,7 +119869,7 @@ function createORPCClient(link, { path: path63 = [], ...options } = {}) {
119854
119869
  if (client === void 0) {
119855
119870
  client = createORPCClient(link, {
119856
119871
  ...options,
119857
- path: [...path63, key],
119872
+ path: [...path64, key],
119858
119873
  scoped: options.scoped?.[key]
119859
119874
  });
119860
119875
  cache.set(key, client);
@@ -119876,24 +119891,24 @@ var BracketNotationSerializer = class {
119876
119891
  this.internalSerialize(data, "", true, result);
119877
119892
  return result;
119878
119893
  }
119879
- internalSerialize(data, path63, isRoot, result) {
119894
+ internalSerialize(data, path64, isRoot, result) {
119880
119895
  if (Array.isArray(data)) {
119881
119896
  data.forEach((item, i10) => {
119882
- this.internalSerialize(item, isRoot ? i10.toString() : `${path63}[${i10}]`, false, result);
119897
+ this.internalSerialize(item, isRoot ? i10.toString() : `${path64}[${i10}]`, false, result);
119883
119898
  });
119884
119899
  } else if (isPlainObject2(data)) {
119885
119900
  for (const key of Object.keys(data)) {
119886
- this.internalSerialize(data[key], isRoot ? key : `${path63}[${key}]`, false, result);
119901
+ this.internalSerialize(data[key], isRoot ? key : `${path64}[${key}]`, false, result);
119887
119902
  }
119888
119903
  } else {
119889
- result.push([path63, data]);
119904
+ result.push([path64, data]);
119890
119905
  }
119891
119906
  }
119892
119907
  deserialize(serialized) {
119893
119908
  const arrayPushStyles = /* @__PURE__ */ new WeakSet();
119894
119909
  const root = new NullProtoObj();
119895
- for (const [path63, value2] of serialized) {
119896
- const segments = this.parsePath(path63);
119910
+ for (const [path64, value2] of serialized) {
119911
+ const segments = this.parsePath(path64);
119897
119912
  let currentRef = root;
119898
119913
  let nextSegment = segments[0];
119899
119914
  for (let i10 = 1; i10 < segments.length; i10++) {
@@ -119944,13 +119959,13 @@ var BracketNotationSerializer = class {
119944
119959
  }
119945
119960
  return result;
119946
119961
  }
119947
- parsePath(path63) {
119962
+ parsePath(path64) {
119948
119963
  const segments = [];
119949
119964
  let inBrackets = false;
119950
119965
  let currentSegment = "";
119951
- for (let i10 = 0; i10 < path63.length; i10++) {
119952
- const char = path63[i10];
119953
- const nextChar = path63[i10 + 1];
119966
+ for (let i10 = 0; i10 < path64.length; i10++) {
119967
+ const char = path64[i10];
119968
+ const nextChar = path64[i10 + 1];
119954
119969
  if (inBrackets && char === "]" && (nextChar === void 0 || nextChar === "[")) {
119955
119970
  if (nextChar === void 0) {
119956
119971
  inBrackets = false;
@@ -119966,7 +119981,7 @@ var BracketNotationSerializer = class {
119966
119981
  currentSegment += char;
119967
119982
  }
119968
119983
  }
119969
- return inBrackets || segments.length === 0 ? [path63] : segments;
119984
+ return inBrackets || segments.length === 0 ? [path64] : segments;
119970
119985
  }
119971
119986
  };
119972
119987
  var INTEGER_PATTERN = /^0$|^[1-9]\d*$/;
@@ -120539,11 +120554,11 @@ var OpenAPISerializer = class {
120539
120554
  return json2;
120540
120555
  }
120541
120556
  const form = new FormData();
120542
- for (const [path63, value22] of this.bracketNotation.serialize(json2)) {
120557
+ for (const [path64, value22] of this.bracketNotation.serialize(json2)) {
120543
120558
  if (value22 instanceof Blob) {
120544
- form.append(path63, value22);
120559
+ form.append(path64, value22);
120545
120560
  } else if (value22 !== void 0 && value22 !== null) {
120546
- form.append(path63, String(value22));
120561
+ form.append(path64, String(value22));
120547
120562
  }
120548
120563
  }
120549
120564
  return form;
@@ -120581,30 +120596,30 @@ function isBodylessMethod(method) {
120581
120596
  return method === "GET" || method === "HEAD";
120582
120597
  }
120583
120598
  var PARAMETER_NAME_REGEX = /^[\w-]+$/;
120584
- function getDynamicPathParams(path63) {
120585
- if (!path63.includes("{")) {
120599
+ function getDynamicPathParams(path64) {
120600
+ if (!path64.includes("{")) {
120586
120601
  return void 0;
120587
120602
  }
120588
- const len = path63.length;
120603
+ const len = path64.length;
120589
120604
  let params;
120590
120605
  let index = 1;
120591
120606
  while (index < len) {
120592
120607
  const segmentStart = index;
120593
- const slashPos = path63.indexOf("/", index);
120608
+ const slashPos = path64.indexOf("/", index);
120594
120609
  const segmentEnd = slashPos === -1 ? len : slashPos;
120595
- if (segmentEnd > segmentStart && path63.charCodeAt(segmentStart) === 123 && path63.charCodeAt(segmentEnd - 1) === 125) {
120610
+ if (segmentEnd > segmentStart && path64.charCodeAt(segmentStart) === 123 && path64.charCodeAt(segmentEnd - 1) === 125) {
120596
120611
  let parameterStart = segmentStart + 1;
120597
120612
  let allowsSlash = false;
120598
- const operator = path63.charCodeAt(parameterStart);
120613
+ const operator = path64.charCodeAt(parameterStart);
120599
120614
  if (operator === 43) {
120600
120615
  allowsSlash = true;
120601
120616
  parameterStart++;
120602
120617
  }
120603
- const parameterName = path63.slice(parameterStart, segmentEnd - 1);
120618
+ const parameterName = path64.slice(parameterStart, segmentEnd - 1);
120604
120619
  if (PARAMETER_NAME_REGEX.test(parameterName)) {
120605
120620
  params ??= [];
120606
120621
  params.push({
120607
- segment: path63.slice(segmentStart, segmentEnd),
120622
+ segment: path64.slice(segmentStart, segmentEnd),
120608
120623
  startIndex: segmentStart,
120609
120624
  parameterName,
120610
120625
  allowsSlash
@@ -120647,8 +120662,8 @@ openapi.method = (method) => ({
120647
120662
  ...openapi({ method }),
120648
120663
  name: "~openapi/method"
120649
120664
  });
120650
- openapi.path = (path63) => ({
120651
- ...openapi({ path: path63 }),
120665
+ openapi.path = (path64) => ({
120666
+ ...openapi({ path: path64 }),
120652
120667
  name: "~openapi/path"
120653
120668
  });
120654
120669
  openapi.spec = (spec) => ({
@@ -121509,22 +121524,22 @@ function visitJsonSchemaRefs(value2, visit2, schemaLevel = true, seen = /* @__PU
121509
121524
  }
121510
121525
  }
121511
121526
  }
121512
- function mapJsonSchemaRefs(value2, map2, schemaLevel = true, path63 = []) {
121527
+ function mapJsonSchemaRefs(value2, map2, schemaLevel = true, path64 = []) {
121513
121528
  if (!value2 || typeof value2 !== "object") {
121514
121529
  return value2;
121515
121530
  }
121516
121531
  if (Array.isArray(value2)) {
121517
- return value2.map((item, index) => mapJsonSchemaRefs(item, map2, schemaLevel, [...path63, index]));
121532
+ return value2.map((item, index) => mapJsonSchemaRefs(item, map2, schemaLevel, [...path64, index]));
121518
121533
  }
121519
121534
  const result = {};
121520
121535
  for (const key of Object.keys(value2)) {
121521
121536
  const val = value2[key];
121522
121537
  if (key === "$ref" && typeof val === "string") {
121523
- setOwn(result, key, map2(val, [...path63, key]));
121538
+ setOwn(result, key, map2(val, [...path64, key]));
121524
121539
  } else if (!schemaLevel) {
121525
- setOwn(result, key, mapJsonSchemaRefs(val, map2, true, [...path63, key]));
121540
+ setOwn(result, key, mapJsonSchemaRefs(val, map2, true, [...path64, key]));
121526
121541
  } else if (JSON_SCHEMA_LOGIC_KEYWORDS.has(key) || JSON_SCHEMA_RECORD_KEYWORDS.has(key)) {
121527
- setOwn(result, key, mapJsonSchemaRefs(val, map2, !JSON_SCHEMA_RECORD_KEYWORDS.has(key), [...path63, key]));
121542
+ setOwn(result, key, mapJsonSchemaRefs(val, map2, !JSON_SCHEMA_RECORD_KEYWORDS.has(key), [...path64, key]));
121528
121543
  } else {
121529
121544
  setOwn(result, key, val);
121530
121545
  }
@@ -122054,7 +122069,7 @@ function unlazy(maybeLazy) {
122054
122069
  function createProcedureClient(lazyableProcedure, ...rest) {
122055
122070
  const options = resolveMaybeOptionalOptions(rest);
122056
122071
  return async (...[input2, callerOptions]) => {
122057
- const path63 = toArray(options.path);
122072
+ const path64 = toArray(options.path);
122058
122073
  const { default: procedure } = await unlazy(lazyableProcedure);
122059
122074
  const clientContext = callerOptions?.context ?? {};
122060
122075
  const context = await value(options.context, clientContext) ?? {};
@@ -122067,7 +122082,7 @@ function createProcedureClient(lazyableProcedure, ...rest) {
122067
122082
  };
122068
122083
  try {
122069
122084
  const output2 = await runWithSpan("call_procedure", (span) => {
122070
- span?.setAttribute("procedure.path", path63);
122085
+ span?.setAttribute("procedure.path", path64);
122071
122086
  return intercept(
122072
122087
  options.interceptors,
122073
122088
  {
@@ -122075,7 +122090,7 @@ function createProcedureClient(lazyableProcedure, ...rest) {
122075
122090
  // input can be optional if it is undefinable
122076
122091
  input: input2,
122077
122092
  errors,
122078
- path: path63,
122093
+ path: path64,
122079
122094
  procedure,
122080
122095
  signal: callerOptions?.signal,
122081
122096
  lastEventId: callerOptions?.lastEventId
@@ -122326,10 +122341,10 @@ function augmentRouter(router, options) {
122326
122341
  }
122327
122342
  return enhanced;
122328
122343
  }
122329
- function getRouter(router, path63) {
122344
+ function getRouter(router, path64) {
122330
122345
  let current = router;
122331
- for (let i10 = 0; i10 < path63.length; i10++) {
122332
- const segment = path63[i10];
122346
+ for (let i10 = 0; i10 < path64.length; i10++) {
122347
+ const segment = path64[i10];
122333
122348
  if (!isTypescriptObject(current)) {
122334
122349
  return void 0;
122335
122350
  }
@@ -122341,7 +122356,7 @@ function getRouter(router, path63) {
122341
122356
  continue;
122342
122357
  }
122343
122358
  const lazied = current;
122344
- const rest = path63.slice(i10);
122359
+ const rest = path64.slice(i10);
122345
122360
  return new Lazy({
122346
122361
  ...lazied["~orpc"],
122347
122362
  async loader() {
@@ -122356,40 +122371,40 @@ function getRouter(router, path63) {
122356
122371
  }
122357
122372
  return current;
122358
122373
  }
122359
- function walkProcedureContractsSync(router, callback, path63 = []) {
122374
+ function walkProcedureContractsSync(router, callback, path64 = []) {
122360
122375
  const lazyResults = [];
122361
- walkProcedureContractsSyncInternal(router, callback, path63.slice(), lazyResults);
122376
+ walkProcedureContractsSyncInternal(router, callback, path64.slice(), lazyResults);
122362
122377
  return lazyResults;
122363
122378
  }
122364
- function walkProcedureContractsSyncInternal(router, callback, path63, lazyResults) {
122379
+ function walkProcedureContractsSyncInternal(router, callback, path64, lazyResults) {
122365
122380
  const hiddenContract = getHiddenRouterContract(router);
122366
122381
  if (hiddenContract !== void 0) {
122367
122382
  router = hiddenContract;
122368
122383
  }
122369
122384
  if (router instanceof ProcedureContract) {
122370
- callback(router, path63.slice());
122385
+ callback(router, path64.slice());
122371
122386
  return;
122372
122387
  }
122373
122388
  if (!isTypescriptObject(router)) {
122374
122389
  return;
122375
122390
  }
122376
122391
  for (const [key, value2] of Object.entries(router)) {
122377
- path63.push(key);
122392
+ path64.push(key);
122378
122393
  if (value2 instanceof Lazy) {
122379
- lazyResults.push({ router: value2, path: path63.slice() });
122394
+ lazyResults.push({ router: value2, path: path64.slice() });
122380
122395
  } else {
122381
- walkProcedureContractsSyncInternal(value2, callback, path63, lazyResults);
122396
+ walkProcedureContractsSyncInternal(value2, callback, path64, lazyResults);
122382
122397
  }
122383
- path63.pop();
122398
+ path64.pop();
122384
122399
  }
122385
122400
  }
122386
- async function walkProcedureContractsAsync(router, callback, path63 = []) {
122401
+ async function walkProcedureContractsAsync(router, callback, path64 = []) {
122387
122402
  const hiddenContract = getHiddenRouterContract(router);
122388
122403
  if (hiddenContract !== void 0) {
122389
122404
  router = hiddenContract;
122390
122405
  }
122391
122406
  if (router instanceof ProcedureContract) {
122392
- await callback(router, path63);
122407
+ await callback(router, path64);
122393
122408
  return;
122394
122409
  }
122395
122410
  if (!isTypescriptObject(router)) {
@@ -122398,9 +122413,9 @@ async function walkProcedureContractsAsync(router, callback, path63 = []) {
122398
122413
  for (const [key, value2] of Object.entries(router)) {
122399
122414
  if (value2 instanceof Lazy) {
122400
122415
  const { default: router2 } = await unlazy(value2);
122401
- await walkProcedureContractsAsync(router2, callback, [...path63, key]);
122416
+ await walkProcedureContractsAsync(router2, callback, [...path64, key]);
122402
122417
  } else {
122403
- await walkProcedureContractsAsync(value2, callback, [...path63, key]);
122418
+ await walkProcedureContractsAsync(value2, callback, [...path64, key]);
122404
122419
  }
122405
122420
  }
122406
122421
  }
@@ -122886,18 +122901,18 @@ function rewriteComponentSchemaRefs(schema, renameMap) {
122886
122901
  }
122887
122902
  var OpenAPIGeneratorError = class extends TypeError {
122888
122903
  };
122889
- function toOpenAPIPath(path63, dynamicPathParams) {
122904
+ function toOpenAPIPath(path64, dynamicPathParams) {
122890
122905
  if (!dynamicPathParams?.length) {
122891
- return path63;
122906
+ return path64;
122892
122907
  }
122893
122908
  let normalized = "";
122894
122909
  let currentIndex = 0;
122895
122910
  for (const param of dynamicPathParams) {
122896
- normalized += path63.slice(currentIndex, param.startIndex);
122911
+ normalized += path64.slice(currentIndex, param.startIndex);
122897
122912
  normalized += `{${param.parameterName}}`;
122898
122913
  currentIndex = param.startIndex + param.segment.length;
122899
122914
  }
122900
- normalized += path63.slice(currentIndex);
122915
+ normalized += path64.slice(currentIndex);
122901
122916
  return normalized;
122902
122917
  }
122903
122918
  function buildRequest(ctx, operation, def, meta3, dynamicPathParams) {
@@ -123331,8 +123346,8 @@ var OpenAPIGenerator = class {
123331
123346
  customErrorResponseBodySchema: options.customErrorResponseBodySchema
123332
123347
  };
123333
123348
  const errors = [];
123334
- await walkProcedureContractsAsync(router, (contract, path63) => {
123335
- if (value(options.filter, contract, path63) === false) {
123349
+ await walkProcedureContractsAsync(router, (contract, path64) => {
123350
+ if (value(options.filter, contract, path64) === false) {
123336
123351
  return;
123337
123352
  }
123338
123353
  try {
@@ -123344,7 +123359,7 @@ var OpenAPIGenerator = class {
123344
123359
  `QUERY operations require OpenAPI 3.2, but version "${version2}" was requested.`
123345
123360
  );
123346
123361
  }
123347
- const postPath = meta3?.path ?? pathToHttpPath(path63);
123362
+ const postPath = meta3?.path ?? pathToHttpPath(path64);
123348
123363
  const httpPath = meta3?.prefix ? mergeHttpPath(meta3.prefix, postPath) : postPath;
123349
123364
  const dynamicPathParams = getDynamicPathParams(httpPath);
123350
123365
  const openApiPath = toOpenAPIPath(httpPath, dynamicPathParams);
@@ -123353,7 +123368,7 @@ var OpenAPIGenerator = class {
123353
123368
  operation = meta3.spec;
123354
123369
  } else {
123355
123370
  operation = {
123356
- operationId: meta3?.operationId ?? path63.join("."),
123371
+ operationId: meta3?.operationId ?? path64.join("."),
123357
123372
  summary: meta3?.summary,
123358
123373
  description: meta3?.description,
123359
123374
  deprecated: meta3?.deprecated,
@@ -123373,7 +123388,7 @@ var OpenAPIGenerator = class {
123373
123388
  if (!(e14 instanceof OpenAPIGeneratorError)) {
123374
123389
  throw e14;
123375
123390
  }
123376
- errors.push(`Procedure at ${path63.join(".") || "(root)"}: ${e14.message}`);
123391
+ errors.push(`Procedure at ${path64.join(".") || "(root)"}: ${e14.message}`);
123377
123392
  }
123378
123393
  });
123379
123394
  if (errors.length) {
@@ -123681,7 +123696,7 @@ var ResetRowSchema = external_exports.strictObject({
123681
123696
  var ResetScheduleSchema = external_exports.strictObject({ resets: external_exports.readonly(external_exports.array(ResetRowSchema)) });
123682
123697
 
123683
123698
  // src/frontdoor/controlSchemas.ts
123684
- var import_node_path47 = __toESM(require("node:path"), 1);
123699
+ var import_node_path48 = __toESM(require("node:path"), 1);
123685
123700
  init_zod();
123686
123701
  init_schema2();
123687
123702
 
@@ -123893,11 +123908,11 @@ var FrontDoorSessionsOutputSchema = external_exports.strictObject({ sessions: ex
123893
123908
  var CheckRunInputSchema = external_exports.strictObject({
123894
123909
  path: external_exports.string().min(1),
123895
123910
  identity: external_exports.string().min(1).optional()
123896
- }).refine((input2) => import_node_path47.default.isAbsolute(input2.path), { message: "path must be absolute: the door cannot resolve a relative path against the caller's working directory" });
123911
+ }).refine((input2) => import_node_path48.default.isAbsolute(input2.path), { message: "path must be absolute: the door cannot resolve a relative path against the caller's working directory" });
123897
123912
  var PoolPickInputSchema = external_exports.strictObject({
123898
123913
  pool: external_exports.string().min(1),
123899
123914
  path: external_exports.string().min(1)
123900
- }).refine((input2) => import_node_path47.default.isAbsolute(input2.path), { message: "path must be absolute: the door cannot resolve a relative path against the caller's working directory" });
123915
+ }).refine((input2) => import_node_path48.default.isAbsolute(input2.path), { message: "path must be absolute: the door cannot resolve a relative path against the caller's working directory" });
123901
123916
  var DoctorFindingSchema = external_exports.strictObject({
123902
123917
  section: external_exports.enum(DOCTOR_SECTIONS),
123903
123918
  subject: external_exports.string().optional(),
@@ -124218,16 +124233,16 @@ var StandardLink = class {
124218
124233
  /**
124219
124234
  * @throws ORPCError, transport-level errors (network failures, timeouts, etc.)
124220
124235
  */
124221
- call(path63, input2, options) {
124222
- return runWithSpan(`${ORPC_NAME}.${path63.join("/")}`, (span) => {
124236
+ call(path64, input2, options) {
124237
+ return runWithSpan(`${ORPC_NAME}.${path64.join("/")}`, (span) => {
124223
124238
  span?.setAttribute("rpc.system", ORPC_NAME);
124224
- span?.setAttribute("rpc.method", path63.join("."));
124239
+ span?.setAttribute("rpc.method", path64.join("."));
124225
124240
  if (getTracer() && isAsyncIteratorObject(input2)) {
124226
124241
  input2 = override(input2, traceAsyncIterator("consume_async_iterator_object_input", input2));
124227
124242
  } else if (getTracer() && input2 instanceof ReadableStream) {
124228
124243
  input2 = override(input2, traceReadableStream("consume_octet_stream_input", input2));
124229
124244
  }
124230
- return intercept(this.interceptors, { ...options, path: path63, input: input2 }, async ({ path: path210, input: input22, ...options2 }) => {
124245
+ return intercept(this.interceptors, { ...options, path: path64, input: input2 }, async ({ path: path210, input: input22, ...options2 }) => {
124231
124246
  const tracer = getTracer();
124232
124247
  const activeSpan = tracer?.getActiveSpan() ?? span;
124233
124248
  let request7 = await runWithSpan(
@@ -124284,18 +124299,18 @@ var RPCLinkCodec = class {
124284
124299
  this.headers = options.headers ?? {};
124285
124300
  this.serializer = options.serializer ?? new RPCSerializer();
124286
124301
  }
124287
- async encodeInput(input2, path63, options) {
124288
- let headers = toResolvedStandardHeaders(await value(this.headers, options, path63, input2));
124302
+ async encodeInput(input2, path64, options) {
124303
+ let headers = toResolvedStandardHeaders(await value(this.headers, options, path64, input2));
124289
124304
  if (options.lastEventId !== void 0) {
124290
124305
  headers = mergeStandardHeaders(headers, { "last-event-id": options.lastEventId });
124291
124306
  }
124292
- const expectedMethod = await value(this.expectedMethod, options, path63, input2);
124293
- const baseUrl = await value(this.baseUrl, options, path63, input2);
124307
+ const expectedMethod = await value(this.expectedMethod, options, path64, input2);
124308
+ const baseUrl = await value(this.baseUrl, options, path64, input2);
124294
124309
  const [pathname, search, hash2] = parseStandardUrl(baseUrl);
124295
- const newPathname = `${pathname.replace(END_SLASH_REGEX, "")}${pathToHttpPath(path63)}`;
124310
+ const newPathname = `${pathname.replace(END_SLASH_REGEX, "")}${pathToHttpPath(path64)}`;
124296
124311
  const serialized = this.serializer.serialize(input2);
124297
124312
  if (expectedMethod === "GET" && !(serialized instanceof Blob) && !(serialized instanceof ReadableStream) && !(serialized instanceof FormData) && !isAsyncIteratorObject(serialized)) {
124298
- const maxUrlLength = await value(this.maxUrlLength, options, path63, input2);
124313
+ const maxUrlLength = await value(this.maxUrlLength, options, path64, input2);
124299
124314
  const mergedSearch = new URLSearchParams(search);
124300
124315
  mergedSearch.append("data", stringifyJSON(serialized) ?? "");
124301
124316
  const url22 = `${newPathname}?${mergedSearch}${hash2 ?? ""}`;
@@ -124380,8 +124395,8 @@ var FetchLinkTransport = class {
124380
124395
  this.fetch = options.fetch ?? ((url2, init) => globalThis.fetch(url2, init));
124381
124396
  this.toFetchRequestOptions = options.toFetchRequest;
124382
124397
  }
124383
- async send(standardRequest, path63, options) {
124384
- let origin = await value(this.origin, options, path63);
124398
+ async send(standardRequest, path64, options) {
124399
+ let origin = await value(this.origin, options, path64);
124385
124400
  if (origin?.endsWith("/")) {
124386
124401
  origin = origin.slice(0, -1);
124387
124402
  }
@@ -124401,7 +124416,7 @@ var FetchLinkTransport = class {
124401
124416
  }
124402
124417
  }
124403
124418
  const fetch3 = this.fetch;
124404
- const response = await fetch3(url2, init, options, path63);
124419
+ const response = await fetch3(url2, init, options, path64);
124405
124420
  const standardResponse = toStandardLazyResponse(response);
124406
124421
  return standardResponse;
124407
124422
  }
@@ -124792,14 +124807,14 @@ var StandardHandler = class {
124792
124807
  span?.setAttribute("url.path", request22.url);
124793
124808
  return { matched: false };
124794
124809
  }
124795
- const { path: path63, procedure, decodeInput } = matchedOrNot;
124796
- span?.updateName(`${ORPC_NAME}.${path63.join("/")}`);
124810
+ const { path: path64, procedure, decodeInput } = matchedOrNot;
124811
+ span?.updateName(`${ORPC_NAME}.${path64.join("/")}`);
124797
124812
  span?.setAttribute("rpc.system", ORPC_NAME);
124798
- span?.setAttribute("rpc.method", path63.join("."));
124813
+ span?.setAttribute("rpc.method", path64.join("."));
124799
124814
  try {
124800
124815
  const response = await intercept(
124801
124816
  this.interceptors,
124802
- { context: context2, prefix: prefix2, request: request22, path: path63, procedure, decodeInput },
124817
+ { context: context2, prefix: prefix2, request: request22, path: path64, procedure, decodeInput },
124803
124818
  async ({ context: context3, prefix: prefix3, request: request32, path: path210, procedure: procedure2, decodeInput: decodeInput2 }) => {
124804
124819
  step2 = "decode_input";
124805
124820
  let input2 = await runWithSpan("decode_input", decodeInput2);
@@ -124833,7 +124848,7 @@ var StandardHandler = class {
124833
124848
  message: `Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.`,
124834
124849
  cause: e14
124835
124850
  }) : toORPCError(e14);
124836
- const response = await this.codec.encodeError(error63, procedure, path63, { context: context2, prefix: prefix2 });
124851
+ const response = await this.codec.encodeError(error63, procedure, path64, { context: context2, prefix: prefix2 });
124837
124852
  return { matched: true, response };
124838
124853
  }
124839
124854
  }
@@ -124939,7 +124954,7 @@ var RPCMatcher = class {
124939
124954
  this.rootRouter = router;
124940
124955
  this.index(router);
124941
124956
  }
124942
- index(router, path63 = []) {
124957
+ index(router, path64 = []) {
124943
124958
  const lazyResults = walkProcedureContractsSync(router, (procedure, procedurePath) => {
124944
124959
  if (!value(this.filter, procedure, procedurePath)) {
124945
124960
  return;
@@ -124950,7 +124965,7 @@ var RPCMatcher = class {
124950
124965
  // contract-first entries have no implementation yet, resolveProcedure fills it in on demand
124951
124966
  procedure: procedure instanceof Procedure ? procedure : void 0
124952
124967
  });
124953
- }, path63);
124968
+ }, path64);
124954
124969
  for (const result of lazyResults) {
124955
124970
  this.pendingLazyRouters.set(pathToHttpPath(result.path), result);
124956
124971
  }
@@ -125082,10 +125097,10 @@ var RPCHandlerCodec = class {
125082
125097
  }
125083
125098
  };
125084
125099
  }
125085
- encodeOutput(output2, procedure, path63, options) {
125100
+ encodeOutput(output2, procedure, path64, options) {
125086
125101
  return {
125087
125102
  headers: {},
125088
- status: value(this.outputStatus, output2, procedure, path63, options) ?? DEFAULT_SUCCESS_STATUS,
125103
+ status: value(this.outputStatus, output2, procedure, path64, options) ?? DEFAULT_SUCCESS_STATUS,
125089
125104
  body: this.serializer.serialize(output2)
125090
125105
  };
125091
125106
  }
@@ -125139,39 +125154,39 @@ function createRouter() {
125139
125154
  static: new NullProtoObj2()
125140
125155
  };
125141
125156
  }
125142
- function scanFirstGroup(path63) {
125157
+ function scanFirstGroup(path64) {
125143
125158
  let i10 = 0;
125144
125159
  let depth = 0;
125145
- for (; i10 < path63.length; i10++) {
125146
- const c10 = path63.charCodeAt(i10);
125160
+ for (; i10 < path64.length; i10++) {
125161
+ const c10 = path64.charCodeAt(i10);
125147
125162
  if (c10 === 92) i10++;
125148
125163
  else if (c10 === 40) depth++;
125149
125164
  else if (c10 === 41 && depth > 0) depth--;
125150
125165
  else if (c10 === 123 && depth === 0) break;
125151
125166
  }
125152
- if (i10 >= path63.length) return;
125167
+ if (i10 >= path64.length) return;
125153
125168
  let j10 = i10 + 1;
125154
125169
  depth = 0;
125155
- for (; j10 < path63.length; j10++) {
125156
- const c10 = path63.charCodeAt(j10);
125170
+ for (; j10 < path64.length; j10++) {
125171
+ const c10 = path64.charCodeAt(j10);
125157
125172
  if (c10 === 92) j10++;
125158
125173
  else if (c10 === 40) depth++;
125159
125174
  else if (c10 === 41 && depth > 0) depth--;
125160
125175
  else if (c10 === 125 && depth === 0) break;
125161
125176
  }
125162
- if (j10 >= path63.length) return;
125163
- const mod = path63[j10 + 1];
125177
+ if (j10 >= path64.length) return;
125178
+ const mod = path64[j10 + 1];
125164
125179
  const hasMod = mod === "?" || mod === "+" || mod === "*";
125165
125180
  return [
125166
- path63.slice(0, i10),
125167
- path63.slice(i10 + 1, j10),
125168
- path63.slice(j10 + (hasMod ? 2 : 1)),
125181
+ path64.slice(0, i10),
125182
+ path64.slice(i10 + 1, j10),
125183
+ path64.slice(j10 + (hasMod ? 2 : 1)),
125169
125184
  hasMod ? mod : void 0
125170
125185
  ];
125171
125186
  }
125172
- function expandGroupDelimiters(path63) {
125173
- if (!path63.includes("{")) return;
125174
- const group = scanFirstGroup(path63);
125187
+ function expandGroupDelimiters(path64) {
125188
+ if (!path64.includes("{")) return;
125189
+ const group = scanFirstGroup(path64);
125175
125190
  if (!group) return;
125176
125191
  const [pre2, body, suf, mod] = group;
125177
125192
  if (!mod) return [pre2 + body + suf];
@@ -125241,9 +125256,9 @@ function replaceSegmentWildcards(segment, unnamedStart, toGroupKey = toUnnamedGr
125241
125256
  }
125242
125257
  return [replaced, nextIndex];
125243
125258
  }
125244
- function encodeEscapes(path63) {
125245
- if (!path63.includes("\\")) return path63;
125246
- return path63.replace(/\\([:(){}])/g, (_, c10) => "\uFFFD" + "ABCDE"[":(){}".indexOf(c10)]);
125259
+ function encodeEscapes(path64) {
125260
+ if (!path64.includes("\\")) return path64;
125261
+ return path64.replace(/\\([:(){}])/g, (_, c10) => "\uFFFD" + "ABCDE"[":(){}".indexOf(c10)]);
125247
125262
  }
125248
125263
  function segmentKey(segment) {
125249
125264
  if (segment.startsWith("**")) return 2;
@@ -125272,22 +125287,22 @@ function expandModifiers(segments) {
125272
125287
  return m10[2] === "+" ? [wc2] : [wc2, without];
125273
125288
  }
125274
125289
  }
125275
- function normalizePath(path63) {
125276
- if (!path63.includes("/.")) return path63;
125290
+ function normalizePath(path64) {
125291
+ if (!path64.includes("/.")) return path64;
125277
125292
  const r10 = [];
125278
- for (const s of path63.split("/")) if (s === ".") continue;
125293
+ for (const s of path64.split("/")) if (s === ".") continue;
125279
125294
  else if (s === ".." && r10.length > 1) r10.pop();
125280
125295
  else r10.push(s);
125281
125296
  return r10.join("/") || "/";
125282
125297
  }
125283
- function splitPath(path63) {
125284
- const s = path63.split("/");
125298
+ function splitPath(path64) {
125299
+ const s = path64.split("/");
125285
125300
  s.shift();
125286
125301
  if (s[s.length - 1] === "") s.pop();
125287
125302
  return s;
125288
125303
  }
125289
- function splitRoute(path63) {
125290
- const s = splitPath(path63);
125304
+ function splitRoute(path64) {
125305
+ const s = splitPath(path64);
125291
125306
  while (s[s.length - 1] === "") s.pop();
125292
125307
  return s;
125293
125308
  }
@@ -125303,16 +125318,16 @@ function getMatchParams(segments, paramsMap) {
125303
125318
  }
125304
125319
  return params;
125305
125320
  }
125306
- function addRoute(ctx, method = "", path63, data) {
125321
+ function addRoute(ctx, method = "", path64, data) {
125307
125322
  method = method.toUpperCase();
125308
- if (path63.charCodeAt(0) !== 47) path63 = `/${path63}`;
125309
- const groupExpanded = expandGroupDelimiters(path63);
125323
+ if (path64.charCodeAt(0) !== 47) path64 = `/${path64}`;
125324
+ const groupExpanded = expandGroupDelimiters(path64);
125310
125325
  if (groupExpanded) {
125311
125326
  for (const expandedPath of groupExpanded) addRoute(ctx, method, expandedPath, data);
125312
125327
  return;
125313
125328
  }
125314
- path63 = encodeEscapes(path63);
125315
- const segments = splitRoute(path63);
125329
+ path64 = encodeEscapes(path64);
125330
+ const segments = splitRoute(path64);
125316
125331
  const expanded = expandModifiers(segments);
125317
125332
  if (expanded) {
125318
125333
  for (const p of expanded) addRoute(ctx, method, p, data);
@@ -125403,15 +125418,15 @@ function getParamRegexp(segment, unnamedStart = 0) {
125403
125418
  const regex = _s2.replace(/:([\w-]+)(?:\(([^)]*)\))?/g, (_, id2, p) => `(?<${toGroupName(id2)}>${p || "[^/]+"})`).replace(/\((?![?<])/g, () => `(?<${toUnnamedGroupKey(_i2++)}>`).replace(/\uFFFE(.)/g, (_, c10) => /[.*+?^${}()|[\]\\]/.test(c10) ? `\\${c10}` : c10);
125404
125419
  return [new RegExp(`^${regex}$`), _i2];
125405
125420
  }
125406
- function findRoute(ctx, method = "", path63, opts) {
125407
- if (opts?.normalize) path63 = normalizePath(path63);
125408
- if (path63.charCodeAt(path63.length - 1) === 47) path63 = path63.slice(0, -1);
125409
- const staticNode = ctx.static[path63];
125421
+ function findRoute(ctx, method = "", path64, opts) {
125422
+ if (opts?.normalize) path64 = normalizePath(path64);
125423
+ if (path64.charCodeAt(path64.length - 1) === 47) path64 = path64.slice(0, -1);
125424
+ const staticNode = ctx.static[path64];
125410
125425
  if (staticNode && staticNode.methods) {
125411
125426
  const staticMatch = staticNode.methods[method] || staticNode.methods[""];
125412
125427
  if (staticMatch !== void 0) return staticMatch[0];
125413
125428
  }
125414
- const segments = splitPath(path63);
125429
+ const segments = splitPath(path64);
125415
125430
  const match = _lookupTree(ctx.root, method, segments, 0);
125416
125431
  if (match === void 0) return;
125417
125432
  if (opts?.params === false) return match;
@@ -125611,7 +125626,7 @@ var OpenAPIMatcher = class {
125611
125626
  this.rootRouter = router;
125612
125627
  this.index(router);
125613
125628
  }
125614
- index(router, path63 = []) {
125629
+ index(router, path64 = []) {
125615
125630
  const lazyResults = walkProcedureContractsSync(router, (contract, path210) => {
125616
125631
  if (!value(this.filter, contract, path210)) {
125617
125632
  return;
@@ -125626,7 +125641,7 @@ var OpenAPIMatcher = class {
125626
125641
  contract,
125627
125642
  procedure: contract instanceof Procedure ? contract : void 0
125628
125643
  });
125629
- }, path63);
125644
+ }, path64);
125630
125645
  for (const result of lazyResults) {
125631
125646
  const prefix = getOpenAPIMeta(result.router)?.prefix;
125632
125647
  this.pendingLazyRouters.add({
@@ -125713,20 +125728,20 @@ var OpenAPIMatcher = class {
125713
125728
  return entry.procedure;
125714
125729
  }
125715
125730
  };
125716
- function toRou3Pattern(path63) {
125717
- const params = getDynamicPathParams(path63);
125731
+ function toRou3Pattern(path64) {
125732
+ const params = getDynamicPathParams(path64);
125718
125733
  if (!params?.length) {
125719
- return path63;
125734
+ return path64;
125720
125735
  }
125721
125736
  for (let i10 = params.length - 1; i10 >= 0; i10--) {
125722
125737
  const param = params[i10];
125723
125738
  const pattern = param.allowsSlash ? `**:${param.parameterName}` : `:${param.parameterName}`;
125724
- path63 = path63.slice(0, param.startIndex) + pattern + path63.slice(param.startIndex + param.segment.length);
125739
+ path64 = path64.slice(0, param.startIndex) + pattern + path64.slice(param.startIndex + param.segment.length);
125725
125740
  }
125726
- return path63;
125741
+ return path64;
125727
125742
  }
125728
- function toRou3PrefixMatcher(path63) {
125729
- const pattern = toRou3Pattern(path63);
125743
+ function toRou3PrefixMatcher(path64) {
125744
+ const pattern = toRou3Pattern(path64);
125730
125745
  return routeToRegExp(pattern === "/" ? "/**" : `${pattern}/**`);
125731
125746
  }
125732
125747
  function decodeParams(params) {
@@ -125805,7 +125820,7 @@ var OpenAPIHandlerCodecCore = class {
125805
125820
  /**
125806
125821
  * @throws {TypeError} If `outputStructure` is "detailed" and the output doesn't match the expected structure.
125807
125822
  */
125808
- encodeOutput(output2, procedure, path63) {
125823
+ encodeOutput(output2, procedure, path64) {
125809
125824
  const meta3 = getOpenAPIMeta(procedure);
125810
125825
  const successStatus = meta3?.successStatus ?? DEFAULT_SUCCESS_STATUS;
125811
125826
  const outputStructure = meta3?.outputStructure ?? DEFAULT_OPENAPI_OUTPUT_STRUCTURE;
@@ -125818,7 +125833,7 @@ var OpenAPIHandlerCodecCore = class {
125818
125833
  }
125819
125834
  if (!isValidDetailedOutput(output2)) {
125820
125835
  throw new TypeError(`
125821
- Invalid "detailed" output structure returned by procedure (${path63.join(".")}):
125836
+ Invalid "detailed" output structure returned by procedure (${path64.join(".")}):
125822
125837
  \u2022 Expected an object with optional properties:
125823
125838
  - status (number <400)
125824
125839
  - headers (object)
@@ -126377,7 +126392,7 @@ function profileValue(name, paths) {
126377
126392
  function createConfigApiRouter(deps) {
126378
126393
  const authed = doorApiAuth(deps.expectedToken);
126379
126394
  const { paths } = deps;
126380
- const route = (path63, summary) => authed.meta(openapi({ method: "POST", path: path63, summary, tags: [CONFIG_API_TAG] }));
126395
+ const route = (path64, summary) => authed.meta(openapi({ method: "POST", path: path64, summary, tags: [CONFIG_API_TAG] }));
126381
126396
  return {
126382
126397
  config: {
126383
126398
  identity: {
@@ -126731,7 +126746,7 @@ function createLifecycleApiRouter(deps) {
126731
126746
  init_cliError();
126732
126747
 
126733
126748
  // src/frontdoor/launchSchemas.ts
126734
- var import_node_path48 = __toESM(require("node:path"), 1);
126749
+ var import_node_path49 = __toESM(require("node:path"), 1);
126735
126750
  init_zod();
126736
126751
  init_claudeVersion();
126737
126752
  init_identity();
@@ -126741,7 +126756,7 @@ var LaunchResolveInputSchema = external_exports.strictObject({
126741
126756
  argv: external_exports.readonly(external_exports.array(external_exports.string())).optional(),
126742
126757
  /** The launch's inherited environment. Absent means an empty one: the door's own environment is never a substitute for the caller's, so a caller that wants `AGENT_SHIM_*` switches or a `CLAUDE_CONFIG_DIR` considered names them here. Values are read, never reported. */
126743
126758
  env: external_exports.record(external_exports.string(), external_exports.string()).optional()
126744
- }).refine((input2) => import_node_path48.default.isAbsolute(input2.path), { message: "path must be absolute: the door cannot resolve a relative path against the caller's working directory" });
126759
+ }).refine((input2) => import_node_path49.default.isAbsolute(input2.path), { message: "path must be absolute: the door cannot resolve a relative path against the caller's working directory" });
126745
126760
  var LaunchPoolDecisionSchema = external_exports.strictObject({
126746
126761
  name: external_exports.string(),
126747
126762
  reasons: external_exports.readonly(external_exports.array(external_exports.string())),
@@ -127179,7 +127194,7 @@ var import_consumers = require("node:stream/consumers");
127179
127194
  init_route();
127180
127195
 
127181
127196
  // src/frontdoor/lineage.ts
127182
- var import_node_crypto19 = require("node:crypto");
127197
+ var import_node_crypto20 = require("node:crypto");
127183
127198
  var CACHE_MARKER_KEY = '"cache_control"';
127184
127199
  var THREAD_MEMBER_KEYS = /* @__PURE__ */ new Set(['"model"', '"system"', '"tools"']);
127185
127200
  var MESSAGES_KEY = '"messages"';
@@ -127256,8 +127271,8 @@ function nextToken(body, from) {
127256
127271
  return SCALAR;
127257
127272
  }
127258
127273
  function walk(body, hashing, parentAfter) {
127259
- const thread = (0, import_node_crypto19.createHash)("sha256");
127260
- const messages = (0, import_node_crypto19.createHash)("sha256");
127274
+ const thread = (0, import_node_crypto20.createHash)("sha256");
127275
+ const messages = (0, import_node_crypto20.createHash)("sha256");
127261
127276
  let parentDigest;
127262
127277
  let elements = 0;
127263
127278
  let depth = 0;
@@ -127378,7 +127393,7 @@ function lineageOf(body) {
127378
127393
  }
127379
127394
  const parentAfter = counted.elements > MESSAGES_PER_TURN ? counted.elements - MESSAGES_PER_TURN : void 0;
127380
127395
  const hashed = walk(body, true, parentAfter);
127381
- const combine = (messagesDigest) => (0, import_node_crypto19.createHash)("sha256").update(hashed.threadDigest).update(messagesDigest).digest("hex");
127396
+ const combine = (messagesDigest) => (0, import_node_crypto20.createHash)("sha256").update(hashed.threadDigest).update(messagesDigest).digest("hex");
127382
127397
  return { ownKey: combine(hashed.messagesDigest), parentKey: hashed.parentDigest === void 0 ? void 0 : combine(hashed.parentDigest) };
127383
127398
  }
127384
127399
 
@@ -127763,7 +127778,7 @@ init_load();
127763
127778
  init_schema();
127764
127779
 
127765
127780
  // src/codex/translate.ts
127766
- var import_node_crypto20 = require("node:crypto");
127781
+ var import_node_crypto21 = require("node:crypto");
127767
127782
  init_schema();
127768
127783
 
127769
127784
  // src/codex/anthropic.ts
@@ -127878,7 +127893,7 @@ function shortToolName(name, names) {
127878
127893
  if (name.length <= CODEX_TOOL_NAME_LIMIT) {
127879
127894
  return name;
127880
127895
  }
127881
- const hash2 = (0, import_node_crypto20.createHash)("sha256").update(name).digest("hex").slice(0, TOOL_NAME_HASH_CHARS);
127896
+ const hash2 = (0, import_node_crypto21.createHash)("sha256").update(name).digest("hex").slice(0, TOOL_NAME_HASH_CHARS);
127882
127897
  const shortened = `${name.slice(0, CODEX_TOOL_NAME_LIMIT - TOOL_NAME_HASH_CHARS - 1)}_${hash2}`;
127883
127898
  names.set(shortened, name);
127884
127899
  return shortened;
@@ -128003,7 +128018,7 @@ function translateRequest(body, config2) {
128003
128018
  }
128004
128019
 
128005
128020
  // src/antigravity/translate.ts
128006
- var import_node_crypto21 = require("node:crypto");
128021
+ var import_node_crypto22 = require("node:crypto");
128007
128022
 
128008
128023
  // src/antigravity/quota.ts
128009
128024
  init_cloudUpstream();
@@ -128405,7 +128420,7 @@ function shortToolName2(name, names) {
128405
128420
  if (sanitized.length <= ANTIGRAVITY_TOOL_NAME_LIMIT) {
128406
128421
  result = sanitized;
128407
128422
  } else {
128408
- const hash2 = (0, import_node_crypto21.createHash)("sha256").update(name).digest("hex").slice(0, TOOL_NAME_HASH_CHARS2);
128423
+ const hash2 = (0, import_node_crypto22.createHash)("sha256").update(name).digest("hex").slice(0, TOOL_NAME_HASH_CHARS2);
128409
128424
  const prefix = sanitized.slice(0, ANTIGRAVITY_TOOL_NAME_LIMIT - TOOL_NAME_HASH_CHARS2 - 1);
128410
128425
  result = `${prefix}_${hash2}`;
128411
128426
  }
@@ -129157,8 +129172,8 @@ function createCodexRouteMount(ports, upstreamBase, provider) {
129157
129172
  request7.body.resume();
129158
129173
  return;
129159
129174
  }
129160
- const path63 = new URL(request7.url, "http://127.0.0.1").pathname;
129161
- const translated = { method: request7.method, path: path63, body, signal: request7.signal };
129175
+ const path64 = new URL(request7.url, "http://127.0.0.1").pathname;
129176
+ const translated = { method: request7.method, path: path64, body, signal: request7.signal };
129162
129177
  const routed = await route(translated);
129163
129178
  if (request7.signal.aborted) {
129164
129179
  return;
@@ -129169,7 +129184,7 @@ function createCodexRouteMount(ports, upstreamBase, provider) {
129169
129184
  }
129170
129185
 
129171
129186
  // src/antigravity/route.ts
129172
- var import_node_crypto22 = require("node:crypto");
129187
+ var import_node_crypto23 = require("node:crypto");
129173
129188
  init_route();
129174
129189
 
129175
129190
  // src/antigravity/relay.ts
@@ -129538,7 +129553,7 @@ function exhaustedMessage(exhaustion) {
129538
129553
  return `Antigravity ${window} limit reached; it resets at ${new Date(exhaustion.resetSec * MS_PER_SECOND10).toISOString()}.`;
129539
129554
  }
129540
129555
  function createAntigravityRoute(ports) {
129541
- const fallbackId = ports.fallbackId ?? (() => (0, import_node_crypto22.randomUUID)());
129556
+ const fallbackId = ports.fallbackId ?? (() => (0, import_node_crypto23.randomUUID)());
129542
129557
  const lastRouted = /* @__PURE__ */ new Map();
129543
129558
  return async (request7) => {
129544
129559
  await Promise.resolve();
@@ -129772,8 +129787,8 @@ function createAntigravityRouteMount(ports, upstreamBase, provider) {
129772
129787
  request7.body.resume();
129773
129788
  return;
129774
129789
  }
129775
- const path63 = new URL(request7.url, "http://127.0.0.1").pathname;
129776
- const translated = { method: request7.method, path: path63, body, signal: request7.signal };
129790
+ const path64 = new URL(request7.url, "http://127.0.0.1").pathname;
129791
+ const translated = { method: request7.method, path: path64, body, signal: request7.signal };
129777
129792
  const routed = await route(translated);
129778
129793
  if (request7.signal.aborted) {
129779
129794
  return;
@@ -129807,7 +129822,7 @@ function createPassthroughRoute(name, target) {
129807
129822
  headroomUpstream: target.headroomUpstream,
129808
129823
  serve: async (request7, response) => {
129809
129824
  const incoming = new URL(request7.url, "http://127.0.0.1");
129810
- const path63 = target.stripPrefix !== void 0 && incoming.pathname.startsWith(target.stripPrefix) ? incoming.pathname.slice(target.stripPrefix.length) : incoming.pathname;
129825
+ const path64 = target.stripPrefix !== void 0 && incoming.pathname.startsWith(target.stripPrefix) ? incoming.pathname.slice(target.stripPrefix.length) : incoming.pathname;
129811
129826
  const headers = forwardableHeaders(request7.headers);
129812
129827
  delete headers.host;
129813
129828
  await new Promise((resolve2) => {
@@ -129815,7 +129830,7 @@ function createPassthroughRoute(name, target) {
129815
129830
  host: base.hostname,
129816
129831
  port: base.port === "" ? void 0 : Number(base.port),
129817
129832
  method: request7.method,
129818
- path: `${basePath}${path63}${incoming.search}`,
129833
+ path: `${basePath}${path64}${incoming.search}`,
129819
129834
  headers,
129820
129835
  agent
129821
129836
  };
@@ -129947,13 +129962,13 @@ async function scanRequestHead(request7, wholeBody = false) {
129947
129962
  }
129948
129963
 
129949
129964
  // src/frontdoor/providerRoute.ts
129950
- var isRcSelfHostPath = (path63) => path63 === "/v1/code/sessions" || path63.startsWith("/v1/code/sessions/") || path63 === "/v1/sessions" || path63.startsWith("/v1/sessions/");
129965
+ var isRcSelfHostPath = (path64) => path64 === "/v1/code/sessions" || path64.startsWith("/v1/code/sessions/") || path64 === "/v1/sessions" || path64.startsWith("/v1/sessions/");
129951
129966
  function scopeSessionProviderPath(request7) {
129952
129967
  if (request7.session.provider === void 0) {
129953
129968
  return request7;
129954
129969
  }
129955
- const path63 = new URL(request7.url, "http://127.0.0.1").pathname;
129956
- if (!path63.startsWith("/v1/") || isRcSelfHostPath(path63)) {
129970
+ const path64 = new URL(request7.url, "http://127.0.0.1").pathname;
129971
+ if (!path64.startsWith("/v1/") || isRcSelfHostPath(path64)) {
129957
129972
  return request7;
129958
129973
  }
129959
129974
  return { ...request7, url: `${PROVIDER_PATH_PREFIX}${encodeURIComponent(request7.session.provider)}${request7.url}` };
@@ -129996,13 +130011,13 @@ function createProviderRouteResolver(deps) {
129996
130011
  return route;
129997
130012
  };
129998
130013
  const resolve2 = (request7) => {
129999
- const path63 = new URL(request7.url, "http://127.0.0.1").pathname;
130000
- const scoped = parseProviderPath(path63);
130014
+ const path64 = new URL(request7.url, "http://127.0.0.1").pathname;
130015
+ const scoped = parseProviderPath(path64);
130001
130016
  if (scoped === void 0) {
130002
- if (deps.rcSelfHostRoute !== void 0 && isRcSelfHostPath(path63)) {
130017
+ if (deps.rcSelfHostRoute !== void 0 && isRcSelfHostPath(path64)) {
130003
130018
  return { ok: true, route: deps.rcSelfHostRoute };
130004
130019
  }
130005
- return path63.startsWith("/v1/") ? { ok: true, route: oauthRoute } : { ok: false, status: HTTP_STATUS.notFound, message: `no such endpoint: ${path63}` };
130020
+ return path64.startsWith("/v1/") ? { ok: true, route: oauthRoute } : { ok: false, status: HTTP_STATUS.notFound, message: `no such endpoint: ${path64}` };
130006
130021
  }
130007
130022
  const { provider } = scoped;
130008
130023
  let definition;
@@ -130088,8 +130103,8 @@ function createProviderRouteResolver(deps) {
130088
130103
  let replay;
130089
130104
  const visited = /* @__PURE__ */ new Set();
130090
130105
  for (; ; ) {
130091
- const path63 = new URL(current.url, "http://127.0.0.1").pathname;
130092
- const scoped = parseProviderPath(path63);
130106
+ const path64 = new URL(current.url, "http://127.0.0.1").pathname;
130107
+ const scoped = parseProviderPath(path64);
130093
130108
  const providerName = scoped?.provider ?? current.session.provider;
130094
130109
  if (providerName !== void 0 && visited.has(providerName)) {
130095
130110
  return { ok: false, status: HTTP_STATUS.internalServerError, message: `provider routing cycle: ${[...visited, providerName].join(" -> ")}` };
@@ -130147,7 +130162,7 @@ function createProviderRouteResolver(deps) {
130147
130162
  const headers = Object.fromEntries(Object.entries(replay.headers).filter(([name]) => name.toLowerCase() !== "content-length"));
130148
130163
  replay = { ...replay, headers, body: import_node_stream3.Readable.from([Buffer.from(rewritten, "utf8")]) };
130149
130164
  }
130150
- const rest = scoped === void 0 ? path63 : path63.slice(`${PROVIDER_PATH_PREFIX}${encodeURIComponent(scoped.provider)}`.length);
130165
+ const rest = scoped === void 0 ? path64 : path64.slice(`${PROVIDER_PATH_PREFIX}${encodeURIComponent(scoped.provider)}`.length);
130151
130166
  const query = current.url.includes("?") ? current.url.slice(current.url.indexOf("?")) : "";
130152
130167
  current = { ...current, url: `${PROVIDER_PATH_PREFIX}${encodeURIComponent(matched.provider)}${rest}${query}`, body: replay.body, headers: replay.headers };
130153
130168
  }
@@ -130180,7 +130195,7 @@ function attachingProviderCredential(route, deps) {
130180
130195
  init_realFrontDoorPort();
130181
130196
 
130182
130197
  // src/frontdoor/rcCommands.ts
130183
- var import_node_crypto23 = require("node:crypto");
130198
+ var import_node_crypto24 = require("node:crypto");
130184
130199
  init_commandDeps();
130185
130200
  init_cliError();
130186
130201
  init_realPorts();
@@ -130254,7 +130269,7 @@ function createRcLiveUsage(deps) {
130254
130269
  }
130255
130270
 
130256
130271
  // src/frontdoor/rcSelfHostMint.ts
130257
- var import_node_path49 = __toESM(require("node:path"), 1);
130272
+ var import_node_path50 = __toESM(require("node:path"), 1);
130258
130273
  init_account();
130259
130274
 
130260
130275
  // src/frontdoor/rcSelfHostLocal.ts
@@ -130384,7 +130399,7 @@ function readJsonObject(fs25, file2) {
130384
130399
  return isRecord14(parsed) ? parsed : void 0;
130385
130400
  }
130386
130401
  function readRcSelfHostRecord(fs25, frontdoorDir) {
130387
- const parsed = readJsonObject(fs25, import_node_path49.default.join(frontdoorDir, RC_SELF_HOST_RECORD_DIR, RC_SELF_HOST_RECORD_FILE));
130402
+ const parsed = readJsonObject(fs25, import_node_path50.default.join(frontdoorDir, RC_SELF_HOST_RECORD_DIR, RC_SELF_HOST_RECORD_FILE));
130388
130403
  if (parsed === void 0) {
130389
130404
  return void 0;
130390
130405
  }
@@ -130398,11 +130413,11 @@ function mintRcSelfHostCredential(deps) {
130398
130413
  if (!isIdentityName(deps.identity)) {
130399
130414
  throw new Error(`"${deps.identity}" is not a valid identity name.`);
130400
130415
  }
130401
- const identityDir = import_node_path49.default.join(deps.identitiesDir, deps.identity);
130402
- const credentialsFile = import_node_path49.default.join(identityDir, CREDENTIALS_FILE2);
130403
- const claudeJsonFile = import_node_path49.default.join(identityDir, CLAUDE_JSON2);
130404
- const recordDir = import_node_path49.default.join(deps.frontdoorDir, RC_SELF_HOST_RECORD_DIR);
130405
- const recordFile = import_node_path49.default.join(recordDir, RC_SELF_HOST_RECORD_FILE);
130416
+ const identityDir = import_node_path50.default.join(deps.identitiesDir, deps.identity);
130417
+ const credentialsFile = import_node_path50.default.join(identityDir, CREDENTIALS_FILE2);
130418
+ const claudeJsonFile = import_node_path50.default.join(identityDir, CLAUDE_JSON2);
130419
+ const recordDir = import_node_path50.default.join(deps.frontdoorDir, RC_SELF_HOST_RECORD_DIR);
130420
+ const recordFile = import_node_path50.default.join(recordDir, RC_SELF_HOST_RECORD_FILE);
130406
130421
  const previousRecord = readRcSelfHostRecord(deps.fs, deps.frontdoorDir);
130407
130422
  const existingCredentials = readJsonObject(deps.fs, credentialsFile);
130408
130423
  const existingOauth = isRecord14(existingCredentials?.claudeAiOauth) ? existingCredentials.claudeAiOauth : void 0;
@@ -130418,7 +130433,7 @@ function mintRcSelfHostCredential(deps) {
130418
130433
  const organizationUuid = deps.newUuid();
130419
130434
  const accountUuid = deps.newUuid();
130420
130435
  const mintedAt = new Date(deps.now()).toISOString();
130421
- deps.fs.mkdirPrivate(import_node_path49.default.dirname(credentialsFile));
130436
+ deps.fs.mkdirPrivate(import_node_path50.default.dirname(credentialsFile));
130422
130437
  deps.fs.writeFilePrivate(credentialsFile, `${JSON.stringify({ ...existingCredentials, claudeAiOauth: { accessToken, refreshToken, expiresAt: null, scopes: [...RC_SELF_HOST_SCOPE_LIST], subscriptionType: SELF_HOST_SUBSCRIPTION_TYPE, rateLimitTier: null } }, null, 2)}
130423
130438
  `);
130424
130439
  const claudeJson = readJsonObject(deps.fs, claudeJsonFile) ?? {};
@@ -130787,8 +130802,8 @@ function registerRcCommand(frontdoor, paths) {
130787
130802
  identitiesDir: paths.identitiesDir,
130788
130803
  frontdoorDir: paths.frontdoorDir,
130789
130804
  identity,
130790
- newUuid: import_node_crypto23.randomUUID,
130791
- randomToken: () => (0, import_node_crypto23.randomBytes)(MINTED_TOKEN_RANDOM_BYTES).toString("base64url"),
130805
+ newUuid: import_node_crypto24.randomUUID,
130806
+ randomToken: () => (0, import_node_crypto24.randomBytes)(MINTED_TOKEN_RANDOM_BYTES).toString("base64url"),
130792
130807
  force: options.force === true,
130793
130808
  now: () => Date.now()
130794
130809
  });
@@ -130805,7 +130820,7 @@ function registerRcCommand(frontdoor, paths) {
130805
130820
  }
130806
130821
 
130807
130822
  // src/frontdoor/rcCredentialStore.ts
130808
- var import_node_path50 = __toESM(require("node:path"), 1);
130823
+ var import_node_path51 = __toESM(require("node:path"), 1);
130809
130824
  function isSafeSessionId(sessionId) {
130810
130825
  return /^[A-Za-z0-9_-]+$/.test(sessionId);
130811
130826
  }
@@ -130831,7 +130846,7 @@ function sequenceNumOfJson(value2) {
130831
130846
  }
130832
130847
  function createRcCredentialStore(fs25, dir) {
130833
130848
  fs25.mkdirPrivate(dir);
130834
- const fileFor = (sessionId) => import_node_path50.default.join(dir, `${sessionId}.json`);
130849
+ const fileFor = (sessionId) => import_node_path51.default.join(dir, `${sessionId}.json`);
130835
130850
  const readParsed = (sessionId) => {
130836
130851
  const raw = fs25.readFileUtf8(fileFor(sessionId));
130837
130852
  if (raw === void 0) {
@@ -132918,7 +132933,7 @@ const { workerData, parentPort } = require("node:worker_threads");
132918
132933
  const fs = require("node:fs");
132919
132934
  const os = require("node:os");
132920
132935
  const inspector = require("node:inspector");
132921
- const { shared, boundMs, checkEveryMs, stateFile, ownPid, action, logFile, respawn, respawnAfterServingMs, awaitPidEnv } = workerData;
132936
+ const { shared, boundMs, checkEveryMs, pauseWaitMs, stateFile, ownPid, action, logFile, respawn, respawnAfterServingMs, awaitPidEnv } = workerData;
132922
132937
  const startedAt = Date.now();
132923
132938
  const counter = new Int32Array(shared);
132924
132939
  let lastValue = Atomics.load(counter, 0);
@@ -133020,7 +133035,7 @@ const timer = setInterval(() => {
133020
133035
  const [oneMinute, fiveMinutes, fifteenMinutes] = os.loadavg();
133021
133036
  log("machine load at the stall: " + oneMinute.toFixed(1) + " (1m), " + fiveMinutes.toFixed(1) + " (5m), " + fifteenMinutes.toFixed(1) + " (15m) across " + String(os.cpus().length) + " cpus");
133022
133037
  spawnReplacement();
133023
- describeMainThread(checkEveryMs, action !== "kill-process").then((where) => {
133038
+ describeMainThread(pauseWaitMs, action !== "kill-process").then((where) => {
133024
133039
  log(where);
133025
133040
  if (action === "kill-process") {
133026
133041
  process.kill(ownPid, "SIGKILL");
@@ -133043,7 +133058,7 @@ function startThreadWatchdog(params) {
133043
133058
  const counter = new Int32Array(shared);
133044
133059
  const worker = new import_node_worker_threads2.Worker(WATCHDOG_SOURCE, {
133045
133060
  eval: true,
133046
- workerData: { shared, boundMs: params.boundMs, checkEveryMs: params.checkEveryMs, stateFile: params.stateFile, ownPid: params.ownPid, action: params.action, logFile: params.logFile, respawn: params.respawn, respawnAfterServingMs: params.respawnAfterServingMs, awaitPidEnv: DOOR_AWAIT_PID_ENV }
133061
+ workerData: { shared, boundMs: params.boundMs, checkEveryMs: params.checkEveryMs, pauseWaitMs: params.pauseWaitMs, stateFile: params.stateFile, ownPid: params.ownPid, action: params.action, logFile: params.logFile, respawn: params.respawn, respawnAfterServingMs: params.respawnAfterServingMs, awaitPidEnv: DOOR_AWAIT_PID_ENV }
133047
133062
  });
133048
133063
  worker.unref();
133049
133064
  worker.on("message", (message) => {
@@ -133220,8 +133235,8 @@ function realFrontDoorSupervisorPorts(paths) {
133220
133235
  };
133221
133236
  const rcSelfHostSurface = rcSelfHost ? createRcSelfHostSurface({
133222
133237
  now: () => Date.now(),
133223
- newUuid: import_node_crypto24.randomUUID,
133224
- randomToken: () => (0, import_node_crypto24.randomBytes)(MINTED_TOKEN_RANDOM_BYTES).toString("base64url"),
133238
+ newUuid: import_node_crypto25.randomUUID,
133239
+ randomToken: () => (0, import_node_crypto25.randomBytes)(MINTED_TOKEN_RANDOM_BYTES).toString("base64url"),
133225
133240
  credentialRecord: () => readRcSelfHostRecord(realFarmFs, paths.frontdoorDir),
133226
133241
  webFetch: realRcWebFetch({ allowPrivate: rcWebFetchAllowsPrivateFromEnv(process.env) }),
133227
133242
  log
@@ -133244,7 +133259,7 @@ function realFrontDoorSupervisorPorts(paths) {
133244
133259
  saveSequenceNum: rcCredentialStore.writeCursor,
133245
133260
  dial: rcSelfHost ? lateRcStreamDial(rcSelfHostDialTarget) : realRcStreamDial(),
133246
133261
  fanout: rcFanout,
133247
- newClientId: import_node_crypto24.randomUUID,
133262
+ newClientId: import_node_crypto25.randomUUID,
133248
133263
  backoffMs: RC_STREAM_BACKOFF_MS,
133249
133264
  sleep: async (ms2) => {
133250
133265
  await new Promise((resolve2) => {
@@ -133256,7 +133271,7 @@ function realFrontDoorSupervisorPorts(paths) {
133256
133271
  }
133257
133272
  });
133258
133273
  const routingSnapshots = /* @__PURE__ */ new Map();
133259
- const rcControlToken = (0, import_node_crypto24.randomUUID)();
133274
+ const rcControlToken = (0, import_node_crypto25.randomUUID)();
133260
133275
  const resolveRoute = rcObservingResolver(
133261
133276
  createProviderRouteResolver({
133262
133277
  fs: realFsPort,
@@ -133372,9 +133387,9 @@ function realFrontDoorSupervisorPorts(paths) {
133372
133387
  now: () => Date.now(),
133373
133388
  headroomSocket: () => headroomSocketTarget(realFarmFs, realHeadroomSocketTrust, paths),
133374
133389
  // The per-generation capability the direct listener demands: held only in this process's memory, so a loopback process that discovers the direct port still cannot use it.
133375
- hopSecret: (0, import_node_crypto24.randomUUID)(),
133390
+ hopSecret: (0, import_node_crypto25.randomUUID)(),
133376
133391
  headroomDecision,
133377
- custody: createCredentialCustody(() => (0, import_node_crypto24.randomUUID)()),
133392
+ custody: createCredentialCustody(() => (0, import_node_crypto25.randomUUID)()),
133378
133393
  log
133379
133394
  });
133380
133395
  const onListenerError = (name) => (error63) => {
@@ -133397,9 +133412,9 @@ function realFrontDoorSupervisorPorts(paths) {
133397
133412
  startProviderListener: async (preferredPort) => {
133398
133413
  const authority = loadCa();
133399
133414
  const rcDial = rcSelfHost ? lateRcEventDial(rcSelfHostDialTarget) : realRcEventDial();
133400
- const rcInject = async (sessionId, text2) => await injectRcUserMessage({ credentialOf: rcTracker.credentialOf, noteSequenceNums: rcTracker.noteSequenceNums, dial: rcDial, newUuid: import_node_crypto24.randomUUID }, sessionId, text2);
133415
+ const rcInject = async (sessionId, text2) => await injectRcUserMessage({ credentialOf: rcTracker.credentialOf, noteSequenceNums: rcTracker.noteSequenceNums, dial: rcDial, newUuid: import_node_crypto25.randomUUID }, sessionId, text2);
133401
133416
  const rcAnswer = async (sessionId, requestId, decision) => await answerRcControlRequest({ credentialOf: rcTracker.credentialOf, pendingOf: (id2) => rcTracker.pendingOf(id2), completePending: rcTracker.completePending, noteSequenceNums: rcTracker.noteSequenceNums, dial: rcDial }, sessionId, requestId, decision);
133402
- const rcControlRequestDeps = { credentialOf: rcTracker.credentialOf, noteSequenceNums: rcTracker.noteSequenceNums, dial: rcDial, newUuid: import_node_crypto24.randomUUID };
133417
+ const rcControlRequestDeps = { credentialOf: rcTracker.credentialOf, noteSequenceNums: rcTracker.noteSequenceNums, dial: rcDial, newUuid: import_node_crypto25.randomUUID };
133403
133418
  const rcInterrupt = async (sessionId) => await interruptRcSession(rcControlRequestDeps, sessionId);
133404
133419
  const rcSetModel = async (sessionId, model) => await setRcSessionModel(rcControlRequestDeps, sessionId, model);
133405
133420
  const rcSetPermissionMode = async (sessionId, mode) => await setRcSessionPermissionMode(rcControlRequestDeps, sessionId, mode);
@@ -133498,14 +133513,14 @@ function realFrontDoorSupervisorPorts(paths) {
133498
133513
  },
133499
133514
  startConnectListener: async (preferredPort) => {
133500
133515
  const wantedTransparentPort = process.env.AGENT_SHIM_TRANSPARENT_SURFACE === void 0 ? void 0 : Number(process.env.AGENT_SHIM_TRANSPARENT_SURFACE);
133501
- const transparentCapability = wantedTransparentPort === void 0 || Number.isNaN(wantedTransparentPort) ? void 0 : (0, import_node_crypto24.randomUUID)();
133516
+ const transparentCapability = wantedTransparentPort === void 0 || Number.isNaN(wantedTransparentPort) ? void 0 : (0, import_node_crypto25.randomUUID)();
133502
133517
  if (transparentCapability !== void 0) {
133503
133518
  writeFrontDoorSession(realFarmFs, paths.frontdoorSessionsDir, { pid: process.pid, startedAt: Date.now(), token: transparentCapability });
133504
133519
  }
133505
133520
  const leafFor = createLeafCache(loadCa(), () => /* @__PURE__ */ new Date());
133506
133521
  const capture = captureFromEnv(process.env, paths.logsDir);
133507
133522
  if (capture !== void 0) {
133508
- log(`capture enabled, recording CONNECT targets and piped exchanges to ${import_node_path51.default.join(paths.logsDir, "frontdoor-capture.jsonl")}`);
133523
+ log(`capture enabled, recording CONNECT targets and piped exchanges to ${import_node_path52.default.join(paths.logsDir, "frontdoor-capture.jsonl")}`);
133509
133524
  }
133510
133525
  if (rcSelfHostSurface !== void 0) {
133511
133526
  log("self-hosted Remote Control surface on: the door serves the CCR session family itself, and its own client-half dials its own transparent surface");
@@ -133576,6 +133591,7 @@ function realFrontDoorSupervisorPorts(paths) {
133576
133591
  ownPid: process.pid,
133577
133592
  boundMs: DOOR_STALL_BOUND_MS,
133578
133593
  checkEveryMs: DOOR_WATCHDOG_CHECK_MS,
133594
+ pauseWaitMs: DOOR_WATCHDOG_CHECK_MS,
133579
133595
  action: "kill-process",
133580
133596
  logFile: paths.frontdoorLogPath,
133581
133597
  respawn: respawnInvocation(paths),
@@ -133650,7 +133666,7 @@ function registerFrontDoorCommand(program2, deps) {
133650
133666
  // src/statusline/commands.ts
133651
133667
  var import_node_child_process7 = require("node:child_process");
133652
133668
  var import_node_os12 = __toESM(require("node:os"), 1);
133653
- var import_node_path53 = __toESM(require("node:path"), 1);
133669
+ var import_node_path54 = __toESM(require("node:path"), 1);
133654
133670
  init_commandDeps();
133655
133671
  init_providersStore();
133656
133672
  init_realPorts();
@@ -133658,13 +133674,13 @@ init_account();
133658
133674
  init_read();
133659
133675
 
133660
133676
  // src/statusline/client.ts
133661
- var import_node_path52 = __toESM(require("node:path"), 1);
133677
+ var import_node_path53 = __toESM(require("node:path"), 1);
133662
133678
  function isAntigravityPayload(payload) {
133663
133679
  return typeof payload === "object" && payload !== null && "product" in payload && payload.product === "antigravity";
133664
133680
  }
133665
133681
  var ANTIGRAVITY_SETTINGS_SEGMENTS = [".gemini", "antigravity-cli", "settings.json"];
133666
133682
  function antigravityStacksWithDefault(fs25, homeDir) {
133667
- const raw = fs25.readFileUtf8(import_node_path52.default.join(homeDir, ...ANTIGRAVITY_SETTINGS_SEGMENTS));
133683
+ const raw = fs25.readFileUtf8(import_node_path53.default.join(homeDir, ...ANTIGRAVITY_SETTINGS_SEGMENTS));
133668
133684
  if (raw === void 0) {
133669
133685
  return false;
133670
133686
  }
@@ -134376,7 +134392,7 @@ function registerStatuslineCommand(program2, deps) {
134376
134392
  } else {
134377
134393
  const configDir = process.env.CLAUDE_CONFIG_DIR;
134378
134394
  try {
134379
- account = readAccountMetadataFile(realFarmFs, configDir === void 0 || configDir === "" ? import_node_path53.default.join(import_node_os12.default.homedir(), ".claude.json") : import_node_path53.default.join(configDir, ".claude.json"));
134395
+ account = readAccountMetadataFile(realFarmFs, configDir === void 0 || configDir === "" ? import_node_path54.default.join(import_node_os12.default.homedir(), ".claude.json") : import_node_path54.default.join(configDir, ".claude.json"));
134380
134396
  } catch {
134381
134397
  account = void 0;
134382
134398
  }
@@ -136439,8 +136455,8 @@ function getErrorMap2() {
136439
136455
 
136440
136456
  // node_modules/.pnpm/zod@4.6.5/node_modules/zod/v3/helpers/parseUtil.js
136441
136457
  var makeIssue = (params) => {
136442
- const { data, path: path63, errorMaps, issueData } = params;
136443
- const fullPath = [...path63, ...issueData.path || []];
136458
+ const { data, path: path64, errorMaps, issueData } = params;
136459
+ const fullPath = [...path64, ...issueData.path || []];
136444
136460
  const fullIssue = {
136445
136461
  ...issueData,
136446
136462
  path: fullPath
@@ -136555,11 +136571,11 @@ var errorUtil;
136555
136571
 
136556
136572
  // node_modules/.pnpm/zod@4.6.5/node_modules/zod/v3/types.js
136557
136573
  var ParseInputLazyPath = class {
136558
- constructor(parent, value2, path63, key) {
136574
+ constructor(parent, value2, path64, key) {
136559
136575
  this._cachedPath = [];
136560
136576
  this.parent = parent;
136561
136577
  this.data = value2;
136562
- this._path = path63;
136578
+ this._path = path64;
136563
136579
  this._key = key;
136564
136580
  }
136565
136581
  get path() {
@@ -140122,11 +140138,11 @@ function normalizeObjectSchema(schema) {
140122
140138
  }
140123
140139
  return void 0;
140124
140140
  }
140125
- function getDotPath(path63) {
140126
- if (path63.length === 0) {
140141
+ function getDotPath(path64) {
140142
+ if (path64.length === 0) {
140127
140143
  return "object root";
140128
140144
  }
140129
- return path63.reduce((acc, seg, index) => {
140145
+ return path64.reduce((acc, seg, index) => {
140130
140146
  if (index === 0) {
140131
140147
  return String(seg);
140132
140148
  }
@@ -144169,7 +144185,7 @@ async function serveMcp(mcp, transport, options = {}) {
144169
144185
 
144170
144186
  // src/mcp/permissions.ts
144171
144187
  var import_node_fs20 = __toESM(require("node:fs"), 1);
144172
- var import_node_path54 = __toESM(require("node:path"), 1);
144188
+ var import_node_path55 = __toESM(require("node:path"), 1);
144173
144189
  init_zod();
144174
144190
  init_store();
144175
144191
  var StoredMcpPermissionsSchema = external_exports.strictObject({
@@ -144191,10 +144207,10 @@ function effectiveMcpPermissions(flags, stored) {
144191
144207
  return { writes: flags.writes || stored.writes, remoteControl: flags.remoteControl || stored.remoteControl, history: flags.history || stored.history };
144192
144208
  }
144193
144209
  function watchMcpPermissions(paths, onChange) {
144194
- const directory = import_node_path54.default.dirname(paths.mcpPermissionsFile);
144210
+ const directory = import_node_path55.default.dirname(paths.mcpPermissionsFile);
144195
144211
  import_node_fs20.default.mkdirSync(directory, { recursive: true });
144196
144212
  const watcher = import_node_fs20.default.watch(directory, (_event, filename) => {
144197
- if (filename === null || filename === import_node_path54.default.basename(paths.mcpPermissionsFile)) {
144213
+ if (filename === null || filename === import_node_path55.default.basename(paths.mcpPermissionsFile)) {
144198
144214
  onChange();
144199
144215
  }
144200
144216
  });
@@ -144507,16 +144523,16 @@ init_credentialCache();
144507
144523
 
144508
144524
  // src/identityToken.ts
144509
144525
  var import_node_fs21 = __toESM(require("node:fs"), 1);
144510
- var import_node_path55 = __toESM(require("node:path"), 1);
144526
+ var import_node_path56 = __toESM(require("node:path"), 1);
144511
144527
  init_cliError();
144512
144528
  var TOKEN_FILE_MODE = 384;
144513
144529
  var TOKEN_DIR_MODE = 448;
144514
144530
  var OAUTH_TOKEN_RE = /^sk-ant-oat\d+-[A-Za-z0-9_-]+$/;
144515
144531
  function identityTokenDir(paths) {
144516
- return import_node_path55.default.join(paths.root, "credentials");
144532
+ return import_node_path56.default.join(paths.root, "credentials");
144517
144533
  }
144518
144534
  function identityTokenPath(paths, identityName) {
144519
- return import_node_path55.default.join(identityTokenDir(paths), `${identityName}.token`);
144535
+ return import_node_path56.default.join(identityTokenDir(paths), `${identityName}.token`);
144520
144536
  }
144521
144537
  function storeIdentityToken(paths, identityName, raw) {
144522
144538
  const token = raw.trim();
@@ -144527,7 +144543,7 @@ function storeIdentityToken(paths, identityName, raw) {
144527
144543
  import_node_fs21.default.mkdirSync(dir, { recursive: true, mode: TOKEN_DIR_MODE });
144528
144544
  import_node_fs21.default.chmodSync(dir, TOKEN_DIR_MODE);
144529
144545
  const target = identityTokenPath(paths, identityName);
144530
- const temp = import_node_path55.default.join(dir, `.${identityName}.${String(process.pid)}.tmp`);
144546
+ const temp = import_node_path56.default.join(dir, `.${identityName}.${String(process.pid)}.tmp`);
144531
144547
  import_node_fs21.default.writeFileSync(temp, `${token}
144532
144548
  `, { mode: TOKEN_FILE_MODE });
144533
144549
  import_node_fs21.default.renameSync(temp, target);
@@ -144695,7 +144711,7 @@ function registerDoctorCommand(program2, deps) {
144695
144711
  // src/headroom/commands.ts
144696
144712
  var import_node_fs22 = __toESM(require("node:fs"), 1);
144697
144713
  var import_node_http5 = __toESM(require("node:http"), 1);
144698
- var import_node_path56 = __toESM(require("node:path"), 1);
144714
+ var import_node_path57 = __toESM(require("node:path"), 1);
144699
144715
  var import_node_child_process9 = require("node:child_process");
144700
144716
  init_commandDeps();
144701
144717
  init_realFrontDoorPort();
@@ -144884,12 +144900,12 @@ function readInstalledHeadroomCommit() {
144884
144900
  if (toolDir.status !== 0) {
144885
144901
  return void 0;
144886
144902
  }
144887
- const libDir = import_node_path56.default.join(toolDir.stdout.trim(), HEADROOM_TOOL_NAME, "lib");
144903
+ const libDir = import_node_path57.default.join(toolDir.stdout.trim(), HEADROOM_TOOL_NAME, "lib");
144888
144904
  for (const python of realFarmFs.readdir(libDir)) {
144889
- const sitePackages = import_node_path56.default.join(libDir, python, "site-packages");
144905
+ const sitePackages = import_node_path57.default.join(libDir, python, "site-packages");
144890
144906
  for (const entry of realFarmFs.readdir(sitePackages)) {
144891
144907
  if (entry.startsWith("headroom_ai-") && entry.endsWith(".dist-info")) {
144892
- const directUrl = realFarmFs.readFileUtf8(import_node_path56.default.join(sitePackages, entry, "direct_url.json"));
144908
+ const directUrl = realFarmFs.readFileUtf8(import_node_path57.default.join(sitePackages, entry, "direct_url.json"));
144893
144909
  return directUrl === void 0 ? void 0 : parseInstalledCommit(directUrl);
144894
144910
  }
144895
144911
  }
@@ -145041,7 +145057,7 @@ init_realPorts();
145041
145057
  init_resumeContext();
145042
145058
 
145043
145059
  // src/supervise/registry.ts
145044
- var import_node_path57 = __toESM(require("node:path"), 1);
145060
+ var import_node_path58 = __toESM(require("node:path"), 1);
145045
145061
  init_zod();
145046
145062
  var SupervisedSessionSchema = external_exports.strictObject({
145047
145063
  /** The launcher's process id, which is what tells a live entry from one a crashed launcher left behind. */
@@ -145066,19 +145082,19 @@ var SessionStateSchema = external_exports.strictObject({
145066
145082
  at: external_exports.iso.datetime()
145067
145083
  });
145068
145084
  function superviseDirOf(paths, pool) {
145069
- return import_node_path57.default.join(paths.superviseDir, pool);
145085
+ return import_node_path58.default.join(paths.superviseDir, pool);
145070
145086
  }
145071
145087
  function sessionsDirOf(paths, pool) {
145072
- return import_node_path57.default.join(superviseDirOf(paths, pool), "sessions");
145088
+ return import_node_path58.default.join(superviseDirOf(paths, pool), "sessions");
145073
145089
  }
145074
145090
  function sessionFileOf(paths, pool, sessionId) {
145075
- return import_node_path57.default.join(sessionsDirOf(paths, pool), `${sessionId}.json`);
145091
+ return import_node_path58.default.join(sessionsDirOf(paths, pool), `${sessionId}.json`);
145076
145092
  }
145077
145093
  function stateDirOf(paths, pool) {
145078
- return import_node_path57.default.join(superviseDirOf(paths, pool), "state");
145094
+ return import_node_path58.default.join(superviseDirOf(paths, pool), "state");
145079
145095
  }
145080
145096
  function sessionStatePath(paths, pool, sessionId) {
145081
- return import_node_path57.default.join(stateDirOf(paths, pool), `${sessionId}.json`);
145097
+ return import_node_path58.default.join(stateDirOf(paths, pool), `${sessionId}.json`);
145082
145098
  }
145083
145099
  function writeSessionState(fs25, paths, pool, sessionId, state) {
145084
145100
  fs25.mkdirPrivate(stateDirOf(paths, pool));
@@ -145109,7 +145125,7 @@ function unregisterSupervised(fs25, paths, pool, sessionId) {
145109
145125
  function liveSupervised(fs25, paths, pool, isRunning) {
145110
145126
  const live = [];
145111
145127
  for (const name of fs25.readdir(sessionsDirOf(paths, pool))) {
145112
- const file2 = import_node_path57.default.join(sessionsDirOf(paths, pool), name);
145128
+ const file2 = import_node_path58.default.join(sessionsDirOf(paths, pool), name);
145113
145129
  const raw = fs25.readFileUtf8(file2);
145114
145130
  if (raw === void 0) {
145115
145131
  continue;
@@ -145204,7 +145220,7 @@ function registerSuperviseMarkCommand(program2, deps) {
145204
145220
  init_realPorts();
145205
145221
 
145206
145222
  // src/usage/realJobRunner.ts
145207
- var import_node_path58 = __toESM(require("node:path"), 1);
145223
+ var import_node_path59 = __toESM(require("node:path"), 1);
145208
145224
  init_conditions();
145209
145225
  init_identityClaude();
145210
145226
  var JOB_LAUNCH_FLAGS = ["--no-headroom", "--no-remote-control", "--track-usage"];
@@ -145217,7 +145233,7 @@ ${outcome.trimEnd()}
145217
145233
  }
145218
145234
  function createRealJobRunner(params) {
145219
145235
  return async (name, identity, job) => {
145220
- const logFile = import_node_path58.default.join(params.paths.jobLogsDir, `${name}.log`);
145236
+ const logFile = import_node_path59.default.join(params.paths.jobLogsDir, `${name}.log`);
145221
145237
  const append = (outcome) => {
145222
145238
  params.fs.mkdirPrivate(params.paths.jobLogsDir);
145223
145239
  params.fs.appendFilePrivate(logFile, logEntry(name, identity, params.now(), outcome));
@@ -145271,7 +145287,7 @@ function registerHeadlessCommands(program2, deps) {
145271
145287
  }
145272
145288
 
145273
145289
  // src/jobs.ts
145274
- var import_node_path59 = __toESM(require("node:path"), 1);
145290
+ var import_node_path60 = __toESM(require("node:path"), 1);
145275
145291
  init_commandDeps();
145276
145292
  init_cliError();
145277
145293
  init_schema();
@@ -145296,7 +145312,7 @@ function jobOf(options) {
145296
145312
  target: options.identity === void 0 ? { pool: options.pool ?? "" } : { identity: options.identity },
145297
145313
  trigger: options.at === void 0 ? { beforeReset: options.beforeReset ?? "fiveHour", lead: options.lead ?? "" } : { at: options.at },
145298
145314
  prompt: options.prompt,
145299
- cwd: import_node_path59.default.resolve(options.cwd ?? process.cwd()),
145315
+ cwd: import_node_path60.default.resolve(options.cwd ?? process.cwd()),
145300
145316
  timeout: options.timeout,
145301
145317
  ...options.model === void 0 ? {} : { model: options.model },
145302
145318
  ...options.allowedTool === void 0 ? {} : { allowedTools: options.allowedTool }
@@ -145369,7 +145385,7 @@ function registerJobCommand(program2, deps) {
145369
145385
  console.log(`Allowed tools: ${entry.allowedTools.join(", ")}`);
145370
145386
  }
145371
145387
  console.log(`Prompt: ${entry.prompt}`);
145372
- console.log(`Results: ${import_node_path59.default.join(paths.jobLogsDir, `${name}.log`)}`);
145388
+ console.log(`Results: ${import_node_path60.default.join(paths.jobLogsDir, `${name}.log`)}`);
145373
145389
  }),
145374
145390
  ["agent-shim job show digest"]
145375
145391
  );
@@ -145392,7 +145408,7 @@ function registerJobCommand(program2, deps) {
145392
145408
  throw new UsageError(`No member of the job's pool can be picked right now.`);
145393
145409
  }
145394
145410
  await createRealJobRunner({ paths, spawnDaemon: spawnDetachedSupervisor, fs: realFarmFs, now: () => /* @__PURE__ */ new Date() })(name, identity, entry);
145395
- console.log(`Ran job "${name}" as ${identity}; the result is in ${import_node_path59.default.join(paths.jobLogsDir, `${name}.log`)}.`);
145411
+ console.log(`Ran job "${name}" as ${identity}; the result is in ${import_node_path60.default.join(paths.jobLogsDir, `${name}.log`)}.`);
145396
145412
  }),
145397
145413
  ["agent-shim job run digest"]
145398
145414
  );
@@ -145939,10 +145955,11 @@ function registerSessionCommands(program2, deps) {
145939
145955
  }
145940
145956
 
145941
145957
  // src/usage/commands.ts
145942
- var import_node_path60 = __toESM(require("node:path"), 1);
145958
+ var import_node_path61 = __toESM(require("node:path"), 1);
145943
145959
  init_commandDeps();
145944
145960
  init_realPorts();
145945
145961
  init_account();
145962
+ init_signIn();
145946
145963
  init_read();
145947
145964
  init_anthropicUsageRefresh();
145948
145965
  init_middleware();
@@ -146077,7 +146094,7 @@ function collectAccounts(fs25, paths, identity, probe) {
146077
146094
  return names.map((name) => ({
146078
146095
  identity: name,
146079
146096
  account: readAccountMetadata(fs25, paths.identitiesDir, name),
146080
- signIn: identitySignIn(fs25, probe, { farmRoot: import_node_path60.default.join(paths.identitiesDir, name), hasCredentialBlock: readIdentity(paths, name)?.credential !== void 0 }),
146097
+ signIn: identitySignIn(fs25, probe, { farmRoot: import_node_path61.default.join(paths.identitiesDir, name), hasCredentialBlock: readIdentity(paths, name)?.credential !== void 0 }),
146081
146098
  usage: readUsageSnapshot(fs25, paths.usageSnapshotsDir, name)
146082
146099
  }));
146083
146100
  }
@@ -146313,7 +146330,7 @@ async function realRefresher(params) {
146313
146330
  }
146314
146331
 
146315
146332
  // src/supervise/launch.ts
146316
- var import_node_crypto25 = require("node:crypto");
146333
+ var import_node_crypto26 = require("node:crypto");
146317
146334
  init_claudeSession();
146318
146335
  init_pool();
146319
146336
  init_realPorts();
@@ -146479,7 +146496,7 @@ function quotaHitOf(fs25, paths, identity, sessionId, sinceMs, nowMs) {
146479
146496
  }
146480
146497
 
146481
146498
  // src/supervise/move.ts
146482
- var import_node_path61 = __toESM(require("node:path"), 1);
146499
+ var import_node_path62 = __toESM(require("node:path"), 1);
146483
146500
  init_lock();
146484
146501
  init_poolPick();
146485
146502
  init_read();
@@ -146525,7 +146542,7 @@ function createMover(deps) {
146525
146542
  if (resolution.identity === request7.from) {
146526
146543
  return { kind: "stay", reason: `no other member of pool "${pool}" can take it` };
146527
146544
  }
146528
- const transcript = import_node_path61.default.join(paths.identitiesDir, resolution.identity, "projects", projectDirNameOf(deps.cwd), `${request7.sessionId}.jsonl`);
146545
+ const transcript = import_node_path62.default.join(paths.identitiesDir, resolution.identity, "projects", projectDirNameOf(deps.cwd), `${request7.sessionId}.jsonl`);
146529
146546
  if (farmFs.lstat(transcript)?.kind !== "file") {
146530
146547
  return { kind: "stay", reason: `${resolution.identity} does not share this conversation's history, so it could not resume it` };
146531
146548
  }
@@ -146844,7 +146861,7 @@ async function runSupervised(params) {
146844
146861
  log.warn(`agent-shim: pool "${pool}" resumes on a spent quota, which needs a POSIX terminal; this launch runs unsupervised`);
146845
146862
  return void 0;
146846
146863
  }
146847
- const first = initialConversationOf(params.passthrough, { newId: import_node_crypto25.randomUUID, latestId: () => latestConversationId(farm.fs, { claudeHome: farm.claudeHome, cwd: farm.cwd }) });
146864
+ const first = initialConversationOf(params.passthrough, { newId: import_node_crypto26.randomUUID, latestId: () => latestConversationId(farm.fs, { claudeHome: farm.claudeHome, cwd: farm.cwd }) });
146848
146865
  if ("reason" in first) {
146849
146866
  log.warn(`agent-shim: pool "${pool}" resumes on a spent quota, but this launch runs unsupervised: ${first.reason}`);
146850
146867
  return void 0;
@@ -147056,7 +147073,7 @@ async function runClaude(argvOverride) {
147056
147073
  // src/cli.ts
147057
147074
  async function main() {
147058
147075
  aliasLegacyEnv(process.env);
147059
- const invokedName = import_node_path62.default.basename(process.argv[1] ?? "agent-shim");
147076
+ const invokedName = import_node_path63.default.basename(process.argv[1] ?? "agent-shim");
147060
147077
  if (isInvokedAsClaude(invokedName)) {
147061
147078
  await runClaude();
147062
147079
  return;