nolo-cli 0.250.0-alpha.1 → 0.252.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/{_executeModel-F4MT6OPO.js → _executeModel-D6G3B45S.js} +51 -51
  2. package/{action-WZTKEF5H.js → action-QQOQ2LP3.js} +3 -3
  3. package/{addContentAction-MLI6GOBV.js → addContentAction-MB22YIDV.js} +6 -6
  4. package/{addDialogAgentAction-ARGQM22H.js → addDialogAgentAction-KNTBVVGY.js} +5 -5
  5. package/{agentDeleteCommand-DBCRHB4S.js → agentDeleteCommand-YCWDGJSF.js} +87 -82
  6. package/{agentEmailCommands-T4PAJ4KG.js → agentEmailCommands-DTWD5FWC.js} +87 -82
  7. package/{agentListCommands-5ULWKQ3E.js → agentListCommands-JTOONLYL.js} +233 -46
  8. package/{agentMachineCommands-65QUOCEY.js → agentMachineCommands-25X7OTLQ.js} +38 -36
  9. package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
  10. package/{agentPullCommand-4EQZYHU4.js → agentPullCommand-6OCNLVGC.js} +1 -1
  11. package/{agentRecordCommands-EKANS3A5.js → agentRecordCommands-SXE3WV2X.js} +86 -81
  12. package/{agentRunCommand-336PXBRJ.js → agentRunCommand-QSIED54S.js} +87 -82
  13. package/{agentRunControl-QMWTWV7C.js → agentRunControl-KNNDEEDI.js} +8 -6
  14. package/{agentRuntimeLocal-KKXJOBD3.js → agentRuntimeLocal-HVJJMB4W.js} +32 -31
  15. package/{agentSlice-FWYXP332.js → agentSlice-NBUJJVRI.js} +7 -7
  16. package/{appDeleteCommands-ERJK367V.js → appDeleteCommands-YU6TT6VN.js} +39 -37
  17. package/{appDeployCommands-LUV6QKQJ.js → appDeployCommands-4DEIX7YP.js} +39 -37
  18. package/{appDeployStatusCommands-WW7IYQD4.js → appDeployStatusCommands-3VKS6GBQ.js} +39 -37
  19. package/{appGetCommands-G7XYYSFO.js → appGetCommands-22FNNROT.js} +39 -37
  20. package/{appListCommands-4RXCIDNI.js → appListCommands-FVGMLHVU.js} +39 -37
  21. package/{authCommand-3C3RN4OU.js → authCommand-5DC3ES4Q.js} +15 -15
  22. package/{authCommands-ZMVEDCQD.js → authCommands-BLXNAUF4.js} +2 -2
  23. package/{chromeOpsCommands-NZITLHWO.js → chromeOpsCommands-AA555ANS.js} +1 -1
  24. package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
  25. package/chunk-2GAUJDA5.js +594 -0
  26. package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
  27. package/{chunk-222CJNC2.js → chunk-2LANL4B5.js} +3 -3
  28. package/{chunk-W4G25PVP.js → chunk-2PB653F5.js} +196 -253
  29. package/{chunk-UF6J7NXV.js → chunk-3272HU62.js} +1 -1
  30. package/chunk-3A5NNQCN.js +64 -0
  31. package/{chunk-7IQA2VJF.js → chunk-3N3JPQBQ.js} +210 -56
  32. package/{chunk-LXKK7QFI.js → chunk-4HAOOY6G.js} +53 -23
  33. package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
  34. package/{chunk-ADOOL3PG.js → chunk-52M4RYVP.js} +1 -1
  35. package/{chunk-U7OMQLRE.js → chunk-5IN2NBDX.js} +9 -9
  36. package/{chunk-BAH3BAUZ.js → chunk-5QEOTC35.js} +5 -5
  37. package/{chunk-E5RYFR7E.js → chunk-5UYDG6HP.js} +19 -0
  38. package/{chunk-Z7A2ZQ5X.js → chunk-64ACTEAE.js} +1 -1
  39. package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
  40. package/{chunk-BFKJ2RS3.js → chunk-7RYODZDD.js} +1 -1
  41. package/{chunk-YWNCRUBZ.js → chunk-7XO73H5X.js} +116 -6
  42. package/{chunk-SMEX763N.js → chunk-7ZOVFB2H.js} +100 -43
  43. package/{chunk-UR4ZMRV3.js → chunk-A5F6DYP2.js} +1 -1
  44. package/{chunk-ZKMS73DK.js → chunk-A6VIMCWI.js} +3 -3
  45. package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
  46. package/{chunk-LTVEOOZL.js → chunk-CIAV4WK2.js} +14 -1
  47. package/{chunk-HZDK56EK.js → chunk-CO2NXG2J.js} +32 -10
  48. package/{chunk-OHUYN3YU.js → chunk-CYGFNMCH.js} +1 -1
  49. package/{chunk-MZVCFV3T.js → chunk-D3WOFN6N.js} +3 -3
  50. package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
  51. package/{chunk-VV5IS3ES.js → chunk-DU3DJYVA.js} +5 -5
  52. package/{chunk-SPU3L3OR.js → chunk-EFM2IPZR.js} +3 -3
  53. package/{chunk-73PZD7JZ.js → chunk-EG3JTV7H.js} +2 -2
  54. package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
  55. package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
  56. package/{chunk-CD64YXRB.js → chunk-F6Q64KRV.js} +1 -1
  57. package/{chunk-TMRJGSK2.js → chunk-FRC2DNTN.js} +1 -1
  58. package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
  59. package/{chunk-I3J7HO3U.js → chunk-FZI2P64R.js} +137 -53
  60. package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
  61. package/{chunk-XHG7QROB.js → chunk-GO7UC5VH.js} +5 -5
  62. package/{chunk-RDBDHGU7.js → chunk-GVH2IP2M.js} +5 -5
  63. package/{chunk-AXZ5DDLB.js → chunk-GWS2X7TX.js} +235 -120
  64. package/{chunk-KHVTT4WW.js → chunk-HF4C5WIU.js} +81 -542
  65. package/{chunk-ATRU65OK.js → chunk-HMREADP6.js} +21 -19
  66. package/chunk-HZD5HXUO.js +405 -0
  67. package/{chunk-VHMPJGT4.js → chunk-ITCOQAHS.js} +3 -3
  68. package/{chunk-BQ4CZEVZ.js → chunk-ITMBFT35.js} +1 -1
  69. package/chunk-IVK2KT3H.js +209 -0
  70. package/{chunk-FFFKAOJN.js → chunk-JAYPSNGR.js} +1 -1
  71. package/{chunk-NEG5LYK5.js → chunk-JCQ3WCQ3.js} +3 -1
  72. package/{chunk-3IVFGQIM.js → chunk-JF5QT3YY.js} +2 -2
  73. package/{chunk-V4IYI3SB.js → chunk-JKALGWDL.js} +2 -2
  74. package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
  75. package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
  76. package/{chunk-HEIIOJGN.js → chunk-LAQC5FAP.js} +4 -4
  77. package/{chunk-I3OW5RAX.js → chunk-LNIA5JVX.js} +8 -8
  78. package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
  79. package/{chunk-W6T4FNZP.js → chunk-LUPZLKXL.js} +192 -352
  80. package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
  81. package/{chunk-SHDJLJWV.js → chunk-N2ZAY2DK.js} +1 -1
  82. package/{chunk-WEZ27JA7.js → chunk-NMXGIRSG.js} +1 -1
  83. package/{chunk-MTM4LRVG.js → chunk-NNUIVAC2.js} +1 -1
  84. package/{chunk-ARFCL53U.js → chunk-NPUHKEOB.js} +4 -4
  85. package/{chunk-32WTED6G.js → chunk-O6LPLIRS.js} +94 -83
  86. package/{chunk-4IQN6FWY.js → chunk-OB4FBZXJ.js} +4 -4
  87. package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
  88. package/{chunk-UPOW5HTG.js → chunk-OMIXG25B.js} +2 -2
  89. package/{chunk-MYYNZG2M.js → chunk-OOV5JN25.js} +4 -4
  90. package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
  91. package/{chunk-OKKA4BCM.js → chunk-P6HMEKLL.js} +114 -56
  92. package/{chunk-VTHWBTRE.js → chunk-PENRYZ4D.js} +1 -1
  93. package/{chunk-VIYVRPMJ.js → chunk-PHREU2KZ.js} +5 -3
  94. package/{chunk-EDT65EUE.js → chunk-PIVTQRX6.js} +45 -15
  95. package/{chunk-KJDN2YRH.js → chunk-QMKWSKWA.js} +4 -4
  96. package/{chunk-6TVYUQRM.js → chunk-QV32GSVO.js} +2 -2
  97. package/{chunk-K7VIXYTZ.js → chunk-R3MV2GII.js} +1 -45
  98. package/{chunk-XJSEST7D.js → chunk-SMCKJJXI.js} +2 -2
  99. package/{chunk-JFRJEPFI.js → chunk-SMZFWEMX.js} +1 -1
  100. package/{chunk-KK3FCYZM.js → chunk-SQL7YNED.js} +7 -4
  101. package/{chunk-D25ONVOH.js → chunk-SSZHE2RK.js} +1 -1
  102. package/{chunk-OLGFIQN2.js → chunk-T4VVQHSE.js} +1 -1
  103. package/{chunk-6QL3SUEK.js → chunk-TDI7ARZO.js} +3 -3
  104. package/{chunk-X6LYQDN5.js → chunk-TDLZA6LJ.js} +13 -10
  105. package/chunk-TRRXYFTR.js +46 -0
  106. package/{chunk-WMKA2DPK.js → chunk-TTUIM3PJ.js} +4 -4
  107. package/{chunk-RHBD22LV.js → chunk-TTWNTFTO.js} +39 -4
  108. package/{chunk-ZM5AZTQG.js → chunk-U7BP25PE.js} +18 -6
  109. package/{chunk-X3OZ655T.js → chunk-UI3Z3HDK.js} +1 -1
  110. package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
  111. package/{chunk-BVEDT6DM.js → chunk-VH7AQEEF.js} +3 -3
  112. package/{chunk-PGDM7AM2.js → chunk-WAOHK3NJ.js} +9 -9
  113. package/{chunk-2FK2KZSL.js → chunk-WLHUANWZ.js} +1 -1
  114. package/{chunk-ZTWDSOXD.js → chunk-WNIBQBOR.js} +1 -1
  115. package/{chunk-SLUZ6FBJ.js → chunk-XBCADGK2.js} +1 -1
  116. package/chunk-XRGBJHZX.js +136 -0
  117. package/{chunk-6XVPMGXK.js → chunk-YB5D2GK4.js} +9 -3
  118. package/{chunk-AKWA6PCE.js → chunk-YQYYYATY.js} +45 -27
  119. package/{chunk-WQDTSK5U.js → chunk-ZMFA2TLE.js} +1 -1
  120. package/{chunk-CFDOIIOZ.js → chunk-ZMXO5G3E.js} +29 -23
  121. package/{chunk-YQO5UKHP.js → chunk-ZNOXY73P.js} +632 -124
  122. package/{cliAgentConfigHelpers-37ZNEY5Y.js → cliAgentConfigHelpers-FKBPFPKR.js} +7 -7
  123. package/{cliAuthorityBrokerClient-SFPC3WVK.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
  124. package/cliAuthorityBrokerProcess-IUCB4XA6.js +22 -0
  125. package/{cliLocalAgentRecordReader-R4CLUHYO.js → cliLocalAgentRecordReader-DWU3LBO2.js} +36 -35
  126. package/{commandRegistry-UIZRI4JV.js → commandRegistry-7FVATZS2.js} +74 -74
  127. package/{contentThunks-ZQSZA4GH.js → contentThunks-25XCB7VY.js} +20 -20
  128. package/{cooldownCommands-TIFCHCUN.js → cooldownCommands-PT5L4LNB.js} +3 -3
  129. package/{createAgentAutomationAction-RQE4F6PR.js → createAgentAutomationAction-FC5RI2LW.js} +20 -20
  130. package/{createDialogAction-JDSMQ34U.js → createDialogAction-IL3ISSQQ.js} +21 -21
  131. package/{createPageAction-VLF6XCYO.js → createPageAction-RVYBEYZV.js} +23 -23
  132. package/{db-CMUTP3W5.js → db-JMGVD4TB.js} +4 -2
  133. package/{dbSlice-656PMWR2.js → dbSlice-WG3ZG6PZ.js} +5 -5
  134. package/{deleteFile-ZCQESEEQ.js → deleteFile-4TIG54YN.js} +3 -3
  135. package/{dialogCommands-PLM7ZFWH.js → dialogCommands-VUJISJZF.js} +48 -42
  136. package/{dialogNotifyCommand-PST75COP.js → dialogNotifyCommand-JKYVSR6K.js} +8 -8
  137. package/{dialogSlice-63DD2ER2.js → dialogSlice-UMP55UAW.js} +18 -18
  138. package/{dialogUsageCommand-6RW2FY6K.js → dialogUsageCommand-IHAXS7DW.js} +5 -5
  139. package/{docCreateCommands-BST5DO7L.js → docCreateCommands-S46F6GKP.js} +38 -36
  140. package/{docDeleteCommands-YE6G2SO4.js → docDeleteCommands-LJG4NK6J.js} +39 -37
  141. package/{docReadCommands-M6T35U3G.js → docReadCommands-YPAYGHNM.js} +38 -36
  142. package/{docStore-7QNJWRJ2.js → docStore-VK3MVJ5Q.js} +6 -6
  143. package/{docUpdateCommands-6DFWGPVG.js → docUpdateCommands-MPTM6267.js} +38 -36
  144. package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
  145. package/{handleSendMessageAction-FCEFFAV4.js → handleSendMessageAction-VPKVNKBU.js} +83 -41
  146. package/{hostCredentialCreate-YEWCAMZN.js → hostCredentialCreate-K56HWPNY.js} +86 -81
  147. package/index.js +23 -11
  148. package/{localDialogRead-CIOTQM5T.js → localDialogRead-NXILOV3T.js} +1 -1
  149. package/{localRuntimeAdapter-Z22ZOZRY.js → localRuntimeAdapter-KVU72FWT.js} +84 -79
  150. package/{localRuntimeAuthority-TYHQCTZN.js → localRuntimeAuthority-QKWTPBQQ.js} +13 -3
  151. package/{localRuntimeDb-BO7IVWAZ.js → localRuntimeDb-3CIC4SKC.js} +1 -1
  152. package/{machineCommands-PT5OJ36V.js → machineCommands-C3O5RKNJ.js} +85 -80
  153. package/{machineWsRunDispatch-DQVNBSVE.js → machineWsRunDispatch-ZLART7ZA.js} +85 -80
  154. package/{markdownToSlate-KIYM7B3P.js → markdownToSlate-PXYAIBVL.js} +1 -1
  155. package/{mcpLocalAuthorizeCommand-GO6AYT63.js → mcpLocalAuthorizeCommand-LO7E4VQ5.js} +15 -11
  156. package/{memberThunks-JFYC4Z5L.js → memberThunks-7DNR6DRD.js} +7 -7
  157. package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
  158. package/package.json +2 -1
  159. package/{projectArchive-4XUC5SLF.js → projectArchive-UBJFYRL7.js} +23 -23
  160. package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
  161. package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
  162. package/{read-BRZHXUJ6.js → read-Z2JOK6F6.js} +3 -3
  163. package/{readDocTool-N7RVFQEE.js → readDocTool-3QYSVWBT.js} +1 -1
  164. package/{readlineWorkspace-7U5QM3OM.js → readlineWorkspace-TSIYF7C6.js} +655 -248
  165. package/{removeDialogAgentAction-J7XU7OUX.js → removeDialogAgentAction-LRKDU4RI.js} +7 -7
  166. package/{runAgentClientLoop-7D7UCAS2.js → runAgentClientLoop-YAHGOWXN.js} +48 -48
  167. package/{runtimeDoctorCommands-RDRJXMXC.js → runtimeDoctorCommands-QGZSKNSE.js} +14 -11
  168. package/{secretCommands-2FEMRUFM.js → secretCommands-BXAQEOES.js} +2 -2
  169. package/{setDialogExtraReferencesAction-Q4V2ZZW2.js → setDialogExtraReferencesAction-KIITOCFP.js} +6 -6
  170. package/{setPrimaryDialogAgentAction-742H5S6T.js → setPrimaryDialogAgentAction-Y36PKFFB.js} +7 -7
  171. package/{settingThunks-IHXUF276.js → settingThunks-YQNG5L6K.js} +5 -5
  172. package/{spaceCommands-WCLD36WH.js → spaceCommands-P644AAZZ.js} +37 -35
  173. package/{streamAgentChatTurn-DVTOINT3.js → streamAgentChatTurn-5CSYAUAY.js} +81 -77
  174. package/{switchDialogAgentAction-HLDLHRRA.js → switchDialogAgentAction-U2VLPPVO.js} +5 -5
  175. package/{tools-BOPINT5S.js → tools-UZ3CDIR2.js} +38 -38
  176. package/{tuiRestart-5F2APN66.js → tuiRestart-GF4DGAAN.js} +7 -7
  177. package/{tuiSummaryLlmCaller-TM5BU73J.js → tuiSummaryLlmCaller-HROLGN4F.js} +13 -13
  178. package/{updateCommands-FBYA5WVG.js → updateCommands-BZ4YDHNM.js} +3 -3
  179. package/{updateDialogTitleAction-S76PUCLQ.js → updateDialogTitleAction-53XCCDK2.js} +20 -20
  180. package/{usageCommand-L4OFWXEU.js → usageCommand-XVJ7ZUTM.js} +2 -2
  181. package/{usageRebuildCommand-7JR33UHS.js → usageRebuildCommand-NK6S3D4J.js} +3 -3
  182. package/{windowsSelfUpdate-M4V77OUB.js → windowsSelfUpdate-4BAXX7C3.js} +2 -2
  183. package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-DYX5ZMAT.js} +2 -2
  184. package/chunk-FGHEF6WI.js +0 -34
  185. package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
  186. package/{chunk-CDIRKCPD.js → chunk-6HL6E7ZD.js} +152 -152
