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
@@ -4,9 +4,6 @@ import {
4
4
  import {
5
5
  isRecord
6
6
  } from "./chunk-KUG52IAP.js";
7
- import {
8
- resolveNoloStateDir
9
- } from "./chunk-6UBGXX2W.js";
10
7
  import {
11
8
  asOptionalPositiveFiniteNumber
12
9
  } from "./chunk-U6VC4MU4.js";
@@ -16,6 +13,9 @@ import {
16
13
  import {
17
14
  asOptionalTrimmedString
18
15
  } from "./chunk-G3SUCT4W.js";
16
+ import {
17
+ resolveNoloStateDir
18
+ } from "./chunk-6UBGXX2W.js";
19
19
 
20
20
  // packages/agent-runtime/processTask.ts
21
21
  var PROCESS_TASK_TERMINAL_STATUSES = [
@@ -168,6 +168,7 @@ var ProcessRegistry = class {
168
168
  byTaskId = /* @__PURE__ */ new Map();
169
169
  eventLog;
170
170
  terminalListeners = /* @__PURE__ */ new Set();
171
+ backgroundListeners = /* @__PURE__ */ new Set();
171
172
  constructor(eventLogOptions) {
172
173
  this.eventLog = new ProcessTaskEventLog(eventLogOptions);
173
174
  }
@@ -190,6 +191,21 @@ var ProcessRegistry = class {
190
191
  this.terminalListeners.delete(listener);
191
192
  };
192
193
  }
194
+ /** Payload-free invalidation for the listBackground() view; no replay. */
195
+ onBackgroundChange(listener) {
196
+ this.backgroundListeners.add(listener);
197
+ return () => {
198
+ this.backgroundListeners.delete(listener);
199
+ };
200
+ }
201
+ emitBackgroundChange() {
202
+ for (const listener of [...this.backgroundListeners]) {
203
+ try {
204
+ listener();
205
+ } catch {
206
+ }
207
+ }
208
+ }
193
209
  /** Emit a terminal notice synchronously; listener errors must not break registry callers. */
194
210
  emitTerminal(notice) {
195
211
  for (const listener of [...this.terminalListeners]) {
@@ -220,6 +236,7 @@ var ProcessRegistry = class {
220
236
  this.processes.set(proc.pid, record);
221
237
  this.byTaskId.set(record.taskId, proc.pid);
222
238
  this.eventLog.append({ taskId: record.taskId, pid: proc.pid, type: "started" });
239
+ if (!record.transient) this.emitBackgroundChange();
223
240
  return { ...record };
224
241
  }
225
242
  list() {
@@ -271,9 +288,11 @@ var ProcessRegistry = class {
271
288
  const item = this.processes.get(pid);
272
289
  if (!item) return void 0;
273
290
  if (!item.promoted) {
291
+ const wasTransient = item.transient;
274
292
  item.promoted = true;
275
293
  item.transient = false;
276
294
  this.eventLog.append({ taskId: item.taskId, pid, type: "promoted" });
295
+ if (wasTransient) this.emitBackgroundChange();
277
296
  }
278
297
  return { ...item };
279
298
  }
@@ -304,6 +323,8 @@ var ProcessRegistry = class {
304
323
  }
305
324
  }
306
325
  item.status = "stopped";
326
+ item.endedAt = Date.now();
327
+ if (!item.transient) this.emitBackgroundChange();
307
328
  this.eventLog.append({ taskId: item.taskId, pid, type: "killed" });
308
329
  this.emitTerminal({
309
330
  taskId: item.taskId,
@@ -334,6 +355,8 @@ var ProcessRegistry = class {
334
355
  }
335
356
  }
336
357
  item.status = "stopped";
358
+ item.endedAt = Date.now();
359
+ if (!item.transient) this.emitBackgroundChange();
337
360
  this.eventLog.append({ taskId: item.taskId, pid: item.pid, type: "killed" });
338
361
  this.emitTerminal({
339
362
  taskId: item.taskId,
@@ -352,6 +375,8 @@ var ProcessRegistry = class {
352
375
  item.exitCode = exitCode;
353
376
  if (resultCapsule) item.resultCapsule = resultCapsule;
354
377
  item.status = exitCode === 0 ? "exited" : "failed";
378
+ item.endedAt = Date.now();
379
+ if (!item.transient) this.emitBackgroundChange();
355
380
  this.eventLog.append({
356
381
  taskId: item.taskId,
357
382
  pid,
@@ -390,6 +415,7 @@ var ProcessRegistry = class {
390
415
  if (!item) return false;
391
416
  this.processes.delete(pid);
392
417
  this.byTaskId.delete(item.taskId);
418
+ if (!item.transient) this.emitBackgroundChange();
393
419
  return true;
394
420
  }
395
421
  clear() {
@@ -397,6 +423,7 @@ var ProcessRegistry = class {
397
423
  this.byTaskId.clear();
398
424
  this.eventLog.clear();
399
425
  this.terminalListeners.clear();
426
+ this.backgroundListeners.clear();
400
427
  }
401
428
  };
402
429
  var registry = null;
@@ -408,8 +435,9 @@ function getProcessRegistry() {
408
435
  }
409
436
 
410
437
  // packages/agent-runtime/workspaceShell.ts
438
+ import { AsyncLocalStorage } from "node:async_hooks";
411
439
  import { createWriteStream, mkdirSync as mkdirSync2, rmSync } from "node:fs";
412
- import { dirname, join as join3, resolve } from "node:path";
440
+ import { dirname, join as join3, resolve as resolve2 } from "node:path";
413
441
  import { spawn as spawnChildProcess } from "node:child_process";
414
442
  import { randomUUID as randomUUID2 } from "node:crypto";
415
443
  import { tmpdir } from "node:os";
@@ -567,9 +595,9 @@ function spawnToWebStreams(options) {
567
595
  env: options.env,
568
596
  stdio: ["ignore", "pipe", "pipe"]
569
597
  });
570
- const exited = new Promise((resolve2) => {
571
- child.on("exit", (code) => resolve2(code ?? 1));
572
- child.on("error", () => resolve2(127));
598
+ const exited = new Promise((resolve3) => {
599
+ child.on("exit", (code) => resolve3(code ?? 1));
600
+ child.on("error", () => resolve3(127));
573
601
  });
574
602
  const toWeb = (stream) => {
575
603
  if (!stream) return null;
@@ -664,6 +692,11 @@ function findWindowsPowerShellAlias(options = {}) {
664
692
  return null;
665
693
  }
666
694
 
695
+ // packages/agent-runtime/processTaskResult.ts
696
+ import { openSync, readSync, closeSync } from "node:fs";
697
+ import { isAbsolute as isAbsolute2, resolve } from "node:path";
698
+ import { StringDecoder } from "node:string_decoder";
699
+
667
700
  // packages/agent-runtime/toolSpillStore.ts
668
701
  import { createHash, randomUUID } from "node:crypto";
669
702
  import { constants, copyFileSync, createReadStream, existsSync as existsSync2, mkdirSync, readdirSync as readdirSync2, renameSync, statSync as statSync3, unlinkSync, utimesSync, writeFileSync } from "node:fs";
@@ -695,11 +728,11 @@ function countLines(text) {
695
728
  var SPILL_PUBLICATION_GRACE_MS = 6e4;
696
729
  async function hashFileStreaming(path) {
697
730
  const hash = createHash("sha256");
698
- await new Promise((resolve2, reject) => {
731
+ await new Promise((resolve3, reject) => {
699
732
  const stream = createReadStream(path);
700
733
  stream.on("data", (chunk) => hash.update(chunk));
701
734
  stream.on("error", reject);
702
- stream.on("end", () => resolve2());
735
+ stream.on("end", () => resolve3());
703
736
  });
704
737
  return hash.digest("hex");
705
738
  }
@@ -925,6 +958,41 @@ function formatToolOverflowMarker(args) {
925
958
  `;
926
959
  }
927
960
 
961
+ // packages/agent-runtime/toolOutputSpillProjection.ts
962
+ var TOOL_OUTPUT_SPILL_BYTES = 30 * 1024;
963
+ var TOOL_OUTPUT_SPILL_LINES = 800;
964
+ var HEAD_LINES = 30;
965
+ var TAIL_LINES = 50;
966
+ var PREVIEW_CHARS = 12 * 1024;
967
+ var MARKER = /\[Omitted \d+ lines \([\d.]+ KB\)\. Full output saved to [^\n]+\]/;
968
+ function isSpilledToolOutput(text) {
969
+ return MARKER.test(text) && text.length <= PREVIEW_CHARS * 2 + 2048;
970
+ }
971
+ function formatSpilledToolOutput(args) {
972
+ const headLines = args.head.split("\n").slice(0, HEAD_LINES);
973
+ const tailLines = args.tail.split("\n").slice(-TAIL_LINES);
974
+ const head = headLines.join("\n").slice(0, PREVIEW_CHARS);
975
+ const tail = tailLines.join("\n").slice(-PREVIEW_CHARS);
976
+ const omitted = Math.max(0, args.totalLines - headLines.length - tailLines.length);
977
+ return `${head}
978
+
979
+ [Omitted ${omitted} lines (${(args.byteLength / 1024).toFixed(1)} KB). Full output saved to ${args.displayPath}]
980
+
981
+ ${tail}`;
982
+ }
983
+ function spillLargeToolOutput(content, toolName, workspaceRoot) {
984
+ if (isSpilledToolOutput(content)) return content;
985
+ const byteLength = Buffer.byteLength(content);
986
+ const totalLines = countLines(content);
987
+ if (byteLength <= TOOL_OUTPUT_SPILL_BYTES && totalLines <= TOOL_OUTPUT_SPILL_LINES) return content;
988
+ try {
989
+ const spill = spillToolOutput({ content, toolName, workspaceRoot });
990
+ return formatSpilledToolOutput({ head: content, tail: content, totalLines, byteLength, displayPath: spill.displayPath });
991
+ } catch {
992
+ return content;
993
+ }
994
+ }
995
+
928
996
  // packages/agent-runtime/processTaskResult.ts
929
997
  var PROCESS_RESULT_CAPSULE_TAIL_CHARS = 4e3;
930
998
  var PROCESS_RESULT_CAPSULE_SPILL_THRESHOLD_CHARS = 2e4;
@@ -932,6 +1000,27 @@ function tailText(value, maxChars) {
932
1000
  if (value.length <= maxChars) return { text: value, truncated: false };
933
1001
  return { text: value.slice(-maxChars), truncated: true };
934
1002
  }
1003
+ function reuseStreamSpill(text, workspaceRoot) {
1004
+ const displayPath = /Full output saved to ([^\n]+?)\]/.exec(text)?.[1];
1005
+ if (!displayPath) return void 0;
1006
+ const path = isAbsolute2(displayPath) ? displayPath : workspaceRoot ? resolve(workspaceRoot, displayPath) : void 0;
1007
+ if (!path) return void 0;
1008
+ const fd = openSync(path, "r");
1009
+ try {
1010
+ const buffer = Buffer.alloc(64 * 1024);
1011
+ const decoder = new StringDecoder("utf8");
1012
+ let totalChars = 0, newlines = 0;
1013
+ const count = (chunk) => {
1014
+ totalChars += chunk.length;
1015
+ for (let i = chunk.indexOf("\n"); i >= 0; i = chunk.indexOf("\n", i + 1)) newlines++;
1016
+ };
1017
+ for (let bytes; (bytes = readSync(fd, buffer, 0, buffer.length, null)) > 0; ) count(decoder.write(buffer.subarray(0, bytes)));
1018
+ count(decoder.end());
1019
+ return { displayPath, totalChars, totalLines: totalChars ? newlines + 1 : 0 };
1020
+ } finally {
1021
+ closeSync(fd);
1022
+ }
1023
+ }
935
1024
  function formatCapsuleStream(name, value) {
936
1025
  return value.trim() ? `${name}:
937
1026
  ${value.replace(/\n+$/, "")}` : "";
@@ -953,10 +1042,33 @@ function buildProcessTaskResultCapsule(args) {
953
1042
  const stderrTail = tailText(stderrTailSource, tailChars);
954
1043
  const inlineSize = stdout.length + stderr.length;
955
1044
  const inlineTruncated = stdoutTail.truncated || stderrTail.truncated;
956
- const truncated = inlineTruncated || ringEvicted || Boolean(captureError);
1045
+ const truncated = inlineTruncated || ringEvicted || Boolean(captureError) || isSpilledToolOutput(stdout) || isSpilledToolOutput(stderr);
957
1046
  const shouldSpill = truncated || inlineSize > spillThresholdChars;
958
1047
  let spill;
959
- if (shouldSpill) {
1048
+ let streamSpills;
1049
+ if (isSpilledToolOutput(stdout) || isSpilledToolOutput(stderr)) {
1050
+ streamSpills = {};
1051
+ for (const [name, text] of [["stdout", stdout], ["stderr", stderr]]) {
1052
+ if (!text) continue;
1053
+ try {
1054
+ if (isSpilledToolOutput(text)) {
1055
+ streamSpills[name] = reuseStreamSpill(text, args.workspaceRoot);
1056
+ } else {
1057
+ const result = spillToolOutput({ content: text, toolName: "execShell", workspaceRoot: args.workspaceRoot });
1058
+ streamSpills[name] = { displayPath: result.displayPath, totalChars: result.totalChars, totalLines: result.totalLines };
1059
+ }
1060
+ } catch {
1061
+ }
1062
+ }
1063
+ const primary = streamSpills.stdout ?? streamSpills.stderr;
1064
+ if (primary) {
1065
+ spill = {
1066
+ displayPath: primary.displayPath,
1067
+ totalChars: (streamSpills.stdout?.totalChars ?? 0) + (streamSpills.stderr?.totalChars ?? 0),
1068
+ totalLines: (streamSpills.stdout?.totalLines ?? 0) + (streamSpills.stderr?.totalLines ?? 0)
1069
+ };
1070
+ }
1071
+ } else if (shouldSpill) {
960
1072
  try {
961
1073
  const result = spillToolOutput({
962
1074
  content: [
@@ -984,11 +1096,16 @@ function buildProcessTaskResultCapsule(args) {
984
1096
  ...durationMs !== void 0 ? { durationMs } : {},
985
1097
  ...captureError ? { captureError } : {},
986
1098
  truncated,
987
- ...spill ? { spill } : {}
1099
+ ...spill ? { spill } : {},
1100
+ ...streamSpills ? { streamSpills } : {}
988
1101
  };
989
1102
  }
990
1103
 
991
1104
  // packages/agent-runtime/workspaceShell.ts
1105
+ var shellChildEnvironment = new AsyncLocalStorage();
1106
+ function withShellChildEnvironment(env, run) {
1107
+ return shellChildEnvironment.run(env, run);
1108
+ }
992
1109
  var EXEC_SHELL_TIMEOUT_ENV = "NOLO_EXEC_SHELL_TIMEOUT_MS";
993
1110
  var EXEC_SHELL_DETACH_ENV = "NOLO_EXEC_SHELL_DETACH_MS";
994
1111
  var DEFAULT_EXEC_SHELL_DETACH_MS = 12e4;
@@ -1283,19 +1400,33 @@ function resolveDetachMs(override) {
1283
1400
  return parsed === void 0 ? DEFAULT_EXEC_SHELL_DETACH_MS : parsed;
1284
1401
  }
1285
1402
  function truncateToolOutput(value, limit = 2e4, options) {
1403
+ if (isSpilledToolOutput(value)) return value;
1286
1404
  if (value.length <= limit) return value;
1287
1405
  let spillNote = "";
1406
+ let spillPathOnly = "";
1288
1407
  try {
1289
1408
  const spill = spillToolOutput({
1290
1409
  content: value,
1291
1410
  toolName: options?.toolName ?? "execShell",
1292
1411
  workspaceRoot: options?.workspaceRoot
1293
1412
  });
1294
- spillNote = `; spillFile=${spill.displayPath}; totalLines=${spill.totalLines}`;
1413
+ spillNote = `; spillFile=${spill.displayPath}; totalLines=${spill.totalLines}; hint=read a range, not the whole spill (readFile lines=A-B or sed -n 'A,Bp'); a full read re-injects ${spill.totalChars} chars`;
1414
+ spillPathOnly = `; spillFile=${spill.displayPath}`;
1295
1415
  } catch {
1296
1416
  }
1297
1417
  const approxMarkerLen = 40 + spillNote.length;
1298
- if (limit <= approxMarkerLen) return value.slice(0, limit);
1418
+ if (limit <= approxMarkerLen) {
1419
+ const notice = `[... truncated ${value.length} chars]`;
1420
+ const withFullNote = `[... truncated ${value.length} chars${spillNote} ...]`;
1421
+ if (withFullNote.length <= limit) return withFullNote;
1422
+ const withPath = `[... truncated ${value.length} chars${spillPathOnly} ...]`;
1423
+ if (withPath.length <= limit) return withPath;
1424
+ if (notice.length <= limit) {
1425
+ const pathOmitted = " [... path omitted]";
1426
+ return notice.length + pathOmitted.length <= limit ? notice + pathOmitted : notice;
1427
+ }
1428
+ return limit <= 0 ? "" : "\u2026";
1429
+ }
1299
1430
  const remaining = limit - approxMarkerLen;
1300
1431
  const headSize = Math.floor(remaining * 0.3);
1301
1432
  const tailSize = remaining - headSize;
@@ -1315,7 +1446,7 @@ function removeSpillFile(path) {
1315
1446
  } catch {
1316
1447
  }
1317
1448
  }
1318
- function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BYTES) {
1449
+ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BYTES, capture) {
1319
1450
  if (!stream) return Promise.resolve("");
1320
1451
  const options = typeof maxBytesOrOptions === "number" ? { maxBytes: maxBytesOrOptions } : maxBytesOrOptions ?? {};
1321
1452
  const maxBytes = typeof options.maxBytes === "number" && Number.isFinite(options.maxBytes) && options.maxBytes >= 0 ? options.maxBytes : DEFAULT_MAX_STREAM_BUFFER_BYTES;
@@ -1325,7 +1456,17 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
1325
1456
  return new Promise((resolveStream, rejectStream) => {
1326
1457
  const chunks = [];
1327
1458
  let totalBytes = 0;
1459
+ let observedBytes = 0;
1460
+ let observedLines = 1;
1461
+ let tail = Buffer.alloc(0);
1328
1462
  let settled = false;
1463
+ let captureResolved = false;
1464
+ const resolveCapture = (text) => {
1465
+ if (captureResolved) return;
1466
+ captureResolved = true;
1467
+ capture?.stopSignal.removeEventListener("abort", stopCapture);
1468
+ resolveStream(text);
1469
+ };
1329
1470
  let truncated = false;
1330
1471
  let spillState = spillPath ? "idle" : "disabled";
1331
1472
  let spillError = null;
@@ -1334,6 +1475,7 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
1334
1475
  let spillSink = null;
1335
1476
  let sourcePausedForSpill = false;
1336
1477
  let sinkFinished = false;
1478
+ let spillSettlement;
1337
1479
  const formatLimit = maxBytes >= 1024 * 1024 ? `${Math.round(maxBytes / (1024 * 1024))}MB` : `${Math.round(maxBytes / 1024)}KB`;
1338
1480
  const resumeSourceIfPaused = () => {
1339
1481
  if (!sourcePausedForSpill) return;
@@ -1344,7 +1486,7 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
1344
1486
  }
1345
1487
  };
1346
1488
  const markSpillFailed = (error) => {
1347
- if (spillState === "failed") return;
1489
+ if (spillSettlement || spillState === "failed") return;
1348
1490
  spillState = "failed";
1349
1491
  if (!spillError) {
1350
1492
  spillError = toErrorMessage(error);
@@ -1411,26 +1553,30 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
1411
1553
  for (const head of headChunks) writeToSink(head);
1412
1554
  writeToSink(crossingChunk);
1413
1555
  };
1414
- const settleSpillRetention = async () => {
1415
- if (!spillPath || spillRetention === "keep") {
1416
- if (spillPath && spillRetention === "keep" && spillState === "ok") {
1417
- spillRetainedPath = spillPath;
1418
- }
1419
- return;
1420
- }
1421
- if (spillRetention === "promote" && spillState === "ok" && sourceEnded) {
1422
- const promoted = await promoteToolSpillFile(spillPath, {
1423
- workspaceRoot: options.spillWorkspaceRoot
1424
- });
1425
- if (promoted.ok) {
1426
- spillRetainedPath = promoted.displayPath;
1556
+ const settleSpillRetention = () => {
1557
+ if (spillSettlement) return spillSettlement;
1558
+ spillSettlement = Promise.resolve().then(async () => {
1559
+ if (!spillPath || spillRetention === "keep") {
1560
+ if (spillPath && spillRetention === "keep" && spillState === "ok") {
1561
+ spillRetainedPath = spillPath;
1562
+ }
1427
1563
  return;
1428
1564
  }
1429
- if (promoted.preservedPath) {
1430
- return;
1565
+ if (spillRetention === "promote" && spillState === "ok" && sourceEnded) {
1566
+ const promoted = await (capture?.promoteSpill ?? promoteToolSpillFile)(spillPath, {
1567
+ workspaceRoot: options.spillWorkspaceRoot
1568
+ });
1569
+ if (promoted.ok) {
1570
+ spillRetainedPath = promoted.displayPath;
1571
+ return;
1572
+ }
1573
+ if (promoted.preservedPath) {
1574
+ return;
1575
+ }
1431
1576
  }
1432
- }
1433
- removeSpillFile(spillPath);
1577
+ removeSpillFile(spillPath);
1578
+ });
1579
+ return spillSettlement;
1434
1580
  };
1435
1581
  const finalize = (wasTruncated) => {
1436
1582
  if (settled) return;
@@ -1438,8 +1584,20 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
1438
1584
  const truncatedNow = wasTruncated || truncated;
1439
1585
  const baseText = Buffer.concat(chunks).toString("utf8");
1440
1586
  const done = async () => {
1587
+ if (captureResolved) return;
1441
1588
  await settleSpillRetention();
1589
+ if (captureResolved) return;
1442
1590
  let text = baseText;
1591
+ if (truncatedNow && spillRetainedPath && sourceEnded && options.maxLines !== void 0) {
1592
+ resolveCapture(formatSpilledToolOutput({
1593
+ head: baseText,
1594
+ tail: tail.toString("utf8"),
1595
+ totalLines: observedLines,
1596
+ byteLength: observedBytes,
1597
+ displayPath: spillRetainedPath
1598
+ }));
1599
+ return;
1600
+ }
1443
1601
  if (truncatedNow) {
1444
1602
  const notes = [`output exceeded ${formatLimit} buffer limit`];
1445
1603
  if (spillRetainedPath && sourceEnded) {
@@ -1453,7 +1611,8 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
1453
1611
 
1454
1612
  [stream pipe truncated: ${notes.join("; ")}]`;
1455
1613
  }
1456
- resolveStream(text);
1614
+ chunks.length = 0;
1615
+ resolveCapture(text);
1457
1616
  };
1458
1617
  const sink = spillSink;
1459
1618
  if (!sink || spillState !== "open") {
@@ -1486,14 +1645,36 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
1486
1645
  settleSink(true, error);
1487
1646
  }
1488
1647
  };
1648
+ const stopCapture = () => {
1649
+ if (captureResolved) return;
1650
+ settled = true;
1651
+ const reason = "capture incomplete: post-exit drain grace exceeded";
1652
+ const snapshot = Buffer.concat(chunks).toString("utf8");
1653
+ chunks.length = 0;
1654
+ capture?.onIncomplete(reason);
1655
+ if (!spillSettlement) {
1656
+ markSpillFailed(new Error(reason));
1657
+ void settleSpillRetention();
1658
+ }
1659
+ resolveCapture(`${snapshot}
1660
+
1661
+ [${reason}]`);
1662
+ };
1663
+ capture?.stopSignal.addEventListener("abort", stopCapture, { once: true });
1664
+ if (capture?.stopSignal.aborted) stopCapture();
1489
1665
  stream.on("data", (chunk) => {
1490
1666
  if (settled) return;
1491
1667
  const buf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
1668
+ observedBytes += buf.length;
1669
+ for (const byte of buf) if (byte === 10) observedLines++;
1670
+ if (options.maxLines !== void 0) {
1671
+ tail = Buffer.concat([tail, buf.subarray(Math.max(0, buf.length - maxBytes))]).subarray(-maxBytes);
1672
+ }
1492
1673
  if (truncated) {
1493
1674
  writeToSink(buf);
1494
1675
  return;
1495
1676
  }
1496
- if (totalBytes + buf.length >= maxBytes) {
1677
+ if (totalBytes + buf.length >= maxBytes || observedLines > (options.maxLines ?? Infinity)) {
1497
1678
  const remaining = Math.max(0, maxBytes - totalBytes);
1498
1679
  const headChunks = chunks.slice();
1499
1680
  if (remaining > 0) {
@@ -1524,6 +1705,9 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
1524
1705
  }
1525
1706
  resumeSourceIfPaused();
1526
1707
  void settleSpillRetention();
1708
+ captureResolved = true;
1709
+ capture?.stopSignal.removeEventListener("abort", stopCapture);
1710
+ chunks.length = 0;
1527
1711
  rejectStream(error);
1528
1712
  });
1529
1713
  stream.on("end", () => {
@@ -1533,14 +1717,6 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
1533
1717
  stream.on("close", () => finalize(false));
1534
1718
  });
1535
1719
  }
1536
- function waitForNodeProcessExit(proc) {
1537
- return new Promise((resolveExit, rejectExit) => {
1538
- proc.on("error", rejectExit);
1539
- proc.on("close", (code) => {
1540
- resolveExit(code ?? 0);
1541
- });
1542
- });
1543
- }
1544
1720
  function deriveLabel(command) {
1545
1721
  const trimmed = command.trim();
1546
1722
  if (!trimmed) return "process";
@@ -1588,8 +1764,10 @@ async function runWorkspaceCommand(args) {
1588
1764
  ...args.commandPrefix ?? [],
1589
1765
  ...args.command
1590
1766
  ];
1767
+ const spawnedAt = Date.now();
1591
1768
  const proc = spawnChildProcess(command[0] ?? "", command.slice(1), {
1592
- cwd: resolve(args.workspaceRoot),
1769
+ cwd: resolve2(args.workspaceRoot),
1770
+ env: { ...process.env, ...shellChildEnvironment.getStore() },
1593
1771
  stdio: [
1594
1772
  args.stdin === void 0 ? "ignore" : "pipe",
1595
1773
  "pipe",
@@ -1621,7 +1799,10 @@ async function runWorkspaceCommand(args) {
1621
1799
  owner: args.owner ?? null
1622
1800
  });
1623
1801
  }
1624
- const exitPromise = waitForNodeProcessExit(proc);
1802
+ const processExitPromise = new Promise((resolveExit, rejectExit) => {
1803
+ proc.once("exit", (code) => resolveExit(code ?? 0));
1804
+ proc.once("error", rejectExit);
1805
+ });
1625
1806
  const cleanupChildOnHostSignal = (signal) => {
1626
1807
  if (typeof proc.pid === "number") {
1627
1808
  try {
@@ -1641,21 +1822,54 @@ async function runWorkspaceCommand(args) {
1641
1822
  process.removeListener("SIGTERM", cleanupChildOnHostSignal);
1642
1823
  process.removeListener("SIGINT", cleanupChildOnHostSignal);
1643
1824
  };
1644
- exitPromise.then(detachSignalCleanup, detachSignalCleanup);
1825
+ const captureCutoff = new AbortController();
1826
+ let stdoutIncomplete;
1827
+ let stderrIncomplete;
1645
1828
  const stdoutCapture = stdoutPromiseResult(
1646
1829
  readNodeStream(proc.stdout, {
1830
+ maxBytes: TOOL_OUTPUT_SPILL_BYTES,
1831
+ maxLines: TOOL_OUTPUT_SPILL_LINES,
1647
1832
  spillPath: join3(tmpdir(), `nolo-stream-${randomUUID2()}.log`),
1648
1833
  spillRetention: "promote",
1649
1834
  spillWorkspaceRoot: args.workspaceRoot
1835
+ }, {
1836
+ stopSignal: captureCutoff.signal,
1837
+ onIncomplete: (reason) => {
1838
+ stdoutIncomplete = reason;
1839
+ }
1650
1840
  })
1651
- );
1841
+ ).then((result) => ({ ...result, error: result.error || stdoutIncomplete }));
1652
1842
  const stderrCapture = stdoutPromiseResult(
1653
1843
  readNodeStream(proc.stderr, {
1844
+ maxBytes: TOOL_OUTPUT_SPILL_BYTES,
1845
+ maxLines: TOOL_OUTPUT_SPILL_LINES,
1654
1846
  spillPath: join3(tmpdir(), `nolo-stream-${randomUUID2()}-stderr.log`),
1655
1847
  spillRetention: "promote",
1656
1848
  spillWorkspaceRoot: args.workspaceRoot
1849
+ }, {
1850
+ stopSignal: captureCutoff.signal,
1851
+ onIncomplete: (reason) => {
1852
+ stderrIncomplete = reason;
1853
+ }
1657
1854
  })
1658
- );
1855
+ ).then((result) => ({ ...result, error: result.error || stderrIncomplete }));
1856
+ const exitPromise = processExitPromise.then(async (code) => {
1857
+ const drainTimer = setTimeout(() => captureCutoff.abort(), 2e3);
1858
+ try {
1859
+ await Promise.all([stdoutCapture, stderrCapture]);
1860
+ return code;
1861
+ } finally {
1862
+ clearTimeout(drainTimer);
1863
+ }
1864
+ });
1865
+ let processExited = false;
1866
+ let terminationReason;
1867
+ let timeout;
1868
+ let forceKillTimer;
1869
+ const cleanupTerminationTimers = () => {
1870
+ if (timeout) clearTimeout(timeout);
1871
+ if (forceKillTimer) clearTimeout(forceKillTimer);
1872
+ };
1659
1873
  const killChild = (signal) => {
1660
1874
  if (detached && typeof proc.pid === "number") {
1661
1875
  try {
@@ -1669,7 +1883,22 @@ async function runWorkspaceCommand(args) {
1669
1883
  } catch {
1670
1884
  }
1671
1885
  };
1672
- let timeout;
1886
+ const onProcessExit = () => {
1887
+ processExited = true;
1888
+ cleanupTerminationTimers();
1889
+ detachSignalCleanup();
1890
+ };
1891
+ proc.once("exit", onProcessExit);
1892
+ proc.once("error", onProcessExit);
1893
+ const terminate = (reason) => {
1894
+ if (processExited || terminationReason) return;
1895
+ terminationReason = reason;
1896
+ if (timeout) clearTimeout(timeout);
1897
+ killChild("SIGTERM");
1898
+ forceKillTimer = setTimeout(() => {
1899
+ if (!processExited) killChild("SIGKILL");
1900
+ }, 500);
1901
+ };
1673
1902
  let detachTimer;
1674
1903
  const timeoutResult = Symbol("timeout");
1675
1904
  const abortResult = Symbol("abort");
@@ -1680,7 +1909,10 @@ async function runWorkspaceCommand(args) {
1680
1909
  resolveAbort(abortResult);
1681
1910
  return;
1682
1911
  }
1683
- abortListener = () => resolveAbort(abortResult);
1912
+ abortListener = () => {
1913
+ terminate("abort");
1914
+ resolveAbort(abortResult);
1915
+ };
1684
1916
  args.abortSignal.addEventListener("abort", abortListener, { once: true });
1685
1917
  }) : null;
1686
1918
  const effectiveDetachMs = resolveDetachMs(args.detachMs);
@@ -1690,7 +1922,12 @@ async function runWorkspaceCommand(args) {
1690
1922
  const exitOrTimeoutPromise = timeoutMs ? Promise.race([
1691
1923
  exitPromise,
1692
1924
  new Promise((resolveTimeout) => {
1693
- timeout = setTimeout(() => resolveTimeout(timeoutResult), timeoutMs);
1925
+ timeout = setTimeout(() => {
1926
+ if (processExited) return;
1927
+ const aborted2 = args.abortSignal?.aborted === true;
1928
+ terminate(aborted2 ? "abort" : "timeout");
1929
+ resolveTimeout(aborted2 ? abortResult : timeoutResult);
1930
+ }, Math.max(0, timeoutMs - (Date.now() - spawnedAt)));
1694
1931
  })
1695
1932
  ]) : exitPromise;
1696
1933
  const raceCandidates = [
@@ -1704,7 +1941,7 @@ async function runWorkspaceCommand(args) {
1704
1941
  try {
1705
1942
  raceWinner = await Promise.race(raceCandidates);
1706
1943
  } catch (error) {
1707
- if (timeout) clearTimeout(timeout);
1944
+ cleanupTerminationTimers();
1708
1945
  if (detachTimer) clearTimeout(detachTimer);
1709
1946
  if (abortListener && args.abortSignal) {
1710
1947
  args.abortSignal.removeEventListener("abort", abortListener);
@@ -1717,24 +1954,20 @@ async function runWorkspaceCommand(args) {
1717
1954
  }
1718
1955
  throw error;
1719
1956
  }
1720
- if (timeout) clearTimeout(timeout);
1721
1957
  if (detachTimer) clearTimeout(detachTimer);
1722
1958
  if (abortListener && args.abortSignal) {
1723
1959
  args.abortSignal.removeEventListener("abort", abortListener);
1724
1960
  }
1725
- const timedOut = raceWinner === timeoutResult;
1726
- const aborted = raceWinner === abortResult;
1961
+ const aborted = raceWinner === abortResult || raceWinner === timeoutResult && args.abortSignal?.aborted === true;
1962
+ const timedOut = raceWinner === timeoutResult && !aborted;
1727
1963
  const detachedProcess = raceWinner === detachResult;
1728
1964
  if (timedOut || aborted) {
1729
- killChild("SIGTERM");
1730
- const forceKillTimer = setTimeout(() => {
1731
- killChild("SIGKILL");
1732
- }, 500);
1965
+ terminate(aborted ? "abort" : "timeout");
1733
1966
  try {
1734
1967
  await exitPromise;
1735
1968
  } catch {
1736
1969
  } finally {
1737
- clearTimeout(forceKillTimer);
1970
+ cleanupTerminationTimers();
1738
1971
  }
1739
1972
  }
1740
1973
  if (detachedProcess) {
@@ -1752,9 +1985,9 @@ async function runWorkspaceCommand(args) {
1752
1985
  owner: args.owner ?? null
1753
1986
  });
1754
1987
  const taskId = envelope.taskId;
1755
- proc.on("close", (code) => {
1988
+ void exitPromise.then(() => {
1756
1989
  detachSignalCleanup();
1757
- const exitCode2 = code ?? 1;
1990
+ const exitCode2 = terminationReason === "abort" ? 130 : terminationReason === "timeout" ? 124 : proc.exitCode ?? 1;
1758
1991
  void (async () => {
1759
1992
  const [stdoutResult, stderrResult] = await Promise.all([
1760
1993
  stdoutCapture,
@@ -1763,10 +1996,15 @@ async function runWorkspaceCommand(args) {
1763
1996
  const stdout2 = stdoutResult.value;
1764
1997
  const stderr2 = stderrResult.value;
1765
1998
  let capsule;
1999
+ const terminalStderr = terminationReason === "abort" ? `${stderr2.trim() ? `${stderr2.trim()}
2000
+ ` : ""}command aborted by signal
2001
+ ` : terminationReason === "timeout" ? `${stderr2.trim() ? `${stderr2.trim()}
2002
+ ` : ""}command timed out after ${timeoutMs}ms
2003
+ ` : stderr2;
1766
2004
  try {
1767
2005
  capsule = buildProcessTaskResultCapsule({
1768
2006
  stdout: stdout2,
1769
- stderr: stderr2,
2007
+ stderr: terminalStderr,
1770
2008
  exitCode: exitCode2,
1771
2009
  // Duration is measured from the registry envelope's startedAt
1772
2010
  // (spawn moment), not from the detach moment.
@@ -1778,6 +2016,7 @@ async function runWorkspaceCommand(args) {
1778
2016
  }
1779
2017
  registry2.markExited(pid, exitCode2, capsule);
1780
2018
  })();
2019
+ }, () => {
1781
2020
  });
1782
2021
  const immediate = effectiveDetachMs === 0;
1783
2022
  const reason = immediate ? `command looks long-running; moved to background immediately (pid=${pid}, label=${label})` : `command detached to background after ${effectiveDetachMs}ms (pid=${pid}, label=${label})`;
@@ -1806,8 +2045,10 @@ Use listProcesses to inspect or stop it.`,
1806
2045
  stderrCapture
1807
2046
  ]);
1808
2047
  const stdout = stdoutCaptureResult.value;
1809
- const rawStderr = stderrCaptureResult.value;
1810
2048
  const streamCaptureError = [stdoutCaptureResult.error, stderrCaptureResult.error].filter(Boolean).join("; ");
2049
+ const rawStderr = streamCaptureError ? `${stderrCaptureResult.value}
2050
+ [${streamCaptureError}]
2051
+ ` : stderrCaptureResult.value;
1811
2052
  const exitCode = aborted ? 130 : timedOut ? 124 : Number(raceWinner);
1812
2053
  if (typeof proc.pid === "number") {
1813
2054
  registry2.completeTransient(proc.pid, exitCode);
@@ -1841,8 +2082,6 @@ ${stderr.trim()}` : "",
1841
2082
  }
1842
2083
 
1843
2084
  export {
1844
- spillToolOutput,
1845
- formatToolOverflowMarker,
1846
2085
  resolveExecutableOnPath,
1847
2086
  createGlob,
1848
2087
  spawnToWebStreams,
@@ -1850,7 +2089,12 @@ export {
1850
2089
  reportedTaskStatus,
1851
2090
  toProcessTaskView,
1852
2091
  getProcessRegistry,
2092
+ spillToolOutput,
2093
+ formatToolOverflowMarker,
2094
+ isSpilledToolOutput,
2095
+ spillLargeToolOutput,
1853
2096
  buildProcessTaskResultCapsule,
2097
+ withShellChildEnvironment,
1854
2098
  extractActivity,
1855
2099
  findPowerShellExecutable,
1856
2100
  buildWorkspaceShellPlan,