@madarco/agentbox 0.32.1 → 0.33.0-nightly.202609201406

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 (887) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/_cloud-attach-HF7344YE.js +32 -0
  3. package/dist/{chunk-GLIWCNFE.js → chunk-2EQQRMOJ.js} +9 -9
  4. package/dist/{chunk-OUHDSEVQ.js → chunk-2JINU4EG.js} +3 -3
  5. package/dist/{chunk-HUVSTEJR.js → chunk-4XOXWXWJ.js} +2 -2
  6. package/dist/{chunk-RF7Q7SHU.js → chunk-5WQJDR6H.js} +4 -4
  7. package/dist/{chunk-2W3W3KNR.js → chunk-6HAGUDRG.js} +5 -5
  8. package/dist/{chunk-R3XDO4SN.js → chunk-6IQDDUNJ.js} +4 -4
  9. package/dist/{chunk-ULQPPQ23.js → chunk-7G2CUIT4.js} +18 -5
  10. package/dist/chunk-7G2CUIT4.js.map +1 -0
  11. package/dist/{chunk-JL4EJ4EH.js → chunk-7OWND6YG.js} +7 -7
  12. package/dist/{chunk-BJLUG6TE.js → chunk-AVOS4XYW.js} +14 -14
  13. package/dist/chunk-AXAMPAP3.js +1217 -0
  14. package/dist/chunk-AXAMPAP3.js.map +1 -0
  15. package/dist/{chunk-3ISG5THX.js → chunk-BW2EVYIE.js} +3 -3
  16. package/dist/{chunk-LFBCFWG6.js → chunk-E4VNPAAR.js} +6 -6
  17. package/dist/{chunk-XFMCRD2J.js → chunk-EBN5XFRM.js} +25 -25
  18. package/dist/{chunk-U5MUWZOS.js → chunk-F6WOF3GT.js} +7 -7
  19. package/dist/{chunk-AWFTAHGF.js → chunk-FM7PHYBD.js} +244 -7
  20. package/dist/chunk-FM7PHYBD.js.map +1 -0
  21. package/dist/{chunk-GVNKIACA.js → chunk-FRYEBX3H.js} +85 -13
  22. package/dist/chunk-FRYEBX3H.js.map +1 -0
  23. package/dist/{chunk-5D46PE5V.js → chunk-G64VQPII.js} +6 -6
  24. package/dist/{chunk-SAEZJZ5Z.js → chunk-I4TK7QMN.js} +5 -5
  25. package/dist/{chunk-KTB7JGPA.js → chunk-IUPBRMJ6.js} +4 -4
  26. package/dist/{chunk-7PTM6JEX.js → chunk-J3ARHP6C.js} +23 -20
  27. package/dist/chunk-J3ARHP6C.js.map +1 -0
  28. package/dist/{chunk-M2DWTQRF.js → chunk-JCDC5S32.js} +4 -4
  29. package/dist/{chunk-NX27A3F2.js → chunk-JQDSOFD7.js} +109 -60
  30. package/dist/chunk-JQDSOFD7.js.map +1 -0
  31. package/dist/chunk-JUTAYI2N.js +2142 -0
  32. package/dist/chunk-JUTAYI2N.js.map +1 -0
  33. package/dist/{chunk-66GAYIJZ.js → chunk-KSFYIFZ7.js} +808 -1924
  34. package/dist/chunk-KSFYIFZ7.js.map +1 -0
  35. package/dist/{chunk-YNAJUTYC.js → chunk-L55DASHB.js} +8 -8
  36. package/dist/{chunk-VWSERFTW.js → chunk-LETWYD5R.js} +3 -3
  37. package/dist/{chunk-IL7R2X6B.js → chunk-M3ZM6GBW.js} +23 -23
  38. package/dist/{chunk-B3C6NQB7.js → chunk-MWWTRAYD.js} +9 -7
  39. package/dist/chunk-MWWTRAYD.js.map +1 -0
  40. package/dist/{chunk-3AYSA62C.js → chunk-OTAYAFYF.js} +3 -3
  41. package/dist/{chunk-HCKRUAHW.js → chunk-PGNIOFIV.js} +9 -9
  42. package/dist/{chunk-BV2UZ4SG.js → chunk-PUUGN2E4.js} +6 -6
  43. package/dist/{chunk-TDPHZWJI.js → chunk-PVZUQTLW.js} +5 -5
  44. package/dist/{chunk-65G5R2HW.js → chunk-PX7ARX6F.js} +8 -6
  45. package/dist/chunk-PX7ARX6F.js.map +1 -0
  46. package/dist/{chunk-IQ4WLVXE.js → chunk-QSNFDTNE.js} +57 -39
  47. package/dist/{chunk-IQ4WLVXE.js.map → chunk-QSNFDTNE.js.map} +1 -1
  48. package/dist/{chunk-6N7OSMEA.js → chunk-S32SGOFB.js} +5 -5
  49. package/dist/{chunk-GBEV7ETR.js → chunk-SBYXAXRO.js} +6 -6
  50. package/dist/{chunk-MB2K74BI.js → chunk-SZ4J2TYO.js} +86 -25
  51. package/dist/chunk-SZ4J2TYO.js.map +1 -0
  52. package/dist/{chunk-QLZPJIWF.js → chunk-TD3KIU7I.js} +15 -15
  53. package/dist/{chunk-ZKOLV4ZN.js → chunk-U7J7JT6R.js} +118 -10
  54. package/dist/chunk-U7J7JT6R.js.map +1 -0
  55. package/dist/{chunk-NGCG3IBH.js → chunk-WEXKOOQV.js} +10 -10
  56. package/dist/{chunk-5F5NBZG7.js → chunk-WMP675FA.js} +4 -4
  57. package/dist/{chunk-ES6DXNUA.js → chunk-YZZKWZO2.js} +49 -2
  58. package/dist/chunk-YZZKWZO2.js.map +1 -0
  59. package/dist/{chunk-EAT5IEWA.js → chunk-Z74K24YM.js} +7 -5
  60. package/dist/chunk-Z74K24YM.js.map +1 -0
  61. package/dist/{cli-HPYDF5AP.js → cli-CXQBG5LM.js} +12 -11
  62. package/dist/{cli-PWK63DQI.js → cli-F6PNLPHF.js} +11 -10
  63. package/dist/{cli-RC5F6DYP.js → cli-GPKCFH5K.js} +12 -11
  64. package/dist/{cli-HFZMZWRM.js → cli-MA6UAUVM.js} +12 -11
  65. package/dist/{cli-S7RGCNHG.js → cli-TKBNMVOQ.js} +11 -10
  66. package/dist/cloud-backends.js +6 -6
  67. package/dist/{control-plane-HRJRAYKV.js → control-plane-KQTLSN2F.js} +23 -22
  68. package/dist/{cp-hub-upload-N4PPUZHE.js → cp-hub-upload-5TEXE3ES.js} +12 -11
  69. package/dist/{cp-hub-upload-N4PPUZHE.js.map → cp-hub-upload-5TEXE3ES.js.map} +1 -1
  70. package/dist/custody-client-PIR6P4IU.js +18 -0
  71. package/dist/{deploy-hetzner-A42GILM3.js → deploy-hetzner-WOB2EIPC.js} +12 -11
  72. package/dist/{dist-JU5COR7Y.js → dist-5Q6RQ7HT.js} +12 -11
  73. package/dist/{dist-JU5COR7Y.js.map → dist-5Q6RQ7HT.js.map} +1 -1
  74. package/dist/{dist-BUCKUE4V.js → dist-5RMJLMYG.js} +3 -3
  75. package/dist/{dist-64QL2Q5L.js → dist-BYHGZSQE.js} +11 -10
  76. package/dist/{dist-D4LLY6JV.js → dist-EGBTBMUM.js} +11 -10
  77. package/dist/{dist-NJ2U42MZ.js → dist-HP6Y2KN5.js} +10 -9
  78. package/dist/{dist-5OXP2N6H.js → dist-ILLJ2NHO.js} +13 -12
  79. package/dist/{dist-GS36Y2CW.js → dist-PJCCTGVP.js} +12 -11
  80. package/dist/{dist-GS36Y2CW.js.map → dist-PJCCTGVP.js.map} +1 -1
  81. package/dist/{dist-OM5K6NQM.js → dist-WTPYXNRH.js} +2 -2
  82. package/dist/{dist-ETGTZQUT.js → dist-XFWN6EYU.js} +192 -98
  83. package/dist/{dist-HGUSK4LL.js → dist-XTN5NUTN.js} +11 -10
  84. package/dist/{dist-URWWHI3X.js → dist-YED5YJQN.js} +30 -4
  85. package/dist/{dist-Z4S5EKUS.js → dist-ZZXEAXC2.js} +12 -11
  86. package/dist/{host-reach-drainer-WIKLZSLZ.js → host-reach-drainer-3OTCXVMZ.js} +2 -2
  87. package/dist/host-session-A5DZHLRD.js +39 -0
  88. package/dist/hub-MPJWLEGR.js +40 -0
  89. package/dist/{hub-adopt-O4LQLW6N.js → hub-adopt-WGUTNUIK.js} +10 -9
  90. package/dist/{hub-api-client-BI3E37CF.js → hub-api-client-YV5TQNSP.js} +5 -5
  91. package/dist/{hub-docker-target-D67UXZSU.js → hub-docker-target-QWRDM6GE.js} +20 -19
  92. package/dist/{hub-docker-target-D67UXZSU.js.map → hub-docker-target-QWRDM6GE.js.map} +1 -1
  93. package/dist/index.js +1841 -964
  94. package/dist/index.js.map +1 -1
  95. package/dist/manager-pty-XCGH6AUC-EZML75UO.js +21 -0
  96. package/dist/{plugin-update-LI3QDA4K.js → plugin-update-BIPJZA24.js} +6 -6
  97. package/dist/prepare-FNTDSXKV.js +48 -0
  98. package/dist/prepared-custody-G2MJHBR4.js +40 -0
  99. package/dist/{prepared-state-FO74QUCP-M4Q2X3KN.js → prepared-state-FO74QUCP-4WLAYPEO.js} +5 -5
  100. package/dist/pty-host.js +58 -0
  101. package/dist/pty-host.js.map +1 -0
  102. package/dist/{publish-credentials-WJ4KLIMW.js → publish-credentials-YG7FOWMK.js} +13 -12
  103. package/dist/{publish-credentials-WJ4KLIMW.js.map → publish-credentials-YG7FOWMK.js.map} +1 -1
  104. package/dist/registry-PILQNCCZ.js +18 -0
  105. package/dist/relay-VBO3IRIU.js +23 -0
  106. package/dist/{remote-docker-share-WY5U5USV.js → remote-docker-share-NAIM22BF.js} +14 -13
  107. package/dist/remote-docker-share-NAIM22BF.js.map +1 -0
  108. package/dist/{sqlite-proxy-44UHG7CT.js → sqlite-proxy-AVXFWCQD.js} +5 -5
  109. package/dist/{tool-grant-push-YQYYNMRQ.js → tool-grant-push-IDULOMBM.js} +3 -3
  110. package/package.json +1 -1
  111. package/runtime/_shared/ctl.cjs +1315 -570
  112. package/runtime/digitalocean/ctl.cjs +1315 -570
  113. package/runtime/docker/packages/ctl/dist/bin.cjs +1315 -570
  114. package/runtime/e2b/ctl.cjs +1315 -570
  115. package/runtime/hetzner/ctl.cjs +1315 -570
  116. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  117. package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +5 -1
  118. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  119. package/runtime/hub/apps/hub/.next/routes-manifest.json +40 -8
  120. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js +1 -1
  121. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js.nft.json +1 -1
  122. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js +4 -3
  123. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js.nft.json +1 -1
  124. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js +4 -3
  125. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js.nft.json +1 -1
  126. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js +5 -4
  127. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js.nft.json +1 -1
  128. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/agent/route.js +4 -3
  129. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/agent/route.js.nft.json +1 -1
  130. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/backup/route.js +4 -3
  131. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/backup/route.js.nft.json +1 -1
  132. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js +4 -3
  133. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js.nft.json +1 -1
  134. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js +4 -3
  135. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js.nft.json +1 -1
  136. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/clone/route.js +4 -3
  137. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/clone/route.js.nft.json +1 -1
  138. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js +5 -4
  139. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js.nft.json +1 -1
  140. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js +4 -3
  141. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js.nft.json +1 -1
  142. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/logs/route.js +4 -3
  143. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/logs/route.js.nft.json +1 -1
  144. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js +4 -3
  145. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js.nft.json +1 -1
  146. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js +4 -3
  147. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.nft.json +1 -1
  148. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js +4 -3
  149. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js.nft.json +1 -1
  150. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js +4 -3
  151. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js.nft.json +1 -1
  152. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js +4 -3
  153. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js.nft.json +1 -1
  154. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/upload/route.js +4 -3
  155. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/upload/route.js.nft.json +1 -1
  156. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js +4 -3
  157. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js.nft.json +1 -1
  158. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/web/route.js +4 -3
  159. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/web/route.js.nft.json +1 -1
  160. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js +5 -4
  161. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js.nft.json +1 -1
  162. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/checkpoints/route.js +4 -3
  163. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/checkpoints/route.js.nft.json +1 -1
  164. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/[...path]/route.js +3 -3
  165. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/[...path]/route.js.nft.json +1 -1
  166. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/blob/[...path]/route.js +2 -2
  167. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/blob/[...path]/route.js.nft.json +1 -1
  168. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js +2 -2
  169. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js.nft.json +1 -1
  170. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js +4 -3
  171. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js.nft.json +1 -1
  172. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js +4 -3
  173. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js.nft.json +1 -1
  174. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js +4 -3
  175. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js.nft.json +1 -1
  176. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js +4 -3
  177. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js.nft.json +1 -1
  178. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js +4 -3
  179. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js.nft.json +1 -1
  180. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js +4 -3
  181. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js.nft.json +1 -1
  182. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/route.js +4 -3
  183. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/route.js.nft.json +1 -1
  184. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route.js +4 -3
  185. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route.js.nft.json +1 -1
  186. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach-box/route/app-paths-manifest.json +3 -0
  187. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach-box/route.js +11 -0
  188. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach-box/route.js.nft.json +1 -0
  189. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach-box/route_client-reference-manifest.js +3 -0
  190. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/heartbeat/route/app-paths-manifest.json +3 -0
  191. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/heartbeat/route/build-manifest.json +9 -0
  192. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/heartbeat/route/server-reference-manifest.json +4 -0
  193. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/heartbeat/route.js +11 -0
  194. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/heartbeat/route.js.map +5 -0
  195. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/{workspaces/[id]/rescan → managers/[id]/heartbeat}/route.js.nft.json +1 -1
  196. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/heartbeat/route_client-reference-manifest.js +3 -0
  197. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route.js +4 -3
  198. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route.js.nft.json +1 -1
  199. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route.js +4 -3
  200. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route.js.nft.json +1 -1
  201. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/pin/route/app-paths-manifest.json +3 -0
  202. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/pin/route/build-manifest.json +9 -0
  203. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/pin/route/server-reference-manifest.json +4 -0
  204. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/pin/route.js +11 -0
  205. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/pin/route.js.map +5 -0
  206. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/pin/route.js.nft.json +1 -0
  207. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/pin/route_client-reference-manifest.js +3 -0
  208. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route.js +4 -3
  209. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route.js.nft.json +1 -1
  210. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route.js +4 -3
  211. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route.js.nft.json +1 -1
  212. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route.js +4 -3
  213. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route.js.nft.json +1 -1
  214. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route.js +4 -3
  215. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route.js.nft.json +1 -1
  216. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route.js +4 -3
  217. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route.js.nft.json +1 -1
  218. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js +4 -3
  219. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js.nft.json +1 -1
  220. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/bots/route.js +4 -3
  221. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/bots/route.js.nft.json +1 -1
  222. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js +4 -3
  223. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js.nft.json +1 -1
  224. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/create-preflight/route.js +4 -3
  225. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/create-preflight/route.js.nft.json +1 -1
  226. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/restore/route.js +4 -3
  227. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/restore/route.js.nft.json +1 -1
  228. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js +4 -3
  229. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js.nft.json +1 -1
  230. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/seed/route.js +4 -3
  231. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/seed/route.js.nft.json +1 -1
  232. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js +4 -3
  233. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js.nft.json +1 -1
  234. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js +4 -3
  235. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js.nft.json +1 -1
  236. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js +4 -3
  237. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js.nft.json +1 -1
  238. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/size-check/route.js +4 -3
  239. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/size-check/route.js.nft.json +1 -1
  240. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js +4 -3
  241. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js.nft.json +1 -1
  242. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js +4 -3
  243. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js.nft.json +1 -1
  244. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/system/route.js +4 -3
  245. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/system/route.js.nft.json +1 -1
  246. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route.js +4 -3
  247. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route.js.nft.json +1 -1
  248. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/register/route/app-paths-manifest.json +3 -0
  249. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/register/route/build-manifest.json +9 -0
  250. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/register/route/server-reference-manifest.json +4 -0
  251. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/register/route.js +11 -0
  252. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/register/route.js.map +5 -0
  253. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/register/route.js.nft.json +1 -0
  254. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/register/route_client-reference-manifest.js +3 -0
  255. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route.js +4 -3
  256. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route.js.nft.json +1 -1
  257. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.js +4 -3
  258. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.js.nft.json +1 -1
  259. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.js +4 -3
  260. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.js.nft.json +1 -1
  261. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route.js +4 -3
  262. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route.js.nft.json +1 -1
  263. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route.js +4 -3
  264. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route.js.nft.json +1 -1
  265. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.js +5 -4
  266. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.js.nft.json +1 -1
  267. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.js +4 -3
  268. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.js.nft.json +1 -1
  269. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.js +5 -4
  270. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.js.nft.json +1 -1
  271. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.js +4 -3
  272. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.js.nft.json +1 -1
  273. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.js +5 -4
  274. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.js.nft.json +1 -1
  275. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.js +5 -4
  276. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.js.nft.json +1 -1
  277. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.js +5 -4
  278. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.js.nft.json +1 -1
  279. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/events/route/app-paths-manifest.json +3 -0
  280. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/events/route/build-manifest.json +9 -0
  281. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/events/route/server-reference-manifest.json +4 -0
  282. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/events/route.js +11 -0
  283. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/events/route.js.map +5 -0
  284. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/events/route.js.nft.json +1 -0
  285. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/events/route_client-reference-manifest.js +3 -0
  286. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.js +4 -3
  287. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.js.nft.json +1 -1
  288. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route.js +4 -3
  289. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route.js.nft.json +1 -1
  290. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js +2 -1
  291. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
  292. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js +2 -1
  293. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js.nft.json +1 -1
  294. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js +2 -2
  295. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js.nft.json +1 -1
  296. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/web/route.js +2 -2
  297. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/web/route.js.nft.json +1 -1
  298. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page.js +2 -1
  299. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page.js.nft.json +1 -1
  300. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js +2 -1
  301. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  302. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  303. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js +2 -1
  304. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js.nft.json +1 -1
  305. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js +2 -1
  306. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  307. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page.js +2 -1
  308. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page.js.nft.json +1 -1
  309. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js +4 -3
  310. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js.nft.json +1 -1
  311. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  312. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  313. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  314. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  315. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  316. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  317. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  318. package/runtime/hub/apps/hub/.next/server/app-paths-manifest.json +5 -1
  319. package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_managers_register_route_actions_1ulci7f.js +3 -0
  320. package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_timeline_events_route_actions_16z7733.js +3 -0
  321. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_attach-box_route_actions_0prt6sg.js +3 -0
  322. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_heartbeat_route_actions_1zrc9vr.js +3 -0
  323. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_pin_route_actions_1em87ml.js +3 -0
  324. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0-0scfb._.js +3 -0
  325. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00a4c3f._.js +3 -0
  326. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00tx9tm._.js +3 -0
  327. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02-rdq0._.js +3 -0
  328. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02kc2og._.js +3 -0
  329. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02ywgcg._.js +3 -0
  330. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__03_xi2c._.js +3 -0
  331. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04-i6rm._.js +3 -0
  332. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04d3pe5._.js +3 -0
  333. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__07fobp5._.js +3 -0
  334. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__081d104._.js +3 -0
  335. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__08h5jgt._.js +3 -0
  336. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09grt_m._.js +3 -0
  337. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09jbqbh._.js +3 -0
  338. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_t5f3m._.js +3 -0
  339. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_xcmfv._.js +3 -0
  340. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0a6e0vs._.js +3 -0
  341. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0bok80z._.js +3 -0
  342. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0lna-vq._.js → [root-of-the-server]__0cc5lpl._.js} +1 -1
  343. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ce13qa._.js +3 -0
  344. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cyy9az._.js +3 -0
  345. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +1 -1
  346. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dfvo5-._.js +3 -0
  347. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dtq9pr._.js +3 -0
  348. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dw7c0k._.js +3 -0
  349. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0edd68z._.js +3 -0
  350. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0eua3wn._.js +3 -0
  351. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ex05fi._.js +3 -0
  352. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fkjz20._.js +3 -0
  353. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fknr6k._.js +3 -0
  354. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fxx69a._.js +3 -0
  355. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0g7gynv._.js +3 -0
  356. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gl-4ha._.js +3 -0
  357. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gr6v_i._.js +3 -0
  358. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0kcw8t0._.js → [root-of-the-server]__0h668tm._.js} +2 -2
  359. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0hde9k-._.js +3 -0
  360. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0hhlb2_._.js +1 -1
  361. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0i65ptk._.js +3 -0
  362. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0iyr5bm._.js +3 -0
  363. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0j0vl7q._.js +3 -0
  364. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jvk7x8._.js +3 -0
  365. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jz3x26._.js +3 -0
  366. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0k_7aj_._.js +3 -0
  367. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0mid58_._.js +3 -0
  368. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1mgu19x._.js → [root-of-the-server]__0mq5e3o._.js} +1 -1
  369. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0-xlf9z._.js → [root-of-the-server]__0n5hh_2._.js} +2 -2
  370. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0neufba._.js +3 -0
  371. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0nqggrc._.js +3 -0
  372. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0nx6w0m._.js +3 -0
  373. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0olhyt4._.js +3 -0
  374. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pe9g30._.js +3 -0
  375. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qkpqk7._.js +3 -0
  376. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qudrhk._.js +3 -0
  377. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0r0v_c_._.js +3 -0
  378. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0r4qvs6._.js +3 -0
  379. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0rf4g7g._.js +3 -0
  380. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__00bupbc._.js → [root-of-the-server]__0s5ck78._.js} +2 -2
  381. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0scmgnp._.js +3 -0
  382. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0sn7av8._.js +3 -0
  383. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0soiiqi._.js +3 -0
  384. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ssn3y9._.js +6 -0
  385. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0004tsz._.js → [root-of-the-server]__0tl6p7k._.js} +2 -2
  386. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0usxinp._.js +3 -0
  387. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0uy-kl_._.js +3 -0
  388. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0v5krdd._.js +3 -0
  389. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vgxotx._.js +3 -0
  390. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vsn71u._.js +3 -0
  391. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0x5eodh._.js +3 -0
  392. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0x_rx1f._.js +3 -0
  393. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xo5ak-._.js +3 -0
  394. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__04-gm8c._.js → [root-of-the-server]__0xt0w30._.js} +2 -2
  395. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0y-rry-._.js +3 -0
  396. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0y3snn7._.js +3 -0
  397. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ygnbei._.js +3 -0
  398. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yio_n7._.js +3 -0
  399. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yxeq50._.js +3 -0
  400. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zd42wf._.js +3 -0
  401. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zxv1ul._.js +3 -0
  402. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zyutsi._.js +3 -0
  403. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-90xgw._.js +3 -0
  404. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__106reiu._.js +3 -0
  405. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__113ijth._.js +3 -0
  406. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__08jg8w8._.js → [root-of-the-server]__121vdp5._.js} +2 -2
  407. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12b40mo._.js +3 -0
  408. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12i61td._.js +3 -0
  409. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12tjfss._.js +3 -0
  410. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13dk6en._.js +3 -0
  411. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13j6tof._.js +3 -0
  412. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__14opl53._.js +3 -0
  413. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__14pxg1e._.js +3 -0
  414. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__14zr9zt._.js +6 -0
  415. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__15gc6-s._.js +3 -0
  416. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__15k2wx5._.js +3 -0
  417. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__15umca-._.js +3 -0
  418. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__162e1zj._.js +3 -0
  419. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16pmnr6._.js +3 -0
  420. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__174fgjv._.js +3 -0
  421. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__192ppv6._.js +3 -0
  422. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19al998._.js +3 -0
  423. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19m88da._.js +3 -0
  424. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19nlcuf._.js +3 -0
  425. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_dmv53._.js +3 -0
  426. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_iw1fg._.js +3 -0
  427. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_zs8b5._.js +3 -0
  428. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bh1dxz._.js +3 -0
  429. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cb0_wq._.js +3 -0
  430. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cbn_et._.js +3 -0
  431. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cnhbta._.js +3 -0
  432. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cpqqag._.js +3 -0
  433. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1d-v8kt._.js +3 -0
  434. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1d-yop_._.js +3 -0
  435. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dhzd1_._.js +3 -0
  436. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dogvkr._.js +3 -0
  437. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ectuq4._.js +3 -0
  438. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ehcanu._.js +3 -0
  439. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1em476i._.js +3 -0
  440. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1f9l4qz._.js +3 -0
  441. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hux-70._.js +1 -1
  442. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1i9bs12._.js +3 -0
  443. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1jbtokr._.js +3 -0
  444. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1jelopi._.js +3 -0
  445. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1jnfrsy._.js +3 -0
  446. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1k934r7._.js +3 -0
  447. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1kv_jgw._.js +3 -0
  448. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1l_uof1._.js +3 -0
  449. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lareew._.js +3 -0
  450. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lgn5_b._.js +3 -0
  451. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lnherq._.js +3 -0
  452. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lyqerb._.js +3 -0
  453. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1me9em8._.js +3 -0
  454. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mh1-lh._.js +3 -0
  455. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mmabng._.js +3 -0
  456. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mq0v7p._.js +4 -0
  457. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1muxcy9._.js +3 -0
  458. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mx0_-f._.js +3 -0
  459. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1no5aw3._.js +3 -0
  460. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1noanyg._.js +3 -0
  461. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1oy_ypa._.js +3 -0
  462. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1p6khix._.js +3 -0
  463. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pg2kzv._.js +3 -0
  464. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pta31u._.js +3 -0
  465. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pz2967._.js +3 -0
  466. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1q9ds80._.js +3 -0
  467. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qpcmfu._.js +4 -0
  468. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rr4obb._.js +3 -0
  469. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rzg628._.js +3 -0
  470. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1sdw2ls._.js +3 -0
  471. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1szemyb._.js +3 -0
  472. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1t88a94._.js +3 -0
  473. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1uhiv-4._.js +3 -0
  474. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1utvnlp._.js +3 -0
  475. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1vc_bp9._.js +3 -0
  476. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1w25h0t._.js +3 -0
  477. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wc9zwl._.js +3 -0
  478. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ws4ucz._.js +3 -0
  479. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wx5ltv._.js +3 -0
  480. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xi8hyy._.js +3 -0
  481. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xl-uhz._.js +3 -0
  482. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xlddup._.js +3 -0
  483. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1y3gko6._.js +3 -0
  484. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1yzmh_p._.js +3 -0
  485. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ztoaz1._.js +3 -0
  486. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20ygien._.js +3 -0
  487. package/runtime/hub/apps/hub/.next/server/chunks/_03slv7y._.js +3 -0
  488. package/runtime/hub/apps/hub/.next/server/chunks/_03u-l9s._.js +3 -0
  489. package/runtime/hub/apps/hub/.next/server/chunks/_048yy7t._.js +3 -0
  490. package/runtime/hub/apps/hub/.next/server/chunks/_05_hmgg._.js +3 -0
  491. package/runtime/hub/apps/hub/.next/server/chunks/_08cr70o._.js +3 -0
  492. package/runtime/hub/apps/hub/.next/server/chunks/_0907rw0._.js +9 -9
  493. package/runtime/hub/apps/hub/.next/server/chunks/_09bu8dh._.js +3 -0
  494. package/runtime/hub/apps/hub/.next/server/chunks/_0_2z437._.js +3 -0
  495. package/runtime/hub/apps/hub/.next/server/chunks/_0_s1tx9._.js +3 -0
  496. package/runtime/hub/apps/hub/.next/server/chunks/_0_ue2iy._.js +3 -0
  497. package/runtime/hub/apps/hub/.next/server/chunks/_0b6vmhh._.js +3 -0
  498. package/runtime/hub/apps/hub/.next/server/chunks/_0bxg62j._.js +3 -0
  499. package/runtime/hub/apps/hub/.next/server/chunks/_0cc3kcz._.js +3 -0
  500. package/runtime/hub/apps/hub/.next/server/chunks/_0ccgezr._.js +3 -0
  501. package/runtime/hub/apps/hub/.next/server/chunks/_0e50cwx._.js +3 -0
  502. package/runtime/hub/apps/hub/.next/server/chunks/_0ek1dkx._.js +3 -0
  503. package/runtime/hub/apps/hub/.next/server/chunks/_0g94rtj._.js +3 -0
  504. package/runtime/hub/apps/hub/.next/server/chunks/_0hwl0oy._.js +3 -0
  505. package/runtime/hub/apps/hub/.next/server/chunks/_0ihch2c._.js +3 -0
  506. package/runtime/hub/apps/hub/.next/server/chunks/_0jal0nm._.js +3 -0
  507. package/runtime/hub/apps/hub/.next/server/chunks/_0jvwv07._.js +3 -0
  508. package/runtime/hub/apps/hub/.next/server/chunks/_0mpj2yt._.js +3 -0
  509. package/runtime/hub/apps/hub/.next/server/chunks/_0n22m88._.js +3 -0
  510. package/runtime/hub/apps/hub/.next/server/chunks/_0ndtf84._.js +3 -0
  511. package/runtime/hub/apps/hub/.next/server/chunks/_0o1r-if._.js +3 -0
  512. package/runtime/hub/apps/hub/.next/server/chunks/_0opn03l._.js +3 -0
  513. package/runtime/hub/apps/hub/.next/server/chunks/_0p-2n50._.js +3 -0
  514. package/runtime/hub/apps/hub/.next/server/chunks/_0qf4357._.js +3 -0
  515. package/runtime/hub/apps/hub/.next/server/chunks/_0tbb47v._.js +3 -0
  516. package/runtime/hub/apps/hub/.next/server/chunks/_0ubchhn._.js +3 -0
  517. package/runtime/hub/apps/hub/.next/server/chunks/_0ul-64a._.js +3 -0
  518. package/runtime/hub/apps/hub/.next/server/chunks/_0v--tpg._.js +3 -0
  519. package/runtime/hub/apps/hub/.next/server/chunks/_0v3xwi-._.js +3 -0
  520. package/runtime/hub/apps/hub/.next/server/chunks/_0vg6gvw._.js +37 -36
  521. package/runtime/hub/apps/hub/.next/server/chunks/_0y497n2._.js +3 -0
  522. package/runtime/hub/apps/hub/.next/server/chunks/_0zvfiwd._.js +3 -0
  523. package/runtime/hub/apps/hub/.next/server/chunks/_100tsj5._.js +3 -0
  524. package/runtime/hub/apps/hub/.next/server/chunks/_11-rqgb._.js +3 -0
  525. package/runtime/hub/apps/hub/.next/server/chunks/_113fejt._.js +3 -0
  526. package/runtime/hub/apps/hub/.next/server/chunks/_12juepz._.js +3 -0
  527. package/runtime/hub/apps/hub/.next/server/chunks/_12w22u2._.js +3 -0
  528. package/runtime/hub/apps/hub/.next/server/chunks/_134-gub._.js +3 -0
  529. package/runtime/hub/apps/hub/.next/server/chunks/_14kba0u._.js +3 -0
  530. package/runtime/hub/apps/hub/.next/server/chunks/_16ec74_._.js +3 -0
  531. package/runtime/hub/apps/hub/.next/server/chunks/_17ntgn8._.js +3 -0
  532. package/runtime/hub/apps/hub/.next/server/chunks/_1c27mjg._.js +3 -0
  533. package/runtime/hub/apps/hub/.next/server/chunks/_1c4zrlu._.js +3 -0
  534. package/runtime/hub/apps/hub/.next/server/chunks/_1cmknl6._.js +3 -0
  535. package/runtime/hub/apps/hub/.next/server/chunks/_1g8ctu7._.js +3 -0
  536. package/runtime/hub/apps/hub/.next/server/chunks/_1grz1bu._.js +3 -0
  537. package/runtime/hub/apps/hub/.next/server/chunks/_1itx6m_._.js +3 -0
  538. package/runtime/hub/apps/hub/.next/server/chunks/_1jaoh3w._.js +3 -0
  539. package/runtime/hub/apps/hub/.next/server/chunks/_1ktt212._.js +3 -0
  540. package/runtime/hub/apps/hub/.next/server/chunks/_1ldaou_._.js +3 -0
  541. package/runtime/hub/apps/hub/.next/server/chunks/_1n3e-p-._.js +3 -0
  542. package/runtime/hub/apps/hub/.next/server/chunks/_1onbxt8._.js +3 -0
  543. package/runtime/hub/apps/hub/.next/server/chunks/_1pudgbl._.js +3 -0
  544. package/runtime/hub/apps/hub/.next/server/chunks/_1qmsz02._.js +3 -0
  545. package/runtime/hub/apps/hub/.next/server/chunks/_1r3ah1o._.js +3 -0
  546. package/runtime/hub/apps/hub/.next/server/chunks/_1t24c_5._.js +3 -0
  547. package/runtime/hub/apps/hub/.next/server/chunks/_1vv20kp._.js +3 -0
  548. package/runtime/hub/apps/hub/.next/server/chunks/_1whgbe7._.js +3 -0
  549. package/runtime/hub/apps/hub/.next/server/chunks/_1wj2dpr._.js +3 -0
  550. package/runtime/hub/apps/hub/.next/server/chunks/_1wsllw4._.js +3 -0
  551. package/runtime/hub/apps/hub/.next/server/chunks/_1yk56nw._.js +3 -0
  552. package/runtime/hub/apps/hub/.next/server/chunks/_1yumxg7._.js +3 -0
  553. package/runtime/hub/apps/hub/.next/server/chunks/_1zlfubf._.js +3 -0
  554. package/runtime/hub/apps/hub/.next/server/chunks/_204rqiz._.js +3 -0
  555. package/runtime/hub/apps/hub/.next/server/chunks/_2056rpg._.js +3 -0
  556. package/runtime/hub/apps/hub/.next/server/chunks/_2056tby._.js +3 -0
  557. package/runtime/hub/apps/hub/.next/server/chunks/apps_hub_app_(dashboard)_api_v1_lib_openapi_ts_1yokmzt._.js +1 -1
  558. package/runtime/hub/apps/hub/.next/server/chunks/apps_hub_app_(dashboard)_api_v1_lib_validate_ts_16dhbzz._.js +1 -1
  559. package/runtime/hub/apps/hub/.next/server/chunks/packages_core_dist_index_1o6cj80.js +3 -0
  560. package/runtime/hub/apps/hub/.next/server/chunks/packages_relay_dist_chunk-NBDEMY4P_0jzzve0.js +3 -0
  561. package/runtime/hub/apps/hub/.next/server/chunks/packages_relay_dist_control-plane_03a-9aj.js +8 -8
  562. package/runtime/hub/apps/hub/.next/server/chunks/packages_relay_dist_manager-pty-XCGH6AUC_12ezogg.js +3 -0
  563. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0515n2f._.js +3 -0
  564. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0bv8m80._.js +3 -0
  565. package/runtime/hub/apps/hub/.next/server/chunks/ssr/{[root-of-the-server]__1o7pwtt._.js → [root-of-the-server]__1ay9-4x._.js} +2 -2
  566. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0r2xlss._.js +2 -2
  567. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_14-qzbg._.js +28 -27
  568. package/runtime/hub/apps/hub/.next/server/chunks/ssr/packages_core_dist_index_09u6dt1.js +3 -0
  569. package/runtime/hub/apps/hub/.next/server/chunks/ssr/packages_relay_dist_chunk-NBDEMY4P_06mjjzn.js +3 -0
  570. package/runtime/hub/apps/hub/.next/server/chunks/ssr/packages_relay_dist_control-plane_0ve-wz4.js +2 -2
  571. package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +5 -1
  572. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  573. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  574. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/actor.ts +28 -3
  575. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/envelope.ts +20 -0
  576. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/openapi.ts +479 -49
  577. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/validate.ts +572 -14
  578. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/attach/route.ts +2 -2
  579. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/attach-box/route.ts +30 -0
  580. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/heartbeat/route.ts +29 -0
  581. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/message/route.ts +10 -5
  582. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/notes/route.ts +2 -1
  583. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/pin/route.ts +29 -0
  584. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/resume/route.ts +10 -4
  585. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/stop/route.ts +2 -2
  586. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/managers/register/route.ts +46 -0
  587. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.ts +3 -2
  588. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.ts +19 -12
  589. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/timeline/events/route.ts +30 -0
  590. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/route.ts +5 -3
  591. package/runtime/hub/apps/hub/{auth-MIRRB2PG.js → auth-5HK3V6UQ.js} +2 -2
  592. package/runtime/hub/apps/hub/{auth-config-5JH6BSRC.js → auth-config-TVEARKPD.js} +2 -2
  593. package/runtime/hub/apps/hub/chunk-64GCEGJK.js +2050 -0
  594. package/runtime/hub/apps/hub/{chunk-LEELYQVR.js → chunk-7DD7STLH.js} +15 -12
  595. package/runtime/hub/apps/hub/{chunk-OFJRKISZ.js → chunk-ABQSHFVP.js} +877 -1945
  596. package/runtime/hub/apps/hub/{chunk-3OTB7DIH.js → chunk-BEK5SYX5.js} +48 -1
  597. package/runtime/hub/apps/hub/{chunk-MQ7AJUJJ.js → chunk-DM57OEZQ.js} +6 -4
  598. package/runtime/hub/apps/hub/{chunk-MD2UNTZR.js → chunk-FWMBOJTZ.js} +7 -7
  599. package/runtime/hub/apps/hub/{chunk-GGHXBTGL.js → chunk-GBCGTRVU.js} +5 -5
  600. package/runtime/hub/apps/hub/{chunk-FBNAIUXZ.js → chunk-RNUUXV2X.js} +117 -9
  601. package/runtime/hub/apps/hub/{chunk-2LE76CT3.js → chunk-VQUZQ5MH.js} +228 -6
  602. package/runtime/hub/apps/hub/{chunk-XRZGAFTS.js → chunk-Y3E54AZA.js} +1 -1
  603. package/runtime/hub/apps/hub/{dist-W4YRUL6E.js → dist-6VI2WXPA.js} +8 -7
  604. package/runtime/hub/apps/hub/{dist-DENRW6O5.js → dist-7EET5ERB.js} +7 -6
  605. package/runtime/hub/apps/hub/{dist-Y3Q5YEOC.js → dist-A2W3C76Q.js} +8 -7
  606. package/runtime/hub/apps/hub/{dist-3LDUYWPK.js → dist-BX2OAELL.js} +29 -3
  607. package/runtime/hub/apps/hub/{dist-P7JJ2SSD.js → dist-D4JO7PAL.js} +1 -1
  608. package/runtime/hub/apps/hub/{dist-RIXE6NHS.js → dist-D6SFE3PG.js} +9 -8
  609. package/runtime/hub/apps/hub/{dist-D36FTGG6.js → dist-I5V4YM32.js} +2 -2
  610. package/runtime/hub/apps/hub/{dist-U6XVHUNU.js → dist-LNFUJPV6.js} +8 -7
  611. package/runtime/hub/apps/hub/{dist-U5SDGYOA.js → dist-RH4WVKHR.js} +8 -7
  612. package/runtime/hub/apps/hub/{dist-NQYEPZJY.js → dist-SB4JUHBY.js} +8 -7
  613. package/runtime/hub/apps/hub/{dist-RK6SSH23.js → dist-WTEXCEBP.js} +9 -8
  614. package/runtime/hub/apps/hub/{hub-token-KEHCTD7H.js → hub-token-SCW7OKFO.js} +2 -2
  615. package/runtime/hub/apps/hub/{hub-worker-DVATYYST.js → hub-worker-RIUSL634.js} +59 -10
  616. package/runtime/hub/apps/hub/lib/backend/box-facts.ts +60 -3
  617. package/runtime/hub/apps/hub/lib/backend/box-prs.ts +14 -2
  618. package/runtime/hub/apps/hub/lib/backend/deps.ts +39 -9
  619. package/runtime/hub/apps/hub/lib/backend/errors.ts +17 -2
  620. package/runtime/hub/apps/hub/lib/backend/github-prs.ts +54 -37
  621. package/runtime/hub/apps/hub/lib/backend/managers.ts +782 -185
  622. package/runtime/hub/apps/hub/lib/backend/timeline-lanes.ts +6 -1
  623. package/runtime/hub/apps/hub/lib/backend/timeline.ts +240 -29
  624. package/runtime/hub/apps/hub/lib/backend/workspaces.ts +68 -34
  625. package/runtime/hub/apps/hub/lib/boxes/backend-types.ts +139 -11
  626. package/runtime/hub/apps/hub/lib/boxes/control-plane-create.ts +12 -0
  627. package/runtime/hub/apps/hub/lib/boxes/project-key.ts +7 -3
  628. package/runtime/hub/apps/hub/lib/hub-backend.ts +32 -1
  629. package/runtime/hub/apps/hub/lib/hub-worker.ts +76 -1
  630. package/runtime/hub/apps/hub/lib/manager-heartbeat.ts +55 -0
  631. package/runtime/hub/apps/hub/lib/prompts/create-gates.ts +9 -0
  632. package/runtime/hub/apps/hub/lib/pty-janitor.ts +62 -0
  633. package/runtime/hub/apps/hub/lib/remote-hub.ts +12 -38
  634. package/runtime/hub/apps/hub/manager-pty-XCGH6AUC-VJSNM3A6.js +22 -0
  635. package/runtime/hub/apps/hub/{prepared-state-FO74QUCP-75UBPW5I.js → prepared-state-FO74QUCP-LZNKUFC7.js} +4 -4
  636. package/runtime/hub/apps/hub/server.js +1022 -411
  637. package/runtime/hub/apps/hub/server.ts +28 -0
  638. package/runtime/hub/apps/hub/test/_workspace-input.ts +26 -0
  639. package/runtime/hub/apps/hub/test/backend-managers-background.test.ts +32 -34
  640. package/runtime/hub/apps/hub/test/backend-managers.test.ts +659 -42
  641. package/runtime/hub/apps/hub/test/backend-timeline.test.ts +413 -0
  642. package/runtime/hub/apps/hub/test/backend-workspaces.test.ts +112 -21
  643. package/runtime/hub/apps/hub/test/box-facts.test.ts +88 -0
  644. package/runtime/hub/apps/hub/test/box-prs.test.ts +2 -1
  645. package/runtime/hub/apps/hub/test/control-plane-create.test.ts +23 -0
  646. package/runtime/hub/apps/hub/test/create-gates-collect.test.ts +21 -0
  647. package/runtime/hub/apps/hub/test/project-key.test.ts +32 -0
  648. package/runtime/hub/apps/hub/test/pty-janitor.test.ts +70 -0
  649. package/runtime/hub/apps/hub/test/timeline.test.ts +504 -12
  650. package/runtime/hub/apps/hub/test/validate.test.ts +47 -6
  651. package/runtime/hub/apps/hub/tsconfig.tsbuildinfo +1 -1
  652. package/runtime/relay/bin.cjs +1426 -933
  653. package/runtime/vercel/ctl.cjs +1315 -570
  654. package/share/host-skills/agentbox-info/SKILL.md +42 -5
  655. package/dist/_cloud-attach-UXH3VKTM.js +0 -31
  656. package/dist/chunk-65G5R2HW.js.map +0 -1
  657. package/dist/chunk-66GAYIJZ.js.map +0 -1
  658. package/dist/chunk-7PTM6JEX.js.map +0 -1
  659. package/dist/chunk-AWFTAHGF.js.map +0 -1
  660. package/dist/chunk-B3C6NQB7.js.map +0 -1
  661. package/dist/chunk-EAT5IEWA.js.map +0 -1
  662. package/dist/chunk-ES6DXNUA.js.map +0 -1
  663. package/dist/chunk-GVNKIACA.js.map +0 -1
  664. package/dist/chunk-MB2K74BI.js.map +0 -1
  665. package/dist/chunk-NX27A3F2.js.map +0 -1
  666. package/dist/chunk-QBVRWGXD.js +0 -586
  667. package/dist/chunk-QBVRWGXD.js.map +0 -1
  668. package/dist/chunk-ULQPPQ23.js.map +0 -1
  669. package/dist/chunk-ZKOLV4ZN.js.map +0 -1
  670. package/dist/custody-client-KYEZET6C.js +0 -18
  671. package/dist/host-session-YP5RKV6T.js +0 -29
  672. package/dist/hub-A6U3YB5D.js +0 -39
  673. package/dist/prepare-5Y7DWMZ7.js +0 -45
  674. package/dist/prepared-custody-L6PXXLD3.js +0 -39
  675. package/dist/registry-6VF5VPGD.js +0 -18
  676. package/dist/relay-732OVYXR.js +0 -22
  677. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route/app-paths-manifest.json +0 -3
  678. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route.js +0 -9
  679. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route_client-reference-manifest.js +0 -3
  680. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_rescan_route_actions_1yra_w8.js +0 -3
  681. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0-c97gb._.js +0 -3
  682. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__01fy5q0._.js +0 -3
  683. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02c077x._.js +0 -3
  684. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__05uinnp._.js +0 -3
  685. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__06wy8zz._.js +0 -3
  686. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09059m-._.js +0 -3
  687. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__092y7_z._.js +0 -3
  688. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09ti2-t._.js +0 -3
  689. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_mog_h._.js +0 -3
  690. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0a689u5._.js +0 -3
  691. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0bzqrje._.js +0 -3
  692. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0c_r3oe._.js +0 -3
  693. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cdoz9i._.js +0 -3
  694. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cmu4sk._.js +0 -3
  695. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cxjxz0._.js +0 -3
  696. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d27tlu._.js +0 -3
  697. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d3fx1z._.js +0 -3
  698. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dm5oqm._.js +0 -3
  699. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dy5g2k._.js +0 -3
  700. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0e1uaxg._.js +0 -3
  701. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ets4cd._.js +0 -3
  702. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f2u0ul._.js +0 -3
  703. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f9p_4f._.js +0 -3
  704. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f_jmq2._.js +0 -3
  705. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fksz_r._.js +0 -3
  706. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fpygqn._.js +0 -3
  707. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gaknnd._.js +0 -3
  708. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gym-rp._.js +0 -3
  709. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0i9phow._.js +0 -3
  710. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ikyoac._.js +0 -3
  711. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0j72bti._.js +0 -3
  712. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jb371p._.js +0 -3
  713. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jq6cdw._.js +0 -3
  714. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jt1d2s._.js +0 -3
  715. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0kdt9-i._.js +0 -3
  716. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0l27vs0._.js +0 -3
  717. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0m5woxc._.js +0 -3
  718. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0mi9xib._.js +0 -3
  719. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0muy7eg._.js +0 -3
  720. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0nn0_b5._.js +0 -3
  721. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0no30or._.js +0 -3
  722. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0o3sjtx._.js +0 -3
  723. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0onk5r0._.js +0 -3
  724. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qde3vr._.js +0 -3
  725. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ry8baf._.js +0 -3
  726. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0sg4y_2._.js +0 -3
  727. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0sgjn2j._.js +0 -3
  728. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0st6oln._.js +0 -3
  729. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0t0p64l._.js +0 -3
  730. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0tbl11-._.js +0 -3
  731. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ve_tqz._.js +0 -3
  732. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0w4smfx._.js +0 -3
  733. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0wo4sqj._.js +0 -3
  734. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0wujjkl._.js +0 -3
  735. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xbu3yj._.js +0 -3
  736. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xl1-w6._.js +0 -3
  737. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yct1tu._.js +0 -3
  738. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yg67t0._.js +0 -3
  739. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ykw5oe._.js +0 -3
  740. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zznyx2._.js +0 -3
  741. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1--u2xl._.js +0 -3
  742. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-8sj4i._.js +0 -3
  743. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10kmcrt._.js +0 -3
  744. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10l_-cd._.js +0 -3
  745. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10yfcvu._.js +0 -3
  746. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11c-21i._.js +0 -3
  747. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11s1mrd._.js +0 -3
  748. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__128w1nz._.js +0 -3
  749. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12b2kuv._.js +0 -3
  750. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12gbq5m._.js +0 -3
  751. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13vl4-h._.js +0 -3
  752. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__153b7kv._.js +0 -3
  753. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__157kmse._.js +0 -3
  754. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16695dw._.js +0 -3
  755. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16o0ij7._.js +0 -3
  756. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__175lucf._.js +0 -3
  757. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__17p53e3._.js +0 -3
  758. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__18ec5_t._.js +0 -3
  759. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__18xpvkc._.js +0 -3
  760. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1925hyw._.js +0 -3
  761. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19ew1r2._.js +0 -3
  762. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19grunx._.js +0 -3
  763. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_cbcl1._.js +0 -3
  764. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_wb2uh._.js +0 -3
  765. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1an6-yb._.js +0 -3
  766. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1c0ex8m._.js +0 -3
  767. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1c1e08-._.js +0 -3
  768. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1c9f4uu._.js +0 -3
  769. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ci8hc2._.js +0 -3
  770. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dicjoc._.js +0 -3
  771. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1diipl4._.js +0 -3
  772. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dp2exz._.js +0 -3
  773. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1epnstn._.js +0 -3
  774. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1fjnz2l._.js +0 -3
  775. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1g5wnt2._.js +0 -3
  776. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1g9v7bq._.js +0 -3
  777. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1gon0_4._.js +0 -3
  778. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h_59cs._.js +0 -3
  779. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h_q3sn._.js +0 -3
  780. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hlugb4._.js +0 -3
  781. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1i-7bnu._.js +0 -3
  782. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1i_el2y._.js +0 -3
  783. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1j6clag._.js +0 -3
  784. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1k6q17t._.js +0 -3
  785. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1khvg39._.js +0 -3
  786. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lx9lyn._.js +0 -3
  787. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1m36v6k._.js +0 -3
  788. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mhyrr5._.js +0 -3
  789. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mt32fu._.js +0 -3
  790. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1n1_2tw._.js +0 -3
  791. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1na4sdw._.js +0 -3
  792. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pe6m2l._.js +0 -3
  793. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1q6xrlt._.js +0 -6
  794. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1r4x1-y._.js +0 -3
  795. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rjs_x0._.js +0 -3
  796. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rxud0j._.js +0 -3
  797. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1s5app0._.js +0 -3
  798. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1sjz59l._.js +0 -3
  799. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1slo4q_._.js +0 -3
  800. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1thrazp._.js +0 -3
  801. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1twtnwr._.js +0 -3
  802. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1uch-60._.js +0 -3
  803. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1um2jum._.js +0 -3
  804. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1vnnuo1._.js +0 -3
  805. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wegvep._.js +0 -3
  806. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wi5roz._.js +0 -3
  807. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xa9oiv._.js +0 -3
  808. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zml9me._.js +0 -3
  809. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zrf_a6._.js +0 -3
  810. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20jyxyo._.js +0 -6
  811. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20ybhif._.js +0 -3
  812. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20zl5fr._.js +0 -3
  813. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__212dyoi._.js +0 -3
  814. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__218oup-._.js +0 -3
  815. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__21abvx9._.js +0 -3
  816. package/runtime/hub/apps/hub/.next/server/chunks/_0mcxq5g._.js +0 -3
  817. package/runtime/hub/apps/hub/.next/server/chunks/_0zfb0rb._.js +0 -4
  818. package/runtime/hub/apps/hub/.next/server/chunks/_1o5p4w_._.js +0 -4
  819. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1jqga8h._.js +0 -3
  820. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/rescan/route.ts +0 -20
  821. /package/dist/{_cloud-attach-UXH3VKTM.js.map → _cloud-attach-HF7344YE.js.map} +0 -0
  822. /package/dist/{chunk-GLIWCNFE.js.map → chunk-2EQQRMOJ.js.map} +0 -0
  823. /package/dist/{chunk-OUHDSEVQ.js.map → chunk-2JINU4EG.js.map} +0 -0
  824. /package/dist/{chunk-HUVSTEJR.js.map → chunk-4XOXWXWJ.js.map} +0 -0
  825. /package/dist/{chunk-RF7Q7SHU.js.map → chunk-5WQJDR6H.js.map} +0 -0
  826. /package/dist/{chunk-2W3W3KNR.js.map → chunk-6HAGUDRG.js.map} +0 -0
  827. /package/dist/{chunk-R3XDO4SN.js.map → chunk-6IQDDUNJ.js.map} +0 -0
  828. /package/dist/{chunk-JL4EJ4EH.js.map → chunk-7OWND6YG.js.map} +0 -0
  829. /package/dist/{chunk-BJLUG6TE.js.map → chunk-AVOS4XYW.js.map} +0 -0
  830. /package/dist/{chunk-3ISG5THX.js.map → chunk-BW2EVYIE.js.map} +0 -0
  831. /package/dist/{chunk-LFBCFWG6.js.map → chunk-E4VNPAAR.js.map} +0 -0
  832. /package/dist/{chunk-XFMCRD2J.js.map → chunk-EBN5XFRM.js.map} +0 -0
  833. /package/dist/{chunk-U5MUWZOS.js.map → chunk-F6WOF3GT.js.map} +0 -0
  834. /package/dist/{chunk-5D46PE5V.js.map → chunk-G64VQPII.js.map} +0 -0
  835. /package/dist/{chunk-SAEZJZ5Z.js.map → chunk-I4TK7QMN.js.map} +0 -0
  836. /package/dist/{chunk-KTB7JGPA.js.map → chunk-IUPBRMJ6.js.map} +0 -0
  837. /package/dist/{chunk-M2DWTQRF.js.map → chunk-JCDC5S32.js.map} +0 -0
  838. /package/dist/{chunk-YNAJUTYC.js.map → chunk-L55DASHB.js.map} +0 -0
  839. /package/dist/{chunk-VWSERFTW.js.map → chunk-LETWYD5R.js.map} +0 -0
  840. /package/dist/{chunk-IL7R2X6B.js.map → chunk-M3ZM6GBW.js.map} +0 -0
  841. /package/dist/{chunk-3AYSA62C.js.map → chunk-OTAYAFYF.js.map} +0 -0
  842. /package/dist/{chunk-HCKRUAHW.js.map → chunk-PGNIOFIV.js.map} +0 -0
  843. /package/dist/{chunk-BV2UZ4SG.js.map → chunk-PUUGN2E4.js.map} +0 -0
  844. /package/dist/{chunk-TDPHZWJI.js.map → chunk-PVZUQTLW.js.map} +0 -0
  845. /package/dist/{chunk-6N7OSMEA.js.map → chunk-S32SGOFB.js.map} +0 -0
  846. /package/dist/{chunk-GBEV7ETR.js.map → chunk-SBYXAXRO.js.map} +0 -0
  847. /package/dist/{chunk-QLZPJIWF.js.map → chunk-TD3KIU7I.js.map} +0 -0
  848. /package/dist/{chunk-NGCG3IBH.js.map → chunk-WEXKOOQV.js.map} +0 -0
  849. /package/dist/{chunk-5F5NBZG7.js.map → chunk-WMP675FA.js.map} +0 -0
  850. /package/dist/{cli-HFZMZWRM.js.map → cli-CXQBG5LM.js.map} +0 -0
  851. /package/dist/{cli-HPYDF5AP.js.map → cli-F6PNLPHF.js.map} +0 -0
  852. /package/dist/{cli-PWK63DQI.js.map → cli-GPKCFH5K.js.map} +0 -0
  853. /package/dist/{cli-RC5F6DYP.js.map → cli-MA6UAUVM.js.map} +0 -0
  854. /package/dist/{cli-S7RGCNHG.js.map → cli-TKBNMVOQ.js.map} +0 -0
  855. /package/dist/{control-plane-HRJRAYKV.js.map → control-plane-KQTLSN2F.js.map} +0 -0
  856. /package/dist/{custody-client-KYEZET6C.js.map → custody-client-PIR6P4IU.js.map} +0 -0
  857. /package/dist/{deploy-hetzner-A42GILM3.js.map → deploy-hetzner-WOB2EIPC.js.map} +0 -0
  858. /package/dist/{dist-5OXP2N6H.js.map → dist-5RMJLMYG.js.map} +0 -0
  859. /package/dist/{dist-64QL2Q5L.js.map → dist-BYHGZSQE.js.map} +0 -0
  860. /package/dist/{dist-BUCKUE4V.js.map → dist-EGBTBMUM.js.map} +0 -0
  861. /package/dist/{dist-D4LLY6JV.js.map → dist-HP6Y2KN5.js.map} +0 -0
  862. /package/dist/{dist-ETGTZQUT.js.map → dist-ILLJ2NHO.js.map} +0 -0
  863. /package/dist/{dist-HGUSK4LL.js.map → dist-WTPYXNRH.js.map} +0 -0
  864. /package/dist/{dist-NJ2U42MZ.js.map → dist-XFWN6EYU.js.map} +0 -0
  865. /package/dist/{dist-OM5K6NQM.js.map → dist-XTN5NUTN.js.map} +0 -0
  866. /package/dist/{dist-URWWHI3X.js.map → dist-YED5YJQN.js.map} +0 -0
  867. /package/dist/{dist-Z4S5EKUS.js.map → dist-ZZXEAXC2.js.map} +0 -0
  868. /package/dist/{host-reach-drainer-WIKLZSLZ.js.map → host-reach-drainer-3OTCXVMZ.js.map} +0 -0
  869. /package/dist/{host-session-YP5RKV6T.js.map → host-session-A5DZHLRD.js.map} +0 -0
  870. /package/dist/{hub-A6U3YB5D.js.map → hub-MPJWLEGR.js.map} +0 -0
  871. /package/dist/{hub-adopt-O4LQLW6N.js.map → hub-adopt-WGUTNUIK.js.map} +0 -0
  872. /package/dist/{hub-api-client-BI3E37CF.js.map → hub-api-client-YV5TQNSP.js.map} +0 -0
  873. /package/dist/{prepare-5Y7DWMZ7.js.map → manager-pty-XCGH6AUC-EZML75UO.js.map} +0 -0
  874. /package/dist/{plugin-update-LI3QDA4K.js.map → plugin-update-BIPJZA24.js.map} +0 -0
  875. /package/dist/{prepared-custody-L6PXXLD3.js.map → prepare-FNTDSXKV.js.map} +0 -0
  876. /package/dist/{prepared-state-FO74QUCP-M4Q2X3KN.js.map → prepared-custody-G2MJHBR4.js.map} +0 -0
  877. /package/dist/{registry-6VF5VPGD.js.map → prepared-state-FO74QUCP-4WLAYPEO.js.map} +0 -0
  878. /package/dist/{relay-732OVYXR.js.map → registry-PILQNCCZ.js.map} +0 -0
  879. /package/dist/{remote-docker-share-WY5U5USV.js.map → relay-VBO3IRIU.js.map} +0 -0
  880. /package/dist/{sqlite-proxy-44UHG7CT.js.map → sqlite-proxy-AVXFWCQD.js.map} +0 -0
  881. /package/dist/{tool-grant-push-YQYYNMRQ.js.map → tool-grant-push-IDULOMBM.js.map} +0 -0
  882. /package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/{workspaces/[id]/rescan → managers/[id]/attach-box}/route/build-manifest.json +0 -0
  883. /package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/{workspaces/[id]/rescan → managers/[id]/attach-box}/route/server-reference-manifest.json +0 -0
  884. /package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/{workspaces/[id]/rescan → managers/[id]/attach-box}/route.js.map +0 -0
  885. /package/runtime/hub/apps/hub/.next/static/{psd9s1F7NglKqhj4_onRN → KekqJd80Cp2BTyXh8K_90}/_buildManifest.js +0 -0
  886. /package/runtime/hub/apps/hub/.next/static/{psd9s1F7NglKqhj4_onRN → KekqJd80Cp2BTyXh8K_90}/_clientMiddlewareManifest.js +0 -0
  887. /package/runtime/hub/apps/hub/.next/static/{psd9s1F7NglKqhj4_onRN → KekqJd80Cp2BTyXh8K_90}/_ssgManifest.js +0 -0
