@kabmo-labs/kabmo 0.22.0 → 0.24.0
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/client/index.html +1 -1
- package/dist/client/index.js +873 -524
- package/dist/client/static/js/{index-297dck9a.js → index-jcr5twtp.js} +799 -795
- package/dist/client/static/js/index-z3w7n85q.css +1 -0
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/groups.test.ts +14 -0
- package/marketplace/plugins/stats/src/groups.ts +20 -0
- package/marketplace/plugins/stats/src/labels.test.ts +9 -0
- package/marketplace/plugins/stats/src/labels.ts +7 -0
- package/marketplace/plugins/stats/src/server.ts +1 -1
- package/package.json +1 -1
- package/src/client/App.tsx +20 -19
- package/src/client/components/common/ComposerTextarea.tsx +10 -1
- package/src/client/components/common/Modal.tsx +2 -6
- package/src/client/components/common/PWAInstallButton.tsx +3 -2
- package/src/client/components/common/Toast.test.tsx +298 -0
- package/src/client/components/common/Toast.tsx +103 -37
- package/src/client/components/common/ToastStack.tsx +33 -12
- package/src/client/components/common/ViewportSelector.tsx +122 -114
- package/src/client/components/common/context-usage-button/Ring.tsx +38 -1
- package/src/client/components/common/context-usage-button/index.test.tsx +19 -3
- package/src/client/components/common/context-usage-button/index.tsx +5 -2
- package/src/client/components/common/harness-glyph/brands.ts +65 -0
- package/src/client/components/common/harness-glyph/harness-glyph.test.ts +185 -0
- package/src/client/components/common/harness-glyph/index.tsx +131 -0
- package/src/client/components/common/header-controls/MoreMenu.tsx +2 -1
- package/src/client/components/common/header-controls/index.tsx +16 -8
- package/src/client/components/common/header-panel-buttons/index.tsx +4 -3
- package/src/client/components/common/panel-mark/index.test.tsx +2 -2
- package/src/client/components/common/panel-mark/index.tsx +11 -2
- package/src/client/components/common/search-select/index.tsx +305 -0
- package/src/client/components/common/search-select/search-select.test.tsx +217 -0
- package/src/client/components/common/server-control/index.tsx +3 -2
- package/src/client/components/common/session-row/index.tsx +18 -1
- package/src/client/components/common/toolbar-row/index.tsx +57 -20
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +1 -3
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +3 -2
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +7 -1
- package/src/client/components/layout/desktop-layout/index.tsx +1 -3
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +1 -0
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +18 -1
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +1 -3
- package/src/client/components/layout/session-sidebar/about-modal/HarnessTable.test.tsx +332 -0
- package/src/client/components/layout/session-sidebar/about-modal/HarnessTable.tsx +310 -0
- package/src/client/components/layout/session-sidebar/about-modal/SocialLinks.tsx +63 -51
- package/src/client/components/layout/session-sidebar/about-modal/UpdateSection.tsx +4 -2
- package/src/client/components/layout/session-sidebar/about-modal/index.test.tsx +122 -0
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +136 -35
- package/src/client/components/layout/session-sidebar/harness-mark.test.tsx +126 -0
- package/src/client/components/layout/session-sidebar/modern/ActionRow.tsx +4 -3
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +1 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +1 -7
- package/src/client/components/mobile/SessionSidebar.tsx +1 -3
- package/src/client/components/mobile/mobile-main-view/Header.tsx +3 -2
- package/src/client/components/mobile/mobile-session-sidebar/Dialogs.tsx +0 -8
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +1 -0
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +17 -1
- package/src/client/components/settings/Modal.tsx +26 -22
- package/src/client/components/settings/Sidebar.tsx +45 -5
- package/src/client/components/settings/categories/HarnessSettings.tsx +207 -0
- package/src/client/components/settings/categories/ProjectSettings.tsx +1 -3
- package/src/client/components/settings/categories/ProviderSettings.tsx +0 -4
- package/src/client/components/settings/categories/SkillCatalogSettings.tsx +13 -23
- package/src/client/components/settings/categories/agent-settings/ModelPicker.tsx +23 -30
- package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +20 -11
- package/src/client/components/settings/categories/chat-settings/GoalSection.tsx +16 -16
- package/src/client/components/settings/categories/harness-settings/AddProviderForm.tsx +219 -0
- package/src/client/components/settings/categories/harness-settings/ConfigForm.tsx +268 -0
- package/src/client/components/settings/categories/harness-settings/EnvProviderForm.tsx +146 -0
- package/src/client/components/settings/categories/harness-settings/HarnessCard.tsx +278 -0
- package/src/client/components/settings/categories/harness-settings/ImportSection.tsx +195 -0
- package/src/client/components/settings/categories/harness-settings/ProviderPanel.tsx +152 -0
- package/src/client/components/settings/categories/harness-settings/ToggleList.tsx +147 -0
- package/src/client/components/settings/categories/harness-settings/parts.test.tsx +97 -0
- package/src/client/components/settings/categories/harness-settings/parts.tsx +84 -0
- package/src/client/components/settings/categories/harness-settings/provider-panel.test.tsx +313 -0
- package/src/client/components/settings/categories/omp-settings/RoleEditor.test.ts +60 -39
- package/src/client/components/settings/categories/omp-settings/RoleRow.tsx +32 -41
- package/src/client/components/settings/categories/omp-settings/role-picker.test-util.ts +45 -0
- package/src/client/components/settings/categories/panel-plugins/PluginMark.test.ts +1 -1
- package/src/client/components/settings/categories/panel-plugins/PluginMark.tsx +11 -4
- package/src/client/components/settings/groups.test.tsx +160 -0
- package/src/client/components/settings/harness-icons.test.tsx +134 -0
- package/src/client/components/workspace/browser-panel/AddressBar.tsx +3 -13
- package/src/client/components/workspace/browser-toolbar/clusters.tsx +237 -0
- package/src/client/components/workspace/browser-toolbar/index.test.tsx +167 -0
- package/src/client/components/workspace/browser-toolbar/index.tsx +99 -100
- package/src/client/components/workspace/btw-panel/Messages.tsx +4 -1
- package/src/client/components/workspace/btw-panel/index.tsx +2 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +11 -7
- package/src/client/components/workspace/chat-timeline/ChatOverlays.tsx +5 -2
- package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +13 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +13 -0
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.test.ts +41 -0
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +19 -14
- package/src/client/components/workspace/chat-timeline/MessageList.test.ts +14 -0
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +6 -0
- package/src/client/components/workspace/chat-timeline/PendingChatView.tsx +14 -0
- package/src/client/components/workspace/chat-timeline/RunFooter.tsx +4 -0
- package/src/client/components/workspace/chat-timeline/RunMark.tsx +58 -0
- package/src/client/components/workspace/chat-timeline/SubagentView.tsx +4 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +4 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +11 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +13 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +8 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +27 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +48 -23
- package/src/client/components/workspace/chat-timeline/chat-input/composer-portal.test.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +21 -1
- package/src/client/components/workspace/chat-timeline/chat-input/modes-props.ts +7 -0
- package/src/client/components/workspace/chat-timeline/chat-input/props.ts +13 -0
- package/src/client/components/workspace/chat-timeline/chat-input/selection.ts +11 -2
- package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +17 -15
- package/src/client/components/workspace/chat-timeline/pending-harness.test.tsx +157 -0
- package/src/client/components/workspace/chat-timeline/run-mark.test.ts +104 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FrameControl.tsx +11 -20
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/GroupedAsk.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionBlock.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/drafts.ts +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.test.ts +31 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +5 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.test.ts +56 -45
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +38 -94
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/wait-parts.tsx +76 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.ts +2 -1
- package/src/client/components/workspace/file-explorer/index.test.ts +25 -0
- package/src/client/components/workspace/file-explorer/index.tsx +10 -6
- package/src/client/components/workspace/git-panel/index.test.ts +13 -3
- package/src/client/components/workspace/git-panel/index.tsx +1 -3
- package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +92 -0
- package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +290 -0
- package/src/client/components/workspace/model-dropdown/Item.tsx +11 -0
- package/src/client/components/workspace/model-dropdown/Panel.tsx +119 -8
- package/src/client/components/workspace/model-dropdown/Section.tsx +4 -0
- package/src/client/components/workspace/model-dropdown/fullscreen-picker.ts +51 -0
- package/src/client/components/workspace/model-dropdown/harness-models.test.ts +177 -0
- package/src/client/components/workspace/model-dropdown/harness-models.ts +148 -0
- package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +336 -0
- package/src/client/components/workspace/model-dropdown/index.tsx +114 -85
- package/src/client/components/workspace/model-dropdown/placement.test.tsx +127 -0
- package/src/client/components/workspace/model-dropdown/popover-metrics.test.ts +107 -0
- package/src/client/components/workspace/model-dropdown/popover-metrics.ts +118 -0
- package/src/client/components/workspace/model-dropdown/row-mutations.ts +106 -0
- package/src/client/components/workspace/model-dropdown/trigger.test.ts +22 -2
- package/src/client/components/workspace/model-dropdown/use-popover-size.ts +89 -0
- package/src/client/data/settings/omp-schema.json +224 -17
- package/src/client/hooks/chat/composer/index.ts +11 -2
- package/src/client/hooks/chat/composer/items.test.ts +11 -0
- package/src/client/hooks/chat/composer/items.ts +4 -2
- package/src/client/hooks/chat/composer/model-selection.test.ts +110 -0
- package/src/client/hooks/chat/composer/model-selection.ts +45 -4
- package/src/client/hooks/chat/omp/prompt-send.ts +4 -2
- package/src/client/hooks/chat/timeline/actions.ts +10 -5
- package/src/client/hooks/chat/timeline/ask-frames.ts +5 -4
- package/src/client/hooks/chat/timeline/composer-local-actions.test.ts +19 -81
- package/src/client/hooks/chat/timeline/composer-modes.ts +11 -2
- package/src/client/hooks/chat/timeline/composer-refs.ts +16 -1
- package/src/client/hooks/chat/timeline/index.ts +27 -35
- package/src/client/hooks/chat/timeline/mode-availability.test.ts +51 -0
- package/src/client/hooks/chat/timeline/modes-contract.ts +6 -0
- package/src/client/hooks/chat/timeline/modes.ts +41 -2
- package/src/client/hooks/chat/timeline/new-chat-open.test.ts +86 -0
- package/src/client/hooks/chat/timeline/new-chat-open.ts +23 -5
- package/src/client/hooks/chat/timeline/new-chat.test.ts +32 -4
- package/src/client/hooks/chat/timeline/new-chat.ts +18 -6
- package/src/client/hooks/chat/timeline/prompt-text.test.ts +7 -0
- package/src/client/hooks/chat/timeline/prompt-text.ts +15 -6
- package/src/client/hooks/chat/timeline/rewind-actions.test.ts +51 -1
- package/src/client/hooks/chat/timeline/rewind-actions.ts +23 -1
- package/src/client/hooks/chat/timeline/run-identity.test.ts +52 -0
- package/src/client/hooks/chat/timeline/run-identity.ts +23 -11
- package/src/client/hooks/chat/timeline/send-execute.test.ts +55 -0
- package/src/client/hooks/chat/timeline/send-props.ts +11 -3
- package/src/client/hooks/chat/timeline/send-steer.test.ts +2 -3
- package/src/client/hooks/chat/timeline/send.test-util.ts +3 -2
- package/src/client/hooks/chat/timeline/send.test.ts +2 -3
- package/src/client/hooks/chat/timeline/send.ts +34 -8
- package/src/client/hooks/chat/timeline/session-harness.test.ts +163 -0
- package/src/client/hooks/chat/timeline/session-harness.ts +164 -0
- package/src/client/hooks/chat/timeline/session-load.test-util.ts +6 -2
- package/src/client/hooks/chat/timeline/session-load.test.ts +31 -0
- package/src/client/hooks/chat/timeline/session-load.ts +6 -14
- package/src/client/hooks/chat/timeline/session-shapes.ts +32 -0
- package/src/client/hooks/chat/timeline/spawn-harness.ts +41 -0
- package/src/client/hooks/chat/timeline/timeline-running.ts +55 -0
- package/src/client/hooks/chat/timeline/tui-only-guard.ts +9 -0
- package/src/client/hooks/chat/timeline/undo-confirmation.test.ts +131 -0
- package/src/client/hooks/models/harness-catalog.ts +114 -0
- package/src/client/hooks/models/provider-writes.test.ts +81 -0
- package/src/client/hooks/models/provider-writes.ts +144 -0
- package/src/client/hooks/models/use-harness-versions.test.ts +152 -0
- package/src/client/hooks/models/use-harness-versions.ts +136 -0
- package/src/client/hooks/models/use-harnesses-controller.ts +57 -0
- package/src/client/hooks/models/use-harnesses-signal.test.ts +128 -0
- package/src/client/hooks/models/use-harnesses.test.ts +187 -0
- package/src/client/hooks/models/use-harnesses.ts +215 -0
- package/src/client/hooks/settings/providers/index.ts +1 -3
- package/src/client/hooks/ui/editor-error-toast.ts +10 -3
- package/src/client/hooks/ui/icon-style.ts +28 -0
- package/src/client/hooks/ui/on-click-outside.test.ts +104 -0
- package/src/client/hooks/ui/on-click-outside.ts +14 -2
- package/src/client/hooks/ui/theme.ts +6 -0
- package/src/client/hooks/ui/toast-queue.test.ts +126 -0
- package/src/client/hooks/ui/toasts.ts +132 -27
- package/src/client/hooks/ui/ui-feedback.test.ts +4 -91
- package/src/client/lib/ui/control-plate.test.ts +76 -0
- package/src/client/lib/ui/control-plate.ts +65 -0
- package/src/client/tailwind.css +47 -1
- package/src/server/lib/assets/shell-attributes.server.ts +9 -2
- package/src/server/lib/assets/shell-attributes.test.ts +22 -6
- package/src/server/lib/db/schema.ts +4 -0
- package/src/server/lib/harness/acp/acp-audit.server.ts +107 -0
- package/src/server/lib/harness/acp/acp-goal-driver.server.ts +153 -0
- package/src/server/lib/harness/acp/acp-goal-state.server.ts +136 -0
- package/src/server/lib/harness/acp/acp-goal.server.ts +273 -0
- package/src/server/lib/harness/acp/acp-goal.test.ts +229 -0
- package/src/server/lib/harness/acp/acp-telemetry.server.ts +133 -0
- package/src/server/lib/harness/acp/acp-telemetry.test.ts +85 -0
- package/src/server/lib/harness/acp/acp-todos.server.ts +45 -0
- package/src/server/lib/harness/acp/acp-todos.test.ts +43 -0
- package/src/server/lib/harness/acp/activation.test.ts +81 -0
- package/src/server/lib/harness/acp/activation.ts +72 -0
- package/src/server/lib/harness/acp/calls.ts +97 -0
- package/src/server/lib/harness/acp/client.test.ts +73 -0
- package/src/server/lib/harness/acp/client.ts +339 -0
- package/src/server/lib/harness/acp/commands.test.ts +92 -0
- package/src/server/lib/harness/acp/commands.ts +165 -0
- package/src/server/lib/harness/acp/frames.test.ts +315 -0
- package/src/server/lib/harness/acp/frames.ts +349 -0
- package/src/server/lib/harness/acp/mapper.ts +204 -0
- package/src/server/lib/harness/acp/permissions.test.ts +66 -0
- package/src/server/lib/harness/acp/permissions.ts +155 -0
- package/src/server/lib/harness/acp/prompt.test.ts +130 -0
- package/src/server/lib/harness/acp/prompt.ts +134 -0
- package/src/server/lib/harness/acp/protocol.ts +162 -0
- package/src/server/lib/harness/acp/session-config.test.ts +73 -0
- package/src/server/lib/harness/acp/session-config.ts +148 -0
- package/src/server/lib/harness/acp/session-facts.ts +71 -0
- package/src/server/lib/harness/acp/session-handshake.ts +89 -0
- package/src/server/lib/harness/acp/session-idle.ts +51 -0
- package/src/server/lib/harness/acp/session-notifications.ts +95 -0
- package/src/server/lib/harness/acp/session-observers.test.ts +193 -0
- package/src/server/lib/harness/acp/session-options.ts +33 -0
- package/src/server/lib/harness/acp/session-permissions.test.ts +105 -0
- package/src/server/lib/harness/acp/session-permissions.ts +74 -0
- package/src/server/lib/harness/acp/session-reaper.test.ts +96 -0
- package/src/server/lib/harness/acp/session-turns.ts +95 -0
- package/src/server/lib/harness/acp/session-usage.ts +60 -0
- package/src/server/lib/harness/acp/session-web-state.ts +61 -0
- package/src/server/lib/harness/acp/session.test-util.ts +160 -0
- package/src/server/lib/harness/acp/session.test.ts +233 -0
- package/src/server/lib/harness/acp/session.ts +350 -0
- package/src/server/lib/harness/acp/turn.ts +199 -0
- package/src/server/lib/harness/acp/verbs.ts +87 -0
- package/src/server/lib/harness/auto-probe.server.test.ts +121 -0
- package/src/server/lib/harness/auto-probe.server.ts +178 -0
- package/src/server/lib/harness/capabilities.ts +67 -0
- package/src/server/lib/harness/config-invalidation.test.ts +91 -0
- package/src/server/lib/harness/config.server.test.ts +105 -0
- package/src/server/lib/harness/config.server.ts +98 -0
- package/src/server/lib/harness/enabled.server.test.ts +87 -0
- package/src/server/lib/harness/enabled.server.ts +61 -0
- package/src/server/lib/harness/launch-table.ts +195 -0
- package/src/server/lib/harness/launch.test.ts +220 -0
- package/src/server/lib/harness/launch.ts +216 -0
- package/src/server/lib/harness/probe-cache.server.test.ts +154 -0
- package/src/server/lib/harness/probe-cache.server.ts +177 -0
- package/src/server/lib/harness/provider-entry.ts +212 -0
- package/src/server/lib/harness/provider-file.server.ts +67 -0
- package/src/server/lib/harness/provider-import.test.ts +191 -0
- package/src/server/lib/harness/provider-probe.server.ts +123 -0
- package/src/server/lib/harness/provider-sources.server.test.ts +45 -0
- package/src/server/lib/harness/provider-sources.server.ts +308 -0
- package/src/server/lib/harness/provider-write-error.ts +19 -0
- package/src/server/lib/harness/provider-write.server.test.ts +308 -0
- package/src/server/lib/harness/provider-write.server.ts +339 -0
- package/src/server/lib/harness/provider-zcode.server.test.ts +270 -0
- package/src/server/lib/harness/provider-zcode.server.ts +324 -0
- package/src/server/lib/harness/register.server.ts +36 -0
- package/src/server/lib/harness/registry.ts +58 -0
- package/src/server/lib/harness/schema.server.ts +129 -0
- package/src/server/lib/harness/session-store.server.test.ts +175 -0
- package/src/server/lib/harness/session-store.server.ts +206 -0
- package/src/server/lib/harness/session-title.server.test.ts +109 -0
- package/src/server/lib/harness/session-title.server.ts +70 -0
- package/src/server/lib/harness/session.ts +74 -0
- package/src/server/lib/harness/spawn.server.ts +133 -0
- package/src/server/lib/harness/update-state.server.ts +185 -0
- package/src/server/lib/lifecycle/after-listen.ts +7 -0
- package/src/server/lib/models/provider-items.server.ts +1 -1
- package/src/server/lib/models/registry-refresh.server.test.ts +87 -0
- package/src/server/lib/models/registry-refresh.server.ts +98 -0
- package/src/server/lib/omp/config/models-config.ts +4 -0
- package/src/server/lib/omp/core/cli.ts +13 -0
- package/src/server/lib/omp/core/host-resolution.test.ts +6 -3
- package/src/server/lib/omp/rpc/child-config.ts +5 -4
- package/src/server/lib/omp/rpc/constants.test.ts +2 -1
- package/src/server/lib/omp/rpc/event-fanout.ts +9 -0
- package/src/server/lib/omp/rpc/forked-resume.test.ts +14 -3
- package/src/server/lib/omp/rpc/rpc-primitives.test.ts +11 -0
- package/src/server/lib/omp/rpc/session-registration.ts +7 -2
- package/src/server/lib/omp/rpc/session-registry.test.ts +2 -1
- package/src/server/lib/omp/rpc/session-registry.ts +74 -5
- package/src/server/lib/omp/session/acp-rows.server.ts +79 -0
- package/src/server/lib/omp/session/delete-flow.server.ts +15 -8
- package/src/server/lib/omp/session/delete.server.ts +12 -0
- package/src/server/lib/omp/session/sidebar-data.harness.test.ts +247 -0
- package/src/server/lib/omp/session/sidebar-data.server.ts +56 -3
- package/src/server/lib/queue/delivery.server.test.ts +4 -2
- package/src/server/lib/queue/payload.test.ts +67 -0
- package/src/server/lib/queue/payload.ts +9 -3
- package/src/server/lib/realtime/signals.server.test.ts +99 -0
- package/src/server/lib/realtime/signals.server.ts +25 -5
- package/src/server/lib/realtime/topics/session-data.server.ts +29 -0
- package/src/server/lib/realtime/topics/session.server.ts +3 -3
- package/src/server/routes/agent/command-resume.test.ts +77 -0
- package/src/server/routes/agent/command.test.ts +243 -2
- package/src/server/routes/agent/command.ts +78 -15
- package/src/server/routes/agent/harness-command.ts +133 -0
- package/src/server/routes/agent/new.ts +63 -1
- package/src/server/routes/chat/rewind.test.ts +147 -0
- package/src/server/routes/chat/rewind.ts +29 -7
- package/src/server/routes/chat/session.test.ts +240 -0
- package/src/server/routes/chat/session.ts +96 -4
- package/src/server/routes/harness/add-provider.test.ts +233 -0
- package/src/server/routes/harness/import-action.ts +272 -0
- package/src/server/routes/harness/import.test.ts +196 -0
- package/src/server/routes/harness/index.ts +13 -0
- package/src/server/routes/harness/root.ts +280 -0
- package/src/server/routes/harness/toggle.test.ts +127 -0
- package/src/server/routes/harness/update.ts +259 -0
- package/src/server/routes/harness/versions.test.ts +148 -0
- package/src/server/routes/harness/versions.ts +105 -0
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/sessions/delete-acp.test.ts +227 -0
- package/src/server/routes/sessions/queue.ts +7 -2
- package/src/server/routes/sessions/routes-queue.test.ts +52 -0
- package/src/server/routes/sessions/routes.test.ts +47 -13
- package/src/server/routes/sessions/session.ts +35 -0
- package/src/server/routes/settings/commands-harness.test.ts +92 -0
- package/src/server/routes/settings/commands.ts +26 -0
- package/src/server/routes/settings/model-override.ts +5 -2
- package/src/server/routes/settings/provider-entry.ts +2 -2
- package/src/server/routes/settings/provider-model.ts +2 -2
- package/src/server/routes/settings/provider-models.ts +2 -2
- package/src/server/routes/settings/provider-refresh.ts +6 -4
- package/src/server/routes/settings/providers.ts +3 -1
- package/src/server/routes/settings/settings-config-routes.test.ts +10 -2
- package/src/server/routes/settings/skills.ts +12 -0
- package/src/shared/lib/chat/ask-form/fields.ts +76 -0
- package/src/shared/lib/chat/ask-form/index.ts +323 -0
- package/src/shared/lib/chat/ask-form/tokens.ts +199 -0
- package/src/shared/lib/chat/ask-form/types.ts +43 -0
- package/src/shared/lib/chat/ask-form.test.ts +137 -0
- package/src/shared/lib/chat/ask-questions.test.ts +65 -1
- package/src/shared/lib/chat/ask-questions.ts +51 -145
- package/src/shared/lib/chat/ask-results.ts +198 -0
- package/src/shared/lib/chat/composer/client.ts +20 -8
- package/src/shared/lib/chat/context/usage.test.ts +8 -4
- package/src/shared/lib/chat/context/usage.ts +17 -3
- package/src/shared/lib/chat/omp/abort.test.ts +61 -0
- package/src/shared/lib/chat/omp/abort.ts +8 -2
- package/src/shared/lib/chat/omp/tool-frames.test.ts +23 -0
- package/src/shared/lib/chat/omp/tool-frames.ts +12 -2
- package/src/shared/lib/chat/timeline/omp-callbacks.ts +13 -1
- package/src/shared/lib/chat/timeline/prompt-error.test.ts +146 -0
- package/src/shared/lib/chat/timeline/prompt-error.ts +88 -0
- package/src/shared/lib/chat/tool/summary-wait.test.ts +18 -8
- package/src/shared/lib/chat/tool/wait-facts.ts +14 -8
- package/src/shared/lib/harness/brand-color.test.ts +66 -0
- package/src/shared/lib/harness/brand-color.ts +96 -0
- package/src/shared/lib/harness/catalog.test.ts +88 -0
- package/src/shared/lib/harness/catalog.ts +169 -0
- package/src/shared/lib/harness/config-fields.test.ts +139 -0
- package/src/shared/lib/harness/config-fields.ts +168 -0
- package/src/shared/lib/harness/config.test.ts +153 -0
- package/src/shared/lib/harness/config.ts +206 -0
- package/src/shared/lib/harness/dialects.test.ts +140 -0
- package/src/shared/lib/harness/dialects.ts +249 -0
- package/src/shared/lib/harness/enabled.test.ts +79 -0
- package/src/shared/lib/harness/enabled.ts +72 -0
- package/src/shared/lib/harness/menu.test.ts +94 -0
- package/src/shared/lib/harness/menu.ts +88 -0
- package/src/shared/lib/harness/provider-facts.test.ts +199 -0
- package/src/shared/lib/harness/provider-facts.ts +349 -0
- package/src/shared/lib/harness/provider-slug.ts +46 -0
- package/src/shared/lib/harness/providers.ts +175 -0
- package/src/shared/lib/harness/rewind.ts +24 -0
- package/src/shared/lib/harness/status.test.ts +158 -0
- package/src/shared/lib/harness/status.ts +112 -0
- package/src/shared/lib/harness/update-plan.test.ts +163 -0
- package/src/shared/lib/harness/update-plan.ts +140 -0
- package/src/shared/lib/harness/updates.test.ts +106 -0
- package/src/shared/lib/harness/updates.ts +177 -0
- package/src/shared/lib/icons/icon-paint-authority.test.ts +16 -4
- package/src/shared/lib/icons/icon-paint-authority.ts +57 -12
- package/src/shared/lib/icons/icon-paint-bucket.test.ts +84 -0
- package/src/shared/lib/icons/icon-paint-css.test.ts +23 -25
- package/src/shared/lib/icons/icon-paint-css.ts +69 -55
- package/src/shared/lib/icons/icon-paint-harness.test.ts +73 -0
- package/src/shared/lib/icons/icon-paint-harness.ts +75 -0
- package/src/shared/lib/icons/icon-paint-ink.ts +108 -0
- package/src/shared/lib/icons/icon-paint-panel.ts +19 -4
- package/src/shared/lib/icons/icon-paint-weight.ts +21 -2
- package/src/shared/lib/icons/icon-tone.ts +118 -21
- package/src/shared/lib/icons/tint-hues.generated.ts +100 -284
- package/src/shared/lib/icons/tint-tones.test.ts +79 -25
- package/src/shared/lib/icons/tint.ts +66 -6
- package/src/shared/lib/models/client.ts +10 -1
- package/src/shared/lib/models/provider/vendors.ts +72 -0
- package/src/shared/lib/omp/config/schema.test.ts +36 -0
- package/src/shared/lib/omp/dialog-methods.ts +4 -3
- package/src/shared/lib/omp/session/messages-map-trace.test.ts +42 -0
- package/src/shared/lib/omp/session/messages-map.ts +6 -1
- package/src/shared/lib/omp/session/parse-message-blocks-toolcall.test.ts +8 -0
- package/src/shared/lib/omp/session/parse-message-blocks.ts +6 -1
- package/src/shared/lib/omp/session/shell-trace.test.ts +69 -0
- package/src/shared/lib/omp/session/shell-trace.ts +63 -0
- package/src/shared/lib/omp/session/sidebar.ts +37 -10
- package/src/shared/lib/omp/session/wait-idle.test.ts +47 -0
- package/src/shared/lib/omp/session/wait-idle.ts +93 -0
- package/src/shared/lib/omp/session/wait.test.ts +34 -33
- package/src/shared/lib/omp/session/wait.ts +25 -39
- package/src/shared/lib/settings/sections.ts +24 -0
- package/src/shared/lib/theme/css.ts +2 -0
- package/src/shared/lib/theme/ink-scale.ts +21 -1
- package/src/shared/lib/theme/theme.test.ts +25 -9
- package/src/shared/lib/ui/safe-area.test.ts +28 -0
- package/src/shared/lib/ui/safe-area.ts +42 -0
- package/src/shared/lib/ui/toast-duration.test.ts +74 -0
- package/src/shared/lib/ui/toast-duration.ts +70 -0
- package/src/shared/types/harness-version.ts +59 -0
- package/src/shared/types/harness.ts +201 -0
- package/src/shared/types/index.ts +2 -0
- package/src/shared/types/omp/agent.ts +13 -0
- package/src/shared/types/settings/state.ts +10 -1
- package/src/shared/types/workspace.ts +10 -0
- package/src/test-support/env.ts +38 -0
- package/src/test-support/file-explorer-render.test-util.ts +37 -0
- package/src/test-support/file-explorer.test-util.ts +20 -18
- package/src/test-support/harness-table.test-util.ts +108 -0
- package/dist/client/static/js/index-7ppta1pb.css +0 -1
|
@@ -154,3 +154,44 @@ describe('GeneratingIndicator long-phrase layout', () => {
|
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
});
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The mark: a nine-hue ring spun behind the ink badge.
|
|
160
|
+
*
|
|
161
|
+
* The ring was replaced by a bare ink badge because chroma is reserved for
|
|
162
|
+
* state, and that replacement shipped with no motion at all — its own comment
|
|
163
|
+
* promised `animate-pulse`, but the class was never applied, so a busy row
|
|
164
|
+
* looked exactly like a settled one. Restoring it must keep two properties the
|
|
165
|
+
* first version got wrong: the gradient is declared ONCE in the stylesheet (a
|
|
166
|
+
* component-level style block re-declared it on every render of every
|
|
167
|
+
* indicator in the transcript), and the spin is the shared `.animate-spin` so
|
|
168
|
+
* the reduced-motion rule can slow it instead of freezing an indicator that
|
|
169
|
+
* then looks stuck.
|
|
170
|
+
*/
|
|
171
|
+
describe('GeneratingIndicator mark', () => {
|
|
172
|
+
test('the ring is rendered behind the badge and spins', async () => {
|
|
173
|
+
const el = await mount({ modelName: 'DeepSeek V4 Flash' });
|
|
174
|
+
const ring = el.querySelector('.generating-mark-ring');
|
|
175
|
+
expect(ring, 'no generating mark ring').not.toBeNull();
|
|
176
|
+
expect(ring!.className).toContain('animate-spin');
|
|
177
|
+
// Decorative: the badge beside it carries the meaning.
|
|
178
|
+
expect(ring!.getAttribute('aria-hidden')).toBe('true');
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
test('the gradient is declared in the stylesheet, not inline in the component', async () => {
|
|
182
|
+
const css = await Bun.file(new URL('../../../tailwind.css', import.meta.url)).text();
|
|
183
|
+
const rule = css.slice(css.indexOf('.generating-mark-ring {'));
|
|
184
|
+
const body = rule.slice(0, rule.indexOf('\n}'));
|
|
185
|
+
expect(body).toContain('conic-gradient');
|
|
186
|
+
// Nine stops, all nine hues: a two-stop gradient is not the mark.
|
|
187
|
+
expect((body.match(/#[0-9a-fA-F]{6}/g) ?? []).length).toBe(9);
|
|
188
|
+
|
|
189
|
+
// The component must not carry a hex or an inline `<style>` of its own —
|
|
190
|
+
// the reason the first version was removed is not the colour, it is where
|
|
191
|
+
// the colour was written.
|
|
192
|
+
const source = await Bun.file(new URL('./GeneratingIndicator.tsx', import.meta.url)).text();
|
|
193
|
+
expect(source).not.toContain('conic-gradient');
|
|
194
|
+
expect(source).not.toMatch(/#[0-9a-fA-F]{6}\b/);
|
|
195
|
+
expect(source).not.toContain('<style>');
|
|
196
|
+
});
|
|
197
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from 'preact/hooks';
|
|
2
|
-
import {
|
|
2
|
+
import { RunMark } from '@/client/components/workspace/chat-timeline/RunMark';
|
|
3
3
|
import { providerLabel } from '@/shared/lib/models/provider/label';
|
|
4
4
|
|
|
5
5
|
interface GeneratingIndicatorProps {
|
|
@@ -7,6 +7,14 @@ interface GeneratingIndicatorProps {
|
|
|
7
7
|
generatingVerb?: string;
|
|
8
8
|
provider?: string;
|
|
9
9
|
providerNames?: Record<string, string>;
|
|
10
|
+
/**
|
|
11
|
+
* The harness running this turn (`omp-rpc`, `opencode`, `claude`, …). The
|
|
12
|
+
* mark answers "which agent is working", which is the question the row is
|
|
13
|
+
* asked — a generic robot beside an `opencode` session names the wrong thing.
|
|
14
|
+
* Absent or unknown falls back to that robot, so a pre-harness session still
|
|
15
|
+
* draws a mark.
|
|
16
|
+
*/
|
|
17
|
+
harness?: string;
|
|
10
18
|
/**
|
|
11
19
|
* DOM id for the docked row. Two indicators can be mounted at once — the chat
|
|
12
20
|
* run and a side question both streaming — so a second caller must pass its
|
|
@@ -42,7 +50,7 @@ function Dots() {
|
|
|
42
50
|
);
|
|
43
51
|
}
|
|
44
52
|
|
|
45
|
-
export function GeneratingIndicator({ modelName, generatingVerb, provider, providerNames, id = 'generating-docked-indicator' }: GeneratingIndicatorProps) {
|
|
53
|
+
export function GeneratingIndicator({ modelName, generatingVerb, provider, providerNames, harness, id = 'generating-docked-indicator' }: GeneratingIndicatorProps) {
|
|
46
54
|
const [activeVerbIndex, setActiveVerbIndex] = useState(0);
|
|
47
55
|
|
|
48
56
|
// Rotate action verb every 2.8s
|
|
@@ -76,18 +84,15 @@ export function GeneratingIndicator({ modelName, generatingVerb, provider, provi
|
|
|
76
84
|
>
|
|
77
85
|
{/* Left info: the identity mark, then the provider/model and the verb. */}
|
|
78
86
|
<div className="flex items-center space-x-2 min-w-0 flex-1">
|
|
79
|
-
{/* The run's mark
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
`
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
life, and `motion-reduce` parks both. */}
|
|
89
|
-
<div className="relative w-4 h-4 rounded-[3px] bg-ink flex items-center justify-center text-canvas shrink-0">
|
|
90
|
-
<Bot size={10} className="text-canvas" />
|
|
87
|
+
{/* The run's mark: a nine-hue conic ring spun behind the ink badge.
|
|
88
|
+
The gradient itself lives in `tailwind.css` (`.generating-mark-ring`)
|
|
89
|
+
so no hex is written in a component, and the spin is the shared
|
|
90
|
+
`.animate-spin` slowed by the reduced-motion rule rather than a
|
|
91
|
+
per-render JSX style block. The ring is what makes the row read as
|
|
92
|
+
"working" at a glance; the dots are the spelling of it. */}
|
|
93
|
+
<div className="relative w-4 h-4 rounded flex items-center justify-center shrink-0">
|
|
94
|
+
<div aria-hidden="true" className="generating-mark-ring absolute -inset-[1.5px] rounded-[5px] animate-spin" />
|
|
95
|
+
<RunMark harness={harness} size={16} radiusClass="rounded-[3px]" className="relative z-10" />
|
|
91
96
|
</div>
|
|
92
97
|
|
|
93
98
|
{/* Provider & model name with dynamic verb + dots. When neither half is
|
|
@@ -132,4 +132,18 @@ describe('MessageList mounted window', () => {
|
|
|
132
132
|
const el = await mountWindowed(messages, window(0, 2, 0, 500));
|
|
133
133
|
expect(footers(el)).toBe(1);
|
|
134
134
|
});
|
|
135
|
+
|
|
136
|
+
test('an errored answer renders the failure instead of an empty bubble', async () => {
|
|
137
|
+
const el = await mount([
|
|
138
|
+
user('u1'),
|
|
139
|
+
{
|
|
140
|
+
id: 'a1',
|
|
141
|
+
role: 'ai',
|
|
142
|
+
content: '',
|
|
143
|
+
error: { message: 'The agent ended the turn without sending an answer' },
|
|
144
|
+
},
|
|
145
|
+
], false);
|
|
146
|
+
expect(el.textContent).toContain('Request Failed');
|
|
147
|
+
expect(el.textContent).toContain('without sending an answer');
|
|
148
|
+
});
|
|
135
149
|
});
|
|
@@ -21,6 +21,9 @@ export interface MessageListProps {
|
|
|
21
21
|
modelNames?: Record<string, string>;
|
|
22
22
|
/** Session thinking level shown in the AI footer. */
|
|
23
23
|
thinkingLevel?: string;
|
|
24
|
+
/** The harness that produced these runs (`omp-rpc`, `opencode`, …), so each
|
|
25
|
+
* run footer names the agent that wrote it instead of always omp's robot. */
|
|
26
|
+
harness?: string;
|
|
24
27
|
onUndo?: (id: string, content?: string) => void;
|
|
25
28
|
onRetry?: (id: string) => void;
|
|
26
29
|
/** Seeds a new chat from a row. A user row also hands over its attachments. */
|
|
@@ -64,6 +67,7 @@ export const MessageList = memo(function MessageList({
|
|
|
64
67
|
modelName,
|
|
65
68
|
modelNames,
|
|
66
69
|
thinkingLevel,
|
|
70
|
+
harness,
|
|
67
71
|
onUndo,
|
|
68
72
|
onRetry,
|
|
69
73
|
onNewChat,
|
|
@@ -148,6 +152,7 @@ export const MessageList = memo(function MessageList({
|
|
|
148
152
|
modelName={modelName}
|
|
149
153
|
modelNames={modelNames}
|
|
150
154
|
thinkingLevel={thinkingLevel}
|
|
155
|
+
{...(harness ? { harness } : {})}
|
|
151
156
|
durationMs={inlineFooter.durationMs}
|
|
152
157
|
answerText={inlineFooter.answerText}
|
|
153
158
|
retryTargetId={inlineFooter.runUserId}
|
|
@@ -169,6 +174,7 @@ export const MessageList = memo(function MessageList({
|
|
|
169
174
|
modelName={modelName}
|
|
170
175
|
modelNames={modelNames}
|
|
171
176
|
thinkingLevel={thinkingLevel}
|
|
177
|
+
{...(harness ? { harness } : {})}
|
|
172
178
|
durationMs={trailingFooter.durationMs}
|
|
173
179
|
answerText={trailingFooter.answerText}
|
|
174
180
|
retryTargetId={trailingFooter.runUserId}
|
|
@@ -64,6 +64,17 @@ export interface PendingChatViewProps {
|
|
|
64
64
|
spawnTarget?: SpawnTarget | null;
|
|
65
65
|
onSpawnTargetChange?: (next: SpawnTarget | null) => void;
|
|
66
66
|
onWorktreeReport?: (message: string) => void;
|
|
67
|
+
/**
|
|
68
|
+
* The harness this chat will spawn on, and the pick that writes it.
|
|
69
|
+
*
|
|
70
|
+
* This branch had neither, which is why a harness chosen in the model
|
|
71
|
+
* dropdown's tab strip never reached the spawn: the picker changed its own
|
|
72
|
+
* view and the server fell back to `omp-rpc`.
|
|
73
|
+
*/
|
|
74
|
+
harness?: string;
|
|
75
|
+
/** False once the prompt was dispatched: the harness already rode the spawn. */
|
|
76
|
+
harnessEditable?: boolean;
|
|
77
|
+
onSelectHarness?: (harness: string) => void;
|
|
67
78
|
}
|
|
68
79
|
|
|
69
80
|
export function PendingChatView(props: PendingChatViewProps) {
|
|
@@ -109,6 +120,9 @@ export function PendingChatView(props: PendingChatViewProps) {
|
|
|
109
120
|
spawnTarget={props.spawnTarget}
|
|
110
121
|
onSpawnTargetChange={props.onSpawnTargetChange}
|
|
111
122
|
onWorktreeReport={props.onWorktreeReport}
|
|
123
|
+
{...(props.harness ? { harness: props.harness } : {})}
|
|
124
|
+
harnessEditable={props.harnessEditable}
|
|
125
|
+
onSelectHarness={props.onSelectHarness}
|
|
112
126
|
/>
|
|
113
127
|
);
|
|
114
128
|
}
|
|
@@ -14,6 +14,8 @@ interface RunFooterProps {
|
|
|
14
14
|
modelNames?: Record<string, string>;
|
|
15
15
|
/** Session thinking level, used when the turn recorded none. */
|
|
16
16
|
thinkingLevel?: string;
|
|
17
|
+
/** The harness that produced this run (`omp-rpc`, `opencode`, …). */
|
|
18
|
+
harness?: string;
|
|
17
19
|
durationMs?: number | null;
|
|
18
20
|
/**
|
|
19
21
|
* The run's whole answer (`RunFooterSlot.answerText`) — what Copy and
|
|
@@ -52,6 +54,7 @@ export function RunFooter({
|
|
|
52
54
|
modelName,
|
|
53
55
|
modelNames,
|
|
54
56
|
thinkingLevel,
|
|
57
|
+
harness,
|
|
55
58
|
durationMs,
|
|
56
59
|
answerText,
|
|
57
60
|
retryTargetId,
|
|
@@ -67,6 +70,7 @@ export function RunFooter({
|
|
|
67
70
|
providerNames={providerNames}
|
|
68
71
|
currentModel={(msg.model ? (modelNames?.[msg.model] ?? msg.model) : '') || modelName || ''}
|
|
69
72
|
thinkingLevel={msg.thinkingLevel ?? thinkingLevel}
|
|
73
|
+
harness={harness}
|
|
70
74
|
dateStr={formatMessageStamp(msg)}
|
|
71
75
|
durationMs={durationMs ?? msg.durationMs}
|
|
72
76
|
usage={msg.usage}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The badge that names WHICH agent produced a run.
|
|
8
|
+
*
|
|
9
|
+
* Two surfaces draw it — the docked generating indicator and a run's answer
|
|
10
|
+
* footer — and both used to hardcode `lucide`'s `Bot`. That is the wrong claim
|
|
11
|
+
* once a chat can run on any harness: an `opencode` session announced itself
|
|
12
|
+
* with a robot, so the one place the app says "which agent is working" named
|
|
13
|
+
* omp for every agent. One component, so the two surfaces cannot disagree
|
|
14
|
+
* about the mark, its size, or its fallback.
|
|
15
|
+
*
|
|
16
|
+
* The badge is an INVERTED surface (`bg-ink`, so it is dark on a light theme
|
|
17
|
+
* and light on a dark one). The mark therefore paints from `text-canvas`
|
|
18
|
+
* (`inherit`) rather than the glyph's default muted ink, and the colour mode's
|
|
19
|
+
* `.bg-ink svg[data-harness]` rule keeps it on that foreground instead of a
|
|
20
|
+
* brand hue.
|
|
21
|
+
*
|
|
22
|
+
* A harness this build cannot name — an unknown id arriving over the wire, or
|
|
23
|
+
* a session recorded before harnesses were — falls back to `Bot` rather than
|
|
24
|
+
* rendering an empty square.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { Bot } from 'lucide-preact';
|
|
28
|
+
import { HarnessGlyph } from '@/client/components/common/harness-glyph';
|
|
29
|
+
import { harnessDescriptor } from '@/shared/lib/harness/catalog';
|
|
30
|
+
|
|
31
|
+
interface RunMarkProps {
|
|
32
|
+
/** The run's harness id (`omp-rpc`, `opencode`, `claude`, …). */
|
|
33
|
+
harness?: string | null;
|
|
34
|
+
/** Badge edge in px. The mark inside is sized from it. */
|
|
35
|
+
size?: number;
|
|
36
|
+
/** Extra classes for the badge (the indicator's ring needs `relative z-10`). */
|
|
37
|
+
className?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Badge corner radius. The indicator's badge sits inside the spun ring's
|
|
40
|
+
* 5px box, so it is drawn a shade tighter than a footer's `rounded`; a
|
|
41
|
+
* SECOND radius utility in `className` would be resolved by Tailwind's
|
|
42
|
+
* emission order, not by the order they are written, so it is a prop.
|
|
43
|
+
*/
|
|
44
|
+
radiusClass?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function RunMark({ harness, size = 16, className = '', radiusClass = 'rounded' }: RunMarkProps) {
|
|
48
|
+
const markSize = Math.max(8, Math.round(size * 0.625));
|
|
49
|
+
return (
|
|
50
|
+
<div
|
|
51
|
+
className={`w-4 h-4 ${radiusClass} flex items-center justify-center bg-ink text-canvas shadow-2xs shrink-0 ${className}`}
|
|
52
|
+
>
|
|
53
|
+
{harnessDescriptor(harness)
|
|
54
|
+
? <HarnessGlyph harness={harness} size={markSize} inherit />
|
|
55
|
+
: <Bot size={markSize} />}
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -19,6 +19,8 @@ interface SubagentViewProps {
|
|
|
19
19
|
onBack: () => void;
|
|
20
20
|
provider?: string;
|
|
21
21
|
providerNames?: Record<string, string>;
|
|
22
|
+
/** Harness that owns the parent chat: a subagent runs on its parent's agent. */
|
|
23
|
+
harness?: string;
|
|
22
24
|
/** Mobile renders the chat's compact footer variant (three-dot menu). */
|
|
23
25
|
isMobile?: boolean;
|
|
24
26
|
className?: string;
|
|
@@ -33,7 +35,7 @@ const STATUS_LABEL: Record<SubagentInfo['status'], string> = {
|
|
|
33
35
|
|
|
34
36
|
/** Read-only subagent transcript: compact banner, live-growing message list,
|
|
35
37
|
* and a notice row where the main timeline's composer would be. */
|
|
36
|
-
export function SubagentView({ sessionId, subagent, onBack, provider, providerNames, isMobile = false, className = '' }: SubagentViewProps) {
|
|
38
|
+
export function SubagentView({ sessionId, subagent, onBack, provider, providerNames, harness, isMobile = false, className = '' }: SubagentViewProps) {
|
|
37
39
|
const { messages, isLoading, status, isActive } = useSubagentTranscript(sessionId, subagent, onBack);
|
|
38
40
|
const modelNames = useModelNames();
|
|
39
41
|
const scrollRef = useRef<HTMLDivElement>(null);
|
|
@@ -150,6 +152,7 @@ export function SubagentView({ sessionId, subagent, onBack, provider, providerNa
|
|
|
150
152
|
modelName={modelName}
|
|
151
153
|
modelNames={modelNames}
|
|
152
154
|
thinkingLevel={progress?.resolvedThinkingLevel}
|
|
155
|
+
{...(harness ? { harness } : {})}
|
|
153
156
|
durationMs={footer.durationMs}
|
|
154
157
|
answerText={footer.answerText}
|
|
155
158
|
isMobile={isMobile}
|
|
@@ -30,6 +30,8 @@ interface TimelineBodyProps {
|
|
|
30
30
|
modelName?: string;
|
|
31
31
|
modelNames?: Record<string, string>;
|
|
32
32
|
thinkingLevel?: string;
|
|
33
|
+
/** The harness that produced these runs; names the agent in each run footer. */
|
|
34
|
+
harness?: string;
|
|
33
35
|
onUndo: (id: string, content?: string) => void;
|
|
34
36
|
onRetry: (id: string) => void;
|
|
35
37
|
onNewChat: (content: string, attachments?: Attachment[]) => void;
|
|
@@ -64,6 +66,7 @@ export function TimelineBody({
|
|
|
64
66
|
modelName,
|
|
65
67
|
modelNames,
|
|
66
68
|
thinkingLevel,
|
|
69
|
+
harness,
|
|
67
70
|
onUndo,
|
|
68
71
|
onRetry,
|
|
69
72
|
onNewChat,
|
|
@@ -116,6 +119,7 @@ export function TimelineBody({
|
|
|
116
119
|
modelName={modelName}
|
|
117
120
|
modelNames={modelNames}
|
|
118
121
|
thinkingLevel={thinkingLevel}
|
|
122
|
+
{...(harness ? { harness } : {})}
|
|
119
123
|
onUndo={onUndo}
|
|
120
124
|
onRetry={onRetry}
|
|
121
125
|
onNewChat={onNewChat}
|
|
@@ -54,6 +54,8 @@ export interface ComposerRowsInput {
|
|
|
54
54
|
disabled: boolean;
|
|
55
55
|
appSettings?: Record<string, any>;
|
|
56
56
|
rootPath?: string | null;
|
|
57
|
+
/** The open chat, so `/` asks its own agent for the command list. */
|
|
58
|
+
sessionId?: string | null;
|
|
57
59
|
enablePicker?: boolean;
|
|
58
60
|
placeholder?: string;
|
|
59
61
|
onPaste: (event: ClipboardEvent<HTMLTextAreaElement>) => void;
|
|
@@ -83,6 +85,10 @@ export interface ComposerRowsInput {
|
|
|
83
85
|
voiceListening?: boolean;
|
|
84
86
|
voiceBusy?: boolean;
|
|
85
87
|
onVoiceToggle?: () => void;
|
|
88
|
+
/** Which harness runs this chat, and whether the tab strip may change it. */
|
|
89
|
+
harness?: string;
|
|
90
|
+
harnessEditable?: boolean;
|
|
91
|
+
onSelectHarness?: (harness: string) => void;
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
export function composerRows({
|
|
@@ -131,6 +137,8 @@ export function composerRows({
|
|
|
131
137
|
disabled={input.disabled}
|
|
132
138
|
appSettings={input.appSettings}
|
|
133
139
|
rootPath={input.rootPath}
|
|
140
|
+
sessionId={input.sessionId ?? null}
|
|
141
|
+
{...(input.harness ? { harness: input.harness } : {})}
|
|
134
142
|
enablePicker={input.enablePicker}
|
|
135
143
|
placement={pickerPlacement}
|
|
136
144
|
wrapperClassName={wrapperClass}
|
|
@@ -172,6 +180,9 @@ export function composerRows({
|
|
|
172
180
|
voiceBusy={input.voiceBusy}
|
|
173
181
|
onVoiceToggle={input.onVoiceToggle}
|
|
174
182
|
text={input.value}
|
|
183
|
+
harness={input.harness}
|
|
184
|
+
harnessEditable={input.harnessEditable}
|
|
185
|
+
onSelectHarness={input.onSelectHarness}
|
|
175
186
|
/>
|
|
176
187
|
),
|
|
177
188
|
};
|
|
@@ -59,6 +59,7 @@ function paint(overrides: Partial<ModeTogglesProps> = {}): HTMLElement {
|
|
|
59
59
|
onTogglePlan: () => {},
|
|
60
60
|
onOpenGoal: () => {},
|
|
61
61
|
planAvailable: true,
|
|
62
|
+
goalAvailable: true,
|
|
62
63
|
...overrides,
|
|
63
64
|
};
|
|
64
65
|
if (container) render(null, container);
|
|
@@ -93,6 +94,18 @@ describe('ModeToggles', () => {
|
|
|
93
94
|
expect(el.querySelector('[aria-label="Manage the active goal"]')).not.toBeNull();
|
|
94
95
|
});
|
|
95
96
|
|
|
97
|
+
test('Goal is not offered where the harness cannot express one', () => {
|
|
98
|
+
// A non-omp ACP agent has no `/kabmo-mode` extension and no selector that
|
|
99
|
+
// can carry an objective, so the button's only outcome is a refusal — the
|
|
100
|
+
// shape a control the user cannot use must not have.
|
|
101
|
+
const el = paint({ goalAvailable: false });
|
|
102
|
+
|
|
103
|
+
expect(el.querySelector('[aria-label="Set a goal"]')).toBeNull();
|
|
104
|
+
expect(el.querySelector('[aria-label="Manage the active goal"]')).toBeNull();
|
|
105
|
+
// Plan stays on offer: an agent that publishes a `plan` mode can honour it.
|
|
106
|
+
expect(el.querySelector('[aria-label="Enter plan mode"]')).not.toBeNull();
|
|
107
|
+
});
|
|
108
|
+
|
|
96
109
|
test('the goal button carries the record in its title', () => {
|
|
97
110
|
// The budget figure itself moved to the goal strip above the composer; the
|
|
98
111
|
// button stays the mode control and the way into the modal.
|
|
@@ -46,6 +46,9 @@ export interface ModeTogglesProps {
|
|
|
46
46
|
* enter one mode while the other is active, so offering both would present a
|
|
47
47
|
* button whose only outcome is an error. */
|
|
48
48
|
planAvailable: boolean;
|
|
49
|
+
/** Whether Goal is offered at all: a non-omp ACP agent has no `/kabmo-mode`
|
|
50
|
+
* extension, so the button could only produce a refusal. */
|
|
51
|
+
goalAvailable: boolean;
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
/** omp's own footer shows goal token usage beside the mode indicator; that
|
|
@@ -69,6 +72,7 @@ export function ModeToggles({
|
|
|
69
72
|
onTogglePlan,
|
|
70
73
|
onOpenGoal,
|
|
71
74
|
planAvailable,
|
|
75
|
+
goalAvailable,
|
|
72
76
|
}: ModeTogglesProps) {
|
|
73
77
|
return (
|
|
74
78
|
<div className="flex items-center gap-0.5">
|
|
@@ -89,7 +93,9 @@ export function ModeToggles({
|
|
|
89
93
|
)}
|
|
90
94
|
|
|
91
95
|
{/* An ARMED goal is not a running one: the button names it as waiting,
|
|
92
|
-
so "on" never claims work that has not started.
|
|
96
|
+
so "on" never claims work that has not started. Hidden entirely when
|
|
97
|
+
the harness cannot express a goal — see `goalAvailable`. */}
|
|
98
|
+
{goalAvailable && (
|
|
93
99
|
<button
|
|
94
100
|
type="button"
|
|
95
101
|
onClick={onOpenGoal}
|
|
@@ -103,6 +109,7 @@ export function ModeToggles({
|
|
|
103
109
|
<Target size={12} className={goal ? '' : 'text-ink/60'} />
|
|
104
110
|
<span className="hidden @[420px]:inline">Goal</span>
|
|
105
111
|
</button>
|
|
112
|
+
)}
|
|
106
113
|
</div>
|
|
107
114
|
);
|
|
108
115
|
}
|
|
@@ -72,6 +72,7 @@ const MODES = {
|
|
|
72
72
|
disarmGoal: () => {},
|
|
73
73
|
pending: false,
|
|
74
74
|
planAvailable: true,
|
|
75
|
+
goalAvailable: true,
|
|
75
76
|
error: null,
|
|
76
77
|
clearError: () => {},
|
|
77
78
|
onTogglePlan: () => {},
|
|
@@ -186,7 +187,32 @@ describe('composer toolbar action pair', () => {
|
|
|
186
187
|
const el = await mount({ isGenerating: false, sendDisabled: true });
|
|
187
188
|
const submit = el.querySelector(send) as HTMLButtonElement;
|
|
188
189
|
expect(submit.disabled).toBe(true);
|
|
189
|
-
|
|
190
|
+
// The fill changes through a solved hover TOKEN, so the disabled state has
|
|
191
|
+
// to re-state the resting fill and the 40%: otherwise a barred control
|
|
192
|
+
// would darken on hover like a live one.
|
|
193
|
+
const classes = submit.className.split(/\s+/);
|
|
194
|
+
expect(classes).toContain('disabled:opacity-40');
|
|
195
|
+
expect(classes).toContain('disabled:hover:bg-info-text');
|
|
196
|
+
expect(classes).toContain('disabled:shadow-none');
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
test('paints Stop red and Send blue, so the two ends of a turn differ before the glyph is read', async () => {
|
|
200
|
+
const el = await mount({ isGenerating: true, onStop: () => {} });
|
|
201
|
+
const stop = el.querySelector(stops) as HTMLButtonElement;
|
|
202
|
+
const submit = el.querySelector(send) as HTMLButtonElement;
|
|
203
|
+
// `-text` is the palette's hex SOLVED to 4.5:1 against paper and canvas;
|
|
204
|
+
// the raw `bg-error`/`bg-info` is a chip ground and measures 2.73:1 and
|
|
205
|
+
// 1.94:1 on the worst palettes, so a control the user has to find cannot
|
|
206
|
+
// use it. On the solved fill `text-canvas` reads 4.50:1 minimum — measured
|
|
207
|
+
// over all 63 palettes.
|
|
208
|
+
expect(stop.className.split(/\s+/)).toContain('bg-error-text');
|
|
209
|
+
expect(submit.className.split(/\s+/)).toContain('bg-info-text');
|
|
210
|
+
expect(stop.className.split(/\s+/)).toContain('text-canvas');
|
|
211
|
+
expect(submit.className.split(/\s+/)).toContain('text-canvas');
|
|
212
|
+
// Neither is an outline any more: one geometry, one filled control per
|
|
213
|
+
// action. A leftover border would draw a second edge on a filled box.
|
|
214
|
+
expect(stop.className).not.toContain('border-');
|
|
215
|
+
expect(submit.className).not.toContain('bg-ink');
|
|
190
216
|
});
|
|
191
217
|
});
|
|
192
218
|
|
|
@@ -53,6 +53,10 @@ export interface ComposerToolbarProps {
|
|
|
53
53
|
onVoiceToggle?: () => void;
|
|
54
54
|
/** The draft, handed to a plugin `composerAction` at render time. */
|
|
55
55
|
text?: string;
|
|
56
|
+
/** Which harness runs this chat, and whether the tab strip may change it. */
|
|
57
|
+
harness?: string;
|
|
58
|
+
harnessEditable?: boolean;
|
|
59
|
+
onSelectHarness?: (harness: string) => void;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
/**
|
|
@@ -121,6 +125,9 @@ export function ComposerToolbar({
|
|
|
121
125
|
voiceBusy,
|
|
122
126
|
onVoiceToggle,
|
|
123
127
|
text = '',
|
|
128
|
+
harness,
|
|
129
|
+
harnessEditable = true,
|
|
130
|
+
onSelectHarness,
|
|
124
131
|
}: ComposerToolbarProps) {
|
|
125
132
|
const chatInFlight = chatRunning ?? isGenerating;
|
|
126
133
|
const showStop = chatInFlight && (isMobile ? Boolean(onStop) : true);
|
|
@@ -148,6 +155,10 @@ export function ComposerToolbar({
|
|
|
148
155
|
selectedModel={selectedModel ?? undefined}
|
|
149
156
|
onSelectModel={onSelectModel}
|
|
150
157
|
onThinkingLevelChange={onThinkingLevelChange}
|
|
158
|
+
harness={harness}
|
|
159
|
+
harnessEditable={harnessEditable}
|
|
160
|
+
onSelectHarness={onSelectHarness}
|
|
161
|
+
isMobile={isMobile}
|
|
151
162
|
className="min-w-0"
|
|
152
163
|
/>
|
|
153
164
|
)}
|
|
@@ -182,6 +193,7 @@ export function ComposerToolbar({
|
|
|
182
193
|
onTogglePlan={modes.onTogglePlan}
|
|
183
194
|
onOpenGoal={onOpenGoal}
|
|
184
195
|
planAvailable={modes.planAvailable}
|
|
196
|
+
goalAvailable={modes.goalAvailable}
|
|
185
197
|
/>
|
|
186
198
|
</>
|
|
187
199
|
)}
|
|
@@ -205,7 +217,7 @@ export function ComposerToolbar({
|
|
|
205
217
|
voiceBusy
|
|
206
218
|
? 'text-ink/40 cursor-wait'
|
|
207
219
|
: voiceListening
|
|
208
|
-
? 'bg-error text-canvas animate-pulse shadow-xs'
|
|
220
|
+
? 'bg-error-text text-canvas animate-pulse shadow-xs'
|
|
209
221
|
: 'text-ink/50 hover:text-ink hover:bg-ink/10'
|
|
210
222
|
}`}
|
|
211
223
|
title={
|
|
@@ -226,25 +238,30 @@ export function ComposerToolbar({
|
|
|
226
238
|
</button>
|
|
227
239
|
)}
|
|
228
240
|
|
|
229
|
-
{/* Stop is the
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
{/* Stop is the RED half of the pair: a filled signal control, which is
|
|
242
|
+
how the rest of the app draws "end this" (the delete dialogs, the
|
|
243
|
+
batch bar). It used to be an outline with a red tint on hover, and
|
|
244
|
+
the pair then read as one primary and one ghost when the two do
|
|
245
|
+
different things.
|
|
246
|
+
|
|
247
|
+
The fill is `bg-error-text`, NOT `bg-error`: the `-text` token is
|
|
248
|
+
the palette's own red solved until it clears 4.5:1 against paper
|
|
249
|
+
and canvas, so the button is a visible shape on all 63 palettes
|
|
250
|
+
(measured: `bg-error` reaches 2.73:1 against `mono-light`'s paper),
|
|
251
|
+
and a `text-canvas` glyph on it reads 4.50:1 minimum. The raw
|
|
252
|
+
palette hex is chosen for a chip's ground, not for a button the
|
|
253
|
+
user has to find.
|
|
254
|
+
|
|
255
|
+
`shadow-xs` is the same lift the send control carries, so the pair is
|
|
256
|
+
one object; the entrance animation this used to carry was
|
|
257
|
+
`animate-in zoom-in-90`, which no build has ever emitted (no animate
|
|
258
|
+
plugin in the bundle): it was a dead class, and the composer's
|
|
259
|
+
motion is reserved for live state anyway. */}
|
|
243
260
|
{showStop && (
|
|
244
261
|
<button
|
|
245
262
|
type="button"
|
|
246
263
|
onClick={onStop}
|
|
247
|
-
className={`${ACTION_BASE} ${actionSize}
|
|
264
|
+
className={`${ACTION_BASE} ${actionSize} bg-error-text text-canvas shadow-xs hover:bg-error-text-hover`}
|
|
248
265
|
title="Stop generation"
|
|
249
266
|
aria-label="Stop generation"
|
|
250
267
|
>
|
|
@@ -252,17 +269,25 @@ export function ComposerToolbar({
|
|
|
252
269
|
</button>
|
|
253
270
|
)}
|
|
254
271
|
|
|
255
|
-
{/* Send is the
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
the
|
|
259
|
-
|
|
260
|
-
|
|
272
|
+
{/* Send is the BLUE half of the pair, and the one that must stay
|
|
273
|
+
findable at rest: a run is started from here and stopped from the
|
|
274
|
+
red control beside it, so the two states are told apart by hue
|
|
275
|
+
before the glyph is read.
|
|
276
|
+
|
|
277
|
+
`bg-info-text` for the same reason Stop uses `bg-error-text`: it is
|
|
278
|
+
the palette's blue solved to 4.5:1 against paper and canvas, so the
|
|
279
|
+
control is a shape on every palette (`bg-info` reaches 1.94:1 on
|
|
280
|
+
`aura-light`) and its `text-canvas` glyph clears 4.50:1. A
|
|
281
|
+
one-pixel lift on hover and a press-scale are the whole state
|
|
282
|
+
language; the disabled state is the house pair (40% opacity, no
|
|
283
|
+
shadow) rather than a washed-out fill, because a lighter FILL moves
|
|
284
|
+
the glyph off the inverted-surface rule and into the icon mode's own
|
|
285
|
+
hue. */}
|
|
261
286
|
<button
|
|
262
287
|
type="button"
|
|
263
288
|
onClick={onSend}
|
|
264
289
|
disabled={sendDisabled}
|
|
265
|
-
className={`${ACTION_BASE} ${actionSize} bg-
|
|
290
|
+
className={`${ACTION_BASE} ${actionSize} bg-info-text text-canvas shadow-xs hover:bg-info-text-hover hover:shadow-sm disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-info-text`}
|
|
266
291
|
title={chatInFlight ? 'Queue follow-up message' : 'Send message'}
|
|
267
292
|
aria-label={chatInFlight ? 'Queue follow-up message' : 'Send message'}
|
|
268
293
|
>
|