nolo-cli 0.98.0-alpha.3 → 0.98.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 (205) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-MA3D2J4W.js → _executeModel-GJK4ZVU6.js} +74 -67
  3. package/action-PNPQLJHG.js +20 -0
  4. package/{addContentAction-O7R66HEX.js → addContentAction-RBOUD7SJ.js} +12 -11
  5. package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-IODCR6TB.js} +18 -19
  6. package/{agentDeleteCommand-FHUJH5X4.js → agentDeleteCommand-GHRF6CH5.js} +47 -42
  7. package/{agentEmailCommands-KNYBWNMA.js → agentEmailCommands-O5BTHYZK.js} +97 -87
  8. package/agentListCommands-3REEM63V.js +742 -0
  9. package/{agentMachineCommands-N62I3D5Q.js → agentMachineCommands-2GW3CV7Q.js} +48 -43
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-IRNZXVGE.js} +1 -1
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
  12. package/agentRecordCommands-WYQODWZE.js +138 -0
  13. package/agentRunCommand-KAN65WPY.js +167 -0
  14. package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
  15. package/{agentRuntimeLocal-VXZSDIGT.js → agentRuntimeLocal-IOFBNVIL.js} +48 -39
  16. package/{agentSlice-65ETD734.js → agentSlice-I45M32KO.js} +14 -13
  17. package/{appDeleteCommands-PDZ7HQYH.js → appDeleteCommands-SFS6IZEM.js} +46 -41
  18. package/{appDeployCommands-KLLW32YA.js → appDeployCommands-YZQESVRQ.js} +46 -41
  19. package/{appDeployStatusCommands-IPNJ445T.js → appDeployStatusCommands-FKUUDCKP.js} +46 -41
  20. package/{appGetCommands-QA57XGXS.js → appGetCommands-QUE7OQZC.js} +46 -41
  21. package/{appListCommands-YBTAUFZS.js → appListCommands-QEETFKMH.js} +46 -41
  22. package/{authCommand-F4EFRRX6.js → authCommand-NHDLY3IB.js} +118 -24
  23. package/{authCommands-RGOGCPP6.js → authCommands-UDBJVSZU.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-MAR5LPAC.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-6OZ36FXI.js → chunk-27ONFIEY.js} +22 -4
  28. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  29. package/{chunk-53HEEOTT.js → chunk-2WJ57RJA.js} +83 -16
  30. package/{chunk-OIVSQH2O.js → chunk-3BXNTXYI.js} +299 -5
  31. package/{chunk-ABQYVJBJ.js → chunk-46Y5D2BZ.js} +5 -5
  32. package/{chunk-EYAQT56M.js → chunk-4DPP773Q.js} +2 -2
  33. package/{chunk-H62HCIUP.js → chunk-4FFUDT6D.js} +24 -21
  34. package/chunk-4LCOCOR5.js +50 -0
  35. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  36. package/{chunk-IIVGDG4I.js → chunk-4YSOUKUR.js} +13 -7
  37. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  38. package/{chunk-FSX24MR3.js → chunk-5AUJB66Z.js} +550 -515
  39. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  40. package/chunk-5J3PYNUP.js +255 -0
  41. package/chunk-5MMAK75Q.js +15 -0
  42. package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
  43. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  44. package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
  45. package/{chunk-D2QT5FW4.js → chunk-6XDD7N7P.js} +47 -67
  46. package/{chunk-GQBOR3G6.js → chunk-7KVZ5LDQ.js} +2 -2
  47. package/{chunk-DNCEALKX.js → chunk-7MMSLEPA.js} +22 -29
  48. package/chunk-A4SQRTZ6.js +15 -0
  49. package/{chunk-7S4YWN7P.js → chunk-ADBZWMFB.js} +4 -4
  50. package/chunk-AGIM7IMJ.js +147 -0
  51. package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
  52. package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
  53. package/{chunk-GZBATRJA.js → chunk-B2DEZY6J.js} +20 -11
  54. package/chunk-BMQ2MJUK.js +153 -0
  55. package/{chunk-6YTOJY35.js → chunk-BZ7NPA6G.js} +35 -2
  56. package/chunk-C4DVDM72.js +13536 -0
  57. package/chunk-CHOZJMJS.js +78 -0
  58. package/{chunk-ACTMNVHM.js → chunk-CYSYR67N.js} +1 -1
  59. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  60. package/chunk-DZ7R5V3Y.js +164 -0
  61. package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
  62. package/{chunk-V4MJDUSR.js → chunk-E73ON47R.js} +2 -2
  63. package/{chunk-UY2NBS4V.js → chunk-EIFYNGU4.js} +24 -5
  64. package/{chunk-KQ4ONNQD.js → chunk-EKPKW6RM.js} +155 -8
  65. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  66. package/{chunk-HJUYAD4A.js → chunk-FJ5BGMNM.js} +5 -5
  67. package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
  68. package/{chunk-TDRTS7QW.js → chunk-FY7DCYW7.js} +88 -17
  69. package/{chunk-J4MOO56S.js → chunk-GARACBQB.js} +10 -2
  70. package/{chunk-6VFARHZW.js → chunk-GDFA73QZ.js} +934 -1091
  71. package/chunk-GMZLP5DV.js +82 -0
  72. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  73. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  74. package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
  75. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  76. package/{chunk-VLTIYV3X.js → chunk-HP57OUJO.js} +4 -4
  77. package/{chunk-AD2L6YCC.js → chunk-I76SDF7A.js} +10 -10
  78. package/{chunk-PELKTR62.js → chunk-I7BCBNWZ.js} +24 -77
  79. package/{chunk-GPCZ7UXG.js → chunk-K6U4NKFJ.js} +1 -1
  80. package/{chunk-4OEFYTWL.js → chunk-LDCAFLXD.js} +64 -48
  81. package/{chunk-SNPMM7H3.js → chunk-LNVJHIGA.js} +18 -20
  82. package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
  83. package/{chunk-5H7KJX7J.js → chunk-LQ4PDQCI.js} +5 -5
  84. package/{chunk-GABFWSOQ.js → chunk-M33GWZIZ.js} +67 -45
  85. package/{chunk-PUOC4YRO.js → chunk-M7VLQGQP.js} +11 -0
  86. package/chunk-NHDMQZJM.js +7881 -0
  87. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  88. package/{chunk-L5UXH3B2.js → chunk-NNCYNBYV.js} +22 -6
  89. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  90. package/chunk-NWENLDMM.js +42 -0
  91. package/{chunk-76WEAXJB.js → chunk-NZWAO6LH.js} +20 -17
  92. package/chunk-OCZKATRC.js +129 -0
  93. package/{chunk-N2WELJE7.js → chunk-OU36O6OR.js} +23 -28
  94. package/chunk-OW4APERY.js +870 -0
  95. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  96. package/{chunk-TVYSVSA2.js → chunk-P5L7VVMT.js} +11 -9
  97. package/{chunk-TOP2VXOR.js → chunk-PCF3QU5Q.js} +5 -5
  98. package/{chunk-WV42OMV7.js → chunk-PTDYOADJ.js} +8 -8
  99. package/{chunk-6D6VBVEW.js → chunk-SNMQMOD2.js} +80 -14
  100. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  101. package/{chunk-Z77CRGTW.js → chunk-TVCAR26G.js} +1 -1
  102. package/chunk-TY3TIUJK.js +89 -0
  103. package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
  104. package/{chunk-RG6JBBX5.js → chunk-U7XXEI5R.js} +166 -13
  105. package/{chunk-UZGQNTVW.js → chunk-UA324D4O.js} +8 -6
  106. package/chunk-UJXNKP5V.js +760 -0
  107. package/{chunk-UKZDAFYT.js → chunk-UM4PH574.js} +6 -10
  108. package/{chunk-BLJWCTRL.js → chunk-UVKDJUTL.js} +3 -3
  109. package/{chunk-ZCYXJSTU.js → chunk-V5OWQOJZ.js} +19 -88
  110. package/{chunk-YQTQQX2H.js → chunk-V7Y6KRAH.js} +1 -1
  111. package/{chunk-3DII57IT.js → chunk-VCAQFMVN.js} +1 -1
  112. package/{chunk-JRQFUXY7.js → chunk-VEYL5MO5.js} +99 -22
  113. package/chunk-VIWDGTDA.js +8 -0
  114. package/chunk-VJVNU77E.js +83 -0
  115. package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
  116. package/{chunk-2FA3ITSX.js → chunk-W3RFFFFF.js} +873 -227
  117. package/{chunk-BP4XNZRM.js → chunk-W72ISAKC.js} +4 -4
  118. package/{chunk-DHDMC6FO.js → chunk-WCGC6S77.js} +14 -9
  119. package/{chunk-QDSINZM3.js → chunk-WJ3B6FX6.js} +1 -14
  120. package/{chunk-V4I3A7DR.js → chunk-WXHAOL7Y.js} +19 -17
  121. package/{chunk-FUUHG5LT.js → chunk-X2B2C4XD.js} +1 -1
  122. package/{chunk-HVURBGF3.js → chunk-XFUBXRVI.js} +6 -6
  123. package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
  124. package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
  125. package/{chunk-QIAVMDHY.js → chunk-YPOPJAKN.js} +4 -4
  126. package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
  127. package/chunk-YV25TM3R.js +780 -0
  128. package/chunk-ZRAU6T47.js +56 -0
  129. package/commandRegistry-RZNZ37BN.js +833 -0
  130. package/{contentThunks-Y6FA2TCW.js → contentThunks-DF7ZNCAG.js} +36 -34
  131. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  132. package/{createAgentAutomationAction-JXAFQO5V.js → createAgentAutomationAction-KPMOZ53Y.js} +38 -36
  133. package/createDialogAction-I2UDVAXN.js +69 -0
  134. package/{createPageAction-GUQDPKO5.js → createPageAction-IF5JXNKV.js} +45 -42
  135. package/{chunk-ZMD2CQFC.js → cursorProvider-YGGNMVWX.js} +2496 -9897
  136. package/{dbSlice-XVWBAGYN.js → dbSlice-Q25STFGJ.js} +11 -10
  137. package/{deleteFile-YG6QMJLU.js → deleteFile-AJ2EZMHT.js} +7 -6
  138. package/{dialogCommands-JJDASFIL.js → dialogCommands-LWHIIUQD.js} +49 -45
  139. package/{dialogSlice-J2YJNE6E.js → dialogSlice-74DFPFRV.js} +40 -33
  140. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  141. package/{docCreateCommands-OB3X3EQM.js → docCreateCommands-LVXQ6TNZ.js} +48 -43
  142. package/{docDeleteCommands-WMHRGF22.js → docDeleteCommands-7TVIGCLP.js} +49 -44
  143. package/{docReadCommands-NWGGLIAZ.js → docReadCommands-KYAXFLQ5.js} +47 -42
  144. package/{docStore-6KKYKAGQ.js → docStore-2JDRAYXJ.js} +16 -12
  145. package/{docUpdateCommands-3DDSOLPS.js → docUpdateCommands-TVC5KWPK.js} +48 -43
  146. package/{fetchMessages-EIU7UFFK.js → fetchMessages-I5ICDDHM.js} +5 -5
  147. package/{getPricing-LUSEABA6.js → getPricing-NMMFT3YI.js} +4 -4
  148. package/{handleSendMessageAction-A4XLEEPU.js → handleSendMessageAction-54GY3XOH.js} +110 -86
  149. package/index.js +87 -884
  150. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-ZHZ3KXDM.js} +2 -2
  151. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
  152. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
  153. package/{machineCommands-Y64KAIRW.js → machineCommands-54RNLVJE.js} +91 -81
  154. package/machineWsRunDispatch-WE3VTD57.js +154 -0
  155. package/{memberThunks-QGFLFVCI.js → memberThunks-R75S3RWP.js} +20 -18
  156. package/{models-T3SG6MJ5.js → models-ZPU5EDF4.js} +2 -2
  157. package/oauthTokenStore-ITEB663N.js +23 -0
  158. package/package.json +1 -1
  159. package/pdf-U6KSUEZZ.js +26435 -0
  160. package/processSpawn-SOAV3FEV.js +11 -0
  161. package/profileConfig-ZGOFORWV.js +43 -0
  162. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-TEBH7FDX.js} +7 -7
  163. package/{providerRegistry-757OWH3O.js → providerRegistry-CBJLNCET.js} +11 -7
  164. package/{read-COE3ZYR6.js → read-SRQMNO26.js} +7 -6
  165. package/{readDocTool-5USN4A6V.js → readDocTool-RC3JUNJ2.js} +5 -3
  166. package/{readlineWorkspace-45XNHFXU.js → readlineWorkspace-UK5M5CJI.js} +2704 -2060
  167. package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-46XQV5Q7.js} +21 -25
  168. package/{runAgentClientLoop-ADZRHNG6.js → runAgentClientLoop-MTI5OU2W.js} +75 -69
  169. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
  170. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  171. package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-J4V5ADQF.js} +15 -13
  172. package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-UHHV2QZW.js} +22 -26
  173. package/{chunk-AFUORTY4.js → settingThunks-PPZZZOWN.js} +226 -940
  174. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  175. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  176. package/{spaceCommands-E7MQ4VU2.js → spaceCommands-446WWA73.js} +51 -46
  177. package/{streamAgentChatTurn-TUP7YO3H.js → streamAgentChatTurn-IANOWAKR.js} +199 -104
  178. package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-A2TMVGAE.js} +18 -19
  179. package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
  180. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-EJT6TMFG.js} +3 -3
  181. package/tools-WZZYTUNF.js +116 -0
  182. package/{tuiSummaryLlmCaller-WFRWERGK.js → tuiSummaryLlmCaller-Q65IBDGO.js} +24 -21
  183. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  184. package/{updateDialogTitleAction-KSWXWWFT.js → updateDialogTitleAction-Z2JTYLXD.js} +82 -44
  185. package/action-YVYQEAAV.js +0 -31
  186. package/agentListCommands-GATRXEMT.js +0 -406
  187. package/agentRecordCommands-GOC5K27T.js +0 -128
  188. package/agentRunCommand-JP2U3MQF.js +0 -155
  189. package/browser-image-compression-MFDTD7K6.js +0 -1763
  190. package/chatQueueReduxAdapter-5QOW43T4.js +0 -186
  191. package/chunk-DHDVZFNC.js +0 -18885
  192. package/chunk-M76ECQRD.js +0 -13658
  193. package/chunk-MEYIRKDN.js +0 -8967
  194. package/chunk-Q5FJJ6XI.js +0 -103
  195. package/chunk-S7Z2HMCN.js +0 -25
  196. package/chunk-Y5GCAMGP.js +0 -9
  197. package/chunk-YPREESF4.js +0 -225
  198. package/createDialogAction-O2QABXZF.js +0 -65
  199. package/machineWsRunDispatch-M366L2LJ.js +0 -144
  200. package/settingSlice-ZQZVUPKK.js +0 -204
  201. package/syncMapping-N6RGXGBW.js +0 -437
  202. package/tools-2VDNDFET.js +0 -110
  203. package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
  204. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  205. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -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
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MEMORY_USE_GUIDANCE,
3
3
  wrapHistoricalSummaryWithReplayGuard
