@kortix/ui 0.14.8 → 0.14.9
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 +2 -2
- package/dist/_vendor/kortix-shared.js +63 -3
- package/dist/_vendor/shared/app-config.d.ts +175 -0
- package/dist/_vendor/shared/channel-message.d.ts +34 -5
- package/dist/_vendor/shared/index.d.ts +1 -0
- package/dist/_vendor/shared/space-slug.d.ts +37 -0
- package/dist/access/access/access-detail-shell.js +1 -1
- package/dist/access/access/principal-picker.d.ts +11 -0
- package/dist/access/access/principal-picker.js +3 -2
- package/dist/apps/app-preview-pool.d.ts +7 -2
- package/dist/apps/app-preview-pool.js +11 -5
- package/dist/apps/app-shared.d.ts +22 -15
- package/dist/apps/app-shared.js +37 -19
- package/dist/apps/index.d.ts +2 -2
- package/dist/apps/index.js +2 -2
- package/dist/artifacts/artifact-frame.d.ts +16 -0
- package/dist/artifacts/artifact-frame.js +51 -0
- package/dist/artifacts/artifact-session.d.ts +18 -0
- package/dist/artifacts/artifact-session.js +101 -0
- package/dist/artifacts/frame-policy.d.ts +30 -0
- package/dist/artifacts/frame-policy.js +61 -0
- package/dist/artifacts/index.d.ts +3 -0
- package/dist/artifacts/index.js +5 -0
- package/dist/browser/sandbox-browser-chrome.d.ts +4 -1
- package/dist/browser/sandbox-browser-chrome.js +2 -2
- package/dist/customize/agents/agent-grant-pages.d.ts +5 -1
- package/dist/customize/agents/agent-grant-pages.js +30 -4
- package/dist/customize/agents/agent-page.js +3 -1
- package/dist/customize/agents/agent-policy-sets.d.ts +43 -0
- package/dist/customize/agents/agent-policy-sets.js +72 -0
- package/dist/customize/agents/agent-triggers-section.js +2 -1
- package/dist/customize/connectors/add-mcp/add-mcp-server-dialog.d.ts +6 -1
- package/dist/customize/connectors/add-mcp/add-mcp-server-dialog.js +10 -4
- package/dist/customize/connectors/agent-access.d.ts +35 -0
- package/dist/customize/connectors/agent-access.js +77 -0
- package/dist/customize/connectors/catalog/browse-sections.d.ts +2 -29
- package/dist/customize/connectors/catalog/browse-sections.js +7 -74
- package/dist/customize/connectors/catalog/catalog-entry.d.ts +18 -37
- package/dist/customize/connectors/catalog/catalog-entry.js +28 -40
- package/dist/customize/connectors/catalog/connector-browse.d.ts +3 -32
- package/dist/customize/connectors/catalog/connector-browse.js +19 -50
- package/dist/customize/connectors/catalog/use-catalog.d.ts +20 -59
- package/dist/customize/connectors/catalog/use-catalog.js +48 -175
- package/dist/customize/connectors/connector-identity.d.ts +9 -11
- package/dist/customize/connectors/connector-identity.js +13 -42
- package/dist/customize/connectors/connector-moves-banner.d.ts +2 -1
- package/dist/customize/connectors/connector-moves-banner.js +4 -6
- package/dist/customize/connectors/connector-routes.d.ts +21 -9
- package/dist/customize/connectors/connector-routes.js +29 -20
- package/dist/customize/connectors/connectors-page.js +53 -82
- package/dist/customize/connectors/detail/app-page.js +226 -98
- package/dist/customize/connectors/detail/computer-app-page.d.ts +16 -0
- package/dist/customize/connectors/detail/computer-app-page.js +39 -0
- package/dist/customize/connectors/detail/connector-accounts.js +3 -1
- package/dist/customize/connectors/detail/connector-advanced-tools.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-advanced-tools.js +2 -2
- package/dist/customize/connectors/detail/connector-agents.d.ts +14 -0
- package/dist/customize/connectors/detail/connector-agents.js +69 -0
- package/dist/customize/connectors/detail/connector-detail-tabs.js +2 -1
- package/dist/customize/connectors/detail/connector-move-row.d.ts +8 -5
- package/dist/customize/connectors/detail/connector-move-row.js +23 -14
- package/dist/customize/connectors/detail/connector-page.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-page.js +14 -10
- package/dist/customize/connectors/detail/connector-policy-sets.d.ts +28 -0
- package/dist/customize/connectors/detail/connector-policy-sets.js +203 -0
- package/dist/customize/connectors/detail/connector-settings.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-settings.js +7 -3
- package/dist/customize/connectors/detail/connector-status.d.ts +19 -6
- package/dist/customize/connectors/detail/connector-status.js +34 -10
- package/dist/customize/connectors/detail/connector-tabs.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-tabs.js +8 -2
- package/dist/customize/connectors/detail/connector-tools.d.ts +3 -3
- package/dist/customize/connectors/detail/connector-tools.js +105 -48
- package/dist/customize/connectors/detail/email-inboxes.d.ts +43 -0
- package/dist/customize/connectors/detail/email-inboxes.js +184 -0
- package/dist/customize/connectors/detail/provider-info.d.ts +1 -1
- package/dist/customize/connectors/detail/provider-info.js +2 -2
- package/dist/customize/connectors/detail/status-badge.d.ts +1 -1
- package/dist/customize/connectors/detail/status-badge.js +4 -5
- package/dist/customize/connectors/detail/use-connector-detail.d.ts +6 -0
- package/dist/customize/connectors/detail/use-connector-detail.js +14 -4
- package/dist/customize/connectors/install/install-dialog.d.ts +23 -0
- package/dist/customize/connectors/install/install-dialog.js +40 -0
- package/dist/customize/connectors/install/install.d.ts +13 -2
- package/dist/customize/connectors/install/install.js +9 -4
- package/dist/customize/connectors/install/use-install.d.ts +19 -2
- package/dist/customize/connectors/install/use-install.js +65 -37
- package/dist/customize/connectors/install/way-kind.d.ts +5 -0
- package/dist/customize/connectors/install/way-kind.js +16 -0
- package/dist/customize/connectors/provider-label.d.ts +2 -1
- package/dist/customize/connectors/provider-label.js +13 -3
- package/dist/customize/connectors/tools/pattern-rule-draft.d.ts +4 -0
- package/dist/customize/connectors/tools/pattern-rule-draft.js +12 -3
- package/dist/customize/connectors/tools/policy-sets.d.ts +27 -0
- package/dist/customize/connectors/tools/policy-sets.js +41 -0
- package/dist/customize/connectors/tools/tool-groups.d.ts +32 -9
- package/dist/customize/connectors/tools/tool-groups.js +78 -16
- package/dist/customize/connectors/tools/tool-policy-control.d.ts +11 -10
- package/dist/customize/connectors/tools/tool-policy-control.js +15 -16
- package/dist/customize/connectors/tools/tool-policy-labels.d.ts +6 -5
- package/dist/customize/connectors/tools/tool-policy-labels.js +17 -16
- package/dist/customize/connectors/tools/tool-policy.d.ts +50 -4
- package/dist/customize/connectors/tools/tool-policy.js +74 -8
- package/dist/customize/connectors/use-agent-access.d.ts +85 -0
- package/dist/customize/connectors/use-agent-access.js +72 -0
- package/dist/customize/migrate-to-v2/index.d.ts +1 -2
- package/dist/customize/migrate-to-v2/index.js +1 -2
- package/dist/customize/migrate-to-v2/migration-prompt.d.ts +12 -25
- package/dist/customize/migrate-to-v2/migration-prompt.js +34 -236
- package/dist/customize/migrate-to-v2/upgrade-defs.d.ts +1 -1
- package/dist/customize/migrate-to-v2/upgrade-defs.js +7 -6
- package/dist/customize/migrate-to-v2/upgrade-view.js +7 -7
- package/dist/customize/migrate-to-v2/use-run-upgrade.d.ts +3 -3
- package/dist/customize/providers/provider-accordion.js +17 -2
- package/dist/customize/sections/component/channel-access-panel.d.ts +16 -0
- package/dist/customize/sections/component/channel-access-panel.js +146 -0
- package/dist/customize/sections/component/channel-connect-hero.d.ts +3 -2
- package/dist/customize/sections/component/channel-connect-hero.js +3 -2
- package/dist/customize/sections/component/channel-hero-frame.d.ts +31 -0
- package/dist/customize/sections/component/channel-hero-frame.js +40 -0
- package/dist/customize/sections/component/channel-mocks.d.ts +6 -0
- package/dist/customize/sections/component/channel-mocks.js +46 -0
- package/dist/customize/sections/component/channel-row.d.ts +13 -3
- package/dist/customize/sections/component/channel-row.js +10 -4
- package/dist/customize/sections/component/email-connect-form.d.ts +27 -0
- package/dist/customize/sections/component/email-connect-form.js +183 -0
- package/dist/customize/sections/component/slack-connect-card.d.ts +7 -0
- package/dist/customize/sections/component/slack-connect-card.js +2 -3
- package/dist/customize/sections/component/teams-connect-card.d.ts +7 -0
- package/dist/customize/sections/component/teams-connect-card.js +2 -3
- package/dist/customize/sections/component/telegram-channel-row.js +16 -25
- package/dist/customize/sections/connectors-view.d.ts +1 -15
- package/dist/customize/sections/connectors-view.js +81 -314
- package/dist/customize/sections/view/agent-editor-catalog.js +5 -0
- package/dist/customize/sections/view/channels-view.d.ts +5 -1
- package/dist/customize/sections/view/channels-view.js +61 -75
- package/dist/customize/sections/view/gateway/gateway-overview.js +10 -2
- package/dist/customize/settings/tabs/experimental-tab.js +35 -16
- package/dist/customize/shared/catalog/catalog-empty-state.d.ts +1 -12
- package/dist/customize/shared/catalog/catalog-empty-state.js +3 -3
- package/dist/customize/shared/channels-switch-dialog.d.ts +18 -0
- package/dist/customize/shared/channels-switch-dialog.js +30 -0
- package/dist/customize/shared/feature-gate-screen.js +27 -9
- package/dist/customize/shared/use-customize-prefetch.d.ts +2 -3
- package/dist/customize/shared/use-customize-prefetch.js +9 -27
- package/dist/customize/triggers/schedule/post-to-field.d.ts +18 -0
- package/dist/customize/triggers/schedule/post-to-field.js +49 -0
- package/dist/customize/triggers/schedule/schedule-copy.d.ts +10 -6
- package/dist/customize/triggers/schedule/schedule-copy.js +42 -11
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +2 -1
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +22 -0
- package/dist/customize/triggers/schedule/trigger-composer-logic.js +25 -0
- package/dist/customize/triggers/schedule/trigger-composer.d.ts +5 -0
- package/dist/customize/triggers/schedule/trigger-composer.js +23 -14
- package/dist/customize/triggers/schedule/trigger-edit-logic.js +3 -0
- package/dist/customize/triggers/schedule/trigger-filter.js +1 -1
- package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +2 -2
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -0
- package/dist/customize/triggers/schedule/trigger-toast.js +2 -1
- package/dist/customize/triggers/schedule-view.js +5 -2
- package/dist/files/index.d.ts +1 -0
- package/dist/files/index.js +1 -0
- package/dist/files/project/change-request-recovery.d.ts +1 -26
- package/dist/files/project/change-request-recovery.js +1 -59
- package/dist/files/project/components/change-request-detail-dialog.js +13 -3
- package/dist/files/project/components/drive-explorer.js +15 -15
- package/dist/files/project/components/drive-toolbar.d.ts +16 -2
- package/dist/files/project/components/drive-toolbar.js +14 -5
- package/dist/files/project/hooks/use-change-request-recovery.js +3 -19
- package/dist/files/project/hooks/use-change-requests.d.ts +1 -0
- package/dist/files/project/hooks/use-change-requests.js +11 -2
- package/dist/files/renderers/image-frame.d.ts +46 -0
- package/dist/files/renderers/image-frame.js +59 -0
- package/dist/files/renderers/image-renderer.d.ts +11 -1
- package/dist/files/renderers/image-renderer.js +13 -3
- package/dist/files/renderers/pdf/pdf-clipboard.d.ts +2 -0
- package/dist/files/renderers/pdf/pdf-clipboard.js +21 -0
- package/dist/files/renderers/pdf/pdf-viewer.js +4 -2
- package/dist/files/renderers/show-content-renderer.d.ts +9 -1
- package/dist/files/renderers/show-content-renderer.js +56 -14
- package/dist/files/runtime/file-source.js +2 -0
- package/dist/files/runtime/hooks/use-binary-blob.d.ts +10 -1
- package/dist/files/runtime/hooks/use-binary-blob.js +10 -4
- package/dist/files/runtime/hooks/use-shared-image.d.ts +41 -0
- package/dist/files/runtime/hooks/use-shared-image.js +177 -0
- package/dist/files/viewer/file-content-renderer.d.ts +22 -1
- package/dist/files/viewer/file-content-renderer.js +50 -7
- package/dist/files/viewer/file-header.d.ts +7 -3
- package/dist/files/viewer/file-header.js +20 -11
- package/dist/files/viewer/file-preview-modal.d.ts +1 -1
- package/dist/files/viewer/file-preview-modal.js +10 -22
- package/dist/files/viewer/file-source.d.ts +13 -0
- package/dist/files/viewer/use-file-content-state.d.ts +2 -0
- package/dist/files/viewer/use-file-content-state.js +28 -10
- package/dist/files/viewer/viewer-actions.d.ts +3 -1
- package/dist/files/viewer/viewer-actions.js +2 -2
- package/dist/hooks/use-media-query.d.ts +1 -0
- package/dist/hooks/use-mobile.d.ts +5 -0
- package/dist/hooks/use-mobile.js +8 -0
- package/dist/i18n/en.d.ts +873 -85
- package/dist/i18n/en.js +888 -100
- package/dist/i18n/ui-catalog/localize-ui-catalog.js +4 -0
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +15 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/internal/account-hub/account-settings-sidebar.js +1 -1
- package/dist/internal/account-hub/hub-sheet.d.ts +9 -1
- package/dist/internal/account-hub/hub-sheet.js +21 -5
- package/dist/internal/account-hub/sections.d.ts +1 -1
- package/dist/internal/account-hub/sections.js +2 -1
- package/dist/internal/auth/auth-card-shell.js +3 -3
- package/dist/internal/components/agent-mark.js +5 -2
- package/dist/internal/connector-logo/connector-logo-source.d.ts +63 -0
- package/dist/internal/connector-logo/connector-logo-source.js +48 -0
- package/dist/internal/connector-logo/connector-logo.d.ts +39 -0
- package/dist/internal/connector-logo/connector-logo.js +56 -0
- package/dist/internal/connector-logo/connector-mark-files.d.ts +11 -0
- package/dist/internal/connector-logo/connector-mark-files.js +35 -0
- package/dist/internal/files/file-read-retry.d.ts +13 -0
- package/dist/internal/files/file-read-retry.js +23 -3
- package/dist/internal/files/session-drive-files.d.ts +5 -1
- package/dist/internal/files/session-drive-files.js +7 -2
- package/dist/internal/hooks/channels/use-channels-installations.d.ts +32 -5
- package/dist/internal/hooks/channels/use-channels-installations.js +55 -7
- package/dist/internal/hooks/channels/use-email-inboxes.d.ts +19 -0
- package/dist/internal/hooks/channels/use-email-inboxes.js +48 -0
- package/dist/internal/hooks/connectors/use-add-account.js +1 -1
- package/dist/internal/hooks/index.d.ts +1 -1
- package/dist/internal/hooks/index.js +1 -1
- package/dist/internal/hooks/projects/use-new-project-session.d.ts +9 -0
- package/dist/internal/hooks/projects/use-new-project-session.js +28 -12
- package/dist/internal/hooks/use-auto-scroll.d.ts +8 -1
- package/dist/internal/hooks/use-auto-scroll.js +4 -4
- package/dist/internal/icons/telegram.d.ts +5 -0
- package/dist/internal/icons/telegram.js +6 -1
- package/dist/internal/layout/nav-hover-card.d.ts +35 -0
- package/dist/internal/layout/nav-hover-card.js +84 -0
- package/dist/internal/layout/project-nav-row.d.ts +3 -1
- package/dist/internal/layout/project-nav-row.js +3 -2
- package/dist/internal/layout/project-page-header.d.ts +4 -2
- package/dist/internal/layout/project-page-header.js +4 -3
- package/dist/internal/layout/project-settings-nav.js +59 -2
- package/dist/internal/lib/browser-error-noise.d.ts +1 -1
- package/dist/internal/lib/browser-error-noise.js +1 -1
- package/dist/internal/lib/browser-noise/rules/injected-scripts.d.ts +7 -0
- package/dist/internal/lib/browser-noise/rules/injected-scripts.js +15 -0
- package/dist/internal/lib/manifest-version.d.ts +1 -1
- package/dist/internal/lib/manifest-version.js +2 -2
- package/dist/internal/lib/memory-href.d.ts +16 -0
- package/dist/internal/lib/memory-href.js +46 -0
- package/dist/internal/lib/use-project-feature-flags.js +9 -9
- package/dist/internal/lib/utils/heic-convert.d.ts +1 -1
- package/dist/internal/lib/utils/heic-convert.js +3 -4
- package/dist/internal/lib/web-notifications.d.ts +20 -0
- package/dist/internal/lib/web-notifications.js +48 -4
- package/dist/internal/notifications/notification-bell.d.ts +4 -1
- package/dist/internal/notifications/notification-bell.js +2 -2
- package/dist/internal/selection/selection-bar.d.ts +2 -1
- package/dist/internal/selection/selection-bar.js +1 -1
- package/dist/internal/stores/file-preview-store.d.ts +29 -2
- package/dist/internal/stores/file-preview-store.js +19 -1
- package/dist/internal/stores/kortix-computer-store.js +3 -0
- package/dist/internal/stores/sidebar-nav-store.d.ts +1 -1
- package/dist/internal/stores/sidebar-nav-store.js +3 -1
- package/dist/lib/routes.d.ts +13 -1
- package/dist/lib/routes.js +13 -0
- package/dist/markdown/index.d.ts +2 -1
- package/dist/markdown/index.js +2 -1
- package/dist/markdown/setup-links/approval-decision.d.ts +1 -0
- package/dist/markdown/setup-links/approval-decision.js +6 -2
- package/dist/markdown/setup-links/connector-handshake.d.ts +3 -1
- package/dist/markdown/setup-links/connector-handshake.js +12 -10
- package/dist/markdown/setup-links/secret-intake-form.d.ts +0 -10
- package/dist/markdown/setup-links/secret-intake-form.js +1 -1
- package/dist/markdown/setup-links/show-connect-hero.d.ts +28 -0
- package/dist/markdown/setup-links/show-connect-hero.js +91 -0
- package/dist/markdown/unified-markdown.js +5 -5
- package/dist/primitives/badge.d.ts +1 -1
- package/dist/primitives/badge.js +2 -0
- package/dist/primitives/disclosure.js +14 -2
- package/dist/primitives/empty-art.d.ts +12 -0
- package/dist/primitives/empty-art.js +11 -0
- package/dist/primitives/mermaid-renderer.d.ts +2 -0
- package/dist/primitives/mermaid-renderer.js +21 -15
- package/dist/primitives/resizable.js +6 -1
- package/dist/primitives/resize-seam.d.ts +11 -0
- package/dist/primitives/resize-seam.js +12 -0
- package/dist/primitives/sidebar-panel.js +4 -7
- package/dist/primitives/tabs.d.ts +14 -1
- package/dist/primitives/tabs.js +1 -1
- package/dist/providers/ui-provider.d.ts +9 -0
- package/dist/session/composer/ComposerAboveCard.d.ts +1 -1
- package/dist/session/composer/ComposerAboveCard.js +2 -2
- package/dist/session/composer/ComposerCard.d.ts +1 -1
- package/dist/session/composer/ComposerCard.js +3 -3
- package/dist/session/composer/agent-selector.d.ts +13 -1
- package/dist/session/composer/agent-selector.js +25 -5
- package/dist/session/composer/composer-agent-access.d.ts +15 -0
- package/dist/session/composer/composer-agent-access.js +27 -0
- package/dist/session/composer/composer-chat-input.d.ts +8 -2
- package/dist/session/composer/composer-chat-input.js +8 -6
- package/dist/session/composer/composer-logic.d.ts +16 -0
- package/dist/session/composer/composer-logic.js +12 -0
- package/dist/session/composer/composer-underbar.d.ts +3 -1
- package/dist/session/composer/composer-underbar.js +4 -3
- package/dist/session/composer/composer.d.ts +15 -1
- package/dist/session/composer/composer.js +19 -1
- package/dist/session/composer/draft/composer-draft.d.ts +6 -2
- package/dist/session/composer/draft/composer-draft.js +5 -1
- package/dist/session/composer/reasoning-effort-selector.js +1 -1
- package/dist/session/models/chatgpt-connection-button.d.ts +11 -0
- package/dist/session/models/chatgpt-connection-button.js +54 -0
- package/dist/session/models/model-selector.js +5 -2
- package/dist/session/models/use-model-connection-gate.d.ts +5 -5
- package/dist/session/models/use-model-connection-gate.js +5 -5
- package/dist/session/outcomes/jump-to-outcome.d.ts +10 -0
- package/dist/session/outcomes/jump-to-outcome.js +11 -0
- package/dist/session/outcomes/session-outcomes-bridge.d.ts +14 -0
- package/dist/session/outcomes/session-outcomes-bridge.js +12 -0
- package/dist/session/outcomes/session-outcomes-provider.d.ts +3 -1
- package/dist/session/outcomes/session-outcomes-provider.js +33 -3
- package/dist/session/panel/easy/app-preview.d.ts +10 -0
- package/dist/session/panel/easy/app-preview.js +31 -12
- package/dist/session/panel/easy/change-requests-card.d.ts +7 -0
- package/dist/session/panel/easy/change-requests-card.js +17 -0
- package/dist/session/panel/easy/easy-panel-logic.js +7 -1
- package/dist/session/panel/easy/easy-panel.js +5 -2
- package/dist/session/panel/easy/file-preview.js +1 -1
- package/dist/session/panel/easy/outputs-card.d.ts +2 -1
- package/dist/session/panel/easy/outputs-card.js +3 -2
- package/dist/session/panel/mobile-tool-drawer.js +7 -1
- package/dist/session/panel/session-audit-panel.js +9 -2
- package/dist/session/panel/session-detail-panel.js +9 -3
- package/dist/session/panel/session-files-explorer.d.ts +9 -0
- package/dist/session/panel/session-files-explorer.js +12 -3
- package/dist/session/panel/session-panel-provider.d.ts +15 -1
- package/dist/session/panel/session-panel-provider.js +32 -7
- package/dist/session/panel/shared/derive-panels.d.ts +8 -1
- package/dist/session/panel/shared/derive-panels.js +12 -2
- package/dist/session/panel/shared/output-priority.js +2 -0
- package/dist/session/participants/session-participants.d.ts +5 -1
- package/dist/session/participants/session-participants.js +9 -2
- package/dist/session/prompts/approval-request.d.ts +5 -0
- package/dist/session/prompts/approval-request.js +7 -1
- package/dist/session/prompts/session-approval-review.d.ts +9 -0
- package/dist/session/prompts/session-approval-review.js +18 -0
- package/dist/session/status/session-error-banner.js +2 -49
- package/dist/session/status/session-starting-loader.d.ts +14 -2
- package/dist/session/status/session-starting-loader.js +16 -4
- package/dist/session/thread/after-first-prompt.d.ts +7 -0
- package/dist/session/thread/after-first-prompt.js +8 -0
- package/dist/session/thread/detect-command.d.ts +12 -0
- package/dist/session/thread/detect-command.js +20 -0
- package/dist/session/thread/session-chat.d.ts +3 -1
- package/dist/session/thread/session-chat.js +377 -252
- package/dist/session/thread/session-thread.d.ts +3 -1
- package/dist/session/thread/session-thread.js +9 -2
- package/dist/session/thread/thread-boot-rows.d.ts +36 -0
- package/dist/session/thread/thread-boot-rows.js +89 -0
- package/dist/session/thread/transcript-rows.d.ts +31 -0
- package/dist/session/thread/transcript-rows.js +3 -0
- package/dist/session/thread/transcript.d.ts +0 -9
- package/dist/session/thread/transcript.js +104 -19
- package/dist/session/tool/shared/infrastructure-contexts.d.ts +28 -0
- package/dist/session/tool/shared/infrastructure-contexts.js +31 -3
- package/dist/session/tool/tool-part-renderer.d.ts +5 -4
- package/dist/session/tool/tool-part-renderer.js +8 -3
- package/dist/session/tool/tools/bash-tool.js +7 -6
- package/dist/session/tool/tools/channel-send-card.d.ts +1 -2
- package/dist/session/tool/tools/channel-send.d.ts +2 -1
- package/dist/session/tool/tools/codemode-tool.js +1 -1
- package/dist/session/tool/tools/connector-tools.js +1 -1
- package/dist/session/tool/tools/image-gen-tool.d.ts +1 -1
- package/dist/session/tool/tools/image-gen-tool.js +240 -53
- package/dist/session/tool/tools/show-tool.js +19 -8
- package/dist/session/turn/channel-brand.d.ts +8 -3
- package/dist/session/turn/channel-brand.js +20 -4
- package/dist/session/turn/message-author.d.ts +8 -0
- package/dist/session/turn/message-author.js +24 -0
- package/dist/session/turn/message-row.d.ts +52 -0
- package/dist/session/turn/message-row.js +44 -0
- package/dist/session/turn/plan-anchor.d.ts +1 -1
- package/dist/session/turn/plan-anchor.js +1 -1
- package/dist/session/turn/user-message.d.ts +7 -1
- package/dist/session/turn/user-message.js +21 -7
- package/dist/styles.css +1 -1
- package/dist/workspace/home/access-requests-bell.d.ts +9 -2
- package/dist/workspace/home/access-requests-bell.js +20 -6
- package/dist/workspace/home/first-chat.d.ts +8 -21
- package/dist/workspace/home/first-chat.js +22 -72
- package/dist/workspace/index.d.ts +6 -0
- package/dist/workspace/index.js +6 -0
- package/dist/workspace/layout/project-home.d.ts +14 -2
- package/dist/workspace/layout/project-home.js +60 -21
- package/dist/workspace/layout/use-project-home-send.d.ts +9 -1
- package/dist/workspace/layout/use-project-home-send.js +82 -3
- package/dist/workspace/memory/body-doc.d.ts +17 -0
- package/dist/workspace/memory/body-doc.js +208 -0
- package/dist/workspace/memory/body-extensions.d.ts +38 -0
- package/dist/workspace/memory/body-extensions.js +103 -0
- package/dist/workspace/memory/company-memory-page.d.ts +8 -0
- package/dist/workspace/memory/company-memory-page.js +16 -0
- package/dist/workspace/memory/memory-all.d.ts +20 -0
- package/dist/workspace/memory/memory-all.js +27 -0
- package/dist/workspace/memory/memory-body.d.ts +19 -0
- package/dist/workspace/memory/memory-body.js +139 -0
- package/dist/workspace/memory/memory-empty.d.ts +13 -0
- package/dist/workspace/memory/memory-empty.js +28 -0
- package/dist/workspace/memory/memory-history.d.ts +27 -0
- package/dist/workspace/memory/memory-history.js +108 -0
- package/dist/workspace/memory/memory-labels.d.ts +16 -0
- package/dist/workspace/memory/memory-labels.js +47 -0
- package/dist/workspace/memory/memory-page-list.d.ts +34 -0
- package/dist/workspace/memory/memory-page-list.js +156 -0
- package/dist/workspace/memory/memory-reader.d.ts +58 -0
- package/dist/workspace/memory/memory-reader.js +123 -0
- package/dist/workspace/memory/memory-view.d.ts +21 -0
- package/dist/workspace/memory/memory-view.js +124 -0
- package/dist/workspace/memory/remember-popover.d.ts +19 -0
- package/dist/workspace/memory/remember-popover.js +61 -0
- package/dist/workspace/memory/remember-this.d.ts +12 -0
- package/dist/workspace/memory/remember-this.js +89 -0
- package/dist/workspace/memory/source-mark.d.ts +18 -0
- package/dist/workspace/memory/source-mark.js +79 -0
- package/dist/workspace/memory/used-memory-chip.d.ts +14 -0
- package/dist/workspace/memory/used-memory-chip.js +61 -0
- package/dist/workspace/new/advanced-fields.d.ts +2 -1
- package/dist/workspace/new/advanced-fields.js +2 -2
- package/dist/workspace/new/source-param.d.ts +1 -1
- package/dist/workspace/new/source-param.js +3 -1
- package/dist/workspace/new/use-create-workspace.d.ts +8 -10
- package/dist/workspace/new/use-create-workspace.js +3 -3
- package/dist/workspace/projects/onboarding/app-logo.d.ts +7 -2
- package/dist/workspace/projects/onboarding/app-logo.js +6 -13
- package/dist/workspace/projects/policies-panel.js +5 -3
- package/dist/workspace/review/review-actions.d.ts +4 -2
- package/dist/workspace/review/review-actions.js +8 -2
- package/dist/workspace/review/review-center.js +11 -7
- package/dist/workspace/review/review-detail.d.ts +10 -0
- package/dist/workspace/review/review-detail.js +101 -13
- package/dist/workspace/saved-session-skeleton.d.ts +2 -2
- package/dist/workspace/saved-session-skeleton.js +3 -3
- package/dist/workspace/session-workspace.js +15 -13
- package/dist/workspace/sessions/project-sessions-view.js +3 -2
- package/dist/workspace/sessions/sessions-toolbar.d.ts +3 -1
- package/dist/workspace/sessions/sessions-toolbar.js +2 -2
- package/dist/workspace/sidebar/footer/project-apps-nav.d.ts +5 -0
- package/dist/workspace/sidebar/footer/project-apps-nav.js +41 -2
- package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +22 -0
- package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.js +13 -13
- package/dist/workspace/sidebar/footer/project-memory-nav.d.ts +7 -0
- package/dist/workspace/sidebar/footer/project-memory-nav.js +19 -0
- package/dist/workspace/sidebar/nav-row-meta.js +14 -2
- package/dist/workspace/sidebar/project-nav-items.js +3 -0
- package/dist/workspace/sidebar/project-session-list.js +68 -56
- package/dist/workspace/sidebar/project-sidebar.js +9 -2
- package/dist/workspace/sidebar/project-spaces-nav.d.ts +8 -0
- package/dist/workspace/sidebar/project-spaces-nav.js +69 -0
- package/dist/workspace/sidebar/session-group-order.d.ts +9 -0
- package/dist/workspace/sidebar/session-group-order.js +25 -0
- package/dist/workspace/sidebar/session-group-sections.d.ts +62 -0
- package/dist/workspace/sidebar/session-group-sections.js +267 -0
- package/dist/workspace/sidebar/session-list-chrome.d.ts +28 -0
- package/dist/workspace/sidebar/session-list-chrome.js +50 -0
- package/dist/workspace/spaces/channel-glyph.d.ts +5 -0
- package/dist/workspace/spaces/channel-glyph.js +6 -0
- package/dist/workspace/spaces/channel-setup.d.ts +16 -0
- package/dist/workspace/spaces/channel-setup.js +105 -0
- package/dist/workspace/spaces/channels-onboarding.d.ts +13 -0
- package/dist/workspace/spaces/channels-onboarding.js +37 -0
- package/dist/workspace/spaces/create-channel-dialog.d.ts +16 -0
- package/dist/workspace/spaces/create-channel-dialog.js +158 -0
- package/dist/workspace/spaces/private-channels-not-in.d.ts +9 -0
- package/dist/workspace/spaces/private-channels-not-in.js +69 -0
- package/dist/workspace/spaces/space-agents.d.ts +10 -0
- package/dist/workspace/spaces/space-agents.js +10 -0
- package/dist/workspace/spaces/space-details-dialog.d.ts +20 -0
- package/dist/workspace/spaces/space-details-dialog.js +176 -0
- package/dist/workspace/spaces/space-link-label.d.ts +49 -0
- package/dist/workspace/spaces/space-link-label.js +73 -0
- package/dist/workspace/spaces/space-links.d.ts +19 -0
- package/dist/workspace/spaces/space-links.js +230 -0
- package/dist/workspace/spaces/space-members.d.ts +46 -0
- package/dist/workspace/spaces/space-members.js +182 -0
- package/dist/workspace/spaces/space-roster.d.ts +15 -0
- package/dist/workspace/spaces/space-roster.js +44 -0
- package/dist/workspace/spaces/space-threads-tab.d.ts +56 -0
- package/dist/workspace/spaces/space-threads-tab.js +156 -0
- package/dist/workspace/spaces/space-timeline-view.d.ts +254 -0
- package/dist/workspace/spaces/space-timeline-view.js +235 -0
- package/dist/workspace/spaces/space-timeline.d.ts +106 -0
- package/dist/workspace/spaces/space-timeline.js +183 -0
- package/dist/workspace/spaces/space-triggers.d.ts +13 -0
- package/dist/workspace/spaces/space-triggers.js +78 -0
- package/dist/workspace/spaces/space-view.d.ts +37 -0
- package/dist/workspace/spaces/space-view.js +436 -0
- package/package.json +27 -36
- package/skills/kortix-ui/SKILL.md +3 -3
- package/skills/kortix-ui/references/custom-dashboard.md +3 -3
- package/skills/kortix-ui/references/modules.md +28 -4
- package/skills/kortix-ui/references/theming.md +1 -1
- package/dist/customize/connectors/catalog/merge-search.d.ts +0 -10
- package/dist/customize/connectors/catalog/merge-search.js +0 -26
- package/dist/customize/connectors/detail/find-easy-connect-app.d.ts +0 -29
- package/dist/customize/connectors/detail/find-easy-connect-app.js +0 -22
- package/dist/customize/migrate-to-v2/use-migrate-to-v2.d.ts +0 -9
- package/dist/customize/migrate-to-v2/use-migrate-to-v2.js +0 -24
- package/dist/customize/sections/connector-connection-header.d.ts +0 -36
- package/dist/customize/sections/connector-connection-header.js +0 -33
- package/dist/customize/sections/connector-connection-modal.d.ts +0 -34
- package/dist/customize/sections/connector-connection-modal.js +0 -72
- package/dist/customize/sections/discover-catalogue-card.d.ts +0 -19
- package/dist/customize/sections/discover-catalogue-card.js +0 -26
- package/dist/customize/sections/discover-catalogue-detail.d.ts +0 -15
- package/dist/customize/sections/discover-catalogue-detail.js +0 -24
- package/dist/customize/sections/discover-catalogue.d.ts +0 -17
- package/dist/customize/sections/discover-catalogue.js +0 -132
- package/dist/customize/sections/llm-provider/provider-access-menu.d.ts +0 -10
- package/dist/customize/sections/llm-provider/provider-access-menu.js +0 -23
- package/dist/files/project/components/drive-empty-art.d.ts +0 -2
- package/dist/files/project/components/drive-empty-art.js +0 -5
- package/dist/internal/hooks/use-media-query.d.ts +0 -2
- package/dist/internal/share/public-share-link-button.d.ts +0 -14
- package/dist/internal/share/public-share-link-button.js +0 -17
- package/dist/markdown/setup-links/app-credentials-form.d.ts +0 -12
- package/dist/markdown/setup-links/app-credentials-form.js +0 -115
- /package/dist/{internal/hooks → hooks}/use-media-query.js +0 -0
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ the component subpaths and the stylesheets. Inside kortix-ai/suna:
|
|
|
22
22
|
`"@kortix/ui": "workspace:*"`.
|
|
23
23
|
`react` and `react-dom` 19 are peers (the PowerPoint preview needs React 19.2.7 or later).
|
|
24
24
|
|
|
25
|
-
- Public docs: `apps/web/content/docs/
|
|
25
|
+
- Public docs: the "Kortix UI" section of `apps/web/content/docs/developers.mdx` (https://kortix.com/docs/developers#kortix-ui).
|
|
26
26
|
- Agent skill: `skills/kortix-ui/SKILL.md`, with `references/custom-dashboard.md`
|
|
27
27
|
(a whole dashboard), `references/modules.md` (every entry, its props, an example) and
|
|
28
28
|
`references/theming.md` (every theme key). Kortix sessions load the same files
|
|
@@ -186,7 +186,7 @@ The root `@kortix/ui` barrel holds only light core primitives. Toasts need one
|
|
|
186
186
|
|
|
187
187
|
### Routes
|
|
188
188
|
|
|
189
|
-
Every URL the components link to comes from one route table, `setUiRoutes` (`@kortix/ui`), called once at module load. The defaults are Kortix's own paths: `project` `/projects/<id>`, `session` `/projects/<id>/sessions/<sessionId>`, `sessions` `/projects/<id>/sessions` (`?view=archived|deleted`), `files` `/projects/<id>/files`, `drive` `/projects/<id>/drive`, `apps` `/projects/<id>/apps`, `members` `/projects/<id>/members`, `sandboxSettings` `/projects/<id>/config?section=sandbox`, `customize` `/projects/<id>/customize/<page>` (agents, skills, connectors, triggers, reminders, models, secrets, review, settings). Return your own path for a page you serve elsewhere. Return `null` for a page you do not serve: every link to it is hidden. `project` and `
|
|
189
|
+
Every URL the components link to comes from one route table, `setUiRoutes` (`@kortix/ui`), called once at module load. The defaults are Kortix's own paths: `project` `/projects/<id>`, `session` `/projects/<id>/sessions/<sessionId>`, `sessions` `/projects/<id>/sessions` (`?view=archived|deleted`), `files` `/projects/<id>/files`, `drive` `/projects/<id>/drive`, `apps` `/projects/<id>/apps`, `members` `/projects/<id>/members`, `sandboxSettings` `/projects/<id>/config?section=sandbox`, `customize` `/projects/<id>/customize/<page>` (agents, skills, connectors, triggers, reminders, models, secrets, review, settings), `channel` `/projects/<id>/c/<slug>` and `dm` `/projects/<id>/dm/<agent>` (the sidebar links them while the project's `project_channels` flag is on). Return your own path for a page you serve elsewhere. Return `null` for a page you do not serve: every link to it is hidden. `project`, `session`, `channel` and `dm` cannot be null.
|
|
190
190
|
|
|
191
191
|
## Modules
|
|
192
192
|
|
|
@@ -6954,6 +6954,29 @@ function parseManifestText(raw, format) {
|
|
|
6954
6954
|
return value;
|
|
6955
6955
|
}
|
|
6956
6956
|
|
|
6957
|
+
// ../shared/src/app-config.ts
|
|
6958
|
+
function appAdminsOnly(app) {
|
|
6959
|
+
return app.services?.find((service) => service.name === "http")?.access === "admins";
|
|
6960
|
+
}
|
|
6961
|
+
function gridApps(apps, canAdmin = true) {
|
|
6962
|
+
const slugs = new Set(apps.map((app) => app.slug));
|
|
6963
|
+
return apps.filter(
|
|
6964
|
+
(app) => app.display?.listed === true && !(app.display?.parent && slugs.has(app.display.parent)) && (canAdmin || !appAdminsOnly(app))
|
|
6965
|
+
);
|
|
6966
|
+
}
|
|
6967
|
+
|
|
6968
|
+
// ../manifest-schema/src/policy-sets.ts
|
|
6969
|
+
var POLICY_SET_NAME_RE = /^[a-z0-9][a-z0-9_-]{0,63}$/;
|
|
6970
|
+
var RESERVED_POLICY_SET_NAME = "base";
|
|
6971
|
+
var POLICY_SETS_UNSUPPORTED_PROVIDERS = ["channel", "computer"];
|
|
6972
|
+
function policySetNameError(name) {
|
|
6973
|
+
if (typeof name !== "string" || !POLICY_SET_NAME_RE.test(name)) {
|
|
6974
|
+
return 'a policy set name is lowercase letters, digits, "_" or "-" (at most 64 characters).';
|
|
6975
|
+
}
|
|
6976
|
+
if (name === RESERVED_POLICY_SET_NAME) return `"base" is reserved: it names the connector's base rules.`;
|
|
6977
|
+
return null;
|
|
6978
|
+
}
|
|
6979
|
+
|
|
6957
6980
|
// ../manifest-schema/src/slug.ts
|
|
6958
6981
|
var SLUG_MAX_LENGTH = 128;
|
|
6959
6982
|
function trimSeparators(value) {
|
|
@@ -8600,6 +8623,7 @@ function readSlackFollowUpHeader(line) {
|
|
|
8600
8623
|
}
|
|
8601
8624
|
|
|
8602
8625
|
// ../shared/src/channel-message.ts
|
|
8626
|
+
var CHANNEL_PLATFORMS = ["Slack", "Teams", "Telegram", "Email"];
|
|
8603
8627
|
var TAIL_MARKERS = [
|
|
8604
8628
|
/^How to work:/m,
|
|
8605
8629
|
/^Attached files \(download with/m,
|
|
@@ -8678,6 +8702,29 @@ var FOLLOW_UP_HEADERS = [
|
|
|
8678
8702
|
{ platform: "Teams", header: /^New message from (.+?) in the same Teams conversation:$/m },
|
|
8679
8703
|
{ platform: "Slack", header: /^New message from (.+?) in the same Slack thread:$/m }
|
|
8680
8704
|
];
|
|
8705
|
+
var TELEGRAM_FIRST_HEADER = "You received a message on Telegram.";
|
|
8706
|
+
var TELEGRAM_FOLLOW_UP_HEADER = /^New Telegram message from (\S+) in the same chat:$/;
|
|
8707
|
+
var TELEGRAM_TAIL = "\n\nHow to answer:\n- Reply with the ";
|
|
8708
|
+
function readTelegramPrompt(text) {
|
|
8709
|
+
const lineEnd3 = text.indexOf("\n");
|
|
8710
|
+
if (lineEnd3 < 0) return void 0;
|
|
8711
|
+
const header = text.slice(0, lineEnd3).trimEnd();
|
|
8712
|
+
const followUp = TELEGRAM_FOLLOW_UP_HEADER.exec(header);
|
|
8713
|
+
if (header !== TELEGRAM_FIRST_HEADER && !followUp) return void 0;
|
|
8714
|
+
const idLine = /^Message id:[^\n]*\n/m.exec(text);
|
|
8715
|
+
if (!idLine) return void 0;
|
|
8716
|
+
const start = idLine.index + idLine[0].length;
|
|
8717
|
+
const rest = text.slice(start).replace(/^\r?\n/, "");
|
|
8718
|
+
if (/^Message:\r?\n/.test(rest)) return void 0;
|
|
8719
|
+
const tail = text.lastIndexOf(TELEGRAM_TAIL);
|
|
8720
|
+
return {
|
|
8721
|
+
platform: "Telegram",
|
|
8722
|
+
context: "",
|
|
8723
|
+
userName: field(text.slice(lineEnd3, idLine.index), "From") || followUp?.[1] || "unknown",
|
|
8724
|
+
messageText: text.slice(start, tail > start ? tail : text.length).trim(),
|
|
8725
|
+
followUp: followUp !== null
|
|
8726
|
+
};
|
|
8727
|
+
}
|
|
8681
8728
|
function opensPrompt(text, headerIndex) {
|
|
8682
8729
|
const before = text.slice(0, headerIndex).trim();
|
|
8683
8730
|
return before === "" || before.startsWith("NOTE:");
|
|
@@ -8687,8 +8734,13 @@ function parseChannelMessage(rawText) {
|
|
|
8687
8734
|
if (!text) return void 0;
|
|
8688
8735
|
const legacy = readLegacyChannelHeader(text);
|
|
8689
8736
|
if (legacy) {
|
|
8690
|
-
const platform =
|
|
8691
|
-
const
|
|
8737
|
+
const platform = CHANNEL_PLATFORMS.find((p2) => p2 === legacy.platform) ?? "Slack";
|
|
8738
|
+
const rest = text.slice(legacy.length);
|
|
8739
|
+
const end = rest.lastIndexOf(`
|
|
8740
|
+
|
|
8741
|
+
\u2500\u2500 ${legacy.platform} instructions
|
|
8742
|
+
`);
|
|
8743
|
+
const messageText = end >= 0 ? rest.slice(0, end).trim() : cutAtTail(rest);
|
|
8692
8744
|
return {
|
|
8693
8745
|
platform,
|
|
8694
8746
|
context: legacy.context,
|
|
@@ -8697,6 +8749,8 @@ function parseChannelMessage(rawText) {
|
|
|
8697
8749
|
followUp: false
|
|
8698
8750
|
};
|
|
8699
8751
|
}
|
|
8752
|
+
const telegram = readTelegramPrompt(text);
|
|
8753
|
+
if (telegram) return telegram;
|
|
8700
8754
|
for (const shape of FIRST_MESSAGE_HEADERS) {
|
|
8701
8755
|
const m = shape.header.exec(text);
|
|
8702
8756
|
if (!m || !opensPrompt(text, m.index)) continue;
|
|
@@ -8830,6 +8884,12 @@ function utf8Bytes(text) {
|
|
|
8830
8884
|
return new TextEncoder().encode(text).length;
|
|
8831
8885
|
}
|
|
8832
8886
|
|
|
8887
|
+
// ../shared/src/space-slug.ts
|
|
8888
|
+
var SPACE_SLUG_MAX = 40;
|
|
8889
|
+
function spaceSlug(name) {
|
|
8890
|
+
return name.toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-").slice(0, SPACE_SLUG_MAX).replace(/^-+|-+$/g, "");
|
|
8891
|
+
}
|
|
8892
|
+
|
|
8833
8893
|
// ../shared/src/code-language.ts
|
|
8834
8894
|
var LANGUAGE_ALIASES = {
|
|
8835
8895
|
// web
|
|
@@ -10943,4 +11003,4 @@ smol-toml/dist/index.js:
|
|
|
10943
11003
|
*)
|
|
10944
11004
|
*/
|
|
10945
11005
|
|
|
10946
|
-
export { AVATAR_INK, CARD_TEXT_RATIO, COMMIT_CONFIRM_ATTEMPTS, COMMIT_CONFIRM_DELAY_MS, CREDITS_PER_DOLLAR, CURATED_SECTIONS, KATEX_FENCE_LANGUAGES, LANGUAGE_ALIASES, MAX_PROMPT_ATTACHMENTS_BYTES, MAX_PROMPT_ATTACHMENT_BYTES, MAX_PROMPT_ATTACHMENT_FILES, MAX_PROMPT_UPLOAD_FILENAME_BYTES, META_AGENT_DISPLAY_NAME, META_SANDBOX_SLUG, OTHER, PASTED_INLINE_MAX_BYTES, POPULAR_SECTION, PREVIEW_BUILDING_STATES, PREVIEW_STATE_MESSAGE, PROJECT_GLYPH_COLORS, PROJECT_GLYPH_NAMES, UNKNOWN_RATIO, UPLOAD_LIMITS, autoLinkUrls, avatarFill, buildWebhookSampleRequest, capitalizeWords, cardImageShape, cardListLayout, chalkColors, confirmCommitted, countInSection, dollarsToCredits, editConfigPrompt, errorCode, escapeCurrencyDollars, expandPastedContent, extractReadableHtml, fileTagBlocks, formatFileSize, formatRelative, formatUsdAsCredits, groupIntoSections, hasReferenceDefinitionOutsideFences, humanizeCategory, indexOfIgnoreCase, isAllowedWebPushHost, isAmbiguousCreateFailure, isMermaidCode, isMetaAgentName, languageLabel, looksLikeMarkdown, masonryColumns, neutralizePastedTags, newConfigPrompt, newPastedContentId, normalizeLanguage, normalizeLatexDelimiters, openMarkdownLinkAtEnd, parseBackgroundWorkers, parseBalanceUsd, parseChannelMessage, parseGrepOutput, parseManifestText, parseMemoryEntryOutput, parseMemorySearchOutput, parseReminderPrompt, parseRoomDigest, parseRoomPrompt, parseSessionGetOutput, parseSessionMessagesOutput, parseSessionMetadataOutput, parseSessionSearchHits, parseTriggerEvent, parseTriggerLines, prefersPreviewLink, prepareMarkdownForKatex, prepareMarkdownForMath, promptFileReferenceXml, ptyOutputBlock, ptySpawnedBody, pushTypeOf, referenceHeaders, removeSpans, replaceSpans, resolveRegisteredKey, safeHttpUrl, sandboxMediaPath, sanitizePromptUploadFilename, sectionKeyForCategory, sectionKeysForEntry, sectionTitle, selfClosingTags, serializePromptWithPastes, shouldTilePaste, skillDocumentBody, slackPlainText, slugifySlug, splitPastedContent, stripBashMetadata, stripChatMentionMarkup, stripMarkupForToolOutput, tagBlocks, toolRegistryCandidates, trimPastedText, truncateString, utf8Bytes, withoutEdgeQuotes, xmlBlocks };
|
|
11006
|
+
export { AVATAR_INK, CARD_TEXT_RATIO, COMMIT_CONFIRM_ATTEMPTS, COMMIT_CONFIRM_DELAY_MS, CREDITS_PER_DOLLAR, CURATED_SECTIONS, KATEX_FENCE_LANGUAGES, LANGUAGE_ALIASES, MAX_PROMPT_ATTACHMENTS_BYTES, MAX_PROMPT_ATTACHMENT_BYTES, MAX_PROMPT_ATTACHMENT_FILES, MAX_PROMPT_UPLOAD_FILENAME_BYTES, META_AGENT_DISPLAY_NAME, META_SANDBOX_SLUG, OTHER, PASTED_INLINE_MAX_BYTES, POLICY_SETS_UNSUPPORTED_PROVIDERS, POPULAR_SECTION, PREVIEW_BUILDING_STATES, PREVIEW_STATE_MESSAGE, PROJECT_GLYPH_COLORS, PROJECT_GLYPH_NAMES, UNKNOWN_RATIO, UPLOAD_LIMITS, appAdminsOnly, autoLinkUrls, avatarFill, buildWebhookSampleRequest, capitalizeWords, cardImageShape, cardListLayout, chalkColors, confirmCommitted, countInSection, dollarsToCredits, editConfigPrompt, errorCode, escapeCurrencyDollars, expandPastedContent, extractReadableHtml, fileTagBlocks, formatFileSize, formatRelative, formatUsdAsCredits, gridApps, groupIntoSections, hasReferenceDefinitionOutsideFences, humanizeCategory, indexOfIgnoreCase, isAllowedWebPushHost, isAmbiguousCreateFailure, isMermaidCode, isMetaAgentName, languageLabel, looksLikeMarkdown, masonryColumns, neutralizePastedTags, newConfigPrompt, newPastedContentId, normalizeLanguage, normalizeLatexDelimiters, openMarkdownLinkAtEnd, parseBackgroundWorkers, parseBalanceUsd, parseChannelMessage, parseGrepOutput, parseManifestText, parseMemoryEntryOutput, parseMemorySearchOutput, parseReminderPrompt, parseRoomDigest, parseRoomPrompt, parseSessionGetOutput, parseSessionMessagesOutput, parseSessionMetadataOutput, parseSessionSearchHits, parseTriggerEvent, parseTriggerLines, policySetNameError, prefersPreviewLink, prepareMarkdownForKatex, prepareMarkdownForMath, promptFileReferenceXml, ptyOutputBlock, ptySpawnedBody, pushTypeOf, referenceHeaders, removeSpans, replaceSpans, resolveRegisteredKey, safeHttpUrl, sandboxMediaPath, sanitizePromptUploadFilename, sectionKeyForCategory, sectionKeysForEntry, sectionTitle, selfClosingTags, serializePromptWithPastes, shouldTilePaste, skillDocumentBody, slackPlainText, slugifySlug, spaceSlug, splitPastedContent, stripBashMetadata, stripChatMentionMarkup, stripMarkupForToolOutput, tagBlocks, toolRegistryCandidates, trimPastedText, truncateString, utf8Bytes, withoutEdgeQuotes, xmlBlocks };
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The configuration of one App release: process groups,
|
|
3
|
+
* services (named ports), mounts (volumes), VM sizes, checks and the deploy
|
|
4
|
+
* strategy. `kortix.yaml` `apps.<name>` is the authored form; the
|
|
5
|
+
* CLI resolves it with `resolveAppReleaseConfig`, the API validates it again
|
|
6
|
+
* with `appReleaseConfigIssues` and stores the result on the release, and the
|
|
7
|
+
* deploy engine reads only the resolved form.
|
|
8
|
+
*
|
|
9
|
+
* Pure and dependency-free: the API, the CLI, the SDK and the manifest schema
|
|
10
|
+
* share it.
|
|
11
|
+
*/
|
|
12
|
+
export type AppDeployStrategy = 'rolling' | 'immediate' | 'bluegreen' | 'canary';
|
|
13
|
+
export type AppAutoStop = 'off' | 'stop' | 'suspend';
|
|
14
|
+
/** `public`: no gate. `app`: the App's access policy and Kortix sign-in. `admins`: project admins only. */
|
|
15
|
+
export type AppServiceAccess = 'public' | 'app' | 'admins';
|
|
16
|
+
export type AppServiceProtocol = 'http' | 'tcp';
|
|
17
|
+
export interface AppCheck {
|
|
18
|
+
type: 'http' | 'tcp';
|
|
19
|
+
/** Defaults to the service's `internal_port`. */
|
|
20
|
+
port?: number;
|
|
21
|
+
/** http only. */
|
|
22
|
+
path?: string;
|
|
23
|
+
interval_s: number;
|
|
24
|
+
timeout_s: number;
|
|
25
|
+
grace_period_s: number;
|
|
26
|
+
}
|
|
27
|
+
export interface AppService {
|
|
28
|
+
/** `http` is the primary service: it answers on the App's own host. */
|
|
29
|
+
name: string;
|
|
30
|
+
internal_port: number;
|
|
31
|
+
protocol: AppServiceProtocol;
|
|
32
|
+
access: AppServiceAccess;
|
|
33
|
+
auto_stop_machines: AppAutoStop;
|
|
34
|
+
auto_start_machines: boolean;
|
|
35
|
+
min_machines_running: number;
|
|
36
|
+
/** Process groups that serve this port. */
|
|
37
|
+
processes: string[];
|
|
38
|
+
checks: AppCheck[];
|
|
39
|
+
}
|
|
40
|
+
export interface AppMount {
|
|
41
|
+
/** Volume name. Each machine of the group gets its own volume of this name. */
|
|
42
|
+
source: string;
|
|
43
|
+
destination: string;
|
|
44
|
+
initial_size_gb: number;
|
|
45
|
+
snapshot_retention_days: number;
|
|
46
|
+
processes: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface AppVmSize {
|
|
49
|
+
cpu: number;
|
|
50
|
+
memory_gb: number;
|
|
51
|
+
/** Root disk; the data belongs on a mount. */
|
|
52
|
+
disk_gb: number;
|
|
53
|
+
/** Groups this size applies to; empty = every group without a more specific entry. */
|
|
54
|
+
processes: string[];
|
|
55
|
+
}
|
|
56
|
+
export interface AppDeployConfig {
|
|
57
|
+
strategy: AppDeployStrategy;
|
|
58
|
+
/** Runs once per release in a temporary machine (new image, secrets, no mounts) before machines update. */
|
|
59
|
+
release_command: string | null;
|
|
60
|
+
}
|
|
61
|
+
export interface AppReleaseConfig {
|
|
62
|
+
/** Group name → command. `""` runs the image's own command. */
|
|
63
|
+
processes: Record<string, string>;
|
|
64
|
+
services: AppService[];
|
|
65
|
+
mounts: AppMount[];
|
|
66
|
+
vm: AppVmSize[];
|
|
67
|
+
deploy: AppDeployConfig;
|
|
68
|
+
}
|
|
69
|
+
/** The authored form: every field optional, plus the shorthands Apps had before this model. */
|
|
70
|
+
export interface AppReleaseConfigInput {
|
|
71
|
+
processes?: Record<string, string>;
|
|
72
|
+
http_service?: Partial<Omit<AppService, 'name' | 'checks'>> & {
|
|
73
|
+
checks?: Array<Partial<AppCheck>>;
|
|
74
|
+
};
|
|
75
|
+
services?: Array<Partial<Omit<AppService, 'checks'>> & {
|
|
76
|
+
checks?: Array<Partial<AppCheck>>;
|
|
77
|
+
}>;
|
|
78
|
+
mounts?: Array<Partial<AppMount>>;
|
|
79
|
+
vm?: Partial<AppVmSize> | Array<Partial<AppVmSize>>;
|
|
80
|
+
deploy?: Partial<AppDeployConfig>;
|
|
81
|
+
/** Shorthands. */
|
|
82
|
+
port?: number;
|
|
83
|
+
command?: string;
|
|
84
|
+
readiness_path?: string;
|
|
85
|
+
always_on?: boolean;
|
|
86
|
+
resources?: {
|
|
87
|
+
cpu?: number;
|
|
88
|
+
memory_gb?: number;
|
|
89
|
+
disk_gb?: number;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export interface AppConfigIssue {
|
|
93
|
+
path: string;
|
|
94
|
+
message: string;
|
|
95
|
+
}
|
|
96
|
+
export declare const DEFAULT_PROCESS_GROUP = "app";
|
|
97
|
+
export declare const PRIMARY_SERVICE = "http";
|
|
98
|
+
/** Ports the App supervisor owns inside every machine. */
|
|
99
|
+
export declare const RESERVED_APP_PORTS: readonly [7331, 8080];
|
|
100
|
+
export declare const APP_VM_LIMITS: {
|
|
101
|
+
readonly cpu: {
|
|
102
|
+
readonly min: 1;
|
|
103
|
+
readonly max: 32;
|
|
104
|
+
};
|
|
105
|
+
readonly memory_gb: {
|
|
106
|
+
readonly min: 1;
|
|
107
|
+
readonly max: 128;
|
|
108
|
+
};
|
|
109
|
+
readonly disk_gb: {
|
|
110
|
+
readonly min: 1;
|
|
111
|
+
readonly max: 500;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
export declare const DEFAULT_APP_VM: {
|
|
115
|
+
readonly cpu: 1;
|
|
116
|
+
readonly memory_gb: 2;
|
|
117
|
+
readonly disk_gb: 10;
|
|
118
|
+
};
|
|
119
|
+
export declare const DEFAULT_SNAPSHOT_RETENTION_DAYS = 5;
|
|
120
|
+
export declare const MAX_SNAPSHOT_RETENTION_DAYS = 60;
|
|
121
|
+
/** Platinum caps a volume at 100 GiB (its largest size class). */
|
|
122
|
+
export declare const MAX_VOLUME_GB = 100;
|
|
123
|
+
/**
|
|
124
|
+
* The resolved release config. Shorthands map onto the full fields:
|
|
125
|
+
* `port` → `http_service.internal_port`, `command` → `processes.app`,
|
|
126
|
+
* `readiness_path` → an http check, `always_on` → `auto_stop_machines: off` and
|
|
127
|
+
* `min_machines_running: 1` (`false`: `stop` and 0), `resources` → the default VM.
|
|
128
|
+
* An explicit full field wins over its shorthand.
|
|
129
|
+
*/
|
|
130
|
+
export declare function resolveAppReleaseConfig(input?: AppReleaseConfigInput): AppReleaseConfig;
|
|
131
|
+
/** Every rule the deploy engine relies on. Empty = valid. */
|
|
132
|
+
export declare function appReleaseConfigIssues(config: AppReleaseConfig): AppConfigIssue[];
|
|
133
|
+
/** The VM size of one process group: its own entry, else the default entry, else the platform default. */
|
|
134
|
+
export declare function appVmFor(config: AppReleaseConfig, group: string): Omit<AppVmSize, 'processes'>;
|
|
135
|
+
/** The mount a machine of this group gets, or null. */
|
|
136
|
+
export declare function appMountFor(config: AppReleaseConfig, group: string): AppMount | null;
|
|
137
|
+
/** The services a machine of this group serves. */
|
|
138
|
+
export declare function appServicesFor(config: AppReleaseConfig, group: string): AppService[];
|
|
139
|
+
/**
|
|
140
|
+
* Where Kortix shows an App (`kortix.yaml` `apps.<name>.display`). Presentation
|
|
141
|
+
* only: nothing about how the App runs or who may open it changes.
|
|
142
|
+
*/
|
|
143
|
+
export interface AppDisplay {
|
|
144
|
+
/** A card in the Apps grid. Default false: an App is on the Apps page only when registered with `listed: true`. A `parent` puts it in that App's tabs instead. */
|
|
145
|
+
listed?: boolean;
|
|
146
|
+
/** The card thumbnail: `live` frames the App, `none` shows an icon. Default `live`. */
|
|
147
|
+
preview?: 'live' | 'none';
|
|
148
|
+
/** The App, by slug, whose detail shows this one as a tab (a backend's admin dashboard). */
|
|
149
|
+
parent?: string;
|
|
150
|
+
}
|
|
151
|
+
/** What the Apps grid reads of an App: the web's `App` and the API's App JSON both fit. */
|
|
152
|
+
export interface GridApp {
|
|
153
|
+
slug: string;
|
|
154
|
+
display?: AppDisplay | null;
|
|
155
|
+
services?: ReadonlyArray<{
|
|
156
|
+
name: string;
|
|
157
|
+
access?: string | null;
|
|
158
|
+
}> | null;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Its primary service is `access: admins` (a backend's admin dashboard): only
|
|
162
|
+
* project admins can open it, so nobody else is shown a card or tab for it.
|
|
163
|
+
*/
|
|
164
|
+
export declare function appAdminsOnly(app: GridApp): boolean;
|
|
165
|
+
/**
|
|
166
|
+
* The Apps the grid shows as cards (`display`): registered with `listed: true`,
|
|
167
|
+
* not a tab of a parent in the same list, and not admins-only for a non-admin.
|
|
168
|
+
* A tab whose parent is gone stays reachable as a card. Background Apps (a
|
|
169
|
+
* poller, a bot, a backend) stay out of the grid unless their author registers
|
|
170
|
+
* them. The Apps page, a channel's Apps tab and the channel's Apps count all
|
|
171
|
+
* apply this one rule.
|
|
172
|
+
*/
|
|
173
|
+
export declare function gridApps<T extends GridApp>(apps: readonly T[], canAdmin?: boolean): T[];
|
|
174
|
+
/** What is wrong with an authored `display` block of the App `slug`. Paths are relative to the block. */
|
|
175
|
+
export declare function appDisplayIssues(display: unknown, slug: string): AppConfigIssue[];
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Recognise a channel-originated user message (Slack, Microsoft Teams,
|
|
3
|
-
* Telegram) inside the raw prompt text the API scaffolds for the agent, and
|
|
3
|
+
* Telegram, email) inside the raw prompt text the API scaffolds for the agent, and
|
|
4
4
|
* pull out what a person wants to see: who wrote it, where, and the words they
|
|
5
5
|
* typed — not the tenant ids and the `How to work:` instructions.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* `channelPromptText` below writes the current shape, so its writer and reader
|
|
8
|
+
* are one module. Every other shape is produced by exactly one API renderer:
|
|
8
9
|
*
|
|
9
10
|
* | Shape | Producer |
|
|
10
11
|
* | --- | --- |
|
|
12
|
+
* | `[<Platform> · <where> · message from <sender>]`, the text, then `── <Platform> instructions` after a blank line | `channelPromptText` (this module) |
|
|
11
13
|
* | `You're answering a message on Slack as a teammate.` | `channels/slack/session.ts` renderAgentPrompt |
|
|
12
14
|
* | `New message from <user> in Slack channel <channel>, thread <ts>:` | `channels/slack/session.ts` renderFollowUpPrompt |
|
|
13
15
|
* | `New message from <user> in the same Slack thread:` | the same renderer before 2026-09, kept for old transcripts |
|
|
14
16
|
* | `You're answering a message on Microsoft Teams as a teammate.` | `channels/teams/session.ts` renderAgentPrompt |
|
|
15
17
|
* | `New message from <user> in the same Teams conversation:` | `channels/teams/session.ts` renderFollowUpPrompt |
|
|
16
|
-
* | `You received a message on Telegram.` |
|
|
17
|
-
* | `
|
|
18
|
+
* | `You received a message on Telegram.` + `Chat:`/`From:`/`Message id:`, the text, `How to answer:` | the Telegram renderer from 2026-10-24 until `channelPromptText`, kept so old transcripts still render |
|
|
19
|
+
* | `New Telegram message from <user> in the same chat:` + the same block | the same renderer, kept so old transcripts still render |
|
|
20
|
+
* | `You received a message on Telegram.` + a `Message:` line | the retired one-session-per-message Telegram webhook (removed 2026-10-24), kept so old transcripts still render |
|
|
21
|
+
* | `[<Platform> · <context> · message from <user>]` with no such delimiter | the pre-2026 header, kept so old transcripts still render |
|
|
18
22
|
*
|
|
19
23
|
* The parser is pure and framework-free so `channel-message.test.ts` can pin
|
|
20
24
|
* each shape against the real prompt text. The web and mobile session views
|
|
@@ -25,7 +29,9 @@
|
|
|
25
29
|
* attempt. The pre-2026 header regex and the `<at>` strip did: 240k characters
|
|
26
30
|
* took 22 s and 7 s.
|
|
27
31
|
*/
|
|
28
|
-
|
|
32
|
+
/** The platform words a header names. Any other word reads as Slack, as every deployed build reads it. */
|
|
33
|
+
export declare const CHANNEL_PLATFORMS: readonly ["Slack", "Teams", "Telegram", "Email"];
|
|
34
|
+
export type ChannelPlatform = (typeof CHANNEL_PLATFORMS)[number];
|
|
29
35
|
export interface ChannelMessageInfo {
|
|
30
36
|
platform: ChannelPlatform;
|
|
31
37
|
/** Channel / conversation / chat id; empty for a follow-up, which carries none. */
|
|
@@ -36,3 +42,26 @@ export interface ChannelMessageInfo {
|
|
|
36
42
|
followUp: boolean;
|
|
37
43
|
}
|
|
38
44
|
export declare function parseChannelMessage(rawText: string | null | undefined): ChannelMessageInfo | undefined;
|
|
45
|
+
/** What a channel adapter knows about one incoming message; `channelPromptText` writes it. */
|
|
46
|
+
export interface ChannelEnvelope {
|
|
47
|
+
platform: ChannelPlatform;
|
|
48
|
+
/** What a person reads: `@sam`, `Sam Rivera`, `a@b.c`. */
|
|
49
|
+
sender: string;
|
|
50
|
+
/** The chat title, `direct message`, or an email subject. */
|
|
51
|
+
where: string;
|
|
52
|
+
/** The person's words, or a question answer. */
|
|
53
|
+
text: string;
|
|
54
|
+
/** One shell command that answers THIS message. */
|
|
55
|
+
reply: string;
|
|
56
|
+
/** Ids, limits and platform rules: for the agent only, one line each. */
|
|
57
|
+
notes: string[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The prompt for one channel message. The header line is the one every client
|
|
61
|
+
* build reads (`readLegacyChannelHeader`), the text follows unchanged, and the
|
|
62
|
+
* agent-only lines start at the last `── <Platform> instructions` line, where
|
|
63
|
+
* `parseChannelMessage` cuts.
|
|
64
|
+
*/
|
|
65
|
+
export declare function channelPromptText(e: ChannelEnvelope, opts?: {
|
|
66
|
+
revived?: boolean;
|
|
67
|
+
}): string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A channel's slug from its name: lowercase, whitespace runs → `-`, other
|
|
3
|
+
* characters dropped, `-` runs collapsed and trimmed, at most 40 characters.
|
|
4
|
+
* Empty when the name has no `a-z0-9`. The API derives the stored slug with
|
|
5
|
+
* this function, and the create dialog previews it, so the two never differ.
|
|
6
|
+
*/
|
|
7
|
+
export declare function spaceSlug(name: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Where every private channel's folder lives: outside `/Company`, so the
|
|
10
|
+
* project grant on `/Company` and project admins never reach it. Only the
|
|
11
|
+
* channel's members (one grant each) and the channel's own threads do. The
|
|
12
|
+
* folder is named by the channel's id, never its name: a rename moves
|
|
13
|
+
* nothing, and a later channel that takes the name never inherits the folder.
|
|
14
|
+
* Only `/Channels/<space_id>` of a private channel of the project is reserved;
|
|
15
|
+
* any other path under `/Channels` is an ordinary folder (the API's
|
|
16
|
+
* `privateChannelFolderOf`).
|
|
17
|
+
*/
|
|
18
|
+
export declare const PRIVATE_CHANNELS_DIR = "/Channels";
|
|
19
|
+
/**
|
|
20
|
+
* A space's two folders in the project's Files (drive paths). A public
|
|
21
|
+
* channel's are shared with the project: `/Company/Channels/<slug>` and its
|
|
22
|
+
* `Memory`. A private channel's are `/Channels/<space_id>` and its `Memory`
|
|
23
|
+
* (pass its id as `privateSpaceId`). A DM's
|
|
24
|
+
* are in the member's own folder: `<personal>/Agents/<agent>` and its
|
|
25
|
+
* memory `<personal>/Memory/<agent>` (the agent folder of the DM's Memory
|
|
26
|
+
* tab, which also lists the rest of `<personal>/Memory`). Null for a DM without a personal folder,
|
|
27
|
+
* and for a name that is not one plain path segment (an agent name is not
|
|
28
|
+
* validated as one when the DM is opened).
|
|
29
|
+
* The API (folder create, rename, the session's /drives/README.md) and the web
|
|
30
|
+
* tabs read this, so both name the same folders.
|
|
31
|
+
*/
|
|
32
|
+
export declare function spaceDriveFolders(kind: 'channel' | 'dm', name: string, personalFolder: string | null,
|
|
33
|
+
/** A private channel's id; null for a public channel or a DM. */
|
|
34
|
+
privateSpaceId?: string | null): {
|
|
35
|
+
files: string;
|
|
36
|
+
memory: string;
|
|
37
|
+
} | null;
|
|
@@ -18,5 +18,5 @@ import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
|
18
18
|
export function AccessDetailShell({ back, avatar, title, badges, meta, actions, tabs, activeTab, onTabChange, loading = false, children, className, }) {
|
|
19
19
|
const backContent = back ? (_jsxs(_Fragment, { children: [_jsx(CaretLeftIcon, { className: "size-4" }), back.label] })) : null;
|
|
20
20
|
const backClass = 'text-muted-foreground hover:text-foreground flex w-fit items-center gap-1 text-sm transition-colors';
|
|
21
|
-
return (_jsxs("div", { className: cn('mx-auto w-full max-w-6xl space-y-5 pb-10', className), children: [_jsxs("div", { className: "space-y-5", children: [!back ? null : back.href ? (_jsx(Link, { href: back.href, className: backClass, children: backContent })) : (_jsx("button", { type: "button", onClick: back.onClick, className: backClass, children: backContent })), _jsxs("div", { className: "flex min-w-0 items-
|
|
21
|
+
return (_jsxs("div", { className: cn('mx-auto w-full max-w-6xl space-y-5 pb-10', className), children: [_jsxs("div", { className: "space-y-5", children: [!back ? null : back.href ? (_jsx(Link, { href: back.href, className: backClass, children: backContent })) : (_jsx("button", { type: "button", onClick: back.onClick, className: backClass, children: backContent })), _jsxs("div", { className: "flex min-w-0 items-center gap-3.5", children: [loading ? _jsx(Skeleton, { className: "size-10 rounded-md" }) : avatar, _jsxs("div", { className: "min-w-0 flex-1 space-y-0.5", children: [loading ? (_jsx(Skeleton, { className: "h-6 w-44" })) : (_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("h2", { className: "text-foreground truncate text-base leading-6 font-medium", children: title }), badges] })), meta ? _jsx("div", { className: "text-muted-foreground truncate text-sm", children: meta }) : null] }), actions ? _jsx("div", { className: "flex shrink-0 items-center gap-2", children: actions }) : null] })] }), tabs && tabs.length > 0 ? (_jsxs(Tabs, { value: activeTab, onValueChange: onTabChange, className: "space-y-6", children: [_jsx(TabsList, { type: "underline", className: "flex w-full items-center justify-start", children: tabs.map((tab) => (_jsxs(TabsTrigger, { value: tab.value, className: "w-fit flex-none", children: [tab.label, tab.badge] }, tab.value))) }), children] })) : (_jsx("div", { className: "space-y-6", children: children }))] }));
|
|
22
22
|
}
|
|
@@ -88,3 +88,14 @@ export interface PrincipalPickerProps {
|
|
|
88
88
|
className?: string;
|
|
89
89
|
}
|
|
90
90
|
export declare function PrincipalPicker({ scope, selection, kinds, allowInvite, everyone, excludeUserIds, value, onChange, emptyLabel, allExcludedLabel, autoFocus, disabled, searchPlaceholder, className, }: PrincipalPickerProps): import("react").JSX.Element;
|
|
91
|
+
/** One picker row. Exported for the channel "Add members" picker, which moves `highlighted` with the arrow keys. */
|
|
92
|
+
export declare function PickerRow({ selected, selection, highlighted, disabled, onSelect, leading, label, suffix, }: {
|
|
93
|
+
selected: boolean;
|
|
94
|
+
selection: 'single' | 'multi';
|
|
95
|
+
highlighted?: boolean;
|
|
96
|
+
disabled?: boolean;
|
|
97
|
+
onSelect: () => void;
|
|
98
|
+
leading: React.ReactNode;
|
|
99
|
+
label: string;
|
|
100
|
+
suffix?: string;
|
|
101
|
+
}): import("react").JSX.Element;
|
|
@@ -267,6 +267,7 @@ export function PrincipalPicker({ scope, selection = 'multi', kinds = ['member',
|
|
|
267
267
|
function PickerSectionLabel({ children }) {
|
|
268
268
|
return (_jsx("p", { className: "text-muted-foreground px-2 pt-2 pb-1 text-xs font-medium first:pt-1.5", children: children }));
|
|
269
269
|
}
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
/** One picker row. Exported for the channel "Add members" picker, which moves `highlighted` with the arrow keys. */
|
|
271
|
+
export function PickerRow({ selected, selection, highlighted = false, disabled, onSelect, leading, label, suffix, }) {
|
|
272
|
+
return (_jsxs("button", { type: "button", role: selection === 'single' ? 'radio' : undefined, "aria-checked": selection === 'single' ? selected : undefined, "aria-pressed": selection === 'multi' ? selected : undefined, disabled: disabled, onClick: onSelect, className: cn('flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left transition-colors', 'disabled:cursor-not-allowed disabled:opacity-50', selected ? 'bg-primary/[0.06]' : highlighted ? 'bg-muted/50' : 'hover:bg-muted/50'), children: [leading, _jsxs("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm", children: [label, suffix ? _jsx("span", { className: "text-muted-foreground ml-1 text-xs", children: suffix }) : null] }), selected ? (_jsx("span", { className: "shrink-0 px-1", children: _jsx(CheckCircleIcon, { weight: "fill", className: "size-[1.1rem]" }) })) : null] }));
|
|
272
273
|
}
|
|
@@ -12,6 +12,8 @@ export declare function ensureFrame(key: string, url: string, attributes: {
|
|
|
12
12
|
title: string;
|
|
13
13
|
sandbox: string;
|
|
14
14
|
allow: string;
|
|
15
|
+
testid?: string;
|
|
16
|
+
referrerPolicy?: ReferrerPolicy;
|
|
15
17
|
}): void;
|
|
16
18
|
/** Show the frame in `slot`. Returns the release: the frame goes back to the previous claim. */
|
|
17
19
|
export declare function claimFrame(key: string, slot: HTMLElement, placement: FramePlacement): () => void;
|
|
@@ -19,8 +21,11 @@ export declare function claimFrame(key: string, slot: HTMLElement, placement: Fr
|
|
|
19
21
|
export declare function restyleFrame(key: string, slot: HTMLElement, placement: FramePlacement): void;
|
|
20
22
|
/** Load the App again from `url` (a fresh access session). */
|
|
21
23
|
export declare function reloadFrame(key: string, url: string): void;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Drop every frame whose key is not in `keep` (a new release, a deleted App,
|
|
26
|
+
* another project). `owns` limits the sweep to one kind of frame.
|
|
27
|
+
*/
|
|
28
|
+
export declare function pruneFrames(keep: Set<string>, owns?: (key: string) => boolean): void;
|
|
24
29
|
/** The frame's load status, or null before it exists. */
|
|
25
30
|
export declare function frameStatus(key: string): FrameStatus | null;
|
|
26
31
|
export declare function useFrameStatus(key: string): FrameStatus | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
/**
|
|
3
|
-
* One live frame per App preview, kept for as long as
|
|
3
|
+
* One live frame per App preview (and per artifact page), kept for as long as
|
|
4
|
+
* the project is open.
|
|
4
5
|
*
|
|
5
6
|
* A card thumbnail and the big view used to each own an `<iframe>`, so every
|
|
6
7
|
* page switch and every open loaded the App again. Here a frame is created
|
|
@@ -76,7 +77,9 @@ export function ensureFrame(key, url, attributes) {
|
|
|
76
77
|
frame.title = attributes.title;
|
|
77
78
|
frame.setAttribute('sandbox', attributes.sandbox);
|
|
78
79
|
frame.allow = attributes.allow;
|
|
79
|
-
frame.dataset.testid = 'app-live-preview';
|
|
80
|
+
frame.dataset.testid = attributes.testid ?? 'app-live-preview';
|
|
81
|
+
if (attributes.referrerPolicy)
|
|
82
|
+
frame.referrerPolicy = attributes.referrerPolicy;
|
|
80
83
|
frame.dataset.frameKey = key;
|
|
81
84
|
const entry = { frame, status: 'loading', claims: [] };
|
|
82
85
|
frame.addEventListener('load', () => {
|
|
@@ -127,11 +130,14 @@ export function reloadFrame(key, url) {
|
|
|
127
130
|
entry.frame.src = url;
|
|
128
131
|
notify();
|
|
129
132
|
}
|
|
130
|
-
/**
|
|
131
|
-
|
|
133
|
+
/**
|
|
134
|
+
* Drop every frame whose key is not in `keep` (a new release, a deleted App,
|
|
135
|
+
* another project). `owns` limits the sweep to one kind of frame.
|
|
136
|
+
*/
|
|
137
|
+
export function pruneFrames(keep, owns = () => true) {
|
|
132
138
|
let changed = false;
|
|
133
139
|
for (const [key, entry] of entries) {
|
|
134
|
-
if (keep.has(key) || entry.claims.length > 0)
|
|
140
|
+
if (!owns(key) || keep.has(key) || entry.claims.length > 0)
|
|
135
141
|
continue;
|
|
136
142
|
entry.frame.remove();
|
|
137
143
|
entries.delete(key);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UiTranslator } from '../i18n/index.js';
|
|
2
|
-
import { type App, type AppAccessMode, type AppCapability, type AppDeployment, type AppViewerTokenScope } from '@kortix/sdk';
|
|
2
|
+
import { type App, type AppAccessMode, type AppCapability, type AppDeployment, type AppViewerTokenScope, type ProjectTrigger } from '@kortix/sdk';
|
|
3
3
|
type DeploymentTone = 'success' | 'destructive' | 'warning' | 'muted';
|
|
4
4
|
/**
|
|
5
5
|
* Every deployment status, in words a person who did not build this can read.
|
|
@@ -65,31 +65,39 @@ export declare function appStatus(app: App, tI18nComplete: UiTranslator): {
|
|
|
65
65
|
label: string;
|
|
66
66
|
dot: string;
|
|
67
67
|
};
|
|
68
|
+
export { appAdminsOnly, gridApps } from '../_vendor/shared/app-config.js';
|
|
69
|
+
/** The Apps of the project that are neither a card nor a tab: the ones the page counts as hidden. */
|
|
70
|
+
export declare function hiddenApps(apps: App[], canAdmin?: boolean): App[];
|
|
68
71
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* control shows only for the Apps that support it.
|
|
72
|
+
* How an App is wired into the project's triggers: the ones that call it
|
|
73
|
+
* (`run: { app }`) and the ones its own events start (`on: { event, app }`).
|
|
72
74
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
export declare function appTriggers(app: App, triggers: ProjectTrigger[]): {
|
|
76
|
+
calledBy: ProjectTrigger[];
|
|
77
|
+
startsOn: ProjectTrigger[];
|
|
78
|
+
};
|
|
79
|
+
/** The one-line state of the Background list: how many Apps are up, asleep, not deployed, external. */
|
|
80
|
+
export declare function backgroundSummary(apps: App[]): {
|
|
81
|
+
running: number;
|
|
82
|
+
asleep: number;
|
|
83
|
+
undeployed: number;
|
|
84
|
+
external: number;
|
|
85
|
+
};
|
|
78
86
|
/** The Apps `app`'s detail shows as tabs (their `display.parent` is its slug). */
|
|
79
87
|
export declare function childApps(apps: App[], app: App, canAdmin?: boolean): App[];
|
|
80
|
-
/**
|
|
81
|
-
* Its primary service is `access: admins` (a backend's admin dashboard): only
|
|
82
|
-
* project admins can open it, so nobody else is shown a card or tab for it.
|
|
83
|
-
*/
|
|
84
88
|
/**
|
|
85
89
|
* The App whose live preview a card shows: the App itself, or, when it hides
|
|
86
90
|
* its own (`display.preview: none`), its first tab the viewer may open (a
|
|
87
91
|
* backend's dashboard). Null: the card shows an icon.
|
|
88
92
|
*/
|
|
89
93
|
export declare function cardPreviewApp(apps: App[], app: App, canAdmin?: boolean): App | null;
|
|
90
|
-
export declare function appAdminsOnly(app: App): boolean;
|
|
91
94
|
/** A tab's label: the App's name without its parent's slug ("crm-data-dashboard" → "Dashboard"). */
|
|
92
95
|
export declare function appTabLabel(child: App, parent: App): string;
|
|
96
|
+
/**
|
|
97
|
+
* Does this App offer `capability`? The ONE way the Apps UI branches between
|
|
98
|
+
* Apps: the server lists what each App supports (`app.capabilities`), and a
|
|
99
|
+
* control shows only for the Apps that support it.
|
|
100
|
+
*/
|
|
93
101
|
export declare function appCan(app: App, capability: AppCapability): boolean;
|
|
94
102
|
/** "2 vCPU · 4 GB · 20 GB": the machine size of an App. */
|
|
95
103
|
export declare function appSizeLabel(app: App, t: UiTranslator): string;
|
|
@@ -151,4 +159,3 @@ export declare function localizedAppCopy(tI18nComplete: UiTranslator): {
|
|
|
151
159
|
desc: string;
|
|
152
160
|
}>;
|
|
153
161
|
};
|
|
154
|
-
export {};
|