@@ -4,7 +4,7 @@ import {
4
4
  resolvePlatformHostedCredentialProvider,
5
5
  resolvePlatformProxyChatGatewayEndpoint,
6
6
  resolvePlatformResponsesEndpoint
7
- } from "./chunk-ESN4WNWU.js";
7
+ } from "./chunk-2JHGUL5K.js";
8
8
  import {
9
9
  asTrimmedString
10
10
  } from "./chunk-3EUW3WEO.js";
@@ -21,7 +21,7 @@ import {
21
21
  CLIENT_VERSION_TOO_OLD_CODE,
22
22
  buildClientVersionGateErrorDetail,
23
23
  evaluatePlatformHostedClientVersionGate
24
- } from "./chunk-PQ63BDV3.js";
24
+ } from "./chunk-JPXACKSW.js";
25
25
  import {
26
26
  asTrimmedLowercaseString
27
27
  } from "./chunk-QSJ3HFEF.js";
@@ -38,6 +38,22 @@ function pickAgentRuntimeInferenceOptions(agentConfig) {
38
38
  };
39
39
  }
40
40
 
41
+ // packages/shared/providerSecrets.ts
42
+ function providerSecretKey(presetId) {
43
+ const normalized = presetId.trim().replace(/[^a-zA-Z0-9]+/g, "_").toUpperCase();
44
+ return `${normalized}_KEY`;
45
+ }
46
+ function isAgentCredentialShared(agent) {
47
+ return agent?.credentialSynced === true;
48
+ }
49
+ function resolveOutboundProxyApiKey(credential) {
50
+ const apiKey = asOptionalTrimmedString(credential.apiKey);
51
+ if (apiKey && !isAgentCredentialShared(credential)) {
52
+ throw new Error("\u672A\u6388\u6743\u5C06\u6B64\u5BC6\u94A5\u53D1\u9001\u5230 nolo \u4EE3\u7406\u3002\u8BF7\u4F7F\u7528\u672C\u673A\u76F4\u8FDE\uFF0C\u6216\u542F\u7528\u8DE8\u8BBE\u5907\u5171\u4EAB\u540E\u91CD\u8BD5\u3002");
53
+ }
54
+ return apiKey;
55
+ }
56
+
41
57
  // packages/agent-runtime/providerResolution.ts
