nolo-cli 0.201.0-alpha.2 → 0.202.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/{_executeModel-BNYZLAN6.js → _executeModel-IPRTPSW7.js} +34 -33
  2. package/{agentDeleteCommand-4V4YSAXS.js → agentDeleteCommand-WHT2MMAP.js} +49 -47
  3. package/{agentEmailCommands-EYIQEH6Z.js → agentEmailCommands-4LW2BFLY.js} +51 -49
  4. package/{agentListCommands-2KGUT7UB.js → agentListCommands-2KF47HY6.js} +81 -45
  5. package/{agentMachineCommands-WUN47ILO.js → agentMachineCommands-QQCFQQ4T.js} +28 -26
  6. package/{agentProviderCommands-T6E3JCR6.js → agentProviderCommands-5ALOQLE5.js} +2 -2
  7. package/{agentRecordCommands-XL2CON36.js → agentRecordCommands-ARVXF2C2.js} +47 -45
  8. package/{agentRunCommand-R237ZGMQ.js → agentRunCommand-3IL5PW2S.js} +49 -47
  9. package/{agentRunControl-6HHESKDB.js → agentRunControl-ABDUPJLX.js} +10 -5
  10. package/{agentRuntimeLocal-XLLWFAVI.js → agentRuntimeLocal-YXHJV65L.js} +24 -22
  11. package/{agentSlice-Z5NKGMB7.js → agentSlice-BFDKYW6H.js} +4 -3
  12. package/{appDeleteCommands-IPF2VI3W.js → appDeleteCommands-OWJO3WFB.js} +29 -27
  13. package/{appDeployCommands-IBQ7GUXO.js → appDeployCommands-X7HLT27G.js} +29 -27
  14. package/{appDeployStatusCommands-6ESVU6XE.js → appDeployStatusCommands-CHCZ7ZUD.js} +29 -27
  15. package/{appGetCommands-VTSYTM4V.js → appGetCommands-AZW2EE4R.js} +29 -27
  16. package/{appListCommands-VCP5TUX7.js → appListCommands-YFN6DP6K.js} +29 -27
  17. package/{authCommand-RV5MQDWN.js → authCommand-W34UWJGR.js} +14 -13
  18. package/{builtinSkillRegistry-7RAJP7FD.js → builtinSkillRegistry-NJVHQIKY.js} +1 -1
  19. package/{chromeOpsCommands-BA6CS4DI.js → chromeOpsCommands-USKE4B4K.js} +15 -4
  20. package/{chunk-RE3B2OCC.js → chunk-266E37EL.js} +69 -14
  21. package/chunk-2BMURXSB.js +1863 -0
  22. package/{chunk-RRHJJUA3.js → chunk-2PI4QFAL.js} +174 -100
  23. package/{chunk-NABJEYPJ.js → chunk-2Q3LOAFE.js} +38 -3
  24. package/{chunk-EOLPKHSB.js → chunk-326HCB6L.js} +28 -24
  25. package/{chunk-4CEAZRZ4.js → chunk-33W4IFUU.js} +1 -1
  26. package/{chunk-V3MGT3RF.js → chunk-3CWF2EUZ.js} +8 -8
  27. package/{chunk-G6OOUQWJ.js → chunk-4KB6WQUL.js} +2 -0
  28. package/{chunk-DYQXB46J.js → chunk-4KPB3KWX.js} +2 -2
  29. package/{chunk-SW5AAI5D.js → chunk-4SH22ZG7.js} +5 -5
  30. package/{chunk-WAZ6BTSC.js → chunk-5E4FSR4J.js} +1 -1
  31. package/{chunk-PVD7CRYV.js → chunk-6I7ZP7KJ.js} +3 -3
  32. package/chunk-6UBGXX2W.js +12 -0
  33. package/{chunk-ZBCBFOWC.js → chunk-A2ZMIRLN.js} +2 -2
  34. package/{chunk-Z646E5YH.js → chunk-ASG7VWPK.js} +3 -3
  35. package/{chunk-QWVGFBOQ.js → chunk-BLFZULEQ.js} +3 -3
  36. package/{chunk-JIFYXQRD.js → chunk-BTYQAODF.js} +26 -8
  37. package/{chunk-KORCRPLO.js → chunk-C7PKPHK6.js} +334 -12
  38. package/{chunk-6WZQGT5X.js → chunk-CJ37ZMCQ.js} +6 -2
  39. package/{chunk-VHGD6FHV.js → chunk-CKAHAVMK.js} +40 -10
  40. package/{chunk-UNOILAZP.js → chunk-CLTGWJVT.js} +76 -4
  41. package/{chunk-Q6RMLYSA.js → chunk-CMLBKYEI.js} +4 -2
  42. package/{chunk-NVOYW6H4.js → chunk-CQHMBWZH.js} +12 -8
  43. package/{chunk-7KWPNGVJ.js → chunk-CTZ4O3XD.js} +1 -1
  44. package/{chunk-OHRDHS4N.js → chunk-CVCRAO6Q.js} +9 -4
  45. package/{chunk-26CRLZFD.js → chunk-D57YYGMD.js} +2 -2
  46. package/{chunk-TEC5UHQK.js → chunk-DHJXDGC3.js} +2 -2
  47. package/{chunk-QYOB7RVA.js → chunk-DKZJJ2NQ.js} +3 -2
  48. package/{chunk-4YX7VQOC.js → chunk-E2FC5RMU.js} +17 -14
  49. package/{chunk-EH4MNUMF.js → chunk-ETTDZBK5.js} +4 -4
  50. package/{chunk-BUXH3H5M.js → chunk-FWMOJTGR.js} +3722 -4851
  51. package/{chunk-ZWQUWF6W.js → chunk-G7Y4GXTY.js} +8 -14
  52. package/{chunk-5KTQVMCX.js → chunk-GOO6G4PY.js} +85 -0
  53. package/{chunk-FMOZ57LN.js → chunk-H7HWWNJB.js} +1 -1
  54. package/{chunk-A5VR65AE.js → chunk-HJS5EIKS.js} +4 -4
  55. package/{chunk-H44LQSZ2.js → chunk-HKWGI3TM.js} +178 -311
  56. package/{chunk-BBGYSMUE.js → chunk-JH7KMNGT.js} +143 -19
  57. package/{chunk-YXMZHGNA.js → chunk-KDUYNEJ5.js} +33 -16
  58. package/{chunk-O5V7QQAF.js → chunk-LEX6DEH4.js} +114 -2
  59. package/{chunk-BTBT2566.js → chunk-MNUOMXJH.js} +412 -9
  60. package/{chunk-N7E3LQ4A.js → chunk-MZXWSY4E.js} +1 -1
  61. package/{chunk-ZQ3EAOY3.js → chunk-NTLJGRAT.js} +1 -1
  62. package/{chunk-WFUIXNKC.js → chunk-P4YLK2OD.js} +3 -3
  63. package/chunk-PRJ473FK.js +63 -0
  64. package/{chunk-2SHLT6JB.js → chunk-Q7GNBUT4.js} +2 -2
  65. package/{chunk-C2UXCAMB.js → chunk-RIKSN62L.js} +3 -3
  66. package/{chunk-GTP6VNWH.js → chunk-RQ22OZD7.js} +3 -3
  67. package/{chunk-H7NIQGTU.js → chunk-RS66RJLA.js} +2 -2
  68. package/{chunk-GC64WGMD.js → chunk-SM3NSZJV.js} +16 -5
  69. package/{chunk-QKDMI22S.js → chunk-SSK4WNJA.js} +1 -1
  70. package/{chunk-6MAFLMAO.js → chunk-SUBNV2JH.js} +3 -3
  71. package/{chunk-HLAL63BZ.js → chunk-T43B7LB2.js} +1 -1
  72. package/{chunk-HTLIKE5U.js → chunk-TWVVTUNG.js} +2 -2
  73. package/{chunk-X3RWBJDQ.js → chunk-U7HTU2S7.js} +1 -1
  74. package/{chunk-76YUTLOT.js → chunk-UIOEHFF6.js} +1 -1
  75. package/{chunk-IIX6VWLW.js → chunk-VCFU3BO5.js} +224 -38
  76. package/{chunk-QU3TLYBR.js → chunk-VEUSD6OF.js} +35 -11
  77. package/{chunk-4YMD7B4Y.js → chunk-WPOKOKZA.js} +2 -2
  78. package/{chunk-K6TZSON4.js → chunk-WTKYP6QO.js} +19 -5
  79. package/{chunk-FEKMTBKJ.js → chunk-XW6B2RJW.js} +192 -55
  80. package/{chunk-ZSO5B6SW.js → chunk-Y2WUYX4I.js} +9 -0
  81. package/{chunk-A3SXTJDE.js → chunk-YAGFPXOX.js} +14 -14
  82. package/{chunk-TVGX5QIN.js → chunk-YUA6OAH5.js} +2 -2
  83. package/{chunk-NYE2INIO.js → chunk-YV2RSLM4.js} +13 -13
  84. package/{chunk-MJWUBTK7.js → chunk-YZGNKHUM.js} +2 -2
  85. package/{commandRegistry-YFXWA5SF.js → commandRegistry-HEBIO2A4.js} +87 -67
  86. package/{contentThunks-2BV7CFUP.js → contentThunks-I4IHSDTM.js} +14 -13
  87. package/{cooldownCommands-KRILPXOZ.js → cooldownCommands-5SJ74DNP.js} +1 -1
  88. package/{createAgentAutomationAction-T6CGXCSO.js → createAgentAutomationAction-WQCH5HR2.js} +14 -13
  89. package/{createDialogAction-X27IA3G2.js → createDialogAction-CKMZK5JQ.js} +15 -14
  90. package/{createPageAction-EHDHNW5P.js → createPageAction-QAZHQGY7.js} +14 -13
  91. package/{dialogCommands-XZXH3HSQ.js → dialogCommands-YMAHICPJ.js} +30 -28
  92. package/{dialogSlice-AZNPVOCU.js → dialogSlice-GEGACCH2.js} +13 -12
  93. package/{docCreateCommands-Z64V5BFZ.js → docCreateCommands-SNMAKBXN.js} +28 -26
  94. package/{docDeleteCommands-7UFHIM4C.js → docDeleteCommands-K52UESRC.js} +29 -27
  95. package/{docReadCommands-NLU7Y67R.js → docReadCommands-AG6LLHJ7.js} +28 -26
  96. package/{docStore-M37Q6JFO.js → docStore-B4EFT53J.js} +1 -1
  97. package/{docUpdateCommands-S2KGBEG3.js → docUpdateCommands-B5EZ7DYN.js} +28 -26
  98. package/{fetchMessages-HWBVATSE.js → fetchMessages-YY4SATNR.js} +1 -1
  99. package/{getPricing-E2PLNWCR.js → getPricing-3PQY3TGI.js} +3 -3
  100. package/{handleSendMessageAction-KUJQZ6B6.js → handleSendMessageAction-4BACQWOG.js} +70 -29
  101. package/index.js +7 -7
  102. package/{lib-4YTWAGY7.js → lib-5KKIBFIT.js} +439 -272
  103. package/{localDialogRead-CT5HGDMC.js → localDialogRead-FUXGZ57B.js} +1 -1
  104. package/{localRuntimeAdapter-5BNHO6JZ.js → localRuntimeAdapter-5CVSCXHI.js} +45 -43
  105. package/{machineCommands-2KDROAVV.js → machineCommands-R7L4IBQL.js} +48 -46
  106. package/{machineWsRunDispatch-4NP5M574.js → machineWsRunDispatch-KZHTW7DW.js} +46 -44
  107. package/{models-UUNO6DOL.js → models-PJBE6JDV.js} +2 -2
  108. package/{oauthTokenStore-PADKLNOC.js → oauthTokenStore-OEERZFUC.js} +2 -1
  109. package/package.json +1 -1
  110. package/{providerPresetApply-JGNMO2KX.js → providerPresetApply-HBBUUVJD.js} +6 -6
  111. package/{providerRegistry-33J3ZYFJ.js → providerRegistry-5LK2NXYE.js} +6 -6
  112. package/{readlineWorkspace-MKUSR6HA.js → readlineWorkspace-PDPEWRSG.js} +290 -121
  113. package/{runAgentClientLoop-J32KRVN7.js → runAgentClientLoop-QKV66PX5.js} +31 -30
  114. package/{runtimeDoctorCommands-NYBOTA6D.js → runtimeDoctorCommands-3VFVTGPI.js} +8 -7
  115. package/{secretCommands-N6CMCJDZ.js → secretCommands-MKU25CDP.js} +311 -3
  116. package/{settingThunks-YRYNPWJM.js → settingThunks-4WU7YE62.js} +2 -2
  117. package/{skillDiscovery-F3TMVQOJ.js → skillDiscovery-BKLWW2EZ.js} +2 -2
  118. package/{spaceCommands-VV4K7TGI.js → spaceCommands-VD3CZWXM.js} +27 -25
  119. package/{streamAgentChatTurn-S2Q7STXS.js → streamAgentChatTurn-GM3UNSLS.js} +46 -43
  120. package/{tools-KOIPW4ZA.js → tools-UJLEQBKI.js} +25 -24
  121. package/{tuiSummaryLlmCaller-FSOADMXK.js → tuiSummaryLlmCaller-73QO3HAD.js} +12 -12
  122. package/{updateCommands-KE6LP3QX.js → updateCommands-RVDAFHBT.js} +3 -3
  123. package/{updateDialogTitleAction-ILS5OIXF.js → updateDialogTitleAction-24QO27NT.js} +14 -13
  124. package/{windowsSelfUpdate-26TSFXEZ.js → windowsSelfUpdate-N2VH2OBW.js} +2 -2
