nolo-cli 0.212.0-alpha.1 → 0.222.0-alpha.2

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 (263) hide show
  1. package/README.md +3 -2
  2. package/{_executeModel-KE6MBNUJ.js → _executeModel-4GGQQHOB.js} +111 -82
  3. package/{accountResolver-4LKIHEKL.js → accountResolver-EK2S4PWF.js} +6 -6
  4. package/{action-DF5UYSJF.js → action-CK64LS6S.js} +12 -11
  5. package/{addContentAction-N2YC5IL3.js → addContentAction-GDHDOF4U.js} +18 -17
  6. package/{addDialogAgentAction-3NKVQCEC.js → addDialogAgentAction-CAKRU3ZT.js} +21 -20
  7. package/{agentDeleteCommand-NWK7VU4N.js → agentDeleteCommand-BPV2XZL7.js} +128 -119
  8. package/{agentEmailCommands-UZ4DHEX2.js → agentEmailCommands-EJOS75YL.js} +132 -124
  9. package/{agentFavoriteCommands-EDK743YA.js → agentFavoriteCommands-2LKGKSUD.js} +7 -8
  10. package/{agentGrantCommands-RQWK2TEV.js → agentGrantCommands-QQV4N4JW.js} +5 -5
  11. package/{agentListCommands-HE7L2A6L.js → agentListCommands-HIZODBF3.js} +196 -124
  12. package/{agentMachineCommands-6TE4MBMP.js → agentMachineCommands-ZMQ2CY7Y.js} +62 -53
  13. package/{agentProviderCommands-Q5O33MED.js → agentProviderCommands-WKJOAWBP.js} +5 -5
  14. package/{agentPullCommand-6EM3URVK.js → agentPullCommand-XN6ZPBUW.js} +7 -7
  15. package/agentRecordCommands-OMXVDLDX.js +176 -0
  16. package/agentRunCommand-CB34YWMV.js +206 -0
  17. package/{agentRunControl-OI3LOENH.js → agentRunControl-JNONH3RP.js} +30 -15
  18. package/{agentRuntimeLocal-HL526DNQ.js → agentRuntimeLocal-QZPFWMLG.js} +52 -45
  19. package/{agentSlice-TMYP2UEA.js → agentSlice-RD2CDU7T.js} +20 -19
  20. package/{appDeleteCommands-ZERW4AXY.js → appDeleteCommands-QCCFDIEQ.js} +61 -52
  21. package/{appDeployCommands-DUWSMYHL.js → appDeployCommands-V2T7TNMQ.js} +61 -52
  22. package/{appDeployStatusCommands-N2KIE4BF.js → appDeployStatusCommands-6PGH7ZCG.js} +61 -52
  23. package/{appGetCommands-YVR4NPVY.js → appGetCommands-3L7WWJA6.js} +61 -52
  24. package/{appListCommands-JS6HOHZS.js → appListCommands-ENJCK4PO.js} +61 -52
  25. package/{authCommand-FE2C3ZUM.js → authCommand-6V47SYGK.js} +29 -28
  26. package/{authCommands-HV3EAU3V.js → authCommands-GAJ3NIXO.js} +14 -13
  27. package/{builtinSkillRegistry-3YOIGEF6.js → builtinSkillRegistry-2ECA42FC.js} +11 -13
  28. package/{chromeCommands-REEAH4SX.js → chromeCommands-G5UDKVSV.js} +3 -3
  29. package/{chromeOpsCommands-HEN5AX2J.js → chromeOpsCommands-YKX2QX3A.js} +20 -10
  30. package/{chunk-DM6UMOEL.js → chunk-27PCUMJI.js} +2 -2
  31. package/chunk-2CI3ZFWD.js +97 -0
  32. package/{chunk-HIRC32DV.js → chunk-2GJKRKI6.js} +543 -29
  33. package/{chunk-SM3NSZJV.js → chunk-2UCBGYO4.js} +20 -1
  34. package/{chunk-PYRUW7XN.js → chunk-2VUZSVAS.js} +136 -54
  35. package/chunk-2YGBI2XB.js +30 -0
  36. package/chunk-2ZKFCIJJ.js +13 -0
  37. package/{chunk-CJRONOYL.js → chunk-34J5K2YA.js} +19 -75
  38. package/{chunk-LOEO7LRC.js → chunk-3IK6ILVW.js} +4 -1
  39. package/{chunk-CTPXME7U.js → chunk-3LMUPOHG.js} +29 -6
  40. package/chunk-44X52WOJ.js +1621 -0
  41. package/{chunk-6VLJ6YA7.js → chunk-4DESLZTK.js} +9 -9
  42. package/{chunk-MYOH447Z.js → chunk-4JVNURX4.js} +1 -1
  43. package/chunk-5CHGAKRT.js +364 -0
  44. package/{chunk-YDH3FDFQ.js → chunk-5FUN7EG4.js} +1 -1
  45. package/{chunk-LKDF3ATR.js → chunk-5RKUPJYL.js} +1 -1
  46. package/{chunk-ZC3CMUKU.js → chunk-6OVNSQHN.js} +84 -2
  47. package/{chunk-IF45XG7K.js → chunk-6WU5572L.js} +40 -24
  48. package/{chunk-OHNELDTO.js → chunk-7EEZJ6BS.js} +11 -152
  49. package/{chunk-Y6ORVLSS.js → chunk-7ET2U67U.js} +1 -1
  50. package/{chunk-G7MLNNEX.js → chunk-7JLY4WYF.js} +5 -5
  51. package/{chunk-P5L7CXOC.js → chunk-7Z6EW7AH.js} +3 -2
  52. package/{chunk-IIQ6JGRI.js → chunk-AD5EWDFD.js} +2 -2
  53. package/{chunk-WXYLV624.js → chunk-AIHYNKGV.js} +4 -4
  54. package/{chunk-HPFCI4SK.js → chunk-AK5O76CC.js} +3 -3
  55. package/{chunk-Y63ZSOR6.js → chunk-AL3TYDIF.js} +1 -1
  56. package/{chunk-PJNFNEJE.js → chunk-AMEOV5VZ.js} +59 -13
  57. package/chunk-AN74ON4G.js +675 -0
  58. package/{chunk-HRMJUN5J.js → chunk-AQZ6BMRK.js} +1 -1
  59. package/{chunk-CQ46IRNN.js → chunk-B4GOW4MT.js} +445 -201
  60. package/{chunk-4KB6WQUL.js → chunk-BGP2EDFG.js} +1 -1
  61. package/{chunk-NBTY7YJF.js → chunk-BR3GT6MR.js} +1 -0
  62. package/{chunk-7RFNTILS.js → chunk-BUDVRYES.js} +2 -2
  63. package/{chunk-D2MDMY2M.js → chunk-BV3FLP2L.js} +47 -1
  64. package/{chunk-25JZEIXN.js → chunk-C4VAR65S.js} +92 -150
  65. package/{chunk-AVTVGMDY.js → chunk-C4WTX5TU.js} +2 -2
  66. package/{chunk-ZL5RAEEB.js → chunk-CIRB724Q.js} +1 -1
  67. package/{chunk-F6UUQOG6.js → chunk-CKT6QUE2.js} +4 -4
  68. package/{chunk-M6RL5JCD.js → chunk-CMZ3Z5PT.js} +14 -14
  69. package/{secretCommands-4QS3HCA2.js → chunk-D726I5AZ.js} +191 -16
  70. package/{chunk-INSBKSBB.js → chunk-DNKTQ3IN.js} +4 -4
  71. package/chunk-DVQH4BTR.js +1137 -0
  72. package/{chunk-SOHTHFV2.js → chunk-DWX2HEVC.js} +91 -132
  73. package/{chunk-NOMIGOST.js → chunk-EIAI3PPH.js} +116 -124
  74. package/chunk-EUCFKKDM.js +247 -0
  75. package/chunk-EWQ3HGNZ.js +90 -0
  76. package/{chunk-RPQXPZZF.js → chunk-F3GRJO4Z.js} +908 -13
  77. package/{chunk-GSQNH63I.js → chunk-FIYSMXHY.js} +3 -19
  78. package/{chunk-KSTEXKL6.js → chunk-FJ23FZXF.js} +76 -31
  79. package/{chunk-INN4LTAJ.js → chunk-FJK526XH.js} +2 -2
  80. package/chunk-FS2XP5D7.js +142 -0
  81. package/{chunk-QT6PKHYJ.js → chunk-FYF2TONJ.js} +5 -5
  82. package/{chunk-OXME3PEE.js → chunk-GBWGPTA7.js} +2 -1
  83. package/{chunk-RU4SD66C.js → chunk-GYVCJABP.js} +30 -254
  84. package/{chunk-YUXQAVRD.js → chunk-HOCHUZQ7.js} +257 -90
  85. package/{chunk-Y2WUYX4I.js → chunk-HXER7YJF.js} +4 -4
  86. package/chunk-HYIETXA6.js +99 -0
  87. package/{chunk-H2TJUNCH.js → chunk-I4EADJ4P.js} +6 -6
  88. package/{chunk-TCZHTTUU.js → chunk-I7WBYGBP.js} +8 -8
  89. package/{chunk-5RYBGBQH.js → chunk-IILMY4W4.js} +14 -9
  90. package/chunk-JA3ICVJY.js +271 -0
  91. package/{chunk-ZRSNONOB.js → chunk-JWXITTQB.js} +8 -3
  92. package/{chunk-JNKSDZFS.js → chunk-KEN3N2TN.js} +310 -66
  93. package/{chunk-LEC5ALIN.js → chunk-KEPOVMF4.js} +1 -1
  94. package/{chunk-UHJGXRJ4.js → chunk-KQSYAIZR.js} +3 -3
  95. package/{chunk-4VJAC32I.js → chunk-L5I543VB.js} +3 -2
  96. package/chunk-LKA64WH4.js +227 -0
  97. package/{chunk-6OQUPIQF.js → chunk-LVL6GFCM.js} +4 -4
  98. package/{chunk-UTV2AYEG.js → chunk-MAIITKBT.js} +2 -2
  99. package/chunk-MBG66ZBH.js +226 -0
  100. package/{chunk-YUA6OAH5.js → chunk-MDLS23JK.js} +2 -2
  101. package/{chunk-VL5KOY2C.js → chunk-MK2Q7ZJD.js} +67 -5
  102. package/{chunk-B7NJ3T4A.js → chunk-MS4NZNKI.js} +10 -10
  103. package/{chunk-3AKFVZ2I.js → chunk-MYHNBEXD.js} +3 -3
  104. package/{chunk-VZKUKCA6.js → chunk-MZLE5HQ3.js} +3673 -241
  105. package/{chunk-AZMYUSVF.js → chunk-N5Z2V73W.js} +1 -1
  106. package/chunk-NIZ2BXFD.js +526 -0
  107. package/{chunk-YPD3VJZW.js → chunk-NWP2OYOX.js} +20 -20
  108. package/{chunk-3FOQHGHN.js → chunk-O6J3OTOP.js} +4 -4
  109. package/{chunk-3RQVYR4B.js → chunk-OB6DVWPF.js} +197 -65
  110. package/{chunk-YWSEPJ7C.js → chunk-OBWT45ZU.js} +3 -3
  111. package/{chunk-5AQR3DGV.js → chunk-ODJ7BVSI.js} +80 -11
  112. package/{chunk-XJWWBO34.js → chunk-OJKUU3LP.js} +5 -7
  113. package/{chunk-GNDJKC4B.js → chunk-ON37YXGX.js} +29 -29
  114. package/{chunk-D5RCRX4A.js → chunk-P5ZJRTCH.js} +9415 -5169
  115. package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
  116. package/{chunk-EZFQ6XRV.js → chunk-PJCIP64Z.js} +861 -59
  117. package/{chunk-GPO7FCEZ.js → chunk-PJVKMGPZ.js} +1222 -1719
  118. package/{chunk-CKAHAVMK.js → chunk-PPJYZRSQ.js} +40 -26
  119. package/chunk-QHEN7NZ7.js +46 -0
  120. package/{chunk-4KH4J3G5.js → chunk-QNWG52I4.js} +19 -7
  121. package/{chunk-YGILMZ7N.js → chunk-QVBXJNZ2.js} +1 -1
  122. package/chunk-RDH5CQ4T.js +1382 -0
  123. package/{chunk-C6KNNXWU.js → chunk-RGQ4UUWZ.js} +25 -2
  124. package/{chunk-OWYYDMGJ.js → chunk-S2NTVGA2.js} +4 -2
  125. package/{chunk-KC4XDTT3.js → chunk-SOF4OWDM.js} +6 -4
  126. package/{chunk-IAPCBNEE.js → chunk-SQYIK6HO.js} +1 -1
  127. package/{chunk-22CIEBYO.js → chunk-SVT62ULE.js} +50 -48
  128. package/{chunk-KIM6CLW5.js → chunk-SY3C4SQ7.js} +42 -15
  129. package/{chunk-JY5NGFFH.js → chunk-SYTHYBMI.js} +5 -5
  130. package/{chunk-6NSSLV67.js → chunk-T6DXNI6Z.js} +52 -50
  131. package/chunk-TLE77UJ5.js +230 -0
  132. package/{chunk-4VNS5WPM.js → chunk-U67V476Y.js} +1 -8
  133. package/{chunk-F7CI2ZC5.js → chunk-UAIHKQIA.js} +2 -1
  134. package/{chunk-MMNYUVLW.js → chunk-UB3D4TRQ.js} +11 -77
  135. package/{chunk-WPORQFYN.js → chunk-UVLYNWIE.js} +2 -2
  136. package/{chunk-YOIW77S2.js → chunk-UYOICCYG.js} +29 -19
  137. package/{chunk-4I7ERB7F.js → chunk-VREDDN25.js} +1 -1
  138. package/{chunk-JIT6FSXJ.js → chunk-WAE3GFCJ.js} +3 -3
  139. package/{chunk-IJXYFTV7.js → chunk-WI67URFP.js} +20 -20
  140. package/{chunk-7OCO4TDT.js → chunk-WJVYAO6P.js} +1 -1
  141. package/{chunk-T43B7LB2.js → chunk-WKGQSYTB.js} +1 -1
  142. package/{chunk-YJMRHHGY.js → chunk-WUUH4LWZ.js} +60 -30
  143. package/{chunk-PDGKOTO7.js → chunk-X7UF53VA.js} +33 -22
  144. package/{chunk-TY3TIUJK.js → chunk-XI2BWJM5.js} +65 -0
  145. package/{chunk-OOF4UPC5.js → chunk-XWVCYUUU.js} +16 -159
  146. package/{chunk-J5JTMQIA.js → chunk-YFLVRVYK.js} +1 -1
  147. package/{chunk-EYLGAEB4.js → chunk-YGMBIXCF.js} +132 -0
  148. package/chunk-YL3EFYL3.js +199 -0
  149. package/{chunk-MMA3LZ3W.js → chunk-YNIYE47Z.js} +1 -1
  150. package/{chunk-W4S457LU.js → chunk-YU4ZPWVF.js} +41 -5
  151. package/{chunk-NJR3WKVP.js → chunk-YWWDC3O7.js} +281 -159
  152. package/chunk-YZMNK53S.js +68 -0
  153. package/{chunk-FHU44LN3.js → chunk-Z2PITYZN.js} +2179 -552
  154. package/{chunk-FY7F4Q6X.js → chunk-Z4PCXPUE.js} +2 -2
  155. package/{cliAgentConfigHelpers-WJBZQTLW.js → cliAgentConfigHelpers-TKYL43MT.js} +15 -16
  156. package/{cliAuthorityBrokerClient-PM3U6Q6J.js → cliAuthorityBrokerClient-XHH7MH2P.js} +1 -1
  157. package/{cliAuthorityStoreDriver-TKLXNNTG.js → cliAuthorityStoreDriver-6FE3BJNB.js} +1 -1
  158. package/{cliEnvHelpers-BVYTMUPJ.js → cliEnvHelpers-VPSJ4XWC.js} +3 -3
  159. package/{cliExecutor-BWBF2MTI.js → cliExecutor-4MAX3PZL.js} +2 -2
  160. package/cliLocalAgentRecordReader-MHHD4T7R.js +90 -0
  161. package/{commandRegistry-VVMTPFAX.js → commandRegistry-5DA5UP7S.js} +106 -98
  162. package/{contentThunks-N52O67MI.js → contentThunks-5GUQ7FWJ.js} +47 -43
  163. package/{cooldownCommands-YXLWOXWR.js → cooldownCommands-X7P5M2V5.js} +5 -4
  164. package/{createAgentAutomationAction-ZC57YRSV.js → createAgentAutomationAction-UCLTHQRI.js} +51 -49
  165. package/{createDialogAction-VQW5WDYX.js → createDialogAction-UPN774AF.js} +46 -48
  166. package/{createPageAction-M5VDA7SC.js → createPageAction-JRQ2TA4O.js} +50 -48
  167. package/{cursorProvider-YGGNMVWX.js → cursorProvider-2RACMEMF.js} +1 -1
  168. package/{db-HUCI5R4G.js → db-CS4ZJQKV.js} +1 -1
  169. package/{dbSlice-HP7G4LX3.js → dbSlice-WNON7TOL.js} +17 -16
  170. package/{deleteFile-7VQGLK2V.js → deleteFile-Q3YDB4ML.js} +9 -9
  171. package/{desktopFolderProjects-SFY5EZS3.js → desktopFolderProjects-4POAMVJN.js} +2 -2
  172. package/{dialogCommands-JHMR2N2Y.js → dialogCommands-VRI7VCXH.js} +64 -57
  173. package/dialogNotifyCommand-6TMCX4D2.js +36 -0
  174. package/{dialogSlice-GRSVGDTF.js → dialogSlice-LFNVUSAN.js} +42 -40
  175. package/{dialogUsageCommand-7KCPYGHG.js → dialogUsageCommand-HTVPR2CX.js} +11 -10
  176. package/{docCreateCommands-F2K3UPSQ.js → docCreateCommands-AMPXMOX3.js} +61 -54
  177. package/{docDeleteCommands-XGXB5RFT.js → docDeleteCommands-I5WFAEHP.js} +63 -57
  178. package/{docReadCommands-7HWZZV6J.js → docReadCommands-X53ELNIE.js} +61 -54
  179. package/{docStore-KNZK6Y2G.js → docStore-2VAWVLWH.js} +21 -20
  180. package/{docUpdateCommands-OZZ7NQII.js → docUpdateCommands-6QPNDC7M.js} +64 -57
  181. package/{fetchMessages-M3QU7ZCQ.js → fetchMessages-TQEUZD7H.js} +8 -7
  182. package/{getPricing-2MNMXEVG.js → getPricing-MB2GBXOK.js} +6 -6
  183. package/{handleSendMessageAction-SHIH74GJ.js → handleSendMessageAction-AAJOHXOB.js} +193 -301
  184. package/{hostCredentialCreate-X64WK4JD.js → hostCredentialCreate-GLMJ22M6.js} +123 -114
  185. package/index.js +29 -29
  186. package/{keys-BEGDOTRL.js → keys-RWF7UCB4.js} +5 -4
  187. package/legacyMigration-TF4SYJCZ.js +19 -0
  188. package/{lib-5KKIBFIT.js → lib-OT5OTXRU.js} +7087 -6664
  189. package/{localDialogRead-XRLAH4CZ.js → localDialogRead-SVTPA5GY.js} +3 -3
  190. package/{localFirstLog-DHNOY2NA.js → localFirstLog-OIETGK66.js} +1 -1
  191. package/localRecall-2J6QPOK2.js +15 -0
  192. package/{localRuntimeAdapter-A7K3ABA6.js → localRuntimeAdapter-BMP57P42.js} +119 -110
  193. package/{localRuntimeAuthority-OYH4AE4G.js → localRuntimeAuthority-IBJAT62G.js} +1 -1
  194. package/{localRuntimeDb-VBIMCWUC.js → localRuntimeDb-N7KHDXS2.js} +2 -2
  195. package/{machineCommands-DE3MR7CJ.js → machineCommands-3MLIAK5Q.js} +128 -119
  196. package/{machineInfo-UKPTZO5Y.js → machineInfo-LWHTEBHJ.js} +1 -1
  197. package/machineWsRunDispatch-FKIGROQF.js +191 -0
  198. package/{memberThunks-7WJAY5V6.js → memberThunks-ZGLZ36PK.js} +29 -28
  199. package/{memoryCommands-ASCE5STX.js → memoryCommands-5WC3T66U.js} +4 -4
  200. package/models-ULVWLSQ6.js +9 -0
  201. package/{oauthTokenStore-OEERZFUC.js → oauthTokenStore-RUYNYALS.js} +1 -1
  202. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-4IC3Y4C6.js} +4 -4
  203. package/overlay-THLKYIWY.js +11 -0
  204. package/package.json +2 -2
  205. package/{pdf-U6KSUEZZ.js → pdf-KE3QI2V7.js} +1 -1
  206. package/{processSpawn-ZU5QFM43.js → processSpawn-6GEO77KV.js} +1 -1
  207. package/{profileConfig-KN3N2BLF.js → profileConfig-KOWK4HOG.js} +1 -1
  208. package/{projectArchive-GGL5HLMD.js → projectArchive-HK63GMF4.js} +52 -50
  209. package/{providerPresetApply-YXGV6NXB.js → providerPresetApply-OIFQ73LH.js} +19 -12
  210. package/{providerRegistry-S6UL6UNA.js → providerRegistry-KZ3SDZ3D.js} +10 -10
  211. package/{read-4VZQODSN.js → read-MRQHJMJ2.js} +10 -10
  212. package/{readDocTool-AVD32RUJ.js → readDocTool-4BGTXTXA.js} +2 -2
  213. package/{readlineWorkspace-XKYKNL2I.js → readlineWorkspace-AKAHSCNY.js} +6505 -4634
  214. package/{removeDialogAgentAction-FKL4BYMR.js → removeDialogAgentAction-B6H7DXFM.js} +23 -22
  215. package/{runAgentClientLoop-V7E2WBVM.js → runAgentClientLoop-UVAWGEON.js} +81 -79
  216. package/{runtimeDoctorCommands-QAI3MBKQ.js → runtimeDoctorCommands-FW6XKDUG.js} +12 -12
  217. package/{runtimeModeArgs-2Y7BALTO.js → runtimeModeArgs-X7DL7PUN.js} +1 -1
  218. package/secretCommands-LJXOOYA7.js +24 -0
  219. package/{setDialogExtraReferencesAction-TLIOLWWI.js → setDialogExtraReferencesAction-EVCY3TRW.js} +22 -21
  220. package/{setPrimaryDialogAgentAction-2OLWRFYR.js → setPrimaryDialogAgentAction-KPFVPHCJ.js} +23 -22
  221. package/{settingThunks-UGBPCNYF.js → settingThunks-ENOAK2WV.js} +97 -88
  222. package/{skillDiscovery-XKHROSH2.js → skillDiscovery-B5V23AXP.js} +4 -4
  223. package/{skillSummaryMarker-42HKSXYY.js → skillSummaryMarker-62UW7HI7.js} +1 -1
  224. package/{slateToRenderMarkdown-Y5IYN73U.js → slateToRenderMarkdown-R3X74MCX.js} +1 -1
  225. package/{slateUtils-NGV2NMKM.js → slateUtils-ESQAJ6RN.js} +1 -1
  226. package/{spaceCommands-4KSLKVNF.js → spaceCommands-DTTNAS2L.js} +61 -53
  227. package/store-JRVN62NM.js +46 -0
  228. package/{streamAgentChatTurn-7FR7X2NU.js → streamAgentChatTurn-R5UY25VB.js} +875 -618
  229. package/{switchDialogAgentAction-UZSAG2N5.js → switchDialogAgentAction-SZ44XDRY.js} +21 -20
  230. package/{tableCommands-MP6VFSVT.js → tableCommands-HITDSLHS.js} +10 -10
  231. package/tombstones-FQQMEDOW.js +32 -0
  232. package/{toolApiClient-HGNO53TC.js → toolApiClient-OGQEBQVX.js} +4 -4
  233. package/{tools-ZLKCC25W.js → tools-HWFG6GMJ.js} +75 -74
  234. package/tuiSummaryLlmCaller-HQQZAMYF.js +44 -0
  235. package/{updateCommands-4744PL3P.js → updateCommands-RJVCRSBP.js} +10 -8
  236. package/{updateDialogTitleAction-U53ZT7PJ.js → updateDialogTitleAction-KNPOAMVS.js} +48 -46
  237. package/{usageCommand-F4IPVMIZ.js → usageCommand-FWZCB7AM.js} +11 -10
  238. package/{usageRebuildCommand-HAW2AD5N.js → usageRebuildCommand-SP2BLNJU.js} +12 -11
  239. package/userDataMerge-HT2ZVHBJ.js +13 -0
  240. package/{windowsSelfUpdate-XSQVF2GK.js → windowsSelfUpdate-KERHIAB4.js} +3 -3
  241. package/{workloadLifecycle-4BEQHMSD.js → workloadLifecycle-DYNEYHV5.js} +7 -6
  242. package/agentRecordCommands-L3QQ7HZ4.js +0 -167
  243. package/agentRunCommand-2IFGQHCO.js +0 -196
  244. package/chunk-3CGG2PAL.js +0 -594
  245. package/chunk-5XBUWM6I.js +0 -89
  246. package/chunk-BFM34N54.js +0 -842
  247. package/chunk-CJEIOP3E.js +0 -0
  248. package/chunk-CZM5YTZ7.js +0 -977
  249. package/chunk-EYUBHHFB.js +0 -636
  250. package/chunk-JTDORD5P.js +0 -415
  251. package/chunk-NRFKLKRU.js +0 -339
  252. package/chunk-VPAZOH2D.js +0 -115
  253. package/chunk-WJZOQR2J.js +0 -151
  254. package/chunk-ZCWRMUWT.js +0 -89
  255. package/dist-M676ULYG.js +0 -7314
  256. package/machineWsRunDispatch-R26P5V36.js +0 -182
  257. package/models-PJBE6JDV.js +0 -9
  258. package/tuiSummaryLlmCaller-WC54MVGP.js +0 -160
  259. package/{chunk-WACI5I6V.js → chunk-2THCNKE4.js} +3 -3
  260. package/{chunk-2QHFH3DR.js → chunk-47ITIXO7.js} +6 -6
  261. package/{chunk-GOO6G4PY.js → chunk-CKG3PRZ7.js} +0 -0
  262. package/{chunk-OQHIVPG4.js → chunk-SNBZZPYH.js} +3 -3
  263. package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
