purplemux 0.2.4 → 0.2.5

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 (329) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +70 -70
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/routes-manifest.json +7 -7
  6. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-qfa-x._.js +3 -0
  7. package/.next/standalone/.next/server/chunks/[root-of-the-server]__00nrs0h._.js +3 -0
  8. package/.next/standalone/.next/server/chunks/[root-of-the-server]__03x8rds._.js +3 -0
  9. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04cr_m8._.js +1 -1
  10. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06j59n1._.js +3 -0
  11. package/.next/standalone/.next/server/chunks/[root-of-the-server]__07gfnob._.js +1 -1
  12. package/.next/standalone/.next/server/chunks/[root-of-the-server]__07xijrd._.js +1 -1
  13. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08tdlcm._.js +1 -1
  14. package/.next/standalone/.next/server/chunks/[root-of-the-server]__09_6_.~._.js +3 -0
  15. package/.next/standalone/.next/server/chunks/[root-of-the-server]__09gkm_6._.js +1 -1
  16. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_uldiw._.js +15 -0
  17. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0a4t.z5._.js +52 -0
  18. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bo-su1._.js +1 -1
  19. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c-bb5d._.js +1 -1
  20. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dvelfj._.js +52 -0
  21. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e.7isl._.js +5 -0
  22. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gcec.8._.js +3 -0
  23. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ihlt6s._.js +1 -1
  24. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qvunc5._.js +1 -1
  25. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r77-u1._.js +52 -0
  26. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0vi8p6v._.js +1 -1
  27. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0w3m-oz._.js +1 -1
  28. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zh8xur._.js +3 -0
  29. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~iu3jq._.js +3 -0
  30. package/.next/standalone/.next/server/chunks/[root-of-the-server]__12nr~pb._.js +1 -1
  31. package/.next/standalone/.next/server/chunks/{_0v81st0._.js → _0.pa6m1._.js} +1 -1
  32. package/.next/standalone/.next/server/chunks/_05ib7yu._.js +3 -0
  33. package/.next/standalone/.next/server/chunks/{_0ll-5~7._.js → _09y8.gr._.js} +1 -1
  34. package/.next/standalone/.next/server/chunks/{_0.5a4bu._.js → _0mwq11h._.js} +1 -1
  35. package/.next/standalone/.next/server/chunks/_0y4b49w._.js +3 -0
  36. package/.next/standalone/.next/server/chunks/_0zcb2f0._.js +3 -0
  37. package/.next/standalone/.next/server/chunks/{node_modules_ws_124xx2_._.js → _106a~ya._.js} +2 -2
  38. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_pages-api_00-t8sq.js +1 -1
  39. package/.next/standalone/.next/server/chunks/src_lib_00fhuqb._.js +3 -0
  40. package/.next/standalone/.next/server/chunks/src_lib_0dvlmi4._.js +15 -0
  41. package/.next/standalone/.next/server/chunks/src_lib_0ojl2hg._.js +52 -0
  42. package/.next/standalone/.next/server/chunks/src_lib_layout-store_ts_0fanx7c._.js +1 -1
  43. package/.next/standalone/.next/server/chunks/src_lib_status-manager_ts_003hlhy._.js +1 -13
  44. package/.next/standalone/.next/server/chunks/src_lib_workspace-store_ts_0vqt073._.js +1 -40
  45. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t9ru13._.js +1 -1
  46. package/.next/standalone/.next/server/chunks/ssr/{_0o8h1fd._.js → _0-kyl7i._.js} +2 -2
  47. package/.next/standalone/.next/server/chunks/ssr/_017c8be._.js +3 -0
  48. package/.next/standalone/.next/server/chunks/ssr/{_0c1yivm._.js → _070zc_o._.js} +2 -2
  49. package/.next/standalone/.next/server/chunks/ssr/_07jud1p._.js +1 -1
  50. package/.next/standalone/.next/server/chunks/ssr/_0_uqm-4._.js +3 -0
  51. package/.next/standalone/.next/server/chunks/ssr/{_0ftinmo._.js → _0ed.wmt._.js} +2 -2
  52. package/.next/standalone/.next/server/chunks/ssr/_0lpqhot._.js +3 -0
  53. package/.next/standalone/.next/server/chunks/ssr/_0pg-q18._.js +1 -1
  54. package/.next/standalone/.next/server/chunks/ssr/_0pp3e5j._.js +1 -1
  55. package/.next/standalone/.next/server/chunks/ssr/_0ttiybw._.js +18 -0
  56. package/.next/standalone/.next/server/chunks/ssr/_0w.1ts8._.js +1 -1
  57. package/.next/standalone/.next/server/chunks/ssr/_0w6jc9p._.js +1 -1
  58. package/.next/standalone/.next/server/chunks/ssr/_0xp3-y6._.js +3 -0
  59. package/.next/standalone/.next/server/chunks/ssr/{_11v_6.6._.js → _0y7o.rg._.js} +2 -2
  60. package/.next/standalone/.next/server/chunks/ssr/_0ytb_c0._.js +3 -0
  61. package/.next/standalone/.next/server/chunks/ssr/{_02jzd5g._.js → _13gee5r._.js} +2 -2
  62. package/.next/standalone/.next/server/chunks/ssr/messages_de_terminal_json_[json]_cjs_05jirtw._.js +1 -1
  63. package/.next/standalone/.next/server/chunks/ssr/messages_en_terminal_json_[json]_cjs_0~ls3g-._.js +1 -1
  64. package/.next/standalone/.next/server/chunks/ssr/messages_es_terminal_json_[json]_cjs_04g2b1_._.js +1 -1
  65. package/.next/standalone/.next/server/chunks/ssr/messages_fr_terminal_json_[json]_cjs_0uhakya._.js +1 -1
  66. package/.next/standalone/.next/server/chunks/ssr/messages_ja_terminal_json_[json]_cjs_0776z4f._.js +1 -1
  67. package/.next/standalone/.next/server/chunks/ssr/messages_ko_terminal_json_[json]_cjs_06611.3._.js +1 -1
  68. package/.next/standalone/.next/server/chunks/ssr/messages_pt-BR_terminal_json_[json]_cjs_034yyg9._.js +1 -1
  69. package/.next/standalone/.next/server/chunks/ssr/messages_ru_terminal_json_[json]_cjs_0emk8~n._.js +1 -1
  70. package/.next/standalone/.next/server/chunks/ssr/messages_tr_terminal_json_[json]_cjs_0xpix8g._.js +1 -1
  71. package/.next/standalone/.next/server/chunks/ssr/messages_zh-CN_terminal_json_[json]_cjs_12vwl8a._.js +1 -1
  72. package/.next/standalone/.next/server/chunks/ssr/messages_zh-TW_terminal_json_[json]_cjs_0spg5z5._.js +1 -1
  73. package/.next/standalone/.next/server/chunks/ssr/{src_components_0_aiven._.js → src_components_0_nzv1r._.js} +1 -1
  74. package/.next/standalone/.next/server/chunks/ssr/{src_components_0geizrr._.js → src_components_0bqqfju._.js} +1 -1
  75. package/.next/standalone/.next/server/chunks/ssr/{src_components_11_1i~k._.js → src_components_0rqxlj-._.js} +1 -1
  76. package/.next/standalone/.next/server/chunks/ssr/{src_components_12mrirb._.js → src_components_0s~.n3e._.js} +1 -1
  77. package/.next/standalone/.next/server/chunks/ssr/src_components_features_mobile_mobile-terminal-page_tsx_02chzch._.js +1 -1
  78. package/.next/standalone/.next/server/chunks/ssr/src_components_features_workspace_terminal-page_tsx_0wuq-jl._.js +1 -1
  79. package/.next/standalone/.next/server/chunks/ssr/src_lib_workspace-store_ts_00x-rec._.js +10 -0
  80. package/.next/standalone/.next/server/middleware-build-manifest.js +70 -70
  81. package/.next/standalone/.next/server/pages/_app/build-manifest.json +3 -3
  82. package/.next/standalone/.next/server/pages/_app/client-build-manifest.json +1 -1
  83. package/.next/standalone/.next/server/pages/api/auth/login.js +2 -2
  84. package/.next/standalone/.next/server/pages/api/auth/login.js.nft.json +1 -1
  85. package/.next/standalone/.next/server/pages/api/auth/preflight.js +2 -2
  86. package/.next/standalone/.next/server/pages/api/auth/preflight.js.nft.json +1 -1
  87. package/.next/standalone/.next/server/pages/api/auth/setup.js +2 -2
  88. package/.next/standalone/.next/server/pages/api/auth/setup.js.nft.json +1 -1
  89. package/.next/standalone/.next/server/pages/api/check-claude.js +5 -1
  90. package/.next/standalone/.next/server/pages/api/check-claude.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/browser/console.js +2 -2
  92. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/browser/console.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/browser/eval.js +2 -2
  94. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/browser/eval.js.nft.json +1 -1
  95. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/browser/network.js +2 -2
  96. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/browser/network.js.nft.json +1 -1
  97. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/browser/screenshot.js +2 -2
  98. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/browser/screenshot.js.nft.json +1 -1
  99. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/browser/url.js +2 -2
  100. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/browser/url.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/result.js +2 -2
  102. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/result.js.nft.json +1 -1
  103. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/send.js +2 -2
  104. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/send.js.nft.json +1 -1
  105. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/status.js +2 -2
  106. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId]/status.js.nft.json +1 -1
  107. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId].js +2 -2
  108. package/.next/standalone/.next/server/pages/api/cli/tabs/[tabId].js.nft.json +1 -1
  109. package/.next/standalone/.next/server/pages/api/cli/tabs.js +2 -2
  110. package/.next/standalone/.next/server/pages/api/cli/tabs.js.nft.json +1 -1
  111. package/.next/standalone/.next/server/pages/api/cli/workspaces.js +2 -2
  112. package/.next/standalone/.next/server/pages/api/cli/workspaces.js.nft.json +1 -1
  113. package/.next/standalone/.next/server/pages/api/config.js +2 -2
  114. package/.next/standalone/.next/server/pages/api/config.js.nft.json +1 -1
  115. package/.next/standalone/.next/server/pages/api/layout/diff.js +1 -1
  116. package/.next/standalone/.next/server/pages/api/layout/diff.js.nft.json +1 -1
  117. package/.next/standalone/.next/server/pages/api/layout/pane/[paneId]/tabs/[tabId]/move.js +2 -2
  118. package/.next/standalone/.next/server/pages/api/layout/pane/[paneId]/tabs/[tabId]/move.js.nft.json +1 -1
  119. package/.next/standalone/.next/server/pages/api/layout/pane/[paneId]/tabs/[tabId].js +5 -5
  120. package/.next/standalone/.next/server/pages/api/layout/pane/[paneId]/tabs/[tabId].js.nft.json +1 -1
  121. package/.next/standalone/.next/server/pages/api/layout/pane/[paneId]/tabs/order.js +2 -2
  122. package/.next/standalone/.next/server/pages/api/layout/pane/[paneId]/tabs/order.js.nft.json +1 -1
  123. package/.next/standalone/.next/server/pages/api/layout/pane/[paneId]/tabs.js +5 -5
  124. package/.next/standalone/.next/server/pages/api/layout/pane/[paneId]/tabs.js.nft.json +1 -1
  125. package/.next/standalone/.next/server/pages/api/layout/pane/[paneId].js +2 -2
  126. package/.next/standalone/.next/server/pages/api/layout/pane/[paneId].js.nft.json +1 -1
  127. package/.next/standalone/.next/server/pages/api/layout/pane.js +2 -2
  128. package/.next/standalone/.next/server/pages/api/layout/pane.js.nft.json +1 -1
  129. package/.next/standalone/.next/server/pages/api/layout.js +2 -2
  130. package/.next/standalone/.next/server/pages/api/layout.js.nft.json +1 -1
  131. package/.next/standalone/.next/server/pages/api/message-history.js +2 -2
  132. package/.next/standalone/.next/server/pages/api/message-history.js.nft.json +1 -1
  133. package/.next/standalone/.next/server/pages/api/preflight/runtime.js.nft.json +1 -1
  134. package/.next/standalone/.next/server/pages/api/stats/daily-report/cache.js.nft.json +1 -1
  135. package/.next/standalone/.next/server/pages/api/stats/daily-report/generate.js.nft.json +1 -1
  136. package/.next/standalone/.next/server/pages/api/stats/daily-report/list.js.nft.json +1 -1
  137. package/.next/standalone/.next/server/pages/api/stats/projects.js.nft.json +1 -1
  138. package/.next/standalone/.next/server/pages/api/stats/sessions.js.nft.json +1 -1
  139. package/.next/standalone/.next/server/pages/api/stats/uptime.js.nft.json +1 -1
  140. package/.next/standalone/.next/server/pages/api/status/hook.js +6 -6
  141. package/.next/standalone/.next/server/pages/api/status/hook.js.nft.json +1 -1
  142. package/.next/standalone/.next/server/pages/api/status/statusline.js +6 -6
  143. package/.next/standalone/.next/server/pages/api/status/statusline.js.nft.json +1 -1
  144. package/.next/standalone/.next/server/pages/api/timeline/sessions.js.nft.json +1 -1
  145. package/.next/standalone/.next/server/pages/api/tmux/permission-options.js +3 -2
  146. package/.next/standalone/.next/server/pages/api/tmux/permission-options.js.nft.json +1 -1
  147. package/.next/standalone/.next/server/pages/api/tmux/plan-options.js +3 -2
  148. package/.next/standalone/.next/server/pages/api/tmux/plan-options.js.nft.json +1 -1
  149. package/.next/standalone/.next/server/pages/api/tmux/recover-unknown.js +5 -5
  150. package/.next/standalone/.next/server/pages/api/tmux/recover-unknown.js.nft.json +1 -1
  151. package/.next/standalone/.next/server/pages/api/tmux/reset.js +5 -5
  152. package/.next/standalone/.next/server/pages/api/tmux/reset.js.nft.json +1 -1
  153. package/.next/standalone/.next/server/pages/api/workspace/[workspaceId].js +2 -2
  154. package/.next/standalone/.next/server/pages/api/workspace/[workspaceId].js.nft.json +1 -1
  155. package/.next/standalone/.next/server/pages/api/workspace/active.js +2 -2
  156. package/.next/standalone/.next/server/pages/api/workspace/active.js.nft.json +1 -1
  157. package/.next/standalone/.next/server/pages/api/workspace/group/[groupId].js +2 -2
  158. package/.next/standalone/.next/server/pages/api/workspace/group/[groupId].js.nft.json +1 -1
  159. package/.next/standalone/.next/server/pages/api/workspace/group/reorder.js +2 -2
  160. package/.next/standalone/.next/server/pages/api/workspace/group/reorder.js.nft.json +1 -1
  161. package/.next/standalone/.next/server/pages/api/workspace/group.js +2 -2
  162. package/.next/standalone/.next/server/pages/api/workspace/group.js.nft.json +1 -1
  163. package/.next/standalone/.next/server/pages/api/workspace/reorder.js +2 -2
  164. package/.next/standalone/.next/server/pages/api/workspace/reorder.js.nft.json +1 -1
  165. package/.next/standalone/.next/server/pages/api/workspace/validate.js +2 -2
  166. package/.next/standalone/.next/server/pages/api/workspace/validate.js.nft.json +1 -1
  167. package/.next/standalone/.next/server/pages/api/workspace.js +5 -5
  168. package/.next/standalone/.next/server/pages/api/workspace.js.nft.json +1 -1
  169. package/.next/standalone/.next/server/pages/de/404.html +1 -1
  170. package/.next/standalone/.next/server/pages/de/500.html +1 -1
  171. package/.next/standalone/.next/server/pages/en/404.html +1 -1
  172. package/.next/standalone/.next/server/pages/en/500.html +1 -1
  173. package/.next/standalone/.next/server/pages/es/404.html +1 -1
  174. package/.next/standalone/.next/server/pages/es/500.html +1 -1
  175. package/.next/standalone/.next/server/pages/fr/404.html +1 -1
  176. package/.next/standalone/.next/server/pages/fr/500.html +1 -1
  177. package/.next/standalone/.next/server/pages/index/build-manifest.json +15 -15
  178. package/.next/standalone/.next/server/pages/index/client-build-manifest.json +1 -1
  179. package/.next/standalone/.next/server/pages/index/react-loadable-manifest.json +6 -6
  180. package/.next/standalone/.next/server/pages/index.js +8 -8
  181. package/.next/standalone/.next/server/pages/index.js.nft.json +1 -1
  182. package/.next/standalone/.next/server/pages/ja/404.html +1 -1
  183. package/.next/standalone/.next/server/pages/ja/500.html +1 -1
  184. package/.next/standalone/.next/server/pages/ko/404.html +1 -1
  185. package/.next/standalone/.next/server/pages/ko/500.html +1 -1
  186. package/.next/standalone/.next/server/pages/login/build-manifest.json +6 -6
  187. package/.next/standalone/.next/server/pages/login/client-build-manifest.json +1 -1
  188. package/.next/standalone/.next/server/pages/login.js +4 -4
  189. package/.next/standalone/.next/server/pages/login.js.nft.json +1 -1
  190. package/.next/standalone/.next/server/pages/pt-BR/404.html +1 -1
  191. package/.next/standalone/.next/server/pages/pt-BR/500.html +1 -1
  192. package/.next/standalone/.next/server/pages/reports/build-manifest.json +14 -14
  193. package/.next/standalone/.next/server/pages/reports/client-build-manifest.json +1 -1
  194. package/.next/standalone/.next/server/pages/reports.js +9 -9
  195. package/.next/standalone/.next/server/pages/reports.js.nft.json +1 -1
  196. package/.next/standalone/.next/server/pages/reset.js.nft.json +1 -1
  197. package/.next/standalone/.next/server/pages/ru/404.html +1 -1
  198. package/.next/standalone/.next/server/pages/ru/500.html +1 -1
  199. package/.next/standalone/.next/server/pages/stats/build-manifest.json +12 -12
  200. package/.next/standalone/.next/server/pages/stats/client-build-manifest.json +1 -1
  201. package/.next/standalone/.next/server/pages/stats.js +9 -9
  202. package/.next/standalone/.next/server/pages/stats.js.nft.json +1 -1
  203. package/.next/standalone/.next/server/pages/tools-required/build-manifest.json +4 -4
  204. package/.next/standalone/.next/server/pages/tools-required/client-build-manifest.json +1 -1
  205. package/.next/standalone/.next/server/pages/tools-required.js +4 -4
  206. package/.next/standalone/.next/server/pages/tools-required.js.nft.json +1 -1
  207. package/.next/standalone/.next/server/pages/tr/404.html +1 -1
  208. package/.next/standalone/.next/server/pages/tr/500.html +1 -1
  209. package/.next/standalone/.next/server/pages/webview/build-manifest.json +13 -13
  210. package/.next/standalone/.next/server/pages/webview/client-build-manifest.json +1 -1
  211. package/.next/standalone/.next/server/pages/webview.js +6 -6
  212. package/.next/standalone/.next/server/pages/webview.js.nft.json +1 -1
  213. package/.next/standalone/.next/server/pages/zh-CN/404.html +1 -1
  214. package/.next/standalone/.next/server/pages/zh-CN/500.html +1 -1
  215. package/.next/standalone/.next/server/pages/zh-TW/404.html +1 -1
  216. package/.next/standalone/.next/server/pages/zh-TW/500.html +1 -1
  217. package/.next/standalone/.next/static/chunks/{11tnyk0iystp1.js → 0--r5y9cw3.0z.js} +1 -1
  218. package/.next/standalone/.next/static/chunks/{08.6.1cg_x8r-.js → 00gxls80r--_0.js} +6 -6
  219. package/.next/standalone/.next/static/chunks/{0w0qmu364g~xt.js → 01rmp.m_ls7z_.js} +1 -1
  220. package/.next/standalone/.next/static/chunks/{09lb6md956bhb.js → 0628quqp4ggh9.js} +1 -1
  221. package/.next/standalone/.next/static/chunks/{0zmym5gg0bnkg.js → 06ak74s111wx-.js} +1 -1
  222. package/.next/standalone/.next/static/chunks/{0g-71jn3elu8f.js → 08d6vee5l~1wn.js} +1 -1
  223. package/.next/standalone/.next/static/chunks/{16.twr9cx.kle.js → 09o2m0ingey8v.js} +1 -1
  224. package/.next/standalone/.next/static/chunks/{00s78xqkxglkv.js → 0a1xt.enr50l5.js} +1 -1
  225. package/.next/standalone/.next/static/chunks/{0p~_~afvrxx99.js → 0am7rh7xdv5lw.js} +3 -3
  226. package/.next/standalone/.next/static/chunks/{0thg_6bh34-xa.js → 0f3q6qhpk.i_r.js} +1 -1
  227. package/.next/standalone/.next/static/chunks/{0cmg_jvd.7c43.js → 0fsldybjx443~.js} +1 -1
  228. package/.next/standalone/.next/static/chunks/0gfhd.gsbt9qg.js +1 -0
  229. package/.next/standalone/.next/static/chunks/0ic.mcu6-9din.js +1 -0
  230. package/.next/standalone/.next/static/chunks/0k4b.~5c4nvtm.js +1 -0
  231. package/.next/standalone/.next/static/chunks/{0r69~xx12-zsq.js → 0lujhtd04orw5.js} +1 -1
  232. package/.next/standalone/.next/static/chunks/0qqsez8ir1.fs.js +1 -0
  233. package/.next/standalone/.next/static/chunks/{13j5zp717ie6d.js → 0rahh2v7~f4tj.js} +13 -13
  234. package/.next/standalone/.next/static/chunks/{0pxbg4s8a4y54.js → 0rb41e1r1urhx.js} +1 -1
  235. package/.next/standalone/.next/static/chunks/0uii4rziiew3_.js +1 -0
  236. package/.next/standalone/.next/static/chunks/0vtkq~yk_1~gv.js +1 -0
  237. package/.next/standalone/.next/static/chunks/0vx2hhzc46h_7.js +1 -0
  238. package/.next/standalone/.next/static/chunks/{13i76gpwz2k5a.js → 0x_.wshvak6zp.js} +1 -1
  239. package/.next/standalone/.next/static/chunks/0xpr6vw-p8oxk.js +1 -0
  240. package/.next/standalone/.next/static/chunks/{0s7sv9xe3e1c9.js → 0zn1jt__-t51p.js} +1 -1
  241. package/.next/standalone/.next/static/chunks/0zrhxc96zwjuv.js +1 -0
  242. package/.next/standalone/.next/static/chunks/0z~yy1lqrvp_a.js +1 -0
  243. package/.next/standalone/.next/static/chunks/0~cgr_3dpx0vl.js +1 -0
  244. package/.next/standalone/.next/static/chunks/{0b.a4_8picceu.js → 0~g0t2q6o3r-7.js} +4 -4
  245. package/.next/standalone/.next/static/chunks/0~vfb0ylk_9au.js +16 -0
  246. package/.next/standalone/.next/static/chunks/{0batq-3sj.qi1.js → 10uz6x-h~dv0..js} +14 -14
  247. package/.next/standalone/.next/static/chunks/{0q9y8zysz~put.js → 13q-ol3bkz8ft.js} +15 -15
  248. package/.next/standalone/.next/static/chunks/14if5vtky.3sn.js +1 -0
  249. package/.next/standalone/.next/static/chunks/15i_n03eg5uyp.js +1 -0
  250. package/.next/standalone/.next/static/chunks/1756nfyulu.9h.css +1 -0
  251. package/.next/standalone/.next/static/chunks/{0._2l5v1hwkfn.js → 17rh_.7tkk2m0.js} +12 -12
  252. package/.next/standalone/.next/static/chunks/{turbopack-0q6z-bk-atg2w.js → turbopack-02..gqxjw9fev.js} +1 -1
  253. package/.next/standalone/.next/static/chunks/{turbopack-06o7eaf8n1nth.js → turbopack-05luogg2yney~.js} +1 -1
  254. package/.next/standalone/.next/static/chunks/{turbopack-0vv2_r1br0hyc.js → turbopack-092b2t67-z3ds.js} +1 -1
  255. package/.next/standalone/.next/static/chunks/{turbopack-0sa282u154fdk.js → turbopack-0eue2xixdnbd..js} +1 -1
  256. package/.next/standalone/.next/static/chunks/{turbopack-0f2cool0ub~vp.js → turbopack-0i6l53-j6t6zg.js} +1 -1
  257. package/.next/standalone/.next/static/chunks/{turbopack-0-ooli-pimh-6.js → turbopack-0ser1ty-sh2jk.js} +1 -1
  258. package/.next/standalone/.next/static/chunks/{turbopack-0duv.5cir9jm5.js → turbopack-0zouy.~ram.7g.js} +1 -1
  259. package/.next/standalone/.next/static/{CjJlqsAWYyyu76AJtHaqt → onsm_2jNZvyggHqM9yibn}/_buildManifest.js +6 -6
  260. package/.next/standalone/messages/de/terminal.json +4 -0
  261. package/.next/standalone/messages/en/terminal.json +4 -0
  262. package/.next/standalone/messages/es/terminal.json +4 -0
  263. package/.next/standalone/messages/fr/terminal.json +4 -0
  264. package/.next/standalone/messages/ja/terminal.json +4 -0
  265. package/.next/standalone/messages/ko/terminal.json +4 -0
  266. package/.next/standalone/messages/pt-BR/terminal.json +4 -0
  267. package/.next/standalone/messages/ru/terminal.json +4 -0
  268. package/.next/standalone/messages/tr/terminal.json +4 -0
  269. package/.next/standalone/messages/zh-CN/terminal.json +4 -0
  270. package/.next/standalone/messages/zh-TW/terminal.json +4 -0
  271. package/.next/standalone/package.json +1 -1
  272. package/.next/standalone/server.js +1 -1
  273. package/.next/standalone/src/config/tmux.conf +17 -7
  274. package/.next/standalone/src/lib/providers/claude/index.ts +44 -0
  275. package/.next/standalone/src/pages/api/layout/pane/[paneId]/tabs/index.ts +13 -6
  276. package/README.de.md +1 -1
  277. package/README.es.md +1 -1
  278. package/README.fr.md +1 -1
  279. package/README.ja.md +1 -1
  280. package/README.ko.md +1 -1
  281. package/README.md +1 -1
  282. package/README.pt-BR.md +1 -1
  283. package/README.ru.md +1 -1
  284. package/README.tr.md +1 -1
  285. package/README.zh-CN.md +1 -1
  286. package/README.zh-TW.md +1 -1
  287. package/dist/server.js +970 -851
  288. package/package.json +1 -1
  289. package/src/config/tmux.conf +17 -7
  290. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01.~37j._.js +0 -3
  291. package/.next/standalone/.next/server/chunks/[root-of-the-server]__016s4a9._.js +0 -3
  292. package/.next/standalone/.next/server/chunks/[root-of-the-server]__03l15.f._.js +0 -3
  293. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05ij_ys._.js +0 -42
  294. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06h3gzy._.js +0 -3
  295. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0auutl5._.js +0 -5
  296. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d-inw8._.js +0 -3
  297. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0i-jyh3._.js +0 -3
  298. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l~_wd0._.js +0 -3
  299. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ovn6yp._.js +0 -3
  300. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0un_g-o._.js +0 -3
  301. package/.next/standalone/.next/server/chunks/[root-of-the-server]__12ksl6n._.js +0 -42
  302. package/.next/standalone/.next/server/chunks/_03-duro._.js +0 -3
  303. package/.next/standalone/.next/server/chunks/_07097f~._.js +0 -3
  304. package/.next/standalone/.next/server/chunks/_0z7d6.z._.js +0 -3
  305. package/.next/standalone/.next/server/chunks/src_lib_0p.xsqi._.js +0 -3
  306. package/.next/standalone/.next/server/chunks/ssr/_016o9_-._.js +0 -3
  307. package/.next/standalone/.next/server/chunks/ssr/_0a64og5._.js +0 -3
  308. package/.next/standalone/.next/server/chunks/ssr/_0ccg0_z._.js +0 -18
  309. package/.next/standalone/.next/server/chunks/ssr/_0fnzfs-._.js +0 -3
  310. package/.next/standalone/.next/server/chunks/ssr/_0hat6~g._.js +0 -3
  311. package/.next/standalone/.next/server/chunks/ssr/_0hp8_ck._.js +0 -3
  312. package/.next/standalone/.next/server/chunks/ssr/_0hq29bt._.js +0 -3
  313. package/.next/standalone/.next/static/chunks/02ncyh-v8g~cs.css +0 -1
  314. package/.next/standalone/.next/static/chunks/08d4u-qlylmde.js +0 -1
  315. package/.next/standalone/.next/static/chunks/08f708~_7uy_i.js +0 -1
  316. package/.next/standalone/.next/static/chunks/08ojbbzi2ergt.js +0 -16
  317. package/.next/standalone/.next/static/chunks/0cvx059r5hgj1.js +0 -1
  318. package/.next/standalone/.next/static/chunks/0gn-f6_m696k0.js +0 -1
  319. package/.next/standalone/.next/static/chunks/0u.snf3d~5nvq.js +0 -1
  320. package/.next/standalone/.next/static/chunks/0v.l~.~v98c2c.js +0 -1
  321. package/.next/standalone/.next/static/chunks/0wu~4k-l8otuy.js +0 -1
  322. package/.next/standalone/.next/static/chunks/0y441gn709g7u.js +0 -1
  323. package/.next/standalone/.next/static/chunks/0yb~gw6ukzdmo.js +0 -1
  324. package/.next/standalone/.next/static/chunks/0yg3hj1g~k1ip.js +0 -1
  325. package/.next/standalone/.next/static/chunks/0~c6h8j7ut2ca.js +0 -1
  326. package/.next/standalone/.next/static/chunks/15m4y6otktj8z.js +0 -1
  327. package/.next/standalone/.next/static/chunks/17ebdp-_o5o30.js +0 -1
  328. /package/.next/standalone/.next/static/{CjJlqsAWYyyu76AJtHaqt → onsm_2jNZvyggHqM9yibn}/_clientMiddlewareManifest.js +0 -0
  329. /package/.next/standalone/.next/static/{CjJlqsAWYyyu76AJtHaqt → onsm_2jNZvyggHqM9yibn}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- CjJlqsAWYyyu76AJtHaqt
