nolo-cli 0.82.0-alpha.5 → 0.82.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.
Files changed (161) hide show
  1. package/README.md +2 -2
  2. package/{_executeModel-225YRU52.js → _executeModel-FHVQOYWX.js} +48 -48
  3. package/{action-D22U6CTH.js → action-YVYQEAAV.js} +11 -11
  4. package/{addContentAction-XAPUTGL4.js → addContentAction-O7R66HEX.js} +9 -9
  5. package/{addDialogAgentAction-M7VLLBZM.js → addDialogAgentAction-74OA7KYP.js} +8 -8
  6. package/{agentDeleteCommand-ZJNQGVR2.js → agentDeleteCommand-4427YKQF.js} +31 -29
  7. package/{agentEmailCommands-VLVWFWX2.js → agentEmailCommands-LYDIAUOP.js} +67 -63
  8. package/{agentGrantCommands-R3VQEZJR.js → agentGrantCommands-M3XFO6EN.js} +2 -2
  9. package/{agentListCommands-GHQGLAUU.js → agentListCommands-O4AEMQVV.js} +40 -32
  10. package/{agentMachineCommands-QDXYENZJ.js → agentMachineCommands-F6IHXMPD.js} +31 -29
  11. package/{agentProviderCommands-65ZC2WB4.js → agentProviderCommands-GNPTL5XR.js} +87 -0
  12. package/{agentPullCommand-N7L2CT7L.js → agentPullCommand-O5MPVJ5E.js} +3 -3
  13. package/agentRecordCommands-BDLFOU7E.js +128 -0
  14. package/{agentRunCommand-YSCD65HH.js → agentRunCommand-HSSYFGMC.js} +65 -61
  15. package/{agentRunControl-T44MESII.js → agentRunControl-WCTKX5VL.js} +2 -2
  16. package/{agentRuntimeLocal-ZOHB7OOO.js → agentRuntimeLocal-IW3IM5P6.js} +27 -25
  17. package/{agentSlice-O2SBU5TK.js → agentSlice-G54NT6PX.js} +10 -10
  18. package/{appDeleteCommands-PRT6K5N2.js → appDeleteCommands-ZXLXNRHF.js} +31 -29
  19. package/{appDeployCommands-63ZONFAN.js → appDeployCommands-PWB4YERK.js} +31 -29
  20. package/{appDeployStatusCommands-AFAYCVR3.js → appDeployStatusCommands-2EZKZP7Y.js} +31 -29
  21. package/{appGetCommands-TNZDZE36.js → appGetCommands-JNUKOWHO.js} +31 -29
  22. package/{appListCommands-IA4SPG2X.js → appListCommands-6X3H67SS.js} +31 -29
  23. package/{authCommand-EVGFLAHO.js → authCommand-F4EFRRX6.js} +164 -24
  24. package/{authCommands-ILTBI6JV.js → authCommands-RGOGCPP6.js} +4 -5
  25. package/builtinSkillRegistry-FUAVTRVZ.js +33 -0
  26. package/{chatQueueReduxAdapter-4SM3DAWX.js → chatQueueReduxAdapter-VJXYSZ2D.js} +24 -24
  27. package/{chromeCommands-VOIRNJBL.js → chromeCommands-FZYAU75D.js} +1 -1
  28. package/{chromeOpsCommands-M7DPCX2T.js → chromeOpsCommands-62P2Q2YB.js} +31 -1
  29. package/{chunk-C3FZR5EC.js → chunk-2F7RJC6L.js} +1 -1
  30. package/{chunk-QC5LGHYP.js → chunk-2YMRWISD.js} +10 -5
  31. package/{chunk-HQUORJTM.js → chunk-3BMYXEUW.js} +1 -1
  32. package/{chunk-3QPYFHAH.js → chunk-3DII57IT.js} +1 -1
  33. package/{chunk-NTW5GWDM.js → chunk-3VNWWVKB.js} +2 -0
  34. package/{chunk-DWUCB2A3.js → chunk-42V6BK2E.js} +1 -1
  35. package/{chunk-KIS76A2P.js → chunk-4EZHSKTB.js} +38 -4
  36. package/{chunk-GBPZKFYK.js → chunk-53HEEOTT.js} +4 -4
  37. package/{chunk-5XTOKQLW.js → chunk-5UTFL4QJ.js} +6 -2
  38. package/chunk-5ZUL4CUO.js +10 -0
  39. package/{chunk-E6RGHPDR.js → chunk-6D6VBVEW.js} +4 -6
  40. package/{chunk-CMH2SYHX.js → chunk-6OZ36FXI.js} +2 -2
  41. package/{chunk-NRALD3CC.js → chunk-76WEAXJB.js} +49 -10
  42. package/{chunk-3W2JJOH3.js → chunk-7REEVK4I.js} +3 -3
  43. package/{chunk-BYEJ7K2Z.js → chunk-7S4YWN7P.js} +1 -1
  44. package/{chunk-SREASRV5.js → chunk-ABQYVJBJ.js} +1 -1
  45. package/chunk-ACTMNVHM.js +93 -0
  46. package/{chunk-XWNRAIUL.js → chunk-AFUORTY4.js} +6 -16
  47. package/{chunk-E36HZARC.js → chunk-ASQYTZTR.js} +46 -9
  48. package/{chunk-73IOJLK2.js → chunk-AVV3M6CX.js} +10 -10
  49. package/{chunk-WL2RKIBF.js → chunk-BLJWCTRL.js} +1 -1
  50. package/chunk-BNGW5ASC.js +344 -0
  51. package/{chunk-SZLVDREM.js → chunk-BP4XNZRM.js} +3 -3
  52. package/{chunk-2KDR4CWE.js → chunk-BYMV6QZG.js} +24 -1
  53. package/{chunk-MYU3MJCF.js → chunk-DHDMC6FO.js} +175 -7
  54. package/{chunk-FP27MNSX.js → chunk-DL2LVM5E.js} +3 -3
  55. package/{chunk-EXMHJN7C.js → chunk-EYAQT56M.js} +4 -3
  56. package/{chunk-5LSS6MFZ.js → chunk-F5OE5KSJ.js} +13 -15
  57. package/{chunk-CJCJF5XB.js → chunk-FDTR4QJ6.js} +4 -2
  58. package/{chunk-NJ6WLAPS.js → chunk-FEEHCOBD.js} +1 -1
  59. package/{chunk-YSKEOTPH.js → chunk-GGMVRZRO.js} +155 -795
  60. package/{chunk-PYXL2CJL.js → chunk-GPCZ7UXG.js} +1 -1
  61. package/{chunk-K7AG465Q.js → chunk-GQBOR3G6.js} +4 -2
  62. package/{chunk-YFADVSZE.js → chunk-H62HCIUP.js} +6 -6
  63. package/{chunk-PZM3EENV.js → chunk-HJUYAD4A.js} +1 -1
  64. package/{chunk-A3NNC2LA.js → chunk-HOBJGHLD.js} +1235 -59
  65. package/{chunk-3JQ2NRYU.js → chunk-HVURBGF3.js} +4 -4
  66. package/{chunk-6SD5OPQ4.js → chunk-IIBAPOTQ.js} +11 -173
  67. package/{chunk-ZVN6I33J.js → chunk-IIVGDG4I.js} +6 -5
  68. package/{chunk-UDQWGU7F.js → chunk-J4MOO56S.js} +1 -1
  69. package/{chunk-KC5FAHVS.js → chunk-JEDZAO7L.js} +1 -1
  70. package/{chunk-6XIE5ZGI.js → chunk-JPGCXHNM.js} +1 -1
  71. package/chunk-JRQFUXY7.js +1625 -0
  72. package/chunk-KQ4ONNQD.js +677 -0
  73. package/{chunk-CPSZJBLK.js → chunk-L7I247DF.js} +105 -26
  74. package/{chunk-RXX4GDIH.js → chunk-LS2ZANRJ.js} +1 -1
  75. package/{chunk-BJIRLHJR.js → chunk-M2EJHDJP.js} +4 -0
  76. package/{chunk-EVBFYPDC.js → chunk-MC4XLIJ7.js} +6 -2
  77. package/{chunk-DSRXPQWA.js → chunk-NEDZDG3M.js} +43 -43
  78. package/{chunk-UJ63UXGE.js → chunk-OIVSQH2O.js} +1006 -801
  79. package/{chunk-AETZ7AD6.js → chunk-Q554LLSI.js} +1 -1
  80. package/chunk-Q5FJJ6XI.js +103 -0
  81. package/{chunk-AJHEFRGJ.js → chunk-Q67DOFOO.js} +214 -5
  82. package/{chunk-UZ6XXCVR.js → chunk-QDSINZM3.js} +15 -2
  83. package/{chunk-D6XYLSOS.js → chunk-QIAVMDHY.js} +1 -1
  84. package/{chunk-YWG6EMH3.js → chunk-RG6JBBX5.js} +10 -6
  85. package/{chunk-YXLXHIT2.js → chunk-RTUYRRBM.js} +6 -6
  86. package/{chunk-HHLTFENG.js → chunk-SDTTBMBU.js} +907 -317
  87. package/{chunk-QCZX4FTW.js → chunk-SH43IESU.js} +173 -15
  88. package/{chunk-LSZXYE64.js → chunk-SL4QHSPQ.js} +756 -80
  89. package/{chunk-FNGAF7C4.js → chunk-SNPMM7H3.js} +137 -12
  90. package/{chunk-EM6MPSEI.js → chunk-SPUTJ4DW.js} +52 -30
  91. package/{chunk-SO7B7NW3.js → chunk-STHU4Y5X.js} +413 -62
  92. package/{chunk-SPAQ4PVV.js → chunk-SV5IJK6K.js} +1 -1
  93. package/{chunk-KVDUCO4Q.js → chunk-TDRTS7QW.js} +16 -12
  94. package/{chunk-BJCWNHVU.js → chunk-TOP2VXOR.js} +2 -2
  95. package/{chunk-4EJ5QYB5.js → chunk-UKZDAFYT.js} +1 -1
  96. package/{chunk-PGSKWZCB.js → chunk-UZGQNTVW.js} +1 -1
  97. package/{chunk-ZZCJUXUI.js → chunk-V4MJDUSR.js} +2 -2
  98. package/{chunk-JYYZCK2Z.js → chunk-V7E4PXQD.js} +1 -1
  99. package/{chunk-OZX2IPKM.js → chunk-VLTIYV3X.js} +1 -1
  100. package/{chunk-NHRQCXIQ.js → chunk-VMFTFOWF.js} +13 -3
  101. package/{chunk-4UW2LDVA.js → chunk-VQW3EKYS.js} +15 -15
  102. package/{chunk-HH65VA5U.js → chunk-WGR3J4Q6.js} +101 -4
  103. package/{chunk-5J7W2VWW.js → chunk-WV42OMV7.js} +6 -265
  104. package/{chunk-Q46HQOW3.js → chunk-XTAZCQUT.js} +7 -7
  105. package/{chunk-DUJWWUGV.js → chunk-YQTQQX2H.js} +1 -1
  106. package/{chunk-BOYUESO7.js → chunk-Z77CRGTW.js} +1 -1
  107. package/{contentThunks-ENAVF2YU.js → contentThunks-D6QQKIPF.js} +25 -25
  108. package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-REAWYVTY.js} +2 -2
  109. package/{createAgentAutomationAction-CH6BYC7K.js → createAgentAutomationAction-UIPWW4DG.js} +25 -25
  110. package/{createDialogAction-23UDOXSO.js → createDialogAction-573VVP3X.js} +28 -28
  111. package/{createPageAction-J6AEMLHK.js → createPageAction-LRFSS6TD.js} +26 -26
  112. package/{dbSlice-GKGGFNOB.js → dbSlice-XVWBAGYN.js} +8 -8
  113. package/{deleteFile-LWSR674W.js → deleteFile-YG6QMJLU.js} +3 -3
  114. package/{dialogCommands-BJJGCCQR.js → dialogCommands-KFK2FF5B.js} +35 -31
  115. package/{dialogSlice-F7RD6PUY.js → dialogSlice-EXLC5XTD.js} +24 -24
  116. package/{docCreateCommands-53GB2FU3.js → docCreateCommands-V777WOZ7.js} +32 -30
  117. package/{docDeleteCommands-TAW5JEBU.js → docDeleteCommands-5KHT7Z5Q.js} +33 -31
  118. package/{docReadCommands-F5N7N5E3.js → docReadCommands-BLROGWP3.js} +32 -30
  119. package/{docStore-WX4YBGXC.js → docStore-DZNGJXX7.js} +9 -9
  120. package/{docUpdateCommands-YQ7TRT35.js → docUpdateCommands-QXOZHQ5H.js} +32 -30
  121. package/{fetchMessages-DRABNDPZ.js → fetchMessages-EIU7UFFK.js} +3 -4
  122. package/{getPricing-HRMSOF3E.js → getPricing-LUSEABA6.js} +4 -4
  123. package/{handleSendMessageAction-CW4LULIR.js → handleSendMessageAction-OROTZBPO.js} +24 -24
  124. package/index.js +102 -85
  125. package/{localDialogRead-PUQKFI73.js → localDialogRead-BTFJ4V2I.js} +2 -2
  126. package/{localRuntimeDb-P37ZTX55.js → localRuntimeDb-SYQGUF4U.js} +1 -1
  127. package/{machineCommands-FIYWY5EU.js → machineCommands-IJWERHRH.js} +64 -60
  128. package/{machineWsRunDispatch-KQ4OFFNR.js → machineWsRunDispatch-XQ36M4L7.js} +62 -58
  129. package/{memberThunks-KATHH3F4.js → memberThunks-QGFLFVCI.js} +9 -9
  130. package/{models-GS72DVJS.js → models-T3SG6MJ5.js} +2 -2
  131. package/{offlineMarxistsAgentCommand-GEH6SNNA.js → offlineMarxistsAgentCommand-HGXZV4XJ.js} +1 -1
  132. package/package.json +1 -1
  133. package/providerPresetApply-FG6NZ57W.js +214 -0
  134. package/providerRegistry-757OWH3O.js +31 -0
  135. package/{read-LC6HVYBN.js → read-COE3ZYR6.js} +5 -4
  136. package/{readDocTool-N3ERJHHF.js → readDocTool-5USN4A6V.js} +1 -1
  137. package/{readlineWorkspace-QYI6BRNA.js → readlineWorkspace-EB3362L3.js} +144 -108
  138. package/{removeDialogAgentAction-F5GPTALR.js → removeDialogAgentAction-IX3MN2ZO.js} +11 -11
  139. package/{runAgentClientLoop-GZ5VUGAW.js → runAgentClientLoop-3MR2NPWR.js} +47 -47
  140. package/{runtimeDoctorCommands-CROTMULY.js → runtimeDoctorCommands-X6WDBEQX.js} +2 -2
  141. package/{setDialogExtraReferencesAction-AY4ZCF3A.js → setDialogExtraReferencesAction-X4HCPNZL.js} +9 -9
  142. package/{setPrimaryDialogAgentAction-HPMG7V3R.js → setPrimaryDialogAgentAction-4GMIQLOD.js} +11 -11
  143. package/{settingSlice-OEJA4NQO.js → settingSlice-ZQZVUPKK.js} +10 -10
  144. package/{spaceCommands-IYMIXCMC.js → spaceCommands-TIDVUPDV.js} +30 -28
  145. package/{streamAgentChatTurn-EAXIUJTK.js → streamAgentChatTurn-CLP2JWCQ.js} +59 -58
  146. package/{switchDialogAgentAction-HMDZTZ4I.js → switchDialogAgentAction-N52LRPA3.js} +8 -8
  147. package/{tableCommands-SUNTHAYX.js → tableCommands-O6NWHFKV.js} +1 -1
  148. package/{toolApiClient-VGYUB4P5.js → toolApiClient-QVJ6HDNN.js} +2 -2
  149. package/{tools-QWQOW6J4.js → tools-OXEEBABR.js} +43 -43
  150. package/tuiSummaryLlmCaller-VJY3YD2Q.js +127 -0
  151. package/{updateCommands-Y363MC3L.js → updateCommands-2M74UL7P.js} +2 -2
  152. package/{updateDialogTitleAction-2HCE2M7S.js → updateDialogTitleAction-4YWKF2OE.js} +45 -28
  153. package/agentRecordCommands-AQFYM5HS.js +0 -124
  154. package/chunk-3IT2PFHL.js +0 -611
  155. package/chunk-I42VC5KR.js +0 -15
  156. package/chunk-NG4UT4K4.js +0 -79
  157. package/codingSkills-E6KSDNSJ.js +0 -48
  158. package/tuiSummaryLlmCaller-3Z24VUWM.js +0 -116
  159. package/{chunk-3RAG2NAD.js → chunk-UKWGR5SS.js} +3 -3
  160. package/{db-VQSAOWAO.js → db-WK5MDZVN.js} +1 -1
  161. package/{localRuntimeAuthority-R5UBODT3.js → localRuntimeAuthority-6IR6BBXE.js} +3 -3
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createChromeConnectorClient
3
- } from "./chunk-QCZX4FTW.js";
3
+ } from "./chunk-SH43IESU.js";
4
4
  import {
5
5
  toErrorMessage
6
6
  } from "./chunk-HNMXYYJR.js";
