@namzu/cli 41.2.0 → 41.2.1

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 (251) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-PBJTGQHA.js → acp-MCDCWJ45.js} +39 -39
  4. package/dist/chunks/{activity-command-JFBLFZSJ.js → activity-command-AYLW5EEX.js} +12 -12
  5. package/dist/chunks/{add-MSMS6QMP.js → add-VNM5QPTX.js} +15 -15
  6. package/dist/chunks/{agent-OEXJQTAS.js → agent-4IMOBJR5.js} +30 -30
  7. package/dist/chunks/agent-session-44AYNTQJ.js +59 -0
  8. package/dist/chunks/{archive-Z4MSUTUS.js → archive-VXJWPZBA.js} +10 -10
  9. package/dist/chunks/{bin-main-3NKAMTSR.js → bin-main-BMCDNDGC.js} +3 -3
  10. package/dist/chunks/{browser-Q7CAR3HM.js → browser-7MVCQL2G.js} +6 -6
  11. package/dist/chunks/{chat-Z5AJZSH6.js → chat-M2WFCRYV.js} +15 -15
  12. package/dist/chunks/{chunk-6C4J5CIK.js → chunk-2LLNCAZS.js} +2 -2
  13. package/dist/chunks/{chunk-ERRNULJ3.js → chunk-2Q6PBTPY.js} +2 -2
  14. package/dist/chunks/{chunk-5IUMQ3HV.js → chunk-3ZMECJLN.js} +13 -13
  15. package/dist/chunks/{chunk-R4KW67FB.js → chunk-4I5FGMVR.js} +2 -2
  16. package/dist/chunks/{chunk-F3MJOWFD.js → chunk-5L7ZQ37R.js} +6 -6
  17. package/dist/chunks/{chunk-ETQIZ5KN.js → chunk-5LGZUFDJ.js} +3 -3
  18. package/dist/chunks/{chunk-H56UWANP.js → chunk-5XWYY63Z.js} +4 -4
  19. package/dist/chunks/{chunk-WJG5O4KK.js → chunk-6FSVNUBA.js} +307 -213
  20. package/dist/chunks/chunk-6FSVNUBA.js.map +6 -0
  21. package/dist/chunks/{chunk-LURD5LEU.js → chunk-7A5TVBGS.js} +2 -2
  22. package/dist/chunks/{chunk-EBM72A56.js → chunk-7RBZS3TN.js} +4 -4
  23. package/dist/chunks/{chunk-GMAVUBKY.js → chunk-AGRFKHS2.js} +4 -4
  24. package/dist/chunks/{chunk-SFOKT7BD.js → chunk-AVSE45ED.js} +4 -4
  25. package/dist/chunks/{chunk-N6YMEARB.js → chunk-AYCKJIVD.js} +2 -2
  26. package/dist/chunks/{chunk-NWNJO347.js → chunk-C4CVM56Z.js} +4 -4
  27. package/dist/chunks/{chunk-IN62T4C7.js → chunk-CN6EFAK5.js} +2 -2
  28. package/dist/chunks/{chunk-NN67WN5F.js → chunk-DAJBZ4B7.js} +2 -2
  29. package/dist/chunks/{chunk-56M5MQ4J.js → chunk-DAUWDTZI.js} +2 -2
  30. package/dist/chunks/{chunk-5UQSACPK.js → chunk-DTNJTMWP.js} +80 -26
  31. package/dist/chunks/chunk-DTNJTMWP.js.map +6 -0
  32. package/dist/chunks/{chunk-R3REKFM3.js → chunk-DVRRRNSA.js} +8 -8
  33. package/dist/chunks/{chunk-NJGAXOWJ.js → chunk-EYBTANG5.js} +6 -6
  34. package/dist/chunks/{chunk-ZA6AX5U4.js → chunk-F2UUHEPY.js} +2 -2
  35. package/dist/chunks/{chunk-NQSQZ2UV.js → chunk-G7JH3PMC.js} +2 -2
  36. package/dist/chunks/{chunk-CEBLRMD4.js → chunk-GD6LOX4A.js} +13 -13
  37. package/dist/chunks/{chunk-7MYFM63X.js → chunk-H3ALHXFV.js} +12 -12
  38. package/dist/chunks/{chunk-I7T3E2GZ.js → chunk-HV7PRPHJ.js} +7 -7
  39. package/dist/chunks/{chunk-YUCU537D.js → chunk-HWAPKOAW.js} +4 -4
  40. package/dist/chunks/{chunk-VMF3FBAG.js → chunk-IBCA2WDM.js} +3 -3
  41. package/dist/chunks/{chunk-XI4FSVO4.js → chunk-IBUFD2HH.js} +2 -2
  42. package/dist/chunks/{chunk-LXGJMPVM.js → chunk-IMFIQJM6.js} +3 -3
  43. package/dist/chunks/{chunk-3UXYK42Z.js → chunk-IQBKDY6G.js} +3 -3
  44. package/dist/chunks/{chunk-DNW5R5BJ.js → chunk-KDZ6GM2A.js} +2 -2
  45. package/dist/chunks/{chunk-LJQKALFW.js → chunk-KEKFOEEP.js} +2 -2
  46. package/dist/chunks/{chunk-FGLIZTK4.js → chunk-KGKRKFB7.js} +2 -2
  47. package/dist/chunks/{chunk-KJBANDDG.js → chunk-KTF5NW2V.js} +8 -8
  48. package/dist/chunks/{chunk-ZNSLNHYH.js → chunk-L2MEW4AZ.js} +2 -2
  49. package/dist/chunks/{chunk-3D6A3HLM.js → chunk-LETTT4ZZ.js} +2 -2
  50. package/dist/chunks/{chunk-M2DUJ2ET.js → chunk-LRDLJTYP.js} +9 -9
  51. package/dist/chunks/{chunk-LKVNTESX.js → chunk-MCUV6EI7.js} +2 -2
  52. package/dist/chunks/{chunk-SK5SRMCT.js → chunk-MSKJK6NZ.js} +3 -3
  53. package/dist/chunks/{chunk-DYV2522W.js → chunk-N457UJQL.js} +2 -2
  54. package/dist/chunks/{chunk-VQTWIVVA.js → chunk-O3CIRAYD.js} +5 -5
  55. package/dist/chunks/{chunk-3XMZDCBX.js → chunk-O7VKAFEU.js} +2 -2
  56. package/dist/chunks/{chunk-Z2EACB4F.js → chunk-PWGJB2WA.js} +4 -4
  57. package/dist/chunks/{chunk-XQUBSIWB.js → chunk-PXEHKMLO.js} +4 -4
  58. package/dist/chunks/{chunk-3ZB55MHY.js → chunk-QWFD2LFU.js} +4 -4
  59. package/dist/chunks/{chunk-TFJNH7ID.js → chunk-QYA34YM5.js} +4 -4
  60. package/dist/chunks/{chunk-WYH6NXPA.js → chunk-RI57PEYF.js} +4 -4
  61. package/dist/chunks/{chunk-MJMA5OHV.js → chunk-RPKRLR3O.js} +3 -3
  62. package/dist/chunks/{chunk-6W42AIQG.js → chunk-TIFSH2BH.js} +7 -7
  63. package/dist/chunks/{chunk-JDD4EWD6.js → chunk-TSKCIC5T.js} +2 -2
  64. package/dist/chunks/{chunk-33NYEJRI.js → chunk-TZDYMWYP.js} +3 -3
  65. package/dist/chunks/{chunk-L6QWM6JH.js → chunk-UHDKUVR5.js} +2 -2
  66. package/dist/chunks/{chunk-LQ6IIEFT.js → chunk-VD4D37MT.js} +3 -3
  67. package/dist/chunks/{chunk-2U3AGHA2.js → chunk-VHXXNM6W.js} +3 -3
  68. package/dist/chunks/{chunk-FDTTJKE2.js → chunk-WYUJ4USW.js} +2 -2
  69. package/dist/chunks/{chunk-74E5AVCZ.js → chunk-X4BCXODL.js} +5 -5
  70. package/dist/chunks/{chunk-5TXHYHGI.js → chunk-XSAS6TS2.js} +3 -3
  71. package/dist/chunks/{chunk-A3NXWBMA.js → chunk-Y37JJJVY.js} +3 -3
  72. package/dist/chunks/{chunk-TX3FNXAO.js → chunk-YAOKLAUU.js} +2 -2
  73. package/dist/chunks/{chunk-FIJIJBVB.js → chunk-YBOKKRHB.js} +6 -6
  74. package/dist/chunks/{chunk-DLLDZEN6.js → chunk-YZW6H2LD.js} +30 -30
  75. package/dist/chunks/{chunk-PPFEI5JA.js → chunk-Z2WGX7UM.js} +3 -3
  76. package/dist/chunks/{chunk-A6YM5FG3.js → chunk-ZPNX25RU.js} +5 -5
  77. package/dist/chunks/{cli-runtime-RPB4M2RF.js → cli-runtime-Q6BW37I2.js} +10 -10
  78. package/dist/chunks/{commands-IMYUSFHX.js → commands-C5I7PC7W.js} +5 -5
  79. package/dist/chunks/{crash-report-PWJTZU34.js → crash-report-DRT5OCHO.js} +6 -6
  80. package/dist/chunks/{dist-J2I6IEOU.js → dist-2NWJAAJM.js} +2 -2
  81. package/dist/chunks/{dist-GSHJSYUF.js → dist-5JM4UMVC.js} +2 -2
  82. package/dist/chunks/{dist-CEKNZS6X.js → dist-D7WSQBE7.js} +2 -2
  83. package/dist/chunks/{dist-VPHQMXFD.js → dist-PRTI23W3.js} +2 -2
  84. package/dist/chunks/{dist-T6QDOXHW.js → dist-T2N57REG.js} +2 -2
  85. package/dist/chunks/{dist-B4YMSACL.js → dist-VJC5RCYZ.js} +2 -2
  86. package/dist/chunks/{dist-THRSTILU.js → dist-WO56PFGZ.js} +2 -2
  87. package/dist/chunks/{doctor-LJTFZVNL.js → doctor-HXKU6QKJ.js} +8 -8
  88. package/dist/chunks/{drain-FZ7QVFJ5.js → drain-MLRRMEGK.js} +10 -10
  89. package/dist/chunks/{eval-STWOVX3N.js → eval-ECOECG74.js} +2 -2
  90. package/dist/chunks/{exec-EWHE65KQ.js → exec-JLB6F5ZR.js} +28 -28
  91. package/dist/chunks/{home-GKHHL5OL.js → home-G65CC45B.js} +3 -3
  92. package/dist/chunks/{host-queries-D3VSQE6Z.js → host-queries-7LKGEBO5.js} +15 -15
  93. package/dist/chunks/{learn-N3NKUI4W.js → learn-NRY6X2K6.js} +13 -13
  94. package/dist/chunks/{learn-builtin-OZQUS64D.js → learn-builtin-QOM4KLT2.js} +16 -16
  95. package/dist/chunks/{lifecycle-MRG5PYDG.js → lifecycle-BI2PMV4Q.js} +24 -24
  96. package/dist/chunks/{list-X5V5SGOY.js → list-QTWALT6F.js} +11 -11
  97. package/dist/chunks/{login-IXB52EFK.js → login-7LJG7D3F.js} +8 -8
  98. package/dist/chunks/{logs-BBC3W6H5.js → logs-UGMCEFAZ.js} +4 -4
  99. package/dist/chunks/{mcp-UEQPXI7K.js → mcp-KOZOXU6J.js} +16 -16
  100. package/dist/chunks/{message-command-PXMP4IC4.js → message-command-7B5OFSGL.js} +36 -36
  101. package/dist/chunks/{operator-tools-OZCXJX23.js → operator-tools-PWBZHKXO.js} +13 -13
  102. package/dist/chunks/{output-schema-OKJHMA22.js → output-schema-QPHXNRKI.js} +3 -3
  103. package/dist/chunks/{pal-COYTNDHQ.js → pal-XSD45IR6.js} +11 -11
  104. package/dist/chunks/{providers-56OCKVO4.js → providers-ULPGYRWC.js} +6 -6
  105. package/dist/chunks/{resident-2XJYIQOD.js → resident-NY7XSEK7.js} +24 -24
  106. package/dist/chunks/resume-4FV66TEK.js +23 -0
  107. package/dist/chunks/{resume-command-EIDWBG7D.js → resume-command-DLOW7MYW.js} +4 -4
  108. package/dist/chunks/{schedule-SJ36DUQY.js → schedule-QR7JOA4F.js} +8 -8
  109. package/dist/chunks/{service-FEZAPVUE.js → service-CLLR5VUD.js} +23 -23
  110. package/dist/chunks/session-step-IEMT6LRR.js +30 -0
  111. package/dist/chunks/{skills-CXLLO5VH.js → skills-OZZLTH6P.js} +8 -8
  112. package/dist/chunks/{state-QZBFM4HR.js → state-EROTPJRH.js} +2 -2
  113. package/dist/chunks/{store-7TGN2BZW.js → store-C24DXKO4.js} +6 -6
  114. package/dist/chunks/{store-T76GFLGS.js → store-ROEYUKBM.js} +4 -4
  115. package/dist/chunks/{store-SFATKTMK.js → store-VDQRT2KF.js} +10 -10
  116. package/dist/chunks/{tui-ZHDQMAUW.js → tui-XBQCRSIJ.js} +166 -81
  117. package/dist/chunks/tui-XBQCRSIJ.js.map +6 -0
  118. package/dist/chunks/{upgrade-U3AHBHY3.js → upgrade-ZRQZD2N2.js} +2 -2
  119. package/dist/chunks/{worktree-LU7NNZQZ.js → worktree-XMJ355ND.js} +12 -12
  120. package/dist/index.js +12 -12
  121. package/dist/integrations/resident/runner-worker.js +20 -20
  122. package/dist/tui/App.d.ts.map +1 -1
  123. package/dist/tui/PlanApprovalOverlay.d.ts.map +1 -1
  124. package/dist/tui/compaction-rows.d.ts +13 -0
  125. package/dist/tui/compaction-rows.d.ts.map +1 -1
  126. package/dist/tui/display-path.d.ts +12 -0
  127. package/dist/tui/display-path.d.ts.map +1 -1
  128. package/dist/tui/permission-review.d.ts +9 -0
  129. package/dist/tui/permission-review.d.ts.map +1 -1
  130. package/dist/tui/resume-empty.d.ts +14 -0
  131. package/dist/tui/resume-empty.d.ts.map +1 -0
  132. package/dist/tui/tidy-tool-output.d.ts.map +1 -1
  133. package/dist/tui/tool-end-rows.d.ts.map +1 -1
  134. package/package.json +6 -6
  135. package/dist/chunks/agent-session-MQEHBQXA.js +0 -59
  136. package/dist/chunks/chunk-5UQSACPK.js.map +0 -6
  137. package/dist/chunks/chunk-WJG5O4KK.js.map +0 -6
  138. package/dist/chunks/resume-OKFXVP4R.js +0 -23
  139. package/dist/chunks/session-step-Z53LX627.js +0 -30
  140. package/dist/chunks/tui-ZHDQMAUW.js.map +0 -6
  141. /package/dist/chunks/{acp-PBJTGQHA.js.map → acp-MCDCWJ45.js.map} +0 -0
  142. /package/dist/chunks/{activity-command-JFBLFZSJ.js.map → activity-command-AYLW5EEX.js.map} +0 -0
  143. /package/dist/chunks/{add-MSMS6QMP.js.map → add-VNM5QPTX.js.map} +0 -0
  144. /package/dist/chunks/{agent-OEXJQTAS.js.map → agent-4IMOBJR5.js.map} +0 -0
  145. /package/dist/chunks/{agent-session-MQEHBQXA.js.map → agent-session-44AYNTQJ.js.map} +0 -0
  146. /package/dist/chunks/{archive-Z4MSUTUS.js.map → archive-VXJWPZBA.js.map} +0 -0
  147. /package/dist/chunks/{bin-main-3NKAMTSR.js.map → bin-main-BMCDNDGC.js.map} +0 -0
  148. /package/dist/chunks/{browser-Q7CAR3HM.js.map → browser-7MVCQL2G.js.map} +0 -0
  149. /package/dist/chunks/{chat-Z5AJZSH6.js.map → chat-M2WFCRYV.js.map} +0 -0
  150. /package/dist/chunks/{chunk-6C4J5CIK.js.map → chunk-2LLNCAZS.js.map} +0 -0
  151. /package/dist/chunks/{chunk-ERRNULJ3.js.map → chunk-2Q6PBTPY.js.map} +0 -0
  152. /package/dist/chunks/{chunk-5IUMQ3HV.js.map → chunk-3ZMECJLN.js.map} +0 -0
  153. /package/dist/chunks/{chunk-R4KW67FB.js.map → chunk-4I5FGMVR.js.map} +0 -0
  154. /package/dist/chunks/{chunk-F3MJOWFD.js.map → chunk-5L7ZQ37R.js.map} +0 -0
  155. /package/dist/chunks/{chunk-ETQIZ5KN.js.map → chunk-5LGZUFDJ.js.map} +0 -0
  156. /package/dist/chunks/{chunk-H56UWANP.js.map → chunk-5XWYY63Z.js.map} +0 -0
  157. /package/dist/chunks/{chunk-LURD5LEU.js.map → chunk-7A5TVBGS.js.map} +0 -0
  158. /package/dist/chunks/{chunk-EBM72A56.js.map → chunk-7RBZS3TN.js.map} +0 -0
  159. /package/dist/chunks/{chunk-GMAVUBKY.js.map → chunk-AGRFKHS2.js.map} +0 -0
  160. /package/dist/chunks/{chunk-SFOKT7BD.js.map → chunk-AVSE45ED.js.map} +0 -0
  161. /package/dist/chunks/{chunk-N6YMEARB.js.map → chunk-AYCKJIVD.js.map} +0 -0
  162. /package/dist/chunks/{chunk-NWNJO347.js.map → chunk-C4CVM56Z.js.map} +0 -0
  163. /package/dist/chunks/{chunk-IN62T4C7.js.map → chunk-CN6EFAK5.js.map} +0 -0
  164. /package/dist/chunks/{chunk-NN67WN5F.js.map → chunk-DAJBZ4B7.js.map} +0 -0
  165. /package/dist/chunks/{chunk-56M5MQ4J.js.map → chunk-DAUWDTZI.js.map} +0 -0
  166. /package/dist/chunks/{chunk-R3REKFM3.js.map → chunk-DVRRRNSA.js.map} +0 -0
  167. /package/dist/chunks/{chunk-NJGAXOWJ.js.map → chunk-EYBTANG5.js.map} +0 -0
  168. /package/dist/chunks/{chunk-ZA6AX5U4.js.map → chunk-F2UUHEPY.js.map} +0 -0
  169. /package/dist/chunks/{chunk-NQSQZ2UV.js.map → chunk-G7JH3PMC.js.map} +0 -0
  170. /package/dist/chunks/{chunk-CEBLRMD4.js.map → chunk-GD6LOX4A.js.map} +0 -0
  171. /package/dist/chunks/{chunk-7MYFM63X.js.map → chunk-H3ALHXFV.js.map} +0 -0
  172. /package/dist/chunks/{chunk-I7T3E2GZ.js.map → chunk-HV7PRPHJ.js.map} +0 -0
  173. /package/dist/chunks/{chunk-YUCU537D.js.map → chunk-HWAPKOAW.js.map} +0 -0
  174. /package/dist/chunks/{chunk-VMF3FBAG.js.map → chunk-IBCA2WDM.js.map} +0 -0
  175. /package/dist/chunks/{chunk-XI4FSVO4.js.map → chunk-IBUFD2HH.js.map} +0 -0
  176. /package/dist/chunks/{chunk-LXGJMPVM.js.map → chunk-IMFIQJM6.js.map} +0 -0
  177. /package/dist/chunks/{chunk-3UXYK42Z.js.map → chunk-IQBKDY6G.js.map} +0 -0
  178. /package/dist/chunks/{chunk-DNW5R5BJ.js.map → chunk-KDZ6GM2A.js.map} +0 -0
  179. /package/dist/chunks/{chunk-LJQKALFW.js.map → chunk-KEKFOEEP.js.map} +0 -0
  180. /package/dist/chunks/{chunk-FGLIZTK4.js.map → chunk-KGKRKFB7.js.map} +0 -0
  181. /package/dist/chunks/{chunk-KJBANDDG.js.map → chunk-KTF5NW2V.js.map} +0 -0
  182. /package/dist/chunks/{chunk-ZNSLNHYH.js.map → chunk-L2MEW4AZ.js.map} +0 -0
  183. /package/dist/chunks/{chunk-3D6A3HLM.js.map → chunk-LETTT4ZZ.js.map} +0 -0
  184. /package/dist/chunks/{chunk-M2DUJ2ET.js.map → chunk-LRDLJTYP.js.map} +0 -0
  185. /package/dist/chunks/{chunk-LKVNTESX.js.map → chunk-MCUV6EI7.js.map} +0 -0
  186. /package/dist/chunks/{chunk-SK5SRMCT.js.map → chunk-MSKJK6NZ.js.map} +0 -0
  187. /package/dist/chunks/{chunk-DYV2522W.js.map → chunk-N457UJQL.js.map} +0 -0
  188. /package/dist/chunks/{chunk-VQTWIVVA.js.map → chunk-O3CIRAYD.js.map} +0 -0
  189. /package/dist/chunks/{chunk-3XMZDCBX.js.map → chunk-O7VKAFEU.js.map} +0 -0
  190. /package/dist/chunks/{chunk-Z2EACB4F.js.map → chunk-PWGJB2WA.js.map} +0 -0
  191. /package/dist/chunks/{chunk-XQUBSIWB.js.map → chunk-PXEHKMLO.js.map} +0 -0
  192. /package/dist/chunks/{chunk-3ZB55MHY.js.map → chunk-QWFD2LFU.js.map} +0 -0
  193. /package/dist/chunks/{chunk-TFJNH7ID.js.map → chunk-QYA34YM5.js.map} +0 -0
  194. /package/dist/chunks/{chunk-WYH6NXPA.js.map → chunk-RI57PEYF.js.map} +0 -0
  195. /package/dist/chunks/{chunk-MJMA5OHV.js.map → chunk-RPKRLR3O.js.map} +0 -0
  196. /package/dist/chunks/{chunk-6W42AIQG.js.map → chunk-TIFSH2BH.js.map} +0 -0
  197. /package/dist/chunks/{chunk-JDD4EWD6.js.map → chunk-TSKCIC5T.js.map} +0 -0
  198. /package/dist/chunks/{chunk-33NYEJRI.js.map → chunk-TZDYMWYP.js.map} +0 -0
  199. /package/dist/chunks/{chunk-L6QWM6JH.js.map → chunk-UHDKUVR5.js.map} +0 -0
  200. /package/dist/chunks/{chunk-LQ6IIEFT.js.map → chunk-VD4D37MT.js.map} +0 -0
  201. /package/dist/chunks/{chunk-2U3AGHA2.js.map → chunk-VHXXNM6W.js.map} +0 -0
  202. /package/dist/chunks/{chunk-FDTTJKE2.js.map → chunk-WYUJ4USW.js.map} +0 -0
  203. /package/dist/chunks/{chunk-74E5AVCZ.js.map → chunk-X4BCXODL.js.map} +0 -0
  204. /package/dist/chunks/{chunk-5TXHYHGI.js.map → chunk-XSAS6TS2.js.map} +0 -0
  205. /package/dist/chunks/{chunk-A3NXWBMA.js.map → chunk-Y37JJJVY.js.map} +0 -0
  206. /package/dist/chunks/{chunk-TX3FNXAO.js.map → chunk-YAOKLAUU.js.map} +0 -0
  207. /package/dist/chunks/{chunk-FIJIJBVB.js.map → chunk-YBOKKRHB.js.map} +0 -0
  208. /package/dist/chunks/{chunk-DLLDZEN6.js.map → chunk-YZW6H2LD.js.map} +0 -0
  209. /package/dist/chunks/{chunk-PPFEI5JA.js.map → chunk-Z2WGX7UM.js.map} +0 -0
  210. /package/dist/chunks/{chunk-A6YM5FG3.js.map → chunk-ZPNX25RU.js.map} +0 -0
  211. /package/dist/chunks/{cli-runtime-RPB4M2RF.js.map → cli-runtime-Q6BW37I2.js.map} +0 -0
  212. /package/dist/chunks/{commands-IMYUSFHX.js.map → commands-C5I7PC7W.js.map} +0 -0
  213. /package/dist/chunks/{crash-report-PWJTZU34.js.map → crash-report-DRT5OCHO.js.map} +0 -0
  214. /package/dist/chunks/{dist-J2I6IEOU.js.map → dist-2NWJAAJM.js.map} +0 -0
  215. /package/dist/chunks/{dist-GSHJSYUF.js.map → dist-5JM4UMVC.js.map} +0 -0
  216. /package/dist/chunks/{dist-CEKNZS6X.js.map → dist-D7WSQBE7.js.map} +0 -0
  217. /package/dist/chunks/{dist-VPHQMXFD.js.map → dist-PRTI23W3.js.map} +0 -0
  218. /package/dist/chunks/{dist-T6QDOXHW.js.map → dist-T2N57REG.js.map} +0 -0
  219. /package/dist/chunks/{dist-B4YMSACL.js.map → dist-VJC5RCYZ.js.map} +0 -0
  220. /package/dist/chunks/{dist-THRSTILU.js.map → dist-WO56PFGZ.js.map} +0 -0
  221. /package/dist/chunks/{doctor-LJTFZVNL.js.map → doctor-HXKU6QKJ.js.map} +0 -0
  222. /package/dist/chunks/{drain-FZ7QVFJ5.js.map → drain-MLRRMEGK.js.map} +0 -0
  223. /package/dist/chunks/{eval-STWOVX3N.js.map → eval-ECOECG74.js.map} +0 -0
  224. /package/dist/chunks/{exec-EWHE65KQ.js.map → exec-JLB6F5ZR.js.map} +0 -0
  225. /package/dist/chunks/{home-GKHHL5OL.js.map → home-G65CC45B.js.map} +0 -0
  226. /package/dist/chunks/{host-queries-D3VSQE6Z.js.map → host-queries-7LKGEBO5.js.map} +0 -0
  227. /package/dist/chunks/{learn-N3NKUI4W.js.map → learn-NRY6X2K6.js.map} +0 -0
  228. /package/dist/chunks/{learn-builtin-OZQUS64D.js.map → learn-builtin-QOM4KLT2.js.map} +0 -0
  229. /package/dist/chunks/{lifecycle-MRG5PYDG.js.map → lifecycle-BI2PMV4Q.js.map} +0 -0
  230. /package/dist/chunks/{list-X5V5SGOY.js.map → list-QTWALT6F.js.map} +0 -0
  231. /package/dist/chunks/{login-IXB52EFK.js.map → login-7LJG7D3F.js.map} +0 -0
  232. /package/dist/chunks/{logs-BBC3W6H5.js.map → logs-UGMCEFAZ.js.map} +0 -0
  233. /package/dist/chunks/{mcp-UEQPXI7K.js.map → mcp-KOZOXU6J.js.map} +0 -0
  234. /package/dist/chunks/{message-command-PXMP4IC4.js.map → message-command-7B5OFSGL.js.map} +0 -0
  235. /package/dist/chunks/{operator-tools-OZCXJX23.js.map → operator-tools-PWBZHKXO.js.map} +0 -0
  236. /package/dist/chunks/{output-schema-OKJHMA22.js.map → output-schema-QPHXNRKI.js.map} +0 -0
  237. /package/dist/chunks/{pal-COYTNDHQ.js.map → pal-XSD45IR6.js.map} +0 -0
  238. /package/dist/chunks/{providers-56OCKVO4.js.map → providers-ULPGYRWC.js.map} +0 -0
  239. /package/dist/chunks/{resident-2XJYIQOD.js.map → resident-NY7XSEK7.js.map} +0 -0
  240. /package/dist/chunks/{resume-OKFXVP4R.js.map → resume-4FV66TEK.js.map} +0 -0
  241. /package/dist/chunks/{resume-command-EIDWBG7D.js.map → resume-command-DLOW7MYW.js.map} +0 -0
  242. /package/dist/chunks/{schedule-SJ36DUQY.js.map → schedule-QR7JOA4F.js.map} +0 -0
  243. /package/dist/chunks/{service-FEZAPVUE.js.map → service-CLLR5VUD.js.map} +0 -0
  244. /package/dist/chunks/{session-step-Z53LX627.js.map → session-step-IEMT6LRR.js.map} +0 -0
  245. /package/dist/chunks/{skills-CXLLO5VH.js.map → skills-OZZLTH6P.js.map} +0 -0
  246. /package/dist/chunks/{state-QZBFM4HR.js.map → state-EROTPJRH.js.map} +0 -0
  247. /package/dist/chunks/{store-7TGN2BZW.js.map → store-C24DXKO4.js.map} +0 -0
  248. /package/dist/chunks/{store-SFATKTMK.js.map → store-ROEYUKBM.js.map} +0 -0
  249. /package/dist/chunks/{store-T76GFLGS.js.map → store-VDQRT2KF.js.map} +0 -0
  250. /package/dist/chunks/{upgrade-U3AHBHY3.js.map → upgrade-ZRQZD2N2.js.map} +0 -0
  251. /package/dist/chunks/{worktree-LU7NNZQZ.js.map → worktree-XMJ355ND.js.map} +0 -0
