tower-studio 0.2.38 → 0.2.40

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 (342) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +2 -2
  12. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +48 -36
  13. package/.next/standalone/.next/server/app/_not-found/page.js +3 -3
  14. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/api/adapters/test/route.js +1 -1
  17. package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js +1 -1
  20. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js +1 -1
  23. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -1
  26. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +2 -2
  28. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/internal/assistant/route.js +1 -1
  30. package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +1 -1
  32. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +1 -1
  34. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js +1 -1
  36. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +1 -1
  38. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +2 -2
  40. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +1 -1
  42. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +1 -1
  45. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js +1 -1
  47. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +3 -3
  49. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  53. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +83 -71
  54. package/.next/standalone/.next/server/app/missions/page.js +6 -6
  55. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +2 -2
  58. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +48 -36
  59. package/.next/standalone/.next/server/app/onboarding/page.js +3 -3
  60. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  61. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +2 -2
  63. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +48 -36
  64. package/.next/standalone/.next/server/app/page.js +3 -3
  65. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +2 -2
  68. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +65 -53
  69. package/.next/standalone/.next/server/app/settings/page.js +5 -5
  70. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  71. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +2 -2
  73. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +121 -109
  74. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +5 -5
  75. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +2 -2
  78. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +106 -94
  79. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +3 -3
  80. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  81. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +2 -2
  83. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +93 -81
  84. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +3 -3
  85. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  86. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +2 -2
  88. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +96 -84
  89. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +3 -3
  90. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +2 -2
  93. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +48 -36
  94. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +4 -4
  95. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +2 -2
  98. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +88 -76
  99. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +5 -5
  100. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +3 -3
  103. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +95 -83
  104. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -6
  105. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +2 -2
  108. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +68 -56
  109. package/.next/standalone/.next/server/app/workspaces/page.js +3 -3
  110. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  111. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
  113. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +2 -2
  114. package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_assets_[projectId]_[filename]_route_actions_08y.jen.js +1 -1
  115. package/.next/standalone/.next/server/chunks/[externals]__0izylsq._.js +3 -0
  116. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0lioghc._.js → [root-of-the-server]__0-~q463._.js} +2 -2
  117. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0d2japj._.js → [root-of-the-server]__0.wld9h._.js} +2 -2
  118. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.z8.oi._.js +4 -0
  119. package/.next/standalone/.next/server/chunks/[root-of-the-server]__02jy80j._.js +4 -0
  120. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0dy~osn._.js → [root-of-the-server]__032d9pl._.js} +2 -2
  121. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__08u6wg.._.js → [root-of-the-server]__037x-0a._.js} +2 -2
  122. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__08xus7y._.js → [root-of-the-server]__04jduyo._.js} +2 -2
  123. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04u7b2g._.js +3 -0
  124. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05nz.tg._.js +1 -1
  125. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ai09na._.js +3 -0
  126. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__00mjz~7._.js → [root-of-the-server]__0az764e._.js} +2 -2
  127. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__12ohpl.._.js → [root-of-the-server]__0b3m.jm._.js} +2 -2
  128. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0_3ce_3._.js → [root-of-the-server]__0c7z.~a._.js} +2 -2
  129. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__00~-bvt._.js → [root-of-the-server]__0d1bhsb._.js} +2 -2
  130. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j05vlm._.js +3 -0
  131. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__01n7exm._.js → [root-of-the-server]__0kexk71._.js} +3 -3
  132. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0qif839._.js → [root-of-the-server]__0kuo6q5._.js} +3 -3
  133. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l1-djp._.js +1 -1
  134. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0~foo~5._.js → [root-of-the-server]__0np.553._.js} +3 -3
  135. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0q8.khe._.js → [root-of-the-server]__0r-6wmj._.js} +2 -2
  136. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_yyy8._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0omyrab._.js → [root-of-the-server]__0u_-4~7._.js} +2 -2
  138. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xswbi9._.js +3 -0
  139. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0tys9pv._.js → [root-of-the-server]__0z20rmt._.js} +2 -2
  140. package/.next/standalone/.next/server/chunks/[root-of-the-server]__11l3gud._.js +3 -0
  141. package/.next/standalone/.next/server/chunks/{_0lb0q5p._.js → _06.mxka._.js} +1 -1
  142. package/.next/standalone/.next/server/chunks/{src_0bkvm8c._.js → src_02ruq-1._.js} +2 -2
  143. package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/src_lib_02llcit._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/src_lib_0i2.v2d._.js +1 -1
  146. package/.next/standalone/.next/server/chunks/src_lib_12xey8u._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/src_lib_ai_0xx6y51._.js +1 -1
  148. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  149. package/.next/standalone/.next/server/chunks/ssr/{0ws9_lucide-react_dist_esm_icons_0odx0ph._.js → 0ws9_lucide-react_dist_esm_icons_10_90yo._.js} +2 -2
  150. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.-z9ts._.js +3 -0
  151. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0f88ua~._.js → [root-of-the-server]__0.2h0ux._.js} +1 -1
  152. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07_o.al._.js → [root-of-the-server]__0.infp2._.js} +2 -2
  153. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__04rp1ck._.js → [root-of-the-server]__0.u-t.1._.js} +1 -1
  154. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01kyzx1._.js +3 -0
  155. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0k-mx8r._.js → [root-of-the-server]__02j1enz._.js} +1 -1
  156. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02mo_kb._.js +3 -0
  157. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02~6htc._.js +4 -0
  158. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0guqcva._.js → [root-of-the-server]__038u_kv._.js} +4 -4
  159. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09s~cme._.js → [root-of-the-server]__0391jsv._.js} +1 -1
  160. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02ur64h._.js → [root-of-the-server]__03fujv7._.js} +1 -1
  161. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +3 -0
  162. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-tolks._.js → [root-of-the-server]__058rbx5._.js} +4 -4
  163. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
  164. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__077c1-u._.js +3 -0
  165. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lozqxc._.js → [root-of-the-server]__094t44p._.js} +1 -1
  166. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_i7zpd._.js → [root-of-the-server]__09t~p.u._.js} +1 -1
  167. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m7ydqb._.js → [root-of-the-server]__09z_ddd._.js} +1 -1
  168. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0p0te97._.js → [root-of-the-server]__0ce3fpq._.js} +4 -4
  169. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__062b.yt._.js → [root-of-the-server]__0da~mv~._.js} +4 -4
  170. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0qqbb31._.js → [root-of-the-server]__0dux7x.._.js} +1 -1
  171. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ea-1l0._.js +3 -0
  172. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0th-t1a._.js → [root-of-the-server]__0h589~0._.js} +4 -4
  173. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  174. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00~jawi._.js → [root-of-the-server]__0l6bt9t._.js} +1 -1
  175. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m80~su._.js → [root-of-the-server]__0mmypbn._.js} +1 -1
  176. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mpjat-._.js +3 -0
  177. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_1zewr._.js → [root-of-the-server]__0mq0f94._.js} +1 -1
  178. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-_7_._.js +30 -0
  179. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0scj6ed._.js → [root-of-the-server]__0odeai5._.js} +1 -1
  180. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0siyg1p._.js → [root-of-the-server]__0oq-j16._.js} +4 -4
  181. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0na8eiv._.js → [root-of-the-server]__0pmjob9._.js} +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lz4wdp._.js → [root-of-the-server]__0pvaj~l._.js} +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0wofia_._.js → [root-of-the-server]__0rckee~._.js} +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y~ooou._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0t6f4lq._.js → [root-of-the-server]__10s67lq._.js} +4 -4
  187. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__04p5fnx._.js → [root-of-the-server]__10~3-.h._.js} +2 -2
  188. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__093tt4a._.js → [root-of-the-server]__12w35bx._.js} +4 -4
  189. package/.next/standalone/.next/server/chunks/ssr/{_0e-zyn2._.js → _0-_yznx._.js} +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/{_00t6138._.js → _03lt1_x._.js} +4 -4
  192. package/.next/standalone/.next/server/chunks/ssr/{_0l3l_d6._.js → _04bt0.3._.js} +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/{_0ght75u._.js → _04jcctt._.js} +2 -2
  194. package/.next/standalone/.next/server/chunks/ssr/{_0cxhub8._.js → _04~zqvy._.js} +4 -4
  195. package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
  196. package/.next/standalone/.next/server/chunks/ssr/{_13glpna._.js → _07_8m~l._.js} +2 -2
  197. package/.next/standalone/.next/server/chunks/ssr/_0_z-t6g._.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/_0a-.s7z._.js +3 -0
  199. package/.next/standalone/.next/server/chunks/ssr/_0aqfqr5._.js +3 -0
  200. package/.next/standalone/.next/server/chunks/ssr/{_0qkt.3y._.js → _0be3783._.js} +2 -2
  201. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +2 -2
  202. package/.next/standalone/.next/server/chunks/ssr/_0g8mw1b._.js +3 -0
  203. package/.next/standalone/.next/server/chunks/ssr/_0hh17jg._.js +1 -1
  204. package/.next/standalone/.next/server/chunks/ssr/{_02encue._.js → _0mm~wxj._.js} +1 -1
  205. package/.next/standalone/.next/server/chunks/ssr/{_0_hnt09._.js → _0n4bq0m._.js} +1 -1
  206. package/.next/standalone/.next/server/chunks/ssr/{_0n54odq._.js → _0n5do.z._.js} +1 -1
  207. package/.next/standalone/.next/server/chunks/ssr/{_0j84cn0._.js → _0o3rthp._.js} +2 -2
  208. package/.next/standalone/.next/server/chunks/ssr/{_0n1l7yo._.js → _0p6p_68._.js} +4 -4
  209. package/.next/standalone/.next/server/chunks/ssr/{_0clhm~f._.js → _0py1s-f._.js} +1 -1
  210. package/.next/standalone/.next/server/chunks/ssr/_0qrc1eu._.js +3 -0
  211. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  212. package/.next/standalone/.next/server/chunks/ssr/{_0mzwe90._.js → _0rrzd20._.js} +1 -1
  213. package/.next/standalone/.next/server/chunks/ssr/{_0k9b94s._.js → _0t863nl._.js} +1 -1
  214. package/.next/standalone/.next/server/chunks/ssr/{_07fnvnm._.js → _0tvm5af._.js} +1 -1
  215. package/.next/standalone/.next/server/chunks/ssr/{_0mpce0d._.js → _0u7c6bz._.js} +4 -4
  216. package/.next/standalone/.next/server/chunks/ssr/{_0hu0tyg._.js → _0u_uywm._.js} +1 -1
  217. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  218. package/.next/standalone/.next/server/chunks/ssr/{_0t53a7_._.js → _0zqwuq~._.js} +3 -3
  219. package/.next/standalone/.next/server/chunks/ssr/_0~cy-h1._.js +3 -0
  220. package/.next/standalone/.next/server/chunks/ssr/_11rjd4d._.js +3 -0
  221. package/.next/standalone/.next/server/chunks/ssr/{_0muaopo._.js → _12ca88g._.js} +4 -4
  222. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0hhlpw6._.js → node_modules__pnpm_06f0dao._.js} +2 -2
  223. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  224. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  225. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  226. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  227. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  228. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  229. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  230. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  231. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  232. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  233. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  234. package/.next/standalone/.next/server/chunks/ssr/src_components_ui_select_tsx_0d2ra01._.js +1 -1
  235. package/.next/standalone/.next/server/chunks/ssr/{src_lib_06nbc41._.js → src_lib_02~3_5t._.js} +2 -2
  236. package/.next/standalone/.next/server/chunks/ssr/{src_lib_01xtio2._.js → src_lib_04d~c.c._.js} +2 -2
  237. package/.next/standalone/.next/server/chunks/ssr/{src_lib_03p6skw._.js → src_lib_08wv1le._.js} +2 -2
  238. package/.next/standalone/.next/server/chunks/ssr/{src_lib_05mu4f0._.js → src_lib_0_9avpk._.js} +2 -2
  239. package/.next/standalone/.next/server/chunks/ssr/src_lib_0a60u40._.js +3 -0
  240. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fu5szn._.js +3 -0
  241. package/.next/standalone/.next/server/chunks/ssr/src_lib_0gve57o._.js +3 -0
  242. package/.next/standalone/.next/server/chunks/ssr/src_lib_0koe0p0._.js +3 -0
  243. package/.next/standalone/.next/server/chunks/ssr/src_lib_0qdh-v4._.js +3 -0
  244. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ramp4w._.js +3 -0
  245. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sms4xl._.js +2 -2
  246. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sn1z-s._.js +3 -0
  247. package/.next/standalone/.next/server/chunks/ssr/src_lib_110am8v._.js +3 -0
  248. package/.next/standalone/.next/server/chunks/ssr/src_lib_11w~.ge._.js +3 -0
  249. package/.next/standalone/.next/server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js +1 -1
  250. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  251. package/.next/standalone/.next/server/pages/500.html +1 -1
  252. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  253. package/.next/standalone/.next/server/server-reference-manifest.json +417 -333
  254. package/.next/standalone/.next/static/chunks/0.lqb7y9kz5z6.js +1 -0
  255. package/.next/standalone/.next/static/chunks/02zqmiej0opg7.js +1 -0
  256. package/.next/standalone/.next/static/chunks/{0a234qgxmvbfu.js → 03jo4masky_ji.js} +1 -1
  257. package/.next/standalone/.next/static/chunks/{0wbzgoyu4~g4x.js → 03rl6s3rpptas.js} +1 -1
  258. package/.next/standalone/.next/static/chunks/{097rglx2_e2oo.js → 05n5tgexx2_92.js} +1 -1
  259. package/.next/standalone/.next/static/chunks/0651zmy-w~saj.js +1 -0
  260. package/.next/standalone/.next/static/chunks/{04t77qlr4-sw7.js → 09ossbd-6zx4g.js} +1 -1
  261. package/.next/standalone/.next/static/chunks/0_d-xz2x5qb_c.js +1 -0
  262. package/.next/standalone/.next/static/chunks/0bq80txkiwk0q.js +1 -0
  263. package/.next/standalone/.next/static/chunks/0bx6xpa7fgedh.js +1 -0
  264. package/.next/standalone/.next/static/chunks/{14man4i21otxe.js → 0dp-d685xgb68.js} +1 -1
  265. package/.next/standalone/.next/static/chunks/0kf6kwtt_mouu.js +1 -0
  266. package/.next/standalone/.next/static/chunks/0l2-qbv0tx44i.js +1 -0
  267. package/.next/standalone/.next/static/chunks/0l3n_2z5xfhor.js +1 -0
  268. package/.next/standalone/.next/static/chunks/0mu2posb9cg4b.js +1 -0
  269. package/.next/standalone/.next/static/chunks/0nc-n~ecfjozt.js +1 -0
  270. package/.next/standalone/.next/static/chunks/{0c0u4it7gyb1..js → 0roncmx7dp-47.js} +1 -1
  271. package/.next/standalone/.next/static/chunks/{0jlzko424.5et.js → 0s6gcjv24hfkq.js} +1 -1
  272. package/.next/standalone/.next/static/chunks/{0rbykdrqih-0t.js → 0t1nk8jlwgyb-.js} +1 -1
  273. package/.next/standalone/.next/static/chunks/{10q75vl~mg7vy.js → 0tb.0x~6y.21w.js} +1 -1
  274. package/.next/standalone/.next/static/chunks/{10mwqzqdpi9d5.js → 0v.l5.sqos562.js} +1 -1
  275. package/.next/standalone/.next/static/chunks/{151eqj4g7bidp.js → 0vm6adb7s2i4g.js} +1 -1
  276. package/.next/standalone/.next/static/chunks/{0bsigqvr2-qcp.js → 0xxn47mtozln~.js} +1 -1
  277. package/.next/standalone/.next/static/chunks/{0khxfvo-tgpbc.js → 0~33w7-91bik-.js} +1 -1
  278. package/.next/standalone/.next/static/chunks/0~qrkswofk7zn.css +1 -0
  279. package/.next/standalone/.next/static/chunks/{17ldo-bezxis..js → 11brr5_f60yx-.js} +1 -1
  280. package/.next/standalone/.next/static/chunks/120u45g91sx4q.js +5 -0
  281. package/.next/standalone/.next/static/chunks/13rq33eiffqaz.js +1 -0
  282. package/.next/standalone/.next/static/chunks/{13qts-1uv7-ee.js → 16e-u8e~pzz_-.js} +1 -1
  283. package/.next/standalone/.next/static/chunks/1821tyytk30ed.js +2 -0
  284. package/.next/standalone/.next/static/chunks/{0.nk_89kz3j6c.js → 183m8iouij_n8.js} +1 -1
  285. package/.next/standalone/package.json +3 -2
  286. package/bin/tower.mjs +10 -1
  287. package/dist/mcp-server.cjs +270 -146
  288. package/package.json +3 -2
  289. package/scripts/migrations/0003-backfill-systemconfig-from-legacy-db.ts +113 -0
  290. package/scripts/migrations/0004-relocate-misplaced-assets.ts +172 -0
  291. package/scripts/run-migrations.ts +12 -0
  292. package/.next/standalone/.next/server/chunks/[externals]__0k7u3dx._.js +0 -3
  293. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.a1443._.js +0 -3
  294. package/.next/standalone/.next/server/chunks/[root-of-the-server]__00llstz._.js +0 -4
  295. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01yu.gw._.js +0 -4
  296. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0965p6t._.js +0 -3
  297. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c513um._.js +0 -3
  298. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qijr4h._.js +0 -3
  299. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rc0ntp._.js +0 -3
  300. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__046-2.-._.js +0 -3
  301. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05sv58d._.js +0 -3
  302. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dixwk_._.js +0 -4
  303. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gzafdq._.js +0 -3
  304. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0i97rbw._.js +0 -3
  305. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mbvmq1._.js +0 -3
  306. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qnzkj3._.js +0 -30
  307. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qp5cw1._.js +0 -3
  308. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rlar2j._.js +0 -3
  309. package/.next/standalone/.next/server/chunks/ssr/_00vn2qb._.js +0 -3
  310. package/.next/standalone/.next/server/chunks/ssr/_07_.oek._.js +0 -3
  311. package/.next/standalone/.next/server/chunks/ssr/_09ri_be._.js +0 -3
  312. package/.next/standalone/.next/server/chunks/ssr/_0_q.4.i._.js +0 -3
  313. package/.next/standalone/.next/server/chunks/ssr/_0nk7qd4._.js +0 -3
  314. package/.next/standalone/.next/server/chunks/ssr/_0no6nrx._.js +0 -3
  315. package/.next/standalone/.next/server/chunks/ssr/_0vqyl_~._.js +0 -3
  316. package/.next/standalone/.next/server/chunks/ssr/src_lib_06okbb2._.js +0 -3
  317. package/.next/standalone/.next/server/chunks/ssr/src_lib_0741dos._.js +0 -3
  318. package/.next/standalone/.next/server/chunks/ssr/src_lib_0cbuy0_._.js +0 -3
  319. package/.next/standalone/.next/server/chunks/ssr/src_lib_0e27xy7._.js +0 -3
  320. package/.next/standalone/.next/server/chunks/ssr/src_lib_0n5-vk5._.js +0 -3
  321. package/.next/standalone/.next/server/chunks/ssr/src_lib_0rk2hla._.js +0 -3
  322. package/.next/standalone/.next/server/chunks/ssr/src_lib_0t5xz2y._.js +0 -3
  323. package/.next/standalone/.next/server/chunks/ssr/src_lib_0u5_gf2._.js +0 -3
  324. package/.next/standalone/.next/server/chunks/ssr/src_lib_0v6s6se._.js +0 -3
  325. package/.next/standalone/.next/static/chunks/01.g0gvh6h11a.js +0 -2
  326. package/.next/standalone/.next/static/chunks/03zzmb3y7kpxl.js +0 -1
  327. package/.next/standalone/.next/static/chunks/0dt3ljzz2pz0r.css +0 -1
  328. package/.next/standalone/.next/static/chunks/0nfwp8f87wok1.js +0 -1
  329. package/.next/standalone/.next/static/chunks/0qonpqhvpg-tt.js +0 -1
  330. package/.next/standalone/.next/static/chunks/0qu5zm6k.e_de.js +0 -5
  331. package/.next/standalone/.next/static/chunks/0w7_~s93hxxkk.js +0 -1
  332. package/.next/standalone/.next/static/chunks/0yl2smjfz2bzk.js +0 -1
  333. package/.next/standalone/.next/static/chunks/0~uo_7-sxehxf.js +0 -1
  334. package/.next/standalone/.next/static/chunks/11pivwhywsmj9.js +0 -1
  335. package/.next/standalone/.next/static/chunks/13ipvyn1q8z4y.js +0 -1
  336. package/.next/standalone/.next/static/chunks/14bii1nj2yewi.js +0 -1
  337. package/.next/standalone/.next/static/chunks/15_ulpp1r-6ra.js +0 -1
  338. package/.next/standalone/.next/static/chunks/15~2jg4z8h54~.js +0 -1
  339. package/.next/standalone/.next/static/chunks/183k6undfylp5.js +0 -1
  340. /package/.next/standalone/.next/static/{08PQLn-tnfP4XX6HBzxZ7 → wtOlqKEl8oeuEeWLbCnuv}/_buildManifest.js +0 -0
  341. /package/.next/standalone/.next/static/{08PQLn-tnfP4XX6HBzxZ7 → wtOlqKEl8oeuEeWLbCnuv}/_clientMiddlewareManifest.js +0 -0
  342. /package/.next/standalone/.next/static/{08PQLn-tnfP4XX6HBzxZ7 → wtOlqKEl8oeuEeWLbCnuv}/_ssgManifest.js +0 -0
