@hivemagnus/magnus-ui 2.1.3 → 2.2.0
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/app/apps/dashboard/.next/BUILD_ID +1 -1
- package/dist/app/apps/dashboard/.next/build-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/required-server-files.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__06giq9g4me8eh._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__08sgyyf_y8ab8._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__11pe-l2-ko65_._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0caxc2bc6a__r._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1oebzzj_en62h._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_lib_api-client_ts_0tho-kkk5ez7h._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +3 -3
- package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
- package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/static/chunks/{3otz9f1qh49qi.js → 17z-cy_rf1l5a.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{1qdz-1e_q6bds.js → 19_hix1d_w6vr.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{402ia_vionywg.js → 1e5a3gxtsgzed.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{3c6u3mzxxzerm.js → 1ztuenv_pp670.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{1wufiestojnq3.js → 3-jcbc2evimy5.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{2_ko3-q8c_zhl.js → 3n9nsatm9lrk8.js} +1 -1
- package/dist/app/apps/dashboard/package.json +2 -2
- package/dist/app/apps/dashboard/server.js +1 -1
- package/package.json +2 -2
- /package/dist/app/apps/dashboard/.next/static/{H-K1jxmL5UpxX60_nMjZt → CCDUx7h84YYg-fH10xGhY}/_buildManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{H-K1jxmL5UpxX60_nMjZt → CCDUx7h84YYg-fH10xGhY}/_clientMiddlewareManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{H-K1jxmL5UpxX60_nMjZt → CCDUx7h84YYg-fH10xGhY}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67683,e=>{"use strict";var a=e.i(43476),s=e.i(22016),r=e.i(53138),t=e.i(16306);e.s(["f",0,function({summary:e,showAction:n=!0}){let i=e.nodes.filter(e=>e.tailscale?.requiresRenewal).sort((e,a)=>e.tailscale?.expired!==a.tailscale?.expired?e.tailscale?.expired?-1:1:(e.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER)-(a.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER));if(0===i.length)return null;let l=i.some(e=>e.tailscale?.expired),o=l?t.f:r.f,c=l?{panel:"border-danger/40 bg-danger/5",rail:"bg-danger",icon:"bg-danger/10 text-danger",text:"text-danger",chip:"border-danger/30 text-danger",action:"border-danger/40 text-danger hover:bg-danger/10"}:{panel:"border-warning/40 bg-warning/5",rail:"bg-warning",icon:"bg-warning/10 text-warning",text:"text-warning",chip:"border-warning/30 text-warning",action:"border-warning/40 text-warning hover:bg-warning/10"};return(0,a.jsxs)("section",{id:"tailscale-renewal",role:"alert","aria-label":"Tailscale renewal alert",className:`relative overflow-hidden rounded border px-4 py-3 ${c.panel}`,children:[(0,a.jsx)("div",{className:`absolute inset-y-0 left-0 w-0.5 ${c.rail}`}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,a.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded ${c.icon}`,children:(0,a.jsx)(o,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:`text-xs font-bold uppercase tracking-[0.14em] ${c.text}`,children:l?"Tailscale access expired":"Tailscale renewal due"}),(0,a.jsxs)("p",{className:"mt-1 text-[11px] text-text-muted",children:[i.length," node ",1===i.length?"key needs":"keys need"," renewal within ",e.warningDays," days. Renew before tailnet access is interrupted."]}),(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:i.map(e=>(0,a.jsxs)("span",{title:e.tailscale?.keyExpiry?`Expires ${e.tailscale.keyExpiry}`:void 0,className:`inline-flex items-center gap-1 rounded border bg-background/40 px-2 py-0.5 font-mono text-[10px] ${c.chip}`,children:[(0,a.jsx)("span",{className:"font-semibold",children:e.name}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,a.jsx)("span",{children:e.tailscale?.expired?"expired":`${e.tailscale?.daysRemaining??"?"}d`})]},e.id))})]})]}),n&&(0,a.jsx)(s.default,{href:"/nodes#tailscale-renewal",className:`shrink-0 self-start rounded border px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider transition-colors sm:self-center ${c.action}`,children:"Review nodes"})]})]})}])},53721,e=>{"use strict";var a=e.i(43476),s=e.i(53138),r=e.i(46670),t=e.i(63646);e.s(["x",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsx)("span",{title:(0,t.K)(e),"data-testid":"upgrade-readiness-badge",children:(0,a.jsxs)(r.t,{variant:"warning",children:[(0,a.jsx)(s.f,{className:"mr-1 inline h-3 w-3"}),"Upgrade blocked (",e.problems.length,")"]})})},"a",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-[11px]","data-testid":"upgrade-readiness-panel",children:[(0,a.jsxs)("p",{className:"flex items-center gap-2 font-bold uppercase tracking-wider text-warning",children:[(0,a.jsx)(s.f,{className:"h-3.5 w-3.5"})," This node could not take an agent upgrade now"]}),(0,a.jsx)("ul",{className:"mt-2 space-y-2",children:e.problems.map(e=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("p",{className:"font-medium text-text",children:[(0,a.jsx)("span",{className:"num",children:e.code}),": ",e.detail]}),(0,a.jsx)("p",{className:"text-text-muted",children:e.remedy})]},`${e.code}-${e.detail}`))})]})}])},46670,e=>{"use strict";var a=e.i(43476),s=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},t={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:o=!1}){return(0,a.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,a.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",t[n])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",t[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var a=e.i(43476),s=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let t=(0,s.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let c={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:s=100,tone:r,thresholds:t=o.q,label:n,size:l="xs",showValue:m=!1,valueLabel:u,glow:h,className:p,testId:g}){let f="number"==typeof e&&Number.isFinite(e),v=f?Math.max(0,Math.min(100,e/(s||1)*100)):0,j=r??(f?(0,o.Z)(v,t):"muted"),b=h||!r&&f&&v>=t.warn,N=u??(f?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,a.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":g,children:[(0,a.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":f?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,a.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[j],b&&c[j])})}),m&&(0,a.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",f?o.T[j]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function u({values:e,tone:s="primary",width:r=160,height:t=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:x=!0,emptyLabel:h="not enough data",className:p,testId:g,label:f,stretch:v=!1}){let j=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,a.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":g,children:h});let b=o.v[s],N=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),w=t-4,y=r/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,_=e.map((e,a)=>[a*y,k(e)]),E=_.map(([e,a])=>`${e.toFixed(1)},${a.toFixed(1)}`).join(" "),C=_[_.length-1];return(0,a.jsxs)("svg",{width:v?"100%":r,height:t,viewBox:`0 0 ${r} ${t}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":g,role:f?"img":void 0,"aria-label":f,"aria-hidden":!f||void 0,children:[n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:j,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,a.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,a.jsx)("polygon",{points:`0,${t} ${E} ${r},${t}`,fill:`url(#${j})`})]}),void 0!==d&&(0,a.jsx)("line",{x1:0,x2:r,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,a.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:E}),x&&!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,u],55427),e.s(["N",0,function({title:e,description:s,children:r,className:t,action:n,tone:i,corners:o=!1,...c}){return(0,a.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:s,action:n,className:t,children:r})},"n",0,function({label:e,value:s,icon:r,trend:c,spark:d,meter:m,delta:h,tone:p="primary",className:g,testId:f}){let v=!h||h.value>=0===(h.positiveIsGood??!0);return(0,a.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",g),testId:f,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,a.jsx)("span",{className:"text-primary/60",children:r})]}),(0,a.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,a.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":o.T[p]),children:s}),h&&0!==h.value&&(0,a.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[h.value>0?(0,a.jsx)(n.f,{className:"h-3 w-3"}):(0,a.jsx)(t,{className:"h-3 w-3"}),Math.abs(h.value).toFixed(+!Number.isInteger(h.value)),h.unit]})]}),c&&(0,a.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==m&&(0,a.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,a.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,a.jsx)(u,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);let t={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:x,description:m,icon:u,action:h,as:p="div",padding:g="md",testId:f,className:v,children:j,...b}){return(0,a.jsxs)(p,{...b,"data-testid":f??b["data-testid"],className:(0,s.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[g],o&&"panel-corners",o&&t[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||h||u)&&(0,a.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[u&&(0,a.jsx)("span",{className:(0,s.f)("mt-0.5 shrink-0",r.T[e]),children:u}),(0,a.jsxs)("div",{className:"min-w-0",children:[x&&(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,a.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),h]}),j]})}])},73404,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);e.s(["f",0,function({title:e,eyebrow:t,description:n,icon:i,actions:l,status:o,tone:c="primary",className:d,testId:x}){return(0,a.jsxs)("div",{"data-testid":x,className:(0,s.f)("flex flex-wrap items-end justify-between gap-4",d),children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i&&(0,a.jsx)("span",{"aria-hidden":"true",className:(0,s.f)("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-panel border bg-surface","accent"===c?"border-accent/40 shadow-[0_0_14px_var(--color-glow-accent)]":"border-primary/40 shadow-[0_0_14px_var(--color-glow)]",r.T[c]),children:i}),(0,a.jsxs)("div",{className:"min-w-0",children:[t&&(0,a.jsxs)("p",{className:(0,s.f)("mb-1 text-[10px] font-medium uppercase tracking-[0.3em]",r.T[c],"opacity-80"),children:[(0,a.jsx)("span",{"aria-hidden":"true",children:"// "}),t]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)("h1",{className:(0,s.f)("text-xl font-bold uppercase tracking-wider",r.T[c],r.z[c]),children:e}),o]}),n&&(0,a.jsx)("p",{className:"mt-1 max-w-3xl text-xs text-text-muted",children:n})]})]}),l&&(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:l})]})}])},63376,e=>{"use strict";var a=e.i(43476);e.s(["z",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:`animate-page-in${s?` ${s}`:""}`,children:e})},"U",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:s,children:e})}])},65369,e=>{"use strict";var a=e.i(43476),s=e.i(78571);function r({className:e}){return(0,a.jsx)("div",{"aria-hidden":"true",className:(0,s.f)("skeleton h-3 w-full",e)})}e.s(["l",0,r,"g",0,function({count:e=4,className:t}){return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",t),children:Array.from({length:e},(e,s)=>(0,a.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,a.jsx)(r,{className:"h-2 w-1/2"}),(0,a.jsx)(r,{className:"mt-4 h-7 w-2/3"}),(0,a.jsx)(r,{className:"mt-3 h-1 w-full opacity-60"})]},s))})},"F",0,function({rows:e=5,cols:t=4,className:n}){return(0,a.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,a.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:t},(e,s)=>(0,a.jsx)(r,{className:"h-2 flex-1 opacity-60"},s))}),Array.from({length:e},(e,n)=>(0,a.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:t},(e,t)=>(0,a.jsx)(r,{className:(0,s.f)("h-3 flex-1",(n+t)%3==0&&"max-w-[60%]")},t))},n))]})},"Q",0,function({lines:e=3,className:t}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("space-y-2",t),children:Array.from({length:e},(e,s)=>(0,a.jsx)(r,{className:n[s%n.length]},s))})}])},75723,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(46670);let t={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},i=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:l,size:o="sm",className:c,label:d}){let x=(0,r.k)(e),m=l??i.has(e.toUpperCase()),u="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,a.jsxs)("span",{className:(0,s.f)("relative inline-flex shrink-0",u,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[m&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",n[x])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex rounded-full",u,t[x])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let a=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,a)).toFixed(1))} ${["B","KB","MB","GB","TB"][a]}`},"C",0,function(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}])},59439,e=>{e.v(a=>Promise.all(["static/chunks/1ixu-i6j99dj0.js"].map(a=>e.l(a))).then(()=>a(93309)))},37138,e=>{e.v(a=>Promise.all(["static/chunks/3h4dmpbixi6eo.js"].map(a=>e.l(a))).then(()=>a(99894)))},75775,e=>{"use strict";var a=e.i(56420);let s={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],75775)},57665,e=>{"use strict";var a=e.i(56420);let s={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],57665)},86207,14098,e=>{"use strict";var a=e.i(56420);let s={name:"refresh-ccw-dot",size:24,node:[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],86207);var t=e.i(43476),n=e.i(71645),i=e.i(68759),l=e.i(32568),o=e.i(82983),c=e.i(41220),d=e.i(32781);e.s(["E",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)([]),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(!0),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&(b(""),h(a?.role?.id??""),g(!0),w(!0),(async()=>{try{let e=await o.f.roles.list();m(e.data??[])}catch{b("Failed to load roles")}finally{w(!1)}})())},[e,a?.role?.id]);let y=async()=>{if(a){v(!0),b("");try{let e=a.role?.id;e&&e!==u&&await o.f.roles.unassign(e,{nodeIds:[a.id]}),u&&await o.f.roles.assign(u,{nodeIds:[a.id],defer:!p});let t=u?x.find(e=>e.id===u)??null:null;r(t),s()}catch(e){b(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(a?.role){v(!0),b("");try{await o.f.roles.unassign(a.role.id,{nodeIds:[a.id]}),r(null),s()}catch(e){b(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:_,title:a?.role?"Change Role":"Assign Role",description:a?`Node: ${a.name}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[N?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,t.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===x.length?(0,t.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.G,{label:"Role",children:(0,t.jsxs)("select",{value:u,onChange:e=>h(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"",children:"— No role —"}),x.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})}),u&&(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:p,onChange:e=>g(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,t.jsx)("div",{children:a?.role&&(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:f,children:"Unassign Role"})}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void y(),disabled:f||!u||0===x.length,icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":a?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)(""),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(""),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)("");(0,n.useEffect)(()=>{if(a){m(a.name);try{let e=JSON.parse(a.tags);h(e.join(", "))}catch{h("")}g(a.status),b("")}},[a]);let N=async()=>{if(a&&x.trim()){v(!0),b("");try{let e=u.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(a.id,{name:x.trim(),tags:e,status:p.toUpperCase()}),r(),s()}catch(e){b(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},w=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:w,title:"Edit Node",description:a?`${a.hostname}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:x,onChange:e=>m(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"Status",children:(0,t.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,t.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,t.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,t.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,t.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:u,onChange:e=>h(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:w,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void N(),disabled:f||!x.trim(),icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:a,onRegistered:s}){let[r,x]=(0,n.useState)(""),[m,u]=(0,n.useState)(""),[h,p]=(0,n.useState)("4100"),[g,f]=(0,n.useState)("linux"),[v,j]=(0,n.useState)("x86_64"),[b,N]=(0,n.useState)(""),[w,y]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),E=async()=>{if(r.trim()&&m.trim()){y(!0),_("");try{let e=b.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:r.trim(),hostname:m.trim(),ipAddress:m.trim(),port:Number(h)||4100,os:g,arch:v,tags:e,agentVersion:"2.1.3"}),s(),C()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{y(!1)}}},C=()=>{x(""),u(""),p("4100"),f("linux"),j("x86_64"),N(""),_(""),y(!1),a()};return(0,t.jsx)(l.n,{open:e,onClose:C,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Node Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:r,onChange:e=>x(e.target.value),placeholder:"web-server-01",className:l.W,autoFocus:!0})}),(0,t.jsx)(l.G,{label:"FQDN / Hostname",required:!0,children:(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"node-1.example.com",className:l.W})}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,t.jsx)(l.G,{label:"Port",children:(0,t.jsx)("input",{type:"number",value:h,onChange:e=>p(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"OS",children:(0,t.jsxs)("select",{value:g,onChange:e=>f(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"linux",children:"Linux"}),(0,t.jsx)("option",{value:"darwin",children:"macOS"}),(0,t.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,t.jsx)(l.G,{label:"Architecture",children:(0,t.jsxs)("select",{value:v,onChange:e=>j(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,t.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,t.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:b,onChange:e=>N(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void E(),disabled:w||!r.trim()||!m.trim(),icon:w?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:w?"Registering…":"Register Node"})]})]})})}],14098)},16306,e=>{"use strict";var a=e.i(56420);let s={name:"shield-alert",size:24,node:[["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:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],16306)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67683,e=>{"use strict";var a=e.i(43476),s=e.i(22016),r=e.i(53138),t=e.i(16306);e.s(["f",0,function({summary:e,showAction:n=!0}){let i=e.nodes.filter(e=>e.tailscale?.requiresRenewal).sort((e,a)=>e.tailscale?.expired!==a.tailscale?.expired?e.tailscale?.expired?-1:1:(e.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER)-(a.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER));if(0===i.length)return null;let l=i.some(e=>e.tailscale?.expired),o=l?t.f:r.f,c=l?{panel:"border-danger/40 bg-danger/5",rail:"bg-danger",icon:"bg-danger/10 text-danger",text:"text-danger",chip:"border-danger/30 text-danger",action:"border-danger/40 text-danger hover:bg-danger/10"}:{panel:"border-warning/40 bg-warning/5",rail:"bg-warning",icon:"bg-warning/10 text-warning",text:"text-warning",chip:"border-warning/30 text-warning",action:"border-warning/40 text-warning hover:bg-warning/10"};return(0,a.jsxs)("section",{id:"tailscale-renewal",role:"alert","aria-label":"Tailscale renewal alert",className:`relative overflow-hidden rounded border px-4 py-3 ${c.panel}`,children:[(0,a.jsx)("div",{className:`absolute inset-y-0 left-0 w-0.5 ${c.rail}`}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,a.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded ${c.icon}`,children:(0,a.jsx)(o,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:`text-xs font-bold uppercase tracking-[0.14em] ${c.text}`,children:l?"Tailscale access expired":"Tailscale renewal due"}),(0,a.jsxs)("p",{className:"mt-1 text-[11px] text-text-muted",children:[i.length," node ",1===i.length?"key needs":"keys need"," renewal within ",e.warningDays," days. Renew before tailnet access is interrupted."]}),(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:i.map(e=>(0,a.jsxs)("span",{title:e.tailscale?.keyExpiry?`Expires ${e.tailscale.keyExpiry}`:void 0,className:`inline-flex items-center gap-1 rounded border bg-background/40 px-2 py-0.5 font-mono text-[10px] ${c.chip}`,children:[(0,a.jsx)("span",{className:"font-semibold",children:e.name}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,a.jsx)("span",{children:e.tailscale?.expired?"expired":`${e.tailscale?.daysRemaining??"?"}d`})]},e.id))})]})]}),n&&(0,a.jsx)(s.default,{href:"/nodes#tailscale-renewal",className:`shrink-0 self-start rounded border px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider transition-colors sm:self-center ${c.action}`,children:"Review nodes"})]})]})}])},53721,e=>{"use strict";var a=e.i(43476),s=e.i(53138),r=e.i(46670),t=e.i(63646);e.s(["x",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsx)("span",{title:(0,t.K)(e),"data-testid":"upgrade-readiness-badge",children:(0,a.jsxs)(r.t,{variant:"warning",children:[(0,a.jsx)(s.f,{className:"mr-1 inline h-3 w-3"}),"Upgrade blocked (",e.problems.length,")"]})})},"a",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-[11px]","data-testid":"upgrade-readiness-panel",children:[(0,a.jsxs)("p",{className:"flex items-center gap-2 font-bold uppercase tracking-wider text-warning",children:[(0,a.jsx)(s.f,{className:"h-3.5 w-3.5"})," This node could not take an agent upgrade now"]}),(0,a.jsx)("ul",{className:"mt-2 space-y-2",children:e.problems.map(e=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("p",{className:"font-medium text-text",children:[(0,a.jsx)("span",{className:"num",children:e.code}),": ",e.detail]}),(0,a.jsx)("p",{className:"text-text-muted",children:e.remedy})]},`${e.code}-${e.detail}`))})]})}])},46670,e=>{"use strict";var a=e.i(43476),s=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},t={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:o=!1}){return(0,a.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,a.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",t[n])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",t[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var a=e.i(43476),s=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let t=(0,s.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let c={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:s=100,tone:r,thresholds:t=o.q,label:n,size:l="xs",showValue:m=!1,valueLabel:u,glow:h,className:p,testId:g}){let f="number"==typeof e&&Number.isFinite(e),v=f?Math.max(0,Math.min(100,e/(s||1)*100)):0,j=r??(f?(0,o.Z)(v,t):"muted"),b=h||!r&&f&&v>=t.warn,N=u??(f?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,a.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":g,children:[(0,a.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":f?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,a.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[j],b&&c[j])})}),m&&(0,a.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",f?o.T[j]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function u({values:e,tone:s="primary",width:r=160,height:t=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:x=!0,emptyLabel:h="not enough data",className:p,testId:g,label:f,stretch:v=!1}){let j=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,a.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":g,children:h});let b=o.v[s],N=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),w=t-4,y=r/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,_=e.map((e,a)=>[a*y,k(e)]),E=_.map(([e,a])=>`${e.toFixed(1)},${a.toFixed(1)}`).join(" "),C=_[_.length-1];return(0,a.jsxs)("svg",{width:v?"100%":r,height:t,viewBox:`0 0 ${r} ${t}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":g,role:f?"img":void 0,"aria-label":f,"aria-hidden":!f||void 0,children:[n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:j,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,a.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,a.jsx)("polygon",{points:`0,${t} ${E} ${r},${t}`,fill:`url(#${j})`})]}),void 0!==d&&(0,a.jsx)("line",{x1:0,x2:r,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,a.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:E}),x&&!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,u],55427),e.s(["N",0,function({title:e,description:s,children:r,className:t,action:n,tone:i,corners:o=!1,...c}){return(0,a.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:s,action:n,className:t,children:r})},"n",0,function({label:e,value:s,icon:r,trend:c,spark:d,meter:m,delta:h,tone:p="primary",className:g,testId:f}){let v=!h||h.value>=0===(h.positiveIsGood??!0);return(0,a.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",g),testId:f,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,a.jsx)("span",{className:"text-primary/60",children:r})]}),(0,a.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,a.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":o.T[p]),children:s}),h&&0!==h.value&&(0,a.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[h.value>0?(0,a.jsx)(n.f,{className:"h-3 w-3"}):(0,a.jsx)(t,{className:"h-3 w-3"}),Math.abs(h.value).toFixed(+!Number.isInteger(h.value)),h.unit]})]}),c&&(0,a.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==m&&(0,a.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,a.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,a.jsx)(u,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);let t={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:x,description:m,icon:u,action:h,as:p="div",padding:g="md",testId:f,className:v,children:j,...b}){return(0,a.jsxs)(p,{...b,"data-testid":f??b["data-testid"],className:(0,s.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[g],o&&"panel-corners",o&&t[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||h||u)&&(0,a.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[u&&(0,a.jsx)("span",{className:(0,s.f)("mt-0.5 shrink-0",r.T[e]),children:u}),(0,a.jsxs)("div",{className:"min-w-0",children:[x&&(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,a.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),h]}),j]})}])},73404,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);e.s(["f",0,function({title:e,eyebrow:t,description:n,icon:i,actions:l,status:o,tone:c="primary",className:d,testId:x}){return(0,a.jsxs)("div",{"data-testid":x,className:(0,s.f)("flex flex-wrap items-end justify-between gap-4",d),children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i&&(0,a.jsx)("span",{"aria-hidden":"true",className:(0,s.f)("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-panel border bg-surface","accent"===c?"border-accent/40 shadow-[0_0_14px_var(--color-glow-accent)]":"border-primary/40 shadow-[0_0_14px_var(--color-glow)]",r.T[c]),children:i}),(0,a.jsxs)("div",{className:"min-w-0",children:[t&&(0,a.jsxs)("p",{className:(0,s.f)("mb-1 text-[10px] font-medium uppercase tracking-[0.3em]",r.T[c],"opacity-80"),children:[(0,a.jsx)("span",{"aria-hidden":"true",children:"// "}),t]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)("h1",{className:(0,s.f)("text-xl font-bold uppercase tracking-wider",r.T[c],r.z[c]),children:e}),o]}),n&&(0,a.jsx)("p",{className:"mt-1 max-w-3xl text-xs text-text-muted",children:n})]})]}),l&&(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:l})]})}])},63376,e=>{"use strict";var a=e.i(43476);e.s(["z",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:`animate-page-in${s?` ${s}`:""}`,children:e})},"U",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:s,children:e})}])},65369,e=>{"use strict";var a=e.i(43476),s=e.i(78571);function r({className:e}){return(0,a.jsx)("div",{"aria-hidden":"true",className:(0,s.f)("skeleton h-3 w-full",e)})}e.s(["l",0,r,"g",0,function({count:e=4,className:t}){return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",t),children:Array.from({length:e},(e,s)=>(0,a.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,a.jsx)(r,{className:"h-2 w-1/2"}),(0,a.jsx)(r,{className:"mt-4 h-7 w-2/3"}),(0,a.jsx)(r,{className:"mt-3 h-1 w-full opacity-60"})]},s))})},"F",0,function({rows:e=5,cols:t=4,className:n}){return(0,a.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,a.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:t},(e,s)=>(0,a.jsx)(r,{className:"h-2 flex-1 opacity-60"},s))}),Array.from({length:e},(e,n)=>(0,a.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:t},(e,t)=>(0,a.jsx)(r,{className:(0,s.f)("h-3 flex-1",(n+t)%3==0&&"max-w-[60%]")},t))},n))]})},"Q",0,function({lines:e=3,className:t}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("space-y-2",t),children:Array.from({length:e},(e,s)=>(0,a.jsx)(r,{className:n[s%n.length]},s))})}])},75723,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(46670);let t={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},i=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:l,size:o="sm",className:c,label:d}){let x=(0,r.k)(e),m=l??i.has(e.toUpperCase()),u="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,a.jsxs)("span",{className:(0,s.f)("relative inline-flex shrink-0",u,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[m&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",n[x])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex rounded-full",u,t[x])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let a=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,a)).toFixed(1))} ${["B","KB","MB","GB","TB"][a]}`},"C",0,function(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}])},59439,e=>{e.v(a=>Promise.all(["static/chunks/1ixu-i6j99dj0.js"].map(a=>e.l(a))).then(()=>a(93309)))},37138,e=>{e.v(a=>Promise.all(["static/chunks/3h4dmpbixi6eo.js"].map(a=>e.l(a))).then(()=>a(99894)))},75775,e=>{"use strict";var a=e.i(56420);let s={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],75775)},57665,e=>{"use strict";var a=e.i(56420);let s={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],57665)},86207,14098,e=>{"use strict";var a=e.i(56420);let s={name:"refresh-ccw-dot",size:24,node:[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],86207);var t=e.i(43476),n=e.i(71645),i=e.i(68759),l=e.i(32568),o=e.i(82983),c=e.i(41220),d=e.i(32781);e.s(["E",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)([]),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(!0),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&(b(""),h(a?.role?.id??""),g(!0),w(!0),(async()=>{try{let e=await o.f.roles.list();m(e.data??[])}catch{b("Failed to load roles")}finally{w(!1)}})())},[e,a?.role?.id]);let y=async()=>{if(a){v(!0),b("");try{let e=a.role?.id;e&&e!==u&&await o.f.roles.unassign(e,{nodeIds:[a.id]}),u&&await o.f.roles.assign(u,{nodeIds:[a.id],defer:!p});let t=u?x.find(e=>e.id===u)??null:null;r(t),s()}catch(e){b(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(a?.role){v(!0),b("");try{await o.f.roles.unassign(a.role.id,{nodeIds:[a.id]}),r(null),s()}catch(e){b(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:_,title:a?.role?"Change Role":"Assign Role",description:a?`Node: ${a.name}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[N?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,t.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===x.length?(0,t.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.G,{label:"Role",children:(0,t.jsxs)("select",{value:u,onChange:e=>h(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"",children:"— No role —"}),x.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})}),u&&(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:p,onChange:e=>g(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,t.jsx)("div",{children:a?.role&&(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:f,children:"Unassign Role"})}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void y(),disabled:f||!u||0===x.length,icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":a?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)(""),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(""),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)("");(0,n.useEffect)(()=>{if(a){m(a.name);try{let e=JSON.parse(a.tags);h(e.join(", "))}catch{h("")}g(a.status),b("")}},[a]);let N=async()=>{if(a&&x.trim()){v(!0),b("");try{let e=u.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(a.id,{name:x.trim(),tags:e,status:p.toUpperCase()}),r(),s()}catch(e){b(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},w=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:w,title:"Edit Node",description:a?`${a.hostname}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:x,onChange:e=>m(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"Status",children:(0,t.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,t.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,t.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,t.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,t.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:u,onChange:e=>h(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:w,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void N(),disabled:f||!x.trim(),icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:a,onRegistered:s}){let[r,x]=(0,n.useState)(""),[m,u]=(0,n.useState)(""),[h,p]=(0,n.useState)("4100"),[g,f]=(0,n.useState)("linux"),[v,j]=(0,n.useState)("x86_64"),[b,N]=(0,n.useState)(""),[w,y]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),E=async()=>{if(r.trim()&&m.trim()){y(!0),_("");try{let e=b.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:r.trim(),hostname:m.trim(),ipAddress:m.trim(),port:Number(h)||4100,os:g,arch:v,tags:e,agentVersion:"2.2.0"}),s(),C()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{y(!1)}}},C=()=>{x(""),u(""),p("4100"),f("linux"),j("x86_64"),N(""),_(""),y(!1),a()};return(0,t.jsx)(l.n,{open:e,onClose:C,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Node Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:r,onChange:e=>x(e.target.value),placeholder:"web-server-01",className:l.W,autoFocus:!0})}),(0,t.jsx)(l.G,{label:"FQDN / Hostname",required:!0,children:(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"node-1.example.com",className:l.W})}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,t.jsx)(l.G,{label:"Port",children:(0,t.jsx)("input",{type:"number",value:h,onChange:e=>p(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"OS",children:(0,t.jsxs)("select",{value:g,onChange:e=>f(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"linux",children:"Linux"}),(0,t.jsx)("option",{value:"darwin",children:"macOS"}),(0,t.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,t.jsx)(l.G,{label:"Architecture",children:(0,t.jsxs)("select",{value:v,onChange:e=>j(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,t.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,t.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:b,onChange:e=>N(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void E(),disabled:w||!r.trim()||!m.trim(),icon:w?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:w?"Registering…":"Register Node"})]})]})})}],14098)},16306,e=>{"use strict";var a=e.i(56420);let s={name:"shield-alert",size:24,node:[["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:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],16306)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47061,e=>{"use strict";var s=e.i(43476),t=e.i(71645),a=e.i(68759),r=e.i(46670),n=e.i(93999),i=e.i(32568),l=e.i(82983),c=e.i(34479),o=e.i(4050),d=e.i(95187);let x=(0,d.createServerReference)("40329e45ad385f8c8c378eaa07e6844a5e1595766c",d.callServer,void 0,d.findSourceMapURL,"scanCron");var m=e.i(78571),h=e.i(63376),u=e.i(88187),p=e.i(41120),f=e.i(66595),j=e.i(74544),v=e.i(41220),g=e.i(16327),b=e.i(67927),N=e.i(25981),w=e.i(32781),y=e.i(4139),k=e.i(49882),S=e.i(53138),_=e.i(51757),C=e.i(83967);e.s(["default",0,function(){let{activeNode:e}=(0,o.l)(),[d,I]=(0,t.useState)([]),[E,$]=(0,t.useState)(!1),[L,M]=(0,t.useState)(null),[D,z]=(0,t.useState)(!1),[R,T]=(0,t.useState)(""),[O,A]=(0,t.useState)(new Set),[P,F]=(0,t.useState)(null),[U,G]=(0,t.useState)("1.0.0"),[W,K]=(0,t.useState)(""),[H,q]=(0,t.useState)(!1),B=(0,t.useCallback)(async()=>{$(!0),I([]),M(null);let s=Date.now();try{let s=await x(e.id);if(s.success&&Array.isArray(s.data)){let e=s.data.map(e=>({...e,status:"error"===e.status?"error":"done"}));I(e);let t=new Set(e.filter(e=>e.jobs.length>0).map(e=>e.nodeId));A(t.size>0?t:new Set(e.map(e=>e.nodeId)))}else M(s.error?.message??"Scan returned unsuccessful response")}catch(s){let e=s instanceof Error?s.message:"Scan request failed";M(e)}finally{let e=Date.now()-s;e<1500&&await new Promise(s=>setTimeout(s,1500-e)),$(!1),z(!0)}},[e]);(0,t.useEffect)(()=>{e&&B()},[e,B]);let J=d.reduce((e,s)=>e+("done"===s.status?s.jobs.length:0),0),V=d.filter(e=>"done"===e.status).length,Q=d.filter(e=>"error"===e.status).length,Y=e=>{if(!R)return!0;let s=R.toLowerCase();return e.name.toLowerCase().includes(s)||e.command.toLowerCase().includes(s)||e.schedule.toLowerCase().includes(s)||(e.user?.toLowerCase().includes(s)??!1)},Z=async()=>{if(P&&U){q(!0);try{let e=JSON.stringify({name:P.job.name,version:U,schedule:P.job.schedule,command:P.job.command,description:W},null,2);await l.f.library.files.create({name:`${P.job.name} v${U}`,fileName:`${P.job.name}-${U}.json`,mimeType:"application/x-magnus-cronjob",content:e,tags:["cronjob","cron"]}),F(null),G("1.0.0"),K("")}catch{}finally{q(!1)}}};return(0,s.jsxs)(h.U,{className:"space-y-6",children:[(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Cron Jobs"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage scheduled jobs across your fleet"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[D&&!E&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[d.length," node",1!==d.length?"s":""," · ",J," job",1!==J?"s":"",Q>0&&` \xb7 ${Q} error${1!==Q?"s":""}`]}),(0,s.jsxs)(a.K,{variant:"secondary",size:"sm",onClick:()=>void B(),disabled:E,children:[(0,s.jsx)(p.f,{className:(0,m.f)("h-3.5 w-3.5 mr-1.5",E&&"animate-spin")}),E?"Scanning...":"Rescan"]})]})]})}),E&&(0,s.jsx)(h.z,{children:(0,s.jsx)(u.f,{title:"Scanning Nodes for Cron Jobs",description:"Probing all online nodes...",nodes:d.map(e=>({nodeId:e.nodeId,nodeName:e.nodeName,status:e.status,error:e.error})),scanning:!0})}),!E&&D&&J>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(f.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,s.jsx)("input",{type:"text",placeholder:"Search jobs by name, command, or schedule...",value:R,onChange:e=>T(e.target.value),className:(0,m.f)(i.W,"pl-9")})]})}),!E&&D&&L&&(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(S.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,s.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:L}),(0,s.jsxs)(a.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void B(),children:[(0,s.jsx)(p.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!E&&D&&!L&&(0,s.jsxs)(s.Fragment,{children:[0===d.length?(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(v.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):d.map(e=>{let t=O.has(e.nodeId),i=e.jobs.filter(Y);return(0,s.jsx)(h.z,{children:(0,s.jsxs)(n.N,{className:"overflow-hidden",children:[(0,s.jsxs)("button",{onClick:()=>{var s;return s=e.nodeId,void A(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,s.jsx)(v.f,{className:"h-4 w-4 text-primary"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:e.nodeName}),"done"===e.status&&(0,s.jsxs)(r.t,{variant:e.jobs.length>0?"success":"default",children:[e.jobs.length," job",1!==e.jobs.length?"s":""]}),"error"===e.status&&((0,c.f)(e.error)?(0,s.jsx)(r.t,{variant:"default",children:"Disabled"}):(0,s.jsx)(r.t,{variant:"danger",children:"Error"}))]}),"error"===e.status&&e.error&&(0,s.jsx)("p",{className:(0,m.f)("text-[11px] mt-0.5 truncate",(0,c.f)(e.error)?"text-text-muted":"text-danger"),children:(0,c.f)(e.error)??e.error}),"done"===e.status&&0===e.jobs.length&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No cron jobs found on this node"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===e.status?(0,s.jsx)(_.f,{className:"h-4 w-4 text-success"}):(0,s.jsx)(C.f,{className:"h-4 w-4 text-danger"}),t?(0,s.jsx)(g.f,{className:"h-4 w-4 text-text-muted"}):(0,s.jsx)(b.f,{className:"h-4 w-4 text-text-muted"})]})]}),t&&"done"===e.status&&(0,s.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===i.length?(0,s.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:0===e.jobs.length?"No cron jobs found on this node.":"No jobs match your search on this node."})}):(0,s.jsx)("div",{className:"divide-y divide-border/30",children:i.map((t,n)=>(0,s.jsxs)("div",{className:"p-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(j.f,{className:"h-4 w-4 text-primary"}),(0,s.jsx)("span",{className:"text-xs font-bold",children:t.name}),t.user&&(0,s.jsx)(r.t,{variant:"default",children:t.user}),(0,s.jsx)(r.t,{variant:"info",children:t.schedule})]}),(0,s.jsxs)(a.K,{size:"sm",variant:"secondary",onClick:()=>{F({job:t,nodeId:e.nodeId,nodeName:e.nodeName}),G("1.0.0"),K("")},children:[(0,s.jsx)(N.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:[(0,s.jsx)(k.f,{className:"h-3 w-3"}),function(e){let s=e.split(/\s+/);if(s.length<5)return e;let[t,a,r,n,i]=s;return"*"===t&&"*"===a&&"*"===r&&"*"===n&&"*"===i?"Every minute":"0"===t&&"*"===a&&"*"===r&&"*"===n&&"*"===i?"Every hour":"0"===t&&"0"===a&&"*"===r&&"*"===n&&"*"===i?"Daily at midnight":t?.startsWith("*/")?`Every ${t.slice(2)} minutes`:a?.startsWith("*/")?`Every ${a.slice(2)} hours`:e}(t.schedule)]}),(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded border border-border bg-surface p-3",children:[(0,s.jsx)(y.f,{className:"h-3.5 w-3.5 text-primary mt-0.5 shrink-0"}),(0,s.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-all flex-1",children:t.command})]})]},`${t.name}-${n}`))})})]})},e.nodeId)}),d.length>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,s.jsxs)("span",{children:[V," node",1!==V?"s":""," scanned ·"," ",J," job",1!==J?"s":""," discovered"]}),Q>0&&(0,s.jsxs)("span",{className:"text-danger",children:[Q," node",1!==Q?"s":""," unreachable"]})]})})]}),(0,s.jsx)(i.n,{open:!!P,onClose:()=>F(null),title:"Publish to Library",description:P?.job.name??"",icon:(0,s.jsx)(N.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,s.jsx)("span",{className:"text-accent",children:"*"})]}),(0,s.jsx)("input",{type:"text",value:U,onChange:e=>G(e.target.value),placeholder:"1.0.0",className:i.W})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:"Description"}),(0,s.jsx)("input",{type:"text",value:W,onChange:e=>K(e.target.value),placeholder:"What does this cron job do?",className:i.W})]}),P&&(0,s.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",P.nodeName]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Schedule:"})," ",P.job.schedule]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Command:"})," ",(0,s.jsx)("span",{className:"text-primary",children:P.job.command})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(a.K,{variant:"secondary",size:"sm",onClick:()=>F(null),children:"Cancel"}),(0,s.jsx)(a.K,{size:"sm",onClick:()=>void Z(),disabled:H||!U,children:H?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],47061)},46670,e=>{"use strict";var s=e.i(43476),t=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},r={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:c=!1}){return(0,s.jsxs)("span",{className:(0,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],i),children:[l&&(0,s.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[c&&(0,s.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",r[n])}),(0,s.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",r[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var s=e.i(43476),t=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let r=(0,t.f)(a);var n=e.i(75775),i=e.i(78571),l=e.i(3062),c=e.i(35084);let o={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:t=100,tone:a,thresholds:r=c.q,label:n,size:l="xs",showValue:m=!1,valueLabel:h,glow:u,className:p,testId:f}){let j="number"==typeof e&&Number.isFinite(e),v=j?Math.max(0,Math.min(100,e/(t||1)*100)):0,g=a??(j?(0,c.Z)(v,r):"muted"),b=u||!a&&j&&v>=r.warn,N=h??(j?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,s.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":f,children:[(0,s.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":j?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,s.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",c.H[g],b&&o[g])})}),m&&(0,s.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",j?c.T[g]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function h({values:e,tone:t="primary",width:a=160,height:r=32,area:n=!0,max:l,percent:o=!1,threshold:d,live:x=!0,emptyLabel:u="not enough data",className:p,testId:f,label:j,stretch:v=!1}){let g=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,s.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":f,children:u});let b=c.v[t],N=l??(o?Math.max(100,...e):Math.max(...e,d??0)||1),w=r-4,y=a/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,S=e.map((e,s)=>[s*y,k(e)]),_=S.map(([e,s])=>`${e.toFixed(1)},${s.toFixed(1)}`).join(" "),C=S[S.length-1];return(0,s.jsxs)("svg",{width:v?"100%":a,height:r,viewBox:`0 0 ${a} ${r}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":f,role:j?"img":void 0,"aria-label":j,"aria-hidden":!j||void 0,children:[n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:g,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,s.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,s.jsx)("polygon",{points:`0,${r} ${_} ${a},${r}`,fill:`url(#${g})`})]}),void 0!==d&&(0,s.jsx)("line",{x1:0,x2:a,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,s.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:_}),x&&!v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:t,children:a,className:r,action:n,tone:i,corners:c=!1,...o}){return(0,s.jsx)(l.f,{...o,tone:i,corners:c,title:e,description:t,action:n,className:r,children:a})},"n",0,function({label:e,value:t,icon:a,trend:o,spark:d,meter:m,delta:u,tone:p="primary",className:f,testId:j}){let v=!u||u.value>=0===(u.positiveIsGood??!0);return(0,s.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",f),testId:j,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,s.jsx)("span",{className:"text-primary/60",children:a})]}),(0,s.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,s.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":c.T[p]),children:t}),u&&0!==u.value&&(0,s.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[u.value>0?(0,s.jsx)(n.f,{className:"h-3 w-3"}):(0,s.jsx)(r,{className:"h-3 w-3"}),Math.abs(u.value).toFixed(+!Number.isInteger(u.value)),u.unit]})]}),o&&(0,s.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",o.positive?"text-success":"text-danger"),children:o.value}),void 0!==m&&(0,s.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,s.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,s.jsx)(h,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var s=e.i(43476),t=e.i(78571),a=e.i(35084);let r={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:c=!0,interactive:o=!0,hero:d=!1,title:x,description:m,icon:h,action:u,as:p="div",padding:f="md",testId:j,className:v,children:g,...b}){return(0,s.jsxs)(p,{...b,"data-testid":j??b["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[f],c&&"panel-corners",c&&r[e],o&&"glow-hover",o&&n[e],o&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||u||h)&&(0,s.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,s.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",a.T[e]),children:h}),(0,s.jsxs)("div",{className:"min-w-0",children:[x&&(0,s.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),u]}),g]})}])},63376,e=>{"use strict";var s=e.i(43476);e.s(["z",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:`animate-page-in${t?` ${t}`:""}`,children:e})},"U",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:t,children:e})}])},88187,25981,e=>{"use strict";var s=e.i(43476),t=e.i(32181),a=e.i(32781),r=e.i(51757),n=e.i(83967),i=e.i(15331);e.s(["f",0,function({title:e,description:l,nodes:c,scanning:o}){return(0,s.jsxs)(t.f.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.16,1,.3,1]},className:"rounded border border-primary/30 bg-surface p-6 relative overflow-hidden",children:[o&&(0,s.jsx)(t.f.div,{className:"absolute inset-0 pointer-events-none",initial:{opacity:0},animate:{opacity:1},children:(0,s.jsx)(t.f.div,{className:"absolute left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent",animate:{top:["0%","100%"]},transition:{duration:2,repeat:1/0,ease:"linear"}})}),(0,s.jsx)("div",{className:"absolute inset-0 rounded pointer-events-none",style:{boxShadow:o?"0 0 20px var(--color-glow), inset 0 0 20px rgba(0,229,255,0.03)":"none",transition:"box-shadow 0.5s ease"}}),(0,s.jsxs)("div",{className:"relative z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[o?(0,s.jsx)(t.f.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:(0,s.jsx)(i.f,{className:"h-5 w-5 text-primary"})}):(0,s.jsx)(r.f,{className:"h-5 w-5 text-success"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-bold uppercase tracking-wider",children:o?e:"Scan Complete"}),l&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:l})]})]}),c.length>0&&(0,s.jsx)("div",{className:"space-y-2",children:c.map((e,i)=>(0,s.jsxs)(t.f.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:.05*i,duration:.3},className:"flex items-center gap-3 text-xs",children:["scanning"===e.status&&(0,s.jsx)(a.f,{className:"h-3.5 w-3.5 text-primary animate-spin"}),"done"===e.status&&(0,s.jsx)(r.f,{className:"h-3.5 w-3.5 text-success"}),"error"===e.status&&(0,s.jsx)(n.f,{className:"h-3.5 w-3.5 text-danger"}),(0,s.jsx)("span",{className:"text-text",children:e.nodeName}),"error"===e.status&&e.error&&(0,s.jsx)("span",{className:"text-[10px] text-danger/70 truncate max-w-[200px]",children:e.error})]},e.nodeId))}),0===c.length&&o&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:"Discovering nodes..."})]})]})}],88187);var l=e.i(56420);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let o=(0,l.f)(c);e.s(["f",0,o],25981)},75775,e=>{"use strict";var s=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],75775)},49882,e=>{"use strict";var s=e.i(56420);let t={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],49882)},95187,(e,s,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={callServer:function(){return n.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var r in a)Object.defineProperty(t,r,{enumerable:!0,get:a[r]});let n=e.r(32120),i=e.r(92245),l=e.r(35326)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47061,e=>{"use strict";var s=e.i(43476),t=e.i(71645),r=e.i(68759),a=e.i(46670),n=e.i(93999),i=e.i(32568),l=e.i(82983),c=e.i(34479),o=e.i(4050),d=e.i(95187);let x=(0,d.createServerReference)("40bf954e30e314678d44c69aff517dd548d6e45e24",d.callServer,void 0,d.findSourceMapURL,"scanCron");var m=e.i(78571),h=e.i(63376),u=e.i(88187),p=e.i(41120),f=e.i(66595),j=e.i(74544),v=e.i(41220),g=e.i(16327),b=e.i(67927),N=e.i(25981),w=e.i(32781),y=e.i(4139),k=e.i(49882),S=e.i(53138),_=e.i(51757),C=e.i(83967);e.s(["default",0,function(){let{activeNode:e}=(0,o.l)(),[d,I]=(0,t.useState)([]),[E,$]=(0,t.useState)(!1),[L,M]=(0,t.useState)(null),[D,z]=(0,t.useState)(!1),[R,T]=(0,t.useState)(""),[O,A]=(0,t.useState)(new Set),[P,F]=(0,t.useState)(null),[U,G]=(0,t.useState)("1.0.0"),[W,K]=(0,t.useState)(""),[H,q]=(0,t.useState)(!1),B=(0,t.useCallback)(async()=>{$(!0),I([]),M(null);let s=Date.now();try{let s=await x(e.id);if(s.success&&Array.isArray(s.data)){let e=s.data.map(e=>({...e,status:"error"===e.status?"error":"done"}));I(e);let t=new Set(e.filter(e=>e.jobs.length>0).map(e=>e.nodeId));A(t.size>0?t:new Set(e.map(e=>e.nodeId)))}else M(s.error?.message??"Scan returned unsuccessful response")}catch(s){let e=s instanceof Error?s.message:"Scan request failed";M(e)}finally{let e=Date.now()-s;e<1500&&await new Promise(s=>setTimeout(s,1500-e)),$(!1),z(!0)}},[e]);(0,t.useEffect)(()=>{e&&B()},[e,B]);let J=d.reduce((e,s)=>e+("done"===s.status?s.jobs.length:0),0),V=d.filter(e=>"done"===e.status).length,Q=d.filter(e=>"error"===e.status).length,Y=e=>{if(!R)return!0;let s=R.toLowerCase();return e.name.toLowerCase().includes(s)||e.command.toLowerCase().includes(s)||e.schedule.toLowerCase().includes(s)||(e.user?.toLowerCase().includes(s)??!1)},Z=async()=>{if(P&&U){q(!0);try{let e=JSON.stringify({name:P.job.name,version:U,schedule:P.job.schedule,command:P.job.command,description:W},null,2);await l.f.library.files.create({name:`${P.job.name} v${U}`,fileName:`${P.job.name}-${U}.json`,mimeType:"application/x-magnus-cronjob",content:e,tags:["cronjob","cron"]}),F(null),G("1.0.0"),K("")}catch{}finally{q(!1)}}};return(0,s.jsxs)(h.U,{className:"space-y-6",children:[(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Cron Jobs"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage scheduled jobs across your fleet"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[D&&!E&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[d.length," node",1!==d.length?"s":""," · ",J," job",1!==J?"s":"",Q>0&&` \xb7 ${Q} error${1!==Q?"s":""}`]}),(0,s.jsxs)(r.K,{variant:"secondary",size:"sm",onClick:()=>void B(),disabled:E,children:[(0,s.jsx)(p.f,{className:(0,m.f)("h-3.5 w-3.5 mr-1.5",E&&"animate-spin")}),E?"Scanning...":"Rescan"]})]})]})}),E&&(0,s.jsx)(h.z,{children:(0,s.jsx)(u.f,{title:"Scanning Nodes for Cron Jobs",description:"Probing all online nodes...",nodes:d.map(e=>({nodeId:e.nodeId,nodeName:e.nodeName,status:e.status,error:e.error})),scanning:!0})}),!E&&D&&J>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(f.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,s.jsx)("input",{type:"text",placeholder:"Search jobs by name, command, or schedule...",value:R,onChange:e=>T(e.target.value),className:(0,m.f)(i.W,"pl-9")})]})}),!E&&D&&L&&(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(S.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,s.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:L}),(0,s.jsxs)(r.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void B(),children:[(0,s.jsx)(p.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!E&&D&&!L&&(0,s.jsxs)(s.Fragment,{children:[0===d.length?(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(v.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):d.map(e=>{let t=O.has(e.nodeId),i=e.jobs.filter(Y);return(0,s.jsx)(h.z,{children:(0,s.jsxs)(n.N,{className:"overflow-hidden",children:[(0,s.jsxs)("button",{onClick:()=>{var s;return s=e.nodeId,void A(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,s.jsx)(v.f,{className:"h-4 w-4 text-primary"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:e.nodeName}),"done"===e.status&&(0,s.jsxs)(a.t,{variant:e.jobs.length>0?"success":"default",children:[e.jobs.length," job",1!==e.jobs.length?"s":""]}),"error"===e.status&&((0,c.f)(e.error)?(0,s.jsx)(a.t,{variant:"default",children:"Disabled"}):(0,s.jsx)(a.t,{variant:"danger",children:"Error"}))]}),"error"===e.status&&e.error&&(0,s.jsx)("p",{className:(0,m.f)("text-[11px] mt-0.5 truncate",(0,c.f)(e.error)?"text-text-muted":"text-danger"),children:(0,c.f)(e.error)??e.error}),"done"===e.status&&0===e.jobs.length&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No cron jobs found on this node"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===e.status?(0,s.jsx)(_.f,{className:"h-4 w-4 text-success"}):(0,s.jsx)(C.f,{className:"h-4 w-4 text-danger"}),t?(0,s.jsx)(g.f,{className:"h-4 w-4 text-text-muted"}):(0,s.jsx)(b.f,{className:"h-4 w-4 text-text-muted"})]})]}),t&&"done"===e.status&&(0,s.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===i.length?(0,s.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:0===e.jobs.length?"No cron jobs found on this node.":"No jobs match your search on this node."})}):(0,s.jsx)("div",{className:"divide-y divide-border/30",children:i.map((t,n)=>(0,s.jsxs)("div",{className:"p-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(j.f,{className:"h-4 w-4 text-primary"}),(0,s.jsx)("span",{className:"text-xs font-bold",children:t.name}),t.user&&(0,s.jsx)(a.t,{variant:"default",children:t.user}),(0,s.jsx)(a.t,{variant:"info",children:t.schedule})]}),(0,s.jsxs)(r.K,{size:"sm",variant:"secondary",onClick:()=>{F({job:t,nodeId:e.nodeId,nodeName:e.nodeName}),G("1.0.0"),K("")},children:[(0,s.jsx)(N.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:[(0,s.jsx)(k.f,{className:"h-3 w-3"}),function(e){let s=e.split(/\s+/);if(s.length<5)return e;let[t,r,a,n,i]=s;return"*"===t&&"*"===r&&"*"===a&&"*"===n&&"*"===i?"Every minute":"0"===t&&"*"===r&&"*"===a&&"*"===n&&"*"===i?"Every hour":"0"===t&&"0"===r&&"*"===a&&"*"===n&&"*"===i?"Daily at midnight":t?.startsWith("*/")?`Every ${t.slice(2)} minutes`:r?.startsWith("*/")?`Every ${r.slice(2)} hours`:e}(t.schedule)]}),(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded border border-border bg-surface p-3",children:[(0,s.jsx)(y.f,{className:"h-3.5 w-3.5 text-primary mt-0.5 shrink-0"}),(0,s.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-all flex-1",children:t.command})]})]},`${t.name}-${n}`))})})]})},e.nodeId)}),d.length>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,s.jsxs)("span",{children:[V," node",1!==V?"s":""," scanned ·"," ",J," job",1!==J?"s":""," discovered"]}),Q>0&&(0,s.jsxs)("span",{className:"text-danger",children:[Q," node",1!==Q?"s":""," unreachable"]})]})})]}),(0,s.jsx)(i.n,{open:!!P,onClose:()=>F(null),title:"Publish to Library",description:P?.job.name??"",icon:(0,s.jsx)(N.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,s.jsx)("span",{className:"text-accent",children:"*"})]}),(0,s.jsx)("input",{type:"text",value:U,onChange:e=>G(e.target.value),placeholder:"1.0.0",className:i.W})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:"Description"}),(0,s.jsx)("input",{type:"text",value:W,onChange:e=>K(e.target.value),placeholder:"What does this cron job do?",className:i.W})]}),P&&(0,s.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",P.nodeName]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Schedule:"})," ",P.job.schedule]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Command:"})," ",(0,s.jsx)("span",{className:"text-primary",children:P.job.command})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(r.K,{variant:"secondary",size:"sm",onClick:()=>F(null),children:"Cancel"}),(0,s.jsx)(r.K,{size:"sm",onClick:()=>void Z(),disabled:H||!U,children:H?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],47061)},46670,e=>{"use strict";var s=e.i(43476),t=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},a={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:c=!1}){return(0,s.jsxs)("span",{className:(0,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,s.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[c&&(0,s.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",a[n])}),(0,s.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",a[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var s=e.i(43476),t=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let a=(0,t.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),c=e.i(35084);let o={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:t=100,tone:r,thresholds:a=c.q,label:n,size:l="xs",showValue:m=!1,valueLabel:h,glow:u,className:p,testId:f}){let j="number"==typeof e&&Number.isFinite(e),v=j?Math.max(0,Math.min(100,e/(t||1)*100)):0,g=r??(j?(0,c.Z)(v,a):"muted"),b=u||!r&&j&&v>=a.warn,N=h??(j?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,s.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":f,children:[(0,s.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":j?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,s.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",c.H[g],b&&o[g])})}),m&&(0,s.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",j?c.T[g]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function h({values:e,tone:t="primary",width:r=160,height:a=32,area:n=!0,max:l,percent:o=!1,threshold:d,live:x=!0,emptyLabel:u="not enough data",className:p,testId:f,label:j,stretch:v=!1}){let g=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,s.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":f,children:u});let b=c.v[t],N=l??(o?Math.max(100,...e):Math.max(...e,d??0)||1),w=a-4,y=r/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,S=e.map((e,s)=>[s*y,k(e)]),_=S.map(([e,s])=>`${e.toFixed(1)},${s.toFixed(1)}`).join(" "),C=S[S.length-1];return(0,s.jsxs)("svg",{width:v?"100%":r,height:a,viewBox:`0 0 ${r} ${a}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":f,role:j?"img":void 0,"aria-label":j,"aria-hidden":!j||void 0,children:[n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:g,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,s.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,s.jsx)("polygon",{points:`0,${a} ${_} ${r},${a}`,fill:`url(#${g})`})]}),void 0!==d&&(0,s.jsx)("line",{x1:0,x2:r,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,s.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:_}),x&&!v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:t,children:r,className:a,action:n,tone:i,corners:c=!1,...o}){return(0,s.jsx)(l.f,{...o,tone:i,corners:c,title:e,description:t,action:n,className:a,children:r})},"n",0,function({label:e,value:t,icon:r,trend:o,spark:d,meter:m,delta:u,tone:p="primary",className:f,testId:j}){let v=!u||u.value>=0===(u.positiveIsGood??!0);return(0,s.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",f),testId:j,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,s.jsx)("span",{className:"text-primary/60",children:r})]}),(0,s.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,s.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":c.T[p]),children:t}),u&&0!==u.value&&(0,s.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[u.value>0?(0,s.jsx)(n.f,{className:"h-3 w-3"}):(0,s.jsx)(a,{className:"h-3 w-3"}),Math.abs(u.value).toFixed(+!Number.isInteger(u.value)),u.unit]})]}),o&&(0,s.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",o.positive?"text-success":"text-danger"),children:o.value}),void 0!==m&&(0,s.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,s.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,s.jsx)(h,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var s=e.i(43476),t=e.i(78571),r=e.i(35084);let a={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:c=!0,interactive:o=!0,hero:d=!1,title:x,description:m,icon:h,action:u,as:p="div",padding:f="md",testId:j,className:v,children:g,...b}){return(0,s.jsxs)(p,{...b,"data-testid":j??b["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[f],c&&"panel-corners",c&&a[e],o&&"glow-hover",o&&n[e],o&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||u||h)&&(0,s.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,s.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",r.T[e]),children:h}),(0,s.jsxs)("div",{className:"min-w-0",children:[x&&(0,s.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),u]}),g]})}])},63376,e=>{"use strict";var s=e.i(43476);e.s(["z",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:`animate-page-in${t?` ${t}`:""}`,children:e})},"U",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:t,children:e})}])},88187,25981,e=>{"use strict";var s=e.i(43476),t=e.i(32181),r=e.i(32781),a=e.i(51757),n=e.i(83967),i=e.i(15331);e.s(["f",0,function({title:e,description:l,nodes:c,scanning:o}){return(0,s.jsxs)(t.f.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.16,1,.3,1]},className:"rounded border border-primary/30 bg-surface p-6 relative overflow-hidden",children:[o&&(0,s.jsx)(t.f.div,{className:"absolute inset-0 pointer-events-none",initial:{opacity:0},animate:{opacity:1},children:(0,s.jsx)(t.f.div,{className:"absolute left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent",animate:{top:["0%","100%"]},transition:{duration:2,repeat:1/0,ease:"linear"}})}),(0,s.jsx)("div",{className:"absolute inset-0 rounded pointer-events-none",style:{boxShadow:o?"0 0 20px var(--color-glow), inset 0 0 20px rgba(0,229,255,0.03)":"none",transition:"box-shadow 0.5s ease"}}),(0,s.jsxs)("div",{className:"relative z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[o?(0,s.jsx)(t.f.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:(0,s.jsx)(i.f,{className:"h-5 w-5 text-primary"})}):(0,s.jsx)(a.f,{className:"h-5 w-5 text-success"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-bold uppercase tracking-wider",children:o?e:"Scan Complete"}),l&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:l})]})]}),c.length>0&&(0,s.jsx)("div",{className:"space-y-2",children:c.map((e,i)=>(0,s.jsxs)(t.f.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:.05*i,duration:.3},className:"flex items-center gap-3 text-xs",children:["scanning"===e.status&&(0,s.jsx)(r.f,{className:"h-3.5 w-3.5 text-primary animate-spin"}),"done"===e.status&&(0,s.jsx)(a.f,{className:"h-3.5 w-3.5 text-success"}),"error"===e.status&&(0,s.jsx)(n.f,{className:"h-3.5 w-3.5 text-danger"}),(0,s.jsx)("span",{className:"text-text",children:e.nodeName}),"error"===e.status&&e.error&&(0,s.jsx)("span",{className:"text-[10px] text-danger/70 truncate max-w-[200px]",children:e.error})]},e.nodeId))}),0===c.length&&o&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:"Discovering nodes..."})]})]})}],88187);var l=e.i(56420);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let o=(0,l.f)(c);e.s(["f",0,o],25981)},75775,e=>{"use strict";var s=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let r=(0,s.f)(t);e.s(["f",0,r],75775)},49882,e=>{"use strict";var s=e.i(56420);let t={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};t.node;let r=(0,s.f)(t);e.s(["f",0,r],49882)},95187,(e,s,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={callServer:function(){return n.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var a in r)Object.defineProperty(t,a,{enumerable:!0,get:r[a]});let n=e.r(32120),i=e.r(92245),l=e.r(35326)}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82983,34479,e=>{"use strict";class t extends Error{name="KyError";get isKyError(){return!0}}class s extends t{name="HTTPError";response;request;options;data;constructor(e,t,s){let r=e.status||0===e.status?e.status:"",o=e.statusText??"",i=`${r} ${o}`.trim(),a=i?`status code ${i}`:"an unknown error";super(`Request failed with ${a}: ${t.method} ${t.url}`),this.response=e,this.request=t,this.options=s}}class r extends t{name="NetworkError";request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}}let o=e=>null!==e&&"object"==typeof e,i=e=>o(e)&&!Array.isArray(e),a=e=>"number"==typeof e&&e>=0,n=Object.prototype.toString,l=e=>e instanceof Error||"[object Error]"===n.call(e),h=e=>e instanceof globalThis.Request||"[object Request]"===n.call(e),u=e=>e instanceof globalThis.Response||"[object Response]"===n.call(e);class c extends Error{static wrap(e){return l(e)?e:new c(e)}name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}}class d extends t{name="ForceRetryError";customDelay;code;customRequest;constructor(e){if(null===e)throw TypeError("The `ky.retry()` options must be an object");let t=e?.delay;if(void 0!==t&&!a(t))throw TypeError("The `ky.retry()` `delay` option must be a non-negative number or `Infinity`");if(e?.code!==void 0&&"string"!=typeof e.code)throw TypeError("The `ky.retry()` `code` option must be a string");if(e?.request!==void 0&&!h(e.request))throw TypeError("The `ky.retry()` `request` option must be a `Request`");let s=e?.cause===void 0?void 0:c.wrap(e.cause);super(e?.code===void 0?"Forced retry":`Forced retry: ${e.code}`,s?{cause:s}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}}class p extends Error{name="SchemaValidationError";issues;constructor(e){super("Response schema validation failed"),this.issues=e}}class f extends t{name="TimeoutError";request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}}let g=(()=>{let e=!1,t=!1,s="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&s)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch{return!1}let r="Bun"in globalThis||"Deno"in globalThis;return(e||r)&&!t})(),m="function"==typeof globalThis.AbortController,y="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,b="function"==typeof globalThis.ReadableStream,w="function"==typeof globalThis.FormData,v=["get","post","put","patch","head","delete","query"],T={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},R=()=>Object.keys(T).filter(e=>"bytes"!==e||"function"==typeof globalThis.Response?.prototype?.bytes),$=Symbol.for("ky.stop");class k{get isRetryMarker(){return!0}options;constructor(e){this.options=e}}let q=e=>e instanceof k||e?.isRetryMarker===!0,S=e=>new k(e),C=["onUploadProgress","onDownloadProgress","timeout","fetch","throwHttpErrors"],A={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,maxResponseSize:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},x={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0};class E extends t{name="ResponseSizeError";request;maxResponseSize;constructor(e,t){super(`Response body exceeded ${t} bytes: ${e.method} ${e.url}`),this.request=e,this.maxResponseSize=t}}let P=new TextEncoder,U=new WeakMap,j=new Set([101,103,204,205,304]),O=(e,t)=>{let s=e?.body;s&&s!==t?.body&&s.cancel().catch(()=>void 0)},M=e=>Math.max(0,Number(e.get("content-length"))||0),L=e=>e.replaceAll(/\r\n|\r|\n/g,"\r\n"),D=e=>e.replaceAll("\n","%0A").replaceAll("\r","%0D").replaceAll('"',"%22"),I=(e,t,s)=>{let r,o=0;return e.pipeThrough(new TransformStream({transform(e,i){if(i.enqueue(e),r){o+=r.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON);let i=0===t?0:Math.max(t,o);s?.({percent:e,totalBytes:i,transferredBytes:o},r)}r=e},flush(){let e=r??new Uint8Array;o+=e.byteLength,s?.({percent:1,totalBytes:o,transferredBytes:o},e)}}))},N=(e,t,s=t.body?U.get(t.body):void 0)=>{let r=e.clone.bind(e);if(e.body&&s)for(let t of(U.set(e.body,s),Object.keys(T))){if("function"!=typeof e[t])continue;let r=e[t].bind(e);Object.defineProperty(e,t,{async value(){try{return await r()}catch(e){throw s()??e}},writable:!0,configurable:!0})}return Object.defineProperties(e,{url:{value:t.url},redirected:{value:t.redirected},type:{value:t.type},headers:{value:t.headers},clone:{value(){let t=r();return e.body&&s&&U.set(e.body,s),N(t,e)},writable:!0,configurable:!0}}),e},B=e=>{let{body:t}=e;if(!(!t||e.bodyUsed||t.locked||j.has(e.status)))return t},z=Symbol.for("ky.replaceOption"),J=e=>o(e)&&!0===e[z]?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},F=(...e)=>{for(let t of e)if(void 0!==t&&!i(t))throw TypeError("The `options` argument must be an object");return ei({},...e)},W=(e={},t={})=>{let s=new globalThis.Headers(e);for(let[e,r]of Object.entries(V(t)))void 0===r?s.delete(e):s.set(e,r);return s},H=e=>{if(!i(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},_=e=>H(e)||Array.isArray(e),K=e=>{if(e instanceof URLSearchParams){let t=new URLSearchParams(e),s=e[ee];return s&&(t[ee]=new Set(s)),t}return Array.isArray(e)?[...e]:H(e)?{...e}:e},G=e=>Array.isArray(e)?e.map(e=>K(e)):K(e),Y=(e,t=new WeakMap)=>{if(!_(e))return e;let s=t.get(e);if(s)return s;if(Array.isArray(e)){let s=[];for(let r of(t.set(e,s),e))s.push(Y(r,t));return s}let r=null===Object.getPrototypeOf(e)?Object.create(null):{};for(let s of(t.set(e,r),Reflect.ownKeys(e)))Object.prototype.propertyIsEnumerable.call(e,s)&&Object.defineProperty(r,s,{value:Y(e[s],t),writable:!0,enumerable:!0,configurable:!0});return r},V=e=>{if(H(e))return e;let t=e instanceof globalThis.Headers,s={};for(let[r,o]of new globalThis.Headers(e).entries())s[r]=t&&"undefined"===o?void 0:o;return s},X=(e,t)=>{let s=new Map;for(let[r,o]of[...Object.entries(V(e)),...Object.entries(V(t))])s.set(r.toLowerCase(),o);return Object.fromEntries(s)};function Q(e,t,s){if(Object.hasOwn(t,s)&&void 0===t[s])return[];let{isReplace:r,value:o}=J(t[s]);if(void 0!==o&&(!Array.isArray(o)||!o.every(e=>"function"==typeof e)))throw TypeError(`\`hooks.${s}\` must be an array of functions`);return r?[...o??[]]:ei(e[s]??[],o??[])}let Z=(e={},t={})=>{if(!i(t))throw TypeError("The `hooks` option must be an object");return{init:Q(e,t,"init"),beforeRequest:Q(e,t,"beforeRequest"),beforeRetry:Q(e,t,"beforeRetry"),beforeError:Q(e,t,"beforeError"),afterResponse:Q(e,t,"afterResponse")}},ee=Symbol("deletedParameters"),et=new Set(["json","context"]),es=(e,t)=>{if(!_(e))return e;if(t.has(e))return t.get(e);t.set(e,e);let s=((e,t)=>{let s;for(let[r,o]of Object.entries(e)){let i=t(o);i!==o&&((s??=Array.isArray(e)?[...e]:{...e})[r]=i)}return s??e})(e,e=>es(J(e).value,t));return t.set(e,s),s},er=(e,t)=>{let s=new URLSearchParams,r=new Set;for(let i of[e,t])if(i instanceof URLSearchParams){let e=i[ee];if(e)for(let t of e)s.delete(t),r.add(t);for(let[e,t]of i.entries())s.append(e,t)}else if(Array.isArray(i))for(let e of i){if(!Array.isArray(e)||2!==e.length)throw TypeError("Array search parameters must be provided in [[key, value], ...] format");let t=String(e[0]),{isReplace:r,value:o}=J(e[1]);r&&s.delete(t),s.append(t,String(o))}else if(o(i))for(let[e,t]of Object.entries(i)){let{isReplace:o,value:i}=J(t);void 0===i?(s.delete(e),r.add(e)):(o&&s.delete(e),s.append(e,String(i)))}else for(let[e,t]of new URLSearchParams(i).entries())s.append(e,t);return r.size>0&&(s[ee]=r),s},eo=(e,...t)=>{let s,r={},a={},n={},l=[];for(let h of t)if(Array.isArray(h))Array.isArray(r)||(r=[]),r=[...r,...h];else if(o(h)){for(let[t,a]of Object.entries(h)){let n=J(a),{isReplace:h}=n;a=n.value;let u=e&&"signal"===t;if(u&&(h||void 0===a)&&(l.length=0),u&&a instanceof globalThis.AbortSignal){l.push(a);continue}if(e&&"headers"===t&&null===a)throw TypeError("The `headers` option must not be `null`. Use `undefined` to clear it.");if(e&&"context"===t){if(void 0!==a&&!i(a))throw TypeError("The `context` option must be an object");r={...r,context:void 0===a?{}:h?{...a}:{...r.context,...a}};continue}if(e&&"searchParams"===t){if(null===a)throw TypeError("The `searchParams` option must not be `null`. Use `undefined` to clear it.");s=void 0===a?void 0:h||void 0===s?G(a):er(s,a);continue}if(e&&"retry"===t&&void 0!==a&&"number"!=typeof a&&!i(a))throw TypeError("`retry` must be a number or an object");e&&"retry"===t&&!h&&(o(a)&&"number"==typeof r[t]?r={...r,[t]:{limit:r[t]}}:"number"==typeof a&&o(r[t])&&(a={limit:a})),e&&"retry"===t&&H(a)&&(h||!_(r[t]))?a=eo(!1,{},a):!h&&_(r[t])&&_(a)&&Array.isArray(r[t])===Array.isArray(a)&&(a=eo(!1,r[t],a)),r={...r,[t]:a}}if(e&&void 0!==h.hooks){let{value:e,isReplace:t}=J(h.hooks);n=t?Z({},e):Z(n,e),r.hooks=n}if(e&&o(h.headers)){let{value:e,isReplace:t}=J(h.headers);a=X(t?{}:a,e),r.headers=a}}if(void 0!==s&&(r.searchParams=s),l.length>0&&(1===l.length?r.signal=l[0]:y?r.signal=AbortSignal.any(l):r.signal=l.at(-1)),e)for(let[e,t]of Object.entries(r))et.has(e)||(r[e]=es(t,new Map));return r},ei=(...e)=>eo(!0,...e),ea=new Set([...v,"options","trace"]),en=e=>ea.has(e.toLowerCase())?e.toLowerCase():e,el={limit:2,methods:["get","put","head","delete","options","trace","query"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},eh=(e={})=>{if("number"==typeof e&&(e={limit:e}),!i(e))throw TypeError("`retry` must be a number or an object");let t={...el,...Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))};if(!Number.isInteger(t.limit)||t.limit<0)throw TypeError("`retry.limit` must be a finite, non-negative integer");for(let e of["methods","statusCodes","afterStatusCodes"])if(!Array.isArray(t[e]))throw Error(`retry.${e} must be an array`);for(let[e,s]of[["methods",e=>"string"==typeof e],["statusCodes",e=>Number.isInteger(e)],["afterStatusCodes",e=>Number.isInteger(e)]])if(t[e].some(e=>!s(e)))throw TypeError(`\`retry.${e}\` must only contain ${"methods"===e?"strings":"numbers"}`);for(let e of["maxRetryAfter","backoffLimit"])if(!a(t[e]))throw TypeError(`\`retry.${e}\` must be a non-negative number or \`Infinity\``);for(let e of["delay","shouldRetry"])if(void 0!==t[e]&&"function"!=typeof t[e])throw TypeError(`\`retry.${e}\` must be a function`);if(void 0!==t.jitter&&"boolean"!=typeof t.jitter&&"function"!=typeof t.jitter)throw TypeError("`retry.jitter` must be a boolean or a function");if("boolean"!=typeof t.retryOnTimeout)throw TypeError("`retry.retryOnTimeout` must be a boolean");return t.methods=t.methods.map(e=>en(e)),t.statusCodes=[...t.statusCodes],t.afterStatusCodes=[...t.afterStatusCodes],t};async function eu(e,t,s,r){let o,i=!1;try{return await new Promise((a,n)=>{o=setTimeout(()=>{i=!0,s?.abort(),n(new f(e))},r.timeout);let{fetch:l}=r;l(e,t).then(e=>{i?O(e):a(e)}).catch(n)})}finally{clearTimeout(o)}}async function ec(e,{signal:t}){return new Promise((s,r)=>{function o(){clearTimeout(i),r(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));let i=setTimeout(()=>{t?.removeEventListener("abort",o),s()},e)})}let ed=new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function ep(e){if(!(e&&l(e)&&"TypeError"===e.name&&"string"==typeof e.message))return!1;let{message:t,stack:s}=e;return"Load failed"===t||t.startsWith("Load failed (")&&t.endsWith(")")?void 0===s||"__sentry_captured__"in e:!!(t.startsWith("error sending request for url")||"Failed to fetch"===t||t.startsWith("Failed to fetch (")&&t.endsWith(")"))||ed.has(t)}let ef=(e,t)=>e instanceof t||e?.isKyError===!0&&e?.name===t.name,eg=/^\d+$/,em=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ey=/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{2}):(\d{2}):(\d{2}) GMT$/,eb=/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{2}):(\d{2}):(\d{2}) GMT$/,ew=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{2}| \d) (\d{2}:\d{2}:\d{2}) (\d{4})$/,ev=({year:e,month:t,day:s,hours:r,minutes:o,seconds:i})=>{let a=em.indexOf(t),n=Number(s),l=Number(r),h=Number(o),u=Number(i);if(-1===a||l>23||h>59||u>60)return;let c=Math.min(u,59),d=new Date(Date.UTC(e,a,n,l,h,c));d.setUTCFullYear(e);let p=d.getTime();if(d.getUTCFullYear()===e&&d.getUTCMonth()===a&&d.getUTCDate()===n&&d.getUTCHours()===l&&d.getUTCMinutes()===h&&d.getUTCSeconds()===c)return 60===u?p+1e3:p},eT=(e,t)=>e[t],eR=Symbol("timedOut"),e$=()=>globalThis.performance?.now()??Date.now(),ek=(e,t)=>Promise.race([e,new Promise(s=>{let r=setTimeout(()=>{s(eR)},t);e.finally(()=>{clearTimeout(r)}).catch(()=>void 0)})]),eq=e=>{(u(e)||h(e))&&O(e)},eS=e=>{e.then(e=>{eq(e)}).catch(()=>void 0)},eC=e=>{let t=(e.split(";",1)[0]??"").trim().toLowerCase();if(!t.endsWith("json"))return!1;let s=t.at(-5);return"/"===s||("."===s||"+"===s||"-"===s)&&t.includes("/")},eA=async(e,t)=>{let s,{body:r}=e;if(!r)try{return await e.text()}catch{return}try{s=r.getReader()}catch{return}let o=e.headers.get("content-type")??"",i=eC(o)?new TextDecoder:(e=>{let t=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(e),s=t?.[1]??t?.[2];if(s)try{return new TextDecoder(s)}catch{}return new TextDecoder})(o),a=[],n=0,l=(async()=>{try{for(;;){let{done:e,value:t}=await s.read();if(e)break;if((n+=t.byteLength)>0xa00000)return void s.cancel().catch(()=>void 0);a.push(i.decode(t,{stream:!0}))}}catch(e){if(ef(e,E))throw e;return}return a.push(i.decode()),a.join("")})(),h=await ek(l,t);return h===eR&&s.cancel().catch(()=>void 0),h},ex=(e,t)=>{if(!1!==e){if(!a(e))throw TypeError(`The \`${t}\` option must be a non-negative number or \`false\``);if(e>0x7fffffff)throw RangeError(`The \`${t}\` option cannot be greater than 2147483647`)}},eE=({throwHttpErrors:e=!0,timeout:t=1e4,fetch:s=globalThis.fetch.bind(globalThis)})=>({throwHttpErrors:e,timeout:t,fetch:s}),eP=e=>{for(let t of["parseJson","stringifyJson","fetch","onDownloadProgress","onUploadProgress"])if(void 0!==e[t]&&"function"!=typeof e[t])throw TypeError(`The \`${t}\` option must be a function`);let{throwHttpErrors:t}=e;if("boolean"!=typeof t&&"function"!=typeof t)throw TypeError("The `throwHttpErrors` option must be a boolean or a function")},eU=/^[\0-\u0020]+/g,ej=/[\t\n\r]/g,eO=/^[a-z][\d+.a-z-]*:/i,eM=/^https?:(?!\/\/)/i,eL=(e,t)=>{e.searchParams.has(t)&&e.searchParams.delete(t)},eD=async(e,t)=>{let s=o(t)||"function"==typeof t?t["~standard"]:void 0;if(!o(s)||"function"!=typeof s.validate)throw TypeError("The `schema` argument must follow the Standard Schema specification");let r=await s.validate(e);if(r.issues)throw new p(r.issues);return r.value};class eI{static create(e,t){let s=t.hooks?.init??[],r=s.length>0?{...t,headers:X({},t.headers??{}),context:{...t.context},json:Y(t.json),searchParams:G(t.searchParams),retry:Y(t.retry)}:t;for(let e of s)e(r);let o=new eI(e,r),i=(async()=>{let e;try{return e=await o.#e()}catch(e){return await o.#t(e)}finally{let t=o.#s;O(t,e),t&&o.request!==t&&O(o.request,e)}})();for(let e of R()){let t=T[e];i[e]=async s=>{let r;o.request!==o.#s&&o.request.headers.set("accept",o.request.headers.get("accept")||t);let a=await i;if(void 0===a)throw TypeError("The request resolved without a response, so there is no body to read. This happens when a `beforeRetry` hook returns `ky.stop`. Throw from the hook instead of returning `ky.stop`.");if("json"!==e)return o.#r(async()=>a[e](),a);let n=await o.#r(async()=>a.text(),a),l=o.#o(a);try{r=await o.#i(async()=>{let e=""!==n||void 0===s||o.#a.parseJson?await o.#n(n,l,a):void 0;return void 0===s?e:await eD(e,s)})}catch(e){throw o.#l?.aborted&&await o.#t(o.#l.reason,l),e}return r===eR&&await o.#t(new f(l),l),r}}return i}request;#h;#u=0;#c;#a;#d;#s;#p=!1;#l;#f=new WeakSet;#g;#m;#y=new WeakSet;#b=new WeakMap;#w=new WeakSet;constructor(e,t={}){let s;if("string"!=typeof e&&!(e instanceof URL||e instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");let{maxResponseSize:r=1/0,totalTimeout:o=!1}=t;if(Object.hasOwn(t,"prefixUrl"))throw Error("The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl");for(let e of["headers","method","prefix","baseUrl","referrer","referrerPolicy"])if(null===t[e])throw TypeError(`The \`${e}\` option must not be \`null\`. Use \`undefined\` to clear it.`);if(void 0!==t.context&&!i(t.context))throw TypeError("The `context` option must be an object");if(this.#a={...t,headers:W(e.headers,t.headers),hooks:Z({},t.hooks),method:(s=t.method??e.method??"GET",v.includes(s.toLowerCase())?s.toUpperCase():s),referrer:t.referrer??e.referrer,referrerPolicy:t.referrerPolicy??e.referrerPolicy,prefix:String(t.prefix||""),retry:eh(t.retry),...eE(t),totalTimeout:o,maxResponseSize:r,context:t.context??{}},eP(this.#a),ex(this.#a.timeout,"timeout"),ex(o,"totalTimeout"),this.#c=this.#a.retry.limit,1/0!==r&&(!Number.isSafeInteger(r)||r<0))throw TypeError("The `maxResponseSize` option must be a non-negative safe integer or Infinity");this.#d=e instanceof globalThis.Request?e:void 0,e=((e,t,s)=>{if("string"!=typeof e)return e;if(t){let s=t.replace(/\/+$/,""),r=e.replace(/^\/+/,"");e=`${s}/${r}`}if(s){let t=e.replaceAll(eU,"").replaceAll(ej,"");if(eM.test(t))throw TypeError("`input` url protocol must be followed by `//` when using `baseUrl`");if(!eO.test(t))return new URL(e,new Request(s).url)}return e})(e,this.#a.prefix,this.#a.baseUrl),m&&y&&(this.#l=this.#a.signal??this.#d?.signal,this.#h=new globalThis.AbortController,this.#a.signal=this.#v()),g&&(this.#a.duplex="half");let a=void 0!==t.headers&&W({},t.headers).has("content-type");void 0!==this.#a.json&&(this.#a.body=this.#a.stringifyJson?.(this.#a.json)??JSON.stringify(this.#a.json),a||this.#a.headers.set("content-type","application/json")),e instanceof globalThis.Request&&(w&&this.#a.body instanceof globalThis.FormData||this.#a.body instanceof URLSearchParams)&&!a&&this.#a.headers.delete("content-type"),this.request=new globalThis.Request(e,this.#a),this.#p="function"==typeof globalThis.ReadableStream&&this.#a.body instanceof globalThis.ReadableStream;let{searchParams:n}=this.#a;if((e=>{if(void 0===e)return!1;if(null===e)throw TypeError("The `searchParams` option must not be `null`. Use `undefined` to clear it.");return Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0||!!e[ee]?.size:"object"==typeof e?Object.keys(e).length>0:"string"==typeof e?e.trim().length>0:!!e})(n)){let e=new URL(this.request.url),t=n?.[ee];if(t)for(let s of t)eL(e,s);if("string"==typeof n){let t=n.replace(/^\?/,"");""!==t&&(e.search=e.search?`${e.search}&${t}`:`?${t}`)}else if(!i(n)||n instanceof URLSearchParams)for(let[t,s]of new URLSearchParams(n))e.searchParams.append(t,s);else for(let[t,s]of Object.entries(n))void 0===s?eL(e,t):e.searchParams.append(t,s);if(e.href!==this.request.url){let{body:t,cache:s,credentials:r,integrity:o,keepalive:i,mode:a,redirect:n,referrer:l,referrerPolicy:h}=this.request;this.request=new globalThis.Request(e,{...this.#a,cache:s,credentials:r,integrity:o,keepalive:i,mode:a,redirect:n,referrer:l,referrerPolicy:h,body:this.#a.body??(g&&!i&&"no-cors"!==a?t:void 0)})}}this.#m="number"==typeof o?e$()+o:1/0}async #e(){await Promise.resolve();let e=await this.#T();void 0!==e&&(this.#c=eh(this.#a.retry).limit);let t=e??await this.#R();for(;;){let e;if(void 0===t)return;let r=this.#y.has(t);try{t=await this.#$(t)}catch(t){if(!ef(t,d))throw t;e=t}if(void 0===e){let o=t;if(o.ok||"opaque"===o.type||!this.#k(o))break;let i=new s(o,this.#o(o),this.#q());if(i.data=await this.#S(o),this.#C(),this.#A(),r)throw i;e=i}t=await this.#x(e)}if(this.#E(t),this.#a.onDownloadProgress){if(!b)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let e=((e,t)=>{let s=B(e);if(!s)return e;let r=e.headers.get("content-encoding")?.toLowerCase();return N(new Response(I(s,r&&"identity"!==r?0:M(e.headers),t),e),e)})(t,this.#a.onDownloadProgress);return this.#P(e,this.#o(t)),this.#E(e)}return t}#U(e,t){let s=e.delay(this.#u+1);if(!a(s))throw TypeError("`retry.delay` must return a non-negative number or `Infinity`",{cause:t});let r=s;return!0===e.jitter?r=Math.random()*s:"function"==typeof e.jitter&&(!Number.isFinite(r=e.jitter(s))||r<0)&&(r=s),Math.min(e.backoffLimit,r)}async #j(e){let t=eh(this.#a.retry);if(this.#u>=Math.min(t.limit,this.#c))throw e;let o=c.wrap(e);if(ef(o,d))return o.customDelay??this.#U(t,e);if(!t.methods.includes(en(this.request.method)))throw e;let i=!1,{shouldRetry:a}=t;if(void 0!==a){let t=await this.#i(async()=>a({error:o,retryCount:this.#u+1}));if(this.#C(),t===eR)throw new f(this.#O);if(!1===t)throw e;i=!0===t}if(ef(e,f)){if(!i&&!t.retryOnTimeout)throw e;return this.#U(t,e)}if(ef(e,s)){if(!i&&!t.statusCodes.includes(e.response.status))throw e;let s=(e=>{let t=e.get("Retry-After");if(null!==t)return{value:t,allowTimestamp:!1};let s=e.get("RateLimit-Reset");if(null!==s)return{value:s,allowTimestamp:!0};let r=e.get("X-RateLimit-Retry-After");if(null!==r)return{value:r,allowTimestamp:!1};let o=e.get("X-RateLimit-Reset")??e.get("X-Rate-Limit-Reset");if(null!==o)return{value:o,allowTimestamp:!0}})(e.response.headers);if(s&&t.afterStatusCodes.includes(e.response.status)){let r=(({value:e,allowTimestamp:t})=>{if(eg.test(e)){let s=1e3*Number(e);return t&&Number(e)>=1e9&&(s-=Date.now()),Math.max(0,s)}let s=(e=>{let t=ey.exec(e);if(t)return ev({year:Number(eT(t,3)),month:eT(t,2),day:eT(t,1),hours:eT(t,4),minutes:eT(t,5),seconds:eT(t,6)});let s=eb.exec(e);if(s){let e,t=new Date,r=Number(eT(s,3)),o=100*Math.floor(t.getUTCFullYear()/100)+r,i=Date.UTC(t.getUTCFullYear()+50,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds());for(let t of[o-100,o,o+100]){let r=ev({year:t,month:eT(s,2),day:eT(s,1),hours:eT(s,4),minutes:eT(s,5),seconds:eT(s,6)});void 0!==r&&r<=i&&(e=r)}return e}let r=ew.exec(e);if(r){let[e,t,s]=eT(r,4).split(":");return ev({year:Number(eT(r,5)),month:eT(r,2),day:eT(r,3).trim(),hours:e,minutes:t,seconds:s})}})(e);if(void 0!==s)return Math.max(0,s-Date.now())})(s);return void 0===r?this.#U(t,e):Math.min(t.maxRetryAfter,r)}if(!i&&413===e.response.status)throw e;return this.#U(t,e)}if(!i&&!ef(e,r))throw e;return this.#U(t,e)}#E(e){if(!this.#a.parseJson||this.#w.has(e))return e;this.#w.add(e);let t=this.#o(e);e.json=async()=>this.#n(await e.text(),t,e);let s=e.clone.bind(e);return e.clone=()=>this.#E(this.#P(s(),t)),e}async #t(e,t=this.#O){if(!l(e)||this.#f.has(e))throw e;let s=e;for(let e of this.#a.hooks.beforeError){let r=await e({request:t,options:this.#q(),error:s,retryCount:this.#u});l(r)&&(s=r)}throw s}async #S(e){let t=this.#o(e),s=({fromTotalTimeout:e})=>{if(e)throw new f(t);this.#A(t)},r=this.#M(t),o=await eA(e,r.milliseconds);if(o===eR)return void s(r);if(!o)return;if(!eC(e.headers.get("content-type")??""))return o;let i=this.#M(t),a=await ek(Promise.resolve().then(()=>this.#n(o,t,e)),i.milliseconds).catch(()=>void 0);return a===eR?void s(i):a}#M(e){let t=!1===this.#a.timeout?1e4:this.#a.timeout,s=this.#L();if(0===s)throw new f(e);return{milliseconds:Math.min(t,s),fromTotalTimeout:s<=t}}#D(){let e=this.#L();if(0===e)throw new f(this.#O);let t=Math.min(!1===this.#a.timeout?1/0:this.#a.timeout,e);return 1/0===t?void 0:t}async #r(e,t){let s,o,i=this.#o(t);try{s=this.#D()}catch(e){await this.#t(e,i)}let a=e();try{o=void 0===s?await a:await ek(a,s)}catch(e){this.#l?.aborted&&await this.#t(this.#l.reason,i),0!==this.#L()&&(ep(e)&&await this.#t(new r(i,{cause:e}),i),await this.#t(e,i)),o=eR}return this.#l?.aborted&&await this.#t(this.#l.reason,i),(o===eR||0===this.#L())&&(this.#h?.abort(),await this.#t(new f(i),i)),o}async #i(e){let t,s,r,o=this.#l;o?.throwIfAborted();let i=this.#L();if(0===i)return this.#h?.abort(),eR;try{let a=new Promise((e,t)=>{o&&(s=()=>{t(o.reason)},o.addEventListener("abort",s,{once:!0}))});if(r=e(),1/0===i)return await Promise.race([r,a]);let n=new Promise(e=>{t=setTimeout(()=>{e(eR)},i)}),l=await Promise.race([r,n,a]);if(l===eR||0===this.#L())return this.#h?.abort(),l===eR?eS(r):eq(l),eR;return l}catch(e){if(o?.aborted&&(r&&eS(r),o.throwIfAborted()),0===this.#L())return this.#h?.abort(),eR;throw e}finally{clearTimeout(t),s&&o?.removeEventListener("abort",s)}}#n(e,t,s){let{parseJson:r}=this.#a;return r?r(e,{request:t,response:s}):JSON.parse(e)}#v(){return this.#l?AbortSignal.any([this.#l,this.#h.signal]):this.#h.signal}#k(e){let{throwHttpErrors:t}=this.#a;try{return"function"==typeof t?t(e.status):t}catch(t){throw O(e),t}}get #O(){return this.#s??this.request}#A(e=this.#O){if(0===this.#L())throw new f(e)}async #T(){for(let e of this.#a.hooks.beforeRequest){let t=await this.#i(async()=>e({request:this.request,options:this.#q(),retryCount:0}));if(t===eR)throw new f(this.#O);if(h(t))this.#I(this.#N(t));else if(u(t))return this.#y.add(t),t}}async #$(e){let t=this.#o(e);for(let s of(e=this.#B(e),this.#a.hooks.afterResponse)){let r,o=this.#P(e.clone(),t);this.#E(o);try{if((r=await this.#i(async()=>s({request:this.request,options:this.#q(),response:o,retryCount:this.#u})))===eR)throw new f(this.#O);if(q(r))throw new d(r.options)}catch(t){throw O(o),O(e),t}let i=u(r)?this.#P(r,t):e;O(o,i),O(e,i),i!==e&&(e=this.#B(i))}return e}async #R(){try{return await this.#z()}catch(e){return this.#x(e)}}async #x(e){this.#C();let t=Math.min(await this.#j(e),0x7fffffff),s={signal:this.#l},r=this.#L();if(0===r)throw new f(this.#O);if(t>=r)throw await ec(r,s),new f(this.#O);for(let r of(await ec(t,s),this.#A(),this.#h?.signal.aborted&&(this.#h=new globalThis.AbortController,this.#a.signal=this.#v(),this.#I(this.#N(this.request),this.#p)),ef(e,d)&&e.customRequest&&this.#I(this.#N(e.customRequest)),this.#a.hooks.beforeRetry)){let t;try{t=await this.#i(async()=>r({request:this.request,options:this.#q(),error:c.wrap(e),retryCount:this.#u+1}))}catch(t){throw this.#C(),l(t)&&t!==e&&this.#f.add(t),t}if(t===eR)throw new f(this.#O);if(h(t)){this.#I(this.#N(t));break}if(u(t))return this.#y.add(t),this.#u++,t;if(t===$)return;i(t)&&this.#J(t.options)}return this.#A(),this.#u++,this.#R()}async #z(){O(this.#s,this.request);let e=(e=>{let t={};for(let s of Object.keys(e))Object.hasOwn(x,s)||Object.hasOwn(A,s)||Object.defineProperty(t,s,{value:e[s],writable:!0,enumerable:!0,configurable:!0});return t})(this.#a);this.#c=eh(this.#a.retry).limit;let t=this.#c>0?this.#N(this.request.clone()):void 0,s=this.#F(this.request);this.#s=s,t&&(this.request=t,this.#p=!0);try{let t=this.#D(),{fetch:r}=this.#a,o=void 0===t?await r(s,e):await eu(s,e,this.#h,{timeout:t,fetch:r});if(!u(o))throw TypeError("The `fetch` option must resolve with a `Response`");if(0===this.#L())throw this.#h?.abort(),O(o),new f(s);return this.#P(o,s)}catch(e){if(this.#C(),0===this.#L())throw this.#h?.abort(),new f(s);if(ep(e))throw new r(s,{cause:e});throw e}}#C(){this.#l?.throwIfAborted()}#L(){return Math.max(0,this.#m-e$())}#J(e){if(!i(e))throw TypeError("The `options` returned from a `beforeRetry` hook must be an object");for(let t of Object.keys(e))if(!C.includes(t))throw TypeError(`The \`${t}\` option cannot be changed from a \`beforeRetry\` hook`);let t={...this.#a,...e},s={...t,...eE(t)};eP(s),ex(s.timeout,"timeout"),Object.assign(this.#a,s),this.#g=void 0}#q(){if(!this.#g){let{hooks:e,json:t,parseJson:s,stringifyJson:r,searchParams:o,timeout:i,totalTimeout:a,maxResponseSize:n,throwHttpErrors:l,fetch:h,...u}=this.#a;this.#g=Object.freeze(u)}return this.#g}#I(e,t=!1){this.#p&&O(this.request,e),this.#g=void 0,this.request=e,this.#p=t}#N(e){return this.#a.signal&&e instanceof globalThis.Request?new globalThis.Request(e,{signal:this.#a.signal,referrer:e.referrer,referrerPolicy:e.referrerPolicy}):e}#o(e){return this.#b.get(e)??this.#O}#P(e,t){return this.#b.set(e,t),e}#B(e){let t=this.#o(e);return this.#P(((e,t,s)=>{let r,o=B(e);if(!o||1/0===s)return e;let i=0,a=U.get(o);return N(new Response(o.pipeThrough(new TransformStream({transform(e,o){if((i+=e.byteLength)>s)throw r=new E(t,s);o.enqueue(e)}})),e),e,()=>r??a?.())})(e,t,this.#a.maxResponseSize),t)}#F(e){return this.#a.onUploadProgress&&g&&e.body?((e,t,s)=>{if(!e.body||e.bodyUsed||e.body.locked||e.keepalive||"no-cors"===e.mode||!(e instanceof globalThis.Request))return e;let r=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[s,r]of e)t+=44,t+=P.encode(`Content-Disposition: form-data; name="${D(L(s))}"`).byteLength,r instanceof Blob&&(t+=P.encode(`; filename="${D(r.name??"")}"`).byteLength,t+=P.encode(`\r
|
|
2
|
-
Content-Type: ${r.type||"application/octet-stream"}`).byteLength),t+=4,t+="string"==typeof r?P.encode(L(r)).byteLength:r.size,t+=2;return 0===t?0:t+40+6}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:"string"==typeof e?P.encode(e).byteLength:e instanceof URLSearchParams?P.encode(e.toString()).byteLength:0})(s??e.body)||M(e.headers);return new Request(e,{duplex:"half",body:I(e.body,r,t),headers:e.headers,referrer:e.referrer,referrerPolicy:e.referrerPolicy})})(e,this.#a.onUploadProgress,this.#a.body):e}}let eN=(e,t)=>{try{return eI.create(e,t())}catch(t){let e=Promise.reject(t);for(let t of R())e[t]=async()=>e;return e}},eB=e=>{let t=(t,s)=>eN(t,()=>F(e,s));for(let s of v)t[s]=(t,r)=>eN(t,()=>F(e,r,{method:s}));return t.create=e=>eB(F(e)),t.extend=t=>("function"==typeof t&&(t=t(F(Y(e)))),eB(F(e,t))),t.stop=$,t.retry=S,t},ez=eB(),eJ="__magnus_trace_id__";var eF=e.i(39430);let eW={cron:"Cron management",users:"User management","system-updates":"Automatic system updates","ardent-management":"Ardent management","docker-group-remediation":"Docker group remediation","credential-renewal":"Credential renewal","execution-supervisor":"The execution supervisor"};function eH(e){let t="string"==typeof e?e:null==e?"":JSON.stringify(e);if(!t.includes("AGENT_NOT_PRIVILEGED")&&!/is disabled: agent is not privileged/.test(t))return null;let s=/"feature"\s*:\s*\\?"([a-z-]+)/.exec(t)?.[1]??/([a-z-]+) is disabled: agent is not privileged/.exec(t)?.[1];return`${!s?"This feature":eW[s]??s} is disabled on this node (its agent runs unprivileged).`}e.s(["f",0,eH],34479);let e_=new class{client;_baseUrl;constructor(){this._baseUrl="",this.client=this.createClient(this._baseUrl)}get baseUrl(){return this._baseUrl}getAuthHeaders(){return(0,eF.L)(this._baseUrl)}reconfigure(e){this._baseUrl=(0,eF.K)(e)??"",this.client=this.createClient(this._baseUrl)}createClient(e){return ez.create({prefix:"/api/proxy",timeout:18e4,hooks:{beforeRequest:[({request:t})=>{e?t.headers.set("x-proxy-target",e):t.headers.delete("x-proxy-target"),t.headers.get("x-trace-id")||t.headers.set("x-trace-id",function(){let e=globalThis,t=Date.now(),s=e[eJ];if(s&&t-s.lastUsedAt<1e4)return s.lastUsedAt=t,s.id;let r="u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID().replace(/-/g,"").slice(0,16):Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,10);return e[eJ]={id:r,lastUsedAt:t},r}())}],beforeError:[async({error:e})=>{if(e instanceof s&&403===e.response.status){let t=eH(e.data);t&&(e.name="AgentNotPrivilegedError",e.message=t)}return e}]}})}async get(e,t){let s={};if(t)for(let[e,r]of Object.entries(t))void 0!==r&&(s[e]=String(r));return this.client.get(e,{searchParams:s}).json()}async post(e,t,s){return this.client.post(e,{json:t,headers:s}).json()}async patch(e,t){return this.client.patch(e,{json:t}).json()}async put(e,t){return this.client.put(e,{json:t}).json()}async del(e){return this.client.delete(e).json()}nodes={list:e=>this.get("nodes",e),get:e=>this.get(`nodes/${e}`),register:e=>this.post("nodes/register",e),update:(e,t)=>this.patch(`nodes/${e}`,t),repairAddress:(e,t)=>this.post(`nodes/${e}/repair-address`,t),delete:e=>this.del(`nodes/${e}`),health:e=>this.get(`nodes/${e}/health`),gpu:(e,t="24h")=>this.get(`nodes/${e}/gpu`,{period:t}),forecast:(e,t=30)=>this.get(`health/${e}/forecast`,{days:t}),wazuh:e=>this.get(`nodes/${e}/wazuh`),wazuhSummary:()=>this.get("nodes/wazuh/summary"),systemUpdatesSummary:()=>this.get("nodes/system-updates/summary"),tailscaleSummary:()=>this.get("nodes/tailscale/summary"),enableSystemUpdates:e=>this.post(`nodes/${e}/system-updates/enable`),healthHistory:(e,t)=>this.get(`nodes/${e}/health/history`,{limit:t})};commands={dispatch:(e,t)=>this.post("commands",e,{"x-idempotency-key":t}),get:e=>this.get(`commands/${e}`),result:e=>this.get(`commands/${e}/result`),cancel:(e,t)=>this.post(`commands/${e}/cancel`,{reason:t})};cron={list:e=>this.get("cron",e?{nodeId:e}:void 0),get:e=>this.get(`cron/${e}`),create:e=>this.post("cron",e),update:(e,t)=>this.patch(`cron/${e}`,t),delete:e=>this.del(`cron/${e}`)};files={update:e=>this.post("files/update",e),read:(e,t)=>this.get("files/read",{nodeId:e,filePath:t})};skills={list:()=>this.get("skills"),get:e=>this.get(`skills/${e}`),create:e=>this.post("skills",e),update:(e,t)=>this.patch(`skills/${e}`,t),delete:e=>this.del(`skills/${e}`),push:e=>this.post("skills/push",e),installations:e=>this.get(`skills/installations/${e}`),getFile:(e,t)=>this.get(`skills/${e}/files/${t}`),updateFile:(e,t,s)=>this.client.put(`skills/${e}/files/${t}`,{json:{content:s}}).json(),registry:{list:()=>this.get("skills/registry"),get:e=>this.get(`skills/registry/${e}`),sync:()=>this.post("skills/registry/sync",{}),publish:(e,t)=>this.post(`skills/registry/${e}/publish`,t),versions:e=>this.get(`skills/registry/${e}/versions`),versionDetail:(e,t)=>this.get(`skills/registry/${e}/versions/${t}`),setTag:(e,t)=>this.post(`skills/registry/${e}/tags`,t),delete:e=>this.del(`skills/registry/${e}`)}};logs={query:e=>this.post("logs/query",e),ingest:e=>this.post("logs/ingest",e)};audit={list:e=>this.get("audit",e),days:()=>this.get("audit/days")};hermes={installations:()=>this.get("hermes/installations"),installation:e=>this.get(`hermes/installations/${e}`),detect:e=>this.post("hermes/detect",e),deploy:(e,t)=>this.post("hermes/deploy",e,{"x-idempotency-key":t}),sync:e=>this.post(`hermes/installations/${e}/sync`),configure:e=>this.post(`hermes/installations/${e}/configure`),config:e=>this.get(`hermes/installations/${e}/config`),updateConfig:(e,t)=>this.patch(`hermes/installations/${e}/config`,t),update:e=>this.post(`hermes/installations/${e}/update`),uninstall:e=>this.del(`hermes/installations/${e}`),profiles:e=>e?this.get(`hermes/installations/${e}/profiles`):this.get("hermes/profiles"),createProfile:(e,t)=>this.post(`hermes/installations/${e}/profiles`,t),updateProfile:(e,t)=>this.patch(`hermes/profiles/${e}`,t),deleteProfile:e=>this.del(`hermes/profiles/${e}`),describeProfile:e=>this.post(`hermes/profiles/${e}/describe-auto`),gatewayAction:(e,t)=>this.post(`hermes/profiles/${e}/gateway/${t}`),dashboardAction:(e,t)=>this.post(`hermes/installations/${e}/dashboard/${t}`),enableApiServer:(e,t)=>this.post(`hermes/profiles/${e}/api-server/enable`,t),disableApiServer:e=>this.post(`hermes/profiles/${e}/api-server/disable`),apiServerStatus:e=>this.get(`hermes/profiles/${e}/api-server/status`),rotateApiServerKey:(e,t)=>this.post(`hermes/profiles/${e}/api-server/rotate-key`,t),migrationDryRun:e=>this.post("hermes/migration/openclaw/dry-run",e),migrationApply:(e,t)=>this.post("hermes/migration/openclaw/apply",e,{"x-idempotency-key":t}),jobs:e=>this.get("hermes/jobs",e),job:e=>this.get(`hermes/jobs/${e}`)};ardent={installations:()=>this.get("ardent/installations"),installation:e=>this.get(`ardent/installations/${encodeURIComponent(e)}`),profiles:()=>this.get("ardent/profiles"),resource:(e,t,s,r)=>this.get(`ardent/installations/${encodeURIComponent(e)}/profiles/${encodeURIComponent(t)}/${s}`,r),action:(e,t,s,r,o)=>this.client.post(`ardent/installations/${encodeURIComponent(e)}/profiles/${encodeURIComponent(t)}/action`,{json:{action:s,...o?{target:o}:{},body:r??{}},timeout:"package-install"===s?62e4:"profile-import-hermes"===s?1e5:s.startsWith("service-")?125e3:55e3}).json()};codex={installations:(e=!1)=>this.get("codex/installations",{refreshLatest:e?"true":void 0}),installation:(e,t=!1)=>this.get(`codex/installations/${e}`,{refreshLatest:t?"true":void 0}),update:e=>this.post(`codex/installations/${e}/update`),logout:e=>this.post(`codex/installations/${e}/logout`),startDeviceAuth:e=>this.post(`codex/installations/${e}/device-auth`),deviceAuth:(e,t)=>this.get(`codex/installations/${e}/device-auth/${t}`),cancelDeviceAuth:(e,t)=>this.post(`codex/installations/${e}/device-auth/${t}/cancel`)};orchestra={overview:()=>this.get("orchestra/overview"),capabilities:()=>this.get("orchestra/capabilities"),skillCatalog:()=>this.get("orchestra/skill-catalog"),auditCatalogSkill:e=>this.get(`orchestra/skill-catalog/${encodeURIComponent(e)}/audit`),installCatalogSkill:e=>this.post("orchestra/skill-catalog/install",e),quarantineCatalogSkill:e=>this.post(`orchestra/skill-catalog/${encodeURIComponent(e)}/quarantine`,{}),previewSkillBundle:e=>this.post("orchestra/skill-bundles/preview",e),applySkillBundle:e=>this.post("orchestra/skill-bundles/apply",e),cancelJob:e=>this.post(`orchestra/jobs/${e}/cancel`),testProvider:e=>this.post("orchestra/providers/test",e),skillAssignments:{list:e=>this.get("orchestra/skill-assignments",e),create:e=>this.post("orchestra/skill-assignments",e),update:(e,t)=>this.patch(`orchestra/skill-assignments/${e}`,t),delete:e=>this.del(`orchestra/skill-assignments/${e}`)},toolsetPolicies:{list:e=>this.get("orchestra/toolset-policies",e),upsert:e=>this.put("orchestra/toolset-policies",e),update:(e,t)=>this.patch(`orchestra/toolset-policies/${e}`,t),delete:e=>this.del(`orchestra/toolset-policies/${e}`)},roles:{list:()=>this.get("orchestra/roles"),get:e=>this.get(`orchestra/roles/${e}`),create:e=>this.post("orchestra/roles",e),update:(e,t)=>this.patch(`orchestra/roles/${e}`,t),delete:e=>this.del(`orchestra/roles/${e}`),apply:(e,t)=>this.post(`orchestra/roles/${e}/apply`,t)},providers:{get:e=>this.get("orchestra/providers",e),upsert:e=>this.put("orchestra/providers",e)},credentialPools:{list:()=>this.get("orchestra/credential-pools"),create:e=>this.post("orchestra/credential-pools",e),update:(e,t)=>this.patch(`orchestra/credential-pools/${e}`,t),delete:e=>this.del(`orchestra/credential-pools/${e}`),attach:(e,t)=>this.post(`orchestra/credential-pools/${e}/attach`,t),detach:e=>this.del(`orchestra/credential-pools/attachments/${e}`)},mcpServers:{list:()=>this.get("orchestra/mcp-servers"),create:e=>this.post("orchestra/mcp-servers",e),update:(e,t)=>this.patch(`orchestra/mcp-servers/${e}`,t),delete:e=>this.del(`orchestra/mcp-servers/${e}`),attach:(e,t)=>this.post(`orchestra/mcp-servers/${e}/attach`,t),detach:e=>this.del(`orchestra/mcp-servers/attachments/${e}`)},messagingBindings:{list:e=>this.get("orchestra/messaging-bindings",e),create:e=>this.post("orchestra/messaging-bindings",e),update:(e,t)=>this.patch(`orchestra/messaging-bindings/${e}`,t),delete:e=>this.del(`orchestra/messaging-bindings/${e}`)},cronJobs:{list:e=>this.get("orchestra/cron-jobs",e),create:e=>this.post("orchestra/cron-jobs",e),update:(e,t)=>this.patch(`orchestra/cron-jobs/${e}`,t),delete:e=>this.del(`orchestra/cron-jobs/${e}`)},plugins:{list:e=>this.get("orchestra/plugins",e),install:e=>this.post("orchestra/plugins",e),remove:e=>this.del(`orchestra/plugins/${e}`)},hooks:{list:e=>this.get("orchestra/hooks",e),create:e=>this.post("orchestra/hooks",e),update:(e,t)=>this.patch(`orchestra/hooks/${e}`,t),delete:e=>this.del(`orchestra/hooks/${e}`)}};quickCommand={exec:(e,t)=>this.post(`quick-command/${e}/exec`,t)};discovery={scan:e=>this.post("discovery/scan",{timeoutMs:e})};stats={overview:()=>this.get("stats/overview")};roles={list:()=>this.get("roles"),get:e=>this.get(`roles/${e}`),create:e=>this.post("roles",e),update:(e,t)=>this.patch(`roles/${e}`,t),delete:e=>this.del(`roles/${e}`),assign:(e,t)=>this.post(`roles/${e}/assign`,t),unassign:(e,t)=>this.post(`roles/${e}/unassign`,t),apply:(e,t)=>this.post(`roles/${e}/apply`,t??{}),applications:{list:e=>this.get("roles/applications/list",e),get:e=>this.get(`roles/applications/${e}`)}};notifications={list:e=>this.get("notifications",e),unreadCount:()=>this.get("notifications/unread-count"),markRead:e=>this.post("notifications/read",{ids:e}),markAllRead:()=>this.post("notifications/read-all")};library={categories:{list:()=>this.get("library/categories"),create:e=>this.post("library/categories",e),update:(e,t)=>this.patch(`library/categories/${e}`,t),delete:e=>this.del(`library/categories/${e}`)},files:{list:e=>this.get("library/files",e),get:e=>this.get(`library/files/${e}`),create:e=>this.post("library/files",e),update:(e,t)=>this.patch(`library/files/${e}`,t),delete:e=>this.del(`library/files/${e}`),move:e=>this.post("library/files/move",e)}};anomalies={list:e=>this.get("anomalies",e),summary:()=>this.get("anomalies/summary"),correlation:e=>this.get(`anomalies/event/${e}/correlation`),nodeSummary:e=>this.get(`anomalies/${e}/summary`),resolve:e=>this.post(`anomalies/${e}/resolve`),resolveNode:(e,t)=>this.post("anomalies/resolve-node",{nodeId:e,metric:t})};remediation={listRules:()=>this.get("remediation/rules"),getRule:e=>this.get(`remediation/rules/${e}`),createRule:e=>this.post("remediation/rules",e),updateRule:(e,t)=>this.patch(`remediation/rules/${e}`,t),deleteRule:e=>this.del(`remediation/rules/${e}`),listExecutions:e=>this.get("remediation/executions",e),trigger:e=>this.post("remediation/trigger",e)};assistant={chat:e=>this.post("assistant/chat",e),conversations:e=>this.get("assistant/conversations",e),messages:(e,t)=>this.get(`assistant/conversations/${e}`,t),forkConversation:(e,t)=>this.post(`assistant/conversations/${e}/fork`,{fromMessageId:t}),shareConversation:(e,t)=>this.post(`assistant/conversations/${e}/share`,{ttlHours:t}),getSharedConversation:e=>this.get(`assistant/shares/${e}`),getScratchpad:e=>this.get(`assistant/conversations/${e}/scratchpad`),clearScratchpad:e=>this.del(`assistant/conversations/${e}/scratchpad`),markConversationRead:e=>this.post(`assistant/conversations/${e}/read`),archiveConversation:e=>this.post(`assistant/conversations/${e}/archive`),deleteConversation:e=>this.del(`assistant/conversations/${e}`),unreadCount:()=>this.get("assistant/unread"),markMessagesRead:e=>this.post("assistant/messages/read",{messageIds:e}),getHeartbeatPrompt:()=>this.get("assistant/heartbeat-prompt"),updateHeartbeatPrompt:e=>this.put("assistant/heartbeat-prompt",{content:e}),resetHeartbeatPrompt:()=>this.del("assistant/heartbeat-prompt"),listModels:()=>this.get("assistant/models"),getModelContext:e=>this.get(`assistant/models/${encodeURIComponent(e)}/context`),getSettings:()=>this.get("assistant/settings"),updateSettings:e=>this.patch("assistant/settings",e),chatStreamUrl:()=>`${this._baseUrl}/assistant/chat/stream`,approveToolCall:e=>this.post(`assistant/messages/${e}/approve`),rejectToolCall:e=>this.post(`assistant/messages/${e}/reject`),confirmCommand:e=>this.post(`assistant/messages/${e}/confirm`),exportConversation:(e,t="markdown")=>this.client.get(`assistant/conversations/${e}/export`,{searchParams:{format:t}}).then(e=>e.text()),getInsights:()=>this.get("assistant/insights"),listPinnedInsights:()=>this.get("assistant/insights/pins"),pinInsight:e=>this.post("assistant/insights/pins",e),unpinInsight:e=>this.del(`assistant/insights/pins/${e}`),getModelProfiles:()=>this.get("assistant/model-profiles"),updateModelProfiles:e=>this.patch("assistant/model-profiles",Object.fromEntries(e.map(e=>[e.taskType,{provider:e.provider,model:e.model,fallbacks:e.fallbacks,temperature:e.temperature,maxTokens:e.maxTokens,maxToolRounds:e.maxToolRounds,thinkingMode:e.thinkingMode}])))};selfUpdate={status:()=>this.get("self-update/status"),version:()=>this.get("self-update/version"),check:()=>this.post("self-update/check"),apply:e=>this.post("self-update/apply",{restart:e}),restart:()=>this.post("self-update/restart")};systemUpdates={get:()=>this.get("system/updates").then(e=>e.data),refresh:()=>this.post("system/updates/check").then(e=>e.data)};agentUpgrades={eligibility:e=>this.get(`agents/upgrade/eligibility${e?`?version=${encodeURIComponent(e)}`:""}`).then(e=>e.data),start:e=>this.post("agents/upgrade",e).then(e=>e.data),check:e=>this.post("agents/upgrade",{...e,dryRun:!0}).then(e=>e.data),run:e=>this.get(`agents/upgrade/runs/${encodeURIComponent(e)}`).then(e=>e.data),stop:e=>this.post(`agents/upgrade/runs/${encodeURIComponent(e)}/stop`).then(e=>e.data),retry:(e,t={})=>this.post(`agents/upgrade/runs/${encodeURIComponent(e)}/retry`,t).then(e=>e.data)};libraryDeploy={deploy:e=>this.post("library/deploy",e)};webhooks={list:()=>this.get("webhooks").then(e=>e.data.endpoints),get:e=>this.get(`webhooks/${e}`).then(e=>e.data.endpoint),create:e=>this.post("webhooks",e).then(e=>e.data.endpoint),update:(e,t)=>this.patch(`webhooks/${e}`,t).then(e=>e.data.endpoint),delete:e=>this.del(`webhooks/${e}`),deliveries:(e,t=1,s=20)=>this.get(`webhooks/${e}/deliveries?page=${t}&pageSize=${s}`).then(e=>e.data),test:e=>this.post(`webhooks/${e}/test`).then(e=>e.data),redeliver:(e,t)=>this.post(`webhooks/${e}/deliveries/${t}/redeliver`).then(e=>e.data)}};e.s(["f",0,e_],82983)}]);
|
|
2
|
+
Content-Type: ${r.type||"application/octet-stream"}`).byteLength),t+=4,t+="string"==typeof r?P.encode(L(r)).byteLength:r.size,t+=2;return 0===t?0:t+40+6}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:"string"==typeof e?P.encode(e).byteLength:e instanceof URLSearchParams?P.encode(e.toString()).byteLength:0})(s??e.body)||M(e.headers);return new Request(e,{duplex:"half",body:I(e.body,r,t),headers:e.headers,referrer:e.referrer,referrerPolicy:e.referrerPolicy})})(e,this.#a.onUploadProgress,this.#a.body):e}}let eN=(e,t)=>{try{return eI.create(e,t())}catch(t){let e=Promise.reject(t);for(let t of R())e[t]=async()=>e;return e}},eB=e=>{let t=(t,s)=>eN(t,()=>F(e,s));for(let s of v)t[s]=(t,r)=>eN(t,()=>F(e,r,{method:s}));return t.create=e=>eB(F(e)),t.extend=t=>("function"==typeof t&&(t=t(F(Y(e)))),eB(F(e,t))),t.stop=$,t.retry=S,t},ez=eB(),eJ="__magnus_trace_id__";var eF=e.i(39430);let eW={cron:"Cron management",users:"User management","system-updates":"Automatic system updates","ardent-management":"Ardent management","docker-group-remediation":"Docker group remediation","credential-renewal":"Credential renewal","execution-supervisor":"The execution supervisor"};function eH(e){let t="string"==typeof e?e:null==e?"":JSON.stringify(e);if(!t.includes("AGENT_NOT_PRIVILEGED")&&!/is disabled: agent is not privileged/.test(t))return null;let s=/"feature"\s*:\s*\\?"([a-z-]+)/.exec(t)?.[1]??/([a-z-]+) is disabled: agent is not privileged/.exec(t)?.[1];return`${!s?"This feature":eW[s]??s} is disabled on this node (its agent runs unprivileged).`}e.s(["f",0,eH],34479);let e_=new class{client;_baseUrl;constructor(){this._baseUrl="",this.client=this.createClient(this._baseUrl)}get baseUrl(){return this._baseUrl}getAuthHeaders(){return(0,eF.L)(this._baseUrl)}reconfigure(e){this._baseUrl=(0,eF.K)(e)??"",this.client=this.createClient(this._baseUrl)}createClient(e){return ez.create({prefix:"/api/proxy",timeout:18e4,hooks:{beforeRequest:[({request:t})=>{e?t.headers.set("x-proxy-target",e):t.headers.delete("x-proxy-target"),t.headers.get("x-trace-id")||t.headers.set("x-trace-id",function(){let e=globalThis,t=Date.now(),s=e[eJ];if(s&&t-s.lastUsedAt<1e4)return s.lastUsedAt=t,s.id;let r="u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID().replace(/-/g,"").slice(0,16):Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,10);return e[eJ]={id:r,lastUsedAt:t},r}())}],beforeError:[async({error:e})=>{if(e instanceof s&&403===e.response.status){let t=eH(e.data);t&&(e.name="AgentNotPrivilegedError",e.message=t)}return e}]}})}async get(e,t){let s={};if(t)for(let[e,r]of Object.entries(t))void 0!==r&&(s[e]=String(r));return this.client.get(e,{searchParams:s}).json()}async post(e,t,s){return this.client.post(e,{json:t,headers:s}).json()}async patch(e,t){return this.client.patch(e,{json:t}).json()}async put(e,t){return this.client.put(e,{json:t}).json()}async del(e){return this.client.delete(e).json()}nodes={list:e=>this.get("nodes",e),get:e=>this.get(`nodes/${e}`),register:e=>this.post("nodes/register",e),update:(e,t)=>this.patch(`nodes/${e}`,t),repairAddress:(e,t)=>this.post(`nodes/${e}/repair-address`,t),delete:e=>this.del(`nodes/${e}`),health:e=>this.get(`nodes/${e}/health`),gpu:(e,t="24h")=>this.get(`nodes/${e}/gpu`,{period:t}),forecast:(e,t=30)=>this.get(`health/${e}/forecast`,{days:t}),wazuh:e=>this.get(`nodes/${e}/wazuh`),wazuhSummary:()=>this.get("nodes/wazuh/summary"),systemUpdatesSummary:()=>this.get("nodes/system-updates/summary"),tailscaleSummary:()=>this.get("nodes/tailscale/summary"),enableSystemUpdates:e=>this.post(`nodes/${e}/system-updates/enable`),healthHistory:(e,t)=>this.get(`nodes/${e}/health/history`,{limit:t})};commands={dispatch:(e,t)=>this.post("commands",e,{"x-idempotency-key":t}),get:e=>this.get(`commands/${e}`),result:e=>this.get(`commands/${e}/result`),cancel:(e,t)=>this.post(`commands/${e}/cancel`,{reason:t})};cron={list:e=>this.get("cron",e?{nodeId:e}:void 0),get:e=>this.get(`cron/${e}`),create:e=>this.post("cron",e),update:(e,t)=>this.patch(`cron/${e}`,t),delete:e=>this.del(`cron/${e}`)};files={update:e=>this.post("files/update",e),read:(e,t)=>this.get("files/read",{nodeId:e,filePath:t})};skills={list:()=>this.get("skills"),get:e=>this.get(`skills/${e}`),create:e=>this.post("skills",e),update:(e,t)=>this.patch(`skills/${e}`,t),delete:e=>this.del(`skills/${e}`),push:e=>this.post("skills/push",e),installations:e=>this.get(`skills/installations/${e}`),getFile:(e,t)=>this.get(`skills/${e}/files/${t}`),updateFile:(e,t,s)=>this.client.put(`skills/${e}/files/${t}`,{json:{content:s}}).json(),registry:{list:()=>this.get("skills/registry"),get:e=>this.get(`skills/registry/${e}`),sync:()=>this.post("skills/registry/sync",{}),publish:(e,t)=>this.post(`skills/registry/${e}/publish`,t),versions:e=>this.get(`skills/registry/${e}/versions`),versionDetail:(e,t)=>this.get(`skills/registry/${e}/versions/${t}`),setTag:(e,t)=>this.post(`skills/registry/${e}/tags`,t),delete:e=>this.del(`skills/registry/${e}`)}};logs={query:e=>this.post("logs/query",e),ingest:e=>this.post("logs/ingest",e)};audit={list:e=>this.get("audit",e),days:()=>this.get("audit/days")};hermes={installations:()=>this.get("hermes/installations"),installation:e=>this.get(`hermes/installations/${e}`),detect:e=>this.post("hermes/detect",e),deploy:(e,t)=>this.post("hermes/deploy",e,{"x-idempotency-key":t}),sync:e=>this.post(`hermes/installations/${e}/sync`),configure:e=>this.post(`hermes/installations/${e}/configure`),config:e=>this.get(`hermes/installations/${e}/config`),updateConfig:(e,t)=>this.patch(`hermes/installations/${e}/config`,t),update:e=>this.post(`hermes/installations/${e}/update`),uninstall:e=>this.del(`hermes/installations/${e}`),profiles:e=>e?this.get(`hermes/installations/${e}/profiles`):this.get("hermes/profiles"),createProfile:(e,t)=>this.post(`hermes/installations/${e}/profiles`,t),updateProfile:(e,t)=>this.patch(`hermes/profiles/${e}`,t),deleteProfile:e=>this.del(`hermes/profiles/${e}`),describeProfile:e=>this.post(`hermes/profiles/${e}/describe-auto`),gatewayAction:(e,t)=>this.post(`hermes/profiles/${e}/gateway/${t}`),dashboardAction:(e,t)=>this.post(`hermes/installations/${e}/dashboard/${t}`),enableApiServer:(e,t)=>this.post(`hermes/profiles/${e}/api-server/enable`,t),disableApiServer:e=>this.post(`hermes/profiles/${e}/api-server/disable`),apiServerStatus:e=>this.get(`hermes/profiles/${e}/api-server/status`),rotateApiServerKey:(e,t)=>this.post(`hermes/profiles/${e}/api-server/rotate-key`,t),migrationDryRun:e=>this.post("hermes/migration/openclaw/dry-run",e),migrationApply:(e,t)=>this.post("hermes/migration/openclaw/apply",e,{"x-idempotency-key":t}),jobs:e=>this.get("hermes/jobs",e),job:e=>this.get(`hermes/jobs/${e}`)};ardent={installations:()=>this.get("ardent/installations"),installation:e=>this.get(`ardent/installations/${encodeURIComponent(e)}`),profiles:()=>this.get("ardent/profiles"),resource:(e,t,s,r)=>this.get(`ardent/installations/${encodeURIComponent(e)}/profiles/${encodeURIComponent(t)}/${s}`,r),action:(e,t,s,r,o)=>this.client.post(`ardent/installations/${encodeURIComponent(e)}/profiles/${encodeURIComponent(t)}/action`,{json:{action:s,...o?{target:o}:{},body:r??{}},timeout:"package-install"===s?62e4:s.startsWith("service-")?125e3:55e3}).json()};codex={installations:(e=!1)=>this.get("codex/installations",{refreshLatest:e?"true":void 0}),installation:(e,t=!1)=>this.get(`codex/installations/${e}`,{refreshLatest:t?"true":void 0}),update:e=>this.post(`codex/installations/${e}/update`),logout:e=>this.post(`codex/installations/${e}/logout`),startDeviceAuth:e=>this.post(`codex/installations/${e}/device-auth`),deviceAuth:(e,t)=>this.get(`codex/installations/${e}/device-auth/${t}`),cancelDeviceAuth:(e,t)=>this.post(`codex/installations/${e}/device-auth/${t}/cancel`)};orchestra={overview:()=>this.get("orchestra/overview"),capabilities:()=>this.get("orchestra/capabilities"),skillCatalog:()=>this.get("orchestra/skill-catalog"),auditCatalogSkill:e=>this.get(`orchestra/skill-catalog/${encodeURIComponent(e)}/audit`),installCatalogSkill:e=>this.post("orchestra/skill-catalog/install",e),quarantineCatalogSkill:e=>this.post(`orchestra/skill-catalog/${encodeURIComponent(e)}/quarantine`,{}),previewSkillBundle:e=>this.post("orchestra/skill-bundles/preview",e),applySkillBundle:e=>this.post("orchestra/skill-bundles/apply",e),cancelJob:e=>this.post(`orchestra/jobs/${e}/cancel`),testProvider:e=>this.post("orchestra/providers/test",e),skillAssignments:{list:e=>this.get("orchestra/skill-assignments",e),create:e=>this.post("orchestra/skill-assignments",e),update:(e,t)=>this.patch(`orchestra/skill-assignments/${e}`,t),delete:e=>this.del(`orchestra/skill-assignments/${e}`)},toolsetPolicies:{list:e=>this.get("orchestra/toolset-policies",e),upsert:e=>this.put("orchestra/toolset-policies",e),update:(e,t)=>this.patch(`orchestra/toolset-policies/${e}`,t),delete:e=>this.del(`orchestra/toolset-policies/${e}`)},roles:{list:()=>this.get("orchestra/roles"),get:e=>this.get(`orchestra/roles/${e}`),create:e=>this.post("orchestra/roles",e),update:(e,t)=>this.patch(`orchestra/roles/${e}`,t),delete:e=>this.del(`orchestra/roles/${e}`),apply:(e,t)=>this.post(`orchestra/roles/${e}/apply`,t)},providers:{get:e=>this.get("orchestra/providers",e),upsert:e=>this.put("orchestra/providers",e)},credentialPools:{list:()=>this.get("orchestra/credential-pools"),create:e=>this.post("orchestra/credential-pools",e),update:(e,t)=>this.patch(`orchestra/credential-pools/${e}`,t),delete:e=>this.del(`orchestra/credential-pools/${e}`),attach:(e,t)=>this.post(`orchestra/credential-pools/${e}/attach`,t),detach:e=>this.del(`orchestra/credential-pools/attachments/${e}`)},mcpServers:{list:()=>this.get("orchestra/mcp-servers"),create:e=>this.post("orchestra/mcp-servers",e),update:(e,t)=>this.patch(`orchestra/mcp-servers/${e}`,t),delete:e=>this.del(`orchestra/mcp-servers/${e}`),attach:(e,t)=>this.post(`orchestra/mcp-servers/${e}/attach`,t),detach:e=>this.del(`orchestra/mcp-servers/attachments/${e}`)},messagingBindings:{list:e=>this.get("orchestra/messaging-bindings",e),create:e=>this.post("orchestra/messaging-bindings",e),update:(e,t)=>this.patch(`orchestra/messaging-bindings/${e}`,t),delete:e=>this.del(`orchestra/messaging-bindings/${e}`)},cronJobs:{list:e=>this.get("orchestra/cron-jobs",e),create:e=>this.post("orchestra/cron-jobs",e),update:(e,t)=>this.patch(`orchestra/cron-jobs/${e}`,t),delete:e=>this.del(`orchestra/cron-jobs/${e}`)},plugins:{list:e=>this.get("orchestra/plugins",e),install:e=>this.post("orchestra/plugins",e),remove:e=>this.del(`orchestra/plugins/${e}`)},hooks:{list:e=>this.get("orchestra/hooks",e),create:e=>this.post("orchestra/hooks",e),update:(e,t)=>this.patch(`orchestra/hooks/${e}`,t),delete:e=>this.del(`orchestra/hooks/${e}`)}};quickCommand={exec:(e,t)=>this.post(`quick-command/${e}/exec`,t)};discovery={scan:e=>this.post("discovery/scan",{timeoutMs:e})};stats={overview:()=>this.get("stats/overview")};roles={list:()=>this.get("roles"),get:e=>this.get(`roles/${e}`),create:e=>this.post("roles",e),update:(e,t)=>this.patch(`roles/${e}`,t),delete:e=>this.del(`roles/${e}`),assign:(e,t)=>this.post(`roles/${e}/assign`,t),unassign:(e,t)=>this.post(`roles/${e}/unassign`,t),apply:(e,t)=>this.post(`roles/${e}/apply`,t??{}),applications:{list:e=>this.get("roles/applications/list",e),get:e=>this.get(`roles/applications/${e}`)}};notifications={list:e=>this.get("notifications",e),unreadCount:()=>this.get("notifications/unread-count"),markRead:e=>this.post("notifications/read",{ids:e}),markAllRead:()=>this.post("notifications/read-all")};library={categories:{list:()=>this.get("library/categories"),create:e=>this.post("library/categories",e),update:(e,t)=>this.patch(`library/categories/${e}`,t),delete:e=>this.del(`library/categories/${e}`)},files:{list:e=>this.get("library/files",e),get:e=>this.get(`library/files/${e}`),create:e=>this.post("library/files",e),update:(e,t)=>this.patch(`library/files/${e}`,t),delete:e=>this.del(`library/files/${e}`),move:e=>this.post("library/files/move",e)}};anomalies={list:e=>this.get("anomalies",e),summary:()=>this.get("anomalies/summary"),correlation:e=>this.get(`anomalies/event/${e}/correlation`),nodeSummary:e=>this.get(`anomalies/${e}/summary`),resolve:e=>this.post(`anomalies/${e}/resolve`),resolveNode:(e,t)=>this.post("anomalies/resolve-node",{nodeId:e,metric:t})};remediation={listRules:()=>this.get("remediation/rules"),getRule:e=>this.get(`remediation/rules/${e}`),createRule:e=>this.post("remediation/rules",e),updateRule:(e,t)=>this.patch(`remediation/rules/${e}`,t),deleteRule:e=>this.del(`remediation/rules/${e}`),listExecutions:e=>this.get("remediation/executions",e),trigger:e=>this.post("remediation/trigger",e)};assistant={chat:e=>this.post("assistant/chat",e),conversations:e=>this.get("assistant/conversations",e),messages:(e,t)=>this.get(`assistant/conversations/${e}`,t),forkConversation:(e,t)=>this.post(`assistant/conversations/${e}/fork`,{fromMessageId:t}),shareConversation:(e,t)=>this.post(`assistant/conversations/${e}/share`,{ttlHours:t}),getSharedConversation:e=>this.get(`assistant/shares/${e}`),getScratchpad:e=>this.get(`assistant/conversations/${e}/scratchpad`),clearScratchpad:e=>this.del(`assistant/conversations/${e}/scratchpad`),markConversationRead:e=>this.post(`assistant/conversations/${e}/read`),archiveConversation:e=>this.post(`assistant/conversations/${e}/archive`),deleteConversation:e=>this.del(`assistant/conversations/${e}`),unreadCount:()=>this.get("assistant/unread"),markMessagesRead:e=>this.post("assistant/messages/read",{messageIds:e}),getHeartbeatPrompt:()=>this.get("assistant/heartbeat-prompt"),updateHeartbeatPrompt:e=>this.put("assistant/heartbeat-prompt",{content:e}),resetHeartbeatPrompt:()=>this.del("assistant/heartbeat-prompt"),listModels:()=>this.get("assistant/models"),getModelContext:e=>this.get(`assistant/models/${encodeURIComponent(e)}/context`),getSettings:()=>this.get("assistant/settings"),updateSettings:e=>this.patch("assistant/settings",e),chatStreamUrl:()=>`${this._baseUrl}/assistant/chat/stream`,approveToolCall:e=>this.post(`assistant/messages/${e}/approve`),rejectToolCall:e=>this.post(`assistant/messages/${e}/reject`),confirmCommand:e=>this.post(`assistant/messages/${e}/confirm`),exportConversation:(e,t="markdown")=>this.client.get(`assistant/conversations/${e}/export`,{searchParams:{format:t}}).then(e=>e.text()),getInsights:()=>this.get("assistant/insights"),listPinnedInsights:()=>this.get("assistant/insights/pins"),pinInsight:e=>this.post("assistant/insights/pins",e),unpinInsight:e=>this.del(`assistant/insights/pins/${e}`),getModelProfiles:()=>this.get("assistant/model-profiles"),updateModelProfiles:e=>this.patch("assistant/model-profiles",Object.fromEntries(e.map(e=>[e.taskType,{provider:e.provider,model:e.model,fallbacks:e.fallbacks,temperature:e.temperature,maxTokens:e.maxTokens,maxToolRounds:e.maxToolRounds,thinkingMode:e.thinkingMode}])))};selfUpdate={status:()=>this.get("self-update/status"),version:()=>this.get("self-update/version"),check:()=>this.post("self-update/check"),apply:e=>this.post("self-update/apply",{restart:e}),restart:()=>this.post("self-update/restart")};systemUpdates={get:()=>this.get("system/updates").then(e=>e.data),refresh:()=>this.post("system/updates/check").then(e=>e.data)};agentUpgrades={eligibility:e=>this.get(`agents/upgrade/eligibility${e?`?version=${encodeURIComponent(e)}`:""}`).then(e=>e.data),start:e=>this.post("agents/upgrade",e).then(e=>e.data),check:e=>this.post("agents/upgrade",{...e,dryRun:!0}).then(e=>e.data),run:e=>this.get(`agents/upgrade/runs/${encodeURIComponent(e)}`).then(e=>e.data),stop:e=>this.post(`agents/upgrade/runs/${encodeURIComponent(e)}/stop`).then(e=>e.data),retry:(e,t={})=>this.post(`agents/upgrade/runs/${encodeURIComponent(e)}/retry`,t).then(e=>e.data)};libraryDeploy={deploy:e=>this.post("library/deploy",e)};webhooks={list:()=>this.get("webhooks").then(e=>e.data.endpoints),get:e=>this.get(`webhooks/${e}`).then(e=>e.data.endpoint),create:e=>this.post("webhooks",e).then(e=>e.data.endpoint),update:(e,t)=>this.patch(`webhooks/${e}`,t).then(e=>e.data.endpoint),delete:e=>this.del(`webhooks/${e}`),deliveries:(e,t=1,s=20)=>this.get(`webhooks/${e}/deliveries?page=${t}&pageSize=${s}`).then(e=>e.data),test:e=>this.post(`webhooks/${e}/test`).then(e=>e.data),redeliver:(e,t)=>this.post(`webhooks/${e}/deliveries/${t}/redeliver`).then(e=>e.data)}};e.s(["f",0,e_],82983)}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hivemagnus/magnus-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Magnus UI: web console for the Magnus fleet control plane, shipped as a prebuilt Next.js server with the magnus-ui CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"magnus",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"ws": "^8.22.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@hivemagnus/magnus-contracts": "2.
|
|
67
|
+
"@hivemagnus/magnus-contracts": "2.2.0",
|
|
68
68
|
"@playwright/test": "^1.64.1",
|
|
69
69
|
"@tailwindcss/postcss": "^4.0.0",
|
|
70
70
|
"@types/node": "^24.19.2",
|
|
@@ -15,7 +15,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
15
15
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
16
16
|
|
|
17
17
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
18
|
-
const nextConfig = {"env":{"NEXT_PUBLIC_API_URL":"https://localhost:4000","NEXT_PUBLIC_AGENT_VERSION":"2.
|
|
18
|
+
const nextConfig = {"env":{"NEXT_PUBLIC_API_URL":"https://localhost:4000","NEXT_PUBLIC_AGENT_VERSION":"2.2.0","NEXT_PUBLIC_MAGNUS_VERSION":"2.2.0"},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"instrumentationClientInject":[],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":false,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":true,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/opt/magnus-ui-build","enablePrerenderSourceMaps":true,"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"deprecated":{},"experimental":{"agentUpgrade":"security","agentFeedback":false,"coldCacheBadge":false,"collapseAdapterRoutes":true,"devValidationWorker":true,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"parallelRouteMetadata":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"dynamicOnHover":false,"reactBrowserBailout":true,"useOffline":false,"varyParams":true,"optimisticRouting":true,"concurrentRouterQueue":false,"instrumentationClientRouterTransitionEvents":false,"prefetchInlining":{"maxSize":2048,"maxBundleSize":10240},"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptOperationCache":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptMozjpeg":true,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"devMemoryThresholdRestart":true,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"requestInsights":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"useTypeScriptCli":true,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":true,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"serverComponentsHmrCancellation":false,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"useCacheStaticRootParamTracking":false,"globalNotFound":false,"explicitParallelRouteChildren":true,"strictRouteMatching":true,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"disableResumeDataCacheCompression":false,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"exposeRuntimeErrorsToHMR":false,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":true,"turbopackStaleOutputMaxAge":604800000,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","turbopackSharedRuntime":true,"serverActions":{"bodySizeLimit":"2mb"},"turbopackMemoryEvictionMode":"auto","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"useCacheTimeout":54,"instantInsights":{"validationLevel":"warning"},"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","serverExternalPackages":["ssh2"],"turbopack":{"root":"/opt/magnus-ui-build"},"repoRoot":"/opt/magnus-ui-build","distDirRoot":".next","_originalRewrites":{"beforeFiles":[],"afterFiles":[{"source":"/dashboard-plugins/:path*","destination":"/api/hermes/dashboard/dashboard-plugins/:path*"},{"source":"/kanban","destination":"/api/hermes/dashboard/kanban"}],"fallback":[]},"_originalRedirects":[{"source":"/hermes","destination":"/orchestra/installations","permanent":true},{"source":"/hermes/installations","destination":"/orchestra/installations","permanent":true},{"source":"/hermes/profiles","destination":"/orchestra/profiles","permanent":true},{"source":"/orchestra/agents","destination":"/orchestra/installations","permanent":true}]}
|
|
19
19
|
|
|
20
20
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hivemagnus/magnus-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Magnus UI: web console for the Magnus fleet control plane, shipped as a prebuilt Next.js server with the magnus-ui CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"magnus",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"ws": "^8.22.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@hivemagnus/magnus-contracts": "2.
|
|
67
|
+
"@hivemagnus/magnus-contracts": "2.2.0",
|
|
68
68
|
"@playwright/test": "^1.64.1",
|
|
69
69
|
"@tailwindcss/postcss": "^4.0.0",
|
|
70
70
|
"@types/node": "^24.19.2",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|