nolo-cli 0.103.0-alpha.1 → 0.103.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 (209) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-3UCNJCQA.js → _executeModel-7J7Q3WXY.js} +75 -68
  3. package/action-C4KMTCJF.js +20 -0
  4. package/{addContentAction-O7R66HEX.js → addContentAction-7TNIOVZI.js} +12 -11
  5. package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-O47J3MVW.js} +18 -19
  6. package/{agentDeleteCommand-2YAHAZFJ.js → agentDeleteCommand-YPJHK7JA.js} +117 -42
  7. package/{agentEmailCommands-WLYF3JRS.js → agentEmailCommands-AWEXOHWM.js} +98 -88
  8. package/agentListCommands-2DTLLJZD.js +742 -0
  9. package/{agentMachineCommands-HNGAR5GI.js → agentMachineCommands-PGEEQ4JJ.js} +48 -43
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-XPJYZSCE.js} +97 -2
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
  12. package/agentRecordCommands-DZVLCPLJ.js +138 -0
  13. package/agentRunCommand-AX5CYQ46.js +167 -0
  14. package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
  15. package/{agentRuntimeLocal-VXZSDIGT.js → agentRuntimeLocal-PITRQ2EU.js} +48 -39
  16. package/{agentSlice-SICQBMCM.js → agentSlice-4TLSG6FB.js} +14 -13
  17. package/{appDeleteCommands-32MHLR4L.js → appDeleteCommands-UC2JW5FJ.js} +46 -41
  18. package/{appDeployCommands-WCQOUSOB.js → appDeployCommands-OL2RKVJ3.js} +46 -41
  19. package/{appDeployStatusCommands-6QKB7DYN.js → appDeployStatusCommands-B3PLC62M.js} +46 -41
  20. package/{appGetCommands-SFAPP5PB.js → appGetCommands-REESA2XQ.js} +46 -41
  21. package/{appListCommands-EKUBDRUO.js → appListCommands-UF6XX7HR.js} +46 -41
  22. package/{authCommand-F4EFRRX6.js → authCommand-NQPMGYHP.js} +118 -24
  23. package/{authCommands-RGOGCPP6.js → authCommands-LWLOZETU.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-GFY77VRN.js} +10 -8
  25. package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
  26. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
  27. package/{chunk-UKZDAFYT.js → chunk-22RVE2PC.js} +6 -10
  28. package/{chunk-6OZ36FXI.js → chunk-27ONFIEY.js} +22 -4
  29. package/{chunk-HVURBGF3.js → chunk-2H6SEVDS.js} +6 -6
  30. package/{chunk-TOP2VXOR.js → chunk-2K4TM6AW.js} +5 -5
  31. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  32. package/{chunk-53HEEOTT.js → chunk-2WJ57RJA.js} +83 -16
  33. package/{chunk-OIVSQH2O.js → chunk-3BXNTXYI.js} +299 -5
  34. package/chunk-4A2R7KHG.js +13545 -0
  35. package/{chunk-EYAQT56M.js → chunk-4DPP773Q.js} +2 -2
  36. package/{chunk-JRQFUXY7.js → chunk-4G4C5SXT.js} +99 -22
  37. package/{chunk-DHDMC6FO.js → chunk-4HTMUQIZ.js} +14 -9
  38. package/{chunk-B3TVQ6PI.js → chunk-4IVA6UUE.js} +20 -11
  39. package/chunk-4LCOCOR5.js +50 -0
  40. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  41. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  42. package/{chunk-H62HCIUP.js → chunk-56HJ2LAA.js} +35 -22
  43. package/{chunk-V4MJDUSR.js → chunk-5EPHWMP5.js} +2 -2
  44. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  45. package/{chunk-3WLK2JQ5.js → chunk-5IWONK6X.js} +68 -46
  46. package/chunk-5J3PYNUP.js +255 -0
  47. package/chunk-5MMAK75Q.js +15 -0
  48. package/{chunk-LW4VFPAY.js → chunk-5ZDLVKNG.js} +873 -228
  49. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  50. package/{chunk-AEOE4Z6Q.js → chunk-6UEJDFF7.js} +39 -15
  51. package/{chunk-JPGCXHNM.js → chunk-7JWCVINR.js} +1 -1
  52. package/{chunk-GQBOR3G6.js → chunk-7KVZ5LDQ.js} +2 -2
  53. package/{chunk-IIVGDG4I.js → chunk-7KWFIKKK.js} +13 -7
  54. package/chunk-A4SQRTZ6.js +15 -0
  55. package/chunk-AGIM7IMJ.js +147 -0
  56. package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
  57. package/{chunk-L5UXH3B2.js → chunk-B455PEFD.js} +27 -8
  58. package/{chunk-XS5SWEDQ.js → chunk-BELZY72F.js} +1 -1
  59. package/chunk-BMQ2MJUK.js +153 -0
  60. package/{chunk-6YTOJY35.js → chunk-BZ7NPA6G.js} +35 -2
  61. package/chunk-CHOZJMJS.js +78 -0
  62. package/{chunk-3BMYXEUW.js → chunk-CUF4MYKI.js} +1 -1
  63. package/{chunk-ACTMNVHM.js → chunk-CYSYR67N.js} +1 -1
  64. package/{chunk-WV42OMV7.js → chunk-D2GQE6AF.js} +8 -8
  65. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  66. package/chunk-DZ7R5V3Y.js +164 -0
  67. package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
  68. package/{chunk-KQ4ONNQD.js → chunk-EKPKW6RM.js} +155 -8
  69. package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
  70. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  71. package/{chunk-AGVEIAQA.js → chunk-F442UK5V.js} +29 -78
  72. package/{chunk-HJUYAD4A.js → chunk-FBTNYNAL.js} +5 -5
  73. package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
  74. package/{chunk-ETI2NYVF.js → chunk-GCTKWVLU.js} +4 -4
  75. package/chunk-GMZLP5DV.js +82 -0
  76. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  77. package/{chunk-6VFARHZW.js → chunk-H7TQORR4.js} +994 -1079
  78. package/{chunk-5H7KJX7J.js → chunk-HD3S2F7U.js} +5 -5
  79. package/chunk-HDJRLWTG.js +8002 -0
  80. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  81. package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
  82. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  83. package/{chunk-VLTIYV3X.js → chunk-HP57OUJO.js} +4 -4
  84. package/{chunk-4OEFYTWL.js → chunk-IRZTHHNM.js} +67 -48
  85. package/{chunk-GPCZ7UXG.js → chunk-K6U4NKFJ.js} +1 -1
  86. package/{chunk-OZGZPSEG.js → chunk-KGRP4VOK.js} +47 -67
  87. package/{chunk-DNCEALKX.js → chunk-LB5A6JTU.js} +22 -29
  88. package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
  89. package/{chunk-PUOC4YRO.js → chunk-M7VLQGQP.js} +11 -0
  90. package/{chunk-Z77CRGTW.js → chunk-MSFZ7FMO.js} +1 -1
  91. package/chunk-NKWIS6G2.js +442 -0
  92. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  93. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  94. package/chunk-NWENLDMM.js +42 -0
  95. package/chunk-O7SVKKLY.js +875 -0
  96. package/chunk-OCZKATRC.js +129 -0
  97. package/{chunk-PQFHGD77.js → chunk-OM2RUOEU.js} +161 -14
  98. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  99. package/{chunk-TQBHNYVR.js → chunk-PLRFCQ7C.js} +567 -519
  100. package/{chunk-6D6VBVEW.js → chunk-Q7O72MF5.js} +80 -14
  101. package/{chunk-J4MOO56S.js → chunk-RILRSUGC.js} +10 -2
  102. package/{chunk-RSONHHPE.js → chunk-RNUDNZJW.js} +10 -10
  103. package/{chunk-3N3W7KBB.js → chunk-RZJAZVCF.js} +11 -9
  104. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  105. package/{chunk-GEPUP7OO.js → chunk-TSXNDTXL.js} +3 -3
  106. package/chunk-TY3TIUJK.js +89 -0
  107. package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
  108. package/{chunk-UZGQNTVW.js → chunk-UA324D4O.js} +8 -6
  109. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  110. package/{chunk-BP4XNZRM.js → chunk-UNAOTLKO.js} +4 -4
  111. package/{chunk-CUQEXCAU.js → chunk-UQ5P2WHS.js} +29 -9
  112. package/{chunk-NA35QHCF.js → chunk-V6YASAZR.js} +1 -1
  113. package/{chunk-3DII57IT.js → chunk-VCAQFMVN.js} +1 -1
  114. package/chunk-VIWDGTDA.js +8 -0
  115. package/chunk-VJVNU77E.js +83 -0
  116. package/{chunk-ZCYXJSTU.js → chunk-VL3H5ZU3.js} +66 -94
  117. package/{chunk-Q554LLSI.js → chunk-VLGL7FOL.js} +1 -1
  118. package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
  119. package/{chunk-4EG4QFTK.js → chunk-WI6TUGLJ.js} +19 -17
  120. package/{chunk-QDSINZM3.js → chunk-WJ3B6FX6.js} +1 -14
  121. package/{chunk-OEVAY4J6.js → chunk-XMUZHRSB.js} +18 -20
  122. package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
  123. package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
  124. package/{chunk-7S4YWN7P.js → chunk-YDO5ERB4.js} +4 -4
  125. package/chunk-YK5MHOWM.js +915 -0
  126. package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
  127. package/chunk-YV25TM3R.js +780 -0
  128. package/{chunk-IONPPCL5.js → chunk-YZZREBID.js} +86 -16
  129. package/{chunk-DNUUJ45N.js → chunk-Z3WSAK6A.js} +23 -28
  130. package/chunk-ZRAU6T47.js +56 -0
  131. package/commandRegistry-VQPFWVDH.js +833 -0
  132. package/{contentThunks-S4S7QPSO.js → contentThunks-A26ME6OJ.js} +37 -35
  133. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  134. package/{createAgentAutomationAction-ODGL2YGP.js → createAgentAutomationAction-BSAMZJ5W.js} +39 -37
  135. package/createDialogAction-CMCQXYHD.js +69 -0
  136. package/{createPageAction-FBV3OWX7.js → createPageAction-ANGKJTK2.js} +46 -43
  137. package/{chunk-F2RNI7ZR.js → cursorProvider-YGGNMVWX.js} +2496 -9897
  138. package/{dbSlice-XVWBAGYN.js → dbSlice-QOLNF5GN.js} +11 -10
  139. package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
  140. package/{dialogCommands-5J56DFWN.js → dialogCommands-AMPAWLX4.js} +49 -45
  141. package/{dialogSlice-LEO27SQG.js → dialogSlice-DGWDEBYC.js} +41 -34
  142. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  143. package/{docCreateCommands-KYI2DC2U.js → docCreateCommands-7NMIYL5D.js} +48 -43
  144. package/{docDeleteCommands-67REUSRY.js → docDeleteCommands-BD4OM5PV.js} +49 -44
  145. package/{docReadCommands-HOSVSBDJ.js → docReadCommands-5IOVAKU2.js} +47 -42
  146. package/{docStore-MNX5MHA5.js → docStore-TP4QDER4.js} +16 -12
  147. package/{docUpdateCommands-EMGCSMXY.js → docUpdateCommands-ZTKJ6UPC.js} +48 -43
  148. package/{fetchMessages-EIU7UFFK.js → fetchMessages-5L7OVM5Y.js} +5 -5
  149. package/{getPricing-LUSEABA6.js → getPricing-NMMFT3YI.js} +4 -4
  150. package/{handleSendMessageAction-YB6KQFJS.js → handleSendMessageAction-N4WKFRSQ.js} +111 -87
  151. package/index.js +87 -884
  152. package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
  153. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-O5A26FDK.js} +2 -2
  154. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
  155. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
  156. package/{machineCommands-7GVQCUAK.js → machineCommands-47WKGY5Z.js} +92 -82
  157. package/machineWsRunDispatch-CYW5FJ52.js +154 -0
  158. package/{memberThunks-QGFLFVCI.js → memberThunks-25K6DDRA.js} +20 -18
  159. package/{models-T3SG6MJ5.js → models-ZPU5EDF4.js} +2 -2
  160. package/oauthTokenStore-ITEB663N.js +23 -0
  161. package/package.json +1 -1
  162. package/pdf-U6KSUEZZ.js +26435 -0
  163. package/processSpawn-SOAV3FEV.js +11 -0
  164. package/profileConfig-ZGOFORWV.js +43 -0
  165. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-TEBH7FDX.js} +7 -7
  166. package/{providerRegistry-757OWH3O.js → providerRegistry-CBJLNCET.js} +11 -7
  167. package/{read-COE3ZYR6.js → read-PJIT2YEJ.js} +7 -6
  168. package/{readDocTool-5USN4A6V.js → readDocTool-DRSXHGNL.js} +5 -3
  169. package/{readlineWorkspace-WA7JNI6J.js → readlineWorkspace-CK7GOVOC.js} +2698 -2055
  170. package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-VIWJL6MX.js} +21 -25
  171. package/{runAgentClientLoop-JGFQ6KIR.js → runAgentClientLoop-BGHGP5AR.js} +76 -70
  172. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
  173. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  174. package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-A7VA3NFM.js} +15 -13
  175. package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-B4P7YQX2.js} +22 -26
  176. package/{chunk-AFUORTY4.js → settingThunks-KOYSAT65.js} +226 -940
  177. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  178. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  179. package/{spaceCommands-NKJVJCQQ.js → spaceCommands-QJCYG27F.js} +51 -46
  180. package/{streamAgentChatTurn-XLFZ66UC.js → streamAgentChatTurn-ANE7OTCZ.js} +214 -108
  181. package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-3VYWHZKH.js} +18 -19
  182. package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
  183. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-EJT6TMFG.js} +3 -3
  184. package/tools-WPOVVP7M.js +116 -0
  185. package/{tuiSummaryLlmCaller-WFRWERGK.js → tuiSummaryLlmCaller-QCHCULPM.js} +25 -22
  186. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  187. package/{updateDialogTitleAction-6MBTD4UE.js → updateDialogTitleAction-C4GRCXL4.js} +82 -44
  188. package/action-YVYQEAAV.js +0 -31
  189. package/agentListCommands-JP7S7PT2.js +0 -469
  190. package/agentRecordCommands-SXFPW3DL.js +0 -128
  191. package/agentRunCommand-JIQ4HY4D.js +0 -155
  192. package/browser-image-compression-MFDTD7K6.js +0 -1763
  193. package/chatQueueReduxAdapter-HHMUDNXL.js +0 -186
  194. package/chunk-CQ3WA2NE.js +0 -299
  195. package/chunk-M76ECQRD.js +0 -13658
  196. package/chunk-MEYIRKDN.js +0 -8967
  197. package/chunk-Q5FJJ6XI.js +0 -103
  198. package/chunk-S7Z2HMCN.js +0 -25
  199. package/chunk-XVZ22N6C.js +0 -20782
  200. package/chunk-Y5GCAMGP.js +0 -9
  201. package/chunk-YPREESF4.js +0 -225
  202. package/createDialogAction-GFKRXTK4.js +0 -65
  203. package/machineWsRunDispatch-XA7TD7Z7.js +0 -144
  204. package/settingSlice-ZQZVUPKK.js +0 -204
  205. package/syncMapping-N6RGXGBW.js +0 -437
  206. package/tools-NF5AB34X.js +0 -110
  207. package/{chunk-VMFTFOWF.js → chunk-ODAPITXL.js} +7 -7
  208. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  209. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ANTIGRAVITY_CLOUD_CODE_BASE_URL
