@hivemagnus/magnus-ui 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/apps/dashboard/.next/BUILD_ID +1 -1
- package/dist/app/apps/dashboard/.next/build-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/required-server-files.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/callback/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/callback/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/configured/route.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/configured/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/start/route.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/start/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/login/route.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/me/route.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/api/auth/me/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/migrate/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/migrate/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js +10 -10
- package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/health/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/health/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js +10 -10
- package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/internal/resource-enrollment/drain/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/internal/resource-enrollment/drain/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js +9 -9
- package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/close/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/close/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/input/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/input/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/join/route.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/join/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js +11 -11
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/promote/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/promote/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/resize/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/resize/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/share/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/share/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/stream/route.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/ws/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/ws/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/icon.svg/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page.js +8 -8
- package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js +10 -10
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page/react-loadable-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page.js +8 -8
- package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js +8 -8
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__16ij4oi2sj-rr._.js → [externals]__07125xgxxkrmn._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__0vlmfz9h_vir0._.js → [externals]__08j7y99hz37g-._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__12udgi92o71ao._.js → [externals]__0l4y89lfm51h_._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__187hm276lglag._.js → [externals]__0lm2eonzt5e-n._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__0o-3eqbrxp73c._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__1fagjmvrmd51m._.js → [externals]__0s5d7qbbgsrbp._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__0yh7awh74vlk6._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__1yeo563zmacjg._.js → [externals]__1-md0e9mkzms3._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__13c6h55dkc77o._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__1ke3390r2lfb7._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__1ljkeas3ips49._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__1v63fvy5rgicz._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0--rxyhflqsbo._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0-knu9bydwbtz._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0spov3xxbckem._.js → [root-of-the-server]__002uuaad37fgd._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__1r73umu2qsqkz._.js → [root-of-the-server]__06wc5n9u6d01v._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__089rr-xrs6h75._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0sehen5wadgh6._.js → [root-of-the-server]__0jo0_v4a3iv6x._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0tvu-qqx2mw-8._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0u78z-wir0ch1._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0us-jb6ivzh6v._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0ywmf3079vsm1._.js +206 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0uj0ijk3ozu-l._.js → [root-of-the-server]__1-i40j-a5fvgn._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__10ehhrgboegrr._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__12syybvws891m._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__13gid0g7izgib._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__13sz5u4ns29is._.js +146 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1c8lf7j2769rc._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__16rqx2oazfcv5._.js → [root-of-the-server]__1d_bxkf6o9et4._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1i71tta3bd-6m._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1l8x7rgd8-_sp._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1lrs0igd_ft_l._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1q7qiwntinmxz._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1sjxxxibwo1v4._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_hive-login_ts_0ab2iq7-rpy13._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_0_mv4bximoofw._.js +141 -0
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_0u9pfz6tlfjqv._.js +141 -0
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_1ovxb0oub71q-._.js +141 -0
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_undici_0153f0xi5kile._.js +127 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0128_ze9pmztw._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1cnr5ucuq-tas._.js → [root-of-the-server]__08sgyyf_y8ab8._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1477x3csbkdfa._.js → [root-of-the-server]__0fd124732a296._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0h5dzm0rlx_z1._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ht0ocgz-d31c._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0i-4cjf683jae._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0l8uocvha6qpv._.js → [root-of-the-server]__0l_40ku91gj06._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__19kgtx10ey2jw._.js → [root-of-the-server]__0o-7qp27a3xh8._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0iw2gybtg_uwp._.js → [root-of-the-server]__0rdhprzu2tmon._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0p95c61y11y6q._.js → [root-of-the-server]__0vobkt4r9l8at._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0z6dblsnzx20l._.js → [root-of-the-server]__11pe-l2-ko65_._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__105vglixsp00a._.js → [root-of-the-server]__12r7996-2c6t_._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__162yt_hrj1icm._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__03u0iwrsol58b._.js → [root-of-the-server]__19dmibalml_q2._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1iieuibgbitpd._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1s0tp902hhgv5._.js → [root-of-the-server]__1jf1vrvlq098r._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0ryz_kj2m4sns._.js → [root-of-the-server]__1kdv551v6bnx7._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1cdwjg6sttmzq._.js → [root-of-the-server]__1m-u4vj1e4vqm._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1n3nkuw3uylha._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1qz7i1r5-orql._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1sf37s9j4pls1._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0cjs7a6nlno3a._.js → [root-of-the-server]__1vxz67uivrc4-._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0l8hx5fmmz73w._.js → [root-of-the-server]__1x5meaufjq2k7._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__12tzy7fpv7mea._.js → [root-of-the-server]__1xfbgvp27t8yu._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1xjrbdi2jn6ud._.js +4 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1yxkpa3xs9gcg._.js → _012-2t-30l6d8._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_02sxg7r2xx3fw._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1_5ydzz2hi9_c._.js → _03dvnngovohcl._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0jhh2ztfg6rgb._.js → _04b4h6ckhi7bi._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_05momtnhs2or_._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0e-s84q8eqga3._.js → _09eslmbj9l4sq._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0eccfdt1lz-7r._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1xymezo7pcrgb._.js → _0f2d8_ost6s2f._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0_pjaohdsh5p9._.js → _0f89fican-_s9._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0fge-mr3ok0j9._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0fhe8hp2cn35w._.js → _0ksgpljzuxnqa._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1-ysyexk6rh9t._.js → _0m10ijdnp_m7u._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1xgz0jsq73xj8._.js → _0mrryagvuzvz1._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_10hx-gsbkebi3._.js → _0oa-ld-qc1g36._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0pncxy--oro8t._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1-4-xizktvrze._.js → _0raw_gngl90-7._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1f2r0in30xk5i._.js → _0tyfybw4cwmxv._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0vz8cqmro1opv._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0pxjzd07f205t._.js → _0wh_e2bpxcaf4._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_080zganrbpmzz._.js → _0wo8_14v-72ut._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0x273l378qwem._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0zrtbhvhztqnh._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0zsjpnu4iitoz._.js +266 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0k4v1bddv_bdg._.js → _116hh5tv78jrt._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_168tm22non34k._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1bmfhogvdqhft._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0eqx_tz6b9y33._.js → _1bybbae25qp_3._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1hu2vcfi1zpc8._.js → _1cz7r_30vhnj_._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1crxncy8l18-2._.js → _1gea_-jzyj2pi._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_14o-myioxrzt-._.js → _1ircn2sooizal._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1g-jay7_uu0tz._.js → _1ktxzfxegaxf2._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1ml_bvfb1fitq._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1nd-0is101z6p._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1q6qxfm-22i_e._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1t81cm4foc6ob._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1uyq8tg0700tm._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_083obx7eqpdb6._.js → _1v0z-sm708czr._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0l42oomzbf_88._.js → _1ws-h-7v_11t8._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1kv2zqgc5a63f._.js → _20ln5i8p8muqj._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_anomalies_[anomalyId]_page_tsx_1zti_bnloknef._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_anomalies_page_tsx_1oqqex9du4yhn._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_anomalies_remediation_page_tsx_179m33swiclif._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_installations_page_tsx_0nvqgacugy6nf._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_page_tsx_1hrp-k2d3kx3m._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_profiles_page_tsx_19x7vyz9z-z1n._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_audit_audit-client_tsx_0iyab_tlw5yus._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_codex_installations_page_tsx_02-8w_tbh3lp9._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_codex_page_tsx_113aas0vmxegr._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_commands_page_tsx_1h8a4cebpdfir._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_dashboard-client_tsx_0o_8papeie86c._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_files_page_tsx_1kls9-qinldks._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_fleet-map_fleet-map-client_tsx_0o9ktvw_xeu8a._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_fleet-readiness_page_tsx_129clnb6oplu7._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_governor_operations_page_tsx_1tvdkgil8mlgk._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_library_library-client_tsx_066uzpkniuhuu._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_logs_page_tsx_0473-hcpj1mqr._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_mission-control_page_tsx_0crgxncex_u3w._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_[nodeId]_page_tsx_1q7fqu18oklzc._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_nodes-client_tsx_0pt4iarhpqbgn._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_orchestra_installations_page_tsx_1a_r4dxubcfwl._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_orchestra_page_tsx_0qja96c0x9x9w._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_orchestra_profiles_page_tsx_0c4catjeix-_z._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_orchestra_web-gateway_page_tsx_1fz12np0wk27t._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_retention_page_tsx_10fa1z72z3kbv._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_roles_roles-client_tsx_1ivvp_kqt5io0._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_rollouts_page_tsx_0oyn4e70wmd7e._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_security-fusion_page_tsx_0d314q7yh6fx8._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_webhooks_[id]_page_tsx_0e3xxr7r-st04._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_webhooks_page_tsx_0fye89fc60bqf._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_webhooks_webhook-form_tsx_02z3be5wx7-cb._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_codex_codex-installation-card_tsx_20v0b-0t6my-y._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_nodes_tailscale-expiry-alert_tsx_1ll2-i32ej6c2._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_orchestra_installation-actions_tsx_1iwznlvwl10o2._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_ui_card_tsx_1pngl2ib-xo5t._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_ui_node-selector_tsx_1ci6ldznpaofq._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_11f8_4aw8657-._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_188b8ag_m5vfr._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{node_modules_@xterm_0grwztx1w6mu2._.js → node_modules_@xterm_1wjdgthvv3w9h._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_Icon_mjs_0lly-em28afbk._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_08o95oocj431k._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0eopzqivorumv._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0fsvfwwqw-2hi._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0h7ztf89f407u._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0ppk2v83khj58._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0ut3n9th3gffy._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_1_ntidsz-qo5p._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_refresh-ccw-dot_mjs_0v31ayeyeyyf8._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_save_mjs_1g6fx97wjvfzp._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_shield-alert_mjs_171qztcjn79hl._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_0n6z_kn7rdm9s._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_19r-juqja1ice._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_1khq67j4vo9y4._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03y_2dlxrv10j.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1_wzvdd4hmbov.js +1 -1
- package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +3 -3
- package/dist/app/apps/dashboard/.next/server/middleware.js +2 -2
- package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
- package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/static/chunks/056gjh9s9d494.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/07zeb7uafp9tj.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/0gfuowbirjzjz.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/0glmunl3umirf.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/0lt-ikcy1lvod.js +4 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{3vkc9tvc198l6.js → 0qfvdc54-_wls.js} +2 -2
- package/dist/app/apps/dashboard/.next/static/chunks/0u2muyrfswytk.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{0t2ym98wroor0.js → 0z0bk14hc80xf.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/12i2-pii2jlbk.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/14bd0r0xfbmnv.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{1dldgklwy-d1m.js → 14r8nrwm46g5y.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1_dc7qj6cn34y.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/1ctoa0o88h7is.js +6 -0
- package/dist/app/apps/dashboard/.next/static/chunks/1fdfjc2q68p6m.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{0yfzqjvc48boc.js → 1ngx2zdgd1b2v.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1u_ran46erfqh.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{144lduiqejqn6.js → 1uazzcd91pwfh.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1v4hz3-8oktml.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/1ybllyg38cy3-.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/25tziha662tl6.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/260f1oy-xd4cg.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/26rmh4jb1a3nq.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/29i5vf0fvu1f6.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{1nxsjudz9ja9p.js → 29ihu80s46p9r.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2_iljjf5r-5t5.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2celzsawjzhy9.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2fvlbj5gqk-mf.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2kshtklg2en8k.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2ksz5ltjd7lss.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2o_4mj_bjm4ws.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/30ckv3d3pj-t7.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/347d5q-1yj217.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/36ygg8xpaqvup.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{2f_8x6hbx8hcy.js → 3e8h01gu614n_.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3glqu0wgtdqyv.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{0rcfihvcupsfu.js → 3k5b0ou9_phqh.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3lik3lhs9cb-3.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/3q0oq5yy3hszn.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/3wo0br3rxneiv.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{10nhwrdj0khcw.js → 3y43u3ijms4qh.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{0rb485ohk6md7.js → 45c1z9-q8c5n4.js} +1 -1
- package/dist/app/apps/dashboard/package.json +9 -9
- package/dist/app/apps/dashboard/server.js +1 -1
- package/dist/app/node_modules/semver/package.json +16 -56
- package/package.json +9 -9
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__04mrhyqb1ufrv._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__0c8llxdk0vw6c._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__0hd26mrt655_4._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__1-nhjrs611jhq._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__12hks4v763cd5._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__1ciog21c6gsz7._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0-yqr0-10hc0_._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__06nhceb5uf63i._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__09q7ixy9dkn77._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0a3vv554ltxx-._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0cn86kzz3hpv3._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0ftueu9gq1-i3._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0kyzfsxt0lqmw._.js +0 -146
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0t01oj-s15tz0._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0tva5tfgfuthn._.js +0 -206
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0y71f5krqzyd9._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0y_u98zrxf02j._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__10-0ovq0m2hcb._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__150x74j-d_djz._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1i35sr1_-chih._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1i4965fnazzrj._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1vywioi0uxxp2._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_04l42sk4k7jqc._.js +0 -141
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_11zk8u7fu3bfa._.js +0 -141
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_1ze5f5ud32ii7._.js +0 -141
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_undici_09u721ivtvbfn._.js +0 -122
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__061k3b4f83iw_._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0bpezsts2nk27._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0oolyyzqavqsl._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0oq6lh7w1hy3l._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0wly91np9rak4._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__10vlrswrzvf4x._.js +0 -4
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__12id2gy-xo77y._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__18_5e6gh649a3._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1gi58mgwz43rm._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_033mw4lb6hg5v._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_05_jycpmoagp2._.js +0 -261
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_093r3hf6i_2kf._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0t1utb5lqk4_i._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0t2omtf62kwo8._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0vzgfxv4kj10x._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_14gpaw79je78k._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1hpxp6di3daj1._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1jqprfuo67y8g._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1l5vqoevjbpvy._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1mwuy30pthijq._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1rssd5kiif-p8._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1vr5dlvsx571w._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_01i0ukei4d8fh._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_0r87b6r_5hggb._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_06-0f_j6s36av._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0cpaajci38go6._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0tetr06-sistx._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0un4qq2y_2_8_._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0v64we1n7zcpj._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_1tnwtxofpzzuu._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_1x5ty7vktr96t._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_refresh-ccw-dot_1bka5q1p8_fx4.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_save_1dink7fo0t4_j.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_shield-alert_0n2jlsvjw67kb.js +0 -3
- package/dist/app/apps/dashboard/.next/static/chunks/0f1oo86rd7rn5.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0gugng_rojb59.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0ipsr3u6u9pis.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0lqlei0iz2_b9.js +0 -4
- package/dist/app/apps/dashboard/.next/static/chunks/0nppv-ipbhsb6.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0rzm17jmqcqqy.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0vnm6vq0blkqa.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/148qc2-xospl5.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1_lr8opl_iiee.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1bweivbz75m-h.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1dkvf7mh189e1.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1tn-ycjva2199.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1x-hg6pr64osx.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1xbm8c-z82fvh.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1xmiekdol4f25.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/20-k_69jglenr.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2koijmn3fv51d.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2kr1lerybldj1.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2w06s_csq4lq9.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/38jwf2u4_zfwt.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3c4h-g_w0tej7.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3hmz5ulftjx63.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3nj5vyc7iuek_.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3o84wq16clu2s.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3v5ojp4m7xio1.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3vpeqic83hqi4.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3x0jzyr-nzhaj.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3zfj8uqd-vbu1.js +0 -6
- package/dist/app/apps/dashboard/.next/static/chunks/41tadp-109c8d.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/42ywc2wwm-x4l.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/44nuymti6rr42.js +0 -1
- package/dist/app/node_modules/semver/classes/comparator.js +0 -143
- package/dist/app/node_modules/semver/classes/range.js +0 -577
- package/dist/app/node_modules/semver/classes/semver.js +0 -350
- package/dist/app/node_modules/semver/functions/clean.js +0 -8
- package/dist/app/node_modules/semver/functions/cmp.js +0 -54
- package/dist/app/node_modules/semver/functions/coerce.js +0 -62
- package/dist/app/node_modules/semver/functions/compare-build.js +0 -9
- package/dist/app/node_modules/semver/functions/compare-loose.js +0 -5
- package/dist/app/node_modules/semver/functions/compare.js +0 -7
- package/dist/app/node_modules/semver/functions/diff.js +0 -60
- package/dist/app/node_modules/semver/functions/eq.js +0 -5
- package/dist/app/node_modules/semver/functions/gt.js +0 -5
- package/dist/app/node_modules/semver/functions/gte.js +0 -5
- package/dist/app/node_modules/semver/functions/inc.js +0 -21
- package/dist/app/node_modules/semver/functions/lt.js +0 -5
- package/dist/app/node_modules/semver/functions/lte.js +0 -5
- package/dist/app/node_modules/semver/functions/major.js +0 -5
- package/dist/app/node_modules/semver/functions/minor.js +0 -5
- package/dist/app/node_modules/semver/functions/neq.js +0 -5
- package/dist/app/node_modules/semver/functions/parse.js +0 -18
- package/dist/app/node_modules/semver/functions/patch.js +0 -5
- package/dist/app/node_modules/semver/functions/prerelease.js +0 -8
- package/dist/app/node_modules/semver/functions/rcompare.js +0 -5
- package/dist/app/node_modules/semver/functions/rsort.js +0 -5
- package/dist/app/node_modules/semver/functions/satisfies.js +0 -12
- package/dist/app/node_modules/semver/functions/sort.js +0 -5
- package/dist/app/node_modules/semver/functions/truncate.js +0 -48
- package/dist/app/node_modules/semver/functions/valid.js +0 -8
- package/dist/app/node_modules/semver/index.js +0 -93
- package/dist/app/node_modules/semver/internal/constants.js +0 -37
- package/dist/app/node_modules/semver/internal/debug.js +0 -11
- package/dist/app/node_modules/semver/internal/identifiers.js +0 -29
- package/dist/app/node_modules/semver/internal/lrucache.js +0 -42
- package/dist/app/node_modules/semver/internal/parse-options.js +0 -17
- package/dist/app/node_modules/semver/internal/re.js +0 -223
- package/dist/app/node_modules/semver/ranges/gtr.js +0 -6
- package/dist/app/node_modules/semver/ranges/intersects.js +0 -9
- package/dist/app/node_modules/semver/ranges/ltr.js +0 -6
- package/dist/app/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/dist/app/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/dist/app/node_modules/semver/ranges/min-version.js +0 -63
- package/dist/app/node_modules/semver/ranges/outside.js +0 -82
- package/dist/app/node_modules/semver/ranges/simplify.js +0 -49
- package/dist/app/node_modules/semver/ranges/subset.js +0 -249
- package/dist/app/node_modules/semver/ranges/to-comparators.js +0 -10
- package/dist/app/node_modules/semver/ranges/valid.js +0 -13
- /package/dist/app/apps/dashboard/.next/static/{UVwgQCUayw2aahATR0vXc → RJzcgsvLiZvGVu7o2g_Hd}/_buildManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{UVwgQCUayw2aahATR0vXc → RJzcgsvLiZvGVu7o2g_Hd}/_clientMiddlewareManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{UVwgQCUayw2aahATR0vXc → RJzcgsvLiZvGVu7o2g_Hd}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86421,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(93999),r=e.i(46670),n=e.i(68759),i=e.i(71417),l=e.i(82983),c=e.i(4050),d=e.i(
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86421,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(93999),r=e.i(46670),n=e.i(68759),i=e.i(71417),l=e.i(82983),c=e.i(4050),d=e.i(77071),o=e.i(41120),u=e.i(15281),m=e.i(59659),x=e.i(66627),p=e.i(32781),h=e.i(99847),f=e.i(53138),g=e.i(84026),j=e.i(4139),b=e.i(86207),y=e.i(57665),N=e.i(41220),v=e.i(69174);let w=["/boot","/snap","/var/lib/docker/","/var/lib/containers/"],k=new Set(["iso9660","squashfs"]);var C=e.i(22016),S=e.i(14098),R=e.i(64971),E=e.i(62368),U=e.i(95925),z=e.i(69846),P=e.i(56420);let A={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};A.node;let $=(0,P.f)(A);var I=e.i(66794),O=e.i(35673),_=e.i(39430);function T(e){return e?.isGitRepo!==!1&&e?.legacyGitSelfUpdate===!0}function F(){let{activeNode:e,removeNode:a}=(0,c.l)(),[i,d]=(0,s.useState)("checking"),u=(0,s.useRef)(null),[x,h]=(0,s.useState)(null),[f,g]=(0,s.useState)(!1),[j,b]=(0,s.useState)(null),[y,w]=(0,s.useState)(null),[k,C]=(0,s.useState)("idle"),[S,P]=(0,s.useState)(null),[A,F]=(0,s.useState)(null),[K,B]=(0,s.useState)(!1),[D,L]=(0,s.useState)(null),[V,q]=(0,s.useState)(!1),G=(0,s.useCallback)(async()=>{try{let t=(0,_.L)(e.url),s=await fetch("/api/proxy/health",{method:"GET",headers:t,signal:AbortSignal.timeout(8e3)});d(s.ok?"online":"offline")}catch{d("offline")}},[e.url]),M=(0,s.useCallback)(async()=>{try{let e=await l.f.selfUpdate.version();e.success&&h(e.data??null)}catch{}},[]);(0,s.useEffect)(()=>(d("checking"),h(null),g(!1),w(null),P(null),F(null),G(),M(),u.current=setInterval(()=>{G()},3e4),()=>{u.current&&(clearInterval(u.current),u.current=null)}),[e.id,G,M]);let J=async()=>{C("checking"),F(null),P(null);try{let e=await l.f.selfUpdate.status();e.success&&b(e.data??null);let t=await l.f.selfUpdate.check();t.success&&(w(t.data??null),t.data.error?F(t.data.error):t.data.available||P("Already up to date."))}catch(t){let e="Failed to check for updates";if(t&&"object"==typeof t&&"response"in t)try{let s=(0,R.R)(await (0,R.O)(t));s&&(e=s)}catch{}else t instanceof Error&&(e=t.message);F(e)}finally{C("idle")}},H=async e=>{C("applying"),F(null),P(null);try{let t=await l.f.selfUpdate.apply(e);if(t.success){let e=t.data;if(!e)return;e.updated?P(`Updated from v${e.previousVersion} → v${e.currentVersion}`+(e.restart?.scheduled?`. Restarting via ${e.restart.method}…`:". Restart manually to apply.")):P("Code pulled but no version change detected."),w(null),M();let s=await l.f.selfUpdate.status();s.success&&b(s.data??null)}}catch(e){F(e instanceof Error?e.message:"Update failed")}finally{C("idle")}},W=async()=>{C("restarting"),F(null);try{let e=await l.f.selfUpdate.restart();e.success&&P(`Restart scheduled via ${e.data.method}. Reconnecting shortly…`)}catch(e){F(e instanceof Error?e.message:"Restart failed")}finally{C("idle")}},Y=async()=>{if(confirm(`Delete control node "${e.name}"? You'll be switched to another node.`))try{await a(e.id)}catch{}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"rounded border border-border bg-surface",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-5 py-3",children:[(0,t.jsx)("div",{className:"flex items-center gap-4 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(N.f,{className:"h-4.5 w-4.5 text-primary shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 rounded border border-border bg-bg px-2.5 py-1 text-xs font-bold min-w-0",children:[(0,t.jsx)(N.f,{className:"h-3.5 w-3.5 shrink-0 text-text-muted"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]}),(0,t.jsx)("button",{onClick:()=>{L(e.id),q(!1),B(!0)},className:"rounded border border-border bg-bg p-1.5 text-text-muted transition-all hover:bg-surface-hover hover:text-text hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)]",title:"Control Node Settings",children:(0,t.jsx)(I.f,{className:"h-3.5 w-3.5"})}),(()=>{switch(i){case"checking":return(0,t.jsxs)(r.t,{variant:"info",children:[(0,t.jsx)(p.f,{className:"mr-1 h-3 w-3 animate-spin"}),"Checking"]});case"online":return(0,t.jsx)(r.t,{variant:"success",children:"Online"});case"offline":return(0,t.jsx)(r.t,{variant:"danger",children:"Offline"})}})()]}),(0,t.jsxs)("div",{className:"text-xs text-text-muted truncate mt-0.5",children:[e.url,x&&(0,t.jsxs)("span",{className:"ml-2",children:["v",x.controlApiVersion]})]})]})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,t.jsxs)(n.K,{variant:"ghost",size:"sm",title:"Check for updates",onClick:()=>{f?g(!1):(g(!0),(async()=>{try{let e=await l.f.selfUpdate.status();e.success&&(b(e.data??null),T(e.data)&&J())}catch{}})())},children:[(0,t.jsx)(v.f,{className:"h-3.5 w-3.5 text-primary"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Update"})]}),(0,t.jsx)(n.K,{variant:"ghost",size:"sm",title:"Delete control node",onClick:()=>void Y(),children:(0,t.jsx)(m.f,{className:"h-3.5 w-3.5 text-danger"})}),(0,t.jsx)(n.K,{variant:"ghost",size:"sm",title:"Refresh status",onClick:()=>{d("checking"),G(),M()},children:(0,t.jsx)(o.f,{className:"h-3.5 w-3.5"})})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-5 py-3 space-y-3",children:[A&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 p-3 text-xs text-danger",children:A}),S&&(0,t.jsx)("div",{className:"rounded border border-success/30 bg-success/10 p-3 text-xs text-success",children:S}),j&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-x-6 gap-y-1 text-[11px] text-text-muted",children:[(0,t.jsxs)("span",{children:["Control API: ",(0,t.jsxs)("span",{className:"text-text",children:["v",j.controlApiVersion]})]}),(0,t.jsxs)("span",{children:["Agent: ",(0,t.jsxs)("span",{className:"text-text",children:["v",j.agentVersion]})]}),j.gitBranch&&(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(z.f,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"text-text",children:j.gitBranch})]}),j.gitCommit&&(0,t.jsxs)("span",{children:["Commit: ",(0,t.jsx)("span",{className:"text-text",children:j.gitCommit})]}),j.lastChecked&&(0,t.jsxs)("span",{children:["Checked: ",new Date(j.lastChecked).toLocaleString()]})]}),j&&!T(j)&&(0,t.jsxs)("div",{className:"rounded border border-primary/30 bg-primary/10 p-3 text-xs text-text-muted",children:[(0,t.jsx)("span",{className:"font-bold text-primary",children:"Upgrade on the server host"}),(0,t.jsxs)("span",{className:"ml-1",children:["with ",(0,t.jsx)("code",{className:"rounded bg-surface px-1 text-text",children:j.upgradeCommand??"magnus upgrade"}),": it backs up the database, migrates, restarts and switches back automatically if the new version is unhealthy."]})]}),y?.available&&(0,t.jsxs)("div",{className:"rounded border border-warning/30 bg-warning/10 p-3 text-xs",children:[(0,t.jsx)("span",{className:"font-bold text-warning uppercase tracking-wider",children:"Update available"}),(0,t.jsxs)("span",{className:"text-text-muted ml-1",children:["— ",y.behindBy," commit",1!==y.behindBy?"s":""," behind (",y.currentCommit," → ",y.remoteCommit,")"]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[T(j)&&(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:()=>void J(),disabled:"idle"!==k,icon:"checking"===k?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(o.f,{className:"h-3.5 w-3.5"}),children:"checking"===k?"Checking…":"Check for Updates"}),T(j)&&y?.available&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.K,{variant:"primary",size:"sm",onClick:()=>void H(!1),disabled:"idle"!==k,icon:"applying"===k?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(E.f,{className:"h-3.5 w-3.5"}),children:"applying"===k?"Updating…":"Pull & Build"}),(0,t.jsx)(n.K,{variant:"primary",size:"sm",onClick:()=>void H(!0),disabled:"idle"!==k,icon:"applying"===k?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(U.f,{className:"h-3.5 w-3.5"}),children:"applying"===k?"Updating…":"Pull, Build & Restart"})]}),T(j)&&(0,t.jsx)(n.K,{variant:"ghost",size:"sm",onClick:()=>void W(),disabled:"idle"!==k,icon:"restarting"===k?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(U.f,{className:"h-3.5 w-3.5"}),children:"restarting"===k?"Restarting…":"Restart Only"}),(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsx)(n.K,{variant:"ghost",size:"sm",onClick:()=>g(!1),icon:(0,t.jsx)($,{className:"h-3.5 w-3.5"}),children:"Close"})})]})]})]}),(0,t.jsx)(O.f,{open:K,onClose:()=>{B(!1),L(null),q(!1),G(),M()},editNodeId:D,createMode:V})]})}var K=e.i(32568);function B({open:a,onClose:r,node:n}){let i=(0,s.useRef)(null),l=(0,s.useRef)(null),c=(0,s.useRef)(null),d=(0,s.useRef)(null),o=(0,s.useRef)(!1),u=(0,s.useRef)(null),[m,x]=(0,s.useState)("connecting"),p=(0,s.useRef)(""),h=(0,s.useRef)(null),f=(0,s.useCallback)(()=>{h.current=null;let e=p.current;e&&d.current&&(p.current="",fetch("/api/terminal/input",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:d.current,data:e})}).catch(()=>{}))},[]),g=(0,s.useCallback)(()=>{if(!o.current){o.current=!0,h.current&&(clearTimeout(h.current),h.current=null),u.current?.abort(),u.current=null,d.current&&(fetch("/api/terminal/close",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:d.current})}).catch(()=>{}),d.current=null);try{l.current?.dispose()}catch{}l.current=null,c.current=null}},[]);(0,s.useEffect)(()=>{if(!a||!n||!i.current)return;o.current=!1,x("connecting");let t=!1;(async()=>{let s,{Terminal:a}=await e.A(37138),{FitAddon:r}=await e.A(59439);if(!document.getElementById("xterm-css")){let e=document.createElement("style");e.id="xterm-css",e.textContent=`
|
|
2
2
|
.xterm { position: relative; user-select: none; }
|
|
3
3
|
.xterm.focus, .xterm:focus { outline: none; }
|
|
4
4
|
.xterm .xterm-helpers { position: absolute; top: 0; z-index: 5; }
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
`,document.head.appendChild(e)}if(t||o.current)return;let m=new a({cursorBlink:!0,scrollback:1e3,fontFamily:'"JetBrains Mono", "Fira Code", "Cascadia Code", monospace',fontSize:13,theme:{background:"#06060d",foreground:"#e0e0ec",cursor:"#00e5ff",cursorAccent:"#06060d",selectionBackground:"#00e5ff33",black:"#06060d",red:"#ff1744",green:"#00ff41",yellow:"#ffb300",blue:"#00b0ff",magenta:"#ff006e",cyan:"#00e5ff",white:"#e0e0ec",brightBlack:"#5a5a7a",brightRed:"#ff5252",brightGreen:"#69f0ae",brightYellow:"#ffd740",brightBlue:"#40c4ff",brightMagenta:"#ff4081",brightCyan:"#18ffff",brightWhite:"#ffffff"}}),g=new r;if(m.loadAddon(g),l.current=m,c.current=g,i.current&&(m.open(i.current),requestAnimationFrame(()=>{o.current||g.fit()})),t||o.current)return;let j=g.proposeDimensions(),b=j?.cols??120,y=j?.rows??30,N=n.hostname||n.ipAddress;m.write(`\x1b[38;2;138;138;171mConnecting to ${N} as ${N===n.hostname?n.hostname:n.ipAddress}...\x1b[0m\r
|
|
13
13
|
`);try{let e=await fetch("/api/terminal/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({host:N,cols:b,rows:y})});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error??`HTTP ${e.status}`)}d.current=s=(await e.json()).sessionId}catch(s){if(t||o.current)return;let e=s instanceof Error?s.message:"Unknown error";m.write(`\r
|
|
14
14
|
\x1b[31mFailed to open session: ${e}\x1b[0m\r
|
|
15
|
-
`),x("error");return}if(t||o.current)return;x("connected");let v=new AbortController;u.current=v,(async()=>{try{let e=await fetch(`/api/terminal/stream?sessionId=${encodeURIComponent(s)}`,{signal:v.signal});if(!e.ok||!e.body){t||o.current||(m.write("\r\n\x1b[31mFailed to connect output stream\x1b[0m\r\n"),x("error"));return}let a=e.body.getReader();for(;;){let{done:e,value:s}=await a.read();if(e||t||o.current)break;s&&m.write(s)}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return}t||o.current||(x("closed"),m.write("\r\n\x1b[38;2;138;138;171m── Session ended ──\x1b[0m\r\n"))})(),m.onData(e=>{!o.current&&d.current&&(p.current+=e,h.current||(h.current=setTimeout(f,16)))}),m.onResize(({cols:e,rows:t})=>{!o.current&&d.current&&fetch("/api/terminal/resize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:d.current,cols:e,rows:t})}).catch(()=>{})})})();let s=()=>{c.current&&!o.current&&c.current.fit()};return window.addEventListener("resize",s),()=>{t=!0,window.removeEventListener("resize",s),g()}},[a,n,g,f]);let b=(0,s.useCallback)(()=>{g(),r()},[g,r]);return n?(0,t.jsx)(T.n,{open:a,onClose:b,title:`Terminal: ${n.name}`,description:"Interactive SSH session",icon:(0,t.jsx)(j.f,{className:"h-5 w-5 text-primary"}),className:"max-w-5xl",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("div",{className:"absolute top-0 right-0 z-10 flex items-center gap-1.5 px-2 py-1",children:[(0,t.jsx)("div",{className:`h-1.5 w-1.5 rounded-full ${"connected"===m?"bg-success":"connecting"===m?"bg-warning animate-pulse":"error"===m?"bg-danger":"bg-text-muted"}`}),(0,t.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-text-muted",children:m})]}),(0,t.jsx)("div",{ref:i,className:"h-[65vh] w-full rounded border border-border/50 bg-[#06060d] p-1 overflow-hidden"})]})}):null}var K=e.i(63376),B=e.i(67683),D=e.i(73404),L=e.i(51196),V=e.i(75723),q=e.i(2067),G=e.i(65369),M=e.i(95468),J=e.i(73884);let H={pending:{label:"Queued",variant:"default"},requested:{label:"Installing",variant:"info"},confirmed:{label:"Upgraded",variant:"success"},reverted:{label:"Reverted",variant:"danger"},failed:{label:"Failed",variant:"danger"},skipped:{label:"Skipped",variant:"default"}};function W({open:e,onClose:a,onFinished:i}){let[c,d]=(0,s.useState)(null),[o,u]=(0,s.useState)(new Set),[m,x]=(0,s.useState)(null),[h,f]=(0,s.useState)(null),[g,j]=(0,s.useState)(!1),b=(0,s.useCallback)(async()=>{f(null);try{let e=await l.f.agentUpgrades.eligibility();d(e),u(new Set(e.nodes.filter(e=>e.eligible).map(e=>e.nodeId))),e.latestRun?.status==="running"&&x(e.latestRun)}catch(e){f(e instanceof Error?e.message:String(e))}},[]);(0,s.useEffect)(()=>{e&&(x(null),b())},[e,b]),(0,s.useEffect)(()=>{if(!m||"running"!==m.status)return;let e=window.setInterval(()=>{l.f.agentUpgrades.run(m.id).then(e=>{x(e),"running"!==e.status&&i?.()}).catch(()=>void 0)},5e3);return()=>window.clearInterval(e)},[m,i]);let y=(0,s.useMemo)(()=>c?.nodes.filter(e=>e.eligible).length??0,[c]),N=async()=>{j(!0),f(null);try{x(await l.f.agentUpgrades.start({nodeIds:[...o],version:c?.version}))}catch(e){f(e instanceof Error?e.message:String(e))}finally{j(!1)}};return(0,t.jsx)(T.n,{open:e,onClose:a,title:"Upgrade agents",icon:(0,t.jsx)(v.f,{className:"h-4 w-4"}),description:c?`Target: magnus-agent ${c.version} (the version this server ships with)`:void 0,className:"max-w-2xl",children:(0,t.jsxs)("div",{className:"space-y-4 text-[11px]",children:[h&&(0,t.jsx)("div",{className:"rounded border border-danger/40 bg-danger/10 px-3 py-2 text-danger",children:h}),c&&!c.upgradesEnabled&&(0,t.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-warning",children:["Agent upgrades are off: ",c.disabledReason]}),!c&&!h&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,t.jsx)(p.f,{className:"h-4 w-4 animate-spin"})," Checking agents…"]}),c&&!m&&(0,t.jsxs)("ul",{className:"max-h-80 divide-y divide-border/40 overflow-y-auto rounded border border-border","data-testid":"agent-upgrade-candidates",children:[c.nodes.map(e=>(0,t.jsxs)("li",{className:`flex items-center gap-3 px-3 py-2 ${e.eligible&&c.upgradesEnabled?"":"opacity-50"}`,title:e.reason??void 0,children:[(0,t.jsx)("input",{type:"checkbox","aria-label":`Upgrade ${e.name}`,checked:o.has(e.nodeId),disabled:!e.eligible||!c.upgradesEnabled,onChange:()=>{let t;return t=e.nodeId,u(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})}}),(0,t.jsx)("span",{className:"w-40 truncate font-medium text-text",children:e.name}),(0,t.jsx)("span",{className:"num w-20 text-text-muted",children:e.version}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-text-muted",children:e.eligible?`→ ${c.version}`:e.reason})]},e.nodeId)),0===c.nodes.length&&(0,t.jsx)("li",{className:"px-3 py-2 text-text-muted",children:"No nodes registered."})]}),m&&(0,t.jsxs)("div",{className:"space-y-2","data-testid":"agent-upgrade-run",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2",children:["running"===m.status&&(0,t.jsx)(p.f,{className:"h-4 w-4 animate-spin text-primary"}),"succeeded"===m.status&&(0,t.jsx)(M.f,{className:"h-4 w-4 text-success"}),"failed"===m.status&&(0,t.jsx)(J.f,{className:"h-4 w-4 text-danger"}),(0,t.jsx)("span",{className:"font-bold uppercase tracking-wider",children:"running"===m.status?`Upgrading to ${m.version}`:m.message??m.status})]}),(0,t.jsx)("ul",{className:"max-h-80 divide-y divide-border/40 overflow-y-auto rounded border border-border",children:m.nodes.map((e,s)=>(0,t.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsxs)("span",{className:"w-40 truncate font-medium text-text",children:[e.name,0===s?" (canary)":""]}),(0,t.jsxs)("span",{className:"num w-28 text-text-muted",children:[e.from," → ",m.version]}),(0,t.jsxs)(r.t,{variant:H[e.state].variant,children:["requested"===e.state&&(0,t.jsx)(p.f,{className:"mr-1 inline h-3 w-3 animate-spin"}),"reverted"===e.state&&(0,t.jsx)(U.f,{className:"mr-1 inline h-3 w-3"}),H[e.state].label]}),e.detail&&(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-text-muted",title:e.detail,children:e.detail})]},e.nodeId))})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:"text-text-muted",children:"The first agent is a canary. Each agent switches back by itself if the new version does not report a heartbeat in time; the run stops at the first failure."}),(0,t.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:a,children:m&&"running"!==m.status?"Close":"Cancel"}),!m&&(0,t.jsxs)(n.K,{variant:"primary",size:"sm",onClick:()=>void N(),"data-testid":"agent-upgrade-start",disabled:g||0===o.size||!c?.upgradesEnabled,icon:g?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(v.f,{className:"h-3.5 w-3.5"}),children:["Upgrade ",o.size||y," agent",1===(o.size||y)?"":"s"]})]})]})]})})}function Y(e){try{let t=JSON.parse(e);if("string"==typeof t.deployError)return{label:"Deploy failed",message:t.deployError};if("string"==typeof t.upgradeError)return{label:"Upgrade failed",message:t.upgradeError};return null}catch{return null}}e.s(["default",0,function({initialNodes:e,initialTailscaleSummary:R}){let E,U,{activeNode:z}=(0,c.l)(),[P,A]=(0,s.useState)(e),[$,I]=(0,s.useState)((!!e.length||void 0===e)&&!1),[O,T]=(0,s.useState)(null),[M,J]=(0,s.useState)(!1),[H,Q]=(0,s.useState)(!1);(0,s.useEffect)(()=>{"agents"===new URLSearchParams(window.location.search).get("upgrade")&&Q(!0)},[]);let[X,Z]=(0,s.useState)(null),[ee,et]=(0,s.useState)(null),[es,ea]=(0,s.useState)(!1),[er,en]=(0,s.useState)([]),[ei,el]=(0,s.useState)(null),[ec,ed]=(0,s.useState)({}),[eo,eu]=(0,s.useState)(null),[em,ex]=(0,s.useState)(R),ep=(0,s.useRef)(null),eh=(0,s.useRef)({}),[ef,eg]=(0,s.useState)(e.length>0),ej=(0,s.useCallback)(async(e=!1)=>{try{e||I(!0),T(null);let[t,s,a]=await Promise.all([l.f.nodes.list(),l.f.nodes.systemUpdatesSummary().catch(()=>null),l.f.nodes.tailscaleSummary().catch(()=>null)]),r=t.data.map(e=>{if(e.role)return delete eh.current[e.id],e;let t=eh.current[e.id];return void 0!==t?{...e,role:t}:e});A(r),eu(s?.data??null),ex(a?.data??null);let n=await Promise.all(r.map(async e=>{try{let t=await l.f.nodes.health(e.id);return[e.id,t.data]}catch{return[e.id,null]}}));ed(Object.fromEntries(n.filter(e=>null!==e[1])))}catch(a){let t=a instanceof Error?a.message:String(a),s="Failed to fetch"===t||t.includes("TypeError")||t.includes("NetworkError")||t.includes("ECONNREFUSED")||t.includes("timeout");e||T(s?`Control node unreachable (${z.name})`:t)}finally{e||I(!1)}},[z.name]);(0,s.useEffect)(()=>{if(ef){eg(!1),(async()=>{e.length>0&&ed(Object.fromEntries((await Promise.all(e.map(async e=>{try{let t=await l.f.nodes.health(e.id);return[e.id,t.data]}catch{return[e.id,null]}}))).filter(e=>null!==e[1])));try{let e=await l.f.nodes.systemUpdatesSummary();eu(e.data)}catch{eu(null)}try{let e=await l.f.nodes.tailscaleSummary();ex(e.data??null)}catch{ex(null)}})();return}A([]),T(null),en([]),ed({}),eu(null),ex(null),eh.current={},ej()},[z.id]),(0,s.useEffect)(()=>{let e=P.some(e=>"PROVISIONING"===e.status||e.agent?.status==="UPDATING");return e&&!ep.current?ep.current=setInterval(()=>{ej(!0)},4e3):!e&&ep.current&&(clearInterval(ep.current),ep.current=null),()=>{ep.current&&(clearInterval(ep.current),ep.current=null)}},[P,ej]);let eb=async e=>{if(confirm(`Delete node "${e.name}"? This will permanently remove it and all associated data.`))try{await l.f.nodes.delete(e.id),ej()}catch{}},ey=async()=>{ea(!0),en([]);try{let e=await l.f.discovery.scan(5e3);e.success&&Array.isArray(e.data)&&en(e.data)}catch{}finally{ea(!1)}};return(0,t.jsxs)(K.U,{className:"space-y-6",children:[(0,t.jsx)(K.z,{children:(0,t.jsx)(D.f,{title:"Nodes",eyebrow:"Fleet",description:"Manage your Magnus fleet nodes",status:P.length>0?(0,t.jsxs)("span",{className:"flex items-center gap-3 text-[10px] uppercase tracking-wider text-text-muted",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(V.f,{status:"ONLINE",size:"xs"}),(0,t.jsx)("span",{className:"num",children:P.filter(e=>"ONLINE"===e.status).length})," online"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(V.f,{status:"OFFLINE",size:"xs",pulse:!1}),(0,t.jsx)("span",{className:"num",children:P.filter(e=>"OFFLINE"===e.status).length})," offline"]})]}):void 0,actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(o.f,{className:"h-3.5 w-3.5"}),onClick:()=>void ej(),children:"Refresh"}),(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(v.f,{className:"h-3.5 w-3.5"}),onClick:()=>Q(!0),"data-testid":"open-agent-upgrade",children:"Upgrade Agents"}),(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(d.f,{className:"h-3.5 w-3.5"}),onClick:()=>J(!0),children:"Register Node"})]})})}),(0,t.jsx)(K.z,{children:(0,t.jsx)(_,{})}),em&&(0,t.jsx)(K.z,{children:(0,t.jsx)(B.f,{summary:em,showAction:!1})}),eo&&(0,t.jsx)(K.z,{children:(0,t.jsx)("section",{className:"panel-corners overflow-hidden rounded-panel border border-border bg-surface","aria-label":"System update readiness",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 divide-x divide-y divide-border/60 sm:grid-cols-4 sm:divide-y-0",children:[(0,t.jsxs)("div",{className:"col-span-2 flex items-center gap-3 px-4 py-3 sm:col-span-1",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-panel border border-primary/30 bg-primary/10 text-primary shadow-[0_0_10px_var(--color-glow)]",children:(0,t.jsx)(b.f,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Auto-update coverage"}),(0,t.jsxs)("p",{className:"num mt-0.5 text-sm font-semibold",children:[eo.enabled," / ",eo.reporting," enabled"]}),(0,t.jsx)(L.f,{className:"mt-1.5",value:eo.reporting>0?eo.enabled/eo.reporting*100:null,tone:eo.enabled===eo.reporting?"success":"warning",label:"Auto-update coverage"})]})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Action needed"}),(0,t.jsx)("p",{className:`num mt-1 text-lg font-bold ${eo.actionNeeded?"text-warning glow-text-warning":"text-success"}`,children:eo.actionNeeded})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Reboot debt"}),(0,t.jsxs)("p",{className:`num mt-1 flex items-center gap-1.5 text-lg font-bold ${eo.rebootRequired?"text-danger glow-text-danger":"text-success"}`,children:[eo.rebootRequired?(0,t.jsx)(y.f,{className:"h-4 w-4"}):null,eo.rebootRequired]})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Reporting"}),(0,t.jsxs)("p",{className:"num mt-1 text-lg font-bold",children:[eo.reporting," / ",eo.total]})]})]})})}),(0,t.jsx)(K.z,{children:(0,t.jsx)(a.N,{children:O?O.startsWith("Control node unreachable")?(0,t.jsx)(q.f,{tone:"warning",icon:(0,t.jsx)(x.f,{className:"h-5 w-5"}),title:O,description:"Cannot connect to this Control Node. Verify it is running and reachable.",action:(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:()=>void ej(),children:"Retry"})}):(0,t.jsx)(q.f,{tone:"danger",icon:(0,t.jsx)(h.f,{className:"h-5 w-5"}),title:"Error loading nodes",description:O,action:(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:()=>void ej(),children:"Retry"})}):$?(0,t.jsx)(G.F,{rows:6,cols:9,className:"border-0"}):0===P.length?(0,t.jsx)(q.f,{tone:"primary",icon:(0,t.jsx)(N.f,{className:"h-5 w-5"}),title:"No nodes registered",description:"Register your first Magnus node to get started.",action:(0,t.jsx)(n.K,{size:"sm",icon:(0,t.jsx)(d.f,{className:"h-3.5 w-3.5"}),onClick:()=>J(!0),children:"Register Node"})}):(0,t.jsx)("div",{className:"max-h-[70vh] overflow-auto",children:(0,t.jsxs)("table",{className:"w-full text-[11px]",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"sticky top-0 z-10 border-b border-primary/30 bg-surface/95 text-left text-[10px] font-bold uppercase tracking-[0.15em] text-text-muted shadow-[0_1px_0_var(--color-primary),0_4px_12px_-6px_var(--color-glow)] backdrop-blur-sm",children:[(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Name"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Host"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Address"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Status"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Agent"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Role"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"CPU"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Memory"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Persistent Disk"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Updates"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Tailscale key"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Last Heartbeat"}),(0,t.jsx)("th",{className:"pb-3",children:"Actions"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border/50",children:P.map(e=>{var s;let a=ec[e.id],l=(function(e){if(Array.isArray(e))return e;if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}})(a?.disks).filter(e=>"/"===e.mountPoint||"/home"===e.mountPoint||e.mountPoint.startsWith("/home/")||e.mountPoint.startsWith("/mnt/")||e.mountPoint.startsWith("/srv/")).filter(e=>!w.some(t=>e.mountPoint===t||e.mountPoint.startsWith(t))).filter(e=>!k.has((e.filesystemType??"").toLowerCase())).sort((e,t)=>t.usagePercent-e.usagePercent)[0]??null,c=l?(s=l.usagePercent)>=95?"critical":s>=80?"warning":"normal":null,d=eo?.nodes.find(t=>t.id===e.id)?.systemUpdates??null,o=em?.nodes.find(t=>t.id===e.id)?.tailscale??null;return(0,t.jsxs)("tr",{className:"group/row relative transition-colors hover:bg-primary/[0.03] [&>td:first-child]:shadow-[inset_2px_0_0_transparent] hover:[&>td:first-child]:shadow-[inset_2px_0_0_var(--color-primary)]",children:[(0,t.jsx)("td",{className:"py-3 pl-2 pr-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(V.f,{status:e.status,size:"xs"}),"ONLINE"===e.status&&(0,t.jsx)("button",{onClick:()=>el(e),title:`Open terminal on ${e.name}`,className:"flex h-6 w-6 items-center justify-center rounded border border-border/50 text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:(0,t.jsx)(j.f,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.default,{href:`/nodes/${e.id}`,className:"font-medium text-primary hover:text-primary-hover transition-colors",children:e.name})]})}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:e.hostname}),(0,t.jsxs)("td",{className:"py-3 pr-4 text-text-muted",children:[e.ipAddress,":",e.port]}),(0,t.jsx)("td",{className:"py-3 pr-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(r.t,{variant:(0,r.k)(e.status),children:e.status}),("DEGRADED"===e.status||e.agent?.status==="ERROR")&&Y(e.metadata)&&(0,t.jsx)("span",{title:`${Y(e.metadata).label}: ${Y(e.metadata).message}`,children:(0,t.jsx)(h.f,{className:"h-3.5 w-3.5 text-danger cursor-help"})}),"PROVISIONING"===e.status&&(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 text-info animate-spin"})]})}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[e.agent?`v${e.agent.version}`:"—",e.agent?.status==="UPDATING"&&(0,t.jsx)(p.f,{className:"h-3 w-3 text-info animate-spin"})]})}),(0,t.jsx)("td",{className:"py-3 pr-4",children:e.role?(0,t.jsxs)("button",{className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/5 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider text-primary hover:bg-primary/10 hover:border-primary/50 transition-all cursor-pointer",onClick:()=>et(e),title:"Change role",children:[(0,t.jsx)(g.f,{className:"h-3 w-3"}),e.role.name]}):(0,t.jsx)("button",{className:"text-[10px] text-text-muted hover:text-primary transition-colors cursor-pointer uppercase tracking-wider",onClick:()=>et(e),children:"+ Assign"})}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:a?(0,t.jsx)(L.f,{value:a.cpuUsagePercent,label:`${e.name} CPU`,valueLabel:`${a.cpuUsagePercent.toFixed(1)}%`,showValue:!0,className:"w-28"}):"—"}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:a?(0,t.jsxs)("div",{className:"w-36",children:[(0,t.jsx)(L.f,{value:a.memoryPercent,label:`${e.name} memory`,showValue:!0}),(0,t.jsxs)("span",{className:"num mt-0.5 block text-[10px] text-text-muted/80",children:[(a.memoryUsedBytes/0x40000000).toFixed(1)," / ",(a.memoryTotalBytes/0x40000000).toFixed(1)," GB"]})]}):"—"}),(0,t.jsx)("td",{className:"py-3 pr-4",children:l?(0,t.jsxs)("span",{className:"flex w-36 flex-col gap-0.5",title:`${l.mountPoint} filesystem is ${l.usagePercent}% used${"normal"===c?"":" — disk usage anomaly"}`,children:[(0,t.jsx)(L.f,{value:l.usagePercent,tone:"critical"===c?"danger":"warning"===c?"warning":"success",label:`${e.name} ${l.mountPoint} disk`,valueLabel:`${l.usagePercent.toFixed(0)}%`,glow:"normal"!==c,showValue:!0}),(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-text-muted",children:["normal"!==c&&(0,t.jsx)(f.f,{"aria-label":`${c} disk usage anomaly`,className:"critical"===c?"h-3 w-3 text-danger":"h-3 w-3 text-warning"}),l.mountPoint]})]}):(0,t.jsx)("span",{className:"text-text-muted",children:"—"})}),(0,t.jsx)("td",{className:"py-3 pr-4",children:d?d.rebootRequired?(0,t.jsx)(r.t,{variant:"danger",children:"reboot required"}):"enabled"===d.automaticUpdates?(0,t.jsx)(r.t,{variant:"success",children:"automatic"}):"unsupported"===d.automaticUpdates?(0,t.jsx)(r.t,{variant:"default",children:"unsupported"}):(0,t.jsx)(r.t,{variant:"warning",children:"enable updates"}):(0,t.jsx)(r.t,{variant:"default",children:"awaiting agent"})}),(0,t.jsx)("td",{className:"py-3 pr-4",title:o?.keyExpiry?`Expires ${o.keyExpiry}`:void 0,children:o?o.expiryEnabled?o.expired?(0,t.jsx)(r.t,{variant:"danger",children:"expired"}):null===o.daysRemaining?(0,t.jsx)(r.t,{variant:"default",children:"unknown"}):o.requiresRenewal?(0,t.jsxs)(r.t,{variant:"warning",children:[o.daysRemaining,"d"]}):(0,t.jsxs)(r.t,{variant:"success",children:[o.daysRemaining,"d"]}):(0,t.jsx)(r.t,{variant:"success",children:"no expiry"}):(0,t.jsx)(r.t,{variant:"default",children:"awaiting agent"})}),(0,t.jsx)("td",{className:"num py-3 pr-4 text-text-muted",children:(0,i.C)(e.lastHeartbeatAt)}),(0,t.jsx)("td",{className:"py-3",children:(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)(C.default,{href:`/nodes/${e.id}`,children:(0,t.jsx)(n.K,{variant:"ghost",size:"sm",children:"View"})}),(0,t.jsx)(n.K,{variant:"ghost",size:"sm",onClick:()=>Z(e),children:(0,t.jsx)(u.f,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(n.K,{variant:"ghost",size:"sm",onClick:()=>void eb(e),children:(0,t.jsx)(m.f,{className:"h-3.5 w-3.5 text-danger"})})]})})]},e.id)})})]})})})}),(0,t.jsx)(K.z,{children:(0,t.jsxs)(a.N,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(x.f,{className:"h-4 w-4 text-primary"}),(0,t.jsx)("h2",{className:"text-xs font-bold uppercase tracking-wider",children:"Network Discovery"}),(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"— Unadopted agents found on the local network"})]}),(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:es?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(x.f,{className:"h-3.5 w-3.5"}),onClick:()=>void ey(),disabled:es,children:es?"Scanning…":"Scan Network"})]}),0===er.length?es?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 py-6",children:[(0,t.jsxs)("div",{className:"relative h-16 w-16 overflow-hidden rounded-full border border-primary/30 shadow-[0_0_16px_var(--color-glow)]",children:[(0,t.jsx)("div",{className:"absolute inset-0 animate-sweep rounded-full bg-[conic-gradient(from_0deg,transparent_0deg,transparent_280deg,var(--color-primary)_360deg)] opacity-60"}),(0,t.jsx)("div",{className:"absolute inset-[30%] rounded-full border border-primary/20"})]}),(0,t.jsx)("p",{className:"text-[11px] uppercase tracking-wider text-primary",children:"Broadcasting discovery probe…"})]}):(0,t.jsx)(q.f,{compact:!0,icon:(0,t.jsx)(x.f,{className:"h-4 w-4"}),title:"No scan results yet",description:'Click "Scan Network" to discover unadopted agents on your network.'}):(E=er.filter(e=>!e.registered),U=er.filter(e=>e.registered),0===E.length?(0,t.jsxs)("div",{className:"py-6 text-center text-[11px] text-text-muted",children:["All ",U.length," discovered agent",1!==U.length?"s":""," already registered. No new nodes to adopt."]}):(0,t.jsxs)("div",{className:"overflow-x-auto",children:[(0,t.jsxs)("table",{className:"w-full text-[11px]",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-primary/20 text-left text-[10px] font-bold uppercase tracking-[0.15em] text-text-muted",children:[(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Hostname"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"IP Address"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Port"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Agent Version"}),(0,t.jsx)("th",{className:"pb-3",children:"Registration"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border/50",children:E.map(e=>(0,t.jsxs)("tr",{className:"hover:bg-surface-hover transition-colors",children:[(0,t.jsx)("td",{className:"py-3 pr-4 font-medium",children:e.fqdn||e.hostname}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:e.ip}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:e.port}),(0,t.jsxs)("td",{className:"py-3 pr-4 text-text-muted",children:["v",e.version]}),(0,t.jsx)("td",{className:"py-3 text-text-muted",children:"Use the reviewed key-only agent deploy runbook, then register the authenticated heartbeat."})]},`${e.ip}:${e.port}`))})]}),U.length>0&&(0,t.jsxs)("p",{className:"mt-3 text-xs text-text-muted",children:[U.length," already-registered agent",1!==U.length?"s":""," ","hidden from this list."]})]}))]})}),(0,t.jsx)(W,{open:H,onClose:()=>Q(!1),onFinished:()=>void ej()}),(0,t.jsx)(S.M,{open:M,onClose:()=>J(!1),onRegistered:()=>void ej()}),(0,t.jsx)(S.F,{open:!!X,node:X,onClose:()=>Z(null),onSaved:()=>void ej()}),(0,t.jsx)(S.E,{open:!!ee,node:ee,onClose:()=>et(null),onSaved:e=>{ee&&(eh.current[ee.id]=e,A(t=>t.map(t=>t.id===ee.id?{...t,role:e}:t))),ej()}}),(0,t.jsx)(F,{open:!!ei,onClose:()=>el(null),node:ei})]})}],86421)}]);
|
|
15
|
+
`),x("error");return}if(t||o.current)return;x("connected");let v=new AbortController;u.current=v,(async()=>{try{let e=await fetch(`/api/terminal/stream?sessionId=${encodeURIComponent(s)}`,{signal:v.signal});if(!e.ok||!e.body){t||o.current||(m.write("\r\n\x1b[31mFailed to connect output stream\x1b[0m\r\n"),x("error"));return}let a=e.body.getReader();for(;;){let{done:e,value:s}=await a.read();if(e||t||o.current)break;s&&m.write(s)}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return}t||o.current||(x("closed"),m.write("\r\n\x1b[38;2;138;138;171m── Session ended ──\x1b[0m\r\n"))})(),m.onData(e=>{!o.current&&d.current&&(p.current+=e,h.current||(h.current=setTimeout(f,16)))}),m.onResize(({cols:e,rows:t})=>{!o.current&&d.current&&fetch("/api/terminal/resize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:d.current,cols:e,rows:t})}).catch(()=>{})})})();let s=()=>{c.current&&!o.current&&c.current.fit()};return window.addEventListener("resize",s),()=>{t=!0,window.removeEventListener("resize",s),g()}},[a,n,g,f]);let b=(0,s.useCallback)(()=>{g(),r()},[g,r]);return n?(0,t.jsx)(K.n,{open:a,onClose:b,title:`Terminal: ${n.name}`,description:"Interactive SSH session",icon:(0,t.jsx)(j.f,{className:"h-5 w-5 text-primary"}),className:"max-w-5xl",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("div",{className:"absolute top-0 right-0 z-10 flex items-center gap-1.5 px-2 py-1",children:[(0,t.jsx)("div",{className:`h-1.5 w-1.5 rounded-full ${"connected"===m?"bg-success":"connecting"===m?"bg-warning animate-pulse":"error"===m?"bg-danger":"bg-text-muted"}`}),(0,t.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-text-muted",children:m})]}),(0,t.jsx)("div",{ref:i,className:"h-[65vh] w-full rounded border border-border/50 bg-[#06060d] p-1 overflow-hidden"})]})}):null}var D=e.i(63376),L=e.i(67683),V=e.i(73404),q=e.i(51196),G=e.i(75723),M=e.i(2067),J=e.i(65369),H=e.i(51757),W=e.i(83967);let Y={pending:{label:"Queued",variant:"default"},requested:{label:"Installing",variant:"info"},confirmed:{label:"Upgraded",variant:"success"},reverted:{label:"Reverted",variant:"danger"},failed:{label:"Failed",variant:"danger"},skipped:{label:"Skipped",variant:"default"}};function Q({open:e,onClose:a,onFinished:i}){let[c,d]=(0,s.useState)(null),[o,u]=(0,s.useState)(new Set),[m,x]=(0,s.useState)(null),[h,f]=(0,s.useState)(null),[g,j]=(0,s.useState)(!1),b=(0,s.useCallback)(async()=>{f(null);try{let e=await l.f.agentUpgrades.eligibility();d(e),u(new Set(e.nodes.filter(e=>e.eligible).map(e=>e.nodeId))),e.latestRun?.status==="running"&&x(e.latestRun)}catch(e){f(e instanceof Error?e.message:String(e))}},[]);(0,s.useEffect)(()=>{e&&(x(null),b())},[e,b]),(0,s.useEffect)(()=>{if(!m||"running"!==m.status)return;let e=window.setInterval(()=>{l.f.agentUpgrades.run(m.id).then(e=>{x(e),"running"!==e.status&&i?.()}).catch(()=>void 0)},5e3);return()=>window.clearInterval(e)},[m,i]);let y=(0,s.useMemo)(()=>c?.nodes.filter(e=>e.eligible).length??0,[c]),N=async()=>{j(!0),f(null);try{x(await l.f.agentUpgrades.start({nodeIds:[...o],version:c?.version}))}catch(e){f(e instanceof Error?e.message:String(e))}finally{j(!1)}};return(0,t.jsx)(K.n,{open:e,onClose:a,title:"Upgrade agents",icon:(0,t.jsx)(v.f,{className:"h-4 w-4"}),description:c?`Target: magnus-agent ${c.version} (the version this server ships with)`:void 0,className:"max-w-2xl",children:(0,t.jsxs)("div",{className:"space-y-4 text-[11px]",children:[h&&(0,t.jsx)("div",{className:"rounded border border-danger/40 bg-danger/10 px-3 py-2 text-danger",children:h}),c&&!c.upgradesEnabled&&(0,t.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-warning",children:["Agent upgrades are off: ",c.disabledReason]}),!c&&!h&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,t.jsx)(p.f,{className:"h-4 w-4 animate-spin"})," Checking agents…"]}),c&&!m&&(0,t.jsxs)("ul",{className:"max-h-80 divide-y divide-border/40 overflow-y-auto rounded border border-border","data-testid":"agent-upgrade-candidates",children:[c.nodes.map(e=>(0,t.jsxs)("li",{className:`flex items-center gap-3 px-3 py-2 ${e.eligible&&c.upgradesEnabled?"":"opacity-50"}`,title:e.reason??void 0,children:[(0,t.jsx)("input",{type:"checkbox","aria-label":`Upgrade ${e.name}`,checked:o.has(e.nodeId),disabled:!e.eligible||!c.upgradesEnabled,onChange:()=>{let t;return t=e.nodeId,u(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})}}),(0,t.jsx)("span",{className:"w-40 truncate font-medium text-text",children:e.name}),(0,t.jsx)("span",{className:"num w-20 text-text-muted",children:e.version}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-text-muted",children:e.eligible?`→ ${c.version}`:e.reason})]},e.nodeId)),0===c.nodes.length&&(0,t.jsx)("li",{className:"px-3 py-2 text-text-muted",children:"No nodes registered."})]}),m&&(0,t.jsxs)("div",{className:"space-y-2","data-testid":"agent-upgrade-run",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2",children:["running"===m.status&&(0,t.jsx)(p.f,{className:"h-4 w-4 animate-spin text-primary"}),"succeeded"===m.status&&(0,t.jsx)(H.f,{className:"h-4 w-4 text-success"}),"failed"===m.status&&(0,t.jsx)(W.f,{className:"h-4 w-4 text-danger"}),(0,t.jsx)("span",{className:"font-bold uppercase tracking-wider",children:"running"===m.status?`Upgrading to ${m.version}`:m.message??m.status})]}),(0,t.jsx)("ul",{className:"max-h-80 divide-y divide-border/40 overflow-y-auto rounded border border-border",children:m.nodes.map((e,s)=>(0,t.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsxs)("span",{className:"w-40 truncate font-medium text-text",children:[e.name,0===s?" (canary)":""]}),(0,t.jsxs)("span",{className:"num w-28 text-text-muted",children:[e.from," → ",m.version]}),(0,t.jsxs)(r.t,{variant:Y[e.state].variant,children:["requested"===e.state&&(0,t.jsx)(p.f,{className:"mr-1 inline h-3 w-3 animate-spin"}),"reverted"===e.state&&(0,t.jsx)(U.f,{className:"mr-1 inline h-3 w-3"}),Y[e.state].label]}),e.detail&&(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-text-muted",title:e.detail,children:e.detail})]},e.nodeId))})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:"text-text-muted",children:"The first agent is a canary. Each agent switches back by itself if the new version does not report a heartbeat in time; the run stops at the first failure."}),(0,t.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:a,children:m&&"running"!==m.status?"Close":"Cancel"}),!m&&(0,t.jsxs)(n.K,{variant:"primary",size:"sm",onClick:()=>void N(),"data-testid":"agent-upgrade-start",disabled:g||0===o.size||!c?.upgradesEnabled,icon:g?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(v.f,{className:"h-3.5 w-3.5"}),children:["Upgrade ",o.size||y," agent",1===(o.size||y)?"":"s"]})]})]})]})})}function X(e){try{let t=JSON.parse(e);if("string"==typeof t.deployError)return{label:"Deploy failed",message:t.deployError};if("string"==typeof t.upgradeError)return{label:"Upgrade failed",message:t.upgradeError};return null}catch{return null}}e.s(["default",0,function({initialNodes:e,initialTailscaleSummary:R}){let E,U,{activeNode:z}=(0,c.l)(),[P,A]=(0,s.useState)(e),[$,I]=(0,s.useState)((!!e.length||void 0===e)&&!1),[O,_]=(0,s.useState)(null),[T,K]=(0,s.useState)(!1),[H,W]=(0,s.useState)(!1);(0,s.useEffect)(()=>{"agents"===new URLSearchParams(window.location.search).get("upgrade")&&W(!0)},[]);let[Y,Z]=(0,s.useState)(null),[ee,et]=(0,s.useState)(null),[es,ea]=(0,s.useState)(!1),[er,en]=(0,s.useState)([]),[ei,el]=(0,s.useState)(null),[ec,ed]=(0,s.useState)({}),[eo,eu]=(0,s.useState)(null),[em,ex]=(0,s.useState)(R),ep=(0,s.useRef)(null),eh=(0,s.useRef)({}),[ef,eg]=(0,s.useState)(e.length>0),ej=(0,s.useCallback)(async(e=!1)=>{try{e||I(!0),_(null);let[t,s,a]=await Promise.all([l.f.nodes.list(),l.f.nodes.systemUpdatesSummary().catch(()=>null),l.f.nodes.tailscaleSummary().catch(()=>null)]),r=t.data.map(e=>{if(e.role)return delete eh.current[e.id],e;let t=eh.current[e.id];return void 0!==t?{...e,role:t}:e});A(r),eu(s?.data??null),ex(a?.data??null);let n=await Promise.all(r.map(async e=>{try{let t=await l.f.nodes.health(e.id);return[e.id,t.data]}catch{return[e.id,null]}}));ed(Object.fromEntries(n.filter(e=>null!==e[1])))}catch(a){let t=a instanceof Error?a.message:String(a),s="Failed to fetch"===t||t.includes("TypeError")||t.includes("NetworkError")||t.includes("ECONNREFUSED")||t.includes("timeout");e||_(s?`Control node unreachable (${z.name})`:t)}finally{e||I(!1)}},[z.name]);(0,s.useEffect)(()=>{if(ef){eg(!1),(async()=>{e.length>0&&ed(Object.fromEntries((await Promise.all(e.map(async e=>{try{let t=await l.f.nodes.health(e.id);return[e.id,t.data]}catch{return[e.id,null]}}))).filter(e=>null!==e[1])));try{let e=await l.f.nodes.systemUpdatesSummary();eu(e.data)}catch{eu(null)}try{let e=await l.f.nodes.tailscaleSummary();ex(e.data??null)}catch{ex(null)}})();return}A([]),_(null),en([]),ed({}),eu(null),ex(null),eh.current={},ej()},[z.id]),(0,s.useEffect)(()=>{let e=P.some(e=>"PROVISIONING"===e.status||e.agent?.status==="UPDATING");return e&&!ep.current?ep.current=setInterval(()=>{ej(!0)},4e3):!e&&ep.current&&(clearInterval(ep.current),ep.current=null),()=>{ep.current&&(clearInterval(ep.current),ep.current=null)}},[P,ej]);let eb=async e=>{if(confirm(`Delete node "${e.name}"? This will permanently remove it and all associated data.`))try{await l.f.nodes.delete(e.id),ej()}catch{}},ey=async()=>{ea(!0),en([]);try{let e=await l.f.discovery.scan(5e3);e.success&&Array.isArray(e.data)&&en(e.data)}catch{}finally{ea(!1)}};return(0,t.jsxs)(D.U,{className:"space-y-6",children:[(0,t.jsx)(D.z,{children:(0,t.jsx)(V.f,{title:"Nodes",eyebrow:"Fleet",description:"Manage your Magnus fleet nodes",status:P.length>0?(0,t.jsxs)("span",{className:"flex items-center gap-3 text-[10px] uppercase tracking-wider text-text-muted",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(G.f,{status:"ONLINE",size:"xs"}),(0,t.jsx)("span",{className:"num",children:P.filter(e=>"ONLINE"===e.status).length})," online"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(G.f,{status:"OFFLINE",size:"xs",pulse:!1}),(0,t.jsx)("span",{className:"num",children:P.filter(e=>"OFFLINE"===e.status).length})," offline"]})]}):void 0,actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(o.f,{className:"h-3.5 w-3.5"}),onClick:()=>void ej(),children:"Refresh"}),(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(v.f,{className:"h-3.5 w-3.5"}),onClick:()=>W(!0),"data-testid":"open-agent-upgrade",children:"Upgrade Agents"}),(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(d.f,{className:"h-3.5 w-3.5"}),onClick:()=>K(!0),children:"Register Node"})]})})}),(0,t.jsx)(D.z,{children:(0,t.jsx)(F,{})}),em&&(0,t.jsx)(D.z,{children:(0,t.jsx)(L.f,{summary:em,showAction:!1})}),eo&&(0,t.jsx)(D.z,{children:(0,t.jsx)("section",{className:"panel-corners overflow-hidden rounded-panel border border-border bg-surface","aria-label":"System update readiness",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 divide-x divide-y divide-border/60 sm:grid-cols-4 sm:divide-y-0",children:[(0,t.jsxs)("div",{className:"col-span-2 flex items-center gap-3 px-4 py-3 sm:col-span-1",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-panel border border-primary/30 bg-primary/10 text-primary shadow-[0_0_10px_var(--color-glow)]",children:(0,t.jsx)(b.f,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Auto-update coverage"}),(0,t.jsxs)("p",{className:"num mt-0.5 text-sm font-semibold",children:[eo.enabled," / ",eo.reporting," enabled"]}),(0,t.jsx)(q.f,{className:"mt-1.5",value:eo.reporting>0?eo.enabled/eo.reporting*100:null,tone:eo.enabled===eo.reporting?"success":"warning",label:"Auto-update coverage"})]})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Action needed"}),(0,t.jsx)("p",{className:`num mt-1 text-lg font-bold ${eo.actionNeeded?"text-warning glow-text-warning":"text-success"}`,children:eo.actionNeeded})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Reboot debt"}),(0,t.jsxs)("p",{className:`num mt-1 flex items-center gap-1.5 text-lg font-bold ${eo.rebootRequired?"text-danger glow-text-danger":"text-success"}`,children:[eo.rebootRequired?(0,t.jsx)(y.f,{className:"h-4 w-4"}):null,eo.rebootRequired]})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Reporting"}),(0,t.jsxs)("p",{className:"num mt-1 text-lg font-bold",children:[eo.reporting," / ",eo.total]})]})]})})}),(0,t.jsx)(D.z,{children:(0,t.jsx)(a.N,{children:O?O.startsWith("Control node unreachable")?(0,t.jsx)(M.f,{tone:"warning",icon:(0,t.jsx)(x.f,{className:"h-5 w-5"}),title:O,description:"Cannot connect to this Control Node. Verify it is running and reachable.",action:(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:()=>void ej(),children:"Retry"})}):(0,t.jsx)(M.f,{tone:"danger",icon:(0,t.jsx)(h.f,{className:"h-5 w-5"}),title:"Error loading nodes",description:O,action:(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:()=>void ej(),children:"Retry"})}):$?(0,t.jsx)(J.F,{rows:6,cols:9,className:"border-0"}):0===P.length?(0,t.jsx)(M.f,{tone:"primary",icon:(0,t.jsx)(N.f,{className:"h-5 w-5"}),title:"No nodes registered",description:"Register your first Magnus node to get started.",action:(0,t.jsx)(n.K,{size:"sm",icon:(0,t.jsx)(d.f,{className:"h-3.5 w-3.5"}),onClick:()=>K(!0),children:"Register Node"})}):(0,t.jsx)("div",{className:"max-h-[70vh] overflow-auto",children:(0,t.jsxs)("table",{className:"w-full text-[11px]",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"sticky top-0 z-10 border-b border-primary/30 bg-surface/95 text-left text-[10px] font-bold uppercase tracking-[0.15em] text-text-muted shadow-[0_1px_0_var(--color-primary),0_4px_12px_-6px_var(--color-glow)] backdrop-blur-sm",children:[(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Name"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Host"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Address"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Status"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Agent"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Role"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"CPU"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Memory"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Persistent Disk"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Updates"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Tailscale key"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Last Heartbeat"}),(0,t.jsx)("th",{className:"pb-3",children:"Actions"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border/50",children:P.map(e=>{var s;let a=ec[e.id],l=(function(e){if(Array.isArray(e))return e;if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}})(a?.disks).filter(e=>"/"===e.mountPoint||"/home"===e.mountPoint||e.mountPoint.startsWith("/home/")||e.mountPoint.startsWith("/mnt/")||e.mountPoint.startsWith("/srv/")).filter(e=>!w.some(t=>e.mountPoint===t||e.mountPoint.startsWith(t))).filter(e=>!k.has((e.filesystemType??"").toLowerCase())).sort((e,t)=>t.usagePercent-e.usagePercent)[0]??null,c=l?(s=l.usagePercent)>=95?"critical":s>=80?"warning":"normal":null,d=eo?.nodes.find(t=>t.id===e.id)?.systemUpdates??null,o=em?.nodes.find(t=>t.id===e.id)?.tailscale??null;return(0,t.jsxs)("tr",{className:"group/row relative transition-colors hover:bg-primary/[0.03] [&>td:first-child]:shadow-[inset_2px_0_0_transparent] hover:[&>td:first-child]:shadow-[inset_2px_0_0_var(--color-primary)]",children:[(0,t.jsx)("td",{className:"py-3 pl-2 pr-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(G.f,{status:e.status,size:"xs"}),"ONLINE"===e.status&&(0,t.jsx)("button",{onClick:()=>el(e),title:`Open terminal on ${e.name}`,className:"flex h-6 w-6 items-center justify-center rounded border border-border/50 text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:(0,t.jsx)(j.f,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.default,{href:`/nodes/${e.id}`,className:"font-medium text-primary hover:text-primary-hover transition-colors",children:e.name})]})}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:e.hostname}),(0,t.jsxs)("td",{className:"py-3 pr-4 text-text-muted",children:[e.ipAddress,":",e.port]}),(0,t.jsx)("td",{className:"py-3 pr-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(r.t,{variant:(0,r.k)(e.status),children:e.status}),("DEGRADED"===e.status||e.agent?.status==="ERROR")&&X(e.metadata)&&(0,t.jsx)("span",{title:`${X(e.metadata).label}: ${X(e.metadata).message}`,children:(0,t.jsx)(h.f,{className:"h-3.5 w-3.5 text-danger cursor-help"})}),"PROVISIONING"===e.status&&(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 text-info animate-spin"})]})}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[e.agent?`v${e.agent.version}`:"—",e.agent?.status==="UPDATING"&&(0,t.jsx)(p.f,{className:"h-3 w-3 text-info animate-spin"})]})}),(0,t.jsx)("td",{className:"py-3 pr-4",children:e.role?(0,t.jsxs)("button",{className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/5 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider text-primary hover:bg-primary/10 hover:border-primary/50 transition-all cursor-pointer",onClick:()=>et(e),title:"Change role",children:[(0,t.jsx)(g.f,{className:"h-3 w-3"}),e.role.name]}):(0,t.jsx)("button",{className:"text-[10px] text-text-muted hover:text-primary transition-colors cursor-pointer uppercase tracking-wider",onClick:()=>et(e),children:"+ Assign"})}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:a?(0,t.jsx)(q.f,{value:a.cpuUsagePercent,label:`${e.name} CPU`,valueLabel:`${a.cpuUsagePercent.toFixed(1)}%`,showValue:!0,className:"w-28"}):"—"}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:a?(0,t.jsxs)("div",{className:"w-36",children:[(0,t.jsx)(q.f,{value:a.memoryPercent,label:`${e.name} memory`,showValue:!0}),(0,t.jsxs)("span",{className:"num mt-0.5 block text-[10px] text-text-muted/80",children:[(a.memoryUsedBytes/0x40000000).toFixed(1)," / ",(a.memoryTotalBytes/0x40000000).toFixed(1)," GB"]})]}):"—"}),(0,t.jsx)("td",{className:"py-3 pr-4",children:l?(0,t.jsxs)("span",{className:"flex w-36 flex-col gap-0.5",title:`${l.mountPoint} filesystem is ${l.usagePercent}% used${"normal"===c?"":" — disk usage anomaly"}`,children:[(0,t.jsx)(q.f,{value:l.usagePercent,tone:"critical"===c?"danger":"warning"===c?"warning":"success",label:`${e.name} ${l.mountPoint} disk`,valueLabel:`${l.usagePercent.toFixed(0)}%`,glow:"normal"!==c,showValue:!0}),(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-text-muted",children:["normal"!==c&&(0,t.jsx)(f.f,{"aria-label":`${c} disk usage anomaly`,className:"critical"===c?"h-3 w-3 text-danger":"h-3 w-3 text-warning"}),l.mountPoint]})]}):(0,t.jsx)("span",{className:"text-text-muted",children:"—"})}),(0,t.jsx)("td",{className:"py-3 pr-4",children:d?d.rebootRequired?(0,t.jsx)(r.t,{variant:"danger",children:"reboot required"}):"enabled"===d.automaticUpdates?(0,t.jsx)(r.t,{variant:"success",children:"automatic"}):"unsupported"===d.automaticUpdates?(0,t.jsx)(r.t,{variant:"default",children:"unsupported"}):(0,t.jsx)(r.t,{variant:"warning",children:"enable updates"}):(0,t.jsx)(r.t,{variant:"default",children:"awaiting agent"})}),(0,t.jsx)("td",{className:"py-3 pr-4",title:o?.keyExpiry?`Expires ${o.keyExpiry}`:void 0,children:o?o.expiryEnabled?o.expired?(0,t.jsx)(r.t,{variant:"danger",children:"expired"}):null===o.daysRemaining?(0,t.jsx)(r.t,{variant:"default",children:"unknown"}):o.requiresRenewal?(0,t.jsxs)(r.t,{variant:"warning",children:[o.daysRemaining,"d"]}):(0,t.jsxs)(r.t,{variant:"success",children:[o.daysRemaining,"d"]}):(0,t.jsx)(r.t,{variant:"success",children:"no expiry"}):(0,t.jsx)(r.t,{variant:"default",children:"awaiting agent"})}),(0,t.jsx)("td",{className:"num py-3 pr-4 text-text-muted",children:(0,i.C)(e.lastHeartbeatAt)}),(0,t.jsx)("td",{className:"py-3",children:(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)(C.default,{href:`/nodes/${e.id}`,children:(0,t.jsx)(n.K,{variant:"ghost",size:"sm",children:"View"})}),(0,t.jsx)(n.K,{variant:"ghost",size:"sm",onClick:()=>Z(e),children:(0,t.jsx)(u.f,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(n.K,{variant:"ghost",size:"sm",onClick:()=>void eb(e),children:(0,t.jsx)(m.f,{className:"h-3.5 w-3.5 text-danger"})})]})})]},e.id)})})]})})})}),(0,t.jsx)(D.z,{children:(0,t.jsxs)(a.N,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(x.f,{className:"h-4 w-4 text-primary"}),(0,t.jsx)("h2",{className:"text-xs font-bold uppercase tracking-wider",children:"Network Discovery"}),(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"— Unadopted agents found on the local network"})]}),(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:es?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(x.f,{className:"h-3.5 w-3.5"}),onClick:()=>void ey(),disabled:es,children:es?"Scanning…":"Scan Network"})]}),0===er.length?es?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 py-6",children:[(0,t.jsxs)("div",{className:"relative h-16 w-16 overflow-hidden rounded-full border border-primary/30 shadow-[0_0_16px_var(--color-glow)]",children:[(0,t.jsx)("div",{className:"absolute inset-0 animate-sweep rounded-full bg-[conic-gradient(from_0deg,transparent_0deg,transparent_280deg,var(--color-primary)_360deg)] opacity-60"}),(0,t.jsx)("div",{className:"absolute inset-[30%] rounded-full border border-primary/20"})]}),(0,t.jsx)("p",{className:"text-[11px] uppercase tracking-wider text-primary",children:"Broadcasting discovery probe…"})]}):(0,t.jsx)(M.f,{compact:!0,icon:(0,t.jsx)(x.f,{className:"h-4 w-4"}),title:"No scan results yet",description:'Click "Scan Network" to discover unadopted agents on your network.'}):(E=er.filter(e=>!e.registered),U=er.filter(e=>e.registered),0===E.length?(0,t.jsxs)("div",{className:"py-6 text-center text-[11px] text-text-muted",children:["All ",U.length," discovered agent",1!==U.length?"s":""," already registered. No new nodes to adopt."]}):(0,t.jsxs)("div",{className:"overflow-x-auto",children:[(0,t.jsxs)("table",{className:"w-full text-[11px]",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-primary/20 text-left text-[10px] font-bold uppercase tracking-[0.15em] text-text-muted",children:[(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Hostname"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"IP Address"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Port"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Agent Version"}),(0,t.jsx)("th",{className:"pb-3",children:"Registration"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border/50",children:E.map(e=>(0,t.jsxs)("tr",{className:"hover:bg-surface-hover transition-colors",children:[(0,t.jsx)("td",{className:"py-3 pr-4 font-medium",children:e.fqdn||e.hostname}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:e.ip}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:e.port}),(0,t.jsxs)("td",{className:"py-3 pr-4 text-text-muted",children:["v",e.version]}),(0,t.jsx)("td",{className:"py-3 text-text-muted",children:"Use the reviewed key-only agent deploy runbook, then register the authenticated heartbeat."})]},`${e.ip}:${e.port}`))})]}),U.length>0&&(0,t.jsxs)("p",{className:"mt-3 text-xs text-text-muted",children:[U.length," already-registered agent",1!==U.length?"s":""," ","hidden from this list."]})]}))]})}),(0,t.jsx)(Q,{open:H,onClose:()=>W(!1),onFinished:()=>void ej()}),(0,t.jsx)(S.M,{open:T,onClose:()=>K(!1),onRegistered:()=>void ej()}),(0,t.jsx)(S.F,{open:!!Y,node:Y,onClose:()=>Z(null),onSaved:()=>void ej()}),(0,t.jsx)(S.E,{open:!!ee,node:ee,onClose:()=>et(null),onSaved:e=>{ee&&(eh.current[ee.id]=e,A(t=>t.map(t=>t.id===ee.id?{...t,role:e}:t))),ej()}}),(0,t.jsx)(B,{open:!!ei,onClose:()=>el(null),node:ei})]})}],86421)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8593,e=>{var t=e.i(43476),a=e.i(71645),r=e.i(93999),s=e.i(46670),n=e.i(41220),i=e.i(4139),l=e.i(74544),o=e.i(79432),d=e.i(41120),c=e.i(28623),u=e.i(53138),x=e.i(10818),m=e.i(99847),f=e.i(56420);let p={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};p.node;let h=(0,f.f)(p),g={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};g.node;let v=(0,f.f)(g),b={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};b.node;let j=(0,f.f)(b);var w=e.i(82954),y=e.i(15331),N=e.i(3062),_=e.i(73404),k=e.i(54149),I=e.i(51196),M=e.i(75723),$=e.i(78571),A=e.i(72603);function S({value:e,decimals:r=0,prefix:s="",suffix:n="",format:i,duration:l=600,className:o}){let d="number"==typeof e&&Number.isFinite(e),[c,u]=(0,a.useState)(d?e:null),x=(0,a.useRef)(d?e:null);(0,a.useEffect)(()=>{if(!d){x.current=null,u(null);return}let t=x.current;if(x.current=e,null===t||t===e||(0,A.d)())return void u(e);let a=0,r=performance.now(),s=n=>{let i=Math.min(1,(n-r)/l);u(t+(e-t)*(i>=1?1:1-Math.pow(2,-10*i))),i<1&&(a=requestAnimationFrame(s))};return a=requestAnimationFrame(s),()=>cancelAnimationFrame(a)},[d,e,l]);let m=null===c?"—":`${s}${i?i(c):c.toFixed(r)}${n}`;return(0,t.jsx)("span",{className:(0,$.f)("num",o),children:m})}var C=e.i(2067),O=e.i(65369),P=e.i(21176);let E={online:"bg-success shadow-[0_0_6px_var(--color-success)]",degraded:"bg-warning shadow-[0_0_6px_var(--color-warning)]",offline:"bg-danger shadow-[0_0_8px_var(--color-danger)]",provisioning:"bg-info shadow-[0_0_6px_var(--color-info)]"};function F(e){let t=43758.5453*Math.sin(12.9898*e+78.233);return t-Math.floor(t)}function L({counts:e,size:a=176,className:r}){let s=[],n=1;for(let t of["offline","degraded","provisioning","online"])for(let a=0;a<e[t]&&s.length<64;a++,n++){let e="online"===t?[.45,.92]:"provisioning"===t?[.3,.7]:[.15,.55],r=e[0]+F(n)*(e[1]-e[0]),i=F(n+101)*Math.PI*2;s.push({key:`${t}-${a}`,status:t,x:50+Math.cos(i)*r*50,y:50+Math.sin(i)*r*50})}let i=e.online+e.degraded+e.offline+e.provisioning;return(0,t.jsxs)("div",{role:"img","aria-label":`Fleet radar: ${e.online} online, ${e.degraded} degraded, ${e.offline} offline, ${e.provisioning} provisioning`,className:(0,$.f)("relative shrink-0 overflow-hidden rounded-full border border-primary/30 bg-bg shadow-[0_0_24px_var(--color-glow),inset_0_0_24px_var(--color-glow)]",r),style:{width:a,height:a},children:[(0,t.jsx)("div",{className:"absolute inset-[16%] rounded-full border border-primary/15"}),(0,t.jsx)("div",{className:"absolute inset-[33%] rounded-full border border-primary/15"}),(0,t.jsx)("div",{className:"absolute inset-y-0 left-1/2 w-px bg-primary/10"}),(0,t.jsx)("div",{className:"absolute inset-x-0 top-1/2 h-px bg-primary/10"}),(0,t.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 animate-sweep rounded-full bg-[conic-gradient(from_0deg,transparent_0deg,transparent_290deg,color-mix(in_srgb,var(--color-primary)_35%,transparent)_355deg,var(--color-primary)_360deg)] opacity-70"}),s.map(e=>(0,t.jsx)("span",{"aria-hidden":"true",className:(0,$.f)("absolute h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full",E[e.status],"offline"===e.status&&"animate-pulse"),style:{left:`${e.x}%`,top:`${e.y}%`}},e.key)),(0,t.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,t.jsx)("span",{className:"num text-2xl font-bold text-primary glow-text-primary",children:i}),(0,t.jsx)("span",{className:"text-[9px] uppercase tracking-[0.25em] text-text-muted",children:"nodes"})]})]})}var R=e.i(1092);function T(e,t){return e.map(e=>e[t]).filter(e=>"number"==typeof e&&Number.isFinite(e))}var z=e.i(68759),D=e.i(82983),U=e.i(4050),G=e.i(71417),B=e.i(63376),V=e.i(22016),H=e.i(67683);function q({href:e,label:a,icon:r}){return(0,t.jsxs)(V.default,{href:e,className:"glow-hover group flex flex-col items-center gap-2 rounded-panel border border-border bg-surface-raised/60 p-4 text-center transition-colors duration-300 hover:border-primary/50 hover:bg-primary/5",children:[(0,t.jsx)("span",{className:"text-primary transition-all group-hover:drop-shadow-[0_0_8px_var(--color-primary)]",children:r}),(0,t.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wider text-text-muted group-hover:text-primary transition-colors",children:a})]})}e.s(["default",0,function({initialStats:e,initialTailscaleSummary:f}){let p,g,{activeNode:b,nodes:$}=(0,U.l)(),[A,E]=(0,a.useState)(e),[F,J]=(0,a.useState)(f),[W,K]=(0,a.useState)(!e),[Q,X]=(0,a.useState)([]),[Z,Y]=(0,a.useState)(null),[ee,et]=(0,a.useState)([]),ea=(0,a.useRef)(!!e),[er,es]=(0,a.useState)(!1),[en,ei]=(0,a.useState)([]),el=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/federation"),t=await e.json();t.success&&(E(t.data.aggregated),ei(t.data.fleets))}catch{}},[]),eo=(0,a.useCallback)(async()=>{let e=await D.f.nodes.tailscaleSummary().catch(()=>null);e?.success&&e.data&&J(e.data)},[]),ed=(0,a.useCallback)(async(e=!1)=>{try{e||K(!0),eo();let t=await D.f.stats.overview();t.success&&E(t.data)}catch(t){let e=t instanceof Error?t.message:String(t);console.error("[DashboardPage] fetchStats error:",e)}finally{e||K(!1)}},[eo]);(0,a.useEffect)(()=>{if(er){el();let e=setInterval(()=>void el(),15e3);return()=>clearInterval(e)}if(ea.current){ea.current=!1,f||eo();let e=setInterval(()=>void ed(!0),15e3);return()=>clearInterval(e)}E(null),K(!0),ed();let e=setInterval(()=>void ed(!0),15e3);return()=>clearInterval(e)},[ed,el,eo,b.id,er,f]);let ec=(0,a.useCallback)(async()=>{try{let[e,t]=await Promise.all([D.f.assistant.getInsights(),D.f.assistant.listPinnedInsights()]);X(e.data?.insights??[]),Y(e.data?.generatedAt??null),et(t.data?.pins??[])}catch{}},[]);async function eu(e){let t=ee.find(t=>t.title===e.title&&t.body===e.body);try{t?await D.f.assistant.unpinInsight(t.id):await D.f.assistant.pinInsight({...e,generatedAt:Z??void 0}),await ec()}catch{}}(0,a.useEffect)(()=>{ec();let e=setInterval(()=>void ec(),3e5);return()=>clearInterval(e)},[ec]);let ex=function(e,t){let[r,s]=(0,a.useState)([]);(0,a.useEffect)(()=>{s(function(e){try{let t=window.sessionStorage.getItem(e),a=t?JSON.parse(t):null;return Array.isArray(a)?a.slice(-40):[]}catch{return[]}}(e))},[e]);let n=t?JSON.stringify(t):null;return(0,a.useEffect)(()=>{if(!n)return;let t=JSON.parse(n);s(a=>{let r=Date.now(),s=a[a.length-1];if(s&&r-s.t<5e3&&JSON.stringify({...s,t:void 0})===JSON.stringify({...t,t:void 0}))return a;let n=[...a,{...t,t:r}].slice(-40);try{window.sessionStorage.setItem(e,JSON.stringify(n))}catch{}return n})},[e,n]),r}(`magnus:overview:${er?"federation":b.id}`,A?{online:A.nodes.online,active:A.commands.running+A.commands.pending,cron:A.cron.active,cpu:A.health.avgCpuPercent,mem:A.health.avgMemoryPercent}:null),em=ex.length>1?ex[ex.length-2]:void 0,ef=(e,t)=>{let a=em?.[e];return"number"==typeof a&&"number"==typeof t?Math.round((t-a)*10)/10:void 0},ep=A?.health.avgCpuPercent??null,eh=A?.health.avgMemoryPercent??null,eg=A&&A.nodes.total>0?A.nodes.online/A.nodes.total*100:null,ev=A?A.nodes.offline>0?{label:"Nodes offline",tone:"danger"}:A.nodes.degraded>0?{label:"Degraded",tone:"warning"}:{label:"All systems nominal",tone:"success"}:{label:"Acquiring",tone:"muted"},eb=A?A.health.reportingNodes>0?{value:`${A.health.reportingNodes} node${1!==A.health.reportingNodes?"s":""} reporting`,positive:!0}:{value:"No health data",positive:!1}:{value:"Connecting…",positive:!0},ej=ex.map(e=>({t:e.t,cpu:e.cpu??null,mem:e.mem??null}));return(0,t.jsxs)(B.U,{className:"space-y-6",children:[(0,t.jsx)(B.z,{children:(0,t.jsx)(_.f,{title:er?"Federated Fleet Overview":"Fleet Overview",eyebrow:er?"Federation · live":"Fleet · live",description:er?`Aggregated stats across ${en.length} control node${1!==en.length?"s":""}`:"Real-time status of your Magnus fleet",status:(0,t.jsx)(s.t,{variant:"muted"===ev.tone?"default":"danger"===ev.tone?"danger":"warning"===ev.tone?"warning":"success",dot:!0,pulse:"success"!==ev.tone,children:ev.label}),actions:(0,t.jsxs)(t.Fragment,{children:[$.length>1&&(0,t.jsx)(z.K,{variant:er?"primary":"secondary",size:"sm",icon:(0,t.jsx)(j,{className:"h-3.5 w-3.5"}),onClick:()=>es(e=>!e),children:er?"All Fleets":"Single Fleet"}),(0,t.jsx)(z.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(d.f,{className:"h-3.5 w-3.5"}),onClick:()=>er?void el():void ed(),children:"Refresh"})]})})}),!er&&F&&(0,t.jsx)(B.z,{children:(0,t.jsx)(H.f,{summary:F})}),(0,t.jsx)(B.z,{children:(0,t.jsx)(N.f,{hero:!0,padding:"lg",tone:"danger"===ev.tone?"danger":"warning"===ev.tone?"warning":"primary",testId:"overview-hero",children:!A&&W?(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-around gap-6","aria-busy":"true",children:[[0,1,2].map(e=>(0,t.jsx)("div",{className:"skeleton h-36 w-36 rounded-full opacity-60"},e)),(0,t.jsx)("div",{className:"skeleton h-44 w-44 rounded-full opacity-60"})]}):(0,t.jsxs)("div",{className:"grid gap-6 xl:grid-cols-[auto_1fr]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-6 sm:justify-start",children:[(0,t.jsx)(L,{counts:{online:A?.nodes.online??0,degraded:A?.nodes.degraded??0,offline:A?.nodes.offline??0,provisioning:A?.nodes.provisioning??0}}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-center gap-4",children:[(0,t.jsx)(k.f,{value:eg,label:"Nodes online",tone:A?A.nodes.offline>0?"danger":A.nodes.online<A.nodes.total?"warning":"success":"muted",display:A?`${A.nodes.online}/${A.nodes.total}`:void 0,size:150,testId:"overview-gauge-online"}),(0,t.jsx)(k.f,{value:ep,label:"Avg CPU",size:150,sublabel:A?`${A.health.reportingNodes} reporting`:void 0,testId:"overview-gauge-cpu"}),(0,t.jsx)(k.f,{value:eh,label:"Avg memory",size:150,testId:"overview-gauge-mem"})]})]}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-text-muted",children:"CPU / memory · this session"}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-[10px] uppercase tracking-wider text-text-muted",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"ONLINE",size:"xs",pulse:!1}),A?.nodes.online??0," up"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"DEGRADED",size:"xs"}),A?.nodes.degraded??0," degraded"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"OFFLINE",size:"xs",pulse:(A?.nodes.offline??0)>0}),A?.nodes.offline??0," down"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"PROVISIONING",size:"xs",pulse:!1}),A?.nodes.provisioning??0," provisioning"]})]})]}),ej.length>1?(0,t.jsx)(P.f,{data:ej,xKey:"t",percent:!0,height:170,formatX:e=>new Date(Number(e)).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"}),series:[{key:"cpu",label:"CPU",tone:"primary"},{key:"mem",label:"Memory",tone:"accent"}],testId:"overview-session-chart"}):(0,t.jsxs)("div",{className:"flex h-[170px] items-center justify-center rounded-panel border border-dashed border-primary/20 text-[11px] uppercase tracking-wider text-text-muted",children:[(0,t.jsx)("span",{className:"mr-2 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-primary"}),"Collecting samples — trend appears after the next poll"]})]})]})})}),(0,t.jsx)(B.z,{children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,t.jsx)(r.n,{label:"Total Nodes",value:A?(0,t.jsx)(S,{value:A.nodes.total}):"—",icon:(0,t.jsx)(n.f,{className:"h-4 w-4"}),trend:A?{value:`${A.nodes.online} online`,positive:A.nodes.online>0}:{value:"Loading…",positive:!0},spark:T(ex,"online"),delta:void 0!==(p=ef("online",A?.nodes.online))?{value:p,unit:" up"}:void 0}),(0,t.jsx)(r.n,{label:"Active Commands",value:A?(0,t.jsx)(S,{value:A.commands.running+A.commands.pending}):"—",icon:(0,t.jsx)(i.f,{className:"h-4 w-4"}),trend:A?{value:`${A.commands.total} total`,positive:!0}:void 0,spark:T(ex,"active"),tone:"accent"}),(0,t.jsx)(r.n,{label:"Cron Jobs",value:A?(0,t.jsx)(S,{value:A.cron.total}):"—",icon:(0,t.jsx)(l.f,{className:"h-4 w-4"}),trend:A?{value:`${A.cron.active} active`,positive:A.cron.active>0}:void 0,spark:T(ex,"cron")}),(0,t.jsx)(r.n,{label:"System Health",value:W||null===ep?"—":(0,t.jsx)(S,{value:ep,decimals:+!Number.isInteger(ep),suffix:"% CPU"}),icon:(0,t.jsx)(o.f,{className:"h-4 w-4"}),trend:eb,meter:W?void 0:ep,delta:void 0!==(g=ef("cpu",ep))?{value:g,unit:"%",positiveIsGood:!1}:void 0,tone:null!==ep&&ep>=90?"danger":null!==ep&&ep>=70?"warning":"primary"})]})}),er&&en.length>0&&(0,t.jsx)(B.z,{children:(0,t.jsx)(N.f,{title:"Fleet Breakdown",children:(0,t.jsx)("div",{className:"space-y-2",children:en.map(e=>(0,t.jsxs)("div",{className:"grid grid-cols-1 items-center gap-3 rounded-chip border border-border/50 bg-surface-raised px-4 py-2.5 text-xs sm:grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)_auto]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.f,{status:e.stats?"ONLINE":"OFFLINE"}),(0,t.jsx)("span",{className:"font-medium",children:e.nodeName})]}),e.stats?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.f,{value:e.stats.nodes.total>0?e.stats.nodes.online/e.stats.nodes.total*100:null,tone:e.stats.nodes.offline>0?"warning":"success",label:`${e.nodeName} nodes online`,valueLabel:`${e.stats.nodes.online}/${e.stats.nodes.total}`,showValue:!0}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-text-muted",children:[(0,t.jsxs)("span",{className:"num",children:[e.stats.nodes.total," nodes"]}),(0,t.jsxs)("span",{className:"num",children:[e.stats.commands.running," running"]})]})]}):(0,t.jsx)(s.t,{variant:(0,s.k)("OFFLINE"),className:"justify-self-start",children:"Unreachable"})]},e.nodeId))})})}),(0,t.jsx)(B.z,{children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[(0,t.jsx)(N.f,{title:"Recent Commands",icon:(0,t.jsx)(i.f,{className:"h-3.5 w-3.5"}),children:A?0===A.recentCommands.length?(0,t.jsx)(C.f,{compact:!0,icon:(0,t.jsx)(i.f,{className:"h-4 w-4"}),title:"No commands dispatched yet",action:(0,t.jsx)(V.default,{href:"/commands",className:"text-[11px] uppercase tracking-wider text-primary hover:underline",children:"Run a command →"})}):(0,t.jsx)("div",{className:"space-y-1.5",children:A.recentCommands.map(e=>(0,t.jsxs)("div",{className:"scan-sweep flex items-center justify-between gap-2 rounded-chip border border-border/50 bg-surface-raised/60 px-3 py-2 text-[11px] transition-colors hover:border-primary/30",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(M.f,{status:e.status,size:"xs"}),(0,t.jsx)("code",{className:"truncate text-primary",children:e.command}),e.node&&(0,t.jsxs)("span",{className:"shrink-0 text-text-muted",children:["on ",e.node.name]})]}),(0,t.jsxs)("div",{className:"ml-2 flex shrink-0 items-center gap-2",children:[(0,t.jsx)(s.t,{variant:(0,s.k)(e.status),children:e.status}),(0,t.jsx)("span",{className:"num hidden text-text-muted sm:inline",children:(0,G.C)(e.createdAt)})]})]},`${e.id}-${e.status}`))}):W?(0,t.jsx)(O.Q,{lines:4}):(0,t.jsx)(C.f,{compact:!0,title:"Stats unavailable",description:"The Control API did not answer; retrying every 15 seconds.",tone:"warning"})}),(0,t.jsx)(N.f,{title:"Recent Activity",tone:"accent",icon:(0,t.jsx)(w.f,{className:"h-3.5 w-3.5"}),children:A?0===A.recentAudit.length?(0,t.jsx)(C.f,{compact:!0,icon:(0,t.jsx)(w.f,{className:"h-4 w-4"}),title:"No audit events yet"}):(0,t.jsx)("ol",{className:"relative space-y-1.5 border-l border-accent/20 pl-3",children:A.recentAudit.map(e=>(0,t.jsxs)("li",{className:"relative flex items-center justify-between gap-2 rounded-chip px-2 py-1.5 text-[11px] transition-colors hover:bg-accent/5",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"absolute -left-[15.5px] top-1/2 h-1.5 w-1.5 -translate-y-1/2 rounded-full bg-accent shadow-[0_0_6px_var(--color-accent)]"}),(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate font-medium text-text",children:e.action}),e.targetType&&(0,t.jsxs)("span",{className:"truncate text-text-muted",children:[e.targetType,e.targetId?` ${e.targetId.slice(0,8)}…`:""]})]}),(0,t.jsx)("span",{className:"num shrink-0 text-text-muted",children:(0,G.C)(e.timestamp)})]},e.id))}):W?(0,t.jsx)(O.Q,{lines:4}):(0,t.jsx)(C.f,{compact:!0,title:"Audit feed unavailable",tone:"warning"})}),(0,t.jsx)(N.f,{title:"Live Event Stream",icon:(0,t.jsx)(y.f,{className:"h-3.5 w-3.5"}),tone:"success",children:(0,t.jsx)(R.d,{limit:7})})]})}),(0,t.jsx)(B.z,{children:(0,t.jsx)(N.f,{title:"Quick Actions",interactive:!1,children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,t.jsx)(q,{href:"/nodes",label:"Manage Nodes",icon:(0,t.jsx)(n.f,{className:"h-5 w-5"})}),(0,t.jsx)(q,{href:"/commands",label:"Run Command",icon:(0,t.jsx)(i.f,{className:"h-5 w-5"})}),(0,t.jsx)(q,{href:"/cron",label:"Cron Jobs",icon:(0,t.jsx)(l.f,{className:"h-5 w-5"})}),(0,t.jsx)(q,{href:"/files",label:"Edit Files",icon:(0,t.jsx)(o.f,{className:"h-5 w-5"})})]})})}),(ee.length>0||Q.length>0)&&(0,t.jsx)(B.z,{children:(0,t.jsxs)(N.f,{title:"AI Insights",icon:(0,t.jsx)(c.f,{className:"h-4 w-4"}),action:Z?(0,t.jsxs)("span",{className:"num text-[10px] text-text-muted",children:["Updated ",(0,G.C)(Z)]}):void 0,children:[ee.length>0&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("p",{className:"mb-2 text-[10px] font-bold uppercase tracking-wider text-text-muted",children:"Pinned"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-2 lg:grid-cols-2",children:ee.map(e=>(0,t.jsxs)("div",{className:"rounded-chip border border-primary/25 bg-primary/5 px-3 py-2 shadow-[inset_2px_0_0_var(--color-primary)]",children:[(0,t.jsxs)("div",{className:"mb-1 flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs font-bold text-text",children:e.title}),(0,t.jsxs)("p",{className:"text-[10px] text-text-muted",children:["Pinned ",(0,G.C)(e.pinnedAt)]})]}),(0,t.jsx)("button",{onClick:()=>void D.f.assistant.unpinInsight(e.id).then(ec),className:"rounded p-1 text-text-muted transition-colors hover:text-warning",title:"Unpin insight",children:(0,t.jsx)(v,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("p",{className:"text-[11px] text-text-muted",children:e.body})]},e.id))})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:Q.slice(0,6).map((e,a)=>{let r="critical"===e.severity?m.f:"warning"===e.severity?u.f:x.f,s="critical"===e.severity?"text-danger border-danger/30 bg-danger/5 shadow-[inset_2px_0_0_var(--color-danger),0_0_12px_var(--color-glow-danger)]":"warning"===e.severity?"text-warning border-warning/30 bg-warning/5 shadow-[inset_2px_0_0_var(--color-warning)]":"text-info border-info/30 bg-info/5 shadow-[inset_2px_0_0_var(--color-info)]",n=ee.some(t=>t.title===e.title&&t.body===e.body);return(0,t.jsxs)("div",{className:`rounded-chip border px-3 py-2 ${s}`,children:[(0,t.jsxs)("div",{className:"mb-1 flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5 flex-shrink-0"}),(0,t.jsx)("span",{className:"truncate text-xs font-bold",children:e.title})]}),(0,t.jsx)("button",{onClick:()=>void eu(e),className:"rounded p-1 transition-colors hover:bg-white/5",title:n?"Unpin insight":"Pin insight",children:n?(0,t.jsx)(v,{className:"h-3 w-3"}):(0,t.jsx)(h,{className:"h-3 w-3"})})]}),(0,t.jsx)("p",{className:"line-clamp-2 text-[10px] opacity-80",children:e.body})]},a)})})]})})]})}],8593)},67683,e=>{var t=e.i(43476),a=e.i(22016),r=e.i(53138),s=e.i(16306);e.s(["f",0,function({summary:e,showAction:n=!0}){let i=e.nodes.filter(e=>e.tailscale?.requiresRenewal).sort((e,t)=>e.tailscale?.expired!==t.tailscale?.expired?e.tailscale?.expired?-1:1:(e.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER)-(t.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER));if(0===i.length)return null;let l=i.some(e=>e.tailscale?.expired),o=l?s.f:r.f,d=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,t.jsxs)("section",{id:"tailscale-renewal",role:"alert","aria-label":"Tailscale renewal alert",className:`relative overflow-hidden rounded border px-4 py-3 ${d.panel}`,children:[(0,t.jsx)("div",{className:`absolute inset-y-0 left-0 w-0.5 ${d.rail}`}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,t.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded ${d.icon}`,children:(0,t.jsx)(o,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:`text-xs font-bold uppercase tracking-[0.14em] ${d.text}`,children:l?"Tailscale access expired":"Tailscale renewal due"}),(0,t.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,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:i.map(e=>(0,t.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] ${d.chip}`,children:[(0,t.jsx)("span",{className:"font-semibold",children:e.name}),(0,t.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,t.jsx)("span",{children:e.tailscale?.expired?"expired":`${e.tailscale?.daysRemaining??"?"}d`})]},e.id))})]})]}),n&&(0,t.jsx)(a.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 ${d.action}`,children:"Review nodes"})]})]})}])},46670,e=>{var t=e.i(43476),a=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)]"},s={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,t.jsxs)("span",{className:(0,a.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,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,t.jsx)("span",{className:(0,a.f)("absolute inset-0 rounded-full animate-halo",s[n])}),(0,t.jsx)("span",{className:(0,a.f)("relative inline-flex h-1.5 w-1.5 rounded-full",s[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=>{var t=e.i(43476),a=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 s=(0,a.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let d={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)]"},c={xs:"h-1",sm:"h-1.5",md:"h-2"};function u({value:e,max:a=100,tone:r,thresholds:s=o.q,label:n,size:l="xs",showValue:x=!1,valueLabel:m,glow:f,className:p,testId:h}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(a||1)*100)):0,b=r??(g?(0,o.Z)(v,s):"muted"),j=f||!r&&g&&v>=s.warn,w=m??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,t.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":h,children:[(0,t.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":a,"aria-valuenow":g?e:void 0,"aria-valuetext":w,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",c[l]),children:(0,t.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[b],j&&d[b])})}),x&&(0,t.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",g?o.T[b]:"text-text-muted"),children:w})]})}e.s(["f",0,u],51196);var x=e.i(71645);function m({values:e,tone:a="primary",width:r=160,height:s=32,area:n=!0,max:l,percent:d=!1,threshold:c,live:u=!0,emptyLabel:f="not enough data",className:p,testId:h,label:g,stretch:v=!1}){let b=`spark${(0,x.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,t.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":h,children:f});let j=o.v[a],w=l??(d?Math.max(100,...e):Math.max(...e,c??0)||1),y=s-4,N=r/(e.length-1),_=e=>2+y-Math.max(0,e)/w*y,k=e.map((e,t)=>[t*N,_(e)]),I=k.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),M=k[k.length-1];return(0,t.jsxs)("svg",{width:v?"100%":r,height:s,viewBox:`0 0 ${r} ${s}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":h,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.35}),(0,t.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,t.jsx)("polygon",{points:`0,${s} ${I} ${r},${s}`,fill:`url(#${b})`})]}),void 0!==c&&(0,t.jsx)("line",{x1:0,x2:r,y1:_(c),y2:_(c),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,t.jsx)("polyline",{fill:"none",stroke:j,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:I}),u&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:M[0],cy:M[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:M[0],cy:M[1],r:2,fill:j})]})]})}e.s(["f",0,m],55427),e.s(["N",0,function({title:e,description:a,children:r,className:s,action:n,tone:i,corners:o=!1,...d}){return(0,t.jsx)(l.f,{...d,tone:i,corners:o,title:e,description:a,action:n,className:s,children:r})},"n",0,function({label:e,value:a,icon:r,trend:d,spark:c,meter:x,delta:f,tone:p="primary",className:h,testId:g}){let v=!f||f.value>=0===(f.positiveIsGood??!0);return(0,t.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",h),testId:g,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,t.jsx)("span",{className:"text-primary/60",children:r})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,t.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":o.T[p]),children:a}),f&&0!==f.value&&(0,t.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[f.value>0?(0,t.jsx)(n.f,{className:"h-3 w-3"}):(0,t.jsx)(s,{className:"h-3 w-3"}),Math.abs(f.value).toFixed(+!Number.isInteger(f.value)),f.unit]})]}),d&&(0,t.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",d.positive?"text-success":"text-danger"),children:d.value}),void 0!==x&&(0,t.jsx)(u,{value:x,className:"mt-3",label:e}),c&&c.length>1&&(0,t.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,t.jsx)(m,{values:c,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},54149,21176,e=>{var t=e.i(43476),a=e.i(71645),r=e.i(78571),s=e.i(35084);e.s(["f",0,function({value:e,max:n=100,label:i,sublabel:l,tone:o,thresholds:d=s.q,higherIsBetter:c=!1,size:u=140,display:x,ticks:m=!0,hideLabel:f=!1,className:p,testId:h}){let g=(0,a.useId)().replace(/:/g,""),v="number"==typeof e&&Number.isFinite(e),b=v?Math.max(0,Math.min(100,e/(n||1)*100)):0,j=o??(v?c?(0,s.Z)(100-b,d):(0,s.Z)(b,d):"muted"),w=Math.max(4,Math.round(u/16)),y=50-w/2-4,N=2*Math.PI*y,_=.75*N,k=_*b/100,I=u>=140,M=x??(v?`${Math.round(b)}%`:"—"),$=m?Array.from({length:11},(e,a)=>{let r=(135+270*a/10)*Math.PI/180,s=50-(a%5==0?4:2.5);return(0,t.jsx)("line",{x1:50+48.5*Math.cos(r),y1:50+48.5*Math.sin(r),x2:50+s*Math.cos(r),y2:50+s*Math.sin(r),stroke:"var(--color-border-strong)",strokeWidth:.8},a)}):null;return(0,t.jsxs)("div",{role:"img","aria-label":`${i}: ${M}`,"data-testid":h,className:(0,r.f)("relative inline-flex flex-col items-center",p),style:{width:u},children:[(0,t.jsxs)("svg",{viewBox:"0 0 100 100",width:u,height:u,"aria-hidden":"true",className:"overflow-visible",children:[I&&(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:`g${g}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:[(0,t.jsx)("feGaussianBlur",{stdDeviation:"2.2",result:"blur"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"blur"}),(0,t.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),$,(0,t.jsx)("circle",{cx:50,cy:50,r:y,fill:"none",stroke:"var(--color-border)",strokeWidth:w,strokeLinecap:"round",strokeDasharray:`${_} ${N}`,transform:"rotate(135 50 50)"}),(0,t.jsx)("circle",{cx:50,cy:50,r:y,fill:"none",stroke:s.v[j],strokeWidth:w,strokeLinecap:"round",transform:"rotate(135 50 50)",filter:I?`url(#g${g})`:void 0,style:{"--dash":`${k} ${N}`},className:"[stroke-dasharray:var(--dash)] transition-[stroke-dasharray] duration-1000 ease-out-expo starting:[stroke-dasharray:0_1000]"})]}),(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",style:{height:u},children:[(0,t.jsx)("span",{className:(0,r.f)("num font-bold leading-none",s.T[j],I&&s.z[j]),style:{fontSize:Math.max(12,.2*u)},children:M}),l&&(0,t.jsx)("span",{className:"num mt-1 text-text-muted",style:{fontSize:Math.max(9,.075*u)},children:l})]}),!f&&(0,t.jsx)("span",{className:"-mt-[10%] text-center text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:i})]})}],54149);var n=e.i(70703),i=e.i(65369);let l=(0,n.default)(()=>e.A(1321),{loadableGenerated:{modules:[69944]},ssr:!1,loading:()=>(0,t.jsx)(i.l,{className:"h-[180px] w-full"})});e.s(["f",0,l],21176)},3062,e=>{var t=e.i(43476),a=e.i(78571),r=e.i(35084);let s={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:d=!0,hero:c=!1,title:u,description:x,icon:m,action:f,as:p="div",padding:h="md",testId:g,className:v,children:b,...j}){return(0,t.jsxs)(p,{...j,"data-testid":g??j["data-testid"],className:(0,a.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[h],o&&"panel-corners",o&&s[e],d&&"glow-hover",d&&n[e],d&&i[e],c&&"grid-bg overflow-hidden bg-surface/80",v),children:[(u||f||m)&&(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[m&&(0,t.jsx)("span",{className:(0,a.f)("mt-0.5 shrink-0",r.T[e]),children:m}),(0,t.jsxs)("div",{className:"min-w-0",children:[u&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:u}),x&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:x})]})]}),f]}),b]})}])},73404,e=>{var t=e.i(43476),a=e.i(78571),r=e.i(35084);e.s(["f",0,function({title:e,eyebrow:s,description:n,icon:i,actions:l,status:o,tone:d="primary",className:c,testId:u}){return(0,t.jsxs)("div",{"data-testid":u,className:(0,a.f)("flex flex-wrap items-end justify-between gap-4",c),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i&&(0,t.jsx)("span",{"aria-hidden":"true",className:(0,a.f)("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-panel border bg-surface","accent"===d?"border-accent/40 shadow-[0_0_14px_var(--color-glow-accent)]":"border-primary/40 shadow-[0_0_14px_var(--color-glow)]",r.T[d]),children:i}),(0,t.jsxs)("div",{className:"min-w-0",children:[s&&(0,t.jsxs)("p",{className:(0,a.f)("mb-1 text-[10px] font-medium uppercase tracking-[0.3em]",r.T[d],"opacity-80"),children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"// "}),s]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("h1",{className:(0,a.f)("text-xl font-bold uppercase tracking-wider",r.T[d],r.z[d]),children:e}),o]}),n&&(0,t.jsx)("p",{className:"mt-1 max-w-3xl text-xs text-text-muted",children:n})]})]}),l&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:l})]})}])},63376,e=>{var t=e.i(43476);e.s(["z",0,function({children:e,className:a}){return(0,t.jsx)("div",{className:`animate-page-in${a?` ${a}`:""}`,children:e})},"U",0,function({children:e,className:a}){return(0,t.jsx)("div",{className:a,children:e})}])},65369,e=>{var t=e.i(43476),a=e.i(78571);function r({className:e}){return(0,t.jsx)("div",{"aria-hidden":"true",className:(0,a.f)("skeleton h-3 w-full",e)})}e.s(["l",0,r,"g",0,function({count:e=4,className:s}){return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,a.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",s),children:Array.from({length:e},(e,a)=>(0,t.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,t.jsx)(r,{className:"h-2 w-1/2"}),(0,t.jsx)(r,{className:"mt-4 h-7 w-2/3"}),(0,t.jsx)(r,{className:"mt-3 h-1 w-full opacity-60"})]},a))})},"F",0,function({rows:e=5,cols:s=4,className:n}){return(0,t.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,a.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,t.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:s},(e,a)=>(0,t.jsx)(r,{className:"h-2 flex-1 opacity-60"},a))}),Array.from({length:e},(e,n)=>(0,t.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:s},(e,s)=>(0,t.jsx)(r,{className:(0,a.f)("h-3 flex-1",(n+s)%3==0&&"max-w-[60%]")},s))},n))]})},"Q",0,function({lines:e=3,className:s}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,a.f)("space-y-2",s),children:Array.from({length:e},(e,a)=>(0,t.jsx)(r,{className:n[a%n.length]},a))})}])},75723,e=>{var t=e.i(43476),a=e.i(78571),r=e.i(46670);let s={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:d,label:c}){let u=(0,r.k)(e),x=l??i.has(e.toUpperCase()),m="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,t.jsxs)("span",{className:(0,a.f)("relative inline-flex shrink-0",m,d),role:c?"img":void 0,"aria-label":c,"aria-hidden":!c||void 0,children:[x&&(0,t.jsx)("span",{className:(0,a.f)("absolute inset-0 rounded-full animate-halo",n[u])}),(0,t.jsx)("span",{className:(0,a.f)("relative inline-flex rounded-full",m,s[u])})]})}])},71417,e=>{e.s(["L",0,function(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB","TB"][t]}`},"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"}):"—"}])},79432,e=>{var t=e.i(56420);let a={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],79432)},75775,e=>{var t=e.i(56420);let a={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],75775)},16306,e=>{var t=e.i(56420);let a={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"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],16306)},90317,(e,t,a)=>{Object.defineProperty(a,"__esModule",{value:!0});var r={bindSnapshot:function(){return c},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return d}};for(var s in r)Object.defineProperty(a,s,{enumerable:!0,get:r[s]});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class i{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new i}function d(e){let t=Symbol.for(`@next/${e}@16.4.3`),a=globalThis;return a[t]??=o()}function c(e){return l?l.bind(e):i.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=e.r(42344)},70703,(e,t,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return s}});let r=e.r(55682)._(e.r(69093));function s(e,t){let a={};"function"==typeof e&&(a.loader=e);let s={...a,...t};return(0,r.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},9885,(e,t,a)=>{function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"encodeURIPath",{enumerable:!0,get:function(){return r}})},67585,(e,t,a)=>{e.i(47167),Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return i}});let r=e.r(71645),s=e.r(74080);e.r(32061);let n=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function i({children:e}){return(0,r.use)((0,s.browser)(n)),e}},69093,(e,t,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return d}});let r=e.r(43476),s=e.r(71645),n=e.r(67585),i=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},d=function(e){let t={...o,...e},a=(0,s.lazy)(()=>t.loader().then(l)),d=t.loading;function c(e){let l=d?(0,r.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,c=o?s.Suspense:s.Fragment,u=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(a,{...e})]}):(0,r.jsx)(n.BailoutToCSRForNextDynamic,{children:(0,r.jsx)(a,{...e})});return(0,r.jsx)(c,{...o?{fallback:l}:{},children:u})}return c.displayName="LoadableComponent",c}},52157,(e,t,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"PreloadChunks",{enumerable:!0,get:function(){return o}});let r=e.r(43476),s=e.r(74080),n=e.r(63599),i=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=n.workAsyncStorage.getStore();if(void 0===t)return null;let a=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;a.push(...e)}}if(0===a.length)return null;let d=(0,l.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:a.map(e=>{let a=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:a,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,s.preload)(a,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,a)=>{Object.defineProperty(a,"__esModule",{value:!0});var r={createReactBrowserBailoutReason:function(){return i},getReactBrowserBailoutReason:function(){return l},isNextBrowserBailoutError:function(){return o}};for(var s in r)Object.defineProperty(a,s,{enumerable:!0,get:r[s]});let n=Symbol.for("next.browser-bailout-reason");function i(e){return{$$typeof:n,reason:e}}function l(e){let t=e?.cause;return t?.$$typeof===n?t.reason:void 0}function o(e){return void 0!==l(e)}}])})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,49536,e=>{"use strict";let t;var s=e.i(43476),n=e.i(71645),r=e.i(22016),i=e.i(18566),a=e.i(71689),l=e.i(40160),o=e.i(78917),c=e.i(16715),u=e.i(82983),d=e.i(46670),f=e.i(68759),h=e.i(63376);function p({nodeId:e,profileId:t,entry:r}){let[i,a]=(0,n.useState)(r.text),[l,o]=(0,n.useState)(r),[c,d]=(0,n.useState)(!1),[h,m]=(0,n.useState)(""),[g,y]=(0,n.useState)("");async function b(s){d(!0),m(""),y("");try{if("config-validate"===s){let n=await u.f.ardent.action(e,t,s,{text:i}),r=n.data?.runtime_problems??[];m(r.length?`YAML valid. Runtime needs: ${r.join("; ")}`:"YAML valid. No runtime prerequisites reported.")}else{let n=await u.f.ardent.action(e,t,s,{text:i,revision:l.revision});if(!n.data?.revision)throw Error("Ardent did not acknowledge the saved revision");o({text:i,revision:n.data.revision}),m("Saved on the node. Restart this profile to activate the new configuration.")}}catch(e){y(e instanceof Error?e.message:"Ardent configuration action failed")}finally{d(!1)}}return(0,n.useEffect)(()=>{a(r.text),o(r),m(""),y("")},[r.revision,r.text]),(0,s.jsxs)("div",{className:"rounded border border-border/60 bg-surface p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-text",children:"Profile YAML"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-text-muted",children:"Edit references and settings; the runtime validates the complete versioned document."})]}),(0,s.jsxs)("span",{className:"font-mono text-[10px] text-text-muted",children:["Revision ",l.revision.slice(0,12)]})]}),(0,s.jsx)("textarea",{"aria-label":"Profile YAML",spellCheck:!1,value:i,onChange:e=>a(e.target.value),className:"mt-3 h-[56vh] min-h-80 w-full resize-y rounded border border-border bg-bg p-4 font-mono text-[11px] leading-5 text-text focus:border-primary/50 focus:outline-none"}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)(f.K,{size:"sm",variant:"secondary",disabled:c,onClick:()=>void b("config-validate"),children:"Validate"}),(0,s.jsx)(f.K,{size:"sm",disabled:c||i===l.text,onClick:()=>void b("config-save"),children:"Save revision"}),(0,s.jsx)(f.K,{size:"sm",variant:"ghost",disabled:c||i===l.text,onClick:()=>a(l.text),children:"Discard"})]}),h&&(0,s.jsx)("p",{role:"status",className:"mt-3 text-xs text-success",children:h}),g&&(0,s.jsx)("p",{role:"alert",className:"mt-3 text-xs text-danger",children:g})]})}function m({nodeId:e,profileId:t,kind:r,entry:i}){let[a,l]=(0,n.useState)(i.text),[o,c]=(0,n.useState)(i),[d,h]=(0,n.useState)([]),[p,g]=(0,n.useState)(!1),[y,b]=(0,n.useState)(""),[x,v]=(0,n.useState)("");async function k(){g(!0),v(""),b("");try{let s=await u.f.ardent.action(e,t,"identity-save",{text:a,revision:o.revision},r);if(!s.data?.revision)throw Error("Ardent did not acknowledge the identity revision");c(s.data),b("Saved. The new persona applies to subsequent turns.")}catch(e){v(e instanceof Error?e.message:"Identity save failed")}finally{g(!1)}}async function w(){v("");try{let s=await u.f.ardent.resource(e,t,`identity/${r}/history`);h(s.data?.history??[])}catch(e){v(e instanceof Error?e.message:"Identity history is unavailable")}}async function N(s){g(!0),v(""),b("");try{let n=await u.f.ardent.action(e,t,"identity-restore",{history_name:s,revision:o.revision},r);if(!n.data?.revision)throw Error("Ardent did not acknowledge the restored revision");c(n.data),l(n.data.text),b("Previous version restored.")}catch(e){v(e instanceof Error?e.message:"Identity restore failed")}finally{g(!1)}}return(0,n.useEffect)(()=>{l(i.text),c(i),b(""),v("")},[i.revision,i.text]),(0,s.jsxs)("div",{className:"min-w-0 rounded border border-border/60 bg-surface p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-text",children:"soul"===r?"SOUL.md":"IDENTITY.md"}),(0,s.jsxs)("span",{className:"font-mono text-[10px] text-text-muted",children:["Revision ",o.revision.slice(0,12)]})]}),(0,s.jsx)("textarea",{"aria-label":"soul"===r?"SOUL.md":"IDENTITY.md",value:a,onChange:e=>l(e.target.value),className:"mt-3 h-[45vh] min-h-64 w-full resize-y rounded border border-border bg-bg p-4 font-mono text-xs leading-5 text-text focus:border-primary/50 focus:outline-none"}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)(f.K,{size:"sm",disabled:p||a===o.text,onClick:()=>void k(),children:"Save"}),(0,s.jsx)(f.K,{size:"sm",variant:"secondary",disabled:p,onClick:()=>void w(),children:"Previous versions"})]}),d.length>0&&(0,s.jsx)("div",{className:"mt-3 space-y-1 border-t border-border/50 pt-3",children:d.map(e=>(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-[11px]",children:[(0,s.jsx)("span",{className:"break-all font-mono text-text-muted",children:e.name}),(0,s.jsx)(f.K,{size:"sm",variant:"secondary",disabled:p,onClick:()=>void N(e.name),children:"Restore"})]},e.name))}),y&&(0,s.jsx)("p",{role:"status",className:"mt-3 text-xs text-success",children:y}),x&&(0,s.jsx)("p",{role:"alert",className:"mt-3 text-xs text-danger",children:x})]})}function g({nodeId:e,profileId:t,entries:n}){return(0,s.jsxs)("div",{className:"grid gap-3 xl:grid-cols-2",children:[(0,s.jsx)(m,{nodeId:e,profileId:t,kind:"soul",entry:n.soul}),(0,s.jsx)(m,{nodeId:e,profileId:t,kind:"identity",entry:n.identity})]})}var y=e.i(15630);function b({nodeId:e,profileId:t,initial:r,initialRevision:i}){let[a,l]=(0,n.useState)(r),[o,c]=(0,n.useState)(i),[h,p]=(0,n.useState)(""),[m,g]=(0,n.useState)(""),[x,v]=(0,n.useState)("");async function k(s){p(s.name),g(""),v("");try{let n=await u.f.ardent.action(e,t,"skill-set",{enabled:!s.enabled,revision:o},s.name);if(!n.data?.revision)throw Error("Ardent did not acknowledge the skill revision");c(n.data.revision),l(e=>e.map(e=>e.name===s.name?{...e,enabled:!s.enabled}:e)),v(`${s.name} ${s.enabled?"disabled":"enabled"}. Restart the profile to activate.`)}catch(e){g(await (0,y.S)(e))}finally{p("")}}return(0,n.useEffect)(()=>{l(r),c(i),g(""),v("")},[r,i]),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap justify-between gap-2 text-[11px] text-text-muted",children:[(0,s.jsx)("span",{children:"Working methods available to this profile"}),(0,s.jsxs)("span",{className:"font-mono",children:["Configuration revision ",o.slice(0,12)]})]}),(0,s.jsx)("div",{className:"grid gap-3 lg:grid-cols-2",children:a.length?a.map(e=>(0,s.jsxs)("div",{className:"min-w-0 rounded border border-border/60 bg-surface p-4",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-text",children:e.name}),(0,s.jsx)(d.t,{variant:(0,d.k)(e.enabled?"running":"stopped"),children:e.enabled?"Enabled":"Disabled"})]}),(0,s.jsx)("p",{className:"mt-2 text-xs leading-5 text-text-muted",children:e.description}),(0,s.jsx)("p",{className:"mt-3 font-mono text-[10px] text-text-muted",children:e.hash.slice(0,16)}),(0,s.jsx)(f.K,{className:"mt-3",size:"sm",variant:"secondary",disabled:!!h,onClick:()=>void k(e),children:e.enabled?"Disable":"Enable"})]},e.name)):(0,s.jsx)("p",{className:"rounded border border-border bg-surface p-6 text-xs text-text-muted lg:col-span-2",children:"No skills were reported."})}),x&&(0,s.jsx)("p",{role:"status",className:"text-xs text-success",children:x}),m&&(0,s.jsx)("p",{role:"alert",className:"text-xs text-danger",children:m})]})}function x({nodeId:e,profileId:t}){let[r,i]=(0,n.useState)(""),[a,l]=(0,n.useState)(!1),[o,c]=(0,n.useState)(""),[d,h]=(0,n.useState)("");async function p(){l(!0),h(""),c("");try{let s=await u.f.ardent.action(e,t,"task-submit",{prompt:r.trim(),idempotency_key:crypto.randomUUID()});if(!s.data?.task_id)throw Error("Ardent did not return a durable task ID");c(`Task ${s.data.task_id.slice(0,8)} accepted. Refresh the profile to inspect its result.`),i("")}catch(e){h(await (0,y.S)(e))}finally{l(!1)}}return(0,s.jsxs)("div",{className:"mb-4 border-b border-border/50 pb-4",children:[(0,s.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-text",children:"Test research request"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-text-muted",children:"Submit a bounded diagnostic task. The result appears in this profile's task journal."}),(0,s.jsx)("textarea",{"aria-label":"Test research prompt",maxLength:4e3,value:r,onChange:e=>i(e.target.value),className:"mt-3 h-24 w-full resize-y rounded border border-border bg-bg p-3 text-xs text-text focus:border-primary/50 focus:outline-none"}),(0,s.jsx)(f.K,{size:"sm",disabled:a||!r.trim(),onClick:()=>void p(),children:"Submit test"}),o&&(0,s.jsx)("p",{role:"status",className:"mt-2 text-[11px] text-success",children:o}),d&&(0,s.jsx)("p",{role:"alert",className:"mt-2 text-[11px] text-danger",children:d})]})}let v=Symbol.for("yaml.alias"),k=Symbol.for("yaml.document"),w=Symbol.for("yaml.map"),N=Symbol.for("yaml.pair"),S=Symbol.for("yaml.scalar"),j=Symbol.for("yaml.seq"),E=Symbol.for("yaml.node.type"),A=e=>!!e&&"object"==typeof e&&e[E]===v,O=e=>!!e&&"object"==typeof e&&e[E]===k,I=e=>!!e&&"object"==typeof e&&e[E]===w,T=e=>!!e&&"object"==typeof e&&e[E]===N,C=e=>!!e&&"object"==typeof e&&e[E]===S,L=e=>!!e&&"object"==typeof e&&e[E]===j;function $(e){if(e&&"object"==typeof e)switch(e[E]){case w:case j:return!0}return!1}function _(e){if(e&&"object"==typeof e)switch(e[E]){case v:case w:case S:case j:return!0}return!1}let D=e=>(C(e)||$(e))&&!!e.anchor,K=Symbol("break visit"),P=Symbol("skip children"),M=Symbol("remove node");function B(e,t){let s=F(t);O(e)?R(null,e.contents,s,Object.freeze([e]))===M&&(e.contents=null):R(null,e,s,Object.freeze([]))}function R(e,t,s,n){let r=V(e,t,s,n);if(_(r)||T(r))return J(e,n,r),R(e,r,s,n);if("symbol"!=typeof r){if($(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){let r=R(e,t.items[e],s,n);if("number"==typeof r)e=r-1;else{if(r===K)return K;r===M&&(t.items.splice(e,1),e-=1)}}}else if(T(t)){n=Object.freeze(n.concat(t));let e=R("key",t.key,s,n);if(e===K)return K;e===M&&(t.key=null);let r=R("value",t.value,s,n);if(r===K)return K;r===M&&(t.value=null)}}return r}async function q(e,t){let s=F(t);O(e)?await U(null,e.contents,s,Object.freeze([e]))===M&&(e.contents=null):await U(null,e,s,Object.freeze([]))}async function U(e,t,s,n){let r=await V(e,t,s,n);if(_(r)||T(r))return J(e,n,r),U(e,r,s,n);if("symbol"!=typeof r){if($(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){let r=await U(e,t.items[e],s,n);if("number"==typeof r)e=r-1;else{if(r===K)return K;r===M&&(t.items.splice(e,1),e-=1)}}}else if(T(t)){n=Object.freeze(n.concat(t));let e=await U("key",t.key,s,n);if(e===K)return K;e===M&&(t.key=null);let r=await U("value",t.value,s,n);if(r===K)return K;r===M&&(t.value=null)}}return r}function F(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function V(e,t,s,n){return"function"==typeof s?s(e,t,n):I(t)?s.Map?.(e,t,n):L(t)?s.Seq?.(e,t,n):T(t)?s.Pair?.(e,t,n):C(t)?s.Scalar?.(e,t,n):A(t)?s.Alias?.(e,t,n):void 0}function J(e,t,s){let n=t[t.length-1];if($(n))n.items[e]=s;else if(T(n))"key"===e?n.key=s:n.value=s;else if(O(n))n.contents=s;else{let e=A(n)?"alias":"scalar";throw Error(`Cannot replace node with ${e} parent`)}}B.BREAK=K,B.SKIP=P,B.REMOVE=M,q.BREAK=K,q.SKIP=P,q.REMOVE=M;let Y={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},z=e=>e.replace(/[!,[\]{}]/g,e=>Y[e]);class W{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},W.defaultYaml,e),this.tags=Object.assign({},W.defaultTags,t)}clone(){let e=new W(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new W(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:W.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},W.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:W.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},W.defaultTags),this.atNextDocument=!1);let s=e.trim().split(/[ \t]+/),n=s.shift();switch(n){case"%TAG":{if(2!==s.length&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;let[e,n]=s;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==s.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=s;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let s=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,s),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){let s=e.slice(2,-1);return"!"===s||"!!"===s?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),s)}let[,s,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let r=this.tags[s];if(r)try{return r+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===s?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+z(e.substring(s.length));return"!"===e[0]?e:`!<${e}>`}toString(e){let t,s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);if(e&&n.length>0&&_(e.contents)){let s={};B(e.contents,(e,t)=>{_(t)&&t.tag&&(s[t.tag]=!0)}),t=Object.keys(s)}else t=[];for(let[r,i]of n)("!!"!==r||"tag:yaml.org,2002:"!==i)&&(!e||t.some(e=>e.startsWith(i)))&&s.push(`%TAG ${r} ${i}`);return s.join("\n")}}function G(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function H(e){let t=new Set;return B(e,{Value(e,s){s.anchor&&t.add(s.anchor)}}),t}function Q(e,t){for(let s=1;;++s){let n=`${e}${s}`;if(!t.has(n))return n}}function X(e,t,s,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,s=n.length;t<s;++t){let s=n[t],r=X(e,n,String(t),s);void 0===r?delete n[t]:r!==s&&(n[t]=r)}else if(n instanceof Map)for(let t of Array.from(n.keys())){let s=n.get(t),r=X(e,n,t,s);void 0===r?n.delete(t):r!==s&&n.set(t,r)}else if(n instanceof Set)for(let t of Array.from(n)){let s=X(e,n,t,t);void 0===s?n.delete(t):s!==t&&(n.delete(t),n.add(s))}else for(let[t,s]of Object.entries(n)){let r=X(e,n,t,s);void 0===r?delete n[t]:r!==s&&(n[t]=r)}return e.call(t,s,n)}function Z(e,t,s){if(Array.isArray(e))return e.map((e,t)=>Z(e,String(t),s));if(e&&"function"==typeof e.toJSON){if(!s||!D(e))return e.toJSON(t,s);let n={aliasCount:0,count:1,res:void 0};s.anchors.set(e,n),s.onCreate=e=>{n.res=e,delete s.onCreate};let r=e.toJSON(t,s);return s.onCreate&&s.onCreate(r),r}return"bigint"!=typeof e||s?.keep?e:Number(e)}W.defaultYaml={explicit:!1,version:"1.2"},W.defaultTags={"!!":"tag:yaml.org,2002:"};class ee{constructor(e){Object.defineProperty(this,E,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:n,reviver:r}={}){if(!O(e))throw TypeError("A document argument is required");let i={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},a=Z(this,"",i);if("function"==typeof n)for(let{count:e,res:t}of i.anchors.values())n(t,e);return"function"==typeof r?X(r,{"":a},"",a):a}}class et extends ee{constructor(e){super(v),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){let s,n;if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");for(let r of(t?.aliasResolveCache?s=t.aliasResolveCache:(s=[],B(e,{Node:(e,t)=>{(A(t)||D(t))&&s.push(t)}}),t&&(t.aliasResolveCache=s)),s)){if(r===this)break;r.anchor===this.source&&(n=r)}if(n&&t){let{anchors:e,doc:s,maxAliasCount:r}=t,i=e.get(n);if(i||(Z(n,null,t),i=e.get(n)),i?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(r>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=function e(t,s,n){if(A(s)){let e=s.resolve(t),r=n&&e&&n.get(e);return r?r.count*r.aliasCount:0}if($(s)){let r=0;for(let i of s.items){let s=e(t,i,n);s>r&&(r=s)}return r}return T(s)?Math.max(e(t,s.key,n),e(t,s.value,n)):1}(s,n,e)),i.count*i.aliasCount>r))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return n}toJSON(e,t){if(!t)return{source:this.source};let s=this.resolve(t.doc,t);if(!s)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);return t.anchors.get(s).res}toString(e,t,s){let n=`*${this.source}`;if(e){if(G(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(e.implicitKey)return`${n} `}return n}}let es=e=>!e||"function"!=typeof e&&"object"!=typeof e;class en extends ee{constructor(e){super(S),this.value=e}toJSON(e,t){return t?.keep?this.value:Z(this.value,e,t)}toString(){return String(this.value)}}function er(e,t,s){let n;if(O(e)&&(e=e.contents),_(e))return e;if(T(e)){let t=s.schema[w].createNode?.(s.schema,null,s);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"u">typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:l,sourceObjects:o}=s;if(r&&e&&"object"==typeof e){if(n=o.get(e))return n.anchor??(n.anchor=i(e)),new et(n.anchor);n={anchor:null,node:null},o.set(e,n)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let c=function(e,t,s){if(t){let e=s.filter(e=>e.tag===t),n=e.find(e=>!e.format)??e[0];if(!n)throw Error(`Tag ${t} not found`);return n}return s.find(t=>t.identify?.(e)&&!t.format)}(e,t,l.tags);if(!c){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){let t=new en(e);return n&&(n.node=t),t}c=e instanceof Map?l[w]:Symbol.iterator in Object(e)?l[j]:l[w]}a&&(a(c),delete s.onTagObj);let u=c?.createNode?c.createNode(s.schema,e,s):"function"==typeof c?.nodeClass?.from?c.nodeClass.from(s.schema,e,s):new en(e);return t?u.tag=t:c.default||(u.tag=c.tag),n&&(n.node=u),u}function ei(e,t,s){let n=s;for(let e=t.length-1;e>=0;--e){let s=t[e];if("number"==typeof s&&Number.isInteger(s)&&s>=0){let e=[];e[s]=n,n=e}else n=new Map([[s,n]])}return er(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}en.BLOCK_FOLDED="BLOCK_FOLDED",en.BLOCK_LITERAL="BLOCK_LITERAL",en.PLAIN="PLAIN",en.QUOTE_DOUBLE="QUOTE_DOUBLE",en.QUOTE_SINGLE="QUOTE_SINGLE";let ea=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class el extends ee{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>_(t)||T(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(ea(e))this.add(t);else{let[s,...n]=e,r=this.get(s,!0);if($(r))r.addIn(n,t);else if(void 0===r&&this.schema)this.set(s,ei(this.schema,n,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}}deleteIn(e){let[t,...s]=e;if(0===s.length)return this.delete(t);let n=this.get(t,!0);if($(n))return n.deleteIn(s);throw Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){let[s,...n]=e,r=this.get(s,!0);return 0===n.length?!t&&C(r)?r.value:r:$(r)?r.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!T(t))return!1;let s=t.value;return null==s||e&&C(s)&&null==s.value&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[t,...s]=e;if(0===s.length)return this.has(t);let n=this.get(t,!0);return!!$(n)&&n.hasIn(s)}setIn(e,t){let[s,...n]=e;if(0===n.length)this.set(s,t);else{let e=this.get(s,!0);if($(e))e.setIn(n,t);else if(void 0===e&&this.schema)this.set(s,ei(this.schema,n,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}}}let eo=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function ec(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}let eu=(e,t,s)=>e.endsWith("\n")?ec(s,t):s.includes("\n")?"\n"+ec(s,t):(e.endsWith(" ")?"":" ")+s,ed="flow",ef="block",eh="quoted";function ep(e,t,s="flow",{indentAtStart:n,lineWidth:r=80,minContentWidth:i=20,onFold:a,onOverflow:l}={}){let o,c,u;if(!r||r<0)return e;r<i&&(i=0);let d=Math.max(1+i,1+r-t.length);if(e.length<=d)return e;let f=[],h={},p=r-t.length;"number"==typeof n&&(n>r-Math.max(2,i)?f.push(0):p=r-n);let m=!1,g=-1,y=-1,b=-1;for(s===ef&&-1!==(g=em(e,g,t.length))&&(p=g+d);u=e[g+=1];){if(s===eh&&"\\"===u){switch(y=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}b=g}if("\n"===u)s===ef&&(g=em(e,g,t.length)),p=g+t.length+d,o=void 0;else{if(" "===u&&c&&" "!==c&&"\n"!==c&&" "!==c){let t=e[g+1];t&&" "!==t&&"\n"!==t&&" "!==t&&(o=g)}if(g>=p)if(o)f.push(o),p=o+d,o=void 0;else if(s===eh){for(;" "===c||" "===c;)c=u,u=e[g+=1],m=!0;let t=g>b+1?g-2:y-1;if(h[t])return e;f.push(t),h[t]=!0,p=t+d,o=void 0}else m=!0}c=u}if(m&&l&&l(),0===f.length)return e;a&&a();let x=e.slice(0,f[0]);for(let n=0;n<f.length;++n){let r=f[n],i=f[n+1]||e.length;0===r?x=`
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,49536,e=>{"use strict";let t;var s=e.i(43476),n=e.i(71645),r=e.i(22016),i=e.i(18566),a=e.i(9347),l=e.i(62368),o=e.i(82022),c=e.i(41120),u=e.i(82983),d=e.i(46670),f=e.i(68759),h=e.i(63376);function p({nodeId:e,profileId:t,entry:r}){let[i,a]=(0,n.useState)(r.text),[l,o]=(0,n.useState)(r),[c,d]=(0,n.useState)(!1),[h,m]=(0,n.useState)(""),[g,y]=(0,n.useState)("");async function b(s){d(!0),m(""),y("");try{if("config-validate"===s){let n=await u.f.ardent.action(e,t,s,{text:i}),r=n.data?.runtime_problems??[];m(r.length?`YAML valid. Runtime needs: ${r.join("; ")}`:"YAML valid. No runtime prerequisites reported.")}else{let n=await u.f.ardent.action(e,t,s,{text:i,revision:l.revision});if(!n.data?.revision)throw Error("Ardent did not acknowledge the saved revision");o({text:i,revision:n.data.revision}),m("Saved on the node. Restart this profile to activate the new configuration.")}}catch(e){y(e instanceof Error?e.message:"Ardent configuration action failed")}finally{d(!1)}}return(0,n.useEffect)(()=>{a(r.text),o(r),m(""),y("")},[r.revision,r.text]),(0,s.jsxs)("div",{className:"rounded border border-border/60 bg-surface p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-text",children:"Profile YAML"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-text-muted",children:"Edit references and settings; the runtime validates the complete versioned document."})]}),(0,s.jsxs)("span",{className:"font-mono text-[10px] text-text-muted",children:["Revision ",l.revision.slice(0,12)]})]}),(0,s.jsx)("textarea",{"aria-label":"Profile YAML",spellCheck:!1,value:i,onChange:e=>a(e.target.value),className:"mt-3 h-[56vh] min-h-80 w-full resize-y rounded border border-border bg-bg p-4 font-mono text-[11px] leading-5 text-text focus:border-primary/50 focus:outline-none"}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)(f.K,{size:"sm",variant:"secondary",disabled:c,onClick:()=>void b("config-validate"),children:"Validate"}),(0,s.jsx)(f.K,{size:"sm",disabled:c||i===l.text,onClick:()=>void b("config-save"),children:"Save revision"}),(0,s.jsx)(f.K,{size:"sm",variant:"ghost",disabled:c||i===l.text,onClick:()=>a(l.text),children:"Discard"})]}),h&&(0,s.jsx)("p",{role:"status",className:"mt-3 text-xs text-success",children:h}),g&&(0,s.jsx)("p",{role:"alert",className:"mt-3 text-xs text-danger",children:g})]})}function m({nodeId:e,profileId:t,kind:r,entry:i}){let[a,l]=(0,n.useState)(i.text),[o,c]=(0,n.useState)(i),[d,h]=(0,n.useState)([]),[p,g]=(0,n.useState)(!1),[y,b]=(0,n.useState)(""),[x,v]=(0,n.useState)("");async function k(){g(!0),v(""),b("");try{let s=await u.f.ardent.action(e,t,"identity-save",{text:a,revision:o.revision},r);if(!s.data?.revision)throw Error("Ardent did not acknowledge the identity revision");c(s.data),b("Saved. The new persona applies to subsequent turns.")}catch(e){v(e instanceof Error?e.message:"Identity save failed")}finally{g(!1)}}async function w(){v("");try{let s=await u.f.ardent.resource(e,t,`identity/${r}/history`);h(s.data?.history??[])}catch(e){v(e instanceof Error?e.message:"Identity history is unavailable")}}async function N(s){g(!0),v(""),b("");try{let n=await u.f.ardent.action(e,t,"identity-restore",{history_name:s,revision:o.revision},r);if(!n.data?.revision)throw Error("Ardent did not acknowledge the restored revision");c(n.data),l(n.data.text),b("Previous version restored.")}catch(e){v(e instanceof Error?e.message:"Identity restore failed")}finally{g(!1)}}return(0,n.useEffect)(()=>{l(i.text),c(i),b(""),v("")},[i.revision,i.text]),(0,s.jsxs)("div",{className:"min-w-0 rounded border border-border/60 bg-surface p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-text",children:"soul"===r?"SOUL.md":"IDENTITY.md"}),(0,s.jsxs)("span",{className:"font-mono text-[10px] text-text-muted",children:["Revision ",o.revision.slice(0,12)]})]}),(0,s.jsx)("textarea",{"aria-label":"soul"===r?"SOUL.md":"IDENTITY.md",value:a,onChange:e=>l(e.target.value),className:"mt-3 h-[45vh] min-h-64 w-full resize-y rounded border border-border bg-bg p-4 font-mono text-xs leading-5 text-text focus:border-primary/50 focus:outline-none"}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)(f.K,{size:"sm",disabled:p||a===o.text,onClick:()=>void k(),children:"Save"}),(0,s.jsx)(f.K,{size:"sm",variant:"secondary",disabled:p,onClick:()=>void w(),children:"Previous versions"})]}),d.length>0&&(0,s.jsx)("div",{className:"mt-3 space-y-1 border-t border-border/50 pt-3",children:d.map(e=>(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-[11px]",children:[(0,s.jsx)("span",{className:"break-all font-mono text-text-muted",children:e.name}),(0,s.jsx)(f.K,{size:"sm",variant:"secondary",disabled:p,onClick:()=>void N(e.name),children:"Restore"})]},e.name))}),y&&(0,s.jsx)("p",{role:"status",className:"mt-3 text-xs text-success",children:y}),x&&(0,s.jsx)("p",{role:"alert",className:"mt-3 text-xs text-danger",children:x})]})}function g({nodeId:e,profileId:t,entries:n}){return(0,s.jsxs)("div",{className:"grid gap-3 xl:grid-cols-2",children:[(0,s.jsx)(m,{nodeId:e,profileId:t,kind:"soul",entry:n.soul}),(0,s.jsx)(m,{nodeId:e,profileId:t,kind:"identity",entry:n.identity})]})}var y=e.i(15630);function b({nodeId:e,profileId:t,initial:r,initialRevision:i}){let[a,l]=(0,n.useState)(r),[o,c]=(0,n.useState)(i),[h,p]=(0,n.useState)(""),[m,g]=(0,n.useState)(""),[x,v]=(0,n.useState)("");async function k(s){p(s.name),g(""),v("");try{let n=await u.f.ardent.action(e,t,"skill-set",{enabled:!s.enabled,revision:o},s.name);if(!n.data?.revision)throw Error("Ardent did not acknowledge the skill revision");c(n.data.revision),l(e=>e.map(e=>e.name===s.name?{...e,enabled:!s.enabled}:e)),v(`${s.name} ${s.enabled?"disabled":"enabled"}. Restart the profile to activate.`)}catch(e){g(await (0,y.S)(e))}finally{p("")}}return(0,n.useEffect)(()=>{l(r),c(i),g(""),v("")},[r,i]),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap justify-between gap-2 text-[11px] text-text-muted",children:[(0,s.jsx)("span",{children:"Working methods available to this profile"}),(0,s.jsxs)("span",{className:"font-mono",children:["Configuration revision ",o.slice(0,12)]})]}),(0,s.jsx)("div",{className:"grid gap-3 lg:grid-cols-2",children:a.length?a.map(e=>(0,s.jsxs)("div",{className:"min-w-0 rounded border border-border/60 bg-surface p-4",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-text",children:e.name}),(0,s.jsx)(d.t,{variant:(0,d.k)(e.enabled?"running":"stopped"),children:e.enabled?"Enabled":"Disabled"})]}),(0,s.jsx)("p",{className:"mt-2 text-xs leading-5 text-text-muted",children:e.description}),(0,s.jsx)("p",{className:"mt-3 font-mono text-[10px] text-text-muted",children:e.hash.slice(0,16)}),(0,s.jsx)(f.K,{className:"mt-3",size:"sm",variant:"secondary",disabled:!!h,onClick:()=>void k(e),children:e.enabled?"Disable":"Enable"})]},e.name)):(0,s.jsx)("p",{className:"rounded border border-border bg-surface p-6 text-xs text-text-muted lg:col-span-2",children:"No skills were reported."})}),x&&(0,s.jsx)("p",{role:"status",className:"text-xs text-success",children:x}),m&&(0,s.jsx)("p",{role:"alert",className:"text-xs text-danger",children:m})]})}function x({nodeId:e,profileId:t}){let[r,i]=(0,n.useState)(""),[a,l]=(0,n.useState)(!1),[o,c]=(0,n.useState)(""),[d,h]=(0,n.useState)("");async function p(){l(!0),h(""),c("");try{let s=await u.f.ardent.action(e,t,"task-submit",{prompt:r.trim(),idempotency_key:crypto.randomUUID()});if(!s.data?.task_id)throw Error("Ardent did not return a durable task ID");c(`Task ${s.data.task_id.slice(0,8)} accepted. Refresh the profile to inspect its result.`),i("")}catch(e){h(await (0,y.S)(e))}finally{l(!1)}}return(0,s.jsxs)("div",{className:"mb-4 border-b border-border/50 pb-4",children:[(0,s.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-text",children:"Test research request"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-text-muted",children:"Submit a bounded diagnostic task. The result appears in this profile's task journal."}),(0,s.jsx)("textarea",{"aria-label":"Test research prompt",maxLength:4e3,value:r,onChange:e=>i(e.target.value),className:"mt-3 h-24 w-full resize-y rounded border border-border bg-bg p-3 text-xs text-text focus:border-primary/50 focus:outline-none"}),(0,s.jsx)(f.K,{size:"sm",disabled:a||!r.trim(),onClick:()=>void p(),children:"Submit test"}),o&&(0,s.jsx)("p",{role:"status",className:"mt-2 text-[11px] text-success",children:o}),d&&(0,s.jsx)("p",{role:"alert",className:"mt-2 text-[11px] text-danger",children:d})]})}let v=Symbol.for("yaml.alias"),k=Symbol.for("yaml.document"),w=Symbol.for("yaml.map"),N=Symbol.for("yaml.pair"),S=Symbol.for("yaml.scalar"),j=Symbol.for("yaml.seq"),E=Symbol.for("yaml.node.type"),A=e=>!!e&&"object"==typeof e&&e[E]===v,O=e=>!!e&&"object"==typeof e&&e[E]===k,I=e=>!!e&&"object"==typeof e&&e[E]===w,T=e=>!!e&&"object"==typeof e&&e[E]===N,C=e=>!!e&&"object"==typeof e&&e[E]===S,L=e=>!!e&&"object"==typeof e&&e[E]===j;function $(e){if(e&&"object"==typeof e)switch(e[E]){case w:case j:return!0}return!1}function _(e){if(e&&"object"==typeof e)switch(e[E]){case v:case w:case S:case j:return!0}return!1}let D=e=>(C(e)||$(e))&&!!e.anchor,K=Symbol("break visit"),P=Symbol("skip children"),M=Symbol("remove node");function B(e,t){let s=F(t);O(e)?R(null,e.contents,s,Object.freeze([e]))===M&&(e.contents=null):R(null,e,s,Object.freeze([]))}function R(e,t,s,n){let r=V(e,t,s,n);if(_(r)||T(r))return J(e,n,r),R(e,r,s,n);if("symbol"!=typeof r){if($(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){let r=R(e,t.items[e],s,n);if("number"==typeof r)e=r-1;else{if(r===K)return K;r===M&&(t.items.splice(e,1),e-=1)}}}else if(T(t)){n=Object.freeze(n.concat(t));let e=R("key",t.key,s,n);if(e===K)return K;e===M&&(t.key=null);let r=R("value",t.value,s,n);if(r===K)return K;r===M&&(t.value=null)}}return r}async function q(e,t){let s=F(t);O(e)?await U(null,e.contents,s,Object.freeze([e]))===M&&(e.contents=null):await U(null,e,s,Object.freeze([]))}async function U(e,t,s,n){let r=await V(e,t,s,n);if(_(r)||T(r))return J(e,n,r),U(e,r,s,n);if("symbol"!=typeof r){if($(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){let r=await U(e,t.items[e],s,n);if("number"==typeof r)e=r-1;else{if(r===K)return K;r===M&&(t.items.splice(e,1),e-=1)}}}else if(T(t)){n=Object.freeze(n.concat(t));let e=await U("key",t.key,s,n);if(e===K)return K;e===M&&(t.key=null);let r=await U("value",t.value,s,n);if(r===K)return K;r===M&&(t.value=null)}}return r}function F(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function V(e,t,s,n){return"function"==typeof s?s(e,t,n):I(t)?s.Map?.(e,t,n):L(t)?s.Seq?.(e,t,n):T(t)?s.Pair?.(e,t,n):C(t)?s.Scalar?.(e,t,n):A(t)?s.Alias?.(e,t,n):void 0}function J(e,t,s){let n=t[t.length-1];if($(n))n.items[e]=s;else if(T(n))"key"===e?n.key=s:n.value=s;else if(O(n))n.contents=s;else{let e=A(n)?"alias":"scalar";throw Error(`Cannot replace node with ${e} parent`)}}B.BREAK=K,B.SKIP=P,B.REMOVE=M,q.BREAK=K,q.SKIP=P,q.REMOVE=M;let Y={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},z=e=>e.replace(/[!,[\]{}]/g,e=>Y[e]);class W{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},W.defaultYaml,e),this.tags=Object.assign({},W.defaultTags,t)}clone(){let e=new W(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new W(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:W.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},W.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:W.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},W.defaultTags),this.atNextDocument=!1);let s=e.trim().split(/[ \t]+/),n=s.shift();switch(n){case"%TAG":{if(2!==s.length&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;let[e,n]=s;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==s.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=s;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let s=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,s),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){let s=e.slice(2,-1);return"!"===s||"!!"===s?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),s)}let[,s,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let r=this.tags[s];if(r)try{return r+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===s?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+z(e.substring(s.length));return"!"===e[0]?e:`!<${e}>`}toString(e){let t,s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);if(e&&n.length>0&&_(e.contents)){let s={};B(e.contents,(e,t)=>{_(t)&&t.tag&&(s[t.tag]=!0)}),t=Object.keys(s)}else t=[];for(let[r,i]of n)("!!"!==r||"tag:yaml.org,2002:"!==i)&&(!e||t.some(e=>e.startsWith(i)))&&s.push(`%TAG ${r} ${i}`);return s.join("\n")}}function G(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function H(e){let t=new Set;return B(e,{Value(e,s){s.anchor&&t.add(s.anchor)}}),t}function Q(e,t){for(let s=1;;++s){let n=`${e}${s}`;if(!t.has(n))return n}}function X(e,t,s,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,s=n.length;t<s;++t){let s=n[t],r=X(e,n,String(t),s);void 0===r?delete n[t]:r!==s&&(n[t]=r)}else if(n instanceof Map)for(let t of Array.from(n.keys())){let s=n.get(t),r=X(e,n,t,s);void 0===r?n.delete(t):r!==s&&n.set(t,r)}else if(n instanceof Set)for(let t of Array.from(n)){let s=X(e,n,t,t);void 0===s?n.delete(t):s!==t&&(n.delete(t),n.add(s))}else for(let[t,s]of Object.entries(n)){let r=X(e,n,t,s);void 0===r?delete n[t]:r!==s&&(n[t]=r)}return e.call(t,s,n)}function Z(e,t,s){if(Array.isArray(e))return e.map((e,t)=>Z(e,String(t),s));if(e&&"function"==typeof e.toJSON){if(!s||!D(e))return e.toJSON(t,s);let n={aliasCount:0,count:1,res:void 0};s.anchors.set(e,n),s.onCreate=e=>{n.res=e,delete s.onCreate};let r=e.toJSON(t,s);return s.onCreate&&s.onCreate(r),r}return"bigint"!=typeof e||s?.keep?e:Number(e)}W.defaultYaml={explicit:!1,version:"1.2"},W.defaultTags={"!!":"tag:yaml.org,2002:"};class ee{constructor(e){Object.defineProperty(this,E,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:n,reviver:r}={}){if(!O(e))throw TypeError("A document argument is required");let i={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},a=Z(this,"",i);if("function"==typeof n)for(let{count:e,res:t}of i.anchors.values())n(t,e);return"function"==typeof r?X(r,{"":a},"",a):a}}class et extends ee{constructor(e){super(v),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){let s,n;if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");for(let r of(t?.aliasResolveCache?s=t.aliasResolveCache:(s=[],B(e,{Node:(e,t)=>{(A(t)||D(t))&&s.push(t)}}),t&&(t.aliasResolveCache=s)),s)){if(r===this)break;r.anchor===this.source&&(n=r)}if(n&&t){let{anchors:e,doc:s,maxAliasCount:r}=t,i=e.get(n);if(i||(Z(n,null,t),i=e.get(n)),i?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(r>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=function e(t,s,n){if(A(s)){let e=s.resolve(t),r=n&&e&&n.get(e);return r?r.count*r.aliasCount:0}if($(s)){let r=0;for(let i of s.items){let s=e(t,i,n);s>r&&(r=s)}return r}return T(s)?Math.max(e(t,s.key,n),e(t,s.value,n)):1}(s,n,e)),i.count*i.aliasCount>r))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return n}toJSON(e,t){if(!t)return{source:this.source};let s=this.resolve(t.doc,t);if(!s)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);return t.anchors.get(s).res}toString(e,t,s){let n=`*${this.source}`;if(e){if(G(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(e.implicitKey)return`${n} `}return n}}let es=e=>!e||"function"!=typeof e&&"object"!=typeof e;class en extends ee{constructor(e){super(S),this.value=e}toJSON(e,t){return t?.keep?this.value:Z(this.value,e,t)}toString(){return String(this.value)}}function er(e,t,s){let n;if(O(e)&&(e=e.contents),_(e))return e;if(T(e)){let t=s.schema[w].createNode?.(s.schema,null,s);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"u">typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:l,sourceObjects:o}=s;if(r&&e&&"object"==typeof e){if(n=o.get(e))return n.anchor??(n.anchor=i(e)),new et(n.anchor);n={anchor:null,node:null},o.set(e,n)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let c=function(e,t,s){if(t){let e=s.filter(e=>e.tag===t),n=e.find(e=>!e.format)??e[0];if(!n)throw Error(`Tag ${t} not found`);return n}return s.find(t=>t.identify?.(e)&&!t.format)}(e,t,l.tags);if(!c){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){let t=new en(e);return n&&(n.node=t),t}c=e instanceof Map?l[w]:Symbol.iterator in Object(e)?l[j]:l[w]}a&&(a(c),delete s.onTagObj);let u=c?.createNode?c.createNode(s.schema,e,s):"function"==typeof c?.nodeClass?.from?c.nodeClass.from(s.schema,e,s):new en(e);return t?u.tag=t:c.default||(u.tag=c.tag),n&&(n.node=u),u}function ei(e,t,s){let n=s;for(let e=t.length-1;e>=0;--e){let s=t[e];if("number"==typeof s&&Number.isInteger(s)&&s>=0){let e=[];e[s]=n,n=e}else n=new Map([[s,n]])}return er(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}en.BLOCK_FOLDED="BLOCK_FOLDED",en.BLOCK_LITERAL="BLOCK_LITERAL",en.PLAIN="PLAIN",en.QUOTE_DOUBLE="QUOTE_DOUBLE",en.QUOTE_SINGLE="QUOTE_SINGLE";let ea=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class el extends ee{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>_(t)||T(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(ea(e))this.add(t);else{let[s,...n]=e,r=this.get(s,!0);if($(r))r.addIn(n,t);else if(void 0===r&&this.schema)this.set(s,ei(this.schema,n,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}}deleteIn(e){let[t,...s]=e;if(0===s.length)return this.delete(t);let n=this.get(t,!0);if($(n))return n.deleteIn(s);throw Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){let[s,...n]=e,r=this.get(s,!0);return 0===n.length?!t&&C(r)?r.value:r:$(r)?r.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!T(t))return!1;let s=t.value;return null==s||e&&C(s)&&null==s.value&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[t,...s]=e;if(0===s.length)return this.has(t);let n=this.get(t,!0);return!!$(n)&&n.hasIn(s)}setIn(e,t){let[s,...n]=e;if(0===n.length)this.set(s,t);else{let e=this.get(s,!0);if($(e))e.setIn(n,t);else if(void 0===e&&this.schema)this.set(s,ei(this.schema,n,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}}}let eo=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function ec(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}let eu=(e,t,s)=>e.endsWith("\n")?ec(s,t):s.includes("\n")?"\n"+ec(s,t):(e.endsWith(" ")?"":" ")+s,ed="flow",ef="block",eh="quoted";function ep(e,t,s="flow",{indentAtStart:n,lineWidth:r=80,minContentWidth:i=20,onFold:a,onOverflow:l}={}){let o,c,u;if(!r||r<0)return e;r<i&&(i=0);let d=Math.max(1+i,1+r-t.length);if(e.length<=d)return e;let f=[],h={},p=r-t.length;"number"==typeof n&&(n>r-Math.max(2,i)?f.push(0):p=r-n);let m=!1,g=-1,y=-1,b=-1;for(s===ef&&-1!==(g=em(e,g,t.length))&&(p=g+d);u=e[g+=1];){if(s===eh&&"\\"===u){switch(y=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}b=g}if("\n"===u)s===ef&&(g=em(e,g,t.length)),p=g+t.length+d,o=void 0;else{if(" "===u&&c&&" "!==c&&"\n"!==c&&" "!==c){let t=e[g+1];t&&" "!==t&&"\n"!==t&&" "!==t&&(o=g)}if(g>=p)if(o)f.push(o),p=o+d,o=void 0;else if(s===eh){for(;" "===c||" "===c;)c=u,u=e[g+=1],m=!0;let t=g>b+1?g-2:y-1;if(h[t])return e;f.push(t),h[t]=!0,p=t+d,o=void 0}else m=!0}c=u}if(m&&l&&l(),0===f.length)return e;a&&a();let x=e.slice(0,f[0]);for(let n=0;n<f.length;++n){let r=f[n],i=f[n+1]||e.length;0===r?x=`
|
|
2
2
|
${t}${e.slice(0,i)}`:(s===eh&&h[r]&&(x+=`${e[r]}\\`),x+=`
|
|
3
3
|
${t}${e.slice(r+1,i)}`)}return x}function em(e,t,s){let n=t,r=t+1,i=e[r];for(;" "===i||" "===i;)if(t<r+s)i=e[++t];else{do i=e[++t];while(i&&"\n"!==i)n=t,i=e[r=t+1]}return n}let eg=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});function ey(e,t){let s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;let{implicitKey:n}=t,r=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),a="",l=0;for(let e=0,t=s[e];t;t=s[++e])if(" "===t&&"\\"===s[e+1]&&"n"===s[e+2]&&(a+=s.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(s[e+1]){case"u":{a+=s.slice(l,e);let t=s.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=s.substr(e,6)}e+=5,l=e+1}break;case"n":if(n||'"'===s[e+2]||s.length<r)e+=1;else{for(a+=s.slice(l,e)+"\n\n";"\\"===s[e+2]&&"n"===s[e+3]&&'"'!==s[e+4];)a+="\n",e+=2;a+=i," "===s[e+2]&&(a+="\\"),e+=1,l=e+1}break;default:e+=1}return a=l?a+s.slice(l):s,n?a:ep(a,i,eh,eg(t,!1))}function eb(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return ey(e,t);let s=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
4
4
|
${s}`)+"'";return t.implicitKey?n:ep(n,s,ed,eg(t,!1))}function ex(e,t){let s,{singleQuote:n}=t.options;if(!1===n)s=ey;else{let t=e.includes('"'),r=e.includes("'");s=t&&!r?eb:r&&!t?ey:n?eb:ey}return s(e,t)}try{t=RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{t=/\n+(?!\n|$)/g}function ev({comment:e,type:s,value:n},r,i,a){let l,o,c,u,{blockQuote:d,commentString:f,lineWidth:h}=r.options;if(!d||/\n[\t ]+$/.test(n))return ex(n,r);let p=r.indent||(r.forceBlockIndent||(u=n,/^(%|---|\.\.\.)/m.test(u))?" ":""),m="literal"===d||"folded"!==d&&s!==en.BLOCK_FOLDED&&(s===en.BLOCK_LITERAL||!function(e,t,s){if(!t||t<0)return!1;let n=t-s,r=e.length;if(r<=n)return!1;for(let t=0,s=0;t<r;++t)if("\n"===e[t]){if(t-s>n)return!0;if(r-(s=t+1)<=n)return!1}return!0}(n,h,p.length));if(!n)return m?"|\n":">\n";for(o=n.length;o>0;--o){let e=n[o-1];if("\n"!==e&&" "!==e&&" "!==e)break}let g=n.substring(o),y=g.indexOf("\n");-1===y?l="-":n===g||y!==g.length-1?(l="+",a&&a()):l="",g&&(n=n.slice(0,-g.length),"\n"===g[g.length-1]&&(g=g.slice(0,-1)),g=g.replace(t,`$&${p}`));let b=!1,x=-1;for(c=0;c<n.length;++c){let e=n[c];if(" "===e)b=!0;else if("\n"===e)x=c;else break}let v=n.substring(0,x<c?x+1:c);v&&(n=n.substring(v.length),v=v.replace(/\n+/g,`$&${p}`));let k=p?"2":"1",w=(b?k:"")+l;if(e&&(w+=" "+f(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!m){let e=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`),t=!1,i=eg(r,!0);"folded"!==d&&s!==en.BLOCK_FOLDED&&(i.onOverflow=()=>{t=!0});let a=ep(`${v}${e}${g}`,p,ef,i);if(!t)return`>${w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,76713,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(22016),n=e.i(82983),r=e.i(46670),c=e.i(77071),i=e.i(99835),l=e.i(59659),d=e.i(21357),o=e.i(56420);let x={name:"toggle-left",size:24,node:[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]};x.node;let h=(0,o.f)(x),u={name:"toggle-right",size:24,node:[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]};u.node;let f=(0,o.f)(u);e.s(["default",0,function(){let[e,o]=(0,s.useState)([]),[x,u]=(0,s.useState)(!0),[m,b]=(0,s.useState)(""),g=async()=>{try{let e=await n.f.webhooks.list();o(e)}catch{b("Failed to load webhooks. The API may be unavailable.")}finally{u(!1)}};(0,s.useEffect)(()=>{g()},[]);let p=async e=>{confirm("Delete this webhook endpoint?")&&(await n.f.webhooks.delete(e),g())},N=async e=>{await n.f.webhooks.update(e.id,{active:!e.active}),g()},w=async e=>{let t=await n.f.webhooks.test(e);t?.success?alert("Test webhook sent successfully!"):alert(`Test failed: ${t?.error??"Unknown error"}`)};return x?(0,t.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,t.jsx)("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-accent border-t-transparent"})}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-8 flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:"Webhooks"}),(0,t.jsx)("p",{className:"text-sm mt-1 text-text-muted",children:"Manage webhook endpoints for event notifications"})]}),(0,t.jsxs)(a.default,{href:"/webhooks/new",className:"flex items-center gap-2 text-sm px-4 py-2 rounded-lg bg-accent/10 text-accent hover:bg-accent/20 border border-accent/20 transition-colors",children:[(0,t.jsx)(c.f,{className:"h-4 w-4"})," New Webhook"]})]}),m&&(0,t.jsx)("div",{className:"mb-6 rounded-lg border border-danger/30 bg-danger/5 p-4 text-sm text-danger",children:m}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map(e=>{let s=(()=>{try{return JSON.parse(e.events)}catch{return[]}})();return(0,t.jsxs)("div",{className:"rounded-lg border border-border/50 bg-surface p-5 hover:border-accent/30 transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.f,{className:"h-4 w-4 text-accent"}),(0,t.jsx)(a.default,{href:`/webhooks/${e.id}`,className:"text-sm font-medium text-text hover:text-accent transition-colors",children:e.name}),(0,t.jsx)(r.t,{variant:e.active?"success":"default",children:e.active?"Active":"Inactive"}),(0,t.jsx)(r.t,{variant:"info",children:e.type})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{onClick:()=>w(e.id),className:"flex items-center gap-1 text-xs px-2 py-1 rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors",title:"Send test event",children:[(0,t.jsx)(d.f,{className:"h-3 w-3"})," Test"]}),(0,t.jsx)("button",{onClick:()=>N(e),className:"flex items-center gap-1 text-xs px-2 py-1 rounded text-text-muted hover:text-text transition-colors",title:e.active?"Disable":"Enable",children:e.active?(0,t.jsx)(f,{className:"h-4 w-4 text-success"}):(0,t.jsx)(h,{className:"h-4 w-4"})}),(0,t.jsx)("button",{onClick:()=>p(e.id),className:"flex items-center gap-1 text-xs px-2 py-1 rounded text-danger hover:bg-danger/10 transition-colors",title:"Delete",children:(0,t.jsx)(l.f,{className:"h-3 w-3"})})]})]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-4 text-xs text-text-muted",children:[(0,t.jsx)("span",{className:"font-mono truncate max-w-md",children:e.url}),(0,t.jsxs)("span",{children:[e._count?.deliveries??0," deliveries"]}),(0,t.jsx)("span",{children:0===s.length?"All events":s.join(", ")})]})]},e.id)})}):(0,t.jsxs)("div",{className:"text-center py-16 text-text-muted border border-border/50 rounded-lg bg-surface/30",children:[(0,t.jsx)(i.f,{className:"h-8 w-8 mx-auto mb-3 text-text-muted/50"}),(0,t.jsx)("p",{children:"No webhook endpoints configured"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:"Create an endpoint to receive event notifications"})]})]})}],76713)},46670,e=>{var t=e.i(43476),s=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},n={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:r="default",className:c,dot:i=!1,pulse:l=!1}){return(0,t.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",a[r],c),children:[i&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[l&&(0,t.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",n[r])}),(0,t.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",n[r])})]}),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"}}])},21357,e=>{var t=e.i(56420);let s={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};s.node;let a=(0,t.f)(s);e.s(["f",0,a],21357)}])})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36081,e=>{var a=e.i(43476),t=e.i(71645),r=e.i(41120),s=e.i(41220),n=e.i(82983),i=e.i(68759),l=e.i(63376),o=e.i(332);e.s(["default",0,function(){let[e,d]=(0,t.useState)([]),[c,x]=(0,t.useState)(!0),[u,h]=(0,t.useState)(""),p=(0,t.useCallback)(e=>{d(a=>a.map(a=>a.nodeId===e.nodeId?e:a))},[]);async function m(e=!1){x(!0),h("");try{d((await n.f.codex.installations(e)).data??[])}catch(e){h(e instanceof Error?e.message:"Failed to load Codex installations")}finally{x(!1)}}(0,t.useEffect)(()=>{m()},[]);let g=e.filter(e=>e.installed&&e.reachable),f=g.filter(e=>e.auth.oauth).length;return(0,a.jsxs)(l.U,{className:"space-y-6",children:[(0,a.jsx)(l.z,{children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider text-primary",children:"Codex Installations"}),(0,a.jsx)("p",{className:"mt-1 text-[11px] uppercase tracking-wider text-text-muted",children:c?"Checking installations...":`${e.length} managed nodes \xb7 ${g.length} Codex installations \xb7 ${f} authenticated with ChatGPT OAuth`})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(i.K,{size:"sm",variant:"secondary",disabled:c,icon:(0,a.jsx)(r.f,{className:`h-3.5 w-3.5 ${c?"animate-spin":""}`}),onClick:()=>void m(!0),children:"Refresh All"}),(0,a.jsx)(s.f,{className:"h-6 w-6 text-primary"})]})]})}),(0,a.jsx)(l.z,{children:(0,a.jsx)("div",{className:"rounded border border-primary/30 bg-primary/5 p-4 text-xs leading-5 text-text-muted",children:"Magnus validates managed ChatGPT OAuth through Codex App Server without silently refreshing an expired access token. Expired credentials are logged out automatically; generating a device code starts only the ChatGPT subscription flow."})}),u&&(0,a.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 p-4 text-xs text-danger",children:u}),(0,a.jsx)(l.z,{children:(0,a.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[g.map(e=>(0,a.jsx)(o.f,{installation:e,onChange:p},e.nodeId)),!c&&0===g.length&&(0,a.jsxs)("div",{className:"rounded border border-border bg-surface p-8 text-center text-xs text-text-muted xl:col-span-2",children:["No Codex installations were detected across ",e.length," managed nodes."]})]})})]})}])},332,e=>{var a=e.i(43476),t=e.i(71645),r=e.i(89664),s=e.i(56420);let n={name:"clipboard",size:24,node:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]};n.node;let i=(0,s.f)(n);var l=e.i(82022),o=e.i(58925),d=e.i(67784),c=e.i(41120),x=e.i(82983),u=e.i(46670),h=e.i(68759),p=e.i(93999);function m(e,a){if(void 0!==e.data)return e.data;throw Error(e.error?.message??a)}function g(e){return e?new Date(e).toLocaleString():"not available"}e.s(["f",0,function({installation:e,onChange:s}){var n;let[f,v]=(0,t.useState)(null),[b,w]=(0,t.useState)(""),[j,N]=(0,t.useState)(null),[y,k]=(0,t.useState)(!1);async function C(e,a){v(e),w("");try{s(await a())}catch(a){w(a instanceof Error?a.message:`${e} failed`)}finally{v(null)}}async function E(){v("device"),w("");try{N(m(await x.f.codex.startDeviceAuth(e.nodeId),"Could not create a Codex device code"))}catch(e){w(e instanceof Error?e.message:"Could not create a Codex device code")}finally{v(null)}}async function _(){if(j){v("cancel");try{N(m(await x.f.codex.cancelDeviceAuth(e.nodeId,j.id),"Could not cancel device login"))}catch(e){w(e instanceof Error?e.message:"Could not cancel device login")}finally{v(null)}}}async function I(){j&&(await navigator.clipboard.writeText(j.userCode),k(!0),window.setTimeout(()=>k(!1),1500))}return(0,t.useEffect)(()=>{if(!j||"pending"!==j.status)return;let a=window.setInterval(async()=>{try{let a=m(await x.f.codex.deviceAuth(e.nodeId,j.id),"Device login status failed");if(N(a),"completed"===a.status){let a=m(await x.f.codex.installation(e.nodeId),"Codex status refresh failed");s(a)}}catch(e){w(e instanceof Error?e.message:"Device login status failed")}},2e3);return()=>window.clearInterval(a)},[e.nodeId,s,j]),(0,a.jsx)(p.N,{title:e.nodeName,description:`${e.hostname}${e.user?` \xb7 ${e.user}`:""}`,action:(0,a.jsx)(u.t,{variant:e.reachable?"authenticated"===(n=e.auth.status)?"success":"error"===n?"danger":"expired_logged_out"===n||"wrong_auth_mode"===n?"warning":"default":"danger",children:e.reachable?e.auth.status.replaceAll("_"," "):"unreachable"}),children:(0,a.jsxs)("div",{className:"space-y-4",children:[!e.reachable&&(0,a.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 p-3 text-xs text-danger",children:e.error??"Magnus Agent is unreachable."}),e.reachable&&!e.installed&&(0,a.jsx)("div",{className:"rounded border border-warning/30 bg-warning/10 p-3 text-xs text-warning",children:"Codex CLI was not detected on this node."}),e.reachable&&e.installed&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3 text-[11px] text-text-muted",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Installed"}),(0,a.jsx)("span",{className:"font-mono text-text",children:e.version??"unknown"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Current release"}),(0,a.jsx)("span",{className:"font-mono text-text",children:e.latestVersion??"unavailable"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Update"}),(0,a.jsx)(u.t,{variant:e.updateAvailable?"warning":e.updateSupported&&e.latestVersion?"success":"default",children:e.updateSupported?e.updateAvailable?"available":e.latestVersion?"current":"unknown":"read only"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Install manager"}),(0,a.jsx)("span",{className:"text-text",children:e.provenance})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Auth mode"}),(0,a.jsx)("span",{className:"text-text",children:"chatgpt"===e.auth.mode?"ChatGPT OAuth":e.auth.mode??"none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Access token"}),(0,a.jsx)(u.t,{variant:!1===e.auth.tokenExpired?"success":e.auth.tokenExpired?"danger":"default",children:!1===e.auth.tokenExpired?"current":e.auth.tokenExpired?"expired":"not present"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Expires"}),(0,a.jsx)("span",{className:"text-text",children:g(e.auth.tokenExpiresAt)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Refresh credential"}),(0,a.jsx)(u.t,{variant:e.auth.refreshTokenPresent?"success":"warning",children:e.auth.refreshTokenPresent?"present":"missing"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Plan"}),(0,a.jsx)("span",{className:"text-text",children:e.auth.planType??"not reported"})]})]}),(0,a.jsxs)("div",{className:`rounded border p-3 text-xs leading-5 ${e.auth.oauth?"border-success/30 bg-success/10 text-success":"border-warning/30 bg-warning/10 text-warning"}`,children:[e.auth.message,(0,a.jsx)("span",{className:"mt-1 block text-[10px] opacity-80",children:"API-key credentials are not used by this Magnus flow."})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.installed&&e.updateSupported&&(e.updateAvailable||!e.latestVersion)&&(0,a.jsx)(h.K,{size:"sm",variant:"secondary",disabled:null!==f,icon:(0,a.jsx)(c.f,{className:`h-3.5 w-3.5 ${"update"===f?"animate-spin":""}`}),onClick:()=>void C("update",async()=>m(await x.f.codex.update(e.nodeId),"Codex update failed")),children:e.latestVersion?"Update Codex":"Check & Update Codex"}),!e.auth.oauth&&(0,a.jsx)(h.K,{size:"sm",disabled:null!==f||j?.status==="pending",icon:(0,a.jsx)(o.f,{className:"h-3.5 w-3.5"}),onClick:()=>void E(),children:"Generate Device Code"}),e.auth.oauth&&(0,a.jsx)(h.K,{size:"sm",variant:"danger",disabled:null!==f,icon:(0,a.jsx)(d.f,{className:"h-3.5 w-3.5"}),onClick:()=>void C("logout",async()=>m(await x.f.codex.logout(e.nodeId),"Codex logout failed")),children:"Log Out"})]})]}),j&&(0,a.jsxs)("div",{className:"rounded border border-primary/40 bg-primary/5 p-4","aria-live":"polite",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:["Device login · ",j.status]}),(0,a.jsx)(u.t,{variant:"completed"===j.status?"success":"pending"===j.status?"warning":"danger",children:j.status})]}),"pending"===j.status&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"mt-3 text-xs text-text-muted",children:"Open the authorization page, sign in to ChatGPT, and enter this one-time code:"}),(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[(0,a.jsx)("code",{className:"rounded border border-primary/40 bg-bg px-4 py-2 text-lg font-bold tracking-[0.2em] text-primary",children:j.userCode}),(0,a.jsx)(h.K,{size:"sm",variant:"secondary",icon:y?(0,a.jsx)(r.f,{className:"h-3.5 w-3.5"}):(0,a.jsx)(i,{className:"h-3.5 w-3.5"}),onClick:()=>void I(),children:y?"Copied":"Copy Code"}),(0,a.jsxs)("a",{className:"inline-flex h-8 items-center gap-2 rounded border border-primary/60 bg-primary/10 px-3 text-[11px] font-medium uppercase tracking-wider text-primary hover:bg-primary/20",href:j.verificationUrl,target:"_blank",rel:"noreferrer",children:["Open OpenAI ",(0,a.jsx)(l.f,{className:"h-3.5 w-3.5"})]})]}),(0,a.jsxs)("p",{className:"mt-2 text-[10px] text-text-muted",children:["Expires ",g(j.expiresAt),". Continue only if you started this request here."]}),(0,a.jsx)(h.K,{className:"mt-3",size:"sm",variant:"ghost",disabled:null!==f,onClick:()=>void _(),children:"Cancel"})]}),"pending"!==j.status&&(0,a.jsx)("p",{className:"mt-3 text-xs text-text-muted",children:j.error??("completed"===j.status?"ChatGPT OAuth authorization completed.":"Device authorization ended.")})]}),b&&(0,a.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 p-3 text-xs text-danger",children:b})]})})}],332)},46670,e=>{var a=e.i(43476),t=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},s={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,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,a.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,a.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",s[n])}),(0,a.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",s[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=>{var a=e.i(43476),t=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let s=(0,t.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let d={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)]"},c={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:t=100,tone:r,thresholds:s=o.q,label:n,size:l="xs",showValue:u=!1,valueLabel:h,glow:p,className:m,testId:g}){let f="number"==typeof e&&Number.isFinite(e),v=f?Math.max(0,Math.min(100,e/(t||1)*100)):0,b=r??(f?(0,o.Z)(v,s):"muted"),w=p||!r&&f&&v>=s.warn,j=h??(f?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,a.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",m),"data-testid":g,children:[(0,a.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":f?e:void 0,"aria-valuetext":j,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",c[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[b],w&&d[b])})}),u&&(0,a.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",f?o.T[b]:"text-text-muted"),children:j})]})}e.s(["f",0,x],51196);var u=e.i(71645);function h({values:e,tone:t="primary",width:r=160,height:s=32,area:n=!0,max:l,percent:d=!1,threshold:c,live:x=!0,emptyLabel:p="not enough data",className:m,testId:g,label:f,stretch:v=!1}){let b=`spark${(0,u.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",m),"data-testid":g,children:p});let w=o.v[t],j=l??(d?Math.max(100,...e):Math.max(...e,c??0)||1),N=s-4,y=r/(e.length-1),k=e=>2+N-Math.max(0,e)/j*N,C=e.map((e,a)=>[a*y,k(e)]),E=C.map(([e,a])=>`${e.toFixed(1)},${a.toFixed(1)}`).join(" "),_=C[C.length-1];return(0,a.jsxs)("svg",{width:v?"100%":r,height:s,viewBox:`0 0 ${r} ${s}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",m),"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:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:w,stopOpacity:.35}),(0,a.jsx)("stop",{offset:"100%",stopColor:w,stopOpacity:0})]})}),(0,a.jsx)("polygon",{points:`0,${s} ${E} ${r},${s}`,fill:`url(#${b})`})]}),void 0!==c&&(0,a.jsx)("line",{x1:0,x2:r,y1:k(c),y2:k(c),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,a.jsx)("polyline",{fill:"none",stroke:w,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:_[0],cy:_[1],r:2.5,fill:w,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,a.jsx)("circle",{cx:_[0],cy:_[1],r:2,fill:w})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:t,children:r,className:s,action:n,tone:i,corners:o=!1,...d}){return(0,a.jsx)(l.f,{...d,tone:i,corners:o,title:e,description:t,action:n,className:s,children:r})},"n",0,function({label:e,value:t,icon:r,trend:d,spark:c,meter:u,delta:p,tone:m="primary",className:g,testId:f}){let v=!p||p.value>=0===(p.positiveIsGood??!0);return(0,a.jsxs)(l.f,{tone:m,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"===m?"text-primary neon-text":o.T[m]),children:t}),p&&0!==p.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:[p.value>0?(0,a.jsx)(n.f,{className:"h-3 w-3"}):(0,a.jsx)(s,{className:"h-3 w-3"}),Math.abs(p.value).toFixed(+!Number.isInteger(p.value)),p.unit]})]}),d&&(0,a.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",d.positive?"text-success":"text-danger"),children:d.value}),void 0!==u&&(0,a.jsx)(x,{value:u,className:"mt-3",label:e}),c&&c.length>1&&(0,a.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,a.jsx)(h,{values:c,tone:m,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{var a=e.i(43476),t=e.i(78571),r=e.i(35084);let s={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:d=!0,hero:c=!1,title:x,description:u,icon:h,action:p,as:m="div",padding:g="md",testId:f,className:v,children:b,...w}){return(0,a.jsxs)(m,{...w,"data-testid":f??w["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[g],o&&"panel-corners",o&&s[e],d&&"glow-hover",d&&n[e],d&&i[e],c&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||p||h)&&(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:[h&&(0,a.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",r.T[e]),children:h}),(0,a.jsxs)("div",{className:"min-w-0",children:[x&&(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),u&&(0,a.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:u})]})]}),p]}),b]})}])},63376,e=>{var a=e.i(43476);e.s(["z",0,function({children:e,className:t}){return(0,a.jsx)("div",{className:`animate-page-in${t?` ${t}`:""}`,children:e})},"U",0,function({children:e,className:t}){return(0,a.jsx)("div",{className:t,children:e})}])},75775,e=>{var a=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],75775)},82022,e=>{var a=e.i(56420);let t={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],82022)}])})();
|