nolo-cli 0.225.0-alpha.1 → 0.225.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 (245) hide show
  1. package/{_executeModel-L5VHAXSU.js → _executeModel-UCWDB72C.js} +79 -73
  2. package/{action-CK64LS6S.js → action-24MZYW2B.js} +11 -8
  3. package/{addContentAction-EQXMFNPR.js → addContentAction-HEMCSSHT.js} +14 -13
  4. package/{addDialogAgentAction-RSDZDASD.js → addDialogAgentAction-SQYDOXHA.js} +15 -14
  5. package/{agentDeleteCommand-4WC7INCX.js → agentDeleteCommand-P7O3ACNJ.js} +131 -124
  6. package/{agentEmailCommands-3XFR6WY7.js → agentEmailCommands-A5BRSYWK.js} +134 -123
  7. package/{agentFavoriteCommands-2LKGKSUD.js → agentFavoriteCommands-7LOP3HUD.js} +5 -5
  8. package/{agentGrantCommands-QQV4N4JW.js → agentGrantCommands-L6O2HVJI.js} +5 -5
  9. package/{agentListCommands-BBCP5XYW.js → agentListCommands-LDRCOOMO.js} +112 -496
  10. package/{agentMachineCommands-YZDCOLQL.js → agentMachineCommands-AYL53KJV.js} +65 -58
  11. package/{agentProviderCommands-7BSJH7TO.js → agentProviderCommands-N5EA3ED2.js} +6 -6
  12. package/{agentPullCommand-XN6ZPBUW.js → agentPullCommand-QQQZSC6S.js} +6 -6
  13. package/agentRecordCommands-FICBZ57C.js +188 -0
  14. package/{agentRunCommand-NHYBV4G5.js → agentRunCommand-CTXQGDUM.js} +135 -120
  15. package/{agentRunControl-7A2FOXIJ.js → agentRunControl-CO6BASZF.js} +20 -14
  16. package/{agentRuntimeLocal-GSTYFEX4.js → agentRuntimeLocal-5YN4D5WT.js} +48 -41
  17. package/{agentSlice-O6IGTM3Y.js → agentSlice-DJ5D4DU4.js} +18 -17
  18. package/{appDeleteCommands-L7HL4AWF.js → appDeleteCommands-B4E7N7M2.js} +58 -51
  19. package/{appDeployCommands-SGSUNFZR.js → appDeployCommands-E4DTXRRM.js} +58 -51
  20. package/{appDeployStatusCommands-AAA3XD54.js → appDeployStatusCommands-FCNHYHZM.js} +58 -51
  21. package/{appGetCommands-LN72GAOA.js → appGetCommands-4DXSQHUZ.js} +58 -51
  22. package/{appListCommands-IJQQ3VND.js → appListCommands-2NN5E4F6.js} +58 -51
  23. package/{authCommand-7JXW54U4.js → authCommand-47DR6GZT.js} +33 -28
  24. package/{authCommands-YDNAIDEY.js → authCommands-ZZ3L5IFM.js} +16 -11
  25. package/{builtinSkillRegistry-PXH7EGQB.js → builtinSkillRegistry-AYWYQVA4.js} +5 -5
  26. package/{chromeOpsCommands-YKX2QX3A.js → chromeOpsCommands-VZWAY2KR.js} +6 -6
  27. package/{chunk-YDBMZ7FV.js → chunk-24GVXSWK.js} +3 -3
  28. package/{chunk-JCK3EFZS.js → chunk-25OCZXSX.js} +63 -32
  29. package/{chunk-P2ZLUIW2.js → chunk-2BSLGODA.js} +350 -25
  30. package/chunk-2SXN7LAY.js +15 -0
  31. package/{chunk-N5PQJKCY.js → chunk-2XMKW2OY.js} +13 -12
  32. package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
  33. package/{chunk-UKS7D2NL.js → chunk-3NFWMSTA.js} +111 -26
  34. package/{chunk-TZEP5J4A.js → chunk-3V6JT6WN.js} +2935 -1412
  35. package/{chunk-SBVTHMEG.js → chunk-4FE3IWRE.js} +1 -1
  36. package/{chunk-4JVNURX4.js → chunk-4YFC3DWW.js} +68 -16
  37. package/chunk-4ZCTKB27.js +31 -0
  38. package/chunk-53W5BXLN.js +340 -0
  39. package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
  40. package/{chunk-VFBVA3U2.js → chunk-5TJE4QCL.js} +131 -40
  41. package/{chunk-YXMBJ7UH.js → chunk-6BGJHJRN.js} +21 -21
  42. package/chunk-6D25V6CB.js +133 -0
  43. package/chunk-6RSNVJGO.js +279 -0
  44. package/{chunk-IZIN2UNJ.js → chunk-6X3CS6NJ.js} +203 -24
  45. package/{chunk-XZGQ6ZCV.js → chunk-6XBOPKUH.js} +27 -90
  46. package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
  47. package/{chunk-62HXNQVV.js → chunk-776CXKMX.js} +1 -1
  48. package/chunk-7NIBQ4HY.js +138 -0
  49. package/{chunk-7Z6EW7AH.js → chunk-7OTNBI77.js} +13 -6
  50. package/{chunk-HOK3ILHA.js → chunk-7Q7MKJZN.js} +590 -330
  51. package/{chunk-KZU52OJ5.js → chunk-7U2TFUWW.js} +6 -6
  52. package/{chunk-IUD7YR3B.js → chunk-B72AFRR2.js} +15 -15
  53. package/{chunk-4HFTBHBF.js → chunk-BDERPCJW.js} +8 -8
  54. package/chunk-BEM6LPD2.js +734 -0
  55. package/chunk-BIDSIRTS.js +307 -0
  56. package/{chunk-6J4TTPS2.js → chunk-BIJTI5SX.js} +5 -5
  57. package/chunk-BWW6WRX6.js +1438 -0
  58. package/{chunk-AGP3YSEC.js → chunk-C3GOEQJF.js} +46 -1
  59. package/chunk-C5A54QS7.js +108 -0
  60. package/{chunk-MOMR7NMG.js → chunk-C646JEUV.js} +2 -2
  61. package/{chunk-YI5CDUJD.js → chunk-CT6GT2BG.js} +9 -9
  62. package/{chunk-PVZY6P3S.js → chunk-CZLSTOVM.js} +2 -2
  63. package/{chunk-LJSNEV7M.js → chunk-DGUUOHBF.js} +8 -8
  64. package/{chunk-C4WTX5TU.js → chunk-DIBQXNGW.js} +2 -2
  65. package/{chunk-YFLVRVYK.js → chunk-DLT2DN4M.js} +1 -1
  66. package/{chunk-K44HIUBX.js → chunk-DLTMAXLF.js} +13 -13
  67. package/chunk-DVYAFH2Q.js +103 -0
  68. package/{chunk-SOG7OEXX.js → chunk-DWWUVRB5.js} +1 -1
  69. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  70. package/{chunk-GNHMRBYZ.js → chunk-EBKHA63G.js} +106 -14
  71. package/{chunk-KC4SCKXO.js → chunk-EIFSCI4C.js} +990 -1370
  72. package/{chunk-F3YK7KIU.js → chunk-EW37CXCQ.js} +4 -4
  73. package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
  74. package/{chunk-2VUZSVAS.js → chunk-F3FQPVHE.js} +57 -20
  75. package/{chunk-ZRAARRA3.js → chunk-FCAMGBLY.js} +1399 -2978
  76. package/{chunk-AK5O76CC.js → chunk-FPMPWNVQ.js} +3 -3
  77. package/{chunk-WQEMD4Z4.js → chunk-FSIEHQNH.js} +420 -120
  78. package/{chunk-FNDSBM4J.js → chunk-FXX6VFMV.js} +571 -348
  79. package/{chunk-7XS4W5KP.js → chunk-G6OPRPXH.js} +128 -149
  80. package/{chunk-PMDVQBGA.js → chunk-GAHJLSDO.js} +14 -7
  81. package/{chunk-2TIQO6TC.js → chunk-GCVFX6ZL.js} +206 -308
  82. package/{chunk-P25E3CKY.js → chunk-H6CHPU6M.js} +4 -4
  83. package/chunk-HNWZJI4N.js +33394 -0
  84. package/{chunk-S2NTVGA2.js → chunk-I2OYPD3Y.js} +1 -1
  85. package/{chunk-KNIIRXHF.js → chunk-IPRPYKBP.js} +46 -8
  86. package/{chunk-C4VAR65S.js → chunk-IUXBKS5L.js} +200 -120
  87. package/{chunk-JVRQ6YVK.js → chunk-JBWXPACD.js} +1 -1
  88. package/{chunk-Z6USB65D.js → chunk-KGIIZXPL.js} +347 -14
  89. package/chunk-KK3FCYZM.js +647 -0
  90. package/{chunk-GBZ4YKEO.js → chunk-KOIDLCAQ.js} +8 -8
  91. package/{chunk-2ZKFCIJJ.js → chunk-LCQJH7KN.js} +1 -1
  92. package/{chunk-N5Z2V73W.js → chunk-LELADM5Q.js} +1 -1
  93. package/{chunk-4NA3YTBC.js → chunk-LMFMV5UC.js} +8 -8
  94. package/{chunk-XN23AUVU.js → chunk-LMZRXDWG.js} +8 -5
  95. package/{chunk-EWPDMS4N.js → chunk-LN4ZVSO7.js} +30 -15
  96. package/{chunk-GOAPXKQU.js → chunk-LT3DMEIB.js} +4 -4
  97. package/{chunk-GGKNJ42M.js → chunk-LYDEFPQP.js} +18 -108
  98. package/{chunk-FTQWYWUI.js → chunk-MDVP5TLI.js} +1 -1
  99. package/{chunk-EOWLBDY6.js → chunk-MM73SP4K.js} +1 -1
  100. package/chunk-MVOZ22RZ.js +26 -0
  101. package/{chunk-3QFLXA24.js → chunk-N6EN3HK3.js} +3 -3
  102. package/{chunk-D726I5AZ.js → chunk-NBB2EBQD.js} +2 -2
  103. package/{chunk-DISQCYPE.js → chunk-NL7J2J5Z.js} +6 -6
  104. package/{chunk-JM5C4EUA.js → chunk-NQQL2DKF.js} +6 -6
  105. package/{chunk-LS2MGTUS.js → chunk-NWWQY2J5.js} +15 -15
  106. package/{chunk-TXGQ4O5S.js → chunk-OATIWAKN.js} +20 -174
  107. package/{chunk-KYH7XW3K.js → chunk-OJRTTERA.js} +77 -2
  108. package/{chunk-VV7TXWOC.js → chunk-OYHJ4TW7.js} +6 -6
  109. package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
  110. package/{chunk-2VA6TU4I.js → chunk-QES2NCVM.js} +17 -14
  111. package/{chunk-WG2LFJYB.js → chunk-QGMIUVBT.js} +39 -30
  112. package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
  113. package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
  114. package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
  115. package/{chunk-AMEOV5VZ.js → chunk-S25VJYXV.js} +41 -35
  116. package/chunk-SR4FE5VD.js +9 -0
  117. package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
  118. package/{chunk-GVGOEMNV.js → chunk-T444ENEC.js} +3 -3
  119. package/{chunk-67BE44IS.js → chunk-TE2XH4KH.js} +1 -1
  120. package/{chunk-5RKUPJYL.js → chunk-TFGGNRT6.js} +11 -3
  121. package/{chunk-ZH6MUQEO.js → chunk-TTEBPPUV.js} +1 -1
  122. package/{chunk-QVBXJNZ2.js → chunk-TUSTONB3.js} +1 -1
  123. package/{chunk-AVHRSJUH.js → chunk-TXFYIWAW.js} +32 -25
  124. package/{chunk-KOXKKHFE.js → chunk-TXQVH72L.js} +9 -4
  125. package/{chunk-OBSEKCVK.js → chunk-U4VSBDO5.js} +88 -0
  126. package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
  127. package/{chunk-KDAGMRDA.js → chunk-UAHUJ4HH.js} +100 -32
  128. package/{chunk-BGGHA5DV.js → chunk-UAOFSUG7.js} +1 -1
  129. package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
  130. package/chunk-UKSKCDBG.js +62 -0
  131. package/{chunk-KEN3N2TN.js → chunk-VMJVAJ6W.js} +13 -10
  132. package/{chunk-SOF4OWDM.js → chunk-VS276URX.js} +0 -2
  133. package/chunk-WDWZPASX.js +29 -0
  134. package/chunk-WFGNWWJI.js +326 -0
  135. package/{chunk-UYOICCYG.js → chunk-WHO3LYDW.js} +64 -89
  136. package/{chunk-UJKTI5PG.js → chunk-WRKMXMU7.js} +2 -1
  137. package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
  138. package/{chunk-QLFCTYRH.js → chunk-X37RQEA3.js} +17 -10
  139. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  140. package/chunk-X7IA2B7R.js +166 -0
  141. package/{chunk-GIABSSWQ.js → chunk-XAFOLWLU.js} +4 -4
  142. package/{chunk-45LZIYXB.js → chunk-XNEDFWT4.js} +2 -2
  143. package/{chunk-EOJZGQAE.js → chunk-Y5RN44VH.js} +103 -100
  144. package/{chunk-OB6DVWPF.js → chunk-YFRJAE3R.js} +319 -95
  145. package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
  146. package/{chunk-3KNEE64G.js → chunk-YMCSR7PA.js} +14 -14
  147. package/chunk-YUZ2DAIH.js +34 -0
  148. package/chunk-Z6YTCDU4.js +24 -0
  149. package/{chunk-XQBIZRGW.js → chunk-ZBQ5UGYY.js} +3 -3
  150. package/{chunk-VREDDN25.js → chunk-ZQUCJBS4.js} +14 -9
  151. package/{chunk-UEKXWO7A.js → chunk-ZT3DYK5T.js} +15 -4
  152. package/{chunk-LM2PS3YS.js → chunk-ZTLTDUV6.js} +24 -11
  153. package/{chunk-KN3HEZIQ.js → chunk-ZVOL2MAJ.js} +1 -1
  154. package/{cliAgentConfigHelpers-KICKKNYQ.js → cliAgentConfigHelpers-RFR7ZCSK.js} +12 -12
  155. package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
  156. package/{cliEnvHelpers-VPSJ4XWC.js → cliEnvHelpers-CNMP3RDX.js} +1 -1
  157. package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
  158. package/{cliLocalAgentRecordReader-6FXGFBI3.js → cliLocalAgentRecordReader-AJ4UKHKT.js} +51 -45
  159. package/{commandRegistry-HJDPQSQ4.js → commandRegistry-IHWZVV4G.js} +98 -94
  160. package/{contentThunks-I6OR5ENG.js → contentThunks-YQRCBDKF.js} +38 -35
  161. package/{cooldownCommands-X7P5M2V5.js → cooldownCommands-W67DE765.js} +4 -4
  162. package/{createAgentAutomationAction-7BCCTWO5.js → createAgentAutomationAction-ERSDNR4R.js} +38 -35
  163. package/{createDialogAction-CU27KSCJ.js → createDialogAction-QXC7JZPE.js} +39 -37
  164. package/{createPageAction-CWRTEYVA.js → createPageAction-RLZ7776F.js} +40 -37
  165. package/{db-CS4ZJQKV.js → db-6NRZLEW2.js} +10 -7
  166. package/{dbSlice-ZJPDIFER.js → dbSlice-7M2ESEUO.js} +13 -12
  167. package/{deleteFile-Q3YDB4ML.js → deleteFile-WO6WSSNK.js} +10 -7
  168. package/{dialogCommands-OPTRZWTE.js → dialogCommands-UIRO4QNN.js} +62 -56
  169. package/dialogMessageRecord-OAV77LT7.js +7 -0
  170. package/{dialogNotifyCommand-77B57PL6.js → dialogNotifyCommand-VDUFYBZV.js} +14 -14
  171. package/{dialogSlice-XODSLDHY.js → dialogSlice-A4U3C76D.js} +36 -33
  172. package/{dialogUsageCommand-HTVPR2CX.js → dialogUsageCommand-SEC6UZWM.js} +3 -3
  173. package/{docCreateCommands-36WS33BK.js → docCreateCommands-MHPYTJWR.js} +56 -49
  174. package/{docDeleteCommands-C4CS4XLF.js → docDeleteCommands-VYULMBAQ.js} +58 -51
  175. package/{docReadCommands-QZMSFMPN.js → docReadCommands-FV3GGZ7V.js} +56 -49
  176. package/{docStore-TVN4SNVE.js → docStore-AWWI72FA.js} +15 -14
  177. package/{docUpdateCommands-BYI64HVV.js → docUpdateCommands-JNS3HX7F.js} +56 -49
  178. package/fetchMessages-TQEUZD7H.js +2 -2
  179. package/{getPricing-VNGFM4PN.js → getPricing-U5AR7ZHS.js} +5 -5
  180. package/{handleSendMessageAction-NSEMVHWX.js → handleSendMessageAction-WDJOUDNV.js} +68 -63
  181. package/{hostCredentialCreate-WBZY7DZB.js → hostCredentialCreate-H3FF2SAO.js} +123 -111
  182. package/index.js +56 -18
  183. package/keys-RWF7UCB4.js +2 -2
  184. package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
  185. package/{localDialogRead-SVTPA5GY.js → localDialogRead-3T2KMCRC.js} +1 -1
  186. package/{localRuntimeAdapter-OAIWERFA.js → localRuntimeAdapter-JAQQXZJP.js} +126 -113
  187. package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-7DKIT7UH.js} +4 -2
  188. package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
  189. package/{machineCommands-OI37ZUQ4.js → machineCommands-WYOFNB5I.js} +146 -120
  190. package/{machineWsRunDispatch-73HKPV6D.js → machineWsRunDispatch-Y7UIAZNM.js} +118 -107
  191. package/markdownToSlate-KIYM7B3P.js +8 -0
  192. package/mcpLocalAuthorizeCommand-SCYEFLRK.js +106 -0
  193. package/{memberThunks-JRYNONYV.js → memberThunks-DIITWU4M.js} +22 -17
  194. package/{memoryCommands-5WC3T66U.js → memoryCommands-BC6REPQB.js} +4 -4
  195. package/{models-H5NNZRLH.js → models-CINY5UZR.js} +2 -2
  196. package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
  197. package/package.json +1 -1
  198. package/{projectArchive-GVEARCOG.js → projectArchive-IZJXBW5N.js} +43 -40
  199. package/{providerPresetApply-J3WMRPD2.js → providerPresetApply-2QWXPJXZ.js} +6 -6
  200. package/{providerRegistry-KJGB5XWS.js → providerRegistry-W4LCKK6V.js} +6 -6
  201. package/{read-Q7GOHGNP.js → read-OBLJNMA2.js} +9 -8
  202. package/{readDocTool-Z5OQ6422.js → readDocTool-QQZ4DAER.js} +1 -1
  203. package/{readlineWorkspace-5DWUGNSU.js → readlineWorkspace-WF3SWZGR.js} +7055 -5248
  204. package/rememberExplicit-CPAPONSI.js +15 -0
  205. package/{removeDialogAgentAction-U3F2MNAY.js → removeDialogAgentAction-HC3SOY3G.js} +17 -16
  206. package/{runAgentClientLoop-RDXIPF34.js → runAgentClientLoop-Z7V6TA3O.js} +97 -72
  207. package/{runtimeDoctorCommands-UXKXYBW6.js → runtimeDoctorCommands-KX6YLPWV.js} +17 -17
  208. package/{secretCommands-LJXOOYA7.js → secretCommands-STRAX275.js} +4 -4
  209. package/{setDialogExtraReferencesAction-G3WSJ7EM.js → setDialogExtraReferencesAction-DDZUQPY6.js} +16 -15
  210. package/{setPrimaryDialogAgentAction-6FHAHZBB.js → setPrimaryDialogAgentAction-EB67OMAJ.js} +17 -16
  211. package/{settingThunks-AXTBX3Q5.js → settingThunks-TN6GFASU.js} +181 -62
  212. package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
  213. package/{spaceCommands-GUKMDRWN.js → spaceCommands-HBYQUVJI.js} +61 -54
  214. package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
  215. package/{streamAgentChatTurn-XEYQZPDJ.js → streamAgentChatTurn-CM7QQXOS.js} +178 -173
  216. package/{switchDialogAgentAction-UOFIAGPL.js → switchDialogAgentAction-XY5TKQQE.js} +15 -14
  217. package/{tableCommands-HITDSLHS.js → tableCommands-MXFL3JIT.js} +13 -10
  218. package/{toolApiClient-OGQEBQVX.js → toolApiClient-53YMJ2G6.js} +8 -6
  219. package/{tools-6DFTHCFX.js → tools-AT6H73LD.js} +66 -62
  220. package/tuiRestart-272SAYSK.js +41 -0
  221. package/{tuiSummaryLlmCaller-7WLUKNP2.js → tuiSummaryLlmCaller-K2OVRVHG.js} +20 -19
  222. package/{updateCommands-RJVCRSBP.js → updateCommands-O3BOVVVN.js} +8 -6
  223. package/{updateDialogTitleAction-AMSBV2H7.js → updateDialogTitleAction-PGY4UPLH.js} +38 -35
  224. package/{usageCommand-YPJ2ZI2F.js → usageCommand-SCF3ROV2.js} +4 -4
  225. package/{usageRebuildCommand-FERQO74C.js → usageRebuildCommand-K5WPIBA5.js} +5 -5
  226. package/webapi-24RZDIIQ.js +2488 -0
  227. package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-WJDUZLEO.js} +2 -2
  228. package/workContext-Y3ADAPZU.js +14 -0
  229. package/workContextAccess-UZHDLBUR.js +11 -0
  230. package/workContextWriteNotice-YCSSMHN4.js +7 -0
  231. package/agentRecordCommands-KLYKI4Z7.js +0 -177
  232. package/chunk-2THCNKE4.js +0 -147
  233. package/chunk-2WZXXAQD.js +0 -57
  234. package/chunk-5ZMIIR23.js +0 -265
  235. package/chunk-652XYZGP.js +0 -352
  236. package/chunk-BJF2MHJ3.js +0 -118
  237. package/chunk-KEPOVMF4.js +0 -91
  238. package/chunk-QZI44GWV.js +0 -776
  239. package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
  240. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  241. package/{chunk-SNBZZPYH.js → chunk-OQHIVPG4.js} +3 -3
  242. package/{chunk-47ITIXO7.js → chunk-USGHJSGO.js} +3 -3
  243. package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
  244. package/{offlineMarxistsAgentCommand-4IC3Y4C6.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +3 -3
  245. package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-HFJIN5IZ.js} +8 -8
