@undefineds.co/xpod 0.3.74 → 0.3.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/container/common.js +1 -7
- package/dist/runtime/css-process.js +0 -1
- package/package.json +1 -1
- package/static/auth-callback/assets/{AiConfigContext-DNfRNaZQ.js → AiConfigContext-BvBdu_A3.js} +1 -1
- package/static/auth-callback/assets/{AiConfigPage-BBiTOm3o.js → AiConfigPage-BpDw4jco.js} +1 -1
- package/static/auth-callback/assets/{DocumentProcessingPanel-BzpEwqKT.js → DocumentProcessingPanel-BmZ_jzRr.js} +1 -1
- package/static/auth-callback/assets/{IndexLifecyclePanel-CvXMwooQ.js → IndexLifecyclePanel-BfQBjN4z.js} +1 -1
- package/static/auth-callback/assets/{IndexSubjectPanel-CayA221L.js → IndexSubjectPanel-BlsnatPt.js} +1 -1
- package/static/auth-callback/assets/{ModelAssignmentsPanel-Iew2QgtR.js → ModelAssignmentsPanel-KA6Mdndz.js} +1 -1
- package/static/auth-callback/assets/{ModelsPage-CTJKAUA3.js → ModelsPage-C7jymyIY.js} +1 -1
- package/static/auth-callback/assets/{NetworkPage--8ZCjIHB.js → NetworkPage-k2ShktNm.js} +1 -1
- package/static/auth-callback/assets/{PaneListHeader-BT-OGKL7.js → PaneListHeader-mLMe_dvU.js} +1 -1
- package/static/auth-callback/assets/{SearchIndexingPanel-CFjjk1-C.js → SearchIndexingPanel-CqV9um_t.js} +1 -1
- package/static/auth-callback/assets/{StatusSubjectPanel-DAN5Ej9q.js → StatusSubjectPanel-BgMBTbr2.js} +1 -1
- package/static/auth-callback/assets/{StatusWorkspace-CEgmKJcX.js → StatusWorkspace-zbSyhdG2.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsPage-Bk0TB4RU.js → SystemSettingsPage-CtW79nW6.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsSubjectPanel-CKl8ukiz.js → SystemSettingsSubjectPanel-ZOPKYUtZ.js} +1 -1
- package/static/auth-callback/assets/{activity-BOtct9Ie.js → activity-BQ-CQE3O.js} +1 -1
- package/static/auth-callback/assets/{auth-callback-ai6OMe6C.js → auth-callback-Htr_CB_g.js} +3 -3
- package/static/auth-callback/assets/{badge-DGSg5wio.js → badge-D5SGTJeO.js} +1 -1
- package/static/auth-callback/assets/{download-4eVPmxQ_.js → download-DK183Ldo.js} +1 -1
- package/static/auth-callback/assets/{external-link-BlD92fAM.js → external-link-LDHy_4bn.js} +1 -1
- package/static/auth-callback/assets/{index-7ppych8q.js → index-2WmlePQ9.js} +1 -1
- package/static/auth-callback/assets/{index-FrugCRsJ.js → index-BWrvgHqK.js} +1 -1
- package/static/auth-callback/assets/{index-browser-dwpJ2mdT.js → index-browser-DUd4E4-x.js} +1 -1
- package/static/auth-callback/assets/{key-round-BFOQbNNp.js → key-round-ibX79Kr-.js} +1 -1
- package/static/auth-callback/assets/{rotate-ccw-BySVgaAP.js → rotate-ccw-B2_VMaiX.js} +1 -1
- package/static/auth-callback/assets/{skeleton-CgcxPTqc.js → skeleton-F4nrpycc.js} +1 -1
- package/static/auth-callback/assets/{waypoints-DM902DhB.js → waypoints-DImIq93f.js} +1 -1
- package/static/auth-callback/assets/{workspace-layout-DlZlN49Q.js → workspace-layout-IVCSYU21.js} +1 -1
- package/static/auth-callback/auth-callback.html +1 -1
- package/static/dashboard/assets/{AiConfigContext-VnWI7bOR.js → AiConfigContext-cjjfYTo9.js} +1 -1
- package/static/dashboard/assets/{AiConfigPage-Dn3oxXcA.js → AiConfigPage-CO0DSD_j.js} +1 -1
- package/static/dashboard/assets/{DocumentProcessingPanel-CAF1uLi3.js → DocumentProcessingPanel-DMGnH8Oj.js} +1 -1
- package/static/dashboard/assets/{IndexLifecyclePanel-D9zVZwu8.js → IndexLifecyclePanel-DSkIOCL5.js} +1 -1
- package/static/dashboard/assets/{IndexSubjectPanel-_JCGwJmO.js → IndexSubjectPanel-qWN_DbAp.js} +1 -1
- package/static/dashboard/assets/{ModelAssignmentsPanel-DtlxQxFa.js → ModelAssignmentsPanel-DCf83uM3.js} +1 -1
- package/static/dashboard/assets/{ModelsPage-CCNTpXM5.js → ModelsPage-CMnvSrl5.js} +1 -1
- package/static/dashboard/assets/{NetworkPage-BAKv9unq.js → NetworkPage-C8Gkwclb.js} +1 -1
- package/static/dashboard/assets/{PaneListHeader-Dr1jq2Ii.js → PaneListHeader-BtU_8cDK.js} +1 -1
- package/static/dashboard/assets/{SearchIndexingPanel-BW0pPrQB.js → SearchIndexingPanel-DEn12pNU.js} +1 -1
- package/static/dashboard/assets/{StatusSubjectPanel-c9iebk4M.js → StatusSubjectPanel-B1_ILg2d.js} +1 -1
- package/static/dashboard/assets/{StatusWorkspace-KZ7zrrmB.js → StatusWorkspace-BG6nMNCo.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsPage-fVSfJMi9.js → SystemSettingsPage-BnWYIXaM.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsSubjectPanel-DUSxcVT8.js → SystemSettingsSubjectPanel-C_mYVPWb.js} +1 -1
- package/static/dashboard/assets/{activity-Dg4XxJA8.js → activity-DYJ7PdRl.js} +1 -1
- package/static/dashboard/assets/{badge-OHMG7sYk.js → badge-BIaZco1P.js} +1 -1
- package/static/dashboard/assets/{dashboard-UuQZ5g0B.js → dashboard-Dl40_MEa.js} +2 -2
- package/static/dashboard/assets/{download-CkbQhuL2.js → download-By16k9VK.js} +1 -1
- package/static/dashboard/assets/{external-link-C15frgwD.js → external-link-B92xOG_d.js} +1 -1
- package/static/dashboard/assets/{index-BiU8tNWd.js → index-BajZpJ48.js} +1 -1
- package/static/dashboard/assets/{index-JUkJUI4K.js → index-wsVPom_x.js} +1 -1
- package/static/dashboard/assets/{key-round-BVREfX5D.js → key-round-Clo5FOwA.js} +1 -1
- package/static/dashboard/assets/{rotate-ccw-cPEquKE_.js → rotate-ccw-smWSfi1L.js} +1 -1
- package/static/dashboard/assets/{skeleton-BPM2LdA5.js → skeleton-BrTaGeJw.js} +1 -1
- package/static/dashboard/assets/{waypoints-Cd3kODMk.js → waypoints-DGPQInE7.js} +1 -1
- package/static/dashboard/assets/{workspace-layout-BP3gLLXb.js → workspace-layout-CPU4XRmb.js} +1 -1
- package/static/dashboard/dashboard.html +1 -1
- package/static/settings/assets/{AiConfigContext-B-D3riwG.js → AiConfigContext-CT29_OyW.js} +1 -1
- package/static/settings/assets/{AiConfigPage-CAYT-CgT.js → AiConfigPage-WIE95S28.js} +1 -1
- package/static/settings/assets/{DocumentProcessingPanel-D__vS86O.js → DocumentProcessingPanel-KG8Sq999.js} +1 -1
- package/static/settings/assets/{IndexLifecyclePanel-CuYEAG62.js → IndexLifecyclePanel-iKvtHDXY.js} +1 -1
- package/static/settings/assets/{IndexSubjectPanel-Do71gQQC.js → IndexSubjectPanel-BQdSCkk4.js} +1 -1
- package/static/settings/assets/{ModelAssignmentsPanel-Cn3kSze7.js → ModelAssignmentsPanel-P8QcVB0F.js} +1 -1
- package/static/settings/assets/{ModelsPage-BKO0ARYt.js → ModelsPage-UZkZGqor.js} +1 -1
- package/static/settings/assets/{NetworkPage-XPYrdyVd.js → NetworkPage-Dcpcvg15.js} +1 -1
- package/static/settings/assets/{PaneListHeader-BAiQcCss.js → PaneListHeader--gHtZws5.js} +1 -1
- package/static/settings/assets/{SearchIndexingPanel-Bx3Fco0x.js → SearchIndexingPanel-DdgJSJYQ.js} +1 -1
- package/static/settings/assets/{StatusSubjectPanel-BzKzXmSL.js → StatusSubjectPanel-UOxp_XVL.js} +1 -1
- package/static/settings/assets/{StatusWorkspace-NjLpo9xp.js → StatusWorkspace-CPNXuD12.js} +1 -1
- package/static/settings/assets/{SystemSettingsPage-CclI_Lpv.js → SystemSettingsPage-B6ySeVPw.js} +1 -1
- package/static/settings/assets/{SystemSettingsSubjectPanel-CMnSE-8N.js → SystemSettingsSubjectPanel-I7zWmpiI.js} +1 -1
- package/static/settings/assets/{activity-DYpNPFzG.js → activity-CFhmzahP.js} +1 -1
- package/static/settings/assets/{badge-C7Vhmg28.js → badge-BBdUc5B-.js} +1 -1
- package/static/settings/assets/{download-DdXcAiwj.js → download-WJE9-yxQ.js} +1 -1
- package/static/settings/assets/{external-link-D7thdQae.js → external-link-RKoYyCp_.js} +1 -1
- package/static/settings/assets/{index-CwBKvDQZ.js → index-Bq2o0Bif.js} +1 -1
- package/static/settings/assets/{index-BnYbrf5s.js → index-DvxneI5O.js} +1 -1
- package/static/settings/assets/{index-browser-DYzi1DO1.js → index-browser-Qmo6EsFT.js} +1 -1
- package/static/settings/assets/{key-round-BXErodZA.js → key-round-r-D9sQUK.js} +1 -1
- package/static/settings/assets/{rotate-ccw-DPyOBmDD.js → rotate-ccw-D3IIhbPH.js} +1 -1
- package/static/settings/assets/{settings-BGpEf8nx.js → settings-D8oDBXWg.js} +3 -3
- package/static/settings/assets/{skeleton-S9l3JIr9.js → skeleton-DrL4RQuw.js} +1 -1
- package/static/settings/assets/{waypoints-C5By7zWc.js → waypoints-C5sRhpJw.js} +1 -1
- package/static/settings/assets/{workspace-layout-Bb6RVAEx.js → workspace-layout-B4ALmWsM.js} +1 -1
- package/static/settings/settings.html +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as E,k as pe,r as d,t as B,j as e,C as N,a as w,b as k,d as C,e as S,B as y,n as se,R as xe,N as he,l as fe,m as be}from"./auth-callback-
|
|
1
|
+
import{c as E,k as pe,r as d,t as B,j as e,C as N,a as w,b as k,d as C,e as S,B as y,n as se,R as xe,N as he,l as fe,m as be}from"./auth-callback-Htr_CB_g.js";import{P as ve}from"./PaneListHeader-mLMe_dvU.js";import{N as re,W as je}from"./waypoints-DImIq93f.js";import{A as ie}from"./activity-BQ-CQE3O.js";import{T as ge,u as ye}from"./workspace-layout-IVCSYU21.js";import{E as Ne}from"./external-link-LDHy_4bn.js";import{B as L}from"./badge-D5SGTJeO.js";import{R as we}from"./rotate-ccw-B2_VMaiX.js";import{D as ke}from"./download-DK183Ldo.js";const Ce=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],Se=E("cable",Ce);const Pe=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],le=E("earth",Pe);const Re=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],De=E("lock-keyhole",Re);const Te=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Ae=E("radio",Te);const Ee=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],Le=E("route",Ee);const Ie=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Me=E("shield-check",Ie);const $e=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Oe=E("wifi",$e);async function Ue({fetchImpl:t}){return Q(t,X("/api/network/settings/status"),{method:"GET",credentials:"include",headers:{accept:"application/json"}})}async function qe({fetchImpl:t}){return Q(t,X("/api/network/settings/diagnose"),{method:"POST",credentials:"include",headers:{accept:"application/json"}})}async function He({fetchImpl:t}){await Q(t,X("/api/network/settings/certificate/renew"),{method:"POST",credentials:"include",headers:{accept:"application/json"}})}async function ze({podUrl:t,fetchImpl:a,patch:s}){return Q(a,Ve("/api/network/settings/configuration",t),{method:"PUT",credentials:"include",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(s)})}function X(t){const a=typeof window>"u"?"http://localhost":window.location.origin;return new URL(t,a).toString()}function Ve(t,a){return a?new URL(t,a).toString():X(t)}async function Q(t,a,s){const r=await t(a,s);if(!r.ok)throw await r.arrayBuffer(),new Error("Network settings request failed. Please try again.");if(!r.headers.get("content-type")?.includes("application/json"))throw await r.arrayBuffer(),new Error("Network settings request failed. Please try again.");return await r.json()}const te=[{id:"overview",label:"Overview",path:"",icon:re},{id:"endpoints",label:"Endpoints",path:"endpoints",icon:Se},{id:"addresses",label:"Addresses",path:"addresses",icon:le},{id:"domain-dns",label:"Domain & DNS",path:"domain-dns",icon:Le},{id:"https",label:"HTTPS",path:"https",icon:De},{id:"tunnel-profiles",label:"Tunnel Profiles",path:"tunnel-profiles",icon:je},{id:"p2p",label:"P2P",path:"p2p",icon:Ae},{id:"diagnostics",label:"Diagnostics",path:"diagnostics",icon:ie}];function Be(t){const a=["Xpod Network Diagnostics",`Generated: ${t.generatedAt}`,`Canonical URL: ${t.endpoint??"Unavailable"}`],s=t.checks.flatMap(r=>["",`[${r.status.toUpperCase()}] ${r.label}`,...r.detail?[r.detail]:[]]);return[...a,...s].join(`
|
|
2
2
|
`)}function jt(){const t=pe(),[a,s]=d.useState(),[r,n]=d.useState([]),[l,o]=d.useState(),[x,u]=d.useState(),[P,h]=d.useState(!1),[T,$]=d.useState(!1),[i,p]=d.useState(!1),[v,R]=d.useState(!1),[_,de]=d.useState(),O=d.useRef(0),U=d.useRef(0),q=d.useRef(0),H=d.useRef(void 0),z=d.useRef(!0),F=typeof window>"u"?void 0:window.location.origin,g=F?`local-host:${F}`:void 0,D=globalThis.fetch;d.useEffect(()=>(z.current=!0,()=>{z.current=!1,O.current+=1,U.current+=1,q.current+=1}),[]);const K=d.useCallback((c,m)=>z.current&&O.current===c&&H.current===m,[]),W=d.useCallback((c,m)=>z.current&&U.current===c&&H.current===m,[]),G=d.useCallback((c,m)=>z.current&&q.current===c&&H.current===m,[]),V=d.useCallback(async()=>{const c=g;if(!c)return;const m=O.current+1;O.current=m,h(!0),u(void 0);try{const A=await Ue({fetchImpl:D});K(m,c)&&s(A)}catch{K(m,c)&&u("网络设置请求失败,请重试。")}finally{K(m,c)&&h(!1)}},[D,g,K]);d.useEffect(()=>{let c=!1;return H.current=g,O.current+=1,U.current+=1,q.current+=1,queueMicrotask(()=>{c||H.current!==g||(s(void 0),n([]),o(void 0),u(void 0),h(!1),$(!1),p(!1),g&&V())}),()=>{c=!0}},[g,V]);const ce=d.useCallback(async()=>{const c=g;if(!c)return;const m=U.current+1;U.current=m,$(!0),u(void 0);try{const A=await qe({fetchImpl:D});W(m,c)&&(n(A.checks),o(new Date),B({description:"诊断完成"}))}catch{W(m,c)&&u("网络诊断失败,请重试。")}finally{W(m,c)&&$(!1)}},[D,g,W]),ue=d.useCallback(async()=>{const c=g;if(!c)return;const m=q.current+1;q.current=m,p(!0),u(void 0);try{await He({fetchImpl:D}),G(m,c)&&(B({variant:"success",description:"证书续签成功"}),await V())}catch{G(m,c)&&u("证书续签失败,请重试。")}finally{G(m,c)&&p(!1)}},[D,g,G,V]),J=d.useCallback(async c=>{if(F){R(!0),u(void 0);try{const m=await ze({fetchImpl:D,patch:c});s(A=>A&&{...A,configuration:m.configuration}),de(m.applyState),B({variant:"success",description:"Network configuration saved"})}catch{u("网络配置保存失败,请重试。")}finally{R(!1)}}},[D,F]),me=d.useMemo(()=>[{key:"local",title:"本机",values:a?.addresses.local??[]},{key:"lan",title:"局域网",values:a?.addresses.lan??[]},{key:"public",title:"公网",values:a?.addresses.public??[]}],[a]),ne=t.pathname.split("/").filter(Boolean).at(-1),b=te.some(c=>c.path===ne)?ne:"overview";return e.jsx(ge,{mode:"auto",listHeader:e.jsx(ve,{title:"Network"}),list:e.jsx(_e,{}),mainHeader:e.jsx(Fe,{title:te.find(c=>(c.path||"overview")===b)?.label??"Overview",loading:P,stale:P&&!!a,onRefresh:V}),main:e.jsxs("section",{className:"flex min-h-full flex-col gap-4 bg-background p-6",children:[x?e.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:x}):null,(b==="overview"||b==="endpoints")&&e.jsx(Ze,{endpoint:a?.endpoint,loading:P&&!a}),b==="overview"&&e.jsx(Ke,{status:a}),(b==="overview"||b==="addresses")&&e.jsx(tt,{sections:me,loading:P&&!a,diagnostics:r,checkedAt:l}),b==="overview"&&e.jsx(lt,{status:a}),b==="domain-dns"&&e.jsxs(e.Fragment,{children:[e.jsx(rt,{status:a}),e.jsx(Ge,{configuration:a?.configuration,saving:v,applyState:_,onSave:J})]}),b==="https"&&e.jsxs(e.Fragment,{children:[e.jsx(it,{status:a}),e.jsx(Je,{configuration:a?.configuration,saving:v,applyState:_,onSave:J})]}),b==="tunnel-profiles"&&e.jsxs(e.Fragment,{children:[e.jsx(We,{title:"Observed tunnel",label:"Tunnel",capability:a?.tunnel}),e.jsx(Xe,{configuration:a?.configuration,saving:v,applyState:_,onSave:J})]}),b==="p2p"&&e.jsx(Ye,{configuration:a?.configuration,saving:v,applyState:_,onSave:J}),(b==="overview"||b==="diagnostics"||b==="https")&&e.jsx(ot,{status:a,endpoint:a?.endpoint,diagnostics:r,diagnosing:T,renewing:i,onDiagnose:ce,onRenewCertificate:ue})]}),className:"min-h-full"})}function _e(){const t=ye();return e.jsx("aside",{className:"h-full border-r border-border bg-muted/20 py-2",children:e.jsx("nav",{"aria-label":"Network sections","data-list-navigation":!0,children:te.map(a=>{const s=a.icon,r=`/network${a.path?`/${a.path}`:""}`;return e.jsxs(he,{to:r,onClick:()=>t.openMain(),onKeyDown:fe,className:({isActive:n})=>be(n,{compact:!1}),end:a.path==="",children:[e.jsx(s,{className:"h-4 w-4","aria-hidden":"true"}),a.label]},a.id)})})})}function Fe({title:t,loading:a,stale:s,onRefresh:r}){return e.jsxs("div",{className:"flex h-full min-w-0 items-center justify-between gap-4 px-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h1",{className:"text-sm font-semibold text-foreground",children:["Network · ",t]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground","aria-live":"polite",children:s?"Refreshing · showing previous snapshot":"接入点、DNS、TLS、隧道与连通性诊断"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:r,disabled:a,children:[e.jsx(xe,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"刷新"]})})]})}function Ke({status:t}){const a=t?.addresses.public[0]??t?.addresses.lan[0]??t?.addresses.local[0]??t?.endpoint,s=t?!t.dns.supported||t.dns.status==="unsupported"?"Configure Domain & DNS, then recheck observed DNS.":!t.tls.supported||!["valid","active","ready"].includes(t.tls.status)?"Review HTTPS configuration and certificate renewal evidence.":"No connectivity action is currently required.":"Refresh network status.";return e.jsxs(N,{children:[e.jsxs(w,{children:[e.jsx(k,{className:"text-base",children:"Recommended access path"}),e.jsx(C,{children:"Chosen from observed public, LAN, then local reachability"})]}),e.jsxs(S,{className:"space-y-3 text-sm",children:[e.jsx("div",{className:"break-words font-medium",children:a??"Unavailable"}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-4",children:[e.jsxs(L,{variant:"outline",children:["Local ",t?.addresses.local.length?"available":"unavailable"]}),e.jsxs(L,{variant:"outline",children:["LAN ",t?.addresses.lan.length?"available":"unavailable"]}),e.jsxs(L,{variant:"outline",children:["Public ",t?.addresses.public.length?"available":"unavailable"]}),e.jsxs(L,{variant:"outline",children:["Tunnel ",t?.tunnel.status??"unknown"]})]}),e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsx("div",{className:"font-medium",children:"Next action"}),e.jsx("div",{className:"mt-1 text-muted-foreground",children:s})]})]})]})}function We({title:t,label:a,capability:s,extra:r}){return e.jsxs(N,{children:[e.jsxs(w,{children:[e.jsx(k,{className:"text-base",children:t}),e.jsx(C,{children:"Observed runtime state"})]}),e.jsx(S,{children:e.jsx(M,{label:a,capability:s,extra:r})})]})}function Y({title:t}){return e.jsxs(N,{children:[e.jsxs(w,{children:[e.jsx(k,{className:"text-base",children:t}),e.jsx(C,{children:"Desired configuration"})]}),e.jsxs(S,{className:"text-sm text-muted-foreground",children:["This runtime does not report a configurable ",t," capability."]})]})}function Ge({configuration:t,saving:a,applyState:s,onSave:r}){const[n,l]=d.useState(t?.domainDns),[o,x]=d.useState("");return d.useEffect(()=>{let u=!1;return queueMicrotask(()=>{u||l(t?.domainDns)}),()=>{u=!0}},[t]),n?e.jsxs(Z,{title:"Saved configuration",applyState:s,children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(j,{name:"domain",label:"Domain",value:n.domain,onChange:u=>l({...n,domain:u})}),e.jsx(j,{name:"provider",label:"DNS provider",value:n.provider,onChange:u=>l({...n,provider:u})}),e.jsx(oe,{name:"recordTtl",label:"Record TTL (seconds)",value:n.recordTtl,min:30,max:86400,onChange:u=>l({...n,recordTtl:u})}),e.jsx(j,{name:"dnsCredential",label:n.credentialConfigured?"Replace credential (configured)":"Credential",value:o,type:"password",onChange:x})]}),e.jsx(ae,{label:"Enable DDNS",checked:n.ddnsEnabled,onChange:u=>l({...n,ddnsEnabled:u})}),e.jsx(ee,{label:"Save DNS configuration",saving:a,onClick:()=>r({domainDns:{domain:n.domain,ddnsEnabled:n.ddnsEnabled,provider:n.provider,recordTtl:n.recordTtl,...o?{credential:o}:{}}})})]}):e.jsx(Y,{title:"Domain & DNS"})}function Je({configuration:t,saving:a,applyState:s,onSave:r}){const[n,l]=d.useState(t?.https);return d.useEffect(()=>{let o=!1;return queueMicrotask(()=>{o||l(t?.https)}),()=>{o=!0}},[t]),n?e.jsxs(Z,{title:"Saved configuration",applyState:s,children:[e.jsx(ae,{label:"Enable HTTPS",checked:n.enabled,onChange:o=>l({...n,enabled:o})}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(j,{name:"acmeEmail",label:"ACME email",value:n.acmeEmail,onChange:o=>l({...n,acmeEmail:o})}),e.jsx(j,{name:"acmeDomains",label:"Certificate domains",value:n.domains.join(", "),onChange:o=>l({...n,domains:o.split(",").map(x=>x.trim()).filter(Boolean)})}),e.jsx(j,{name:"certificatePath",label:"Certificate path",value:n.certificatePath??"",onChange:o=>l({...n,certificatePath:o})}),e.jsx(j,{name:"certificateKeyPath",label:"Private-key path",value:n.certificateKeyPath??"",onChange:o=>l({...n,certificateKeyPath:o})}),e.jsx(oe,{name:"renewBeforeDays",label:"Renew before (days)",value:n.renewBeforeDays,min:1,max:90,onChange:o=>l({...n,renewBeforeDays:o})})]}),e.jsx(ee,{label:"Save HTTPS configuration",saving:a,onClick:()=>r({https:n})})]}):e.jsx(Y,{title:"HTTPS"})}function Xe({configuration:t,saving:a,applyState:s,onSave:r}){const[n,l]=d.useState(t?.tunnelProfiles.activeProfileId??""),[o,x]=d.useState(t?.tunnelProfiles.profiles??[]),[u,P]=d.useState({});if(d.useEffect(()=>{let i=!1;return queueMicrotask(()=>{i||(l(t?.tunnelProfiles.activeProfileId??""),x(t?.tunnelProfiles.profiles??[]),P({}))}),()=>{i=!0}},[t]),!t)return e.jsx(Y,{title:"Tunnel Profiles"});const h=(i,p)=>x(v=>v.map(R=>R.id===i?{...R,...p}:R)),T=()=>{const i=`tunnel-${Date.now()}`;x(p=>[...p,{id:i,provider:"ngrok",label:"New tunnel",credentialConfigured:!1,parameters:{}}])},$=i=>{x(p=>p.filter(v=>v.id!==i)),n===i&&l("")};return e.jsxs(Z,{title:"Saved tunnel profiles",applyState:s,children:[e.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:["Active profile",e.jsxs("select",{value:n,onChange:i=>l(i.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3 sm:max-w-sm",children:[e.jsx("option",{value:"",children:"None"}),o.map(i=>e.jsxs("option",{value:i.id,children:[i.label," · ",i.provider]},i.id))]})]}),e.jsx("div",{className:"space-y-3",children:o.map(i=>e.jsxs("div",{className:"space-y-3 rounded-md border border-border p-3 text-sm",children:[e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(j,{name:`tunnel-label-${i.id}`,label:"Label",value:i.label,onChange:p=>h(i.id,{label:p})}),e.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:["Provider",e.jsxs("select",{value:i.provider,onChange:p=>h(i.id,{provider:p.target.value,parameters:{}}),className:"block h-10 w-full rounded-md border border-input bg-background px-3",children:[e.jsx("option",{value:"ngrok",children:"ngrok"}),e.jsx("option",{value:"cloudflare",children:"Cloudflare"}),e.jsx("option",{value:"frp",children:"frp"})]})]}),e.jsx(j,{name:`tunnel-url-${i.id}`,label:"Public endpoint",value:i.publicEndpoint??"",onChange:p=>h(i.id,{publicEndpoint:p})}),e.jsx(j,{name:`tunnel-credential-${i.id}`,label:i.credentialConfigured?"Replace credential (configured)":"Credential",type:"password",value:u[i.id]??"",onChange:p=>P(v=>({...v,[i.id]:p}))})]}),e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer font-medium",children:"Provider-specific parameters"}),e.jsx("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:Qe(i.provider).map(({key:p,label:v})=>e.jsx(j,{name:`tunnel-${p}-${i.id}`,label:v,value:i.parameters?.[p]??"",onChange:R=>h(i.id,{parameters:{...i.parameters,[p]:R}})},p))})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:[n===i.id?"Active after restart":"Inactive"," · credential ",i.credentialConfigured?"configured":"missing"]}),e.jsx(y,{type:"button",size:"sm",variant:"ghost",onClick:()=>$(i.id),children:"Remove"})]})]},i.id))}),e.jsx(y,{type:"button",size:"sm",variant:"outline",onClick:T,children:"Add tunnel profile"}),e.jsx(ee,{label:"Save tunnel profiles",saving:a,onClick:()=>r({tunnelProfiles:{activeProfileId:n,profiles:o.map(i=>({id:i.id,provider:i.provider,label:i.label,publicEndpoint:i.publicEndpoint,parameters:i.parameters,...u[i.id]?{credential:u[i.id]}:{}}))}})})]})}function Qe(t){return t==="ngrok"?[{key:"region",label:"Region"},{key:"hostname",label:"Reserved hostname"}]:t==="cloudflare"?[{key:"tunnelId",label:"Tunnel ID"},{key:"hostname",label:"Hostname"}]:[{key:"serverHost",label:"Server host"},{key:"serverPort",label:"Server port"},{key:"remotePort",label:"Remote port"}]}function Ye({configuration:t,saving:a,applyState:s,onSave:r}){const[n,l]=d.useState(t?.p2p);return d.useEffect(()=>{let o=!1;return queueMicrotask(()=>{o||l(t?.p2p)}),()=>{o=!0}},[t]),n?e.jsxs(Z,{title:"Saved P2P configuration",applyState:s,children:[e.jsx(ae,{label:"Enable P2P fallback",checked:n.enabled,onChange:o=>l({...n,enabled:o})}),e.jsx(j,{name:"signalService",label:"Signal service",value:n.signalService,onChange:o=>l({...n,signalService:o})}),e.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:["Fallback policy",e.jsxs("select",{value:n.fallbackPolicy,onChange:o=>l({...n,fallbackPolicy:o.target.value}),className:"block h-10 w-full rounded-md border border-input bg-background px-3 sm:max-w-sm",children:[e.jsx("option",{value:"never",children:"Never"}),e.jsx("option",{value:"when-direct-unavailable",children:"When direct is unavailable"}),e.jsx("option",{value:"prefer-p2p",children:"Prefer P2P"})]})]}),e.jsx(ee,{label:"Save P2P configuration",saving:a,onClick:()=>r({p2p:n})})]}):e.jsx(Y,{title:"P2P"})}function Z({title:t,applyState:a,children:s}){return e.jsxs(N,{children:[e.jsxs(w,{children:[e.jsx(k,{className:"text-base",children:t}),e.jsx(C,{children:"Desired configuration · not presented as observed until verified"})]}),e.jsxs(S,{className:"space-y-4",children:[a==="restart-required"?e.jsx("div",{role:"status",className:"rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:bg-amber-950/20 dark:text-amber-200",children:"Saved · restart required"}):null,s]})]})}function j({name:t,label:a,value:s,type:r="text",onChange:n}){return e.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:[a,e.jsx("input",{name:t,type:r,value:s,onChange:l=>n(l.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3 text-sm"})]})}function oe({name:t,label:a,value:s,min:r,max:n,onChange:l}){return e.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:[a,e.jsx("input",{name:t,type:"number",value:s,min:r,max:n,onChange:o=>l(o.target.valueAsNumber),className:"block h-10 w-full rounded-md border border-input bg-background px-3 text-sm"})]})}function ae({label:t,checked:a,onChange:s}){return e.jsxs("label",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-3 text-sm font-medium",children:[t,e.jsx("input",{type:"checkbox",checked:a,onChange:r=>s(r.target.checked)})]})}function ee({label:t,saving:a,onClick:s}){return e.jsx("div",{className:"flex justify-end",children:e.jsx(y,{type:"button",onClick:s,disabled:a,children:a?"Saving…":t})})}function Ze({endpoint:t,loading:a}){const s=[{label:"Canonical URL",value:t},{label:"API endpoint",value:t?et(t,"/api/"):void 0}],r=async(n,l)=>{await window.navigator.clipboard.writeText(l),B({description:`${n} copied`})};return e.jsxs(N,{children:[e.jsxs(w,{children:[e.jsxs(k,{className:"flex items-center gap-2 text-base",children:[e.jsx(le,{className:"h-4 w-4","aria-hidden":"true"}),"接入点"]}),e.jsx(C,{children:a?"正在解析接入点":"Observed endpoints · Currently effective route is the canonical URL"})]}),e.jsx(S,{className:"space-y-3",children:s.map(({label:n,value:l})=>e.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-md border border-border p-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:n}),e.jsx("div",{className:"mt-1 break-words text-sm text-foreground",children:l||"Unavailable"})]}),l?e.jsxs("div",{className:"flex shrink-0 gap-1",children:[e.jsx(y,{type:"button",size:"icon",variant:"ghost","aria-label":`Copy ${n}`,onClick:()=>{r(n,l)},children:e.jsx(se,{className:"h-4 w-4","aria-hidden":"true"})}),e.jsx(y,{type:"button",size:"icon",variant:"ghost","aria-label":`Open ${n}`,onClick:()=>window.open(l,"_blank","noopener,noreferrer"),children:e.jsx(Ne,{className:"h-4 w-4","aria-hidden":"true"})})]}):null]},n))})]})}function et(t,a){try{return new URL(a,t).toString()}catch{return t}}function tt({sections:t,loading:a,diagnostics:s,checkedAt:r}){return e.jsxs(N,{children:[e.jsxs(w,{children:[e.jsxs(k,{className:"flex items-center gap-2 text-base",children:[e.jsx(Oe,{className:"h-4 w-4","aria-hidden":"true"}),"网络地址"]}),e.jsx(C,{children:a?"正在刷新地址":"由运行时网络能力上报"})]}),e.jsx(S,{className:"space-y-4",children:t.map(n=>e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:n.title}),n.values.length>0?e.jsx("div",{className:"mt-1 space-y-1",children:n.values.map(l=>e.jsx(at,{scope:n.key,value:l,diagnostics:s,checkedAt:r},l))}):e.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:"未提供"})]},n.key))})]})}function at({scope:t,value:a,diagnostics:s,checkedAt:r}){const n=nt(a),l=s.find(o=>o.id==="endpoint");return e.jsxs("div",{className:"rounded-md border border-border p-3 text-sm",children:[e.jsx("div",{className:"break-words font-medium text-foreground",children:a}),e.jsxs("dl",{className:"mt-2 grid gap-x-4 gap-y-1 text-xs sm:grid-cols-2",children:[e.jsx(f,{label:"Interface",value:t==="local"?"Loopback":t==="lan"?"LAN interface (name not reported)":"Public route"}),e.jsx(f,{label:"IP version",value:n.ipVersion}),e.jsx(f,{label:"Port",value:n.port}),e.jsx(f,{label:"Reachability",value:l?st(l.status):"Not checked"}),e.jsx(f,{label:"Latency",value:l?.durationMs==null?"Not checked":`${l.durationMs} ms`}),e.jsx(f,{label:"Last checked",value:l?.checkedAt?I(l.checkedAt):r?r.toLocaleString():"Not checked"})]})]})}function f({label:t,value:a}){return e.jsxs("div",{className:"flex justify-between gap-3",children:[e.jsx("dt",{className:"text-muted-foreground",children:t}),e.jsx("dd",{className:"text-right text-foreground",children:a})]})}function nt(t){try{const a=new URL(t),s=a.hostname.replace(/^\[|\]$/g,"");return{ipVersion:s.includes(":")?"IPv6":/^\d{1,3}(?:\.\d{1,3}){3}$/.test(s)?"IPv4":"Resolved hostname",port:a.port||(a.protocol==="https:"?"443":a.protocol==="http:"?"80":"Not reported")}}catch{return{ipVersion:"Not reported",port:"Not reported"}}}function st(t){return t==="ok"?"Reachable":t==="warning"?"Warning":t==="error"?"Unreachable":"Unsupported"}function rt({status:t}){const a=t?.configuration?.domainDns,s=(t?.addresses.public??[]).map(r=>{try{return new URL(r).hostname}catch{return r}});return e.jsxs(N,{children:[e.jsxs(w,{children:[e.jsx(k,{className:"text-base",children:"Observed DNS"}),e.jsx(C,{children:"Observed state is kept separate from desired DNS policy."})]}),e.jsxs(S,{className:"space-y-3",children:[e.jsx(M,{label:"Runtime status",capability:t?.dns}),e.jsxs("dl",{className:"grid gap-2 text-sm sm:grid-cols-2",children:[e.jsx(f,{label:"Observed hostnames",value:s.join(", ")||"Not reported"}),e.jsx(f,{label:"Expected domain",value:a?.domain||"Not configured"}),e.jsx(f,{label:"Expected value",value:t?.addresses.public[0]||"Not reported"}),e.jsx(f,{label:"Provider",value:a?.provider||"Not configured"})]})]})]})}function it({status:t}){const a=t?.configuration?.https;return e.jsxs(N,{children:[e.jsxs(w,{children:[e.jsx(k,{className:"text-base",children:"Observed HTTPS"}),e.jsx(C,{children:"Certificate evidence reported by the active runtime."})]}),e.jsxs(S,{className:"space-y-3",children:[e.jsx(M,{label:"TLS",capability:t?.tls,extra:t?.tls.expiresAt?`Expires ${I(t.tls.expiresAt)}`:void 0}),e.jsxs("dl",{className:"grid gap-2 text-sm sm:grid-cols-2",children:[e.jsx(f,{label:"Certificate domains",value:t?.tls.domains?.join(", ")||a?.domains.join(", ")||"Not reported"}),e.jsx(f,{label:"Issuer",value:t?.tls.issuer||"Not reported by runtime"}),e.jsx(f,{label:"Validity",value:t?.tls.validFrom?`${I(t.tls.validFrom)} — ${t.tls.expiresAt?I(t.tls.expiresAt):"open"}`:t?.tls.status??"Not reported"}),e.jsx(f,{label:"Expiry",value:t?.tls.expiresAt?I(t.tls.expiresAt):"Not reported"}),e.jsx(f,{label:"Renewal status",value:t?.tls.renewalStatus||(t?.actions.renewCertificate?"Renewal available":"Renewal unavailable")}),e.jsx(f,{label:"Renewal policy",value:a?`${a.renewBeforeDays} days before expiry`:"Not configured"})]})]})]})}function lt({status:t}){return e.jsxs(N,{children:[e.jsxs(w,{children:[e.jsxs(k,{className:"flex items-center gap-2 text-base",children:[e.jsx(re,{className:"h-4 w-4","aria-hidden":"true"}),"网络能力"]}),e.jsx(C,{children:"服务端声明的网络支持"})]}),e.jsxs(S,{className:"grid gap-3 text-sm",children:[e.jsx(M,{label:"TLS",capability:t?.tls,extra:t?.tls.expiresAt?`到期时间 ${I(t.tls.expiresAt)}`:void 0}),e.jsx(M,{label:"DNS",capability:t?.dns}),e.jsx(M,{label:"Tunnel",capability:t?.tunnel})]})]})}function ot({status:t,endpoint:a,diagnostics:s,diagnosing:r,renewing:n,onDiagnose:l,onRenewCertificate:o}){const x=s.length>0?Be({generatedAt:new Date().toISOString(),endpoint:a,checks:s}):void 0,u=async()=>{x&&(await window.navigator.clipboard.writeText(x),B({description:"Diagnostic report copied"}))},P=()=>{if(!x)return;const h=URL.createObjectURL(new Blob([x],{type:"text/plain;charset=utf-8"})),T=document.createElement("a");T.href=h,T.download=`xpod-network-diagnostics-${new Date().toISOString().replace(/[:.]/g,"-")}.txt`,T.click(),URL.revokeObjectURL(h)};return e.jsxs(N,{children:[e.jsxs(w,{children:[e.jsxs(k,{className:"flex items-center gap-2 text-base",children:[e.jsx(ie,{className:"h-4 w-4","aria-hidden":"true"}),"操作"]}),e.jsx(C,{children:"仅显示网络能力允许的操作"})]}),e.jsxs(S,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t?.actions.diagnose?e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:l,disabled:r,children:[e.jsx(Me,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"连通性诊断"]}):null,t?.actions.renewCertificate?e.jsxs(y,{type:"button",size:"sm",variant:"subtle",onClick:o,disabled:n,children:[e.jsx(we,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"续签证书"]}):null,e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:()=>{u()},disabled:!x,children:[e.jsx(se,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Copy diagnostics"]}),e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:P,disabled:!x,children:[e.jsx(ke,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Export diagnostics"]})]}),s.length>0?e.jsx("div",{className:"space-y-2",children:s.map(h=>e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:h.label}),e.jsx(L,{variant:h.status==="ok"?"secondary":"outline",children:h.status})]}),h.detail?e.jsx("div",{className:"mt-1 break-words text-xs text-muted-foreground",children:h.detail}):null]},h.id))}):e.jsx("div",{className:"text-sm text-muted-foreground",children:"尚未运行过诊断。"})]})]})}function M({label:t,capability:a,extra:s}){const r=a?.supported===!0;return e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:r?t:`${t} 不支持`}),e.jsx("div",{className:"text-xs text-muted-foreground",children:a?.status??"读取中"})]}),e.jsx(L,{variant:r?"secondary":"outline",children:r?"支持":"不支持"})]}),s?e.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:s}):null]})}function I(t){if(!t)return"暂无记录";const a=new Date(t);return Number.isNaN(a.getTime())?"暂无记录":a.toLocaleString()}export{jt as default};
|
package/static/auth-callback/assets/{PaneListHeader-BT-OGKL7.js → PaneListHeader-mLMe_dvU.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./auth-callback-
|
|
1
|
+
import{j as t}from"./auth-callback-Htr_CB_g.js";function s({title:e}){return t.jsx("div",{className:"flex h-full items-center px-4 text-sm font-semibold text-foreground",children:e})}export{s as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as g,j as n}from"./auth-callback-
|
|
1
|
+
import{r as g,j as n}from"./auth-callback-Htr_CB_g.js";import{i as p,A as f}from"./ModelAssignmentsPanel-KA6Mdndz.js";import{u as k}from"./AiConfigContext-BvBdu_A3.js";import"./ai-connections-Bm52UO7Y.js";function I(){const{config:s,capabilities:d,save:o,rebuild:c,saveAndRebuild:i,saving:l,rebuilding:r}=k(),[e,a]=g.useState(s?.searchIndexing);if(g.useEffect(()=>{let t=!1;return queueMicrotask(()=>{t||a(s?.searchIndexing)}),()=>{t=!0}},[s]),!e)return null;const u=async t=>{t.preventDefault(),await o({searchIndexing:e})},x=e.ftsEnabled&&e.vectorEnabled?"all":e.vectorEnabled?"vector":"fts",b=d?.rebuildTargets?.includes(x)===!0,m=p(e,s?.searchIndexing);return n.jsxs(f,{title:"Search & Indexing",description:"Choose which derived search indexes Xpod maintains for this Pod.",onSubmit:u,onRestore:()=>o({searchIndexing:{ftsEnabled:!0,vectorEnabled:!0,progressiveIndexingEnabled:!0,textBackend:"auto",vectorBackend:"auto"}}),saving:l||r,dirty:m,footerActions:n.jsx("button",{type:"button",disabled:!b||l||r,onClick:()=>m?i({searchIndexing:e},x):c(x),className:"h-9 rounded-md border border-input px-3 text-sm font-medium disabled:opacity-50",children:r?"Scheduling…":m&&b?"Save and schedule rebuild":b?"Schedule rebuild":"Rebuild unavailable on this runtime"}),children:[n.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[n.jsx(h,{title:"Full-text Search",enabled:e.ftsEnabled,onEnabled:t=>a({...e,ftsEnabled:t}),backend:e.textBackend,onBackend:t=>a({...e,textBackend:t}),backends:[["auto","Auto"],...(d?.textBackends??[]).map(t=>[t,t==="fts5"?"FTS5":"PostgreSQL FTS"])]}),n.jsx(h,{title:"Vector Search",enabled:e.vectorEnabled,onEnabled:t=>a({...e,vectorEnabled:t}),backend:e.vectorBackend,onBackend:t=>a({...e,vectorBackend:t}),backends:[["auto","Auto"],...(d?.vectorBackends??[]).map(t=>[t,t==="vec"?"VEC":"pgvector"])]})]}),n.jsxs("label",{className:"flex items-start justify-between gap-4 rounded-xl border border-border p-4",children:[n.jsxs("span",{children:[n.jsx("span",{className:"block text-sm font-medium",children:"Progressive indexing"}),n.jsx("span",{className:"block text-xs text-muted-foreground",children:"Expand coverage as content becomes relevant instead of embedding everything eagerly."})]}),n.jsx("input",{name:"progressiveIndexingEnabled",type:"checkbox",checked:e.progressiveIndexingEnabled,onChange:t=>a({...e,progressiveIndexingEnabled:t.target.checked}),className:"mt-1 h-4 w-4 rounded border-input"})]})]})}function h({title:s,enabled:d,onEnabled:o,backend:c,onBackend:i,backends:l}){const r=l.filter(([a])=>a!=="auto"),e=v(c);return n.jsxs("section",{className:"rounded-xl border border-border p-4",children:[n.jsxs("label",{className:"flex items-center justify-between gap-3 text-sm font-medium",children:[s,n.jsx("input",{type:"checkbox",checked:d,onChange:a=>o(a.target.checked),className:"h-4 w-4 rounded border-input"})]}),n.jsxs("label",{className:"mt-4 flex items-center justify-between gap-3 text-xs font-medium text-muted-foreground",children:["Choose backend manually",n.jsx("input",{type:"checkbox",checked:e,disabled:r.length===0,onChange:a=>i(a.target.checked?r[0]?.[0]??"auto":"auto"),className:"h-4 w-4 rounded border-input"})]}),e?n.jsxs("label",{className:"mt-3 block space-y-2 text-xs font-medium text-muted-foreground",children:["Backend",n.jsx("select",{value:c,onChange:a=>i(a.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3 text-sm text-foreground",children:r.map(([a,u])=>n.jsx("option",{value:a,children:u},a))})]}):n.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Auto selects the runtime-supported backend."})]})}function v(s){return s!=="auto"}export{I as SearchIndexingPanel,v as isManualBackendSelection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as L,r as o,j as e,B as N,R as T,C as l,a as u,b as h,d as f,e as m}from"./auth-callback-Htr_CB_g.js";import{f as D,a as M,t as _,r as O}from"./admin-BU4m6Ko2.js";import{E as q}from"./external-link-LDHy_4bn.js";const G=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],U=L("rotate-cw",G);function Q({serviceId:t,title:r}){const[s,d]=o.useState(),[g,R]=o.useState(),[j,k]=o.useState([]),[v,p]=o.useState(),[b,S]=o.useState(!0),[y,w]=o.useState(!1),[C,$]=o.useState(),c=o.useCallback(async a=>{S(!0);try{const[n,A]=await Promise.all([D({signal:a}),M({source:t,level:"error",limit:5})]);d(t==="gateway"?{name:"gateway",status:"running",pid:n.adminData?.pid,uptime:n.adminData?.uptime?n.adminData.uptime*1e3:void 0,restartCount:0}:n.servicesData?.find(E=>E.name===t)),R(n.configData??void 0),k(A),$(n.checkedAt),p(void 0)}catch(n){n instanceof DOMException&&n.name==="AbortError"||p("Service status could not be loaded. The previous snapshot is retained.")}finally{S(!1)}},[t]);o.useEffect(()=>{const a=new AbortController;let n=!0;return Promise.resolve().then(()=>{n&&c(a.signal)}),()=>{n=!1,a.abort()}},[c]);const x=o.useMemo(()=>X(t,g),[g,t]),P=async()=>{const a=t==="gateway"?"the whole Xpod runtime":`${r} only`;if(!window.confirm(`Restart ${a}? Active requests may be interrupted.`))return;w(!0);const n=t==="gateway"?await _():await O(t);w(!1),n?setTimeout(()=>{c()},750):p(`Restart request for ${r} was not accepted by this runtime.`)};return e.jsxs("div",{className:"space-y-4 p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("div",{"aria-live":"polite",className:"text-xs text-muted-foreground",children:b?"Refreshing service evidence…":C?`Checked ${C.toLocaleString()}`:"Not checked"}),e.jsxs(N,{type:"button",size:"sm",variant:"outline",onClick:()=>{c()},disabled:b,children:[e.jsx(T,{className:"mr-2 h-4 w-4"}),"Refresh"]})]}),v&&e.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 p-3 text-sm text-destructive",children:v}),e.jsxs(l,{children:[e.jsxs(u,{children:[e.jsx(h,{children:r}),e.jsx(f,{children:"Observed state, endpoint, health evidence, dependencies, and explicitly scoped lifecycle action."})]}),e.jsxs(m,{className:"grid gap-3 text-sm sm:grid-cols-2 xl:grid-cols-3",children:[e.jsx(i,{label:"State",value:s?.status??"Unknown"}),e.jsx(i,{label:"PID",value:s?.pid?.toString()??"Not reported"}),e.jsx(i,{label:"Uptime",value:s?.uptime?z(s.uptime):"Not reported"}),e.jsx(i,{label:"Restart count",value:s?.restartCount?.toString()??"Not reported"}),e.jsx(i,{label:"Internal endpoint",value:x.endpoint}),e.jsx(i,{label:"Health check",value:x.healthCheck})]})]}),e.jsxs(l,{children:[e.jsx(u,{children:e.jsx(h,{children:"Dependencies"})}),e.jsx(m,{className:"grid gap-3 text-sm sm:grid-cols-2",children:x.dependencies.map(a=>e.jsx(i,{label:a,value:B(a,t,s)},a))})]}),e.jsxs(l,{children:[e.jsxs(u,{children:[e.jsx(h,{children:"Recent errors"}),e.jsxs(f,{children:["Latest supervisor errors scoped to ",r,"."]})]}),e.jsxs(m,{className:"space-y-2",children:[j.length?j.map(a=>e.jsxs("div",{className:"rounded-lg border border-border p-3 text-sm",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:new Date(a.timestamp).toLocaleString()}),e.jsx("div",{className:"mt-1 break-words",children:a.message})]},`${a.timestamp}-${a.message}`)):e.jsx("p",{className:"text-sm text-muted-foreground",children:"No recent errors reported."}),e.jsxs("a",{className:"inline-flex items-center text-sm font-medium text-primary hover:underline",href:`/status/logs?source=${t}`,children:[e.jsx(q,{className:"mr-1.5 h-4 w-4"}),"Open related logs"]})]})]}),e.jsxs(l,{children:[e.jsxs(u,{children:[e.jsx(h,{children:"Lifecycle"}),e.jsx(f,{children:t==="gateway"?"Gateway is the parent process, so this action restarts the whole Xpod runtime.":`This action restarts ${r} only; dependent requests may briefly fail.`})]}),e.jsx(m,{children:e.jsxs(N,{type:"button",variant:"destructive",onClick:()=>{P()},disabled:y,children:[e.jsx(U,{className:"mr-2 h-4 w-4"}),y?"Restarting…":t==="gateway"?"Restart Xpod runtime…":`Restart ${r}…`]})})]})]})}function X(t,r){const s=r?.env??{};return t==="gateway"?{endpoint:window.location.origin,healthCheck:"GET /service/status",dependencies:["Solid Server","API Server"]}:t==="css"?{endpoint:s.CSS_PORT?`http://127.0.0.1:${s.CSS_PORT}`:"Internal endpoint not reported",healthCheck:"TCP readiness + Solid root request",dependencies:["Authority storage","Identity service"]}:{endpoint:s.API_INTERNAL_URL||(s.API_PORT?`http://127.0.0.1:${s.API_PORT}`:"Internal endpoint not reported"),healthCheck:"GET /health",dependencies:["Solid Server","Configuration store"]}}function B(t,r,s){return s?s.status!=="running"?`${H(r)} is ${s.status}; dependency health is not implied`:`${t} required; direct probe evidence is not reported by this runtime`:"Not reported"}function H(t){return t==="gateway"?"Gateway":t==="css"?"Solid Server":"API Server"}function i({label:t,value:r}){return e.jsxs("div",{className:"rounded-lg border border-border p-3",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:t}),e.jsx("div",{className:"mt-1 break-all font-medium",children:r})]})}function z(t){const r=Math.floor(t/1e3),s=Math.floor(r/3600),d=Math.floor(r%3600/60);return s?`${s}h ${d}m`:`${d}m ${r%60}s`}export{Q as ServiceStatusPanel};
|
package/static/auth-callback/assets/{StatusWorkspace-CEgmKJcX.js → StatusWorkspace-zbSyhdG2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,D as l,S as x,G as h,k as y,j as a,O as v,N as p,l as m,m as k}from"./auth-callback-
|
|
1
|
+
import{c as r,D as l,S as x,G as h,k as y,j as a,O as v,N as p,l as m,m as k}from"./auth-callback-Htr_CB_g.js";import{A as u}from"./activity-BQ-CQE3O.js";import{W as f,N as w}from"./waypoints-DImIq93f.js";import{P as g}from"./PaneListHeader-mLMe_dvU.js";import{T as N,u as j}from"./workspace-layout-IVCSYU21.js";const b=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],S=r("boxes",b);const I=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],M=r("braces",I);const L=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],_=r("hard-drive",L);const z=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],d=r("scroll-text",z);const D=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],H=r("server",D);const O=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],V=r("timer",O);function s(i,t,e,n,o){return{id:i,label:t,path:e,href:`/status/${e}`,end:!0,group:n,icon:o}}const c=[s("overview","Overview","overview","Overview",u),s("gateway","Gateway","services/gateway","Services",f),s("solid-server","Solid Server","services/solid-server","Services",l),s("api-server","API Server","services/api-server","Services",H),s("logs","Logs","logs","Diagnostics",d),s("index-overview","Index Overview","index","Index",S),s("rdf","RDF","index/rdf","Index",M),s("fts","FTS","index/fts","Index",d),s("vector","Vector","index/vector","Index",x),s("retrieval-points","Retrieval Points","index/retrieval-points","Index",w),s("cache","Cache","index/cache","Index",_),s("slow-queries","Slow Queries","index/slow-queries","Index",V),s("benchmark","Benchmark","index/benchmark","Index",h)],q=["Overview","Services","Diagnostics","Index"];function C(){const i=y(),t=[...c].sort((e,n)=>n.path.length-e.path.length).find(e=>i.pathname.endsWith(e.path))??c[0];return a.jsx(N,{mode:"auto",listHeader:a.jsx(g,{title:"Status"}),list:a.jsx(A,{}),mainHeader:a.jsx("div",{className:"flex h-full items-center px-4",children:a.jsxs("div",{children:[a.jsxs("h1",{className:"text-sm font-semibold",children:["Status · ",t.label]}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Observed state and operational evidence"})]})}),main:a.jsx("section",{className:"min-h-full bg-background",children:a.jsx(v,{})}),className:"min-h-full"})}function A(){const i=j();return a.jsx("aside",{"data-list-navigation":!0,className:"h-full overflow-y-auto border-r border-border bg-muted/20 py-2",children:q.map(t=>a.jsxs("section",{className:"mb-3",children:[a.jsx("h2",{className:"px-5 py-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:t}),c.filter(e=>e.group===t).map(e=>{const n=e.icon;return a.jsxs(p,{to:e.path,end:e.end,onKeyDown:m,onClick:()=>i.openMain(),className:({isActive:o})=>k(o,{compact:!1}),children:[a.jsx(n,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),e.label]},e.id)})]},t))})}export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,D as r,k as h,r as c,j as e,O as p,N as u,l as m,m as x}from"./auth-callback-
|
|
1
|
+
import{c as i,D as r,k as h,r as c,j as e,O as p,N as u,l as m,m as x}from"./auth-callback-Htr_CB_g.js";import{K as y}from"./key-round-ibX79Kr-.js";import{b}from"./admin-BU4m6Ko2.js";import{P as g}from"./PaneListHeader-mLMe_dvU.js";import{T as f,u as k}from"./workspace-layout-IVCSYU21.js";const v=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],N=i("box",v);const j=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],S=i("cloud",j);const w=[["path",{d:"m10.852 14.772-.383.923",key:"11vil6"}],["path",{d:"M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1v3clb"}],["path",{d:"m13.148 9.228.383-.923",key:"t2zzyc"}],["path",{d:"m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1bxfiv"}],["path",{d:"m14.772 10.852.923-.383",key:"k9m8cz"}],["path",{d:"m14.772 13.148.923.383",key:"1xvhww"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"m9.228 10.852-.923-.383",key:"1wtb30"}],["path",{d:"m9.228 13.148-.923.383",key:"1a830x"}]],M=i("server-cog",w);const L=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],_=i("wrench",L),C=[{id:"pod",label:"Pod",path:"pod",description:"Current Pod identity and data boundary.",icon:N},{id:"identity-access",label:"Identity & Access",path:"identity-access",description:"Session, WebID, and account access.",icon:y},{id:"storage",label:"Storage",path:"storage",description:"Authority storage backend and limits.",icon:r},{id:"runtime",label:"Runtime",path:"runtime",description:"Low-frequency runtime configuration.",icon:M},{id:"cloud",label:"Cloud",path:"cloud",description:"Cloud coordination settings when supported.",icon:S},{id:"advanced",label:"Advanced",path:"advanced",description:"Expert and compatibility controls.",icon:_}];function z(){const d=h(),[n,t]=c.useState(!1);c.useEffect(()=>{let a=!1;return b().then(l=>{a||t(l?.env.XPOD_EDITION==="cloud")}),()=>{a=!0}},[]);const s=c.useMemo(()=>C.filter(a=>a.id!=="cloud"||n),[n]),o=s.find(a=>d.pathname.endsWith(`/${a.path}`))??s[0];return e.jsx(f,{mode:"auto",listHeader:e.jsx(g,{title:"Settings"}),list:e.jsx(I,{items:s}),mainHeader:e.jsx("div",{className:"flex h-full items-center px-4",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"text-sm font-semibold",children:["Settings · ",o.label]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:o.description})]})}),main:e.jsx("section",{className:"min-h-full bg-background",children:e.jsx(p,{})}),className:"min-h-full"})}function I({items:d}){const n=k();return e.jsx("aside",{className:"h-full border-r border-border bg-muted/20 py-2",children:e.jsx("nav",{"aria-label":"Settings sections","data-list-navigation":!0,children:d.map(t=>{const s=t.icon;return e.jsxs(u,{to:t.path,"aria-label":t.label,onKeyDown:m,onClick:()=>n.openMain(),className:({isActive:o})=>x(o,{compact:!1}),children:[e.jsx(s,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-medium",children:t.label}),e.jsx("span",{className:"block text-xs leading-4 text-muted-foreground",children:t.description})]})]},t.id)})})})}export{z as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as T,r as i,j as r,B as h,R as F,C as W,a as G,b as X,d as B,e as M}from"./auth-callback-
|
|
1
|
+
import{u as T,r as i,j as r,B as h,R as F,C as W,a as G,b as X,d as B,e as M}from"./auth-callback-Htr_CB_g.js";import{b as H,c as $,t as Q,u as z}from"./admin-BU4m6Ko2.js";import{c as N}from"./ai-connections-Bm52UO7Y.js";import{R as K}from"./rotate-ccw-B2_VMaiX.js";import{S as A}from"./skeleton-F4nrpycc.js";import{E as V}from"./external-link-LDHy_4bn.js";const E="co.undefineds.ai-connections",q={providerCredentials:"settings/credentials.ttl",providerDefinitions:"settings/providers/__service_access__.ttl",gatewayAccessKeys:".data/ai/gateway/access-keys.ttl",quotaSnapshots:".data/ai/gateway/quota.ttl"},Y=["openai","openai-official-subscription","openai-api-platform","anthropic","anthropic-official-subscription","anthropic-api-platform","kimi","kimi-subscription-key","kimi-api-platform","bailian","bailian-pay-as-you-go","bailian-token-plan","bailian-token-plan-team","bailian-coding-plan","deepseek","deepseek-api-platform","zhipu","zhipu-api-platform","zhipu-coding-plan","ollama","ollama-local","custom","custom-openai-compatible","custom-anthropic-compatible"],J=new Set(Y);function R(e,t){if(!w(e))throw new Error("invalid_descriptor");if(e.appletId!==E)throw new Error("invalid_applet_id");const a=e.service;if(!w(a)||typeof a.webId!="string"||typeof a.label!="string"||!oe(a.webId))throw new Error("invalid_service");if(!Array.isArray(e.resources)||e.resources.length===0)throw new Error("invalid_empty_resources");const s=se(t),n=new Set,o=e.resources.map(c=>Z(c,s,n));return{appletId:E,service:{webId:a.webId,label:a.label},resources:o}}function Z(e,t,a){if(!w(e)||typeof e.id!="string"||typeof e.url!="string"||e.mediaType!=="text/turtle"||!w(e.access))throw new Error("invalid_resource");const s=ee(e.id,t);if(!s||a.has(e.id))throw new Error("invalid_resource");te(e.url);let n;try{n=new URL(e.url)}catch{throw new Error("invalid_resource")}if(!ne(n,t))throw new Error("invalid_resource");if(n.href!==s)throw new Error("invalid_resource");return a.add(e.id),{id:e.id,url:n.href,mediaType:"text/turtle",access:ae(e.access)}}function ee(e,t){const a=q[e];if(a)return new URL(a,t).href;const s=e.startsWith("providerDocument:")?e.slice(17):void 0;if(s&&J.has(s))return new URL(`settings/providers/${s}.ttl`,t).href}function te(e){if(/%(?![0-9a-fA-F]{2})/.test(e)||/%(?:2f|5c)/i.test(e)||e.includes("\\"))throw new Error("invalid_resource");const t=re(e);if(j(t))throw new Error("invalid_resource");try{const a=decodeURIComponent(t);if(a.includes("\\")||j(a))throw new Error("invalid_resource")}catch{throw new Error("invalid_resource")}}function re(e){const t=e.split("#",1)[0]??e;return(t.split("?",1)[0]??t).replace(/^[a-z][a-z0-9+.-]*:\/\/[^/\\?#]*/i,"")}function j(e){return e.split("/").some(t=>t==="."||t==="..")}function ae(e){if(Object.keys(e).some(a=>a!=="read"&&a!=="append"&&a!=="write")||e.read!==!0||e.append!==!0||e.write!==!0)throw new Error("invalid_resource");return{read:!0,append:!0,write:!0}}function se(e){const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Error("invalid_current_pod");return t.pathname.endsWith("/")||(t.pathname=`${t.pathname}/`),t}function ne(e,t){return(e.protocol==="http:"||e.protocol==="https:")&&e.origin===t.origin&&e.pathname.startsWith(t.pathname)}function oe(e){try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}}function w(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function ie(e,t={}){return[{label:"Files",value:e.CSS_ROOT_FILE_PATH||"Runtime default",detail:"Authority file storage root"},{label:"Object storage",value:e.MINIO_ENDPOINT||e.XPOD_STORAGE_S3_ENDPOINT?"Configured":"Not configured",detail:e.MINIO_ENDPOINT||e.XPOD_STORAGE_S3_ENDPOINT||"Filesystem fallback"},{label:"Identity database",value:v(e,t,"CSS_IDENTITY_DB_URL"),detail:ce(e.CSS_IDENTITY_DB_URL)},{label:"Cache / coordination",value:v(e,t,"REDIS_URL"),detail:e.REDIS_URL?"Redis":"Runtime fallback"},{label:"RDF / Quadstore",value:v(e,t,"CSS_SPARQL_ENDPOINT"),detail:e.CSS_SPARQL_ENDPOINT?"PostgreSQL RDF":"Local Quadstore"}]}function v(e,t,a){return e[a]||t[a]?.configured?"Configured":"Runtime default"}function ce(e){return e?.startsWith("postgres")?"PostgreSQL":e?"SQLite / configured database":"SQLite default"}const le="http://www.w3.org/ns/solid/acp#",de="http://www.w3.org/ns/auth/acl#";function O(e,{ownerWebId:t,serviceWebId:a},s=!0){const n=s?`
|
|
2
2
|
<#serviceAccess>
|
|
3
3
|
a acp:AccessControl;
|
|
4
4
|
acp:apply [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./auth-callback-
|
|
1
|
+
import{c as t}from"./auth-callback-Htr_CB_g.js";const c=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],o=t("activity",c);export{o as A};
|