@@ -2,7 +2,7 @@ import {
2
2
  clipMultilineText,
3
3
  fetchAndSerializeTable,
4
4
  waitForAbortableDelay
5
- } from "./chunk-KORCRPLO.js";
5
+ } from "./chunk-C7PKPHK6.js";
6
6
  import {
7
7
  isGatewayHttpStatus
8
8
  } from "./chunk-NF64D32W.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-AGIM7IMJ.js";
22
22
  import {
23
23
  fetchAndCacheMessages
24
- } from "./chunk-EOLPKHSB.js";
24
+ } from "./chunk-326HCB6L.js";
25
25
  import {
26
26
  createSpaceKey
27
27
  } from "./chunk-UAD2WT54.js";
@@ -35,7 +35,7 @@ import {
35
35
  extractRuntimePageCapabilities,
36
36
  resolveBuiltinSkillPage,
37
37
  resolveSkillGraphFromRoots
38
- } from "./chunk-O5V7QQAF.js";
38
+ } from "./chunk-LEX6DEH4.js";
39
39
  import {
40
40
  isAbortError
41
41
  } from "./chunk-7DPNBQSV.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getModelPricing
3
- } from "./chunk-ZBCBFOWC.js";
3
+ } from "./chunk-A2ZMIRLN.js";
4
4
  import {
5
5
  PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID,
6
6
  PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID,
@@ -23,14 +23,14 @@ import {
23
23
  } from "./chunk-M2EJHDJP.js";
24
24
  import {
25
25
  getModelConfig
26
- } from "./chunk-GC64WGMD.js";
26
+ } from "./chunk-SM3NSZJV.js";
27
27
  import {
28
28
  isRecord
29
29
  } from "./chunk-KUG52IAP.js";
