@namzu/cli 65.0.1 → 65.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (571) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/browser/control.d.ts.map +1 -1
  4. package/dist/checkpoints/manifest.d.ts +3 -1
  5. package/dist/checkpoints/manifest.d.ts.map +1 -1
  6. package/dist/checkpoints/store.d.ts +12 -7
  7. package/dist/checkpoints/store.d.ts.map +1 -1
  8. package/dist/checkpoints/workspace.d.ts +20 -0
  9. package/dist/checkpoints/workspace.d.ts.map +1 -0
  10. package/dist/checkpoints/wrap.d.ts +3 -3
  11. package/dist/checkpoints/wrap.d.ts.map +1 -1
  12. package/dist/chunks/{acp-MURBIENR.js → acp-5DUA4NPH.js} +700 -156
  13. package/dist/chunks/acp-5DUA4NPH.js.map +6 -0
  14. package/dist/chunks/{activity-command-QY4TBDBA.js → activity-command-2JTOLORP.js} +18 -18
  15. package/dist/chunks/{add-T4I7FT6U.js → add-W7I5FNJ6.js} +40 -40
  16. package/dist/chunks/{agent-KG5ZDN4V.js → agent-UFIGF7GW.js} +66 -66
  17. package/dist/chunks/agent-session-TVB22M7F.js +108 -0
  18. package/dist/chunks/{apply-at-exit-RTLPTWIX.js → apply-at-exit-CC3LEQEF.js} +8 -8
  19. package/dist/chunks/{archive-OE4IOYPG.js → archive-XFGZO54E.js} +16 -16
  20. package/dist/chunks/{auth-6KKZWY43.js → auth-BD7S36PR.js} +16 -16
  21. package/dist/chunks/{bin-main-ELFORXQH.js → bin-main-FR3GTCLV.js} +14 -14
  22. package/dist/chunks/{binding-UJQOQNOP.js → binding-DWEVXXCK.js} +3 -3
  23. package/dist/chunks/{browser-IXKMPHWF.js → browser-JLD5SLCD.js} +8 -7
  24. package/dist/chunks/browser-JLD5SLCD.js.map +6 -0
  25. package/dist/chunks/{chat-SXGUU2HT.js → chat-CONC7RFQ.js} +18 -18
  26. package/dist/chunks/{chunk-33E2IBBS.js → chunk-2LUHXKVZ.js} +2 -2
  27. package/dist/chunks/{chunk-HKBCNF4M.js → chunk-32AQ2IYQ.js} +2 -2
  28. package/dist/chunks/{chunk-YV3RDTHR.js → chunk-3D3CBJHR.js} +11 -11
  29. package/dist/chunks/{chunk-BCTGRGWF.js → chunk-3DSSBV3F.js} +3 -3
  30. package/dist/chunks/{chunk-XFF7HELD.js → chunk-3FGY7ALU.js} +3 -3
  31. package/dist/chunks/{chunk-UN6SRJB4.js → chunk-3HXC7CQX.js} +2 -2
  32. package/dist/chunks/{chunk-CJCCFNFG.js → chunk-3NB4FCAS.js} +4 -4
  33. package/dist/chunks/{chunk-WSOU4AJL.js → chunk-3WWI2FUN.js} +13 -13
  34. package/dist/chunks/{chunk-C72PY7UT.js → chunk-43RBKC4W.js} +57 -59
  35. package/dist/chunks/chunk-43RBKC4W.js.map +6 -0
  36. package/dist/chunks/{chunk-DFPOJWTB.js → chunk-4EHA3DZC.js} +2 -2
  37. package/dist/chunks/{chunk-GE2IDPI5.js → chunk-4SMX6CTE.js} +2 -2
  38. package/dist/chunks/{chunk-64PKDN3H.js → chunk-4W5G7N2I.js} +32 -4
  39. package/dist/chunks/chunk-4W5G7N2I.js.map +6 -0
  40. package/dist/chunks/{chunk-R4KHEHKV.js → chunk-4XIOI4OS.js} +2 -2
  41. package/dist/chunks/{chunk-GAISG43Y.js → chunk-4ZZLP5Q6.js} +2 -2
  42. package/dist/chunks/{chunk-4TIP4QHX.js → chunk-57LEFF5B.js} +2 -2
  43. package/dist/chunks/{chunk-4P4TFLO5.js → chunk-5CBMOTZH.js} +4 -4
  44. package/dist/chunks/{chunk-CR4PW7TP.js → chunk-5EBL6PQM.js} +2 -2
  45. package/dist/chunks/{chunk-SNRGQZ26.js → chunk-5HJ3M5WO.js} +2 -2
  46. package/dist/chunks/{chunk-JGSBW4CL.js → chunk-5KL7XHNF.js} +6 -6
  47. package/dist/chunks/{chunk-YCWIZHXB.js → chunk-5VGIJDT3.js} +2 -2
  48. package/dist/chunks/{chunk-26N4XIBC.js → chunk-65AIUD2J.js} +3 -3
  49. package/dist/chunks/{chunk-K7EUZJOM.js → chunk-6DXRQHM3.js} +9 -9
  50. package/dist/chunks/{chunk-CJSHYGFG.js → chunk-6JDLXECN.js} +4 -4
  51. package/dist/chunks/{chunk-LXBLH2JF.js → chunk-6LEVJR3K.js} +868 -498
  52. package/dist/chunks/chunk-6LEVJR3K.js.map +6 -0
  53. package/dist/chunks/{chunk-CJXPOZFX.js → chunk-6QOUG7I5.js} +11 -11
  54. package/dist/chunks/{chunk-DCHEOKYX.js → chunk-6XAQENXK.js} +6 -6
  55. package/dist/chunks/{chunk-UNMUVJD5.js → chunk-6Y35BEVH.js} +81 -22
  56. package/dist/chunks/chunk-6Y35BEVH.js.map +6 -0
  57. package/dist/chunks/{chunk-WKEGRNT3.js → chunk-76N2YA4H.js} +3 -3
  58. package/dist/chunks/{chunk-SEWZ6FRP.js → chunk-7NA6Z4LT.js} +2 -2
  59. package/dist/chunks/{chunk-YXFRVCYY.js → chunk-7UW747VE.js} +11 -11
  60. package/dist/chunks/{chunk-RBCRWJLE.js → chunk-7VCBWBDK.js} +97 -94
  61. package/dist/chunks/{chunk-RBCRWJLE.js.map → chunk-7VCBWBDK.js.map} +1 -1
  62. package/dist/chunks/{chunk-3JG5IVDB.js → chunk-7XWHSNQV.js} +5 -5
  63. package/dist/chunks/{chunk-PCLD62Y4.js → chunk-7XWT35S7.js} +9 -9
  64. package/dist/chunks/{chunk-J2MKN2IJ.js → chunk-7YUDFOS2.js} +16 -8
  65. package/dist/chunks/chunk-7YUDFOS2.js.map +6 -0
  66. package/dist/chunks/{chunk-TX5R7FPO.js → chunk-AOYZYPQU.js} +4 -4
  67. package/dist/chunks/{chunk-64PSV24V.js → chunk-B5QT43AR.js} +2 -2
  68. package/dist/chunks/{chunk-MPJVOY6U.js → chunk-BGSLBZJI.js} +26 -14
  69. package/dist/chunks/chunk-BGSLBZJI.js.map +6 -0
  70. package/dist/chunks/{chunk-OM6I2S7W.js → chunk-BQRYROMU.js} +4 -4
  71. package/dist/chunks/{chunk-YVIKHGQ4.js → chunk-BTE5NNGC.js} +4 -4
  72. package/dist/chunks/{chunk-JGVDN4QF.js → chunk-BU34QVPU.js} +2 -2
  73. package/dist/chunks/{chunk-AWFXPA2P.js → chunk-CSQBHH2P.js} +11 -11
  74. package/dist/chunks/{chunk-CJG6BQXC.js → chunk-CU2NHWJZ.js} +5 -5
  75. package/dist/chunks/{chunk-CY5TXLBM.js → chunk-CXDIBVU4.js} +2 -2
  76. package/dist/chunks/{chunk-5UIY4X2H.js → chunk-DOLQSKHY.js} +3 -3
  77. package/dist/chunks/{chunk-TEZRVNF6.js → chunk-DS7IXKY3.js} +4 -4
  78. package/dist/chunks/{chunk-CGO3NJXK.js → chunk-DSPRBHXG.js} +10 -10
  79. package/dist/chunks/{chunk-ER6NZEPG.js → chunk-DWIN3BQK.js} +3 -3
  80. package/dist/chunks/{chunk-ASM5LAX6.js → chunk-E3IKNG7N.js} +7 -7
  81. package/dist/chunks/{chunk-WJLVORL5.js → chunk-E5RSO4L4.js} +6 -6
  82. package/dist/chunks/{chunk-Y34RDPE2.js → chunk-ECJSMWWH.js} +4 -4
  83. package/dist/chunks/{chunk-UIPZCJEG.js → chunk-EOEV6W4N.js} +2 -2
  84. package/dist/chunks/{chunk-DSRV6XYE.js → chunk-EROQ2L5G.js} +2 -2
  85. package/dist/chunks/{chunk-GOBE3M23.js → chunk-ET5JCPHK.js} +6 -6
  86. package/dist/chunks/{chunk-HAAS62EL.js → chunk-EUD7DFGD.js} +4 -4
  87. package/dist/chunks/{chunk-YGCJJJ5U.js → chunk-EYLW2CSN.js} +5 -5
  88. package/dist/chunks/{chunk-QI5DLJKB.js → chunk-FQ4TVLU4.js} +2 -2
  89. package/dist/chunks/{chunk-C4HMW3HM.js → chunk-FQB5TULO.js} +7 -7
  90. package/dist/chunks/{chunk-AQSOO7T5.js → chunk-FRVEG45C.js} +5 -5
  91. package/dist/chunks/{chunk-AVZHTMRP.js → chunk-FZ45U2TD.js} +2 -2
  92. package/dist/chunks/{chunk-KMP7GNMD.js → chunk-GPFJOS37.js} +6 -6
  93. package/dist/chunks/{chunk-IG3OL4PI.js → chunk-GPMR64SH.js} +28 -13
  94. package/dist/chunks/chunk-GPMR64SH.js.map +6 -0
  95. package/dist/chunks/{chunk-VINVUMPS.js → chunk-GVE34Z4N.js} +2 -2
  96. package/dist/chunks/{chunk-GTHARNMF.js → chunk-HBJKBRNS.js} +3 -3
  97. package/dist/chunks/{chunk-DUXBWYNI.js → chunk-HCYOQ6YQ.js} +5 -5
  98. package/dist/chunks/{chunk-5PDBQ34I.js → chunk-HLNHYAFB.js} +2 -2
  99. package/dist/chunks/{chunk-VLEJZWSI.js → chunk-I3BL2S64.js} +3 -3
  100. package/dist/chunks/{chunk-RBW5FFRZ.js → chunk-IGA4KH5Y.js} +4 -4
  101. package/dist/chunks/{chunk-IVVCW5NQ.js → chunk-IRPH5CDS.js} +2 -2
  102. package/dist/chunks/{chunk-U65C3WSK.js → chunk-JIVLBRRN.js} +2 -2
  103. package/dist/chunks/{chunk-O633GQ46.js → chunk-JMPKX37I.js} +4 -4
  104. package/dist/chunks/{chunk-2GPXHLZ7.js → chunk-JQ3Y5NX7.js} +10 -10
  105. package/dist/chunks/{chunk-EUPMFT4C.js → chunk-KGIGFJXC.js} +2 -2
  106. package/dist/chunks/{chunk-PYLCAPRX.js → chunk-KH3DWISF.js} +6 -6
  107. package/dist/chunks/{chunk-JEPSIERS.js → chunk-KHWLA26J.js} +742 -371
  108. package/dist/chunks/chunk-KHWLA26J.js.map +6 -0
  109. package/dist/chunks/{chunk-UW7DQJSG.js → chunk-KVTWBRQI.js} +8 -8
  110. package/dist/chunks/{chunk-NC46EWVK.js → chunk-L6ZLSPCD.js} +25 -7
  111. package/dist/chunks/{chunk-NC46EWVK.js.map → chunk-L6ZLSPCD.js.map} +1 -1
  112. package/dist/chunks/{chunk-FCB7J2JY.js → chunk-LQM4DE5B.js} +3 -3
  113. package/dist/chunks/{chunk-LSA4WCAA.js → chunk-LVBUF475.js} +3 -3
  114. package/dist/chunks/{chunk-OFDZF2HC.js → chunk-M4GHZ6CV.js} +4 -4
  115. package/dist/chunks/{chunk-TSC5I62M.js → chunk-MBR655LE.js} +4 -4
  116. package/dist/chunks/{chunk-BT4Z22CR.js → chunk-MHJESYWP.js} +3 -3
  117. package/dist/chunks/{chunk-QUVP32VA.js → chunk-MKBXBLDR.js} +2 -2
  118. package/dist/chunks/{chunk-FFFNQRQU.js → chunk-MKBXTSKY.js} +2 -2
  119. package/dist/chunks/{chunk-M4FJ432T.js → chunk-MQJX2ZHQ.js} +5 -5
  120. package/dist/chunks/{chunk-TLDRR7NF.js → chunk-MS2YYSVC.js} +3 -3
  121. package/dist/chunks/{chunk-JYEVX4XO.js → chunk-MU7HMNAT.js} +6 -6
  122. package/dist/chunks/{chunk-HUDWOVPR.js → chunk-MWSJYZ2R.js} +5 -5
  123. package/dist/chunks/{chunk-6EAH4JT6.js → chunk-N27MGDJW.js} +4 -4
  124. package/dist/chunks/{chunk-ATBKAYPX.js → chunk-N7T6YPKT.js} +3 -3
  125. package/dist/chunks/{chunk-EHNUMZLI.js → chunk-NGONNBXL.js} +2 -2
  126. package/dist/chunks/{chunk-OZHN6UZ2.js → chunk-NHTBK2XM.js} +2 -2
  127. package/dist/chunks/{chunk-U5UV2YRE.js → chunk-NKPMNGMK.js} +23 -13
  128. package/dist/chunks/{chunk-U5UV2YRE.js.map → chunk-NKPMNGMK.js.map} +2 -2
  129. package/dist/chunks/{chunk-VZMBA7BY.js → chunk-OAZQ26D7.js} +28 -28
  130. package/dist/chunks/{chunk-B5M637GC.js → chunk-OI6J7RPI.js} +2 -2
  131. package/dist/chunks/{chunk-XZRXGJRW.js → chunk-ORPLF5MZ.js} +10 -10
  132. package/dist/chunks/{chunk-5FYABBNQ.js → chunk-P6S4D3RS.js} +3 -3
  133. package/dist/chunks/{chunk-3ZAZUT7F.js → chunk-PH7QOU2A.js} +2 -2
  134. package/dist/chunks/{chunk-VBNWYBV7.js → chunk-PY25GCBZ.js} +4 -4
  135. package/dist/chunks/{chunk-QYTOM3WZ.js → chunk-Q2L4OX37.js} +5 -5
  136. package/dist/chunks/{chunk-4T4STLUZ.js → chunk-Q33CQYAC.js} +15 -15
  137. package/dist/chunks/{chunk-4F6OOHP2.js → chunk-Q64YZVHO.js} +4 -4
  138. package/dist/chunks/{chunk-VJQLHEUD.js → chunk-Q73AM2KK.js} +4 -4
  139. package/dist/chunks/{chunk-EWRZDQQD.js → chunk-Q744Z56H.js} +3 -3
  140. package/dist/chunks/{chunk-LBBJQX73.js → chunk-QK2ES6TB.js} +5 -5
  141. package/dist/chunks/{chunk-UWE7HTRB.js → chunk-QKLHNZLP.js} +3 -3
  142. package/dist/chunks/{chunk-3BSJTK67.js → chunk-QMTLLPEB.js} +2 -2
  143. package/dist/chunks/{chunk-JGWBBAQX.js → chunk-QO6NWZEY.js} +9 -9
  144. package/dist/chunks/{chunk-EFWNOGGF.js → chunk-QOYOMOYD.js} +10 -4
  145. package/dist/chunks/chunk-QOYOMOYD.js.map +6 -0
  146. package/dist/chunks/{chunk-I4GTRFPK.js → chunk-QPTNH7SR.js} +2 -2
  147. package/dist/chunks/{chunk-MT6BBN3N.js → chunk-QSL4C3HW.js} +6 -6
  148. package/dist/chunks/{chunk-2RD5B76Z.js → chunk-QSW6RQEA.js} +21 -21
  149. package/dist/chunks/{chunk-MFMWMVI2.js → chunk-RC5CPNQL.js} +2 -2
  150. package/dist/chunks/{chunk-C5KBEU26.js → chunk-RCWRXPNU.js} +9 -9
  151. package/dist/chunks/{chunk-B3MQ5GKC.js → chunk-RGHE4YT2.js} +2 -2
  152. package/dist/chunks/{chunk-X6P6PKNN.js → chunk-RMGBPCWJ.js} +4 -4
  153. package/dist/chunks/{chunk-7TH57XCX.js → chunk-RRAME7MZ.js} +7 -7
  154. package/dist/chunks/{chunk-CUSFXQX6.js → chunk-RUXMJHR4.js} +4 -4
  155. package/dist/chunks/{chunk-672GYAHP.js → chunk-S72CBLRQ.js} +9 -9
  156. package/dist/chunks/{chunk-J6DWOQI6.js → chunk-S7MZJAJZ.js} +3 -3
  157. package/dist/chunks/{chunk-ZI2Z3N62.js → chunk-SEP5HAWL.js} +4 -4
  158. package/dist/chunks/{chunk-2IXKDMQV.js → chunk-SFRPKNVL.js} +3 -3
  159. package/dist/chunks/{chunk-SISDBCRO.js → chunk-SHJZWKEO.js} +7 -7
  160. package/dist/chunks/{chunk-4MY32RSJ.js → chunk-SQ746U6G.js} +3 -3
  161. package/dist/chunks/{chunk-JVHCTRTL.js → chunk-T36RR4QY.js} +4 -4
  162. package/dist/chunks/{chunk-QSTY4NGH.js → chunk-TINYCSAP.js} +4 -3
  163. package/dist/chunks/{chunk-QSTY4NGH.js.map → chunk-TINYCSAP.js.map} +1 -1
  164. package/dist/chunks/{chunk-H3SBLH74.js → chunk-TMXAC55Y.js} +6 -6
  165. package/dist/chunks/{chunk-BUFV5IZ2.js → chunk-TYZ2EXCN.js} +4 -4
  166. package/dist/chunks/{chunk-3XWSIVZO.js → chunk-U7Y5U5WN.js} +3 -3
  167. package/dist/chunks/{chunk-FTHG7MEP.js → chunk-UANOC6XV.js} +3 -3
  168. package/dist/chunks/{chunk-NXCEN75Q.js → chunk-UBYLIP6R.js} +6 -6
  169. package/dist/chunks/{chunk-AJNOSQRS.js → chunk-UIMQEGZQ.js} +4 -4
  170. package/dist/chunks/{chunk-3QU5FWU5.js → chunk-VLEQMW7N.js} +8 -8
  171. package/dist/chunks/{chunk-HMVMA52K.js → chunk-VOFIRTNT.js} +4 -4
  172. package/dist/chunks/{chunk-5UARTCJW.js → chunk-VPLOFGJQ.js} +2 -2
  173. package/dist/chunks/{chunk-4Q32NJ5O.js → chunk-W6XWXSAO.js} +4 -4
  174. package/dist/chunks/{chunk-HKYQA52K.js → chunk-WBGA2CWS.js} +2 -2
  175. package/dist/chunks/{chunk-BB7AEKOT.js → chunk-WISXBQR3.js} +3 -3
  176. package/dist/chunks/{chunk-2CGTS4UL.js → chunk-X2KQ6U3E.js} +2 -2
  177. package/dist/chunks/{chunk-C3EERM2C.js → chunk-X5A2KGLT.js} +3 -3
  178. package/dist/chunks/{chunk-F3ILOM3S.js → chunk-XH2KBQQI.js} +2 -2
  179. package/dist/chunks/{chunk-4WY2DYXA.js → chunk-XXEN5437.js} +3 -3
  180. package/dist/chunks/{chunk-DUNNWEDQ.js → chunk-YDC3GF4A.js} +9 -9
  181. package/dist/chunks/{chunk-FNASZG3G.js → chunk-YXOF3CCZ.js} +3 -3
  182. package/dist/chunks/{chunk-REKFHGJD.js → chunk-Z5SFNSKM.js} +3 -3
  183. package/dist/chunks/{chunk-5IN3J4NM.js → chunk-ZKN6TZRY.js} +9 -9
  184. package/dist/chunks/{chunk-5IN3J4NM.js.map → chunk-ZKN6TZRY.js.map} +1 -1
  185. package/dist/chunks/{chunk-YWJJ24PF.js → chunk-ZLGSWSWQ.js} +2 -2
  186. package/dist/chunks/{chunk-TMWPRJYQ.js → chunk-ZRRV4VBV.js} +12 -3
  187. package/dist/chunks/chunk-ZRRV4VBV.js.map +6 -0
  188. package/dist/chunks/{chunk-EPSG3Z3J.js → chunk-ZWYQ7YVY.js} +3 -3
  189. package/dist/chunks/{chunk-BU3XHNAZ.js → chunk-ZYH2AWZF.js} +5 -5
  190. package/dist/chunks/{cli-runtime-64AJ66MR.js → cli-runtime-QJEWJ7MO.js} +31 -31
  191. package/dist/chunks/{commands-MKPLY2XV.js → commands-4GSE33KT.js} +7 -6
  192. package/dist/chunks/{config-D5IT6LRW.js → config-SP4ELZ65.js} +21 -21
  193. package/dist/chunks/{conversation-id-S2QUZBIO.js → conversation-id-5WEVHPU2.js} +3 -3
  194. package/dist/chunks/{cost-TXP2DORO.js → cost-NDGWWG75.js} +9 -9
  195. package/dist/chunks/{crash-report-BQ7XI4TF.js → crash-report-7AHQSBVG.js} +9 -9
  196. package/dist/chunks/{debug-BLDVME6D.js → debug-UYHOAU7G.js} +4 -4
  197. package/dist/chunks/{desktop-host-schedule-tool-PWWNV4SP.js → desktop-host-schedule-tool-JW7DAM3K.js} +38 -38
  198. package/dist/chunks/{dist-WDYWTQ6K.js → dist-AHUHULQ2.js} +72 -14
  199. package/dist/chunks/dist-AHUHULQ2.js.map +6 -0
  200. package/dist/chunks/{dist-QLCUYOL2.js → dist-CK5ENBDZ.js} +71 -13
  201. package/dist/chunks/dist-CK5ENBDZ.js.map +6 -0
  202. package/dist/chunks/{dist-7N57TZWU.js → dist-GUJXGOJD.js} +2 -2
  203. package/dist/chunks/{dist-SX3G4Q4Y.js → dist-ILZMWUZG.js} +2 -2
  204. package/dist/chunks/{dist-UJ7MT7ET.js → dist-KDL67SQX.js} +2 -2
  205. package/dist/chunks/{dist-QMEJLMXF.js → dist-N4VH46ZC.js} +3 -3
  206. package/dist/chunks/{dist-PAKA3O7T.js → dist-NP6J6C6B.js} +4 -2
  207. package/dist/chunks/{dist-ZUFH5HBL.js → dist-YZXYNBC4.js} +80 -13
  208. package/dist/chunks/dist-YZXYNBC4.js.map +6 -0
  209. package/dist/chunks/doctor-BSSIBYW4.js +108 -0
  210. package/dist/chunks/{drain-AFIQLQMV.js → drain-CBJYB4YV.js} +28 -28
  211. package/dist/chunks/{entry-MIRNOCLR.js → entry-5UYOACFL.js} +6 -6
  212. package/dist/chunks/{eval-DQRIT7F7.js → eval-MEXBCRZE.js} +16 -16
  213. package/dist/chunks/{exec-GXGPXJPV.js → exec-GGBBWTRE.js} +69 -69
  214. package/dist/chunks/{exec-flags-I7PHHGJU.js → exec-flags-7O3R6VNK.js} +21 -21
  215. package/dist/chunks/{extension-BPPZMACB.js → extension-NJ65NRSI.js} +7 -7
  216. package/dist/chunks/{feed-7BLRIUMR.js → feed-WJGWKH3Q.js} +4 -4
  217. package/dist/chunks/{github-S7M5YPBU.js → github-MNTV6WZD.js} +4 -4
  218. package/dist/chunks/{home-KPXNNVQ3.js → home-WPNFAHFV.js} +3 -3
  219. package/dist/chunks/{homes-XZNE3AR2.js → homes-QKJFPN4J.js} +6 -6
  220. package/dist/chunks/{hooks-EJFGPRAU.js → hooks-K2TIZIPW.js} +30 -30
  221. package/dist/chunks/hooks-report-BTODJHGA.js +51 -0
  222. package/dist/chunks/{host-3RGIVVV6.js → host-KLNZDS7I.js} +13 -13
  223. package/dist/chunks/{host-queries-RZF7G7VH.js → host-queries-MWWBWBH3.js} +28 -28
  224. package/dist/chunks/{index-project-3PXRTFXD.js → index-project-JNGBTULM.js} +25 -25
  225. package/dist/chunks/{installed-list-R4CXRNQH.js → installed-list-K2ZSS57L.js} +4 -4
  226. package/dist/chunks/{launch-QL2DRXD5.js → launch-L6APQRWZ.js} +33 -33
  227. package/dist/chunks/{learn-S45K2BSD.js → learn-KMBS6DYD.js} +28 -28
  228. package/dist/chunks/{learn-builtin-I6X74JIZ.js → learn-builtin-YHQBA3TI.js} +30 -30
  229. package/dist/chunks/{lifecycle-SFUALNUU.js → lifecycle-3HE5WUH3.js} +49 -49
  230. package/dist/chunks/{list-EYM5G5I2.js → list-UGHPDN4J.js} +30 -30
  231. package/dist/chunks/live-65NDROVC.js +104 -0
  232. package/dist/chunks/{load-V66VC5MG.js → load-NZFGFJGA.js} +16 -16
  233. package/dist/chunks/{logs-MQBP6X7N.js → logs-P34HKEGO.js} +5 -5
  234. package/dist/chunks/{mcp-7D46D33X.js → mcp-6W4DA4D7.js} +37 -37
  235. package/dist/chunks/{mcp-serve-BQRYWCKK.js → mcp-serve-MIH3ONQF.js} +24 -24
  236. package/dist/chunks/{message-command-LDC26IA3.js → message-command-6F6EIC72.js} +73 -73
  237. package/dist/chunks/{notes-J26T5QMF.js → notes-GUY6ZA7S.js} +6 -6
  238. package/dist/chunks/{open-A27TZSLZ.js → open-FKTS5NJW.js} +8 -8
  239. package/dist/chunks/{operator-tools-M6XIADQO.js → operator-tools-JK7IG5RQ.js} +16 -16
  240. package/dist/chunks/{output-schema-HFVD3INV.js → output-schema-54MZRNAQ.js} +3 -3
  241. package/dist/chunks/{pal-ZRTQQQKY.js → pal-X6M7FIM6.js} +19 -19
  242. package/dist/chunks/{peers-5RFEQRIE.js → peers-ER43IAS2.js} +27 -27
  243. package/dist/chunks/{peers-EKAIDFC7.js → peers-VOHU6QT4.js} +9 -9
  244. package/dist/chunks/{pending-F6US7F4D.js → pending-DF6AKENO.js} +7 -7
  245. package/dist/chunks/{plugin-XWBK2AES.js → plugin-EZSPGVE3.js} +34 -34
  246. package/dist/chunks/{proposals-PUFNS7B2.js → proposals-XNXI26KX.js} +41 -41
  247. package/dist/chunks/{providers-DWDFQSH5.js → providers-WK7O36I4.js} +28 -28
  248. package/dist/chunks/{providers-MYEITJ7U.js → providers-YWGCVSMT.js} +11 -11
  249. package/dist/chunks/{pty-437MD4WO.js → pty-GBLWUDWS.js} +3 -3
  250. package/dist/chunks/{render-TGQXAOLC.js → render-L65JY7UZ.js} +5 -5
  251. package/dist/chunks/resume-DNID4OWP.js +29 -0
  252. package/dist/chunks/{resume-command-SEH3VNBC.js → resume-command-AP35JCD6.js} +7 -7
  253. package/dist/chunks/{running-J66IL6JP.js → running-X6PVK4P4.js} +4 -4
  254. package/dist/chunks/{say-FZLSUCYZ.js → say-QEH7QD7C.js} +23 -23
  255. package/dist/chunks/{schedule-NHDNUIMR.js → schedule-2YYLITCO.js} +18 -18
  256. package/dist/chunks/send-GYDAGL2K.js +49 -0
  257. package/dist/chunks/send-person-ORD5KSZJ.js +39 -0
  258. package/dist/chunks/{servers-UPVWNZLA.js → servers-QF2D2DHU.js} +10 -10
  259. package/dist/chunks/{service-JCUILBNP.js → service-GHPTQFYM.js} +49 -49
  260. package/dist/chunks/{session-options-JFXAHXSR.js → session-options-QU24ZTAR.js} +5 -5
  261. package/dist/chunks/{setting-cli-5YW4K6RY.js → setting-cli-RCWQ3PQ2.js} +20 -20
  262. package/dist/chunks/{skills-Q7TDOGZF.js → skills-Y2B2PVV4.js} +33 -33
  263. package/dist/chunks/{source-deliveries-47YDJTC5.js → source-deliveries-ETVRGF37.js} +22 -22
  264. package/dist/chunks/{start-check-RQHS2DSG.js → start-check-ND7JMIV2.js} +4 -4
  265. package/dist/chunks/{startup-failure-NSR6JI74.js → startup-failure-4D2RLMRR.js} +2 -2
  266. package/dist/chunks/{state-BBTR4O6O.js → state-KKPIEMAZ.js} +26 -26
  267. package/dist/chunks/{store-HVORHUT6.js → store-5EJQ23W4.js} +15 -13
  268. package/dist/chunks/{store-D2YQ3FUT.js → store-7H5DIKXP.js} +4 -4
  269. package/dist/chunks/{store-63GHT2AG.js → store-D3BDEFSQ.js} +3 -3
  270. package/dist/chunks/{store-NESNQHXT.js → store-V7T7LX7N.js} +9 -9
  271. package/dist/chunks/{tui-PIBFSFOX.js → tui-7CKF4FEB.js} +121 -121
  272. package/dist/chunks/{update-DF7EJDWE.js → update-JAW6P7U5.js} +9 -9
  273. package/dist/chunks/{watch-5MB6KSKQ.js → watch-N5Y4PSQC.js} +124 -124
  274. package/dist/chunks/{windows-home-P2CBM6ST.js → windows-home-K47ARHSQ.js} +5 -5
  275. package/dist/chunks/{workspaces-3LHLGMZB.js → workspaces-RPNRRWQH.js} +18 -18
  276. package/dist/chunks/{worktree-6WVBPPYG.js → worktree-REKIEK2Q.js} +34 -34
  277. package/dist/commands/acp-browser-pane.d.ts +4 -0
  278. package/dist/commands/acp-browser-pane.d.ts.map +1 -1
  279. package/dist/commands/acp-desktop-question.d.ts +8 -1
  280. package/dist/commands/acp-desktop-question.d.ts.map +1 -1
  281. package/dist/commands/acp-provider-retry.d.ts.map +1 -1
  282. package/dist/commands/acp.d.ts +12 -2
  283. package/dist/commands/acp.d.ts.map +1 -1
  284. package/dist/commands/desktop-computer-feed.d.ts +1 -0
  285. package/dist/commands/desktop-computer-feed.d.ts.map +1 -1
  286. package/dist/commands/desktop-host-signin.d.ts +22 -0
  287. package/dist/commands/desktop-host-signin.d.ts.map +1 -0
  288. package/dist/commands/desktop-host.d.ts +112 -20
  289. package/dist/commands/desktop-host.d.ts.map +1 -1
  290. package/dist/commands/doctor.d.ts +2 -0
  291. package/dist/commands/doctor.d.ts.map +1 -1
  292. package/dist/commands/login.d.ts +16 -1
  293. package/dist/commands/login.d.ts.map +1 -1
  294. package/dist/config/load.d.ts.map +1 -1
  295. package/dist/config/schema.d.ts +2 -0
  296. package/dist/config/schema.d.ts.map +1 -1
  297. package/dist/config/session-options.d.ts +3 -3
  298. package/dist/config/session-options.d.ts.map +1 -1
  299. package/dist/config/settings-descriptors.d.ts +2 -1
  300. package/dist/config/settings-descriptors.d.ts.map +1 -1
  301. package/dist/display-width.d.ts +16 -0
  302. package/dist/display-width.d.ts.map +1 -0
  303. package/dist/doctor/checks/computer-use.d.ts +4 -0
  304. package/dist/doctor/checks/computer-use.d.ts.map +1 -0
  305. package/dist/doctor/live.d.ts.map +1 -1
  306. package/dist/index.js +58 -58
  307. package/dist/integrations/sessions/archive-inactive.d.ts +1 -0
  308. package/dist/integrations/sessions/archive-inactive.d.ts.map +1 -1
  309. package/dist/integrations/sessions/store.d.ts +1 -0
  310. package/dist/integrations/sessions/store.d.ts.map +1 -1
  311. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  312. package/dist/integrations/subagents/saved-agents.d.ts +7 -2
  313. package/dist/integrations/subagents/saved-agents.d.ts.map +1 -1
  314. package/dist/permissions/browser-sites.d.ts.map +1 -1
  315. package/dist/plan/approval.d.ts +2 -0
  316. package/dist/plan/approval.d.ts.map +1 -1
  317. package/dist/sdk-peer.js +3 -1
  318. package/dist/tui/App.d.ts.map +1 -1
  319. package/dist/tui/agent.d.ts +8 -1
  320. package/dist/tui/agent.d.ts.map +1 -1
  321. package/dist/tui/rewind.d.ts +1 -1
  322. package/dist/tui/rewind.d.ts.map +1 -1
  323. package/dist/tui/terminal-choice-text.d.ts.map +1 -1
  324. package/package.json +8 -8
  325. package/dist/chunks/acp-MURBIENR.js.map +0 -6
  326. package/dist/chunks/agent-session-7CKC3FPL.js +0 -108
  327. package/dist/chunks/browser-IXKMPHWF.js.map +0 -6
  328. package/dist/chunks/chunk-64PKDN3H.js.map +0 -6
  329. package/dist/chunks/chunk-C72PY7UT.js.map +0 -6
  330. package/dist/chunks/chunk-EFWNOGGF.js.map +0 -6
  331. package/dist/chunks/chunk-IG3OL4PI.js.map +0 -6
  332. package/dist/chunks/chunk-J2MKN2IJ.js.map +0 -6
  333. package/dist/chunks/chunk-JEPSIERS.js.map +0 -6
  334. package/dist/chunks/chunk-LXBLH2JF.js.map +0 -6
  335. package/dist/chunks/chunk-MPJVOY6U.js.map +0 -6
  336. package/dist/chunks/chunk-TMWPRJYQ.js.map +0 -6
  337. package/dist/chunks/chunk-UNMUVJD5.js.map +0 -6
  338. package/dist/chunks/dist-QLCUYOL2.js.map +0 -6
  339. package/dist/chunks/dist-WDYWTQ6K.js.map +0 -6
  340. package/dist/chunks/dist-ZUFH5HBL.js.map +0 -6
  341. package/dist/chunks/doctor-YGQQRHQU.js +0 -106
  342. package/dist/chunks/hooks-report-IJHIRMU4.js +0 -51
  343. package/dist/chunks/live-QPPDD5ZP.js +0 -104
  344. package/dist/chunks/resume-LBF6SHWI.js +0 -29
  345. package/dist/chunks/send-WW3XRBNY.js +0 -49
  346. package/dist/chunks/send-person-VPPGPY7Z.js +0 -39
  347. /package/dist/chunks/{activity-command-QY4TBDBA.js.map → activity-command-2JTOLORP.js.map} +0 -0
  348. /package/dist/chunks/{add-T4I7FT6U.js.map → add-W7I5FNJ6.js.map} +0 -0
  349. /package/dist/chunks/{agent-KG5ZDN4V.js.map → agent-UFIGF7GW.js.map} +0 -0
  350. /package/dist/chunks/{agent-session-7CKC3FPL.js.map → agent-session-TVB22M7F.js.map} +0 -0
  351. /package/dist/chunks/{apply-at-exit-RTLPTWIX.js.map → apply-at-exit-CC3LEQEF.js.map} +0 -0
  352. /package/dist/chunks/{archive-OE4IOYPG.js.map → archive-XFGZO54E.js.map} +0 -0
  353. /package/dist/chunks/{auth-6KKZWY43.js.map → auth-BD7S36PR.js.map} +0 -0
  354. /package/dist/chunks/{bin-main-ELFORXQH.js.map → bin-main-FR3GTCLV.js.map} +0 -0
  355. /package/dist/chunks/{binding-UJQOQNOP.js.map → binding-DWEVXXCK.js.map} +0 -0
  356. /package/dist/chunks/{chat-SXGUU2HT.js.map → chat-CONC7RFQ.js.map} +0 -0
  357. /package/dist/chunks/{chunk-33E2IBBS.js.map → chunk-2LUHXKVZ.js.map} +0 -0
  358. /package/dist/chunks/{chunk-HKBCNF4M.js.map → chunk-32AQ2IYQ.js.map} +0 -0
  359. /package/dist/chunks/{chunk-YV3RDTHR.js.map → chunk-3D3CBJHR.js.map} +0 -0
  360. /package/dist/chunks/{chunk-BCTGRGWF.js.map → chunk-3DSSBV3F.js.map} +0 -0
  361. /package/dist/chunks/{chunk-XFF7HELD.js.map → chunk-3FGY7ALU.js.map} +0 -0
  362. /package/dist/chunks/{chunk-UN6SRJB4.js.map → chunk-3HXC7CQX.js.map} +0 -0
  363. /package/dist/chunks/{chunk-CJCCFNFG.js.map → chunk-3NB4FCAS.js.map} +0 -0
  364. /package/dist/chunks/{chunk-WSOU4AJL.js.map → chunk-3WWI2FUN.js.map} +0 -0
  365. /package/dist/chunks/{chunk-DFPOJWTB.js.map → chunk-4EHA3DZC.js.map} +0 -0
  366. /package/dist/chunks/{chunk-GE2IDPI5.js.map → chunk-4SMX6CTE.js.map} +0 -0
  367. /package/dist/chunks/{chunk-R4KHEHKV.js.map → chunk-4XIOI4OS.js.map} +0 -0
  368. /package/dist/chunks/{chunk-GAISG43Y.js.map → chunk-4ZZLP5Q6.js.map} +0 -0
  369. /package/dist/chunks/{chunk-4TIP4QHX.js.map → chunk-57LEFF5B.js.map} +0 -0
  370. /package/dist/chunks/{chunk-4P4TFLO5.js.map → chunk-5CBMOTZH.js.map} +0 -0
  371. /package/dist/chunks/{chunk-CR4PW7TP.js.map → chunk-5EBL6PQM.js.map} +0 -0
  372. /package/dist/chunks/{chunk-SNRGQZ26.js.map → chunk-5HJ3M5WO.js.map} +0 -0
  373. /package/dist/chunks/{chunk-JGSBW4CL.js.map → chunk-5KL7XHNF.js.map} +0 -0
  374. /package/dist/chunks/{chunk-YCWIZHXB.js.map → chunk-5VGIJDT3.js.map} +0 -0
  375. /package/dist/chunks/{chunk-26N4XIBC.js.map → chunk-65AIUD2J.js.map} +0 -0
  376. /package/dist/chunks/{chunk-K7EUZJOM.js.map → chunk-6DXRQHM3.js.map} +0 -0
  377. /package/dist/chunks/{chunk-CJSHYGFG.js.map → chunk-6JDLXECN.js.map} +0 -0
  378. /package/dist/chunks/{chunk-CJXPOZFX.js.map → chunk-6QOUG7I5.js.map} +0 -0
  379. /package/dist/chunks/{chunk-DCHEOKYX.js.map → chunk-6XAQENXK.js.map} +0 -0
  380. /package/dist/chunks/{chunk-WKEGRNT3.js.map → chunk-76N2YA4H.js.map} +0 -0
  381. /package/dist/chunks/{chunk-SEWZ6FRP.js.map → chunk-7NA6Z4LT.js.map} +0 -0
  382. /package/dist/chunks/{chunk-YXFRVCYY.js.map → chunk-7UW747VE.js.map} +0 -0
  383. /package/dist/chunks/{chunk-3JG5IVDB.js.map → chunk-7XWHSNQV.js.map} +0 -0
  384. /package/dist/chunks/{chunk-PCLD62Y4.js.map → chunk-7XWT35S7.js.map} +0 -0
  385. /package/dist/chunks/{chunk-TX5R7FPO.js.map → chunk-AOYZYPQU.js.map} +0 -0
  386. /package/dist/chunks/{chunk-64PSV24V.js.map → chunk-B5QT43AR.js.map} +0 -0
  387. /package/dist/chunks/{chunk-OM6I2S7W.js.map → chunk-BQRYROMU.js.map} +0 -0
  388. /package/dist/chunks/{chunk-YVIKHGQ4.js.map → chunk-BTE5NNGC.js.map} +0 -0
  389. /package/dist/chunks/{chunk-JGVDN4QF.js.map → chunk-BU34QVPU.js.map} +0 -0
  390. /package/dist/chunks/{chunk-AWFXPA2P.js.map → chunk-CSQBHH2P.js.map} +0 -0
  391. /package/dist/chunks/{chunk-CJG6BQXC.js.map → chunk-CU2NHWJZ.js.map} +0 -0
  392. /package/dist/chunks/{chunk-CY5TXLBM.js.map → chunk-CXDIBVU4.js.map} +0 -0
  393. /package/dist/chunks/{chunk-5UIY4X2H.js.map → chunk-DOLQSKHY.js.map} +0 -0
  394. /package/dist/chunks/{chunk-TEZRVNF6.js.map → chunk-DS7IXKY3.js.map} +0 -0
  395. /package/dist/chunks/{chunk-CGO3NJXK.js.map → chunk-DSPRBHXG.js.map} +0 -0
  396. /package/dist/chunks/{chunk-ER6NZEPG.js.map → chunk-DWIN3BQK.js.map} +0 -0
  397. /package/dist/chunks/{chunk-ASM5LAX6.js.map → chunk-E3IKNG7N.js.map} +0 -0
  398. /package/dist/chunks/{chunk-WJLVORL5.js.map → chunk-E5RSO4L4.js.map} +0 -0
  399. /package/dist/chunks/{chunk-Y34RDPE2.js.map → chunk-ECJSMWWH.js.map} +0 -0
  400. /package/dist/chunks/{chunk-UIPZCJEG.js.map → chunk-EOEV6W4N.js.map} +0 -0
  401. /package/dist/chunks/{chunk-DSRV6XYE.js.map → chunk-EROQ2L5G.js.map} +0 -0
  402. /package/dist/chunks/{chunk-GOBE3M23.js.map → chunk-ET5JCPHK.js.map} +0 -0
  403. /package/dist/chunks/{chunk-HAAS62EL.js.map → chunk-EUD7DFGD.js.map} +0 -0
  404. /package/dist/chunks/{chunk-YGCJJJ5U.js.map → chunk-EYLW2CSN.js.map} +0 -0
  405. /package/dist/chunks/{chunk-QI5DLJKB.js.map → chunk-FQ4TVLU4.js.map} +0 -0
  406. /package/dist/chunks/{chunk-C4HMW3HM.js.map → chunk-FQB5TULO.js.map} +0 -0
  407. /package/dist/chunks/{chunk-AQSOO7T5.js.map → chunk-FRVEG45C.js.map} +0 -0
  408. /package/dist/chunks/{chunk-AVZHTMRP.js.map → chunk-FZ45U2TD.js.map} +0 -0
  409. /package/dist/chunks/{chunk-KMP7GNMD.js.map → chunk-GPFJOS37.js.map} +0 -0
  410. /package/dist/chunks/{chunk-VINVUMPS.js.map → chunk-GVE34Z4N.js.map} +0 -0
  411. /package/dist/chunks/{chunk-GTHARNMF.js.map → chunk-HBJKBRNS.js.map} +0 -0
  412. /package/dist/chunks/{chunk-DUXBWYNI.js.map → chunk-HCYOQ6YQ.js.map} +0 -0
  413. /package/dist/chunks/{chunk-5PDBQ34I.js.map → chunk-HLNHYAFB.js.map} +0 -0
  414. /package/dist/chunks/{chunk-VLEJZWSI.js.map → chunk-I3BL2S64.js.map} +0 -0
  415. /package/dist/chunks/{chunk-RBW5FFRZ.js.map → chunk-IGA4KH5Y.js.map} +0 -0
  416. /package/dist/chunks/{chunk-IVVCW5NQ.js.map → chunk-IRPH5CDS.js.map} +0 -0
  417. /package/dist/chunks/{chunk-U65C3WSK.js.map → chunk-JIVLBRRN.js.map} +0 -0
  418. /package/dist/chunks/{chunk-O633GQ46.js.map → chunk-JMPKX37I.js.map} +0 -0
  419. /package/dist/chunks/{chunk-2GPXHLZ7.js.map → chunk-JQ3Y5NX7.js.map} +0 -0
  420. /package/dist/chunks/{chunk-EUPMFT4C.js.map → chunk-KGIGFJXC.js.map} +0 -0
  421. /package/dist/chunks/{chunk-PYLCAPRX.js.map → chunk-KH3DWISF.js.map} +0 -0
  422. /package/dist/chunks/{chunk-UW7DQJSG.js.map → chunk-KVTWBRQI.js.map} +0 -0
  423. /package/dist/chunks/{chunk-FCB7J2JY.js.map → chunk-LQM4DE5B.js.map} +0 -0
  424. /package/dist/chunks/{chunk-LSA4WCAA.js.map → chunk-LVBUF475.js.map} +0 -0
  425. /package/dist/chunks/{chunk-OFDZF2HC.js.map → chunk-M4GHZ6CV.js.map} +0 -0
  426. /package/dist/chunks/{chunk-TSC5I62M.js.map → chunk-MBR655LE.js.map} +0 -0
  427. /package/dist/chunks/{chunk-BT4Z22CR.js.map → chunk-MHJESYWP.js.map} +0 -0
  428. /package/dist/chunks/{chunk-QUVP32VA.js.map → chunk-MKBXBLDR.js.map} +0 -0
  429. /package/dist/chunks/{chunk-FFFNQRQU.js.map → chunk-MKBXTSKY.js.map} +0 -0
  430. /package/dist/chunks/{chunk-M4FJ432T.js.map → chunk-MQJX2ZHQ.js.map} +0 -0
  431. /package/dist/chunks/{chunk-TLDRR7NF.js.map → chunk-MS2YYSVC.js.map} +0 -0
  432. /package/dist/chunks/{chunk-JYEVX4XO.js.map → chunk-MU7HMNAT.js.map} +0 -0
  433. /package/dist/chunks/{chunk-HUDWOVPR.js.map → chunk-MWSJYZ2R.js.map} +0 -0
  434. /package/dist/chunks/{chunk-6EAH4JT6.js.map → chunk-N27MGDJW.js.map} +0 -0
  435. /package/dist/chunks/{chunk-ATBKAYPX.js.map → chunk-N7T6YPKT.js.map} +0 -0
  436. /package/dist/chunks/{chunk-EHNUMZLI.js.map → chunk-NGONNBXL.js.map} +0 -0
  437. /package/dist/chunks/{chunk-OZHN6UZ2.js.map → chunk-NHTBK2XM.js.map} +0 -0
  438. /package/dist/chunks/{chunk-VZMBA7BY.js.map → chunk-OAZQ26D7.js.map} +0 -0
  439. /package/dist/chunks/{chunk-B5M637GC.js.map → chunk-OI6J7RPI.js.map} +0 -0
  440. /package/dist/chunks/{chunk-XZRXGJRW.js.map → chunk-ORPLF5MZ.js.map} +0 -0
  441. /package/dist/chunks/{chunk-5FYABBNQ.js.map → chunk-P6S4D3RS.js.map} +0 -0
  442. /package/dist/chunks/{chunk-3ZAZUT7F.js.map → chunk-PH7QOU2A.js.map} +0 -0
  443. /package/dist/chunks/{chunk-VBNWYBV7.js.map → chunk-PY25GCBZ.js.map} +0 -0
  444. /package/dist/chunks/{chunk-QYTOM3WZ.js.map → chunk-Q2L4OX37.js.map} +0 -0
  445. /package/dist/chunks/{chunk-4T4STLUZ.js.map → chunk-Q33CQYAC.js.map} +0 -0
  446. /package/dist/chunks/{chunk-4F6OOHP2.js.map → chunk-Q64YZVHO.js.map} +0 -0
  447. /package/dist/chunks/{chunk-VJQLHEUD.js.map → chunk-Q73AM2KK.js.map} +0 -0
  448. /package/dist/chunks/{chunk-EWRZDQQD.js.map → chunk-Q744Z56H.js.map} +0 -0
  449. /package/dist/chunks/{chunk-LBBJQX73.js.map → chunk-QK2ES6TB.js.map} +0 -0
  450. /package/dist/chunks/{chunk-UWE7HTRB.js.map → chunk-QKLHNZLP.js.map} +0 -0
  451. /package/dist/chunks/{chunk-3BSJTK67.js.map → chunk-QMTLLPEB.js.map} +0 -0
  452. /package/dist/chunks/{chunk-JGWBBAQX.js.map → chunk-QO6NWZEY.js.map} +0 -0
  453. /package/dist/chunks/{chunk-I4GTRFPK.js.map → chunk-QPTNH7SR.js.map} +0 -0
  454. /package/dist/chunks/{chunk-MT6BBN3N.js.map → chunk-QSL4C3HW.js.map} +0 -0
  455. /package/dist/chunks/{chunk-2RD5B76Z.js.map → chunk-QSW6RQEA.js.map} +0 -0
  456. /package/dist/chunks/{chunk-MFMWMVI2.js.map → chunk-RC5CPNQL.js.map} +0 -0
  457. /package/dist/chunks/{chunk-C5KBEU26.js.map → chunk-RCWRXPNU.js.map} +0 -0
  458. /package/dist/chunks/{chunk-B3MQ5GKC.js.map → chunk-RGHE4YT2.js.map} +0 -0
  459. /package/dist/chunks/{chunk-X6P6PKNN.js.map → chunk-RMGBPCWJ.js.map} +0 -0
  460. /package/dist/chunks/{chunk-7TH57XCX.js.map → chunk-RRAME7MZ.js.map} +0 -0
  461. /package/dist/chunks/{chunk-CUSFXQX6.js.map → chunk-RUXMJHR4.js.map} +0 -0
  462. /package/dist/chunks/{chunk-672GYAHP.js.map → chunk-S72CBLRQ.js.map} +0 -0
  463. /package/dist/chunks/{chunk-J6DWOQI6.js.map → chunk-S7MZJAJZ.js.map} +0 -0
  464. /package/dist/chunks/{chunk-ZI2Z3N62.js.map → chunk-SEP5HAWL.js.map} +0 -0
  465. /package/dist/chunks/{chunk-2IXKDMQV.js.map → chunk-SFRPKNVL.js.map} +0 -0
  466. /package/dist/chunks/{chunk-SISDBCRO.js.map → chunk-SHJZWKEO.js.map} +0 -0
  467. /package/dist/chunks/{chunk-4MY32RSJ.js.map → chunk-SQ746U6G.js.map} +0 -0
  468. /package/dist/chunks/{chunk-JVHCTRTL.js.map → chunk-T36RR4QY.js.map} +0 -0
  469. /package/dist/chunks/{chunk-H3SBLH74.js.map → chunk-TMXAC55Y.js.map} +0 -0
  470. /package/dist/chunks/{chunk-BUFV5IZ2.js.map → chunk-TYZ2EXCN.js.map} +0 -0
  471. /package/dist/chunks/{chunk-3XWSIVZO.js.map → chunk-U7Y5U5WN.js.map} +0 -0
  472. /package/dist/chunks/{chunk-FTHG7MEP.js.map → chunk-UANOC6XV.js.map} +0 -0
  473. /package/dist/chunks/{chunk-NXCEN75Q.js.map → chunk-UBYLIP6R.js.map} +0 -0
  474. /package/dist/chunks/{chunk-AJNOSQRS.js.map → chunk-UIMQEGZQ.js.map} +0 -0
  475. /package/dist/chunks/{chunk-3QU5FWU5.js.map → chunk-VLEQMW7N.js.map} +0 -0
  476. /package/dist/chunks/{chunk-HMVMA52K.js.map → chunk-VOFIRTNT.js.map} +0 -0
  477. /package/dist/chunks/{chunk-5UARTCJW.js.map → chunk-VPLOFGJQ.js.map} +0 -0
  478. /package/dist/chunks/{chunk-4Q32NJ5O.js.map → chunk-W6XWXSAO.js.map} +0 -0
  479. /package/dist/chunks/{chunk-HKYQA52K.js.map → chunk-WBGA2CWS.js.map} +0 -0
  480. /package/dist/chunks/{chunk-BB7AEKOT.js.map → chunk-WISXBQR3.js.map} +0 -0
  481. /package/dist/chunks/{chunk-2CGTS4UL.js.map → chunk-X2KQ6U3E.js.map} +0 -0
  482. /package/dist/chunks/{chunk-C3EERM2C.js.map → chunk-X5A2KGLT.js.map} +0 -0
  483. /package/dist/chunks/{chunk-F3ILOM3S.js.map → chunk-XH2KBQQI.js.map} +0 -0
  484. /package/dist/chunks/{chunk-4WY2DYXA.js.map → chunk-XXEN5437.js.map} +0 -0
  485. /package/dist/chunks/{chunk-DUNNWEDQ.js.map → chunk-YDC3GF4A.js.map} +0 -0
  486. /package/dist/chunks/{chunk-FNASZG3G.js.map → chunk-YXOF3CCZ.js.map} +0 -0
  487. /package/dist/chunks/{chunk-REKFHGJD.js.map → chunk-Z5SFNSKM.js.map} +0 -0
  488. /package/dist/chunks/{chunk-YWJJ24PF.js.map → chunk-ZLGSWSWQ.js.map} +0 -0
  489. /package/dist/chunks/{chunk-EPSG3Z3J.js.map → chunk-ZWYQ7YVY.js.map} +0 -0
  490. /package/dist/chunks/{chunk-BU3XHNAZ.js.map → chunk-ZYH2AWZF.js.map} +0 -0
  491. /package/dist/chunks/{cli-runtime-64AJ66MR.js.map → cli-runtime-QJEWJ7MO.js.map} +0 -0
  492. /package/dist/chunks/{commands-MKPLY2XV.js.map → commands-4GSE33KT.js.map} +0 -0
  493. /package/dist/chunks/{config-D5IT6LRW.js.map → config-SP4ELZ65.js.map} +0 -0
  494. /package/dist/chunks/{conversation-id-S2QUZBIO.js.map → conversation-id-5WEVHPU2.js.map} +0 -0
  495. /package/dist/chunks/{cost-TXP2DORO.js.map → cost-NDGWWG75.js.map} +0 -0
  496. /package/dist/chunks/{crash-report-BQ7XI4TF.js.map → crash-report-7AHQSBVG.js.map} +0 -0
  497. /package/dist/chunks/{debug-BLDVME6D.js.map → debug-UYHOAU7G.js.map} +0 -0
  498. /package/dist/chunks/{desktop-host-schedule-tool-PWWNV4SP.js.map → desktop-host-schedule-tool-JW7DAM3K.js.map} +0 -0
  499. /package/dist/chunks/{dist-7N57TZWU.js.map → dist-GUJXGOJD.js.map} +0 -0
  500. /package/dist/chunks/{dist-SX3G4Q4Y.js.map → dist-ILZMWUZG.js.map} +0 -0
  501. /package/dist/chunks/{dist-UJ7MT7ET.js.map → dist-KDL67SQX.js.map} +0 -0
  502. /package/dist/chunks/{dist-PAKA3O7T.js.map → dist-N4VH46ZC.js.map} +0 -0
  503. /package/dist/chunks/{dist-QMEJLMXF.js.map → dist-NP6J6C6B.js.map} +0 -0
  504. /package/dist/chunks/{doctor-YGQQRHQU.js.map → doctor-BSSIBYW4.js.map} +0 -0
  505. /package/dist/chunks/{drain-AFIQLQMV.js.map → drain-CBJYB4YV.js.map} +0 -0
  506. /package/dist/chunks/{entry-MIRNOCLR.js.map → entry-5UYOACFL.js.map} +0 -0
  507. /package/dist/chunks/{eval-DQRIT7F7.js.map → eval-MEXBCRZE.js.map} +0 -0
  508. /package/dist/chunks/{exec-GXGPXJPV.js.map → exec-GGBBWTRE.js.map} +0 -0
  509. /package/dist/chunks/{exec-flags-I7PHHGJU.js.map → exec-flags-7O3R6VNK.js.map} +0 -0
  510. /package/dist/chunks/{extension-BPPZMACB.js.map → extension-NJ65NRSI.js.map} +0 -0
  511. /package/dist/chunks/{feed-7BLRIUMR.js.map → feed-WJGWKH3Q.js.map} +0 -0
  512. /package/dist/chunks/{github-S7M5YPBU.js.map → github-MNTV6WZD.js.map} +0 -0
  513. /package/dist/chunks/{home-KPXNNVQ3.js.map → home-WPNFAHFV.js.map} +0 -0
  514. /package/dist/chunks/{homes-XZNE3AR2.js.map → homes-QKJFPN4J.js.map} +0 -0
  515. /package/dist/chunks/{hooks-EJFGPRAU.js.map → hooks-K2TIZIPW.js.map} +0 -0
  516. /package/dist/chunks/{hooks-report-IJHIRMU4.js.map → hooks-report-BTODJHGA.js.map} +0 -0
  517. /package/dist/chunks/{host-3RGIVVV6.js.map → host-KLNZDS7I.js.map} +0 -0
  518. /package/dist/chunks/{host-queries-RZF7G7VH.js.map → host-queries-MWWBWBH3.js.map} +0 -0
  519. /package/dist/chunks/{index-project-3PXRTFXD.js.map → index-project-JNGBTULM.js.map} +0 -0
  520. /package/dist/chunks/{installed-list-R4CXRNQH.js.map → installed-list-K2ZSS57L.js.map} +0 -0
  521. /package/dist/chunks/{launch-QL2DRXD5.js.map → launch-L6APQRWZ.js.map} +0 -0
  522. /package/dist/chunks/{learn-S45K2BSD.js.map → learn-KMBS6DYD.js.map} +0 -0
  523. /package/dist/chunks/{learn-builtin-I6X74JIZ.js.map → learn-builtin-YHQBA3TI.js.map} +0 -0
  524. /package/dist/chunks/{lifecycle-SFUALNUU.js.map → lifecycle-3HE5WUH3.js.map} +0 -0
  525. /package/dist/chunks/{list-EYM5G5I2.js.map → list-UGHPDN4J.js.map} +0 -0
  526. /package/dist/chunks/{live-QPPDD5ZP.js.map → live-65NDROVC.js.map} +0 -0
  527. /package/dist/chunks/{load-V66VC5MG.js.map → load-NZFGFJGA.js.map} +0 -0
  528. /package/dist/chunks/{logs-MQBP6X7N.js.map → logs-P34HKEGO.js.map} +0 -0
  529. /package/dist/chunks/{mcp-7D46D33X.js.map → mcp-6W4DA4D7.js.map} +0 -0
  530. /package/dist/chunks/{mcp-serve-BQRYWCKK.js.map → mcp-serve-MIH3ONQF.js.map} +0 -0
  531. /package/dist/chunks/{message-command-LDC26IA3.js.map → message-command-6F6EIC72.js.map} +0 -0
  532. /package/dist/chunks/{notes-J26T5QMF.js.map → notes-GUY6ZA7S.js.map} +0 -0
  533. /package/dist/chunks/{open-A27TZSLZ.js.map → open-FKTS5NJW.js.map} +0 -0
  534. /package/dist/chunks/{operator-tools-M6XIADQO.js.map → operator-tools-JK7IG5RQ.js.map} +0 -0
  535. /package/dist/chunks/{output-schema-HFVD3INV.js.map → output-schema-54MZRNAQ.js.map} +0 -0
  536. /package/dist/chunks/{pal-ZRTQQQKY.js.map → pal-X6M7FIM6.js.map} +0 -0
  537. /package/dist/chunks/{peers-5RFEQRIE.js.map → peers-ER43IAS2.js.map} +0 -0
  538. /package/dist/chunks/{peers-EKAIDFC7.js.map → peers-VOHU6QT4.js.map} +0 -0
  539. /package/dist/chunks/{pending-F6US7F4D.js.map → pending-DF6AKENO.js.map} +0 -0
  540. /package/dist/chunks/{plugin-XWBK2AES.js.map → plugin-EZSPGVE3.js.map} +0 -0
  541. /package/dist/chunks/{proposals-PUFNS7B2.js.map → proposals-XNXI26KX.js.map} +0 -0
  542. /package/dist/chunks/{providers-DWDFQSH5.js.map → providers-WK7O36I4.js.map} +0 -0
  543. /package/dist/chunks/{providers-MYEITJ7U.js.map → providers-YWGCVSMT.js.map} +0 -0
  544. /package/dist/chunks/{pty-437MD4WO.js.map → pty-GBLWUDWS.js.map} +0 -0
  545. /package/dist/chunks/{render-TGQXAOLC.js.map → render-L65JY7UZ.js.map} +0 -0
  546. /package/dist/chunks/{resume-LBF6SHWI.js.map → resume-DNID4OWP.js.map} +0 -0
  547. /package/dist/chunks/{resume-command-SEH3VNBC.js.map → resume-command-AP35JCD6.js.map} +0 -0
  548. /package/dist/chunks/{running-J66IL6JP.js.map → running-X6PVK4P4.js.map} +0 -0
  549. /package/dist/chunks/{say-FZLSUCYZ.js.map → say-QEH7QD7C.js.map} +0 -0
  550. /package/dist/chunks/{schedule-NHDNUIMR.js.map → schedule-2YYLITCO.js.map} +0 -0
  551. /package/dist/chunks/{send-WW3XRBNY.js.map → send-GYDAGL2K.js.map} +0 -0
  552. /package/dist/chunks/{send-person-VPPGPY7Z.js.map → send-person-ORD5KSZJ.js.map} +0 -0
  553. /package/dist/chunks/{servers-UPVWNZLA.js.map → servers-QF2D2DHU.js.map} +0 -0
  554. /package/dist/chunks/{service-JCUILBNP.js.map → service-GHPTQFYM.js.map} +0 -0
  555. /package/dist/chunks/{session-options-JFXAHXSR.js.map → session-options-QU24ZTAR.js.map} +0 -0
  556. /package/dist/chunks/{setting-cli-5YW4K6RY.js.map → setting-cli-RCWQ3PQ2.js.map} +0 -0
  557. /package/dist/chunks/{skills-Q7TDOGZF.js.map → skills-Y2B2PVV4.js.map} +0 -0
  558. /package/dist/chunks/{source-deliveries-47YDJTC5.js.map → source-deliveries-ETVRGF37.js.map} +0 -0
  559. /package/dist/chunks/{start-check-RQHS2DSG.js.map → start-check-ND7JMIV2.js.map} +0 -0
  560. /package/dist/chunks/{startup-failure-NSR6JI74.js.map → startup-failure-4D2RLMRR.js.map} +0 -0
  561. /package/dist/chunks/{state-BBTR4O6O.js.map → state-KKPIEMAZ.js.map} +0 -0
  562. /package/dist/chunks/{store-63GHT2AG.js.map → store-5EJQ23W4.js.map} +0 -0
  563. /package/dist/chunks/{store-D2YQ3FUT.js.map → store-7H5DIKXP.js.map} +0 -0
  564. /package/dist/chunks/{store-HVORHUT6.js.map → store-D3BDEFSQ.js.map} +0 -0
  565. /package/dist/chunks/{store-NESNQHXT.js.map → store-V7T7LX7N.js.map} +0 -0
  566. /package/dist/chunks/{tui-PIBFSFOX.js.map → tui-7CKF4FEB.js.map} +0 -0
  567. /package/dist/chunks/{update-DF7EJDWE.js.map → update-JAW6P7U5.js.map} +0 -0
  568. /package/dist/chunks/{watch-5MB6KSKQ.js.map → watch-N5Y4PSQC.js.map} +0 -0
  569. /package/dist/chunks/{windows-home-P2CBM6ST.js.map → windows-home-K47ARHSQ.js.map} +0 -0
  570. /package/dist/chunks/{workspaces-3LHLGMZB.js.map → workspaces-RPNRRWQH.js.map} +0 -0
  571. /package/dist/chunks/{worktree-6WVBPPYG.js.map → worktree-REKIEK2Q.js.map} +0 -0
