@kortix/ui 0.14.12 → 0.14.14
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/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 +1330 -53
- package/dist/i18n/en.js +1422 -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/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.js +13 -4
- 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/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/easy-panel.js +1 -1
- package/dist/session/panel/easy/step-icon.js +5 -1
- package/dist/session/panel/mobile-tool-drawer.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.js +24 -5
- 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 +10 -8
- 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,50 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Button } from '../../primitives/button.js';
|
|
4
|
+
import { SessionDotMatrix } from '../../primitives/dot-matrix/session-dot-matrix.js';
|
|
5
|
+
import { errorToast } from '../../primitives/toast.js';
|
|
6
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
7
|
+
import { ChatCircleDotsIcon } from '@phosphor-icons/react';
|
|
8
|
+
import { peerHandleLabel } from '../../_vendor/kortix-shared.js';
|
|
9
|
+
import { usePeerMessages } from '@kortix/sdk/react';
|
|
10
|
+
/**
|
|
11
|
+
* Messages from other sessions that wait for the person (`inbound: hold`, or a
|
|
12
|
+
* session the person asked to approve first). Claude Code opens an approval
|
|
13
|
+
* dialog with the sender and a preview; Kortix shows one card per message above
|
|
14
|
+
* the agent strip. "Approve message" delivers it, "Deny" drops it. A message
|
|
15
|
+
* nobody decides expires after 5 minutes on the server.
|
|
16
|
+
*/
|
|
17
|
+
/** The preview line: the sender's summary, else the message's first line. */
|
|
18
|
+
export function heldPreview(message) {
|
|
19
|
+
const summary = message.summary?.trim();
|
|
20
|
+
if (summary)
|
|
21
|
+
return summary;
|
|
22
|
+
const first = message.message.trim().split('\n')[0] ?? '';
|
|
23
|
+
return first.length > 200 ? `${first.slice(0, 200)}…` : first;
|
|
24
|
+
}
|
|
25
|
+
export function HeldMessageCard({ message, pending, onApprove, onDeny }) {
|
|
26
|
+
const t = useTranslations('multiAgent.held');
|
|
27
|
+
const kind = message.type === 'shutdown_request' ? 'titleShutdown' : 'title';
|
|
28
|
+
return (_jsxs("div", { "data-held-message": message.id, className: "bg-popover flex items-start gap-2.5 rounded-md border px-3 py-2.5 text-xs", children: [_jsx(ChatCircleDotsIcon, { "aria-hidden": true, className: "text-muted-foreground mt-0.5 size-4 shrink-0" }), _jsxs("div", { className: "min-w-0 flex-1 space-y-0.5", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: t(kind, { from: peerHandleLabel(message.from_handle) }) }), _jsx("p", { className: "text-foreground line-clamp-2 wrap-break-word", children: heldPreview(message) }), _jsx("p", { className: "text-muted-foreground", children: t('waiting') })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [_jsxs(Button, { type: "button", size: "xs", variant: "outline-ghost", disabled: pending !== null, onClick: onDeny, children: [pending === 'deny' ? _jsx(SessionDotMatrix, { size: 14, className: "shrink-0" }) : null, t('deny')] }), _jsxs(Button, { type: "button", size: "xs", disabled: pending !== null, onClick: onApprove, children: [pending === 'approve' ? _jsx(SessionDotMatrix, { size: 14, className: "shrink-0" }) : null, t('approve')] })] })] }));
|
|
29
|
+
}
|
|
30
|
+
/** The held messages of `usePeerMessages(…, 'in')`, one card each; nothing when none waits. */
|
|
31
|
+
export function HeldMessageList({ messages, approve, deny, }) {
|
|
32
|
+
const t = useTranslations('multiAgent.held');
|
|
33
|
+
const held = heldMessages(messages);
|
|
34
|
+
if (held.length === 0)
|
|
35
|
+
return null;
|
|
36
|
+
const pendingFor = (id) => approve.isPending && approve.variables === id ? 'approve' : deny.isPending && deny.variables === id ? 'deny' : null;
|
|
37
|
+
const fail = (key) => (error) => errorToast(t(key), { description: error instanceof Error ? error.message : undefined });
|
|
38
|
+
return (_jsx("div", { "aria-label": t('label'), role: "group", className: "space-y-1.5", children: held.map((message) => (_jsx(HeldMessageCard, { message: message, pending: pendingFor(message.id), onApprove: () => approve.mutate(message.id, { onError: fail('approveFailed') }), onDeny: () => deny.mutate(message.id, { onError: fail('denyFailed') }) }, message.id))) }));
|
|
39
|
+
}
|
|
40
|
+
/** The messages that wait for the person, oldest first (the order they arrived). */
|
|
41
|
+
export function heldMessages(messages) {
|
|
42
|
+
return (messages ?? [])
|
|
43
|
+
.filter((message) => message.status === 'held')
|
|
44
|
+
.sort((a, b) => Date.parse(a.created_at) - Date.parse(b.created_at));
|
|
45
|
+
}
|
|
46
|
+
/** A session's held messages, read on their own (for a host without the agent strip). */
|
|
47
|
+
export function HeldMessages({ projectId, sessionId }) {
|
|
48
|
+
const { data, approve, deny } = usePeerMessages(projectId, sessionId, 'in');
|
|
49
|
+
return _jsx(HeldMessageList, { messages: data, approve: approve, deny: deny });
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The body of a sub-agent that is not a Kortix session of its own: an
|
|
3
|
+
* in-process child (`session: "same"`) or an old OpenCode subagent, whose
|
|
4
|
+
* transcript lives in its lead's computer and saved history. It mounts the
|
|
5
|
+
* read-only `SessionChat` of that child under the lead's saved-history scope,
|
|
6
|
+
* so it paints while the computer is off. Every child that is its own project
|
|
7
|
+
* session reads `SessionPeek` instead (`subagent-dialog-content.tsx`).
|
|
8
|
+
*/
|
|
9
|
+
export declare function LegacySubagentChat({ sessionId }: {
|
|
10
|
+
sessionId: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { SessionChat } from '../thread/session-chat.js';
|
|
4
|
+
import { useSessionIds } from '../../providers/session-ids.js';
|
|
5
|
+
/**
|
|
6
|
+
* The body of a sub-agent that is not a Kortix session of its own: an
|
|
7
|
+
* in-process child (`session: "same"`) or an old OpenCode subagent, whose
|
|
8
|
+
* transcript lives in its lead's computer and saved history. It mounts the
|
|
9
|
+
* read-only `SessionChat` of that child under the lead's saved-history scope,
|
|
10
|
+
* so it paints while the computer is off. Every child that is its own project
|
|
11
|
+
* session reads `SessionPeek` instead (`subagent-dialog-content.tsx`).
|
|
12
|
+
*/
|
|
13
|
+
export function LegacySubagentChat({ sessionId }) {
|
|
14
|
+
// The session page this sub-agent runs under. Its saved history holds the
|
|
15
|
+
// sub-agent's transcript too.
|
|
16
|
+
const ids = useSessionIds();
|
|
17
|
+
const savedHistoryScope = ids.projectId && ids.sessionId ? `${ids.projectId}/${ids.sessionId}` : undefined;
|
|
18
|
+
return _jsx(SessionChat, { sessionId: sessionId, hideHeader: true, readOnly: true, initialScrollTop: true, savedHistoryScope: savedHistoryScope });
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import '../tool/tools/register.js';
|
|
2
|
+
/**
|
|
3
|
+
* The transcript of another session, read-only, from the API alone
|
|
4
|
+
* (`useSessionView`): its log and its stream. It never starts the session and
|
|
5
|
+
* never points the app's runtime at the session's box, so it can sit beside
|
|
6
|
+
* the session page that owns the runtime: a sub-agent's dialog over its lead's
|
|
7
|
+
* chat, the board's preview. Never blank: a skeleton while the log loads, an
|
|
8
|
+
* error with "Try again", "Nothing yet" for a session with no message.
|
|
9
|
+
*/
|
|
10
|
+
export declare function SessionPeek({ projectId, sessionId, working, onActivity, density, className, }: {
|
|
11
|
+
projectId: string;
|
|
12
|
+
sessionId: string;
|
|
13
|
+
/** The session works now: its last turn shows the agent's busy row. */
|
|
14
|
+
working?: boolean;
|
|
15
|
+
/** Called when a message arrives or changes count: the host re-reads the session's state. */
|
|
16
|
+
onActivity?: () => void;
|
|
17
|
+
/** `compact`: the narrow gutters of a side sheet, as `SessionThread`'s density. */
|
|
18
|
+
density?: 'default' | 'compact';
|
|
19
|
+
className?: string;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { sessionLogTurns } from '@kortix/sdk';
|
|
4
|
+
import { useSessionView } from '@kortix/sdk/react';
|
|
5
|
+
import { ChatsCircleIcon } from '@phosphor-icons/react';
|
|
6
|
+
import { useEffect, useLayoutEffect, useMemo, useRef } from 'react';
|
|
7
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
8
|
+
import { ProjectScope } from '../../internal/project-scope.js';
|
|
9
|
+
import { cn } from '../../lib/utils.js';
|
|
10
|
+
import { Button } from '../../primitives/button.js';
|
|
11
|
+
import { EmptyState } from '../../primitives/empty-state.js';
|
|
12
|
+
import { ErrorState } from '../../primitives/error-state.js';
|
|
13
|
+
import Loading from '../../primitives/loading.js';
|
|
14
|
+
import { Skeleton } from '../../primitives/skeleton.js';
|
|
15
|
+
import { SessionTurn } from '../thread/transcript.js';
|
|
16
|
+
import { SESSION_TRANSCRIPT_CLASS } from '../thread/session-transcript-class.js';
|
|
17
|
+
import '../tool/tools/register.js';
|
|
18
|
+
/** The live thread is read at most once per this window while a turn streams. */
|
|
19
|
+
const PEEK_THROTTLE_MS = 100;
|
|
20
|
+
const NO_REQUESTS = [];
|
|
21
|
+
const noop = () => { };
|
|
22
|
+
const noopAsync = async () => { };
|
|
23
|
+
/** A view rewinds nothing: every turn's history control stays off. */
|
|
24
|
+
const TURN_OUTCOME = {};
|
|
25
|
+
/**
|
|
26
|
+
* The transcript of another session, read-only, from the API alone
|
|
27
|
+
* (`useSessionView`): its log and its stream. It never starts the session and
|
|
28
|
+
* never points the app's runtime at the session's box, so it can sit beside
|
|
29
|
+
* the session page that owns the runtime: a sub-agent's dialog over its lead's
|
|
30
|
+
* chat, the board's preview. Never blank: a skeleton while the log loads, an
|
|
31
|
+
* error with "Try again", "Nothing yet" for a session with no message.
|
|
32
|
+
*/
|
|
33
|
+
export function SessionPeek({ projectId, sessionId, working = false, onActivity, density = 'default', className, }) {
|
|
34
|
+
const t = useTranslations('multiAgent.subagent');
|
|
35
|
+
const view = useSessionView(projectId, sessionId, { throttleMs: PEEK_THROTTLE_MS });
|
|
36
|
+
const turns = useMemo(() => (view.thread ? sessionLogTurns(view.thread, { foldCompactions: true, busy: working }) : []), [view.thread, working]);
|
|
37
|
+
const scrollRef = useRef(null);
|
|
38
|
+
const pinned = useRef(true);
|
|
39
|
+
// Open at the newest message, and follow new ones while the reader sits at the bottom.
|
|
40
|
+
useLayoutEffect(() => {
|
|
41
|
+
const node = scrollRef.current;
|
|
42
|
+
if (node && pinned.current)
|
|
43
|
+
node.scrollTop = node.scrollHeight;
|
|
44
|
+
}, [turns]);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
pinned.current = true;
|
|
47
|
+
}, [sessionId]);
|
|
48
|
+
const count = view.thread?.messages.length ?? 0;
|
|
49
|
+
const activity = useRef(onActivity);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
activity.current = onActivity;
|
|
52
|
+
});
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (count > 0)
|
|
55
|
+
activity.current?.();
|
|
56
|
+
}, [count]);
|
|
57
|
+
return (_jsx("div", { "data-testid": "session-peek", "data-status": view.status, "data-density": density, className: cn('group/thread flex min-h-0 flex-1 flex-col', className), children: view.status === 'loading' ? (_jsxs("div", { className: cn(SESSION_TRANSCRIPT_CLASS, 'space-y-4'), "aria-busy": "true", children: [_jsx(Skeleton, { className: "ml-auto h-9 w-2/5 rounded-xl" }), _jsx(Skeleton, { className: "h-4 w-4/5" }), _jsx(Skeleton, { className: "h-4 w-3/5" }), _jsx(Skeleton, { className: "h-4 w-2/3" })] })) : view.status === 'error' ? (_jsx("div", { className: "flex flex-1 items-center justify-center p-6", children: _jsx(ErrorState, { size: "sm", title: t('loadFailed'), action: _jsx(Button, { variant: "outline", size: "sm", onClick: view.retry, children: t('retry') }) }) })) : view.status === 'empty' ? (_jsx("div", { className: "flex flex-1 items-center justify-center p-6", children: _jsx(EmptyState, { size: "sm", icon: ChatsCircleIcon, title: t('emptyTitle'), description: t('emptyDescription') }) })) : (_jsx(ProjectScope, { projectId: projectId, sessionId: sessionId, children: _jsx("div", { ref: scrollRef, onScroll: (event) => {
|
|
58
|
+
const node = event.currentTarget;
|
|
59
|
+
pinned.current = node.scrollHeight - node.scrollTop - node.clientHeight < 48;
|
|
60
|
+
}, className: "min-h-0 flex-1 overflow-y-auto", children: _jsxs("div", { className: cn(SESSION_TRANSCRIPT_CLASS, 'pb-6'), children: [view.hasOlder && (_jsx("div", { className: "mb-4 flex justify-center", children: _jsxs(Button, { variant: "ghost", size: "xs", disabled: view.isLoadingOlder, onClick: () => {
|
|
61
|
+
pinned.current = false;
|
|
62
|
+
void view.loadOlder();
|
|
63
|
+
}, className: "text-muted-foreground", children: [view.isLoadingOlder && _jsx(Loading, { className: "size-3 shrink-0" }), t('loadOlder')] }) })), _jsx("div", { className: "space-y-6", children: turns.map((turn, index) => {
|
|
64
|
+
const last = index === turns.length - 1;
|
|
65
|
+
return (_jsx(SessionTurn, { turn: turn, turnOutcome: TURN_OUTCOME, sessionId: view.thread?.thread_id ?? sessionId, sessionStatus: undefined, isLast: last, ownsPlan: false, permissions: NO_REQUESTS, questions: NO_REQUESTS, isFirstTurn: index === 0, sessionWorking: working, isWorkingTurn: last && working, suppressBusyIndicator: false, awaitingUser: false, pending: false, disableToolNavigation: true, onPermissionReply: noopAsync, onRewind: noop, rewindDisabled: true }, turn.id));
|
|
66
|
+
}) })] }) }) })) }));
|
|
67
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Send a prompt into the open session from a control that is not the composer
|
|
3
|
+
* ("Save as workflow"). The session chat provides its own send path, so the
|
|
4
|
+
* prompt goes out exactly as a typed one: a running turn is steered, an idle
|
|
5
|
+
* session starts a turn, and the composer's draft is left alone.
|
|
6
|
+
*/
|
|
7
|
+
export type SessionPromptSend = (text: string) => unknown;
|
|
8
|
+
export declare const SessionPromptContext: import("react").Context<SessionPromptSend | null>;
|
|
9
|
+
/**
|
|
10
|
+
* The session's own send, or, outside a session chat, the composer prefill: the
|
|
11
|
+
* text lands in the composer of `sessionId` for the person to send.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useSessionPromptSend(sessionId: string | undefined): SessionPromptSend | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createContext, useCallback, useContext } from 'react';
|
|
3
|
+
import { useSessionComposerPrefillStore } from '../composer/stores/session-composer-prefill-store.js';
|
|
4
|
+
export const SessionPromptContext = createContext(null);
|
|
5
|
+
/**
|
|
6
|
+
* The session's own send, or, outside a session chat, the composer prefill: the
|
|
7
|
+
* text lands in the composer of `sessionId` for the person to send.
|
|
8
|
+
*/
|
|
9
|
+
export function useSessionPromptSend(sessionId) {
|
|
10
|
+
const send = useContext(SessionPromptContext);
|
|
11
|
+
const prefill = useCallback((text) => {
|
|
12
|
+
if (sessionId)
|
|
13
|
+
useSessionComposerPrefillStore.getState().setPrefill(sessionId, text);
|
|
14
|
+
}, [sessionId]);
|
|
15
|
+
if (send)
|
|
16
|
+
return send;
|
|
17
|
+
return sessionId ? prefill : null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Send a message to another session through the API's prompt route, as a steer:
|
|
3
|
+
* a running turn reads it at its next step, an idle session starts a turn. It
|
|
4
|
+
* needs no runtime of its own, so a host can message a sub-agent or a board row
|
|
5
|
+
* from beside the session that owns the app's runtime.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useSteerSession(projectId: string | undefined, options?: {
|
|
8
|
+
onSent?: () => void;
|
|
9
|
+
onError?: (error: unknown) => void;
|
|
10
|
+
}): import("@tanstack/react-query").UseMutationResult<import("@kortix/sdk").CreateSessionPromptResult, Error, {
|
|
11
|
+
sessionId: string;
|
|
12
|
+
text: string;
|
|
13
|
+
}, unknown>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createSessionPrompt, mintWireMessageId } from '@kortix/sdk';
|
|
3
|
+
import { useMutation } from '@tanstack/react-query';
|
|
4
|
+
/**
|
|
5
|
+
* Send a message to another session through the API's prompt route, as a steer:
|
|
6
|
+
* a running turn reads it at its next step, an idle session starts a turn. It
|
|
7
|
+
* needs no runtime of its own, so a host can message a sub-agent or a board row
|
|
8
|
+
* from beside the session that owns the app's runtime.
|
|
9
|
+
*/
|
|
10
|
+
export function useSteerSession(projectId, options = {}) {
|
|
11
|
+
return useMutation({
|
|
12
|
+
mutationFn: async ({ sessionId, text }) => {
|
|
13
|
+
if (!projectId)
|
|
14
|
+
throw new Error('No project');
|
|
15
|
+
// Minted with no transcript to place it against: the server places it at delivery.
|
|
16
|
+
const messageId = mintWireMessageId();
|
|
17
|
+
return createSessionPrompt(projectId, sessionId, {
|
|
18
|
+
clientMessageId: messageId,
|
|
19
|
+
messageId,
|
|
20
|
+
remintOnDelivery: true,
|
|
21
|
+
delivery: 'steer',
|
|
22
|
+
parts: [{ type: 'text', text }],
|
|
23
|
+
clientSentAtMs: Date.now(),
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
onSuccess: () => options.onSent?.(),
|
|
27
|
+
onError: (error) => options.onError?.(error),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface SubagentDialogProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onOpenChange: (open: boolean) => void;
|
|
4
|
+
/** The child session: a Kortix project session, or an in-process child's runtime id. */
|
|
5
|
+
sessionId: string;
|
|
6
|
+
/** What the opener calls it; the session's own handle wins once its row loads. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** The project; default: the project of the session page the dialog opens over. */
|
|
9
|
+
projectId?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function SubagentDialogContent({ open, onOpenChange, sessionId, title, projectId: projectIdProp }: SubagentDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { stopProjectSession } from '@kortix/sdk';
|
|
4
|
+
import { qk, useProjectSession } from '@kortix/sdk/react';
|
|
5
|
+
import { ArrowSquareOutIcon, CheckIcon, PaperPlaneRightIcon, SquareIcon, XIcon } from '@phosphor-icons/react';
|
|
6
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
7
|
+
import { useState } from 'react';
|
|
8
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
9
|
+
import { agentDisplayName } from '../../internal/components/agent-mark.js';
|
|
10
|
+
import { uiRoutes } from '../../lib/routes.js';
|
|
11
|
+
import { cn } from '../../lib/utils.js';
|
|
12
|
+
import { Button } from '../../primitives/button.js';
|
|
13
|
+
import { ErrorState } from '../../primitives/error-state.js';
|
|
14
|
+
import { Hint } from '../../primitives/hint.js';
|
|
15
|
+
import { Input } from '../../primitives/input.js';
|
|
16
|
+
import Loading from '../../primitives/loading.js';
|
|
17
|
+
import { Modal, ModalContent, ModalDescription, ModalTitle } from '../../primitives/modal.js';
|
|
18
|
+
import { Skeleton } from '../../primitives/skeleton.js';
|
|
19
|
+
import { StatusDot } from '../../primitives/status.js';
|
|
20
|
+
import { errorToast, successToast } from '../../primitives/toast.js';
|
|
21
|
+
import { UiLink } from '../../providers/ui-provider.js';
|
|
22
|
+
import { useSessionIds } from '../../providers/session-ids.js';
|
|
23
|
+
import { agentRowOf, isActive, shortElapsed } from './agent-model.js';
|
|
24
|
+
import { LegacySubagentChat } from './legacy-subagent-chat.js';
|
|
25
|
+
import { SessionPeek } from './session-peek.js';
|
|
26
|
+
import { useSteerSession } from './steer-session.js';
|
|
27
|
+
import { useNow } from './workflow-run-controls.js';
|
|
28
|
+
const DOT_TONE = {
|
|
29
|
+
working: 'success',
|
|
30
|
+
needs_input: 'warning',
|
|
31
|
+
failed: 'destructive',
|
|
32
|
+
stopped: 'neutral',
|
|
33
|
+
};
|
|
34
|
+
/** The same state mark as the agents line: live dot, attention dot, check once its turn ended. */
|
|
35
|
+
function StateMark({ state }) {
|
|
36
|
+
return state === 'idle' || state === 'completed' ? (_jsx(CheckIcon, { "aria-hidden": true, weight: "bold", className: "text-kortix-green size-3 shrink-0" })) : (_jsx(StatusDot, { tone: DOT_TONE[state], pulse: state === 'working', className: "motion-reduce:animate-none" }));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Which body a child gets. A child that is its own project session (every
|
|
40
|
+
* sub-agent, teammate and workflow agent since each runs on its own computer)
|
|
41
|
+
* answers `GET /projects/:pid/sessions/:child` and reads its own log
|
|
42
|
+
* (`SessionPeek`). A child that answers 404 or 400 there is not a project
|
|
43
|
+
* session (an in-process `session: "same"` child, an old OpenCode subagent):
|
|
44
|
+
* its transcript lives in the lead's computer, so it keeps the legacy chat.
|
|
45
|
+
* Any other failure is a failed read of a real child: the dialog says so.
|
|
46
|
+
*/
|
|
47
|
+
function bodyKind(row, projectId) {
|
|
48
|
+
if (!projectId)
|
|
49
|
+
return 'legacy';
|
|
50
|
+
if (row.data)
|
|
51
|
+
return 'peek';
|
|
52
|
+
if (row.isError) {
|
|
53
|
+
const status = row.error?.status;
|
|
54
|
+
return status === 404 || status === 400 ? 'legacy' : 'error';
|
|
55
|
+
}
|
|
56
|
+
return 'loading';
|
|
57
|
+
}
|
|
58
|
+
export function SubagentDialogContent({ open, onOpenChange, sessionId, title, projectId: projectIdProp }) {
|
|
59
|
+
const t = useTranslations('multiAgent.subagent');
|
|
60
|
+
const tStrip = useTranslations('multiAgent.strip');
|
|
61
|
+
const ids = useSessionIds();
|
|
62
|
+
const projectId = projectIdProp ?? ids.projectId ?? undefined;
|
|
63
|
+
const row = useProjectSession(projectId, sessionId, { enabled: open && !!projectId });
|
|
64
|
+
const kind = bodyKind(row, projectId);
|
|
65
|
+
const agent = row.data ? agentRowOf(row.data) : null;
|
|
66
|
+
const name = agent?.named ? agent.handle : title || agent?.handle || t('fallbackTitle');
|
|
67
|
+
const working = agent?.state === 'working';
|
|
68
|
+
const now = useNow(open && working);
|
|
69
|
+
const queryClient = useQueryClient();
|
|
70
|
+
// The header's state follows the transcript: a new message re-reads the row.
|
|
71
|
+
const refreshRow = () => projectId && void queryClient.invalidateQueries({ queryKey: qk.project.session(projectId, sessionId) });
|
|
72
|
+
const stop = useMutation({
|
|
73
|
+
mutationFn: () => stopProjectSession(projectId, sessionId),
|
|
74
|
+
onSettled: refreshRow,
|
|
75
|
+
onError: (error) => errorToast(tStrip('stopAgentFailed', { name }), { description: error instanceof Error ? error.message : undefined }),
|
|
76
|
+
});
|
|
77
|
+
const state = agent
|
|
78
|
+
? agent.state === 'working' && agent.workingSinceMs !== null
|
|
79
|
+
? tStrip('workingFor', { elapsed: shortElapsed(now - agent.workingSinceMs) })
|
|
80
|
+
: tStrip(`state.${agent.state}`)
|
|
81
|
+
: null;
|
|
82
|
+
return (_jsx(Modal, { open: open, onOpenChange: onOpenChange, children: _jsxs(ModalContent, { variant: "base", showCloseButton: false, "data-testid": "subagent-dialog", "data-body": kind, className: cn('flex flex-col gap-0 space-y-0 overflow-hidden p-0',
|
|
83
|
+
// lg:max-w-* is required: the base modal sets lg:max-w-lg, which
|
|
84
|
+
// tailwind-merge does not strip for an unprefixed override.
|
|
85
|
+
'h-[80vh] max-h-[840px] lg:h-[80vh] lg:max-w-6xl',
|
|
86
|
+
// A small window gets the whole screen: no sheet edge to aim at.
|
|
87
|
+
'max-[720px]:inset-0 max-[720px]:h-dvh max-[720px]:max-h-none max-[720px]:rounded-none'), children: [_jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b py-2 pr-2 pl-4", children: [agent && _jsx(StateMark, { state: agent.state }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [_jsx(ModalTitle, { className: "min-w-0 truncate text-sm font-medium", children: name }), state && _jsx("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: state })] }), _jsx(ModalDescription, { className: "text-muted-foreground truncate text-xs", children: agent?.agent && agent.named ? tStrip('runsAs', { agent: agentDisplayName(agent.agent) }) : null })] }), projectId && kind === 'peek' && (_jsx(Button, { asChild: true, variant: "ghost", size: "xs", className: "text-muted-foreground hover:text-foreground shrink-0", children: _jsxs(UiLink, { href: uiRoutes().session(projectId, sessionId), onClick: () => onOpenChange(false), children: [_jsx(ArrowSquareOutIcon, { className: "size-3.5 shrink-0" }), t('openPage')] }) })), agent && isActive(agent.state) && (_jsx(Hint, { label: tStrip('stopHint'), side: "bottom", children: _jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", "aria-label": tStrip('stopAgent', { name }), disabled: stop.isPending, onClick: () => stop.mutate(), className: "text-muted-foreground hover:text-foreground", children: stop.isPending ? _jsx(Loading, { className: "size-3" }) : _jsx(SquareIcon, { weight: "fill", className: "size-2.5" }) }) })), _jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", "aria-label": t('close'), onClick: () => onOpenChange(false), className: "text-muted-foreground hover:text-foreground hit-area-2 shrink-0", children: _jsx(XIcon, { className: "size-3.5" }) })] }), _jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: kind === 'peek' && projectId ? (_jsx(SessionPeek, { projectId: projectId, sessionId: sessionId, working: working, onActivity: refreshRow })) : kind === 'legacy' ? (_jsx(LegacySubagentChat, { sessionId: sessionId })) : kind === 'error' ? (_jsx(SessionPeekRowError, { onRetry: () => void row.refetch() })) : (_jsxs("div", { className: "mx-auto w-full max-w-3xl space-y-4 px-7 pt-6", "aria-busy": "true", children: [_jsx(Skeleton, { className: "ml-auto h-9 w-2/5 rounded-xl" }), _jsx(Skeleton, { className: "h-4 w-4/5" }), _jsx(Skeleton, { className: "h-4 w-3/5" })] })) }), kind === 'peek' && projectId && _jsx(SubagentMessageBox, { projectId: projectId, sessionId: sessionId, name: name, onSent: refreshRow }, sessionId)] }) }));
|
|
88
|
+
}
|
|
89
|
+
function SessionPeekRowError({ onRetry }) {
|
|
90
|
+
const t = useTranslations('multiAgent.subagent');
|
|
91
|
+
return (_jsx("div", { className: "flex flex-1 items-center justify-center p-6", children: _jsx(ErrorState, { size: "sm", title: t('loadFailed'), action: _jsx(Button, { variant: "outline", size: "sm", onClick: onRetry, children: t('retry') }) }) }));
|
|
92
|
+
}
|
|
93
|
+
/** One line under the transcript: a message to the child, as a steer. */
|
|
94
|
+
function SubagentMessageBox({ projectId, sessionId, name, onSent }) {
|
|
95
|
+
const t = useTranslations('multiAgent.subagent');
|
|
96
|
+
const [text, setText] = useState('');
|
|
97
|
+
const send = useSteerSession(projectId, {
|
|
98
|
+
onSent: () => {
|
|
99
|
+
setText('');
|
|
100
|
+
successToast(t('sent'));
|
|
101
|
+
onSent();
|
|
102
|
+
},
|
|
103
|
+
onError: (error) => errorToast(t('sendFailed'), { description: error instanceof Error ? error.message : undefined }),
|
|
104
|
+
});
|
|
105
|
+
const submit = () => {
|
|
106
|
+
const message = text.trim();
|
|
107
|
+
if (!message || send.isPending)
|
|
108
|
+
return;
|
|
109
|
+
send.mutate({ sessionId, text: message });
|
|
110
|
+
};
|
|
111
|
+
return (_jsxs("form", { className: "flex shrink-0 items-center gap-2 border-t px-4 py-3", onSubmit: (event) => {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
submit();
|
|
114
|
+
}, children: [_jsx(Input, { "data-testid": "subagent-dialog-message", value: text, onChange: (event) => setText(event.target.value), placeholder: t('messagePlaceholder', { name }), "aria-label": t('messageLabel', { name }), disabled: send.isPending, className: "min-w-0 flex-1" }), _jsxs(Button, { type: "submit", size: "sm", className: "shrink-0 gap-1.5", disabled: !text.trim() || send.isPending, children: [send.isPending ? _jsx(Loading, { className: "size-3.5 shrink-0" }) : _jsx(PaperPlaneRightIcon, { className: "size-3.5 shrink-0" }), t('send')] })] }));
|
|
115
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SubagentDialogProps } from './subagent-dialog-content.js';
|
|
2
|
+
export type { SubagentDialogProps } from './subagent-dialog-content.js';
|
|
3
|
+
/**
|
|
4
|
+
* THE dialog of a session another session started: a sub-agent, a teammate, a
|
|
5
|
+
* workflow agent or runner. Every entry point opens this one (the agents line,
|
|
6
|
+
* notice rows, the agent and workflow tool cards, the worker report card).
|
|
7
|
+
*/
|
|
8
|
+
export declare function SubagentDialog(props: SubagentDialogProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useOpenedOnce } from '../../internal/hooks/use-opened-once.js';
|
|
4
|
+
import { lazyClient } from '../../lib/lazy-client.js';
|
|
5
|
+
// Tool rows, notices and the agents line render this dialog closed on every
|
|
6
|
+
// transcript (the marketing home demo too), so its body loads on first open.
|
|
7
|
+
const SubagentDialogContent = lazyClient(() => import('./subagent-dialog-content.js').then((mod) => mod.SubagentDialogContent));
|
|
8
|
+
/**
|
|
9
|
+
* THE dialog of a session another session started: a sub-agent, a teammate, a
|
|
10
|
+
* workflow agent or runner. Every entry point opens this one (the agents line,
|
|
11
|
+
* notice rows, the agent and workflow tool cards, the worker report card).
|
|
12
|
+
*/
|
|
13
|
+
export function SubagentDialog(props) {
|
|
14
|
+
const opened = useOpenedOnce(props.open);
|
|
15
|
+
if (!opened)
|
|
16
|
+
return null;
|
|
17
|
+
return _jsx(SubagentDialogContent, { ...props });
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SessionTask, SessionTaskStatus } from '@kortix/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* A team's shared task list (flag `agent_teams`), Claude Code's Ctrl+T task
|
|
4
|
+
* list: pending, in progress and completed, each task with its number, the
|
|
5
|
+
* teammate that owns it and the tasks it waits for. A blocked task says so;
|
|
6
|
+
* teammates do not claim it until those tasks complete.
|
|
7
|
+
*/
|
|
8
|
+
export declare const TASK_GROUPS: readonly SessionTaskStatus[];
|
|
9
|
+
export declare function groupTasks(tasks: readonly SessionTask[]): Record<SessionTaskStatus, SessionTask[]>;
|
|
10
|
+
export declare function TasksPanel({ tasks, id }: {
|
|
11
|
+
tasks: readonly SessionTask[];
|
|
12
|
+
id?: string;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Badge } from '../../primitives/badge.js';
|
|
4
|
+
import { CountBadge } from '../../primitives/count-badge.js';
|
|
5
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
6
|
+
import { cn } from '../../lib/utils.js';
|
|
7
|
+
import { CheckIcon, CircleDashedIcon, CircleHalfIcon, LockSimpleIcon } from '@phosphor-icons/react';
|
|
8
|
+
/**
|
|
9
|
+
* A team's shared task list (flag `agent_teams`), Claude Code's Ctrl+T task
|
|
10
|
+
* list: pending, in progress and completed, each task with its number, the
|
|
11
|
+
* teammate that owns it and the tasks it waits for. A blocked task says so;
|
|
12
|
+
* teammates do not claim it until those tasks complete.
|
|
13
|
+
*/
|
|
14
|
+
export const TASK_GROUPS = ['pending', 'in_progress', 'completed'];
|
|
15
|
+
export function groupTasks(tasks) {
|
|
16
|
+
const groups = { pending: [], in_progress: [], completed: [] };
|
|
17
|
+
for (const task of tasks)
|
|
18
|
+
groups[task.status]?.push(task);
|
|
19
|
+
for (const list of Object.values(groups))
|
|
20
|
+
list.sort((a, b) => a.seq - b.seq);
|
|
21
|
+
return groups;
|
|
22
|
+
}
|
|
23
|
+
function TaskGlyph({ task }) {
|
|
24
|
+
if (task.status === 'completed')
|
|
25
|
+
return _jsx(CheckIcon, { "aria-hidden": true, className: "text-kortix-green size-3 shrink-0" });
|
|
26
|
+
if (task.status === 'in_progress')
|
|
27
|
+
return _jsx(CircleHalfIcon, { "aria-hidden": true, className: "text-foreground size-3 shrink-0" });
|
|
28
|
+
if (task.blocked)
|
|
29
|
+
return _jsx(LockSimpleIcon, { "aria-hidden": true, className: "text-muted-foreground size-3 shrink-0" });
|
|
30
|
+
return _jsx(CircleDashedIcon, { "aria-hidden": true, className: "text-muted-foreground size-3 shrink-0" });
|
|
31
|
+
}
|
|
32
|
+
function TaskRow({ task }) {
|
|
33
|
+
const t = useTranslations('multiAgent.tasks');
|
|
34
|
+
const done = task.status === 'completed';
|
|
35
|
+
return (_jsxs("li", { "data-task-seq": task.seq, className: "flex min-w-0 items-center gap-2 rounded-sm px-2 py-1 text-xs", children: [_jsx(TaskGlyph, { task: task }), _jsxs("span", { className: "text-muted-foreground shrink-0 tabular-nums", children: ["#", task.seq] }), _jsx("span", { className: cn('min-w-0 flex-1 truncate', done ? 'text-muted-foreground line-through' : 'text-foreground'), title: task.description || task.subject, children: task.subject }), task.blocked && !done && task.blocked_by.length > 0 && (_jsx("span", { className: "text-muted-foreground shrink-0 tabular-nums", children: t('blockedBy', { tasks: task.blocked_by.map((seq) => `#${seq}`).join(', ') }) })), task.owner_handle ? (_jsxs(Badge, { variant: "outline", size: "sm", className: "max-w-32 shrink-0 truncate", children: ["@", task.owner_handle] })) : (!done && (_jsx(Badge, { variant: "muted", size: "sm", className: "shrink-0", children: t('unowned') })))] }));
|
|
36
|
+
}
|
|
37
|
+
export function TasksPanel({ tasks, id }) {
|
|
38
|
+
const t = useTranslations('multiAgent.tasks');
|
|
39
|
+
const groups = groupTasks(tasks);
|
|
40
|
+
return (_jsx("section", { id: id, "aria-label": t('label'), className: "space-y-1", children: tasks.length === 0 ? (_jsx("p", { className: "text-muted-foreground px-2 py-1 text-xs", children: t('empty') })) : (TASK_GROUPS.map((status) => groups[status].length === 0 ? null : (_jsxs("div", { children: [_jsxs("div", { className: "text-muted-foreground flex items-center gap-1.5 px-2 pt-1 text-xs font-medium", children: [t(`group.${status}`), _jsx(CountBadge, { count: groups[status].length })] }), _jsx("ul", { children: groups[status].map((task) => (_jsx(TaskRow, { task: task }, task.seq))) })] }, status)))) }));
|
|
41
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type WorkflowRun, type WorkflowRunAgent } from '../tool/tools/workflow-run.js';
|
|
2
|
+
/**
|
|
3
|
+
* One workflow run's controls, for the run card in the chat and the strip's
|
|
4
|
+
* "Workflows" group: Claude Code's `/workflows` keys as buttons. Pause or
|
|
5
|
+
* resume (`p`), stop the run (`x`), save its script as a workflow (`s`), and,
|
|
6
|
+
* per agent row, restart (`r`). Every control goes to the box that runs the
|
|
7
|
+
* run: the session that called `workflow`, or a background run's runner.
|
|
8
|
+
*/
|
|
9
|
+
/** A run's large-run warning: more agents than Claude Code's "Large workflow" threshold, or the run says so. */
|
|
10
|
+
export declare function isLargeRun(run: Pick<WorkflowRun, 'agents' | 'large' | 'maxAgents'>): boolean;
|
|
11
|
+
/** The file name a run saves as: its saved name, else its title in kebab case. */
|
|
12
|
+
export declare function workflowFileName(run: Pick<WorkflowRun, 'name' | 'title'>): string;
|
|
13
|
+
/**
|
|
14
|
+
* The live copy of a run: a background run's progress lives on its runner's box,
|
|
15
|
+
* so it is read from there (`useSessionWorkflows(project, runner)`, polled while it
|
|
16
|
+
* runs) and keeps updating after this session's turn ended. A foreground run is the
|
|
17
|
+
* card's own metadata. `controlSessionId` is the session whose box takes the controls.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useLiveWorkflowRun(projectId: string | undefined, sessionId: string | undefined, run: WorkflowRun | null): {
|
|
20
|
+
run: WorkflowRun | null;
|
|
21
|
+
controlSessionId: string | undefined;
|
|
22
|
+
fromRunner: boolean;
|
|
23
|
+
};
|
|
24
|
+
/** The current time, every second while `active`: a live run's elapsed labels tick. */
|
|
25
|
+
export declare function useNow(active: boolean): number;
|
|
26
|
+
/** The prompt "Save" sends to the session that owns the run. */
|
|
27
|
+
export declare function useSaveWorkflowPrompt(): (run: WorkflowRun) => string;
|
|
28
|
+
export declare function LargeRunBadge(): import("react").JSX.Element;
|
|
29
|
+
export interface WorkflowRunControlsProps {
|
|
30
|
+
projectId: string | undefined;
|
|
31
|
+
/** The box that runs the run (the runner of a background run). */
|
|
32
|
+
controlSessionId: string | undefined;
|
|
33
|
+
/** The session the "Save as workflow" prompt goes to: the one that started the run. */
|
|
34
|
+
ownerSessionId: string | undefined;
|
|
35
|
+
run: WorkflowRun;
|
|
36
|
+
}
|
|
37
|
+
export declare function WorkflowRunControls({ projectId, controlSessionId, ownerSessionId, run }: WorkflowRunControlsProps): import("react").JSX.Element | null;
|
|
38
|
+
/** `restart_agent` for one agent row of a run, on the box that runs it. */
|
|
39
|
+
export declare function useRestartAgent(projectId: string | undefined, controlSessionId: string | undefined, run: WorkflowRun | null): {
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
restarting: string | undefined;
|
|
42
|
+
restart: (agent: WorkflowRunAgent) => void;
|
|
43
|
+
};
|