4
- } from "./chunk-2GRGFCF6.js";
4
+ } from "./chunk-4VJAC32I.js";
5
5
 
6
6
  // packages/agent-runtime/turnContext.ts
7
7
  var DEFAULT_RECENT_CONTENT_LIMIT = 10;
@@ -258,7 +258,6 @@ var normalizeTimeFields = (data) => ({
258
258
  });
259
259
 
260
260
  export {
261
- isProduction,
262
261
  isDevelopment,
263
262
  getIsDesktopApp,
264
263
  createClientLogger,
@@ -206,9 +206,12 @@ export {
206
206
  resolveNoloStateDir,
207
207
  getLegacyCredentialPath,
208
208
  migrateLegacyCredentialFile,
209
+ DEFAULT_REFRESH_SKEW_MS,
209
210
  getCredentialsDir,
211
+ getCredentialPath,
210
212
  readOAuthCredential,
211
213
  writeOAuthCredential,
214
+ removeOAuthCredential,
212
215
  createOAuthTokenStore,
213
216
  isTokenExpired,
214
217
  resolveFreshAccessToken
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getActiveDialogKey
3
- } from "./chunk-6YTOJY35.js";
3
+ } from "./chunk-BZ7NPA6G.js";
4
4
  import {
5
5
  compactWhitespace
6
6
  } from "./chunk-DWLEOOGR.js";
