@hivemagnus/magnus-ui 2.1.3 → 2.2.1

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.
Files changed (151) hide show
  1. package/dist/app/apps/dashboard/.next/BUILD_ID +1 -1
  2. package/dist/app/apps/dashboard/.next/build-manifest.json +3 -3
  3. package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
  4. package/dist/app/apps/dashboard/.next/required-server-files.json +2 -2
  5. package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
  6. package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
  7. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
  13. package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
  14. package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
  15. package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
  16. package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
  17. package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
  18. package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js.nft.json +1 -1
  19. package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js.nft.json +1 -1
  20. package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js.nft.json +1 -1
  21. package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js.nft.json +1 -1
  22. package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js.nft.json +1 -1
  23. package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
  24. package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
  25. package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
  26. package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
  27. package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
  28. package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
  29. package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
  30. package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
  31. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
  32. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
  33. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
  34. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
  35. package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
  36. package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  37. package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
  38. package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
  39. package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
  40. package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
  41. package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
  42. package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
  43. package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
  44. package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
  45. package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
  46. package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
  47. package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
  48. package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
  49. package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
  50. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
  51. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
  52. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
  53. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
  54. package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
  55. package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
  56. package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js.nft.json +1 -1
  57. package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page_client-reference-manifest.js +1 -1
  58. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
  59. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
  60. package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
  61. package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
  62. package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
  63. package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
  64. package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
  65. package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
  66. package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
  67. package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
  68. package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
  69. package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  70. package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
  71. package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
  72. package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
  73. package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
  74. package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
  75. package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  76. package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
  77. package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
  78. package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
  79. package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
  80. package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
  81. package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
  82. package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
  83. package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
  84. package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
  85. package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
  86. package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
  87. package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  88. package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
  89. package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
  90. package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
  91. package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
  92. package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
  93. package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
  94. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
  95. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
  96. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
  97. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
  98. package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
  99. package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
  100. package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
  101. package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
  102. package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
  103. package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
  104. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
  105. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
  106. package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
  107. package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
  108. package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
  109. package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
  110. package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
  111. package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
  112. package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  113. package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
  114. package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
  115. package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
  116. package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
  117. package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
  118. package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
  119. package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0ywmf3079vsm1._.js +1 -1
  120. package/dist/app/apps/dashboard/.next/server/chunks/node_modules_undici_0153f0xi5kile._.js +22 -22
  121. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__06giq9g4me8eh._.js +1 -1
  122. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__08sgyyf_y8ab8._.js +1 -1
  123. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__11pe-l2-ko65_._.js +1 -1
  124. package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0caxc2bc6a__r._.js +1 -1
  125. package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0zsjpnu4iitoz._.js +16 -16
  126. package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1oebzzj_en62h._.js +1 -1
  127. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +1 -1
  128. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_installations_page_tsx_0nvqgacugy6nf._.js +55 -1
  129. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
  130. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
  131. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_lib_api-client_ts_0tho-kkk5ez7h._.js +1 -1
  132. package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +3 -3
  133. package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
  134. package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
  135. package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
  136. package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
  137. package/dist/app/apps/dashboard/.next/static/chunks/{3c6u3mzxxzerm.js → 1c3k72m3gy59a.js} +1 -1
  138. package/dist/app/apps/dashboard/.next/static/chunks/{1qdz-1e_q6bds.js → 1xhyo-jo-sjyp.js} +1 -1
  139. package/dist/app/apps/dashboard/.next/static/chunks/{1wufiestojnq3.js → 23f-6cac_j9rv.js} +1 -1
  140. package/dist/app/apps/dashboard/.next/static/chunks/26fuqy0r81cza.js +1 -0
  141. package/dist/app/apps/dashboard/.next/static/chunks/{402ia_vionywg.js → 2vp_cbcnkfats.js} +1 -1
  142. package/dist/app/apps/dashboard/.next/static/chunks/360b5_u5zcl9r.js +55 -0
  143. package/dist/app/apps/dashboard/.next/static/chunks/{3otz9f1qh49qi.js → 3ge96h33jg_hw.js} +1 -1
  144. package/dist/app/apps/dashboard/.next/static/chunks/{2_ko3-q8c_zhl.js → 3n9nsatm9lrk8.js} +1 -1
  145. package/dist/app/apps/dashboard/package.json +2 -2
  146. package/dist/app/apps/dashboard/server.js +1 -1
  147. package/package.json +2 -2
  148. package/dist/app/apps/dashboard/.next/static/chunks/3m8d_tlzqof67.js +0 -1
  149. /package/dist/app/apps/dashboard/.next/static/{H-K1jxmL5UpxX60_nMjZt → K7jBkPHkVdA6DcoFY4Cut}/_buildManifest.js +0 -0
  150. /package/dist/app/apps/dashboard/.next/static/{H-K1jxmL5UpxX60_nMjZt → K7jBkPHkVdA6DcoFY4Cut}/_clientMiddlewareManifest.js +0 -0
  151. /package/dist/app/apps/dashboard/.next/static/{H-K1jxmL5UpxX60_nMjZt → K7jBkPHkVdA6DcoFY4Cut}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[81837,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(68415),e=a.i(58299),f=a.i(49521),g=a.i(85063),h=a.i(46997),i=a.i(5739),j=a.i(8897),k=a.i(5050);let l=(0,k.createServerReference)("40329e45ad385f8c8c378eaa07e6844a5e1595766c",k.callServer,void 0,k.findSourceMapURL,"scanCron");var m=a.i(8387),n=a.i(73771),o=a.i(33855),p=a.i(19783),q=a.i(33540),r=a.i(8311),s=a.i(34532),t=a.i(89027),u=a.i(41146),v=a.i(1661),w=a.i(75160),x=a.i(57307),y=a.i(70944),z=a.i(90702),A=a.i(13412),B=a.i(11134);a.s(["default",0,function(){let{activeNode:a}=(0,j.l)(),[k,C]=(0,c.useState)([]),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(""),[L,M]=(0,c.useState)(new Set),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)("1.0.0"),[R,S]=(0,c.useState)(""),[T,U]=(0,c.useState)(!1),V=(0,c.useCallback)(async()=>{E(!0),C([]),G(null);let b=Date.now();try{let b=await l(a.id);if(b.success&&Array.isArray(b.data)){let a=b.data.map(a=>({...a,status:"error"===a.status?"error":"done"}));C(a);let c=new Set(a.filter(a=>a.jobs.length>0).map(a=>a.nodeId));M(c.size>0?c:new Set(a.map(a=>a.nodeId)))}else G(b.error?.message??"Scan returned unsuccessful response")}catch(b){let a=b instanceof Error?b.message:"Scan request failed";G(a)}finally{let a=Date.now()-b;a<1500&&await new Promise(b=>setTimeout(b,1500-a)),E(!1),I(!0)}},[a]);(0,c.useEffect)(()=>{a&&V()},[a,V]);let W=k.reduce((a,b)=>a+("done"===b.status?b.jobs.length:0),0),X=k.filter(a=>"done"===a.status).length,Y=k.filter(a=>"error"===a.status).length,Z=a=>{if(!J)return!0;let b=J.toLowerCase();return a.name.toLowerCase().includes(b)||a.command.toLowerCase().includes(b)||a.schedule.toLowerCase().includes(b)||(a.user?.toLowerCase().includes(b)??!1)},$=async()=>{if(N&&P){U(!0);try{let a=JSON.stringify({name:N.job.name,version:P,schedule:N.job.schedule,command:N.job.command,description:R},null,2);await h.f.library.files.create({name:`${N.job.name} v${P}`,fileName:`${N.job.name}-${P}.json`,mimeType:"application/x-magnus-cronjob",content:a,tags:["cronjob","cron"]}),O(null),Q("1.0.0"),S("")}catch{}finally{U(!1)}}};return(0,b.jsxs)(n.U,{className:"space-y-6",children:[(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Cron Jobs"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage scheduled jobs across your fleet"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[H&&!D&&(0,b.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[k.length," node",1!==k.length?"s":""," · ",W," job",1!==W?"s":"",Y>0&&` \xb7 ${Y} error${1!==Y?"s":""}`]}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",onClick:()=>void V(),disabled:D,children:[(0,b.jsx)(p.f,{className:(0,m.f)("h-3.5 w-3.5 mr-1.5",D&&"animate-spin")}),D?"Scanning...":"Rescan"]})]})]})}),D&&(0,b.jsx)(n.z,{children:(0,b.jsx)(o.f,{title:"Scanning Nodes for Cron Jobs",description:"Probing all online nodes...",nodes:k.map(a=>({nodeId:a.nodeId,nodeName:a.nodeName,status:a.status,error:a.error})),scanning:!0})}),!D&&H&&W>0&&(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(q.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,b.jsx)("input",{type:"text",placeholder:"Search jobs by name, command, or schedule...",value:J,onChange:a=>K(a.target.value),className:(0,m.f)(g.W,"pl-9")})]})}),!D&&H&&F&&(0,b.jsx)(n.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(z.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,b.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:F}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void V(),children:[(0,b.jsx)(p.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!D&&H&&!F&&(0,b.jsxs)(b.Fragment,{children:[0===k.length?(0,b.jsx)(n.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(s.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,b.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):k.map(a=>{let c=L.has(a.nodeId),g=a.jobs.filter(Z);return(0,b.jsx)(n.z,{children:(0,b.jsxs)(f.N,{className:"overflow-hidden",children:[(0,b.jsxs)("button",{onClick:()=>{var b;return b=a.nodeId,void M(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,b.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,b.jsx)(s.f,{className:"h-4 w-4 text-primary"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:a.nodeName}),"done"===a.status&&(0,b.jsxs)(e.t,{variant:a.jobs.length>0?"success":"default",children:[a.jobs.length," job",1!==a.jobs.length?"s":""]}),"error"===a.status&&((0,i.f)(a.error)?(0,b.jsx)(e.t,{variant:"default",children:"Disabled"}):(0,b.jsx)(e.t,{variant:"danger",children:"Error"}))]}),"error"===a.status&&a.error&&(0,b.jsx)("p",{className:(0,m.f)("text-[11px] mt-0.5 truncate",(0,i.f)(a.error)?"text-text-muted":"text-danger"),children:(0,i.f)(a.error)??a.error}),"done"===a.status&&0===a.jobs.length&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No cron jobs found on this node"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===a.status?(0,b.jsx)(A.f,{className:"h-4 w-4 text-success"}):(0,b.jsx)(B.f,{className:"h-4 w-4 text-danger"}),c?(0,b.jsx)(t.f,{className:"h-4 w-4 text-text-muted"}):(0,b.jsx)(u.f,{className:"h-4 w-4 text-text-muted"})]})]}),c&&"done"===a.status&&(0,b.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===g.length?(0,b.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:0===a.jobs.length?"No cron jobs found on this node.":"No jobs match your search on this node."})}):(0,b.jsx)("div",{className:"divide-y divide-border/30",children:g.map((c,f)=>(0,b.jsxs)("div",{className:"p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(r.f,{className:"h-4 w-4 text-primary"}),(0,b.jsx)("span",{className:"text-xs font-bold",children:c.name}),c.user&&(0,b.jsx)(e.t,{variant:"default",children:c.user}),(0,b.jsx)(e.t,{variant:"info",children:c.schedule})]}),(0,b.jsxs)(d.K,{size:"sm",variant:"secondary",onClick:()=>{O({job:c,nodeId:a.nodeId,nodeName:a.nodeName}),Q("1.0.0"),S("")},children:[(0,b.jsx)(v.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:[(0,b.jsx)(y.f,{className:"h-3 w-3"}),function(a){let b=a.split(/\s+/);if(b.length<5)return a;let[c,d,e,f,g]=b;return"*"===c&&"*"===d&&"*"===e&&"*"===f&&"*"===g?"Every minute":"0"===c&&"*"===d&&"*"===e&&"*"===f&&"*"===g?"Every hour":"0"===c&&"0"===d&&"*"===e&&"*"===f&&"*"===g?"Daily at midnight":c?.startsWith("*/")?`Every ${c.slice(2)} minutes`:d?.startsWith("*/")?`Every ${d.slice(2)} hours`:a}(c.schedule)]}),(0,b.jsxs)("div",{className:"flex items-start gap-2 rounded border border-border bg-surface p-3",children:[(0,b.jsx)(x.f,{className:"h-3.5 w-3.5 text-primary mt-0.5 shrink-0"}),(0,b.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-all flex-1",children:c.command})]})]},`${c.name}-${f}`))})})]})},a.nodeId)}),k.length>0&&(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,b.jsxs)("span",{children:[X," node",1!==X?"s":""," scanned ·"," ",W," job",1!==W?"s":""," discovered"]}),Y>0&&(0,b.jsxs)("span",{className:"text-danger",children:[Y," node",1!==Y?"s":""," unreachable"]})]})})]}),(0,b.jsx)(g.n,{open:!!N,onClose:()=>O(null),title:"Publish to Library",description:N?.job.name??"",icon:(0,b.jsx)(v.f,{className:"h-5 w-5 text-primary"}),children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,b.jsx)("span",{className:"text-accent",children:"*"})]}),(0,b.jsx)("input",{type:"text",value:P,onChange:a=>Q(a.target.value),placeholder:"1.0.0",className:g.W})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:"Description"}),(0,b.jsx)("input",{type:"text",value:R,onChange:a=>S(a.target.value),placeholder:"What does this cron job do?",className:g.W})]}),N&&(0,b.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",N.nodeName]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Schedule:"})," ",N.job.schedule]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Command:"})," ",(0,b.jsx)("span",{className:"text-primary",children:N.job.command})]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,b.jsx)(d.K,{variant:"secondary",size:"sm",onClick:()=>O(null),children:"Cancel"}),(0,b.jsx)(d.K,{size:"sm",onClick:()=>void $(),disabled:T||!P,children:T?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(w.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(v.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],81837)}];