@@ -325,7 +325,7 @@ var require_brace_expansion = __commonJS({
325
325
  });
326
326
 
327
327
  // ../sdk/dist/version.js
328
- var VERSION = "75.0.0";
328
+ var VERSION = "76.0.0";
329
329
 
330
330
  // ../sdk/dist/runtime/harness-session/index.js
331
331
  import { posix, win32 } from "node:path";
@@ -48570,6 +48570,26 @@ var TokenUsageSchema = external_exports.object({
48570
48570
  cacheTtlMs: count3.optional(),
48571
48571
  cacheWriteTtlTokens: external_exports.object({ fiveMin: count3.optional(), oneHour: count3.optional() }).strict().optional()
48572
48572
  }).strict();
48573
+ function persistedTokenUsage(usage) {
48574
+ const ttl = usage.cacheWriteTtlTokens;
48575
+ return {
48576
+ promptTokens: usage.promptTokens,
48577
+ completionTokens: usage.completionTokens,
48578
+ totalTokens: usage.totalTokens,
48579
+ cachedTokens: usage.cachedTokens,
48580
+ cacheWriteTokens: usage.cacheWriteTokens,
48581
+ ...usage.cacheTokensInPrompt !== void 0 ? { cacheTokensInPrompt: usage.cacheTokensInPrompt } : {},
48582
+ ...usage.reasoningTokens !== void 0 ? { reasoningTokens: usage.reasoningTokens } : {},
48583
+ ...usage.cacheTtlMs !== void 0 ? { cacheTtlMs: usage.cacheTtlMs } : {},
48584
+ ...ttl ? {
48585
+ cacheWriteTtlTokens: {
48586
+ ...ttl.fiveMin !== void 0 ? { fiveMin: ttl.fiveMin } : {},
48587
+ ...ttl.oneHour !== void 0 ? { oneHour: ttl.oneHour } : {}
48588
+ }
48589
+ } : {}
48590
+ };
48591
+ }
48592
+ __name(persistedTokenUsage, "persistedTokenUsage");
48573
48593
  var CostInfoSchema = external_exports.object({
48574
48594
  inputCostPer1M: external_exports.number().nonnegative().optional(),
48575
48595
  outputCostPer1M: external_exports.number().nonnegative().optional(),
@@ -51761,7 +51781,11 @@ var SessionLogCore = class {
51761
51781
  gen: lease.fence
51762
51782
  };
51763
51783
  const { type, ...payload } = draft;
51764
- let candidate = { ...envelope, type, ...payload };
51784
+ let candidate = {
51785
+ ...envelope,
51786
+ type,
51787
+ ...persistedUsageOf(type, payload)
51788
+ };
51765
51789
  candidate = await this.#spillIfLarge(candidate);
51766
51790
  const parsed = SessionRecordSchema.safeParse(candidate);
51767
51791
  if (!parsed.success) {
@@ -52252,6 +52276,19 @@ async function* walkSessionLog(medium, options) {
52252
52276
  };
52253
52277
  }
52254
52278
  __name(walkSessionLog, "walkSessionLog");
52279
+ function persistedUsageOf(type, payload) {
52280
+ const project = /* @__PURE__ */ __name((value) => value && typeof value === "object" && !Array.isArray(value) ? persistedTokenUsage(value) : value, "project");
52281
+ if (type === "child_session_ended" && payload.usage !== void 0) {
52282
+ return { ...payload, usage: project(payload.usage) };
52283
+ }
52284
+ const settlement = payload.settlement;
52285
+ if ((type === "turn_completed" || type === "turn_failed") && settlement && typeof settlement === "object" && !Array.isArray(settlement) && settlement.usage !== void 0) {
52286
+ const settled = settlement;
52287
+ return { ...payload, settlement: { ...settled, usage: project(settled.usage) } };
52288
+ }
52289
+ return payload;
52290
+ }
52291
+ __name(persistedUsageOf, "persistedUsageOf");
52255
52292
 
52256
52293
  // ../sdk/dist/store/session-log/disk.js
52257
52294
  import { createReadStream } from "node:fs";
@@ -64796,6 +64833,29 @@ function failureLabel(handle) {
64796
64833
  }
64797
64834
  __name(failureLabel, "failureLabel");
64798
64835
 
64836
+ // ../sdk/dist/tools/coordinator/progress.js
64837
+ function delegationFacts(handle, description) {
64838
+ return {
64839
+ kind: "delegate",
64840
+ description: description.slice(0, 240),
64841
+ childSessionId: handle.childSessionId,
64842
+ childStatus: handle.result?.status === "cancelled" ? "canceled" : handle.result?.status === "failed" ? "failed" : handle.state
64843
+ };
64844
+ }
64845
+ __name(delegationFacts, "delegationFacts");
64846
+ function delegationProgress(context2) {
64847
+ return (event) => {
64848
+ const message = event.type === "tool_executing" ? `Running ${event.toolName}` : event.type === "agent_pending" || event.type === "turn_started" ? "Starting delegated work" : event.type === "message_started" ? "Writing a reply" : void 0;
64849
+ if (message) {
64850
+ context2.report?.(message, void 0, {
64851
+ childSessionId: event.sessionId,
64852
+ childStatus: "running"
64853
+ });
64854
+ }
64855
+ };
64856
+ }
64857
+ __name(delegationProgress, "delegationProgress");
64858
+
64799
64859
  // ../sdk/dist/tools/coordinator/plan-dependencies.js
64800
64860
  function resolvePlanDependencies(steps, idOf) {
64801
64861
  const byDescription = /* @__PURE__ */ new Map();
@@ -65120,6 +65180,7 @@ function buildCoordinatorTools(opts) {
65120
65180
  const listingAdvice = completionInbox ? "To find out whether work finished, wait for the result instead of calling this: a blocking create_task has already returned each worker's output, and a backgrounded one arrives as a task notification. Use it when you need to see what is still running, or to re-read the output of a task whose launch you stopped waiting for." : "A blocking create_task already returns each worker's output, so calling this in a loop to find out whether work finished only spends turns. Nothing announces a completion on this configuration, so this listing and wait_for_task are how you reach the output of a task whose launch you stopped waiting for.";
65121
65181
  const createTask = defineTool({
65122
65182
  name: "create_task",
65183
+ presentCall: /* @__PURE__ */ __name(({ description }) => ({ kind: "generic", label: description.slice(0, 240) }), "presentCall"),
65123
65184
  description: `Launch a task on a specialized agent.${backgroundClause} Available agents: ${agentIds.join(", ")}. Prefer compact assignments; for large context, write/read shared workspace files and pass filenames or references. To launch multiple tasks in parallel, call this tool multiple times in a single assistant turn \u2014 the runtime executes every tool_use block from one response concurrently and delivers all tool_results together, so 'fan out 8 specialists' is one assistant message with 8 create_task blocks. Do not race: until a worker's result reaches you, you know nothing about it \u2014 never fabricate, summarise or predict what it will say, in any form.`,
65124
65185
  inputSchema: external_exports.object({
65125
65186
  agent_id: agentIdEnum.describe("Which agent to run"),
@@ -65194,6 +65255,7 @@ function buildCoordinatorTools(opts) {
65194
65255
  agentId: agent_id,
65195
65256
  prompt,
65196
65257
  workingDirectory: cwd,
65258
+ onEvent: delegationProgress(_context),
65197
65259
  runtimeContext: opts.runtimeContext,
65198
65260
  ...planStepId ? { planStepId } : {},
65199
65261
  ...planId ? { planId } : {},
@@ -65259,6 +65321,7 @@ function buildCoordinatorTools(opts) {
65259
65321
  completionInbox?.expect(handle.taskId);
65260
65322
  return {
65261
65323
  success: true,
65324
+ facts: delegationFacts(handle, description),
65262
65325
  output: `Launched ${agent_id} in the background as task ${handle.taskId}. You are not waiting on it: keep working, and its result will arrive as a task notification. To fetch it yourself, call wait_for_task with this task_id.`,
65263
65326
  data: {
65264
65327
  task_id: handle.taskId,
@@ -65279,6 +65342,7 @@ function buildCoordinatorTools(opts) {
65279
65342
  if (outcome.kind === "timeout") {
65280
65343
  return {
65281
65344
  success: false,
65345
+ facts: delegationFacts(gateway.getTask(handle.taskId) ?? handle, description),
65282
65346
  output: describeWaitTimeout(outcome),
65283
65347
  data: { task_id: handle.taskId, agent_id, timed_out: outcome.cause }
65284
65348
  };
@@ -65296,6 +65360,7 @@ function buildCoordinatorTools(opts) {
65296
65360
  const { resultText, outputText } = delegatedResultText(completed);
65297
65361
  return {
65298
65362
  success: success2,
65363
+ facts: delegationFacts(completed, description),
65299
65364
  // Framed, because a delegated worker is the component MOST
65300
65365
  // likely to have consumed something nobody here wrote. It was
65301
65366
  // handed a task like "read these files and report", it ran
@@ -71822,6 +71887,106 @@ function recordShellCommand(sessionId5, line, dialect = "bash") {
71822
71887
  }
71823
71888
  __name(recordShellCommand, "recordShellCommand");
71824
71889
 
71890
+ // ../sdk/dist/tools/shell-output-window.js
71891
+ var MAX_LINES = 200;
71892
+ var MAX_BYTES = 32 * 1024;
71893
+ function limitOutputLines(lines2, omitted) {
71894
+ const kept = [];
71895
+ let bytes2 = 0;
71896
+ for (let index = lines2.length - 1; index >= Math.max(0, lines2.length - MAX_LINES); index--) {
71897
+ const line = lines2[index] ?? "";
71898
+ const size = Buffer.byteLength(line) + 1;
71899
+ if (bytes2 + size > MAX_BYTES)
71900
+ break;
71901
+ bytes2 += size;
71902
+ kept.push(line);
71903
+ }
71904
+ return { lines: kept.reverse(), omitted: omitted + lines2.length - kept.length };
71905
+ }
71906
+ __name(limitOutputLines, "limitOutputLines");
71907
+ function limitOutputWindow(output2) {
71908
+ return {
71909
+ sequence: output2.sequence,
71910
+ stdout: limitOutputLines(output2.stdout.lines, output2.stdout.omitted),
71911
+ stderr: limitOutputLines(output2.stderr.lines, output2.stderr.omitted)
71912
+ };
71913
+ }
71914
+ __name(limitOutputWindow, "limitOutputWindow");
71915
+ var StreamWindow = class {
71916
+ static {
71917
+ __name(this, "StreamWindow");
71918
+ }
71919
+ partial = "";
71920
+ oversized = false;
71921
+ completed = [];
71922
+ bytes = 0;
71923
+ omitted = 0;
71924
+ append(data2) {
71925
+ let start = 0;
71926
+ for (let end = data2.indexOf("\n"); end >= 0; end = data2.indexOf("\n", start)) {
71927
+ this.appendPartial(data2.slice(start, end));
71928
+ this.completeLine();
71929
+ this.partial = "";
71930
+ this.oversized = false;
71931
+ start = end + 1;
71932
+ }
71933
+ this.appendPartial(data2.slice(start));
71934
+ }
71935
+ completeLine() {
71936
+ const line = this.oversized ? "" : plainTerminalText(this.partial.replace(/\r$/, ""));
71937
+ const bytes2 = this.oversized ? MAX_BYTES + 1 : Buffer.byteLength(line) + 1;
71938
+ if (bytes2 > MAX_BYTES) {
71939
+ this.omitted += this.completed.length + 1;
71940
+ this.completed = [];
71941
+ this.bytes = 0;
71942
+ return;
71943
+ }
71944
+ while (this.completed.length >= MAX_LINES || this.bytes + bytes2 > MAX_BYTES) {
71945
+ const oldest = this.completed.shift();
71946
+ if (!oldest)
71947
+ break;
71948
+ this.bytes -= oldest.bytes;
71949
+ this.omitted++;
71950
+ }
71951
+ this.completed.push({ line, bytes: bytes2 });
71952
+ this.bytes += bytes2;
71953
+ }
71954
+ appendPartial(text12) {
71955
+ if (this.oversized)
71956
+ return;
71957
+ if (this.partial.length + text12.length > MAX_BYTES) {
71958
+ this.partial = "";
71959
+ this.oversized = true;
71960
+ return;
71961
+ }
71962
+ this.partial += text12;
71963
+ }
71964
+ snapshot() {
71965
+ if (this.oversized)
71966
+ return { lines: [], omitted: this.omitted + this.completed.length + 1 };
71967
+ const lines2 = this.completed.map(({ line }) => line);
71968
+ const partial2 = plainTerminalText(this.partial);
71969
+ if (partial2)
71970
+ return limitOutputLines([...lines2, partial2], this.omitted);
71971
+ return { lines: lines2, omitted: this.omitted };
71972
+ }
71973
+ };
71974
+ var ShellOutputWindow = class {
71975
+ static {
71976
+ __name(this, "ShellOutputWindow");
71977
+ }
71978
+ streams = { stdout: new StreamWindow(), stderr: new StreamWindow() };
71979
+ sequence = 0;
71980
+ append(stream, data2) {
71981
+ this.streams[stream].append(data2);
71982
+ return {
71983
+ sequence: ++this.sequence,
71984
+ stdout: this.streams.stdout.snapshot(),
71985
+ stderr: this.streams.stderr.snapshot()
71986
+ };
71987
+ }
71988
+ };
71989
+
71825
71990
  // ../sdk/dist/tools/text-window.js
71826
71991
  var WINDOW_HEAD_LINES = 80;
71827
71992
  var WINDOW_TAIL_LINES = 40;
@@ -72464,9 +72629,9 @@ function shellProgress(report) {
72464
72629
  if (!report)
72465
72630
  return void 0;
72466
72631
  const partial2 = { stdout: "", stderr: "" };
72632
+ const window2 = new ShellOutputWindow();
72467
72633
  let lastMessage = "";
72468
72634
  let outputLines = 0;
72469
- let lastLines = 0;
72470
72635
  return ({ stream, data: data2 }) => {
72471
72636
  let line = partial2[stream];
72472
72637
  let latest = "";
@@ -72482,12 +72647,13 @@ function shellProgress(report) {
72482
72647
  line = appendProgressTail(line, data2, start, data2.length);
72483
72648
  partial2[stream] = line;
72484
72649
  const message = progressLine(line) || latest;
72485
- if (!message || message === lastMessage && outputLines === lastLines)
72650
+ if (message)
72651
+ lastMessage = message;
72652
+ const output2 = window2.append(stream, data2);
72653
+ if (!lastMessage)
72486
72654
  return;
72487
- lastMessage = message;
72488
- lastLines = outputLines;
72489
72655
  try {
72490
- report(message, void 0, { outputLines });
72656
+ report(lastMessage, void 0, { outputLines, output: output2 });
72491
72657
  } catch {
72492
72658
  }
72493
72659
  };
@@ -77713,7 +77879,7 @@ function admitMcpImageBatch(images) {
77713
77879
  __name(admitMcpImageBatch, "admitMcpImageBatch");
77714
77880
 
77715
77881
  // ../sdk/dist/tools/builtins/view-image.js
77716
- var MAX_BYTES = 16 * 1024 * 1024;
77882
+ var MAX_BYTES2 = 16 * 1024 * 1024;
77717
77883
  var READ_CHUNK_BYTES = 1024 * 1024;
77718
77884
  var MAX_EDGE = 16384;
77719
77885
  var MAX_PIXELS2 = 16e6;
@@ -77741,13 +77907,13 @@ async function readBounded(read, signal) {
77741
77907
  let offset2 = 0;
77742
77908
  for (; ; ) {
77743
77909
  signal.throwIfAborted();
77744
- const length2 = Math.min(READ_CHUNK_BYTES, MAX_BYTES + 1 - offset2);
77910
+ const length2 = Math.min(READ_CHUNK_BYTES, MAX_BYTES2 + 1 - offset2);
77745
77911
  const chunk = await read(offset2, length2);
77746
77912
  signal.throwIfAborted();
77747
77913
  if (chunk.length > length2)
77748
77914
  throw new Error("The file backend returned more bytes than the requested bounded range.");
77749
77915
  offset2 += chunk.length;
77750
- if (offset2 > MAX_BYTES)
77916
+ if (offset2 > MAX_BYTES2)
77751
77917
  throw new Error("Image exceeds the 16 MiB inspection limit. Export a smaller image.");
77752
77918
  chunks.push(chunk);
77753
77919
  if (chunk.length < length2)
@@ -77760,11 +77926,11 @@ async function readArtifact(path3, context2) {
77760
77926
  if (context2.sandbox) {
77761
77927
  const bytes2 = await context2.sandbox.readFile(path3, {
77762
77928
  offset: 0,
77763
- length: MAX_BYTES + 1,
77929
+ length: MAX_BYTES2 + 1,
77764
77930
  signal: context2.abortSignal
77765
77931
  });
77766
77932
  context2.abortSignal.throwIfAborted();
77767
- if (bytes2.length > MAX_BYTES)
77933
+ if (bytes2.length > MAX_BYTES2)
77768
77934
  throw new Error("Image exceeds the 16 MiB inspection limit. Export a smaller image.");
77769
77935
  return { path: path3, bytes: bytes2, sandboxed: true };
77770
77936
  }
@@ -77774,7 +77940,7 @@ async function readArtifact(path3, context2) {
77774
77940
  const stat27 = await file2.stat();
77775
77941
  if (!stat27.isFile())
77776
77942
  throw new Error("Image inspection requires a regular file.");
77777
- if (stat27.size > MAX_BYTES)
77943
+ if (stat27.size > MAX_BYTES2)
77778
77944
  throw new Error("Image exceeds the 16 MiB inspection limit. Export a smaller image.");
77779
77945
  const bytes2 = await readBounded(async (offset2, length2) => {
77780
77946
  const buffer = Buffer.allocUnsafe(length2);
@@ -78617,7 +78783,7 @@ function inputLimit(path3, prefix) {
78617
78783
  }
78618
78784
  __name(inputLimit, "inputLimit");
78619
78785
  function mediaLimit(kind) {
78620
- return kind === "image" ? MAX_BYTES : kind === "pdf" ? PDF_MAX_BYTES : NOTEBOOK_MAX_BYTES;
78786
+ return kind === "image" ? MAX_BYTES2 : kind === "pdf" ? PDF_MAX_BYTES : NOTEBOOK_MAX_BYTES;
78621
78787
  }
78622
78788
  __name(mediaLimit, "mediaLimit");
78623
78789
  function mediaFailure(path3, bytes2, message, sandboxed) {
@@ -81516,6 +81682,9 @@ var ToolProgressPublisher = class {
81516
81682
  return;
81517
81683
  this.pending = {
81518
81684
  message,
81685
+ childSessionId: details?.childSessionId,
81686
+ childStatus: details?.childStatus,
81687
+ ...details?.output ? { output: details.output } : {},
81519
81688
  ...fraction !== void 0 ? { fraction: Math.min(1, Math.max(0, fraction)) } : {},
81520
81689
  ...details?.outputLines !== void 0 && Number.isFinite(details.outputLines) ? { outputLines: Math.max(0, Math.floor(details.outputLines)) } : {}
81521
81690
  };
@@ -81546,6 +81715,9 @@ var ToolProgressPublisher = class {
81546
81715
  await this.emitEvent({
81547
81716
  ...this.base,
81548
81717
  message: boundedToolProgress(update2.message),
81718
+ ...update2.childSessionId ? { childSessionId: update2.childSessionId } : {},
81719
+ ...update2.childStatus ? { childStatus: update2.childStatus } : {},
81720
+ ...update2.output ? { output: update2.output } : {},
81549
81721
  ...update2.fraction !== void 0 ? { fraction: update2.fraction } : {},
81550
81722
  ...update2.outputLines !== void 0 ? { outputLines: update2.outputLines } : {}
81551
81723
  }).catch(() => {
@@ -83082,7 +83254,8 @@ var ToolExecutor = class {
83082
83254
  const saved = savedPresentation(input2, this.config.tools.get(name3)?.presentCall?.(input2), void 0);
83083
83255
  return saved ? { savedPresentation: saved } : {};
83084
83256
  }
83085
- if (savedOnly || view?.kind !== "diff") {
83257
+ const liveView = view?.kind === "diff" || view?.kind === "terminal" && view.paneFallback;
83258
+ if (savedOnly || !liveView) {
83086
83259
  const tool = this.config.tools.get(name3);
83087
83260
  const saved = savedPresentation(input2, tool?.presentCall?.(input2), view);
83088
83261
  return saved ? { savedPresentation: saved } : {};
@@ -93705,7 +93878,10 @@ var CheckpointOwnerError = class extends Error {
93705
93878
  name = "CheckpointOwnerError";
93706
93879
  };
93707
93880
  function checkWriteOwner(scope2, checkpoint) {
93708
- const parsed = parseCheckpoint(checkpoint);
93881
+ const parsed = parseCheckpoint({
93882
+ ...checkpoint,
93883
+ tokenUsage: persistedTokenUsage(checkpoint.tokenUsage)
93884
+ });
93709
93885
  if (parsed.sessionId !== scope2.sessionId || parsed.turnId !== scope2.turnId) {
93710
93886
  throw new CheckpointOwnerError(`Checkpoint ${parsed.checkpointId} belongs to session ${parsed.sessionId} turn ${parsed.turnId}; it cannot be written under session ${scope2.sessionId} turn ${scope2.turnId}.`);
93711
93887
  }
@@ -142239,6 +142415,270 @@ function toAcpTaskUpdate(event, sessionId5) {
142239
142415
  }
142240
142416
  __name(toAcpTaskUpdate, "toAcpTaskUpdate");
142241
142417
 
142418
+ // ../sdk/dist/tools/admit-facts.js
142419
+ var FAILURE_REASONS = [
142420
+ "not_found",
142421
+ "permission_denied",
142422
+ "not_a_file",
142423
+ "already_exists",
142424
+ "blocked",
142425
+ "needs_administrator",
142426
+ "unknown_tool",
142427
+ "timed_out",
142428
+ "invalid_input",
142429
+ "not_read",
142430
+ "changed_on_disk",
142431
+ "text_not_found",
142432
+ "not_unique",
142433
+ "invalid_arguments"
142434
+ ];
142435
+ var WRITE_OPERATIONS = ["created", "updated", "unchanged", "wrote"];
142436
+ var MAX_TEXT = 2e3;
142437
+ var MAX_COUNT = Number.MAX_SAFE_INTEGER;
142438
+ function isRecord10(value) {
142439
+ return typeof value === "object" && value !== null && !Array.isArray(value);
142440
+ }
142441
+ __name(isRecord10, "isRecord");
142442
+ function text9(value) {
142443
+ return typeof value === "string" && value.length <= MAX_TEXT ? value : void 0;
142444
+ }
142445
+ __name(text9, "text");
142446
+ function count6(value) {
142447
+ return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 && value <= MAX_COUNT ? value : void 0;
142448
+ }
142449
+ __name(count6, "count");
142450
+ function flag(value) {
142451
+ return value === true ? true : void 0;
142452
+ }
142453
+ __name(flag, "flag");
142454
+ var MAX_ANSWER_TEXT = 2e4;
142455
+ function answerText(value) {
142456
+ return typeof value === "string" && value.length <= MAX_ANSWER_TEXT ? value : void 0;
142457
+ }
142458
+ __name(answerText, "answerText");
142459
+ function ownWords(value) {
142460
+ if (typeof value !== "string")
142461
+ return void 0;
142462
+ return value.length <= MAX_ANSWER_TEXT ? value : `${value.slice(0, MAX_ANSWER_TEXT - 1)}\u2026`;
142463
+ }
142464
+ __name(ownWords, "ownWords");
142465
+ function labels(value) {
142466
+ if (!Array.isArray(value) || value.length > 50)
142467
+ return void 0;
142468
+ const out = [];
142469
+ for (const item of value) {
142470
+ const label6 = answerText(item);
142471
+ if (label6 === void 0)
142472
+ return void 0;
142473
+ out.push(label6);
142474
+ }
142475
+ return out;
142476
+ }
142477
+ __name(labels, "labels");
142478
+ function pick3(entries2) {
142479
+ const out = {};
142480
+ for (const [key6, value] of Object.entries(entries2))
142481
+ if (value !== void 0)
142482
+ out[key6] = value;
142483
+ return out;
142484
+ }
142485
+ __name(pick3, "pick");
142486
+ var MAX_HUNKS = 100;
142487
+ var MAX_HUNK_ROWS = 400;
142488
+ var MAX_ROW_CHARS = 600;
142489
+ function hunks(value) {
142490
+ if (!Array.isArray(value) || value.length > MAX_HUNKS)
142491
+ return void 0;
142492
+ const out = [];
142493
+ let rows = 0;
142494
+ for (const entry of value) {
142495
+ if (!isRecord10(entry) || !Array.isArray(entry.lines))
142496
+ return void 0;
142497
+ const oldStart = count6(entry.oldStart);
142498
+ const oldLines = count6(entry.oldLines);
142499
+ const newStart = count6(entry.newStart);
142500
+ const newLines = count6(entry.newLines);
142501
+ if (oldStart === void 0 || oldLines === void 0 || newStart === void 0 || newLines === void 0)
142502
+ return void 0;
142503
+ rows += entry.lines.length;
142504
+ if (rows > MAX_HUNK_ROWS)
142505
+ return void 0;
142506
+ const lines2 = [];
142507
+ for (const row of entry.lines) {
142508
+ if (typeof row !== "string" || row.length > MAX_ROW_CHARS || !(row.startsWith(" ") || row.startsWith("+") || row.startsWith("-")))
142509
+ return void 0;
142510
+ lines2.push(row);
142511
+ }
142512
+ out.push({ oldStart, oldLines, newStart, newLines, lines: lines2 });
142513
+ }
142514
+ return out.length > 0 ? out : void 0;
142515
+ }
142516
+ __name(hunks, "hunks");
142517
+ function admitToolFacts(value) {
142518
+ if (!isRecord10(value))
142519
+ return void 0;
142520
+ switch (value.kind) {
142521
+ case "delegate": {
142522
+ const id3 = value.childSessionId;
142523
+ const status = value.childStatus;
142524
+ return pick3({
142525
+ kind: "delegate",
142526
+ description: text9(value.description)?.slice(0, 240),
142527
+ childSessionId: isEntityId(id3, "session") ? id3 : void 0,
142528
+ childStatus: status === "pending" || status === "running" || status === "completed" || status === "failed" || status === "canceled" || status === "rejected" || status === "input-required" ? status : void 0
142529
+ });
142530
+ }
142531
+ case "command":
142532
+ return pick3({
142533
+ kind: "command",
142534
+ command: text9(value.command),
142535
+ exitCode: typeof value.exitCode === "number" && Number.isSafeInteger(value.exitCode) ? value.exitCode : void 0,
142536
+ exitNote: text9(value.exitNote),
142537
+ timedOut: flag(value.timedOut),
142538
+ signal: text9(value.signal),
142539
+ binary: isRecord10(value.binary) && count6(value.binary.bytes) !== void 0 ? { bytes: count6(value.binary.bytes) } : void 0,
142540
+ background: flag(value.background),
142541
+ continued: flag(value.continued),
142542
+ jobId: text9(value.jobId),
142543
+ timeLimitMs: count6(value.timeLimitMs)
142544
+ });
142545
+ case "read": {
142546
+ const path3 = text9(value.path);
142547
+ if (path3 === void 0)
142548
+ return void 0;
142549
+ return pick3({
142550
+ kind: "read",
142551
+ path: path3,
142552
+ binary: flag(value.binary),
142553
+ bytes: count6(value.bytes),
142554
+ totalLines: count6(value.totalLines),
142555
+ returnedLines: count6(value.returnedLines),
142556
+ partial: flag(value.partial)
142557
+ });
142558
+ }
142559
+ case "search": {
142560
+ const pattern = text9(value.pattern);
142561
+ if (pattern === void 0)
142562
+ return void 0;
142563
+ return pick3({
142564
+ kind: "search",
142565
+ pattern,
142566
+ path: text9(value.path),
142567
+ matches: count6(value.matches),
142568
+ filesMatched: count6(value.filesMatched),
142569
+ filesSearched: count6(value.filesSearched),
142570
+ truncated: flag(value.truncated)
142571
+ });
142572
+ }
142573
+ case "list": {
142574
+ const pattern = text9(value.pattern);
142575
+ if (pattern === void 0)
142576
+ return void 0;
142577
+ return pick3({
142578
+ kind: "list",
142579
+ pattern,
142580
+ path: text9(value.path),
142581
+ count: count6(value.count),
142582
+ truncated: flag(value.truncated)
142583
+ });
142584
+ }
142585
+ case "edit":
142586
+ return pick3({
142587
+ kind: "edit",
142588
+ path: text9(value.path),
142589
+ replacements: count6(value.replacements),
142590
+ added: count6(value.added),
142591
+ removed: count6(value.removed),
142592
+ hunks: hunks(value.hunks),
142593
+ hunksTruncated: flag(value.hunksTruncated)
142594
+ });
142595
+ case "write": {
142596
+ const path3 = text9(value.path);
142597
+ const operation = WRITE_OPERATIONS.find((candidate) => candidate === value.operation);
142598
+ if (path3 === void 0 || operation === void 0)
142599
+ return void 0;
142600
+ return pick3({
142601
+ kind: "write",
142602
+ path: path3,
142603
+ operation,
142604
+ bytes: count6(value.bytes),
142605
+ added: count6(value.added),
142606
+ removed: count6(value.removed),
142607
+ hunks: hunks(value.hunks),
142608
+ hunksTruncated: flag(value.hunksTruncated)
142609
+ });
142610
+ }
142611
+ case "shared": {
142612
+ if (!Array.isArray(value.files) || value.files.length === 0 || value.files.length > 50)
142613
+ return void 0;
142614
+ const files = [];
142615
+ for (const file2 of value.files) {
142616
+ if (!isRecord10(file2))
142617
+ return void 0;
142618
+ const path3 = text9(file2.path);
142619
+ if (path3 === void 0)
142620
+ return void 0;
142621
+ const bytes2 = count6(file2.bytes);
142622
+ const real = text9(file2.real);
142623
+ files.push({
142624
+ path: path3,
142625
+ ...real === void 0 ? {} : { real },
142626
+ ...bytes2 === void 0 ? {} : { bytes: bytes2 }
142627
+ });
142628
+ }
142629
+ const generated = isRecord10(value.generatedImage) ? text9(value.generatedImage.prompt) : void 0;
142630
+ return pick3({
142631
+ kind: "shared",
142632
+ files,
142633
+ caption: text9(value.caption),
142634
+ generatedImage: generated === void 0 ? void 0 : { prompt: generated }
142635
+ });
142636
+ }
142637
+ case "questions": {
142638
+ const outcome = value.outcome === "discussed" ? "discussed" : value.outcome === "answered" ? "answered" : void 0;
142639
+ if (outcome === void 0 || !Array.isArray(value.questions))
142640
+ return void 0;
142641
+ if (value.questions.length === 0 || value.questions.length > 8)
142642
+ return void 0;
142643
+ const questions = [];
142644
+ for (const entry of value.questions) {
142645
+ if (!isRecord10(entry))
142646
+ return void 0;
142647
+ const question = answerText(entry.question);
142648
+ if (question === void 0 || typeof entry.answered !== "boolean")
142649
+ return void 0;
142650
+ const header2 = answerText(entry.header);
142651
+ const options = labels(entry.options);
142652
+ const picked = labels(entry.picked);
142653
+ const freeText = ownWords(entry.freeText);
142654
+ questions.push({
142655
+ question,
142656
+ ...header2 === void 0 ? {} : { header: header2 },
142657
+ ...options === void 0 ? {} : { options },
142658
+ ...picked === void 0 ? {} : { picked },
142659
+ ...freeText === void 0 ? {} : { freeText },
142660
+ answered: entry.answered
142661
+ });
142662
+ }
142663
+ return { kind: "questions", outcome, questions };
142664
+ }
142665
+ case "failure": {
142666
+ const reason = FAILURE_REASONS.find((candidate) => candidate === value.reason);
142667
+ if (reason === void 0)
142668
+ return void 0;
142669
+ return pick3({
142670
+ kind: "failure",
142671
+ reason,
142672
+ subject: text9(value.subject),
142673
+ note: text9(value.note)
142674
+ });
142675
+ }
142676
+ default:
142677
+ return void 0;
142678
+ }
142679
+ }
142680
+ __name(admitToolFacts, "admitToolFacts");
142681
+
142242
142682
  // ../sdk/dist/bridge/acp/update.js
142243
142683
  var STOP_REASONS = {
142244
142684
  end_turn: "end_turn",
@@ -142337,12 +142777,15 @@ function toAcpSessionUpdate(event, presenter) {
142337
142777
  title: event.toolName,
142338
142778
  status: "pending",
142339
142779
  view: { kind: "generic", label: event.toolName },
142780
+ ...childFields(event),
142340
142781
  progress: {
142341
142782
  message: event.message,
142783
+ ...event.output ? { output: limitOutputWindow(event.output) } : {},
142342
142784
  ...event.fraction === void 0 ? {} : { fraction: event.fraction }
142343
142785
  }
142344
142786
  };
142345
- case "tool_completed":
142787
+ case "tool_completed": {
142788
+ const facts = event.facts?.kind === "delegate" ? admitToolFacts(event.facts) : event.facts;
142346
142789
  return {
142347
142790
  kind: "tool_call",
142348
142791
  toolCallId: event.toolUseId,
@@ -142351,12 +142794,14 @@ function toAcpSessionUpdate(event, presenter) {
142351
142794
  // data. Older producers may only carry text; keep that fallback.
142352
142795
  status: event.isError === true ? "failed" : "completed",
142353
142796
  ...event.durationMs === void 0 ? {} : { durationMs: event.durationMs },
142354
- ...event.facts === void 0 ? {} : { facts: event.facts },
142797
+ ...facts?.kind === "delegate" ? childFields(facts) : {},
142798
+ ...facts === void 0 ? {} : { facts },
142355
142799
  view: event.presentation ?? presenter.presentResult(event.toolName, void 0, {
142356
142800
  success: event.isError !== true,
142357
142801
  output: typeof event.result === "string" ? event.result : String(event.result ?? "")
142358
142802
  })
142359
142803
  };
142804
+ }
142360
142805
  case "hosted_tool": {
142361
142806
  const page = Boolean(event.tool.url && !event.tool.query);
142362
142807
  const title = page ? "Web fetch" : "Web search";
@@ -142412,6 +142857,18 @@ function toAcpSessionUpdate(event, presenter) {
142412
142857
  }
142413
142858
  }
142414
142859
  __name(toAcpSessionUpdate, "toAcpSessionUpdate");
142860
+ function childFields(value) {
142861
+ const facts = admitToolFacts({
142862
+ kind: "delegate",
142863
+ childSessionId: value.childSessionId,
142864
+ childStatus: value.childStatus
142865
+ });
142866
+ return facts?.kind === "delegate" ? {
142867
+ ...facts.childSessionId ? { childSessionId: facts.childSessionId } : {},
142868
+ ...facts.childStatus ? { childStatus: facts.childStatus } : {}
142869
+ } : {};
142870
+ }
142871
+ __name(childFields, "childFields");
142415
142872
 
142416
142873
  // ../sdk/dist/bridge/acp/server.js
142417
142874
  var AcpError = class extends Error {
@@ -142600,7 +143057,8 @@ var ACPServer = class {
142600
143057
  if (message.id !== void 0 && this.pending.has(message.id)) {
142601
143058
  const waiting = this.pending.get(message.id);
142602
143059
  if (message.error) {
142603
- waiting?.reject(new Error(message.error.message));
143060
+ const error62 = new Error(message.error.message);
143061
+ waiting?.reject(message.error.data === void 0 ? error62 : Object.assign(error62, { data: message.error.data }));
142604
143062
  } else {
142605
143063
  waiting?.resolve(message.result);
142606
143064
  }
@@ -143930,7 +144388,7 @@ var WorkspaceBackendRegistry = class {
143930
144388
  // ../sdk/dist/session/workspace/git-worktree.js
143931
144389
  import { execFile as execFile2 } from "node:child_process";
143932
144390
  import { readFileSync as readFileSync10, realpathSync as realpathSync10 } from "node:fs";
143933
- import { realpath as realpath13 } from "node:fs/promises";
144391
+ import { lstat as lstat14, readdir as readdir17, readlink as readlink3, realpath as realpath13 } from "node:fs/promises";
143934
144392
  import { basename as basename17, dirname as dirname26, isAbsolute as isAbsolute22, join as join51, relative as relative11, resolve as resolve28, sep as sep12 } from "node:path";
143935
144393
  import { promisify } from "node:util";
143936
144394
 
@@ -144066,6 +144524,19 @@ __name(defaultWorkspaceHoldsDir, "defaultWorkspaceHoldsDir");
144066
144524
  var execFileAsync = promisify(execFile2);
144067
144525
  var defaultExecFile = /* @__PURE__ */ __name(async (file2, args) => execFileAsync(file2, [...args], file2 === "git" ? { env: hostGitEnv() } : {}), "defaultExecFile");
144068
144526
  var DEFAULT_BRANCH_PREFIX = "namzu";
144527
+ var LinkedCheckoutError = class extends Error {
144528
+ static {
144529
+ __name(this, "LinkedCheckoutError");
144530
+ }
144531
+ repoRoot;
144532
+ found;
144533
+ name = "LinkedCheckoutError";
144534
+ constructor(repoRoot, found) {
144535
+ super(`The checkout ${repoRoot} is not a plain clone: ${found}. Creating a worktree in it would write into the repository it shares its Git directory with. Clone the repository again and work in that clone.`);
144536
+ this.repoRoot = repoRoot;
144537
+ this.found = found;
144538
+ }
144539
+ };
144069
144540
  function isBranchPrefix(value) {
144070
144541
  return /^[A-Za-z0-9_][A-Za-z0-9._-]{0,39}$/.test(value) && !value.endsWith(".") && !value.includes("..") && !value.endsWith(".lock");
144071
144542
  }
@@ -144116,6 +144587,7 @@ var GitWorktreeDriver = class {
144116
144587
  } catch (cause) {
144117
144588
  throw new WorkspaceBackendError({ op: "create:ownership", kind: this.kind, cause });
144118
144589
  }
144590
+ await assertSoleGitDirectory(repoRoot);
144119
144591
  const relativePath = relative11(worktreesDir, worktreePath).split(sep12).join("/");
144120
144592
  const branch = `${this.branchPrefix}/${relativePath}`;
144121
144593
  const argv = ["-C", repoRoot, "worktree", "add", "-b", branch, "--", worktreePath];
@@ -144352,6 +144824,48 @@ var GitWorktreeDriver = class {
144352
144824
  return entry?.branch === `refs/heads/${owned.branch}` ? entry : null;
144353
144825
  }
144354
144826
  };
144827
+ var SHARED_STATE_ENTRIES = /* @__PURE__ */ new Set([
144828
+ "HEAD",
144829
+ "ORIG_HEAD",
144830
+ "FETCH_HEAD",
144831
+ "MERGE_HEAD",
144832
+ "commondir",
144833
+ "config",
144834
+ "logs",
144835
+ "objects",
144836
+ "packed-refs",
144837
+ "refs",
144838
+ "worktrees"
144839
+ ]);
144840
+ async function assertSoleGitDirectory(repoRoot) {
144841
+ const gitDir = join51(repoRoot, ".git");
144842
+ const node2 = await lstat14(gitDir).catch((cause) => {
144843
+ if (cause.code === "ENOENT")
144844
+ return void 0;
144845
+ throw cause;
144846
+ });
144847
+ if (node2 === void 0)
144848
+ return;
144849
+ if (node2.isSymbolicLink()) {
144850
+ const target = await readlink3(gitDir).catch(() => void 0);
144851
+ throw new LinkedCheckoutError(repoRoot, `its .git is a symbolic link${target === void 0 ? "" : ` to ${target}`}, so it uses another checkout's Git directory`);
144852
+ }
144853
+ if (!node2.isDirectory()) {
144854
+ return;
144855
+ }
144856
+ for (const name3 of await readdir17(gitDir)) {
144857
+ const entryPath2 = join51(gitDir, name3);
144858
+ const entry = await lstat14(entryPath2);
144859
+ if (entry.isSymbolicLink() && SHARED_STATE_ENTRIES.has(name3)) {
144860
+ const target = await readlink3(entryPath2).catch(() => void 0);
144861
+ throw new LinkedCheckoutError(repoRoot, `its .git/${name3} is a symbolic link${target === void 0 ? "" : ` to ${target}`}, so Git would write through it into another checkout`);
144862
+ }
144863
+ if (entry.isFile() && entry.nlink > 1) {
144864
+ throw new LinkedCheckoutError(repoRoot, `its .git/${name3} is one of ${entry.nlink} hard links, so another checkout holds the same file`);
144865
+ }
144866
+ }
144867
+ }
144868
+ __name(assertSoleGitDirectory, "assertSoleGitDirectory");
144355
144869
  async function canonicalizeThroughExisting(input2) {
144356
144870
  let existing = resolve28(input2);
144357
144871
  const remainder = [];
@@ -144686,7 +145200,7 @@ __name(upsertBy, "upsertBy");
144686
145200
 
144687
145201
  // ../sdk/dist/session/workspace/hooked-driver.js
144688
145202
  import { createHash as createHash37 } from "node:crypto";
144689
- import { lstat as lstat14, readdir as readdir17, stat as stat17 } from "node:fs/promises";
145203
+ import { lstat as lstat15, readdir as readdir18, stat as stat17 } from "node:fs/promises";
144690
145204
  import { isAbsolute as isAbsolute23, join as join53, resolve as resolve29 } from "node:path";
144691
145205
  function worktreeHookHost(manager, sessionId5) {
144692
145206
  return {
@@ -144724,13 +145238,13 @@ var MAX_FINGERPRINT_ENTRIES = 2e4;
144724
145238
  async function fingerprint(root) {
144725
145239
  const lines2 = [];
144726
145240
  const walk4 = /* @__PURE__ */ __name(async (dir, prefix) => {
144727
- const entries2 = await readdir17(dir, { withFileTypes: true });
145241
+ const entries2 = await readdir18(dir, { withFileTypes: true });
144728
145242
  entries2.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
144729
145243
  for (const entry of entries2) {
144730
145244
  if (lines2.length >= MAX_FINGERPRINT_ENTRIES)
144731
145245
  return false;
144732
145246
  const path3 = join53(dir, entry.name);
144733
- const info = await lstat14(path3);
145247
+ const info = await lstat15(path3);
144734
145248
  lines2.push(`${prefix}${entry.name}:${info.isDirectory() ? "d" : info.size}:${info.mtimeMs}`);
144735
145249
  if (info.isDirectory() && !await walk4(path3, `${prefix}${entry.name}/`))
144736
145250
  return false;
@@ -145650,7 +146164,7 @@ var ArchivalManager = class {
145650
146164
 
145651
146165
  // ../sdk/dist/session/retention/disk-backend.js
145652
146166
  import { randomBytes as randomBytes7 } from "node:crypto";
145653
- import { mkdir as mkdir18, readFile as readFile21, readdir as readdir18 } from "node:fs/promises";
146167
+ import { mkdir as mkdir18, readFile as readFile21, readdir as readdir19 } from "node:fs/promises";
145654
146168
  import { join as join54 } from "node:path";
145655
146169
  var ArchiveNotFoundError = class extends Error {
145656
146170
  static {
@@ -145716,7 +146230,7 @@ var DiskArchiveBackend = class {
145716
146230
  async restore(archiveRef) {
145717
146231
  const dir = join54(this.rootDir, "archive", archiveRef);
145718
146232
  try {
145719
- await readdir18(dir);
146233
+ await readdir19(dir);
145720
146234
  } catch (err) {
145721
146235
  const code = err.code;
145722
146236
  if (code === "ENOENT") {
@@ -147806,21 +148320,21 @@ function sdkVersion() {
147806
148320
  return cachedSdkVersion;
147807
148321
  }
147808
148322
  __name(sdkVersion, "sdkVersion");
147809
- function text9(value) {
148323
+ function text10(value) {
147810
148324
  return value !== void 0 && value.length > 0 ? value : UNKNOWN;
147811
148325
  }
147812
- __name(text9, "text");
148326
+ __name(text10, "text");
147813
148327
  function buildDisclosure(facts, counts, options, generatedAt) {
147814
148328
  let roles = UNKNOWN;
147815
148329
  if (facts?.roles !== void 0) {
147816
148330
  const declared = {};
147817
148331
  for (const [role, who] of Object.entries(facts.roles)) {
147818
- declared[role] = { provider: text9(who.provider), model: text9(who.model) };
148332
+ declared[role] = { provider: text10(who.provider), model: text10(who.model) };
147819
148333
  }
147820
148334
  roles = declared;
147821
148335
  }
147822
148336
  return {
147823
- harnessVersion: text9(options.harnessVersion),
148337
+ harnessVersion: text10(options.harnessVersion),
147824
148338
  sdkVersion: sdkVersion(),
147825
148339
  generatedAt,
147826
148340
  cases: counts.cases,
@@ -147829,9 +148343,9 @@ function buildDisclosure(facts, counts, options, generatedAt) {
147829
148343
  mode: facts?.mode ?? UNKNOWN,
147830
148344
  roles,
147831
148345
  routing: facts?.routing ?? UNKNOWN,
147832
- reasoningEffort: text9(facts?.reasoningEffort),
147833
- suiteVersion: text9(facts?.suiteVersion ?? options.suiteVersion),
147834
- commit: text9(options.commit)
148346
+ reasoningEffort: text10(facts?.reasoningEffort),
148347
+ suiteVersion: text10(facts?.suiteVersion ?? options.suiteVersion),
148348
+ commit: text10(options.commit)
147835
148349
  };
147836
148350
  }
147837
148351
  __name(buildDisclosure, "buildDisclosure");
@@ -148079,10 +148593,10 @@ __name(evalSetting, "evalSetting");
148079
148593
  import { createHash as createHash39 } from "node:crypto";
148080
148594
  var SETTINGS_DIGEST_ALGORITHM = "sha256-canonical-json-1";
148081
148595
  var DEFAULT_SETTINGS_NAME = "default";
148082
- function isRecord10(value) {
148596
+ function isRecord11(value) {
148083
148597
  return typeof value === "object" && value !== null && !Array.isArray(value);
148084
148598
  }
148085
- __name(isRecord10, "isRecord");
148599
+ __name(isRecord11, "isRecord");
148086
148600
  function canonicalJson4(value) {
148087
148601
  if (value === null || typeof value === "string" || typeof value === "boolean") {
148088
148602
  return JSON.stringify(value);
@@ -148100,7 +148614,7 @@ function canonicalJson4(value) {
148100
148614
  return canonicalJson4(item);
148101
148615
  }).join(",")}]`;
148102
148616
  }
148103
- if (isRecord10(value)) {
148617
+ if (isRecord11(value)) {
148104
148618
  const parts = [];
148105
148619
  for (const key6 of Object.keys(value).sort()) {
148106
148620
  const item = value[key6];
@@ -148138,7 +148652,7 @@ function findSecretIn(values, path3 = "") {
148138
148652
  }
148139
148653
  return void 0;
148140
148654
  }
148141
- if (isRecord10(values)) {
148655
+ if (isRecord11(values)) {
148142
148656
  for (const key6 of Object.keys(values).sort()) {
148143
148657
  const here = path3 === "" ? key6 : `${path3}.${key6}`;
148144
148658
  if (SECRET_KEY.test(key6))
@@ -148160,7 +148674,7 @@ function validateSettingsName(name3) {
148160
148674
  __name(validateSettingsName, "validateSettingsName");
148161
148675
  function buildSettingsSnapshot(name3, values = {}) {
148162
148676
  validateSettingsName(name3);
148163
- if (!isRecord10(values))
148677
+ if (!isRecord11(values))
148164
148678
  throw new EvalUsageError("settings must be an object of settings");
148165
148679
  const secret = findSecretIn(values);
148166
148680
  if (secret !== void 0) {
@@ -148184,7 +148698,7 @@ function defaultSettingsSnapshot() {
148184
148698
  }
148185
148699
  __name(defaultSettingsSnapshot, "defaultSettingsSnapshot");
148186
148700
  function leaves(value, path3, into) {
148187
- if (isRecord10(value) && Object.keys(value).length > 0) {
148701
+ if (isRecord11(value) && Object.keys(value).length > 0) {
148188
148702
  for (const key6 of Object.keys(value))
148189
148703
  leaves(value[key6], path3 === "" ? key6 : `${path3}.${key6}`, into);
148190
148704
  return;
@@ -149005,36 +149519,36 @@ __name(formatRunSummary, "formatRunSummary");
149005
149519
 
149006
149520
  // ../sdk/dist/eval/compare.js
149007
149521
  function loadSettings(value) {
149008
- if (!isRecord11(value))
149522
+ if (!isRecord12(value))
149009
149523
  return void 0;
149010
149524
  if (typeof value.name !== "string" || typeof value.digest !== "string")
149011
149525
  return void 0;
149012
149526
  return {
149013
149527
  name: value.name,
149014
149528
  digest: value.digest,
149015
- values: isRecord11(value.values) ? value.values : {},
149529
+ values: isRecord12(value.values) ? value.values : {},
149016
149530
  read: typeof value.read === "boolean" ? value.read : void 0,
149017
149531
  readKeys: Array.isArray(value.readKeys) ? value.readKeys.filter((k) => typeof k === "string") : void 0
149018
149532
  };
149019
149533
  }
149020
149534
  __name(loadSettings, "loadSettings");
149021
149535
  function loadSplit(value) {
149022
- if (!isRecord11(value))
149536
+ if (!isRecord12(value))
149023
149537
  return void 0;
149024
149538
  return SPLIT_FILTERS.includes(value.requested) ? value.requested : void 0;
149025
149539
  }
149026
149540
  __name(loadSplit, "loadSplit");
149027
- function isRecord11(value) {
149541
+ function isRecord12(value) {
149028
149542
  return typeof value === "object" && value !== null && !Array.isArray(value);
149029
149543
  }
149030
- __name(isRecord11, "isRecord");
149544
+ __name(isRecord12, "isRecord");
149031
149545
  function loadEvalReportFile(json3, label6) {
149032
- if (!isRecord11(json3) || !Array.isArray(json3.suites)) {
149546
+ if (!isRecord12(json3) || !Array.isArray(json3.suites)) {
149033
149547
  throw new Error(`${label6} is not an eval report: it has no "suites" list.`);
149034
149548
  }
149035
149549
  const suites = [];
149036
149550
  for (const [index, entry] of json3.suites.entries()) {
149037
- if (!isRecord11(entry) || typeof entry.suite !== "string" || !isRecord11(entry.report)) {
149551
+ if (!isRecord12(entry) || typeof entry.suite !== "string" || !isRecord12(entry.report)) {
149038
149552
  throw new Error(`${label6}: suites[${index}] needs a "suite" id and a "report".`);
149039
149553
  }
149040
149554
  const report = entry.report;
@@ -149043,7 +149557,7 @@ function loadEvalReportFile(json3, label6) {
149043
149557
  }
149044
149558
  const runs = [];
149045
149559
  for (const [caseIndex, run2] of report.cases.entries()) {
149046
- if (!isRecord11(run2) || typeof run2.case !== "string" || !Number.isFinite(run2.mean)) {
149560
+ if (!isRecord12(run2) || typeof run2.case !== "string" || !Number.isFinite(run2.mean)) {
149047
149561
  throw new Error(`${label6}: suite "${entry.suite}", case ${caseIndex} needs a name in "case" and a finite number in "mean".`);
149048
149562
  }
149049
149563
  runs.push(run2);
@@ -149056,7 +149570,7 @@ function loadEvalReportFile(json3, label6) {
149056
149570
  id: entry.suite,
149057
149571
  cases: groupRuns(runs),
149058
149572
  repeats: typeof report.repeats === "number" ? report.repeats : 1,
149059
- facts: isRecord11(report.disclosure) ? report.disclosure : void 0,
149573
+ facts: isRecord12(report.disclosure) ? report.disclosure : void 0,
149060
149574
  settings: loadSettings(report.settings),
149061
149575
  split: loadSplit(report.taskSplit)
149062
149576
  });
@@ -149081,17 +149595,17 @@ function canonical4(value) {
149081
149595
  return null;
149082
149596
  if (typeof value === "string")
149083
149597
  return value;
149084
- return JSON.stringify(value, (_key, v) => isRecord11(v) ? Object.fromEntries(Object.entries(v).sort(([x], [y]) => x < y ? -1 : x > y ? 1 : 0)) : v);
149598
+ return JSON.stringify(value, (_key, v) => isRecord12(v) ? Object.fromEntries(Object.entries(v).sort(([x], [y]) => x < y ? -1 : x > y ? 1 : 0)) : v);
149085
149599
  }
149086
149600
  __name(canonical4, "canonical");
149087
149601
  function rolesFact(value) {
149088
- if (!isRecord11(value))
149602
+ if (!isRecord12(value))
149089
149603
  return null;
149090
149604
  const parts = [];
149091
149605
  for (const role of Object.keys(value).sort()) {
149092
149606
  const who = value[role];
149093
- const provider = isRecord11(who) ? known(who.provider) : null;
149094
- const model = isRecord11(who) ? known(who.model) : null;
149607
+ const provider = isRecord12(who) ? known(who.provider) : null;
149608
+ const model = isRecord12(who) ? known(who.model) : null;
149095
149609
  if (provider === null || model === null)
149096
149610
  return null;
149097
149611
  parts.push(`${role}=${provider}/${model}`);
@@ -150982,7 +151496,7 @@ import { createHash as createHash43, randomUUID as randomUUID10 } from "node:cry
150982
151496
 
150983
151497
  // ../sdk/dist/learning/guidance.js
150984
151498
  import { createHash as createHash42 } from "node:crypto";
150985
- import { readdir as readdir19 } from "node:fs/promises";
151499
+ import { readdir as readdir20 } from "node:fs/promises";
150986
151500
  import { join as join56 } from "node:path";
150987
151501
  import { isDeepStrictEqual as isDeepStrictEqual8 } from "node:util";
150988
151502
  var LearningGuidanceConflictError = class extends Error {
@@ -151082,7 +151596,7 @@ var DiskLearningGuidance = class {
151082
151596
  const earlier2 = new DiskRecordStore(earlierRecordSchema);
151083
151597
  let names;
151084
151598
  try {
151085
- names = await readdir19(join56(from, "revisions"));
151599
+ names = await readdir20(join56(from, "revisions"));
151086
151600
  } catch (error62) {
151087
151601
  if (error62.code === "ENOENT")
151088
151602
  return;
@@ -151938,7 +152452,7 @@ __name(learningExperienceFromCycle, "learningExperienceFromCycle");
151938
152452
 
151939
152453
  // ../sdk/dist/learning/experience.js
151940
152454
  var label3 = external_exports.string().trim().min(1).max(256);
151941
- var text10 = external_exports.string().trim().min(1).max(2e3);
152455
+ var text11 = external_exports.string().trim().min(1).max(2e3);
151942
152456
  var domainLabel = external_exports.string().regex(/^[a-z0-9][a-z0-9_.-]{0,63}$/);
151943
152457
  var LEARNING_EDIT_VERDICTS = [
151944
152458
  "helped",
@@ -151951,7 +152465,7 @@ var editSchema = external_exports.object({
151951
152465
  /** The part of the harness the edit touched, such as `instruction-skill`. */
151952
152466
  surface: label3,
151953
152467
  /** What changed, in a sentence. */
151954
- change: text10,
152468
+ change: text11,
151955
152469
  verdict: external_exports.enum(LEARNING_EDIT_VERDICTS),
151956
152470
  /**
151957
152471
  * True only when this edit was tried alone (an ablation), so its verdict is
@@ -151962,12 +152476,12 @@ var editSchema = external_exports.object({
151962
152476
  });
151963
152477
  var lessonSchema = external_exports.object({
151964
152478
  /** The shape of the situation the lesson applies to, not the incident itself. */
151965
- cue: text10,
151966
- lesson: text10,
152479
+ cue: text11,
152480
+ lesson: text11,
151967
152481
  /** References into the observations, session log or verification receipts. */
151968
152482
  evidence: external_exports.array(learningEvidenceSchema).min(1).max(16),
151969
152483
  confidence: external_exports.enum(LEARNING_CONFIDENCE_LEVELS),
151970
- confidenceReason: text10,
152484
+ confidenceReason: text11,
151971
152485
  /** Indexes into the entry's edits that the lesson rests on. */
151972
152486
  edits: external_exports.array(external_exports.number().int().min(0).max(63)).max(64).optional()
151973
152487
  });
@@ -151976,7 +152490,7 @@ var inputSchema8 = external_exports.object({
151976
152490
  cycleId: external_exports.string().uuid(),
151977
152491
  evaluatorRevision: label3,
151978
152492
  decision: external_exports.enum(["adopted", "rejected"]),
151979
- reason: text10,
152493
+ reason: text11,
151980
152494
  edits: external_exports.array(editSchema).min(1).max(64),
151981
152495
  lessons: external_exports.array(lessonSchema).max(32).optional()
151982
152496
  });
@@ -155730,7 +156244,7 @@ __name(createNetworkStore, "createNetworkStore");
155730
156244
 
155731
156245
  // ../sdk/dist/network/computer.js
155732
156246
  import { createHmac as createHmac4, randomBytes as randomBytes12, timingSafeEqual as timingSafeEqual4 } from "node:crypto";
155733
- import { link as link6, lstat as lstat15, mkdir as mkdir21, open as open18, readFile as readFile23, unlink as unlink15, writeFile as writeFile8 } from "node:fs/promises";
156247
+ import { link as link6, lstat as lstat16, mkdir as mkdir21, open as open18, readFile as readFile23, unlink as unlink15, writeFile as writeFile8 } from "node:fs/promises";
155734
156248
  import { basename as basename20, dirname as dirname32, join as join64, posix as posix7, resolve as resolve35 } from "node:path";
155735
156249
  var COMPUTER_SECRET_FILE = "machine-secret";
155736
156250
  var COMPUTER_SECRET_WINDOWS_PATH_FILE = "machine-secret.windows-path";
@@ -155744,7 +156258,7 @@ var currentUid = /* @__PURE__ */ __name(() => typeof process.getuid === "functio
155744
156258
  async function readComputerSecret(source, options = {}) {
155745
156259
  let info;
155746
156260
  try {
155747
- info = await lstat15(source.path);
156261
+ info = await lstat16(source.path);
155748
156262
  } catch {
155749
156263
  return { status: "absent" };
155750
156264
  }
@@ -155764,7 +156278,7 @@ async function readComputerSecret(source, options = {}) {
155764
156278
  };
155765
156279
  let parent;
155766
156280
  try {
155767
- parent = await lstat15(dirname32(source.path));
156281
+ parent = await lstat16(dirname32(source.path));
155768
156282
  } catch {
155769
156283
  return {
155770
156284
  status: "unsafe",
@@ -155797,7 +156311,7 @@ async function ensureComputerSecret(source, harden = (dir) => hardenPeerRuntimeD
155797
156311
  if (!source.create)
155798
156312
  return "exists";
155799
156313
  try {
155800
- await lstat15(source.path);
156314
+ await lstat16(source.path);
155801
156315
  return "exists";
155802
156316
  } catch {
155803
156317
  }
@@ -164001,260 +164515,6 @@ function createPalActivityCausalityResolver(options) {
164001
164515
  }
164002
164516
  __name(createPalActivityCausalityResolver, "createPalActivityCausalityResolver");
164003
164517
 
164004
- // ../sdk/dist/tools/admit-facts.js
164005
- var FAILURE_REASONS = [
164006
- "not_found",
164007
- "permission_denied",
164008
- "not_a_file",
164009
- "already_exists",
164010
- "blocked",
164011
- "needs_administrator",
164012
- "unknown_tool",
164013
- "timed_out",
164014
- "invalid_input",
164015
- "not_read",
164016
- "changed_on_disk",
164017
- "text_not_found",
164018
- "not_unique",
164019
- "invalid_arguments"
164020
- ];
164021
- var WRITE_OPERATIONS = ["created", "updated", "unchanged", "wrote"];
164022
- var MAX_TEXT = 2e3;
164023
- var MAX_COUNT = Number.MAX_SAFE_INTEGER;
164024
- function isRecord12(value) {
164025
- return typeof value === "object" && value !== null && !Array.isArray(value);
164026
- }
164027
- __name(isRecord12, "isRecord");
164028
- function text11(value) {
164029
- return typeof value === "string" && value.length <= MAX_TEXT ? value : void 0;
164030
- }
164031
- __name(text11, "text");
164032
- function count6(value) {
164033
- return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 && value <= MAX_COUNT ? value : void 0;
164034
- }
164035
- __name(count6, "count");
164036
- function flag(value) {
164037
- return value === true ? true : void 0;
164038
- }
164039
- __name(flag, "flag");
164040
- var MAX_ANSWER_TEXT = 2e4;
164041
- function answerText(value) {
164042
- return typeof value === "string" && value.length <= MAX_ANSWER_TEXT ? value : void 0;
164043
- }
164044
- __name(answerText, "answerText");
164045
- function ownWords(value) {
164046
- if (typeof value !== "string")
164047
- return void 0;
164048
- return value.length <= MAX_ANSWER_TEXT ? value : `${value.slice(0, MAX_ANSWER_TEXT - 1)}\u2026`;
164049
- }
164050
- __name(ownWords, "ownWords");
164051
- function labels(value) {
164052
- if (!Array.isArray(value) || value.length > 50)
164053
- return void 0;
164054
- const out = [];
164055
- for (const item of value) {
164056
- const label6 = answerText(item);
164057
- if (label6 === void 0)
164058
- return void 0;
164059
- out.push(label6);
164060
- }
164061
- return out;
164062
- }
164063
- __name(labels, "labels");
164064
- function pick3(entries2) {
164065
- const out = {};
164066
- for (const [key6, value] of Object.entries(entries2))
164067
- if (value !== void 0)
164068
- out[key6] = value;
164069
- return out;
164070
- }
164071
- __name(pick3, "pick");
164072
- var MAX_HUNKS = 100;
164073
- var MAX_HUNK_ROWS = 400;
164074
- var MAX_ROW_CHARS = 600;
164075
- function hunks(value) {
164076
- if (!Array.isArray(value) || value.length > MAX_HUNKS)
164077
- return void 0;
164078
- const out = [];
164079
- let rows = 0;
164080
- for (const entry of value) {
164081
- if (!isRecord12(entry) || !Array.isArray(entry.lines))
164082
- return void 0;
164083
- const oldStart = count6(entry.oldStart);
164084
- const oldLines = count6(entry.oldLines);
164085
- const newStart = count6(entry.newStart);
164086
- const newLines = count6(entry.newLines);
164087
- if (oldStart === void 0 || oldLines === void 0 || newStart === void 0 || newLines === void 0)
164088
- return void 0;
164089
- rows += entry.lines.length;
164090
- if (rows > MAX_HUNK_ROWS)
164091
- return void 0;
164092
- const lines2 = [];
164093
- for (const row of entry.lines) {
164094
- if (typeof row !== "string" || row.length > MAX_ROW_CHARS || !(row.startsWith(" ") || row.startsWith("+") || row.startsWith("-")))
164095
- return void 0;
164096
- lines2.push(row);
164097
- }
164098
- out.push({ oldStart, oldLines, newStart, newLines, lines: lines2 });
164099
- }
164100
- return out.length > 0 ? out : void 0;
164101
- }
164102
- __name(hunks, "hunks");
164103
- function admitToolFacts(value) {
164104
- if (!isRecord12(value))
164105
- return void 0;
164106
- switch (value.kind) {
164107
- case "command":
164108
- return pick3({
164109
- kind: "command",
164110
- command: text11(value.command),
164111
- exitCode: typeof value.exitCode === "number" && Number.isSafeInteger(value.exitCode) ? value.exitCode : void 0,
164112
- exitNote: text11(value.exitNote),
164113
- timedOut: flag(value.timedOut),
164114
- signal: text11(value.signal),
164115
- binary: isRecord12(value.binary) && count6(value.binary.bytes) !== void 0 ? { bytes: count6(value.binary.bytes) } : void 0,
164116
- background: flag(value.background),
164117
- continued: flag(value.continued),
164118
- jobId: text11(value.jobId),
164119
- timeLimitMs: count6(value.timeLimitMs)
164120
- });
164121
- case "read": {
164122
- const path3 = text11(value.path);
164123
- if (path3 === void 0)
164124
- return void 0;
164125
- return pick3({
164126
- kind: "read",
164127
- path: path3,
164128
- binary: flag(value.binary),
164129
- bytes: count6(value.bytes),
164130
- totalLines: count6(value.totalLines),
164131
- returnedLines: count6(value.returnedLines),
164132
- partial: flag(value.partial)
164133
- });
164134
- }
164135
- case "search": {
164136
- const pattern = text11(value.pattern);
164137
- if (pattern === void 0)
164138
- return void 0;
164139
- return pick3({
164140
- kind: "search",
164141
- pattern,
164142
- path: text11(value.path),
164143
- matches: count6(value.matches),
164144
- filesMatched: count6(value.filesMatched),
164145
- filesSearched: count6(value.filesSearched),
164146
- truncated: flag(value.truncated)
164147
- });
164148
- }
164149
- case "list": {
164150
- const pattern = text11(value.pattern);
164151
- if (pattern === void 0)
164152
- return void 0;
164153
- return pick3({
164154
- kind: "list",
164155
- pattern,
164156
- path: text11(value.path),
164157
- count: count6(value.count),
164158
- truncated: flag(value.truncated)
164159
- });
164160
- }
164161
- case "edit":
164162
- return pick3({
164163
- kind: "edit",
164164
- path: text11(value.path),
164165
- replacements: count6(value.replacements),
164166
- added: count6(value.added),
164167
- removed: count6(value.removed),
164168
- hunks: hunks(value.hunks),
164169
- hunksTruncated: flag(value.hunksTruncated)
164170
- });
164171
- case "write": {
164172
- const path3 = text11(value.path);
164173
- const operation = WRITE_OPERATIONS.find((candidate) => candidate === value.operation);
164174
- if (path3 === void 0 || operation === void 0)
164175
- return void 0;
164176
- return pick3({
164177
- kind: "write",
164178
- path: path3,
164179
- operation,
164180
- bytes: count6(value.bytes),
164181
- added: count6(value.added),
164182
- removed: count6(value.removed),
164183
- hunks: hunks(value.hunks),
164184
- hunksTruncated: flag(value.hunksTruncated)
164185
- });
164186
- }
164187
- case "shared": {
164188
- if (!Array.isArray(value.files) || value.files.length === 0 || value.files.length > 50)
164189
- return void 0;
164190
- const files = [];
164191
- for (const file2 of value.files) {
164192
- if (!isRecord12(file2))
164193
- return void 0;
164194
- const path3 = text11(file2.path);
164195
- if (path3 === void 0)
164196
- return void 0;
164197
- const bytes2 = count6(file2.bytes);
164198
- const real = text11(file2.real);
164199
- files.push({
164200
- path: path3,
164201
- ...real === void 0 ? {} : { real },
164202
- ...bytes2 === void 0 ? {} : { bytes: bytes2 }
164203
- });
164204
- }
164205
- const generated = isRecord12(value.generatedImage) ? text11(value.generatedImage.prompt) : void 0;
164206
- return pick3({
164207
- kind: "shared",
164208
- files,
164209
- caption: text11(value.caption),
164210
- generatedImage: generated === void 0 ? void 0 : { prompt: generated }
164211
- });
164212
- }
164213
- case "questions": {
164214
- const outcome = value.outcome === "discussed" ? "discussed" : value.outcome === "answered" ? "answered" : void 0;
164215
- if (outcome === void 0 || !Array.isArray(value.questions))
164216
- return void 0;
164217
- if (value.questions.length === 0 || value.questions.length > 8)
164218
- return void 0;
164219
- const questions = [];
164220
- for (const entry of value.questions) {
164221
- if (!isRecord12(entry))
164222
- return void 0;
164223
- const question = answerText(entry.question);
164224
- if (question === void 0 || typeof entry.answered !== "boolean")
164225
- return void 0;
164226
- const header2 = answerText(entry.header);
164227
- const options = labels(entry.options);
164228
- const picked = labels(entry.picked);
164229
- const freeText = ownWords(entry.freeText);
164230
- questions.push({
164231
- question,
164232
- ...header2 === void 0 ? {} : { header: header2 },
164233
- ...options === void 0 ? {} : { options },
164234
- ...picked === void 0 ? {} : { picked },
164235
- ...freeText === void 0 ? {} : { freeText },
164236
- answered: entry.answered
164237
- });
164238
- }
164239
- return { kind: "questions", outcome, questions };
164240
- }
164241
- case "failure": {
164242
- const reason = FAILURE_REASONS.find((candidate) => candidate === value.reason);
164243
- if (reason === void 0)
164244
- return void 0;
164245
- return pick3({
164246
- kind: "failure",
164247
- reason,
164248
- subject: text11(value.subject),
164249
- note: text11(value.note)
164250
- });
164251
- }
164252
- default:
164253
- return void 0;
164254
- }
164255
- }
164256
- __name(admitToolFacts, "admitToolFacts");
164257
-
164258
164518
  // ../sdk/dist/tools/builtins/notebook-edit.js
164259
164519
  import { readFile as readFile25 } from "node:fs/promises";
164260
164520
 
@@ -167933,7 +168193,7 @@ function buildRunCodeTool(options = {}) {
167933
168193
  __name(buildRunCodeTool, "buildRunCodeTool");
167934
168194
 
167935
168195
  // ../sdk/dist/tools/builtins/ls.js
167936
- import { readdir as readdir20, stat as stat23 } from "node:fs/promises";
168196
+ import { readdir as readdir21, stat as stat23 } from "node:fs/promises";
167937
168197
  import { join as join75, relative as relative19 } from "node:path";
167938
168198
  var inputSchema19 = external_exports.object({
167939
168199
  path: external_exports.string().default(".").describe("Directory path to list. Defaults to working directory."),
@@ -167953,7 +168213,7 @@ function formatSize2(bytes2) {
167953
168213
  }
167954
168214
  __name(formatSize2, "formatSize");
167955
168215
  async function listDirectory2(dirPath, showHidden) {
167956
- const entries2 = await readdir20(dirPath, { withFileTypes: true });
168216
+ const entries2 = await readdir21(dirPath, { withFileTypes: true });
167957
168217
  const results = [];
167958
168218
  for (const entry of entries2) {
167959
168219
  if (!showHidden && entry.name.startsWith("."))
@@ -168295,6 +168555,7 @@ ${refused2.join("\n")}`] : []
168295
168555
  });
168296
168556
 
168297
168557
  // ../sdk/dist/tools/builtins/computer-use.js
168558
+ import { AsyncLocalStorage as AsyncLocalStorage3 } from "node:async_hooks";
168298
168559
  import { createHash as createHash58 } from "node:crypto";
168299
168560
 
168300
168561
  // ../sdk/dist/tools/builtins/computer-use-coordinates.js
@@ -168491,7 +168752,7 @@ var DEFAULT_SETTLE_MS = 500;
168491
168752
  var DEFAULT_MAX_BATCH_ACTIONS = 20;
168492
168753
  var DEFAULT_MAX_WAIT_MS = 1e4;
168493
168754
  var DEFAULT_WAIT_FOR_MS = 1e4;
168494
- async function settleAfterActions(host, windowId, settleMs, signal) {
168755
+ async function settleAfterActions(host, windowId, settleMs, signal, wait) {
168495
168756
  if (settleMs > 0 && typeof host.settle === "function") {
168496
168757
  try {
168497
168758
  const settled = await host.settle({ budgetMs: settleMs, ...windowId !== void 0 ? { windowId } : {} }, signal);
@@ -168500,7 +168761,7 @@ async function settleAfterActions(host, windowId, settleMs, signal) {
168500
168761
  } catch {
168501
168762
  }
168502
168763
  }
168503
- await sleep(settleMs, signal);
168764
+ await wait(() => sleep(settleMs, signal));
168504
168765
  }
168505
168766
  __name(settleAfterActions, "settleAfterActions");
168506
168767
  var MAX_LISTED_WINDOWS = 50;
@@ -168511,6 +168772,26 @@ var MAX_HELD_UI_REFS = 4e3;
168511
168772
  var ADVICE_MIN_CONFIDENCE = 0.85;
168512
168773
  var ADVICE_MIN_MARGIN = 0.4;
168513
168774
  var MAX_ADVISED_CANDIDATES = 255;
168775
+ function timingTail(elapsedMs, stages, steps) {
168776
+ const totals = { ...stages };
168777
+ for (const step of steps) {
168778
+ for (const stage of Object.keys(step.stages)) {
168779
+ totals[stage] = (totals[stage] ?? 0) + (step.stages[stage] ?? 0);
168780
+ }
168781
+ }
168782
+ const labels2 = {
168783
+ verify_reads: "verify",
168784
+ settle_wait: "settle",
168785
+ ui_snapshot: "tree",
168786
+ capture_encode: "capture",
168787
+ list_windows: "windows",
168788
+ input_delivery: "input",
168789
+ foreground_gate: "foreground"
168790
+ };
168791
+ const detail = Object.keys(totals).sort((a, b) => (totals[b] ?? 0) - (totals[a] ?? 0)).slice(0, 3).map((stage) => `${labels2[stage]} ${((totals[stage] ?? 0) / 1e3).toFixed(1)}`);
168792
+ return `took ${(elapsedMs / 1e3).toFixed(1)}s${detail.length ? ` (${detail.join(", ")})` : ""}`;
168793
+ }
168794
+ __name(timingTail, "timingTail");
168514
168795
  function browserKey(app) {
168515
168796
  return deniedAppKey(app).replace(/\s+/g, "-");
168516
168797
  }
@@ -169590,12 +169871,37 @@ function createComputerUseTool(host, options = {}) {
169590
169871
  return null;
169591
169872
  }, "refusal");
169592
169873
  let callSignal;
169874
+ const timing = new AsyncLocalStorage3();
169875
+ const measure = /* @__PURE__ */ __name(async (stage, run2) => {
169876
+ const store2 = timing.getStore();
169877
+ if (!store2)
169878
+ return run2();
169879
+ const start = performance.now();
169880
+ try {
169881
+ return await run2();
169882
+ } finally {
169883
+ store2.stages[stage] = (store2.stages[stage] ?? 0) + performance.now() - start;
169884
+ }
169885
+ }, "measure");
169886
+ const timeStep = /* @__PURE__ */ __name(async (action, run2) => {
169887
+ const store2 = timing.getStore();
169888
+ if (!store2)
169889
+ return run2();
169890
+ const stages = {};
169891
+ const start = performance.now();
169892
+ try {
169893
+ return await timing.run({ stages, steps: store2.steps }, run2);
169894
+ } finally {
169895
+ store2.steps.push({ action, elapsedMs: performance.now() - start, stages });
169896
+ }
169897
+ }, "timeStep");
169898
+ const settle3 = /* @__PURE__ */ __name((window2, signal) => host.withTiming ? settleAfterActions(host, window2, settings.settleMs, signal, (wait) => measure("settle_wait", wait)) : measure("settle_wait", () => settleAfterActions(host, window2, settings.settleMs, signal, (wait) => wait())), "settle");
169593
169899
  const capture = /* @__PURE__ */ __name(async (windowId) => {
169594
169900
  if (windowId !== void 0) {
169595
169901
  if (!windowCaptureAvailable(host, caps))
169596
169902
  throw new StepFailure("this host cannot capture a named window; no desktop screenshot was taken");
169597
169903
  const shot2 = await host.captureWindow(windowId, callSignal);
169598
- const image2 = await fitPng(shot2.data, settings.limits());
169904
+ const image2 = await measure("capture_encode", () => fitPng(shot2.data, settings.limits()));
169599
169905
  if (image2.sourceWidth !== shot2.width || image2.sourceHeight !== shot2.height)
169600
169906
  throw new StepFailure("the window PNG dimensions changed during capture; take a new screenshot");
169601
169907
  const frame2 = frames.recordWindow(image2, shot2);
@@ -169608,7 +169914,7 @@ function createComputerUseTool(host, options = {}) {
169608
169914
  if (result.type !== "screenshot")
169609
169915
  throw new Error(`computer_use: the host answered a screenshot with "${result.type}"`);
169610
169916
  const shot = result.result;
169611
- const image = await fitPng(shot.data, settings.limits());
169917
+ const image = await measure("capture_encode", () => fitPng(shot.data, settings.limits()));
169612
169918
  const display = shot.display ?? assumedDisplay(image.sourceWidth, image.sourceHeight);
169613
169919
  const frame = frames.record(image, display);
169614
169920
  noteDigest(frame, image);
@@ -170389,7 +170695,7 @@ ${treeText.text}`
170389
170695
  fitted = await cropAndFitPng(frame.window.data, rect, settings.limits());
170390
170696
  } else if (caps.regionCapture === true && typeof host.captureRegion === "function") {
170391
170697
  const piece = await host.captureRegion(rect, callSignal);
170392
- fitted = await fitPng(piece.data, settings.limits());
170698
+ fitted = await measure("capture_encode", () => fitPng(piece.data, settings.limits()));
170393
170699
  } else {
170394
170700
  const result = await host.execute({ type: "screenshot" }, callSignal);
170395
170701
  if (result.type !== "screenshot")
@@ -170493,6 +170799,26 @@ ${treeText.text}`
170493
170799
  break;
170494
170800
  }
170495
170801
  try {
170802
+ await timeStep(step.item.type, runStep);
170803
+ } catch (error62) {
170804
+ const unknown2 = error62 instanceof StepFailure ? error62.unknown : void 0;
170805
+ const delivery2 = error62 instanceof StepFailure ? error62.delivery : void 0;
170806
+ const retrySafety = error62 instanceof StepFailure ? error62.retrySafety : void 0;
170807
+ const message = signal?.aborted ? "cancelled" : errorText2(error62);
170808
+ failure4 = { index, error: message, ...unknown2 ? { unknown: unknown2 } : {} };
170809
+ records4.push({
170810
+ label: step.label,
170811
+ status: "failed",
170812
+ error: message,
170813
+ ...unknown2 ? { unknown: unknown2 } : {},
170814
+ ...delivery2 ? { delivery: delivery2 } : {},
170815
+ ...retrySafety ? { retrySafety } : {}
170816
+ });
170817
+ if (delivery2 === "delivered_unverified" || unknown2)
170818
+ changed = true;
170819
+ break;
170820
+ }
170821
+ async function runStep() {
170496
170822
  const keyboard = step.item.type === "type_text" || step.item.type === "key";
170497
170823
  if (keyboard && !actionFrame?.window && !frontChecked) {
170498
170824
  await refuseTerminalInFront();
@@ -170513,26 +170839,8 @@ ${treeText.text}`
170513
170839
  records4.push({ label: step.label, status: "done", ...outcome });
170514
170840
  if (step.mutating)
170515
170841
  changed = true;
170516
- } catch (error62) {
170517
- const unknown2 = error62 instanceof StepFailure ? error62.unknown : void 0;
170518
- const delivery2 = error62 instanceof StepFailure ? error62.delivery : void 0;
170519
- const retrySafety = error62 instanceof StepFailure ? error62.retrySafety : void 0;
170520
- const message = signal?.aborted ? "cancelled" : errorText2(error62);
170521
- failure4 = { index, error: message, ...unknown2 ? { unknown: unknown2 } : {} };
170522
- records4.push({
170523
- label: step.label,
170524
- status: "failed",
170525
- error: message,
170526
- ...unknown2 ? { unknown: unknown2 } : {},
170527
- ...delivery2 ? { delivery: delivery2 } : {},
170528
- ...retrySafety ? { retrySafety } : {}
170529
- });
170530
- if (delivery2 === "delivered_unverified")
170531
- changed = true;
170532
- if (unknown2)
170533
- changed = true;
170534
- break;
170535
170842
  }
170843
+ __name(runStep, "runStep");
170536
170844
  }
170537
170845
  for (const step of planned.slice(records4.length))
170538
170846
  records4.push({ label: step.label, status: "not run" });
@@ -170544,7 +170852,7 @@ ${treeText.text}`
170544
170852
  if (unsent.length > 0 && !failure4 && !signal?.aborted) {
170545
170853
  try {
170546
170854
  if (changed)
170547
- await settleAfterActions(host, void 0, settings.settleMs, signal);
170855
+ await settle3(void 0, signal);
170548
170856
  frameShot = await capture();
170549
170857
  const before = single ? "" : planned.length === 0 ? " Nothing in the batch ran." : ` Actions 1-${planned.length} ran; action ${planned.length + 1}${unsent.length > 1 ? " and the ones after it" : ""} did not.`;
170550
170858
  framePrelude = `No screenshot had been taken yet, so nothing was clicked or typed: the ${single ? "action" : "input"} was not sent.${before} The display screenshot follows (${frameShot.frame.id}, ${frameShot.frame.imageWidth}x${frameShot.frame.imageHeight}); choose the target on it and send the action again.`;
@@ -170580,7 +170888,7 @@ ${treeText.text}`
170580
170888
  }, "isGone");
170581
170889
  if (treeEnding && postWindowId !== void 0) {
170582
170890
  try {
170583
- await settleAfterActions(host, postWindowId, settings.settleMs, signal);
170891
+ await settle3(postWindowId, signal);
170584
170892
  const read = await uiSnapshot({
170585
170893
  type: "ui_snapshot",
170586
170894
  window_id: postWindowId
@@ -170604,7 +170912,7 @@ ${treeText.text}`
170604
170912
  }
170605
170913
  if (looks && treeText === void 0 && windowClosed === void 0) {
170606
170914
  try {
170607
- await settleAfterActions(host, postWindowId, settings.settleMs, signal);
170915
+ await settle3(postWindowId, signal);
170608
170916
  shot = await capture(postWindowId);
170609
170917
  } catch (error62) {
170610
170918
  shotError = signal?.aborted ? "cancelled" : errorText2(error62);
@@ -170961,13 +171269,13 @@ ${wrapUntrusted({
170961
171269
  try {
170962
171270
  switch (input2.type) {
170963
171271
  case "screenshot":
170964
- return await firstLookWithTree(await capture(input2.window_id), input2.window_id);
171272
+ return await timeStep(input2.type, async () => firstLookWithTree(await capture(input2.window_id), input2.window_id));
170965
171273
  case "zoom":
170966
- return await zoom(input2);
171274
+ return await timeStep(input2.type, () => zoom(input2));
170967
171275
  case "ui_snapshot":
170968
- return await uiSnapshot(input2);
171276
+ return await timeStep(input2.type, () => uiSnapshot(input2));
170969
171277
  case "wait_for":
170970
- return await waitFor(input2, context2);
171278
+ return await timeStep(input2.type, () => waitFor(input2, context2));
170971
171279
  case "batch":
170972
171280
  return await runSteps(input2.actions, input2.screenshot_id, context2, false);
170973
171281
  default: {
@@ -171009,35 +171317,79 @@ ${wrapUntrusted({
171009
171317
  // "done" — and the screenshot that followed it, which is for the model —
171010
171318
  // adds nothing to the call row; observations, batches and failures do.
171011
171319
  presentResult: /* @__PURE__ */ __name((_input, result) => {
171012
- const first = isRecord14(result.data) ? result.data.firstUseOf : void 0;
171320
+ const data2 = isRecord14(result.data) ? result.data : void 0;
171321
+ const first = data2?.firstUseOf;
171322
+ const tail = typeof data2?.timingTail === "string" ? data2.timingTail : void 0;
171013
171323
  if (result.success && typeof first === "string")
171014
171324
  return {
171015
171325
  kind: "generic",
171016
- label: `Using ${applicationName(first)}`,
171326
+ label: `Using ${applicationName(first)}${tail ? ` \xB7 ${tail}` : ""}`,
171017
171327
  presentation: "activity"
171018
171328
  };
171329
+ if (tail)
171330
+ return {
171331
+ kind: "terminal",
171332
+ output: [result.success ? result.output : result.error ?? result.output, tail].filter(Boolean).join("\n")
171333
+ };
171019
171334
  return result.success && ACKNOWLEDGEMENT.test(result.output) ? { kind: "generic", label: result.output, visibility: "hidden" } : void 0;
171020
171335
  }, "presentResult"),
171021
171336
  async execute(input2, context2) {
171022
- const keptOut = await deniedAppRefusal(input2, context2);
171023
- if (keptOut)
171024
- return { success: false, output: "", error: keptOut };
171025
- const tiered = await appTierRefusal(input2, context2);
171026
- if (tiered)
171027
- return { success: false, output: "", error: tiered };
171028
- const shotId = "screenshot_id" in input2 ? input2.screenshot_id : void 0;
171029
- const before = shotId ? frames.get(shotId) : frames.latest();
171030
- const app = appKnown(input2);
171031
- const result = await runAction(input2, context2);
171032
- if (app && result.success !== false && !appsUsed.has(app) && !isReadOnlyInput(input2)) {
171033
- appsUsed.add(app);
171337
+ const show = typeof options.timings === "function" ? options.timings() : options.timings !== false;
171338
+ if (!options.onTiming && (!show || !host.withTiming))
171339
+ return execute();
171340
+ const stages = {};
171341
+ const steps = [];
171342
+ const start = performance.now();
171343
+ let elapsedMs;
171344
+ let result;
171345
+ try {
171346
+ result = await timing.run({ stages, steps }, () => host.withTiming?.((stage, ms) => {
171347
+ const current2 = timing.getStore()?.stages;
171348
+ if (current2)
171349
+ current2[stage] = (current2[stage] ?? 0) + ms;
171350
+ }, execute) ?? execute());
171351
+ } finally {
171352
+ elapsedMs = performance.now() - start;
171353
+ const record5 = { app: appKnown(input2), elapsedMs, stages, steps };
171354
+ try {
171355
+ await options.onTiming?.({
171356
+ ...record5.app ? { app: record5.app } : {},
171357
+ elapsedMs,
171358
+ stages,
171359
+ steps
171360
+ }, context2);
171361
+ } catch {
171362
+ }
171363
+ }
171364
+ if (show) {
171034
171365
  result.data = {
171035
171366
  ...isRecord14(result.data) ? result.data : {},
171036
- firstUseOf: app
171367
+ timingTail: timingTail(elapsedMs, stages, steps)
171037
171368
  };
171038
171369
  }
171039
- await observe(input2, before, result, context2.toolUseId, app);
171040
171370
  return result;
171371
+ async function execute() {
171372
+ const keptOut = await deniedAppRefusal(input2, context2);
171373
+ if (keptOut)
171374
+ return { success: false, output: "", error: keptOut };
171375
+ const tiered = await appTierRefusal(input2, context2);
171376
+ if (tiered)
171377
+ return { success: false, output: "", error: tiered };
171378
+ const shotId = "screenshot_id" in input2 ? input2.screenshot_id : void 0;
171379
+ const before = shotId ? frames.get(shotId) : frames.latest();
171380
+ const app = appKnown(input2);
171381
+ const result2 = await runAction(input2, context2);
171382
+ if (app && result2.success !== false && !appsUsed.has(app) && !isReadOnlyInput(input2)) {
171383
+ appsUsed.add(app);
171384
+ result2.data = {
171385
+ ...isRecord14(result2.data) ? result2.data : {},
171386
+ firstUseOf: app
171387
+ };
171388
+ }
171389
+ await observe(input2, before, result2, context2.toolUseId, app);
171390
+ return result2;
171391
+ }
171392
+ __name(execute, "execute");
171041
171393
  }
171042
171394
  });
171043
171395
  const browserQuestionPending = /* @__PURE__ */ __name((app) => appTier(app) === "view" && readBrowserSetting() === "ask" && options.askBrowserWindow !== void 0 && !browserGranted.has(browserKey(app)), "browserQuestionPending");
@@ -172457,7 +172809,10 @@ function renderResult(host, result) {
172457
172809
  else if (result.page && !result.screenshot)
172458
172810
  parts.push(formatBrowserPageHeader(result.page));
172459
172811
  const page = result.snapshot?.page ?? result.screenshot?.page ?? result.value?.page ?? result.page;
172460
- const data2 = page ? { page: { origin: headerOrigin(page), url: page.url, tab: page.tab } } : {};
172812
+ const data2 = {
172813
+ ...page ? { page: { origin: headerOrigin(page), url: page.url, tab: page.tab } } : {},
172814
+ ...result.paneFallback ? { paneFallback: result.paneFallback } : {}
172815
+ };
172461
172816
  if (result.screenshot) {
172462
172817
  const shot = result.screenshot;
172463
172818
  const header2 = formatBrowserPageHeader(shot.page);
@@ -172480,6 +172835,14 @@ function renderResult(host, result) {
172480
172835
  return { success: true, output: parts.join("\n") || "Done.", data: data2 };
172481
172836
  }
172482
172837
  __name(renderResult, "renderResult");
172838
+ function presentPaneFallback(_input, result) {
172839
+ const fallback = result.data?.paneFallback;
172840
+ if (fallback) {
172841
+ return { kind: "terminal", output: result.output, paneFallback: fallback };
172842
+ }
172843
+ return void 0;
172844
+ }
172845
+ __name(presentPaneFallback, "presentPaneFallback");
172483
172846
  function nonEmpty2(value) {
172484
172847
  return typeof value === "string" && value.length > 0;
172485
172848
  }
@@ -172524,7 +172887,7 @@ function hostErrorToResult(tool, error62) {
172524
172887
  case "browser_origin_mismatch":
172525
172888
  return refusal3(`${tool}: refused \u2014 the page is at ${error62.actual || "an unknown origin"}, not ${error62.expected}. Nothing was done. Take a snapshot and act on the page it shows.`, { code: error62.code, expected: error62.expected, actual: error62.actual });
172526
172889
  case "browser_stale_ref":
172527
- return refusal3(`${tool}: element ${error62.ref} is not on the page any more (it came from an older snapshot). Nothing was done. Take a new snapshot and use a ref from it.`, { code: error62.code, ref: error62.ref });
172890
+ return refusal3(`${tool}: element ${error62.ref} no longer matches the older snapshot of this tab. Nothing was done. Take a new snapshot and use a ref from it.`, { code: error62.code, ref: error62.ref });
172528
172891
  case "browser_human_required": {
172529
172892
  const what = HUMAN_REASON_WORDS[error62.reason] ?? "something only a person can do";
172530
172893
  const how = error62.loginCommand ? ` The user can ${error62.reason === "http-auth" ? "check access" : "sign in"} with: ${oneLine7(error62.loginCommand, 300)}` : "";
@@ -172707,7 +173070,7 @@ function actDescription(caps) {
172707
173070
  return [
172708
173071
  "Changes the page in the web browser: click, type, fill_form, select, press, hover, upload, dialog (accept or dismiss a page alert, confirm or prompt; a prompt takes promptText, never a password or code). Act by ref from the latest snapshot of the browser tool. When an element has no ref (a menu that opens on hover, a control the snapshot leaves out), click and hover also take its visible text, or its role with its accessible name; they refuse and list the candidates when none or several match. A click or hover on a large container lands on the container's own text or its first control, not its middle.",
172709
173072
  "press takes a key; without ref it sends Escape, Enter, Tab, Shift+Tab, PageDown, PageUp, Home, End or Space to the focused element, and refuses when that is a password or code field. type can send real key presses (keys), keep the existing text (append) or clear first (clear).",
172710
- 'Every call must carry origin, copied from the snapshot header ("Page: <origin> \u2014 \u2026"); if the page is no longer on that origin nothing is done. A stale ref is refused the same way: take a new snapshot.',
173073
+ 'Every call must carry origin, copied from the snapshot header ("Page: <origin> \u2014 \u2026"); if the page is no longer on that origin nothing is done. A ref is refused if the tab or page changed, or if the ref no longer names the same role and accessible name. Take a new snapshot before trying again.',
172711
173074
  'Every result starts with "Effect:", what the action did to the page (lines that appeared or went, an address change, or "no visible change"). Read it before the next call: "no visible change" means nothing happened, so do not repeat the same call; look at the page or choose a different element. Set snapshot: true to get the whole page back after the action. Leave passwords and one-time codes to the person, because a model that holds a credential can be steered into leaking it; if the page needs a person, stop and tell the user.',
172712
173075
  'Example, filling two fields: {"action":"fill_form","origin":"https://example.com","fields":[{"ref":"e12","value":"<text>"},{"ref":"e14","value":"<text>"}]}.',
172713
173076
  ...unavailableLine(caps)
@@ -172785,6 +173148,7 @@ function createBrowserTools(host, options = {}) {
172785
173148
  // A page is looked at to be acted on, and an action is read back by
172786
173149
  // looking: the two load in one search.
172787
173150
  loadsWith: [BROWSER_ACT_TOOL_NAME],
173151
+ presentResult: presentPaneFallback,
172788
173152
  presentCall: /* @__PURE__ */ __name((input2) => ({
172789
173153
  kind: "generic",
172790
173154
  label: observeLabel(host, input2),
@@ -172824,6 +173188,7 @@ function createBrowserTools(host, options = {}) {
172824
173188
  concurrencySafe: false,
172825
173189
  pathArgument: "path",
172826
173190
  loadsWith: [BROWSER_TOOL_NAME],
173191
+ presentResult: presentPaneFallback,
172827
173192
  presentCall: /* @__PURE__ */ __name((input2) => ({
172828
173193
  kind: "generic",
172829
173194
  label: actLabel(host, input2),
@@ -173336,6 +173701,7 @@ function buildAgentTool(opts) {
173336
173701
  const subagentTypeEnum = external_exports.enum(agentIds);
173337
173702
  return defineTool({
173338
173703
  name: "Agent",
173704
+ presentCall: /* @__PURE__ */ __name(({ description }) => ({ kind: "generic", label: description.slice(0, 240) }), "presentCall"),
173339
173705
  description: `Delegate a task to a specialized subagent. BLOCKING: returns when the subagent has finished, with the subagent's final text as the tool result. The subagent runs in its own context window and cannot see your conversation \u2014 include all necessary context in the prompt. Available subagents: ${agentIds.join(", ")}. To run multiple subagents in parallel, call this tool multiple times in a single response.`,
173340
173706
  inputSchema: external_exports.object({
173341
173707
  description: external_exports.string().describe("Short label for tracking (shown to the user)"),
@@ -173386,6 +173752,7 @@ function buildAgentTool(opts) {
173386
173752
  agentId,
173387
173753
  prompt,
173388
173754
  workingDirectory: cwd,
173755
+ onEvent: delegationProgress(context2),
173389
173756
  runtimeContext: opts.runtimeContext,
173390
173757
  // Hang the child off the executing tool's span, so the
173391
173758
  // delegation appears inside the turn that asked for it rather
@@ -173426,6 +173793,7 @@ function buildAgentTool(opts) {
173426
173793
  }), "onCreated")
173427
173794
  });
173428
173795
  const succeeded = taskSucceeded(completed);
173796
+ const facts = delegationFacts(completed, description);
173429
173797
  const structured = completed.result?.structuredOutput;
173430
173798
  const resultText = structured !== void 0 ? typeof structured === "string" ? structured : JSON.stringify(structured) : typeof completed.result?.result === "string" ? completed.result.result : completed.result?.result !== void 0 ? JSON.stringify(completed.result.result) : "";
173431
173799
  const outcome = completed.result?.outcome;
@@ -173435,6 +173803,7 @@ function buildAgentTool(opts) {
173435
173803
  return {
173436
173804
  success: false,
173437
173805
  output: "",
173806
+ facts,
173438
173807
  error: `Subagent ${agentId} ${failureLabel(completed)}: ${detail}${recordLine ? `
173439
173808
  ${recordLine}` : ""}`,
173440
173809
  data: {
@@ -173449,6 +173818,7 @@ ${recordLine}` : ""}`,
173449
173818
  }
173450
173819
  return {
173451
173820
  success: true,
173821
+ facts,
173452
173822
  output: `${wrapUntrusted({
173453
173823
  kind: "agent-result",
173454
173824
  attributes: { agent: agentId, task: handle.taskId },
@@ -176245,6 +176615,7 @@ export {
176245
176615
  A2ADelegate,
176246
176616
  mapSessionEventToStreamEvent,
176247
176617
  mapSessionToStreamEvent,
176618
+ admitToolFacts,
176248
176619
  toAcpStopReason,
176249
176620
  toAcpSessionUpdate,
176250
176621
  ACPServer,
@@ -176272,6 +176643,7 @@ export {
176272
176643
  WorkspaceInUseError,
176273
176644
  DiskWorkspaceHoldStore,
176274
176645
  defaultWorkspaceHoldsDir,
176646
+ LinkedCheckoutError,
176275
176647
  GitWorktreeDriver,
176276
176648
  parseWorktreeList,
176277
176649
  defaultWorktreesDir,
@@ -176599,7 +176971,6 @@ export {
176599
176971
  publishPalActivityOnce,
176600
176972
  PalActivityCausalityUnavailableError,
176601
176973
  createPalActivityCausalityResolver,
176602
- admitToolFacts,
176603
176974
  NotebookEditTool,
176604
176975
  GlobTool,
176605
176976
  CODE_ANALYSIS_TOOL_NAME,
@@ -176698,4 +177069,4 @@ export {
176698
177069
  WakeBudget,
176699
177070
  wakeBudgetFromEnv
176700
177071
  };
176701
- //# sourceMappingURL=chunk-JEPSIERS.js.map
177072
+ //# sourceMappingURL=chunk-KHWLA26J.js.map