3
- } from "./chunk-UZGQNTVW.js";
3
+ } from "./chunk-UA324D4O.js";
4
4
  import {
5
5
  kimiCodeModels,
6
6
  moonshotModels,
@@ -9,13 +9,16 @@ import {
9
9
  qwenTokenPlanModels,
10
10
  stepfunModels,
11
11
  stepfunStepPlanModels
12
- } from "./chunk-OIVSQH2O.js";
12
+ } from "./chunk-3BXNTXYI.js";
13
13
  import {
14
14
  PLATFORM_HOSTED_DEEPSEEK_FLASH_OFF_PEAK_PRICE,
15
15
  PLATFORM_HOSTED_DEEPSEEK_FLASH_PEAK_PRICE,
16
16
  PLATFORM_HOSTED_DEEPSEEK_PRO_OFF_PEAK_PRICE,
17
17
  PLATFORM_HOSTED_DEEPSEEK_PRO_PEAK_PRICE
18
- } from "./chunk-Q67DOFOO.js";
18
+ } from "./chunk-Y3PMXGLH.js";
19
+ import {
20
+ asTrimmedLowercaseString
21
+ } from "./chunk-QSJ3HFEF.js";
19
22
 
20
23
  // packages/integrations/commandcode/models.ts
21
24
  var commandCodeModels = [
@@ -203,6 +206,60 @@ var deepseekModels = [
203
206
  }
204
207
  ];