@@ -0,0 +1,1217 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ ensurePtyDir,
4
+ ptySocketPath,
5
+ removePtySession,
6
+ resolveAgentSpec,
7
+ writePtyMeta
8
+ } from "./chunk-U7J7JT6R.js";
9
+ import {
10
+ PTY_PROTOCOL_VERSION,
11
+ PtyFrameDecoder,
12
+ PtyFrameError,
13
+ encodeCtrl,
14
+ encodeData,
15
+ encodeExit,
16
+ parseProviderWarning
17
+ } from "./chunk-FM7PHYBD.js";
18
+
19
+ // ../../packages/cli-kit/dist/index.js
20
+ import {
21
+ cancel as clackCancel,
22
+ confirm as clackConfirm,
23
+ groupMultiselect as clackGroupMultiselect,
24
+ isCancel,
25
+ multiselect as clackMultiselect,
26
+ password as clackPassword,
27
+ select as clackSelect,
28
+ selectKey as clackSelectKey,
29
+ text as clackText
30
+ } from "@clack/prompts";
31
+ import * as prompts_star from "@clack/prompts";
32
+ import { intro, log as log2, note, outro, spinner as spinner3, isCancel as isCancel3, cancel } from "@clack/prompts";
33
+ import { spinner } from "@clack/prompts";
34
+ import {
35
+ closeSync,
36
+ mkdirSync,
37
+ openSync,
38
+ renameSync,
39
+ symlinkSync,
40
+ unlinkSync,
41
+ writeFileSync,
42
+ writeSync
43
+ } from "fs";
44
+ import { homedir } from "os";
45
+ import { join } from "path";
46
+ import { isCancel as isCancel2, log, password as password2, spinner as spinner2, text as text2 } from "@clack/prompts";
47
+ import { timingSafeEqual } from "crypto";
48
+ import { chmod, rm } from "fs/promises";
49
+ import { connect, createServer } from "net";
50
+ import { setTimeout as delay } from "timers/promises";
51
+ var __defProp = Object.defineProperty;
52
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
53
+ var __getOwnPropNames = Object.getOwnPropertyNames;
54
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
55
+ var __export = (target, all) => {
56
+ for (var name in all)
57
+ __defProp(target, name, { get: all[name], enumerable: true });
58
+ };
59
+ var __copyProps = (to, from, except, desc) => {
60
+ if (from && typeof from === "object" || typeof from === "function") {
61
+ for (let key of __getOwnPropNames(from))
62
+ if (!__hasOwnProp.call(to, key) && key !== except)
63
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
64
+ }
65
+ return to;
66
+ };
67
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
68
+ var CSI = new RegExp("\\u001b\\[[0-9;?]*[ -\\/]*[@-~]", "g");
69
+ function stripAnsi(text3) {
70
+ return text3.replace(CSI, "");
71
+ }
72
+ function trimUrl(url) {
73
+ return url.replace(/["'`)\]>]+$/, "").replace(/[.,;]+$/, "");
74
+ }
75
+ var URL_BODY = "[^\\s'\"`<>)\\]\\u0000-\\u001f]";
76
+ var INVALID_CODE = /invalid|incorrect|not a valid|try again|expired|rejected/i;
77
+ function withLoginDefaults(spec, extraArgs) {
78
+ return extraArgs.length > 0 ? extraArgs : spec.defaultArgs;
79
+ }
80
+ function applySkipPermissions(args, rule, enabled) {
81
+ if (!enabled) return args;
82
+ const conflicting = new Set(rule.conflictingArgs);
83
+ const hasConflict = args.some((a) => {
84
+ const eq = a.indexOf("=");
85
+ return conflicting.has(eq === -1 ? a : a.slice(0, eq));
86
+ });
87
+ if (hasConflict) return args;
88
+ return [rule.flag, ...args];
89
+ }
90
+ async function loadPtyBackend() {
91
+ try {
92
+ const ptyMod = await import("@homebridge/node-pty-prebuilt-multiarch");
93
+ const xtermMod = await import("@xterm/headless");
94
+ const spawn = ptyMod["spawn"] ?? ptyMod["default"]?.["spawn"];
95
+ const Terminal = xtermMod["Terminal"] ?? xtermMod["default"]?.["Terminal"];
96
+ if (typeof spawn !== "function" || typeof Terminal !== "function") {
97
+ return null;
98
+ }
99
+ return {
100
+ ptySpawn: spawn,
101
+ termCtor: Terminal
102
+ };
103
+ } catch {
104
+ return null;
105
+ }
106
+ }
107
+ var SPINNER_CHROME = 6;
108
+ function clampSpinnerLine(line) {
109
+ const collapsed = collapseToLastLine(line);
110
+ const cols = process.stdout.columns;
111
+ if (!process.stdout.isTTY || !cols) return collapsed;
112
+ const trimmed = collapsed.replace(/\s+$/, "");
113
+ const max = cols - SPINNER_CHROME;
114
+ if (max <= 1 || trimmed.length <= max) return trimmed;
115
+ return `${trimmed.slice(0, max - 1)}\u2026`;
116
+ }
117
+ function collapseToLastLine(s) {
118
+ const lines = s.replace(/\r/g, "\n").split("\n");
119
+ for (let i = lines.length - 1; i >= 0; i--) {
120
+ const line = lines[i];
121
+ if (line && line.trim().length > 0) return line;
122
+ }
123
+ return "";
124
+ }
125
+ var BOX_WORKSPACE = "/workspace";
126
+ var TeleportError = class extends Error {
127
+ constructor(message) {
128
+ super(message);
129
+ this.name = "TeleportError";
130
+ }
131
+ };
132
+ var prompt_exports = {};
133
+ __export(prompt_exports, {
134
+ confirm: () => confirm,
135
+ groupMultiselect: () => groupMultiselect,
136
+ multiselect: () => multiselect,
137
+ password: () => password,
138
+ select: () => select,
139
+ selectKey: () => selectKey,
140
+ text: () => text
141
+ });
142
+ __reExport(prompt_exports, prompts_star);
143
+ function onCancel() {
144
+ clackCancel("Cancelled.");
145
+ process.exit(130);
146
+ }
147
+ async function confirm(opts) {
148
+ const v = await clackConfirm(opts);
149
+ if (isCancel(v)) onCancel();
150
+ return v;
151
+ }
152
+ async function select(opts) {
153
+ const v = await clackSelect(opts);
154
+ if (isCancel(v)) onCancel();
155
+ return v;
156
+ }
157
+ async function selectKey(opts) {
158
+ const v = await clackSelectKey(opts);
159
+ if (isCancel(v)) onCancel();
160
+ return v;
161
+ }
162
+ async function multiselect(opts) {
163
+ const v = await clackMultiselect(opts);
164
+ if (isCancel(v)) onCancel();
165
+ return v;
166
+ }
167
+ async function groupMultiselect(opts) {
168
+ const v = await clackGroupMultiselect(opts);
169
+ if (isCancel(v)) onCancel();
170
+ return v;
171
+ }
172
+ async function text(opts) {
173
+ const v = await clackText(opts);
174
+ if (isCancel(v)) onCancel();
175
+ return v;
176
+ }
177
+ async function password(opts) {
178
+ const v = await clackPassword(opts);
179
+ if (isCancel(v)) onCancel();
180
+ return v;
181
+ }
182
+ function stateDir() {
183
+ return process.env.AGENTBOX_HOME ?? join(homedir(), ".agentbox");
184
+ }
185
+ function logsDir() {
186
+ return join(stateDir(), "logs");
187
+ }
188
+ var activeCommandLog = null;
189
+ function logToActiveCommand(line) {
190
+ activeCommandLog?.write(line);
191
+ }
192
+ function openCommandLog(command) {
193
+ const dir = logsDir();
194
+ mkdirSync(dir, { recursive: true });
195
+ const path = join(dir, `${command}.log`);
196
+ const prev = join(dir, `${command}.log.prev`);
197
+ try {
198
+ renameSync(path, prev);
199
+ } catch {
200
+ }
201
+ const fd = openSync(path, "a");
202
+ const startedAt = (/* @__PURE__ */ new Date()).toISOString();
203
+ writeSync(fd, `${startedAt} --- BEGIN ${command} (pid ${String(process.pid)}) ---
204
+ `);
205
+ updateLatestSymlink(dir, path);
206
+ let closed = false;
207
+ const closeOnce = () => {
208
+ if (closed) return;
209
+ closed = true;
210
+ if (activeCommandLog === log3) activeCommandLog = null;
211
+ try {
212
+ writeSync(fd, `${(/* @__PURE__ */ new Date()).toISOString()} --- END ${command} ---
213
+ `);
214
+ } catch {
215
+ }
216
+ try {
217
+ closeSync(fd);
218
+ } catch {
219
+ }
220
+ };
221
+ process.on("exit", closeOnce);
222
+ const warnings = [];
223
+ const log3 = {
224
+ path,
225
+ warnings() {
226
+ return [...warnings];
227
+ },
228
+ write(line) {
229
+ if (closed) return;
230
+ const marked = parseProviderWarning(line.trimEnd());
231
+ if (marked && !warnings.includes(marked)) warnings.push(marked);
232
+ const ts = (/* @__PURE__ */ new Date()).toISOString();
233
+ const body = line.endsWith("\n") ? line : line + "\n";
234
+ try {
235
+ writeSync(fd, `${ts} ${body}`);
236
+ } catch {
237
+ }
238
+ },
239
+ raw(chunk) {
240
+ if (closed) return;
241
+ try {
242
+ writeSync(fd, chunk);
243
+ } catch {
244
+ }
245
+ },
246
+ async step(name, fn) {
247
+ const t0 = Date.now();
248
+ this.write(`--- BEGIN ${name} ---`);
249
+ try {
250
+ const out = await fn();
251
+ this.write(`--- END ${name} (${String(Date.now() - t0)}ms) ---`);
252
+ return out;
253
+ } catch (err) {
254
+ const msg = err instanceof Error ? err.message : String(err);
255
+ this.write(`--- FAIL ${name} (${String(Date.now() - t0)}ms): ${msg} ---`);
256
+ throw err;
257
+ }
258
+ },
259
+ close: closeOnce
260
+ };
261
+ activeCommandLog = log3;
262
+ return log3;
263
+ }
264
+ function updateLatestSymlink(dir, target) {
265
+ const link = join(dir, "latest.log");
266
+ try {
267
+ unlinkSync(link);
268
+ } catch {
269
+ }
270
+ try {
271
+ symlinkSync(target, link);
272
+ } catch {
273
+ try {
274
+ writeFileSync(link, target + "\n");
275
+ } catch {
276
+ }
277
+ }
278
+ }
279
+ function makeProgressReporter(verbose) {
280
+ if (!verbose) {
281
+ const s = spinner();
282
+ return {
283
+ start: (label) => s.start(label),
284
+ message: (line) => s.message(clampSpinnerLine(line)),
285
+ stop: (label, code) => s.stop(label, code)
286
+ };
287
+ }
288
+ return {
289
+ start: (label) => process.stderr.write(`${label} (verbose)
290
+ `),
291
+ message: (line) => process.stderr.write(line.endsWith("\n") ? line : line + "\n"),
292
+ stop: (label) => process.stderr.write(`${label}
293
+ `)
294
+ };
295
+ }
296
+ function imageProgress(s) {
297
+ return (line) => {
298
+ s.message(clampSpinnerLine(line));
299
+ if (isImageDecisionLine(line)) logToActiveCommand(line);
300
+ };
301
+ }
302
+ function isImageDecisionLine(line) {
303
+ if (/:\s*(pulling fs layer|waiting|downloading|download complete|extracting|pull complete|already exists|verifying checksum)/i.test(
304
+ line
305
+ )) {
306
+ return false;
307
+ }
308
+ return DECISION_PATTERNS.some((re) => re.test(line));
309
+ }
310
+ var DECISION_PATTERNS = [
311
+ /\bpulling\b/i,
312
+ /\bpulled\b/i,
313
+ /\bpull failed\b/i,
314
+ /\bbuilding\b/i,
315
+ /\bnot present\b/i,
316
+ /\bup to date\b/i,
317
+ /\bbuild context changed\b/i,
318
+ /no docker-prepared/i,
319
+ /authenticat/i,
320
+ // "retrying authenticated", "could not authenticate"
321
+ /\bcould not\b/i
322
+ ];
323
+ var URL_TIMEOUT_MS = 6e4;
324
+ var INPUT_TIMEOUT_MS = 10 * 6e4;
325
+ var POLL_MS = 500;
326
+ var BUF_CAP = 64 * 1024;
327
+ function rejectionMessage(need) {
328
+ if (need?.kind === "secret") return `that ${need.label} was not accepted \u2014 try another`;
329
+ return "the code was not accepted \u2014 paste a fresh one";
330
+ }
331
+ function tailOf(buf) {
332
+ const lines = stripAnsi(buf).replace(/\r/g, "").split("\n").map((l) => l.trim()).filter((l) => l.length > 0);
333
+ const tail = lines.slice(-2).join(" ");
334
+ return tail.length > 240 ? tail.slice(-240) : tail;
335
+ }
336
+ async function runAgentLogin(opts) {
337
+ const urlTimeoutMs = opts.urlTimeoutMs ?? URL_TIMEOUT_MS;
338
+ const inputTimeoutMs = opts.inputTimeoutMs ?? INPUT_TIMEOUT_MS;
339
+ const writeLog = opts.writeLog ?? (() => {
340
+ });
341
+ const { spec } = opts;
342
+ const backend = await loadPtyBackend();
343
+ if (!backend) {
344
+ const error = "pty-unavailable: the node-pty prebuild is not installed";
345
+ opts.onPhase("error", { error });
346
+ return { ok: false, error };
347
+ }
348
+ writeLog(`spawning: docker ${opts.dockerArgv.join(" ")}`);
349
+ return await new Promise((resolve) => {
350
+ let buf = "";
351
+ let phase = "starting";
352
+ let need = null;
353
+ let lastError;
354
+ let finished = false;
355
+ const disposers = [];
356
+ const setPhase = (next, update) => {
357
+ if (finished) return;
358
+ phase = next;
359
+ opts.onPhase(next, update);
360
+ };
361
+ const pty = backend.ptySpawn("docker", opts.dockerArgv, {
362
+ name: "xterm-256color",
363
+ cols: 200,
364
+ rows: 50,
365
+ env: process.env
366
+ });
367
+ const finish = (result) => {
368
+ if (finished) return;
369
+ finished = true;
370
+ for (const d of disposers) d();
371
+ try {
372
+ pty.kill();
373
+ } catch {
374
+ }
375
+ resolve(result);
376
+ };
377
+ if (opts.signal) {
378
+ const onAbort = () => {
379
+ if (finished) return;
380
+ const error = "login aborted";
381
+ writeLog("aborted");
382
+ setPhase("error", { error });
383
+ finish({ ok: false, error });
384
+ };
385
+ if (opts.signal.aborted) onAbort();
386
+ else {
387
+ opts.signal.addEventListener("abort", onAbort, { once: true });
388
+ disposers.push(() => opts.signal?.removeEventListener("abort", onAbort));
389
+ }
390
+ }
391
+ const inputPoll = setInterval(() => {
392
+ if (finished || phase !== "awaiting-code") return;
393
+ const value = opts.getInput();
394
+ if (value) {
395
+ writeLog("received input; submitting to login");
396
+ setPhase("exchanging");
397
+ pty.write(value + "\r");
398
+ }
399
+ }, POLL_MS);
400
+ disposers.push(() => clearInterval(inputPoll));
401
+ pty.onData((d) => {
402
+ buf += d;
403
+ if (buf.length > BUF_CAP) buf = buf.slice(-BUF_CAP);
404
+ opts.writeRaw(d);
405
+ if (!need) {
406
+ const found = spec.detect(buf);
407
+ if (!found) return;
408
+ need = found;
409
+ if (found.kind === "unsupported") {
410
+ writeLog(`unsupported prompt: ${found.reason}`);
411
+ finish({ ok: false, unsupported: found.reason, error: found.reason });
412
+ return;
413
+ }
414
+ if (found.kind === "browser-only") {
415
+ writeLog(`published device url: ${found.url}`);
416
+ setPhase("awaiting-approval", { url: found.url, userCode: found.userCode, need: found });
417
+ return;
418
+ }
419
+ const url = found.kind === "paste-code" ? found.url : void 0;
420
+ if (url) writeLog(`published auth url: ${url}`);
421
+ setPhase("awaiting-code", { url, need: found });
422
+ return;
423
+ }
424
+ if (phase === "exchanging" && spec.invalidInputPattern?.test(d)) {
425
+ lastError = rejectionMessage(need);
426
+ writeLog("input rejected; back to awaiting-code");
427
+ setPhase("awaiting-code", { lastError, need: need ?? void 0 });
428
+ }
429
+ });
430
+ pty.onExit(({ exitCode }) => {
431
+ if (finished) return;
432
+ writeLog(`login process exited code=${String(exitCode)}`);
433
+ void (async () => {
434
+ let wrote = false;
435
+ try {
436
+ wrote = await opts.verify();
437
+ } catch {
438
+ }
439
+ if (exitCode === 0 && wrote) {
440
+ const { warmed } = await opts.finalize?.() ?? {};
441
+ setPhase("done", { warmed });
442
+ finish({ ok: true, warmed, exitCode });
443
+ return;
444
+ }
445
+ const tail = tailOf(buf);
446
+ let error = exitCode === 0 ? "login exited without writing credentials" : `login exited with code ${String(exitCode)}`;
447
+ if (lastError) error = lastError;
448
+ if (tail) error += ` \u2014 ${tail}`;
449
+ setPhase("error", { error, exitCode });
450
+ finish({ ok: false, error, exitCode });
451
+ })();
452
+ });
453
+ const urlTimer = setTimeout(() => {
454
+ if (need || finished) return;
455
+ const error = `${spec.agent} login never printed an auth URL (see the log)`;
456
+ writeLog("no auth URL within timeout");
457
+ setPhase("error", { error });
458
+ finish({ ok: false, error });
459
+ }, urlTimeoutMs);
460
+ disposers.push(() => clearTimeout(urlTimer));
461
+ const inputTimer = setTimeout(() => {
462
+ if (finished || phase === "exchanging" || phase === "done" || phase === "error") return;
463
+ const error = "timed out waiting for approval (10 min) \u2014 run login again";
464
+ writeLog("no input within timeout; aborting");
465
+ setPhase("error", { error });
466
+ finish({ ok: false, error });
467
+ }, inputTimeoutMs);
468
+ disposers.push(() => clearTimeout(inputTimer));
469
+ });
470
+ }
471
+ function printUrl(url) {
472
+ process.stdout.write(`
473
+ ${url}
474
+
475
+ `);
476
+ }
477
+ async function runGuidedLogin(agent, createBinding) {
478
+ const cmdLog = openCommandLog(`${agent}-login`);
479
+ const binding = createBinding((line) => cmdLog.write(line));
480
+ const { spec } = binding;
481
+ const abort = new AbortController();
482
+ let pendingInput = null;
483
+ let prompting = false;
484
+ let cancelled = false;
485
+ const s = spinner2();
486
+ let spinning = false;
487
+ const startSpinner = (msg) => {
488
+ if (!spinning) {
489
+ s.start(msg);
490
+ spinning = true;
491
+ } else s.message(msg);
492
+ };
493
+ const stopSpinner = (msg) => {
494
+ if (!spinning) return;
495
+ spinning = false;
496
+ s.stop(msg);
497
+ };
498
+ const promptFor = (need, lastError) => {
499
+ if (prompting || cancelled) return;
500
+ prompting = true;
501
+ void (async () => {
502
+ stopSpinner();
503
+ if (lastError) log.warn(lastError);
504
+ let answer;
505
+ if (need.kind === "secret") {
506
+ if (need.hint) log.info(`Create one at: ${need.hint}`);
507
+ answer = await password2({ message: `Enter your ${need.label}` });
508
+ } else if (need.kind === "paste-code") {
509
+ log.info("Open this URL in a browser and approve access:");
510
+ printUrl(need.url);
511
+ answer = await text2({
512
+ message: "Paste the code from the browser",
513
+ validate: (v) => v.trim().length === 0 ? "Paste the code to continue" : void 0
514
+ });
515
+ } else return;
516
+ if (isCancel2(answer)) {
517
+ cancelled = true;
518
+ cmdLog.write("cancelled at the host prompt");
519
+ abort.abort();
520
+ return;
521
+ }
522
+ pendingInput = answer.trim();
523
+ prompting = false;
524
+ startSpinner("completing sign-in");
525
+ })();
526
+ };
527
+ startSpinner("starting sign-in");
528
+ const result = await runAgentLogin({
529
+ spec,
530
+ dockerArgv: binding.dockerArgv,
531
+ // The raw container stream goes to the log, NEVER to the user's terminal.
532
+ writeRaw: (chunk) => cmdLog.raw(chunk),
533
+ writeLog: (line) => cmdLog.write(line),
534
+ onPhase: (phase, update) => {
535
+ if (phase === "awaiting-approval" && update?.url) {
536
+ stopSpinner();
537
+ log.info("Open this URL in a browser and sign in:");
538
+ printUrl(update.url);
539
+ if (update.userCode) log.info(`Enter this one-time code: ${update.userCode}`);
540
+ startSpinner("waiting for you to approve in the browser");
541
+ return;
542
+ }
543
+ if (phase === "awaiting-code" && update?.need) {
544
+ promptFor(update.need, update.lastError);
545
+ }
546
+ },
547
+ getInput: () => {
548
+ const v = pendingInput;
549
+ pendingInput = null;
550
+ return v;
551
+ },
552
+ verify: binding.verify,
553
+ finalize: binding.finalize,
554
+ signal: abort.signal
555
+ });
556
+ stopSpinner();
557
+ cmdLog.close();
558
+ if (cancelled) return { ok: false, cancelled: true };
559
+ return {
560
+ ok: result.ok,
561
+ error: result.error,
562
+ warmed: result.warmed,
563
+ unsupported: result.unsupported
564
+ };
565
+ }
566
+ var RESUME_SEED = "resume";
567
+ function defineAgentModule(id, parts) {
568
+ return { id, spec: resolveAgentSpec(id), ...parts };
569
+ }
570
+ var ESC = 27;
571
+ var STICKY_DEC_MODES = /* @__PURE__ */ new Set([
572
+ 1,
573
+ // DECCKM — application cursor keys
574
+ 7,
575
+ // auto-wrap
576
+ 12,
577
+ // cursor blink
578
+ 25,
579
+ // cursor visible
580
+ 1e3,
581
+ // mouse: press/release
582
+ 1002,
583
+ // mouse: button-drag tracking
584
+ 1003,
585
+ // mouse: any-motion tracking
586
+ 1004,
587
+ // focus reporting
588
+ 1005,
589
+ // mouse: utf-8 coords
590
+ 1006,
591
+ // mouse: SGR coords
592
+ 1015,
593
+ // mouse: urxvt coords
594
+ 2004
595
+ // bracketed paste
596
+ ]);
597
+ var ALT_SCREEN_MODES = /* @__PURE__ */ new Set([47, 1047, 1049]);
598
+ var PtyEscScanner = class {
599
+ state = "text";
600
+ params = [];
601
+ paramDigits = "";
602
+ prefix = "";
603
+ decModes = /* @__PURE__ */ new Set();
604
+ modifyOtherKeys;
605
+ kittyKeyboard;
606
+ /** Absolute stream offset just past the last full-screen wipe. */
607
+ safeOffset = 0;
608
+ /** Absolute count of bytes ever fed. */
609
+ offset = 0;
610
+ altScreen = false;
611
+ push(chunk) {
612
+ for (const byte of chunk) {
613
+ this.offset += 1;
614
+ this.step(byte);
615
+ }
616
+ }
617
+ /** The sticky modes, as the bytes needed to put a fresh client into them. */
618
+ modePrologue() {
619
+ let out = "";
620
+ if (this.altScreen) out += "\x1B[?1049h";
621
+ for (const mode of this.decModes) {
622
+ if (ALT_SCREEN_MODES.has(mode)) continue;
623
+ out += `\x1B[?${mode}h`;
624
+ }
625
+ if (this.modifyOtherKeys) out += this.modifyOtherKeys;
626
+ if (this.kittyKeyboard) out += this.kittyKeyboard;
627
+ return out;
628
+ }
629
+ step(byte) {
630
+ if (this.state === "text") {
631
+ if (byte === ESC) this.state = "esc";
632
+ return;
633
+ }
634
+ if (this.state === "esc") {
635
+ if (byte === 91) {
636
+ this.state = "csi";
637
+ this.params = [];
638
+ this.paramDigits = "";
639
+ this.prefix = "";
640
+ return;
641
+ }
642
+ if (byte === 99) this.markSafe();
643
+ this.state = byte === ESC ? "esc" : "text";
644
+ return;
645
+ }
646
+ if (byte >= 48 && byte <= 57) {
647
+ this.paramDigits += String.fromCharCode(byte);
648
+ return;
649
+ }
650
+ if (byte === 59) {
651
+ this.pushParam();
652
+ return;
653
+ }
654
+ if (byte === 63 || byte === 62 || byte === 60 || byte === 61) {
655
+ this.prefix = String.fromCharCode(byte);
656
+ return;
657
+ }
658
+ if (byte >= 32 && byte <= 47) return;
659
+ if (byte >= 64 && byte <= 126) {
660
+ this.pushParam();
661
+ this.final(String.fromCharCode(byte));
662
+ this.state = "text";
663
+ return;
664
+ }
665
+ this.state = "text";
666
+ }
667
+ pushParam() {
668
+ if (this.paramDigits.length > 0) {
669
+ this.params.push(Number(this.paramDigits));
670
+ this.paramDigits = "";
671
+ } else if (this.prefix !== "" || this.params.length > 0) {
672
+ this.params.push(0);
673
+ }
674
+ }
675
+ final(ch) {
676
+ if (this.prefix === "?" && (ch === "h" || ch === "l")) {
677
+ const on = ch === "h";
678
+ for (const mode of this.params) {
679
+ if (ALT_SCREEN_MODES.has(mode)) {
680
+ this.altScreen = on;
681
+ this.markSafe();
682
+ }
683
+ if (!STICKY_DEC_MODES.has(mode) && !ALT_SCREEN_MODES.has(mode)) continue;
684
+ if (on) this.decModes.add(mode);
685
+ else this.decModes.delete(mode);
686
+ }
687
+ return;
688
+ }
689
+ if (this.prefix === ">" && ch === "m") {
690
+ const [mode, level] = this.params;
691
+ if (mode === 4) {
692
+ this.modifyOtherKeys = level === void 0 ? "\x1B[>4m" : `\x1B[>4;${level}m`;
693
+ }
694
+ return;
695
+ }
696
+ if (this.prefix === ">" && ch === "u") {
697
+ this.kittyKeyboard = `\x1B[>${this.params[0] ?? 1}u`;
698
+ return;
699
+ }
700
+ if (this.prefix === "" && ch === "J" && (this.params[0] === 2 || this.params[0] === 3)) {
701
+ this.markSafe();
702
+ }
703
+ }
704
+ markSafe() {
705
+ this.safeOffset = this.offset;
706
+ }
707
+ };
708
+ var PtyRing = class {
709
+ chunks = [];
710
+ bytes = 0;
711
+ /** Absolute offset of the first byte still retained. */
712
+ dropped = 0;
713
+ scanner = new PtyEscScanner();
714
+ maxBytes;
715
+ constructor(opts) {
716
+ this.maxBytes = Math.max(4096, opts.maxBytes);
717
+ }
718
+ get altScreen() {
719
+ return this.scanner.altScreen;
720
+ }
721
+ push(chunk) {
722
+ if (chunk.length === 0) return;
723
+ this.scanner.push(chunk);
724
+ this.chunks.push(chunk);
725
+ this.bytes += chunk.length;
726
+ while (this.bytes > this.maxBytes) {
727
+ const head = this.chunks[0];
728
+ if (!head) break;
729
+ const excess = this.bytes - this.maxBytes;
730
+ if (head.length <= excess) {
731
+ this.chunks.shift();
732
+ this.bytes -= head.length;
733
+ this.dropped += head.length;
734
+ } else {
735
+ this.chunks[0] = head.slice(excess);
736
+ this.bytes -= excess;
737
+ this.dropped += excess;
738
+ }
739
+ }
740
+ }
741
+ /**
742
+ * What a fresh client should be sent: the sticky modes, then output from the
743
+ * last screen wipe (or from whatever is left, when that wipe has already
744
+ * scrolled out of the ring — a partial frame still beats a blank window).
745
+ */
746
+ replay() {
747
+ const from = Math.max(this.scanner.safeOffset, this.dropped);
748
+ const skip = from - this.dropped;
749
+ const body = this.concat(skip);
750
+ return { prologue: this.scanner.modePrologue(), body };
751
+ }
752
+ concat(skip) {
753
+ const out = new Uint8Array(Math.max(0, this.bytes - skip));
754
+ let remaining = skip;
755
+ let at = 0;
756
+ for (const chunk of this.chunks) {
757
+ if (remaining >= chunk.length) {
758
+ remaining -= chunk.length;
759
+ continue;
760
+ }
761
+ const piece = remaining > 0 ? chunk.slice(remaining) : chunk;
762
+ remaining = 0;
763
+ out.set(piece, at);
764
+ at += piece.length;
765
+ }
766
+ return out;
767
+ }
768
+ };
769
+ var PTY_REPLAY_RESET = "\x1B[?1049l\x1B[!p\x1B[2J\x1B[H";
770
+ var PtyHostAlreadyRunning = class extends Error {
771
+ constructor(socketPath) {
772
+ super(`a pty host is already listening on ${socketPath}`);
773
+ this.socketPath = socketPath;
774
+ this.name = "PtyHostAlreadyRunning";
775
+ }
776
+ socketPath;
777
+ };
778
+ var PtyBackendUnavailable = class extends Error {
779
+ constructor() {
780
+ super("node-pty is not available (optional prebuild missing)");
781
+ this.name = "PtyBackendUnavailable";
782
+ }
783
+ };
784
+ var REAP_TICK_MS = 5e3;
785
+ var NUDGE_DELAY_MS = 50;
786
+ var STOP_LADDER_MS = 2e3;
787
+ var HELLO_TIMEOUT_MS = 5e3;
788
+ var MAX_SOCKET_PATH = 100;
789
+ var Utf8Joiner = class {
790
+ tail = new Uint8Array(0);
791
+ decoder = new TextDecoder("utf-8");
792
+ push(chunk) {
793
+ const merged = new Uint8Array(this.tail.length + chunk.length);
794
+ merged.set(this.tail, 0);
795
+ merged.set(chunk, this.tail.length);
796
+ const cut = completeLength(merged);
797
+ this.tail = merged.slice(cut);
798
+ return cut === 0 ? "" : this.decoder.decode(merged.slice(0, cut));
799
+ }
800
+ };
801
+ function completeLength(bytes) {
802
+ for (let back = 1; back <= 3 && back <= bytes.length; back += 1) {
803
+ const byte = bytes[bytes.length - back];
804
+ if ((byte & 192) === 128) continue;
805
+ const need = byte >= 240 ? 4 : byte >= 224 ? 3 : byte >= 192 ? 2 : 1;
806
+ return need > back ? bytes.length - back : bytes.length;
807
+ }
808
+ return bytes.length;
809
+ }
810
+ function tokenMatches(expected, given) {
811
+ const a = Buffer.from(expected);
812
+ const b = Buffer.from(given);
813
+ return a.length === b.length && timingSafeEqual(a, b);
814
+ }
815
+ async function probeSocket(path) {
816
+ return await new Promise((resolve) => {
817
+ const sock = connect(path);
818
+ const done = (alive) => {
819
+ sock.destroy();
820
+ resolve(alive);
821
+ };
822
+ sock.once("connect", () => done(true));
823
+ sock.once("error", () => done(false));
824
+ setTimeout(() => done(false), 500).unref();
825
+ });
826
+ }
827
+ async function startPtyHost(spec) {
828
+ const backend = await loadPtyBackend();
829
+ if (!backend) throw new PtyBackendUnavailable();
830
+ const socketPath = ptySocketPath(spec.managerId, spec.baseDir);
831
+ if (Buffer.byteLength(socketPath) > MAX_SOCKET_PATH) {
832
+ throw new Error(
833
+ `socket path is ${Buffer.byteLength(socketPath)} bytes, over the ${MAX_SOCKET_PATH}-byte unix socket limit: ${socketPath}`
834
+ );
835
+ }
836
+ await ensurePtyDir(spec.baseDir);
837
+ if (await probeSocket(socketPath)) throw new PtyHostAlreadyRunning(socketPath);
838
+ await rm(socketPath, { force: true });
839
+ const clients = /* @__PURE__ */ new Set();
840
+ const leases = /* @__PURE__ */ new Map();
841
+ const ring = new PtyRing({ maxBytes: spec.scrollbackBytes });
842
+ let everLeased = false;
843
+ let pinned = spec.pinned;
844
+ let leaseGraceMs = spec.leaseGraceMs;
845
+ let windowSize = spec.windowSize;
846
+ let cols = spec.cols;
847
+ let rows = spec.rows;
848
+ let nudging = false;
849
+ let stopping = false;
850
+ let alive = true;
851
+ let nudgeTimer;
852
+ const ptyWrite = (data) => {
853
+ if (!alive) return;
854
+ try {
855
+ pty.write(data);
856
+ } catch {
857
+ }
858
+ };
859
+ const ptyResize = (nextCols, nextRows) => {
860
+ if (!alive) return;
861
+ try {
862
+ pty.resize(nextCols, nextRows);
863
+ } catch {
864
+ }
865
+ };
866
+ const ptyKill = (signal) => {
867
+ if (!alive) return;
868
+ try {
869
+ pty.kill(signal);
870
+ } catch {
871
+ }
872
+ };
873
+ const pty = backend.ptySpawn(spec.shell, ["-lc", spec.script], {
874
+ name: "xterm-256color",
875
+ cols,
876
+ rows,
877
+ cwd: spec.cwd,
878
+ // One stable terminfo for every client (tray, CLI, a future web bridge), so
879
+ // the agent's key and mouse encodings do not change with who is attached.
880
+ env: { ...spec.env, TERM: "xterm-256color" }
881
+ });
882
+ const killOrphan = () => {
883
+ try {
884
+ pty.kill("SIGKILL");
885
+ } catch {
886
+ }
887
+ };
888
+ const meta = {
889
+ v: 1,
890
+ managerId: spec.managerId,
891
+ workspaceId: spec.workspaceId,
892
+ agent: spec.agent,
893
+ cwd: spec.cwd,
894
+ socket: socketPath,
895
+ pid: process.pid,
896
+ startedAt: (/* @__PURE__ */ new Date()).toISOString(),
897
+ token: spec.token,
898
+ runId: spec.runId,
899
+ cols,
900
+ rows,
901
+ pinned,
902
+ leaseGraceMs
903
+ };
904
+ try {
905
+ await writePtyMeta(meta, spec.baseDir);
906
+ } catch (err) {
907
+ killOrphan();
908
+ throw err;
909
+ }
910
+ const send = (client, bytes) => {
911
+ if (!client.socket.destroyed) client.socket.write(bytes);
912
+ };
913
+ const tell = (client, message) => send(client, encodeCtrl(message));
914
+ pty.onData((data) => {
915
+ const bytes = Buffer.from(data, "utf8");
916
+ ring.push(bytes);
917
+ const frame = encodeData(bytes);
918
+ for (const client of clients) if (client.authed) send(client, frame);
919
+ });
920
+ let resolveDone = () => {
921
+ };
922
+ const done = new Promise((resolve) => {
923
+ resolveDone = resolve;
924
+ });
925
+ pty.onExit(async ({ exitCode }) => {
926
+ alive = false;
927
+ if (nudgeTimer) clearTimeout(nudgeTimer);
928
+ meta.exitCode = exitCode;
929
+ meta.exitedAt = (/* @__PURE__ */ new Date()).toISOString();
930
+ const frame = encodeExit(exitCode);
931
+ for (const client of clients) {
932
+ if (client.authed) send(client, frame);
933
+ client.socket.end();
934
+ }
935
+ server.close();
936
+ clearInterval(reaper);
937
+ await removePtySession(spec.managerId, spec.baseDir).catch(() => {
938
+ });
939
+ resolveDone(exitCode);
940
+ });
941
+ const watchers = (except) => [...clients].filter((c) => c !== except && c.authed && c.cols > 0 && c.rows > 0).length;
942
+ const applySize = () => {
943
+ const connected = [...clients].filter((c) => c.authed && c.cols > 0 && c.rows > 0);
944
+ if (connected.length === 0) return;
945
+ let next = connected[0];
946
+ for (const client of connected) {
947
+ if (windowSize === "latest" && client.sizedAt > next.sizedAt) next = client;
948
+ if (windowSize === "smallest" && client.rows * client.cols < next.rows * next.cols)
949
+ next = client;
950
+ if (windowSize === "largest" && client.rows * client.cols > next.rows * next.cols)
951
+ next = client;
952
+ }
953
+ if (next.cols === cols && next.rows === rows) return;
954
+ cols = next.cols;
955
+ rows = next.rows;
956
+ ptyResize(cols, rows);
957
+ const size = { t: "size", cols, rows, by: next.id ?? "unknown" };
958
+ for (const client of clients) if (client.authed) tell(client, size);
959
+ };
960
+ const nudgeRepaint = () => {
961
+ if (nudging) return;
962
+ nudging = true;
963
+ ptyResize(cols, Math.max(1, rows - 1));
964
+ nudgeTimer = setTimeout(() => {
965
+ ptyResize(cols, rows);
966
+ nudging = false;
967
+ }, NUDGE_DELAY_MS);
968
+ nudgeTimer.unref();
969
+ };
970
+ const exitedWithin = async (ms) => await Promise.race([done.then(() => true), delay(ms).then(() => false)]);
971
+ const stopLadder = async () => {
972
+ if (stopping) return;
973
+ stopping = true;
974
+ ptyKill("SIGHUP");
975
+ if (await exitedWithin(STOP_LADDER_MS)) return;
976
+ ptyKill("SIGTERM");
977
+ if (await exitedWithin(STOP_LADDER_MS)) return;
978
+ ptyKill("SIGKILL");
979
+ };
980
+ const onCtrl = async (client, message) => {
981
+ if (message.t === "hello") {
982
+ if (client.authed) return;
983
+ if (message.v !== PTY_PROTOCOL_VERSION) {
984
+ tell(client, {
985
+ t: "error",
986
+ code: "unsupported-version",
987
+ message: `host speaks protocol ${PTY_PROTOCOL_VERSION}`
988
+ });
989
+ client.socket.end();
990
+ return;
991
+ }
992
+ if (!tokenMatches(spec.token, message.token)) {
993
+ tell(client, { t: "error", code: "unauthorized", message: "bad token" });
994
+ client.socket.end();
995
+ return;
996
+ }
997
+ client.authed = true;
998
+ client.id = message.client.id;
999
+ client.kind = message.client.kind;
1000
+ client.cols = message.client.cols;
1001
+ client.rows = message.client.rows;
1002
+ client.lastActiveAt = Date.now();
1003
+ client.sizedAt = Date.now();
1004
+ if (message.lease?.hold) {
1005
+ everLeased = true;
1006
+ leases.set(message.client.id, { lastSeenAt: Date.now() });
1007
+ }
1008
+ tell(client, {
1009
+ t: "welcome",
1010
+ v: PTY_PROTOCOL_VERSION,
1011
+ managerId: spec.managerId,
1012
+ agent: spec.agent,
1013
+ cwd: spec.cwd,
1014
+ cols,
1015
+ rows,
1016
+ clients: [...clients].filter((c) => c.authed).length,
1017
+ ...meta.exitCode === void 0 ? {} : { exited: meta.exitCode }
1018
+ });
1019
+ if (message.replay !== false) {
1020
+ const { prologue, body } = ring.replay();
1021
+ tell(client, { t: "replay-begin", bytes: body.length });
1022
+ send(client, encodeData(Buffer.from(PTY_REPLAY_RESET + prologue, "utf8")));
1023
+ if (body.length > 0) send(client, encodeData(body));
1024
+ tell(client, { t: "replay-end" });
1025
+ }
1026
+ applySize();
1027
+ if (client.cols === cols && client.rows === rows) nudgeRepaint();
1028
+ return;
1029
+ }
1030
+ if (!client.authed) {
1031
+ tell(client, { t: "error", code: "unauthorized", message: "hello first" });
1032
+ client.socket.end();
1033
+ return;
1034
+ }
1035
+ switch (message.t) {
1036
+ case "resize":
1037
+ client.cols = message.cols;
1038
+ client.rows = message.rows;
1039
+ client.lastActiveAt = Date.now();
1040
+ client.sizedAt = Date.now();
1041
+ applySize();
1042
+ return;
1043
+ case "inject": {
1044
+ const flat = message.text.replace(/\s*[\r\n]+\s*/gu, " ").trim();
1045
+ if (flat.length > 0) ptyWrite(flat);
1046
+ if (message.submit !== false) {
1047
+ await delay(message.submitDelayMs ?? spec.submitDelayMs);
1048
+ ptyWrite("\r");
1049
+ }
1050
+ return;
1051
+ }
1052
+ case "lease":
1053
+ everLeased = true;
1054
+ leases.set(client.id ?? "anonymous", { lastSeenAt: Date.now() });
1055
+ tell(client, {
1056
+ t: "lease-ack",
1057
+ expiresAt: new Date(Date.now() + message.ttlMs + leaseGraceMs).toISOString()
1058
+ });
1059
+ return;
1060
+ case "release":
1061
+ leases.delete(client.id ?? "anonymous");
1062
+ if (leases.size === 0 && everLeased && !pinned && spec.lifetime !== "persistent") {
1063
+ void stopLadder();
1064
+ }
1065
+ return;
1066
+ case "stop":
1067
+ void stopLadder();
1068
+ return;
1069
+ case "signal":
1070
+ if (message.name === "INT") ptyWrite("");
1071
+ else ptyKill(`SIG${message.name}`);
1072
+ return;
1073
+ case "status":
1074
+ tell(client, {
1075
+ t: "status-report",
1076
+ managerId: spec.managerId,
1077
+ pid: process.pid,
1078
+ clients: [...clients].filter((c) => c.authed).length,
1079
+ leaseHolders: [...leases.keys()],
1080
+ pinned,
1081
+ idleMs: Date.now() - Math.max(...[...clients].map((c) => c.lastActiveAt), 0),
1082
+ cols,
1083
+ rows
1084
+ });
1085
+ return;
1086
+ case "configure":
1087
+ if (message.pinned !== void 0) pinned = message.pinned;
1088
+ if (message.leaseGraceMs !== void 0) leaseGraceMs = message.leaseGraceMs;
1089
+ if (message.windowSize !== void 0) windowSize = message.windowSize;
1090
+ meta.pinned = pinned;
1091
+ meta.leaseGraceMs = leaseGraceMs;
1092
+ await writePtyMeta(meta, spec.baseDir).catch(() => {
1093
+ });
1094
+ return;
1095
+ case "bye":
1096
+ client.socket.end();
1097
+ return;
1098
+ default:
1099
+ return;
1100
+ }
1101
+ };
1102
+ const server = createServer((socket) => {
1103
+ socket.setNoDelay(true);
1104
+ const client = {
1105
+ socket,
1106
+ decoder: new PtyFrameDecoder(),
1107
+ joiner: new Utf8Joiner(),
1108
+ cols: spec.cols,
1109
+ rows: spec.rows,
1110
+ lastActiveAt: Date.now(),
1111
+ sizedAt: Date.now(),
1112
+ authed: false
1113
+ };
1114
+ clients.add(client);
1115
+ const helloTimer = setTimeout(() => {
1116
+ if (!client.authed) socket.destroy();
1117
+ }, HELLO_TIMEOUT_MS);
1118
+ helloTimer.unref();
1119
+ socket.on("data", (chunk) => {
1120
+ let frames;
1121
+ try {
1122
+ frames = client.decoder.push(chunk);
1123
+ } catch (err) {
1124
+ const code = err instanceof PtyFrameError ? err.code : "bad-frame";
1125
+ tell(client, { t: "error", code, message: err.message });
1126
+ socket.destroy();
1127
+ return;
1128
+ }
1129
+ for (const frame of frames) {
1130
+ if (frame.type === "input") {
1131
+ if (!client.authed) continue;
1132
+ client.lastActiveAt = Date.now();
1133
+ const text3 = client.joiner.push(frame.payload);
1134
+ if (text3.length > 0) ptyWrite(text3);
1135
+ continue;
1136
+ }
1137
+ if (frame.type === "ctrl") {
1138
+ void onCtrl(client, frame.message);
1139
+ }
1140
+ }
1141
+ });
1142
+ socket.on("error", () => socket.destroy());
1143
+ socket.on("close", () => {
1144
+ clearTimeout(helloTimer);
1145
+ clients.delete(client);
1146
+ applySize();
1147
+ });
1148
+ });
1149
+ try {
1150
+ await new Promise((resolve, reject) => {
1151
+ server.once("error", reject);
1152
+ server.listen(socketPath, () => resolve());
1153
+ });
1154
+ } catch (err) {
1155
+ killOrphan();
1156
+ await removePtySession(spec.managerId, spec.baseDir).catch(() => {
1157
+ });
1158
+ throw err;
1159
+ }
1160
+ await chmod(socketPath, 384).catch(() => {
1161
+ });
1162
+ const reaper = setInterval(() => {
1163
+ const now = Date.now();
1164
+ for (const client of clients) {
1165
+ if (client.authed && client.id && leases.has(client.id)) {
1166
+ leases.set(client.id, { lastSeenAt: now });
1167
+ }
1168
+ }
1169
+ if (spec.lifetime === "persistent" || !everLeased || pinned || stopping) return;
1170
+ for (const lease of leases.values()) {
1171
+ if (now - lease.lastSeenAt <= leaseGraceMs) return;
1172
+ }
1173
+ if (watchers() > 0) return;
1174
+ void stopLadder();
1175
+ }, REAP_TICK_MS);
1176
+ return {
1177
+ socketPath,
1178
+ done,
1179
+ stop: async () => {
1180
+ await stopLadder();
1181
+ }
1182
+ };
1183
+ }
1184
+
1185
+ export {
1186
+ stripAnsi,
1187
+ trimUrl,
1188
+ URL_BODY,
1189
+ INVALID_CODE,
1190
+ withLoginDefaults,
1191
+ applySkipPermissions,
1192
+ loadPtyBackend,
1193
+ clampSpinnerLine,
1194
+ BOX_WORKSPACE,
1195
+ TeleportError,
1196
+ confirm,
1197
+ select,
1198
+ multiselect,
1199
+ text,
1200
+ intro,
1201
+ log2,
1202
+ note,
1203
+ outro,
1204
+ spinner3,
1205
+ isCancel3,
1206
+ openCommandLog,
1207
+ makeProgressReporter,
1208
+ imageProgress,
1209
+ runAgentLogin,
1210
+ runGuidedLogin,
1211
+ RESUME_SEED,
1212
+ defineAgentModule,
1213
+ PtyHostAlreadyRunning,
1214
+ PtyBackendUnavailable,
1215
+ startPtyHost
1216
+ };
1217
+ //# sourceMappingURL=chunk-AXAMPAP3.js.map