@hivemagnus/magnus-ui 2.2.1 → 2.2.3
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/proxy/[...path]/route.js.nft.json +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/_0h965a-fek_i1._.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]__19dmibalml_q2._.js → [root-of-the-server]__10vc7d7dh2ka_._.js} +2 -2
- 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/_0zol97z2lda9q._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0tyfybw4cwmxv._.js → _1lipj7zmf74tu._.js} +2 -2
- 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_codex_page_tsx_113aas0vmxegr._.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_fleet-map_fleet-map-client_tsx_0o9ktvw_xeu8a._.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_components_codex_codex-installation-card_tsx_20v0b-0t6my-y._.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/{3n9nsatm9lrk8.js → 0_75wyrqh7omi.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{2vp_cbcnkfats.js → 0qmkrq_yc9usy.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1cvbtmsr4d3ci.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{1c3k72m3gy59a.js → 2nn8har0j0_w8.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2o571f4u8yu32.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2p-sasidykf0f.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{1xhyo-jo-sjyp.js → 338b7qgy_xsgq.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/369vzlcjad-gn.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{23f-6cac_j9rv.js → 3s3zo2mz9elxy.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{3ge96h33jg_hw.js → 3wbre1o_zhls-.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/chunks/10sblx9kmg2o-.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/13mwv5xf7s8jd.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1ij544xwbs-1c.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1kmml-dozyyi6.js +0 -1
- /package/dist/app/apps/dashboard/.next/static/{K7jBkPHkVdA6DcoFY4Cut → JNIwZ7z823tVKgswbE1Tl}/_buildManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{K7jBkPHkVdA6DcoFY4Cut → JNIwZ7z823tVKgswbE1Tl}/_clientMiddlewareManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{K7jBkPHkVdA6DcoFY4Cut → JNIwZ7z823tVKgswbE1Tl}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[20598,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(52562),e=a.i(64831);let f={name:"clipboard",size:24,node:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]};f.node;let g=(0,e.f)(f);var h=a.i(68370),i=a.i(26766),j=a.i(57230),k=a.i(19783),l=a.i(46997),m=a.i(58299),n=a.i(68415),o=a.i(49521);function
|
|
1
|
+
module.exports=[20598,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(52562),e=a.i(64831);let f={name:"clipboard",size:24,node:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]};f.node;let g=(0,e.f)(f);var h=a.i(68370),i=a.i(26766),j=a.i(57230),k=a.i(19783),l=a.i(46997),m=a.i(58299),n=a.i(68415),o=a.i(49521),p=a.i(6232);function q(a,b){if(void 0!==a.data)return a.data;throw Error(a.error?.message??b)}function r(a){return a?new Date(a).toLocaleString():"not available"}a.s(["f",0,function({installation:a,onChange:e}){var f;let[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(""),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(!1);async function A(a,b){t(a),v("");try{e(await b())}catch(b){v(b instanceof Error?b.message:`${a} failed`)}finally{t(null)}}async function B(){t("device"),v("");try{x(q(await l.f.codex.startDeviceAuth(a.nodeId),"Could not create a Codex device code"))}catch(a){v(a instanceof Error?a.message:"Could not create a Codex device code")}finally{t(null)}}async function C(){if(w){t("cancel");try{x(q(await l.f.codex.cancelDeviceAuth(a.nodeId,w.id),"Could not cancel device login"))}catch(a){v(a instanceof Error?a.message:"Could not cancel device login")}finally{t(null)}}}async function D(){w&&(await navigator.clipboard.writeText(w.userCode),z(!0),window.setTimeout(()=>z(!1),1500))}return(0,c.useEffect)(()=>{if(!w||"pending"!==w.status)return;let b=window.setInterval(async()=>{try{let b=q(await l.f.codex.deviceAuth(a.nodeId,w.id),"Device login status failed");if(x(b),"completed"===b.status){let b=q(await l.f.codex.installation(a.nodeId),"Codex status refresh failed");e(b)}}catch(a){v(a instanceof Error?a.message:"Device login status failed")}},2e3);return()=>window.clearInterval(b)},[a.nodeId,e,w]),(0,b.jsx)(o.N,{title:a.nodeName,description:`${a.hostname}${a.user?` \xb7 ${a.user}`:""}`,action:(0,b.jsx)(m.t,{variant:a.reachable?"authenticated"===(f=a.auth.status)?"success":"error"===f?"danger":"expired_logged_out"===f||"wrong_auth_mode"===f?"warning":"default":"danger",children:a.reachable?a.auth.status.replaceAll("_"," "):"unreachable"}),children:(0,b.jsxs)("div",{className:"space-y-4",children:[!a.reachable&&(0,b.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 p-3 text-xs text-danger",children:a.error??"Magnus Agent is unreachable."}),a.reachable&&!a.installed&&(0,b.jsx)("div",{className:"rounded border border-warning/30 bg-warning/10 p-3 text-xs text-warning",children:"Codex CLI was not detected on this node."}),a.reachable&&a.installed&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3 text-[11px] text-text-muted",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Installed"}),(0,b.jsx)("span",{className:"font-mono text-text",children:a.version??"unknown"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Current release"}),(0,b.jsx)("span",{className:"font-mono text-text",children:a.latestVersion??"unavailable"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Update"}),(0,b.jsx)(m.t,{variant:a.updateAvailable?"warning":a.updateSupported&&a.latestVersion?"success":"default",children:a.updateSupported?a.updateAvailable?"available":a.latestVersion?"current":"unknown":"read only"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Install manager"}),(0,b.jsx)("span",{className:"text-text",children:a.provenance})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Auth mode"}),(0,b.jsx)("span",{className:"text-text",children:"chatgpt"===a.auth.mode?"ChatGPT OAuth":a.auth.mode??"none"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Access token"}),(0,b.jsx)(m.t,{variant:!1===a.auth.tokenExpired?"success":a.auth.tokenExpired?"danger":"default",children:!1===a.auth.tokenExpired?"current":a.auth.tokenExpired?"expired":"not present"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Expires"}),(0,b.jsx)("span",{className:"text-text",children:r(a.auth.tokenExpiresAt)})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Refresh credential"}),(0,b.jsx)(m.t,{variant:a.auth.refreshTokenPresent?"success":"warning",children:a.auth.refreshTokenPresent?"present":"missing"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Plan"}),(0,b.jsx)("span",{className:"text-text",children:a.auth.planType??"not reported"})]})]}),(0,b.jsxs)("div",{className:`rounded border p-3 text-xs leading-5 ${a.auth.oauth?"border-success/30 bg-success/10 text-success":"border-warning/30 bg-warning/10 text-warning"}`,children:[a.auth.message,(0,b.jsx)("span",{className:"mt-1 block text-[10px] opacity-80",children:"API-key credentials are not used by this Magnus flow."})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,p.f)(a)&&(0,b.jsx)(n.K,{size:"sm",variant:"secondary",disabled:null!==s,icon:(0,b.jsx)(k.f,{className:`h-3.5 w-3.5 ${"update"===s?"animate-spin":""}`}),onClick:()=>void A("update",async()=>q(await l.f.codex.update(a.nodeId),"Codex update failed")),children:a.latestVersion?"Update Codex":"Check & Update Codex"}),!a.auth.oauth&&(0,b.jsx)(n.K,{size:"sm",disabled:null!==s||w?.status==="pending",icon:(0,b.jsx)(i.f,{className:"h-3.5 w-3.5"}),onClick:()=>void B(),children:"Generate Device Code"}),a.auth.oauth&&(0,b.jsx)(n.K,{size:"sm",variant:"danger",disabled:null!==s,icon:(0,b.jsx)(j.f,{className:"h-3.5 w-3.5"}),onClick:()=>void A("logout",async()=>q(await l.f.codex.logout(a.nodeId),"Codex logout failed")),children:"Log Out"})]})]}),w&&(0,b.jsxs)("div",{className:"rounded border border-primary/40 bg-primary/5 p-4","aria-live":"polite",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsxs)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:["Device login · ",w.status]}),(0,b.jsx)(m.t,{variant:"completed"===w.status?"success":"pending"===w.status?"warning":"danger",children:w.status})]}),"pending"===w.status&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"mt-3 text-xs text-text-muted",children:"Open the authorization page, sign in to ChatGPT, and enter this one-time code:"}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[(0,b.jsx)("code",{className:"rounded border border-primary/40 bg-bg px-4 py-2 text-lg font-bold tracking-[0.2em] text-primary",children:w.userCode}),(0,b.jsx)(n.K,{size:"sm",variant:"secondary",icon:y?(0,b.jsx)(d.f,{className:"h-3.5 w-3.5"}):(0,b.jsx)(g,{className:"h-3.5 w-3.5"}),onClick:()=>void D(),children:y?"Copied":"Copy Code"}),(0,b.jsxs)("a",{className:"inline-flex h-8 items-center gap-2 rounded border border-primary/60 bg-primary/10 px-3 text-[11px] font-medium uppercase tracking-wider text-primary hover:bg-primary/20",href:w.verificationUrl,target:"_blank",rel:"noreferrer",children:["Open OpenAI ",(0,b.jsx)(h.f,{className:"h-3.5 w-3.5"})]})]}),(0,b.jsxs)("p",{className:"mt-2 text-[10px] text-text-muted",children:["Expires ",r(w.expiresAt),". Continue only if you started this request here."]}),(0,b.jsx)(n.K,{className:"mt-3",size:"sm",variant:"ghost",disabled:null!==s,onClick:()=>void C(),children:"Cancel"})]}),"pending"!==w.status&&(0,b.jsx)("p",{className:"mt-3 text-xs text-text-muted",children:w.error??("completed"===w.status?"ChatGPT OAuth authorization completed.":"Device authorization ended.")})]}),u&&(0,b.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 p-3 text-xs text-danger",children:u})]})})}],20598)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=apps_dashboard_src_components_codex_codex-installation-card_tsx_20v0b-0t6my-y._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
module.exports=[46997,5739,a=>{"use strict";class b extends Error{name="KyError";get isKyError(){return!0}}class c extends b{name="HTTPError";response;request;options;data;constructor(a,b,c){let d=a.status||0===a.status?a.status:"",e=a.statusText??"",f=`${d} ${e}`.trim(),g=f?`status code ${f}`:"an unknown error";super(`Request failed with ${g}: ${b.method} ${b.url}`),this.response=a,this.request=b,this.options=c}}class d extends b{name="NetworkError";request;constructor(a,b){super(`Request failed due to a network error: ${a.method} ${a.url}`,b),this.request=a}}let e=a=>null!==a&&"object"==typeof a,f=a=>e(a)&&!Array.isArray(a),g=a=>"number"==typeof a&&a>=0,h=Object.prototype.toString,i=a=>a instanceof Error||"[object Error]"===h.call(a),j=a=>a instanceof globalThis.Request||"[object Request]"===h.call(a),k=a=>a instanceof globalThis.Response||"[object Response]"===h.call(a);class l extends Error{static wrap(a){return i(a)?a:new l(a)}name="NonError";value;constructor(a){let b="Non-error value was thrown";try{"string"==typeof a?b=a:a&&"object"==typeof a&&"message"in a&&"string"==typeof a.message&&(b=a.message)}catch{}super(b),this.value=a}}class m extends b{name="ForceRetryError";customDelay;code;customRequest;constructor(a){if(null===a)throw TypeError("The `ky.retry()` options must be an object");let b=a?.delay;if(void 0!==b&&!g(b))throw TypeError("The `ky.retry()` `delay` option must be a non-negative number or `Infinity`");if(a?.code!==void 0&&"string"!=typeof a.code)throw TypeError("The `ky.retry()` `code` option must be a string");if(a?.request!==void 0&&!j(a.request))throw TypeError("The `ky.retry()` `request` option must be a `Request`");let c=a?.cause===void 0?void 0:l.wrap(a.cause);super(a?.code===void 0?"Forced retry":`Forced retry: ${a.code}`,c?{cause:c}:void 0),this.customDelay=a?.delay,this.code=a?.code,this.customRequest=a?.request}}class n extends Error{name="SchemaValidationError";issues;constructor(a){super("Response schema validation failed"),this.issues=a}}class o extends b{name="TimeoutError";request;constructor(a){super(`Request timed out: ${a.method} ${a.url}`),this.request=a}}let p=(()=>{let a=!1,b=!1,c="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&c)try{b=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type")}catch{return!1}let d="Bun"in globalThis||"Deno"in globalThis;return(a||d)&&!b})(),q="function"==typeof globalThis.AbortController,r="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,s="function"==typeof globalThis.ReadableStream,t="function"==typeof globalThis.FormData,u=["get","post","put","patch","head","delete","query"],v={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},w=()=>Object.keys(v).filter(a=>"bytes"!==a||"function"==typeof globalThis.Response?.prototype?.bytes),x=Symbol.for("ky.stop");class y{get isRetryMarker(){return!0}options;constructor(a){this.options=a}}let z=a=>a instanceof y||a?.isRetryMarker===!0,A=a=>new y(a),B=["onUploadProgress","onDownloadProgress","timeout","fetch","throwHttpErrors"],C={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},D={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 b{name="ResponseSizeError";request;maxResponseSize;constructor(a,b){super(`Response body exceeded ${b} bytes: ${a.method} ${a.url}`),this.request=a,this.maxResponseSize=b}}let F=new TextEncoder,G=new WeakMap,H=new Set([101,103,204,205,304]),I=(a,b)=>{let c=a?.body;c&&c!==b?.body&&c.cancel().catch(()=>void 0)},J=a=>Math.max(0,Number(a.get("content-length"))||0),K=a=>a.replaceAll(/\r\n|\r|\n/g,"\r\n"),L=a=>a.replaceAll("\n","%0A").replaceAll("\r","%0D").replaceAll('"',"%22"),M=(a,b,c)=>{let d,e=0;return a.pipeThrough(new TransformStream({transform(a,f){if(f.enqueue(a),d){e+=d.byteLength;let a=0===b?0:e/b;a>=1&&(a=1-Number.EPSILON);let f=0===b?0:Math.max(b,e);c?.({percent:a,totalBytes:f,transferredBytes:e},d)}d=a},flush(){let a=d??new Uint8Array;e+=a.byteLength,c?.({percent:1,totalBytes:e,transferredBytes:e},a)}}))},N=(a,b,c=b.body?G.get(b.body):void 0)=>{let d=a.clone.bind(a);if(a.body&&c)for(let b of(G.set(a.body,c),Object.keys(v))){if("function"!=typeof a[b])continue;let d=a[b].bind(a);Object.defineProperty(a,b,{async value(){try{return await d()}catch(a){throw c()??a}},writable:!0,configurable:!0})}return Object.defineProperties(a,{url:{value:b.url},redirected:{value:b.redirected},type:{value:b.type},headers:{value:b.headers},clone:{value(){let b=d();return a.body&&c&&G.set(a.body,c),N(b,a)},writable:!0,configurable:!0}}),a},O=a=>{let{body:b}=a;if(!(!b||a.bodyUsed||b.locked||H.has(a.status)))return b},P=Symbol.for("ky.replaceOption"),Q=a=>e(a)&&!0===a[P]?{isReplace:!0,value:a.value}:{isReplace:!1,value:a},R=(...a)=>{for(let b of a)if(void 0!==b&&!f(b))throw TypeError("The `options` argument must be an object");return af({},...a)},S=(a={},b={})=>{let c=new globalThis.Headers(a);for(let[a,d]of Object.entries(Y(b)))void 0===d?c.delete(a):c.set(a,d);return c},T=a=>{if(!f(a))return!1;let b=Object.getPrototypeOf(a);return b===Object.prototype||null===b},U=a=>T(a)||Array.isArray(a),V=a=>{if(a instanceof URLSearchParams){let b=new URLSearchParams(a),c=a[aa];return c&&(b[aa]=new Set(c)),b}return Array.isArray(a)?[...a]:T(a)?{...a}:a},W=a=>Array.isArray(a)?a.map(a=>V(a)):V(a),X=(a,b=new WeakMap)=>{if(!U(a))return a;let c=b.get(a);if(c)return c;if(Array.isArray(a)){let c=[];for(let d of(b.set(a,c),a))c.push(X(d,b));return c}let d=null===Object.getPrototypeOf(a)?Object.create(null):{};for(let c of(b.set(a,d),Reflect.ownKeys(a)))Object.prototype.propertyIsEnumerable.call(a,c)&&Object.defineProperty(d,c,{value:X(a[c],b),writable:!0,enumerable:!0,configurable:!0});return d},Y=a=>{if(T(a))return a;let b=a instanceof globalThis.Headers,c={};for(let[d,e]of new globalThis.Headers(a).entries())c[d]=b&&"undefined"===e?void 0:e;return c},Z=(a,b)=>{let c=new Map;for(let[d,e]of[...Object.entries(Y(a)),...Object.entries(Y(b))])c.set(d.toLowerCase(),e);return Object.fromEntries(c)};function $(a,b,c){if(Object.hasOwn(b,c)&&void 0===b[c])return[];let{isReplace:d,value:e}=Q(b[c]);if(void 0!==e&&(!Array.isArray(e)||!e.every(a=>"function"==typeof a)))throw TypeError(`\`hooks.${c}\` must be an array of functions`);return d?[...e??[]]:af(a[c]??[],e??[])}let _=(a={},b={})=>{if(!f(b))throw TypeError("The `hooks` option must be an object");return{init:$(a,b,"init"),beforeRequest:$(a,b,"beforeRequest"),beforeRetry:$(a,b,"beforeRetry"),beforeError:$(a,b,"beforeError"),afterResponse:$(a,b,"afterResponse")}},aa=Symbol("deletedParameters"),ab=new Set(["json","context"]),ac=(a,b)=>{if(!U(a))return a;if(b.has(a))return b.get(a);b.set(a,a);let c=((a,b)=>{let c;for(let[d,e]of Object.entries(a)){let f=b(e);f!==e&&((c??=Array.isArray(a)?[...a]:{...a})[d]=f)}return c??a})(a,a=>ac(Q(a).value,b));return b.set(a,c),c},ad=(a,b)=>{let c=new URLSearchParams,d=new Set;for(let f of[a,b])if(f instanceof URLSearchParams){let a=f[aa];if(a)for(let b of a)c.delete(b),d.add(b);for(let[a,b]of f.entries())c.append(a,b)}else if(Array.isArray(f))for(let a of f){if(!Array.isArray(a)||2!==a.length)throw TypeError("Array search parameters must be provided in [[key, value], ...] format");let b=String(a[0]),{isReplace:d,value:e}=Q(a[1]);d&&c.delete(b),c.append(b,String(e))}else if(e(f))for(let[a,b]of Object.entries(f)){let{isReplace:e,value:f}=Q(b);void 0===f?(c.delete(a),d.add(a)):(e&&c.delete(a),c.append(a,String(f)))}else for(let[a,b]of new URLSearchParams(f).entries())c.append(a,b);return d.size>0&&(c[aa]=d),c},ae=(a,...b)=>{let c,d={},g={},h={},i=[];for(let j of b)if(Array.isArray(j))Array.isArray(d)||(d=[]),d=[...d,...j];else if(e(j)){for(let[b,g]of Object.entries(j)){let h=Q(g),{isReplace:j}=h;g=h.value;let k=a&&"signal"===b;if(k&&(j||void 0===g)&&(i.length=0),k&&g instanceof globalThis.AbortSignal){i.push(g);continue}if(a&&"headers"===b&&null===g)throw TypeError("The `headers` option must not be `null`. Use `undefined` to clear it.");if(a&&"context"===b){if(void 0!==g&&!f(g))throw TypeError("The `context` option must be an object");d={...d,context:void 0===g?{}:j?{...g}:{...d.context,...g}};continue}if(a&&"searchParams"===b){if(null===g)throw TypeError("The `searchParams` option must not be `null`. Use `undefined` to clear it.");c=void 0===g?void 0:j||void 0===c?W(g):ad(c,g);continue}if(a&&"retry"===b&&void 0!==g&&"number"!=typeof g&&!f(g))throw TypeError("`retry` must be a number or an object");a&&"retry"===b&&!j&&(e(g)&&"number"==typeof d[b]?d={...d,[b]:{limit:d[b]}}:"number"==typeof g&&e(d[b])&&(g={limit:g})),a&&"retry"===b&&T(g)&&(j||!U(d[b]))?g=ae(!1,{},g):!j&&U(d[b])&&U(g)&&Array.isArray(d[b])===Array.isArray(g)&&(g=ae(!1,d[b],g)),d={...d,[b]:g}}if(a&&void 0!==j.hooks){let{value:a,isReplace:b}=Q(j.hooks);h=b?_({},a):_(h,a),d.hooks=h}if(a&&e(j.headers)){let{value:a,isReplace:b}=Q(j.headers);g=Z(b?{}:g,a),d.headers=g}}if(void 0!==c&&(d.searchParams=c),i.length>0&&(1===i.length?d.signal=i[0]:r?d.signal=AbortSignal.any(i):d.signal=i.at(-1)),a)for(let[a,b]of Object.entries(d))ab.has(a)||(d[a]=ac(b,new Map));return d},af=(...a)=>ae(!0,...a),ag=new Set([...u,"options","trace"]),ah=a=>ag.has(a.toLowerCase())?a.toLowerCase():a,ai={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:a=>.3*2**(a-1)*1e3,jitter:void 0,retryOnTimeout:!1},aj=(a={})=>{if("number"==typeof a&&(a={limit:a}),!f(a))throw TypeError("`retry` must be a number or an object");let b={...ai,...Object.fromEntries(Object.entries(a).filter(([,a])=>void 0!==a))};if(!Number.isInteger(b.limit)||b.limit<0)throw TypeError("`retry.limit` must be a finite, non-negative integer");for(let a of["methods","statusCodes","afterStatusCodes"])if(!Array.isArray(b[a]))throw Error(`retry.${a} must be an array`);for(let[a,c]of[["methods",a=>"string"==typeof a],["statusCodes",a=>Number.isInteger(a)],["afterStatusCodes",a=>Number.isInteger(a)]])if(b[a].some(a=>!c(a)))throw TypeError(`\`retry.${a}\` must only contain ${"methods"===a?"strings":"numbers"}`);for(let a of["maxRetryAfter","backoffLimit"])if(!g(b[a]))throw TypeError(`\`retry.${a}\` must be a non-negative number or \`Infinity\``);for(let a of["delay","shouldRetry"])if(void 0!==b[a]&&"function"!=typeof b[a])throw TypeError(`\`retry.${a}\` must be a function`);if(void 0!==b.jitter&&"boolean"!=typeof b.jitter&&"function"!=typeof b.jitter)throw TypeError("`retry.jitter` must be a boolean or a function");if("boolean"!=typeof b.retryOnTimeout)throw TypeError("`retry.retryOnTimeout` must be a boolean");return b.methods=b.methods.map(a=>ah(a)),b.statusCodes=[...b.statusCodes],b.afterStatusCodes=[...b.afterStatusCodes],b};async function ak(a,b,c,d){let e,f=!1;try{return await new Promise((g,h)=>{e=setTimeout(()=>{f=!0,c?.abort(),h(new o(a))},d.timeout);let{fetch:i}=d;i(a,b).then(a=>{f?I(a):g(a)}).catch(h)})}finally{clearTimeout(e)}}async function al(a,{signal:b}){return new Promise((c,d)=>{function e(){clearTimeout(f),d(b.reason)}b&&(b.throwIfAborted(),b.addEventListener("abort",e,{once:!0}));let f=setTimeout(()=>{b?.removeEventListener("abort",e),c()},a)})}let am=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 an(a){if(!(a&&i(a)&&"TypeError"===a.name&&"string"==typeof a.message))return!1;let{message:b,stack:c}=a;return"Load failed"===b||b.startsWith("Load failed (")&&b.endsWith(")")?void 0===c||"__sentry_captured__"in a:!!(b.startsWith("error sending request for url")||"Failed to fetch"===b||b.startsWith("Failed to fetch (")&&b.endsWith(")"))||am.has(b)}let ao=(a,b)=>a instanceof b||a?.isKyError===!0&&a?.name===b.name,ap=/^\d+$/,aq=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ar=/^(?: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$/,as=/^(?: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$/,at=/^(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})$/,au=({year:a,month:b,day:c,hours:d,minutes:e,seconds:f})=>{let g=aq.indexOf(b),h=Number(c),i=Number(d),j=Number(e),k=Number(f);if(-1===g||i>23||j>59||k>60)return;let l=Math.min(k,59),m=new Date(Date.UTC(a,g,h,i,j,l));m.setUTCFullYear(a);let n=m.getTime();if(m.getUTCFullYear()===a&&m.getUTCMonth()===g&&m.getUTCDate()===h&&m.getUTCHours()===i&&m.getUTCMinutes()===j&&m.getUTCSeconds()===l)return 60===k?n+1e3:n},av=(a,b)=>a[b],aw=Symbol("timedOut"),ax=()=>globalThis.performance?.now()??Date.now(),ay=(a,b)=>Promise.race([a,new Promise(c=>{let d=setTimeout(()=>{c(aw)},b);a.finally(()=>{clearTimeout(d)}).catch(()=>void 0)})]),az=a=>{(k(a)||j(a))&&I(a)},aA=a=>{a.then(a=>{az(a)}).catch(()=>void 0)},aB=a=>{let b=(a.split(";",1)[0]??"").trim().toLowerCase();if(!b.endsWith("json"))return!1;let c=b.at(-5);return"/"===c||("."===c||"+"===c||"-"===c)&&b.includes("/")},aC=async(a,b)=>{let c,{body:d}=a;if(!d)try{return await a.text()}catch{return}try{c=d.getReader()}catch{return}let e=a.headers.get("content-type")??"",f=aB(e)?new TextDecoder:(a=>{let b=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(a),c=b?.[1]??b?.[2];if(c)try{return new TextDecoder(c)}catch{}return new TextDecoder})(e),g=[],h=0,i=(async()=>{try{for(;;){let{done:a,value:b}=await c.read();if(a)break;if((h+=b.byteLength)>0xa00000)return void c.cancel().catch(()=>void 0);g.push(f.decode(b,{stream:!0}))}}catch(a){if(ao(a,E))throw a;return}return g.push(f.decode()),g.join("")})(),j=await ay(i,b);return j===aw&&c.cancel().catch(()=>void 0),j},aD=(a,b)=>{if(!1!==a){if(!g(a))throw TypeError(`The \`${b}\` option must be a non-negative number or \`false\``);if(a>0x7fffffff)throw RangeError(`The \`${b}\` option cannot be greater than 2147483647`)}},aE=({throwHttpErrors:a=!0,timeout:b=1e4,fetch:c=globalThis.fetch.bind(globalThis)})=>({throwHttpErrors:a,timeout:b,fetch:c}),aF=a=>{for(let b of["parseJson","stringifyJson","fetch","onDownloadProgress","onUploadProgress"])if(void 0!==a[b]&&"function"!=typeof a[b])throw TypeError(`The \`${b}\` option must be a function`);let{throwHttpErrors:b}=a;if("boolean"!=typeof b&&"function"!=typeof b)throw TypeError("The `throwHttpErrors` option must be a boolean or a function")},aG=/^[\0-\u0020]+/g,aH=/[\t\n\r]/g,aI=/^[a-z][\d+.a-z-]*:/i,aJ=/^https?:(?!\/\/)/i,aK=(a,b)=>{a.searchParams.has(b)&&a.searchParams.delete(b)},aL=async(a,b)=>{let c=e(b)||"function"==typeof b?b["~standard"]:void 0;if(!e(c)||"function"!=typeof c.validate)throw TypeError("The `schema` argument must follow the Standard Schema specification");let d=await c.validate(a);if(d.issues)throw new n(d.issues);return d.value};class aM{static create(a,b){let c=b.hooks?.init??[],d=c.length>0?{...b,headers:Z({},b.headers??{}),context:{...b.context},json:X(b.json),searchParams:W(b.searchParams),retry:X(b.retry)}:b;for(let a of c)a(d);let e=new aM(a,d),f=(async()=>{let a;try{return a=await e.#a()}catch(a){return await e.#b(a)}finally{let b=e.#c;I(b,a),b&&e.request!==b&&I(e.request,a)}})();for(let a of w()){let b=v[a];f[a]=async c=>{let d;e.request!==e.#c&&e.request.headers.set("accept",e.request.headers.get("accept")||b);let g=await f;if(void 0===g)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"!==a)return e.#d(async()=>g[a](),g);let h=await e.#d(async()=>g.text(),g),i=e.#e(g);try{d=await e.#f(async()=>{let a=""!==h||void 0===c||e.#g.parseJson?await e.#h(h,i,g):void 0;return void 0===c?a:await aL(a,c)})}catch(a){throw e.#i?.aborted&&await e.#b(e.#i.reason,i),a}return d===aw&&await e.#b(new o(i),i),d}}return f}request;#j;#k=0;#l;#g;#m;#c;#n=!1;#i;#o=new WeakSet;#p;#q;#r=new WeakSet;#s=new WeakMap;#t=new WeakSet;constructor(a,b={}){let c;if("string"!=typeof a&&!(a instanceof URL||a instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");let{maxResponseSize:d=1/0,totalTimeout:e=!1}=b;if(Object.hasOwn(b,"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 a of["headers","method","prefix","baseUrl","referrer","referrerPolicy"])if(null===b[a])throw TypeError(`The \`${a}\` option must not be \`null\`. Use \`undefined\` to clear it.`);if(void 0!==b.context&&!f(b.context))throw TypeError("The `context` option must be an object");if(this.#g={...b,headers:S(a.headers,b.headers),hooks:_({},b.hooks),method:(c=b.method??a.method??"GET",u.includes(c.toLowerCase())?c.toUpperCase():c),referrer:b.referrer??a.referrer,referrerPolicy:b.referrerPolicy??a.referrerPolicy,prefix:String(b.prefix||""),retry:aj(b.retry),...aE(b),totalTimeout:e,maxResponseSize:d,context:b.context??{}},aF(this.#g),aD(this.#g.timeout,"timeout"),aD(e,"totalTimeout"),this.#l=this.#g.retry.limit,1/0!==d&&(!Number.isSafeInteger(d)||d<0))throw TypeError("The `maxResponseSize` option must be a non-negative safe integer or Infinity");this.#m=a instanceof globalThis.Request?a:void 0,a=((a,b,c)=>{if("string"!=typeof a)return a;if(b){let c=b.replace(/\/+$/,""),d=a.replace(/^\/+/,"");a=`${c}/${d}`}if(c){let b=a.replaceAll(aG,"").replaceAll(aH,"");if(aJ.test(b))throw TypeError("`input` url protocol must be followed by `//` when using `baseUrl`");if(!aI.test(b))return new URL(a,new Request(c).url)}return a})(a,this.#g.prefix,this.#g.baseUrl),q&&r&&(this.#i=this.#g.signal??this.#m?.signal,this.#j=new globalThis.AbortController,this.#g.signal=this.#u()),p&&(this.#g.duplex="half");let g=void 0!==b.headers&&S({},b.headers).has("content-type");void 0!==this.#g.json&&(this.#g.body=this.#g.stringifyJson?.(this.#g.json)??JSON.stringify(this.#g.json),g||this.#g.headers.set("content-type","application/json")),a instanceof globalThis.Request&&(t&&this.#g.body instanceof globalThis.FormData||this.#g.body instanceof URLSearchParams)&&!g&&this.#g.headers.delete("content-type"),this.request=new globalThis.Request(a,this.#g),this.#n="function"==typeof globalThis.ReadableStream&&this.#g.body instanceof globalThis.ReadableStream;let{searchParams:h}=this.#g;if((a=>{if(void 0===a)return!1;if(null===a)throw TypeError("The `searchParams` option must not be `null`. Use `undefined` to clear it.");return Array.isArray(a)?a.length>0:a instanceof URLSearchParams?a.size>0||!!a[aa]?.size:"object"==typeof a?Object.keys(a).length>0:"string"==typeof a?a.trim().length>0:!!a})(h)){let a=new URL(this.request.url),b=h?.[aa];if(b)for(let c of b)aK(a,c);if("string"==typeof h){let b=h.replace(/^\?/,"");""!==b&&(a.search=a.search?`${a.search}&${b}`:`?${b}`)}else if(!f(h)||h instanceof URLSearchParams)for(let[b,c]of new URLSearchParams(h))a.searchParams.append(b,c);else for(let[b,c]of Object.entries(h))void 0===c?aK(a,b):a.searchParams.append(b,c);if(a.href!==this.request.url){let{body:b,cache:c,credentials:d,integrity:e,keepalive:f,mode:g,redirect:h,referrer:i,referrerPolicy:j}=this.request;this.request=new globalThis.Request(a,{...this.#g,cache:c,credentials:d,integrity:e,keepalive:f,mode:g,redirect:h,referrer:i,referrerPolicy:j,body:this.#g.body??(p&&!f&&"no-cors"!==g?b:void 0)})}}this.#q="number"==typeof e?ax()+e:1/0}async #a(){await Promise.resolve();let a=await this.#v();void 0!==a&&(this.#l=aj(this.#g.retry).limit);let b=a??await this.#w();for(;;){let a;if(void 0===b)return;let d=this.#r.has(b);try{b=await this.#x(b)}catch(b){if(!ao(b,m))throw b;a=b}if(void 0===a){let e=b;if(e.ok||"opaque"===e.type||!this.#y(e))break;let f=new c(e,this.#e(e),this.#z());if(f.data=await this.#A(e),this.#B(),this.#C(),d)throw f;a=f}b=await this.#D(a)}if(this.#E(b),this.#g.onDownloadProgress){if(!s)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let a=((a,b)=>{let c=O(a);if(!c)return a;let d=a.headers.get("content-encoding")?.toLowerCase();return N(new Response(M(c,d&&"identity"!==d?0:J(a.headers),b),a),a)})(b,this.#g.onDownloadProgress);return this.#F(a,this.#e(b)),this.#E(a)}return b}#G(a,b){let c=a.delay(this.#k+1);if(!g(c))throw TypeError("`retry.delay` must return a non-negative number or `Infinity`",{cause:b});let d=c;return!0===a.jitter?d=Math.random()*c:"function"==typeof a.jitter&&(!Number.isFinite(d=a.jitter(c))||d<0)&&(d=c),Math.min(a.backoffLimit,d)}async #H(a){let b=aj(this.#g.retry);if(this.#k>=Math.min(b.limit,this.#l))throw a;let e=l.wrap(a);if(ao(e,m))return e.customDelay??this.#G(b,a);if(!b.methods.includes(ah(this.request.method)))throw a;let f=!1,{shouldRetry:g}=b;if(void 0!==g){let b=await this.#f(async()=>g({error:e,retryCount:this.#k+1}));if(this.#B(),b===aw)throw new o(this.#I);if(!1===b)throw a;f=!0===b}if(ao(a,o)){if(!f&&!b.retryOnTimeout)throw a;return this.#G(b,a)}if(ao(a,c)){if(!f&&!b.statusCodes.includes(a.response.status))throw a;let c=(a=>{let b=a.get("Retry-After");if(null!==b)return{value:b,allowTimestamp:!1};let c=a.get("RateLimit-Reset");if(null!==c)return{value:c,allowTimestamp:!0};let d=a.get("X-RateLimit-Retry-After");if(null!==d)return{value:d,allowTimestamp:!1};let e=a.get("X-RateLimit-Reset")??a.get("X-Rate-Limit-Reset");if(null!==e)return{value:e,allowTimestamp:!0}})(a.response.headers);if(c&&b.afterStatusCodes.includes(a.response.status)){let d=(({value:a,allowTimestamp:b})=>{if(ap.test(a)){let c=1e3*Number(a);return b&&Number(a)>=1e9&&(c-=Date.now()),Math.max(0,c)}let c=(a=>{let b=ar.exec(a);if(b)return au({year:Number(av(b,3)),month:av(b,2),day:av(b,1),hours:av(b,4),minutes:av(b,5),seconds:av(b,6)});let c=as.exec(a);if(c){let a,b=new Date,d=Number(av(c,3)),e=100*Math.floor(b.getUTCFullYear()/100)+d,f=Date.UTC(b.getUTCFullYear()+50,b.getUTCMonth(),b.getUTCDate(),b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds(),b.getUTCMilliseconds());for(let b of[e-100,e,e+100]){let d=au({year:b,month:av(c,2),day:av(c,1),hours:av(c,4),minutes:av(c,5),seconds:av(c,6)});void 0!==d&&d<=f&&(a=d)}return a}let d=at.exec(a);if(d){let[a,b,c]=av(d,4).split(":");return au({year:Number(av(d,5)),month:av(d,2),day:av(d,3).trim(),hours:a,minutes:b,seconds:c})}})(a);if(void 0!==c)return Math.max(0,c-Date.now())})(c);return void 0===d?this.#G(b,a):Math.min(b.maxRetryAfter,d)}if(!f&&413===a.response.status)throw a;return this.#G(b,a)}if(!f&&!ao(a,d))throw a;return this.#G(b,a)}#E(a){if(!this.#g.parseJson||this.#t.has(a))return a;this.#t.add(a);let b=this.#e(a);a.json=async()=>this.#h(await a.text(),b,a);let c=a.clone.bind(a);return a.clone=()=>this.#E(this.#F(c(),b)),a}async #b(a,b=this.#I){if(!i(a)||this.#o.has(a))throw a;let c=a;for(let a of this.#g.hooks.beforeError){let d=await a({request:b,options:this.#z(),error:c,retryCount:this.#k});i(d)&&(c=d)}throw c}async #A(a){let b=this.#e(a),c=({fromTotalTimeout:a})=>{if(a)throw new o(b);this.#C(b)},d=this.#J(b),e=await aC(a,d.milliseconds);if(e===aw)return void c(d);if(!e)return;if(!aB(a.headers.get("content-type")??""))return e;let f=this.#J(b),g=await ay(Promise.resolve().then(()=>this.#h(e,b,a)),f.milliseconds).catch(()=>void 0);return g===aw?void c(f):g}#J(a){let b=!1===this.#g.timeout?1e4:this.#g.timeout,c=this.#K();if(0===c)throw new o(a);return{milliseconds:Math.min(b,c),fromTotalTimeout:c<=b}}#L(){let a=this.#K();if(0===a)throw new o(this.#I);let b=Math.min(!1===this.#g.timeout?1/0:this.#g.timeout,a);return 1/0===b?void 0:b}async #d(a,b){let c,e,f=this.#e(b);try{c=this.#L()}catch(a){await this.#b(a,f)}let g=a();try{e=void 0===c?await g:await ay(g,c)}catch(a){this.#i?.aborted&&await this.#b(this.#i.reason,f),0!==this.#K()&&(an(a)&&await this.#b(new d(f,{cause:a}),f),await this.#b(a,f)),e=aw}return this.#i?.aborted&&await this.#b(this.#i.reason,f),(e===aw||0===this.#K())&&(this.#j?.abort(),await this.#b(new o(f),f)),e}async #f(a){let b,c,d,e=this.#i;e?.throwIfAborted();let f=this.#K();if(0===f)return this.#j?.abort(),aw;try{let g=new Promise((a,b)=>{e&&(c=()=>{b(e.reason)},e.addEventListener("abort",c,{once:!0}))});if(d=a(),1/0===f)return await Promise.race([d,g]);let h=new Promise(a=>{b=setTimeout(()=>{a(aw)},f)}),i=await Promise.race([d,h,g]);if(i===aw||0===this.#K())return this.#j?.abort(),i===aw?aA(d):az(i),aw;return i}catch(a){if(e?.aborted&&(d&&aA(d),e.throwIfAborted()),0===this.#K())return this.#j?.abort(),aw;throw a}finally{clearTimeout(b),c&&e?.removeEventListener("abort",c)}}#h(a,b,c){let{parseJson:d}=this.#g;return d?d(a,{request:b,response:c}):JSON.parse(a)}#u(){return this.#i?AbortSignal.any([this.#i,this.#j.signal]):this.#j.signal}#y(a){let{throwHttpErrors:b}=this.#g;try{return"function"==typeof b?b(a.status):b}catch(b){throw I(a),b}}get #I(){return this.#c??this.request}#C(a=this.#I){if(0===this.#K())throw new o(a)}async #v(){for(let a of this.#g.hooks.beforeRequest){let b=await this.#f(async()=>a({request:this.request,options:this.#z(),retryCount:0}));if(b===aw)throw new o(this.#I);if(j(b))this.#M(this.#N(b));else if(k(b))return this.#r.add(b),b}}async #x(a){let b=this.#e(a);for(let c of(a=this.#O(a),this.#g.hooks.afterResponse)){let d,e=this.#F(a.clone(),b);this.#E(e);try{if((d=await this.#f(async()=>c({request:this.request,options:this.#z(),response:e,retryCount:this.#k})))===aw)throw new o(this.#I);if(z(d))throw new m(d.options)}catch(b){throw I(e),I(a),b}let f=k(d)?this.#F(d,b):a;I(e,f),I(a,f),f!==a&&(a=this.#O(f))}return a}async #w(){try{return await this.#P()}catch(a){return this.#D(a)}}async #D(a){this.#B();let b=Math.min(await this.#H(a),0x7fffffff),c={signal:this.#i},d=this.#K();if(0===d)throw new o(this.#I);if(b>=d)throw await al(d,c),new o(this.#I);for(let d of(await al(b,c),this.#C(),this.#j?.signal.aborted&&(this.#j=new globalThis.AbortController,this.#g.signal=this.#u(),this.#M(this.#N(this.request),this.#n)),ao(a,m)&&a.customRequest&&this.#M(this.#N(a.customRequest)),this.#g.hooks.beforeRetry)){let b;try{b=await this.#f(async()=>d({request:this.request,options:this.#z(),error:l.wrap(a),retryCount:this.#k+1}))}catch(b){throw this.#B(),i(b)&&b!==a&&this.#o.add(b),b}if(b===aw)throw new o(this.#I);if(j(b)){this.#M(this.#N(b));break}if(k(b))return this.#r.add(b),this.#k++,b;if(b===x)return;f(b)&&this.#Q(b.options)}return this.#C(),this.#k++,this.#w()}async #P(){I(this.#c,this.request);let a=(a=>{let b={};for(let c of Object.keys(a))Object.hasOwn(D,c)||Object.hasOwn(C,c)||Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0,configurable:!0});return b})(this.#g);this.#l=aj(this.#g.retry).limit;let b=this.#l>0?this.#N(this.request.clone()):void 0,c=this.#R(this.request);this.#c=c,b&&(this.request=b,this.#n=!0);try{let b=this.#L(),{fetch:d}=this.#g,e=void 0===b?await d(c,a):await ak(c,a,this.#j,{timeout:b,fetch:d});if(!k(e))throw TypeError("The `fetch` option must resolve with a `Response`");if(0===this.#K())throw this.#j?.abort(),I(e),new o(c);return this.#F(e,c)}catch(a){if(this.#B(),0===this.#K())throw this.#j?.abort(),new o(c);if(an(a))throw new d(c,{cause:a});throw a}}#B(){this.#i?.throwIfAborted()}#K(){return Math.max(0,this.#q-ax())}#Q(a){if(!f(a))throw TypeError("The `options` returned from a `beforeRetry` hook must be an object");for(let b of Object.keys(a))if(!B.includes(b))throw TypeError(`The \`${b}\` option cannot be changed from a \`beforeRetry\` hook`);let b={...this.#g,...a},c={...b,...aE(b)};aF(c),aD(c.timeout,"timeout"),Object.assign(this.#g,c),this.#p=void 0}#z(){if(!this.#p){let{hooks:a,json:b,parseJson:c,stringifyJson:d,searchParams:e,timeout:f,totalTimeout:g,maxResponseSize:h,throwHttpErrors:i,fetch:j,...k}=this.#g;this.#p=Object.freeze(k)}return this.#p}#M(a,b=!1){this.#n&&I(this.request,a),this.#p=void 0,this.request=a,this.#n=b}#N(a){return this.#g.signal&&a instanceof globalThis.Request?new globalThis.Request(a,{signal:this.#g.signal,referrer:a.referrer,referrerPolicy:a.referrerPolicy}):a}#e(a){return this.#s.get(a)??this.#I}#F(a,b){return this.#s.set(a,b),a}#O(a){let b=this.#e(a);return this.#F(((a,b,c)=>{let d,e=O(a);if(!e||1/0===c)return a;let f=0,g=G.get(e);return N(new Response(e.pipeThrough(new TransformStream({transform(a,e){if((f+=a.byteLength)>c)throw d=new E(b,c);e.enqueue(a)}})),a),a,()=>d??g?.())})(a,b,this.#g.maxResponseSize),b)}#R(a){return this.#g.onUploadProgress&&p&&a.body?((a,b,c)=>{if(!a.body||a.bodyUsed||a.body.locked||a.keepalive||"no-cors"===a.mode||!(a instanceof globalThis.Request))return a;let d=(a=>{if(!a)return 0;if(a instanceof FormData){let b=0;for(let[c,d]of a)b+=44,b+=F.encode(`Content-Disposition: form-data; name="${L(K(c))}"`).byteLength,d instanceof Blob&&(b+=F.encode(`; filename="${L(d.name??"")}"`).byteLength,b+=F.encode(`\r
|
|
2
|
-
Content-Type: ${d.type||"application/octet-stream"}`).byteLength),b+=4,b+="string"==typeof d?F.encode(K(d)).byteLength:d.size,b+=2;return 0===b?0:b+40+6}return a instanceof Blob?a.size:a instanceof ArrayBuffer||ArrayBuffer.isView(a)?a.byteLength:"string"==typeof a?F.encode(a).byteLength:a instanceof URLSearchParams?F.encode(a.toString()).byteLength:0})(c??a.body)||J(a.headers);return new Request(a,{duplex:"half",body:M(a.body,d,b),headers:a.headers,referrer:a.referrer,referrerPolicy:a.referrerPolicy})})(a,this.#g.onUploadProgress,this.#g.body):a}}let aN=(a,b)=>{try{return aM.create(a,b())}catch(b){let a=Promise.reject(b);for(let b of w())a[b]=async()=>a;return a}},aO=a=>{let b=(b,c)=>aN(b,()=>R(a,c));for(let c of u)b[c]=(b,d)=>aN(b,()=>R(a,d,{method:c}));return b.create=a=>aO(R(a)),b.extend=b=>("function"==typeof b&&(b=b(R(X(a)))),aO(R(a,b))),b.stop=x,b.retry=A,b},aP=aO(),aQ="__magnus_trace_id__";var aR=a.i(57547);let aS={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 aT(a){let b="string"==typeof a?a:null==a?"":JSON.stringify(a);if(!b.includes("AGENT_NOT_PRIVILEGED")&&!/is disabled: agent is not privileged/.test(b))return null;let c=/"feature"\s*:\s*\\?"([a-z-]+)/.exec(b)?.[1]??/([a-z-]+) is disabled: agent is not privileged/.exec(b)?.[1];return`${!c?"This feature":aS[c]??c} is disabled on this node (its agent runs unprivileged).`}a.s(["f",0,aT],5739);let aU=new class{client;_baseUrl;constructor(){this._baseUrl="",this.client=this.createClient(this._baseUrl)}get baseUrl(){return this._baseUrl}getAuthHeaders(){return(0,aR.L)(this._baseUrl)}reconfigure(a){this._baseUrl=(0,aR.K)(a)??"",this.client=this.createClient(this._baseUrl)}createClient(a){return aP.create({prefix:"/api/proxy",timeout:18e4,hooks:{beforeRequest:[({request:b})=>{a?b.headers.set("x-proxy-target",a):b.headers.delete("x-proxy-target"),b.headers.get("x-trace-id")||b.headers.set("x-trace-id",function(){let a=globalThis,b=Date.now(),c=a[aQ];if(c&&b-c.lastUsedAt<1e4)return c.lastUsedAt=b,c.id;let d="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 a[aQ]={id:d,lastUsedAt:b},d}())}],beforeError:[async({error:a})=>{if(a instanceof c&&403===a.response.status){let b=aT(a.data);b&&(a.name="AgentNotPrivilegedError",a.message=b)}return a}]}})}async get(a,b){let c={};if(b)for(let[a,d]of Object.entries(b))void 0!==d&&(c[a]=String(d));return this.client.get(a,{searchParams:c}).json()}async post(a,b,c){return this.client.post(a,{json:b,headers:c}).json()}async patch(a,b){return this.client.patch(a,{json:b}).json()}async put(a,b){return this.client.put(a,{json:b}).json()}async del(a){return this.client.delete(a).json()}nodes={list:a=>this.get("nodes",a),get:a=>this.get(`nodes/${a}`),register:a=>this.post("nodes/register",a),update:(a,b)=>this.patch(`nodes/${a}`,b),repairAddress:(a,b)=>this.post(`nodes/${a}/repair-address`,b),delete:a=>this.del(`nodes/${a}`),health:a=>this.get(`nodes/${a}/health`),gpu:(a,b="24h")=>this.get(`nodes/${a}/gpu`,{period:b}),forecast:(a,b=30)=>this.get(`health/${a}/forecast`,{days:b}),wazuh:a=>this.get(`nodes/${a}/wazuh`),wazuhSummary:()=>this.get("nodes/wazuh/summary"),systemUpdatesSummary:()=>this.get("nodes/system-updates/summary"),tailscaleSummary:()=>this.get("nodes/tailscale/summary"),enableSystemUpdates:a=>this.post(`nodes/${a}/system-updates/enable`),healthHistory:(a,b)=>this.get(`nodes/${a}/health/history`,{limit:b})};commands={dispatch:(a,b)=>this.post("commands",a,{"x-idempotency-key":b}),get:a=>this.get(`commands/${a}`),result:a=>this.get(`commands/${a}/result`),cancel:(a,b)=>this.post(`commands/${a}/cancel`,{reason:b})};cron={list:a=>this.get("cron",a?{nodeId:a}:void 0),get:a=>this.get(`cron/${a}`),create:a=>this.post("cron",a),update:(a,b)=>this.patch(`cron/${a}`,b),delete:a=>this.del(`cron/${a}`)};files={update:a=>this.post("files/update",a),read:(a,b)=>this.get("files/read",{nodeId:a,filePath:b})};skills={list:()=>this.get("skills"),get:a=>this.get(`skills/${a}`),create:a=>this.post("skills",a),update:(a,b)=>this.patch(`skills/${a}`,b),delete:a=>this.del(`skills/${a}`),push:a=>this.post("skills/push",a),installations:a=>this.get(`skills/installations/${a}`),getFile:(a,b)=>this.get(`skills/${a}/files/${b}`),updateFile:(a,b,c)=>this.client.put(`skills/${a}/files/${b}`,{json:{content:c}}).json(),registry:{list:()=>this.get("skills/registry"),get:a=>this.get(`skills/registry/${a}`),sync:()=>this.post("skills/registry/sync",{}),publish:(a,b)=>this.post(`skills/registry/${a}/publish`,b),versions:a=>this.get(`skills/registry/${a}/versions`),versionDetail:(a,b)=>this.get(`skills/registry/${a}/versions/${b}`),setTag:(a,b)=>this.post(`skills/registry/${a}/tags`,b),delete:a=>this.del(`skills/registry/${a}`)}};logs={query:a=>this.post("logs/query",a),ingest:a=>this.post("logs/ingest",a)};audit={list:a=>this.get("audit",a),days:()=>this.get("audit/days")};hermes={installations:()=>this.get("hermes/installations"),installation:a=>this.get(`hermes/installations/${a}`),detect:a=>this.post("hermes/detect",a),deploy:(a,b)=>this.post("hermes/deploy",a,{"x-idempotency-key":b}),sync:a=>this.post(`hermes/installations/${a}/sync`),configure:a=>this.post(`hermes/installations/${a}/configure`),config:a=>this.get(`hermes/installations/${a}/config`),updateConfig:(a,b)=>this.patch(`hermes/installations/${a}/config`,b),update:a=>this.post(`hermes/installations/${a}/update`),uninstall:a=>this.del(`hermes/installations/${a}`),profiles:a=>a?this.get(`hermes/installations/${a}/profiles`):this.get("hermes/profiles"),createProfile:(a,b)=>this.post(`hermes/installations/${a}/profiles`,b),updateProfile:(a,b)=>this.patch(`hermes/profiles/${a}`,b),deleteProfile:a=>this.del(`hermes/profiles/${a}`),describeProfile:a=>this.post(`hermes/profiles/${a}/describe-auto`),gatewayAction:(a,b)=>this.post(`hermes/profiles/${a}/gateway/${b}`),dashboardAction:(a,b)=>this.post(`hermes/installations/${a}/dashboard/${b}`),enableApiServer:(a,b)=>this.post(`hermes/profiles/${a}/api-server/enable`,b),disableApiServer:a=>this.post(`hermes/profiles/${a}/api-server/disable`),apiServerStatus:a=>this.get(`hermes/profiles/${a}/api-server/status`),rotateApiServerKey:(a,b)=>this.post(`hermes/profiles/${a}/api-server/rotate-key`,b),migrationDryRun:a=>this.post("hermes/migration/openclaw/dry-run",a),migrationApply:(a,b)=>this.post("hermes/migration/openclaw/apply",a,{"x-idempotency-key":b}),jobs:a=>this.get("hermes/jobs",a),job:a=>this.get(`hermes/jobs/${a}`)};ardent={installations:()=>this.get("ardent/installations"),installation:a=>this.get(`ardent/installations/${encodeURIComponent(a)}`),profiles:()=>this.get("ardent/profiles"),resource:(a,b,c,d)=>this.get(`ardent/installations/${encodeURIComponent(a)}/profiles/${encodeURIComponent(b)}/${c}`,d),action:(a,b,c,d,e)=>this.client.post(`ardent/installations/${encodeURIComponent(a)}/profiles/${encodeURIComponent(b)}/action`,{json:{action:c,...e?{target:e}:{},body:d??{}},timeout:"package-install"===c?62e4:c.startsWith("service-")?125e3:55e3}).json()};codex={installations:(a=!1)=>this.get("codex/installations",{refreshLatest:a?"true":void 0}),installation:(a,b=!1)=>this.get(`codex/installations/${a}`,{refreshLatest:b?"true":void 0}),update:a=>this.post(`codex/installations/${a}/update`),logout:a=>this.post(`codex/installations/${a}/logout`),startDeviceAuth:a=>this.post(`codex/installations/${a}/device-auth`),deviceAuth:(a,b)=>this.get(`codex/installations/${a}/device-auth/${b}`),cancelDeviceAuth:(a,b)=>this.post(`codex/installations/${a}/device-auth/${b}/cancel`)};orchestra={overview:()=>this.get("orchestra/overview"),capabilities:()=>this.get("orchestra/capabilities"),skillCatalog:()=>this.get("orchestra/skill-catalog"),auditCatalogSkill:a=>this.get(`orchestra/skill-catalog/${encodeURIComponent(a)}/audit`),installCatalogSkill:a=>this.post("orchestra/skill-catalog/install",a),quarantineCatalogSkill:a=>this.post(`orchestra/skill-catalog/${encodeURIComponent(a)}/quarantine`,{}),previewSkillBundle:a=>this.post("orchestra/skill-bundles/preview",a),applySkillBundle:a=>this.post("orchestra/skill-bundles/apply",a),cancelJob:a=>this.post(`orchestra/jobs/${a}/cancel`),testProvider:a=>this.post("orchestra/providers/test",a),skillAssignments:{list:a=>this.get("orchestra/skill-assignments",a),create:a=>this.post("orchestra/skill-assignments",a),update:(a,b)=>this.patch(`orchestra/skill-assignments/${a}`,b),delete:a=>this.del(`orchestra/skill-assignments/${a}`)},toolsetPolicies:{list:a=>this.get("orchestra/toolset-policies",a),upsert:a=>this.put("orchestra/toolset-policies",a),update:(a,b)=>this.patch(`orchestra/toolset-policies/${a}`,b),delete:a=>this.del(`orchestra/toolset-policies/${a}`)},roles:{list:()=>this.get("orchestra/roles"),get:a=>this.get(`orchestra/roles/${a}`),create:a=>this.post("orchestra/roles",a),update:(a,b)=>this.patch(`orchestra/roles/${a}`,b),delete:a=>this.del(`orchestra/roles/${a}`),apply:(a,b)=>this.post(`orchestra/roles/${a}/apply`,b)},providers:{get:a=>this.get("orchestra/providers",a),upsert:a=>this.put("orchestra/providers",a)},credentialPools:{list:()=>this.get("orchestra/credential-pools"),create:a=>this.post("orchestra/credential-pools",a),update:(a,b)=>this.patch(`orchestra/credential-pools/${a}`,b),delete:a=>this.del(`orchestra/credential-pools/${a}`),attach:(a,b)=>this.post(`orchestra/credential-pools/${a}/attach`,b),detach:a=>this.del(`orchestra/credential-pools/attachments/${a}`)},mcpServers:{list:()=>this.get("orchestra/mcp-servers"),create:a=>this.post("orchestra/mcp-servers",a),update:(a,b)=>this.patch(`orchestra/mcp-servers/${a}`,b),delete:a=>this.del(`orchestra/mcp-servers/${a}`),attach:(a,b)=>this.post(`orchestra/mcp-servers/${a}/attach`,b),detach:a=>this.del(`orchestra/mcp-servers/attachments/${a}`)},messagingBindings:{list:a=>this.get("orchestra/messaging-bindings",a),create:a=>this.post("orchestra/messaging-bindings",a),update:(a,b)=>this.patch(`orchestra/messaging-bindings/${a}`,b),delete:a=>this.del(`orchestra/messaging-bindings/${a}`)},cronJobs:{list:a=>this.get("orchestra/cron-jobs",a),create:a=>this.post("orchestra/cron-jobs",a),update:(a,b)=>this.patch(`orchestra/cron-jobs/${a}`,b),delete:a=>this.del(`orchestra/cron-jobs/${a}`)},plugins:{list:a=>this.get("orchestra/plugins",a),install:a=>this.post("orchestra/plugins",a),remove:a=>this.del(`orchestra/plugins/${a}`)},hooks:{list:a=>this.get("orchestra/hooks",a),create:a=>this.post("orchestra/hooks",a),update:(a,b)=>this.patch(`orchestra/hooks/${a}`,b),delete:a=>this.del(`orchestra/hooks/${a}`)}};quickCommand={exec:(a,b)=>this.post(`quick-command/${a}/exec`,b)};discovery={scan:a=>this.post("discovery/scan",{timeoutMs:a})};stats={overview:()=>this.get("stats/overview")};roles={list:()=>this.get("roles"),get:a=>this.get(`roles/${a}`),create:a=>this.post("roles",a),update:(a,b)=>this.patch(`roles/${a}`,b),delete:a=>this.del(`roles/${a}`),assign:(a,b)=>this.post(`roles/${a}/assign`,b),unassign:(a,b)=>this.post(`roles/${a}/unassign`,b),apply:(a,b)=>this.post(`roles/${a}/apply`,b??{}),applications:{list:a=>this.get("roles/applications/list",a),get:a=>this.get(`roles/applications/${a}`)}};notifications={list:a=>this.get("notifications",a),unreadCount:()=>this.get("notifications/unread-count"),markRead:a=>this.post("notifications/read",{ids:a}),markAllRead:()=>this.post("notifications/read-all")};library={categories:{list:()=>this.get("library/categories"),create:a=>this.post("library/categories",a),update:(a,b)=>this.patch(`library/categories/${a}`,b),delete:a=>this.del(`library/categories/${a}`)},files:{list:a=>this.get("library/files",a),get:a=>this.get(`library/files/${a}`),create:a=>this.post("library/files",a),update:(a,b)=>this.patch(`library/files/${a}`,b),delete:a=>this.del(`library/files/${a}`),move:a=>this.post("library/files/move",a)}};anomalies={list:a=>this.get("anomalies",a),summary:()=>this.get("anomalies/summary"),correlation:a=>this.get(`anomalies/event/${a}/correlation`),nodeSummary:a=>this.get(`anomalies/${a}/summary`),resolve:a=>this.post(`anomalies/${a}/resolve`),resolveNode:(a,b)=>this.post("anomalies/resolve-node",{nodeId:a,metric:b})};remediation={listRules:()=>this.get("remediation/rules"),getRule:a=>this.get(`remediation/rules/${a}`),createRule:a=>this.post("remediation/rules",a),updateRule:(a,b)=>this.patch(`remediation/rules/${a}`,b),deleteRule:a=>this.del(`remediation/rules/${a}`),listExecutions:a=>this.get("remediation/executions",a),trigger:a=>this.post("remediation/trigger",a)};assistant={chat:a=>this.post("assistant/chat",a),conversations:a=>this.get("assistant/conversations",a),messages:(a,b)=>this.get(`assistant/conversations/${a}`,b),forkConversation:(a,b)=>this.post(`assistant/conversations/${a}/fork`,{fromMessageId:b}),shareConversation:(a,b)=>this.post(`assistant/conversations/${a}/share`,{ttlHours:b}),getSharedConversation:a=>this.get(`assistant/shares/${a}`),getScratchpad:a=>this.get(`assistant/conversations/${a}/scratchpad`),clearScratchpad:a=>this.del(`assistant/conversations/${a}/scratchpad`),markConversationRead:a=>this.post(`assistant/conversations/${a}/read`),archiveConversation:a=>this.post(`assistant/conversations/${a}/archive`),deleteConversation:a=>this.del(`assistant/conversations/${a}`),unreadCount:()=>this.get("assistant/unread"),markMessagesRead:a=>this.post("assistant/messages/read",{messageIds:a}),getHeartbeatPrompt:()=>this.get("assistant/heartbeat-prompt"),updateHeartbeatPrompt:a=>this.put("assistant/heartbeat-prompt",{content:a}),resetHeartbeatPrompt:()=>this.del("assistant/heartbeat-prompt"),listModels:()=>this.get("assistant/models"),getModelContext:a=>this.get(`assistant/models/${encodeURIComponent(a)}/context`),getSettings:()=>this.get("assistant/settings"),updateSettings:a=>this.patch("assistant/settings",a),chatStreamUrl:()=>`${this._baseUrl}/assistant/chat/stream`,approveToolCall:a=>this.post(`assistant/messages/${a}/approve`),rejectToolCall:a=>this.post(`assistant/messages/${a}/reject`),confirmCommand:a=>this.post(`assistant/messages/${a}/confirm`),exportConversation:(a,b="markdown")=>this.client.get(`assistant/conversations/${a}/export`,{searchParams:{format:b}}).then(a=>a.text()),getInsights:()=>this.get("assistant/insights"),listPinnedInsights:()=>this.get("assistant/insights/pins"),pinInsight:a=>this.post("assistant/insights/pins",a),unpinInsight:a=>this.del(`assistant/insights/pins/${a}`),getModelProfiles:()=>this.get("assistant/model-profiles"),updateModelProfiles:a=>this.patch("assistant/model-profiles",Object.fromEntries(a.map(a=>[a.taskType,{provider:a.provider,model:a.model,fallbacks:a.fallbacks,temperature:a.temperature,maxTokens:a.maxTokens,maxToolRounds:a.maxToolRounds,thinkingMode:a.thinkingMode}])))};selfUpdate={status:()=>this.get("self-update/status"),version:()=>this.get("self-update/version"),check:()=>this.post("self-update/check"),apply:a=>this.post("self-update/apply",{restart:a}),restart:()=>this.post("self-update/restart")};systemUpdates={get:()=>this.get("system/updates").then(a=>a.data),refresh:()=>this.post("system/updates/check").then(a=>a.data)};agentUpgrades={eligibility:a=>this.get(`agents/upgrade/eligibility${a?`?version=${encodeURIComponent(a)}`:""}`).then(a=>a.data),start:a=>this.post("agents/upgrade",a).then(a=>a.data),check:a=>this.post("agents/upgrade",{...a,dryRun:!0}).then(a=>a.data),run:a=>this.get(`agents/upgrade/runs/${encodeURIComponent(a)}`).then(a=>a.data),stop:a=>this.post(`agents/upgrade/runs/${encodeURIComponent(a)}/stop`).then(a=>a.data),retry:(a,b={})=>this.post(`agents/upgrade/runs/${encodeURIComponent(a)}/retry`,b).then(a=>a.data)};libraryDeploy={deploy:a=>this.post("library/deploy",a)};webhooks={list:()=>this.get("webhooks").then(a=>a.data.endpoints),get:a=>this.get(`webhooks/${a}`).then(a=>a.data.endpoint),create:a=>this.post("webhooks",a).then(a=>a.data.endpoint),update:(a,b)=>this.patch(`webhooks/${a}`,b).then(a=>a.data.endpoint),delete:a=>this.del(`webhooks/${a}`),deliveries:(a,b=1,c=20)=>this.get(`webhooks/${a}/deliveries?page=${b}&pageSize=${c}`).then(a=>a.data),test:a=>this.post(`webhooks/${a}/test`).then(a=>a.data),redeliver:(a,b)=>this.post(`webhooks/${a}/deliveries/${b}/redeliver`).then(a=>a.data)}};a.s(["f",0,aU],46997)}];
|
|
2
|
+
Content-Type: ${d.type||"application/octet-stream"}`).byteLength),b+=4,b+="string"==typeof d?F.encode(K(d)).byteLength:d.size,b+=2;return 0===b?0:b+40+6}return a instanceof Blob?a.size:a instanceof ArrayBuffer||ArrayBuffer.isView(a)?a.byteLength:"string"==typeof a?F.encode(a).byteLength:a instanceof URLSearchParams?F.encode(a.toString()).byteLength:0})(c??a.body)||J(a.headers);return new Request(a,{duplex:"half",body:M(a.body,d,b),headers:a.headers,referrer:a.referrer,referrerPolicy:a.referrerPolicy})})(a,this.#g.onUploadProgress,this.#g.body):a}}let aN=(a,b)=>{try{return aM.create(a,b())}catch(b){let a=Promise.reject(b);for(let b of w())a[b]=async()=>a;return a}},aO=a=>{let b=(b,c)=>aN(b,()=>R(a,c));for(let c of u)b[c]=(b,d)=>aN(b,()=>R(a,d,{method:c}));return b.create=a=>aO(R(a)),b.extend=b=>("function"==typeof b&&(b=b(R(X(a)))),aO(R(a,b))),b.stop=x,b.retry=A,b},aP=aO(),aQ="__magnus_trace_id__";var aR=a.i(57547);let aS={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 aT(a){let b="string"==typeof a?a:null==a?"":JSON.stringify(a);if(!b.includes("AGENT_NOT_PRIVILEGED")&&!/is disabled: agent is not privileged/.test(b))return null;let c=/"feature"\s*:\s*\\?"([a-z-]+)/.exec(b)?.[1]??/([a-z-]+) is disabled: agent is not privileged/.exec(b)?.[1];return`${!c?"This feature":aS[c]??c} is disabled on this node (its agent runs unprivileged).`}a.s(["f",0,aT],5739);let aU=new class{client;_baseUrl;constructor(){this._baseUrl="",this.client=this.createClient(this._baseUrl)}get baseUrl(){return this._baseUrl}getAuthHeaders(){return(0,aR.L)(this._baseUrl)}reconfigure(a){this._baseUrl=(0,aR.K)(a)??"",this.client=this.createClient(this._baseUrl)}createClient(a){return aP.create({prefix:"/api/proxy",timeout:18e4,hooks:{beforeRequest:[({request:b})=>{a?b.headers.set("x-proxy-target",a):b.headers.delete("x-proxy-target"),b.headers.get("x-trace-id")||b.headers.set("x-trace-id",function(){let a=globalThis,b=Date.now(),c=a[aQ];if(c&&b-c.lastUsedAt<1e4)return c.lastUsedAt=b,c.id;let d="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 a[aQ]={id:d,lastUsedAt:b},d}())}],beforeError:[async({error:a})=>{if(a instanceof c&&403===a.response.status){let b=aT(a.data);b&&(a.name="AgentNotPrivilegedError",a.message=b)}return a}]}})}async get(a,b){let c={};if(b)for(let[a,d]of Object.entries(b))void 0!==d&&(c[a]=String(d));return this.client.get(a,{searchParams:c}).json()}async post(a,b,c){return this.client.post(a,{json:b,headers:c}).json()}async patch(a,b){return this.client.patch(a,{json:b}).json()}async put(a,b){return this.client.put(a,{json:b}).json()}async del(a){return this.client.delete(a).json()}nodes={list:a=>this.get("nodes",a),get:a=>this.get(`nodes/${a}`),register:a=>this.post("nodes/register",a),update:(a,b)=>this.patch(`nodes/${a}`,b),repairAddress:(a,b)=>this.post(`nodes/${a}/repair-address`,b),delete:a=>this.del(`nodes/${a}`),health:a=>this.get(`nodes/${a}/health`),gpu:(a,b="24h")=>this.get(`nodes/${a}/gpu`,{period:b}),forecast:(a,b=30)=>this.get(`health/${a}/forecast`,{days:b}),wazuh:a=>this.get(`nodes/${a}/wazuh`),wazuhSummary:()=>this.get("nodes/wazuh/summary"),systemUpdatesSummary:()=>this.get("nodes/system-updates/summary"),tailscaleSummary:()=>this.get("nodes/tailscale/summary"),enableSystemUpdates:a=>this.post(`nodes/${a}/system-updates/enable`),healthHistory:(a,b)=>this.get(`nodes/${a}/health/history`,{limit:b})};commands={dispatch:(a,b)=>this.post("commands",a,{"x-idempotency-key":b}),get:a=>this.get(`commands/${a}`),result:a=>this.get(`commands/${a}/result`),cancel:(a,b)=>this.post(`commands/${a}/cancel`,{reason:b})};cron={list:a=>this.get("cron",a?{nodeId:a}:void 0),get:a=>this.get(`cron/${a}`),create:a=>this.post("cron",a),update:(a,b)=>this.patch(`cron/${a}`,b),delete:a=>this.del(`cron/${a}`)};files={update:a=>this.post("files/update",a),read:(a,b)=>this.get("files/read",{nodeId:a,filePath:b})};skills={list:()=>this.get("skills"),get:a=>this.get(`skills/${a}`),create:a=>this.post("skills",a),update:(a,b)=>this.patch(`skills/${a}`,b),delete:a=>this.del(`skills/${a}`),push:a=>this.post("skills/push",a),installations:a=>this.get(`skills/installations/${a}`),getFile:(a,b)=>this.get(`skills/${a}/files/${b}`),updateFile:(a,b,c)=>this.client.put(`skills/${a}/files/${b}`,{json:{content:c}}).json(),registry:{list:()=>this.get("skills/registry"),get:a=>this.get(`skills/registry/${a}`),sync:()=>this.post("skills/registry/sync",{}),publish:(a,b)=>this.post(`skills/registry/${a}/publish`,b),versions:a=>this.get(`skills/registry/${a}/versions`),versionDetail:(a,b)=>this.get(`skills/registry/${a}/versions/${b}`),setTag:(a,b)=>this.post(`skills/registry/${a}/tags`,b),delete:a=>this.del(`skills/registry/${a}`)}};logs={query:a=>this.post("logs/query",a),ingest:a=>this.post("logs/ingest",a)};audit={list:a=>this.get("audit",a),days:()=>this.get("audit/days")};hermes={installations:()=>this.get("hermes/installations"),installation:a=>this.get(`hermes/installations/${a}`),detect:a=>this.post("hermes/detect",a),deploy:(a,b)=>this.post("hermes/deploy",a,{"x-idempotency-key":b}),sync:a=>this.post(`hermes/installations/${a}/sync`),configure:a=>this.post(`hermes/installations/${a}/configure`),config:a=>this.get(`hermes/installations/${a}/config`),updateConfig:(a,b)=>this.patch(`hermes/installations/${a}/config`,b),update:a=>this.post(`hermes/installations/${a}/update`),uninstall:a=>this.del(`hermes/installations/${a}`),profiles:a=>a?this.get(`hermes/installations/${a}/profiles`):this.get("hermes/profiles"),createProfile:(a,b)=>this.post(`hermes/installations/${a}/profiles`,b),updateProfile:(a,b)=>this.patch(`hermes/profiles/${a}`,b),deleteProfile:a=>this.del(`hermes/profiles/${a}`),describeProfile:a=>this.post(`hermes/profiles/${a}/describe-auto`),gatewayAction:(a,b)=>this.post(`hermes/profiles/${a}/gateway/${b}`),dashboardAction:(a,b)=>this.post(`hermes/installations/${a}/dashboard/${b}`),enableApiServer:(a,b)=>this.post(`hermes/profiles/${a}/api-server/enable`,b),disableApiServer:a=>this.post(`hermes/profiles/${a}/api-server/disable`),apiServerStatus:a=>this.get(`hermes/profiles/${a}/api-server/status`),rotateApiServerKey:(a,b)=>this.post(`hermes/profiles/${a}/api-server/rotate-key`,b),migrationDryRun:a=>this.post("hermes/migration/openclaw/dry-run",a),migrationApply:(a,b)=>this.post("hermes/migration/openclaw/apply",a,{"x-idempotency-key":b}),jobs:a=>this.get("hermes/jobs",a),job:a=>this.get(`hermes/jobs/${a}`)};ardent={installations:()=>this.get("ardent/installations"),installation:a=>this.get(`ardent/installations/${encodeURIComponent(a)}`),profiles:()=>this.get("ardent/profiles"),resource:(a,b,c,d)=>this.get(`ardent/installations/${encodeURIComponent(a)}/profiles/${encodeURIComponent(b)}/${c}`,d),action:(a,b,c,d,e)=>this.client.post(`ardent/installations/${encodeURIComponent(a)}/profiles/${encodeURIComponent(b)}/action`,{json:{action:c,...e?{target:e}:{},body:d??{}},timeout:"package-install"===c?62e4:c.startsWith("service-")?125e3:55e3}).json()};codex={installations:(a=!1)=>this.get("codex/installations",{refreshLatest:a?"true":void 0}),installation:(a,b=!1)=>this.get(`codex/installations/${a}`,{refreshLatest:b?"true":void 0}),update:a=>this.client.post(`codex/installations/${a}/update`,{timeout:92e4,retry:0}).json(),logout:a=>this.post(`codex/installations/${a}/logout`),startDeviceAuth:a=>this.post(`codex/installations/${a}/device-auth`),deviceAuth:(a,b)=>this.get(`codex/installations/${a}/device-auth/${b}`),cancelDeviceAuth:(a,b)=>this.post(`codex/installations/${a}/device-auth/${b}/cancel`)};orchestra={overview:()=>this.get("orchestra/overview"),capabilities:()=>this.get("orchestra/capabilities"),skillCatalog:()=>this.get("orchestra/skill-catalog"),auditCatalogSkill:a=>this.get(`orchestra/skill-catalog/${encodeURIComponent(a)}/audit`),installCatalogSkill:a=>this.post("orchestra/skill-catalog/install",a),quarantineCatalogSkill:a=>this.post(`orchestra/skill-catalog/${encodeURIComponent(a)}/quarantine`,{}),previewSkillBundle:a=>this.post("orchestra/skill-bundles/preview",a),applySkillBundle:a=>this.post("orchestra/skill-bundles/apply",a),cancelJob:a=>this.post(`orchestra/jobs/${a}/cancel`),testProvider:a=>this.post("orchestra/providers/test",a),skillAssignments:{list:a=>this.get("orchestra/skill-assignments",a),create:a=>this.post("orchestra/skill-assignments",a),update:(a,b)=>this.patch(`orchestra/skill-assignments/${a}`,b),delete:a=>this.del(`orchestra/skill-assignments/${a}`)},toolsetPolicies:{list:a=>this.get("orchestra/toolset-policies",a),upsert:a=>this.put("orchestra/toolset-policies",a),update:(a,b)=>this.patch(`orchestra/toolset-policies/${a}`,b),delete:a=>this.del(`orchestra/toolset-policies/${a}`)},roles:{list:()=>this.get("orchestra/roles"),get:a=>this.get(`orchestra/roles/${a}`),create:a=>this.post("orchestra/roles",a),update:(a,b)=>this.patch(`orchestra/roles/${a}`,b),delete:a=>this.del(`orchestra/roles/${a}`),apply:(a,b)=>this.post(`orchestra/roles/${a}/apply`,b)},providers:{get:a=>this.get("orchestra/providers",a),upsert:a=>this.put("orchestra/providers",a)},credentialPools:{list:()=>this.get("orchestra/credential-pools"),create:a=>this.post("orchestra/credential-pools",a),update:(a,b)=>this.patch(`orchestra/credential-pools/${a}`,b),delete:a=>this.del(`orchestra/credential-pools/${a}`),attach:(a,b)=>this.post(`orchestra/credential-pools/${a}/attach`,b),detach:a=>this.del(`orchestra/credential-pools/attachments/${a}`)},mcpServers:{list:()=>this.get("orchestra/mcp-servers"),create:a=>this.post("orchestra/mcp-servers",a),update:(a,b)=>this.patch(`orchestra/mcp-servers/${a}`,b),delete:a=>this.del(`orchestra/mcp-servers/${a}`),attach:(a,b)=>this.post(`orchestra/mcp-servers/${a}/attach`,b),detach:a=>this.del(`orchestra/mcp-servers/attachments/${a}`)},messagingBindings:{list:a=>this.get("orchestra/messaging-bindings",a),create:a=>this.post("orchestra/messaging-bindings",a),update:(a,b)=>this.patch(`orchestra/messaging-bindings/${a}`,b),delete:a=>this.del(`orchestra/messaging-bindings/${a}`)},cronJobs:{list:a=>this.get("orchestra/cron-jobs",a),create:a=>this.post("orchestra/cron-jobs",a),update:(a,b)=>this.patch(`orchestra/cron-jobs/${a}`,b),delete:a=>this.del(`orchestra/cron-jobs/${a}`)},plugins:{list:a=>this.get("orchestra/plugins",a),install:a=>this.post("orchestra/plugins",a),remove:a=>this.del(`orchestra/plugins/${a}`)},hooks:{list:a=>this.get("orchestra/hooks",a),create:a=>this.post("orchestra/hooks",a),update:(a,b)=>this.patch(`orchestra/hooks/${a}`,b),delete:a=>this.del(`orchestra/hooks/${a}`)}};quickCommand={exec:(a,b)=>this.post(`quick-command/${a}/exec`,b)};discovery={scan:a=>this.post("discovery/scan",{timeoutMs:a})};stats={overview:()=>this.get("stats/overview")};roles={list:()=>this.get("roles"),get:a=>this.get(`roles/${a}`),create:a=>this.post("roles",a),update:(a,b)=>this.patch(`roles/${a}`,b),delete:a=>this.del(`roles/${a}`),assign:(a,b)=>this.post(`roles/${a}/assign`,b),unassign:(a,b)=>this.post(`roles/${a}/unassign`,b),apply:(a,b)=>this.post(`roles/${a}/apply`,b??{}),applications:{list:a=>this.get("roles/applications/list",a),get:a=>this.get(`roles/applications/${a}`)}};notifications={list:a=>this.get("notifications",a),unreadCount:()=>this.get("notifications/unread-count"),markRead:a=>this.post("notifications/read",{ids:a}),markAllRead:()=>this.post("notifications/read-all")};library={categories:{list:()=>this.get("library/categories"),create:a=>this.post("library/categories",a),update:(a,b)=>this.patch(`library/categories/${a}`,b),delete:a=>this.del(`library/categories/${a}`)},files:{list:a=>this.get("library/files",a),get:a=>this.get(`library/files/${a}`),create:a=>this.post("library/files",a),update:(a,b)=>this.patch(`library/files/${a}`,b),delete:a=>this.del(`library/files/${a}`),move:a=>this.post("library/files/move",a)}};anomalies={list:a=>this.get("anomalies",a),summary:()=>this.get("anomalies/summary"),correlation:a=>this.get(`anomalies/event/${a}/correlation`),nodeSummary:a=>this.get(`anomalies/${a}/summary`),resolve:a=>this.post(`anomalies/${a}/resolve`),resolveNode:(a,b)=>this.post("anomalies/resolve-node",{nodeId:a,metric:b})};remediation={listRules:()=>this.get("remediation/rules"),getRule:a=>this.get(`remediation/rules/${a}`),createRule:a=>this.post("remediation/rules",a),updateRule:(a,b)=>this.patch(`remediation/rules/${a}`,b),deleteRule:a=>this.del(`remediation/rules/${a}`),listExecutions:a=>this.get("remediation/executions",a),trigger:a=>this.post("remediation/trigger",a)};assistant={chat:a=>this.post("assistant/chat",a),conversations:a=>this.get("assistant/conversations",a),messages:(a,b)=>this.get(`assistant/conversations/${a}`,b),forkConversation:(a,b)=>this.post(`assistant/conversations/${a}/fork`,{fromMessageId:b}),shareConversation:(a,b)=>this.post(`assistant/conversations/${a}/share`,{ttlHours:b}),getSharedConversation:a=>this.get(`assistant/shares/${a}`),getScratchpad:a=>this.get(`assistant/conversations/${a}/scratchpad`),clearScratchpad:a=>this.del(`assistant/conversations/${a}/scratchpad`),markConversationRead:a=>this.post(`assistant/conversations/${a}/read`),archiveConversation:a=>this.post(`assistant/conversations/${a}/archive`),deleteConversation:a=>this.del(`assistant/conversations/${a}`),unreadCount:()=>this.get("assistant/unread"),markMessagesRead:a=>this.post("assistant/messages/read",{messageIds:a}),getHeartbeatPrompt:()=>this.get("assistant/heartbeat-prompt"),updateHeartbeatPrompt:a=>this.put("assistant/heartbeat-prompt",{content:a}),resetHeartbeatPrompt:()=>this.del("assistant/heartbeat-prompt"),listModels:()=>this.get("assistant/models"),getModelContext:a=>this.get(`assistant/models/${encodeURIComponent(a)}/context`),getSettings:()=>this.get("assistant/settings"),updateSettings:a=>this.patch("assistant/settings",a),chatStreamUrl:()=>`${this._baseUrl}/assistant/chat/stream`,approveToolCall:a=>this.post(`assistant/messages/${a}/approve`),rejectToolCall:a=>this.post(`assistant/messages/${a}/reject`),confirmCommand:a=>this.post(`assistant/messages/${a}/confirm`),exportConversation:(a,b="markdown")=>this.client.get(`assistant/conversations/${a}/export`,{searchParams:{format:b}}).then(a=>a.text()),getInsights:()=>this.get("assistant/insights"),listPinnedInsights:()=>this.get("assistant/insights/pins"),pinInsight:a=>this.post("assistant/insights/pins",a),unpinInsight:a=>this.del(`assistant/insights/pins/${a}`),getModelProfiles:()=>this.get("assistant/model-profiles"),updateModelProfiles:a=>this.patch("assistant/model-profiles",Object.fromEntries(a.map(a=>[a.taskType,{provider:a.provider,model:a.model,fallbacks:a.fallbacks,temperature:a.temperature,maxTokens:a.maxTokens,maxToolRounds:a.maxToolRounds,thinkingMode:a.thinkingMode}])))};selfUpdate={status:()=>this.get("self-update/status"),version:()=>this.get("self-update/version"),check:()=>this.post("self-update/check"),apply:a=>this.post("self-update/apply",{restart:a}),restart:()=>this.post("self-update/restart")};systemUpdates={get:()=>this.get("system/updates").then(a=>a.data),refresh:()=>this.post("system/updates/check").then(a=>a.data)};agentUpgrades={eligibility:a=>this.get(`agents/upgrade/eligibility${a?`?version=${encodeURIComponent(a)}`:""}`).then(a=>a.data),start:a=>this.post("agents/upgrade",a).then(a=>a.data),check:a=>this.post("agents/upgrade",{...a,dryRun:!0}).then(a=>a.data),run:a=>this.get(`agents/upgrade/runs/${encodeURIComponent(a)}`).then(a=>a.data),stop:a=>this.post(`agents/upgrade/runs/${encodeURIComponent(a)}/stop`).then(a=>a.data),retry:(a,b={})=>this.post(`agents/upgrade/runs/${encodeURIComponent(a)}/retry`,b).then(a=>a.data)};libraryDeploy={deploy:a=>this.post("library/deploy",a)};webhooks={list:()=>this.get("webhooks").then(a=>a.data.endpoints),get:a=>this.get(`webhooks/${a}`).then(a=>a.data.endpoint),create:a=>this.post("webhooks",a).then(a=>a.data.endpoint),update:(a,b)=>this.patch(`webhooks/${a}`,b).then(a=>a.data.endpoint),delete:a=>this.del(`webhooks/${a}`),deliveries:(a,b=1,c=20)=>this.get(`webhooks/${a}/deliveries?page=${b}&pageSize=${c}`).then(a=>a.data),test:a=>this.post(`webhooks/${a}/test`).then(a=>a.data),redeliver:(a,b)=>this.post(`webhooks/${a}/deliveries/${b}/redeliver`).then(a=>a.data)}};a.s(["f",0,aU],46997)}];
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=apps_dashboard_src_lib_api-client_ts_0tho-kkk5ez7h._.js.map
|
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/0cz1d0mv5g_q7.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/JNIwZ7z823tVKgswbE1Tl/_buildManifest.js",
|
|
11
|
+
"static/JNIwZ7z823tVKgswbE1Tl/_ssgManifest.js",
|
|
12
|
+
"static/JNIwZ7z823tVKgswbE1Tl/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/3y705tc4v-41-.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/3y705tc4v-41-.js"/><script src="/_next/static/chunks/1k2w3nq2-wg_-.js" async=""></script><script src="/_next/static/chunks/16uyp1ymdlvpq.js" async=""></script><script src="/_next/static/chunks/3l8w-h8da7s_r.js" async=""></script><script src="/_next/static/chunks/3t6i_3lvi_934.js" async=""></script><script src="/_next/static/chunks/turbopack-2u1d16houkiyo.js" async=""></script><script src="/_next/static/chunks/1ua2kfq9s-me6.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script id="_R_">(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push({"otherChunks":["static/chunks/3y705tc4v-41-.js","static/chunks/1k2w3nq2-wg_-.js","static/chunks/16uyp1ymdlvpq.js","static/chunks/3l8w-h8da7s_r.js","static/chunks/3t6i_3lvi_934.js"],"runtimeModuleIds":[94553]});</script><script src="/_next/static/chunks/3y705tc4v-41-.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"/_next/static/chunks/1ua2kfq9s-me6.js\"\n3:I[39756,[\"$2\"],\"default\"]\n4:I[37457,[\"$2\"],\"default\"]\n7:I[97367,[\"$2\"],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\na:\"ViewportBoundary\"\nb:I[97367,[\"$2\"],\"$a\"]\nd:\"MetadataBoundary\"\ne:I[97367,[\"$2\"],\"$d\"]\n10:I[68027,[\"$2\"],\"default\",1]\n5:X\n6:[[\"children\",{\"s\":\"__PAGE__\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],\"p\":false,\"v\":null}}]]\n0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$5\"},\"c\":\"$Q6\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"$Le\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}],null]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/3y705tc4v-41-.js"/><script src="/_next/static/chunks/1k2w3nq2-wg_-.js" async=""></script><script src="/_next/static/chunks/16uyp1ymdlvpq.js" async=""></script><script src="/_next/static/chunks/3l8w-h8da7s_r.js" async=""></script><script src="/_next/static/chunks/3t6i_3lvi_934.js" async=""></script><script src="/_next/static/chunks/turbopack-2u1d16houkiyo.js" async=""></script><script src="/_next/static/chunks/1ua2kfq9s-me6.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script id="_R_">(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push({"otherChunks":["static/chunks/3y705tc4v-41-.js","static/chunks/1k2w3nq2-wg_-.js","static/chunks/16uyp1ymdlvpq.js","static/chunks/3l8w-h8da7s_r.js","static/chunks/3t6i_3lvi_934.js"],"runtimeModuleIds":[94553]});</script><script src="/_next/static/chunks/3y705tc4v-41-.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"/_next/static/chunks/1ua2kfq9s-me6.js\"\n3:I[39756,[\"$2\"],\"default\"]\n4:I[37457,[\"$2\"],\"default\"]\n7:I[97367,[\"$2\"],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\na:\"ViewportBoundary\"\nb:I[97367,[\"$2\"],\"$a\"]\nd:\"MetadataBoundary\"\ne:I[97367,[\"$2\"],\"$d\"]\n10:I[68027,[\"$2\"],\"default\",1]\n5:X\n6:[[\"children\",{\"s\":\"__PAGE__\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],\"p\":false,\"v\":null}}]]\n0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$5\"},\"c\":\"$Q6\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"$Le\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}],null]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"JNIwZ7z823tVKgswbE1Tl\"}\n5:C\nc:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n9:null\nf:[]\n"])</script></body></html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"previewModeId": "
|
|
3
|
-
"previewModeSigningKey": "
|
|
4
|
-
"previewModeEncryptionKey": "
|
|
2
|
+
"previewModeId": "66bac81a58407819c2d4ab8b33805c77",
|
|
3
|
+
"previewModeSigningKey": "7f16b066010a1e9dafe9d438f1ce6fb38902c7613657a6ea38e669d03b41da88",
|
|
4
|
+
"previewModeEncryptionKey": "8758a8f0cab829d2d15afc68a6b568e21566fa647d78e6078df54f6e367abf5a"
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {\n \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {\n \"4038ec59b9417e3b827aac560c08c164522e83fbc4\": {\n \"workers\": {\n \"app/cron/page\": {\n \"moduleId\": 80202,\n \"async\": false\n }\n },\n \"filename\": \"apps/dashboard/src/app/actions/scan.ts\",\n \"exportedName\": \"scanCron\"\n },\n \"400dff2c5c1f44ae3360e3e6a3fe223d138263e55b\": {\n \"workers\": {\n \"app/skills/page\": {\n \"moduleId\": 28111,\n \"async\": false\n }\n },\n \"filename\": \"apps/dashboard/src/app/actions/scan.ts\",\n \"exportedName\": \"scanSkills\"\n }\n },\n \"edge\": {},\n \"encryptionKey\": \"qbG6siQPjesPnvGeLFoQWOGcJSw6l1aXQUVNwUi/9+Q=\"\n}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"node": {
|
|
3
|
-
"
|
|
3
|
+
"4038ec59b9417e3b827aac560c08c164522e83fbc4": {
|
|
4
4
|
"workers": {
|
|
5
5
|
"app/cron/page": {
|
|
6
6
|
"moduleId": 80202,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"filename": "apps/dashboard/src/app/actions/scan.ts",
|
|
11
11
|
"exportedName": "scanCron"
|
|
12
12
|
},
|
|
13
|
-
"
|
|
13
|
+
"400dff2c5c1f44ae3360e3e6a3fe223d138263e55b": {
|
|
14
14
|
"workers": {
|
|
15
15
|
"app/skills/page": {
|
|
16
16
|
"moduleId": 28111,
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"edge": {},
|
|
25
|
-
"encryptionKey": "
|
|
25
|
+
"encryptionKey": "qbG6siQPjesPnvGeLFoQWOGcJSw6l1aXQUVNwUi/9+Q="
|
|
26
26
|
}
|
|
@@ -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: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.client.post(`codex/installations/${e}/update`,{timeout:92e4,retry:0}).json(),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)}]);
|