@kortix/ui 0.14.11 → 0.14.13
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 +521 -7045
- package/dist/_vendor/shared/app-config.d.ts +8 -0
- package/dist/_vendor/shared/artifact-annotations.d.ts +708 -0
- package/dist/_vendor/shared/artifact-comments.d.ts +327 -0
- package/dist/_vendor/shared/index.d.ts +3 -1
- package/dist/_vendor/shared/my-kortix-agent.d.ts +40 -0
- package/dist/_vendor/shared/peer-message-prompt.d.ts +35 -0
- package/dist/_vendor/shared/pixel-mark.d.ts +11 -0
- package/dist/_vendor/shared/prompt-attachments.d.ts +1 -0
- package/dist/_vendor/shared/reminder-prompt.d.ts +8 -2
- package/dist/_vendor/shared/runtime-versions.d.ts +8 -0
- package/dist/artifacts/artifact-frame.d.ts +1 -0
- package/dist/artifacts/artifact-frame.js +18 -5
- package/dist/artifacts/frame-policy.d.ts +1 -1
- package/dist/artifacts/frame-policy.js +10 -5
- package/dist/browser/browser-panel.d.ts +2 -1
- package/dist/browser/browser-panel.js +12 -2
- package/dist/customize/agents/agent-access-text.d.ts +16 -0
- package/dist/customize/agents/agent-access-text.js +54 -0
- package/dist/customize/agents/agent-approval-rules.d.ts +8 -0
- package/dist/customize/agents/agent-approval-rules.js +26 -0
- package/dist/customize/agents/agent-authority-card.js +4 -1
- package/dist/customize/agents/agent-cover-card.d.ts +4 -1
- package/dist/customize/agents/agent-cover-card.js +2 -2
- package/dist/customize/agents/agent-detail-aside.d.ts +1 -2
- package/dist/customize/agents/agent-detail-aside.js +8 -11
- package/dist/customize/agents/agent-drives-section.d.ts +23 -7
- package/dist/customize/agents/agent-drives-section.js +107 -41
- package/dist/customize/agents/agent-instructions.d.ts +11 -0
- package/dist/customize/agents/agent-instructions.js +114 -0
- package/dist/customize/agents/agent-model-view.d.ts +17 -0
- package/dist/customize/agents/agent-model-view.js +67 -0
- package/dist/customize/agents/agent-overview.d.ts +53 -0
- package/dist/customize/agents/agent-overview.js +242 -0
- package/dist/customize/agents/agent-page-chrome.d.ts +128 -0
- package/dist/customize/agents/agent-page-chrome.js +145 -0
- package/dist/customize/agents/agent-page.d.ts +13 -1
- package/dist/customize/agents/agent-page.js +478 -367
- package/dist/customize/agents/agent-pin-button.d.ts +10 -0
- package/dist/customize/agents/agent-pin-button.js +20 -0
- package/dist/customize/agents/agent-policy-sets-section.d.ts +16 -0
- package/dist/customize/agents/agent-policy-sets-section.js +80 -0
- package/dist/customize/agents/agent-policy-sets.js +1 -1
- package/dist/customize/agents/agent-section-rail.d.ts +21 -0
- package/dist/customize/agents/agent-section-rail.js +23 -0
- package/dist/customize/agents/agent-share-control.d.ts +4 -3
- package/dist/customize/agents/agent-share-control.js +15 -16
- package/dist/customize/agents/{agent-people-section.d.ts → agent-share-dialog.d.ts} +3 -1
- package/dist/customize/agents/{agent-people-section.js → agent-share-dialog.js} +21 -21
- package/dist/customize/agents/agent-tabs.d.ts +95 -0
- package/dist/customize/agents/agent-tabs.js +199 -0
- package/dist/customize/agents/agents-page.d.ts +0 -21
- package/dist/customize/agents/agents-page.js +104 -118
- package/dist/customize/agents/connectors-required.d.ts +16 -0
- package/dist/customize/agents/connectors-required.js +19 -0
- package/dist/customize/agents/create-agent-modal.d.ts +19 -0
- package/dist/customize/agents/create-agent-modal.js +94 -0
- package/dist/customize/connectors/agent-access.d.ts +4 -4
- package/dist/customize/connectors/agent-access.js +7 -10
- package/dist/customize/connectors/connector-identity.d.ts +12 -0
- package/dist/customize/connectors/connector-identity.js +15 -2
- package/dist/customize/connectors/connector-routes.js +2 -2
- package/dist/customize/connectors/connectors-page.d.ts +14 -1
- package/dist/customize/connectors/connectors-page.js +101 -32
- package/dist/customize/connectors/detail/app-page.js +1 -1
- package/dist/customize/connectors/detail/connector-agents.js +0 -3
- package/dist/customize/connectors/detail/connector-page.d.ts +1 -1
- package/dist/customize/connectors/detail/connector-page.js +5 -2
- package/dist/customize/connectors/detail/connector-policy-sets.js +1 -1
- package/dist/customize/connectors/detail/connector-triggers.js +2 -2
- package/dist/customize/connectors/use-agent-access.d.ts +7 -5
- package/dist/customize/connectors/use-agent-access.js +2 -6
- package/dist/customize/models/models-page.d.ts +7 -1
- package/dist/customize/models/models-page.js +2 -2
- package/dist/customize/project-settings/project-admin-sections.d.ts +63 -0
- package/dist/customize/project-settings/project-admin-sections.js +80 -0
- package/dist/customize/project-settings/project-settings-page.d.ts +1 -1
- package/dist/customize/project-settings/project-settings-page.js +4 -13
- package/dist/customize/project-settings/project-settings-sections.d.ts +5 -5
- package/dist/customize/project-settings/project-settings-sections.js +6 -20
- package/dist/customize/providers/provider-accordion.js +29 -17
- package/dist/customize/providers/provider-connect.js +1 -1
- package/dist/customize/providers/provider-sheet.d.ts +4 -1
- package/dist/customize/providers/provider-sheet.js +15 -5
- package/dist/customize/secrets/secrets-page.d.ts +5 -1
- package/dist/customize/secrets/secrets-page.js +2 -2
- package/dist/customize/sections/gateway-view.d.ts +10 -2
- package/dist/customize/sections/gateway-view.js +16 -4
- package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.d.ts +12 -5
- package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +131 -8
- package/dist/customize/sections/llm-provider/claude-code-step.d.ts +10 -0
- package/dist/customize/sections/llm-provider/claude-code-step.js +32 -0
- package/dist/customize/sections/llm-provider/models-tab.js +5 -1
- package/dist/customize/sections/view/account-secret-resources-panel.d.ts +5 -3
- package/dist/customize/sections/view/account-secret-resources-panel.js +122 -19
- package/dist/customize/sections/view/agent-editor-access-fields.d.ts +1 -1
- package/dist/customize/sections/view/agent-editor-access-fields.js +8 -4
- package/dist/customize/sections/view/agent-editor-basics-fields.d.ts +4 -1
- package/dist/customize/sections/view/agent-editor-basics-fields.js +33 -4
- package/dist/customize/sections/view/agent-editor-catalog.d.ts +2 -2
- package/dist/customize/sections/view/agent-editor-catalog.js +10 -12
- package/dist/customize/sections/view/agent-editor-primitives.d.ts +1 -1
- package/dist/customize/sections/view/agent-editor-primitives.js +4 -4
- package/dist/customize/sections/view/agent-editor.d.ts +37 -26
- package/dist/customize/sections/view/agent-editor.js +19 -19
- package/dist/customize/sections/view/grant-mode-field.d.ts +8 -20
- package/dist/customize/sections/view/grant-mode-field.js +31 -57
- package/dist/customize/sections/view/permission-editor.d.ts +3 -1
- package/dist/customize/sections/view/permission-editor.js +19 -10
- package/dist/customize/sections/view/review-view.d.ts +8 -0
- package/dist/customize/sections/view/review-view.js +12 -1
- package/dist/customize/sections/view/secret-delivery.js +1 -4
- package/dist/customize/sections/view/secrets-view.d.ts +7 -1
- package/dist/customize/sections/view/secrets-view.js +42 -6
- package/dist/customize/settings/rail.js +2 -8
- package/dist/customize/settings/settings-tabs.d.ts +2 -2
- package/dist/customize/settings/settings-tabs.js +17 -19
- package/dist/customize/settings/tabs/experimental-tab.d.ts +3 -0
- package/dist/customize/settings/tabs/experimental-tab.js +6 -1
- package/dist/customize/settings/tabs/sandbox-tab.d.ts +4 -6
- package/dist/customize/settings/tabs/sandbox-tab.js +9 -9
- package/dist/customize/shared/access-list.d.ts +39 -0
- package/dist/customize/shared/access-list.js +62 -0
- package/dist/customize/shared/agent-resource-scope.d.ts +87 -0
- package/dist/customize/shared/agent-resource-scope.js +123 -0
- package/dist/customize/shared/capability-library.d.ts +41 -0
- package/dist/customize/shared/capability-library.js +271 -0
- package/dist/customize/shared/capability-page-shell.d.ts +18 -1
- package/dist/customize/shared/capability-page-shell.js +21 -1
- package/dist/customize/shared/catalog/catalog-space-tabs.d.ts +14 -0
- package/dist/customize/shared/catalog/catalog-space-tabs.js +20 -0
- package/dist/customize/shared/customize-tab-bar.d.ts +13 -0
- package/dist/customize/shared/customize-tab-bar.js +95 -0
- package/dist/customize/shared/entity/entity-modal.d.ts +17 -1
- package/dist/customize/shared/entity/entity-modal.js +10 -9
- package/dist/customize/shared/leave-guard.d.ts +23 -0
- package/dist/customize/shared/leave-guard.js +87 -0
- package/dist/customize/shared/standalone-settings-nav.js +4 -1
- package/dist/customize/shared/tool-rules.d.ts +11 -0
- package/dist/customize/shared/tool-rules.js +29 -0
- package/dist/customize/skills/builtin-skill-modal.d.ts +6 -0
- package/dist/customize/skills/builtin-skill-modal.js +41 -0
- package/dist/customize/skills/skills-page.d.ts +21 -18
- package/dist/customize/skills/skills-page.js +16 -110
- package/dist/customize/triggers/runtime-triggers.d.ts +17 -0
- package/dist/customize/triggers/runtime-triggers.js +57 -0
- package/dist/customize/triggers/schedule/event-trigger-copy.js +2 -2
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule/schedule-copy.d.ts +11 -6
- package/dist/customize/triggers/schedule/schedule-copy.js +29 -8
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +7 -3
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +26 -1
- package/dist/customize/triggers/schedule/trigger-composer-logic.js +64 -3
- package/dist/customize/triggers/schedule/trigger-composer.js +57 -20
- package/dist/customize/triggers/schedule/trigger-edit-logic.js +18 -5
- package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -0
- package/dist/customize/triggers/schedule/trigger-filter.js +16 -0
- 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/use-trigger-mutations.d.ts +1 -1
- package/dist/customize/triggers/schedule/use-trigger-mutations.js +1 -1
- package/dist/customize/triggers/schedule/when-app.d.ts +15 -0
- package/dist/customize/triggers/schedule/when-app.js +21 -0
- package/dist/customize/triggers/schedule/when-change-request.d.ts +10 -0
- package/dist/customize/triggers/schedule/when-change-request.js +15 -0
- package/dist/customize/triggers/schedule-view.d.ts +17 -3
- package/dist/customize/triggers/schedule-view.js +46 -16
- package/dist/customize/triggers/triggers-page.d.ts +3 -3
- package/dist/customize/triggers/triggers-page.js +2 -2
- package/dist/customize/use-configure-thread.d.ts +8 -2
- package/dist/customize/use-configure-thread.js +30 -18
- package/dist/files/project/components/change-request-detail-dialog.js +2 -3
- package/dist/files/project/components/drive-explorer.js +6 -5
- package/dist/files/project/explorer-source.d.ts +3 -0
- package/dist/files/project/upload-batch.d.ts +3 -3
- package/dist/files/project/upload-batch.js +7 -6
- package/dist/files/runtime/sandbox-explorer-source.js +3 -3
- package/dist/i18n/en.d.ts +1331 -53
- package/dist/i18n/en.js +1423 -145
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +16 -7
- package/dist/internal/auth/auth-primitives.d.ts +1 -3
- package/dist/internal/auth/auth-primitives.js +2 -2
- package/dist/internal/billing/session-cost-format.d.ts +1 -0
- package/dist/internal/billing/session-cost-format.js +11 -0
- package/dist/internal/components/agent-mark.d.ts +12 -1
- package/dist/internal/components/agent-mark.js +34 -11
- package/dist/internal/components/nav-rail.d.ts +22 -0
- package/dist/internal/components/nav-rail.js +16 -0
- package/dist/internal/components/repository-disconnected.js +2 -2
- package/dist/internal/goals/goal-meta.d.ts +15 -1
- package/dist/internal/goals/goal-meta.js +42 -2
- package/dist/internal/hooks/projects/use-agent-config.d.ts +11 -7
- package/dist/internal/hooks/projects/use-agent-config.js +28 -11
- package/dist/internal/hooks/use-slash-focus.d.ts +7 -1
- package/dist/internal/hooks/use-slash-focus.js +9 -3
- package/dist/internal/layout/project-capability-nav.d.ts +24 -0
- package/dist/internal/layout/project-capability-nav.js +86 -0
- package/dist/internal/layout/project-page-header.d.ts +1 -1
- package/dist/internal/layout/project-page-header.js +1 -1
- package/dist/internal/layout/project-settings-nav.d.ts +3 -2
- package/dist/internal/layout/project-settings-nav.js +5 -3
- package/dist/internal/lib/browser-noise/rules/extensions.js +3 -0
- package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
- package/dist/internal/lib/capability-tab-routes.d.ts +34 -3
- package/dist/internal/lib/capability-tab-routes.js +76 -8
- package/dist/internal/lib/manifest-health.d.ts +10 -0
- package/dist/internal/lib/manifest-health.js +20 -0
- package/dist/internal/lib/pixel-mark.d.ts +4 -1
- package/dist/internal/lib/pixel-mark.js +33 -6
- package/dist/internal/lib/project-actions.d.ts +1 -1
- package/dist/internal/lib/project-actions.js +0 -4
- package/dist/internal/lib/provider-branding.js +2 -0
- package/dist/internal/lib/space-scope.d.ts +29 -0
- package/dist/internal/lib/space-scope.js +28 -0
- package/dist/internal/lib/use-project-feature-flags.js +3 -3
- package/dist/internal/lib/web-notifications.d.ts +74 -8
- package/dist/internal/lib/web-notifications.js +243 -117
- package/dist/internal/notifications/notification-rows.d.ts +14 -7
- package/dist/internal/notifications/notification-rows.js +21 -14
- package/dist/internal/notifications/session-toast-cards.d.ts +2 -2
- package/dist/internal/reminders/reminder-format.d.ts +6 -2
- package/dist/internal/reminders/reminder-format.js +7 -1
- package/dist/internal/stores/active-space-store.d.ts +35 -0
- package/dist/internal/stores/active-space-store.js +29 -0
- package/dist/internal/stores/kortix-computer-store.d.ts +2 -1
- package/dist/internal/stores/kortix-computer-store.js +18 -7
- package/dist/internal/stores/pinned-agents-store.d.ts +26 -0
- package/dist/internal/stores/pinned-agents-store.js +20 -0
- package/dist/internal/stores/session-panel-memory-store.js +3 -0
- package/dist/internal/stores/turn-attention-store.d.ts +5 -4
- package/dist/lib/routes.d.ts +16 -1
- package/dist/lib/routes.js +15 -3
- package/dist/markdown/doc-editor/doc-embed.d.ts +31 -0
- package/dist/markdown/doc-editor/doc-embed.js +168 -0
- package/dist/markdown/doc-editor/doc-extensions.d.ts +26 -0
- package/dist/markdown/doc-editor/doc-extensions.js +149 -0
- package/dist/markdown/doc-editor/doc-menus.d.ts +9 -0
- package/dist/markdown/doc-editor/doc-menus.js +56 -0
- package/dist/markdown/doc-editor/markdown.d.ts +12 -0
- package/dist/markdown/doc-editor/markdown.js +140 -0
- package/dist/markdown/genui/components/inline.d.ts +1 -1
- package/dist/primitives/badge.d.ts +1 -1
- package/dist/primitives/button.d.ts +1 -1
- package/dist/primitives/pixel-kortix-mark.d.ts +5 -4
- package/dist/primitives/pixel-kortix-mark.js +5 -15
- package/dist/primitives/tag.d.ts +1 -1
- package/dist/primitives/textarea.js +14 -0
- package/dist/primitives/toast.d.ts +2 -0
- package/dist/primitives/toast.js +4 -2
- package/dist/providers/ui-provider.d.ts +16 -0
- package/dist/session/actions/session-label.d.ts +1 -1
- package/dist/session/actions/session-label.js +3 -3
- package/dist/session/agents/agent-model.d.ts +92 -0
- package/dist/session/agents/agent-model.js +123 -0
- package/dist/session/agents/agent-state-mark.d.ts +10 -0
- package/dist/session/agents/agent-state-mark.js +22 -0
- package/dist/session/agents/agent-strip.d.ts +58 -0
- package/dist/session/agents/agent-strip.js +259 -0
- package/dist/session/agents/held-messages.d.ts +33 -0
- package/dist/session/agents/held-messages.js +50 -0
- package/dist/session/agents/legacy-subagent-chat.d.ts +11 -0
- package/dist/session/agents/legacy-subagent-chat.js +19 -0
- package/dist/session/agents/session-peek.d.ts +20 -0
- package/dist/session/agents/session-peek.js +67 -0
- package/dist/session/agents/session-prompt.d.ts +13 -0
- package/dist/session/agents/session-prompt.js +18 -0
- package/dist/session/agents/steer-session.d.ts +13 -0
- package/dist/session/agents/steer-session.js +29 -0
- package/dist/session/agents/subagent-dialog-content.d.ts +11 -0
- package/dist/session/agents/subagent-dialog-content.js +115 -0
- package/dist/session/agents/subagent-view.d.ts +8 -0
- package/dist/session/agents/subagent-view.js +18 -0
- package/dist/session/agents/tasks-panel.d.ts +13 -0
- package/dist/session/agents/tasks-panel.js +41 -0
- package/dist/session/agents/workflow-run-controls.d.ts +43 -0
- package/dist/session/agents/workflow-run-controls.js +141 -0
- package/dist/session/composer/ComposerCard.d.ts +1 -1
- package/dist/session/composer/ComposerCard.js +3 -3
- package/dist/session/composer/agent-selector.js +13 -19
- package/dist/session/composer/composer-underbar.d.ts +3 -1
- package/dist/session/composer/composer-underbar.js +2 -2
- package/dist/session/composer/composer.d.ts +5 -0
- package/dist/session/composer/composer.js +16 -10
- package/dist/session/composer/editor/composer-editor.js +19 -8
- package/dist/session/composer/editor/ultracode.d.ts +34 -0
- package/dist/session/composer/editor/ultracode.js +127 -0
- package/dist/session/composer/index.d.ts +1 -0
- package/dist/session/composer/index.js +1 -0
- package/dist/session/composer/send-blockers.d.ts +1 -11
- package/dist/session/composer/send-blockers.js +1 -11
- package/dist/session/composer/session-composer-readiness.d.ts +1 -28
- package/dist/session/composer/session-composer-readiness.js +5 -16
- package/dist/session/header/reminder-parts.d.ts +1 -1
- package/dist/session/header/session-site-header.js +6 -3
- package/dist/session/header/subagent-hover-card.d.ts +0 -2
- package/dist/session/header/subagent-hover-card.js +1 -4
- package/dist/session/models/claude-connection-slot.d.ts +11 -0
- package/dist/session/models/claude-connection-slot.js +30 -0
- package/dist/session/models/model-availability.d.ts +3 -1
- package/dist/session/models/model-availability.js +3 -0
- package/dist/session/models/model-selector.js +11 -12
- package/dist/session/models/model-tags.d.ts +9 -0
- package/dist/session/models/model-tags.js +8 -0
- package/dist/session/panel/easy/detail-view.js +7 -0
- package/dist/session/panel/easy/easy-panel.js +1 -1
- package/dist/session/panel/easy/step-icon.js +5 -1
- package/dist/session/panel/mobile-tool-drawer.js +7 -3
- package/dist/session/panel/open-session-quick-view.js +1 -1
- package/dist/session/panel/session-action-panel-column.js +1 -1
- package/dist/session/panel/session-desktop.js +41 -14
- package/dist/session/panel/session-panel-provider.d.ts +1 -1
- package/dist/session/panel/session-panel-provider.js +7 -11
- package/dist/session/prompts/question-prompt.js +3 -1
- package/dist/session/status/session-error-banner.js +4 -1
- package/dist/session/thread/session-chat.js +286 -296
- package/dist/session/thread/session-context-modal.js +29 -10
- package/dist/session/thread/session-context-spawned-sessions.d.ts +13 -0
- package/dist/session/thread/session-context-spawned-sessions.js +44 -0
- package/dist/session/thread/session-context-sub-sessions.js +3 -8
- package/dist/session/thread/transcript.d.ts +3 -0
- package/dist/session/thread/transcript.js +32 -8
- package/dist/session/tool/shared/full-view-action.d.ts +29 -0
- package/dist/session/tool/shared/full-view-action.js +43 -0
- package/dist/session/tool/tool-part-renderer.js +10 -2
- package/dist/session/tool/tools/agent-message-tool.js +2 -2
- package/dist/session/tool/tools/agent-spawn-tool.js +2 -2
- package/dist/session/tool/tools/agent-status-tool.js +2 -2
- package/dist/session/tool/tools/kortix-action-tool.d.ts +2 -0
- package/dist/session/tool/tools/kortix-action-tool.js +148 -0
- package/dist/session/tool/tools/kortix-tool-card.d.ts +83 -0
- package/dist/session/tool/tools/kortix-tool-card.js +186 -0
- package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +11 -0
- package/dist/session/tool/tools/multi-agent-tool-bodies.js +141 -0
- package/dist/session/tool/tools/multi-agent-tool-data.d.ts +63 -0
- package/dist/session/tool/tools/multi-agent-tool-data.js +118 -0
- package/dist/session/tool/tools/multi-agent-tools.d.ts +9 -0
- package/dist/session/tool/tools/multi-agent-tools.js +38 -0
- package/dist/session/tool/tools/question-tool.js +1 -1
- package/dist/session/tool/tools/register.d.ts +3 -0
- package/dist/session/tool/tools/register.js +3 -0
- package/dist/session/tool/tools/session-spawn-tool.js +2 -2
- package/dist/session/tool/tools/task-tool.d.ts +1 -1
- package/dist/session/tool/tools/task-tool.js +29 -41
- package/dist/session/tool/tools/workflow-progress.d.ts +34 -0
- package/dist/session/tool/tools/workflow-progress.js +186 -0
- package/dist/session/tool/tools/workflow-run.d.ts +128 -0
- package/dist/session/tool/tools/workflow-run.js +251 -0
- package/dist/session/tool/tools/workflow-tool.d.ts +9 -0
- package/dist/session/tool/tools/workflow-tool.js +253 -0
- package/dist/session/turn/notice-batch-group.d.ts +12 -0
- package/dist/session/turn/notice-batch-group.js +17 -0
- package/dist/session/turn/peer-message-row.d.ts +14 -0
- package/dist/session/turn/peer-message-row.js +57 -0
- package/dist/session/turn/subagent-notice-row.d.ts +4 -0
- package/dist/session/turn/subagent-notice-row.js +50 -0
- package/dist/session/turn/subagent-notice.d.ts +58 -0
- package/dist/session/turn/subagent-notice.js +111 -0
- package/dist/session/turn/user-message.d.ts +5 -4
- package/dist/session/turn/user-message.js +31 -10
- package/dist/styles/tokens.css +2 -0
- package/dist/styles.css +1 -1
- package/dist/terminal/session-terminal-connect-bar.js +1 -1
- package/dist/workspace/admin/project-admin-dashboard.d.ts +53 -0
- package/dist/workspace/admin/project-admin-dashboard.js +252 -0
- package/dist/workspace/admin/project-admin-nav.d.ts +20 -0
- package/dist/workspace/admin/project-admin-nav.js +41 -0
- package/dist/workspace/home/welcome-body.js +25 -3
- package/dist/workspace/index.d.ts +6 -2
- package/dist/workspace/index.js +12 -2
- package/dist/workspace/layout/new-session-create.js +3 -3
- package/dist/workspace/layout/project-home.js +3 -3
- package/dist/workspace/memory/memory-labels.js +5 -0
- package/dist/workspace/repository-disconnected.js +2 -2
- package/dist/workspace/sessions/board-dispatch.d.ts +52 -0
- package/dist/workspace/sessions/board-dispatch.js +110 -0
- package/dist/workspace/sessions/board-grouping.d.ts +63 -0
- package/dist/workspace/sessions/board-grouping.js +141 -0
- package/dist/workspace/sessions/board-peek.d.ts +15 -0
- package/dist/workspace/sessions/board-peek.js +54 -0
- package/dist/workspace/sessions/board-state-mark.d.ts +15 -0
- package/dist/workspace/sessions/board-state-mark.js +24 -0
- package/dist/workspace/sessions/project-sessions-view.js +42 -31
- package/dist/workspace/sessions/sessions-board.d.ts +12 -0
- package/dist/workspace/sessions/sessions-board.js +214 -0
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +46 -0
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +85 -0
- package/dist/workspace/sidebar/footer/sidebar-alert.js +1 -1
- package/dist/workspace/sidebar/new-agent-modal-provider.d.ts +12 -0
- package/dist/workspace/sidebar/new-agent-modal-provider.js +19 -0
- package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
- package/dist/workspace/sidebar/project-nav-items.js +53 -5
- package/dist/workspace/sidebar/project-session-list.js +35 -12
- package/dist/workspace/sidebar/project-sidebar.js +6 -3
- package/dist/workspace/sidebar/session-filter-menu.js +2 -1
- package/dist/workspace/space/space-blocks.d.ts +25 -0
- package/dist/workspace/space/space-blocks.js +124 -0
- package/dist/workspace/space/space-filter-tabs.d.ts +17 -0
- package/dist/workspace/space/space-filter-tabs.js +31 -0
- package/dist/workspace/space/space-page.d.ts +24 -0
- package/dist/workspace/space/space-page.js +157 -0
- package/dist/workspace/space/space-room.d.ts +20 -0
- package/dist/workspace/space/space-room.js +27 -0
- package/dist/workspace/space/space-tab-menu.d.ts +14 -0
- package/dist/workspace/space/space-tab-menu.js +127 -0
- package/dist/workspace/space/space-tab-panels.d.ts +9 -0
- package/dist/workspace/space/space-tab-panels.js +203 -0
- package/dist/workspace/space/space-templates.d.ts +34 -0
- package/dist/workspace/space/space-templates.js +71 -0
- package/dist/workspace/space/use-space-filter.d.ts +10 -0
- package/dist/workspace/space/use-space-filter.js +40 -0
- package/dist/workspace/space/use-space-manifest.d.ts +8 -0
- package/dist/workspace/space/use-space-manifest.js +27 -0
- package/dist/workspace/spaces/space-timeline.js +2 -2
- package/package.json +56 -53
- package/skills/kortix-ui/SKILL.md +1 -1
- package/skills/kortix-ui/references/custom-dashboard.md +10 -4
- package/skills/kortix-ui/references/modules.md +11 -9
- package/dist/_vendor/shared/meta-agent.d.ts +0 -7
- package/dist/customize/agents/agent-grant-pages.d.ts +0 -37
- package/dist/customize/agents/agent-grant-pages.js +0 -226
- package/dist/customize/agents/agent-triggers-section.d.ts +0 -17
- package/dist/customize/agents/agent-triggers-section.js +0 -109
- package/dist/customize/migrate-to-v2/index.d.ts +0 -5
- package/dist/customize/migrate-to-v2/index.js +0 -5
- package/dist/customize/migrate-to-v2/migration-prompt.d.ts +0 -16
- package/dist/customize/migrate-to-v2/migration-prompt.js +0 -59
- package/dist/customize/migrate-to-v2/upgrade-defs.d.ts +0 -30
- package/dist/customize/migrate-to-v2/upgrade-defs.js +0 -43
- package/dist/customize/migrate-to-v2/upgrade-view.d.ts +0 -32
- package/dist/customize/migrate-to-v2/upgrade-view.js +0 -152
- package/dist/customize/migrate-to-v2/use-run-upgrade.d.ts +0 -18
- package/dist/customize/migrate-to-v2/use-run-upgrade.js +0 -16
- package/dist/customize/shared/capability-tabs.d.ts +0 -3
- package/dist/customize/shared/capability-tabs.js +0 -137
- package/dist/customize/skills/skill-scope.d.ts +0 -14
- package/dist/customize/skills/skill-scope.js +0 -18
- package/dist/internal/lib/manifest-version.d.ts +0 -21
- package/dist/internal/lib/manifest-version.js +0 -55
- package/dist/session/composer/hooks/use-composer-escape-stop.d.ts +0 -6
- package/dist/session/composer/hooks/use-composer-escape-stop.js +0 -28
- package/dist/session/thread/sub-session-modal-content.d.ts +0 -8
- package/dist/session/thread/sub-session-modal-content.js +0 -23
- package/dist/session/thread/sub-session-modal.d.ts +0 -2
- package/dist/session/thread/sub-session-modal.js +0 -14
- package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.d.ts +0 -13
- package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.js +0 -48
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { UsersThreeIcon } from '@phosphor-icons/react';
|
|
4
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
5
|
+
import { PeerMessageRow } from './peer-message-row.js';
|
|
6
|
+
import { SubagentNoticeRow } from './subagent-notice-row.js';
|
|
7
|
+
/**
|
|
8
|
+
* Several notices the API coalesced into one delivered prompt
|
|
9
|
+
* (`session-notice-batch.ts`): background subagents that ended, teammates that
|
|
10
|
+
* went idle, sessions that answered a `notify_when_idle`. One header line ("3
|
|
11
|
+
* agents finished") and one compact row each, with no user bubble around them:
|
|
12
|
+
* nobody typed this turn.
|
|
13
|
+
*/
|
|
14
|
+
export function NoticeBatchGroup({ items, actions }) {
|
|
15
|
+
const t = useTranslations('multiAgent.notice');
|
|
16
|
+
return (_jsxs("div", { "data-testid": "notice-batch", "data-notice-count": items.length, className: "flex min-w-0 flex-col gap-1", children: [_jsxs("div", { className: "text-muted-foreground flex min-w-0 items-center gap-1.5 text-xs", children: [_jsx(UsersThreeIcon, { "aria-hidden": true, className: "size-3.5 shrink-0" }), _jsx("span", { children: t('batchTitle', { count: items.length }) })] }), _jsx("ul", { className: "border-border ml-1.5 flex min-w-0 flex-col gap-1 border-l pl-3", children: items.map((item, index) => (_jsx("li", { children: item.kind === 'peer_idle' ? _jsx(PeerMessageRow, { info: item.info }) : _jsx(SubagentNoticeRow, { notice: item.notice }) }, item.kind === 'peer_idle' ? `peer-${item.info.messageId}` : `${item.notice.sessionId}-${index}`))) }), actions] }));
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PeerMessageKind, PeerMessagePromptInfo } from '../../_vendor/shared/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The preview after the sender: the summary, else the first line of the text. CSS cuts it with `…`.
|
|
4
|
+
* An idle notice (`firePeerIdleNotices` in the API) previews its "Its last answer:" line; its
|
|
5
|
+
* first line ("reviewer finished its turn and is idle.") repeats the headline, so it shows only
|
|
6
|
+
* when it says something else (an error).
|
|
7
|
+
*/
|
|
8
|
+
export declare function peerMessagePreview(info: Pick<PeerMessagePromptInfo, 'summary' | 'text'> & {
|
|
9
|
+
kind?: PeerMessageKind;
|
|
10
|
+
}): string;
|
|
11
|
+
export declare function PeerMessageRow({ info, actions }: {
|
|
12
|
+
info: PeerMessagePromptInfo;
|
|
13
|
+
actions?: React.ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { peerHandleLabel } from '../../_vendor/kortix-shared.js';
|
|
4
|
+
import { ArrowBendDownLeftIcon, CaretRightIcon, ChatTeardropTextIcon, CheckCircleIcon, PowerIcon, } from '@phosphor-icons/react';
|
|
5
|
+
import { useId, useState } from 'react';
|
|
6
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
7
|
+
import { cn } from '../../lib/utils.js';
|
|
8
|
+
/**
|
|
9
|
+
* A message another Kortix session sent this one (`send_message`), as Claude
|
|
10
|
+
* Code draws it: one dim line, "Message from @reviewer · Schema migration
|
|
11
|
+
* finished", that opens in place to the full text. The header and the footer
|
|
12
|
+
* the API wrapped around it (`peerMessagePromptText`) are for the agent, not
|
|
13
|
+
* the reader, so neither renders. An idle notice, a shutdown request and a
|
|
14
|
+
* shutdown answer get their own words.
|
|
15
|
+
*/
|
|
16
|
+
const KIND_ICON = {
|
|
17
|
+
message: ChatTeardropTextIcon,
|
|
18
|
+
idle_notice: CheckCircleIcon,
|
|
19
|
+
shutdown_request: PowerIcon,
|
|
20
|
+
shutdown_response: ArrowBendDownLeftIcon,
|
|
21
|
+
};
|
|
22
|
+
const KIND_KEY = new Map([
|
|
23
|
+
['message', 'message'],
|
|
24
|
+
['idle_notice', 'idleNotice'],
|
|
25
|
+
['shutdown_request', 'shutdownRequest'],
|
|
26
|
+
['shutdown_response', 'shutdownResponse'],
|
|
27
|
+
]);
|
|
28
|
+
/**
|
|
29
|
+
* The preview after the sender: the summary, else the first line of the text. CSS cuts it with `…`.
|
|
30
|
+
* An idle notice (`firePeerIdleNotices` in the API) previews its "Its last answer:" line; its
|
|
31
|
+
* first line ("reviewer finished its turn and is idle.") repeats the headline, so it shows only
|
|
32
|
+
* when it says something else (an error).
|
|
33
|
+
*/
|
|
34
|
+
export function peerMessagePreview(info) {
|
|
35
|
+
if (info.summary?.trim())
|
|
36
|
+
return info.summary.trim();
|
|
37
|
+
const lines = info.text.split('\n').map((line) => line.trim()).filter(Boolean);
|
|
38
|
+
if (info.kind === 'idle_notice') {
|
|
39
|
+
const answer = lines.find((line) => line.startsWith('Its last answer:'));
|
|
40
|
+
if (answer)
|
|
41
|
+
return answer.slice('Its last answer:'.length).trim();
|
|
42
|
+
return lines[0] && !/finished its turn and is idle\.?$/.test(lines[0]) ? lines[0] : '';
|
|
43
|
+
}
|
|
44
|
+
return lines[0] ?? '';
|
|
45
|
+
}
|
|
46
|
+
export function PeerMessageRow({ info, actions }) {
|
|
47
|
+
const t = useTranslations('multiAgent.peer');
|
|
48
|
+
const [open, setOpen] = useState(false);
|
|
49
|
+
const bodyId = useId();
|
|
50
|
+
const KindIcon = KIND_ICON[info.kind];
|
|
51
|
+
const preview = peerMessagePreview(info);
|
|
52
|
+
const headline = t(KIND_KEY.get(info.kind) ?? 'message', { from: peerHandleLabel(info.from) });
|
|
53
|
+
// Nothing more to read than the line says: the row is not a disclosure.
|
|
54
|
+
const expandable = info.text.trim().length > 0 && info.text.trim() !== preview;
|
|
55
|
+
const line = (_jsxs(_Fragment, { children: [_jsx(KindIcon, { "aria-hidden": true, className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0", children: headline }), preview && (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, className: "shrink-0", children: "\u00B7" }), _jsx("span", { className: "min-w-0 truncate", title: preview, children: preview })] }))] }));
|
|
56
|
+
return (_jsxs("div", { "data-testid": "peer-message-turn", "data-peer-kind": info.kind, "data-peer-message-id": info.messageId, className: "flex min-w-0 flex-col gap-1", children: [expandable ? (_jsxs("button", { type: "button", "aria-expanded": open, "aria-controls": bodyId, onClick: () => setOpen((value) => !value), className: "text-muted-foreground hover:text-foreground duration-fast flex w-full min-w-0 items-center gap-1.5 text-left text-xs transition-colors", children: [line, _jsx(CaretRightIcon, { "aria-hidden": true, className: cn('size-3 shrink-0', open && 'rotate-90') }), _jsx("span", { className: "sr-only", children: open ? t('collapse') : t('expand') })] })) : (_jsx("div", { className: "text-muted-foreground flex w-full min-w-0 items-center gap-1.5 text-xs", children: line })), expandable && open && (_jsx("div", { id: bodyId, className: "text-muted-foreground border-border ml-1.5 border-l pl-3 text-sm whitespace-pre-wrap wrap-break-word", children: info.text })), actions] }));
|
|
57
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useProjectSession } from '@kortix/sdk/react';
|
|
4
|
+
import { CheckIcon, StopCircleIcon, WarningIcon } from '@phosphor-icons/react';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
7
|
+
import { UnifiedMarkdown } from '../../markdown/unified-markdown.js';
|
|
8
|
+
import { useSessionIds } from '../../providers/session-ids.js';
|
|
9
|
+
import { SubagentDialog } from '../agents/subagent-view.js';
|
|
10
|
+
import { FullViewAction } from '../tool/shared/full-view-action.js';
|
|
11
|
+
import { BasicTool } from '../tool/shared/infrastructure.js';
|
|
12
|
+
import { ToolResultCard } from '../tool/shared/result-card.js';
|
|
13
|
+
/**
|
|
14
|
+
* A background subagent (or a background workflow run) this session started
|
|
15
|
+
* has ended, or a teammate of its agent team went idle, and the API delivered
|
|
16
|
+
* its notice as a prompt. It is not something the person typed, and its report
|
|
17
|
+
* is often long, so it draws as one tool row, the same row as the "Agent ·
|
|
18
|
+
* general" card that started it: "✓ post writer finished · <first line of the
|
|
19
|
+
* result> View". The row opens in place to the whole result; "View" opens the
|
|
20
|
+
* child's own session.
|
|
21
|
+
*
|
|
22
|
+
* The state is a glyph, as on every tool row, never an emoji: emoji status
|
|
23
|
+
* labels are the agent's own words (brand D31, D32), and the reply right under
|
|
24
|
+
* this row often starts with one.
|
|
25
|
+
*/
|
|
26
|
+
// `data-tone` keeps the hue: the tool row header paints any other leading glyph muted.
|
|
27
|
+
const MARK = {
|
|
28
|
+
completed: _jsx(CheckIcon, { "data-notice-mark": "completed", "data-tone": "success", "aria-hidden": true, weight: "bold", className: "text-kortix-green size-3.5 shrink-0" }),
|
|
29
|
+
failed: _jsx(WarningIcon, { "data-notice-mark": "failed", "data-tone": "destructive", "aria-hidden": true, weight: "fill", className: "text-kortix-red size-3.5 shrink-0" }),
|
|
30
|
+
stopped: _jsx(StopCircleIcon, { "data-notice-mark": "stopped", "aria-hidden": true, className: "size-3.5 shrink-0" }),
|
|
31
|
+
};
|
|
32
|
+
/** A first line that only says the work is done repeats "finished". */
|
|
33
|
+
const FILLER_EXCERPT = /^(done|finished|completed?|all done|ok(ay)?)[.!]*$/i;
|
|
34
|
+
export function SubagentNoticeRow({ notice }) {
|
|
35
|
+
const t = useTranslations('multiAgent.notice');
|
|
36
|
+
const ids = useSessionIds();
|
|
37
|
+
const [viewing, setViewing] = useState(false);
|
|
38
|
+
// The name its parent gave it (`agent({ name })`) reads best: "writer finished".
|
|
39
|
+
const child = useProjectSession(ids.projectId, notice.sessionId, { enabled: !!ids.projectId });
|
|
40
|
+
const name = child.data?.agent_handle || notice.handle || notice.title || notice.agent || t('fallbackName');
|
|
41
|
+
const excerpt = notice.excerpt && !FILLER_EXCERPT.test(notice.excerpt.trim()) ? notice.excerpt : undefined;
|
|
42
|
+
const expandable = notice.result.trim().length > 0 && notice.result.trim() !== notice.excerpt;
|
|
43
|
+
const openSession = () => setViewing(true);
|
|
44
|
+
return (_jsxs("div", { "data-testid": "subagent-notice", "data-notice-status": notice.status, "data-child-session": notice.sessionId, className: "flex min-w-0 flex-col", children: [_jsx(BasicTool, { icon: MARK[notice.status], trigger: { title: t(notice.status, { name }), subtitle: excerpt }, triggerAction: _jsx(FullViewAction, { onOpen: openSession }),
|
|
45
|
+
// Nothing to unfold: the row is a plain way into the child's session.
|
|
46
|
+
onClick: expandable ? undefined : openSession, children: expandable ? (
|
|
47
|
+
// The report is the child's output, framed like every tool result, so
|
|
48
|
+
// it never reads as a second reply from this session's agent.
|
|
49
|
+
_jsx(ToolResultCard, { bodyClassName: "max-h-96 overflow-y-auto px-3 py-2 text-sm", children: _jsx(UnifiedMarkdown, { content: notice.result, trust: "agent", isStreaming: false }) })) : undefined }), notice.ownedTasks && (_jsx("p", { className: "text-muted-foreground ml-6 min-w-0 truncate text-xs", title: notice.ownedTasks, children: t('ownsTasks', { tasks: notice.ownedTasks }) })), _jsx(SubagentDialog, { open: viewing, onOpenChange: setViewing, sessionId: notice.sessionId, title: name })] }));
|
|
50
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type PeerMessagePromptInfo } from '../../_vendor/shared/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The notices the API delivers into a session as a prompt, written by
|
|
4
|
+
* `subagentNoticeText` in `apps/api/src/projects/subagent-notice.ts`:
|
|
5
|
+
*
|
|
6
|
+
* A background subagent you started has finished. This message is from the platform, not from the user.
|
|
7
|
+
* (or) Your teammate <handle> finished its turn and is idle. This message is from the platform, not from the user.
|
|
8
|
+
* task_id: <child session id>
|
|
9
|
+
* status: completed | error | failed | stopped
|
|
10
|
+
*
|
|
11
|
+
* <kortix_system type="session-report" source="subagent"><session-report>…</session-report></kortix_system>
|
|
12
|
+
*
|
|
13
|
+
* Tasks <handle> still owns: #3 subject (in progress); … . (a teammate only)
|
|
14
|
+
* …
|
|
15
|
+
*
|
|
16
|
+
* `apps/api/src/projects/session-notice-batch.ts` coalesces the notices that
|
|
17
|
+
* arrive together into one prompt, joined by a blank line (at most 20): these,
|
|
18
|
+
* and the idle notice a `send_message({ notify_when_idle })` asked for
|
|
19
|
+
* (`peerMessagePromptText` kind `idle_notice`).
|
|
20
|
+
*/
|
|
21
|
+
export interface SubagentNotice {
|
|
22
|
+
/** `teammate`: a teammate of an agent team went idle; `subagent`: a background subagent ended. */
|
|
23
|
+
kind: 'subagent' | 'teammate';
|
|
24
|
+
sessionId: string;
|
|
25
|
+
status: 'completed' | 'failed' | 'stopped';
|
|
26
|
+
/** A teammate's handle, from its lead line; null for a subagent. */
|
|
27
|
+
handle: string | null;
|
|
28
|
+
/** The project agent the child ran as, or null. */
|
|
29
|
+
agent: string | null;
|
|
30
|
+
/** The child's title, without the "(@agent subagent)" suffix, or null. */
|
|
31
|
+
title: string | null;
|
|
32
|
+
/** The child's final report (Markdown), or its error. */
|
|
33
|
+
result: string;
|
|
34
|
+
/** The first line of `result` that holds words. */
|
|
35
|
+
excerpt: string;
|
|
36
|
+
/** A teammate's unfinished tasks ("#3 Write the fix (in progress); #4 …"), or null when it owns none. */
|
|
37
|
+
ownedTasks: string | null;
|
|
38
|
+
}
|
|
39
|
+
/** One notice of a delivered notice prompt. */
|
|
40
|
+
export type NoticeBatchItem = {
|
|
41
|
+
kind: 'subagent' | 'teammate';
|
|
42
|
+
notice: SubagentNotice;
|
|
43
|
+
} | {
|
|
44
|
+
kind: 'peer_idle';
|
|
45
|
+
info: PeerMessagePromptInfo;
|
|
46
|
+
};
|
|
47
|
+
/** The first line with words, without Markdown heading, list and emphasis marks. */
|
|
48
|
+
export declare function firstLine(text: string): string;
|
|
49
|
+
/** The background subagent or teammate notice a text carries (one notice, not a batch), or null. */
|
|
50
|
+
export declare function parseSubagentNotice(text: string | null | undefined): SubagentNotice | null;
|
|
51
|
+
/**
|
|
52
|
+
* The notices a delivered prompt carries, in order, or null when the prompt is
|
|
53
|
+
* anything else. A notice starts at the start of the prompt or right after the
|
|
54
|
+
* blank line that joins two notices, so a notice line quoted inside a report
|
|
55
|
+
* never splits one. Every piece must parse: one that does not makes the whole
|
|
56
|
+
* prompt "not a batch", and it renders as the turn it is.
|
|
57
|
+
*/
|
|
58
|
+
export declare function parseNoticeBatch(text: string | null | undefined): NoticeBatchItem[] | null;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { parsePeerMessagePrompt, tagBlocks } from '../../_vendor/kortix-shared.js';
|
|
2
|
+
import { extractSessionReport } from '../../internal/lib/utils/kortix-system-tags.js';
|
|
3
|
+
const SUBAGENT_LEAD = 'A background subagent you started has finished.';
|
|
4
|
+
const TEAMMATE_LEAD = /^Your teammate (\S+) finished its turn and is idle\./;
|
|
5
|
+
const PEER_IDLE_HEAD = '[idle notice from ';
|
|
6
|
+
const STATUSES = new Set(['completed', 'failed', 'stopped']);
|
|
7
|
+
/** `session-notice-batch.ts` `NOTICE_BATCH_MAX`; a longer prompt is not a batch it wrote. */
|
|
8
|
+
const MAX_NOTICES = 20;
|
|
9
|
+
function block(text, tag) {
|
|
10
|
+
const found = tagBlocks(text, tag, { limit: 1 })[0];
|
|
11
|
+
return found ? found.body.trim() : null;
|
|
12
|
+
}
|
|
13
|
+
/** The first line with words, without Markdown heading, list and emphasis marks. */
|
|
14
|
+
export function firstLine(text) {
|
|
15
|
+
for (const raw of text.split('\n')) {
|
|
16
|
+
const line = raw
|
|
17
|
+
.replace(/^\s*(?:#{1,6}\s+|[-*+]\s+|>\s*|\d+\.\s+)/, '')
|
|
18
|
+
.replace(/[*_`]+/g, '')
|
|
19
|
+
.trim();
|
|
20
|
+
if (line)
|
|
21
|
+
return line;
|
|
22
|
+
}
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
/** The background subagent or teammate notice a text carries (one notice, not a batch), or null. */
|
|
26
|
+
export function parseSubagentNotice(text) {
|
|
27
|
+
if (!text)
|
|
28
|
+
return null;
|
|
29
|
+
const body = text.trimStart();
|
|
30
|
+
const teammate = TEAMMATE_LEAD.exec(body);
|
|
31
|
+
if (!teammate && !body.startsWith(SUBAGENT_LEAD))
|
|
32
|
+
return null;
|
|
33
|
+
const report = extractSessionReport(body);
|
|
34
|
+
const head = body.slice(0, 600);
|
|
35
|
+
const sessionId = /^task_id:\s*(\S+)/m.exec(head)?.[1] ?? report?.sessionId ?? '';
|
|
36
|
+
if (!sessionId)
|
|
37
|
+
return null;
|
|
38
|
+
const stated = /^status:\s*(\w+)/m.exec(head)?.[1];
|
|
39
|
+
// The API writes `error` for a turn that ended on an error; it reads as a failure.
|
|
40
|
+
const normalized = stated === 'error' ? 'failed' : stated;
|
|
41
|
+
const status = normalized && STATUSES.has(normalized)
|
|
42
|
+
? normalized
|
|
43
|
+
: report?.status === 'FAILED'
|
|
44
|
+
? 'failed'
|
|
45
|
+
: 'completed';
|
|
46
|
+
const resultXml = report?.result ?? '';
|
|
47
|
+
const answer = block(resultXml, 'task_result');
|
|
48
|
+
const error = block(resultXml, 'task_error');
|
|
49
|
+
const result = (status === 'completed' ? answer : (error ?? answer)) ?? resultXml;
|
|
50
|
+
const title = report?.prompt?.replace(/\s*\(@[^)]*\bsubagent\)\s*$/i, '').trim() || null;
|
|
51
|
+
const handle = teammate?.[1] ?? null;
|
|
52
|
+
const owned = handle ? /^Tasks \S+ still owns: (.+?)\.?$/m.exec(body)?.[1]?.trim() : undefined;
|
|
53
|
+
return {
|
|
54
|
+
kind: teammate ? 'teammate' : 'subagent',
|
|
55
|
+
sessionId,
|
|
56
|
+
status,
|
|
57
|
+
handle,
|
|
58
|
+
agent: report?.project?.trim() || null,
|
|
59
|
+
title,
|
|
60
|
+
result,
|
|
61
|
+
excerpt: firstLine(result),
|
|
62
|
+
ownedTasks: owned || null,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/** True when a notice of any kind starts at `index` of `text`. */
|
|
66
|
+
function startsNotice(text, index) {
|
|
67
|
+
return (text.startsWith(SUBAGENT_LEAD, index) ||
|
|
68
|
+
text.startsWith(PEER_IDLE_HEAD, index) ||
|
|
69
|
+
(text.startsWith('Your teammate ', index) && TEAMMATE_LEAD.test(text.slice(index, index + 300))));
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The notices a delivered prompt carries, in order, or null when the prompt is
|
|
73
|
+
* anything else. A notice starts at the start of the prompt or right after the
|
|
74
|
+
* blank line that joins two notices, so a notice line quoted inside a report
|
|
75
|
+
* never splits one. Every piece must parse: one that does not makes the whole
|
|
76
|
+
* prompt "not a batch", and it renders as the turn it is.
|
|
77
|
+
*/
|
|
78
|
+
export function parseNoticeBatch(text) {
|
|
79
|
+
if (!text)
|
|
80
|
+
return null;
|
|
81
|
+
const body = text.trim();
|
|
82
|
+
if (!startsNotice(body, 0))
|
|
83
|
+
return null;
|
|
84
|
+
const starts = [0];
|
|
85
|
+
for (let at = body.indexOf('\n\n'); at !== -1; at = body.indexOf('\n\n', at + 2)) {
|
|
86
|
+
// Several blank lines in a row: the notice starts at the first non-newline.
|
|
87
|
+
let index = at + 2;
|
|
88
|
+
while (body[index] === '\n')
|
|
89
|
+
index += 1;
|
|
90
|
+
if (index > starts[starts.length - 1] && startsNotice(body, index))
|
|
91
|
+
starts.push(index);
|
|
92
|
+
if (starts.length > MAX_NOTICES)
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
const items = [];
|
|
96
|
+
for (const [i, start] of starts.entries()) {
|
|
97
|
+
const piece = body.slice(start, starts[i + 1] ?? body.length).trim();
|
|
98
|
+
if (piece.startsWith(PEER_IDLE_HEAD)) {
|
|
99
|
+
const info = parsePeerMessagePrompt(piece);
|
|
100
|
+
if (!info || info.kind !== 'idle_notice')
|
|
101
|
+
return null;
|
|
102
|
+
items.push({ kind: 'peer_idle', info });
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
const notice = parseSubagentNotice(piece);
|
|
106
|
+
if (!notice)
|
|
107
|
+
return null;
|
|
108
|
+
items.push({ kind: notice.kind, notice });
|
|
109
|
+
}
|
|
110
|
+
return items;
|
|
111
|
+
}
|
|
@@ -18,10 +18,11 @@ export declare const BUBBLE_TEXT: string;
|
|
|
18
18
|
export declare const BUBBLE_SURFACE: string;
|
|
19
19
|
/**
|
|
20
20
|
* Where a channel message came from, in the pill's hover card: the platform,
|
|
21
|
-
* the channel or chat it was posted in
|
|
22
|
-
* written before channel names were recorded
|
|
23
|
-
* project's Slack bindings name it, read only
|
|
24
|
-
*
|
|
21
|
+
* the channel or chat it was posted in (an email's subject, labelled Subject),
|
|
22
|
+
* and who posted it. A Slack prompt written before channel names were recorded
|
|
23
|
+
* carries a bare id (`C0DEV`); the project's Slack bindings name it, read only
|
|
24
|
+
* while this card is open. A Teams conversation id names nothing a person
|
|
25
|
+
* reads, so Teams shows no channel row.
|
|
25
26
|
*/
|
|
26
27
|
export declare function ChannelOrigin({ info, platform }: {
|
|
27
28
|
info: ChannelMessageInfo;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import { attachmentMime } from '../../internal/lib/attachment-mime.js';
|
|
4
4
|
import { AttachmentPreview } from './attachment-preview.js';
|
|
5
5
|
import { getFileCategory } from '../../files/viewer/preview-policy.js';
|
|
6
|
-
import {
|
|
6
|
+
import { remindersHref } from '../../internal/lib/capability-tab-routes.js';
|
|
7
7
|
import { MessageSenderAbove } from '../participants/session-participants.js';
|
|
8
8
|
import { MessageAuthorLabel } from './message-author-label.js';
|
|
9
9
|
import { MESSAGE_TEXT_CLASS, RowToolbar } from './message-row.js';
|
|
@@ -38,6 +38,10 @@ import { uploadedFileRefXml } from '../composer/uploaded-file-refs.js';
|
|
|
38
38
|
import { buildMentionSegments, } from '../thread/mention-segments.js';
|
|
39
39
|
import { parseChannelMessage, slackConversationName } from './channel-message.js';
|
|
40
40
|
import { SourceCard, SourcePill } from './source-pill.js';
|
|
41
|
+
import { PeerMessageRow } from './peer-message-row.js';
|
|
42
|
+
import { NoticeBatchGroup } from './notice-batch-group.js';
|
|
43
|
+
import { parseNoticeBatch } from './subagent-notice.js';
|
|
44
|
+
import { parsePeerMessagePrompt } from '../../_vendor/kortix-shared.js';
|
|
41
45
|
import { useChannelBindings } from '../../internal/hooks/use-channel-bindings.js';
|
|
42
46
|
import { useSessionIds } from '../../providers/session-ids.js';
|
|
43
47
|
import { CHANNEL_BRAND_COLOR, ChannelBrandMark, channelPlatformLabel } from './channel-brand.js';
|
|
@@ -78,10 +82,11 @@ export const BUBBLE_TEXT = cn('text-[0.9rem] leading-[22px] font-medium', 'wrap-
|
|
|
78
82
|
export const BUBBLE_SURFACE = cn('bg-muted text-foreground flex max-w-full flex-col px-3.5 py-2.5 select-none rounded-lg');
|
|
79
83
|
/**
|
|
80
84
|
* Where a channel message came from, in the pill's hover card: the platform,
|
|
81
|
-
* the channel or chat it was posted in
|
|
82
|
-
* written before channel names were recorded
|
|
83
|
-
* project's Slack bindings name it, read only
|
|
84
|
-
*
|
|
85
|
+
* the channel or chat it was posted in (an email's subject, labelled Subject),
|
|
86
|
+
* and who posted it. A Slack prompt written before channel names were recorded
|
|
87
|
+
* carries a bare id (`C0DEV`); the project's Slack bindings name it, read only
|
|
88
|
+
* while this card is open. A Teams conversation id names nothing a person
|
|
89
|
+
* reads, so Teams shows no channel row.
|
|
85
90
|
*/
|
|
86
91
|
export function ChannelOrigin({ info, platform }) {
|
|
87
92
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
@@ -92,8 +97,9 @@ export function ChannelOrigin({ info, platform }) {
|
|
|
92
97
|
? data?.bindings.find((b) => b.platform === 'slack' && b.channelId === info.context)
|
|
93
98
|
: undefined;
|
|
94
99
|
const channel = info.platform === 'Teams' ? '' : (binding && slackConversationName(binding)) || info.context;
|
|
100
|
+
const place = info.platform === 'Email' ? tI18nComplete('text68971283841a') : tI18nComplete('textce4683e7013a');
|
|
95
101
|
return (_jsx(SourceCard, { mark: _jsx(ChannelBrandMark, { platform: info.platform, className: "size-3.5 shrink-0" }), title: platform, rows: [
|
|
96
|
-
{ label:
|
|
102
|
+
{ label: place, value: channel },
|
|
97
103
|
{ label: tI18nComplete('text218197693424'), value: info.userName },
|
|
98
104
|
] }));
|
|
99
105
|
}
|
|
@@ -119,14 +125,15 @@ function PlatformPromptMessage({ pill, text, actions, ...data }) {
|
|
|
119
125
|
return (_jsxs("div", { className: "flex flex-col items-end gap-1.5", ...data, children: [pill, text && (_jsx("div", { className: cn(BUBBLE_SURFACE, 'max-w-[80%]'), children: _jsx("div", { className: BUBBLE_TEXT, children: text }) })), actions] }));
|
|
120
126
|
}
|
|
121
127
|
/**
|
|
122
|
-
* A
|
|
123
|
-
* whether it repeats; its card carries the id and a link to the
|
|
124
|
-
*
|
|
128
|
+
* A loop fire (`[REMINDER reminder.<id> …]`, the wire name). The pill says
|
|
129
|
+
* Loop and whether it repeats; its card carries the id and a link to the
|
|
130
|
+
* project's Loops page, filtered to this session.
|
|
125
131
|
*/
|
|
126
132
|
function ReminderMessage({ info, actions }) {
|
|
127
133
|
const t = useTranslations('reminders');
|
|
128
134
|
const ids = useSessionIds();
|
|
129
|
-
const
|
|
135
|
+
const loopsHref = ids.projectId ? remindersHref(ids.projectId) : null;
|
|
136
|
+
const manageHref = loopsHref && ids.sessionId ? `${loopsHref}?session=${ids.sessionId}` : null;
|
|
130
137
|
return (_jsx(PlatformPromptMessage, { "data-testid": "reminder-turn", "data-reminder-id": info.id, text: info.prompt, actions: actions, pill: _jsx(SourcePill, { mark: _jsx(AlarmIcon, { className: "size-3 shrink-0", "aria-hidden": true }), source: t('cardLabel'), sender: info.recurring ? t('cardRecurring') : t('cardOneTime'), card: _jsx(SourceCard, { mark: _jsx(AlarmIcon, { className: "size-3.5 shrink-0", "aria-hidden": true }), title: t('cardLabel'), footer: _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-muted-foreground truncate font-mono", children: info.id }), manageHref && (_jsx(HoverPrefetchLink, { href: manageHref, className: "text-foreground shrink-0 font-medium underline-offset-2 hover:underline", children: t('cardManage') }))] }) }) }) }));
|
|
131
138
|
}
|
|
132
139
|
/**
|
|
@@ -914,6 +921,14 @@ export function UserMessage({ message, author, showAuthor, agentNames, commandIn
|
|
|
914
921
|
const roomInfo = useMemo(() => parseRoomPrompt(rawText), [rawText]);
|
|
915
922
|
// A batched digest of room traffic: `[room <name> · #a–#b · N new messages]`.
|
|
916
923
|
const roomDigestInfo = useMemo(() => parseRoomDigest(rawText), [rawText]);
|
|
924
|
+
// A message from another Kortix session (`send_message`): `[message from reviewer · session 3f2a1b9c · #m_1]`.
|
|
925
|
+
const peerInfo = useMemo(() => parsePeerMessagePrompt(rawText), [rawText]);
|
|
926
|
+
// Several notices in one prompt (`session-notice-batch.ts`), whatever the first one is: a peer
|
|
927
|
+
// idle notice first must not read as one peer message with the rest of the batch inside it.
|
|
928
|
+
const noticeBatch = useMemo(() => {
|
|
929
|
+
const batch = parseNoticeBatch(rawText);
|
|
930
|
+
return batch && batch.length > 1 ? batch : null;
|
|
931
|
+
}, [rawText]);
|
|
917
932
|
// `messageCreatedAt`'s rule on the record's ISO time: a missing or non-positive time is no time.
|
|
918
933
|
const createdAt = Date.parse(message.created_at);
|
|
919
934
|
// Built once and rendered by every branch below — channel card, trigger card,
|
|
@@ -1072,6 +1087,12 @@ export function UserMessage({ message, author, showAuthor, agentNames, commandIn
|
|
|
1072
1087
|
if (reminderInfo) {
|
|
1073
1088
|
return _jsx(ReminderMessage, { info: reminderInfo, actions: actions });
|
|
1074
1089
|
}
|
|
1090
|
+
if (noticeBatch) {
|
|
1091
|
+
return _jsx(NoticeBatchGroup, { items: noticeBatch, actions: actions });
|
|
1092
|
+
}
|
|
1093
|
+
if (peerInfo) {
|
|
1094
|
+
return _jsx(PeerMessageRow, { info: peerInfo, actions: actions });
|
|
1095
|
+
}
|
|
1075
1096
|
if (roomInfo) {
|
|
1076
1097
|
return _jsx(RoomMessage, { info: roomInfo, actions: actions });
|
|
1077
1098
|
}
|
package/dist/styles/tokens.css
CHANGED
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
--terminal-surface: #0f0f0f;
|
|
56
56
|
--terminal-fg: #e5e5e5;
|
|
57
57
|
--terminal-border: rgb(255 255 255 / 0.1);
|
|
58
|
+
--terminal-accent: #0f7f80;
|
|
58
59
|
--radius: 0.625rem;
|
|
59
60
|
--tracking-normal: 0em;
|
|
60
61
|
--spacing: 0.23rem;
|
|
@@ -139,6 +140,7 @@
|
|
|
139
140
|
--sidebar-border: oklch(0.2178 0 0); /* hairline / hairline-soft #1a1a1a */
|
|
140
141
|
--sidebar-ring: var(--ring);
|
|
141
142
|
--kortix-base: var(--color-ring); /* #0099ff */
|
|
143
|
+
--terminal-accent: #2ec4c4;
|
|
142
144
|
--liquid-glass-bg: color-mix(in oklch, var(--secondary) 38%, transparent);
|
|
143
145
|
--liquid-glass-bg-hover: color-mix(in oklch, var(--secondary) 52%, transparent);
|
|
144
146
|
--liquid-glass-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.1);
|