@@ -10,12 +10,12 @@ import {
10
10
  import {
11
11
  extractCustomId
12
12
  } from "./chunk-M2EJHDJP.js";
13
- import {
14
- selectIdentityToken
15
- } from "./chunk-SEJ5OS6F.js";
16
13
  import {
17
14
  isRecord
18
15
  } from "./chunk-KUG52IAP.js";
16
+ import {
17
+ selectIdentityToken
18
+ } from "./chunk-SEJ5OS6F.js";
19
19
 
20
20
  // packages/ai/tools/toolApiClient.ts
21
21
  var MAIN_SERVER = "https://nolo.chat";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-FSX24MR3.js";
3
+ } from "./chunk-5AUJB66Z.js";
4
4
  import {
5
- i18n_default
6
- } from "./chunk-DHDVZFNC.js";
5
+ runtime_default
6
+ } from "./chunk-C4DVDM72.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
- } from "./chunk-O6OSWFZQ.js";
9
+ } from "./chunk-XUWRURDF.js";
10
10
  import {
11
11
  isNoloHostedProvider
12
- } from "./chunk-Q67DOFOO.js";
12
+ } from "./chunk-Y3PMXGLH.js";
13
13
  import {
14
14
  asTrimmedLowercaseString
15
15
  } from "./chunk-QSJ3HFEF.js";