@@ -1366,13 +1366,13 @@ var GuardedFetchProvider = class {
1366
1366
  operation.throwIfStopped();
1367
1367
  return url;
1368
1368
  }
1369
- const resolve29 = this.config.resolve ?? (async (name2) => (await lookup(name2, { all: true })).map((r) => r.address));
1369
+ const resolve30 = this.config.resolve ?? (async (name2) => (await lookup(name2, { all: true })).map((r) => r.address));
1370
1370
  let addresses;
1371
1371
  if (isIP(hostname)) {
1372
1372
  addresses = [hostname];
1373
1373
  } else {
1374
1374
  try {
1375
- addresses = await operation.run(() => resolve29(hostname, operation.signal));
1375
+ addresses = await operation.run(() => resolve30(hostname, operation.signal));
1376
1376
  } catch (err) {
1377
1377
  operation.throwIfStopped();
1378
1378
  throw new WebFetchRefusedError(`Refused "${hostname}" \u2014 it could not be resolved (${err instanceof Error ? err.message : String(err)}), so nothing here can say where it points.`, { url: rawUrl, reason: "private-address" });
@@ -6399,9 +6399,9 @@ async function vetWebSocketTarget(raw, options = {}) {
6399
6399
  if (literal !== 0) {
6400
6400
  addresses = [hostname];
6401
6401
  } else {
6402
- const resolve29 = options.resolve ?? (async (name2) => (await dnsLookup(name2, { all: true })).map((r) => r.address));
6402
+ const resolve30 = options.resolve ?? (async (name2) => (await dnsLookup(name2, { all: true })).map((r) => r.address));
6403
6403
  try {
6404
- addresses = await resolve29(hostname);
6404
+ addresses = await resolve30(hostname);
6405
6405
  } catch (err) {
6406
6406
  throw new WebSocketRefusedError(`Refused "${hostname}": it could not be resolved (${err instanceof Error ? err.message : String(err)}), so nothing here can say where it points.`);
6407
6407
  }
@@ -6827,8 +6827,8 @@ var BackgroundJobRegistry = class {
6827
6827
  };
6828
6828
  let startError;
6829
6829
  let settleStarted;
6830
- const startedPromise = new Promise((resolve29) => {
6831
- settleStarted = /* @__PURE__ */ __name(() => resolve29(startError === void 0 ? {} : { error: startError }), "settleStarted");
6830
+ const startedPromise = new Promise((resolve30) => {
6831
+ settleStarted = /* @__PURE__ */ __name(() => resolve30(startError === void 0 ? {} : { error: startError }), "settleStarted");
6832
6832
  });
6833
6833
  if (params.spawn || child.pid !== void 0)
6834
6834
  settleStarted();
@@ -6874,7 +6874,7 @@ var BackgroundJobRegistry = class {
6874
6874
  outputChunks: [],
6875
6875
  outputObservers: /* @__PURE__ */ new Set(),
6876
6876
  started: startedPromise,
6877
- exit: new Promise((resolve29) => {
6877
+ exit: new Promise((resolve30) => {
6878
6878
  let spawned = child.pid !== void 0;
6879
6879
  let failedToSpawn = false;
6880
6880
  let finalized = false;
@@ -6892,7 +6892,7 @@ var BackgroundJobRegistry = class {
6892
6892
  ...code === null ? {} : { exitCode: code },
6893
6893
  ...signal ? { signal } : {}
6894
6894
  };
6895
- resolve29();
6895
+ resolve30();
6896
6896
  for (const observer of entry.outputObservers)
6897
6897
  observer();
6898
6898
  if (entry.monitor) {
@@ -7065,7 +7065,7 @@ var BackgroundJobRegistry = class {
7065
7065
  const signal = opts.signal;
7066
7066
  if (signal.aborted)
7067
7067
  return Promise.reject(signal.reason);
7068
- return new Promise((resolve29, reject2) => {
7068
+ return new Promise((resolve30, reject2) => {
7069
7069
  let disposeAbort = /* @__PURE__ */ __name(() => {
7070
7070
  }, "disposeAbort");
7071
7071
  const unsubscribe = this.onExit((job) => {
@@ -7073,7 +7073,7 @@ var BackgroundJobRegistry = class {
7073
7073
  return;
7074
7074
  unsubscribe();
7075
7075
  disposeAbort();
7076
- resolve29(job);
7076
+ resolve30(job);
7077
7077
  });
7078
7078
  disposeAbort = subscribeToAbort(signal, () => {
7079
7079
  unsubscribe();
@@ -7170,7 +7170,7 @@ var BackgroundJobRegistry = class {
7170
7170
  throw new BackgroundJobOutputWaitLimitError({ owner, limit: globalLimit, scope: "registry" });
7171
7171
  this.outputWaiters++;
7172
7172
  this.outputWaitersByOwner.set(owner, ownerCount + 1);
7173
- return new Promise((resolve29) => {
7173
+ return new Promise((resolve30) => {
7174
7174
  const startedAt = Date.now();
7175
7175
  let settled = false;
7176
7176
  let disposeAbort = /* @__PURE__ */ __name(() => {
@@ -7190,7 +7190,7 @@ var BackgroundJobRegistry = class {
7190
7190
  this.outputWaitersByOwner.delete(owner);
7191
7191
  else
7192
7192
  this.outputWaitersByOwner.set(owner, remaining);
7193
- resolve29(result);
7193
+ resolve30(result);
7194
7194
  }, "finish");
7195
7195
  const timeout = /* @__PURE__ */ __name((cause) => {
7196
7196
  read();
@@ -9611,7 +9611,7 @@ async function renameWithRetry(from, to) {
9611
9611
  const code = err.code ?? "";
9612
9612
  if (!CONTENDED.has(code) || attempt >= RENAME_ATTEMPTS)
9613
9613
  throw err;
9614
- await new Promise((resolve29) => setTimeout(resolve29, attempt));
9614
+ await new Promise((resolve30) => setTimeout(resolve30, attempt));
9615
9615
  }
9616
9616
  }
9617
9617
  }
@@ -10514,6 +10514,7 @@ function defineTool(options) {
10514
10514
  ...options.commandArgument !== void 0 ? { commandArgument: options.commandArgument } : {},
10515
10515
  ...options.commandDialect !== void 0 ? { commandDialect: options.commandDialect } : {},
10516
10516
  ...options.pathArgument !== void 0 ? { pathArgument: options.pathArgument } : {},
10517
+ ...options.refuseBeforeReview ? { refuseBeforeReview: options.refuseBeforeReview } : {},
10517
10518
  ...options.urlArgument !== void 0 ? { urlArgument: options.urlArgument } : {},
10518
10519
  ...options.sandboxEscapeArgument !== void 0 ? { sandboxEscapeArgument: options.sandboxEscapeArgument } : {},
10519
10520
  ...options.presentCall ? { presentCall: options.presentCall } : {},
@@ -12628,8 +12629,8 @@ async function releaseHeldSessionLeases(options = {}) {
12628
12629
  }, () => {
12629
12630
  })));
12630
12631
  let timer;
12631
- const deadline = new Promise((resolve29) => {
12632
- timer = setTimeout(resolve29, options.timeoutMs ?? 2e3);
12632
+ const deadline = new Promise((resolve30) => {
12633
+ timer = setTimeout(resolve30, options.timeoutMs ?? 2e3);
12633
12634
  });
12634
12635
  await Promise.race([all, deadline]);
12635
12636
  clearTimeout(timer);
@@ -14342,7 +14343,7 @@ async function renameWithRetry2(from, to) {
14342
14343
  const code = err.code ?? "";
14343
14344
  if (!CONTENDED2.has(code) || attempt >= RENAME_ATTEMPTS2)
14344
14345
  throw err;
14345
- await new Promise((resolve29) => setTimeout(resolve29, attempt));
14346
+ await new Promise((resolve30) => setTimeout(resolve30, attempt));
14346
14347
  }
14347
14348
  }
14348
14349
  }
@@ -22713,14 +22714,14 @@ __name(backoffProportional, "backoffProportional");
22713
22714
  function sleep(ms, signal) {
22714
22715
  if (ms <= 0)
22715
22716
  return Promise.resolve();
22716
- return new Promise((resolve29, reject2) => {
22717
+ return new Promise((resolve30, reject2) => {
22717
22718
  if (signal?.aborted) {
22718
22719
  reject2(signal.reason);
22719
22720
  return;
22720
22721
  }
22721
22722
  const timer = setTimeout(() => {
22722
22723
  signal?.removeEventListener("abort", onAbort);
22723
- resolve29();
22724
+ resolve30();
22724
22725
  }, ms);
22725
22726
  const onAbort = /* @__PURE__ */ __name(() => {
22726
22727
  clearTimeout(timer);
@@ -24450,6 +24451,13 @@ function unreadFileError(path2, operation = "edit") {
24450
24451
  return `${path2} has not been read yet. Read it first, then redo the ${operation}. Nothing was written.`;
24451
24452
  }
24452
24453
  __name(unreadFileError, "unreadFileError");
24454
+ function movedSinceRead(tracker, key5, current) {
24455
+ if (!tracker || !tracker.hasRead(key5))
24456
+ return false;
24457
+ const seen = tracker.fingerprint?.(key5);
24458
+ return seen !== void 0 && seen !== fingerprintContent(current);
24459
+ }
24460
+ __name(movedSinceRead, "movedSinceRead");
24453
24461
 
24454
24462
  // ../sdk/dist/tools/file-read-tracker.js
24455
24463
  function createFileReadTracker() {
@@ -25558,7 +25566,7 @@ function countOccurrences(content, needle, cap) {
25558
25566
  __name(countOccurrences, "countOccurrences");
25559
25567
 
25560
25568
  // ../sdk/dist/tools/builtins/edit.js
25561
- import { readFile as readFile5 } from "node:fs/promises";
25569
+ import { readFile as readFile6 } from "node:fs/promises";
25562
25570
 
25563
25571
  // ../sdk/dist/tools/builtins/atomic-write-file.js
25564
25572
  import { randomUUID as randomUUID2 } from "node:crypto";
@@ -25624,8 +25632,8 @@ async function withFileMutationLock(key5, operation) {
25624
25632
  const previous = mutationTails.get(key5) ?? Promise.resolve();
25625
25633
  let release = /* @__PURE__ */ __name(() => {
25626
25634
  }, "release");
25627
- const current = new Promise((resolve29) => {
25628
- release = resolve29;
25635
+ const current = new Promise((resolve30) => {
25636
+ release = resolve30;
25629
25637
  });
25630
25638
  const tail = previous.then(() => current);
25631
25639
  mutationTails.set(key5, tail);
@@ -26410,6 +26418,35 @@ function lineDiff2(before, after) {
26410
26418
  }
26411
26419
  __name(lineDiff2, "lineDiff");
26412
26420
 
26421
+ // ../sdk/dist/tools/builtins/stale-before-review.js
26422
+ import { readFile as readFile5 } from "node:fs/promises";
26423
+ async function staleBeforeReview(context2, path2, operation) {
26424
+ const tracker = context2.fileReadTracker;
26425
+ if (!tracker)
26426
+ return void 0;
26427
+ let key5;
26428
+ let current;
26429
+ try {
26430
+ if (context2.sandbox) {
26431
+ key5 = path2;
26432
+ current = (await context2.sandbox.readFile(path2)).toString("utf-8");
26433
+ } else {
26434
+ key5 = await resolveWithinAnyReal(toolRoots(context2), path2);
26435
+ current = await readFile5(key5, "utf-8");
26436
+ }
26437
+ } catch {
26438
+ return void 0;
26439
+ }
26440
+ if (!movedSinceRead(tracker, key5, current))
26441
+ return void 0;
26442
+ tracker.recordDriftObserved?.(key5);
26443
+ return {
26444
+ error: staleFileError(key5, operation),
26445
+ facts: { kind: "failure", reason: "changed_on_disk", subject: key5 }
26446
+ };
26447
+ }
26448
+ __name(staleBeforeReview, "staleBeforeReview");
26449
+
26413
26450
  // ../sdk/dist/tools/builtins/edit.js
26414
26451
  var inputSchema3 = external_exports.object({
26415
26452
  path: external_exports.string().refine((value) => value.trim().length > 0, "Path must not be empty.").describe("Path to the file to edit. Must not be empty."),
@@ -26599,19 +26636,16 @@ function admitAgainstRead(context2, key5, content, operations) {
26599
26636
  };
26600
26637
  }
26601
26638
  const seen = tracker?.fingerprint?.(key5);
26602
- const applied = applyEdit(content, operations);
26603
26639
  if (seen !== void 0 && seen !== fingerprintContent(content)) {
26604
- const recoverable = applied.success && operations.every((o) => o.operation === "replace");
26605
- if (!recoverable) {
26606
- recordDrift(context2, key5);
26607
- return {
26608
- success: false,
26609
- output: "",
26610
- error: staleFileError(key5),
26611
- facts: { kind: "failure", reason: "changed_on_disk", subject: key5 }
26612
- };
26613
- }
26640
+ recordDrift(context2, key5);
26641
+ return {
26642
+ success: false,
26643
+ output: "",
26644
+ error: staleFileError(key5),
26645
+ facts: { kind: "failure", reason: "changed_on_disk", subject: key5 }
26646
+ };
26614
26647
  }
26648
+ const applied = applyEdit(content, operations);
26615
26649
  return { success: true, result: applied };
26616
26650
  }
26617
26651
  __name(admitAgainstRead, "admitAgainstRead");
@@ -26658,6 +26692,9 @@ var EditTool = defineTool({
26658
26692
  // Declared so a path outside the turn's roots can be reviewed before the
26659
26693
  // call runs, rather than refused after. See `ToolDefinition.pathArgument`.
26660
26694
  pathArgument: "path",
26695
+ // A file that moved since the read is refused whatever the replacement is,
26696
+ // so the person is not asked to approve one that cannot run.
26697
+ refuseBeforeReview: /* @__PURE__ */ __name((input, context2) => staleBeforeReview(context2, input.path, "edit"), "refuseBeforeReview"),
26661
26698
  // The classifier judges which file changes and in what way, in a line.
26662
26699
  classifierInput: /* @__PURE__ */ __name((input) => {
26663
26700
  if (input.edits !== void 0) {
@@ -26758,7 +26795,7 @@ var EditTool = defineTool({
26758
26795
  };
26759
26796
  }
26760
26797
  const hostPath = filePath;
26761
- const content = await readFile5(hostPath, "utf-8");
26798
+ const content = await readFile6(hostPath, "utf-8");
26762
26799
  const admitted = admitAgainstRead(context2, hostPath, content, normalized.operations);
26763
26800
  if (!admitted.success)
26764
26801
  return admitted;
@@ -26779,7 +26816,7 @@ var EditTool = defineTool({
26779
26816
  });
26780
26817
 
26781
26818
  // ../sdk/dist/tools/builtins/read-file.js
26782
- import { readFile as readFile6, stat as stat4 } from "node:fs/promises";
26819
+ import { readFile as readFile7, stat as stat4 } from "node:fs/promises";
26783
26820
  import { extname as extname2 } from "node:path";
26784
26821
 
26785
26822
  // ../sdk/dist/tools/retained-output.js
@@ -27146,7 +27183,7 @@ var ReadFileTool = defineTool({
27146
27183
  if (!early.ok)
27147
27184
  return refusedRead(filePath, size, early.message, false);
27148
27185
  }
27149
- const buffer = await readFile6(filePath);
27186
+ const buffer = await readFile7(filePath);
27150
27187
  const binaryGuidance = describeStructuredBinaryRead(filePath, buffer);
27151
27188
  if (binaryGuidance) {
27152
27189
  return {
@@ -27274,7 +27311,7 @@ function buildStructuredBinaryGuidance(path2, format, extractor) {
27274
27311
  __name(buildStructuredBinaryGuidance, "buildStructuredBinaryGuidance");
27275
27312
 
27276
27313
  // ../sdk/dist/tools/builtins/write-file.js
27277
- import { mkdir as mkdir7, readFile as readFile7 } from "node:fs/promises";
27314
+ import { mkdir as mkdir7, readFile as readFile8 } from "node:fs/promises";
27278
27315
  import { dirname as dirname9 } from "node:path";
27279
27316
 
27280
27317
  // ../sdk/dist/tools/builtins/file-write-result.js
@@ -27372,6 +27409,9 @@ var WriteFileTool = defineTool({
27372
27409
  // Declared so a path outside the turn's roots can be reviewed before the
27373
27410
  // call runs, rather than refused after. See `ToolDefinition.pathArgument`.
27374
27411
  pathArgument: "path",
27412
+ // An overwrite of a file that moved since the read is refused when it runs,
27413
+ // so the person is not asked to approve one that cannot.
27414
+ refuseBeforeReview: /* @__PURE__ */ __name((input, context2) => staleBeforeReview(context2, input.path, "write"), "refuseBeforeReview"),
27375
27415
  // The classifier judges where a file is written and how much, not the body.
27376
27416
  classifierInput: /* @__PURE__ */ __name((input) => {
27377
27417
  const body = input.content ?? input.newStr ?? "";
@@ -27475,7 +27515,7 @@ function enforceFreshOverwrite(context2, key5, currentContent) {
27475
27515
  __name(enforceFreshOverwrite, "enforceFreshOverwrite");
27476
27516
  async function readHostFileIfPresent(hostPath) {
27477
27517
  try {
27478
- return await readFile7(hostPath, "utf-8");
27518
+ return await readFile8(hostPath, "utf-8");
27479
27519
  } catch (error) {
27480
27520
  if (isMissingFileError(error))
27481
27521
  return void 0;
@@ -27902,7 +27942,7 @@ function resolveNamzuHome(options = {}) {
27902
27942
  __name(resolveNamzuHome, "resolveNamzuHome");
27903
27943
 
27904
27944
  // ../sdk/dist/store/checkpoint/disk.js
27905
- import { link as link5, mkdir as mkdir8, open as open7, readFile as readFile8, readdir as readdir3, unlink as unlink7 } from "node:fs/promises";
27945
+ import { link as link5, mkdir as mkdir8, open as open7, readFile as readFile9, readdir as readdir3, unlink as unlink7 } from "node:fs/promises";
27906
27946
  import { dirname as dirname10 } from "node:path";
27907
27947
 
27908
27948
  // ../sdk/dist/store/checkpoint/contract.js
@@ -28142,7 +28182,7 @@ var DiskSessionCheckpointStore = class {
28142
28182
  };
28143
28183
  async function readIfPresent(path2) {
28144
28184
  try {
28145
- return await readFile8(path2, "utf8");
28185
+ return await readFile9(path2, "utf8");
28146
28186
  } catch (error) {
28147
28187
  if (error.code === "ENOENT")
28148
28188
  return null;
@@ -30928,7 +30968,7 @@ var RuntimeConfigSchema = external_exports.object({
30928
30968
  var RUNTIME_DEFAULTS = RuntimeConfigSchema.parse({});
30929
30969
 
30930
30970
  // ../sdk/dist/manager/agent/child-session.js
30931
- import { mkdir as mkdir9, readFile as readFile9 } from "node:fs/promises";
30971
+ import { mkdir as mkdir9, readFile as readFile10 } from "node:fs/promises";
30932
30972
  import { dirname as dirname11 } from "node:path";
30933
30973
  async function childSessionEnded(childLog) {
30934
30974
  let ended = null;
@@ -30969,7 +31009,7 @@ __name(writeChildSessionMeta, "writeChildSessionMeta");
30969
31009
  async function readChildSessionMeta(path2) {
30970
31010
  let raw;
30971
31011
  try {
30972
- raw = await readFile9(path2, "utf8");
31012
+ raw = await readFile10(path2, "utf8");
30973
31013
  } catch (error) {
30974
31014
  if (error.code === "ENOENT")
30975
31015
  return null;
@@ -32860,12 +32900,12 @@ var AwaitedJobs = class {
32860
32900
  return Promise.resolve();
32861
32901
  if (this.outstanding.size === 0 && this.monitors.size === 0)
32862
32902
  return Promise.resolve();
32863
- return new Promise((resolve29) => {
32903
+ return new Promise((resolve30) => {
32864
32904
  const finish2 = /* @__PURE__ */ __name(() => {
32865
32905
  clearTimeout(timer);
32866
32906
  this.arrivals.delete(finish2);
32867
32907
  signal?.removeEventListener("abort", finish2);
32868
- resolve29();
32908
+ resolve30();
32869
32909
  }, "finish");
32870
32910
  const timer = setTimeout(finish2, timeoutMs);
32871
32911
  timer.unref?.();
@@ -34901,12 +34941,12 @@ var CompletionInbox = class {
34901
34941
  return Promise.resolve();
34902
34942
  if (!this.hasPendingWork)
34903
34943
  return Promise.resolve();
34904
- return new Promise((resolve29) => {
34944
+ return new Promise((resolve30) => {
34905
34945
  const finish2 = /* @__PURE__ */ __name(() => {
34906
34946
  clearTimeout(timer);
34907
34947
  this.arrivals.delete(finish2);
34908
34948
  signal?.removeEventListener("abort", finish2);
34909
- resolve29();
34949
+ resolve30();
34910
34950
  }, "finish");
34911
34951
  const timer = setTimeout(finish2, timeoutMs);
34912
34952
  timer.unref?.();
@@ -35031,11 +35071,11 @@ ${JSON.stringify({ tasks: tasks2, omitted: this.ours.size - ids.length })}`;
35031
35071
  });
35032
35072
  if (settlements.length === 0)
35033
35073
  return this.drain();
35034
- await new Promise((resolve29) => {
35074
+ await new Promise((resolve30) => {
35035
35075
  const finish2 = /* @__PURE__ */ __name(() => {
35036
35076
  signal?.removeEventListener("abort", finish2);
35037
35077
  this.drains.delete(finish2);
35038
- resolve29();
35078
+ resolve30();
35039
35079
  }, "finish");
35040
35080
  this.drains.add(finish2);
35041
35081
  signal?.addEventListener("abort", finish2, { once: true });
@@ -39059,14 +39099,14 @@ async function awaitDecisionDurably(ctx, checkpoint, request, scope) {
39059
39099
  }, "record");
39060
39100
  let parkTimer;
39061
39101
  let recording = false;
39062
- const recordIfSlow = new Promise((resolve29) => {
39102
+ const recordIfSlow = new Promise((resolve30) => {
39063
39103
  parkTimer = setTimeout(() => {
39064
39104
  if (settled) {
39065
- resolve29();
39105
+ resolve30();
39066
39106
  return;
39067
39107
  }
39068
39108
  recording = true;
39069
- record3().then(resolve29, resolve29);
39109
+ record3().then(resolve30, resolve30);
39070
39110
  }, delay2);
39071
39111
  });
39072
39112
  try {
@@ -39115,13 +39155,13 @@ async function awaitDecisionOrAbort(ctx, request, scope) {
39115
39155
  const abortedDecision = /* @__PURE__ */ __name(() => scope && !turnSignal?.aborted ? scope.closedAs() : { action: "abort", reason: "run aborted while parked for HITL" }, "abortedDecision");
39116
39156
  if (signal.aborted)
39117
39157
  return abortedDecision();
39118
- return new Promise((resolve29) => {
39158
+ return new Promise((resolve30) => {
39119
39159
  let settled = false;
39120
39160
  const onAbort = /* @__PURE__ */ __name(() => {
39121
39161
  if (settled)
39122
39162
  return;
39123
39163
  settled = true;
39124
- resolve29(abortedDecision());
39164
+ resolve30(abortedDecision());
39125
39165
  }, "onAbort");
39126
39166
  signal.addEventListener("abort", onAbort, { once: true });
39127
39167
  Promise.resolve(ctx.resumeHandler(request, resumeContext)).then((decision2) => {
@@ -39129,13 +39169,13 @@ async function awaitDecisionOrAbort(ctx, request, scope) {
39129
39169
  return;
39130
39170
  settled = true;
39131
39171
  signal.removeEventListener("abort", onAbort);
39132
- resolve29(decision2);
39172
+ resolve30(decision2);
39133
39173
  }, (err) => {
39134
39174
  if (settled)
39135
39175
  return;
39136
39176
  settled = true;
39137
39177
  signal.removeEventListener("abort", onAbort);
39138
- resolve29({
39178
+ resolve30({
39139
39179
  action: "abort",
39140
39180
  reason: err instanceof Error ? err.message : "resume handler failed"
39141
39181
  });
@@ -39338,7 +39378,7 @@ __name(runPlanGate, "runPlanGate");
39338
39378
  import { isDeepStrictEqual as isDeepStrictEqual2 } from "node:util";
39339
39379
  async function awaitProjectInstructionCallback(signal, start) {
39340
39380
  signal.throwIfAborted();
39341
- return new Promise((resolve29, reject2) => {
39381
+ return new Promise((resolve30, reject2) => {
39342
39382
  let settled = false;
39343
39383
  const cleanup = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "cleanup");
39344
39384
  const rejectOnce = /* @__PURE__ */ __name((reason2) => {
@@ -39353,7 +39393,7 @@ async function awaitProjectInstructionCallback(signal, start) {
39353
39393
  return;
39354
39394
  settled = true;
39355
39395
  cleanup();
39356
- resolve29(value);
39396
+ resolve30(value);
39357
39397
  }, "resolveOnce");
39358
39398
  const onAbort = /* @__PURE__ */ __name(() => rejectOnce(signal.reason), "onAbort");
39359
39399
  signal.addEventListener("abort", onAbort, { once: true });
@@ -39663,7 +39703,7 @@ __name(attachRepeatNotice, "attachRepeatNotice");
39663
39703
 
39664
39704
  // ../sdk/dist/runtime/query/executor.js
39665
39705
  import { createHash as createHash14 } from "node:crypto";
39666
- import { join as join13 } from "node:path";
39706
+ import { join as join13, resolve as resolve8 } from "node:path";
39667
39707
 
39668
39708
  // ../sdk/dist/probe/context.js
39669
39709
  function buildProbeContext(input = {}) {
@@ -40772,8 +40812,8 @@ var ToolCallBudget = class {
40772
40812
  signal.throwIfAborted();
40773
40813
  const previous = this.chain;
40774
40814
  let release;
40775
- this.chain = new Promise((resolve29) => {
40776
- release = resolve29;
40815
+ this.chain = new Promise((resolve30) => {
40816
+ release = resolve30;
40777
40817
  });
40778
40818
  try {
40779
40819
  await previous;
@@ -41229,8 +41269,13 @@ var ToolExecutor = class {
41229
41269
  await this.awaitSandbox();
41230
41270
  const calls = /* @__PURE__ */ new Map();
41231
41271
  const escalations = /* @__PURE__ */ new Map();
41272
+ const earlierPaths = [];
41232
41273
  for (const toolCall of response.message.toolCalls ?? []) {
41233
- const call2 = await prepareDirectCall(this.admissionHost(), toolCall, !hostModifiedCallIds?.has(toolCall.id));
41274
+ const prepared = await prepareDirectCall(this.admissionHost(), toolCall, !hostModifiedCallIds?.has(toolCall.id));
41275
+ const call2 = await this.refusedBeforeReview(prepared, earlierPaths);
41276
+ const path2 = inputPathOf(prepared);
41277
+ if (path2 !== void 0)
41278
+ earlierPaths.push(path2);
41234
41279
  calls.set(toolCall.id, call2);
41235
41280
  const escalation = await this.escalationOrUnfinished(call2);
41236
41281
  if (escalation)
@@ -41239,6 +41284,45 @@ var ToolExecutor = class {
41239
41284
  this.config.abortSignal.throwIfAborted();
41240
41285
  return this.publishPreparedBatch(calls, escalations);
41241
41286
  }
41287
+ /**
41288
+ * A ready call the tool already knows cannot run, answered now instead of
41289
+ * after a reviewer has been asked about it (`ToolDefinition.refuseBeforeReview`).
41290
+ *
41291
+ * The refusal takes the place of the call, as any other refusal found while
41292
+ * preparing it does: it reaches no reviewer, runs nothing and answers the
41293
+ * model with the tool's own text. A hook that throws objects to nothing.
41294
+ */
41295
+ async refusedBeforeReview(call2, earlierPaths) {
41296
+ if (call2.kind !== "ready")
41297
+ return call2;
41298
+ const tool = this.config.tools.get(call2.toolName);
41299
+ if (!tool?.refuseBeforeReview)
41300
+ return call2;
41301
+ const path2 = inputPathOf(call2);
41302
+ if (path2 !== void 0) {
41303
+ const target = resolve8(this.config.workingDirectory, path2);
41304
+ if (earlierPaths.some((p) => resolve8(this.config.workingDirectory, p) === target))
41305
+ return call2;
41306
+ }
41307
+ try {
41308
+ const refusal3 = await tool.refuseBeforeReview(call2.input, this.buildToolContext());
41309
+ this.config.abortSignal.throwIfAborted();
41310
+ if (!refusal3)
41311
+ return call2;
41312
+ return {
41313
+ kind: "synthetic",
41314
+ toolCall: call2.toolCall,
41315
+ toolName: call2.toolName,
41316
+ input: call2.input,
41317
+ message: formatFailedToolOutput(void 0, refusal3.error),
41318
+ isError: true,
41319
+ ...refusal3.facts ? { facts: refusal3.facts } : {}
41320
+ };
41321
+ } catch {
41322
+ this.config.abortSignal.throwIfAborted();
41323
+ return call2;
41324
+ }
41325
+ }
41242
41326
  /**
41243
41327
  * {@link escalationOf}, except that a check which itself throws is not
41244
41328
  * read as "nothing found". The failure becomes an escalation of its own
@@ -41373,9 +41457,10 @@ var ToolExecutor = class {
41373
41457
  }
41374
41458
  const calls = new Map(previous.calls);
41375
41459
  const escalations = new Map(previous.escalations);
41460
+ const earlierPaths = [];
41376
41461
  for (const toolCall of response.message.toolCalls ?? []) {
41377
41462
  if (changedCallIds.has(toolCall.id)) {
41378
- const call2 = await prepareDirectCall(this.admissionHost(), toolCall, false);
41463
+ const call2 = await this.refusedBeforeReview(await prepareDirectCall(this.admissionHost(), toolCall, false), earlierPaths);
41379
41464
  calls.set(toolCall.id, call2);
41380
41465
  const escalation = await this.escalationOrUnfinished(call2);
41381
41466
  if (escalation)
@@ -41383,6 +41468,10 @@ var ToolExecutor = class {
41383
41468
  else
41384
41469
  escalations.delete(toolCall.id);
41385
41470
  }
41471
+ const prepared = calls.get(toolCall.id);
41472
+ const path2 = prepared ? inputPathOf(prepared) : void 0;
41473
+ if (path2 !== void 0)
41474
+ earlierPaths.push(path2);
41386
41475
  }
41387
41476
  this.config.abortSignal.throwIfAborted();
41388
41477
  return this.publishPreparedBatch(calls, escalations);
@@ -41612,7 +41701,7 @@ var ToolExecutor = class {
41612
41701
  let failure2;
41613
41702
  const settledUnits = /* @__PURE__ */ new Map();
41614
41703
  const refusedAfterEnd = "An earlier call in this batch was refused and the turn was stopped, so this call was not run.";
41615
- await new Promise((resolve29) => {
41704
+ await new Promise((resolve30) => {
41616
41705
  const start = /* @__PURE__ */ __name((unit) => {
41617
41706
  inFlight.add(unit);
41618
41707
  let settledUnit;
@@ -41660,7 +41749,7 @@ var ToolExecutor = class {
41660
41749
  start(unit);
41661
41750
  }
41662
41751
  if (cursor >= units.length && inFlight.size === 0)
41663
- resolve29();
41752
+ resolve30();
41664
41753
  }, "pump");
41665
41754
  review.ended.addEventListener("abort", pump, { once: true });
41666
41755
  pump();
@@ -42400,21 +42489,21 @@ ${note}`;
42400
42489
  let invocationOpen = true;
42401
42490
  const nestedDispatches = /* @__PURE__ */ new Set();
42402
42491
  try {
42403
- const expired = Number.isFinite(timeoutMs) && timeoutMs > 0 ? new Promise((resolve29) => {
42492
+ const expired = Number.isFinite(timeoutMs) && timeoutMs > 0 ? new Promise((resolve30) => {
42404
42493
  timer = setTimeout(() => {
42405
42494
  timedOut = true;
42406
42495
  controller.abort(new Error(`Tool "${toolName}" exceeded ${timeoutMs}ms`));
42407
- resolve29("timeout");
42496
+ resolve30("timeout");
42408
42497
  }, timeoutMs);
42409
42498
  }) : void 0;
42410
- const aborted = new Promise((resolve29) => {
42499
+ const aborted = new Promise((resolve30) => {
42411
42500
  if (controller.signal.aborted && !timedOut) {
42412
- resolve29("aborted");
42501
+ resolve30("aborted");
42413
42502
  return;
42414
42503
  }
42415
42504
  controller.signal.addEventListener("abort", () => {
42416
42505
  if (!timedOut)
42417
- resolve29("aborted");
42506
+ resolve30("aborted");
42418
42507
  }, { once: true });
42419
42508
  });
42420
42509
  const inheritedDispatch = toolContext.dispatchTool;
@@ -42956,8 +43045,8 @@ var Semaphore = class {
42956
43045
  this.available--;
42957
43046
  return Promise.resolve();
42958
43047
  }
42959
- return new Promise((resolve29) => {
42960
- this.waiters.push(resolve29);
43048
+ return new Promise((resolve30) => {
43049
+ this.waiters.push(resolve30);
42961
43050
  });
42962
43051
  }
42963
43052
  release() {
@@ -42968,6 +43057,11 @@ var Semaphore = class {
42968
43057
  this.available++;
42969
43058
  }
42970
43059
  };
43060
+ function inputPathOf(call2) {
43061
+ const input = call2.input;
43062
+ return input !== null && typeof input === "object" && typeof input.path === "string" ? input.path : void 0;
43063
+ }
43064
+ __name(inputPathOf, "inputPathOf");
42971
43065
 
42972
43066
  // ../sdk/dist/runtime/query/resume-pending.js
42973
43067
  import { isDeepStrictEqual as isDeepStrictEqual3 } from "node:util";
@@ -43824,8 +43918,8 @@ var PerCallReview = class {
43824
43918
  async admit(call2) {
43825
43919
  const before = this.#line;
43826
43920
  let leave;
43827
- this.#line = new Promise((resolve29) => {
43828
- leave = resolve29;
43921
+ this.#line = new Promise((resolve30) => {
43922
+ leave = resolve30;
43829
43923
  });
43830
43924
  try {
43831
43925
  const verdict = await this.#decide(call2, before, leave);
@@ -44336,8 +44430,8 @@ async function* runToolReview(ctx, response, iterationNum) {
44336
44430
  }
44337
44431
  const wakeup = /* @__PURE__ */ __name(() => {
44338
44432
  let notify;
44339
- const promise = new Promise((resolve29) => {
44340
- notify = resolve29;
44433
+ const promise = new Promise((resolve30) => {
44434
+ notify = resolve30;
44341
44435
  });
44342
44436
  return { promise, notify };
44343
44437
  }, "wakeup");
@@ -48953,7 +49047,7 @@ async function awaitStoreRead(signal, start) {
48953
49047
  if (!signal)
48954
49048
  return await start();
48955
49049
  signal.throwIfAborted();
48956
- return new Promise((resolve29, reject2) => {
49050
+ return new Promise((resolve30, reject2) => {
48957
49051
  let settled = false;
48958
49052
  const cleanup = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "cleanup");
48959
49053
  const rejectOnce = /* @__PURE__ */ __name((reason2) => {
@@ -48968,7 +49062,7 @@ async function awaitStoreRead(signal, start) {
48968
49062
  return;
48969
49063
  settled = true;
48970
49064
  cleanup();
48971
- resolve29(value);
49065
+ resolve30(value);
48972
49066
  }, "resolveOnce");
48973
49067
  const onAbort = /* @__PURE__ */ __name(() => rejectOnce(signal.reason), "onAbort");
48974
49068
  signal.addEventListener("abort", onAbort, { once: true });
@@ -49536,7 +49630,7 @@ var TurnContextFactory = class _TurnContextFactory {
49536
49630
 
49537
49631
  // ../sdk/dist/store/evidence/disk.js
49538
49632
  import { lstat as lstat4 } from "node:fs/promises";
49539
- import { resolve as resolve8 } from "node:path";
49633
+ import { resolve as resolve9 } from "node:path";
49540
49634
 
49541
49635
  // ../sdk/dist/store/evidence/index-page.js
49542
49636
  import { createHash as createHash16, createHmac, timingSafeEqual } from "node:crypto";
@@ -50223,7 +50317,7 @@ function createSource(options, mode, anchor) {
50223
50317
  const consistency = external_exports.enum(["closed", "snapshot"]).parse(options.consistency ?? "closed");
50224
50318
  const maxReadBytes = external_exports.number().int().min(1024 * 1024).max(PAGE_BYTES).parse(options.maxReadBytes ?? PAGE_BYTES);
50225
50319
  const scope = Object.freeze(scopeSchema.parse(options.scope));
50226
- const logPath = resolve8(options.logPath);
50320
+ const logPath = resolve9(options.logPath);
50227
50321
  if (!logPath.endsWith(".jsonl"))
50228
50322
  throw new Error("A session log path ends in .jsonl.");
50229
50323
  const sessionDir = logPath.slice(0, -".jsonl".length);
@@ -50512,8 +50606,8 @@ var EventTranslator = class {
50512
50606
  async withLogLock(operation) {
50513
50607
  const previous = this.appendChain;
50514
50608
  let release;
50515
- this.appendChain = new Promise((resolve29) => {
50516
- release = resolve29;
50609
+ this.appendChain = new Promise((resolve30) => {
50610
+ release = resolve30;
50517
50611
  });
50518
50612
  try {
50519
50613
  await previous;
@@ -50908,11 +51002,11 @@ async function teardownSandbox(sandbox, timeoutMs) {
50908
51002
  return await operation;
50909
51003
  let timer;
50910
51004
  let timedOut;
50911
- const deadline = new Promise((resolve29) => {
51005
+ const deadline = new Promise((resolve30) => {
50912
51006
  timer = setTimeout(() => {
50913
51007
  timedOut = teardownTimeoutError(timeoutMs);
50914
51008
  controller.abort(timedOut);
50915
- resolve29({ kind: "timed_out", error: timedOut });
51009
+ resolve30({ kind: "timed_out", error: timedOut });
50916
51010
  }, timeoutMs);
50917
51011
  });
50918
51012
  try {
@@ -50940,20 +51034,20 @@ async function acquireSandbox(options) {
50940
51034
  let timeoutError2;
50941
51035
  let timer;
50942
51036
  let onAbort;
50943
- const aborted = new Promise((resolve29) => {
51037
+ const aborted = new Promise((resolve30) => {
50944
51038
  onAbort = /* @__PURE__ */ __name(() => {
50945
51039
  operationController.abort(runSignal.reason);
50946
- resolve29({ kind: "cancelled" });
51040
+ resolve30({ kind: "cancelled" });
50947
51041
  }, "onAbort");
50948
51042
  runSignal.addEventListener("abort", onAbort, { once: true });
50949
51043
  });
50950
- const timedOut = new Promise((resolve29) => {
51044
+ const timedOut = new Promise((resolve30) => {
50951
51045
  if (options.timeoutMs === Number.POSITIVE_INFINITY)
50952
51046
  return;
50953
51047
  timer = setTimeout(() => {
50954
51048
  timeoutError2 = acquisitionTimeoutError(options.timeoutMs);
50955
51049
  operationController.abort(timeoutError2);
50956
- resolve29({ kind: "timed_out", error: timeoutError2 });
51050
+ resolve30({ kind: "timed_out", error: timeoutError2 });
50957
51051
  }, options.timeoutMs);
50958
51052
  });
50959
51053
  if (runSignal.aborted) {
@@ -51003,7 +51097,7 @@ __name(acquireSandbox, "acquireSandbox");
51003
51097
 
51004
51098
  // ../sdk/dist/runtime/query/session-storage.js
51005
51099
  import { readdir as readdir4, realpath as realpath5 } from "node:fs/promises";
51006
- import { basename as basename6, dirname as dirname13, join as join16, resolve as resolve9 } from "node:path";
51100
+ import { basename as basename6, dirname as dirname13, join as join16, resolve as resolve10 } from "node:path";
51007
51101
 
51008
51102
  // ../sdk/dist/store/budget/ledger.js
51009
51103
  var SESSION_TOKEN_BUDGET_VERSION = 2;
@@ -51692,7 +51786,7 @@ var SessionTokenBudget = class _SessionTokenBudget {
51692
51786
  };
51693
51787
 
51694
51788
  // ../sdk/dist/store/budget/disk.js
51695
- import { mkdir as mkdir10, readFile as readFile10, rename as rename4, unlink as unlink8, writeFile as writeFile4 } from "node:fs/promises";
51789
+ import { mkdir as mkdir10, readFile as readFile11, rename as rename4, unlink as unlink8, writeFile as writeFile4 } from "node:fs/promises";
51696
51790
  import { dirname as dirname12 } from "node:path";
51697
51791
  var DiskSessionTokenBudgetStore = class {
51698
51792
  static {
@@ -51747,7 +51841,7 @@ var DiskSessionTokenBudgetStore = class {
51747
51841
  async #read(path2, scope) {
51748
51842
  let text10;
51749
51843
  try {
51750
- text10 = await readFile10(path2, "utf8");
51844
+ text10 = await readFile11(path2, "utf8");
51751
51845
  } catch (error) {
51752
51846
  if (error.code === "ENOENT")
51753
51847
  return null;
@@ -51898,7 +51992,7 @@ async function placeInLayout(paths2, log) {
51898
51992
  }
51899
51993
  __name(placeInLayout, "placeInLayout");
51900
51994
  async function canonicalPath(path2) {
51901
- let existing = resolve9(path2);
51995
+ let existing = resolve10(path2);
51902
51996
  let remainder = "";
51903
51997
  for (; ; ) {
51904
51998
  const found = await realpath5(existing).catch(() => void 0);
@@ -51906,7 +52000,7 @@ async function canonicalPath(path2) {
51906
52000
  return remainder ? join16(found, remainder) : found;
51907
52001
  const parent = dirname13(existing);
51908
52002
  if (parent === existing)
51909
- return resolve9(path2);
52003
+ return resolve10(path2);
51910
52004
  remainder = remainder ? join16(basename6(existing), remainder) : basename6(existing);
51911
52005
  existing = parent;
51912
52006
  }
@@ -52115,8 +52209,8 @@ async function resolveProviderContextWindow(provider, model, signal, timeoutMs,
52115
52209
  const resolverSignal = signal ? AbortSignal.any([signal, deadline.signal]) : deadline.signal;
52116
52210
  const interrupted = /* @__PURE__ */ Symbol("provider-context-window-interrupted");
52117
52211
  let onAbort;
52118
- const interruption = new Promise((resolve29) => {
52119
- onAbort = /* @__PURE__ */ __name(() => resolve29(interrupted), "onAbort");
52212
+ const interruption = new Promise((resolve30) => {
52213
+ onAbort = /* @__PURE__ */ __name(() => resolve30(interrupted), "onAbort");
52120
52214
  resolverSignal.addEventListener("abort", onAbort, { once: true });
52121
52215
  });
52122
52216
  const deadlineMs = timeoutMs === 0 ? 5e3 : Math.min(Math.max(0, timeoutMs), 2147483647);
@@ -56731,7 +56825,7 @@ __name(createMemoryRecallStep, "createMemoryRecallStep");
56731
56825
  // ../sdk/dist/execution/local.js
56732
56826
  import { spawn } from "node:child_process";
56733
56827
  import { existsSync as existsSync3 } from "node:fs";
56734
- import { resolve as resolve10 } from "node:path";
56828
+ import { resolve as resolve11 } from "node:path";
56735
56829
 
56736
56830
  // ../sdk/dist/execution/base.js
56737
56831
  var InitializationSupersededError = class extends Error {
@@ -57022,7 +57116,7 @@ var LocalExecutionContext = class extends BaseExecutionContext {
57022
57116
  constructor(options) {
57023
57117
  super(options.log);
57024
57118
  this.id = options.id;
57025
- this.cwd = resolve10(options.cwd);
57119
+ this.cwd = resolve11(options.cwd);
57026
57120
  this.fsAccess = options.fsAccess ?? true;
57027
57121
  this.envVars = options.envVars ?? {};
57028
57122
  this.capabilities = options.capabilities ?? ["filesystem", "process", "shell"];
@@ -57058,7 +57152,7 @@ var LocalExecutionContext = class extends BaseExecutionContext {
57058
57152
  return this.cwd;
57059
57153
  }
57060
57154
  setCwd(newCwd) {
57061
- const resolved2 = resolve10(newCwd);
57155
+ const resolved2 = resolve11(newCwd);
57062
57156
  if (!existsSync3(resolved2)) {
57063
57157
  throw new Error(`Working directory does not exist: ${resolved2}`);
57064
57158
  }
@@ -57068,7 +57162,7 @@ var LocalExecutionContext = class extends BaseExecutionContext {
57068
57162
  return this.fsAccess;
57069
57163
  }
57070
57164
  resolvePath(relativePath) {
57071
- return resolve10(this.cwd, relativePath);
57165
+ return resolve11(this.cwd, relativePath);
57072
57166
  }
57073
57167
  getEnvVar(key5) {
57074
57168
  return this.envVars[key5] ?? process.env[key5];
@@ -57096,7 +57190,7 @@ var LocalExecutionContext = class extends BaseExecutionContext {
57096
57190
  durationMs: 0
57097
57191
  };
57098
57192
  }
57099
- const cwd = options?.cwd ? resolve10(this.cwd, options.cwd) : this.cwd;
57193
+ const cwd = options?.cwd ? resolve11(this.cwd, options.cwd) : this.cwd;
57100
57194
  const env = { ...process.env, ...this.envVars, ...options?.env };
57101
57195
  const timeoutMs = options?.timeoutMs ?? LOCAL_COMMAND_DEFAULT_TIMEOUT_MS;
57102
57196
  if (!Number.isInteger(timeoutMs) || timeoutMs < 0) {
@@ -57227,9 +57321,9 @@ var LocalExecutionContext = class extends BaseExecutionContext {
57227
57321
 
57228
57322
  // ../sdk/dist/turn/workspace-fingerprint.js
57229
57323
  import { createHash as createHash17 } from "node:crypto";
57230
- import { lstat as lstat5, readFile as readFile11, readlink } from "node:fs/promises";
57324
+ import { lstat as lstat5, readFile as readFile12, readlink } from "node:fs/promises";
57231
57325
  import { join as join20 } from "node:path";
57232
- var NODE_FS = { lstat: lstat5, readlink, readFile: readFile11 };
57326
+ var NODE_FS = { lstat: lstat5, readlink, readFile: readFile12 };
57233
57327
  var FINGERPRINT_MAX_BYTES = 4 * 1024 * 1024;
57234
57328
  var FINGERPRINT_TIMEOUT_MS = 2e4;
57235
57329
  async function untrackedEntry(cwd, rel, fs) {
@@ -57708,7 +57802,7 @@ function assertReadableScalar(key5, value, source) {
57708
57802
  __name(assertReadableScalar, "assertReadableScalar");
57709
57803
 
57710
57804
  // ../sdk/dist/skills/loader.js
57711
- import { readFile as readFile12, readdir as readdir7, stat as stat7 } from "node:fs/promises";
57805
+ import { readFile as readFile13, readdir as readdir7, stat as stat7 } from "node:fs/promises";
57712
57806
  import { basename as basename8, join as join21 } from "node:path";
57713
57807
  var SKILL_FILENAME = "SKILL.md";
57714
57808
  var SKILL_FRONTMATTER_KEYS = Object.freeze([
@@ -57829,7 +57923,7 @@ function estimateTokens2(text10) {
57829
57923
  __name(estimateTokens2, "estimateTokens");
57830
57924
  async function loadSkill(dirPath, level = "metadata", log) {
57831
57925
  const skillMdPath = join21(dirPath, SKILL_FILENAME);
57832
- const raw = await readFile12(skillMdPath, "utf-8");
57926
+ const raw = await readFile13(skillMdPath, "utf-8");
57833
57927
  const parsed = parseFrontmatter(raw, sourceLabel(dirPath), SKILL_FRONTMATTER_OPTIONS);
57834
57928
  const metadata = toSkillMetadata(parsed, dirPath);
57835
57929
  const skill = {
@@ -58156,15 +58250,15 @@ var DiskTaskStore = class {
58156
58250
  break;
58157
58251
  await existing.catch(() => void 0);
58158
58252
  }
58159
- let resolve29;
58253
+ let resolve30;
58160
58254
  const lock = new Promise((r) => {
58161
- resolve29 = r;
58255
+ resolve30 = r;
58162
58256
  });
58163
58257
  this.locks.set(taskId, lock);
58164
58258
  try {
58165
58259
  return await fn();
58166
58260
  } finally {
58167
- resolve29?.();
58261
+ resolve30?.();
58168
58262
  if (this.locks.get(taskId) === lock) {
58169
58263
  this.locks.delete(taskId);
58170
58264
  }
@@ -58484,8 +58578,8 @@ var DiskTaskStore = class {
58484
58578
 
58485
58579
  // ../sdk/dist/store/memory/markdown.js
58486
58580
  import { createHash as createHash20 } from "node:crypto";
58487
- import { lstat as lstat7, mkdir as mkdir13, readFile as readFile14, readdir as readdir8, realpath as realpath6, rename as rename6, unlink as unlink11 } from "node:fs/promises";
58488
- import { dirname as dirname15, join as join24, resolve as resolve11 } from "node:path";
58581
+ import { lstat as lstat7, mkdir as mkdir13, readFile as readFile15, readdir as readdir8, realpath as realpath6, rename as rename6, unlink as unlink11 } from "node:fs/promises";
58582
+ import { dirname as dirname15, join as join24, resolve as resolve12 } from "node:path";
58489
58583
 
58490
58584
  // ../sdk/dist/store/memory/index-file.js
58491
58585
  var MEMORY_INDEX_MAX_LINES = 200;
@@ -58702,7 +58796,7 @@ __name(formatMemoryFile, "formatMemoryFile");
58702
58796
 
58703
58797
  // ../sdk/dist/store/memory/operation-lock.js
58704
58798
  import { randomUUID as randomUUID4 } from "node:crypto";
58705
- import { lstat as lstat6, open as open9, readFile as readFile13, unlink as unlink10 } from "node:fs/promises";
58799
+ import { lstat as lstat6, open as open9, readFile as readFile14, unlink as unlink10 } from "node:fs/promises";
58706
58800
  import { setTimeout as delay } from "node:timers/promises";
58707
58801
  var DEFAULT_MEMORY_LOCK_TIMEOUT_MS = 1e4;
58708
58802
  function validateMemoryLockTimeout(timeoutMs) {
@@ -58774,7 +58868,7 @@ async function acquireMemoryOperationLock(path2, timeoutMs) {
58774
58868
  await handle.close();
58775
58869
  return async () => {
58776
58870
  const current = await lstat6(path2);
58777
- if (!current.isFile() || current.isSymbolicLink() || current.dev !== identity.dev || current.ino !== identity.ino || await readFile13(path2, "utf8") !== owner) {
58871
+ if (!current.isFile() || current.isSymbolicLink() || current.dev !== identity.dev || current.ino !== identity.ino || await readFile14(path2, "utf8") !== owner) {
58778
58872
  throw lockError(path2, "the lock owner changed before release", timeoutMs);
58779
58873
  }
58780
58874
  await unlink10(path2);
@@ -59059,7 +59153,7 @@ var MarkdownMemoryStore = class {
59059
59153
  lockTimeoutMs;
59060
59154
  canonical;
59061
59155
  constructor(config) {
59062
- this.directory = resolve11(config.directory);
59156
+ this.directory = resolve12(config.directory);
59063
59157
  this.log = resolveLogger(config.logger).child({
59064
59158
  [SCOPE_ATTRIBUTE]: "store/memory/markdown"
59065
59159
  });
@@ -59080,7 +59174,7 @@ var MarkdownMemoryStore = class {
59080
59174
  memoryPath(dir, name2) {
59081
59175
  if (!isMemoryName(name2))
59082
59176
  invalidFile(join24(dir, `${name2}.md`), "name is not a memory name");
59083
- const path2 = resolve11(entryPath(dir, name2, ".md"));
59177
+ const path2 = resolve12(entryPath(dir, name2, ".md"));
59084
59178
  if (dirname15(path2) !== dir)
59085
59179
  invalidFile(path2, "resolved path escapes the memory directory");
59086
59180
  return path2;
@@ -59111,7 +59205,7 @@ var MarkdownMemoryStore = class {
59111
59205
  if (stat15.size > MEMORY_FILE_MAX_BYTES) {
59112
59206
  invalidFile(path2, `larger than the ${MEMORY_FILE_MAX_BYTES}-byte memory file limit`);
59113
59207
  }
59114
- const bytes = await readFile14(path2);
59208
+ const bytes = await readFile15(path2);
59115
59209
  let raw;
59116
59210
  try {
59117
59211
  raw = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
@@ -59211,7 +59305,7 @@ var MarkdownMemoryStore = class {
59211
59305
  ${text10 ? `${text10}
59212
59306
  ` : ""}`;
59213
59307
  const path2 = join24(dir, MEMORY_INDEX_FILE);
59214
- const current = await readFile14(path2, "utf-8").catch(() => void 0);
59308
+ const current = await readFile15(path2, "utf-8").catch(() => void 0);
59215
59309
  if (current !== next)
59216
59310
  await atomicWriteFile(path2, next, { mode: FILE_MODE });
59217
59311
  }
@@ -59454,7 +59548,7 @@ ${text10 ? `${text10}
59454
59548
 
59455
59549
  // ../sdk/dist/store/memory/disk.js
59456
59550
  import { mkdir as mkdir14, realpath as realpath7, unlink as unlink12 } from "node:fs/promises";
59457
- import { dirname as dirname16, join as join25, resolve as resolve12 } from "node:path";
59551
+ import { dirname as dirname16, join as join25, resolve as resolve13 } from "node:path";
59458
59552
  var SCHEMA5 = defineSchema({ kind: "memory-store", current: 1, migrations: {} });
59459
59553
  function invalidIndex(reason2, details = {}) {
59460
59554
  throw new NamzuError({
@@ -59570,7 +59664,7 @@ var DiskMemoryStore = class {
59570
59664
  records = new DiskRecordStore(SCHEMA5);
59571
59665
  indexRecords = new DiskRecordStore(SCHEMA5);
59572
59666
  constructor(config) {
59573
- this.baseDir = config.directory === void 0 ? join25(config.baseDir, "memory") : resolve12(config.directory);
59667
+ this.baseDir = config.directory === void 0 ? join25(config.baseDir, "memory") : resolve13(config.directory);
59574
59668
  this.log = resolveLogger(config.logger).child({ [SCOPE_ATTRIBUTE]: "store/memory/disk" });
59575
59669
  this.lockTimeoutMs = config.lockTimeoutMs ?? DEFAULT_MEMORY_LOCK_TIMEOUT_MS;
59576
59670
  validateMemoryLockTimeout(this.lockTimeoutMs);
@@ -59597,7 +59691,7 @@ var DiskMemoryStore = class {
59597
59691
  }
59598
59692
  contentPath(location, id3) {
59599
59693
  assertStorageMemoryId(id3, (reason2) => invalidContent(id3, reason2, { field: "id" }));
59600
- const path2 = resolve12(entryPath(location.contentDir, id3, ".json"));
59694
+ const path2 = resolve13(entryPath(location.contentDir, id3, ".json"));
59601
59695
  if (dirname16(path2) !== location.contentDir) {
59602
59696
  invalidContent(id3, "resolved path escapes the content directory", { field: "id" });
59603
59697
  }
@@ -62603,7 +62697,7 @@ var MockLLMProvider = class {
62603
62697
  async delay() {
62604
62698
  if (this.responseDelayMs <= 0)
62605
62699
  return;
62606
- await new Promise((resolve29) => setTimeout(resolve29, this.responseDelayMs));
62700
+ await new Promise((resolve30) => setTimeout(resolve30, this.responseDelayMs));
62607
62701
  }
62608
62702
  /**
62609
62703
  * The turn to play. A script shorter than the turn repeats its last
@@ -62981,7 +63075,7 @@ var StdioTransport = class {
62981
63075
  this.exitPending = false;
62982
63076
  return;
62983
63077
  }
62984
- await new Promise((resolve29) => {
63078
+ await new Promise((resolve30) => {
62985
63079
  let settled = false;
62986
63080
  const finish2 = /* @__PURE__ */ __name(() => {
62987
63081
  if (settled)
@@ -62989,7 +63083,7 @@ var StdioTransport = class {
62989
63083
  settled = true;
62990
63084
  clearTimeout(escalate);
62991
63085
  clearTimeout(giveUp);
62992
- resolve29();
63086
+ resolve30();
62993
63087
  }, "finish");
62994
63088
  child.once("close", finish2);
62995
63089
  child.once("error", finish2);
@@ -64264,7 +64358,7 @@ async function resolveMcpEra(input) {
64264
64358
  __name(resolveMcpEra, "resolveMcpEra");
64265
64359
 
64266
64360
  // ../sdk/dist/version.js
64267
- var VERSION2 = "56.0.1";
64361
+ var VERSION2 = "56.1.0";
64268
64362
 
64269
64363
  // ../sdk/dist/connector/mcp/client.js
64270
64364
  var MAX_LIST_PAGES = 100;
@@ -64588,7 +64682,7 @@ var MCPClient = class {
64588
64682
  capabilities: this.config.capabilities ?? {}
64589
64683
  });
64590
64684
  const controller = new AbortController();
64591
- return new Promise((resolve29) => {
64685
+ return new Promise((resolve30) => {
64592
64686
  let settled = false;
64593
64687
  const finish2 = /* @__PURE__ */ __name((answer) => {
64594
64688
  if (settled)
@@ -64597,7 +64691,7 @@ var MCPClient = class {
64597
64691
  clearTimeout(timer);
64598
64692
  if (this.pendingRequests.get(id3) === entry)
64599
64693
  this.pendingRequests.delete(id3);
64600
- resolve29(answer);
64694
+ resolve30(answer);
64601
64695
  }, "finish");
64602
64696
  const entry = {
64603
64697
  resolve: /* @__PURE__ */ __name((value) => finish2({ kind: "result", result: value }), "resolve"),
@@ -65171,8 +65265,8 @@ var MCPClient = class {
65171
65265
  let settled = false;
65172
65266
  let resolvePublic;
65173
65267
  let rejectPublic;
65174
- const result = new Promise((resolve29, reject2) => {
65175
- resolvePublic = resolve29;
65268
+ const result = new Promise((resolve30, reject2) => {
65269
+ resolvePublic = resolve30;
65176
65270
  rejectPublic = reject2;
65177
65271
  });
65178
65272
  const entry = {
@@ -66016,14 +66110,14 @@ var MCPReconnectSupervisor = class {
66016
66110
  });
66017
66111
  }
66018
66112
  wait(ms) {
66019
- return new Promise((resolve29) => {
66113
+ return new Promise((resolve30) => {
66020
66114
  const finish2 = /* @__PURE__ */ __name(() => {
66021
66115
  if (this.timer)
66022
66116
  clearTimeout(this.timer);
66023
66117
  this.timer = void 0;
66024
66118
  if (this.finishWait === finish2)
66025
66119
  this.finishWait = void 0;
66026
- resolve29();
66120
+ resolve30();
66027
66121
  }, "finish");
66028
66122
  this.finishWait = finish2;
66029
66123
  this.timer = setTimeout(finish2, ms);
@@ -66654,7 +66748,7 @@ var ACPServer = class {
66654
66748
  request(method, params, signal) {
66655
66749
  this.requestSeq += 1;
66656
66750
  const id3 = `agent_${this.requestSeq}`;
66657
- return new Promise((resolve29, reject2) => {
66751
+ return new Promise((resolve30, reject2) => {
66658
66752
  const finish2 = /* @__PURE__ */ __name(() => {
66659
66753
  if (this.pending.get(id3) !== entry)
66660
66754
  return false;
@@ -66669,7 +66763,7 @@ var ACPServer = class {
66669
66763
  const entry = {
66670
66764
  resolve: /* @__PURE__ */ __name((value) => {
66671
66765
  if (finish2())
66672
- resolve29(value);
66766
+ resolve30(value);
66673
66767
  }, "resolve"),
66674
66768
  reject: /* @__PURE__ */ __name((error) => {
66675
66769
  if (finish2())
@@ -68404,7 +68498,7 @@ __name(createResidentEvidenceRecallStep, "createResidentEvidenceRecallStep");
68404
68498
  // ../sdk/dist/pals/store.js
68405
68499
  import { randomUUID as randomUUID7 } from "node:crypto";
68406
68500
  import { chmodSync, closeSync, fsyncSync, linkSync, lstatSync as lstatSync3, mkdirSync as mkdirSync3, openSync, readFileSync, readdirSync, realpathSync as realpathSync3, unlinkSync, writeSync } from "node:fs";
68407
- import { dirname as dirname17, isAbsolute as isAbsolute8, join as join27, relative as relative4, resolve as resolve13, sep as sep6 } from "node:path";
68501
+ import { dirname as dirname17, isAbsolute as isAbsolute8, join as join27, relative as relative4, resolve as resolve14, sep as sep6 } from "node:path";
68408
68502
  var ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u;
68409
68503
  var REVISION_FILE = /^[1-9][0-9]*\.json$/u;
68410
68504
  var PalConflictError = class extends Error {
@@ -68425,7 +68519,7 @@ function palId(id3) {
68425
68519
  }
68426
68520
  __name(palId, "palId");
68427
68521
  function homePath(home) {
68428
- const path2 = resolve13(home);
68522
+ const path2 = resolve14(home);
68429
68523
  mkdirSync3(path2, { recursive: true, mode: 448 });
68430
68524
  const entry = lstatSync3(path2);
68431
68525
  if (!entry.isDirectory() || entry.isSymbolicLink())
@@ -68672,7 +68766,7 @@ var DiskPalStore = class {
68672
68766
  }
68673
68767
  /** Exact validated host control directory; never an execution-computer claim. */
68674
68768
  atWorkspace(cwd) {
68675
- const lexical = resolve13(cwd);
68769
+ const lexical = resolve14(cwd);
68676
68770
  const canonical3 = realpathSync3(lexical);
68677
68771
  const lexicalReserved = contained(lexical, this.workspaceRoot);
68678
68772
  const canonicalReserved = contained(canonical3, this.workspaceRoot);
@@ -70189,10 +70283,10 @@ var ExternalHarnessSession = class {
70189
70283
  }
70190
70284
  }
70191
70285
  makeActive(turnId6, operationId, startedAt) {
70192
- let resolve29;
70286
+ let resolve30;
70193
70287
  let reject2;
70194
70288
  const done = new Promise((yes, no) => {
70195
- resolve29 = yes;
70289
+ resolve30 = yes;
70196
70290
  reject2 = no;
70197
70291
  });
70198
70292
  void done.catch(() => void 0);
@@ -70202,7 +70296,7 @@ var ExternalHarnessSession = class {
70202
70296
  startedAt,
70203
70297
  items: /* @__PURE__ */ new Map(),
70204
70298
  reviews: /* @__PURE__ */ new Map(),
70205
- resolve: resolve29,
70299
+ resolve: resolve30,
70206
70300
  reject: reject2,
70207
70301
  done
70208
70302
  };
@@ -71413,7 +71507,7 @@ ${line}`;
71413
71507
  stdout: true,
71414
71508
  stderr: true
71415
71509
  });
71416
- return await new Promise((resolve29) => {
71510
+ return await new Promise((resolve30) => {
71417
71511
  let settled = false;
71418
71512
  let terminal;
71419
71513
  const inFlight = /* @__PURE__ */ new Set();
@@ -71428,7 +71522,7 @@ ${line}`;
71428
71522
  clearTimeout(deadline);
71429
71523
  options.signal?.removeEventListener("abort", onAbort);
71430
71524
  void worker.terminate();
71431
- resolve29({ ...result, calls: [...calls] });
71525
+ resolve30({ ...result, calls: [...calls] });
71432
71526
  }, "finish");
71433
71527
  const finishTerminalWhenHostCallsSettle = /* @__PURE__ */ __name(() => {
71434
71528
  if (terminal && inFlight.size === 0)
@@ -72857,8 +72951,8 @@ ${body}`,
72857
72951
  let timer;
72858
72952
  await Promise.race([
72859
72953
  Promise.allSettled([...inFlight]),
72860
- new Promise((resolve29) => {
72861
- timer = setTimeout(resolve29, grace);
72954
+ new Promise((resolve30) => {
72955
+ timer = setTimeout(resolve30, grace);
72862
72956
  })
72863
72957
  ]);
72864
72958
  clearTimeout(timer);
@@ -74059,7 +74153,7 @@ function toHandle(task) {
74059
74153
  __name(toHandle, "toHandle");
74060
74154
 
74061
74155
  // ../sdk/dist/agents/file-definitions.js
74062
- import { readFile as readFile15, readdir as readdir9, stat as stat9 } from "node:fs/promises";
74156
+ import { readFile as readFile16, readdir as readdir9, stat as stat9 } from "node:fs/promises";
74063
74157
  import { join as join29 } from "node:path";
74064
74158
  var MAX_AGENT_FILE_CHARS = 32e3;
74065
74159
  var MAX_AGENT_FILE_BYTES = 4 * 1024 * 1024;
@@ -74097,7 +74191,7 @@ async function parseAgentFile(path2, source, reserved = DEFAULT_RESERVED_AGENT_N
74097
74191
  if ((await stat9(path2)).size > MAX_AGENT_FILE_BYTES) {
74098
74192
  return { path: path2, reason: "is larger than 4 MiB, which no agent file is" };
74099
74193
  }
74100
- raw = await readFile15(path2, "utf8");
74194
+ raw = await readFile16(path2, "utf8");
74101
74195
  } catch (error) {
74102
74196
  return {
74103
74197
  path: path2,
@@ -74259,9 +74353,9 @@ var PluginRegistry = class extends ManagedRegistry {
74259
74353
  };
74260
74354
 
74261
74355
  // ../sdk/dist/plugin/loader.js
74262
- import { lstat as lstat8, readFile as readFile16, readdir as readdir10, realpath as realpath8 } from "node:fs/promises";
74356
+ import { lstat as lstat8, readFile as readFile17, readdir as readdir10, realpath as realpath8 } from "node:fs/promises";
74263
74357
  import { homedir as homedir4, platform } from "node:os";
74264
- import { join as join30, resolve as resolve14 } from "node:path";
74358
+ import { join as join30, resolve as resolve15 } from "node:path";
74265
74359
 
74266
74360
  // ../sdk/dist/types/plugin/index.js
74267
74361
  var RENAMED_PLUGIN_HOOK_EVENTS = {
@@ -74376,7 +74470,7 @@ async function loadPluginManifest(pluginDir, capabilities2 = {}) {
74376
74470
  if (manifestEntry.isSymbolicLink() || !manifestEntry.isFile()) {
74377
74471
  throw new Error(`Plugin manifest must be a regular file, not a symlink: ${manifestPath}`);
74378
74472
  }
74379
- const raw = await readFile16(manifestPath, "utf-8");
74473
+ const raw = await readFile17(manifestPath, "utf-8");
74380
74474
  const parsed = JSON.parse(raw);
74381
74475
  const manifest = PluginManifestSchema.parse(parsed);
74382
74476
  assertEnableable(manifest, capabilities2);
@@ -74444,7 +74538,7 @@ async function samePhysicalDirectory(left, right) {
74444
74538
  try {
74445
74539
  value = await realpath8(path2);
74446
74540
  } catch {
74447
- value = resolve14(path2);
74541
+ value = resolve15(path2);
74448
74542
  }
74449
74543
  return platform() === "win32" ? value.toLocaleLowerCase("en-US") : value;
74450
74544
  }, "canonical");
@@ -75401,7 +75495,7 @@ function runShellHook(entry, input, signal) {
75401
75495
  });
75402
75496
  const toolPath = pathOf(input.toolInput);
75403
75497
  const { NAMZU_TURN_ID: _inheritedTurnId, ...inherited } = process.env;
75404
- return new Promise((resolve29) => {
75498
+ return new Promise((resolve30) => {
75405
75499
  let child;
75406
75500
  try {
75407
75501
  child = spawnHostShell(entry.command, {
@@ -75428,7 +75522,7 @@ function runShellHook(entry, input, signal) {
75428
75522
  ...process.platform === "win32" ? {} : { shell: { path: "sh", dialect: "sh", source: "sh" } }
75429
75523
  });
75430
75524
  } catch (error) {
75431
- resolve29({
75525
+ resolve30({
75432
75526
  exitCode: null,
75433
75527
  timedOut: false,
75434
75528
  stdout: "",
@@ -75454,7 +75548,7 @@ function runShellHook(entry, input, signal) {
75454
75548
  settled = true;
75455
75549
  clearTimeout(timer);
75456
75550
  signal?.removeEventListener("abort", onAbort);
75457
- resolve29(outcome);
75551
+ resolve30(outcome);
75458
75552
  }, "finish");
75459
75553
  const killTree2 = /* @__PURE__ */ __name(() => {
75460
75554
  if (child.pid !== void 0 && process.platform !== "win32") {
@@ -76006,7 +76100,7 @@ __name(summarizeBlocking, "summarizeBlocking");
76006
76100
 
76007
76101
  // ../sdk/dist/manager/agent/lifecycle.js
76008
76102
  import { realpath as realpath9, rm as rm2, stat as stat10 } from "node:fs/promises";
76009
- import { isAbsolute as isAbsolute9, relative as relative5, resolve as resolve15, sep as sep7 } from "node:path";
76103
+ import { isAbsolute as isAbsolute9, relative as relative5, resolve as resolve16, sep as sep7 } from "node:path";
76010
76104
 
76011
76105
  // ../sdk/dist/session/handoff/capacity.js
76012
76106
  var DelegationCapacityExceeded = class extends Error {
@@ -76097,14 +76191,14 @@ function mergeEnv(base3, override) {
76097
76191
  __name(mergeEnv, "mergeEnv");
76098
76192
  async function requireIsolatedWorktreePath(ref, callerCwd, subdirectory) {
76099
76193
  const meta = ref?.meta;
76100
- if (typeof ref?.id !== "string" || ref.id.length === 0 || meta?.backend !== "git-worktree" || typeof meta.repoRoot !== "string" || !isAbsolute9(meta.repoRoot) || typeof meta.branch !== "string" || meta.branch.length === 0 || typeof meta.worktreePath !== "string" || !isAbsolute9(meta.worktreePath) || resolve15(meta.worktreePath) === resolve15(callerCwd ?? process.cwd())) {
76194
+ if (typeof ref?.id !== "string" || ref.id.length === 0 || meta?.backend !== "git-worktree" || typeof meta.repoRoot !== "string" || !isAbsolute9(meta.repoRoot) || typeof meta.branch !== "string" || meta.branch.length === 0 || typeof meta.worktreePath !== "string" || !isAbsolute9(meta.worktreePath) || resolve16(meta.worktreePath) === resolve16(callerCwd ?? process.cwd())) {
76101
76195
  throw new Error("Isolated git-worktree driver returned an invalid workspace ref or path");
76102
76196
  }
76103
76197
  let physicalPaths;
76104
76198
  try {
76105
76199
  physicalPaths = await Promise.all([
76106
76200
  realpath9(meta.worktreePath),
76107
- realpath9(resolve15(callerCwd ?? process.cwd()))
76201
+ realpath9(resolve16(callerCwd ?? process.cwd()))
76108
76202
  ]);
76109
76203
  if (!(await stat10(physicalPaths[0])).isDirectory()) {
76110
76204
  throw new Error("The worktree path is not a directory");
@@ -76122,8 +76216,8 @@ async function requireIsolatedWorktreePath(ref, callerCwd, subdirectory) {
76122
76216
  if (typeof subdirectory !== "string" || subdirectory.length === 0 || isAbsolute9(subdirectory)) {
76123
76217
  throw new Error("Isolated workspace subdirectory must be a nonempty relative path");
76124
76218
  }
76125
- const lexicalChild = resolve15(meta.worktreePath, subdirectory);
76126
- const lexicalRelative = relative5(resolve15(meta.worktreePath), lexicalChild);
76219
+ const lexicalChild = resolve16(meta.worktreePath, subdirectory);
76220
+ const lexicalRelative = relative5(resolve16(meta.worktreePath), lexicalChild);
76127
76221
  if (isAbsolute9(lexicalRelative) || lexicalRelative === ".." || lexicalRelative.startsWith(`..${sep7}`)) {
76128
76222
  throw new Error("Isolated workspace subdirectory escapes the worktree");
76129
76223
  }
@@ -76932,9 +77026,9 @@ var AgentManager = class {
76932
77026
  if (isTerminalAgentTaskState(agentTask.state)) {
76933
77027
  return Promise.resolve();
76934
77028
  }
76935
- return new Promise((resolve29) => {
77029
+ return new Promise((resolve30) => {
76936
77030
  const existing = this.completionCallbacks.get(taskId) ?? [];
76937
- existing.push(resolve29);
77031
+ existing.push(resolve30);
76938
77032
  this.completionCallbacks.set(taskId, existing);
76939
77033
  });
76940
77034
  }
@@ -77141,7 +77235,7 @@ var AgentManager = class {
77141
77235
  origin,
77142
77236
  topicId: context2.topicId,
77143
77237
  projectId: context2.projectId,
77144
- cwd: resolve15(options.input.workingDirectory ?? process.cwd()),
77238
+ cwd: resolve16(options.input.workingDirectory ?? process.cwd()),
77145
77239
  log,
77146
77240
  activeSubSessionId: origin.subSessionId
77147
77241
  });
@@ -77286,7 +77380,7 @@ var AgentManager = class {
77286
77380
  },
77287
77381
  topicId: context2.topicId,
77288
77382
  projectId: context2.projectId,
77289
- cwd: resolve15(options.workingDirectory),
77383
+ cwd: resolve16(options.workingDirectory),
77290
77384
  log
77291
77385
  });
77292
77386
  return restored;
@@ -77314,7 +77408,7 @@ var AgentManager = class {
77314
77408
  throw new Error("Child conversation is still running or settling");
77315
77409
  if (origin.workspaceRef || options.workspace?.mode === "isolated" || options.workspaceBackend)
77316
77410
  throw new Error("Child continuation requires a shared workspace; isolated leases cannot be resumed");
77317
- if (resolve15(options.input.workingDirectory ?? process.cwd()) !== conversation.cwd)
77411
+ if (resolve16(options.input.workingDirectory ?? process.cwd()) !== conversation.cwd)
77318
77412
  throw new Error("Child continuation cannot change its working directory");
77319
77413
  const store = this.deps.sessionStore;
77320
77414
  if (store.supportsInvocationSummaries !== true || store.supportsOwnerVersionCas !== true)
@@ -77653,8 +77747,8 @@ var AgentManager = class {
77653
77747
  resolveCompletionCallbacks(taskId) {
77654
77748
  const callbacks = this.completionCallbacks.get(taskId);
77655
77749
  if (callbacks) {
77656
- for (const resolve29 of callbacks)
77657
- resolve29();
77750
+ for (const resolve30 of callbacks)
77751
+ resolve30();
77658
77752
  this.completionCallbacks.delete(taskId);
77659
77753
  }
77660
77754
  }
@@ -77848,7 +77942,7 @@ import { spawn as spawn3, spawnSync } from "node:child_process";
77848
77942
  import { constants as constants3, accessSync as accessSync2, existsSync as existsSync4, realpathSync as realpathSync4 } from "node:fs";
77849
77943
  import { readFile as fsReadFile, writeFile as fsWriteFile, mkdir as mkdir16, open as open10, readdir as readdir11, rename as rename7, rm as rm3, stat as stat11 } from "node:fs/promises";
77850
77944
  import { tmpdir as tmpdir2 } from "node:os";
77851
- import { dirname as dirname18, isAbsolute as isAbsolute11, join as join31, parse as parse3, resolve as resolve16 } from "node:path";
77945
+ import { dirname as dirname18, isAbsolute as isAbsolute11, join as join31, parse as parse3, resolve as resolve17 } from "node:path";
77852
77946
 
77853
77947
  // ../sdk/dist/sandbox/file-walk.js
77854
77948
  var import_brace_expansion2 = __toESM(require_brace_expansion(), 1);
@@ -80028,7 +80122,7 @@ var LocalSandbox = class {
80028
80122
  this.rootDir = rootDir;
80029
80123
  this.environment = environment;
80030
80124
  this.config = config;
80031
- this.additionalDirectories = (config.additionalDirectories ?? []).map((dir) => canonicalizePath(resolve16(dir))).filter((dir) => dir !== rootDir);
80125
+ this.additionalDirectories = (config.additionalDirectories ?? []).map((dir) => canonicalizePath(resolve17(dir))).filter((dir) => dir !== rootDir);
80032
80126
  this._status = "ready";
80033
80127
  this.log = log.child({
80034
80128
  [SCOPE_ATTRIBUTE]: "sandbox/provider/local",
@@ -80421,7 +80515,7 @@ var LocalSandboxProvider = class {
80421
80515
  let rootDir;
80422
80516
  let removeRootOnDestroy;
80423
80517
  if (config?.workingDirectory !== void 0) {
80424
- const requested = resolve16(config.workingDirectory);
80518
+ const requested = resolve17(config.workingDirectory);
80425
80519
  let entry;
80426
80520
  try {
80427
80521
  entry = await stat11(requested);
@@ -80444,9 +80538,9 @@ var LocalSandboxProvider = class {
80444
80538
  }
80445
80539
  removeRootOnDestroy = false;
80446
80540
  for (const dir of config.additionalDirectories ?? []) {
80447
- const entry2 = await stat11(resolve16(dir)).catch(() => null);
80541
+ const entry2 = await stat11(resolve17(dir)).catch(() => null);
80448
80542
  if (!entry2?.isDirectory()) {
80449
- throw new Error(`Sandbox additional directory is not a directory: ${resolve16(dir)}`);
80543
+ throw new Error(`Sandbox additional directory is not a directory: ${resolve17(dir)}`);
80450
80544
  }
80451
80545
  }
80452
80546
  } else {
@@ -80504,7 +80598,7 @@ var WorkspaceBackendRegistry = class {
80504
80598
  import { execFile } from "node:child_process";
80505
80599
  import { readFileSync as readFileSync2, realpathSync as realpathSync5 } from "node:fs";
80506
80600
  import { realpath as realpath10 } from "node:fs/promises";
80507
- import { basename as basename9, dirname as dirname19, isAbsolute as isAbsolute12, join as join32, relative as relative6, resolve as resolve17, sep as sep9 } from "node:path";
80601
+ import { basename as basename9, dirname as dirname19, isAbsolute as isAbsolute12, join as join32, relative as relative6, resolve as resolve18, sep as sep9 } from "node:path";
80508
80602
  import { promisify } from "node:util";
80509
80603
  var execFileAsync = promisify(execFile);
80510
80604
  var defaultExecFile = /* @__PURE__ */ __name(async (file, args) => execFileAsync(file, [...args]), "defaultExecFile");
@@ -80518,8 +80612,8 @@ var GitWorktreeDriver = class {
80518
80612
  log;
80519
80613
  exec;
80520
80614
  constructor(config) {
80521
- this.repoRoot = resolve17(config.repoRoot);
80522
- this.worktreesDir = resolve17(config.worktreesDir ?? defaultWorktreesDir(config.repoRoot));
80615
+ this.repoRoot = resolve18(config.repoRoot);
80616
+ this.worktreesDir = resolve18(config.worktreesDir ?? defaultWorktreesDir(config.repoRoot));
80523
80617
  this.log = config.logger.child({ [SCOPE_ATTRIBUTE]: "session/workspace/git-worktree" });
80524
80618
  this.exec = config.execFile ?? defaultExecFile;
80525
80619
  }
@@ -80532,7 +80626,7 @@ var GitWorktreeDriver = class {
80532
80626
  try {
80533
80627
  repoRoot = await canonicalizeThroughExisting(this.repoRoot);
80534
80628
  worktreesDir = await canonicalizeThroughExisting(this.worktreesDir);
80535
- const lexicalPath = resolve17(worktreesDir, label6);
80629
+ const lexicalPath = resolve18(worktreesDir, label6);
80536
80630
  if (!isStrictDescendant(worktreesDir, lexicalPath)) {
80537
80631
  throw new Error(`Workspace label escapes the managed worktree directory: ${label6}`);
80538
80632
  }
@@ -80735,12 +80829,12 @@ var GitWorktreeDriver = class {
80735
80829
  }
80736
80830
  };
80737
80831
  async function canonicalizeThroughExisting(input) {
80738
- let existing = resolve17(input);
80832
+ let existing = resolve18(input);
80739
80833
  const remainder = [];
80740
80834
  for (; ; ) {
80741
80835
  try {
80742
80836
  const canonical3 = await realpath10(existing);
80743
- return resolve17(canonical3, ...remainder);
80837
+ return resolve18(canonical3, ...remainder);
80744
80838
  } catch (cause) {
80745
80839
  const code = cause.code;
80746
80840
  if (code !== "ENOENT" && code !== "ENOTDIR")
@@ -80748,7 +80842,7 @@ async function canonicalizeThroughExisting(input) {
80748
80842
  }
80749
80843
  const parent = dirname19(existing);
80750
80844
  if (parent === existing)
80751
- return resolve17(existing, ...remainder);
80845
+ return resolve18(existing, ...remainder);
80752
80846
  remainder.unshift(basename9(existing));
80753
80847
  existing = parent;
80754
80848
  }
@@ -80790,7 +80884,7 @@ function defaultWorktreesDir(repoRoot) {
80790
80884
  try {
80791
80885
  cwd = realpathSync5(repoRoot);
80792
80886
  } catch {
80793
- cwd = resolve17(repoRoot);
80887
+ cwd = resolve18(repoRoot);
80794
80888
  }
80795
80889
  const home = resolveNamzuHome();
80796
80890
  let slug = slugForCwd(cwd);
@@ -80951,13 +81045,13 @@ var SessionSummaryMaterializer = class {
80951
81045
 
80952
81046
  // ../sdk/dist/store/session/memory.js
80953
81047
  import { realpathSync as realpathSync6 } from "node:fs";
80954
- import { resolve as resolve19 } from "node:path";
81048
+ import { resolve as resolve20 } from "node:path";
80955
81049
 
80956
81050
  // ../sdk/dist/store/session/canonical-path.js
80957
81051
  import { realpath as realpath11 } from "node:fs/promises";
80958
- import { resolve as resolve18 } from "node:path";
81052
+ import { resolve as resolve19 } from "node:path";
80959
81053
  async function canonicalizePath2(input) {
80960
- const absolute = resolve18(input);
81054
+ const absolute = resolve19(input);
80961
81055
  try {
80962
81056
  return await realpath11(absolute);
80963
81057
  } catch (err) {
@@ -81047,7 +81141,7 @@ var InMemorySessionStore = class {
81047
81141
  } catch (error) {
81048
81142
  if (error.code !== "ENOENT")
81049
81143
  throw error;
81050
- rootPath = resolve19(project.rootPath);
81144
+ rootPath = resolve20(project.rootPath);
81051
81145
  }
81052
81146
  const key5 = `${project.tenantId}\0${rootPath}`;
81053
81147
  const existingProjectId = roots.get(key5);
@@ -81498,13 +81592,13 @@ __name(stepResident, "stepResident");
81498
81592
 
81499
81593
  // ../sdk/dist/manager/resident/agenda.js
81500
81594
  import { randomUUID as randomUUID11 } from "node:crypto";
81501
- import { join as join34, resolve as resolve21 } from "node:path";
81595
+ import { join as join34, resolve as resolve22 } from "node:path";
81502
81596
  import { isDeepStrictEqual as isDeepStrictEqual6 } from "node:util";
81503
81597
 
81504
81598
  // ../sdk/dist/manager/resident/history-disk.js
81505
81599
  import { constants as constants4 } from "node:fs";
81506
81600
  import { lstat as lstat9, open as open11 } from "node:fs/promises";
81507
- import { join as join33, relative as relative7, resolve as resolve20, sep as sep10 } from "node:path";
81601
+ import { join as join33, relative as relative7, resolve as resolve21, sep as sep10 } from "node:path";
81508
81602
  var RECORD_BYTES2 = 4 * 1024 * 1024;
81509
81603
  var ResidentHistoryPageLimit = class extends Error {
81510
81604
  static {
@@ -81513,8 +81607,8 @@ var ResidentHistoryPageLimit = class extends Error {
81513
81607
  };
81514
81608
  async function readResidentHistoryRecord(root, path2, budget) {
81515
81609
  budget.signal?.throwIfAborted();
81516
- const base3 = resolve20(root);
81517
- const suffix = relative7(base3, resolve20(path2));
81610
+ const base3 = resolve21(root);
81611
+ const suffix = relative7(base3, resolve21(path2));
81518
81612
  if (suffix === ".." || suffix.startsWith(`..${sep10}`))
81519
81613
  throw new Error("Invalid history path.");
81520
81614
  let current = base3;
@@ -82089,8 +82183,8 @@ var DiskResidentAgenda = class {
82089
82183
  revisionsDir: join34(directory, "revisions"),
82090
82184
  publishLegacyProjection: false
82091
82185
  };
82092
- this.historyRoot = resolve21(root);
82093
- this.historyRevisions = resolve21(this.location.revisionsDir);
82186
+ this.historyRoot = resolve22(root);
82187
+ this.historyRevisions = resolve22(this.location.revisionsDir);
82094
82188
  }
82095
82189
  checked(record3) {
82096
82190
  const agenda = agendaSchema.parse(record3);
@@ -83770,7 +83864,7 @@ __name(selectLearningExperience, "selectLearningExperience");
83770
83864
  // ../sdk/dist/learning/experience-store.js
83771
83865
  import { mkdirSync as mkdirSync4 } from "node:fs";
83772
83866
  import { createRequire as createRequire3 } from "node:module";
83773
- import { dirname as dirname20, resolve as resolve22 } from "node:path";
83867
+ import { dirname as dirname20, resolve as resolve23 } from "node:path";
83774
83868
  var SCHEMA7 = `
83775
83869
  CREATE TABLE experience (
83776
83870
  ordinal INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -83792,7 +83886,7 @@ var SqliteLearningExperienceStore = class {
83792
83886
  scope;
83793
83887
  readOnly;
83794
83888
  constructor(options) {
83795
- this.databasePath = resolve22(options.databasePath);
83889
+ this.databasePath = resolve23(options.databasePath);
83796
83890
  this.scope = Object.freeze({
83797
83891
  tenantId: asTenantId(options.scope.tenantId.toLowerCase()),
83798
83892
  projectId: asProjectId(options.scope.projectId.toLowerCase()),
@@ -84130,7 +84224,7 @@ __name(createResidentToolEvidenceSource, "createResidentToolEvidenceSource");
84130
84224
  import { createHash as createHash30, randomUUID as randomUUID14 } from "node:crypto";
84131
84225
  import { closeSync as closeSync2, existsSync as existsSync5, fsyncSync as fsyncSync2, linkSync as linkSync2, lstatSync as lstatSync4, mkdirSync as mkdirSync5, openSync as openSync2, readFileSync as readFileSync3, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2 } from "node:fs";
84132
84226
  import { createRequire as createRequire4 } from "node:module";
84133
- import { dirname as dirname21, join as join35, resolve as resolve23 } from "node:path";
84227
+ import { dirname as dirname21, join as join35, resolve as resolve24 } from "node:path";
84134
84228
 
84135
84229
  // ../sdk/dist/learning/observation.js
84136
84230
  var label5 = external_exports.string().trim().min(1).max(256);
@@ -84260,8 +84354,8 @@ var SqliteLearningStore = class {
84260
84354
  scope;
84261
84355
  readOnly;
84262
84356
  constructor(options) {
84263
- this.databasePath = resolve23(options.databasePath);
84264
- this.artifactsPath = resolve23(options.artifactsPath);
84357
+ this.databasePath = resolve24(options.databasePath);
84358
+ this.artifactsPath = resolve24(options.artifactsPath);
84265
84359
  this.scope = Object.freeze({
84266
84360
  tenantId: asTenantId(options.scope.tenantId.toLowerCase()),
84267
84361
  projectId: asProjectId(options.scope.projectId.toLowerCase()),
@@ -84947,7 +85041,7 @@ function connectPath(address2) {
84947
85041
  }
84948
85042
  __name(connectPath, "connectPath");
84949
85043
  function sendPeerRequest(address2, request, parseResponse, timeoutMs) {
84950
- return new Promise((resolve29) => {
85044
+ return new Promise((resolve30) => {
84951
85045
  let settled = false;
84952
85046
  const finish2 = /* @__PURE__ */ __name((result) => {
84953
85047
  if (settled)
@@ -84955,7 +85049,7 @@ function sendPeerRequest(address2, request, parseResponse, timeoutMs) {
84955
85049
  settled = true;
84956
85050
  clearTimeout(timer);
84957
85051
  socket.destroy();
84958
- resolve29(result);
85052
+ resolve30(result);
84959
85053
  }, "finish");
84960
85054
  const unreachable = /* @__PURE__ */ __name((error) => finish2({
84961
85055
  kind: "unreachable",
@@ -84967,7 +85061,7 @@ function sendPeerRequest(address2, request, parseResponse, timeoutMs) {
84967
85061
  path2 = connectPath(address2);
84968
85062
  } catch (error) {
84969
85063
  clearTimeout(timer);
84970
- resolve29({
85064
+ resolve30({
84971
85065
  kind: "unreachable",
84972
85066
  reason: error instanceof Error ? error.message : String(error)
84973
85067
  });
@@ -85476,23 +85570,23 @@ async function createPeerEndpoint(options) {
85476
85570
  void handleLine(buffered.subarray(0, newline)).catch(() => socket.destroy());
85477
85571
  });
85478
85572
  });
85479
- await new Promise((resolve29, reject2) => {
85573
+ await new Promise((resolve30, reject2) => {
85480
85574
  const failed = /* @__PURE__ */ __name((error) => reject2(error), "failed");
85481
85575
  server.once("error", failed);
85482
85576
  server.listen({ path: listenPath }, () => {
85483
85577
  server.removeListener("error", failed);
85484
- resolve29();
85578
+ resolve30();
85485
85579
  });
85486
85580
  });
85487
85581
  server.on("error", () => {
85488
85582
  });
85489
85583
  if (parsed.scheme === "uds")
85490
85584
  chmodSync3(listenPath, 384);
85491
- const close = /* @__PURE__ */ __name(() => new Promise((resolve29) => {
85585
+ const close = /* @__PURE__ */ __name(() => new Promise((resolve30) => {
85492
85586
  closing = true;
85493
85587
  for (const socket of sockets)
85494
85588
  socket.destroy();
85495
- server.close(() => resolve29());
85589
+ server.close(() => resolve30());
85496
85590
  }), "close");
85497
85591
  return {
85498
85592
  address: options.address,
@@ -86096,7 +86190,7 @@ var PalRuntime = class {
86096
86190
  // ../sdk/dist/pals/communication/store.js
86097
86191
  import { randomUUID as randomUUID15 } from "node:crypto";
86098
86192
  import { chmodSync as chmodSync4, lstatSync as lstatSync8, mkdirSync as mkdirSync7, readdirSync as readdirSync3, realpathSync as realpathSync7 } from "node:fs";
86099
- import { join as join39, resolve as resolve24 } from "node:path";
86193
+ import { join as join39, resolve as resolve25 } from "node:path";
86100
86194
  import { isDeepStrictEqual as isDeepStrictEqual8 } from "node:util";
86101
86195
 
86102
86196
  // ../sdk/dist/pals/communication/ingress-types.js
@@ -86330,7 +86424,7 @@ var DiskPalCommunicationStore = class {
86330
86424
  migrations: { 1: (value) => value }
86331
86425
  }), "Pal communication", (record3) => record3.revision);
86332
86426
  constructor(options) {
86333
- this.root = resolve24(options.root);
86427
+ this.root = resolve25(options.root);
86334
86428
  this.secure = options.secureDirectory ?? ((path2) => {
86335
86429
  if (process.platform !== "win32")
86336
86430
  chmodSync4(path2, 448);
@@ -86805,7 +86899,7 @@ var PalMessageBroker = class {
86805
86899
 
86806
86900
  // ../sdk/dist/pals/communication/policy.js
86807
86901
  import { chmodSync as chmodSync5, lstatSync as lstatSync9, mkdirSync as mkdirSync8, readdirSync as readdirSync4, realpathSync as realpathSync8 } from "node:fs";
86808
- import { join as join40, resolve as resolve25 } from "node:path";
86902
+ import { join as join40, resolve as resolve26 } from "node:path";
86809
86903
  var PalMessagePermissionConflictError = class extends Error {
86810
86904
  static {
86811
86905
  __name(this, "PalMessagePermissionConflictError");
@@ -86841,7 +86935,7 @@ var DiskPalMessagePolicy = class {
86841
86935
  secure;
86842
86936
  records = new DiskRevisionRecordStore(defineSchema({ kind: "pal-message-permission", current: 1, migrations: {} }), "Pal message permission", (value) => value.revision);
86843
86937
  constructor(options) {
86844
- this.root = resolve25(options.root);
86938
+ this.root = resolve26(options.root);
86845
86939
  this.secure = options.secureDirectory ?? ((path2) => {
86846
86940
  if (process.platform !== "win32")
86847
86941
  chmodSync5(path2, 448);
@@ -87482,7 +87576,7 @@ __name(dispatchPalIngressOnce, "dispatchPalIngressOnce");
87482
87576
 
87483
87577
  // ../sdk/dist/pals/activity/subscription-store.js
87484
87578
  import { chmodSync as chmodSync6, lstatSync as lstatSync10, mkdirSync as mkdirSync9, readdirSync as readdirSync5, realpathSync as realpathSync9 } from "node:fs";
87485
- import { join as join41, resolve as resolve26 } from "node:path";
87579
+ import { join as join41, resolve as resolve27 } from "node:path";
87486
87580
  import { isDeepStrictEqual as isDeepStrictEqual9 } from "node:util";
87487
87581
 
87488
87582
  // ../sdk/dist/pals/activity/subscription-schema.js
@@ -87521,7 +87615,7 @@ var DiskPalActivitySubscriptionStore = class {
87521
87615
  migrations: {}
87522
87616
  }), "Pal activity subscription", (value) => value.revision);
87523
87617
  constructor(options) {
87524
- this.root = resolve26(options.root);
87618
+ this.root = resolve27(options.root);
87525
87619
  this.secure = options.secureDirectory ?? ((path2) => {
87526
87620
  if (process.platform !== "win32")
87527
87621
  chmodSync6(path2, 448);
@@ -87643,7 +87737,7 @@ var DiskPalActivitySubscriptionStore = class {
87643
87737
 
87644
87738
  // ../sdk/dist/pals/activity/subscription-policy.js
87645
87739
  import { chmodSync as chmodSync7, lstatSync as lstatSync11, mkdirSync as mkdirSync10, readdirSync as readdirSync6, realpathSync as realpathSync10 } from "node:fs";
87646
- import { join as join42, resolve as resolve27 } from "node:path";
87740
+ import { join as join42, resolve as resolve28 } from "node:path";
87647
87741
  import { isDeepStrictEqual as isDeepStrictEqual10 } from "node:util";
87648
87742
  var PalActivitySubscriptionPermissionConflictError = class extends Error {
87649
87743
  static {
@@ -87678,7 +87772,7 @@ var DiskPalActivitySubscriptionPolicy = class {
87678
87772
  migrations: {}
87679
87773
  }), "Pal activity subscription permission", (value) => value.revision);
87680
87774
  constructor(options) {
87681
- this.root = resolve27(options.root);
87775
+ this.root = resolve28(options.root);
87682
87776
  this.subscriptions = options.subscriptions;
87683
87777
  this.secure = options.secureDirectory ?? ((path2) => {
87684
87778
  if (process.platform !== "win32")
@@ -89211,7 +89305,7 @@ function shellProgress(report) {
89211
89305
  __name(shellProgress, "shellProgress");
89212
89306
  function execHostShell(command, options) {
89213
89307
  options.signal?.throwIfAborted();
89214
- return new Promise((resolve29, reject2) => {
89308
+ return new Promise((resolve30, reject2) => {
89215
89309
  const child = spawnHostShell(command, {
89216
89310
  cwd: options.cwd,
89217
89311
  env: options.env,
@@ -89312,7 +89406,7 @@ function execHostShell(command, options) {
89312
89406
  const stdout = decodeCapture("stdout");
89313
89407
  const stderr = decodeCapture("stderr");
89314
89408
  if (!failure2 && cause === void 0 && code === 0 && signal === null) {
89315
- resolve29({
89409
+ resolve30({
89316
89410
  stdout,
89317
89411
  stderr,
89318
89412
  stdoutBytes: captures.stdout.bytes,
@@ -89359,7 +89453,7 @@ ${stderr}`));
89359
89453
  child.off("close", onClose);
89360
89454
  child.off("error", onError);
89361
89455
  child.off("spawn", onSpawn);
89362
- resolve29({
89456
+ resolve30({
89363
89457
  backgroundedJobId: jobId,
89364
89458
  stdout: decodeCapture("stdout"),
89365
89459
  stderr: decodeCapture("stderr")
@@ -93104,7 +93198,7 @@ var GlobTool = defineTool({
93104
93198
  });
93105
93199
 
93106
93200
  // ../sdk/dist/tools/builtins/grep.js
93107
- import { readFile as readFile17, stat as stat13 } from "node:fs/promises";
93201
+ import { readFile as readFile18, stat as stat13 } from "node:fs/promises";
93108
93202
  import { isAbsolute as isAbsolute15, join as join44, relative as relative10, sep as sep13 } from "node:path";
93109
93203
  async function readWithSignal(read, signal) {
93110
93204
  signal?.throwIfAborted();
@@ -93255,7 +93349,7 @@ var GrepTool = defineTool({
93255
93349
  try {
93256
93350
  const buffer = await readWithSignal(() => sandbox ? sandbox.readFile(filePath) : resolveWithinReal(root, filePath).then((path2) => {
93257
93351
  contained2 = path2;
93258
- return readFile17(path2, { signal: context2.abortSignal });
93352
+ return readFile18(path2, { signal: context2.abortSignal });
93259
93353
  }), context2.abortSignal);
93260
93354
  context2.abortSignal?.throwIfAborted();
93261
93355
  if (buffer.length > MAX_FILE_SIZE || isBinaryContent(buffer))
@@ -93552,7 +93646,7 @@ async function waitForJobWithBounds(jobs, id3, options, now = Date.now) {
93552
93646
  omittedOutputBytes
93553
93647
  };
93554
93648
  });
93555
- const expiry = new Promise((resolve29) => {
93649
+ const expiry = new Promise((resolve30) => {
93556
93650
  const tick = setInterval(() => {
93557
93651
  if (settled)
93558
93652
  return;
@@ -93560,7 +93654,7 @@ async function waitForJobWithBounds(jobs, id3, options, now = Date.now) {
93560
93654
  const elapsed = now() - startedAt;
93561
93655
  if (elapsed >= options.wallMs) {
93562
93656
  clearInterval(tick);
93563
- resolve29({
93657
+ resolve30({
93564
93658
  kind: "timeout",
93565
93659
  cause: "wall",
93566
93660
  elapsedMs: elapsed,
@@ -93575,7 +93669,7 @@ async function waitForJobWithBounds(jobs, id3, options, now = Date.now) {
93575
93669
  const quietFor = now() - lastProgressAt;
93576
93670
  if (quietFor >= options.idleMs) {
93577
93671
  clearInterval(tick);
93578
- resolve29({
93672
+ resolve30({
93579
93673
  kind: "timeout",
93580
93674
  cause: "idle",
93581
93675
  elapsedMs: elapsed,
@@ -93806,7 +93900,7 @@ ${observed}
93806
93900
 
93807
93901
  // ../sdk/dist/tools/builtins/verify-outputs.js
93808
93902
  import { stat as stat14 } from "node:fs/promises";
93809
- import { resolve as resolve28 } from "node:path";
93903
+ import { resolve as resolve29 } from "node:path";
93810
93904
  var inputSchema16 = external_exports.object({
93811
93905
  paths: external_exports.array(external_exports.string().min(1)).min(1).describe("Expected output file paths to verify. Each path is checked for existence and size."),
93812
93906
  min_bytes: external_exports.number().int().min(0).optional().describe("Minimum acceptable file size in bytes. A file under this size counts as missing. Default: 1 (any non-empty file passes).")
@@ -93862,7 +93956,7 @@ async function verifyOne(input) {
93862
93956
  };
93863
93957
  }
93864
93958
  }
93865
- const filePath = resolve28(context2.workingDirectory, path2);
93959
+ const filePath = resolve29(context2.workingDirectory, path2);
93866
93960
  try {
93867
93961
  const info = await stat14(filePath);
93868
93962
  if (!info.isFile()) {
@@ -96523,4 +96617,4 @@ export {
96523
96617
  buildResidentToolEvidenceTools,
96524
96618
  createPalMessagingTools
96525
96619
  };
96526
- //# sourceMappingURL=chunk-WJG5O4KK.js.map
96620
+ //# sourceMappingURL=chunk-6FSVNUBA.js.map