42
58
  function resolvePlatformProviderEndpoint(agentConfig) {
43
59
  const customProviderUrl = agentConfig.customProviderUrl?.trim();
@@ -223,7 +239,7 @@ async function buildProviderExecutionPlan(args) {
223
239
  const credentialRef2 = agentConfig.credentialRef?.trim();
224
240
  const apiKeyRef = agentConfig.apiKeyRef?.trim();
225
241
  if (args.credentialBroker) {
226
- const brokerRefs = [credentialRef2, apiKeyRef].filter(
242
+ const brokerRefs = [credentialRef2, ...!credentialRef2 || !apiKeyRef?.startsWith("provider-key:") ? [apiKeyRef] : []].filter(
227
243
  (ref) => Boolean(ref)
228
244
  );
229
245
  for (const ref of brokerRefs) {
@@ -234,7 +250,7 @@ async function buildProviderExecutionPlan(args) {
234
250
  }
235
251
  }
236
252
  }
237
- if (!apiKey2 && agentConfig.credentialSynced && args.syncFetcher && credentialRef2) {
253
+ if (!apiKey2 && isAgentCredentialShared(agentConfig) && args.syncFetcher && credentialRef2) {
238
254
  let synced = null;
239
255
  try {
240
256
  synced = await args.syncFetcher(credentialRef2);
@@ -249,7 +265,7 @@ async function buildProviderExecutionPlan(args) {
249
265
  apiKey2 = trimmed;
250
266
  }
251
267
  }
252
- if (!apiKey2 && apiKeyRef && apiKeyRef.startsWith("provider-key:") && args.syncFetcher) {
268
+ if (!apiKey2 && isAgentCredentialShared(agentConfig) && !credentialRef2 && apiKeyRef?.startsWith("provider-key:") && args.syncFetcher) {
253
269
  try {
254
270
  const shared = await args.syncFetcher(apiKeyRef);
255
271
  const trimmed = asTrimmedString(shared);
@@ -264,12 +280,12 @@ async function buildProviderExecutionPlan(args) {
264
280
  }
265
281
  }
266
282
  if (!apiKey2 && apiKeyRef && args.apiKeyRefResolver) {
267
- const resolved = await args.apiKeyRefResolver(apiKeyRef);
283
+ const resolved = apiKeyRef.startsWith("provider-key:") ? null : await args.apiKeyRefResolver(apiKeyRef);
268
284
  if (resolved) {
269
285
  apiKey2 = resolved;
270
286
  } else if (!agentConfig.apiKey?.trim() && !agentConfig.apiKeyFromAgentKey?.trim()) {
271
- const isApiKeyRef = apiKeyRef.startsWith("api-key:");
272
- const hint = isApiKeyRef ? agentConfig.credentialSynced ? `Local credential for "${apiKeyRef}" not found. It is synced to your account \u2014 run this agent once on a device that has the key, or re-enter it in agent settings.` : `Local credential for "${apiKeyRef}" not found. Re-enter the API key in agent settings, or enable cross-device sync.` : `OAuth credential for "${apiKeyRef}" not found locally. Run \`nolo auth ${apiKeyRef}\` (and \`--sync-to-server\` for server-side agent runs).`;
287
+ const isApiKeyRef = /^(api-key|provider-key):/.test(apiKeyRef);
288
+ const hint = isApiKeyRef ? isAgentCredentialShared(agentConfig) ? `Local credential for "${apiKeyRef}" not found. It is synced to your account \u2014 run this agent once on a device that has the key, or re-enter it in agent settings.` : `Local credential for "${apiKeyRef}" not found. Re-enter the API key in agent settings, or enable cross-device sync.` : `OAuth credential for "${apiKeyRef}" not found locally. Run \`nolo auth ${apiKeyRef}\` (and \`--sync-to-server\` for server-side agent runs).`;
273
289
  throw new Error(hint);
274
290
  }
275
291
  }
@@ -293,6 +309,7 @@ async function buildProviderExecutionPlan(args) {
293
309
  agentKey: agentConfig.key,
294
310
  ...agentConfig.apiSource ? { apiSource: agentConfig.apiSource } : {},
295
311
  ...apiKey2 ? { apiKey: apiKey2 } : {},
312
+ ...isAgentCredentialShared(agentConfig) ? { credentialSynced: true } : {},
296
313
  ...apiKeyHeader ? { apiKeyHeader } : {}
297
314
  };
298
315
  }
@@ -351,7 +368,7 @@ async function buildProviderExecutionPlan(args) {
351
368
  apiKey = fromBroker;
352
369
  }
353
370
  }
354
- if (!apiKey && agentConfig.credentialSynced && args.syncFetcher && credentialRef) {
371
+ if (!apiKey && isAgentCredentialShared(agentConfig) && args.syncFetcher && credentialRef) {
355
372
  let synced = null;
356
373
  try {
357
374
  synced = await args.syncFetcher(credentialRef);
@@ -382,6 +399,9 @@ async function buildProviderExecutionPlan(args) {
382
399
  }
383
400
 
384
401
  export {
402
+ providerSecretKey,
403
+ isAgentCredentialShared,
404
+ resolveOutboundProxyApiKey,
385
405
  pickAgentRuntimeInferenceOptions,
386
406
  trimTrailingSlash,
387
407
  resolvePlatformServerUrl,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveRunsDir
3
- } from "./chunk-YWNCRUBZ.js";
3
+ } from "./chunk-7XO73H5X.js";
4
4
  import {
5
5
  isLoopbackHostname
6
6
  } from "./chunk-4SN6J65J.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCliLocalMcpConnectionRevisionWriter,
3
3
  getDefaultCliLocalRuntimeAuthority
4
- } from "./chunk-W6T4FNZP.js";
4
+ } from "./chunk-HZD5HXUO.js";
5
5
  import {
6
6
  createStrictHostCredentialBroker
7
7
  } from "./chunk-LHCGKAFO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSelector
3
- } from "./chunk-6XVPMGXK.js";
3
+ } from "./chunk-YB5D2GK4.js";
4
4
  import {
5
5
  getAllServers,
6
6
  getIsDesktopApp,
@@ -1,9 +1,9 @@
1
- import {
2
- patch
3
- } from "./chunk-HZDK56EK.js";
4
1
  import {
5
2
  selectCurrentServer
6
- } from "./chunk-MTM4LRVG.js";
3
+ } from "./chunk-NNUIVAC2.js";
4
+ import {
5
+ patch
6
+ } from "./chunk-CO2NXG2J.js";
7
7
  import {
8
8
  getIsDesktopApp
9
9
  } from "./chunk-YHNUDTU4.js";
@@ -3,29 +3,29 @@ import {
3
3
  mergeReferences,
4
4
  resolveReferenceAssets,
5
5
  resolveToolsFromKeys
6
- } from "./chunk-XHG7QROB.js";
6
+ } from "./chunk-GO7UC5VH.js";
7
7
  import {
8
8
  UI_CARD_ENVELOPE_MAX_BYTES,
9
9
  getAllToolRuns,
10
10
  parseUiCard,
11
11
  uiCardFallback
12
- } from "./chunk-PGDM7AM2.js";
12
+ } from "./chunk-WAOHK3NJ.js";
13
13
  import {
14
14
  getDocState
15
- } from "./chunk-ZKMS73DK.js";
15
+ } from "./chunk-A6VIMCWI.js";
16
16
  import {
17
17
  getTableState
18
- } from "./chunk-X6LYQDN5.js";
18
+ } from "./chunk-TDLZA6LJ.js";
19
19
  import {
20
20
  selectAllMsgs
21
- } from "./chunk-YQO5UKHP.js";
21
+ } from "./chunk-ZNOXY73P.js";
22
22
  import {
23
23
  getCurrentSpaceIdRaw,
24
24
  getViewMode
25
- } from "./chunk-FFFKAOJN.js";
25
+ } from "./chunk-JAYPSNGR.js";
26
26
  import {
27
27
  selectById
28
- } from "./chunk-HZDK56EK.js";
28
+ } from "./chunk-CO2NXG2J.js";
29
29
  import {
30
30
  resolveToolBaseUrl
31
31
  } from "./chunk-KQHEGELM.js";
