@lovelybunch/api 1.0.76-alpha.8 → 1.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/lib/git.d.ts +3 -0
  2. package/dist/lib/git.js +35 -0
  3. package/dist/routes/api/v1/ai/route.js +214 -152
  4. package/dist/routes/api/v1/config/route.js +13 -9
  5. package/dist/routes/api/v1/context/agents/route.js +159 -0
  6. package/dist/routes/api/v1/context/index.js +6 -4
  7. package/dist/routes/api/v1/context/memory/route.js +163 -0
  8. package/dist/routes/api/v1/context/team/route.js +159 -0
  9. package/dist/routes/api/v1/git/index.js +27 -1
  10. package/dist/routes/api/v1/jobs/[id]/route.d.ts +26 -32
  11. package/dist/routes/api/v1/jobs/[id]/route.js +3 -3
  12. package/dist/routes/api/v1/jobs/route.d.ts +33 -33
  13. package/dist/routes/api/v1/jobs/route.js +17 -2
  14. package/dist/routes/api/v1/mcp/index.js +194 -21
  15. package/dist/routes/api/v1/resources/generate/route.js +10 -3
  16. package/package.json +4 -4
  17. package/static/assets/ActivityPage-sJEQn6DK.js +1 -0
  18. package/static/assets/AgentsContextEditPage-DU3qIXk9.js +9 -0
  19. package/static/assets/AgentsContextPage-tJ-LhFYb.js +1 -0
  20. package/static/assets/{ApiKeysSettingsPage-BhaH6ZYP.js → ApiKeysSettingsPage-Bg84BQHV.js} +2 -2
  21. package/static/assets/{AuthSettingsPage-D0MQlHyh.js → AuthSettingsPage-Bwr7uP3z.js} +1 -1
  22. package/static/assets/{CallbackPage-Bz4m3_W8.js → CallbackPage-BFn0Np2S.js} +1 -1
  23. package/static/assets/CodePage-kp4s3wCJ.js +2 -0
  24. package/static/assets/{CollapsibleSection-CxX11hr-.js → CollapsibleSection-CNs1mvsZ.js} +1 -1
  25. package/static/assets/{DashboardPage-B3HR1UM7.js → DashboardPage-DMJSzzgD.js} +9 -19
  26. package/static/assets/{GitPage-Dm36PRw_.js → GitPage-uqene8zj.js} +3 -3
  27. package/static/assets/{GitSettingsPage-CRWcjgVI.js → GitSettingsPage-CLswbZsT.js} +2 -2
  28. package/static/assets/{IdentityPage-YCkmdyzR.js → IdentityPage-BDTPXEo7.js} +2 -2
  29. package/static/assets/{ImplementationStepsEditor-u3dPxmKW.js → ImplementationStepsEditor-D4cvhPhz.js} +2 -2
  30. package/static/assets/IntegrationsSettingsPage-o7NXZGt9.js +1 -0
  31. package/static/assets/JobDetailPage-DuEiPz6X.js +1 -0
  32. package/static/assets/KnowledgeDetailPage-DFVud_VC.js +1 -0
  33. package/static/assets/{KnowledgeEditPage-DhrF6UPg.js → KnowledgeEditPage-XG6HKK7E.js} +1 -1
  34. package/static/assets/{KnowledgePage-_gZhpTe3.js → KnowledgePage-B2zI3xwW.js} +2 -2
  35. package/static/assets/{LoginPage-Cc1Ac2j4.js → LoginPage-CUJRxwXy.js} +1 -1
  36. package/static/assets/MailInboxPage-BlCG-tba.js +1 -0
  37. package/static/assets/MailProcessingModal-BJIdHOqK.js +1 -0
  38. package/static/assets/MailReadPage-MoNo_gmW.js +1 -0
  39. package/static/assets/{MailSentPage-Dj63oQ5D.js → MailSentPage-QzpuIJmT.js} +1 -1
  40. package/static/assets/{McpSettingsPage-DYZ0QNbp.js → McpSettingsPage-BZcCGkGM.js} +1 -1
  41. package/static/assets/MemoryEditPage-DXSQoCT4.js +13 -0
  42. package/static/assets/MemoryPage-oBnyuvSf.js +1 -0
  43. package/static/assets/NewKnowledgePage-deMsezK8.js +1 -0
  44. package/static/assets/{NewSkillPage-BEn18f2A.js → NewSkillPage-DRYWdrlV.js} +1 -1
  45. package/static/assets/{NewTaskPage-CSlncpI5.js → NewTaskPage-B6xdic5_.js} +2 -2
  46. package/static/assets/{NotFoundPage-C4x0lGai.js → NotFoundPage-Bxu9uKFO.js} +1 -1
  47. package/static/assets/{NotificationsSettingsPage-C9YnfRlj.js → NotificationsSettingsPage-CLgtsCVM.js} +1 -1
  48. package/static/assets/{PromptsSettingsPage-Chc4da1S.js → PromptsSettingsPage-BWaELCjG.js} +1 -1
  49. package/static/assets/{ResourceDetailPage-DDYKQxpM.js → ResourceDetailPage-CMPDRdVM.js} +1 -1
  50. package/static/assets/ResourcesPage-DspYILfG.js +41 -0
  51. package/static/assets/{RoleEditPage-Ccfu1tn1.js → RoleEditPage-DXtzicVZ.js} +1 -1
  52. package/static/assets/{RolePage-CcdEUjSm.js → RolePage-DafGURGp.js} +1 -1
  53. package/static/assets/{RulesSettingsPage-Cz1g_eAj.js → RulesSettingsPage-E8V9cexV.js} +1 -1
  54. package/static/assets/RunDetailPage-DsxkqFst.js +1 -0
  55. package/static/assets/SchedulePage-B2YvNDHr.js +4 -0
  56. package/static/assets/{SkillDetailPage-sJg-L8A8.js → SkillDetailPage-CWkqSfuT.js} +1 -1
  57. package/static/assets/{SkillEditPage-BksV7GmD.js → SkillEditPage-DwyebzFV.js} +1 -1
  58. package/static/assets/{SkillsPage-CwarkJmZ.js → SkillsPage-CauK65X_.js} +2 -2
  59. package/static/assets/{SkillsSettingsPage-DTnBlBdE.js → SkillsSettingsPage-DXMRv3jR.js} +1 -1
  60. package/static/assets/{SourceInput-CWazIr6v.js → SourceInput-C0iKqbQ1.js} +1 -1
  61. package/static/assets/{TagInput-Bgyxb_JU.js → TagInput-Ct-WRvTs.js} +1 -1
  62. package/static/assets/{TaskDetailPage-DlmG1kZR.js → TaskDetailPage-CApk2iBh.js} +1 -1
  63. package/static/assets/{TaskEditPage-BnpNeed_.js → TaskEditPage-NgOVShfK.js} +1 -1
  64. package/static/assets/{TasksPage-CXeTMpgy.js → TasksPage-BoPrP_Rl.js} +3 -3
  65. package/static/assets/TeamEditPage-ChY6mYm8.js +9 -0
  66. package/static/assets/TeamPage-DH-dJhFG.js +1 -0
  67. package/static/assets/{TerminalPage-BLcPt381.js → TerminalPage-CRhcscF2.js} +1 -1
  68. package/static/assets/TerminalSessionPage-CSCQg2sn.js +3 -0
  69. package/static/assets/{UserPreferencesPage-BNwEqlRW.js → UserPreferencesPage-DxCSWJnS.js} +1 -1
  70. package/static/assets/{UserSettingsPage-BRafqkiD.js → UserSettingsPage-DKkOLNPV.js} +1 -1
  71. package/static/assets/UtilitiesPage-CBNSvixW.js +1 -0
  72. package/static/assets/{alert-Ci2-OWZ_.js → alert-Dw_RSroN.js} +1 -1
  73. package/static/assets/{arrow-down-C6Flf0DF.js → arrow-down-UClxXzT-.js} +1 -1
  74. package/static/assets/{arrow-left-7TCkaJlN.js → arrow-left-DWmf9YJp.js} +1 -1
  75. package/static/assets/{arrow-up-down-tqbfiBy6.js → arrow-up-down-Btc3okb3.js} +1 -1
  76. package/static/assets/{arrow-up-DeQAxOPq.js → arrow-up-fLCh7Hvh.js} +1 -1
  77. package/static/assets/{badge-D4vHU_w_.js → badge-vIqE5SOP.js} +1 -1
  78. package/static/assets/{browser-modal-BiaqhKHm.js → browser-modal-DgMJTsMd.js} +2 -2
  79. package/static/assets/{card-xkODbJy-.js → card-DPLdBoa5.js} +1 -1
  80. package/static/assets/{chevron-left-CvpfJBPQ.js → chevron-left-CiNaLX-v.js} +1 -1
  81. package/static/assets/{chevron-up-BB-6OS4z.js → chevron-up-DFd-7wxW.js} +1 -1
  82. package/static/assets/{chevrons-up-CLKrQHMU.js → chevrons-up-BfU70OcQ.js} +1 -1
  83. package/static/assets/{circle-alert-lnP0-w3N.js → circle-alert-Mv00T-P2.js} +1 -1
  84. package/static/assets/{circle-check-big-Dbo-OmWQ.js → circle-check-big-BEY1IoIP.js} +1 -1
  85. package/static/assets/{circle-check-BPkEav83.js → circle-check-xMiP6SLO.js} +1 -1
  86. package/static/assets/{circle-play-BbtBIeo3.js → circle-play-iZZwaGbV.js} +1 -1
  87. package/static/assets/{circle-x-BBwi8e5G.js → circle-x-z3iynaE7.js} +1 -1
  88. package/static/assets/{clipboard-Ce816tAO.js → clipboard-C8wZRPDH.js} +1 -1
  89. package/static/assets/{clock-BIeoO5Mt.js → clock-C_9shc08.js} +1 -1
  90. package/static/assets/{code-DTW3giBe.js → code-DH-sRhus.js} +1 -1
  91. package/static/assets/{download-BgKxfry9.js → download-CE8b59ER.js} +1 -1
  92. package/static/assets/{external-link--RjKXREe.js → external-link-DPyKt8NE.js} +1 -1
  93. package/static/assets/{eye--K-OgK7L.js → eye-BpGD-yoS.js} +1 -1
  94. package/static/assets/{folder-git-2-Bgv7r0zC.js → folder-git-2-BIw4zbmy.js} +1 -1
  95. package/static/assets/globe-CUo7eHKN.js +6 -0
  96. package/static/assets/{index-Di7xMYoG.js → index-B07hel4U.js} +1 -1
  97. package/static/assets/{index-DF_KNbKf.js → index-BCwmQxLC.js} +1 -1
  98. package/static/assets/{index-D9xZafJb.js → index-BOKaM9K-.js} +1 -1
  99. package/static/assets/{index-Cd5hBt4x.js → index-BaR4iUzg.js} +1 -1
  100. package/static/assets/index-BcCuKdbf.css +1 -0
  101. package/static/assets/{index-Db5-BoCU.js → index-Bfb3OTwj.js} +1 -1
  102. package/static/assets/{index-Do92mBFr.js → index-Bkt1rQVV.js} +1 -1
  103. package/static/assets/{index-BD9UBXsr.js → index-C65b3D5_.js} +1 -1
  104. package/static/assets/{index-BbrX1XcC.js → index-CGbmjmEy.js} +1 -1
  105. package/static/assets/{index-4RuWYO4M.js → index-CTouvf2d.js} +1 -1
  106. package/static/assets/{index-Dt_WtbUU.js → index-Cdwx6Zps.js} +1 -1
  107. package/static/assets/{index-iIFwHD3L.js → index-ClO9-JVh.js} +1 -1
  108. package/static/assets/{index-BteQHbZ1.js → index-CpJ0uBf3.js} +1 -1
  109. package/static/assets/{index-LMsLdXw_.js → index-CsBxEWw5.js} +1 -1
  110. package/static/assets/{index-CW9pK_cZ.js → index-DZAYfTI2.js} +1 -1
  111. package/static/assets/{index-BkEdELOI.js → index-Dkr9CBL7.js} +1 -1
  112. package/static/assets/{index-BQYB8kWb.js → index-DnZKG-_7.js} +1 -1
  113. package/static/assets/index-UXL5-kaP.js +497 -0
  114. package/static/assets/{index-Ch4GVR8L.js → index-iB8oed57.js} +1 -1
  115. package/static/assets/{index-R44k73Ca.js → index-jaRIZ6SY.js} +1 -1
  116. package/static/assets/{info-DgZN3xWF.js → info-D-UNBNx2.js} +1 -1
  117. package/static/assets/{label-DvPENm3h.js → label-8VKluf9w.js} +1 -1
  118. package/static/assets/{markdown-editor-DpZxV-fa.js → markdown-editor-DBdRsbP2.js} +3 -3
  119. package/static/assets/{message-square-CoaQYehb.js → message-square-CO8kDUed.js} +1 -1
  120. package/static/assets/{paperclip-ChugoOAp.js → paperclip-DlLXZbru.js} +1 -1
  121. package/static/assets/{pause-m9YcgxdE.js → pause-zSiaxJBu.js} +1 -1
  122. package/static/assets/{play-DtFz_MLh.js → play-DVBhRokt.js} +1 -1
  123. package/static/assets/{radio-group-C5Te9bVb.js → radio-group-CThYUcA4.js} +1 -1
  124. package/static/assets/{refresh-cw-B1bWW9Rg.js → refresh-cw-tXYl1ePu.js} +1 -1
  125. package/static/assets/{search-CPOHeeUa.js → search-BxF7Wwex.js} +1 -1
  126. package/static/assets/{select-B1v2u6hQ.js → select-CyHFRA1Y.js} +1 -1
  127. package/static/assets/server-lRxThHjr.js +6 -0
  128. package/static/assets/{switch-Bf1Cq3P6.js → switch-BUpDbrux.js} +1 -1
  129. package/static/assets/tabs-DkvCmQEX.js +1 -0
  130. package/static/assets/{tag-Cz4z82t0.js → tag-CkcZNLnh.js} +1 -1
  131. package/static/assets/{terminal-preview-DTUohQ5b.js → terminal-preview-CLWDhoOZ.js} +1 -1
  132. package/static/assets/triangle-alert-CmjG_mbF.js +6 -0
  133. package/static/assets/{use-terminal-CFbQv1ie.js → use-terminal-D3iV7-iC.js} +1 -1
  134. package/static/assets/{video-B6ZJ-Epb.js → video-CY_dOujm.js} +1 -1
  135. package/static/index.html +2 -2
  136. package/dist/lib/mcp-client.d.ts +0 -39
  137. package/dist/lib/mcp-client.js +0 -131
  138. package/dist/routes/api/v1/ai/tools.d.ts +0 -17
  139. package/dist/routes/api/v1/ai/tools.js +0 -931
  140. package/dist/routes/api/v1/context/knowledge/[filename]/index.d.ts +0 -1
  141. package/dist/routes/api/v1/context/knowledge/[filename]/index.js +0 -1
  142. package/dist/routes/api/v1/context/knowledge/[filename]/route.js +0 -254
  143. package/dist/routes/api/v1/context/knowledge/index.d.ts +0 -1
  144. package/dist/routes/api/v1/context/knowledge/index.js +0 -1
  145. package/dist/routes/api/v1/context/knowledge/route.js +0 -176
  146. package/dist/routes/api/v1/proposals/[id]/route.d.ts +0 -337
  147. package/dist/routes/api/v1/proposals/[id]/route.js +0 -165
  148. package/dist/routes/api/v1/proposals/index.d.ts +0 -3
  149. package/dist/routes/api/v1/proposals/index.js +0 -10
  150. package/dist/routes/api/v1/proposals/route.d.ts +0 -315
  151. package/dist/routes/api/v1/proposals/route.js +0 -129
  152. package/dist/routes/api/v1/terminal/[proposalId]/create/index.d.ts +0 -3
  153. package/dist/routes/api/v1/terminal/[proposalId]/create/index.js +0 -5
  154. package/dist/routes/api/v1/terminal/[proposalId]/create/route.d.ts +0 -10
  155. package/dist/routes/api/v1/terminal/[proposalId]/create/route.js +0 -27
  156. package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.js +0 -5
  157. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.d.ts +0 -10
  158. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.js +0 -21
  159. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.d.ts +0 -3
  160. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.js +0 -5
  161. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.d.ts +0 -10
  162. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.js +0 -21
  163. package/static/assets/ActivityPage-uL-Qknui.js +0 -1
  164. package/static/assets/ArchitectureEditPage-BWKyKi3T.js +0 -21
  165. package/static/assets/ArchitecturePage-Dtm0OAac.js +0 -1
  166. package/static/assets/CodePage-BuO2K_xx.js +0 -2
  167. package/static/assets/IntegrationsSettingsPage-Z8xCUmX9.js +0 -1
  168. package/static/assets/JobDetailPage-B8Za82RA.js +0 -1
  169. package/static/assets/KnowledgeDetailPage-CR9c4_WD.js +0 -1
  170. package/static/assets/MailInboxPage-B_h1Kz4D.js +0 -1
  171. package/static/assets/MailProcessingModal-D_qEwqmL.js +0 -6
  172. package/static/assets/MailReadPage-_q-xk_cX.js +0 -1
  173. package/static/assets/NewKnowledgePage-BEVMYnKG.js +0 -9
  174. package/static/assets/ProjectEditPage-X0-4mEAS.js +0 -11
  175. package/static/assets/ProjectPage-D8OX1GKt.js +0 -1
  176. package/static/assets/ResourcesPage-BmOpgt3L.js +0 -41
  177. package/static/assets/SchedulePage-CGxZHEL-.js +0 -4
  178. package/static/assets/TerminalSessionPage-CeAd8IAy.js +0 -8
  179. package/static/assets/UtilitiesPage-BPX_Unxu.js +0 -1
  180. package/static/assets/index-DH_vXhd4.css +0 -1
  181. package/static/assets/index-PyVlsLW8.js +0 -487
  182. package/static/assets/tabs-DAbCZiFC.js +0 -1
  183. /package/dist/routes/api/v1/context/{knowledge/[filename] → agents}/route.d.ts +0 -0
  184. /package/dist/routes/api/v1/context/{knowledge → memory}/route.d.ts +0 -0
  185. /package/dist/routes/api/v1/{terminal/[proposalId]/destroy/index.d.ts → context/team/route.d.ts} +0 -0
