nolo-cli 0.149.0-alpha.1 → 0.151.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 (258) hide show
  1. package/{_executeModel-OW3H7ICR.js → _executeModel-T7ANHTUW.js} +134 -91
  2. package/accountResolver-7RYB4D2P.js +300 -0
  3. package/action-SXJD5N5R.js +23 -0
  4. package/{addContentAction-B2DRF7P6.js → addContentAction-ZV774PHH.js} +20 -14
  5. package/{addDialogAgentAction-2P2FLTLD.js → addDialogAgentAction-A6SMKAGH.js} +26 -22
  6. package/{agentDeleteCommand-7IDWF6E3.js → agentDeleteCommand-4L5KCKFY.js} +181 -93
  7. package/{agentEmailCommands-A6XBQZBN.js → agentEmailCommands-2IMMIRO2.js} +132 -112
  8. package/{agentGrantCommands-M3XFO6EN.js → agentGrantCommands-HOJ3JBBQ.js} +3 -3
  9. package/agentListCommands-TWFLUYIZ.js +802 -0
  10. package/{agentMachineCommands-DQPUIMAC.js → agentMachineCommands-KIWXWT6L.js} +58 -62
  11. package/{agentProviderCommands-YK2BIIXZ.js → agentProviderCommands-HL6MBLCL.js} +149 -2
  12. package/{agentPullCommand-HF4A42D4.js → agentPullCommand-FA43RBRU.js} +7 -7
  13. package/agentRecordCommands-727NPCRW.js +154 -0
  14. package/agentRunCommand-JASIG3FZ.js +183 -0
  15. package/{agentRunControl-2SKCR4SB.js → agentRunControl-IFM7IGMG.js} +10 -2
  16. package/{agentRuntimeLocal-AK2QVJHY.js → agentRuntimeLocal-KKSQJMTE.js} +47 -50
  17. package/{agentSlice-O4RUQUMT.js → agentSlice-SLV57QGU.js} +23 -16
  18. package/{appDeleteCommands-N3XEVVYC.js → appDeleteCommands-4PL4KYRN.js} +58 -59
  19. package/{appDeployCommands-AWFIXYVW.js → appDeployCommands-EEEXCEB6.js} +67 -63
  20. package/{appDeployStatusCommands-CZRON2FO.js → appDeployStatusCommands-35ZX7T66.js} +56 -56
  21. package/{appGetCommands-XQIUY4TD.js → appGetCommands-WFCHXJWF.js} +56 -56
  22. package/{appListCommands-NNG4H36Y.js → appListCommands-XY2U6DPF.js} +57 -59
  23. package/{authCommand-UBJ4EWYZ.js → authCommand-QYN47CQD.js} +371 -68
  24. package/{authCommands-H6WKKCRW.js → authCommands-77CHYBGF.js} +12 -9
  25. package/{builtinSkillRegistry-ZMF6YGNO.js → builtinSkillRegistry-TDQ6JB2E.js} +13 -11
  26. package/{chromeCommands-2N6MEWRU.js → chromeCommands-OBBNJCLS.js} +314 -13
  27. package/chromeOpsCommands-3Z34RKSE.js +472 -0
  28. package/{chunk-ALXHV7NK.js → chunk-2GGXHQIW.js} +43 -4
  29. package/{localRuntimeAuthority-5W6IJRAD.js → chunk-2IXDJNZI.js} +154 -75
  30. package/{chunk-IVZJWTDI.js → chunk-36OMEXXR.js} +89 -21
  31. package/{chunk-H6A6X4EK.js → chunk-3MZAGMYY.js} +16 -0
  32. package/chunk-3PVYUPXK.js +40 -0
  33. package/chunk-3SZA4U64.js +1192 -0
  34. package/{chunk-ID7LNBWR.js → chunk-3T4ZG6AC.js} +1920 -644
  35. package/{chunk-GNMAFAIS.js → chunk-44WXLHFI.js} +1 -1
  36. package/{chunk-AGGIDPCZ.js → chunk-4JH2UMJR.js} +6 -0
  37. package/chunk-4LCOCOR5.js +50 -0
  38. package/chunk-4YRTZIVN.js +871 -0
  39. package/{chunk-N7J63Q6C.js → chunk-56GBUMO5.js} +10 -1
  40. package/{chunk-W7XHHYWM.js → chunk-5BHQICF2.js} +5 -1
  41. package/{chunk-XUWRURDF.js → chunk-5EBLANFT.js} +1 -1
  42. package/{chunk-3AH7LNUB.js → chunk-5EMSBTQ6.js} +33 -14
  43. package/{chunk-YRRASA5Q.js → chunk-5MM7NNO6.js} +113 -52
  44. package/chunk-5MMAK75Q.js +15 -0
  45. package/{chunk-TXH4IWJL.js → chunk-626KHJNX.js} +20 -11
  46. package/{chunk-M5PVFLD4.js → chunk-64K7WX26.js} +90 -21
  47. package/{chunk-AKG5W4LG.js → chunk-6CCFTVBP.js} +76 -221
  48. package/chunk-6MJNEXUU.js +614 -0
  49. package/{chunk-62IL3KQV.js → chunk-6MXDOUMH.js} +15 -3
  50. package/{chunk-QOKAKDPE.js → chunk-6Q7UTJKR.js} +6 -94
  51. package/chunk-6QDYSCPW.js +223 -0
  52. package/{chunk-HYZIYH2H.js → chunk-74RAWNQN.js} +56 -63
  53. package/chunk-7DPNBQSV.js +9 -0
  54. package/{chunk-IAESIMK7.js → chunk-A4MW3YZL.js} +10 -14
  55. package/{chunk-OMRJYNCI.js → chunk-AG7MCDLR.js} +26 -31
  56. package/chunk-AGIM7IMJ.js +147 -0
  57. package/{chunk-7CHC4W22.js → chunk-AIZE5TDM.js} +3 -3
  58. package/chunk-AJ3G7X2K.js +7012 -0
  59. package/{chunk-5GVBDNTO.js → chunk-AU7AXHUL.js} +1 -1
  60. package/{chunk-4H22P2JV.js → chunk-AUIJZACN.js} +2073 -1275
  61. package/{chunk-CIF4X6ZM.js → chunk-AWVFQMOV.js} +25 -3
  62. package/{chunk-YAQJJDC2.js → chunk-BJEZC5RA.js} +214 -51
  63. package/{chunk-RYZINGPM.js → chunk-BPMPOFWP.js} +347 -235
  64. package/{chunk-YUNJN43V.js → chunk-BU2YQBV4.js} +215 -28
  65. package/{chunk-XPRWFQQK.js → chunk-CBHGZRCE.js} +38 -12
  66. package/{chunk-Y3PMXGLH.js → chunk-CHCS6XPJ.js} +365 -144
  67. package/chunk-CHOZJMJS.js +78 -0
  68. package/chunk-CYJWI3NH.js +119 -0
  69. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  70. package/{chunk-3SV7RM24.js → chunk-D2QN6CTI.js} +117 -72
  71. package/{chunk-TZZ2WRBL.js → chunk-DFDXM2Y4.js} +20 -16
  72. package/{chunk-5TEEECZM.js → chunk-E2AKSW7L.js} +10 -7
  73. package/{chunk-RSEEDUMS.js → chunk-EDX5XSJM.js} +2 -2
  74. package/{chunk-QDSINZM3.js → chunk-EUGTFFO6.js} +2 -23
  75. package/{chunk-UNYJU5L6.js → chunk-EYLGAEB4.js} +5 -1
  76. package/{chunk-CU3QB4HW.js → chunk-EYWJT7A2.js} +12 -12
  77. package/{chunk-BNGW5ASC.js → chunk-EZVK3N5L.js} +66 -18
  78. package/{chunk-6FGTMQCL.js → chunk-F32Z66T4.js} +6 -10
  79. package/{chunk-ZOVKKMF6.js → chunk-FY4SDK2E.js} +1 -1
  80. package/chunk-G6OOUQWJ.js +417 -0
  81. package/{chunk-PQWU42UQ.js → chunk-GCKHQECX.js} +6 -6
  82. package/chunk-GKXCHNTE.js +15 -0
  83. package/{chunk-P6GMCCAT.js → chunk-GQV5KHJU.js} +78 -12
  84. package/{chunk-B2XUQXQX.js → chunk-HIQ4GF53.js} +191 -68
  85. package/{chunk-GMZLP5DV.js → chunk-HNUWUO75.js} +30 -19
  86. package/{chunk-UASIEDKM.js → chunk-I2XLRXVX.js} +36 -31
  87. package/{chunk-5UTFL4QJ.js → chunk-I2ZMGXXF.js} +10 -5
  88. package/chunk-I42VC5KR.js +15 -0
  89. package/{chunk-3BXNTXYI.js → chunk-I4SN4NUQ.js} +1199 -56
  90. package/chunk-IA7TRNNR.js +11 -0
  91. package/{chunk-WIWM4FE3.js → chunk-IJERIUXS.js} +55 -748
  92. package/{chunk-BIDGLJQ3.js → chunk-IK2TSJQA.js} +45 -8
  93. package/{chunk-CPUFH46E.js → chunk-ILU2NPWY.js} +10 -10
  94. package/{chunk-SLLGJZDT.js → chunk-ISQL4V7C.js} +4 -4
  95. package/chunk-IT3ZZRJE.js +12 -0
  96. package/{chunk-DY7ANLKG.js → chunk-JKMLSTZK.js} +43 -12
  97. package/{chunk-6TPOEJMQ.js → chunk-JZX2XLKC.js} +64 -23
  98. package/{chunk-27ONFIEY.js → chunk-K2AER7RX.js} +19 -12
  99. package/{chunk-O2OWEFII.js → chunk-KFHQQ3NO.js} +1 -1
  100. package/{chunk-QXGPFY6J.js → chunk-LGN377P3.js} +27 -17
  101. package/{chunk-L36OWPP3.js → chunk-LIQJTQRN.js} +118 -139
  102. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  103. package/{chunk-5J3PYNUP.js → chunk-NYYFIKHI.js} +17 -3
  104. package/{chunk-6O4IK4V2.js → chunk-OFFL4DCR.js} +1 -1
  105. package/{chunk-B6SAMB33.js → chunk-OWYYDMGJ.js} +209 -9
  106. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  107. package/{chunk-CTUQJVQM.js → chunk-P5QACQDK.js} +1 -1
  108. package/{chunk-TB3MIBRC.js → chunk-PIDUNDFS.js} +572 -430
  109. package/{chunk-4JMDLJAD.js → chunk-PJNFNEJE.js} +114 -37
  110. package/chunk-PKZKOVA5.js +11507 -0
  111. package/{chunk-Z4CSIXYP.js → chunk-PLSVXHSA.js} +3 -3
  112. package/chunk-PWTNI4N7.js +47 -0
  113. package/chunk-QFEW2ULV.js +42 -0
  114. package/{chunk-RGNEEJ3Y.js → chunk-QLQ573SU.js} +35 -9
  115. package/chunk-QQ56R7KS.js +88 -0
  116. package/chunk-QYPE3TS3.js +43 -0
  117. package/{chunk-HTVYCXBP.js → chunk-RN2GPWN6.js} +354 -120
  118. package/{chunk-ATLTFRYJ.js → chunk-ROCUB2H2.js} +280 -98
  119. package/{chunk-4DPP773Q.js → chunk-RSHPU4PD.js} +59 -11
  120. package/chunk-RVWMAFIT.js +134 -0
  121. package/{chunk-ESHYE7WU.js → chunk-S73EPYNC.js} +10 -7
  122. package/{chunk-UQNS32WZ.js → chunk-SCMHQUMK.js} +1 -1
  123. package/chunk-SW4S4XYB.js +1794 -0
  124. package/{chunk-ZUEK6A6C.js → chunk-TTH4HOJD.js} +1973 -754
  125. package/chunk-TY3TIUJK.js +89 -0
  126. package/{chunk-X2QRZXZH.js → chunk-TYJ5XFEA.js} +4 -4
  127. package/{chunk-ALFH24P3.js → chunk-TYYRSFBG.js} +197 -155
  128. package/{chunk-MST6R3E4.js → chunk-U5GPBQDG.js} +34 -22
  129. package/chunk-U5ICMAFV.js +14110 -0
  130. package/{chunk-7KVZ5LDQ.js → chunk-UBUH2TCC.js} +18 -4
  131. package/chunk-UEILX4EV.js +15 -0
  132. package/chunk-UHTDNB5Y.js +140 -0
  133. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  134. package/{chunk-OHOVNO7I.js → chunk-UOKFKFPO.js} +6 -3
  135. package/{chunk-XISEYOGH.js → chunk-USHQX6VT.js} +5 -5
  136. package/chunk-UUPR3TD7.js +53 -0
  137. package/{chunk-3DAVPNFT.js → chunk-V4EE3D54.js} +122 -107
  138. package/{chunk-HDLLCBRF.js → chunk-VEA7H5FG.js} +2 -2
  139. package/chunk-VHGD6FHV.js +116 -0
  140. package/chunk-VIWDGTDA.js +8 -0
  141. package/{chunk-GOH6RW6F.js → chunk-VJXHL6MH.js} +34 -11
  142. package/{chunk-4XEYAFLY.js → chunk-VL5KOY2C.js} +623 -94
  143. package/{chunk-EADNWBAZ.js → chunk-VP3BINY7.js} +13 -0
  144. package/{chunk-DXHL7G2L.js → chunk-VWW6O2TL.js} +274 -93
  145. package/{chunk-EOARMOVD.js → chunk-W4S6OTSC.js} +6 -3
  146. package/chunk-WD4XYDYC.js +567 -0
  147. package/chunk-WJZOQR2J.js +151 -0
  148. package/{chunk-AUDNYVRC.js → chunk-XETG4RIX.js} +5 -5
  149. package/{chunk-MX574M24.js → chunk-XI7DGLUK.js} +4 -4
  150. package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
  151. package/chunk-XRUSXPCQ.js +514 -0
  152. package/{chunk-I4OPU5TK.js → chunk-XS47QOFV.js} +273 -11
  153. package/{chunk-S5XGT6GB.js → chunk-XZNCX52W.js} +30 -9
  154. package/{chunk-5OA5HMTL.js → chunk-YLMMECCH.js} +1 -1
  155. package/{chunk-CFT5HBGW.js → chunk-YVLQXTUB.js} +448 -12
  156. package/chunk-YVPQATSC.js +709 -0
  157. package/chunk-ZEZC7IIM.js +126 -0
  158. package/{chunk-ALGORS6Y.js → chunk-ZF6526IQ.js} +43 -8
  159. package/chunk-ZIWPQEFU.js +165 -0
  160. package/chunk-ZRAU6T47.js +56 -0
  161. package/{cliExecutor-AWYR3T33.js → cliExecutor-BWBF2MTI.js} +4 -3
  162. package/{clipboardy-BX4NMYHE.js → clipboardy-GCO3GT3I.js} +3 -8
  163. package/{commandRegistry-2KBOXZQC.js → commandRegistry-NBLZEMCW.js} +183 -107
  164. package/contentThunks-6AIWNSGO.js +84 -0
  165. package/{cooldownCommands-ZLEPIB4A.js → cooldownCommands-JFKTYS2D.js} +2 -2
  166. package/{createAgentAutomationAction-5UGTB26P.js → createAgentAutomationAction-4BUS65DZ.js} +53 -44
  167. package/createDialogAction-QAIKSCG4.js +76 -0
  168. package/{createPageAction-CDLDKPRM.js → createPageAction-DXCZ334C.js} +65 -54
  169. package/cursorProvider-YGGNMVWX.js +6123 -0
  170. package/{db-VQSAOWAO.js → db-2QOTXYGH.js} +11 -5
  171. package/{dbSlice-DQ32LYTJ.js → dbSlice-J37OGIXH.js} +19 -13
  172. package/{deleteFile-NX6QHCWZ.js → deleteFile-6JWDDRVP.js} +10 -6
  173. package/dialogCommands-YZLSJB6X.js +113 -0
  174. package/{dialogSlice-N3YB65G5.js → dialogSlice-PVUSMKFW.js} +53 -39
  175. package/{docCreateCommands-ZSLGVBZT.js → docCreateCommands-JB2RRMRJ.js} +54 -57
  176. package/{docDeleteCommands-5N4GVZBG.js → docDeleteCommands-AQENULNM.js} +56 -58
  177. package/{docReadCommands-YJSAA7AV.js → docReadCommands-DYD25YLQ.js} +53 -56
  178. package/{docStore-E3CEOV5Q.js → docStore-CSEBEMKP.js} +25 -16
  179. package/{docUpdateCommands-WEMLSW6W.js → docUpdateCommands-3GVS23QL.js} +54 -57
  180. package/{fetchMessages-67MEFPZR.js → fetchMessages-IIJWQ3HR.js} +5 -4
  181. package/{getPricing-NMMFT3YI.js → getPricing-FKK3F5EJ.js} +11 -9
  182. package/{handleSendMessageAction-DQAD5ERJ.js → handleSendMessageAction-G2TLYGC4.js} +422 -118
  183. package/index.js +11 -7
  184. package/{lib-FRRS27KN.js → lib-4YTWAGY7.js} +581 -248
  185. package/{localDialogRead-EBRS242U.js → localDialogRead-FSOMOPDZ.js} +2 -2
  186. package/localRuntimeAdapter-B4TAYYA7.js +244 -0
  187. package/localRuntimeAuthority-JDAD7CB6.js +16 -0
  188. package/{localRuntimeDb-3LRMNLCM.js → localRuntimeDb-CVC62PM5.js} +1 -1
  189. package/{machineCommands-HAP75VSG.js → machineCommands-6OBFD3XF.js} +503 -161
  190. package/{machineInfo-66ZFUMLE.js → machineInfo-UKPTZO5Y.js} +2 -2
  191. package/machineWsRunDispatch-OO7N3O3Y.js +169 -0
  192. package/{memberThunks-5ZXPR63F.js → memberThunks-66DH6ABQ.js} +25 -18
  193. package/{models-ZPU5EDF4.js → models-LAS4B2B5.js} +2 -2
  194. package/package.json +1 -1
  195. package/{providerPresetApply-DD6NGWW6.js → providerPresetApply-MY66I6NT.js} +10 -10
  196. package/{providerRegistry-XDRLMYGJ.js → providerRegistry-QOE2FT57.js} +13 -9
  197. package/{read-EPTJRAEF.js → read-DC4NUGN6.js} +12 -8
  198. package/{readDocTool-W4NDXNEX.js → readDocTool-NCJ5NT25.js} +1 -1
  199. package/{readlineWorkspace-7BC66QSX.js → readlineWorkspace-UIQN7JUR.js} +5017 -915
  200. package/{removeDialogAgentAction-OSYNZRX7.js → removeDialogAgentAction-E2H3OZU6.js} +29 -28
  201. package/{runAgentClientLoop-6E6UC3CE.js → runAgentClientLoop-GS3SGG37.js} +154 -97
  202. package/{runtimeDoctorCommands-ID23PNNZ.js → runtimeDoctorCommands-GIOGC5SC.js} +17 -17
  203. package/secretCommands-ZXZRLR3R.js +700 -0
  204. package/setDialogExtraReferencesAction-SITRPMYU.js +37 -0
  205. package/{setPrimaryDialogAgentAction-WZ7KI3YA.js → setPrimaryDialogAgentAction-U7N45TGC.js} +30 -29
  206. package/{chunk-SONWNI3L.js → settingThunks-Y7SVJOMZ.js} +223 -928
  207. package/{skillDiscovery-ZBU76COE.js → skillDiscovery-QC35EQY4.js} +2 -2
  208. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  209. package/{spaceCommands-UJOVU4XI.js → spaceCommands-ZR5BR3GX.js} +59 -59
  210. package/{streamAgentChatTurn-3UXPYFNX.js → streamAgentChatTurn-4XYC33KE.js} +309 -165
  211. package/{switchDialogAgentAction-GMR7WN3P.js → switchDialogAgentAction-OMGBD3N2.js} +26 -22
  212. package/{tableCommands-G7RV3RU3.js → tableCommands-U3QDY4L6.js} +19 -17
  213. package/{toolApiClient-CVGWM4PN.js → toolApiClient-7WSJJJBV.js} +6 -5
  214. package/tools-P77EE7Q4.js +124 -0
  215. package/tuiSummaryLlmCaller-BM3VSTBU.js +130 -0
  216. package/{updateCommands-4EHDLF5J.js → updateCommands-NQXAGFM7.js} +3 -3
  217. package/{updateDialogTitleAction-UPFV7TDT.js → updateDialogTitleAction-CIANVPZC.js} +102 -57
  218. package/workloadLifecycle-36DXRZKU.js +320 -0
  219. package/action-GI44T4DR.js +0 -31
  220. package/agentListCommands-IW3GQVUP.js +0 -427
  221. package/agentRecordCommands-VCA76W6B.js +0 -134
  222. package/agentRunCommand-YNLDKVR7.js +0 -161
  223. package/browser-image-compression-MFDTD7K6.js +0 -1763
  224. package/chatQueueReduxAdapter-TJRMXMYA.js +0 -186
  225. package/chromeOpsCommands-IXRLN57H.js +0 -289
  226. package/chunk-36KZDDO5.js +0 -2415
  227. package/chunk-ACQD6YI2.js +0 -25363
  228. package/chunk-CQ3WA2NE.js +0 -299
  229. package/chunk-CYSYR67N.js +0 -93
  230. package/chunk-JBTJAPUF.js +0 -35
  231. package/chunk-K2CSUCHJ.js +0 -620
  232. package/chunk-LTRXGFMS.js +0 -83
  233. package/chunk-M76ECQRD.js +0 -13658
  234. package/chunk-MEYIRKDN.js +0 -8967
  235. package/chunk-OCZKATRC.js +0 -129
  236. package/chunk-OTGFTBLI.js +0 -13
  237. package/chunk-PUOC4YRO.js +0 -394
  238. package/chunk-PZZTFEKK.js +0 -34
  239. package/chunk-URMS4XY2.js +0 -10
  240. package/chunk-UV6VISQJ.js +0 -20
  241. package/chunk-VJVNU77E.js +0 -83
  242. package/chunk-XYJSY4KG.js +0 -13807
  243. package/chunk-Y5GCAMGP.js +0 -9
  244. package/chunk-YPREESF4.js +0 -225
  245. package/contentThunks-BDIQRZR6.js +0 -73
  246. package/createDialogAction-B7VGVEVU.js +0 -66
  247. package/dialogCommands-G7YBVAMC.js +0 -102
  248. package/levelLazyShim-GZBKODGI.js +0 -7
  249. package/machineWsRunDispatch-L32G7C4P.js +0 -149
  250. package/serverStoreFactory-YMXDF4NI.js +0 -20
  251. package/setDialogExtraReferencesAction-M32UYNCG.js +0 -30
  252. package/settingSlice-Q6EKL7EQ.js +0 -204
  253. package/syncMapping-N6RGXGBW.js +0 -437
  254. package/tools-MKYDMWA4.js +0 -111
  255. package/tuiSummaryLlmCaller-3YFNHCTW.js +0 -128
  256. package/{chunk-SV5IJK6K.js → chunk-NBTY7YJF.js} +3 -3
  257. package/{chunk-2SYTUTLI.js → chunk-YBNHPX4S.js} +3 -3
  258. package/{offlineMarxistsAgentCommand-HGXZV4XJ.js → offlineMarxistsAgentCommand-2QTHJCHV.js} +4 -4