@@ -151,12 +151,12 @@ var PREPARE_TOOLS_CACHE_LIMIT = 128;
151
151
  var warnedUnknownToolNames = /* @__PURE__ */ new Set();
152
152
  function getTranslation(keys, defaultVal) {
153
153
  for (const key of keys) {
154
- if (i18n_default.exists(key)) {
155
- return i18n_default.t(key);
154
+ if (runtime_default.exists(key)) {
155
+ return runtime_default.t(key);
156
156
  }
157
157
  const aiKey = key.startsWith("ai:") ? key : `ai:${key}`;
158
- if (i18n_default.exists(aiKey)) {
159
- return i18n_default.t(aiKey);
158
+ if (runtime_default.exists(aiKey)) {
159
+ return runtime_default.t(aiKey);
160
160
  }
161
161
  }
162
162
  return defaultVal;
@@ -203,7 +203,7 @@ function translateSchema(schema) {
203
203
  return nextSchema;
204
204
  }
205
205
  function currentI18nLanguage() {
206
- return typeof i18n_default.language === "string" ? i18n_default.language : "";
206
+ return typeof runtime_default.language === "string" ? runtime_default.language : "";
207
207
  }
208
208
  function translateSchemaCached(schema) {
209
209
  if (!schema || typeof schema !== "object") return schema;
@@ -5,14 +5,14 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-AD2L6YCC.js";
8
+ } from "./chunk-I76SDF7A.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-GABFWSOQ.js";
15
+ } from "./chunk-M33GWZIZ.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-FSX24MR3.js";
26
+ } from "./chunk-5AUJB66Z.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-DHDVZFNC.js";
41
+ } from "./chunk-C4DVDM72.js";
39
42
  import {
40
43
  streamAgentChatTurn
41
- } from "./chunk-TVYSVSA2.js";
44
+ } from "./chunk-P5L7VVMT.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-LDCAFLXD.js";
63
+ import {
64
+ write
65
+ } from "./chunk-4FFUDT6D.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-3AH7LNUB.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";
@@ -794,61 +797,6 @@ var handleToolCalls = createAsyncThunk(
794
797
  }
