nolo-cli 0.54.0 → 0.61.0-alpha.3

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 (158) hide show
  1. package/README.md +3 -3
  2. package/{_executeModel-OPTKYHJA.js → _executeModel-R26QYY66.js} +50 -46
  3. package/{action-ORXWW2ZG.js → action-76JX3JX3.js} +7 -6
  4. package/{addContentAction-53BZ34AE.js → addContentAction-V3NAZRTJ.js} +6 -5
  5. package/{addDialogAgentAction-JRYUS54Y.js → addDialogAgentAction-RZOAF46K.js} +5 -4
  6. package/{agentDeleteCommand-FJIWU2BS.js → agentDeleteCommand-6GNQA4J4.js} +30 -27
  7. package/{agentEmailCommands-CE32L43B.js → agentEmailCommands-HH67CYKD.js} +61 -57
  8. package/{agentGrantCommands-2LEZDADN.js → agentGrantCommands-R3VQEZJR.js} +1 -1
  9. package/{agentListCommands-VJNKULIK.js → agentListCommands-23XW3OPZ.js} +61 -31
  10. package/{agentMachineCommands-HCJ3WQXL.js → agentMachineCommands-HXHASEWO.js} +31 -28
  11. package/{agentPullCommand-M552CYSI.js → agentPullCommand-N7L2CT7L.js} +2 -2
  12. package/{agentRecordCommands-QFWERED4.js → agentRecordCommands-UHTQJVGC.js} +59 -55
  13. package/{agentRunCommand-G3GQMUNN.js → agentRunCommand-OAMT77EX.js} +63 -59
  14. package/{agentRunControl-INKFDXDA.js → agentRunControl-WECMOO6O.js} +11 -6
  15. package/{agentRuntimeLocal-K327ELSL.js → agentRuntimeLocal-QBK4H3T2.js} +26 -23
  16. package/{agentSlice-ODKF4J6M.js → agentSlice-7XJH5WQF.js} +8 -7
  17. package/{appDeleteCommands-XUXMFDI4.js → appDeleteCommands-AX2O6VDV.js} +30 -27
  18. package/{appDeployCommands-37F4GPCU.js → appDeployCommands-L5ZR26CB.js} +30 -27
  19. package/{appDeployStatusCommands-WSPU7TUK.js → appDeployStatusCommands-5HQHELRA.js} +30 -27
  20. package/{appGetCommands-YLOBA3EM.js → appGetCommands-HVSYOS57.js} +30 -27
  21. package/{appListCommands-UD62R5ME.js → appListCommands-XV2FPTWX.js} +30 -27
  22. package/{authCommand-OK6HLHGS.js → authCommand-WOTWLJNF.js} +35 -29
  23. package/{authCommands-2DUIUEMT.js → authCommands-ILTBI6JV.js} +7 -5
  24. package/{chatQueueReduxAdapter-TV2TUOQS.js → chatQueueReduxAdapter-F3R253JE.js} +20 -18
  25. package/{chunk-HPW5MNDQ.js → chunk-22BTGNSP.js} +113 -57
  26. package/{chunk-UNZDCI3O.js → chunk-2KDR4CWE.js} +35 -4
  27. package/{chunk-3ZTR7ZO4.js → chunk-2PGGC63K.js} +1 -1
  28. package/{chunk-EA5OYZVD.js → chunk-37XDGCY7.js} +1 -1
  29. package/chunk-3BLB7QKO.js +433 -0
  30. package/{chunk-CS6TCJ7E.js → chunk-3JQ2NRYU.js} +30 -7
  31. package/{chunk-3LKZRP7E.js → chunk-3QGUVVX5.js} +2 -2
  32. package/{chunk-SSXTSPSG.js → chunk-45YO6H7P.js} +71 -30
  33. package/{chunk-YLCUU3WM.js → chunk-4NJEIGBQ.js} +5 -5
  34. package/{chunk-K4NISKOR.js → chunk-5ZYA4JJ3.js} +47 -17
  35. package/{chunk-6HIGYUBQ.js → chunk-6XIE5ZGI.js} +1 -1
  36. package/{chunk-3Y2K5O2R.js → chunk-7A3RRUCQ.js} +125 -40
  37. package/{chunk-6COJEAYH.js → chunk-7KELZLC2.js} +44 -37
  38. package/chunk-AETZ7AD6.js +274 -0
  39. package/chunk-BFU6C242.js +66 -0
  40. package/{chunk-IA3A5373.js → chunk-C3FZR5EC.js} +1 -1
  41. package/{chunk-IWUMSAQF.js → chunk-CJCJF5XB.js} +26 -3
  42. package/{chunk-UGBHDMHI.js → chunk-CP7VIDZ7.js} +1 -1
  43. package/{chunk-TR4DXUYX.js → chunk-CQ2OZMLQ.js} +1181 -737
  44. package/{chunk-JON2PHYT.js → chunk-CTCW7U7N.js} +1 -1
  45. package/{chunk-7NYDJAQ7.js → chunk-DNNSCSA2.js} +5 -5
  46. package/{chunk-NI2BS6UD.js → chunk-DWUCB2A3.js} +1 -1
  47. package/{chunk-FJHMLRDQ.js → chunk-DWYSDNOH.js} +22 -28
  48. package/{chunk-AA564GBL.js → chunk-E3YVTQWT.js} +2 -2
  49. package/chunk-E4MARS3Q.js +114 -0
  50. package/{chunk-75MSWWUE.js → chunk-E6RGHPDR.js} +5 -3
  51. package/chunk-EDKF7RX4.js +30 -0
  52. package/{chunk-TC6P4NDR.js → chunk-F44FAXP2.js} +6 -6
  53. package/{chunk-SYYUU7EV.js → chunk-FHAGENAS.js} +2 -3
  54. package/{chunk-NJUQBYFJ.js → chunk-FKFMIBTT.js} +3 -1
  55. package/{chunk-INZZJSQF.js → chunk-FZGV4FGK.js} +24 -12
  56. package/{chunk-6HDYSFLO.js → chunk-GSXDRMDO.js} +3 -3
  57. package/{chunk-AUVFJGPC.js → chunk-JX5PJCWS.js} +7 -5
  58. package/{chunk-LYGNQHUW.js → chunk-JYYZCK2Z.js} +2 -4
  59. package/{chunk-EY7V7REW.js → chunk-KHCLMKZZ.js} +6 -280
  60. package/{chunk-EJE33XNR.js → chunk-KSCXMC6U.js} +1521 -565
  61. package/{chunk-XOJRZUPF.js → chunk-KWSQR2KK.js} +14 -29
  62. package/{chunk-2WBFJHQA.js → chunk-L7B47JXR.js} +34 -39
  63. package/{chunk-EICIFHVS.js → chunk-LAFC3B2I.js} +1 -1
  64. package/{chunk-N4JKMCY3.js → chunk-LJKICKVC.js} +2 -2
  65. package/chunk-M3JEW6N6.js +193 -0
  66. package/{chunk-LRGKOI5Y.js → chunk-MBOEV4L2.js} +7 -3
  67. package/{chunk-SVDMVX4G.js → chunk-MMZ6ZTVO.js} +112 -73
  68. package/{chunk-JDSUTNYY.js → chunk-MP64VFGD.js} +2 -2
  69. package/{chunk-NFLA6GSU.js → chunk-MXUDQZXQ.js} +44 -5
  70. package/chunk-N4G4PKQ6.js +23 -0
  71. package/{chunk-WQHGJHAL.js → chunk-N6HLMLKE.js} +732 -726
  72. package/{chunk-YQBXOHE6.js → chunk-NO42UD73.js} +1 -1
  73. package/{chunk-MLEZPE3U.js → chunk-NRRPKMM7.js} +4 -4
  74. package/{chunk-KXKQO4Q6.js → chunk-NTW5GWDM.js} +58 -1
  75. package/chunk-ONXOABJR.js +215 -0
  76. package/{chunk-TY3ADTX5.js → chunk-OZX2IPKM.js} +7 -2
  77. package/{chunk-Q4XZVZPN.js → chunk-P7OOB7QP.js} +1 -1
  78. package/{chunk-XIJZOCSP.js → chunk-PEZJEQAO.js} +1 -1
  79. package/{chunk-SWJGJMTW.js → chunk-PQDIDWGX.js} +1 -1
  80. package/chunk-PSCNXBYA.js +11 -0
  81. package/{chunk-BY2FF2C4.js → chunk-QEFJJS2I.js} +55 -73
  82. package/{chunk-BG7J6Y5X.js → chunk-QEW2MFDQ.js} +1 -1
  83. package/{chunk-KLIBF3BY.js → chunk-RDBARW6T.js} +8 -3
  84. package/{chunk-ZVOHVJI3.js → chunk-RJ2SAFB5.js} +82 -35
  85. package/{chunk-MYMBBB6Q.js → chunk-RVWRKFUB.js} +5 -3
  86. package/{chunk-43CXXVJD.js → chunk-RXX4GDIH.js} +1 -1
  87. package/chunk-SEJ5OS6F.js +49 -0
  88. package/{chunk-JXIP6ZWH.js → chunk-SKIRVYEI.js} +18 -5
  89. package/{chunk-SAJSBPI2.js → chunk-SOJM57FX.js} +5 -2
  90. package/{chunk-EKLRRZIN.js → chunk-SPAQ4PVV.js} +0 -5
  91. package/{chunk-RHMDMTDK.js → chunk-SYNKICCB.js} +2 -2
  92. package/{chunk-YBFJQC2M.js → chunk-TBHAHL33.js} +65 -42
  93. package/{chunk-L7NG2M6H.js → chunk-TRV2MIDW.js} +89 -74
  94. package/{chunk-5UAYZEXO.js → chunk-UZPQSVM6.js} +1 -1
  95. package/{chunk-7FAS3NEF.js → chunk-VAKVNHK5.js} +19 -15
  96. package/{chunk-UOWXD4VN.js → chunk-VHO3TMQZ.js} +336 -244
  97. package/{chunk-SVC3GGUA.js → chunk-VMWYBIXG.js} +7 -5
  98. package/{chunk-ZHXJ6M7T.js → chunk-W7XHHYWM.js} +4 -0
  99. package/{chunk-UR66XPVF.js → chunk-XAVSS3KE.js} +21 -3
  100. package/{chunk-A65UV3M5.js → chunk-XOKOSO35.js} +10 -19
  101. package/{chunk-VZMUOPYG.js → chunk-XTJTN3RW.js} +46 -3
  102. package/{chunk-T5HJEUQN.js → chunk-YCDWJX45.js} +1 -1
  103. package/{chunk-BBTN4NQD.js → chunk-Z4QSJILV.js} +85 -13
  104. package/{chunk-5FCIPEKT.js → chunk-Z5MHFBJZ.js} +1051 -926
  105. package/{chunk-O5FLGN2L.js → chunk-ZRSJ3JEH.js} +6 -2
  106. package/{cliExecutor-BBUVQU4L.js → cliExecutor-HG3S345O.js} +1 -1
  107. package/{codingSkills-BCQXRZOI.js → codingSkills-TKROLCBA.js} +4 -3
  108. package/{contentThunks-KNI6VXLT.js → contentThunks-OZPK5B4Z.js} +21 -19
  109. package/{cooldownCommands-GI5NNWGL.js → cooldownCommands-BSCH2W7P.js} +2 -2
  110. package/{createAgentAutomationAction-OK4L33KF.js → createAgentAutomationAction-LCIBGE5T.js} +23 -21
  111. package/{createDialogAction-JDSMY4AY.js → createDialogAction-JPJZMHJE.js} +25 -22
  112. package/{createPageAction-T7RA3HCG.js → createPageAction-6P2WLNHO.js} +26 -23
  113. package/{dbSlice-TVX6SN2T.js → dbSlice-IBVOBVMS.js} +5 -4
  114. package/{deleteFile-JYKRT7C3.js → deleteFile-FWP2PSBG.js} +3 -2
  115. package/{dialogCommands-UQZYWOOV.js → dialogCommands-WAFKC3KK.js} +30 -27
  116. package/{dialogSlice-TYW2G7IL.js → dialogSlice-R5RZHFTU.js} +20 -18
  117. package/{docCreateCommands-OA6HZBWO.js → docCreateCommands-GHGB42S7.js} +32 -28
  118. package/{docDeleteCommands-KBB3YQI2.js → docDeleteCommands-Y5I7ZEX4.js} +33 -29
  119. package/{docReadCommands-ZLMFVC67.js → docReadCommands-BMXM6J7T.js} +32 -28
  120. package/{docStore-2URPBVCS.js → docStore-DKWZ6XJ5.js} +6 -5
  121. package/{docUpdateCommands-HMH5KUON.js → docUpdateCommands-QNABH3M2.js} +32 -28
  122. package/{getPricing-RFOPUWHY.js → getPricing-NM3NUTAS.js} +4 -4
  123. package/handleSendMessageAction-UQGKM4UX.js +675 -0
  124. package/index.js +79 -88
  125. package/{lib-2ZTNRXR4.js → lib-FRRS27KN.js} +63 -28
  126. package/{localRuntimeAuthority-KQDAE64E.js → localRuntimeAuthority-R5UBODT3.js} +6 -4
  127. package/{localRuntimeDb-PF7CFKDL.js → localRuntimeDb-P37ZTX55.js} +1 -1
  128. package/{machineCommands-RK6L7ZWL.js → machineCommands-YDAIPYU5.js} +298 -80
  129. package/{machineWsRunDispatch-3X64DW2Z.js → machineWsRunDispatch-O6RM2ECT.js} +57 -53
  130. package/{memberThunks-THZYZFSN.js → memberThunks-VZI6G7YZ.js} +10 -8
  131. package/{models-JVKUEER5.js → models-FAMINFZ7.js} +2 -2
  132. package/package.json +3 -2
  133. package/{read-K4JU4MQC.js → read-2BYWW7AA.js} +3 -2
  134. package/{readDocTool-LQGR6FUN.js → readDocTool-LC3A7QTB.js} +1 -1
  135. package/{readlineWorkspace-XUFJV3RS.js → readlineWorkspace-5DP3AJWN.js} +4367 -2796
  136. package/{removeDialogAgentAction-ECHCFB7N.js → removeDialogAgentAction-SFYZXHNK.js} +8 -7
  137. package/{runAgentClientLoop-24GQ2AW6.js → runAgentClientLoop-Y6HWP2PT.js} +51 -46
  138. package/{runtimeDoctorCommands-JKTTN723.js → runtimeDoctorCommands-CROTMULY.js} +7 -5
  139. package/{setDialogExtraReferencesAction-KCVJNGMB.js → setDialogExtraReferencesAction-Q32RGFTA.js} +6 -5
  140. package/{setPrimaryDialogAgentAction-VDOBOMKC.js → setPrimaryDialogAgentAction-BFYJHUJS.js} +8 -7
  141. package/{settingSlice-VR2IJSXC.js → settingSlice-IRUU4VFB.js} +6 -5
  142. package/{skillDiscovery-2QTZINON.js → skillDiscovery-CYUCJMAG.js} +2 -1
  143. package/{spaceCommands-S5YJJXL7.js → spaceCommands-CLN45IE3.js} +33 -215
  144. package/{streamAgentChatTurn-QHKP3ABO.js → streamAgentChatTurn-6WFQJ4DY.js} +107 -74
  145. package/{switchDialogAgentAction-5L4UP7VI.js → switchDialogAgentAction-L2KOKCGG.js} +5 -4
  146. package/{tableCommands-R6WFRDYF.js → tableCommands-SUNTHAYX.js} +1 -1
  147. package/{toolApiClient-53U4UDFF.js → toolApiClient-VGYUB4P5.js} +2 -1
  148. package/{tools-SSXSTC3O.js → tools-RR53D65Q.js} +39 -35
  149. package/{tuiSummaryLlmCaller-URFJHFC5.js → tuiSummaryLlmCaller-F3DPFFZM.js} +15 -13
  150. package/{updateCommands-IYKLF3JX.js → updateCommands-AJYSD73Y.js} +2 -2
  151. package/{updateDialogTitleAction-YFYAEW3T.js → updateDialogTitleAction-WXS3AKOL.js} +23 -21
  152. package/agentSuperviseCommands-5AR3DKNN.js +0 -640
  153. package/chunk-6IGD47IC.js +0 -19
  154. package/chunk-FD36SCCD.js +0 -105
  155. package/chunk-GRFK2XP4.js +0 -230
  156. package/chunk-HJTAGT3W.js +0 -370
  157. package/chunk-SUEIAK5N.js +0 -2574
  158. package/handleSendMessageAction-GO53TY7U.js +0 -409
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-AGGIDPCZ.js";
14
14
  import {
15
15
  runLlm
16
- } from "./chunk-TC6P4NDR.js";
16
+ } from "./chunk-F44FAXP2.js";
17
17
  import {
18
18
  cleanupCliSessionForDialog
19
- } from "./chunk-YLCUU3WM.js";
19
+ } from "./chunk-4NJEIGBQ.js";
20
20
  import {
21
21
  getActiveDialogAgentId,
22
22
  getDialogAgentIds,
@@ -55,23 +55,26 @@ import {
55
55
  readCacheCreationInputTokens,
56
56
  readCacheReadInputTokens,
57
57
  resolveAutoExecutionProfile
58
- } from "./chunk-K4NISKOR.js";
58
+ } from "./chunk-5ZYA4JJ3.js";
59
59
  import {
60
60
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
61
61
  buildCompactionMetricsFromPlan,
62
62
  buildCompactionUserContent,
63
- estimateTokenCount,
64
63
  formatCompactionMetricsLog,
65
64
  formatFileOperationsFromMessages,
66
65
  formatMessagesForSummaryWithTruncation,
67
66
  normalizeAssistantContentBuffer,
67
+ normalizeTimingMs,
68
68
  planCompression,
69
69
  serializeMessageContent
70
- } from "./chunk-BBTN4NQD.js";
70
+ } from "./chunk-Z4QSJILV.js";
71
+ import {
72
+ estimateTokenCount
73
+ } from "./chunk-PSCNXBYA.js";
71
74
  import {
72
75
  findModelConfig,
73
76
  getModelConfig
74
- } from "./chunk-SVDMVX4G.js";
77
+ } from "./chunk-MMZ6ZTVO.js";
75
78
  import {
76
79
  toErrorMessage
77
80
  } from "./chunk-HNMXYYJR.js";