@@ -41,12 +41,12 @@ import {
41
41
  projectToolMessageContent,
42
42
  resolveAgentRecommendedSkillNames,
43
43
  resolveAgentRequiredPackIds
44
- } from "./chunk-CDIRKCPD.js";
44
+ } from "./chunk-6HL6E7ZD.js";
45
45
  import {
46
46
  attachmentKind,
47
47
  extractReferenceKeysFromMessage,
48
48
  normalizeAttachmentPart
49
- } from "./chunk-LTVEOOZL.js";
49
+ } from "./chunk-CIAV4WK2.js";
50
50
  import {
51
51
  asRecordOrEmpty
52
52
  } from "./chunk-KX6YBIHG.js";
@@ -82,7 +82,7 @@ import {
82
82
  getModelPricing,
83
83
  getPrices,
84
84
  hasExplicitAgentPricing
85
- } from "./chunk-AS6L5KSD.js";
85
+ } from "./chunk-P4R5KXU7.js";
86
86
  import {
87
87
  asTrimmedString
88
88
  } from "./chunk-3EUW3WEO.js";
@@ -92,7 +92,7 @@ import {
92
92
  import {
93
93
  getModelConfig,
94
94
  getProviderByModelName
95
- } from "./chunk-CD2DK5JA.js";
95
+ } from "./chunk-OKH74FML.js";
96
96
  import {
97
97
  isRecord
98
98
  } from "./chunk-KUG52IAP.js";