795
798
  );
796
799
 
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
800
  // packages/ai/chat/accumulateToolCallChunks.ts
853
801
  function accumulateToolCallChunks(currentAccumulatedCalls, toolCallChunks) {
854
802
  const accumulator = {
@@ -1839,7 +1787,6 @@ export {
1839
1787
  filterAndCleanMessages,
1840
1788
  persistToolMessages,
1841
1789
  handleToolCalls,
1842
- parseApiError,
1843
1790
  updateTotalUsage,
1844
1791
  readStreamChunk,
1845
1792
  sendOpenAICompletionsRequest
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generatePkcePair,
3
3
  startCallbackServer
4
- } from "./chunk-53HEEOTT.js";
4
+ } from "./chunk-2WJ57RJA.js";
5
5
  import {
6
6
  toErrorMessage
7
7
  } from "./chunk-HNMXYYJR.js";
@@ -1,25 +1,62 @@
1
1
  import {
2
2
  normalizeTimingMs
3
- } from "./chunk-DNCEALKX.js";
3
+ } from "./chunk-7MMSLEPA.js";
4
4
  import {
5
5
  MODEL_LOOKUP_MAP
6
- } from "./chunk-OIVSQH2O.js";
6
+ } from "./chunk-3BXNTXYI.js";
7
7
  import {
8
8
  ALL_MODELS
9
- } from "./chunk-ACTMNVHM.js";
9
+ } from "./chunk-CYSYR67N.js";
10
+ import {
11
+ BUILTIN_NOLO_AGENT_KEY
12
+ } from "./chunk-BNGW5ASC.js";
10
13
  import {
11
14
  asTrimmedNonEmptyStringArray
12
- } from "./chunk-VMFTFOWF.js";
15
+ } from "./chunk-3AH7LNUB.js";
13
16
  import {
14
17
  asOptionalFiniteNumber
15
18
  } from "./chunk-WWC7I6TA.js";
16
- import {
17
- BUILTIN_NOLO_AGENT_KEY
18
- } from "./chunk-BNGW5ASC.js";
19
19
  import {
20
20
  asOptionalTrimmedString
21
21
  } from "./chunk-G3SUCT4W.js";
22
22
 
23
+ // packages/agent-runtime/autoExecutionProfiles.ts
24
+ var createProfile = (input) => ({
25
+ id: input.id,
26
+ tier: input.tier,
27
+ legacyAgentKey: input.legacyAgentKey,
28
+ key: input.legacyAgentKey,
29
+ name: input.name,
30
+ provider: "nolo",
31
+ model: input.model,
32
+ apiSource: "platform",
33
+ useServerProxy: true,
34
+ rawRecord: {
35
+ dbKey: input.legacyAgentKey,
36
+ isPublic: true,
37
+ provider: "nolo",
38
+ model: input.model,
39
+ apiSource: "platform",
40
+ useServerProxy: true
41
+ }
42
+ });
43
+ var FLASH_PROFILE = createProfile({
44
+ id: "builtin:auto:nolo",
45
+ tier: "flash",
46
+ legacyAgentKey: BUILTIN_NOLO_AGENT_KEY,
47
+ name: "nolo",
48
+ model: "deepseek-flash"
49
+ });
50
+ var AUTO_EXECUTION_PROFILES = {
51
+ flash: FLASH_PROFILE,
52
+ balanced: { ...FLASH_PROFILE, tier: "balanced" },
53
+ quality: { ...FLASH_PROFILE, tier: "quality" },
54
+ image: { ...FLASH_PROFILE, tier: "image" }
55
+ };
56
+ var DEFAULT_AUTO_EXECUTION_TIER = "flash";
57
+ var DEFAULT_AUTO_EXECUTION_PROFILE = AUTO_EXECUTION_PROFILES[DEFAULT_AUTO_EXECUTION_TIER];
58
+ var resolveAutoExecutionProfile = (tier) => AUTO_EXECUTION_PROFILES[tier ?? DEFAULT_AUTO_EXECUTION_TIER] ?? DEFAULT_AUTO_EXECUTION_PROFILE;
59
+
23
60
  // packages/ai/token/cacheTokenFields.ts