30
30
  import {
31
31
  isNoloHostedProvider,
32
32
  isPlatformHostedImageModel
33
- } from "./chunk-5KTQVMCX.js";
33
+ } from "./chunk-GOO6G4PY.js";
34
34
 
35
35
  // packages/core/publicAgentSeeds.ts
36
36
  var AGENT_SEED_DEFAULTS = {
@@ -5,10 +5,10 @@ import {
5
5
  } from "./chunk-NBTY7YJF.js";
6
6
  import {
7
7
  resolveCliLocalRuntimeKeyCapability
8
- } from "./chunk-H44LQSZ2.js";
8
+ } from "./chunk-HKWGI3TM.js";
9
9
  import {
10
10
  HIGH_RISK_MUTATION_TOOL_NAMES
11
- } from "./chunk-NABJEYPJ.js";
11
+ } from "./chunk-2Q3LOAFE.js";
12
12
  import {
13
13
  DEFAULT_NOLO_SERVER_URL
14
14
  } from "./chunk-OLZBQWZU.js";
@@ -7,9 +7,10 @@ import {
7
7
  gmiModels,
8
8
  openrouterModels,
9
9
  platformHostedModels,
10
+ resolvePlatformEffectiveModel,
10
11
  toCnyCredits,
11
12
  zaiModels
12
- } from "./chunk-5KTQVMCX.js";
13
+ } from "./chunk-GOO6G4PY.js";
13
14
 
14
15
  // packages/integrations/qwen/models.ts