@@ -100,6 +100,84 @@ import {
100
100
  asOptionalTrimmedString
101
101
  } from "./chunk-G3SUCT4W.js";
102
102
 
103
+ // packages/app/utils/desktopActionGateChannel.ts
104
+ function targetForRunKind(kind, ctx = {}) {
105
+ if (kind === "server-run") {
106
+ return {
107
+ kind: "web",
108
+ server: ctx.server?.trim() ?? "",
109
+ token: ctx.token ?? null
110
+ };
111
+ }
112
+ return { kind: "desktop" };
113
+ }
114
+ var NEEDS_LOGIN_MESSAGE = "\u9700\u8981\u767B\u5F55\u540E\u624D\u80FD\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
115
+ var MISSING_SERVER_MESSAGE = "\u672A\u914D\u7F6E\u670D\u52A1\u5668\u5730\u5740\uFF0C\u65E0\u6CD5\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
116
+ var gates = /* @__PURE__ */ new Map();
117
+ var targets = /* @__PURE__ */ new Map();
118
+ var failures = /* @__PURE__ */ new Map();
119
+ var metadata = /* @__PURE__ */ new Map();
120
+ var errors = /* @__PURE__ */ new Map();
121
+ var listeners = /* @__PURE__ */ new Set();
122
+ var cachedSnapshot = null;
123
+ function invalidateSnapshot() {
124
+ cachedSnapshot = null;
125
+ }
126
+ function notify() {
127
+ for (const listener of listeners) {
128
+ try {
129
+ listener();
130
+ } catch {
131
+ }
132
+ }
133
+ }
134
+ function pushGate(gate, target = { kind: "desktop" }, meta) {
135
+ if (!gate || typeof gate.id !== "string" || gate.id.length === 0) return;
136
+ failures.delete(gate.id);
137
+ if (target.kind === "web" && (!target.token || !target.server.trim())) {
138
+ const message = !target.token ? NEEDS_LOGIN_MESSAGE : MISSING_SERVER_MESSAGE;
139
+ if (meta) failures.set(gate.id, { gateId: gate.id, meta: { ...meta, storage: "web" }, message });
140
+ gates.delete(gate.id);
141
+ targets.delete(gate.id);
142
+ metadata.delete(gate.id);
143
+ errors.set(gate.id, message);
144
+ invalidateSnapshot();
145
+ notify();
146
+ return;
147
+ }
148
+ metadata.delete(gate.id);
149
+ if (meta && target.kind !== "local") metadata.set(gate.id, { ...meta, storage: target.kind });
150
+ errors.delete(gate.id);
151
+ targets.set(gate.id, target);
152
+ gates.set(gate.id, gate);
153
+ invalidateSnapshot();
154
+ notify();
155
+ }
156
+ function clearGateTurn(turnId) {
157
+ for (const [id, failure] of failures) {
158
+ if (failure.meta.turnId === turnId) failures.delete(id);
159
+ }
160
+ for (const [id, meta] of metadata) {
161
+ if (meta.turnId !== turnId) continue;
162
+ gates.delete(id);
163
+ targets.delete(id);
164
+ metadata.delete(id);
165
+ errors.delete(id);
166
+ }
167
+ invalidateSnapshot();
168
+ notify();
169
+ }
170
+ function getSnapshot() {
171
+ if (!cachedSnapshot) {
172
+ cachedSnapshot = {
173
+ gates: [...gates.values()],
174
+ failures: [...failures.values()],
175
+ errors: Object.fromEntries(errors)
176
+ };
177
+ }
178
+ return cachedSnapshot;
179
+ }
180
+
103
181
  // packages/ai/agent/foregroundTurnAdmissionFetch.ts
