@kabmo-labs/kabmo 0.21.1 → 0.22.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 +7 -2
- package/dist/client/index.html +9 -8
- package/dist/client/index.js +334 -334
- package/dist/client/static/js/{index-thwqf24c.js → index-297dck9a.js} +784 -791
- package/dist/client/static/js/index-7ppta1pb.css +1 -0
- package/extensions/kabmo-modes/commands.ts +17 -3
- package/extensions/kabmo-modes/goal-start.ts +101 -0
- package/extensions/kabmo-modes/goal.test.ts +80 -5
- package/extensions/kabmo-modes/goal.ts +13 -38
- package/extensions/kabmo-modes/prompts.test.ts +12 -0
- package/extensions/kabmo-modes/prompts.ts +9 -2
- package/index.html +8 -7
- package/package.json +2 -2
- package/src/cli/lib/args.js +9 -0
- package/src/cli/lib/args.test.js +26 -0
- package/src/cli/lib/commands/doctor.js +153 -0
- package/src/cli/lib/commands/doctor.test.js +139 -0
- package/src/cli/lib/commands/serve.js +23 -10
- package/src/cli/lib/commands/status.js +22 -3
- package/src/cli/lib/omp-setup.js +131 -0
- package/src/cli/lib/omp-setup.test.js +115 -0
- package/src/cli/main.js +1 -1
- package/src/client/components/common/DemoDataBadge.tsx +52 -0
- package/src/client/components/common/FolderPicker.tsx +2 -2
- package/src/client/components/common/Modal.tsx +15 -1
- package/src/client/components/common/code-surface/blame-panel.ts +1 -1
- package/src/client/components/common/context-usage-button/index.test.tsx +1 -1
- package/src/client/components/common/context-usage-button/index.tsx +4 -4
- package/src/client/components/common/demo-data-badge.test.tsx +58 -0
- package/src/client/components/common/diagram-viewer/index.tsx +2 -2
- package/src/client/components/common/editor-view-buttons/index.tsx +2 -2
- package/src/client/components/common/header-controls/MoreMenu.tsx +1 -1
- package/src/client/components/common/header-controls/index.tsx +4 -1
- package/src/client/components/common/markdown-review/ReviewPopover.tsx +2 -2
- package/src/client/components/common/markdown-review/ReviewSummary.tsx +1 -1
- package/src/client/components/common/panel-mark/index.tsx +2 -1
- package/src/client/components/common/server-control/Panel.tsx +3 -3
- package/src/client/components/common/server-control/index.tsx +1 -1
- package/src/client/components/common/shell-update-button/Modal.tsx +1 -1
- package/src/client/components/common/todo-row/index.tsx +1 -1
- package/src/client/components/layout/ActivityBar.tsx +4 -0
- package/src/client/components/layout/ShellNotice.tsx +33 -0
- package/src/client/components/layout/desktop-layout/index.tsx +14 -16
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +14 -1
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +2 -1
- package/src/client/components/layout/session-sidebar/ClassicView.tsx +5 -1
- package/src/client/components/layout/session-sidebar/SessionList.tsx +1 -1
- package/src/client/components/layout/session-sidebar/SessionListNotice.tsx +56 -0
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +2 -0
- package/src/client/components/layout/session-sidebar/about-modal/UpdateSection.tsx +1 -1
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +12 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +2 -1
- package/src/client/components/layout/session-sidebar/modern/index.tsx +6 -2
- package/src/client/components/layout/session-sidebar/new-workspace-modal/CloneField.tsx +1 -1
- package/src/client/components/layout/session-sidebar/new-workspace-modal/index.tsx +2 -2
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +1 -1
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskList.tsx +3 -3
- package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +1 -1
- package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +150 -0
- package/src/client/components/layout/session-sidebar/variant-props.ts +6 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +20 -30
- package/src/client/components/mobile/MainView.tsx +5 -2
- package/src/client/components/mobile/RightSidebar.tsx +1 -1
- package/src/client/components/mobile/SessionSidebar.tsx +3 -0
- package/src/client/components/mobile/mobile-main-view/Header.tsx +2 -2
- package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +7 -1
- package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +1 -1
- package/src/client/components/settings/Modal.tsx +15 -1
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +1 -1
- package/src/client/components/settings/Sidebar.tsx +2 -2
- package/src/client/components/settings/categories/OmpSettings.tsx +1 -1
- package/src/client/components/settings/categories/TokenUsageSettings.tsx +1 -1
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +3 -3
- package/src/client/components/settings/categories/appearance-settings/EditorFontSection.tsx +1 -1
- package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +5 -5
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +1 -1
- package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.tsx +1 -1
- package/src/client/components/settings/categories/appearance-settings/ThemeCard.tsx +1 -1
- package/src/client/components/settings/categories/chat-settings/ComposerStyleSection.tsx +1 -1
- package/src/client/components/settings/categories/chat-settings/GoalSection.tsx +1 -1
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +2 -2
- package/src/client/components/settings/categories/omp-settings/ConfigTabs.tsx +5 -5
- package/src/client/components/settings/categories/omp-settings/EngineHeader.tsx +3 -3
- package/src/client/components/settings/categories/omp-settings/RoleRow.tsx +2 -2
- package/src/client/components/settings/categories/panel-plugins/LeftDockSettings.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/PluginMark.tsx +4 -3
- package/src/client/components/settings/categories/plugin-settings/SidebarList.tsx +2 -2
- package/src/client/components/settings/categories/project-settings/AddProjectModal.tsx +1 -1
- package/src/client/components/settings/categories/project-settings/NameInput.tsx +1 -1
- package/src/client/components/settings/categories/project-settings/PathField.tsx +1 -1
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +3 -3
- package/src/client/components/settings/categories/provider-settings/AddProviderModal.tsx +1 -1
- package/src/client/components/settings/categories/provider-settings/AuthSection.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +1 -1
- package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +4 -4
- package/src/client/components/settings/categories/provider-settings/EntryModal.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/LoginModal.tsx +1 -1
- package/src/client/components/settings/categories/provider-settings/ModelCapabilitiesModal.tsx +1 -1
- package/src/client/components/settings/categories/provider-settings/ModelsList.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/PriceFields.tsx +1 -1
- package/src/client/components/settings/categories/token-usage-settings/Breakdown.tsx +4 -4
- package/src/client/components/settings/categories/token-usage-settings/Chart.tsx +2 -2
- package/src/client/components/settings/categories/token-usage-settings/Controls.tsx +1 -1
- package/src/client/components/settings/categories/token-usage-settings/MetricsGrid.tsx +1 -1
- package/src/client/components/settings/categories/usage-settings/KenariCard.tsx +5 -5
- package/src/client/components/workspace/browser-panel/AddressBar.tsx +1 -1
- package/src/client/components/workspace/browser-panel/Screencast.tsx +6 -6
- package/src/client/components/workspace/browser-panel/TabStrip.tsx +1 -1
- package/src/client/components/workspace/browser-panel/index.tsx +1 -1
- package/src/client/components/workspace/browser-toolbar/index.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/AttachmentChips.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +13 -26
- package/src/client/components/workspace/chat-timeline/GoalNotice.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/MinimapShortcuts.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/QueueList.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/SubagentView.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/TaskResultContent.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +4 -4
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ArmedGoalStrip.tsx +71 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +4 -3
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.test.ts +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.test.ts +176 -0
- package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.tsx +70 -81
- package/src/client/components/workspace/chat-timeline/chat-input/GoalSurfaces.tsx +10 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +20 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +13 -7
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +65 -3
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +69 -19
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/chat-input/composer-portal.test.tsx +174 -0
- package/src/client/components/workspace/chat-timeline/chat-input/goal-modal-parts.tsx +80 -0
- package/src/client/components/workspace/chat-timeline/chat-input/modes-props.ts +15 -3
- package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/plan-review/index.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FrameControl.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OrphanAsks.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionBlock.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionCard.tsx +4 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/Header.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/SelectBody.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/hashline-patch/index.tsx +4 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/AstEdit.tsx +6 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +13 -13
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Checkpoint.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ContextNotes.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Debug.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Edit.tsx +9 -9
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Eval.tsx +10 -10
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/FileMatches.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Goal.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/GoalRecord.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Lsp.tsx +6 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ManageSkill.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Memory.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.tsx +15 -15
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Resolve.tsx +4 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SearchFs.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SearchTool.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SecurityScan.tsx +4 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/TaskResult.tsx +7 -7
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Think.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Todo.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.missing.test.ts +4 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +17 -17
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/WebSearch.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/EnvelopeHeader.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ExcerptCode.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackOutput.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/JsonCodeBlock.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/OutputWindow.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolFactChips.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolPanelHeader.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Minimal.tsx +1 -1
- package/src/client/components/workspace/context-panel/RawJsonViewer.tsx +2 -2
- package/src/client/components/workspace/context-panel/StatsGrid.tsx +1 -1
- package/src/client/components/workspace/context-panel/index.tsx +1 -1
- package/src/client/components/workspace/diff-panel/ConflictBanner.tsx +1 -1
- package/src/client/components/workspace/editor/EmptyEditor.tsx +1 -1
- package/src/client/components/workspace/editor/FindWidget.tsx +1 -1
- package/src/client/components/workspace/editor/Tabs.tsx +1 -1
- package/src/client/components/workspace/editor/Toolbar.tsx +1 -1
- package/src/client/components/workspace/file-explorer/OutlineSection.tsx +2 -2
- package/src/client/components/workspace/file-explorer/RowLabel.tsx +1 -1
- package/src/client/components/workspace/file-explorer/index.tsx +1 -1
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +2 -2
- package/src/client/components/workspace/git-panel/ChangesList.tsx +3 -3
- package/src/client/components/workspace/git-panel/ConflictItem.tsx +3 -3
- package/src/client/components/workspace/git-panel/FileItem.tsx +2 -2
- package/src/client/components/workspace/git-panel/StashSection.tsx +5 -5
- package/src/client/components/workspace/git-panel/TreeItem.tsx +2 -2
- package/src/client/components/workspace/git-panel/branch-modal/BranchRow.tsx +4 -4
- package/src/client/components/workspace/git-panel/branch-modal/DeleteDialog.tsx +2 -2
- package/src/client/components/workspace/git-panel/index.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/Item.tsx +3 -3
- package/src/client/components/workspace/model-dropdown/Section.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/index.tsx +3 -3
- package/src/client/components/workspace/plan-panel/index.tsx +2 -2
- package/src/client/components/workspace/repo-picker/Modal.tsx +1 -1
- package/src/client/components/workspace/repo-picker/Row.tsx +6 -6
- package/src/client/components/workspace/search-panel/Body.tsx +2 -2
- package/src/client/components/workspace/search-panel/Results.tsx +1 -1
- package/src/client/components/workspace/search-panel/index.tsx +1 -1
- package/src/client/components/workspace/terminal-panel/index.tsx +1 -1
- package/src/client/components/workspace/todo-panel/PhaseGroup.tsx +1 -1
- package/src/client/components/workspace/todo-panel/index.tsx +2 -2
- package/src/client/components/workspace/user-browser-panel/AddressBar.tsx +5 -5
- package/src/client/components/workspace/user-browser-panel/AnnotateBar.test.tsx +13 -13
- package/src/client/components/workspace/user-browser-panel/AnnotateBar.tsx +4 -4
- package/src/client/components/workspace/user-browser-panel/AnnotateLayer.tsx +1 -1
- package/src/client/components/workspace/user-browser-panel/AnnotateTarget.tsx +7 -7
- package/src/client/components/workspace/user-browser-panel/Frame.tsx +1 -1
- package/src/client/components/workspace/wiki-panel/Nav.tsx +1 -1
- package/src/client/components/workspace/wiki-panel/index.tsx +2 -2
- package/src/client/glass.css +50 -0
- package/src/client/glass.test.ts +68 -24
- package/src/client/hooks/chat/composer/browser-context.test.ts +6 -6
- package/src/client/hooks/chat/composer/use-draft.test.ts +2 -2
- package/src/client/hooks/chat/omp/prompt-send.test.ts +36 -0
- package/src/client/hooks/chat/omp/prompt-send.ts +24 -18
- package/src/client/hooks/chat/omp/session-list.tsx +24 -70
- package/src/client/hooks/chat/omp/session-merges.ts +89 -0
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +4 -1
- package/src/client/hooks/chat/timeline/armed-goal-send.test.ts +168 -0
- package/src/client/hooks/chat/timeline/armed-goal.test.ts +178 -0
- package/src/client/hooks/chat/timeline/goal-command.ts +57 -27
- package/src/client/hooks/chat/timeline/index.ts +7 -4
- package/src/client/hooks/chat/timeline/mode-post.ts +46 -0
- package/src/client/hooks/chat/timeline/modes-contract.ts +94 -0
- package/src/client/hooks/chat/timeline/modes.ts +60 -95
- package/src/client/hooks/chat/timeline/send-props.ts +97 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +6 -0
- package/src/client/hooks/chat/timeline/send.test-util.ts +55 -8
- package/src/client/hooks/chat/timeline/send.test.ts +17 -1
- package/src/client/hooks/chat/timeline/send.ts +64 -72
- package/src/client/hooks/ui/dialog-behaviour.ts +143 -0
- package/src/client/hooks/ui/theme.ts +17 -0
- package/src/client/hooks/workspace/copy-tab-path.ts +23 -0
- package/src/client/hooks/workspace/mobile-back.ts +71 -0
- package/src/client/palette-class.test.ts +93 -0
- package/src/client/tailwind-contrast.test.ts +194 -0
- package/src/client/tailwind.css +327 -8
- package/src/server/lib/assets/theme-shell.server.ts +4 -10
- package/src/server/lib/omp/config/provider-seeds.test.ts +39 -1
- package/src/server/lib/omp/config/provider-seeds.ts +32 -3
- package/src/server/lib/omp/config/provider-vision-compat.test.ts +140 -0
- package/src/server/lib/omp/core/host-resolution.test.ts +1 -55
- package/src/server/lib/omp/core/install-hint.test.ts +48 -0
- package/src/server/lib/omp/core/install-hint.ts +64 -0
- package/src/server/lib/omp/core/startup.test.ts +125 -0
- package/src/server/lib/omp/core/startup.ts +5 -1
- package/src/server/lib/omp/mode/request.ts +14 -6
- package/src/server/plugins/ssr.ts +2 -1
- package/src/shared/lib/browser/annotate.test.ts +22 -22
- package/src/shared/lib/browser/annotate.ts +14 -14
- package/src/shared/lib/browser/page-context.ts +6 -6
- package/src/shared/lib/icons/icon-paint-authority.test.ts +86 -0
- package/src/shared/lib/icons/icon-paint-authority.ts +94 -0
- package/src/shared/lib/icons/icon-paint-css.test.ts +44 -8
- package/src/shared/lib/icons/icon-paint-css.ts +18 -1
- package/src/shared/lib/icons/icon-paint-panel.ts +15 -18
- package/src/shared/lib/icons/icon-paint-weight.ts +20 -1
- package/src/shared/lib/icons/icon-tone.ts +58 -13
- package/src/shared/lib/icons/tint-hues.generated.ts +51 -6
- package/src/shared/lib/icons/tint-tones.test.ts +257 -0
- package/src/shared/lib/icons/tint.test.ts +3 -211
- package/src/shared/lib/icons/tint.ts +23 -25
- package/src/shared/lib/omp/mode/actions.ts +40 -0
- package/src/shared/lib/omp/mode/types.ts +12 -0
- package/src/shared/lib/theme/css.ts +21 -0
- package/src/shared/lib/theme/first-frame.ts +38 -0
- package/src/shared/lib/theme/ink-scale.test.ts +151 -0
- package/src/shared/lib/theme/ink-scale.ts +103 -0
- package/src/shared/lib/theme/shell-palette.test.ts +22 -5
- package/src/shared/lib/theme/shell-palette.ts +9 -4
- package/src/shared/lib/theme/theme.test.ts +28 -3
- package/src/shared/lib/workspace/project-accent.test.ts +33 -1
- package/src/shared/lib/workspace/project-accent.ts +23 -0
- package/src/shared/types/omp/agent.ts +24 -9
- package/dist/client/static/js/index-0721wrkf.css +0 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/** The muted ink ladder, plus the one step that clears AA. */
|
|
2
|
+
|
|
3
|
+
import type { ThemePalette } from '@/shared/types/theme';
|
|
4
|
+
import { mixHex, parseHexColor, relativeLuminance } from '@/shared/lib/theme/color';
|
|
5
|
+
|
|
6
|
+
/** The fifteen steps, lightest first. The number IS the percentage of ink, so
|
|
7
|
+
* `text-ink/40` and `--theme-ink-40` cannot mean different things. */
|
|
8
|
+
export const MUTED_STEPS = [20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90] as const;
|
|
9
|
+
|
|
10
|
+
/** The lightest step that clears AA on the default palette: `/65` at 5.31:1.
|
|
11
|
+
* `/60` is 4.46:1, so the boundary sits where it is needed, not safely above it. */
|
|
12
|
+
export const TEXT_CONTRAST_FLOOR = 65;
|
|
13
|
+
|
|
14
|
+
/** AA for small text. Named so the floor above can be read as a contrast. */
|
|
15
|
+
export const MUTED_CONTRAST_FLOOR = 4.5;
|
|
16
|
+
|
|
17
|
+
/** Step of the mix search: fine enough that the solver lands on the target. */
|
|
18
|
+
const MIX_STEP = 0.005;
|
|
19
|
+
|
|
20
|
+
/** WCAG contrast between two hex colours. */
|
|
21
|
+
export function contrastBetween(a: string, b: string): number {
|
|
22
|
+
const [high, low] = [relativeLuminance(a), relativeLuminance(b)].sort((x, y) => y - x);
|
|
23
|
+
return (high + 0.05) / (low + 0.05);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** The contrast a text colour reaches on the WORSE of the two surfaces. */
|
|
27
|
+
export function worstTextContrast(color: string, palette: ThemePalette): number {
|
|
28
|
+
const worst = Math.min(
|
|
29
|
+
contrastBetween(color, palette.paper),
|
|
30
|
+
contrastBetween(color, palette.canvas),
|
|
31
|
+
);
|
|
32
|
+
return Number.isFinite(worst) ? worst : 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface InkScale {
|
|
36
|
+
/** Full-strength ink: the palette's own `ink`. */
|
|
37
|
+
ink: string;
|
|
38
|
+
/** The fifteen steps, lightest first. Each is the ink at that percentage. */
|
|
39
|
+
ladder: readonly string[];
|
|
40
|
+
/** The lightest step that clears AA on both surfaces; the OS shells read it. */
|
|
41
|
+
muted: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Cached per palette object, so a render pass costs no arithmetic. */
|
|
45
|
+
const cache = new WeakMap<ThemePalette, InkScale>();
|
|
46
|
+
|
|
47
|
+
/** Not `color-mix`: the OS shells cannot read one. Not solved for contrast
|
|
48
|
+
* either — `/20` is a separator at 1.45:1. */
|
|
49
|
+
export function inkScale(palette: ThemePalette): InkScale {
|
|
50
|
+
const cached = cache.get(palette);
|
|
51
|
+
if (cached) return cached;
|
|
52
|
+
|
|
53
|
+
const ladder = MUTED_STEPS.map((step) => mixHex(palette.paper, palette.ink, step / 100));
|
|
54
|
+
|
|
55
|
+
// Nothing below the ink qualifies on `solarized-light` (ink 4.85:1), so that
|
|
56
|
+
// palette's muted level IS its ink rather than a value that only looks legal.
|
|
57
|
+
const muted =
|
|
58
|
+
ladder.find((color) => worstTextContrast(color, palette) >= MUTED_CONTRAST_FLOOR) ??
|
|
59
|
+
palette.ink;
|
|
60
|
+
|
|
61
|
+
const scale: InkScale = { ink: palette.ink, ladder, muted };
|
|
62
|
+
cache.set(palette, scale);
|
|
63
|
+
return scale;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Muted text for an inverted surface. Measured, `text-canvas/60` on `bg-ink`
|
|
67
|
+
* reads 2.91:1 on `solarized-light`, so this is solved rather than alphas. */
|
|
68
|
+
export function onInkTextColor(palette: ThemePalette): string {
|
|
69
|
+
if (!parseHexColor(palette.canvas)) return palette.canvas;
|
|
70
|
+
if (contrastBetween(palette.canvas, palette.ink) >= MUTED_CONTRAST_FLOOR) return palette.canvas;
|
|
71
|
+
for (let ratio = MIX_STEP; ratio <= 1; ratio += MIX_STEP) {
|
|
72
|
+
// Toward WHITE on a light palette and BLACK on a dark one: the text must
|
|
73
|
+
// move AWAY from the ink surface it is painted on.
|
|
74
|
+
const extreme = palette.variant === 'dark' ? '#000000' : '#ffffff';
|
|
75
|
+
const mixed = mixHex(palette.canvas, extreme, ratio);
|
|
76
|
+
if (contrastBetween(mixed, palette.ink) >= MUTED_CONTRAST_FLOOR) return mixed;
|
|
77
|
+
}
|
|
78
|
+
return palette.canvas;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** The five signal slots the UI also prints as words. */
|
|
82
|
+
export type SignalSlot = 'error' | 'success' | 'info' | 'warning' | 'meta';
|
|
83
|
+
|
|
84
|
+
export const SIGNAL_SLOTS: readonly SignalSlot[] = ['error', 'success', 'info', 'warning', 'meta'];
|
|
85
|
+
|
|
86
|
+
/** A signal colour mixed toward the extreme until it reads as TEXT. Measured,
|
|
87
|
+
* `success` is 1.75:1 on `nord-light` — the hex is chosen for a fill, not a word.
|
|
88
|
+
* The fill itself (`bg-error`) keeps the palette colour. */
|
|
89
|
+
export function signalTextColor(palette: ThemePalette, slot: SignalSlot): string {
|
|
90
|
+
const base = palette[slot];
|
|
91
|
+
if (!parseHexColor(base)) return base;
|
|
92
|
+
if (worstTextContrast(base, palette) >= MUTED_CONTRAST_FLOOR) return base;
|
|
93
|
+
|
|
94
|
+
// Toward BLACK on a light palette and WHITE on a dark one: the signal keeps
|
|
95
|
+
// its hue and moves away from its surface, which is what "make this readable
|
|
96
|
+
// without changing what it means" looks like.
|
|
97
|
+
const extreme = palette.variant === 'dark' ? '#ffffff' : '#000000';
|
|
98
|
+
for (let ratio = MIX_STEP; ratio <= 1; ratio += MIX_STEP) {
|
|
99
|
+
const mixed = mixHex(base, extreme, ratio);
|
|
100
|
+
if (worstTextContrast(mixed, palette) >= MUTED_CONTRAST_FLOOR) return mixed;
|
|
101
|
+
}
|
|
102
|
+
return extreme;
|
|
103
|
+
}
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
import { describe, expect, test } from 'bun:test';
|
|
17
17
|
|
|
18
18
|
import { THEMES, resolveTheme } from '@/shared/lib/theme/catalog';
|
|
19
|
-
import { mixHex } from '@/shared/lib/theme/color';
|
|
19
|
+
import { mixHex, relativeLuminance } from '@/shared/lib/theme/color';
|
|
20
|
+
import { MUTED_CONTRAST_FLOOR, inkScale } from '@/shared/lib/theme/ink-scale';
|
|
20
21
|
import { KABMO_PALETTES } from '@/shared/lib/theme/palettes/kabmo';
|
|
21
22
|
import {
|
|
22
23
|
DEFAULT_SHELL_PALETTE,
|
|
@@ -44,16 +45,32 @@ describe('shellPaletteFor', () => {
|
|
|
44
45
|
expect(shellPaletteFor(oneDark).variant).toBe('dark');
|
|
45
46
|
});
|
|
46
47
|
|
|
47
|
-
test('derives the two inks from the SAME
|
|
48
|
+
test('derives the two inks from the SAME values the document declares', () => {
|
|
48
49
|
for (const palette of THEMES) {
|
|
49
50
|
const shell = shellPaletteFor(palette);
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
|
|
51
|
+
// `muted` is the palette's solved secondary text level (`--theme-ink-2`):
|
|
52
|
+
// the shell's status line sits beside the web view's labels, so an alpha
|
|
53
|
+
// that fails AA on a shipped palette would make the sentence vanish there.
|
|
54
|
+
expect(shell.muted, palette.id).toBe(inkScale(palette).muted);
|
|
55
|
+
// `hairline` is a border, not text, and stays the 14% mix.
|
|
53
56
|
expect(shell.hairline, palette.id).toBe(mixHex(palette.canvas, palette.ink, 0.14));
|
|
54
57
|
}
|
|
55
58
|
});
|
|
56
59
|
|
|
60
|
+
test('the muted colour clears AA on every palette the shell can paint', () => {
|
|
61
|
+
for (const palette of THEMES) {
|
|
62
|
+
const shell = shellPaletteFor(palette);
|
|
63
|
+
const contrast = (a: string, b: string): number => {
|
|
64
|
+
const [hi, lo] = [relativeLuminance(a), relativeLuminance(b)].sort((x, y) => y - x);
|
|
65
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
66
|
+
};
|
|
67
|
+
// The secondary level's own floor, capped by the palette's own ink: three
|
|
68
|
+
// palettes cannot reach it and their ink IS the ceiling.
|
|
69
|
+
const target = Math.min(MUTED_CONTRAST_FLOOR, contrast(palette.ink, palette.canvas));
|
|
70
|
+
expect(contrast(shell.muted, palette.canvas), palette.id).toBeGreaterThanOrEqual(target - 0.001);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
57
74
|
test('passes the error colour through unchanged', () => {
|
|
58
75
|
expect(shellPaletteFor(paper).error).toBe(paper.error);
|
|
59
76
|
expect(shellPaletteFor(oneDark).error).toBe(oneDark.error);
|
|
@@ -28,14 +28,15 @@
|
|
|
28
28
|
* the default light palette — which is a double mismatch on a dark theme: wrong
|
|
29
29
|
* shade AND wrong side of the light/dark split.
|
|
30
30
|
*
|
|
31
|
-
* `muted`
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* `muted` is the palette's own solved muted text level
|
|
32
|
+
* (`--theme-ink-muted`, see `ink-scale.ts`), and `hairline` is the same 14% mix
|
|
33
|
+
* the document declares — both derived rather than palette slots.
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
36
|
import type { ThemePalette } from '@/shared/types/theme';
|
|
37
37
|
import { mixHex, parseHexColor, rgbaToHex } from '@/shared/lib/theme/color';
|
|
38
38
|
import { resolveTheme } from '@/shared/lib/theme/catalog';
|
|
39
|
+
import { inkScale } from '@/shared/lib/theme/ink-scale';
|
|
39
40
|
|
|
40
41
|
/** The colours a shell needs, as literal hex — no `color-mix`, no CSS. */
|
|
41
42
|
export interface ShellPalette {
|
|
@@ -75,7 +76,11 @@ export function shellPaletteFor(palette: ThemePalette): ShellPalette {
|
|
|
75
76
|
canvas: hex(palette.canvas),
|
|
76
77
|
paper: hex(palette.paper),
|
|
77
78
|
ink: hex(palette.ink),
|
|
78
|
-
|
|
79
|
+
// The SAME solved secondary level the document paints, not a second alpha:
|
|
80
|
+
// the shell's status line sits beside the web view's labels, and 0.62 alpha
|
|
81
|
+
// is 4.98:1 on `paper` but 2.3:1 on `solarized-light` — a shell sentence
|
|
82
|
+
// that disappears on the palette it was shipped with.
|
|
83
|
+
muted: inkScale(palette).muted,
|
|
79
84
|
hairline: mixHex(palette.canvas, palette.ink, 0.14),
|
|
80
85
|
error: hex(palette.error),
|
|
81
86
|
};
|
|
@@ -28,6 +28,7 @@ import { describe, expect, test } from 'bun:test';
|
|
|
28
28
|
|
|
29
29
|
import { mixHex, parseHexColor, relativeLuminance, rgbaToHex } from '@/shared/lib/theme/color';
|
|
30
30
|
import { THEME_STYLE_ELEMENT_ID, themeStyleSheet } from '@/shared/lib/theme/css';
|
|
31
|
+
import { MUTED_STEPS, inkScale, onInkTextColor, signalTextColor } from '@/shared/lib/theme/ink-scale';
|
|
31
32
|
import { KABMO_PALETTES } from '@/shared/lib/theme/palettes/kabmo';
|
|
32
33
|
import { DARK_PALETTES } from '@/shared/lib/theme/palettes/dark';
|
|
33
34
|
import { DARK_EXTENDED_PALETTES } from '@/shared/lib/theme/palettes/dark-extended';
|
|
@@ -136,11 +137,25 @@ describe('generated stylesheet', () => {
|
|
|
136
137
|
` --theme-paper: ${paper.paper};`,
|
|
137
138
|
` --theme-canvas: ${paper.canvas};`,
|
|
138
139
|
` --theme-ink: ${paper.ink};`,
|
|
140
|
+
// The fifteen solved muted steps, stated per palette because an alpha over
|
|
141
|
+
// the ink cannot clear AA on every one (`ink-scale.ts`). One token per
|
|
142
|
+
// step: bucketing them onto four collapsed the ladder.
|
|
143
|
+
...MUTED_STEPS.map((step, index) => ` --theme-ink-${step}: ${inkScale(paper).ladder[index]};`),
|
|
144
|
+
// Muted text for an inverted surface (`bg-ink`).
|
|
145
|
+
` --theme-on-ink-muted: ${onInkTextColor(paper)};`,
|
|
146
|
+
` --theme-muted: ${inkScale(paper).muted};`,
|
|
139
147
|
` --theme-error: ${paper.error};`,
|
|
140
148
|
` --theme-success: ${paper.success};`,
|
|
141
149
|
` --theme-info: ${paper.info};`,
|
|
142
150
|
` --theme-warning: ${paper.warning};`,
|
|
143
151
|
` --theme-meta: ${paper.meta};`,
|
|
152
|
+
// The same five as readable text (a status word is text, and the palette
|
|
153
|
+
// hex is chosen for a fill — see `signalTextColor`).
|
|
154
|
+
` --theme-error-text: ${signalTextColor(paper, 'error')};`,
|
|
155
|
+
` --theme-success-text: ${signalTextColor(paper, 'success')};`,
|
|
156
|
+
` --theme-info-text: ${signalTextColor(paper, 'info')};`,
|
|
157
|
+
` --theme-warning-text: ${signalTextColor(paper, 'warning')};`,
|
|
158
|
+
` --theme-meta-text: ${signalTextColor(paper, 'meta')};`,
|
|
144
159
|
' --theme-info-hover: color-mix(in srgb, var(--theme-info) 85%, var(--theme-ink));',
|
|
145
160
|
' --theme-warning-hover: color-mix(in srgb, var(--theme-warning) 85%, var(--theme-ink));',
|
|
146
161
|
` color-scheme: ${paper.variant};`,
|
|
@@ -150,10 +165,20 @@ describe('generated stylesheet', () => {
|
|
|
150
165
|
});
|
|
151
166
|
|
|
152
167
|
test('names every slot --theme-* and nothing else', () => {
|
|
153
|
-
const names = [...css.matchAll(/--theme-[a-
|
|
154
|
-
|
|
168
|
+
const names = [...css.matchAll(/--theme-[a-z0-9-]+:/g)].map((match) => match[0]);
|
|
169
|
+
// Eight palette slots, fifteen muted steps, the inverted-surface level, the
|
|
170
|
+
// palette's own AA level (`--theme-muted`), the five solved signal levels,
|
|
171
|
+
// and the two hover mixes.
|
|
172
|
+
expect(new Set(names).size).toBe(32);
|
|
155
173
|
expect(names[0]).toBe('--theme-paper:');
|
|
156
|
-
|
|
174
|
+
// Slot order is the swatch order the appearance cards render.
|
|
175
|
+
expect(names[2]).toBe('--theme-ink:');
|
|
176
|
+
expect(names[3]).toBe('--theme-ink-20:');
|
|
177
|
+
expect(names[17]).toBe('--theme-ink-90:');
|
|
178
|
+
expect(names[18]).toBe('--theme-on-ink-muted:');
|
|
179
|
+
expect(names[19]).toBe('--theme-muted:');
|
|
180
|
+
expect(names[24]).toBe('--theme-meta:');
|
|
181
|
+
expect(names[25]).toBe('--theme-error-text:');
|
|
157
182
|
});
|
|
158
183
|
|
|
159
184
|
test('is cached for the life of the process', () => {
|
|
@@ -18,7 +18,10 @@ import {
|
|
|
18
18
|
PROJECT_ACCENT_OPTIONS,
|
|
19
19
|
isHexAccent,
|
|
20
20
|
normalizeHexAccent,
|
|
21
|
+
projectAccentStyle,
|
|
21
22
|
} from '@/shared/lib/workspace/project-accent';
|
|
23
|
+
import { THEMES } from '@/shared/lib/theme/catalog';
|
|
24
|
+
import { contrastRatio } from '@/shared/lib/theme/legibility';
|
|
22
25
|
|
|
23
26
|
describe('normalizeHexAccent', () => {
|
|
24
27
|
test('expands the short form and lowercases', () => {
|
|
@@ -66,4 +69,33 @@ describe('the palette table', () => {
|
|
|
66
69
|
expect(PROJECT_ACCENT_OPTIONS.filter((option) => option.value === '')).toHaveLength(1);
|
|
67
70
|
expect(PROJECT_ACCENT_OPTIONS[0]?.value).toBe('');
|
|
68
71
|
});
|
|
69
|
-
});
|
|
72
|
+
});
|
|
73
|
+
describe('projectAccentStyle', () => {
|
|
74
|
+
test('no accent contributes no properties', () => {
|
|
75
|
+
expect(projectAccentStyle(null)).toEqual({});
|
|
76
|
+
expect(projectAccentStyle('')).toEqual({});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
test('nine of the ten presets are below the floor as a glyph, so the pair is clamped', () => {
|
|
80
|
+
// Measured: every preset is chosen to look good as a SWATCH, where the hex is
|
|
81
|
+
// its own background. As a GLYPH on paper, `#a3e635` reads 1.15:1 and
|
|
82
|
+
// `#fbbf24` 1.27:1. This is the reason the mark cannot take the raw hex.
|
|
83
|
+
const lights = THEMES.filter((theme) => theme.variant === 'light').map((theme) => theme.paper);
|
|
84
|
+
const dark = THEMES.filter((theme) => theme.variant === 'dark').map((theme) => theme.paper);
|
|
85
|
+
for (const option of PROJECT_ACCENT_OPTIONS) {
|
|
86
|
+
if (!option.value) continue;
|
|
87
|
+
const style = projectAccentStyle(option.value);
|
|
88
|
+
for (const [key, papers] of [['--project-accent', lights], ['--project-accent-dark', dark]] as const) {
|
|
89
|
+
const value = style[key]!;
|
|
90
|
+
expect(value, `${option.label} ${key}`).toMatch(/^#[0-9a-f]{6}$/);
|
|
91
|
+
const worst = Math.min(...papers.map((paper) => contrastRatio(value, paper)));
|
|
92
|
+
expect(worst, `${option.label} ${key} (${value})`).toBeGreaterThanOrEqual(3);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test('a colour already legal on both sides is kept exactly', () => {
|
|
98
|
+
// The clamp is a floor, not a repaint: `#7c3aed` clears light paper as-is.
|
|
99
|
+
expect(projectAccentStyle('#7c3aed')['--project-accent']).toBe('#7c3aed');
|
|
100
|
+
});
|
|
101
|
+
});
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import type { AccentColorOption } from '@/shared/types';
|
|
21
|
+
import { legiblePair } from '@/shared/lib/theme/legibility';
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
The accent the custom picker starts on: a violet that is deliberately NOT one of
|
|
@@ -49,6 +50,28 @@ export function isHexAccent(value: string): boolean {
|
|
|
49
50
|
return normalizeHexAccent(value) === value && value !== '';
|
|
50
51
|
}
|
|
51
52
|
|
|
53
|
+
/**
|
|
54
|
+
* The accent as the two custom properties a markup style needs.
|
|
55
|
+
*
|
|
56
|
+
* The stored hex is what the user picked, and it is drawn as a SWATCH — a dot, a
|
|
57
|
+
* preset circle — where a fill is its own background and any hex is legible. A
|
|
58
|
+
* GLYPH is different: it is painted on paper, and measured over the shipped
|
|
59
|
+
* presets, nine of the ten fall below the 3:1 floor there (`#a3e635` reads
|
|
60
|
+
* 1.15:1 on the darkest light paper, `#fbbf24` 1.27:1). So the mark takes the
|
|
61
|
+
* clamped pair `legiblePair` derives for every other brand colour, and the
|
|
62
|
+
* swatch keeps the exact hex.
|
|
63
|
+
*
|
|
64
|
+
* Returns an empty object for "no accent", so a caller can spread it.
|
|
65
|
+
*/
|
|
66
|
+
export function projectAccentStyle(accent: string | null | undefined): Record<string, string> {
|
|
67
|
+
if (!accent) return {};
|
|
68
|
+
const pair = legiblePair(accent);
|
|
69
|
+
return {
|
|
70
|
+
'--project-accent': pair.light,
|
|
71
|
+
'--project-accent-dark': pair.dark ?? pair.light,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
52
75
|
export const PROJECT_ACCENT_OPTIONS: AccentColorOption[] = [
|
|
53
76
|
{ label: 'None', value: '', bgHex: 'transparent' },
|
|
54
77
|
{ label: 'Sky Blue', value: '#38bdf8', bgHex: '#38bdf8' },
|
|
@@ -122,6 +122,24 @@ export interface PromptDispatchResult {
|
|
|
122
122
|
uncertain?: boolean;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
/** The composer picks a spawn carries. Declared once so the sender, the handle
|
|
126
|
+
* and the tests cannot drift. */
|
|
127
|
+
export interface SpawnOptions {
|
|
128
|
+
model?: { provider: string; modelId: string } | null;
|
|
129
|
+
thinkingLevel?: string | null;
|
|
130
|
+
accessMode?: ApprovalMode;
|
|
131
|
+
/** Plan/goal picks made on a pending view. A brand-new session has no
|
|
132
|
+
* transcript to restore them from, so they ride the spawn environment. */
|
|
133
|
+
modes?: { plan: boolean; goal: boolean } | null;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** What a spawn answers: omp's own session id, and the model the child
|
|
137
|
+
* resolved (which can differ from the one asked for). */
|
|
138
|
+
export interface SpawnedSession {
|
|
139
|
+
sessionId: string;
|
|
140
|
+
model: { provider: string; modelId: string } | null;
|
|
141
|
+
}
|
|
142
|
+
|
|
125
143
|
/** Command surface returned by useOmpAgent — the live omp session handle the
|
|
126
144
|
* chat timeline drives. */
|
|
127
145
|
export interface OmpAgentHandle extends OmpAgentState {
|
|
@@ -136,15 +154,12 @@ export interface OmpAgentHandle extends OmpAgentState {
|
|
|
136
154
|
message: string,
|
|
137
155
|
cwd: string,
|
|
138
156
|
images?: AgentImage[],
|
|
139
|
-
composerOptions?:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
modes?: { plan: boolean; goal: boolean } | null;
|
|
146
|
-
},
|
|
147
|
-
) => Promise<{ sessionId: string; model: { provider: string; modelId: string } | null } | null>;
|
|
157
|
+
composerOptions?: SpawnOptions,
|
|
158
|
+
/** Runs after the id exists and before the prompt is dispatched — where an
|
|
159
|
+
* armed goal is started, so the prompt IS its first turn. Resolves true
|
|
160
|
+
* when it consumed the prompt (an interview renders its own). */
|
|
161
|
+
beforePrompt?: (sessionId: string) => Promise<boolean>,
|
|
162
|
+
) => Promise<SpawnedSession | null>;
|
|
148
163
|
/** Steer the running agent: deliver the message INTO the turn in flight
|
|
149
164
|
* (omp's `steer` RPC). The run continues; the model sees the message inside
|
|
150
165
|
* the same turn and answers it there.
|