nolo-cli 0.107.0-alpha.3 → 0.107.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-UDCSOTD2.js → _executeModel-C4EH5TZG.js} +77 -69
  3. package/action-GVA5ARSJ.js +20 -0
  4. package/{addContentAction-MB2HHMDZ.js → addContentAction-M2WOWZCL.js} +13 -12
  5. package/{addDialogAgentAction-MCEABSBA.js → addDialogAgentAction-QMAQ5Z6N.js} +19 -20
  6. package/{agentDeleteCommand-OWYHN6D6.js → agentDeleteCommand-D3RICSHX.js} +118 -43
  7. package/{agentEmailCommands-BQFXQIHF.js → agentEmailCommands-YC2A4USQ.js} +99 -89
  8. package/agentListCommands-UDJELMYP.js +741 -0
  9. package/{agentMachineCommands-6DTI7YSG.js → agentMachineCommands-XH4IBGTO.js} +48 -44
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-CMVTBY5X.js} +97 -2
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
  12. package/agentRecordCommands-3EOC2QMN.js +138 -0
  13. package/agentRunCommand-BTHYOVVS.js +167 -0
  14. package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
  15. package/{agentRuntimeLocal-KCMC2TBD.js → agentRuntimeLocal-N4YGKL7M.js} +44 -40
  16. package/{agentSlice-R7PR6KYM.js → agentSlice-NIN4T6CF.js} +15 -14
  17. package/{appDeleteCommands-JEPA3EWE.js → appDeleteCommands-7DAF33AM.js} +46 -42
  18. package/{appDeployCommands-UTB76XFM.js → appDeployCommands-ZPZSMFGZ.js} +46 -42
  19. package/{appDeployStatusCommands-LGHF2SBD.js → appDeployStatusCommands-FWBDSSS5.js} +46 -42
  20. package/{appGetCommands-PX2BFHOB.js → appGetCommands-SZZOHGEP.js} +46 -42
  21. package/{appListCommands-BSMPTWKC.js → appListCommands-FPMUBDPM.js} +46 -42
  22. package/{authCommand-YW42YZA4.js → authCommand-VL3G26NQ.js} +119 -25
  23. package/{authCommands-RGOGCPP6.js → authCommands-5RTUDYZW.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-ZK4K67Y5.js} +11 -9
  25. package/{chromeCommands-FZYAU75D.js → chromeCommands-AU5ZJXBG.js} +289 -37
  26. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-ZYTCMNHG.js} +156 -22
  27. package/{chunk-JDPFV2JV.js → chunk-2NNRWRM5.js} +20 -11
  28. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  29. package/{chunk-HVURBGF3.js → chunk-2U3NHADM.js} +6 -6
  30. package/{chunk-AVTT555J.js → chunk-2ZHBFX5R.js} +29 -9
  31. package/{chunk-QTGQ2LTL.js → chunk-3DQY5IFB.js} +6 -10
  32. package/chunk-4LCOCOR5.js +50 -0
  33. package/{chunk-JPGCXHNM.js → chunk-4LKMZ3RR.js} +1 -1
  34. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  35. package/{chunk-6D6VBVEW.js → chunk-4W24JM32.js} +80 -14
  36. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  37. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  38. package/chunk-5MMAK75Q.js +15 -0
  39. package/{chunk-7S4YWN7P.js → chunk-5UUIGN6I.js} +4 -4
  40. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  41. package/{chunk-C63CN6KA.js → chunk-6IJDSYUA.js} +849 -279
  42. package/{chunk-4MK3I7Y4.js → chunk-6MAW4XOF.js} +5 -5
  43. package/chunk-76HO2DP6.js +15 -0
  44. package/chunk-7AY2H3GA.js +13692 -0
  45. package/{chunk-4CR5I7BD.js → chunk-7HYOPBUW.js} +47 -67
  46. package/{chunk-VLTIYV3X.js → chunk-7I25CBT5.js} +34 -8
  47. package/chunk-AGIM7IMJ.js +147 -0
  48. package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
  49. package/{chunk-6OZ36FXI.js → chunk-BIPGGSJS.js} +22 -4
  50. package/{chunk-EYAQT56M.js → chunk-BNQMNUKZ.js} +9 -6
  51. package/{chunk-62CATUYY.js → chunk-CBUMFIFE.js} +834 -962
  52. package/{chunk-OIVSQH2O.js → chunk-CDEEFJXN.js} +308 -11
  53. package/chunk-CHOZJMJS.js +78 -0
  54. package/{chunk-ETI2NYVF.js → chunk-CIP3AAMT.js} +4 -4
  55. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  56. package/{chunk-IBOZNTG2.js → chunk-DGEUP3DK.js} +23 -28
  57. package/{chunk-Q554LLSI.js → chunk-DMXLXZKL.js} +1 -1
  58. package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
  59. package/{chunk-HKNXJGEC.js → chunk-ECFHBYUW.js} +85 -50
  60. package/{chunk-ACTMNVHM.js → chunk-EHSYSKXV.js} +1 -1
  61. package/{chunk-WV42OMV7.js → chunk-ELUDRSRD.js} +8 -8
  62. package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
  63. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  64. package/{chunk-BFDFRLLQ.js → chunk-EZ4VZHAG.js} +5 -5
  65. package/{chunk-GO3Z72MT.js → chunk-FHLMQIU7.js} +65 -95
  66. package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
  67. package/{chunk-SH43IESU.js → chunk-GGC55Q32.js} +199 -29
  68. package/chunk-GMZLP5DV.js +82 -0
  69. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  70. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  71. package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
  72. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  73. package/{chunk-BNGW5ASC.js → chunk-I2RGRVQ7.js} +22 -2
  74. package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
  75. package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
  76. package/{chunk-GQBOR3G6.js → chunk-JBKHQOYK.js} +8 -4
  77. package/{chunk-XD2MJFUG.js → chunk-JEFXP73H.js} +1 -1
  78. package/{chunk-PBA4UJBK.js → chunk-JIXGJTBU.js} +4 -4
  79. package/{chunk-AEOE4Z6Q.js → chunk-K6L5PNXK.js} +39 -15
  80. package/{chunk-Z77CRGTW.js → chunk-KA5O5KQL.js} +1 -1
  81. package/{chunk-GPCZ7UXG.js → chunk-KD6D6BLA.js} +1 -1
  82. package/{chunk-UZGQNTVW.js → chunk-KHKTDMYG.js} +8 -6
  83. package/{chunk-MRIHM22T.js → chunk-LBFL6RZG.js} +58 -9
  84. package/{chunk-C3M4465B.js → chunk-LKIVH2I2.js} +403 -658
  85. package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
  86. package/{chunk-DHDMC6FO.js → chunk-LUBFABMJ.js} +15 -14
  87. package/{chunk-NA35QHCF.js → chunk-LVBFKW65.js} +1 -1
  88. package/chunk-LWLNLZC5.js +265 -0
  89. package/{chunk-EEGDMATE.js → chunk-M3NMHYRB.js} +86 -81
  90. package/chunk-N4NGJDT6.js +929 -0
  91. package/{chunk-GL3EHUR4.js → chunk-N7NLLRQQ.js} +68 -46
  92. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  93. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  94. package/chunk-NWENLDMM.js +42 -0
  95. package/chunk-O7SVKKLY.js +875 -0
  96. package/chunk-OCZKATRC.js +129 -0
  97. package/{chunk-6Z7MY3V7.js → chunk-OEJLGVBL.js} +5 -5
  98. package/{chunk-VMFTFOWF.js → chunk-OKGVNZTL.js} +35 -8
  99. package/{chunk-GEPUP7OO.js → chunk-OR2UWD6X.js} +3 -3
  100. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  101. package/{chunk-J4MOO56S.js → chunk-PNXHPLRU.js} +10 -2
  102. package/{chunk-3BMYXEUW.js → chunk-R5AJODNI.js} +1 -1
  103. package/{chunk-P5EVSOPA.js → chunk-R6EBQEQE.js} +22 -29
  104. package/{chunk-NOF3HDSN.js → chunk-RLSF5CSE.js} +11 -9
  105. package/chunk-RQ6CTX2E.js +164 -0
  106. package/{chunk-3UZPUAES.js → chunk-RSB4PWX4.js} +1 -1
  107. package/{chunk-KQ4ONNQD.js → chunk-RXA3HAVW.js} +190 -8
  108. package/{chunk-IIVGDG4I.js → chunk-SJKULPGX.js} +13 -7
  109. package/chunk-SQHMSDDU.js +8004 -0
  110. package/{chunk-Q67DOFOO.js → chunk-SZC4REES.js} +212 -105
  111. package/{chunk-JRQFUXY7.js → chunk-TBAXFWOS.js} +99 -22
  112. package/{chunk-PQFHGD77.js → chunk-TBM2RS3U.js} +161 -14
  113. package/{chunk-XT35TTFG.js → chunk-TCYU7L6V.js} +18 -20
  114. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  115. package/chunk-TY3TIUJK.js +89 -0
  116. package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
  117. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  118. package/chunk-UM7TA3K4.js +1008 -0
  119. package/{chunk-6YTOJY35.js → chunk-VBG7GWWR.js} +253 -8
  120. package/chunk-VIWDGTDA.js +8 -0
  121. package/chunk-VJVNU77E.js +83 -0
  122. package/{chunk-W7HLWAQ7.js → chunk-VPLUU4IX.js} +118 -90
  123. package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
  124. package/chunk-VZLO4XJD.js +17 -0
  125. package/{chunk-AHAHBQMU.js → chunk-WDLSZMTA.js} +2 -2
  126. package/{chunk-53HEEOTT.js → chunk-WF5X57VW.js} +83 -16
  127. package/{chunk-VRTTFDBM.js → chunk-WPHY3VPF.js} +35 -22
  128. package/{chunk-ASIFZ2WY.js → chunk-YKZLFY5J.js} +66 -54
  129. package/chunk-YV25TM3R.js +780 -0
  130. package/{chunk-B2C6QTY4.js → chunk-YXKNBVYW.js} +19 -17
  131. package/chunk-ZRAU6T47.js +56 -0
  132. package/commandRegistry-UU6IOTHI.js +833 -0
  133. package/{contentThunks-IV2T3EJC.js → contentThunks-ARD56LKI.js} +39 -36
  134. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  135. package/{createAgentAutomationAction-JCOIEYY4.js → createAgentAutomationAction-HWJLU6DD.js} +40 -37
  136. package/createDialogAction-CHYA6PZE.js +70 -0
  137. package/{createPageAction-D2VOOLP3.js → createPageAction-TSCYNFX7.js} +47 -43
  138. package/{chunk-VFEJQMH4.js → cursorProvider-YGGNMVWX.js} +2751 -10172
  139. package/{dbSlice-A6C6H32X.js → dbSlice-TG4MZ5EB.js} +12 -11
  140. package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
  141. package/{dialogCommands-H7FPUYUQ.js → dialogCommands-IJYQAQMB.js} +49 -46
  142. package/{dialogSlice-6JZOOTDS.js → dialogSlice-H476I77R.js} +57 -37
  143. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  144. package/{docCreateCommands-WRG2JLGM.js → docCreateCommands-AZSK4NAG.js} +48 -44
  145. package/{docDeleteCommands-SHWJIBJS.js → docDeleteCommands-DDJMSMFZ.js} +49 -45
  146. package/{docReadCommands-WJN3WT6O.js → docReadCommands-5F5Q6EBZ.js} +47 -43
  147. package/{docStore-HUPQ2FSS.js → docStore-HW2RDZDM.js} +17 -13
  148. package/{docUpdateCommands-IE32IL6O.js → docUpdateCommands-XPNPVZOC.js} +48 -44
  149. package/{fetchMessages-EIU7UFFK.js → fetchMessages-3PXAHKCR.js} +5 -5
  150. package/{getPricing-LUSEABA6.js → getPricing-DOBBZLOK.js} +4 -4
  151. package/{handleSendMessageAction-DFPMQ7YM.js → handleSendMessageAction-IOXE7ILC.js} +109 -42
  152. package/index.js +87 -884
  153. package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
  154. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-UYCKO7YZ.js} +2 -2
  155. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
  156. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
  157. package/{machineCommands-OL4NLMXG.js → machineCommands-Q7TDGM6P.js} +96 -86
  158. package/machineWsRunDispatch-T5VFOQ3R.js +154 -0
  159. package/{memberThunks-P2ECUJ56.js → memberThunks-5S5D3N4U.js} +20 -18
  160. package/{models-T3SG6MJ5.js → models-PQU25T6Q.js} +2 -2
  161. package/oauthTokenStore-ITEB663N.js +23 -0
  162. package/package.json +1 -1
  163. package/processSpawn-SOAV3FEV.js +11 -0
  164. package/profileConfig-ZGOFORWV.js +43 -0
  165. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-HAQWVAQX.js} +7 -7
  166. package/{providerRegistry-757OWH3O.js → providerRegistry-5FGWB3X5.js} +11 -7
  167. package/{read-COE3ZYR6.js → read-LSYFLSIM.js} +8 -7
  168. package/{readDocTool-5USN4A6V.js → readDocTool-XWRXV3DR.js} +5 -3
  169. package/{readlineWorkspace-BOENUIW2.js → readlineWorkspace-25U6P3DG.js} +2595 -2031
  170. package/{removeDialogAgentAction-J6X5QMTA.js → removeDialogAgentAction-4TEFC3VL.js} +22 -26
  171. package/{runAgentClientLoop-5ZA62FBA.js → runAgentClientLoop-CZOYWHDN.js} +78 -71
  172. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
  173. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  174. package/{setDialogExtraReferencesAction-WX5VTY6O.js → setDialogExtraReferencesAction-LSEN44OY.js} +16 -14
  175. package/{setPrimaryDialogAgentAction-FN22THHT.js → setPrimaryDialogAgentAction-SR366X5A.js} +23 -27
  176. package/{chunk-GP5LKBUZ.js → settingThunks-CTVPPGIN.js} +226 -940
  177. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  178. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  179. package/{spaceCommands-5GLCWZPO.js → spaceCommands-3UK63WPE.js} +51 -47
  180. package/{streamAgentChatTurn-6UZJMYRB.js → streamAgentChatTurn-LV6ZWUD4.js} +214 -114
  181. package/{switchDialogAgentAction-LVTEV3FR.js → switchDialogAgentAction-M6NAFOOU.js} +19 -20
  182. package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
  183. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-AD7CXTA4.js} +4 -3
  184. package/tools-UJOV6CQZ.js +117 -0
  185. package/{tuiSummaryLlmCaller-OHHFTHMG.js → tuiSummaryLlmCaller-DEH7ZEM6.js} +25 -23
  186. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  187. package/{updateDialogTitleAction-QTKNIURB.js → updateDialogTitleAction-JYXKIBNJ.js} +84 -45
  188. package/action-P4TNFGAD.js +0 -31
  189. package/agentListCommands-B2V4YAC4.js +0 -410
  190. package/agentRecordCommands-UTHKMMJY.js +0 -128
  191. package/agentRunCommand-D4OBAOVW.js +0 -156
  192. package/browser-image-compression-MFDTD7K6.js +0 -1763
  193. package/chatQueueReduxAdapter-2P6NFX64.js +0 -186
  194. package/chunk-CQ3WA2NE.js +0 -299
  195. package/chunk-M76ECQRD.js +0 -13658
  196. package/chunk-MEYIRKDN.js +0 -8967
  197. package/chunk-PUOC4YRO.js +0 -394
  198. package/chunk-Q5FJJ6XI.js +0 -103
  199. package/chunk-S7Z2HMCN.js +0 -25
  200. package/chunk-T75QD6AB.js +0 -20923
  201. package/chunk-Y5GCAMGP.js +0 -9
  202. package/chunk-YPREESF4.js +0 -225
  203. package/createDialogAction-NGG7YVNU.js +0 -65
  204. package/machineWsRunDispatch-64SG2RUI.js +0 -144
  205. package/settingSlice-P4ZW7K5X.js +0 -204
  206. package/syncMapping-N6RGXGBW.js +0 -437
  207. package/tools-KMGFWO43.js +0 -110
  208. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  209. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -5,20 +5,18 @@ import {
5
5
  } from "./chunk-ZJ7UHBJS.js";