1
+ module.exports=[81837,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(68415),e=a.i(58299),f=a.i(49521),g=a.i(85063),h=a.i(46997),i=a.i(5739),j=a.i(8897),k=a.i(5050);let l=(0,k.createServerReference)("4022fa8b9fc62b5f5dc623e908fc1e1d90bd10e6bb",k.callServer,void 0,k.findSourceMapURL,"scanCron");var m=a.i(8387),n=a.i(73771),o=a.i(33855),p=a.i(19783),q=a.i(33540),r=a.i(8311),s=a.i(34532),t=a.i(89027),u=a.i(41146),v=a.i(1661),w=a.i(75160),x=a.i(57307),y=a.i(70944),z=a.i(90702),A=a.i(13412),B=a.i(11134);a.s(["default",0,function(){let{activeNode:a}=(0,j.l)(),[k,C]=(0,c.useState)([]),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(""),[L,M]=(0,c.useState)(new Set),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)("1.0.0"),[R,S]=(0,c.useState)(""),[T,U]=(0,c.useState)(!1),V=(0,c.useCallback)(async()=>{E(!0),C([]),G(null);let b=Date.now();try{let b=await l(a.id);if(b.success&&Array.isArray(b.data)){let a=b.data.map(a=>({...a,status:"error"===a.status?"error":"done"}));C(a);let c=new Set(a.filter(a=>a.jobs.length>0).map(a=>a.nodeId));M(c.size>0?c:new Set(a.map(a=>a.nodeId)))}else G(b.error?.message??"Scan returned unsuccessful response")}catch(b){let a=b instanceof Error?b.message:"Scan request failed";G(a)}finally{let a=Date.now()-b;a<1500&&await new Promise(b=>setTimeout(b,1500-a)),E(!1),I(!0)}},[a]);(0,c.useEffect)(()=>{a&&V()},[a,V]);let W=k.reduce((a,b)=>a+("done"===b.status?b.jobs.length:0),0),X=k.filter(a=>"done"===a.status).length,Y=k.filter(a=>"error"===a.status).length,Z=a=>{if(!J)return!0;let b=J.toLowerCase();return a.name.toLowerCase().includes(b)||a.command.toLowerCase().includes(b)||a.schedule.toLowerCase().includes(b)||(a.user?.toLowerCase().includes(b)??!1)},$=async()=>{if(N&&P){U(!0);try{let a=JSON.stringify({name:N.job.name,version:P,schedule:N.job.schedule,command:N.job.command,description:R},null,2);await h.f.library.files.create({name:`${N.job.name} v${P}`,fileName:`${N.job.name}-${P}.json`,mimeType:"application/x-magnus-cronjob",content:a,tags:["cronjob","cron"]}),O(null),Q("1.0.0"),S("")}catch{}finally{U(!1)}}};return(0,b.jsxs)(n.U,{className:"space-y-6",children:[(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Cron Jobs"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage scheduled jobs across your fleet"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[H&&!D&&(0,b.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[k.length," node",1!==k.length?"s":""," · ",W," job",1!==W?"s":"",Y>0&&` \xb7 ${Y} error${1!==Y?"s":""}`]}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",onClick:()=>void V(),disabled:D,children:[(0,b.jsx)(p.f,{className:(0,m.f)("h-3.5 w-3.5 mr-1.5",D&&"animate-spin")}),D?"Scanning...":"Rescan"]})]})]})}),D&&(0,b.jsx)(n.z,{children:(0,b.jsx)(o.f,{title:"Scanning Nodes for Cron Jobs",description:"Probing all online nodes...",nodes:k.map(a=>({nodeId:a.nodeId,nodeName:a.nodeName,status:a.status,error:a.error})),scanning:!0})}),!D&&H&&W>0&&(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(q.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,b.jsx)("input",{type:"text",placeholder:"Search jobs by name, command, or schedule...",value:J,onChange:a=>K(a.target.value),className:(0,m.f)(g.W,"pl-9")})]})}),!D&&H&&F&&(0,b.jsx)(n.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(z.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,b.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:F}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void V(),children:[(0,b.jsx)(p.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!D&&H&&!F&&(0,b.jsxs)(b.Fragment,{children:[0===k.length?(0,b.jsx)(n.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(s.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,b.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):k.map(a=>{let c=L.has(a.nodeId),g=a.jobs.filter(Z);return(0,b.jsx)(n.z,{children:(0,b.jsxs)(f.N,{className:"overflow-hidden",children:[(0,b.jsxs)("button",{onClick:()=>{var b;return b=a.nodeId,void M(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,b.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,b.jsx)(s.f,{className:"h-4 w-4 text-primary"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:a.nodeName}),"done"===a.status&&(0,b.jsxs)(e.t,{variant:a.jobs.length>0?"success":"default",children:[a.jobs.length," job",1!==a.jobs.length?"s":""]}),"error"===a.status&&((0,i.f)(a.error)?(0,b.jsx)(e.t,{variant:"default",children:"Disabled"}):(0,b.jsx)(e.t,{variant:"danger",children:"Error"}))]}),"error"===a.status&&a.error&&(0,b.jsx)("p",{className:(0,m.f)("text-[11px] mt-0.5 truncate",(0,i.f)(a.error)?"text-text-muted":"text-danger"),children:(0,i.f)(a.error)??a.error}),"done"===a.status&&0===a.jobs.length&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No cron jobs found on this node"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===a.status?(0,b.jsx)(A.f,{className:"h-4 w-4 text-success"}):(0,b.jsx)(B.f,{className:"h-4 w-4 text-danger"}),c?(0,b.jsx)(t.f,{className:"h-4 w-4 text-text-muted"}):(0,b.jsx)(u.f,{className:"h-4 w-4 text-text-muted"})]})]}),c&&"done"===a.status&&(0,b.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===g.length?(0,b.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:0===a.jobs.length?"No cron jobs found on this node.":"No jobs match your search on this node."})}):(0,b.jsx)("div",{className:"divide-y divide-border/30",children:g.map((c,f)=>(0,b.jsxs)("div",{className:"p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(r.f,{className:"h-4 w-4 text-primary"}),(0,b.jsx)("span",{className:"text-xs font-bold",children:c.name}),c.user&&(0,b.jsx)(e.t,{variant:"default",children:c.user}),(0,b.jsx)(e.t,{variant:"info",children:c.schedule})]}),(0,b.jsxs)(d.K,{size:"sm",variant:"secondary",onClick:()=>{O({job:c,nodeId:a.nodeId,nodeName:a.nodeName}),Q("1.0.0"),S("")},children:[(0,b.jsx)(v.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:[(0,b.jsx)(y.f,{className:"h-3 w-3"}),function(a){let b=a.split(/\s+/);if(b.length<5)return a;let[c,d,e,f,g]=b;return"*"===c&&"*"===d&&"*"===e&&"*"===f&&"*"===g?"Every minute":"0"===c&&"*"===d&&"*"===e&&"*"===f&&"*"===g?"Every hour":"0"===c&&"0"===d&&"*"===e&&"*"===f&&"*"===g?"Daily at midnight":c?.startsWith("*/")?`Every ${c.slice(2)} minutes`:d?.startsWith("*/")?`Every ${d.slice(2)} hours`:a}(c.schedule)]}),(0,b.jsxs)("div",{className:"flex items-start gap-2 rounded border border-border bg-surface p-3",children:[(0,b.jsx)(x.f,{className:"h-3.5 w-3.5 text-primary mt-0.5 shrink-0"}),(0,b.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-all flex-1",children:c.command})]})]},`${c.name}-${f}`))})})]})},a.nodeId)}),k.length>0&&(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,b.jsxs)("span",{children:[X," node",1!==X?"s":""," scanned ·"," ",W," job",1!==W?"s":""," discovered"]}),Y>0&&(0,b.jsxs)("span",{className:"text-danger",children:[Y," node",1!==Y?"s":""," unreachable"]})]})})]}),(0,b.jsx)(g.n,{open:!!N,onClose:()=>O(null),title:"Publish to Library",description:N?.job.name??"",icon:(0,b.jsx)(v.f,{className:"h-5 w-5 text-primary"}),children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,b.jsx)("span",{className:"text-accent",children:"*"})]}),(0,b.jsx)("input",{type:"text",value:P,onChange:a=>Q(a.target.value),placeholder:"1.0.0",className:g.W})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:"Description"}),(0,b.jsx)("input",{type:"text",value:R,onChange:a=>S(a.target.value),placeholder:"What does this cron job do?",className:g.W})]}),N&&(0,b.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",N.nodeName]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Schedule:"})," ",N.job.schedule]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Command:"})," ",(0,b.jsx)("span",{className:"text-primary",children:N.job.command})]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,b.jsx)(d.K,{variant:"secondary",size:"sm",onClick:()=>O(null),children:"Cancel"}),(0,b.jsx)(d.K,{size:"sm",onClick:()=>void $(),disabled:T||!P,children:T?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(w.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(v.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],81837)}];
2
2
 