@@ -1,21 +1,31 @@
1
1
  import {
2
2
  streamSseDataValues
3
3
  } from "./chunk-HNUWUO75.js";
4
- import {
5
- resolveToolImagePolicy
6
- } from "./chunk-KNIIRXHF.js";
7
4
  import {
8
5
  projectOpenAiToolImages
9
- } from "./chunk-E2BESSAW.js";
6
+ } from "./chunk-X4O7FJF5.js";
7
+ import {
8
+ resolveToolImagePolicy
9
+ } from "./chunk-IPRPYKBP.js";
10
10
  import {
11
11
  getAntigravityUserAgent,
12
12
  readAntigravityProjectId,
13
13
  resolveAntigravityCloudCodeBaseUrl
14
- } from "./chunk-EWPDMS4N.js";
14
+ } from "./chunk-LN4ZVSO7.js";
15
15
  import {
16
16
  asOptionalTrimmedString
17
17
  } from "./chunk-G3SUCT4W.js";
18
18
 
19
+ // packages/agent-runtime/types.ts
20
+ var AGENT_PROMPT_IN_MESSAGES = Symbol("agent-prompt-in-messages");
21
+ function hasAssembledAgentPrompt(messages) {
22
+ return messages.some((raw) => {
23
+ if (!raw || typeof raw !== "object") return false;
24
+ const message = raw;
25
+ return message.role === "system" && message[AGENT_PROMPT_IN_MESSAGES] === true;
26
+ });
27
+ }
28
+
19
29
  // packages/core/chat/upstreamErrorBody.ts