@@ -23,6 +23,18 @@ function wantsHelp(args) {
23
23
  function readTrimmedOption(args, flag) {
24
24
  return (readOption(args, flag) ?? "").trim();
25
25
  }
26
+ function readAllOptions(args, flag) {
27
+ const values = [];
28
+ for (let i = 0; i < args.length; i++) {
29
+ if (args[i] === flag && i + 1 < args.length) {
30
+ const val = args[i + 1].trim();
31
+ if (val && !val.startsWith("--")) {
32
+ values.push(val);
33
+ }
34
+ }
35
+ }
36
+ return values;
37
+ }
26
38
  function readIntOption(args, flag, usage) {
27
39
  const raw = readOption(args, flag);
28
40
  if (raw === void 0) return void 0;
@@ -112,6 +124,24 @@ var CHROME_OPS_SUBCOMMANDS = {
112
124
  };
113
125
  }
114
126
  },
127
+ upload: {
128
+ action: "set_files",
129
+ usage: "nolo chrome upload --tab <id> (--ref <elementRef> | --selector <css>) --file <path> [--file <path>...]",
130
+ payload: (args, usage) => {
131
+ const files = readAllOptions(args, "--file");
132
+ if (files.length === 0) {
133
+ throw new Error(`Missing required --file <path>. Usage: ${usage}`);
134
+ }
135
+ const target = requireTarget(args, usage);
136
+ const tabId = requireTabId(args, usage);
137
+ return {
138
+ tabId,
139
+ ...target,
140
+ ...target.elementRef ? { ref: target.elementRef } : {},
141
+ files
142
+ };
143
+ }
144
+ },
115
145
  press: {
116
146
  action: "press",
117
147
  usage: "nolo chrome press --tab <id> --key <key>",
@@ -14,7 +14,7 @@ function buildCliLocalRuntimeDbEnv(env = process.env) {
14
14
  };
15
15
  }