6
6
  import {
7
7
  deleteDialog,
8
- i18nBaseConfig,
9
- initReactI18next,
10
- instance,
8
+ runtime_default,
11
9
  toast
12
- } from "./chunk-T75QD6AB.js";
10
+ } from "./chunk-7AY2H3GA.js";
13
11
  import {
14
- require_date_fns
15
- } from "./chunk-M76ECQRD.js";
12
+ formatISO
13
+ } from "./chunk-ZRAU6T47.js";
16
14
  import {
17
15
  require_react
18
16
  } from "./chunk-YDH3FDFQ.js";
19
17
  import {
20
18
  isSystemAdmin
21
- } from "./chunk-QDSINZM3.js";
19
+ } from "./chunk-76HO2DP6.js";
22
20
  import {
23
21
  asRecordOrEmpty
24
22
  } from "./chunk-KX6YBIHG.js";
@@ -27,7 +25,7 @@ import {
27
25
  addContentAction,
28
26
  checkSpaceMembership,
29
27
  localSpaceAuthorityPatchStamp
30
- } from "./chunk-AHAHBQMU.js";
28
+ } from "./chunk-WDLSZMTA.js";
31
29
  import {
32
30
  createSpaceKey,
33
31
  normalizeSpaceId
@@ -41,7 +39,24 @@ import {
41
39
  uploadFileAction,
42
40
  upsertSSREntity,
43
41
  write
44
- } from "./chunk-VRTTFDBM.js";
42
+ } from "./chunk-WPHY3VPF.js";
43
+ import {
44
+ DEVICE_LOCAL_OWNER_ID,
45
+ getRuntimeServerContext,
46
+ isDeviceLocalSpaceBody,
47
+ resolveReplicationServers,
48
+ scheduleDeleteReplication,
49
+ scheduleWriteReplication
50
+ } from "./chunk-O7SVKKLY.js";
51
+ import {
52
+ buildTombstoneRecord
53
+ } from "./chunk-D2MDMY2M.js";
54
+ import {
55
+ extractUserId
56
+ } from "./chunk-M2EJHDJP.js";
57
+ import {
58
+ isRecord
59
+ } from "./chunk-KUG52IAP.js";
45
60
  import {
46
61
  SEPARATOR,
47
62
  asTrimmedNonEmptyStringArray,
@@ -53,41 +68,26 @@ import {
53
68
  rowKey,
54
69
  splitKey,
55
70
  ulid
56
- } from "./chunk-VMFTFOWF.js";
71
+ } from "./chunk-OKGVNZTL.js";
57
72
  import {
58
73
  asOptionalFiniteNumber
59
74
  } from "./chunk-WWC7I6TA.js";