20
30
  function parseUpstreamErrorBody(errorText, statusText) {
21
31
  if (errorText) {
@@ -41,53 +51,115 @@ var WIRE_PROFILES = {
41
51
  // Antigravity discovery exposes 3.7 Flash as one tiered wire model.
42
52
  // The UI labels its effort variants (Low/Medium/High), but the literal
43
53
  // -medium/-high ids return 404 from streamGenerateContent.
44
- "gemini-3.7-flash-tiered": { modelEnum: "MODEL_PLACEHOLDER_M301", maxOutputTokens: 65536 },
54
+ "gemini-3.7-flash-tiered": {
55
+ modelEnum: "MODEL_PLACEHOLDER_M301",
56
+ maxOutputTokens: 65536
57
+ },
45
58
  // Gemini 3.8 Flash 沿用 3.7 的 tiered 兼容策略:仓库内暂无 Antigravity discovery
46
59
  // 证据确认 3.8 的 wire modelEnum,禁止虚构,先只声明同档输出上限;enum 待
47
60
  // discovery 证据到位后补齐。
48
61
  "gemini-3.8-flash-tiered": { maxOutputTokens: 65536 },
49
- // Gemini 4 Argon:fetchAvailableModels(2026-10 实测)仅返回键 `gemini-4-argon-disabled`
50
- // (MODEL_PLACEHOLDER_M421,maxOutputTokens 65536,disabled=true,提示「仅 Ultra 订阅可用」)。
51
- // 该键名带 -disabled 后缀,不是已验证可调用的 wire id:对 streamGenerateContent 用
52
- // gemini-4-argon / -disabled / -tiered / -low 均返回 404。因此这里以 logical id 作为
53
- // 透传 wire id(开放后若 discovery 给出真实 id,只需改这一行与 resolve 分支),
54
- // enum 取自 discovery 的 M421,不凭空推测 low/medium/high 档位 id。
55
- // 2026-10-13 实测:UA 升到官方 2.23.1 后 discovery 与 2.18.1 完全一致(仍仅 gemini-4-argon-disabled,
56
- // disabled=true,tagTitle "Unavailable",tagDescription "currently available to Ultra plan subscribers"),
57
- // streamGenerateContent 仍 404;loadCodeAssist currentTier=free-tier,账号非 Ultra,故保持占位映射。
58
- "gemini-4-argon": { modelEnum: "MODEL_PLACEHOLDER_M421", maxOutputTokens: 65536 },
62
+ // Discovery (2026-11-16) exposes separate enabled Argon effort variants.
63
+ "gemini-4-argon-low": {
64
+ modelEnum: "MODEL_PLACEHOLDER_M419",
65
+ maxOutputTokens: 65536
66
+ },
67
+ "gemini-4-argon-medium": {
68
+ modelEnum: "MODEL_PLACEHOLDER_M418",
69
+ maxOutputTokens: 65536
70
+ },
71
+ "gemini-4-argon-high": {
72
+ modelEnum: "MODEL_PLACEHOLDER_M417",
73
+ maxOutputTokens: 65536
74
+ },
75
+ // Discovery (2026-11-17) exposes Carbon effort variants with their own enums and a
76
+ // 262144 output cap (Argon caps at 65536). 裸 gemini-4-carbon 不在 discovery 里,
77
+ // 必须折叠到 effort 变体,否则上游回 404。
78
+ "gemini-4-carbon-low": {
79
+ modelEnum: "MODEL_PLACEHOLDER_M438",
80
+ maxOutputTokens: 262144
81
+ },
82
+ "gemini-4-carbon-medium": {
83
+ modelEnum: "MODEL_PLACEHOLDER_M437",
84
+ maxOutputTokens: 262144
85
+ },
86
+ "gemini-4-carbon-high": {
87
+ modelEnum: "MODEL_PLACEHOLDER_M427",
88
+ maxOutputTokens: 262144
89
+ },
90
+ // Antigravity discovery 暴露 -medium / -high 变体;尚无 modelEnum 证据时不虚构 enum,仅声明 65536 输出上限。
91
+ "gemini-4-hydrogen-medium": { maxOutputTokens: 65536 },
92
+ "gemini-4-hydrogen-high": { maxOutputTokens: 65536 },
59
93
  "gemini-3.6-flash-low": { maxOutputTokens: 65536 },
60
94
  "gemini-3.6-flash-medium": { maxOutputTokens: 65536 },
61
95
  "gemini-3.6-flash-high": { maxOutputTokens: 65536 },
62
96
  // 旧模型 wire 映射保留:存量自定义 agent 仍可能引用(注册表已下线不影响此处)。
63
- "gemini-3.5-flash-extra-low": { modelEnum: "MODEL_PLACEHOLDER_M187", maxOutputTokens: 65536 },
64
- "gemini-3.5-flash-low": { modelEnum: "MODEL_PLACEHOLDER_M20", maxOutputTokens: 65536 },
65
- "gemini-3-flash-agent": { modelEnum: "MODEL_PLACEHOLDER_M132", maxOutputTokens: 65536 },
66
- "gemini-3.1-pro-low": { modelEnum: "MODEL_PLACEHOLDER_M36", maxOutputTokens: 65535 },
67
- "gemini-pro-agent": { modelEnum: "MODEL_PLACEHOLDER_M16", maxOutputTokens: 65535 },
97
+ "gemini-3.5-flash-extra-low": {
98
+ modelEnum: "MODEL_PLACEHOLDER_M187",
99
+ maxOutputTokens: 65536
100
+ },
101
+ "gemini-3.5-flash-low": {
102
+ modelEnum: "MODEL_PLACEHOLDER_M20",
103
+ maxOutputTokens: 65536
104
+ },
105
+ "gemini-3-flash-agent": {
106
+ modelEnum: "MODEL_PLACEHOLDER_M132",
107
+ maxOutputTokens: 65536
108
+ },
109
+ "gemini-3.1-pro-low": {
110
+ modelEnum: "MODEL_PLACEHOLDER_M36",
111
+ maxOutputTokens: 65535
112
+ },
113
+ "gemini-pro-agent": {
114
+ modelEnum: "MODEL_PLACEHOLDER_M16",
115
+ maxOutputTokens: 65535
116
+ },
68
117
  "claude-sonnet-5": { maxOutputTokens: 64e3 },
69
118
  "claude-sonnet-4-6": { maxOutputTokens: 64e3 },
70
119
  "claude-opus-4-6-thinking": { maxOutputTokens: 64e3 },
71
120
  "gemini-2.5-flash": { maxOutputTokens: 65536 },
72
121
  "gemini-2.5-pro": { maxOutputTokens: 65536 }
73
122
  };
74
- function resolveAntigravityWireModel(logicalModelId) {
123
+ function resolveAntigravityWireModel(logicalModelId, reasoningEffort) {
75
124
  const id = logicalModelId.trim();
76
125
  const lower = id.toLowerCase();
77
126
  if (lower === "gemini-3.5-flash") {
78
127
  const wireModelId = "gemini-3.5-flash-low";
79
128
  return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
80
129
  }
81
- if (lower === "gemini-3.7-flash" || ["gemini-3.7-flash-low", "gemini-3.7-flash-medium", "gemini-3.7-flash-high"].includes(lower)) {
130
+ if (lower === "gemini-3.7-flash" || [
131
+ "gemini-3.7-flash-low",
132
+ "gemini-3.7-flash-medium",
133
+ "gemini-3.7-flash-high"
134
+ ].includes(lower)) {
82
135
  const wireModelId = "gemini-3.7-flash-tiered";
83
136
  return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
84
137
  }
85
- if (lower === "gemini-3.8-flash" || ["gemini-3.8-flash-low", "gemini-3.8-flash-medium", "gemini-3.8-flash-high"].includes(lower)) {
138
+ if (lower === "gemini-3.8-flash" || [
139
+ "gemini-3.8-flash-low",
140
+ "gemini-3.8-flash-medium",
141
+ "gemini-3.8-flash-high"
142
+ ].includes(lower)) {
86
143
  const wireModelId = "gemini-3.8-flash-tiered";
87
144
  return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
88
145
  }
89
- if (lower === "gemini-4-argon" || ["gemini-4-argon-low", "gemini-4-argon-medium", "gemini-4-argon-high"].includes(lower)) {
90
- const wireModelId = "gemini-4-argon";
146
+ const gemini4 = /^gemini-4-(argon|carbon)(?:-(low|medium|high))?$/.exec(
147
+ lower
148
+ );
149
+ if (gemini4) {
150
+ const family = gemini4[1] ?? "argon";
151
+ const explicitEffort = gemini4[2];
152
+ const effort = reasoningEffort?.trim().toLowerCase();
153
+ const selected = explicitEffort ?? (effort === "low" || effort === "high" ? effort : "medium");
154
+ const wireModelId = `gemini-4-${family}-${selected}`;
155
+ return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
156
+ }
157
+ const hydrogen = /^gemini-4-hydrogen(?:-(medium|high))?$/.exec(lower);
158
+ if (hydrogen) {
159
+ const explicitEffort = hydrogen[1];
160
+ const effort = reasoningEffort?.trim().toLowerCase();
161
+ const selected = explicitEffort ?? (effort === "high" ? "high" : "medium");
162
+ const wireModelId = `gemini-4-hydrogen-${selected}`;
91
163
  return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
92
164
  }
93
165
  if (lower === "gemini-3.6-flash") {
@@ -608,10 +680,13 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
608
680
  const branchRequired = Array.isArray(sanitized.required) ? sanitized.required : [];
609
681
  requiredIntersection = requiredIntersection === void 0 ? [...branchRequired] : requiredIntersection.filter((r) => branchRequired.includes(r));
610
682
  }
611
- out.properties = {
683
+ const combinedProperties = {
612
684
  ...out.properties ?? {},
613
685
  ...mergedProperties
614
686
  };
687
+ out.properties = Object.fromEntries(
688
+ Object.keys(combinedProperties).sort().map((key) => [key, combinedProperties[key]])
689
+ );
615
690
  if (requiredIntersection !== void 0 && requiredIntersection.length > 0) {
616
691
  out.required = requiredIntersection;
617
692
  }
@@ -639,10 +714,13 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
639
714
  for (const branch of src.allOf) {
640
715
  const sanitized = sanitizeGeminiSchemaNode(branch, seen);
641
716
  if (out.type === void 0 || out.type === "object" || out.properties || sanitized.properties) {
642
- out.properties = {
717
+ const merged = {
643
718
  ...out.properties ?? {},
644
719
  ...sanitized.properties ?? {}
645
720
  };
721
+ out.properties = Object.fromEntries(
722
+ Object.keys(merged).sort().map((key) => [key, merged[key]])
723
+ );
646
724
  }
647
725
  if (Array.isArray(sanitized.required)) {
648
726
  out.required = [
@@ -656,11 +734,10 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
656
734
  if (typeof out.type !== "string") out.type = "object";
657
735
  }
658
736
  if (src.properties && typeof src.properties === "object") {
737
+ const rawProperties = src.properties;
659
738
  const properties = {};
660
- for (const [key, value] of Object.entries(
661
- src.properties
662
- )) {
663
- properties[key] = sanitizeGeminiSchemaNode(value, seen);
739
+ for (const key of Object.keys(rawProperties).sort()) {
740
+ properties[key] = sanitizeGeminiSchemaNode(rawProperties[key], seen);
664
741
  }
665
742
  out.properties = properties;
666
743
  if (typeof out.type !== "string") out.type = "object";
@@ -706,6 +783,7 @@ function convertOpenAiToolsToGemini(tools) {
706
783
  });
707
784
  }
708
785
  if (declarations.length === 0) return void 0;
786
+ declarations.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
709
787
  return [{ functionDeclarations: declarations }];
710
788
  }
711
789
  function createGeminiAccumulatorState() {
@@ -721,19 +799,25 @@ function applyGeminiChunk(chunk, state, options) {
721
799
  const response = "response" in chunk && chunk.response && typeof chunk.response === "object" ? chunk.response : chunk;
722
800
  if ("usageMetadata" in response && response.usageMetadata && typeof response.usageMetadata === "object") {
723
801
  const meta = response.usageMetadata;
724
- const prompt = typeof meta.promptTokenCount === "number" ? meta.promptTokenCount : 0;
802
+ const hasPromptTokenCount = typeof meta.promptTokenCount === "number" && Number.isFinite(meta.promptTokenCount);
803
+ const hasCachedContentTokenCount = typeof meta.cachedContentTokenCount === "number" && Number.isFinite(meta.cachedContentTokenCount);
804
+ const prompt = hasPromptTokenCount ? meta.promptTokenCount : 0;
725
805
  const candidates2 = typeof meta.candidatesTokenCount === "number" ? meta.candidatesTokenCount : 0;
726
806
  const total = typeof meta.totalTokenCount === "number" ? meta.totalTokenCount : prompt + candidates2;
727
- const cached = typeof meta.cachedContentTokenCount === "number" && Number.isFinite(meta.cachedContentTokenCount) ? (
807
+ const clampedPrompt = Math.max(0, Math.floor(prompt));
808
+ const cached = hasCachedContentTokenCount ? (
728
809
  // cached ⊆ prompt;对畸形上游防御性钳位,避免 cache_read > input 破坏归一化与计费
729
- Math.min(Math.max(0, Math.floor(meta.cachedContentTokenCount)), prompt)
810
+ Math.min(
811
+ Math.max(0, Math.floor(meta.cachedContentTokenCount)),
812
+ clampedPrompt
813
+ )
730
814
  ) : 0;
731
815
  const thoughts = typeof meta.thoughtsTokenCount === "number" ? meta.thoughtsTokenCount : Array.isArray(meta.candidatesTokensDetails) && typeof meta.candidatesTokensDetails[0]?.tokensCount === "number" ? meta.candidatesTokensDetails[0].tokensCount : void 0;
732
816
  state.usage = {
733
817
  prompt_tokens: prompt,
734
818
  completion_tokens: candidates2,
735
819
  total_tokens: total,
736
- ...cached > 0 ? { cache_read_input_tokens: cached } : {},
820
+ ...hasPromptTokenCount || hasCachedContentTokenCount ? { cache_read_input_tokens: cached } : {},
737
821
  ...thoughts !== void 0 ? {
738
822
  completion_tokens_details: {
739
823
  reasoning_tokens: thoughts
@@ -840,7 +924,7 @@ function buildGeminiGenerateContentRequest(args) {
840
924
  maxImagesPerRequest: toolImagePolicy.maxImagesPerRequest
841
925
  }
842
926
  );
843
- const request = { contents };
927
+ const request = {};
844
928
  if (systemTexts.length > 0) {
845
929
  request.systemInstruction = {
846
930
  role: "user",
@@ -852,6 +936,7 @@ function buildGeminiGenerateContentRequest(args) {
852
936
  request.tools = toolsResult;
853
937
  request.toolConfig = { functionCallingConfig: { mode: "AUTO" } };
854
938
  }
939
+ request.contents = contents;
855
940
  const generationConfig = {};
856
941
  if (typeof args.maxTokens === "number" && args.maxTokens > 0) {
857
942
  generationConfig.maxOutputTokens = args.maxTokens;
@@ -898,7 +983,10 @@ function buildCloudCodeAssistPayload(args) {
898
983
  );
899
984
  }
900
985
  const logicalModel = asOptionalTrimmedString(args.openAiBody.model) ?? asOptionalTrimmedString(args.agentConfig.model) ?? "gemini-3.1-pro";
901
- const { wireModelId: model, profile } = resolveAntigravityWireModel(logicalModel);
986
+ const { wireModelId: model, profile } = resolveAntigravityWireModel(
987
+ logicalModel,
988
+ asOptionalTrimmedString(args.openAiBody.reasoning_effort) ?? args.agentConfig.reasoning_effort
989
+ );
902
990
  const rawMessages = Array.isArray(args.openAiBody.messages) ? args.openAiBody.messages : [];
903
991
  const quirks = resolveGeminiModelQuirks(model);
904
992
  const isClaude = quirks.isClaudeCrossModel;
@@ -916,8 +1004,8 @@ function buildCloudCodeAssistPayload(args) {
916
1004
  throw new Error("Antigravity Cloud Code Assist request has no user/model contents.");
917
1005
  }
918
1006
  const prompt = args.agentConfig.prompt?.trim();
919
- if (prompt) systemTexts.unshift(prompt);
920
- const request = { contents };
1007
+ if (prompt && !hasAssembledAgentPrompt(rawMessages)) systemTexts.unshift(prompt);
1008
+ const request = {};
921
1009
  if (systemTexts.length > 0) {
922
1010
  request.systemInstruction = {
923
1011
  role: "user",
@@ -931,6 +1019,7 @@ function buildCloudCodeAssistPayload(args) {
931
1019
  request.tools = tools;
932
1020
  request.toolConfig = { functionCallingConfig: { mode: "AUTO" } };
933
1021
  }
1022
+ request.contents = contents;
934
1023
  const generationConfig = {};
935
1024
  if (profile?.maxOutputTokens) {
936
1025
  generationConfig.maxOutputTokens = profile.maxOutputTokens;
@@ -1199,6 +1288,8 @@ function buildDevinOAuthCredential(token, now = Date.now()) {
1199
1288
  }
1200
1289
 
1201
1290
  export {
1291
+ AGENT_PROMPT_IN_MESSAGES,
1292
+ hasAssembledAgentPrompt,
1202
1293
  parseSseDataLineJson,
1203
1294
  parseSseDataLineObject,
1204
1295
  parseUpstreamErrorBody,
@@ -1,20 +1,20 @@
1
- import {
2
- deleteDialog,
3
- runtime_default,
4
- toast
5
- } from "./chunk-FNDSBM4J.js";
6
1
  import {
7
2
  getAllMemberSpaces,
8
3
  getCurrentSpaceId,
9
4
  getCurrentSpaceIdRaw,
10
5
  updateCurrentSpaceIfMatch
11
- } from "./chunk-MOMR7NMG.js";
6
+ } from "./chunk-C646JEUV.js";
7
+ import {
8
+ deleteDialog,
9
+ runtime_default,
10
+ toast
11
+ } from "./chunk-FXX6VFMV.js";
12
12
  import {
13
13
  require_formatISO
14
14
  } from "./chunk-UVLYNWIE.js";
15
15
  import {
16
16
  require_react
17
- } from "./chunk-5FUN7EG4.js";
17
+ } from "./chunk-RD3QLZQV.js";
18
18
  import {
19
19
  UNCATEGORIZED_ID,
20
20
  addContentAction,
@@ -26,7 +26,7 @@ import {
26
26
  patchIndividualContentRecord,
27
27
  readContentRecordForSpaceSync,
28
28
  syncContentRecordSpaceId
29
- } from "./chunk-PVZY6P3S.js";
29
+ } from "./chunk-CZLSTOVM.js";
30
30
  import {
31
31
  createSpaceKey,
32
32
  normalizeSpaceId
@@ -39,7 +39,7 @@ import {
39
39
  uploadFileAction,
40
40
  upsertSSREntity,
41
41
  write
42
- } from "./chunk-AVHRSJUH.js";
42
+ } from "./chunk-TXFYIWAW.js";
43
43
  import {
44
44
  resolveFileCategory
45
45
  } from "./chunk-3PVYUPXK.js";
@@ -50,19 +50,19 @@ import {
50
50
  resolveReplicationServers,
51
51
  scheduleDeleteReplication,
52
52
  scheduleWriteReplication
53
- } from "./chunk-2VUZSVAS.js";
53
+ } from "./chunk-F3FQPVHE.js";
54
54
  import {
55
55
  createAsyncThunk
56
- } from "./chunk-7Z6EW7AH.js";
56
+ } from "./chunk-7OTNBI77.js";
57
57
  import {
58
58
  getIsDesktopApp
59
- } from "./chunk-AGP3YSEC.js";
60
- import {
61
- createClientLogger
62
- } from "./chunk-QQ56R7KS.js";
59
+ } from "./chunk-C3GOEQJF.js";
63
60
  import {
64
61
  selectIdentityUserId
65
62
  } from "./chunk-PXYBUFDB.js";
63
+ import {
64
+ createClientLogger
65
+ } from "./chunk-QQ56R7KS.js";
66
66
  import {
67
67
  buildTombstoneRecord
68
68
  } from "./chunk-BV3FLP2L.js";
@@ -74,7 +74,7 @@ import {
74
74
  } from "./chunk-7DPNBQSV.js";
75
75
  import {
76
76
  isSystemAdmin
77
- } from "./chunk-KN3HEZIQ.js";
77
+ } from "./chunk-ZVOL2MAJ.js";
78
78
  import {
79
79
  extractUserId
80
80
  } from "./chunk-M2EJHDJP.js";
@@ -94,15 +94,15 @@ import {
94
94
  import {
95
95
  asTrimmedNonEmptyStringArray
96
96
  } from "./chunk-I42VC5KR.js";
97
+ import {
98
+ asOptionalPositiveFiniteNumber
99
+ } from "./chunk-U6VC4MU4.js";
97
100
  import {
98
101
  asTrimmedString
99
102
  } from "./chunk-3EUW3WEO.js";
100
103
  import {
101
104
  isRecord
102
105
  } from "./chunk-KUG52IAP.js";
103
- import {
104
- asOptionalPositiveFiniteNumber
105
- } from "./chunk-U6VC4MU4.js";
106
106
  import {
107
107
  asOptionalFiniteNumber
108
108
  } from "./chunk-WWC7I6TA.js";
@@ -1513,11 +1513,11 @@ var ENTITY_DELETE_STRATEGIES = {
1513
1513
  await dispatch(deleteTable({ dbKey: key })).unwrap();
1514
1514
  },
1515
1515
  file: async (key, { thunkAPI }) => {
1516
- const { deleteFileAction } = await import("./deleteFile-Q3YDB4ML.js");
1516
+ const { deleteFileAction } = await import("./deleteFile-WO6WSSNK.js");
1517
1517
  await deleteFileAction(key, thunkAPI);
1518
1518
  },
1519
1519
  image: async (key, { thunkAPI }) => {
1520
- const { deleteFileAction } = await import("./deleteFile-Q3YDB4ML.js");
1520
+ const { deleteFileAction } = await import("./deleteFile-WO6WSSNK.js");
1521
1521
  await deleteFileAction(key, thunkAPI);
1522
1522
  },
1523
1523
  agent: async (key, { dispatch, userId, sourceServerOrigin }) => {
@@ -0,0 +1,133 @@
1
+ import {
2
+ isAccountOnDemandWorkflowSkill,
3
+ resolveUserEnabledSkills
4
+ } from "./chunk-DVYAFH2Q.js";
5
+ import {
6
+ collectAgentSkillConfigIssues,
7
+ describeAgentSkillModeValue,
8
+ isAgentSkillDisabled,
9
+ resolveAgentSkillConfig
10
+ } from "./chunk-MM73SP4K.js";
11
+ import {
12
+ dedupeSkillPromptPatches,
13
+ resolveBuiltinSkillEntry,
14
+ resolveBuiltinSkillPage,
15
+ resolveSkillGraphFromRoots
16
+ } from "./chunk-EBKHA63G.js";
17
+ import {
18
+ parseSkillDocProtocol
19
+ } from "./chunk-W6RFEDN4.js";
20
+
21
+ // packages/ai/skills/agentSkillPreferenceDiagnostics.ts
22
+ var hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
23
+ var resolveAgentSkillPreferenceSource = (preferences) => {
24
+ if (!preferences || typeof preferences !== "object") {
25
+ return { source: "empty", field: null };
26
+ }
27
+ if (hasOwn(preferences, "enabledSkills")) {
28
+ return { source: "settings-record", field: "enabledSkills" };
29
+ }
30
+ if (hasOwn(preferences, "enabledPromptSkills")) {
31
+ return { source: "legacy-field", field: "enabledPromptSkills" };
32
+ }
33
+ return { source: "empty", field: null };
34
+ };
35
+ var buildAgentSkillPreferenceDiagnostic = (input) => {
36
+ const { source, field } = resolveAgentSkillPreferenceSource(input.preferences);
37
+ const config = resolveAgentSkillConfig(input.agentConfig);
38
+ const agentSkillModes = {};
39
+ for (const slug of Object.keys(config).sort()) {
40
+ agentSkillModes[slug] = config[slug];
41
+ }
42
+ const discardedSkills = collectAgentSkillConfigIssues(input.agentConfig).map(
43
+ (issue) => ({
44
+ slug: issue.slug,
45
+ value: describeAgentSkillModeValue(issue.value),
46
+ reason: issue.reason
47
+ })
48
+ );
49
+ return {
50
+ event: "agent_skill_preference_resolved",
51
+ preferenceSource: source,
52
+ preferenceField: field,
53
+ enabledSkills: [...input.enabledSkills],
54
+ enabledSkillCount: input.enabledSkills.length,
55
+ agentSkillModes,
56
+ agentSkillCount: Object.keys(agentSkillModes).length,
57
+ discardedSkills,
58
+ discardedSkillCount: discardedSkills.length
59
+ };
60
+ };
61
+ var DIAGNOSTIC_PREFIX = "[nolo.skill.diagnostics] ";
62
+ var seenSignatures = /* @__PURE__ */ new Set();
63
+ function skillDiagnosticsEnabled(env = typeof process === "undefined" ? {} : process.env ?? {}) {
64
+ const flag = env.NOLO_SKILL_DIAGNOSTICS?.trim();
65
+ return flag === "1" || flag === "true";
66
+ }
67
+ var reportAgentSkillPreferenceDiagnostic = (diagnostic, sink) => {
68
+ if (!sink && !skillDiagnosticsEnabled()) return false;
69
+ const stderr = typeof process === "undefined" ? void 0 : process.stderr;
70
+ const write = sink ?? (typeof stderr?.write === "function" ? (line) => {
71
+ stderr.write(line);
72
+ } : void 0);
73
+ if (!write) return false;
74
+ const signature = JSON.stringify(diagnostic);
75
+ if (seenSignatures.has(signature)) return false;
76
+ seenSignatures.add(signature);
77
+ write(`${DIAGNOSTIC_PREFIX}${signature}
78
+ `);
79
+ return true;
80
+ };
81
+
82
+ // packages/ai/skills/userSkillRuntime.ts
83
+ async function resolveUserSkillRuntime(agentConfig, preferences) {
84
+ const effectiveConfig = agentConfig && typeof agentConfig === "object" ? "rawRecord" in agentConfig && agentConfig.rawRecord && typeof agentConfig.rawRecord === "object" ? agentConfig.rawRecord : agentConfig : null;
85
+ const disabledSlugs = /* @__PURE__ */ new Set();
86
+ const requiredSlugs = /* @__PURE__ */ new Set();
87
+ for (const [identifier, mode] of Object.entries(resolveAgentSkillConfig(effectiveConfig))) {
88
+ const entry = resolveBuiltinSkillEntry(identifier);
89
+ if (!entry) continue;
90
+ if (mode === "disabled") disabledSlugs.add(entry.slug);
91
+ if (mode === "required") requiredSlugs.add(entry.slug);
92
+ }
93
+ const enabledSkills = resolveUserEnabledSkills(preferences);
94
+ reportAgentSkillPreferenceDiagnostic(
95
+ buildAgentSkillPreferenceDiagnostic({
96
+ agentConfig: effectiveConfig,
97
+ preferences,
98
+ enabledSkills
99
+ })
100
+ );
101
+ const graph = await resolveSkillGraphFromRoots({
102
+ roots: enabledSkills.map((identifier) => ({
103
+ identifier,
104
+ mode: isAccountOnDemandWorkflowSkill(identifier) && !requiredSlugs.has(identifier) ? "recommended" : "required"
105
+ })),
106
+ loadPage: async (identifier) => {
107
+ const entry = resolveBuiltinSkillEntry(identifier);
108
+ return entry ? resolveBuiltinSkillPage(entry.skillId) : null;
109
+ },
110
+ strictRequiredDependencies: true,
111
+ admitSkill: (page, canonicalIdentifier) => {
112
+ const entry = resolveBuiltinSkillEntry(canonicalIdentifier) ?? resolveBuiltinSkillEntry(page?.dbKey);
113
+ return !!entry && !disabledSlugs.has(entry.slug) && !isAgentSkillDisabled(effectiveConfig, entry.slug);
114
+ }
115
+ });
116
+ const admittedKeys = new Set(graph.visits.map((visit) => visit.dbKey));
117
+ const contentByKey = new Map(
118
+ [...graph.contentByKey].filter(([, page]) => page?.dbKey && admittedKeys.has(page.dbKey))
119
+ );
120
+ const skillPromptContributions = dedupeSkillPromptPatches(graph.visits.flatMap((visit) => {
121
+ const entry = resolveBuiltinSkillEntry(visit.meta?.skillConfig?.id) ?? resolveBuiltinSkillEntry(visit.dbKey);
122
+ if (visit.mode !== "required" || !entry) return [];
123
+ const page = contentByKey.get(visit.dbKey);
124
+ const content = (visit.meta?.skillConfig?.promptPatch || parseSkillDocProtocol(page?.content ?? "", visit.meta).content).trim();
125
+ return content ? [{ skillId: entry.skillId, content }] : [];
126
+ }));
127
+ const skillPromptPatches = skillPromptContributions.map(({ content }) => content);
128
+ return { ...graph, contentByKey, skillPromptPatches, skillPromptContributions };
129
+ }
130
+
131
+ export {
132
+ resolveUserSkillRuntime
133
+ };