nolo-cli 0.153.2 → 0.154.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 (136) hide show
  1. package/{_executeModel-7PZNF3KM.js → _executeModel-3HHZYHHB.js} +44 -42
  2. package/accountResolver-55EDKEIK.js +1 -1
  3. package/action-GPPJC5TI.js +1 -1
  4. package/{addContentAction-BI6RDRTQ.js → addContentAction-XJQEJ4XW.js} +6 -6
  5. package/{addDialogAgentAction-4RJYUSIK.js → addDialogAgentAction-5WZX5CAY.js} +5 -5
  6. package/{agentDeleteCommand-52SBFMA4.js → agentDeleteCommand-ON2KVSJ5.js} +60 -60
  7. package/{agentEmailCommands-FLTHAK4Y.js → agentEmailCommands-2QPD5VP3.js} +63 -63
  8. package/{agentListCommands-LKFRVROH.js → agentListCommands-L33M3I6V.js} +33 -33
  9. package/{agentMachineCommands-V3E6STQ6.js → agentMachineCommands-V44DPSED.js} +30 -28
  10. package/{agentProviderCommands-MKG2OOEY.js → agentProviderCommands-CXBHNONN.js} +5 -5
  11. package/{agentPullCommand-FA43RBRU.js → agentPullCommand-GXXEDOSA.js} +4 -4
  12. package/{agentRecordCommands-KAOY56RD.js → agentRecordCommands-CKILCNQZ.js} +57 -57
  13. package/{agentRunCommand-FXAN65RN.js → agentRunCommand-6IN7NK7H.js} +59 -59
  14. package/{agentRunControl-2C5GM3BW.js → agentRunControl-XBSNHHZE.js} +7 -7
  15. package/{agentRuntimeLocal-V4URZOQL.js → agentRuntimeLocal-XCKO5FVP.js} +20 -18
  16. package/{agentSlice-LAV5TJXT.js → agentSlice-YT3VCCEW.js} +6 -6
  17. package/{appDeleteCommands-7EZRTNIP.js → appDeleteCommands-2PJFNLAJ.js} +28 -26
  18. package/{appDeployCommands-3U6MEES7.js → appDeployCommands-AZCMCMK6.js} +28 -26
  19. package/{appDeployStatusCommands-TAC6BYC6.js → appDeployStatusCommands-HSIKPVJN.js} +28 -26
  20. package/{appGetCommands-MFNPLXGO.js → appGetCommands-IUZCPAP7.js} +28 -26
  21. package/{appListCommands-QVZAUEUU.js → appListCommands-JLFVS44M.js} +28 -26
  22. package/{authCommand-NIV3DKPF.js → authCommand-3Z52KJID.js} +19 -19
  23. package/{authCommands-AMNIAKEG.js → authCommands-QOCKVPX3.js} +5 -5
  24. package/{builtinSkillRegistry-H3AY27TR.js → builtinSkillRegistry-LJV7FHNI.js} +4 -4
  25. package/{chunk-4RJJDA57.js → chunk-2ODX2C4E.js} +154 -30
  26. package/{chunk-UCLSOLX4.js → chunk-2XDQAWBM.js} +12 -12
  27. package/{chunk-XJOBYJWN.js → chunk-2ZYCNT2O.js} +72 -33
  28. package/{chunk-YIIQNHJW.js → chunk-3GTVM7NJ.js} +19 -19
  29. package/{chunk-US6MKPE7.js → chunk-3L5MSPWX.js} +1 -1
  30. package/{chunk-SGJRNVYF.js → chunk-4L4K6YR7.js} +16 -2
  31. package/{chunk-P5QACQDK.js → chunk-62TBKWTV.js} +1 -1
  32. package/{chunk-TRW43TSC.js → chunk-6EQD4AQL.js} +41 -1
  33. package/{chunk-YLMMECCH.js → chunk-6XIE5ZGI.js} +1 -1
  34. package/{chunk-J2ATF74A.js → chunk-BAWAKW7X.js} +1 -1
  35. package/{chunk-ZVQHBIWV.js → chunk-CDLP56BS.js} +7 -7
  36. package/{chunk-JPJGMOIM.js → chunk-DD2EOI6S.js} +1 -1
  37. package/{chunk-OON4OBWI.js → chunk-DLV3H464.js} +7 -7
  38. package/{chunk-RWSOTHY4.js → chunk-DT7EWFTY.js} +5 -5
  39. package/{chunk-IRTOYSA2.js → chunk-ESMZW5PE.js} +1 -1
  40. package/{chunk-V6P4AYYJ.js → chunk-EVPKKBSI.js} +13 -13
  41. package/{chunk-HB4XPBC7.js → chunk-EWO77ZGF.js} +9 -11
  42. package/{chunk-KJ7MT3UC.js → chunk-F3SOW2EU.js} +81 -1
  43. package/{chunk-T64RZQBO.js → chunk-F5WASHQA.js} +247 -132
  44. package/{chunk-WUGRUG5Z.js → chunk-FB5WLEOD.js} +12 -12
  45. package/{chunk-SOEJSA7I.js → chunk-FCUKCVKN.js} +4 -4
  46. package/{chunk-FY4SDK2E.js → chunk-FDLDMJTM.js} +1 -1
  47. package/{chunk-ICRRXBRN.js → chunk-FFHV45HO.js} +3 -3
  48. package/{chunk-BUCB3RT4.js → chunk-FZYKQFBQ.js} +3 -3
  49. package/{chunk-IE5PXKVU.js → chunk-G3VYRPTV.js} +5 -5
  50. package/{chunk-3CHPRXKY.js → chunk-HW7EBEC5.js} +26 -194
  51. package/{chunk-UFYBYB26.js → chunk-I7S63QUU.js} +1 -1
  52. package/{chunk-CON6SI7N.js → chunk-IF7V3CBU.js} +1 -1
  53. package/{chunk-RAEBIT7A.js → chunk-JDKSYQQN.js} +4 -4
  54. package/{chunk-K43ZF2C3.js → chunk-JPPQ3GUO.js} +1 -1
  55. package/{chunk-QJJQZ4EK.js → chunk-JSB2OPQT.js} +115 -119
  56. package/{chunk-M2P3OGXZ.js → chunk-JWEXJ573.js} +2 -2
  57. package/{chunk-7G4KH3C4.js → chunk-K25WQPP3.js} +220 -54
  58. package/{chunk-ZEY4NJRE.js → chunk-KABQ74UQ.js} +4 -4
  59. package/{chunk-3C2QLERX.js → chunk-KMDDG73K.js} +1 -1
  60. package/{chunk-SPKLALBU.js → chunk-MAYW6V3E.js} +1 -1
  61. package/{chunk-IPAW7XLD.js → chunk-MFVOJ6KF.js} +2 -2
  62. package/{chunk-NDZOXXIM.js → chunk-NHEWV5FD.js} +1 -1
  63. package/{chunk-QPY264HO.js → chunk-O2IWR23M.js} +1 -1
  64. package/{chunk-TFPOD4YZ.js → chunk-OLVOR45M.js} +2 -2
  65. package/{chunk-SUKSWFLP.js → chunk-PIG2IUVZ.js} +1 -1
  66. package/{chunk-AAMWEIEP.js → chunk-QA2C5NKI.js} +3 -3
  67. package/{chunk-3WIXU4XO.js → chunk-QI2WVWXV.js} +13 -1
  68. package/{chunk-VSJIIKGY.js → chunk-QXZH5UDF.js} +3 -3
  69. package/{chunk-SQ73U3BG.js → chunk-QZIOZDM6.js} +9 -9
  70. package/{chunk-MJ54WBLO.js → chunk-R2KWTENX.js} +3 -3
  71. package/{chunk-C3OK72G3.js → chunk-RIHQGFFA.js} +1 -1
  72. package/{chunk-DC3SZCRR.js → chunk-SH3XD4E2.js} +2 -2
  73. package/{chunk-MM3662RS.js → chunk-SNAWGDXT.js} +263 -4
  74. package/{chunk-JGRPBIZZ.js → chunk-SQX235S2.js} +1 -1
  75. package/chunk-TT644UJD.js +188 -0
  76. package/{chunk-IYBIRCQV.js → chunk-U34KT53V.js} +29 -11
  77. package/{chunk-ZJZGF77K.js → chunk-ULQAD7ZY.js} +18 -43
  78. package/{chunk-DJKBZYMR.js → chunk-UY73HNIN.js} +53 -49
  79. package/{chunk-I2RMFLLH.js → chunk-V7PCFWX3.js} +1 -1
  80. package/{chunk-KLA62VVE.js → chunk-VXS4YYJ2.js} +8 -8
  81. package/{chunk-JZX2XLKC.js → chunk-YCRROBDY.js} +1 -1
  82. package/{chunk-C5A3GWRG.js → chunk-YR47Y7CN.js} +6 -6
  83. package/{chunk-AXYXKGPN.js → chunk-ZAV4YVEA.js} +1 -1
  84. package/{chunk-YANF2RR4.js → chunk-ZPKUJROL.js} +1 -1
  85. package/{chunk-AWY25K65.js → chunk-ZSLIYVIQ.js} +7 -7
  86. package/{commandRegistry-BZGZP4AW.js → commandRegistry-4LWXIPNX.js} +83 -83
  87. package/{contentThunks-56AWRCC4.js → contentThunks-QBL5NK2W.js} +17 -17
  88. package/{createAgentAutomationAction-W5D4IHHK.js → createAgentAutomationAction-5UWBLR2N.js} +17 -17
  89. package/{createDialogAction-YMU646CH.js → createDialogAction-NJ2LE7KC.js} +21 -21
  90. package/{createPageAction-T4WRPDOH.js → createPageAction-7T3RINS2.js} +19 -19
  91. package/{dbSlice-DC2J53RC.js → dbSlice-6PVPY44C.js} +5 -5
  92. package/{deleteFile-KYWEMNFX.js → deleteFile-YM6NDPAR.js} +3 -3
  93. package/{dialogCommands-3T3LM566.js → dialogCommands-KMECTGCW.js} +30 -28
  94. package/{dialogSlice-Z5KOY4CC.js → dialogSlice-GQMTD4HR.js} +16 -16
  95. package/{docCreateCommands-OLNS64OJ.js → docCreateCommands-4IT5PUAL.js} +30 -28
  96. package/{docDeleteCommands-U4UOLXZQ.js → docDeleteCommands-QS66YNZV.js} +31 -29
  97. package/{docReadCommands-WUYVWGOH.js → docReadCommands-3SAI46YC.js} +30 -28
  98. package/{docStore-2EN5A7PW.js → docStore-PM5PYKPZ.js} +6 -6
  99. package/{docUpdateCommands-RKVB6XAQ.js → docUpdateCommands-OGYG5BRC.js} +30 -28
  100. package/{getPricing-TX35D7PI.js → getPricing-XQ3N3RBP.js} +2 -2
  101. package/{handleSendMessageAction-EF3LOTXW.js → handleSendMessageAction-EQ3U6K5N.js} +35 -31
  102. package/index.js +7 -7
  103. package/{localRuntimeAdapter-OAHN57AM.js → localRuntimeAdapter-MO64KEOS.js} +53 -53
  104. package/{localRuntimeAuthority-JDAD7CB6.js → localRuntimeAuthority-BPN5OAQG.js} +2 -2
  105. package/{localRuntimeDb-CVC62PM5.js → localRuntimeDb-QIVAXMUL.js} +1 -1
  106. package/{machineCommands-RTYX5UN3.js → machineCommands-7MBJJY4K.js} +60 -60
  107. package/{machineWsRunDispatch-ELDKKIHF.js → machineWsRunDispatch-T4LFRJL3.js} +55 -55
  108. package/{memberThunks-2DWKLE6W.js → memberThunks-AZINUM4S.js} +8 -8
  109. package/package.json +1 -1
  110. package/{providerPresetApply-GSJI4JBJ.js → providerPresetApply-PKUOHQJT.js} +5 -5
  111. package/{providerRegistry-TSSTPGWF.js → providerRegistry-HNQLIFN2.js} +5 -5
  112. package/{read-L7QEJETH.js → read-7JPIWRBQ.js} +3 -3
  113. package/{readDocTool-QELXV2GW.js → readDocTool-AAQTB2Y3.js} +1 -1
  114. package/{readlineWorkspace-BUEUGN7D.js → readlineWorkspace-2DR5GHLQ.js} +92 -126
  115. package/{removeDialogAgentAction-376XSUP2.js → removeDialogAgentAction-RMVRILLK.js} +6 -6
  116. package/{runAgentClientLoop-BDN5VYZN.js → runAgentClientLoop-EXIQDX7G.js} +42 -40
  117. package/{runtimeDoctorCommands-56NWKNON.js → runtimeDoctorCommands-MMCP4B4U.js} +12 -12
  118. package/{setDialogExtraReferencesAction-QBDSH63D.js → setDialogExtraReferencesAction-L3V7JTMG.js} +6 -6
  119. package/{setPrimaryDialogAgentAction-537QFGW3.js → setPrimaryDialogAgentAction-X52JQGTJ.js} +6 -6
  120. package/{settingThunks-4Z43ZSAT.js → settingThunks-N6XFWPOU.js} +5 -5
  121. package/{spaceCommands-KHCPOFEB.js → spaceCommands-WQMUCGV7.js} +27 -25
  122. package/{streamAgentChatTurn-WFNIELXS.js → streamAgentChatTurn-DI2334G3.js} +142 -81
  123. package/{switchDialogAgentAction-CSO6AKRL.js → switchDialogAgentAction-ZJ5CGU7J.js} +5 -5
  124. package/{tools-2LGM37M4.js → tools-23VQGJOX.js} +32 -32
  125. package/{tuiSummaryLlmCaller-NBEHCAFU.js → tuiSummaryLlmCaller-FESHBDTT.js} +7 -7
  126. package/{updateCommands-LXZLG44Y.js → updateCommands-ODWC7SK7.js} +5 -3
  127. package/{updateDialogTitleAction-IFC2MM4P.js → updateDialogTitleAction-AGAYHWS7.js} +17 -17
  128. package/chunk-UKZX3NHN.js +0 -48
  129. package/{agentGrantCommands-HOJ3JBBQ.js → agentGrantCommands-5DPHYEKP.js} +3 -3
  130. package/{chromeOpsCommands-3Z34RKSE.js → chromeOpsCommands-GZVVK7HU.js} +4 -4
  131. package/{chunk-2SGAI64X.js → chunk-43OFVLWJ.js} +4 -4
  132. package/{chunk-XETG4RIX.js → chunk-AETZ7AD6.js} +4 -4
  133. package/{chunk-2IXDJNZI.js → chunk-GAGGEA7D.js} +3 -3
  134. package/{memoryCommands-CUNBFRVS.js → memoryCommands-ZS3VQJAL.js} +3 -3
  135. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-3GLX4QQY.js} +3 -3
  136. package/{tableCommands-LBH3QPPO.js → tableCommands-IVC5S7Y3.js} +11 -11
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getModelContextWindow
3
- } from "./chunk-AAMWEIEP.js";
3
+ } from "./chunk-QA2C5NKI.js";
4
4
  import {
5
5
  isRecord
6
6
  } from "./chunk-KUG52IAP.js";