60
75
  import {
61
- extractUserId
62
- } from "./chunk-M2EJHDJP.js";
63
- import {
64
- DEVICE_LOCAL_OWNER_ID,
65
- createAsyncThunk,
66
- getRuntimeServerContext,
67
- isDeviceLocalSpaceBody,
68
- resolveReplicationServers,
69
- scheduleDeleteReplication,
70
- scheduleWriteReplication
71
- } from "./chunk-UKWGR5SS.js";
76
+ createAsyncThunk
77
+ } from "./chunk-VY6VFGKR.js";
72
78
  import {
73
79
  createClientLogger,
74
80
  isAbortError
75
- } from "./chunk-QOKAKDPE.js";
81
+ } from "./chunk-HIM3FCLF.js";
76
82
  import {
77
83
  selectIdentityUserId
78
84
  } from "./chunk-SEJ5OS6F.js";
79
85
  import {
80
- buildTombstoneRecord
81
- } from "./chunk-GBRG75BQ.js";
82
- import {
83
- isRecord
84
- } from "./chunk-KUG52IAP.js";
86
+ asOptionalPositiveFiniteNumber
87
+ } from "./chunk-U6VC4MU4.js";
85
88
  import {
86
89
  asTrimmedString
87
90
  } from "./chunk-3EUW3WEO.js";