15
16
  var qwenModels = [
@@ -2361,11 +2362,12 @@ var REASONING_EFFORT_OPTIONS = [
2361
2362
  "medium",
2362
2363
  "high",
2363
2364
  "xhigh",
2364
- "max"
2365
+ "max",
2366
+ "ultra"
2365
2367
  ];
2366
2368
  var PROVIDER_REASONING_EFFORT_VALUES = {
2367
- openai: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
2368
- openrouter: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
2369
+ openai: ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"],
2370
+ openrouter: ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"],
2369
2371
  deepseek: ["low", "high", "max"],
2370
2372
  // nolo (Ollama Cloud) 支持 DeepSeek/Kimi/GLM 等 thinking 模型,
2371
2373
  // reasoning_effort 通过 OpenAI 兼容端点透传到 Ollama Cloud。
@@ -3219,6 +3221,7 @@ var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
3219
3221
  "gpt-5.5-pro",
3220
3222
  "gpt-6-astra",
3221
3223
  "gpt-6.1-sol",
3224
+ "gpt-6.1-terra",
3222
3225
  "gpt-6-sol",
3223
3226
  "gpt-6-luna",
3224
3227
  "gpt-5.6-sol",
@@ -3254,7 +3257,8 @@ var EFFORT_ORDER = [
3254
3257
  "medium",
3255
3258
  "high",
3256
3259
  "xhigh",
3257
- "max"
3260
+ "max",
3261
+ "ultra"
3258
3262
  ];
3259
3263
  function nearestSupportedEffort(effort, supported) {
3260
3264
  const effortIdx = EFFORT_ORDER.indexOf(effort);
@@ -3440,6 +3444,13 @@ var findOpenRouterUpstreamModel = (name) => {
3440
3444
  function findModelConfig(provider, name) {
3441
3445
  const normalizedProvider = normalizeLookupProvider(provider);
3442
3446
  if (!normalizedProvider) return null;
3447
+ if (normalizedProvider === "nolo") {
3448
+ const effective = resolvePlatformEffectiveModel(name);
3449
+ if (effective && effective !== name) {
3450
+ const aliased = findCandidateInProvider(normalizedProvider, effective);
3451
+ if (aliased) return aliased;
3452
+ }
3453
+ }
3443
3454
  const direct = findCandidateInProvider(normalizedProvider, name);
3444
3455
  if (direct) return direct;
3445
3456
  if (normalizedProvider === "openrouter") {
@@ -7,7 +7,7 @@ import {
7
7
  deleteDialog,
8
8
  runtime_default,
9
9
  toast
10
- } from "./chunk-EOLPKHSB.js";
10
+ } from "./chunk-326HCB6L.js";
11
11
  import {
12
12
  UNCATEGORIZED_ID,
13
13
  addContentAction,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-C2UXCAMB.js";
4
+ } from "./chunk-RIKSN62L.js";
5
5
  import {
6
6
  updateTokensAction
7
- } from "./chunk-EOLPKHSB.js";
7
+ } from "./chunk-326HCB6L.js";
8
8
  import {
9
9
  applyUpdateTokensFulfilled
10
10
  } from "./chunk-OWYYDMGJ.js";
@@ -12,7 +12,7 @@ import {
12
12
  extractReasoningFromResponseOutput,
13
13
  extractTextFromResponseOutput,
14
14
  extractToolCallsFromResponseOutput
15
- } from "./chunk-OHRDHS4N.js";
15
+ } from "./chunk-CVCRAO6Q.js";
16
16
  import {
17
17
  isRecord
18
18
  } from "./chunk-KUG52IAP.js";
@@ -4,7 +4,7 @@ import {
4
4
  openrouterModels,
5
5
  platformHostedModels,
6
6
  zaiModels
7
- } from "./chunk-5KTQVMCX.js";
7
+ } from "./chunk-GOO6G4PY.js";
8
8
 
9
9
  // packages/ai/llm/modelAbility.ts
10
10
  var MODEL_ABILITY_TABLE = {
@@ -15,10 +15,10 @@ import {
15
15
  } from "./chunk-Y6ROFCZO.js";
16
16
  import {
17
17
  scheduleWindowsSelfUpdate
18
- } from "./chunk-WAZ6BTSC.js";
18
+ } from "./chunk-5E4FSR4J.js";
19
19
  import {
20
20
  t
21
- } from "./chunk-UNOILAZP.js";
21
+ } from "./chunk-CLTGWJVT.js";
22
22
 
23
23
  // packages/cli/updateCommands.ts
24
24
  import { existsSync, readFileSync, accessSync, constants } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildAgentRuntimeAgentLookupKeys,
3
3
  shouldFetchAgentRuntimeRecordRemotely
4
- } from "./chunk-NABJEYPJ.js";
4
+ } from "./chunk-2Q3LOAFE.js";
5
5
 
6
6
  // packages/agent-runtime/oauthProviderRefs.ts
7
7
  var OAUTH_PROVIDER_REFS = [
@@ -2,7 +2,7 @@ import {
2
2
  getCredentialsDir,
3
3
  getLegacyCredentialPath,
4
4
  migrateLegacyCredentialFile
5
- } from "./chunk-ZWQUWF6W.js";
5
+ } from "./chunk-G7Y4GXTY.js";
6
6
  import {
7
7
  asTrimmedString
8
8
  } from "./chunk-3EUW3WEO.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-HNUWUO75.js";
4
4
  import {
5
5
  resolveToolImagePolicy
6
- } from "./chunk-PVD7CRYV.js";
6
+ } from "./chunk-6I7ZP7KJ.js";
7
7
  import {
8
8
  projectOpenAiToolImages
9
9
  } from "./chunk-E2BESSAW.js";
@@ -11,7 +11,7 @@ import {
11
11
  getAntigravityUserAgent,
12
12
  readAntigravityProjectId,
13
13
  resolveAntigravityCloudCodeBaseUrl
14
- } from "./chunk-QU3TLYBR.js";
14
+ } from "./chunk-VEUSD6OF.js";
15
15
  import {
16
16
  asOptionalTrimmedString
17
17
  } from "./chunk-G3SUCT4W.js";
