@kortix/ui 0.14.19 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_vendor/kortix-shared.js +1188 -202
- package/dist/_vendor/shared/artifact-annotations.d.ts +85 -607
- package/dist/_vendor/shared/artifact-comments.d.ts +53 -489
- package/dist/_vendor/shared/code-language.d.ts +2 -2
- package/dist/_vendor/shared/html.d.ts +7 -0
- package/dist/_vendor/shared/index.d.ts +1 -1
- package/dist/_vendor/shared/peer-message-prompt.d.ts +7 -1
- package/dist/_vendor/shared/pixel-mark.d.ts +28 -0
- package/dist/_vendor/shared/project-glyphs.d.ts +103 -20
- package/dist/_vendor/shared/runtime-versions.d.ts +2 -6
- package/dist/_vendor/shared/tool-output/media-path.d.ts +1 -6
- package/dist/_vendor/shared/tool-output/scan.d.ts +2 -0
- package/dist/_vendor/shared/utils/string.d.ts +6 -0
- package/dist/_vendor/shared/webhook-signing.d.ts +3 -1
- package/dist/access/access/access-dialog-share.d.ts +3 -28
- package/dist/access/access/access-dialog-share.js +3 -75
- package/dist/artifacts/artifact-frame.js +26 -2
- package/dist/artifacts/artifact-session.js +8 -3
- package/dist/artifacts/frame-policy.d.ts +2 -9
- package/dist/artifacts/frame-policy.js +2 -25
- package/dist/customize/agents/agent-page.js +5 -5
- package/dist/customize/agents/agent-status.js +1 -1
- package/dist/customize/agents/agents-page.js +4 -4
- package/dist/customize/agents/create-agent-modal.js +1 -1
- package/dist/customize/connectors/connector-filter.d.ts +2 -1
- package/dist/customize/connectors/connector-filter.js +2 -3
- package/dist/customize/connectors/connectors-page.js +15 -24
- package/dist/customize/connectors/detail/connector-status.d.ts +3 -24
- package/dist/customize/connectors/detail/connector-status.js +2 -42
- package/dist/customize/connectors/detail/use-connector-detail.d.ts +2 -6
- package/dist/customize/connectors/detail/use-connector-detail.js +3 -13
- package/dist/customize/connectors/install/install.d.ts +2 -6
- package/dist/customize/connectors/install/install.js +2 -16
- package/dist/customize/connectors/provider-label.d.ts +4 -17
- package/dist/customize/connectors/provider-label.js +4 -37
- package/dist/customize/connectors/use-agent-access.d.ts +3 -3
- package/dist/customize/providers/provider-connect.d.ts +6 -15
- package/dist/customize/providers/provider-connect.js +5 -36
- package/dist/customize/sections/connector-connection-form.d.ts +3 -7
- package/dist/customize/sections/connector-connection-form.js +2 -33
- package/dist/customize/sections/connector-oauth2-auto.d.ts +3 -33
- package/dist/customize/sections/connector-oauth2-auto.js +2 -64
- package/dist/customize/sections/connectors-view.js +50 -37
- package/dist/customize/sections/gateway-view.d.ts +6 -5
- package/dist/customize/sections/gateway-view.js +31 -13
- package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +21 -18
- package/dist/customize/sections/llm-provider/constants.d.ts +1 -2
- package/dist/customize/sections/llm-provider/constants.js +1 -2
- package/dist/customize/sections/llm-provider/device-grant.d.ts +15 -0
- package/dist/customize/sections/llm-provider/device-grant.js +27 -0
- package/dist/customize/sections/llm-provider/utils.d.ts +1 -41
- package/dist/customize/sections/llm-provider/utils.js +1 -52
- package/dist/customize/sections/view/account-secret-resources-panel.js +4 -1
- package/dist/customize/sections/view/agent-editor-catalog.js +0 -5
- package/dist/customize/sections/view/agent-editor.d.ts +2 -2
- package/dist/customize/sections/view/agent-editor.js +2 -2
- package/dist/customize/sections/view/channel-settings-patch.js +1 -1
- package/dist/customize/sections/view/channels-view.js +8 -8
- package/dist/customize/sections/view/connector-connections.d.ts +5 -85
- package/dist/customize/sections/view/connector-connections.js +5 -99
- package/dist/customize/sections/view/gateway/gateway-logs.d.ts +42 -3
- package/dist/customize/sections/view/gateway/gateway-logs.js +212 -15
- package/dist/customize/sections/view/gateway/gateway-overview.js +1 -1
- package/dist/customize/sections/view/gateway/gateway-routing.d.ts +3 -3
- package/dist/customize/sections/view/gateway/gateway-routing.js +81 -200
- package/dist/customize/sections/view/gateway/routing-parts.d.ts +101 -0
- package/dist/customize/sections/view/gateway/routing-parts.js +154 -0
- package/dist/customize/sections/view/gateway/routing-sentence-layout.d.ts +2 -0
- package/dist/customize/sections/view/gateway/routing-sentence-layout.js +82 -0
- package/dist/customize/sections/view/review-center-connected.js +54 -21
- package/dist/customize/sections/view/review-view.d.ts +7 -0
- package/dist/customize/sections/view/review-view.js +11 -0
- package/dist/customize/sections/view/secret-delivery.d.ts +4 -5
- package/dist/customize/sections/view/secret-delivery.js +6 -5
- package/dist/customize/sections/view/secrets-view.js +1 -1
- package/dist/customize/sections/view/subscription-usage-tab.d.ts +14 -0
- package/dist/customize/sections/view/subscription-usage-tab.js +122 -0
- package/dist/customize/sections/view/subscription-usage.d.ts +34 -0
- package/dist/customize/sections/view/subscription-usage.js +98 -0
- package/dist/customize/settings/tabs/experimental-tab.js +3 -3
- package/dist/customize/settings/tabs/general-tab.js +65 -10
- package/dist/customize/shared/catalog/catalog-card.d.ts +9 -4
- package/dist/customize/shared/catalog/catalog-card.js +3 -3
- package/dist/customize/shared/channels-switch-dialog.d.ts +1 -1
- package/dist/customize/shared/channels-switch-dialog.js +1 -1
- package/dist/customize/shared/feature-gate-screen.js +1 -1
- package/dist/customize/triggers/schedule/post-to-field.d.ts +1 -1
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +1 -1
- package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +6 -0
- package/dist/customize/triggers/schedule/trigger-runs-logic.js +13 -0
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +9 -2
- package/dist/files/drives/conflict-marks.d.ts +28 -0
- package/dist/files/drives/conflict-marks.js +39 -0
- package/dist/files/drives/session-drives-chip.js +15 -10
- package/dist/files/project/api/runtime-files.d.ts +2 -2
- package/dist/files/project/api/runtime-files.js +2 -2
- package/dist/files/project/components/drive-explorer.js +1 -1
- package/dist/files/project/components/drive-grid-view.js +0 -1
- package/dist/files/project/components/drive-list-view.js +0 -1
- package/dist/files/project/components/file-explorer-page.js +1 -1
- package/dist/files/project/hooks/index.d.ts +1 -1
- package/dist/files/project/hooks/index.js +1 -1
- package/dist/files/project/hooks/use-server-health.d.ts +1 -1
- package/dist/files/project/hooks/use-server-health.js +1 -1
- package/dist/files/project/search/workspace-search-service.d.ts +1 -1
- package/dist/files/project/search/workspace-search-service.js +1 -1
- package/dist/files/runtime/hooks/index.d.ts +1 -1
- package/dist/files/runtime/hooks/index.js +1 -1
- package/dist/files/runtime/hooks/server-health-state.d.ts +2 -2
- package/dist/files/runtime/hooks/server-health-state.js +2 -2
- package/dist/files/runtime/hooks/system-dir.js +2 -2
- package/dist/files/runtime/hooks/use-file-content.d.ts +1 -1
- package/dist/files/runtime/hooks/use-file-content.js +1 -1
- package/dist/files/runtime/hooks/use-file-list.d.ts +1 -1
- package/dist/files/runtime/hooks/use-file-list.js +3 -3
- package/dist/files/runtime/hooks/use-server-health.d.ts +2 -2
- package/dist/files/runtime/hooks/use-server-health.js +3 -3
- package/dist/files/runtime/hooks/use-workspace-search.d.ts +1 -2
- package/dist/files/runtime/hooks/use-workspace-search.js +0 -1
- package/dist/files/runtime/index.d.ts +2 -2
- package/dist/files/runtime/index.js +2 -2
- package/dist/files/runtime/path-utils.d.ts +1 -1
- package/dist/files/runtime/path-utils.js +1 -1
- package/dist/files/runtime/sandbox-explorer-source.d.ts +1 -1
- package/dist/files/runtime/sandbox-explorer-source.js +1 -1
- package/dist/files/runtime/sandbox-file-explorer.d.ts +1 -1
- package/dist/files/runtime/sandbox-file-explorer.js +2 -2
- package/dist/files/tree/components/file-tree-item.js +0 -1
- package/dist/files/tree/hooks/use-file-events.d.ts +1 -1
- package/dist/files/tree/hooks/use-file-events.js +1 -1
- package/dist/files/viewer/index.d.ts +1 -1
- package/dist/files/viewer/index.js +1 -1
- package/dist/i18n/en.d.ts +513 -203
- package/dist/i18n/en.js +610 -300
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/account-hub/sections.d.ts +1 -1
- package/dist/internal/capture/use-capture-area.d.ts +5 -1
- package/dist/internal/capture/use-capture-area.js +16 -9
- package/dist/internal/files/file-read-retry.js +1 -1
- package/dist/internal/files/types.d.ts +2 -2
- package/dist/internal/files/types.js +2 -2
- package/dist/internal/goals/goal-meta.d.ts +76 -10
- package/dist/internal/goals/goal-meta.js +191 -14
- package/dist/internal/hooks/connectors/use-add-account.d.ts +3 -9
- package/dist/internal/hooks/connectors/use-add-account.js +3 -18
- package/dist/internal/hooks/connectors/use-connect-link.d.ts +3 -2
- package/dist/internal/hooks/connectors/use-connect-link.js +15 -24
- package/dist/internal/hooks/connectors/use-pipedream-connect-project.d.ts +3 -56
- package/dist/internal/hooks/connectors/use-pipedream-connect-project.js +3 -87
- package/dist/internal/hooks/projects/use-new-project-session.d.ts +3 -2
- package/dist/internal/hooks/projects/use-new-project-session.js +4 -3
- package/dist/internal/hooks/projects/use-project-can-run.d.ts +7 -0
- package/dist/internal/hooks/projects/use-project-can-run.js +12 -5
- package/dist/internal/hooks/projects/use-restart-project-session.d.ts +0 -1
- package/dist/internal/hooks/projects/use-restart-project-session.js +0 -1
- package/dist/internal/layout/nav-hover-card.d.ts +1 -1
- package/dist/internal/layout/nav-hover-card.js +1 -1
- package/dist/internal/layout/project-capability-nav.d.ts +1 -1
- package/dist/internal/layout/project-capability-nav.js +7 -3
- package/dist/internal/layout/project-page-header.d.ts +3 -1
- package/dist/internal/layout/project-page-header.js +2 -2
- package/dist/internal/lib/account-secret-access.d.ts +1 -41
- package/dist/internal/lib/account-secret-access.js +3 -46
- package/dist/internal/lib/browser-error-noise.d.ts +2 -2
- package/dist/internal/lib/browser-error-noise.js +2 -2
- package/dist/internal/lib/browser-noise/rules/expected-states.d.ts +2 -15
- package/dist/internal/lib/browser-noise/rules/expected-states.js +6 -56
- package/dist/internal/lib/browser-noise/rules/injected-scripts.js +18 -0
- package/dist/internal/lib/browser-noise/rules/old-browsers.d.ts +1 -0
- package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
- package/dist/internal/lib/browser-noise/rules/rejections.d.ts +0 -9
- package/dist/internal/lib/browser-noise/rules/rejections.js +0 -14
- package/dist/internal/lib/capability-tab-routes.d.ts +3 -3
- package/dist/internal/lib/capability-tab-routes.js +11 -3
- package/dist/internal/lib/delivered-but-disconnected.js +3 -5
- package/dist/internal/lib/error-handler.js +8 -3
- package/dist/internal/lib/llm-providers.d.ts +4 -110
- package/dist/internal/lib/llm-providers.js +5 -102
- package/dist/internal/lib/navigation/message-link.d.ts +32 -0
- package/dist/internal/lib/navigation/message-link.js +51 -0
- package/dist/internal/lib/navigation/session-href.d.ts +11 -0
- package/dist/internal/lib/navigation/session-href.js +20 -0
- package/dist/internal/lib/navigation/session-spawn-urls.d.ts +17 -0
- package/dist/internal/lib/navigation/session-spawn-urls.js +26 -0
- package/dist/internal/lib/pixel-mark.d.ts +4 -17
- package/dist/internal/lib/pixel-mark.js +5 -148
- package/dist/internal/lib/sounds.d.ts +4 -4
- package/dist/internal/lib/sounds.js +4 -4
- package/dist/internal/lib/space-scope.d.ts +3 -3
- package/dist/internal/lib/space-scope.js +3 -3
- package/dist/internal/lib/use-project-feature-flags.js +9 -7
- package/dist/internal/lib/web-notifications.d.ts +1 -1
- package/dist/internal/lib/web-notifications.js +0 -3
- package/dist/internal/notifications/notification-bell.js +1 -3
- package/dist/internal/notifications/notification-rows.d.ts +2 -2
- package/dist/internal/notifications/notification-rows.js +2 -3
- package/dist/internal/session-types/index.d.ts +5 -7
- package/dist/internal/session-types/index.js +5 -7
- package/dist/internal/stores/active-space-store.d.ts +1 -1
- package/dist/internal/stores/active-space-store.js +1 -1
- package/dist/internal/stores/composer-prefill-store.js +4 -1
- package/dist/internal/stores/kortix-computer-store.d.ts +15 -0
- package/dist/internal/stores/kortix-computer-store.js +12 -0
- package/dist/internal/stores/sound-store.d.ts +4 -4
- package/dist/internal/stores/sound-store.js +10 -0
- package/dist/lib/routes.d.ts +17 -7
- package/dist/lib/routes.js +18 -2
- package/dist/markdown/app-link-icons.d.ts +7 -0
- package/dist/markdown/app-link-icons.js +20 -0
- package/dist/markdown/app-links.d.ts +9 -0
- package/dist/markdown/app-links.js +112 -0
- package/dist/markdown/code/shiki-highlighter.js +14 -5
- package/dist/markdown/doc-editor/doc-attrs.d.ts +28 -0
- package/dist/markdown/doc-editor/doc-attrs.js +156 -0
- package/dist/markdown/doc-editor/doc-embed.d.ts +6 -0
- package/dist/markdown/doc-editor/doc-embed.js +26 -8
- package/dist/markdown/doc-editor/doc-extensions.d.ts +10 -0
- package/dist/markdown/doc-editor/doc-extensions.js +55 -8
- package/dist/markdown/doc-editor/doc-fidelity.d.ts +72 -0
- package/dist/markdown/doc-editor/doc-fidelity.js +135 -0
- package/dist/markdown/doc-editor/doc-node-view.d.ts +9 -0
- package/dist/markdown/doc-editor/doc-node-view.js +29 -0
- package/dist/markdown/doc-editor/markdown.d.ts +20 -0
- package/dist/markdown/doc-editor/markdown.js +455 -18
- package/dist/markdown/file-links.js +12 -3
- package/dist/markdown/markdown-frontmatter.d.ts +6 -6
- package/dist/markdown/markdown-frontmatter.js +3 -3
- package/dist/markdown/unified-markdown.d.ts +1 -1
- package/dist/markdown/unified-markdown.js +129 -10
- package/dist/primitives/button.js +2 -1
- package/dist/primitives/emoji-picker.js +16 -100
- package/dist/primitives/emoji-tint.js +12 -12
- package/dist/primitives/entity-avatar.js +14 -9
- package/dist/primitives/glyph-face.d.ts +19 -12
- package/dist/primitives/glyph-face.js +59 -20
- package/dist/primitives/glyph-paths-source.d.ts +7 -0
- package/dist/primitives/glyph-paths-source.js +14 -6
- package/dist/primitives/glyph-paths.generated.d.ts +1 -1
- package/dist/primitives/glyph-paths.generated.js +947 -204
- package/dist/primitives/glyph-picker.d.ts +6 -10
- package/dist/primitives/glyph-picker.js +147 -98
- package/dist/primitives/glyph-registry.js +1604 -1
- package/dist/primitives/glyph-tint.d.ts +28 -3
- package/dist/primitives/glyph-tint.js +41 -83
- package/dist/primitives/kortix-glyphs.d.ts +32 -0
- package/dist/primitives/kortix-glyphs.js +157 -0
- package/dist/primitives/project-icon-picker.d.ts +8 -1
- package/dist/primitives/project-icon-picker.js +13 -5
- package/dist/primitives/user-avatar.d.ts +8 -1
- package/dist/primitives/user-avatar.js +2 -2
- package/dist/providers/ui-provider.d.ts +1 -8
- package/dist/session/actions/project-session-list-helpers.js +1 -1
- package/dist/session/agents/agent-model.js +4 -0
- package/dist/session/agents/agent-state-mark.d.ts +12 -7
- package/dist/session/agents/agent-state-mark.js +37 -15
- package/dist/session/agents/agent-strip.js +8 -2
- package/dist/session/agents/agent-surface.d.ts +81 -0
- package/dist/session/agents/agent-surface.js +97 -0
- package/dist/session/agents/held-messages.d.ts +1 -5
- package/dist/session/agents/held-messages.js +8 -25
- package/dist/session/agents/legacy-subagent-chat.js +1 -1
- package/dist/session/agents/session-peek.js +24 -12
- package/dist/session/agents/steer-session.d.ts +2 -0
- package/dist/session/agents/steer-session.js +3 -2
- package/dist/session/agents/subagent-dialog-content.d.ts +30 -1
- package/dist/session/agents/subagent-dialog-content.js +147 -33
- package/dist/session/agents/subagent-view.d.ts +15 -5
- package/dist/session/agents/subagent-view.js +28 -6
- package/dist/session/agents/tasks-panel.js +2 -12
- package/dist/session/agents/workflow-run-controls.d.ts +3 -1
- package/dist/session/agents/workflow-run-controls.js +12 -7
- package/dist/session/composer/ComposerAboveCard.d.ts +4 -1
- package/dist/session/composer/ComposerAboveCard.js +2 -2
- package/dist/session/composer/ComposerCard.d.ts +7 -1
- package/dist/session/composer/ComposerCard.js +74 -9
- package/dist/session/composer/agent-selector.d.ts +16 -0
- package/dist/session/composer/agent-selector.js +19 -11
- package/dist/session/composer/chat-input/chat-input-control.d.ts +64 -0
- package/dist/session/composer/chat-input/chat-input-control.js +578 -0
- package/dist/session/composer/chat-input/chat-input-overrides.d.ts +76 -0
- package/dist/session/composer/chat-input/chat-input-overrides.js +40 -0
- package/dist/session/composer/chat-input/chat-input-panes.d.ts +56 -0
- package/dist/session/composer/chat-input/chat-input-panes.js +148 -0
- package/dist/session/composer/chat-input/chat-input-summary.d.ts +67 -0
- package/dist/session/composer/chat-input/chat-input-summary.js +67 -0
- package/dist/session/composer/chat-queue-lines.d.ts +20 -0
- package/dist/session/composer/chat-queue-lines.js +20 -0
- package/dist/session/composer/composer-chat-input.d.ts +9 -2
- package/dist/session/composer/composer-chat-input.js +14 -6
- package/dist/session/composer/composer-focus-context.d.ts +7 -0
- package/dist/session/composer/composer-focus-context.js +9 -0
- package/dist/session/composer/composer-toolbar.d.ts +3 -1
- package/dist/session/composer/composer-toolbar.js +3 -3
- package/dist/session/composer/composer-underbar.d.ts +10 -1
- package/dist/session/composer/composer-underbar.js +10 -2
- package/dist/session/composer/composer.d.ts +12 -0
- package/dist/session/composer/composer.js +71 -2
- package/dist/session/composer/editor/composer-editor.d.ts +10 -2
- package/dist/session/composer/editor/composer-editor.js +22 -6
- package/dist/session/composer/editor/first-visual-line.d.ts +2 -0
- package/dist/session/composer/editor/first-visual-line.js +9 -0
- package/dist/session/composer/editor/mention-node.js +2 -0
- package/dist/session/composer/editor/serialize.js +9 -1
- package/dist/session/composer/hooks/use-file-search.d.ts +16 -16
- package/dist/session/composer/hooks/use-file-search.js +17 -17
- package/dist/session/composer/menus/mention-controller.d.ts +3 -11
- package/dist/session/composer/menus/mention-controller.js +54 -16
- package/dist/session/composer/menus/mention-menu.d.ts +7 -2
- package/dist/session/composer/menus/mention-menu.js +17 -9
- package/dist/session/composer/menus/menu-items.d.ts +9 -0
- package/dist/session/composer/menus/space-mentions.d.ts +58 -0
- package/dist/session/composer/menus/space-mentions.js +99 -0
- package/dist/session/composer/prompt-history.d.ts +9 -0
- package/dist/session/composer/prompt-history.js +45 -0
- package/dist/session/composer/queue-projection.d.ts +2 -0
- package/dist/session/composer/queue-projection.js +1 -0
- package/dist/session/composer/queued-prompt-list.js +53 -4
- package/dist/session/composer/reasoning-effort-selector.d.ts +20 -0
- package/dist/session/composer/reasoning-effort-selector.js +3 -3
- package/dist/session/composer/types.d.ts +2 -1
- package/dist/session/composer/use-instant-session-send.js +2 -2
- package/dist/session/header/session-goal-indicator.js +4 -4
- package/dist/session/header/session-site-header.js +7 -3
- package/dist/session/header/subagent-hover-card.d.ts +7 -4
- package/dist/session/header/subagent-hover-card.js +62 -11
- package/dist/session/list/session-status-mark.d.ts +42 -0
- package/dist/{workspace/sidebar → session/list}/session-status-mark.js +37 -2
- package/dist/session/models/model-selector.d.ts +7 -2
- package/dist/session/models/model-selector.js +39 -31
- package/dist/session/overrides/provider-secret-pool-editor.d.ts +11 -0
- package/dist/session/overrides/provider-secret-pool-editor.js +17 -0
- package/dist/session/overrides/session-overrides-control.d.ts +5 -0
- package/dist/session/overrides/session-overrides-toolbar.js +147 -7
- package/dist/session/panel/easy/plan-card.d.ts +2 -2
- package/dist/session/panel/easy/plan-card.js +2 -2
- package/dist/session/panel/model-switch-event.d.ts +8 -0
- package/dist/session/panel/model-switch-event.js +19 -0
- package/dist/session/panel/session-audit-panel.js +3 -2
- package/dist/session/panel/session-desktop.js +11 -1
- package/dist/session/panel/session-panel-provider.js +1 -1
- package/dist/session/panel/shared/use-panel-handoffs.d.ts +2 -2
- package/dist/session/panel/shared/use-panel-handoffs.js +21 -2
- package/dist/session/panel/use-session-panel-state.js +2 -2
- package/dist/session/prompts/ask-deck.d.ts +21 -0
- package/dist/session/prompts/ask-deck.js +253 -0
- package/dist/session/prompts/session-permission-prompt.d.ts +7 -1
- package/dist/session/prompts/session-permission-prompt.js +3 -3
- package/dist/session/status/sandbox-loading-boundary.js +2 -2
- package/dist/session/status/session-load-state.d.ts +0 -1
- package/dist/session/status/session-load-state.js +2 -4
- package/dist/session/status/session-terminal-state.d.ts +47 -0
- package/dist/session/status/session-terminal-state.js +56 -0
- package/dist/session/thread/message-parsing.d.ts +0 -1
- package/dist/session/thread/message-parsing.js +0 -1
- package/dist/session/thread/plan-surface.d.ts +1 -1
- package/dist/session/thread/plan-surface.js +1 -1
- package/dist/session/thread/session-chat.d.ts +4 -2
- package/dist/session/thread/session-chat.js +547 -409
- package/dist/session/thread/session-context-metrics.d.ts +0 -1
- package/dist/session/thread/session-context-metrics.js +1 -1
- package/dist/session/thread/session-context-sub-sessions.js +3 -1
- package/dist/session/thread/show-work.d.ts +38 -0
- package/dist/session/thread/show-work.js +115 -0
- package/dist/session/thread/stop-sequence.d.ts +51 -0
- package/dist/session/thread/stop-sequence.js +55 -0
- package/dist/session/thread/thread-boot-rows.d.ts +2 -1
- package/dist/session/thread/thread-boot-rows.js +7 -3
- package/dist/session/thread/transcript-rows.d.ts +36 -0
- package/dist/session/thread/transcript.d.ts +48 -4
- package/dist/session/thread/transcript.js +228 -36
- package/dist/session/thread/typing-indicator.d.ts +21 -0
- package/dist/session/thread/typing-indicator.js +46 -0
- package/dist/session/tool/shared/infrastructure-contexts.d.ts +12 -0
- package/dist/session/tool/shared/infrastructure-contexts.js +6 -0
- package/dist/session/tool/tool-part-renderer.d.ts +2 -0
- package/dist/session/tool/tool-part-renderer.js +16 -2
- package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -1
- package/dist/session/tool/tools/apply-patch-tool.js +1 -1
- package/dist/session/tool/tools/kortix-action-tool.js +8 -1
- package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +19 -0
- package/dist/session/tool/tools/multi-agent-tool-bodies.js +35 -14
- package/dist/session/tool/tools/multi-agent-tools.js +1 -1
- package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-kill-tool.js +1 -1
- package/dist/session/tool/tools/pty-read-tool.d.ts +2 -2
- package/dist/session/tool/tools/pty-read-tool.js +2 -2
- package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
- package/dist/session/tool/tools/pty-write-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-write-tool.js +1 -1
- package/dist/session/tool/tools/session-spawn-urls.d.ts +1 -16
- package/dist/session/tool/tools/session-spawn-urls.js +4 -26
- package/dist/session/tool/tools/task-tool.d.ts +5 -18
- package/dist/session/tool/tools/task-tool.js +47 -86
- package/dist/session/tool/tools/todo-write-tool.d.ts +1 -1
- package/dist/session/tool/tools/todo-write-tool.js +1 -1
- package/dist/session/tool/tools/workflow-progress.d.ts +14 -18
- package/dist/session/tool/tools/workflow-progress.js +24 -179
- package/dist/session/tool/tools/workflow-result-text.d.ts +15 -0
- package/dist/session/tool/tools/workflow-result-text.js +34 -0
- package/dist/session/tool/tools/workflow-run-card.d.ts +35 -0
- package/dist/session/tool/tools/workflow-run-card.js +157 -0
- package/dist/session/tool/tools/workflow-tool.js +45 -58
- package/dist/session/turn/activity-burst.d.ts +2 -2
- package/dist/session/turn/activity-burst.js +11 -5
- package/dist/session/turn/answered-question-step.d.ts +29 -0
- package/dist/session/turn/answered-question-step.js +48 -3
- package/dist/session/turn/notice-batch-group.d.ts +4 -4
- package/dist/session/turn/notice-batch-group.js +5 -8
- package/dist/session/turn/peer-message-row.d.ts +14 -8
- package/dist/session/turn/peer-message-row.js +38 -64
- package/dist/session/turn/plan-anchor.d.ts +3 -3
- package/dist/session/turn/plan-anchor.js +3 -3
- package/dist/session/turn/plan-card.d.ts +7 -7
- package/dist/session/turn/plan-card.js +7 -7
- package/dist/session/turn/subagent-notice-row.d.ts +16 -1
- package/dist/session/turn/subagent-notice-row.js +47 -35
- package/dist/session/turn/throttled-markdown.js +4 -1
- package/dist/session/turn/turn-work-accordion.d.ts +10 -3
- package/dist/session/turn/turn-work-accordion.js +18 -11
- package/dist/session/turn/user-message.js +16 -42
- package/dist/session/turn/voice-turn.d.ts +22 -0
- package/dist/session/turn/voice-turn.js +32 -0
- package/dist/session/voice/call-ring.d.ts +10 -0
- package/dist/session/voice/call-ring.js +52 -0
- package/dist/session/voice/use-voice-call.d.ts +4 -4
- package/dist/session/voice/use-voice-call.js +6 -9
- package/dist/session/voice/voice-call-card.d.ts +6 -0
- package/dist/session/voice/voice-call-card.js +113 -0
- package/dist/session/voice/voice-call-state.d.ts +3 -0
- package/dist/session/voice/voice-call-state.js +2 -1
- package/dist/session/voice/voice-call-store.d.ts +16 -6
- package/dist/session/voice/voice-call-store.js +5 -5
- package/dist/session/voice/voice-call.d.ts +4 -8
- package/dist/session/voice/voice-call.js +33 -36
- package/dist/styles/components.css +33 -0
- package/dist/styles/theme.css +26 -0
- package/dist/styles.css +1 -1
- package/dist/terminal/terminal-card-gate.d.ts +6 -3
- package/dist/terminal/terminal-card-gate.js +21 -4
- package/dist/workspace/admin/project-admin-dashboard.d.ts +1 -1
- package/dist/workspace/admin/project-admin-dashboard.js +12 -9
- package/dist/workspace/index.d.ts +3 -2
- package/dist/workspace/index.js +2 -1
- package/dist/workspace/layout/use-project-home-send.d.ts +2 -0
- package/dist/workspace/layout/use-project-home-send.js +5 -3
- package/dist/workspace/memory/company-memory-page.d.ts +1 -1
- package/dist/workspace/memory/company-memory-page.js +1 -1
- package/dist/workspace/new/use-creatable-accounts.js +13 -4
- package/dist/workspace/projects/modal/project-icon-field.js +49 -34
- package/dist/workspace/review/review-center.d.ts +12 -3
- package/dist/workspace/review/review-center.js +50 -16
- package/dist/workspace/review/review-reducer.d.ts +7 -0
- package/dist/workspace/review/review-reducer.js +11 -0
- package/dist/workspace/sessions/project-sessions-helpers.js +1 -1
- package/dist/workspace/sessions/project-sessions-view.js +1 -1
- package/dist/workspace/sessions/session-row.js +6 -4
- package/dist/workspace/sessions/sessions-toolbar.d.ts +1 -1
- package/dist/workspace/sessions/sessions-toolbar.js +4 -4
- package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -1
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +47 -4
- package/dist/workspace/sidebar/footer/project-memory-nav.d.ts +1 -1
- package/dist/workspace/sidebar/footer/project-memory-nav.js +1 -1
- package/dist/workspace/sidebar/project-nav-items.js +13 -17
- package/dist/workspace/sidebar/project-session-list.d.ts +7 -1
- package/dist/workspace/sidebar/project-session-list.js +63 -24
- package/dist/workspace/sidebar/project-sidebar.js +10 -7
- package/dist/workspace/sidebar/project-spaces-nav.d.ts +7 -3
- package/dist/workspace/sidebar/project-spaces-nav.js +77 -46
- package/dist/workspace/sidebar/session-brief-hover-card.d.ts +4 -2
- package/dist/workspace/sidebar/session-brief-hover-card.js +47 -28
- package/dist/workspace/sidebar/session-group-sections.js +12 -4
- package/dist/workspace/sidebar/sidebar-more-group.d.ts +13 -0
- package/dist/workspace/sidebar/sidebar-more-group.js +27 -0
- package/dist/workspace/space/space-blocks.d.ts +3 -1
- package/dist/workspace/space/space-blocks.js +4 -7
- package/dist/workspace/space/space-page.d.ts +4 -6
- package/dist/workspace/space/space-page.js +10 -24
- package/dist/workspace/space/space-tab-panels.d.ts +14 -1
- package/dist/workspace/space/space-tab-panels.js +12 -21
- package/dist/workspace/space/space-templates.d.ts +4 -5
- package/dist/workspace/space/space-templates.js +2 -7
- package/dist/workspace/space/use-space-filter.d.ts +1 -1
- package/dist/workspace/space/use-space-filter.js +1 -1
- package/dist/workspace/spaces/channels-onboarding.d.ts +2 -2
- package/dist/workspace/spaces/channels-onboarding.js +4 -3
- package/dist/workspace/spaces/create-channel-dialog.js +4 -2
- package/dist/workspace/spaces/principal-card.d.ts +73 -0
- package/dist/workspace/spaces/principal-card.js +246 -0
- package/dist/workspace/spaces/space-agent-ask.d.ts +14 -0
- package/dist/workspace/spaces/space-agent-ask.js +36 -0
- package/dist/workspace/spaces/space-auto-open.d.ts +8 -0
- package/dist/workspace/spaces/space-auto-open.js +18 -0
- package/dist/workspace/spaces/space-avatar.d.ts +44 -0
- package/dist/workspace/spaces/space-avatar.js +41 -0
- package/dist/workspace/spaces/space-details-dialog.js +1 -1
- package/dist/workspace/spaces/space-details-panel.d.ts +27 -0
- package/dist/workspace/spaces/space-details-panel.js +173 -0
- package/dist/workspace/spaces/space-identity.d.ts +49 -0
- package/dist/workspace/spaces/space-identity.js +104 -0
- package/dist/workspace/spaces/space-members.js +1 -1
- package/dist/workspace/spaces/space-mention-source.d.ts +13 -0
- package/dist/workspace/spaces/space-mention-source.js +71 -0
- package/dist/workspace/spaces/space-people.d.ts +29 -0
- package/dist/workspace/spaces/space-people.js +87 -0
- package/dist/workspace/spaces/space-roster.d.ts +3 -2
- package/dist/workspace/spaces/space-roster.js +7 -4
- package/dist/workspace/spaces/space-tab-list.d.ts +37 -0
- package/dist/workspace/spaces/space-tab-list.js +82 -0
- package/dist/workspace/spaces/space-tabs.d.ts +74 -0
- package/dist/workspace/spaces/space-tabs.js +199 -0
- package/dist/workspace/spaces/space-threads-tab.js +1 -1
- package/dist/workspace/spaces/space-timeline-view.js +126 -17
- package/dist/workspace/spaces/space-timeline.d.ts +44 -9
- package/dist/workspace/spaces/space-timeline.js +120 -12
- package/dist/workspace/spaces/space-view.d.ts +19 -12
- package/dist/workspace/spaces/space-view.js +203 -68
- package/dist/workspace/spaces/use-personal-space-name.d.ts +2 -0
- package/dist/workspace/spaces/use-personal-space-name.js +10 -0
- package/package.json +11 -7
- package/skills/kortix-ui/SKILL.md +1 -1
- package/skills/kortix-ui/references/custom-dashboard.md +2 -3
- package/skills/kortix-ui/references/modules.md +4 -4
- package/dist/_vendor/shared/room-prompt.d.ts +0 -66
- package/dist/session/tool/tools/multi-agent-tool-data.d.ts +0 -63
- package/dist/session/tool/tools/multi-agent-tool-data.js +0 -118
- package/dist/session/voice/voice-call-bar.d.ts +0 -4
- package/dist/session/voice/voice-call-bar.js +0 -39
- package/dist/workspace/sidebar/footer/project-rooms-nav.d.ts +0 -9
- package/dist/workspace/sidebar/footer/project-rooms-nav.js +0 -32
- package/dist/workspace/sidebar/session-status-mark.d.ts +0 -19
- package/dist/workspace/space/space-room.d.ts +0 -20
- package/dist/workspace/space/space-room.js +0 -27
- /package/dist/{workspace/sidebar → session/list}/session-list-chrome.d.ts +0 -0
- /package/dist/{workspace/sidebar → session/list}/session-list-chrome.js +0 -0
|
@@ -16,7 +16,7 @@ import { normalizeString } from '../evidence.js';
|
|
|
16
16
|
const RUNTIME_NOT_READY_NOISE_PATTERNS = [
|
|
17
17
|
'Server URL not ready',
|
|
18
18
|
'sandbox is still loading',
|
|
19
|
-
// The daemon's not-ready 503,
|
|
19
|
+
// The daemon's not-ready 503, with or without its code.
|
|
20
20
|
...RUNTIME_NOT_READY_MARKERS,
|
|
21
21
|
];
|
|
22
22
|
// Expected billing-gate HTTP 402 messages. The API billing gate
|
|
@@ -47,32 +47,6 @@ const BILLING_GATE_EXPECTED_MESSAGES = [
|
|
|
47
47
|
// `payment_failed` — the last payment failed and the wallet is empty.
|
|
48
48
|
"Your last payment didn't go through and your wallet is empty. Update your payment method or top up to keep running.",
|
|
49
49
|
];
|
|
50
|
-
// Expected "no compaction model configured" configuration state. The SDK's
|
|
51
|
-
// `useSummarizeRuntimeSession` mutation
|
|
52
|
-
// (`packages/sdk/src/react/use-opencode-sessions/sessions.ts`) throws a
|
|
53
|
-
// sentinel-marked `NoCompactionModelError`
|
|
54
|
-
// (`packages/sdk/src/react/use-opencode-sessions/no-compaction-model-error.ts`;
|
|
55
|
-
// `apps/mobile` uses the same mutation)
|
|
56
|
-
// when every model-resolution fallback tier fails (no config default, no
|
|
57
|
-
// assistant message in the thread, no connected provider/model). It is an
|
|
58
|
-
// EXPECTED, user-facing configuration outcome — the host already surfaces it
|
|
59
|
-
// via the `loadingToast` error toast ("No model available for compaction.
|
|
60
|
-
// Please configure a model in settings.") and the global react-query mutation
|
|
61
|
-
// `onError` toast — never a code defect.
|
|
62
|
-
//
|
|
63
|
-
// It leaks to Sentry as an unhandled promise rejection: `compact-modal.tsx`
|
|
64
|
-
// fires `void loadingToast(() => summarize.mutateAsync(...))`, and
|
|
65
|
-
// `loadingToast` re-throws the error after showing the toast (toast.tsx), so
|
|
66
|
-
// the `void`-fired rejection is auto-captured by the Sentry SDK's
|
|
67
|
-
// `onunhandledrejection` integration. Drop it here at the telemetry gate so
|
|
68
|
-
// the expected config state never pages Better Stack, regardless of which
|
|
69
|
-
// capture path delivered it. A longer real mutation failure (network error,
|
|
70
|
-
// `summarize` 5xx, a genuine `TypeError`, …) keeps reporting — only an exact
|
|
71
|
-
// match for this message (plus the explicit canonical wrappers below) is
|
|
72
|
-
// suppressed.
|
|
73
|
-
const COMPACTION_NO_MODEL_EXPECTED_MESSAGES = [
|
|
74
|
-
'No model available for compaction. Please configure a model in settings.',
|
|
75
|
-
];
|
|
76
50
|
// Expected "model not available for this account" UI validation state. The API
|
|
77
51
|
// returns a TYPED 409 with `code: 'model_not_servable'`
|
|
78
52
|
// (`apps/api/src/projects/routes/models.ts` and `channel-bindings.ts:288`, both
|
|
@@ -118,18 +92,18 @@ const COMPACTION_NO_MODEL_EXPECTED_MESSAGES = [
|
|
|
118
92
|
// `handled:false`).
|
|
119
93
|
//
|
|
120
94
|
// This is the leak-path backstop for the #6082 SDK gate, sibling to
|
|
121
|
-
// `isExpectedBillingGateMessage`
|
|
95
|
+
// `isExpectedBillingGateMessage`
|
|
122
96
|
// (also `ApiError`/Error throws that leak via `void` fire-and-forget →
|
|
123
97
|
// `onunhandledrejection`). The model name varies (e.g.
|
|
124
98
|
// `openai/gpt-5.4-mini`, `nvidia/minimaxai/minimax-m3`), so — unlike the
|
|
125
|
-
// billing-gate
|
|
99
|
+
// billing-gate exact-string matchers — this is a REGEX anchored
|
|
126
100
|
// on the EXACT API wording `Model "…" is not available for this account`
|
|
127
101
|
// (the `Model "` prefix and `is not available for this account` suffix are
|
|
128
102
|
// the API's own canonical strings across all four emitting routes), with the
|
|
129
103
|
// canonical `ApiError: ` / `Unhandled promise rejection: ` wrappers stripped
|
|
130
104
|
// so all capture paths (window.onerror, onunhandledrejection, Sentry
|
|
131
105
|
// exception) classify consistently. Deliberately message-only with NO
|
|
132
|
-
// first-party frame negative guard — mirroring the billing-gate
|
|
106
|
+
// first-party frame negative guard — mirroring the billing-gate
|
|
133
107
|
// matchers — because (a) the message is the API's own canonical wording
|
|
134
108
|
// (never a coincidental app-logic phrase), (b) the SDK gate already handles
|
|
135
109
|
// the `onError` path, and (c) the unhandled-rejection stack DOES carry
|
|
@@ -266,25 +240,6 @@ export function isExpectedBillingGateMessage(message) {
|
|
|
266
240
|
normalized === `Unhandled promise rejection: ${expected}` ||
|
|
267
241
|
normalized === `Unhandled promise rejection: ApiError: ${expected}`);
|
|
268
242
|
}
|
|
269
|
-
/**
|
|
270
|
-
* Whether a message is the EXPECTED "no compaction model configured"
|
|
271
|
-
* configuration state thrown by the SDK's `useSummarizeRuntimeSession`
|
|
272
|
-
* mutation (`NoCompactionModelError`) when every model-resolution fallback
|
|
273
|
-
* tier fails. The host already surfaces it via a user-facing toast; it must
|
|
274
|
-
* never page Better Stack, but the sentinel error can leak to Sentry as an
|
|
275
|
-
* unhandled promise rejection (`void loadingToast(...)` re-throws after
|
|
276
|
-
* showing the toast → `onunhandledrejection` auto-capture). Match is exact
|
|
277
|
-
* after trimming, with only the canonical browser/Sentry wrappers we
|
|
278
|
-
* explicitly support, so a longer real error that merely mentions the wording
|
|
279
|
-
* is never matched.
|
|
280
|
-
*/
|
|
281
|
-
export function isExpectedCompactionNoModelMessage(message) {
|
|
282
|
-
const normalized = normalizeString(message).trim();
|
|
283
|
-
return COMPACTION_NO_MODEL_EXPECTED_MESSAGES.some((expected) => normalized === expected ||
|
|
284
|
-
normalized === `Error: ${expected}` ||
|
|
285
|
-
normalized === `Unhandled promise rejection: ${expected}` ||
|
|
286
|
-
normalized === `Unhandled promise rejection: Error: ${expected}`);
|
|
287
|
-
}
|
|
288
243
|
/**
|
|
289
244
|
* Whether a message is the EXPECTED "model not available for this account"
|
|
290
245
|
* UI validation state — the typed 409 `code: 'model_not_servable'` the API
|
|
@@ -303,8 +258,8 @@ export function isExpectedCompactionNoModelMessage(message) {
|
|
|
303
258
|
* REGEX anchored on the EXACT API wording `Model "…" is not available for
|
|
304
259
|
* this account`, with the canonical `ApiError: ` / `Unhandled promise
|
|
305
260
|
* rejection: ` wrappers, so a longer real error that merely mentions the
|
|
306
|
-
* phrase is never matched. Sibling to `isExpectedBillingGateMessage`
|
|
307
|
-
*
|
|
261
|
+
* phrase is never matched. Sibling to `isExpectedBillingGateMessage`
|
|
262
|
+
* (also `ApiError`/Error throws that
|
|
308
263
|
* leak via `void` fire-and-forget); deliberately message-only with NO
|
|
309
264
|
* first-party frame negative guard — see `MODEL_NOT_SERVABLE_NOISE_PATTERNS`
|
|
310
265
|
* for the full rationale. See Better Stack pattern `9784f440…`.
|
|
@@ -377,11 +332,6 @@ export const EXPECTED_STATE_RULES = [
|
|
|
377
332
|
appliesTo: 'both',
|
|
378
333
|
match: ({ message }) => isExpectedBillingGateMessage(message),
|
|
379
334
|
},
|
|
380
|
-
{
|
|
381
|
-
id: 'compaction-no-model',
|
|
382
|
-
appliesTo: 'both',
|
|
383
|
-
match: ({ message }) => isExpectedCompactionNoModelMessage(message),
|
|
384
|
-
},
|
|
385
335
|
{
|
|
386
336
|
id: 'model-not-servable',
|
|
387
337
|
appliesTo: 'both',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isBrowserBundleSource, isFirstPartyResolvedSource, normalizeString, sourcesOf, stripErrorWrappers, } from '../evidence.js';
|
|
2
|
+
import { isScriptAssetSource } from './old-browsers.js';
|
|
2
3
|
// OneTrust cookie-consent SDK JSON-parse noise. OneTrust
|
|
3
4
|
// (`https://onetrust.com`) is a third-party cookie-consent / IAB TCF banner
|
|
4
5
|
// vendors inject into pages via a small bootstrap stub
|
|
@@ -227,6 +228,22 @@ export function isGoogletagUndefinedNoise(input) {
|
|
|
227
228
|
return (GOOGLETAG_UNDEFINED_MESSAGE.test(stripErrorWrappers(normalizeString(input.message))) &&
|
|
228
229
|
!sourcesOf(input).some((source) => isBrowserBundleSource(source) || isFirstPartyResolvedSource(source)));
|
|
229
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* A script injected into the page twice declares the same top-level `let` or
|
|
233
|
+
* `const`: `Identifier 'originalQuery' has already been declared`. Better
|
|
234
|
+
* Stack, Kortix Frontend prod, 2026-11-06 (KRTX-4353, pattern `cc5efbb8…`):
|
|
235
|
+
* one frame, the page document `app:///` at 1:1, global `onerror`, 0 users.
|
|
236
|
+
* Kortix code cannot raise it from the document: our bundle chunks wrap their
|
|
237
|
+
* code in functions and report their own `_next/static` URL, and our inline
|
|
238
|
+
* scripts declare nothing at the top level. A frame in a loaded script (our
|
|
239
|
+
* bundles, any `.js` URL, an extension) or in resolved first-party source
|
|
240
|
+
* keeps reporting.
|
|
241
|
+
*/
|
|
242
|
+
const REDECLARED_IDENTIFIER_MESSAGE = /^(?:Uncaught SyntaxError: )?Identifier '[^']+' has already been declared$/;
|
|
243
|
+
function isRedeclaredInjectedIdentifierNoise(input) {
|
|
244
|
+
return (REDECLARED_IDENTIFIER_MESSAGE.test(stripErrorWrappers(normalizeString(input.message))) &&
|
|
245
|
+
!sourcesOf(input).some((source) => isScriptAssetSource(source) || isFirstPartyResolvedSource(source)));
|
|
246
|
+
}
|
|
230
247
|
/** Vercel toolbar frames have a reserved source path outside app bundles. */
|
|
231
248
|
export function isVercelLiveFeedbackNoise(input) {
|
|
232
249
|
const sources = sourcesOf(input);
|
|
@@ -240,5 +257,6 @@ export const INJECTED_SCRIPT_RULES = [
|
|
|
240
257
|
{ id: 'redefine-wallet-provider', appliesTo: 'both', match: isRedefineInjectedWalletNoise },
|
|
241
258
|
{ id: 'wallet-provider-write', appliesTo: 'both', match: isInjectedWalletProviderWriteNoise },
|
|
242
259
|
{ id: 'googletag-undefined', appliesTo: 'both', match: isGoogletagUndefinedNoise },
|
|
260
|
+
{ id: 'redeclared-injected-identifier', appliesTo: 'both', match: isRedeclaredInjectedIdentifierNoise },
|
|
243
261
|
{ id: 'vercel-live-feedback', appliesTo: 'both', match: isVercelLiveFeedbackNoise },
|
|
244
262
|
];
|
|
@@ -189,6 +189,7 @@ export declare function isUndefinedVariableThirdPartyNoise(input: {
|
|
|
189
189
|
filename?: unknown;
|
|
190
190
|
} | undefined>;
|
|
191
191
|
}): boolean;
|
|
192
|
+
export declare function isScriptAssetSource(filename: unknown): boolean;
|
|
192
193
|
/**
|
|
193
194
|
* Whether a Sentry / window.onerror event is the Firefox dead-object
|
|
194
195
|
* external-scope noise class: a `TypeError: can't access dead object`
|
|
@@ -608,7 +608,7 @@ const FIREFOX_DEAD_OBJECT_NOISE_PATTERN = /^can['’]t access dead object$/i;
|
|
|
608
608
|
// `app:///projects/…`) carries no file extension and is NOT a script frame:
|
|
609
609
|
// it is Firefox's fallback source for a throw whose stack is uncapturable,
|
|
610
610
|
// and it is exactly the shape this rule drops.
|
|
611
|
-
function isScriptAssetSource(filename) {
|
|
611
|
+
export function isScriptAssetSource(filename) {
|
|
612
612
|
const normalized = normalizeString(filename);
|
|
613
613
|
if (normalized === '' || normalized === 'undefined')
|
|
614
614
|
return false;
|
|
@@ -102,15 +102,6 @@ export declare function isNonErrorObjectNotFoundRejectionNoise(input: {
|
|
|
102
102
|
filename?: unknown;
|
|
103
103
|
} | undefined>;
|
|
104
104
|
}): boolean;
|
|
105
|
-
export declare function isAnonymousAuthRefreshRace(input: {
|
|
106
|
-
message?: unknown;
|
|
107
|
-
requestUrl?: string;
|
|
108
|
-
mechanism?: unknown;
|
|
109
|
-
frames?: Array<{
|
|
110
|
-
function?: unknown;
|
|
111
|
-
filename?: unknown;
|
|
112
|
-
}>;
|
|
113
|
-
}): boolean;
|
|
114
105
|
/**
|
|
115
106
|
* Whether a Sentry event is the frameless `HTMLMediaElement.play()`
|
|
116
107
|
* `NotAllowedError` autoplay-policy rejection: the play promise denied by
|
|
@@ -414,19 +414,6 @@ export function isNonErrorObjectNotFoundRejectionNoise(input) {
|
|
|
414
414
|
}
|
|
415
415
|
return true;
|
|
416
416
|
}
|
|
417
|
-
// A Supabase refresh can race with sign-out on the anonymous landing page.
|
|
418
|
-
// The SDK rejects with AuthSessionMissingError when its stored session has
|
|
419
|
-
// disappeared; there is no session to recover and no user to notify.
|
|
420
|
-
export function isAnonymousAuthRefreshRace(input) {
|
|
421
|
-
if (normalizeString(input.message) !== 'Auth session missing!' ||
|
|
422
|
-
input.requestUrl !== 'https://kortix.com/' ||
|
|
423
|
-
input.mechanism !== 'auto.browser.global_handlers.onunhandledrejection')
|
|
424
|
-
return false;
|
|
425
|
-
const frames = input.frames ?? [];
|
|
426
|
-
return frames.some((frame) => normalizeString(frame.function).includes('refreshSession') &&
|
|
427
|
-
isBrowserBundleSource(frame.filename)) &&
|
|
428
|
-
!frames.some((frame) => isFirstPartyResolvedSource(frame.filename));
|
|
429
|
-
}
|
|
430
417
|
// An `HTMLMediaElement.play()` promise the browser's autoplay policy denied.
|
|
431
418
|
// The HTML spec fixes the DOMException message: `NotAllowedError: The play
|
|
432
419
|
// method is not allowed by the user agent or the platform in the current
|
|
@@ -532,7 +519,6 @@ export const REJECTION_RULES = [
|
|
|
532
519
|
appliesTo: 'sentry',
|
|
533
520
|
match: isNonErrorUndefinedRejectionNoise,
|
|
534
521
|
},
|
|
535
|
-
{ id: 'anonymous-auth-refresh-race', appliesTo: 'sentry', match: isAnonymousAuthRefreshRace },
|
|
536
522
|
{ id: 'pop-error-scope', appliesTo: 'sentry', match: isOperationErrorPopErrorScopeNoise },
|
|
537
523
|
{ id: 'supabase-token-expired', appliesTo: 'sentry', match: isSupabaseTokenExpiredNoise },
|
|
538
524
|
{
|
|
@@ -140,9 +140,9 @@ export declare function capabilityTabHref(projectId: string, key: CapabilityTab[
|
|
|
140
140
|
*/
|
|
141
141
|
export declare function capabilityLinkHref(projectId: string, key: CapabilityTab['key']): string | null;
|
|
142
142
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* 2026-10-17, redirects
|
|
143
|
+
* Review: its own page at `/projects/<id>/review` (since 2026-11-04), or null
|
|
144
|
+
* when the host serves no Review page. `/customize/review`, its address from
|
|
145
|
+
* 2026-10-17, redirects there.
|
|
146
146
|
*/
|
|
147
147
|
export declare function reviewHref(projectId: string): string | null;
|
|
148
148
|
/**
|
|
@@ -138,6 +138,9 @@ export const ADMIN_SECTION = {
|
|
|
138
138
|
};
|
|
139
139
|
/** The tab's URL: its Project admin section, else the host's `customize` route. */
|
|
140
140
|
export function capabilityTabHref(projectId, key) {
|
|
141
|
+
// Review is its own page, outside Customize (Marko, 2026-11-04).
|
|
142
|
+
if (key === 'review')
|
|
143
|
+
return uiRoutes().review?.(projectId) ?? customizePath(projectId, CAPABILITY_SEGMENT.review);
|
|
141
144
|
const section = ADMIN_SECTION[key];
|
|
142
145
|
return section ? adminPath(projectId, section) : customizePath(projectId, CAPABILITY_SEGMENT[key]);
|
|
143
146
|
}
|
|
@@ -149,13 +152,18 @@ export function capabilityTabHref(projectId, key) {
|
|
|
149
152
|
* `capabilityTabHref` is the customize pages' own tab URL and never null.
|
|
150
153
|
*/
|
|
151
154
|
export function capabilityLinkHref(projectId, key) {
|
|
155
|
+
if (key === 'review') {
|
|
156
|
+
// A host that serves no customize pages serves no Review page either, unless it routes one.
|
|
157
|
+
const routes = uiRoutes();
|
|
158
|
+
return routes.review ? routes.review(projectId) : routes.customize(projectId, CAPABILITY_SEGMENT.review);
|
|
159
|
+
}
|
|
152
160
|
const section = ADMIN_SECTION[key];
|
|
153
161
|
return section ? uiRoutes().admin(projectId, section) : uiRoutes().customize(projectId, CAPABILITY_SEGMENT[key]);
|
|
154
162
|
}
|
|
155
163
|
/**
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* 2026-10-17, redirects
|
|
164
|
+
* Review: its own page at `/projects/<id>/review` (since 2026-11-04), or null
|
|
165
|
+
* when the host serves no Review page. `/customize/review`, its address from
|
|
166
|
+
* 2026-10-17, redirects there.
|
|
159
167
|
*/
|
|
160
168
|
export function reviewHref(projectId) {
|
|
161
169
|
return capabilityLinkHref(projectId, 'review');
|
|
@@ -3,8 +3,8 @@ import { RUNTIME_NOT_READY_MARKERS } from '@kortix/sdk';
|
|
|
3
3
|
* Did the prompt reach the agent before the connection gave up?
|
|
4
4
|
*
|
|
5
5
|
* `POST /session/:id/command` blocks until the whole turn finishes, and two
|
|
6
|
-
* proxy hops sit between the browser and
|
|
7
|
-
* while
|
|
6
|
+
* proxy hops sit between the browser and the runtime. Either can stop waiting
|
|
7
|
+
* while the runtime is still working perfectly well:
|
|
8
8
|
*
|
|
9
9
|
* - the sandbox daemon answers `502 {"error":"upstream unreachable"}` once its
|
|
10
10
|
* header wait elapses (`kortix-sandbox-agent-server/src/app/server.ts`)
|
|
@@ -57,11 +57,9 @@ const DELIVERED_BUT_DISCONNECTED = [
|
|
|
57
57
|
* forwarding, so nothing was delivered and the message really is lost.
|
|
58
58
|
*/
|
|
59
59
|
const REFUSED_BEFORE_DELIVERY = [
|
|
60
|
-
// The daemon's not-ready 503,
|
|
60
|
+
// The daemon's not-ready 503, with or without its code.
|
|
61
61
|
...RUNTIME_NOT_READY_MARKERS,
|
|
62
62
|
'initial_runtime_session',
|
|
63
|
-
// A daemon built before W4 names the same refusal this way.
|
|
64
|
-
'initial_opencode_session',
|
|
65
63
|
'econnrefused',
|
|
66
64
|
'connection refused',
|
|
67
65
|
'unauthorized',
|
|
@@ -182,8 +182,12 @@ export const handleApiError = (error, context, tI18nComplete) => {
|
|
|
182
182
|
// (`isGitMirrorUnavailableNoiseMessage`); a genuine 503 with another
|
|
183
183
|
// message/code still reports.
|
|
184
184
|
const isGitMirrorUnavailable503 = status === 503 && isGitMirrorUnavailableNoiseMessage(errorMessage);
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
// The previous API tasks answer `503 deploy_in_progress` while a release
|
|
186
|
+
// migration they predate rolls out (`resolveSessionInsertFailure`): accepted
|
|
187
|
+
// deploy downtime. The toast tells the user to retry; nothing to report.
|
|
188
|
+
const isDeployInProgress503 = status === 503 && error?.code === 'deploy_in_progress';
|
|
189
|
+
const reportsServerError = status >= 500 && !isServerDeadline503 && !isGitMirrorUnavailable503 && !isDeployInProgress503;
|
|
190
|
+
if (reportsServerError || error?.code === 'NETWORK_ERROR') {
|
|
187
191
|
captureException(error instanceof Error ? error : new Error(error?.message || String(error)), {
|
|
188
192
|
tags: {
|
|
189
193
|
errorType: status >= 500 ? 'server_error' : 'network_error',
|
|
@@ -286,8 +290,9 @@ export const handleApiError = (error, context, tI18nComplete) => {
|
|
|
286
290
|
return;
|
|
287
291
|
}
|
|
288
292
|
if (error?.status >= 500) {
|
|
293
|
+
// "Our team has been notified" is true only when it was captured above.
|
|
289
294
|
errorToast(formattedMessage, {
|
|
290
|
-
description: tI18nComplete.raw('text75aec78d2ee8'),
|
|
295
|
+
description: reportsServerError ? tI18nComplete.raw('text75aec78d2ee8') : undefined,
|
|
291
296
|
duration: 6000,
|
|
292
297
|
});
|
|
293
298
|
}
|
|
@@ -39,120 +39,15 @@
|
|
|
39
39
|
* exactly equivalent to setting ANTHROPIC_API_KEY on the Secrets page, just
|
|
40
40
|
* with a friendlier flow.
|
|
41
41
|
*/
|
|
42
|
-
import { type
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* release_date when known (YYYY-MM-DD). Used to drive newest-first ordering.
|
|
48
|
-
* The catalog generator already pre-sorts each provider's models by this
|
|
49
|
-
* field; the field is exposed so the UI can render a "released X ago" hint.
|
|
50
|
-
* Optional to stay assignable from `@kortix/llm-catalog`'s `CatalogModel`
|
|
51
|
-
* (the live /llm-catalog/providers wire shape) — absent means unknown,
|
|
52
|
-
* exactly like null.
|
|
53
|
-
*/
|
|
54
|
-
released?: string | null;
|
|
55
|
-
/**
|
|
56
|
-
* Capability + limit flags mirrored verbatim from models.dev — present on
|
|
57
|
-
* both the baked seed (`catalog.generated.json`) and the live
|
|
58
|
-
* `/llm-catalog/providers` fetch (see `@kortix/llm-catalog`'s
|
|
59
|
-
* `CatalogModel`, the shape both ultimately originate from). Optional
|
|
60
|
-
* because the synthetic `codex`/`kortix` provider entries built in this
|
|
61
|
-
* section (`utils.ts`'s `buildCodexProvider`, `use-connected-providers.ts`'s
|
|
62
|
-
* `kortixProvider`) only set what the opencode provider snapshot exposes.
|
|
63
|
-
*/
|
|
64
|
-
description?: string;
|
|
65
|
-
attachment?: boolean;
|
|
66
|
-
reasoning?: boolean;
|
|
67
|
-
/** Present iff the model exposes a tunable reasoning-effort knob — see
|
|
68
|
-
* `@kortix/llm-catalog`'s `generationControlCapabilities`, the single
|
|
69
|
-
* source of truth the generation-controls panel derives its
|
|
70
|
-
* show/hide + valid-values from. Never hardcode a per-model list. */
|
|
71
|
-
reasoning_options?: CatalogReasoningOption[];
|
|
72
|
-
tool_call?: boolean;
|
|
73
|
-
/** false means FIXED temperature (e.g. gpt-5.6-sol) — the generation-
|
|
74
|
-
* controls panel must hide the temperature (and top_p) slider entirely. */
|
|
75
|
-
temperature?: boolean;
|
|
76
|
-
structured_output?: boolean;
|
|
77
|
-
interleaved?: boolean | {
|
|
78
|
-
field?: string;
|
|
79
|
-
};
|
|
80
|
-
open_weights?: boolean;
|
|
81
|
-
knowledge?: string;
|
|
82
|
-
last_updated?: string;
|
|
83
|
-
family?: string;
|
|
84
|
-
modalities?: CatalogModalities;
|
|
85
|
-
limit?: {
|
|
86
|
-
context?: number;
|
|
87
|
-
input?: number;
|
|
88
|
-
output?: number;
|
|
89
|
-
};
|
|
90
|
-
cost?: CatalogCost;
|
|
91
|
-
}
|
|
92
|
-
export interface LlmProviderEntry {
|
|
93
|
-
/** Stable id (matches provider-branding logo lookup). */
|
|
94
|
-
id: string;
|
|
95
|
-
/** Display name. */
|
|
96
|
-
label: string;
|
|
97
|
-
/**
|
|
98
|
-
* Env vars the connect form collects and writes to project_secrets — the
|
|
99
|
-
* PRIMARY auth method's fields (see `authRequirement`), not necessarily
|
|
100
|
-
* the raw models.dev `env` list. Most providers have exactly one; some
|
|
101
|
-
* (Azure, Bedrock) need multiple.
|
|
102
|
-
*/
|
|
103
|
-
envVars: string[];
|
|
104
|
-
/**
|
|
105
|
-
* The full Kortix-owned auth requirement (possibly multiple independent
|
|
106
|
-
* methods — see `@kortix/llm-catalog`'s `providerAuthRequirement`).
|
|
107
|
-
* "Connected" detection must check this (any method fully satisfied), not
|
|
108
|
-
* just `envVars` — a provider can have alias methods (e.g. Google) or,
|
|
109
|
-
* in future, alternate methods (e.g. Bedrock SigV4) beyond the primary one
|
|
110
|
-
* the connect form shows.
|
|
111
|
-
*/
|
|
112
|
-
authRequirement: ProviderAuthRequirement;
|
|
113
|
-
/** Where the user gets their credentials — opens in a new tab. */
|
|
114
|
-
helpUrl: string | null;
|
|
115
|
-
/**
|
|
116
|
-
* Hostname of the provider's API base URL, lowercased — `api.openai.com`
|
|
117
|
-
* from `https://api.openai.com/v1`. Null when models.dev declares no `api`
|
|
118
|
-
* for the provider (24 of 167 today, Anthropic and OpenAI among them), and
|
|
119
|
-
* null for a malformed URL. Never guessed: the Secrets page prefills this as
|
|
120
|
-
* an approved host for a recognized model key, and a wrong host would send
|
|
121
|
-
* the credential nowhere or, worse, somewhere else.
|
|
122
|
-
*/
|
|
123
|
-
apiHost: string | null;
|
|
124
|
-
/** Short one-line tag shown in the catalog row. */
|
|
125
|
-
hint: string;
|
|
126
|
-
/** Catalog of models for this provider. */
|
|
127
|
-
models: LlmProviderModel[];
|
|
128
|
-
/** True for the curated popular set — pinned to the top of the catalog. */
|
|
129
|
-
featured: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Platform-managed provider (the Kortix gateway). Injected into every sandbox
|
|
132
|
-
* automatically — no API key, no connect/disconnect flow. Rendered as an
|
|
133
|
-
* always-connected "Managed" row rather than a BYO credential entry.
|
|
134
|
-
*/
|
|
135
|
-
managed?: boolean;
|
|
136
|
-
}
|
|
137
|
-
export interface RawProvider {
|
|
138
|
-
id: string;
|
|
139
|
-
name: string;
|
|
140
|
-
env?: string[];
|
|
141
|
-
doc?: string | null;
|
|
142
|
-
/** Base URL of the provider's API, verbatim from models.dev. Absent for the
|
|
143
|
-
* providers whose SDK hardcodes it (Anthropic, OpenAI, Google, …). */
|
|
144
|
-
api?: string | null;
|
|
145
|
-
models: LlmProviderModel[];
|
|
146
|
-
}
|
|
147
|
-
export interface RawCatalog {
|
|
42
|
+
import { type LlmProviderCatalogSource, type LlmProviderEntry, type LlmProviderModel, type LlmProviderSource, buildLlmProviderCatalog } from '@kortix/sdk';
|
|
43
|
+
export { buildLlmProviderCatalog, type LlmProviderEntry, type LlmProviderModel };
|
|
44
|
+
export type RawProvider = LlmProviderSource;
|
|
45
|
+
export interface RawCatalog extends LlmProviderCatalogSource {
|
|
148
46
|
source: string;
|
|
149
47
|
fetched_at: string;
|
|
150
48
|
provider_count: number;
|
|
151
49
|
model_count: number;
|
|
152
|
-
providers: RawProvider[];
|
|
153
50
|
}
|
|
154
|
-
/** Pure: raw catalog (baked seed OR a live `/llm-catalog/providers` fetch) → the modal's provider list, sorted. */
|
|
155
|
-
export declare function buildLlmProviderCatalog(raw: RawCatalog): LlmProviderEntry[];
|
|
156
51
|
export declare let LLM_PROVIDERS: LlmProviderEntry[];
|
|
157
52
|
/** Lookup by id. */
|
|
158
53
|
export declare let LLM_PROVIDER_BY_ID: Map<string, LlmProviderEntry>;
|
|
@@ -182,4 +77,3 @@ export declare function getLlmProviderCatalogRevision(): number;
|
|
|
182
77
|
* from the given raw catalog, never a partial merge.
|
|
183
78
|
*/
|
|
184
79
|
export declare function applyLiveLlmProviderCatalog(raw: RawCatalog): void;
|
|
185
|
-
export {};
|
|
@@ -38,109 +38,12 @@
|
|
|
38
38
|
* exactly equivalent to setting ANTHROPIC_API_KEY on the Secrets page, just
|
|
39
39
|
* with a friendlier flow.
|
|
40
40
|
*/
|
|
41
|
-
import { CATALOG as catalog
|
|
41
|
+
import { CATALOG as catalog } from '@kortix/llm-catalog';
|
|
42
|
+
import { buildLlmProviderCatalog, } from '@kortix/sdk';
|
|
43
|
+
// The row shape and the builder live in `@kortix/sdk` (core/models/provider-connections)
|
|
44
|
+
// so the TUI reads the same catalogue rows. This module keeps the live binding.
|
|
45
|
+
export { buildLlmProviderCatalog };
|
|
42
46
|
const BAKED_SEED = catalog;
|
|
43
|
-
/**
|
|
44
|
-
* Curated featured set — these surface first in the modal. Anything not in
|
|
45
|
-
* this list is still browsable below, sorted A-Z.
|
|
46
|
-
*/
|
|
47
|
-
const FEATURED_IDS = new Set([
|
|
48
|
-
'anthropic',
|
|
49
|
-
'openai',
|
|
50
|
-
'google',
|
|
51
|
-
'openrouter',
|
|
52
|
-
'vercel',
|
|
53
|
-
'github-copilot',
|
|
54
|
-
'groq',
|
|
55
|
-
'xai',
|
|
56
|
-
'deepseek',
|
|
57
|
-
'mistral',
|
|
58
|
-
'cerebras',
|
|
59
|
-
'togetherai',
|
|
60
|
-
'fireworks-ai',
|
|
61
|
-
'perplexity',
|
|
62
|
-
'amazon-bedrock',
|
|
63
|
-
'azure',
|
|
64
|
-
'google-vertex',
|
|
65
|
-
'huggingface',
|
|
66
|
-
'cohere',
|
|
67
|
-
'cohere-platform',
|
|
68
|
-
'nvidia',
|
|
69
|
-
'kortix',
|
|
70
|
-
]);
|
|
71
|
-
/**
|
|
72
|
-
* The one-line tag shown in the catalog row — DERIVED from models.dev's own
|
|
73
|
-
* model list (already newest-first per the catalog generator), never a
|
|
74
|
-
* hand-maintained per-provider description. A hand-written map here rots
|
|
75
|
-
* silently (it drifts from what a provider actually serves — the old
|
|
76
|
-
* `amazon-bedrock: 'AWS Bedrock — Claude, Llama, Titan'` entry was already
|
|
77
|
-
* wrong: Kortix's Bedrock transport only ever serves the Claude lineup) and
|
|
78
|
-
* has to be hand-edited for every new provider models.dev adds. This reads
|
|
79
|
-
* straight off `raw.models`, so it's automatically correct and automatically
|
|
80
|
-
* covers new providers with zero code changes.
|
|
81
|
-
*/
|
|
82
|
-
function deriveHint(raw) {
|
|
83
|
-
if (raw.models.length === 0)
|
|
84
|
-
return 'No models';
|
|
85
|
-
const names = raw.models.slice(0, 2).map((m) => m.name);
|
|
86
|
-
const remaining = raw.models.length - names.length;
|
|
87
|
-
return remaining > 0 ? `${names.join(', ')} +${remaining} more` : names.join(', ');
|
|
88
|
-
}
|
|
89
|
-
/** The hostname of `raw.api`, or null when it is absent or unparseable. */
|
|
90
|
-
function deriveApiHost(raw) {
|
|
91
|
-
if (!raw.api)
|
|
92
|
-
return null;
|
|
93
|
-
try {
|
|
94
|
-
return new URL(raw.api).hostname.toLowerCase() || null;
|
|
95
|
-
}
|
|
96
|
-
catch {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function toEntry(raw) {
|
|
101
|
-
const featured = FEATURED_IDS.has(raw.id);
|
|
102
|
-
const hint = deriveHint(raw);
|
|
103
|
-
return {
|
|
104
|
-
id: raw.id,
|
|
105
|
-
label: raw.name,
|
|
106
|
-
// NOT raw.env directly — models.dev's env list can include auth methods
|
|
107
|
-
// Kortix's own transport doesn't implement (see providerAuthRequirement's
|
|
108
|
-
// doc comment, e.g. Bedrock's SigV4 pair) or aliases for the same
|
|
109
|
-
// credential (e.g. Google's 3 interchangeable key env vars). This is the
|
|
110
|
-
// PRIMARY method's fields — what the connect form actually asks for.
|
|
111
|
-
envVars: primaryAuthEnvVars(raw),
|
|
112
|
-
authRequirement: providerAuthRequirement(raw),
|
|
113
|
-
helpUrl: raw.doc ?? null,
|
|
114
|
-
apiHost: deriveApiHost(raw),
|
|
115
|
-
hint,
|
|
116
|
-
models: raw.models,
|
|
117
|
-
featured,
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Featured first (in the FEATURED_IDS order), then everything else A-Z by id.
|
|
122
|
-
* The featured order matters: we want Anthropic + OpenAI at the very top.
|
|
123
|
-
*/
|
|
124
|
-
function order(entries) {
|
|
125
|
-
const featuredOrder = Array.from(FEATURED_IDS);
|
|
126
|
-
const featuredIndex = new Map(featuredOrder.map((id, index) => [id, index]));
|
|
127
|
-
return [...entries].sort((a, b) => {
|
|
128
|
-
if (a.featured && !b.featured)
|
|
129
|
-
return -1;
|
|
130
|
-
if (!a.featured && b.featured)
|
|
131
|
-
return 1;
|
|
132
|
-
if (a.featured && b.featured) {
|
|
133
|
-
const ai = featuredIndex.get(a.id) ?? Number.MAX_SAFE_INTEGER;
|
|
134
|
-
const bi = featuredIndex.get(b.id) ?? Number.MAX_SAFE_INTEGER;
|
|
135
|
-
return ai - bi;
|
|
136
|
-
}
|
|
137
|
-
return a.label.localeCompare(b.label);
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
/** Pure: raw catalog (baked seed OR a live `/llm-catalog/providers` fetch) → the modal's provider list, sorted. */
|
|
141
|
-
export function buildLlmProviderCatalog(raw) {
|
|
142
|
-
return order(raw.providers.map(toEntry));
|
|
143
|
-
}
|
|
144
47
|
// ES module bindings are LIVE — every `import { LLM_PROVIDERS } from
|
|
145
48
|
// '@/lib/llm-providers'` call site reads whatever these are reassigned to,
|
|
146
49
|
// at read time, no re-import needed. `applyLiveLlmProviderCatalog` below
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** @internal Kortix apps only. No semver: it may change in any release. */
|
|
2
|
+
/**
|
|
3
|
+
* A link to one message of a session: `?m=<message_id>&at=<epoch ms>`.
|
|
4
|
+
*
|
|
5
|
+
* The gateway request log links each model call to the session that made it
|
|
6
|
+
* (`projectSessionMessageHref`). `m` names the message the call produced (an
|
|
7
|
+
* assistant reply) or the prompt it answered; `at` is when the call started.
|
|
8
|
+
* Rows written before calls carried a message id have only `at`, and a reply
|
|
9
|
+
* of a sub-thread the open thread does not hold falls back to `at` too.
|
|
10
|
+
*/
|
|
11
|
+
import type { SessionLogTurn } from '@kortix/sdk';
|
|
12
|
+
/** The query parameter that names the message. */
|
|
13
|
+
export declare const MESSAGE_LINK_PARAM = "m";
|
|
14
|
+
/** The query parameter that names the instant, in epoch ms. */
|
|
15
|
+
export declare const MESSAGE_LINK_AT_PARAM = "at";
|
|
16
|
+
export interface MessageLinkTarget {
|
|
17
|
+
messageId: string | null;
|
|
18
|
+
/** Epoch ms; null when absent or not a number. */
|
|
19
|
+
at: number | null;
|
|
20
|
+
}
|
|
21
|
+
/** The target a URL names, or null when it names none. */
|
|
22
|
+
export declare function readMessageLinkParams(params: Pick<URLSearchParams, 'get'> | null | undefined): MessageLinkTarget | null;
|
|
23
|
+
/** `params` without the message link, for the URL after the jump. */
|
|
24
|
+
export declare function deleteMessageLinkParams(params: URLSearchParams): void;
|
|
25
|
+
/**
|
|
26
|
+
* The key (`turn.id`, the `data-turn-id` anchor) of the turn the target names.
|
|
27
|
+
*
|
|
28
|
+
* By id first: the turn whose prompt or one of whose replies is `messageId`.
|
|
29
|
+
* Else by time: the last turn that began at or before `at`. A time before the
|
|
30
|
+
* first loaded turn names no turn: the caller loads older pages and asks again.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveMessageLinkTurn(turns: ReadonlyArray<Pick<SessionLogTurn, 'id' | 'user' | 'assistant' | 'partial'>>, target: MessageLinkTarget): string | undefined;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** The query parameter that names the message. */
|
|
2
|
+
export const MESSAGE_LINK_PARAM = 'm';
|
|
3
|
+
/** The query parameter that names the instant, in epoch ms. */
|
|
4
|
+
export const MESSAGE_LINK_AT_PARAM = 'at';
|
|
5
|
+
/** The target a URL names, or null when it names none. */
|
|
6
|
+
export function readMessageLinkParams(params) {
|
|
7
|
+
const messageId = params?.get(MESSAGE_LINK_PARAM)?.trim() || null;
|
|
8
|
+
const rawAt = params?.get(MESSAGE_LINK_AT_PARAM)?.trim();
|
|
9
|
+
const at = rawAt && /^\d+$/.test(rawAt) ? Number(rawAt) : null;
|
|
10
|
+
return messageId || at !== null ? { messageId, at } : null;
|
|
11
|
+
}
|
|
12
|
+
/** `params` without the message link, for the URL after the jump. */
|
|
13
|
+
export function deleteMessageLinkParams(params) {
|
|
14
|
+
params.delete(MESSAGE_LINK_PARAM);
|
|
15
|
+
params.delete(MESSAGE_LINK_AT_PARAM);
|
|
16
|
+
}
|
|
17
|
+
function msOf(iso) {
|
|
18
|
+
const ms = iso ? Date.parse(iso) : Number.NaN;
|
|
19
|
+
return Number.isFinite(ms) ? ms : null;
|
|
20
|
+
}
|
|
21
|
+
/** When the turn began: its prompt, else its first reply (a partial turn's prompt is not loaded). */
|
|
22
|
+
function turnStartedAt(turn) {
|
|
23
|
+
return (turn.partial ? null : msOf(turn.user.created_at)) ?? msOf(turn.assistant[0]?.created_at);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The key (`turn.id`, the `data-turn-id` anchor) of the turn the target names.
|
|
27
|
+
*
|
|
28
|
+
* By id first: the turn whose prompt or one of whose replies is `messageId`.
|
|
29
|
+
* Else by time: the last turn that began at or before `at`. A time before the
|
|
30
|
+
* first loaded turn names no turn: the caller loads older pages and asks again.
|
|
31
|
+
*/
|
|
32
|
+
export function resolveMessageLinkTurn(turns, target) {
|
|
33
|
+
if (target.messageId) {
|
|
34
|
+
const id = target.messageId;
|
|
35
|
+
const byId = turns.find((turn) => turn.id === id || turn.user.message_id === id || turn.assistant.some((reply) => reply.message_id === id));
|
|
36
|
+
if (byId)
|
|
37
|
+
return byId.id;
|
|
38
|
+
}
|
|
39
|
+
if (target.at === null)
|
|
40
|
+
return undefined;
|
|
41
|
+
let found;
|
|
42
|
+
for (const turn of turns) {
|
|
43
|
+
const started = turnStartedAt(turn);
|
|
44
|
+
if (started === null)
|
|
45
|
+
continue;
|
|
46
|
+
if (started > target.at)
|
|
47
|
+
break;
|
|
48
|
+
found = turn.id;
|
|
49
|
+
}
|
|
50
|
+
return found;
|
|
51
|
+
}
|