88
- import {
89
- asOptionalPositiveFiniteNumber
90
- } from "./chunk-U6VC4MU4.js";
91
91
  import {
92
92
  asOptionalTrimmedString
93
93
  } from "./chunk-G3SUCT4W.js";
@@ -97,7 +97,6 @@ import {
97
97
 
98
98
  // packages/render/table/tableStore.ts
99
99
  var import_react = __toESM(require_react(), 1);
100
- var import_date_fns2 = __toESM(require_date_fns(), 1);
101
100
  import { ulid as ulid3 } from "ulid";
102
101
 
103
102
  // packages/render/table/fetchAndCacheTableRows.ts
@@ -434,25 +433,7 @@ function addColumnOptionInMeta(meta, input, deps) {
434
433
  }
435
434
 
436
435
  // packages/render/table/createTableAction.ts
437
- var import_date_fns = __toESM(require_date_fns(), 1);
438
436
  import { ulid as ulid2 } from "ulid";
439
-
440
- // packages/app/i18n/client.ts
441
- instance.use(initReactI18next).init({
442
- ...i18nBaseConfig,
443
- lng: "zh-CN" /* ZH_CN */,
444
- fallbackLng: {
445
- ["en" /* EN */]: ["en" /* EN */],
446
- ["zh-CN" /* ZH_CN */]: ["zh-CN" /* ZH_CN */, "en" /* EN */],
447
- ["zh-Hant" /* ZH_HANT */]: ["zh-Hant" /* ZH_HANT */, "zh-CN" /* ZH_CN */, "en" /* EN */],
448
- ["ja" /* JA */]: ["ja" /* JA */, "en" /* EN */],
449
- default: ["en" /* EN */]
450
- },
451
- compatibilityJSON: "v3"
452
- });
453
- var client_default = instance;
454
-
455
- // packages/render/table/createTableAction.ts
456
437
  var DEFAULT_COLUMNS = [
457
438
  {
458
439
  name: "title",
@@ -554,9 +535,9 @@ var createTableAction = async ({
554
535
  const spaceId = customSpaceId ?? getCurrentSpaceId();
555
536
  const tableId = ulid2();
556
537
  const now = /* @__PURE__ */ new Date();
557
- const nowIso = (0, import_date_fns.formatISO)(now);
538
+ const nowIso = formatISO(now);
558
539
  const dbKey = metaKey(userId, tableId);
559
- const defaultTitle = client_default.t("space:newTable", {
540
+ const defaultTitle = runtime_default.t("space:newTable", {
560
541
  defaultValue: "\u65B0\u5EFA\u8868\u683C"
561
542
  });
562
543
  const title = asOptionalTrimmedString(customTitle) ?? defaultTitle;
@@ -924,7 +905,7 @@ var addRow = createTableCommand(
924
905
  });
925
906
  try {
926
907
  const { dbKey, rowId } = rowKey.create(tenantId, tableId);
927
- const nowIso = (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date());
908
+ const nowIso = formatISO(/* @__PURE__ */ new Date());
928
909
  const row = {
929
910
  dbKey,
930
911
  tenantId,
@@ -985,7 +966,7 @@ var deleteRow = createTableCommand(
985
966
  if (!row) {
986
967
  throw new Error(`\u5F53\u524D\u8868\u4E2D\u627E\u4E0D\u5230\u8981\u5220\u9664\u7684\u884C\uFF1A${dbKey}`);
987
968
  }
988
- const nowIso = (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date());
969
+ const nowIso = formatISO(/* @__PURE__ */ new Date());
989
970
  const tombstoneRow = {
990
971
  ...row,
991
972
  deletedAt: nowIso,
@@ -1063,7 +1044,7 @@ var addColumn = createTableCommand(
1063
1044
  const result = addColumnToMeta(
1064
1045
  meta,
1065
1046
  { columnName },
1066
- { id: ulid3(), nowIso: (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date()) }
1047
+ { id: ulid3(), nowIso: formatISO(/* @__PURE__ */ new Date()) }
1067
1048
  );
1068
1049
  if (!result.ok) {
1069
1050
  throw new Error(result.error);
@@ -1104,7 +1085,7 @@ var deleteColumn = createTableCommand(
1104
1085
  meta,
1105
1086
  state.rows,
1106
1087
  { columnName },
1107
- { nowIso: (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date()) }
1088
+ { nowIso: formatISO(/* @__PURE__ */ new Date()) }
1108
1089
  );
1109
1090
  if (!result.ok) {
1110
1091
  throw new Error(result.error);
@@ -1146,7 +1127,7 @@ var reorderColumn = createTableCommand(
1146
1127
  const result = reorderColumnInMeta(
1147
1128
  meta,
1148
1129
  { fromIndex, toIndex },
1149
- { nowIso: (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date()) }
1130
+ { nowIso: formatISO(/* @__PURE__ */ new Date()) }
1150
1131
  );
1151
1132
  if (!result.ok) {
1152
1133
  throw new Error(result.error);
@@ -1187,7 +1168,7 @@ var renameColumnLabel = createTableCommand(
1187
1168
  const result = renameColumnLabelInMeta(
1188
1169
  meta,
1189
1170
  { columnId, label: newLabel },
1190
- { nowIso: (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date()) }
1171
+ { nowIso: formatISO(/* @__PURE__ */ new Date()) }
1191
1172
  );
1192
1173
  if (!result.ok) {
1193
1174
  throw new Error(result.error);
@@ -1225,7 +1206,7 @@ var updateColumnWidth = createTableCommand(
1225
1206
  const result = updateColumnWidthInMeta(
1226
1207
  meta,
1227
1208
  { columnId, width },
1228
- { nowIso: (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date()) }
1209
+ { nowIso: formatISO(/* @__PURE__ */ new Date()) }
1229
1210
  );
1230
1211
  if (!result.ok) {
1231
1212
  throw new Error(result.error);
@@ -1263,7 +1244,7 @@ var addColumnOption = createTableCommand(
1263
1244
  const result = addColumnOptionInMeta(
1264
1245
  meta,
1265
1246
  { columnId, option },
1266
- { nowIso: (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date()) }
1247
+ { nowIso: formatISO(/* @__PURE__ */ new Date()) }
1267
1248
  );
1268
1249
  if (!result.ok) {
1269
1250
  throw new Error(result.error);
@@ -1305,7 +1286,7 @@ var renameTable = createTableCommand(
1305
1286
  if (!meta || meta.tenantId !== tenantId || meta.tableId !== tableId) {
1306
1287
  throw new Error("\u5F53\u524D\u6CA1\u6709\u52A0\u8F7D\u5BF9\u5E94\u7684\u8868\u5B9A\u4E49");
1307
1288
  }
1308
- const nowIso = (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date());
1289
+ const nowIso = formatISO(/* @__PURE__ */ new Date());
1309
1290
  setState((s) => ({ ...s, error: null }));
1310
1291
  try {
1311
1292
  if (dispatch) {
@@ -1346,7 +1327,7 @@ var updateTableIcon = createTableCommand(
1346
1327
  if (!meta || meta.tenantId !== tenantId || meta.tableId !== tableId) {
1347
1328
  throw new Error("\u5F53\u524D\u6CA1\u6709\u52A0\u8F7D\u5BF9\u5E94\u7684\u8868\u5B9A\u4E49");
1348
1329
  }
1349
- const nowIso = (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date());
1330
+ const nowIso = formatISO(/* @__PURE__ */ new Date());
1350
1331
  setState((s) => ({ ...s, error: null }));
1351
1332
  try {
1352
1333
  if (dispatch) {
@@ -1384,7 +1365,7 @@ var updateCell = createTableCommand(
1384
1365
  const { dbKey, columnName, value } = args;
1385
1366
  setState((s) => ({ ...s, error: null }));
1386
1367
  try {
1387
- const nowIso = (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date());
1368
+ const nowIso = formatISO(/* @__PURE__ */ new Date());
1388
1369
  if (dispatch) {
1389
1370
  await safeDispatch(
1390
1371
  dispatch,
@@ -1453,11 +1434,11 @@ var ENTITY_DELETE_STRATEGIES = {
1453
1434
  await dispatch(deleteTable({ dbKey: key })).unwrap();
1454
1435
  },
1455
1436
  file: async (key, { thunkAPI }) => {
1456
- const { deleteFileAction } = await import("./deleteFile-YG6QMJLU.js");
1437
+ const { deleteFileAction } = await import("./deleteFile-KESP65GC.js");
1457
1438
  await deleteFileAction(key, thunkAPI);
1458
1439
  },
1459
1440
  image: async (key, { thunkAPI }) => {
1460
- const { deleteFileAction } = await import("./deleteFile-YG6QMJLU.js");
1441
+ const { deleteFileAction } = await import("./deleteFile-KESP65GC.js");
1461
1442
  await deleteFileAction(key, thunkAPI);
1462
1443
  },
1463
1444
  agent: async (key, { dispatch, userId, sourceServerOrigin }) => {
@@ -2097,11 +2078,11 @@ var uploadAndAddFileToSpaceAction = async (payload, thunkAPI) => {
2097
2078
  const state3 = getState();
2098
2079
  const userId = selectIdentityUserId(state3);
2099
2080
  if (!userId) {
2100
- console.warn("[uploadAndAddFileToSpace] Warning: No userId found in state. Uploading as anonymous/unknown might cause issues.");
2081
+ throw new Error("Cannot upload a file to a space without an authenticated user.");
2101
2082
  }
2102
2083
  try {
2103
2084
  const id = ulid();
2104
- const dbKey = fileKey.single(userId || "unknown", id);
2085
+ const dbKey = fileKey.single(userId, id);
2105
2086
  const contentType = "file" /* FILE */;
2106
2087
  const fileCategory = resolveFileCategory({
2107
2088
  mimeType: file.type,
@@ -2391,7 +2372,6 @@ var updateContentCategory = createAsyncThunk(
2391
2372
 
2392
2373
  export {
2393
2374
  fetchAndCacheTableRows,
2394
- client_default,
2395
2375
  getTableState,
2396
2376
  loadTableRows,
2397
2377
  addRow,
@@ -1,6 +1,9 @@
1
+ import {
2
+ normalizeMediaConfirmExecutionRevision
3
+ } from "./chunk-VZLO4XJD.js";
1
4
  import {
2
5
  getActiveDialogKey
3
- } from "./chunk-6YTOJY35.js";
6
+ } from "./chunk-VBG7GWWR.js";
4
7
  import {
5
8
  compactWhitespace
6
9
  } from "./chunk-DWLEOOGR.js";
@@ -10,12 +13,12 @@ import {
10
13
  import {
11
14
  extractCustomId
12
15
  } from "./chunk-M2EJHDJP.js";
13
- import {
14
- selectIdentityToken
15
- } from "./chunk-SEJ5OS6F.js";
16
16
  import {
17
17
  isRecord
18
18
  } from "./chunk-KUG52IAP.js";
19
+ import {
20
+ selectIdentityToken
21
+ } from "./chunk-SEJ5OS6F.js";
19
22
 
20
23
  // packages/ai/tools/toolApiClient.ts
21
24
  var MAIN_SERVER = "https://nolo.chat";
@@ -115,18 +118,31 @@ var ToolApiError = class extends Error {
115
118
  status;
116
119
  code;
117
120
  details;
121
+ upperCredits;
122
+ /**
123
+ * 服务端在本次 409 里下发的执行代次(扁平 error.executionRevision,旧形状兼容
124
+ * error.details.executionRevision)。只转述服务端本次的值,绝不另行 GET 补齐。
125
+ * 真值判据复用 normalizeMediaConfirmExecutionRevision(缺失/非法一律缺席,不造值)。
126
+ */
127
+ executionRevision;
118
128
  constructor(message, options) {
119
129
  super(message);
120
130
  this.name = "ToolApiError";
121
131
  this.status = options?.status;
122
132
  this.code = options?.code;
123
133
  this.details = options?.details;
134
+ this.upperCredits = options?.upperCredits;
135
+ this.executionRevision = normalizeMediaConfirmExecutionRevision(
136
+ options?.executionRevision
137
+ );
124
138
  }
125
139
  };
126
140
  var buildToolRequestHeaders = (thunkApi, options = {}) => {
127
141
  const { withAuth = false, agentKey } = options;
128
142
  const { token } = getRequestConfig(thunkApi);
129
- const headers = { "Content-Type": "application/json" };
143
+ const headers = {
144
+ "Content-Type": "application/json"
145
+ };
130
146
  if (withAuth && token) {
131
147
  headers["Authorization"] = `Bearer ${token}`;
132
148
  }
@@ -150,10 +166,12 @@ async function callToolApi(thunkApi, path, body, options = {}) {
150
166
  if (!baseUrl) throw new Error("\u65E0\u6CD5\u83B7\u53D6\u5DE5\u5177\u670D\u52A1\u5668\u5730\u5740\u3002");
151
167
  const url = `${baseUrl}${path}`;
152
168
  const headers = buildToolRequestHeaders(thunkApi, options);
169
+ const method = options.method ?? "POST";
153
170
  const response = await fetch(url, {
154
- method: "POST",
171
+ method,
155
172
  headers,
156
- body: JSON.stringify(maybeAttachDialogId(thunkApi, body))
173
+ ...options.signal ? { signal: options.signal } : {},
174
+ ...method === "GET" ? {} : { body: JSON.stringify(maybeAttachDialogId(thunkApi, body)) }
157
175
  });
158
176
  const contentType = response.headers.get("content-type");
159
177
  const responseText = await response.text();
@@ -161,6 +179,8 @@ async function callToolApi(thunkApi, path, body, options = {}) {
161
179
  let errorMessage = `API \u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${response.status}`;
162
180
  let errorCode;
163
181
  let errorDetails;
182
+ let upperCredits;
183
+ let errorExecutionRevision;
164
184
  try {
165
185
  const errorData = JSON.parse(responseText);
166
186
  const err = errorData?.error;
@@ -168,6 +188,10 @@ async function callToolApi(thunkApi, path, body, options = {}) {
168
188
  errorMessage += `: ${err.message ?? JSON.stringify(err)}`;
169
189
  errorCode = typeof err.code === "string" ? err.code : void 0;
170
190
  errorDetails = err.details;
191
+ if (typeof err.upperCredits === "number") {
192
+ upperCredits = err.upperCredits;
193
+ }
194
+ errorExecutionRevision = err.executionRevision ?? err.details?.executionRevision;
171
195
  }
172
196
  } catch {
173
197
  errorCode = looksLikeHtmlResponse(responseText, contentType) ? "HTML_ERROR_RESPONSE" : "NON_JSON_ERROR_RESPONSE";
@@ -182,7 +206,9 @@ async function callToolApi(thunkApi, path, body, options = {}) {
182
206
  throw new ToolApiError(errorMessage, {
183
207
  status: response.status,
184
208
  code: errorCode,
185
- details: errorDetails
209
+ details: errorDetails,
210
+ upperCredits,
211
+ executionRevision: errorExecutionRevision
186
212
  });
187
213
  }
188
214
  try {
@@ -0,0 +1,147 @@
1
+ // packages/create/editor/utils/slateUtils.ts
2
+ var slateNodeToString = (node) => {
3
+ if (typeof node?.text === "string") return node.text;
4
+ const children = Array.isArray(node?.children) ? node.children : [];
5
+ return children.map(slateNodeToString).join("");
6
+ };
7
+ var createEmptyParagraph = () => ({
8
+ type: "paragraph",
9
+ children: [{ text: "" }]
10
+ });
11
+ var ensureEditorContent = (slateData) => Array.isArray(slateData) && slateData.length > 0 ? slateData : [createEmptyParagraph()];
12
+ var deepEqual = (a, b) => {
13
+ if (a === b) return true;
14
+ if (a == null || b == null) return false;
15
+ if (typeof a !== "object" || typeof b !== "object") return false;
16
+ const isArrayA = Array.isArray(a);
17
+ const isArrayB = Array.isArray(b);
18
+ if (isArrayA || isArrayB) {
19
+ if (!isArrayA || !isArrayB) return false;
20
+ if (a.length !== b.length) return false;
21
+ for (let i = 0; i < a.length; i++) {
22
+ if (!deepEqual(a[i], b[i])) return false;
23
+ }
24
+ return true;
25
+ }
26
+ const keysA = Object.keys(a);
27
+ const keysB = Object.keys(b);
28
+ if (keysA.length !== keysB.length) return false;
29
+ for (const key of keysA) {
30
+ if (!Object.prototype.hasOwnProperty.call(b, key)) return false;
31
+ if (!deepEqual(a[key], b[key])) return false;
32
+ }
33
+ return true;
34
+ };
35
+ var compareSlateContent = (newContent, oldContent) => {
36
+ if (newContent === oldContent) return false;
37
+ if (!newContent || !oldContent) return true;
38
+ if (newContent.length !== oldContent.length) return true;
39
+ return !deepEqual(newContent, oldContent);
40
+ };
41
+ var extractTitleFromSlate = (slateData) => {
42
+ if (!Array.isArray(slateData) || slateData.length === 0) return "\u65B0\u9875\u9762";
43
+ const titleNode = slateData.find((node) => node.type === "heading-one");
44
+ if (titleNode) {
45
+ const text = slateNodeToString(titleNode).trim();
46
+ if (text) {
47
+ return text;
48
+ }
49
+ }
50
+ for (const node of slateData) {
51
+ const text = slateNodeToString(node).trim();
52
+ if (text) {
53
+ return text.length > 30 ? `${text.substring(0, 30)}...` : text;
54
+ }
55
+ }
56
+ return "\u65B0\u9875\u9762";
57
+ };
58
+ var splitSlateTitleAndBody = (slateData, explicitTitle) => {
59
+ const content = ensureEditorContent(slateData);
60
+ const firstNode = content[0];
61
+ const hasExplicitTitle = explicitTitle !== void 0 && explicitTitle !== null;
62
+ const normalizedExplicitTitle = hasExplicitTitle ? explicitTitle.trim() : null;
63
+ const firstNonEmptyText = content.map((node) => slateNodeToString(node).trim()).find(Boolean);
64
+ if (firstNode?.type === "heading-one") {
65
+ const firstText = slateNodeToString(firstNode).trim();
66
+ const shouldTreatAsTitle = !!firstText && (normalizedExplicitTitle == null || normalizedExplicitTitle === firstText);
67
+ if (shouldTreatAsTitle) {
68
+ const body = content.slice(1);
69
+ return {
70
+ title: firstText,
71
+ body: ensureEditorContent(body)
72
+ };
73
+ }
74
+ }
75
+ return {
76
+ title: normalizedExplicitTitle ?? (firstNonEmptyText || ""),
77
+ body: content
78
+ };
79
+ };
80
+ var extractMentionsFromSlate = (slateData) => {
81
+ const tools = /* @__PURE__ */ new Set();
82
+ const traverse = (nodes) => {
83
+ for (const node of nodes) {
84
+ if (node.type === "mention" && node.resourceId) {
85
+ if (node.resourceType === "tool") {
86
+ tools.add(node.resourceId);
87
+ }
88
+ }
89
+ if (node.children && Array.isArray(node.children)) {
90
+ traverse(node.children);
91
+ }
92
+ }
93
+ };
94
+ if (Array.isArray(slateData)) {
95
+ traverse(slateData);
96
+ }
97
+ return Array.from(tools);
98
+ };
99
+ var extractCategorizedMentions = (slateData) => {
100
+ const result = {
101
+ tools: [],
102
+ pages: [],
103
+ agents: [],
104
+ spaces: []
105
+ };
106
+ const traverse = (nodes) => {
107
+ for (const node of nodes) {
108
+ if (node.type === "mention" && node.resourceId && node.resourceType) {
109
+ switch (node.resourceType) {
110
+ case "tool":
111
+ result.tools.push(node.resourceId);
112
+ break;
113
+ case "page":
114
+ result.pages.push(node.resourceId);
115
+ break;
116
+ case "agent":
117
+ result.agents.push(node.resourceId);
118
+ break;
119
+ case "space":
120
+ result.spaces.push(node.resourceId);
121
+ break;
122
+ }
123
+ }
124
+ if (node.children && Array.isArray(node.children)) {
125
+ traverse(node.children);
126
+ }
127
+ }
128
+ };
129
+ if (Array.isArray(slateData)) {
130
+ traverse(slateData);
131
+ }
132
+ result.tools = [...new Set(result.tools)];
133
+ result.pages = [...new Set(result.pages)];
134
+ result.agents = [...new Set(result.agents)];
135
+ result.spaces = [...new Set(result.spaces)];
136
+ return result;
137
+ };
138
+
139
+ export {
140
+ createEmptyParagraph,
141
+ ensureEditorContent,
142
+ compareSlateContent,
143
+ extractTitleFromSlate,
144
+ splitSlateTitleAndBody,
145
+ extractMentionsFromSlate,
146
+ extractCategorizedMentions
147
+ };
@@ -11,6 +11,12 @@ import {
11
11
  isLoopbackHostname
12
12
  } from "./chunk-4SN6J65J.js";
13
13
 
14
+ // packages/core/positiveFiniteNumberOrFallback.ts
15
+ function parsePositiveFiniteNumberOrFallback(value, fallback) {
16
+ const parsed = Number(value);
17
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
18
+ }
19
+
14
20
  // packages/core/fetchWithTransientRetry.ts
15
21
  var TRANSIENT_FETCH_MAX_ATTEMPTS = 3;
16
22
  var TRANSIENT_FETCH_RETRY_BASE_DELAY_MS = 250;
@@ -120,6 +126,7 @@ async function fetchWithTransientRetry(fetchImpl, input, init, options = {}) {
120
126
  }
121
127
 
122
128
  export {
129
+ parsePositiveFiniteNumberOrFallback,
123
130
  isTransientFetchError,
124
131
  fetchWithTransientRetry
125
132
  };
@@ -3,7 +3,7 @@ import {
3
3
  resolvePlatformChatCompletionsEndpoint,
4
4
  resolvePlatformHostedCredentialProvider,
5
5
  resolvePlatformResponsesEndpoint
6
- } from "./chunk-GQBOR3G6.js";
6
+ } from "./chunk-JBKHQOYK.js";
7
7
  import {
8
8
  CLI_PROVIDER_VALUES
9
9
  } from "./chunk-W7XHHYWM.js";
@@ -11,7 +11,7 @@ import {
11
11
  CLIENT_VERSION_TOO_OLD_CODE,
12
12
  buildClientVersionGateErrorDetail,
13
13
  evaluatePlatformHostedClientVersionGate
14
- } from "./chunk-Q67DOFOO.js";
14
+ } from "./chunk-SZC4REES.js";
15
15
  import {
16
16
  asTrimmedLowercaseString
17
17
  } from "./chunk-QSJ3HFEF.js";
@@ -164,10 +164,28 @@ function resolveProviderAuthHeaderName(args) {
164
164
  if (/xiaomimimo\.com/i.test(args.endpoint)) return "api-key";
165
165
  return "Authorization";
166
166
  }
167
+ var OPENCODE_GO_ENDPOINT_RE = /^https?:\/\/opencode\.ai\/zen\/go\//i;
168
+ var OPENCODE_SESSION_HEADER = "x-opencode-session";
169
+ var OPENCODE_USER_AGENT = "nolo-agent/1.0";
170
+ var PROCESS_FALLBACK_SESSION_ID = `nolo-${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;
171
+ function isOpenCodeGoEndpoint(endpoint) {
172
+ return typeof endpoint === "string" && OPENCODE_GO_ENDPOINT_RE.test(endpoint.trim());
173
+ }
174
+ function buildProviderSessionHeaders(args) {
175
+ if (!isOpenCodeGoEndpoint(args.endpoint)) return {};
176
+ return {
177
+ [OPENCODE_SESSION_HEADER]: args.sessionId?.trim() || PROCESS_FALLBACK_SESSION_ID,
178
+ "User-Agent": OPENCODE_USER_AGENT
179
+ };
180
+ }
167
181
  function buildProviderAuthHeaders(args) {
168
- if (!args.apiKey) return {};
182
+ const sessionHeaders = buildProviderSessionHeaders(args);
183
+ if (!args.apiKey) return sessionHeaders;
169
184
  const headerName = resolveProviderAuthHeaderName(args);
170
- return headerName.toLowerCase() === "authorization" ? { Authorization: `Bearer ${args.apiKey}` } : { [headerName]: args.apiKey };
185
+ return {
186
+ ...sessionHeaders,
187
+ ...headerName.toLowerCase() === "authorization" ? { Authorization: `Bearer ${args.apiKey}` } : { [headerName]: args.apiKey }
188
+ };
171
189
  }
172
190
  async function buildProviderExecutionPlan(args) {
173
191
  const { agentConfig, env } = args;
@@ -6,10 +6,12 @@ import {
6
6
  } from "./chunk-AGGIDPCZ.js";
7
7
  import {
8
8
  getModelConfig
9
- } from "./chunk-OIVSQH2O.js";
9
+ } from "./chunk-CDEEFJXN.js";
10
10
  import {
11
- isPlatformHostedImageModel
12
- } from "./chunk-Q67DOFOO.js";
11
+ isPlatformHostedImageModel,
12
+ isPlatformManagedProvider,
13
+ resolvePlatformEffectiveModel
14
+ } from "./chunk-SZC4REES.js";
13
15
  import {
14
16
  asOptionalFiniteNumber
15
17
  } from "./chunk-WWC7I6TA.js";
@@ -19,15 +21,16 @@ import {
19
21
 
20
22
  // packages/ai/llm/getPricing.ts
21
23
  var MAX_OUTPUT_TOKENS = 8192;
22
- var getModelPricing = (provider, modelName, _requestedServiceTier) => {
24
+ var getModelPricing = (provider, modelName, _requestedServiceTier, isPlatformBilled) => {
25
+ const pricedModel = isPlatformBilled === true && isPlatformManagedProvider(provider, modelName) ? resolvePlatformEffectiveModel(modelName) ?? modelName : modelName;
23
26
  let model;
24
27
  try {
25
- model = getModelConfig(provider, modelName);
28
+ model = getModelConfig(provider, pricedModel);
26
29
  } catch {
27
30
  return null;
28
31
  }
29
32
  if (!model?.price) return null;
30
- return getModelPricingForModel(provider, modelName, model);
33
+ return getModelPricingForModel(provider, pricedModel, model);
31
34
  };
32
35
  var getModelPricingForModel = (provider, modelName, model) => {
33
36
  if (!model.price) return null;