16
16
  async function getDefaultCliLocalRuntimeDb(options = {}) {
17
- const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-R5UBODT3.js");
17
+ const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-6IR6BBXE.js");
18
18
  return getAuthorityBackedDb(options);
19
19
  }
20
20
 
@@ -35,15 +35,16 @@ import {
35
35
  resolvePlatformAuthToken,
36
36
  resolvePlatformServerUrl,
37
37
  resolveProviderTransportDecision
38
- } from "./chunk-CMH2SYHX.js";
38
+ } from "./chunk-6OZ36FXI.js";
39
39
  import {
40
40
  clipCompactText,
41
41
  isMeaningfulChatCompletionOutput,
42
42
  isMeaningfulResponsesOutput
43
- } from "./chunk-E36HZARC.js";
43
+ } from "./chunk-ASQYTZTR.js";
44
44
  import {
45
- NOLO_CLIENT_VERSION_HEADER
46
- } from "./chunk-AJHEFRGJ.js";
45
+ NOLO_CLIENT_VERSION_HEADER,
46
+ isPlatformMimoProviderModel
47
+ } from "./chunk-Q67DOFOO.js";
47
48
  import {
48
49
  isRecord
49
50
  } from "./chunk-KUG52IAP.js";
@@ -465,7 +466,11 @@ function isAbortOrTimeoutError(error) {
465
466
  }
466
467
  var CHAT_PROXY_PATH = "/api/v1/chat";
467
468
  function shouldDisableThinking(providerConfig) {
468
- return providerConfig.provider.toLowerCase() === "mimo" || /xiaomimimo\.com/i.test(providerConfig.endpoint);
469
+ return providerConfig.provider.toLowerCase() === "mimo" || /xiaomimimo\.com/i.test(providerConfig.endpoint) || // 平台托管 MiMo(provider=nolo + mimo-v2.6-*):endpoint 通常已解析成
470
+ // api.xiaomimimo.com/...(上面的正则已命中),但 transport=direct 时
471
+ // endpoint 是 nolo 服务器地址——模型 id 判据保证两跳都关掉 thinking
472
+ // (上游 thinking 默认 enabled)。
473
+ isPlatformMimoProviderModel(providerConfig.provider, providerConfig.model);
469
474
  }
470
475
  function isResponsesEndpoint(endpoint) {
471
476
  return /\/responses$/i.test(endpoint.trim());
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dialogMessageKey
3
- } from "./chunk-NHRQCXIQ.js";
3
+ } from "./chunk-VMFTFOWF.js";
4
4
  import {
5
5
  asOptionalFiniteNumber
6
6
  } from "./chunk-WWC7I6TA.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_AGENT_BASE_POLICY,
3
3
  DEFAULT_USER_PREFERENCE_PROFILE
4
- } from "./chunk-XWNRAIUL.js";
4
+ } from "./chunk-AFUORTY4.js";
5
5
 