205
208
 
209
+ // packages/integrations/mistral/models.ts
210
+ var mistralModels = [
211
+ // ── Vibe 编码档(订阅主打,Vibe CLI 默认用最新档)──
212
+ {
213
+ name: "mistral-vibe-cli-latest",
214
+ displayName: "Mistral Vibe CLI",
215
+ hasVision: true,
216
+ contextWindow: 262144,
217
+ jsonOutput: true,
218
+ fnCall: true,
219
+ supportsTool: true,
220
+ price: { input: 0, output: 0 },
221
+ provider: "mistral",
222
+ description: "Mistral Vibe \u9ED8\u8BA4\u7F16\u7801\u6A21\u578B\uFF08\u8BA2\u9605\u6C60\u5185\uFF09\uFF0C\u9762\u5411 agentic coding\u3002"
223
+ },
224
+ {
225
+ name: "mistral-vibe-cli-fast",
226
+ displayName: "Mistral Vibe CLI Fast",
227
+ hasVision: true,
228
+ contextWindow: 262144,
229
+ jsonOutput: true,
230
+ fnCall: true,
231
+ supportsTool: true,
232
+ price: { input: 0, output: 0 },
233
+ provider: "mistral",
234
+ description: "Vibe \u7F16\u7801\u6863\u7684\u5FEB\u6863\uFF08\u8BA2\u9605\u6C60\u5185\uFF09\uFF0C\u4E0E latest \u540C\u4E3A 262k \u4E0A\u4E0B\u6587\u7684\u7F16\u7801\u6863\u3002"
235
+ },
236
+ // ── 通用档 ──
237
+ {
238
+ name: "mistral-medium-3.5",
239
+ displayName: "Mistral Medium 3.5",
240
+ hasVision: true,
241
+ contextWindow: 262144,
242
+ jsonOutput: true,
243
+ fnCall: true,
244
+ supportsTool: true,
245
+ price: { input: 0, output: 0 },
246
+ provider: "mistral",
247
+ description: "Mistral \u4E2D\u6863\u901A\u7528\u6A21\u578B\uFF08\u8BA2\u9605\u6C60\u5185\uFF09\uFF0C\u591A\u6A21\u6001\uFF0C\u9002\u5408\u65E5\u5E38\u95EE\u7B54\u4E0E\u8F7B\u91CF\u7F16\u7801\u3002"
248
+ },
249
+ {
250
+ name: "mistral-large-latest",
251
+ displayName: "Mistral Large (latest)",
252
+ hasVision: true,
253
+ contextWindow: 262144,
254
+ jsonOutput: true,
255
+ fnCall: true,
256
+ supportsTool: true,
257
+ price: { input: 0, output: 0 },
258
+ provider: "mistral",
259
+ description: "Mistral \u65D7\u8230\u6863\uFF08\u8BA2\u9605\u6C60\u5185\uFF09\uFF0C\u8BA2\u9605\u989D\u5EA6\u6D88\u8017\u6700\u5FEB\uFF0C\u9002\u5408\u96BE\u9898\u515C\u5E95\u3002"
260
+ }
261
+ ];
262
+
206
263
  // packages/ai/agent/providerRegistry.ts