@@ -17291,21 +17291,21 @@ var require_react_development = __commonJS({
17291
17291
  );
17292
17292
  actScopeDepth = prevActScopeDepth;
17293
17293
  }
17294
- function recursivelyFlushAsyncActWork(returnValue, resolve3, reject) {
17294
+ function recursivelyFlushAsyncActWork(returnValue, resolve2, reject) {
17295
17295
  var queue = ReactSharedInternals.actQueue;
17296
17296
  if (null !== queue)
17297
17297
  if (0 !== queue.length)
17298
17298
  try {
17299
17299
  flushActQueue(queue);
17300
17300
  enqueueTask(function() {
17301
- return recursivelyFlushAsyncActWork(returnValue, resolve3, reject);
17301
+ return recursivelyFlushAsyncActWork(returnValue, resolve2, reject);
17302
17302
  });
17303
17303
  return;
17304
17304
  } catch (error48) {
17305
17305
  ReactSharedInternals.thrownErrors.push(error48);
17306
17306
  }
17307
17307
  else ReactSharedInternals.actQueue = null;
17308
- 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve3(returnValue);
17308
+ 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve2(returnValue);
17309
17309
  }
17310
17310
  function flushActQueue(queue) {
17311
17311
  if (!isFlushing) {
@@ -17492,7 +17492,7 @@ var require_react_development = __commonJS({
17492
17492
  ));
17493
17493
  });
17494
17494
  return {
17495
- then: function(resolve3, reject) {
17495
+ then: function(resolve2, reject) {
17496
17496
  didAwaitActCall = true;
17497
17497
  thenable.then(
17498
17498
  function(returnValue) {
@@ -17502,7 +17502,7 @@ var require_react_development = __commonJS({
17502
17502
  flushActQueue(queue), enqueueTask(function() {
17503
17503
  return recursivelyFlushAsyncActWork(
17504
17504
  returnValue,
17505
- resolve3,
17505
+ resolve2,
17506
17506
  reject
17507
17507
  );
17508
17508
  });
@@ -17516,7 +17516,7 @@ var require_react_development = __commonJS({
17516
17516
  ReactSharedInternals.thrownErrors.length = 0;
17517
17517
  reject(_thrownError);
17518
17518
  }
17519
- } else resolve3(returnValue);
17519
+ } else resolve2(returnValue);
17520
17520
  },
17521
17521
  function(error48) {
17522
17522
  popActScope(prevActQueue, prevActScopeDepth);
@@ -17538,15 +17538,15 @@ var require_react_development = __commonJS({
17538
17538
  if (0 < ReactSharedInternals.thrownErrors.length)
17539
17539
  throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
17540
17540
  return {
17541
- then: function(resolve3, reject) {
17541
+ then: function(resolve2, reject) {
17542
17542
  didAwaitActCall = true;
17543
17543
  0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
17544
17544
  return recursivelyFlushAsyncActWork(
17545
17545
  returnValue$jscomp$0,
17546
- resolve3,
17546
+ resolve2,
17547
17547
  reject
17548
17548
  );
17549
- })) : resolve3(returnValue$jscomp$0);
17549
+ })) : resolve2(returnValue$jscomp$0);
17550
17550
  }
17551
17551
  };
17552
17552
  };
@@ -18177,14 +18177,14 @@ var require_promise_with_resolvers = __commonJS({
18177
18177
  }
18178
18178
  });
18179
18179
  function createPromiseWithResolvers() {
18180
- let resolve3;
18180
+ let resolve2;
18181
18181
  let reject;
18182
18182
  const promise2 = new Promise((res, rej) => {
18183
- resolve3 = res;
18183
+ resolve2 = res;
18184
18184
  reject = rej;
18185
18185
  });
18186
18186
  return {
18187
- resolve: resolve3,
18187
+ resolve: resolve2,
18188
18188
  reject,
18189
18189
  promise: promise2
18190
18190
  };
@@ -18470,8 +18470,8 @@ var require_staged_rendering = __commonJS({
18470
18470
  function ignoreReject() {
18471
18471
  }
18472
18472
  function makeDevtoolsIOPromiseFromIOTrigger(ioTrigger, displayName, resolvedValue) {
18473
- const promise2 = new Promise((resolve3, reject) => {
18474
- ioTrigger.then(resolve3.bind(null, resolvedValue), reject);
18473
+ const promise2 = new Promise((resolve2, reject) => {
18474
+ ioTrigger.then(resolve2.bind(null, resolvedValue), reject);
18475
18475
  });
18476
18476
  if (displayName !== void 0) {
18477
18477
  promise2.displayName = displayName;
@@ -18851,9 +18851,9 @@ var require_dynamic_rendering_utils = __commonJS({
18851
18851
  if (requestStore.stagedRendering) {
18852
18852
  return requestStore.stagedRendering.delayUntilStage(stage, void 0, underlying);
18853
18853
  }
18854
- return new Promise((resolve3) => {
18854
+ return new Promise((resolve2) => {
18855
18855
  setTimeout(() => {
18856
- resolve3(underlying);
18856
+ resolve2(underlying);
18857
18857
  }, 0);
18858
18858
  });
18859
18859
  }
@@ -18951,7 +18951,7 @@ var require_scheduler = __commonJS({
18951
18951
  }
18952
18952
  };
18953
18953
  function atLeastOneTask() {
18954
- return new Promise((resolve3) => scheduleImmediate(resolve3));
18954
+ return new Promise((resolve2) => scheduleImmediate(resolve2));
18955
18955
  }
18956
18956
  function waitAtLeastOneReactRenderTask() {
18957
18957
  if (process.env.NEXT_RUNTIME === "edge") {
@@ -20145,13 +20145,13 @@ var require_detached_promise = __commonJS({
20145
20145
  });
20146
20146
  var DetachedPromise = class {
20147
20147
  constructor() {
20148
- let resolve3;
20148
+ let resolve2;
20149
20149
  let reject;
20150
20150
  this.promise = new Promise((res, rej) => {
20151
- resolve3 = res;
20151
+ resolve2 = res;
20152
20152
  reject = rej;
20153
20153
  });
20154
- this.resolve = resolve3;
20154
+ this.resolve = resolve2;
20155
20155
  this.reject = reject;
20156
20156
  }
20157
20157
  };
@@ -20201,15 +20201,15 @@ var require_batcher = __commonJS({
20201
20201
  }
20202
20202
  const pending = this.pending.get(cacheKey);
20203
20203
  if (pending) return pending;
20204
- const { promise: promise2, resolve: resolve3, reject } = new _detachedpromise.DetachedPromise();
20204
+ const { promise: promise2, resolve: resolve2, reject } = new _detachedpromise.DetachedPromise();
20205
20205
  this.pending.set(cacheKey, promise2);
20206
20206
  this.schedulerFn(async () => {
20207
20207
  try {
20208
20208
  const result = await fn({
20209
- resolve: resolve3,
20209
+ resolve: resolve2,
20210
20210
  key
20211
20211
  });
20212
- resolve3(result);
20212
+ resolve2(result);
20213
20213
  } catch (err) {
20214
20214
  reject(err);
20215
20215
  } finally {
@@ -23792,7 +23792,7 @@ var require_response_cache = __commonJS({
23792
23792
  const response = await this.getBatcher.batch({
23793
23793
  key,
23794
23794
  isOnDemandRevalidate
23795
- }, ({ resolve: resolve3 }) => {
23795
+ }, ({ resolve: resolve2 }) => {
23796
23796
  const promise2 = this.handleGet(key, responseGenerator, {
23797
23797
  incrementalCache,
23798
23798
  isOnDemandRevalidate,
@@ -23801,7 +23801,7 @@ var require_response_cache = __commonJS({
23801
23801
  isPrefetch,
23802
23802
  routeKind,
23803
23803
  invocationID
23804
- }, resolve3);
23804
+ }, resolve2);
23805
23805
  if (waitUntil) waitUntil(promise2);
23806
23806
  return promise2;
23807
23807
  });
@@ -23816,7 +23816,7 @@ var require_response_cache = __commonJS({
23816
23816
  * @param resolve - The resolve function to use to resolve the response cache entry.
23817
23817
  * @returns The response cache entry.
23818
23818
  */
23819
- async handleGet(key, responseGenerator, context, resolve3) {
23819
+ async handleGet(key, responseGenerator, context, resolve2) {
23820
23820
  let previousIncrementalCacheEntry = null;
23821
23821
  let resolved = false;
23822
23822
  try {
@@ -23826,7 +23826,7 @@ var require_response_cache = __commonJS({
23826
23826
  isFallback: context.isFallback
23827
23827
  }) : null;
23828
23828
  if (previousIncrementalCacheEntry && !context.isOnDemandRevalidate) {
23829
- resolve3(previousIncrementalCacheEntry);
23829
+ resolve2(previousIncrementalCacheEntry);
23830
23830
  resolved = true;
23831
23831
  if (!previousIncrementalCacheEntry.isStale || context.isPrefetch) {
23832
23832
  return previousIncrementalCacheEntry;
@@ -26585,7 +26585,8 @@ __export2(platform_exports, {
26585
26585
  resolveSpawnTarget: () => resolveSpawnTarget,
26586
26586
  resolveSpawnTargetSync: () => resolveSpawnTargetSync,
26587
26587
  stripClaudeNestingEnv: () => stripClaudeNestingEnv,
26588
- toForwardSlash: () => toForwardSlash
26588
+ toForwardSlash: () => toForwardSlash,
26589
+ wrapShellCommand: () => wrapShellCommand
26589
26590
  });
26590
26591
  function isWindows(platform = process.platform) {
26591
26592
  return platform === "win32";
@@ -26684,7 +26685,7 @@ function resolveCommandPathSync(command, platform = process.platform, exec = def
26684
26685
  }
26685
26686
  return command;
26686
26687
  }
26687
- function resolveSdkExecutable(command, platform = process.platform, readFile = (p2) => (0, import_node_fs2.readFileSync)(p2, "utf-8"), fileExists = (p2) => (0, import_node_fs2.existsSync)(p2)) {
26688
+ function resolveSdkExecutable(command, platform = process.platform, readFile2 = (p2) => (0, import_node_fs2.readFileSync)(p2, "utf-8"), fileExists = (p2) => (0, import_node_fs2.existsSync)(p2)) {
26688
26689
  if (!isWindows(platform)) return command;
26689
26690
  const ext = import_node_path2.default.extname(command).toLowerCase();
26690
26691
  if (ext !== ".cmd" && ext !== ".bat") return command;
@@ -26695,7 +26696,7 @@ function resolveSdkExecutable(command, platform = process.platform, readFile = (
26695
26696
  return import_node_path2.default.win32.isAbsolute(p2) ? import_node_path2.default.win32.normalize(p2) : import_node_path2.default.win32.resolve(dir, p2);
26696
26697
  };
26697
26698
  try {
26698
- const shim = readFile(command);
26699
+ const shim = readFile2(command);
26699
26700
  shimSnippet = shim.replace(/\s+/g, " ").slice(0, 400);
26700
26701
  const jsMatch = shim.match(/"([^"]*\.(?:c?js|mjs))"/i);
26701
26702
  if (jsMatch) {
@@ -26736,6 +26737,13 @@ function resolveSpawnTargetSync(command, args, platform = process.platform, exec
26736
26737
  const resolved = resolveCommandPathSync(command, platform, exec);
26737
26738
  return wrapForPlatform(resolved, args, process.env, platform);
26738
26739
  }
26740
+ function wrapShellCommand(commandLine, platform = process.platform, env = process.env) {
26741
+ if (isWindows(platform)) {
26742
+ const shell = env.ComSpec || "cmd.exe";
26743
+ return { command: shell, args: ["/d", "/s", "/c", commandLine] };
26744
+ }
26745
+ return { command: "/bin/sh", args: ["-c", commandLine] };
26746
+ }
26739
26747
  function wrapForPlatform(executable, args, env, platform) {
26740
26748
  if (!isWindows(platform)) {
26741
26749
  return { command: executable, args };
@@ -30931,11 +30939,11 @@ var require_windowsConoutConnection = __commonJS({
30931
30939
  "use strict";
30932
30940
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P2, generator) {
30933
30941
  function adopt(value) {
30934
- return value instanceof P2 ? value : new P2(function(resolve3) {
30935
- resolve3(value);
30942
+ return value instanceof P2 ? value : new P2(function(resolve2) {
30943
+ resolve2(value);
30936
30944
  });
30937
30945
  }
30938
- return new (P2 || (P2 = Promise))(function(resolve3, reject) {
30946
+ return new (P2 || (P2 = Promise))(function(resolve2, reject) {
30939
30947
  function fulfilled(value) {
30940
30948
  try {
30941
30949
  step(generator.next(value));
@@ -30951,7 +30959,7 @@ var require_windowsConoutConnection = __commonJS({
30951
30959
  }
30952
30960
  }
30953
30961
  function step(result) {
30954
- result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
30962
+ result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
30955
30963
  }
30956
30964
  step((generator = generator.apply(thisArg, _arguments || [])).next());
30957
30965
  });
@@ -31270,15 +31278,15 @@ var require_windowsPtyAgent = __commonJS({
31270
31278
  };
31271
31279
  WindowsPtyAgent2.prototype._getConsoleProcessList = function() {
31272
31280
  var _this = this;
31273
- return new Promise(function(resolve3) {
31281
+ return new Promise(function(resolve2) {
31274
31282
  var agent = child_process_1.fork(path6.join(__dirname, "conpty_console_list_agent"), [_this._innerPid.toString()]);
31275
31283
  agent.on("message", function(message) {
31276
31284
  clearTimeout(timeout);
31277
- resolve3(message.consoleProcessList);
31285
+ resolve2(message.consoleProcessList);
31278
31286
  });
31279
31287
  var timeout = setTimeout(function() {
31280
31288
  agent.kill();
31281
- resolve3([_this._innerPid]);
31289
+ resolve2([_this._innerPid]);
31282
31290
  }, 5e3);
31283
31291
  });
31284
31292
  };
@@ -32040,6 +32048,11 @@ var init_pty_session = __esm({
32040
32048
  get isIdle() {
32041
32049
  return this._idleFired;
32042
32050
  }
32051
+ /** OS pid of the spawned process (claude CLI). Used to persist for orphan
32052
+ * reaping across Tower restarts and to target the process group on kill. */
32053
+ get pid() {
32054
+ return this._pty.pid;
32055
+ }
32043
32056
  /** D-06: double-kill guard. Accepts optional signal (default SIGTERM). */
32044
32057
  kill(signal) {
32045
32058
  if (this.killed) return;
@@ -32064,10 +32077,89 @@ var init_pty_session = __esm({
32064
32077
  }
32065
32078
  this.killed = true;
32066
32079
  }
32080
+ /**
32081
+ * Kill the ENTIRE process group, not just the immediate child.
32082
+ *
32083
+ * node-pty's `kill()` does `process.kill(this.pid, signal)` — it signals only
32084
+ * the spawned process (the claude CLI). But claude spawns its own children
32085
+ * (MCP servers, language servers) that inherit claude's process group (node-pty
32086
+ * runs the child as a setsid session leader, so pgid === claude's pid). Signalling
32087
+ * only claude leaves those children orphaned (reparented to pid 1) when claude is
32088
+ * force-killed or crashes — the "残留 node 进程" the user observes.
32089
+ *
32090
+ * Signalling the negative pid (`-pid`) targets the whole process group, reaping
32091
+ * claude + all its descendants. SIGTERM first for graceful shutdown, then a
32092
+ * SIGKILL escalation after `graceMs` for anything that ignores it (hung dev
32093
+ * servers, stuck MCP processes).
32094
+ *
32095
+ * On Windows there is no POSIX process group; node-pty's conpty/winpty backend
32096
+ * already terminates the whole job object tree, so we fall back to a plain kill.
32097
+ */
32098
+ killTree(graceMs = 3e3) {
32099
+ if (this.killed) return;
32100
+ this.killed = true;
32101
+ if (this._idleTimer) {
32102
+ clearTimeout(this._idleTimer);
32103
+ this._idleTimer = null;
32104
+ }
32105
+ const pid = this._pty.pid;
32106
+ if (process.platform === "win32") {
32107
+ try {
32108
+ this._pty.kill();
32109
+ } catch {
32110
+ }
32111
+ return;
32112
+ }
32113
+ try {
32114
+ process.kill(-pid, "SIGTERM");
32115
+ } catch {
32116
+ try {
32117
+ this._pty.kill();
32118
+ } catch {
32119
+ }
32120
+ return;
32121
+ }
32122
+ const t = setTimeout(() => {
32123
+ try {
32124
+ process.kill(-pid, "SIGKILL");
32125
+ } catch {
32126
+ }
32127
+ }, graceMs);
32128
+ t.unref?.();
32129
+ }
32067
32130
  };
32068
32131
  }
32069
32132
  });
32070
32133
 
32134
+ // src/lib/pty/orphan-reaper.ts
32135
+ function pidFilePath(sessionKey) {
32136
+ return (0, import_node_path3.join)(SIGNAL_DIR, `${PID_PREFIX}${sessionKey}`);
32137
+ }
32138
+ async function recordSessionPid(sessionKey, pid) {
32139
+ try {
32140
+ await (0, import_promises.mkdir)(SIGNAL_DIR, { recursive: true, mode: 448 });
32141
+ await (0, import_promises.writeFile)(pidFilePath(sessionKey), String(pid), { mode: 384 });
32142
+ } catch {
32143
+ }
32144
+ }
32145
+ async function clearSessionPid(sessionKey) {
32146
+ try {
32147
+ await (0, import_promises.unlink)(pidFilePath(sessionKey));
32148
+ } catch {
32149
+ }
32150
+ }
32151
+ var import_promises, import_node_os2, import_node_path3, SIGNAL_DIR, PID_PREFIX;
32152
+ var init_orphan_reaper = __esm({
32153
+ "src/lib/pty/orphan-reaper.ts"() {
32154
+ "use strict";
32155
+ import_promises = require("node:fs/promises");
32156
+ import_node_os2 = require("node:os");
32157
+ import_node_path3 = require("node:path");
32158
+ SIGNAL_DIR = (0, import_node_path3.join)((0, import_node_os2.tmpdir)(), "tower-signals");
32159
+ PID_PREFIX = "pid-";
32160
+ }
32161
+ });
32162
+
32071
32163
  // src/lib/pty/session-store.ts
32072
32164
  var session_store_exports = {};
32073
32165
  __export2(session_store_exports, {
@@ -32077,24 +32169,31 @@ __export2(session_store_exports, {
32077
32169
  getSession: () => getSession
32078
32170
  });
32079
32171
  function createSession(taskId, command, args, cwd, onData, onExit, envOverrides, onIdle, idleThresholdMs) {
32080
- destroySession(taskId);
32172
+ teardownSession(taskId);
32081
32173
  const { command: resolvedCommand, args: resolvedArgs } = resolveSpawnTargetSync(command, args);
32082
32174
  const session = new PtySession(taskId, resolvedCommand, resolvedArgs, cwd, onData, onExit, envOverrides, onIdle, idleThresholdMs);
32083
32175
  sessions.set(taskId, session);
32176
+ void recordSessionPid(taskId, session.pid);
32084
32177
  return session;
32085
32178
  }
32086
32179
  function getSession(taskId) {
32087
32180
  return sessions.get(taskId);
32088
32181
  }
32089
- function destroySession(taskId) {
32182
+ function teardownSession(taskId) {
32090
32183
  const session = sessions.get(taskId);
32091
- if (!session) return;
32184
+ if (!session) return void 0;
32092
32185
  sessions.delete(taskId);
32093
32186
  if (session.disconnectTimer) {
32094
32187
  clearTimeout(session.disconnectTimer);
32095
32188
  session.disconnectTimer = null;
32096
32189
  }
32097
- session.kill();
32190
+ session.killTree();
32191
+ return session;
32192
+ }
32193
+ function destroySession(taskId) {
32194
+ if (teardownSession(taskId)) {
32195
+ void clearSessionPid(taskId);
32196
+ }
32098
32197
  }
32099
32198
  function destroyAllSessions() {
32100
32199
  for (const taskId of sessions.keys()) {
@@ -32107,6 +32206,7 @@ var init_session_store = __esm({
32107
32206
  "use strict";
32108
32207
  init_pty_session();
32109
32208
  init_platform();
32209
+ init_orphan_reaper();
32110
32210
  g = globalThis;
32111
32211
  if (!g.__ptySessions) {
32112
32212
  g.__ptySessions = /* @__PURE__ */ new Map();
@@ -33366,7 +33466,7 @@ function Gb() {
33366
33466
  if (!a$(process.env.DEBUG_CLAUDE_AGENT_SDK)) return j0 = null, F0 = Promise.resolve(), F0;
33367
33467
  let $ = (0, import_path4.join)(f4(), "debug");
33368
33468
  return j0 = (0, import_path4.join)($, `sdk-${(0, import_crypto2.randomUUID)()}.txt`), process.stderr.write(`SDK debug logs: ${j0}
33369
- `), F0 = (0, import_promises2.mkdir)($, { recursive: true }).then(() => {
33469
+ `), F0 = (0, import_promises3.mkdir)($, { recursive: true }).then(() => {
33370
33470
  }).catch(() => {
33371
33471
  }), F0;
33372
33472
  }
@@ -33375,7 +33475,7 @@ function Y6($) {
33375
33475
  let J = `${(/* @__PURE__ */ new Date()).toISOString()} ${$}
33376
33476
  `;
33377
33477
  Gb().then(() => {
33378
- if (j0) (0, import_promises2.appendFile)(j0, J).catch(() => {
33478
+ if (j0) (0, import_promises3.appendFile)(j0, J).catch(() => {
33379
33479
  });
33380
33480
  });
33381
33481
  }
@@ -33482,13 +33582,13 @@ function IN($) {
33482
33582
  return CW = (0, import_path5.join)($, `${PW()}.txt`), CW;
33483
33583
  }
33484
33584
  async function Tb($, X, J, Y) {
33485
- if ($) await (0, import_promises3.mkdir)(X, { recursive: true }).catch(() => {
33585
+ if ($) await (0, import_promises4.mkdir)(X, { recursive: true }).catch(() => {
33486
33586
  });
33487
33587
  try {
33488
- await (0, import_promises3.appendFile)(J, Y);
33588
+ await (0, import_promises4.appendFile)(J, Y);
33489
33589
  } catch (Q) {
33490
33590
  if (!RW(Q)) throw Q;
33491
- await (0, import_promises3.appendFile)(IN(J), Y);
33591
+ await (0, import_promises4.appendFile)(IN(J), Y);
33492
33592
  }
33493
33593
  bN();
33494
33594
  }
@@ -33743,7 +33843,7 @@ function SB($, X) {
33743
33843
  }
33744
33844
  async function F7($) {
33745
33845
  try {
33746
- let X = await (0, import_promises6.open)($, "r");
33846
+ let X = await (0, import_promises7.open)($, "r");
33747
33847
  try {
33748
33848
  let J = await X.stat(), Y = Buffer.allocUnsafe(g6), Q = await X.read(Y, 0, g6, 0);
33749
33849
  if (Q.bytesRead === 0) return null;
@@ -33776,7 +33876,7 @@ function IE($) {
33776
33876
  }
33777
33877
  async function d4($) {
33778
33878
  try {
33779
- return (await (0, import_promises6.realpath)($)).normalize("NFC");
33879
+ return (await (0, import_promises7.realpath)($)).normalize("NFC");
33780
33880
  } catch {
33781
33881
  return $.normalize("NFC");
33782
33882
  }
@@ -33784,14 +33884,14 @@ async function d4($) {
33784
33884
  async function W6($) {
33785
33885
  let X = IE($), J = [];
33786
33886
  try {
33787
- await (0, import_promises6.readdir)(X), J.push(X);
33887
+ await (0, import_promises7.readdir)(X), J.push(X);
33788
33888
  } catch {
33789
33889
  }
33790
33890
  let Y = D4($);
33791
33891
  if (Y.length <= Z0) return J;
33792
33892
  let Q = Y.slice(0, Z0) + "-", W = h6();
33793
33893
  try {
33794
- for (let z2 of await (0, import_promises6.readdir)(W, { withFileTypes: true })) {
33894
+ for (let z2 of await (0, import_promises7.readdir)(W, { withFileTypes: true })) {
33795
33895
  if (!z2.isDirectory() || !z2.name.startsWith(Q)) continue;
33796
33896
  let G = (0, import_path6.join)(W, z2.name);
33797
33897
  if (G !== X) J.push(G);
@@ -33805,7 +33905,7 @@ async function p4($, X) {
33805
33905
  async function Y(z2, G) {
33806
33906
  let U = (0, import_path6.join)(z2, J);
33807
33907
  try {
33808
- let H = await (0, import_promises6.stat)(U);
33908
+ let H = await (0, import_promises7.stat)(U);
33809
33909
  if (H.size > 0) return { filePath: U, projectPath: G, fileSize: H.size };
33810
33910
  } catch {
33811
33911
  }
@@ -33834,7 +33934,7 @@ async function p4($, X) {
33834
33934
  }
33835
33935
  let Q = h6(), W;
33836
33936
  try {
33837
- W = await (0, import_promises6.readdir)(Q);
33937
+ W = await (0, import_promises7.readdir)(Q);
33838
33938
  } catch {
33839
33939
  return;
33840
33940
  }
@@ -33928,7 +34028,7 @@ function xE($) {
33928
34028
  }
33929
34029
  }
33930
34030
  async function kB($, X) {
33931
- let J = RE(), Y = ZE, Q = { out: { buf: Buffer.allocUnsafe(Math.min(X, 8388608)), len: 0, cap: X + 1 }, boundaryStartOffset: 0, hasPreservedSegment: false, lastSnapSrc: null, lastSnapLen: 0, lastSnapBuf: void 0, bufFileOff: 0, carryLen: 0, carryBuf: void 0, straddleSnapCarryLen: 0, straddleSnapTailEnd: 0 }, W = Buffer.allocUnsafe(Y), z2 = await (0, import_promises6.open)($, "r");
34031
+ let J = RE(), Y = ZE, Q = { out: { buf: Buffer.allocUnsafe(Math.min(X, 8388608)), len: 0, cap: X + 1 }, boundaryStartOffset: 0, hasPreservedSegment: false, lastSnapSrc: null, lastSnapLen: 0, lastSnapBuf: void 0, bufFileOff: 0, carryLen: 0, carryBuf: void 0, straddleSnapCarryLen: 0, straddleSnapTailEnd: 0 }, W = Buffer.allocUnsafe(Y), z2 = await (0, import_promises7.open)($, "r");
33932
34032
  try {
33933
34033
  let G = 0;
33934
34034
  while (G < X) {
@@ -33952,7 +34052,7 @@ async function kB($, X) {
33952
34052
  async function fE($, X) {
33953
34053
  try {
33954
34054
  if (X > vB && !a$(process.env.CLAUDE_CODE_DISABLE_PRECOMPACT_SKIP)) return (await kB($, X)).postBoundaryBuf;
33955
- return await (0, import_promises5.readFile)($);
34055
+ return await (0, import_promises6.readFile)($);
33956
34056
  } catch {
33957
34057
  return null;
33958
34058
  }
@@ -34129,7 +34229,7 @@ function b0($, X, J) {
34129
34229
  async function b9($, X, J) {
34130
34230
  let Y;
34131
34231
  try {
34132
- Y = await (0, import_promises7.readdir)($);
34232
+ Y = await (0, import_promises8.readdir)($);
34133
34233
  } catch {
34134
34234
  return [];
34135
34235
  }
@@ -34140,7 +34240,7 @@ async function b9($, X, J) {
34140
34240
  let G = (0, import_path7.join)($, W);
34141
34241
  if (!X) return { sessionId: z2, filePath: G, mtime: 0, projectPath: J };
34142
34242
  try {
34143
- let U = await (0, import_promises7.stat)(G);
34243
+ let U = await (0, import_promises8.stat)(G);
34144
34244
  return { sessionId: z2, filePath: G, mtime: U.mtime.getTime(), projectPath: J };
34145
34245
  } catch {
34146
34246
  return null;
@@ -34208,7 +34308,7 @@ async function rE($, X, J) {
34208
34308
  G.sort((V, N) => N.prefix.length - V.prefix.length);
34209
34309
  let U;
34210
34310
  try {
34211
- U = await (0, import_promises7.readdir)(W, { withFileTypes: true });
34311
+ U = await (0, import_promises8.readdir)(W, { withFileTypes: true });
34212
34312
  } catch {
34213
34313
  let V = [];
34214
34314
  for (let N of await W6(Y)) V.push(...await b9(N, J, Y));
@@ -34233,7 +34333,7 @@ async function rE($, X, J) {
34233
34333
  async function oE($) {
34234
34334
  let X = h6(), J;
34235
34335
  try {
34236
- J = await (0, import_promises7.readdir)(X, { withFileTypes: true });
34336
+ J = await (0, import_promises8.readdir)(X, { withFileTypes: true });
34237
34337
  } catch {
34238
34338
  return [];
34239
34339
  }
@@ -34276,14 +34376,14 @@ async function dB($, X = {}) {
34276
34376
  for (let J of await sE(X)) {
34277
34377
  let Y = (0, import_path8.join)(J, `${$}.jsonl`), Q;
34278
34378
  try {
34279
- ({ size: Q } = await (0, import_promises8.stat)(Y));
34379
+ ({ size: Q } = await (0, import_promises9.stat)(Y));
34280
34380
  } catch (W) {
34281
34381
  let z2 = y6(W);
34282
34382
  if (z2 === "ENOENT" || z2 === "ENOTDIR") continue;
34283
34383
  throw W;
34284
34384
  }
34285
34385
  if (Q === 0) continue;
34286
- await (0, import_promises8.rm)(Y, { force: true }), await (0, import_promises8.rm)((0, import_path8.join)(J, $), { recursive: true, force: true });
34386
+ await (0, import_promises9.rm)(Y, { force: true }), await (0, import_promises9.rm)((0, import_path8.join)(J, $), { recursive: true, force: true });
34287
34387
  return;
34288
34388
  }
34289
34389
  throw Error(X.dir ? `Session ${$} not found in project directory for ${X.dir}` : `Session ${$} not found in any project directory`);
@@ -34304,7 +34404,7 @@ async function sE($) {
34304
34404
  }
34305
34405
  let X = h6();
34306
34406
  try {
34307
- return (await (0, import_promises8.readdir)(X, { withFileTypes: true })).filter((Y) => Y.isDirectory() || Y.isSymbolicLink()).map((Y) => (0, import_path8.join)(X, Y.name));
34407
+ return (await (0, import_promises9.readdir)(X, { withFileTypes: true })).filter((Y) => Y.isDirectory() || Y.isSymbolicLink()).map((Y) => (0, import_path8.join)(X, Y.name));
34308
34408
  } catch {
34309
34409
  return [];
34310
34410
  }
@@ -34328,7 +34428,7 @@ async function pB($, X, J) {
34328
34428
  }
34329
34429
  let Q = h6(), W;
34330
34430
  try {
34331
- W = await (0, import_promises8.readdir)(Q);
34431
+ W = await (0, import_promises9.readdir)(Q);
34332
34432
  } catch {
34333
34433
  throw Error(`Session ${$} not found (no projects directory)`);
34334
34434
  }
@@ -34338,7 +34438,7 @@ async function pB($, X, J) {
34338
34438
  async function hz($, X) {
34339
34439
  let J;
34340
34440
  try {
34341
- J = await (0, import_promises8.open)($, import_fs5.constants.O_WRONLY | import_fs5.constants.O_APPEND);
34441
+ J = await (0, import_promises9.open)($, import_fs5.constants.O_WRONLY | import_fs5.constants.O_APPEND);
34342
34442
  } catch (Y) {
34343
34443
  let Q = y6(Y);
34344
34444
  if (Q === "ENOENT" || Q === "ENOTDIR") return false;
@@ -34357,7 +34457,7 @@ async function XS($, X) {
34357
34457
  let J = `${$}.jsonl`;
34358
34458
  async function Y(z2) {
34359
34459
  try {
34360
- let G = await (0, import_promises9.readFile)((0, import_path9.join)(z2, J));
34460
+ let G = await (0, import_promises10.readFile)((0, import_path9.join)(z2, J));
34361
34461
  if (G.length === 0) return null;
34362
34462
  return { buf: G, projectDir: z2 };
34363
34463
  } catch {
@@ -34387,7 +34487,7 @@ async function XS($, X) {
34387
34487
  }
34388
34488
  let Q = h6(), W;
34389
34489
  try {
34390
- W = await (0, import_promises9.readdir)(Q);
34490
+ W = await (0, import_promises10.readdir)(Q);
34391
34491
  } catch {
34392
34492
  return null;
34393
34493
  }
@@ -34499,7 +34599,7 @@ async function aB($) {
34499
34599
  async function J(Y) {
34500
34600
  let Q;
34501
34601
  try {
34502
- Q = await (0, import_promises10.readdir)(Y, { withFileTypes: true });
34602
+ Q = await (0, import_promises11.readdir)(Y, { withFileTypes: true });
34503
34603
  } catch {
34504
34604
  return;
34505
34605
  }
@@ -34555,7 +34655,7 @@ async function eB($, X, J) {
34555
34655
  if (!W) return [];
34556
34656
  let z2;
34557
34657
  try {
34558
- z2 = await (0, import_promises10.readFile)(W.filePath);
34658
+ z2 = await (0, import_promises11.readFile)(W.filePath);
34559
34659
  } catch {
34560
34660
  return [];
34561
34661
  }
@@ -36831,7 +36931,7 @@ async function qA($, X, J) {
36831
36931
  }
36832
36932
  async function el($, X) {
36833
36933
  try {
36834
- await (0, import_promises.copyFile)($, X);
36934
+ await (0, import_promises2.copyFile)($, X);
36835
36935
  } catch (J) {
36836
36936
  if (!D0(J)) throw J;
36837
36937
  }
@@ -36844,7 +36944,7 @@ async function $c($, X) {
36844
36944
  if (Y?.claudeAiOauth?.refreshToken) delete Y.claudeAiOauth.refreshToken, J = D$(Y);
36845
36945
  } catch {
36846
36946
  }
36847
- await (0, import_promises.writeFile)(X, J, { mode: 384 });
36947
+ await (0, import_promises2.writeFile)(X, J, { mode: 384 });
36848
36948
  }
36849
36949
  function Xc() {
36850
36950
  if (process.platform !== "darwin") return Promise.resolve(void 0);
@@ -36860,12 +36960,12 @@ async function bA($, X, J, Y, Q = 6e4) {
36860
36960
  let U = (0, import_path2.join)((0, import_os2.tmpdir)(), `claude-resume-${(0, import_crypto.randomUUID)()}`);
36861
36961
  try {
36862
36962
  let H = (0, import_path2.join)(U, "projects", z2);
36863
- await (0, import_promises.mkdir)(H, { recursive: true });
36963
+ await (0, import_promises2.mkdir)(H, { recursive: true });
36864
36964
  let K = (0, import_path2.join)(H, `${X}.jsonl`);
36865
36965
  await Z9(K, G);
36866
36966
  let V = Y?.CLAUDE_CONFIG_DIR ?? process.env.CLAUDE_CONFIG_DIR, N = V ?? (0, import_path2.join)((0, import_os2.homedir)(), ".claude"), O;
36867
36967
  try {
36868
- O = await (0, import_promises.readFile)((0, import_path2.join)(N, ".credentials.json"), "utf-8");
36968
+ O = await (0, import_promises2.readFile)((0, import_path2.join)(N, ".credentials.json"), "utf-8");
36869
36969
  } catch (w) {
36870
36970
  if (!D0(w)) throw w;
36871
36971
  }
@@ -36883,12 +36983,12 @@ async function bA($, X, J, Y, Q = 6e4) {
36883
36983
  let Z = [], _ = [];
36884
36984
  for (let T of I) if (PA(T)) Z.push(T);
36885
36985
  else _.push(T);
36886
- if (_.length > 0) await (0, import_promises.mkdir)((0, import_path2.dirname)(j), { recursive: true }), await Z9(j, _);
36986
+ if (_.length > 0) await (0, import_promises2.mkdir)((0, import_path2.dirname)(j), { recursive: true }), await Z9(j, _);
36887
36987
  if (Z.length > 0) {
36888
36988
  let T = Z.at(-1), H$ = (0, import_path2.resolve)(w, F + ".meta.json");
36889
- await (0, import_promises.mkdir)((0, import_path2.dirname)(H$), { recursive: true });
36989
+ await (0, import_promises2.mkdir)((0, import_path2.dirname)(H$), { recursive: true });
36890
36990
  let { type: y$, ...t$ } = T;
36891
- await (0, import_promises.writeFile)(H$, D$(t$), { mode: 384 });
36991
+ await (0, import_promises2.writeFile)(H$, D$(t$), { mode: 384 });
36892
36992
  }
36893
36993
  }
36894
36994
  }
@@ -36970,7 +37070,7 @@ function PK($, X, J, Y) {
36970
37070
  }
36971
37071
  async function hY($) {
36972
37072
  for (let X = 0; ; X++) try {
36973
- return await (0, import_promises.rm)($, { recursive: true, force: true });
37073
+ return await (0, import_promises2.rm)($, { recursive: true, force: true });
36974
37074
  } catch (J) {
36975
37075
  if (X >= 4 || !Jc.has(y6(J) ?? "")) return;
36976
37076
  await hK((X + 1) * 100);
@@ -37118,7 +37218,7 @@ async function X7$($, X, J) {
37118
37218
  await jA(U, K, X, W);
37119
37219
  let V = U.replace(/\.jsonl$/, ".meta.json");
37120
37220
  try {
37121
- let N = u$(await (0, import_promises.readFile)(V, "utf8"));
37221
+ let N = u$(await (0, import_promises2.readFile)(V, "utf8"));
37122
37222
  await X.append(K, [{ type: "agent_metadata", ...N }]);
37123
37223
  } catch (N) {
37124
37224
  if (!D0(N)) throw N;
@@ -37138,7 +37238,7 @@ async function Yc($) {
37138
37238
  async function J(Y) {
37139
37239
  let Q;
37140
37240
  try {
37141
- Q = await (0, import_promises.readdir)(Y, { withFileTypes: true });
37241
+ Q = await (0, import_promises2.readdir)(Y, { withFileTypes: true });
37142
37242
  } catch {
37143
37243
  return;
37144
37244
  }
@@ -37284,13 +37384,13 @@ function LA($, X) {
37284
37384
  }
37285
37385
  return null;
37286
37386
  }
37287
- var import_child_process2, import_crypto, import_fs2, import_promises, import_module, import_os2, import_path2, import_readline, import_url, import_events, import_child_process3, import_readline2, import_os3, import_path3, import_crypto2, import_promises2, import_path4, import_fs3, import_process, import_crypto3, import_promises3, import_path5, r, import_promises4, import_module2, import_url2, import_promises5, import_events2, import_fs4, import_promises6, import_path6, import_child_process4, import_util3, import_promises7, import_path7, import_fs5, import_promises8, import_path8, import_crypto4, import_promises9, import_path9, import_promises10, import_path10, import_crypto5, import_os4, import_meta, dA, pA, pY, iA, nA, oA, tA, ZJ, M, aA, B1, eA, $I, B$, q$, vN, CN, kN, yW, hN, P1, pN, z7, oN, E1, XO, YO, uW, j9, NO, tW, ZO, sW, vO, M9, Qz, H7, K7, zz, V7, Hz, Kz, zw, Vz, Vw, Ow, Bw, Fw, bw, Ew, Cw, xw, yw, mw, dw, rw, sw, QB, zB, NB, BB, vz, $J, jH, a, Y$, v4, JJ, Gj, PH, EH, QJ, Aj, C6, Cj, Tj, TH, gj, YJ, GJ, DY, UJ, jY, wL, qL, ZL, vL, kL, TL, cL, pL, aL, eL, XM, QM, zM, UM, KM, NM, wM, qM, SY, LM, AM, ZM, RM, eH, $K, TM, gM, uM, iM, oM, JK, $2, W2, G2, H2, V2, O2, D2, j2, M2, I2, b2, E2, C2, T2, g2, h2, zK, t2, s2, JA, JI, YI, WI, zI, iY, Q6, UI, uK, HI, KI, X0, VI, J0, mK, NI, OI, Z8, lK, BI, qI, cK, FI, jI, dK, pK, bJ, AI, II, ZI, bI, iK, PI, RJ, nK, rK, SI, vI, oK, kI, _I, xI, TI, fI, yI, gI, tK, aK, PJ, lI, H4, sK, eK, pI, iI, nI, $V, oI, tI, XV, sI, JV, nY, QV, YV, x4, QZ, YZ, WV, zV, GV, UV, HV, HZ, KV, VV, NV, T4, OV, wV, BV, qV, rY, DZ, T6, f4, tY, b8, f, _$, h$, q1, R8, P8, E8, S8, v8, C8, k8, _8, x8, MZ, DV, aY, sY, jV, SJ, LV, y4, ZV, IZ, MV, AV, IV, bV, EV, vV, CV, B6, q6, g4, kJ, JW, EZ, xV, V4, g8, D6, TV, h8, D1, xJ, YW, TJ, f6, u8, zW, GW, z0, fV, xZ, TZ, WW, yV, fZ, yZ, b$, gV, i, l8, uV, mZ, A$, c8, d8, hJ, pZ, G0, iZ, nZ, uJ, Z6, h4, U0, p8, mJ, i8, n8, lJ, r8, N4, o8, cJ, dJ, j1, pJ, iJ, t8, NW, cV, nJ, OW, wW, BW, dV, pV, a8, H0, rV, oV, s8, K0, L1, x$, e8, F6, O4, u4, $9, tV, qW, X9, V0, J9, sV, tZ, m4, Q9, N0, a6, O0, b6, l4, w0, Y9, rJ, W9, z9, oJ, G9, w4, U9, tJ, aJ, M1, sJ, eJ, H9, jW, XN, LW, MW, AW, IW, JN, QN, K9, V9, A1, zN, Jb, B0, N9, ZW, bW, $7, GN, UN, HN, P$, I1, j0, F0, Kb, Vb, Oo, Nb, wo, Ob, Bo, ON, BN, Zb, bb, SW, vb, Cb, vW, kb, MN, AN, xb, J7, EW, CW, bN, po, gb, R$, u$, cb, Y7, PN, w9, Z1, _W, B9, xW, TW, fW, O7, VE, Cz, uY, BE, g6, jE, LE, ME, Z0, ZE, vB, bE, B7, PE, I9, EE, SE, dE, JS, NS, Jq, OS, wS, BS, os3, Xq, qS, FS, Yq, X$, Gq, S, F4, b, j6, MS, i4, AS, L7, i$, c, P0, s$, cz, dz, C1, P9, y, u6, Uq, e, IS, ZS, bS, RS, PS, ES, SS, vS, CS, pz, kS, _S, xS, TS, fS, yS, Hq, gS, L4, S0, v0, M7, S9, A7, v9, C9, I7, k1, M4, Z7, s6, E$, k9, j4, nz, _9, A4, b7, R7, C0, E9, x9, T9, _1, f9, k0, e6, R6, n4, y9, g9, P7, rz, E7, h9, Le, R, Me, Ae, Ie, Ze, be, Re, Pe, Ee, Se, ve, Ce, ke, _e, xe, Nq, Te, fe, ye, ge, he, ue, me, le, ce, de, pe, ie, ne, re, oe, te, ae, se, ee, m6, S7, v7, I4, u9, E, C7, ez, $v, p9, $G, JG, QG, Oq, wq, r9, T0, x7, f1, T7, y1, f7, o4, y7, t4, a4, WG, zG, GG, UG, HG, KG, VG, Kv, NG, g1, Vv, Nv, Ov, OG, wv, Bv, qv, Dv, Fv, BG, qG, DG, FG, jG, g7, LG, jv, MG, qq, AG, bG, RG, PG, EG, SG, vG, CG, kG, _G, I$, jq, h7, u7, xG, TG, fG, yG, gG, hG, uG, mG, lG, g0, cG, dG, pG, iG, nG, rG, oG, tG, aG, m7, sG, p, s4, V$, d7, p7, i7, n7, r7, o7, t7, a7, s7, e7, $Q, $3, X3, J3, Q3, XQ, JQ, QQ, YQ, WQ, zQ, GQ, UQ, HQ, o9, KQ, h0, t9, VQ, NQ, OQ, wQ, BQ, h1, qQ, DQ, FQ, u0, a9, s9, jQ, LQ, e4, MQ, AQ, IQ, ZQ, bQ, RQ, m0, PQ, EQ, SQ, vQ, CQ, kQ, _Q, xQ, l0, TQ, fQ, yQ, gQ, hQ, c0, Lv, Mv, Av, Iv, Zv, bv, Rv, Pv, Ev, Sv, vv, Cv, kv, _v, xv, Tv, fv, yv, gv, hv, uv, mv, lv, cv, dv, pv, iv, nv, rv, ov, tv, av, sv, ev, $C, XC, JC, QC, YC, WC, zC, GC, uQ, mQ, $X, U6, cQ, YU, w5, yq, vC, CC, Q1, t0, F5, j5, L5, M5, mq, xC, a0, KU, VU, NU, OU, s, BU, yX, F$, qU, A5, E4, DU, FU, jU, LU, MU, AU, IU, ZU, bU, RU, PU, EU, SU, vU, CU, kU, lq, gX, s0, hX, uX, _U, cq, dq, pq, iq, nq, rq, oq, P5, tq, E5, xU, aq, sq, eq, TU, $D, XD, fX, JD, QD, fU, gU, YD, WD, GD, hU, KD, VD, OD, uU, wD, qD, DD, jD, v5, Ck, _k, lU, cU, ID, Y1, _5, f$, ZD, bD, S4$, mk, lk, dU, M6, lX, RD, m$, S6, v6, l$, x5, PD, pU, ED, SD, iU, cX, m, nU, vD, v4$, C4$, T5, ck, f5, dk, dX, e0, CD, pk, ik, nk, rk, ok, tk, rU, ak, sk, oU, y5, ek, $_, g52, X_, pX, iX, J_, nX, $8, Q_, rX, h5, u5, m5, k4$, l5, c5, d5, kD, _D, xD, tU, TD, oX, X8, fD, Y_, p5, W_, i5, z_, aU, G_, n5, U_, H_, K_, V_, N_, O_, w_, B_, q_, D_, r5, F_, j_, o5, sU, eU, $H, L_, M_, A_, XH, I_, Z_, b_, R_, P_, yD, t5, E_, a5, _4$, S_, J8, v_, x4$, tX, C_, JH, k_, __, x_, T_, f_, y_, g_, k5, h_, u_, m_, aX, QH, l_, c_, d_, p_, i_, n_, r_, o_, t_, a_, s_, e_, $x, Xx, Jx, Qx, Yx, Wx, Q8, zx, Gx, Ux, s5, Hx, Kx, Vx, YH, Nx, T4$, f4$, y4$, g4$, h4$, u4$, h, uD, lD, mD, cD, dD, e5, rD, Ox, wx, GH, l6, Bx, sX, WF, KF, VF, DF, FF, jx, Lx, HH, Ax, OH, QA, YA, qK, DK, FK, UA, GA, _l, MK, IK, fl, AJ, BA, ml, Q4, DA, Jc;
37387
+ var import_child_process2, import_crypto, import_fs2, import_promises2, import_module, import_os2, import_path2, import_readline, import_url, import_events, import_child_process3, import_readline2, import_os3, import_path3, import_crypto2, import_promises3, import_path4, import_fs3, import_process, import_crypto3, import_promises4, import_path5, r, import_promises5, import_module2, import_url2, import_promises6, import_events2, import_fs4, import_promises7, import_path6, import_child_process4, import_util3, import_promises8, import_path7, import_fs5, import_promises9, import_path8, import_crypto4, import_promises10, import_path9, import_promises11, import_path10, import_crypto5, import_os4, import_meta, dA, pA, pY, iA, nA, oA, tA, ZJ, M, aA, B1, eA, $I, B$, q$, vN, CN, kN, yW, hN, P1, pN, z7, oN, E1, XO, YO, uW, j9, NO, tW, ZO, sW, vO, M9, Qz, H7, K7, zz, V7, Hz, Kz, zw, Vz, Vw, Ow, Bw, Fw, bw, Ew, Cw, xw, yw, mw, dw, rw, sw, QB, zB, NB, BB, vz, $J, jH, a, Y$, v4, JJ, Gj, PH, EH, QJ, Aj, C6, Cj, Tj, TH, gj, YJ, GJ, DY, UJ, jY, wL, qL, ZL, vL, kL, TL, cL, pL, aL, eL, XM, QM, zM, UM, KM, NM, wM, qM, SY, LM, AM, ZM, RM, eH, $K, TM, gM, uM, iM, oM, JK, $2, W2, G2, H2, V2, O2, D2, j2, M2, I2, b2, E2, C2, T2, g2, h2, zK, t2, s2, JA, JI, YI, WI, zI, iY, Q6, UI, uK, HI, KI, X0, VI, J0, mK, NI, OI, Z8, lK, BI, qI, cK, FI, jI, dK, pK, bJ, AI, II, ZI, bI, iK, PI, RJ, nK, rK, SI, vI, oK, kI, _I, xI, TI, fI, yI, gI, tK, aK, PJ, lI, H4, sK, eK, pI, iI, nI, $V, oI, tI, XV, sI, JV, nY, QV, YV, x4, QZ, YZ, WV, zV, GV, UV, HV, HZ, KV, VV, NV, T4, OV, wV, BV, qV, rY, DZ, T6, f4, tY, b8, f, _$, h$, q1, R8, P8, E8, S8, v8, C8, k8, _8, x8, MZ, DV, aY, sY, jV, SJ, LV, y4, ZV, IZ, MV, AV, IV, bV, EV, vV, CV, B6, q6, g4, kJ, JW, EZ, xV, V4, g8, D6, TV, h8, D1, xJ, YW, TJ, f6, u8, zW, GW, z0, fV, xZ, TZ, WW, yV, fZ, yZ, b$, gV, i, l8, uV, mZ, A$, c8, d8, hJ, pZ, G0, iZ, nZ, uJ, Z6, h4, U0, p8, mJ, i8, n8, lJ, r8, N4, o8, cJ, dJ, j1, pJ, iJ, t8, NW, cV, nJ, OW, wW, BW, dV, pV, a8, H0, rV, oV, s8, K0, L1, x$, e8, F6, O4, u4, $9, tV, qW, X9, V0, J9, sV, tZ, m4, Q9, N0, a6, O0, b6, l4, w0, Y9, rJ, W9, z9, oJ, G9, w4, U9, tJ, aJ, M1, sJ, eJ, H9, jW, XN, LW, MW, AW, IW, JN, QN, K9, V9, A1, zN, Jb, B0, N9, ZW, bW, $7, GN, UN, HN, P$, I1, j0, F0, Kb, Vb, Oo, Nb, wo, Ob, Bo, ON, BN, Zb, bb, SW, vb, Cb, vW, kb, MN, AN, xb, J7, EW, CW, bN, po, gb, R$, u$, cb, Y7, PN, w9, Z1, _W, B9, xW, TW, fW, O7, VE, Cz, uY, BE, g6, jE, LE, ME, Z0, ZE, vB, bE, B7, PE, I9, EE, SE, dE, JS, NS, Jq, OS, wS, BS, os3, Xq, qS, FS, Yq, X$, Gq, S, F4, b, j6, MS, i4, AS, L7, i$, c, P0, s$, cz, dz, C1, P9, y, u6, Uq, e, IS, ZS, bS, RS, PS, ES, SS, vS, CS, pz, kS, _S, xS, TS, fS, yS, Hq, gS, L4, S0, v0, M7, S9, A7, v9, C9, I7, k1, M4, Z7, s6, E$, k9, j4, nz, _9, A4, b7, R7, C0, E9, x9, T9, _1, f9, k0, e6, R6, n4, y9, g9, P7, rz, E7, h9, Le, R, Me, Ae, Ie, Ze, be, Re, Pe, Ee, Se, ve, Ce, ke, _e, xe, Nq, Te, fe, ye, ge, he, ue, me, le, ce, de, pe, ie, ne, re, oe, te, ae, se, ee, m6, S7, v7, I4, u9, E, C7, ez, $v, p9, $G, JG, QG, Oq, wq, r9, T0, x7, f1, T7, y1, f7, o4, y7, t4, a4, WG, zG, GG, UG, HG, KG, VG, Kv, NG, g1, Vv, Nv, Ov, OG, wv, Bv, qv, Dv, Fv, BG, qG, DG, FG, jG, g7, LG, jv, MG, qq, AG, bG, RG, PG, EG, SG, vG, CG, kG, _G, I$, jq, h7, u7, xG, TG, fG, yG, gG, hG, uG, mG, lG, g0, cG, dG, pG, iG, nG, rG, oG, tG, aG, m7, sG, p, s4, V$, d7, p7, i7, n7, r7, o7, t7, a7, s7, e7, $Q, $3, X3, J3, Q3, XQ, JQ, QQ, YQ, WQ, zQ, GQ, UQ, HQ, o9, KQ, h0, t9, VQ, NQ, OQ, wQ, BQ, h1, qQ, DQ, FQ, u0, a9, s9, jQ, LQ, e4, MQ, AQ, IQ, ZQ, bQ, RQ, m0, PQ, EQ, SQ, vQ, CQ, kQ, _Q, xQ, l0, TQ, fQ, yQ, gQ, hQ, c0, Lv, Mv, Av, Iv, Zv, bv, Rv, Pv, Ev, Sv, vv, Cv, kv, _v, xv, Tv, fv, yv, gv, hv, uv, mv, lv, cv, dv, pv, iv, nv, rv, ov, tv, av, sv, ev, $C, XC, JC, QC, YC, WC, zC, GC, uQ, mQ, $X, U6, cQ, YU, w5, yq, vC, CC, Q1, t0, F5, j5, L5, M5, mq, xC, a0, KU, VU, NU, OU, s, BU, yX, F$, qU, A5, E4, DU, FU, jU, LU, MU, AU, IU, ZU, bU, RU, PU, EU, SU, vU, CU, kU, lq, gX, s0, hX, uX, _U, cq, dq, pq, iq, nq, rq, oq, P5, tq, E5, xU, aq, sq, eq, TU, $D, XD, fX, JD, QD, fU, gU, YD, WD, GD, hU, KD, VD, OD, uU, wD, qD, DD, jD, v5, Ck, _k, lU, cU, ID, Y1, _5, f$, ZD, bD, S4$, mk, lk, dU, M6, lX, RD, m$, S6, v6, l$, x5, PD, pU, ED, SD, iU, cX, m, nU, vD, v4$, C4$, T5, ck, f5, dk, dX, e0, CD, pk, ik, nk, rk, ok, tk, rU, ak, sk, oU, y5, ek, $_, g52, X_, pX, iX, J_, nX, $8, Q_, rX, h5, u5, m5, k4$, l5, c5, d5, kD, _D, xD, tU, TD, oX, X8, fD, Y_, p5, W_, i5, z_, aU, G_, n5, U_, H_, K_, V_, N_, O_, w_, B_, q_, D_, r5, F_, j_, o5, sU, eU, $H, L_, M_, A_, XH, I_, Z_, b_, R_, P_, yD, t5, E_, a5, _4$, S_, J8, v_, x4$, tX, C_, JH, k_, __, x_, T_, f_, y_, g_, k5, h_, u_, m_, aX, QH, l_, c_, d_, p_, i_, n_, r_, o_, t_, a_, s_, e_, $x, Xx, Jx, Qx, Yx, Wx, Q8, zx, Gx, Ux, s5, Hx, Kx, Vx, YH, Nx, T4$, f4$, y4$, g4$, h4$, u4$, h, uD, lD, mD, cD, dD, e5, rD, Ox, wx, GH, l6, Bx, sX, WF, KF, VF, DF, FF, jx, Lx, HH, Ax, OH, QA, YA, qK, DK, FK, UA, GA, _l, MK, IK, fl, AJ, BA, ml, Q4, DA, Jc;
37288
37388
  var init_sdk = __esm({
37289
37389
  "node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.2.114_zod@4.3.6/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs"() {
37290
37390
  import_child_process2 = require("child_process");
37291
37391
  import_crypto = require("crypto");
37292
37392
  import_fs2 = require("fs");
37293
- import_promises = require("fs/promises");
37393
+ import_promises2 = require("fs/promises");
37294
37394
  import_module = require("module");
37295
37395
  import_os2 = require("os");
37296
37396
  import_path2 = require("path");
@@ -37302,33 +37402,33 @@ var init_sdk = __esm({
37302
37402
  import_os3 = require("os");
37303
37403
  import_path3 = require("path");
37304
37404
  import_crypto2 = require("crypto");
37305
- import_promises2 = require("fs/promises");
37405
+ import_promises3 = require("fs/promises");
37306
37406
  import_path4 = require("path");
37307
37407
  import_fs3 = require("fs");
37308
37408
  import_process = require("process");
37309
37409
  import_crypto3 = require("crypto");
37310
- import_promises3 = require("fs/promises");
37410
+ import_promises4 = require("fs/promises");
37311
37411
  import_path5 = require("path");
37312
37412
  r = __toESM(require("fs"), 1);
37313
- import_promises4 = require("fs/promises");
37413
+ import_promises5 = require("fs/promises");
37314
37414
  import_module2 = require("module");
37315
37415
  import_url2 = require("url");
37316
- import_promises5 = require("fs/promises");
37416
+ import_promises6 = require("fs/promises");
37317
37417
  import_events2 = require("events");
37318
37418
  import_fs4 = require("fs");
37319
- import_promises6 = require("fs/promises");
37419
+ import_promises7 = require("fs/promises");
37320
37420
  import_path6 = require("path");
37321
37421
  import_child_process4 = require("child_process");
37322
37422
  import_util3 = require("util");
37323
- import_promises7 = require("fs/promises");
37423
+ import_promises8 = require("fs/promises");
37324
37424
  import_path7 = require("path");
37325
37425
  import_fs5 = require("fs");
37326
- import_promises8 = require("fs/promises");
37426
+ import_promises9 = require("fs/promises");
37327
37427
  import_path8 = require("path");
37328
37428
  import_crypto4 = require("crypto");
37329
- import_promises9 = require("fs/promises");
37330
- import_path9 = require("path");
37331
37429
  import_promises10 = require("fs/promises");
37430
+ import_path9 = require("path");
37431
+ import_promises11 = require("fs/promises");
37332
37432
  import_path10 = require("path");
37333
37433
  import_crypto5 = require("crypto");
37334
37434
  import_os4 = require("os");
@@ -44102,25 +44202,25 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
44102
44202
  q$(J, Q, W);
44103
44203
  }
44104
44204
  }, async stat($) {
44105
- return (0, import_promises4.stat)($);
44205
+ return (0, import_promises5.stat)($);
44106
44206
  }, async readdir($) {
44107
- return (0, import_promises4.readdir)($, { withFileTypes: true });
44207
+ return (0, import_promises5.readdir)($, { withFileTypes: true });
44108
44208
  }, async unlink($) {
44109
- return (0, import_promises4.unlink)($);
44209
+ return (0, import_promises5.unlink)($);
44110
44210
  }, async rmdir($) {
44111
- return (0, import_promises4.rmdir)($);
44211
+ return (0, import_promises5.rmdir)($);
44112
44212
  }, async rm($, X) {
44113
- return (0, import_promises4.rm)($, X);
44213
+ return (0, import_promises5.rm)($, X);
44114
44214
  }, async mkdir($, X) {
44115
44215
  try {
44116
- await (0, import_promises4.mkdir)($, { recursive: true, ...X });
44216
+ await (0, import_promises5.mkdir)($, { recursive: true, ...X });
44117
44217
  } catch (J) {
44118
44218
  if (y6(J) !== "EEXIST") throw J;
44119
44219
  }
44120
44220
  }, async readFile($, X) {
44121
- return (0, import_promises4.readFile)($, { encoding: X.encoding });
44221
+ return (0, import_promises5.readFile)($, { encoding: X.encoding });
44122
44222
  }, async rename($, X) {
44123
- return (0, import_promises4.rename)($, X);
44223
+ return (0, import_promises5.rename)($, X);
44124
44224
  }, statSync($) {
44125
44225
  let J = [];
44126
44226
  try {
@@ -44339,8 +44439,8 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
44339
44439
  }, createWriteStream($) {
44340
44440
  return r.createWriteStream($);
44341
44441
  }, async readFileBytes($, X) {
44342
- if (X === void 0) return (0, import_promises4.readFile)($);
44343
- let J = await (0, import_promises4.open)($, "r");
44442
+ if (X === void 0) return (0, import_promises5.readFile)($);
44443
+ let J = await (0, import_promises5.open)($, "r");
44344
44444
  try {
44345
44445
  let { size: Y } = await J.stat(), Q = Math.min(Y, X), W = Buffer.allocUnsafe(Q), z2 = 0;
44346
44446
  while (z2 < Q) {
@@ -44391,8 +44491,8 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
44391
44491
  bN = T6(async () => {
44392
44492
  try {
44393
44493
  let $ = ZN(), X = (0, import_path5.dirname)($), J = (0, import_path5.join)(X, "latest");
44394
- await (0, import_promises3.unlink)(J).catch(() => {
44395
- }), await (0, import_promises3.symlink)($, J);
44494
+ await (0, import_promises4.unlink)(J).catch(() => {
44495
+ }), await (0, import_promises4.symlink)($, J);
44396
44496
  } catch {
44397
44497
  }
44398
44498
  });
@@ -54114,7 +54214,6 @@ function isAssistantCachePath(filePath) {
54114
54214
  }
54115
54215
 
54116
54216
  // src/mcp/tools/task-tools.ts
54117
- var MCP_PROJECT_ROOT = (0, import_path11.resolve)(__dirname, "../../..");
54118
54217
  var TaskStatus = external_exports.enum(["TODO", "IN_PROGRESS", "IN_REVIEW", "DONE", "CANCELLED"]);
54119
54218
  var Priority = external_exports.enum(["LOW", "MEDIUM", "HIGH", "CRITICAL"]);
54120
54219
  var taskTools = {
@@ -54216,56 +54315,78 @@ var taskTools = {
54216
54315
  });
54217
54316
  }
54218
54317
  const attachedFiles = [];
54318
+ const attachmentFailures = [];
54219
54319
  let updatedDesc = null;
54220
54320
  if (args.references && args.references.length > 0) {
54221
- const assetsDir = (0, import_path11.join)(MCP_PROJECT_ROOT, "data", "assets", args.projectId);
54222
- (0, import_fs9.mkdirSync)(assetsDir, { recursive: true });
54223
- for (const filePath of args.references) {
54224
- try {
54225
- if (!(0, import_fs9.existsSync)(filePath)) continue;
54226
- const stat = (0, import_fs9.statSync)(filePath);
54227
- if (!stat.isFile()) continue;
54228
- const isCache = isAssistantCachePath(filePath);
54229
- let filename = isCache ? stripCacheUuidSuffix((0, import_path11.basename)(filePath)) : (0, import_path11.basename)(filePath);
54230
- if ((0, import_fs9.existsSync)((0, import_path11.join)(assetsDir, filename))) {
54231
- const ext = (0, import_path11.extname)(filename);
54232
- const base = (0, import_path11.basename)(filename, ext);
54233
- if (isCache) {
54234
- let counter = 1;
54235
- while ((0, import_fs9.existsSync)((0, import_path11.join)(assetsDir, `${base} (${counter})${ext}`))) {
54236
- counter++;
54321
+ let assetsDir = null;
54322
+ try {
54323
+ assetsDir = ensureAssetsDir(args.projectId);
54324
+ } catch (e2) {
54325
+ const error48 = e2 instanceof Error ? e2.message : String(e2);
54326
+ for (const filePath of args.references) {
54327
+ attachmentFailures.push({ reference: filePath, error: error48 });
54328
+ }
54329
+ }
54330
+ if (assetsDir) {
54331
+ const dir = assetsDir;
54332
+ for (const filePath of args.references) {
54333
+ try {
54334
+ if (!(0, import_fs9.existsSync)(filePath)) {
54335
+ attachmentFailures.push({ reference: filePath, error: "\u6E90\u6587\u4EF6\u4E0D\u5B58\u5728" });
54336
+ continue;
54337
+ }
54338
+ const stat = (0, import_fs9.statSync)(filePath);
54339
+ if (!stat.isFile()) {
54340
+ attachmentFailures.push({ reference: filePath, error: "\u4E0D\u662F\u6587\u4EF6" });
54341
+ continue;
54342
+ }
54343
+ const isCache = isAssistantCachePath(filePath);
54344
+ let filename = isCache ? stripCacheUuidSuffix((0, import_path11.basename)(filePath)) : (0, import_path11.basename)(filePath);
54345
+ if ((0, import_fs9.existsSync)((0, import_path11.join)(dir, filename))) {
54346
+ const ext = (0, import_path11.extname)(filename);
54347
+ const base = (0, import_path11.basename)(filename, ext);
54348
+ if (isCache) {
54349
+ let counter = 1;
54350
+ while ((0, import_fs9.existsSync)((0, import_path11.join)(dir, `${base} (${counter})${ext}`))) {
54351
+ counter++;
54352
+ }
54353
+ filename = `${base} (${counter})${ext}`;
54354
+ } else {
54355
+ filename = `${base}-${Date.now()}${ext}`;
54237
54356
  }
54238
- filename = `${base} (${counter})${ext}`;
54239
- } else {
54240
- filename = `${base}-${Date.now()}${ext}`;
54241
54357
  }
54358
+ const dest = (0, import_path11.join)(dir, filename);
54359
+ (0, import_fs9.copyFileSync)(filePath, dest);
54360
+ await db.projectAsset.create({
54361
+ data: {
54362
+ filename,
54363
+ path: dest,
54364
+ size: stat.size,
54365
+ mimeType: guessMimeType(filename),
54366
+ projectId: args.projectId,
54367
+ taskId: task.id,
54368
+ description: `Reference: ${(0, import_path11.basename)(filePath)}`
54369
+ }
54370
+ });
54371
+ attachedFiles.push(filename);
54372
+ } catch (e2) {
54373
+ attachmentFailures.push({
54374
+ reference: filePath,
54375
+ error: e2 instanceof Error ? e2.message : String(e2)
54376
+ });
54242
54377
  }
54243
- const dest = (0, import_path11.join)(assetsDir, filename);
54244
- (0, import_fs9.copyFileSync)(filePath, dest);
54245
- await db.projectAsset.create({
54246
- data: {
54247
- filename,
54248
- path: dest,
54249
- size: stat.size,
54250
- mimeType: guessMimeType(filename),
54251
- projectId: args.projectId,
54252
- taskId: task.id,
54253
- description: `Reference: ${(0, import_path11.basename)(filePath)}`
54254
- }
54255
- });
54256
- attachedFiles.push(filename);
54257
- } catch {
54258
54378
  }
54259
- }
54260
- if (attachedFiles.length > 0) {
54261
- const refText = attachedFiles.map((f2) => `- ${(0, import_path11.join)(assetsDir, f2)}`).join("\n");
54262
- updatedDesc = (task.description ?? "") + `
54379
+ if (attachedFiles.length > 0) {
54380
+ const refText = attachedFiles.map((f2) => `- ${(0, import_path11.join)(dir, f2)}`).join("\n");
54381
+ updatedDesc = (task.description ?? "") + `
54263
54382
 
54264
54383
  Attached references:
54265
54384
  ${refText}`;
54266
- await db.task.update({ where: { id: task.id }, data: { description: updatedDesc } });
54385
+ await db.task.update({ where: { id: task.id }, data: { description: updatedDesc } });
54386
+ }
54267
54387
  }
54268
54388
  }
54389
+ const attachmentInfo = attachmentFailures.length > 0 ? { attachmentFailures } : {};
54269
54390
  if (autoStart) {
54270
54391
  const PORT2 = process.env.PORT ?? "3000";
54271
54392
  const prompt = args.title;
@@ -54277,7 +54398,7 @@ ${refText}`;
54277
54398
  });
54278
54399
  if (res.ok) {
54279
54400
  const execData = await res.json();
54280
- return { ...task, execution: execData };
54401
+ return { ...task, ...attachmentInfo, execution: execData };
54281
54402
  }
54282
54403
  let errMsg = `HTTP ${res.status}`;
54283
54404
  try {
@@ -54285,16 +54406,17 @@ ${refText}`;
54285
54406
  if (errBody?.error) errMsg = errBody.error;
54286
54407
  } catch {
54287
54408
  }
54288
- return { ...task, execution: null, executionError: errMsg };
54409
+ return { ...task, ...attachmentInfo, execution: null, executionError: errMsg };
54289
54410
  } catch (err) {
54290
54411
  return {
54291
54412
  ...task,
54413
+ ...attachmentInfo,
54292
54414
  execution: null,
54293
54415
  executionError: err instanceof Error ? err.message : String(err)
54294
54416
  };
54295
54417
  }
54296
54418
  }
54297
- return task;
54419
+ return { ...task, ...attachmentInfo };
54298
54420
  }
54299
54421
  },
54300
54422
  update_task: {
@@ -55007,19 +55129,21 @@ var terminalTools = {
55007
55129
  }
55008
55130
  },
55009
55131
  send_task_terminal_input: {
55010
- description: "Send text input to a running task's PTY terminal. The text is forwarded directly to the Claude CLI process. Include \\n for Enter key.",
55132
+ description: "Send text input to a running task's PTY terminal (e.g. the Claude CLI). By default the message is submitted: trailing newlines are trimmed and a real carriage return is appended so the TUI input box actually sends it. Pass submit:false to only fill the input box without submitting (the text is forwarded verbatim).",
55011
55133
  schema: external_exports.object({
55012
55134
  taskId: external_exports.string(),
55013
- text: external_exports.string().min(1).max(1e4)
55135
+ text: external_exports.string().min(1).max(1e4),
55136
+ submit: external_exports.boolean().optional()
55014
55137
  }),
55015
55138
  handler: async (args) => {
55016
55139
  const err = validateMcpTaskId(args.taskId);
55017
55140
  if (err) return { error: err, taskId: args.taskId };
55018
55141
  const tid = encodeURIComponent(args.taskId);
55142
+ const submit = args.submit ?? true;
55019
55143
  const response = await bridgeFetch(`/${tid}/input`, {
55020
55144
  method: "POST",
55021
55145
  headers: { "Content-Type": "application/json" },
55022
- body: JSON.stringify({ text: args.text })
55146
+ body: JSON.stringify({ text: args.text, submit })
55023
55147
  });
55024
55148
  if (response.status === 404) {
55025
55149
  return { error: "No active terminal session for this task", taskId: args.taskId };