nolo-cli 0.213.0 → 0.220.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 (271) hide show
  1. package/README.md +3 -2
  2. package/{_executeModel-CUJLCFWR.js → _executeModel-BNEMFCAO.js} +125 -96
  3. package/{accountResolver-4LKIHEKL.js → accountResolver-QETKNC7T.js} +4 -4
  4. package/{action-DF5UYSJF.js → action-GDZDXPMB.js} +14 -13
  5. package/{addContentAction-WERAONNY.js → addContentAction-7RO4AMRI.js} +21 -20
  6. package/{addDialogAgentAction-7VI7YRML.js → addDialogAgentAction-EVYBGTXB.js} +26 -25
  7. package/{agentDeleteCommand-XJORXPGU.js → agentDeleteCommand-7QTQNFCO.js} +145 -137
  8. package/{agentEmailCommands-XTYYFR6Z.js → agentEmailCommands-I7SHOSD6.js} +146 -139
  9. package/{agentFavoriteCommands-EDK743YA.js → agentFavoriteCommands-7LOP3HUD.js} +11 -12
  10. package/{agentGrantCommands-RQWK2TEV.js → agentGrantCommands-L6O2HVJI.js} +9 -9
  11. package/{agentListCommands-OBLRBLHS.js → agentListCommands-GUGMORTK.js} +180 -103
  12. package/{agentMachineCommands-5FMT3OT5.js → agentMachineCommands-UMDKILU3.js} +75 -66
  13. package/{agentProviderCommands-Q5O33MED.js → agentProviderCommands-STI3DQ6A.js} +8 -8
  14. package/{agentPullCommand-6EM3URVK.js → agentPullCommand-KHV4EELF.js} +11 -11
  15. package/agentRecordCommands-YTAMTHOY.js +175 -0
  16. package/agentRunCommand-DBM6YNO6.js +207 -0
  17. package/{agentRunControl-TAMHJQSR.js → agentRunControl-MBG4U6SL.js} +40 -19
  18. package/{agentRuntimeLocal-SOO2OPJG.js → agentRuntimeLocal-TU4LA353.js} +55 -48
  19. package/{agentSlice-CHR6KOZN.js → agentSlice-DPG7Q7IA.js} +24 -23
  20. package/{appDeleteCommands-GUP6P5YE.js → appDeleteCommands-JWP3XPUA.js} +67 -58
  21. package/{appDeployCommands-MH2FX4O5.js → appDeployCommands-6E4TQCWI.js} +67 -58
  22. package/{appDeployStatusCommands-SUHN3HPJ.js → appDeployStatusCommands-ALU4SADG.js} +67 -58
  23. package/{appGetCommands-YWDEX6Z4.js → appGetCommands-JEY4L6L4.js} +67 -58
  24. package/{appListCommands-ZQVMLPAY.js → appListCommands-PCAVHU7M.js} +67 -58
  25. package/{authCommand-PWX2ZNUP.js → authCommand-CGRIIOOV.js} +37 -33
  26. package/{authCommands-HV3EAU3V.js → authCommands-55OGQGCR.js} +16 -12
  27. package/{builtinSkillRegistry-2QETTQPM.js → builtinSkillRegistry-BAE2LDXF.js} +11 -13
  28. package/{chromeCommands-REEAH4SX.js → chromeCommands-G5UDKVSV.js} +3 -3
  29. package/{chromeOpsCommands-DIVM2K3T.js → chromeOpsCommands-WAA45NCS.js} +23 -13
  30. package/{chunk-VNYYOX3V.js → chunk-262R3XNN.js} +157 -50
  31. package/chunk-2MCB7CD7.js +98 -0
  32. package/{chunk-CTPXME7U.js → chunk-2NPD3FTX.js} +30 -7
  33. package/{chunk-YB3YZK56.js → chunk-2WZXXAQD.js} +1 -67
  34. package/{chunk-HRMJUN5J.js → chunk-2X7WFDT6.js} +1 -1
  35. package/chunk-2YGBI2XB.js +30 -0
  36. package/{chunk-TY3TIUJK.js → chunk-324FWHUA.js} +85 -3
  37. package/{chunk-KFLT5KAD.js → chunk-3NNXR7EH.js} +20 -20
  38. package/{chunk-ZRSNONOB.js → chunk-3P54D2E4.js} +8 -3
  39. package/{chunk-7OCO4TDT.js → chunk-3U44JB3O.js} +1 -1
  40. package/{chunk-TX5EYMGT.js → chunk-44J7Z5AQ.js} +34 -258
  41. package/chunk-4D4QD7FT.js +201 -0
  42. package/chunk-4I2MXV5Q.js +275 -0
  43. package/{chunk-MYOH447Z.js → chunk-4JVNURX4.js} +1 -1
  44. package/{chunk-COFEN36Z.js → chunk-4ZGPHFLE.js} +3 -3
  45. package/{chunk-ZXOUUDCG.js → chunk-53MFERZ3.js} +3869 -362
  46. package/chunk-547ENH5T.js +226 -0
  47. package/{chunk-YDH3FDFQ.js → chunk-5FUN7EG4.js} +1 -1
  48. package/{chunk-6DWMYIUY.js → chunk-5WKDR7HS.js} +14 -9
  49. package/chunk-5ZUOVCKT.js +32 -0
  50. package/{chunk-T43B7LB2.js → chunk-62HXNQVV.js} +1 -1
  51. package/{chunk-ZC3CMUKU.js → chunk-6OVNSQHN.js} +84 -2
  52. package/{chunk-IXNGOHV5.js → chunk-6QHKRARD.js} +12 -153
  53. package/{chunk-4T2WNOY7.js → chunk-6RDBLXVQ.js} +28 -17
  54. package/{chunk-EYLGAEB4.js → chunk-6XRPBZRS.js} +134 -0
  55. package/{chunk-KIM6CLW5.js → chunk-7JGMNKKG.js} +57 -26
  56. package/{chunk-P5L7CXOC.js → chunk-7Z6EW7AH.js} +3 -2
  57. package/chunk-AGYPUBFW.js +686 -0
  58. package/{chunk-Y63ZSOR6.js → chunk-AL3TYDIF.js} +1 -1
  59. package/{chunk-NOKUNJON.js → chunk-ALAES342.js} +75 -94
  60. package/{chunk-4I7ERB7F.js → chunk-ATEKLSLR.js} +2 -2
  61. package/{chunk-CRHOO2ZR.js → chunk-AUAJTAFM.js} +8 -8
  62. package/{chunk-LLRPJECG.js → chunk-AWIL6EHN.js} +15 -157
  63. package/chunk-BIDSIRTS.js +307 -0
  64. package/chunk-BIWI5M4E.js +62 -0
  65. package/{chunk-4VJAC32I.js → chunk-BNMPUQW6.js} +3 -2
  66. package/{chunk-RLBNLZVC.js → chunk-BP5ZJ6B4.js} +1 -1
  67. package/{chunk-NBTY7YJF.js → chunk-BR3GT6MR.js} +1 -0
  68. package/{chunk-7RFNTILS.js → chunk-BUDVRYES.js} +2 -2
  69. package/{chunk-SVYO6AO7.js → chunk-BV3FLP2L.js} +41 -1
  70. package/{chunk-ZL5RAEEB.js → chunk-CBUZ6DKA.js} +3 -3
  71. package/{chunk-SM3NSZJV.js → chunk-CD3RU7XL.js} +36 -2
  72. package/chunk-CMMI3DAT.js +1621 -0
  73. package/{chunk-J2NHJ7WX.js → chunk-CYWNWA77.js} +6 -6
  74. package/{chunk-MOIJOHA5.js → chunk-D6YNCNM6.js} +35 -21
  75. package/{chunk-H2TJUNCH.js → chunk-DBUR22G5.js} +16 -16
  76. package/chunk-DEA37IUY.js +271 -0
  77. package/{chunk-O2TZF4AI.js → chunk-DGYCDA6W.js} +4 -4
  78. package/{chunk-YWSEPJ7C.js → chunk-DUUDXSLX.js} +21 -7
  79. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  80. package/{chunk-H5HF7TJA.js → chunk-EEOOBRA7.js} +6 -6
  81. package/{chunk-Y6ORVLSS.js → chunk-EVGU5P4U.js} +1 -1
  82. package/chunk-EWQ3HGNZ.js +90 -0
  83. package/{chunk-6VLJ6YA7.js → chunk-F6Z6ZCUV.js} +9 -9
  84. package/{chunk-75XIDFBW.js → chunk-FJ23FZXF.js} +72 -28
  85. package/chunk-FJSNBZXR.js +142 -0
  86. package/{chunk-WRYQ35LQ.js → chunk-G7IUT2V3.js} +860 -57
  87. package/{chunk-PCLE46CE.js → chunk-GBWGPTA7.js} +2 -1
  88. package/{chunk-H7PPIYWP.js → chunk-GPOV42YM.js} +19 -19
  89. package/{chunk-W4S457LU.js → chunk-GUXZK7SE.js} +42 -6
  90. package/{chunk-QHPRUL4O.js → chunk-GV6PRJBU.js} +4 -4
  91. package/{chunk-YUA6OAH5.js → chunk-HBRDSQ3M.js} +2 -2
  92. package/{chunk-G7MLNNEX.js → chunk-HHFGE2WF.js} +7 -7
  93. package/{chunk-OQPKUBPB.js → chunk-HSSBDZLD.js} +19 -7
  94. package/{chunk-EHSZD5OI.js → chunk-HXER7YJF.js} +4 -4
  95. package/{chunk-TAKB25RM.js → chunk-HYLRQDEE.js} +6 -6
  96. package/{chunk-LOEO7LRC.js → chunk-ILHQ2AXT.js} +10 -8
  97. package/{chunk-BBJ22CLB.js → chunk-JJMR2EA3.js} +64 -34
  98. package/{chunk-G2BQWAVT.js → chunk-JLAMNSBC.js} +4 -4
  99. package/{chunk-RSHTSUEG.js → chunk-JUSHVFNF.js} +2133 -622
  100. package/{chunk-YJAFKXMU.js → chunk-KHVFJSVE.js} +54 -49
  101. package/{chunk-X7SDOJUM.js → chunk-KRI6N5QZ.js} +16 -16
  102. package/{chunk-7BT37FK3.js → chunk-L32W3PRP.js} +675 -128
  103. package/chunk-LKA64WH4.js +227 -0
  104. package/{chunk-HUBHAQK2.js → chunk-LMRRCEDE.js} +31 -31
  105. package/chunk-M4SFKP5L.js +675 -0
  106. package/{chunk-MDB67IWP.js → chunk-MSMHU36U.js} +12 -12
  107. package/{chunk-7Y4YTDQF.js → chunk-MXKWTPUM.js} +288 -166
  108. package/{chunk-WYDI6TGM.js → chunk-MXRUXMZ3.js} +94 -135
  109. package/{chunk-AZMYUSVF.js → chunk-N5Z2V73W.js} +1 -1
  110. package/{chunk-QG4AOSON.js → chunk-NHY322ZU.js} +154 -32
  111. package/{chunk-UHJGXRJ4.js → chunk-OBIC6EG7.js} +6 -6
  112. package/{chunk-GOO6G4PY.js → chunk-OBSEKCVK.js} +123 -70
  113. package/{chunk-WMTBPBMP.js → chunk-OG6MQOQG.js} +130 -60
  114. package/{chunk-XJWWBO34.js → chunk-OJKUU3LP.js} +5 -7
  115. package/{chunk-ALQ3657A.js → chunk-OOJNQK6V.js} +21 -1
  116. package/{chunk-NSAPDIN2.js → chunk-OWKNSIXL.js} +679 -74
  117. package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
  118. package/{chunk-A7TFUNZO.js → chunk-PPJYZRSQ.js} +6 -2
  119. package/{chunk-F6UUQOG6.js → chunk-Q3IVPFVO.js} +4 -4
  120. package/{chunk-VO4WSAVP.js → chunk-QBZCGP34.js} +3 -3
  121. package/chunk-QCB42576.js +13 -0
  122. package/chunk-QHEN7NZ7.js +46 -0
  123. package/{chunk-3UKL3HPD.js → chunk-QJTZ76CP.js} +32 -84
  124. package/{chunk-V5Y3R6BT.js → chunk-QRGDJA4B.js} +215 -212
  125. package/{chunk-4KB6WQUL.js → chunk-QYB23WUH.js} +1 -1
  126. package/{chunk-ZNWI6OVT.js → chunk-R44TU3MZ.js} +85 -11
  127. package/{chunk-PYRUW7XN.js → chunk-R6Z5S5GA.js} +139 -57
  128. package/{chunk-VL5KOY2C.js → chunk-R7XWZDOH.js} +125 -29
  129. package/{chunk-R5O4QAWG.js → chunk-RBPUNSG5.js} +11 -77
  130. package/{chunk-NJLL224W.js → chunk-RG2DGNL6.js} +3 -3
  131. package/{chunk-C6KNNXWU.js → chunk-RGQ4UUWZ.js} +25 -2
  132. package/{chunk-TCZHTTUU.js → chunk-RTHFJZ6M.js} +11 -11
  133. package/{chunk-RZOV7OMV.js → chunk-RYOLWYBK.js} +146 -200
  134. package/{chunk-OWYYDMGJ.js → chunk-S2NTVGA2.js} +4 -2
  135. package/{chunk-XHQC4PXX.js → chunk-S5NA3C52.js} +488 -226
  136. package/{secretCommands-LXDWOLZ6.js → chunk-S6FDXXZV.js} +190 -15
  137. package/chunk-S6K5F3KP.js +99 -0
  138. package/{chunk-INN4LTAJ.js → chunk-SRCCSTIM.js} +8 -8
  139. package/{chunk-JY5NGFFH.js → chunk-SYTHYBMI.js} +5 -5
  140. package/{chunk-UYD5HQ6T.js → chunk-SZVMASJ2.js} +3300 -1396
  141. package/{chunk-FUGMREBO.js → chunk-TGNIKIHR.js} +3 -3
  142. package/{chunk-HPFCI4SK.js → chunk-TI2EPRHE.js} +4 -4
  143. package/chunk-TLE77UJ5.js +230 -0
  144. package/chunk-TSPMLCWI.js +364 -0
  145. package/{chunk-YGILMZ7N.js → chunk-TUSTONB3.js} +1 -1
  146. package/{chunk-4VNS5WPM.js → chunk-U67V476Y.js} +1 -8
  147. package/{chunk-F7CI2ZC5.js → chunk-UAIHKQIA.js} +2 -1
  148. package/{chunk-WPORQFYN.js → chunk-UVLYNWIE.js} +2 -2
  149. package/{chunk-H4UOTUOX.js → chunk-VMJVAJ6W.js} +152 -19
  150. package/{chunk-KC4XDTT3.js → chunk-VS276URX.js} +4 -4
  151. package/{chunk-YTF4WH7J.js → chunk-WWTSEBDF.js} +1 -1
  152. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  153. package/{chunk-RPQXPZZF.js → chunk-XSW4EXQV.js} +976 -17
  154. package/{chunk-7QTZCMKL.js → chunk-XTETTSKN.js} +3036 -2468
  155. package/{chunk-J5JTMQIA.js → chunk-YFLVRVYK.js} +1 -1
  156. package/chunk-YKY4OVOX.js +1141 -0
  157. package/{chunk-MMA3LZ3W.js → chunk-YNIYE47Z.js} +1 -1
  158. package/chunk-YZMNK53S.js +68 -0
  159. package/{chunk-FY7F4Q6X.js → chunk-Z4PCXPUE.js} +2 -2
  160. package/{chunk-INUFILG6.js → chunk-ZH3KXFHS.js} +11 -3
  161. package/chunk-ZOHO6MOF.js +376 -0
  162. package/{cliAgentConfigHelpers-WJBZQTLW.js → cliAgentConfigHelpers-BTRHMPW2.js} +18 -19
  163. package/{cliAuthorityBrokerClient-PM3U6Q6J.js → cliAuthorityBrokerClient-XHH7MH2P.js} +1 -1
  164. package/{cliAuthorityStoreDriver-TKLXNNTG.js → cliAuthorityStoreDriver-6FE3BJNB.js} +1 -1
  165. package/{cliEnvHelpers-BVYTMUPJ.js → cliEnvHelpers-CNMP3RDX.js} +3 -3
  166. package/{cliExecutor-BWBF2MTI.js → cliExecutor-K6FDZTQ2.js} +4 -2
  167. package/cliLocalAgentRecordReader-M3F76NIP.js +90 -0
  168. package/{commandRegistry-W63CYRZJ.js → commandRegistry-T3UBK6OA.js} +105 -97
  169. package/{contentThunks-U7PL5MQD.js → contentThunks-YEPZAHXU.js} +53 -48
  170. package/{cooldownCommands-TIGUHXTD.js → cooldownCommands-YB5H5BBK.js} +5 -4
  171. package/{createAgentAutomationAction-OLBQDD6R.js → createAgentAutomationAction-TBIIO5WT.js} +51 -48
  172. package/{createDialogAction-SVH6B3SB.js → createDialogAction-KBKMYFTQ.js} +52 -53
  173. package/{createPageAction-F4DIWZ2Z.js → createPageAction-3FGAPLJO.js} +56 -53
  174. package/{cursorProvider-YGGNMVWX.js → cursorProvider-2RACMEMF.js} +1 -1
  175. package/{db-HUCI5R4G.js → db-M7FU2GNK.js} +10 -7
  176. package/{dbSlice-BVH2YZPQ.js → dbSlice-XRUZOGSU.js} +20 -19
  177. package/{deleteFile-5YOEKV4U.js → deleteFile-6URDHYRB.js} +12 -12
  178. package/{desktopFolderProjects-SFY5EZS3.js → desktopFolderProjects-4POAMVJN.js} +2 -2
  179. package/{dialogCommands-KHIEPY3M.js → dialogCommands-NRLCOPJR.js} +71 -64
  180. package/dialogNotifyCommand-SHGPCU22.js +36 -0
  181. package/{dialogSlice-ZCTDV2PZ.js → dialogSlice-DP2WTMNO.js} +48 -45
  182. package/{dialogUsageCommand-7KCPYGHG.js → dialogUsageCommand-W2WCSGKF.js} +11 -10
  183. package/{docCreateCommands-DPMZI7G5.js → docCreateCommands-YJRDA3RX.js} +66 -59
  184. package/{docDeleteCommands-IRQQLUBT.js → docDeleteCommands-A5QIHZNF.js} +69 -62
  185. package/{docReadCommands-LK37XH6L.js → docReadCommands-CF2LTMYH.js} +66 -59
  186. package/{docStore-V2KECILA.js → docStore-NDY3K3PK.js} +25 -24
  187. package/{docUpdateCommands-O6T3HJHH.js → docUpdateCommands-QRKV4ZXE.js} +69 -62
  188. package/{fetchMessages-NR4KNQLO.js → fetchMessages-TQEUZD7H.js} +8 -7
  189. package/{getPricing-2MNMXEVG.js → getPricing-LF5C4XSI.js} +7 -7
  190. package/{handleSendMessageAction-2PE25WM3.js → handleSendMessageAction-IUGVVJ43.js} +206 -314
  191. package/{hostCredentialCreate-S233UMAP.js → hostCredentialCreate-X2ZFRXDR.js} +132 -124
  192. package/index.js +65 -27
  193. package/{keys-BEGDOTRL.js → keys-RWF7UCB4.js} +5 -4
  194. package/legacyMigration-TF4SYJCZ.js +19 -0
  195. package/{lib-5KKIBFIT.js → lib-OT5OTXRU.js} +7087 -6664
  196. package/{localDialogRead-7NNDVVF7.js → localDialogRead-CCOCVGAP.js} +3 -3
  197. package/{localFirstLog-DHNOY2NA.js → localFirstLog-OIETGK66.js} +1 -1
  198. package/localRecall-BDYKXB46.js +17 -0
  199. package/{localRuntimeAdapter-KY6WXNBR.js → localRuntimeAdapter-KAG3T4LF.js} +138 -130
  200. package/{localRuntimeAuthority-OYH4AE4G.js → localRuntimeAuthority-IBJAT62G.js} +1 -1
  201. package/{localRuntimeDb-VBIMCWUC.js → localRuntimeDb-N7KHDXS2.js} +2 -2
  202. package/{machineCommands-Q6HA3IXF.js → machineCommands-6NIQJE2A.js} +143 -135
  203. package/{machineInfo-UKPTZO5Y.js → machineInfo-LWHTEBHJ.js} +1 -1
  204. package/machineWsRunDispatch-RA5NOSGG.js +190 -0
  205. package/{memberThunks-7EDJADWU.js → memberThunks-7Y3OYSJQ.js} +30 -29
  206. package/{memoryCommands-ASCE5STX.js → memoryCommands-BC6REPQB.js} +7 -7
  207. package/models-H5NNZRLH.js +9 -0
  208. package/{oauthTokenStore-OEERZFUC.js → oauthTokenStore-RUYNYALS.js} +1 -1
  209. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +6 -6
  210. package/overlay-BBQZXGYI.js +13 -0
  211. package/package.json +2 -2
  212. package/{pdf-U6KSUEZZ.js → pdf-KE3QI2V7.js} +1 -1
  213. package/{processSpawn-ZU5QFM43.js → processSpawn-6GEO77KV.js} +1 -1
  214. package/{profileConfig-KN3N2BLF.js → profileConfig-KOWK4HOG.js} +1 -1
  215. package/{projectArchive-DRTDIMEV.js → projectArchive-OIUP63MV.js} +59 -56
  216. package/{providerPresetApply-YXGV6NXB.js → providerPresetApply-WHAMP2D5.js} +20 -13
  217. package/{providerRegistry-S6UL6UNA.js → providerRegistry-ZI2KORJ7.js} +11 -11
  218. package/{read-4V2RMG7N.js → read-TYMBGEXO.js} +13 -13
  219. package/{readDocTool-BH6ATGQO.js → readDocTool-SKQVHBLO.js} +2 -2
  220. package/{readlineWorkspace-2W4WRCOU.js → readlineWorkspace-ZGC4KSXG.js} +7760 -6499
  221. package/{removeDialogAgentAction-LYAZGNKW.js → removeDialogAgentAction-F5QE2O2B.js} +29 -28
  222. package/{runAgentClientLoop-J2VQBS2Z.js → runAgentClientLoop-NKUW2DSJ.js} +94 -88
  223. package/{runtimeDoctorCommands-QAI3MBKQ.js → runtimeDoctorCommands-RRKPBGVO.js} +19 -19
  224. package/{runtimeModeArgs-2Y7BALTO.js → runtimeModeArgs-X7DL7PUN.js} +1 -1
  225. package/secretCommands-KZWBZIYS.js +24 -0
  226. package/{setDialogExtraReferencesAction-OCRPGPYH.js → setDialogExtraReferencesAction-72L27ERM.js} +25 -24
  227. package/{setPrimaryDialogAgentAction-HFJDQIBU.js → setPrimaryDialogAgentAction-GJJDUSGJ.js} +29 -28
  228. package/{settingThunks-RAMHMTGM.js → settingThunks-ZRGWVGZD.js} +99 -90
  229. package/{skillDiscovery-XKHROSH2.js → skillDiscovery-I37M5KJC.js} +4 -4
  230. package/{skillSummaryMarker-42HKSXYY.js → skillSummaryMarker-62UW7HI7.js} +1 -1
  231. package/{slateToRenderMarkdown-Y5IYN73U.js → slateToRenderMarkdown-R3X74MCX.js} +1 -1
  232. package/{slateUtils-NGV2NMKM.js → slateUtils-ESQAJ6RN.js} +1 -1
  233. package/{spaceCommands-KVJZVKVO.js → spaceCommands-MEH3HJBC.js} +66 -57
  234. package/store-Z53ICFL3.js +48 -0
  235. package/{streamAgentChatTurn-GHBMJJ6S.js → streamAgentChatTurn-FJTUUXHJ.js} +886 -668
  236. package/{switchDialogAgentAction-EBRMW3RA.js → switchDialogAgentAction-IIJBPND3.js} +26 -25
  237. package/{tableCommands-MP6VFSVT.js → tableCommands-FTAOCBTX.js} +13 -13
  238. package/tombstones-FQQMEDOW.js +32 -0
  239. package/{toolApiClient-HGNO53TC.js → toolApiClient-OGQEBQVX.js} +4 -4
  240. package/{tools-EWKCPKMS.js → tools-ZXHIAOSP.js} +82 -81
  241. package/tuiRestart-2IL37YIB.js +41 -0
  242. package/tuiSummaryLlmCaller-W2QN4VAC.js +44 -0
  243. package/{updateCommands-ZQYU6SCI.js → updateCommands-CPATDG6J.js} +11 -7
  244. package/{updateDialogTitleAction-5GGMBTDF.js → updateDialogTitleAction-JMKLKL4P.js} +54 -51
  245. package/{usageCommand-F4IPVMIZ.js → usageCommand-2BF74MKF.js} +11 -10
  246. package/{usageRebuildCommand-HAW2AD5N.js → usageRebuildCommand-UHB55BQM.js} +12 -11
  247. package/userDataMerge-HT2ZVHBJ.js +13 -0
  248. package/{windowsSelfUpdate-257DV2T6.js → windowsSelfUpdate-ZFD6J5HF.js} +3 -3
  249. package/{workloadLifecycle-4C42SVBD.js → workloadLifecycle-HFJIN5IZ.js} +4 -4
  250. package/agentRecordCommands-ZQ7SVYGG.js +0 -167
  251. package/agentRunCommand-WS7IGO2W.js +0 -196
  252. package/chunk-3CGG2PAL.js +0 -594
  253. package/chunk-5MQRBSMW.js +0 -862
  254. package/chunk-5XBUWM6I.js +0 -89
  255. package/chunk-CJEIOP3E.js +0 -0
  256. package/chunk-EHGEOAHI.js +0 -636
  257. package/chunk-FW6YHHLI.js +0 -842
  258. package/chunk-GPVRUGGY.js +0 -115
  259. package/chunk-HSVBJRF4.js +0 -339
  260. package/chunk-LEC5ALIN.js +0 -91
  261. package/chunk-WACI5I6V.js +0 -147
  262. package/chunk-WJZOQR2J.js +0 -151
  263. package/chunk-ZCWRMUWT.js +0 -89
  264. package/dist-M676ULYG.js +0 -7314
  265. package/machineWsRunDispatch-WWJQ6WR3.js +0 -182
  266. package/models-PJBE6JDV.js +0 -9
  267. package/tuiSummaryLlmCaller-ALQYUUWB.js +0 -189
  268. package/{chunk-AGP3YSEC.js → chunk-4N6G2CKP.js} +3 -3
  269. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  270. package/{chunk-2QHFH3DR.js → chunk-USGHJSGO.js} +3 -3
  271. package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