@@ -408,7 +408,8 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
408
408
  if (typeof firstNonNull === "string") out.type = firstNonNull;
409
409
  out.nullable = true;
410
410
  } else if (typeof src.type === "string") {
411
- out.type = src.type;
411
+ out.type = src.type === "null" ? "string" : src.type;
412
+ if (src.type === "null") out.nullable = true;
412
413
  }
413
414
  if (typeof src.description === "string") out.description = src.description;
414
415
  if (typeof src.minimum === "number") out.minimum = src.minimum;
@@ -420,54 +421,229 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
420
421
  enumMetaByNode.set(out, { values: enumValues, baseDescription });
421
422
  applyGeminiEnum(out, geminiEnumFields(enumValues, baseDescription));
422
423
  }
424
+ if (src.type === "null") {
425
+ out.description = [out.description, "null only"].filter(Boolean).join("\n");
426
+ }
423
427
  const variantBranches = [
424
428
  ...Array.isArray(src.oneOf) ? src.oneOf : [],
425
429
  ...Array.isArray(src.anyOf) ? src.anyOf : []
426
430
  ];
427
431
  if (variantBranches.length > 0) {
428
- const mergedProperties = {};
429
- let requiredIntersection;
430
- for (const branch of variantBranches) {
431
- const sanitized = sanitizeGeminiSchemaNode(branch, seen);
432
- const branchProperties = sanitized.properties ?? {};
433
- for (const [key, value] of Object.entries(branchProperties)) {
434
- const previous = mergedProperties[key];
435
- const prevMeta = enumMetaOf(previous);
436
- const nextMeta = enumMetaOf(value);
437
- if (prevMeta && nextMeta) {
438
- const values = [...prevMeta.values, ...nextMeta.values];
439
- const baseDescription = nextMeta.baseDescription ?? prevMeta.baseDescription;
440
- const node = {
441
- ...value
442
- };
443
- delete node.enum;
444
- delete node.description;
445
- applyGeminiEnum(node, geminiEnumFields(values, baseDescription));
446
- enumMetaByNode.set(node, { values, baseDescription });
447
- mergedProperties[key] = node;
448
- } else {
449
- mergedProperties[key] = value;
432
+ const rawBranches = variantBranches.map(
433
+ (branch) => branch && typeof branch === "object" && !Array.isArray(branch) ? branch : {}
434
+ );
435
+ const allSanitized = variantBranches.map(
436
+ (branch) => sanitizeGeminiSchemaNode(branch, seen)
437
+ );
438
+ if (rawBranches.some(
439
+ (branch, index) => branch.type === "null" || allSanitized[index]?.nullable === true || rawEnumValues(branch)?.includes(null)
440
+ )) out.nullable = true;
441
+ const nonNullIndices = rawBranches.flatMap(
442
+ (branch, index) => branch.type === "null" ? [] : [index]
443
+ );
444
+ const branches = nonNullIndices.map((index) => rawBranches[index]);
445
+ const sanitizedBranches = nonNullIndices.map((index) => allSanitized[index]);
446
+ const inferType = (branch) => {
447
+ if (typeof branch.type === "string") return branch.type;
448
+ const values = rawEnumValues(branch)?.filter((value) => value !== null);
449
+ if (!values?.length) return void 0;
450
+ if (values.every((value) => typeof value === "number")) {
451
+ return values.every((value) => Number.isInteger(value)) ? "integer" : "number";
452
+ }
453
+ if (values.every((value) => typeof value === "boolean")) return "boolean";
454
+ if (values.every((value) => typeof value === "string")) return "string";
455
+ return void 0;
456
+ };
457
+ const candidateTypes = (branch, active = /* @__PURE__ */ new Set()) => {
458
+ if (active.has(branch)) return [];
459
+ active.add(branch);
460
+ const nested = [branch.oneOf, branch.anyOf].flatMap((value) => Array.isArray(value) ? value : []);
461
+ const type = inferType(branch);
462
+ const types = [
463
+ ...type && type !== "null" ? [type] : [],
464
+ ...nested.flatMap((value) => value && typeof value === "object" ? candidateTypes(value, active) : [])
465
+ ];
466
+ active.delete(branch);
467
+ return types;
468
+ };
469
+ const unconstrainedBranch = branches.some(
470
+ (branch) => branch.type === void 0 && rawEnumValues(branch) === void 0 && branch.properties === void 0 && branch.oneOf === void 0 && branch.anyOf === void 0 && branch.allOf === void 0 && branch.$ref === void 0
471
+ );
472
+ if (sanitizedBranches.every(
473
+ (branch) => branch.properties === void 0 && branch.required === void 0
474
+ )) {
475
+ const types = [...new Set(branches.flatMap((branch) => candidateTypes(branch)))];
476
+ const first = sanitizedBranches[0] ?? {};
477
+ const baseDescription = typeof out.description === "string" ? out.description : typeof branches[0]?.description === "string" ? branches[0].description : void 0;
478
+ const scalar = {
479
+ ...first,
480
+ type: types.length > 0 && types.every((type) => type === "integer" || type === "number") ? types.includes("number") ? "number" : "integer" : types[0] ?? "string",
481
+ ...out
482
+ };
483
+ delete scalar.description;
484
+ if (baseDescription !== void 0) scalar.description = baseDescription;
485
+ if (!enumValues) {
486
+ delete scalar.enum;
487
+ const values = branches.flatMap(
488
+ (branch, index) => rawEnumValues(branch) ?? enumMetaOf(sanitizedBranches[index])?.values ?? []
489
+ );
490
+ const allEnum = branches.length > 0 && branches.every(
491
+ (branch, index) => rawEnumValues(branch) !== void 0 || enumMetaOf(sanitizedBranches[index]) !== void 0
492
+ );
493
+ if (values.length > 0) {
494
+ if (allEnum) {
495
+ if (typeof out.type !== "string") {
496
+ scalar.type = inferType({ enum: values }) ?? "string";
497
+ }
498
+ applyGeminiEnum(scalar, geminiEnumFields(values, baseDescription));
499
+ enumMetaByNode.set(out, { values, baseDescription });
500
+ } else {
501
+ scalar.description = [
502
+ baseDescription,
503
+ `Candidates: ${[...new Set(values.map(geminiEnumLiteral))].join(", ")}`
504
+ ].filter(Boolean).join("\n");
505
+ }
506
+ }
507
+ }
508
+ const conflictingRanges = [];
509
+ for (const key of ["minimum", "maximum", "minLength", "maxLength"]) {
510
+ if (typeof src[key] === "number") {
511
+ scalar[key] = src[key];
512
+ continue;
513
+ }
514
+ const values = branches.map((branch) => branch[key]).filter((value) => typeof value === "number");
515
+ if (values.length !== branches.length || new Set(values).size > 1) {
516
+ delete scalar[key];
517
+ if (values.length > 0 && conflictingRanges.length === 0) {
518
+ conflictingRanges.push(...branches.map((branch) => Object.fromEntries(
519
+ ["minimum", "maximum", "minLength", "maxLength"].flatMap(
520
+ (name) => typeof branch[name] === "number" ? [[name, branch[name]]] : []
521
+ )
522
+ )));
523
+ }
524
+ } else if (values.length > 0) scalar[key] = values[0];
525
+ }
526
+ if (conflictingRanges.length > 0) {
527
+ scalar.description = [
528
+ scalar.description,
529
+ `Original ranges: ${conflictingRanges.map((range) => JSON.stringify(range)).join(" | ")}`
530
+ ].filter(Boolean).join("\n");
531
+ }
532
+ const stableValue = (value) => {
533
+ if (Array.isArray(value)) return value.map(stableValue);
534
+ if (value && typeof value === "object") return Object.fromEntries(
535
+ Object.keys(value).sort().map((key) => [key, stableValue(value[key])])
536
+ );
537
+ return value;
538
+ };
539
+ if (src.items === void 0 && branches.some((branch) => branch.items !== void 0)) {
540
+ const firstItems = branches[0]?.items;
541
+ const sameItems = firstItems !== void 0 && branches.every(
542
+ (branch) => branch.items !== void 0 && JSON.stringify(stableValue(branch.items)) === JSON.stringify(stableValue(firstItems))
543
+ );
544
+ if (!sameItems) {
545
+ const itemTypes = branches.map((branch) => {
546
+ const items = branch.items;
547
+ return items && typeof items === "object" && !Array.isArray(items) ? items.type : void 0;
548
+ });
549
+ const commonType = itemTypes[0];
550
+ const fallbackType = typeof commonType === "string" && ["string", "integer", "number", "boolean", "object", "array"].includes(commonType) && itemTypes.every((type) => type === commonType) ? commonType : "string";
551
+ scalar.items = fallbackType === "array" ? { type: "array", items: { type: "string" } } : { type: fallbackType };
552
+ scalar.description = [
553
+ scalar.description,
554
+ `Original items: ${branches.map((branch) => branch.items === void 0 ? "unconstrained" : geminiEnumLiteral(branch.items)).join(" | ")}`
555
+ ].filter(Boolean).join("\n");
556
+ }
557
+ }
558
+ const originalConstraints = branches.map((branch) => Object.fromEntries(
559
+ ["pattern", "format"].flatMap((key) => branch[key] !== void 0 ? [[key, branch[key]]] : [])
560
+ ));
561
+ if (originalConstraints.some((constraints) => Object.keys(constraints).length > 0)) {
562
+ scalar.description = [
563
+ scalar.description,
564
+ `Original constraints: ${originalConstraints.map((value) => JSON.stringify(value)).join(" | ")}`
565
+ ].filter(Boolean).join("\n");
566
+ }
567
+ for (let index = 0; index < branches.length; index++) {
568
+ if ((branches[index].oneOf || branches[index].anyOf) && sanitizedBranches[index].description) {
569
+ scalar.description = [
570
+ scalar.description,
571
+ `Branch ${index + 1}: ${sanitizedBranches[index].description}`
572
+ ].filter(Boolean).join("\n");
573
+ }
574
+ }
575
+ if (types.length > 1) {
576
+ scalar.description = [scalar.description, `One of: ${types.join(" | ")}`].filter(Boolean).join("\n");
577
+ }
578
+ if (branches.length === 0) {
579
+ scalar.description = [scalar.description, "null only"].filter(Boolean).join("\n");
580
+ } else if (branches.some((branch) => inferType(branch) === void 0 && rawEnumValues(branch)?.some((value) => value !== null))) {
581
+ scalar.description = [scalar.description, "Mixed enum types; using a fallback type"].filter(Boolean).join("\n");
582
+ }
583
+ Object.assign(out, scalar);
584
+ } else {
585
+ const mergedProperties = {};
586
+ let requiredIntersection;
587
+ for (const sanitized of sanitizedBranches) {
588
+ const branchProperties = sanitized.properties ?? {};
589
+ for (const [key, value] of Object.entries(branchProperties)) {
590
+ const previous = mergedProperties[key];
591
+ const prevMeta = enumMetaOf(previous);
592
+ const nextMeta = enumMetaOf(value);
593
+ if (prevMeta && nextMeta) {
594
+ const values = [...prevMeta.values, ...nextMeta.values];
595
+ const baseDescription = nextMeta.baseDescription ?? prevMeta.baseDescription;
596
+ const node = {
597
+ ...value
598
+ };
599
+ delete node.enum;
600
+ delete node.description;
601
+ applyGeminiEnum(node, geminiEnumFields(values, baseDescription));
602
+ enumMetaByNode.set(node, { values, baseDescription });
603
+ mergedProperties[key] = node;
604
+ } else {
605
+ mergedProperties[key] = value;
606
+ }
450
607
  }
608
+ const branchRequired = Array.isArray(sanitized.required) ? sanitized.required : [];
609
+ requiredIntersection = requiredIntersection === void 0 ? [...branchRequired] : requiredIntersection.filter((r) => branchRequired.includes(r));
610
+ }
611
+ out.properties = {
612
+ ...out.properties ?? {},
613
+ ...mergedProperties
614
+ };
615
+ if (requiredIntersection !== void 0 && requiredIntersection.length > 0) {
616
+ out.required = requiredIntersection;
617
+ }
618
+ if (typeof out.type !== "string") out.type = "object";
619
+ if (sanitizedBranches.some((branch) => branch.properties === void 0)) {
620
+ const types = [...new Set(branches.flatMap(
621
+ (branch) => branch.properties !== void 0 ? ["object"] : candidateTypes(branch)
622
+ ))].sort();
623
+ if (rawBranches.some((branch) => branch.type === "null")) types.push("null");
624
+ out.description = [
625
+ out.description,
626
+ `One of: ${types.join(" | ")}. This declaration represents only one branch of the union; other candidates are not structurally represented.`
627
+ ].filter(Boolean).join("\n");
451
628
  }
452
- const branchRequired = Array.isArray(sanitized.required) ? sanitized.required : [];
453
- requiredIntersection = requiredIntersection === void 0 ? [...branchRequired] : requiredIntersection.filter((r) => branchRequired.includes(r));
454
629
  }
455
- out.properties = {
456
- ...out.properties ?? {},
457
- ...mergedProperties
458
- };
459
- if (requiredIntersection !== void 0 && requiredIntersection.length > 0) {
460
- out.required = requiredIntersection;
630
+ if (unconstrainedBranch) {
631
+ out.description = [
632
+ out.description,
633
+ "An unconstrained branch accepts any JSON value (any value, including null). This declaration uses a fallback type and cannot express the full union."
634
+ ].filter(Boolean).join("\n");
635
+ if (src.type === void 0) out.nullable = true;
461
636
  }
462
- if (typeof out.type !== "string") out.type = "object";
463
637
  }
464
638
  if (Array.isArray(src.allOf)) {
465
639
  for (const branch of src.allOf) {
466
640
  const sanitized = sanitizeGeminiSchemaNode(branch, seen);
467
- out.properties = {
468
- ...out.properties ?? {},
469
- ...sanitized.properties ?? {}
470
- };
641
+ if (out.type === void 0 || out.type === "object" || out.properties || sanitized.properties) {
642
+ out.properties = {
643
+ ...out.properties ?? {},
644
+ ...sanitized.properties ?? {}
645
+ };
646
+ }
471
647
  if (Array.isArray(sanitized.required)) {
472
648
  out.required = [
473
649
  .../* @__PURE__ */ new Set([
@@ -501,6 +677,16 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
501
677
  if (typeof out.type !== "string") out.type = "array";
502
678
  }
503
679
  if (typeof out.type !== "string") out.type = "object";
680
+ if (out.type === "array" && !out.items) out.items = { type: "string" };
681
+ if (out.type !== "object" && !out.properties) {
682
+ const dropped = Object.fromEntries(["minLength", "maxLength", "pattern", "format"].flatMap(
683
+ (key) => src[key] !== void 0 && out[key] === void 0 ? [[key, src[key]]] : []
684
+ ));
685
+ if (Object.keys(dropped).length > 0) out.description = [
686
+ out.description,
687
+ `Original constraints: ${JSON.stringify(dropped)}`
688
+ ].filter(Boolean).join("\n");
689
+ }
504
690
  return out;
505
691
  }
506
692
  function convertOpenAiToolsToGemini(tools) {
@@ -1,9 +1,6 @@
1
- import {
2
- toErrorMessage
3
- } from "./chunk-HNMXYYJR.js";
4
1
  import {
5
2
  trimTrailingSlash
6
- } from "./chunk-4YMD7B4Y.js";
3
+ } from "./chunk-WPOKOKZA.js";
7
4
  import {
8
5
  commandCodeModels,
9
6
  kimiCodeModels,
@@ -14,7 +11,10 @@ import {
14
11
  qwenTokenPlanModels,
15
12
  stepfunModels,
16
13
  stepfunStepPlanModels
17
- } from "./chunk-GC64WGMD.js";
14
+ } from "./chunk-SM3NSZJV.js";
15
+ import {
16
+ toErrorMessage
17
+ } from "./chunk-HNMXYYJR.js";
18
18
  import {
19
19
  asOptionalFiniteNumber
20
20
  } from "./chunk-WWC7I6TA.js";
@@ -26,7 +26,7 @@ import {
26
26
  PLATFORM_HOSTED_DEEPSEEK_FLASH_PEAK_PRICE,
27
27
  PLATFORM_HOSTED_DEEPSEEK_PRO_OFF_PEAK_PRICE,
28
28
  PLATFORM_HOSTED_DEEPSEEK_PRO_PEAK_PRICE
29
- } from "./chunk-5KTQVMCX.js";
29
+ } from "./chunk-GOO6G4PY.js";
30
30
  import {
31
31
  asTrimmedLowercaseString
32
32
  } from "./chunk-QSJ3HFEF.js";
@@ -370,13 +370,17 @@ var SUBSCRIPTION_OAUTH_PROVIDERS = [
370
370
  defaultModel: "gpt-6-astra",
371
371
  defaultReasoningEffort: "medium",
372
372
  modelOptions: [
373
+ // 只列每个家族的最新代(owner 2026-11-01 决定):旧代 id 不再作为独立选项,
374
+ // 存量 agent 记录里的旧 model id 由 OAuth 通道的家族别名表透明重定向到对应
375
+ // 最新代(sol 系→6.1 Sol、terra 系→6.1 Terra、luna 系→6 Luna),不丢对话。
373
376
  { id: "gpt-6-astra", label: "GPT-6 Astra", hasVision: true, recommended: true },
374
377
  // GPT-6.1 Sol 已列入 Codex 订阅通道选型指南,但按账号灰度("when available
375
378
  // to your account and client"),未开通的账号选它会 400,不影响其他选项。
376
379
  { id: "gpt-6.1-sol", label: "GPT-6.1 Sol", hasVision: true },
377
- { id: "gpt-5.6-sol", label: "GPT-5.6 Sol", hasVision: true },
378
- { id: "gpt-5.6-terra", label: "GPT-5.6 Terra", hasVision: true },
379
- { id: "gpt-5.6-luna", label: "GPT-5.6 Luna", hasVision: true }
380
+ // GPT-6.1 Terra 上游已实测返回元数据,同样按账号级白名单灰度,未开通的账号选它会 400,不影响其他选项。
381
+ { id: "gpt-6.1-terra", label: "GPT-6.1 Terra", hasVision: true },
382
+ // GPT-6 Luna 是 luna 家族的上游最新代(无 6.1-luna);更老的 gpt-5.6-luna 重定向到它。
383
+ { id: "gpt-6-luna", label: "GPT-6 Luna", hasVision: true }
380
384
  ]
381
385
  },
382
386
  {
@@ -493,8 +497,9 @@ var SUBSCRIPTION_OAUTH_PROVIDERS = [
493
497
  { id: "claude-sonnet-4-6", label: "Claude Sonnet 4.6", hasVision: true },
494
498
  { id: "gpt-6-astra-medium", label: "GPT-6 Astra Medium", hasVision: true },
495
499
  { id: "gpt-6-astra-high", label: "GPT-6 Astra High", hasVision: true },
496
- // GPT-6 Sol/Luna 已随上游上线(medium/high 档实测可调);chatgpt OAuth
497
- // 的 Codex 后端目前只放出 gpt-6-astra,Sol/Luna 在该通道仍 400。
500
+ // GPT-6 Sol/Luna 已随上游上线(medium/high 档实测可调)。注:2026-11-01 实测
501
+ // chatgpt OAuth 的 Codex 后端已放出 gpt-6-sol / gpt-6-luna(responses 返回 200),
502
+ // 该通道「Sol/Luna 仍 400」的旧结论已过时。
498
503
  { id: "gpt-6-sol-medium", label: "GPT-6 Sol Medium", hasVision: true },
499
504
  { id: "gpt-6-sol-high", label: "GPT-6 Sol High", hasVision: true },
500
505
  { id: "gpt-6-luna-medium", label: "GPT-6 Luna Medium", hasVision: true },
@@ -844,6 +849,25 @@ var CUSTOM_API_KEY_TEMPLATES = [
844
849
  defaultModel: "deepseek-ai/DeepSeek-V4.1-Flash",
845
850
  commercialKind: "api",
846
851
  accessVariant: "metered_key"
852
+ },
853
+ // LongCat 官方 API(longcat.chat / longcat.ai):高性能 Agentic 模型,
854
+ // 1M 上下文、最大输出 256K tokens,OpenAI 兼容格式。
855
+ {
856
+ kind: "api_key_template",
857
+ id: "longcat-api",
858
+ label: "LongCat API",
859
+ description: "LongCat \u5B98\u65B9\u5F00\u653E\u5E73\u53F0\uFF08\u9AD8\u6027\u80FD Agentic \u6A21\u578B\uFF0C1M \u4E0A\u4E0B\u6587\uFF0COpenAI \u517C\u5BB9\uFF09",
860
+ provider: "longcat",
861
+ baseUrl: "https://api.longcat.chat/openai/v1",
862
+ defaultModel: "LongCat-2.5",
863
+ modelOptions: [
864
+ { id: "LongCat-2.5", label: "LongCat 2.5", recommended: true },
865
+ { id: "LongCat-2.5-Preview", label: "LongCat 2.5 Preview" },
866
+ { id: "LongCat-2.0", label: "LongCat 2.0" }
867
+ ],
868
+ keyFormatHint: "\u5728 longcat.chat \u63A7\u5236\u53F0 API Keys \u83B7\u53D6\uFF08\u5F62\u5982 ak_\u2026\uFF09\u3002",
869
+ commercialKind: "api",
870
+ accessVariant: "metered_key"
847
871
  }
848
872
  ];
849
873
  var ALL_PROVIDER_REGISTRY = [
@@ -4,7 +4,7 @@ import {
4
4
  resolvePlatformHostedCredentialProvider,
5
5
  resolvePlatformProxyChatGatewayEndpoint,
6
6
  resolvePlatformResponsesEndpoint
7
- } from "./chunk-TVGX5QIN.js";
7
+ } from "./chunk-YUA6OAH5.js";
8
8
  import {
9
9
  CLI_PROVIDER_VALUES
10
10
  } from "./chunk-5BHQICF2.js";
@@ -21,7 +21,7 @@ import {
21
21
  CLIENT_VERSION_TOO_OLD_CODE,
22
22
  buildClientVersionGateErrorDetail,
23
23
  evaluatePlatformHostedClientVersionGate
24
- } from "./chunk-5KTQVMCX.js";
24
+ } from "./chunk-GOO6G4PY.js";
25
25
  import {
26
26
  asTrimmedLowercaseString
27
27
  } from "./chunk-QSJ3HFEF.js";