207
264
  var QWEN_MODEL_OPTIONS = qwenModels.map((m, i) => ({
208
265
  id: m.name,
@@ -267,6 +324,23 @@ var STEPFUN_STEP_PLAN_MODEL_OPTIONS = stepfunStepPlanModels.map((m, i) => ({
267
324
  hasVision: m.hasVision,
268
325
  ...i === 0 ? { recommended: true } : {}
269
326
  }));
327
+ var MISTRAL_MODEL_OPTIONS = mistralModels.map((m, i) => ({
328
+ id: m.name,
329
+ label: m.displayName ?? m.name,
330
+ hasVision: m.hasVision,
331
+ ...i === 0 ? { recommended: true } : {}
332
+ }));
333
+ var TOGETHER_MODEL_OPTIONS = [
334
+ {
335
+ id: "meta-llama/Llama-3.3-70B-Instruct-Turbo",
336
+ label: "Llama 3.3 70B Instruct Turbo",
337
+ recommended: true
338
+ },
339
+ { id: "deepseek-ai/DeepSeek-V4-Pro-0813", label: "DeepSeek V4 Pro" },
340
+ { id: "Qwen/Qwen3.6-Plus", label: "Qwen3.6 Plus" },
341
+ { id: "zai-org/GLM-5.2", label: "GLM-5.2" },
342
+ { id: "openai/gpt-oss-120b", label: "GPT-OSS 120B" }
343
+ ];
270
344
  var SUBSCRIPTION_OAUTH_PROVIDERS = [
271
345
  {
272
346
  kind: "oauth",
@@ -279,6 +353,9 @@ var SUBSCRIPTION_OAUTH_PROVIDERS = [
279
353
  defaultReasoningEffort: "medium",
280
354
  modelOptions: [
281
355
  { id: "gpt-6-astra", label: "GPT-6 Astra", hasVision: true, recommended: true },
356
+ // GPT-6.1 Sol 已列入 Codex 订阅通道选型指南,但按账号灰度("when available
357
+ // to your account and client"),未开通的账号选它会 400,不影响其他选项。
358
+ { id: "gpt-6.1-sol", label: "GPT-6.1 Sol", hasVision: true },
282
359
  { id: "gpt-5.6-sol", label: "GPT-5.6 Sol", hasVision: true },
283
360
  { id: "gpt-5.6-terra", label: "GPT-5.6 Terra", hasVision: true },
284
361
  { id: "gpt-5.6-luna", label: "GPT-5.6 Luna", hasVision: true }
@@ -324,11 +401,13 @@ var SUBSCRIPTION_OAUTH_PROVIDERS = [
324
401
  description: "Anthropic Subscription",
325
402
  apiKeyRef: "claude",
326
403
  provider: "anthropic",
327
- defaultModel: "claude-sonnet-5",
404
+ defaultModel: "claude-sonnet-5-5",
328
405
  defaultReasoningEffort: "high",
329
406
  modelOptions: [
407
+ { id: "claude-opus-5-5", label: "Claude Opus 5.5", hasVision: true, recommended: true },
408
+ { id: "claude-sonnet-5-5", label: "Claude Sonnet 5.5", hasVision: true },
330
409
  { id: "claude-sonnet-5", label: "Claude Sonnet 5", hasVision: true },
331
- { id: "claude-opus-5", label: "Claude Opus 5", hasVision: true, recommended: true },
410
+ { id: "claude-opus-5", label: "Claude Opus 5", hasVision: true },
332
411
  { id: "claude-opus-4-8", label: "Claude Opus 4.8", hasVision: true },
333
412
  { id: "claude-fable-5", label: "Claude Fable 5", hasVision: true }
334
413
  ]
@@ -533,13 +612,31 @@ var CUSTOM_API_KEY_TEMPLATES = [
533
612
  commercialKind: "subscription",
534
613
  accessVariant: "token_plan_endpoint"
535
614
  },
615
+ {
616
+ kind: "api_key_template",
617
+ id: "mistral-plan",
618
+ label: "Mistral \u8BA2\u9605 (Vibe/Pro)",
619
+ description: "Mistral \u5B98\u65B9\u8BA2\u9605\uFF08Free $10 / Pro $30 \u6708\u5EA6 API credits\uFF0C\u8DE8 Studio/API/Vibe \u5171\u4EAB\uFF1BKey \u4ECE chat.mistral.ai \u203A Code \u203A Extensions \u751F\u6210\uFF09",
620
+ provider: "mistral",
621
+ baseUrl: "https://api.mistral.ai/v1",
622
+ defaultModel: "mistral-vibe-cli-latest",
623
+ modelOptions: MISTRAL_MODEL_OPTIONS,
624
+ keyFormatHint: "\u5728 chat.mistral.ai \u203A Code \u203A Extensions \u203A Vibe API Key \u751F\u6210\uFF0845 \u4F4D\uFF0C\u5F62\u5982 xxxxx\u2026nb3A\uFF09\uFF1B\u4E5F\u53EF\u7528 Studio \u7684 API Key\u3002\u4E24\u8005\u90FD\u76F4\u63A5\u6709\u6548\u4E8E api.mistral.ai/v1\u3002",
625
+ commercialKind: "subscription",
626
+ accessVariant: "token_plan_endpoint"
627
+ },
536
628
  {
537
629
  kind: "api_key_template",
538
630
  id: "openai-api",
539
631
  label: "OpenAI API",
540
632
  provider: "openai",
541
633
  baseUrl: "https://api.openai.com/v1",
542
- defaultModel: "gpt-6-astra",
634
+ defaultModel: "gpt-6.1-sol",
635
+ modelOptions: [
636
+ { id: "gpt-6.1-sol", label: "GPT-6.1 Sol", hasVision: true, recommended: true },
637
+ { id: "gpt-6-astra", label: "GPT-6 Astra", hasVision: true },
638
+ { id: "gpt-6-luna", label: "GPT-6 Luna", hasVision: true }
639
+ ],
543
640
  commercialKind: "api",
544
641
  accessVariant: "metered_key"
545
642
  },
@@ -549,7 +646,7 @@ var CUSTOM_API_KEY_TEMPLATES = [
549
646
  label: "Anthropic API",
550
647
  provider: "anthropic",
551
648
  baseUrl: "https://api.anthropic.com",
552
- defaultModel: "claude-sonnet-5",
649
+ defaultModel: "claude-sonnet-5-5",
553
650
  apiKeyHeader: "x-api-key",
554
651
  commercialKind: "api",
555
652
  accessVariant: "metered_key"
@@ -575,6 +672,19 @@ var CUSTOM_API_KEY_TEMPLATES = [
575
672
  commercialKind: "api",
576
673
  accessVariant: "metered_key"
577
674
  },
675
+ // anthropic/claude-sonnet-5、qwen/qwen3.8-27b),不维护易腐的静态清单。
676
+ {
677
+ kind: "api_key_template",
678
+ id: "openrouter-api",
679
+ label: "OpenRouter API \u7528\u91CF\u8BA1\u8D39",
680
+ description: "OpenRouter \u805A\u5408\u7F51\u5173\uFF08OpenAI \u517C\u5BB9\uFF0C\u4E00\u4E2A Key \u8BBF\u95EE\u591A\u5BB6\u6A21\u578B\uFF0C\u6309\u91CF\u8BA1\u8D39\uFF09",
681
+ provider: "openrouter",
682
+ baseUrl: "https://openrouter.ai/api/v1",
683
+ defaultModel: "anthropic/claude-sonnet-5",
684
+ keyFormatHint: "\u5728 openrouter.ai/keys \u521B\u5EFA\uFF0C\u5F62\u5982 sk-or-\u2026",
685
+ commercialKind: "api",
686
+ accessVariant: "metered_key"
687
+ },
578
688
  // DeepSeek 模型统一改走 nolo provider(Ollama Cloud,thinking=max 快 28-49%)。
579
689
  // 现按用户选择回归:自带 Key 的 metered 通道与平台托管通道并存,互不影响。
580
690
  {
@@ -649,6 +759,21 @@ var CUSTOM_API_KEY_TEMPLATES = [
649
759
  defaultModel: "MiniMax-Text-01",
650
760
  commercialKind: "api",
651
761
  accessVariant: "metered_key"
762
+ },
763
+ // Together AI 平台:用户自带 Key 的 metered 通道(复用 OpenAI-compatible 通道,
764
+ // apiSource:"custom",不扣平台积分)。模型 ID 为 namespaced 全 ID,直传不 remap;
765
+ // OpenAI 兼容 base_url = https://api.together.ai/v1(官方兼容文档在案)。
766
+ {
767
+ kind: "api_key_template",
768
+ id: "together-api",
769
+ label: "Together AI API \u7528\u91CF\u8BA1\u8D39",
770
+ description: "Together AI\uFF08OpenAI \u517C\u5BB9\uFF0C\u6309\u91CF\u8BA1\u8D39\uFF09",
771
+ provider: "together",
772
+ baseUrl: "https://api.together.ai/v1",
773
+ defaultModel: "meta-llama/Llama-3.3-70B-Instruct-Turbo",
774
+ modelOptions: TOGETHER_MODEL_OPTIONS,
775
+ commercialKind: "api",
776
+ accessVariant: "metered_key"
652
777
  }
653
778
  ];
654
779
  var ALL_PROVIDER_REGISTRY = [
@@ -666,6 +791,26 @@ function isCustomApiKeyTemplate(id) {
666
791
  if (!id) return false;
667
792
  return CUSTOM_API_KEY_TEMPLATES.some((p) => p.id === id);
668
793
  }
794
+ function normalizeEndpointUrl(url) {
795
+ return asTrimmedLowercaseString(url).replace(/\/+$/, "");
796
+ }
797
+ var SUBSCRIPTION_ENDPOINT_URLS = new Set(
798
+ CUSTOM_API_KEY_TEMPLATES.filter((t) => t.commercialKind === "subscription").map(
799
+ (t) => normalizeEndpointUrl(t.baseUrl)
800
+ )
801
+ );
802
+ var SUBSCRIPTION_OAUTH_APIKEY_REFS = new Set(
803
+ SUBSCRIPTION_OAUTH_PROVIDERS.map((p) => asTrimmedLowercaseString(p.apiKeyRef))
804
+ );
805
+ function isSubscriptionEndpoint(customProviderUrl) {
806
+ if (typeof customProviderUrl !== "string") return false;
807
+ const normalized = normalizeEndpointUrl(customProviderUrl);
808
+ return normalized.length > 0 && SUBSCRIPTION_ENDPOINT_URLS.has(normalized);
809
+ }
810
+ function isSubscriptionOAuthCredential(apiKeyRef) {
811
+ const ref = asTrimmedLowercaseString(apiKeyRef ?? "");
812
+ return ref.length > 0 && SUBSCRIPTION_OAUTH_APIKEY_REFS.has(ref);
813
+ }
669
814
 
670
815
  export {
671
816
  SUBSCRIPTION_OAUTH_PROVIDERS,
@@ -673,5 +818,7 @@ export {
673
818
  ALL_PROVIDER_REGISTRY,
674
819
  findProviderById,
675
820
  isSubscriptionOAuthProvider,
676
- isCustomApiKeyTemplate
821
+ isCustomApiKeyTemplate,
822
+ isSubscriptionEndpoint,
823
+ isSubscriptionOAuthCredential
677
824
  };
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  getRuntimeServerContext,
3
3
  scheduleDeleteReplication
4
- } from "./chunk-UKWGR5SS.js";
4
+ } from "./chunk-O7SVKKLY.js";
5
+ import {
6
+ buildTombstoneRecord
7
+ } from "./chunk-D2MDMY2M.js";
5
8
  import {
6
9
  fetchFromClientDb
7
- } from "./chunk-QOKAKDPE.js";
10
+ } from "./chunk-HIM3FCLF.js";
8
11
  import {
9
12
  selectIdentityToken
10
13
  } from "./chunk-SEJ5OS6F.js";
11
- import {
12
- buildTombstoneRecord
13
- } from "./chunk-GBRG75BQ.js";
14
14
 
15
15
  // packages/database/fileStorage.ts
16
16
  var DB_NAME = "nolo-file-storage";
@@ -91,6 +91,7 @@ function createCliAuthorityBrokerSocketInvoker(options) {
91
91
  const timeout = setTimeout(() => {
92
92
  finish(() => {
93
93
  socket.destroy();
94
+ socket.unref?.();
94
95
  reject(new CliAuthorityBrokerTimeoutError(options.endpoint, timeoutMs));
95
96
  });
96
97
  }, timeoutMs);
@@ -5,14 +5,14 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-RSONHHPE.js";
8
+ } from "./chunk-RNUDNZJW.js";
9
9
  import {
10
10
  INVALID_TOOL_ARGS_REPLACEMENT,
11
11
  buildInvalidToolCallSelfHealResult,
12
12
  parseToolCallArguments,
13
13
  performFetchRequest,
14
14
  sanitizeOutboundMessages
15
- } from "./chunk-3WLK2JQ5.js";
15
+ } from "./chunk-5IWONK6X.js";
16
16
  import {
17
17
  createSSEParser,
18
18
  createToolRunId,
@@ -23,10 +23,13 @@ import {
23
23
  toolRunSetPending,
24
24
  toolRunStarted,
25
25
  toolRunSucceeded
26
- } from "./chunk-TQBHNYVR.js";
26
+ } from "./chunk-PLRFCQ7C.js";
27
27
  import {
28
28
  getPublicImageAgentMode
29
29
  } from "./chunk-VIDPVFP3.js";
30
+ import {
31
+ parseApiError
32
+ } from "./chunk-OCZKATRC.js";
30
33
  import {
31
34
  getCurrentSpaceId
32
35
  } from "./chunk-ZJ7UHBJS.js";
@@ -35,15 +38,15 @@ import {
35
38
  messageStreamEnd,
36
39
  messageStreaming,
37
40
  updateToolMessage
38
- } from "./chunk-XVZ22N6C.js";
41
+ } from "./chunk-4A2R7KHG.js";
39
42
  import {
40
43
  streamAgentChatTurn
41
- } from "./chunk-3N3W7KBB.js";
44
+ } from "./chunk-RZJAZVCF.js";
42
45
  import {
43
46
  addActiveController,
44
47
  removeActiveController,
45
48
  tokenUsageLiveUpdate
46
- } from "./chunk-6YTOJY35.js";
49
+ } from "./chunk-BZ7NPA6G.js";
47
50
  import {
48
51
  accumulateToolCallDelta,
49
52
  createThinkParserState,
@@ -56,39 +59,39 @@ import {
56
59
  import {
57
60
  EMPTY_ASSISTANT_REPAIR_PROMPT,
58
61
  getModelInfo
59
- } from "./chunk-4OEFYTWL.js";
62
+ } from "./chunk-IRZTHHNM.js";
63
+ import {
64
+ write
65
+ } from "./chunk-56HJ2LAA.js";
60
66
  import {
61
67
  getApiEndpoint
62
- } from "./chunk-OIVSQH2O.js";
68
+ } from "./chunk-3BXNTXYI.js";
63
69
  import {
64
70
  toErrorMessage
65
71
  } from "./chunk-HNMXYYJR.js";
66
72
  import {
67
- selectCurrentServer
68
- } from "./chunk-AFUORTY4.js";
73
+ extractCustomId
74
+ } from "./chunk-M2EJHDJP.js";
69
75
  import {
70
- write
71
- } from "./chunk-H62HCIUP.js";
76
+ isRecord
77
+ } from "./chunk-KUG52IAP.js";
78
+ import {
79
+ selectCurrentServer
80
+ } from "./chunk-NWENLDMM.js";
72
81
  import {
73
82
  createDialogMessageKeyAndId,
74
83
  dialogMessageKey,
75
84
  toTrimmedString
76
- } from "./chunk-VMFTFOWF.js";
77
- import {
78
- extractCustomId
79
- } from "./chunk-M2EJHDJP.js";
85
+ } from "./chunk-ODAPITXL.js";
80
86
  import {
81
87
  createAsyncThunk
82
- } from "./chunk-UKWGR5SS.js";
88
+ } from "./chunk-VY6VFGKR.js";
83
89
  import {
84
90
  isAbortError
85
- } from "./chunk-QOKAKDPE.js";
91
+ } from "./chunk-HIM3FCLF.js";
86
92
  import {
87
93
  selectIdentityToken
88
94
  } from "./chunk-SEJ5OS6F.js";