104
182
  var FOREGROUND_TURN_KEEPALIVE_MAX_BODY_BYTES = 60 * 1024;
105
183
  function getUtf8ByteLength(value) {
@@ -1753,75 +1831,11 @@ async function resolveTurnToolContext(input) {
1753
1831
  };
1754
1832
  }
1755
1833
 
1756
- // packages/app/utils/desktopActionGateChannel.ts
1757
- function targetForRunKind(kind, ctx = {}) {
1758
- if (kind === "server-run") {
1759
- return {
1760
- kind: "web",
1761
- server: ctx.server?.trim() ?? "",
1762
- token: ctx.token ?? null
1763
- };
1764
- }
1765
- return { kind: "desktop" };
1766
- }
1767
- var NEEDS_LOGIN_MESSAGE = "\u9700\u8981\u767B\u5F55\u540E\u624D\u80FD\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
1768
- var MISSING_SERVER_MESSAGE = "\u672A\u914D\u7F6E\u670D\u52A1\u5668\u5730\u5740\uFF0C\u65E0\u6CD5\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
1769
- var gates = /* @__PURE__ */ new Map();
1770
- var targets = /* @__PURE__ */ new Map();
1771
- var failures = /* @__PURE__ */ new Map();
1772
- var metadata = /* @__PURE__ */ new Map();
1773
- var errors = /* @__PURE__ */ new Map();
1774
- var listeners = /* @__PURE__ */ new Set();
1775
- var cachedSnapshot = null;
1776
- function invalidateSnapshot() {
1777
- cachedSnapshot = null;
1778
- }
1779
- function notify() {
1780
- for (const listener of listeners) {
1781
- try {
1782
- listener();
1783
- } catch {
1784
- }
1785
- }
1786
- }
1787
- function pushGate(gate, target = { kind: "desktop" }, meta) {
1788
- if (!gate || typeof gate.id !== "string" || gate.id.length === 0) return;
1789
- failures.delete(gate.id);
1790
- if (target.kind === "web" && (!target.token || !target.server.trim())) {
1791
- const message = !target.token ? NEEDS_LOGIN_MESSAGE : MISSING_SERVER_MESSAGE;
1792
- if (meta) failures.set(gate.id, { gateId: gate.id, meta: { ...meta, storage: "web" }, message });
1793
- gates.delete(gate.id);
1794
- targets.delete(gate.id);
1795
- metadata.delete(gate.id);
1796
- errors.set(gate.id, message);
1797
- invalidateSnapshot();
1798
- notify();
1799
- return;
1800
- }
1801
- metadata.delete(gate.id);
1802
- if (meta && target.kind !== "local") metadata.set(gate.id, { ...meta, storage: target.kind });
1803
- errors.delete(gate.id);
1804
- targets.set(gate.id, target);
1805
- gates.set(gate.id, gate);
1806
- invalidateSnapshot();
1807
- notify();
1808
- }
1809
- function clearGateTurn(turnId) {
1810
- for (const [id, failure] of failures) {
1811
- if (failure.meta.turnId === turnId) failures.delete(id);
1812
- }
1813
- for (const [id, meta] of metadata) {
1814
- if (meta.turnId !== turnId) continue;
1815
- gates.delete(id);
1816
- targets.delete(id);
1817
- metadata.delete(id);
1818
- errors.delete(id);
1819
- }
1820
- invalidateSnapshot();
1821
- notify();
1822
- }
1823
-
1824
1834
  export {
1835
+ targetForRunKind,
1836
+ pushGate,
1837
+ clearGateTurn,
1838
+ getSnapshot,
1825
1839
  buildForegroundTurnAdmissionFetchInit,
1826
1840
  consumeAgentRunStream,
1827
1841
  projectDesktopToolUiContent,
@@ -1834,8 +1848,5 @@ export {
1834
1848
  mergeAgentToolsWithRuntime,
1835
1849
  applyImageConfigRuntimeOverride,
1836
1850
  resolveImageGenerationStreamingState,
1837
- resolveTurnToolContext,
1838
- targetForRunKind,
1839
- pushGate,
1840
- clearGateTurn
1851
+ resolveTurnToolContext
1841
1852
  };
@@ -10,7 +10,7 @@ import {
10
10
  canUsePlatformChatProvider,
11
11
  parsePlatformChatCompletionResponse,
12
12
  resolvePlatformChatProviderConfig
13
- } from "./chunk-EDT65EUE.js";
13
+ } from "./chunk-PIVTQRX6.js";
14
14
  import {
15
15
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
16
16
  classifySummaryError,
@@ -18,7 +18,7 @@ import {
18
18
  isTruncatedCompletion,
19
19
  selectSummaryRoute,
20
20
  summaryCompletionTokens
21
- } from "./chunk-MAA42MMV.js";
21
+ } from "./chunk-2FZVXOFX.js";
22
22
  import {
23
23
  isAbortError
24
24
  } from "./chunk-7DPNBQSV.js";