3
3
  //# sourceMappingURL=apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[9121,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(68415),e=a.i(58299),f=a.i(49521),g=a.i(85063),h=a.i(46997),i=a.i(8897),j=a.i(5050);let k=(0,j.createServerReference)("4058d77b722aabb45f48450d26171897c3c4ecff68",j.callServer,void 0,j.findSourceMapURL,"scanSkills");var l=a.i(8387),m=a.i(73771),n=a.i(33855),o=a.i(19783),p=a.i(33540),q=a.i(92965),r=a.i(34532),s=a.i(64831);let t={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};t.node;let u=(0,s.f)(t);var v=a.i(40260),w=a.i(89027),x=a.i(41146),y=a.i(55681),z=a.i(1661),A=a.i(75160),B=a.i(90702),C=a.i(13412),D=a.i(11134);a.s(["default",0,function(){let{activeNode:a}=(0,i.l)(),[j,s]=(0,c.useState)([]),[t,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(""),[L,M]=(0,c.useState)(new Set),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)(null),[R,S]=(0,c.useState)(""),[T,U]=(0,c.useState)(!1),V=(0,c.useCallback)(async()=>{E(!0),s([]),G(null);let b=Date.now();try{let b=await k(a.id);if(b.success&&Array.isArray(b.data)){let a=b.data.map(a=>({...a,status:"error"===a.status?"error":"done",skills:a.skills.map(a=>({...a,files:a.files.map(a=>"string"==typeof a?{name:a,content:""}:a)}))}));s(a);let c=new Set(a.filter(a=>a.skills.length>0).map(a=>a.nodeId));M(c.size>0?c:new Set(a.map(a=>a.nodeId)))}else G(b.error?.message??"Scan returned unsuccessful response")}catch(b){let a=b instanceof Error?b.message:"Scan request failed";G(a)}finally{let a=Date.now()-b;a<1500&&await new Promise(b=>setTimeout(b,1500-a)),E(!1),I(!0)}},[a]);(0,c.useEffect)(()=>{a&&V()},[a,V]);let W=j.reduce((a,b)=>a+("done"===b.status?b.skills.length:0),0),X=j.filter(a=>"done"===a.status).length,Y=j.filter(a=>"error"===a.status).length,Z=a=>{if(!J)return!0;let b=J.toLowerCase();return a.name.toLowerCase().includes(b)||a.description.toLowerCase().includes(b)||a.tags.some(a=>a.toLowerCase().includes(b))},$=async()=>{if(P&&R){U(!0);try{let a={name:P.skill.name,version:R,description:P.skill.description,author:P.skill.author,entryPoint:P.skill.entryPoint,dependencies:P.skill.dependencies,tags:P.skill.tags},b={};for(let a of P.skill.files)b[a.name]=a.content;let c=JSON.stringify({manifest:a,files:b},null,2);await h.f.library.files.create({name:`${P.skill.name} v${R}`,fileName:`${P.skill.name}-${R}.json`,mimeType:"application/x-magnus-skill",content:c,tags:["skill",...P.skill.tags]}),Q(null),S("")}catch{}finally{U(!1)}}};return(0,b.jsxs)(m.U,{className:"space-y-6",children:[(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Skills"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage Hermes Agent skills across your fleet"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[H&&!t&&(0,b.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[j.length," node",1!==j.length?"s":""," · ",W," skill",1!==W?"s":"",Y>0&&` \xb7 ${Y} error${1!==Y?"s":""}`]}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",onClick:()=>void V(),disabled:t,children:[(0,b.jsx)(o.f,{className:(0,l.f)("h-3.5 w-3.5 mr-1.5",t&&"animate-spin")}),t?"Scanning...":"Rescan"]})]})]})}),t&&(0,b.jsx)(m.z,{children:(0,b.jsx)(n.f,{title:"Scanning Nodes for Skills",description:"Probing all online nodes...",nodes:j.map(a=>({nodeId:a.nodeId,nodeName:a.nodeName,status:a.status,error:a.error})),scanning:!0})}),!t&&H&&W>0&&(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(p.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,b.jsx)("input",{type:"text",placeholder:"Search skills by name, description, or tag...",value:J,onChange:a=>K(a.target.value),className:(0,l.f)(g.W,"pl-9")})]})}),!t&&H&&F&&(0,b.jsx)(m.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(B.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,b.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:F}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void V(),children:[(0,b.jsx)(o.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!t&&H&&!F&&(0,b.jsxs)(b.Fragment,{children:[0===j.length?(0,b.jsx)(m.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(r.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,b.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):j.map(a=>{let c=L.has(a.nodeId),g=a.skills.filter(Z);return(0,b.jsx)(m.z,{children:(0,b.jsxs)(f.N,{className:"overflow-hidden",children:[(0,b.jsxs)("button",{onClick:()=>{var b;return b=a.nodeId,void M(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,b.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,b.jsx)(r.f,{className:"h-4 w-4 text-primary"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:a.nodeName}),"done"===a.status&&(0,b.jsxs)(e.t,{variant:a.skills.length>0?"success":"default",children:[a.skills.length," skill",1!==a.skills.length?"s":""]}),"error"===a.status&&(0,b.jsx)(e.t,{variant:"danger",children:"Error"})]}),"error"===a.status&&a.error&&(0,b.jsx)("p",{className:"text-[11px] text-danger mt-0.5 truncate",children:a.error}),"done"===a.status&&0===a.skills.length&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No skills installed on this node"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===a.status?(0,b.jsx)(C.f,{className:"h-4 w-4 text-success"}):(0,b.jsx)(D.f,{className:"h-4 w-4 text-danger"}),c?(0,b.jsx)(w.f,{className:"h-4 w-4 text-text-muted"}):(0,b.jsx)(x.f,{className:"h-4 w-4 text-text-muted"})]})]}),c&&"done"===a.status&&(0,b.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===g.length?(0,b.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:0===a.skills.length?"No skills installed on this node. Deploy skills from the Library.":"No skills match your search on this node."})}):(0,b.jsx)("div",{className:"divide-y divide-border/30",children:g.map(c=>(0,b.jsxs)("div",{className:"p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(q.f,{className:"h-4 w-4 text-primary"}),(0,b.jsx)("span",{className:"text-xs font-bold",children:c.name}),(0,b.jsx)(e.t,{variant:"info",children:c.version})]}),(0,b.jsxs)(d.K,{size:"sm",variant:"secondary",onClick:()=>{Q({skill:c,nodeId:a.nodeId,nodeName:a.nodeName}),S(c.version)},children:[(0,b.jsx)(z.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),c.description&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:c.description}),c.tags.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1",children:c.tags.map(a=>(0,b.jsxs)(e.t,{variant:"default",children:[(0,b.jsx)(u,{className:"h-2.5 w-2.5 mr-1"}),a]},a))}),(0,b.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Author"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.author||"—"})]}),(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Entry Point"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.entryPoint||"—"})]}),(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Dependencies"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.dependencies.length>0?c.dependencies.join(", "):"—"})]})]}),c.files.length>0&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1.5",children:["Files (",c.files.length,")"]}),(0,b.jsx)("div",{className:"space-y-1",children:c.files.map(a=>(0,b.jsxs)("button",{onClick:()=>O(a),className:"flex items-center gap-2 rounded border border-border/50 px-3 py-1.5 text-xs hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)] transition-all w-full text-left",children:[(0,b.jsx)(v.f,{className:"h-3 w-3 text-primary"}),(0,b.jsx)("span",{children:a.name}),(0,b.jsx)(y.f,{className:"h-3 w-3 text-text-muted ml-auto"})]},a.name))})]})]},c.name))})})]})},a.nodeId)}),j.length>0&&(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,b.jsxs)("span",{children:[X," node",1!==X?"s":""," scanned ·"," ",W," skill",1!==W?"s":""," discovered"]}),Y>0&&(0,b.jsxs)("span",{className:"text-danger",children:[Y," node",1!==Y?"s":""," unreachable"]})]})})]}),(0,b.jsx)(g.n,{open:!!N,onClose:()=>O(null),title:N?.name??"File",icon:(0,b.jsx)(v.f,{className:"h-5 w-5 text-primary"}),className:"max-w-3xl",children:(0,b.jsx)("pre",{className:"rounded border border-border bg-bg p-4 text-xs overflow-auto max-h-96 whitespace-pre-wrap",children:N?.content||"(empty)"})}),(0,b.jsx)(g.n,{open:!!P,onClose:()=>Q(null),title:"Publish to Library",description:P?.skill.name??"",icon:(0,b.jsx)(z.f,{className:"h-5 w-5 text-primary"}),children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,b.jsx)("span",{className:"text-accent",children:"*"})]}),(0,b.jsx)("input",{type:"text",value:R,onChange:a=>S(a.target.value),placeholder:"1.0.0",className:g.W})]}),P&&(0,b.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",P.nodeName]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Files:"})," ",P.skill.files.length," files"]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Tags:"})," ",["skill",...P.skill.tags].join(", ")]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,b.jsx)(d.K,{variant:"secondary",size:"sm",onClick:()=>Q(null),children:"Cancel"}),(0,b.jsx)(d.K,{size:"sm",onClick:()=>void $(),disabled:T||!R,children:T?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(z.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],9121)}];