@@ -79,6 +82,7 @@ import {
79
82
  fetchMessages
80
83
  } from "./chunk-BYEJ7K2Z.js";
81
84
  import {
85
+ PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
82
86
  PLATFORM_HOSTED_GLM_53_FLASH_BASETEN_PRICE,
83
87
  PLATFORM_HOSTED_GLM_53_FLASH_MODEL,
84
88
  getPlatformHostedDeepSeekV4Price,
@@ -86,10 +90,10 @@ import {
86
90
  isPlatformHostedDeepSeekV4Model,
87
91
  isPlatformHostedImageModel,
88
92
  isPlatformHostedOpenAIImageModel
89
- } from "./chunk-HPW5MNDQ.js";
93
+ } from "./chunk-22BTGNSP.js";
90
94
  import {
91
95
  nolotusId
92
- } from "./chunk-SVC3GGUA.js";
96
+ } from "./chunk-VMWYBIXG.js";
93
97
  import {
94
98
  asRecordOrEmpty
95
99
  } from "./chunk-KX6YBIHG.js";
@@ -99,7 +103,7 @@ import {
99
103
  remove,
100
104
  selectById,
101
105
  write
102
- } from "./chunk-7NYDJAQ7.js";
106
+ } from "./chunk-DNNSCSA2.js";
103
107
  import {
104
108
  buildDialogAgentListIndexDeleteOps,
105
109
  createDialogMessageKeyAndId,
@@ -124,7 +128,7 @@ import {
124
128
  builtinAgentCatalogEntryById,
125
129
  builtinRuntimeFallbackEntries,
126
130
  isBuiltinPlatformAgentKey
127
- } from "./chunk-2WBFJHQA.js";
131
+ } from "./chunk-L7B47JXR.js";
128
132
  import {
129
133
  extractCustomId,
130
134
  extractUserId,
@@ -139,13 +143,17 @@ import {
139
143
  createSelector,
140
144
  getRuntimeServerContext,
141
145
  parseOwnerUserIdFromDbKey,
142
- scheduleDeleteReplication,
143
- selectIdentityUserId
144
- } from "./chunk-XOJRZUPF.js";
146
+ scheduleDeleteReplication
147
+ } from "./chunk-KWSQR2KK.js";
145
148
  import {
146
149
  createClientLogger,
147
150
  isAbortError
148
151
  } from "./chunk-QOKAKDPE.js";