24
61
  var finiteTokenCount = (value) => {
25
62
  if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
@@ -134,6 +171,22 @@ function fuzzyContextWindow(normalizedName) {
134
171
  if (normalizedName.includes("qwen3.6") || normalizedName.includes("qwen3p6")) return QWEN_3_6_CONTEXT_WINDOW;
135
172
  if (normalizedName.includes("qwen3.7") || normalizedName.includes("qwen3p7")) return 262144;
136
173
  if (normalizedName.includes("minimax-m2") || normalizedName.includes("minimax_m2")) return 262144;
174
+ const bareModelName = (normalizedName.includes("/") ? normalizedName.slice(normalizedName.lastIndexOf("/") + 1) : normalizedName).replace(/:.*$/, "");
175
+ if (normalizedName.includes("mistral-large-4")) {
176
+ const rest = normalizedName.slice(
177
+ normalizedName.indexOf("mistral-large-4") + "mistral-large-4".length
178
+ );
179
+ if (rest === "" || /^[-:_@/\s]/.test(rest)) return 524288;
180
+ }
181
+ if (normalizedName.includes("mistral-vibe-cli") || normalizedName.includes("mistral-medium-3.5") || normalizedName.includes("mistral-medium-3-5") || normalizedName.includes("mistral-medium-latest") || normalizedName.includes("mistral-medium-2604") || normalizedName.includes("mistral-large-latest") || normalizedName.includes("mistral-large-2512") || normalizedName.includes("mistral-small-latest") || normalizedName.includes("mistral-small-2603") || normalizedName.includes("magistral-medium-latest") || normalizedName.includes("magistral-small-latest") || // 展示名(TUI 传 displayName 的路径;Mistral 不在 MODEL_LOOKUP_MAP,无法走精确表):
182
+ normalizedName.includes("mistral vibe cli") || normalizedName.includes("mistral medium 3.5") || normalizedName.includes("mistral large (latest)")) {
183
+ return 262144;
184
+ }
185
+ if (bareModelName === "mistral-medium" || bareModelName === "mistral-medium-3") return 262144;
186
+ if (normalizedName.includes("mistral-embed") || normalizedName.includes("codestral-embed")) return 8192;
187
+ if (normalizedName.includes("mistral-ocr")) return 16384;
188
+ if (normalizedName.includes("mistral-moderation")) return 131072;
189
+ if (normalizedName.includes("codestral") || normalizedName.includes("mistral-code")) return 256e3;
137
190
  if (normalizedName.includes("claude")) return 2e5;
138
191
  if (normalizedName.includes("llama3.1") || normalizedName.includes("llama-3.1") || normalizedName.includes("llama3.2") || normalizedName.includes("llama-3.2") || normalizedName.includes("llama3.3") || normalizedName.includes("llama-3.3") || normalizedName.includes("qwen2.5") || normalizedName.includes("qwen-2.5") || normalizedName.includes("mistral-nemo") || normalizedName.includes("phi3.5") || normalizedName.includes("phi-3.5") || normalizedName.includes("phi4") || normalizedName.includes("phi-4")) {
139
192
  return 131072;
@@ -279,7 +332,7 @@ var normalizeUsage = (usage) => {
279
332
  // packages/agent-runtime/emptyAssistantRepair.ts
280
333
  var EMPTY_ASSISTANT_REPAIR_PROMPT = "\u8BF7\u7ED9\u51FA\u660E\u786E\u7684\u6587\u5B57\u56DE\u7B54\u6216\u6267\u884C\u4E0B\u4E00\u6B65\uFF1A\u5982\u679C\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF0C\u8BF7\u76F4\u63A5\u603B\u7ED3\u7ED3\u679C\uFF1B\u5982\u679C\u9700\u8981\u8C03\u7528\u5DE5\u5177\uFF0C\u53EA\u80FD\u8C03\u7528\u672C\u6B21\u8BF7\u6C42\u4E2D\u5DF2\u58F0\u660E\u7684\u5DE5\u5177\u2014\u2014\u4F60\u60F3\u7528\u7684\u5DE5\u5177\u4E0D\u5728\u58F0\u660E\u5217\u8868\u4E2D\u65F6\uFF0C\u4E0D\u8981\u5C1D\u8BD5\u8C03\u7528\u5B83\uFF0C\u76F4\u63A5\u7528\u6587\u5B57\u8BF4\u660E\u8BE5\u80FD\u529B\u5F53\u524D\u4E0D\u53EF\u7528\u3002\u8BF7\u5207\u52FF\u8FD4\u56DE\u7A7A\u5185\u5BB9\u3002";
281
334
  var EMPTY_ASSISTANT_FALLBACK_MESSAGE = "\u6A21\u578B\u8FDE\u7EED\u8FD4\u56DE\u7A7A\u6D88\u606F\uFF0C\u5F53\u524D\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u5F53\u524D\u6B65\u9AA4\uFF0C\u6216\u7ED9\u51FA\u66F4\u5177\u4F53\u7684\u4FEE\u6539\u8303\u56F4\u3002";
282
- var LENGTH_TRUNCATED_FALLBACK_MESSAGE = "\u8F93\u51FA\u8FBE\u5230\u957F\u5EA6\u4E0A\u9650\u88AB\u622A\u65AD\uFF0C\u5EFA\u8BAE\u7F29\u77ED\u4EFB\u52A1\u6216\u63D0\u9AD8\u8F93\u51FA\u4E0A\u9650\u3002";
335
+ var LENGTH_TRUNCATED_FALLBACK_MESSAGE = "\u8F93\u51FA\u8FBE\u5230\u957F\u5EA6\u4E0A\u9650\u88AB\u622A\u65AD\uFF0C\u6216\u4E0A\u4E0B\u6587\u5DF2\u8D85\u51FA\u6A21\u578B\u7A97\u53E3\u3002\u5EFA\u8BAE\u7F29\u77ED\u4EFB\u52A1\u3001\u538B\u7F29\u6216\u65B0\u5F00\u5BF9\u8BDD\uFF0C\u6216\u63D0\u9AD8\u8F93\u51FA\u4E0A\u9650\u3002";
283
336
  var STREAM_TRUNCATED_FALLBACK_MESSAGE = "\u4E0A\u6E38\u54CD\u5E94\u6D41\u5728\u6536\u5C3E\u524D\u88AB\u4E2D\u65AD\uFF08\u672A\u6536\u5230\u7ED3\u675F\u6807\u8BB0\uFF09\uFF0C\u672C\u8F6E\u8F93\u51FA\u4E0D\u5B8C\u6574\u3002\u8BF7\u91CD\u8BD5\u5F53\u524D\u6B65\u9AA4\u3002";
284
337
  var REPETITION_LOOP_FALLBACK_MESSAGE = "\u68C0\u6D4B\u5230\u6A21\u578B\u9677\u5165\u91CD\u590D\u8F93\u51FA\u6B7B\u5FAA\u73AF\uFF0C\u5DF2\u81EA\u52A8\u7194\u65AD\u7EC8\u6B62\u5F53\u524D\u4EFB\u52A1\u3002";
285
338
  var STAGNANT_TOOL_CALLS_FALLBACK_MESSAGE = "\u68C0\u6D4B\u5230\u8FDE\u7EED\u591A\u6B21\u76F8\u540C\u5DE5\u5177\u8C03\u7528\u4E14\u65E0\u5B9E\u8D28\u8FDB\u5C55\uFF0C\u5DF2\u81EA\u52A8\u7194\u65AD\u7EC8\u6B62\u5F53\u524D\u4EFB\u52A1\u3002";
@@ -346,44 +399,9 @@ function resolveTruncatedReasoningTailLog(reason, reasoning_content) {
346
399
  return null;
347
400
  }
348
401
 
349
- // packages/agent-runtime/autoExecutionProfiles.ts
350
- var createProfile = (input) => ({
351
- id: input.id,
352
- tier: input.tier,
353
- legacyAgentKey: input.legacyAgentKey,
354
- key: input.legacyAgentKey,
355
- name: input.name,
356
- provider: "nolo",
357
- model: input.model,
358
- apiSource: "platform",
359
- useServerProxy: true,
360
- rawRecord: {
361
- dbKey: input.legacyAgentKey,
362
- isPublic: true,
363
- provider: "nolo",
364
- model: input.model,
365
- apiSource: "platform",
366
- useServerProxy: true
367
- }
368
- });
369
- var FLASH_PROFILE = createProfile({
370
- id: "builtin:auto:nolo",
371
- tier: "flash",
372
- legacyAgentKey: BUILTIN_NOLO_AGENT_KEY,
373
- name: "nolo",
374
- model: "deepseek-flash"
375
- });
376
- var AUTO_EXECUTION_PROFILES = {
377
- flash: FLASH_PROFILE,
378
- balanced: { ...FLASH_PROFILE, tier: "balanced" },
379
- quality: { ...FLASH_PROFILE, tier: "quality" },
380
- image: { ...FLASH_PROFILE, tier: "image" }
381
- };
382
- var DEFAULT_AUTO_EXECUTION_TIER = "flash";
383
- var DEFAULT_AUTO_EXECUTION_PROFILE = AUTO_EXECUTION_PROFILES[DEFAULT_AUTO_EXECUTION_TIER];
384
- var resolveAutoExecutionProfile = (tier) => AUTO_EXECUTION_PROFILES[tier ?? DEFAULT_AUTO_EXECUTION_TIER] ?? DEFAULT_AUTO_EXECUTION_PROFILE;
385
-
386
402
  export {
403
+ DEFAULT_AUTO_EXECUTION_PROFILE,
404
+ resolveAutoExecutionProfile,
387
405
  readCacheReadInputTokens,
388
406
  readCacheCreationInputTokens,
389
407
  DEFAULT_CONTEXT_WINDOW,
@@ -399,7 +417,5 @@ export {
399
417
  resolveEmptyAssistantOutcome,
400
418
  resolveEmptyAssistantFallbackMessage,
401
419
  hasAssistantVisibleOutput,
402
- resolveTruncatedReasoningTailLog,
403
- DEFAULT_AUTO_EXECUTION_PROFILE,
404
- resolveAutoExecutionProfile
420
+ resolveTruncatedReasoningTailLog
405
421
  };
@@ -7,18 +7,15 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-BLJWCTRL.js";
10
+ } from "./chunk-UVKDJUTL.js";
11
11
  import {
12
- fetchWithTransientRetry
13
- } from "./chunk-5UTFL4QJ.js";
12
+ fetchWithTransientRetry,
13
+ parsePositiveFiniteNumberOrFallback
14
+ } from "./chunk-AOTBKDRK.js";
14
15
  import {
15
16
  DRAIN_EXHAUSTED_USER_MESSAGE,
16
17
  isDrainExhaustedResponse
17
18
  } from "./chunk-3L2WKC3W.js";
18
- import {
19
- buildDialogAttachmentPlan,
20
- extractFileContentIds
21
- } from "./chunk-3BMYXEUW.js";
22
19
  import {
23
20
  isLevelLockError
24
21
  } from "./chunk-URMS4XY2.js";
@@ -26,11 +23,18 @@ import {
26
23
  resolveLocalDialogDbCandidates,
27
24
  resolveServerDbPath
28
25
  } from "./chunk-GLKOYSRU.js";
26
+ import {
27
+ buildDialogAttachmentPlan,
28
+ extractFileContentIds
29
+ } from "./chunk-6O4IK4V2.js";
29
30
  import {
30
31
  boundSummaryText,
31
32
  buildDialogReadEnvelope,
32
33
  projectDialogReadForAgent
33
- } from "./chunk-IIVGDG4I.js";
34
+ } from "./chunk-4YSOUKUR.js";
35
+ import {
36
+ asRecordOrEmpty
37
+ } from "./chunk-KX6YBIHG.js";
34
38
  import {
35
39
  toErrorMessage
36
40
  } from "./chunk-HNMXYYJR.js";
@@ -43,24 +47,18 @@ import {
43
47
  resolveServerUrl
44
48
  } from "./chunk-A7GB5UGH.js";
45
49
  import {
46
- parsePositiveFiniteNumberOrFallback
47
- } from "./chunk-Y5GCAMGP.js";
48
- import {
49
- asRecordOrEmpty
50
- } from "./chunk-KX6YBIHG.js";
50
+ isRecord
51
+ } from "./chunk-KUG52IAP.js";
51
52
  import {
52
53
  asNonEmptyStringArray,
53
54
  asTrimmedNonEmptyStringArray
54
- } from "./chunk-VMFTFOWF.js";
55
+ } from "./chunk-3AH7LNUB.js";
55
56
  import {
56
57
  createClientLogger
57
- } from "./chunk-QOKAKDPE.js";
58
+ } from "./chunk-HIM3FCLF.js";
58
59
  import {
59
60
  isLevelNotFoundError
60
61
  } from "./chunk-OW765XBU.js";