@@ -28,10 +28,10 @@ import {
28
28
  import {
29
29
  resolvePlatformAuthToken,
30
30
  resolvePlatformServerUrl
31
- } from "./chunk-K26XPZRB.js";
31
+ } from "./chunk-LVZVSLKO.js";
32
32
  import {
33
33
  PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL
34
- } from "./chunk-PQ63BDV3.js";
34
+ } from "./chunk-JPXACKSW.js";
35
35
 
36
36
  // packages/core/accountSession/fetchAccountProfile.ts
37
37
  async function fetchAccountProfile(input) {
@@ -12,7 +12,7 @@ import {
12
12
  resolvePlatformEffectiveModel,
13
13
  toCnyCredits,
14
14
  zaiModels
15
- } from "./chunk-PQ63BDV3.js";
15
+ } from "./chunk-JPXACKSW.js";
16
16
 
17
17
  // packages/integrations/qwen/models.ts
18
18
  var qwenModels = [
@@ -3732,6 +3732,7 @@ export {
3732
3732
  commandCodeModels,
3733
3733
  opencodeGoModels,
3734
3734
  DEFAULT_REASONING_EFFORT,
3735
+ REASONING_EFFORT_OPTIONS,
3735
3736
  resolveModelReasoningCapability,
3736
3737
  resolveModelReasoningCapabilityWithCache,
3737
3738
  isModelSupportReasoningEffort,
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-BR3GT6MR.js";
5
5
  import {
6
6
  resolveRuntimeToolSurfaceForAgent
7
- } from "./chunk-NEG5LYK5.js";
7
+ } from "./chunk-JCQ3WCQ3.js";
8
8
  import {
9
9
  resolveRuntimeAuthToken
10
- } from "./chunk-GX6DITLQ.js";
10
+ } from "./chunk-UUCYUN6Y.js";
11
11
  import {
12
12
  isSystemBuiltinTrustedAgentKey
13
13
  } from "./chunk-KZAT2M2V.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  streamSseDataValues
