@kaitranntt/ccs 7.50.0-dev.1 → 7.50.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/api/services/profile-writer.d.ts +1 -1
- package/dist/api/services/profile-writer.d.ts.map +1 -1
- package/dist/api/services/profile-writer.js +18 -5
- package/dist/api/services/profile-writer.js.map +1 -1
- package/dist/ccs.js +46 -8
- package/dist/ccs.js.map +1 -1
- package/dist/targets/droid-adapter.d.ts +1 -1
- package/dist/targets/droid-adapter.d.ts.map +1 -1
- package/dist/targets/droid-adapter.js +16 -4
- package/dist/targets/droid-adapter.js.map +1 -1
- package/dist/targets/droid-config-manager.d.ts +9 -1
- package/dist/targets/droid-config-manager.d.ts.map +1 -1
- package/dist/targets/droid-config-manager.js +131 -3
- package/dist/targets/droid-config-manager.js.map +1 -1
- package/dist/targets/droid-provider.d.ts +40 -0
- package/dist/targets/droid-provider.d.ts.map +1 -0
- package/dist/targets/droid-provider.js +140 -0
- package/dist/targets/droid-provider.js.map +1 -0
- package/dist/targets/droid-reasoning-runtime.d.ts +14 -0
- package/dist/targets/droid-reasoning-runtime.d.ts.map +1 -0
- package/dist/targets/droid-reasoning-runtime.js +42 -0
- package/dist/targets/droid-reasoning-runtime.js.map +1 -0
- package/dist/targets/index.d.ts +2 -0
- package/dist/targets/index.d.ts.map +1 -1
- package/dist/targets/index.js +4 -1
- package/dist/targets/index.js.map +1 -1
- package/dist/targets/target-adapter.d.ts +6 -0
- package/dist/targets/target-adapter.d.ts.map +1 -1
- package/dist/ui/assets/accounts-B3RlymZc.js +1 -0
- package/dist/ui/assets/{alert-dialog-DmrIcJav.js → alert-dialog-CuEMPUz1.js} +1 -1
- package/dist/ui/assets/api-B2ICvWzi.js +1 -0
- package/dist/ui/assets/{auth-section-CP_2r8oJ.js → auth-section-47vsG_g9.js} +1 -1
- package/dist/ui/assets/{backups-section-jwtuA5Ay.js → backups-section-D-sat7Ti.js} +1 -1
- package/dist/ui/assets/{checkbox-CNqHZx7Z.js → checkbox-C-12mTDT.js} +1 -1
- package/dist/ui/assets/{cliproxy-CtO9BwgG.js → cliproxy-CAR-zTil.js} +1 -1
- package/dist/ui/assets/{cliproxy-control-panel--WUVyBIk.js → cliproxy-control-panel-3uthxEI-.js} +1 -1
- package/dist/ui/assets/{confirm-dialog-CQNxkz9X.js → confirm-dialog-BfiBvMqW.js} +1 -1
- package/dist/ui/assets/{copilot-DLxxmnsW.js → copilot-Dz0B1ZUz.js} +1 -1
- package/dist/ui/assets/{cursor-YRIza7sP.js → cursor-DdPXjHsr.js} +1 -1
- package/dist/ui/assets/droid-DE-zbt4u.js +2 -0
- package/dist/ui/assets/globalenv-section-BKbOddIv.js +1 -0
- package/dist/ui/assets/{health-BWPd6F4h.js → health-Bu6uaf__.js} +1 -1
- package/dist/ui/assets/icons-ErRLeJ3U.js +1 -0
- package/dist/ui/assets/index-CjJDhkhP.css +1 -0
- package/dist/ui/assets/{index-D244tv89.js → index-Cl-418Sf.js} +1 -1
- package/dist/ui/assets/{index-BlldLmNl.js → index-D1DFI7Lj.js} +1 -1
- package/dist/ui/assets/{index-BZdHAol5.js → index-DNyQOJ27.js} +1 -1
- package/dist/ui/assets/index-Dzby9K4O.js +1 -0
- package/dist/ui/assets/{index-PWMOllOf.js → index-zgEA-GkK.js} +11 -11
- package/dist/ui/assets/{proxy-status-widget-MlyNgoPh.js → proxy-status-widget-BtL-jVdm.js} +1 -1
- package/dist/ui/assets/{separator-OcJLDgYQ.js → separator-sNDYgSUT.js} +1 -1
- package/dist/ui/assets/{shared-LxAdbm4g.js → shared-qWuCxx8B.js} +1 -1
- package/dist/ui/assets/{switch-s8pp-m8L.js → switch-BdRPtxoo.js} +1 -1
- package/dist/ui/assets/{updates-BQRhDVbP.js → updates-BIpeiM6l.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/web-server/routes/droid-routes.d.ts +3 -0
- package/dist/web-server/routes/droid-routes.d.ts.map +1 -0
- package/dist/web-server/routes/droid-routes.js +61 -0
- package/dist/web-server/routes/droid-routes.js.map +1 -0
- package/dist/web-server/routes/index.d.ts.map +1 -1
- package/dist/web-server/routes/index.js +3 -0
- package/dist/web-server/routes/index.js.map +1 -1
- package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
- package/dist/web-server/routes/profile-routes.js +29 -3
- package/dist/web-server/routes/profile-routes.js.map +1 -1
- package/dist/web-server/routes/route-helpers.d.ts +2 -1
- package/dist/web-server/routes/route-helpers.d.ts.map +1 -1
- package/dist/web-server/routes/route-helpers.js +20 -1
- package/dist/web-server/routes/route-helpers.js.map +1 -1
- package/dist/web-server/services/compatible-cli-docs-registry.d.ts +23 -0
- package/dist/web-server/services/compatible-cli-docs-registry.d.ts.map +1 -0
- package/dist/web-server/services/compatible-cli-docs-registry.js +81 -0
- package/dist/web-server/services/compatible-cli-docs-registry.js.map +1 -0
- package/dist/web-server/services/compatible-cli-json-file-service.d.ts +41 -0
- package/dist/web-server/services/compatible-cli-json-file-service.d.ts.map +1 -0
- package/dist/web-server/services/compatible-cli-json-file-service.js +205 -0
- package/dist/web-server/services/compatible-cli-json-file-service.js.map +1 -0
- package/dist/web-server/services/compatible-cli-types.d.ts +82 -0
- package/dist/web-server/services/compatible-cli-types.d.ts.map +1 -0
- package/dist/web-server/services/compatible-cli-types.js +3 -0
- package/dist/web-server/services/compatible-cli-types.js.map +1 -0
- package/dist/web-server/services/droid-dashboard-service.d.ts +29 -0
- package/dist/web-server/services/droid-dashboard-service.d.ts.map +1 -0
- package/dist/web-server/services/droid-dashboard-service.js +238 -0
- package/dist/web-server/services/droid-dashboard-service.js.map +1 -0
- package/package.json +1 -1
- package/dist/ui/assets/accounts-BKK-Lc16.js +0 -1
- package/dist/ui/assets/api-DzTwRtww.js +0 -1
- package/dist/ui/assets/globalenv-section-vUSIK5rf.js +0 -1
- package/dist/ui/assets/icons-Dk2sL3Mr.js +0 -1
- package/dist/ui/assets/index-B9dJZNls.js +0 -1
- package/dist/ui/assets/index-DEDy1J8t.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-DIWAxjEp.js";import{r as y}from"./react-vendor-CNOkPC89.js";import{b9 as X,aL as Y,ba as Z,bb as _,bc as ee,bd as se,be as te,c as d,B as E,aw as ae,K as ne,N as re,q as oe,r as ie,s as le,t as ce,v as de,b as T,T as xe,o as me,p as ue,W as he}from"./index-PWMOllOf.js";import{A as ge,a as pe,b as fe,c as be,d as je,e as ye,f as Ne,g as we}from"./alert-dialog-DmrIcJav.js";import{u as L,a as ve,b as Ce,e as Se}from"./tanstack-Hn82hibe.js";import{t as V}from"./notifications-B2HqRBj7.js";import{a2 as ke,A as Pe,R as f,aI as Ve,aJ as Ae,aK as Te,X as De,S as Ie,aL as Ue,aM as $e,U as Ee,p as qe,j as Le,a1 as Re,ao as Me,T as q,av as Fe}from"./icons-Dk2sL3Mr.js";async function Ke(){const s=await fetch("/api/cliproxy/sync/status");if(!s.ok){let n="Failed to fetch sync status";try{const t=await s.json();n=t.error||t.message||n}catch{}throw new Error(n)}return s.json()}async function Be(){const s=new AbortController,n=setTimeout(()=>s.abort(),3e4);try{const t=await fetch("/api/cliproxy/sync",{method:"POST",headers:{"Content-Type":"application/json"},signal:s.signal});if(!t.ok){let a="Sync failed";try{const r=await t.json();a=r.error||r.message||a}catch{}throw new Error(a)}return t.json()}catch(t){throw t instanceof Error&&t.name==="AbortError"?new Error("Sync request timed out after 30 seconds"):t}finally{clearTimeout(n)}}function Qe(){return L({queryKey:["cliproxy-sync-status"],queryFn:Ke,refetchInterval:3e4,retry:1,staleTime:1e4})}function ze(){const s=ve();return Ce({mutationFn:Be,onSuccess:n=>{s.invalidateQueries({queryKey:["cliproxy-sync-status"]}),s.invalidateQueries({queryKey:["cliproxy-sync-preview"]}),n.syncedCount===0?V.info("No profiles to sync"):V.success(`Synced ${n.syncedCount} profile${n.syncedCount===1?"":"s"} to CLIProxy`)},onError:n=>{V.error(`Sync failed: ${n.message}`)}})}function A(s,n){const t=s.replace(/-\d+$/,"").split(".").map(Number),a=n.replace(/-\d+$/,"").split(".").map(Number);for(let r=0;r<3;r++){if((t[r]||0)>(a[r]||0))return!0;if((t[r]||0)<(a[r]||0))return!1}return!1}function Oe(s){if(!s)return"";const n=new Date(s).getTime(),a=Date.now()-n,r=Math.floor(a/(1e3*60*60)),i=Math.floor(a%(1e3*60*60)/(1e3*60));return r>0?`${r}h ${i}m`:`${i}m`}function He(s){if(!s)return"";const n=Date.now()-s,t=Math.floor(n/(1e3*60)),a=Math.floor(n/(1e3*60*60));return t<1?"just now":t<60?`${t}m ago`:`${a}h ago`}function N({icon:s,tooltip:n,onClick:t,disabled:a,isPending:r,className:i,variant:l="ghost"}){return e.jsxs(xe,{children:[e.jsx(me,{asChild:!0,children:e.jsx(T,{variant:l==="destructive-ghost"?"ghost":l,size:"sm",className:d("h-7 w-7 p-0",l==="destructive-ghost"&&"hover:bg-destructive/10 hover:text-destructive hover:border-destructive/30",i),onClick:t,disabled:a,children:r?e.jsx(f,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(s,{className:"w-3.5 h-3.5"})})}),e.jsx(ue,{side:"bottom",className:"text-xs",children:n})]})}function es(){const{data:s,isLoading:n}=X(),{data:t}=Y(),{data:a,isLoading:r}=Z(),i=_(),l=ee(),w=se(),u=te(),{data:R}=Qe(),{mutate:M,isPending:v}=ze(),[h,D]=y.useState(!1),[g,F]=y.useState(""),[K,b]=y.useState(!1),[C,S]=y.useState(null),{data:B}=L({queryKey:["cliproxy-server-config"],queryFn:()=>he.cliproxyServer.get(),staleTime:3e4}),Q=Se({mutationKey:["update-backend"]})>0,x=B?.remote,I=x?.enabled&&x?.host,p=s?.running??!1,k=i.isPending||l.isPending||w.isPending||u.isPending||Q||v,z=t?.hasUpdate??!1,m=t?.isStable===!1,U=t?.currentVersion,j=R?.configured??!1,O=j?"Sync Ready":"No Config",P=m?t?.maxStableVersion||a?.latestStable:t?.latestVersion,$=o=>{if(!o)return;const c=a?.maxStableVersion||"6.6.80";if(A(o,c)){S(o),b(!0);return}u.mutate({version:o})},H=()=>{C&&u.mutate({version:C,force:!0}),b(!1),S(null)},W=()=>{b(!1),S(null)},G=I?(()=>{const o=x.protocol||"http",c=x.port||(o==="https"?443:80);return o==="https"&&c===443||o==="http"&&c===80?x.host:`${x.host}:${c}`})():null;return I?e.jsxs("div",{className:d("rounded-lg border p-3 transition-colors","border-blue-500/30 bg-blue-500/5"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ke,{className:"w-4 h-4 text-blue-500"}),e.jsx("span",{className:"text-sm font-medium",children:"Remote Proxy"}),e.jsx(E,{variant:"secondary",className:"text-[10px] h-4 px-1.5 bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",children:"Active"})]}),e.jsx(Pe,{className:"w-3 h-3 text-blue-600"})]}),e.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:[e.jsx("div",{className:"flex items-center gap-1 mb-1",children:e.jsx("span",{className:"font-mono",children:G})}),e.jsx("p",{className:"text-[10px] text-muted-foreground/70 leading-tight",children:"Traffic auto-routed to remote server"})]})]}):e.jsx(ae,{delayDuration:300,children:e.jsxs("div",{className:d("rounded-lg border p-3 transition-colors",p?"border-green-500/30 bg-green-500/5":"border-muted bg-muted/30"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:d("w-2 h-2 rounded-full",p?"bg-green-500 animate-pulse":"bg-muted-foreground/30")}),e.jsx("span",{className:"text-sm font-medium",children:t?.backendLabel??"CLIProxy"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[n?e.jsx(f,{className:"w-3 h-3 animate-spin text-muted-foreground"}):p?e.jsxs(e.Fragment,{children:[e.jsx(N,{icon:v?f:Ve,tooltip:"Sync profiles to CLIProxy",onClick:()=>M(),disabled:!j||k,isPending:v}),e.jsx(N,{icon:Ae,tooltip:"Restart",onClick:()=>w.mutate(),disabled:k,isPending:w.isPending}),e.jsx(N,{icon:Te,tooltip:"Stop",onClick:()=>l.mutate(),disabled:k,isPending:l.isPending,variant:"destructive-ghost"})]}):null,e.jsx(N,{icon:h?De:Ie,tooltip:h?"Close":"Version settings",onClick:()=>D(!h),className:h?"bg-muted":void 0})]})]}),U&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[e.jsxs("span",{className:d("text-xs font-mono text-muted-foreground",m&&"text-amber-600 dark:text-amber-400"),children:["v",U]}),(z||m)&&P&&e.jsxs(E,{variant:"secondary",className:d("text-[10px] h-4 px-1.5 gap-0.5 cursor-pointer transition-colors",m?"bg-amber-100 text-amber-700 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:hover:bg-amber-900/50":"bg-green-100 text-green-700 hover:bg-green-200 dark:bg-green-900/30 dark:text-green-400 dark:hover:bg-green-900/50"),onClick:()=>$(P),title:`Click to ${m?"downgrade":"update"}`,children:[m?e.jsx(Ue,{className:"w-2.5 h-2.5"}):e.jsx($e,{className:"w-2.5 h-2.5"}),P]})]}),p&&s&&e.jsxs("div",{className:"mt-2 flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:["Port ",s.port]}),s.sessionCount!==void 0&&s.sessionCount>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ee,{className:"w-3 h-3"}),s.sessionCount," session",s.sessionCount!==1?"s":""]}),s.startedAt&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(qe,{className:"w-3 h-3"}),Oe(s.startedAt)]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-xs",children:[j?e.jsx(Le,{className:"w-3 h-3 text-green-600 dark:text-green-400"}):e.jsx(Re,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:d("text-xs",j?"text-green-600 dark:text-green-400":"text-muted-foreground"),children:O})]}),e.jsx(ne,{open:h,onOpenChange:D,children:e.jsxs(re,{className:"mt-3 pt-3 border-t border-muted",children:[e.jsx("h4",{className:"text-xs font-medium text-muted-foreground mb-3",children:"Version Management"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(oe,{value:g,onValueChange:F,disabled:r,children:[e.jsx(ie,{className:"h-8 text-xs flex-1",children:e.jsx(le,{placeholder:"Select version to install..."})}),e.jsx(ce,{children:a?.versions.slice(0,20).map(o=>{const c=a?.maxStableVersion&&A(o,a.maxStableVersion);return e.jsx(de,{value:o,className:"text-xs",children:e.jsxs("span",{className:"flex items-center gap-2",children:["v",o,o===a.latestStable&&e.jsx("span",{className:"text-green-600 dark:text-green-400",children:"(stable)"}),c&&e.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:"⚠"})]})},o)})})]}),e.jsxs(T,{variant:"outline",size:"sm",className:"h-8 text-xs gap-1.5 px-3",onClick:()=>$(g),disabled:u.isPending||!g,children:[u.isPending?e.jsx(f,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(Me,{className:"w-3.5 h-3.5"}),"Install"]})]}),g&&a?.maxStableVersion&&A(g,a.maxStableVersion)&&e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-amber-600 dark:text-amber-400",children:[e.jsx(q,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsxs("span",{children:["Versions above ",a.maxStableVersion," have known issues"]})]}),t?.checkedAt&&e.jsxs("div",{className:"mt-2 text-[10px] text-muted-foreground/60",children:["Last checked ",He(t.checkedAt)]})]})}),!p&&e.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not running"}),e.jsxs(T,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>i.mutate(),disabled:i.isPending,children:[i.isPending?e.jsx(f,{className:"w-3 h-3 animate-spin"}):e.jsx(Fe,{className:"w-3 h-3"}),"Start"]})]}),e.jsx(ge,{open:K,onOpenChange:b,children:e.jsxs(pe,{children:[e.jsxs(fe,{children:[e.jsxs(be,{className:"flex items-center gap-2",children:[e.jsx(q,{className:"w-5 h-5 text-amber-500"}),"Install Unstable Version?"]}),e.jsxs(je,{className:"space-y-2",children:[e.jsxs("p",{children:["You are about to install ",e.jsxs("strong",{children:["v",C]}),", which is above the maximum stable version"," ",e.jsxs("strong",{children:["v",a?.maxStableVersion||"6.6.80"]}),"."]}),e.jsx("p",{className:"text-amber-600 dark:text-amber-400",children:"This version has known stability issues and may cause unexpected behavior."}),e.jsx("p",{children:"Are you sure you want to proceed?"})]})]}),e.jsxs(ye,{children:[e.jsx(Ne,{onClick:W,children:"Cancel"}),e.jsx(we,{onClick:H,className:"bg-amber-500 hover:bg-amber-600 text-white",children:"Install Anyway"})]})]})})]})})}export{es as P};
|
|
1
|
+
import{j as e}from"./radix-ui-DIWAxjEp.js";import{r as y}from"./react-vendor-CNOkPC89.js";import{bd as Y,aL as J,be as Z,bf as _,bg as ee,bh as se,bi as te,c as d,B as q,aw as ae,K as ne,N as re,q as oe,r as ie,s as le,t as ce,v as de,b as T,T as xe,o as me,p as ue,W as he}from"./index-zgEA-GkK.js";import{A as ge,a as pe,b as fe,c as be,d as je,e as ye,f as Ne,g as we}from"./alert-dialog-CuEMPUz1.js";import{u as R,a as ve,b as Ce,e as Se}from"./tanstack-Hn82hibe.js";import{t as V}from"./notifications-B2HqRBj7.js";import{a3 as ke,A as Pe,R as f,aN as Ve,aO as Ae,aP as Te,X as De,b as Ie,aQ as Ue,aR as $e,U as qe,q as Ee,k as Re,a2 as Le,ap as Me,T as E,aw as Fe}from"./icons-ErRLeJ3U.js";async function Ke(){const s=await fetch("/api/cliproxy/sync/status");if(!s.ok){let n="Failed to fetch sync status";try{const t=await s.json();n=t.error||t.message||n}catch{}throw new Error(n)}return s.json()}async function Be(){const s=new AbortController,n=setTimeout(()=>s.abort(),3e4);try{const t=await fetch("/api/cliproxy/sync",{method:"POST",headers:{"Content-Type":"application/json"},signal:s.signal});if(!t.ok){let a="Sync failed";try{const r=await t.json();a=r.error||r.message||a}catch{}throw new Error(a)}return t.json()}catch(t){throw t instanceof Error&&t.name==="AbortError"?new Error("Sync request timed out after 30 seconds"):t}finally{clearTimeout(n)}}function Qe(){return R({queryKey:["cliproxy-sync-status"],queryFn:Ke,refetchInterval:3e4,retry:1,staleTime:1e4})}function Oe(){const s=ve();return Ce({mutationFn:Be,onSuccess:n=>{s.invalidateQueries({queryKey:["cliproxy-sync-status"]}),s.invalidateQueries({queryKey:["cliproxy-sync-preview"]}),n.syncedCount===0?V.info("No profiles to sync"):V.success(`Synced ${n.syncedCount} profile${n.syncedCount===1?"":"s"} to CLIProxy`)},onError:n=>{V.error(`Sync failed: ${n.message}`)}})}function A(s,n){const t=s.replace(/-\d+$/,"").split(".").map(Number),a=n.replace(/-\d+$/,"").split(".").map(Number);for(let r=0;r<3;r++){if((t[r]||0)>(a[r]||0))return!0;if((t[r]||0)<(a[r]||0))return!1}return!1}function ze(s){if(!s)return"";const n=new Date(s).getTime(),a=Date.now()-n,r=Math.floor(a/(1e3*60*60)),i=Math.floor(a%(1e3*60*60)/(1e3*60));return r>0?`${r}h ${i}m`:`${i}m`}function He(s){if(!s)return"";const n=Date.now()-s,t=Math.floor(n/(1e3*60)),a=Math.floor(n/(1e3*60*60));return t<1?"just now":t<60?`${t}m ago`:`${a}h ago`}function N({icon:s,tooltip:n,onClick:t,disabled:a,isPending:r,className:i,variant:l="ghost"}){return e.jsxs(xe,{children:[e.jsx(me,{asChild:!0,children:e.jsx(T,{variant:l==="destructive-ghost"?"ghost":l,size:"sm",className:d("h-7 w-7 p-0",l==="destructive-ghost"&&"hover:bg-destructive/10 hover:text-destructive hover:border-destructive/30",i),onClick:t,disabled:a,children:r?e.jsx(f,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(s,{className:"w-3.5 h-3.5"})})}),e.jsx(ue,{side:"bottom",className:"text-xs",children:n})]})}function es(){const{data:s,isLoading:n}=Y(),{data:t}=J(),{data:a,isLoading:r}=Z(),i=_(),l=ee(),w=se(),u=te(),{data:L}=Qe(),{mutate:M,isPending:v}=Oe(),[h,D]=y.useState(!1),[g,F]=y.useState(""),[K,b]=y.useState(!1),[C,S]=y.useState(null),{data:B}=R({queryKey:["cliproxy-server-config"],queryFn:()=>he.cliproxyServer.get(),staleTime:3e4}),Q=Se({mutationKey:["update-backend"]})>0,x=B?.remote,I=x?.enabled&&x?.host,p=s?.running??!1,k=i.isPending||l.isPending||w.isPending||u.isPending||Q||v,O=t?.hasUpdate??!1,m=t?.isStable===!1,U=t?.currentVersion,j=L?.configured??!1,z=j?"Sync Ready":"No Config",P=m?t?.maxStableVersion||a?.latestStable:t?.latestVersion,$=o=>{if(!o)return;const c=a?.maxStableVersion||"6.6.80";if(A(o,c)){S(o),b(!0);return}u.mutate({version:o})},H=()=>{C&&u.mutate({version:C,force:!0}),b(!1),S(null)},W=()=>{b(!1),S(null)},G=I?(()=>{const o=x.protocol||"http",c=x.port||(o==="https"?443:80);return o==="https"&&c===443||o==="http"&&c===80?x.host:`${x.host}:${c}`})():null;return I?e.jsxs("div",{className:d("rounded-lg border p-3 transition-colors","border-blue-500/30 bg-blue-500/5"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ke,{className:"w-4 h-4 text-blue-500"}),e.jsx("span",{className:"text-sm font-medium",children:"Remote Proxy"}),e.jsx(q,{variant:"secondary",className:"text-[10px] h-4 px-1.5 bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",children:"Active"})]}),e.jsx(Pe,{className:"w-3 h-3 text-blue-600"})]}),e.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:[e.jsx("div",{className:"flex items-center gap-1 mb-1",children:e.jsx("span",{className:"font-mono",children:G})}),e.jsx("p",{className:"text-[10px] text-muted-foreground/70 leading-tight",children:"Traffic auto-routed to remote server"})]})]}):e.jsx(ae,{delayDuration:300,children:e.jsxs("div",{className:d("rounded-lg border p-3 transition-colors",p?"border-green-500/30 bg-green-500/5":"border-muted bg-muted/30"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:d("w-2 h-2 rounded-full",p?"bg-green-500 animate-pulse":"bg-muted-foreground/30")}),e.jsx("span",{className:"text-sm font-medium",children:t?.backendLabel??"CLIProxy"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[n?e.jsx(f,{className:"w-3 h-3 animate-spin text-muted-foreground"}):p?e.jsxs(e.Fragment,{children:[e.jsx(N,{icon:v?f:Ve,tooltip:"Sync profiles to CLIProxy",onClick:()=>M(),disabled:!j||k,isPending:v}),e.jsx(N,{icon:Ae,tooltip:"Restart",onClick:()=>w.mutate(),disabled:k,isPending:w.isPending}),e.jsx(N,{icon:Te,tooltip:"Stop",onClick:()=>l.mutate(),disabled:k,isPending:l.isPending,variant:"destructive-ghost"})]}):null,e.jsx(N,{icon:h?De:Ie,tooltip:h?"Close":"Version settings",onClick:()=>D(!h),className:h?"bg-muted":void 0})]})]}),U&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[e.jsxs("span",{className:d("text-xs font-mono text-muted-foreground",m&&"text-amber-600 dark:text-amber-400"),children:["v",U]}),(O||m)&&P&&e.jsxs(q,{variant:"secondary",className:d("text-[10px] h-4 px-1.5 gap-0.5 cursor-pointer transition-colors",m?"bg-amber-100 text-amber-700 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:hover:bg-amber-900/50":"bg-green-100 text-green-700 hover:bg-green-200 dark:bg-green-900/30 dark:text-green-400 dark:hover:bg-green-900/50"),onClick:()=>$(P),title:`Click to ${m?"downgrade":"update"}`,children:[m?e.jsx(Ue,{className:"w-2.5 h-2.5"}):e.jsx($e,{className:"w-2.5 h-2.5"}),P]})]}),p&&s&&e.jsxs("div",{className:"mt-2 flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:["Port ",s.port]}),s.sessionCount!==void 0&&s.sessionCount>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(qe,{className:"w-3 h-3"}),s.sessionCount," session",s.sessionCount!==1?"s":""]}),s.startedAt&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ee,{className:"w-3 h-3"}),ze(s.startedAt)]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-xs",children:[j?e.jsx(Re,{className:"w-3 h-3 text-green-600 dark:text-green-400"}):e.jsx(Le,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:d("text-xs",j?"text-green-600 dark:text-green-400":"text-muted-foreground"),children:z})]}),e.jsx(ne,{open:h,onOpenChange:D,children:e.jsxs(re,{className:"mt-3 pt-3 border-t border-muted",children:[e.jsx("h4",{className:"text-xs font-medium text-muted-foreground mb-3",children:"Version Management"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(oe,{value:g,onValueChange:F,disabled:r,children:[e.jsx(ie,{className:"h-8 text-xs flex-1",children:e.jsx(le,{placeholder:"Select version to install..."})}),e.jsx(ce,{children:a?.versions.slice(0,20).map(o=>{const c=a?.maxStableVersion&&A(o,a.maxStableVersion);return e.jsx(de,{value:o,className:"text-xs",children:e.jsxs("span",{className:"flex items-center gap-2",children:["v",o,o===a.latestStable&&e.jsx("span",{className:"text-green-600 dark:text-green-400",children:"(stable)"}),c&&e.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:"⚠"})]})},o)})})]}),e.jsxs(T,{variant:"outline",size:"sm",className:"h-8 text-xs gap-1.5 px-3",onClick:()=>$(g),disabled:u.isPending||!g,children:[u.isPending?e.jsx(f,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(Me,{className:"w-3.5 h-3.5"}),"Install"]})]}),g&&a?.maxStableVersion&&A(g,a.maxStableVersion)&&e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-amber-600 dark:text-amber-400",children:[e.jsx(E,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsxs("span",{children:["Versions above ",a.maxStableVersion," have known issues"]})]}),t?.checkedAt&&e.jsxs("div",{className:"mt-2 text-[10px] text-muted-foreground/60",children:["Last checked ",He(t.checkedAt)]})]})}),!p&&e.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not running"}),e.jsxs(T,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>i.mutate(),disabled:i.isPending,children:[i.isPending?e.jsx(f,{className:"w-3 h-3 animate-spin"}):e.jsx(Fe,{className:"w-3 h-3"}),"Start"]})]}),e.jsx(ge,{open:K,onOpenChange:b,children:e.jsxs(pe,{children:[e.jsxs(fe,{children:[e.jsxs(be,{className:"flex items-center gap-2",children:[e.jsx(E,{className:"w-5 h-5 text-amber-500"}),"Install Unstable Version?"]}),e.jsxs(je,{className:"space-y-2",children:[e.jsxs("p",{children:["You are about to install ",e.jsxs("strong",{children:["v",C]}),", which is above the maximum stable version"," ",e.jsxs("strong",{children:["v",a?.maxStableVersion||"6.6.80"]}),"."]}),e.jsx("p",{className:"text-amber-600 dark:text-amber-400",children:"This version has known stability issues and may cause unexpected behavior."}),e.jsx("p",{children:"Are you sure you want to proceed?"})]})]}),e.jsxs(ye,{children:[e.jsx(Ne,{onClick:W,children:"Cancel"}),e.jsx(we,{onClick:H,className:"bg-amber-500 hover:bg-amber-600 text-white",children:"Install Anyway"})]})]})})]})})}export{es as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i,$ as n}from"./radix-ui-DIWAxjEp.js";import"./react-vendor-CNOkPC89.js";import{c as e}from"./index-
|
|
1
|
+
import{j as i,$ as n}from"./radix-ui-DIWAxjEp.js";import"./react-vendor-CNOkPC89.js";import{c as e}from"./index-zgEA-GkK.js";function m({className:t,orientation:a="horizontal",decorative:o=!0,...r}){return i.jsx(n,{"data-slot":"separator",decorative:o,orientation:a,className:e("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}export{m as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./radix-ui-DIWAxjEp.js";import{r as l}from"./react-vendor-CNOkPC89.js";import{
|
|
1
|
+
import{j as s}from"./radix-ui-DIWAxjEp.js";import{r as l}from"./react-vendor-CNOkPC89.js";import{b0 as o,b1 as m,b2 as c,b3 as x,b4 as u,b as h,C as p,a as g}from"./index-zgEA-GkK.js";import{O as j,a1 as f,aF as b,T as N}from"./icons-ErRLeJ3U.js";import"./tanstack-Hn82hibe.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Cn_Uld6y.js";import"./code-highlight-BRUf_pqB.js";function B(){const[t,i]=l.useState("commands"),{data:e}=o(),{data:n,isLoading:r}=m(t),d=[{id:"commands",label:"Commands",icon:j,count:e?.commands??0},{id:"skills",label:"Skills",icon:f,count:e?.skills??0},{id:"agents",label:"Agents",icon:b,count:e?.agents??0}];return s.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Shared Data"}),s.jsx("p",{className:"text-muted-foreground",children:"Commands, skills, and agents shared across Claude instances"})]}),e&&!e.symlinkStatus.valid&&s.jsxs(c,{variant:"warning",children:[s.jsx(N,{className:"h-4 w-4"}),s.jsx(x,{children:"Configuration Required"}),s.jsxs(u,{children:[e.symlinkStatus.message,". Run `ccs sync` to configure."]})]}),s.jsx("div",{className:"flex gap-2 border-b pb-2",children:d.map(a=>s.jsxs(h,{variant:t===a.id?"default":"ghost",size:"sm",onClick:()=>i(a.id),className:"flex items-center gap-2",children:[s.jsx(a.icon,{className:"w-4 h-4"}),a.label," (",a.count,")"]},a.id))}),s.jsx("div",{className:"mt-4",children:r?s.jsx("div",{className:"text-muted-foreground",children:"Loading..."}):n?.items.length===0?s.jsxs("div",{className:"text-muted-foreground",children:["No ",t," found"]}):s.jsx("div",{className:"grid gap-3",children:n?.items.map(a=>s.jsx(p,{children:s.jsxs(g,{children:[s.jsx("div",{className:"font-medium",children:a.name}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a.description}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2 font-mono truncate",children:a.path})]})},a.name))})})]})}export{B as SharedPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,a2 as s,a3 as n}from"./radix-ui-DIWAxjEp.js";import"./react-vendor-CNOkPC89.js";import{c as e}from"./index-
|
|
1
|
+
import{j as a,a2 as s,a3 as n}from"./radix-ui-DIWAxjEp.js";import"./react-vendor-CNOkPC89.js";import{c as e}from"./index-zgEA-GkK.js";function c({className:t,...r}){return a.jsx(s,{"data-slot":"switch",className:e("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...r,children:a.jsx(n,{"data-slot":"switch-thumb",className:e("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}export{c as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-DIWAxjEp.js";import{L as C,r as o}from"./react-vendor-CNOkPC89.js";import{B as w,c as v,b as x,w as A,b1 as E,C as b,i as f,j as g,Y as j,a as N,m as h,b2 as _,b3 as D,I as B,b4 as L}from"./index-PWMOllOf.js";import{D as U,y as z,aB as $,q as Q,E as q,v as G,a0 as V,b as Y,aC as F,ai as J}from"./icons-Dk2sL3Mr.js";import"./tanstack-Hn82hibe.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Cn_Uld6y.js";import"./code-highlight-BRUf_pqB.js";const W={new:"New",stable:"Stable",planned:"Planned"},H={new:"border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-900/50 dark:bg-blue-900/20 dark:text-blue-300",stable:"border-green-200 bg-green-50 text-green-700 dark:border-green-900/50 dark:bg-green-900/20 dark:text-green-300",planned:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/50 dark:bg-amber-900/20 dark:text-amber-300"};function K({status:s,className:a}){return e.jsx(w,{variant:"outline",className:v("font-medium",H[s],a),children:W[s]})}const I="ccs:updates:notice-progress:v1";function X(s){return s==="new"?"new":"seen"}function m(s,a){return a[s.id]??X(s.status)}function S(s){return s!=="done"&&s!=="dismissed"}function Z(){if(typeof window>"u")return{};try{const s=window.localStorage.getItem(I);if(!s)return{};const a=JSON.parse(s);if(!a||typeof a!="object"||Array.isArray(a))return{};const l={};for(const[d,t]of Object.entries(a))typeof d=="string"&&(t==="new"||t==="seen"||t==="done"||t==="dismissed")&&(l[d]=t);return l}catch{return{}}}function ee(s){typeof window>"u"||window.localStorage.setItem(I,JSON.stringify(s))}const se={new:{label:"Needs Action",className:"border-amber-300/70 bg-amber-100/70 text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/15 dark:text-amber-300",showDot:!0},seen:{label:"In Review",className:"border-blue-300/70 bg-blue-100/70 text-blue-800 dark:border-blue-500/40 dark:bg-blue-500/15 dark:text-blue-300"},done:{label:"Done",className:"border-emerald-300/70 bg-emerald-100/70 text-emerald-800 dark:border-emerald-500/40 dark:bg-emerald-500/15 dark:text-emerald-300"},dismissed:{label:"Dismissed",className:"border-muted-foreground/20 bg-muted text-muted-foreground dark:border-muted-foreground/30"}};function M({state:s,className:a}){const l=se[s];return e.jsxs(w,{variant:"outline",className:v("gap-1.5 border text-[10px] font-medium",l.className,a),children:[l.showDot&&e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}),l.label]})}function re({action:s}){return e.jsxs("div",{className:"rounded-md border bg-muted/20 p-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-0.5",children:[e.jsx("p",{className:"text-sm font-medium",children:s.label}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.description})]}),s.type==="route"&&s.path&&e.jsx(x,{size:"sm",asChild:!0,children:e.jsxs(C,{to:s.path,children:["Open",e.jsx(U,{className:"h-3.5 w-3.5"})]})})]}),s.type==="command"&&s.command&&e.jsxs("div",{className:"mt-2 flex items-center gap-2 rounded-md border bg-background px-2 py-1.5",children:[e.jsx(z,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("code",{className:"min-w-0 flex-1 truncate text-[11px]",children:s.command}),e.jsx(A,{value:s.command})]})]})}function ae({notice:s,progress:a,relatedEntries:l,onUpdateProgress:d}){return s?e.jsxs("div",{className:"flex-1 min-w-0 bg-background grid grid-rows-[auto_minmax(0,1fr)] overflow-hidden",children:[e.jsxs("div",{className:"border-b bg-background px-4 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("h2",{className:"text-base font-semibold leading-tight",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.summary})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[a&&e.jsx(M,{state:a}),e.jsx(K,{status:s.status})]})]}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.jsx($,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:["Published ",E(s.publishedAt)]})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[e.jsxs(x,{size:"sm",onClick:()=>d("done"),children:[e.jsx(Q,{className:"h-4 w-4"}),"Mark done"]}),e.jsxs(x,{size:"sm",variant:"outline",onClick:()=>d("dismissed"),children:[e.jsx(q,{className:"h-4 w-4"}),"Dismiss"]}),e.jsxs(x,{size:"sm",variant:"ghost",onClick:()=>d("new"),children:[e.jsx(G,{className:"h-4 w-4"}),"Reopen"]})]})]}),e.jsx("div",{className:"min-h-0 p-4",children:e.jsxs("div",{className:"grid h-full gap-4 xl:grid-cols-[minmax(0,1.5fr)_minmax(320px,1fr)] overflow-hidden",children:[e.jsxs(b,{className:"h-full overflow-hidden",children:[e.jsxs(f,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(V,{className:"h-4 w-4 text-primary"}),e.jsx(g,{className:"text-base",children:"Do Next"})]}),e.jsx(j,{children:s.primaryAction})]}),e.jsx(N,{className:"min-h-0",children:e.jsx(h,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-3",children:s.actions.map(t=>e.jsx(re,{action:t},`${s.id}-${t.id}`))})})})]}),e.jsxs("div",{className:"grid h-full grid-rows-[minmax(0,1fr)_minmax(0,1fr)] gap-4 overflow-hidden",children:[e.jsxs(b,{className:"overflow-hidden",children:[e.jsxs(f,{className:"pb-3",children:[e.jsx(g,{className:"text-base",children:"Impacted Integrations"}),e.jsx(j,{children:"Related areas based on update scope and routing."})]}),e.jsx(N,{className:"min-h-0",children:e.jsx(h,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-2",children:l.map(t=>e.jsxs("div",{className:"rounded-md border bg-muted/20 p-2.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:"min-w-0 truncate text-sm font-medium",children:t.name}),e.jsx(w,{variant:"outline",className:"h-5 px-1.5 text-[10px]",children:_[t.scope]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[t.routes[0]&&e.jsx(x,{size:"sm",variant:"outline",asChild:!0,children:e.jsx(C,{to:t.routes[0].path,children:t.routes[0].label})}),t.commands[0]&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-1.5",children:[e.jsx("code",{className:"truncate rounded bg-background px-1.5 py-0.5 text-[11px]",children:t.commands[0]}),e.jsx(A,{value:t.commands[0]})]})]})]},t.id))})})})]}),e.jsxs(b,{className:"overflow-hidden",children:[e.jsxs(f,{className:"pb-3",children:[e.jsx(g,{className:"text-base",children:"Why It Matters"}),e.jsx(j,{children:"Short context only, no wall-of-text release notes."})]}),e.jsx(N,{className:"min-h-0",children:e.jsx(h,{className:"h-full pr-2",children:e.jsx("ul",{className:"space-y-2 text-sm text-muted-foreground",children:s.highlights.map(t=>e.jsxs("li",{children:["- ",t]},`${s.id}-${t}`))})})})]})]})]})})]}):e.jsx("div",{className:"flex h-full items-center justify-center rounded-lg border border-dashed bg-muted/20 p-6",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"No updates available."})})}function te({notice:s,progress:a,selected:l,onSelect:d}){return e.jsxs("button",{type:"button",onClick:d,className:v("w-full rounded-lg border px-3 py-3 text-left transition-colors",l?"border-primary/30 bg-primary/10":"border-transparent bg-background/40 hover:border-border hover:bg-muted/70"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:s.title}),e.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:s.primaryAction})]}),e.jsx(Y,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground",children:E(s.publishedAt)}),e.jsx(M,{state:a})]})]})}const de=[{id:"inbox",label:"Action Required"},{id:"done",label:"Done"},{id:"all",label:"All"}];function le(s,a){return a?[s.title,s.summary,s.primaryAction,...s.highlights,...s.commands,...s.actions.map(d=>`${d.label} ${d.description} ${d.command||""}`),...s.routes.map(d=>d.label)].join(" ").toLowerCase().includes(a):!0}function fe(){const s=o.useMemo(()=>[...D].sort((r,n)=>n.publishedAt.localeCompare(r.publishedAt)),[]),[a,l]=o.useState("inbox"),[d,t]=o.useState(""),[i,y]=o.useState(()=>Z()),[k,P]=o.useState(null);o.useEffect(()=>{ee(i)},[i]);const u=o.useMemo(()=>{const r=d.trim().toLowerCase();return s.filter(n=>{const p=m(n,i);return le(n,r)?a==="done"?p==="done":a==="inbox"?S(p):!0:!1})},[s,i,d,a]),c=o.useMemo(()=>{const r=a==="all"?s:u;return r.find(n=>n.id===k)??r[0]??null},[s,k,a,u]),O=r=>{P(r.id),y(n=>m(r,n)!=="new"?n:{...n,[r.id]:"seen"})},R=o.useMemo(()=>s.filter(r=>S(m(r,i))).length,[s,i]),T=o.useMemo(()=>s.filter(r=>m(r,i)==="done").length,[s,i]);return e.jsxs("div",{className:"h-[calc(100vh-100px)] flex overflow-hidden",children:[e.jsxs("div",{className:"w-80 border-r bg-muted/30 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:"Updates Inbox"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Focus on actions, then mark updates done or dismissed."})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:"Needs Action"}),e.jsx("p",{className:"text-base font-semibold",children:R})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:"Done"}),e.jsx("p",{className:"text-base font-semibold",children:T})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(J,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(B,{value:d,onChange:r=>t(r.target.value),placeholder:"Search actions or commands",className:"h-9 pl-8"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:de.map(r=>e.jsx(x,{size:"sm",variant:a===r.id?"default":"outline",onClick:()=>l(r.id),children:r.label},r.id))})]}),e.jsx(h,{className:"flex-1",children:e.jsx("div",{className:"space-y-2 p-2",children:u.length===0?e.jsx("div",{className:"rounded-md border border-dashed p-3 text-xs text-muted-foreground",children:"No notices match this view."}):u.map(r=>e.jsx(te,{notice:r,progress:m(r,i),selected:c?.id===r.id,onSelect:()=>O(r)},r.id))})})]}),e.jsx(ae,{notice:c,progress:c?m(c,i):null,relatedEntries:c?L(c):[],onUpdateProgress:r=>{c&&y(n=>({...n,[c.id]:r}))}})]})}export{fe as UpdatesPage};
|
|
1
|
+
import{j as e}from"./radix-ui-DIWAxjEp.js";import{L as C,r as c}from"./react-vendor-CNOkPC89.js";import{B as w,c as v,b as x,w as A,b5 as E,C as b,i as f,j as g,Y as j,a as N,m as h,b6 as _,b7 as D,I as L,b8 as U}from"./index-zgEA-GkK.js";import{J as z,z as B,aG as $,r as G,E as Q,w as J,a1 as V,c as Y,aH as q,aj as F}from"./icons-ErRLeJ3U.js";import"./tanstack-Hn82hibe.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Cn_Uld6y.js";import"./code-highlight-BRUf_pqB.js";const H={new:"New",stable:"Stable",planned:"Planned"},W={new:"border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-900/50 dark:bg-blue-900/20 dark:text-blue-300",stable:"border-green-200 bg-green-50 text-green-700 dark:border-green-900/50 dark:bg-green-900/20 dark:text-green-300",planned:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/50 dark:bg-amber-900/20 dark:text-amber-300"};function K({status:s,className:a}){return e.jsx(w,{variant:"outline",className:v("font-medium",W[s],a),children:H[s]})}const I="ccs:updates:notice-progress:v1";function X(s){return s==="new"?"new":"seen"}function m(s,a){return a[s.id]??X(s.status)}function S(s){return s!=="done"&&s!=="dismissed"}function Z(){if(typeof window>"u")return{};try{const s=window.localStorage.getItem(I);if(!s)return{};const a=JSON.parse(s);if(!a||typeof a!="object"||Array.isArray(a))return{};const l={};for(const[d,t]of Object.entries(a))typeof d=="string"&&(t==="new"||t==="seen"||t==="done"||t==="dismissed")&&(l[d]=t);return l}catch{return{}}}function ee(s){typeof window>"u"||window.localStorage.setItem(I,JSON.stringify(s))}const se={new:{label:"Needs Action",className:"border-amber-300/70 bg-amber-100/70 text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/15 dark:text-amber-300",showDot:!0},seen:{label:"In Review",className:"border-blue-300/70 bg-blue-100/70 text-blue-800 dark:border-blue-500/40 dark:bg-blue-500/15 dark:text-blue-300"},done:{label:"Done",className:"border-emerald-300/70 bg-emerald-100/70 text-emerald-800 dark:border-emerald-500/40 dark:bg-emerald-500/15 dark:text-emerald-300"},dismissed:{label:"Dismissed",className:"border-muted-foreground/20 bg-muted text-muted-foreground dark:border-muted-foreground/30"}};function M({state:s,className:a}){const l=se[s];return e.jsxs(w,{variant:"outline",className:v("gap-1.5 border text-[10px] font-medium",l.className,a),children:[l.showDot&&e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}),l.label]})}function re({action:s}){return e.jsxs("div",{className:"rounded-md border bg-muted/20 p-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-0.5",children:[e.jsx("p",{className:"text-sm font-medium",children:s.label}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.description})]}),s.type==="route"&&s.path&&e.jsx(x,{size:"sm",asChild:!0,children:e.jsxs(C,{to:s.path,children:["Open",e.jsx(z,{className:"h-3.5 w-3.5"})]})})]}),s.type==="command"&&s.command&&e.jsxs("div",{className:"mt-2 flex items-center gap-2 rounded-md border bg-background px-2 py-1.5",children:[e.jsx(B,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("code",{className:"min-w-0 flex-1 truncate text-[11px]",children:s.command}),e.jsx(A,{value:s.command})]})]})}function ae({notice:s,progress:a,relatedEntries:l,onUpdateProgress:d}){return s?e.jsxs("div",{className:"flex-1 min-w-0 bg-background grid grid-rows-[auto_minmax(0,1fr)] overflow-hidden",children:[e.jsxs("div",{className:"border-b bg-background px-4 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("h2",{className:"text-base font-semibold leading-tight",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.summary})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[a&&e.jsx(M,{state:a}),e.jsx(K,{status:s.status})]})]}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.jsx($,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:["Published ",E(s.publishedAt)]})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[e.jsxs(x,{size:"sm",onClick:()=>d("done"),children:[e.jsx(G,{className:"h-4 w-4"}),"Mark done"]}),e.jsxs(x,{size:"sm",variant:"outline",onClick:()=>d("dismissed"),children:[e.jsx(Q,{className:"h-4 w-4"}),"Dismiss"]}),e.jsxs(x,{size:"sm",variant:"ghost",onClick:()=>d("new"),children:[e.jsx(J,{className:"h-4 w-4"}),"Reopen"]})]})]}),e.jsx("div",{className:"min-h-0 p-4",children:e.jsxs("div",{className:"grid h-full gap-4 xl:grid-cols-[minmax(0,1.5fr)_minmax(320px,1fr)] overflow-hidden",children:[e.jsxs(b,{className:"h-full overflow-hidden",children:[e.jsxs(f,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(V,{className:"h-4 w-4 text-primary"}),e.jsx(g,{className:"text-base",children:"Do Next"})]}),e.jsx(j,{children:s.primaryAction})]}),e.jsx(N,{className:"min-h-0",children:e.jsx(h,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-3",children:s.actions.map(t=>e.jsx(re,{action:t},`${s.id}-${t.id}`))})})})]}),e.jsxs("div",{className:"grid h-full grid-rows-[minmax(0,1fr)_minmax(0,1fr)] gap-4 overflow-hidden",children:[e.jsxs(b,{className:"overflow-hidden",children:[e.jsxs(f,{className:"pb-3",children:[e.jsx(g,{className:"text-base",children:"Impacted Integrations"}),e.jsx(j,{children:"Related areas based on update scope and routing."})]}),e.jsx(N,{className:"min-h-0",children:e.jsx(h,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-2",children:l.map(t=>e.jsxs("div",{className:"rounded-md border bg-muted/20 p-2.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:"min-w-0 truncate text-sm font-medium",children:t.name}),e.jsx(w,{variant:"outline",className:"h-5 px-1.5 text-[10px]",children:_[t.scope]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[t.routes[0]&&e.jsx(x,{size:"sm",variant:"outline",asChild:!0,children:e.jsx(C,{to:t.routes[0].path,children:t.routes[0].label})}),t.commands[0]&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-1.5",children:[e.jsx("code",{className:"truncate rounded bg-background px-1.5 py-0.5 text-[11px]",children:t.commands[0]}),e.jsx(A,{value:t.commands[0]})]})]})]},t.id))})})})]}),e.jsxs(b,{className:"overflow-hidden",children:[e.jsxs(f,{className:"pb-3",children:[e.jsx(g,{className:"text-base",children:"Why It Matters"}),e.jsx(j,{children:"Short context only, no wall-of-text release notes."})]}),e.jsx(N,{className:"min-h-0",children:e.jsx(h,{className:"h-full pr-2",children:e.jsx("ul",{className:"space-y-2 text-sm text-muted-foreground",children:s.highlights.map(t=>e.jsxs("li",{children:["- ",t]},`${s.id}-${t}`))})})})]})]})]})})]}):e.jsx("div",{className:"flex h-full items-center justify-center rounded-lg border border-dashed bg-muted/20 p-6",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"No updates available."})})}function te({notice:s,progress:a,selected:l,onSelect:d}){return e.jsxs("button",{type:"button",onClick:d,className:v("w-full rounded-lg border px-3 py-3 text-left transition-colors",l?"border-primary/30 bg-primary/10":"border-transparent bg-background/40 hover:border-border hover:bg-muted/70"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:s.title}),e.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:s.primaryAction})]}),e.jsx(Y,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground",children:E(s.publishedAt)}),e.jsx(M,{state:a})]})]})}const de=[{id:"inbox",label:"Action Required"},{id:"done",label:"Done"},{id:"all",label:"All"}];function le(s,a){return a?[s.title,s.summary,s.primaryAction,...s.highlights,...s.commands,...s.actions.map(d=>`${d.label} ${d.description} ${d.command||""}`),...s.routes.map(d=>d.label)].join(" ").toLowerCase().includes(a):!0}function fe(){const s=c.useMemo(()=>[...D].sort((r,n)=>n.publishedAt.localeCompare(r.publishedAt)),[]),[a,l]=c.useState("inbox"),[d,t]=c.useState(""),[i,y]=c.useState(()=>Z()),[k,P]=c.useState(null);c.useEffect(()=>{ee(i)},[i]);const u=c.useMemo(()=>{const r=d.trim().toLowerCase();return s.filter(n=>{const p=m(n,i);return le(n,r)?a==="done"?p==="done":a==="inbox"?S(p):!0:!1})},[s,i,d,a]),o=c.useMemo(()=>{const r=a==="all"?s:u;return r.find(n=>n.id===k)??r[0]??null},[s,k,a,u]),O=r=>{P(r.id),y(n=>m(r,n)!=="new"?n:{...n,[r.id]:"seen"})},R=c.useMemo(()=>s.filter(r=>S(m(r,i))).length,[s,i]),T=c.useMemo(()=>s.filter(r=>m(r,i)==="done").length,[s,i]);return e.jsxs("div",{className:"h-[calc(100vh-100px)] flex overflow-hidden",children:[e.jsxs("div",{className:"w-80 border-r bg-muted/30 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:"Updates Inbox"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Focus on actions, then mark updates done or dismissed."})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:"Needs Action"}),e.jsx("p",{className:"text-base font-semibold",children:R})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:"Done"}),e.jsx("p",{className:"text-base font-semibold",children:T})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(F,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(L,{value:d,onChange:r=>t(r.target.value),placeholder:"Search actions or commands",className:"h-9 pl-8"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:de.map(r=>e.jsx(x,{size:"sm",variant:a===r.id?"default":"outline",onClick:()=>l(r.id),children:r.label},r.id))})]}),e.jsx(h,{className:"flex-1",children:e.jsx("div",{className:"space-y-2 p-2",children:u.length===0?e.jsx("div",{className:"rounded-md border border-dashed p-3 text-xs text-muted-foreground",children:"No notices match this view."}):u.map(r=>e.jsx(te,{notice:r,progress:m(r,i),selected:o?.id===r.id,onSelect:()=>O(r)},r.id))})})]}),e.jsx(ae,{notice:o,progress:o?m(o,i):null,relatedEntries:o?U(o):[],onUpdateProgress:r=>{o&&y(n=>({...n,[o.id]:r}))}})]})}export{fe as UpdatesPage};
|
package/dist/ui/index.html
CHANGED
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap"
|
|
25
25
|
rel="stylesheet"
|
|
26
26
|
/>
|
|
27
|
-
<script type="module" crossorigin src="/assets/index-
|
|
27
|
+
<script type="module" crossorigin src="/assets/index-zgEA-GkK.js"></script>
|
|
28
28
|
<link rel="modulepreload" crossorigin href="/assets/react-vendor-CNOkPC89.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/radix-ui-DIWAxjEp.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/tanstack-Hn82hibe.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/notifications-B2HqRBj7.js">
|
|
32
|
-
<link rel="modulepreload" crossorigin href="/assets/icons-
|
|
32
|
+
<link rel="modulepreload" crossorigin href="/assets/icons-ErRLeJ3U.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/utils-CzKF5WmX.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/assets/form-utils-Cn_Uld6y.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="/assets/code-highlight-BRUf_pqB.js">
|
|
36
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
36
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CjJDhkhP.css">
|
|
37
37
|
</head>
|
|
38
38
|
<body>
|
|
39
39
|
<div id="root"></div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"droid-routes.d.ts","sourceRoot":"","sources":["../../../src/web-server/routes/droid-routes.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,MAAM,4CAAW,CAAC;AA4DxB,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const express_1 = require("express");
|
|
4
|
+
const droid_dashboard_service_1 = require("../services/droid-dashboard-service");
|
|
5
|
+
const router = (0, express_1.Router)();
|
|
6
|
+
/**
|
|
7
|
+
* GET /api/droid/diagnostics
|
|
8
|
+
* Dashboard-ready Droid installation + BYOK configuration diagnostics.
|
|
9
|
+
*/
|
|
10
|
+
router.get('/diagnostics', async (_req, res) => {
|
|
11
|
+
try {
|
|
12
|
+
res.json(await (0, droid_dashboard_service_1.getDroidDashboardDiagnostics)());
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
res.status(500).json({ error: error.message });
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* GET /api/droid/settings/raw
|
|
20
|
+
* Raw ~/.factory/settings.json payload for editor.
|
|
21
|
+
*/
|
|
22
|
+
router.get('/settings/raw', async (_req, res) => {
|
|
23
|
+
try {
|
|
24
|
+
res.json(await (0, droid_dashboard_service_1.getDroidRawSettings)());
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
res.status(500).json({ error: error.message });
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* PUT /api/droid/settings/raw
|
|
32
|
+
* Save raw ~/.factory/settings.json payload from dashboard editor.
|
|
33
|
+
*/
|
|
34
|
+
router.put('/settings/raw', async (req, res) => {
|
|
35
|
+
try {
|
|
36
|
+
const { rawText, expectedMtime } = req.body ?? {};
|
|
37
|
+
if (typeof rawText !== 'string') {
|
|
38
|
+
res.status(400).json({ error: 'rawText must be a string.' });
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (expectedMtime !== undefined &&
|
|
42
|
+
(typeof expectedMtime !== 'number' || !Number.isFinite(expectedMtime))) {
|
|
43
|
+
res.status(400).json({ error: 'expectedMtime must be a finite number when provided.' });
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
res.json(await (0, droid_dashboard_service_1.saveDroidRawSettings)({ rawText, expectedMtime }));
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
if (error instanceof droid_dashboard_service_1.DroidRawSettingsValidationError) {
|
|
50
|
+
res.status(400).json({ error: error.message });
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (error instanceof droid_dashboard_service_1.DroidRawSettingsConflictError) {
|
|
54
|
+
res.status(409).json({ error: error.message, mtime: error.mtime });
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
res.status(500).json({ error: error.message });
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
exports.default = router;
|
|
61
|
+
//# sourceMappingURL=droid-routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"droid-routes.js","sourceRoot":"","sources":["../../../src/web-server/routes/droid-routes.ts"],"names":[],"mappings":";;AACA,qCAAiC;AACjC,iFAM6C;AAE7C,MAAM,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,EAAE,IAAa,EAAE,GAAa,EAAiB,EAAE;IAC/E,IAAI,CAAC;QACH,GAAG,CAAC,IAAI,CAAC,MAAM,IAAA,sDAA4B,GAAE,CAAC,CAAC;IACjD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,EAAE,IAAa,EAAE,GAAa,EAAiB,EAAE;IAChF,IAAI,CAAC;QACH,GAAG,CAAC,IAAI,CAAC,MAAM,IAAA,6CAAmB,GAAE,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,EAAE,GAAY,EAAE,GAAa,EAAiB,EAAE;IAC/E,IAAI,CAAC;QACH,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QAElD,IAAI,OAAO,OAAO,KAAK,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"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web-server/routes/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA0BH,eAAO,MAAM,SAAS,4CAAW,CAAC"}
|
|
@@ -25,6 +25,7 @@ const cliproxy_stats_routes_1 = __importDefault(require("./cliproxy-stats-routes
|
|
|
25
25
|
const cliproxy_sync_routes_1 = __importDefault(require("./cliproxy-sync-routes"));
|
|
26
26
|
const copilot_routes_1 = __importDefault(require("./copilot-routes"));
|
|
27
27
|
const cursor_routes_1 = __importDefault(require("./cursor-routes"));
|
|
28
|
+
const droid_routes_1 = __importDefault(require("./droid-routes"));
|
|
28
29
|
const misc_routes_1 = __importDefault(require("./misc-routes"));
|
|
29
30
|
const proxy_routes_1 = __importDefault(require("./proxy-routes"));
|
|
30
31
|
const auth_routes_1 = __importDefault(require("./auth-routes"));
|
|
@@ -60,6 +61,8 @@ exports.apiRoutes.use('/websearch', websearch_routes_1.default);
|
|
|
60
61
|
exports.apiRoutes.use('/copilot', copilot_routes_1.default);
|
|
61
62
|
// ==================== Cursor ====================
|
|
62
63
|
exports.apiRoutes.use('/cursor', cursor_routes_1.default);
|
|
64
|
+
// ==================== Droid ====================
|
|
65
|
+
exports.apiRoutes.use('/droid', droid_routes_1.default);
|
|
63
66
|
// ==================== CLIProxy Server Settings ====================
|
|
64
67
|
exports.apiRoutes.use('/cliproxy-server', proxy_routes_1.default);
|
|
65
68
|
// ==================== Misc (File API, Global Env) ====================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/web-server/routes/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,qCAAiC;AAEjC,wBAAwB;AACxB,sEAA6C;AAC7C,sEAA6C;AAC7C,oEAA2C;AAC3C,oEAA2C;AAC3C,wEAA+C;AAC/C,sEAA6C;AAC7C,wEAA+C;AAC/C,0EAAiD;AACjD,kFAA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|
1
|
+
{"version":3,"file":"profile-routes.d.ts","sourceRoot":"","sources":["../../../src/web-server/routes/profile-routes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI/D,QAAA,MAAM,MAAM,4CAAW,CAAC;AAExB,wBAAgB,WAAW,CAAC,SAAS,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAejE;AAoMD,eAAe,MAAM,CAAC"}
|
|
@@ -11,6 +11,7 @@ const express_1 = require("express");
|
|
|
11
11
|
const reserved_names_1 = require("../../config/reserved-names");
|
|
12
12
|
const profile_writer_1 = require("../../api/services/profile-writer");
|
|
13
13
|
const profile_reader_1 = require("../../api/services/profile-reader");
|
|
14
|
+
const droid_provider_1 = require("../../targets/droid-provider");
|
|
14
15
|
const route_helpers_1 = require("./route-helpers");
|
|
15
16
|
const router = (0, express_1.Router)();
|
|
16
17
|
function parseTarget(rawTarget) {
|
|
@@ -52,11 +53,19 @@ router.get('/', (_req, res) => {
|
|
|
52
53
|
*/
|
|
53
54
|
router.post('/', (req, res) => {
|
|
54
55
|
const { name, baseUrl, apiKey, model, opusModel, sonnetModel, haikuModel, target } = req.body;
|
|
56
|
+
const providerHint = req.body?.droidProvider ?? req.body?.provider;
|
|
57
|
+
const parsedProvider = (0, droid_provider_1.normalizeDroidProvider)(providerHint);
|
|
55
58
|
const parsedTarget = parseTarget(target);
|
|
56
59
|
if (target !== undefined && parsedTarget === null) {
|
|
57
60
|
res.status(400).json({ error: 'Invalid target. Expected: claude or droid' });
|
|
58
61
|
return;
|
|
59
62
|
}
|
|
63
|
+
if (providerHint !== undefined && parsedProvider === null) {
|
|
64
|
+
res.status(400).json({
|
|
65
|
+
error: 'Invalid droid provider. Expected: anthropic, openai, or generic-chat-completion-api',
|
|
66
|
+
});
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
60
69
|
if (!name || !baseUrl || !apiKey) {
|
|
61
70
|
res.status(400).json({ error: 'Missing required fields: name, baseUrl, apiKey' });
|
|
62
71
|
return;
|
|
@@ -80,7 +89,7 @@ router.post('/', (req, res) => {
|
|
|
80
89
|
opus: opusModel || model || '',
|
|
81
90
|
sonnet: sonnetModel || model || '',
|
|
82
91
|
haiku: haikuModel || model || '',
|
|
83
|
-
}, parsedTarget || 'claude');
|
|
92
|
+
}, parsedTarget || 'claude', parsedProvider || undefined);
|
|
84
93
|
if (!result.success) {
|
|
85
94
|
res.status(500).json({ error: result.error || 'Failed to create profile' });
|
|
86
95
|
return;
|
|
@@ -97,11 +106,19 @@ router.post('/', (req, res) => {
|
|
|
97
106
|
router.put('/:name', (req, res) => {
|
|
98
107
|
const { name } = req.params;
|
|
99
108
|
const { baseUrl, apiKey, model, opusModel, sonnetModel, haikuModel, target } = req.body;
|
|
109
|
+
const providerHint = req.body?.droidProvider ?? req.body?.provider;
|
|
110
|
+
const parsedProvider = (0, droid_provider_1.normalizeDroidProvider)(providerHint);
|
|
100
111
|
const parsedTarget = parseTarget(target);
|
|
101
112
|
if (target !== undefined && parsedTarget === null) {
|
|
102
113
|
res.status(400).json({ error: 'Invalid target. Expected: claude or droid' });
|
|
103
114
|
return;
|
|
104
115
|
}
|
|
116
|
+
if (providerHint !== undefined && parsedProvider === null) {
|
|
117
|
+
res.status(400).json({
|
|
118
|
+
error: 'Invalid droid provider. Expected: anthropic, openai, or generic-chat-completion-api',
|
|
119
|
+
});
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
105
122
|
// Check if profile exists (uses unified config when available)
|
|
106
123
|
if (!(0, profile_reader_1.apiProfileExists)(name)) {
|
|
107
124
|
res.status(404).json({ error: 'Profile not found' });
|
|
@@ -122,14 +139,23 @@ router.put('/:name', (req, res) => {
|
|
|
122
139
|
model !== undefined ||
|
|
123
140
|
opusModel !== undefined ||
|
|
124
141
|
sonnetModel !== undefined ||
|
|
125
|
-
haikuModel !== undefined
|
|
142
|
+
haikuModel !== undefined ||
|
|
143
|
+
providerHint !== undefined;
|
|
126
144
|
const hasTargetUpdate = target !== undefined;
|
|
127
145
|
if (!hasSettingsUpdates && !hasTargetUpdate) {
|
|
128
146
|
res.status(400).json({ error: 'No updates provided' });
|
|
129
147
|
return;
|
|
130
148
|
}
|
|
131
149
|
if (hasSettingsUpdates) {
|
|
132
|
-
(0, route_helpers_1.updateSettingsFile)(name, {
|
|
150
|
+
(0, route_helpers_1.updateSettingsFile)(name, {
|
|
151
|
+
baseUrl,
|
|
152
|
+
apiKey,
|
|
153
|
+
model,
|
|
154
|
+
opusModel,
|
|
155
|
+
sonnetModel,
|
|
156
|
+
haikuModel,
|
|
157
|
+
provider: parsedProvider || undefined,
|
|
158
|
+
});
|
|
133
159
|
}
|
|
134
160
|
if (hasTargetUpdate && parsedTarget) {
|
|
135
161
|
const targetUpdate = (0, profile_writer_1.updateApiProfileTarget)(name, parsedTarget);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-routes.js","sourceRoot":"","sources":["../../../src/web-server/routes/profile-routes.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,qCAAoD;AACpD,gEAAqF;AACrF,sEAI2C;AAC3C,sEAAsF;AAEtF,mDAAqD;AAErD,MAAM,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;AAExB,SAAgB,WAAW,CAAC,SAAkB;IAC5C,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,EAAE,EAAE,CAAC;QACtE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAClD,IAAI,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC;QACtD,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,IAAI,CAAC;AACd,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,EAAE,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAY,EAAE,GAAa,EAAQ,EAAE;IAC5D,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAE5B,+DAA+D;IAC/D,IAAI,CAAC,IAAA,iCAAgB,EAAC,IAAI,CAAC,EAAE,CAAC;QAC5B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAC;QACrD,OAAO;IACT,CAAC;IAED,oDAAoD;IACpD,MAAM,MAAM,GAAG,IAAA,iCAAgB,EAAC,IAAI,CAAC,CAAC;IAEtC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,0BAA0B,EAAE,CAAC,CAAC;QAC5E,OAAO;IACT,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC;AAEH,kBAAe,MAAM,CAAC"}
|
|
@@ -25,7 +25,7 @@ export declare function isConfigured(profileName: string, config: Config): boole
|
|
|
25
25
|
/**
|
|
26
26
|
* Create settings file for profile
|
|
27
27
|
*/
|
|
28
|
-
export declare function createSettingsFile(name: string, baseUrl: string, apiKey: string, models?: ModelMapping): string;
|
|
28
|
+
export declare function createSettingsFile(name: string, baseUrl: string, apiKey: string, models?: ModelMapping, provider?: string): string;
|
|
29
29
|
/**
|
|
30
30
|
* Update settings file
|
|
31
31
|
*/
|
|
@@ -36,6 +36,7 @@ export declare function updateSettingsFile(name: string, updates: {
|
|
|
36
36
|
opusModel?: string;
|
|
37
37
|
sonnetModel?: string;
|
|
38
38
|
haikuModel?: string;
|
|
39
|
+
provider?: string;
|
|
39
40
|
}): void;
|
|
40
41
|
export declare function validateFilePath(filePath: string): {
|
|
41
42
|
valid: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-helpers.d.ts","sourceRoot":"","sources":["../../../src/web-server/routes/route-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"route-helpers.d.ts","sourceRoot":"","sources":["../../../src/web-server/routes/route-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,KAAK,EAAE,MAAM,EAAY,MAAM,oBAAoB,CAAC;AAE3D,qCAAqC;AACrC,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAMvC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAKhD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAazE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,YAAiB,EACzB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAuBR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IACP,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GACA,IAAI,CAwEN;AA+CD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAClD,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAiCA"}
|
|
@@ -32,6 +32,7 @@ const path = __importStar(require("path"));
|
|
|
32
32
|
const config_manager_1 = require("../../utils/config-manager");
|
|
33
33
|
const helpers_1 = require("../../utils/helpers");
|
|
34
34
|
const claude_config_path_1 = require("../../utils/claude-config-path");
|
|
35
|
+
const droid_provider_1 = require("../../targets/droid-provider");
|
|
35
36
|
/**
|
|
36
37
|
* Read config safely with fallback.
|
|
37
38
|
* Uses loadConfigSafe which supports both unified (config.yaml) and legacy (config.json).
|
|
@@ -77,9 +78,14 @@ exports.isConfigured = isConfigured;
|
|
|
77
78
|
/**
|
|
78
79
|
* Create settings file for profile
|
|
79
80
|
*/
|
|
80
|
-
function createSettingsFile(name, baseUrl, apiKey, models = {}) {
|
|
81
|
+
function createSettingsFile(name, baseUrl, apiKey, models = {}, provider) {
|
|
81
82
|
const settingsPath = path.join((0, config_manager_1.getCcsDir)(), `${name}.settings.json`);
|
|
82
83
|
const { model, opusModel, sonnetModel, haikuModel } = models;
|
|
84
|
+
const droidProvider = (0, droid_provider_1.resolveDroidProvider)({
|
|
85
|
+
provider,
|
|
86
|
+
baseUrl,
|
|
87
|
+
model,
|
|
88
|
+
});
|
|
83
89
|
const settings = {
|
|
84
90
|
env: {
|
|
85
91
|
ANTHROPIC_BASE_URL: baseUrl,
|
|
@@ -88,6 +94,7 @@ function createSettingsFile(name, baseUrl, apiKey, models = {}) {
|
|
|
88
94
|
...(opusModel && { ANTHROPIC_DEFAULT_OPUS_MODEL: opusModel }),
|
|
89
95
|
...(sonnetModel && { ANTHROPIC_DEFAULT_SONNET_MODEL: sonnetModel }),
|
|
90
96
|
...(haikuModel && { ANTHROPIC_DEFAULT_HAIKU_MODEL: haikuModel }),
|
|
97
|
+
CCS_DROID_PROVIDER: droidProvider,
|
|
91
98
|
},
|
|
92
99
|
};
|
|
93
100
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
@@ -148,6 +155,18 @@ function updateSettingsFile(name, updates) {
|
|
|
148
155
|
delete settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
|
|
149
156
|
}
|
|
150
157
|
}
|
|
158
|
+
if (updates.provider !== undefined ||
|
|
159
|
+
updates.baseUrl !== undefined ||
|
|
160
|
+
updates.model !== undefined ||
|
|
161
|
+
settings.env?.CCS_DROID_PROVIDER) {
|
|
162
|
+
settings.env = settings.env || {};
|
|
163
|
+
const resolvedProvider = (0, droid_provider_1.resolveDroidProvider)({
|
|
164
|
+
provider: updates.provider ?? settings.env.CCS_DROID_PROVIDER,
|
|
165
|
+
baseUrl: updates.baseUrl ?? settings.env.ANTHROPIC_BASE_URL,
|
|
166
|
+
model: updates.model ?? settings.env.ANTHROPIC_MODEL,
|
|
167
|
+
});
|
|
168
|
+
settings.env.CCS_DROID_PROVIDER = resolvedProvider;
|
|
169
|
+
}
|
|
151
170
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
152
171
|
}
|
|
153
172
|
exports.updateSettingsFile = updateSettingsFile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-helpers.js","sourceRoot":"","sources":["../../../src/web-server/routes/route-helpers.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,+DAAoG;AACpG,iDAAiD;AACjD,uEAAuE;
|
|
1
|
+
{"version":3,"file":"route-helpers.js","sourceRoot":"","sources":["../../../src/web-server/routes/route-helpers.ts"],"names":[],"mappings":";AAAA;;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string;
|
|
5
|
+
category: 'overview' | 'configuration' | 'byok' | 'reference';
|
|
6
|
+
source: 'factory' | 'provider';
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CompatibleCliProviderDocLink {
|
|
10
|
+
provider: string;
|
|
11
|
+
label: string;
|
|
12
|
+
apiFormat: string;
|
|
13
|
+
url: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CompatibleCliDocsReference {
|
|
16
|
+
providerValues: string[];
|
|
17
|
+
settingsHierarchy: string[];
|
|
18
|
+
notes: string[];
|
|
19
|
+
links: CompatibleCliDocLink[];
|
|
20
|
+
providerDocs: CompatibleCliProviderDocLink[];
|
|
21
|
+
}
|
|
22
|
+
export declare function getCompatibleCliDocsReference(cliId: string): CompatibleCliDocsReference;
|
|
23
|
+
//# sourceMappingURL=compatible-cli-docs-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compatible-cli-docs-registry.d.ts","sourceRoot":"","sources":["../../../src/web-server/services/compatible-cli-docs-registry.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,UAAU,GAAG,eAAe,GAAG,MAAM,GAAG,WAAW,CAAC;IAC9D,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,0BAA0B;IACzC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,YAAY,EAAE,4BAA4B,EAAE,CAAC;CAC9C;AA8ED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,0BAA0B,CAMvF"}
|