61
- import {
62
- isRecord
63
- } from "./chunk-KUG52IAP.js";
64
62
  import {
65
63
  asTrimmedString
66
64
  } from "./chunk-3EUW3WEO.js";
@@ -725,7 +723,7 @@ function isExplicitDialogIdMismatch(meta, dialogId) {
725
723
  return meta && typeof meta === "object" && "id" in meta && meta.id != null && String(meta.id) !== dialogId;
726
724
  }
727
725
  async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
728
- const reader = readLocalDialog ?? (await import("./localDialogRead-BTFJ4V2I.js")).readDialogFromLocalDb;
726
+ const reader = readLocalDialog ?? (await import("./localDialogRead-ZHZ3KXDM.js")).readDialogFromLocalDb;
729
727
  const result = await reader({ dialogKey, dialogId, limit });
730
728
  return {
731
729
  ...result,
@@ -742,7 +740,7 @@ async function readLocalDialogAtDbPathDefault(args) {
742
740
  const [{ Level }, { safeJsonEncoding }, { fetchMessages }] = await Promise.all([
743
741
  import("./levelLazyShim-GZBKODGI.js"),
744
742
  import("./serverStoreFactory-YMXDF4NI.js"),
745
- import("./fetchMessages-EIU7UFFK.js")
743
+ import("./fetchMessages-I5ICDDHM.js")
746
744
  ]);
747
745
  const db = new Level(args.dbPath, {
748
746
  valueEncoding: safeJsonEncoding,
@@ -4,7 +4,7 @@ import {
4
4
 
5
5
  // packages/cli/agentCommandSupport.ts
6
6
  async function getDefaultCliDb() {
7
- const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-SYQGUF4U.js");
7
+ const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-VKWVOPPI.js");
8
8
  return getDefaultCliLocalRuntimeDb();
9
9
  }
10
10
  function createNullCliDb() {