claude-use 11.17.1 → 11.19.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
@@ -24527,25 +24527,102 @@ var require_dist = __commonJS({
24527
24527
  }
24528
24528
  });
24529
24529
 
24530
+ // src/config/unrecognisedKeys.ts
24531
+ function isRecord(value2) {
24532
+ return typeof value2 === "object" && value2 !== null;
24533
+ }
24534
+ function parseIgnoringUnrecognisedKeys(schema, raw) {
24535
+ const first = schema.safeParse(raw);
24536
+ if (first.success) {
24537
+ return { success: true, data: first.data, ignored: [] };
24538
+ }
24539
+ const unrecognised = first.error.issues.filter((issue2) => issue2.code === "unrecognized_keys");
24540
+ const others = first.error.issues.filter((issue2) => issue2.code !== "unrecognized_keys");
24541
+ if (others.length > 0) {
24542
+ return { success: false, issues: others };
24543
+ }
24544
+ const stripped = structuredClone(raw);
24545
+ const ignored = [];
24546
+ for (const issue2 of unrecognised) {
24547
+ let holder = stripped;
24548
+ for (const step2 of issue2.path) {
24549
+ holder = isRecord(holder) ? holder[step2] : void 0;
24550
+ }
24551
+ if (isRecord(holder)) {
24552
+ const values = Object.fromEntries(issue2.keys.map((key) => [key, holder[key]]));
24553
+ for (const key of issue2.keys) {
24554
+ Reflect.deleteProperty(holder, key);
24555
+ }
24556
+ ignored.push({ path: issue2.path, keys: issue2.keys, values });
24557
+ }
24558
+ }
24559
+ const second = schema.safeParse(stripped);
24560
+ return second.success ? { success: true, data: second.data, ignored } : { success: false, issues: second.error.issues };
24561
+ }
24562
+ function describeIgnoredKeys(filePath, ignored) {
24563
+ const places = ignored.map(({ path: path61, keys }) => `${path61.length === 0 ? "" : `${path61.map(String).join(".")}.`}${keys.join(", ")}`);
24564
+ return `${filePath} has settings this version of agent-shim does not know and ignores: ${places.join("; ")}. A newer release may read them.`;
24565
+ }
24566
+ function noteIgnoredKeys(filePath, ignored) {
24567
+ if (ignored.length === 0) {
24568
+ ignoredByFile.delete(filePath);
24569
+ return;
24570
+ }
24571
+ ignoredByFile.set(filePath, ignored);
24572
+ const message = `agent-shim: warning: ${describeIgnoredKeys(filePath, ignored)}
24573
+ `;
24574
+ if (!warned.has(message)) {
24575
+ warned.add(message);
24576
+ process.stderr.write(message);
24577
+ }
24578
+ }
24579
+ function restoreIgnoredKeys(filePath, value2) {
24580
+ const ignored = ignoredByFile.get(filePath);
24581
+ if (ignored === void 0) {
24582
+ return value2;
24583
+ }
24584
+ const restored = structuredClone(value2);
24585
+ for (const { path: path61, values } of ignored) {
24586
+ let holder = restored;
24587
+ for (const step2 of path61) {
24588
+ holder = isRecord(holder) ? holder[step2] : void 0;
24589
+ }
24590
+ if (isRecord(holder)) {
24591
+ for (const [key, held] of Object.entries(values)) {
24592
+ holder[key] = held;
24593
+ }
24594
+ }
24595
+ }
24596
+ return restored;
24597
+ }
24598
+ var warned, ignoredByFile;
24599
+ var init_unrecognisedKeys = __esm({
24600
+ "src/config/unrecognisedKeys.ts"() {
24601
+ "use strict";
24602
+ warned = /* @__PURE__ */ new Set();
24603
+ ignoredByFile = /* @__PURE__ */ new Map();
24604
+ }
24605
+ });
24606
+
24530
24607
  // src/config/load.ts
24531
24608
  function createExplorer(moduleName = "agent-shim") {
24532
24609
  return (0, import_cosmiconfig.cosmiconfigSync)(moduleName, { searchPlaces: [] });
24533
24610
  }