1
+ onsm_2jNZvyggHqM9yibn
@@ -1,31 +1,31 @@
1
1
  {
2
2
  "pages": {
3
3
  "/": [
4
- "static/chunks/13i76gpwz2k5a.js",
5
- "static/chunks/0zmym5gg0bnkg.js",
4
+ "static/chunks/0x_.wshvak6zp.js",
5
+ "static/chunks/0f_7vuqno92ye.js",
6
6
  "static/chunks/109f1pvy3e_vd.js",
7
7
  "static/chunks/0.znxwgo-re2m.js",
8
- "static/chunks/0f_7vuqno92ye.js",
9
- "static/chunks/149sb_-h03mxq.js",
10
- "static/chunks/034_utxy1sujb.js",
11
- "static/chunks/15aj3kd.p7zw6.js",
8
+ "static/chunks/06ak74s111wx-.js",
12
9
  "static/chunks/0lrjdru2bjp.x.js",
10
+ "static/chunks/034_utxy1sujb.js",
11
+ "static/chunks/149sb_-h03mxq.js",
12
+ "static/chunks/14_wa..vd6~2y.js",
13
13
  "static/chunks/039-4cgt.dvjg.js",
14
14
  "static/chunks/0ea-k_kbq5gi1.js",
15
- "static/chunks/0t5w4x7owhfbe.js",
16
- "static/chunks/0c2_tqkbyti3h.js",
17
- "static/chunks/0t2val7bf4~s7.js",
18
- "static/chunks/14_wa..vd6~2y.js",
19
- "static/chunks/0cmg_jvd.7c43.js",
20
- "static/chunks/0ddh4qmi2awdq.js",
21
15
  "static/chunks/00yfl7agnve...js",
22
- "static/chunks/0mwkajcworx_-.js",
23
- "static/chunks/169ui~u~dpalg.js",
24
16
  "static/chunks/0szl_dovu0hgw.js",
25
- "static/chunks/turbopack-0f2cool0ub~vp.js"
17
+ "static/chunks/169ui~u~dpalg.js",
18
+ "static/chunks/15aj3kd.p7zw6.js",
19
+ "static/chunks/0t2val7bf4~s7.js",
20
+ "static/chunks/0ddh4qmi2awdq.js",
21
+ "static/chunks/0t5w4x7owhfbe.js",
22
+ "static/chunks/0f3q6qhpk.i_r.js",
23
+ "static/chunks/0c2_tqkbyti3h.js",
24
+ "static/chunks/0fsldybjx443~.js",
25
+ "static/chunks/turbopack-0eue2xixdnbd..js"
26
26
  ],
27
27
  "/_app": [
28
- "static/chunks/0w0qmu364g~xt.js",
28
+ "static/chunks/01rmp.m_ls7z_.js",
29
29
  "static/chunks/05o56eq7.f3q2.js",
30
30
  "static/chunks/034_utxy1sujb.js",
31
31
  "static/chunks/06zq-2isv5vn6.js",
@@ -33,9 +33,9 @@
33
33
  "static/chunks/14_wa..vd6~2y.js",
34
34
  "static/chunks/06vobum5720oa.js",
35
35
  "static/chunks/00yfl7agnve...js",
36
- "static/chunks/02ncyh-v8g~cs.css",
36
+ "static/chunks/1756nfyulu.9h.css",
37
37
  "static/chunks/107edt81z_gzy.css",
38
- "static/chunks/turbopack-0duv.5cir9jm5.js"
38
+ "static/chunks/turbopack-0zouy.~ram.7g.js"
39
39
  ],
40
40
  "/_error": [
41
41
  "static/chunks/0~o730huopa91.js",
@@ -49,40 +49,40 @@
49
49
  "static/chunks/14_wa..vd6~2y.js",
50
50
  "static/chunks/0oh5xnzizgxt1.js",
51
51
  "static/chunks/15aj3kd.p7zw6.js",
52
- "static/chunks/08ukqrup7vvqb.js",
53
52
  "static/chunks/140j4evqxtxmn.js",
54
- "static/chunks/00yfl7agnve...js",
53
+ "static/chunks/0ea-k_kbq5gi1.js",
55
54
  "static/chunks/038s7u_er9zkt.js",
56
- "static/chunks/0pxbg4s8a4y54.js",
55
+ "static/chunks/00yfl7agnve...js",
56
+ "static/chunks/0rb41e1r1urhx.js",
57
57
  "static/chunks/07yop4v9xcwb9.js",
58
- "static/chunks/0ea-k_kbq5gi1.js",
59
- "static/chunks/0g-71jn3elu8f.js",
60
- "static/chunks/turbopack-0vv2_r1br0hyc.js"
58
+ "static/chunks/08d6vee5l~1wn.js",
59
+ "static/chunks/08ukqrup7vvqb.js",
60
+ "static/chunks/turbopack-092b2t67-z3ds.js"
61
61
  ],
62
62
  "/reports": [
63
63
  "static/chunks/0bx27stclo8g5.js",
64
- "static/chunks/0zmym5gg0bnkg.js",
64
+ "static/chunks/0hv4~cszgs3im.js",
65
65
  "static/chunks/0kqxfunh4731g.js",
66
66
  "static/chunks/034_utxy1sujb.js",
67
- "static/chunks/0hv4~cszgs3im.js",
67
+ "static/chunks/06ak74s111wx-.js",
68
68
  "static/chunks/14_wa..vd6~2y.js",
69
- "static/chunks/00yfl7agnve...js",
70
- "static/chunks/15aj3kd.p7zw6.js",
69
+ "static/chunks/149sb_-h03mxq.js",
70
+ "static/chunks/0ddh4qmi2awdq.js",
71
71
  "static/chunks/0.znxwgo-re2m.js",
72
- "static/chunks/0thg_6bh34-xa.js",
72
+ "static/chunks/0mwkajcworx_-.js",
73
73
  "static/chunks/039-4cgt.dvjg.js",
74
- "static/chunks/0t5w4x7owhfbe.js",
74
+ "static/chunks/15aj3kd.p7zw6.js",
75
+ "static/chunks/0lujhtd04orw5.js",
75
76
  "static/chunks/0c2_tqkbyti3h.js",
76
- "static/chunks/0t2val7bf4~s7.js",
77
- "static/chunks/031unywm42_xs.js",
77
+ "static/chunks/0ea-k_kbq5gi1.js",
78
78
  "static/chunks/169ui~u~dpalg.js",
79
- "static/chunks/0ddh4qmi2awdq.js",
80
- "static/chunks/0r69~xx12-zsq.js",
81
- "static/chunks/0lrjdru2bjp.x.js",
82
79
  "static/chunks/0szl_dovu0hgw.js",
83
- "static/chunks/149sb_-h03mxq.js",
84
- "static/chunks/0ea-k_kbq5gi1.js",
85
- "static/chunks/turbopack-0q6z-bk-atg2w.js"
80
+ "static/chunks/0t2val7bf4~s7.js",
81
+ "static/chunks/0lrjdru2bjp.x.js",
82
+ "static/chunks/00yfl7agnve...js",
83
+ "static/chunks/0t5w4x7owhfbe.js",
84
+ "static/chunks/031unywm42_xs.js",
85
+ "static/chunks/turbopack-02..gqxjw9fev.js"
86
86
  ],
87
87
  "/reset": [
88
88
  "static/chunks/0_sdw~kzk-at0.js",
@@ -94,71 +94,71 @@
94
94
  ],
95
95
  "/stats": [
96
96
  "static/chunks/03t01d94eyxh2.js",
97
- "static/chunks/0zmym5gg0bnkg.js",
97
+ "static/chunks/10em078j6cul4.js",
98
98
  "static/chunks/0kqxfunh4731g.js",
99
99
  "static/chunks/0.znxwgo-re2m.js",
100
- "static/chunks/10em078j6cul4.js",
100
+ "static/chunks/06ak74s111wx-.js",
101
101
  "static/chunks/0t5w4x7owhfbe.js",
102
102
  "static/chunks/034_utxy1sujb.js",
103
- "static/chunks/14_wa..vd6~2y.js",
103
+ "static/chunks/149sb_-h03mxq.js",
104
104
  "static/chunks/0lrjdru2bjp.x.js",
105
105
  "static/chunks/039-4cgt.dvjg.js",
106
- "static/chunks/16.twr9cx.kle.js",
107
- "static/chunks/0szl_dovu0hgw.js",
108
- "static/chunks/0t2val7bf4~s7.js",
109
- "static/chunks/149sb_-h03mxq.js",
110
- "static/chunks/15aj3kd.p7zw6.js",
106
+ "static/chunks/0ea-k_kbq5gi1.js",
107
+ "static/chunks/0c2_tqkbyti3h.js",
111
108
  "static/chunks/169ui~u~dpalg.js",
109
+ "static/chunks/14_wa..vd6~2y.js",
110
+ "static/chunks/15aj3kd.p7zw6.js",
111
+ "static/chunks/0szl_dovu0hgw.js",
112
112
  "static/chunks/0ddh4qmi2awdq.js",
113
- "static/chunks/0c2_tqkbyti3h.js",
114
- "static/chunks/0thg_6bh34-xa.js",
115
- "static/chunks/0ea-k_kbq5gi1.js",
113
+ "static/chunks/09o2m0ingey8v.js",
114
+ "static/chunks/0a1xt.enr50l5.js",
115
+ "static/chunks/0t2val7bf4~s7.js",
116
116
  "static/chunks/00yfl7agnve...js",
117
- "static/chunks/turbopack-06o7eaf8n1nth.js"
117
+ "static/chunks/turbopack-0i6l53-j6t6zg.js"
118
118
  ],
119
119
  "/tools-required": [
120
120
  "static/chunks/0_7~rgbkmfo_p.js",
121
121
  "static/chunks/15aj3kd.p7zw6.js",
122
122
  "static/chunks/14_wa..vd6~2y.js",
123
- "static/chunks/0s7sv9xe3e1c9.js",
124
- "static/chunks/094_-.5.ue3p4.js",
125
- "static/chunks/0pxbg4s8a4y54.js",
123
+ "static/chunks/0zn1jt__-t51p.js",
126
124
  "static/chunks/00yfl7agnve...js",
125
+ "static/chunks/0rb41e1r1urhx.js",
127
126
  "static/chunks/0ea-k_kbq5gi1.js",
127
+ "static/chunks/094_-.5.ue3p4.js",
128
128
  "static/chunks/0dwxj97xm70gv.js",
129
- "static/chunks/turbopack-0-ooli-pimh-6.js"
129
+ "static/chunks/turbopack-0ser1ty-sh2jk.js"
130
130
  ],
131
131
  "/webview": [
132
132
  "static/chunks/0.4j~sc70rsrv.js",
133
- "static/chunks/0zmym5gg0bnkg.js",
134
- "static/chunks/0kqxfunh4731g.js",
135
- "static/chunks/0.znxwgo-re2m.js",
136
133
  "static/chunks/04hn532e1vcts.js",
137
- "static/chunks/15aj3kd.p7zw6.js",
138
134
  "static/chunks/034_utxy1sujb.js",
139
- "static/chunks/0ddh4qmi2awdq.js",
135
+ "static/chunks/0kqxfunh4731g.js",
136
+ "static/chunks/06ak74s111wx-.js",
137
+ "static/chunks/15aj3kd.p7zw6.js",
138
+ "static/chunks/14_wa..vd6~2y.js",
140
139
  "static/chunks/0lrjdru2bjp.x.js",
140
+ "static/chunks/0.znxwgo-re2m.js",
141
141
  "static/chunks/039-4cgt.dvjg.js",
142
- "static/chunks/169ui~u~dpalg.js",
143
142
  "static/chunks/0ea-k_kbq5gi1.js",
144
- "static/chunks/0szl_dovu0hgw.js",
145
- "static/chunks/0cmg_jvd.7c43.js",
146
- "static/chunks/14_wa..vd6~2y.js",
147
143
  "static/chunks/0t2val7bf4~s7.js",
144
+ "static/chunks/149sb_-h03mxq.js",
145
+ "static/chunks/0fsldybjx443~.js",
146
+ "static/chunks/00yfl7agnve...js",
148
147
  "static/chunks/0t5w4x7owhfbe.js",
148
+ "static/chunks/0ddh4qmi2awdq.js",
149
149
  "static/chunks/0c2_tqkbyti3h.js",
150
- "static/chunks/00s78xqkxglkv.js",
151
- "static/chunks/00yfl7agnve...js",
152
- "static/chunks/149sb_-h03mxq.js",
153
- "static/chunks/turbopack-0sa282u154fdk.js"
150
+ "static/chunks/0mwkajcworx_-.js",
151
+ "static/chunks/169ui~u~dpalg.js",
152
+ "static/chunks/0szl_dovu0hgw.js",
153
+ "static/chunks/turbopack-05luogg2yney~.js"
154
154
  ]
155
155
  },
156
156
  "devFiles": [],
157
157
  "polyfillFiles": [],
158
158
  "lowPriorityFiles": [
159
- "static/CjJlqsAWYyyu76AJtHaqt/_buildManifest.js",
160
- "static/CjJlqsAWYyyu76AJtHaqt/_ssgManifest.js",
161
- "static/CjJlqsAWYyyu76AJtHaqt/_clientMiddlewareManifest.js"
159
+ "static/onsm_2jNZvyggHqM9yibn/_buildManifest.js",
160
+ "static/onsm_2jNZvyggHqM9yibn/_ssgManifest.js",
161
+ "static/onsm_2jNZvyggHqM9yibn/_clientMiddlewareManifest.js"
162
162
  ],
163
163
  "rootMainFiles": []
164
164
  }