@@ -854,6 +854,8 @@ var STREAM_USAGE_PROVIDERS = /* @__PURE__ */ new Set([
854
854
  // kimi-code CLI also sends include_usage). Custom agents pointing at the
855
855
  // same endpoint are covered by the endpoint check below, not here.
856
856
  "kimi-code",
857
+ // MiniMax 官方 API(api.minimaxi.com):OpenAI 兼容流式端点,支持 stream_options.include_usage。
858
+ "minimax",
857
859
  // OpenDesign (open-design.ai) and OpenCode Go (opencode.ai): OpenAI-compatible
858
860
  // aggregation / subscription endpoints. Verified to emit terminal usage with
859
861
  // prompt_tokens_details.cached_tokens.
@@ -862,10 +864,22 @@ var STREAM_USAGE_PROVIDERS = /* @__PURE__ */ new Set([
862
864
  "opencode-go"
863
865
  ]);
864
866
  var KIMI_CODE_ENDPOINT_MARKER = "api.kimi.com";
867
+ function extractHostname(endpoint) {
868
+ try {
869
+ const raw = endpoint.includes("://") ? endpoint : `https://${endpoint}`;
870
+ return new URL(raw).hostname.toLowerCase();
871
+ } catch {
872
+ return null;
873
+ }
874
+ }
875
+ var isMiniMaxEndpoint = (endpoint) => {
876
+ const host = extractHostname(endpoint);
877
+ return host === "api.minimaxi.com" || host === "api.minimax.chat";
878
+ };
865
879
  var isSupportedCustomEndpoint = (endpoint) => {
866
880
  if (typeof endpoint !== "string") return false;
867
881
  const ep = endpoint.toLowerCase();
868
- return ep.includes(KIMI_CODE_ENDPOINT_MARKER) || ep.includes("open-design.ai") || ep.includes("opencode.ai") || isOllamaEndpoint(endpoint);
882
+ return isMiniMaxEndpoint(endpoint) || ep.includes(KIMI_CODE_ENDPOINT_MARKER) || ep.includes("open-design.ai") || ep.includes("opencode.ai") || isOllamaEndpoint(endpoint);
869
883
  };
870
884
  var EXTRA_USAGE_FIELD_PROVIDERS = /* @__PURE__ */ new Set(["openrouter"]);
871
885
  var normalizeProviderName = (providerName) => asTrimmedLowercaseString(providerName);
@@ -4,7 +4,7 @@ import {
4
4
 
5
5
  // packages/cli/agentCommandSupport.ts
6
6
  async function getDefaultCliDb() {
7
- const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-CVC62PM5.js");
7
+ const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-QIVAXMUL.js");
8
8
  return getDefaultCliLocalRuntimeDb();
9
9
  }
10
10
  function createNullCliDb() {
@@ -575,6 +575,44 @@ var stepfunStepPlanModels = [
575
575
  }
576
576
  ];
577
577
 
578
+ // packages/integrations/minimax/models.ts
579
+ var minimaxModels = [
580
+ {
581
+ name: "MiniMax-M3.1-Flash",
582
+ displayName: "MiniMax M3.1 Flash",
583
+ hasVision: true,
584
+ contextWindow: 1e6,
585
+ maxOutputTokens: 8192,
586
+ jsonOutput: true,
587
+ fnCall: true,
588
+ supportsTool: true,
589
+ price: {
590
+ input: toCnyCredits(1),
591
+ output: toCnyCredits(4),
592
+ inputCacheHit: toCnyCredits(0.1)
593
+ },
594
+ provider: "minimax",
595
+ description: "MiniMax \u65B0\u4E00\u4EE3 Flash \u65D7\u8230\u6A21\u578B\uFF0C1M \u4E0A\u4E0B\u6587\uFF0C\u539F\u751F\u591A\u6A21\u6001\u89C6\u89C9\u7406\u89E3\uFF0C\u9488\u5BF9 Agent\u3001\u4EE3\u7801\u4E0E\u5DE5\u5177\u8C03\u7528\u6DF1\u5EA6\u4F18\u5316\u3002"
596
+ },
597
+ {
598
+ name: "MiniMax-M3",
599
+ displayName: "MiniMax M3",
600
+ hasVision: true,
601
+ contextWindow: 1e6,
602
+ maxOutputTokens: 8192,
603
+ jsonOutput: true,
604
+ fnCall: true,
605
+ supportsTool: true,
606
+ price: {
607
+ input: toCnyCredits(2.1),
608
+ output: toCnyCredits(8.4),
609
+ inputCacheHit: toCnyCredits(0.42)
610
+ },
611
+ provider: "minimax",
612
+ description: "MiniMax M3 \u65D7\u8230\u591A\u6A21\u6001\u63A8\u7406\u6A21\u578B\uFF0C1M \u4E0A\u4E0B\u6587\uFF0C\u652F\u6301\u6587\u672C\u4E0E\u89C6\u89C9\u7406\u89E3\u3001\u5DE5\u5177\u8C03\u7528\u3002"
613
+ }
614
+ ];
615
+
578
616
  // packages/integrations/commandcode/models.ts
579
617
  var commandCodeModels = [
580
618
  // ── DeepSeek ──
@@ -3297,7 +3335,8 @@ var MODEL_MAP = {
3297
3335
  zai: zaiModels,
3298
3336
  qwen: qwenAllModels,
3299
3337
  moonshot: moonshotAllModels,
3300
- stepfun: stepfunAllModels
3338
+ stepfun: stepfunAllModels,
3339
+ minimax: minimaxModels
3301
3340
  };
3302
3341
  var MODEL_LOOKUP_MAP = {
3303
3342
  anthropic: [...anthropicModels, ...anthropicOAuthModels],
@@ -3539,6 +3578,7 @@ export {
3539
3578
  kimiCodeModels,
3540
3579
  stepfunModels,
3541
3580
  stepfunStepPlanModels,
3581
+ minimaxModels,
3542
3582
  commandCodeModels,
3543
3583
  opencodeGoModels,
3544
3584
  DEFAULT_REASONING_EFFORT,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildSkillDocMarkdown
3
- } from "./chunk-XETG4RIX.js";
3
+ } from "./chunk-AETZ7AD6.js";
4
4
 
5
5
  // packages/cli/docPageHelpers.ts
6
6
  import { readFileSync } from "node:fs";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-UAD2WT54.js";
8
8
  import {
9
9
  toTimestampMs
10
- } from "./chunk-ZVQHBIWV.js";
10
+ } from "./chunk-CDLP56BS.js";
11
11
  import {
12
12
  fetchFromServer,
13
13
  getAllServers
@@ -6,12 +6,12 @@ import {
6
6
  readAction,
7
7
  readRequestManager,
8
8
  resolveAgentReadServers
9
- } from "./chunk-NDZOXXIM.js";
9
+ } from "./chunk-NHEWV5FD.js";
10
10
  import {
11
11
  loadFileFromIndexedDb,
12
12
  removeAction,
13
13
  saveFileToIndexedDb
14
- } from "./chunk-SPKLALBU.js";
14
+ } from "./chunk-MAYW6V3E.js";
15
15
  import {
16
16
  beginWriteAck,
17
17
  compareRemoteRecordsByComparableTime,
@@ -28,7 +28,7 @@ import {
28
28
  shouldReplaceLocalWithRemoteRecord,
29
29
  shouldReplicateLocalRecord,
30
30
  uploadToCurrentServer
31
- } from "./chunk-2SGAI64X.js";
31
+ } from "./chunk-43OFVLWJ.js";
32
32
  import {
33
33
  asyncThunkCreator,
34
34
  buildCreateSlice,
@@ -49,12 +49,12 @@ import {
49
49
  getFileIdFromKey,
50
50
  ulid
51
51
  } from "./chunk-5EMSBTQ6.js";
52
- import {
53
- isRecord
54
- } from "./chunk-KUG52IAP.js";
55
52
  import {
56
53
  API_ENDPOINTS
57
54
  } from "./chunk-LCBAMY2M.js";
55
+ import {
56
+ isRecord
57
+ } from "./chunk-KUG52IAP.js";
58
58
 
59
59
  // packages/database/actions/readAndWait.ts
60
60
  var hashTokenScope = (currentToken) => {
@@ -706,7 +706,7 @@ var dbSlice = createSliceWithThunks({
706
706
  // 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
707
707
  read: create.asyncThunk(
708
708
  async (payload, thunkApi) => {
709
- const { readAction: readAction2 } = await import("./read-L7QEJETH.js");
709
+ const { readAction: readAction2 } = await import("./read-7JPIWRBQ.js");
710
710
  return readAction2(payload, thunkApi);
711
711
  },
712
712
  {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  requireTokenUser
3
- } from "./chunk-C3OK72G3.js";
3
+ } from "./chunk-RIHQGFFA.js";
4
4
  import {
5
5
  t
6
6
  } from "./chunk-2AB2HA4M.js";
@@ -14,21 +14,15 @@ import {
14
14
  import {
15
15
  asTrimmedNonEmptyStringArray
16
16
  } from "./chunk-I42VC5KR.js";
17
- import {
18
- asTrimmedString
19
- } from "./chunk-3EUW3WEO.js";
20
17
  import {
21
18
  getDefaultCliLocalRuntimeDb
22
- } from "./chunk-FY4SDK2E.js";
19
+ } from "./chunk-FDLDMJTM.js";
23
20
  import {
24
21
  resolveAuthTokenFromEnv
25
22
  } from "./chunk-A7GB5UGH.js";
26
23
  import {
27
24
  DEFAULT_NOLO_SERVER_URL
28
25
  } from "./chunk-OLZBQWZU.js";
29
- import {
30
- normalizeServerOrigin
31
- } from "./chunk-CF7PE763.js";
32
26
  import {
33
27
  buildCliRuntimeEnv,
34
28
  clearProfileAuthToken,
@@ -38,6 +32,12 @@ import {
38
32
  loadProfileConfig,
39
33
  saveDefaultProfile
40
34
  } from "./chunk-R5GO3YZP.js";
35
+ import {
36
+ asTrimmedString
37
+ } from "./chunk-3EUW3WEO.js";
38
+ import {
39
+ normalizeServerOrigin
40
+ } from "./chunk-CF7PE763.js";
41
41
 
42
42
  // packages/cli/authCommands.ts
43
43
  import { createInterface } from "node:readline/promises";
@@ -2,10 +2,10 @@ import {
2
2
  patch,
3
3
  remove,
4
4
  write
5
- } from "./chunk-ZVQHBIWV.js";
5
+ } from "./chunk-CDLP56BS.js";
6
6
  import {
7
7
  getRuntimeServerContext
8
- } from "./chunk-2SGAI64X.js";
8
+ } from "./chunk-43OFVLWJ.js";
9
9
  import {
10
10
  asyncThunkCreator,
11
11
  buildCreateSlice
@@ -308,7 +308,7 @@ var slice = createSliceWithThunks({
308
308
  const overrides = {};
309
309
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
310
310
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
311
- const { _executeModel } = await import("./_executeModel-7PZNF3KM.js");
311
+ const { _executeModel } = await import("./_executeModel-3HHZYHHB.js");
312
312
  return _executeModel(
313
313
  {
314
314
  isStreaming: args.isStreaming ?? false,
@@ -329,7 +329,7 @@ var slice = createSliceWithThunks({
329
329
  * - 循环直到无工具调用或触发其他运行时停止条件
330
330
  */
331
331
  runAgent: create.asyncThunk(async (args, thunkApi) => {
332
- const { runAgentClientLoop } = await import("./runAgentClientLoop-BDN5VYZN.js");
332
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-EXIQDX7G.js");
333
333
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
334
334
  {
335
335
  agentKey: args.agentKey,
@@ -345,7 +345,7 @@ var slice = createSliceWithThunks({
345
345
  * 聊天轮次流式 Agent 调用
346
346
  */
347
347
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
348
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-WFNIELXS.js");
348
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-DI2334G3.js");
349
349
  return streamAgentChatTurnHandler(args, thunkApi);
350
350
  }),
351
351
  /**
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-32ZKZET7.js";
4
4
  import {
5
5
  patch
6
- } from "./chunk-ZVQHBIWV.js";
6
+ } from "./chunk-CDLP56BS.js";
7
7
  import {
8
8
  getIsDesktopApp
9
9
  } from "./chunk-6Q7UTJKR.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-DJKBZYMR.js";
4
+ } from "./chunk-UY73HNIN.js";
5
5
  import {
6
6
  t
7
7
  } from "./chunk-2AB2HA4M.js";
8
8
  import {
9
9
  clipMultilineText
10
- } from "./chunk-SOEJSA7I.js";
10
+ } from "./chunk-FCUKCVKN.js";
11
11
  import {
12
12
  runLocalAgentTurn
13
- } from "./chunk-7G4KH3C4.js";
13
+ } from "./chunk-K25WQPP3.js";
14
14
  import {
15
15
  applyToolSurfaceConstraints
16
16
  } from "./chunk-QLQ573SU.js";
@@ -29,6 +29,16 @@ import {
29
29
  import {
30
30
  asOptionalPositiveFiniteNumber
31
31
  } from "./chunk-U6VC4MU4.js";
32
+ import {
33
+ parseUserIdFromAuthToken
34
+ } from "./chunk-A7GB5UGH.js";
35
+ import {
36
+ DEFAULT_NOLO_SERVER_URL
37
+ } from "./chunk-OLZBQWZU.js";
38
+ import {
39
+ readPipeText,
40
+ spawnProcess
41
+ } from "./chunk-Y6ROFCZO.js";
32
42
  import {
33
43
  isRecord
34
44
  } from "./chunk-KUG52IAP.js";
@@ -38,19 +48,9 @@ import {
38
48
  import {
39
49
  toErrorMessage
40
50
  } from "./chunk-HNMXYYJR.js";
41
- import {
42
- parseUserIdFromAuthToken
43
- } from "./chunk-A7GB5UGH.js";
44
- import {
45
- DEFAULT_NOLO_SERVER_URL
46
- } from "./chunk-OLZBQWZU.js";
47
51
  import {
48
52
  asOptionalTrimmedString
49
53
  } from "./chunk-G3SUCT4W.js";
50
- import {
51
- readPipeText,
52
- spawnProcess
53
- } from "./chunk-Y6ROFCZO.js";
54
54
 
55
55
  // packages/ai/agent/machineRunPermissions.ts
56
56
  var DEFAULT_POLICY = {
@@ -1,16 +1,17 @@
1
1
  import {
2
2
  ANTIGRAVITY_CLOUD_CODE_BASE_URL
3
- } from "./chunk-JGRPBIZZ.js";
3
+ } from "./chunk-SQX235S2.js";
4
4
  import {
5
5
  commandCodeModels,
6
6
  kimiCodeModels,
7
+ minimaxModels,
7
8
  moonshotModels,
8
9
  opencodeGoModels,
9
10
  qwenModels,
10
11
  qwenTokenPlanModels,
11
12
  stepfunModels,
12
13
  stepfunStepPlanModels
13
- } from "./chunk-TRW43TSC.js";
14
+ } from "./chunk-6EQD4AQL.js";
14
15
  import {
15
16
  PLATFORM_HOSTED_DEEPSEEK_FLASH_OFF_PEAK_PRICE,
16
17
  PLATFORM_HOSTED_DEEPSEEK_FLASH_PEAK_PRICE,
@@ -192,15 +193,12 @@ var TOGETHER_MODEL_OPTIONS = [
192
193
  { id: "zai-org/GLM-5.2", label: "GLM-5.2" },
193
194
  { id: "openai/gpt-oss-120b", label: "GPT-OSS 120B" }
194
195
  ];
195
- var MINIMAX_MODEL_OPTIONS = [
196
- {
197
- id: "MiniMax-M3.1-Flash",
198
- label: "MiniMax M3.1 Flash",
199
- recommended: true,
200
- hasVision: true
201
- },
202
- { id: "MiniMax-M3", label: "MiniMax M3", hasVision: true }
203
- ];
196
+ var MINIMAX_MODEL_OPTIONS = minimaxModels.map((m, i) => ({
197
+ id: m.name,
198
+ label: m.displayName ?? m.name,
199
+ hasVision: m.hasVision,
200
+ ...i === 0 ? { recommended: true } : {}
201
+ }));
204
202
  var SUBSCRIPTION_OAUTH_PROVIDERS = [
205
203
  {
206
204
  kind: "oauth",
@@ -1,6 +1,10 @@
1
1
  import {
2
+ isDevinOAuthAgent
3
+ } from "./chunk-5ZUL4CUO.js";
4
+ import {
5
+ getModelContextWindow,
2
6
  normalizeTimingMs
3
- } from "./chunk-AAMWEIEP.js";
7
+ } from "./chunk-QA2C5NKI.js";
4
8
  import {
5
9
  BUILTIN_NOLO_AGENT_KEY
6
10
  } from "./chunk-LOEO7LRC.js";
@@ -24,6 +28,78 @@ import {
24
28
  import {
25
29
  asOptionalTrimmedString
26
30
  } from "./chunk-G3SUCT4W.js";
31
+ import {
32
+ asTrimmedLowercaseString
33
+ } from "./chunk-QSJ3HFEF.js";
34
+
35
+ // packages/agent-runtime/serverProxyPolicy.ts
36
+ var OAUTH_APIKEY_REFS = /* @__PURE__ */ new Set([
37
+ "antigravity",
38
+ "xai",
39
+ "chatgpt",
40
+ "claude",
41
+ "cursor"
42
+ ]);
43
+ function isGoogleFamilyProvider(provider) {
44
+ const normalized = asTrimmedLowercaseString(provider);
45
+ return normalized === "google" || normalized.startsWith("google-");
46
+ }
47
+ function isOAuthApiKeyRef(value) {
48
+ const ref = asTrimmedLowercaseString(value);
49
+ return ref.length > 0 && OAUTH_APIKEY_REFS.has(ref);
50
+ }
51
+ function shouldUseServerProxy(agentConfig, requestProvider) {
52
+ const effectiveProvider = (requestProvider || agentConfig.provider || "").toLowerCase();
53
+ if (isGoogleFamilyProvider(effectiveProvider)) {
54
+ return true;
55
+ }
56
+ if (isOAuthApiKeyRef(agentConfig.apiKeyRef)) {
57
+ return true;
58
+ }
59
+ if (agentConfig.apiSource === "custom" && isRemoteCustomEndpoint(agentConfig.customProviderUrl)) {
60
+ return true;
61
+ }
62
+ return !!agentConfig.useServerProxy;
63
+ }
64
+ var LOCAL_HOSTS = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "::1", "0.0.0.0"]);
65
+ function isRemoteCustomEndpoint(url) {
66
+ if (typeof url !== "string") return false;
67
+ try {
68
+ const host = new URL(url).hostname.toLowerCase().replace(/^\[|\]$/g, "");
69
+ return !LOCAL_HOSTS.has(host);
70
+ } catch {
71
+ return false;
72
+ }
73
+ }
74
+
75
+ // packages/agent-runtime/devin/devinChannelWindows.ts
76
+ var DEVIN_CHANNEL_CONTEXT_WINDOWS = {
77
+ // SWE-2 家族(catalog 无裸 swe-2 selector;旧点号/裸写法如 swe-2、
78
+ // swe-1.7 实测均 permission_denied,已不是可用 selector)。
79
+ "swe-2-max": 262e3,
80
+ "swe-2-high": 262e3,
81
+ "swe-2-medium": 262e3,
82
+ // SWE-1.7 家族。
83
+ "swe-1-7": 262e3,
84
+ "swe-1-7-medium": 262e3,
85
+ "swe-1-7-lightning": 202752,
86
+ // SWE-1.6 家族(免费档默认)。
87
+ "swe-1-6": 2e5,
88
+ "swe-1-6-fast": 2e5,
89
+ // 经 devin 通道转售、且与厂商原生窗口不同的模型(catalog 枚举型 selector)。
90
+ "MODEL_GPT_5_2_LOW": 384e3,
91
+ "MODEL_GPT_5_2_MEDIUM": 384e3,
92
+ "MODEL_GPT_5_2_HIGH": 384e3,
93
+ "MODEL_GPT_5_2_XHIGH": 384e3
94
+ };
95
+ var devinChannelContextWindow = (model) => {
96
+ const raw = model?.trim();
97
+ if (!raw) return void 0;
98
+ return DEVIN_CHANNEL_CONTEXT_WINDOWS[raw];
99
+ };
100
+ var resolveAgentContextWindow = (agent) => (isDevinOAuthAgent(agent) ? devinChannelContextWindow(agent.model) : void 0) ?? // provider 透传给全局解析:平台托管通道(CF)与 Codex OAuth 等通道对同一 id
101
+ // 窗口不同,按通道取真值,不做全局取大/取小。
102
+ getModelContextWindow(agent.model ?? "", agent.provider);
27
103
 
28
104
  // packages/agent-runtime/autoExecutionProfiles.ts
29
105
  var createProfile = (input) => ({
@@ -344,8 +420,12 @@ var extractReferenceKeysFromMessage = (msg) => {
344
420
  export {
345
421
  DEFAULT_AUTO_EXECUTION_PROFILE,
346
422
  resolveAutoExecutionProfile,
423
+ isOAuthApiKeyRef,
424
+ shouldUseServerProxy,
347
425
  readCacheReadInputTokens,
348
426
  readCacheCreationInputTokens,
427
+ devinChannelContextWindow,
428
+ resolveAgentContextWindow,
349
429
  normalizeUsage,
350
430
  asOptionalJsonRecord,
351
431
  extractReferenceKeysFromMessage,