24534
- function isRecord(value2) {
24611
+ function isRecord2(value2) {
24535
24612
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
24536
24613
  }
24537
24614
  function captureEntryOrder(value2) {
24538
- if (!isRecord(value2)) {
24615
+ if (!isRecord2(value2)) {
24539
24616
  return [];
24540
24617
  }
24541
24618
  const entries = value2.entries;
24542
- if (!isRecord(entries)) {
24619
+ if (!isRecord2(entries)) {
24543
24620
  return [];
24544
24621
  }
24545
24622
  return Object.keys(entries);
24546
24623
  }
24547
24624
  function captureRuleEntryOrders(value2) {
24548
- if (!isRecord(value2)) {
24625
+ if (!isRecord2(value2)) {
24549
24626
  return [];
24550
24627
  }
24551
24628
  const rules = value2.rules;
@@ -24560,7 +24637,7 @@ function cosmiconfigReader(explorer = createExplorer()) {
24560
24637
  try {
24561
24638
  result = explorer.load(filepath);
24562
24639
  } catch (error63) {
24563
- const code = isRecord(error63) ? error63.code : void 0;
24640
+ const code = isRecord2(error63) ? error63.code : void 0;
24564
24641
  if (code === "ENOENT") {
24565
24642
  return void 0;
24566
24643
  }
@@ -24577,10 +24654,11 @@ function loadConfigFile(filepath, schema, read = cosmiconfigReader()) {
24577
24654
  if (raw === void 0) {
24578
24655
  return void 0;
24579
24656
  }
24580
- const parsed = schema.safeParse(raw);
24657
+ const parsed = parseIgnoringUnrecognisedKeys(schema, raw);
24581
24658
  if (!parsed.success) {
24582
- throw new ConfigValidationError(filepath, parsed.error.issues);
24659
+ throw new ConfigValidationError(filepath, parsed.issues);
24583
24660
  }
24661
+ noteIgnoredKeys(filepath, parsed.ignored);
24584
24662
  return {
24585
24663
  filepath,
24586
24664
  config: parsed.data,
@@ -24594,6 +24672,7 @@ var init_load = __esm({
24594
24672
  "use strict";
24595
24673
  import_cosmiconfig = __toESM(require_dist(), 1);
24596
24674
  init_cliError();
24675
+ init_unrecognisedKeys();
24597
24676
  ConfigValidationError = class extends CliError {
24598
24677
  constructor(filepath, issues) {
24599
24678
  const detail = issues.map((issue2) => ` ${issue2.path.join(".") || "(root)"}: ${issue2.message}`).join("\n");
@@ -24619,10 +24698,11 @@ function readJson(filePath, schema, storeFs = nodeStoreFs) {
24619
24698
  return void 0;
24620
24699
  }
24621
24700
  const parsed = JSON.parse(raw);
24622
- const result = schema.safeParse(parsed);
24701
+ const result = parseIgnoringUnrecognisedKeys(schema, parsed);
24623
24702
  if (!result.success) {
24624
- throw new ConfigValidationError(filePath, result.error.issues);
24703
+ throw new ConfigValidationError(filePath, result.issues);
24625
24704
  }
24705
+ noteIgnoredKeys(filePath, result.ignored);
24626
24706
  return result.data;
24627
24707
  }
24628
24708
  function writeTextAtomic(filePath, contents, storeFs = nodeStoreFs) {
@@ -24638,7 +24718,7 @@ function writeTextAtomic(filePath, contents, storeFs = nodeStoreFs) {
24638
24718
  }
24639
24719
  }
24640
24720
  function writeJsonAtomic(filePath, data, storeFs = nodeStoreFs) {
24641
- writeTextAtomic(filePath, `${JSON.stringify(data, null, 2)}
24721
+ writeTextAtomic(filePath, `${JSON.stringify(restoreIgnoredKeys(filePath, data), null, 2)}
24642
24722
  `, storeFs);
24643
24723
  }
24644
24724
  function applyPatch(filePath, schema, patch, options = {}) {
@@ -24664,6 +24744,7 @@ var init_store = __esm({
24664
24744
  import_node_path2 = __toESM(require("node:path"), 1);
24665
24745
  import_node_crypto = require("node:crypto");
24666
24746
  init_load();
24747
+ init_unrecognisedKeys();
24667
24748
  nodeStoreFs = {
24668
24749
  readFileUtf8(filePath) {
24669
24750
  try {
@@ -27012,10 +27093,10 @@ var init_schema = __esm({
27012
27093
  ANTIGRAVITY_DEFAULT_MODE = "cloud";
27013
27094
  ANTIGRAVITY_DEFAULT_MODEL = "gemini-3.8-flash-high";
27014
27095
  ANTIGRAVITY_DEFAULT_TIER_MODELS = Object.freeze({
27015
- fable: ["claude-opus-5-5-high", "gemini-4-argon-high", "gemini-3.8-flash-high"],
27096
+ fable: ["gemini-4-argon-high", "claude-opus-5-5-high", "gemini-3.8-flash-high"],
27016
27097
  opus: ["claude-opus-5-5-high", "gemini-4-argon-high", "gemini-3.8-flash-high"],
27017
27098
  sonnet: ["claude-sonnet-5-5-medium", "gemini-4-argon-medium", "gemini-3.8-flash-medium"],
27018
- haiku: ["gemini-3.8-flash-low", "gemini-4-argon-low", "gpt-oss-120b-medium"]
27099
+ haiku: ["gemini-3.8-flash-low", "gemini-4-argon-low", "claude-sonnet-5-5-low"]
27019
27100
  });
27020
27101
  ANTIGRAVITY_DEFAULT_EFFORT = "low";
27021
27102
  AntigravityModelTargetSchema = external_exports.union([external_exports.string().min(1), external_exports.array(external_exports.string().min(1)).min(1)]);
@@ -27026,6 +27107,8 @@ var init_schema = __esm({
27026
27107
  defaultModel: external_exports.string().min(1).optional(),
27027
27108
  /** Model name mapping. A key naming a tier (`fable`, `opus`, `sonnet`, `haiku`) overrides that tier's shipped model and is matched by substring of the requested name in `ANTIGRAVITY_TIERS` order; any other key is an alias, matched against the whole requested name case-insensitively, so `/model <alias>` selects its backend model. An alias outranks every other rule, including the pass-through of backend names. A value is one model or an ordered list of candidates: the request goes to the first whose quota windows are not spent, and when every candidate is spent, to the one whose binding window lifts soonest. */
27028
27109
  models: external_exports.record(external_exports.string().min(1), AntigravityModelTargetSchema).optional(),
27110
+ /** When every candidate of the tier a request names has no quota left, serve it from the next tier down, and onward through the lower tiers, instead of failing with the quota limit. Applies to a name that selects a tier (`/model fable`), not to an alias or a backend model name. Defaults to false. */
27111
+ degradeDownTiers: external_exports.boolean().optional(),
27029
27112
  /** The reasoning effort used when the request's own effort is not one the backend accepts. */
27030
27113
  effort: external_exports.enum(ANTIGRAVITY_EFFORTS).optional(),
27031
27114
  /** Cloud-specific settings (for `mode: "cloud"`). */
@@ -33964,7 +34047,7 @@ function formatCredentialSummary(summary) {
33964
34047
  function describeCredential(credential) {
33965
34048
  return formatCredentialSummary(summariseCredential(credential));
33966
34049
  }
33967
- function isRecord2(value2) {
34050
+ function isRecord3(value2) {
33968
34051
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
33969
34052
  }
33970
34053
  function unpackKeyringToken(raw) {
@@ -33976,7 +34059,7 @@ function unpackKeyringToken(raw) {
33976
34059
  const base64Str = trimmed.slice(GO_KEYRING_BASE64_PREFIX.length);
33977
34060
  const decoded = Buffer.from(base64Str, "base64").toString("utf8");
33978
34061
  const parsed = JSON.parse(decoded);
33979
- if (isRecord2(parsed) && isRecord2(parsed.token)) {
34062
+ if (isRecord3(parsed) && isRecord3(parsed.token)) {
33980
34063
  const accessToken = parsed.token.access_token;
33981
34064
  if (typeof accessToken === "string" && accessToken.trim() !== "") {
33982
34065
  return accessToken.trim();
@@ -34089,7 +34172,7 @@ var init_package = __esm({
34089
34172
  "package.json"() {
34090
34173
  package_default = {
34091
34174
  name: "claude-use",
34092
- version: "11.17.1",
34175
+ version: "11.19.0",
34093
34176
  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.",
34094
34177
  license: "MIT",
34095
34178
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -35664,14 +35747,14 @@ function providerJsonPath(paths, name) {
35664
35747
  function providerExists(paths, name) {
35665
35748
  return import_node_fs10.default.existsSync(providerJsonPath(paths, name));
35666
35749
  }
35667
- function isRecord3(value2) {
35750
+ function isRecord4(value2) {
35668
35751
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
35669
35752
  }
35670
35753
  function legacyProviderConversion(raw) {
35671
- if (!isRecord3(raw) || "credential" in raw) {
35754
+ if (!isRecord4(raw) || "credential" in raw) {
35672
35755
  return void 0;
35673
35756
  }
35674
- const env = isRecord3(raw.env) ? raw.env : void 0;
35757
+ const env = isRecord4(raw.env) ? raw.env : void 0;
35675
35758
  const legacyEnvKeys = env === void 0 ? [] : Object.keys(env).filter((key) => LEGACY_ENV_CREDENTIAL_KEYS.includes(key));
35676
35759
  const fields = [...LEGACY_PROVIDER_FIELDS.filter((field) => field in raw), ...legacyEnvKeys.map((key) => `env.${key}`)];
35677
35760
  if (fields.length === 0) {
@@ -35704,10 +35787,11 @@ function parseProviderFile(filePath, raw) {
35704
35787
  if (conversion !== void 0) {
35705
35788
  throw new LegacyProviderFileError(filePath, conversion);
35706
35789
  }
35707
- const parsed = ProviderSchema.safeParse(raw);
35790
+ const parsed = parseIgnoringUnrecognisedKeys(ProviderSchema, raw);
35708
35791
  if (!parsed.success) {
35709
- throw new ConfigValidationError(filePath, parsed.error.issues);
35792
+ throw new ConfigValidationError(filePath, parsed.issues);
35710
35793
  }
35794
+ noteIgnoredKeys(filePath, parsed.ignored);
35711
35795
  return parsed.data;
35712
35796
  }
35713
35797
  function readProvider(paths, name) {
@@ -35768,7 +35852,7 @@ function isEmptyCodexConfig(config2) {
35768
35852
  return config2 === void 0 || config2.defaultModel === void 0 && config2.effort === void 0 && config2.login === void 0 && (config2.models === void 0 || Object.keys(config2.models).length === 0);
35769
35853
  }
35770
35854
  function isEmptyAntigravityConfig(config2) {
35771
- return config2 === void 0 || config2.mode === void 0 && config2.defaultModel === void 0 && config2.effort === void 0 && config2.cloud === void 0 && config2.local === void 0 && (config2.models === void 0 || Object.keys(config2.models).length === 0);
35855
+ return config2 === void 0 || config2.mode === void 0 && config2.defaultModel === void 0 && config2.effort === void 0 && config2.degradeDownTiers === void 0 && config2.cloud === void 0 && config2.local === void 0 && (config2.models === void 0 || Object.keys(config2.models).length === 0);
35772
35856
  }
35773
35857
  function addProvider(paths, name, input2) {
35774
35858
  if (providerExists(paths, name)) {
@@ -35917,6 +36001,7 @@ var init_providersStore = __esm({
35917
36001
  import_node_path29 = __toESM(require("node:path"), 1);
35918
36002
  init_load();
35919
36003
  init_store();
36004
+ init_unrecognisedKeys();
35920
36005
  init_schema();
35921
36006
  init_cliError();
35922
36007
  init_credential();
@@ -63127,7 +63212,7 @@ function resolvePoolLaunch(params) {
63127
63212
  if (stickyRead.problem !== void 0) {
63128
63213
  log.warn(`agent-shim: ${stickyRead.problem}; ignoring the last-pick record`);
63129
63214
  }
63130
- const warned = /* @__PURE__ */ new Set();
63215
+ const warned2 = /* @__PURE__ */ new Set();
63131
63216
  for (; ; ) {
63132
63217
  const nowMs = params.now();
63133
63218
  let graph;
@@ -63151,8 +63236,8 @@ function resolvePoolLaunch(params) {
63151
63236
  }
63152
63237
  for (const gone of graph.missing) {
63153
63238
  const key = `${gone.pool}:${gone.identity}`;
63154
- if (!warned.has(key)) {
63155
- warned.add(key);
63239
+ if (!warned2.has(key)) {
63240
+ warned2.add(key);
63156
63241
  log.warn(`agent-shim: pool "${gone.pool}" names identity "${gone.identity}", which does not exist; skipping it`);
63157
63242
  }
63158
63243
  }
@@ -64034,11 +64119,11 @@ function buildCloudRequestBody(params) {
64034
64119
  }
64035
64120
  return JSON.stringify(params.request);
64036
64121
  }
64037
- function isRecord4(value2) {
64122
+ function isRecord5(value2) {
64038
64123
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
64039
64124
  }
64040
64125
  function isGeminiChunk(value2) {
64041
- return isRecord4(value2);
64126
+ return isRecord5(value2);
64042
64127
  }
64043
64128
  async function* callCloudAntigravity(params, fetchFn = fetch) {
64044
64129
  const url2 = buildCloudUrl(params.config, params.model);
@@ -64073,8 +64158,8 @@ async function* callCloudAntigravity(params, fetchFn = fetch) {
64073
64158
  if (jsonStr.length > 0) {
64074
64159
  try {
64075
64160
  const parsed = JSON.parse(jsonStr);
64076
- if (isRecord4(parsed)) {
64077
- const unwrapped = isRecord4(parsed.response) ? parsed.response : parsed;
64161
+ if (isRecord5(parsed)) {
64162
+ const unwrapped = isRecord5(parsed.response) ? parsed.response : parsed;
64078
64163
  if (isGeminiChunk(unwrapped)) {
64079
64164
  yield unwrapped;
64080
64165
  }
@@ -115100,7 +115185,7 @@ var LiveTaskSchema = external_exports.strictObject({
115100
115185
  observedAt: external_exports.number()
115101
115186
  });
115102
115187
  var SYSTEM_SUBTYPES = ["task_started", "task_progress", "task_updated", "task_notification", "background_tasks_changed"];
115103
- function isRecord5(value2) {
115188
+ function isRecord6(value2) {
115104
115189
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
115105
115190
  }
115106
115191
  function stringField(record2, field) {
@@ -115117,7 +115202,7 @@ function booleanField(record2, field) {
115117
115202
  }
115118
115203
  function usageOf(record2) {
115119
115204
  const raw = record2.usage;
115120
- if (!isRecord5(raw)) {
115205
+ if (!isRecord6(raw)) {
115121
115206
  return void 0;
115122
115207
  }
115123
115208
  const totalTokens = numberField(raw, "total_tokens");
@@ -115149,7 +115234,7 @@ function bounded(book) {
115149
115234
  return book;
115150
115235
  }
115151
115236
  function applyAgentTaskEvent(book, sessionId, payload, observedAt2) {
115152
- if (!isRecord5(payload) || payload.type !== "system") {
115237
+ if (!isRecord6(payload) || payload.type !== "system") {
115153
115238
  return book;
115154
115239
  }
115155
115240
  const subtype = payload.subtype;
@@ -115165,8 +115250,8 @@ function applyAgentTaskEvent(book, sessionId, payload, observedAt2) {
115165
115250
  if (subtype === "background_tasks_changed") {
115166
115251
  const tasks = Array.isArray(payload.tasks) ? payload.tasks : [];
115167
115252
  for (const raw of tasks) {
115168
- const taskId2 = isRecord5(raw) ? stringField(raw, "task_id") : void 0;
115169
- if (isRecord5(raw) && taskId2 !== void 0) {
115253
+ const taskId2 = isRecord6(raw) ? stringField(raw, "task_id") : void 0;
115254
+ if (isRecord6(raw) && taskId2 !== void 0) {
115170
115255
  upsert(taskId2, { runId: stringField(raw, "run_id"), taskType: stringField(raw, "task_type"), description: stringField(raw, "description") });
115171
115256
  }
115172
115257
  }
@@ -115189,7 +115274,7 @@ function applyAgentTaskEvent(book, sessionId, payload, observedAt2) {
115189
115274
  } else if (subtype === "task_progress") {
115190
115275
  upsert(taskId, { ...common, subagentType: stringField(payload, "subagent_type"), lastToolName: stringField(payload, "last_tool_name"), usage: usageOf(payload) });
115191
115276
  } else if (subtype === "task_updated") {
115192
- const patch = isRecord5(payload.patch) ? payload.patch : {};
115277
+ const patch = isRecord6(payload.patch) ? payload.patch : {};
115193
115278
  upsert(taskId, { runId: stringField(payload, "run_id"), status: stringField(patch, "status") });
115194
115279
  } else {
115195
115280
  upsert(taskId, { ...common, status: stringField(payload, "status"), outputFile: stringField(payload, "output_file"), summary: stringField(payload, "summary"), usage: usageOf(payload) });
@@ -115271,7 +115356,7 @@ function sessionCreateId(body) {
115271
115356
  const id2 = session.id;
115272
115357
  return typeof id2 === "string" && id2.startsWith(RC_SESSION_ID_PREFIX) ? id2 : void 0;
115273
115358
  }
115274
- function isRecord6(value2) {
115359
+ function isRecord7(value2) {
115275
115360
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
115276
115361
  }
115277
115362
  function parseJsonObject(body) {
@@ -115281,7 +115366,7 @@ function parseJsonObject(body) {
115281
115366
  } catch {
115282
115367
  return void 0;
115283
115368
  }
115284
- return isRecord6(parsed) ? parsed : void 0;
115369
+ return isRecord7(parsed) ? parsed : void 0;
115285
115370
  }
115286
115371
  function nonEmptyString(record2, field) {
115287
115372
  const value2 = record2 === void 0 ? void 0 : record2[field];
@@ -115302,11 +115387,11 @@ function payloadEventsOf(body) {
115302
115387
  }
115303
115388
  const payloads = [];
115304
115389
  for (const event of events) {
115305
- if (!isRecord6(event)) {
115390
+ if (!isRecord7(event)) {
115306
115391
  continue;
115307
115392
  }
115308
115393
  const payload = event.payload;
115309
- if (!isRecord6(payload)) {
115394
+ if (!isRecord7(payload)) {
115310
115395
  continue;
115311
115396
  }
115312
115397
  payloads.push(payload);
@@ -115321,7 +115406,7 @@ function pendingOfControlRequestPayload(payload) {
115321
115406
  if (requestId === void 0) {
115322
115407
  return void 0;
115323
115408
  }
115324
- const request7 = isRecord6(payload.request) ? payload.request : void 0;
115409
+ const request7 = isRecord7(payload.request) ? payload.request : void 0;
115325
115410
  const subtype = nonEmptyString(request7, "subtype");
115326
115411
  const type2 = subtype ?? "control_request";
115327
115412
  let summary = "";
@@ -115338,7 +115423,7 @@ function answeredRequestIdsOfControlResponsePayload(payload) {
115338
115423
  if (payload.type !== "control_response") {
115339
115424
  return [];
115340
115425
  }
115341
- const response = isRecord6(payload.response) ? payload.response : void 0;
115426
+ const response = isRecord7(payload.response) ? payload.response : void 0;
115342
115427
  const id2 = nonEmptyString(response, "request_id") ?? nonEmptyString(payload, "request_id") ?? nonEmptyString(payload, "uuid");
115343
115428
  return id2 === void 0 ? [] : [id2];
115344
115429
  }
@@ -115567,7 +115652,7 @@ function createRcSessionTracker(deps) {
115567
115652
  return;
115568
115653
  }
115569
115654
  entry.sequenceNum = entry.sequenceNum === void 0 || event.sequence_num > entry.sequenceNum ? event.sequence_num : entry.sequenceNum;
115570
- if (!isRecord6(event.payload)) {
115655
+ if (!isRecord7(event.payload)) {
115571
115656
  return;
115572
115657
  }
115573
115658
  entry.liveTasks = applyAgentTaskEvent(entry.liveTasks, sessionId, event.payload, deps.now());
@@ -117141,6 +117226,7 @@ function identitySignIn(fs24, probe, identity) {
117141
117226
 
117142
117227
  // src/doctorReport.ts
117143
117228
  init_load();
117229
+ init_unrecognisedKeys();
117144
117230
  init_schema();
117145
117231
  init_credential();
117146
117232
  init_credentialCache();
@@ -117351,11 +117437,11 @@ function validateJson(schema, input2) {
117351
117437
  } catch (error63) {
117352
117438
  return { ok: false, message: `${input2.path} is not valid JSON: ${error63 instanceof Error ? error63.message : String(error63)}` };
117353
117439
  }
117354
- const result = schema.safeParse(parsed);
117440
+ const result = parseIgnoringUnrecognisedKeys(schema, parsed);
117355
117441
  if (!result.success) {
117356
- return { ok: false, message: new ConfigValidationError(input2.path, result.error.issues).message };
117442
+ return { ok: false, message: new ConfigValidationError(input2.path, result.issues).message };
117357
117443
  }
117358
- return { ok: true, data: result.data };
117444
+ return { ok: true, data: result.data, ...result.ignored.length === 0 ? {} : { warning: describeIgnoredKeys(input2.path, result.ignored) } };
117359
117445
  }
117360
117446
  function tcpPortEraRecord(raw) {
117361
117447
  let parsed;
@@ -117448,11 +117534,14 @@ function pushProvider(push, entry, cacheEnv, signIn) {
117448
117534
  push("provider", "fail", new LegacyProviderFileError(entry.path, conversion).message, entry.name);
117449
117535
  return;
117450
117536
  }
117451
- const validated2 = ProviderSchema.safeParse(parsed);
117537
+ const validated2 = parseIgnoringUnrecognisedKeys(ProviderSchema, parsed);
117452
117538
  if (!validated2.success) {
117453
- push("provider", "fail", new ConfigValidationError(entry.path, validated2.error.issues).message, entry.name);
117539
+ push("provider", "fail", new ConfigValidationError(entry.path, validated2.issues).message, entry.name);
117454
117540
  return;
117455
117541
  }
117542
+ if (validated2.ignored.length > 0) {
117543
+ push("provider", "warn", describeIgnoredKeys(entry.path, validated2.ignored), entry.name);
117544
+ }
117456
117545
  const cache = cacheClause(cacheEnv, `provider ${entry.name}`, validated2.data.credential);
117457
117546
  push("provider", cache.unreadable ? "fail" : "pass", `${entry.name} is valid (${describeProviderEndpoint(validated2.data)}, credential ${describeCredential(validated2.data.credential)})${cache.text}.`, entry.name);
117458
117547
  if (validated2.data.env?.ENABLE_TOOL_SEARCH === void 0) {
@@ -117487,6 +117576,13 @@ function runDoctor(params) {
117487
117576
  const push = (section, severity, message, subject) => {
117488
117577
  findings.push({ section, severity, message, ...subject === void 0 ? {} : { subject } });
117489
117578
  };
117579
+ const validate2 = (schema, input2, section, subject) => {
117580
+ const validated2 = validateJson(schema, input2);
117581
+ if (validated2.ok && validated2.warning !== void 0) {
117582
+ push(section, "warn", validated2.warning, subject);
117583
+ }
117584
+ return validated2;
117585
+ };
117490
117586
  const checkPin = (section, subject, where, version2) => {
117491
117587
  const installed = params.installedClaudeVersions;
117492
117588
  if (version2 === void 0 || installed === void 0 || installed.includes(version2)) {
@@ -117526,7 +117622,7 @@ function runDoctor(params) {
117526
117622
  pushLegacyName(push, params);
117527
117623
  const profileSources = /* @__PURE__ */ new Map();
117528
117624
  for (const entry of params.configProfiles) {
117529
- const validated2 = validateJson(ConfigProfileSchema, entry);
117625
+ const validated2 = validate2(ConfigProfileSchema, entry, "config-profile", entry.name);
117530
117626
  if (!validated2.ok) {
117531
117627
  push("config-profile", "fail", validated2.message, entry.name);
117532
117628
  continue;
@@ -117548,7 +117644,7 @@ function runDoctor(params) {
117548
117644
  const validProfileNames = new Set(profileSources.keys());
117549
117645
  const validIdentityNames = /* @__PURE__ */ new Set();
117550
117646
  for (const entry of params.identities) {
117551
- const validated2 = validateJson(IdentitySchema, entry);
117647
+ const validated2 = validate2(IdentitySchema, entry, "identity", entry.name);
117552
117648
  if (!validated2.ok) {
117553
117649
  push("identity", "fail", validated2.message, entry.name);
117554
117650
  continue;
@@ -117634,7 +117730,7 @@ function runDoctor(params) {
117634
117730
  if (params.directoryRules.raw === void 0) {
117635
117731
  push("directory-rules", "pass", "No directory-rules.json configured.");
117636
117732
  } else {
117637
- const validated2 = validateJson(DirectoryRulesSchema, params.directoryRules);
117733
+ const validated2 = validate2(DirectoryRulesSchema, params.directoryRules, "directory-rules");
117638
117734
  if (!validated2.ok) {
117639
117735
  push("directory-rules", "fail", validated2.message);
117640
117736
  } else {
@@ -117659,7 +117755,7 @@ function runDoctor(params) {
117659
117755
  if (params.globalConfig.raw === void 0) {
117660
117756
  push("global-config", "pass", "No config.json configured.");
117661
117757
  } else {
117662
- const validated2 = validateJson(GlobalConfigSchema, params.globalConfig);
117758
+ const validated2 = validate2(GlobalConfigSchema, params.globalConfig, "global-config");
117663
117759
  if (!validated2.ok) {
117664
117760
  push("global-config", "fail", validated2.message);
117665
117761
  } else {
@@ -117679,7 +117775,7 @@ function runDoctor(params) {
117679
117775
  if (params.categoriesLocal.raw === void 0) {
117680
117776
  push("categories-local", "pass", "No categories.local.json configured.");
117681
117777
  } else {
117682
- const validated2 = validateJson(CategoryClassificationOverlaySchema, params.categoriesLocal);
117778
+ const validated2 = validate2(CategoryClassificationOverlaySchema, params.categoriesLocal, "categories-local");
117683
117779
  push(
117684
117780
  "categories-local",
117685
117781
  validated2.ok ? "pass" : "fail",
@@ -120445,7 +120541,7 @@ var HTTP_METHODS_UP_TO_V31 = [
120445
120541
  function operationFields(convert) {
120446
120542
  return Object.fromEntries(HTTP_METHODS_UP_TO_V31.map((method) => [method, convert]));
120447
120543
  }
120448
- function isRecord7(value2) {
120544
+ function isRecord8(value2) {
120449
120545
  if (typeof value2 !== "object" || value2 === null) {
120450
120546
  return false;
120451
120547
  }
@@ -120465,7 +120561,7 @@ function setOwn2(object3, key, value2) {
120465
120561
  }
120466
120562
  }
120467
120563
  function cloneValue(value2, seen) {
120468
- if (!(Array.isArray(value2) || isRecord7(value2))) {
120564
+ if (!(Array.isArray(value2) || isRecord8(value2))) {
120469
120565
  return value2;
120470
120566
  }
120471
120567
  const existing = seen.get(value2);
@@ -120488,14 +120584,14 @@ function cloneValue(value2, seen) {
120488
120584
  return out;
120489
120585
  }
120490
120586
  function deepClone(value2) {
120491
- if (!(Array.isArray(value2) || isRecord7(value2))) {
120587
+ if (!(Array.isArray(value2) || isRecord8(value2))) {
120492
120588
  return value2;
120493
120589
  }
120494
120590
  return cloneValue(value2, /* @__PURE__ */ new WeakMap());
120495
120591
  }
120496
120592
  var converting = /* @__PURE__ */ new WeakMap();
120497
120593
  function convertRecord(value2, fields, finish) {
120498
- if (!isRecord7(value2)) {
120594
+ if (!isRecord8(value2)) {
120499
120595
  return deepClone(value2);
120500
120596
  }
120501
120597
  const inProgress = converting.get(value2);
@@ -120521,7 +120617,7 @@ function convertRecord(value2, fields, finish) {
120521
120617
  }
120522
120618
  }
120523
120619
  function mapRecord(value2, convert) {
120524
- if (!isRecord7(value2)) {
120620
+ if (!isRecord8(value2)) {
120525
120621
  return deepClone(value2);
120526
120622
  }
120527
120623
  const out = {};
@@ -120540,7 +120636,7 @@ function mapArray(value2, convert) {
120540
120636
  return value2.map((item) => convert(item)).filter((item) => item !== DROP);
120541
120637
  }
120542
120638
  function getRef(value2) {
120543
- if (isRecord7(value2) && typeof value2.$ref === "string") {
120639
+ if (isRecord8(value2) && typeof value2.$ref === "string") {
120544
120640
  return value2.$ref;
120545
120641
  }
120546
120642
  return void 0;
@@ -120746,7 +120842,7 @@ function convertSchema2(schema) {
120746
120842
  if (schema === false) {
120747
120843
  return { not: {} };
120748
120844
  }
120749
- if (isRecord7(schema) && typeof schema.$ref === "string" && Object.keys(schema).length === 1) {
120845
+ if (isRecord8(schema) && typeof schema.$ref === "string" && Object.keys(schema).length === 1) {
120750
120846
  return { $ref: schema.$ref };
120751
120847
  }
120752
120848
  return convertRecord(schema, SCHEMA_FIELDS, finishSchema);
@@ -120758,7 +120854,7 @@ function resolveSchemeType(name, schemes, seen) {
120758
120854
  return void 0;
120759
120855
  }
120760
120856
  const scheme = schemes[name];
120761
- if (!isRecord7(scheme)) {
120857
+ if (!isRecord8(scheme)) {
120762
120858
  return void 0;
120763
120859
  }
120764
120860
  if (typeof scheme.type === "string") {
@@ -120775,11 +120871,11 @@ function resolveSchemeType(name, schemes, seen) {
120775
120871
  return void 0;
120776
120872
  }
120777
120873
  function createContext(spec) {
120778
- const components = isRecord7(spec) ? spec.components : void 0;
120779
- const pathItems = isRecord7(components) ? components.pathItems : void 0;
120780
- const schemes = isRecord7(components) ? components.securitySchemes : void 0;
120874
+ const components = isRecord8(spec) ? spec.components : void 0;
120875
+ const pathItems = isRecord8(components) ? components.pathItems : void 0;
120876
+ const schemes = isRecord8(components) ? components.securitySchemes : void 0;
120781
120877
  const schemeTypes = /* @__PURE__ */ new Map();
120782
- if (isRecord7(schemes)) {
120878
+ if (isRecord8(schemes)) {
120783
120879
  for (const name of Object.keys(schemes)) {
120784
120880
  const type2 = resolveSchemeType(name, schemes, /* @__PURE__ */ new Set());
120785
120881
  if (type2 !== void 0) {
@@ -120789,7 +120885,7 @@ function createContext(spec) {
120789
120885
  }
120790
120886
  return {
120791
120887
  inlining: /* @__PURE__ */ new Set(),
120792
- pathItems: isRecord7(pathItems) ? pathItems : void 0,
120888
+ pathItems: isRecord8(pathItems) ? pathItems : void 0,
120793
120889
  schemeTypes
120794
120890
  };
120795
120891
  }
@@ -120797,7 +120893,7 @@ function isMutualTls(name, context) {
120797
120893
  return context.schemeTypes.get(name) === "mutualTLS";
120798
120894
  }
120799
120895
  function convertRequirement(value2, context) {
120800
- if (!isRecord7(value2)) {
120896
+ if (!isRecord8(value2)) {
120801
120897
  return deepClone(value2);
120802
120898
  }
120803
120899
  const entries = Object.entries(value2);
@@ -120897,10 +120993,10 @@ function resolvePathItemRef(value2, context) {
120897
120993
  return void 0;
120898
120994
  }
120899
120995
  const target = context.pathItems[name];
120900
- return isRecord7(target) ? [name, target] : void 0;
120996
+ return isRecord8(target) ? [name, target] : void 0;
120901
120997
  }
120902
120998
  function convertPathItem(value2, context) {
120903
- if (!isRecord7(value2)) {
120999
+ if (!isRecord8(value2)) {
120904
121000
  return deepClone(value2);
120905
121001
  }
120906
121002
  const resolved = resolvePathItemRef(value2, context);
@@ -121000,7 +121096,7 @@ function convertExample(value2) {
121000
121096
  });
121001
121097
  }
121002
121098
  function isQuerystringParameter(value2) {
121003
- return isRecord7(value2) && value2.in === "querystring";
121099
+ return isRecord8(value2) && value2.in === "querystring";
121004
121100
  }
121005
121101
  function isRemovedRef(value2, removed) {
121006
121102
  const ref = getRef(value2);
@@ -121016,7 +121112,7 @@ function convertParameterOrHeader2(value2, context) {
121016
121112
  style: (item) => item === "cookie" ? DROP : deepClone(item)
121017
121113
  },
121018
121114
  (out, parameter) => {
121019
- const lostContent = isRecord7(parameter.content) && Object.keys(parameter.content).length > 0 && isRecord7(out.content) && Object.keys(out.content).length === 0;
121115
+ const lostContent = isRecord8(parameter.content) && Object.keys(parameter.content).length > 0 && isRecord8(out.content) && Object.keys(out.content).length === 0;
121020
121116
  return lostContent ? DROP : out;
121021
121117
  }
121022
121118
  );
@@ -121137,7 +121233,7 @@ function convertComponents2(value2, context) {
121137
121233
  });
121138
121234
  }
121139
121235
  function losesEntireContent(value2, mediaTypes) {
121140
- if (!(isRecord7(value2) && isRecord7(value2.content))) {
121236
+ if (!(isRecord8(value2) && isRecord8(value2.content))) {
121141
121237
  return false;
121142
121238
  }
121143
121239
  const entries = Object.values(value2.content);
@@ -121145,7 +121241,7 @@ function losesEntireContent(value2, mediaTypes) {
121145
121241
  }
121146
121242
  function indexRemovedComponentRefs(map2, prefix, mediaTypes, isDirectlyRemoved) {
121147
121243
  const removed = /* @__PURE__ */ new Set();
121148
- if (!isRecord7(map2)) {
121244
+ if (!isRecord8(map2)) {
121149
121245
  return removed;
121150
121246
  }
121151
121247
  const entries = Object.entries(map2);
@@ -121167,12 +121263,12 @@ function indexRemovedComponentRefs(map2, prefix, mediaTypes, isDirectlyRemoved)
121167
121263
  return removed;
121168
121264
  }
121169
121265
  function createContext2(spec) {
121170
- const components = isRecord7(spec) ? spec.components : void 0;
121171
- const mediaTypes = isRecord7(components) && isRecord7(components.mediaTypes) ? components.mediaTypes : void 0;
121266
+ const components = isRecord8(spec) ? spec.components : void 0;
121267
+ const mediaTypes = isRecord8(components) && isRecord8(components.mediaTypes) ? components.mediaTypes : void 0;
121172
121268
  return {
121173
121269
  mediaTypes,
121174
- removedHeaderRefs: indexRemovedComponentRefs(isRecord7(components) ? components.headers : void 0, HEADERS_REF_PREFIX, mediaTypes, () => false),
121175
- removedParameterRefs: indexRemovedComponentRefs(isRecord7(components) ? components.parameters : void 0, PARAMETERS_REF_PREFIX, mediaTypes, isQuerystringParameter)
121270
+ removedHeaderRefs: indexRemovedComponentRefs(isRecord8(components) ? components.headers : void 0, HEADERS_REF_PREFIX, mediaTypes, () => false),
121271
+ removedParameterRefs: indexRemovedComponentRefs(isRecord8(components) ? components.parameters : void 0, PARAMETERS_REF_PREFIX, mediaTypes, isQuerystringParameter)
121176
121272
  };
121177
121273
  }
121178
121274
  function convertJsonSchemaDialect(value2) {
@@ -127921,11 +128017,11 @@ function antigravityQuotaExhaustion(quota, model, nowMs) {
127921
128017
  const binding = spent.reduce((latest, next) => latest === void 0 || next.resetSec > latest.resetSec ? next : latest, void 0);
127922
128018
  return binding === void 0 ? void 0 : { window: binding.window, resetSec: binding.resetSec, exhaustedWindows: spent.map((entry) => entry.window) };
127923
128019
  }
127924
- function isRecord8(value2) {
128020
+ function isRecord9(value2) {
127925
128021
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
127926
128022
  }
127927
128023
  function bucketToEntry(bucket, nowMs) {
127928
- if (!isRecord8(bucket) || typeof bucket.bucketId !== "string") {
128024
+ if (!isRecord9(bucket) || typeof bucket.bucketId !== "string") {
127929
128025
  return void 0;
127930
128026
  }
127931
128027
  const remainingFraction = typeof bucket.remainingFraction === "number" && Number.isFinite(bucket.remainingFraction) ? bucket.remainingFraction : void 0;
@@ -127967,12 +128063,12 @@ async function fetchAntigravityQuotaSummary(params) {
127967
128063
  } catch {
127968
128064
  return void 0;
127969
128065
  }
127970
- if (!isRecord8(parsed) || !Array.isArray(parsed.groups)) {
128066
+ if (!isRecord9(parsed) || !Array.isArray(parsed.groups)) {
127971
128067
  return void 0;
127972
128068
  }
127973
128069
  const map2 = {};
127974
128070
  for (const group of parsed.groups) {
127975
- if (!isRecord8(group) || !Array.isArray(group.buckets)) {
128071
+ if (!isRecord9(group) || !Array.isArray(group.buckets)) {
127976
128072
  continue;
127977
128073
  }
127978
128074
  for (const bucket of group.buckets) {
@@ -128059,6 +128155,7 @@ function resolveAntigravityConfig(config2) {
128059
128155
  defaultModel: config2?.defaultModel ?? ANTIGRAVITY_DEFAULT_MODEL,
128060
128156
  models: { fable: tierModel("fable"), opus: tierModel("opus"), sonnet: tierModel("sonnet"), haiku: tierModel("haiku") },
128061
128157
  aliases,
128158
+ degradeDownTiers: config2?.degradeDownTiers ?? false,
128062
128159
  effort: config2?.effort ?? ANTIGRAVITY_DEFAULT_EFFORT,
128063
128160
  cloud: {
128064
128161
  endpoint: config2?.cloud?.endpoint,
@@ -128077,18 +128174,25 @@ var BACKEND_CLAUDE_NAME = /^claude-.+-(?:low|medium|high|thinking)$/;
128077
128174
  function isBackendModelName(name) {
128078
128175
  return BACKEND_FAMILY_PREFIXES.some((prefix) => name.startsWith(prefix)) || BACKEND_CLAUDE_NAME.test(name);
128079
128176
  }
128080
- function mapModel2(requested, config2) {
128177
+ function resolveName(requested, config2) {
128081
128178
  const stripped = requested.toLowerCase().endsWith(CONTEXT_MARKER_1M) ? requested.slice(0, -CONTEXT_MARKER_1M.length) : requested;
128082
128179
  const lower = stripped.toLowerCase();
128083
128180
  const alias = config2.aliases.get(lower);
128084
128181
  if (alias !== void 0) {
128085
- return alias;
128182
+ return { candidates: alias, tier: void 0 };
128086
128183
  }
128087
128184
  if (isBackendModelName(stripped)) {
128088
- return [stripped];
128185
+ return { candidates: [stripped], tier: void 0 };
128089
128186
  }
128090
128187
  const tier = ANTIGRAVITY_TIERS.find((candidate) => lower.includes(candidate));
128091
- return tier === void 0 ? [config2.defaultModel] : config2.models[tier];
128188
+ return tier === void 0 ? { candidates: [config2.defaultModel], tier: void 0 } : { candidates: config2.models[tier], tier };
128189
+ }
128190
+ function candidateStages(requested, config2) {
128191
+ const { candidates, tier } = resolveName(requested, config2);
128192
+ if (!config2.degradeDownTiers || tier === void 0) {
128193
+ return [candidates];
128194
+ }
128195
+ return ANTIGRAVITY_TIERS.slice(ANTIGRAVITY_TIERS.indexOf(tier)).map((name) => config2.models[name]);
128092
128196
  }
128093
128197
  function chooseCandidate(candidates, routing) {
128094
128198
  const first = candidates[0];
@@ -128188,7 +128292,7 @@ function turnBlocks2(message) {
128188
128292
  }
128189
128293
  return blocks.map((block2) => isTextBlock(block2) ? { ...block2, text: systemReminder2(block2.text) } : block2);
128190
128294
  }
128191
- function isRecord9(value2) {
128295
+ function isRecord10(value2) {
128192
128296
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
128193
128297
  }
128194
128298
  function messagesToGeminiContents(messages, names, toolIdToName) {
@@ -128234,7 +128338,7 @@ function messagesToGeminiContents(messages, names, toolIdToName) {
128234
128338
  ensureRole("model").push({
128235
128339
  functionCall: {
128236
128340
  name: sanitizedName,
128237
- args: isRecord9(block2.input) ? block2.input : {}
128341
+ args: isRecord10(block2.input) ? block2.input : {}
128238
128342
  },
128239
128343
  // The relay remembered the signature the backend attached to this exact call; echoing it back is what the backend requires of a repeated function call. A call with none remembered (made before a door restart, evicted from the bounded store, or produced by another model in a resumed session) gets the backend's documented bypass, since history is resent whole on every request and a single unsigned call would otherwise fail the whole conversation for good.
128240
128344
  thoughtSignature: signature ?? UNVERIFIED_THOUGHT_SIGNATURE
@@ -128290,10 +128394,29 @@ function completeEffortSuffix(model, request7, config2) {
128290
128394
  const suffixed = `${model}-${effortSuffixOf(level)}`;
128291
128395
  return configured.some((entry) => entry === suffixed || splitEffortSuffix(entry)?.base === model) ? suffixed : model;
128292
128396
  }
128397
+ function chooseAcrossStages(stages, routing) {
128398
+ const own2 = stages[0];
128399
+ if (own2 === void 0) {
128400
+ throw new Error("A request resolves to at least one candidate list");
128401
+ }
128402
+ if (routing === void 0) {
128403
+ return chooseCandidate(own2, void 0);
128404
+ }
128405
+ for (const [index, stage] of stages.entries()) {
128406
+ const picked = chooseCandidate(stage, index === 0 ? routing : { quota: routing.quota, nowMs: routing.nowMs });
128407
+ if (antigravityQuotaExhaustion(routing.quota, picked, routing.nowMs) === void 0) {
128408
+ return picked;
128409
+ }
128410
+ }
128411
+ return chooseCandidate(own2, routing);
128412
+ }
128293
128413
  function translateRequest2(request7, config2, routing) {
128294
128414
  const toolNames = /* @__PURE__ */ new Map();
128295
128415
  const toolIdToName = /* @__PURE__ */ new Map();
128296
- const model = chooseCandidate(mapModel2(request7.model ?? "", config2).map((candidate) => completeEffortSuffix(candidate, request7, config2)), routing);
128416
+ const model = chooseAcrossStages(
128417
+ candidateStages(request7.model ?? "", config2).map((stage) => stage.map((candidate) => completeEffortSuffix(candidate, request7, config2))),
128418
+ routing
128419
+ );
128297
128420
  const thinkingBudget = mapEffort2(request7, config2);
128298
128421
  const systemInstruction = systemToInstruction(request7.system);
128299
128422
  const contents = messagesToGeminiContents(request7.messages, toolNames, toolIdToName);
@@ -129154,7 +129277,7 @@ var AcpStreamMessageSchema = external_exports.looseObject({
129154
129277
  chunk: external_exports.looseObject({}).optional()
129155
129278
  }).optional()
129156
129279
  });
129157
- function isRecord10(value2) {
129280
+ function isRecord11(value2) {
129158
129281
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
129159
129282
  }
129160
129283
  function normalizeFinishReason(reason) {
@@ -129179,7 +129302,7 @@ function parseJsonRecord(raw) {
129179
129302
  }
129180
129303
  try {
129181
129304
  const parsed = JSON.parse(raw);
129182
- if (isRecord10(parsed)) {
129305
+ if (isRecord11(parsed)) {
129183
129306
  return parsed;
129184
129307
  }
129185
129308
  } catch {
@@ -129954,15 +130077,15 @@ function readFrontDoorControlMaterial(fsPort, paths, purpose) {
129954
130077
 
129955
130078
  // src/frontdoor/rcLiveUsage.ts
129956
130079
  var RC_RATE_LIMIT_EVENT_TYPE = "rate_limit_event";
129957
- function isRecord11(value2) {
130080
+ function isRecord12(value2) {
129958
130081
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
129959
130082
  }
129960
130083
  function rcRateLimitInfoOf(event) {
129961
130084
  const payload = event.envelope.payload;
129962
- if (!isRecord11(payload) || payload.type !== RC_RATE_LIMIT_EVENT_TYPE) {
130085
+ if (!isRecord12(payload) || payload.type !== RC_RATE_LIMIT_EVENT_TYPE) {
129963
130086
  return void 0;
129964
130087
  }
129965
- if (!isRecord11(payload.rate_limit_info)) {
130088
+ if (!isRecord12(payload.rate_limit_info)) {
129966
130089
  return void 0;
129967
130090
  }
129968
130091
  const parsed = RcRateLimitInfoSchema.safeParse(payload.rate_limit_info);
@@ -129998,7 +130121,7 @@ var RC_SELF_HOST_SCOPE_LIST = ["user:profile", "user:inference", "user:sessions:
129998
130121
  var RC_SELF_HOST_OAUTH_TOKEN_TTL_SECONDS = 3600;
129999
130122
  var MS_PER_SECOND11 = 1e3;
130000
130123
  var HTTP_SERVICE_UNAVAILABLE = 503;
130001
- function isRecord12(value2) {
130124
+ function isRecord13(value2) {
130002
130125
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
130003
130126
  }
130004
130127
  function parseJsonObject2(body) {
@@ -130008,7 +130131,7 @@ function parseJsonObject2(body) {
130008
130131
  } catch {
130009
130132
  return void 0;
130010
130133
  }
130011
- return isRecord12(parsed) ? parsed : void 0;
130134
+ return isRecord13(parsed) ? parsed : void 0;
130012
130135
  }
130013
130136
  function growthBookFeatures() {
130014
130137
  return {
@@ -130102,7 +130225,7 @@ var RC_SELF_HOST_RECORD_DIR = "rc-selfhost";
130102
130225
  var RC_SELF_HOST_RECORD_FILE = "credential.json";
130103
130226
  var SELF_HOST_EMAIL = "selfhost@agent-shim.invalid";
130104
130227
  var SELF_HOST_SUBSCRIPTION_TYPE = "max";
130105
- function isRecord13(value2) {
130228
+ function isRecord14(value2) {
130106
130229
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
130107
130230
  }
130108
130231
  function readJsonObject(fs24, file2) {
@@ -130116,7 +130239,7 @@ function readJsonObject(fs24, file2) {
130116
130239
  } catch {
130117
130240
  return void 0;
130118
130241
  }
130119
- return isRecord13(parsed) ? parsed : void 0;
130242
+ return isRecord14(parsed) ? parsed : void 0;
130120
130243
  }
130121
130244
  function readRcSelfHostRecord(fs24, frontdoorDir) {
130122
130245
  const parsed = readJsonObject(fs24, import_node_path49.default.join(frontdoorDir, RC_SELF_HOST_RECORD_DIR, RC_SELF_HOST_RECORD_FILE));
@@ -130140,7 +130263,7 @@ function mintRcSelfHostCredential(deps) {
130140
130263
  const recordFile = import_node_path49.default.join(recordDir, RC_SELF_HOST_RECORD_FILE);
130141
130264
  const previousRecord = readRcSelfHostRecord(deps.fs, deps.frontdoorDir);
130142
130265
  const existingCredentials = readJsonObject(deps.fs, credentialsFile);
130143
- const existingOauth = isRecord13(existingCredentials?.claudeAiOauth) ? existingCredentials.claudeAiOauth : void 0;
130266
+ const existingOauth = isRecord14(existingCredentials?.claudeAiOauth) ? existingCredentials.claudeAiOauth : void 0;
130144
130267
  const existingToken = typeof existingOauth?.accessToken === "string" && existingOauth.accessToken !== "" ? existingOauth.accessToken : void 0;
130145
130268
  const existingIsOwn = existingToken !== void 0 && previousRecord?.accessToken === existingToken;
130146
130269
  if (existingToken !== void 0 && !existingIsOwn && !deps.force) {
@@ -130157,7 +130280,7 @@ function mintRcSelfHostCredential(deps) {
130157
130280
  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)}
130158
130281
  `);
130159
130282
  const claudeJson = readJsonObject(deps.fs, claudeJsonFile) ?? {};
130160
- const existingBlock = (value2) => isRecord13(value2) ? value2 : {};
130283
+ const existingBlock = (value2) => isRecord14(value2) ? value2 : {};
130161
130284
  deps.fs.writeFilePrivate(claudeJsonFile, `${JSON.stringify({
130162
130285
  ...claudeJson,
130163
130286
  oauthAccount: {
@@ -130544,11 +130667,11 @@ var import_node_path50 = __toESM(require("node:path"), 1);
130544
130667
  function isSafeSessionId(sessionId) {
130545
130668
  return /^[A-Za-z0-9_-]+$/.test(sessionId);
130546
130669
  }
130547
- function isRecord14(value2) {
130670
+ function isRecord15(value2) {
130548
130671
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
130549
130672
  }
130550
130673
  function credentialOfJson(parsed) {
130551
- if (!isRecord14(parsed)) {
130674
+ if (!isRecord15(parsed)) {
130552
130675
  return void 0;
130553
130676
  }
130554
130677
  const { authorization, anthropicVersion, anthropicClientPlatform } = parsed;
@@ -130578,7 +130701,7 @@ function createRcCredentialStore(fs24, dir) {
130578
130701
  } catch {
130579
130702
  return void 0;
130580
130703
  }
130581
- return isRecord14(parsed) ? parsed : void 0;
130704
+ return isRecord15(parsed) ? parsed : void 0;
130582
130705
  };
130583
130706
  return {
130584
130707
  read: (sessionId) => {
@@ -131146,7 +131269,7 @@ init_capability();
131146
131269
  // src/frontdoor/rcSelfHostEndpoints.ts
131147
131270
  var RC_SOURCE_WORKER = "worker";
131148
131271
  var RC_SOURCE_CLIENT = "client";
131149
- function isRecord15(value2) {
131272
+ function isRecord16(value2) {
131150
131273
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
131151
131274
  }
131152
131275
  function parseJsonObject3(body) {
@@ -131156,7 +131279,7 @@ function parseJsonObject3(body) {
131156
131279
  } catch {
131157
131280
  return void 0;
131158
131281
  }
131159
- return isRecord15(parsed) ? parsed : void 0;
131282
+ return isRecord16(parsed) ? parsed : void 0;
131160
131283
  }
131161
131284
  function nonEmptyString2(record2, field) {
131162
131285
  const value2 = record2 === void 0 ? void 0 : record2[field];
@@ -131230,7 +131353,7 @@ async function serveRcClientChannels(ctx, tail, method, maxBatchEvents) {
131230
131353
  }
131231
131354
  const results = [];
131232
131355
  for (const event of events) {
131233
- if (!isRecord15(event) || !isRecord15(event.payload)) {
131356
+ if (!isRecord16(event) || !isRecord16(event.payload)) {
131234
131357
  await ctx.answerJson(response, HTTP_STATUS.badRequest, { type: "error", error: { type: "invalid_request_error", message: "every event in a teleport write is an object carrying one payload object" } });
131235
131358
  return true;
131236
131359
  }
@@ -131330,7 +131453,7 @@ async function serveRcCompatSessions(ctx, pathname, compatPath) {
131330
131453
  // src/frontdoor/rcSelfHostConversations.ts
131331
131454
  var RC_CONVERSATIONS_PATH_PREFIX = "/v1/code/conversations";
131332
131455
  var RC_CONVERSATION_ID_PREFIX = "conv_";
131333
- function isRecord16(value2) {
131456
+ function isRecord17(value2) {
131334
131457
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
131335
131458
  }
131336
131459
  function parseJsonObject4(body) {
@@ -131340,7 +131463,7 @@ function parseJsonObject4(body) {
131340
131463
  } catch {
131341
131464
  return void 0;
131342
131465
  }
131343
- return isRecord16(parsed) ? parsed : void 0;
131466
+ return isRecord17(parsed) ? parsed : void 0;
131344
131467
  }
131345
131468
  function nonEmptyString3(record2, field) {
131346
131469
  const value2 = record2 === void 0 ? void 0 : record2[field];
@@ -131394,7 +131517,7 @@ async function serveRcConversations(ctx, pathname, method) {
131394
131517
  }
131395
131518
  const results = [];
131396
131519
  for (const event of events) {
131397
- if (!isRecord16(event) || !isRecord16(event.payload)) {
131520
+ if (!isRecord17(event) || !isRecord17(event.payload)) {
131398
131521
  await ctx.answerJson(response, HTTP_STATUS.badRequest, { type: "error", error: { type: "invalid_request_error", message: "every event in a write is an object carrying one payload object" } });
131399
131522
  return;
131400
131523
  }
@@ -131687,7 +131810,7 @@ var RC_SELF_HOST_WORKER_EPOCH = 1;
131687
131810
  var RC_STREAM_EVENT_NAME = "client_event";
131688
131811
  var CONFLICT_REASON_HEADER2 = "x-ccr-conflict-reason";
131689
131812
  var CONFLICT_REASON_EPOCH_STALE = "epoch_stale";
131690
- function isRecord17(value2) {
131813
+ function isRecord18(value2) {
131691
131814
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
131692
131815
  }
131693
131816
  function isWebSearchRefusal(value2) {
@@ -131771,7 +131894,7 @@ function parseJsonObject5(body) {
131771
131894
  } catch {
131772
131895
  return void 0;
131773
131896
  }
131774
- return isRecord17(parsed) ? parsed : void 0;
131897
+ return isRecord18(parsed) ? parsed : void 0;
131775
131898
  }
131776
131899
  function mintWorkerJwt(randomToken, issuedAt) {
131777
131900
  const encode3 = (value2) => Buffer.from(JSON.stringify(value2), "utf8").toString("base64url");
@@ -132031,7 +132154,7 @@ data: ${JSON.stringify(envelope)}
132031
132154
  if (status !== void 0) {
132032
132155
  session.workerStatus = status;
132033
132156
  }
132034
- if (isRecord17(body?.external_metadata)) {
132157
+ if (isRecord18(body?.external_metadata)) {
132035
132158
  session.externalMetadata = body.external_metadata;
132036
132159
  }
132037
132160
  await answerJson2(response, HTTP_STATUS.ok, {});
@@ -132061,7 +132184,7 @@ data: ${JSON.stringify(envelope)}
132061
132184
  }
132062
132185
  const results = [];
132063
132186
  for (const event of events) {
132064
- if (!isRecord17(event) || !isRecord17(event.payload)) {
132187
+ if (!isRecord18(event) || !isRecord18(event.payload)) {
132065
132188
  await answerJson2(response, HTTP_STATUS.badRequest, { type: "error", error: { type: "invalid_request_error", message: "every event in a batch is an object carrying one payload object" } });
132066
132189
  return;
132067
132190
  }
@@ -132094,7 +132217,7 @@ data: ${JSON.stringify(envelope)}
132094
132217
  return;
132095
132218
  }
132096
132219
  for (const event of events) {
132097
- if (isRecord17(event)) {
132220
+ if (isRecord18(event)) {
132098
132221
  session.internalEvents.push({ eventId: deps.newUuid(), body: event });
132099
132222
  }
132100
132223
  }
@@ -132190,7 +132313,7 @@ data: ${JSON.stringify(envelope)}
132190
132313
  }
132191
132314
  const results = [];
132192
132315
  for (const event of events) {
132193
- if (!isRecord17(event) || !isRecord17(event.payload)) {
132316
+ if (!isRecord18(event) || !isRecord18(event.payload)) {
132194
132317
  await answerJson2(response, HTTP_STATUS.badRequest, { type: "error", error: { type: "invalid_request_error", message: "every event in a write is an object carrying one payload object" } });
132195
132318
  return;
132196
132319
  }
@@ -132380,7 +132503,7 @@ function createSseParser() {
132380
132503
  }
132381
132504
  };
132382
132505
  }
132383
- function isRecord18(value2) {
132506
+ function isRecord19(value2) {
132384
132507
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
132385
132508
  }
132386
132509
  function sequenceNumOf(value2) {
@@ -132402,7 +132525,7 @@ function parseRcStreamEnvelope(parsed) {
132402
132525
  } catch {
132403
132526
  return void 0;
132404
132527
  }
132405
- if (!isRecord18(data)) {
132528
+ if (!isRecord19(data)) {
132406
132529
  return void 0;
132407
132530
  }
132408
132531
  const eventType = data.event_type;
@@ -145064,7 +145187,7 @@ function toProviderView(name, provider) {
145064
145187
  };
145065
145188
  }
145066
145189
  function antigravityConfigFromOptions(options) {
145067
- if (options.antigravityMode === void 0 && options.antigravityDefaultModel === void 0 && options.antigravityModel === void 0 && options.antigravityEffort === void 0 && options.antigravityEndpoint === void 0 && options.antigravityProjectId === void 0 && options.antigravityLocation === void 0 && options.antigravityCommand === void 0 && options.antigravitySocket === void 0) {
145190
+ if (options.antigravityMode === void 0 && options.antigravityDefaultModel === void 0 && options.antigravityModel === void 0 && options.antigravityEffort === void 0 && options.antigravityDegradeDownTiers === void 0 && options.antigravityEndpoint === void 0 && options.antigravityProjectId === void 0 && options.antigravityLocation === void 0 && options.antigravityCommand === void 0 && options.antigravitySocket === void 0) {
145068
145191
  return void 0;
145069
145192
  }
145070
145193
  const cloud = options.antigravityEndpoint !== void 0 || options.antigravityProjectId !== void 0 || options.antigravityLocation !== void 0 ? {
@@ -145081,6 +145204,7 @@ function antigravityConfigFromOptions(options) {
145081
145204
  ...options.antigravityDefaultModel === void 0 ? {} : { defaultModel: options.antigravityDefaultModel },
145082
145205
  ...options.antigravityModel === void 0 ? {} : { models: Object.fromEntries(Object.entries(options.antigravityModel).map(([name, target]) => [name, target.includes(",") ? target.split(",") : target])) },
145083
145206
  ...options.antigravityEffort === void 0 ? {} : { effort: options.antigravityEffort },
145207
+ ...options.antigravityDegradeDownTiers === void 0 ? {} : { degradeDownTiers: options.antigravityDegradeDownTiers },
145084
145208
  ...cloud === void 0 ? {} : { cloud },
145085
145209
  ...local === void 0 ? {} : { local }
145086
145210
  };
@@ -145121,7 +145245,7 @@ function registerProviderCommand(program2, deps) {
145121
145245
  new Option("--credential-target <target>", "Where the token goes: bearer sets ANTHROPIC_AUTH_TOKEN (default), apiKey sets ANTHROPIC_API_KEY.").choices(
145122
145246
  PROVIDER_CREDENTIAL_TARGETS
145123
145247
  )
145124
- ).option("--env <KEY=VALUE>", "Extra environment entry for the child (repeatable).", collectStringPair).option("--codex-default-model <model>", "Codex providers: the codex model a request maps to when no tier matches.").option("--codex-model <tier=model>", "Codex providers: the codex model one tier (fable, opus, sonnet or haiku) maps to (repeatable).", collectStringPair).addOption(new Option("--codex-effort <effort>", "Codex providers: the reasoning effort when a request asks for none the backend accepts.").choices(CODEX_EFFORTS)).addOption(new Option("--codex-login <login>", "Codex providers: which login the upstream call uses, the Codex CLI's own login or a Sign in with ChatGPT grant from `agent-shim codex login`.").choices(CODEX_LOGINS)).addOption(new Option("--antigravity-mode <mode>", "Antigravity providers: cloud (direct Gemini/Vertex) or local (ACP daemon).").choices(ANTIGRAVITY_MODES)).option("--antigravity-default-model <model>", "Antigravity providers: the model a request maps to when no tier matches.").option("--antigravity-model <tier=model>", "Antigravity providers: the model a tier (fable, opus, sonnet or haiku, matched by substring) or an alias (any other name, matched whole, selectable with /model) maps to; a comma-separated list routes by available quota, first unspent first (repeatable).", collectStringPair).addOption(new Option("--antigravity-effort <effort>", "Antigravity providers: reasoning effort.").choices(ANTIGRAVITY_EFFORTS)).option("--antigravity-endpoint <url>", "Antigravity cloud providers: custom API endpoint URL.").option("--antigravity-project-id <id>", "Antigravity cloud providers: Google Cloud project ID (for Vertex AI).").option("--antigravity-location <loc>", "Antigravity cloud providers: Google Cloud location (for Vertex AI).").option("--antigravity-command <cmd...>", "Antigravity local providers: command to spawn ACP server.", collectRepeated).option("--antigravity-socket <path>", "Antigravity local providers: path to existing Unix domain socket.").option("--json", "Print the result as JSON.").action((name, options) => {
145248
+ ).option("--env <KEY=VALUE>", "Extra environment entry for the child (repeatable).", collectStringPair).option("--codex-default-model <model>", "Codex providers: the codex model a request maps to when no tier matches.").option("--codex-model <tier=model>", "Codex providers: the codex model one tier (fable, opus, sonnet or haiku) maps to (repeatable).", collectStringPair).addOption(new Option("--codex-effort <effort>", "Codex providers: the reasoning effort when a request asks for none the backend accepts.").choices(CODEX_EFFORTS)).addOption(new Option("--codex-login <login>", "Codex providers: which login the upstream call uses, the Codex CLI's own login or a Sign in with ChatGPT grant from `agent-shim codex login`.").choices(CODEX_LOGINS)).addOption(new Option("--antigravity-mode <mode>", "Antigravity providers: cloud (direct Gemini/Vertex) or local (ACP daemon).").choices(ANTIGRAVITY_MODES)).option("--antigravity-default-model <model>", "Antigravity providers: the model a request maps to when no tier matches.").option("--antigravity-model <tier=model>", "Antigravity providers: the model a tier (fable, opus, sonnet or haiku, matched by substring) or an alias (any other name, matched whole, selectable with /model) maps to; a comma-separated list routes by available quota, first unspent first (repeatable).", collectStringPair).addOption(new Option("--antigravity-effort <effort>", "Antigravity providers: reasoning effort.").choices(ANTIGRAVITY_EFFORTS)).option("--antigravity-degrade-down-tiers", "Antigravity providers: when every candidate of a tier has no quota left, serve the request from the tiers below it instead of failing.").option("--no-antigravity-degrade-down-tiers", "Antigravity providers: fail with the quota limit when a tier has no quota left (the default).").option("--antigravity-endpoint <url>", "Antigravity cloud providers: custom API endpoint URL.").option("--antigravity-project-id <id>", "Antigravity cloud providers: Google Cloud project ID (for Vertex AI).").option("--antigravity-location <loc>", "Antigravity cloud providers: Google Cloud location (for Vertex AI).").option("--antigravity-command <cmd...>", "Antigravity local providers: command to spawn ACP server.", collectRepeated).option("--antigravity-socket <path>", "Antigravity local providers: path to existing Unix domain socket.").option("--json", "Print the result as JSON.").action((name, options) => {
145125
145249
  const codex = codexConfigFromOptions(options);
145126
145250
  const antigravity = antigravityConfigFromOptions(options);
145127
145251
  const created = addProvider(paths, name, {
@@ -145157,7 +145281,7 @@ function registerProviderCommand(program2, deps) {
145157
145281
  new Option("--credential-target <target>", "Where the token goes: bearer sets ANTHROPIC_AUTH_TOKEN, apiKey sets ANTHROPIC_API_KEY.").choices(
145158
145282
  PROVIDER_CREDENTIAL_TARGETS
145159
145283
  )
145160
- ).option("--env <KEY=VALUE>", "Add or replace an environment entry for the child (repeatable).", collectStringPair).option("--unset-env <KEY>", "Remove an environment entry (repeatable).", collectRepeated).option("--codex-default-model <model>", "Codex providers: replace the model a request maps to when no tier matches.").option("--codex-model <tier=model>", "Codex providers: set the codex model one tier maps to (repeatable; other tiers are kept).", collectStringPair).addOption(new Option("--codex-effort <effort>", "Codex providers: replace the default reasoning effort.").choices(CODEX_EFFORTS)).addOption(new Option("--codex-login <login>", "Codex providers: replace which login the upstream call uses.").choices(CODEX_LOGINS)).addOption(new Option("--antigravity-mode <mode>", "Antigravity providers: cloud (direct Gemini/Vertex) or local (ACP daemon).").choices(ANTIGRAVITY_MODES)).option("--antigravity-default-model <model>", "Antigravity providers: the model a request maps to when no tier matches.").option("--antigravity-model <tier=model>", "Antigravity providers: set the model one tier maps to (repeatable; other tiers are kept).", collectStringPair).addOption(new Option("--antigravity-effort <effort>", "Antigravity providers: reasoning effort.").choices(ANTIGRAVITY_EFFORTS)).option("--antigravity-endpoint <url>", "Antigravity cloud providers: custom API endpoint URL.").option("--antigravity-project-id <id>", "Antigravity cloud providers: Google Cloud project ID (for Vertex AI).").option("--antigravity-location <loc>", "Antigravity cloud providers: Google Cloud location (for Vertex AI).").option("--antigravity-command <cmd...>", "Antigravity local providers: command to spawn ACP server.", collectRepeated).option("--antigravity-socket <path>", "Antigravity local providers: path to existing Unix domain socket.");
145284
+ ).option("--env <KEY=VALUE>", "Add or replace an environment entry for the child (repeatable).", collectStringPair).option("--unset-env <KEY>", "Remove an environment entry (repeatable).", collectRepeated).option("--codex-default-model <model>", "Codex providers: replace the model a request maps to when no tier matches.").option("--codex-model <tier=model>", "Codex providers: set the codex model one tier maps to (repeatable; other tiers are kept).", collectStringPair).addOption(new Option("--codex-effort <effort>", "Codex providers: replace the default reasoning effort.").choices(CODEX_EFFORTS)).addOption(new Option("--codex-login <login>", "Codex providers: replace which login the upstream call uses.").choices(CODEX_LOGINS)).addOption(new Option("--antigravity-mode <mode>", "Antigravity providers: cloud (direct Gemini/Vertex) or local (ACP daemon).").choices(ANTIGRAVITY_MODES)).option("--antigravity-default-model <model>", "Antigravity providers: the model a request maps to when no tier matches.").option("--antigravity-model <tier=model>", "Antigravity providers: set the model one tier maps to (repeatable; other tiers are kept).", collectStringPair).addOption(new Option("--antigravity-effort <effort>", "Antigravity providers: reasoning effort.").choices(ANTIGRAVITY_EFFORTS)).option("--antigravity-degrade-down-tiers", "Antigravity providers: when every candidate of a tier has no quota left, serve the request from the tiers below it instead of failing.").option("--no-antigravity-degrade-down-tiers", "Antigravity providers: fail with the quota limit when a tier has no quota left (the default).").option("--antigravity-endpoint <url>", "Antigravity cloud providers: custom API endpoint URL.").option("--antigravity-project-id <id>", "Antigravity cloud providers: Google Cloud project ID (for Vertex AI).").option("--antigravity-location <loc>", "Antigravity cloud providers: Google Cloud location (for Vertex AI).").option("--antigravity-command <cmd...>", "Antigravity local providers: command to spawn ACP server.", collectRepeated).option("--antigravity-socket <path>", "Antigravity local providers: path to existing Unix domain socket.");
145161
145285
  addCredentialCacheOptions(providerSet);
145162
145286
  withExamples(
145163
145287
  providerSet.option("--json", "Print the result as JSON.").action((name, allOptions) => {
@@ -145237,6 +145361,7 @@ function registerProviderCommand(program2, deps) {
145237
145361
  console.log(`Antigravity aliases: ${[...config2.aliases].map(([alias, model]) => `${alias}=${model.join(" > ")}`).join(", ")}`);
145238
145362
  }
145239
145363
  console.log(`Antigravity effort: ${config2.effort}`);
145364
+ console.log(`Antigravity degrade down tiers: ${config2.degradeDownTiers ? "on" : "off"}`);
145240
145365
  console.log(`Endpoint: ${describeProviderEndpoint(found)}`);
145241
145366
  } else {
145242
145367
  console.log(`Base URL: ${found.baseUrl}`);