@researai/deepscientist 1.5.16 → 1.5.17
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/README.md +66 -23
- package/bin/ds.js +550 -19
- package/docs/en/00_QUICK_START.md +65 -5
- package/docs/en/01_SETTINGS_REFERENCE.md +1 -1
- package/docs/en/09_DOCTOR.md +14 -3
- package/docs/en/15_CODEX_PROVIDER_SETUP.md +12 -3
- package/docs/en/21_LOCAL_MODEL_BACKENDS_GUIDE.md +283 -0
- package/docs/en/91_DEVELOPMENT.md +237 -0
- package/docs/en/README.md +7 -3
- package/docs/zh/00_QUICK_START.md +54 -5
- package/docs/zh/01_SETTINGS_REFERENCE.md +1 -1
- package/docs/zh/09_DOCTOR.md +15 -4
- package/docs/zh/15_CODEX_PROVIDER_SETUP.md +12 -3
- package/docs/zh/21_LOCAL_MODEL_BACKENDS_GUIDE.md +281 -0
- package/docs/zh/README.md +7 -3
- package/install.sh +46 -4
- package/package.json +2 -1
- package/pyproject.toml +1 -1
- package/src/deepscientist/__init__.py +1 -1
- package/src/deepscientist/bridges/connectors.py +8 -2
- package/src/deepscientist/codex_cli_compat.py +185 -72
- package/src/deepscientist/config/service.py +154 -6
- package/src/deepscientist/daemon/api/handlers.py +130 -25
- package/src/deepscientist/daemon/api/router.py +5 -0
- package/src/deepscientist/daemon/app.py +446 -22
- package/src/deepscientist/diagnostics/__init__.py +6 -0
- package/src/deepscientist/diagnostics/runner_failures.py +130 -0
- package/src/deepscientist/doctor.py +207 -3
- package/src/deepscientist/prompts/builder.py +22 -4
- package/src/deepscientist/quest/service.py +413 -13
- package/src/deepscientist/runners/codex.py +59 -14
- package/src/deepscientist/shared.py +19 -0
- package/src/prompts/contracts/shared_interaction.md +3 -2
- package/src/prompts/system.md +13 -0
- package/src/prompts/system_copilot.md +13 -0
- package/src/tui/package.json +1 -1
- package/src/ui/dist/assets/{AiManusChatView-COFACy7V.js → AiManusChatView-Bv-Z8YpU.js} +44 -44
- package/src/ui/dist/assets/{AnalysisPlugin-DnSm0GZn.js → AnalysisPlugin-BCKAfjba.js} +1 -1
- package/src/ui/dist/assets/{CliPlugin-CvwCmDQ5.js → CliPlugin-BCKcpc35.js} +4 -4
- package/src/ui/dist/assets/{CodeEditorPlugin-cOqSa0xq.js → CodeEditorPlugin-DbOfSJ8K.js} +1 -1
- package/src/ui/dist/assets/{CodeViewerPlugin-itb0tltR.js → CodeViewerPlugin-CbaFRrUU.js} +3 -3
- package/src/ui/dist/assets/{DocViewerPlugin-DqKkiCI6.js → DocViewerPlugin-DAjLVeQD.js} +3 -3
- package/src/ui/dist/assets/{GitCommitViewerPlugin-DVgNHBCS.js → GitCommitViewerPlugin-CIUqbUDO.js} +1 -1
- package/src/ui/dist/assets/{GitDiffViewerPlugin-DxL2ezFG.js → GitDiffViewerPlugin-CQACjoAA.js} +1 -1
- package/src/ui/dist/assets/{GitSnapshotViewer-B_RQm1YZ.js → GitSnapshotViewer-0r4nLPke.js} +1 -1
- package/src/ui/dist/assets/{ImageViewerPlugin-tHqlXY3n.js → ImageViewerPlugin-nBOmI2v_.js} +3 -3
- package/src/ui/dist/assets/{LabCopilotPanel-ClMbq5Yu.js → LabCopilotPanel-BHxOxF4z.js} +1 -1
- package/src/ui/dist/assets/{LabPlugin-L_SuE8ow.js → LabPlugin-BKoZGs95.js} +1 -1
- package/src/ui/dist/assets/{LatexPlugin-B495DTXC.js → LatexPlugin-ZwtV8pIp.js} +1 -1
- package/src/ui/dist/assets/{MarkdownViewerPlugin-DG28-61B.js → MarkdownViewerPlugin-DKqVfKyW.js} +3 -3
- package/src/ui/dist/assets/{MarketplacePlugin-BiOGT-Kj.js → MarketplacePlugin-BwxStZ9D.js} +1 -1
- package/src/ui/dist/assets/{NotebookEditor-C-4Kt1p9.js → NotebookEditor-BEQhaQbt.js} +1 -1
- package/src/ui/dist/assets/{NotebookEditor-CVsj8h_T.js → NotebookEditor-DB9N_T9q.js} +23 -23
- package/src/ui/dist/assets/{PdfLoader-CASDQmxJ.js → PdfLoader-eWBONbQP.js} +1 -1
- package/src/ui/dist/assets/{PdfMarkdownPlugin-BFhwoKsY.js → PdfMarkdownPlugin-D22YOZL3.js} +1 -1
- package/src/ui/dist/assets/{PdfViewerPlugin-DcOzU9vd.js → PdfViewerPlugin-c-RK9DLM.js} +3 -3
- package/src/ui/dist/assets/{SearchPlugin-CHj7M58O.js → SearchPlugin-CxF9ytAx.js} +1 -1
- package/src/ui/dist/assets/{TextViewerPlugin-CB4DYfWO.js → TextViewerPlugin-C5xqeeUH.js} +2 -2
- package/src/ui/dist/assets/{VNCViewer-CjlbyCB3.js → VNCViewer-BoLGLnHz.js} +1 -1
- package/src/ui/dist/assets/{bot-CFkZY-JP.js → bot-DREQOxzP.js} +1 -1
- package/src/ui/dist/assets/{chevron-up-Dq5ofbht.js → chevron-up-C9Qpx4DE.js} +1 -1
- package/src/ui/dist/assets/{code-DLC6G24T.js → code-WlFHE7z_.js} +1 -1
- package/src/ui/dist/assets/{file-content-Dv4LoZec.js → file-content-BZMz3RYp.js} +1 -1
- package/src/ui/dist/assets/{file-diff-panel-Denq-lC3.js → file-diff-panel-CQhw0jS2.js} +1 -1
- package/src/ui/dist/assets/{file-socket-Cu4Qln7Y.js → file-socket-CfQPKQKj.js} +1 -1
- package/src/ui/dist/assets/{git-commit-horizontal-BUh6G52n.js → git-commit-horizontal-DxZ8DCZh.js} +1 -1
- package/src/ui/dist/assets/{image-B9HUUddG.js → image-Bgl4VIyx.js} +1 -1
- package/src/ui/dist/assets/{index-Cgla8biy.css → index-BpV6lusQ.css} +1 -1
- package/src/ui/dist/assets/{index-Gbl53BNp.js → index-CBNVuWcP.js} +363 -363
- package/src/ui/dist/assets/{index-wQ7RIIRd.js → index-CwNu1aH4.js} +1 -1
- package/src/ui/dist/assets/{index-B2B1sg-M.js → index-DrUnlf6K.js} +1 -1
- package/src/ui/dist/assets/{index-DRyx7vAc.js → index-NW-h8VzN.js} +1 -1
- package/src/ui/dist/assets/{pdf-effect-queue-ZtnHFCAi.js → pdf-effect-queue-J8OnM0jE.js} +1 -1
- package/src/ui/dist/assets/{popover-DL6h35vr.js → popover-CLc0pPP8.js} +1 -1
- package/src/ui/dist/assets/{project-sync-CsX08Qno.js → project-sync-C9IdzdZW.js} +1 -1
- package/src/ui/dist/assets/{select-DvmXt1yY.js → select-Cs2PmzwL.js} +1 -1
- package/src/ui/dist/assets/{sigma-7jpXazui.js → sigma-ClKcHAXm.js} +1 -1
- package/src/ui/dist/assets/{trash-xA7kFt8i.js → trash-DwpbFr3w.js} +1 -1
- package/src/ui/dist/assets/{useCliAccess-DsMwDjOp.js → useCliAccess-NQ8m0Let.js} +1 -1
- package/src/ui/dist/assets/{wrap-text-CwMn-iqb.js → wrap-text-BC-Hltpd.js} +1 -1
- package/src/ui/dist/assets/{zoom-out-R-GWEhzS.js → zoom-out-E_gaeAxL.js} +1 -1
- package/src/ui/dist/index.html +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as O,j as y,Q as S}from"./index-
|
|
1
|
+
import{P as O,j as y,Q as S}from"./index-CBNVuWcP.js";import{r as i}from"./plugin-monaco-C8UgLomw.js";import{u as _,a as z,n as N,b as $}from"./useCliAccess-NQ8m0Let.js";import"./plugin-notebook-HbW2K-1c.js";import"./plugin-terminal-MXFIPun8.js";function M({projectId:o,serverId:c,chatSessionId:u,shellSessionId:l,operationId:s,readOnly:h,showHeader:T=!0}){const[r,A]=i.useState(null),x=i.useRef(()=>{}),R=i.useRef(()=>{}),f=i.useRef(null),m=i.useRef(typeof TextDecoder<"u"?new TextDecoder("utf-8"):null),{capabilities:E}=_({projectId:o,serverId:c,readOnly:h}),p=E.terminal_input;i.useEffect(()=>{let t=!0;return(async()=>{const n=l&&l.trim()?l:u,a=n===u?n:`${u}:${n}`,v=await $(o,c,a);t&&A(v)})(),()=>{t=!1}},[u,o,c,l]);const D=i.useMemo(()=>({onTerminalOutput:t=>{if(s&&t.operation_id&&t.operation_id!==s)return;const e=t.payload?.data;let n="";if(typeof e=="string")n=e;else if(e instanceof ArrayBuffer)n=m.current?.decode(new Uint8Array(e))??"";else if(ArrayBuffer.isView(e)){const a=e;n=m.current?.decode(new Uint8Array(a.buffer,a.byteOffset,a.byteLength))??""}else if(Array.isArray(e))try{n=m.current?.decode(new Uint8Array(e))??""}catch{n=String(e)}else e!=null&&(n=String(e));n&&(x.current?.(n),R.current?.())}}),[s]),{status:w,emitEnvelope:C,sendTerminalInput:b,sendTerminalResize:d}=z({projectId:o,serverId:c,handlers:D});i.useEffect(()=>{!r||w.state!==O.CONNECTED||(C("cli:session:attach",{session_id:r},{session_id:r}),f.current&&d({cols:f.current.cols,rows:f.current.rows,sessionId:r}))},[C,d,r,w.state]);const U=i.useCallback(t=>{if(!r||!p)return;const e=s||(typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`op-${Date.now()}-${Math.random().toString(16).slice(2,10)}`);b({data:t,sessionId:r,seq:N(),operationId:e})},[p,s,b,r]),g=i.useCallback((t,e)=>{f.current={cols:t,rows:e},r&&d({cols:t,rows:e,sessionId:r})},[d,r]);return y.jsxs("div",{className:"cli-root h-full min-h-0",children:[y.jsx(S,{onInput:U,onResize:g,searchOpen:!1,onSearchOpenChange:()=>{},onReady:({write:t,focus:e})=>{x.current=t,R.current=e},appearance:"ui",showHeader:T}),p?null:y.jsx("div",{className:"mt-2 text-xs text-[var(--cli-muted-1)]",children:"View only. CLI input permission required."})]})}export{M as CliToolTerminal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as x,N as g,N,a as w,N as h}from"./NotebookEditor-
|
|
1
|
+
import{E as x,N as g,N,a as w,N as h}from"./NotebookEditor-BEQhaQbt.js";import"./index-CBNVuWcP.js";import"./plugin-monaco-C8UgLomw.js";import"./plugin-terminal-MXFIPun8.js";import"./plugin-notebook-HbW2K-1c.js";import"./NotebookEditor-DB9N_T9q.js";import"./project-sync-C9IdzdZW.js";import"./index-CwNu1aH4.js";import"./code-WlFHE7z_.js";import"./image-Bgl4VIyx.js";import"./popover-CLc0pPP8.js";import"./trash-DwpbFr3w.js";import"./sigma-ClKcHAXm.js";import"./useFileDiffOverlay-FuhcnKiw.js";import"./file-diff-panel-CQhw0jS2.js";const u={id:"@ds/plugin-notebook",name:"Notebook Editor",description:"Novel-based rich text editor with real-time collaboration",version:"1.0.0",type:"builtin",author:"DeepScientist Team",icon:"BookOpen",frontend:{entry:"./NotebookEditor",renderMode:"react",fileAssociations:[{extensions:[".ds",".notebook",".dsnb"],mimeTypes:["application/x-blocksuite-notebook"],priority:100},{extensions:[".md",".markdown"],mimeTypes:["text/markdown","text/x-markdown"],priority:95}],multiInstance:!0},backend:{entry:"app.plugins.builtin.notebook_tools",tools:[]},permissions:{frontend:["notebook:read","notebook:write","file:read","file:upload"],backend:["database:read","database:write","file:read","file:write"]},contributes:{tabIcon:"file-text",tabTitle:{dynamic:"resourceName"},toolbar:[{id:"notebook-export",title:"Export",icon:"Download",command:"notebook.export",position:"right"}],contextMenus:[{id:"duplicate-block",title:"Duplicate Block",command:"notebook.duplicateBlock",context:"editor",group:"edit",order:1},{id:"delete-block",title:"Delete Block",command:"notebook.deleteBlock",context:"editor",group:"edit",order:2}]},configSchema:{type:"object",properties:{defaultFontFamily:{type:"string",default:"Inter",description:"Default font family"},autoSaveInterval:{type:"number",default:3e3,minimum:1e3,maximum:3e4,description:"Auto-save interval in milliseconds"},enableCollaboration:{type:"boolean",default:!0,description:"Enable real-time collaboration"},showBlockHandles:{type:"boolean",default:!0,description:"Show block drag handles on hover"}}},defaultConfig:{defaultFontFamily:"Inter",autoSaveInterval:3e3,enableCollaboration:!0,showBlockHandles:!0},lifecycle:{activationEvents:["onFileType:notebook","onCommand:newNotebook"],onActivate:"activate",onDeactivate:"deactivate"}};function k(){console.log("[NotebookPlugin] Activated")}function f(){console.log("[NotebookPlugin] Deactivated")}export{x as EditorLoading,g as NotebookEditor,N as NotebookEditorComponent,w as NotebookToolbar,k as activate,f as deactivate,h as default,u as notebookManifest,u as notebookPluginManifest};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l,ay as W,az as z,aA as B,aB as G,aC as _,aD as C,aE as y,aF as A,aG as E,aH as K,aI as Z,aJ as J,aK as U,aL as q,aM as Q,aN as X,aO as Y,b as ee}from"./index-
|
|
1
|
+
import{j as l,ay as W,az as z,aA as B,aB as G,aC as _,aD as C,aE as y,aF as A,aG as E,aH as K,aI as Z,aJ as J,aK as U,aL as q,aM as Q,aN as X,aO as Y,b as ee}from"./index-CBNVuWcP.js";import{r as a}from"./plugin-monaco-C8UgLomw.js";import"./plugin-notebook-HbW2K-1c.js";function oe(e,t=[]){let r=[];function n(s,c){const i=a.createContext(c),p=r.length;r=[...r,c];const u=d=>{const{scope:f,children:m,...h}=d,L=f?.[e]?.[p]||i,V=a.useMemo(()=>h,Object.values(h));return l.jsx(L.Provider,{value:V,children:m})};u.displayName=s+"Provider";function v(d,f){const m=f?.[e]?.[p]||i,h=a.useContext(m);if(h)return h;if(c!==void 0)return c;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,v]}const o=()=>{const s=r.map(c=>a.createContext(c));return function(i){const p=i?.[e]||s;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:p}}),[i,p])}};return o.scopeName=e,[n,te(o,...t)]}function te(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=n.reduce((i,{useScope:p,scopeName:u})=>{const d=p(s)[`__scope${u}`];return{...i,...d}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}function S(e){const t=re(e),r=a.forwardRef((n,o)=>{const{children:s,...c}=n,i=a.Children.toArray(s),p=i.find(se);if(p){const u=p.props.children,v=i.map(d=>d===p?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:d);return l.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,v):null})}return l.jsx(t,{...c,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function re(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const c=ce(o),i=ae(s,o.props);return o.type!==a.Fragment&&(i.ref=n?W(n,c):c),a.cloneElement(o,i)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ne=Symbol("radix.slottable");function se(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ne}function ae(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const p=s(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function ce(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],b=ie.reduce((e,t)=>{const r=S(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:c,...i}=o,p=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(p,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),R="Popover",[w]=oe(R,[A]),x=A(),[le,P]=w(R),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,i=x(t),p=a.useRef(null),[u,v]=a.useState(!1),[d,f]=z({prop:n,defaultProp:o??!1,onChange:s,caller:R});return l.jsx(B,{...i,children:l.jsx(le,{scope:t,contentId:G(),triggerRef:p,open:d,onOpenChange:f,onOpenToggle:a.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:a.useCallback(()=>v(!0),[]),onCustomAnchorRemove:a.useCallback(()=>v(!1),[]),modal:c,children:r})})};j.displayName=R;var N="PopoverAnchor",pe=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=P(N,r),s=x(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return a.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(y,{...s,...n,ref:t})});pe.displayName=N;var F="PopoverTrigger",D=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=P(F,r),s=x(r),c=_(t,o.triggerRef),i=l.jsx(b.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":k(o.open),...n,ref:c,onClick:C(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(y,{asChild:!0,...s,children:i})});D.displayName=F;var O="PopoverPortal",[ue,de]=w(O,{forceMount:void 0}),I=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,s=P(O,t);return l.jsx(ue,{scope:t,forceMount:r,children:l.jsx(E,{present:r||s.open,children:l.jsx(K,{asChild:!0,container:o,children:n})})})};I.displayName=O;var g="PopoverContent",M=a.forwardRef((e,t)=>{const r=de(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,s=P(g,e.__scopePopover);return l.jsx(E,{present:n||s.open,children:s.modal?l.jsx(ve,{...o,ref:t}):l.jsx(Pe,{...o,ref:t})})});M.displayName=g;var fe=S("PopoverContent.RemoveScroll"),ve=a.forwardRef((e,t)=>{const r=P(g,e.__scopePopover),n=a.useRef(null),o=_(t,n),s=a.useRef(!1);return a.useEffect(()=>{const c=n.current;if(c)return Z(c)},[]),l.jsx(J,{as:fe,allowPinchZoom:!0,children:l.jsx(T,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:C(e.onCloseAutoFocus,c=>{c.preventDefault(),s.current||r.triggerRef.current?.focus()}),onPointerDownOutside:C(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:C(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),Pe=a.forwardRef((e,t)=>{const r=P(g,e.__scopePopover),n=a.useRef(!1),o=a.useRef(!1);return l.jsx(T,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;r.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),T=a.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:v,...d}=e,f=P(g,r),m=x(r);return U(),l.jsx(q,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:l.jsx(Q,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:l.jsx(X,{"data-state":k(f.open),role:"dialog",id:f.contentId,...m,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$="PopoverClose",me=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=P($,r);return l.jsx(b.button,{type:"button",...n,ref:t,onClick:C(e.onClick,()=>o.onOpenChange(!1))})});me.displayName=$;var ge="PopoverArrow",he=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=x(r);return l.jsx(Y,{...o,...n,ref:t})});he.displayName=ge;function k(e){return e?"open":"closed"}var Ce=j,xe=D,Re=I,H=M;const Ee=Ce,Se=xe,Oe=a.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx(Re,{children:l.jsx(H,{ref:o,align:t,sideOffset:r,className:ee("z-[10002] w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",e),...n})}));Oe.displayName=H.displayName;export{Ee as P,Se as a,Oe as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as k,D as u,G as p}from"./index-
|
|
1
|
+
import{z as k,D as u,G as p}from"./index-CBNVuWcP.js";function y(r){if(r instanceof Error)return r.message;if(typeof r=="string")return r;try{return JSON.stringify(r)}catch{return String(r)}}class j{spaceType="workspace";projectId;authMode;docKind;socket;releaseSocket;joined=!1;joinedDocs=new Set;constructor(e,s={}){this.projectId=e,this.authMode=s.authMode??"user",this.docKind=s.docKind;const{socket:t,release:o}=k({authMode:this.authMode});this.socket=t,this.releaseSocket=o}async waitForConnected(e){this.socket.connected||await new Promise((s,t)=>{const o=window.setTimeout(()=>{a(),t(new Error("WebSocket connection timeout"))},e),c=()=>{a(),s()},i=n=>{a(),t(new Error(y(n)||"WebSocket connection error"))},a=()=>{window.clearTimeout(o),this.socket.off("connect",c),this.socket.off("connect_error",i),this.socket.off?.("error",i)},h=(n,w)=>{const d=this.socket;if(typeof d.once=="function"){d.once(n,w);return}const f=(...m)=>{typeof d.off=="function"&&d.off(n,f),w(...m)};d.on?.(n,f)};h("connect",c),h("connect_error",i),h("error",i)})}async emitWithAck(e,s,t=1e4){await this.waitForConnected(t);try{const o=this.socket;return typeof o.timeout=="function"&&typeof o.emitWithAck=="function"?await o.timeout(t).emitWithAck(e,s):await new Promise(c=>{const i=window.setTimeout(()=>{c({error:{name:"SOCKET_TIMEOUT",message:`Ack timeout for ${e}`}})},t);this.socket.emit(e,s,a=>{window.clearTimeout(i),c(a)})})}catch(o){return{error:{name:"SOCKET_ERROR",message:y(o)}}}}async connect(){if(this.joined)return;const e=await this.emitWithAck("space:join",{spaceType:this.spaceType,spaceId:this.projectId,clientVersion:"1.0.0"},12e3);if("error"in e)throw new Error(e.error.message);if(!e.data.success)throw new Error("Failed to join space");this.joined=!0}async joinDoc(e){if(!e||(this.joined||await this.connect(),this.joinedDocs.has(e)))return;const s=await this.emitWithAck("space:join-doc",{spaceType:this.spaceType,spaceId:this.projectId,docId:e,docKind:this.docKind},12e3);if("error"in s)throw new Error(s.error.message);if(!s.data.success)throw new Error("Failed to join doc");this.joinedDocs.add(e)}leaveDoc(e){e&&this.joinedDocs.has(e)&&(this.socket.emit("space:leave-doc",{spaceType:this.spaceType,spaceId:this.projectId,docId:e,docKind:this.docKind}),this.joinedDocs.delete(e))}disconnect(){try{if(this.joined){for(const e of Array.from(this.joinedDocs))this.leaveDoc(e);this.socket.emit("space:leave",{spaceType:this.spaceType,spaceId:this.projectId})}}finally{this.joined=!1,this.releaseSocket()}}onDocUpdate(e){const s=t=>{t?.spaceId===this.projectId&&e({docId:String(t.docId),update:p(String(t.update)),timestamp:Number(t.timestamp),editor:t.editor?String(t.editor):void 0})};return this.socket.on("space:broadcast-doc-update",s),()=>this.socket.off("space:broadcast-doc-update",s)}onDocReset(e){const s=t=>{t?.spaceId===this.projectId&&e({docId:String(t.docId),timestamp:Number(t.timestamp),reason:t?.reason?String(t.reason):void 0,actorUserId:t?.actorUserId!=null?String(t.actorUserId):null})};return this.socket.on("space:doc-reset",s),()=>this.socket.off("space:doc-reset",s)}async loadDoc(e,s){await this.joinDoc(e);const t=await this.emitWithAck("space:load-doc",{spaceType:this.spaceType,spaceId:this.projectId,docId:e,docKind:this.docKind,stateVector:s?await u(s):void 0},15e3);if("error"in t){if(t.error.name==="DOC_NOT_FOUND"||t.error.name==="NOT_FOUND")return null;throw new Error(t.error.message)}return{missing:p(t.data.missing),state:p(t.data.state),timestamp:Number(t.data.timestamp)}}async pushDocUpdate(e,s){await this.joinDoc(e);const t=await this.emitWithAck("space:push-doc-update",{spaceType:this.spaceType,spaceId:this.projectId,docId:e,docKind:this.docKind,update:await u(s)},15e3);if("error"in t)throw new Error(t.error.message);return Number(t.data.timestamp)}async joinAwareness(e){const s=await this.emitWithAck("space:join-awareness",{spaceType:this.spaceType,spaceId:this.projectId,docId:e,docKind:this.docKind,clientVersion:"1.0.0"},12e3);if("error"in s)throw new Error(s.error.message);if(!s.data.success)throw new Error("Failed to join awareness")}leaveAwareness(e){this.socket.emit("space:leave-awareness",{spaceType:this.spaceType,spaceId:this.projectId,docId:e,docKind:this.docKind})}onAwarenessCollect(e,s){const t=o=>{o?.spaceId===this.projectId&&String(o?.docId)===e&&s()};return this.socket.on("space:collect-awareness",t),()=>this.socket.off("space:collect-awareness",t)}onAwarenessUpdate(e,s){const t=o=>{o?.spaceId===this.projectId&&String(o?.docId)===e&&s(p(String(o.awarenessUpdate)))};return this.socket.on("space:broadcast-awareness-update",t),()=>this.socket.off("space:broadcast-awareness-update",t)}async broadcastAwareness(e,s){this.socket.emit("space:update-awareness",{spaceType:this.spaceType,spaceId:this.projectId,docId:e,docKind:this.docKind,awarenessUpdate:await u(s)})}requestAwarenesses(e){this.socket.emit("space:load-awarenesses",{spaceType:this.spaceType,spaceId:this.projectId,docId:e,docKind:this.docKind})}}export{j as P};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{y as Ee,j as d,ay as Pe,bK as xt,az as Ne,aA as St,aB as be,aF as Re,bL as wt,aC as L,aE as yt,aD as E,aH as Ct,bM as z,bN as bt,aI as It,aK as Nt,aJ as Tt,aL as Et,aM as Pt,aN as Rt,aO as _t,l as _e,b as G,d as jt}from"./index-
|
|
1
|
+
import{y as Ee,j as d,ay as Pe,bK as xt,az as Ne,aA as St,aB as be,aF as Re,bL as wt,aC as L,aE as yt,aD as E,aH as Ct,bM as z,bN as bt,aI as It,aK as Nt,aJ as Tt,aL as Et,aM as Pt,aN as Rt,aO as _t,l as _e,b as G,d as jt}from"./index-CBNVuWcP.js";import{r as n}from"./plugin-monaco-C8UgLomw.js";import{r as je}from"./plugin-notebook-HbW2K-1c.js";import{C as Mt}from"./chevron-up-C9Qpx4DE.js";/**
|
|
2
2
|
* @license lucide-react v0.511.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"./plugin-monaco-C8UgLomw.js";import{t as ue,w as le,v as fe,x as de,P as c,V as he}from"./index-Gbl53BNp.js";const L=new Map,ee="ds_cli_client_id";let F=null;function Ce(){const t={connected:!1,connect:()=>t,disconnect:()=>t,on:()=>t,off:()=>t,emit:()=>!0};return t}function re(){if(F)return F;let t="";if(typeof window<"u")try{t=window.localStorage.getItem(ee)||""}catch{t=""}if(!t){try{t=crypto.randomUUID()}catch{t=`cli-${Date.now()}-${Math.random().toString(16).slice(2,10)}`}if(typeof window<"u")try{window.localStorage.setItem(ee,t)}catch{}}return F=t,t}function me(t={}){if(!ue())return{socket:Ce(),release:()=>{}};const e=le(),s=`${e}::user`;let r=L.get(s);return r||(r={socket:fe(`${e}/cli`,{path:"/ws/socket.io",autoConnect:!1,transports:["websocket","polling"],auth:f=>{const h=re(),y="cli.v1",N=de.getState().accessToken||(typeof window<"u"?window.localStorage.getItem("ds_access_token"):null);f({token:N||null,client_id:h,protocol_version:y})}}),refCount:0},L.set(s,r)),r.refCount+=1,r.socket.connected||r.socket.connect(),{socket:r.socket,release:()=>{const l=L.get(s);l&&(l.refCount-=1,l.refCount<=0&&(l.socket.disconnect(),L.delete(s)))}}}function Ee(t){return t&&typeof t=="object"&&"payload"in t?t.payload:t}let te=0;function ve(){return te+=1,te}function ne(t,e={}){return{protocol_version:"cli.v1",ts:new Date().toISOString(),payload:t,...e}}const se={[c.DISCONNECTED]:{CONNECT:c.CONNECTING},[c.CONNECTING]:{AUTH_SUCCESS:c.AUTHENTICATING,DISCONNECT:c.DISCONNECTED,CONNECTION_LOST:c.RECONNECTING},[c.AUTHENTICATING]:{AUTH_SUCCESS:c.CONNECTED,AUTH_FAILURE:c.FAILED,CONNECTION_LOST:c.RECONNECTING},[c.CONNECTED]:{DISCONNECT:c.DISCONNECTED,CONNECTION_LOST:c.RECONNECTING,SUSPEND:c.SUSPENDED},[c.RECONNECTING]:{RECONNECT_SUCCESS:c.CONNECTED,MAX_RETRIES_EXCEEDED:c.FAILED,DISCONNECT:c.DISCONNECTED},[c.SUSPENDED]:{RESUME:c.CONNECTING,DISCONNECT:c.DISCONNECTED},[c.FAILED]:{CONNECT:c.CONNECTING,DISCONNECT:c.DISCONNECTED}};class pe{state=c.DISCONNECTED;listeners=new Set;getState(){return this.state}sendEvent(e){const s=se[this.state]?.[e.type];if(!s)return console.warn(`Invalid connection transition: ${this.state} -> ${e.type}`),!1;const r=this.state;return this.state=s,this.notifyListeners(s,e),r!==s&&console.debug(`[CLI] Connection state: ${r} -> ${s} (${e.type})`),!0}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}canSendEvent(e){return!!se[this.state]?.[e]}reset(){this.state=c.DISCONNECTED}notifyListeners(e,s){this.listeners.forEach(r=>r(e,s))}}class Se{metrics={totalConnections:0,successfulConnections:0,failedConnections:0,reconnectionAttempts:0,averageReconnectTime:0,messagesBuffered:0,messagesDropped:0};recordConnection(){this.metrics.totalConnections+=1}recordConnectionSuccess(){this.metrics.successfulConnections+=1}recordConnectionFailure(){this.metrics.failedConnections+=1}recordReconnectionAttempt(e){this.metrics.reconnectionAttempts+=1;const s=this.metrics.reconnectionAttempts;this.metrics.averageReconnectTime=(this.metrics.averageReconnectTime*(s-1)+e)/s}recordMessageBuffered(e=1){this.metrics.messagesBuffered+=e}recordMessageDropped(e=1){this.metrics.messagesDropped+=e}getMetrics(){return{...this.metrics}}}class Ne{buffer=[];maxSize;onOverflow;constructor(e={}){this.maxSize=e.maxSize??1e3,this.onOverflow=e.onOverflow??"drop_oldest"}enqueue(e){if(this.pruneExpired(),this.buffer.length>=this.maxSize)switch(this.onOverflow){case"drop_oldest":{this.buffer.sort((r,l)=>{const f={high:0,normal:1,low:2};return f[l.priority]-f[r.priority]||r.timestamp-l.timestamp}),this.buffer.pop();break}case"drop_newest":return!1;case"reject":throw new Error("Message buffer overflow")}const s={...e,id:crypto.randomUUID(),timestamp:Date.now()};return this.buffer.push(s),!0}flush(){this.pruneExpired();const e=[...this.buffer].sort((s,r)=>{const l={high:0,normal:1,low:2},f=l[s.priority]-l[r.priority];return f!==0?f:s.timestamp-r.timestamp});return this.buffer=[],e}getStatus(){return{size:this.buffer.length,maxSize:this.maxSize,oldestTimestamp:this.buffer.length>0?Math.min(...this.buffer.map(e=>e.timestamp)):null}}clear(){this.buffer=[]}countByPriority(e){return this.buffer.filter(s=>s.priority===e).length}pruneExpired(){const e=Date.now();this.buffer=this.buffer.filter(s=>s.maxAge?e-s.timestamp<s.maxAge:!0)}}const ge={initialDelay:1e3,maxDelay:3e5,maxRetries:30,backoffMultiplier:1.5,jitterFactor:.2};class we{config;retryCount=0;currentTimeout=null;listeners=new Set;constructor(e={}){this.config={...ge,...e}}calculateDelay(){const e=Math.min(this.config.initialDelay*Math.pow(this.config.backoffMultiplier,this.retryCount),this.config.maxDelay),s=e*this.config.jitterFactor*(Math.random()*2-1);return Math.max(0,Math.floor(e+s))}scheduleReconnect(e){if(this.retryCount>=this.config.maxRetries){this.notifyListeners({status:"failed",message:`Max retries reached (${this.config.maxRetries})`});return}const s=this.calculateDelay();this.retryCount+=1,this.notifyListeners({status:"waiting",retryCount:this.retryCount,maxRetries:this.config.maxRetries,nextRetryIn:s}),this.currentTimeout=setTimeout(async()=>{this.notifyListeners({status:"reconnecting",retryCount:this.retryCount});try{if(await e()){this.reset(),this.notifyListeners({status:"connected"});return}}catch(r){console.error("[CLI] Reconnect failed:",r)}this.scheduleReconnect(e)},s)}reset(){this.retryCount=0,this.currentTimeout&&(clearTimeout(this.currentTimeout),this.currentTimeout=null)}cancel(){this.reset(),this.notifyListeners({status:"cancelled"})}retryNow(e){this.cancel(),this.retryCount=0,this.scheduleReconnect(e)}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}getRetryCount(){return this.retryCount}notifyListeners(e){this.listeners.forEach(s=>s(e))}}const ye="CLI server offline. Please ensure the CLI is running.",Te=t=>{const e=t.toLowerCase();return e.includes("cli server")&&(e.includes("not connected")||e.includes("offline"))||e.includes("cli_server_not_connected")||e.includes("cli_server_offline")?ye:t};function ke(t){const{projectId:e,serverId:s,handlers:r}=t,l=a.useRef(re()),f=a.useRef(new we),h=a.useRef(!1),y=a.useRef(new Ne),N=a.useRef(new pe),E=a.useRef(new Se),I=a.useRef(null),_=a.useRef(!1),O=a.useRef(null),b=a.useRef(()=>{}),[P,p]=a.useState(()=>({state:N.current.getState(),bufferedMessages:0,metrics:E.current.getMetrics()})),{socket:n,release:B}=a.useMemo(()=>me(),[]),w=a.useCallback(()=>{p(i=>({...i,metrics:E.current.getMetrics()}))},[]),A=a.useCallback(()=>{const i=y.current.getStatus();p(C=>({...C,bufferedMessages:i.size,metrics:E.current.getMetrics()}))},[]),R=a.useCallback((i,C,S={},u)=>{if(!e||!s)return;const d=ne(C,{project_id:e,server_id:s,client_id:l.current,...S});if(!n.connected){try{y.current.enqueue({type:i,payload:d,priority:u?.priority??"normal",maxAge:u?.maxAge})?E.current.recordMessageBuffered():(E.current.recordMessageDropped(),w(),r?.onError?.("Message buffer full; dropping newest message"))}catch(g){E.current.recordMessageDropped(),w(),r?.onError?.(g instanceof Error?g.message:"Message buffer error")}A();return}n.emit(i,d)},[e,s,n,r,A,w]),M=a.useCallback(()=>{if(!n.connected)return;y.current.flush().forEach(C=>n.emit(C.type,C.payload)),A()},[n,A]),v=a.useCallback(async()=>{if(!e||!s)return!1;if(O.current)return O.current;const i=Date.now(),C=ne({},{project_id:e,server_id:s,client_id:l.current});E.current.recordConnection(),w();const S=new Promise(u=>{n.timeout(3e3).emit("cli:subscribe",C,d=>{if(O.current=null,d){_.current=!1,E.current.recordConnectionFailure(),w();const T=N.current.getState();T===c.AUTHENTICATING&&N.current.canSendEvent("AUTH_FAILURE")&&N.current.sendEvent({type:"AUTH_FAILURE",error:d.message}),T===c.RECONNECTING&&b.current(),p(U=>({...U,lastError:d.message})),u(!1);return}const g=Date.now()-i,m=N.current.getState();m===c.RECONNECTING?N.current.sendEvent({type:"RECONNECT_SUCCESS"}):m===c.AUTHENTICATING&&N.current.sendEvent({type:"AUTH_SUCCESS"}),_.current=!0,E.current.recordConnectionSuccess(),w(),f.current.reset(),h.current=!1,p(T=>({...T,latencyMs:g,lastConnectedAt:Date.now()})),u(!0)})});return O.current=S,S},[e,s,n,w]),H=a.useCallback(async()=>{if(n.connected&&_.current)return!0;if(!n.connected&&!await new Promise(S=>{let u=!1;const d=window.setTimeout(()=>{u||(u=!0,T(),S(!1))},4e3),g=()=>{u||(u=!0,T(),S(!0))},m=()=>{u||(u=!0,T(),S(!1))},T=()=>{window.clearTimeout(d),n.off("connect",g),n.off("connect_error",m)};n.once("connect",g),n.once("connect_error",m),n.connect()}))return!1;const i=await v();return i&&M(),i},[n,v,M]),k=a.useCallback(()=>{h.current||(h.current=!0,f.current.scheduleReconnect(H))},[H]);b.current=k,a.useEffect(()=>{const i=N.current,C=i.subscribe((u,d)=>{p(g=>({...g,state:u,lastError:d.type==="AUTH_FAILURE"?d.error:g.lastError}))}),S=f.current.subscribe(u=>{if(u.status==="waiting"){I.current=null,p(d=>({...d,reconnectAttempts:u.retryCount,nextRetryIn:u.nextRetryIn}));return}if(u.status==="reconnecting"){I.current||(I.current=Date.now()),p(d=>({...d,reconnectAttempts:u.retryCount,nextRetryIn:void 0}));return}if(u.status==="failed"){h.current=!1,E.current.recordConnectionFailure(),w(),i.canSendEvent("MAX_RETRIES_EXCEEDED")&&i.sendEvent({type:"MAX_RETRIES_EXCEEDED"}),p(d=>({...d,lastError:u.message}));return}if(u.status==="connected"){h.current=!1,I.current&&(E.current.recordReconnectionAttempt(Date.now()-I.current),w(),I.current=null),p(d=>({...d,reconnectAttempts:0,nextRetryIn:void 0}));return}u.status==="cancelled"&&(h.current=!1,I.current=null,p(d=>({...d,reconnectAttempts:0,nextRetryIn:void 0})))});return()=>{C(),S()}},[w]),a.useEffect(()=>{if(!e||!s)return;const i=N.current;i.canSendEvent("CONNECT")&&i.sendEvent({type:"CONNECT"});const C=async()=>{const o=i.getState();o===c.CONNECTING&&i.canSendEvent("AUTH_SUCCESS")&&i.sendEvent({type:"AUTH_SUCCESS"}),o!==c.RECONNECTING&&await v()&&M()},S=o=>{_.current=!1,i.canSendEvent("CONNECTION_LOST")&&i.sendEvent({type:"CONNECTION_LOST"}),o&&p(D=>({...D,lastError:`Disconnected: ${o}`})),k()},u=o=>{_.current=!1;const D=o instanceof Error?o.message:"Connection error";p(x=>({...x,lastError:D})),r?.onError?.(D),E.current.recordConnectionFailure(),w(),i.canSendEvent("CONNECTION_LOST")&&i.sendEvent({type:"CONNECTION_LOST"}),k()},d=o=>{r?.onTerminalOutput?.(o)},g=o=>{r?.onStatusUpdate?.(o)},m=o=>{r?.onFileResponse?.(o)},T=o=>{r?.onConfirmRequired?.(o)},U=o=>{r?.onBlocked?.(o)},j=o=>{r?.onSessionCreated?.(o)},z=o=>{r?.onSessionAttached?.(o)},q=o=>{r?.onSessionDetached?.(o)},X=o=>{r?.onSessionClosed?.(o)},V=o=>{r?.onSessionError?.(o)},K=o=>{r?.onMethodStatus?.(o)},Y=o=>{r?.onMethodDone?.(o)},J=o=>{r?.onMethodError?.(o)},Q=o=>{r?.onMethodListResponse?.(o)},W=o=>{r?.onMethodGetResponse?.(o)},Z=o=>{const D=typeof o?.message=="string"&&o.message?o.message:"CLI server error",x=typeof o?.event=="string"&&o.event?` (${o.event})`:"",ae=Te(D);r?.onError?.(`${ae}${x}`)};return n.on("connect",C),n.on("disconnect",S),n.on("connect_error",u),n.on("cli:terminal:output",d),n.on("cli:status:update",g),n.on("cli:file:list:response",m),n.on("cli:file:content:response",m),n.on("cli:file:download:response",m),n.on("cli:file:write:response",m),n.on("cli:file:delete:response",m),n.on("cli:terminal:confirm_required",T),n.on("cli:terminal:blocked",U),n.on("cli:session:created",j),n.on("cli:session:attached",z),n.on("cli:session:detached",q),n.on("cli:session:closed",X),n.on("cli:session:error",V),n.on("cli:method:status",K),n.on("cli:method:done",Y),n.on("cli:method:error",J),n.on("cli:method:list:response",Q),n.on("cli:method:get:response",W),n.on("cli:error",Z),n.connected||n.connect(),()=>{n.off("connect",C),n.off("disconnect",S),n.off("connect_error",u),n.off("cli:terminal:output",d),n.off("cli:status:update",g),n.off("cli:file:list:response",m),n.off("cli:file:content:response",m),n.off("cli:file:download:response",m),n.off("cli:file:write:response",m),n.off("cli:file:delete:response",m),n.off("cli:terminal:confirm_required",T),n.off("cli:terminal:blocked",U),n.off("cli:session:created",j),n.off("cli:session:attached",z),n.off("cli:session:detached",q),n.off("cli:session:closed",X),n.off("cli:session:error",V),n.off("cli:method:status",K),n.off("cli:method:done",Y),n.off("cli:method:error",J),n.off("cli:method:list:response",Q),n.off("cli:method:get:response",W),n.off("cli:error",Z),f.current.cancel(),B()}},[e,s,n,B,v,M,r,k,w]);const oe=a.useCallback(i=>{const C={data:i.data,confirmed:i.confirmed};i.mode&&(C.mode=i.mode),R("cli:terminal:input",C,{session_id:i.sessionId,seq:i.seq,operation_id:i.operationId},{priority:"high"})},[R]),ie=a.useCallback(i=>{R("cli:terminal:resize",{cols:i.cols,rows:i.rows},{session_id:i.sessionId},{priority:"low",maxAge:2e3})},[R]),ce=a.useCallback((i,C,S)=>{R(i,C,S)},[R]);return{socket:n,status:P,emitEnvelope:R,sendTerminalInput:oe,sendTerminalResize:ie,sendFileRequest:ce,unwrapPayload:Ee}}const Ie="6f07d9a4-0e31-4f69-9ad4-b6295b6e4d2e";function _e(t){const e=t.replace(/-/g,""),s=new Uint8Array(16);for(let r=0;r<16;r+=1)s[r]=Number.parseInt(e.slice(r*2,r*2+2),16);return s}function be(t){const e=Array.from(t).map(s=>s.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20,32)}`}function $(t,e){let s=2166136261^e;for(let r=0;r<t.length;r+=1)s^=t.charCodeAt(r),s=Math.imul(s,16777619);return s>>>0}function Re(t){const e=$(t,1).toString(16).padStart(8,"0"),s=$(t,2).toString(16).padStart(8,"0"),r=$(t,3).toString(16).padStart(8,"0"),l=$(t,4).toString(16).padStart(8,"0"),f=`${e}${s}${r}${l}`.slice(0,32);return`${f.slice(0,8)}-${f.slice(8,12)}-5${f.slice(13,16)}-a${f.slice(17,20)}-${f.slice(20,32)}`}async function G(t,e=Ie){const s=_e(e),r=new TextEncoder().encode(t),l=new Uint8Array(s.length+r.length);if(l.set(s,0),l.set(r,s.length),typeof crypto<"u"&&crypto.subtle?.digest){const h=new Uint8Array(await crypto.subtle.digest("SHA-1",l)).slice(0,16);return h[6]=h[6]&15|80,h[8]=h[8]&63|128,be(h)}return Re(`${e}:${t}`)}async function Ue(t,e){return G(`${t}:${e}:default`)}async function Le(t,e,s){return G(`${t}:${e}:${s}`)}async function $e(t,e,s){return G(`${t}:${e}:${s}`)}function De(t){return t?t==="owner"?"owner":t==="admin"?"admin":t==="editor"?"edit":t==="viewer"?"view":"none":"none"}function Oe(t,e){const s=e?.allowTerminalInput??!0,r=e?.allowFileEdit??!0;return{...{view_server_status:t!=="none",view_terminal_output:t!=="none",view_operation_logs:t!=="none",view_files:t!=="none",view_tasks:t!=="none",view_findings:t!=="none"},...{terminal_input:t!=="none"&&t!=="view"&&s,file_upload:t!=="none"&&t!=="view"&&r,file_download:t==="admin"||t==="owner"||t==="edit"&&r,file_edit:t!=="none"&&t!=="view"&&r,file_delete:t!=="none"&&t!=="view"&&r},...{manage_sessions:t==="admin"||t==="owner",manage_permissions:t==="admin"||t==="owner",disconnect_server:t==="admin"||t==="owner",view_all_user_logs:t==="admin"||t==="owner",delete_server:t==="owner"}}}function xe(t){const{projectId:e,serverId:s,readOnly:r}=t,[l,f]=a.useState("none"),[h,y]=a.useState(null),[N,E]=a.useState(!1),[I,_]=a.useState(null);a.useEffect(()=>{if(!e||!s){f("none"),y(null);return}if(r){f("view"),y(null);return}let b=!1;return E(!0),_(null),(async()=>{try{const p=await he(e);if(b)return;const n=De(p?.role);f(n),y(null)}catch{if(b)return;f("none"),y(null),_("Failed to resolve CLI permissions")}finally{b||E(!1)}})(),()=>{b=!0}},[e,r,s]);const O=a.useMemo(()=>Oe(l,h),[l,h]);return{permission:l,granularity:h,capabilities:O,isLoading:N,error:I}}export{ke as a,$e as b,me as c,Ee as d,Ue as e,Le as f,re as g,ve as n,xe as u,ne as w};
|
|
1
|
+
import{r as a}from"./plugin-monaco-C8UgLomw.js";import{t as ue,w as le,v as fe,x as de,P as c,V as he}from"./index-CBNVuWcP.js";const L=new Map,ee="ds_cli_client_id";let F=null;function Ce(){const t={connected:!1,connect:()=>t,disconnect:()=>t,on:()=>t,off:()=>t,emit:()=>!0};return t}function re(){if(F)return F;let t="";if(typeof window<"u")try{t=window.localStorage.getItem(ee)||""}catch{t=""}if(!t){try{t=crypto.randomUUID()}catch{t=`cli-${Date.now()}-${Math.random().toString(16).slice(2,10)}`}if(typeof window<"u")try{window.localStorage.setItem(ee,t)}catch{}}return F=t,t}function me(t={}){if(!ue())return{socket:Ce(),release:()=>{}};const e=le(),s=`${e}::user`;let r=L.get(s);return r||(r={socket:fe(`${e}/cli`,{path:"/ws/socket.io",autoConnect:!1,transports:["websocket","polling"],auth:f=>{const h=re(),y="cli.v1",N=de.getState().accessToken||(typeof window<"u"?window.localStorage.getItem("ds_access_token"):null);f({token:N||null,client_id:h,protocol_version:y})}}),refCount:0},L.set(s,r)),r.refCount+=1,r.socket.connected||r.socket.connect(),{socket:r.socket,release:()=>{const l=L.get(s);l&&(l.refCount-=1,l.refCount<=0&&(l.socket.disconnect(),L.delete(s)))}}}function Ee(t){return t&&typeof t=="object"&&"payload"in t?t.payload:t}let te=0;function ve(){return te+=1,te}function ne(t,e={}){return{protocol_version:"cli.v1",ts:new Date().toISOString(),payload:t,...e}}const se={[c.DISCONNECTED]:{CONNECT:c.CONNECTING},[c.CONNECTING]:{AUTH_SUCCESS:c.AUTHENTICATING,DISCONNECT:c.DISCONNECTED,CONNECTION_LOST:c.RECONNECTING},[c.AUTHENTICATING]:{AUTH_SUCCESS:c.CONNECTED,AUTH_FAILURE:c.FAILED,CONNECTION_LOST:c.RECONNECTING},[c.CONNECTED]:{DISCONNECT:c.DISCONNECTED,CONNECTION_LOST:c.RECONNECTING,SUSPEND:c.SUSPENDED},[c.RECONNECTING]:{RECONNECT_SUCCESS:c.CONNECTED,MAX_RETRIES_EXCEEDED:c.FAILED,DISCONNECT:c.DISCONNECTED},[c.SUSPENDED]:{RESUME:c.CONNECTING,DISCONNECT:c.DISCONNECTED},[c.FAILED]:{CONNECT:c.CONNECTING,DISCONNECT:c.DISCONNECTED}};class pe{state=c.DISCONNECTED;listeners=new Set;getState(){return this.state}sendEvent(e){const s=se[this.state]?.[e.type];if(!s)return console.warn(`Invalid connection transition: ${this.state} -> ${e.type}`),!1;const r=this.state;return this.state=s,this.notifyListeners(s,e),r!==s&&console.debug(`[CLI] Connection state: ${r} -> ${s} (${e.type})`),!0}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}canSendEvent(e){return!!se[this.state]?.[e]}reset(){this.state=c.DISCONNECTED}notifyListeners(e,s){this.listeners.forEach(r=>r(e,s))}}class Se{metrics={totalConnections:0,successfulConnections:0,failedConnections:0,reconnectionAttempts:0,averageReconnectTime:0,messagesBuffered:0,messagesDropped:0};recordConnection(){this.metrics.totalConnections+=1}recordConnectionSuccess(){this.metrics.successfulConnections+=1}recordConnectionFailure(){this.metrics.failedConnections+=1}recordReconnectionAttempt(e){this.metrics.reconnectionAttempts+=1;const s=this.metrics.reconnectionAttempts;this.metrics.averageReconnectTime=(this.metrics.averageReconnectTime*(s-1)+e)/s}recordMessageBuffered(e=1){this.metrics.messagesBuffered+=e}recordMessageDropped(e=1){this.metrics.messagesDropped+=e}getMetrics(){return{...this.metrics}}}class Ne{buffer=[];maxSize;onOverflow;constructor(e={}){this.maxSize=e.maxSize??1e3,this.onOverflow=e.onOverflow??"drop_oldest"}enqueue(e){if(this.pruneExpired(),this.buffer.length>=this.maxSize)switch(this.onOverflow){case"drop_oldest":{this.buffer.sort((r,l)=>{const f={high:0,normal:1,low:2};return f[l.priority]-f[r.priority]||r.timestamp-l.timestamp}),this.buffer.pop();break}case"drop_newest":return!1;case"reject":throw new Error("Message buffer overflow")}const s={...e,id:crypto.randomUUID(),timestamp:Date.now()};return this.buffer.push(s),!0}flush(){this.pruneExpired();const e=[...this.buffer].sort((s,r)=>{const l={high:0,normal:1,low:2},f=l[s.priority]-l[r.priority];return f!==0?f:s.timestamp-r.timestamp});return this.buffer=[],e}getStatus(){return{size:this.buffer.length,maxSize:this.maxSize,oldestTimestamp:this.buffer.length>0?Math.min(...this.buffer.map(e=>e.timestamp)):null}}clear(){this.buffer=[]}countByPriority(e){return this.buffer.filter(s=>s.priority===e).length}pruneExpired(){const e=Date.now();this.buffer=this.buffer.filter(s=>s.maxAge?e-s.timestamp<s.maxAge:!0)}}const ge={initialDelay:1e3,maxDelay:3e5,maxRetries:30,backoffMultiplier:1.5,jitterFactor:.2};class we{config;retryCount=0;currentTimeout=null;listeners=new Set;constructor(e={}){this.config={...ge,...e}}calculateDelay(){const e=Math.min(this.config.initialDelay*Math.pow(this.config.backoffMultiplier,this.retryCount),this.config.maxDelay),s=e*this.config.jitterFactor*(Math.random()*2-1);return Math.max(0,Math.floor(e+s))}scheduleReconnect(e){if(this.retryCount>=this.config.maxRetries){this.notifyListeners({status:"failed",message:`Max retries reached (${this.config.maxRetries})`});return}const s=this.calculateDelay();this.retryCount+=1,this.notifyListeners({status:"waiting",retryCount:this.retryCount,maxRetries:this.config.maxRetries,nextRetryIn:s}),this.currentTimeout=setTimeout(async()=>{this.notifyListeners({status:"reconnecting",retryCount:this.retryCount});try{if(await e()){this.reset(),this.notifyListeners({status:"connected"});return}}catch(r){console.error("[CLI] Reconnect failed:",r)}this.scheduleReconnect(e)},s)}reset(){this.retryCount=0,this.currentTimeout&&(clearTimeout(this.currentTimeout),this.currentTimeout=null)}cancel(){this.reset(),this.notifyListeners({status:"cancelled"})}retryNow(e){this.cancel(),this.retryCount=0,this.scheduleReconnect(e)}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}getRetryCount(){return this.retryCount}notifyListeners(e){this.listeners.forEach(s=>s(e))}}const ye="CLI server offline. Please ensure the CLI is running.",Te=t=>{const e=t.toLowerCase();return e.includes("cli server")&&(e.includes("not connected")||e.includes("offline"))||e.includes("cli_server_not_connected")||e.includes("cli_server_offline")?ye:t};function ke(t){const{projectId:e,serverId:s,handlers:r}=t,l=a.useRef(re()),f=a.useRef(new we),h=a.useRef(!1),y=a.useRef(new Ne),N=a.useRef(new pe),E=a.useRef(new Se),I=a.useRef(null),_=a.useRef(!1),O=a.useRef(null),b=a.useRef(()=>{}),[P,p]=a.useState(()=>({state:N.current.getState(),bufferedMessages:0,metrics:E.current.getMetrics()})),{socket:n,release:B}=a.useMemo(()=>me(),[]),w=a.useCallback(()=>{p(i=>({...i,metrics:E.current.getMetrics()}))},[]),A=a.useCallback(()=>{const i=y.current.getStatus();p(C=>({...C,bufferedMessages:i.size,metrics:E.current.getMetrics()}))},[]),R=a.useCallback((i,C,S={},u)=>{if(!e||!s)return;const d=ne(C,{project_id:e,server_id:s,client_id:l.current,...S});if(!n.connected){try{y.current.enqueue({type:i,payload:d,priority:u?.priority??"normal",maxAge:u?.maxAge})?E.current.recordMessageBuffered():(E.current.recordMessageDropped(),w(),r?.onError?.("Message buffer full; dropping newest message"))}catch(g){E.current.recordMessageDropped(),w(),r?.onError?.(g instanceof Error?g.message:"Message buffer error")}A();return}n.emit(i,d)},[e,s,n,r,A,w]),M=a.useCallback(()=>{if(!n.connected)return;y.current.flush().forEach(C=>n.emit(C.type,C.payload)),A()},[n,A]),v=a.useCallback(async()=>{if(!e||!s)return!1;if(O.current)return O.current;const i=Date.now(),C=ne({},{project_id:e,server_id:s,client_id:l.current});E.current.recordConnection(),w();const S=new Promise(u=>{n.timeout(3e3).emit("cli:subscribe",C,d=>{if(O.current=null,d){_.current=!1,E.current.recordConnectionFailure(),w();const T=N.current.getState();T===c.AUTHENTICATING&&N.current.canSendEvent("AUTH_FAILURE")&&N.current.sendEvent({type:"AUTH_FAILURE",error:d.message}),T===c.RECONNECTING&&b.current(),p(U=>({...U,lastError:d.message})),u(!1);return}const g=Date.now()-i,m=N.current.getState();m===c.RECONNECTING?N.current.sendEvent({type:"RECONNECT_SUCCESS"}):m===c.AUTHENTICATING&&N.current.sendEvent({type:"AUTH_SUCCESS"}),_.current=!0,E.current.recordConnectionSuccess(),w(),f.current.reset(),h.current=!1,p(T=>({...T,latencyMs:g,lastConnectedAt:Date.now()})),u(!0)})});return O.current=S,S},[e,s,n,w]),H=a.useCallback(async()=>{if(n.connected&&_.current)return!0;if(!n.connected&&!await new Promise(S=>{let u=!1;const d=window.setTimeout(()=>{u||(u=!0,T(),S(!1))},4e3),g=()=>{u||(u=!0,T(),S(!0))},m=()=>{u||(u=!0,T(),S(!1))},T=()=>{window.clearTimeout(d),n.off("connect",g),n.off("connect_error",m)};n.once("connect",g),n.once("connect_error",m),n.connect()}))return!1;const i=await v();return i&&M(),i},[n,v,M]),k=a.useCallback(()=>{h.current||(h.current=!0,f.current.scheduleReconnect(H))},[H]);b.current=k,a.useEffect(()=>{const i=N.current,C=i.subscribe((u,d)=>{p(g=>({...g,state:u,lastError:d.type==="AUTH_FAILURE"?d.error:g.lastError}))}),S=f.current.subscribe(u=>{if(u.status==="waiting"){I.current=null,p(d=>({...d,reconnectAttempts:u.retryCount,nextRetryIn:u.nextRetryIn}));return}if(u.status==="reconnecting"){I.current||(I.current=Date.now()),p(d=>({...d,reconnectAttempts:u.retryCount,nextRetryIn:void 0}));return}if(u.status==="failed"){h.current=!1,E.current.recordConnectionFailure(),w(),i.canSendEvent("MAX_RETRIES_EXCEEDED")&&i.sendEvent({type:"MAX_RETRIES_EXCEEDED"}),p(d=>({...d,lastError:u.message}));return}if(u.status==="connected"){h.current=!1,I.current&&(E.current.recordReconnectionAttempt(Date.now()-I.current),w(),I.current=null),p(d=>({...d,reconnectAttempts:0,nextRetryIn:void 0}));return}u.status==="cancelled"&&(h.current=!1,I.current=null,p(d=>({...d,reconnectAttempts:0,nextRetryIn:void 0})))});return()=>{C(),S()}},[w]),a.useEffect(()=>{if(!e||!s)return;const i=N.current;i.canSendEvent("CONNECT")&&i.sendEvent({type:"CONNECT"});const C=async()=>{const o=i.getState();o===c.CONNECTING&&i.canSendEvent("AUTH_SUCCESS")&&i.sendEvent({type:"AUTH_SUCCESS"}),o!==c.RECONNECTING&&await v()&&M()},S=o=>{_.current=!1,i.canSendEvent("CONNECTION_LOST")&&i.sendEvent({type:"CONNECTION_LOST"}),o&&p(D=>({...D,lastError:`Disconnected: ${o}`})),k()},u=o=>{_.current=!1;const D=o instanceof Error?o.message:"Connection error";p(x=>({...x,lastError:D})),r?.onError?.(D),E.current.recordConnectionFailure(),w(),i.canSendEvent("CONNECTION_LOST")&&i.sendEvent({type:"CONNECTION_LOST"}),k()},d=o=>{r?.onTerminalOutput?.(o)},g=o=>{r?.onStatusUpdate?.(o)},m=o=>{r?.onFileResponse?.(o)},T=o=>{r?.onConfirmRequired?.(o)},U=o=>{r?.onBlocked?.(o)},j=o=>{r?.onSessionCreated?.(o)},z=o=>{r?.onSessionAttached?.(o)},q=o=>{r?.onSessionDetached?.(o)},X=o=>{r?.onSessionClosed?.(o)},V=o=>{r?.onSessionError?.(o)},K=o=>{r?.onMethodStatus?.(o)},Y=o=>{r?.onMethodDone?.(o)},J=o=>{r?.onMethodError?.(o)},Q=o=>{r?.onMethodListResponse?.(o)},W=o=>{r?.onMethodGetResponse?.(o)},Z=o=>{const D=typeof o?.message=="string"&&o.message?o.message:"CLI server error",x=typeof o?.event=="string"&&o.event?` (${o.event})`:"",ae=Te(D);r?.onError?.(`${ae}${x}`)};return n.on("connect",C),n.on("disconnect",S),n.on("connect_error",u),n.on("cli:terminal:output",d),n.on("cli:status:update",g),n.on("cli:file:list:response",m),n.on("cli:file:content:response",m),n.on("cli:file:download:response",m),n.on("cli:file:write:response",m),n.on("cli:file:delete:response",m),n.on("cli:terminal:confirm_required",T),n.on("cli:terminal:blocked",U),n.on("cli:session:created",j),n.on("cli:session:attached",z),n.on("cli:session:detached",q),n.on("cli:session:closed",X),n.on("cli:session:error",V),n.on("cli:method:status",K),n.on("cli:method:done",Y),n.on("cli:method:error",J),n.on("cli:method:list:response",Q),n.on("cli:method:get:response",W),n.on("cli:error",Z),n.connected||n.connect(),()=>{n.off("connect",C),n.off("disconnect",S),n.off("connect_error",u),n.off("cli:terminal:output",d),n.off("cli:status:update",g),n.off("cli:file:list:response",m),n.off("cli:file:content:response",m),n.off("cli:file:download:response",m),n.off("cli:file:write:response",m),n.off("cli:file:delete:response",m),n.off("cli:terminal:confirm_required",T),n.off("cli:terminal:blocked",U),n.off("cli:session:created",j),n.off("cli:session:attached",z),n.off("cli:session:detached",q),n.off("cli:session:closed",X),n.off("cli:session:error",V),n.off("cli:method:status",K),n.off("cli:method:done",Y),n.off("cli:method:error",J),n.off("cli:method:list:response",Q),n.off("cli:method:get:response",W),n.off("cli:error",Z),f.current.cancel(),B()}},[e,s,n,B,v,M,r,k,w]);const oe=a.useCallback(i=>{const C={data:i.data,confirmed:i.confirmed};i.mode&&(C.mode=i.mode),R("cli:terminal:input",C,{session_id:i.sessionId,seq:i.seq,operation_id:i.operationId},{priority:"high"})},[R]),ie=a.useCallback(i=>{R("cli:terminal:resize",{cols:i.cols,rows:i.rows},{session_id:i.sessionId},{priority:"low",maxAge:2e3})},[R]),ce=a.useCallback((i,C,S)=>{R(i,C,S)},[R]);return{socket:n,status:P,emitEnvelope:R,sendTerminalInput:oe,sendTerminalResize:ie,sendFileRequest:ce,unwrapPayload:Ee}}const Ie="6f07d9a4-0e31-4f69-9ad4-b6295b6e4d2e";function _e(t){const e=t.replace(/-/g,""),s=new Uint8Array(16);for(let r=0;r<16;r+=1)s[r]=Number.parseInt(e.slice(r*2,r*2+2),16);return s}function be(t){const e=Array.from(t).map(s=>s.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20,32)}`}function $(t,e){let s=2166136261^e;for(let r=0;r<t.length;r+=1)s^=t.charCodeAt(r),s=Math.imul(s,16777619);return s>>>0}function Re(t){const e=$(t,1).toString(16).padStart(8,"0"),s=$(t,2).toString(16).padStart(8,"0"),r=$(t,3).toString(16).padStart(8,"0"),l=$(t,4).toString(16).padStart(8,"0"),f=`${e}${s}${r}${l}`.slice(0,32);return`${f.slice(0,8)}-${f.slice(8,12)}-5${f.slice(13,16)}-a${f.slice(17,20)}-${f.slice(20,32)}`}async function G(t,e=Ie){const s=_e(e),r=new TextEncoder().encode(t),l=new Uint8Array(s.length+r.length);if(l.set(s,0),l.set(r,s.length),typeof crypto<"u"&&crypto.subtle?.digest){const h=new Uint8Array(await crypto.subtle.digest("SHA-1",l)).slice(0,16);return h[6]=h[6]&15|80,h[8]=h[8]&63|128,be(h)}return Re(`${e}:${t}`)}async function Ue(t,e){return G(`${t}:${e}:default`)}async function Le(t,e,s){return G(`${t}:${e}:${s}`)}async function $e(t,e,s){return G(`${t}:${e}:${s}`)}function De(t){return t?t==="owner"?"owner":t==="admin"?"admin":t==="editor"?"edit":t==="viewer"?"view":"none":"none"}function Oe(t,e){const s=e?.allowTerminalInput??!0,r=e?.allowFileEdit??!0;return{...{view_server_status:t!=="none",view_terminal_output:t!=="none",view_operation_logs:t!=="none",view_files:t!=="none",view_tasks:t!=="none",view_findings:t!=="none"},...{terminal_input:t!=="none"&&t!=="view"&&s,file_upload:t!=="none"&&t!=="view"&&r,file_download:t==="admin"||t==="owner"||t==="edit"&&r,file_edit:t!=="none"&&t!=="view"&&r,file_delete:t!=="none"&&t!=="view"&&r},...{manage_sessions:t==="admin"||t==="owner",manage_permissions:t==="admin"||t==="owner",disconnect_server:t==="admin"||t==="owner",view_all_user_logs:t==="admin"||t==="owner",delete_server:t==="owner"}}}function xe(t){const{projectId:e,serverId:s,readOnly:r}=t,[l,f]=a.useState("none"),[h,y]=a.useState(null),[N,E]=a.useState(!1),[I,_]=a.useState(null);a.useEffect(()=>{if(!e||!s){f("none"),y(null);return}if(r){f("view"),y(null);return}let b=!1;return E(!0),_(null),(async()=>{try{const p=await he(e);if(b)return;const n=De(p?.role);f(n),y(null)}catch{if(b)return;f("none"),y(null),_("Failed to resolve CLI permissions")}finally{b||E(!1)}})(),()=>{b=!0}},[e,r,s]);const O=a.useMemo(()=>Oe(l,h),[l,h]);return{permission:l,granularity:h,capabilities:O,isLoading:N,error:I}}export{ke as a,$e as b,me as c,Ee as d,Ue as e,Le as f,re as g,ve as n,xe as u,ne as w};
|
package/src/ui/dist/index.html
CHANGED
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
<link rel="shortcut icon" href="/ui/logo-small.png" />
|
|
13
13
|
<link rel="apple-touch-icon" href="/ui/logo-small.png" />
|
|
14
14
|
<link rel="stylesheet" href="/ui/assets/fonts/ds-fonts.css" />
|
|
15
|
-
<script type="module" crossorigin src="/ui/assets/index-
|
|
15
|
+
<script type="module" crossorigin src="/ui/assets/index-CBNVuWcP.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/ui/assets/plugin-terminal-MXFIPun8.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/ui/assets/plugin-monaco-C8UgLomw.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/ui/assets/plugin-notebook-HbW2K-1c.js">
|
|
19
|
-
<link rel="stylesheet" crossorigin href="/ui/assets/index-
|
|
19
|
+
<link rel="stylesheet" crossorigin href="/ui/assets/index-BpV6lusQ.css">
|
|
20
20
|
</head>
|
|
21
21
|
<body>
|
|
22
22
|
<noscript>DeepScientist Copilot requires JavaScript.</noscript>
|