local-operator-ui 0.46.0 → 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/main/index.js +5462 -3030
- package/out/preload/index.js +3 -0
- package/out/renderer/assets/{_basePickBy-Bg2PntRn.js → _basePickBy-Cj0fEIOH.js} +1 -1
- package/out/renderer/assets/{_baseUniq-Sw_DRRUZ.js → _baseUniq-Cz-33liX.js} +1 -1
- package/out/renderer/assets/addressOverlayList-AR8aOeNw.js +1 -0
- package/out/renderer/assets/{addressOverlayList-B7X6o95l.css → addressOverlayList-Csi0NFuY.css} +1 -1
- package/out/renderer/assets/agent-details-page-B_RY1sJD.js +6 -0
- package/out/renderer/assets/agent-hub-page-PLff8S61.js +6 -0
- package/out/renderer/assets/agents-page-DjxNEBlZ.js +14 -0
- package/out/renderer/assets/approvalsOverlay-D8l6Tw61.js +1 -0
- package/out/renderer/assets/{arc-BjEpYkt3.js → arc-BoGkGb9O.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-n2nrkgqq.js → architectureDiagram-IEHRJDOE-DIk417XV.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-CBHAlphe.js → blockDiagram-JOT3LUYC-CnvuT-yC.js} +1 -1
- package/out/renderer/assets/{book-open-1zGbkXts.js → book-open-C3_WLj7w.js} +1 -1
- package/out/renderer/assets/browser-page-CWu1j6RM.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-DF7G3wHO.js → browser-webauthn-prompt-Du6obwHK.js} +1 -1
- package/out/renderer/assets/{building-2-xAIkeocN.js → building-2-CLOF900G.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-BeEL1M9r.js → c4Diagram-VJAJSXHY-BVhES_2B.js} +1 -1
- package/out/renderer/assets/channel-CJkPlu3m.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-DrBLki1x.js → chunk-4BMEZGHF-DgE_mqR9.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-CcpqDYyq.js → chunk-A2AXSNBT-D08EB0eQ.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-By2248qy.js → chunk-AEK57VVT-BDtiHBHO.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-70TDt_Io.js → chunk-D6G4REZN-B7aVznI0.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-xZsyOq6V.js → chunk-RZ5BOZE2-BKygjVB2.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-DvNMGF5J.js → chunk-XZIHB7SX-WCJjYEMM.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-qpQhrrhz.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-qpQhrrhz.js +1 -0
- package/out/renderer/assets/clone-Dg8l-jy4.js +1 -0
- package/out/renderer/assets/{console-mirror-DLnj_s8B.js → console-mirror-DeqlFqxb.js} +1 -1
- package/out/renderer/assets/{consoleCapture-D06Kq6KP.js → consoleCapture-CQlGEG3v.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-wILdIPP1.js → conversation-input-sync-Cqe7zy7f.js} +250 -250
- package/out/renderer/assets/{dagre-OKDRZEBW-CLd7U4De.js → dagre-OKDRZEBW-CVWKP4bn.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-nSRWWPzA.js → diagram-SSKATNLV-BC-K6ofw.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-D3LSHEXi.js → diagram-VNBRO52H-Cb3_NzRb.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-CwYNgJEl.js → erDiagram-Q7BY3M3F-BbKSqMZd.js} +1 -1
- package/out/renderer/assets/{error-boundary-BwM9HB5p.js → error-boundary-D9GOvskD.js} +2 -2
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-Dd8IxxGC.js → flowDiagram-4HSFHLVR-Cpli-q1Q.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-JScwUa8i.js → ganttDiagram-APWFNJXF-i6JdfeW8.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-CniLBv5X.js → gitGraphDiagram-7IBYFJ6S-CPPfXcNo.js} +1 -1
- package/out/renderer/assets/{graph-DLIX7dfC.js → graph-DN2ItNYX.js} +1 -1
- package/out/renderer/assets/{hash-CfghQFJz.js → hash-BIJpkSWf.js} +1 -1
- package/out/renderer/assets/{heart-CbNuxwI-.js → heart-D2NQaIZG.js} +1 -1
- package/out/renderer/assets/{index-CH-k2xgZ.js → index-AFJQ1QjL.js} +205 -205
- package/out/renderer/assets/index-B64TRZpD.css +1 -0
- package/out/renderer/assets/{index-A1hV3Zf6.js → index-BMMKLQIt.js} +1 -1
- package/out/renderer/assets/{index-BIxwLxvA.js → index-Cc73tz3D.js} +1 -1
- package/out/renderer/assets/{index-BIOVGPUK.js → index-CcuBo9nT.js} +1 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-DhvQOOVe.js +2 -0
- package/out/renderer/assets/{installer-qsxCAFP3.js → installer-DFfS2SVK.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-9Mk8BYjc.js → journeyDiagram-U35MCT3I-BRkHsPvh.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-CJT2kV3V.js → kanban-definition-NDS4AKOZ-CMiqan9t.js} +1 -1
- package/out/renderer/assets/{layout-HxyRPQFo.js → layout-Z7uXh1qn.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-CP11tw2r.js → legacy-agents-page-BHBgHvV3.js} +8 -8
- package/out/renderer/assets/{library-page-DCvoJ9B1.js → library-page-EGjIy1i-.js} +3 -3
- package/out/renderer/assets/{mermaid.core-JDDWxi_1.js → mermaid.core-IQK_8xGt.js} +5 -5
- package/out/renderer/assets/{mesh-page-Nt5c_UBP.js → mesh-page-Bc9ilTD0.js} +1 -1
- package/out/renderer/assets/messages-BHHYgmiq.js +27 -0
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-EnBWrd7h.js → mindmap-definition-ALO5MXBD-CI_JdH5p.js} +1 -1
- package/out/renderer/assets/{mini-BYAAu7K2.js → mini-gBq8umUW.js} +1 -1
- package/out/renderer/assets/{notebook-pen-C8ZCuuoa.js → notebook-pen-DRDufegP.js} +1 -1
- package/out/renderer/assets/{notifications-page-Bs0KizWL.js → notifications-page-Bu5qf7Fp.js} +1 -1
- package/out/renderer/assets/{org-access-Bui0nch2.js → org-access-Ds8FeuE9.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-CfqBVm1m.js → org-surface-gate-DBqmiY3f.js} +1 -1
- package/out/renderer/assets/{page-header-ieQr-cSr.js → page-header-CcfnNa21.js} +1 -1
- package/out/renderer/assets/{path-utils-Cpj2hmLX.js → path-utils-CEoNIn5y.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-DYDYBgsV.js → pieDiagram-IB7DONF6-CZPP2edW.js} +1 -1
- package/out/renderer/assets/{project-markdown-BG7r7Py7.js → project-markdown-CD_uBmTI.js} +1 -1
- package/out/renderer/assets/{projects-page-Cw7uMv2F.js → projects-page-DFUD33vh.js} +5 -5
- package/out/renderer/assets/{publication-validation-Bop1t9Rh.js → publication-validation-DGR8lqu1.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-CoLcq4Bm.js → quadrantDiagram-7GDLP6J5-CJeiyx_t.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-Dva6bZY9.js → radar-MK3ICKWK-lTUr66ub.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-BwliPxWF.js → radient-auth-buttons-DkoyJ9mK.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-BAYToXyc.js → requirementDiagram-KVF5MWMF-BZyNKL7q.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-DSNfEfFy.js → sankeyDiagram-QLVOVGJD-YGTZYJF4.js} +1 -1
- package/out/renderer/assets/{schedules-page-DCGkJc3y.js → schedules-page-C4TSKd4h.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-CQ-BX5x7.js → sequenceDiagram-X6HHIX6F-BA4KFDyE.js} +1 -1
- package/out/renderer/assets/{settings-page-CHq-2h3E.js → settings-page-BP9Gt9PN.js} +1 -1
- package/out/renderer/assets/{smartart-D7OeUYx2.js → smartart-MrgQ4iBs.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-C1MDmeSB.js → stateDiagram-DGXRK772-DxbUUQKF.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BcSdZSDe.js +1 -0
- package/out/renderer/assets/{team-bridge-page-DiTUSNgx.js → team-bridge-page-Y8GmEvgr.js} +1 -1
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-80bVHpbY.js → timeline-definition-BDJGKUSR-BsEl_rbb.js} +1 -1
- package/out/renderer/assets/{use-default-on-banner-BVJsVIHY.js → use-default-on-banner-8zeoWhwA.js} +1 -1
- package/out/renderer/assets/use-download-agent-mutation-A5L-m_C-.js +56 -0
- package/out/renderer/assets/{use-session-snapshot-DVBRW4Uy.js → use-session-snapshot-DQWB2js_.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-BpWfZyAr.js → xychartDiagram-VJFVF3MP-uv2av9fE.js} +1 -1
- package/out/renderer/browser-address-overlay-list.html +2 -2
- package/out/renderer/browser-approvals-overlay.html +2 -2
- package/out/renderer/console-capture.html +6 -6
- package/out/renderer/index.html +8 -8
- package/out/renderer/installer.html +5 -5
- package/out/renderer/mini.html +8 -8
- package/package.json +2 -2
- package/out/renderer/assets/addressOverlayList-SGt8bawf.js +0 -1
- package/out/renderer/assets/agent-details-page-HD9ux8Ah.js +0 -6
- package/out/renderer/assets/agent-hub-page-Dzr7pO0y.js +0 -6
- package/out/renderer/assets/agents-page-l7a_qK5a.js +0 -14
- package/out/renderer/assets/approvalsOverlay-4fcnnxqV.js +0 -1
- package/out/renderer/assets/browser-page-4sDvzTWx.js +0 -1
- package/out/renderer/assets/channel-B1PQ42_m.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-D6nDNM9M.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-D6nDNM9M.js +0 -1
- package/out/renderer/assets/clone-CP1xdDT6.js +0 -1
- package/out/renderer/assets/index-iwMVQVee.css +0 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-BdAARVKc.js +0 -2
- package/out/renderer/assets/messages-BaR4LA7j.js +0 -27
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-D88m2aTt.js +0 -1
- package/out/renderer/assets/use-download-agent-mutation-CZ6tp236.js +0 -56
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.1",
|
|
4
4
|
"productName": "Local Operator",
|
|
5
5
|
"description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
|
|
6
6
|
"main": "./out/main/index.js",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"test:window-guards": "node scripts/window-guards-electron.test.mjs",
|
|
91
91
|
"test:window-glass": "node --test scripts/window-glass-cdp.test.mjs",
|
|
92
92
|
"test:tag-dialogs": "node scripts/run-desktop-tests.mjs scripts/chat-tag-dialogs-immediate.test.mjs",
|
|
93
|
-
"test:desktop": "node scripts/run-desktop-tests.mjs scripts/about-panel.test.mjs scripts/agent-class-toggle.test.mjs scripts/agent-hub-org-sharing.test.mjs scripts/agent-hub-public-teams.test.mjs scripts/agent-hub-queries.test.mjs scripts/agent-hub-skills-tab-count.test.mjs scripts/agent-hub-teams-tab-count.test.mjs scripts/agent-messages-busy.test.mjs scripts/agent-messages-dialog.test.mjs scripts/agent-messages-model.test.mjs scripts/agent-messages-settings.test.mjs scripts/agent-shell-spawn-env.test.mjs scripts/agents-composer-mount.test.mjs scripts/agents-config-probe-cadence.test.mjs scripts/agents-config-retry.test.mjs scripts/agents-config-summary.test.mjs scripts/agents-offer-dismiss.test.mjs scripts/agents-publication.test.mjs scripts/agents-source-and-recency-locale.test.mjs scripts/aida-rail-marks.test.mjs scripts/aida-sidebar.test.mjs scripts/analytics-channels.test.mjs scripts/analytics-rate-format.test.mjs scripts/analytics-session-table.test.mjs scripts/approval-escape.test.mjs scripts/approvals-card-document.test.mjs scripts/approvals-overlay.test.mjs scripts/ask-composer-no-routing.test.mjs scripts/ask-dismiss-panel.test.mjs scripts/ask-dismiss.test.mjs scripts/ask-draft-swap.test.mjs scripts/ask-open-policy.test.mjs scripts/ask-open-render.test.mjs scripts/ask-options.test.mjs scripts/ask-other.test.mjs scripts/ask-queue.test.mjs scripts/ask-revise.test.mjs scripts/asks-app-regression.test.mjs scripts/at-mentions.test.mjs scripts/attachment-files.test.mjs scripts/attachment-live-row.test.mjs scripts/attachment-url.test.mjs scripts/attention-seen.test.mjs scripts/audio-engine.test.mjs scripts/audio-meter-stream.test.mjs scripts/audio-recording-levels.test.mjs scripts/authoring-refresh.test.mjs scripts/backend-error-surfaces.test.mjs scripts/backend-setting-combos.test.mjs scripts/backend-settings-collapse.test.mjs scripts/backend-settings-drafts.test.mjs scripts/backend-settings-tiers.test.mjs scripts/backend-spawn-address.test.mjs scripts/backend-version-drift.test.mjs scripts/browser-address-autocomplete.test.mjs scripts/browser-address-history.test.mjs scripts/browser-address-overlay.test.mjs scripts/browser-address-raises.test.mjs scripts/browser-approvals-dock-width.test.mjs scripts/browser-approvals-route.test.mjs scripts/browser-chord-renderer.test.mjs scripts/browser-chord.test.mjs scripts/browser-chrome-gaps.test.mjs scripts/browser-chrome-s4b-probe-rig.test.mjs scripts/browser-chrome.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/browser-find-row.test.mjs scripts/browser-history-store.test.mjs scripts/browser-host.test.mjs scripts/browser-network-capture.test.mjs scripts/browser-page-controls.test.mjs scripts/browser-page-menu-focus.test.mjs scripts/browser-page-menu.test.mjs scripts/browser-queue-expiry.test.mjs scripts/browser-site-trigger.test.mjs scripts/browser-start-page.test.mjs scripts/browser-startup.test.mjs scripts/browser-tab-management.test.mjs scripts/browser-tab-actions-menu.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/browser-toolbar.test.mjs scripts/browser-url-autocomplete.test.mjs scripts/browser-view-policy-kinds.test.mjs scripts/btw-aside.test.mjs scripts/build-env-guard.test.mjs scripts/bundled-runtime-layout.test.mjs scripts/canonical-chat.test.mjs scripts/canonical-notice.test.mjs scripts/canvas-file-freshness.test.mjs scripts/canvas-goals.test.mjs scripts/canvas-tab-close.test.mjs scripts/capture-evidence.test.mjs scripts/chat-archive-press.test.mjs scripts/chat-archived.test.mjs scripts/chat-device-guidance.test.mjs scripts/chat-device-model.test.mjs scripts/chat-device-placement.test.mjs scripts/chat-image-expand.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-link-affordances.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-pane-floors.test.mjs scripts/chat-remote.test.mjs scripts/chat-search.test.mjs scripts/chat-session-copy-id.test.mjs scripts/chat-session-status.test.mjs scripts/chat-session-subagents.test.mjs scripts/chat-sidebar-agents.test.mjs scripts/chat-sidebar-archive.test.mjs scripts/chat-sidebar-connection-voices.test.mjs scripts/chat-sidebar-drafts.test.mjs scripts/chat-sidebar-hover-intent.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/chat-sidebar-scope-paging.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/chat-sidebar-tags.test.mjs scripts/chat-sidebar-time-order.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-status-strip.test.mjs scripts/chat-title.test.mjs scripts/check-build-env.test.mjs scripts/check-design-kit.test.mjs scripts/check-evidence-structure.test.mjs scripts/check-geometry-sources.test.mjs scripts/check-runtime-deps.test.mjs scripts/check-vendored.test.mjs scripts/checkpoint-model.test.mjs scripts/checkpoint-rail.test.mjs scripts/child-reader-foot-react.test.mjs scripts/child-transcript-paging.test.mjs scripts/chrome-keychain.test.mjs scripts/ci-log-guard.test.mjs scripts/ci-scope.test.mjs scripts/clear-search.test.mjs scripts/click-proof-expect.test.mjs scripts/code-review-delayed-flag.test.mjs scripts/code-review-model.test.mjs scripts/code-review-refresh-cue.test.mjs scripts/code-review-row-layout.test.mjs scripts/collapse-plan-per-pass.test.mjs scripts/compact-receipt.test.mjs scripts/completion-view-ack.test.mjs scripts/composer-file-drop.test.mjs scripts/composer-queued-send.test.mjs scripts/composer-readings.test.mjs scripts/composer-refusal.test.mjs scripts/composer-seeding.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tabs.test.mjs scripts/composer-text-authority.test.mjs scripts/composer-tip-react.test.mjs scripts/condense-parity.test.mjs scripts/conflict-markers.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/console-close.test.mjs scripts/console-host.test.mjs scripts/console-i18n-fit.test.mjs scripts/console-mirror.test.mjs scripts/console-pack.test.mjs scripts/console-pane-render.test.mjs scripts/console-pane.test.mjs scripts/context-readout-monotonic.test.mjs scripts/copy-button-copy-locale.test.mjs scripts/credential-capture.test.mjs scripts/credential-composer.test.mjs scripts/cross-session-visibility.test.mjs scripts/currency-math.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/default-effort-options.test.mjs scripts/default-on-banner.test.mjs scripts/delivery-gate.test.mjs scripts/desktop-contract.test.mjs scripts/desktop-feed.test.mjs scripts/desktop-notifier.test.mjs scripts/desktop-proxy.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-stream.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/desktop-test-lane-bound.test.mjs scripts/desktop-test-memory-guard.test.mjs scripts/desktop-test-shards.test.mjs scripts/desktop-watch-lease.test.mjs scripts/dev-driver-attach.test.mjs scripts/dev-driver-gate.test.mjs scripts/dev-shortcuts.test.mjs scripts/directory-listing.test.mjs scripts/document-direction.test.mjs scripts/draft-selection.test.mjs scripts/draft-slash-identity.test.mjs scripts/draft-splash.test.mjs scripts/drafts-clear-on-send.test.mjs scripts/echo-delivery.test.mjs scripts/evidence-fold.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-manifest.test.mjs scripts/evidence-run-guard.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/evidence-tz.test.mjs scripts/external-open-refusal.test.mjs scripts/file-blob-url.test.mjs scripts/finder-files.test.mjs scripts/finder-reveal-scroll.test.mjs scripts/fleet-asks.test.mjs scripts/fold-open.test.mjs scripts/frontend-replace.test.mjs scripts/header-identity-menu.test.mjs scripts/header-identity-model.test.mjs scripts/held-claim-reach.test.mjs scripts/hold-escape-claim.test.mjs scripts/hotkey-registration.test.mjs scripts/hub-link-copy.test.mjs scripts/hub-link-view.test.mjs scripts/hub-links-scene.test.mjs scripts/hub-mutation-safety.test.mjs scripts/hub-skill-alias.test.mjs scripts/hub-skill-state.test.mjs scripts/hub-skills-capability.test.mjs scripts/hub-updates.test.mjs scripts/i18n-wave-b-keyed-copy.test.mjs scripts/i18n/absent-locale.test.mjs scripts/i18n/activation.test.mjs scripts/i18n/canvas-picker-review-remediation.test.mjs scripts/i18n/check-added-strings.test.mjs scripts/i18n/check-coverage.test.mjs scripts/i18n/check-strings.test.mjs scripts/i18n/context-parity.test.mjs scripts/i18n/es-activation.test.mjs scripts/i18n/format.test.mjs scripts/i18n/hi-activation.test.mjs scripts/i18n/ledger-assemble.test.mjs scripts/i18n/ledger-check.test.mjs scripts/i18n/locale-parity.test.mjs scripts/i18n/locale-reactivity.test.mjs scripts/i18n/ru-activation.test.mjs scripts/i18n/runtime.test.mjs scripts/i18n/surface-copy-reactivity.test.mjs scripts/i18n/table-pager-range.test.mjs scripts/i18n/typed-keys.test.mjs scripts/i18n/ur-activation.test.mjs scripts/i18n/vi-activation.test.mjs scripts/i18n/zh-CN-activation.test.mjs scripts/icon-identity.test.mjs scripts/image-actions.test.mjs scripts/image-gen-card.test.mjs scripts/image-preview-decode.test.mjs scripts/import-settings-section.test.mjs scripts/import-settings-view.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/install-scripts-network.test.mjs scripts/integration-model.test.mjs scripts/interrupt-control.test.mjs scripts/interrupt-slot-hold-react.test.mjs scripts/job-cancel-panel.test.mjs scripts/job-controls.test.mjs scripts/journal-order-query.test.mjs scripts/keyboard-shortcuts-section.test.mjs scripts/keymap-chords.test.mjs scripts/keymap-dispatch.test.mjs scripts/keymap-persistence.test.mjs scripts/keymap-registry.test.mjs scripts/keymap-retention.test.mjs scripts/lane-leading.test.mjs scripts/lane-registration.test.mjs scripts/language-dialog.test.mjs scripts/language-live-updates.test.mjs scripts/launch-session.test.mjs scripts/launcher-watch.test.mjs scripts/library-card.test.mjs scripts/library-markdown.test.mjs scripts/library-model.test.mjs scripts/library-page.test.mjs scripts/library-pptx.test.mjs scripts/link-actions.test.mjs scripts/link-targets.test.mjs scripts/linux-sandbox.test.mjs scripts/live-seed-placement.test.mjs scripts/live-update-integrity.test.mjs scripts/loader-state-machine.test.mjs scripts/locale-direction.test.mjs scripts/logger-log-dir.test.mjs scripts/main-locale.test.mjs scripts/managed-python-transaction.test.mjs scripts/managed-python.test.mjs scripts/mark-all-read-control.test.mjs scripts/markdown-remend.test.mjs scripts/markdown-table-widths.test.mjs scripts/mcp-auth-complete-no-retry.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/mcp-catalog-transport.test.mjs scripts/mcp-failure-routing.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/media-surface-floors.test.mjs scripts/mentioned-files.test.mjs scripts/merge-update-feed.test.mjs scripts/mesh-canvas-bench.test.mjs scripts/mesh-tab.test.mjs scripts/message-actions.test.mjs scripts/message-quote.test.mjs scripts/message-surface-floors.test.mjs scripts/mini-view-contract.test.mjs scripts/mini-view-dictation.test.mjs scripts/model-select-store.test.mjs scripts/model-setting-options.test.mjs scripts/monitor-cancel-dialog.test.mjs scripts/monitor-controls.test.mjs scripts/move-session.test.mjs scripts/navigation-gesture.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-shortcut.test.mjs scripts/no-hardlink-write.test.mjs scripts/no-websocket-plane.test.mjs scripts/notification-launch.test.mjs scripts/notification-lifetime.test.mjs scripts/notification-spawn-sites.test.mjs scripts/notifications-model.test.mjs scripts/notifications-off.test.mjs scripts/notifications-operations.test.mjs scripts/notifications-page-pill.test.mjs scripts/notifications-reel-observer.test.mjs scripts/older-history-slot.test.mjs scripts/onboarding-default-model.test.mjs scripts/onboarding-i18n-contract.test.mjs scripts/onboarding-search-step.test.mjs scripts/onboarding-step-block.test.mjs scripts/org-team-date-locale.test.mjs scripts/org-teams-summary.test.mjs scripts/overlay-drag-zones.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/pairing-card-copy.test.mjs scripts/palette-contract.test.mjs scripts/palette-focus.test.mjs scripts/palette-main-door.test.mjs scripts/palette-panel-request.test.mjs scripts/palette-recents.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/pane-slot-ground.test.mjs scripts/panel-chart-hover.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/panel-info-session-age.test.mjs scripts/panel-presentation.test.mjs scripts/panel-rail.test.mjs scripts/panel-read-policy.test.mjs scripts/panel-top-inset.test.mjs scripts/path-utils.test.mjs scripts/peer-journal-source.test.mjs scripts/peer-source-unified.test.mjs scripts/peers-catalogue.test.mjs scripts/phone-access-block.test.mjs scripts/picker-default-checkbox.test.mjs scripts/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/pre-push-gate.test.mjs scripts/preload-updater-surface.test.mjs scripts/preview-signed-urls.test.mjs scripts/project-update-assets.test.mjs scripts/project-view-perf.test.mjs scripts/projects-board-focus.test.mjs scripts/projects-card-click.test.mjs scripts/projects-entry-scroll.test.mjs scripts/projects-filters.test.mjs scripts/projects-force-done.test.mjs scripts/projects-i18n-locale.test.mjs scripts/projects-inline-edit.test.mjs scripts/projects-quick-send.test.mjs scripts/projects-request-update.test.mjs scripts/projects-search-index.test.mjs scripts/projects-search.test.mjs scripts/projects-sheet.test.mjs scripts/projects-sort.test.mjs scripts/projects-tab.test.mjs scripts/projects-time-window.test.mjs scripts/provider-catalog.test.mjs scripts/provider-chip-verdict.test.mjs scripts/provider-detail-remount.test.mjs scripts/provider-error-guidance.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-state.test.mjs scripts/provider-status.test.mjs scripts/prune-bundled-resources.test.mjs scripts/prune-python-seed.test.mjs scripts/ptt-keymap-binding.test.mjs scripts/python-bytecode-cache.test.mjs scripts/quota-notice.test.mjs scripts/radient-credits-guidance.test.mjs scripts/radient-session-issue.test.mjs scripts/radient-signout-authority.test.mjs scripts/radient-verify-callout.test.mjs scripts/receipt-fold-behaviour.test.mjs scripts/reconnect-page-gap.test.mjs scripts/relaunch-during-quit-proof.test.mjs scripts/reload-picker-close.test.mjs scripts/render-mac-entitlements.test.mjs scripts/renderer-driver-api.test.mjs scripts/resolve-package-union.test.mjs scripts/response-copy.test.mjs scripts/retention-duration.test.mjs scripts/reveal-record.test.mjs scripts/right-slot-memory.test.mjs scripts/right-slot-width.test.mjs scripts/row-state-floors.test.mjs scripts/rtl-layout.test.mjs scripts/run-child-reader.test.mjs scripts/run-desktop-tests.test.mjs scripts/run-detail-model.test.mjs scripts/run-detail-wake-label-locale.test.mjs scripts/run-panel-navigation.test.mjs scripts/scheduled-task-model.test.mjs scripts/scroll-region-to-top.test.mjs scripts/scrollbar-activity.test.mjs scripts/searchable-select.test.mjs scripts/secret-ask.test.mjs scripts/seed-label-gap.test.mjs scripts/seed-placement.test.mjs scripts/server-release-notes.test.mjs scripts/session-archive-delete.test.mjs scripts/session-asks.test.mjs scripts/session-cookies.test.mjs scripts/session-files-hook.test.mjs scripts/session-load-recovery.test.mjs scripts/session-load-sequence.test.mjs scripts/session-status-feed.test.mjs scripts/session-status-lifecycle.test.mjs scripts/session-status.test.mjs scripts/session-stream-token.test.mjs scripts/session-switch.test.mjs scripts/session-switcher.test.mjs scripts/settings-account-gate.test.mjs scripts/settings-language-row.test.mjs scripts/settings-section-routes.test.mjs scripts/settings-time-to-error.test.mjs scripts/shared-composer.test.mjs scripts/shell-path.test.mjs scripts/sidebar-account-reconnect.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/sidebar-attention-badge.test.mjs scripts/sidebar-destinations.test.mjs scripts/sidebar-focus-hold.test.mjs scripts/sidebar-own-avatar.test.mjs scripts/sidebar-pin-order.test.mjs scripts/sidebar-split.test.mjs scripts/sidebar-tag-auto.test.mjs scripts/sidebar-tag-drag.test.mjs scripts/sidebar-tag-picker.test.mjs scripts/skill-highlight.test.mjs scripts/skill-invocation.test.mjs scripts/skill-list.test.mjs scripts/skill-row.test.mjs scripts/skill-seal-behaviour.test.mjs scripts/skills-tab.test.mjs scripts/slash-contract.test.mjs scripts/slash-highlight.test.mjs scripts/slash-rank.test.mjs scripts/slash-row-format.test.mjs scripts/slash-submit.test.mjs scripts/slash-tags-popup.test.mjs scripts/slash-tags-reopen.test.mjs scripts/slash-tags.test.mjs scripts/slash-token.test.mjs scripts/soft-breaks.test.mjs scripts/sound-player.test.mjs scripts/sounds-fixture.test.mjs scripts/speech-clip.test.mjs scripts/speech-controls.test.mjs scripts/speech-selection.test.mjs scripts/speech-settings.test.mjs scripts/speech-store.test.mjs scripts/speech-target.test.mjs scripts/speech-user-copy.test.mjs scripts/spend-payment-basis.test.mjs scripts/stale-agent.test.mjs scripts/stale-caption.test.mjs scripts/stopped-row-measure.test.mjs scripts/storybook-query-fixture.test.mjs scripts/stream-order-live.test.mjs scripts/streaming-live-markdown.test.mjs scripts/streaming-markdown-parity.test.mjs scripts/stt-mic-gate-session.test.mjs scripts/subagent-pulse.test.mjs scripts/submit-latency.test.mjs scripts/suggestion-stack-react.test.mjs scripts/suggestion-stack.test.mjs scripts/supplement-collage.test.mjs scripts/supplement-disclosure.test.mjs scripts/supplement-file-actions.test.mjs scripts/supplement-image-grid.test.mjs scripts/supplement-model.test.mjs scripts/supplement-row.test.mjs scripts/team-bridge-archive-container.test.mjs scripts/team-bridge-archive.test.mjs scripts/team-bridge-arrival.test.mjs scripts/team-bridge-attachments.test.mjs scripts/team-bridge-auth-owner-mount.test.mjs scripts/team-bridge-avatar.test.mjs scripts/team-bridge-banner.test.mjs scripts/team-bridge-channels.test.mjs scripts/team-bridge-composer-ring.test.mjs scripts/team-bridge-directory.test.mjs scripts/team-bridge-drafts-scheduled.test.mjs scripts/team-bridge-invitations.test.mjs scripts/team-bridge-model.test.mjs scripts/team-bridge-notifications-mount.test.mjs scripts/team-bridge-notify.test.mjs scripts/team-bridge-rail-profile-card.test.mjs scripts/team-bridge-reactions-behaviour.test.mjs scripts/team-bridge-reactions.test.mjs scripts/team-bridge-row-layout-pin.test.mjs scripts/team-bridge-scope.test.mjs scripts/team-bridge-thread-gate.test.mjs scripts/team-bridge-threads.test.mjs scripts/team-initials.test.mjs scripts/team-member-overrides.test.mjs scripts/team-new-chat-stale-draft.test.mjs scripts/telemetry-launch.test.mjs scripts/telemetry-spawn-sites.test.mjs scripts/test-inventory.test.mjs scripts/theme-grid-navigation.test.mjs scripts/theme-inline.test.mjs scripts/theme-registry-exhaustiveness.test.mjs scripts/thread-search-contract.test.mjs scripts/thread-search-model.test.mjs scripts/thread-search-overlay.test.mjs scripts/titlebar-options.test.mjs scripts/toast-close-placement.test.mjs scripts/toast-lifetime.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/tool-row.test.mjs scripts/tooltip-browser-view.test.mjs scripts/trace-fold-behaviour.test.mjs scripts/trace-fold-model.test.mjs scripts/transcript-copy-affordances.test.mjs scripts/transcript-cursor-continuity.test.mjs scripts/transcript-deep-jump.test.mjs scripts/transcript-dom-window-hook.test.mjs scripts/transcript-dom-window.test.mjs scripts/transcript-fade.test.mjs scripts/transcript-focus-behaviour.test.mjs scripts/transcript-focus.test.mjs scripts/transcript-foot-slot.test.mjs scripts/transcript-journal-order.test.mjs scripts/transcript-loader.test.mjs scripts/transcript-paging-hook.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-perflush-perf.test.mjs scripts/transcript-rail-refusal.test.mjs scripts/transcript-reducer.test.mjs scripts/transcript-strand-hold.test.mjs scripts/transcription-failure-copy.test.mjs scripts/transcription-transient-retry.test.mjs scripts/turn-answer-rail.test.mjs scripts/turn-collapse-behaviour.test.mjs scripts/turn-collapse-model.test.mjs scripts/turn-partition-predicate.test.mjs scripts/turn-segments.test.mjs scripts/turn-timestamp.test.mjs scripts/typed-row-call-sites.test.mjs scripts/undo-toasts.test.mjs scripts/update-affirmation.test.mjs scripts/update-fleet-drain.test.mjs scripts/update-global-guard.test.mjs scripts/update-global-install.test.mjs scripts/update-indicator-segments.test.mjs scripts/update-install-copy.test.mjs scripts/update-robustness.test.mjs scripts/update-rollover.test.mjs scripts/update-shipit.test.mjs scripts/update-window-report.test.mjs scripts/usage-container.test.mjs scripts/usage-view.test.mjs scripts/use-active-checkpoint.test.mjs scripts/use-checkpoints.test.mjs scripts/use-ever-in-view.test.mjs scripts/use-thread-search.test.mjs scripts/verify-bundled-uv.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/viewer-record.test.mjs scripts/wake-cancel-panel.test.mjs scripts/wake-controls.test.mjs scripts/warm-session.test.mjs scripts/waveform-model.test.mjs scripts/webauthn.test.mjs scripts/window-chrome.test.mjs scripts/window-glass-main.test.mjs scripts/window-glass-renderer.test.mjs scripts/window-glass.test.mjs scripts/window-guards.test.mjs scripts/window-mode.test.mjs scripts/working-line-clock.test.mjs scripts/i18n/catalogue-locale.test.mjs scripts/i18n/device-tag-activation.test.mjs scripts/language-dialog-applies-on-pick.test.mjs scripts/i18n/chat-header-sidebar-copy.test.mjs scripts/user-attachments.test.mjs scripts/user-attachments-render.test.mjs",
|
|
93
|
+
"test:desktop": "node scripts/run-desktop-tests.mjs scripts/about-panel.test.mjs scripts/agent-class-toggle.test.mjs scripts/agent-hub-org-sharing.test.mjs scripts/agent-hub-public-teams.test.mjs scripts/agent-hub-queries.test.mjs scripts/agent-hub-skills-tab-count.test.mjs scripts/agent-hub-teams-tab-count.test.mjs scripts/agent-messages-busy.test.mjs scripts/agent-messages-dialog.test.mjs scripts/agent-messages-model.test.mjs scripts/agent-messages-settings.test.mjs scripts/agent-shell-spawn-env.test.mjs scripts/agents-composer-mount.test.mjs scripts/agents-config-probe-cadence.test.mjs scripts/agents-config-retry.test.mjs scripts/agents-config-summary.test.mjs scripts/agents-offer-dismiss.test.mjs scripts/agents-publication.test.mjs scripts/agents-source-and-recency-locale.test.mjs scripts/aida-rail-marks.test.mjs scripts/aida-sidebar.test.mjs scripts/analytics-channels.test.mjs scripts/analytics-rate-format.test.mjs scripts/analytics-session-table.test.mjs scripts/application-menu-labels.test.mjs scripts/approval-escape.test.mjs scripts/approvals-card-document.test.mjs scripts/approvals-overlay.test.mjs scripts/ask-composer-no-routing.test.mjs scripts/ask-dismiss-panel.test.mjs scripts/ask-dismiss.test.mjs scripts/ask-draft-swap.test.mjs scripts/ask-open-policy.test.mjs scripts/ask-open-render.test.mjs scripts/ask-options.test.mjs scripts/ask-other.test.mjs scripts/ask-queue.test.mjs scripts/ask-revise.test.mjs scripts/asks-app-regression.test.mjs scripts/at-mentions.test.mjs scripts/attachment-files.test.mjs scripts/attachment-live-row.test.mjs scripts/attachment-url.test.mjs scripts/attention-seen.test.mjs scripts/audio-engine.test.mjs scripts/audio-meter-stream.test.mjs scripts/audio-recording-levels.test.mjs scripts/authoring-refresh.test.mjs scripts/backend-error-surfaces.test.mjs scripts/backend-setting-combos.test.mjs scripts/backend-settings-collapse.test.mjs scripts/backend-settings-drafts.test.mjs scripts/backend-settings-tiers.test.mjs scripts/backend-spawn-address.test.mjs scripts/backend-version-drift.test.mjs scripts/browser-address-autocomplete.test.mjs scripts/browser-address-history.test.mjs scripts/browser-address-overlay.test.mjs scripts/browser-address-raises.test.mjs scripts/browser-approvals-dock-width.test.mjs scripts/browser-approvals-route.test.mjs scripts/browser-chord-renderer.test.mjs scripts/browser-chord.test.mjs scripts/browser-chrome-gaps.test.mjs scripts/browser-chrome-s4b-probe-rig.test.mjs scripts/browser-chrome.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/browser-find-row.test.mjs scripts/browser-history-store.test.mjs scripts/browser-host.test.mjs scripts/browser-network-capture.test.mjs scripts/browser-page-controls.test.mjs scripts/browser-page-menu-focus.test.mjs scripts/browser-page-menu.test.mjs scripts/browser-queue-expiry.test.mjs scripts/browser-site-trigger.test.mjs scripts/browser-start-page.test.mjs scripts/browser-startup.test.mjs scripts/browser-tab-management.test.mjs scripts/browser-tab-actions-menu.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/browser-toolbar.test.mjs scripts/browser-url-autocomplete.test.mjs scripts/browser-view-policy-kinds.test.mjs scripts/btw-aside.test.mjs scripts/build-env-guard.test.mjs scripts/bundled-runtime-layout.test.mjs scripts/canonical-chat.test.mjs scripts/canonical-notice.test.mjs scripts/canvas-file-freshness.test.mjs scripts/canvas-goals.test.mjs scripts/canvas-tab-close.test.mjs scripts/capture-evidence.test.mjs scripts/chat-archive-press.test.mjs scripts/chat-archived.test.mjs scripts/chat-device-guidance.test.mjs scripts/chat-device-model.test.mjs scripts/chat-device-placement.test.mjs scripts/chat-image-expand.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-link-affordances.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-pane-floors.test.mjs scripts/chat-remote.test.mjs scripts/chat-search.test.mjs scripts/chat-session-copy-id.test.mjs scripts/chat-session-status.test.mjs scripts/chat-session-subagents.test.mjs scripts/chat-sidebar-agents.test.mjs scripts/chat-sidebar-archive.test.mjs scripts/chat-sidebar-connection-voices.test.mjs scripts/chat-sidebar-drafts.test.mjs scripts/chat-sidebar-hover-intent.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/chat-sidebar-scope-paging.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/chat-sidebar-tags.test.mjs scripts/chat-sidebar-time-order.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-status-strip.test.mjs scripts/chat-title.test.mjs scripts/check-build-env.test.mjs scripts/check-design-kit.test.mjs scripts/check-evidence-structure.test.mjs scripts/check-geometry-sources.test.mjs scripts/check-runtime-deps.test.mjs scripts/check-vendored.test.mjs scripts/checkpoint-model.test.mjs scripts/checkpoint-rail.test.mjs scripts/child-reader-foot-react.test.mjs scripts/child-transcript-paging.test.mjs scripts/chrome-keychain.test.mjs scripts/ci-log-guard.test.mjs scripts/ci-scope.test.mjs scripts/clear-search.test.mjs scripts/click-proof-expect.test.mjs scripts/code-review-delayed-flag.test.mjs scripts/code-review-model.test.mjs scripts/code-review-refresh-cue.test.mjs scripts/code-review-row-layout.test.mjs scripts/collapse-plan-per-pass.test.mjs scripts/compact-receipt.test.mjs scripts/completion-view-ack.test.mjs scripts/composer-file-drop.test.mjs scripts/composer-queued-send.test.mjs scripts/composer-readings.test.mjs scripts/composer-refusal.test.mjs scripts/composer-seeding.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tabs.test.mjs scripts/composer-text-authority.test.mjs scripts/composer-tip-react.test.mjs scripts/condense-parity.test.mjs scripts/conflict-markers.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/console-close.test.mjs scripts/console-host.test.mjs scripts/console-i18n-fit.test.mjs scripts/console-mirror.test.mjs scripts/console-pack.test.mjs scripts/console-pane-render.test.mjs scripts/console-pane.test.mjs scripts/context-readout-monotonic.test.mjs scripts/copy-button-copy-locale.test.mjs scripts/credential-capture.test.mjs scripts/credential-composer.test.mjs scripts/cross-session-visibility.test.mjs scripts/currency-math.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/default-effort-options.test.mjs scripts/default-on-banner.test.mjs scripts/delivery-gate.test.mjs scripts/desktop-contract.test.mjs scripts/desktop-feed.test.mjs scripts/desktop-notifier.test.mjs scripts/desktop-proxy.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-stream.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/desktop-test-lane-bound.test.mjs scripts/desktop-test-memory-guard.test.mjs scripts/desktop-test-shards.test.mjs scripts/desktop-watch-lease.test.mjs scripts/dev-driver-attach.test.mjs scripts/dev-driver-gate.test.mjs scripts/dev-shortcuts.test.mjs scripts/directory-listing.test.mjs scripts/document-direction.test.mjs scripts/draft-selection.test.mjs scripts/draft-slash-identity.test.mjs scripts/draft-splash.test.mjs scripts/drafts-clear-on-send.test.mjs scripts/echo-delivery.test.mjs scripts/evidence-fold.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-manifest.test.mjs scripts/evidence-run-guard.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/evidence-tz.test.mjs scripts/external-open-refusal.test.mjs scripts/file-blob-url.test.mjs scripts/finder-files.test.mjs scripts/finder-reveal-scroll.test.mjs scripts/fleet-asks.test.mjs scripts/fold-open.test.mjs scripts/frontend-replace.test.mjs scripts/header-identity-menu.test.mjs scripts/header-identity-model.test.mjs scripts/held-claim-reach.test.mjs scripts/hold-escape-claim.test.mjs scripts/hotkey-registration.test.mjs scripts/hub-link-copy.test.mjs scripts/hub-link-view.test.mjs scripts/hub-links-scene.test.mjs scripts/hub-mutation-safety.test.mjs scripts/hub-skill-alias.test.mjs scripts/hub-skill-state.test.mjs scripts/hub-skills-capability.test.mjs scripts/hub-updates.test.mjs scripts/i18n-wave-b-keyed-copy.test.mjs scripts/i18n/absent-locale.test.mjs scripts/i18n/activation.test.mjs scripts/i18n/canvas-picker-review-remediation.test.mjs scripts/i18n/check-added-strings.test.mjs scripts/i18n/check-coverage.test.mjs scripts/i18n/check-strings.test.mjs scripts/i18n/context-parity.test.mjs scripts/i18n/es-activation.test.mjs scripts/i18n/format.test.mjs scripts/i18n/hi-activation.test.mjs scripts/i18n/ledger-assemble.test.mjs scripts/i18n/ledger-check.test.mjs scripts/i18n/locale-parity.test.mjs scripts/i18n/locale-reactivity.test.mjs scripts/i18n/ru-activation.test.mjs scripts/i18n/runtime.test.mjs scripts/i18n/surface-copy-reactivity.test.mjs scripts/i18n/table-pager-range.test.mjs scripts/i18n/typed-keys.test.mjs scripts/i18n/config-kind-word.test.mjs scripts/i18n/ur-activation.test.mjs scripts/i18n/vi-activation.test.mjs scripts/i18n/zh-CN-activation.test.mjs scripts/icon-identity.test.mjs scripts/image-actions.test.mjs scripts/image-gen-card.test.mjs scripts/image-preview-decode.test.mjs scripts/import-settings-section.test.mjs scripts/import-settings-view.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/install-scripts-network.test.mjs scripts/integration-model.test.mjs scripts/interrupt-control.test.mjs scripts/interrupt-slot-hold-react.test.mjs scripts/job-cancel-panel.test.mjs scripts/job-controls.test.mjs scripts/journal-order-query.test.mjs scripts/keyboard-shortcuts-section.test.mjs scripts/keymap-chords.test.mjs scripts/keymap-dispatch.test.mjs scripts/keymap-persistence.test.mjs scripts/keymap-registry.test.mjs scripts/keymap-retention.test.mjs scripts/lane-leading.test.mjs scripts/lane-registration.test.mjs scripts/language-dialog.test.mjs scripts/language-live-updates.test.mjs scripts/launch-session.test.mjs scripts/launcher-watch.test.mjs scripts/library-card.test.mjs scripts/library-markdown.test.mjs scripts/library-model.test.mjs scripts/library-page.test.mjs scripts/library-pptx.test.mjs scripts/link-actions.test.mjs scripts/link-targets.test.mjs scripts/linux-sandbox.test.mjs scripts/live-seed-placement.test.mjs scripts/live-update-integrity.test.mjs scripts/loader-state-machine.test.mjs scripts/locale-direction.test.mjs scripts/logger-log-dir.test.mjs scripts/main-locale.test.mjs scripts/managed-python-transaction.test.mjs scripts/managed-python.test.mjs scripts/mark-all-read-control.test.mjs scripts/markdown-remend.test.mjs scripts/markdown-table-widths.test.mjs scripts/mcp-auth-complete-no-retry.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/mcp-catalog-transport.test.mjs scripts/mcp-failure-routing.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/media-surface-floors.test.mjs scripts/mentioned-files.test.mjs scripts/merge-update-feed.test.mjs scripts/mesh-canvas-bench.test.mjs scripts/mesh-tab.test.mjs scripts/message-actions.test.mjs scripts/message-quote.test.mjs scripts/message-surface-floors.test.mjs scripts/mini-view-contract.test.mjs scripts/mini-view-dictation.test.mjs scripts/model-select-store.test.mjs scripts/model-setting-options.test.mjs scripts/monitor-cancel-dialog.test.mjs scripts/monitor-controls.test.mjs scripts/move-session.test.mjs scripts/navigation-gesture.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-shortcut.test.mjs scripts/no-hardlink-write.test.mjs scripts/no-websocket-plane.test.mjs scripts/notification-launch.test.mjs scripts/notification-lifetime.test.mjs scripts/notification-spawn-sites.test.mjs scripts/notifications-model.test.mjs scripts/notifications-off.test.mjs scripts/notifications-operations.test.mjs scripts/notifications-page-pill.test.mjs scripts/notifications-reel-observer.test.mjs scripts/older-history-slot.test.mjs scripts/onboarding-default-model.test.mjs scripts/onboarding-i18n-contract.test.mjs scripts/onboarding-search-step.test.mjs scripts/onboarding-step-block.test.mjs scripts/org-team-date-locale.test.mjs scripts/org-teams-summary.test.mjs scripts/overlay-drag-zones.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/pairing-card-copy.test.mjs scripts/palette-contract.test.mjs scripts/palette-focus.test.mjs scripts/palette-main-door.test.mjs scripts/palette-panel-request.test.mjs scripts/palette-recents.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/pane-slot-ground.test.mjs scripts/panel-chart-hover.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/panel-info-session-age.test.mjs scripts/panel-presentation.test.mjs scripts/panel-rail.test.mjs scripts/panel-read-policy.test.mjs scripts/panel-top-inset.test.mjs scripts/path-utils.test.mjs scripts/peer-journal-source.test.mjs scripts/peer-source-unified.test.mjs scripts/peers-catalogue.test.mjs scripts/phone-access-block.test.mjs scripts/picker-default-checkbox.test.mjs scripts/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/pre-push-gate.test.mjs scripts/preload-updater-surface.test.mjs scripts/preview-signed-urls.test.mjs scripts/project-update-assets.test.mjs scripts/project-view-perf.test.mjs scripts/projects-board-focus.test.mjs scripts/projects-card-click.test.mjs scripts/projects-entry-scroll.test.mjs scripts/projects-filters.test.mjs scripts/projects-force-done.test.mjs scripts/projects-i18n-locale.test.mjs scripts/projects-inline-edit.test.mjs scripts/projects-quick-send.test.mjs scripts/projects-request-update.test.mjs scripts/projects-search-index.test.mjs scripts/projects-search.test.mjs scripts/projects-sheet.test.mjs scripts/projects-sort.test.mjs scripts/projects-tab.test.mjs scripts/projects-time-window.test.mjs scripts/provider-catalog.test.mjs scripts/provider-chip-verdict.test.mjs scripts/provider-detail-remount.test.mjs scripts/provider-error-guidance.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-state.test.mjs scripts/provider-status.test.mjs scripts/prune-bundled-resources.test.mjs scripts/prune-python-seed.test.mjs scripts/ptt-keymap-binding.test.mjs scripts/python-bytecode-cache.test.mjs scripts/quota-notice.test.mjs scripts/radient-credits-guidance.test.mjs scripts/radient-session-issue.test.mjs scripts/radient-signout-authority.test.mjs scripts/radient-verify-callout.test.mjs scripts/receipt-fold-behaviour.test.mjs scripts/reconnect-page-gap.test.mjs scripts/relaunch-during-quit-proof.test.mjs scripts/reload-picker-close.test.mjs scripts/render-mac-entitlements.test.mjs scripts/renderer-driver-api.test.mjs scripts/resolve-package-union.test.mjs scripts/response-copy.test.mjs scripts/retention-duration.test.mjs scripts/reveal-record.test.mjs scripts/right-slot-memory.test.mjs scripts/right-slot-width.test.mjs scripts/row-state-floors.test.mjs scripts/rtl-layout.test.mjs scripts/run-child-reader.test.mjs scripts/run-desktop-tests.test.mjs scripts/run-detail-model.test.mjs scripts/run-detail-wake-label-locale.test.mjs scripts/run-panel-navigation.test.mjs scripts/scheduled-task-model.test.mjs scripts/scroll-region-to-top.test.mjs scripts/scrollbar-activity.test.mjs scripts/searchable-select.test.mjs scripts/secret-ask.test.mjs scripts/seed-label-gap.test.mjs scripts/seed-placement.test.mjs scripts/server-release-notes.test.mjs scripts/session-archive-delete.test.mjs scripts/session-asks.test.mjs scripts/session-cookies.test.mjs scripts/session-files-hook.test.mjs scripts/session-load-recovery.test.mjs scripts/session-load-sequence.test.mjs scripts/session-status-feed.test.mjs scripts/session-status-lifecycle.test.mjs scripts/session-status.test.mjs scripts/session-stream-token.test.mjs scripts/session-switch.test.mjs scripts/session-switcher.test.mjs scripts/settings-account-gate.test.mjs scripts/settings-language-row.test.mjs scripts/settings-section-routes.test.mjs scripts/settings-time-to-error.test.mjs scripts/shared-composer.test.mjs scripts/shell-path.test.mjs scripts/sidebar-account-reconnect.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/sidebar-attention-badge.test.mjs scripts/sidebar-destinations.test.mjs scripts/sidebar-focus-hold.test.mjs scripts/sidebar-own-avatar.test.mjs scripts/sidebar-pin-order.test.mjs scripts/sidebar-split.test.mjs scripts/sidebar-tag-auto.test.mjs scripts/sidebar-tag-drag.test.mjs scripts/sidebar-tag-picker.test.mjs scripts/skill-highlight.test.mjs scripts/skill-invocation.test.mjs scripts/skill-list.test.mjs scripts/skill-row.test.mjs scripts/skill-seal-behaviour.test.mjs scripts/skills-tab.test.mjs scripts/slash-contract.test.mjs scripts/slash-highlight.test.mjs scripts/slash-rank.test.mjs scripts/slash-row-format.test.mjs scripts/slash-submit.test.mjs scripts/slash-tags-popup.test.mjs scripts/slash-tags-reopen.test.mjs scripts/slash-tags.test.mjs scripts/slash-token.test.mjs scripts/soft-breaks.test.mjs scripts/sound-player.test.mjs scripts/sounds-fixture.test.mjs scripts/speech-clip.test.mjs scripts/speech-controls.test.mjs scripts/speech-selection.test.mjs scripts/speech-settings.test.mjs scripts/speech-store.test.mjs scripts/speech-target.test.mjs scripts/speech-user-copy.test.mjs scripts/spend-payment-basis.test.mjs scripts/stale-agent.test.mjs scripts/stale-caption.test.mjs scripts/stopped-row-measure.test.mjs scripts/storybook-query-fixture.test.mjs scripts/stream-order-live.test.mjs scripts/streaming-live-markdown.test.mjs scripts/streaming-markdown-parity.test.mjs scripts/stt-mic-gate-session.test.mjs scripts/subagent-pulse.test.mjs scripts/submit-latency.test.mjs scripts/suggestion-stack-react.test.mjs scripts/suggestion-stack.test.mjs scripts/supplement-collage.test.mjs scripts/supplement-disclosure.test.mjs scripts/supplement-file-actions.test.mjs scripts/supplement-image-grid.test.mjs scripts/supplement-model.test.mjs scripts/supplement-row.test.mjs scripts/team-bridge-archive-container.test.mjs scripts/team-bridge-archive.test.mjs scripts/team-bridge-arrival.test.mjs scripts/team-bridge-attachments.test.mjs scripts/team-bridge-auth-owner-mount.test.mjs scripts/team-bridge-avatar.test.mjs scripts/team-bridge-banner.test.mjs scripts/team-bridge-channels.test.mjs scripts/team-bridge-composer-ring.test.mjs scripts/team-bridge-directory.test.mjs scripts/team-bridge-drafts-scheduled.test.mjs scripts/team-bridge-invitations.test.mjs scripts/team-bridge-model.test.mjs scripts/team-bridge-notifications-mount.test.mjs scripts/team-bridge-notify.test.mjs scripts/team-bridge-rail-profile-card.test.mjs scripts/team-bridge-reactions-behaviour.test.mjs scripts/team-bridge-reactions.test.mjs scripts/team-bridge-row-layout-pin.test.mjs scripts/team-bridge-scope.test.mjs scripts/team-bridge-thread-gate.test.mjs scripts/team-bridge-threads.test.mjs scripts/team-initials.test.mjs scripts/team-member-overrides.test.mjs scripts/team-new-chat-stale-draft.test.mjs scripts/telemetry-launch.test.mjs scripts/telemetry-spawn-sites.test.mjs scripts/test-inventory.test.mjs scripts/theme-grid-navigation.test.mjs scripts/theme-inline.test.mjs scripts/theme-registry-exhaustiveness.test.mjs scripts/thread-search-contract.test.mjs scripts/thread-search-model.test.mjs scripts/thread-search-overlay.test.mjs scripts/titlebar-options.test.mjs scripts/toast-close-placement.test.mjs scripts/toast-lifetime.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/tool-row.test.mjs scripts/tooltip-browser-view.test.mjs scripts/trace-fold-behaviour.test.mjs scripts/trace-fold-model.test.mjs scripts/transcript-copy-affordances.test.mjs scripts/transcript-cursor-continuity.test.mjs scripts/transcript-deep-jump.test.mjs scripts/transcript-dom-window-hook.test.mjs scripts/transcript-dom-window.test.mjs scripts/transcript-fade.test.mjs scripts/transcript-focus-behaviour.test.mjs scripts/transcript-focus.test.mjs scripts/transcript-foot-slot.test.mjs scripts/transcript-journal-order.test.mjs scripts/transcript-loader.test.mjs scripts/transcript-paging-hook.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-perflush-perf.test.mjs scripts/transcript-rail-refusal.test.mjs scripts/transcript-reducer.test.mjs scripts/transcript-strand-hold.test.mjs scripts/transcription-failure-copy.test.mjs scripts/transcription-transient-retry.test.mjs scripts/turn-answer-rail.test.mjs scripts/turn-collapse-behaviour.test.mjs scripts/turn-collapse-model.test.mjs scripts/turn-partition-predicate.test.mjs scripts/turn-segments.test.mjs scripts/turn-timestamp.test.mjs scripts/typed-row-call-sites.test.mjs scripts/undo-toasts.test.mjs scripts/update-affirmation.test.mjs scripts/update-fleet-drain.test.mjs scripts/update-global-guard.test.mjs scripts/update-global-install.test.mjs scripts/update-indicator-segments.test.mjs scripts/update-install-copy.test.mjs scripts/update-panel-copy.test.mjs scripts/update-robustness.test.mjs scripts/update-rollover.test.mjs scripts/update-shipit.test.mjs scripts/update-window-report.test.mjs scripts/usage-container.test.mjs scripts/usage-view.test.mjs scripts/use-active-checkpoint.test.mjs scripts/use-checkpoints.test.mjs scripts/use-ever-in-view.test.mjs scripts/use-thread-search.test.mjs scripts/verify-bundled-uv.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/viewer-record.test.mjs scripts/wake-cancel-panel.test.mjs scripts/wake-controls.test.mjs scripts/warm-session.test.mjs scripts/waveform-model.test.mjs scripts/webauthn.test.mjs scripts/window-chrome.test.mjs scripts/window-glass-main.test.mjs scripts/window-glass-renderer.test.mjs scripts/window-glass.test.mjs scripts/window-guards.test.mjs scripts/window-mode.test.mjs scripts/working-line-clock.test.mjs scripts/i18n/catalogue-locale.test.mjs scripts/i18n/device-tag-activation.test.mjs scripts/language-dialog-applies-on-pick.test.mjs scripts/i18n/chat-header-sidebar-copy.test.mjs scripts/agents-remaining-literals.test.mjs scripts/user-attachments.test.mjs scripts/user-attachments-render.test.mjs scripts/browser-address-overlay-list-child.test.mjs scripts/storybook-cache-prune.test.mjs scripts/with-storybook.test.mjs",
|
|
94
94
|
"check-evidence": "node scripts/check-evidence.mjs",
|
|
95
95
|
"check-evidence:parity": "node scripts/evidence-histogram-parity.mjs",
|
|
96
96
|
"check-edit-diffs": "node scripts/check-edit-diffs.mjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const p=[["elevated","--lo-elevated"],["ink","--lo-ink"],["inkMuted","--lo-ink-muted"],["accent","--lo-accent"],["accentWash","--lo-accent-wash"],["rowHover","--lo-row-hover"],["hairline","--lo-hairline"],["control","--lo-control"]],d=document.getElementById("address-list-root"),w=document.getElementById("address-list-header"),m=document.getElementById("address-list-label"),a=document.getElementById("address-list-viewport"),l=document.getElementById("address-list-rows"),r=document.getElementById("address-list-notice");let u=0;function h(t){const e=t.getBoundingClientRect();return{top:e.top,height:e.height}}function g(){const t=Array.from(l.children),e=l.querySelector(".is-active");return{appliedSeq:u,rowCount:t.length,headerHeight:w.getBoundingClientRect().height,rowRects:t.map(n=>{const i=h(n),o=a.getBoundingClientRect();return{top:i.top-o.top,height:i.height}}),viewportHeight:a.getBoundingClientRect().height,scrollHeight:a.scrollHeight,innerHeight:window.innerHeight,visualHeight:window.visualViewport?.height??null,activeRowRect:e?(()=>{const n=h(e),i=a.getBoundingClientRect();return{top:n.top-i.top,height:n.height}})():null}}function v(t){u=t.seq,document.documentElement.dir=t.dir==="rtl"?"rtl":"ltr";for(const[e,n]of p){const i=t.theme[e];typeof i=="string"&&document.documentElement.style.setProperty(n,i)}if(m.textContent=t.label,typeof t.height=="number"&&t.height>0&&(d.style.height=`${t.height}px`),d.dataset.view=t.view.kind,t.view.kind==="rows"){const e=document.createDocumentFragment();t.view.rows.forEach((n,i)=>{const o=document.createElement("div");o.className="lo-row",o.dataset.index=String(i),i===t.active&&(o.classList.add("is-active"),o.dataset.active="true");const c=document.createElement("span");if(c.className="lo-row-text",c.dir="auto",c.textContent=n.text,o.append(c),n.title){const s=document.createElement("span");s.className="lo-row-title",s.dir="auto",s.textContent=n.title,o.append(s)}e.append(o)}),l.replaceChildren(e),r.textContent="",r.hidden=!0,r.dataset.kind=""}else l.replaceChildren(),r.hidden=!1,r.dataset.kind=t.view.notice,r.textContent=t.view.text;return g()}window.__loAddressOverlay={apply:v,measure:g};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{r as E,j as e,c as J}from"./index-A1hV3Zf6.js";import{i as xe,a as ge}from"./publication-validation-Bop1t9Rh.js";import{i as re,u as B,B as oe,A as fe,g as je}from"./path-utils-Cpj2hmLX.js";import{b9 as C,ba as O,W as Y,aZ as Q,bb as le,bc as be,bd as ee,V as pe,be as ye,bf as ve}from"./conversation-input-sync-wILdIPP1.js";import{c as we,u as Ne,L as Ce,T as te,B as l,S as K,r as ce,s as M,t as I,g as w,X as ke,v as N,A as se,a as ne,w as ae}from"./error-boundary-BwM9HB5p.js";import{c as Ae,h as De,u as Se,i as _e,a as Te,b as Ee,d as Fe,O as Pe,A as ze,f as ie}from"./use-download-agent-mutation-CZ6tp236.js";import{t as a}from"./messages-BaR4LA7j.js";import{i as qe,j as Le,k as Me,m as Ie,S as Ke,o as Be,p as Oe,q as Qe,s as Ue,A as Re,t as He,v as We}from"./index-CH-k2xgZ.js";import{H as Ve}from"./heart-CbNuxwI-.js";import"./en-US-CW_dDnkH.js";import"./book-open-1zGbkXts.js";import"./console-mirror-DLnj_s8B.js";/**
|
|
2
|
-
* @license lucide-react v0.507.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Ye=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],Ze=we("message-circle",Ye),F={all:["agent-comments"],list:t=>[...F.all,"list",t]},$e=({agentId:t,enabled:o=!0})=>re({queryKey:F.list(t||"invalid"),queryFn:async()=>{if(!t)throw new Error("Agent ID is required to fetch comments.");return(await qe(t)).result},enabled:!!t&&o,staleTime:2*60*1e3,gcTime:5*60*1e3,refetchOnWindowFocus:!0}),Xe=()=>{const t=B(),{isAuthenticated:o}=C();return O({mutationFn:async n=>{const{agentId:r,data:s}=n;if(!o)throw new Error(a("ui.hub.comments.mutation.unauthorized"));return Le(r,s)},onSuccess:(n,r)=>{t.invalidateQueries({queryKey:F.list(r.agentId)}),Q(a("ui.hub.comments.mutation.posted"))},onError:n=>{Y(a("ui.hub.comments.mutation.post_failed",{reason:n.message}))}})},Ge=()=>{const t=B(),{isAuthenticated:o}=C();return O({mutationFn:async n=>{const{agentId:r,commentId:s,data:c}=n;if(!o)throw new Error(a("ui.hub.comments.mutation.unauthorized"));return Me(r,s,c)},onSuccess:(n,r)=>{t.invalidateQueries({queryKey:F.list(r.agentId)}),Q(a("ui.hub.comments.mutation.updated"))},onError:n=>{Y(a("ui.hub.comments.mutation.update_failed",{reason:n.message}))}})},Je=()=>{const t=B(),{isAuthenticated:o}=C();return O({mutationFn:async n=>{const{agentId:r,commentId:s}=n;if(!o)throw new Error(a("ui.hub.comments.mutation.unauthorized"));return Ie(r,s)},onSuccess:(n,r)=>{t.invalidateQueries({queryKey:F.list(r.agentId)}),Q(a("ui.hub.comments.mutation.deleted"))},onError:n=>{Y(a("ui.hub.comments.mutation.delete_failed",{reason:n.message}))}})},et=({agentId:t})=>{Ne();const{isAuthenticated:o,user:n}=C(),[r,s]=E.useState(""),[c,b]=E.useState(null),[x,k]=E.useState(""),{data:u,isLoading:p,error:A}=$e({agentId:t}),P=u?.records??[],g=Xe(),D=Ge(),U=Je(),S=async i=>{if(i.preventDefault(),!(!r.trim()||!o||!t))try{await g.mutateAsync({agentId:t,data:{text:r}}),s("")}catch(d){console.error("Submit comment error caught in component:",d)}},R=(i,d)=>{b(i),k(d)},m=()=>{b(null),k("")},y=async()=>{if(!(!c||!x.trim()||!o||!t))try{await D.mutateAsync({agentId:t,commentId:c,data:{text:x}}),m()}catch(i){console.error("Update comment error caught in component:",i)}},v=async i=>{if(!(!o||!t)&&window.confirm(a("ui.hub.comments.delete.confirm")))try{await U.mutateAsync({agentId:t,commentId:i})}catch(d){console.error("Delete comment error caught in component:",d)}},H=i=>o&&n?.radientUser?.account?.id===i.account_id;return e.jsxs("div",{className:"mt-6",children:[e.jsx("h2",{className:"mb-4 font-semibold text-heading text-ink",children:a("ui.hub.comments.heading")}),o?e.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[e.jsxs(Ce,{htmlFor:"new-comment",children:[e.jsx(Ze,{size:14,"aria-hidden":"true"}),a("ui.hub.comments.form.label")]}),e.jsxs("form",{onSubmit:S,className:"flex flex-col gap-3",children:[e.jsx(te,{id:"new-comment",placeholder:a("ui.hub.comments.form.placeholder"),rows:3,value:r,onChange:i=>s(i.target.value),required:!0}),e.jsx(l,{type:"submit",variant:"primary",disabled:g.isPending||!r.trim(),className:"self-end",children:g.isPending?e.jsx(K,{size:"sm",label:a("ui.hub.comments.form.posting")}):a("ui.hub.comments.form.submit")})]})]}):e.jsx("p",{className:"mt-6 mb-4 text-body-sm text-ink-muted",children:a("ui.hub.comments.form.sign_in")}),e.jsx(ce,{className:"my-6"}),p&&e.jsx("ul",{className:"flex flex-col",children:[...Array(3)].map((i,d)=>e.jsxs("li",{className:"flex gap-3 pb-6",children:[e.jsx(M,{children:e.jsx(I,{children:e.jsx(w,{className:"size-full"})})}),e.jsxs("div",{className:"flex w-full flex-col gap-1.5",children:[e.jsx(w,{className:"h-3.5 w-24"}),e.jsx(w,{className:"h-3 w-15"}),e.jsx(w,{className:"mt-2 h-3.5 w-full"}),e.jsx(w,{className:"h-3.5 w-4/5"})]})]},`skeleton-${d}`))}),A&&e.jsx("p",{role:"alert",className:"my-6 text-body-sm text-danger",children:a("ui.hub.comments.load_error",{reason:A.message})}),!p&&!A&&e.jsx("ul",{className:"flex flex-col gap-6",children:P.length===0?e.jsx("li",{className:"text-body-sm text-ink-muted",children:a("ui.hub.comments.empty")}):P.map(i=>c===i.id?e.jsxs("li",{className:"flex gap-3",children:[e.jsx(M,{children:e.jsx(I,{children:i.account_metadata?.name?.charAt(0).toUpperCase()||"?"})}),e.jsxs("div",{className:"flex w-full flex-col gap-2",children:[e.jsx(te,{rows:3,value:x,onChange:d=>k(d.target.value),autoFocus:!0,"aria-label":a("ui.hub.comments.edit.label")}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(l,{variant:"secondary",size:"sm",onClick:m,children:[e.jsx(ke,{}),a("ui.hub.comments.edit.cancel")]}),e.jsxs(l,{variant:"primary",size:"sm",onClick:y,disabled:D.isPending||!x.trim(),children:[D.isPending?e.jsx(K,{size:"xs",label:a("ui.hub.comments.edit.saving")}):e.jsx(Ke,{}),a("ui.hub.comments.edit.save")]})]})]})]},i.id):e.jsxs("li",{className:"flex gap-3",children:[e.jsx(M,{children:e.jsx(I,{children:i.account_metadata?.name?.charAt(0).toUpperCase()||"?"})}),e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-body text-ink",children:i.account_metadata?.name||a("ui.hub.comments.author.unknown")}),e.jsx("p",{className:"text-ink-muted text-meta",children:Ae(new Date(i.created_at))})]}),H(i)&&e.jsxs("div",{className:"flex gap-0.5",children:[e.jsx(N,{content:a("ui.hub.comments.edit.label"),children:e.jsx(l,{variant:"ghost",size:"icon-sm",onClick:()=>R(i.id,i.text),disabled:!!c,"aria-label":a("ui.hub.comments.edit.label"),children:e.jsx(Be,{})})}),e.jsx(N,{content:a("ui.hub.comments.delete.label"),children:e.jsx(l,{variant:"ghost",size:"icon-sm",onClick:()=>v(i.id),disabled:!!c,"aria-label":a("ui.hub.comments.delete.label"),children:e.jsx(le,{})})})]})]}),e.jsx("p",{className:"mt-2 text-body-sm text-ink whitespace-pre-wrap",children:i.text})]})]},i.id))})]})},Z={all:["agent-details"],detail:t=>[...Z.all,t]},tt=({agentId:t,enabled:o=!0})=>re({queryKey:Z.detail(t||"invalid"),queryFn:async()=>{if(!t)throw new Error("Agent ID is required to fetch details.");return await Oe(t)},select:r=>r.result,enabled:!!t&&o,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1}),st=()=>{const t=B(),o=oe(),{isAuthenticated:n}=C();return O({mutationFn:async({agentId:s})=>{if(!n)throw new Error("Authentication required to delist an agent.");if(!s)throw new Error("Agent ID is required to delist.");return Qe(s)},onSuccess:(s,c)=>{Q(a("ui.notices.hub.agent_delisted")),t.invalidateQueries({queryKey:Z.detail(c.agentId)}),xe(t),o("/agent-hub")},onError:s=>{console.error("Delist agent error:",s)}})},nt={like:"The like did not go through",favourite:"The favourite did not go through",download:"The download did not start",delist:"The agent was not delisted"},V=({children:t})=>e.jsx("span",{className:"inline-flex h-4 min-w-5 items-center text-meta text-ink-muted",children:t}),ft=()=>{const{agentId:t}=fe(),o=oe(),{isAuthenticated:n,user:r}=C(),{data:s,isLoading:c,isFetching:b,error:x,refetch:k}=tt({agentId:t??"",enabled:!!t}),u=s?.visibility==="org",p=s?De(s.name):"",{memberships:A}=Ue({enabled:u}),P=u?A.find(he=>he.tenant_id===s?.tenant_id)?.tenant_name??null:null,{statuses:g,isKnown:D,isError:U,isFetching:S,refetch:R}=Se({agentIds:t&&!u?[t]:[]}),m=_e(D,g,t),y=m&&g[t??""]?.liked===!0,v=m&&g[t??""]?.favourited===!0,H=s?.like_count??0,i=s?.favourite_count??0,d=s?.download_count??0,z=Te(),q=Ee(),_=Fe(),f=st(),[de,L]=E.useState(!1),[j,h]=E.useState(null),W=!!r&&!!s&&r.radientUser?.account?.id===s.account_id,$=()=>{!t||!n||z.isPending||(h(null),z.mutate({agentId:t,isCurrentlyLiked:y},{onError:()=>h("like")}))},X=()=>{!t||!n||q.isPending||(h(null),q.mutate({agentId:t,isCurrentlyFavourited:v},{onError:()=>h("favourite")}))},G=()=>{!t||!s||_.isPending||(h(null),_.mutate({agentId:s.id,agentName:s.name},{onError:()=>h("download")}))},ue=()=>{!t||!W||f.isPending||(h(null),f.mutate({agentId:t},{onError:()=>h("delist")}),L(!1))},T=j?j==="like"?{action:"like",error:z.error,retry:$}:j==="favourite"?{action:"favourite",error:q.error,retry:X}:j==="download"?{action:"download",error:_.error,retry:G}:{action:"delist",error:f.error,retry:void 0}:null,me=()=>{o("/agent-hub")};return c?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(K,{label:"Loading agent details"})}):x?e.jsx("div",{className:"flex h-full items-center justify-center p-6",children:e.jsxs(se,{variant:"danger",className:"max-w-2xl",children:[e.jsx(ne,{children:"This agent could not be loaded"}),e.jsx(ae,{children:je("The Radient agent catalogue did not answer.",x)}),e.jsx("div",{className:"mt-2",children:e.jsx(l,{variant:"outline",size:"sm",onClick:()=>void k(),disabled:b,"aria-busy":b,children:b?"Trying…":"Try again"})})]})}):s?e.jsxs("div",{className:"m-6 flex flex-1 flex-col rounded-md bg-surface p-8",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[e.jsx(l,{variant:"ghost",size:"icon",onClick:me,"aria-label":"Back to Agent Hub",children:e.jsx(Re,{className:"rtl:-scale-x-100"})}),e.jsx(M,{className:"size-11 shrink-0",children:e.jsx(I,{children:e.jsx(He,{size:22,"aria-hidden":"true"})})}),e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("h1",{className:"truncate text-display text-ink",children:p}),u&&e.jsx(Pe,{orgName:P})]})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[!u&&e.jsxs(e.Fragment,{children:[e.jsx(N,{content:"Sign in to Radient to use this feature",disabled:n,children:e.jsx("span",{children:e.jsxs(l,{variant:"ghost",size:"sm",onClick:$,disabled:!n||z.isPending||!m,"aria-label":m?y?"Unlike agent":"Like agent":"Like state unavailable",className:J(y&&"text-danger"),children:[e.jsx(Ve,{fill:y?"currentColor":"none"}),e.jsx(V,{children:H})]})})}),e.jsx(N,{content:"Sign in to Radient to use this feature",disabled:n,children:e.jsx("span",{children:e.jsxs(l,{variant:"ghost",size:"sm",onClick:X,disabled:!n||q.isPending||!m,"aria-label":m?v?"Unfavourite agent":"Favourite agent":"Favourite state unavailable",className:J(v&&"text-warning"),children:[e.jsx(We,{fill:v?"currentColor":"none"}),e.jsx(V,{children:i})]})})})]}),e.jsx(N,{content:"Download agent to your computer",children:e.jsx("span",{children:e.jsxs(l,{variant:"ghost",size:"icon",onClick:G,disabled:_.isPending,"aria-label":"Download agent",className:"ml-1",children:[e.jsx(be,{}),e.jsx(V,{children:_.isPending?e.jsx(w,{className:"h-3.5 w-5"}):d})]})})}),W&&!u&&e.jsx(N,{content:"Permanently delist this agent from Agent Hub",children:e.jsx("span",{children:e.jsx(l,{variant:"ghost",size:"icon",onClick:()=>L(!0),disabled:f.isPending,"aria-label":"Delist agent",className:"ml-1 text-danger hover:bg-danger-wash hover:text-danger",children:e.jsx(le,{})})})})]})]}),n&&U&&!j&&!u&&e.jsxs("output",{className:"mb-6 flex flex-wrap items-center gap-2 text-meta text-warning","data-testid":"agent-details-status-unknown",children:[e.jsx("span",{children:"Your likes and favourites could not be read, so this agent's viewer state is not shown."}),e.jsx(l,{variant:"ghost",size:"sm",onClick:()=>void R(),disabled:S,"aria-busy":S,children:S?"Trying…":"Try again"})]}),T&&j&&e.jsxs(se,{variant:"danger",className:"mb-6","data-testid":"agent-details-error",children:[e.jsx(ne,{children:nt[j]}),e.jsx(ae,{children:ge(T.action,T.error,p)}),T.retry&&e.jsx("div",{className:"mt-2",children:e.jsx(l,{variant:"outline",size:"sm",onClick:T.retry,children:"Try again"})})]}),e.jsx(ze,{tags:s.tags,categories:s.categories}),e.jsxs("div",{className:"mt-4 mb-6 flex flex-col gap-2 text-body-sm text-ink-muted",children:[e.jsxs("p",{children:["Created by: ",s.account_metadata?.name??"Unknown",s.account_metadata?.email?` (${s.account_metadata.email})`:""]}),e.jsxs("p",{children:["Created: ",ie(new Date(s.created_at))," ago (",ee(s.created_at),")"]}),e.jsxs("p",{children:["Last modified: ",ie(new Date(s.updated_at))," ","ago (",ee(s.updated_at),")"]})]}),e.jsx("div",{className:"mt-2 mb-8 leading-relaxed text-body text-ink",children:s.description||"No description provided."}),e.jsx(ce,{className:"my-6"}),!u&&e.jsx(et,{agentId:s.id}),e.jsx(pe,{open:de,onClose:()=>L(!1),title:"Delist this agent?",maxWidth:"xs",actions:e.jsxs(e.Fragment,{children:[e.jsx(ye,{onClick:()=>L(!1),children:"Cancel"}),e.jsx(ve,{onClick:()=>{!t||!W||f.isPending||ue()},disabled:f.isPending,children:f.isPending?e.jsx(K,{size:"sm",label:"Delisting agent"}):"Delist"})]}),dialogProps:{"aria-describedby":"delist-dialog-description"},children:e.jsxs("div",{id:"delist-dialog-description",className:"text-body text-ink-muted",children:['This takes "',p,'" off the hub straight away, and nobody will be able to download it. You can upload it again later.']})})]}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("p",{className:"text-body text-ink",children:"Agent not found."})})};export{ft as AgentDetailsPage};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e,c as B}from"./index-A1hV3Zf6.js";import{B as ys,G as it,i as ws,d as nt,a as _s,c as Ue,r as lt,u as rt,g as Ve,a2 as ct,C as ut}from"./path-utils-Cpj2hmLX.js";import{P as ot}from"./page-header-ieQr-cSr.js";import{c as dt,v as ne,B as C,g as T,u as X,J as mt,K as ye,T as Ss,o as Ae,p as Le,y as Ee,q as Oe,z as Fe,F as ze,A as me,a as he,w as xe,M as ht,N as xt,O as bt,P as pt,Q as ss,R as ts,U as as,V as is,W as ns}from"./error-boundary-BwM9HB5p.js";import{b9 as Qe,bc as ls,bI as gt,bJ as Cs,a7 as qe,ba as ft,bK as jt,aZ as kt,bL as Nt,bM as vt,S as Ps,bh as Ts,bN as ke,bO as yt,bP as wt}from"./conversation-input-sync-wILdIPP1.js";import{t}from"./messages-BaR4LA7j.js";import{a as _t,p as Rs,P as le,u as St}from"./publication-validation-Bop1t9Rh.js";import{h as ae,O as Ct,A as Pt,f as Tt,a as Rt,b as It,d as At,e as Is,C as Lt,c as Et,n as Ot,u as Ft,i as zt}from"./use-download-agent-mutation-CZ6tp236.js";import{H as Dt}from"./heart-CbNuxwI-.js";import{v as Mt,aL as $t,aM as Ut,aN as qt,aO as As,aP as Ht,aQ as Bt,x as Vt,z as Qt,D as rs,Q as cs,aR as Wt,aS as Kt,K as Yt,s as Gt,aT as Jt}from"./index-CH-k2xgZ.js";import{n as Xt,u as Zt,i as ea,H as sa,p as us,a as Ls,h as os,b as ta,c as aa,d as ia,e as na,f as la,g as ra,s as ca,j as ds,k as ms,l as hs,m as xs,S as bs,o as ua,q as oa,r as da,t as Es,v as Os,P as Fs,w as ma,x as ha}from"./org-access-Bui0nch2.js";import{R as zs}from"./radient-auth-buttons-BwliPxWF.js";import{o as xa,a as De}from"./org-surface-gate-CfqBVm1m.js";import{B as ba}from"./building-2-xAIkeocN.js";import"./en-US-CW_dDnkH.js";import"./book-open-1zGbkXts.js";import"./console-mirror-DLnj_s8B.js";/**
|
|
2
|
-
* @license lucide-react v0.507.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const pa=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],ga=dt("circle-ellipsis",pa),fa=({agent:s,isLiked:a,isFavourited:i,onLikeToggle:n,onFavouriteToggle:c,onDownload:d,isLikeActionLoading:m=!1,isFavouriteActionLoading:E=!1,isDownloading:p=!1,actionError:v=null,onRetryAction:O,showActions:S=!0,viewerStateKnown:b=!0,orgName:h=null})=>{const L=ys(),{isAuthenticated:f}=Qe(),w=s.description??"",[R,F]=l.useState(!1),P=l.useRef(null),g=l.useCallback(A=>{if(P.current?.disconnect(),P.current=null,!A)return;const D=()=>F(A.scrollHeight-A.clientHeight>1);D();const V=new ResizeObserver(D);V.observe(A),P.current=V},[]),I=f?b?a?"Unlike agent":"Like agent":"Your likes could not be read, so this is not shown as unliked.":"Log in to Radient to like agents",j=f?b?i?"Unfavourite agent":"Favourite agent":"Your favourites could not be read, so this is not shown as unfavourited.":"Log in to Radient to favourite agents",k=b?a?"Unlike agent":"Like agent":"Like state unavailable",N=b?i?"Unfavourite agent":"Favourite agent":"Favourite state unavailable",u=s.visibility==="org",x=ae(s.name);return e.jsxs("div",{"data-glass-block":"",className:"flex h-full flex-col overflow-hidden rounded-md bg-surface transition-colors duration-fast ease-out-quart hover:bg-elevated",children:[e.jsxs("button",{type:"button",onClick:()=>L(`/agent-hub/${s.id}`),className:"flex min-h-0 flex-1 cursor-pointer flex-col gap-2 p-4 text-left","aria-label":`View details for ${x}`,children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:x}),u&&e.jsx(Ct,{orgName:h}),e.jsx(ne,{content:R?w:"",children:e.jsx("span",{ref:g,className:"line-clamp-3 min-h-0 text-body-sm text-ink-muted",children:w})}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsx(Pt,{tags:s.tags,categories:s.categories}),e.jsxs("p",{className:"truncate text-ink-dim text-meta",children:[s.account_metadata?.name??"Unknown author",e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),"updated ",Tt(new Date(s.updated_at))," ago"]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-hairline px-3 py-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-0.5","data-viewer-state":u?"org":f?b?"known":"unknown":"signed-out",children:[!u&&e.jsxs(e.Fragment,{children:[e.jsx(ne,{content:I,children:e.jsx("span",{children:e.jsxs(C,{variant:"ghost",size:"sm",onClick:f&&b?()=>n(s.id):void 0,disabled:m||!f||!b,"aria-label":k,className:B(a&&"text-danger"),children:[e.jsx(Dt,{fill:a?"currentColor":"none","data-testid":"agent-like-heart"}),e.jsx("span",{"data-testid":"agent-like-count",className:"inline-flex h-4 min-w-4 items-center font-mono text-mono-sm text-ink-muted",children:s.like_count??0})]})})}),e.jsx(ne,{content:j,children:e.jsx("span",{children:e.jsxs(C,{variant:"ghost",size:"sm",onClick:f?()=>c(s.id):void 0,disabled:E||!f||!b,"aria-label":N,className:B(i&&"text-warning"),children:[e.jsx(Mt,{fill:i?"currentColor":"none","data-testid":"agent-favourite-star"}),e.jsx("span",{"data-testid":"agent-favourite-count",className:"inline-flex h-4 min-w-4 items-center font-mono text-mono-sm text-ink-muted",children:s.favourite_count??0})]})})})]}),e.jsx(ne,{content:"Downloads",children:e.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 pr-1 text-ink-dim",children:[e.jsx(ls,{"aria-hidden":"true",className:"size-3.5"}),e.jsx("span",{className:"inline-flex h-4 min-w-6 items-center font-mono text-mono-sm",children:p?e.jsx(T,{className:"h-3 w-6"}):(s.download_count??0).toLocaleString()})]})})]}),S&&d&&e.jsx("div",{className:"ml-auto flex shrink-0 items-center",children:e.jsxs(C,{variant:"secondary",size:"sm",onClick:()=>d(s),disabled:p,"aria-label":`Download ${x}`,"data-tour-tag":"agent-hub-download-button",children:[e.jsx(ls,{"data-testid":"agent-download"}),"Get"]})})]}),v&&e.jsxs("output",{"data-testid":"agent-card-error",className:"flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-hairline px-3 py-2 text-body-sm text-danger",children:[e.jsx("span",{className:"min-w-0 flex-1",children:v}),O&&e.jsx(C,{variant:"ghost",size:"sm",onClick:O,children:"Try again"})]})]})},ja=({agent:s,status:a,viewerStateKnown:i=!0,orgName:n=null})=>{const{isAuthenticated:c}=Qe(),[d,m]=l.useState(null),E=a?.liked??!1,p=a?.favourited??!1,v=Rt(),O=It(),S=At(),b=()=>{!c||v.isPending||(m(null),v.mutate({agentId:s.id,isCurrentlyLiked:E},{onError:()=>m("like")}))},h=()=>{!c||O.isPending||(m(null),O.mutate({agentId:s.id,isCurrentlyFavourited:p},{onError:()=>m("favourite")}))},L=()=>{S.isPending||(m(null),S.mutate({agentId:s.id,agentName:s.name},{onError:()=>m("download")}))},f=d?d==="like"?{action:"like",error:v.error,retry:b}:d==="favourite"?{action:"favourite",error:O.error,retry:h}:{action:"download",error:S.error,retry:L}:null;return e.jsx(fa,{agent:s,isLiked:c&&E,isFavourited:c&&p,onLikeToggle:b,onFavouriteToggle:h,onDownload:L,isLikeActionLoading:v.isPending,isFavouriteActionLoading:O.isPending,isDownloading:S.isPending,viewerStateKnown:i,orgName:n,actionError:f?_t(f.action,f.error,ae(s.name)):null,onRetryAction:f?.retry})},ps=({selected:s,onClick:a,children:i,...n})=>e.jsx("button",{type:"button",onClick:a,"aria-pressed":s,className:B("flex w-full cursor-pointer items-center gap-2.5 rounded-sm px-3 py-1.5 text-left","text-body-sm transition-colors duration-fast ease-out-quart",s?Ut:"text-ink hover:bg-row-hover"),...n,children:i}),gs=Object.keys(Lt),ka=s=>[...s].sort((a,i)=>{const n=gs.indexOf(a),c=gs.indexOf(i);return n!==-1&&c!==-1?n-c:n!==-1?-1:c!==-1?1:a.localeCompare(i)}),Na=({selectedCategory:s,onSelectCategory:a,categories:i})=>{X();const n=ka(s&&!i.includes(s)?[...i,s]:i);return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto",children:[e.jsx("h2",{className:"mb-2 px-3 font-medium text-ink-dim text-meta",children:t("ui.hub.taxonomy.heading")}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs(ps,{selected:s===null,onClick:()=>a(null),"data-testid":"category-all",children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e.jsx($t,{size:16,"aria-hidden":"true"})}),t("ui.hub.taxonomy.all")]}),n.map(c=>{const d=Is(c),m=c==="other"?e.jsx(ga,{size:16}):d.icon;return e.jsxs(ps,{selected:s===c,onClick:()=>a(c),"data-testid":`category-${c}`,children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:m}),d.label]},c)})]})]})},We=({page:s,count:a,onChange:i,ariaLabel:n="Agent pages"})=>{const c=l.useRef(null),d=l.useRef(null),m=l.useRef(null);return l.useEffect(()=>{const E=m.current;m.current=null,E==="previous"&&c.current?.focus(),E==="next"&&d.current?.focus()},[s]),a<=1?null:e.jsxs("nav",{"aria-label":n,className:"mt-6 flex min-h-13 items-center justify-between gap-3 border-t border-hairline","data-testid":"agent-hub-pager",children:[e.jsxs("span",{className:"select-none text-meta text-ink-dim",children:["Page ",s," of ",a]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(C,{variant:"secondary",size:"sm",ref:c,onClick:()=>{s-1<=1&&(m.current="next"),i(s-1)},disabled:s<=1,"aria-label":"Previous page",children:[e.jsx(gt,{"aria-hidden":"true"}),"Previous"]}),e.jsxs(C,{variant:"secondary",size:"sm",ref:d,onClick:()=>{s+1>=a&&(m.current="previous"),i(s+1)},disabled:s>=a,"aria-label":"Next page",children:["Next",e.jsx(mt,{"aria-hidden":"true"})]})]})]})},va=/alias/i;function fs(s){return s instanceof it?s.code==="alias-occupied"?!0:s.code==="origin-conflict"&&va.test(s.message):!1}function ya({scope:s,source:a,verifiedCas:i,enabled:n=!0,heading:c=!0}){X();const d=l.useId(),[m,E]=l.useState(""),[p,v]=l.useState(""),[O,S]=l.useState(Xt),[b,h]=l.useState(null),[L,f]=l.useState(!1),w=Zt(),R=l.useRef(null),F=ws({queryKey:["desktop","skills","hub-publication"],queryFn:()=>nt({op:"skills.list"}),staleTime:3e4,retry:!1}),P=`${s.visibility}:${s.tenantId??""}`,g=l.useRef(P);l.useEffect(()=>{g.current!==P&&(g.current=P,S(N=>({...N,autoPush:!1,confirmPublicEgress:!1})),h(null),f(!0))},[P]);const I={sourceSkill:m,localAlias:p,visibility:s.visibility,tenantId:s.tenantId,...O},j=b?ea(b,I):!1;l.useEffect(()=>{if(!b)return;const N=setTimeout(()=>{h(null),f(!0)},Math.max(0,Math.min(Date.parse(b.expires_at)-Date.now(),2147483647)));return()=>clearTimeout(N)},[b]);const k=N=>{if(!n||w.isPending||!m||!p||N&&!j)return;const u=JSON.stringify({draft:I,receipt:N?b?.preview_receipt:null}),x=R.current&&R.current.tuple===u&&(N||w.error)?R.current:{tuple:u,id:crypto.randomUUID()};R.current=x,N||(h(null),f(!1)),w.mutate({requestId:x.id,draft:I,...N&&b?{previewReceipt:b.preview_receipt}:{}},{onSuccess:A=>{A.preview?(h(A.preview),f(!1)):us(A)&&h(null)}})};return e.jsxs("section",{className:"flex min-w-0 flex-col gap-4","data-hub-skill-publication":!0,children:[c&&e.jsx("h3",{className:"text-heading text-ink",children:t("ui.hub.skills.publish_title")}),e.jsx("label",{htmlFor:`${d}-source`,className:"text-body-sm text-ink",children:t("ui.hub.skills.select_authored")}),e.jsxs("select",{id:`${d}-source`,"data-testid":"hub-skill-publish-source",value:m,disabled:w.isPending||!n,className:"rounded-md border border-control bg-surface px-3 py-2 text-body-sm text-ink",onChange:N=>{E(N.target.value),v(N.target.value),h(null),S(u=>({...u,autoPush:!1,confirmPublicEgress:!1}))},children:[e.jsx("option",{value:"",children:t("ui.hub.skills.select_authored")}),F.data?.data.skills.map(N=>e.jsx("option",{value:N.name,children:N.name},N.name))]}),e.jsx("label",{htmlFor:`${d}-alias`,className:"text-body-sm text-ink",children:t("ui.hub.subscriptions.alias")}),e.jsx(ye,{id:`${d}-alias`,"data-testid":"hub-skill-publish-alias",value:p,disabled:w.isPending||!n,onChange:N=>{v(N.target.value),S(u=>({...u,autoPush:!1,confirmPublicEgress:!1}))}}),e.jsx("p",{className:"text-meta text-ink-muted",children:t("ui.hub.skills.text_limits")}),e.jsx(sa,{value:O,onChange:S,source:a,item:m||p,visibility:s.visibility,organization:s.organization,destinationKey:`${P}:${m}`,canEnableAutoPush:i,disabled:w.isPending||!n}),F.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:t("ui.hub.skills.loading")}),F.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:t("ui.hub.status.other_error")}),w.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:t("ui.hub.links.action_failed",{direction:t("ui.hub.links.direction_push"),item:m||p,source:a})}),(L||b&&!j&&b.can_confirm)&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:t("ui.hub.links.preview_changed")}),b&&b.visibility===s.visibility&&b.tenant_id===s.tenantId&&e.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[e.jsx("h4",{className:"text-body-sm text-ink",children:t("ui.hub.links.preview_payload",{source:a})}),e.jsx(Ss,{readOnly:!0,rows:12,"aria-label":t("ui.hub.links.preview_payload",{source:a}),value:JSON.stringify(b.proposal.fields,null,2),className:"max-h-96 bg-sunken text-mono-sm"}),b.warnings.map((N,u)=>e.jsx("p",{className:"break-words text-body-sm text-warning",children:N},`${u}-${N}`)),b.reason&&e.jsx("p",{className:"text-body-sm text-warning",children:qt(b.reason)})]}),w.data?.publication===null&&w.data.local_link_receipt?.state==="pending-reconciliation"&&e.jsx("output",{className:"text-body-sm text-warning","data-testid":"hub-skill-pending-reconcile",children:t("ui.hub.links.publication_pending")}),w.data?.publication&&e.jsx("output",{className:"text-body-sm text-ink","data-testid":"hub-skill-published",children:us(w.data)?t("ui.hub.links.published",{item:w.data.link?.name??p,source:w.data.link?As(w.data.link):a}):t("ui.hub.skills.policy_pending")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(C,{variant:"outline","data-testid":"hub-skill-publish-preview",disabled:!n||w.isPending||!m||!p,onClick:()=>k(!1),children:t("ui.hub.subscriptions.preview_publish")}),e.jsx(C,{"data-testid":"hub-skill-publish-confirm",disabled:!n||w.isPending||!j,onClick:()=>k(!0),children:t("ui.hub.links.confirm_publish")})]})]})}function js(s,a){const i=s.publisher?.trim();return i?t("ui.hub.skills.published_by",{publisher:i}):s.visibility==="org"?a??t("ui.hub.links.source_unavailable"):t("ui.hub.skills.public_hub")}function wa({scope:s,signedIn:a,accessible:i=!0}){X();const n=l.useId(),[c,d]=l.useState(1),[m,E]=l.useState(""),[p,v]=l.useState(null),[O,S]=l.useState(!1),[b,h]=l.useState("unsubscribe"),[L,f]=l.useState(!1),w=l.useRef(null),R=s.visibility==="public"?t("ui.hub.links.source_public"):s.organization?t("ui.hub.links.source_private",{organization:s.organization}):t("ui.hub.links.source_unavailable"),F=_s(),P=i&&Ue(F.data,"hub_updates"),g=Ls(s,c,i&&(s.visibility==="public"||a)),I=os(g.data?.contract),j=ta(s,p,I&&i),k=aa(),N=ia(),u=na(),x=Ht(),A=Bt(i&&Ue(F.data,"hub_links")),D=Vt(P),V=l.useMemo(()=>la(A.data?.links,ra(qe.radientBaseUrl)),[A.data]),M=l.useMemo(()=>Qt(D.data),[D.data]),U=k.data?.link?.link_id,y=!A.isLoading&&!A.error,$=A.error?t("ui.hub.skills.inventory_unknown"):t("ui.hub.links.loading"),se=j.data?.visibility===s.visibility&&(s.visibility==="public"?!j.data.tenant_id:j.data.tenant_id===s.tenantId),te=i&&!j.error&&!g.error&&se&&os(j.data?.sync_contract)&&!!j.data?.revision,re=(g.data?.rows??[]).filter(o=>ca(o,s)),be=re.filter(o=>`${o.name} ${o.description}`.toLocaleLowerCase().includes(m.toLocaleLowerCase())),Q=re.find(o=>o.id===p),_=Q?V.get(ds({id:Q.id,visibility:Q.visibility,tenantId:Q.tenant_id??null})):void 0,pe=_?M.get(rs("skill",_.name)):void 0,ce=ms(_,pe,y),ee=_?cs(_)==="present":!1,we=o=>{const z=V.get(ds({id:o.id,visibility:o.visibility,tenantId:o.tenant_id??null})),J=z?M.get(rs("skill",z.name)):void 0;return{link:z,update:J,state:ms(z,J,y)}},ue=o=>(w.current?.tuple!==o&&(w.current={tuple:o,id:crypto.randomUUID()}),w.current.id),ie=o=>{if(!p||!te||!a)return;const z=o?.name??Q?.name??"";if(!z)return;const J=o?o.policy.subscribe:!1,de=o?.policy.auto_push??!1,ge=!1;k.mutate({requestId:ue(oa({selected:p,scope:s,localAlias:z,subscribe:J,autoPush:de,consent:ge})),remoteId:p,scope:s,alias:z,subscribe:J,autoPush:de,consent:ge})},_e=()=>{if(!p||!te||!a)return;if(da(_)==="policy"&&_){if(_.policy.subscribe||x.isPending)return;h("subscribe"),x.mutate({link:_,patch:{subscribe:!0}});return}const o=Q?.name??"";o&&N.mutate({requestId:ue(JSON.stringify({op:"subscribe",selected:p,scope:s,localAlias:o})),remoteId:p,scope:s,alias:o})},Se=()=>{_&&u.mutate({requestId:ue(JSON.stringify({op:"unpull",link:_.link_id})),linkId:_.link_id},{onSuccess:()=>{k.reset(),N.reset()}})},W=()=>{!_||_.policy.subscribe===!1||x.isPending||!x.canWrite||(h("unsubscribe"),x.mutate({link:_,patch:{subscribe:!1}}))},G=a&&I&&i&&!g.error,oe=g.data?.total??re.length,q=g.error?null:g.isLoading?t("ui.hub.skills.loading"):s.organization?t("ui.hub.skills.count_shared",{count:oe,organization:s.organization}):t("ui.hub.skills.count",{count:oe});return e.jsxs("section",{className:"flex min-w-0 flex-col gap-4","data-hub-skills-library":!0,children:[s.visibility==="org"&&!a?e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:t("ui.hub.status.no_credential")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:B("flex min-w-56 max-w-md flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(Cs,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(ye,{id:`${n}-search`,type:"search","data-testid":"hub-skill-search",value:m,placeholder:t("ui.hub.skills.search"),"aria-label":t("ui.hub.skills.search"),onChange:o=>E(o.target.value),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none"})]}),G&&e.jsx(C,{variant:"secondary","data-testid":"hub-skill-publish-open",onClick:()=>f(!0),children:t("ui.hub.skills.publish_title")})]}),q!==null&&e.jsx("p",{"aria-live":"polite",className:"text-meta text-ink-dim","data-testid":"hub-skill-status",children:s.organization||g.isLoading?e.jsx("span",{"data-testid":"hub-skill-source",children:q}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:q})," · ",e.jsx("span",{"data-testid":"hub-skill-source",children:t("ui.hub.skills.public_hub")})]})}),g.error&&e.jsxs("div",{role:"alert",className:"flex flex-col items-start gap-2 text-body-sm text-warning",children:[e.jsx("p",{children:t("ui.hub.skills.catalogue_failed",{source:R})}),e.jsx(C,{variant:"outline",className:"self-start",disabled:g.isFetching,onClick:()=>void g.refetch(),children:t("ui.hub.links.retry")})]}),g.isSuccess&&!I&&e.jsx("p",{className:"text-body-sm text-warning",children:t("ui.hub.skills.unavailable")}),I&&e.jsxs(e.Fragment,{children:[be.length===0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:t(m?"ui.hub.skills.search_empty":"ui.hub.skills.remote_empty")}),e.jsx("ul",{className:"grid list-none grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6 p-0",children:be.map(o=>{const z=we(o),J=hs(z.state,z.update,z.link?cs(z.link)==="present":!1);return e.jsx("li",{className:"min-w-0",children:e.jsxs("button",{type:"button","aria-haspopup":"dialog","aria-expanded":p===o.id,"aria-label":t("ui.hub.skills.open_detail",{item:o.name}),"data-testid":"hub-skill-open","data-skill-id":o.id,"data-skill-state":z.state.kind,onClick:()=>{v(o.id),k.reset(),N.reset(),u.reset(),x.reset()},className:B("flex h-full w-full flex-col overflow-hidden rounded-md bg-surface text-left","transition-colors duration-fast ease-out-quart hover:bg-elevated","focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-1"),children:[e.jsxs("span",{className:"flex min-h-0 flex-1 flex-col gap-2 p-4",children:[e.jsx("span",{className:"truncate font-medium text-heading text-ink",children:o.name}),o.description?e.jsx("span",{className:"line-clamp-3 text-body-sm text-ink-muted",children:o.description}):null,e.jsx("span",{className:"mt-auto truncate text-ink-dim text-meta",children:js(o,s.organization)})]}),e.jsxs("span",{className:"flex items-center justify-between gap-2 border-t border-hairline px-4 py-2 text-meta",children:[e.jsx("span",{className:"truncate text-ink-muted",children:xs(z.state,$)}),e.jsx(bs,{mark:J})]})]})},o.id)})}),e.jsx(We,{page:c,count:g.data?.pages??1,onChange:d,ariaLabel:t("ui.hub.skills.title")})]})]}),!i&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:t("ui.hub.status.access_lost")}),e.jsx(Ae,{open:!!p&&I,onOpenChange:o=>{o||v(null)},children:e.jsxs(Le,{"data-hub-skill-detail":"",className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[e.jsxs(Ee,{children:[e.jsx(Oe,{"data-testid":"hub-skill-detail-name",children:j.data?.name??Q?.name??t("ui.hub.skills.title")}),e.jsx(Fe,{children:j.data&&se?js(j.data,s.organization):R})]}),j.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:t("ui.hub.skills.loading")}),j.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:t("ui.hub.status.other_error")}),j.data&&se&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("p",{className:"text-body-sm text-ink-muted",children:[xs(ce,$),e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),t("ui.hub.skills.revision",{revision:String(j.data.content_revision)})]}),e.jsx(bs,{mark:hs(ce,pe,ee)})]}),e.jsx("p",{"data-testid":"hub-skill-description",className:"max-w-3xl select-text whitespace-pre-wrap break-words text-body-sm text-ink-muted",children:j.data.description}),_&&ee&&_.local_path&&e.jsx("p",{"data-testid":"hub-skill-local-path",className:"break-words font-mono text-meta text-ink-dim",children:t("ui.hub.skills.local_path",{path:`${_.local_path}`})}),e.jsx("h4",{className:"text-body-sm text-ink",children:t("ui.hub.skills.files")}),e.jsx("p",{className:"text-meta text-ink-muted",children:t("ui.hub.skills.file_count",{count:j.data.files.length})}),j.data.files.map(o=>e.jsxs("details",{className:"min-w-0",children:[e.jsx("summary",{className:"break-words text-mono-sm text-ink",children:o.path}),e.jsx(Ss,{readOnly:!0,rows:12,"aria-label":o.path,value:o.content,className:"max-h-96 bg-sunken text-mono-sm"})]},o.path)),_&&e.jsxs("div",{className:"flex flex-col gap-2 border-t border-hairline pt-3",children:[e.jsx(Wt,{link:_}),_.policy.subscribe&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(C,{variant:"outline",size:"sm","data-testid":"hub-skill-unsubscribe",disabled:x.isPending||!x.canWrite,onClick:W,children:t("ui.hub.skills.unsubscribe")}),e.jsx("span",{className:"text-meta text-ink-muted",children:t("ui.hub.skills.unsubscribe_help")})]}),x.error&&e.jsx("p",{role:"alert",className:"text-meta text-danger",children:t("ui.hub.subscriptions.save_failed",{setting:b==="subscribe"?t("ui.hub.subscriptions.subscribe"):t("ui.hub.skills.unsubscribe"),source:R})})]}),_&&ee&&e.jsx(ua,{kind:"skill",name:_.name,enabled:P}),k.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-pull-failed",children:t(fs(k.error)?"ui.hub.skills.local_exists":"ui.hub.skills.pull_failed")}),k.data&&!k.data.reports?.some(o=>o.applied||o.outcome==="unchanged")&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-pull-failed",children:t("ui.hub.skills.pull_failed")}),k.data?.link&&k.data.reports?.some(o=>o.link_id===U&&o.direction==="pull"&&o.applied)&&e.jsx("output",{"data-testid":"hub-skill-installed",className:"text-body-sm text-ink",children:t("ui.hub.skills.installed_alias",{item:k.data.link.name,source:As(k.data.link)})}),u.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-unpull-failed",children:t("ui.hub.skills.unpull_failed")}),N.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-subscribe-failed",children:t(fs(N.error)?"ui.hub.skills.local_exists":"ui.hub.skills.subscribe_failed")}),!a&&e.jsx("p",{className:"text-meta text-ink-muted",children:t("ui.hub.status.no_credential")}),(!_||!ee)&&e.jsxs(ze,{className:"flex-row flex-wrap justify-start gap-2",children:[e.jsx(C,{"data-testid":"hub-skill-download",disabled:!a||!te||k.isPending||!y,"aria-label":t("ui.hub.skills.pull_title",{item:j.data.name,source:R}),onClick:()=>ie(_),children:t("ui.hub.skills.download")}),!_?.policy.subscribe&&e.jsx(C,{variant:"outline","data-testid":"hub-skill-subscribe",disabled:!a||!te||!y||N.isPending||x.isPending||(_?!x.canWrite:!1),onClick:_e,children:t("ui.hub.subscriptions.subscribe")})]}),_&&ee&&e.jsx(ze,{className:"flex-row flex-wrap justify-start gap-2",children:e.jsx(C,{variant:"outline","data-testid":"hub-skill-unpull",disabled:u.isPending,onClick:()=>{u.reset(),S(!0)},children:t("ui.hub.skills.unpull")})}),(!_||!ee)&&e.jsx("p",{className:"text-meta text-ink-muted",children:_?.policy.subscribe?t("ui.hub.skills.download_help"):t("ui.hub.skills.subscribe_help")})]})]})}),e.jsx(Ae,{open:O,onOpenChange:o=>{o||S(!1)},children:e.jsxs(Le,{className:"sm:max-w-md",children:[e.jsxs(Ee,{children:[e.jsx(Oe,{children:t("ui.hub.skills.unpull_title",{item:j.data?.name??_?.name??""})}),e.jsx(Fe,{children:t("ui.hub.skills.unpull_body")})]}),e.jsxs(ze,{children:[e.jsx(C,{variant:"outline",onClick:()=>S(!1),children:t("ui.hub.subscriptions.cancel")}),e.jsx(C,{"data-testid":"hub-skill-unpull-confirm",disabled:u.isPending,onClick:()=>{Se(),S(!1)},children:t("ui.hub.skills.unpull")})]})]})}),e.jsx(Ae,{open:L,onOpenChange:f,children:e.jsxs(Le,{className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[e.jsxs(Ee,{children:[e.jsx(Oe,{children:t("ui.hub.skills.publish_title")}),e.jsx(Fe,{children:R})]}),e.jsx(ya,{scope:s,source:R,verifiedCas:I&&i&&a,enabled:I&&i&&a,heading:!1})]})})]})}const Ds={all:["org-teams"],list:s=>[...Ds.all,"list",s]},Ms=({tenantId:s,enabled:a=!0})=>{const i=ws({queryKey:Ds.list(s??""),queryFn:async()=>(await Kt(s)).result??{teams:[]},enabled:a&&!!s,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1,retry:lt});return{...i,teams:i.data?.teams??[]}},_a=(s,a)=>{const i=s?.name?.trim()||a?.trim()||"Team",n=s?.renamed_from?.trim()||null;return s?.invalid_name===!0&&n?{level:"warning",message:t("ui.notices.hub.team_pulled_renamed",{stored:i,published:n})}:n?{level:"success",message:t("ui.notices.hub.team_pulled_collision",{stored:i,published:n})}:{level:"success",message:t("ui.notices.hub.team_pulled",{name:i})}},$s=()=>{const s=rt();return ft({mutationFn:async({teamId:a,tenantId:i})=>{if(!qe.baseUrl)throw new Error("Local Operator API URL is not configured.");return Nt.pullOrgTeamFromRadient(qe.baseUrl,a,i)},onSuccess:(a,i)=>{const n=_a(a.result,i.name);n.level==="warning"?jt(n.message):kt(n.message),s.invalidateQueries({queryKey:["desktop","teams"]})},onError:a=>{console.error("Pulling an organization team failed:",a)}})},Sa=/^v/i,Us=s=>s.members.reduce((a,i)=>a+i.count,0),Ca=s=>s.count>1?`${s.role} ×${s.count}`:s.role,He=s=>s.members.map(Ca).join(", "),qs=s=>{const a=(s.version??"").trim().replace(Sa,"").trim();return a===""?null:a},Hs=s=>{const a=s.account_metadata?.name?.trim();return a||null},Pa=s=>{const a=(s.description??"").trim();return a===""?null:a},Be=240,Ta=Be/2,Ra=(s,a)=>{if(a||s.length<=Be)return s;const i=s.slice(0,Be),n=i.lastIndexOf(" ");return`${(n>=Ta?i.slice(0,n):i).trimEnd()}…`},Ne=s=>vt(s,{day:"numeric",month:"short",year:"numeric"}),ve=s=>{if(!s)return null;const a=new Date(s);return Number.isNaN(a.getTime())?null:a},ks=(s,a,i)=>{const n=i-a.getTime();let c;return n<0?c=Ne(a):n<6e4?c=t("ui.hub.updates.ago.now"):c=Et(a,i),{label:s,when:c,iso:a.toISOString(),exact:Ne(a)}},Ia=(s,a=Date.now())=>{const i=ve(s.updated_at);if(i)return ks("updated",i,a);const n=ve(s.created_date);return n?ks("created",n,a):null},Aa=s=>{const a=ve(s.created_date),i=ve(s.updated_at);return{created:a?Ne(a):null,updated:i?Ne(i):null}},La=s=>s==="role"?t("ui.hub.teams.kind.role"):s==="specialist"?t("ui.hub.teams.kind.specialist"):s,Ea=["refresh-hub","retry","sign-in"],Oa=({tenantId:s,orgName:a})=>{const{teams:i,isLoading:n,isFetching:c,isError:d,error:m,refetch:E}=Ms({tenantId:s}),p=Es(m),v=$s(),[O,S]=l.useState(null),[b,h]=l.useState(null),L=l.useRef(new Map),f=l.useRef(null);l.useEffect(()=>{v.isPending||f.current===null||(L.current.get(f.current)?.focus(),f.current=null)},[v.isPending]);const[w,R]=l.useState(!1),[F,P]=l.useState(()=>new Set),g=(u,x)=>P(A=>{const D=new Set(A);return x?D.add(u):D.delete(u),D}),I=(u,x)=>{u.key!=="Escape"||!F.has(x)||(u.target instanceof Element?u.target:null)?.closest('[data-testid="org-team-pull-error"]')||(g(x,!1),u.currentTarget.querySelector("button[aria-expanded]")?.focus(),u.preventDefault())},j=l.useMemo(()=>{if(!Ps(v.error))return null;const u=i.find(x=>x.id===O);return Rs({code:v.error.code,message:v.error.message,details:v.error.details},{name:u?.name??"this team",hubAgentId:null,surface:"pull"})},[v.error,O,i]),k=(u,x)=>{switch(u){case"refresh-hub":E();break;case"retry":N(x);break;case"sign-in":R(!0);break}},N=u=>{v.isPending||(f.current=u.id,S(null),h(u.id),v.mutate({teamId:u.id,tenantId:s,name:u.name},{onSettled:()=>h(null),onError:()=>S(u.id)}))};return e.jsxs("section",{className:"mb-6 max-w-4xl rounded-md bg-surface","aria-label":t("ui.hub.teams.org.aria",{org:a??t("ui.hub.pages.scope.org_unnamed")}),"data-testid":"org-teams",children:[n&&e.jsxs("div",{"aria-hidden":"true",className:"flex flex-col divide-y divide-hairline","data-testid":"org-teams-loading",children:[e.jsx(Me,{}),e.jsx(Me,{}),e.jsx(Me,{})]}),!n&&d&&e.jsxs(me,{variant:p?"warning":"danger",className:"m-4 w-auto","data-testid":"org-teams-error",children:[e.jsx(he,{children:p==="plan"?t("ui.hub.teams.org.plan_headline"):p==="no_access"?t("ui.hub.teams.org.no_access_headline"):t("ui.hub.teams.org.load_headline")}),e.jsx(xe,{children:p==="plan"?t("ui.hub.teams.org.plan_body",{org:a??t("ui.hub.pages.scope.org_unnamed")}):p==="no_access"?t("ui.hub.teams.org.no_access_body",{org:a??t("ui.hub.teams.org.that_organization")}):Ve(t("ui.hub.teams.org.unreadable"),m)}),p!=="no_access"&&e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void E(),disabled:c,"aria-busy":c,children:c?t("ui.hub.teams.public.trying"):le.retry})})]}),!n&&!d&&i.length===0&&e.jsx("p",{className:"p-4 text-body-sm text-ink-muted","data-testid":"org-teams-empty",children:t("ui.hub.teams.org.empty",{org:a??t("ui.hub.pages.scope.org_unnamed")})}),!n&&!d&&i.length>0&&e.jsx("ul",{className:"flex flex-col divide-y divide-hairline",children:i.map(u=>e.jsxs("li",{className:B(Bs,"transition-colors duration-fast ease-out-quart hover:bg-elevated first:rounded-t-md last:rounded-b-md"),onKeyDown:x=>I(x,u.id),children:[e.jsx(Ts,{className:"min-w-0",open:F.has(u.id),onOpenChange:x=>g(u.id,x),summaryAlign:"firstLine",triggerClassName:"min-w-0",chevronClassName:"text-ink-dim mt-1",rowClassName:"py-0",summary:e.jsx(Da,{team:u,expanded:F.has(u.id)}),trailing:e.jsx("div",{className:"-mt-1 ml-3 shrink-0 self-start",children:e.jsx(C,{ref:x=>{x?L.current.set(u.id,x):L.current.delete(u.id)},variant:"secondary",size:"sm",onClick:()=>N(u),disabled:v.isPending,"aria-label":t("ui.hub.teams.pull_target",{name:ae(u.name)}),children:b===u.id?t("ui.hub.teams.pulling"):t("ui.hub.teams.pull")})}),children:e.jsx(Ma,{team:u})}),O===u.id&&e.jsxs("div",{className:"mt-1 flex flex-col items-start gap-1 pl-5","data-testid":"org-team-pull-error",children:[e.jsx("output",{className:"text-meta text-danger",children:j?.body??v.error?.message??t("ui.hub.teams.pull_failed",{name:ae(u.name)})}),j?.actions.filter(x=>Ea.includes(x)).map(x=>e.jsx(C,{variant:"primary",size:"sm",onClick:()=>k(x,u),children:le[x]},x)),w&&e.jsx("div",{className:"mt-1","data-testid":"org-team-pull-reauth",children:e.jsx(zs,{titleText:le["sign-in"],descriptionText:"",onSignInSuccess:()=>{R(!1),S(null),E()}})})]})]},u.id))})]})},Bs="px-4 py-3",Vs=()=>e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),e.jsx("span",{className:"sr-only",children:", "})]}),Fa=({team:s})=>{X();const a=s.manager?.trim(),i=Us(s);return e.jsxs("span",{className:"block truncate text-meta",children:[a?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:t("ui.hub.teams.manager_label")})," ",e.jsx("span",{className:"text-ink-muted",children:a})]}):null,a?e.jsx(Vs,{}):null,s.members.length===0?e.jsx("span",{className:"text-ink-dim",children:t("ui.hub.teams.no_members")}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:t("ui.hub.teams.member_count",{count:i})})," ",e.jsx("span",{className:"text-ink-muted",children:He(s)})]})]})},za=({team:s})=>{const a=s.project?.trim(),i=Hs(s),n=Ia(s),c=[];return a&&c.push({key:"project",node:a}),i&&c.push({key:"author",node:i}),n&&c.push({key:"recency",node:e.jsxs(e.Fragment,{children:[n.label," ",e.jsx(ne,{content:n.exact,children:e.jsx("time",{dateTime:n.iso,children:n.when})})]})}),c.length===0?null:e.jsx("span",{className:"block truncate text-ink-dim text-meta",children:c.map((d,m)=>e.jsxs("span",{children:[m>0?e.jsx(Vs,{}):null,d.node]},d.key))})},Da=({team:s,expanded:a})=>{X();const i=Pa(s),n=qs(s);return e.jsxs("span",{className:"flex min-w-0 flex-col",children:[e.jsxs("span",{className:"flex min-w-0 items-baseline",children:[e.jsx("span",{className:"truncate font-medium text-body text-ink",children:ae(s.name)}),n?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",n]}):null]}),i?e.jsxs(e.Fragment,{children:[e.jsx("span",{...ke,"aria-hidden":"true",className:B("mt-1 select-text break-words text-body-sm text-ink-muted",a?"line-clamp-[12] whitespace-pre-line":"line-clamp-2"),children:i}),e.jsx("span",{className:"sr-only",children:Ra(i,a)})]}):e.jsx("span",{className:"mt-1 text-body-sm text-ink-dim",children:t("ui.hub.teams.no_description")}),e.jsxs("span",{className:"mt-1 flex min-w-0 flex-col",children:[e.jsx(Fa,{team:s}),e.jsx(za,{team:s})]})]})},Ma=({team:s})=>{X();const a=s.manager?.trim(),i=Aa(s),n=[i.created?t("ui.hub.teams.detail.created",{date:i.created}):null,i.updated?t("ui.hub.teams.detail.updated",{date:i.updated}):null].filter(d=>d!==null),c=!!a||s.members.length>0;return e.jsxs("div",{className:"mt-1 flex flex-col gap-2",children:[c||n.length===0?e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:t("ui.hub.teams.members")}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[a?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:a}),e.jsx("span",{className:"text-ink-dim text-meta",children:t("ui.hub.teams.manager")})]}):null,s.members.map(d=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:d.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:La(d.kind)}),d.count>1?e.jsxs("span",{className:"text-ink-dim text-meta tabular-nums",children:["×",d.count]}):null]},`${d.kind}:${d.role}`)),c?null:e.jsx("li",{className:"text-ink-dim text-meta",children:t("ui.hub.teams.no_members")})]})]}):null,n.length>0?e.jsx("p",{className:"text-ink-dim text-meta",children:n.join(" · ")}):null]})},Me=()=>e.jsxs("div",{className:B(Bs,"pl-9"),"data-testid":"org-team-skeleton-row",children:[e.jsx("div",{className:"flex h-[1lh] items-center text-body",children:e.jsx(T,{className:"h-4.5 w-40"})}),e.jsxs("div",{className:"mt-1 flex h-[2lh] flex-col justify-evenly text-body-sm",children:[e.jsx(T,{className:"h-3.5 w-full"}),e.jsx(T,{className:"h-3.5 w-2/3"})]}),e.jsx("div",{className:"mt-1 flex h-[1lh] items-center text-meta",children:e.jsx(T,{className:"h-3 w-64"})}),e.jsx("div",{className:"flex h-[1lh] items-center text-meta",children:e.jsx(T,{className:"h-3 w-48"})})]}),Qs=(s,a)=>a instanceof Yt?a.message:Ve(s,a),$a=["refresh-hub","retry","sign-in"],Ua=({signedIn:s,onOpenSettings:a})=>{X();const[i,n]=l.useState(1),[c,d]=l.useState(""),{teams:m,isLoading:E,isFetching:p,isError:v,error:O,refetch:S,pagination:b}=Os({page:i,perPage:Fs}),h=$s(),[L,f]=l.useState(null),[w,R]=l.useState(null),F=l.useRef(new Map),P=l.useRef(null);l.useEffect(()=>{h.isPending||P.current===null||(F.current.get(P.current)?.focus(),P.current=null)},[h.isPending]);const g=Ot(c.trim()),I=l.useMemo(()=>g?m.filter(y=>ae(y.name).toLowerCase().includes(g)||(y.description??"").toLowerCase().includes(g)):m,[m,g]),j=y=>{h.isPending||(f(null),R(y.id),P.current=y.id,h.mutate({teamId:y.id,name:y.name},{onSettled:()=>R(null),onError:()=>f(y.id)}))},k=l.useMemo(()=>{if(!Ps(h.error))return null;const y=m.find($=>$.id===L);return Rs({code:h.error.code,message:h.error.message,details:h.error.details},{name:y?.name??"this team",hubAgentId:null,surface:"pull"})},[h.error,L,m]),N=k?.body??(ct(h.error)==="unauthorized"?t("ui.hub.teams.public.pull_no_signin"):t("ui.hub.teams.public.pull_failed")),[u,x]=l.useState(!1),A=(y,$)=>{switch(y){case"refresh-hub":S();break;case"retry":j($);break;case"sign-in":x(!0);break}},D=E&&m.length===0,V=b?.totalRecords??m.length,M=l.useRef(null),U=y=>{const $=c!=="";d(y),$&&y===""&&M.current?.focus()};return e.jsxs("section",{"aria-label":t("ui.hub.teams.public.aria"),className:"flex flex-col","data-testid":"agent-hub-public-teams",children:[e.jsx("h2",{className:"sr-only",children:t("ui.hub.teams.public.aria")}),e.jsx("p",{className:"mb-3 max-w-3xl text-body-sm text-ink-muted",children:t("ui.hub.teams.public.intro")}),s?null:e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2","data-testid":"agent-hub-public-teams-signed-out",children:[e.jsx("span",{className:"text-meta text-ink-dim",children:t("ui.hub.teams.public.sign_in_hint")}),e.jsx(C,{variant:"secondary",size:"sm",onClick:a,children:t("ui.hub.teams.public.open_settings")})]}),e.jsx("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:e.jsxs("div",{className:B("flex min-w-56 max-w-md flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(Cs,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(ye,{ref:M,type:"search",value:c,onChange:y=>U(y.target.value),placeholder:t("ui.hub.teams.public.search_placeholder"),"aria-label":t("ui.hub.teams.public.search_aria"),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-public-teams-search"})]})}),D&&e.jsxs("div",{"aria-hidden":"true",className:"flex max-w-4xl flex-col gap-3","data-testid":"agent-hub-public-teams-loading",children:[e.jsx($e,{}),e.jsx($e,{}),e.jsx($e,{})]}),!D&&v&&e.jsxs(me,{variant:"danger",className:"w-auto max-w-2xl","data-testid":"agent-hub-public-teams-error",children:[e.jsx(he,{children:t("ui.hub.teams.public.load_failed")}),e.jsx(xe,{children:Qs(t("ui.hub.teams.public.catalogue_unreadable"),O)}),e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void S(),disabled:p,"aria-busy":p,children:p?t("ui.hub.teams.public.trying"):t("ui.common.actions.retry_again")})})]}),!D&&!v&&m.length===0&&e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-empty",children:t("ui.hub.teams.public.empty")}),!D&&!v&&m.length>0&&e.jsxs(e.Fragment,{children:[!g||I.length>0?e.jsxs("p",{className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-public-teams-status",children:[g?t("ui.hub.teams.public.match_line",{visible:String(I.length),total:m.length,query:c.trim()}):t("ui.hub.pages.status.count.teams",{count:V,scope:t("ui.hub.pages.status.scope.public")}),g?e.jsxs("span",{className:"text-ink-dim",children:[" ",t("ui.hub.teams.public.search_scope")]}):null]}):null,I.length===0?e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-search-miss",children:t("ui.hub.teams.public.search_miss",{query:c.trim()})}):e.jsx("ul",{className:"flex max-w-4xl flex-col gap-3",children:I.map(y=>e.jsx(qa,{team:y,pulling:w===y.id,pullPending:h.isPending,onPull:j,pullButtonRef:$=>{$?F.current.set(y.id,$):F.current.delete(y.id)},failed:L===y.id,failureBody:N,treatment:k,onTreatmentAction:A,reauthenticating:u,onReauthenticated:()=>{x(!1),f(null),S()}},y.id))}),!g&&b&&b.totalPages>1&&e.jsx(We,{count:b.totalPages,page:b.page,onChange:y=>{n(y),M.current?.scrollIntoView({block:"nearest"})}})]})]})},qa=({team:s,pulling:a,pullPending:i,onPull:n,failed:c,failureBody:d,treatment:m,onTreatmentAction:E,reauthenticating:p,onReauthenticated:v,pullButtonRef:O})=>{X();const[S,b]=l.useState(!1),h=ma({teamId:S?s.id:void 0}),L=ae(s.name),f=qs(s),w=Hs(s),R=s.manager?.trim(),F=Us(s),P=(s.description??"").trim();return e.jsxs("li",{className:"rounded-md bg-surface p-4","data-testid":"agent-hub-public-team","data-team-name":s.name,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-baseline",children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:L}),f?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",f]}):null]}),P?e.jsx("p",{...ke,className:"mt-1 line-clamp-3 max-w-3xl select-text text-body-sm text-ink-muted",children:P}):e.jsx("p",{className:"mt-1 text-body-sm text-ink-dim",children:t("ui.hub.teams.no_description")}),e.jsxs("p",{className:"mt-2 flex flex-wrap items-baseline gap-x-2 text-meta",children:[R?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:t("ui.hub.teams.manager_label")}),e.jsx("span",{className:"text-ink-muted",children:R})]}):null,s.members.length===0?e.jsx("span",{className:"text-ink-dim",children:t("ui.hub.teams.no_members")}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:t("ui.hub.teams.member_count",{count:F})}),e.jsx(ne,{content:He(s),children:e.jsx("span",{className:"truncate text-ink-muted",children:He(s)})})]})]}),w?e.jsxs("p",{className:"mt-1 text-ink-dim text-meta",children:[t("ui.hub.teams.public.published_by")," ",e.jsx("span",{className:"text-ink-muted",children:w})]}):null]}),e.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-2",children:[e.jsx(C,{ref:O,variant:"secondary",size:"sm",onClick:()=>n(s),disabled:i,"aria-label":t("ui.hub.teams.pull_target",{name:L}),children:a?t("ui.hub.teams.pulling"):t("ui.hub.teams.pull")}),c&&e.jsxs("div",{className:"flex max-w-56 flex-col items-end gap-1","data-testid":"agent-hub-public-team-pull-error",children:[e.jsx("output",{className:"text-right text-meta text-danger",children:d}),m?.actions.filter(g=>$a.includes(g)).map(g=>e.jsx(C,{variant:"primary",size:"sm",onClick:()=>E(g,s),children:le[g]},g)),p&&e.jsx("div",{"data-testid":"agent-hub-public-team-pull-reauth",children:e.jsx(zs,{titleText:le["sign-in"],descriptionText:"",onSignInSuccess:v})})]})]})]}),e.jsx("div",{className:"mt-2",children:e.jsx(Ts,{summary:t("ui.hub.teams.brief.trigger"),open:S,onOpenChange:b,className:"w-full",triggerClassName:"w-full",triggerLabel:t("ui.hub.teams.brief.trigger_aria",{name:L}),chevronClassName:"text-ink-dim",children:e.jsx(Ha,{detail:h})})})]})},Ha=({detail:s})=>{if(X(),s.isLoading)return e.jsxs("div",{className:"flex flex-col gap-1","data-testid":"agent-hub-public-team-brief-loading",children:[e.jsx(T,{className:"h-[1lh] w-2/3"}),e.jsx(T,{className:"h-[2lh] w-full"})]});if(s.isError)return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx("output",{className:"text-meta text-danger",children:Qs(t("ui.hub.teams.brief.unreadable"),s.error)}),e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void s.refetch(),disabled:s.isFetching,"aria-busy":s.isFetching,children:s.isFetching?t("ui.hub.teams.public.trying"):le.retry})]});const a=s.team;if(!a)return null;const i=(a.instructions??"").trim(),n=(a.project??"").trim();return e.jsxs("div",{className:"flex max-w-3xl flex-col gap-3 text-body-sm","data-testid":"agent-hub-public-team-brief",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:t("ui.hub.teams.brief.collaboration")}),i?e.jsx("p",{...ke,className:"whitespace-pre-line select-text text-ink-muted",children:i}):e.jsx("p",{className:"text-ink-dim",children:t("ui.hub.teams.brief.collaboration_empty")})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:t("ui.hub.teams.brief.project")}),n?e.jsx("p",{...ke,className:"whitespace-pre-line select-text text-ink-muted",children:n}):e.jsx("p",{className:"text-ink-dim",children:t("ui.hub.teams.brief.project_empty")})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:t("ui.hub.teams.brief.roster")}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[a.manager?.trim()?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:a.manager.trim()}),e.jsx("span",{className:"text-ink-dim text-meta",children:t("ui.hub.teams.manager")})]}):null,a.members.length===0?e.jsx("li",{className:"text-ink-dim",children:t("ui.hub.teams.no_members")}):a.members.map(c=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:c.count>1?`${c.role} ×${c.count}`:c.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:c.kind})]},`${c.kind}:${c.role}`))]})]})]})},$e=()=>e.jsxs("div",{className:"rounded-md bg-surface p-4",children:[e.jsx(T,{className:"h-[1lh] w-1/3"}),e.jsx(T,{className:"mt-1 flex h-[3lh] w-full"}),e.jsx(T,{className:"mt-2 h-[1lh] w-2/3"})]}),Ba=(s,a)=>{const[i,n]=l.useState(s);return l.useEffect(()=>{const c=setTimeout(()=>n(s),a);return()=>clearTimeout(c)},[s,a]),i},je=[{value:"download_count:desc",label:"ui.hub.pages.sort.most_downloaded",sort:"download_count",order:"desc"},{value:"like_count:desc",label:"ui.hub.pages.sort.most_liked",sort:"like_count",order:"desc"},{value:"favourite_count:desc",label:"ui.hub.pages.sort.most_favourited",sort:"favourite_count",order:"desc"},{value:"created_at:desc",label:"ui.hub.pages.sort.newest",sort:"created_at",order:"desc"},{value:"updated_at:desc",label:"ui.hub.pages.sort.recently_updated",sort:"updated_at",order:"desc"},{value:"name:asc",label:"ui.hub.pages.sort.name_asc",sort:"name",order:"asc"}],Va=[{value:"name",label:"ui.hub.pages.search_field.name"},{value:"description",label:"ui.hub.pages.search_field.description"}],Qa=300,H="public",Ns={agents:"agent-hub-view-agents",teams:"agent-hub-view-teams",skills:"agent-hub-view-skills"},vs="agent-hub-view-panel",Wa=()=>e.jsxs("div",{className:"flex h-full flex-col overflow-hidden rounded-md bg-surface",children:[e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 p-4",children:[e.jsx(T,{className:"h-5.5 w-2/3"}),e.jsx(T,{className:"h-3.5 w-full"}),e.jsx(T,{className:"h-3.5 w-full"}),e.jsx(T,{className:"h-3.5 w-1/2"}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{className:"h-5.5 w-24"}),e.jsx(T,{className:"h-5.5 w-20"})]}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsx(T,{className:"h-5.5 w-24"})})]}),e.jsx(T,{className:"h-4.5 w-32"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 border-t border-hairline px-3 py-2",children:[e.jsx(T,{className:"size-4"}),e.jsx(T,{className:"h-4 w-6"}),e.jsx(T,{className:"size-4"}),e.jsx(T,{className:"h-4 w-6"}),e.jsx(T,{className:"ml-auto h-7 w-16"})]})]}),di=()=>{const s=ys(),{isAuthenticated:a}=Qe(),[i,n]=l.useState(1),[c]=l.useState(12),[d,m]=l.useState(null),[E,p]=l.useState(""),[v,O]=l.useState("name"),[S,b]=l.useState(je[0].value),[h,L]=l.useState(H),[f,w]=l.useState("agents");X();const[R,F]=l.useState([]),P=Ba(E,Qa),g=je.find(r=>r.value===S)??je[0],I=_s(),j=!I.isError&&Ue(I.data,"hub_skills"),k=f==="skills"&&!j?"agents":f;l.useEffect(()=>{f==="skills"&&!j&&w("agents")},[f,j]);const N=yt(),u=ut(I.data,"radient_org"),x=a?xa(u,N??null):null,{memberships:A}=Gt({enabled:De(u)}),D=l.useMemo(()=>ha(A),[A]),V=h===H||D.some(r=>r.tenant_id===h);l.useEffect(()=>{!V&&k!=="skills"&&L(H)},[V,k]);const M=h===H?null:D.find(r=>r.tenant_id===h)??null,U=M?.tenant_id,y=M?.tenant_name||null,$=d!==null||P!=="",se=Ms({tenantId:U}),te=Os({page:1,perPage:Fs,enabled:h===H}),re=U&&se.isSuccess?se.teams.length:null,be=te.isSuccess?te.pagination?.totalRecords??null:null,Q=$?null:h===H?be:re,_=h===H?{visibility:"public",tenantId:null}:{visibility:"org",tenantId:h},pe=V&&(h===H||De(u)),ce=Ls(_,1,j&&pe&&(h===H||a)),ee=ce.isSuccess?ce.data.total:null,we=M?.role==="owner"||M?.role==="admin",ue=l.useMemo(()=>new Map(A.map(r=>[r.tenant_id,r.tenant_name])),[A]),{data:ie,agents:_e,isLoading:Se,isFetching:W,error:G,refetch:oe,pagination:q}=St({page:i,perPage:c,categories:d?[d]:void 0,name:v==="name"&&P||void 0,description:v==="description"&&P||void 0,sort:g.sort,order:g.order,tenantId:U}),o=M?Es(G):null,z=_e??[],J=W&&ie!==void 0,{statuses:de,isKnown:ge,isError:Ws,isFetching:Ce,refetch:Ks}=Ft({agentIds:U?[]:z.map(r=>r.id)}),Pe=l.useRef(null),Te=l.useRef(null),[Ke,Ys]=l.useState(0);l.useEffect(()=>{Ke!==0&&(Pe.current??Te.current)?.focus()},[Ke]);const Ye=l.useRef(null),Re=l.useRef(!1),Ie=l.useMemo(()=>[...new Set((ie?.records??[]).flatMap(r=>r.categories??[]))],[ie]);l.useEffect(()=>{F(r=>Ie.every(Y=>r.includes(Y))?r:[...new Set([...r,...Ie])])},[Ie]);const Gs=()=>{m(null),p(""),n(1),Ys(r=>r+1)},K=(Se||W)&&ie===void 0,Ge=!K&&!$&&(G!==null||z.length===0);l.useEffect(()=>{!Re.current||K||(Re.current=!1,G?Ye.current?.focus():(Pe.current??Te.current)?.focus())},[K,G]);const Je=l.useRef(null),Js=r=>{n(r),Je.current?.scrollIntoView({block:"nearest"})},Xs=r=>{m(r),n(1)},Zs=r=>{p(r),n(1)},et=r=>{L(r),n(1)},Xe=l.useRef(new Map),st=r=>{O(r),n(1)},tt=q&&!$?q.totalRecords:null,fe=U?t("ui.hub.pages.status.scope.shared_with",{org:y??t("ui.hub.pages.scope.org_unnamed")}):t("ui.hub.pages.status.scope.public"),Ze=(r,Y)=>Y==="team"?t("ui.hub.pages.status.count.teams",{count:r,scope:fe}):t("ui.hub.pages.status.count.agents",{count:r,scope:fe});let Z;return k==="skills"?Z=" ":k==="teams"?U?se.isLoading?Z=t("ui.hub.pages.status.loading_teams"):Q!==null?Z=Ze(Q,"team"):Z=t("ui.hub.pages.status.teams_scope",{scope:fe}):Z=" ":K?Z=t("ui.hub.pages.status.loading_agents"):q?Z=Ze(q.totalRecords,"agent"):Z=t("ui.hub.pages.status.agents_scope",{scope:fe}),e.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[e.jsx(ot,{title:t("ui.hub.pages.header.title"),subtitle:t("ui.hub.pages.header.subtitle"),icon:Jt}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[x&&e.jsxs(me,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-unavailable",children:[e.jsx(he,{children:t("ui.hub.pages.orgs_unavailable")}),e.jsx(xe,{children:x})]}),e.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-x-4 gap-y-2","data-testid":"agent-hub-browse-bar",children:[e.jsx(ht,{value:k,onValueChange:r=>w(r),children:e.jsx(xt,{"aria-label":t("ui.hub.pages.browse_aria"),children:["agents","teams",...j?["skills"]:[]].map(r=>{const Y=r==="agents"?tt:r==="teams"?Q:ee;return e.jsxs(bt,{value:r,id:Ns[r],"aria-controls":k===r?vs:void 0,"data-testid":`agent-hub-view-${r}`,children:[r==="agents"?t("ui.hub.pages.tab.agents"):r==="teams"?t("ui.hub.pages.tab.teams"):t("ui.hub.skills.title"),Y!==null&&e.jsx("span",{className:"min-w-[2ch] font-normal text-ink-dim tabular-nums",children:Y})]},r)})})}),D.length>0&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-2",children:[e.jsx("span",{"aria-hidden":"true",className:"text-meta text-ink-muted",children:t("ui.hub.pages.scope_label")}),e.jsxs("fieldset",{className:"m-0 min-w-0 border-0 p-0","data-testid":"agent-hub-scope",children:[e.jsx("legend",{className:"sr-only",children:t("ui.hub.pages.scope_legend")}),e.jsx("div",{className:"flex flex-wrap gap-0.5 rounded-md bg-sunken p-0.5",children:[{value:H,label:t("ui.hub.pages.scope.public"),Icon:wt},...D.map(r=>({value:r.tenant_id,label:r.tenant_name||t("ui.hub.pages.scope.org_label"),Icon:ba}))].map(({value:r,label:Y,Icon:at})=>e.jsxs(C,{ref:es=>{es?Xe.current.set(r,es):Xe.current.delete(r)},variant:"ghost",size:"sm","aria-pressed":h===r,onClick:()=>et(r),title:Y,"data-testid":`agent-hub-scope-${r===H?"public":`org-${r}`}`,className:B("max-w-48",h===r&&"bg-surface text-ink hover:bg-surface"),children:[e.jsx(at,{"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:Y})]},r))})]})]})]}),e.jsx(pt,{id:vs,labelledBy:Ns[k],children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row overflow-hidden",children:[k==="agents"&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"mr-6 hidden w-60 shrink-0 rounded-md bg-surface p-2 md:block","data-glass-region":"panel","data-tour-tag":"agent-hub-sidebar-container",children:!Ge&&e.jsx(Na,{selectedCategory:d,onSelectCategory:Xs,categories:R})})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-y-auto",children:[k==="agents"&&!Ge&&e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:B("flex min-w-56 flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(ye,{ref:Pe,type:"search",value:E,onChange:r=>Zs(r.target.value),placeholder:t("ui.hub.pages.search.placeholder"),"aria-label":t("ui.hub.pages.search.aria"),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-search"}),e.jsxs(ss,{value:v,onValueChange:st,children:[e.jsx(ts,{className:"w-auto shrink-0 border-y-0 border-l border-hairline border-r-0 bg-transparent pl-2 outline-none","aria-label":t("ui.hub.pages.search.scope_aria"),"data-testid":"agent-hub-search-scope",children:e.jsx(as,{})}),e.jsx(is,{children:Va.map(r=>e.jsx(ns,{value:r.value,children:t(r.label)},r.value))})]})]}),e.jsxs(ss,{value:S,onValueChange:b,children:[e.jsx(ts,{className:"w-48","aria-label":t("ui.hub.pages.sort.aria"),"data-testid":"agent-hub-sort",children:e.jsx(as,{})}),e.jsx(is,{children:je.map(r=>e.jsx(ns,{value:r.value,children:t(r.label)},r.value))})]})]}),e.jsxs("p",{ref:Je,"aria-live":"polite",className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-status",children:[Z,k==="agents"&&J?e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{"data-testid":"agent-hub-updating",children:t("ui.hub.pages.updating")})]}):null]}),k==="agents"&&e.jsxs(e.Fragment,{children:[a&&Ws&&e.jsxs("output",{className:"mb-3 flex flex-wrap items-center gap-2 text-meta text-warning","data-testid":"agent-hub-status-unknown",children:[e.jsx("span",{children:t("ui.hub.pages.viewer_unknown")}),e.jsx(C,{variant:"ghost",size:"sm",onClick:()=>void Ks(),disabled:Ce,"aria-busy":Ce,children:Ce?"Trying…":"Try again"})]}),K&&e.jsx("div",{"data-testid":"agent-hub-loading",className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6",children:Array.from({length:6},(r,Y)=>e.jsx(Wa,{},Y))}),K&&q===void 0&&e.jsx("div",{"aria-hidden":"true",className:"mt-6 flex min-h-13 items-center justify-center","data-testid":"agent-hub-pager-placeholder",children:e.jsx(T,{className:"h-4 w-24"})}),e.jsx("output",{"aria-live":"polite","data-testid":"agent-hub-outage",className:B(!K&&G&&!o?"block":"sr-only"),children:!K&&G&&!o&&e.jsxs(me,{variant:"danger",className:"max-w-2xl","aria-busy":W,"data-testid":"agent-hub-error",children:[e.jsx(he,{children:a?"The hub could not be loaded":"Sign in to use the hub"}),e.jsx(xe,{children:a?Ve("The agent list could not be loaded.",G):"You are not signed in to Radient, so the hub has no credential to read the agent list with. Sign in on the settings page, then try again."}),e.jsx("div",{className:"mt-2",children:e.jsx(C,{ref:Ye,variant:"outline",size:"sm",onClick:()=>{Re.current=!0,oe()},disabled:W,"aria-busy":W,children:W?"Trying…":"Try again"})})]})}),!K&&o&&M&&e.jsxs(me,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-no-access",children:[e.jsx(he,{children:o==="plan"?"That organization needs an active Team plan":"You do not have access to that organization"}),e.jsx(xe,{children:o==="plan"?`Sharing agents inside an organization is part of the Team plan. An owner of ${M.tenant_name||"this organization"} can activate it in the Radient console, and then its agents will be listed here.`:`You are not a member of ${M.tenant_name||"that organization"}, so its agents are not listed here. An owner can invite you again.`}),o==="plan"&&e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void oe(),disabled:W,"aria-busy":W,children:W?"Trying…":"Try again"})})]}),!K&&!G&&e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6","aria-busy":J,children:z.length===0?e.jsxs("div",{"data-testid":"agent-hub-empty",className:B("col-span-full w-full flex flex-col items-center gap-2 rounded-md bg-surface px-6 py-10 text-center",!U&&"max-w-2xl justify-self-center"),children:[e.jsx("p",{className:"text-heading text-ink",children:U?"This organization has no shared agents yet.":d?`No agents in ${Is(d).label}.`:$?"No agents match that search.":"The hub is empty."}),e.jsx("p",{className:"max-w-md text-body-sm text-ink-muted",children:U?`Agents published into ${M?.tenant_name||"this organization"} appear here for its members.`:d?"Nothing in this category yet. Clear the filter to see the whole hub.":$?"No agent's name or description carries that. Clear it to see the whole hub.":"Nobody has published an agent yet. Yours could be the first."}),e.jsx("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:$?e.jsx(C,{variant:"secondary",onClick:Gs,children:d?"Clear filter":"Clear search"}):U&&!we?null:e.jsx(C,{ref:Te,variant:"secondary",onClick:()=>s("/agents"),children:t("ui.hub.pages.publish")})})]}):z.map(r=>e.jsx(ja,{agent:r,status:a?de[r.id]:void 0,viewerStateKnown:a&&zt(ge,de,r.id),orgName:r.visibility==="org"?ue.get(r.tenant_id)??null:null},r.id))}),!K&&q&&q.totalPages>1&&e.jsx(We,{count:q.totalPages,page:q.page,onChange:Js})]}),k==="skills"&&(j?e.jsx(wa,{scope:h===H?{visibility:"public",tenantId:null,organization:null}:{visibility:"org",tenantId:h,organization:y},signedIn:a,accessible:V&&(h===H||De(u))},`skills:${h}`):e.jsx("p",{className:"text-body-sm text-warning",children:t("ui.hub.skills.unavailable")})),k==="teams"&&(M?e.jsx(Oa,{tenantId:M.tenant_id,orgName:y}):e.jsx(Ua,{signedIn:a,onOpenSettings:()=>s("/settings")}))]})]})})]})]})};export{di as AgentHubPage};
|