package/chunk-NRFKLKRU.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-CQ46IRNN.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-VPAZOH2D.js DELETED
@@ -1,115 +0,0 @@
1
- import {
2
- createSpaceKey
3
- } from "./chunk-UAD2WT54.js";
4
- import {
5
- patch,
6
- read
7
- } from "./chunk-BFM34N54.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-WJZOQR2J.js DELETED
@@ -1,151 +0,0 @@
1
- // packages/ai/attachments/attachmentPart.ts
2
- var ATTACHMENT_PART_TYPE = "attachment";
3
- var ATTACHMENT_PART_VERSION = 1;
4
- var isRecord = (value) => typeof value === "object" && value !== null;
5
- var nonEmptyString = (value) => typeof value === "string" && value.trim() ? value : null;
6
- var isAttachmentCandidate = (part) => isRecord(part) && part.type === ATTACHMENT_PART_TYPE;
7
- var readSource = (part) => {
8
- const raw = part.source;
9
- if (raw !== void 0 && raw !== null) {
10
- if (!isRecord(raw)) return { invalid: "source \u4E0D\u662F\u5BF9\u8C61" };
11
- if (raw.kind === "remote-file") {
12
- const fileKey = nonEmptyString(raw.fileKey);
13
- return fileKey ? { source: { kind: "remote-file", fileKey }, legacyFileKey: false } : { invalid: "remote-file source \u7F3A fileKey" };
14
- }
15
- if (raw.kind === "local-file") {
16
- const path = nonEmptyString(raw.path);
17
- const machineId = nonEmptyString(raw.machineId);
18
- if (!path) return { invalid: "local-file source \u7F3A path" };
19
- if (!machineId) return { invalid: "local-file source \u7F3A machineId" };
20
- const workspaceRoot = nonEmptyString(raw.workspaceRoot);
21
- return {
22
- source: {
23
- kind: "local-file",
24
- path,
25
- machineId,
26
- ...workspaceRoot ? { workspaceRoot } : {}
27
- },
28
- legacyFileKey: false
29
- };
30
- }
31
- return { invalid: `\u672A\u77E5 source.kind: ${String(raw.kind)}` };
32
- }
33
- const legacyFileKey = nonEmptyString(part.fileKey);
34
- if (legacyFileKey) {
35
- return { source: { kind: "remote-file", fileKey: legacyFileKey }, legacyFileKey: true };
36
- }
37
- return { invalid: "\u7F3A source\uFF08\u4E5F\u65E0\u53EF\u517C\u5BB9\u7684\u9876\u5C42 fileKey\uFF09" };
38
- };
39
- var normalizeAttachmentPart = (part) => {
40
- if (!isAttachmentCandidate(part)) {
41
- return { status: "invalid", reason: "not-attachment", detail: "type !== 'attachment'" };
42
- }
43
- if (part.v !== ATTACHMENT_PART_VERSION) {
44
- const version = part.v;
45
- return {
46
- status: "unsupported-version",
47
- version: typeof version === "number" && Number.isFinite(version) ? version : null,
48
- detail: `v=${String(version)} \u4E0D\u662F\u5F53\u524D reader \u5DF2\u77E5\u7684\u7248\u672C`
49
- };
50
- }
51
- const source = readSource(part);
52
- if ("invalid" in source) {
53
- const given = part.source !== void 0 && part.source !== null;
54
- return {
55
- status: "invalid",
56
- reason: given ? "unsupported-source" : "missing-source",
57
- detail: source.invalid
58
- };
59
- }
60
- const name = nonEmptyString(part.name);
61
- const size = part.size;
62
- const sizeOk = typeof size === "number" && Number.isFinite(size) && size >= 0;
63
- if (!name || !sizeOk) {
64
- const missing = [!name ? "name" : null, !sizeOk ? "size" : null].filter(Boolean).join("/");
65
- return { status: "invalid", reason: "missing-metadata", detail: `\u5FEB\u7167\u5B57\u6BB5\u65E0\u6548: ${missing}` };
66
- }
67
- return {
68
- status: "valid",
69
- legacyFileKey: source.legacyFileKey,
70
- attachment: {
71
- type: ATTACHMENT_PART_TYPE,
72
- v: ATTACHMENT_PART_VERSION,
73
- source: source.source,
74
- name,
75
- mimeType: typeof part.mimeType === "string" ? part.mimeType : "",
76
- size
77
- }
78
- };
79
- };
80
- var ext = (name) => {
81
- const match = /\.([a-z0-9]+)$/i.exec(name.trim());
82
- return match ? match[1].toLowerCase() : "";
83
- };
84
- var EXT_KIND = {};
85
- var register = (kind, list) => {
86
- for (const e of list.split(" ")) {
87
- if (EXT_KIND[e]) {
88
- throw new Error(`attachment EXT_KIND \u51B2\u7A81: .${e} \u5DF2\u662F ${EXT_KIND[e]}\uFF0C\u53C8\u767B\u8BB0\u4E3A ${kind}`);
89
- }
90
- EXT_KIND[e] = kind;
91
- }
92
- };
93
- register("image", "avif bmp gif heic heif ico jpg jpeg png svg tif tiff webp");
94
- register("audio", "aac flac m4a mp3 oga ogg opus wav weba wma amr");
95
- register("video", "avi m4v mkv mov mp4 mpeg mpg webm wmv 3gp flv");
96
- register("document", "pdf doc docx odt rtf ppt pptx odp xls xlsx ods csv epub pages numbers key");
97
- register("archive", "zip rar 7z tar gz tgz bz2 xz zst apk aab ipa jar war dmg iso deb rpm");
98
- register(
99
- "text",
100
- "txt md mdx markdown json jsonl yaml yml toml ini cfg conf env log xml html htm css scss sass less js jsx ts tsx mjs cjs py rb go rs java kt swift c h cc cpp hpp cs php sh bash zsh sql graphql proto vue svelte lua r dart"
101
- );
102
- var MPEG_TS_MIME = /mp2t|mpeg-?ts|x-mpegts/;
103
- var attachmentKind = (args) => {
104
- const e = ext(typeof args.name === "string" ? args.name : "");
105
- const mime = (typeof args.mimeType === "string" ? args.mimeType : "").toLowerCase();
106
- if (e === "ts" && MPEG_TS_MIME.test(mime)) return "video";
107
- const byExt = EXT_KIND[e];
108
- if (byExt) return byExt;
109
- if (mime.startsWith("image/")) return "image";
110
- if (mime.startsWith("audio/")) return "audio";
111
- if (mime.startsWith("video/")) return "video";
112
- if (mime.startsWith("text/")) return "text";
113
- if (mime === "application/pdf") return "document";
114
- if (/zip|x-tar|x-7z|x-rar|gzip|android\.package/.test(mime)) return "archive";
115
- if (/json|xml|javascript|yaml/.test(mime)) return "text";
116
- return "binary";
117
- };
118
- var formatSize = (bytes) => {
119
- if (!Number.isFinite(bytes) || bytes < 0) return "";
120
- if (bytes < 1) return "0 B";
121
- const units = ["B", "KB", "MB", "GB"];
122
- const i = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);
123
- const value = bytes / 1024 ** i;
124
- return `${i === 0 ? Math.round(value) : value.toFixed(1)} ${units[i]}`;
125
- };
126
- var describeValidatedAttachment = (attachment) => {
127
- const kind = attachmentKind(attachment);
128
- const meta = [attachment.mimeType.trim(), formatSize(attachment.size)].filter(Boolean).join(" \xB7 ");
129
- const locator = attachment.source.kind === "remote-file" ? ` \xB7 fileKey=${attachment.source.fileKey}` : "";
130
- const head = `[\u9644\u4EF6] ${attachment.name.trim()}${meta ? ` \xB7 ${meta}` : ""} \xB7 kind=${kind}${locator}`;
131
- return kind === "binary" ? `${head}
132
- \uFF08\u8BE5\u7C7B\u578B\u6682\u65E0\u6CD5\u8BFB\u53D6\u5185\u5BB9\uFF09` : head;
133
- };
134
- var displayName = (part) => {
135
- const name = isRecord(part) ? part.name : void 0;
136
- return typeof name === "string" && name.trim() ? name.trim() : "\u672A\u547D\u540D\u6587\u4EF6";
137
- };
138
- var describeAttachmentForModel = (part) => {
139
- if (!isAttachmentCandidate(part)) return "[\u672A\u8BC6\u522B\u7684\u9644\u4EF6]";
140
- const normalized = normalizeAttachmentPart(part);
141
- if (normalized.status !== "valid") return `[\u9644\u4EF6\u4E0D\u53EF\u7528: ${displayName(part)}]`;
142
- return describeValidatedAttachment(normalized.attachment);
143
- };
144
-
145
- export {
146
- ATTACHMENT_PART_TYPE,
147
- ATTACHMENT_PART_VERSION,
148
- normalizeAttachmentPart,
149
- attachmentKind,
150
- describeAttachmentForModel
151
- };