6
6
  // packages/ai/policy/runtimePolicy.ts
7
7
  var clampLevel = (value, fallback) => {
@@ -19,6 +19,7 @@ ${input}`;
19
19
  }
20
20
  let jsonStr;
21
21
  try {
22
+ JSON.stringify(input);
22
23
  const serialized = JSON.stringify(input, null, 2);
23
24
  if (serialized === void 0) {
24
25
  return task;
@@ -43,6 +44,7 @@ function calculateDelegatedPayloadMetrics(task, input, delegatedContent) {
43
44
  serializedInputForTokens = input;
44
45
  } else {
45
46
  try {
47
+ JSON.stringify(input);
46
48
  const serialized = JSON.stringify(input, null, 2);
47
49
  if (serialized !== void 0) {
48
50
  inputChars = serialized.length;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  mergeAvailabilityDeadline
3
- } from "./chunk-CJCJF5XB.js";
3
+ } from "./chunk-FDTR4QJ6.js";
4
4
 
5
5
  // packages/cli/credentialAvailability.ts
6
6
  import { homedir } from "node:os";
@@ -1,19 +1,25 @@
1
+ import {
2
+ isDevinOAuthAgent
3
+ } from "./chunk-5ZUL4CUO.js";
4
+ import {
5
+ getModelContextWindow
6
+ } from "./chunk-NEDZDG3M.js";
1
7
  import {
2
8
  findModelConfig,
3
9
  getProviderByModelName
4
- } from "./chunk-UJ63UXGE.js";
10
+ } from "./chunk-OIVSQH2O.js";
5
11
  import {
6
12
  asOptionalFiniteNumber
7
13
  } from "./chunk-WWC7I6TA.js";
8
14
  import {
9
15
  asTrimmedLowercaseString
10
16
  } from "./chunk-QSJ3HFEF.js";
11
- import {
12
- asTrimmedString
13
- } from "./chunk-3EUW3WEO.js";
14
17
  import {
15
18
  isRecord
16
19
  } from "./chunk-KUG52IAP.js";
20
+ import {
21
+ asTrimmedString
22
+ } from "./chunk-3EUW3WEO.js";
17
23
  import {
18
24
  asOptionalTrimmedString
19
25
  } from "./chunk-G3SUCT4W.js";
@@ -120,6 +126,33 @@ async function stripImagePartsForTextOnlyAgent(messages, agentConfig) {
120
126
  return { messages: !supportsVision && hasImages ? stripImagePartsFromMessages(messages) : messages };
121
127
  }
122
128
 
129
+ // packages/agent-runtime/devin/devinChannelWindows.ts
130
+ var DEVIN_CHANNEL_CONTEXT_WINDOWS = {
131
+ // SWE-2 家族(catalog 无裸 swe-2 selector;旧点号/裸写法如 swe-2、
132
+ // swe-1.7 实测均 permission_denied,已不是可用 selector)。
133
+ "swe-2-max": 262e3,
134
+ "swe-2-high": 262e3,
135
+ "swe-2-medium": 262e3,
136
+ // SWE-1.7 家族。
137
+ "swe-1-7": 262e3,
138
+ "swe-1-7-medium": 262e3,
139
+ "swe-1-7-lightning": 202752,
140
+ // SWE-1.6 家族(免费档默认)。
141
+ "swe-1-6": 2e5,
142
+ "swe-1-6-fast": 2e5,
143
+ // 经 devin 通道转售、且与厂商原生窗口不同的模型(catalog 枚举型 selector)。
144
+ "MODEL_GPT_5_2_LOW": 384e3,
145
+ "MODEL_GPT_5_2_MEDIUM": 384e3,
146
+ "MODEL_GPT_5_2_HIGH": 384e3,
147
+ "MODEL_GPT_5_2_XHIGH": 384e3
148
+ };
149
+ var devinChannelContextWindow = (model) => {
150
+ const raw = model?.trim();
151
+ if (!raw) return void 0;
152
+ return DEVIN_CHANNEL_CONTEXT_WINDOWS[raw];
153
+ };
154
+ var resolveAgentContextWindow = (agent) => (isDevinOAuthAgent(agent) ? devinChannelContextWindow(agent.model) : void 0) ?? getModelContextWindow(agent.model ?? "");
155
+
123
156
  // packages/agent-runtime/agentRecordConfig.ts
124
157
  function stringField(record, key) {
125
158
  const value = record[key];
@@ -540,6 +573,7 @@ export {
540
573
  resolveHistoricalToolContentCap,
541
574
  projectToolMessageContent,
542
575
  clipToolText,
576
+ resolveAgentContextWindow,
543
577
  resolveAgentRuntimeConfigFromRecord,
544
578
  buildDesktopAgentRuntimeAgentConfigSnapshot,
545
579
  buildDesktopAgentRuntimeDialogHistorySnapshot,
@@ -11,7 +11,7 @@ import {
11
11
  getAntigravityUserAgent,
12
12
  normalizeAntigravityTokenPayload,
13
13
  refreshAntigravityToken
14
- } from "./chunk-PGSKWZCB.js";
14
+ } from "./chunk-UZGQNTVW.js";
15
15
  import {
16
16
  writeOAuthCredential
17
17
  } from "./chunk-ONXOABJR.js";
@@ -21,12 +21,12 @@ import {
21
21
  import {
22
22
  asOptionalFiniteNumber
23
23
  } from "./chunk-WWC7I6TA.js";
24
- import {
25
- asTrimmedString
26
- } from "./chunk-3EUW3WEO.js";
27
24
  import {
28
25
  isRecord
29
26
  } from "./chunk-KUG52IAP.js";
27
+ import {
28
+ asTrimmedString
29
+ } from "./chunk-3EUW3WEO.js";
30
30
 
31
31
  // packages/cli/oauth/callback-server.ts
32
32
  import { createServer } from "node:http";
@@ -18,9 +18,13 @@ var CORE_DRAINING_MAX_ATTEMPTS = 30;
18
18
  var RETRYABLE_HTTP_STATUSES = /* @__PURE__ */ new Set([429, 503]);
19
19
  function isTransientFetchError(error) {
20
20
  const message = toErrorMessage(error);
21
- return /certificate|handshake|network|socket|timed out|timeout|ECONNRESET/i.test(
21
+ return /certificate|handshake|network|socket|timed out|timeout|ECONNRESET|UND_ERR_SOCKET|other side closed/i.test(
22
22
  message
23
- );
23
+ ) || // undici(Node fetch)连接中途被断开时抛 `TypeError: terminated`,message
24
+ // 就是裸的 "terminated"(真实 cause 是 UND_ERR_SOCKET)。只认「整条就是
25
+ // terminated」或「前缀: terminated」这种形态,避免把 access_terminated_error
26
+ // (配额封禁)或 "process was terminated by signal" 误判成可重试的网络抖动。
27
+ /(?:^|:\s*)terminated$/i.test(message.trim());
24
28
  }
25
29
  async function defaultSleep(ms) {
26
30
  await new Promise((resolve) => setTimeout(resolve, ms));
@@ -0,0 +1,10 @@
1
+ // packages/agent-runtime/devinOAuthPure.ts
2
+ function isDevinOAuthAgent(agent) {
3
+ const ref = agent.apiKeyRef?.trim().toLowerCase();
4
+ const prov = agent.provider?.trim().toLowerCase();
5
+ return ref === "devin" || prov === "devin";
6
+ }
7
+
8
+ export {
9
+ isDevinOAuthAgent
10
+ };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ESHYE7WU.js";
4
4
  import {
5
5
  getDefaultCliLocalRuntimeDb
6
- } from "./chunk-C3FZR5EC.js";
6
+ } from "./chunk-2F7RJC6L.js";
7
7
  import {
8
8
  buildCliRuntimeEnv,
9
9
  clearProfileAuthToken,
@@ -12,7 +12,7 @@ import {
12
12
  getProfileTokens,
13
13
  loadProfileConfig,
14
14
  saveDefaultProfile
15
- } from "./chunk-2KDR4CWE.js";
15
+ } from "./chunk-BYMV6QZG.js";
16
16
  import {
17
17
  resolveAuthTokenFromEnv
18
18
  } from "./chunk-A7GB5UGH.js";
@@ -20,14 +20,12 @@ import {
20
20
  DEFAULT_NOLO_SERVER_URL
21
21
  } from "./chunk-OLZBQWZU.js";
22
22
  import {
23
+ asTrimmedNonEmptyStringArray,
23
24
  createMemoryKey,
24
25
  createMemoryOwnerIndexKey,
25
26
  createMemorySubjectKindIndexKey,
26
27
  memoryOwnerRange
27
- } from "./chunk-NHRQCXIQ.js";
28
- import {
29
- asTrimmedNonEmptyStringArray
30
- } from "./chunk-I42VC5KR.js";
28
+ } from "./chunk-VMFTFOWF.js";
31
29
  import {
32
30
  asTrimmedString
33
31
  } from "./chunk-3EUW3WEO.js";
@@ -3,7 +3,7 @@ import {
3
3
  resolvePlatformChatCompletionsEndpoint,
4
4
  resolvePlatformHostedCredentialProvider,
5
5
  resolvePlatformResponsesEndpoint
6
- } from "./chunk-K7AG465Q.js";
6
+ } from "./chunk-GQBOR3G6.js";
7
7
  import {
8
8
  CLI_PROVIDER_VALUES
9
9
  } from "./chunk-W7XHHYWM.js";
@@ -11,7 +11,7 @@ import {
11
11
  CLIENT_VERSION_TOO_OLD_CODE,
12
12
  buildClientVersionGateErrorDetail,
13
13
  evaluatePlatformHostedClientVersionGate
14
- } from "./chunk-AJHEFRGJ.js";
14
+ } from "./chunk-Q67DOFOO.js";
15
15
  import {
16
16
  asTrimmedLowercaseString
17
17
  } from "./chunk-QSJ3HFEF.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  buildLocalAgentLookupKeys,
3
3
  shouldReadAgentKeyRemotely
4
- } from "./chunk-BOYUESO7.js";
4
+ } from "./chunk-Z77CRGTW.js";
5
5
  import {
6
6
  resolveCliAgentKeyInput
7
- } from "./chunk-SPAQ4PVV.js";
7
+ } from "./chunk-SV5IJK6K.js";
8
8
  import {
9
9
  toErrorMessage
10
10
  } from "./chunk-HNMXYYJR.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-A7GB5UGH.js";
22
22
  import {
23
23
  createAgentKey
24
- } from "./chunk-NHRQCXIQ.js";
24
+ } from "./chunk-VMFTFOWF.js";
25
25
 
26
26
  // packages/cli/agentRecordHelpers.ts
27
27
  import { readFileSync } from "node:fs";
@@ -266,18 +266,26 @@ async function resolveAgentRecordFromHybridStore(args) {
266
266
  if (record && typeof record === "object") {
267
267
  const cacheAge = Date.now() - (Number(record?.cachedAt) || 0);
268
268
  const STALE_CACHE_MS = 6e4;
269
- if (record?.serverOrigin && shouldReadAgentKeyRemotely(key) && cacheAge > STALE_CACHE_MS) {
269
+ if (record?.serverOrigin && shouldReadAgentKeyRemotely(key) && (args.fresh === true || cacheAge > STALE_CACHE_MS)) {
270
270
  try {
271
- await readAgentRecord({
271
+ const fresh = await readAgentRecord({
272
272
  agentKey: key,
273
273
  authToken,
274
274
  fallbackFetchImpl: args.fallbackFetchImpl,
275
275
  fetchImpl: args.fetchImpl,
276
276
  serverUrl: record.serverOrigin
277
277
  });
278
- try {
279
- await args.db.put(key, { ...record, cachedAt: Date.now() });
280
- } catch {
278
+ if (fresh) {
279
+ try {
280
+ await args.db.put(key, { ...fresh, dbKey: key, cachedAt: Date.now() });
281
+ } catch {
282
+ }
283
+ return {
284
+ agentKey: key,
285
+ record: fresh,
286
+ source: record?.serverOrigin ? "remote-cache" : "local-cache",
287
+ cacheHit: false
288
+ };
281
289
  }
282
290
  } catch (err) {
283
291
  const msg = toErrorMessage(err);
@@ -293,7 +301,10 @@ async function resolveAgentRecordFromHybridStore(args) {
293
301
  return {
294
302
  agentKey: key,
295
303
  record,
296
- source: record?.serverOrigin ? "remote-cache" : "local-cache"
304
+ source: record?.serverOrigin ? "remote-cache" : "local-cache",
305
+ // 明确告知调用方「这是缓存视图」——缓存可能持有字段子集,也可能已过期。
306
+ // 调用方据此决定是否用 fresh 重读,而不是把不完整视图当成真值。
307
+ cacheHit: true
297
308
  };
298
309
  }
299
310
  } catch {
@@ -459,6 +470,7 @@ function parseAgentUpdateArgs(args) {
459
470
  const name = readOption(args, "--name");
460
471
  const customProviderUrl = readOption(args, "--custom-provider-url");
461
472
  const apiKey = readOption(args, "--api-key") ?? readOption(args, "--provider-api-key");
473
+ const presetId = readOption(args, "--preset") ?? readOption(args, "--provider-preset");
462
474
  const verify = args.includes("--verify");
463
475
  const verifyPrompt = readOption(args, "--verify-prompt");
464
476
  const maxConcurrent = parsePositiveIntegerOption(
@@ -498,13 +510,40 @@ function parseAgentUpdateArgs(args) {
498
510
  throw new Error("No updates provided. Use --model / --cli-provider / --api-source / --field key=value.");
499
511
  }
500
512
  }
501
- return { agentInput, updates, promptDoc, copyProviderFrom, verify, verifyPrompt };
513
+ return { agentInput, updates, promptDoc, copyProviderFrom, verify, verifyPrompt, presetId };
502
514
  }
503
515
  async function buildCreatedAgentRecord(args) {
504
516
  const serverUrl = args.cliArgs ? resolveServerUrl(args.cliArgs, args.env) : resolveServerUrl(args.env);
505
517
  const userId = parseUserIdFromAuthToken(args.authToken);
506
518
  const resolvedAgentInput = resolveCliAgentKeyInput(args.parsed.agentInput);
507
519
  const agentKey = resolvedAgentInput.startsWith("agent-") ? resolvedAgentInput : createAgentKey.private(userId || "local", resolvedAgentInput);
520
+ if (args.parsed.presetId) {
521
+ const { resolveProviderPresetFields } = await import("./providerPresetApply-FG6NZ57W.js");
522
+ const fields = resolveProviderPresetFields(args.parsed.presetId);
523
+ if (fields.kind === "manual") {
524
+ throw new Error(
525
+ `unknown --preset "${args.parsed.presetId}". Run \`nolo agent providers\` to list preset ids.`
526
+ );
527
+ }
528
+ if (fields.kind === "oauth" || fields.requiresDesktopOAuth) {
529
+ throw new Error(
530
+ `--preset "${args.parsed.presetId}" is an OAuth subscription; create it in Nolo Desktop (OAuth login required).`
531
+ );
532
+ }
533
+ const u = args.parsed.updates;
534
+ u.apiSource = "custom";
535
+ u.provider = u.provider ?? fields.provider;
536
+ if (fields.customProviderUrl && !u.customProviderUrl) {
537
+ u.customProviderUrl = fields.customProviderUrl;
538
+ }
539
+ if (fields.apiKeyHeader && !u.apiKeyHeader) {
540
+ u.apiKeyHeader = fields.apiKeyHeader;
541
+ }
542
+ if (!u.model && fields.model) u.model = fields.model;
543
+ if (fields.defaultReasoningEffort && u.reasoning_effort == null) {
544
+ u.reasoning_effort = fields.defaultReasoningEffort;
545
+ }
546
+ }
508
547
  if (args.parsed.copyProviderFrom) {
509
548
  const providerSource = await resolveAgentRecordFromHybridStore({
510
549
  agentInput: args.parsed.copyProviderFrom,
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-YSKEOTPH.js";
3
+ } from "./chunk-GGMVRZRO.js";
4
4
  import {
5
5
  i18n_default
6
- } from "./chunk-SO7B7NW3.js";
6
+ } from "./chunk-STHU4Y5X.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
9
  } from "./chunk-O6OSWFZQ.js";
