@agent-native/dispatch 0.1.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/README.md +220 -0
- package/dist/actions/approve-dispatch-change.d.ts +3 -0
- package/dist/actions/approve-dispatch-change.d.ts.map +1 -0
- package/dist/actions/approve-dispatch-change.js +11 -0
- package/dist/actions/approve-dispatch-change.js.map +1 -0
- package/dist/actions/approve-vault-request.d.ts +3 -0
- package/dist/actions/approve-vault-request.d.ts.map +1 -0
- package/dist/actions/approve-vault-request.js +16 -0
- package/dist/actions/approve-vault-request.js.map +1 -0
- package/dist/actions/create-link-token.d.ts +3 -0
- package/dist/actions/create-link-token.d.ts.map +1 -0
- package/dist/actions/create-link-token.js +11 -0
- package/dist/actions/create-link-token.js.map +1 -0
- package/dist/actions/create-vault-grant.d.ts +3 -0
- package/dist/actions/create-vault-grant.d.ts.map +1 -0
- package/dist/actions/create-vault-grant.js +14 -0
- package/dist/actions/create-vault-grant.js.map +1 -0
- package/dist/actions/create-vault-secret.d.ts +3 -0
- package/dist/actions/create-vault-secret.d.ts.map +1 -0
- package/dist/actions/create-vault-secret.js +20 -0
- package/dist/actions/create-vault-secret.js.map +1 -0
- package/dist/actions/create-workspace-resource-grant.d.ts +3 -0
- package/dist/actions/create-workspace-resource-grant.d.ts.map +1 -0
- package/dist/actions/create-workspace-resource-grant.js +14 -0
- package/dist/actions/create-workspace-resource-grant.js.map +1 -0
- package/dist/actions/create-workspace-resource.d.ts +3 -0
- package/dist/actions/create-workspace-resource.d.ts.map +1 -0
- package/dist/actions/create-workspace-resource.js +24 -0
- package/dist/actions/create-workspace-resource.js.map +1 -0
- package/dist/actions/delete-destination.d.ts +3 -0
- package/dist/actions/delete-destination.d.ts.map +1 -0
- package/dist/actions/delete-destination.js +11 -0
- package/dist/actions/delete-destination.js.map +1 -0
- package/dist/actions/delete-vault-secret.d.ts +3 -0
- package/dist/actions/delete-vault-secret.d.ts.map +1 -0
- package/dist/actions/delete-vault-secret.js +11 -0
- package/dist/actions/delete-vault-secret.js.map +1 -0
- package/dist/actions/delete-workspace-resource.d.ts +3 -0
- package/dist/actions/delete-workspace-resource.d.ts.map +1 -0
- package/dist/actions/delete-workspace-resource.js +11 -0
- package/dist/actions/delete-workspace-resource.js.map +1 -0
- package/dist/actions/deny-vault-request.d.ts +3 -0
- package/dist/actions/deny-vault-request.d.ts.map +1 -0
- package/dist/actions/deny-vault-request.js +12 -0
- package/dist/actions/deny-vault-request.js.map +1 -0
- package/dist/actions/get-app-creation-settings.d.ts +3 -0
- package/dist/actions/get-app-creation-settings.d.ts.map +1 -0
- package/dist/actions/get-app-creation-settings.js +10 -0
- package/dist/actions/get-app-creation-settings.js.map +1 -0
- package/dist/actions/get-dispatch-settings.d.ts +3 -0
- package/dist/actions/get-dispatch-settings.d.ts.map +1 -0
- package/dist/actions/get-dispatch-settings.js +10 -0
- package/dist/actions/get-dispatch-settings.js.map +1 -0
- package/dist/actions/get-workspace-info.d.ts +3 -0
- package/dist/actions/get-workspace-info.d.ts.map +1 -0
- package/dist/actions/get-workspace-info.js +10 -0
- package/dist/actions/get-workspace-info.js.map +1 -0
- package/dist/actions/grant-vault-secrets-to-app.d.ts +3 -0
- package/dist/actions/grant-vault-secrets-to-app.d.ts.map +1 -0
- package/dist/actions/grant-vault-secrets-to-app.js +19 -0
- package/dist/actions/grant-vault-secrets-to-app.js.map +1 -0
- package/dist/actions/index.d.ts +9 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +101 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/list-connected-agents.d.ts +3 -0
- package/dist/actions/list-connected-agents.d.ts.map +1 -0
- package/dist/actions/list-connected-agents.js +79 -0
- package/dist/actions/list-connected-agents.js.map +1 -0
- package/dist/actions/list-destinations.d.ts +3 -0
- package/dist/actions/list-destinations.d.ts.map +1 -0
- package/dist/actions/list-destinations.js +10 -0
- package/dist/actions/list-destinations.js.map +1 -0
- package/dist/actions/list-dispatch-approvals.d.ts +3 -0
- package/dist/actions/list-dispatch-approvals.d.ts.map +1 -0
- package/dist/actions/list-dispatch-approvals.js +10 -0
- package/dist/actions/list-dispatch-approvals.js.map +1 -0
- package/dist/actions/list-dispatch-audit.d.ts +3 -0
- package/dist/actions/list-dispatch-audit.d.ts.map +1 -0
- package/dist/actions/list-dispatch-audit.js +12 -0
- package/dist/actions/list-dispatch-audit.js.map +1 -0
- package/dist/actions/list-dispatch-overview.d.ts +3 -0
- package/dist/actions/list-dispatch-overview.d.ts.map +1 -0
- package/dist/actions/list-dispatch-overview.js +17 -0
- package/dist/actions/list-dispatch-overview.js.map +1 -0
- package/dist/actions/list-integrations-catalog.d.ts +3 -0
- package/dist/actions/list-integrations-catalog.d.ts.map +1 -0
- package/dist/actions/list-integrations-catalog.js +10 -0
- package/dist/actions/list-integrations-catalog.js.map +1 -0
- package/dist/actions/list-linked-identities.d.ts +3 -0
- package/dist/actions/list-linked-identities.d.ts.map +1 -0
- package/dist/actions/list-linked-identities.js +10 -0
- package/dist/actions/list-linked-identities.js.map +1 -0
- package/dist/actions/list-vault-audit.d.ts +3 -0
- package/dist/actions/list-vault-audit.d.ts.map +1 -0
- package/dist/actions/list-vault-audit.js +15 -0
- package/dist/actions/list-vault-audit.js.map +1 -0
- package/dist/actions/list-vault-grants.d.ts +3 -0
- package/dist/actions/list-vault-grants.d.ts.map +1 -0
- package/dist/actions/list-vault-grants.js +13 -0
- package/dist/actions/list-vault-grants.js.map +1 -0
- package/dist/actions/list-vault-requests.d.ts +3 -0
- package/dist/actions/list-vault-requests.d.ts.map +1 -0
- package/dist/actions/list-vault-requests.js +15 -0
- package/dist/actions/list-vault-requests.js.map +1 -0
- package/dist/actions/list-vault-secret-options.d.ts +3 -0
- package/dist/actions/list-vault-secret-options.d.ts.map +1 -0
- package/dist/actions/list-vault-secret-options.js +19 -0
- package/dist/actions/list-vault-secret-options.js.map +1 -0
- package/dist/actions/list-vault-secrets.d.ts +3 -0
- package/dist/actions/list-vault-secrets.d.ts.map +1 -0
- package/dist/actions/list-vault-secrets.js +25 -0
- package/dist/actions/list-vault-secrets.js.map +1 -0
- package/dist/actions/list-workspace-apps.d.ts +3 -0
- package/dist/actions/list-workspace-apps.d.ts.map +1 -0
- package/dist/actions/list-workspace-apps.js +24 -0
- package/dist/actions/list-workspace-apps.js.map +1 -0
- package/dist/actions/list-workspace-resource-grants.d.ts +3 -0
- package/dist/actions/list-workspace-resource-grants.d.ts.map +1 -0
- package/dist/actions/list-workspace-resource-grants.js +13 -0
- package/dist/actions/list-workspace-resource-grants.js.map +1 -0
- package/dist/actions/list-workspace-resources.d.ts +3 -0
- package/dist/actions/list-workspace-resources.d.ts.map +1 -0
- package/dist/actions/list-workspace-resources.js +15 -0
- package/dist/actions/list-workspace-resources.js.map +1 -0
- package/dist/actions/navigate.d.ts +16 -0
- package/dist/actions/navigate.d.ts.map +1 -0
- package/dist/actions/navigate.js +55 -0
- package/dist/actions/navigate.js.map +1 -0
- package/dist/actions/reject-dispatch-change.d.ts +3 -0
- package/dist/actions/reject-dispatch-change.d.ts.map +1 -0
- package/dist/actions/reject-dispatch-change.js +12 -0
- package/dist/actions/reject-dispatch-change.js.map +1 -0
- package/dist/actions/request-vault-secret.d.ts +3 -0
- package/dist/actions/request-vault-secret.d.ts.map +1 -0
- package/dist/actions/request-vault-secret.js +15 -0
- package/dist/actions/request-vault-secret.js.map +1 -0
- package/dist/actions/revoke-vault-grant.d.ts +3 -0
- package/dist/actions/revoke-vault-grant.d.ts.map +1 -0
- package/dist/actions/revoke-vault-grant.js +11 -0
- package/dist/actions/revoke-vault-grant.js.map +1 -0
- package/dist/actions/revoke-workspace-resource-grant.d.ts +3 -0
- package/dist/actions/revoke-workspace-resource-grant.d.ts.map +1 -0
- package/dist/actions/revoke-workspace-resource-grant.js +11 -0
- package/dist/actions/revoke-workspace-resource-grant.js.map +1 -0
- package/dist/actions/send-platform-message.d.ts +3 -0
- package/dist/actions/send-platform-message.d.ts.map +1 -0
- package/dist/actions/send-platform-message.js +73 -0
- package/dist/actions/send-platform-message.js.map +1 -0
- package/dist/actions/set-app-creation-settings.d.ts +3 -0
- package/dist/actions/set-app-creation-settings.d.ts.map +1 -0
- package/dist/actions/set-app-creation-settings.js +18 -0
- package/dist/actions/set-app-creation-settings.js.map +1 -0
- package/dist/actions/set-dispatch-approval-policy.d.ts +3 -0
- package/dist/actions/set-dispatch-approval-policy.d.ts.map +1 -0
- package/dist/actions/set-dispatch-approval-policy.js +19 -0
- package/dist/actions/set-dispatch-approval-policy.js.map +1 -0
- package/dist/actions/start-workspace-app-creation.d.ts +3 -0
- package/dist/actions/start-workspace-app-creation.d.ts.map +1 -0
- package/dist/actions/start-workspace-app-creation.js +31 -0
- package/dist/actions/start-workspace-app-creation.js.map +1 -0
- package/dist/actions/sync-vault-to-app.d.ts +3 -0
- package/dist/actions/sync-vault-to-app.d.ts.map +1 -0
- package/dist/actions/sync-vault-to-app.js +13 -0
- package/dist/actions/sync-vault-to-app.js.map +1 -0
- package/dist/actions/sync-workspace-resources-to-all.d.ts +3 -0
- package/dist/actions/sync-workspace-resources-to-all.d.ts.map +1 -0
- package/dist/actions/sync-workspace-resources-to-all.js +9 -0
- package/dist/actions/sync-workspace-resources-to-all.js.map +1 -0
- package/dist/actions/sync-workspace-resources-to-app.d.ts +3 -0
- package/dist/actions/sync-workspace-resources-to-app.d.ts.map +1 -0
- package/dist/actions/sync-workspace-resources-to-app.js +11 -0
- package/dist/actions/sync-workspace-resources-to-app.js.map +1 -0
- package/dist/actions/update-vault-secret.d.ts +3 -0
- package/dist/actions/update-vault-secret.d.ts.map +1 -0
- package/dist/actions/update-vault-secret.js +12 -0
- package/dist/actions/update-vault-secret.js.map +1 -0
- package/dist/actions/update-workspace-resource.d.ts +3 -0
- package/dist/actions/update-workspace-resource.d.ts.map +1 -0
- package/dist/actions/update-workspace-resource.js +18 -0
- package/dist/actions/update-workspace-resource.js.map +1 -0
- package/dist/actions/upsert-destination.d.ts +3 -0
- package/dist/actions/upsert-destination.d.ts.map +1 -0
- package/dist/actions/upsert-destination.js +26 -0
- package/dist/actions/upsert-destination.js.map +1 -0
- package/dist/actions/view-screen.d.ts +11 -0
- package/dist/actions/view-screen.d.ts.map +1 -0
- package/dist/actions/view-screen.js +68 -0
- package/dist/actions/view-screen.js.map +1 -0
- package/dist/components/agents-panel.d.ts +16 -0
- package/dist/components/agents-panel.d.ts.map +1 -0
- package/dist/components/agents-panel.js +64 -0
- package/dist/components/agents-panel.js.map +1 -0
- package/dist/components/app-keys-popover.d.ts +11 -0
- package/dist/components/app-keys-popover.d.ts.map +1 -0
- package/dist/components/app-keys-popover.js +84 -0
- package/dist/components/app-keys-popover.js.map +1 -0
- package/dist/components/create-app-popover.d.ts +24 -0
- package/dist/components/create-app-popover.d.ts.map +1 -0
- package/dist/components/create-app-popover.js +188 -0
- package/dist/components/create-app-popover.js.map +1 -0
- package/dist/components/dispatch-shell.d.ts +13 -0
- package/dist/components/dispatch-shell.d.ts.map +1 -0
- package/dist/components/dispatch-shell.js +15 -0
- package/dist/components/dispatch-shell.js.map +1 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +12 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/layout/Header.d.ts +5 -0
- package/dist/components/layout/Header.d.ts.map +1 -0
- package/dist/components/layout/Header.js +34 -0
- package/dist/components/layout/Header.js.map +1 -0
- package/dist/components/layout/HeaderActions.d.ts +18 -0
- package/dist/components/layout/HeaderActions.d.ts.map +1 -0
- package/dist/components/layout/HeaderActions.js +52 -0
- package/dist/components/layout/HeaderActions.js.map +1 -0
- package/dist/components/layout/Layout.d.ts +8 -0
- package/dist/components/layout/Layout.d.ts.map +1 -0
- package/dist/components/layout/Layout.js +70 -0
- package/dist/components/layout/Layout.js.map +1 -0
- package/dist/components/messaging-setup-panel.d.ts +2 -0
- package/dist/components/messaging-setup-panel.d.ts.map +1 -0
- package/dist/components/messaging-setup-panel.js +300 -0
- package/dist/components/messaging-setup-panel.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +14 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +27 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +23 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +4 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +12 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +21 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +20 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +24 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +34 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +41 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +17 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +99 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +80 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +131 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +9 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +6 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/command.d.ts +83 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +29 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +28 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +34 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +23 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +23 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +36 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/form.d.ts +24 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.js +63 -0
- package/dist/components/ui/form.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +10 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +35 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +19 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +9 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +10 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +29 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +41 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +25 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +29 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +24 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +10 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +8 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +15 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +9 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +12 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +27 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +8 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +26 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +37 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +67 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +233 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +7 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +8 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +25 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +7 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +8 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +21 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +13 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +6 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +9 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +16 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +34 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster.js +10 -0
- package/dist/components/ui/toaster.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +21 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +13 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +26 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +11 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/use-toast.d.ts +3 -0
- package/dist/components/ui/use-toast.d.ts.map +1 -0
- package/dist/components/ui/use-toast.js +3 -0
- package/dist/components/ui/use-toast.js.map +1 -0
- package/dist/config.d.ts +33 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -0
- package/dist/db/index.d.ts +7 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +10 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +5 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +166 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/schema.d.ts +2344 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +148 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-navigation-state.d.ts +6 -0
- package/dist/hooks/use-navigation-state.d.ts.map +1 -0
- package/dist/hooks/use-navigation-state.js +129 -0
- package/dist/hooks/use-navigation-state.js.map +1 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +127 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +2 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/routes/index.d.ts +32 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +51 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/pages/_index.d.ts +15 -0
- package/dist/routes/pages/_index.d.ts.map +1 -0
- package/dist/routes/pages/_index.js +42 -0
- package/dist/routes/pages/_index.js.map +1 -0
- package/dist/routes/pages/agents.d.ts +5 -0
- package/dist/routes/pages/agents.d.ts.map +1 -0
- package/dist/routes/pages/agents.js +12 -0
- package/dist/routes/pages/agents.js.map +1 -0
- package/dist/routes/pages/approval.d.ts +5 -0
- package/dist/routes/pages/approval.d.ts.map +1 -0
- package/dist/routes/pages/approval.js +47 -0
- package/dist/routes/pages/approval.js.map +1 -0
- package/dist/routes/pages/approvals.d.ts +5 -0
- package/dist/routes/pages/approvals.d.ts.map +1 -0
- package/dist/routes/pages/approvals.js +48 -0
- package/dist/routes/pages/approvals.js.map +1 -0
- package/dist/routes/pages/apps.$appId.d.ts +5 -0
- package/dist/routes/pages/apps.$appId.d.ts.map +1 -0
- package/dist/routes/pages/apps.$appId.js +31 -0
- package/dist/routes/pages/apps.$appId.js.map +1 -0
- package/dist/routes/pages/apps.d.ts +5 -0
- package/dist/routes/pages/apps.d.ts.map +1 -0
- package/dist/routes/pages/apps.js +42 -0
- package/dist/routes/pages/apps.js.map +1 -0
- package/dist/routes/pages/audit.d.ts +5 -0
- package/dist/routes/pages/audit.d.ts.map +1 -0
- package/dist/routes/pages/audit.js +11 -0
- package/dist/routes/pages/audit.js.map +1 -0
- package/dist/routes/pages/destinations.d.ts +5 -0
- package/dist/routes/pages/destinations.d.ts.map +1 -0
- package/dist/routes/pages/destinations.js +80 -0
- package/dist/routes/pages/destinations.js.map +1 -0
- package/dist/routes/pages/identities.d.ts +5 -0
- package/dist/routes/pages/identities.d.ts.map +1 -0
- package/dist/routes/pages/identities.js +18 -0
- package/dist/routes/pages/identities.js.map +1 -0
- package/dist/routes/pages/integrations.d.ts +5 -0
- package/dist/routes/pages/integrations.d.ts.map +1 -0
- package/dist/routes/pages/integrations.js +46 -0
- package/dist/routes/pages/integrations.js.map +1 -0
- package/dist/routes/pages/messaging.d.ts +5 -0
- package/dist/routes/pages/messaging.d.ts.map +1 -0
- package/dist/routes/pages/messaging.js +10 -0
- package/dist/routes/pages/messaging.js.map +1 -0
- package/dist/routes/pages/new-app.d.ts +5 -0
- package/dist/routes/pages/new-app.d.ts.map +1 -0
- package/dist/routes/pages/new-app.js +10 -0
- package/dist/routes/pages/new-app.js.map +1 -0
- package/dist/routes/pages/overview.d.ts +5 -0
- package/dist/routes/pages/overview.d.ts.map +1 -0
- package/dist/routes/pages/overview.js +225 -0
- package/dist/routes/pages/overview.js.map +1 -0
- package/dist/routes/pages/team.d.ts +5 -0
- package/dist/routes/pages/team.d.ts.map +1 -0
- package/dist/routes/pages/team.js +10 -0
- package/dist/routes/pages/team.js.map +1 -0
- package/dist/routes/pages/tools.$id.d.ts +2 -0
- package/dist/routes/pages/tools.$id.d.ts.map +1 -0
- package/dist/routes/pages/tools.$id.js +6 -0
- package/dist/routes/pages/tools.$id.js.map +1 -0
- package/dist/routes/pages/tools._index.d.ts +2 -0
- package/dist/routes/pages/tools._index.d.ts.map +1 -0
- package/dist/routes/pages/tools._index.js +6 -0
- package/dist/routes/pages/tools._index.js.map +1 -0
- package/dist/routes/pages/vault.d.ts +5 -0
- package/dist/routes/pages/vault.d.ts.map +1 -0
- package/dist/routes/pages/vault.js +131 -0
- package/dist/routes/pages/vault.js.map +1 -0
- package/dist/routes/pages/workspace.d.ts +5 -0
- package/dist/routes/pages/workspace.d.ts.map +1 -0
- package/dist/routes/pages/workspace.js +149 -0
- package/dist/routes/pages/workspace.js.map +1 -0
- package/dist/server/index.d.ts +44 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +68 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/lib/app-creation-store.d.ts +102 -0
- package/dist/server/lib/app-creation-store.d.ts.map +1 -0
- package/dist/server/lib/app-creation-store.js +780 -0
- package/dist/server/lib/app-creation-store.js.map +1 -0
- package/dist/server/lib/dispatch-integrations.d.ts +10 -0
- package/dist/server/lib/dispatch-integrations.d.ts.map +1 -0
- package/dist/server/lib/dispatch-integrations.js +105 -0
- package/dist/server/lib/dispatch-integrations.js.map +1 -0
- package/dist/server/lib/dispatch-store.d.ts +313 -0
- package/dist/server/lib/dispatch-store.d.ts.map +1 -0
- package/dist/server/lib/dispatch-store.js +669 -0
- package/dist/server/lib/dispatch-store.js.map +1 -0
- package/dist/server/lib/env-config.d.ts +3 -0
- package/dist/server/lib/env-config.d.ts.map +1 -0
- package/dist/server/lib/env-config.js +43 -0
- package/dist/server/lib/env-config.js.map +1 -0
- package/dist/server/lib/pre-auth-routing.d.ts +2 -0
- package/dist/server/lib/pre-auth-routing.d.ts.map +1 -0
- package/dist/server/lib/pre-auth-routing.js +128 -0
- package/dist/server/lib/pre-auth-routing.js.map +1 -0
- package/dist/server/lib/vault-store.d.ts +270 -0
- package/dist/server/lib/vault-store.d.ts.map +1 -0
- package/dist/server/lib/vault-store.js +554 -0
- package/dist/server/lib/vault-store.js.map +1 -0
- package/dist/server/lib/workspace-resources-store.d.ts +165 -0
- package/dist/server/lib/workspace-resources-store.d.ts.map +1 -0
- package/dist/server/lib/workspace-resources-store.js +310 -0
- package/dist/server/lib/workspace-resources-store.js.map +1 -0
- package/dist/server/plugins/agent-chat.d.ts +3 -0
- package/dist/server/plugins/agent-chat.d.ts.map +1 -0
- package/dist/server/plugins/agent-chat.js +36 -0
- package/dist/server/plugins/agent-chat.js.map +1 -0
- package/dist/server/plugins/auth.d.ts +9 -0
- package/dist/server/plugins/auth.d.ts.map +1 -0
- package/dist/server/plugins/auth.js +30 -0
- package/dist/server/plugins/auth.js.map +1 -0
- package/dist/server/plugins/core-routes.d.ts +3 -0
- package/dist/server/plugins/core-routes.d.ts.map +1 -0
- package/dist/server/plugins/core-routes.js +6 -0
- package/dist/server/plugins/core-routes.js.map +1 -0
- package/dist/server/plugins/db.d.ts +3 -0
- package/dist/server/plugins/db.d.ts.map +1 -0
- package/dist/server/plugins/db.js +6 -0
- package/dist/server/plugins/db.js.map +1 -0
- package/dist/server/plugins/integrations.d.ts +8 -0
- package/dist/server/plugins/integrations.d.ts.map +1 -0
- package/dist/server/plugins/integrations.js +51 -0
- package/dist/server/plugins/integrations.js.map +1 -0
- package/package.json +103 -0
- package/src/actions/approve-dispatch-change.ts +11 -0
- package/src/actions/approve-vault-request.ts +23 -0
- package/src/actions/create-link-token.ts +12 -0
- package/src/actions/create-vault-grant.ts +15 -0
- package/src/actions/create-vault-secret.ts +21 -0
- package/src/actions/create-workspace-resource-grant.ts +15 -0
- package/src/actions/create-workspace-resource.ts +29 -0
- package/src/actions/delete-destination.ts +11 -0
- package/src/actions/delete-vault-secret.ts +12 -0
- package/src/actions/delete-workspace-resource.ts +12 -0
- package/src/actions/deny-vault-request.ts +12 -0
- package/src/actions/get-app-creation-settings.ts +11 -0
- package/src/actions/get-dispatch-settings.ts +10 -0
- package/src/actions/get-workspace-info.ts +11 -0
- package/src/actions/grant-vault-secrets-to-app.ts +20 -0
- package/src/actions/index.ts +102 -0
- package/src/actions/list-connected-agents.ts +103 -0
- package/src/actions/list-destinations.ts +10 -0
- package/src/actions/list-dispatch-approvals.ts +10 -0
- package/src/actions/list-dispatch-audit.ts +12 -0
- package/src/actions/list-dispatch-overview.ts +18 -0
- package/src/actions/list-integrations-catalog.ts +11 -0
- package/src/actions/list-linked-identities.ts +10 -0
- package/src/actions/list-vault-audit.ts +16 -0
- package/src/actions/list-vault-grants.ts +14 -0
- package/src/actions/list-vault-requests.ts +16 -0
- package/src/actions/list-vault-secret-options.ts +20 -0
- package/src/actions/list-vault-secrets.ts +26 -0
- package/src/actions/list-workspace-apps.ts +25 -0
- package/src/actions/list-workspace-resource-grants.ts +14 -0
- package/src/actions/list-workspace-resources.ts +16 -0
- package/src/actions/navigate.ts +55 -0
- package/src/actions/reject-dispatch-change.ts +12 -0
- package/src/actions/request-vault-secret.ts +16 -0
- package/src/actions/revoke-vault-grant.ts +11 -0
- package/src/actions/revoke-workspace-resource-grant.ts +15 -0
- package/src/actions/send-platform-message.ts +96 -0
- package/src/actions/set-app-creation-settings.ts +19 -0
- package/src/actions/set-dispatch-approval-policy.ts +24 -0
- package/src/actions/start-workspace-app-creation.ts +33 -0
- package/src/actions/sync-vault-to-app.ts +14 -0
- package/src/actions/sync-workspace-resources-to-all.ts +10 -0
- package/src/actions/sync-workspace-resources-to-app.ts +12 -0
- package/src/actions/update-vault-secret.ts +12 -0
- package/src/actions/update-workspace-resource.ts +19 -0
- package/src/actions/upsert-destination.ts +29 -0
- package/src/actions/view-screen.ts +78 -0
- package/src/components/agents-panel.tsx +262 -0
- package/src/components/app-keys-popover.tsx +231 -0
- package/src/components/create-app-popover.tsx +423 -0
- package/src/components/dispatch-shell.tsx +53 -0
- package/src/components/index.ts +11 -0
- package/src/components/layout/Header.tsx +69 -0
- package/src/components/layout/HeaderActions.tsx +84 -0
- package/src/components/layout/Layout.tsx +243 -0
- package/src/components/messaging-setup-panel.tsx +666 -0
- package/src/components/ui/accordion.tsx +56 -0
- package/src/components/ui/alert-dialog.tsx +139 -0
- package/src/components/ui/alert.tsx +59 -0
- package/src/components/ui/aspect-ratio.tsx +5 -0
- package/src/components/ui/avatar.tsx +48 -0
- package/src/components/ui/badge.tsx +37 -0
- package/src/components/ui/breadcrumb.tsx +115 -0
- package/src/components/ui/button.tsx +57 -0
- package/src/components/ui/calendar.tsx +68 -0
- package/src/components/ui/card.tsx +86 -0
- package/src/components/ui/carousel.tsx +260 -0
- package/src/components/ui/chart.tsx +375 -0
- package/src/components/ui/checkbox.tsx +28 -0
- package/src/components/ui/collapsible.tsx +9 -0
- package/src/components/ui/command.tsx +154 -0
- package/src/components/ui/context-menu.tsx +198 -0
- package/src/components/ui/dialog.tsx +120 -0
- package/src/components/ui/drawer.tsx +116 -0
- package/src/components/ui/dropdown-menu.tsx +198 -0
- package/src/components/ui/form.tsx +177 -0
- package/src/components/ui/hover-card.tsx +27 -0
- package/src/components/ui/input-otp.tsx +69 -0
- package/src/components/ui/input.tsx +22 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/menubar.tsx +235 -0
- package/src/components/ui/navigation-menu.tsx +128 -0
- package/src/components/ui/pagination.tsx +121 -0
- package/src/components/ui/popover.tsx +29 -0
- package/src/components/ui/progress.tsx +26 -0
- package/src/components/ui/radio-group.tsx +42 -0
- package/src/components/ui/resizable.tsx +43 -0
- package/src/components/ui/scroll-area.tsx +46 -0
- package/src/components/ui/select.tsx +158 -0
- package/src/components/ui/separator.tsx +29 -0
- package/src/components/ui/sheet.tsx +139 -0
- package/src/components/ui/sidebar.tsx +778 -0
- package/src/components/ui/skeleton.tsx +15 -0
- package/src/components/ui/slider.tsx +26 -0
- package/src/components/ui/sonner.tsx +58 -0
- package/src/components/ui/spinner.tsx +17 -0
- package/src/components/ui/switch.tsx +27 -0
- package/src/components/ui/table.tsx +117 -0
- package/src/components/ui/tabs.tsx +53 -0
- package/src/components/ui/textarea.tsx +23 -0
- package/src/components/ui/toast.tsx +127 -0
- package/src/components/ui/toaster.tsx +33 -0
- package/src/components/ui/toggle-group.tsx +59 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +28 -0
- package/src/components/ui/use-toast.ts +3 -0
- package/src/config.ts +35 -0
- package/src/db/index.ts +12 -0
- package/src/db/migrations.ts +165 -0
- package/src/db/schema.ts +160 -0
- package/src/hooks/use-mobile.tsx +21 -0
- package/src/hooks/use-navigation-state.ts +132 -0
- package/src/hooks/use-toast.ts +188 -0
- package/src/index.ts +19 -0
- package/src/lib/utils.ts +1 -0
- package/src/routes/index.ts +51 -0
- package/src/routes/pages/_index.tsx +51 -0
- package/src/routes/pages/agents.tsx +23 -0
- package/src/routes/pages/approval.tsx +243 -0
- package/src/routes/pages/approvals.tsx +157 -0
- package/src/routes/pages/apps.$appId.tsx +134 -0
- package/src/routes/pages/apps.tsx +163 -0
- package/src/routes/pages/audit.tsx +41 -0
- package/src/routes/pages/destinations.tsx +253 -0
- package/src/routes/pages/identities.tsx +91 -0
- package/src/routes/pages/integrations.tsx +278 -0
- package/src/routes/pages/messaging.tsx +17 -0
- package/src/routes/pages/new-app.tsx +17 -0
- package/src/routes/pages/overview.tsx +792 -0
- package/src/routes/pages/team.tsx +23 -0
- package/src/routes/pages/tools.$id.tsx +5 -0
- package/src/routes/pages/tools._index.tsx +5 -0
- package/src/routes/pages/vault.tsx +617 -0
- package/src/routes/pages/workspace.tsx +598 -0
- package/src/server/index.ts +78 -0
- package/src/server/lib/app-creation-store.ts +996 -0
- package/src/server/lib/dispatch-integrations.ts +125 -0
- package/src/server/lib/dispatch-store.ts +889 -0
- package/src/server/lib/env-config.ts +44 -0
- package/src/server/lib/pre-auth-routing.ts +150 -0
- package/src/server/lib/vault-store.ts +811 -0
- package/src/server/lib/workspace-resources-store.ts +445 -0
- package/src/server/plugins/agent-chat.ts +36 -0
- package/src/server/plugins/auth.ts +34 -0
- package/src/server/plugins/core-routes.ts +6 -0
- package/src/server/plugins/db.ts +6 -0
- package/src/server/plugins/integrations.ts +59 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { syncResourcesToApp } from "../server/lib/workspace-resources-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description:
|
|
7
|
+
"Push all applicable workspace resources (skills, instructions, agents) to an app. Pushes scope=all resources plus any with active grants for this app.",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
appId: z.string().describe("App ID to sync resources to"),
|
|
10
|
+
}),
|
|
11
|
+
run: async (args) => syncResourcesToApp(args.appId),
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { updateSecret } from "../server/lib/vault-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description: "Update the value of an existing vault secret. Admin only.",
|
|
7
|
+
schema: z.object({
|
|
8
|
+
id: z.string().describe("Secret ID"),
|
|
9
|
+
value: z.string().describe("New secret value"),
|
|
10
|
+
}),
|
|
11
|
+
run: async (args) => updateSecret(args.id, args.value),
|
|
12
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { updateWorkspaceResource } from "../server/lib/workspace-resources-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description:
|
|
7
|
+
"Update a workspace resource's name, description, content, or scope.",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
id: z.string().describe("Resource ID"),
|
|
10
|
+
name: z.string().optional().describe("New name"),
|
|
11
|
+
description: z.string().optional().describe("New description"),
|
|
12
|
+
content: z.string().optional().describe("New content"),
|
|
13
|
+
scope: z.enum(["all", "selected"]).optional().describe("New scope"),
|
|
14
|
+
}),
|
|
15
|
+
run: async (args) => {
|
|
16
|
+
const { id, ...rest } = args;
|
|
17
|
+
return updateWorkspaceResource(id, rest);
|
|
18
|
+
},
|
|
19
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { upsertDestination } from "../server/lib/dispatch-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description:
|
|
7
|
+
"Create or update a saved messaging destination for proactive Slack, Telegram, or email sends.",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
id: z.string().optional(),
|
|
10
|
+
name: z.string().describe("Friendly destination name"),
|
|
11
|
+
platform: z
|
|
12
|
+
.enum(["slack", "telegram", "email"])
|
|
13
|
+
.describe("Destination platform"),
|
|
14
|
+
destination: z
|
|
15
|
+
.string()
|
|
16
|
+
.describe(
|
|
17
|
+
"Channel ID, chat ID, email address, or other platform destination id",
|
|
18
|
+
),
|
|
19
|
+
threadRef: z
|
|
20
|
+
.string()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe("Optional thread or topic reference"),
|
|
23
|
+
notes: z
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe("Optional notes about this destination"),
|
|
27
|
+
}),
|
|
28
|
+
run: async (args) => upsertDestination(args),
|
|
29
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* See what the user is currently looking at on screen.
|
|
3
|
+
*
|
|
4
|
+
* Reads and returns the current navigation state from application state.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* pnpm action view-screen
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { defineAction } from "@agent-native/core";
|
|
11
|
+
import { readAppState } from "@agent-native/core/application-state";
|
|
12
|
+
import { z } from "zod";
|
|
13
|
+
import { listOverview } from "../server/lib/dispatch-store.js";
|
|
14
|
+
import {
|
|
15
|
+
listVaultOverview,
|
|
16
|
+
listSecrets,
|
|
17
|
+
listGrants,
|
|
18
|
+
listRequests,
|
|
19
|
+
} from "../server/lib/vault-store.js";
|
|
20
|
+
import { listWorkspaceApps } from "../server/lib/app-creation-store.js";
|
|
21
|
+
|
|
22
|
+
export default defineAction({
|
|
23
|
+
description:
|
|
24
|
+
"See what the user is currently looking at in the dispatch UI, including navigation state and a compact operational summary.",
|
|
25
|
+
schema: z.object({}),
|
|
26
|
+
http: false,
|
|
27
|
+
run: async () => {
|
|
28
|
+
const [navigation, overview, vaultOverview] = await Promise.all([
|
|
29
|
+
readAppState("navigation"),
|
|
30
|
+
listOverview(),
|
|
31
|
+
listVaultOverview(),
|
|
32
|
+
]);
|
|
33
|
+
|
|
34
|
+
const screen: Record<string, unknown> = {
|
|
35
|
+
counts: { ...overview.counts, ...vaultOverview },
|
|
36
|
+
approvalPolicy: overview.settings,
|
|
37
|
+
};
|
|
38
|
+
if (navigation) screen.navigation = navigation;
|
|
39
|
+
if (navigation?.view === "overview") {
|
|
40
|
+
screen.recentAudit = overview.recentAudit.slice(0, 5);
|
|
41
|
+
screen.recentApprovals = overview.recentApprovals.slice(0, 5);
|
|
42
|
+
}
|
|
43
|
+
if (navigation?.view === "destinations") {
|
|
44
|
+
screen.recentDestinations = overview.recentDestinations;
|
|
45
|
+
}
|
|
46
|
+
if (
|
|
47
|
+
navigation?.view === "overview" ||
|
|
48
|
+
navigation?.view === "apps" ||
|
|
49
|
+
navigation?.view === "new-app"
|
|
50
|
+
) {
|
|
51
|
+
screen.workspaceApps = await listWorkspaceApps({
|
|
52
|
+
includeAgentCards: true,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (navigation?.view === "vault" || navigation?.view === "new-app") {
|
|
56
|
+
const [secrets, grants, requests] = await Promise.all([
|
|
57
|
+
listSecrets(),
|
|
58
|
+
listGrants(),
|
|
59
|
+
listRequests({ status: "pending" }),
|
|
60
|
+
]);
|
|
61
|
+
screen.vaultSecrets = secrets.map((s) => ({
|
|
62
|
+
id: s.id,
|
|
63
|
+
name: s.name,
|
|
64
|
+
credentialKey: s.credentialKey,
|
|
65
|
+
provider: s.provider,
|
|
66
|
+
}));
|
|
67
|
+
screen.vaultActiveGrants = grants
|
|
68
|
+
.filter((g) => g.status === "active")
|
|
69
|
+
.map((g) => ({ secretId: g.secretId, appId: g.appId }));
|
|
70
|
+
screen.vaultPendingRequests = requests;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (Object.keys(screen).length === 0) {
|
|
74
|
+
return "No application state found. Is the app running?";
|
|
75
|
+
}
|
|
76
|
+
return JSON.stringify(screen, null, 2);
|
|
77
|
+
},
|
|
78
|
+
});
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { useRef, useState } from "react";
|
|
2
|
+
import { Button } from "@/components/ui/button";
|
|
3
|
+
import { Input } from "@/components/ui/input";
|
|
4
|
+
import {
|
|
5
|
+
AlertDialog,
|
|
6
|
+
AlertDialogAction,
|
|
7
|
+
AlertDialogCancel,
|
|
8
|
+
AlertDialogContent,
|
|
9
|
+
AlertDialogDescription,
|
|
10
|
+
AlertDialogFooter,
|
|
11
|
+
AlertDialogHeader,
|
|
12
|
+
AlertDialogTitle,
|
|
13
|
+
AlertDialogTrigger,
|
|
14
|
+
} from "@/components/ui/alert-dialog";
|
|
15
|
+
import { IconExternalLink, IconTrash } from "@tabler/icons-react";
|
|
16
|
+
import { agentNativePath } from "@agent-native/core/client";
|
|
17
|
+
|
|
18
|
+
export interface ConnectedAgent {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
url: string;
|
|
23
|
+
color: string;
|
|
24
|
+
source: "builtin" | "custom" | "workspace";
|
|
25
|
+
resourceId?: string;
|
|
26
|
+
path?: string;
|
|
27
|
+
scope?: "shared" | "personal";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function AgentsPanel({
|
|
31
|
+
agents,
|
|
32
|
+
onRefresh,
|
|
33
|
+
}: {
|
|
34
|
+
agents: ConnectedAgent[];
|
|
35
|
+
onRefresh: () => void;
|
|
36
|
+
}) {
|
|
37
|
+
const [name, setName] = useState("");
|
|
38
|
+
const [url, setUrl] = useState("");
|
|
39
|
+
const [description, setDescription] = useState("");
|
|
40
|
+
const [saving, setSaving] = useState(false);
|
|
41
|
+
const nameRef = useRef<HTMLInputElement>(null);
|
|
42
|
+
|
|
43
|
+
const customAgents = agents.filter((agent) => agent.source === "custom");
|
|
44
|
+
const workspaceAgents = agents.filter(
|
|
45
|
+
(agent) => agent.source === "workspace",
|
|
46
|
+
);
|
|
47
|
+
const builtinAgents = agents.filter((agent) => agent.source === "builtin");
|
|
48
|
+
|
|
49
|
+
const handleAdd = async () => {
|
|
50
|
+
const trimmedName = name.trim();
|
|
51
|
+
const trimmedUrl = url.trim();
|
|
52
|
+
if (!trimmedName || !trimmedUrl) return;
|
|
53
|
+
|
|
54
|
+
const id = trimmedName.toLowerCase().replace(/[^a-z0-9-]/g, "-");
|
|
55
|
+
const agentJson = JSON.stringify(
|
|
56
|
+
{
|
|
57
|
+
id,
|
|
58
|
+
name: trimmedName,
|
|
59
|
+
description: description.trim() || undefined,
|
|
60
|
+
url: trimmedUrl,
|
|
61
|
+
color: "#6B7280",
|
|
62
|
+
},
|
|
63
|
+
null,
|
|
64
|
+
2,
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
setSaving(true);
|
|
68
|
+
try {
|
|
69
|
+
const res = await fetch(agentNativePath("/_agent-native/resources"), {
|
|
70
|
+
method: "POST",
|
|
71
|
+
headers: { "Content-Type": "application/json" },
|
|
72
|
+
body: JSON.stringify({
|
|
73
|
+
path: `remote-agents/${id}.json`,
|
|
74
|
+
content: agentJson,
|
|
75
|
+
shared: true,
|
|
76
|
+
}),
|
|
77
|
+
});
|
|
78
|
+
if (res.ok) {
|
|
79
|
+
setName("");
|
|
80
|
+
setUrl("");
|
|
81
|
+
setDescription("");
|
|
82
|
+
onRefresh();
|
|
83
|
+
nameRef.current?.focus();
|
|
84
|
+
}
|
|
85
|
+
} finally {
|
|
86
|
+
setSaving(false);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const handleDelete = async (resourceId?: string) => {
|
|
91
|
+
if (!resourceId) return;
|
|
92
|
+
const res = await fetch(
|
|
93
|
+
agentNativePath(`/_agent-native/resources/${resourceId}`),
|
|
94
|
+
{
|
|
95
|
+
method: "DELETE",
|
|
96
|
+
},
|
|
97
|
+
);
|
|
98
|
+
if (res.ok) onRefresh();
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<section className="rounded-2xl border bg-card p-5">
|
|
103
|
+
<div className="grid gap-4 xl:grid-cols-[minmax(0,1fr)_320px]">
|
|
104
|
+
<div className="space-y-4">
|
|
105
|
+
<div>
|
|
106
|
+
<div className="text-sm font-medium text-foreground">
|
|
107
|
+
Available by default
|
|
108
|
+
</div>
|
|
109
|
+
<div className="mt-2 flex flex-wrap gap-2">
|
|
110
|
+
{builtinAgents.map((agent) => (
|
|
111
|
+
<div
|
|
112
|
+
key={agent.id}
|
|
113
|
+
className="inline-flex items-center gap-2 rounded-full border px-3 py-1.5 text-xs text-muted-foreground"
|
|
114
|
+
>
|
|
115
|
+
<span
|
|
116
|
+
className="h-2 w-2 rounded-full"
|
|
117
|
+
style={{ backgroundColor: agent.color }}
|
|
118
|
+
/>
|
|
119
|
+
<span>{agent.name}</span>
|
|
120
|
+
</div>
|
|
121
|
+
))}
|
|
122
|
+
{builtinAgents.length === 0 && (
|
|
123
|
+
<div className="rounded-xl border border-dashed px-4 py-6 text-sm text-muted-foreground">
|
|
124
|
+
No default agents detected.
|
|
125
|
+
</div>
|
|
126
|
+
)}
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div>
|
|
131
|
+
<div className="text-sm font-medium text-foreground">
|
|
132
|
+
Added in this workspace
|
|
133
|
+
</div>
|
|
134
|
+
<div className="mt-2 space-y-2">
|
|
135
|
+
{workspaceAgents.map((agent) => (
|
|
136
|
+
<div
|
|
137
|
+
key={agent.id}
|
|
138
|
+
className="flex items-start justify-between gap-3 rounded-xl border bg-muted/30 px-4 py-3"
|
|
139
|
+
>
|
|
140
|
+
<div className="min-w-0">
|
|
141
|
+
<div className="text-sm font-medium text-foreground">
|
|
142
|
+
{agent.name}
|
|
143
|
+
</div>
|
|
144
|
+
{agent.description ? (
|
|
145
|
+
<div className="mt-1 text-xs text-muted-foreground">
|
|
146
|
+
{agent.description}
|
|
147
|
+
</div>
|
|
148
|
+
) : null}
|
|
149
|
+
<div className="mt-1 text-xs text-muted-foreground">
|
|
150
|
+
<a
|
|
151
|
+
href={agent.url}
|
|
152
|
+
target="_blank"
|
|
153
|
+
rel="noreferrer"
|
|
154
|
+
className="inline-flex items-center gap-1 hover:text-foreground"
|
|
155
|
+
>
|
|
156
|
+
{agent.url}
|
|
157
|
+
<IconExternalLink className="h-3 w-3" />
|
|
158
|
+
</a>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
))}
|
|
163
|
+
{customAgents.map((agent) => (
|
|
164
|
+
<div
|
|
165
|
+
key={agent.id}
|
|
166
|
+
className="flex items-start justify-between gap-3 rounded-xl border bg-muted/30 px-4 py-3"
|
|
167
|
+
>
|
|
168
|
+
<div className="min-w-0">
|
|
169
|
+
<div className="text-sm font-medium text-foreground">
|
|
170
|
+
{agent.name}
|
|
171
|
+
</div>
|
|
172
|
+
{agent.description ? (
|
|
173
|
+
<div className="mt-1 text-xs text-muted-foreground">
|
|
174
|
+
{agent.description}
|
|
175
|
+
</div>
|
|
176
|
+
) : null}
|
|
177
|
+
<div className="mt-1 flex items-center gap-2 text-xs text-muted-foreground">
|
|
178
|
+
<a
|
|
179
|
+
href={agent.url}
|
|
180
|
+
target="_blank"
|
|
181
|
+
rel="noreferrer"
|
|
182
|
+
className="inline-flex items-center gap-1 hover:text-foreground"
|
|
183
|
+
>
|
|
184
|
+
{agent.url}
|
|
185
|
+
<IconExternalLink className="h-3 w-3" />
|
|
186
|
+
</a>
|
|
187
|
+
<span>·</span>
|
|
188
|
+
<span>{agent.scope || "shared"}</span>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
<AlertDialog>
|
|
192
|
+
<AlertDialogTrigger asChild>
|
|
193
|
+
<Button variant="ghost" size="icon">
|
|
194
|
+
<IconTrash className="h-4 w-4" />
|
|
195
|
+
</Button>
|
|
196
|
+
</AlertDialogTrigger>
|
|
197
|
+
<AlertDialogContent>
|
|
198
|
+
<AlertDialogHeader>
|
|
199
|
+
<AlertDialogTitle>Remove this agent?</AlertDialogTitle>
|
|
200
|
+
<AlertDialogDescription>
|
|
201
|
+
“{agent.name}” will be removed from the workspace. Any
|
|
202
|
+
jobs or chats that delegate to it will stop working.
|
|
203
|
+
</AlertDialogDescription>
|
|
204
|
+
</AlertDialogHeader>
|
|
205
|
+
<AlertDialogFooter>
|
|
206
|
+
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
207
|
+
<AlertDialogAction
|
|
208
|
+
onClick={() => handleDelete(agent.resourceId)}
|
|
209
|
+
>
|
|
210
|
+
Remove
|
|
211
|
+
</AlertDialogAction>
|
|
212
|
+
</AlertDialogFooter>
|
|
213
|
+
</AlertDialogContent>
|
|
214
|
+
</AlertDialog>
|
|
215
|
+
</div>
|
|
216
|
+
))}
|
|
217
|
+
{workspaceAgents.length === 0 && customAgents.length === 0 && (
|
|
218
|
+
<div className="rounded-xl border border-dashed px-4 py-6 text-sm text-muted-foreground">
|
|
219
|
+
No extra agents added yet.
|
|
220
|
+
</div>
|
|
221
|
+
)}
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
<div className="rounded-xl border bg-muted/20 p-4">
|
|
227
|
+
<div className="text-sm font-medium text-foreground">
|
|
228
|
+
Add external agent
|
|
229
|
+
</div>
|
|
230
|
+
<p className="mt-1 text-xs leading-relaxed text-muted-foreground">
|
|
231
|
+
Add another A2A-compatible app by saving its agent endpoint here.
|
|
232
|
+
</p>
|
|
233
|
+
<div className="mt-4 space-y-3">
|
|
234
|
+
<Input
|
|
235
|
+
ref={nameRef}
|
|
236
|
+
value={name}
|
|
237
|
+
onChange={(event) => setName(event.target.value)}
|
|
238
|
+
placeholder="Name"
|
|
239
|
+
/>
|
|
240
|
+
<Input
|
|
241
|
+
value={url}
|
|
242
|
+
onChange={(event) => setUrl(event.target.value)}
|
|
243
|
+
placeholder="https://app.example.com"
|
|
244
|
+
/>
|
|
245
|
+
<Input
|
|
246
|
+
value={description}
|
|
247
|
+
onChange={(event) => setDescription(event.target.value)}
|
|
248
|
+
placeholder="Description (optional)"
|
|
249
|
+
/>
|
|
250
|
+
<Button
|
|
251
|
+
className="w-full"
|
|
252
|
+
onClick={handleAdd}
|
|
253
|
+
disabled={!name.trim() || !url.trim() || saving}
|
|
254
|
+
>
|
|
255
|
+
{saving ? "Saving..." : "Add agent"}
|
|
256
|
+
</Button>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
</section>
|
|
261
|
+
);
|
|
262
|
+
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { useMemo, useState, type ReactNode } from "react";
|
|
2
|
+
import { useActionMutation, useActionQuery } from "@agent-native/core/client";
|
|
3
|
+
import {
|
|
4
|
+
IconCheck,
|
|
5
|
+
IconLoader2,
|
|
6
|
+
IconRefresh,
|
|
7
|
+
IconSettings,
|
|
8
|
+
} from "@tabler/icons-react";
|
|
9
|
+
import { toast } from "sonner";
|
|
10
|
+
import {
|
|
11
|
+
Popover,
|
|
12
|
+
PopoverContent,
|
|
13
|
+
PopoverTrigger,
|
|
14
|
+
} from "@/components/ui/popover";
|
|
15
|
+
import { Button } from "@/components/ui/button";
|
|
16
|
+
|
|
17
|
+
interface VaultSecret {
|
|
18
|
+
id: string;
|
|
19
|
+
name?: string | null;
|
|
20
|
+
credentialKey: string;
|
|
21
|
+
provider?: string | null;
|
|
22
|
+
description?: string | null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface VaultGrant {
|
|
26
|
+
id: string;
|
|
27
|
+
secretId: string;
|
|
28
|
+
appId: string;
|
|
29
|
+
status?: string | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface AppKeysPopoverProps {
|
|
33
|
+
appId: string;
|
|
34
|
+
appName: string;
|
|
35
|
+
trigger?: ReactNode;
|
|
36
|
+
align?: "start" | "center" | "end";
|
|
37
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function AppKeysPopover({
|
|
41
|
+
appId,
|
|
42
|
+
appName,
|
|
43
|
+
trigger,
|
|
44
|
+
align = "end",
|
|
45
|
+
side = "bottom",
|
|
46
|
+
}: AppKeysPopoverProps) {
|
|
47
|
+
const [open, setOpen] = useState(false);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Popover open={open} onOpenChange={setOpen}>
|
|
51
|
+
<PopoverTrigger asChild>
|
|
52
|
+
{trigger ?? (
|
|
53
|
+
<button
|
|
54
|
+
type="button"
|
|
55
|
+
aria-label={`Manage keys for ${appName}`}
|
|
56
|
+
onClick={(event) => {
|
|
57
|
+
// Card itself is an <a>; stop the link from navigating when the
|
|
58
|
+
// user clicks the cog inside it.
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
event.stopPropagation();
|
|
61
|
+
}}
|
|
62
|
+
className="flex h-7 w-7 cursor-pointer items-center justify-center rounded-md border border-transparent text-muted-foreground/70 hover:border-border hover:bg-accent/40 hover:text-foreground"
|
|
63
|
+
>
|
|
64
|
+
<IconSettings size={14} />
|
|
65
|
+
</button>
|
|
66
|
+
)}
|
|
67
|
+
</PopoverTrigger>
|
|
68
|
+
<PopoverContent
|
|
69
|
+
align={align}
|
|
70
|
+
side={side}
|
|
71
|
+
sideOffset={6}
|
|
72
|
+
className="w-80 p-3"
|
|
73
|
+
onClick={(event) => event.stopPropagation()}
|
|
74
|
+
>
|
|
75
|
+
{open ? <AppKeysPanel appId={appId} appName={appName} /> : null}
|
|
76
|
+
</PopoverContent>
|
|
77
|
+
</Popover>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function AppKeysPanel({ appId, appName }: { appId: string; appName: string }) {
|
|
82
|
+
const { data: secrets = [], isLoading: secretsLoading } = useActionQuery(
|
|
83
|
+
"list-vault-secret-options",
|
|
84
|
+
{},
|
|
85
|
+
);
|
|
86
|
+
const {
|
|
87
|
+
data: grants = [],
|
|
88
|
+
isLoading: grantsLoading,
|
|
89
|
+
refetch: refetchGrants,
|
|
90
|
+
} = useActionQuery("list-vault-grants", { appId });
|
|
91
|
+
|
|
92
|
+
const grantBySecretId = useMemo(() => {
|
|
93
|
+
const map = new Map<string, VaultGrant>();
|
|
94
|
+
for (const grant of grants as VaultGrant[]) {
|
|
95
|
+
if (grant.status && grant.status !== "active") continue;
|
|
96
|
+
map.set(grant.secretId, grant);
|
|
97
|
+
}
|
|
98
|
+
return map;
|
|
99
|
+
}, [grants]);
|
|
100
|
+
|
|
101
|
+
// Track per-secret pending state so a fast double-click on the same row
|
|
102
|
+
// can't queue two `create-vault-grant` requests (which would silently
|
|
103
|
+
// create duplicate active grants — a later revoke only clears one).
|
|
104
|
+
const [pendingSecretIds, setPendingSecretIds] = useState<Set<string>>(
|
|
105
|
+
() => new Set(),
|
|
106
|
+
);
|
|
107
|
+
const markPending = (secretId: string, pending: boolean) =>
|
|
108
|
+
setPendingSecretIds((prev) => {
|
|
109
|
+
const next = new Set(prev);
|
|
110
|
+
if (pending) next.add(secretId);
|
|
111
|
+
else next.delete(secretId);
|
|
112
|
+
return next;
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const grantMutation = useActionMutation("create-vault-grant", {
|
|
116
|
+
onSuccess: () => refetchGrants(),
|
|
117
|
+
onError: (err) => toast.error(`Could not grant: ${String(err)}`),
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
const revokeMutation = useActionMutation("revoke-vault-grant", {
|
|
121
|
+
onSuccess: () => refetchGrants(),
|
|
122
|
+
onError: (err) => toast.error(`Could not revoke: ${String(err)}`),
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
const syncMutation = useActionMutation("sync-vault-to-app", {
|
|
126
|
+
onSuccess: (result: any) => {
|
|
127
|
+
const synced = result?.synced ?? 0;
|
|
128
|
+
toast.success(
|
|
129
|
+
synced > 0
|
|
130
|
+
? `Synced ${synced} key${synced === 1 ? "" : "s"} to ${appName}`
|
|
131
|
+
: `${appName} is up to date`,
|
|
132
|
+
);
|
|
133
|
+
},
|
|
134
|
+
onError: (err) => toast.error(`Sync failed: ${String(err)}`),
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
const isLoading = secretsLoading || grantsLoading;
|
|
138
|
+
const grantedCount = grantBySecretId.size;
|
|
139
|
+
const typedSecrets = secrets as VaultSecret[];
|
|
140
|
+
|
|
141
|
+
const toggleSecret = (secret: VaultSecret) => {
|
|
142
|
+
if (pendingSecretIds.has(secret.id)) return;
|
|
143
|
+
const existing = grantBySecretId.get(secret.id);
|
|
144
|
+
markPending(secret.id, true);
|
|
145
|
+
const onSettled = () => markPending(secret.id, false);
|
|
146
|
+
if (existing) {
|
|
147
|
+
revokeMutation.mutate({ grantId: existing.id }, { onSettled });
|
|
148
|
+
} else {
|
|
149
|
+
grantMutation.mutate({ secretId: secret.id, appId }, { onSettled });
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<div className="flex flex-col gap-3">
|
|
155
|
+
<div className="flex items-center justify-between gap-2 px-1">
|
|
156
|
+
<div className="min-w-0">
|
|
157
|
+
<p className="truncate text-sm font-semibold text-foreground">
|
|
158
|
+
Keys for {appName}
|
|
159
|
+
</p>
|
|
160
|
+
<p className="text-[11px] text-muted-foreground">
|
|
161
|
+
{grantedCount} of {typedSecrets.length} granted
|
|
162
|
+
</p>
|
|
163
|
+
</div>
|
|
164
|
+
<Button
|
|
165
|
+
type="button"
|
|
166
|
+
variant="outline"
|
|
167
|
+
size="sm"
|
|
168
|
+
disabled={syncMutation.isPending || grantedCount === 0}
|
|
169
|
+
onClick={() => syncMutation.mutate({ appId })}
|
|
170
|
+
className="h-7 px-2"
|
|
171
|
+
>
|
|
172
|
+
{syncMutation.isPending ? (
|
|
173
|
+
<IconLoader2 className="h-3 w-3 animate-spin" />
|
|
174
|
+
) : (
|
|
175
|
+
<IconRefresh className="h-3 w-3" />
|
|
176
|
+
)}
|
|
177
|
+
<span className="ml-1 text-xs">Sync</span>
|
|
178
|
+
</Button>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<div className="max-h-[320px] space-y-1.5 overflow-y-auto rounded-md border border-border bg-card p-1.5">
|
|
182
|
+
{isLoading ? (
|
|
183
|
+
<p className="px-3 py-3 text-xs text-muted-foreground">Loading…</p>
|
|
184
|
+
) : typedSecrets.length === 0 ? (
|
|
185
|
+
<p className="rounded-md border border-dashed border-border px-3 py-3 text-xs text-muted-foreground">
|
|
186
|
+
No vault keys yet. Add one from the Vault page.
|
|
187
|
+
</p>
|
|
188
|
+
) : (
|
|
189
|
+
typedSecrets.map((secret) => {
|
|
190
|
+
const granted = grantBySecretId.has(secret.id);
|
|
191
|
+
const pending = pendingSecretIds.has(secret.id);
|
|
192
|
+
return (
|
|
193
|
+
<button
|
|
194
|
+
key={secret.id}
|
|
195
|
+
type="button"
|
|
196
|
+
aria-pressed={granted}
|
|
197
|
+
disabled={pending}
|
|
198
|
+
onClick={() => toggleSecret(secret)}
|
|
199
|
+
className={`flex w-full items-start gap-3 rounded-md px-2.5 py-2 text-left text-sm disabled:cursor-not-allowed disabled:opacity-60 ${
|
|
200
|
+
pending ? "" : "cursor-pointer"
|
|
201
|
+
} ${
|
|
202
|
+
granted
|
|
203
|
+
? "border border-primary/45 bg-primary/5"
|
|
204
|
+
: "border border-transparent hover:border-muted-foreground/30 hover:bg-accent/35"
|
|
205
|
+
}`}
|
|
206
|
+
>
|
|
207
|
+
<span
|
|
208
|
+
className={`mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border ${
|
|
209
|
+
granted
|
|
210
|
+
? "border-primary/60 bg-primary/10 text-primary"
|
|
211
|
+
: "border-muted-foreground/35 text-transparent"
|
|
212
|
+
}`}
|
|
213
|
+
>
|
|
214
|
+
{granted ? <IconCheck className="h-3 w-3" /> : null}
|
|
215
|
+
</span>
|
|
216
|
+
<span className="min-w-0 flex-1">
|
|
217
|
+
<span className="block truncate font-medium">
|
|
218
|
+
{secret.credentialKey}
|
|
219
|
+
</span>
|
|
220
|
+
<span className="block truncate text-xs text-muted-foreground/70">
|
|
221
|
+
{secret.provider || secret.name || "Vault secret"}
|
|
222
|
+
</span>
|
|
223
|
+
</span>
|
|
224
|
+
</button>
|
|
225
|
+
);
|
|
226
|
+
})
|
|
227
|
+
)}
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
);
|
|
231
|
+
}
|