@@ -1,25 +1,37 @@
1
+ import {
2
+ DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS,
3
+ DEFAULT_USER_PREFERENCE_PROFILE,
4
+ normalizeAgentUpdateFieldList,
5
+ normalizePolicyLevelSetting,
6
+ normalizeSystemBuiltinSkills,
7
+ normalizeTonePresetSetting
8
+ } from "./chunk-ZIWPQEFU.js";
1
9
  import {
2
10
  fetchAndCacheTableRows
3
- } from "./chunk-36KZDDO5.js";
11
+ } from "./chunk-AJ3G7X2K.js";
4
12
  import {
5
13
  require_react
6
14
  } from "./chunk-YDH3FDFQ.js";
15
+ import {
16
+ createAsyncThunk,
17
+ createSelector
18
+ } from "./chunk-IJERIUXS.js";
19
+ import {
20
+ selectIdentityUserId
21
+ } from "./chunk-SEJ5OS6F.js";
7
22
  import {
8
23
  resolveBuiltinCapability,
9
24
  resolveBuiltinSkillEntry
10
- } from "./chunk-B2XUQXQX.js";
25
+ } from "./chunk-HIQ4GF53.js";
11
26
  import {
12
- toErrorMessage
13
- } from "./chunk-HNMXYYJR.js";
27
+ DEFAULT_SYSTEM_AGENT_CAPABILITIES
28
+ } from "./chunk-EUGTFFO6.js";
14
29
  import {
15
30
  asTrimmedNonEmptyStringArray
16
- } from "./chunk-3AH7LNUB.js";
31
+ } from "./chunk-I42VC5KR.js";
17
32
  import {
18
- createAsyncThunk
19
- } from "./chunk-WIWM4FE3.js";
20
- import {
21
- selectIdentityUserId
22
- } from "./chunk-SEJ5OS6F.js";
33
+ toErrorMessage
34
+ } from "./chunk-HNMXYYJR.js";
23
35
  import {
24
36
  asOptionalTrimmedString
25
37
  } from "./chunk-G3SUCT4W.js";