10
10
  import {
11
11
  isNoloHostedProvider
12
- } from "./chunk-AJHEFRGJ.js";
12
+ } from "./chunk-Q67DOFOO.js";
13
13
  import {
14
14
  asTrimmedLowercaseString
15
15
  } from "./chunk-QSJ3HFEF.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dialogMessageRange
3
- } from "./chunk-NHRQCXIQ.js";
3
+ } from "./chunk-VMFTFOWF.js";
4
4
  import {
5
5
  isTombstoneRecord
6
6
  } from "./chunk-GBRG75BQ.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getRuntimeServerContext,
3
3
  scheduleDeleteReplication
4
- } from "./chunk-3RAG2NAD.js";
4
+ } from "./chunk-UKWGR5SS.js";
5
5
  import {
6
6
  fetchFromClientDb
7
7
  } from "./chunk-QOKAKDPE.js";
@@ -0,0 +1,93 @@
1
+ import {
2
+ cloudflareModels,
3
+ gmiModels,
4
+ openrouterModels,
5
+ platformHostedModels,
6
+ zaiModels
7
+ } from "./chunk-Q67DOFOO.js";
8
+
9
+ // packages/ai/llm/modelAbility.ts
10
+ var MODEL_ABILITY_TABLE = {
11
+ "claude-opus-5": { passAt1: 74, benchmarkScore: 61, writingScore: 82, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 51, outputSpeedTps: 54, firstAnswerTokenS: 50.63, costPerTaskUsd: 5.86 }, aaEvals: { "aa-analyst-agent": 53.8, "aa-briefcase-v1.1": 1673, "aa-omniscience": 60.9, "automationbench-aa": 56.6, "critpt": 29.1, "enterprise-ops-gym-aa": 47.5, "gdp-pdf": 21.6, "gdpval-aa-v2.1": 1708, "harvey-lab-aa": 93.5, "humanitys-last-exam": 54.9, "mlcr-aa": 59.4, "mmmu-pro": 84.7, "scicode": 56.4, "terminal-bench-4.0": 49 } },
12
+ "claude-opus-5-5": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 58, costPerTaskUsd: 5.98 }, aaEvals: { "aa-briefcase-v1.1": 1822, "aa-lcr-v1.1": 84.7, "aa-omniscience": 66.2, "aa-omniscience-non-hallucination": 58.6, "automationbench-aa": 69.5, "critpt": 31.7, "gdp-pdf": 28.8, "gdpval-aa-v2.1": 1846, "harvey-lab-aa": 91.2, "humanitys-last-exam": 61.4, "mlcr-aa": 66.7, "mmmu-pro": 87.7, "scicode": 66.9, "terminal-bench-4.0": 59.6 } },
13
+ "gpt-6-astra": { passAt1: 85, benchmarkScore: 90, writingScore: 92, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 53, outputSpeedTps: 52, firstAnswerTokenS: 352.15, costPerTaskUsd: 3.26 }, aaEvals: { "aa-analyst-agent": 51.2, "aa-briefcase-v1.1": 1569, "aa-omniscience": 62.6, "aa-omniscience-non-hallucination": 51.3, "automationbench-aa": 68.5, "critpt": 31.7, "gdp-pdf": 32.2, "gdpval-aa-v2.1": 1542, "humanitys-last-exam": 54.7, "mlcr-aa": 35, "mmmu-pro": 86.9, "scicode": 56.5, "terminal-bench-4.0": 59.6 } },
14
+ "claude-opus-4-6": { passAt1: 65, benchmarkScore: 68, writingScore: 78, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 32, outputSpeedTps: 40, firstAnswerTokenS: 21.89 } },
15
+ "gpt-5.6-sol": { passAt1: 73, benchmarkScore: 59, writingScore: 80, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 47, outputSpeedTps: 77, firstAnswerTokenS: 113.21, costPerTaskUsd: 1.99 }, aaEvals: { "aa-analyst-agent": 47.5, "aa-briefcase-v1.1": 1487, "aa-lcr-v1.1": 84, "aa-omniscience": 59.4, "automationbench-aa": 60.1, "critpt": 32.3, "enterprise-ops-gym-aa": 42.9, "gdp-pdf": 27.2, "gdpval-aa-v2.1": 1588, "harvey-lab-aa": 87.2, "humanitys-last-exam": 49.5, "ifbench": 72.7, "itbench-aa": 56.2, "mlcr-aa": 26.1, "mmmu-pro": 83.4, "scicode": 57.1, "terminal-bench-4.0": 39.9 } },
16
+ "claude-fable-5": { passAt1: 70, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 50, outputSpeedTps: 68, firstAnswerTokenS: 110.36, costPerTaskUsd: 8.75 }, aaEvals: { "aa-analyst-agent": 48.8, "aa-omniscience": 65.3, "enterprise-ops-gym-aa": 51.1, "harvey-lab-aa": 93.6, "humanitys-last-exam": 55.5, "mlcr-aa": 64.4, "scicode": 61 } },
17
+ "gpt-5.6-terra": { passAt1: 70, benchmarkScore: 55, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 42, outputSpeedTps: 83, firstAnswerTokenS: 211.09, costPerTaskUsd: 1.4 }, aaEvals: { "apex-agents-aa": 38.9, "itbench-aa": 51 } },
18
+ "kimi-k3": { passAt1: 69, benchmarkScore: 57, writingScore: 81, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/kimi", intelligenceIndex: 44, outputSpeedTps: 37, firstAnswerTokenS: 4.08, costPerTaskUsd: 2 }, aaEvals: { "aa-analyst-agent": 38.8, "aa-briefcase-v1.1": 1504, "aa-lcr-v1.1": 88.7, "aa-omniscience": 47.6, "aa-omniscience-non-hallucination": 53.2, "apex-agents-aa": 41.3, "automationbench-aa": 58.3, "critpt": 23.4, "enterprise-ops-gym-aa": 45.3, "gdp-pdf": 22, "gdpval-aa-v2.1": 1524, "harvey-lab-aa": 94.6, "humanitys-last-exam": 46.9, "itbench-aa": 47.7, "mlcr-aa": 38.3, "mmmu-pro": 80.5, "scicode": 59.5 } },
19
+ "gpt-5.5": { passAt1: 67, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 38, outputSpeedTps: 91, firstAnswerTokenS: 62.45, costPerTaskUsd: 2.63 }, aaEvals: { "aa-analyst-agent": 50, "aa-lcr-v1.1": 84.3, "apex-agents-aa": 37.7, "itbench-aa": 45.8 } },
20
+ "gpt-5.6-luna": { passAt1: 67, benchmarkScore: 51, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 37, outputSpeedTps: 133, firstAnswerTokenS: 114.02, costPerTaskUsd: 0.18 }, aaEvals: { "aa-lcr-v1.1": 83.7, "aa-omniscience": 42.7, "apex-agents-aa": 35.8, "critpt": 20.6, "enterprise-ops-gym-aa": 40.8, "gdp-pdf": 24, "harvey-lab-aa": 87.9, "itbench-aa": 40.3, "mlcr-aa": 19.4, "mmmu-pro": 78.6 } },
21
+ "gpt-6-luna": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 37, outputSpeedTps: 132, firstAnswerTokenS: 104.42, costPerTaskUsd: 0.07 }, aaEvals: { "aa-lcr-v1.1": 83.3, "aa-omniscience": 43.8, "critpt": 19.4, "gdp-pdf": 20.4, "mmmu-pro": 75.5, "scicode": 54.6 } },
22
+ "grok-4.6": { passAt1: 67, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xai", intelligenceIndex: 44, outputSpeedTps: 61, firstAnswerTokenS: 45.3, costPerTaskUsd: 1.86 }, aaEvals: { "aa-analyst-agent": 41.2, "aa-briefcase-v1.1": 1546, "aa-omniscience": 48.2, "aa-omniscience-non-hallucination": 34.3, "automationbench-aa": 67, "enterprise-ops-gym-aa": 48.3, "gdp-pdf": 17, "gdpval-aa-v2.1": 1605, "humanitys-last-exam": 42.9, "scicode": 56.5, "terminal-bench-4.0": 21.2 } },
23
+ "deepseek-v4-pro": { passAt1: 63, writingScore: 79, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/deepseek-v4-pro", intelligenceIndex: 36, outputSpeedTps: 66, firstAnswerTokenS: 1.7, costPerTaskUsd: 0.67 }, aaEvals: { "enterprise-ops-gym-aa": 49.6 } },
24
+ "qwen3.8-max": { passAt1: 57, writingScore: 77, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/qwen3-8-max", intelligenceIndex: 45, outputSpeedTps: 39.3, costPerTaskUsd: 5.41 }, aaEvals: { "aa-briefcase-v1.1": 1640, "aa-omniscience-non-hallucination": 28.8, "gdp-pdf": 22.8, "gdpval-aa-v2.1": 1668, "humanitys-last-exam": 43.1, "mlcr-aa": 20, "mmmu-pro": 82.8, "terminal-bench-4.0": 38.9 } },
25
+ "muse-spark-1.3": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/meta", intelligenceIndex: 48, outputSpeedTps: 219, firstAnswerTokenS: 24.12, costPerTaskUsd: 1.6 }, aaEvals: { "aa-briefcase-v1.1": 1597, "aa-lcr-v1.1": 83, "aa-omniscience": 43.6, "aa-omniscience-non-hallucination": 32.9, "automationbench-aa": 57.9, "critpt": 24.9, "gdp-pdf": 26.6, "gdpval-aa-v2.1": 1674, "harvey-lab-aa": 95.5, "humanitys-last-exam": 48.7, "mlcr-aa": 43.3, "scicode": 58.8, "terminal-bench-4.0": 33.3 } },
26
+ "muse-spark-1.2": { passAt1: 55, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/meta", intelligenceIndex: 40, outputSpeedTps: 187, firstAnswerTokenS: 16.6, costPerTaskUsd: 0.97 } },
27
+ "grok-4.5": { passAt1: 54, benchmarkScore: 54, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xai", intelligenceIndex: 39, outputSpeedTps: 55, firstAnswerTokenS: 11.28, costPerTaskUsd: 1.04 } },
28
+ "claude-sonnet-5": { passAt1: 54, benchmarkScore: 53, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 38, outputSpeedTps: 79, firstAnswerTokenS: 150.02, costPerTaskUsd: 5.09 }, aaEvals: { "aa-analyst-agent": 46.2, "mlcr-aa": 55 } },
29
+ "deepseek-flash": { passAt1: 53 },
30
+ "deepseek-v4-flash": { passAt1: 53, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/deepseek-v4-flash", intelligenceIndex: 34, outputSpeedTps: 221, firstAnswerTokenS: 1.16, costPerTaskUsd: 0.22 } },
31
+ "gemini-3.7-flash": { passAt1: 58, benchmarkScore: 65, writingScore: 88, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/google", intelligenceIndex: 40, outputSpeedTps: 281, firstAnswerTokenS: 4.9 }, aaEvals: { "aa-analyst-agent": 60, "enterprise-ops-gym-aa": 50.4, "scicode": 59.8 } },
32
+ // TODO(benchmark): gemini-3.8-flash 官方基准快照未出,暂沿用 3.7 分数占位,确认后更新。
33
+ "gemini-3.8-flash": { passAt1: 58, benchmarkScore: 65, writingScore: 88, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/google", intelligenceIndex: 41, outputSpeedTps: 291, firstAnswerTokenS: 15.14, costPerTaskUsd: 1.24 }, aaEvals: { "aa-lcr-v1.1": 81.3, "aa-omniscience": 54.6, "aa-omniscience-non-hallucination": 55.2, "automationbench-aa": 59.9, "critpt": 18.3, "gdp-pdf": 21, "humanitys-last-exam": 47.8, "mlcr-aa": 21.7, "mmmu-pro": 85.6, "scicode": 56.6 } },
34
+ "muse-spark-1.1": { passAt1: 53, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/meta", intelligenceIndex: 34, costPerTaskUsd: 1.38 } },
35
+ "gpt-5.4": { passAt1: 52, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 39, outputSpeedTps: 140, firstAnswerTokenS: 141.55 }, aaEvals: { "apex-agents-aa": 33.3 } },
36
+ "gemini-3.6-flash": { passAt1: 49, benchmarkScore: 50, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/google", intelligenceIndex: 34, outputSpeedTps: 178, firstAnswerTokenS: 17.32, costPerTaskUsd: 0.93 } },
37
+ "glm-5.3": { passAt1: 52, benchmarkScore: 60, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/glm-5-3", intelligenceIndex: 45, outputSpeedTps: 57, costPerTaskUsd: 2.01 }, aaEvals: { "aa-briefcase-v1.1": 1516, "aa-omniscience-non-hallucination": 29.6, "automationbench-aa": 62.2, "critpt": 19.1, "enterprise-ops-gym-aa": 36.4, "gdpval-aa-v2.1": 1646, "humanitys-last-exam": 42.3, "mlcr-aa": 51.1, "scicode": 59, "terminal-bench-4.0": 41.9 } },
38
+ "glm-5.2": { passAt1: 44, benchmarkScore: 51, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/glm-5-2", intelligenceIndex: 34, outputSpeedTps: 69.2, costPerTaskUsd: 0.96 }, aaEvals: { "apex-agents-aa": 33.7, "itbench-aa": 42.7 } },
39
+ // ── StepFun(阶跃星辰)─ 仅有 AA 快照,无 pass@1 等旧字段。
40
+ // 来源:https://artificialanalysis.ai/providers/stepfun 对比表。
41
+ // 其中 3.5-flash-2603 已被 AA 标记 deprecated(官方推荐 3.7-flash)。
42
+ "step-5-preview": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 44, outputSpeedTps: 85, firstAnswerTokenS: 3.48, costPerTaskUsd: 0.72 }, aaEvals: { "aa-briefcase-v1.1": 1432, "aa-lcr-v1.1": 88.3, "aa-omniscience-non-hallucination": 43, "critpt": 20.9, "gdpval-aa-v2.1": 1566, "humanitys-last-exam": 46.5, "mmmu-pro": 76.4, "scicode": 58.9, "terminal-bench-4.0": 33.3 } },
43
+ "step-3.7-flash": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 19, outputSpeedTps: 190, firstAnswerTokenS: 2.66 } },
44
+ "step-3.5-flash-2603": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 17, outputSpeedTps: 133, firstAnswerTokenS: 3.33 } },
45
+ "step-3.5-flash": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 17, outputSpeedTps: 137, firstAnswerTokenS: 3.5 } },
46
+ // ── Xiaomi MiMo ── AA 只收录 Pro 档(V2.6-Pro / V2.5-Pro);
47
+ // mimo-v2.6-flash 与 mimo-v2.6-pro-ultraspeed AA 未收录,缺失即缺失。
48
+ "mimo-v2.6-pro": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xiaomi", intelligenceIndex: 46, outputSpeedTps: 49, firstAnswerTokenS: 2.93, costPerTaskUsd: 0.13 }, aaEvals: { "aa-briefcase-v1.1": 1522, "aa-lcr-v1.1": 86.3, "aa-omniscience-non-hallucination": 40.6, "automationbench-aa": 58.6, "critpt": 26.6, "gdp-pdf": 19.2, "gdpval-aa-v2.1": 1673, "humanitys-last-exam": 49.4, "scicode": 60.9, "terminal-bench-4.0": 34.8 } },
49
+ "mimo-v2.5-pro": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xiaomi", intelligenceIndex: 26, outputSpeedTps: 52, firstAnswerTokenS: 7.95, costPerTaskUsd: 0.05 } }
50
+ };
51
+ var EFFORT_SUFFIXES = [
52
+ "-extra-low",
53
+ "-low",
54
+ "-medium",
55
+ "-high",
56
+ "-thinking",
57
+ "-tiered",
58
+ ":cloud"
59
+ ];
60
+ function normalizeModelName(raw) {
61
+ let name = raw.trim().toLowerCase();
62
+ const slash = name.indexOf("/");
63
+ if (slash !== -1) name = name.slice(slash + 1);
64
+ for (const suffix of EFFORT_SUFFIXES) {
65
+ if (name.endsWith(suffix) && name.length > suffix.length) {
66
+ name = name.slice(0, name.length - suffix.length);
67
+ break;
68
+ }
69
+ }
70
+ return name;
71
+ }
72
+ function getModelAbility(modelName) {
73
+ const entry = MODEL_ABILITY_TABLE[normalizeModelName(modelName)];
74
+ return entry ? { ...entry } : void 0;
75
+ }
76
+
77
+ // packages/ai/llm/models.ts
78
+ var withProvider = (provider) => (models) => models.map((model) => ({ ...model, provider }));
79
+ var ALL_MODELS = [
80
+ ...withProvider("nolo")(platformHostedModels),
81
+ ...withProvider("openrouter")(openrouterModels),
82
+ ...withProvider("cloudflare")(cloudflareModels),
83
+ ...withProvider("gmi")(gmiModels),
84
+ ...withProvider("zai")(zaiModels)
85
+ ].map((model) => {
86
+ const ability = getModelAbility(model.name);
87
+ return ability ? { ...model, ability } : model;
88
+ });
89
+
90
+ export {
91
+ getModelAbility,
92
+ ALL_MODELS
93
+ };
@@ -2,8 +2,9 @@ import {
2
2
  parsePositiveFiniteNumberOrFallback
3
3
  } from "./chunk-Y5GCAMGP.js";
4
4
  import {
5
- DEFAULT_SYSTEM_AGENT_CAPABILITIES
6
- } from "./chunk-UZ6XXCVR.js";
5
+ DEFAULT_SYSTEM_AGENT_CAPABILITIES,
6
+ noloAgentId
7
+ } from "./chunk-QDSINZM3.js";
7
8
  import {
8
9
  asRecordOrEmpty
9
10
  } from "./chunk-KX6YBIHG.js";