@@ -3,9 +3,9 @@
3
3
  "routes": {},
4
4
  "dynamicRoutes": {},
5
5
  "preview": {
6
- "previewModeId": "1cb7bc29aa094cc7e1e6b874102986d1",
7
- "previewModeSigningKey": "5382af3717e346ae8c18e3e2b5956aa1c8b4ee20b6e084ffe2b1bd6b16c04483",
8
- "previewModeEncryptionKey": "4f84efe1c20b53bb62b913deb45ca91e32879513fcf559f493b625c4c05d6cc6"
6
+ "previewModeId": "741c0a26aab6033665a3c123e74f462b",
7
+ "previewModeSigningKey": "83afd39c7311dc230615300d7f5e502382d15a98fc1a75a2fd546709f317e9ec",
8
+ "previewModeEncryptionKey": "e32629a7b67399793058d781822e363c8f08e16452d8128f6a33f9cb76696ea4"
9
9
  },
10
10
  "notFoundRoutes": []
11
11
  }
@@ -2,7 +2,7 @@
2
2
  "version": 1,
3
3
  "config": {
4
4
  "env": {
5
- "NEXT_PUBLIC_COMMIT_HASH": "6bfad72"
5
+ "NEXT_PUBLIC_COMMIT_HASH": "bbf52c6"
6
6
  },
7
7
  "webpack": null,
8
8
  "typescript": {
@@ -596,31 +596,31 @@
596
596
  "dataRoutes": [
597
597
  {
598
598
  "page": "/",
599
- "dataRouteRegex": "^/_next/data/CjJlqsAWYyyu76AJtHaqt/index\\.json$"
599
+ "dataRouteRegex": "^/_next/data/onsm_2jNZvyggHqM9yibn/index\\.json$"
600
600
  },
601
601
  {
602
602
  "page": "/login",
603
- "dataRouteRegex": "^/_next/data/CjJlqsAWYyyu76AJtHaqt/login\\.json$"
603
+ "dataRouteRegex": "^/_next/data/onsm_2jNZvyggHqM9yibn/login\\.json$"
604
604
  },
605
605
  {
606
606
  "page": "/reports",
607
- "dataRouteRegex": "^/_next/data/CjJlqsAWYyyu76AJtHaqt/reports\\.json$"
607
+ "dataRouteRegex": "^/_next/data/onsm_2jNZvyggHqM9yibn/reports\\.json$"
608
608
  },
609
609
  {
610
610
  "page": "/reset",
611
- "dataRouteRegex": "^/_next/data/CjJlqsAWYyyu76AJtHaqt/reset\\.json$"
611
+ "dataRouteRegex": "^/_next/data/onsm_2jNZvyggHqM9yibn/reset\\.json$"
612
612
  },
613
613
  {
614
614
  "page": "/stats",
615
- "dataRouteRegex": "^/_next/data/CjJlqsAWYyyu76AJtHaqt/stats\\.json$"
615
+ "dataRouteRegex": "^/_next/data/onsm_2jNZvyggHqM9yibn/stats\\.json$"
616
616
  },
617
617
  {
618
618
  "page": "/tools-required",
619
- "dataRouteRegex": "^/_next/data/CjJlqsAWYyyu76AJtHaqt/tools-required\\.json$"
619
+ "dataRouteRegex": "^/_next/data/onsm_2jNZvyggHqM9yibn/tools-required\\.json$"
620
620
  },
621
621
  {
622
622
  "page": "/webview",
623
- "dataRouteRegex": "^/_next/data/CjJlqsAWYyyu76AJtHaqt/webview\\.json$"
623
+ "dataRouteRegex": "^/_next/data/onsm_2jNZvyggHqM9yibn/webview\\.json$"
624
624
  }
625
625
  ],
626
626
  "i18n": {
@@ -0,0 +1,3 @@
1
+ module.exports=[688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},406461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},524836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},921517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},504446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},755004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},792509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},500874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},130146,(e,t,r)=>{t.exports=e.x("pino-28069d5257187539",()=>require("pino-28069d5257187539"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},597789,965898,e=>{"use strict";let t=process.env.__PMUX_PRISTINE_ENV,r=Object.freeze(t?JSON.parse(t):{...process.env});t||(process.env.__PMUX_PRISTINE_ENV=JSON.stringify(r)),e.s(["PRISTINE_ENV",0,r],965898);let a=new Set(["HOME","USER","LOGNAME","SHELL","PATH","TERM","COLORTERM","LANG","TMPDIR","SSH_AUTH_SOCK","SSH_CONNECTION","SSH_TTY","DISPLAY","WAYLAND_DISPLAY","XDG_RUNTIME_DIR","TZ"]),s=["LC_"],n=e=>a.has(e)||s.some(t=>e.startsWith(t)),i={TERM:"xterm-256color",COLORTERM:"truecolor"},l=()=>{let e={};for(let[t,a]of Object.entries(r))void 0!==a&&n(t)&&(e[t]=a);return{...e,...i}},o=e=>`'${e.replace(/'/g,"'\\''")}'`,u=()=>r.SHELL||"/bin/bash";e.s(["buildShellEnv",0,()=>l(),"buildShellLaunchCommand",0,()=>{let e=Object.entries(l()).map(([e,t])=>`${e}=${o(t)}`).join(" ");return`env -i TMUX="$TMUX" TMUX_PANE="$TMUX_PANE" ${e} ${o(u())} -l`},"defaultShell",0,u],597789)},25146,e=>{"use strict";var t=e.i(130146),r=e.i(814747),a=e.i(446786);let s=r.default.join(a.default.homedir(),".purplemux","logs"),n=process.env.LOG_LEVEL||"info",i=(e=>{if(!e)return{};let t={};for(let r of e.split(",")){let[e,a]=r.split("=").map(e=>e.trim());e&&a&&(t[e]=a)}return t})(process.env.LOG_LEVELS),l=["trace","debug","info","warn","error","fatal"],o=globalThis;if(!o.__ptRootLogger){let e=[n,...Object.values(i)].reduce((e,t)=>l.indexOf(t)<l.indexOf(e)?t:e,"fatal");o.__ptRootLogger=(0,t.default)({level:e,transport:{targets:[{target:"pino-roll",level:e,options:{file:r.default.join(s,"purplemux"),frequency:"daily",dateFormat:"yyyy-MM-dd",limit:{count:7},mkdir:!0}},{target:"pino-pretty",level:e,options:{colorize:!0,ignore:"pid,hostname,module",translateTime:"HH:MM:ss",messageFormat:"[{module}] {msg}"}}]}})}let u=o.__ptRootLogger;e.s(["createLogger",0,e=>{let t=u.child({module:e});return t.level=i[e]??n,t}])},44014,e=>{"use strict";let t,r;var a=e.i(666680);e.s(["nanoid",0,function(e=21){var s;s=e|=0,!t||t.length<s?(t=Buffer.allocUnsafe(128*s),a.webcrypto.getRandomValues(t),r=0):r+s>t.length&&(a.webcrypto.getRandomValues(t),r=0),r+=s;let n="";for(let a=r-e;a<r;a++)n+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&t[a]];return n}],44014)},459015,544538,e=>{"use strict";var t=e.i(233405),r=e.i(924868),a=e.i(224361),s=e.i(814747),n=e.i(44014),i=e.i(965898),l=e.i(597789),o=e.i(25146);process.platform;let u="linux"===process.platform;e.s(["isLinux",0,u],544538);let p=(0,o.createLogger)("terminal"),c=(0,a.promisify)(t.execFile),d="purple",m=s.default.join(process.env.__PMUX_APP_DIR_UNPACKED||process.env.__PMUX_APP_DIR||process.cwd(),"src","config","tmux.conf"),f=async()=>{try{let{stdout:e}=await c("tmux",["-L",d,"ls","-F","#{session_name}"],{timeout:5e3});return e.trim().split("\n").map(e=>e.trim()).filter(e=>e.startsWith("pt-"))}catch{return[]}},h=async(e,t,r,a)=>{let s=(0,l.buildShellLaunchCommand)();await c("tmux",["-u","-L",d,"-f",m,"new-session","-d","-s",e,"-x",String(t),"-y",String(r),s],{timeout:5e3,cwd:a||i.PRISTINE_ENV.HOME||"/"}),await E(),p.debug(`tmux session created: ${e} (cols: ${t}, rows: ${r})`)},w=e=>new Promise(t=>setTimeout(t,e)),y=async e=>{if(!await g(e))return;p.debug(`killSession start: ${e}`);let t=await P(e);if(t)try{p.debug(`SIGTERM → process group ${t}: ${e}`),process.kill(-t,"SIGTERM")}catch{}try{await c("tmux",["-L",d,"kill-session","-t",e],{timeout:5e3})}catch{}for(let t=0;t<5;t++){if(!await g(e))return void p.debug(`killSession done (SIGTERM): ${e}`);await w(200)}if(p.warn(`session survived SIGTERM, escalating to SIGKILL: ${e}`),t)try{p.debug(`SIGKILL → process group ${t}: ${e}`),process.kill(-t,"SIGKILL")}catch{}try{await c("tmux",["-L",d,"kill-session","-t",e],{timeout:5e3})}catch{}for(let t=0;t<3;t++){if(!await g(e))return void p.debug(`killSession done (SIGKILL): ${e}`);await w(200)}p.warn(`tmux session still alive after kill: ${e}`)},x=async e=>{let t=i.PRISTINE_ENV.HOME||"/";if(!e)return t;let a=e;for(;;){try{if((await r.default.stat(a)).isDirectory())return a}catch{}let e=s.default.dirname(a);if(e===a)return t;a=e}},g=async e=>{try{return await c("tmux",["-L",d,"has-session","-t",e],{timeout:5e3}),!0}catch{return!1}},_=async()=>{},S=async()=>{await _();let e=await f();e.length>0&&e.forEach(e=>{p.debug(`existing tmux session found: ${e}`)})},v=async e=>{if(u)try{return await r.default.readlink(`/proc/${e}/cwd`)}catch{return null}try{let{stdout:t}=await c("lsof",["-a","-p",String(e),"-d","cwd","-Fn"],{timeout:5e3}),r=t.split("\n").find(e=>e.startsWith("n/"));return r?r.slice(1):null}catch{return null}},L=async e=>{let t=await P(e);if(t){let e=await v(t);if(e)return e}try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_current_path}"],{timeout:5e3});return t.trim()||null}catch{return null}},P=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_pid}"],{timeout:5e3}),r=parseInt(t.trim(),10);return Number.isNaN(r)?null:r}catch{return null}},E=async()=>{try{await c("tmux",["-L",d,"source-file",m],{timeout:5e3})}catch{}},N=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"list-panes","-t",e,"-F","#{pane_current_command}"],{timeout:5e3});return t.trim()||null}catch{return null}},b=async()=>{try{let{stdout:e}=await c("tmux",["-L",d,"list-panes","-a","-F","#{session_name} #{pane_current_command} #{pane_current_path} #{pane_pid} #{window_activity}"],{timeout:5e3}),t=new Map;for(let r of e.trim().split("\n")){if(!r)continue;let[e,a,s,n,i]=r.split(" ");if(e&&a){let r=parseInt(n,10),l=parseInt(i,10);t.set(e,{command:a,path:s||"",pid:Number.isNaN(r)?0:r,windowActivity:Number.isNaN(l)?0:l})}}return t}catch{return new Map}},I=new Set(["bash","zsh","fish","sh","dash"]),T=async e=>{let t=await N(e);return t?{isSafe:I.has(t),processName:t}:{isSafe:!1,processName:"unknown"}},R=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_title}"],{timeout:5e3});return t.trim()||null}catch{return null}},$=async e=>{await c("tmux",["-L",d,"copy-mode","-q","-t",e],{timeout:5e3}).catch(()=>{})},M=async(e,t)=>{await $(e),await c("tmux",["-L",d,"send-keys","-t",e,t,"Enter"],{timeout:5e3})},q=async(e,t)=>{await $(e),await c("tmux",["-L",d,"send-keys","-t",e,t],{timeout:5e3})},k=async(e,t)=>{await $(e),await c("tmux",["-L",d,"send-keys","-t",e,"-l",`\x1b[200~${t}\x1b[201~`],{timeout:5e3}),await c("tmux",["-L",d,"send-keys","-t",e,"Enter"],{timeout:5e3}),await new Promise(e=>setTimeout(e,600)),await c("tmux",["-L",d,"send-keys","-t",e,"Enter"],{timeout:5e3})},C=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_current_path} #{pane_current_command} #{pane_pid} #{pane_width} #{pane_height} #{session_created}"],{timeout:5e3}),[r,a,s,n,i,l]=t.trim().split(" ");return{cwd:r||null,command:a||null,pid:s&&parseInt(s,10)||null,width:n&&parseInt(n,10)||null,height:i&&parseInt(i,10)||null,sessionCreated:l&&parseInt(l,10)||null}}catch{return{cwd:null,command:null,pid:null,width:null,height:null,sessionCreated:null}}},A=new Set(["node","python","python3","ruby","perl","deno","bun"]),j=async()=>{try{await c("tmux",["-L",d,"kill-server"],{timeout:5e3}),p.debug("tmux server killed")}catch{}},O=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"capture-pane","-p","-t",e],{timeout:5e3});return t}catch{return null}},D=async(e,t)=>{try{let{stdout:r}=await c("tmux",["-L",d,"capture-pane","-p","-S",`-${t}`,"-t",e],{timeout:5e3});return r}catch{return null}},H=async e=>{if(u){let t=[];return await Promise.all(e.map(async e=>{try{for(let a of(await r.default.readFile(`/proc/${e}/task/${e}/children`,"utf-8")).trim().split(/\s+/)){let e=parseInt(a,10);Number.isNaN(e)||t.push(e)}}catch{}})),t}try{let{stdout:t}=await c("pgrep",["-P",e.join(",")],{timeout:5e3});return t.trim().split("\n").map(e=>parseInt(e,10)).filter(e=>!Number.isNaN(e))}catch{return[]}},U=async e=>{let t=[],r=[e];for(;r.length>0;){let e=await H(r);if(0===e.length)break;t.push(...e),r=e}return t},G=async e=>{try{let t=new Set(e),{stdout:r}=await c("ss",["-tlnp"],{timeout:5e3}),a=new Set;for(let e of r.split("\n")){let r=e.match(/pid=(\d+)/g);if(!r||!r.some(e=>t.has(parseInt(e.replace("pid=",""),10))))continue;let s=e.match(/:(\d+)\s/);s&&a.add(parseInt(s[1],10))}return[...a].sort((e,t)=>e-t)}catch{return[]}},W=async e=>{let t=await U(e);if(0===t.length)return[];if(u)return G(t);try{let{stdout:e}=await c("lsof",["-a","-p",t.join(","),"-i","-sTCP:LISTEN","-P","-Fn"],{timeout:5e3}),r=new Set;for(let t of e.split("\n"))if(t.startsWith("n")){let e=t.match(/:(\d+)$/);e&&r.add(parseInt(e[1],10))}return[...r].sort((e,t)=>e-t)}catch{return[]}},K=async e=>{let t=await P(e);if(!t)return null;try{let{stdout:e}=await c("pgrep",["-n","-P",String(t)],{timeout:5e3}),r=e.trim();if(!r)return null;let{stdout:a}=await c("ps",["-o","args=","-p",r],{timeout:5e3}),n=a.trim();if(!n)return null;let i=n.split(/\s+/);if(0===i.length)return n;if(i[0]=s.default.basename(i[0]),A.has(i[0])&&i.length>1){let e=s.default.basename(i[1]).replace(/\.(c|m)?js$/,"");i.splice(0,2,e)}return i.join(" ")}catch{return null}};e.s(["SAFE_SHELLS",0,I,"applyConfig",0,E,"capturePaneContent",0,O,"capturePaneContentWithHistory",0,D,"checkTerminalProcess",0,T,"createSession",0,h,"defaultSessionName",0,()=>`pt-${(0,n.nanoid)(6)}-${(0,n.nanoid)(6)}-${(0,n.nanoid)(6)}`,"exitCopyMode",0,$,"getAllPanesInfo",0,b,"getLastCommand",0,K,"getListeningPorts",0,W,"getPaneCurrentCommand",0,N,"getPaneDetailInfo",0,C,"getPaneTitle",0,R,"getSessionCwd",0,L,"getSessionPanePid",0,P,"hasSession",0,g,"killServer",0,j,"killSession",0,y,"listSessions",0,f,"resolveExistingDir",0,x,"scanSessions",0,S,"sendBracketedPaste",0,k,"sendKeys",0,M,"sendRawKeys",0,q,"workspaceSessionName",0,(e,t,r)=>`pt-${e}-${t}-${r}`],459015)},175609,(e,t,r)=>{t.exports=e.x("node-pty-592e8dc6192cfd06",()=>require("node-pty-592e8dc6192cfd06"))},971780,e=>{"use strict";var t=e.i(459015);e.i(478319),e.i(220951),e.i(175609),e.i(597789),e.i(965898),new TextEncoder,new TextDecoder,e.i(825265),(0,e.i(25146).createLogger)("terminal"),new TextDecoder;let r=globalThis,a=r.__purplemux_terminal_connections??=new Map;r.__purplemux_terminal_output_ts??=new Map;let s=(e,t,r)=>{for(let s of a.values())if(s.sessionName===e&&!s.cleaned)return void s.pty.resize(t,r)},n=e=>new Promise(t=>setTimeout(t,e)),i=async(e,r,i)=>{let l=(e=>{for(let t of a.values())if(t.sessionName===e&&!t.cleaned)return{cols:t.currentCols,rows:t.currentRows};return null})(e);if(l&&l.cols>50)return(0,t.capturePaneContentWithHistory)(e,50);let o=(e=>{for(let t of a.values())if(t.sessionName===e&&!t.cleaned){if(t.capturePaused)return null;return t.capturePaused=!0,{cols:t.currentCols,rows:t.currentRows}}return null})(e);if(!o)return(0,t.capturePaneContent)(e);try{s(e,r,i),await n(300);let a=await (0,t.capturePaneContent)(e);return s(e,o.cols,o.rows),await n(300),a}finally{(e=>{for(let t of a.values())if(t.sessionName===e&&!t.cleaned){if(!t.capturePaused)return;t.capturePaused=!1;return}})(e)}};e.s(["capturePaneAtWidth",0,i],971780)},8372,e=>{"use strict";var t=e.i(926747),r=e.i(190406),a=e.i(244898),s=e.i(262950),n=e.i(459015),i=e.i(971780);let l=(0,e.i(25146).createLogger)("tmux"),o=/^\s*(?:[❯›>]\s+)?(?:\d+\.\s+)?(.+)$/,u=["Yes,","Yes ","No,","No ","Tell Claude"],p=e=>/^\s+\S/.test(e)||/^\s*[❯›>]/.test(e),c=async(e,t)=>{if("GET"!==e.method)return t.setHeader("Allow","GET"),t.status(405).json({error:"Method not allowed"});let r=e.query.session;if(!r)return t.status(400).json({error:"session parameter required"});if(!await (0,n.hasSession)(r))return t.status(404).json({error:"Session not found"});try{let e=await (0,i.capturePaneAtWidth)(r,120,50);if(!e)return t.status(200).json({options:[]});let a=(e=>{let t=e.split("\n"),r=[],a=!1;for(let e of t){if(!e.trim()||!p(e)){if(a)break;continue}let t=e.match(o);if(!t)continue;let s=t[1].trim();if(a)if(u.some(e=>s.startsWith(e)))r.push(s);else break;else u.some(e=>s.startsWith(e))&&(r.push(s),a=!0)}return r})(e);return t.status(200).json({options:a})}catch(e){return l.error(`plan-options query failed: ${e instanceof Error?e.message:e}`),t.status(500).json({error:"Terminal capture failed"})}};e.s(["default",0,c],875757);var d=e.i(875757),m=e.i(7031),f=e.i(181927),h=e.i(846432);let w=(0,s.hoist)(d,"default"),y=(0,s.hoist)(d,"config"),x=new a.PagesAPIRouteModule({definition:{kind:r.RouteKind.PAGES_API,page:"/api/tmux/plan-options",pathname:"/api/tmux/plan-options",bundlePath:"",filename:""},userland:d,distDir:".next",relativeProjectDir:""});async function g(e,r,a){a.requestMeta&&(0,h.setRequestMeta)(e,a.requestMeta),x.isDev&&(0,h.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let s="/api/tmux/plan-options";s=s.replace(/\/index$/,"")||"/";let n=await x.prepare(e,r,{srcPage:s});if(!n){r.statusCode=400,r.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve());return}let{query:i,params:l,prerenderManifest:o,routerServerContext:u}=n;try{let t,a=e.method||"GET",n=(0,m.getTracer)(),p=n.getActiveScopeSpan(),c=!!(null==u?void 0:u.isWrappedByNextServer),d=x.instrumentationOnRequestError.bind(x),h=async p=>x.render(e,r,{query:{...i,...l},params:l,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:o.preview,propagateError:!1,dev:x.isDev,page:"/api/tmux/plan-options",internalRevalidate:null==u?void 0:u.revalidate,onError:(...t)=>d(e,...t)}).finally(()=>{if(!p)return;p.setAttributes({"http.status_code":r.statusCode,"next.rsc":!1});let e=n.getRootSpanAttributes();if(!e)return;if(e.get("next.span_type")!==f.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${e.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let i=e.get("next.route");if(i){let e=`${a} ${i}`;p.setAttributes({"next.route":i,"http.route":i,"next.span_name":e}),p.updateName(e),t&&t!==p&&(t.setAttribute("http.route",i),t.updateName(e))}else p.updateName(`${a} ${s}`)});c&&p?await h(p):(t=n.getActiveScopeSpan(),await n.withPropagatedContext(e.headers,()=>n.trace(f.BaseServerSpan.handleRequest,{spanName:`${a} ${s}`,kind:m.SpanKind.SERVER,attributes:{"http.method":a,"http.target":e.url}},h),void 0,!c))}catch(e){if(x.isDev)throw e;(0,t.sendError)(r,500,"Internal Server Error")}finally{null==a.waitUntil||a.waitUntil.call(a,Promise.resolve())}}e.s(["config",0,y,"default",0,w,"handler",0,g],8372)},981532,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_0ojl2hg._.js"].map(t=>e.l(t))).then(()=>t(322429)))},322522,e=>{e.v(e=>Promise.resolve().then(()=>e(459015)))},245061,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_tab-title_ts_0onatvs._.js"].map(t=>e.l(t))).then(()=>t(785128)))}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0-qfa-x._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},406461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},524836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},921517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},504446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},755004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},792509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},500874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},130146,(e,t,r)=>{t.exports=e.x("pino-28069d5257187539",()=>require("pino-28069d5257187539"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},597789,965898,e=>{"use strict";let t=process.env.__PMUX_PRISTINE_ENV,r=Object.freeze(t?JSON.parse(t):{...process.env});t||(process.env.__PMUX_PRISTINE_ENV=JSON.stringify(r)),e.s(["PRISTINE_ENV",0,r],965898);let a=new Set(["HOME","USER","LOGNAME","SHELL","PATH","TERM","COLORTERM","LANG","TMPDIR","SSH_AUTH_SOCK","SSH_CONNECTION","SSH_TTY","DISPLAY","WAYLAND_DISPLAY","XDG_RUNTIME_DIR","TZ"]),s=["LC_"],i=e=>a.has(e)||s.some(t=>e.startsWith(t)),n={TERM:"xterm-256color",COLORTERM:"truecolor"},l=()=>{let e={};for(let[t,a]of Object.entries(r))void 0!==a&&i(t)&&(e[t]=a);return{...e,...n}},o=e=>`'${e.replace(/'/g,"'\\''")}'`,u=()=>r.SHELL||"/bin/bash";e.s(["buildShellEnv",0,()=>l(),"buildShellLaunchCommand",0,()=>{let e=Object.entries(l()).map(([e,t])=>`${e}=${o(t)}`).join(" ");return`env -i TMUX="$TMUX" TMUX_PANE="$TMUX_PANE" ${e} ${o(u())} -l`},"defaultShell",0,u],597789)},25146,e=>{"use strict";var t=e.i(130146),r=e.i(814747),a=e.i(446786);let s=r.default.join(a.default.homedir(),".purplemux","logs"),i=process.env.LOG_LEVEL||"info",n=(e=>{if(!e)return{};let t={};for(let r of e.split(",")){let[e,a]=r.split("=").map(e=>e.trim());e&&a&&(t[e]=a)}return t})(process.env.LOG_LEVELS),l=["trace","debug","info","warn","error","fatal"],o=globalThis;if(!o.__ptRootLogger){let e=[i,...Object.values(n)].reduce((e,t)=>l.indexOf(t)<l.indexOf(e)?t:e,"fatal");o.__ptRootLogger=(0,t.default)({level:e,transport:{targets:[{target:"pino-roll",level:e,options:{file:r.default.join(s,"purplemux"),frequency:"daily",dateFormat:"yyyy-MM-dd",limit:{count:7},mkdir:!0}},{target:"pino-pretty",level:e,options:{colorize:!0,ignore:"pid,hostname,module",translateTime:"HH:MM:ss",messageFormat:"[{module}] {msg}"}}]}})}let u=o.__ptRootLogger;e.s(["createLogger",0,e=>{let t=u.child({module:e});return t.level=n[e]??i,t}])},44014,e=>{"use strict";let t,r;var a=e.i(666680);e.s(["nanoid",0,function(e=21){var s;s=e|=0,!t||t.length<s?(t=Buffer.allocUnsafe(128*s),a.webcrypto.getRandomValues(t),r=0):r+s>t.length&&(a.webcrypto.getRandomValues(t),r=0),r+=s;let i="";for(let a=r-e;a<r;a++)i+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&t[a]];return i}],44014)},459015,544538,e=>{"use strict";var t=e.i(233405),r=e.i(924868),a=e.i(224361),s=e.i(814747),i=e.i(44014),n=e.i(965898),l=e.i(597789),o=e.i(25146);process.platform;let u="linux"===process.platform;e.s(["isLinux",0,u],544538);let c=(0,o.createLogger)("terminal"),p=(0,a.promisify)(t.execFile),d="purple",m=s.default.join(process.env.__PMUX_APP_DIR_UNPACKED||process.env.__PMUX_APP_DIR||process.cwd(),"src","config","tmux.conf"),h=async()=>{try{let{stdout:e}=await p("tmux",["-L",d,"ls","-F","#{session_name}"],{timeout:5e3});return e.trim().split("\n").map(e=>e.trim()).filter(e=>e.startsWith("pt-"))}catch{return[]}},f=async(e,t,r,a)=>{let s=(0,l.buildShellLaunchCommand)();await p("tmux",["-u","-L",d,"-f",m,"new-session","-d","-s",e,"-x",String(t),"-y",String(r),s],{timeout:5e3,cwd:a||n.PRISTINE_ENV.HOME||"/"}),await P(),c.debug(`tmux session created: ${e} (cols: ${t}, rows: ${r})`)},y=e=>new Promise(t=>setTimeout(t,e)),w=async e=>{if(!await x(e))return;c.debug(`killSession start: ${e}`);let t=await E(e);if(t)try{c.debug(`SIGTERM → process group ${t}: ${e}`),process.kill(-t,"SIGTERM")}catch{}try{await p("tmux",["-L",d,"kill-session","-t",e],{timeout:5e3})}catch{}for(let t=0;t<5;t++){if(!await x(e))return void c.debug(`killSession done (SIGTERM): ${e}`);await y(200)}if(c.warn(`session survived SIGTERM, escalating to SIGKILL: ${e}`),t)try{c.debug(`SIGKILL → process group ${t}: ${e}`),process.kill(-t,"SIGKILL")}catch{}try{await p("tmux",["-L",d,"kill-session","-t",e],{timeout:5e3})}catch{}for(let t=0;t<3;t++){if(!await x(e))return void c.debug(`killSession done (SIGKILL): ${e}`);await y(200)}c.warn(`tmux session still alive after kill: ${e}`)},g=async e=>{let t=n.PRISTINE_ENV.HOME||"/";if(!e)return t;let a=e;for(;;){try{if((await r.default.stat(a)).isDirectory())return a}catch{}let e=s.default.dirname(a);if(e===a)return t;a=e}},x=async e=>{try{return await p("tmux",["-L",d,"has-session","-t",e],{timeout:5e3}),!0}catch{return!1}},_=async()=>{},S=async()=>{await _();let e=await h();e.length>0&&e.forEach(e=>{c.debug(`existing tmux session found: ${e}`)})},L=async e=>{if(u)try{return await r.default.readlink(`/proc/${e}/cwd`)}catch{return null}try{let{stdout:t}=await p("lsof",["-a","-p",String(e),"-d","cwd","-Fn"],{timeout:5e3}),r=t.split("\n").find(e=>e.startsWith("n/"));return r?r.slice(1):null}catch{return null}},v=async e=>{let t=await E(e);if(t){let e=await L(t);if(e)return e}try{let{stdout:t}=await p("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_current_path}"],{timeout:5e3});return t.trim()||null}catch{return null}},E=async e=>{try{let{stdout:t}=await p("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_pid}"],{timeout:5e3}),r=parseInt(t.trim(),10);return Number.isNaN(r)?null:r}catch{return null}},P=async()=>{try{await p("tmux",["-L",d,"source-file",m],{timeout:5e3})}catch{}},I=async e=>{try{let{stdout:t}=await p("tmux",["-L",d,"list-panes","-t",e,"-F","#{pane_current_command}"],{timeout:5e3});return t.trim()||null}catch{return null}},b=async()=>{try{let{stdout:e}=await p("tmux",["-L",d,"list-panes","-a","-F","#{session_name} #{pane_current_command} #{pane_current_path} #{pane_pid} #{window_activity}"],{timeout:5e3}),t=new Map;for(let r of e.trim().split("\n")){if(!r)continue;let[e,a,s,i,n]=r.split(" ");if(e&&a){let r=parseInt(i,10),l=parseInt(n,10);t.set(e,{command:a,path:s||"",pid:Number.isNaN(r)?0:r,windowActivity:Number.isNaN(l)?0:l})}}return t}catch{return new Map}},N=new Set(["bash","zsh","fish","sh","dash"]),T=async e=>{let t=await I(e);return t?{isSafe:N.has(t),processName:t}:{isSafe:!1,processName:"unknown"}},M=async e=>{try{let{stdout:t}=await p("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_title}"],{timeout:5e3});return t.trim()||null}catch{return null}},R=async e=>{await p("tmux",["-L",d,"copy-mode","-q","-t",e],{timeout:5e3}).catch(()=>{})},$=async(e,t)=>{await R(e),await p("tmux",["-L",d,"send-keys","-t",e,t,"Enter"],{timeout:5e3})},k=async(e,t)=>{await R(e),await p("tmux",["-L",d,"send-keys","-t",e,t],{timeout:5e3})},q=async(e,t)=>{await R(e),await p("tmux",["-L",d,"send-keys","-t",e,"-l",`\x1b[200~${t}\x1b[201~`],{timeout:5e3}),await p("tmux",["-L",d,"send-keys","-t",e,"Enter"],{timeout:5e3}),await new Promise(e=>setTimeout(e,600)),await p("tmux",["-L",d,"send-keys","-t",e,"Enter"],{timeout:5e3})},j=async e=>{try{let{stdout:t}=await p("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_current_path} #{pane_current_command} #{pane_pid} #{pane_width} #{pane_height} #{session_created}"],{timeout:5e3}),[r,a,s,i,n,l]=t.trim().split(" ");return{cwd:r||null,command:a||null,pid:s&&parseInt(s,10)||null,width:i&&parseInt(i,10)||null,height:n&&parseInt(n,10)||null,sessionCreated:l&&parseInt(l,10)||null}}catch{return{cwd:null,command:null,pid:null,width:null,height:null,sessionCreated:null}}},A=new Set(["node","python","python3","ruby","perl","deno","bun"]),O=async()=>{try{await p("tmux",["-L",d,"kill-server"],{timeout:5e3}),c.debug("tmux server killed")}catch{}},H=async e=>{try{let{stdout:t}=await p("tmux",["-L",d,"capture-pane","-p","-t",e],{timeout:5e3});return t}catch{return null}},C=async(e,t)=>{try{let{stdout:r}=await p("tmux",["-L",d,"capture-pane","-p","-S",`-${t}`,"-t",e],{timeout:5e3});return r}catch{return null}},D=async e=>{if(u){let t=[];return await Promise.all(e.map(async e=>{try{for(let a of(await r.default.readFile(`/proc/${e}/task/${e}/children`,"utf-8")).trim().split(/\s+/)){let e=parseInt(a,10);Number.isNaN(e)||t.push(e)}}catch{}})),t}try{let{stdout:t}=await p("pgrep",["-P",e.join(",")],{timeout:5e3});return t.trim().split("\n").map(e=>parseInt(e,10)).filter(e=>!Number.isNaN(e))}catch{return[]}},U=async e=>{let t=[],r=[e];for(;r.length>0;){let e=await D(r);if(0===e.length)break;t.push(...e),r=e}return t},G=async e=>{try{let t=new Set(e),{stdout:r}=await p("ss",["-tlnp"],{timeout:5e3}),a=new Set;for(let e of r.split("\n")){let r=e.match(/pid=(\d+)/g);if(!r||!r.some(e=>t.has(parseInt(e.replace("pid=",""),10))))continue;let s=e.match(/:(\d+)\s/);s&&a.add(parseInt(s[1],10))}return[...a].sort((e,t)=>e-t)}catch{return[]}},F=async e=>{let t=await U(e);if(0===t.length)return[];if(u)return G(t);try{let{stdout:e}=await p("lsof",["-a","-p",t.join(","),"-i","-sTCP:LISTEN","-P","-Fn"],{timeout:5e3}),r=new Set;for(let t of e.split("\n"))if(t.startsWith("n")){let e=t.match(/:(\d+)$/);e&&r.add(parseInt(e[1],10))}return[...r].sort((e,t)=>e-t)}catch{return[]}},K=async e=>{let t=await E(e);if(!t)return null;try{let{stdout:e}=await p("pgrep",["-n","-P",String(t)],{timeout:5e3}),r=e.trim();if(!r)return null;let{stdout:a}=await p("ps",["-o","args=","-p",r],{timeout:5e3}),i=a.trim();if(!i)return null;let n=i.split(/\s+/);if(0===n.length)return i;if(n[0]=s.default.basename(n[0]),A.has(n[0])&&n.length>1){let e=s.default.basename(n[1]).replace(/\.(c|m)?js$/,"");n.splice(0,2,e)}return n.join(" ")}catch{return null}};e.s(["SAFE_SHELLS",0,N,"applyConfig",0,P,"capturePaneContent",0,H,"capturePaneContentWithHistory",0,C,"checkTerminalProcess",0,T,"createSession",0,f,"defaultSessionName",0,()=>`pt-${(0,i.nanoid)(6)}-${(0,i.nanoid)(6)}-${(0,i.nanoid)(6)}`,"exitCopyMode",0,R,"getAllPanesInfo",0,b,"getLastCommand",0,K,"getListeningPorts",0,F,"getPaneCurrentCommand",0,I,"getPaneDetailInfo",0,j,"getPaneTitle",0,M,"getSessionCwd",0,v,"getSessionPanePid",0,E,"hasSession",0,x,"killServer",0,O,"killSession",0,w,"listSessions",0,h,"resolveExistingDir",0,g,"scanSessions",0,S,"sendBracketedPaste",0,q,"sendKeys",0,$,"sendRawKeys",0,k,"workspaceSessionName",0,(e,t,r)=>`pt-${e}-${t}-${r}`],459015)},902067,e=>{"use strict";var t=e.i(926747),r=e.i(190406),a=e.i(244898),s=e.i(262950),i=e.i(924868),n=e.i(814747),l=e.i(44014),o=e.i(825265),u=e.i(25146);let c=(0,u.createLogger)("message-history"),p=globalThis;p.__ptMessageHistoryLocks||(p.__ptMessageHistoryLocks=new Map);let d=async(e,t)=>{let r,a=new Promise(e=>{r=e}),s=p.__ptMessageHistoryLocks.get(e)??Promise.resolve();p.__ptMessageHistoryLocks.set(e,a),await s;try{return await t()}finally{r(),p.__ptMessageHistoryLocks.get(e)===a&&p.__ptMessageHistoryLocks.delete(e)}},m=e=>n.default.join((0,o.resolveLayoutDir)(e),"message-history.json"),h=async e=>{try{let t=await i.default.readFile(e,"utf-8"),r=JSON.parse(t);return Array.isArray(r.entries)?r.entries:[]}catch(e){return"ENOENT"!==e.code&&c.warn({err:e},"failed to read"),[]}},f=async(e,t)=>{let r=n.default.dirname(e);await i.default.mkdir(r,{recursive:!0});let a=e+".tmp";try{await i.default.writeFile(a,JSON.stringify(t,null,2),{mode:384}),await i.default.rename(a,e)}catch(e){throw await i.default.unlink(a).catch(()=>{}),e}},y=async e=>h(m(e)),w=async(e,t)=>d(e,async()=>{let r=m(e),a=await h(r),s=a.findIndex(e=>e.message===t);-1!==s&&a.splice(s,1);let i={id:(0,l.nanoid)(),message:t,sentAt:new Date().toISOString()};return a.unshift(i),a.length>500&&(a.length=500),await f(r,{entries:a}),i}),g=async(e,t)=>d(e,async()=>{let r=m(e),a=(await h(r)).filter(e=>e.id!==t);return await f(r,{entries:a}),!0}),x=(0,u.createLogger)("message-history"),_=async(e,t)=>{if("GET"===e.method){let r=e.query.wsId;if(!r)return t.status(400).json({error:"wsId is required"});let a=await y(r);return t.status(200).json({entries:a})}if("POST"===e.method){let{wsId:r,message:a}=e.body;if(!r)return t.status(400).json({error:"wsId is required"});if(!a?.trim())return t.status(400).json({error:"message is required"});try{let e=await w(r,a);return t.status(201).json({entry:e})}catch(e){return x.error({err:e},"write failed"),t.status(500).json({error:"Failed to save"})}}if("DELETE"===e.method){let{wsId:r,id:a}=e.body;if(!r)return t.status(400).json({error:"wsId is required"});if(!a)return t.status(400).json({error:"id is required"});try{let e=await g(r,a);return t.status(200).json({success:e})}catch(e){return x.error({err:e},"delete failed"),t.status(500).json({error:"Failed to save"})}}return t.setHeader("Allow","GET, POST, DELETE"),t.status(405).json({error:"Method not allowed"})};e.s(["default",0,_],217026);var S=e.i(217026),L=e.i(7031),v=e.i(181927),E=e.i(846432);let P=(0,s.hoist)(S,"default"),I=(0,s.hoist)(S,"config"),b=new a.PagesAPIRouteModule({definition:{kind:r.RouteKind.PAGES_API,page:"/api/message-history",pathname:"/api/message-history",bundlePath:"",filename:""},userland:S,distDir:".next",relativeProjectDir:""});async function N(e,r,a){a.requestMeta&&(0,E.setRequestMeta)(e,a.requestMeta),b.isDev&&(0,E.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let s="/api/message-history";s=s.replace(/\/index$/,"")||"/";let i=await b.prepare(e,r,{srcPage:s});if(!i){r.statusCode=400,r.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve());return}let{query:n,params:l,prerenderManifest:o,routerServerContext:u}=i;try{let t,a=e.method||"GET",i=(0,L.getTracer)(),c=i.getActiveScopeSpan(),p=!!(null==u?void 0:u.isWrappedByNextServer),d=b.instrumentationOnRequestError.bind(b),m=async c=>b.render(e,r,{query:{...n,...l},params:l,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:o.preview,propagateError:!1,dev:b.isDev,page:"/api/message-history",internalRevalidate:null==u?void 0:u.revalidate,onError:(...t)=>d(e,...t)}).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":r.statusCode,"next.rsc":!1});let e=i.getRootSpanAttributes();if(!e)return;if(e.get("next.span_type")!==v.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${e.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=e.get("next.route");if(n){let e=`${a} ${n}`;c.setAttributes({"next.route":n,"http.route":n,"next.span_name":e}),c.updateName(e),t&&t!==c&&(t.setAttribute("http.route",n),t.updateName(e))}else c.updateName(`${a} ${s}`)});p&&c?await m(c):(t=i.getActiveScopeSpan(),await i.withPropagatedContext(e.headers,()=>i.trace(v.BaseServerSpan.handleRequest,{spanName:`${a} ${s}`,kind:L.SpanKind.SERVER,attributes:{"http.method":a,"http.target":e.url}},m),void 0,!p))}catch(e){if(b.isDev)throw e;(0,t.sendError)(r,500,"Internal Server Error")}finally{null==a.waitUntil||a.waitUntil.call(a,Promise.resolve())}}e.s(["config",0,I,"default",0,P,"handler",0,N],902067)},981532,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_0ojl2hg._.js"].map(t=>e.l(t))).then(()=>t(322429)))},322522,e=>{e.v(e=>Promise.resolve().then(()=>e(459015)))},245061,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_tab-title_ts_0onatvs._.js"].map(t=>e.l(t))).then(()=>t(785128)))}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__00nrs0h._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},406461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},524836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},921517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},504446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},755004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},792509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},500874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},130146,(e,t,r)=>{t.exports=e.x("pino-28069d5257187539",()=>require("pino-28069d5257187539"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},25146,e=>{"use strict";var t=e.i(130146),r=e.i(814747),s=e.i(446786);let n=r.default.join(s.default.homedir(),".purplemux","logs"),i=process.env.LOG_LEVEL||"info",a=(e=>{if(!e)return{};let t={};for(let r of e.split(",")){let[e,s]=r.split("=").map(e=>e.trim());e&&s&&(t[e]=s)}return t})(process.env.LOG_LEVELS),o=["trace","debug","info","warn","error","fatal"],l=globalThis;if(!l.__ptRootLogger){let e=[i,...Object.values(a)].reduce((e,t)=>o.indexOf(t)<o.indexOf(e)?t:e,"fatal");l.__ptRootLogger=(0,t.default)({level:e,transport:{targets:[{target:"pino-roll",level:e,options:{file:r.default.join(n,"purplemux"),frequency:"daily",dateFormat:"yyyy-MM-dd",limit:{count:7},mkdir:!0}},{target:"pino-pretty",level:e,options:{colorize:!0,ignore:"pid,hostname,module",translateTime:"HH:MM:ss",messageFormat:"[{module}] {msg}"}}]}})}let u=l.__ptRootLogger;e.s(["createLogger",0,e=>{let t=u.child({module:e});return t.level=a[e]??i,t}])},597789,965898,e=>{"use strict";let t=process.env.__PMUX_PRISTINE_ENV,r=Object.freeze(t?JSON.parse(t):{...process.env});t||(process.env.__PMUX_PRISTINE_ENV=JSON.stringify(r)),e.s(["PRISTINE_ENV",0,r],965898);let s=new Set(["HOME","USER","LOGNAME","SHELL","PATH","TERM","COLORTERM","LANG","TMPDIR","SSH_AUTH_SOCK","SSH_CONNECTION","SSH_TTY","DISPLAY","WAYLAND_DISPLAY","XDG_RUNTIME_DIR","TZ"]),n=["LC_"],i=e=>s.has(e)||n.some(t=>e.startsWith(t)),a={TERM:"xterm-256color",COLORTERM:"truecolor"},o=()=>{let e={};for(let[t,s]of Object.entries(r))void 0!==s&&i(t)&&(e[t]=s);return{...e,...a}},l=e=>`'${e.replace(/'/g,"'\\''")}'`,u=()=>r.SHELL||"/bin/bash";e.s(["buildShellEnv",0,()=>o(),"buildShellLaunchCommand",0,()=>{let e=Object.entries(o()).map(([e,t])=>`${e}=${l(t)}`).join(" ");return`env -i TMUX="$TMUX" TMUX_PANE="$TMUX_PANE" ${e} ${l(u())} -l`},"defaultShell",0,u],597789)},44014,e=>{"use strict";let t,r;var s=e.i(666680);e.s(["nanoid",0,function(e=21){var n;n=e|=0,!t||t.length<n?(t=Buffer.allocUnsafe(128*n),s.webcrypto.getRandomValues(t),r=0):r+n>t.length&&(s.webcrypto.getRandomValues(t),r=0),r+=n;let i="";for(let s=r-e;s<r;s++)i+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&t[s]];return i}],44014)},459015,544538,e=>{"use strict";var t=e.i(233405),r=e.i(924868),s=e.i(224361),n=e.i(814747),i=e.i(44014),a=e.i(965898),o=e.i(597789),l=e.i(25146);process.platform;let u="linux"===process.platform;e.s(["isLinux",0,u],544538);let p=(0,l.createLogger)("terminal"),c=(0,s.promisify)(t.execFile),m="purple",d=n.default.join(process.env.__PMUX_APP_DIR_UNPACKED||process.env.__PMUX_APP_DIR||process.cwd(),"src","config","tmux.conf"),f=async()=>{try{let{stdout:e}=await c("tmux",["-L",m,"ls","-F","#{session_name}"],{timeout:5e3});return e.trim().split("\n").map(e=>e.trim()).filter(e=>e.startsWith("pt-"))}catch{return[]}},h=async(e,t,r,s)=>{let n=(0,o.buildShellLaunchCommand)();await c("tmux",["-u","-L",m,"-f",d,"new-session","-d","-s",e,"-x",String(t),"-y",String(r),n],{timeout:5e3,cwd:s||a.PRISTINE_ENV.HOME||"/"}),await E(),p.debug(`tmux session created: ${e} (cols: ${t}, rows: ${r})`)},y=e=>new Promise(t=>setTimeout(t,e)),w=async e=>{if(!await x(e))return;p.debug(`killSession start: ${e}`);let t=await L(e);if(t)try{p.debug(`SIGTERM → process group ${t}: ${e}`),process.kill(-t,"SIGTERM")}catch{}try{await c("tmux",["-L",m,"kill-session","-t",e],{timeout:5e3})}catch{}for(let t=0;t<5;t++){if(!await x(e))return void p.debug(`killSession done (SIGTERM): ${e}`);await y(200)}if(p.warn(`session survived SIGTERM, escalating to SIGKILL: ${e}`),t)try{p.debug(`SIGKILL → process group ${t}: ${e}`),process.kill(-t,"SIGKILL")}catch{}try{await c("tmux",["-L",m,"kill-session","-t",e],{timeout:5e3})}catch{}for(let t=0;t<3;t++){if(!await x(e))return void p.debug(`killSession done (SIGKILL): ${e}`);await y(200)}p.warn(`tmux session still alive after kill: ${e}`)},g=async e=>{let t=a.PRISTINE_ENV.HOME||"/";if(!e)return t;let s=e;for(;;){try{if((await r.default.stat(s)).isDirectory())return s}catch{}let e=n.default.dirname(s);if(e===s)return t;s=e}},x=async e=>{try{return await c("tmux",["-L",m,"has-session","-t",e],{timeout:5e3}),!0}catch{return!1}},S=async()=>{},_=async()=>{await S();let e=await f();e.length>0&&e.forEach(e=>{p.debug(`existing tmux session found: ${e}`)})},v=async e=>{if(u)try{return await r.default.readlink(`/proc/${e}/cwd`)}catch{return null}try{let{stdout:t}=await c("lsof",["-a","-p",String(e),"-d","cwd","-Fn"],{timeout:5e3}),r=t.split("\n").find(e=>e.startsWith("n/"));return r?r.slice(1):null}catch{return null}},P=async e=>{let t=await L(e);if(t){let e=await v(t);if(e)return e}try{let{stdout:t}=await c("tmux",["-L",m,"display-message","-p","-t",e,"#{pane_current_path}"],{timeout:5e3});return t.trim()||null}catch{return null}},L=async e=>{try{let{stdout:t}=await c("tmux",["-L",m,"display-message","-p","-t",e,"#{pane_pid}"],{timeout:5e3}),r=parseInt(t.trim(),10);return Number.isNaN(r)?null:r}catch{return null}},E=async()=>{try{await c("tmux",["-L",m,"source-file",d],{timeout:5e3})}catch{}},N=async e=>{try{let{stdout:t}=await c("tmux",["-L",m,"list-panes","-t",e,"-F","#{pane_current_command}"],{timeout:5e3});return t.trim()||null}catch{return null}},b=async()=>{try{let{stdout:e}=await c("tmux",["-L",m,"list-panes","-a","-F","#{session_name} #{pane_current_command} #{pane_current_path} #{pane_pid} #{window_activity}"],{timeout:5e3}),t=new Map;for(let r of e.trim().split("\n")){if(!r)continue;let[e,s,n,i,a]=r.split(" ");if(e&&s){let r=parseInt(i,10),o=parseInt(a,10);t.set(e,{command:s,path:n||"",pid:Number.isNaN(r)?0:r,windowActivity:Number.isNaN(o)?0:o})}}return t}catch{return new Map}},I=new Set(["bash","zsh","fish","sh","dash"]),$=async e=>{let t=await N(e);return t?{isSafe:I.has(t),processName:t}:{isSafe:!1,processName:"unknown"}},R=async e=>{try{let{stdout:t}=await c("tmux",["-L",m,"display-message","-p","-t",e,"#{pane_title}"],{timeout:5e3});return t.trim()||null}catch{return null}},T=async e=>{await c("tmux",["-L",m,"copy-mode","-q","-t",e],{timeout:5e3}).catch(()=>{})},M=async(e,t)=>{await T(e),await c("tmux",["-L",m,"send-keys","-t",e,t,"Enter"],{timeout:5e3})},q=async(e,t)=>{await T(e),await c("tmux",["-L",m,"send-keys","-t",e,t],{timeout:5e3})},k=async(e,t)=>{await T(e),await c("tmux",["-L",m,"send-keys","-t",e,"-l",`\x1b[200~${t}\x1b[201~`],{timeout:5e3}),await c("tmux",["-L",m,"send-keys","-t",e,"Enter"],{timeout:5e3}),await new Promise(e=>setTimeout(e,600)),await c("tmux",["-L",m,"send-keys","-t",e,"Enter"],{timeout:5e3})},C=async e=>{try{let{stdout:t}=await c("tmux",["-L",m,"display-message","-p","-t",e,"#{pane_current_path} #{pane_current_command} #{pane_pid} #{pane_width} #{pane_height} #{session_created}"],{timeout:5e3}),[r,s,n,i,a,o]=t.trim().split(" ");return{cwd:r||null,command:s||null,pid:n&&parseInt(n,10)||null,width:i&&parseInt(i,10)||null,height:a&&parseInt(a,10)||null,sessionCreated:o&&parseInt(o,10)||null}}catch{return{cwd:null,command:null,pid:null,width:null,height:null,sessionCreated:null}}},A=new Set(["node","python","python3","ruby","perl","deno","bun"]),O=async()=>{try{await c("tmux",["-L",m,"kill-server"],{timeout:5e3}),p.debug("tmux server killed")}catch{}},j=async e=>{try{let{stdout:t}=await c("tmux",["-L",m,"capture-pane","-p","-t",e],{timeout:5e3});return t}catch{return null}},D=async(e,t)=>{try{let{stdout:r}=await c("tmux",["-L",m,"capture-pane","-p","-S",`-${t}`,"-t",e],{timeout:5e3});return r}catch{return null}},U=async e=>{if(u){let t=[];return await Promise.all(e.map(async e=>{try{for(let s of(await r.default.readFile(`/proc/${e}/task/${e}/children`,"utf-8")).trim().split(/\s+/)){let e=parseInt(s,10);Number.isNaN(e)||t.push(e)}}catch{}})),t}try{let{stdout:t}=await c("pgrep",["-P",e.join(",")],{timeout:5e3});return t.trim().split("\n").map(e=>parseInt(e,10)).filter(e=>!Number.isNaN(e))}catch{return[]}},H=async e=>{let t=[],r=[e];for(;r.length>0;){let e=await U(r);if(0===e.length)break;t.push(...e),r=e}return t},G=async e=>{try{let t=new Set(e),{stdout:r}=await c("ss",["-tlnp"],{timeout:5e3}),s=new Set;for(let e of r.split("\n")){let r=e.match(/pid=(\d+)/g);if(!r||!r.some(e=>t.has(parseInt(e.replace("pid=",""),10))))continue;let n=e.match(/:(\d+)\s/);n&&s.add(parseInt(n[1],10))}return[...s].sort((e,t)=>e-t)}catch{return[]}},W=async e=>{let t=await H(e);if(0===t.length)return[];if(u)return G(t);try{let{stdout:e}=await c("lsof",["-a","-p",t.join(","),"-i","-sTCP:LISTEN","-P","-Fn"],{timeout:5e3}),r=new Set;for(let t of e.split("\n"))if(t.startsWith("n")){let e=t.match(/:(\d+)$/);e&&r.add(parseInt(e[1],10))}return[...r].sort((e,t)=>e-t)}catch{return[]}},K=async e=>{let t=await L(e);if(!t)return null;try{let{stdout:e}=await c("pgrep",["-n","-P",String(t)],{timeout:5e3}),r=e.trim();if(!r)return null;let{stdout:s}=await c("ps",["-o","args=","-p",r],{timeout:5e3}),i=s.trim();if(!i)return null;let a=i.split(/\s+/);if(0===a.length)return i;if(a[0]=n.default.basename(a[0]),A.has(a[0])&&a.length>1){let e=n.default.basename(a[1]).replace(/\.(c|m)?js$/,"");a.splice(0,2,e)}return a.join(" ")}catch{return null}};e.s(["SAFE_SHELLS",0,I,"applyConfig",0,E,"capturePaneContent",0,j,"capturePaneContentWithHistory",0,D,"checkTerminalProcess",0,$,"createSession",0,h,"defaultSessionName",0,()=>`pt-${(0,i.nanoid)(6)}-${(0,i.nanoid)(6)}-${(0,i.nanoid)(6)}`,"exitCopyMode",0,T,"getAllPanesInfo",0,b,"getLastCommand",0,K,"getListeningPorts",0,W,"getPaneCurrentCommand",0,N,"getPaneDetailInfo",0,C,"getPaneTitle",0,R,"getSessionCwd",0,P,"getSessionPanePid",0,L,"hasSession",0,x,"killServer",0,O,"killSession",0,w,"listSessions",0,f,"resolveExistingDir",0,g,"scanSessions",0,_,"sendBracketedPaste",0,k,"sendKeys",0,M,"sendRawKeys",0,q,"workspaceSessionName",0,(e,t,r)=>`pt-${e}-${t}-${r}`],459015)},175609,(e,t,r)=>{t.exports=e.x("node-pty-592e8dc6192cfd06",()=>require("node-pty-592e8dc6192cfd06"))},971780,e=>{"use strict";var t=e.i(459015);e.i(478319),e.i(220951),e.i(175609),e.i(597789),e.i(965898),new TextEncoder,new TextDecoder,e.i(825265),(0,e.i(25146).createLogger)("terminal"),new TextDecoder;let r=globalThis,s=r.__purplemux_terminal_connections??=new Map;r.__purplemux_terminal_output_ts??=new Map;let n=(e,t,r)=>{for(let n of s.values())if(n.sessionName===e&&!n.cleaned)return void n.pty.resize(t,r)},i=e=>new Promise(t=>setTimeout(t,e)),a=async(e,r,a)=>{let o=(e=>{for(let t of s.values())if(t.sessionName===e&&!t.cleaned)return{cols:t.currentCols,rows:t.currentRows};return null})(e);if(o&&o.cols>50)return(0,t.capturePaneContentWithHistory)(e,50);let l=(e=>{for(let t of s.values())if(t.sessionName===e&&!t.cleaned){if(t.capturePaused)return null;return t.capturePaused=!0,{cols:t.currentCols,rows:t.currentRows}}return null})(e);if(!l)return(0,t.capturePaneContent)(e);try{n(e,r,a),await i(300);let s=await (0,t.capturePaneContent)(e);return n(e,l.cols,l.rows),await i(300),s}finally{(e=>{for(let t of s.values())if(t.sessionName===e&&!t.cleaned){if(!t.capturePaused)return;t.capturePaused=!1;return}})(e)}};e.s(["capturePaneAtWidth",0,a],971780)},443571,e=>{"use strict";let t=["Yes","Yes,","No","Accept","Decline","Open System Settings","Try again","Use this","Continue without","Resume from summary","Resume full session","Continue this conversation","Send message as","Don't ask me again"],r=/^\s*(?:[❯›>]\s+)?(.+)$/,s=/^\s*[❯›>]\s+/,n=/^\d+\.\s+/,i=/^\s*([❯›>])?\s*(\d+)\.?\s*(\S.*)$/,a=e=>e.replace(n,""),o=(e,t)=>e.some(e=>a(e).startsWith(t)),l=e=>e.match(/^\s*/)?.[0].length??0,u=/^(Yes,\s*and\s+don[\u2019']?t\s+ask)\s*:\s*(.+)$/,p=e=>!(e.length<2)&&(o(e,"Yes")&&o(e,"No")||o(e,"Accept")&&o(e,"Decline")||o(e,"Open System Settings")||o(e,"Use this")&&o(e,"Continue without")||o(e,"Resume from summary")&&o(e,"Resume full session")||o(e,"Continue this conversation")&&o(e,"Send message as"));e.s(["parsePermissionOptions",0,e=>{let n=e.split("\n"),o=(e=>{let t=[],r=[],s=0,n=1,a=0,o=()=>{r.length>=2&&t.push({rawOptions:r.slice(),focusedIndex:s}),r=[],s=0,n=1,a=0};for(let t of e){if(!t.trim())continue;let e=t.match(i);if(e){let i=e[1],u=Number(e[2]),p=e[3].trim();if(p.length>0){if(1===u){o(),r.push(p),i&&(s=0),a=l(t),n=2;continue}if(u===n){i&&(s=r.length),r.push(p),a=l(t),n+=1;continue}}}if(r.length>0){if(l(t)>a){r[r.length-1]+=t.trimStart();continue}if(/^\s+\S/.test(t))continue;o()}}o();let p=t[t.length-1];return p?{options:p.rawOptions.map((e,t)=>{let r;return`${t+1}. ${(r=e.match(u))?`${r[1]} again for: ${r[2].trim()}`:/^Yes(?![,\s]|$)/.test(e)?"Yes":/^No(?![,\s]|$)/.test(e)?"No":e}`}),focusedIndex:p.focusedIndex}:{options:[],focusedIndex:0}})(n);if(o.options.length>=2&&p(o.options))return o;let c=(e=>{let n=[],i=0,o=!1;for(let l of e){if(!l.trim()){if(o)break;continue}let e=s.test(l),u=/^\s+\S/.test(l);if(!e&&!u){if(o)break;continue}let p=l.match(r);if(!p)continue;let c=p[1].trim(),m=a(c);t.some(e=>m.startsWith(e))&&(e&&(i=n.length),n.push(c),o=!0)}return{options:n,focusedIndex:i}})(n);return p(c.options)?c:{options:[],focusedIndex:0}}])},454549,e=>{"use strict";var t=e.i(926747),r=e.i(190406),s=e.i(244898),n=e.i(262950),i=e.i(459015),a=e.i(971780),o=e.i(25146),l=e.i(443571);let u=(0,o.createLogger)("tmux"),p=async(e,t)=>{if("GET"!==e.method)return t.setHeader("Allow","GET"),t.status(405).json({error:"Method not allowed"});let r=e.query.session;if(!r)return t.status(400).json({error:"session parameter required"});if(!await (0,i.hasSession)(r))return t.status(404).json({error:"Session not found"});try{let e=await (0,a.capturePaneAtWidth)(r,120,50);if(!e)return t.status(200).json({options:[]});let{options:s}=(0,l.parsePermissionOptions)(e),n=e.includes("Bypass Permissions");return t.status(200).json({options:s,...n&&{isBypassPrompt:!0}})}catch(e){return u.error(`permission-options query failed: ${e instanceof Error?e.message:e}`),t.status(500).json({error:"Terminal capture failed"})}};e.s(["default",0,p],96110);var c=e.i(96110),m=e.i(7031),d=e.i(181927),f=e.i(846432);let h=(0,n.hoist)(c,"default"),y=(0,n.hoist)(c,"config"),w=new s.PagesAPIRouteModule({definition:{kind:r.RouteKind.PAGES_API,page:"/api/tmux/permission-options",pathname:"/api/tmux/permission-options",bundlePath:"",filename:""},userland:c,distDir:".next",relativeProjectDir:""});async function g(e,r,s){s.requestMeta&&(0,f.setRequestMeta)(e,s.requestMeta),w.isDev&&(0,f.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let n="/api/tmux/permission-options";n=n.replace(/\/index$/,"")||"/";let i=await w.prepare(e,r,{srcPage:n});if(!i){r.statusCode=400,r.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve());return}let{query:a,params:o,prerenderManifest:l,routerServerContext:u}=i;try{let t,s=e.method||"GET",i=(0,m.getTracer)(),p=i.getActiveScopeSpan(),c=!!(null==u?void 0:u.isWrappedByNextServer),f=w.instrumentationOnRequestError.bind(w),h=async p=>w.render(e,r,{query:{...a,...o},params:o,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:l.preview,propagateError:!1,dev:w.isDev,page:"/api/tmux/permission-options",internalRevalidate:null==u?void 0:u.revalidate,onError:(...t)=>f(e,...t)}).finally(()=>{if(!p)return;p.setAttributes({"http.status_code":r.statusCode,"next.rsc":!1});let e=i.getRootSpanAttributes();if(!e)return;if(e.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${e.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=e.get("next.route");if(a){let e=`${s} ${a}`;p.setAttributes({"next.route":a,"http.route":a,"next.span_name":e}),p.updateName(e),t&&t!==p&&(t.setAttribute("http.route",a),t.updateName(e))}else p.updateName(`${s} ${n}`)});c&&p?await h(p):(t=i.getActiveScopeSpan(),await i.withPropagatedContext(e.headers,()=>i.trace(d.BaseServerSpan.handleRequest,{spanName:`${s} ${n}`,kind:m.SpanKind.SERVER,attributes:{"http.method":s,"http.target":e.url}},h),void 0,!c))}catch(e){if(w.isDev)throw e;(0,t.sendError)(r,500,"Internal Server Error")}finally{null==s.waitUntil||s.waitUntil.call(s,Promise.resolve())}}e.s(["config",0,y,"default",0,h,"handler",0,g],454549)},981532,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_0ojl2hg._.js"].map(t=>e.l(t))).then(()=>t(322429)))},322522,e=>{e.v(e=>Promise.resolve().then(()=>e(459015)))},245061,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_tab-title_ts_0onatvs._.js"].map(t=>e.l(t))).then(()=>t(785128)))}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__03x8rds._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},130146,(e,t,r)=>{t.exports=e.x("pino-28069d5257187539",()=>require("pino-28069d5257187539"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},597789,965898,e=>{"use strict";let t=process.env.__PMUX_PRISTINE_ENV,r=Object.freeze(t?JSON.parse(t):{...process.env});t||(process.env.__PMUX_PRISTINE_ENV=JSON.stringify(r)),e.s(["PRISTINE_ENV",0,r],965898);let a=new Set(["HOME","USER","LOGNAME","SHELL","PATH","TERM","COLORTERM","LANG","TMPDIR","SSH_AUTH_SOCK","SSH_CONNECTION","SSH_TTY","DISPLAY","WAYLAND_DISPLAY","XDG_RUNTIME_DIR","TZ"]),n=["LC_"],i=e=>a.has(e)||n.some(t=>e.startsWith(t)),s={TERM:"xterm-256color",COLORTERM:"truecolor"},l=()=>{let e={};for(let[t,a]of Object.entries(r))void 0!==a&&i(t)&&(e[t]=a);return{...e,...s}},o=e=>`'${e.replace(/'/g,"'\\''")}'`,u=()=>r.SHELL||"/bin/bash";e.s(["buildShellEnv",0,()=>l(),"buildShellLaunchCommand",0,()=>{let e=Object.entries(l()).map(([e,t])=>`${e}=${o(t)}`).join(" ");return`env -i TMUX="$TMUX" TMUX_PANE="$TMUX_PANE" ${e} ${o(u())} -l`},"defaultShell",0,u],597789)},25146,e=>{"use strict";var t=e.i(130146),r=e.i(814747),a=e.i(446786);let n=r.default.join(a.default.homedir(),".purplemux","logs"),i=process.env.LOG_LEVEL||"info",s=(e=>{if(!e)return{};let t={};for(let r of e.split(",")){let[e,a]=r.split("=").map(e=>e.trim());e&&a&&(t[e]=a)}return t})(process.env.LOG_LEVELS),l=["trace","debug","info","warn","error","fatal"],o=globalThis;if(!o.__ptRootLogger){let e=[i,...Object.values(s)].reduce((e,t)=>l.indexOf(t)<l.indexOf(e)?t:e,"fatal");o.__ptRootLogger=(0,t.default)({level:e,transport:{targets:[{target:"pino-roll",level:e,options:{file:r.default.join(n,"purplemux"),frequency:"daily",dateFormat:"yyyy-MM-dd",limit:{count:7},mkdir:!0}},{target:"pino-pretty",level:e,options:{colorize:!0,ignore:"pid,hostname,module",translateTime:"HH:MM:ss",messageFormat:"[{module}] {msg}"}}]}})}let u=o.__ptRootLogger;e.s(["createLogger",0,e=>{let t=u.child({module:e});return t.level=s[e]??i,t}])},44014,e=>{"use strict";let t,r;var a=e.i(666680);e.s(["nanoid",0,function(e=21){var n;n=e|=0,!t||t.length<n?(t=Buffer.allocUnsafe(128*n),a.webcrypto.getRandomValues(t),r=0):r+n>t.length&&(a.webcrypto.getRandomValues(t),r=0),r+=n;let i="";for(let a=r-e;a<r;a++)i+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&t[a]];return i}],44014)},459015,544538,e=>{"use strict";var t=e.i(233405),r=e.i(924868),a=e.i(224361),n=e.i(814747),i=e.i(44014),s=e.i(965898),l=e.i(597789),o=e.i(25146);process.platform;let u="linux"===process.platform;e.s(["isLinux",0,u],544538);let p=(0,o.createLogger)("terminal"),c=(0,a.promisify)(t.execFile),d="purple",m=n.default.join(process.env.__PMUX_APP_DIR_UNPACKED||process.env.__PMUX_APP_DIR||process.cwd(),"src","config","tmux.conf"),h=async()=>{try{let{stdout:e}=await c("tmux",["-L",d,"ls","-F","#{session_name}"],{timeout:5e3});return e.trim().split("\n").map(e=>e.trim()).filter(e=>e.startsWith("pt-"))}catch{return[]}},f=async(e,t,r,a)=>{let n=(0,l.buildShellLaunchCommand)();await c("tmux",["-u","-L",d,"-f",m,"new-session","-d","-s",e,"-x",String(t),"-y",String(r),n],{timeout:5e3,cwd:a||s.PRISTINE_ENV.HOME||"/"}),await E(),p.debug(`tmux session created: ${e} (cols: ${t}, rows: ${r})`)},w=e=>new Promise(t=>setTimeout(t,e)),y=async e=>{if(!await g(e))return;p.debug(`killSession start: ${e}`);let t=await v(e);if(t)try{p.debug(`SIGTERM → process group ${t}: ${e}`),process.kill(-t,"SIGTERM")}catch{}try{await c("tmux",["-L",d,"kill-session","-t",e],{timeout:5e3})}catch{}for(let t=0;t<5;t++){if(!await g(e))return void p.debug(`killSession done (SIGTERM): ${e}`);await w(200)}if(p.warn(`session survived SIGTERM, escalating to SIGKILL: ${e}`),t)try{p.debug(`SIGKILL → process group ${t}: ${e}`),process.kill(-t,"SIGKILL")}catch{}try{await c("tmux",["-L",d,"kill-session","-t",e],{timeout:5e3})}catch{}for(let t=0;t<3;t++){if(!await g(e))return void p.debug(`killSession done (SIGKILL): ${e}`);await w(200)}p.warn(`tmux session still alive after kill: ${e}`)},g=async e=>{try{return await c("tmux",["-L",d,"has-session","-t",e],{timeout:5e3}),!0}catch{return!1}},S=async()=>{},x=async()=>{await S();let e=await h();e.length>0&&e.forEach(e=>{p.debug(`existing tmux session found: ${e}`)})},_=async e=>{if(u)try{return await r.default.readlink(`/proc/${e}/cwd`)}catch{return null}try{let{stdout:t}=await c("lsof",["-a","-p",String(e),"-d","cwd","-Fn"],{timeout:5e3}),r=t.split("\n").find(e=>e.startsWith("n/"));return r?r.slice(1):null}catch{return null}},L=async e=>{let t=await v(e);if(t){let e=await _(t);if(e)return e}try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_current_path}"],{timeout:5e3});return t.trim()||null}catch{return null}},v=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_pid}"],{timeout:5e3}),r=parseInt(t.trim(),10);return Number.isNaN(r)?null:r}catch{return null}},E=async()=>{try{await c("tmux",["-L",d,"source-file",m],{timeout:5e3})}catch{}},P=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"list-panes","-t",e,"-F","#{pane_current_command}"],{timeout:5e3});return t.trim()||null}catch{return null}},I=async()=>{try{let{stdout:e}=await c("tmux",["-L",d,"list-panes","-a","-F","#{session_name} #{pane_current_command} #{pane_current_path} #{pane_pid} #{window_activity}"],{timeout:5e3}),t=new Map;for(let r of e.trim().split("\n")){if(!r)continue;let[e,a,n,i,s]=r.split(" ");if(e&&a){let r=parseInt(i,10),l=parseInt(s,10);t.set(e,{command:a,path:n||"",pid:Number.isNaN(r)?0:r,windowActivity:Number.isNaN(l)?0:l})}}return t}catch{return new Map}},N=new Set(["bash","zsh","fish","sh","dash"]),b=async e=>{let t=await P(e);return t?{isSafe:N.has(t),processName:t}:{isSafe:!1,processName:"unknown"}},R=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_title}"],{timeout:5e3});return t.trim()||null}catch{return null}},$=async e=>{await c("tmux",["-L",d,"copy-mode","-q","-t",e],{timeout:5e3}).catch(()=>{})},T=async(e,t)=>{await $(e),await c("tmux",["-L",d,"send-keys","-t",e,t,"Enter"],{timeout:5e3})},M=async(e,t)=>{await $(e),await c("tmux",["-L",d,"send-keys","-t",e,t],{timeout:5e3})},k=async(e,t)=>{await $(e),await c("tmux",["-L",d,"send-keys","-t",e,"-l",`\x1b[200~${t}\x1b[201~`],{timeout:5e3}),await c("tmux",["-L",d,"send-keys","-t",e,"Enter"],{timeout:5e3}),await new Promise(e=>setTimeout(e,600)),await c("tmux",["-L",d,"send-keys","-t",e,"Enter"],{timeout:5e3})},A=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_current_path} #{pane_current_command} #{pane_pid} #{pane_width} #{pane_height} #{session_created}"],{timeout:5e3}),[r,a,n,i,s,l]=t.trim().split(" ");return{cwd:r||null,command:a||null,pid:n&&parseInt(n,10)||null,width:i&&parseInt(i,10)||null,height:s&&parseInt(s,10)||null,sessionCreated:l&&parseInt(l,10)||null}}catch{return{cwd:null,command:null,pid:null,width:null,height:null,sessionCreated:null}}},C=new Set(["node","python","python3","ruby","perl","deno","bun"]),O=async()=>{try{await c("tmux",["-L",d,"kill-server"],{timeout:5e3}),p.debug("tmux server killed")}catch{}},q=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"capture-pane","-p","-t",e],{timeout:5e3});return t}catch{return null}},j=async(e,t)=>{try{let{stdout:r}=await c("tmux",["-L",d,"capture-pane","-p","-S",`-${t}`,"-t",e],{timeout:5e3});return r}catch{return null}},U=async e=>{if(u){let t=[];return await Promise.all(e.map(async e=>{try{for(let a of(await r.default.readFile(`/proc/${e}/task/${e}/children`,"utf-8")).trim().split(/\s+/)){let e=parseInt(a,10);Number.isNaN(e)||t.push(e)}}catch{}})),t}try{let{stdout:t}=await c("pgrep",["-P",e.join(",")],{timeout:5e3});return t.trim().split("\n").map(e=>parseInt(e,10)).filter(e=>!Number.isNaN(e))}catch{return[]}},H=async e=>{let t=[],r=[e];for(;r.length>0;){let e=await U(r);if(0===e.length)break;t.push(...e),r=e}return t},D=async e=>{try{let t=new Set(e),{stdout:r}=await c("ss",["-tlnp"],{timeout:5e3}),a=new Set;for(let e of r.split("\n")){let r=e.match(/pid=(\d+)/g);if(!r||!r.some(e=>t.has(parseInt(e.replace("pid=",""),10))))continue;let n=e.match(/:(\d+)\s/);n&&a.add(parseInt(n[1],10))}return[...a].sort((e,t)=>e-t)}catch{return[]}},G=async e=>{let t=await H(e);if(0===t.length)return[];if(u)return D(t);try{let{stdout:e}=await c("lsof",["-a","-p",t.join(","),"-i","-sTCP:LISTEN","-P","-Fn"],{timeout:5e3}),r=new Set;for(let t of e.split("\n"))if(t.startsWith("n")){let e=t.match(/:(\d+)$/);e&&r.add(parseInt(e[1],10))}return[...r].sort((e,t)=>e-t)}catch{return[]}},K=async e=>{let t=await v(e);if(!t)return null;try{let{stdout:e}=await c("pgrep",["-n","-P",String(t)],{timeout:5e3}),r=e.trim();if(!r)return null;let{stdout:a}=await c("ps",["-o","args=","-p",r],{timeout:5e3}),i=a.trim();if(!i)return null;let s=i.split(/\s+/);if(0===s.length)return i;if(s[0]=n.default.basename(s[0]),C.has(s[0])&&s.length>1){let e=n.default.basename(s[1]).replace(/\.(c|m)?js$/,"");s.splice(0,2,e)}return s.join(" ")}catch{return null}};e.s(["SAFE_SHELLS",0,N,"applyConfig",0,E,"capturePaneContent",0,q,"capturePaneContentWithHistory",0,j,"checkTerminalProcess",0,b,"createSession",0,f,"defaultSessionName",0,()=>`pt-${(0,i.nanoid)(6)}-${(0,i.nanoid)(6)}-${(0,i.nanoid)(6)}`,"exitCopyMode",0,$,"getAllPanesInfo",0,I,"getLastCommand",0,K,"getListeningPorts",0,G,"getPaneCurrentCommand",0,P,"getPaneDetailInfo",0,A,"getPaneTitle",0,R,"getSessionCwd",0,L,"getSessionPanePid",0,v,"hasSession",0,g,"killServer",0,O,"killSession",0,y,"listSessions",0,h,"scanSessions",0,x,"sendBracketedPaste",0,k,"sendKeys",0,T,"sendRawKeys",0,M,"workspaceSessionName",0,(e,t,r)=>`pt-${e}-${t}-${r}`],459015)},360190,e=>{"use strict";var t=e.i(926747),r=e.i(190406),a=e.i(244898),n=e.i(262950),i=e.i(459015);let s=(0,e.i(25146).createLogger)("tmux"),l=async(e,t)=>{if("POST"!==e.method)return t.setHeader("Allow","POST"),t.status(405).json({error:"Method not allowed"});let{session:r,input:a}=e.body;if(!r||!a)return t.status(400).json({error:"session and input parameters required"});if(!await (0,i.hasSession)(r))return t.status(404).json({error:"Session not found"});try{return await (0,i.sendRawKeys)(r,a),t.status(200).json({ok:!0})}catch(e){return s.error(`send-input failed: ${e instanceof Error?e.message:e}`),t.status(500).json({error:"Failed to send input"})}};e.s(["default",0,l],943074);var o=e.i(943074),u=e.i(7031),p=e.i(181927),c=e.i(846432);let d=(0,n.hoist)(o,"default"),m=(0,n.hoist)(o,"config"),h=new a.PagesAPIRouteModule({definition:{kind:r.RouteKind.PAGES_API,page:"/api/tmux/send-input",pathname:"/api/tmux/send-input",bundlePath:"",filename:""},userland:o,distDir:".next",relativeProjectDir:""});async function f(e,r,a){a.requestMeta&&(0,c.setRequestMeta)(e,a.requestMeta),h.isDev&&(0,c.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let n="/api/tmux/send-input";n=n.replace(/\/index$/,"")||"/";let i=await h.prepare(e,r,{srcPage:n});if(!i){r.statusCode=400,r.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve());return}let{query:s,params:l,prerenderManifest:o,routerServerContext:d}=i;try{let t,a=e.method||"GET",i=(0,u.getTracer)(),c=i.getActiveScopeSpan(),m=!!(null==d?void 0:d.isWrappedByNextServer),f=h.instrumentationOnRequestError.bind(h),w=async u=>h.render(e,r,{query:{...s,...l},params:l,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:o.preview,propagateError:!1,dev:h.isDev,page:"/api/tmux/send-input",internalRevalidate:null==d?void 0:d.revalidate,onError:(...t)=>f(e,...t)}).finally(()=>{if(!u)return;u.setAttributes({"http.status_code":r.statusCode,"next.rsc":!1});let e=i.getRootSpanAttributes();if(!e)return;if(e.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${e.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=e.get("next.route");if(s){let e=`${a} ${s}`;u.setAttributes({"next.route":s,"http.route":s,"next.span_name":e}),u.updateName(e),t&&t!==u&&(t.setAttribute("http.route",s),t.updateName(e))}else u.updateName(`${a} ${n}`)});m&&c?await w(c):(t=i.getActiveScopeSpan(),await i.withPropagatedContext(e.headers,()=>i.trace(p.BaseServerSpan.handleRequest,{spanName:`${a} ${n}`,kind:u.SpanKind.SERVER,attributes:{"http.method":a,"http.target":e.url}},w),void 0,!m))}catch(e){if(h.isDev)throw e;(0,t.sendError)(r,500,"Internal Server Error")}finally{null==a.waitUntil||a.waitUntil.call(a,Promise.resolve())}}e.s(["config",0,m,"default",0,d,"handler",0,f],360190)}];
1
+ module.exports=[270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},130146,(e,t,r)=>{t.exports=e.x("pino-28069d5257187539",()=>require("pino-28069d5257187539"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},597789,965898,e=>{"use strict";let t=process.env.__PMUX_PRISTINE_ENV,r=Object.freeze(t?JSON.parse(t):{...process.env});t||(process.env.__PMUX_PRISTINE_ENV=JSON.stringify(r)),e.s(["PRISTINE_ENV",0,r],965898);let a=new Set(["HOME","USER","LOGNAME","SHELL","PATH","TERM","COLORTERM","LANG","TMPDIR","SSH_AUTH_SOCK","SSH_CONNECTION","SSH_TTY","DISPLAY","WAYLAND_DISPLAY","XDG_RUNTIME_DIR","TZ"]),n=["LC_"],i=e=>a.has(e)||n.some(t=>e.startsWith(t)),s={TERM:"xterm-256color",COLORTERM:"truecolor"},l=()=>{let e={};for(let[t,a]of Object.entries(r))void 0!==a&&i(t)&&(e[t]=a);return{...e,...s}},o=e=>`'${e.replace(/'/g,"'\\''")}'`,u=()=>r.SHELL||"/bin/bash";e.s(["buildShellEnv",0,()=>l(),"buildShellLaunchCommand",0,()=>{let e=Object.entries(l()).map(([e,t])=>`${e}=${o(t)}`).join(" ");return`env -i TMUX="$TMUX" TMUX_PANE="$TMUX_PANE" ${e} ${o(u())} -l`},"defaultShell",0,u],597789)},25146,e=>{"use strict";var t=e.i(130146),r=e.i(814747),a=e.i(446786);let n=r.default.join(a.default.homedir(),".purplemux","logs"),i=process.env.LOG_LEVEL||"info",s=(e=>{if(!e)return{};let t={};for(let r of e.split(",")){let[e,a]=r.split("=").map(e=>e.trim());e&&a&&(t[e]=a)}return t})(process.env.LOG_LEVELS),l=["trace","debug","info","warn","error","fatal"],o=globalThis;if(!o.__ptRootLogger){let e=[i,...Object.values(s)].reduce((e,t)=>l.indexOf(t)<l.indexOf(e)?t:e,"fatal");o.__ptRootLogger=(0,t.default)({level:e,transport:{targets:[{target:"pino-roll",level:e,options:{file:r.default.join(n,"purplemux"),frequency:"daily",dateFormat:"yyyy-MM-dd",limit:{count:7},mkdir:!0}},{target:"pino-pretty",level:e,options:{colorize:!0,ignore:"pid,hostname,module",translateTime:"HH:MM:ss",messageFormat:"[{module}] {msg}"}}]}})}let u=o.__ptRootLogger;e.s(["createLogger",0,e=>{let t=u.child({module:e});return t.level=s[e]??i,t}])},44014,e=>{"use strict";let t,r;var a=e.i(666680);e.s(["nanoid",0,function(e=21){var n;n=e|=0,!t||t.length<n?(t=Buffer.allocUnsafe(128*n),a.webcrypto.getRandomValues(t),r=0):r+n>t.length&&(a.webcrypto.getRandomValues(t),r=0),r+=n;let i="";for(let a=r-e;a<r;a++)i+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&t[a]];return i}],44014)},459015,544538,e=>{"use strict";var t=e.i(233405),r=e.i(924868),a=e.i(224361),n=e.i(814747),i=e.i(44014),s=e.i(965898),l=e.i(597789),o=e.i(25146);process.platform;let u="linux"===process.platform;e.s(["isLinux",0,u],544538);let p=(0,o.createLogger)("terminal"),c=(0,a.promisify)(t.execFile),d="purple",m=n.default.join(process.env.__PMUX_APP_DIR_UNPACKED||process.env.__PMUX_APP_DIR||process.cwd(),"src","config","tmux.conf"),f=async()=>{try{let{stdout:e}=await c("tmux",["-L",d,"ls","-F","#{session_name}"],{timeout:5e3});return e.trim().split("\n").map(e=>e.trim()).filter(e=>e.startsWith("pt-"))}catch{return[]}},h=async(e,t,r,a)=>{let n=(0,l.buildShellLaunchCommand)();await c("tmux",["-u","-L",d,"-f",m,"new-session","-d","-s",e,"-x",String(t),"-y",String(r),n],{timeout:5e3,cwd:a||s.PRISTINE_ENV.HOME||"/"}),await P(),p.debug(`tmux session created: ${e} (cols: ${t}, rows: ${r})`)},y=e=>new Promise(t=>setTimeout(t,e)),w=async e=>{if(!await S(e))return;p.debug(`killSession start: ${e}`);let t=await E(e);if(t)try{p.debug(`SIGTERM → process group ${t}: ${e}`),process.kill(-t,"SIGTERM")}catch{}try{await c("tmux",["-L",d,"kill-session","-t",e],{timeout:5e3})}catch{}for(let t=0;t<5;t++){if(!await S(e))return void p.debug(`killSession done (SIGTERM): ${e}`);await y(200)}if(p.warn(`session survived SIGTERM, escalating to SIGKILL: ${e}`),t)try{p.debug(`SIGKILL → process group ${t}: ${e}`),process.kill(-t,"SIGKILL")}catch{}try{await c("tmux",["-L",d,"kill-session","-t",e],{timeout:5e3})}catch{}for(let t=0;t<3;t++){if(!await S(e))return void p.debug(`killSession done (SIGKILL): ${e}`);await y(200)}p.warn(`tmux session still alive after kill: ${e}`)},g=async e=>{let t=s.PRISTINE_ENV.HOME||"/";if(!e)return t;let a=e;for(;;){try{if((await r.default.stat(a)).isDirectory())return a}catch{}let e=n.default.dirname(a);if(e===a)return t;a=e}},S=async e=>{try{return await c("tmux",["-L",d,"has-session","-t",e],{timeout:5e3}),!0}catch{return!1}},x=async()=>{},_=async()=>{await x();let e=await f();e.length>0&&e.forEach(e=>{p.debug(`existing tmux session found: ${e}`)})},L=async e=>{if(u)try{return await r.default.readlink(`/proc/${e}/cwd`)}catch{return null}try{let{stdout:t}=await c("lsof",["-a","-p",String(e),"-d","cwd","-Fn"],{timeout:5e3}),r=t.split("\n").find(e=>e.startsWith("n/"));return r?r.slice(1):null}catch{return null}},v=async e=>{let t=await E(e);if(t){let e=await L(t);if(e)return e}try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_current_path}"],{timeout:5e3});return t.trim()||null}catch{return null}},E=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_pid}"],{timeout:5e3}),r=parseInt(t.trim(),10);return Number.isNaN(r)?null:r}catch{return null}},P=async()=>{try{await c("tmux",["-L",d,"source-file",m],{timeout:5e3})}catch{}},I=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"list-panes","-t",e,"-F","#{pane_current_command}"],{timeout:5e3});return t.trim()||null}catch{return null}},N=async()=>{try{let{stdout:e}=await c("tmux",["-L",d,"list-panes","-a","-F","#{session_name} #{pane_current_command} #{pane_current_path} #{pane_pid} #{window_activity}"],{timeout:5e3}),t=new Map;for(let r of e.trim().split("\n")){if(!r)continue;let[e,a,n,i,s]=r.split(" ");if(e&&a){let r=parseInt(i,10),l=parseInt(s,10);t.set(e,{command:a,path:n||"",pid:Number.isNaN(r)?0:r,windowActivity:Number.isNaN(l)?0:l})}}return t}catch{return new Map}},b=new Set(["bash","zsh","fish","sh","dash"]),R=async e=>{let t=await I(e);return t?{isSafe:b.has(t),processName:t}:{isSafe:!1,processName:"unknown"}},$=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_title}"],{timeout:5e3});return t.trim()||null}catch{return null}},T=async e=>{await c("tmux",["-L",d,"copy-mode","-q","-t",e],{timeout:5e3}).catch(()=>{})},M=async(e,t)=>{await T(e),await c("tmux",["-L",d,"send-keys","-t",e,t,"Enter"],{timeout:5e3})},k=async(e,t)=>{await T(e),await c("tmux",["-L",d,"send-keys","-t",e,t],{timeout:5e3})},A=async(e,t)=>{await T(e),await c("tmux",["-L",d,"send-keys","-t",e,"-l",`\x1b[200~${t}\x1b[201~`],{timeout:5e3}),await c("tmux",["-L",d,"send-keys","-t",e,"Enter"],{timeout:5e3}),await new Promise(e=>setTimeout(e,600)),await c("tmux",["-L",d,"send-keys","-t",e,"Enter"],{timeout:5e3})},O=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"display-message","-p","-t",e,"#{pane_current_path} #{pane_current_command} #{pane_pid} #{pane_width} #{pane_height} #{session_created}"],{timeout:5e3}),[r,a,n,i,s,l]=t.trim().split(" ");return{cwd:r||null,command:a||null,pid:n&&parseInt(n,10)||null,width:i&&parseInt(i,10)||null,height:s&&parseInt(s,10)||null,sessionCreated:l&&parseInt(l,10)||null}}catch{return{cwd:null,command:null,pid:null,width:null,height:null,sessionCreated:null}}},C=new Set(["node","python","python3","ruby","perl","deno","bun"]),q=async()=>{try{await c("tmux",["-L",d,"kill-server"],{timeout:5e3}),p.debug("tmux server killed")}catch{}},j=async e=>{try{let{stdout:t}=await c("tmux",["-L",d,"capture-pane","-p","-t",e],{timeout:5e3});return t}catch{return null}},D=async(e,t)=>{try{let{stdout:r}=await c("tmux",["-L",d,"capture-pane","-p","-S",`-${t}`,"-t",e],{timeout:5e3});return r}catch{return null}},H=async e=>{if(u){let t=[];return await Promise.all(e.map(async e=>{try{for(let a of(await r.default.readFile(`/proc/${e}/task/${e}/children`,"utf-8")).trim().split(/\s+/)){let e=parseInt(a,10);Number.isNaN(e)||t.push(e)}}catch{}})),t}try{let{stdout:t}=await c("pgrep",["-P",e.join(",")],{timeout:5e3});return t.trim().split("\n").map(e=>parseInt(e,10)).filter(e=>!Number.isNaN(e))}catch{return[]}},U=async e=>{let t=[],r=[e];for(;r.length>0;){let e=await H(r);if(0===e.length)break;t.push(...e),r=e}return t},G=async e=>{try{let t=new Set(e),{stdout:r}=await c("ss",["-tlnp"],{timeout:5e3}),a=new Set;for(let e of r.split("\n")){let r=e.match(/pid=(\d+)/g);if(!r||!r.some(e=>t.has(parseInt(e.replace("pid=",""),10))))continue;let n=e.match(/:(\d+)\s/);n&&a.add(parseInt(n[1],10))}return[...a].sort((e,t)=>e-t)}catch{return[]}},K=async e=>{let t=await U(e);if(0===t.length)return[];if(u)return G(t);try{let{stdout:e}=await c("lsof",["-a","-p",t.join(","),"-i","-sTCP:LISTEN","-P","-Fn"],{timeout:5e3}),r=new Set;for(let t of e.split("\n"))if(t.startsWith("n")){let e=t.match(/:(\d+)$/);e&&r.add(parseInt(e[1],10))}return[...r].sort((e,t)=>e-t)}catch{return[]}},F=async e=>{let t=await E(e);if(!t)return null;try{let{stdout:e}=await c("pgrep",["-n","-P",String(t)],{timeout:5e3}),r=e.trim();if(!r)return null;let{stdout:a}=await c("ps",["-o","args=","-p",r],{timeout:5e3}),i=a.trim();if(!i)return null;let s=i.split(/\s+/);if(0===s.length)return i;if(s[0]=n.default.basename(s[0]),C.has(s[0])&&s.length>1){let e=n.default.basename(s[1]).replace(/\.(c|m)?js$/,"");s.splice(0,2,e)}return s.join(" ")}catch{return null}};e.s(["SAFE_SHELLS",0,b,"applyConfig",0,P,"capturePaneContent",0,j,"capturePaneContentWithHistory",0,D,"checkTerminalProcess",0,R,"createSession",0,h,"defaultSessionName",0,()=>`pt-${(0,i.nanoid)(6)}-${(0,i.nanoid)(6)}-${(0,i.nanoid)(6)}`,"exitCopyMode",0,T,"getAllPanesInfo",0,N,"getLastCommand",0,F,"getListeningPorts",0,K,"getPaneCurrentCommand",0,I,"getPaneDetailInfo",0,O,"getPaneTitle",0,$,"getSessionCwd",0,v,"getSessionPanePid",0,E,"hasSession",0,S,"killServer",0,q,"killSession",0,w,"listSessions",0,f,"resolveExistingDir",0,g,"scanSessions",0,_,"sendBracketedPaste",0,A,"sendKeys",0,M,"sendRawKeys",0,k,"workspaceSessionName",0,(e,t,r)=>`pt-${e}-${t}-${r}`],459015)},360190,e=>{"use strict";var t=e.i(926747),r=e.i(190406),a=e.i(244898),n=e.i(262950),i=e.i(459015);let s=(0,e.i(25146).createLogger)("tmux"),l=async(e,t)=>{if("POST"!==e.method)return t.setHeader("Allow","POST"),t.status(405).json({error:"Method not allowed"});let{session:r,input:a}=e.body;if(!r||!a)return t.status(400).json({error:"session and input parameters required"});if(!await (0,i.hasSession)(r))return t.status(404).json({error:"Session not found"});try{return await (0,i.sendRawKeys)(r,a),t.status(200).json({ok:!0})}catch(e){return s.error(`send-input failed: ${e instanceof Error?e.message:e}`),t.status(500).json({error:"Failed to send input"})}};e.s(["default",0,l],943074);var o=e.i(943074),u=e.i(7031),p=e.i(181927),c=e.i(846432);let d=(0,n.hoist)(o,"default"),m=(0,n.hoist)(o,"config"),f=new a.PagesAPIRouteModule({definition:{kind:r.RouteKind.PAGES_API,page:"/api/tmux/send-input",pathname:"/api/tmux/send-input",bundlePath:"",filename:""},userland:o,distDir:".next",relativeProjectDir:""});async function h(e,r,a){a.requestMeta&&(0,c.setRequestMeta)(e,a.requestMeta),f.isDev&&(0,c.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let n="/api/tmux/send-input";n=n.replace(/\/index$/,"")||"/";let i=await f.prepare(e,r,{srcPage:n});if(!i){r.statusCode=400,r.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve());return}let{query:s,params:l,prerenderManifest:o,routerServerContext:d}=i;try{let t,a=e.method||"GET",i=(0,u.getTracer)(),c=i.getActiveScopeSpan(),m=!!(null==d?void 0:d.isWrappedByNextServer),h=f.instrumentationOnRequestError.bind(f),y=async u=>f.render(e,r,{query:{...s,...l},params:l,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:o.preview,propagateError:!1,dev:f.isDev,page:"/api/tmux/send-input",internalRevalidate:null==d?void 0:d.revalidate,onError:(...t)=>h(e,...t)}).finally(()=>{if(!u)return;u.setAttributes({"http.status_code":r.statusCode,"next.rsc":!1});let e=i.getRootSpanAttributes();if(!e)return;if(e.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${e.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=e.get("next.route");if(s){let e=`${a} ${s}`;u.setAttributes({"next.route":s,"http.route":s,"next.span_name":e}),u.updateName(e),t&&t!==u&&(t.setAttribute("http.route",s),t.updateName(e))}else u.updateName(`${a} ${n}`)});m&&c?await y(c):(t=i.getActiveScopeSpan(),await i.withPropagatedContext(e.headers,()=>i.trace(p.BaseServerSpan.handleRequest,{spanName:`${a} ${n}`,kind:u.SpanKind.SERVER,attributes:{"http.method":a,"http.target":e.url}},y),void 0,!m))}catch(e){if(f.isDev)throw e;(0,t.sendError)(r,500,"Internal Server Error")}finally{null==a.waitUntil||a.waitUntil.call(a,Promise.resolve())}}e.s(["config",0,m,"default",0,d,"handler",0,h],360190)}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__04cr_m8._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},130146,(e,t,r)=>{t.exports=e.x("pino-28069d5257187539",()=>require("pino-28069d5257187539"))},25146,e=>{"use strict";var t=e.i(130146),r=e.i(814747),s=e.i(446786);let a=r.default.join(s.default.homedir(),".purplemux","logs"),i=process.env.LOG_LEVEL||"info",o=(e=>{if(!e)return{};let t={};for(let r of e.split(",")){let[e,s]=r.split("=").map(e=>e.trim());e&&s&&(t[e]=s)}return t})(process.env.LOG_LEVELS),n=["trace","debug","info","warn","error","fatal"],l=globalThis;if(!l.__ptRootLogger){let e=[i,...Object.values(o)].reduce((e,t)=>n.indexOf(t)<n.indexOf(e)?t:e,"fatal");l.__ptRootLogger=(0,t.default)({level:e,transport:{targets:[{target:"pino-roll",level:e,options:{file:r.default.join(a,"purplemux"),frequency:"daily",dateFormat:"yyyy-MM-dd",limit:{count:7},mkdir:!0}},{target:"pino-pretty",level:e,options:{colorize:!0,ignore:"pid,hostname,module",translateTime:"HH:MM:ss",messageFormat:"[{module}] {msg}"}}]}})}let u=l.__ptRootLogger;e.s(["createLogger",0,e=>{let t=u.child({module:e});return t.level=o[e]??i,t}])},688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},406461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},524836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},921517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},504446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},755004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},792509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},500874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},845994,e=>{"use strict";var t=e.i(924868),r=e.i(814747),s=e.i(446786),a=e.i(254799),i=e.i(666126);(0,e.i(25146).createLogger)("config");let o=r.default.join(s.default.homedir(),".purplemux"),n=r.default.join(o,"config.json"),l=globalThis;l.__ptConfigLock||(l.__ptConfigLock=Promise.resolve());let u=async e=>{let t,r=new Promise(e=>{t=e}),s=l.__ptConfigLock;l.__ptConfigLock=r,await s;try{return await e()}finally{t()}},p=()=>({updatedAt:new Date().toISOString()}),d=async()=>{try{let e=await t.default.readFile(n,"utf-8");return JSON.parse(e)}catch{return null}},c=async e=>{let{updatedAt:r,...s}=e,a=JSON.stringify(s);if(l.__ptConfigContentCache===a)return;e.updatedAt=new Date().toISOString();let o=n+".tmp";try{await t.default.writeFile(o,JSON.stringify(e,null,2),{mode:384}),await t.default.rename(o,n)}catch(e){throw await t.default.unlink(o).catch(()=>{}),e}l.__ptConfigContentCache=a,(0,i.broadcastSync)({type:"config"})},f="scrypt:",g=e=>"string"==typeof e&&e.startsWith(f),h=async e=>{let t=a.default.randomBytes(16),r=await new Promise((r,s)=>{a.default.scrypt(e,t,64,(e,t)=>{e?s(e):r(t)})});return`${f}${t.toString("hex")}:${r.toString("hex")}`},m=async(e,t)=>{if(!g(t))return!1;let[,r,s]=t.split(":"),i=Buffer.from(r,"hex"),o=Buffer.from(s,"hex"),n=await new Promise((t,r)=>{a.default.scrypt(e,i,o.length,(e,s)=>{e?r(e):t(s)})});return a.default.timingSafeEqual(n,o)},y=async()=>await d()??p(),x=async e=>u(async()=>{let t=await d()??p();Object.assign(t,e),await c(t)}),S=async()=>{let e=await d();return!g(e?.authPassword)},v=async()=>{let e=await d();return e?.dangerouslySkipPermissions??!1};e.s(["generateSecret",0,()=>a.default.randomBytes(32).toString("hex"),"getConfig",0,y,"getDangerouslySkipPermissions",0,v,"hashPassword",0,h,"needsSetup",0,S,"updateConfig",0,x,"verifyPassword",0,m])},716018,e=>{"use strict";e.i(446786);e.s(["isBoundToLocalhostOnly",0,()=>"127.0.0.1"===(process.env.__PMUX_BOUND_HOST??"0.0.0.0"),"updateAccessFromConfig",0,e=>{process.env.HOST?.trim()||(process.env.__PMUX_NETWORK_ACCESS=e)}],716018)},127579,e=>{"use strict";var t=e.i(926747),r=e.i(190406),s=e.i(244898),a=e.i(262950),i=e.i(845994),o=e.i(716018),n=e.i(772601);let l=Promise.resolve(),u=async(e,t)=>{if("GET"===e.method){let r=await (0,i.needsSetup)(),s=r&&!!process.env.INIT_PASSWORD&&!await (0,n.verifyRequestSession)(e.headers.cookie),a="string"==typeof process.env.HOST&&process.env.HOST.trim().length>0;return t.status(200).json({needsSetup:r,requiresAuth:s,hostEnvLocked:a})}if("POST"===e.method){let r,{authPassword:s,locale:a,appTheme:u,terminalTheme:p,dangerouslySkipPermissions:d,networkAccess:c}=e.body??{};if(!s||"string"!=typeof s)return t.status(400).json({error:"Password is required."});let f=["localhost","tailscale","all"].includes(c)?c:void 0,g=new Promise(e=>{r=e}),h=l;l=g,await h;try{if(!await (0,i.needsSetup)())return t.status(400).json({error:"Setup already completed."});if(process.env.INIT_PASSWORD&&!await (0,n.verifyRequestSession)(e.headers.cookie))return t.status(401).json({error:"Authentication required."});let r=await (0,i.hashPassword)(s),l=(0,i.generateSecret)();return await (0,i.updateConfig)({authPassword:r,authSecret:l,locale:a||"en",appTheme:u||"dark",terminalTheme:p,dangerouslySkipPermissions:d??!1,...f?{networkAccess:f}:{}}),f&&(0,o.updateAccessFromConfig)(f),process.env.AUTH_PASSWORD=r,process.env.NEXTAUTH_SECRET=l,delete process.env.INIT_PASSWORD,t.status(200).json({ok:!0})}finally{r()}}return t.setHeader("Allow","GET, POST"),t.status(405).json({error:"Method not allowed"})};e.s(["default",0,u],750388);var p=e.i(750388),d=e.i(7031),c=e.i(181927),f=e.i(846432);let g=(0,a.hoist)(p,"default"),h=(0,a.hoist)(p,"config"),m=new s.PagesAPIRouteModule({definition:{kind:r.RouteKind.PAGES_API,page:"/api/auth/setup",pathname:"/api/auth/setup",bundlePath:"",filename:""},userland:p,distDir:".next",relativeProjectDir:""});async function y(e,r,s){s.requestMeta&&(0,f.setRequestMeta)(e,s.requestMeta),m.isDev&&(0,f.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let a="/api/auth/setup";a=a.replace(/\/index$/,"")||"/";let i=await m.prepare(e,r,{srcPage:a});if(!i){r.statusCode=400,r.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve());return}let{query:o,params:n,prerenderManifest:l,routerServerContext:u}=i;try{let t,s=e.method||"GET",i=(0,d.getTracer)(),p=i.getActiveScopeSpan(),f=!!(null==u?void 0:u.isWrappedByNextServer),g=m.instrumentationOnRequestError.bind(m),h=async p=>m.render(e,r,{query:{...o,...n},params:n,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:l.preview,propagateError:!1,dev:m.isDev,page:"/api/auth/setup",internalRevalidate:null==u?void 0:u.revalidate,onError:(...t)=>g(e,...t)}).finally(()=>{if(!p)return;p.setAttributes({"http.status_code":r.statusCode,"next.rsc":!1});let e=i.getRootSpanAttributes();if(!e)return;if(e.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${e.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let o=e.get("next.route");if(o){let e=`${s} ${o}`;p.setAttributes({"next.route":o,"http.route":o,"next.span_name":e}),p.updateName(e),t&&t!==p&&(t.setAttribute("http.route",o),t.updateName(e))}else p.updateName(`${s} ${a}`)});f&&p?await h(p):(t=i.getActiveScopeSpan(),await i.withPropagatedContext(e.headers,()=>i.trace(c.BaseServerSpan.handleRequest,{spanName:`${s} ${a}`,kind:d.SpanKind.SERVER,attributes:{"http.method":s,"http.target":e.url}},h),void 0,!f))}catch(e){if(m.isDev)throw e;(0,t.sendError)(r,500,"Internal Server Error")}finally{null==s.waitUntil||s.waitUntil.call(s,Promise.resolve())}}e.s(["config",0,h,"default",0,g,"handler",0,y],127579)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__06j59n1._.js.map