152
+ import {
153
+ selectIdentityToken,
154
+ selectIdentityUser,
155
+ selectIdentityUserId
156
+ } from "./chunk-SEJ5OS6F.js";
149
157
  import {
150
158
  isTombstoneRecord,
151
159
  shouldReplaceWithNextRecord
@@ -206,7 +214,7 @@ var addReferenceKeysAction = createAsyncThunk(
206
214
  // packages/chat/messages/toolPresentation.ts
207
215
  var SUMMARY_EMOJI_PREFIX = new RegExp("^(\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\[[vx!]\\])\\s*", "u");
208
216
 
209
- // packages/chat/messages/web/assistantReplyPendingState.ts
217
+ // packages/chat/messages/assistantMessageFacts.ts
210
218
  var isAssistantToolStub = (msg) => msg?.role === "assistant" && (msg.content == null || typeof msg.content === "string" && msg.content.trim().length === 0 || Array.isArray(msg.content) && msg.content.length === 0) && Array.isArray(msg?.tool_calls) && msg.tool_calls.length > 0;
211
219
 
212
220
  // packages/chat/messages/messageDeleteCascade.ts
@@ -1176,6 +1184,12 @@ function applyMessageStreamingUpsert(existing, chunk) {
1176
1184
  ...chunk
1177
1185
  };
1178
1186
  merged.isStreaming = true;
1187
+ if (existing && existing.role === "assistant" && merged.role === "assistant" && typeof existing.content === "string" && existing.content.length > 0 && typeof merged.content === "string" && merged.content.length < existing.content.length && existing.content.startsWith(merged.content)) {
1188
+ merged.content = existing.content;
1189
+ }
1190
+ if (existing && existing.role === "assistant" && merged.role === "assistant" && typeof existing.thinkContent === "string" && existing.thinkContent.length > 0 && typeof merged.thinkContent === "string" && merged.thinkContent.length < existing.thinkContent.length && existing.thinkContent.startsWith(merged.thinkContent)) {
1191
+ merged.thinkContent = existing.thinkContent;
1192
+ }
1179
1193
  return merged;
1180
1194
  }
1181
1195
 
@@ -1930,7 +1944,7 @@ async function captureUnderstandingFromCompletedUiTurn(input) {
1930
1944
  const latestUserInput = getLatestUserInputFromMessages(input.messages);
1931
1945
  if (!latestUserInput) return;
1932
1946
  const state = input.state;
1933
- const token = typeof state?.auth?.currentToken === "string" ? state.auth.currentToken : null;
1947
+ const token = selectIdentityToken(state) ?? null;
1934
1948
  const baseUrl = resolveMemoryCaptureBaseUrl(state);
1935
1949
  if (!token || !baseUrl) return;
1936
1950
  const dialog = input.dialogKey ? selectById(state, input.dialogKey) : void 0;
@@ -2872,7 +2886,7 @@ var messageSlice = createSliceWithThunks({
2872
2886
  runtimeOptions: args.runtimeOptions
2873
2887
  });
2874
2888
  if (agentKeyToUse) {
2875
- const { streamAgentChatTurn } = await import("./agentSlice-ODKF4J6M.js");
2889
+ const { streamAgentChatTurn } = await import("./agentSlice-7XJH5WQF.js");
2876
2890
  await dispatch(
2877
2891
  streamAgentChatTurn({
2878
2892
  agentKey: agentKeyToUse,
@@ -3052,10 +3066,6 @@ var saveTokenRecord = async (tokenData, record, thunkApi, callId) => {
3052
3066
  }
3053
3067
  };
3054
3068
 
3055
- // packages/identity/actions.local.ts
3056
- var NOOP_ACTION = { type: "identity/noop" };
3057
- var deductBalance = (_amount) => NOOP_ACTION;
3058
-
3059
3069
  // packages/ai/token/calculatePrice.ts
3060
3070
  var sanitizeCost = (raw) => {
3061
3071
  const rounded = Number(raw.toFixed(6));
@@ -3379,7 +3389,7 @@ var calculatePrice = ({
3379
3389
  return { cost: sanitizeCost(adjusted.charge), pay: pay3 };
3380
3390
  }
3381
3391
  if ((provider === "nolo" || provider === "deepseek") && isPlatformHostedDeepSeekV4Model(modelName)) {
3382
- const hostedModel = getModelConfig("nolo", modelName);
3392
+ const hostedModel = getModelConfig("nolo", PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL);
3383
3393
  const costs3 = calculateBasicCost(
3384
3394
  hostedModel,
3385
3395
  usage,
@@ -3500,6 +3510,12 @@ var normalizeUsage = (usage) => {
3500
3510
  const providerRequestIds = normalizeStringArray(
3501
3511
  usage.provider_request_ids
3502
3512
  );
3513
+ const firstOutputMs = normalizeTimingMs(
3514
+ readFiniteNumberField(usage, "firstOutputMs") ?? readFiniteNumberField(usage, "firstTokenMs")
3515
+ );
3516
+ const callDurationMs = normalizeTimingMs(
3517
+ readFiniteNumberField(usage, "callDurationMs") ?? readFiniteNumberField(usage, "durationMs")
3518
+ );
3503
3519
  return {
3504
3520
  input_tokens: inputTokens,
3505
3521
  output_tokens: outputTokens,
@@ -3516,7 +3532,9 @@ var normalizeUsage = (usage) => {
3516
3532
  ...billingEstimated ? { billing_estimated: true } : {},
3517
3533
  ...serverBilled ? { server_billed: true } : {},
3518
3534
  ...providerCallId ? { provider_call_id: providerCallId } : {},
3519
- ...xaiTicks !== void 0 ? { cost_in_usd_ticks: xaiTicks } : {}
3535
+ ...xaiTicks !== void 0 ? { cost_in_usd_ticks: xaiTicks } : {},
3536
+ ...firstOutputMs !== void 0 ? { firstOutputMs } : {},
3537
+ ...callDurationMs !== void 0 ? { callDurationMs } : {}
3520
3538
  };
3521
3539
  };
3522
3540
 
@@ -3562,7 +3580,16 @@ function resolveTokenUsagePricing(args) {
3562
3580
  const billedProvider = billingTarget.provider;
3563
3581
  const billedModel = billingTarget.model;
3564
3582
  const billedServiceTier = billingTarget.serviceTier;
3565
- const hasExternalPrice = agentConfig.inputPrice !== void 0 && agentConfig.inputPrice > 0 || agentConfig.outputPrice !== void 0 && agentConfig.outputPrice > 0;
3583
+ const canonicalAgentId = args.agentId?.trim();
3584
+ const isCodeOwnedBuiltin = isBuiltinPlatformAgentKey(canonicalAgentId);
3585
+ const isPlatformBilled = agentConfig.apiSource === "platform";
3586
+ const hasPersistedPrices = agentConfig.inputPrice !== void 0 && agentConfig.inputPrice > 0 || agentConfig.outputPrice !== void 0 && agentConfig.outputPrice > 0;
3587
+ if (isPlatformBilled && !isCodeOwnedBuiltin && hasPersistedPrices) {
3588
+ console.warn(
3589
+ `[billing] platform agent ignored persisted prices (input=${agentConfig.inputPrice}, output=${agentConfig.outputPrice}); canonical key missing or not in builtin set: "${canonicalAgentId || ""}"`
3590
+ );
3591
+ }
3592
+ const hasExternalPrice = !isCodeOwnedBuiltin && !isPlatformBilled && hasPersistedPrices;
3566
3593
  const { cost, pay } = calculatePrice({
3567
3594
  provider: billedProvider,
3568
3595
  modelName: billedModel,
@@ -3624,14 +3651,10 @@ var prepareTokenUsageData = ({
3624
3651
  entry_path
3625
3652
  }) => {
3626
3653
  const resolvedAgentId = typeof agentId === "string" && agentId.trim() || typeof cybotId === "string" && cybotId.trim() || "";
3627
- if (!resolvedAgentId) {
3628
- throw new Error(
3629
- "prepareTokenUsageData requires a non-empty agentId or cybotId"
3630
- );
3631
- }
3632
3654
  const { usage, billedProvider, billedModel, billedServiceTier, cost, pay, hasExternalPrice } = resolveTokenUsagePricing({
3633
3655
  rawUsage,
3634
3656
  agentConfig,
3657
+ agentId: resolvedAgentId,
3635
3658
  nowMs: timestamp
3636
3659
  });
3637
3660
  const recordProvider = billedProvider ?? agentConfig.provider ?? "unknown";
@@ -3930,7 +3953,7 @@ var saveTokenUsage = async (data, thunkApi) => {
3930
3953
  };
3931
3954
  var updateTokensAction = async ({ dialogId, dialogKey, usage: legacyUsage, usageRecord, agentConfig }, thunkApi) => {
3932
3955
  const state = thunkApi.getState();
3933
- const { currentUser } = state.auth;
3956
+ const currentUser = selectIdentityUser(state);
3934
3957
  const dialogConfig = dialogKey ? selectById(state, dialogKey) : null;
3935
3958
  const dialogConfigUserId = dialogConfig?.userId;
3936
3959
  const ownerUserId = resolveMessageOwner({
@@ -3990,7 +4013,7 @@ var updateTokensAction = async ({ dialogId, dialogKey, usage: legacyUsage, usage
3990
4013
  }
3991
4014
  await saveTokenUsage(persistedTokenData, thunkApi);
3992
4015
  if (persistedTokenData.billable === true || persistedTokenData.billable === void 0 && result.cost > 0) {
3993
- thunkApi.dispatch(deductBalance(result.cost));
4016
+ thunkApi.extra?.accountSession?.deductBalance(result.cost);
3994
4017
  }
3995
4018
  if (dialogKey) {
3996
4019
  await queueDialogTokenPatch(dialogKey, async () => {
@@ -4103,7 +4126,7 @@ var deleteOwnedDialogAttachments = async (args) => {
4103
4126
  metadataReadFailures
4104
4127
  });
4105
4128
  if (!plan.deleteCandidates.length) return plan;
4106
- const { deleteFileAction } = await import("./deleteFile-JYKRT7C3.js");
4129
+ const { deleteFileAction } = await import("./deleteFile-FWP2PSBG.js");
4107
4130
  for (const candidate of plan.deleteCandidates) {
4108
4131
  if (candidate.fileDbKey) {
4109
4132
  await deleteFileAction(candidate.fileDbKey, args.thunkApi);
@@ -4165,7 +4188,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4165
4188
  }
4166
4189
  if (isCurrentDialog) {
4167
4190
  await thunkApi.dispatch(resetMsgs());
4168
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-TYW2G7IL.js");
4191
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-R5RZHFTU.js");
4169
4192
  dispatch(clearPendingAttachments2());
4170
4193
  }
4171
4194
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -4173,39 +4196,39 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4173
4196
 
4174
4197
  // packages/chat/dialog/dialogSlice.ts
4175
4198
  var runCreateDialogAction = async (args, thunkApi) => {
4176
- const { createDialogAction } = await import("./createDialogAction-JDSMY4AY.js");
4199
+ const { createDialogAction } = await import("./createDialogAction-JPJZMHJE.js");
4177
4200
  return createDialogAction(args, thunkApi);
4178
4201
  };
4179
4202
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
4180
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-OK4L33KF.js");
4203
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-LCIBGE5T.js");
4181
4204
  return createAgentAutomationAction(args, thunkApi);
4182
4205
  };
4183
4206
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
4184
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-YFYAEW3T.js");
4207
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-WXS3AKOL.js");
4185
4208
  return updateDialogTitleAction(args, thunkApi);
4186
4209
  };
4187
4210
  var runAddDialogAgentAction = async (args, thunkApi) => {
4188
- const { addDialogAgentAction } = await import("./addDialogAgentAction-JRYUS54Y.js");
4211
+ const { addDialogAgentAction } = await import("./addDialogAgentAction-RZOAF46K.js");
4189
4212
  return addDialogAgentAction(args, thunkApi);
4190
4213
  };
4191
4214
  var runRemoveDialogAgentAction = async (args, thunkApi) => {
4192
- const { removeDialogAgentAction } = await import("./removeDialogAgentAction-ECHCFB7N.js");
4215
+ const { removeDialogAgentAction } = await import("./removeDialogAgentAction-SFYZXHNK.js");
4193
4216
  return removeDialogAgentAction(args, thunkApi);
4194
4217
  };
4195
4218
  var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
4196
- const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-VDOBOMKC.js");
4219
+ const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-BFYJHUJS.js");
4197
4220
  return setPrimaryDialogAgentAction(args, thunkApi);
4198
4221
  };
4199
4222
  var runSwitchDialogAgentAction = async (args, thunkApi) => {
4200
- const { switchDialogAgentAction } = await import("./switchDialogAgentAction-5L4UP7VI.js");
4223
+ const { switchDialogAgentAction } = await import("./switchDialogAgentAction-L2KOKCGG.js");
4201
4224
  return switchDialogAgentAction(args, thunkApi);
4202
4225
  };
4203
4226
  var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
4204
- const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-KCVJNGMB.js");
4227
+ const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-Q32RGFTA.js");
4205
4228
  return setDialogExtraReferencesAction(args, thunkApi);
4206
4229
  };
4207
4230
  var runHandleSendMessageAction = async (args, thunkApi) => {
4208
- const { handleSendMessageAction } = await import("./handleSendMessageAction-GO53TY7U.js");
4231
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-UQGKM4UX.js");
4209
4232
  return handleSendMessageAction(args, thunkApi);
4210
4233
  };
4211
4234
  function clearDialogState() {
@@ -4218,7 +4241,7 @@ var createPageAndAddReference = createAsyncThunk(
4218
4241
  async (payload, { dispatch, getState, rejectWithValue }) => {
4219
4242
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
4220
4243
  try {
4221
- const { createDocState } = await import("./docStore-2URPBVCS.js");
4244
+ const { createDocState } = await import("./docStore-DKWZ6XJ5.js");
4222
4245
  const pageKey = await createDocState(
4223
4246
  { slateData, title },
4224
4247
  { dispatch, getState }
@@ -1,7 +1,3 @@
1
- import {
2
- resolveNoloHome
3
- } from "./chunk-GLKOYSRU.js";
4
-
5
1
  // packages/database-engine/cliAuthorityBrokerClient.ts
6
2
  import { createConnection } from "node:net";
7
3
  var DEFAULT_ITERATOR_PAGE_SIZE = 200;
@@ -18,6 +14,20 @@ var CliAuthorityBrokerUnavailableError = class extends Error {
18
14
  }
19
15
  }
20
16
  };
17
+ var CliAuthorityBrokerTimeoutError = class extends Error {
18
+ reason = "cli_authority_broker_timeout";
19
+ endpoint;
20
+ timeoutMs;
21
+ constructor(endpoint, timeoutMs, cause) {
22
+ super(`CLI authority broker request at ${endpoint} timed out after ${timeoutMs}ms`);
23
+ this.name = "CliAuthorityBrokerTimeoutError";
24
+ this.endpoint = endpoint;
25
+ this.timeoutMs = timeoutMs;
26
+ if (cause !== void 0) {
27
+ this.cause = cause;
28
+ }
29
+ }
30
+ };
21
31
  var CliAuthorityBrokerProtocolError = class extends Error {
22
32
  code;
23
33
  retryable;
@@ -31,8 +41,30 @@ var CliAuthorityBrokerProtocolError = class extends Error {
31
41
  function isCliAuthorityBrokerUnavailableError(error) {
32
42
  return error instanceof CliAuthorityBrokerUnavailableError || typeof error === "object" && error !== null && error.reason === "cli_authority_broker_unavailable" && error.status === 503;
33
43
  }
44
+ function isCliAuthorityBrokerTimeoutError(error) {
45
+ return error instanceof CliAuthorityBrokerTimeoutError || typeof error === "object" && error !== null && error.reason === "cli_authority_broker_timeout";
46
+ }
34
47
  function isCliAuthorityBrokerProtocolError(error) {
35
- return error instanceof CliAuthorityBrokerProtocolError;
48
+ return error instanceof CliAuthorityBrokerProtocolError || typeof error === "object" && error !== null && error.name === "CliAuthorityBrokerProtocolError";
49
+ }
50
+ function isBrokerUnavailableCause(error) {
51
+ if (!error) return false;
52
+ if (isCliAuthorityBrokerTimeoutError(error) || isCliAuthorityBrokerProtocolError(error)) {
53
+ return false;
54
+ }
55
+ if (isCliAuthorityBrokerUnavailableError(error)) {
56
+ return true;
57
+ }
58
+ if (typeof error === "object") {
59
+ const code = error.code;
60
+ if (typeof code === "string" && /^(ECONNREFUSED|ENOENT|ECONNRESET|EPIPE|EADDRNOTAVAIL|ENETUNREACH|EHOSTUNREACH)$/i.test(code)) {
61
+ return true;
62
+ }
63
+ }
64
+ const message = error instanceof Error ? error.message : String(error);
65
+ if (/timed out/i.test(message)) return false;
66
+ if (/malformed response|protocol mismatch/i.test(message)) return false;
67
+ return /ECONNREFUSED|ENOENT|ECONNRESET|EPIPE|closed connection without response|returned no response/i.test(message);
36
68
  }
37
69
  function resolveBrokerSocketTarget(endpoint) {
38
70
  if (endpoint.startsWith("unix://")) {
@@ -50,6 +82,7 @@ function resolveBrokerSocketTarget(endpoint) {
50
82
  }
51
83
  function createCliAuthorityBrokerSocketInvoker(options) {
52
84
  const target = resolveBrokerSocketTarget(options.endpoint);
85
+ const timeoutMs = options.timeoutMs ?? 5e3;
53
86
  return async (request) => {
54
87
  return await new Promise((resolve, reject) => {
55
88
  const socket = target.kind === "unix" ? createConnection(target.path) : createConnection({ host: target.host, port: target.port });
@@ -58,9 +91,9 @@ function createCliAuthorityBrokerSocketInvoker(options) {
58
91
  const timeout = setTimeout(() => {
59
92
  finish(() => {
60
93
  socket.destroy();
61
- reject(new Error(`CLI authority broker request at ${options.endpoint} timed out after 5000ms`));
94
+ reject(new CliAuthorityBrokerTimeoutError(options.endpoint, timeoutMs));
62
95
  });
63
- }, 5e3);
96
+ }, timeoutMs);
64
97
  const finish = (fn) => {
65
98
  if (settled) return;
66
99
  settled = true;
@@ -79,18 +112,34 @@ function createCliAuthorityBrokerSocketInvoker(options) {
79
112
  finish(() => {
80
113
  const payload = responseBuffer.trim();
81
114
  if (!payload) {
82
- reject(new Error(`CLI authority broker at ${options.endpoint} returned no response`));
115
+ reject(
116
+ new CliAuthorityBrokerUnavailableError(
117
+ options.endpoint,
118
+ new Error(`CLI authority broker at ${options.endpoint} closed connection without response`)
119
+ )
120
+ );
83
121
  return;
84
122
  }
85
123
  try {
86
124
  resolve(JSON.parse(payload));
87
- } catch (error) {
88
- reject(error);
125
+ } catch (parseError) {
126
+ reject(
127
+ new CliAuthorityBrokerProtocolError({
128
+ code: "MALFORMED_RESPONSE",
129
+ message: `CLI authority broker at ${options.endpoint} returned malformed response: ${parseError instanceof Error ? parseError.message : String(parseError)}`
130
+ })
131
+ );
89
132
  }
90
133
  });
91
134
  });
92
135
  socket.on("error", (error) => {
93
- finish(() => reject(error));
136
+ finish(() => {
137
+ if (isBrokerUnavailableCause(error)) {
138
+ reject(new CliAuthorityBrokerUnavailableError(options.endpoint, error));
139
+ } else {
140
+ reject(error);
141
+ }
142
+ });
94
143
  });
95
144
  });
96
145
  };
@@ -98,15 +147,39 @@ function createCliAuthorityBrokerSocketInvoker(options) {
98
147
  async function invokeBrokerRequest(options, request) {
99
148
  try {
100
149
  const response = await options.invoke(request);
101
- if (response.ok) return response.result;
150
+ if (!response || typeof response !== "object" || typeof response.ok !== "boolean") {
151
+ throw new CliAuthorityBrokerProtocolError({
152
+ code: "MALFORMED_RESPONSE",
153
+ message: `CLI authority broker protocol mismatch at ${options.endpoint}`
154
+ });
155
+ }
156
+ if (response.ok) {
157
+ if (!response.result || typeof response.result !== "object") {
158
+ throw new CliAuthorityBrokerProtocolError({
159
+ code: "MALFORMED_RESPONSE",
160
+ message: `CLI authority broker protocol mismatch at ${options.endpoint}`
161
+ });
162
+ }
163
+ return response.result;
164
+ }
165
+ if (!response.error || typeof response.error !== "object" || typeof response.error.code !== "string" || typeof response.error.message !== "string") {
166
+ throw new CliAuthorityBrokerProtocolError({
167
+ code: "MALFORMED_RESPONSE",
168
+ message: `CLI authority broker protocol mismatch at ${options.endpoint}`
169
+ });
170
+ }
102
171
  if (response.error.code === "BROKER_UNAVAILABLE") {
103
172
  throw new CliAuthorityBrokerUnavailableError(options.endpoint, response.error);
104
173
  }
105
174
  throw new CliAuthorityBrokerProtocolError(response.error);
106
175
  } catch (error) {
176
+ if (isCliAuthorityBrokerTimeoutError(error)) throw error;
107
177
  if (isCliAuthorityBrokerUnavailableError(error)) throw error;
108
178
  if (isCliAuthorityBrokerProtocolError(error)) throw error;
109
- throw new CliAuthorityBrokerUnavailableError(options.endpoint, error);
179
+ if (isBrokerUnavailableCause(error)) {
180
+ throw new CliAuthorityBrokerUnavailableError(options.endpoint, error);
181
+ }
182
+ throw error;
110
183
  }
111
184
  }
112
185
  function createCliAuthorityBrokerClient(options) {
@@ -179,68 +252,10 @@ function createCliAuthorityBrokerClient(options) {
179
252
  };
180
253
  }
181
254
 
182
- // packages/database-engine/cliAuthorityStoreDriver.ts
183
- import path from "node:path";
184
- function readCliAuthorityDriver(env) {
185
- const value = env.NOLO_CLI_AUTHORITY_DRIVER?.trim();
186
- if (value === "broker") {
187
- return { driver: "broker", invalidDriver: null };
188
- }
189
- return {
190
- driver: "broker",
191
- invalidDriver: value ? value : null
192
- };
193
- }
194
- function resolveCliAuthorityRunDir(options = {}) {
195
- return path.join(resolveNoloHome({
196
- ...options,
197
- env: options.env ?? process.env
198
- }), "run");
199
- }
200
- function hashString(value) {
201
- let hash = 0;
202
- for (let index = 0; index < value.length; index += 1) {
203
- hash = (hash << 5) - hash + value.charCodeAt(index) | 0;
204
- }
205
- return Math.abs(hash);
206
- }
207
- function resolveCliAuthorityBrokerPort(options = {}) {
208
- const envPort = options.env?.NOLO_CLI_AUTHORITY_BROKER_PORT?.trim();
209
- if (envPort) {
210
- const port = Number(envPort);
211
- if (Number.isInteger(port) && port > 0 && port < 65536) return port;
212
- }
213
- const noloHome = resolveNoloHome({
214
- ...options,
215
- env: options.env ?? {}
216
- });
217
- return 47e3 + hashString(noloHome) % 2e3;
218
- }
219
- function resolveCliAuthorityStoreDriver(options = {}) {
220
- return readCliAuthorityDriver(options.env ?? {}).driver;
221
- }
222
- function resolveCliAuthorityBrokerSocketPath(options) {
223
- return path.join(resolveCliAuthorityRunDir(options), "authority-store-broker.sock");
224
- }
225
- function resolveCliAuthorityBrokerEndpoint(options) {
226
- if (options.transport === "tcp") {
227
- return `tcp://127.0.0.1:${resolveCliAuthorityBrokerPort(options)}`;
228
- }
229
- return `unix://${resolveCliAuthorityBrokerSocketPath(options)}`;
230
- }
231
- function resolveCliAuthorityBrokerMetadataPath(options) {
232
- return path.join(resolveCliAuthorityRunDir(options), "authority-store-broker.json");
233
- }
234
- function resolveCliAuthorityBrokerHealthPath(options) {
235
- return path.join(resolveCliAuthorityRunDir(options), "authority-store-broker.health.json");
236
- }
237
-
238
255
  export {
239
256
  isCliAuthorityBrokerUnavailableError,
257
+ isCliAuthorityBrokerTimeoutError,
258
+ isCliAuthorityBrokerProtocolError,
240
259
  createCliAuthorityBrokerSocketInvoker,
241
- createCliAuthorityBrokerClient,
242
- resolveCliAuthorityStoreDriver,
243
- resolveCliAuthorityBrokerEndpoint,
244
- resolveCliAuthorityBrokerMetadataPath,
245
- resolveCliAuthorityBrokerHealthPath
260
+ createCliAuthorityBrokerClient
246
261
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-SYYUU7EV.js";
4
+ } from "./chunk-FHAGENAS.js";
5
5
  import {
6
6
  buildSkillSummaryMarker
7
7
  } from "./chunk-VF4K2QE6.js";
@@ -5,14 +5,14 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-RHMDMTDK.js";
8
+ } from "./chunk-SYNKICCB.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-6COJEAYH.js";
15
+ } from "./chunk-7KELZLC2.js";
16
16
  import {
17
17
  createSSEParser,
18
18
  createToolRunId,
@@ -23,7 +23,7 @@ import {
23
23
  toolRunSetPending,
24
24
  toolRunStarted,
25
25
  toolRunSucceeded
26
- } from "./chunk-TR4DXUYX.js";
26
+ } from "./chunk-CQ2OZMLQ.js";
27
27
  import {
28
28
  getPublicImageAgentMode
29
29
  } from "./chunk-VIDPVFP3.js";
@@ -35,10 +35,10 @@ import {
35
35
  messageStreamEnd,
36
36
  messageStreaming,
37
37
  updateToolMessage
38
- } from "./chunk-YBFJQC2M.js";
38
+ } from "./chunk-TBHAHL33.js";
39
39
  import {
40
40
  streamAgentChatTurn
41
- } from "./chunk-TC6P4NDR.js";
41
+ } from "./chunk-F44FAXP2.js";
42
42
  import {
43
43
  addActiveController,
44
44
  removeActiveController,
@@ -56,19 +56,19 @@ import {
56
56
  import {
57
57
  EMPTY_ASSISTANT_REPAIR_PROMPT,
58
58
  getModelInfo
59
- } from "./chunk-K4NISKOR.js";
59
+ } from "./chunk-5ZYA4JJ3.js";
60
60
  import {
61
61
  getApiEndpoint
62
- } from "./chunk-SVDMVX4G.js";
62
+ } from "./chunk-MMZ6ZTVO.js";
63
63
  import {
64
64
  toErrorMessage
65
65
  } from "./chunk-HNMXYYJR.js";
66
66
  import {
67
67
  selectCurrentServer
68
- } from "./chunk-SVC3GGUA.js";
68
+ } from "./chunk-VMWYBIXG.js";
69
69
  import {
70
70
  write
71
- } from "./chunk-7NYDJAQ7.js";
71
+ } from "./chunk-DNNSCSA2.js";
72
72
  import {
73
73
  createDialogMessageKeyAndId,
74
74
  dialogMessageKey,
@@ -78,12 +78,14 @@ import {
78
78
  extractCustomId
79
79
  } from "./chunk-BJIRLHJR.js";
80
80
  import {
81
- createAsyncThunk,
82
- selectIdentityToken
83
- } from "./chunk-XOJRZUPF.js";
81
+ createAsyncThunk
82
+ } from "./chunk-KWSQR2KK.js";
84
83
  import {
85
84
  isAbortError
86
85
  } from "./chunk-QOKAKDPE.js";
86
+ import {
87
+ selectIdentityToken
88
+ } from "./chunk-SEJ5OS6F.js";
87
89
  import {
88
90
  asTrimmedString
89
91
  } from "./chunk-3EUW3WEO.js";
@@ -415,7 +417,7 @@ var defaultSummary = (toolName, status) => {
415
417
  var processToolData = createAsyncThunk(
416
418
  "message/processToolData",
417
419
  async (args, thunkApi) => {
418
- const { toolCall, parentMessageId, toolRunId } = args;
420
+ const { toolCall, parentMessageId, toolRunId, agentKey } = args;
419
421
  const { dispatch, rejectWithValue } = thunkApi;
420
422
  const func = toolCall.function;
421
423
  if (!func || !func.name) {
@@ -527,7 +529,8 @@ var processToolData = createAsyncThunk(
527
529
  try {
528
530
  const toolResult = await found.executor(executionToolArgs, thunkApi, {
529
531
  parentMessageId,
530
- toolRunId
532
+ toolRunId,
533
+ agentKey
531
534
  });
532
535
  const rawData = toolResult?.rawData ?? toolResult;
533
536
  const llmContext = asOptionalTrimmedString(toolResult?.llmContext);
@@ -686,7 +689,8 @@ var handleToolCalls = createAsyncThunk(
686
689
  processToolData({
687
690
  toolCall: { ...toolCall, id: toolCallId },
688
691
  parentMessageId: messageId,
689
- toolRunId
692
+ toolRunId,
693
+ agentKey: agentConfig.dbKey
690
694
  })
691
695
  ).unwrap();
692
696
  const toolName = result.toolName;