@@ -13,25 +14,22 @@ import {
13
14
  toTimestampMs,
14
15
  upsert,
15
16
  write
16
- } from "./chunk-YFADVSZE.js";
17
+ } from "./chunk-H62HCIUP.js";
17
18
  import {
18
19
  createUserKey,
19
20
  createUserPreferenceKey,
20
21
  ulid
21
- } from "./chunk-NHRQCXIQ.js";
22
+ } from "./chunk-VMFTFOWF.js";
22
23
  import {
23
24
  asTrimmedLowercaseString
24
25
  } from "./chunk-QSJ3HFEF.js";
25
- import {
26
- BUILTIN_NOLO_AGENT_KEY
27
- } from "./chunk-5J7W2VWW.js";
28
26
  import {
29
27
  asyncThunkCreator,
30
28
  buildCreateSlice,
31
29
  createAction,
32
30
  createAsyncThunk,
33
31
  createSelector
34
- } from "./chunk-3RAG2NAD.js";
32
+ } from "./chunk-UKWGR5SS.js";
35
33
  import {
36
34
  getAllServers,
37
35
  getIsDesktopApp,
@@ -1016,12 +1014,6 @@ var withSettingsRecordSchema = (changes) => ({
1016
1014
  schemaVersion: SETTINGS_RECORD_SCHEMA_VERSION
1017
1015
  });
1018
1016
 
1019
- // packages/core/init.ts
1020
- var nolotusId = "0e95801d90";
1021
- var ADMIN_IDS = /* @__PURE__ */ new Set([nolotusId]);
1022
- var isSystemAdmin = (userId) => userId != null && ADMIN_IDS.has(userId);
1023
- var noloAgentId = BUILTIN_NOLO_AGENT_KEY;
1024
-
1025
1017
  // packages/app/settings/settingNormalizers.ts
1026
1018
  var hasOwn = (target, key) => Object.prototype.hasOwnProperty.call(target, key);
1027
1019
  var normalizeDefaultAgentIdSetting = (value) => {
@@ -1994,8 +1986,6 @@ export {
1994
1986
  AGENT_UPDATE_FIELD_NAMES,
1995
1987
  normalizeAgentUpdateFieldList,
1996
1988
  SYSTEM_DEFAULT_AGENT_ID,
1997
- nolotusId,
1998
- isSystemAdmin,
1999
1989
  normalizeSettingChanges,
2000
1990
  LOCAL_FIRST_APPEARANCE_KEYS,
2001
1991
  LOCAL_ONLY_SETTINGS_KEYS,