@@ -27,26 +39,6 @@ import {
27
39
  __toESM
28
40
  } from "./chunk-4VNS5WPM.js";
29
41
 
30
- // packages/core/abortableDelay.ts
31
- function waitForAbortableDelay(ms, signal) {
32
- const delayMs = Number.isFinite(ms) && ms >= 0 ? Math.round(ms) : 0;
33
- if (signal?.aborted) {
34
- return Promise.reject(new DOMException("Aborted", "AbortError"));
35
- }
36
- return new Promise((resolve, reject) => {
37
- const onAbort = () => {
38
- clearTimeout(timeoutId);
39
- signal?.removeEventListener("abort", onAbort);
40
- reject(new DOMException("Aborted", "AbortError"));
41
- };
42
- const timeoutId = setTimeout(() => {
43
- signal?.removeEventListener("abort", onAbort);
44
- resolve();
45
- }, delayMs);
46
- signal?.addEventListener("abort", onAbort, { once: true });
47
- });
48
- }
49
-
50
42
  // packages/ai/chat/parseMultilineSSE.ts
51
43
  function createSSEParser() {
52
44
  let buffer = "";
@@ -106,6 +98,247 @@ function createSSEParser() {
106
98
  }
107
99
  var parseMultilineSSE = createSSEParser();
108
100
 
101
+ // packages/core/abortableDelay.ts
102
+ function waitForAbortableDelay(ms, signal) {
103
+ const delayMs = Number.isFinite(ms) && ms >= 0 ? Math.round(ms) : 0;
104
+ if (signal?.aborted) {
105
+ return Promise.reject(new DOMException("Aborted", "AbortError"));
106
+ }
107
+ return new Promise((resolve, reject) => {
108
+ const onAbort = () => {
109
+ clearTimeout(timeoutId);
110
+ signal?.removeEventListener("abort", onAbort);
111
+ reject(new DOMException("Aborted", "AbortError"));
112
+ };
113
+ const timeoutId = setTimeout(() => {
114
+ signal?.removeEventListener("abort", onAbort);
115
+ resolve();
116
+ }, delayMs);
117
+ signal?.addEventListener("abort", onAbort, { once: true });
118
+ });
119
+ }
120
+
121
+ // packages/app/settings/fieldSelectors.ts
122
+ var selectMaxExecutionTime = (state) => state.settings.maxExecutionTime;
123
+ var selectGlobalPrompt = (state) => state.settings.globalPrompt;
124
+ var selectUserTonePreset = (state) => normalizeTonePresetSetting(state.settings.userTonePreset);
125
+ var selectKnowledgeCaptureLevel = (state) => normalizePolicyLevelSetting(
126
+ state.settings.knowledgeCaptureLevel,
127
+ DEFAULT_USER_PREFERENCE_PROFILE.knowledgeCaptureLevel
128
+ );
129
+ var selectSpaceContextLevel = (state) => state.settings.enableReadCurrentSpace === false ? 1 : normalizePolicyLevelSetting(
130
+ state.settings.spaceContextLevel,
131
+ DEFAULT_USER_PREFERENCE_PROFILE.spaceContextLevel
132
+ );
133
+ var selectAutoApproveSelfUpdateFields = createSelector(
134
+ [(state) => state.settings.autoApproveSelfUpdateFields],
135
+ (fields) => normalizeAgentUpdateFieldList(
136
+ fields,
137
+ DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS
138
+ )
139
+ );
140
+ var selectAiRecentContentLimit = (state) => state.settings.aiRecentContentLimit ?? 50;
141
+ var selectSystemBuiltinSkills = createSelector(
142
+ [(state) => state.settings.systemBuiltinSkills],
143
+ (systemBuiltinSkills) => normalizeSystemBuiltinSkills(
144
+ systemBuiltinSkills,
145
+ DEFAULT_SYSTEM_AGENT_CAPABILITIES
146
+ )
147
+ );
148
+
149
+ // packages/ai/tools/uiCardSchema.ts
150
+ var UI_CARD_VERSION = 1;
151
+ var MAX_BLOCKS = 32;
152
+ var MAX_TEXT_BYTES = 2e4;
153
+ var UI_CARD_MAX_BYTES = 1e5;
154
+ var UI_CARD_ENVELOPE_MAX_BYTES = UI_CARD_MAX_BYTES + 4096;
155
+ var MAX_COLLECTION_ITEMS = 500;
156
+ var MAX_JSON_DEPTH = 12;
157
+ var MAX_JSON_NODES = 2e3;
158
+ function isRecord(value) {
159
+ return value !== null && typeof value === "object" && !Array.isArray(value);
160
+ }
161
+ function hasOnlyKeys(value, allowed) {
162
+ return Object.keys(value).every((key) => allowed.includes(key));
163
+ }
164
+ function isText(value) {
165
+ return typeof value === "string" && new TextEncoder().encode(value).byteLength <= MAX_TEXT_BYTES;
166
+ }
167
+ function isStringArray(value, max = MAX_COLLECTION_ITEMS) {
168
+ return Array.isArray(value) && value.length <= max && value.every(isText);
169
+ }
170
+ function isJsonValue(value, depth, budget) {
171
+ budget.nodes += 1;
172
+ if (budget.nodes > MAX_JSON_NODES || depth > MAX_JSON_DEPTH) return false;
173
+ if (value === null || typeof value === "boolean") return true;
174
+ if (typeof value === "string") return isText(value);
175
+ if (typeof value === "number") return Number.isFinite(value);
176
+ if (Array.isArray(value)) return value.every((item) => isJsonValue(item, depth + 1, budget));
177
+ if (!isRecord(value)) return false;
178
+ for (const [key, item] of Object.entries(value)) {
179
+ if (["$ref", "$expr", "expression", "script"].includes(key)) return false;
180
+ if (!isText(key) || !isJsonValue(item, depth + 1, budget)) return false;
181
+ }
182
+ return true;
183
+ }
184
+ function isChoiceQuestion(value) {
185
+ if (!isRecord(value) || !hasOnlyKeys(value, ["id", "header", "question", "choices", "multiSelect", "allowOther", "required"])) return false;
186
+ if (!isText(value.id) || !value.id.trim() || !isText(value.question) || !value.question.trim()) return false;
187
+ if (value.header !== void 0 && !isText(value.header)) return false;
188
+ for (const flag of ["multiSelect", "allowOther", "required"]) {
189
+ if (value[flag] !== void 0 && typeof value[flag] !== "boolean") return false;
190
+ }
191
+ if (!Array.isArray(value.choices) || value.choices.length === 0 || value.choices.length > MAX_COLLECTION_ITEMS) return false;
192
+ const ids = /* @__PURE__ */ new Set();
193
+ for (const option of value.choices) {
194
+ if (!isRecord(option) || !hasOnlyKeys(option, ["id", "label", "detail", "recommended", "userMessage"])) return false;
195
+ if (!isText(option.label) || !option.label.trim()) return false;
196
+ if (option.id !== void 0) {
197
+ if (!isText(option.id) || !option.id.trim() || ids.has(option.id)) return false;
198
+ ids.add(option.id);
199
+ }
200
+ if (option.detail !== void 0 && !isText(option.detail)) return false;
201
+ if (option.userMessage !== void 0 && !isText(option.userMessage)) return false;
202
+ if (option.recommended !== void 0 && typeof option.recommended !== "boolean") return false;
203
+ }
204
+ return true;
205
+ }
206
+ function isAppUrl(value) {
207
+ try {
208
+ const parsed = new URL(value);
209
+ const hasWebProtocol = parsed.protocol === "http:" || parsed.protocol === "https:";
210
+ const authority = value.slice(value.indexOf("//") + 2).split(/[/?#]/, 1)[0];
211
+ return hasWebProtocol && authority.length > 0 && parsed.hostname.length > 0;
212
+ } catch {
213
+ return false;
214
+ }
215
+ }
216
+ function isBlock(value) {
217
+ if (!isRecord(value) || typeof value.type !== "string") return false;
218
+ switch (value.type) {
219
+ case "text":
220
+ return hasOnlyKeys(value, ["type", "text"]) && isText(value.text);
221
+ case "metric":
222
+ return hasOnlyKeys(value, ["type", "label", "value", "detail"]) && isText(value.label) && isText(value.value) && (value.detail === void 0 || isText(value.detail));
223
+ case "list":
224
+ return hasOnlyKeys(value, ["type", "title", "items"]) && (value.title === void 0 || isText(value.title)) && isStringArray(value.items);
225
+ case "table": {
226
+ const columns = value.columns;
227
+ const rows = value.rows;
228
+ return hasOnlyKeys(value, ["type", "columns", "rows"]) && isStringArray(columns, 50) && columns.length > 0 && Array.isArray(rows) && rows.length <= MAX_COLLECTION_ITEMS && rows.every((row) => isStringArray(row, 50) && row.length === columns.length);
229
+ }
230
+ case "choice":
231
+ return hasOnlyKeys(value, ["type", "question"]) && isChoiceQuestion(value.question);
232
+ case "action": {
233
+ if (!isRecord(value.action) || typeof value.action.type !== "string") return false;
234
+ if (value.action.type === "submit") {
235
+ if (!hasOnlyKeys(value, ["type", "action"]) || !hasOnlyKeys(value.action, ["type", "payload"])) return false;
236
+ if (value.action.payload === void 0) return true;
237
+ return isRecord(value.action.payload) && isJsonValue(value.action.payload, 0, { nodes: 0 });
238
+ }
239
+ if (value.action.type === "openApp") {
240
+ return hasOnlyKeys(value, ["type", "action"]) && hasOnlyKeys(value.action, ["type", "appId", "url"]) && isText(value.action.appId) && !!value.action.appId.trim() && (value.action.url === void 0 || isText(value.action.url) && isAppUrl(value.action.url));
241
+ }
242
+ return false;
243
+ }
244
+ default:
245
+ return false;
246
+ }
247
+ }
248
+ function parseUiCard(input) {
249
+ if (!isRecord(input) || !hasOnlyKeys(input, ["id", "version", "source", "blocks"])) return { ok: false, error: "invalid card shape" };
250
+ if (typeof input.id !== "string" || !/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(input.id)) return { ok: false, error: "invalid card id" };
251
+ if (input.version !== UI_CARD_VERSION || input.source !== "tool") return { ok: false, error: "unsupported card version or source" };
252
+ if (!Array.isArray(input.blocks) || input.blocks.length > MAX_BLOCKS || !input.blocks.every(isBlock)) return { ok: false, error: "invalid blocks" };
253
+ try {
254
+ if (new TextEncoder().encode(JSON.stringify(input)).byteLength > UI_CARD_MAX_BYTES) return { ok: false, error: "card too large" };
255
+ } catch {
256
+ return { ok: false, error: "unserializable card" };
257
+ }
258
+ return { ok: true, value: input };
259
+ }
260
+ function uiCardFallback(card) {
261
+ return card.blocks.map((block) => {
262
+ switch (block.type) {
263
+ case "text":
264
+ return block.text;
265
+ case "metric":
266
+ return `${block.label}: ${block.value}${block.detail ? ` (${block.detail})` : ""}`;
267
+ case "list":
268
+ return `${block.title ? `${block.title}
269
+ ` : ""}${block.items.map((item) => `- ${item}`).join("\n")}`;
270
+ case "table":
271
+ return [block.columns.join(" | "), ...block.rows.map((row) => row.join(" | "))].join("\n");
272
+ case "choice":
273
+ return `${block.question.question}
274
+ ${block.question.choices.map((item) => `- ${item.label}${item.detail ? ` \u2014 ${item.detail}` : ""}`).join("\n")}`;
275
+ case "action":
276
+ return block.action.type === "submit" ? `Submit action (not executed): ${block.action.payload === void 0 ? "{}" : JSON.stringify(block.action.payload)}` : `Open app (not authorized): ${block.action.appId}${block.action.url ? ` (${block.action.url})` : ""}`;
277
+ }
278
+ }).join("\n\n");
279
+ }
280
+
281
+ // packages/ai/tools/agentSkillConfig.ts
282
+ var MODES = [
283
+ "required",
284
+ "recommended",
285
+ "disabled"
286
+ ];
287
+ var DEFAULT_RECOMMENDED_SKILL_SLUGS = [
288
+ "worktree-isolation",
289
+ "systematic-investigation",
290
+ "show-me"
291
+ ];
292
+ var asMode = (value) => typeof value === "string" && MODES.includes(value) ? value : null;
293
+ var resolveAgentSkillConfig = (source) => {
294
+ const out = {};
295
+ const skills = source?.skills;
296
+ if (skills && typeof skills === "object" && !Array.isArray(skills)) {
297
+ for (const [rawSlug, rawMode] of Object.entries(skills)) {
298
+ const slug = typeof rawSlug === "string" ? rawSlug.trim() : "";
299
+ const mode = asMode(rawMode);
300
+ if (slug && mode) out[slug] = mode;
301
+ }
302
+ return out;
303
+ }
304
+ for (const slug of asTrimmedNonEmptyStringArray(source?.enabledPacks) ?? []) {
305
+ out[slug] = "required";
306
+ }
307
+ return out;
308
+ };
309
+ var resolveAgentRequiredPackIds = (source) => {
310
+ const config = resolveAgentSkillConfig(source);
311
+ return Object.keys(config).filter((slug) => config[slug] === "required");
312
+ };
313
+ var resolveAgentRecommendedSkillNames = (source, lookup) => {
314
+ const config = resolveAgentSkillConfig(source);
315
+ const resolve = lookup ?? defaultSkillTitleLookup;
316
+ const seen = /* @__PURE__ */ new Set();
317
+ const out = [];
318
+ const push = (slug) => {
319
+ const title = resolve(slug)?.title || slug;
320
+ if (seen.has(title)) return;
321
+ seen.add(title);
322
+ out.push(title);
323
+ };
324
+ for (const slug of Object.keys(config)) {
325
+ if (config[slug] !== "recommended") continue;
326
+ push(slug);
327
+ }
328
+ for (const slug of DEFAULT_RECOMMENDED_SKILL_SLUGS) {
329
+ if (Object.hasOwn(config, slug)) continue;
330
+ push(slug);
331
+ }
332
+ return out;
333
+ };
334
+ var defaultSkillTitleLookup = (slug) => {
335
+ const cap = resolveBuiltinCapability(slug);
336
+ if (cap) return { title: cap.title };
337
+ const skill = resolveBuiltinSkillEntry(slug);
338
+ return skill ? { title: skill.title } : null;
339
+ };
340
+ var isAgentSkillDisabled = (source, slug) => resolveAgentSkillConfig(source)[slug] === "disabled";
341
+
109
342
  // packages/core/clipMultilineText.ts
110
343
  function clipMultilineText(value, max) {
111
344
  const trimmed = value.trim();
@@ -174,67 +407,6 @@ var getToolResultErrorData = (error) => {
174
407
  };
175
408
  };
176
409
 
177
- // packages/ai/tools/agentSkillConfig.ts
178
- var MODES = [
179
- "required",
180
- "recommended",
181
- "disabled"
182
- ];
183
- var DEFAULT_RECOMMENDED_SKILL_SLUGS = [
184
- "worktree-isolation",
185
- "systematic-investigation",
186
- "show-me"
187
- ];
188
- var asMode = (value) => typeof value === "string" && MODES.includes(value) ? value : null;
189
- var resolveAgentSkillConfig = (source) => {
190
- const out = {};
191
- const skills = source?.skills;
192
- if (skills && typeof skills === "object" && !Array.isArray(skills)) {
193
- for (const [rawSlug, rawMode] of Object.entries(skills)) {
194
- const slug = typeof rawSlug === "string" ? rawSlug.trim() : "";
195
- const mode = asMode(rawMode);
196
- if (slug && mode) out[slug] = mode;
197
- }
198
- return out;
199
- }
200
- for (const slug of asTrimmedNonEmptyStringArray(source?.enabledPacks) ?? []) {
201
- out[slug] = "required";
202
- }
203
- return out;
204
- };
205
- var resolveAgentRequiredPackIds = (source) => {
206
- const config = resolveAgentSkillConfig(source);
207
- return Object.keys(config).filter((slug) => config[slug] === "required");
208
- };
209
- var resolveAgentRecommendedSkillNames = (source, lookup) => {
210
- const config = resolveAgentSkillConfig(source);
211
- const resolve = lookup ?? defaultSkillTitleLookup;
212
- const seen = /* @__PURE__ */ new Set();
213
- const out = [];
214
- const push = (slug) => {
215
- const title = resolve(slug)?.title || slug;
216
- if (seen.has(title)) return;
217
- seen.add(title);
218
- out.push(title);
219
- };
220
- for (const slug of Object.keys(config)) {
221
- if (config[slug] !== "recommended") continue;
222
- push(slug);
223
- }
224
- for (const slug of DEFAULT_RECOMMENDED_SKILL_SLUGS) {
225
- if (Object.hasOwn(config, slug)) continue;
226
- push(slug);
227
- }
228
- return out;
229
- };
230
- var defaultSkillTitleLookup = (slug) => {
231
- const cap = resolveBuiltinCapability(slug);
232
- if (cap) return { title: cap.title };
233
- const skill = resolveBuiltinSkillEntry(slug);
234
- return skill ? { title: skill.title } : null;
235
- };
236
- var isAgentSkillDisabled = (source, slug) => resolveAgentSkillConfig(source)[slug] === "disabled";
237
-
238
410
  // packages/ai/tools/toolRunStore.ts
239
411
  var import_react = __toESM(require_react());
240
412
  var createToolRunId = () => `toolrun_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
@@ -345,7 +517,7 @@ var executeToolRun = createAsyncThunk(
345
517
  if (!executionInput) {
346
518
  throw new Error(`ToolRun ${id} has no input to execute with.`);
347
519
  }
348
- const { findToolExecutor } = await import("./tools-MKYDMWA4.js");
520
+ const { findToolExecutor } = await import("./tools-P77EE7Q4.js");
349
521
  const { executor } = findToolExecutor(run.toolName);
350
522
  toolRunStarted({
351
523
  id: run.id,
@@ -369,7 +541,7 @@ var executeToolRun = createAsyncThunk(
369
541
  const latestState = thunkApi.getState();
370
542
  const userId = selectIdentityUserId(latestState);
371
543
  if (userId) {
372
- const { fetchUserSpaceMemberships } = await import("./memberThunks-5ZXPR63F.js");
544
+ const { fetchUserSpaceMemberships } = await import("./memberThunks-66DH6ABQ.js");
373
545
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
374
546
  }
375
547
  }
@@ -392,15 +564,25 @@ var executeToolRun = createAsyncThunk(
392
564
  );
393
565
 
394
566
  export {
567
+ UI_CARD_ENVELOPE_MAX_BYTES,
568
+ parseUiCard,
569
+ uiCardFallback,
570
+ createSSEParser,
571
+ waitForAbortableDelay,
572
+ resolveAgentRequiredPackIds,
573
+ resolveAgentRecommendedSkillNames,
574
+ isAgentSkillDisabled,
395
575
  clipMultilineText,
396
576
  fetchAndSerializeTable,
577
+ selectMaxExecutionTime,
578
+ selectGlobalPrompt,
579
+ selectUserTonePreset,
580
+ selectKnowledgeCaptureLevel,
581
+ selectSpaceContextLevel,
582
+ selectAutoApproveSelfUpdateFields,
583
+ selectAiRecentContentLimit,
397
584
  ToolResultError,
398
585
  getToolResultErrorData,
399
- resolveAgentRequiredPackIds,
400
- resolveAgentRecommendedSkillNames,
401
- isAgentSkillDisabled,
402
- waitForAbortableDelay,
403
- createSSEParser,
404
586
  createToolRunId,
405
587
  toolRunStarted,
406
588
  toolRunSetPending,
@@ -3,31 +3,34 @@ import {
3
3
  } from "./chunk-VIDPVFP3.js";
4
4
  import {
5
5
  getApproxPricePerImage
6
- } from "./chunk-AGGIDPCZ.js";
6
+ } from "./chunk-4JH2UMJR.js";
7
7
  import {
8
- getModelConfig
9
- } from "./chunk-3BXNTXYI.js";
10
- import {
11
- isPlatformHostedImageModel
12
- } from "./chunk-Y3PMXGLH.js";
8
+ asOptionalPositiveFiniteNumber
9
+ } from "./chunk-U6VC4MU4.js";
13
10
  import {
14
11
  asOptionalFiniteNumber
15
12
  } from "./chunk-WWC7I6TA.js";
16
13
  import {
17
- asOptionalPositiveFiniteNumber
18
- } from "./chunk-U6VC4MU4.js";
14
+ getModelConfig
15
+ } from "./chunk-I4SN4NUQ.js";
16
+ import {
17
+ isPlatformHostedImageModel,
18
+ isPlatformManagedProvider,
19
+ resolvePlatformEffectiveModel
20
+ } from "./chunk-CHCS6XPJ.js";
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;
@@ -38,6 +41,50 @@ var getModelPricingForModel = (provider, modelName, model) => {
38
41
  outputPrice: model.price.output
39
42
  };
40
43
  };
44
+ var resolveAgentTokenPriceBreakdown = (agent, isPlatformBilled) => {
45
+ const provider = typeof agent?.provider === "string" ? agent.provider : "";
46
+ const modelName = typeof agent?.model === "string" ? agent.model : "";
47
+ let catalog = null;
48
+ if (provider && modelName) {
49
+ const pricedModel = isPlatformBilled === true && isPlatformManagedProvider(provider, modelName) ? resolvePlatformEffectiveModel(modelName) ?? modelName : modelName;
50
+ try {
51
+ const model = getModelConfig(provider, pricedModel);
52
+ const price = model?.price;
53
+ if (price && typeof price.input === "number" && typeof price.output === "number") {
54
+ const rawCacheHit = typeof price.inputCacheHit === "number" ? price.inputCacheHit : price.cachingRead;
55
+ catalog = {
56
+ input: price.input,
57
+ output: price.output,
58
+ ...typeof rawCacheHit === "number" ? { cacheRead: rawCacheHit } : {},
59
+ ...typeof price.cachingWrite === "number" ? { cacheWrite: price.cachingWrite } : {}
60
+ };
61
+ }
62
+ } catch {
63
+ catalog = null;
64
+ }
65
+ }
66
+ const agentInput = asOptionalFiniteNumber(agent?.inputPrice);
67
+ const agentOutput = asOptionalFiniteNumber(agent?.outputPrice);
68
+ const hasAgentInput = agentInput !== void 0 && agentInput > 0;
69
+ const hasAgentOutput = agentOutput !== void 0 && agentOutput > 0;
70
+ const pickDisplayPrice = (agentPrice, hasAgentPrice, catalogPrice) => {
71
+ if (isPlatformBilled === true) {
72
+ return catalogPrice;
73
+ }
74
+ if (catalogPrice === void 0) return hasAgentPrice ? agentPrice : void 0;
75
+ if (!hasAgentPrice) return catalogPrice;
76
+ return Math.max(agentPrice, catalogPrice);
77
+ };
78
+ const inputPrice = pickDisplayPrice(agentInput, hasAgentInput, catalog?.input);
79
+ const outputPrice = pickDisplayPrice(agentOutput, hasAgentOutput, catalog?.output);
80
+ if (inputPrice === void 0 && outputPrice === void 0) return null;
81
+ return {
82
+ inputPrice: inputPrice ?? 0,
83
+ outputPrice: outputPrice ?? 0,
84
+ ...catalog?.cacheRead !== void 0 ? { cacheReadPrice: catalog.cacheRead } : {},
85
+ ...catalog?.cacheWrite !== void 0 ? { cacheWritePrice: catalog.cacheWrite } : {}
86
+ };
87
+ };
41
88
  var hasExplicitAgentPricing = (config) => [config?.inputPrice, config?.outputPrice].some(
42
89
  (value) => asOptionalPositiveFiniteNumber(value) !== void 0
43
90
  );
@@ -143,6 +190,7 @@ var formatCompactTurnPrice = (amount) => {
143
190
  export {
144
191
  getModelPricing,
145
192
  getModelPricingForModel,
193
+ resolveAgentTokenPriceBreakdown,
146
194
  hasExplicitAgentPricing,
147
195
  getPrices,
148
196
  getFinalPrice,