1
+ module.exports=[9121,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(68415),e=a.i(58299),f=a.i(49521),g=a.i(85063),h=a.i(46997),i=a.i(8897),j=a.i(5050);let k=(0,j.createServerReference)("406e9fb1ff68519dad667983c0f18810ad4d8c82d7",j.callServer,void 0,j.findSourceMapURL,"scanSkills");var l=a.i(8387),m=a.i(73771),n=a.i(33855),o=a.i(19783),p=a.i(33540),q=a.i(92965),r=a.i(34532),s=a.i(64831);let t={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};t.node;let u=(0,s.f)(t);var v=a.i(40260),w=a.i(89027),x=a.i(41146),y=a.i(55681),z=a.i(1661),A=a.i(75160),B=a.i(90702),C=a.i(13412),D=a.i(11134);a.s(["default",0,function(){let{activeNode:a}=(0,i.l)(),[j,s]=(0,c.useState)([]),[t,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(""),[L,M]=(0,c.useState)(new Set),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)(null),[R,S]=(0,c.useState)(""),[T,U]=(0,c.useState)(!1),V=(0,c.useCallback)(async()=>{E(!0),s([]),G(null);let b=Date.now();try{let b=await k(a.id);if(b.success&&Array.isArray(b.data)){let a=b.data.map(a=>({...a,status:"error"===a.status?"error":"done",skills:a.skills.map(a=>({...a,files:a.files.map(a=>"string"==typeof a?{name:a,content:""}:a)}))}));s(a);let c=new Set(a.filter(a=>a.skills.length>0).map(a=>a.nodeId));M(c.size>0?c:new Set(a.map(a=>a.nodeId)))}else G(b.error?.message??"Scan returned unsuccessful response")}catch(b){let a=b instanceof Error?b.message:"Scan request failed";G(a)}finally{let a=Date.now()-b;a<1500&&await new Promise(b=>setTimeout(b,1500-a)),E(!1),I(!0)}},[a]);(0,c.useEffect)(()=>{a&&V()},[a,V]);let W=j.reduce((a,b)=>a+("done"===b.status?b.skills.length:0),0),X=j.filter(a=>"done"===a.status).length,Y=j.filter(a=>"error"===a.status).length,Z=a=>{if(!J)return!0;let b=J.toLowerCase();return a.name.toLowerCase().includes(b)||a.description.toLowerCase().includes(b)||a.tags.some(a=>a.toLowerCase().includes(b))},$=async()=>{if(P&&R){U(!0);try{let a={name:P.skill.name,version:R,description:P.skill.description,author:P.skill.author,entryPoint:P.skill.entryPoint,dependencies:P.skill.dependencies,tags:P.skill.tags},b={};for(let a of P.skill.files)b[a.name]=a.content;let c=JSON.stringify({manifest:a,files:b},null,2);await h.f.library.files.create({name:`${P.skill.name} v${R}`,fileName:`${P.skill.name}-${R}.json`,mimeType:"application/x-magnus-skill",content:c,tags:["skill",...P.skill.tags]}),Q(null),S("")}catch{}finally{U(!1)}}};return(0,b.jsxs)(m.U,{className:"space-y-6",children:[(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Skills"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage Hermes Agent skills across your fleet"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[H&&!t&&(0,b.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[j.length," node",1!==j.length?"s":""," · ",W," skill",1!==W?"s":"",Y>0&&` \xb7 ${Y} error${1!==Y?"s":""}`]}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",onClick:()=>void V(),disabled:t,children:[(0,b.jsx)(o.f,{className:(0,l.f)("h-3.5 w-3.5 mr-1.5",t&&"animate-spin")}),t?"Scanning...":"Rescan"]})]})]})}),t&&(0,b.jsx)(m.z,{children:(0,b.jsx)(n.f,{title:"Scanning Nodes for Skills",description:"Probing all online nodes...",nodes:j.map(a=>({nodeId:a.nodeId,nodeName:a.nodeName,status:a.status,error:a.error})),scanning:!0})}),!t&&H&&W>0&&(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(p.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,b.jsx)("input",{type:"text",placeholder:"Search skills by name, description, or tag...",value:J,onChange:a=>K(a.target.value),className:(0,l.f)(g.W,"pl-9")})]})}),!t&&H&&F&&(0,b.jsx)(m.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(B.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,b.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:F}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void V(),children:[(0,b.jsx)(o.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!t&&H&&!F&&(0,b.jsxs)(b.Fragment,{children:[0===j.length?(0,b.jsx)(m.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(r.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,b.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):j.map(a=>{let c=L.has(a.nodeId),g=a.skills.filter(Z);return(0,b.jsx)(m.z,{children:(0,b.jsxs)(f.N,{className:"overflow-hidden",children:[(0,b.jsxs)("button",{onClick:()=>{var b;return b=a.nodeId,void M(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,b.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,b.jsx)(r.f,{className:"h-4 w-4 text-primary"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:a.nodeName}),"done"===a.status&&(0,b.jsxs)(e.t,{variant:a.skills.length>0?"success":"default",children:[a.skills.length," skill",1!==a.skills.length?"s":""]}),"error"===a.status&&(0,b.jsx)(e.t,{variant:"danger",children:"Error"})]}),"error"===a.status&&a.error&&(0,b.jsx)("p",{className:"text-[11px] text-danger mt-0.5 truncate",children:a.error}),"done"===a.status&&0===a.skills.length&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No skills installed on this node"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===a.status?(0,b.jsx)(C.f,{className:"h-4 w-4 text-success"}):(0,b.jsx)(D.f,{className:"h-4 w-4 text-danger"}),c?(0,b.jsx)(w.f,{className:"h-4 w-4 text-text-muted"}):(0,b.jsx)(x.f,{className:"h-4 w-4 text-text-muted"})]})]}),c&&"done"===a.status&&(0,b.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===g.length?(0,b.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:0===a.skills.length?"No skills installed on this node. Deploy skills from the Library.":"No skills match your search on this node."})}):(0,b.jsx)("div",{className:"divide-y divide-border/30",children:g.map(c=>(0,b.jsxs)("div",{className:"p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(q.f,{className:"h-4 w-4 text-primary"}),(0,b.jsx)("span",{className:"text-xs font-bold",children:c.name}),(0,b.jsx)(e.t,{variant:"info",children:c.version})]}),(0,b.jsxs)(d.K,{size:"sm",variant:"secondary",onClick:()=>{Q({skill:c,nodeId:a.nodeId,nodeName:a.nodeName}),S(c.version)},children:[(0,b.jsx)(z.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),c.description&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:c.description}),c.tags.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1",children:c.tags.map(a=>(0,b.jsxs)(e.t,{variant:"default",children:[(0,b.jsx)(u,{className:"h-2.5 w-2.5 mr-1"}),a]},a))}),(0,b.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Author"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.author||"—"})]}),(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Entry Point"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.entryPoint||"—"})]}),(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Dependencies"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.dependencies.length>0?c.dependencies.join(", "):"—"})]})]}),c.files.length>0&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1.5",children:["Files (",c.files.length,")"]}),(0,b.jsx)("div",{className:"space-y-1",children:c.files.map(a=>(0,b.jsxs)("button",{onClick:()=>O(a),className:"flex items-center gap-2 rounded border border-border/50 px-3 py-1.5 text-xs hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)] transition-all w-full text-left",children:[(0,b.jsx)(v.f,{className:"h-3 w-3 text-primary"}),(0,b.jsx)("span",{children:a.name}),(0,b.jsx)(y.f,{className:"h-3 w-3 text-text-muted ml-auto"})]},a.name))})]})]},c.name))})})]})},a.nodeId)}),j.length>0&&(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,b.jsxs)("span",{children:[X," node",1!==X?"s":""," scanned ·"," ",W," skill",1!==W?"s":""," discovered"]}),Y>0&&(0,b.jsxs)("span",{className:"text-danger",children:[Y," node",1!==Y?"s":""," unreachable"]})]})})]}),(0,b.jsx)(g.n,{open:!!N,onClose:()=>O(null),title:N?.name??"File",icon:(0,b.jsx)(v.f,{className:"h-5 w-5 text-primary"}),className:"max-w-3xl",children:(0,b.jsx)("pre",{className:"rounded border border-border bg-bg p-4 text-xs overflow-auto max-h-96 whitespace-pre-wrap",children:N?.content||"(empty)"})}),(0,b.jsx)(g.n,{open:!!P,onClose:()=>Q(null),title:"Publish to Library",description:P?.skill.name??"",icon:(0,b.jsx)(z.f,{className:"h-5 w-5 text-primary"}),children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,b.jsx)("span",{className:"text-accent",children:"*"})]}),(0,b.jsx)("input",{type:"text",value:R,onChange:a=>S(a.target.value),placeholder:"1.0.0",className:g.W})]}),P&&(0,b.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",P.nodeName]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Files:"})," ",P.skill.files.length," files"]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Tags:"})," ",["skill",...P.skill.tags].join(", ")]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,b.jsx)(d.K,{variant:"secondary",size:"sm",onClick:()=>Q(null),children:"Cancel"}),(0,b.jsx)(d.K,{size:"sm",onClick:()=>void $(),disabled:T||!R,children:T?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(z.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],9121)}];
2
2
 
