@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,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pins an agent to the sidebar's Customize, or unpins it: on the agent's
|
|
3
|
+
* page header, and on its card in All agents. `onCard` shows it on the card's
|
|
4
|
+
* hover only, and always once pinned so the state is visible.
|
|
5
|
+
*/
|
|
6
|
+
export declare function AgentPinButton({ projectId, agent, onCard, }: {
|
|
7
|
+
projectId: string;
|
|
8
|
+
agent: string;
|
|
9
|
+
onCard?: boolean;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { PushPinIcon, PushPinSlashIcon } from '@phosphor-icons/react';
|
|
4
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
5
|
+
import { usePinnedAgents, usePinnedAgentsStore } from '../../internal/stores/pinned-agents-store.js';
|
|
6
|
+
import { cn } from '../../internal/lib/utils.js';
|
|
7
|
+
import { Button } from '../../primitives/button.js';
|
|
8
|
+
import Hint from '../../primitives/hint.js';
|
|
9
|
+
/**
|
|
10
|
+
* Pins an agent to the sidebar's Customize, or unpins it: on the agent's
|
|
11
|
+
* page header, and on its card in All agents. `onCard` shows it on the card's
|
|
12
|
+
* hover only, and always once pinned so the state is visible.
|
|
13
|
+
*/
|
|
14
|
+
export function AgentPinButton({ projectId, agent, onCard = false, }) {
|
|
15
|
+
const t = useTranslations('agentEditor.tabs');
|
|
16
|
+
const pinned = usePinnedAgents(projectId).includes(agent);
|
|
17
|
+
const togglePinned = usePinnedAgentsStore((state) => state.togglePinned);
|
|
18
|
+
const label = pinned ? t('unpinFromSidebar') : t('pinToSidebar');
|
|
19
|
+
return (_jsx(Hint, { side: "top", label: label, children: _jsx(Button, { type: "button", variant: "secondary", size: onCard ? 'icon-xs' : 'icon-base', "aria-label": label, "aria-pressed": pinned, className: cn('transition-opacity focus-visible:opacity-100', onCard && !pinned && 'md:opacity-0 md:group-hover/card:opacity-100'), onClick: () => togglePinned(projectId, agent), children: pinned ? _jsx(PushPinSlashIcon, { className: "size-4" }) : _jsx(PushPinIcon, { className: "size-4" }) }) }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AgentDraft } from '../sections/view/agent-editor.js';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { type PolicySetOption } from './agent-policy-sets.js';
|
|
4
|
+
/**
|
|
5
|
+
* The policy-set picker of each granted connector, for the connector's own
|
|
6
|
+
* row on the agent page (the rail layout): `control(slug)` is the picker, or
|
|
7
|
+
* undefined for a connector that defines no sets.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useAgentPolicySetControls(projectId: string, editor: AgentDraft, catalog: Record<string, PolicySetOption[]>): (slug: string) => ReactNode | undefined;
|
|
10
|
+
export declare function AgentPolicySetsPanel({ projectId, editor, catalog, unlistedOnly, }: {
|
|
11
|
+
projectId: string;
|
|
12
|
+
editor: AgentDraft;
|
|
13
|
+
catalog: Record<string, PolicySetOption[]>;
|
|
14
|
+
/** Only the sets of granted connectors the project does not list: the rest sit in their rows. */
|
|
15
|
+
unlistedOnly?: boolean;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
|
|
4
|
+
import { Badge } from '../../primitives/badge.js';
|
|
5
|
+
import Hint from '../../primitives/hint.js';
|
|
6
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../../primitives/select.js';
|
|
7
|
+
import { connectorDisplayName } from '../connectors/connector-filter.js';
|
|
8
|
+
import { ConnectorLogo } from '../../internal/connector-logo/connector-logo.js';
|
|
9
|
+
import { installedConnectorLogoSource } from '../../internal/connector-logo/connector-logo-source.js';
|
|
10
|
+
import { EditorList, EditorSection } from '../sections/view/agent-editor-primitives.js';
|
|
11
|
+
import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
|
|
12
|
+
import { useProjectCan } from '../../internal/lib/use-project-can.js';
|
|
13
|
+
import { listConnectors } from '@kortix/sdk';
|
|
14
|
+
import { contract, qk, useProjectAccountId } from '@kortix/sdk/react';
|
|
15
|
+
import { useQuery } from '@tanstack/react-query';
|
|
16
|
+
import { policySetRows, withPolicySet } from './agent-policy-sets.js';
|
|
17
|
+
/**
|
|
18
|
+
* The agent's connector policy sets, shown on the agent-scoped Connectors
|
|
19
|
+
* screen: one row per granted connector that defines sets, each with a picker
|
|
20
|
+
* for which rule set this agent gets. Moved out of the deleted Connectors grant
|
|
21
|
+
* page when the agent editor switched to the full Connectors screen.
|
|
22
|
+
*/
|
|
23
|
+
function usePolicySetData(projectId) {
|
|
24
|
+
const accountId = useProjectAccountId(projectId);
|
|
25
|
+
const canWrite = useProjectCan(projectId, PROJECT_ACTIONS.PROJECT_CONNECTOR_WRITE, { accountId }).allowed ===
|
|
26
|
+
true;
|
|
27
|
+
const connectorsQuery = useQuery({
|
|
28
|
+
queryKey: qk.project.connectors(projectId),
|
|
29
|
+
queryFn: () => listConnectors(projectId, { includeSchemas: false }),
|
|
30
|
+
...contract('config'),
|
|
31
|
+
});
|
|
32
|
+
return { canWrite, connectors: connectorsQuery.data?.connectors ?? [] };
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The policy-set picker of each granted connector, for the connector's own
|
|
36
|
+
* row on the agent page (the rail layout): `control(slug)` is the picker, or
|
|
37
|
+
* undefined for a connector that defines no sets.
|
|
38
|
+
*/
|
|
39
|
+
export function useAgentPolicySetControls(projectId, editor, catalog) {
|
|
40
|
+
const { canWrite, connectors } = usePolicySetData(projectId);
|
|
41
|
+
const rows = policySetRows(editor.draft.connectors, catalog, editor.draft.policy_sets, connectors.map((connector) => connector.slug));
|
|
42
|
+
return function PolicySetControl(slug) {
|
|
43
|
+
const row = rows.find((candidate) => candidate.slug === slug);
|
|
44
|
+
if (!row)
|
|
45
|
+
return undefined;
|
|
46
|
+
const connector = connectors.find((candidate) => candidate.slug === slug);
|
|
47
|
+
return (_jsx(PolicySetSelect, { row: row, name: connector ? connectorDisplayName(connector) : slug, editor: editor, canWrite: canWrite }));
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export function AgentPolicySetsPanel({ projectId, editor, catalog, unlistedOnly = false, }) {
|
|
51
|
+
const { canWrite, connectors } = usePolicySetData(projectId);
|
|
52
|
+
return (_jsx(AgentPolicySetsSection, { editor: editor, catalog: catalog, connectors: connectors, canWrite: canWrite, unlistedOnly: unlistedOnly }));
|
|
53
|
+
}
|
|
54
|
+
const BASE_SET_VALUE = '__base';
|
|
55
|
+
/**
|
|
56
|
+
* Which rule set the agent gets on each granted connector that defines sets
|
|
57
|
+
* (`agents.<a>.policy_sets`). One list for Pick and All alike: under All the
|
|
58
|
+
* catalog has no per-row controls, and a second rendering for that mode would
|
|
59
|
+
* be two places to set one value. Choosing a set needs connector write as well
|
|
60
|
+
* as agent write (the API checks both), so a viewer without it sees the
|
|
61
|
+
* values but cannot change them.
|
|
62
|
+
*/
|
|
63
|
+
function AgentPolicySetsSection({ editor, catalog, connectors, canWrite, unlistedOnly, }) {
|
|
64
|
+
const t = useI18nTranslations('connectorPolicySets');
|
|
65
|
+
const { draft } = editor;
|
|
66
|
+
const rows = policySetRows(draft.connectors, catalog, draft.policy_sets, connectors.map((connector) => connector.slug)).filter((row) => !unlistedOnly || !connectors.some((connector) => connector.slug === row.slug));
|
|
67
|
+
if (rows.length === 0)
|
|
68
|
+
return null;
|
|
69
|
+
return (_jsx(EditorSection, { title: t('agentSection'), bare: true, children: _jsx(EditorList, { children: rows.map((row) => {
|
|
70
|
+
const connector = connectors.find((candidate) => candidate.slug === row.slug);
|
|
71
|
+
const name = connector ? connectorDisplayName(connector) : row.slug;
|
|
72
|
+
return (_jsxs("li", { className: "flex min-h-13 items-center gap-3 px-4 py-2", children: [connector ? (_jsx(ConnectorLogo, { source: installedConnectorLogoSource(connector), size: "sm" })) : null, _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-foreground block truncate text-sm font-medium", children: name }), _jsx("span", { className: "text-muted-foreground block truncate font-mono text-xs", children: row.slug })] }), _jsx(PolicySetSelect, { row: row, name: name, editor: editor, canWrite: canWrite })] }, row.slug));
|
|
73
|
+
}) }) }));
|
|
74
|
+
}
|
|
75
|
+
/** Which rule set the agent gets on one connector, with the missing-set mark. */
|
|
76
|
+
function PolicySetSelect({ row, name, editor, canWrite, }) {
|
|
77
|
+
const t = useI18nTranslations('connectorPolicySets');
|
|
78
|
+
const { draft, set } = editor;
|
|
79
|
+
return (_jsxs("span", { className: "flex shrink-0 items-center gap-2", children: [row.missing && row.value ? (_jsx(Hint, { label: t('agentMissingHint', { name: row.value }), children: _jsx(Badge, { variant: "destructive", size: "xs", children: t('agentMissing') }) })) : null, _jsxs(Select, { value: row.value ?? BASE_SET_VALUE, disabled: !canWrite, onValueChange: (next) => set('policy_sets', withPolicySet(draft.policy_sets, row.slug, next === BASE_SET_VALUE ? null : next)), children: [_jsx(SelectTrigger, { size: "sm", className: "w-40 shrink-0", "aria-label": t('agentSelectLabel', { name }), children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { align: "end", children: [_jsx(SelectItem, { value: BASE_SET_VALUE, children: t('baseRules') }), row.options.map((option) => (_jsx(SelectItem, { value: option.name, description: option.description, children: _jsx("span", { className: "font-mono", children: option.name }) }, option.name))), row.missing && row.value ? (_jsx(SelectItem, { value: row.value, children: _jsx("span", { className: "font-mono", children: row.value }) })) : null] })] })] }));
|
|
80
|
+
}
|
|
@@ -8,7 +8,7 @@ import { parseManifestText } from '../../_vendor/kortix-shared.js';
|
|
|
8
8
|
export function connectorPolicySetOptions(manifestRaw) {
|
|
9
9
|
let manifest = {};
|
|
10
10
|
try {
|
|
11
|
-
manifest = manifestRaw ? parseManifestText(manifestRaw
|
|
11
|
+
manifest = manifestRaw ? parseManifestText(manifestRaw) : {};
|
|
12
12
|
}
|
|
13
13
|
catch {
|
|
14
14
|
return {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The views of a tab that holds several (Capabilities, Access) as a rail
|
|
3
|
+
* left of the content: one row per view, its glyph, its name and its grant
|
|
4
|
+
* ("All but 2", "4 of 9"). The selected row is filled. Below `md` the rail
|
|
5
|
+
* hides and the tab bar's pills take over, so a narrow window keeps the full
|
|
6
|
+
* width for the content.
|
|
7
|
+
*
|
|
8
|
+
* Tools All but 2 │ Tools [All|Specific|None]
|
|
9
|
+
* Skills 4 of 9 │ …
|
|
10
|
+
*/
|
|
11
|
+
import type { ReactNode } from 'react';
|
|
12
|
+
import { type AgentTabGroup } from './agent-page-chrome.js';
|
|
13
|
+
import type { AgentRailKey } from './agent-tabs.js';
|
|
14
|
+
/** The group a rail draws: the one holding `active`, when it has several views. */
|
|
15
|
+
export declare function railGroupOf(groups: AgentTabGroup[], active: AgentRailKey): AgentTabGroup | null;
|
|
16
|
+
export declare function AgentSectionRail({ group, active, dirty, children, }: {
|
|
17
|
+
group: AgentTabGroup | null;
|
|
18
|
+
active: AgentRailKey;
|
|
19
|
+
dirty?: readonly AgentRailKey[];
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
|
|
4
|
+
import { cn } from '../../internal/lib/utils.js';
|
|
5
|
+
import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
6
|
+
import { SECTION_ICON } from './agent-overview.js';
|
|
7
|
+
import { useInPageNavigate } from './agent-page-chrome.js';
|
|
8
|
+
/** The group a rail draws: the one holding `active`, when it has several views. */
|
|
9
|
+
export function railGroupOf(groups, active) {
|
|
10
|
+
const group = groups.find((g) => g.items.some((item) => item.key === active));
|
|
11
|
+
return group && group.items.length > 1 ? group : null;
|
|
12
|
+
}
|
|
13
|
+
export function AgentSectionRail({ group, active, dirty, children, }) {
|
|
14
|
+
const t = useI18nTranslations('agentEditor.tabs');
|
|
15
|
+
const go = useInPageNavigate();
|
|
16
|
+
if (!group)
|
|
17
|
+
return _jsx(_Fragment, { children: children });
|
|
18
|
+
return (_jsxs("div", { className: "flex min-h-0 flex-1", children: [_jsx("nav", { "aria-label": group.label, className: "hidden w-56 shrink-0 flex-col gap-0.5 pt-5 pl-8 md:flex", children: group.items.map((item) => {
|
|
19
|
+
const on = item.key === active;
|
|
20
|
+
const Icon = item.key in SECTION_ICON ? SECTION_ICON[item.key] : null;
|
|
21
|
+
return (_jsxs(Link, { href: item.href, prefetch: false, onClick: (e) => go(e, item.href), "aria-current": on ? 'page' : undefined, "data-testid": `agent-rail-${item.key}`, className: cn('flex h-8 shrink-0 items-center gap-2.5 rounded-md px-2.5 text-sm transition-colors duration-fast', on ? 'bg-muted text-foreground' : 'text-muted-foreground hover:bg-hover hover:text-foreground'), children: [Icon ? _jsx(Icon, { className: "size-4 shrink-0" }) : null, _jsx("span", { className: "min-w-0 flex-1 truncate", children: item.label }), dirty?.includes(item.key) ? (_jsx("span", { role: "img", "aria-label": t('unsavedTab'), className: "bg-foreground size-1.5 shrink-0 rounded-full" })) : null, item.count !== undefined ? (_jsx("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: item.count })) : null] }, item.key));
|
|
22
|
+
}) }), _jsx("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col md:pl-3", children: children })] }));
|
|
23
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare function AgentShareControl({ projectId, agentName,
|
|
1
|
+
export declare function AgentShareControl({ projectId, agentName, open, onOpenChange, }: {
|
|
2
2
|
projectId: string;
|
|
3
3
|
agentName: string;
|
|
4
|
-
/** The
|
|
5
|
-
|
|
4
|
+
/** The Share dialog, owned by the page. */
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
6
7
|
}): import("react").JSX.Element | null;
|
|
@@ -7,11 +7,12 @@ import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
|
|
|
7
7
|
* to someone else. Asana's shape (Marko, 2026-09-03): a stack of the
|
|
8
8
|
* granted people's avatars, an overflow count, and a Share button.
|
|
9
9
|
*
|
|
10
|
-
* The avatars
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* grant made in the dialog shows up
|
|
10
|
+
* The avatars and Share open one dialog (`AgentShareDialog`): who may use
|
|
11
|
+
* the agent, Edit on each grant, and Grant access. The page owns the
|
|
12
|
+
* dialog's open state, so the Overview's People row and the old
|
|
13
|
+
* `?tab=people` link open the same dialog. Both read the same
|
|
14
|
+
* `qk.project.resourceGrants` list, so a grant made in the dialog shows up
|
|
15
|
+
* in the stack at once.
|
|
15
16
|
*
|
|
16
17
|
* Gated on `project.members.manage`, the leaf the grants endpoint asserts;
|
|
17
18
|
* a reader without it sees only Start session.
|
|
@@ -22,33 +23,29 @@ import { EntityAvatar } from '../../primitives/entity-avatar.js';
|
|
|
22
23
|
import { FadedScrollArea } from '../../primitives/faded-scroll-area.js';
|
|
23
24
|
import { HoverCard, HoverCardContent, HoverCardTrigger } from '../../primitives/hover-card.js';
|
|
24
25
|
import { UserAvatar } from '../../primitives/user-avatar.js';
|
|
25
|
-
import { AccessDialog } from '../../access/access/access-dialog.js';
|
|
26
26
|
import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
|
|
27
27
|
import { useProjectCan } from '../../internal/lib/use-project-can.js';
|
|
28
28
|
import { cn } from '../../internal/lib/utils.js';
|
|
29
|
-
import { useProjectAccountId
|
|
29
|
+
import { useProjectAccountId } from '@kortix/sdk/react';
|
|
30
30
|
import { ShareNetworkIcon, UsersIcon, UsersThreeIcon } from '@phosphor-icons/react';
|
|
31
|
-
import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
32
31
|
import { useMemo, useState } from 'react';
|
|
33
|
-
import { grantsForAgent } from './agent-
|
|
32
|
+
import { AgentShareDialog, grantsForAgent } from './agent-share-dialog.js';
|
|
34
33
|
/** A member's face, or the group / whole-project glyph, as a `rounded-sm` tile, never a circle. */
|
|
35
34
|
function GrantAvatar({ grant, size }) {
|
|
36
35
|
if (grant.principal_type === 'group' || grant.principal_type === 'project') {
|
|
37
|
-
return (_jsx(EntityAvatar, { icon: grant.principal_type === 'group' ? UsersIcon : UsersThreeIcon, size: size, className: "ring-
|
|
36
|
+
return (_jsx(EntityAvatar, { icon: grant.principal_type === 'group' ? UsersIcon : UsersThreeIcon, size: size, className: "ring-secondary ring-2" }));
|
|
38
37
|
}
|
|
39
38
|
return _jsx(UserAvatar, { email: grant.principal_label, size: size });
|
|
40
39
|
}
|
|
41
40
|
/** How many avatars the stack shows before it folds the rest into "+N". */
|
|
42
41
|
const STACK_LIMIT = 3;
|
|
43
|
-
export function AgentShareControl({ projectId, agentName,
|
|
42
|
+
export function AgentShareControl({ projectId, agentName, open, onOpenChange, }) {
|
|
44
43
|
const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
|
|
45
44
|
const canManage = useProjectCan(projectId, PROJECT_ACTIONS.PROJECT_MEMBERS_MANAGE).allowed === true;
|
|
46
45
|
const accountId = useProjectAccountId(projectId);
|
|
47
|
-
const [open, setOpen] = useState(false);
|
|
48
46
|
const [stackOpen, setStackOpen] = useState(false);
|
|
49
47
|
const tParticipants = useI18nTranslations('sessionParticipants');
|
|
50
48
|
const grantsQuery = useAgentGrants(projectId, canManage);
|
|
51
|
-
const projectName = useProjectName(projectId) ?? '';
|
|
52
49
|
const assigned = useMemo(() => grantsForAgent(grantsQuery.data?.grants ?? [], agentName), [grantsQuery.data, agentName]);
|
|
53
50
|
if (!canManage || !accountId)
|
|
54
51
|
return null;
|
|
@@ -56,8 +53,10 @@ export function AgentShareControl({ projectId, agentName, peopleHref, }) {
|
|
|
56
53
|
const rest = assigned.length - shown.length;
|
|
57
54
|
const label = assigned.length === 0
|
|
58
55
|
? 'No one is granted this agent yet'
|
|
59
|
-
: `${assigned.length} ${assigned.length === 1 ? 'grant' : 'grants'} — open
|
|
60
|
-
return (_jsxs("div", { className: "flex items-center gap-2", children: [assigned.length > 0 ? (_jsxs(HoverCard, { open: stackOpen, onOpenChange: setStackOpen, openDelay: 300, closeDelay: 100, children: [_jsx(HoverCardTrigger, { asChild: true, children: _jsx(
|
|
56
|
+
: `${assigned.length} ${assigned.length === 1 ? 'grant' : 'grants'} — open Share`;
|
|
57
|
+
return (_jsxs("div", { className: "flex items-center gap-2", children: [assigned.length > 0 ? (_jsxs(HoverCard, { open: stackOpen, onOpenChange: setStackOpen, openDelay: 300, closeDelay: 100, children: [_jsx(HoverCardTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => onOpenChange(true), "aria-label": label, className: cn(
|
|
58
|
+
// The header's control height (h-8, Share's `sm` button) and its fill.
|
|
59
|
+
'bg-secondary hover:bg-secondary/90 flex h-8 items-center rounded-md px-1 transition-colors duration-fast', 'focus-visible:ring-ring/50 focus-visible:ring-2 focus-visible:outline-none'), children: _jsxs(AvatarGroup, { className: "*:data-[slot=avatar]:ring-secondary -space-x-1.5", children: [shown.map((g) => (_jsx(GrantAvatar, { grant: g, size: "sm" }, g.grant_id))), rest > 0 ? (
|
|
61
60
|
// `min-w-6 w-auto`: the tile grows with the count (+97), never under 24px.
|
|
62
|
-
_jsxs(AvatarGroupCount, { className: "h-6 w-auto min-w-6 px-1.5 text-xs tabular-nums", children: ["+", rest] })) : null] }) }) }), _jsxs(HoverCardContent, { side: "bottom", align: "end", sideOffset: 6, animated: false, className: "w-72 overflow-hidden p-0", onEscapeKeyDown: () => setStackOpen(false), children: [_jsxs("div", { className: "text-muted-foreground flex items-center justify-between px-3.5 pt-2.5 pb-1 text-xs", children: [_jsx("span", { children: tParticipants('title') }), _jsx("span", { className: "tabular-nums", children: assigned.length })] }), _jsx(FadedScrollArea, { fadeColor: "from-popover", fadeSize: "6", className: "max-h-64 overscroll-contain", children: _jsx("ul", { className: "p-1 pt-0", children: assigned.map((g) => (_jsx("li", { children: _jsxs("div", { className: "text-foreground flex min-h-9 items-center gap-2.5 px-2 py-1 text-sm", children: [_jsx(GrantAvatar, { grant: g, size: "md" }), _jsx("span", { className: "min-w-0 flex-1 truncate leading-tight", children: g.principal_label })] }) }, g.grant_id))) }) })] })] })) : null, _jsxs(Button, { variant: "secondary", size: "sm", onClick: () =>
|
|
61
|
+
_jsxs(AvatarGroupCount, { className: "h-6 w-auto min-w-6 px-1.5 text-xs tabular-nums", children: ["+", rest] })) : null] }) }) }), _jsxs(HoverCardContent, { side: "bottom", align: "end", sideOffset: 6, animated: false, className: "w-72 overflow-hidden p-0", onEscapeKeyDown: () => setStackOpen(false), children: [_jsxs("div", { className: "text-muted-foreground flex items-center justify-between px-3.5 pt-2.5 pb-1 text-xs", children: [_jsx("span", { children: tParticipants('title') }), _jsx("span", { className: "tabular-nums", children: assigned.length })] }), _jsx(FadedScrollArea, { fadeColor: "from-popover", fadeSize: "6", className: "max-h-64 overscroll-contain", children: _jsx("ul", { className: "p-1 pt-0", children: assigned.map((g) => (_jsx("li", { children: _jsxs("div", { className: "text-foreground flex min-h-9 items-center gap-2.5 px-2 py-1 text-sm", children: [_jsx(GrantAvatar, { grant: g, size: "md" }), _jsx("span", { className: "min-w-0 flex-1 truncate leading-tight", children: g.principal_label })] }) }, g.grant_id))) }) })] })] })) : null, _jsxs(Button, { variant: "secondary", size: "sm", onClick: () => onOpenChange(true), children: [_jsx(ShareNetworkIcon, { className: "size-3.5 shrink-0" }), tI18nComplete.raw('text29887a5ff984')] }), _jsx(AgentShareDialog, { projectId: projectId, agentName: agentName, open: open, onOpenChange: onOpenChange })] }));
|
|
63
62
|
}
|
|
@@ -2,7 +2,9 @@ import { type ProjectResourceGrant } from '@kortix/sdk';
|
|
|
2
2
|
/** The grants that name `agentName`. Orphaned rows (agent renamed) are kept —
|
|
3
3
|
* they are inert, and hiding them would hide the thing to clean up. */
|
|
4
4
|
export declare function grantsForAgent(grants: readonly ProjectResourceGrant[], agentName: string): ProjectResourceGrant[];
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function AgentShareDialog({ projectId, agentName, open, onOpenChange, }: {
|
|
6
6
|
projectId: string;
|
|
7
7
|
agentName: string;
|
|
8
|
+
open: boolean;
|
|
9
|
+
onOpenChange: (open: boolean) => void;
|
|
8
10
|
}): import("react").JSX.Element | null;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useAgentGrants } from './use-agent-grants.js';
|
|
4
4
|
import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
|
|
5
5
|
/**
|
|
6
|
-
* Who may use this agent
|
|
6
|
+
* Who may use this agent: the header's Share button opens this dialog.
|
|
7
7
|
*
|
|
8
8
|
* This is THE access path in Kortix: a project manager grants a person or a
|
|
9
9
|
* group an agent, never a skill or a secret directly (`object_policies` marks
|
|
@@ -29,7 +29,7 @@ import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
|
|
|
29
29
|
* grants = unscoped), which is the opposite of what "remove" means.
|
|
30
30
|
*
|
|
31
31
|
* Gated on `project.members.manage`, the leaf the grants endpoint asserts.
|
|
32
|
-
* Someone without it
|
|
32
|
+
* Someone without it has no Share button, so the dialog never opens.
|
|
33
33
|
*/
|
|
34
34
|
import { Button } from '../../primitives/button.js';
|
|
35
35
|
import { ConfirmDialog } from '../../primitives/confirm-dialog.js';
|
|
@@ -38,7 +38,7 @@ import { Skeleton } from '../../primitives/skeleton.js';
|
|
|
38
38
|
import { errorToast, successToast } from '../../primitives/toast.js';
|
|
39
39
|
import { UserAvatar } from '../../primitives/user-avatar.js';
|
|
40
40
|
import { EmptyState } from '../../primitives/empty-state.js';
|
|
41
|
-
import {
|
|
41
|
+
import { Modal, ModalBody, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle, } from '../../primitives/modal.js';
|
|
42
42
|
import { AccessDialog, } from '../../access/access/access-dialog.js';
|
|
43
43
|
import { builtinRole, customRole, ROLE_NONE } from '../../access/access/role-select.js';
|
|
44
44
|
import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
|
|
@@ -67,7 +67,7 @@ function agentIdsHeldBy(grants, principalType, principalId) {
|
|
|
67
67
|
function projectPolicy(policies) {
|
|
68
68
|
return policies?.find((p) => p.scope_type !== 'account') ?? null;
|
|
69
69
|
}
|
|
70
|
-
export function
|
|
70
|
+
export function AgentShareDialog({ projectId, agentName, open, onOpenChange, }) {
|
|
71
71
|
const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
|
|
72
72
|
const tSharing = useI18nTranslations('accessSharing');
|
|
73
73
|
const queryClient = useQueryClient();
|
|
@@ -82,7 +82,7 @@ export function AgentPeopleSection({ projectId, agentName, }) {
|
|
|
82
82
|
const accessQuery = useQuery({
|
|
83
83
|
queryKey: qk.project.access(projectId),
|
|
84
84
|
queryFn: () => listProjectAccess(projectId),
|
|
85
|
-
enabled: canManage,
|
|
85
|
+
enabled: canManage && open,
|
|
86
86
|
...contract('inventory'),
|
|
87
87
|
});
|
|
88
88
|
const projectName = useProjectName(projectId) ?? '';
|
|
@@ -134,20 +134,20 @@ export function AgentPeopleSection({ projectId, agentName, }) {
|
|
|
134
134
|
});
|
|
135
135
|
setEditOpen(true);
|
|
136
136
|
};
|
|
137
|
-
return (_jsxs(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
137
|
+
return (_jsxs(Modal, { open: open, onOpenChange: onOpenChange, children: [_jsxs(ModalContent, { children: [_jsxs(ModalHeader, { children: [_jsx(ModalTitle, { children: tI18nComplete.raw('text82d9af69e1a1') }), _jsx(ModalDescription, { children: tI18nComplete.raw('text96feb5be077d') })] }), _jsx(ModalBody, { className: "max-h-[60vh] overflow-y-auto", children: grantsQuery.isLoading ? (_jsx("ul", { className: "divide-border divide-y", children: [0, 1].map((i) => (_jsxs("li", { className: "flex items-center gap-3 py-2.5", children: [_jsx(Skeleton, { className: "size-8 rounded-md" }), _jsx(Skeleton, { className: "h-4 w-40 rounded-sm" })] }, i))) })) : assigned.length === 0 ? (_jsx(EmptyState, { size: "sm", title: tI18nComplete.raw('text011c4e48df01') })) : (_jsx("ul", { className: "divide-border divide-y", children: assigned.map((g) => {
|
|
138
|
+
const member = g.principal_type === 'member'
|
|
139
|
+
? accessQuery.data?.members.find((m) => m.user_id === g.principal_id)
|
|
140
|
+
: undefined;
|
|
141
|
+
return (_jsxs("li", { className: "flex items-center gap-3 py-2.5", children: [g.principal_type === 'group' ? (_jsx(EntityAvatar, { icon: UsersIcon, size: "md" })) : g.principal_type === 'project' ? (_jsx(EntityAvatar, { icon: UsersThreeIcon, size: "md" })) : (_jsx(UserAvatar, { email: member?.email ?? g.principal_label, size: "md" })), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-foreground block truncate text-sm font-medium", children: g.principal_type === 'project'
|
|
142
|
+
? tSharing('everyone', { project: g.principal_label })
|
|
143
|
+
: g.principal_label }), _jsxs("span", { className: "text-muted-foreground block truncate text-xs", children: [g.principal_type === 'project'
|
|
144
|
+
? tSharing('everyoneMeta')
|
|
145
|
+
: g.principal_type === 'group'
|
|
146
|
+
? tSharing('groupMeta')
|
|
147
|
+
: tSharing('memberMeta'), g.expires_at
|
|
148
|
+
? tI18nComplete('textdc40ace03968', {
|
|
149
|
+
value0: new Date(g.expires_at).toLocaleDateString(),
|
|
150
|
+
})
|
|
151
|
+
: '', g.orphaned ? tI18nComplete.raw('textc795f93da2e5') : ''] })] }), g.principal_type === 'project' ? (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => setStopSharing(g), children: tSharing('removeEveryone') })) : (_jsxs(Button, { variant: "ghost", size: "sm", className: "gap-1.5", onClick: () => openEdit(g), disabled: !accountId, children: [_jsx(PencilSimpleIcon, { className: "size-3.5 shrink-0" }), tI18nComplete.raw('text464c4ffd019e')] }))] }, g.grant_id));
|
|
152
|
+
}) })) }), accountId ? (_jsx(ModalFooter, { className: "pb-5", children: _jsxs(Button, { size: "sm", onClick: () => setGrantOpen(true), children: [_jsx(PlusIcon, { className: "size-4" }), tI18nComplete.raw('text8693768c7e08')] }) })) : null] }), accountId ? (_jsx(AccessDialog, { open: grantOpen, onOpenChange: setGrantOpen, accountId: accountId, scope: { kind: 'project', projectId, projectName }, mode: { kind: 'grant' }, initialAgentIds: [agentName] })) : null, accountId && editTarget ? (_jsx(AccessDialog, { open: editOpen, onOpenChange: setEditOpen, accountId: accountId, scope: { kind: 'project', projectId, projectName }, mode: { kind: 'edit', principal: editTarget.principal, current: editTarget.current }, inheritedFrom: editTarget.inheritedFrom }, `${editTarget.principal.type}:${editTarget.principal.id}`)) : null, _jsx(ConfirmDialog, { open: stopSharing !== null, onOpenChange: (open) => !open && setStopSharing(null), title: tSharing('removeEveryoneTitle', { agent: agentName }), description: tSharing('removeEveryoneDescription', { agent: agentName }), confirmLabel: tSharing('removeEveryone'), confirmVariant: "destructive", isPending: stopSharingMutation.isPending, onConfirm: () => stopSharing && stopSharingMutation.mutate(stopSharing.grant_id) })] }));
|
|
153
153
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent page's address: four tabs, and a view inside Access and Runtime.
|
|
3
|
+
* The page draws them as ONE rail (2026-10-28): Overview, Triggers, then the
|
|
4
|
+
* Access views and the Runtime views under their group labels. The address
|
|
5
|
+
* keeps its two levels, so every link still resolves.
|
|
6
|
+
*
|
|
7
|
+
* ?tab=overview | access | runtime | triggers
|
|
8
|
+
* ?tab=access&view=connectors | secrets | skills | tools | extensions | drives | apps | permissions | …
|
|
9
|
+
* ?tab=runtime&view=model | workspace
|
|
10
|
+
*
|
|
11
|
+
* The page used to be a rail of seventeen `?section=<key>` topics, then six
|
|
12
|
+
* tabs. Tools moved from Runtime to Access (2026-10-27): `?tab=runtime&view=tools`
|
|
13
|
+
* opens Access. Every old link still resolves: `resolveAgentLocation` maps
|
|
14
|
+
* `?section=` onto a tab and a view (Basics became the Overview's
|
|
15
|
+
* Availability panel). Instructions and People are no tabs any more: the
|
|
16
|
+
* instructions are edited on the Overview, and People is the header's Share
|
|
17
|
+
* dialog. Their old links open the Overview with the instructions in focus or
|
|
18
|
+
* the Share dialog open (`open`).
|
|
19
|
+
*/
|
|
20
|
+
import type { AgentConfigSectionKey } from '../sections/view/agent-editor.js';
|
|
21
|
+
export declare const AGENT_TABS: readonly ["overview", "access", "runtime", "triggers"];
|
|
22
|
+
export type AgentTab = (typeof AGENT_TABS)[number];
|
|
23
|
+
/** Access views, in the order of an `agents.<name>` block in kortix.yaml. */
|
|
24
|
+
export declare const ACCESS_VIEWS: readonly ["tools", "skills", "subagents", "commands", "extensions", "connectors", "secrets", "apps", "actions", "drives"];
|
|
25
|
+
export type AccessView = (typeof ACCESS_VIEWS)[number];
|
|
26
|
+
export declare const RUNTIME_VIEWS: readonly ["model", "workspace"];
|
|
27
|
+
export type RuntimeView = (typeof RUNTIME_VIEWS)[number];
|
|
28
|
+
/** The URL word for a view. `actions` reads as `permissions` in a link. */
|
|
29
|
+
export declare function viewParam(view: AgentConfigSectionKey): string;
|
|
30
|
+
/** What a retired tab's link opens on the Overview. */
|
|
31
|
+
export type AgentOverlay = 'instructions' | 'share';
|
|
32
|
+
export interface AgentLocation {
|
|
33
|
+
tab: AgentTab;
|
|
34
|
+
/** The Access or Runtime view; null on every other tab. */
|
|
35
|
+
view: AgentConfigSectionKey | null;
|
|
36
|
+
/** Set by a retired tab's link: the instructions in focus, or the Share dialog open. */
|
|
37
|
+
open?: AgentOverlay;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The tab and view a URL names, limited to what this agent has (`tabs`, and
|
|
41
|
+
* `views` for Access and Runtime). An unknown or unavailable value falls back
|
|
42
|
+
* to the first entry, never to a blank page.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveAgentLocation(params: {
|
|
45
|
+
tab: string | null;
|
|
46
|
+
view: string | null;
|
|
47
|
+
section: string | null;
|
|
48
|
+
}, tabs: readonly AgentTab[], views: readonly AgentConfigSectionKey[]): AgentLocation;
|
|
49
|
+
export declare function agentLocationHref(pathname: string, tab: AgentTab, view?: AgentConfigSectionKey | null): string;
|
|
50
|
+
/** The href of a legacy section key: where an old Overview row or link lands now. */
|
|
51
|
+
export declare function sectionLocationHref(pathname: string, section: AgentConfigSectionKey): string;
|
|
52
|
+
export declare const YAML_KEY_ROW: {
|
|
53
|
+
readonly description: "overview";
|
|
54
|
+
readonly prompt: "overview";
|
|
55
|
+
readonly prompt_file: "overview";
|
|
56
|
+
readonly enabled: "overview";
|
|
57
|
+
readonly hidden: "overview";
|
|
58
|
+
readonly mode: "overview";
|
|
59
|
+
readonly space: "overview";
|
|
60
|
+
readonly color: "overview";
|
|
61
|
+
readonly model: "model";
|
|
62
|
+
readonly variant: "model";
|
|
63
|
+
readonly temperature: "model";
|
|
64
|
+
readonly top_p: "model";
|
|
65
|
+
readonly steps: "model";
|
|
66
|
+
readonly options: "model";
|
|
67
|
+
readonly tools: "tools";
|
|
68
|
+
readonly codemode: "tools";
|
|
69
|
+
readonly permission: "tools";
|
|
70
|
+
readonly skills: "skills";
|
|
71
|
+
readonly subagents: "subagents";
|
|
72
|
+
readonly commands: "commands";
|
|
73
|
+
readonly extensions: "extensions";
|
|
74
|
+
readonly connectors: "connectors";
|
|
75
|
+
readonly connectors_required: "connectors";
|
|
76
|
+
readonly policy_sets: "connectors";
|
|
77
|
+
readonly secrets: "secrets";
|
|
78
|
+
readonly apps: "apps";
|
|
79
|
+
readonly kortix_permissions: "actions";
|
|
80
|
+
readonly workspace: "workspace";
|
|
81
|
+
readonly sandbox: "workspace";
|
|
82
|
+
readonly network_egress: "workspace";
|
|
83
|
+
};
|
|
84
|
+
/** One row of the agent page's rail: a tab with no views, or a view. */
|
|
85
|
+
export type AgentRailKey = 'overview' | 'triggers' | AgentConfigSectionKey;
|
|
86
|
+
/** The rail row a location shows. */
|
|
87
|
+
export declare function railKeyOf(location: AgentLocation): AgentRailKey;
|
|
88
|
+
/**
|
|
89
|
+
* The rail rows that hold an unsaved edit: each changed field of the draft,
|
|
90
|
+
* mapped to the row that edits it (`YAML_KEY_ROW`). An unknown field lands
|
|
91
|
+
* on Model, the row for the agent's runtime knobs.
|
|
92
|
+
*/
|
|
93
|
+
export declare function changedItems(draft: object, baseline: object): AgentRailKey[];
|
|
94
|
+
/** The agent name closest to a missing one, when it is close enough to be a typo. */
|
|
95
|
+
export declare function closestAgentName(missing: string, names: readonly string[]): string | null;
|