@lovelybunch/api 1.0.77 → 1.0.78-alpha.1
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/dist/routes/api/v1/auth-settings/route.js +57 -0
- package/dist/routes/api/v1/context/architecture/route.d.ts +3 -0
- package/dist/routes/api/v1/context/architecture/route.js +245 -0
- package/dist/routes/api/v1/context/project/route.d.ts +3 -0
- package/dist/routes/api/v1/context/project/route.js +200 -0
- package/dist/routes/api/v1/jobs/[id]/route.d.ts +2 -2
- package/dist/routes/api/v1/jobs/route.d.ts +2 -2
- package/package.json +4 -4
- package/static/assets/{ActivityPage-Cq-tJtyJ.js → ActivityPage-GDXCtp2F.js} +1 -1
- package/static/assets/{AgentsContextEditPage-JQVZwgYS.js → AgentsContextEditPage-DoMluWwB.js} +1 -1
- package/static/assets/{AgentsContextPage-D3qs8jm1.js → AgentsContextPage-CXHbtOdz.js} +1 -1
- package/static/assets/{ApiKeysSettingsPage-DV6SHXFl.js → ApiKeysSettingsPage-DbstsqyB.js} +1 -1
- package/static/assets/{AuthSettingsPage-HGl3bv86.js → AuthSettingsPage-CK9eFJo0.js} +1 -1
- package/static/assets/{CallbackPage-gTamj-aw.js → CallbackPage-BFE5x2Hd.js} +1 -1
- package/static/assets/{CoconutCallbackPage-BSsfwmO9.js → CoconutCallbackPage-D2aFrloh.js} +1 -1
- package/static/assets/{CodePage-BZglHH_Q.js → CodePage-BfUucBak.js} +1 -1
- package/static/assets/{CollapsibleSection-wvr0ZutV.js → CollapsibleSection-Cu7uJYqA.js} +1 -1
- package/static/assets/{DashboardPage-kHE94CF0.js → DashboardPage-xDDYm5-7.js} +1 -1
- package/static/assets/{GitPage-6RIgBfUa.js → GitPage-Ca_CKgGJ.js} +1 -1
- package/static/assets/{GitSettingsPage-BsbGiw1j.js → GitSettingsPage-Bx0JsYW4.js} +1 -1
- package/static/assets/{IdentityPage-BNpiVrav.js → IdentityPage-DbG7B63H.js} +1 -1
- package/static/assets/{ImplementationStepsEditor-0gLMjKu3.js → ImplementationStepsEditor-D_eIbq-s.js} +1 -1
- package/static/assets/{IntegrationsSettingsPage-CrHIVn_B.js → IntegrationsSettingsPage-2lBY2pzo.js} +1 -1
- package/static/assets/{JobDetailPage-DQf8bRkh.js → JobDetailPage-DVIv1yvM.js} +1 -1
- package/static/assets/{KnowledgeDetailPage-UGz_iyMr.js → KnowledgeDetailPage-CgR2Sjgu.js} +1 -1
- package/static/assets/{KnowledgeEditPage-CX7nnUHE.js → KnowledgeEditPage-XrvVy-Nr.js} +1 -1
- package/static/assets/{KnowledgePage-B9vVX08N.js → KnowledgePage-Bd4yUZve.js} +1 -1
- package/static/assets/{LoginPage-uctPsP7c.js → LoginPage-BPjBtFbe.js} +1 -1
- package/static/assets/{MailInboxPage-iFOMcWbJ.js → MailInboxPage-Uv5Yd0V5.js} +1 -1
- package/static/assets/{MailProcessingModal-CWZ6NlWD.js → MailProcessingModal-DFCnUJD5.js} +1 -1
- package/static/assets/{MailReadPage-Cm3EGR04.js → MailReadPage-BjBTIvdR.js} +1 -1
- package/static/assets/{MailSentPage-B_yCduWu.js → MailSentPage-Dsv4mmWO.js} +1 -1
- package/static/assets/{McpSettingsPage-BIuIEeMa.js → McpSettingsPage-ddInKeE_.js} +1 -1
- package/static/assets/{MemoryEditPage-UItxPPYu.js → MemoryEditPage-1Duk8_Ep.js} +1 -1
- package/static/assets/{MemoryPage-Bewz284-.js → MemoryPage-BsVDrfoH.js} +1 -1
- package/static/assets/{NewKnowledgePage-CTFD-rPP.js → NewKnowledgePage-QD99jkhw.js} +1 -1
- package/static/assets/{NewSkillPage-BUJ5TRTk.js → NewSkillPage-CzXXY_2H.js} +1 -1
- package/static/assets/{NewTaskPage-B34HFZLj.js → NewTaskPage-Dnvq8q0H.js} +1 -1
- package/static/assets/{NotFoundPage-BfybYiKU.js → NotFoundPage-CXNHyu2I.js} +1 -1
- package/static/assets/{NotificationsSettingsPage-1ydinio6.js → NotificationsSettingsPage-CMwizTN5.js} +1 -1
- package/static/assets/{PromptsSettingsPage-DqO7rEba.js → PromptsSettingsPage-mzfSW46B.js} +1 -1
- package/static/assets/{ResourceDetailPage-BFG5kNE4.js → ResourceDetailPage-DmVFJJeE.js} +1 -1
- package/static/assets/{ResourcesPage-B0NtohGC.js → ResourcesPage-B-S4WIgq.js} +1 -1
- package/static/assets/{RoleEditPage-CgsWmLJB.js → RoleEditPage-CLDE56qK.js} +1 -1
- package/static/assets/{RolePage-CI6GUlGa.js → RolePage-D43fy7y9.js} +1 -1
- package/static/assets/{RulesSettingsPage-TUgWSUD5.js → RulesSettingsPage-CZJQIr_7.js} +1 -1
- package/static/assets/{RunDetailPage-CXlauF0u.js → RunDetailPage-DM1a32RR.js} +1 -1
- package/static/assets/{SchedulePage-KyktudT3.js → SchedulePage-D2fMyBig.js} +1 -1
- package/static/assets/{SkillDetailPage-DHxNBkWp.js → SkillDetailPage-BePyNqOX.js} +1 -1
- package/static/assets/{SkillEditPage-Lrm4XlCK.js → SkillEditPage-DBc1H0t2.js} +1 -1
- package/static/assets/{SkillsPage-b7uubp-n.js → SkillsPage-Be_0YQkP.js} +1 -1
- package/static/assets/{SkillsSettingsPage-BRJIpJec.js → SkillsSettingsPage-Vr645xmf.js} +1 -1
- package/static/assets/{SourceInput-Qv8Dn4Xx.js → SourceInput-Xd7tPRiQ.js} +1 -1
- package/static/assets/{TagInput-Czvs9lsc.js → TagInput-D0zZF7xt.js} +1 -1
- package/static/assets/{TaskDetailPage-CivkpQe2.js → TaskDetailPage-Bpg8n3W0.js} +1 -1
- package/static/assets/{TaskEditPage-Bc6gS0c6.js → TaskEditPage-BNvNMUgF.js} +1 -1
- package/static/assets/{TasksPage-DuKgC8KM.js → TasksPage-BQE58PD0.js} +1 -1
- package/static/assets/{TeamEditPage-m4NJFGUY.js → TeamEditPage-C4UQSONx.js} +1 -1
- package/static/assets/{TeamPage-DBU-jnVj.js → TeamPage-CVtSifUm.js} +1 -1
- package/static/assets/{TerminalPage-CI45TuGe.js → TerminalPage-SUFGXm4l.js} +1 -1
- package/static/assets/{TerminalSessionPage-DQkhJQaK.js → TerminalSessionPage-BVsNKUkH.js} +1 -1
- package/static/assets/{UserPreferencesPage-BUY2Lmbx.js → UserPreferencesPage-Df-ITRan.js} +1 -1
- package/static/assets/{UserSettingsPage-BcMiPkly.js → UserSettingsPage-DXVtBXML.js} +1 -1
- package/static/assets/{UtilitiesPage-DMerZZcL.js → UtilitiesPage-D6fqcEaT.js} +1 -1
- package/static/assets/{alert-BSl_15w4.js → alert-DAl4a56c.js} +1 -1
- package/static/assets/{arrow-down-_ri289ss.js → arrow-down-CDCYDGUx.js} +1 -1
- package/static/assets/{arrow-left-Fa3x1DU7.js → arrow-left-VDfx33Jh.js} +1 -1
- package/static/assets/{arrow-up-iWDv2UXW.js → arrow-up-CDSv61uo.js} +1 -1
- package/static/assets/{arrow-up-down-Ckwtzrps.js → arrow-up-down-Ezpoqf2s.js} +1 -1
- package/static/assets/{badge-YRTRpaJp.js → badge-D_uqNUSH.js} +1 -1
- package/static/assets/{browser-modal-U9aSv2St.js → browser-modal-C5jrpzix.js} +1 -1
- package/static/assets/{card-_08H8QL5.js → card-B0QREUF4.js} +1 -1
- package/static/assets/{chevron-left-BLnAnQzA.js → chevron-left-35sibkLF.js} +1 -1
- package/static/assets/{chevron-up-CrW20eZR.js → chevron-up-BjM6KODw.js} +1 -1
- package/static/assets/{chevrons-up-BrCIGM2h.js → chevrons-up-jJ4zW_aE.js} +1 -1
- package/static/assets/{circle-alert-CCndfzX8.js → circle-alert-gQD7uoQT.js} +1 -1
- package/static/assets/{circle-check-D2WB1eR8.js → circle-check-KTXf2BuN.js} +1 -1
- package/static/assets/{circle-check-big-B12KqpqV.js → circle-check-big-CJ5S5SSR.js} +1 -1
- package/static/assets/{circle-play-D8mTxsnE.js → circle-play-SYdQRKi1.js} +1 -1
- package/static/assets/{circle-x-CPxsFSfb.js → circle-x-Bcwe-LN_.js} +1 -1
- package/static/assets/{clipboard-BXUoFzC_.js → clipboard-VHK-krjO.js} +1 -1
- package/static/assets/{clock-B7qx7N62.js → clock-D5ggHAx5.js} +1 -1
- package/static/assets/{code-B-wgFVBM.js → code-Dg1ZHEGS.js} +1 -1
- package/static/assets/{download-CIGVn2po.js → download-CGb5cJiK.js} +1 -1
- package/static/assets/{external-link-CD6WP5iK.js → external-link-Cf9EKGQO.js} +1 -1
- package/static/assets/{eye-C-lnahtV.js → eye-oD_Emdr8.js} +1 -1
- package/static/assets/{folder-git-2-CkR5A1oS.js → folder-git-2-DX-nlC0d.js} +1 -1
- package/static/assets/{globe-D3Av4xEm.js → globe-pOzIGyKN.js} +1 -1
- package/static/assets/{index-BBof4w7u.js → index-BIwO8uo-.js} +1 -1
- package/static/assets/{index-C-It-oJ8.js → index-BUPxY8PP.js} +3 -3
- package/static/assets/{index-Cr9wB9uC.js → index-BXQJo5V4.js} +1 -1
- package/static/assets/{index-BOOVSXG_.js → index-Bfgdm0Cb.js} +1 -1
- package/static/assets/{index-CRfSJN7A.js → index-Bxwh96Rz.js} +1 -1
- package/static/assets/{index-BVG65cBY.js → index-C3FDBd4S.js} +1 -1
- package/static/assets/{index-Dtu42bmK.js → index-C3MMQmQg.js} +1 -1
- package/static/assets/{index-B5h_EDHQ.js → index-C6yQwDNN.js} +1 -1
- package/static/assets/{index-BgtJOhTt.js → index-CC7HjVOa.js} +1 -1
- package/static/assets/{index-ZcikYUIr.js → index-CCGFI_UP.js} +1 -1
- package/static/assets/{index-BZ-DEXFT.js → index-CHyffstY.js} +1 -1
- package/static/assets/{index-CpVubLYu.js → index-Cidb9y3R.js} +1 -1
- package/static/assets/{index-CSunDccS.js → index-CoFwRL3K.js} +1 -1
- package/static/assets/{index-B5VNtwZQ.js → index-CusNnDtY.js} +1 -1
- package/static/assets/{index-BiTK53WF.js → index-Cuz8Apx7.js} +1 -1
- package/static/assets/{index-BwbLMbrC.js → index-DchDWBTE.js} +1 -1
- package/static/assets/{index-CdxRNWYK.js → index-DjJ6EU0v.js} +1 -1
- package/static/assets/{index-DZp_7HEX.js → index-FklRfl66.js} +1 -1
- package/static/assets/{index-DMMdqgMw.js → index-pfpWERL-.js} +1 -1
- package/static/assets/{info-D_iUr_LO.js → info-DlnFCJCq.js} +1 -1
- package/static/assets/{label-DpGd2A9i.js → label-CjHH2sSK.js} +1 -1
- package/static/assets/{markdown-editor-DsIWl9E6.js → markdown-editor-BN8QzPHa.js} +3 -3
- package/static/assets/{message-square-CU7CplMV.js → message-square-k2mWEt-W.js} +1 -1
- package/static/assets/{paperclip-BdTSwWBI.js → paperclip-pH0rHAfm.js} +1 -1
- package/static/assets/{pause-VD4MvX1V.js → pause-BF-WAXuj.js} +1 -1
- package/static/assets/{play-CIBDggo3.js → play-szwfQctH.js} +1 -1
- package/static/assets/{radio-group-BwcltCgD.js → radio-group-BAAsV2rJ.js} +1 -1
- package/static/assets/{refresh-cw-DjSZHJFs.js → refresh-cw-CxDJQR9R.js} +1 -1
- package/static/assets/{search-DtmFY0AW.js → search-CoqBUnty.js} +1 -1
- package/static/assets/{select-B3LUgp-0.js → select-SvSJ1fXP.js} +1 -1
- package/static/assets/{server-6-FMGHIh.js → server-yLtQ3igN.js} +1 -1
- package/static/assets/{switch-D7Gn9yQA.js → switch-DNt53KzF.js} +1 -1
- package/static/assets/{tabs-PDBtRsYD.js → tabs-DBHspaGs.js} +1 -1
- package/static/assets/{tag-B30iaxwe.js → tag-yDsYYVah.js} +1 -1
- package/static/assets/{terminal-preview-ZpgPQSVP.js → terminal-preview-DYd7d-he.js} +1 -1
- package/static/assets/{triangle-alert-D2pqhLFw.js → triangle-alert-Dy1Oo-ts.js} +1 -1
- package/static/assets/{use-terminal-Cp7abMCW.js → use-terminal-DpQ4ZVfs.js} +1 -1
- package/static/assets/{video-CteJuAKv.js → video-BoEpz24p.js} +1 -1
- package/static/index.html +1 -1
- package/dist/config/m2m.d.ts +0 -26
- package/dist/config/m2m.js +0 -27
- package/dist/lib/auth/clerk-m2m-verifier.d.ts +0 -34
- package/dist/lib/auth/clerk-m2m-verifier.js +0 -47
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as e,e as r,n as d,ah as y}from"./index-
|
|
1
|
+
import{r as o,j as e,e as r,n as d,ah as y}from"./index-BUPxY8PP.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-Cidb9y3R.js";import{C}from"./chevron-up-BjM6KODw.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 +1 @@
|
|
|
1
|
-
import{r as c,j as e,e as i}from"./index-
|
|
1
|
+
import{r as c,j as e,e as i}from"./index-BUPxY8PP.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 +1 @@
|
|
|
1
|
-
import{r as l,ap as F,aj as k,j as c,ak as $,b6 as D,an as g,bi as y,bk as V,bj as G,am as m,b8 as L,e as T}from"./index-
|
|
1
|
+
import{r as l,ap as F,aj as k,j as c,ak as $,b6 as D,an as g,bi as y,bk as V,bj as G,am as m,b8 as L,e as T}from"./index-BUPxY8PP.js";var p="Tabs",[K,Q]=$(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:f="automatic",...v}=e,r=F(u),[s,b]=k({prop:o,onChange:i,defaultProp:d??"",caller:p});return c.jsx(B,{scope:t,baseId:D(),value:s,onValueChange:b,orientation:n,dir:r,activationMode:f,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(V,{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),f=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:f,...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),f=A(u.baseId,o),v=E(u.baseId,o),r=o===u.value,s=l.useRef(r);return l.useEffect(()=>{const b=requestAnimationFrame(()=>s.current=!1);return()=>cancelAnimationFrame(b)},[]),c.jsx(L,{present:i||r,children:({present:b})=>c.jsx(g.div,{"data-state":r?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!b,id:v,tabIndex:0,...n,ref:a,style:{...e.style,animationDuration:s.current?"0s":void 0},children:b&&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 +1 @@
|
|
|
1
|
-
import{r as t,a7 as M,j as m}from"./index-
|
|
1
|
+
import{r as t,a7 as M,j as m}from"./index-BUPxY8PP.js";import{x as T,a as k}from"./xterm-DTxiCjtJ.js";function B(n){if(!n||typeof n!="object")return!1;const i=n,u=i.type==="snapshot"||i.type==="data",l=i.data===void 0||typeof i.data=="string";return u&&l}function N({sessionId:n,className:i,heightPx:u=160,maxScrollback:l=200}){const b=t.useRef(null),v=t.useRef(null),w=t.useRef(null),x=t.useRef(null),[R,S]=t.useState(!0),c=t.useRef([]),a=t.useRef(null);return t.useEffect(()=>{const o=b.current;if(!o||!n)return;const e=new T.Terminal({disableStdin:!0,cursorBlink:!1,convertEol:!0,scrollback:Math.max(50,Math.min(l,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"}}),h=new k.FitAddon;e.loadAddon(h),e.open(o),o.style.height=`${u}px`,v.current=e,w.current=h;const f=()=>{try{const r=o.getBoundingClientRect();r.width>8&&r.height>8&&e.element&&h.fit()}catch{}},j=setTimeout(()=>f(),100),p=new ResizeObserver(()=>f());p.observe(o);const y=()=>{document.visibilityState==="visible"&&setTimeout(f,50)};document.addEventListener("visibilitychange",y);const d=new WebSocket(`${M}/ws/terminal-preview/${n}`);x.current=d,d.onopen=()=>S(!1);const E=()=>{a.current=null;const r=c.current;if(r.length){c.current=[];try{e.write(r.join(""))}catch{}}},F=()=>{a.current===null&&(a.current=requestAnimationFrame(E))};return d.onmessage=r=>{let g;try{g=JSON.parse(r.data)}catch{return}if(!B(g))return;const s=g;if(s?.type==="snapshot"){if(e.reset(),c.current=[],s.data)try{e.write(s.data)}catch{}f()}else s?.type==="data"&&s.data&&(c.current.push(String(s.data)),F())},()=>{clearTimeout(j),p.disconnect(),document.removeEventListener("visibilitychange",y);try{d.close()}catch{}a.current!==null&&cancelAnimationFrame(a.current),a.current=null,c.current=[],e.dispose()}},[n,u,l]),m.jsxs("div",{className:`relative w-full ${i||""}`.trim(),children:[R&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50/60 z-10",children:m.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading preview…"})}),m.jsx("div",{ref:b,className:"border border-muted rounded overflow-hidden"})]})}export{N as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,ag as v,A as f}from"./index-
|
|
1
|
+
import{r as i,ag as v,A as f}from"./index-BUPxY8PP.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};
|
package/static/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
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-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-BUPxY8PP.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-DVMcu9sQ.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body class="font-inter">
|
package/dist/config/m2m.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Control-plane → coconut M2M (machine-to-machine) runtime config.
|
|
3
|
-
*
|
|
4
|
-
* The control plane mints Clerk M2M JWTs carrying a `coconut_id` claim and
|
|
5
|
-
* sends them as `Authorization: Bearer <jwt>` to coconut VMs. The coconut
|
|
6
|
-
* verifies the signature against Clerk's JWKS (same one used for user OAuth
|
|
7
|
-
* login), enforces the standard issuer, and — crucially — asserts that the
|
|
8
|
-
* token's `coconut_id` claim equals THIS coconut's ID. That claim is the
|
|
9
|
-
* isolation guarantee: a token minted for coconut A must be rejected by
|
|
10
|
-
* coconut B.
|
|
11
|
-
*
|
|
12
|
-
* This runtime cache is populated at server startup from `resolveCoconutId()`
|
|
13
|
-
* (which reads env → `.nut/config.json`). If no ID is resolvable, M2M auth
|
|
14
|
-
* stays disabled and the Bearer chain falls through to existing paths. The
|
|
15
|
-
* whole mechanism is purely additive: existing cookie / API-key / OAuth-user
|
|
16
|
-
* flows are unaffected.
|
|
17
|
-
*
|
|
18
|
-
* Kept separate from `OAuthRuntimeConfig` because the verification rules
|
|
19
|
-
* differ (audience vs. custom claim) and conflating them risks security bugs.
|
|
20
|
-
*/
|
|
21
|
-
export interface M2MRuntimeConfig {
|
|
22
|
-
enabled: boolean;
|
|
23
|
-
coconutId?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare function setM2MRuntimeConfig(config: M2MRuntimeConfig): void;
|
|
26
|
-
export declare function getM2MRuntimeConfig(): M2MRuntimeConfig;
|
package/dist/config/m2m.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Control-plane → coconut M2M (machine-to-machine) runtime config.
|
|
3
|
-
*
|
|
4
|
-
* The control plane mints Clerk M2M JWTs carrying a `coconut_id` claim and
|
|
5
|
-
* sends them as `Authorization: Bearer <jwt>` to coconut VMs. The coconut
|
|
6
|
-
* verifies the signature against Clerk's JWKS (same one used for user OAuth
|
|
7
|
-
* login), enforces the standard issuer, and — crucially — asserts that the
|
|
8
|
-
* token's `coconut_id` claim equals THIS coconut's ID. That claim is the
|
|
9
|
-
* isolation guarantee: a token minted for coconut A must be rejected by
|
|
10
|
-
* coconut B.
|
|
11
|
-
*
|
|
12
|
-
* This runtime cache is populated at server startup from `resolveCoconutId()`
|
|
13
|
-
* (which reads env → `.nut/config.json`). If no ID is resolvable, M2M auth
|
|
14
|
-
* stays disabled and the Bearer chain falls through to existing paths. The
|
|
15
|
-
* whole mechanism is purely additive: existing cookie / API-key / OAuth-user
|
|
16
|
-
* flows are unaffected.
|
|
17
|
-
*
|
|
18
|
-
* Kept separate from `OAuthRuntimeConfig` because the verification rules
|
|
19
|
-
* differ (audience vs. custom claim) and conflating them risks security bugs.
|
|
20
|
-
*/
|
|
21
|
-
let runtimeConfig = { enabled: false };
|
|
22
|
-
export function setM2MRuntimeConfig(config) {
|
|
23
|
-
runtimeConfig = config;
|
|
24
|
-
}
|
|
25
|
-
export function getM2MRuntimeConfig() {
|
|
26
|
-
return runtimeConfig;
|
|
27
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jwtVerify, type JWTPayload } from 'jose';
|
|
2
|
-
/**
|
|
3
|
-
* Clerk M2M (control-plane → coconut) JWT verification.
|
|
4
|
-
*
|
|
5
|
-
* Differs from `verifyClerkToken` (user OIDC login) in three ways:
|
|
6
|
-
* 1. No audience enforcement — Clerk M2M tokens don't carry the coconut's
|
|
7
|
-
* OAuth client_id as audience; they're minted from the control plane's
|
|
8
|
-
* machine secret with different audience conventions.
|
|
9
|
-
* 2. Requires a custom `coconut_id` claim that must equal THIS coconut's
|
|
10
|
-
* ID. This is the per-tenant isolation guarantee: a token minted for
|
|
11
|
-
* coconut A is signed by the same tenant's keys as coconut B's tokens,
|
|
12
|
-
* so the only thing keeping B from accepting A's token is this claim.
|
|
13
|
-
* 3. Keeps JWKS separate from the OAuth verifier's instance for cleaner
|
|
14
|
-
* test isolation, though both instances point at the same JWKS URL.
|
|
15
|
-
*
|
|
16
|
-
* Returns the verified payload on success, `null` on any failure. The
|
|
17
|
-
* failure reason is logged (same pattern as the OAuth verifier) so 401s
|
|
18
|
-
* are diagnosable in prod without adding debug endpoints.
|
|
19
|
-
*/
|
|
20
|
-
type JwksKeyFn = Parameters<typeof jwtVerify>[1];
|
|
21
|
-
export interface M2MVerifyResult {
|
|
22
|
-
payload: JWTPayload & {
|
|
23
|
-
coconut_id: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export declare function verifyCoconutM2MToken(token: string, options: {
|
|
27
|
-
expectedCoconutId: string;
|
|
28
|
-
}): Promise<M2MVerifyResult | null>;
|
|
29
|
-
/**
|
|
30
|
-
* Test-only: inject a custom JWKS key function (e.g. `jose.createLocalJWKSet`
|
|
31
|
-
* backed by a generated keypair) so middleware tests don't hit the network.
|
|
32
|
-
*/
|
|
33
|
-
export declare function __setClerkM2MJwksForTests(jwks: JwksKeyFn | null): void;
|
|
34
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { createRemoteJWKSet, jwtVerify } from 'jose';
|
|
2
|
-
import { CLERK_ISSUER, CLERK_JWKS_URL } from '../../config/oauth.js';
|
|
3
|
-
let jwksInstance = null;
|
|
4
|
-
function getJwks() {
|
|
5
|
-
if (!jwksInstance) {
|
|
6
|
-
jwksInstance = createRemoteJWKSet(new URL(CLERK_JWKS_URL));
|
|
7
|
-
}
|
|
8
|
-
return jwksInstance;
|
|
9
|
-
}
|
|
10
|
-
export async function verifyCoconutM2MToken(token, options) {
|
|
11
|
-
try {
|
|
12
|
-
const jwks = getJwks();
|
|
13
|
-
const verifyOptions = {
|
|
14
|
-
issuer: CLERK_ISSUER,
|
|
15
|
-
};
|
|
16
|
-
const { payload } = await jwtVerify(token, jwks, verifyOptions);
|
|
17
|
-
const claim = payload.coconut_id;
|
|
18
|
-
if (typeof claim !== 'string' || claim.length === 0) {
|
|
19
|
-
console.warn('[clerk-m2m-verifier] Token rejected: missing coconut_id claim');
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
if (claim !== options.expectedCoconutId) {
|
|
23
|
-
// Log without leaking either ID at full length — prefix-only keeps
|
|
24
|
-
// logs useful for triage without exposing tenant identifiers.
|
|
25
|
-
const prefix = (s) => s.slice(0, 8);
|
|
26
|
-
console.warn(`[clerk-m2m-verifier] Token rejected: coconut_id mismatch ` +
|
|
27
|
-
`(token=${prefix(claim)}… expected=${prefix(options.expectedCoconutId)}…)`);
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
return { payload: payload };
|
|
31
|
-
}
|
|
32
|
-
catch (err) {
|
|
33
|
-
const e = err;
|
|
34
|
-
const reason = e.code
|
|
35
|
-
? `${e.code}${e.claim ? ` (claim: ${e.claim})` : ''}`
|
|
36
|
-
: e.message || 'unknown error';
|
|
37
|
-
console.warn(`[clerk-m2m-verifier] Token verification failed: ${reason}`);
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Test-only: inject a custom JWKS key function (e.g. `jose.createLocalJWKSet`
|
|
43
|
-
* backed by a generated keypair) so middleware tests don't hit the network.
|
|
44
|
-
*/
|
|
45
|
-
export function __setClerkM2MJwksForTests(jwks) {
|
|
46
|
-
jwksInstance = jwks;
|
|
47
|
-
}
|