3
3
  //# sourceMappingURL=apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.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:"profile-import-hermes"===c?1e5: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.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)}];
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/H-K1jxmL5UpxX60_nMjZt/_buildManifest.js",
11
- "static/H-K1jxmL5UpxX60_nMjZt/_ssgManifest.js",
12
- "static/H-K1jxmL5UpxX60_nMjZt/_clientMiddlewareManifest.js"
10
+ "static/K7jBkPHkVdA6DcoFY4Cut/_buildManifest.js",
11
+ "static/K7jBkPHkVdA6DcoFY4Cut/_ssgManifest.js",
12
+ "static/K7jBkPHkVdA6DcoFY4Cut/_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,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;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\":\"H-K1jxmL5UpxX60_nMjZt\"}\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
+ <!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,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;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\":\"K7jBkPHkVdA6DcoFY4Cut\"}\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": "0caf64b22784842d6e0acca42c1bf64b",
3
- "previewModeSigningKey": "104f2a01169482399811c76c2661cde59cf442384e614f547fcaf90f8668da26",
4
- "previewModeEncryptionKey": "47f4ac9f6bf7a2397ea9ab6a0c6555171e62d5476cafa99ec3761d78a3c54bb9"
2
+ "previewModeId": "79a9d31b187fb89f87a3d9750b8cd2b0",
3
+ "previewModeSigningKey": "5428162471df4f814ddda91872b7168c30087de2ac88523c1d415989a69f32c2",
4
+ "previewModeEncryptionKey": "f702f756c5c1dfbf11e7c8160265203f730361121bb7ac104adc0a6877b4b4b7"
5
5
  }
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {\n \"40329e45ad385f8c8c378eaa07e6844a5e1595766c\": {\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 \"4058d77b722aabb45f48450d26171897c3c4ecff68\": {\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\": \"CB6GqOgO6Zj9P5rq29XdL41F2HPdFDoBtqSnpfYpL18=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {\n \"4022fa8b9fc62b5f5dc623e908fc1e1d90bd10e6bb\": {\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 \"406e9fb1ff68519dad667983c0f18810ad4d8c82d7\": {\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\": \"iq0+dQ5t2yQ1w+GsmMyd+Aur3AaIikq2BwKaKcwDlUE=\"\n}"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "node": {
3
- "40329e45ad385f8c8c378eaa07e6844a5e1595766c": {
3
+ "4022fa8b9fc62b5f5dc623e908fc1e1d90bd10e6bb": {
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
- "4058d77b722aabb45f48450d26171897c3c4ecff68": {
13
+ "406e9fb1ff68519dad667983c0f18810ad4d8c82d7": {
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": "CB6GqOgO6Zj9P5rq29XdL41F2HPdFDoBtqSnpfYpL18="
25
+ "encryptionKey": "iq0+dQ5t2yQ1w+GsmMyd+Aur3AaIikq2BwKaKcwDlUE="
26
26
  }
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67683,e=>{"use strict";var a=e.i(43476),s=e.i(22016),r=e.i(53138),t=e.i(16306);e.s(["f",0,function({summary:e,showAction:n=!0}){let i=e.nodes.filter(e=>e.tailscale?.requiresRenewal).sort((e,a)=>e.tailscale?.expired!==a.tailscale?.expired?e.tailscale?.expired?-1:1:(e.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER)-(a.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER));if(0===i.length)return null;let l=i.some(e=>e.tailscale?.expired),o=l?t.f:r.f,c=l?{panel:"border-danger/40 bg-danger/5",rail:"bg-danger",icon:"bg-danger/10 text-danger",text:"text-danger",chip:"border-danger/30 text-danger",action:"border-danger/40 text-danger hover:bg-danger/10"}:{panel:"border-warning/40 bg-warning/5",rail:"bg-warning",icon:"bg-warning/10 text-warning",text:"text-warning",chip:"border-warning/30 text-warning",action:"border-warning/40 text-warning hover:bg-warning/10"};return(0,a.jsxs)("section",{id:"tailscale-renewal",role:"alert","aria-label":"Tailscale renewal alert",className:`relative overflow-hidden rounded border px-4 py-3 ${c.panel}`,children:[(0,a.jsx)("div",{className:`absolute inset-y-0 left-0 w-0.5 ${c.rail}`}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,a.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded ${c.icon}`,children:(0,a.jsx)(o,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:`text-xs font-bold uppercase tracking-[0.14em] ${c.text}`,children:l?"Tailscale access expired":"Tailscale renewal due"}),(0,a.jsxs)("p",{className:"mt-1 text-[11px] text-text-muted",children:[i.length," node ",1===i.length?"key needs":"keys need"," renewal within ",e.warningDays," days. Renew before tailnet access is interrupted."]}),(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:i.map(e=>(0,a.jsxs)("span",{title:e.tailscale?.keyExpiry?`Expires ${e.tailscale.keyExpiry}`:void 0,className:`inline-flex items-center gap-1 rounded border bg-background/40 px-2 py-0.5 font-mono text-[10px] ${c.chip}`,children:[(0,a.jsx)("span",{className:"font-semibold",children:e.name}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,a.jsx)("span",{children:e.tailscale?.expired?"expired":`${e.tailscale?.daysRemaining??"?"}d`})]},e.id))})]})]}),n&&(0,a.jsx)(s.default,{href:"/nodes#tailscale-renewal",className:`shrink-0 self-start rounded border px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider transition-colors sm:self-center ${c.action}`,children:"Review nodes"})]})]})}])},53721,e=>{"use strict";var a=e.i(43476),s=e.i(53138),r=e.i(46670),t=e.i(63646);e.s(["x",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsx)("span",{title:(0,t.K)(e),"data-testid":"upgrade-readiness-badge",children:(0,a.jsxs)(r.t,{variant:"warning",children:[(0,a.jsx)(s.f,{className:"mr-1 inline h-3 w-3"}),"Upgrade blocked (",e.problems.length,")"]})})},"a",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-[11px]","data-testid":"upgrade-readiness-panel",children:[(0,a.jsxs)("p",{className:"flex items-center gap-2 font-bold uppercase tracking-wider text-warning",children:[(0,a.jsx)(s.f,{className:"h-3.5 w-3.5"})," This node could not take an agent upgrade now"]}),(0,a.jsx)("ul",{className:"mt-2 space-y-2",children:e.problems.map(e=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("p",{className:"font-medium text-text",children:[(0,a.jsx)("span",{className:"num",children:e.code}),": ",e.detail]}),(0,a.jsx)("p",{className:"text-text-muted",children:e.remedy})]},`${e.code}-${e.detail}`))})]})}])},46670,e=>{"use strict";var a=e.i(43476),s=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},t={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:o=!1}){return(0,a.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,a.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",t[n])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",t[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var a=e.i(43476),s=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let t=(0,s.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let c={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:s=100,tone:r,thresholds:t=o.q,label:n,size:l="xs",showValue:m=!1,valueLabel:u,glow:h,className:p,testId:g}){let f="number"==typeof e&&Number.isFinite(e),v=f?Math.max(0,Math.min(100,e/(s||1)*100)):0,j=r??(f?(0,o.Z)(v,t):"muted"),b=h||!r&&f&&v>=t.warn,N=u??(f?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,a.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":g,children:[(0,a.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":f?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,a.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[j],b&&c[j])})}),m&&(0,a.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",f?o.T[j]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function u({values:e,tone:s="primary",width:r=160,height:t=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:x=!0,emptyLabel:h="not enough data",className:p,testId:g,label:f,stretch:v=!1}){let j=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,a.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":g,children:h});let b=o.v[s],N=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),w=t-4,y=r/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,_=e.map((e,a)=>[a*y,k(e)]),E=_.map(([e,a])=>`${e.toFixed(1)},${a.toFixed(1)}`).join(" "),C=_[_.length-1];return(0,a.jsxs)("svg",{width:v?"100%":r,height:t,viewBox:`0 0 ${r} ${t}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":g,role:f?"img":void 0,"aria-label":f,"aria-hidden":!f||void 0,children:[n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:j,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,a.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,a.jsx)("polygon",{points:`0,${t} ${E} ${r},${t}`,fill:`url(#${j})`})]}),void 0!==d&&(0,a.jsx)("line",{x1:0,x2:r,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,a.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:E}),x&&!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,u],55427),e.s(["N",0,function({title:e,description:s,children:r,className:t,action:n,tone:i,corners:o=!1,...c}){return(0,a.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:s,action:n,className:t,children:r})},"n",0,function({label:e,value:s,icon:r,trend:c,spark:d,meter:m,delta:h,tone:p="primary",className:g,testId:f}){let v=!h||h.value>=0===(h.positiveIsGood??!0);return(0,a.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",g),testId:f,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,a.jsx)("span",{className:"text-primary/60",children:r})]}),(0,a.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,a.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":o.T[p]),children:s}),h&&0!==h.value&&(0,a.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[h.value>0?(0,a.jsx)(n.f,{className:"h-3 w-3"}):(0,a.jsx)(t,{className:"h-3 w-3"}),Math.abs(h.value).toFixed(+!Number.isInteger(h.value)),h.unit]})]}),c&&(0,a.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==m&&(0,a.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,a.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,a.jsx)(u,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);let t={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:x,description:m,icon:u,action:h,as:p="div",padding:g="md",testId:f,className:v,children:j,...b}){return(0,a.jsxs)(p,{...b,"data-testid":f??b["data-testid"],className:(0,s.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[g],o&&"panel-corners",o&&t[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||h||u)&&(0,a.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[u&&(0,a.jsx)("span",{className:(0,s.f)("mt-0.5 shrink-0",r.T[e]),children:u}),(0,a.jsxs)("div",{className:"min-w-0",children:[x&&(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,a.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),h]}),j]})}])},73404,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);e.s(["f",0,function({title:e,eyebrow:t,description:n,icon:i,actions:l,status:o,tone:c="primary",className:d,testId:x}){return(0,a.jsxs)("div",{"data-testid":x,className:(0,s.f)("flex flex-wrap items-end justify-between gap-4",d),children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i&&(0,a.jsx)("span",{"aria-hidden":"true",className:(0,s.f)("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-panel border bg-surface","accent"===c?"border-accent/40 shadow-[0_0_14px_var(--color-glow-accent)]":"border-primary/40 shadow-[0_0_14px_var(--color-glow)]",r.T[c]),children:i}),(0,a.jsxs)("div",{className:"min-w-0",children:[t&&(0,a.jsxs)("p",{className:(0,s.f)("mb-1 text-[10px] font-medium uppercase tracking-[0.3em]",r.T[c],"opacity-80"),children:[(0,a.jsx)("span",{"aria-hidden":"true",children:"// "}),t]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)("h1",{className:(0,s.f)("text-xl font-bold uppercase tracking-wider",r.T[c],r.z[c]),children:e}),o]}),n&&(0,a.jsx)("p",{className:"mt-1 max-w-3xl text-xs text-text-muted",children:n})]})]}),l&&(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:l})]})}])},63376,e=>{"use strict";var a=e.i(43476);e.s(["z",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:`animate-page-in${s?` ${s}`:""}`,children:e})},"U",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:s,children:e})}])},65369,e=>{"use strict";var a=e.i(43476),s=e.i(78571);function r({className:e}){return(0,a.jsx)("div",{"aria-hidden":"true",className:(0,s.f)("skeleton h-3 w-full",e)})}e.s(["l",0,r,"g",0,function({count:e=4,className:t}){return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",t),children:Array.from({length:e},(e,s)=>(0,a.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,a.jsx)(r,{className:"h-2 w-1/2"}),(0,a.jsx)(r,{className:"mt-4 h-7 w-2/3"}),(0,a.jsx)(r,{className:"mt-3 h-1 w-full opacity-60"})]},s))})},"F",0,function({rows:e=5,cols:t=4,className:n}){return(0,a.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,a.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:t},(e,s)=>(0,a.jsx)(r,{className:"h-2 flex-1 opacity-60"},s))}),Array.from({length:e},(e,n)=>(0,a.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:t},(e,t)=>(0,a.jsx)(r,{className:(0,s.f)("h-3 flex-1",(n+t)%3==0&&"max-w-[60%]")},t))},n))]})},"Q",0,function({lines:e=3,className:t}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("space-y-2",t),children:Array.from({length:e},(e,s)=>(0,a.jsx)(r,{className:n[s%n.length]},s))})}])},75723,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(46670);let t={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},i=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:l,size:o="sm",className:c,label:d}){let x=(0,r.k)(e),m=l??i.has(e.toUpperCase()),u="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,a.jsxs)("span",{className:(0,s.f)("relative inline-flex shrink-0",u,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[m&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",n[x])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex rounded-full",u,t[x])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let a=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,a)).toFixed(1))} ${["B","KB","MB","GB","TB"][a]}`},"C",0,function(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}])},59439,e=>{e.v(a=>Promise.all(["static/chunks/1ixu-i6j99dj0.js"].map(a=>e.l(a))).then(()=>a(93309)))},37138,e=>{e.v(a=>Promise.all(["static/chunks/3h4dmpbixi6eo.js"].map(a=>e.l(a))).then(()=>a(99894)))},75775,e=>{"use strict";var a=e.i(56420);let s={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],75775)},57665,e=>{"use strict";var a=e.i(56420);let s={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],57665)},86207,14098,e=>{"use strict";var a=e.i(56420);let s={name:"refresh-ccw-dot",size:24,node:[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],86207);var t=e.i(43476),n=e.i(71645),i=e.i(68759),l=e.i(32568),o=e.i(82983),c=e.i(41220),d=e.i(32781);e.s(["E",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)([]),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(!0),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&(b(""),h(a?.role?.id??""),g(!0),w(!0),(async()=>{try{let e=await o.f.roles.list();m(e.data??[])}catch{b("Failed to load roles")}finally{w(!1)}})())},[e,a?.role?.id]);let y=async()=>{if(a){v(!0),b("");try{let e=a.role?.id;e&&e!==u&&await o.f.roles.unassign(e,{nodeIds:[a.id]}),u&&await o.f.roles.assign(u,{nodeIds:[a.id],defer:!p});let t=u?x.find(e=>e.id===u)??null:null;r(t),s()}catch(e){b(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(a?.role){v(!0),b("");try{await o.f.roles.unassign(a.role.id,{nodeIds:[a.id]}),r(null),s()}catch(e){b(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:_,title:a?.role?"Change Role":"Assign Role",description:a?`Node: ${a.name}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[N?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,t.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===x.length?(0,t.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.G,{label:"Role",children:(0,t.jsxs)("select",{value:u,onChange:e=>h(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"",children:"— No role —"}),x.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})}),u&&(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:p,onChange:e=>g(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,t.jsx)("div",{children:a?.role&&(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:f,children:"Unassign Role"})}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void y(),disabled:f||!u||0===x.length,icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":a?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)(""),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(""),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)("");(0,n.useEffect)(()=>{if(a){m(a.name);try{let e=JSON.parse(a.tags);h(e.join(", "))}catch{h("")}g(a.status),b("")}},[a]);let N=async()=>{if(a&&x.trim()){v(!0),b("");try{let e=u.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(a.id,{name:x.trim(),tags:e,status:p.toUpperCase()}),r(),s()}catch(e){b(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},w=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:w,title:"Edit Node",description:a?`${a.hostname}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:x,onChange:e=>m(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"Status",children:(0,t.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,t.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,t.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,t.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,t.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:u,onChange:e=>h(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:w,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void N(),disabled:f||!x.trim(),icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:a,onRegistered:s}){let[r,x]=(0,n.useState)(""),[m,u]=(0,n.useState)(""),[h,p]=(0,n.useState)("4100"),[g,f]=(0,n.useState)("linux"),[v,j]=(0,n.useState)("x86_64"),[b,N]=(0,n.useState)(""),[w,y]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),E=async()=>{if(r.trim()&&m.trim()){y(!0),_("");try{let e=b.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:r.trim(),hostname:m.trim(),ipAddress:m.trim(),port:Number(h)||4100,os:g,arch:v,tags:e,agentVersion:"2.1.3"}),s(),C()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{y(!1)}}},C=()=>{x(""),u(""),p("4100"),f("linux"),j("x86_64"),N(""),_(""),y(!1),a()};return(0,t.jsx)(l.n,{open:e,onClose:C,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Node Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:r,onChange:e=>x(e.target.value),placeholder:"web-server-01",className:l.W,autoFocus:!0})}),(0,t.jsx)(l.G,{label:"FQDN / Hostname",required:!0,children:(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"node-1.example.com",className:l.W})}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,t.jsx)(l.G,{label:"Port",children:(0,t.jsx)("input",{type:"number",value:h,onChange:e=>p(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"OS",children:(0,t.jsxs)("select",{value:g,onChange:e=>f(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"linux",children:"Linux"}),(0,t.jsx)("option",{value:"darwin",children:"macOS"}),(0,t.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,t.jsx)(l.G,{label:"Architecture",children:(0,t.jsxs)("select",{value:v,onChange:e=>j(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,t.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,t.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:b,onChange:e=>N(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void E(),disabled:w||!r.trim()||!m.trim(),icon:w?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:w?"Registering…":"Register Node"})]})]})})}],14098)},16306,e=>{"use strict";var a=e.i(56420);let s={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],16306)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67683,e=>{"use strict";var a=e.i(43476),s=e.i(22016),r=e.i(53138),t=e.i(16306);e.s(["f",0,function({summary:e,showAction:n=!0}){let i=e.nodes.filter(e=>e.tailscale?.requiresRenewal).sort((e,a)=>e.tailscale?.expired!==a.tailscale?.expired?e.tailscale?.expired?-1:1:(e.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER)-(a.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER));if(0===i.length)return null;let l=i.some(e=>e.tailscale?.expired),o=l?t.f:r.f,c=l?{panel:"border-danger/40 bg-danger/5",rail:"bg-danger",icon:"bg-danger/10 text-danger",text:"text-danger",chip:"border-danger/30 text-danger",action:"border-danger/40 text-danger hover:bg-danger/10"}:{panel:"border-warning/40 bg-warning/5",rail:"bg-warning",icon:"bg-warning/10 text-warning",text:"text-warning",chip:"border-warning/30 text-warning",action:"border-warning/40 text-warning hover:bg-warning/10"};return(0,a.jsxs)("section",{id:"tailscale-renewal",role:"alert","aria-label":"Tailscale renewal alert",className:`relative overflow-hidden rounded border px-4 py-3 ${c.panel}`,children:[(0,a.jsx)("div",{className:`absolute inset-y-0 left-0 w-0.5 ${c.rail}`}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,a.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded ${c.icon}`,children:(0,a.jsx)(o,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:`text-xs font-bold uppercase tracking-[0.14em] ${c.text}`,children:l?"Tailscale access expired":"Tailscale renewal due"}),(0,a.jsxs)("p",{className:"mt-1 text-[11px] text-text-muted",children:[i.length," node ",1===i.length?"key needs":"keys need"," renewal within ",e.warningDays," days. Renew before tailnet access is interrupted."]}),(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:i.map(e=>(0,a.jsxs)("span",{title:e.tailscale?.keyExpiry?`Expires ${e.tailscale.keyExpiry}`:void 0,className:`inline-flex items-center gap-1 rounded border bg-background/40 px-2 py-0.5 font-mono text-[10px] ${c.chip}`,children:[(0,a.jsx)("span",{className:"font-semibold",children:e.name}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,a.jsx)("span",{children:e.tailscale?.expired?"expired":`${e.tailscale?.daysRemaining??"?"}d`})]},e.id))})]})]}),n&&(0,a.jsx)(s.default,{href:"/nodes#tailscale-renewal",className:`shrink-0 self-start rounded border px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider transition-colors sm:self-center ${c.action}`,children:"Review nodes"})]})]})}])},53721,e=>{"use strict";var a=e.i(43476),s=e.i(53138),r=e.i(46670),t=e.i(63646);e.s(["x",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsx)("span",{title:(0,t.K)(e),"data-testid":"upgrade-readiness-badge",children:(0,a.jsxs)(r.t,{variant:"warning",children:[(0,a.jsx)(s.f,{className:"mr-1 inline h-3 w-3"}),"Upgrade blocked (",e.problems.length,")"]})})},"a",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-[11px]","data-testid":"upgrade-readiness-panel",children:[(0,a.jsxs)("p",{className:"flex items-center gap-2 font-bold uppercase tracking-wider text-warning",children:[(0,a.jsx)(s.f,{className:"h-3.5 w-3.5"})," This node could not take an agent upgrade now"]}),(0,a.jsx)("ul",{className:"mt-2 space-y-2",children:e.problems.map(e=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("p",{className:"font-medium text-text",children:[(0,a.jsx)("span",{className:"num",children:e.code}),": ",e.detail]}),(0,a.jsx)("p",{className:"text-text-muted",children:e.remedy})]},`${e.code}-${e.detail}`))})]})}])},46670,e=>{"use strict";var a=e.i(43476),s=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},t={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:o=!1}){return(0,a.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,a.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",t[n])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",t[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var a=e.i(43476),s=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let t=(0,s.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let c={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:s=100,tone:r,thresholds:t=o.q,label:n,size:l="xs",showValue:m=!1,valueLabel:u,glow:h,className:p,testId:g}){let f="number"==typeof e&&Number.isFinite(e),v=f?Math.max(0,Math.min(100,e/(s||1)*100)):0,j=r??(f?(0,o.Z)(v,t):"muted"),b=h||!r&&f&&v>=t.warn,N=u??(f?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,a.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":g,children:[(0,a.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":f?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,a.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[j],b&&c[j])})}),m&&(0,a.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",f?o.T[j]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function u({values:e,tone:s="primary",width:r=160,height:t=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:x=!0,emptyLabel:h="not enough data",className:p,testId:g,label:f,stretch:v=!1}){let j=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,a.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":g,children:h});let b=o.v[s],N=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),w=t-4,y=r/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,_=e.map((e,a)=>[a*y,k(e)]),E=_.map(([e,a])=>`${e.toFixed(1)},${a.toFixed(1)}`).join(" "),C=_[_.length-1];return(0,a.jsxs)("svg",{width:v?"100%":r,height:t,viewBox:`0 0 ${r} ${t}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":g,role:f?"img":void 0,"aria-label":f,"aria-hidden":!f||void 0,children:[n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:j,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,a.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,a.jsx)("polygon",{points:`0,${t} ${E} ${r},${t}`,fill:`url(#${j})`})]}),void 0!==d&&(0,a.jsx)("line",{x1:0,x2:r,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,a.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:E}),x&&!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,u],55427),e.s(["N",0,function({title:e,description:s,children:r,className:t,action:n,tone:i,corners:o=!1,...c}){return(0,a.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:s,action:n,className:t,children:r})},"n",0,function({label:e,value:s,icon:r,trend:c,spark:d,meter:m,delta:h,tone:p="primary",className:g,testId:f}){let v=!h||h.value>=0===(h.positiveIsGood??!0);return(0,a.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",g),testId:f,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,a.jsx)("span",{className:"text-primary/60",children:r})]}),(0,a.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,a.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":o.T[p]),children:s}),h&&0!==h.value&&(0,a.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[h.value>0?(0,a.jsx)(n.f,{className:"h-3 w-3"}):(0,a.jsx)(t,{className:"h-3 w-3"}),Math.abs(h.value).toFixed(+!Number.isInteger(h.value)),h.unit]})]}),c&&(0,a.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==m&&(0,a.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,a.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,a.jsx)(u,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);let t={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:x,description:m,icon:u,action:h,as:p="div",padding:g="md",testId:f,className:v,children:j,...b}){return(0,a.jsxs)(p,{...b,"data-testid":f??b["data-testid"],className:(0,s.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[g],o&&"panel-corners",o&&t[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||h||u)&&(0,a.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[u&&(0,a.jsx)("span",{className:(0,s.f)("mt-0.5 shrink-0",r.T[e]),children:u}),(0,a.jsxs)("div",{className:"min-w-0",children:[x&&(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,a.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),h]}),j]})}])},73404,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);e.s(["f",0,function({title:e,eyebrow:t,description:n,icon:i,actions:l,status:o,tone:c="primary",className:d,testId:x}){return(0,a.jsxs)("div",{"data-testid":x,className:(0,s.f)("flex flex-wrap items-end justify-between gap-4",d),children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i&&(0,a.jsx)("span",{"aria-hidden":"true",className:(0,s.f)("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-panel border bg-surface","accent"===c?"border-accent/40 shadow-[0_0_14px_var(--color-glow-accent)]":"border-primary/40 shadow-[0_0_14px_var(--color-glow)]",r.T[c]),children:i}),(0,a.jsxs)("div",{className:"min-w-0",children:[t&&(0,a.jsxs)("p",{className:(0,s.f)("mb-1 text-[10px] font-medium uppercase tracking-[0.3em]",r.T[c],"opacity-80"),children:[(0,a.jsx)("span",{"aria-hidden":"true",children:"// "}),t]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)("h1",{className:(0,s.f)("text-xl font-bold uppercase tracking-wider",r.T[c],r.z[c]),children:e}),o]}),n&&(0,a.jsx)("p",{className:"mt-1 max-w-3xl text-xs text-text-muted",children:n})]})]}),l&&(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:l})]})}])},63376,e=>{"use strict";var a=e.i(43476);e.s(["z",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:`animate-page-in${s?` ${s}`:""}`,children:e})},"U",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:s,children:e})}])},65369,e=>{"use strict";var a=e.i(43476),s=e.i(78571);function r({className:e}){return(0,a.jsx)("div",{"aria-hidden":"true",className:(0,s.f)("skeleton h-3 w-full",e)})}e.s(["l",0,r,"g",0,function({count:e=4,className:t}){return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",t),children:Array.from({length:e},(e,s)=>(0,a.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,a.jsx)(r,{className:"h-2 w-1/2"}),(0,a.jsx)(r,{className:"mt-4 h-7 w-2/3"}),(0,a.jsx)(r,{className:"mt-3 h-1 w-full opacity-60"})]},s))})},"F",0,function({rows:e=5,cols:t=4,className:n}){return(0,a.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,a.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:t},(e,s)=>(0,a.jsx)(r,{className:"h-2 flex-1 opacity-60"},s))}),Array.from({length:e},(e,n)=>(0,a.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:t},(e,t)=>(0,a.jsx)(r,{className:(0,s.f)("h-3 flex-1",(n+t)%3==0&&"max-w-[60%]")},t))},n))]})},"Q",0,function({lines:e=3,className:t}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("space-y-2",t),children:Array.from({length:e},(e,s)=>(0,a.jsx)(r,{className:n[s%n.length]},s))})}])},75723,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(46670);let t={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},i=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:l,size:o="sm",className:c,label:d}){let x=(0,r.k)(e),m=l??i.has(e.toUpperCase()),u="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,a.jsxs)("span",{className:(0,s.f)("relative inline-flex shrink-0",u,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[m&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",n[x])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex rounded-full",u,t[x])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let a=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,a)).toFixed(1))} ${["B","KB","MB","GB","TB"][a]}`},"C",0,function(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}])},59439,e=>{e.v(a=>Promise.all(["static/chunks/1ixu-i6j99dj0.js"].map(a=>e.l(a))).then(()=>a(93309)))},37138,e=>{e.v(a=>Promise.all(["static/chunks/3h4dmpbixi6eo.js"].map(a=>e.l(a))).then(()=>a(99894)))},75775,e=>{"use strict";var a=e.i(56420);let s={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],75775)},57665,e=>{"use strict";var a=e.i(56420);let s={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],57665)},86207,14098,e=>{"use strict";var a=e.i(56420);let s={name:"refresh-ccw-dot",size:24,node:[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],86207);var t=e.i(43476),n=e.i(71645),i=e.i(68759),l=e.i(32568),o=e.i(82983),c=e.i(41220),d=e.i(32781);e.s(["E",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)([]),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(!0),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&(b(""),h(a?.role?.id??""),g(!0),w(!0),(async()=>{try{let e=await o.f.roles.list();m(e.data??[])}catch{b("Failed to load roles")}finally{w(!1)}})())},[e,a?.role?.id]);let y=async()=>{if(a){v(!0),b("");try{let e=a.role?.id;e&&e!==u&&await o.f.roles.unassign(e,{nodeIds:[a.id]}),u&&await o.f.roles.assign(u,{nodeIds:[a.id],defer:!p});let t=u?x.find(e=>e.id===u)??null:null;r(t),s()}catch(e){b(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(a?.role){v(!0),b("");try{await o.f.roles.unassign(a.role.id,{nodeIds:[a.id]}),r(null),s()}catch(e){b(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:_,title:a?.role?"Change Role":"Assign Role",description:a?`Node: ${a.name}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[N?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,t.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===x.length?(0,t.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.G,{label:"Role",children:(0,t.jsxs)("select",{value:u,onChange:e=>h(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"",children:"— No role —"}),x.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})}),u&&(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:p,onChange:e=>g(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,t.jsx)("div",{children:a?.role&&(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:f,children:"Unassign Role"})}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void y(),disabled:f||!u||0===x.length,icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":a?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)(""),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(""),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)("");(0,n.useEffect)(()=>{if(a){m(a.name);try{let e=JSON.parse(a.tags);h(e.join(", "))}catch{h("")}g(a.status),b("")}},[a]);let N=async()=>{if(a&&x.trim()){v(!0),b("");try{let e=u.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(a.id,{name:x.trim(),tags:e,status:p.toUpperCase()}),r(),s()}catch(e){b(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},w=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:w,title:"Edit Node",description:a?`${a.hostname}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:x,onChange:e=>m(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"Status",children:(0,t.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,t.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,t.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,t.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,t.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:u,onChange:e=>h(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:w,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void N(),disabled:f||!x.trim(),icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:a,onRegistered:s}){let[r,x]=(0,n.useState)(""),[m,u]=(0,n.useState)(""),[h,p]=(0,n.useState)("4100"),[g,f]=(0,n.useState)("linux"),[v,j]=(0,n.useState)("x86_64"),[b,N]=(0,n.useState)(""),[w,y]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),E=async()=>{if(r.trim()&&m.trim()){y(!0),_("");try{let e=b.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:r.trim(),hostname:m.trim(),ipAddress:m.trim(),port:Number(h)||4100,os:g,arch:v,tags:e,agentVersion:"2.2.1"}),s(),C()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{y(!1)}}},C=()=>{x(""),u(""),p("4100"),f("linux"),j("x86_64"),N(""),_(""),y(!1),a()};return(0,t.jsx)(l.n,{open:e,onClose:C,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Node Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:r,onChange:e=>x(e.target.value),placeholder:"web-server-01",className:l.W,autoFocus:!0})}),(0,t.jsx)(l.G,{label:"FQDN / Hostname",required:!0,children:(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"node-1.example.com",className:l.W})}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,t.jsx)(l.G,{label:"Port",children:(0,t.jsx)("input",{type:"number",value:h,onChange:e=>p(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"OS",children:(0,t.jsxs)("select",{value:g,onChange:e=>f(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"linux",children:"Linux"}),(0,t.jsx)("option",{value:"darwin",children:"macOS"}),(0,t.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,t.jsx)(l.G,{label:"Architecture",children:(0,t.jsxs)("select",{value:v,onChange:e=>j(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,t.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,t.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:b,onChange:e=>N(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void E(),disabled:w||!r.trim()||!m.trim(),icon:w?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:w?"Registering…":"Register Node"})]})]})})}],14098)},16306,e=>{"use strict";var a=e.i(56420);let s={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],16306)}]);