package/chunk-GPVRUGGY.js DELETED
@@ -1,115 +0,0 @@
1
- import {
2
- createSpaceKey
3
- } from "./chunk-UAD2WT54.js";
4
- import {
5
- patch,
6
- read
7
- } from "./chunk-FW6YHHLI.js";
8
- import {
9
- DEVICE_LOCAL_OWNER_ID,
10
- isDeviceLocalSpaceBody
11
- } from "./chunk-PYRUW7XN.js";
12
- import {
13
- selectIdentityUserId
14
- } from "./chunk-PXYBUFDB.js";
15
-
16
- // packages/create/space/utils/permissions.ts
17
- var checkSpaceMembership = (spaceData, userId) => {
18
- if (!spaceData) {
19
- console.error("[Permission Check] Space data is missing.");
20
- throw new Error("\u65E0\u6CD5\u6267\u884C\u6743\u9650\u68C0\u67E5\uFF1A\u7A7A\u95F4\u6570\u636E\u7F3A\u5931\u3002");
21
- }
22
- if (isDeviceLocalSpaceBody(spaceData)) {
23
- return;
24
- }
25
- if (!userId) {
26
- console.error("[Permission Check] User ID is missing.");
27
- throw new Error("\u65E0\u6CD5\u6267\u884C\u6743\u9650\u68C0\u67E5\uFF1A\u7528\u6237 ID \u7F3A\u5931\u3002");
28
- }
29
- if (!spaceData.members || !Array.isArray(spaceData.members) || !spaceData.members.includes(userId)) {
30
- console.warn(
31
- `[Permission Check] User ${userId} attempt to operate on space ${spaceData.id} without membership.`
32
- );
33
- throw new Error("\u5F53\u524D\u7528\u6237\u4E0D\u662F\u7A7A\u95F4\u6210\u5458");
34
- }
35
- };
36
- var localSpaceAuthorityPatchStamp = (spaceData) => isDeviceLocalSpaceBody(spaceData) ? { userId: DEVICE_LOCAL_OWNER_ID } : {};
37
-
38
- // packages/create/space/constants.ts
39
- var UNCATEGORIZED_ID = "__uncategorized_container__";
40
-
41
- // packages/create/space/content/addContentAction.ts
42
- var addContentAction = async (input, thunkAPI) => {
43
- const {
44
- spaceId,
45
- title,
46
- type,
47
- contentKey,
48
- fileCategory,
49
- mimeType,
50
- fileSize,
51
- originalName,
52
- categoryId: rawCategoryId,
53
- pinned = false,
54
- order,
55
- triggerType,
56
- skillSummary
57
- } = input;
58
- const { dispatch, getState } = thunkAPI;
59
- const userId = selectIdentityUserId(getState());
60
- if (!contentKey || typeof contentKey !== "string" || contentKey.trim() === "")
61
- throw new Error("Invalid contentKey provided.");
62
- if (!title || typeof title !== "string" || title.trim() === "")
63
- throw new Error("Invalid or empty title provided.");
64
- if (!type || typeof type !== "string")
65
- throw new Error("Invalid content type provided.");
66
- const spaceKey = createSpaceKey.space(spaceId);
67
- const spaceData = await dispatch(read({
68
- dbKey: spaceKey
69
- })).unwrap();
70
- checkSpaceMembership(spaceData, userId);
71
- if (spaceData.contents && spaceData.contents[contentKey]) {
72
- throw new Error(`\u5185\u5BB9\u952E "${contentKey}" \u5DF2\u5B58\u5728\u3002`);
73
- }
74
- let categoryIdForStorage;
75
- if (rawCategoryId && rawCategoryId !== "" && rawCategoryId !== UNCATEGORIZED_ID) {
76
- if (spaceData.categories?.[rawCategoryId]) {
77
- categoryIdForStorage = rawCategoryId;
78
- }
79
- }
80
- const now = Date.now();
81
- const newSpaceContent = {
82
- title: title.trim(),
83
- type,
84
- contentKey,
85
- ...fileCategory !== void 0 ? { fileCategory } : {},
86
- ...mimeType !== void 0 ? { mimeType } : {},
87
- ...fileSize !== void 0 ? { fileSize } : {},
88
- ...originalName !== void 0 ? { originalName } : {},
89
- ...categoryIdForStorage !== void 0 && {
90
- categoryId: categoryIdForStorage
91
- },
92
- pinned,
93
- createdAt: now,
94
- updatedAt: now,
95
- ...order !== void 0 && typeof order === "number" && { order },
96
- ...triggerType !== void 0 && { triggerType },
97
- ...skillSummary !== void 0 ? { skillSummary } : {}
98
- };
99
- const changes = {
100
- contents: { [contentKey]: newSpaceContent },
101
- updatedAt: now,
102
- ...localSpaceAuthorityPatchStamp(spaceData)
103
- };
104
- const updatedSpaceData = await dispatch(
105
- patch({ dbKey: spaceKey, changes })
106
- ).unwrap();
107
- return { spaceId, updatedSpaceData };
108
- };
109
-
110
- export {
111
- checkSpaceMembership,
112
- localSpaceAuthorityPatchStamp,
113
- UNCATEGORIZED_ID,
114
- addContentAction
115
- };
package/chunk-HSVBJRF4.js DELETED
@@ -1,339 +0,0 @@
1
- import {
2
- LOCAL_CODEX_AGENT_KEY,
3
- isLocalCliAgentKey,
4
- resolveCliAgentKeyInput
5
- } from "./chunk-NBTY7YJF.js";
6
- import {
7
- resolveCliLocalRuntimeKeyCapability
8
- } from "./chunk-XHQC4PXX.js";
9
- import {
10
- HIGH_RISK_MUTATION_TOOL_NAMES
11
- } from "./chunk-KC4XDTT3.js";
12
- import {
13
- asTrimmedLowercaseString
14
- } from "./chunk-QSJ3HFEF.js";
15
- import {
16
- DEFAULT_NOLO_SERVER_URL
17
- } from "./chunk-OLZBQWZU.js";
18
- import {
19
- normalizeServerOrigin
20
- } from "./chunk-CF7PE763.js";
21
-
22
- // packages/cli/agentRunArgs.ts
23
- import { readFileSync } from "node:fs";
24
- import { isAbsolute } from "node:path";
25
- function readFlagValue(args, flag) {
26
- const index = args.indexOf(flag);
27
- if (index < 0) return void 0;
28
- return args[index + 1];
29
- }
30
- function readRepeatedFlagValues(args, flag) {
31
- const values = [];
32
- for (let index = 0; index < args.length; index += 1) {
33
- if (args[index] === flag && args[index + 1]) {
34
- values.push(args[index + 1]);
35
- index += 1;
36
- }
37
- }
38
- return values;
39
- }
40
- function runtimeModeFromArgs(args) {
41
- if (args.includes("--local")) return "local";
42
- if (args.includes("--server")) return "server";
43
- if (args.includes("--auto")) return "auto";
44
- return void 0;
45
- }
46
- function isFullstackCodingAgentRef(raw, resolved) {
47
- const normalized = asTrimmedLowercaseString(raw);
48
- return normalized === "fullstack" || normalized === "full-stack" || normalized === "nolo-fullstack" || normalized === "\u5168\u6808" || normalized === "nolo \u5168\u6808\u5DE5\u7A0B\u5E08" || resolved === "fullstack";
49
- }
50
- function parsePositiveInteger(value) {
51
- if (!value) return void 0;
52
- const parsed = Number(value);
53
- if (!Number.isFinite(parsed) || parsed <= 0) return void 0;
54
- return Math.floor(parsed);
55
- }
56
- function parseSubjectRef(raw) {
57
- const value = raw.trim();
58
- if (!value) return null;
59
- const firstColon = value.indexOf(":");
60
- if (firstColon <= 0 || firstColon === value.length - 1) return null;
61
- const kind = value.slice(0, firstColon).trim();
62
- const rest = value.slice(firstColon + 1).trim();
63
- const lastColon = rest.lastIndexOf(":");
64
- const id = lastColon > 0 ? rest.slice(0, lastColon).trim() : rest;
65
- const role = lastColon > 0 ? rest.slice(lastColon + 1).trim() : "";
66
- if (!kind || !id) return null;
67
- return { kind, id, ...role ? { role } : {} };
68
- }
69
- var VALUELESS_FLAGS = {
70
- "--local": true,
71
- "--server": true,
72
- "--auto": true,
73
- "--dangerously-allow-shell": true,
74
- "--trace-tools": true,
75
- "--bg": true,
76
- "--strict-continue-history": true,
77
- "--no-stream": true,
78
- "--debug": true,
79
- "--ephemeral": true,
80
- "--memory-only": true,
81
- "--read-only": true,
82
- "--machine-shell": true,
83
- "--instabox-allow-remote-release": true
84
- };
85
- function isValuelessFlag(arg) {
86
- return Object.prototype.hasOwnProperty.call(VALUELESS_FLAGS, arg);
87
- }
88
- function positionalArgs(args) {
89
- const values = [];
90
- for (let index = 0; index < args.length; index += 1) {
91
- const arg = args[index];
92
- if (isValuelessFlag(arg)) continue;
93
- if (arg.startsWith("--")) {
94
- index += 1;
95
- continue;
96
- }
97
- values.push(arg);
98
- }
99
- return values;
100
- }
101
- function resolveRawAgentInput(args, commandPath) {
102
- const positional = positionalArgs(args);
103
- const isNoLogin = (commandPath?.join(" ") === "run" || commandPath?.join(" ") === "chat") && !readFlagValue(args, "--agent");
104
- return readFlagValue(args, "--agent") ?? (isNoLogin ? LOCAL_CODEX_AGENT_KEY : positional[0]);
105
- }
106
- function parseDialogReference(rawInput) {
107
- const normalized = rawInput.trim();
108
- if (normalized.startsWith("dialog-")) {
109
- const parts = normalized.split("-");
110
- return {
111
- dialogKey: normalized,
112
- dialogId: parts.at(-1) ?? normalized
113
- };
114
- }
115
- const dialogMatch = normalized.match(/dialog-([a-zA-Z0-9]+)-([a-zA-Z0-9]+)/);
116
- if (dialogMatch) {
117
- return {
118
- dialogKey: `dialog-${dialogMatch[1]}-${dialogMatch[2]}`,
119
- dialogId: dialogMatch[2]
120
- };
121
- }
122
- return {
123
- dialogId: normalized
124
- };
125
- }
126
- function resolveServerUrl(env) {
127
- return normalizeServerOrigin(
128
- env.NOLO_SERVER || env.BASE_URL || DEFAULT_NOLO_SERVER_URL
129
- );
130
- }
131
- function buildLocalRunEnv(args) {
132
- void args.allowShell;
133
- return {
134
- ...args.env
135
- };
136
- }
137
- function isValidRuntimeKey(key) {
138
- return resolveCliLocalRuntimeKeyCapability(key.trim()).acceptedByCliArgs;
139
- }
140
- function writeUsage(output, commandPath) {
141
- const commandName = commandPath?.join(" ");
142
- if (commandName === "run") {
143
- output.write(
144
- "Usage: nolo run <message> [--cwd <path>] [--timeout-ms <n>] [--events jsonl]\n nolo run --msg <message> [--cwd <path>] [--image <url-or-path>] [--timeout-ms <n>]\nRuns local Codex in the current workspace; no Nolo login required.\n"
145
- );
146
- return;
147
- }
148
- if (commandName === "chat") {
149
- output.write(
150
- "Usage: nolo chat <message> [--cwd <path>] [--events jsonl]\n nolo chat --agent <agent> (--msg <message>|--msg-file <path>) [--local|--server|--auto]\nWithout --agent, this uses local Codex in the current workspace; no Nolo login required.\n"
151
- );
152
- return;
153
- }
154
- output.write(
155
- "Usage: nolo agent run <agent> <message> [--local|--server|--auto] [--runtime-key <key>] [--docker-workspace-mode git|empty] [--instabox-workspace empty|snapshot] [--instabox-manifest <path>] [--instabox-artifact-dir <path>] [--instabox-allow-remote-release] [--instabox-allow-paid] [--ephemeral|--memory-only] [--continue <dialogId>] [--cwd <path>]\n nolo agent run --agent <agent> (--msg <message>|--msg-file <path>) [--image <url-or-path>] [--space <spaceId>] [--category <name>] [--inherit-from-dialog <dialog>] [--parent-dialog <dialog>] [--subject-dialog <dialog>] [--subject-ref <kind:id[:role]>] [--task-row-dbkey <key>] [--fallback-agent <agent>] (suggestions for agent to decide on quota) [--allowed-tool <tool>] [--blocked-tool <tool>] [--read-only] [--runtime-key <key>] [--docker-workspace-mode git|empty] [--instabox-workspace empty|snapshot] [--instabox-manifest <path>] [--instabox-artifact-dir <path>] [--instabox-allow-remote-release] [--instabox-allow-paid] [--machine-shell] [--dod <cmd>] [--bg] [--timeout-ms <n>] [--events jsonl] [--no-stream] [--skill <dbKey-or-md-path>]\n"
156
- );
157
- }
158
- function parseAgentRunArgs(args, options = {}) {
159
- const positional = positionalArgs(args);
160
- const isNoLoginRunShorthand = (options.commandPath?.join(" ") === "run" || options.commandPath?.join(" ") === "chat") && !readFlagValue(args, "--agent");
161
- const rawAgentKey = readFlagValue(args, "--agent") ?? (isNoLoginRunShorthand ? LOCAL_CODEX_AGENT_KEY : positional[0]);
162
- const agentKey = rawAgentKey ? resolveCliAgentKeyInput(rawAgentKey) : void 0;
163
- const explicitMsg = readFlagValue(args, "--msg");
164
- const msgFile = readFlagValue(args, "--msg-file");
165
- const fileMessage = msgFile ? (options.readTextFile ?? ((path) => readFileSync(path, "utf8")))(msgFile) : void 0;
166
- const rawMessage = explicitMsg ?? fileMessage ?? positional.slice(isNoLoginRunShorthand ? 0 : 1).join(" ");
167
- if (!agentKey || !rawMessage.trim()) return null;
168
- const message = rawMessage.trim();
169
- const rawRuntimeKey = readFlagValue(args, "--runtime-key");
170
- const runtimeKey = rawRuntimeKey?.trim();
171
- const rawDockerWorkspaceMode = readFlagValue(args, "--docker-workspace-mode")?.trim();
172
- if (args.includes("--docker-workspace-mode") && rawDockerWorkspaceMode !== "git" && rawDockerWorkspaceMode !== "empty") {
173
- throw new Error("--docker-workspace-mode \u5FC5\u987B\u662F git \u6216 empty");
174
- }
175
- const dockerWorkspaceMode = rawDockerWorkspaceMode;
176
- if (dockerWorkspaceMode && !/^docker(:.+)?$/.test(runtimeKey ?? "")) {
177
- throw new Error("--docker-workspace-mode \u4EC5\u9002\u7528\u4E8E --runtime-key docker[:runtimeId]");
178
- }
179
- const dockerWorkspaceModeRuntimeMode = runtimeModeFromArgs(args);
180
- const dockerWorkspaceModeImplicitLocal = !dockerWorkspaceModeRuntimeMode && (isFullstackCodingAgentRef(rawAgentKey, agentKey) || isLocalCliAgentKey(agentKey) || args.includes("--dangerously-allow-shell"));
181
- if (dockerWorkspaceMode && dockerWorkspaceModeRuntimeMode !== "local" && !dockerWorkspaceModeImplicitLocal) {
182
- throw new Error(
183
- "--docker-workspace-mode \u9700\u8981\u672C\u673A\u6267\u884C\u8DEF\u5F84\uFF1A\u4E0D\u5E26 --local \u65F6 runtimeMode \u89E3\u6790\u4E3A auto\uFF0C\u8BE5\u53C2\u6570\u4F1A\u88AB\u9759\u9ED8\u4E22\u5F03\u5E76\u6539\u8D70\u670D\u52A1\u7AEF\u6D3E\u53D1\u3002\u8BF7\u52A0 --local\uFF1B\u9690\u5F0F local\uFF08fullstack / local-cli agent / --dangerously-allow-shell\uFF09\u540C\u6837\u88AB\u63A5\u53D7\u3002"
184
- );
185
- }
186
- if (args.includes("--runtime-key") && !runtimeKey) {
187
- throw new Error(
188
- "runtimeKey \u5FC5\u987B\u662F\u975E\u7A7A\u7684 listRuntimes key\uFF08local | server | machine:<machineId> | docker | docker:<runtimeId> | instabox | gcp\uFF09"
189
- );
190
- }
191
- const hasModeFlag = args.includes("--local") || args.includes("--server") || args.includes("--auto");
192
- const dockerRuntimeLocalKey = runtimeKey !== void 0 && /^docker(:.+)?$/.test(runtimeKey);
193
- const instaboxRuntimeLocalKey = runtimeKey === "instabox";
194
- const localSandboxCombination = (dockerRuntimeLocalKey || instaboxRuntimeLocalKey) && args.includes("--local");
195
- if (runtimeKey && hasModeFlag && !localSandboxCombination) {
196
- throw new Error(
197
- "\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A --local/--server/--auto \u4E0E --runtime-key\uFF08\u4F4D\u7F6E\u6B67\u4E49\uFF09\uFF1A--runtime-key \u5DF2\u76F4\u63A5\u6307\u5B9A\u6267\u884C\u540E\u7AEF\uFF08\u5982 gcp\u3001machine:<id>\uFF09\uFF0C\u8BF7\u79FB\u9664 --local/--server/--auto\uFF08\u4F8B\u5916\uFF1A--local + docker / instabox \u662F\u5408\u6CD5\u7EC4\u5408\uFF0C\u8868\u793A\u300C\u672C\u673A\u6C99\u76D2\u5185\u6267\u884C\u300D\uFF09"
198
- );
199
- }
200
- if (runtimeKey && !isValidRuntimeKey(runtimeKey)) {
201
- throw new Error(
202
- `\u672A\u77E5\u6216\u65E0\u6548\u7684 runtimeKey "${runtimeKey}"\u3002\u53EF\u9009\u503C\uFF1Alocal | server | machine:<machineId> | docker | docker:<runtimeId> | instabox | gcp`
203
- );
204
- }
205
- if (runtimeKey && args.includes("--machine-shell")) {
206
- throw new Error(
207
- "\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A --machine-shell \u4E0E --runtime-key\uFF1A--machine-shell \u5DF2\u628A\u6D3E\u53D1\u9501\u5230\u7ED1\u5B9A\u673A\u5668\u7684 server \u901A\u9053\uFF0CruntimeKey \u4F1A\u5931\u6548\uFF0C\u8BF7\u53EA\u4FDD\u7559\u5176\u4E2D\u4E00\u4E2A"
208
- );
209
- }
210
- const rawInstaboxWorkspace = readFlagValue(args, "--instabox-workspace")?.trim();
211
- const rawInstaboxManifest = readFlagValue(args, "--instabox-manifest")?.trim();
212
- const rawInstaboxArtifactDir = readFlagValue(args, "--instabox-artifact-dir")?.trim();
213
- const instaboxAllowRemoteRelease = args.includes("--instabox-allow-remote-release");
214
- const instaboxAllowPaid = args.includes("--instabox-allow-paid");
215
- const hasInstaboxFlags = args.includes("--instabox-workspace") || args.includes("--instabox-manifest") || args.includes("--instabox-artifact-dir") || instaboxAllowRemoteRelease || instaboxAllowPaid;
216
- if (hasInstaboxFlags && runtimeKey !== "instabox") {
217
- throw new Error("--instabox-* \u53C2\u6570\u4EC5\u9002\u7528\u4E8E --runtime-key instabox");
218
- }
219
- if (runtimeKey === "instabox") {
220
- if (!rawInstaboxWorkspace || rawInstaboxWorkspace !== "empty" && rawInstaboxWorkspace !== "snapshot") {
221
- throw new Error("--runtime-key instabox \u5FC5\u987B\u6307\u5B9A --instabox-workspace empty|snapshot");
222
- }
223
- if (!rawInstaboxArtifactDir) {
224
- throw new Error("--runtime-key instabox \u5FC5\u987B\u6307\u5B9A --instabox-artifact-dir <\u7EDD\u5BF9\u8DEF\u5F84>");
225
- }
226
- if (!isAbsolute(rawInstaboxArtifactDir) || rawInstaboxArtifactDir.includes("\0") || rawInstaboxArtifactDir.split("/").includes("..")) {
227
- throw new Error(`--instabox-artifact-dir \u5FC5\u987B\u4E3A\u5408\u6CD5\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u4E14\u4E0D\u80FD\u5305\u542B .. \u6216\u7A7A\u5B57\u7B26: "${rawInstaboxArtifactDir}"`);
228
- }
229
- if (rawInstaboxWorkspace === "snapshot" && !rawInstaboxManifest) {
230
- throw new Error("--instabox-workspace snapshot \u5FC5\u987B\u6307\u5B9A --instabox-manifest <\u6587\u4EF6\u8DEF\u5F84>");
231
- }
232
- if (rawInstaboxWorkspace === "empty" && args.includes("--instabox-manifest")) {
233
- throw new Error("--instabox-workspace empty \u4E0D\u5F97\u6307\u5B9A --instabox-manifest");
234
- }
235
- }
236
- const runtimeMode = runtimeModeFromArgs(args);
237
- const explicitContinueDialogId = readFlagValue(args, "--continue");
238
- const continueDialogId = explicitContinueDialogId ?? readFlagValue(args, "--dialog");
239
- const freshDialog = args.includes("--fresh") || args.includes("--fresh-dialog");
240
- const strictContinueHistory = args.includes("--strict-continue-history");
241
- if (freshDialog) {
242
- if (strictContinueHistory) {
243
- throw new Error("Cannot combine --fresh with --strict-continue-history");
244
- }
245
- if (continueDialogId) {
246
- throw new Error("Cannot combine --fresh with --continue or --dialog");
247
- }
248
- }
249
- const spaceId = readFlagValue(args, "--space");
250
- const category = readFlagValue(args, "--category");
251
- const inheritedFromDialog = readFlagValue(args, "--inherit-from-dialog");
252
- const subjectDialog = readFlagValue(args, "--subject-dialog") ?? readFlagValue(args, "--reference-dialog");
253
- const subjectDialogKey = subjectDialog?.trim();
254
- const subjectRefs = readRepeatedFlagValues(args, "--subject-ref").map(parseSubjectRef).filter((ref) => Boolean(ref));
255
- const fallbackAgentKeys = readRepeatedFlagValues(args, "--fallback-agent").map((value) => resolveCliAgentKeyInput(value.trim())).filter(Boolean);
256
- const allowedToolNames = readRepeatedFlagValues(args, "--allowed-tool").map((value) => value.trim()).filter(Boolean);
257
- const cwd = readFlagValue(args, "--cwd");
258
- const timeoutMs = parsePositiveInteger(readFlagValue(args, "--timeout-ms"));
259
- const rawEventsMode = readFlagValue(args, "--events");
260
- const eventsMode = rawEventsMode === "jsonl" ? "jsonl" : void 0;
261
- const inheritedRef = inheritedFromDialog ? parseDialogReference(inheritedFromDialog) : void 0;
262
- const explicitLocalCliAgentDefault = isLocalCliAgentKey(agentKey) && runtimeMode !== "server";
263
- const explicitParentDialog = readFlagValue(args, "--parent-dialog");
264
- const parentDialogRef = explicitParentDialog ? parseDialogReference(explicitParentDialog) : void 0;
265
- const explicitReadOnly = args.includes("--read-only");
266
- const blockedToolNames = [
267
- ...readRepeatedFlagValues(args, "--blocked-tool").map((value) => value.trim()).filter(Boolean),
268
- ...explicitReadOnly ? HIGH_RISK_MUTATION_TOOL_NAMES : []
269
- ];
270
- const imageUrls = [
271
- ...readRepeatedFlagValues(args, "--image"),
272
- ...readRepeatedFlagValues(args, "--image-url")
273
- ];
274
- const fullstackLocalWorkspaceDefault = isFullstackCodingAgentRef(rawAgentKey, agentKey) && runtimeMode !== "server";
275
- const ephemeral = args.includes("--ephemeral") || args.includes("--memory-only");
276
- const workflowRef = readFlagValue(args, "--workflow");
277
- const skillRefs = readRepeatedFlagValues(args, "--skill").map((v) => v.trim()).filter(Boolean);
278
- const dodCommands = readRepeatedFlagValues(args, "--dod").map((v) => v.trim()).filter(Boolean);
279
- const taskRowDbKey = readFlagValue(args, "--task-row-dbkey");
280
- const artifactIds = readFlagValue(args, "--artifact-ids")?.split(",").map((item) => item.trim()).filter(Boolean);
281
- const queueFile = readFlagValue(args, "--queue-file");
282
- return {
283
- agentKey,
284
- message,
285
- imageUrls,
286
- allowShell: args.includes("--dangerously-allow-shell") || fullstackLocalWorkspaceDefault || explicitLocalCliAgentDefault,
287
- traceTools: args.includes("--trace-tools"),
288
- ephemeral,
289
- ...eventsMode ? { eventsMode } : {},
290
- injectFeatureWorktreeInstruction: fullstackLocalWorkspaceDefault,
291
- ...workflowRef ? { workflowRef } : {},
292
- ...skillRefs.length ? { skillRefs } : {},
293
- ...taskRowDbKey ? {
294
- taskEvidence: {
295
- rowDbKey: taskRowDbKey,
296
- ...artifactIds?.length ? { artifactIds } : {}
297
- }
298
- } : {},
299
- ...runtimeMode ? { runtimeMode } : !runtimeKey && (fullstackLocalWorkspaceDefault || explicitLocalCliAgentDefault || args.includes("--dangerously-allow-shell")) ? { runtimeMode: "local" } : {},
300
- ...runtimeKey ? { runtimeKey } : {},
301
- ...dockerWorkspaceMode ? { dockerWorkspaceMode } : {},
302
- ...rawInstaboxWorkspace ? { instaboxWorkspace: rawInstaboxWorkspace } : {},
303
- ...rawInstaboxManifest ? { instaboxManifestPath: rawInstaboxManifest } : {},
304
- ...rawInstaboxArtifactDir ? { instaboxArtifactDir: rawInstaboxArtifactDir } : {},
305
- ...instaboxAllowRemoteRelease ? { instaboxAllowRemoteRelease: true } : {},
306
- ...instaboxAllowPaid ? { instaboxAllowPaid: true } : {},
307
- background: args.includes("--bg"),
308
- noStream: args.includes("--no-stream"),
309
- machineShell: args.includes("--machine-shell"),
310
- ...continueDialogId ? { continueDialogId } : {},
311
- ...strictContinueHistory ? { strictContinueHistory: true } : {},
312
- ...freshDialog ? { freshDialog: true } : {},
313
- ...!continueDialogId && spaceId ? { spaceId } : {},
314
- ...category ? { category } : {},
315
- ...inheritedRef?.dialogKey ? { inheritedFromDialogKey: inheritedRef.dialogKey } : {},
316
- ...parentDialogRef?.dialogId || inheritedRef?.dialogId ? { parentDialogId: parentDialogRef?.dialogId ?? inheritedRef?.dialogId } : {},
317
- ...parentDialogRef?.dialogId ? { parentWakeOnTerminal: true } : {},
318
- ...subjectDialogKey ? { subjectDialogKey } : {},
319
- ...subjectRefs.length ? { subjectRefs } : {},
320
- ...fallbackAgentKeys.length ? { fallbackAgentKeys } : {},
321
- ...allowedToolNames.length ? { allowedToolNames } : {},
322
- ...cwd ? { cwd } : {},
323
- ...blockedToolNames.length ? { blockedToolNames } : {},
324
- ...dodCommands.length ? { dodCommands } : {},
325
- ...typeof timeoutMs === "number" ? { timeoutMs } : {},
326
- ...queueFile ? { queueFile } : {}
327
- };
328
- }
329
-
330
- export {
331
- readFlagValue,
332
- isFullstackCodingAgentRef,
333
- positionalArgs,
334
- resolveRawAgentInput,
335
- resolveServerUrl,
336
- buildLocalRunEnv,
337
- writeUsage,
338
- parseAgentRunArgs
339
- };
package/chunk-LEC5ALIN.js DELETED
@@ -1,91 +0,0 @@
1
- import {
2
- dialogMessageKey
3
- } from "./chunk-XJWWBO34.js";
4
- import {
5
- asOptionalFiniteNumber
6
- } from "./chunk-WWC7I6TA.js";
7
- import {
8
- asOptionalTrimmedString
9
- } from "./chunk-G3SUCT4W.js";
10
-
11
- // packages/core/chat/dialogAttachmentCleanup.ts
12
- var FILE_CONTENT_RE = /(?:https?:\/\/[^/"'\s]+)?\/api\/v1\/db\/file\/content\/([^?#"'\s)]+)/g;
13
- function extractFileContentIds(value) {
14
- const ids = /* @__PURE__ */ new Set();
15
- const visit = (input) => {
16
- if (typeof input === "string") {
17
- for (const match of input.matchAll(FILE_CONTENT_RE)) {
18
- const fileId = decodeURIComponent(match[1] ?? "").trim();
19
- if (fileId) ids.add(fileId);
20
- }
21
- return;
22
- }
23
- if (Array.isArray(input)) {
24
- for (const item of input) visit(item);
25
- return;
26
- }
27
- if (input && typeof input === "object") {
28
- for (const item of Object.values(input)) visit(item);
29
- }
30
- };
31
- visit(value);
32
- return [...ids];
33
- }
34
- function messageDbKey(dialogId, message) {
35
- const dbKey = asOptionalTrimmedString(message.dbKey);
36
- if (dbKey) return dbKey;
37
- const id = asOptionalTrimmedString(message.id);
38
- if (id) return dialogMessageKey(dialogId, id);
39
- return null;
40
- }
41
- function asText(value) {
42
- return asOptionalTrimmedString(value) ?? null;
43
- }
44
- function buildDialogAttachmentPlan(args) {
45
- const messageKeys = new Set(
46
- args.messages.map((message) => messageDbKey(args.dialogId, message)).filter((key) => Boolean(key))
47
- );
48
- const referencedFileIds = [
49
- ...new Set(args.messages.flatMap((message) => extractFileContentIds(message)))
50
- ];
51
- const candidates = referencedFileIds.map((fileId) => {
52
- const metadata = args.metadataByFileId[fileId];
53
- const ownerType = asText(metadata?.ownerType);
54
- const ownerId = asText(metadata?.ownerId);
55
- const ownerDbKey = asText(metadata?.ownerDbKey);
56
- const fileDbKey = asText(metadata?.dbKey);
57
- const source = asText(metadata?.source);
58
- const ownedByDialog = ownerType === "dialog" && ownerId === args.dialogId;
59
- const ownedByMessage = Boolean(ownerDbKey && messageKeys.has(ownerDbKey));
60
- const userOwnedReferenced = args.includeUserOwnedReferenced === true && Boolean(args.ownerId) && ownerType === "user" && ownerId === args.ownerId;
61
- const canDelete = Boolean(fileDbKey && (ownedByDialog || ownedByMessage || userOwnedReferenced));
62
- return {
63
- fileId,
64
- fileDbKey,
65
- size: asOptionalFiniteNumber(metadata?.size) ?? null,
66
- ownerType,
67
- ownerId,
68
- ownerDbKey,
69
- source,
70
- status: canDelete ? "delete" : "retain",
71
- reason: canDelete ? ownedByMessage ? "ownerDbKey matches a message in this dialog" : userOwnedReferenced ? "user-owned file is referenced by this dialog and explicit referenced-attachment deletion is enabled" : "ownerType/ownerId matches this dialog" : fileDbKey ? "file ownership is not exclusive to this dialog" : "file metadata not found"
72
- };
73
- });
74
- const deleteCandidates = candidates.filter((candidate) => candidate.status === "delete");
75
- const retainedCandidates = candidates.filter((candidate) => candidate.status === "retain");
76
- return {
77
- dialogId: args.dialogId,
78
- messageCount: args.messages.length,
79
- referencedFileIds,
80
- candidates,
81
- deleteCandidates,
82
- retainedCandidates,
83
- bytesToDelete: deleteCandidates.reduce((sum, candidate) => sum + (candidate.size ?? 0), 0),
84
- metadataReadFailures: args.metadataReadFailures ?? []
85
- };
86
- }
87
-
88
- export {
89
- extractFileContentIds,
90
- buildDialogAttachmentPlan
91
- };