@@ -1 +1 @@
1
- import{r as n,bc as E,am as K,ag as T,j as a,ah as N,be as U,ak as h,al as C,bd as V,aj as g,b2 as z,ap as H,ao as $,e as I,bC as W}from"./index-PyVlsLW8.js";var w="Radio",[X,j]=N(w),[Y,J]=X(w),k=n.forwardRef((r,t)=>{const{__scopeRadio:e,name:d,checked:o=!1,required:s,disabled:i,value:p="on",onCheck:f,form:R,...v}=r,[l,m]=n.useState(null),c=C(t,y=>m(y)),u=n.useRef(!1),b=l?R||!!l.closest("form"):!0;return a.jsxs(Y,{scope:e,checked:o,disabled:i,children:[a.jsx(h.button,{type:"button",role:"radio","aria-checked":o,"data-state":S(o),"data-disabled":i?"":void 0,disabled:i,value:p,...v,ref:c,onClick:g(r.onClick,y=>{o||f?.(),b&&(u.current=y.isPropagationStopped(),u.current||y.stopPropagation())})}),b&&a.jsx(P,{control:l,bubbles:!u.current,name:d,value:p,checked:o,required:s,disabled:i,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=w;var _="RadioIndicator",G=n.forwardRef((r,t)=>{const{__scopeRadio:e,forceMount:d,...o}=r,s=J(_,e);return a.jsx(z,{present:d||s.checked,children:a.jsx(h.span,{"data-state":S(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});G.displayName=_;var Q="RadioBubbleInput",P=n.forwardRef(({__scopeRadio:r,control:t,checked:e,bubbles:d=!0,...o},s)=>{const i=n.useRef(null),p=C(i,s),f=H(e),R=$(t);return n.useEffect(()=>{const v=i.current;if(!v)return;const l=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(l,"checked").set;if(f!==e&&c){const u=new Event("click",{bubbles:d});c.call(v,e),v.dispatchEvent(u)}},[f,e,d]),a.jsx(h.input,{type:"radio","aria-hidden":!0,defaultChecked:e,...o,tabIndex:-1,ref:p,style:{...o.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});P.displayName=Q;function S(r){return r?"checked":"unchecked"}var Z=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],x="RadioGroup",[ee,de]=N(x,[E,j]),A=E(),D=j(),[oe,re]=ee(x),M=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,name:d,defaultValue:o,value:s,required:i=!1,disabled:p=!1,orientation:f,dir:R,loop:v=!0,onValueChange:l,...m}=r,c=A(e),u=K(R),[b,y]=T({prop:s,defaultProp:o??null,onChange:l,caller:x});return a.jsx(oe,{scope:e,name:d,required:i,disabled:p,value:b,onValueChange:y,children:a.jsx(U,{asChild:!0,...c,orientation:f,dir:u,loop:v,children:a.jsx(h.div,{role:"radiogroup","aria-required":i,"aria-orientation":f,"data-disabled":p?"":void 0,dir:u,...m,ref:t})})})});M.displayName=x;var O="RadioGroupItem",F=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,disabled:d,...o}=r,s=re(O,e),i=s.disabled||d,p=A(e),f=D(e),R=n.useRef(null),v=C(t,R),l=s.value===o.value,m=n.useRef(!1);return n.useEffect(()=>{const c=b=>{Z.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",u)}},[]),a.jsx(V,{asChild:!0,...p,focusable:!i,active:l,children:a.jsx(k,{disabled:i,required:s.required,checked:l,...f,...o,name:s.name,ref:v,onCheck:()=>s.onValueChange(o.value),onKeyDown:g(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:g(o.onFocus,()=>{m.current&&R.current?.click()})})})});F.displayName=O;var ae="RadioGroupIndicator",L=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,...d}=r,o=D(e);return a.jsx(G,{...o,...d,ref:t})});L.displayName=ae;var q=M,B=F,te=L;const se=n.forwardRef(({className:r,...t},e)=>a.jsx(q,{className:I("grid gap-2",r),...t,ref:e}));se.displayName=q.displayName;const ne=n.forwardRef(({className:r,...t},e)=>a.jsx(B,{ref:e,className:I("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),...t,children:a.jsx(te,{className:"flex items-center justify-center",children:a.jsx(W,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ne.displayName=B.displayName;export{se as R,ne as a};
1
+ import{r as n,be as E,al as K,af as T,j as a,ag as N,bg as U,aj as x,ak as C,bf as V,ai as g,b4 as z,ao as H,an as $,e as I,bC as W}from"./index-UXL5-kaP.js";var w="Radio",[X,j]=N(w),[Y,J]=X(w),k=n.forwardRef((r,t)=>{const{__scopeRadio:e,name:d,checked:o=!1,required:s,disabled:i,value:p="on",onCheck:f,form:R,...v}=r,[l,m]=n.useState(null),c=C(t,y=>m(y)),u=n.useRef(!1),b=l?R||!!l.closest("form"):!0;return a.jsxs(Y,{scope:e,checked:o,disabled:i,children:[a.jsx(x.button,{type:"button",role:"radio","aria-checked":o,"data-state":S(o),"data-disabled":i?"":void 0,disabled:i,value:p,...v,ref:c,onClick:g(r.onClick,y=>{o||f?.(),b&&(u.current=y.isPropagationStopped(),u.current||y.stopPropagation())})}),b&&a.jsx(P,{control:l,bubbles:!u.current,name:d,value:p,checked:o,required:s,disabled:i,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=w;var _="RadioIndicator",G=n.forwardRef((r,t)=>{const{__scopeRadio:e,forceMount:d,...o}=r,s=J(_,e);return a.jsx(z,{present:d||s.checked,children:a.jsx(x.span,{"data-state":S(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});G.displayName=_;var Q="RadioBubbleInput",P=n.forwardRef(({__scopeRadio:r,control:t,checked:e,bubbles:d=!0,...o},s)=>{const i=n.useRef(null),p=C(i,s),f=H(e),R=$(t);return n.useEffect(()=>{const v=i.current;if(!v)return;const l=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(l,"checked").set;if(f!==e&&c){const u=new Event("click",{bubbles:d});c.call(v,e),v.dispatchEvent(u)}},[f,e,d]),a.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:e,...o,tabIndex:-1,ref:p,style:{...o.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});P.displayName=Q;function S(r){return r?"checked":"unchecked"}var Z=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],h="RadioGroup",[ee,de]=N(h,[E,j]),A=E(),D=j(),[oe,re]=ee(h),M=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,name:d,defaultValue:o,value:s,required:i=!1,disabled:p=!1,orientation:f,dir:R,loop:v=!0,onValueChange:l,...m}=r,c=A(e),u=K(R),[b,y]=T({prop:s,defaultProp:o??null,onChange:l,caller:h});return a.jsx(oe,{scope:e,name:d,required:i,disabled:p,value:b,onValueChange:y,children:a.jsx(U,{asChild:!0,...c,orientation:f,dir:u,loop:v,children:a.jsx(x.div,{role:"radiogroup","aria-required":i,"aria-orientation":f,"data-disabled":p?"":void 0,dir:u,...m,ref:t})})})});M.displayName=h;var O="RadioGroupItem",F=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,disabled:d,...o}=r,s=re(O,e),i=s.disabled||d,p=A(e),f=D(e),R=n.useRef(null),v=C(t,R),l=s.value===o.value,m=n.useRef(!1);return n.useEffect(()=>{const c=b=>{Z.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",u)}},[]),a.jsx(V,{asChild:!0,...p,focusable:!i,active:l,children:a.jsx(k,{disabled:i,required:s.required,checked:l,...f,...o,name:s.name,ref:v,onCheck:()=>s.onValueChange(o.value),onKeyDown:g(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:g(o.onFocus,()=>{m.current&&R.current?.click()})})})});F.displayName=O;var ae="RadioGroupIndicator",L=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,...d}=r,o=D(e);return a.jsx(G,{...o,...d,ref:t})});L.displayName=ae;var q=M,B=F,te=L;const se=n.forwardRef(({className:r,...t},e)=>a.jsx(q,{className:I("grid gap-2",r),...t,ref:e}));se.displayName=q.displayName;const ne=n.forwardRef(({className:r,...t},e)=>a.jsx(B,{ref:e,className:I("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),...t,children:a.jsx(te,{className:"flex items-center justify-center",children:a.jsx(W,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ne.displayName=B.displayName;export{se as R,ne as a};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-PyVlsLW8.js";/**
1
+ import{c as e}from"./index-UXL5-kaP.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-PyVlsLW8.js";/**
1
+ import{c}from"./index-UXL5-kaP.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as o,j as e,e as r,n as d,ae as y}from"./index-PyVlsLW8.js";import{R as N,V as g,T as n,I as j,P as b,C as i,a as S,b as c,d as v,c as R,e as m,f as p,L as f,S as x}from"./index-BQYB8kWb.js";import{C}from"./chevron-up-BB-6OS4z.js";const k=N,E=g,I=o.forwardRef(({className:t,children:s,...a},l)=>e.jsxs(n,{ref:l,className:r("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[s,e.jsx(j,{asChild:!0,children:e.jsx(d,{className:"h-4 w-4 opacity-50"})})]}));I.displayName=n.displayName;const u=o.forwardRef(({className:t,...s},a)=>e.jsx(m,{ref:a,className:r("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(C,{className:"h-4 w-4"})}));u.displayName=m.displayName;const h=o.forwardRef(({className:t,...s},a)=>e.jsx(p,{ref:a,className:r("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(d,{className:"h-4 w-4"})}));h.displayName=p.displayName;const B=o.forwardRef(({className:t,children:s,position:a="popper",...l},w)=>e.jsx(b,{children:e.jsxs(i,{ref:w,className:r("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...l,children:[e.jsx(u,{}),e.jsx(S,{className:r("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),e.jsx(h,{})]})}));B.displayName=i.displayName;const T=o.forwardRef(({className:t,...s},a)=>e.jsx(f,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",t),...s}));T.displayName=f.displayName;const V=o.forwardRef(({className:t,children:s,...a},l)=>e.jsxs(c,{ref:l,className:r("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(v,{children:e.jsx(y,{className:"h-4 w-4"})})}),e.jsx(R,{children:s})]}));V.displayName=c.displayName;const z=o.forwardRef(({className:t,...s},a)=>e.jsx(x,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",t),...s}));z.displayName=x.displayName;export{k as S,I as a,E as b,B as c,V as d};
1
+ import{r as o,j as e,e as r,n as d,ad as y}from"./index-UXL5-kaP.js";import{R as N,V as g,T as n,I as j,P as b,C as i,a as S,b as c,d as v,c as R,e as m,f as p,L as f,S as x}from"./index-DnZKG-_7.js";import{C}from"./chevron-up-DFd-7wxW.js";const k=N,E=g,I=o.forwardRef(({className:t,children:s,...a},l)=>e.jsxs(n,{ref:l,className:r("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[s,e.jsx(j,{asChild:!0,children:e.jsx(d,{className:"h-4 w-4 opacity-50"})})]}));I.displayName=n.displayName;const u=o.forwardRef(({className:t,...s},a)=>e.jsx(m,{ref:a,className:r("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(C,{className:"h-4 w-4"})}));u.displayName=m.displayName;const h=o.forwardRef(({className:t,...s},a)=>e.jsx(p,{ref:a,className:r("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(d,{className:"h-4 w-4"})}));h.displayName=p.displayName;const B=o.forwardRef(({className:t,children:s,position:a="popper",...l},w)=>e.jsx(b,{children:e.jsxs(i,{ref:w,className:r("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...l,children:[e.jsx(u,{}),e.jsx(S,{className:r("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),e.jsx(h,{})]})}));B.displayName=i.displayName;const T=o.forwardRef(({className:t,...s},a)=>e.jsx(f,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",t),...s}));T.displayName=f.displayName;const V=o.forwardRef(({className:t,children:s,...a},l)=>e.jsxs(c,{ref:l,className:r("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(v,{children:e.jsx(y,{className:"h-4 w-4"})})}),e.jsx(R,{children:s})]}));V.displayName=c.displayName;const z=o.forwardRef(({className:t,...s},a)=>e.jsx(x,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",t),...s}));z.displayName=x.displayName;export{k as S,I as a,E as b,B as c,V as d};
@@ -0,0 +1,6 @@
1
+ import{c as e}from"./index-UXL5-kaP.js";/**
2
+ * @license lucide-react v0.542.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const r=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],i=e("server",r);export{i as S};
@@ -1 +1 @@
1
- import{r as c,j as e,e as i}from"./index-PyVlsLW8.js";const d=c.forwardRef(({className:s,onCheckedChange:r,onChange:t,...o},n)=>{const l=a=>{t?.(a),r?.(a.target.checked)};return e.jsxs("label",{className:i("relative inline-flex cursor-pointer",s),children:[e.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:l,ref:n,...o}),e.jsx("div",{className:"block bg-gray-300 w-9 h-5 rounded-full transition-colors duration-200 ease-in-out peer-checked:bg-blue-600"}),e.jsx("div",{className:"absolute left-0 top-0 bg-white w-4 h-4 rounded-full mt-0.5 ml-0.5 transition-transform duration-200 ease-in-out transform peer-checked:translate-x-4 shadow"})]})});d.displayName="Switch";export{d as S};
1
+ import{r as c,j as e,e as i}from"./index-UXL5-kaP.js";const d=c.forwardRef(({className:s,onCheckedChange:r,onChange:t,...o},n)=>{const l=a=>{t?.(a),r?.(a.target.checked)};return e.jsxs("label",{className:i("relative inline-flex cursor-pointer",s),children:[e.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:l,ref:n,...o}),e.jsx("div",{className:"block bg-gray-300 w-9 h-5 rounded-full transition-colors duration-200 ease-in-out peer-checked:bg-blue-600"}),e.jsx("div",{className:"absolute left-0 top-0 bg-white w-4 h-4 rounded-full mt-0.5 ml-0.5 transition-transform duration-200 ease-in-out transform peer-checked:translate-x-4 shadow"})]})});d.displayName="Switch";export{d as S};
@@ -0,0 +1 @@
1
+ import{r as l,al as F,af as $,j as c,ag as D,b2 as V,aj as g,be as y,bg as k,bf as G,ai as m,b4 as L,e as T}from"./index-UXL5-kaP.js";var p="Tabs",[K,Q]=D(p,[y]),h=y(),[B,x]=K(p),N=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,onValueChange:i,defaultValue:d,orientation:n="horizontal",dir:u,activationMode:b="automatic",...v}=e,r=F(u),[s,f]=$({prop:o,onChange:i,defaultProp:d??"",caller:p});return c.jsx(B,{scope:t,baseId:V(),value:s,onValueChange:f,orientation:n,dir:r,activationMode:b,children:c.jsx(g.div,{dir:r,"data-orientation":n,...v,ref:a})})});N.displayName=p;var C="TabsList",j=l.forwardRef((e,a)=>{const{__scopeTabs:t,loop:o=!0,...i}=e,d=x(C,t),n=h(t);return c.jsx(k,{asChild:!0,...n,orientation:d.orientation,dir:d.dir,loop:o,children:c.jsx(g.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:a})})});j.displayName=C;var I="TabsTrigger",R=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,disabled:i=!1,...d}=e,n=x(I,t),u=h(t),b=A(n.baseId,o),v=E(n.baseId,o),r=o===n.value;return c.jsx(G,{asChild:!0,...u,focusable:!i,active:r,children:c.jsx(g.button,{type:"button",role:"tab","aria-selected":r,"aria-controls":v,"data-state":r?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:b,...d,ref:a,onMouseDown:m(e.onMouseDown,s=>{!i&&s.button===0&&s.ctrlKey===!1?n.onValueChange(o):s.preventDefault()}),onKeyDown:m(e.onKeyDown,s=>{[" ","Enter"].includes(s.key)&&n.onValueChange(o)}),onFocus:m(e.onFocus,()=>{const s=n.activationMode!=="manual";!r&&!i&&s&&n.onValueChange(o)})})})});R.displayName=I;var w="TabsContent",_=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,forceMount:i,children:d,...n}=e,u=x(w,t),b=A(u.baseId,o),v=E(u.baseId,o),r=o===u.value,s=l.useRef(r);return l.useEffect(()=>{const f=requestAnimationFrame(()=>s.current=!1);return()=>cancelAnimationFrame(f)},[]),c.jsx(L,{present:i||r,children:({present:f})=>c.jsx(g.div,{"data-state":r?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":b,hidden:!f,id:v,tabIndex:0,...n,ref:a,style:{...e.style,animationDuration:s.current?"0s":void 0},children:f&&d})})});_.displayName=w;function A(e,a){return`${e}-trigger-${a}`}function E(e,a){return`${e}-content-${a}`}var q=N,S=j,M=R,P=_;const U=q,z=l.forwardRef(({className:e,...a},t)=>c.jsx(S,{ref:t,className:T("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...a}));z.displayName=S.displayName;const H=l.forwardRef(({className:e,...a},t)=>c.jsx(M,{ref:t,className:T("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...a}));H.displayName=M.displayName;const O=l.forwardRef(({className:e,...a},t)=>c.jsx(P,{ref:t,className:T("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...a}));O.displayName=P.displayName;export{U as T,z as a,H as b,O as c};
@@ -1,4 +1,4 @@
1
- import{c}from"./index-PyVlsLW8.js";/**
1
+ import{c}from"./index-UXL5-kaP.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as t,a8 as j,j as u}from"./index-PyVlsLW8.js";import{x as k,a as B}from"./xterm-DTxiCjtJ.js";function A({sessionId:l,className:p,heightPx:d=160,maxScrollback:m=200}){const h=t.useRef(null),v=t.useRef(null),w=t.useRef(null),y=t.useRef(null),[x,R]=t.useState(!0),o=t.useRef([]),i=t.useRef(null);return t.useEffect(()=>{const a=h.current;if(!a||!l)return;const e=new k.Terminal({disableStdin:!0,cursorBlink:!1,convertEol:!0,scrollback:Math.max(50,Math.min(m,1e3)),fontSize:12,fontFamily:"'IBM Plex Mono', 'Source Code Pro', 'Fira Code', ui-monospace, Menlo, Monaco, monospace",lineHeight:1.25,letterSpacing:.3,theme:{background:"#1a1b26",foreground:"#c0caf5",cursor:"#c0caf5",selectionBackground:"#33467c",black:"#15161e",red:"#f7768e",green:"#9ece6a",yellow:"#e0af68",blue:"#7aa2f7",magenta:"#bb9af7",cyan:"#7dcfff",white:"#a9b1d6",brightBlack:"#414868",brightRed:"#f7768e",brightGreen:"#9ece6a",brightYellow:"#e0af68",brightBlue:"#7aa2f7",brightMagenta:"#bb9af7",brightCyan:"#7dcfff",brightWhite:"#c0caf5"}}),f=new B.FitAddon;e.loadAddon(f),e.open(a),a.style.height=`${d}px`,v.current=e,w.current=f;const s=()=>{try{const n=a.getBoundingClientRect();n.width>8&&n.height>8&&e.element&&f.fit()}catch{}},S=setTimeout(()=>s(),100),g=new ResizeObserver(()=>s());g.observe(a);const b=()=>{document.visibilityState==="visible"&&setTimeout(s,50)};document.addEventListener("visibilitychange",b);const c=new WebSocket(`${j}/ws/terminal-preview/${l}`);y.current=c,c.onopen=()=>R(!1);const E=()=>{i.current=null;const n=o.current;if(n.length){o.current=[];try{e.write(n.join(""))}catch{}}},F=()=>{i.current===null&&(i.current=requestAnimationFrame(E))};return c.onmessage=n=>{let r;try{r=JSON.parse(n.data)}catch{return}if(r?.type==="snapshot"){if(e.reset(),o.current=[],r.data)try{e.write(r.data)}catch{}s()}else r?.type==="data"&&r.data&&(o.current.push(String(r.data)),F())},c.onclose=()=>{},c.onerror=()=>{},()=>{clearTimeout(S),g.disconnect(),document.removeEventListener("visibilitychange",b);try{c.close()}catch{}i.current!==null&&cancelAnimationFrame(i.current),i.current=null,o.current=[],e.dispose()}},[l,d,m]),u.jsxs("div",{className:`relative w-full ${p||""}`.trim(),children:[x&&u.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50/60 z-10",children:u.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading preview…"})}),u.jsx("div",{ref:h,className:"border border-muted rounded overflow-hidden"})]})}export{A as T};
1
+ import{r as t,a3 as j,j as u}from"./index-UXL5-kaP.js";import{x as k,a as B}from"./xterm-DTxiCjtJ.js";function A({sessionId:l,className:p,heightPx:d=160,maxScrollback:m=200}){const h=t.useRef(null),v=t.useRef(null),w=t.useRef(null),y=t.useRef(null),[x,R]=t.useState(!0),o=t.useRef([]),i=t.useRef(null);return t.useEffect(()=>{const a=h.current;if(!a||!l)return;const e=new k.Terminal({disableStdin:!0,cursorBlink:!1,convertEol:!0,scrollback:Math.max(50,Math.min(m,1e3)),fontSize:12,fontFamily:"'IBM Plex Mono', 'Source Code Pro', 'Fira Code', ui-monospace, Menlo, Monaco, monospace",lineHeight:1.25,letterSpacing:.3,theme:{background:"#1a1b26",foreground:"#c0caf5",cursor:"#c0caf5",selectionBackground:"#33467c",black:"#15161e",red:"#f7768e",green:"#9ece6a",yellow:"#e0af68",blue:"#7aa2f7",magenta:"#bb9af7",cyan:"#7dcfff",white:"#a9b1d6",brightBlack:"#414868",brightRed:"#f7768e",brightGreen:"#9ece6a",brightYellow:"#e0af68",brightBlue:"#7aa2f7",brightMagenta:"#bb9af7",brightCyan:"#7dcfff",brightWhite:"#c0caf5"}}),f=new B.FitAddon;e.loadAddon(f),e.open(a),a.style.height=`${d}px`,v.current=e,w.current=f;const s=()=>{try{const n=a.getBoundingClientRect();n.width>8&&n.height>8&&e.element&&f.fit()}catch{}},S=setTimeout(()=>s(),100),g=new ResizeObserver(()=>s());g.observe(a);const b=()=>{document.visibilityState==="visible"&&setTimeout(s,50)};document.addEventListener("visibilitychange",b);const c=new WebSocket(`${j}/ws/terminal-preview/${l}`);y.current=c,c.onopen=()=>R(!1);const E=()=>{i.current=null;const n=o.current;if(n.length){o.current=[];try{e.write(n.join(""))}catch{}}},F=()=>{i.current===null&&(i.current=requestAnimationFrame(E))};return c.onmessage=n=>{let r;try{r=JSON.parse(n.data)}catch{return}if(r?.type==="snapshot"){if(e.reset(),o.current=[],r.data)try{e.write(r.data)}catch{}s()}else r?.type==="data"&&r.data&&(o.current.push(String(r.data)),F())},c.onclose=()=>{},c.onerror=()=>{},()=>{clearTimeout(S),g.disconnect(),document.removeEventListener("visibilitychange",b);try{c.close()}catch{}i.current!==null&&cancelAnimationFrame(i.current),i.current=null,o.current=[],e.dispose()}},[l,d,m]),u.jsxs("div",{className:`relative w-full ${p||""}`.trim(),children:[x&&u.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50/60 z-10",children:u.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading preview…"})}),u.jsx("div",{ref:h,className:"border border-muted rounded overflow-hidden"})]})}export{A as T};
@@ -0,0 +1,6 @@
1
+ import{c as e}from"./index-UXL5-kaP.js";/**
2
+ * @license lucide-react v0.542.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const a=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],o=e("triangle-alert",a);export{o as T};
@@ -1 +1 @@
1
- import{r as i,ad as v,A as f}from"./index-PyVlsLW8.js";function j(){const[y,p]=i.useState([]),[m,c]=i.useState(!1),[d,o]=i.useState(null),{refresh:w}=v(),S=i.useCallback(async(s,n)=>{try{c(!0),o(null);const e=await fetch(`${f}/api/v1/terminal/${s}/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({startupCommand:n})});if(!e.ok){const t=await e.json();throw new Error(t.error||"Failed to create terminal session")}const r=await e.json();return await w(),r.sessionId}catch(e){const r=e instanceof Error?e.message:"Unknown error";return o(r),null}finally{c(!1)}},[w]),g=i.useCallback(async s=>{try{c(!0),o(null);let n;if(s.startsWith("session-")){const r=s.split("-");n=`${r[0]}-${r[1]}`}else{const r=s.split("-");n=`${r[0]}-${r[1]}`}const e=await fetch(`${f}/api/v1/terminal/${n}/destroy`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:s})});if(!e.ok){const r=await e.json();throw new Error(r.error||"Failed to destroy terminal session")}return p(r=>r.filter(t=>t.id!==s)),await w(),!0}catch(n){const e=n instanceof Error?n.message:"Unknown error";return o(e),!1}finally{c(!1)}},[w]),$=i.useCallback(async(s,n,e)=>{try{o(null);let r;if(s.startsWith("session-")){const a=s.split("-");r=`${a[0]}-${a[1]}`}else{const a=s.split("-");r=`${a[0]}-${a[1]}`}const t=await fetch(`${f}/api/v1/terminal/${r}/resize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:s,cols:n,rows:e})});if(!t.ok){const a=await t.json();throw new Error(a.error||"Failed to resize terminal session")}return!0}catch(r){const t=r instanceof Error?r.message:"Unknown error";return o(t),!1}},[]),k=i.useCallback(async(s,n,e)=>{try{c(!0),o(null);const r=new URLSearchParams;s&&r.set("taskId",s),n&&(r.set("withPreview","true"),e&&Number.isFinite(e)&&r.set("lines",String(e)));const t=`${f}/api/v1/terminal/sessions${r.toString()?`?${r.toString()}`:""}`,a=await fetch(t);if(!a.ok){const l=await a.json();throw new Error(l.error||"Failed to fetch terminal sessions")}const u=await a.json();p(u.sessions)}catch(r){const t=r instanceof Error?r.message:"Unknown error";o(t)}finally{c(!1)}},[]),E=i.useCallback(async(s,n=8)=>{try{o(null);const e=new URLSearchParams;e.set("sessionId",s),e.set("withPreview","true"),e.set("lines",String(n)),e.set("colorize","true");const r=`${f}/api/v1/terminal/sessions?${e.toString()}`,t=await fetch(r);if(!t.ok){const l=await t.json().catch(()=>({}));throw new Error(l.error||"Failed to fetch preview")}const a=await t.json(),u=Array.isArray(a?.sessions)&&a.sessions[0]?.preview?a.sessions[0].preview:[];return p(l=>l.map(h=>h.id===s?{...h,preview:u}:h)),u}catch(e){const r=e instanceof Error?e.message:"Unknown error";return o(r),[]}},[]);return{sessions:y,loading:m,error:d,createSession:S,destroySession:g,resizeSession:$,refreshSessions:k,fetchPreview:E}}export{j as u};
1
+ import{r as i,ac as v,A as f}from"./index-UXL5-kaP.js";function j(){const[y,p]=i.useState([]),[m,c]=i.useState(!1),[d,o]=i.useState(null),{refresh:w}=v(),S=i.useCallback(async(s,n)=>{try{c(!0),o(null);const e=await fetch(`${f}/api/v1/terminal/${s}/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({startupCommand:n})});if(!e.ok){const t=await e.json();throw new Error(t.error||"Failed to create terminal session")}const r=await e.json();return await w(),r.sessionId}catch(e){const r=e instanceof Error?e.message:"Unknown error";return o(r),null}finally{c(!1)}},[w]),g=i.useCallback(async s=>{try{c(!0),o(null);let n;if(s.startsWith("session-")){const r=s.split("-");n=`${r[0]}-${r[1]}`}else{const r=s.split("-");n=`${r[0]}-${r[1]}`}const e=await fetch(`${f}/api/v1/terminal/${n}/destroy`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:s})});if(!e.ok){const r=await e.json();throw new Error(r.error||"Failed to destroy terminal session")}return p(r=>r.filter(t=>t.id!==s)),await w(),!0}catch(n){const e=n instanceof Error?n.message:"Unknown error";return o(e),!1}finally{c(!1)}},[w]),$=i.useCallback(async(s,n,e)=>{try{o(null);let r;if(s.startsWith("session-")){const a=s.split("-");r=`${a[0]}-${a[1]}`}else{const a=s.split("-");r=`${a[0]}-${a[1]}`}const t=await fetch(`${f}/api/v1/terminal/${r}/resize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:s,cols:n,rows:e})});if(!t.ok){const a=await t.json();throw new Error(a.error||"Failed to resize terminal session")}return!0}catch(r){const t=r instanceof Error?r.message:"Unknown error";return o(t),!1}},[]),k=i.useCallback(async(s,n,e)=>{try{c(!0),o(null);const r=new URLSearchParams;s&&r.set("taskId",s),n&&(r.set("withPreview","true"),e&&Number.isFinite(e)&&r.set("lines",String(e)));const t=`${f}/api/v1/terminal/sessions${r.toString()?`?${r.toString()}`:""}`,a=await fetch(t);if(!a.ok){const l=await a.json();throw new Error(l.error||"Failed to fetch terminal sessions")}const u=await a.json();p(u.sessions)}catch(r){const t=r instanceof Error?r.message:"Unknown error";o(t)}finally{c(!1)}},[]),E=i.useCallback(async(s,n=8)=>{try{o(null);const e=new URLSearchParams;e.set("sessionId",s),e.set("withPreview","true"),e.set("lines",String(n)),e.set("colorize","true");const r=`${f}/api/v1/terminal/sessions?${e.toString()}`,t=await fetch(r);if(!t.ok){const l=await t.json().catch(()=>({}));throw new Error(l.error||"Failed to fetch preview")}const a=await t.json(),u=Array.isArray(a?.sessions)&&a.sessions[0]?.preview?a.sessions[0].preview:[];return p(l=>l.map(h=>h.id===s?{...h,preview:u}:h)),u}catch(e){const r=e instanceof Error?e.message:"Unknown error";return o(r),[]}},[]);return{sessions:y,loading:m,error:d,createSession:S,destroySession:g,resizeSession:$,refreshSessions:k,fetchPreview:E}}export{j as u};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-PyVlsLW8.js";/**
1
+ import{c as e}from"./index-UXL5-kaP.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
package/static/index.html CHANGED
@@ -8,8 +8,8 @@
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
9
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
10
10
  <title>Coconut - Agentic Development Environment</title>
11
- <script type="module" crossorigin src="/assets/index-PyVlsLW8.js"></script>
12
- <link rel="stylesheet" crossorigin href="/assets/index-DH_vXhd4.css">
11
+ <script type="module" crossorigin src="/assets/index-UXL5-kaP.js"></script>
12
+ <link rel="stylesheet" crossorigin href="/assets/index-BcCuKdbf.css">
13
13
  </head>
14
14
  <body class="font-inter">
15
15
  <div id="root"></div>
@@ -1,39 +0,0 @@
1
- /**
2
- * MCP Client helper for connecting to HTTP/SSE MCP servers
3
- * Provides tool discovery and execution proxying
4
- */
5
- export interface McpServerConfig {
6
- name?: string;
7
- type?: 'http' | 'sse' | 'stdio';
8
- url?: string;
9
- enabled?: boolean;
10
- env?: Record<string, string>;
11
- }
12
- export interface DiscoveredTool {
13
- name: string;
14
- description?: string;
15
- inputSchema?: object;
16
- serverName: string;
17
- serverUrl: string;
18
- }
19
- export interface ToolCallResult {
20
- content: Array<{
21
- type: string;
22
- text?: string;
23
- [key: string]: unknown;
24
- }>;
25
- isError?: boolean;
26
- structuredContent?: unknown;
27
- }
28
- /**
29
- * Connect to an HTTP/SSE MCP server and discover its available tools
30
- */
31
- export declare function discoverToolsFromServer(serverName: string, config: McpServerConfig): Promise<DiscoveredTool[]>;
32
- /**
33
- * Execute a tool on an HTTP/SSE MCP server
34
- */
35
- export declare function executeToolOnServer(serverName: string, config: McpServerConfig, toolName: string, args: Record<string, unknown>): Promise<ToolCallResult>;
36
- /**
37
- * Close all cached client connections (for cleanup)
38
- */
39
- export declare function closeAllConnections(): void;
@@ -1,131 +0,0 @@
1
- /**
2
- * MCP Client helper for connecting to HTTP/SSE MCP servers
3
- * Provides tool discovery and execution proxying
4
- */
5
- import { Client } from '@modelcontextprotocol/sdk/client/index.js';
6
- import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
7
- import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
8
- // Cache for active client connections
9
- const clientCache = new Map();
10
- // Clean up stale connections after 5 minutes
11
- const CONNECTION_TTL_MS = 5 * 60 * 1000;
12
- /**
13
- * Get or create a client connection to an MCP server
14
- */
15
- async function getOrCreateClient(serverName, config) {
16
- const cacheKey = `${serverName}:${config.url}`;
17
- const cached = clientCache.get(cacheKey);
18
- if (cached) {
19
- cached.lastUsed = Date.now();
20
- return cached.client;
21
- }
22
- const client = new Client({
23
- name: 'coconut-api',
24
- version: '1.0.0'
25
- });
26
- const url = new URL(config.url);
27
- // Try StreamableHTTP first (newer), fall back to SSE (legacy)
28
- let transport;
29
- if (config.type === 'sse') {
30
- // Explicitly SSE
31
- transport = new SSEClientTransport(url);
32
- }
33
- else {
34
- // Default to StreamableHTTP for 'http' type or unspecified
35
- transport = new StreamableHTTPClientTransport(url);
36
- }
37
- await client.connect(transport);
38
- clientCache.set(cacheKey, { client, lastUsed: Date.now() });
39
- // Schedule cleanup
40
- scheduleCleanup();
41
- return client;
42
- }
43
- let cleanupScheduled = false;
44
- function scheduleCleanup() {
45
- if (cleanupScheduled)
46
- return;
47
- cleanupScheduled = true;
48
- setTimeout(() => {
49
- cleanupScheduled = false;
50
- const now = Date.now();
51
- for (const [key, entry] of clientCache.entries()) {
52
- if (now - entry.lastUsed > CONNECTION_TTL_MS) {
53
- try {
54
- entry.client.close();
55
- }
56
- catch (e) {
57
- // Ignore close errors
58
- }
59
- clientCache.delete(key);
60
- }
61
- }
62
- // Reschedule if there are still cached connections
63
- if (clientCache.size > 0) {
64
- scheduleCleanup();
65
- }
66
- }, CONNECTION_TTL_MS);
67
- }
68
- /**
69
- * Connect to an HTTP/SSE MCP server and discover its available tools
70
- */
71
- export async function discoverToolsFromServer(serverName, config) {
72
- if (!config.url) {
73
- throw new Error(`Server ${serverName} has no URL configured`);
74
- }
75
- if (config.enabled === false) {
76
- return [];
77
- }
78
- try {
79
- const client = await getOrCreateClient(serverName, config);
80
- const toolsResult = await client.listTools();
81
- return toolsResult.tools.map(tool => ({
82
- name: tool.name,
83
- description: tool.description,
84
- inputSchema: tool.inputSchema,
85
- serverName,
86
- serverUrl: config.url
87
- }));
88
- }
89
- catch (error) {
90
- console.error(`Failed to discover tools from ${serverName}:`, error);
91
- throw error;
92
- }
93
- }
94
- /**
95
- * Execute a tool on an HTTP/SSE MCP server
96
- */
97
- export async function executeToolOnServer(serverName, config, toolName, args) {
98
- if (!config.url) {
99
- throw new Error(`Server ${serverName} has no URL configured`);
100
- }
101
- try {
102
- const client = await getOrCreateClient(serverName, config);
103
- const result = await client.callTool({
104
- name: toolName,
105
- arguments: args
106
- });
107
- return {
108
- content: result.content,
109
- isError: result.isError,
110
- structuredContent: result.structuredContent
111
- };
112
- }
113
- catch (error) {
114
- console.error(`Failed to execute tool ${toolName} on ${serverName}:`, error);
115
- throw error;
116
- }
117
- }
118
- /**
119
- * Close all cached client connections (for cleanup)
120
- */
121
- export function closeAllConnections() {
122
- for (const [key, entry] of clientCache.entries()) {
123
- try {
124
- entry.client.close();
125
- }
126
- catch (e) {
127
- // Ignore close errors
128
- }
129
- clientCache.delete(key);
130
- }
131
- }
@@ -1,17 +0,0 @@
1
- import { Context } from 'hono';
2
- /**
3
- * POST /api/v1/ai/tools
4
- * Execute tool calls that were detected during streaming
5
- */
6
- export declare function POST(c: Context): Promise<(Response & import("hono").TypedResponse<{
7
- error: string;
8
- }, 400, "json">) | (Response & import("hono").TypedResponse<{
9
- error: string;
10
- }, 500, "json">) | (Response & import("hono").TypedResponse<{
11
- response: string;
12
- toolCalls: any[];
13
- toolResults: {
14
- tool_call_id: string;
15
- content: string;
16
- }[];
17
- }, import("hono/utils/http-status").ContentfulStatusCode, "json">)>;