@kortix/ui 0.14.8 → 0.14.10
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 +116 -3
- package/dist/_vendor/shared/app-config.d.ts +175 -0
- package/dist/_vendor/shared/artifact-comments.d.ts +235 -0
- package/dist/_vendor/shared/channel-descriptors.d.ts +96 -0
- package/dist/_vendor/shared/channel-message.d.ts +45 -5
- package/dist/_vendor/shared/index.d.ts +2 -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 +30 -7
- 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 +55 -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 +21 -28
- 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 +10 -0
- package/dist/customize/sections/view/channels-view.d.ts +6 -1
- package/dist/customize/sections/view/channels-view.js +72 -81
- package/dist/customize/sections/view/gateway/gateway-overview.js +10 -2
- package/dist/customize/settings/rail.js +9 -0
- package/dist/customize/settings/settings-tabs.d.ts +1 -1
- package/dist/customize/settings/settings-tabs.js +1 -0
- package/dist/customize/settings/tabs/chrome-connections-tab.d.ts +6 -0
- package/dist/customize/settings/tabs/chrome-connections-tab.js +99 -0
- package/dist/customize/settings/tabs/experimental-tab.js +35 -16
- package/dist/customize/shared/catalog/catalog-empty-state.d.ts +4 -15
- package/dist/customize/shared/catalog/catalog-empty-state.js +9 -7
- 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 +48 -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 +1062 -85
- package/dist/i18n/en.js +1078 -101
- 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/apps-and-extensions/apps-modal.d.ts +9 -0
- package/dist/internal/apps-and-extensions/apps-modal.js +107 -0
- package/dist/internal/auth/auth-card-shell.js +3 -3
- package/dist/internal/chrome/browser-icon.d.ts +24 -0
- package/dist/internal/chrome/browser-icon.js +58 -0
- package/dist/internal/chrome/chrome-card-state.d.ts +16 -0
- package/dist/internal/chrome/chrome-card-state.js +9 -0
- package/dist/internal/chrome/chrome-connect.d.ts +69 -0
- package/dist/internal/chrome/chrome-connect.js +178 -0
- package/dist/internal/chrome/chrome-mock.d.ts +4 -0
- package/dist/internal/chrome/chrome-mock.js +15 -0
- package/dist/internal/chrome/chrome-names.d.ts +15 -0
- package/dist/internal/chrome/chrome-names.js +35 -0
- package/dist/internal/chrome/extension.d.ts +47 -0
- package/dist/internal/chrome/extension.js +91 -0
- package/dist/internal/chrome/use-chrome-offered.d.ts +11 -0
- package/dist/internal/chrome/use-chrome-offered.js +22 -0
- package/dist/internal/components/agent-mark.js +5 -2
- package/dist/internal/connector-logo/connector-logo-source.d.ts +64 -0
- package/dist/internal/connector-logo/connector-logo-source.js +49 -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/edge.d.ts +5 -0
- package/dist/internal/icons/edge.js +10 -0
- 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/extensions.js +17 -3
- 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/detect-os.d.ts +43 -0
- package/dist/internal/lib/detect-os.js +70 -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 +13 -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/apps-modal-store.d.ts +8 -0
- package/dist/internal/stores/apps-modal-store.js +6 -0
- package/dist/internal/stores/composer-prefill-store.d.ts +12 -5
- 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 +9 -3
- 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/empty-state.d.ts +2 -2
- package/dist/primitives/empty-state.js +6 -5
- 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-audit-shared.js +3 -1
- 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 +8 -2
- package/dist/session/participants/session-participants.js +11 -4
- package/dist/session/prompts/approval-request.d.ts +5 -0
- package/dist/session/prompts/approval-request.js +9 -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 +15 -1
- package/dist/session/thread/session-thread.js +20 -3
- package/dist/session/thread/session-transcript-class.d.ts +5 -1
- package/dist/session/thread/session-transcript-class.js +5 -1
- 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 +241 -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 +14 -6
- package/dist/session/turn/user-message.js +35 -15
- 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/session-label-badges.js +2 -1
- 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-chrome-nav.d.ts +10 -0
- package/dist/workspace/sidebar/footer/project-chrome-nav.js +56 -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 +13 -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 +67 -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 +29 -5
- 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,72 @@ 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
|
+
|
|
6980
|
+
// ../shared/src/channel-descriptors.ts
|
|
6981
|
+
var CHANNEL_PLATFORM_IDS = ["slack", "teams", "email", "telegram"];
|
|
6982
|
+
var CHANNELS = {
|
|
6983
|
+
slack: {
|
|
6984
|
+
label: "Slack",
|
|
6985
|
+
envelope: "Slack",
|
|
6986
|
+
catalog: {
|
|
6987
|
+
domain: "slack.com",
|
|
6988
|
+
description: "Message the agent in Slack: mentions, DMs and channels, through the Kortix Slack app."
|
|
6989
|
+
}
|
|
6990
|
+
},
|
|
6991
|
+
teams: {
|
|
6992
|
+
label: "Microsoft Teams",
|
|
6993
|
+
envelope: "Teams",
|
|
6994
|
+
catalog: {
|
|
6995
|
+
domain: "teams.microsoft.com",
|
|
6996
|
+
description: "Message the agent in Microsoft Teams chats and channels, through the Kortix Teams app."
|
|
6997
|
+
},
|
|
6998
|
+
buttons: { max: 6 }
|
|
6999
|
+
},
|
|
7000
|
+
email: {
|
|
7001
|
+
label: "Email",
|
|
7002
|
+
envelope: "Email",
|
|
7003
|
+
catalog: { domain: "email.kortix", description: "Give the project an inbox: people email the agent and it replies." }
|
|
7004
|
+
},
|
|
7005
|
+
telegram: {
|
|
7006
|
+
label: "Telegram",
|
|
7007
|
+
envelope: "Telegram",
|
|
7008
|
+
catalog: { domain: "telegram.org", description: "Message the agent from Telegram through a bot you own." },
|
|
7009
|
+
messageChars: 4096,
|
|
7010
|
+
buttons: { max: 6, dataBytes: 64 },
|
|
7011
|
+
// A bot token is `<bot id>:<secret>`.
|
|
7012
|
+
connect: { tokenPattern: /^\d{5,15}:[A-Za-z0-9_-]{30,64}$/, tokenPlaceholder: "123456789:\u2026" },
|
|
7013
|
+
access: {
|
|
7014
|
+
userId: /^\d{1,20}$/,
|
|
7015
|
+
idPlaceholder: "123456789",
|
|
7016
|
+
idsPlaceholder: "123456789, 987654321",
|
|
7017
|
+
idInputMode: "numeric"
|
|
7018
|
+
}
|
|
7019
|
+
}
|
|
7020
|
+
};
|
|
7021
|
+
var isChannelPlatform = (platform) => CHANNEL_PLATFORM_IDS.includes(platform);
|
|
7022
|
+
|
|
6957
7023
|
// ../manifest-schema/src/slug.ts
|
|
6958
7024
|
var SLUG_MAX_LENGTH = 128;
|
|
6959
7025
|
function trimSeparators(value) {
|
|
@@ -8600,6 +8666,7 @@ function readSlackFollowUpHeader(line) {
|
|
|
8600
8666
|
}
|
|
8601
8667
|
|
|
8602
8668
|
// ../shared/src/channel-message.ts
|
|
8669
|
+
var CHANNEL_PLATFORMS = CHANNEL_PLATFORM_IDS.map((id) => CHANNELS[id].envelope);
|
|
8603
8670
|
var TAIL_MARKERS = [
|
|
8604
8671
|
/^How to work:/m,
|
|
8605
8672
|
/^Attached files \(download with/m,
|
|
@@ -8678,6 +8745,29 @@ var FOLLOW_UP_HEADERS = [
|
|
|
8678
8745
|
{ platform: "Teams", header: /^New message from (.+?) in the same Teams conversation:$/m },
|
|
8679
8746
|
{ platform: "Slack", header: /^New message from (.+?) in the same Slack thread:$/m }
|
|
8680
8747
|
];
|
|
8748
|
+
var TELEGRAM_FIRST_HEADER = "You received a message on Telegram.";
|
|
8749
|
+
var TELEGRAM_FOLLOW_UP_HEADER = /^New Telegram message from (\S+) in the same chat:$/;
|
|
8750
|
+
var TELEGRAM_TAIL = "\n\nHow to answer:\n- Reply with the ";
|
|
8751
|
+
function readTelegramPrompt(text) {
|
|
8752
|
+
const lineEnd3 = text.indexOf("\n");
|
|
8753
|
+
if (lineEnd3 < 0) return void 0;
|
|
8754
|
+
const header = text.slice(0, lineEnd3).trimEnd();
|
|
8755
|
+
const followUp = TELEGRAM_FOLLOW_UP_HEADER.exec(header);
|
|
8756
|
+
if (header !== TELEGRAM_FIRST_HEADER && !followUp) return void 0;
|
|
8757
|
+
const idLine = /^Message id:[^\n]*\n/m.exec(text);
|
|
8758
|
+
if (!idLine) return void 0;
|
|
8759
|
+
const start = idLine.index + idLine[0].length;
|
|
8760
|
+
const rest = text.slice(start).replace(/^\r?\n/, "");
|
|
8761
|
+
if (/^Message:\r?\n/.test(rest)) return void 0;
|
|
8762
|
+
const tail = text.lastIndexOf(TELEGRAM_TAIL);
|
|
8763
|
+
return {
|
|
8764
|
+
platform: "Telegram",
|
|
8765
|
+
context: "",
|
|
8766
|
+
userName: field(text.slice(lineEnd3, idLine.index), "From") || followUp?.[1] || "unknown",
|
|
8767
|
+
messageText: text.slice(start, tail > start ? tail : text.length).trim(),
|
|
8768
|
+
followUp: followUp !== null
|
|
8769
|
+
};
|
|
8770
|
+
}
|
|
8681
8771
|
function opensPrompt(text, headerIndex) {
|
|
8682
8772
|
const before = text.slice(0, headerIndex).trim();
|
|
8683
8773
|
return before === "" || before.startsWith("NOTE:");
|
|
@@ -8687,8 +8777,13 @@ function parseChannelMessage(rawText) {
|
|
|
8687
8777
|
if (!text) return void 0;
|
|
8688
8778
|
const legacy = readLegacyChannelHeader(text);
|
|
8689
8779
|
if (legacy) {
|
|
8690
|
-
const platform =
|
|
8691
|
-
const
|
|
8780
|
+
const platform = CHANNEL_PLATFORMS.find((p2) => p2 === legacy.platform) ?? "Slack";
|
|
8781
|
+
const rest = text.slice(legacy.length);
|
|
8782
|
+
const end = rest.lastIndexOf(`
|
|
8783
|
+
|
|
8784
|
+
\u2500\u2500 ${legacy.platform} instructions
|
|
8785
|
+
`);
|
|
8786
|
+
const messageText = end >= 0 ? rest.slice(0, end).trim() : cutAtTail(rest);
|
|
8692
8787
|
return {
|
|
8693
8788
|
platform,
|
|
8694
8789
|
context: legacy.context,
|
|
@@ -8697,6 +8792,8 @@ function parseChannelMessage(rawText) {
|
|
|
8697
8792
|
followUp: false
|
|
8698
8793
|
};
|
|
8699
8794
|
}
|
|
8795
|
+
const telegram = readTelegramPrompt(text);
|
|
8796
|
+
if (telegram) return telegram;
|
|
8700
8797
|
for (const shape of FIRST_MESSAGE_HEADERS) {
|
|
8701
8798
|
const m = shape.header.exec(text);
|
|
8702
8799
|
if (!m || !opensPrompt(text, m.index)) continue;
|
|
@@ -8728,6 +8825,16 @@ function parseChannelMessage(rawText) {
|
|
|
8728
8825
|
}
|
|
8729
8826
|
return void 0;
|
|
8730
8827
|
}
|
|
8828
|
+
function channelPromptTail(text, platform) {
|
|
8829
|
+
const at = text.lastIndexOf(`
|
|
8830
|
+
\u2500\u2500 ${platform} instructions
|
|
8831
|
+
`);
|
|
8832
|
+
return at < 0 ? "" : text.slice(at);
|
|
8833
|
+
}
|
|
8834
|
+
function isChannelFileLabel(text) {
|
|
8835
|
+
const line = text.trim();
|
|
8836
|
+
return line.length > 2 && line.startsWith("(") && line.endsWith(")") && !/[()\n]/.test(line.slice(1, -1));
|
|
8837
|
+
}
|
|
8731
8838
|
|
|
8732
8839
|
// ../shared/src/chat-mention.ts
|
|
8733
8840
|
function stripChatMentionMarkup(value) {
|
|
@@ -8830,6 +8937,12 @@ function utf8Bytes(text) {
|
|
|
8830
8937
|
return new TextEncoder().encode(text).length;
|
|
8831
8938
|
}
|
|
8832
8939
|
|
|
8940
|
+
// ../shared/src/space-slug.ts
|
|
8941
|
+
var SPACE_SLUG_MAX = 40;
|
|
8942
|
+
function spaceSlug(name) {
|
|
8943
|
+
return name.toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-").slice(0, SPACE_SLUG_MAX).replace(/^-+|-+$/g, "");
|
|
8944
|
+
}
|
|
8945
|
+
|
|
8833
8946
|
// ../shared/src/code-language.ts
|
|
8834
8947
|
var LANGUAGE_ALIASES = {
|
|
8835
8948
|
// web
|
|
@@ -10943,4 +11056,4 @@ smol-toml/dist/index.js:
|
|
|
10943
11056
|
*)
|
|
10944
11057
|
*/
|
|
10945
11058
|
|
|
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 };
|
|
11059
|
+
export { AVATAR_INK, CARD_TEXT_RATIO, CHANNELS, CHANNEL_PLATFORM_IDS, 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, channelPromptTail, confirmCommitted, countInSection, dollarsToCredits, editConfigPrompt, errorCode, escapeCurrencyDollars, expandPastedContent, extractReadableHtml, fileTagBlocks, formatFileSize, formatRelative, formatUsdAsCredits, gridApps, groupIntoSections, hasReferenceDefinitionOutsideFences, humanizeCategory, indexOfIgnoreCase, isAllowedWebPushHost, isAmbiguousCreateFailure, isChannelFileLabel, isChannelPlatform, 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[];
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const artifactCommentAnchorSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"text">;
|
|
4
|
+
version: z.ZodString;
|
|
5
|
+
quote: z.ZodString;
|
|
6
|
+
prefix: z.ZodString;
|
|
7
|
+
suffix: z.ZodString;
|
|
8
|
+
}, "strict", z.ZodTypeAny, {
|
|
9
|
+
type: "text";
|
|
10
|
+
version: string;
|
|
11
|
+
quote: string;
|
|
12
|
+
prefix: string;
|
|
13
|
+
suffix: string;
|
|
14
|
+
}, {
|
|
15
|
+
type: "text";
|
|
16
|
+
version: string;
|
|
17
|
+
quote: string;
|
|
18
|
+
prefix: string;
|
|
19
|
+
suffix: string;
|
|
20
|
+
}>, z.ZodObject<{
|
|
21
|
+
offset: z.ZodObject<{
|
|
22
|
+
x: z.ZodNumber;
|
|
23
|
+
y: z.ZodNumber;
|
|
24
|
+
}, "strict", z.ZodTypeAny, {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}, {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
}>;
|
|
31
|
+
version: z.ZodString;
|
|
32
|
+
selector: z.ZodString;
|
|
33
|
+
snippet: z.ZodString;
|
|
34
|
+
viewport_width: z.ZodNumber;
|
|
35
|
+
scroll: z.ZodObject<{
|
|
36
|
+
x: z.ZodNumber;
|
|
37
|
+
y: z.ZodNumber;
|
|
38
|
+
}, "strict", z.ZodTypeAny, {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
}, {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
}>;
|
|
45
|
+
type: z.ZodLiteral<"point">;
|
|
46
|
+
}, "strict", z.ZodTypeAny, {
|
|
47
|
+
type: "point";
|
|
48
|
+
version: string;
|
|
49
|
+
offset: {
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
};
|
|
53
|
+
selector: string;
|
|
54
|
+
snippet: string;
|
|
55
|
+
viewport_width: number;
|
|
56
|
+
scroll: {
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
};
|
|
60
|
+
}, {
|
|
61
|
+
type: "point";
|
|
62
|
+
version: string;
|
|
63
|
+
offset: {
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
};
|
|
67
|
+
selector: string;
|
|
68
|
+
snippet: string;
|
|
69
|
+
viewport_width: number;
|
|
70
|
+
scroll: {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
};
|
|
74
|
+
}>, z.ZodObject<{
|
|
75
|
+
offset: z.ZodObject<{
|
|
76
|
+
x: z.ZodNumber;
|
|
77
|
+
y: z.ZodNumber;
|
|
78
|
+
width: z.ZodNumber;
|
|
79
|
+
height: z.ZodNumber;
|
|
80
|
+
}, "strict", z.ZodTypeAny, {
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
width: number;
|
|
84
|
+
height: number;
|
|
85
|
+
}, {
|
|
86
|
+
x: number;
|
|
87
|
+
y: number;
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
}>;
|
|
91
|
+
version: z.ZodString;
|
|
92
|
+
selector: z.ZodString;
|
|
93
|
+
snippet: z.ZodString;
|
|
94
|
+
viewport_width: z.ZodNumber;
|
|
95
|
+
scroll: z.ZodObject<{
|
|
96
|
+
x: z.ZodNumber;
|
|
97
|
+
y: z.ZodNumber;
|
|
98
|
+
}, "strict", z.ZodTypeAny, {
|
|
99
|
+
x: number;
|
|
100
|
+
y: number;
|
|
101
|
+
}, {
|
|
102
|
+
x: number;
|
|
103
|
+
y: number;
|
|
104
|
+
}>;
|
|
105
|
+
type: z.ZodLiteral<"region">;
|
|
106
|
+
}, "strict", z.ZodTypeAny, {
|
|
107
|
+
type: "region";
|
|
108
|
+
version: string;
|
|
109
|
+
offset: {
|
|
110
|
+
x: number;
|
|
111
|
+
y: number;
|
|
112
|
+
width: number;
|
|
113
|
+
height: number;
|
|
114
|
+
};
|
|
115
|
+
selector: string;
|
|
116
|
+
snippet: string;
|
|
117
|
+
viewport_width: number;
|
|
118
|
+
scroll: {
|
|
119
|
+
x: number;
|
|
120
|
+
y: number;
|
|
121
|
+
};
|
|
122
|
+
}, {
|
|
123
|
+
type: "region";
|
|
124
|
+
version: string;
|
|
125
|
+
offset: {
|
|
126
|
+
x: number;
|
|
127
|
+
y: number;
|
|
128
|
+
width: number;
|
|
129
|
+
height: number;
|
|
130
|
+
};
|
|
131
|
+
selector: string;
|
|
132
|
+
snippet: string;
|
|
133
|
+
viewport_width: number;
|
|
134
|
+
scroll: {
|
|
135
|
+
x: number;
|
|
136
|
+
y: number;
|
|
137
|
+
};
|
|
138
|
+
}>, z.ZodObject<{
|
|
139
|
+
type: z.ZodLiteral<"none">;
|
|
140
|
+
version: z.ZodString;
|
|
141
|
+
}, "strict", z.ZodTypeAny, {
|
|
142
|
+
type: "none";
|
|
143
|
+
version: string;
|
|
144
|
+
}, {
|
|
145
|
+
type: "none";
|
|
146
|
+
version: string;
|
|
147
|
+
}>]>, {
|
|
148
|
+
type: "text";
|
|
149
|
+
version: string;
|
|
150
|
+
quote: string;
|
|
151
|
+
prefix: string;
|
|
152
|
+
suffix: string;
|
|
153
|
+
} | {
|
|
154
|
+
type: "point";
|
|
155
|
+
version: string;
|
|
156
|
+
offset: {
|
|
157
|
+
x: number;
|
|
158
|
+
y: number;
|
|
159
|
+
};
|
|
160
|
+
selector: string;
|
|
161
|
+
snippet: string;
|
|
162
|
+
viewport_width: number;
|
|
163
|
+
scroll: {
|
|
164
|
+
x: number;
|
|
165
|
+
y: number;
|
|
166
|
+
};
|
|
167
|
+
} | {
|
|
168
|
+
type: "region";
|
|
169
|
+
version: string;
|
|
170
|
+
offset: {
|
|
171
|
+
x: number;
|
|
172
|
+
y: number;
|
|
173
|
+
width: number;
|
|
174
|
+
height: number;
|
|
175
|
+
};
|
|
176
|
+
selector: string;
|
|
177
|
+
snippet: string;
|
|
178
|
+
viewport_width: number;
|
|
179
|
+
scroll: {
|
|
180
|
+
x: number;
|
|
181
|
+
y: number;
|
|
182
|
+
};
|
|
183
|
+
} | {
|
|
184
|
+
type: "none";
|
|
185
|
+
version: string;
|
|
186
|
+
}, {
|
|
187
|
+
type: "text";
|
|
188
|
+
version: string;
|
|
189
|
+
quote: string;
|
|
190
|
+
prefix: string;
|
|
191
|
+
suffix: string;
|
|
192
|
+
} | {
|
|
193
|
+
type: "point";
|
|
194
|
+
version: string;
|
|
195
|
+
offset: {
|
|
196
|
+
x: number;
|
|
197
|
+
y: number;
|
|
198
|
+
};
|
|
199
|
+
selector: string;
|
|
200
|
+
snippet: string;
|
|
201
|
+
viewport_width: number;
|
|
202
|
+
scroll: {
|
|
203
|
+
x: number;
|
|
204
|
+
y: number;
|
|
205
|
+
};
|
|
206
|
+
} | {
|
|
207
|
+
type: "region";
|
|
208
|
+
version: string;
|
|
209
|
+
offset: {
|
|
210
|
+
x: number;
|
|
211
|
+
y: number;
|
|
212
|
+
width: number;
|
|
213
|
+
height: number;
|
|
214
|
+
};
|
|
215
|
+
selector: string;
|
|
216
|
+
snippet: string;
|
|
217
|
+
viewport_width: number;
|
|
218
|
+
scroll: {
|
|
219
|
+
x: number;
|
|
220
|
+
y: number;
|
|
221
|
+
};
|
|
222
|
+
} | {
|
|
223
|
+
type: "none";
|
|
224
|
+
version: string;
|
|
225
|
+
}>;
|
|
226
|
+
export type ArtifactCommentAnchor = z.infer<typeof artifactCommentAnchorSchema>;
|
|
227
|
+
export type ArtifactTextAnchor = Extract<ArtifactCommentAnchor, {
|
|
228
|
+
type: 'text';
|
|
229
|
+
}>;
|
|
230
|
+
export type ArtifactTextPosition = {
|
|
231
|
+
start: number | null;
|
|
232
|
+
end: number | null;
|
|
233
|
+
outdated: boolean;
|
|
234
|
+
};
|
|
235
|
+
export declare function reanchorArtifactText(text: string, anchor: ArtifactTextAnchor): ArtifactTextPosition;
|