89
- import {
90
- isRecord
91
- } from "./chunk-KUG52IAP.js";
92
95
  import {
93
96
  asTrimmedString
94
97
  } from "./chunk-3EUW3WEO.js";
@@ -275,7 +278,7 @@ async function persistToolMessage(dispatch, message, options = {}) {
275
278
  }
276
279
  throw err;
277
280
  }
278
- const { controller: _controller, ...rest } = message;
281
+ const { controller: _controller, dialogId: _dialogId, ...rest } = message;
279
282
  const isStreaming = options.isStreaming !== void 0 ? options.isStreaming : Boolean(rest.isStreaming);
280
283
  try {
281
284
  const writeRequest = dispatch(
@@ -661,6 +664,9 @@ var handleToolCalls = createAsyncThunk(
661
664
  const runningToolMessage = {
662
665
  id: runningToolMessageId,
663
666
  dbKey: runningToolDbKey,
667
+ // Explicit identity: tool results belong to the run's dialog, and the
668
+ // message-key parse is ambiguous once a message id contains "-msg-".
669
+ dialogId,
664
670
  role: "tool",
665
671
  content: JSON.stringify({ pending: true }),
666
672
  toolCallId,
@@ -794,61 +800,6 @@ var handleToolCalls = createAsyncThunk(
794
800
  }
795
801
  );
796
802
 
797
- // packages/ai/chat/parseApiError.ts
798
- async function parseApiError(response) {
799
- const errorBody = await response.text();
800
- const truncateErrorMessage = (message, maxChars = 320) => message.length <= maxChars ? message : `${message.slice(0, maxChars)}\u2026`;
801
- const isContextOverflow = (message) => /maximum context length|context length|context_length_exceeded|requested about .*tokens|too many tokens/i.test(message);
802
- let defaultMessage = `\u72B6\u6001\u7801 ${response.status} ${response.statusText}`;
803
- let errorMessage = defaultMessage;
804
- let errorCode = `E${response.status}`;
805
- try {
806
- const errorJson = JSON.parse(errorBody);
807
- errorMessage = errorJson?.error?.message || errorJson?.message || errorJson?.msg || errorBody || defaultMessage;
808
- errorCode = errorJson?.error?.code || errorJson?.code || errorCode;
809
- } catch (_e) {
810
- if (errorBody) {
811
- errorMessage = errorBody;
812
- }
813
- }
814
- switch (response.status) {
815
- case 400:
816
- if (isContextOverflow(errorMessage) || isContextOverflow(errorBody) || errorCode === "UPSTREAM_400") {
817
- return "\u4E0A\u4E0B\u6587\u8FC7\u957F\uFF1A\u672C\u8F6E\u6D88\u606F\u6216\u5DE5\u5177\u7ED3\u679C\u592A\u5927\u3002\u8BF7\u7F29\u5C0F\u8303\u56F4\uFF0C\u6216\u5148\u8BFB\u53D6\u66F4\u5C0F\u7247\u6BB5\u540E\u518D\u7EE7\u7EED\u3002";
818
- }
819
- if (errorCode === "MISSING_PROVIDER_API_KEY") {
820
- return truncateErrorMessage(errorMessage);
821
- }
822
- if (errorMessage && errorMessage !== defaultMessage) {
823
- return `\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF: ${truncateErrorMessage(errorMessage)}`;
824
- }
825
- return "\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u8F93\u5165";
826
- case 413:
827
- return "\u8BF7\u6C42\u5185\u5BB9\u8FC7\u5927\uFF1A\u8BF7\u51CF\u5C11\u4E00\u6B21\u53D1\u9001\u7684\u6D88\u606F\u3001\u6587\u4EF6\u6216\u5DE5\u5177\u7ED3\u679C\u3002";
828
- case 401:
829
- switch (errorCode) {
830
- case "AUTH_TOKEN_EXPIRED":
831
- return "\u767B\u5F55\u72B6\u6001\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55";
832
- case "AUTH_ACCOUNT_INVALID":
833
- return "\u8D26\u6237\u65E0\u6548\u6216\u5DF2\u88AB\u505C\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458";
834
- case "AUTH_NO_TOKEN":
835
- return "\u672A\u68C0\u6D4B\u5230\u767B\u5F55\u72B6\u6001\uFF0C\u8BF7\u5148\u767B\u5F55";
836
- case "AUTH_INVALID_TOKEN":
837
- return "\u767B\u5F55\u51ED\u8BC1\u65E0\u6548\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55";
838
- case "AUTH_TOKEN_NOT_ACTIVE":
839
- return "\u4EE4\u724C\u5C1A\u672A\u751F\u6548\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5";
840
- default:
841
- return errorMessage && errorMessage !== `\u72B6\u6001\u7801 401 Unauthorized` ? `\u8BA4\u8BC1\u9519\u8BEF: ${truncateErrorMessage(errorMessage)}` : "\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55";
842
- }
843
- case 503:
844
- return errorMessage && errorMessage !== `\u72B6\u6001\u7801 503 Service Unavailable` ? truncateErrorMessage(errorMessage) : "\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5";
845
- case 504:
846
- return "\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5";
847
- default:
848
- return `API\u8BF7\u6C42\u5931\u8D25: ${truncateErrorMessage(errorMessage)}`;
849
- }
850
- }
851
-
852
803
  // packages/ai/chat/accumulateToolCallChunks.ts
853
804
  function accumulateToolCallChunks(currentAccumulatedCalls, toolCallChunks) {
854
805
  const accumulator = {
@@ -1348,6 +1299,7 @@ async function persistInvalidToolCallResults(invalidCalls, ctx, startIndex) {
1348
1299
  const toolMessage = {
1349
1300
  id: runningToolMessageId,
1350
1301
  dbKey: runningToolDbKey,
1302
+ dialogId: ctx.dialogId,
1351
1303
  role: "tool",
1352
1304
  content: selfHealContent,
1353
1305
  toolCallId: callId,
@@ -1839,7 +1791,6 @@ export {
1839
1791
  filterAndCleanMessages,
1840
1792
  persistToolMessages,
1841
1793
  handleToolCalls,
1842
- parseApiError,
1843
1794
  updateTotalUsage,
1844
1795
  readStreamChunk,
1845
1796
  sendOpenAICompletionsRequest
@@ -7,18 +7,18 @@ import {
7
7
  } from "./chunk-UAD2WT54.js";
8
8
  import {
9
9
  toTimestampMs
10
- } from "./chunk-H62HCIUP.js";
10
+ } from "./chunk-56HJ2LAA.js";
11
+ import {
12
+ isTombstoneRecord
13
+ } from "./chunk-D2MDMY2M.js";
11
14
  import {
12
15
  fetchFromServer,
13
16
  getAllServers
14
- } from "./chunk-QOKAKDPE.js";
17
+ } from "./chunk-HIM3FCLF.js";
15
18
  import {
16
19
  selectIdentityToken,
17
20
  selectIdentityUserId
18
21
  } from "./chunk-SEJ5OS6F.js";
19
- import {
20
- isTombstoneRecord
21
- } from "./chunk-GBRG75BQ.js";
22
22
  import {
23
23
  __toESM
24
24
  } from "./chunk-4VNS5WPM.js";
@@ -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-6IR6BBXE.js");
17
+ const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-TU6OBC76.js");
18
18
  return getAuthorityBackedDb(options);
19
19
  }
20
20
 
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-AEOE4Z6Q.js";
4
+ } from "./chunk-6UEJDFF7.js";
5
5
  import {
6
6
  buildSkillSummaryMarker
7
7
  } from "./chunk-VF4K2QE6.js";
8
+ import {
9
+ createSpaceKey
10
+ } from "./chunk-UAD2WT54.js";
8
11
  import {
9
12
  parseUserIdFromAuthToken,
10
13
  readOption,
11
14
  resolveAuthToken,
12
15
  resolveServerUrl
13
16
  } from "./chunk-A7GB5UGH.js";
14
- import {
15
- createSpaceKey
16
- } from "./chunk-UAD2WT54.js";
17
17
  import {
18
18
  asTrimmedLowercaseString
19
19
  } from "./chunk-QSJ3HFEF.js";
@@ -0,0 +1,82 @@
1
+ // packages/agent-runtime/sseFrames.ts
2
+ async function* readSseFrames(response) {
3
+ const reader = response.body?.getReader();
4
+ if (!reader) {
5
+ throw new Error("SSE response did not include a readable body.");
6
+ }
7
+ const decoder = new TextDecoder();
8
+ let buffer = "";
9
+ while (true) {
10
+ const { done, value } = await reader.read();
11
+ if (done) break;
12
+ buffer += decoder.decode(value, { stream: true });
13
+ let boundary = findSseFrameBoundary(buffer);
14
+ while (boundary) {
15
+ yield buffer.slice(0, boundary.index);
16
+ buffer = buffer.slice(boundary.index + boundary.separatorLength);
17
+ boundary = findSseFrameBoundary(buffer);
18
+ }
19
+ }
20
+ const remaining = decoder.decode();
21
+ if (remaining) {
22
+ buffer += remaining;
23
+ let boundary = findSseFrameBoundary(buffer);
24
+ while (boundary) {
25
+ yield buffer.slice(0, boundary.index);
26
+ buffer = buffer.slice(boundary.index + boundary.separatorLength);
27
+ boundary = findSseFrameBoundary(buffer);
28
+ }
29
+ }
30
+ if (buffer.trim()) yield buffer;
31
+ }
32
+ function findSseFrameBoundary(buffer) {
33
+ const lfLf = buffer.indexOf("\n\n");
34
+ const crLfCrLf = buffer.indexOf("\r\n\r\n");
35
+ if (lfLf === -1 && crLfCrLf === -1) return null;
36
+ const useLf = lfLf !== -1 && (crLfCrLf === -1 || lfLf < crLfCrLf);
37
+ return useLf ? { index: lfLf, separatorLength: 2 } : { index: crLfCrLf, separatorLength: 4 };
38
+ }
39
+ async function* streamSseDataValues(response, parse) {
40
+ const reader = response.body?.getReader();
41
+ if (!reader) return;
42
+ const decoder = new TextDecoder();
43
+ let buffer = "";
44
+ while (true) {
45
+ const { done, value } = await reader.read();
46
+ if (done) break;
47
+ buffer += decoder.decode(value, { stream: true });
48
+ const lines = buffer.split("\n");
49
+ buffer = lines.pop() ?? "";
50
+ for (const line of lines) {
51
+ const parsed = parse(line);
52
+ if (parsed) yield parsed;
53
+ }
54
+ }
55
+ const remaining = decoder.decode();
56
+ if (remaining) {
57
+ buffer += remaining;
58
+ const lines = buffer.split("\n");
59
+ buffer = lines.pop() ?? "";
60
+ for (const line of lines) {
61
+ const parsed = parse(line);
62
+ if (parsed) yield parsed;
63
+ }
64
+ }
65
+ if (buffer.trim()) {
66
+ const parsed = parse(buffer);
67
+ if (parsed) yield parsed;
68
+ }
69
+ }
70
+ async function readSseDataValues(response, parse) {
71
+ const values = [];
72
+ for await (const value of streamSseDataValues(response, parse)) {
73
+ values.push(value);
74
+ }
75
+ return values;
76
+ }
77
+
78
+ export {
79
+ readSseFrames,
80
+ streamSseDataValues,
81
+ readSseDataValues
82
+ };
@@ -180,6 +180,36 @@ function resolveCooldownGate(input, now) {
180
180
  }
181
181
  return now - lastProbeAt >= PROBE_INTERVAL_MS ? "probe" : "blocked";
182
182
  }
183
+ function resolveCredentialKey(agent) {
184
+ if (!agent || typeof agent !== "object") return void 0;
185
+ for (const field of ["apiKeyRef", "credentialRef"]) {
186
+ const value = agent[field];
187
+ if (typeof value === "string") {
188
+ const trimmed = value.trim();
189
+ if (trimmed) return trimmed;
190
+ }
191
+ }
192
+ return void 0;
193
+ }
194
+ function resolveCredentialKeyWithFallback(agent) {
195
+ const byRef = resolveCredentialKey(agent);
196
+ if (byRef) return byRef;
197
+ if (!agent || typeof agent !== "object") return void 0;
198
+ const endpoint = agent.customProviderUrl;
199
+ if (typeof endpoint === "string") {
200
+ const trimmed = endpoint.trim();
201
+ if (trimmed) {
202
+ try {
203
+ const origin = new URL(trimmed).origin;
204
+ if (origin && origin !== "null") return `custom-endpoint:${origin}`;
205
+ } catch {
206
+ }
207
+ }
208
+ }
209
+ const key = agent.key;
210
+ if (typeof key === "string" && key.trim()) return `custom-agent:${key.trim()}`;
211
+ return void 0;
212
+ }
183
213
 
184
214
  export {
185
215
  QUOTA_ERROR_PATTERNS,
@@ -188,5 +218,6 @@ export {
188
218
  isQuotaLimited403Body,
189
219
  resolveAvailabilityAction,
190
220
  mergeAvailabilityDeadline,
191
- resolveCooldownGate
221
+ resolveCooldownGate,
222
+ resolveCredentialKeyWithFallback
192
223
  };