3
3
  } from "./chunk-HNUWUO75.js";
4
+ import {
5
+ resolveToolImagePolicy
6
+ } from "./chunk-BZLGPM5B.js";
4
7
  import {
5
8
  projectOpenAiToolImages
6
9
  } from "./chunk-X4O7FJF5.js";
7
- import {
8
- resolveToolImagePolicy
9
- } from "./chunk-SX6AWTNK.js";
10
10
  import {
11
11
  getAntigravityUserAgent,
12
12
  readAntigravityProjectId,
13
13
  resolveAntigravityCloudCodeBaseUrl
14
- } from "./chunk-CTWCZKNS.js";
14
+ } from "./chunk-6SOWMEAY.js";
15
15
  import {
16
16
  asOptionalTrimmedString
17
17
  } from "./chunk-G3SUCT4W.js";
@@ -12,12 +12,12 @@ import {
12
12
  } from "./chunk-WWC7I6TA.js";
13
13
  import {
14
14
  getModelConfig
15
- } from "./chunk-CD2DK5JA.js";
15
+ } from "./chunk-OKH74FML.js";
16
16
  import {
17
17
  isPlatformHostedImageModel,
18
18
  isPlatformManagedProvider,
19
19
  resolvePlatformEffectiveModel
20
- } from "./chunk-PQ63BDV3.js";
20
+ } from "./chunk-JPXACKSW.js";
21
21
 
22
22
  // packages/ai/llm/getPricing.ts
23
23
  var MAX_OUTPUT_TOKENS = 8192;