seshmux 0.1.3 → 0.1.4
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.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +1 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page.js +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/app/page-cd707a4bc18d9497.js +1 -0
- package/.next/standalone/package.json +2 -2
- package/.next/standalone/seshmux-server.js +154 -124
- package/bin/seshmux.js +46 -2
- package/package.json +2 -2
- package/.next/standalone/.next/static/chunks/app/page-7104066577bb8e5f.js +0 -1
- /package/.next/standalone/.next/static/{kPJ9M1iZAJK4qUIbW1h9b → Xjuy0Fy4Y1goqBeK0eRol}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{kPJ9M1iZAJK4qUIbW1h9b → Xjuy0Fy4Y1goqBeK0eRol}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"622":{"*":{"id":"2146","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"1603","name":"*","chunks":[],"async":false}},"3727":{"*":{"id":"5729","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"5170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"2263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"8922","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"4160","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"8495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"9234","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"7526","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"Hanken_Grotesk\",\"arguments\":[{\"subsets\":[\"latin\"],\"weight\":[\"400\",\"500\",\"600\",\"700\"],\"variable\":\"--font-hanken-grotesk\",\"display\":\"swap\"}],\"variableName\":\"hankenGrotesk\"}":{"id":7855,"name":"*","chunks":["177","static/chunks/app/layout-73ab52e2fc6aa0b9.js"],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"JetBrains_Mono\",\"arguments\":[{\"subsets\":[\"latin\"],\"weight\":[\"400\",\"500\",\"600\"],\"variable\":\"--font-jetbrains-mono\",\"display\":\"swap\"}],\"variableName\":\"jetbrainsMono\"}":{"id":6473,"name":"*","chunks":["177","static/chunks/app/layout-73ab52e2fc6aa0b9.js"],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/styles/globals.scss":{"id":7183,"name":"*","chunks":["177","static/chunks/app/layout-73ab52e2fc6aa0b9.js"],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/app/page.tsx":{"id":3727,"name":"*","chunks":["622","static/chunks/622-9f52eac2dc80a502.js","974","static/chunks/app/page-
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"622":{"*":{"id":"2146","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"1603","name":"*","chunks":[],"async":false}},"3727":{"*":{"id":"5729","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"5170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"2263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"8922","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"4160","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"8495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"9234","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"7526","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"Hanken_Grotesk\",\"arguments\":[{\"subsets\":[\"latin\"],\"weight\":[\"400\",\"500\",\"600\",\"700\"],\"variable\":\"--font-hanken-grotesk\",\"display\":\"swap\"}],\"variableName\":\"hankenGrotesk\"}":{"id":7855,"name":"*","chunks":["177","static/chunks/app/layout-73ab52e2fc6aa0b9.js"],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"JetBrains_Mono\",\"arguments\":[{\"subsets\":[\"latin\"],\"weight\":[\"400\",\"500\",\"600\"],\"variable\":\"--font-jetbrains-mono\",\"display\":\"swap\"}],\"variableName\":\"jetbrainsMono\"}":{"id":6473,"name":"*","chunks":["177","static/chunks/app/layout-73ab52e2fc6aa0b9.js"],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/styles/globals.scss":{"id":7183,"name":"*","chunks":["177","static/chunks/app/layout-73ab52e2fc6aa0b9.js"],"async":false},"/Users/blakestagner/Documents/GitHub/seshmux/app/page.tsx":{"id":3727,"name":"*","chunks":["622","static/chunks/622-9f52eac2dc80a502.js","974","static/chunks/app/page-cd707a4bc18d9497.js"],"async":false}},"entryCSSFiles":{"/Users/blakestagner/Documents/GitHub/seshmux/":[],"/Users/blakestagner/Documents/GitHub/seshmux/app/layout":[{"inlined":false,"path":"static/css/87ea7bb93e0b1326.css"}],"/Users/blakestagner/Documents/GitHub/seshmux/app/page":[{"inlined":false,"path":"static/css/bc53104caace13e7.css"}]},"rscModuleMapping":{"622":{"*":{"id":"1384","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"3597","name":"*","chunks":[],"async":false}},"3727":{"*":{"id":"7742","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"9748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"3041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"1170","name":"*","chunks":[],"async":false}},"7183":{"*":{"id":"6796","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"6893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"9576","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"3679","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-f60e08036f4baea4.js" defer=""></script><script src="/_next/static/chunks/framework-2c534e0e662575a2.js" defer=""></script><script src="/_next/static/chunks/main-98e65ff50a82d8a2.js" defer=""></script><script src="/_next/static/chunks/pages/_app-7d307437aca18ad4.js" defer=""></script><script src="/_next/static/chunks/pages/_error-cb2a52f75f2162e2.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-f60e08036f4baea4.js" defer=""></script><script src="/_next/static/chunks/framework-2c534e0e662575a2.js" defer=""></script><script src="/_next/static/chunks/main-98e65ff50a82d8a2.js" defer=""></script><script src="/_next/static/chunks/pages/_app-7d307437aca18ad4.js" defer=""></script><script src="/_next/static/chunks/pages/_error-cb2a52f75f2162e2.js" defer=""></script><script src="/_next/static/Xjuy0Fy4Y1goqBeK0eRol/_buildManifest.js" defer=""></script><script src="/_next/static/Xjuy0Fy4Y1goqBeK0eRol/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"Xjuy0Fy4Y1goqBeK0eRol","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"fYqFqB2EGYcB0bTvKC+qcqIyc+Owhz8bKPvoH1Ve2QI="}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{63:e=>{e.exports={option:"OptionRow_option__0nzqQ",danger:"OptionRow_danger__Xz_hi",icon:"OptionRow_icon__XXuha",optBody:"OptionRow_optBody__C8Zjr",optTitle:"OptionRow_optTitle__wQFt2",optDesc:"OptionRow_optDesc__yZbSA"}},418:e=>{e.exports={list:"ProjectVisibilityList_list__hCu7t",row:"ProjectVisibilityList_row__dIEln",body:"ProjectVisibilityList_body__x4_pE",name:"ProjectVisibilityList_name__kRltN",path:"ProjectVisibilityList_path__6vcd7",empty:"ProjectVisibilityList_empty__T0D35"}},419:e=>{e.exports={toast:"ApprovalToast_toast__vkof6",show:"ApprovalToast_show__SslAw",body:"ApprovalToast_body__CZg_p",head:"ApprovalToast_head__WOVVz",toolName:"ApprovalToast_toolName__xIExK",count:"ApprovalToast_count__Fh6OV",question:"ApprovalToast_question__dnkx4",cwd:"ApprovalToast_cwd__8pMSJ",actions:"ApprovalToast_actions__15Pr0",allow:"ApprovalToast_allow__aQKEV"}},546:e=>{e.exports={track:"MeterBar_track__MOP_x",ctx:"MeterBar_ctx__B71sk",accent:"MeterBar_accent__Awq0L",fill:"MeterBar_fill__FsBkh",live:"MeterBar_live__n8R9C",warm:"MeterBar_warm___PzCL",hot:"MeterBar_hot__UZDGr"}},551:e=>{e.exports={iconBtn:"IconButton_iconBtn__gTg3x",boxed:"IconButton_boxed__qh3cE",reveal:"IconButton_reveal__O2OoN",active:"IconButton_active__qWmBA",disabled:"IconButton_disabled__aNLC_"}},634:e=>{e.exports={results:"SearchDropdown_results__DTZC1",open:"SearchDropdown_open__Ej4v7",group:"SearchDropdown_group__TbHFw",item:"SearchDropdown_item__WuEMG",title:"SearchDropdown_title__ZzL2N",meta:"SearchDropdown_meta__cWIkD",empty:"SearchDropdown_empty__cwn_2"}},1210:e=>{e.exports={panel:"TeamPanel_panel__oxW95",head:"TeamPanel_head__DnNOO",title:"TeamPanel_title__yb477",note:"TeamPanel_note__iR5Ng",back:"TeamPanel_back__dcRYM",empty:"TeamPanel_empty__p1Qv_",roster:"TeamPanel_roster__zDQG6",row:"TeamPanel_row__j_Dsm",name:"TeamPanel_name__41AiS",model:"TeamPanel_model__Xmgmj",check:"TeamPanel_check__BThWp",tokens:"TeamPanel_tokens__L7Bss",duration:"TeamPanel_duration__njpeV",transcriptWrap:"TeamPanel_transcriptWrap__j_SlJ"}},1784:e=>{e.exports={composer:"EmptyComposer_composer__Sr_y5",headline:"EmptyComposer_headline__27IDk",lead:"EmptyComposer_lead__kvviH",pickerWrap:"EmptyComposer_pickerWrap__z324c",pickerIcon:"EmptyComposer_pickerIcon__xXoY_",promptBox:"EmptyComposer_promptBox__NUnhq",promptFoot:"EmptyComposer_promptFoot___m_sx",footChip:"EmptyComposer_footChip__sGXbv",footSpacer:"EmptyComposer_footSpacer__xc5SO",foot:"EmptyComposer_foot__SaZsK",footNote:"EmptyComposer_footNote__OSP_y",hint:"EmptyComposer_hint__BPm5U"}},2204:e=>{e.exports={toggle:"Toggle_toggle__91gMJ",on:"Toggle_on__wta3F"}},2250:e=>{e.exports={seg:"Segmented_seg__g6pvg",default:"Segmented_default__49vtq",active:"Segmented_active__DwnUk",raised:"Segmented_raised__vJpgG"}},2488:e=>{e.exports={chip:"BranchLabel_chip__mW0GY"}},2668:e=>{e.exports={transcript:"Scratchpad_transcript__k4jgQ",inner:"Scratchpad_inner__HURrf",header:"Scratchpad_header__AxOwU",title:"Scratchpad_title__SwL5q",meta:"Scratchpad_meta__eeyrF",actions:"Scratchpad_actions__sZdUi",loading:"Scratchpad_loading__EL1Nw",entry:"Scratchpad_entry__jhQ54",entryHead:"Scratchpad_entryHead__8JMVa",time:"Scratchpad_time__ljDJw",body:"Scratchpad_body__uFX78",note:"Scratchpad_note__U_tu0"}},2977:e=>{e.exports={viewer:"SubagentViewer_viewer__30rxK",viewerHead:"SubagentViewer_viewerHead__xYMJT",viewerTitle:"SubagentViewer_viewerTitle__1g_AM",tree:"SubagentViewer_tree__DkbpH",group:"SubagentViewer_group__Zz0OC",groupHead:"SubagentViewer_groupHead__W8srX",row:"SubagentViewer_row__nhu0g",rowSelected:"SubagentViewer_rowSelected__hwNSD",caret:"SubagentViewer_caret__6GmB_",caretSpacer:"SubagentViewer_caretSpacer__DBHZ1",errorGlyph:"SubagentViewer_errorGlyph__iLFOw",label:"SubagentViewer_label__RiE8r",sep:"SubagentViewer_sep__QS4Ga",segment:"SubagentViewer_segment__QWiVp",footer:"SubagentViewer_footer__YbbdT",detail:"SubagentViewer_detail__rfCkP",detailHeader:"SubagentViewer_detailHeader__NYMth",backRow:"SubagentViewer_backRow__X3lLb",title:"SubagentViewer_title__7cLBv",metaRow:"SubagentViewer_metaRow__vRtj1",loading:"SubagentViewer_loading__9l3Jt",section:"SubagentViewer_section__OWE9N",sectionHead:"SubagentViewer_sectionHead__FkIp_",prompt:"SubagentViewer_prompt__WnsBA",promptClamped:"SubagentViewer_promptClamped__NTdpK",showMore:"SubagentViewer_showMore__CiQyy",activityRow:"SubagentViewer_activityRow__aVNN6",activityTool:"SubagentViewer_activityTool__zhJLg",activitySummary:"SubagentViewer_activitySummary__u_2rm",outcomeBlock:"SubagentViewer_outcomeBlock__G7nFW",prose:"SubagentViewer_prose__FQPxq",files:"SubagentViewer_files__nx1OT",fileChip:"SubagentViewer_fileChip__nTI_X",badge:"SubagentViewer_badge__vCmli",badgeOk:"SubagentViewer_badgeOk__k7c8E",badgeFail:"SubagentViewer_badgeFail__8iQJg",badgeLabel:"SubagentViewer_badgeLabel__FVuzU",rawToggle:"SubagentViewer_rawToggle__YKF0H",rawPre:"SubagentViewer_rawPre__mu5G5"}},3149:e=>{e.exports={tabbar:"Tabs_tabbar__ioD_i",tab:"Tabs_tab___vEoD",active:"Tabs_active__r3evU",groupEnd:"Tabs_groupEnd__VWwha",groupStart:"Tabs_groupStart__s4nrw",label:"Tabs_label__Y2HyX",closeWrap:"Tabs_closeWrap__TwBBA",dragging:"Tabs_dragging__oL92W",dragOver:"Tabs_dragOver__nwzSA"}},3273:e=>{e.exports={row:"MetaLine_row__DF1eE"}},3433:e=>{e.exports={overlay:"WorkspaceFinishPrompt_overlay__IYe8q",modal:"WorkspaceFinishPrompt_modal__M4E0_",title:"WorkspaceFinishPrompt_title__1684R",meta:"WorkspaceFinishPrompt_meta__J0Ce6",confirmRow:"WorkspaceFinishPrompt_confirmRow__5_FEw",confirmLabel:"WorkspaceFinishPrompt_confirmLabel__gJzgR",error:"WorkspaceFinishPrompt_error__rfDvE",foot:"WorkspaceFinishPrompt_foot__o3JW_"}},3727:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>nm});var s=n(5155),a=n(2115);function i(e){return{tabs:[],activeTab:null,view:"tabs",settingsOpen:!1,provFilter:"all",railSort:"updated",projects:[],config:{pins:[],projectOrder:[],hidden:[],theme:"dark",accent:"iris",settings:{}},showHidden:!1,...e}}function l(e){let t=[],n=new Set;for(let s of e){if(n.has(s.id))continue;let a=s.linked?e.find(e=>!e.linked&&e.sessionId===s.linkSrc):s,i=null!=a?a:s,l=[i,...e.filter(e=>e.linked&&i.sessionId&&e.linkSrc===i.sessionId)];l.forEach(e=>n.add(e.id)),t.push(l)}return t}function r(e,t){switch(t.type){case"openSession":{let n=e.tabs.find(e=>e.sessionId===t.sessionId),s=t=>("grid"===e.view||"agents"===e.view)&&"term"!==t?"tabs":e.view;if(n)return{...e,tabs:o(e.tabs,n.id),activeTab:n.id,settingsOpen:!1,view:s(n.kind)};let a={id:"tab-"+t.sessionId,kind:t.kind,sessionId:t.sessionId,projectId:t.projectId,label:t.label,provider:t.provider,status:t.status};return{...e,tabs:[...e.tabs,a],activeTab:a.id,settingsOpen:!1,view:s(a.kind)}}case"openTerm":{var n;let s=e.tabs.find(e=>"term"===e.kind&&e.ptyId===t.ptyId);if(s)return{...e,tabs:o(e.tabs,s.id),activeTab:s.id,settingsOpen:!1};let a={id:"term-"+t.ptyId,kind:"term",ptyId:t.ptyId,projectId:t.projectId,label:t.label,provider:t.provider,branch:null!=(n=t.branch)?n:null,status:"live",linked:t.linked,linkedKind:t.linkedKind,linkSrc:t.linkSrc,sessionId:t.sessionId,isTeamLead:t.isTeamLead};return{...e,tabs:[...e.tabs,a],activeTab:a.id,settingsOpen:!1}}case"setTabTeam":return{...e,tabs:e.tabs.map(e=>e.id===t.tabId?{...e,isTeamLead:!0,teamName:t.teamName}:e)};case"resumeToTerm":return{...e,tabs:e.tabs.map(e=>e.id===t.tabId?{...e,kind:"term",ptyId:t.ptyId,status:"live"}:e),activeTab:t.tabId,settingsOpen:!1};case"setTermStatus":return{...e,tabs:e.tabs.map(e=>"term"===e.kind&&e.ptyId===t.ptyId?{...e,status:t.status,...t.ni?{ni:t.ni}:{},...t.ts?{lastStatusTs:t.ts}:{}}:e)};case"markUnviewed":return{...e,tabs:e.tabs.map(e=>"term"===e.kind&&e.ptyId===t.ptyId?{...e,unviewed:!0}:e)};case"setTermCtx":return{...e,tabs:e.tabs.map(e=>e.sessionId===t.sessionId?{...e,ctx:t.ctx}:e)};case"setTabSession":return{...e,tabs:e.tabs.map(e=>e.id===t.tabId?{...e,sessionId:t.sessionId}:e)};case"openSettings":return{...e,settingsOpen:!0};case"closeSettings":return{...e,settingsOpen:!1};case"openScratchpad":{let n="tab-scratch-"+t.projectId,s=e.tabs.find(e=>e.id===n);if(s)return{...e,activeTab:s.id,settingsOpen:!1};let a={id:n,kind:"scratchpad",projectId:t.projectId,label:t.label};return{...e,tabs:[...e.tabs,a],activeTab:a.id,settingsOpen:!1}}case"openPlanoff":{let n="tab-planoff-"+t.projectId+"-"+Date.now(),s={id:n,kind:"planoff",projectId:t.projectId,label:t.label};return{...e,tabs:[...e.tabs,s],activeTab:n,settingsOpen:!1}}case"closeTab":{let n=e.tabs.findIndex(e=>e.id===t.id);if(n<0)return e;let s=e.tabs.filter(e=>e.id!==t.id),a=e.activeTab===t.id?s.length?s[Math.max(0,n-1)].id:null:e.activeTab;return{...e,tabs:s,activeTab:a}}case"activateTab":return{...e,tabs:o(e.tabs,t.id),activeTab:t.id,settingsOpen:!1};case"moveTabBlock":return{...e,tabs:function(e,t,n){if(t===n)return e;let s=l(e),a=s.findIndex(e=>e.some(e=>e.id===t)),i=s.findIndex(e=>e.some(e=>e.id===n));if(a<0||i<0||a===i)return e;let[r]=s.splice(a,1);return s.splice(i>a?i-1:i,0,r),s.flat()}(e.tabs,t.from,t.to)};case"setView":return{...e,view:t.view};case"setProvFilter":return{...e,provFilter:t.filter};case"setRailSort":return{...e,railSort:t.sort};case"collapseAllProjects":return{...e,projects:e.projects.map(e=>e.open?{...e,open:!1,loaded:0,filter:""}:e)};case"toggleProject":return{...e,projects:e.projects.map(e=>e.id===t.id?{...e,...function(e){let t=!e.open;return t?{open:t}:{open:t,loaded:0,filter:""}}(e)}:e)};case"setFilter":return{...e,projects:e.projects.map(e=>e.id===t.id?{...e,filter:t.filter}:e)};case"loadOlder":return{...e,projects:e.projects.map(e=>{var n,s;return e.id===t.id?{...e,loaded:(null!=(n=e.loaded)?n:0)+(null!=(s=t.chunk)?s:5)}:e})};case"togglePin":return{...e,config:{...e.config,pins:e.config.pins.includes(t.id)?e.config.pins.filter(e=>e!==t.id):[...e.config.pins,t.id]}};case"toggleHidden":return{...e,config:{...e.config,hidden:e.config.hidden.includes(t.id)?e.config.hidden.filter(e=>e!==t.id):[...e.config.hidden,t.id]}};case"setShowHidden":return{...e,showHidden:t.on};case"moveProject":{let n=e.projects.findIndex(e=>e.id===t.from),s=e.projects.findIndex(e=>e.id===t.to);if(n<0||s<0)return e;let a=[...e.projects],[i]=a.splice(n,1);return a.splice(s,0,i),{...e,projects:a}}case"setProjects":return{...e,projects:t.projects};case"setConfig":return{...e,config:{...i().config,...t.config,pins:Array.isArray(t.config.pins)?t.config.pins:[],projectOrder:Array.isArray(t.config.projectOrder)?t.config.projectOrder:[],hidden:Array.isArray(t.config.hidden)?t.config.hidden:[]}};default:return e}}function o(e,t){return e.map(e=>e.id===t&&e.unviewed?{...e,unviewed:!1}:e)}let c=(0,a.createContext)(null);function d(e){let{children:t,initial:n}=e,[s,l]=(0,a.useReducer)(r,i(n));return(0,a.createElement)(c.Provider,{value:{state:s,dispatch:l}},t)}function u(){let e=(0,a.useContext)(c);if(!e)throw Error("useAppState must be used within AppStateProvider");return e}var p=n(7935),m=n(4205),h=n.n(m);function _(e){let{value:t,onChange:n,placeholder:a,kbdHint:i,multiline:l}=e;return l?(0,s.jsx)("textarea",{className:"".concat(h().input," ").concat(h().area),value:t,onChange:e=>n(e.target.value),placeholder:a,rows:l}):(0,s.jsxs)("span",{className:h().wrap,children:[(0,s.jsx)("input",{className:"".concat(h().input).concat(i?" ".concat(h().hasHint):""),type:"text",value:t,onChange:e=>n(e.target.value),placeholder:a}),i?(0,s.jsx)("span",{className:h().kbd,children:i}):null]})}var g=n(2250),v=n.n(g);function x(e){let{options:t,value:n,onChange:a,className:i,variant:l="default"}=e,r=[v().seg,v()[l],i].filter(Boolean).join(" ");return(0,s.jsx)("div",{className:r,children:t.map(e=>(0,s.jsx)("button",{type:"button",className:e.id===n?v().active:"",onClick:()=>a(e.id),children:e.label},e.id))})}var f=n(9557),j=n.n(f);function b(e){let{status:t,size:n=8,pulse:a=!0}=e,i="live"===t&&a?" ".concat(j().pulsing):"";return(0,s.jsx)("span",{className:"".concat(j().dot," ").concat(j()[t]).concat(i),style:{width:n,height:n}})}var y=n(551),w=n.n(y);function k(e){let{label:t,revealOnHover:n=!1,active:a=!1,variant:i="bare",size:l=30,disabled:r=!1,disabledReason:o,onClick:c,children:d}=e,u="boxed"===i?w().boxed:"",p=r&&o?o:t;return(0,s.jsx)("button",{type:"button","aria-label":p,title:p,disabled:r,className:"".concat(w().iconBtn," ").concat(u," ").concat(n?w().reveal:""," ").concat(a?w().active:""," ").concat(r?w().disabled:""),style:"boxed"===i?{width:l,height:l}:void 0,onClick:c,children:d})}var N=n(634),S=n.n(N);function C(e){let{open:t,query:n,hits:i,onPick:l}=e,r=new Map;for(let e of i){var o;let t=null!=(o=r.get(e.project))?o:[];t.push(e),r.set(e.project,t)}return(0,s.jsx)("div",{className:"".concat(S().results," ").concat(t?S().open:""),children:0===i.length?(0,s.jsx)("div",{className:S().empty,children:"No matches — searches every transcript in your agent session stores."}):[...r.entries()].map(e=>{let[t,i]=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:S().group,children:t}),i.map(e=>(0,s.jsxs)("button",{type:"button",className:S().item,onClick:()=>l(e),children:[(0,s.jsx)("div",{className:S().title,children:function(e,t){if(!t)return e;let n=e.toLowerCase().indexOf(t.toLowerCase());return n<0?e:(0,s.jsxs)(a.Fragment,{children:[e.slice(0,n),(0,s.jsx)("mark",{children:e.slice(n,n+t.length)}),e.slice(n+t.length)]})}(e.title||"untitled",n)}),(0,s.jsx)("div",{className:S().meta,children:e.snippet})]},e.sessionId))]},t)})})}var T=n(7674);function I(e,t){let n={working:0,waiting:0,done:0,idle:0},s=[];for(let p of e){var a,i,l,r,o,c,d,u;if("term"!==p.kind||!p.ptyId)continue;let e=function(e){var t,n;let s=null!=(n=e.ni)?n:({live:"working",waiting:"waiting",done:"idle"})[null!=(t=e.status)?t:"live"];return"waiting"===s?"waiting":e.unviewed?"done":"working"===s?"working":"idle"}(p);n[e]+=1;let m=p.sessionId?null==t?void 0:t.get(p.sessionId):void 0;s.push({tabId:p.id,title:(null==m?void 0:m.title)||p.label,provider:p.provider,branch:null!=(l=null!=(i=p.branch)?i:null==m?void 0:m.branch)?l:null,isWorkspace:!!(null==(a=null!=(r=p.branch)?r:null==m?void 0:m.branch)?void 0:a.startsWith("agent/")),lastActivityTs:null!=(c=null!=(o=p.lastStatusTs)?o:null==m?void 0:m.mtime)?c:null,startedAt:null!=(d=null==m?void 0:m.startedAt)?d:null,durationMs:null!=(u=null==m?void 0:m.durationMs)?u:null,bucket:e})}return{counts:n,cards:s}}var M=n(5517),P=n.n(M);let E=[{id:"tabs",label:"Tabs"},{id:"grid",label:"Grid"},{id:"agents",label:"Agents"}];function R(e){let{onPickHit:t,onOpenCustomizations:n}=e,{state:i,dispatch:l}=u(),[r,o]=(0,a.useState)(""),[c,d]=(0,a.useState)([]),[m,h]=(0,a.useState)(!1),[g,v]=(0,a.useState)("dark"),f=(0,a.useRef)(null);(0,a.useEffect)(()=>{v(document.documentElement.dataset.theme||"dark")},[]),(0,a.useEffect)(()=>{let e=r.trim();if(e.length<2)return void h(!1);let t=!1;return(0,p.search)(e).then(e=>{t||(d(e),h(!0))}),()=>{t=!0}},[r]),(0,a.useEffect)(()=>{let e=e=>{f.current&&!f.current.contains(e.target)&&h(!1)},t=e=>{if((e.metaKey||e.ctrlKey)&&"k"===e.key){var t,n;e.preventDefault(),null==(n=f.current)||null==(t=n.querySelector("input"))||t.focus()}"Escape"===e.key&&h(!1)};return document.addEventListener("click",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("click",e),document.removeEventListener("keydown",t)}},[]);let{counts:j}=I(i.tabs),y=[{key:"working",dot:"live"},{key:"waiting",dot:"waiting"},{key:"done",dot:"unviewed"},{key:"idle",dot:"neutral"}].filter(e=>j[e.key]>0);return(0,s.jsxs)("nav",{className:P().nav,children:[(0,s.jsxs)("div",{className:P().logo,children:[(0,s.jsx)("span",{className:P().mark,children:"s"}),"seshmux"]}),(0,s.jsxs)("div",{className:P().searchWrap,ref:f,children:[(0,s.jsx)("span",{className:P().searchIcon,children:"⌕"}),(0,s.jsx)(_,{value:r,onChange:o,placeholder:"Search all transcripts",kbdHint:"⌘K"}),(0,s.jsx)(C,{open:m,query:r,hits:c,onPick:function(e){h(!1),o(""),t(e)}})]}),(0,s.jsxs)("div",{className:P().right,children:[(0,s.jsx)(x,{options:E,value:i.view,onChange:e=>l({type:"setView",view:e})}),y.length>0?(0,s.jsx)("button",{type:"button",className:P().liveBadge,title:"Open agents view",onClick:()=>l({type:"setView",view:"agents"}),children:y.map((e,t)=>(0,s.jsxs)("span",{className:P().badgeText,children:[t>0?(0,s.jsx)("span",{className:P().dot,children:"\xb7"}):null,(0,s.jsx)(b,{status:e.dot,size:7}),"\xa0",j[e.key]," ",e.key]},e.key))}):null,(0,s.jsx)(k,{label:"Toggle light / dark",variant:"boxed",onClick:function(){(0,T.toggleTheme)(),v(document.documentElement.dataset.theme||"dark")},children:"dark"===g?(0,s.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:(0,s.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}):(0,s.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":!0,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,s.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),(0,s.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),(0,s.jsx)("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),(0,s.jsx)("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),(0,s.jsx)("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),(0,s.jsx)("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),(0,s.jsx)("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),(0,s.jsx)("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]})}),(0,s.jsx)(k,{label:"Customizations",variant:"boxed",onClick:n,children:(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[(0,s.jsx)("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),(0,s.jsx)("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),(0,s.jsx)("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),(0,s.jsx)("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"})]})}),(0,s.jsx)(k,{label:"Settings",variant:"boxed",active:i.settingsOpen,onClick:()=>l({type:i.settingsOpen?"closeSettings":"openSettings"}),children:(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":!0,children:[(0,s.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,s.jsx)("line",{x1:"4",y1:"16",x2:"20",y2:"16"}),(0,s.jsx)("circle",{cx:"9",cy:"8",r:"2.6",fill:"var(--bg-panel)"}),(0,s.jsx)("circle",{cx:"15",cy:"16",r:"2.6",fill:"var(--bg-panel)"})]})})]})]})}var L=n(6416),A=n.n(L),O=n(63),B=n.n(O);function D(e){let{icon:t,title:n,desc:a,danger:i,disabled:l,onClick:r}=e;return(0,s.jsxs)("button",{type:"button",className:"".concat(B().option," ").concat(i?B().danger:""),disabled:l,onClick:r,children:[(0,s.jsx)("span",{className:B().icon,children:t}),(0,s.jsxs)("span",{className:B().optBody,children:[(0,s.jsx)("span",{className:B().optTitle,children:n}),(0,s.jsx)("span",{className:B().optDesc,children:a})]})]})}var H=n(2204),V=n.n(H);function F(e){let{on:t,onChange:n,disabled:a}=e;return(0,s.jsx)("button",{type:"button",role:"switch","aria-checked":t,disabled:a,className:"".concat(V().toggle," ").concat(t?V().on:""),onClick:()=>n(!t)})}var W=n(418),z=n.n(W);function G(e){let{projects:t,hidden:n,onToggleHidden:a}=e,i=t.filter(e=>!e.missing);return 0===i.length?(0,s.jsx)("div",{className:z().empty,children:"No projects yet."}):(0,s.jsx)("div",{className:z().list,children:i.map(e=>(0,s.jsxs)("div",{className:z().row,children:[(0,s.jsxs)("span",{className:z().body,children:[(0,s.jsx)("span",{className:z().name,children:e.name}),(0,s.jsx)("span",{className:z().path,children:e.path})]}),(0,s.jsx)(F,{on:!n.includes(e.id),onChange:()=>a(e.id)})]},e.id))})}var U=n(4558);let J=(0,a.createContext)(["claude"]),K=J.Provider;function q(){return(0,a.useContext)(J)}function Z(e,t){var n;return null!=(n=t.find(t=>t!==e))?n:null}let Q={claude:"Claude",codex:"Codex"};var X=n(9750),Y=n.n(X);let $={claude:{glyph:"✳",name:"Claude Code"},codex:{glyph:"⬡",name:"Codex CLI"}};function ee(e){let{provider:t,withName:n=!1}=e;if(!(q().length>1))return null;let{glyph:a,name:i}=$[t];return(0,s.jsxs)("span",{className:"".concat(Y().badge," ").concat(Y()[t]),title:i,children:[a,n?" ".concat(t):""]})}var et=n(8448),en=n.n(et);function es(e){let{variant:t="default",disabled:n,title:a,className:i,onClick:l,children:r}=e;return(0,s.jsx)("button",{type:"button",className:"".concat(en().btn," ").concat(en()[t]," ").concat(null!=i?i:""),disabled:n,title:a,onClick:l,children:r})}var ea=n(3273),ei=n.n(ea);function el(e){let{left:t,right:n}=e;return(0,s.jsxs)("div",{className:ei().row,children:[(0,s.jsx)("span",{children:t}),null!=n?(0,s.jsx)("span",{children:n}):null]})}var er=n(5755),eo=n.n(er);function ec(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}let ed=new U.xI.Renderer;function eu(e){return U.xI.parse(ec(e),{async:!1,breaks:!0})}function ep(e){let{tool:t}=e,[n,i]=(0,a.useState)(!1);return(0,s.jsxs)("div",{className:"".concat(eo().toolcall," ").concat(n?eo().open:""),children:[(0,s.jsxs)("button",{type:"button",className:eo().toolcallHead,onClick:()=>i(e=>!e),children:[(0,s.jsx)("span",{className:eo().caret,children:"▶"}),(0,s.jsx)("span",{className:eo().toolName,children:t.name}),(0,s.jsx)("span",{className:eo().argPreview,children:t.input})]}),n?(0,s.jsx)("div",{className:eo().toolcallBody,children:t.output}):null]})}function em(e){let{msg:t}=e,n="user"===t.role;return(0,s.jsxs)("div",{className:"".concat(eo().msg," ").concat(n?eo().user:eo().assistant),children:[(0,s.jsx)("div",{className:eo().role,children:t.role}),n?null:(0,s.jsx)("span",{className:eo().dot,"aria-hidden":"true"}),(0,s.jsxs)("div",{className:eo().content,children:[n?(0,s.jsx)("div",{className:eo().body,children:t.text}):(0,s.jsx)("div",{className:eo().body,dangerouslySetInnerHTML:{__html:eu(t.text)}}),t.tools.map((e,t)=>(0,s.jsx)(ep,{tool:e},t))]})]})}function eh(e){var t;let{projectId:n,sessionId:i,title:l,provider:r}=e,{state:o,dispatch:c}=u(),[d,m]=(0,a.useState)(null),[h,_]=(0,a.useState)(null),[g,v]=(0,a.useState)(!1),[x,f]=(0,a.useState)(200),[j,b]=(0,a.useState)(!1),[y,w]=(0,a.useState)(!1),[k,N]=(0,a.useState)(!1),[S,C]=(0,a.useState)(null),[T,I]=(0,a.useState)(null),[M,P]=(0,a.useState)(0),E=o.projects.find(e=>e.id===n),R=Z(null!=(t=null!=r?r:null==E?void 0:E.provider)?t:"claude",q()),L=R?$[R]:null;async function A(){if(E){w(!0),C(null);try{let{tabMeta:e}=await (0,p.startSession)({projectPath:E.path,provider:null!=r?r:E.provider,mode:"new",resumeId:i}),t="tab-"+i;c({type:"resumeToTerm",tabId:t,ptyId:e.ptyId}),(0,p.getTeamMembers)(i).then(e=>e&&c({type:"setTabTeam",tabId:t,teamName:e.teamName})).catch(()=>{})}catch(e){w(!1),C(e.message||"resume failed")}}}async function O(e){if(E&&!k){N(!0);try{var t,s;let{ptyId:a,tabMeta:l,provider:r}=await e(n,i);c({type:"openTerm",ptyId:a,projectId:n,label:E.name,provider:r,linked:null==(t=l.linked)||t,linkedKind:l.linkedKind,linkSrc:null!=(s=l.linkSrc)?s:i})}catch(e){C(e.message||"bridge failed")}finally{N(!1)}}}(0,a.useEffect)(()=>{m(null),I(null),f(200),(0,p.getTranscript)(n,i).then(e=>{m(e.msgs),_(e.ctx),v(!!e.truncated)}).catch(e=>I(e.message||"failed to load transcript"))},[n,i,M]);let B=(0,a.useMemo)(()=>d?d.slice(Math.max(0,d.length-x)):[],[d,x]),D=d?d.length-B.length:0;return(0,s.jsx)("div",{className:eo().transcript,children:(0,s.jsxs)("div",{className:eo().inner,children:[(0,s.jsxs)("div",{className:eo().header,children:[(0,s.jsx)("h1",{className:eo().title,children:l}),(0,s.jsxs)("div",{className:eo().meta,children:[r?(0,s.jsx)(ee,{provider:r,withName:!0}):null,(0,s.jsx)(el,{left:h?"".concat(Math.round(h.tokens/1e3),"k/").concat(Math.round(h.window/1e3),"k tokens \xb7 ").concat(h.pct,"%"):"no context data"})]}),(0,s.jsxs)("div",{className:eo().actions,children:[(0,s.jsx)(es,{variant:"primary",disabled:y||!E,onClick:A,children:"↻ Resume session"}),L&&!o.tabs.some(e=>e.linked&&"handoff"===e.linkedKind&&e.linkSrc===i)?(0,s.jsxs)(es,{disabled:k||!E,onClick:()=>O(p.bridgeHandoff),children:["⇄ Continue in ",L.glyph," ",R]}):null,L?(0,s.jsxs)(es,{disabled:k||!E,onClick:()=>O(p.bridgeReview),children:["⊙ Review with ",L.glyph," ",R]}):null,(0,s.jsx)(es,{onClick:function(){navigator.clipboard.writeText(i).then(()=>{b(!0),setTimeout(()=>b(!1),1500)})},children:j?"Copied":"Copy session id"})]}),S?(0,s.jsx)("div",{className:eo().actionError,children:S}):null]}),T?(0,s.jsxs)("div",{className:eo().loading,children:["Failed to load transcript: ",T,(0,s.jsx)(es,{onClick:()=>P(e=>e+1),children:"Retry"})]}):null===d?(0,s.jsx)("div",{className:eo().loading,children:"Loading transcript…"}):0===d.length?(0,s.jsx)("div",{className:eo().loading,children:"No messages in this transcript."}):(0,s.jsxs)(s.Fragment,{children:[g?(0,s.jsx)("div",{className:eo().loadMore,children:"Older history truncated — this session is too large to load in full. Showing the most recent messages."}):null,D>0?(0,s.jsxs)("button",{type:"button",className:eo().loadMore,onClick:()=>f(e=>e+200),children:["Load ",Math.min(200,D)," earlier messages (",D," hidden)"]}):null,B.map((e,t)=>(0,s.jsx)(em,{msg:e},t))]})]})})}ed.link=function(e){var t;let n=(null!=(t=e.href)?t:"").trim(),s=/^(https?:|mailto:|#|\/)/i.test(n)?n:"#",a=e.title?' title="'.concat(ec(e.title),'"'):"";return'<a href="'.concat(ec(s),'"').concat(a,' rel="noopener noreferrer">').concat(this.parser.parseInline(e.tokens),"</a>")},U.xI.use({renderer:ed});let e_=[{key:"overview",label:"Overview"},{key:"agents",label:"Agents"},{key:"skills",label:"Skills"},{key:"instructions",label:"Instructions"},{key:"hooks",label:"Hooks"},{key:"mcp",label:"MCP Servers"},{key:"projects",label:"Projects"}],eg=[{key:"agents",label:"Agents",icon:"◈"},{key:"skills",label:"Skills",icon:"✦"},{key:"instructions",label:"Instructions",icon:"▤"},{key:"hooks",label:"Hooks",icon:"⚡"},{key:"mcp",label:"MCP Servers",icon:"⬡"}],ev={claude:"✳",codex:"⬡"};function ex(e){var t;let{open:n,onClose:i,projectId:l,projectName:r,projects:o=[],hidden:c=[],onToggleHidden:d}=e,[u,m]=(0,a.useState)("overview"),[h,_]=(0,a.useState)(l?"project":"global"),[g,v]=(0,a.useState)(null),[x,f]=(0,a.useState)(null),[j,b]=(0,a.useState)(0),[y,w]=(0,a.useState)(null),[N,S]=(0,a.useState)("overview");if((0,a.useEffect)(()=>{n&&(v(null),f(null),(0,p.getCustomizations)(h,l).then(v).catch(e=>f(e.message||"failed to load")))},[n,h,l,j]),(0,a.useEffect)(()=>{n&&(m("overview"),w(null),_(l?"project":"global"))},[n,l]),(0,a.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"===e.key&&i()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,i]),!n)return null;function C(e){w(null),m(e)}let T=g&&"overview"!==u&&"projects"!==u?g[u]:[];return(0,s.jsx)("div",{className:A().overlay,onClick:e=>e.target===e.currentTarget&&i(),children:(0,s.jsxs)("div",{className:A().modal,role:"dialog","aria-modal":"true","aria-label":"Customizations",children:[(0,s.jsxs)("div",{className:A().header,children:[(0,s.jsx)("h3",{className:A().title,children:"Customizations"}),(0,s.jsx)("span",{className:A().scopeLabel,children:"project"===h?null!=r?r:"Project":"Global"}),(0,s.jsx)(k,{label:"Close",onClick:i,children:"\xd7"})]}),(0,s.jsxs)("div",{className:A().body,children:[(0,s.jsx)("nav",{className:A().nav,children:e_.map(e=>(0,s.jsx)("button",{type:"button",className:"".concat(A().navItem," ").concat(u===e.key?A().navItemActive:""),onClick:()=>C(e.key),children:e.label},e.key))}),(0,s.jsx)("div",{className:A().content,children:"projects"===u?(0,s.jsx)(G,{projects:o,hidden:c,onToggleHidden:e=>null==d?void 0:d(e)}):x?(0,s.jsxs)("div",{className:A().empty,children:["Failed to load: ",x," ",(0,s.jsx)(es,{onClick:()=>b(e=>e+1),children:"Retry"})]}):g?"overview"===u?(0,s.jsxs)("div",{className:A().overviewGrid,children:[eg.map(e=>{let t=g[e.key];return(0,s.jsxs)("button",{type:"button",className:A().card,onClick:()=>C(e.key),children:[(0,s.jsx)("span",{className:A().cardIcon,children:e.icon}),(0,s.jsx)("span",{className:A().cardTitle,children:e.label}),(0,s.jsx)("span",{className:A().cardCount,children:t.length}),(0,s.jsx)("span",{className:A().cardGlyphs,children:[...new Set(t.map(e=>e.provider))].map(e=>{var t;return null!=(t=ev[e])?t:""}).join(" ")})]},e.key)}),(0,s.jsxs)("button",{type:"button",className:A().card,onClick:()=>C("projects"),children:[(0,s.jsx)("span",{className:A().cardIcon,children:"▦"}),(0,s.jsx)("span",{className:A().cardTitle,children:"Projects"})]})]}):y&&N===u?(0,s.jsxs)("div",{className:A().detail,children:[(0,s.jsx)(k,{label:"Back",onClick:()=>w(null),children:"←"}),(0,s.jsx)("h4",{className:A().detailTitle,children:y.title}),(0,s.jsx)("div",{className:A().detailPath,children:y.filePath}),y.parseError?(0,s.jsx)("span",{className:A().badge,children:"parse error"}):null,y.parseError||"hooks"===(t=u)||"mcp"===t?(0,s.jsx)("pre",{className:A().pre,children:y.content}):(0,s.jsx)("div",{className:A().markdown,dangerouslySetInnerHTML:{__html:eu(y.content)}})]}):0===T.length?(0,s.jsxs)("div",{className:A().empty,children:["Nothing found in ","project"===h?null!=r?r:"this project":"global"," scope."]}):(0,s.jsx)("div",{className:A().list,children:T.map(e=>{var t,n,a,i;return(0,s.jsx)(D,{icon:null!=(t=ev[e.provider])?t:"\xb7",title:e.title,desc:(0,s.jsxs)(s.Fragment,{children:["hooks"===u?"".concat(null!=(n=e.meta.event)?n:""," \xb7 ").concat(null!=(a=e.meta.command)?a:""):"mcp"===u?null!=(i=e.meta.command)?i:"":e.meta.description||e.filePath,e.parseError?(0,s.jsx)("span",{className:A().badge,children:"parse error"}):null]}),onClick:()=>{S(u),w(e)}},e.id)})}):(0,s.jsx)("div",{className:A().empty,children:"Loading…"})})]})]})})}var ef=n(9265),ej=n.n(ef);function eb(e){let{open:t,onClose:n,title:i,children:l}=e;return((0,a.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"===e.key&&n()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,n]),t)?(0,s.jsx)("div",{className:ej().overlay,onClick:e=>e.target===e.currentTarget&&n(),children:(0,s.jsxs)("div",{className:ej().modal,role:"dialog","aria-modal":"true","aria-label":i,children:[(0,s.jsxs)("div",{className:ej().header,children:[(0,s.jsx)("h3",{className:ej().title,children:i}),(0,s.jsx)(k,{label:"Close",onClick:n,children:"\xd7"})]}),(0,s.jsx)("div",{className:ej().body,children:l})]})}):null}function ey(e){let{open:t,onClose:n,projects:a,hidden:i,onToggleHidden:l}=e;return(0,s.jsx)(eb,{open:t,onClose:n,title:"Projects",children:(0,s.jsx)(G,{projects:a,hidden:i,onToggleHidden:l})})}var ew=n(7020),ek=n.n(ew);let eN={claude:"✳ Claude Code",codex:"⬡ Codex",both:"✳⬡ Both"};function eS(e){var t,n;let{projectPath:i,projectName:l,providers:r,onStart:o,onPlanoff:c,onStartWorkspace:d,onStartTeam:u,teamsGateOk:m,onClose:h}=e,[_,g]=(0,a.useState)(null!=(t=r[0])?t:"claude"),[v,f]=(0,a.useState)({}),j="both"===_,b=v[j?null!=(n=r[0])?n:"claude":_];(0,a.useEffect)(()=>{(0,p.getEnvCommands)().then(f).catch(()=>{})},[]);let y=[{mode:"new",icon:"❯",title:"Fresh session",desc:b?"".concat(b.fresh," — new conversation in this repo"):"new conversation in this repo"},{mode:"continue",icon:"↻",title:"Continue last",desc:b?"".concat(b.continue," — pick up most recent session"):"pick up most recent session"},...(null==b?void 0:b.hasPlan)?[{mode:"plan",icon:"▤",title:"Plan mode",desc:"".concat(b.plan," — read-only planning")}]:[]],w=r.length>1?[...r.map(e=>({id:e,label:eN[e]})),{id:"both",label:eN.both}]:[];return(0,s.jsx)("div",{className:ek().overlay,onClick:e=>e.target===e.currentTarget&&h(),children:(0,s.jsxs)("div",{className:ek().modal,role:"dialog","aria-modal":"true",children:[(0,s.jsx)("h3",{className:ek().title,children:"New session"}),(0,s.jsx)("div",{className:ek().path,children:i||l}),w.length?(0,s.jsx)(x,{className:ek().provSeg,options:w,value:_,onChange:e=>g(e)}):null,j?(0,s.jsx)(D,{icon:"⚖",title:"Plan-off — parallel planning",desc:"✳ and ⬡ each draft a plan read-only \xb7 compare side by side \xb7 winner executes",onClick:()=>null==c?void 0:c()}):y.map(e=>(0,s.jsx)(D,{icon:e.icon,title:e.title,desc:e.desc,onClick:()=>o(_,e.mode)},e.mode)),!j&&d?(0,s.jsx)(D,{icon:"⑃",title:"New workspace",desc:"".concat(b?"".concat(b.fresh," — "):"","isolated git worktree + branch, own working tree"),onClick:()=>d(_,"new")}):null,!j&&"claude"===_&&u?(0,s.jsx)(D,{icon:"⚑",title:"Team…",desc:m?"assemble a claude-swarm team for this task":"Teams needs teammateMode: tmux",disabled:!m,onClick:()=>u()}):null,(0,s.jsx)("button",{className:ek().cancel,onClick:h,children:"Cancel"})]})})}var eC=n(4163),eT=n.n(eC);let eI=[{id:"opus",label:"Opus"},{id:"sonnet",label:"Sonnet"},{id:"haiku",label:"Haiku"}],eM=0,eP=()=>({id:"m".concat(++eM),name:"",role:"",model:"sonnet"});function eE(e){let{projectName:t,onStart:n,onClose:i}=e,[l,r]=(0,a.useState)("predefined"),[o,c]=(0,a.useState)([]),[d,u]=(0,a.useState)(null),[m,h]=(0,a.useState)(""),[g,v]=(0,a.useState)(!1),[f,j]=(0,a.useState)(null),[b,y]=(0,a.useState)(""),[w,k]=(0,a.useState)([eP()]),[N,S]=(0,a.useState)(!1);function C(e,t){k(n=>n.map(n=>n.id===e?{...n,...t}:n))}(0,a.useEffect)(()=>{(0,p.getTeamTemplates)().then(c).catch(()=>{})},[]);let T=b.trim()&&w.some(e=>e.name.trim()&&e.role.trim())&&m.trim(),I=!!d&&m.trim();async function M(){let e="predefined"===l&&d&&m.trim()?{template:{name:d.name,members:d.members},task:m.trim()}:"inline"===l&&T?function(e,t,n,s){let a=t.map(e=>({name:e.name.trim(),role:e.role.trim(),model:e.model})).filter(e=>e.name&&e.role);return{inline:{name:e.trim(),members:a},task:n.trim(),saveTemplate:s}}(b,w,m,N):null;if(e&&!g){v(!0),j(null);try{await n(e)}catch(e){j(e instanceof Error?e.message:"failed to start team")}finally{v(!1)}}}return(0,s.jsxs)(eb,{open:!0,onClose:i,title:"Team…",children:[(0,s.jsx)("div",{className:eT().path,children:t}),(0,s.jsx)(x,{className:eT().modeSeg,options:[{id:"predefined",label:"Predefined"},{id:"inline",label:"New team"}],value:l,onChange:e=>r(e)}),"predefined"===l?(0,s.jsxs)("div",{className:eT().body,children:[0===o.length?(0,s.jsx)("div",{className:eT().empty,children:"No saved teams yet — switch to “New team” to define one."}):o.map(e=>(0,s.jsx)(D,{icon:"⚑",title:e.name,desc:"".concat(e.members.length," member").concat(1===e.members.length?"":"s"," \xb7 ").concat(e.members.map(e=>e.role).join(", ")),onClick:()=>u(e),disabled:(null==d?void 0:d.name)===e.name},e.name)),d?(0,s.jsxs)("div",{className:eT().taskWrap,children:[(0,s.jsxs)("div",{className:eT().label,children:["Task for ",d.name]}),(0,s.jsx)(_,{value:m,onChange:h,placeholder:"what should the team do?",multiline:3})]}):null]}):(0,s.jsxs)("div",{className:eT().body,children:[(0,s.jsx)("div",{className:eT().label,children:"Team name"}),(0,s.jsx)(_,{value:b,onChange:y,placeholder:"e.g. Recon"}),(0,s.jsx)("div",{className:eT().label,children:"Members"}),w.map(e=>{var t;return(0,s.jsxs)("div",{className:eT().memberRow,children:[(0,s.jsx)(_,{value:e.name,onChange:t=>C(e.id,{name:t}),placeholder:"name"}),(0,s.jsx)(_,{value:e.role,onChange:t=>C(e.id,{role:t}),placeholder:"role"}),(0,s.jsx)(x,{options:eI,value:null!=(t=e.model)?t:"sonnet",onChange:t=>C(e.id,{model:t})}),(0,s.jsx)(es,{variant:"ghost",title:"Remove member",onClick:()=>k(t=>t.length>1?t.filter(t=>t.id!==e.id):t),children:"\xd7"})]},e.id)}),(0,s.jsx)(es,{variant:"ghost",onClick:()=>k(e=>[...e,eP()]),children:"+ add member"}),(0,s.jsx)("div",{className:eT().label,children:"Task"}),(0,s.jsx)(_,{value:m,onChange:h,placeholder:"what should the team do?",multiline:3}),(0,s.jsxs)("div",{className:eT().saveRow,children:[(0,s.jsx)("span",{className:eT().label,children:"Save as template"}),(0,s.jsx)(F,{on:N,onChange:S})]})]}),f?(0,s.jsx)("div",{className:eT().error,children:f}):null,(0,s.jsx)("div",{className:eT().foot,children:(0,s.jsx)(es,{variant:"primary",disabled:g||("predefined"===l?!I:!T),onClick:()=>void M(),children:g?"Starting…":"Start"})})]})}var eR=n(6286),eL=n.n(eR);let eA=(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,s.jsx)("line",{x1:"7",y1:"12",x2:"17",y2:"12"}),(0,s.jsx)("line",{x1:"10",y1:"18",x2:"14",y2:"18"})]});function eO(e){let{on:t}=e;return(0,s.jsx)("span",{className:eL().check,children:t?"✓":""})}function eB(){let{state:e,dispatch:t}=u(),[n,i]=(0,a.useState)(!1),l=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!n)return;let e=e=>{l.current&&!l.current.contains(e.target)&&i(!1)},t=e=>"Escape"===e.key&&i(!1);return document.addEventListener("click",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("click",e),document.removeEventListener("keydown",t)}},[n]);let r=e.railSort,o=e=>t({type:"setRailSort",sort:e});return(0,s.jsxs)("div",{className:eL().wrap,ref:l,children:[(0,s.jsx)(k,{label:"Filter & sort",variant:"boxed",size:28,active:n,onClick:()=>i(e=>!e),children:eA}),n?(0,s.jsxs)("div",{className:eL().menu,role:"menu",children:[(0,s.jsxs)("button",{type:"button",className:eL().item,disabled:!0,role:"menuitem",children:[(0,s.jsx)("span",{className:eL().check}),(0,s.jsx)("span",{className:eL().itemLabel,children:"Filter"}),(0,s.jsx)("span",{className:eL().chevron,children:"›"})]}),(0,s.jsx)("div",{className:eL().sep}),(0,s.jsxs)("button",{type:"button",className:eL().item,role:"menuitemradio","aria-checked":"created"===r,onClick:()=>o("created"),children:[(0,s.jsx)(eO,{on:"created"===r}),(0,s.jsx)("span",{className:eL().itemLabel,children:"Sort by Created"})]}),(0,s.jsxs)("button",{type:"button",className:eL().item,role:"menuitemradio","aria-checked":"updated"===r,onClick:()=>o("updated"),children:[(0,s.jsx)(eO,{on:"updated"===r}),(0,s.jsx)("span",{className:eL().itemLabel,children:"Sort by Updated"})]}),(0,s.jsx)("div",{className:eL().sep}),(0,s.jsxs)("button",{type:"button",className:eL().item,role:"menuitemradio","aria-checked":!0,disabled:!0,children:[(0,s.jsx)(eO,{on:!0}),(0,s.jsx)("span",{className:eL().itemLabel,children:"Group by Workspace"})]}),(0,s.jsxs)("button",{type:"button",className:eL().item,role:"menuitemradio","aria-checked":!1,disabled:!0,children:[(0,s.jsx)("span",{className:eL().check}),(0,s.jsx)("span",{className:eL().itemLabel,children:"Group by Time"})]}),(0,s.jsx)("div",{className:eL().sep}),(0,s.jsxs)("button",{type:"button",className:eL().item,role:"menuitemradio","aria-checked":!0,disabled:!0,children:[(0,s.jsx)(eO,{on:!0}),(0,s.jsx)("span",{className:eL().itemLabel,children:"Show Recent Sessions"})]}),(0,s.jsxs)("button",{type:"button",className:eL().item,role:"menuitemradio","aria-checked":!1,disabled:!0,children:[(0,s.jsx)("span",{className:eL().check}),(0,s.jsx)("span",{className:eL().itemLabel,children:"Show All Sessions"})]}),(0,s.jsxs)("button",{type:"button",className:eL().item,role:"menuitemcheckbox","aria-checked":e.showHidden,onClick:()=>t({type:"setShowHidden",on:!e.showHidden}),children:[(0,s.jsx)(eO,{on:e.showHidden}),(0,s.jsx)("span",{className:eL().itemLabel,children:"Show Hidden Projects"})]}),(0,s.jsx)("div",{className:eL().sep}),(0,s.jsxs)("button",{type:"button",className:eL().item,role:"menuitem",onClick:()=>{t({type:"collapseAllProjects"}),i(!1)},children:[(0,s.jsx)("span",{className:eL().check}),(0,s.jsx)("span",{className:eL().itemLabel,children:"Collapse All Groups"})]})]}):null]})}var eD=n(5657),eH=n.n(eD);let eV=(0,s.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("path",{d:"M12 17v5"}),(0,s.jsx)("path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1z"})]});function eF(e,t,n){let s=new Set(t.pins),a=new Map(t.projectOrder.map((e,t)=>[e,t]));return[...e].sort((e,t)=>{var i,l;let r=+!s.has(e.id),o=+!s.has(t.id);if(r!==o)return r-o;let c="created"===n?e.createdAt:e.updatedAt,d="created"===n?t.createdAt:t.updatedAt;if(c!==d)return d-c;let u=null!=(i=a.get(e.id))?i:Number.MAX_SAFE_INTEGER,p=null!=(l=a.get(t.id))?l:Number.MAX_SAFE_INTEGER;return u!==p?u-p:e.name.localeCompare(t.name)})}function eW(e){var t,i;let{jumpTo:l,onJumped:r,onOpenCustomizations:o,onOpenProjectVisibility:c,width:d}=e,{state:m,dispatch:h}=u(),{config:g,provFilter:v,railSort:x}=m,f=m.projects.filter(e=>!e.missing&&(m.showHidden||!g.hidden.includes(e.id))),j=null!=(i=null==(t=m.tabs.find(e=>e.id===m.activeTab))?void 0:t.sessionId)?i:null,[y,w]=(0,a.useState)({}),[N,S]=(0,a.useState)(null),[C,T]=(0,a.useState)(null),[I,M]=(0,a.useState)({}),[P,E]=(0,a.useState)(""),[R,L]=(0,a.useState)(null),[A,O]=(0,a.useState)(null),[B,D]=(0,a.useState)(void 0);(0,a.useEffect)(()=>{(0,p.getEnvTeams)().then(e=>{var t,n;return D(null!=(n=null==(t=e.claude)?void 0:t.teammateMode)?n:void 0)}).catch(()=>{})},[]);let H="tmux"===B||"iterm2"===B,V=q(),F=V.length<2?[]:[{id:"all",label:"All"},...V.map(e=>({id:e,label:Q[e]}))],W=V.length>1;async function z(e,t){if(L(null),R)try{let{tabMeta:n}=await (0,p.startSession)({projectPath:R.path,provider:e,mode:t});h({type:"openTerm",ptyId:n.ptyId,projectId:R.id,label:R.name,provider:e})}catch(e){}}async function G(e){if(!A)return;let{tabMeta:t}=await (0,p.startTeam)({...e,projectId:A.id});O(null),h({type:"openTerm",ptyId:t.ptyId,projectId:A.id,label:A.name,provider:"claude",isTeamLead:!0}),h({type:"setView",view:"tabs"})}let[U,J]=(0,a.useState)(null);async function K(e,t,n){if(!U){J(e.id);try{let{tabMeta:s,workspace:a}=await (0,p.createWorkspace)(e.id,t,n);h({type:"openTerm",ptyId:s.ptyId,projectId:e.id,label:"".concat(e.name," \xb7 ").concat(a.branch),provider:s.provider,branch:a.branch})}catch(e){}finally{J(null)}}}async function Z(e,t){e.stopPropagation(),await K(t)}async function X(e){let t=await (0,p.getSessions)(e,{limit:5});w(n=>({...n,[e]:{sessions:t,cursor:t.length?t[t.length-1].mtime:null,hasMore:5===t.length,loaded:!0}}))}async function Y(e){let t=y[e];if(!t||null==t.cursor)return;let n=await (0,p.getSessions)(e,{before:t.cursor,limit:5});w(s=>({...s,[e]:{sessions:[...t.sessions,...n],cursor:n.length?n[n.length-1].mtime:t.cursor,hasMore:5===n.length,loaded:!0}}))}function $(e){var t;h({type:"toggleProject",id:e.id}),e.open||(null==(t=y[e.id])?void 0:t.loaded)||X(e.id)}function ee(e){h({type:"setConfig",config:e}),Promise.resolve().then(n.bind(n,7935)).then(t=>{let{putConfig:n}=t;return n(e)})}function et(e,t){e.stopPropagation(),h({type:"togglePin",id:t});let n=g.pins.includes(t)?g.pins.filter(e=>e!==t):[...g.pins,t];ee({...g,pins:n})}function en(e,t){return(e.title||"").toLowerCase().includes(t)||(e.branch||"").toLowerCase().includes(t)}function es(e){var t,n,s;let a=y[e.id],i=null!=(n=null==a?void 0:a.sessions)?n:[],l="all"===v?i:i.filter(e=>e.provider===v),r=P.trim().toLowerCase(),o=null==(t=I[e.id])?void 0:t.toLowerCase();r&&(l=l.filter(e=>en(e,r))),o&&(l=l.filter(e=>en(e,o)));let c=!!r||!!o;return{shown:l,hasMore:!c&&null!=(s=null==a?void 0:a.hasMore)&&s,filtered:c}}(0,a.useEffect)(()=>{if("all"!==v)for(let t of f){var e;(null==(e=y[t.id])?void 0:e.loaded)||X(t.id)}},[v,f]),(0,a.useEffect)(()=>{if(P.trim())for(let t of f){var e;(null==(e=y[t.id])?void 0:e.loaded)||X(t.id)}},[P,f]),(0,a.useEffect)(()=>{var e;if(!l)return;let t=f.find(e=>e.id===l.projectId);t&&!t.open&&h({type:"toggleProject",id:l.projectId}),(null==(e=y[l.projectId])?void 0:e.loaded)||X(l.projectId),null==r||r()},[l]);let ea=eF(f,g,x),ei=P.trim().length>0,el="all"===v?ea:ea.filter(e=>{var t,n;return(null!=(n=null==(t=e.sessionCountByProvider)?void 0:t[v])?n:0)>0});ei&&(el=el.filter(e=>es(e).shown.length>0));let er=f.length,eo=f.some(e=>e.sessionCount>0);return(0,s.jsxs)("aside",{className:eH().rail,style:null!=d?{width:d,flex:"0 0 ".concat(d,"px")}:void 0,children:[(0,s.jsxs)("div",{className:eH().head,children:[(0,s.jsx)("h2",{children:"Projects"}),(0,s.jsx)("span",{className:eH().scan,children:er})]}),(0,s.jsxs)("div",{className:eH().provFilter,children:[F.length?(0,s.jsx)("div",{className:eH().provChips,role:"group","aria-label":"Filter by provider",children:F.map(e=>(0,s.jsx)("button",{type:"button",className:"".concat(eH().chip," ").concat(v===e.id?eH().chipActive:""),"aria-pressed":v===e.id,onClick:()=>h({type:"setProvFilter",filter:e.id}),children:e.label},e.id))}):null,(0,s.jsx)(eB,{}),(0,s.jsx)(k,{label:"Project visibility",variant:"boxed",size:28,onClick:()=>null==c?void 0:c(),children:"⋯"})]}),(0,s.jsx)("div",{className:eH().railFilter,children:(0,s.jsx)(_,{value:P,onChange:E,placeholder:"filter sessions…"})}),(0,s.jsx)("div",{className:eH().body,children:0===er?(0,s.jsx)("div",{className:eH().empty,children:"No projects yet — start a session with claude or codex in a repo to see it here."}):eo?ei&&0===el.length?(0,s.jsxs)("div",{className:eH().empty,children:["No sessions match “",P.trim(),"”."]}):el.map(e=>{var t,n,a,i;let l=y[e.id],{shown:r,hasMore:c,filtered:d}=es(e),u=e.open||ei,p=g.pins.includes(e.id),w=g.hidden.includes(e.id),P=m.tabs.filter(t=>"term"===t.kind&&t.projectId===e.id),E=P.some(e=>"waiting"===e.status),R=P.some(e=>e.unviewed),A=P.some(e=>"waiting"!==e.status)||(null!=(n=null==l?void 0:l.sessions)?n:[]).some(e=>e.live),B=e.sessionCount>6;return(0,s.jsxs)("div",{className:"".concat(eH().proj," ").concat(C===e.id?eH().dragOver:""," ").concat(N===e.id?eH().dragging:""," ").concat(w?eH().hidden:""),onDragOver:t=>{N&&N!==e.id&&(t.preventDefault(),T(e.id))},onDrop:t=>{t.preventDefault(),function(e){if(!N||N===e){S(null),T(null);return}let t=eF(f,g,x).map(e=>e.id),n=t.indexOf(N),s=t.indexOf(e);if(n<0||s<0)return;let a=[...t],[i]=a.splice(n,1);a.splice(s,0,i);let l=g.pins.includes(e),r=g.pins.includes(N),o=g.pins;r!==l&&(o=l?[...g.pins,N]:g.pins.filter(e=>e!==N)),h({type:"moveProject",from:N,to:e}),ee({...g,projectOrder:a,pins:o}),S(null),T(null)}(e.id)},onDragLeave:()=>T(null),children:[(0,s.jsxs)("div",{role:"button",tabIndex:0,className:eH().projHead,draggable:!0,title:e.path,onClick:()=>$(e),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),$(e))},onDragStart:()=>S(e.id),onDragEnd:()=>{S(null),T(null)},children:[(0,s.jsxs)("span",{className:eH().headRow,children:[(0,s.jsx)("span",{className:"".concat(eH().caret," ").concat(u?eH().caretOpen:""),children:"▶"}),(0,s.jsx)("span",{className:eH().name,children:e.name}),p?(0,s.jsx)("span",{className:eH().pinnedAlways,children:(0,s.jsx)(k,{label:"Unpin",active:!0,onClick:t=>et(t,e.id),children:eV})}):null,A?(0,s.jsx)(b,{status:E?"waiting":R?"unviewed":"live",size:7}):null,(0,s.jsx)("span",{className:eH().count,children:"all"===v?e.sessionCount:null!=(a=null==(t=e.sessionCountByProvider)?void 0:t[v])?a:0})]}),(0,s.jsxs)("span",{className:eH().actionsRow,children:[p?null:(0,s.jsx)(k,{label:"Pin to top",onClick:t=>et(t,e.id),children:eV}),(0,s.jsx)(k,{label:"Shared scratchpad",onClick:t=>{t.stopPropagation(),h({type:"openScratchpad",projectId:e.id,label:"".concat(e.name," \xb7 scratchpad")})},children:"≡"}),(0,s.jsx)(k,{label:"New session",onClick:t=>{t.stopPropagation(),L(e)},children:"+"}),(0,s.jsx)(k,{label:"New workspace (isolated worktree)",onClick:t=>Z(t,e),children:U===e.id?"…":"⊕"}),"claude"===e.provider?(0,s.jsx)(k,{label:"Team…",disabled:!H,disabledReason:"Teams needs teammateMode: tmux",onClick:t=>{t.stopPropagation(),O(e)},children:"⚑"}):null,(0,s.jsx)(k,{label:"Customizations",onClick:t=>{t.stopPropagation(),null==o||o({projectId:e.id,projectName:e.name})},children:"▦"})]})]}),(0,s.jsxs)("div",{className:"".concat(eH().sessions," ").concat(u?eH().open:""),children:[B?(0,s.jsx)("div",{className:eH().filterWrap,children:(0,s.jsx)(_,{value:null!=(i=I[e.id])?i:"",onChange:t=>M(n=>({...n,[e.id]:t})),placeholder:"filter…"})}):null,r.map(e=>{var t;return(0,s.jsxs)("button",{type:"button",className:"".concat(eH().sess," ").concat(e.id===j?eH().selected:""),onClick:()=>h({type:"openSession",sessionId:e.id,projectId:e.projectId,label:e.title||e.branch||"untitled",kind:"transcript",provider:e.provider,status:e.live?"live":"done"}),children:[(0,s.jsx)("span",{className:eH().sessDot,children:(0,s.jsx)(b,{status:function(e,t){let n=t.find(t=>t.sessionId===e.id);return(null==n?void 0:n.status)==="waiting"?"waiting":(null==n?void 0:n.unviewed)?"unviewed":e.live?"live":"neutral"}(e,P),size:7})}),(0,s.jsxs)("span",{className:eH().sessInfo,children:[(0,s.jsxs)("div",{className:eH().sessTop,children:[(null==(t=e.branch)?void 0:t.startsWith("agent/"))?(0,s.jsx)("span",{className:eH().workspaceMark,title:"Workspace session",children:"⑃"}):null,(0,s.jsx)("span",{className:eH().sessTitle,children:e.title||e.branch||"untitled"}),W?(0,s.jsx)("span",{className:"".concat(eH().sessAgent," ").concat(eH()[e.provider]),children:e.provider}):null]}),(0,s.jsxs)("div",{className:eH().sessSub,children:[e.branch?"".concat(e.branch," \xb7 "):"",function(e){let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return"".concat(t,"m ago");let n=Math.floor(t/60);if(n<24)return"".concat(n,"h ago");let s=Math.floor(n/24);if(s<7)return"".concat(s,"d ago");let a=Math.floor(s/7);if(a<5)return"".concat(a,"w ago");let i=Math.floor(s/30);return"".concat(i,"mo ago")}(e.mtime),!e.live&&e.durationMs?" \xb7 ".concat(function(e){let t=Math.round(e/6e4),n=Math.floor(t/60),s=t%60;return n>0?"".concat(n,"h ").concat(String(s).padStart(2,"0"),"m"):"".concat(s,"m")}(e.durationMs)):""]})]})]},e.id)}),d&&!r.length?(0,s.jsx)("div",{className:eH().noMatch,children:"no matching sessions"}):null,!d&&c?(0,s.jsx)("button",{type:"button",className:eH().loadMore,onClick:()=>Y(e.id),children:"load more…"}):null]})]},e.id)}):(0,s.jsx)("div",{className:eH().empty,children:"No sessions yet in any project."})}),R?(0,s.jsx)(eS,{projectPath:R.path,projectName:R.name,providers:V,onStart:z,onPlanoff:()=>{L(null),h({type:"openPlanoff",projectId:R.id,label:R.name})},onStartWorkspace:(e,t)=>{L(null),R&&K(R,e,t)},onStartTeam:()=>{L(null),R&&O(R)},teamsGateOk:H,onClose:()=>L(null)}):null,A?(0,s.jsx)(eE,{projectName:A.name,onStart:G,onClose:()=>O(null)}):null]})}var ez=n(4466),eG=n.n(ez);let eU={handoff:"⇄ handoff",review:"⊙ review",planoff:"⚖ plan-off"};function eJ(e){let{kind:t}=e;return(0,s.jsx)("span",{className:"".concat(eG().chip," ").concat(eG()[t]),children:eU[t]})}var eK=n(3149),eq=n.n(eK);let eZ=new Set(["transcript","settings","scratchpad","planoff"]);function eQ(){let{state:e,dispatch:t}=u(),[n,i]=(0,a.useState)(null),[l,r]=(0,a.useState)(null),o=e.tabs;return(0,s.jsx)("div",{className:eq().tabbar,children:o.map((a,c)=>{let d=o[c-1],u=o[c+1]&&o[c+1].linked&&o[c+1].linkSrc===a.sessionId,p=a.linked&&d&&d.sessionId===a.linkSrc;return(0,s.jsxs)("div",{role:"button",tabIndex:0,draggable:!0,className:[eq().tab,a.id===e.activeTab?eq().active:"",u?eq().groupStart:"",p?eq().groupEnd:"",l===a.id?eq().dragOver:"",n===a.id?eq().dragging:""].filter(Boolean).join(" "),onClick:()=>t({type:"activateTab",id:a.id}),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t({type:"activateTab",id:a.id}))},onDragStart:()=>i(a.id),onDragOver:e=>{n&&n!==a.id&&(e.preventDefault(),r(a.id))},onDrop:e=>{var s;return s=a.id,void(e.preventDefault(),n&&n!==s&&t({type:"moveTabBlock",from:n,to:s}),i(null),r(null))},onDragLeave:()=>r(null),onDragEnd:()=>{i(null),r(null)},children:[(0,s.jsx)(b,{status:eZ.has(a.kind)?"neutral":"waiting"===a.status?"waiting":a.unviewed?"unviewed":"live",size:7,pulse:!1}),a.linked?(0,s.jsx)(eJ,{kind:"review"===a.linkedKind?"review":"handoff"}):"planoff"===a.kind?(0,s.jsx)(eJ,{kind:"planoff"}):null,a.provider?(0,s.jsx)(ee,{provider:a.provider}):null,(0,s.jsx)("span",{className:eq().label,children:a.label}),(0,s.jsx)("span",{className:eq().closeWrap,children:(0,s.jsx)(k,{label:"Close tab",onClick:e=>{if(e.stopPropagation(),"term"===a.kind&&a.ptyId)try{let e="seshmux-dismissed-ptys",t=JSON.parse(localStorage.getItem(e)||"[]");t.includes(a.ptyId)||localStorage.setItem(e,JSON.stringify([...t,a.ptyId]))}catch(e){}t({type:"closeTab",id:a.id})},children:"✕"})})]},a.id)})})}var eX=n(8226),eY=n.n(eX);function e$(e){let{title:t,note:n,children:a}=e;return(0,s.jsxs)("section",{className:eY().card,children:[t?(0,s.jsxs)("div",{className:eY().title,children:[t,n?(0,s.jsx)("span",{className:eY().note,children:n}):null]}):null,a]})}var e0=n(6544),e1=n.n(e0);function e2(e){return"string"==typeof e?{value:e,label:e}:e}function e4(e){let{options:t,value:n,onChange:a}=e;return(0,s.jsx)("select",{className:e1().select,value:n,onChange:e=>a(e.target.value),children:t.map(e2).map(e=>{let{value:t,label:n}=e;return(0,s.jsx)("option",{value:t,children:n},t)})})}var e6=n(546),e5=n.n(e6);function e3(e){let{pct:t,tone:n="accent"}=e,a=Math.max(0,Math.min(100,t)),i="ctx"===n?e5()[(a>=80?"hot":a>=60?"warm":"")||"live"]:e5().accent;return(0,s.jsx)("span",{className:"".concat(e5().track," ").concat(e5()[n]),children:(0,s.jsx)("span",{className:"".concat(e5().fill," ").concat(i),style:{width:"".concat(a,"%")}})})}var e7=n(8982),e8=n.n(e7);function e9(e){return e>=1e9?"".concat((e/1e9).toFixed(1)," GB"):e>=1e6?"".concat((e/1e6).toFixed(0)," MB"):e>=1e3?"".concat((e/1e3).toFixed(0)," KB"):"".concat(e," B")}function te(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):String(e)}let tt=["3 per task","10 per task","25 per task"],tn=["10 most recent","25 most recent","50 most recent"],ts=["2,000 lines","5,000 lines","10,000 lines"],ta=["1 week","2 weeks","1 month"],ti=["default","plan","acceptEdits"],tl=[{id:"system",label:"System"},{id:"light",label:"Light"},{id:"dark",label:"Dark"}],tr=[{id:"iris",label:"Iris"},{id:"teal",label:"Signal Teal"}];function to(e){let{title:t,note:n,children:a}=e;return(0,s.jsxs)(e$,{children:[(0,s.jsxs)("div",{className:e8().sectionHead,children:[(0,s.jsx)("span",{children:t}),n?(0,s.jsx)("span",{className:e8().sectionNote,children:n}):null]}),a]})}function tc(e){let{name:t,sub:n,subMono:a=!0,children:i}=e;return(0,s.jsxs)("div",{className:e8().row,children:[(0,s.jsxs)("span",{className:e8().label,children:[(0,s.jsx)("span",{className:e8().name,children:t}),n?(0,s.jsx)("span",{className:a?e8().sub:e8().subPlain,children:n}):null]}),i]})}function td(e){let{found:t,detail:n}=e;return(0,s.jsx)("span",{className:"".concat(e8().status," ").concat(t?e8().ok:e8().bad),children:t?"✓ detected".concat(n?" \xb7 ".concat(n):""):"✗ not found"})}function tu(e){let{found:t,detail:n}=e;return(0,s.jsx)("span",{className:"".concat(e8().status," ").concat(t?e8().neutral:e8().bad),children:t?n:"✗ not found"})}function tp(){var e,t,i,l,r,o,c,d,m,h,_;let{state:g,dispatch:v}=u(),[f,j]=(0,a.useState)(null),[b,y]=(0,a.useState)(null),[w,k]=(0,a.useState)(!1),[N,S]=(0,a.useState)(!1),[C,T]=(0,a.useState)(null),[I,M]=(0,a.useState)(!1),[P,E]=(0,a.useState)("system"),[R,L]=(0,a.useState)("iris"),[A,O]=(0,a.useState)(null),[B,D]=(0,a.useState)(!1),[H,V]=(0,a.useState)("idle"),[W,z]=(0,a.useState)(""),G=g.config.settings;function U(){k(!0),(0,p.getEnv)().then(e=>{j(e),k(!1)}).catch(()=>k(!1))}function J(){(0,p.getHooksStatus)().then(T).catch(()=>T(null))}(0,a.useEffect)(()=>{let e=e=>{"Escape"===e.key&&v({type:"closeSettings"})};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[v]);let K=q().length>1,Z=Object.entries(null!=C?C:{}).filter(e=>{let[,t]=e;return t.available}).map(e=>{let[t]=e;return t});async function Q(){for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,500));try{return await (0,p.checkUpdate)(),!0}catch(e){}}return!1}async function X(){V("applying"),z("");try{let e=await (0,p.applyUpdate)();if(!e.ok){z(e.log||"npm install failed"),V("error");return}await Q(),V("done")}catch(e){z(e instanceof Error?e.message:String(e)),V("error")}}function Y(e,t){let n={...g.config,settings:{...G,[e]:t}};v({type:"setConfig",config:n}),(0,p.putConfig)(n)}(0,a.useEffect)(()=>{U(),J(),(0,p.getUsage)(30).then(y),(0,p.checkUpdate)().then(O).catch(()=>D(!0))},[]),(0,a.useEffect)(()=>{E(localStorage.getItem("seshmux-theme-locked")?g.config.theme:"system")},[g.config.theme]),(0,a.useEffect)(()=>{Promise.resolve().then(n.bind(n,7674)).then(e=>{let{currentAccent:t}=e;return L(t())})},[]);let $=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?{canApply:!1,message:"couldn't reach the npm registry",tone:"bad"}:e?"npx"===e.installMethod?{canApply:!1,message:"running via npx — run `npx seshmux@latest` to update",tone:"neutral"}:"local"===e.installMethod?{canApply:!1,message:"local install — update seshmux in your package.json",tone:"neutral"}:e.updateAvailable?{canApply:!0,message:"v".concat(e.latest," available"),tone:"ok"}:{canApply:!1,message:"up to date",tone:"neutral"}:{canApply:!1,message:"checking…",tone:"neutral"}}(A,B),et=null!=(l=null==b?void 0:b.byProvider)?l:[],en=et.reduce((e,t)=>e+t.pct,0)||1;return(0,s.jsx)("div",{className:e8().settings,children:(0,s.jsxs)("div",{className:e8().inner,children:[(0,s.jsxs)("div",{className:e8().backRow,children:[(0,s.jsx)(es,{onClick:()=>v({type:"closeSettings"}),children:"← Back"}),(0,s.jsx)("h1",{className:e8().h1,children:"Settings"})]}),(0,s.jsxs)(to,{title:"Environment",children:[f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tc,{name:"Claude Code",sub:null!=(r=f.claude.path)?r:"not found on PATH",children:(0,s.jsx)(td,{found:f.claude.found,detail:f.claude.version})}),(0,s.jsx)(tc,{name:"Deep agent integration",sub:"installs status hooks into Claude Code's own config — agent-authored status instead of screen heuristics",subMono:!1,children:(0,s.jsx)(F,{on:Z.some(e=>{var t;return null==C||null==(t=C[e])?void 0:t.installed}),disabled:I||0===Z.length,onChange:function(e){M(!0),Promise.all(Z.map(t=>e?(0,p.installStatusHooks)(t):(0,p.uninstallStatusHooks)(t))).then(J).finally(()=>M(!1))}})}),(0,s.jsx)(tc,{name:"tmux",sub:"required for session persistence",subMono:!1,children:(0,s.jsx)(td,{found:f.tmux.found,detail:f.tmux.version})}),(0,s.jsx)(tc,{name:"Session store",sub:"Claude Code project store",subMono:!1,children:(0,s.jsx)(tu,{found:f.claude.store.found,detail:"".concat(f.claude.store.projects," projects \xb7 ").concat(e9(f.claude.store.bytes))})}),(0,s.jsx)(tc,{name:"Codex CLI",sub:null!=(o=f.codex.path)?o:"not found on PATH",children:(0,s.jsx)(td,{found:f.codex.found,detail:f.codex.version})}),(0,s.jsx)(tc,{name:"Codex session store",sub:"Codex rollout store",subMono:!1,children:(0,s.jsx)(tu,{found:f.codex.store.found,detail:"".concat(f.codex.store.projects," sessions \xb7 ").concat(e9(f.codex.store.bytes))})}),(0,s.jsx)(tc,{name:"rg",sub:"fast search — optional",subMono:!1,children:(0,s.jsx)("span",{className:"".concat(e8().status," ").concat(f.rg.found?e8().ok:e8().neutral),children:f.rg.found?"✓ detected":"✗ not found"})})]}):null,(0,s.jsx)(tc,{name:"Rescan",sub:"re-detect environment",subMono:!1,children:(0,s.jsx)(es,{onClick:U,disabled:w,children:w?"Rescanning…":"Rescan now"})})]}),(0,s.jsx)(e$,{children:(0,s.jsxs)("div",{className:e8().usageCard,children:[(0,s.jsxs)("div",{className:e8().usageHead,children:[(0,s.jsx)("span",{className:e8().usageHeadTitle,children:"Usage — last 30 days"}),(0,s.jsx)("span",{className:e8().usageHeadNote,children:"from session logs"})]}),b?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:e8().stats,children:[(0,s.jsxs)("div",{className:e8().stat,children:[(0,s.jsx)("div",{className:e8().statN,children:te(b.sessions)}),(0,s.jsx)("div",{className:e8().statL,children:"sessions"})]}),(0,s.jsxs)("div",{className:e8().stat,children:[(0,s.jsx)("div",{className:e8().statN,children:te(b.totalTokens)}),(0,s.jsx)("div",{className:e8().statL,children:"total tokens"})]}),(0,s.jsxs)("div",{className:e8().stat,children:[(0,s.jsx)("div",{className:e8().statN,children:te(b.cacheReads)}),(0,s.jsx)("div",{className:e8().statL,children:"cache reads"})]}),(0,s.jsxs)("div",{className:e8().stat,children:[(0,s.jsxs)("div",{className:e8().statN,children:["~$",Math.round(b.estCostUsd)]}),(0,s.jsx)("div",{className:e8().statL,children:"est. API cost"})]})]}),et.length>0?(0,s.jsxs)("div",{className:e8().barRow,children:[(0,s.jsx)("span",{className:e8().barName,children:"by agent"}),(0,s.jsx)("span",{className:e8().barTrack,children:(0,s.jsx)(e3,{tone:"accent",pct:et[0].pct/en*100})}),(0,s.jsx)("span",{className:e8().barPctProviders,children:et.map(e=>(0,s.jsxs)("span",{className:e8().providerPct,children:[(0,s.jsx)(ee,{provider:e.provider})," ",e.pct,"%"]},e.provider))})]}):null,b.byProject.map(e=>(0,s.jsxs)("div",{className:e8().barRow,children:[(0,s.jsx)("span",{className:e8().barName,children:e.name}),(0,s.jsx)("span",{className:e8().barTrack,children:(0,s.jsx)(e3,{tone:"accent",pct:e.pct})}),(0,s.jsxs)("span",{className:e8().barPct,children:[e.pct,"%"]})]},e.name))]}):null]})}),K?(0,s.jsxs)(to,{title:"Agent bridge",note:"MCP — agents call each other as tools",children:[(0,s.jsx)(tc,{name:"Bridge registration",sub:"writes seshmux-bridge into each agent’s MCP config",subMono:!1,children:(0,s.jsx)(es,{onClick:function(){S(!0),(0,p.registerBridge)().then(()=>U()).finally(()=>S(!1))},disabled:N,children:N?"Registering…":"Register"})}),(0,s.jsx)(tc,{name:"Registered in Claude Code",sub:"exposes ask_codex",subMono:!1,children:(null==f||null==(e=f.bridge)?void 0:e.claude.registered)?(0,s.jsx)("span",{className:"".concat(e8().status," ").concat(e8().ok),children:"✓ registered"}):(0,s.jsx)("span",{className:"".concat(e8().status," ").concat(e8().neutral),children:"not registered"})}),(0,s.jsx)(tc,{name:"Registered in Codex",sub:"exposes ask_claude",subMono:!1,children:(null==f||null==(t=f.bridge)?void 0:t.codex.registered)?(0,s.jsx)("span",{className:"".concat(e8().status," ").concat(e8().ok),children:"✓ registered"}):(0,s.jsx)("span",{className:"".concat(e8().status," ").concat(e8().neutral),children:"not registered"})}),(0,s.jsx)(tc,{name:"Approve each cross-agent call",sub:"off = agents relay freely within hop budget",subMono:!1,children:(0,s.jsx)(F,{on:!!G.bridgeApprove,onChange:e=>Y("bridgeApprove",e)})}),(0,s.jsx)(tc,{name:"Hop budget",sub:"max cross-agent calls per task — hard no-loop rule always on",subMono:!1,children:(0,s.jsx)(e4,{options:tt,value:null!=(c=G.hopBudget)?c:"10 per task",onChange:e=>Y("hopBudget",e)})})]}):null,(0,s.jsxs)(to,{title:"Appearance",children:[(0,s.jsx)(tc,{name:"Theme",children:(0,s.jsx)(x,{options:tl,value:P,onChange:function(e){Promise.resolve().then(n.bind(n,7674)).then(t=>{let{applyTheme:n,currentTheme:s}=t;if("system"===e){localStorage.removeItem("seshmux-theme-locked");let e=matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";n(e),E("system");let t={...g.config,theme:e};v({type:"setConfig",config:t}),(0,p.putConfig)(t)}else{localStorage.setItem("seshmux-theme-locked","1"),n(e),E(e);let t={...g.config,theme:s()};v({type:"setConfig",config:t}),(0,p.putConfig)(t)}})}})}),(0,s.jsx)(tc,{name:"Accent",sub:"signal color for highlights & controls",subMono:!1,children:(0,s.jsx)(x,{options:tr,value:R,onChange:function(e){let t="teal"===e?"teal":"iris";Promise.resolve().then(n.bind(n,7674)).then(e=>{let{applyAccent:n}=e;n(t),L(t);let s={...g.config,accent:t};v({type:"setConfig",config:s}),(0,p.putConfig)(s)})}})})]}),(0,s.jsxs)(to,{title:"Notifications",children:[(0,s.jsx)(tc,{name:"Needs-input alerts",sub:"toast when a session waits on you",subMono:!1,children:(0,s.jsx)(F,{on:!1!==G.needsInputAlerts,onChange:e=>Y("needsInputAlerts",e)})}),(0,s.jsx)(tc,{name:"macOS notifications",sub:"system notification when seshmux is in background",subMono:!1,children:(0,s.jsx)(F,{on:!1!==G.macNotifications,onChange:e=>Y("macNotifications",e)})}),(0,s.jsx)(tc,{name:"Notify when done",sub:"notify when a session finishes, not just when it needs input",subMono:!1,children:(0,s.jsx)(F,{on:!1!==G.notifyOnDone,onChange:e=>Y("notifyOnDone",e)})}),(0,s.jsx)(tc,{name:"Sound",children:(0,s.jsx)(F,{on:!!G.sound,onChange:e=>Y("sound",e)})})]}),(0,s.jsxs)(to,{title:"Memory & storage",children:[(0,s.jsx)(tc,{name:"Transcript cache",sub:"parsed transcripts kept in memory",subMono:!1,children:(0,s.jsx)(e4,{options:tn,value:null!=(d=G.transcriptCache)?d:"10 most recent",onChange:e=>Y("transcriptCache",e)})}),(0,s.jsx)(tc,{name:"Terminal scrollback",sub:"tmux keeps full history",subMono:!1,children:(0,s.jsx)(e4,{options:ts,value:null!=(m=G.scrollback)?m:"5,000 lines",onChange:e=>Y("scrollback",e)})}),(0,s.jsx)(tc,{name:"Session list window",sub:"older sessions load on demand",subMono:!1,children:(0,s.jsx)(e4,{options:ta,value:null!=(h=G.sessionWindow)?h:"1 week",onChange:e=>Y("sessionWindow",e)})})]}),(0,s.jsxs)(to,{title:"Sessions",children:[(0,s.jsx)(tc,{name:"tmux session prefix",children:(0,s.jsx)("span",{className:e8().mono,children:"seshmux-"})}),(0,s.jsx)(tc,{name:"Default permission mode",sub:"for new sessions",subMono:!1,children:(0,s.jsx)(e4,{options:ti,value:null!=(_=G.permissionMode)?_:"default",onChange:e=>Y("permissionMode",e)})})]}),(0,s.jsxs)(to,{title:"Updates",note:"npm registry",children:[(0,s.jsx)(tc,{name:"Version",sub:"installed",subMono:!1,children:(0,s.jsx)("span",{className:e8().mono,children:A?"v".concat(A.current):"—"})}),(0,s.jsx)(tc,{name:"Update",sub:"applying"===H?"the server restarts itself — live sessions stay alive":"installs the latest release and restarts the server",subMono:!1,children:"done"===H?(0,s.jsxs)("span",{className:"".concat(e8().status," ").concat(e8().ok),children:["✓ updated to v",null==A?void 0:A.latest," — reload to get the new UI"]}):"applying"===H?(0,s.jsx)("span",{className:"".concat(e8().status," ").concat(e8().neutral),children:"updating…"}):(0,s.jsxs)("span",{className:e8().actions,children:[(0,s.jsx)("span",{className:"".concat(e8().status," ").concat(e8()[$.tone]),children:$.message}),$.canApply?(0,s.jsx)(es,{onClick:X,children:"Update & restart"}):null]})}),"error"===H?(0,s.jsx)(tc,{name:"Update failed",sub:W,subMono:!0,children:(0,s.jsx)(es,{onClick:X,children:"Retry"})}):null,(null==f||null==(i=f.daemon)?void 0:i.stale)?(0,s.jsx)(tc,{name:"Session daemon",sub:"run `seshmux --restart-daemon` to upgrade it — tmux-backed sessions survive, any non-tmux ones end",subMono:!1,children:(0,s.jsxs)("span",{className:"".concat(e8().status," ").concat(e8().neutral),children:["still on v",f.daemon.version," — it outlived the update, so newer features stay off"]})}):null]}),(0,s.jsx)("div",{className:e8().footer,children:"seshmux is an independent project, not affiliated with or endorsed by Anthropic or OpenAI."})]})})}var tm=n(2488),th=n.n(tm);function t_(e){let{branch:t}=e;return(0,s.jsxs)("span",{className:th().chip,children:["⎇ ",t]})}var tg=n(2668),tv=n.n(tg);let tx=/^##\s*(?:✳|⬡)\s*(claude|codex)\s*(?:·\s*⎇\s*([^\s·][^·]*?)\s*)?·\s*(.+?)\s*$/;function tf(e){let{projectId:t,path:n,refreshKey:i}=e,[l,r]=(0,a.useState)(null),[o,c]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=!1;return r(null),(0,p.getScratchpad)(t).then(t=>{let{content:n}=t;e||r(n?function(e){let t=e.split("\n"),n=[],s=null,a=[];function i(){s&&n.push({...s,body:a.join("\n").trim()}),a=[]}for(let e of t){let t=tx.exec(e.trim());if(t){var l;i(),s={provider:t[1],branch:(null==(l=t[2])?void 0:l.trim())||null,time:t[3].trim(),body:""}}else s&&a.push(e)}return i(),n}(n):[])}).catch(()=>{e||r([])}),()=>{e=!0}},[t,i]),(0,s.jsx)("div",{className:tv().transcript,children:(0,s.jsxs)("div",{className:tv().inner,children:[(0,s.jsxs)("div",{className:tv().header,children:[(0,s.jsx)("h1",{className:tv().title,children:"Shared scratchpad"}),(0,s.jsxs)("div",{className:tv().meta,children:[(0,s.jsxs)("span",{children:[n,"/.seshmux/handoff.md"]}),(0,s.jsx)("span",{children:"both agents read & write this file"})]}),(0,s.jsxs)("div",{className:tv().actions,children:[(0,s.jsx)(es,{onClick:()=>{},children:"Open in editor"}),(0,s.jsx)(es,{onClick:function(){c(!0),(0,p.putScratchpad)(t,"").then(()=>r([])).catch(()=>{}).finally(()=>c(!1))},disabled:o,children:"Clear"})]})]}),null===l?(0,s.jsx)("div",{className:tv().loading,children:"Loading scratchpad…"}):0===l.length?(0,s.jsx)("div",{className:tv().loading,children:"No entries yet — agents append notes here after handoffs and reviews."}):l.map((e,t)=>(0,s.jsxs)("div",{className:tv().entry,children:[(0,s.jsxs)("div",{className:tv().entryHead,children:[(0,s.jsx)(ee,{provider:e.provider,withName:!0}),e.branch?(0,s.jsx)(t_,{branch:e.branch}):null,(0,s.jsx)("span",{className:tv().time,children:e.time})]}),(0,s.jsx)("div",{className:tv().body,dangerouslySetInnerHTML:{__html:eu(e.body)}})]},t)),(0,s.jsx)("div",{className:tv().note,children:"Agents are nudged to read this file at session start and after each seshmux handoff/review. The filesystem is the message bus — works even when only one agent is running."})]})})}var tj=n(7537),tb=n.n(tj);function ty(e){var t;let{result:n,onPick:a,picking:i}=e;return(0,s.jsx)(e$,{children:(0,s.jsxs)("div",{className:tb().col,children:[(0,s.jsxs)("div",{className:tb().colHead,children:[(0,s.jsx)(ee,{provider:n.provider,withName:!0}),(0,s.jsxs)("span",{className:tb().planMeta,children:["read-only plan \xb7 ",function(e){let t=Math.round(e/1e3);return t>=60?"".concat(Math.floor(t/60),"m ").concat(String(t%60).padStart(2,"0"),"s"):"".concat(t,"s")}(n.durationMs)]})]}),n.ok?(0,s.jsx)("div",{className:tb().steps,children:n.plan.split("\n").map((e,t)=>(0,s.jsx)("div",{className:tb().planLine,children:e.split(/(`[^`]+`)/g).map((e,t)=>e.startsWith("`")&&e.endsWith("`")?(0,s.jsx)("code",{children:e.slice(1,-1)},t):e)},t))}):(0,s.jsxs)("div",{className:tb().angle,children:["Plan failed: ",null!=(t=n.error)?t:"unknown error"]}),(0,s.jsx)("div",{className:tb().pick,children:(0,s.jsxs)(es,{variant:"primary",disabled:!n.ok||i,onClick:a,children:["Use this plan — execute with ",$[n.provider].glyph," ",n.provider]})})]})})}function tw(e){let{projectId:t,repo:n,onExecute:i}=e,[l,r]=(0,a.useState)({state:"input"}),[o,c]=(0,a.useState)(""),[d,u]=(0,a.useState)(!1);async function m(){let e=o.trim();if(!(!e||e.startsWith("-"))){r({state:"running",task:e});try{let n=await (0,p.bridgePlanoff)(t,e);r({state:"done",task:e,result:n})}catch(t){r({state:"error",task:e,message:t instanceof Error?t.message:"plan-off failed"})}}}async function h(e){if("done"===l.state&&!d){u(!0);try{let{ptyId:n}=await (0,p.bridgePlanoffPick)(t,e,l.task,l.result);null==i||i(e,n)}catch(e){u(!1)}}}return(0,s.jsx)("div",{className:tb().transcript,children:(0,s.jsxs)("div",{className:tb().inner,children:[(0,s.jsxs)("div",{className:tb().header,children:[(0,s.jsx)("h1",{className:tb().title,children:"Plan-off"}),(0,s.jsxs)("div",{className:tb().meta,children:[(0,s.jsx)("span",{children:n}),"input"!==l.state?(0,s.jsxs)("span",{children:["task: ",(l.state,l.task)]}):null,"running"===l.state?(0,s.jsx)("span",{children:"✳ planning… \xb7 ⬡ planning…"}):null,"done"===l.state?(0,s.jsx)("span",{children:"both plans complete"}):null]})]}),"input"===l.state?(0,s.jsxs)("div",{className:tb().taskForm,children:[(0,s.jsx)(_,{value:o,onChange:c,placeholder:"Describe the task both agents should plan (read-only)…",multiline:3}),(0,s.jsx)(es,{variant:"primary",disabled:!o.trim(),onClick:m,children:"⚖ Run plan-off"})]}):"running"===l.state?(0,s.jsxs)("div",{className:tb().running,children:["Each agent is drafting a read-only plan for “",l.task,"” — this can take a couple of minutes."]}):"error"===l.state?(0,s.jsxs)("div",{className:tb().running,children:["Plan-off failed: ",l.message]}):(0,s.jsx)("div",{className:tb().grid,children:[l.result.claude,l.result.codex].map(e=>(0,s.jsx)(ty,{result:e,picking:d,onPick:()=>h(e.provider)},e.provider))}),(0,s.jsx)("div",{className:tb().note,children:"Each agent planned read-only, in parallel. The winner's plan is written to .seshmux/planoff-winner.md and seeds the execution session; the loser's plan stays in the scratchpad for reference."})]})})}var tk=n(9560),tN=n.n(tk);function tS(e){let{open:t,repo:n,reason:a,onJump:i,onClose:l}=e;return(0,s.jsxs)("div",{className:"".concat(tN().toast," ").concat(t?tN().show:""),children:[(0,s.jsx)(b,{status:"waiting",size:9}),(0,s.jsxs)("span",{className:tN().text,children:[(0,s.jsx)("strong",{className:tN().repo,children:n})," needs your input — ",a]}),(0,s.jsx)("span",{className:tN().jump,children:(0,s.jsx)(es,{variant:"primary",onClick:i,children:"Jump to it"})}),(0,s.jsx)(k,{label:"Dismiss",onClick:l,children:"✕"})]})}var tC=n(419),tT=n.n(tC);let tI={ask_codex:"codex",ask_claude:"claude"};function tM(e){let{open:t,tool:n,question:i,cwd:l,hop:r,expiresAt:o,onResolve:c,onExpire:d}=e,[u,p]=(0,a.useState)(()=>Math.max(0,Math.round((o-tP())/1e3)));return((0,a.useEffect)(()=>{if(!t)return;let e=setInterval(()=>{let e=Math.max(0,Math.round((o-tP())/1e3));p(e),e<=0&&d()},1e3);return()=>clearInterval(e)},[t,o,d]),t)?(0,s.jsxs)("div",{className:"".concat(tT().toast," ").concat(tT().show),children:[(0,s.jsxs)("div",{className:tT().body,children:[(0,s.jsxs)("div",{className:tT().head,children:[n in tI?(0,s.jsx)(ee,{provider:tI[n],withName:!0}):(0,s.jsx)("span",{className:tT().toolName,children:n}),(0,s.jsxs)("span",{className:tT().count,children:["hop ",r," \xb7 ",u,"s"]})]}),(0,s.jsx)("div",{className:tT().question,children:i}),(0,s.jsx)("div",{className:tT().cwd,children:l})]}),(0,s.jsxs)("div",{className:tT().actions,children:[(0,s.jsx)("span",{className:tT().allow,children:(0,s.jsx)(es,{variant:"primary",onClick:()=>c(!0),children:"Allow"})}),(0,s.jsx)(es,{onClick:()=>c(!1),children:"Deny"})]}),(0,s.jsx)(k,{label:"Deny",onClick:()=>c(!1),children:"✕"})]}):null}function tP(){return Date.now()}n(729);var tE=n(3804),tR=n.n(tE);function tL(e){return"".concat(Math.round(e/1e3),"k")}function tA(e){let{tokens:t,window:n}=e,a=n>0?Math.round(t/n*100):0,i=a>=80?"hot":a>=60?"warm":"";return(0,s.jsxs)("span",{className:"".concat(tR().badge," ").concat(i?tR()[i]:""),children:[tL(t),"/",tL(n)," \xb7 ",a,"%"]})}var tO=n(3433),tB=n.n(tO);let tD="discard";function tH(e){let{open:t,branch:n,filesChanged:i,busy:l,error:r,onFinish:o,onClose:c}=e,[d,u]=(0,a.useState)(""),p=i>0;if(!t)return null;let m=!p||d.trim().toLowerCase()===tD;return(0,s.jsx)("div",{className:tB().overlay,onClick:e=>e.target===e.currentTarget&&c(),children:(0,s.jsxs)("div",{className:tB().modal,role:"dialog","aria-modal":"true",children:[(0,s.jsx)("h3",{className:tB().title,children:"Finish workspace"}),(0,s.jsxs)("div",{className:tB().meta,children:[n," \xb7 ",i," file",1===i?"":"s"," changed"]}),(0,s.jsx)(D,{icon:"⇄",title:"Merge into the repo",desc:"git merge --no-ff \xb7 keeps history \xb7 removes the worktree",disabled:l,onClick:()=>o("merge",!1)}),(0,s.jsx)(D,{icon:"⎇",title:"Keep branch, remove worktree",desc:"branch survives \xb7 come back to it later",disabled:l,onClick:()=>o("keep",!1)}),(0,s.jsx)(D,{icon:"✕",title:"Discard everything",desc:"deletes the branch AND the worktree — cannot be undone",danger:!0,disabled:l||!m,onClick:()=>o("discard",p)}),p?(0,s.jsxs)("div",{className:tB().confirmRow,children:[(0,s.jsxs)("span",{className:tB().confirmLabel,children:["Uncommitted changes — type “",tD,"” to enable discard"]}),(0,s.jsx)(_,{value:d,onChange:u,placeholder:tD})]}):null,r?(0,s.jsx)("div",{className:tB().error,children:r}):null,(0,s.jsx)("div",{className:tB().foot,children:(0,s.jsx)(es,{onClick:c,disabled:l,children:"Cancel"})})]})})}var tV=n(6879),tF=n.n(tV);function tW(e,t){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}function tz(e){var t,i;let{ptyId:l,projectId:r,sessionId:o,provider:c,branch:d,tmuxName:m,ctx:h,variant:_="default",onOpenSubagents:g,subagentPing:v,isTeamLead:x,teamMemberCount:f,onOpenTeam:j}=e,y=(0,a.useRef)(null),[w,k]=(0,a.useState)("live"),[N,S]=(0,a.useState)(!0),{state:C,dispatch:T}=u(),[I,M]=(0,a.useState)(!1),[P,E]=(0,a.useState)(null),R=(0,a.useRef)(null);(0,a.useEffect)(()=>{requestAnimationFrame(()=>{var e;return null==(e=R.current)?void 0:e.call(R)})},[C.view]),(0,a.useEffect)(()=>{let e=!1,t=null,s=null,a=null,i=null,r=null,o=null;return(async()=>{let[{Terminal:c},{FitAddon:d}]=await Promise.all([n.e(888).then(n.bind(n,9101)),n.e(581).then(n.bind(n,5581))]);if(e||!y.current)return;t=new c({fontFamily:tW("--mono","monospace"),fontSize:12,theme:{background:tW("--term-bg","#0a0d11"),foreground:tW("--term-text","#c9d3dc"),cursor:tW("--accent","#2dd4bf")},cursorBlink:!0,scrollback:5e3}),s=new d,t.loadAddon(s),t.open(y.current);let u=0,m=null,h=()=>{if(!e&&s&&t&&a)try{s.fit(),t.cols>=10&&t.rows>=3&&a.resize(t.cols,t.rows)}catch(e){}},_=()=>{!e&&t&&a&&(t.cols<10||(a.resize(t.cols,Math.max(2,t.rows-1)),a.resize(t.cols,t.rows),u=t.cols))},g=async()=>{if(e||!t||!a)return;let n=()=>{!e&&t&&(t.write("\x1bc"),function(e,t,n,s){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30,i=0,l=()=>{if(e()>=10){t(),n();return}if(++i>=a)return void n();s(l)};l()}(()=>e||!t?0:t.cols,_,()=>{e||S(!1)},e=>requestAnimationFrame(e)))};try{let{supported:s,data:i}=await (0,p.getTermHistory)(l);if(e||!t||!a)return;if(!s)return n();t.write("\x1bc"+(i?i+"\r\n":"")),_(),e||S(!1)}catch(e){n()}},v=()=>{m&&clearTimeout(m),m=setTimeout(()=>{m=null,e||g()},200)};requestAnimationFrame(()=>{if(!e&&s&&t)try{s.fit()}catch(e){}});let x=null;a=function(e,t){let n=null,s=!1,a=!1,i=250,l=!0;!function r(){if(s)return;let o="https:"===location.protocol?"wss:":"ws:";(n=new WebSocket("".concat(o,"//").concat(location.host,"/ws/term/").concat(encodeURIComponent(e),"?token=").concat(encodeURIComponent((0,p.authToken)()),"&replay=0"))).addEventListener("open",()=>{var e,n;i=250,l?(l=!1,null==(e=t.onOpen)||e.call(t)):null==(n=t.onReconnect)||n.call(t)}),n.addEventListener("message",e=>{var n,s;let i;try{i=JSON.parse("string"==typeof e.data?e.data:"")}catch(e){return}"out"===i.t&&"string"==typeof i.data?t.onData(i.data):"exit"===i.t?(a=!0,t.onExit(null!=(n=i.code)?n:0)):"size"===i.t&&"number"==typeof i.cols&&"number"==typeof i.rows&&(null==(s=t.onSize)||s.call(t,i.cols,i.rows))}),n.addEventListener("close",()=>{s||a||(n=null,setTimeout(r,i),i=Math.min(2*i,5e3))}),n.addEventListener("error",()=>null==n?void 0:n.close())}();let r=e=>{n&&n.readyState===WebSocket.OPEN&&n.send(JSON.stringify(e))};return{send:e=>r({t:"in",data:e}),resize:(e,t)=>r({t:"resize",cols:e,rows:t}),close:()=>{s=!0,null==n||n.close()}}}(l,{onData:n=>{null==t||t.write(n),e||S(!1)},onSize:n=>{if(u=n,x&&clearTimeout(x),!e&&s&&t&&a){try{s.fit()}catch(e){return}t.cols<10||(a.resize(t.cols,t.rows),v())}},onExit:()=>{e||(k("done"),S(!1))},onOpen:()=>{x&&clearTimeout(x),x=setTimeout(()=>{u||(h(),v())},500)},onReconnect:()=>{e||k("live"),h(),v()}}),t.onData(e=>null==a?void 0:a.send(e)),(i=new ResizeObserver(()=>h())).observe(y.current),(o=new MutationObserver(()=>{!e&&t&&(t.options.theme={background:tW("--term-bg","#0a0d11"),foreground:tW("--term-text","#c9d3dc"),cursor:tW("--accent","#2dd4bf")})})).observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","data-accent"]}),r=()=>h(),window.addEventListener("focus",r),y.current.addEventListener("focusin",r),R.current=h})(),()=>{if(e=!0,R.current=null,null==i||i.disconnect(),null==o||o.disconnect(),r){var n;window.removeEventListener("focus",r),null==(n=y.current)||n.removeEventListener("focusin",r)}null==a||a.close(),null==t||t.dispose()}},[l]);let L=h&&h.window?Math.round(h.tokens/h.window*100):null,A=C.projects.find(e=>e.id===r),O=null!=o?o:"latest",B=Z(null!=(t=null!=c?c:null==A?void 0:A.provider)?t:"claude",q()),D=B?$[B]:null,H=!!A&&!!D,V=!!(null==d?void 0:d.startsWith("agent/")),[F,W]=(0,a.useState)(null),[z,G]=(0,a.useState)(!1),[U,J]=(0,a.useState)(!1),[K,Q]=(0,a.useState)(null);async function X(){if(!V||!r)return null;try{var e;let t=null!=(e=(await (0,p.listWorkspaces)(r)).find(e=>e.branch===d))?e:null;return W(t),t}catch(e){return null}}(0,a.useEffect)(()=>{if(!V||!r)return;let e=!1,t=()=>{(0,p.listWorkspaces)(r).then(t=>{var n;e||W(null!=(n=t.find(e=>e.branch===d))?n:null)}).catch(()=>{})};return t(),window.addEventListener("focus",t),()=>{e=!0,window.removeEventListener("focus",t)}},[V,r,d]);let Y="grid"!==_&&!!g&&!!r&&!!o,[et,en]=(0,a.useState)({running:0,total:0});(0,a.useEffect)(()=>{if(!Y||!r||!o)return;let e=!1,t=()=>{(0,p.getSubagents)(r,o).then(t=>{let{nodes:n}=t;e||en({running:n.filter(e=>"running"===e.status).length,total:n.length})}).catch(()=>{})};return t(),window.addEventListener("focus",t),()=>{e=!0,window.removeEventListener("focus",t)}},[Y,r,o,v]);let ea=et.running||et.total;async function ei(e,t){if(F&&!U){J(!0),Q(null);try{await (0,p.finishWorkspace)(F.dir,e,t),G(!1),T({type:"closeTab",id:"term-"+l})}catch(e){Q(e.message||"finish failed")}finally{J(!1)}}}async function el(e){if(H&&!I){M(!0),E(null);try{var t,n,s,a;let{ptyId:i,tabMeta:c,provider:d}=await e(r,O),u=null!=(t=c.linkSrc)?t:o;if(!o&&u){let e=C.tabs.find(e=>"term"===e.kind&&e.ptyId===l);e&&T({type:"setTabSession",tabId:e.id,sessionId:u})}T({type:"openTerm",ptyId:i,projectId:r,label:null!=(s=null!=(n=null==A?void 0:A.name)?n:c.projectPath.split("/").filter(Boolean).pop())?s:"session",provider:d,linked:null==(a=c.linked)||a,linkedKind:c.linkedKind,linkSrc:u})}catch(e){E(e.message||"bridge failed"),console.error("bridge failed",e)}finally{M(!1)}}}let er=C.tabs.some(e=>e.linked&&"handoff"===e.linkedKind&&!!o&&e.linkSrc===o),eo=H?(0,s.jsxs)("span",{className:tF().bridge,children:[er?null:(0,s.jsxs)(es,{variant:"chip",className:tF().bridgeBtn,disabled:I,title:null!=P?P:"Continue this session in ".concat(D.name),onClick:()=>el(p.bridgeHandoff),children:["⇄ ",(0,s.jsx)("span",{className:tF().verb,children:"Continue in "}),D.glyph," ",B]}),(0,s.jsxs)(es,{variant:"chip",className:tF().bridgeBtn,disabled:I,title:null!=P?P:"Review this session with ".concat(D.name),onClick:()=>el(p.bridgeReview),children:["⊙ ",(0,s.jsx)("span",{className:tF().verb,children:"Review with "}),D.glyph," ",B]})]}):null;return(0,s.jsxs)("div",{className:tF().pane,children:[(0,s.jsxs)("div",{className:tF().termWrap,children:[(0,s.jsx)("div",{ref:y,className:tF().term}),N?(0,s.jsxs)("div",{className:tF().loading,"aria-live":"polite",children:[(0,s.jsx)(b,{status:"live",size:7,pulse:!0}),(0,s.jsx)("span",{children:"connecting…"})]}):null]}),(0,s.jsxs)("div",{className:"".concat(tF().statusbar," ").concat("grid"===_?tF().grid:""),children:[(0,s.jsxs)("span",{className:tF().state,children:[(0,s.jsx)(b,{status:"live"===w?"live":"done",size:7,pulse:"grid"!==_}),(0,s.jsx)("span",{className:"live"===w?tF().live:tF().done,children:"live"===w?"live":"exited"})]}),c?(0,s.jsx)(ee,{provider:c,withName:!0}):null,"grid"!==_?(0,s.jsxs)(s.Fragment,{children:[m?(0,s.jsxs)("span",{className:tF().tmux,children:["tmux: ",m]}):null,d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:tF().divider,"aria-hidden":"true"}),(0,s.jsx)(t_,{branch:d})]}):null,h&&null!=L?(0,s.jsxs)("span",{className:tF().ctx,children:[(0,s.jsx)("span",{className:tF().ctxLabel,children:"ctx"}),(0,s.jsx)("span",{className:tF().meterSlot,children:(0,s.jsx)(e3,{pct:L,tone:"ctx"})}),(0,s.jsx)(tA,{tokens:h.tokens,window:h.window})]}):null]}):null,Y&&ea>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:tF().divider,"aria-hidden":"true"}),(0,s.jsxs)(es,{variant:"chip",title:"View subagents",onClick:()=>null==g?void 0:g(),children:["◦ ",ea," agent",1===ea?"":"s"]})]}):null,"grid"!==_&&x&&j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:tF().divider,"aria-hidden":"true"}),(0,s.jsxs)(es,{variant:"chip",title:"View team roster",onClick:()=>null==j?void 0:j(),children:["⚑ ",null!=f?"".concat(f," "):"","team"]})]}):null,eo,V?(0,s.jsxs)("span",{className:tF().tail,children:[(0,s.jsxs)("span",{className:tF().workspaceTail,children:["workspace \xb7 ",d,F?" \xb7 ".concat(F.filesChanged," file").concat(1===F.filesChanged?"":"s"," changed"):""]}),(0,s.jsx)(es,{variant:"chip",className:tF().finishBtn,title:"Finish workspace",onClick:()=>{X().then(()=>G(!0))},children:"⌫"})]}):(0,s.jsx)("span",{className:tF().tail,children:"detach-safe"})]}),V?(0,s.jsx)(tH,{open:z,branch:null!=d?d:"",filesChanged:null!=(i=null==F?void 0:F.filesChanged)?i:0,busy:U,error:K,onFinish:ei,onClose:()=>{G(!1),Q(null)}}):null]})}var tG=n(2977),tU=n.n(tG);function tJ(e){let{node:t,depth:n,hasChildren:a,collapsed:i,selected:l,onSelect:r,onToggleCollapse:o}=e,c="running"===t.status?"live":"error"===t.status?"neutral":"done",d=function(e,t){if(null==e||null==t)return null;let n=Math.round(Math.max(0,t-e)/1e3),s=Math.floor(n/60),a=n%60;return s>0?"".concat(s,"m").concat(a,"s"):"".concat(a,"s")}(t.startedAt,t.endedAt);return(0,s.jsxs)("div",{className:"".concat(tU().row," ").concat(l?tU().rowSelected:""),style:{paddingLeft:12+16*n},onClick:()=>r(t.id),children:[a?(0,s.jsx)("button",{type:"button",className:tU().caret,onClick:e=>{e.stopPropagation(),o(t.id)},children:i?"▸":"▾"}):(0,s.jsx)("span",{className:tU().caretSpacer}),(0,s.jsx)(b,{status:c,pulse:"running"===t.status}),"error"===t.status?(0,s.jsx)("span",{className:tU().errorGlyph,children:"✕"}):null,(0,s.jsx)("span",{className:tU().label,children:t.label}),t.model?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:tU().sep,children:"\xb7"}),(0,s.jsx)("span",{className:tU().segment,children:t.model})]}):null,null!=t.tokens?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:tU().sep,children:"\xb7"}),(0,s.jsxs)("span",{className:tU().segment,children:[(t.tokens/1e3).toFixed(1),"k tok"]})]}):null,d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:tU().sep,children:"\xb7"}),(0,s.jsx)("span",{className:tU().segment,children:d})]}):null]})}function tK(e){var t;let{node:n,depth:a,childrenByParent:i,ancestors:l,selectedId:r,collapsedIds:o,onSelect:c,onToggleCollapse:d}=e,u=(null!=(t=i.get(n.id))?t:[]).filter(e=>e.id!==n.id&&!l.has(e.id)),p=u.length>0,m=new Set(l).add(n.id),h=o.has(n.id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tJ,{node:n,depth:a,hasChildren:p,collapsed:h,selected:r===n.id,onSelect:c,onToggleCollapse:d}),p&&!h?u.map(e=>(0,s.jsx)(tK,{node:e,depth:a+1,childrenByParent:i,ancestors:m,selectedId:r,collapsedIds:o,onSelect:c,onToggleCollapse:d},e.id)):null]})}function tq(e){let{nodes:t,selectedId:n,onSelect:a,collapsedIds:i,onToggleCollapse:l}=e,r=new Set(t.map(e=>e.id)),o=t.filter(e=>null==e.parentId||!r.has(e.parentId)),c=new Map;for(let e of t){var d;if(o.includes(e))continue;let t=null!=(d=c.get(e.parentId))?d:[];t.push(e),c.set(e.parentId,t)}let u=[],p=new Map;for(let e of o)p.has(e.group)||(p.set(e.group,[]),u.push(e.group)),p.get(e.group).push(e);let m=t.reduce((e,t)=>{var n;return e+(null!=(n=t.tokens)?n:0)},0);return(0,s.jsxs)("div",{className:tU().tree,children:[u.map(e=>(0,s.jsxs)("div",{className:tU().group,children:[null!==e?(0,s.jsx)("div",{className:tU().groupHead,children:e}):null,p.get(e).map(e=>(0,s.jsx)(tK,{node:e,depth:0,childrenByParent:c,ancestors:new Set,selectedId:n,collapsedIds:i,onSelect:a,onToggleCollapse:l},e.id))]},null!=e?e:"__ungrouped__")),(0,s.jsxs)("div",{className:tU().footer,children:[t.length," agent",1===t.length?"":"s"," \xb7 ",(m/1e3).toFixed(1),"k tok"]})]})}function tZ(e){let{block:t}=e;switch(t.kind){case"markdown":return(0,s.jsx)("div",{className:tU().outcomeBlock,dangerouslySetInnerHTML:{__html:eu(t.text)}});case"files":return(0,s.jsx)("div",{className:"".concat(tU().outcomeBlock," ").concat(tU().files),children:t.files.map((e,t)=>(0,s.jsxs)("span",{className:tU().fileChip,children:["◦ ",e]},t))});case"badge":return(0,s.jsx)("div",{className:tU().outcomeBlock,children:(0,s.jsxs)("span",{className:"".concat(tU().badge," ").concat(t.ok?tU().badgeOk:tU().badgeFail),children:[t.ok?"✓":"✕",(0,s.jsx)("span",{className:tU().badgeLabel,children:t.label})]})});case"prose":return(0,s.jsx)("div",{className:"".concat(tU().outcomeBlock," ").concat(tU().prose),children:t.text});case"pre":return(0,s.jsx)("pre",{className:"".concat(tU().outcomeBlock," ").concat(tU().rawPre),children:t.text});default:return null}}function tQ(e){let{detail:t,error:n,onRetry:i,onBack:l}=e,[r,o]=(0,a.useState)(!1),[c,d]=(0,a.useState)(!1);if(null===t)return(0,s.jsx)("div",{className:tU().detail,children:n?(0,s.jsxs)("div",{className:tU().loading,children:["Failed to load subagent detail. ",(0,s.jsx)(es,{onClick:()=>null==i?void 0:i(),children:"Retry"})]}):(0,s.jsx)("div",{className:tU().loading,children:"Loading…"})});let{node:u,prompt:p,activity:m,outcome:h}=t,_="running"===u.status?"live":"error"===u.status?"neutral":"done",g=null!=u.startedAt&&null!=u.endedAt?(()=>{let e=Math.round(Math.max(0,u.endedAt-u.startedAt)/1e3),t=Math.floor(e/60),n=e%60;return t>0?"".concat(t,"m").concat(n,"s"):"".concat(n,"s")})():null,v=p.split("\n").length>12,x=function(e){let t;if("text"===e.kind)return[{kind:"markdown",text:e.raw}];try{t=JSON.parse(e.raw)}catch(t){return[{kind:"pre",text:e.raw}]}if("object"!=typeof t||null===t||Array.isArray(t))return[{kind:"pre",text:JSON.stringify(t,null,2)}];let n=t;if(!("string"==typeof n.summary||Array.isArray(n.files)||"boolean"==typeof n.testsPassed||"string"==typeof n.notes))return[{kind:"pre",text:JSON.stringify(t,null,2)}];let s=[];return"string"==typeof n.summary&&s.push({kind:"markdown",text:n.summary}),Array.isArray(n.files)&&s.push({kind:"files",files:n.files}),"boolean"==typeof n.testsPassed&&s.push({kind:"badge",label:"tests",ok:n.testsPassed}),"string"==typeof n.notes&&s.push({kind:"prose",text:n.notes}),s}(h),f=m.slice(-20);return(0,s.jsxs)("div",{className:tU().detail,children:[(0,s.jsxs)("div",{className:tU().detailHeader,children:[(0,s.jsxs)("div",{className:tU().backRow,children:[(0,s.jsx)(k,{label:"Back",onClick:l,children:"‹ back"}),(0,s.jsx)("span",{className:tU().title,children:u.label})]}),(0,s.jsxs)("div",{className:tU().metaRow,children:[(0,s.jsx)(b,{status:_,pulse:"running"===u.status}),"error"===u.status?(0,s.jsx)("span",{className:tU().errorGlyph,children:"✕"}):null,u.model?(0,s.jsx)("span",{className:tU().segment,children:u.model}):null,null!=u.tokens?(0,s.jsxs)("span",{className:tU().segment,children:[(u.tokens/1e3).toFixed(1),"k tok"]}):null,null!=u.toolCalls?(0,s.jsxs)("span",{className:tU().segment,children:[u.toolCalls," tool calls"]}):null,g?(0,s.jsx)("span",{className:tU().segment,children:g}):null]})]}),(0,s.jsxs)("div",{className:tU().section,children:[(0,s.jsx)("div",{className:tU().sectionHead,children:"PROMPT"}),(0,s.jsx)("div",{className:"".concat(tU().prompt," ").concat(!r&&v?tU().promptClamped:""),children:p}),v?(0,s.jsx)("button",{type:"button",className:tU().showMore,onClick:()=>o(e=>!e),children:r?"Show less":"Show more"}):null]}),(0,s.jsxs)("div",{className:tU().section,children:[(0,s.jsx)("div",{className:tU().sectionHead,children:"ACTIVITY"}),f.map((e,t)=>(0,s.jsxs)("div",{className:tU().activityRow,children:[(0,s.jsx)("span",{className:tU().activityTool,children:e.tool}),(0,s.jsx)("span",{className:tU().activitySummary,children:e.summary})]},t))]}),(0,s.jsxs)("div",{className:tU().section,children:[(0,s.jsx)("div",{className:tU().sectionHead,children:"OUTCOME"}),x.map((e,t)=>(0,s.jsx)(tZ,{block:e},t)),(0,s.jsx)("button",{type:"button",className:tU().rawToggle,onClick:()=>d(e=>!e),children:c?"Hide raw JSON":"Show raw JSON"}),c?(0,s.jsx)("pre",{className:tU().rawPre,children:h.raw}):null]})]})}function tX(e){let{projectId:t,sessionId:n,refreshKey:i,onClose:l}=e,[r,o]=(0,a.useState)([]),[c,d]=(0,a.useState)(null),[u,m]=(0,a.useState)(new Set),[h,_]=(0,a.useState)(null),[g,v]=(0,a.useState)(!1),[x,f]=(0,a.useState)(0),j=(0,a.useState)({done:!1})[0],b=(0,a.useCallback)(async()=>{try{let{nodes:e}=await (0,p.getSubagents)(t,n);if(o(e),!j.done){j.done=!0;let t=e.filter(e=>null===e.parentId&&"running"!==e.status).map(e=>e.id);t.length&&m(new Set(t))}}catch(e){}},[t,n,j]);(0,a.useEffect)(()=>{b()},[b,i]),(0,a.useEffect)(()=>{if(!c)return void _(null);let e=!1;return _(null),v(!1),(0,p.getSubagentDetail)(t,n,c).then(t=>{e||_(t)}).catch(()=>{e||v(!0)}),()=>{e=!0}},[c,t,n,x]),(0,a.useEffect)(()=>{if(void 0===i||!c)return;let e=!1;return(0,p.getSubagentDetail)(t,n,c).then(t=>{e||_(t)}).catch(()=>{}),()=>{e=!0}},[i]);let y=(0,a.useCallback)(e=>{m(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);return(0,s.jsxs)("div",{className:tU().viewer,children:[(0,s.jsxs)("div",{className:tU().viewerHead,children:[(0,s.jsx)("span",{className:tU().viewerTitle,children:"Subagents"}),(0,s.jsx)(k,{label:"Close subagent viewer",onClick:l,children:"✕"})]}),c?(0,s.jsx)(tQ,{detail:h,error:g,onRetry:()=>f(e=>e+1),onBack:()=>d(null)}):(0,s.jsx)(tq,{nodes:r,selectedId:c,onSelect:d,collapsedIds:u,onToggleCollapse:y})]})}var tY=n(7346),t$=n.n(tY);function t0(e){return"".concat(Math.round(e/1e3),"k")}function t1(){let{state:e,dispatch:t}=u(),n=e.tabs.filter(e=>"term"===e.kind&&e.ptyId);return 0===n.length?(0,s.jsxs)("div",{className:t$().empty,children:[(0,s.jsx)("div",{className:t$().mark,children:"▦"}),(0,s.jsx)("div",{children:"No live sessions — start one from the rail."})]}):(0,s.jsx)("div",{className:t$().grid,children:n.map(n=>{let a="waiting"===n.status,i=n.id===e.activeTab;return(0,s.jsxs)("div",{className:[t$().tile,a?t$().waiting:"",n.linkedKind?t$().bridged:"",i?t$().selected:""].filter(Boolean).join(" "),children:[(0,s.jsxs)("button",{type:"button",className:t$().head,onClick:()=>t({type:"activateTab",id:n.id}),children:[(0,s.jsx)(b,{status:a?"waiting":"live",size:7}),(0,s.jsx)("span",{className:t$().repo,children:function(e,t){var n;let s=t.find(t=>t.id===e.projectId);return null!=(n=null==s?void 0:s.name)?n:e.label}(n,e.projects)}),n.linkedKind?(0,s.jsx)(eJ,{kind:n.linkedKind}):null,n.provider?(0,s.jsx)(ee,{provider:n.provider}):null,n.linkSrc?(0,s.jsxs)("span",{className:t$().from,children:["from ",function(t){let n=e.tabs.find(e=>e.sessionId===t);if(n){let e=n.provider?$[n.provider].glyph:"",t=n.label.length>24?n.label.slice(0,24)+"…":n.label;return"".concat(e," ").concat(t).trim()}return t.slice(0,8)}(n.linkSrc)]}):null,a?(0,s.jsx)("span",{className:t$().flag,children:"needs input"}):null,n.ctx?(0,s.jsxs)("span",{className:t$().ctx,children:[(0,s.jsxs)("span",{className:t$().ctxText,children:[t0(n.ctx.tokens)," / ",t0(n.ctx.window)]}),(0,s.jsx)("span",{className:t$().meterSlot,children:(0,s.jsx)(e3,{pct:Math.round(n.ctx.tokens/n.ctx.window*100),tone:"ctx"})}),(0,s.jsxs)("span",{className:t$().pct,children:[Math.round(n.ctx.tokens/n.ctx.window*100),"%"]})]}):null]}),(0,s.jsx)("div",{className:t$().body,children:(0,s.jsx)(tz,{ptyId:n.ptyId,projectId:n.projectId,sessionId:n.sessionId,provider:n.provider,branch:n.branch,variant:"grid"})})]},n.id)})})}var t2=n(5376),t4=n.n(t2);let t6=[{bucket:"waiting",label:"Waiting",empty:"nothing waiting"},{bucket:"done",label:"Done",empty:"nothing unseen"},{bucket:"working",label:"Working",empty:"nothing running"},{bucket:"idle",label:"Idle",empty:"nothing idle"}],t5={working:"live",waiting:"waiting",done:"unviewed",idle:"neutral"};function t3(e,t){if(!e)return null;let n=Math.max(0,Math.round((t-e)/6e4));if(n<1)return"now";if(n<60)return"".concat(n,"m ago");let s=Math.floor(n/60);return s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}function t7(e,t){let n=e.startedAt?t-e.startedAt:e.durationMs;if(!n||n<6e4)return null;let s=Math.floor(n/36e5),a=Math.round(n%36e5/6e4);return s>0?"".concat(s,"h ").concat(a,"m"):"".concat(a,"m")}function t8(){let{state:e,dispatch:t}=u(),[n,i]=(0,a.useState)(new Map),[l,r]=(0,a.useState)(()=>Date.now());(0,a.useEffect)(()=>{let e=setInterval(()=>r(Date.now()),3e4);return()=>clearInterval(e)},[]);let o=(0,a.useMemo)(()=>[...new Set(e.tabs.filter(e=>"term"===e.kind&&e.ptyId&&e.projectId).map(e=>e.projectId))],[e.tabs]);(0,a.useEffect)(()=>{let e=!1;return Promise.all(o.map(e=>(0,p.getSessions)(e,{limit:50}).catch(()=>[]))).then(t=>{if(e)return;let n=new Map;for(let e of t.flat())n.set(e.id,e);i(n)}),()=>{e=!0}},[o.join(",")]);let{counts:c,cards:d}=I(e.tabs,n);return 0===d.length?(0,s.jsxs)("div",{className:t4().empty,children:[(0,s.jsx)("div",{className:t4().mark,children:"◫"}),(0,s.jsx)("div",{children:"No live sessions — start one from the rail."})]}):(0,s.jsx)("div",{className:t4().board,children:t6.map(e=>(0,s.jsxs)("div",{className:t4().column,children:[(0,s.jsxs)("div",{className:t4().colHead,children:[(0,s.jsx)(b,{status:t5[e.bucket],size:7}),(0,s.jsx)("span",{className:t4().colLabel,children:e.label}),(0,s.jsx)("span",{className:t4().colCount,children:c[e.bucket]})]}),d.filter(t=>t.bucket===e.bucket).map(e=>(0,s.jsxs)("button",{type:"button",className:t4().card,onClick:()=>{t({type:"activateTab",id:e.tabId}),t({type:"setView",view:"tabs"})},children:[(0,s.jsxs)("span",{className:t4().cardTop,children:[(0,s.jsx)(b,{status:t5[e.bucket],size:7}),(0,s.jsx)("span",{className:t4().cardTitle,children:e.title}),e.provider?(0,s.jsx)(ee,{provider:e.provider}):null]}),(0,s.jsxs)("span",{className:t4().cardMeta,children:[e.branch?(0,s.jsxs)("span",{className:t4().branch,children:[e.isWorkspace?(0,s.jsx)("span",{className:t4().workspaceMark,title:"Workspace session",children:"⑃"}):null,(0,s.jsx)(t_,{branch:e.branch})]}):null,t3(e.lastActivityTs,l)?(0,s.jsx)("span",{children:t3(e.lastActivityTs,l)}):null,t7(e,l)?(0,s.jsx)("span",{children:t7(e,l)}):null]})]},e.tabId)),0===c[e.bucket]?(0,s.jsx)("div",{className:t4().colEmpty,children:e.empty}):null]},e.bucket))})}var t9=n(1210),ne=n.n(t9);let nt=[1e3,2e3,4e3];function nn(e){var t,n;let{leadSessionId:i,projectId:l,refreshKey:r,touchPings:o,onMembersResolved:c}=e,[d,u]=(0,a.useState)(null),[m,h]=(0,a.useState)("loading"),[_,g]=(0,a.useState)(null),[v,x]=(0,a.useState)(0),f=(0,a.useRef)(!1);(0,a.useEffect)(()=>{let e=!1,t=null;return f.current=!1,h("loading"),!function n(s){let a=()=>{if(!e){if(f.current)return void h("gone");s<nt.length?t=setTimeout(()=>n(s+1),nt[s]):h("unresolved")}};(0,p.getTeamMembers)(i).then(t=>{if(!e){if(!t)return a();f.current=!0,u(t),h("live"),null==c||c(t.members.length)}}).catch(a)}(0),()=>{e=!0,t&&clearTimeout(t)}},[i,r]);let j=null!=(t=null==_?void 0:_.sessionId)?t:null,b=(0,a.useRef)(void 0);(0,a.useEffect)(()=>{b.current=void 0},[j]),(0,a.useEffect)(()=>{if(!j)return;let e=o[j];void 0!==e&&(void 0!==b.current&&e!==b.current&&x(e=>e+1),b.current=e)},[j,o]),(0,a.useEffect)(()=>{if("unresolved"!==m||void 0===o[i])return;let e=!1;return(0,p.getTeamMembers)(i).then(t=>{!e&&t&&(f.current=!0,u(t),h("live"),null==c||c(t.members.length))},()=>{}),()=>{e=!0}},[m,i,o[i]]);let y=null!=(n=null==d?void 0:d.members)?n:[],w="gone"===m;return _?(0,s.jsxs)("div",{className:ne().panel,children:[(0,s.jsx)("div",{className:ne().head,children:(0,s.jsx)("button",{type:"button",className:ne().back,onClick:()=>g(null),children:"← Roster"})}),_.sessionId?(0,s.jsx)("div",{className:ne().transcriptWrap,children:(0,s.jsx)(eh,{projectId:l,sessionId:_.sessionId,title:_.name,provider:"claude"},"".concat(_.sessionId,"-").concat(v))}):(0,s.jsxs)("div",{className:ne().empty,children:["No attachable transcript — ",_.name," runs in-process, with no session file of its own."]})]}):(0,s.jsxs)("div",{className:ne().panel,children:[(0,s.jsxs)("div",{className:ne().head,children:[(0,s.jsx)("span",{className:ne().title,children:"Team"}),w?(0,s.jsx)("span",{className:ne().note,children:"session ended"}):null]}),"loading"===m?(0,s.jsx)("div",{className:ne().empty,children:"Resolving team roster…"}):"unresolved"===m?(0,s.jsx)("div",{className:ne().empty,children:"No live roster for this session."}):0===y.length?(0,s.jsx)("div",{className:ne().empty,children:"No teammates joined yet."}):(0,s.jsx)("ul",{className:ne().roster,children:y.map(e=>(0,s.jsx)(ns,{member:e,finished:w||!1===e.isActive,onOpen:()=>g(e)},e.name))})]})}function ns(e){let{member:t,finished:n,onOpen:a}=e,i="in-process"===t.backendType||null===t.sessionId?"neutral":t.isActive?"live":"done";return(0,s.jsxs)("li",{className:ne().row,onClick:a,children:[(0,s.jsx)(b,{status:i,size:8}),(0,s.jsx)("span",{className:ne().name,children:t.name}),t.model?(0,s.jsx)("span",{className:ne().model,children:t.model}):null,n?(0,s.jsx)("span",{className:ne().check,"aria-label":"finished",children:"✓"}):null,(0,s.jsx)("span",{className:ne().tokens,children:"—"}),(0,s.jsx)("span",{className:ne().duration,children:function(e){let t=Math.floor(Math.max(0,Date.now()-e)/6e4);if(t<1)return"<1m";if(t<60)return"".concat(t,"m");let n=Math.floor(t/60);return n<24?"".concat(n,"h ").concat(t%60,"m"):"".concat(Math.floor(n/24),"d")}(t.joinedAt)})]})}var na=n(1784),ni=n.n(na);function nl(e){var t,n,i,l;let{projects:r,providers:o}=e,{dispatch:c}=u(),[d,m]=(0,a.useState)(null!=(n=null==(t=r[0])?void 0:t.id)?n:""),[h,g]=(0,a.useState)(null!=(i=o[0])?i:"claude"),[v,x]=(0,a.useState)(""),[f,j]=(0,a.useState)(!1),b=null!=(l=r.find(e=>e.id===d))?l:r[0];async function y(){if(b&&!f){j(!0);try{let{tabMeta:e}=await (0,p.startSession)({projectPath:b.path,provider:h,mode:"new",firstPrompt:v.trim()||void 0});c({type:"openTerm",ptyId:e.ptyId,projectId:b.id,label:b.name,provider:h})}catch(e){j(!1)}}}if(!b)return(0,s.jsx)("div",{className:ni().hint,children:"No projects yet — start a session in a repo to see it here."});let w=e=>"".concat($[e].glyph," ").concat($[e].name);return(0,s.jsxs)("div",{className:ni().composer,children:[(0,s.jsxs)("div",{className:ni().headline,children:[(0,s.jsx)("span",{className:ni().lead,children:"New session in"}),(0,s.jsxs)("span",{className:ni().pickerWrap,children:[(0,s.jsx)("span",{className:ni().pickerIcon,children:"▢"}),(0,s.jsx)(e4,{options:r.map(e=>({value:e.id,label:e.name})),value:b.id,onChange:m})]}),(0,s.jsx)("span",{className:ni().lead,children:"with"}),(0,s.jsx)("span",{className:ni().pickerWrap,children:(0,s.jsx)(e4,{options:o.map(w),value:w(h),onChange:e=>{let t=o.find(t=>w(t)===e);t&&g(t)}})})]}),(0,s.jsxs)("div",{className:ni().promptBox,children:[(0,s.jsx)(_,{value:v,onChange:x,placeholder:"What are you building?",multiline:3}),(0,s.jsxs)("div",{className:ni().promptFoot,children:[(0,s.jsxs)("span",{className:ni().footChip,children:[$[h].glyph," ",$[h].name]}),(0,s.jsx)("span",{className:ni().footSpacer}),(0,s.jsx)(k,{label:"Start session",onClick:y,children:"↵"})]})]}),(0,s.jsxs)("div",{className:ni().foot,children:[(0,s.jsx)("span",{className:ni().footNote,children:"⛨ Default Approvals"}),(0,s.jsx)("span",{className:ni().footSpacer}),(0,s.jsx)(t_,{branch:"main"})]})]})}function nr(e,t,n){return Math.min(n,Math.max(t,e))}function no(e){let t=(0,a.useRef)(e);t.current=e;let n=(0,a.useRef)(0),s=(0,a.useRef)(0),i=(0,a.useRef)(null);return{onPointerDown:(0,a.useCallback)(e=>{var a,l;e.preventDefault();let r=e.currentTarget,o=e.pointerId;function c(){i.current=null,t.current.onDrag(s.current-n.current,n.current,s.current)}function d(e){s.current=e.clientX,null==i.current&&(i.current=requestAnimationFrame(c))}function u(){var e,n;null!=i.current&&(cancelAnimationFrame(i.current),i.current=null),r.removeEventListener("pointermove",d),r.removeEventListener("pointerup",u),r.removeEventListener("pointercancel",u),r.hasPointerCapture(o)&&r.releasePointerCapture(o),document.body.style.cursor="",document.body.style.userSelect="",null==(e=(n=t.current).onDragEnd)||e.call(n)}n.current=e.clientX,s.current=e.clientX,r.setPointerCapture(o),document.body.style.cursor="col-resize",document.body.style.userSelect="none",null==(a=(l=t.current).onDragStart)||a.call(l),r.addEventListener("pointermove",d),r.addEventListener("pointerup",u),r.addEventListener("pointercancel",u)},[])}}var nc=n(6489),nd=n.n(nc);function nu(e){let{onRescan:t}=e;return(0,s.jsx)("div",{className:nd().setupWrap,children:(0,s.jsx)(e$,{title:"Set up seshmux",children:(0,s.jsxs)("div",{className:nd().setupBody,children:[(0,s.jsx)("p",{className:nd().setupIntro,children:"No agent CLI was found on your PATH. Install Claude Code or Codex CLI, then rescan."}),(0,s.jsx)("div",{className:nd().installBlock,children:"npm install -g @anthropic-ai/claude-code"}),(0,s.jsx)("div",{className:nd().installBlock,children:"npm install -g @openai/codex"}),(0,s.jsx)("div",{className:nd().setupActions,children:(0,s.jsx)(es,{variant:"primary",onClick:t,children:"Rescan"})})]})})})}function np(){var e,t,n;let{state:i,dispatch:r}=u(),[o,c]=(0,a.useState)(null),[d,m]=(0,a.useState)(null),[h,_]=(0,a.useState)(null),[g,v]=(0,a.useState)(!1),[x,f]=(0,a.useState)(null),[j,b]=(0,a.useState)(null),[y,w]=(0,a.useState)({}),[k,N]=(0,a.useState)(null),[S,C]=(0,a.useState)({}),[T,I]=(0,a.useState)({}),[M,P]=(0,a.useState)({}),[E,L]=(0,a.useState)({}),[A,O]=(0,a.useState)(!1),B=i.tabs.find(e=>e.id===i.activeTab);function D(e){r({type:"toggleHidden",id:e});let t=i.config.hidden.includes(e)?i.config.hidden.filter(t=>t!==e):[...i.config.hidden,e];(0,p.putConfig)({...i.config,hidden:t})}let H=function(e,t){if(!t)return null;let n=e.find(e=>e.id===t);if(!n)return null;let s=l(e).find(e=>e.some(e=>e.id===t));if(!s||s.length<2)return null;let a=s[0],i=s.slice(1);return{source:a,linked:n.linked?n:i[i.length-1]}}(i.tabs,i.activeTab),V=H?null:function(e,t){if(!t)return null;let n=e.find(e=>e.id===t);return n&&"term"===n.kind&&n.isTeamLead&&n.sessionId?{tab:n,leadSessionId:n.sessionId}:null}(i.tabs,i.activeTab),F=(()=>{let e=new Set(i.projects.map(e=>e.provider)),t=["claude","codex"].filter(t=>e.has(t));return t.length?t:["claude"]})(),W=(0,a.useRef)(i.tabs);W.current=i.tabs;let z=(0,a.useRef)(!0);z.current=(null==(e=i.config.settings)?void 0:e.macNotifications)!==!1;let G=(0,a.useRef)(!0);G.current=(null==(t=i.config.settings)?void 0:t.notifyOnDone)!==!1;let U=(0,a.useRef)(i.activeTab);U.current=i.activeTab;let J=(0,a.useRef)({}),K=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!K.current){K.current=!0;let e=localStorage.getItem("seshmux-view");if(("grid"===e||"tabs"===e||"agents"===e)&&e!==i.view)return void r({type:"setView",view:e})}localStorage.setItem("seshmux-view",i.view)},[i.view]);let[q,Z]=(0,a.useState)(288),Q=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!Q.current){Q.current=!0;let e=function(e,t,n,s){if(null==e)return 288;let a=Number(e);return Number.isFinite(a)?nr(a,288,560):288}(localStorage.getItem("seshmux-rail-width"),0,0,288);if(e!==q)return void Z(e)}localStorage.setItem("seshmux-rail-width",String(q))},[q]);let X=(0,a.useRef)(288),Y=no({onDragStart:()=>{X.current=q},onDrag:e=>{Z(nr(X.current+e,288,560))}}),[$,ee]=(0,a.useState)(.5),et=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!et.current){et.current=!0;let e=localStorage.getItem("seshmux-viewer-split"),t=null==e?NaN:Number(e),n=Number.isFinite(t)?nr(t,.15,.85):.5;if(n!==$)return void ee(n)}localStorage.setItem("seshmux-viewer-split",String($))},[$]);let en=(0,a.useRef)(null),es=(0,a.useRef)(0),ea=(0,a.useRef)(.5),ei=no({onDragStart:()=>{var e,t;ea.current=$,es.current=null!=(t=null==(e=en.current)?void 0:e.getBoundingClientRect().width)?t:0},onDrag:e=>{var t;let n=es.current;if(!n)return;let s=(t=ea.current*n+e,nr(t,360,Math.max(360,n-300)));ee(nr(s/n,.15,.85))}}),el=(0,a.useRef)(!1);function er(e){if(("transcript"===e.kind||"term"===e.kind&&!e.ptyId)&&e.sessionId&&e.projectId)return(0,s.jsx)(eh,{projectId:e.projectId,sessionId:e.sessionId,title:e.label,provider:e.provider},e.id);if("term"===e.kind&&e.ptyId){let t=!!e.projectId&&!!e.sessionId&&"codex"!==e.provider;return(0,s.jsx)(tz,{ptyId:e.ptyId,projectId:e.projectId,sessionId:e.sessionId,provider:e.provider,branch:e.branch,ctx:e.ctx,onOpenSubagents:t?()=>{var t;return t=e.id,void(N(null),b(t))}:void 0,subagentPing:e.sessionId?y[e.sessionId]:void 0,isTeamLead:e.isTeamLead,teamMemberCount:e.sessionId?S[e.sessionId]:void 0,onOpenTeam:e.isTeamLead?()=>{var t;return t=e.id,void(b(null),N(e=>e===t?null:t))}:void 0},e.id)}return"scratchpad"===e.kind&&e.projectId?(0,s.jsx)(tf,{projectId:e.projectId,path:e.label,refreshKey:E[e.projectId]},e.id):"planoff"===e.kind&&e.projectId?(0,s.jsx)(tw,{projectId:e.projectId,repo:e.label,onExecute:(t,n)=>r({type:"openTerm",ptyId:n,projectId:e.projectId,label:e.label,provider:t})},e.id):(0,s.jsx)("div",{className:nd().paneEmpty,children:(0,s.jsx)("div",{className:nd().mainPlaceholder,children:e.label})},e.id)}return(0,a.useEffect)(()=>{el.current&&i.activeTab&&localStorage.setItem("seshmux-active-tab",i.activeTab)},[i.activeTab]),(0,a.useEffect)(()=>{var e;let t,n,s;(0,p.getConfig)().then(e=>r({type:"setConfig",config:e})),Promise.all([(0,p.getProjects)(),(0,p.getLive)().catch(()=>({live:[]}))]).then(e=>{let[t,{live:n}]=e;r({type:"setProjects",projects:t});let s=[];try{s=JSON.parse(localStorage.getItem("seshmux-dismissed-ptys")||"[]")}catch(e){}for(let e of n){var a,i,l;if(s.includes(e.ptyId))continue;let n=t.find(t=>t.path===e.cwd),o=null!=(i=null!=(a=null==n?void 0:n.name)?a:e.cwd.split("/").filter(Boolean).pop())?i:"session";if(r({type:"openTerm",ptyId:e.ptyId,projectId:null!=(l=null==n?void 0:n.id)?l:e.cwd,label:o,provider:null==n?void 0:n.provider,sessionId:e.sessionId}),e.sessionId){let t="term-"+e.ptyId;(0,p.getTeamMembers)(e.sessionId).then(e=>e&&r({type:"setTabTeam",tabId:t,teamName:e.teamName})).catch(()=>{})}}let o=localStorage.getItem("seshmux-active-tab");o&&n.some(e=>"term-"+e.ptyId===o&&!s.includes(e.ptyId))&&r({type:"activateTab",id:o}),el.current=!0}).catch(()=>{});let a={working:"live",waiting:"waiting",idle:"live"},i=(e=e=>{switch(O("server-restarting"===e.event),e.event){case"status":{var t,n,s;r({type:"setTermStatus",ptyId:e.ptyId,status:a[e.status],ni:e.status,ts:Date.now()});let i=W.current.find(t=>"term"===t.kind&&t.ptyId===e.ptyId),l=null!=(t=null==i?void 0:i.label)?t:"A session",o=J.current[e.ptyId],c=!!i&&i.id===U.current;n=e.status,s=document.hidden,"working"===o&&("idle"===n||"waiting"===n)&&(!c||s)&&(r({type:"markUnviewed",ptyId:e.ptyId}),"idle"===e.status&&document.hidden&&z.current&&G.current&&(0,p.notify)("".concat(l," finished"),"The session finished and is waiting for you.").catch(()=>{})),J.current[e.ptyId]=e.status,"waiting"===e.status?(m({ptyId:e.ptyId,repo:l}),document.hidden&&z.current&&(0,p.notify)("".concat(l," needs input"),"A session is waiting for your input.").catch(()=>{})):m(t=>t&&t.ptyId===e.ptyId?null:t);break}case"ctx":r({type:"setTermCtx",sessionId:e.sessionId,ctx:e.ctx});break;case"approval":f(e);break;case"subagents":w(t=>{var n;return{...t,[e.sessionId]:(null!=(n=t[e.sessionId])?n:0)+1}});break;case"session-new":case"session-touch":{let t=function(e,t){let n=e.filter(e=>"term"===e.kind&&e.projectId===t&&!e.sessionId);return n.length?n[n.length-1].id:null}(W.current,e.projectId);t&&r({type:"setTabSession",tabId:t,sessionId:e.sessionId}),P(t=>{var n;return{...t,[e.sessionId]:(null!=(n=t[e.sessionId])?n:0)+1}});break}case"team":I(t=>{var n;return{...t,[e.leadSessionId]:(null!=(n=t[e.leadSessionId])?n:0)+1}});break;case"scratchpad":L(t=>{var n;return{...t,[e.projectId]:(null!=(n=t[e.projectId])?n:0)+1}})}},t=null,n=!1,s=250,!function a(){if(n)return;let i="https:"===location.protocol?"wss:":"ws:";(t=new WebSocket("".concat(i,"//").concat(location.host,"/ws/events?token=").concat(encodeURIComponent((0,p.authToken)())))).addEventListener("open",()=>{s=250}),t.addEventListener("message",t=>{let n;try{n=JSON.parse("string"==typeof t.data?t.data:"")}catch(e){return}n&&"string"==typeof n.event&&e(n)}),t.addEventListener("close",()=>{n||(t=null,setTimeout(a,s),s=Math.min(2*s,5e3))}),t.addEventListener("error",()=>null==t?void 0:t.close())}(),{close(){n=!0,null==t||t.close()}});function l(){if(document.hidden)return;let e=U.current;e&&r({type:"activateTab",id:e})}return document.addEventListener("visibilitychange",l),()=>{i.close(),document.removeEventListener("visibilitychange",l)}},[r]),(0,s.jsxs)("div",{className:nd().shell,children:[A?(0,s.jsx)("div",{className:nd().restartBanner,children:"Updating — reconnecting…"}):null,(0,s.jsx)(R,{onPickHit:function(e){c({projectId:e.project,sessionId:e.sessionId}),r({type:"openSession",sessionId:e.sessionId,projectId:e.project,label:e.title||"untitled",kind:"transcript",provider:e.provider})},onOpenCustomizations:()=>_({})}),(0,s.jsxs)("div",{className:nd().app,children:[i.settingsOpen?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eW,{width:q,jumpTo:o,onJumped:()=>c(null),onOpenCustomizations:_,onOpenProjectVisibility:()=>v(!0)}),(0,s.jsx)("div",{className:nd().railHandle,onPointerDown:Y.onPointerDown,onDoubleClick:()=>Z(288),role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar"})]}),(0,s.jsx)("main",{className:nd().main,children:i.settingsOpen?(0,s.jsx)("div",{className:nd().pane,children:(0,s.jsx)(tp,{})}):(0,s.jsxs)(s.Fragment,{children:[i.tabs.length>0&&"tabs"===i.view?(0,s.jsx)(eQ,{}):null,"grid"===i.view?(0,s.jsx)("div",{className:nd().pane,children:(0,s.jsx)(t1,{})}):"agents"===i.view?(0,s.jsx)("div",{className:nd().pane,children:(0,s.jsx)(t8,{})}):H?(0,s.jsxs)("div",{className:nd().split,children:[(0,s.jsx)("div",{className:nd().splitSide,children:er(H.source)}),(0,s.jsx)("div",{className:"".concat(nd().splitSide," ").concat(nd().splitSideRight),children:er(H.linked)})]}):B&&"term"===B.kind?(()=>{var e;let t=!!V&&k===B.id,n=!t&&j===B.id&&!!B.sessionId&&!!B.projectId,a=t||n,i=100*nr($,.15,.85);return(0,s.jsxs)("div",{ref:en,className:"".concat(nd().split," ").concat(a?"":nd().splitSolo),children:[(0,s.jsx)("div",{className:nd().splitSide,style:a?{flex:"0 0 ".concat(i,"%"),minWidth:"".concat(360,"px")}:void 0,children:er(B)}),t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:nd().splitHandle,onPointerDown:ei.onPointerDown,onDoubleClick:()=>ee(.5),role:"separator","aria-orientation":"vertical","aria-label":"Resize terminal / team split"}),(0,s.jsx)("div",{className:"".concat(nd().splitSide," ").concat(nd().splitSideRight),style:{flex:"1 1 0",minWidth:"".concat(300,"px")},children:(0,s.jsx)(nn,{leadSessionId:V.leadSessionId,projectId:null!=(e=V.tab.projectId)?e:"",refreshKey:T[V.leadSessionId],touchPings:M,onMembersResolved:e=>C(t=>({...t,[V.leadSessionId]:e}))})})]}):n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:nd().splitHandle,onPointerDown:ei.onPointerDown,onDoubleClick:()=>ee(.5),role:"separator","aria-orientation":"vertical","aria-label":"Resize terminal / subagent split"}),(0,s.jsx)("div",{className:"".concat(nd().splitSide," ").concat(nd().splitSideRight),style:{flex:"1 1 0",minWidth:"".concat(300,"px")},children:(0,s.jsx)(tX,{projectId:B.projectId,sessionId:B.sessionId,refreshKey:y[B.sessionId],onClose:()=>b(null)})})]}):null]})})():B?(0,s.jsx)("div",{className:nd().pane,children:er(B)}):(0,s.jsx)("div",{className:nd().paneEmpty,children:(0,s.jsx)(nl,{projects:i.projects,providers:F})})]})})]}),(0,s.jsx)(tS,{open:!!d,repo:null!=(n=null==d?void 0:d.repo)?n:"",reason:"permission prompt",onJump:function(){if(!d)return;let e=i.tabs.find(e=>"term"===e.kind&&e.ptyId===d.ptyId);e&&r({type:"activateTab",id:e.id}),m(null)},onClose:()=>m(null)}),x?(0,s.jsx)(tM,{open:!0,tool:x.tool,question:x.question,cwd:x.cwd,hop:x.hop,expiresAt:x.expiresAt,onResolve:function(e){x&&((0,p.resolveApproval)(x.requestId,e).catch(()=>{}),f(null))},onExpire:()=>f(null)}):null,(0,s.jsx)(ex,{open:!!h,projectId:null==h?void 0:h.projectId,projectName:null==h?void 0:h.projectName,projects:i.projects,hidden:i.config.hidden,onToggleHidden:D,onClose:()=>_(null)}),(0,s.jsx)(ey,{open:g,onClose:()=>v(!1),projects:i.projects,hidden:i.config.hidden,onToggleHidden:D})]})}function nm(){let[e,t]=(0,a.useState)(null),[n,i]=(0,a.useState)(!0);function l(){i(!0),(0,p.getEnv)().then(e=>{t(e),i(!1)})}return((0,a.useEffect)(()=>{l()},[]),n)?null:!e||e.claude.found||e.codex.found?(0,s.jsx)(K,{value:function(e){var t;let n=Object.keys(null!=(t=null==e?void 0:e.commands)?t:{});return n.length?n:["claude"]}(e),children:(0,s.jsx)(d,{children:(0,s.jsx)(np,{})})}):(0,s.jsx)(nu,{onRescan:l})}},3804:e=>{e.exports={badge:"CtxBadge_badge__GsXml",warm:"CtxBadge_warm__OYnBs",hot:"CtxBadge_hot__ivPJ_"}},4163:e=>{e.exports={path:"TeamModal_path__K_l1S",modeSeg:"TeamModal_modeSeg__6dlks",body:"TeamModal_body__0Muvb",empty:"TeamModal_empty__QiTEQ",label:"TeamModal_label__P_dtE",taskWrap:"TeamModal_taskWrap__OP3hD",memberRow:"TeamModal_memberRow__TSZR6",saveRow:"TeamModal_saveRow__GxtLZ",error:"TeamModal_error__JZvQJ",foot:"TeamModal_foot__WiAI4"}},4205:e=>{e.exports={wrap:"TextInput_wrap__i2Bbg",input:"TextInput_input__qyb6W",hasHint:"TextInput_hasHint__7_QUd",area:"TextInput_area__k2WJZ",kbd:"TextInput_kbd___Yqid"}},4466:e=>{e.exports={chip:"LinkChip_chip___8rop",handoff:"LinkChip_handoff__nBZwB",review:"LinkChip_review__q6IUs",planoff:"LinkChip_planoff__i5Aro"}},5376:e=>{e.exports={board:"AgentsView_board__1nH1Q",column:"AgentsView_column__SCXdH",colHead:"AgentsView_colHead__D23Bk",colLabel:"AgentsView_colLabel__a8MQi",colCount:"AgentsView_colCount__g1xrd",colEmpty:"AgentsView_colEmpty__60UU2",card:"AgentsView_card__GYJQA",cardTop:"AgentsView_cardTop__GpbRS",cardTitle:"AgentsView_cardTitle__NfKcz",cardMeta:"AgentsView_cardMeta__Dn6Qj",branch:"AgentsView_branch__IURWI",workspaceMark:"AgentsView_workspaceMark__Z1OUI",empty:"AgentsView_empty__MS_38",mark:"AgentsView_mark__2dztl"}},5517:e=>{e.exports={nav:"TopNav_nav__Wv_Qm",logo:"TopNav_logo__H2RNI",mark:"TopNav_mark__CUR3a",searchWrap:"TopNav_searchWrap__Z8wo3",searchIcon:"TopNav_searchIcon__26wXo",right:"TopNav_right__t_BD2",liveBadge:"TopNav_liveBadge__qMU6J",badgeText:"TopNav_badgeText__xYeIJ",dot:"TopNav_dot__nTc5F",waiting:"TopNav_waiting__NVfSq"}},5657:e=>{e.exports={rail:"Rail_rail__i7UQE",head:"Rail_head__vBCR7",scan:"Rail_scan__rRPb9",provFilter:"Rail_provFilter__NYGVQ",railFilter:"Rail_railFilter___zU4E",provChips:"Rail_provChips__JCu5_",chip:"Rail_chip__sZCOw",chipActive:"Rail_chipActive__f3uRG",body:"Rail_body__HQQsO",empty:"Rail_empty__TrHqh",proj:"Rail_proj__ZZRw_",dragging:"Rail_dragging__sOitt",hidden:"Rail_hidden__Lc0jw",dragOver:"Rail_dragOver__9SQqd",projHead:"Rail_projHead__L8RX9",headRow:"Rail_headRow__YTP0e",revealOnHover:"Rail_revealOnHover__ld30B",caret:"Rail_caret__in11o",caretOpen:"Rail_caretOpen__C6G_r",name:"Rail_name__ZNd2O",count:"Rail_count__JxG4K",actionsRow:"Rail_actionsRow__FUZcD",pinnedAlways:"Rail_pinnedAlways__5N_4N",sessions:"Rail_sessions__dBNUs",open:"Rail_open__0nOQm",filterWrap:"Rail_filterWrap__Mrb05",sess:"Rail_sess__B_hW4",selected:"Rail_selected__LOhaF",sessDot:"Rail_sessDot__9f2mg",sessInfo:"Rail_sessInfo__yuAY_",sessTop:"Rail_sessTop__S9dE0",sessTitle:"Rail_sessTitle__xNv_2",sessAgent:"Rail_sessAgent__R1bxN",workspaceMark:"Rail_workspaceMark__di9HP",claude:"Rail_claude__psw4A",codex:"Rail_codex__uDYi9",sessSub:"Rail_sessSub___qA_G",noMatch:"Rail_noMatch__x9ZZ0",loadMore:"Rail_loadMore__enE1b"}},5755:e=>{e.exports={transcript:"Transcript_transcript__cJKs2",inner:"Transcript_inner__MhrRh",header:"Transcript_header__orNdN",title:"Transcript_title__29kml",meta:"Transcript_meta__klA1Y",actions:"Transcript_actions__R2WP_",actionError:"Transcript_actionError__oFZkA",loading:"Transcript_loading__voaZ_",loadMore:"Transcript_loadMore__MMz2z",msg:"Transcript_msg__Q3BWg",role:"Transcript_role__HKEnU",body:"Transcript_body__EP0UL",content:"Transcript_content__pHLjf",user:"Transcript_user__0E2Fn",assistant:"Transcript_assistant__3Qm1B",dot:"Transcript_dot__ueU7x",toolcall:"Transcript_toolcall__ViZkS",toolcallHead:"Transcript_toolcallHead__lb_KX",caret:"Transcript_caret__GERKK",open:"Transcript_open__p0hTb",toolName:"Transcript_toolName__UvSsB",argPreview:"Transcript_argPreview__rBq0V",toolcallBody:"Transcript_toolcallBody__GeaXI"}},6286:e=>{e.exports={wrap:"FilterMenu_wrap__2f_7d",menu:"FilterMenu_menu__X2yT2",item:"FilterMenu_item__iHOEV",itemLabel:"FilterMenu_itemLabel__tchuX",check:"FilterMenu_check__nM8K_",chevron:"FilterMenu_chevron__B9maM",sep:"FilterMenu_sep__9hquO"}},6416:e=>{e.exports={overlay:"CustomizationsModal_overlay__ELhsr",modal:"CustomizationsModal_modal__ktEtG",header:"CustomizationsModal_header__espYQ",title:"CustomizationsModal_title__MipKd",scopeLabel:"CustomizationsModal_scopeLabel__7AvQB",body:"CustomizationsModal_body__NG5dL",nav:"CustomizationsModal_nav__rHr4i",navItem:"CustomizationsModal_navItem__4DLLD",navItemActive:"CustomizationsModal_navItemActive__dIXUs",content:"CustomizationsModal_content__jUIDb",overviewGrid:"CustomizationsModal_overviewGrid__NrfbE",card:"CustomizationsModal_card__pz3ic",cardIcon:"CustomizationsModal_cardIcon__byGJv",cardTitle:"CustomizationsModal_cardTitle__8vO2n",cardCount:"CustomizationsModal_cardCount__o5o0k",cardGlyphs:"CustomizationsModal_cardGlyphs___Yqnk",list:"CustomizationsModal_list__4jpK1",empty:"CustomizationsModal_empty__Kw28t",detail:"CustomizationsModal_detail__g2cIN",detailTitle:"CustomizationsModal_detailTitle__04qFY",detailPath:"CustomizationsModal_detailPath__EQ_2Y",badge:"CustomizationsModal_badge__KaUUG",markdown:"CustomizationsModal_markdown__Sonqt",pre:"CustomizationsModal_pre__ouuWy"}},6489:e=>{e.exports={shell:"page_shell__MDEjl",restartBanner:"page_restartBanner__e0ac9",app:"page_app__LKve1",railHandle:"page_railHandle__H1aMx",main:"page_main__ux7yf",pane:"page_pane__MGFOq",split:"page_split__nvcv3",splitSide:"page_splitSide__3p0NO",splitSideRight:"page_splitSideRight__gnXjJ",splitSolo:"page_splitSolo__9yc41",splitHandle:"page_splitHandle__YR9fj",paneEmpty:"page_paneEmpty__YzanT",mainPlaceholder:"page_mainPlaceholder__8ZWmR",setupWrap:"page_setupWrap__EK7gY",setupCard:"page_setupCard__Bce_a",setupBody:"page_setupBody__8YhPm",setupIntro:"page_setupIntro__OIpQs",installBlock:"page_installBlock__P_BH5",setupActions:"page_setupActions__Ox0FS"}},6544:e=>{e.exports={select:"Select_select__sGcXD"}},6879:e=>{e.exports={pane:"TerminalPane_pane__j9JHX",termWrap:"TerminalPane_termWrap__s3diR",loading:"TerminalPane_loading__VB_Qs",term:"TerminalPane_term__Ifd49",statusbar:"TerminalPane_statusbar__1hWDG",grid:"TerminalPane_grid__92LLf",divider:"TerminalPane_divider__A5ewc",ctxLabel:"TerminalPane_ctxLabel__293Jc",state:"TerminalPane_state__T4Bel",live:"TerminalPane_live__ZSnP7",done:"TerminalPane_done__YtlNu",tmux:"TerminalPane_tmux__pMX5Y",ctx:"TerminalPane_ctx__dJ80n",meterSlot:"TerminalPane_meterSlot__TZ8eh",bridge:"TerminalPane_bridge__C7VGa",bridgeBtn:"TerminalPane_bridgeBtn__RqASg",verb:"TerminalPane_verb___D6rf",tail:"TerminalPane_tail__NQRbf",workspaceTail:"TerminalPane_workspaceTail____zzR",finishBtn:"TerminalPane_finishBtn__2__8U"}},7020:e=>{e.exports={overlay:"NewSessionModal_overlay__zBAnL",modal:"NewSessionModal_modal__JG6Zs",title:"NewSessionModal_title__22tKR",path:"NewSessionModal_path__eUzs_",provSeg:"NewSessionModal_provSeg__lT__B",cancel:"NewSessionModal_cancel__Qh_g9"}},7121:(e,t,n)=>{Promise.resolve().then(n.bind(n,3727))},7346:e=>{e.exports={grid:"GridView_grid__7XzcY",tile:"GridView_tile__62PxD",selected:"GridView_selected__53b4u",bridged:"GridView_bridged__pfkhV",waiting:"GridView_waiting__9B4bS","tile-pulse":"GridView_tile-pulse__iqjCo",head:"GridView_head__mCeWL",repo:"GridView_repo__ORRG0",flag:"GridView_flag__XxUcB",from:"GridView_from__wJ3GG",ctx:"GridView_ctx__MBXxE",ctxText:"GridView_ctxText__xtp_i",meterSlot:"GridView_meterSlot__QedyC",pct:"GridView_pct__yLQEK",body:"GridView_body__z_yUM",empty:"GridView_empty__xGvHs",mark:"GridView_mark__klaI_"}},7537:e=>{e.exports={transcript:"Planoff_transcript__sB79a",inner:"Planoff_inner__qFwm_",header:"Planoff_header__KQEdB",title:"Planoff_title__yOVym",meta:"Planoff_meta__RWGpj",grid:"Planoff_grid__FcJc9",col:"Planoff_col__kHuaW",pick:"Planoff_pick__IGi32",colHead:"Planoff_colHead__E40zw",planMeta:"Planoff_planMeta__OYdsx",angle:"Planoff_angle__sxRCi",steps:"Planoff_steps__MmqKx",planLine:"Planoff_planLine__Lq6ly",taskForm:"Planoff_taskForm__G00cC",running:"Planoff_running__VDhDy",note:"Planoff_note____cLZ"}},7674:(e,t,n)=>{"use strict";n.r(t),n.d(t,{applyAccent:()=>l,applyTheme:()=>o,currentAccent:()=>r,currentTheme:()=>c,initTheme:()=>u,toggleTheme:()=>d});let s="seshmux-theme",a="seshmux-theme-locked",i="seshmux-accent";function l(e){document.documentElement.dataset.accent=e,localStorage.setItem(i,e)}function r(){return"teal"===localStorage.getItem(i)?"teal":"iris"}function o(e){document.documentElement.dataset.theme=e,localStorage.setItem(s,e)}function c(){let e=localStorage.getItem(s);return"dark"===e||"light"===e?e:matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function d(){localStorage.setItem(a,"1"),o("dark"===document.documentElement.dataset.theme?"light":"dark")}function u(){o(c());let e=matchMedia("(prefers-color-scheme: dark)"),t=e=>{localStorage.getItem(a)||o(e.matches?"dark":"light")};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}},7935:(e,t,n)=>{"use strict";function s(){var e;return null!=(e=window.__SESHMUX_TOKEN)?e:""}async function a(e,t){let n=await fetch(e,{...t,headers:{...(null==t?void 0:t.body)?{"content-type":"application/json"}:{},"x-seshmux-token":s(),...null==t?void 0:t.headers}});if(!n.ok){let t=await n.json().catch(()=>null);throw Error(t&&"string"==typeof t.error?t.error:"".concat(e," -> ").concat(n.status))}return n.json()}function i(){return a("/api/projects")}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3;return a("/api/term/".concat(encodeURIComponent(e),"/history?lines=").concat(t))}function r(e,t){let n=new URLSearchParams;(null==t?void 0:t.before)!=null&&n.set("before",String(t.before)),(null==t?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),(null==t?void 0:t.q)&&n.set("q",t.q);let s=n.toString()?"?".concat(n):"";return a("/api/projects/".concat(e,"/sessions").concat(s))}function o(e,t){return a("/api/transcript/".concat(e,"/").concat(t))}function c(e){return a("/api/search?q=".concat(encodeURIComponent(e)))}function d(){return a("/api/env")}function u(){return a("/api/env").then(e=>{var t;return null!=(t=e.commands)?t:{}})}function p(){return a("/api/env").then(e=>{var t;return null!=(t=e.teams)?t:{}})}function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:30;return a("/api/usage?days=".concat(e))}function h(){return a("/api/config")}function _(e){return a("/api/config",{method:"PUT",body:JSON.stringify(e)})}function g(e){return a("/api/sessions/start",{method:"POST",body:JSON.stringify(e)})}function v(){return a("/api/sessions/live")}function x(e,t){return a("/api/bridge/handoff",{method:"POST",body:JSON.stringify({projectId:e,sessionId:t})})}function f(e,t){return a("/api/bridge/review",{method:"POST",body:JSON.stringify({projectId:e,sessionId:t})})}function j(e,t){return a("/api/bridge/planoff",{method:"POST",body:JSON.stringify({projectId:e,task:t})})}function b(e,t,n,s){return a("/api/bridge/planoff/pick",{method:"POST",body:JSON.stringify({projectId:e,provider:t,task:n,planoff:s})})}function y(){return a("/api/bridge/register",{method:"POST"})}function w(){return a("/api/hooks/status")}function k(e){return a("/api/hooks/install",{method:"POST",body:JSON.stringify({provider:e})})}function N(e){return a("/api/hooks/uninstall",{method:"POST",body:JSON.stringify({provider:e})})}function S(e,t){return a("/api/bridge/approval/".concat(e),{method:"POST",body:JSON.stringify({approved:t})})}function C(e){return a("/api/scratchpad/".concat(e))}function T(e,t){return a("/api/scratchpad/".concat(e),{method:"PUT",body:JSON.stringify({content:t})})}function I(e,t){let n=new URLSearchParams({project:e,session:t});return a("/api/subagents?".concat(n))}function M(e,t,n){let s=new URLSearchParams({project:e,session:t,agent:n});return a("/api/subagents/detail?".concat(s))}function P(e,t){return a("/api/notify",{method:"POST",body:JSON.stringify({title:e,body:t})})}function E(){return a("/api/update/check")}function R(){return a("/api/update/apply",{method:"POST"})}function L(e,t,n){return a("/api/workspaces",{method:"POST",body:JSON.stringify({projectId:e,provider:t,mode:n})})}function A(e){return a("/api/workspaces?project=".concat(encodeURIComponent(e)))}function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return a("/api/workspaces",{method:"DELETE",body:JSON.stringify({dir:e,mode:t,force:n})})}function B(e,t){let n="project"===e?"?scope=project&project=".concat(encodeURIComponent(t)):"?scope=global";return a("/api/customizations".concat(n))}function D(){return a("/api/teams")}function H(e){return a("/api/teams/start",{method:"POST",body:JSON.stringify(e)})}function V(e){return a("/api/teams/members?leadSession=".concat(encodeURIComponent(e)))}n.r(t),n.d(t,{applyUpdate:()=>R,authToken:()=>s,bridgeHandoff:()=>x,bridgePlanoff:()=>j,bridgePlanoffPick:()=>b,bridgeReview:()=>f,checkUpdate:()=>E,createWorkspace:()=>L,finishWorkspace:()=>O,getConfig:()=>h,getCustomizations:()=>B,getEnv:()=>d,getEnvCommands:()=>u,getEnvTeams:()=>p,getHooksStatus:()=>w,getLive:()=>v,getProjects:()=>i,getScratchpad:()=>C,getSessions:()=>r,getSubagentDetail:()=>M,getSubagents:()=>I,getTeamMembers:()=>V,getTeamTemplates:()=>D,getTermHistory:()=>l,getTranscript:()=>o,getUsage:()=>m,installStatusHooks:()=>k,listWorkspaces:()=>A,notify:()=>P,putConfig:()=>_,putScratchpad:()=>T,registerBridge:()=>y,resolveApproval:()=>S,search:()=>c,startSession:()=>g,startTeam:()=>H,uninstallStatusHooks:()=>N})},8226:e=>{e.exports={card:"Card_card__AIl_O",title:"Card_title__7oFuH",note:"Card_note__NKw2m"}},8448:e=>{e.exports={btn:"Button_btn__1b8YZ",default:"Button_default__yAA8J",primary:"Button_primary__LZ1Qi",ghost:"Button_ghost__VBqAv",chip:"Button_chip__jcnSD"}},8982:e=>{e.exports={settings:"Settings_settings__1Taa6",inner:"Settings_inner__Eyvtp",backRow:"Settings_backRow__imUdH",h1:"Settings_h1__sFtoI",sectionHead:"Settings_sectionHead__nwoHw",sectionNote:"Settings_sectionNote__93_16",row:"Settings_row__JgARB",label:"Settings_label__PdsN2",name:"Settings_name__k1El6",sub:"Settings_sub__UAizD",subPlain:"Settings_subPlain___HfYU",mono:"Settings_mono__1uwL5",actions:"Settings_actions__8lwYD",status:"Settings_status__OX8cZ",ok:"Settings_ok__AB7_F",bad:"Settings_bad__bX_ne",neutral:"Settings_neutral__Dm0Xd",pending:"Settings_pending__ybDC3",usageCard:"Settings_usageCard__Vr9ZO",usageHead:"Settings_usageHead__53xFQ",usageHeadTitle:"Settings_usageHeadTitle__8qZf5",usageHeadNote:"Settings_usageHeadNote__1aCZn",stats:"Settings_stats__aihcZ",stat:"Settings_stat__pv0m5",statN:"Settings_statN__csPVq",statL:"Settings_statL___zdSE",barRow:"Settings_barRow__9Vrl8",barName:"Settings_barName__ixg_M",barTrack:"Settings_barTrack__SJfJo",barPct:"Settings_barPct__gVVkf",barPctProviders:"Settings_barPctProviders__ZKnYn",providerPct:"Settings_providerPct__HcSa1",footer:"Settings_footer__IkXFA"}},9265:e=>{e.exports={overlay:"Modal_overlay__5gqOK",modal:"Modal_modal__gZp8c",header:"Modal_header__L8MQi",title:"Modal_title__Kaju9",body:"Modal_body__YOC_f"}},9557:e=>{e.exports={dot:"StatusDot_dot__XiIhO",live:"StatusDot_live__TYX9T",pulsing:"StatusDot_pulsing__GFFeD","af-pulse":"StatusDot_af-pulse__czvgD",waiting:"StatusDot_waiting__1Z1xA",pulse:"StatusDot_pulse__j8ydk",done:"StatusDot_done___qzg3",unviewed:"StatusDot_unviewed__7QX5u",neutral:"StatusDot_neutral__mP9o_"}},9560:e=>{e.exports={toast:"Toast_toast__ZJS2B",show:"Toast_show__tZi6s",text:"Toast_text__kfG1o",repo:"Toast_repo__g5Kxc",jump:"Toast_jump__X_WPF"}},9750:e=>{e.exports={badge:"ProviderBadge_badge__DWV81",claude:"ProviderBadge_claude__n_ZLp",codex:"ProviderBadge_codex__z38c_"}}},e=>{e.O(0,[938,622,441,255,358],()=>e(e.s=7121)),_N_E=e.O()}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seshmux",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Local-first mission control for AI coding agents (Claude Code + Codex)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"seshmux": "bin/seshmux.js"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"predev": "node -e \"require('./daemon/ensure').ensureDaemon()\"",
|
|
13
|
-
"dev": "tsx server/index.ts",
|
|
13
|
+
"dev": "PORT=${PORT:-4800} tsx server/index.ts",
|
|
14
14
|
"build": "bash scripts/build-standalone.sh",
|
|
15
15
|
"start": "node bin/seshmux.js",
|
|
16
16
|
"lint:styles": "bash scripts/lint-styles.sh",
|