@kabmo-labs/kabmo 0.0.0-stage → 0.1.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 +506 -2
- package/bunfig.toml +11 -0
- package/dist/client/index.html +85 -0
- package/dist/client/index.js +1644 -0
- package/dist/client/static/apple-touch-icon-bbhgf3mq.png +0 -0
- package/dist/client/static/icon-192x192-kz5bvz85.png +0 -0
- package/dist/client/static/icon-8h6v1jcy.svg +12 -0
- package/dist/client/static/js/index-enkbbffs.js +5233 -0
- package/dist/client/static/js/index-yn17t04b.css +1 -0
- package/dist/client/static/manifest-42r8wcmg.webmanifest +91 -0
- package/extensions/kabmo-modes/commands.test.ts +209 -0
- package/extensions/kabmo-modes/commands.ts +247 -0
- package/extensions/kabmo-modes/goal.test.ts +239 -0
- package/extensions/kabmo-modes/goal.ts +335 -0
- package/extensions/kabmo-modes/index.ts +272 -0
- package/extensions/kabmo-modes/omp-modules.d.ts +27 -0
- package/extensions/kabmo-modes/parked.test.ts +112 -0
- package/extensions/kabmo-modes/parked.ts +161 -0
- package/extensions/kabmo-modes/plan.test.ts +283 -0
- package/extensions/kabmo-modes/plan.ts +292 -0
- package/extensions/kabmo-modes/prompts.test.ts +70 -0
- package/extensions/kabmo-modes/prompts.ts +167 -0
- package/extensions/kabmo-modes/protocol.test.ts +57 -0
- package/extensions/kabmo-modes/protocol.ts +97 -0
- package/extensions/kabmo-modes/registration.test.ts +26 -0
- package/extensions/kabmo-modes/session.ts +199 -0
- package/index.html +85 -0
- package/marketplace/marketplace.json +25 -0
- package/marketplace/plugins/command-runner/README.md +223 -0
- package/marketplace/plugins/command-runner/icon.svg +18 -0
- package/marketplace/plugins/command-runner/package.json +41 -0
- package/marketplace/plugins/command-runner/src/app.tsx +281 -0
- package/marketplace/plugins/command-runner/src/panel/Custom.test.tsx +324 -0
- package/marketplace/plugins/command-runner/src/panel/CustomForm.tsx +236 -0
- package/marketplace/plugins/command-runner/src/panel/Glyph.tsx +60 -0
- package/marketplace/plugins/command-runner/src/panel/Groups.test.tsx +316 -0
- package/marketplace/plugins/command-runner/src/panel/Groups.tsx +311 -0
- package/marketplace/plugins/command-runner/src/panel/Header.tsx +76 -0
- package/marketplace/plugins/command-runner/src/panel/Output.tsx +109 -0
- package/marketplace/plugins/command-runner/src/panel/Row.test.tsx +278 -0
- package/marketplace/plugins/command-runner/src/panel/Row.tsx +265 -0
- package/marketplace/plugins/command-runner/src/panel/format.ts +29 -0
- package/marketplace/plugins/command-runner/src/panel/index.tsx +165 -0
- package/marketplace/plugins/command-runner/src/panel/use-custom-dialog.ts +147 -0
- package/marketplace/plugins/command-runner/src/protocol.ts +242 -0
- package/marketplace/plugins/command-runner/src/server/custom.test.ts +223 -0
- package/marketplace/plugins/command-runner/src/server/custom.ts +260 -0
- package/marketplace/plugins/command-runner/src/server/detectors/detectors.test.ts +267 -0
- package/marketplace/plugins/command-runner/src/server/detectors/js.ts +38 -0
- package/marketplace/plugins/command-runner/src/server/detectors/jsonc.ts +78 -0
- package/marketplace/plugins/command-runner/src/server/detectors/make.ts +82 -0
- package/marketplace/plugins/command-runner/src/server/detectors/native.ts +153 -0
- package/marketplace/plugins/command-runner/src/server/detectors/python.ts +124 -0
- package/marketplace/plugins/command-runner/src/server/detectors/table.ts +62 -0
- package/marketplace/plugins/command-runner/src/server/detectors/types.ts +147 -0
- package/marketplace/plugins/command-runner/src/server/discovery.test.ts +344 -0
- package/marketplace/plugins/command-runner/src/server/kill.ts +23 -0
- package/marketplace/plugins/command-runner/src/server/package-manager.ts +80 -0
- package/marketplace/plugins/command-runner/src/server/resolve.test.ts +215 -0
- package/marketplace/plugins/command-runner/src/server/resolve.ts +165 -0
- package/marketplace/plugins/command-runner/src/server/ring.ts +74 -0
- package/marketplace/plugins/command-runner/src/server/run-store.ts +226 -0
- package/marketplace/plugins/command-runner/src/server/run-types.ts +57 -0
- package/marketplace/plugins/command-runner/src/server/runner.test.ts +335 -0
- package/marketplace/plugins/command-runner/src/server/runner.ts +179 -0
- package/marketplace/plugins/command-runner/src/server/scan.ts +300 -0
- package/marketplace/plugins/command-runner/src/server/sweeps.test.ts +137 -0
- package/marketplace/plugins/command-runner/src/server.ts +325 -0
- package/marketplace/plugins/command-runner/src/watch.test.ts +235 -0
- package/marketplace/plugins/command-runner/src/watch.ts +97 -0
- package/marketplace/plugins/command-runner/tsconfig.json +16 -0
- package/marketplace/plugins/session-info/README.md +23 -0
- package/marketplace/plugins/session-info/icon.svg +14 -0
- package/marketplace/plugins/session-info/package.json +41 -0
- package/marketplace/plugins/session-info/src/app.test.tsx +172 -0
- package/marketplace/plugins/session-info/src/app.tsx +174 -0
- package/marketplace/plugins/session-info/src/server.ts +118 -0
- package/marketplace/plugins/session-info/src/styles.css +48 -0
- package/marketplace/plugins/session-info/tsconfig.json +22 -0
- package/marketplace/plugins/stats/README.md +99 -0
- package/marketplace/plugins/stats/icon.svg +16 -0
- package/marketplace/plugins/stats/package.json +46 -0
- package/marketplace/plugins/stats/src/ProcessTable.tsx +237 -0
- package/marketplace/plugins/stats/src/RefreshButton.tsx +56 -0
- package/marketplace/plugins/stats/src/Sparkline.tsx +80 -0
- package/marketplace/plugins/stats/src/TotalsBar.test.tsx +139 -0
- package/marketplace/plugins/stats/src/TotalsBar.tsx +96 -0
- package/marketplace/plugins/stats/src/app.test.tsx +228 -0
- package/marketplace/plugins/stats/src/app.tsx +183 -0
- package/marketplace/plugins/stats/src/daemons.ts +157 -0
- package/marketplace/plugins/stats/src/format.test.ts +125 -0
- package/marketplace/plugins/stats/src/format.ts +53 -0
- package/marketplace/plugins/stats/src/groups.test.ts +153 -0
- package/marketplace/plugins/stats/src/groups.ts +204 -0
- package/marketplace/plugins/stats/src/labels.test.ts +188 -0
- package/marketplace/plugins/stats/src/labels.ts +219 -0
- package/marketplace/plugins/stats/src/proc/darwin.ts +268 -0
- package/marketplace/plugins/stats/src/proc/identity.ts +179 -0
- package/marketplace/plugins/stats/src/proc/index.ts +45 -0
- package/marketplace/plugins/stats/src/proc/linux.ts +186 -0
- package/marketplace/plugins/stats/src/proc/ps.ts +121 -0
- package/marketplace/plugins/stats/src/proc/types.ts +78 -0
- package/marketplace/plugins/stats/src/sampler.test.ts +200 -0
- package/marketplace/plugins/stats/src/sampler.ts +281 -0
- package/marketplace/plugins/stats/src/server.ts +252 -0
- package/marketplace/plugins/stats/src/sessions.test.ts +112 -0
- package/marketplace/plugins/stats/src/sessions.ts +189 -0
- package/marketplace/plugins/stats/src/snapshot.ts +121 -0
- package/marketplace/plugins/stats/tsconfig.json +16 -0
- package/package.json +104 -4
- package/public/apple-touch-icon.png +0 -0
- package/public/icon-192x192.png +0 -0
- package/public/icon-512x512.png +0 -0
- package/public/icon-maskable-512x512.png +0 -0
- package/public/icon.svg +12 -0
- package/public/kabmo-wordmark.svg +31 -0
- package/public/manifest.webmanifest +91 -0
- package/public/sw.js +76 -0
- package/src/cli/kabmo.js +5 -0
- package/src/cli/lib/args.js +283 -0
- package/src/cli/lib/args.test.js +76 -0
- package/src/cli/lib/build.js +52 -0
- package/src/cli/lib/commands/logs.js +150 -0
- package/src/cli/lib/commands/plugin.js +285 -0
- package/src/cli/lib/commands/plugin.test.js +125 -0
- package/src/cli/lib/commands/restart.js +94 -0
- package/src/cli/lib/commands/serve.js +278 -0
- package/src/cli/lib/commands/serve.test.js +58 -0
- package/src/cli/lib/commands/status.js +130 -0
- package/src/cli/lib/commands/stop.js +95 -0
- package/src/cli/lib/commands/update.js +147 -0
- package/src/cli/lib/commands/update.test.js +36 -0
- package/src/cli/lib/output.js +143 -0
- package/src/cli/lib/path-utils.js +99 -0
- package/src/cli/lib/path-utils.test.js +184 -0
- package/src/cli/lib/paths.js +40 -0
- package/src/cli/lib/process-lifecycle.js +148 -0
- package/src/cli/lib/process-lifecycle.test.js +156 -0
- package/src/cli/lib/restart-scope.js +93 -0
- package/src/cli/lib/restart-scope.test.js +119 -0
- package/src/cli/lib/runtime.js +279 -0
- package/src/cli/lib/serve-mode.js +20 -0
- package/src/cli/lib/serve-mode.test.js +29 -0
- package/src/cli/lib/stop-instance.js +120 -0
- package/src/cli/lib/stop-instance.test.js +206 -0
- package/src/cli/lib/stop-scope.js +23 -0
- package/src/cli/lib/stop-scope.test.js +41 -0
- package/src/cli/lib/ui-password.js +190 -0
- package/src/cli/main.js +81 -0
- package/src/client/App.tsx +140 -0
- package/src/client/bootstrap.d.ts +33 -0
- package/src/client/components/auth/login-screen/index.test.tsx +93 -0
- package/src/client/components/auth/login-screen/index.tsx +154 -0
- package/src/client/components/auth/login-screen/password-toggle.test.tsx +121 -0
- package/src/client/components/common/ComposerPicker.tsx +141 -0
- package/src/client/components/common/ComposerTextarea.tsx +178 -0
- package/src/client/components/common/CopyButton.tsx +97 -0
- package/src/client/components/common/FolderPicker.tsx +254 -0
- package/src/client/components/common/MarkdownRenderer.tsx +299 -0
- package/src/client/components/common/Modal.tsx +93 -0
- package/src/client/components/common/PWAInstallButton.tsx +113 -0
- package/src/client/components/common/ReloadPageButton.test.tsx +78 -0
- package/src/client/components/common/ReloadPageButton.tsx +30 -0
- package/src/client/components/common/SignOutButton.test.tsx +141 -0
- package/src/client/components/common/SignOutButton.tsx +94 -0
- package/src/client/components/common/StatCard.tsx +52 -0
- package/src/client/components/common/StreamStatusDot.tsx +27 -0
- package/src/client/components/common/SubagentStatusIcon.tsx +27 -0
- package/src/client/components/common/Toast.tsx +79 -0
- package/src/client/components/common/ToastStack.tsx +18 -0
- package/src/client/components/common/UpdateLog.tsx +55 -0
- package/src/client/components/common/ViewportSelector.tsx +206 -0
- package/src/client/components/common/batch-selection/BatchActionBar.test.ts +132 -0
- package/src/client/components/common/batch-selection/BatchActionBar.tsx +118 -0
- package/src/client/components/common/batch-selection/BatchDeleteModal.tsx +177 -0
- package/src/client/components/common/batch-selection/SelectionCheckbox.tsx +58 -0
- package/src/client/components/common/batch-selection/folder-state.test.ts +130 -0
- package/src/client/components/common/batch-selection/folder-state.ts +101 -0
- package/src/client/components/common/batch-selection/types.ts +42 -0
- package/src/client/components/common/brand-wordmark/Mark.tsx +62 -0
- package/src/client/components/common/brand-wordmark/index.test.tsx +115 -0
- package/src/client/components/common/brand-wordmark/index.tsx +57 -0
- package/src/client/components/common/brand-wordmark/wordmark-svg.test.ts +88 -0
- package/src/client/components/common/code-editor/handler.test.ts +274 -0
- package/src/client/components/common/code-editor/handler.ts +175 -0
- package/src/client/components/common/code-editor/index.tsx +314 -0
- package/src/client/components/common/code-surface/index.tsx +348 -0
- package/src/client/components/common/code-surface/measure.ts +148 -0
- package/src/client/components/common/context-usage-button/Ring.tsx +73 -0
- package/src/client/components/common/context-usage-button/index.test.tsx +197 -0
- package/src/client/components/common/context-usage-button/index.tsx +159 -0
- package/src/client/components/common/diagram-viewer/index.tsx +258 -0
- package/src/client/components/common/diagram-viewer/read-block.ts +53 -0
- package/src/client/components/common/file-icon/brand-paths.ts +62 -0
- package/src/client/components/common/file-icon/index.tsx +166 -0
- package/src/client/components/common/header-controls/index.test.tsx +240 -0
- package/src/client/components/common/header-controls/index.tsx +118 -0
- package/src/client/components/common/header-panel-buttons/index.tsx +176 -0
- package/src/client/components/common/image-viewer/index.tsx +224 -0
- package/src/client/components/common/outline-kind-icon/index.tsx +86 -0
- package/src/client/components/common/provider-icon/glyphs.test.ts +94 -0
- package/src/client/components/common/provider-icon/glyphs.ts +118 -0
- package/src/client/components/common/provider-icon/index.plugin.test.ts +133 -0
- package/src/client/components/common/provider-icon/index.test.ts +107 -0
- package/src/client/components/common/provider-icon/index.tsx +104 -0
- package/src/client/components/common/provider-icon/resolve.test.ts +112 -0
- package/src/client/components/common/provider-icon/resolve.ts +94 -0
- package/src/client/components/common/session-actions-menu/index.tsx +220 -0
- package/src/client/components/common/session-delete-modal/index.tsx +128 -0
- package/src/client/components/common/session-state-provider/index.test.ts +142 -0
- package/src/client/components/common/session-state-provider/index.tsx +60 -0
- package/src/client/components/common/sort-menu/index.tsx +63 -0
- package/src/client/components/common/sort-menu/options.ts +24 -0
- package/src/client/components/common/subagent-list/index.tsx +165 -0
- package/src/client/components/common/todo-row/index.test.ts +91 -0
- package/src/client/components/common/todo-row/index.tsx +92 -0
- package/src/client/components/common/viewport.ts +23 -0
- package/src/client/components/common/workspace-options-menu/index.tsx +113 -0
- package/src/client/components/layout/PanelVisibilityMenu.tsx +114 -0
- package/src/client/components/layout/RightActivityBar.test.ts +272 -0
- package/src/client/components/layout/RightActivityBar.tsx +220 -0
- package/src/client/components/layout/desktop-layout/ResizeHandle.tsx +10 -0
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +167 -0
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +326 -0
- package/src/client/components/layout/desktop-layout/index.tsx +307 -0
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +312 -0
- package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +145 -0
- package/src/client/components/layout/desktop-layout/resizer/separator-drag.ts +140 -0
- package/src/client/components/layout/desktop-layout/resizer/utils.test.ts +33 -0
- package/src/client/components/layout/desktop-layout/resizer/utils.ts +34 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +169 -0
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +297 -0
- package/src/client/components/layout/session-sidebar/Footer.tsx +54 -0
- package/src/client/components/layout/session-sidebar/Header.test.ts +88 -0
- package/src/client/components/layout/session-sidebar/Header.tsx +57 -0
- package/src/client/components/layout/session-sidebar/Modals.tsx +15 -0
- package/src/client/components/layout/session-sidebar/OverflowMenu.test.ts +115 -0
- package/src/client/components/layout/session-sidebar/OverflowMenu.tsx +117 -0
- package/src/client/components/layout/session-sidebar/SessionItem.batch.test.ts +162 -0
- package/src/client/components/layout/session-sidebar/SessionItem.test.ts +106 -0
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +242 -0
- package/src/client/components/layout/session-sidebar/SessionList.tsx +60 -0
- package/src/client/components/layout/session-sidebar/Skeleton.tsx +36 -0
- package/src/client/components/layout/session-sidebar/Toolbar.test.ts +134 -0
- package/src/client/components/layout/session-sidebar/Toolbar.tsx +300 -0
- package/src/client/components/layout/session-sidebar/about-modal/SocialLinks.tsx +59 -0
- package/src/client/components/layout/session-sidebar/about-modal/UpdateSection.tsx +179 -0
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +83 -0
- package/src/client/components/layout/session-sidebar/index.tsx +283 -0
- package/src/client/components/layout/session-sidebar/new-workspace-modal/CloneField.tsx +83 -0
- package/src/client/components/layout/session-sidebar/new-workspace-modal/DirectoryList.tsx +150 -0
- package/src/client/components/layout/session-sidebar/new-workspace-modal/LocationBar.tsx +101 -0
- package/src/client/components/layout/session-sidebar/new-workspace-modal/index.tsx +304 -0
- package/src/client/components/layout/session-sidebar/new-workspace-modal/use-browse.ts +81 -0
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +216 -0
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskList.tsx +217 -0
- package/src/client/components/layout/session-sidebar/scheduler-modal/folders.ts +52 -0
- package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +211 -0
- package/src/client/components/layout/update-popup/Actions.tsx +114 -0
- package/src/client/components/layout/update-popup/ReleaseNotes.tsx +77 -0
- package/src/client/components/layout/update-popup/index.tsx +131 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +269 -0
- package/src/client/components/mobile/MainView.tsx +68 -0
- package/src/client/components/mobile/RightSidebar.tsx +154 -0
- package/src/client/components/mobile/SessionSidebar.tsx +301 -0
- package/src/client/components/mobile/mobile-main-view/Header.tsx +211 -0
- package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +84 -0
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +317 -0
- package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +156 -0
- package/src/client/components/mobile/mobile-right-sidebar/OutlineButton.tsx +100 -0
- package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +90 -0
- package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +69 -0
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +34 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +334 -0
- package/src/client/components/mobile/mobile-session-sidebar/List.tsx +63 -0
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.test.ts +122 -0
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +202 -0
- package/src/client/components/mobile/mobile-session-sidebar/Skeleton.tsx +36 -0
- package/src/client/components/mobile/mobile-session-sidebar/Toolbar.test.ts +135 -0
- package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +248 -0
- package/src/client/components/mobile/open-file-payload.test.ts +71 -0
- package/src/client/components/mobile/open-file-payload.ts +60 -0
- package/src/client/components/settings/LazyModal.tsx +46 -0
- package/src/client/components/settings/LoadingState.tsx +22 -0
- package/src/client/components/settings/Modal.tsx +342 -0
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +148 -0
- package/src/client/components/settings/SettingsSidebarList.tsx +126 -0
- package/src/client/components/settings/Sidebar.test.tsx +118 -0
- package/src/client/components/settings/Sidebar.tsx +172 -0
- package/src/client/components/settings/categories/AgentSettings.tsx +101 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +30 -0
- package/src/client/components/settings/categories/BehaviorSettings.tsx +73 -0
- package/src/client/components/settings/categories/ChatSettings.tsx +30 -0
- package/src/client/components/settings/categories/CommandSettings.tsx +136 -0
- package/src/client/components/settings/categories/McpSettings.tsx +159 -0
- package/src/client/components/settings/categories/NotificationSettings.tsx +97 -0
- package/src/client/components/settings/categories/OmpSettings.tsx +321 -0
- package/src/client/components/settings/categories/OtherSettings.tsx +16 -0
- package/src/client/components/settings/categories/PanelPluginSettings.tsx +25 -0
- package/src/client/components/settings/categories/PluginSettings.tsx +162 -0
- package/src/client/components/settings/categories/ProjectSettings.tsx +195 -0
- package/src/client/components/settings/categories/ProviderSettings.tsx +225 -0
- package/src/client/components/settings/categories/SkillCatalogSettings.tsx +289 -0
- package/src/client/components/settings/categories/SkillSettings.tsx +130 -0
- package/src/client/components/settings/categories/TokenUsageSettings.tsx +264 -0
- package/src/client/components/settings/categories/UsageSettings.tsx +109 -0
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +333 -0
- package/src/client/components/settings/categories/agent-settings/SidebarList.tsx +42 -0
- package/src/client/components/settings/categories/appearance-settings/EditorFontSection.tsx +78 -0
- package/src/client/components/settings/categories/appearance-settings/ThemeCard.tsx +61 -0
- package/src/client/components/settings/categories/appearance-settings/ThemeGrid.tsx +80 -0
- package/src/client/components/settings/categories/behavior-settings/Editor.tsx +244 -0
- package/src/client/components/settings/categories/chat-settings/FollowUpSection.tsx +120 -0
- package/src/client/components/settings/categories/chat-settings/GoalSection.tsx +195 -0
- package/src/client/components/settings/categories/chat-settings/KeybindingsSection.tsx +107 -0
- package/src/client/components/settings/categories/chat-settings/TitleSection.tsx +99 -0
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +298 -0
- package/src/client/components/settings/categories/command-settings/SidebarList.tsx +44 -0
- package/src/client/components/settings/categories/mcp-settings/ConnectionTest.tsx +89 -0
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +311 -0
- package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +161 -0
- package/src/client/components/settings/categories/mcp-settings/SidebarList.tsx +120 -0
- package/src/client/components/settings/categories/omp-settings/ConfigTabs.tsx +254 -0
- package/src/client/components/settings/categories/omp-settings/ExtensionsPanel.tsx +61 -0
- package/src/client/components/settings/categories/omp-settings/RoleEditor.test.ts +94 -0
- package/src/client/components/settings/categories/omp-settings/RoleEditor.tsx +148 -0
- package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +337 -0
- package/src/client/components/settings/categories/panel-plugins/AvailableList.tsx +108 -0
- package/src/client/components/settings/categories/panel-plugins/BuiltinList.tsx +95 -0
- package/src/client/components/settings/categories/panel-plugins/GitFreshness.test.tsx +232 -0
- package/src/client/components/settings/categories/panel-plugins/GitFreshness.tsx +81 -0
- package/src/client/components/settings/categories/panel-plugins/InstallForm.tsx +136 -0
- package/src/client/components/settings/categories/panel-plugins/InstalledList.tsx +221 -0
- package/src/client/components/settings/categories/panel-plugins/PluginMark.test.ts +142 -0
- package/src/client/components/settings/categories/panel-plugins/PluginMark.tsx +114 -0
- package/src/client/components/settings/categories/panel-plugins/ReadmeModal.tsx +87 -0
- package/src/client/components/settings/categories/panel-plugins/Section.tsx +184 -0
- package/src/client/components/settings/categories/panel-plugins/SyncBlockedNotice.tsx +82 -0
- package/src/client/components/settings/categories/panel-plugins/Toolbar.tsx +85 -0
- package/src/client/components/settings/categories/plugin-settings/DetailPane.tsx +285 -0
- package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +303 -0
- package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +209 -0
- package/src/client/components/settings/categories/plugin-settings/SidebarList.tsx +250 -0
- package/src/client/components/settings/categories/plugin-settings/selection.ts +19 -0
- package/src/client/components/settings/categories/project-settings/AccentPalette.tsx +76 -0
- package/src/client/components/settings/categories/project-settings/DetailsForm.tsx +71 -0
- package/src/client/components/settings/categories/project-settings/DetailsHeader.tsx +38 -0
- package/src/client/components/settings/categories/project-settings/IconGrid.tsx +152 -0
- package/src/client/components/settings/categories/project-settings/ModelDropdown.tsx +95 -0
- package/src/client/components/settings/categories/project-settings/NameInput.tsx +26 -0
- package/src/client/components/settings/categories/project-settings/SidebarList.tsx +100 -0
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +322 -0
- package/src/client/components/settings/categories/provider-settings/AddProviderModal.tsx +334 -0
- package/src/client/components/settings/categories/provider-settings/AuthSection.tsx +195 -0
- package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +133 -0
- package/src/client/components/settings/categories/provider-settings/DialectFields.tsx +136 -0
- package/src/client/components/settings/categories/provider-settings/EffortLadder.tsx +89 -0
- package/src/client/components/settings/categories/provider-settings/Header.tsx +22 -0
- package/src/client/components/settings/categories/provider-settings/LoginModal.tsx +224 -0
- package/src/client/components/settings/categories/provider-settings/LogoutProviderModal.tsx +184 -0
- package/src/client/components/settings/categories/provider-settings/ModelCapabilitiesModal.tsx +114 -0
- package/src/client/components/settings/categories/provider-settings/ModelConfigModal.tsx +155 -0
- package/src/client/components/settings/categories/provider-settings/ModelsList.tsx +221 -0
- package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +82 -0
- package/src/client/components/settings/categories/provider-settings/PriceFields.tsx +107 -0
- package/src/client/components/settings/categories/provider-settings/ReconnectModal.tsx +184 -0
- package/src/client/components/settings/categories/provider-settings/SidebarList.plugin.test.ts +93 -0
- package/src/client/components/settings/categories/provider-settings/SidebarList.tsx +133 -0
- package/src/client/components/settings/categories/skill-catalog/AddSourceModal.tsx +133 -0
- package/src/client/components/settings/categories/skill-settings/DetailPane.tsx +309 -0
- package/src/client/components/settings/categories/skill-settings/SidebarList.tsx +170 -0
- package/src/client/components/settings/categories/token-usage-settings/Breakdown.tsx +127 -0
- package/src/client/components/settings/categories/token-usage-settings/Chart.tsx +74 -0
- package/src/client/components/settings/categories/token-usage-settings/MetricsGrid.tsx +44 -0
- package/src/client/components/settings/categories/usage-settings/DeepSeekCard.tsx +66 -0
- package/src/client/components/settings/categories/usage-settings/KenariCard.tsx +68 -0
- package/src/client/components/settings/categories/usage-settings/LimitsSection.tsx +115 -0
- package/src/client/components/settings/categories/usage-settings/ProviderCard.tsx +45 -0
- package/src/client/components/settings/categories/usage-settings/ProviderDetail.tsx +46 -0
- package/src/client/components/settings/categories/usage-settings/QuotaSection.tsx +93 -0
- package/src/client/components/settings/categories/usage-settings/SavedResetsSection.tsx +158 -0
- package/src/client/components/settings/categories/usage-settings/SidebarList.tsx +89 -0
- package/src/client/components/settings/categories/usage-settings/UsageTable.tsx +66 -0
- package/src/client/components/settings/categories/usage-settings/format.ts +99 -0
- package/src/client/components/settings/categories/usage-settings/providers.ts +69 -0
- package/src/client/components/settings/categories/usage-settings/usage-and-picker.test.ts +330 -0
- package/src/client/components/settings/master-detail/index.tsx +68 -0
- package/src/client/components/workspace/browser-panel/ActivityToasts.tsx +46 -0
- package/src/client/components/workspace/browser-panel/AddressBar.tsx +75 -0
- package/src/client/components/workspace/browser-panel/Screencast.tsx +108 -0
- package/src/client/components/workspace/browser-panel/index.tsx +69 -0
- package/src/client/components/workspace/browser-toolbar/ZoomControls.tsx +48 -0
- package/src/client/components/workspace/browser-toolbar/index.tsx +150 -0
- package/src/client/components/workspace/btw-panel/AskCard.tsx +165 -0
- package/src/client/components/workspace/btw-panel/Messages.tsx +154 -0
- package/src/client/components/workspace/btw-panel/TopicMenu.tsx +106 -0
- package/src/client/components/workspace/btw-panel/index.tsx +163 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.plugin.test.ts +105 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +277 -0
- package/src/client/components/workspace/chat-timeline/AttachmentChips.tsx +119 -0
- package/src/client/components/workspace/chat-timeline/ChatOverlays.tsx +108 -0
- package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +167 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +261 -0
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.test.ts +156 -0
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +156 -0
- package/src/client/components/workspace/chat-timeline/GoalNotice.tsx +63 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +289 -0
- package/src/client/components/workspace/chat-timeline/MessageList.test.ts +76 -0
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +117 -0
- package/src/client/components/workspace/chat-timeline/MinimapShortcuts.test.ts +119 -0
- package/src/client/components/workspace/chat-timeline/MinimapShortcuts.tsx +96 -0
- package/src/client/components/workspace/chat-timeline/MobileTurnJump.tsx +104 -0
- package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +124 -0
- package/src/client/components/workspace/chat-timeline/PluginMessageActions.test.ts +102 -0
- package/src/client/components/workspace/chat-timeline/PluginMessageActions.tsx +51 -0
- package/src/client/components/workspace/chat-timeline/QueueList.test.ts +82 -0
- package/src/client/components/workspace/chat-timeline/QueueList.tsx +86 -0
- package/src/client/components/workspace/chat-timeline/RunFooter.tsx +82 -0
- package/src/client/components/workspace/chat-timeline/SessionSkeleton.tsx +89 -0
- package/src/client/components/workspace/chat-timeline/SubagentControls.tsx +93 -0
- package/src/client/components/workspace/chat-timeline/SubagentView.tsx +181 -0
- package/src/client/components/workspace/chat-timeline/SystemNotice.test.ts +175 -0
- package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +296 -0
- package/src/client/components/workspace/chat-timeline/TaskResultContent.tsx +176 -0
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +130 -0
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +135 -0
- package/src/client/components/workspace/chat-timeline/ToolCallCard.plugin.test.ts +111 -0
- package/src/client/components/workspace/chat-timeline/ToolCallCard.tsx +194 -0
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.test.ts +161 -0
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +101 -0
- package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +90 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +53 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +121 -0
- package/src/client/components/workspace/chat-timeline/chat-input/DropOverlay.tsx +17 -0
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.test.ts +180 -0
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +236 -0
- package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.tsx +320 -0
- package/src/client/components/workspace/chat-timeline/chat-input/GoalSurfaces.tsx +67 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +99 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +102 -0
- package/src/client/components/workspace/chat-timeline/chat-input/PluginComposerSlots.test.ts +110 -0
- package/src/client/components/workspace/chat-timeline/chat-input/PluginComposerSlots.tsx +61 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +49 -0
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +155 -0
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +216 -0
- package/src/client/components/workspace/chat-timeline/chat-input/VoiceNotice.tsx +39 -0
- package/src/client/components/workspace/chat-timeline/chat-input/access-levels.ts +14 -0
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.test.ts +86 -0
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.ts +143 -0
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +283 -0
- package/src/client/components/workspace/chat-timeline/chat-input/modes-props.ts +49 -0
- package/src/client/components/workspace/chat-timeline/chat-input/props.ts +100 -0
- package/src/client/components/workspace/chat-timeline/chat-input/selection.ts +57 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +335 -0
- package/src/client/components/workspace/chat-timeline/plan-review/index.tsx +159 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FrameControl.tsx +151 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/GroupedAsk.tsx +232 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.tsx +85 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/PluginPendingInteractions.test.ts +288 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/PluginPendingInteractions.tsx +186 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionBlock.tsx +162 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionCard.tsx +100 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/drafts.ts +113 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.test.ts +139 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.tsx +193 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/Footer.tsx +97 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/Header.tsx +52 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/Lazy.tsx +24 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/SelectBody.tsx +110 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/index.tsx +338 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/hashline-patch/index.tsx +93 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +172 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/AstEdit.tsx +203 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +279 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Checkpoint.tsx +49 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ContextNotes.tsx +66 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Debug.tsx +91 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Edit.test.ts +177 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Edit.tsx +286 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Eval.tsx +184 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Github.tsx +91 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Goal.tsx +254 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/GoalRecord.tsx +122 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Lsp.tsx +276 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ManageSkill.tsx +93 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +143 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Memory.tsx +93 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.test.ts +241 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.tsx +309 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.test.ts +229 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +342 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Resolve.tsx +96 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SearchFs.tsx +132 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SearchTool.tsx +318 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SecurityScan.tsx +102 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/TaskResult.tsx +240 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Think.tsx +52 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Todo.test.ts +119 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Todo.tsx +110 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.test.ts +276 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +328 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/WebSearch.tsx +118 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/plugin-renderers.test.ts +73 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/plugin-renderers.ts +40 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.test.ts +215 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.ts +167 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactBody.test.ts +103 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactBody.tsx +132 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +174 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.test.ts +99 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.tsx +162 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/EnvelopeHeader.tsx +59 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ExcerptCode.tsx +107 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackOutput.tsx +57 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/JsonCodeBlock.tsx +79 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/OutputWindow.tsx +62 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolCardShell.test.ts +148 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolCardShell.tsx +210 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolFactChips.tsx +117 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolPanelHeader.tsx +63 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.test.ts +190 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.ts +160 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-helpers.tsx +175 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/read-line-meta.test.ts +102 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/read-line-meta.ts +95 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-input.test.ts +55 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-input.ts +18 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/truncate.test.ts +53 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/truncate.ts +18 -0
- package/src/client/components/workspace/context-panel/CostBreakdownPopover.tsx +74 -0
- package/src/client/components/workspace/context-panel/LastMessageCard.tsx +34 -0
- package/src/client/components/workspace/context-panel/RawJsonViewer.tsx +94 -0
- package/src/client/components/workspace/context-panel/RawMessagesList.tsx +288 -0
- package/src/client/components/workspace/context-panel/StatsGrid.tsx +64 -0
- package/src/client/components/workspace/context-panel/TokenDistributionBar.tsx +62 -0
- package/src/client/components/workspace/context-panel/WindowCard.tsx +35 -0
- package/src/client/components/workspace/context-panel/index.tsx +170 -0
- package/src/client/components/workspace/context-panel/pure-helpers.test.ts +264 -0
- package/src/client/components/workspace/context-panel/raw-messages.ts +54 -0
- package/src/client/components/workspace/diff-panel/ConflictBanner.tsx +85 -0
- package/src/client/components/workspace/diff-panel/SplitView.tsx +209 -0
- package/src/client/components/workspace/diff-panel/Toolbar.tsx +281 -0
- package/src/client/components/workspace/diff-panel/UnifiedView.tsx +150 -0
- package/src/client/components/workspace/diff-panel/index.tsx +341 -0
- package/src/client/components/workspace/editor/Body.tsx +127 -0
- package/src/client/components/workspace/editor/CommandPalette.test.ts +242 -0
- package/src/client/components/workspace/editor/CommandPalette.tsx +138 -0
- package/src/client/components/workspace/editor/EditorDropOverlay.tsx +24 -0
- package/src/client/components/workspace/editor/FileDocument.tsx +150 -0
- package/src/client/components/workspace/editor/FilePane.tsx +228 -0
- package/src/client/components/workspace/editor/FindWidget.test.ts +262 -0
- package/src/client/components/workspace/editor/FindWidget.tsx +219 -0
- package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +80 -0
- package/src/client/components/workspace/editor/Tabs.test.ts +128 -0
- package/src/client/components/workspace/editor/Tabs.tsx +159 -0
- package/src/client/components/workspace/editor/Toolbar.tsx +239 -0
- package/src/client/components/workspace/editor/index.tsx +339 -0
- package/src/client/components/workspace/editor/plugin-file-view.test.ts +183 -0
- package/src/client/components/workspace/editor/plugin-file-view.tsx +159 -0
- package/src/client/components/workspace/editor/viewers/CsvGrid.tsx +33 -0
- package/src/client/components/workspace/editor/viewers/DataGrid.tsx +102 -0
- package/src/client/components/workspace/editor/viewers/DocxView.tsx +72 -0
- package/src/client/components/workspace/editor/viewers/ImageView.tsx +43 -0
- package/src/client/components/workspace/editor/viewers/PdfView.tsx +56 -0
- package/src/client/components/workspace/editor/viewers/SheetView.tsx +115 -0
- package/src/client/components/workspace/editor/viewers/SvgPreview.tsx +50 -0
- package/src/client/components/workspace/editor/viewers/ViewerError.tsx +32 -0
- package/src/client/components/workspace/editor/viewers/bytes.test.ts +239 -0
- package/src/client/components/workspace/editor/viewers/bytes.ts +114 -0
- package/src/client/components/workspace/editor/viewers/dispatch.tsx +130 -0
- package/src/client/components/workspace/editor/viewers/mammoth-browser.d.ts +36 -0
- package/src/client/components/workspace/editor/viewers/use-byte-document.test.ts +170 -0
- package/src/client/components/workspace/editor/viewers/use-byte-document.ts +73 -0
- package/src/client/components/workspace/editor/viewers/use-byte-url.test.ts +259 -0
- package/src/client/components/workspace/editor/viewers/use-byte-url.ts +118 -0
- package/src/client/components/workspace/editor/viewers/viewers.test.ts +233 -0
- package/src/client/components/workspace/file-explorer/ContextMenu.tsx +142 -0
- package/src/client/components/workspace/file-explorer/Modals.tsx +229 -0
- package/src/client/components/workspace/file-explorer/OutlineSection.test.tsx +218 -0
- package/src/client/components/workspace/file-explorer/OutlineSection.tsx +135 -0
- package/src/client/components/workspace/file-explorer/RootMenu.tsx +81 -0
- package/src/client/components/workspace/file-explorer/TreeItem.tsx +310 -0
- package/src/client/components/workspace/file-explorer/clipboard.test.ts +171 -0
- package/src/client/components/workspace/file-explorer/drag.test.ts +148 -0
- package/src/client/components/workspace/file-explorer/index.test.ts +130 -0
- package/src/client/components/workspace/file-explorer/index.tsx +336 -0
- package/src/client/components/workspace/file-explorer/root-menu.test.ts +79 -0
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +252 -0
- package/src/client/components/workspace/git-panel/ChangesList.tsx +217 -0
- package/src/client/components/workspace/git-panel/CommitBox.tsx +108 -0
- package/src/client/components/workspace/git-panel/ConflictItem.tsx +128 -0
- package/src/client/components/workspace/git-panel/FileItem.tsx +99 -0
- package/src/client/components/workspace/git-panel/Modals.tsx +97 -0
- package/src/client/components/workspace/git-panel/OperationBar.tsx +95 -0
- package/src/client/components/workspace/git-panel/PanelModals.tsx +110 -0
- package/src/client/components/workspace/git-panel/RepoHeader.tsx +68 -0
- package/src/client/components/workspace/git-panel/StashSection.test.tsx +243 -0
- package/src/client/components/workspace/git-panel/StashSection.tsx +246 -0
- package/src/client/components/workspace/git-panel/TreeItem.tsx +192 -0
- package/src/client/components/workspace/git-panel/TreeView.tsx +36 -0
- package/src/client/components/workspace/git-panel/branch-modal/BranchRow.tsx +164 -0
- package/src/client/components/workspace/git-panel/branch-modal/DeleteDialog.tsx +109 -0
- package/src/client/components/workspace/git-panel/branch-modal/RenameDialog.tsx +154 -0
- package/src/client/components/workspace/git-panel/branch-modal/index.tsx +229 -0
- package/src/client/components/workspace/git-panel/commit-modal/CommitActions.tsx +89 -0
- package/src/client/components/workspace/git-panel/commit-modal/CommitDiffViewer.tsx +285 -0
- package/src/client/components/workspace/git-panel/commit-modal/CommitRow.test.ts +128 -0
- package/src/client/components/workspace/git-panel/commit-modal/CommitRow.tsx +231 -0
- package/src/client/components/workspace/git-panel/commit-modal/GraphCanvas.tsx +167 -0
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +144 -0
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +330 -0
- package/src/client/components/workspace/git-panel/confirm-request.test.ts +72 -0
- package/src/client/components/workspace/git-panel/confirm-request.ts +92 -0
- package/src/client/components/workspace/git-panel/index.test.ts +332 -0
- package/src/client/components/workspace/git-panel/index.tsx +342 -0
- package/src/client/components/workspace/model-dropdown/Footer.tsx +21 -0
- package/src/client/components/workspace/model-dropdown/Header.tsx +50 -0
- package/src/client/components/workspace/model-dropdown/Item.plugin.test.ts +90 -0
- package/src/client/components/workspace/model-dropdown/Item.tsx +127 -0
- package/src/client/components/workspace/model-dropdown/Panel.tsx +146 -0
- package/src/client/components/workspace/model-dropdown/Section.tsx +96 -0
- package/src/client/components/workspace/model-dropdown/Skeleton.tsx +39 -0
- package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +91 -0
- package/src/client/components/workspace/model-dropdown/groups.ts +95 -0
- package/src/client/components/workspace/model-dropdown/index.tsx +290 -0
- package/src/client/components/workspace/model-dropdown/use-catalog.ts +135 -0
- package/src/client/components/workspace/panels/builtin.test.ts +79 -0
- package/src/client/components/workspace/panels/builtin.tsx +193 -0
- package/src/client/components/workspace/plan-panel/Nav.tsx +93 -0
- package/src/client/components/workspace/plan-panel/PageView.tsx +91 -0
- package/src/client/components/workspace/plan-panel/index.tsx +188 -0
- package/src/client/components/workspace/plugin-panel/Error.tsx +37 -0
- package/src/client/components/workspace/plugin-panel/RowScope.test.tsx +197 -0
- package/src/client/components/workspace/plugin-panel/resolve.tsx +263 -0
- package/src/client/components/workspace/repo-picker/Modal.test.tsx +260 -0
- package/src/client/components/workspace/repo-picker/Modal.tsx +238 -0
- package/src/client/components/workspace/repo-picker/Row.tsx +223 -0
- package/src/client/components/workspace/repo-picker/index.test.tsx +137 -0
- package/src/client/components/workspace/repo-picker/index.tsx +92 -0
- package/src/client/components/workspace/search-panel/Body.tsx +274 -0
- package/src/client/components/workspace/search-panel/Results.tsx +188 -0
- package/src/client/components/workspace/search-panel/Row.tsx +86 -0
- package/src/client/components/workspace/search-panel/index.tsx +132 -0
- package/src/client/components/workspace/terminal-panel/Header.test.ts +99 -0
- package/src/client/components/workspace/terminal-panel/Header.tsx +90 -0
- package/src/client/components/workspace/terminal-panel/KeyBar.tsx +194 -0
- package/src/client/components/workspace/terminal-panel/QuickActions.tsx +39 -0
- package/src/client/components/workspace/terminal-panel/RealtimeXtermView.tsx +168 -0
- package/src/client/components/workspace/terminal-panel/index.tsx +231 -0
- package/src/client/components/workspace/terminal-panel/mount.ts +322 -0
- package/src/client/components/workspace/todo-panel/PhaseGroup.tsx +76 -0
- package/src/client/components/workspace/todo-panel/index.tsx +169 -0
- package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +213 -0
- package/src/client/components/workspace/usage-panel/index.tsx +124 -0
- package/src/client/components/workspace/usage-panel/report.test.ts +61 -0
- package/src/client/components/workspace/usage-panel/report.ts +36 -0
- package/src/client/components/workspace/user-browser-panel/AddressBar.tsx +134 -0
- package/src/client/components/workspace/user-browser-panel/Frame.tsx +72 -0
- package/src/client/components/workspace/user-browser-panel/index.tsx +87 -0
- package/src/client/components/workspace/wiki-panel/Nav.tsx +140 -0
- package/src/client/components/workspace/wiki-panel/PageView.tsx +126 -0
- package/src/client/components/workspace/wiki-panel/index.tsx +245 -0
- package/src/client/data/agent-data/builtin.ts +31 -0
- package/src/client/data/agent-data/index.ts +10 -0
- package/src/client/data/agent-data/orchestrator.ts +113 -0
- package/src/client/data/agent-data/specialist.ts +245 -0
- package/src/client/data/context-data/index.test.ts +120 -0
- package/src/client/data/context-data/index.ts +312 -0
- package/src/client/data/context-data/presets.ts +128 -0
- package/src/client/data/mock/chat.ts +236 -0
- package/src/client/data/mock/git-commits.ts +309 -0
- package/src/client/data/mock/subagents.ts +212 -0
- package/src/client/data/mock/token-usage.ts +129 -0
- package/src/client/data/models/catalog.ts +301 -0
- package/src/client/data/samples/dialogue-session.ts +285 -0
- package/src/client/data/samples/sample-subagents/scout-raw.ts +341 -0
- package/src/client/data/samples/sample-subagents/sleeper-raw.ts +294 -0
- package/src/client/data/samples/sample-tools/built-in-part1.ts +303 -0
- package/src/client/data/samples/sample-tools/built-in-part2.ts +200 -0
- package/src/client/data/samples/sample-tools/other.ts +162 -0
- package/src/client/data/samples/subagent-session.ts +99 -0
- package/src/client/data/samples/tools-session.ts +85 -0
- package/src/client/data/samples/virtual-devices-internal-url.ts +141 -0
- package/src/client/data/samples/virtual-devices-session.ts +336 -0
- package/src/client/data/settings/behavior.ts +12 -0
- package/src/client/data/settings/command.ts +148 -0
- package/src/client/data/settings/mcp.ts +28 -0
- package/src/client/data/settings/omp-schema.json +8380 -0
- package/src/client/data/settings/plugin.ts +127 -0
- package/src/client/data/settings/project.ts +58 -0
- package/src/client/data/settings/provider.ts +317 -0
- package/src/client/data/settings/skill.ts +340 -0
- package/src/client/data/theme/terminal.ts +163 -0
- package/src/client/hooks/browser/use-screencast.ts +178 -0
- package/src/client/hooks/browser/use-user-browser.ts +105 -0
- package/src/client/hooks/chat/btw/index.ts +238 -0
- package/src/client/hooks/chat/btw/intercept.test.ts +99 -0
- package/src/client/hooks/chat/btw/intercept.ts +46 -0
- package/src/client/hooks/chat/btw/mode.ts +209 -0
- package/src/client/hooks/chat/composer/attachments.test.ts +211 -0
- package/src/client/hooks/chat/composer/attachments.ts +198 -0
- package/src/client/hooks/chat/composer/auto-grow.test.ts +142 -0
- package/src/client/hooks/chat/composer/auto-grow.ts +51 -0
- package/src/client/hooks/chat/composer/browser-context.ts +40 -0
- package/src/client/hooks/chat/composer/drop-entries.test.ts +234 -0
- package/src/client/hooks/chat/composer/drop-entries.ts +204 -0
- package/src/client/hooks/chat/composer/drop-payload.test.ts +97 -0
- package/src/client/hooks/chat/composer/drop-payload.ts +130 -0
- package/src/client/hooks/chat/composer/drop-references.ts +106 -0
- package/src/client/hooks/chat/composer/file-drop.test.ts +194 -0
- package/src/client/hooks/chat/composer/file-drop.ts +226 -0
- package/src/client/hooks/chat/composer/file-reads.test.ts +211 -0
- package/src/client/hooks/chat/composer/file-reads.ts +238 -0
- package/src/client/hooks/chat/composer/index.ts +213 -0
- package/src/client/hooks/chat/composer/items.test.ts +327 -0
- package/src/client/hooks/chat/composer/items.ts +100 -0
- package/src/client/hooks/chat/composer/model-selection.ts +197 -0
- package/src/client/hooks/chat/composer/pipeline.test.ts +260 -0
- package/src/client/hooks/chat/composer/pipeline.ts +183 -0
- package/src/client/hooks/chat/composer/publish-state.ts +80 -0
- package/src/client/hooks/chat/composer/speech-to-text.ts +214 -0
- package/src/client/hooks/chat/composer/use-draft.ts +33 -0
- package/src/client/hooks/chat/composer/voice-input.ts +71 -0
- package/src/client/hooks/chat/context/telemetry.ts +66 -0
- package/src/client/hooks/chat/omp/index-probe.test.ts +164 -0
- package/src/client/hooks/chat/omp/index.ts +276 -0
- package/src/client/hooks/chat/omp/owner-redirect.test.ts +74 -0
- package/src/client/hooks/chat/omp/owner-redirect.ts +44 -0
- package/src/client/hooks/chat/omp/pending-rows.ts +103 -0
- package/src/client/hooks/chat/omp/pending-sessions.test.ts +314 -0
- package/src/client/hooks/chat/omp/pending-sessions.ts +296 -0
- package/src/client/hooks/chat/omp/prompt-send.test.ts +280 -0
- package/src/client/hooks/chat/omp/prompt-send.ts +187 -0
- package/src/client/hooks/chat/omp/run-switch.test.ts +69 -0
- package/src/client/hooks/chat/omp/run-switch.ts +52 -0
- package/src/client/hooks/chat/omp/session-list.test.ts +283 -0
- package/src/client/hooks/chat/omp/session-list.tsx +289 -0
- package/src/client/hooks/chat/omp/session-sidebar-controller.test.ts +234 -0
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +285 -0
- package/src/client/hooks/chat/omp/session-statuses.test.ts +277 -0
- package/src/client/hooks/chat/omp/session-statuses.ts +129 -0
- package/src/client/hooks/chat/omp/sidebar-overlay.ts +73 -0
- package/src/client/hooks/chat/omp/status.ts +12 -0
- package/src/client/hooks/chat/omp/stream-rpc.test.ts +188 -0
- package/src/client/hooks/chat/omp/stream.test.ts +223 -0
- package/src/client/hooks/chat/omp/stream.ts +149 -0
- package/src/client/hooks/chat/stream.ts +228 -0
- package/src/client/hooks/chat/subagent/index.ts +309 -0
- package/src/client/hooks/chat/timeline/access-mode.ts +41 -0
- package/src/client/hooks/chat/timeline/actions.test.ts +310 -0
- package/src/client/hooks/chat/timeline/actions.ts +335 -0
- package/src/client/hooks/chat/timeline/ask-frames-grouped.test.ts +76 -0
- package/src/client/hooks/chat/timeline/ask-frames.test.ts +151 -0
- package/src/client/hooks/chat/timeline/ask-frames.ts +172 -0
- package/src/client/hooks/chat/timeline/auto-scroll.ts +67 -0
- package/src/client/hooks/chat/timeline/composer-local-actions.test.ts +349 -0
- package/src/client/hooks/chat/timeline/composer-modes.ts +32 -0
- package/src/client/hooks/chat/timeline/deferred-model.test.ts +224 -0
- package/src/client/hooks/chat/timeline/deferred-model.ts +92 -0
- package/src/client/hooks/chat/timeline/extension-dialog.ts +59 -0
- package/src/client/hooks/chat/timeline/generating.test.ts +103 -0
- package/src/client/hooks/chat/timeline/generating.ts +106 -0
- package/src/client/hooks/chat/timeline/goal-command.ts +76 -0
- package/src/client/hooks/chat/timeline/index.ts +349 -0
- package/src/client/hooks/chat/timeline/mode-marker-spellings.test.ts +57 -0
- package/src/client/hooks/chat/timeline/mode-markers.ts +103 -0
- package/src/client/hooks/chat/timeline/modes.test.ts +311 -0
- package/src/client/hooks/chat/timeline/modes.ts +326 -0
- package/src/client/hooks/chat/timeline/new-chat.test.ts +196 -0
- package/src/client/hooks/chat/timeline/new-chat.ts +80 -0
- package/src/client/hooks/chat/timeline/plan-review.test.ts +47 -0
- package/src/client/hooks/chat/timeline/plan-review.ts +148 -0
- package/src/client/hooks/chat/timeline/plugin-commands.test.ts +116 -0
- package/src/client/hooks/chat/timeline/plugin-commands.ts +76 -0
- package/src/client/hooks/chat/timeline/prompt-text.test.ts +123 -0
- package/src/client/hooks/chat/timeline/prompt-text.ts +40 -0
- package/src/client/hooks/chat/timeline/queue-actions.ts +96 -0
- package/src/client/hooks/chat/timeline/queue-rewind.test.ts +271 -0
- package/src/client/hooks/chat/timeline/queue.ts +235 -0
- package/src/client/hooks/chat/timeline/rail-jump.test.ts +204 -0
- package/src/client/hooks/chat/timeline/rail-jump.ts +86 -0
- package/src/client/hooks/chat/timeline/rewind-actions.test.ts +233 -0
- package/src/client/hooks/chat/timeline/rewind-actions.ts +172 -0
- package/src/client/hooks/chat/timeline/rewind.ts +62 -0
- package/src/client/hooks/chat/timeline/scope.ts +55 -0
- package/src/client/hooks/chat/timeline/scroll.test.ts +320 -0
- package/src/client/hooks/chat/timeline/scroll.ts +226 -0
- package/src/client/hooks/chat/timeline/send-execute.test.ts +333 -0
- package/src/client/hooks/chat/timeline/send-helpers.ts +109 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +231 -0
- package/src/client/hooks/chat/timeline/send.test.ts +231 -0
- package/src/client/hooks/chat/timeline/send.ts +310 -0
- package/src/client/hooks/chat/timeline/session-load.test.ts +323 -0
- package/src/client/hooks/chat/timeline/session-load.ts +317 -0
- package/src/client/hooks/chat/timeline/session-pagination.test.ts +167 -0
- package/src/client/hooks/chat/timeline/session-pagination.ts +317 -0
- package/src/client/hooks/chat/timeline/session-scope.test.ts +248 -0
- package/src/client/hooks/chat/timeline/session-title.ts +36 -0
- package/src/client/hooks/chat/timeline/subagent-view.ts +92 -0
- package/src/client/hooks/chat/timeline/timeline-mode-state.test.ts +306 -0
- package/src/client/hooks/chat/timeline/timeline-rail.test.ts +259 -0
- package/src/client/hooks/chat/timeline/tool-open.test.ts +141 -0
- package/src/client/hooks/chat/timeline/tool-open.ts +87 -0
- package/src/client/hooks/chat/timeline/tui-only-guard.ts +58 -0
- package/src/client/hooks/chat/timeline/undo-confirmation.ts +45 -0
- package/src/client/hooks/chat/timeline/user-turns.ts +182 -0
- package/src/client/hooks/editor/file-actions.ts +49 -0
- package/src/client/hooks/editor/find-harness.test-util.ts +170 -0
- package/src/client/hooks/editor/find-state.ts +68 -0
- package/src/client/hooks/editor/font.test.ts +344 -0
- package/src/client/hooks/editor/font.ts +53 -0
- package/src/client/hooks/editor/resolve-viewer.test.ts +142 -0
- package/src/client/hooks/editor/resolve-viewer.ts +80 -0
- package/src/client/hooks/editor/save-file.ts +88 -0
- package/src/client/hooks/editor/scroll-container.test.ts +102 -0
- package/src/client/hooks/editor/scroll-container.ts +26 -0
- package/src/client/hooks/editor/use-code-window.ts +100 -0
- package/src/client/hooks/editor/use-editor-document.ts +81 -0
- package/src/client/hooks/editor/use-editor-drop.test.ts +245 -0
- package/src/client/hooks/editor/use-editor-drop.ts +275 -0
- package/src/client/hooks/editor/use-editor-find-write.test.ts +170 -0
- package/src/client/hooks/editor/use-editor-find.test.ts +158 -0
- package/src/client/hooks/editor/use-editor-find.ts +307 -0
- package/src/client/hooks/editor/use-editor-history.test.ts +216 -0
- package/src/client/hooks/editor/use-editor-history.ts +134 -0
- package/src/client/hooks/editor/use-editor-outline-bridge.ts +73 -0
- package/src/client/hooks/editor/use-file-editor-writes.test.ts +118 -0
- package/src/client/hooks/editor/use-file-editor.test.ts +169 -0
- package/src/client/hooks/editor/use-file-editor.ts +331 -0
- package/src/client/hooks/editor/use-file-read.ts +197 -0
- package/src/client/hooks/editor/use-file-transfer.ts +113 -0
- package/src/client/hooks/editor/use-file-writes.ts +228 -0
- package/src/client/hooks/editor/use-line-jump.test.ts +204 -0
- package/src/client/hooks/editor/use-line-jump.ts +112 -0
- package/src/client/hooks/editor/use-line-reveal.ts +71 -0
- package/src/client/hooks/editor/use-occurrences.test.ts +236 -0
- package/src/client/hooks/editor/use-occurrences.ts +98 -0
- package/src/client/hooks/editor/use-outline-view.ts +47 -0
- package/src/client/hooks/editor/use-scroll-restore.test.ts +238 -0
- package/src/client/hooks/editor/use-scroll-restore.ts +209 -0
- package/src/client/hooks/editor/use-search-reveal.ts +74 -0
- package/src/client/hooks/models/use-model-names.ts +17 -0
- package/src/client/hooks/models/use-models-catalog.ts +45 -0
- package/src/client/hooks/models/use-provider-names.ts +18 -0
- package/src/client/hooks/settings/crud-list.test.ts +272 -0
- package/src/client/hooks/settings/crud-list.ts +187 -0
- package/src/client/hooks/settings/instruction-file.ts +91 -0
- package/src/client/hooks/settings/master-detail.ts +33 -0
- package/src/client/hooks/settings/plugins.ts +121 -0
- package/src/client/hooks/settings/providers/actions.ts +341 -0
- package/src/client/hooks/settings/providers/api.ts +69 -0
- package/src/client/hooks/settings/providers/index.ts +154 -0
- package/src/client/hooks/settings/providers/logout.ts +85 -0
- package/src/client/hooks/settings/providers/messages.ts +112 -0
- package/src/client/hooks/settings/reload-engine.ts +74 -0
- package/src/client/hooks/settings/restart-kabmo.test.ts +187 -0
- package/src/client/hooks/settings/restart-kabmo.ts +115 -0
- package/src/client/hooks/settings/settings-siblings.test.ts +168 -0
- package/src/client/hooks/settings/skill-catalog.ts +37 -0
- package/src/client/hooks/settings/use-kabmo-setting.ts +15 -0
- package/src/client/hooks/settings/useUsageReport.ts +45 -0
- package/src/client/hooks/settings/useUsageResets.ts +64 -0
- package/src/client/hooks/settings/workspace-roots.ts +99 -0
- package/src/client/hooks/ui/auth.test.ts +99 -0
- package/src/client/hooks/ui/auth.ts +274 -0
- package/src/client/hooks/ui/clipboard.ts +50 -0
- package/src/client/hooks/ui/copy-flag.ts +27 -0
- package/src/client/hooks/ui/inline-rename.ts +99 -0
- package/src/client/hooks/ui/input-required-alert.ts +43 -0
- package/src/client/hooks/ui/keyboard-inset.test.ts +46 -0
- package/src/client/hooks/ui/keyboard-inset.ts +120 -0
- package/src/client/hooks/ui/notification-sound.ts +173 -0
- package/src/client/hooks/ui/on-click-outside.ts +22 -0
- package/src/client/hooks/ui/open-file.ts +57 -0
- package/src/client/hooks/ui/output-reveal.ts +30 -0
- package/src/client/hooks/ui/realtime.test.ts +84 -0
- package/src/client/hooks/ui/realtime.ts +128 -0
- package/src/client/hooks/ui/show-more.ts +35 -0
- package/src/client/hooks/ui/syntax-ready.ts +30 -0
- package/src/client/hooks/ui/text-overflow.test.ts +152 -0
- package/src/client/hooks/ui/text-overflow.ts +78 -0
- package/src/client/hooks/ui/theme.ts +121 -0
- package/src/client/hooks/ui/toasts.ts +22 -0
- package/src/client/hooks/ui/touch-device.ts +46 -0
- package/src/client/hooks/ui/ui-alert.test.ts +235 -0
- package/src/client/hooks/ui/ui-environment.test.ts +172 -0
- package/src/client/hooks/ui/ui-feedback.test.ts +303 -0
- package/src/client/hooks/ui/ui-inline-rename.test.ts +305 -0
- package/src/client/hooks/ui/ui-listeners.test.ts +331 -0
- package/src/client/hooks/ui/ui-sounds.test.ts +254 -0
- package/src/client/hooks/ui/ui-syntax-ready.test.ts +73 -0
- package/src/client/hooks/ui/updates/changelog.ts +57 -0
- package/src/client/hooks/ui/updates/index.test.ts +218 -0
- package/src/client/hooks/ui/updates/index.ts +254 -0
- package/src/client/hooks/ui/updates/restart.test.ts +129 -0
- package/src/client/hooks/ui/updates/restart.ts +150 -0
- package/src/client/hooks/ui/window-chrome.ts +63 -0
- package/src/client/hooks/ui/window-event.ts +55 -0
- package/src/client/hooks/workspace/available-width.ts +33 -0
- package/src/client/hooks/workspace/batch-delete-run.ts +95 -0
- package/src/client/hooks/workspace/batch-delete.ts +63 -0
- package/src/client/hooks/workspace/batch-selection.ts +98 -0
- package/src/client/hooks/workspace/commit-box.test.ts +203 -0
- package/src/client/hooks/workspace/commit-box.ts +129 -0
- package/src/client/hooks/workspace/commit-interactions.ts +153 -0
- package/src/client/hooks/workspace/commit-layer.test.ts +348 -0
- package/src/client/hooks/workspace/commit-pagination.ts +101 -0
- package/src/client/hooks/workspace/diff-file.ts +128 -0
- package/src/client/hooks/workspace/directives.ts +55 -0
- package/src/client/hooks/workspace/expanded-sessions.ts +62 -0
- package/src/client/hooks/workspace/file-clipboard.test.ts +247 -0
- package/src/client/hooks/workspace/file-clipboard.ts +192 -0
- package/src/client/hooks/workspace/file-create.ts +111 -0
- package/src/client/hooks/workspace/file-listing.ts +242 -0
- package/src/client/hooks/workspace/file-row-drag.ts +98 -0
- package/src/client/hooks/workspace/file-tabs.ts +233 -0
- package/src/client/hooks/workspace/file-tree-actions-clipboard.test.ts +106 -0
- package/src/client/hooks/workspace/file-tree-actions.test.ts +181 -0
- package/src/client/hooks/workspace/file-tree-actions.ts +246 -0
- package/src/client/hooks/workspace/git-actions.ts +56 -0
- package/src/client/hooks/workspace/git-panel-data.ts +162 -0
- package/src/client/hooks/workspace/git-status.test.ts +150 -0
- package/src/client/hooks/workspace/git-status.ts +48 -0
- package/src/client/hooks/workspace/git-tree.test.ts +73 -0
- package/src/client/hooks/workspace/git-tree.ts +146 -0
- package/src/client/hooks/workspace/list-slots.test.ts +86 -0
- package/src/client/hooks/workspace/list-slots.ts +59 -0
- package/src/client/hooks/workspace/missing-files.test.ts +179 -0
- package/src/client/hooks/workspace/missing-files.ts +132 -0
- package/src/client/hooks/workspace/new-workspace.ts +51 -0
- package/src/client/hooks/workspace/panel-order.ts +87 -0
- package/src/client/hooks/workspace/panel-registry.ts +329 -0
- package/src/client/hooks/workspace/panel-reorder.ts +119 -0
- package/src/client/hooks/workspace/panel-widths.test.ts +261 -0
- package/src/client/hooks/workspace/panel-widths.ts +51 -0
- package/src/client/hooks/workspace/renaming-sessions.ts +61 -0
- package/src/client/hooks/workspace/repo-details.ts +128 -0
- package/src/client/hooks/workspace/repo-scope/index.test.ts +213 -0
- package/src/client/hooks/workspace/repo-scope/index.ts +181 -0
- package/src/client/hooks/workspace/repo-scope/store.test.ts +158 -0
- package/src/client/hooks/workspace/repo-scope/store.ts +164 -0
- package/src/client/hooks/workspace/scheduled-tasks.ts +159 -0
- package/src/client/hooks/workspace/search-stream.test.ts +149 -0
- package/src/client/hooks/workspace/search-stream.ts +133 -0
- package/src/client/hooks/workspace/session-actions.test.ts +170 -0
- package/src/client/hooks/workspace/session-actions.ts +99 -0
- package/src/client/hooks/workspace/session-delete.ts +93 -0
- package/src/client/hooks/workspace/session-state/context.ts +15 -0
- package/src/client/hooks/workspace/session-state/index.ts +83 -0
- package/src/client/hooks/workspace/sidebar-width.ts +43 -0
- package/src/client/hooks/workspace/terminal/index.ts +186 -0
- package/src/client/hooks/workspace/terminal/socket.ts +227 -0
- package/src/client/hooks/workspace/wiki.ts +195 -0
- package/src/client/hooks/workspace/workspace-folder-actions.ts +125 -0
- package/src/client/lib/editor-document.ts +106 -0
- package/src/client/lib/launch/file-handlers.test.ts +255 -0
- package/src/client/lib/launch/file-handlers.ts +203 -0
- package/src/client/lib/launch/types.ts +67 -0
- package/src/client/lib/line-reveal.ts +61 -0
- package/src/client/lib/outline-stores.test.ts +94 -0
- package/src/client/lib/plugins/bootstrap.test.ts +258 -0
- package/src/client/lib/plugins/bootstrap.tsx +158 -0
- package/src/client/lib/plugins/composer-bridge.ts +107 -0
- package/src/client/lib/plugins/content-scripts-root.test.ts +158 -0
- package/src/client/lib/plugins/content-scripts.test.ts +331 -0
- package/src/client/lib/plugins/content-scripts.ts +252 -0
- package/src/client/lib/plugins/context.ts +68 -0
- package/src/client/lib/plugins/directives.test.tsx +239 -0
- package/src/client/lib/plugins/directives.tsx +139 -0
- package/src/client/lib/plugins/kit.test.ts +103 -0
- package/src/client/lib/plugins/kit.ts +160 -0
- package/src/client/lib/plugins/list-slots.test.ts +148 -0
- package/src/client/lib/plugins/list-slots.ts +166 -0
- package/src/client/lib/plugins/loader.ts +66 -0
- package/src/client/lib/plugins/repo-scope-service.test.ts +90 -0
- package/src/client/lib/plugins/repo-scope-service.ts +148 -0
- package/src/client/lib/plugins/runtime.ts +64 -0
- package/src/client/lib/plugins/sidebar-bridge.test.ts +200 -0
- package/src/client/lib/plugins/sidebar-bridge.ts +215 -0
- package/src/client/lib/plugins/slots.test.ts +177 -0
- package/src/client/lib/plugins/slots.ts +230 -0
- package/src/client/lib/plugins/stylesheets.test.ts +157 -0
- package/src/client/lib/plugins/stylesheets.ts +89 -0
- package/src/client/lib/plugins/topic.ts +55 -0
- package/src/client/lib/router/fetcher.ts +100 -0
- package/src/client/lib/router/search-params.ts +86 -0
- package/src/client/lib/scrollbar-activity.test.ts +165 -0
- package/src/client/lib/scrollbar-activity.ts +112 -0
- package/src/client/lib/search-reveal.ts +61 -0
- package/src/client/lib/signals.ts +72 -0
- package/src/client/lib/ui/with-chord.ts +21 -0
- package/src/client/main.tsx +78 -0
- package/src/client/stubs/elkjs.ts +42 -0
- package/src/client/tailwind.css +584 -0
- package/src/server/db.server.test.ts +153 -0
- package/src/server/db.server.ts +144 -0
- package/src/server/index.ts +329 -0
- package/src/server/lib/assets/conditional.server.test.ts +74 -0
- package/src/server/lib/assets/conditional.server.ts +54 -0
- package/src/server/lib/assets/dev-assets.server.test.ts +44 -0
- package/src/server/lib/assets/dev-assets.server.ts +128 -0
- package/src/server/lib/assets/font-css.server.test.ts +87 -0
- package/src/server/lib/assets/font-css.server.ts +113 -0
- package/src/server/lib/assets/font-faces.ts +69 -0
- package/src/server/lib/assets/fonts.server.ts +77 -0
- package/src/server/lib/auth/client-address.ts +55 -0
- package/src/server/lib/auth/config.ts +133 -0
- package/src/server/lib/auth/env-password.test.ts +112 -0
- package/src/server/lib/auth/env-password.ts +79 -0
- package/src/server/lib/auth/guard.test.ts +305 -0
- package/src/server/lib/auth/guard.ts +285 -0
- package/src/server/lib/auth/handover-guard.test.ts +100 -0
- package/src/server/lib/auth/rate-limit.test.ts +135 -0
- package/src/server/lib/auth/rate-limit.ts +143 -0
- package/src/server/lib/auth/token.test.ts +236 -0
- package/src/server/lib/auth/token.ts +220 -0
- package/src/server/lib/browser/runtime.test.ts +110 -0
- package/src/server/lib/browser/runtime.ts +160 -0
- package/src/server/lib/btw/child.server.test.ts +68 -0
- package/src/server/lib/btw/child.server.ts +42 -0
- package/src/server/lib/btw/frames.test.ts +59 -0
- package/src/server/lib/btw/frames.ts +50 -0
- package/src/server/lib/btw/lifecycle.server.test.ts +139 -0
- package/src/server/lib/btw/lifecycle.server.ts +264 -0
- package/src/server/lib/btw/prompt.ts +32 -0
- package/src/server/lib/btw/purge.server.ts +56 -0
- package/src/server/lib/btw/registry.server.test.ts +213 -0
- package/src/server/lib/btw/registry.server.ts +142 -0
- package/src/server/lib/btw/reply.ts +54 -0
- package/src/server/lib/btw/runtime.server.test.ts +128 -0
- package/src/server/lib/btw/runtime.server.ts +308 -0
- package/src/server/lib/btw/schema.server.test.ts +84 -0
- package/src/server/lib/btw/schema.server.ts +79 -0
- package/src/server/lib/btw/service.server.test.ts +199 -0
- package/src/server/lib/btw/service.server.ts +241 -0
- package/src/server/lib/btw/session-copy.server.ts +213 -0
- package/src/server/lib/btw/session-copy.test.ts +166 -0
- package/src/server/lib/btw/store.server.test.ts +301 -0
- package/src/server/lib/btw/store.server.ts +280 -0
- package/src/server/lib/bundler/build-errors.server.ts +141 -0
- package/src/server/lib/bundler/build-errors.test.ts +103 -0
- package/src/server/lib/bundler/css.test.ts +237 -0
- package/src/server/lib/bundler/css.ts +82 -0
- package/src/server/lib/bundler/dependencies.test.ts +149 -0
- package/src/server/lib/bundler/nested-at-rules.test.ts +100 -0
- package/src/server/lib/bundler/nested-at-rules.ts +146 -0
- package/src/server/lib/bundler/tsconfig-paths.test.ts +124 -0
- package/src/server/lib/chat/session-store.server.ts +61 -0
- package/src/server/lib/db/client.ts +76 -0
- package/src/server/lib/db/compact-chat-overlay.test.ts +128 -0
- package/src/server/lib/db/compact-chat-overlay.ts +90 -0
- package/src/server/lib/db/schema.test.ts +219 -0
- package/src/server/lib/db/schema.ts +122 -0
- package/src/server/lib/db/seed-terminal.test.ts +227 -0
- package/src/server/lib/db/seed.test.ts +226 -0
- package/src/server/lib/db/seed.ts +160 -0
- package/src/server/lib/db/settings-store.test.ts +65 -0
- package/src/server/lib/db/settings-store.ts +173 -0
- package/src/server/lib/db/workspace-sync.test.ts +274 -0
- package/src/server/lib/db/workspace-sync.ts +144 -0
- package/src/server/lib/dictation/language.server.test.ts +134 -0
- package/src/server/lib/dictation/language.server.ts +82 -0
- package/src/server/lib/dictation/omp-stt-worker.ts +243 -0
- package/src/server/lib/fs/atomic-write.ts +65 -0
- package/src/server/lib/fs/child-env.test.ts +66 -0
- package/src/server/lib/fs/child-env.ts +50 -0
- package/src/server/lib/fs/config-lock.ts +74 -0
- package/src/server/lib/fs/fs-path.test.ts +293 -0
- package/src/server/lib/fs/fs-write-git.test.ts +332 -0
- package/src/server/lib/fs/git-actions-branch.ts +148 -0
- package/src/server/lib/fs/git-actions-history.ts +74 -0
- package/src/server/lib/fs/git-actions-shared.ts +86 -0
- package/src/server/lib/fs/git-actions-worktree.ts +187 -0
- package/src/server/lib/fs/git-actions.ts +39 -0
- package/src/server/lib/fs/git-branch.ts +226 -0
- package/src/server/lib/fs/git-diff.test.ts +304 -0
- package/src/server/lib/fs/git-diff.ts +162 -0
- package/src/server/lib/fs/git-ignore.ts +105 -0
- package/src/server/lib/fs/git-index-lock.test.ts +232 -0
- package/src/server/lib/fs/git-log-parse.test.ts +155 -0
- package/src/server/lib/fs/git-log.test.ts +337 -0
- package/src/server/lib/fs/git-log.ts +335 -0
- package/src/server/lib/fs/git-merge-conflict.test.ts +123 -0
- package/src/server/lib/fs/git-merge.ts +210 -0
- package/src/server/lib/fs/git-porcelain-v2.ts +140 -0
- package/src/server/lib/fs/git-publish.test.ts +147 -0
- package/src/server/lib/fs/git-publish.ts +73 -0
- package/src/server/lib/fs/git-repo-details.test.ts +227 -0
- package/src/server/lib/fs/git-repo-details.ts +163 -0
- package/src/server/lib/fs/git-repos.test.ts +101 -0
- package/src/server/lib/fs/git-repos.ts +117 -0
- package/src/server/lib/fs/git-revert.ts +93 -0
- package/src/server/lib/fs/git-run.ts +219 -0
- package/src/server/lib/fs/git-stash.ts +159 -0
- package/src/server/lib/fs/git-state-verbs.test.ts +117 -0
- package/src/server/lib/fs/git-state.test.ts +171 -0
- package/src/server/lib/fs/git-state.ts +178 -0
- package/src/server/lib/fs/git-status-read.test.ts +141 -0
- package/src/server/lib/fs/git-status-read.ts +174 -0
- package/src/server/lib/fs/git-sync.test.ts +200 -0
- package/src/server/lib/fs/git-sync.ts +216 -0
- package/src/server/lib/fs/listing.ts +64 -0
- package/src/server/lib/fs/package-root.test.ts +99 -0
- package/src/server/lib/fs/package-root.ts +87 -0
- package/src/server/lib/fs/path-segment.test.ts +101 -0
- package/src/server/lib/fs/path-segment.ts +45 -0
- package/src/server/lib/fs/repo-scope.ts +14 -0
- package/src/server/lib/fs/reveal.ts +101 -0
- package/src/server/lib/fs/ripgrep.test.ts +208 -0
- package/src/server/lib/fs/ripgrep.ts +139 -0
- package/src/server/lib/fs/root.ts +156 -0
- package/src/server/lib/fs/shell.ts +131 -0
- package/src/server/lib/fs/transfer.test.ts +183 -0
- package/src/server/lib/fs/transfer.ts +143 -0
- package/src/server/lib/http/same-origin.ts +26 -0
- package/src/server/lib/lifecycle/argv-flags.ts +47 -0
- package/src/server/lib/lifecycle/bun.ts +20 -0
- package/src/server/lib/lifecycle/fd-pressure.test.ts +110 -0
- package/src/server/lib/lifecycle/fd-pressure.ts +240 -0
- package/src/server/lib/lifecycle/flock.test.ts +166 -0
- package/src/server/lib/lifecycle/flock.ts +199 -0
- package/src/server/lib/lifecycle/identity.test.ts +23 -0
- package/src/server/lib/lifecycle/identity.ts +86 -0
- package/src/server/lib/lifecycle/instance.test.ts +306 -0
- package/src/server/lib/lifecycle/instance.ts +131 -0
- package/src/server/lib/lifecycle/kill-tree.test.ts +196 -0
- package/src/server/lib/lifecycle/kill-tree.ts +114 -0
- package/src/server/lib/lifecycle/launch-mode.test.ts +51 -0
- package/src/server/lib/lifecycle/launch-mode.ts +66 -0
- package/src/server/lib/lifecycle/listener.ts +58 -0
- package/src/server/lib/lifecycle/occupant.ts +101 -0
- package/src/server/lib/lifecycle/paths.test.ts +97 -0
- package/src/server/lib/lifecycle/paths.ts +112 -0
- package/src/server/lib/lifecycle/port-guard.test.ts +288 -0
- package/src/server/lib/lifecycle/port-guard.ts +185 -0
- package/src/server/lib/lifecycle/probe.test.ts +279 -0
- package/src/server/lib/lifecycle/probe.ts +215 -0
- package/src/server/lib/lifecycle/proc/darwin.ts +305 -0
- package/src/server/lib/lifecycle/proc/index.ts +38 -0
- package/src/server/lib/lifecycle/proc/linux.ts +110 -0
- package/src/server/lib/lifecycle/proc/proc.test.ts +164 -0
- package/src/server/lib/lifecycle/proc/ps.ts +99 -0
- package/src/server/lib/lifecycle/proc/types.ts +58 -0
- package/src/server/lib/lifecycle/proc/win32.ts +64 -0
- package/src/server/lib/lifecycle/restart.test.ts +331 -0
- package/src/server/lib/lifecycle/restart.ts +228 -0
- package/src/server/lib/lifecycle/shell-route.ts +17 -0
- package/src/server/lib/lifecycle/tls.test.ts +98 -0
- package/src/server/lib/lifecycle/tls.ts +165 -0
- package/src/server/lib/models/detected-registry.server.ts +41 -0
- package/src/server/lib/models/preferences.server.ts +110 -0
- package/src/server/lib/models/provider-items.server.ts +96 -0
- package/src/server/lib/models/provider-listing.server.test.ts +283 -0
- package/src/server/lib/models/provider-listing.server.ts +279 -0
- package/src/server/lib/models/provider-registry.server.test.ts +173 -0
- package/src/server/lib/models/provider-registry.server.ts +257 -0
- package/src/server/lib/models/registry.server.test.ts +263 -0
- package/src/server/lib/models/registry.server.ts +206 -0
- package/src/server/lib/models/selected-context-limit.server.test.ts +162 -0
- package/src/server/lib/models/selected-context-limit.server.ts +52 -0
- package/src/server/lib/observer-ws.ts +150 -0
- package/src/server/lib/omp/config/agents.ts +162 -0
- package/src/server/lib/omp/config/behavior.ts +113 -0
- package/src/server/lib/omp/config/commands.test.ts +167 -0
- package/src/server/lib/omp/config/commands.ts +185 -0
- package/src/server/lib/omp/config/config-cli.test.ts +153 -0
- package/src/server/lib/omp/config/config-cli.ts +154 -0
- package/src/server/lib/omp/config/definitions.test.ts +349 -0
- package/src/server/lib/omp/config/disabled-providers.ts +117 -0
- package/src/server/lib/omp/config/discovery-roots.test.ts +119 -0
- package/src/server/lib/omp/config/discovery-roots.ts +194 -0
- package/src/server/lib/omp/config/document.test.ts +349 -0
- package/src/server/lib/omp/config/document.ts +128 -0
- package/src/server/lib/omp/config/extensions.ts +91 -0
- package/src/server/lib/omp/config/instructions.ts +81 -0
- package/src/server/lib/omp/config/mcp-and-cli.test.ts +318 -0
- package/src/server/lib/omp/config/mcp-test.ts +346 -0
- package/src/server/lib/omp/config/mcp.ts +205 -0
- package/src/server/lib/omp/config/model-overrides.ts +123 -0
- package/src/server/lib/omp/config/models-config.ts +103 -0
- package/src/server/lib/omp/config/models-validation.test.ts +137 -0
- package/src/server/lib/omp/config/models-validation.ts +268 -0
- package/src/server/lib/omp/config/omp-config-files.test.ts +300 -0
- package/src/server/lib/omp/config/path-scoped.ts +74 -0
- package/src/server/lib/omp/config/plugin-actions.ts +87 -0
- package/src/server/lib/omp/config/plugin-cli.ts +69 -0
- package/src/server/lib/omp/config/plugin-registry.test.ts +286 -0
- package/src/server/lib/omp/config/plugin-registry.ts +250 -0
- package/src/server/lib/omp/config/plugins.test.ts +289 -0
- package/src/server/lib/omp/config/plugins.ts +249 -0
- package/src/server/lib/omp/config/provider-seeds.test.ts +167 -0
- package/src/server/lib/omp/config/provider-seeds.ts +220 -0
- package/src/server/lib/omp/config/providers-write.test.ts +340 -0
- package/src/server/lib/omp/config/providers.ts +343 -0
- package/src/server/lib/omp/config/roles.ts +38 -0
- package/src/server/lib/omp/config/roots-watch.server.test.ts +214 -0
- package/src/server/lib/omp/config/roots-watch.server.ts +334 -0
- package/src/server/lib/omp/config/scope.test.ts +53 -0
- package/src/server/lib/omp/config/scope.ts +65 -0
- package/src/server/lib/omp/config/skills-catalog.ts +127 -0
- package/src/server/lib/omp/config/skills.test.ts +108 -0
- package/src/server/lib/omp/config/skills.ts +333 -0
- package/src/server/lib/omp/config/yaml.ts +48 -0
- package/src/server/lib/omp/core/auth-credentials.ts +132 -0
- package/src/server/lib/omp/core/cli.ts +70 -0
- package/src/server/lib/omp/core/host-resolution.test.ts +348 -0
- package/src/server/lib/omp/core/paths.test.ts +229 -0
- package/src/server/lib/omp/core/paths.ts +214 -0
- package/src/server/lib/omp/core/registry.test.ts +234 -0
- package/src/server/lib/omp/core/registry.ts +140 -0
- package/src/server/lib/omp/core/startup.ts +64 -0
- package/src/server/lib/omp/core/worktree.ts +107 -0
- package/src/server/lib/omp/extensions/locator.test.ts +67 -0
- package/src/server/lib/omp/extensions/locator.ts +98 -0
- package/src/server/lib/omp/mode/command-type.test.ts +41 -0
- package/src/server/lib/omp/mode/live-selection.test.ts +133 -0
- package/src/server/lib/omp/mode/live-selection.ts +90 -0
- package/src/server/lib/omp/mode/request.test.ts +73 -0
- package/src/server/lib/omp/mode/request.ts +94 -0
- package/src/server/lib/omp/rpc/agent-start-watchdog.ts +88 -0
- package/src/server/lib/omp/rpc/child-config.ts +48 -0
- package/src/server/lib/omp/rpc/constants.test.ts +229 -0
- package/src/server/lib/omp/rpc/constants.ts +299 -0
- package/src/server/lib/omp/rpc/destroy-stream-row.test.ts +110 -0
- package/src/server/lib/omp/rpc/errors.ts +42 -0
- package/src/server/lib/omp/rpc/event-fanout.ts +43 -0
- package/src/server/lib/omp/rpc/forked-resume.test.ts +119 -0
- package/src/server/lib/omp/rpc/frame-fold.test.ts +300 -0
- package/src/server/lib/omp/rpc/frame-fold.ts +321 -0
- package/src/server/lib/omp/rpc/idle-reaper.ts +59 -0
- package/src/server/lib/omp/rpc/lifecycle.test.ts +293 -0
- package/src/server/lib/omp/rpc/lines.ts +48 -0
- package/src/server/lib/omp/rpc/manager.ts +345 -0
- package/src/server/lib/omp/rpc/mode-mirror.test.ts +156 -0
- package/src/server/lib/omp/rpc/mode-mirror.ts +109 -0
- package/src/server/lib/omp/rpc/peer-proxy.server.test.ts +107 -0
- package/src/server/lib/omp/rpc/peer-proxy.server.ts +150 -0
- package/src/server/lib/omp/rpc/pending-ui-dialogs.ts +59 -0
- package/src/server/lib/omp/rpc/process-helpers.ts +70 -0
- package/src/server/lib/omp/rpc/process.ts +328 -0
- package/src/server/lib/omp/rpc/reload-plugins.ts +43 -0
- package/src/server/lib/omp/rpc/rpc-primitives.test.ts +339 -0
- package/src/server/lib/omp/rpc/rpc-timers.test.ts +302 -0
- package/src/server/lib/omp/rpc/run-model.ts +59 -0
- package/src/server/lib/omp/rpc/run-settle.server.ts +296 -0
- package/src/server/lib/omp/rpc/run-settle.test.ts +288 -0
- package/src/server/lib/omp/rpc/session-command-guards.ts +125 -0
- package/src/server/lib/omp/rpc/session-commands-dialog.test.ts +139 -0
- package/src/server/lib/omp/rpc/session-commands-harness.ts +86 -0
- package/src/server/lib/omp/rpc/session-commands.test.ts +293 -0
- package/src/server/lib/omp/rpc/session-commands.ts +293 -0
- package/src/server/lib/omp/rpc/session-registration.ts +58 -0
- package/src/server/lib/omp/rpc/session-registry.test.ts +234 -0
- package/src/server/lib/omp/rpc/session-registry.ts +349 -0
- package/src/server/lib/omp/rpc/spawn-provenance.ts +82 -0
- package/src/server/lib/omp/rpc/stream-reader.test.ts +124 -0
- package/src/server/lib/omp/rpc/subagent-liveness.test.ts +62 -0
- package/src/server/lib/omp/rpc/subagent-liveness.ts +101 -0
- package/src/server/lib/omp/rpc/terminal-settle.ts +97 -0
- package/src/server/lib/omp/rpc/utility.test.ts +261 -0
- package/src/server/lib/omp/rpc/utility.ts +300 -0
- package/src/server/lib/omp/rpc/web-state.ts +88 -0
- package/src/server/lib/omp/session/artifacts.server.test.ts +117 -0
- package/src/server/lib/omp/session/artifacts.server.ts +106 -0
- package/src/server/lib/omp/session/auto-title.server.test.ts +270 -0
- package/src/server/lib/omp/session/auto-title.server.ts +250 -0
- package/src/server/lib/omp/session/blobs.server.test.ts +129 -0
- package/src/server/lib/omp/session/blobs.server.ts +108 -0
- package/src/server/lib/omp/session/data-mock.ts +88 -0
- package/src/server/lib/omp/session/delete-flow.server.ts +101 -0
- package/src/server/lib/omp/session/delete.server.ts +139 -0
- package/src/server/lib/omp/session/file-scan.ts +180 -0
- package/src/server/lib/omp/session/files.test.ts +147 -0
- package/src/server/lib/omp/session/files.ts +298 -0
- package/src/server/lib/omp/session/goal-auditor.server.ts +187 -0
- package/src/server/lib/omp/session/goal-auditor.test.ts +76 -0
- package/src/server/lib/omp/session/goal-driver.server.ts +230 -0
- package/src/server/lib/omp/session/goal-driver.test.ts +220 -0
- package/src/server/lib/omp/session/goal-settings.server.ts +48 -0
- package/src/server/lib/omp/session/goal-settings.test.ts +45 -0
- package/src/server/lib/omp/session/lease-flock.server.ts +117 -0
- package/src/server/lib/omp/session/lease-holder.server.ts +156 -0
- package/src/server/lib/omp/session/local-runs.server.ts +38 -0
- package/src/server/lib/omp/session/locator.ts +70 -0
- package/src/server/lib/omp/session/merge-stored-anchor.test.ts +85 -0
- package/src/server/lib/omp/session/merge-stored-notices.test.ts +81 -0
- package/src/server/lib/omp/session/merge-stored-overlay-rows.test.ts +106 -0
- package/src/server/lib/omp/session/merge-stored.test.ts +118 -0
- package/src/server/lib/omp/session/merge-stored.ts +307 -0
- package/src/server/lib/omp/session/messages.test.ts +182 -0
- package/src/server/lib/omp/session/messages.ts +288 -0
- package/src/server/lib/omp/session/modes.test.ts +146 -0
- package/src/server/lib/omp/session/modes.ts +164 -0
- package/src/server/lib/omp/session/ownership.server.test.ts +271 -0
- package/src/server/lib/omp/session/ownership.server.ts +156 -0
- package/src/server/lib/omp/session/plan-mode-env.test.ts +65 -0
- package/src/server/lib/omp/session/plans.test.ts +64 -0
- package/src/server/lib/omp/session/plans.ts +192 -0
- package/src/server/lib/omp/session/reader.ts +162 -0
- package/src/server/lib/omp/session/reload.server.test.ts +111 -0
- package/src/server/lib/omp/session/reload.server.ts +114 -0
- package/src/server/lib/omp/session/rename-with-ai.server.test.ts +137 -0
- package/src/server/lib/omp/session/rename-with-ai.server.ts +197 -0
- package/src/server/lib/omp/session/rewind-file.test.ts +212 -0
- package/src/server/lib/omp/session/rewind-file.ts +248 -0
- package/src/server/lib/omp/session/scan.ts +119 -0
- package/src/server/lib/omp/session/session-discovery.test.ts +248 -0
- package/src/server/lib/omp/session/session-reads.test.ts +297 -0
- package/src/server/lib/omp/session/sessions-watch.server.ts +115 -0
- package/src/server/lib/omp/session/sidebar-data.server.ts +270 -0
- package/src/server/lib/omp/session/standby.server.test.ts +109 -0
- package/src/server/lib/omp/session/standby.server.ts +122 -0
- package/src/server/lib/omp/session/subagent-presence.ts +108 -0
- package/src/server/lib/omp/session/telemetry/compute.ts +206 -0
- package/src/server/lib/omp/session/telemetry/format.ts +110 -0
- package/src/server/lib/omp/session/telemetry/index.ts +4 -0
- package/src/server/lib/omp/session/telemetry/scan.ts +103 -0
- package/src/server/lib/omp/session/telemetry-raw.ts +112 -0
- package/src/server/lib/omp/session/telemetry.test.ts +154 -0
- package/src/server/lib/omp/session/title-model-overlay.server.test.ts +152 -0
- package/src/server/lib/omp/session/title-model-overlay.server.ts +161 -0
- package/src/server/lib/omp/session/title-slot.ts +203 -0
- package/src/server/lib/omp/session/todos.ts +100 -0
- package/src/server/lib/omp/session/usage/aggregate-shaping.test.ts +149 -0
- package/src/server/lib/omp/session/usage/aggregate.test.ts +243 -0
- package/src/server/lib/omp/session/usage/aggregate.ts +330 -0
- package/src/server/lib/omp/session/usage/shaping.ts +130 -0
- package/src/server/lib/omp/subagent/history/fold.ts +196 -0
- package/src/server/lib/omp/subagent/history/index.ts +110 -0
- package/src/server/lib/omp/subagent/history/paths.ts +29 -0
- package/src/server/lib/omp/subagent/history/transcript.test.ts +87 -0
- package/src/server/lib/omp/subagent/history/transcript.ts +122 -0
- package/src/server/lib/panels/assets.server.ts +70 -0
- package/src/server/lib/panels/auto-update.server.test.ts +138 -0
- package/src/server/lib/panels/auto-update.server.ts +148 -0
- package/src/server/lib/panels/baseline.server.test.ts +104 -0
- package/src/server/lib/panels/baseline.server.ts +122 -0
- package/src/server/lib/panels/build-targets.server.ts +107 -0
- package/src/server/lib/panels/build.server.test.ts +289 -0
- package/src/server/lib/panels/build.server.ts +297 -0
- package/src/server/lib/panels/bundled-catalog.server.ts +54 -0
- package/src/server/lib/panels/catalog.server.test.ts +149 -0
- package/src/server/lib/panels/catalog.server.ts +142 -0
- package/src/server/lib/panels/compat.server.test.ts +122 -0
- package/src/server/lib/panels/compat.server.ts +79 -0
- package/src/server/lib/panels/files.server.test.ts +133 -0
- package/src/server/lib/panels/files.server.ts +112 -0
- package/src/server/lib/panels/git-clone.server.ts +140 -0
- package/src/server/lib/panels/git-status.server.ts +46 -0
- package/src/server/lib/panels/git-update.server.test.ts +218 -0
- package/src/server/lib/panels/git-update.server.ts +187 -0
- package/src/server/lib/panels/install.server.test.ts +284 -0
- package/src/server/lib/panels/install.server.ts +240 -0
- package/src/server/lib/panels/link.server.ts +106 -0
- package/src/server/lib/panels/local-edits.server.test.ts +127 -0
- package/src/server/lib/panels/local-edits.server.ts +126 -0
- package/src/server/lib/panels/manifest.test.ts +199 -0
- package/src/server/lib/panels/manifest.ts +248 -0
- package/src/server/lib/panels/registry-bundled.server.test.ts +99 -0
- package/src/server/lib/panels/registry.server.test.ts +315 -0
- package/src/server/lib/panels/registry.server.ts +331 -0
- package/src/server/lib/panels/remove.server.test.ts +112 -0
- package/src/server/lib/panels/seed.server.ts +71 -0
- package/src/server/lib/panels/shim.test.ts +160 -0
- package/src/server/lib/panels/shim.ts +139 -0
- package/src/server/lib/panels/state.server.test.ts +131 -0
- package/src/server/lib/panels/state.server.ts +172 -0
- package/src/server/lib/panels/sync.server.test.ts +308 -0
- package/src/server/lib/panels/sync.server.ts +212 -0
- package/src/server/lib/plugins/background.server.ts +99 -0
- package/src/server/lib/plugins/background.test.ts +89 -0
- package/src/server/lib/plugins/build-server.test.ts +85 -0
- package/src/server/lib/plugins/e2e.test.ts +134 -0
- package/src/server/lib/plugins/events.server.ts +88 -0
- package/src/server/lib/plugins/http.server.ts +112 -0
- package/src/server/lib/plugins/loader.server.ts +306 -0
- package/src/server/lib/plugins/log.server.ts +40 -0
- package/src/server/lib/plugins/platform.test.ts +293 -0
- package/src/server/lib/plugins/realtime.server.ts +66 -0
- package/src/server/lib/plugins/rpc.server.ts +180 -0
- package/src/server/lib/plugins/schema.server.ts +75 -0
- package/src/server/lib/plugins/settings.server.ts +172 -0
- package/src/server/lib/plugins/shutdown.test.ts +105 -0
- package/src/server/lib/plugins/storage.server.ts +118 -0
- package/src/server/lib/queue/delivery-dispatch.server.test.ts +180 -0
- package/src/server/lib/queue/delivery-harness.ts +115 -0
- package/src/server/lib/queue/delivery.server.test.ts +206 -0
- package/src/server/lib/queue/delivery.server.ts +258 -0
- package/src/server/lib/queue/schema-migration.server.ts +50 -0
- package/src/server/lib/queue/store.server.test.ts +272 -0
- package/src/server/lib/queue/store.server.ts +219 -0
- package/src/server/lib/realtime/hub.server.test.ts +285 -0
- package/src/server/lib/realtime/hub.server.ts +318 -0
- package/src/server/lib/realtime/hub.types.ts +122 -0
- package/src/server/lib/realtime/signals.server.ts +101 -0
- package/src/server/lib/realtime/topics/btw.server.ts +25 -0
- package/src/server/lib/realtime/topics/catalog.server.ts +126 -0
- package/src/server/lib/realtime/topics/global.server.test.ts +50 -0
- package/src/server/lib/realtime/topics/global.server.ts +52 -0
- package/src/server/lib/realtime/topics/peer-relay.server.test.ts +246 -0
- package/src/server/lib/realtime/topics/peer-relay.server.ts +84 -0
- package/src/server/lib/realtime/topics/plugin.server.ts +30 -0
- package/src/server/lib/realtime/topics/session-data.server.ts +98 -0
- package/src/server/lib/realtime/topics/session.server.ts +123 -0
- package/src/server/lib/realtime/topics/workspace.server.ts +106 -0
- package/src/server/lib/realtime/topics.server.test.ts +255 -0
- package/src/server/lib/realtime/topics.server.ts +261 -0
- package/src/server/lib/remix-compat.ts +29 -0
- package/src/server/lib/route-adapter.test.ts +322 -0
- package/src/server/lib/route-adapter.ts +144 -0
- package/src/server/lib/schedule/rows.server.ts +111 -0
- package/src/server/lib/schedule/runtime.server.test.ts +191 -0
- package/src/server/lib/schedule/runtime.server.ts +252 -0
- package/src/server/lib/schedule/schema.server.ts +60 -0
- package/src/server/lib/schedule/store.server.test.ts +231 -0
- package/src/server/lib/schedule/store.server.ts +254 -0
- package/src/server/lib/sse.ts +248 -0
- package/src/server/lib/terminal/foreground.test.ts +163 -0
- package/src/server/lib/terminal/foreground.ts +122 -0
- package/src/server/lib/terminal/history.test.ts +118 -0
- package/src/server/lib/terminal/history.ts +206 -0
- package/src/server/lib/terminal/liveness.server.ts +99 -0
- package/src/server/lib/terminal/runtime.server.ts +294 -0
- package/src/server/lib/terminal/session.server.ts +256 -0
- package/src/server/lib/terminal/shell.test.ts +129 -0
- package/src/server/lib/terminal/shell.ts +146 -0
- package/src/server/lib/terminal/spawn.test.ts +50 -0
- package/src/server/lib/terminal/spawn.ts +51 -0
- package/src/server/lib/terminal/store-liveness.test.ts +324 -0
- package/src/server/lib/terminal/store.ts +72 -0
- package/src/server/lib/tray/autostart.ts +238 -0
- package/src/server/lib/tray/config.ts +141 -0
- package/src/server/lib/tray/credential.test.ts +74 -0
- package/src/server/lib/tray/credential.ts +81 -0
- package/src/server/lib/tray/entry.ts +89 -0
- package/src/server/lib/tray/host/darwin.js +180 -0
- package/src/server/lib/tray/host/linux.js +187 -0
- package/src/server/lib/tray/host/win32.ps1 +109 -0
- package/src/server/lib/tray/hosts.ts +115 -0
- package/src/server/lib/tray/runtime.server.ts +132 -0
- package/src/server/lib/tray/tray.test.ts +225 -0
- package/src/server/lib/updates/apply.ts +93 -0
- package/src/server/lib/updates/changelog-file.ts +122 -0
- package/src/server/lib/updates/changelog.test.ts +213 -0
- package/src/server/lib/updates/changelog.ts +163 -0
- package/src/server/lib/updates/check.ts +71 -0
- package/src/server/lib/updates/install-method.ts +86 -0
- package/src/server/lib/updates/install-steps.ts +81 -0
- package/src/server/lib/updates/install.test.ts +135 -0
- package/src/server/lib/updates/install.ts +302 -0
- package/src/server/lib/updates/installed-cli.test.ts +222 -0
- package/src/server/lib/updates/installed-cli.ts +139 -0
- package/src/server/lib/updates/npm.test.ts +137 -0
- package/src/server/lib/updates/npm.ts +113 -0
- package/src/server/lib/updates/omp.test.ts +116 -0
- package/src/server/lib/updates/omp.ts +139 -0
- package/src/server/lib/updates/release-url.ts +25 -0
- package/src/server/lib/updates/single-flight.test.ts +61 -0
- package/src/server/lib/updates/single-flight.ts +68 -0
- package/src/server/lib/usage/deepseek.ts +58 -0
- package/src/server/lib/usage/kenari-accounts.test.ts +162 -0
- package/src/server/lib/usage/kenari.test.ts +258 -0
- package/src/server/lib/usage/kenari.ts +255 -0
- package/src/server/lib/usage/omp-usage.server.test.ts +126 -0
- package/src/server/lib/usage/omp-usage.server.ts +203 -0
- package/src/server/lib/usage/provider-key.test.ts +325 -0
- package/src/server/lib/usage/provider-key.ts +194 -0
- package/src/server/lib/usage/providers.server.test.ts +47 -0
- package/src/server/lib/usage/providers.server.ts +214 -0
- package/src/server/lib/usage/report.server.ts +156 -0
- package/src/server/lib/usage/reset.server.test.ts +175 -0
- package/src/server/lib/usage/reset.server.ts +206 -0
- package/src/server/lib/usage/vendor-balance.server.test.ts +104 -0
- package/src/server/lib/usage/vendor-balance.server.ts +284 -0
- package/src/server/lib/wiki/git.test.ts +240 -0
- package/src/server/lib/wiki/git.ts +79 -0
- package/src/server/lib/wiki/mirror-reads.test.ts +78 -0
- package/src/server/lib/wiki/mirror.server.ts +251 -0
- package/src/server/lib/wiki/payload.server.ts +141 -0
- package/src/server/lib/wiki/provider.server.ts +84 -0
- package/src/server/lib/wiki/remote.test.ts +84 -0
- package/src/server/lib/wiki/remote.ts +104 -0
- package/src/server/lib/workspace/register-folder.server.ts +78 -0
- package/src/server/mock.server.ts +27 -0
- package/src/server/plugins/compress.ts +79 -0
- package/src/server/plugins/shell.server.test.ts +98 -0
- package/src/server/plugins/shell.server.ts +168 -0
- package/src/server/plugins/ssr.ts +199 -0
- package/src/server/plugins/static.test.ts +60 -0
- package/src/server/plugins/static.ts +164 -0
- package/src/server/routes/agent/command.test.ts +87 -0
- package/src/server/routes/agent/command.ts +247 -0
- package/src/server/routes/agent/index.ts +10 -0
- package/src/server/routes/agent/new.ts +114 -0
- package/src/server/routes/agent/prewarm.ts +27 -0
- package/src/server/routes/auth/index.ts +14 -0
- package/src/server/routes/auth/login.ts +94 -0
- package/src/server/routes/auth/logout.ts +36 -0
- package/src/server/routes/auth/password.ts +102 -0
- package/src/server/routes/auth/revoke.test.ts +115 -0
- package/src/server/routes/auth/revoke.ts +73 -0
- package/src/server/routes/auth/routes.test.ts +322 -0
- package/src/server/routes/auth/state.ts +34 -0
- package/src/server/routes/browser/index.ts +6 -0
- package/src/server/routes/browser/stream.test.ts +107 -0
- package/src/server/routes/browser/stream.ts +217 -0
- package/src/server/routes/btw/index.ts +6 -0
- package/src/server/routes/btw/topics.ts +117 -0
- package/src/server/routes/chamber/index.ts +15 -0
- package/src/server/routes/chat/index.ts +14 -0
- package/src/server/routes/chat/rewind.ts +116 -0
- package/src/server/routes/chat/root.ts +78 -0
- package/src/server/routes/chat/session.ts +235 -0
- package/src/server/routes/chat/stream.test.ts +102 -0
- package/src/server/routes/chat/stream.ts +111 -0
- package/src/server/routes/chat/turns.ts +87 -0
- package/src/server/routes/console/index.ts +18 -0
- package/src/server/routes/console/restart.test.ts +98 -0
- package/src/server/routes/console/restart.ts +44 -0
- package/src/server/routes/dictation/ws.ts +116 -0
- package/src/server/routes/files/index.ts +10 -0
- package/src/server/routes/files/root.ts +29 -0
- package/src/server/routes/files/toggle.ts +20 -0
- package/src/server/routes/folders/batch-delete.ts +68 -0
- package/src/server/routes/folders/clone.test.ts +167 -0
- package/src/server/routes/folders/clone.ts +132 -0
- package/src/server/routes/folders/create.ts +84 -0
- package/src/server/routes/folders/folder.ts +124 -0
- package/src/server/routes/folders/index.ts +26 -0
- package/src/server/routes/folders/mkdir.ts +97 -0
- package/src/server/routes/folders/routes.test.ts +185 -0
- package/src/server/routes/fs/action-create.test.ts +90 -0
- package/src/server/routes/fs/action-transfer.test.ts +159 -0
- package/src/server/routes/fs/action.test.ts +64 -0
- package/src/server/routes/fs/action.ts +175 -0
- package/src/server/routes/fs/exists.test.ts +76 -0
- package/src/server/routes/fs/exists.ts +53 -0
- package/src/server/routes/fs/git-action.test.ts +334 -0
- package/src/server/routes/fs/git-branch.test.ts +287 -0
- package/src/server/routes/fs/git-loader.test.ts +105 -0
- package/src/server/routes/fs/git-merge.test.ts +325 -0
- package/src/server/routes/fs/git-repo-details.test.ts +152 -0
- package/src/server/routes/fs/git-stash.test.ts +202 -0
- package/src/server/routes/fs/git.ts +188 -0
- package/src/server/routes/fs/index.ts +26 -0
- package/src/server/routes/fs/raw.test.ts +124 -0
- package/src/server/routes/fs/raw.ts +115 -0
- package/src/server/routes/fs/read.test.ts +146 -0
- package/src/server/routes/fs/read.ts +324 -0
- package/src/server/routes/fs/replace.ts +69 -0
- package/src/server/routes/fs/scope.test.ts +171 -0
- package/src/server/routes/fs/scope.ts +106 -0
- package/src/server/routes/fs/search.test.ts +210 -0
- package/src/server/routes/fs/search.ts +205 -0
- package/src/server/routes/fs/validate.ts +62 -0
- package/src/server/routes/health/index.ts +6 -0
- package/src/server/routes/health/probe.ts +59 -0
- package/src/server/routes/index.ts +60 -0
- package/src/server/routes/models/index.ts +8 -0
- package/src/server/routes/models/roles.ts +31 -0
- package/src/server/routes/models/root.ts +205 -0
- package/src/server/routes/omp/artifact.ts +42 -0
- package/src/server/routes/omp/blob.ts +54 -0
- package/src/server/routes/omp/extensions.ts +34 -0
- package/src/server/routes/omp/index.ts +27 -0
- package/src/server/routes/omp/login.ts +112 -0
- package/src/server/routes/omp/reload-engine.ts +39 -0
- package/src/server/routes/omp/routes.test.ts +133 -0
- package/src/server/routes/omp/state.ts +22 -0
- package/src/server/routes/panels/bindings.ts +23 -0
- package/src/server/routes/panels/build.ts +72 -0
- package/src/server/routes/panels/bundle.ts +71 -0
- package/src/server/routes/panels/css.test.ts +141 -0
- package/src/server/routes/panels/css.ts +89 -0
- package/src/server/routes/panels/icon.ts +64 -0
- package/src/server/routes/panels/install.ts +240 -0
- package/src/server/routes/panels/panel-routes.test-util.ts +126 -0
- package/src/server/routes/panels/readme.ts +69 -0
- package/src/server/routes/panels/registry.ts +27 -0
- package/src/server/routes/panels/routes.test.ts +290 -0
- package/src/server/routes/panels/server-half.test.ts +95 -0
- package/src/server/routes/plugins/bindings.ts +16 -0
- package/src/server/routes/plugins/http.ts +56 -0
- package/src/server/routes/plugins/routes.test.ts +254 -0
- package/src/server/routes/plugins/rpc.ts +65 -0
- package/src/server/routes/plugins/state.ts +36 -0
- package/src/server/routes/realtime/ws.ts +114 -0
- package/src/server/routes/schedule/bindings.ts +8 -0
- package/src/server/routes/schedule/body.ts +110 -0
- package/src/server/routes/schedule/index.ts +155 -0
- package/src/server/routes/schedule/runs.ts +23 -0
- package/src/server/routes/sessions/batch-delete.test.ts +139 -0
- package/src/server/routes/sessions/batch-delete.ts +60 -0
- package/src/server/routes/sessions/delete.test.ts +84 -0
- package/src/server/routes/sessions/delete.ts +45 -0
- package/src/server/routes/sessions/folder.ts +16 -0
- package/src/server/routes/sessions/index.ts +52 -0
- package/src/server/routes/sessions/list.ts +23 -0
- package/src/server/routes/sessions/queue.ts +134 -0
- package/src/server/routes/sessions/routes-queue.test.ts +237 -0
- package/src/server/routes/sessions/routes-read.test.ts +165 -0
- package/src/server/routes/sessions/routes.test.ts +316 -0
- package/src/server/routes/sessions/session.ts +291 -0
- package/src/server/routes/sessions/subagent-control.ts +75 -0
- package/src/server/routes/sessions/subagents.ts +82 -0
- package/src/server/routes/settings/agents.ts +128 -0
- package/src/server/routes/settings/behavior.ts +125 -0
- package/src/server/routes/settings/commands.ts +217 -0
- package/src/server/routes/settings/index.ts +39 -0
- package/src/server/routes/settings/mcp-test.ts +71 -0
- package/src/server/routes/settings/mcp.ts +261 -0
- package/src/server/routes/settings/model-override.ts +69 -0
- package/src/server/routes/settings/omp-config.ts +50 -0
- package/src/server/routes/settings/plugins.ts +218 -0
- package/src/server/routes/settings/projects.ts +89 -0
- package/src/server/routes/settings/provider-logout.test.ts +38 -0
- package/src/server/routes/settings/provider-logout.ts +104 -0
- package/src/server/routes/settings/provider-model.ts +107 -0
- package/src/server/routes/settings/provider-models.ts +190 -0
- package/src/server/routes/settings/providers.ts +182 -0
- package/src/server/routes/settings/root.ts +45 -0
- package/src/server/routes/settings/settings-config-routes.test.ts +271 -0
- package/src/server/routes/settings/settings-store-routes.test.ts +334 -0
- package/src/server/routes/settings/skills.ts +227 -0
- package/src/server/routes/settings/usage-reset.ts +60 -0
- package/src/server/routes/settings/usage.ts +36 -0
- package/src/server/routes/telemetry/context.ts +59 -0
- package/src/server/routes/telemetry/index.ts +10 -0
- package/src/server/routes/telemetry/raw-messages.ts +80 -0
- package/src/server/routes/telemetry/tokens.ts +166 -0
- package/src/server/routes/terminal/index.ts +6 -0
- package/src/server/routes/terminal/sessions.ts +24 -0
- package/src/server/routes/terminal/ws.ts +155 -0
- package/src/server/routes/updates/apply.ts +140 -0
- package/src/server/routes/updates/changelog.ts +32 -0
- package/src/server/routes/updates/check.ts +27 -0
- package/src/server/routes/updates/index.ts +10 -0
- package/src/server/routes/updates/routes.test.ts +269 -0
- package/src/server/routes/well-known/devtools.ts +9 -0
- package/src/server/routes/well-known/index.ts +6 -0
- package/src/server/routes/wiki/asset.ts +69 -0
- package/src/server/routes/wiki/index.ts +15 -0
- package/src/server/routes/wiki/page.ts +88 -0
- package/src/server/routes/wiki/repo.ts +30 -0
- package/src/shared/lib/auth/handover.test.ts +153 -0
- package/src/shared/lib/auth/handover.ts +102 -0
- package/src/shared/lib/auth/password.ts +72 -0
- package/src/shared/lib/browser/activity.ts +115 -0
- package/src/shared/lib/browser/browser-cdp.test.ts +350 -0
- package/src/shared/lib/browser/browser-helpers.test.ts +218 -0
- package/src/shared/lib/browser/browser-viewer.test.ts +312 -0
- package/src/shared/lib/browser/browser-watcher.test.ts +202 -0
- package/src/shared/lib/browser/cdp.ts +201 -0
- package/src/shared/lib/browser/connection.ts +81 -0
- package/src/shared/lib/browser/observer.ts +129 -0
- package/src/shared/lib/browser/page-context.ts +20 -0
- package/src/shared/lib/browser/targets.test.ts +45 -0
- package/src/shared/lib/browser/targets.ts +74 -0
- package/src/shared/lib/browser/url.ts +21 -0
- package/src/shared/lib/browser/util.ts +20 -0
- package/src/shared/lib/browser/viewer.ts +303 -0
- package/src/shared/lib/browser/watcher.ts +75 -0
- package/src/shared/lib/chat/ask-questions.test.ts +169 -0
- package/src/shared/lib/chat/ask-questions.ts +284 -0
- package/src/shared/lib/chat/attachments.test.ts +240 -0
- package/src/shared/lib/chat/attachments.ts +299 -0
- package/src/shared/lib/chat/btw/client.ts +83 -0
- package/src/shared/lib/chat/capitalize.ts +9 -0
- package/src/shared/lib/chat/chat-display.test.ts +284 -0
- package/src/shared/lib/chat/composer/client.test.ts +48 -0
- package/src/shared/lib/chat/composer/client.ts +233 -0
- package/src/shared/lib/chat/composer/commands.test.ts +307 -0
- package/src/shared/lib/chat/composer/commands.ts +290 -0
- package/src/shared/lib/chat/composer/composer.test.ts +195 -0
- package/src/shared/lib/chat/composer/draft.ts +39 -0
- package/src/shared/lib/chat/composer/filter.test.ts +178 -0
- package/src/shared/lib/chat/composer/filter.ts +76 -0
- package/src/shared/lib/chat/composer/keybindings.test.ts +74 -0
- package/src/shared/lib/chat/composer/keybindings.ts +55 -0
- package/src/shared/lib/chat/composer/owned-commands.test.ts +53 -0
- package/src/shared/lib/chat/composer/scope.test.ts +93 -0
- package/src/shared/lib/chat/composer/translate.test.ts +199 -0
- package/src/shared/lib/chat/composer/translate.ts +149 -0
- package/src/shared/lib/chat/composer/trigger.test.ts +276 -0
- package/src/shared/lib/chat/composer/trigger.ts +207 -0
- package/src/shared/lib/chat/composer/tui-only.test.ts +104 -0
- package/src/shared/lib/chat/composer/tui-only.ts +144 -0
- package/src/shared/lib/chat/context/usage.test.ts +73 -0
- package/src/shared/lib/chat/context/usage.ts +77 -0
- package/src/shared/lib/chat/detect-format.ts +38 -0
- package/src/shared/lib/chat/duration.ts +82 -0
- package/src/shared/lib/chat/excerpt.ts +115 -0
- package/src/shared/lib/chat/new-chat-seed.test.ts +51 -0
- package/src/shared/lib/chat/new-chat-seed.ts +36 -0
- package/src/shared/lib/chat/notice-row.test.ts +116 -0
- package/src/shared/lib/chat/notice-row.ts +79 -0
- package/src/shared/lib/chat/notice-text.ts +35 -0
- package/src/shared/lib/chat/omp/abort.ts +41 -0
- package/src/shared/lib/chat/omp/agent-events.test.ts +307 -0
- package/src/shared/lib/chat/omp/agent-events.ts +302 -0
- package/src/shared/lib/chat/omp/available-commands-cache.test.ts +67 -0
- package/src/shared/lib/chat/omp/command-output-ansi.test.ts +84 -0
- package/src/shared/lib/chat/omp/fold-deps.ts +70 -0
- package/src/shared/lib/chat/omp/fold.test.ts +245 -0
- package/src/shared/lib/chat/omp/mode-marker.test.ts +116 -0
- package/src/shared/lib/chat/omp/status.ts +42 -0
- package/src/shared/lib/chat/omp/subagent-frames.ts +51 -0
- package/src/shared/lib/chat/omp/terminal-messages.ts +47 -0
- package/src/shared/lib/chat/omp/tool-details.test.ts +134 -0
- package/src/shared/lib/chat/omp/tool-frames.test.ts +140 -0
- package/src/shared/lib/chat/omp/tool-frames.ts +107 -0
- package/src/shared/lib/chat/omp/tool-results.ts +180 -0
- package/src/shared/lib/chat/omp/transport-frames.test.ts +70 -0
- package/src/shared/lib/chat/omp/transport-frames.ts +95 -0
- package/src/shared/lib/chat/read-sse.ts +99 -0
- package/src/shared/lib/chat/stream-service.ts +197 -0
- package/src/shared/lib/chat/task-result-parser.ts +166 -0
- package/src/shared/lib/chat/text-file.ts +148 -0
- package/src/shared/lib/chat/timeline/command-output.ts +78 -0
- package/src/shared/lib/chat/timeline/omp-callbacks.test.ts +314 -0
- package/src/shared/lib/chat/timeline/omp-callbacks.ts +314 -0
- package/src/shared/lib/chat/timeline/provider-retry.test.ts +120 -0
- package/src/shared/lib/chat/timeline/provider-retry.ts +103 -0
- package/src/shared/lib/chat/timeline/run-footer.test.ts +158 -0
- package/src/shared/lib/chat/timeline/run-footer.ts +146 -0
- package/src/shared/lib/chat/timeline/run-signals.test.ts +87 -0
- package/src/shared/lib/chat/timeline/run-signals.ts +73 -0
- package/src/shared/lib/chat/timeline/steer-report.ts +35 -0
- package/src/shared/lib/chat/timeline/stream-callbacks.ts +202 -0
- package/src/shared/lib/chat/timeline/stream-coalescer.ts +66 -0
- package/src/shared/lib/chat/timeline/stream-raf.test.ts +104 -0
- package/src/shared/lib/chat/timeline/stream-raf.ts +59 -0
- package/src/shared/lib/chat/timeline/stream.test.ts +282 -0
- package/src/shared/lib/chat/timeline/tool-phrases.test.ts +185 -0
- package/src/shared/lib/chat/timeline/tool-phrases.ts +235 -0
- package/src/shared/lib/chat/timeline/tool-verbs.test.ts +229 -0
- package/src/shared/lib/chat/timeline/tool-verbs.ts +180 -0
- package/src/shared/lib/chat/timeline/turns.ts +37 -0
- package/src/shared/lib/chat/title-case.ts +293 -0
- package/src/shared/lib/chat/todo/nested-phase.ts +64 -0
- package/src/shared/lib/chat/todo/parser.test.ts +165 -0
- package/src/shared/lib/chat/todo/parser.ts +262 -0
- package/src/shared/lib/chat/todo/progress.test.ts +265 -0
- package/src/shared/lib/chat/todo/progress.ts +97 -0
- package/src/shared/lib/chat/todo/snapshot.test.ts +156 -0
- package/src/shared/lib/chat/todo/snapshot.ts +215 -0
- package/src/shared/lib/chat/tool/artifact-view.test.ts +66 -0
- package/src/shared/lib/chat/tool/artifact-view.ts +80 -0
- package/src/shared/lib/chat/tool/artifact.test.ts +74 -0
- package/src/shared/lib/chat/tool/artifact.ts +66 -0
- package/src/shared/lib/chat/tool/labels.ts +55 -0
- package/src/shared/lib/chat/tool/output-window.test.ts +69 -0
- package/src/shared/lib/chat/tool/output-window.ts +73 -0
- package/src/shared/lib/chat/tool/proc-facts.ts +93 -0
- package/src/shared/lib/chat/tool/summary-proc.test.ts +118 -0
- package/src/shared/lib/chat/tool/summary-wait.test.ts +92 -0
- package/src/shared/lib/chat/tool/summary.test.ts +329 -0
- package/src/shared/lib/chat/tool/summary.ts +349 -0
- package/src/shared/lib/chat/tool/wait-facts.ts +50 -0
- package/src/shared/lib/chat/tool-output.test.ts +206 -0
- package/src/shared/lib/chat/tool-output.ts +68 -0
- package/src/shared/lib/chat/tool-status.ts +20 -0
- package/src/shared/lib/chat/xml-envelope.test.ts +208 -0
- package/src/shared/lib/chat/xml-envelope.ts +151 -0
- package/src/shared/lib/chat/xml-tag.test.ts +257 -0
- package/src/shared/lib/chat/xml-tag.ts +221 -0
- package/src/shared/lib/code/ansi.ts +24 -0
- package/src/shared/lib/code/editor/commands.test.ts +155 -0
- package/src/shared/lib/code/editor/commands.ts +260 -0
- package/src/shared/lib/code/editor/edits.test.ts +100 -0
- package/src/shared/lib/code/editor/edits.ts +122 -0
- package/src/shared/lib/code/editor/find-status.test.ts +50 -0
- package/src/shared/lib/code/editor/find-status.ts +36 -0
- package/src/shared/lib/code/editor/find.test.ts +203 -0
- package/src/shared/lib/code/editor/find.ts +236 -0
- package/src/shared/lib/code/editor/history.test.ts +118 -0
- package/src/shared/lib/code/editor/history.ts +101 -0
- package/src/shared/lib/code/editor/keymap.test.ts +109 -0
- package/src/shared/lib/code/editor/keymap.ts +151 -0
- package/src/shared/lib/code/editor/layers.test.ts +77 -0
- package/src/shared/lib/code/editor/layers.ts +67 -0
- package/src/shared/lib/code/editor/line-edits.test.ts +131 -0
- package/src/shared/lib/code/editor/line-edits.ts +159 -0
- package/src/shared/lib/code/editor/lines.test.ts +81 -0
- package/src/shared/lib/code/editor/lines.ts +83 -0
- package/src/shared/lib/code/editor/marks.test.ts +86 -0
- package/src/shared/lib/code/editor/marks.ts +106 -0
- package/src/shared/lib/code/editor/occurrences.test.ts +117 -0
- package/src/shared/lib/code/editor/occurrences.ts +111 -0
- package/src/shared/lib/code/editor/palette.test.ts +91 -0
- package/src/shared/lib/code/editor/palette.ts +92 -0
- package/src/shared/lib/code/editor/reset-css.test.ts +35 -0
- package/src/shared/lib/code/editor/reset-css.ts +32 -0
- package/src/shared/lib/code/editor/text-commands.test.ts +178 -0
- package/src/shared/lib/code/editor/text-commands.ts +154 -0
- package/src/shared/lib/code/editor/typography.test.ts +93 -0
- package/src/shared/lib/code/editor/typography.ts +86 -0
- package/src/shared/lib/code/format.ts +17 -0
- package/src/shared/lib/code/highlight-cache.test.ts +121 -0
- package/src/shared/lib/code/highlight-cache.ts +99 -0
- package/src/shared/lib/code/highlighter-lazy.ts +106 -0
- package/src/shared/lib/code/highlighter.ts +132 -0
- package/src/shared/lib/code/language.ts +165 -0
- package/src/shared/lib/code/lazy-window.test.ts +161 -0
- package/src/shared/lib/code/lazy-window.ts +156 -0
- package/src/shared/lib/code/line-endings.test.ts +38 -0
- package/src/shared/lib/code/line-endings.ts +56 -0
- package/src/shared/lib/code/outline/document.ts +56 -0
- package/src/shared/lib/code/outline/extract.test.ts +246 -0
- package/src/shared/lib/code/outline/extract.ts +57 -0
- package/src/shared/lib/code/outline/languages.test.ts +246 -0
- package/src/shared/lib/code/outline/languages.ts +266 -0
- package/src/shared/lib/code/outline/rules.ts +285 -0
- package/src/shared/lib/code/outline/scan.ts +184 -0
- package/src/shared/lib/code/outline/spec.ts +24 -0
- package/src/shared/lib/code/outline/types.ts +87 -0
- package/src/shared/lib/code/outline/walk.ts +231 -0
- package/src/shared/lib/code/parser.ts +237 -0
- package/src/shared/lib/code/shiki-langs.ts +93 -0
- package/src/shared/lib/code/shiki-themes.ts +18 -0
- package/src/shared/lib/code/syntax-highlight.test.ts +340 -0
- package/src/shared/lib/code/syntax-highlight.ts +207 -0
- package/src/shared/lib/code/windowed-highlight.ts +114 -0
- package/src/shared/lib/db/transaction.server.ts +20 -0
- package/src/shared/lib/dictation/audio.ts +75 -0
- package/src/shared/lib/dictation/models.test.ts +95 -0
- package/src/shared/lib/dictation/models.ts +139 -0
- package/src/shared/lib/dictation/protocol.ts +110 -0
- package/src/shared/lib/fonts/NOTICE.md +44 -0
- package/src/shared/lib/fonts/nerd-symbols.css +55 -0
- package/src/shared/lib/fonts/nerd-symbols.test.ts +176 -0
- package/src/shared/lib/fonts/symbols-nerd-font-mono.woff2 +0 -0
- package/src/shared/lib/format/number.test.ts +127 -0
- package/src/shared/lib/format/number.ts +69 -0
- package/src/shared/lib/format/time.test.ts +113 -0
- package/src/shared/lib/format/time.ts +58 -0
- package/src/shared/lib/fs/browse.ts +45 -0
- package/src/shared/lib/fs/clipboard.test.ts +182 -0
- package/src/shared/lib/fs/clipboard.ts +182 -0
- package/src/shared/lib/fs/commit-count.test.ts +50 -0
- package/src/shared/lib/fs/commit-count.ts +34 -0
- package/src/shared/lib/fs/commit-page.ts +10 -0
- package/src/shared/lib/fs/commit-row.ts +65 -0
- package/src/shared/lib/fs/csv.ts +159 -0
- package/src/shared/lib/fs/diff-parser.test.ts +116 -0
- package/src/shared/lib/fs/diff-parser.ts +213 -0
- package/src/shared/lib/fs/document-kind.test.ts +189 -0
- package/src/shared/lib/fs/document-kind.ts +136 -0
- package/src/shared/lib/fs/excerpt-diff.test.ts +130 -0
- package/src/shared/lib/fs/excerpt-diff.ts +127 -0
- package/src/shared/lib/fs/file-kind-classify.test.ts +143 -0
- package/src/shared/lib/fs/file-kind.test.ts +256 -0
- package/src/shared/lib/fs/file-kind.ts +283 -0
- package/src/shared/lib/fs/file-tree.ts +31 -0
- package/src/shared/lib/fs/fs-helpers.test.ts +318 -0
- package/src/shared/lib/fs/git-graph.test.ts +211 -0
- package/src/shared/lib/fs/git-graph.ts +184 -0
- package/src/shared/lib/fs/git-status.test.ts +245 -0
- package/src/shared/lib/fs/git-status.ts +196 -0
- package/src/shared/lib/fs/git-unmerged.test.ts +123 -0
- package/src/shared/lib/fs/git-unmerged.ts +100 -0
- package/src/shared/lib/fs/paths.test.ts +90 -0
- package/src/shared/lib/fs/paths.ts +109 -0
- package/src/shared/lib/fs/repo-groups.ts +85 -0
- package/src/shared/lib/fs/repo-label.test.ts +118 -0
- package/src/shared/lib/fs/repo-label.ts +55 -0
- package/src/shared/lib/fs/search-list.test.ts +139 -0
- package/src/shared/lib/fs/search-list.ts +187 -0
- package/src/shared/lib/fs/search-row.test.ts +66 -0
- package/src/shared/lib/fs/search-row.ts +55 -0
- package/src/shared/lib/git/url.test.ts +69 -0
- package/src/shared/lib/git/url.ts +76 -0
- package/src/shared/lib/markdown/autolink.test.ts +32 -0
- package/src/shared/lib/markdown/autolink.ts +50 -0
- package/src/shared/lib/markdown/directives.ts +96 -0
- package/src/shared/lib/markdown/document-urls.test.ts +68 -0
- package/src/shared/lib/markdown/document-urls.ts +118 -0
- package/src/shared/lib/markdown/fira-code-fonts.css +51 -0
- package/src/shared/lib/markdown/katex-fonts.css +20 -0
- package/src/shared/lib/markdown/katex.ts +111 -0
- package/src/shared/lib/markdown/marked.ts +336 -0
- package/src/shared/lib/markdown/math.test.ts +178 -0
- package/src/shared/lib/markdown/mermaid.ts +169 -0
- package/src/shared/lib/markdown/sanitize.ts +191 -0
- package/src/shared/lib/markdown/table.test.ts +136 -0
- package/src/shared/lib/models/catalog.ts +255 -0
- package/src/shared/lib/models/client.ts +62 -0
- package/src/shared/lib/models/identity.ts +21 -0
- package/src/shared/lib/models/models-shared.test.ts +338 -0
- package/src/shared/lib/models/preferences.test.ts +131 -0
- package/src/shared/lib/models/preferences.ts +88 -0
- package/src/shared/lib/models/provider/cleanup.ts +20 -0
- package/src/shared/lib/models/provider/connection.ts +78 -0
- package/src/shared/lib/models/provider/dialect.test.ts +258 -0
- package/src/shared/lib/models/provider/dialect.ts +208 -0
- package/src/shared/lib/models/provider/glyph.test.ts +116 -0
- package/src/shared/lib/models/provider/glyph.ts +213 -0
- package/src/shared/lib/models/provider/label.ts +40 -0
- package/src/shared/lib/models/provider/models.test.ts +306 -0
- package/src/shared/lib/models/provider/models.ts +227 -0
- package/src/shared/lib/models/provider/presets.test.ts +198 -0
- package/src/shared/lib/models/provider/presets.ts +83 -0
- package/src/shared/lib/models/provider/provider-ui.test.ts +316 -0
- package/src/shared/lib/models/remote-list.ts +125 -0
- package/src/shared/lib/models/server-cache.ts +37 -0
- package/src/shared/lib/models/thinking-levels.test.ts +102 -0
- package/src/shared/lib/models/thinking-levels.ts +68 -0
- package/src/shared/lib/omp/config/access-mode.server.ts +27 -0
- package/src/shared/lib/omp/config/access-mode.ts +31 -0
- package/src/shared/lib/omp/config/schema-extras.ts +252 -0
- package/src/shared/lib/omp/config/schema-types.ts +49 -0
- package/src/shared/lib/omp/config/schema.test.ts +214 -0
- package/src/shared/lib/omp/config/schema.ts +81 -0
- package/src/shared/lib/omp/dialog-methods.ts +57 -0
- package/src/shared/lib/omp/mode/budget.ts +21 -0
- package/src/shared/lib/omp/mode/client-signal.ts +35 -0
- package/src/shared/lib/omp/mode/constants.ts +91 -0
- package/src/shared/lib/omp/mode/format.ts +36 -0
- package/src/shared/lib/omp/mode/markers.test.ts +111 -0
- package/src/shared/lib/omp/mode/markers.ts +105 -0
- package/src/shared/lib/omp/mode/notice.test.ts +107 -0
- package/src/shared/lib/omp/mode/notice.ts +135 -0
- package/src/shared/lib/omp/mode/status.ts +39 -0
- package/src/shared/lib/omp/mode/tables.test.ts +217 -0
- package/src/shared/lib/omp/mode/types.ts +190 -0
- package/src/shared/lib/omp/rpc/frame.test.ts +241 -0
- package/src/shared/lib/omp/rpc/frame.ts +151 -0
- package/src/shared/lib/omp/session/default-title.test.ts +79 -0
- package/src/shared/lib/omp/session/default-title.ts +83 -0
- package/src/shared/lib/omp/session/hashline-patch.test.ts +89 -0
- package/src/shared/lib/omp/session/hashline-patch.ts +134 -0
- package/src/shared/lib/omp/session/inlined-attachments.test.ts +82 -0
- package/src/shared/lib/omp/session/jsonl.test.ts +178 -0
- package/src/shared/lib/omp/session/jsonl.ts +182 -0
- package/src/shared/lib/omp/session/mapper.test.ts +299 -0
- package/src/shared/lib/omp/session/mapper.ts +175 -0
- package/src/shared/lib/omp/session/messages-map.test.ts +340 -0
- package/src/shared/lib/omp/session/messages-map.ts +259 -0
- package/src/shared/lib/omp/session/messages-parse.ts +73 -0
- package/src/shared/lib/omp/session/narration.test.ts +113 -0
- package/src/shared/lib/omp/session/operator-title.test.ts +99 -0
- package/src/shared/lib/omp/session/operator-title.ts +136 -0
- package/src/shared/lib/omp/session/parse-message-blocks-attachments.test.ts +156 -0
- package/src/shared/lib/omp/session/parse-message-blocks-toolcall.test.ts +106 -0
- package/src/shared/lib/omp/session/parse-message-blocks.test.ts +322 -0
- package/src/shared/lib/omp/session/parse-message-blocks.ts +328 -0
- package/src/shared/lib/omp/session/prewarm-misc.test.ts +326 -0
- package/src/shared/lib/omp/session/prewarm.ts +41 -0
- package/src/shared/lib/omp/session/proc.test.ts +256 -0
- package/src/shared/lib/omp/session/proc.ts +322 -0
- package/src/shared/lib/omp/session/schema-migrations.ts +35 -0
- package/src/shared/lib/omp/session/sidebar.test.ts +180 -0
- package/src/shared/lib/omp/session/sidebar.ts +77 -0
- package/src/shared/lib/omp/session/skill-bubble.test.ts +94 -0
- package/src/shared/lib/omp/session/stream-heal.server.test.ts +123 -0
- package/src/shared/lib/omp/session/stream-heal.server.ts +175 -0
- package/src/shared/lib/omp/session/stream-state.server.test.ts +106 -0
- package/src/shared/lib/omp/session/stream-state.server.ts +199 -0
- package/src/shared/lib/omp/session/telemetry-blocks.ts +60 -0
- package/src/shared/lib/omp/session/timestamps.ts +20 -0
- package/src/shared/lib/omp/session/tool-duration.test.ts +61 -0
- package/src/shared/lib/omp/session/tool-images.test.ts +95 -0
- package/src/shared/lib/omp/session/tool-images.ts +98 -0
- package/src/shared/lib/omp/session/turn-error.ts +40 -0
- package/src/shared/lib/omp/session/wait.test.ts +167 -0
- package/src/shared/lib/omp/session/wait.ts +267 -0
- package/src/shared/lib/omp/subagent/control.ts +46 -0
- package/src/shared/lib/omp/subagent/history/client.ts +76 -0
- package/src/shared/lib/omp/subagent/history/settlement.test.ts +344 -0
- package/src/shared/lib/omp/subagent/history/settlement.ts +113 -0
- package/src/shared/lib/omp/subagent/history/status.ts +40 -0
- package/src/shared/lib/omp/subagent/label.test.ts +94 -0
- package/src/shared/lib/omp/subagent/label.ts +84 -0
- package/src/shared/lib/omp/subagent/parse.test.ts +88 -0
- package/src/shared/lib/omp/subagent/parse.ts +301 -0
- package/src/shared/lib/omp/subagent/result-details.ts +53 -0
- package/src/shared/lib/omp/subagent/transcript-client.test.ts +100 -0
- package/src/shared/lib/omp/subagent/transcript-client.ts +194 -0
- package/src/shared/lib/panels/capabilities.test.ts +78 -0
- package/src/shared/lib/panels/capabilities.ts +40 -0
- package/src/shared/lib/panels/css-scope.test.ts +98 -0
- package/src/shared/lib/panels/css-scope.ts +171 -0
- package/src/shared/lib/panels/resolve-asset.test.ts +74 -0
- package/src/shared/lib/panels/resolve-asset.ts +45 -0
- package/src/shared/lib/plugins/protocol.ts +70 -0
- package/src/shared/lib/realtime/client.ts +328 -0
- package/src/shared/lib/realtime/connection.test.ts +301 -0
- package/src/shared/lib/realtime/connection.ts +314 -0
- package/src/shared/lib/realtime/protocol.ts +297 -0
- package/src/shared/lib/realtime/state.ts +174 -0
- package/src/shared/lib/schedule/parse.test.ts +187 -0
- package/src/shared/lib/schedule/parse.ts +303 -0
- package/src/shared/lib/settings/client.test.ts +72 -0
- package/src/shared/lib/settings/client.ts +129 -0
- package/src/shared/lib/settings/diff.test.ts +31 -0
- package/src/shared/lib/settings/diff.ts +37 -0
- package/src/shared/lib/settings/keys.ts +51 -0
- package/src/shared/lib/theme/catalog.test.ts +168 -0
- package/src/shared/lib/theme/catalog.ts +98 -0
- package/src/shared/lib/theme/chrome.test.ts +53 -0
- package/src/shared/lib/theme/chrome.ts +41 -0
- package/src/shared/lib/theme/color.test.ts +102 -0
- package/src/shared/lib/theme/color.ts +88 -0
- package/src/shared/lib/theme/css.ts +70 -0
- package/src/shared/lib/theme/palettes/dark.ts +313 -0
- package/src/shared/lib/theme/palettes/kabmo.ts +61 -0
- package/src/shared/lib/theme/palettes/light.ts +313 -0
- package/src/shared/lib/theme/theme.test.ts +199 -0
- package/src/shared/lib/ui/key-binding.test.ts +134 -0
- package/src/shared/lib/ui/key-binding.ts +143 -0
- package/src/shared/lib/updates/popup-state.test.ts +98 -0
- package/src/shared/lib/updates/popup-state.ts +67 -0
- package/src/shared/lib/updates/popup.test.ts +30 -0
- package/src/shared/lib/updates/progress.test.ts +54 -0
- package/src/shared/lib/updates/progress.ts +50 -0
- package/src/shared/lib/updates/semver.test.ts +147 -0
- package/src/shared/lib/updates/semver.ts +109 -0
- package/src/shared/lib/util/guards.test.ts +48 -0
- package/src/shared/lib/util/guards.ts +14 -0
- package/src/shared/lib/util/platform.test.ts +87 -0
- package/src/shared/lib/util/platform.ts +30 -0
- package/src/shared/lib/wiki/document-urls.test.ts +85 -0
- package/src/shared/lib/wiki/document-urls.ts +109 -0
- package/src/shared/lib/wiki/pages.test.ts +265 -0
- package/src/shared/lib/wiki/pages.ts +242 -0
- package/src/shared/lib/wiki/sidebar.test.ts +265 -0
- package/src/shared/lib/wiki/sidebar.ts +170 -0
- package/src/shared/lib/workspace/active-project.ts +42 -0
- package/src/shared/lib/workspace/batch-select.test.ts +92 -0
- package/src/shared/lib/workspace/batch-select.ts +86 -0
- package/src/shared/lib/workspace/file-tab-id.ts +29 -0
- package/src/shared/lib/workspace/keymap.test.ts +82 -0
- package/src/shared/lib/workspace/keymap.ts +30 -0
- package/src/shared/lib/workspace/panel-ids.test.ts +66 -0
- package/src/shared/lib/workspace/panel-ids.ts +59 -0
- package/src/shared/lib/workspace/panel-order.test.ts +133 -0
- package/src/shared/lib/workspace/panel-order.ts +127 -0
- package/src/shared/lib/workspace/panel-widths.test.ts +276 -0
- package/src/shared/lib/workspace/panel-widths.ts +329 -0
- package/src/shared/lib/workspace/project-icon.ts +29 -0
- package/src/shared/lib/workspace/project-settings-migration.ts +62 -0
- package/src/shared/lib/workspace/project-settings.test.ts +350 -0
- package/src/shared/lib/workspace/project-settings.ts +139 -0
- package/src/shared/lib/workspace/refresh-cadence.test.ts +117 -0
- package/src/shared/lib/workspace/refresh-cadence.ts +58 -0
- package/src/shared/lib/workspace/relative-time.ts +25 -0
- package/src/shared/lib/workspace/right-panels.ts +110 -0
- package/src/shared/lib/workspace/schema-migrations.ts +19 -0
- package/src/shared/lib/workspace/scroll-positions.test.ts +82 -0
- package/src/shared/lib/workspace/scroll-positions.ts +101 -0
- package/src/shared/lib/workspace/session-state/listeners.ts +70 -0
- package/src/shared/lib/workspace/session-state/store.test.ts +328 -0
- package/src/shared/lib/workspace/session-state/store.ts +330 -0
- package/src/shared/lib/workspace/session-visibility.test.ts +117 -0
- package/src/shared/lib/workspace/session-visibility.ts +76 -0
- package/src/shared/lib/workspace/sidebar-expanded.ts +23 -0
- package/src/shared/lib/workspace/sidebar-sort.test.ts +210 -0
- package/src/shared/lib/workspace/sidebar-sort.ts +140 -0
- package/src/shared/lib/workspace/sidebar-toolbar.test.ts +77 -0
- package/src/shared/lib/workspace/sidebar-toolbar.ts +106 -0
- package/src/shared/lib/workspace/sidebar-width.test.ts +111 -0
- package/src/shared/lib/workspace/sidebar-width.ts +106 -0
- package/src/shared/lib/workspace/terminal/keys.test.ts +189 -0
- package/src/shared/lib/workspace/terminal/keys.ts +225 -0
- package/src/shared/lib/workspace/terminal/protocol.test.ts +242 -0
- package/src/shared/lib/workspace/terminal/protocol.ts +222 -0
- package/src/shared/lib/workspace/workspace-modules.test.ts +300 -0
- package/src/shared/types/browser.ts +58 -0
- package/src/shared/types/btw.ts +123 -0
- package/src/shared/types/chat.ts +330 -0
- package/src/shared/types/context.ts +87 -0
- package/src/shared/types/fs.ts +77 -0
- package/src/shared/types/git.ts +169 -0
- package/src/shared/types/index.ts +31 -0
- package/src/shared/types/models.ts +101 -0
- package/src/shared/types/omp/agent.ts +223 -0
- package/src/shared/types/omp/instructions.ts +38 -0
- package/src/shared/types/omp/session.ts +156 -0
- package/src/shared/types/omp/subagent.ts +186 -0
- package/src/shared/types/panels.ts +334 -0
- package/src/shared/types/plan.ts +42 -0
- package/src/shared/types/realtime.ts +34 -0
- package/src/shared/types/schedule.ts +67 -0
- package/src/shared/types/settings/agent.ts +16 -0
- package/src/shared/types/settings/command.ts +38 -0
- package/src/shared/types/settings/mcp.ts +22 -0
- package/src/shared/types/settings/plugin.ts +107 -0
- package/src/shared/types/settings/project.ts +18 -0
- package/src/shared/types/settings/provider.ts +135 -0
- package/src/shared/types/settings/skill.ts +48 -0
- package/src/shared/types/settings/state.ts +81 -0
- package/src/shared/types/settings/usage.ts +237 -0
- package/src/shared/types/terminal.ts +12 -0
- package/src/shared/types/theme.ts +48 -0
- package/src/shared/types/todo.ts +108 -0
- package/src/shared/types/tokenUsage.ts +44 -0
- package/src/shared/types/updates.ts +99 -0
- package/src/shared/types/wiki.ts +132 -0
- package/src/shared/types/workspace.ts +69 -0
- package/src/test-support/executable-stub.ts +107 -0
- package/src/test-support/fake-git.ts +121 -0
- package/src/test-support/fake-omp-fork.ts +146 -0
- package/src/test-support/file-actions.test-util.ts +206 -0
- package/src/test-support/file-clipboard.test-util.ts +52 -0
- package/src/test-support/file-editor.test-util.ts +182 -0
- package/src/test-support/file-explorer.test-util.ts +317 -0
- package/src/test-support/isolated-db.ts +51 -0
- package/src/test-support/peer-harness.ts +205 -0
- package/src/test-support/platform.test.ts +48 -0
- package/src/test-support/platform.ts +51 -0
- package/src/test-support/pristine-globals.ts +124 -0
- package/src/test-support/realtime-server.ts +154 -0
- package/src/test-support/remove-dir.ts +78 -0
- package/tsconfig.json +67 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Panel-plugin discovery.
|
|
8
|
+
*
|
|
9
|
+
* ONE store and ONE working marketplace:
|
|
10
|
+
*
|
|
11
|
+
* <package>/marketplace/ the STORE — what the app ships
|
|
12
|
+
* plugins/session-info/ an offer, not an install
|
|
13
|
+
*
|
|
14
|
+
* ~/.kabmo/marketplace/ the WORKING copy — what is installed
|
|
15
|
+
* marketplace.json the catalog
|
|
16
|
+
* plugins/session-info/ an installed plugin
|
|
17
|
+
* package.json manifest under its `kabmo` key
|
|
18
|
+
* dist/app.js the built ESM bundle the host imports
|
|
19
|
+
*
|
|
20
|
+
* The working copy lives in the DATA directory because that is the only location
|
|
21
|
+
* both install shapes can write: a globally installed package sits in a
|
|
22
|
+
* read-only `node_modules`, and the update flow replaces it outright.
|
|
23
|
+
*
|
|
24
|
+
* The catalog and the directory are independent, and both directions matter: a
|
|
25
|
+
* plugin present under `plugins/` but absent from the catalog still loads (that
|
|
26
|
+
* is what makes a hand-copied folder work), and a catalog entry naming a
|
|
27
|
+
* directory that holds no plugin is REPORTED (that is what makes a failed
|
|
28
|
+
* install visible instead of silent).
|
|
29
|
+
*
|
|
30
|
+
* Nothing here executes plugin code: the scan reads manifests, validates them
|
|
31
|
+
* and reports every rejection with its reason, and the browser imports the
|
|
32
|
+
* bundle later from the bundle route.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
import { join, resolve } from 'path';
|
|
36
|
+
import type { PanelPluginStatus, PanelRegistryPayload } from '@/shared/types';
|
|
37
|
+
import { pathExists } from '@/server/lib/omp/core/paths';
|
|
38
|
+
import { packageDir } from '@/server/lib/fs/package-root';
|
|
39
|
+
import { getDataDir } from '@/server/lib/lifecycle/paths';
|
|
40
|
+
import { readDisabledPlugins, readPluginAutoUpdate } from '@/server/lib/panels/state.server';
|
|
41
|
+
import { readAllGitStatuses } from '@/server/lib/panels/git-status.server';
|
|
42
|
+
import { readBlockedSyncs } from '@/server/lib/panels/baseline.server';
|
|
43
|
+
import { readGitOrigin } from '@/server/lib/panels/git-clone.server';
|
|
44
|
+
import { readJsonBody, readPluginManifest, subdirectories } from '@/server/lib/panels/files.server';
|
|
45
|
+
import { toManifest, toMarketplaceCatalog } from '@/server/lib/panels/manifest';
|
|
46
|
+
import { basenameOf, bundleUrl, cssUrl, iconUrl, readmeUrlFor } from '@/server/lib/panels/assets.server';
|
|
47
|
+
import { readBundledCatalog } from '@/server/lib/panels/bundled-catalog.server';
|
|
48
|
+
import { describeIncompatibility, runningVersions } from '@/server/lib/panels/compat.server';
|
|
49
|
+
import { pluginPanelKey } from '@/shared/lib/workspace/panel-ids';
|
|
50
|
+
|
|
51
|
+
/** The marketplace root: `<data>/marketplace`, overridable for tests. */
|
|
52
|
+
export function getMarketplaceDir(): string {
|
|
53
|
+
const override = Bun.env.KABMO_MARKETPLACE_DIR ?? Bun.env.OMPCHAMBER_MARKETPLACE_DIR;
|
|
54
|
+
if (override) return resolve(override);
|
|
55
|
+
return join(getDataDir(), 'marketplace');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Where a plugin's files live inside the marketplace. */
|
|
59
|
+
export function getMarketplacePluginsDir(): string {
|
|
60
|
+
return join(getMarketplaceDir(), 'plugins');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** The catalog file, which an install appends its entry to. */
|
|
64
|
+
export function getMarketplaceCatalogPath(): string {
|
|
65
|
+
return join(getMarketplaceDir(), 'marketplace.json');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The STORE: the marketplace bundled with the package.
|
|
70
|
+
*
|
|
71
|
+
* Read-only and never copied. The bundled plugins are what the Panel Plugins
|
|
72
|
+
* pane offers to install — an offer, not an install — so nothing here is
|
|
73
|
+
* scanned as a contribution and nothing here is built. Installing one copies
|
|
74
|
+
* its directory into the working marketplace and builds it there, exactly as a
|
|
75
|
+
* git install does, which is what keeps the two install paths one code path.
|
|
76
|
+
*
|
|
77
|
+
* Overridable so the seed and install tests can point at a fixture tree.
|
|
78
|
+
*/
|
|
79
|
+
export function getBundledMarketplaceDir(): string {
|
|
80
|
+
const override = Bun.env.KABMO_BUNDLED_MARKETPLACE_DIR ?? Bun.env.OMPCHAMBER_BUNDLED_MARKETPLACE_DIR;
|
|
81
|
+
if (override) return resolve(override);
|
|
82
|
+
return join(packageDir(), 'marketplace');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** The marketplace's stable id, used to attribute panels and rejections. */
|
|
86
|
+
const MARKETPLACE_ID = 'kabmo';
|
|
87
|
+
|
|
88
|
+
const SCAN_CACHE_TTL_MS = 5_000;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A scan result: the payload the client renders, plus the plugin → directory
|
|
92
|
+
* map the bundle route needs.
|
|
93
|
+
*
|
|
94
|
+
* The two are deliberately separate. The directory is an absolute path on the
|
|
95
|
+
* user's machine, and the payload is a browser response — publishing the install
|
|
96
|
+
* layout to every plugin buys nothing, since the route resolves the root from
|
|
97
|
+
* this map rather than from the request.
|
|
98
|
+
*/
|
|
99
|
+
interface PanelScan extends PanelRegistryPayload {
|
|
100
|
+
dirs: Record<string, string>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
declare global {
|
|
104
|
+
// eslint-disable-next-line no-var
|
|
105
|
+
var __kabmoPanelScan: { at: number; dir: string; scan: PanelScan } | undefined;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** Drop the scan cache — called after an install, a remove, or a Refresh. */
|
|
109
|
+
export function invalidatePanelScan(): void {
|
|
110
|
+
globalThis.__kabmoPanelScan = undefined;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
async function runPanelScan(): Promise<PanelScan> {
|
|
114
|
+
const root = getMarketplaceDir();
|
|
115
|
+
const pluginsRoot = getMarketplacePluginsDir();
|
|
116
|
+
const scan: PanelScan = {
|
|
117
|
+
panels: [],
|
|
118
|
+
marketplaces: [],
|
|
119
|
+
errors: [],
|
|
120
|
+
plugins: [],
|
|
121
|
+
catalog: [],
|
|
122
|
+
disabledPanels: [],
|
|
123
|
+
gitStatus: {},
|
|
124
|
+
autoUpdate: false,
|
|
125
|
+
syncBlocked: {},
|
|
126
|
+
dirs: {},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// Rejections are tagged with the marketplace id so the pane groups by a value
|
|
130
|
+
// rather than by matching on a path.
|
|
131
|
+
const fail = (dir: string, reason: string, source?: string) =>
|
|
132
|
+
scan.errors.push({ dir, reason, marketplace: MARKETPLACE_ID, ...(source ? { source } : {}) });
|
|
133
|
+
|
|
134
|
+
let name = 'Kabmo';
|
|
135
|
+
let description: string | undefined;
|
|
136
|
+
|
|
137
|
+
const catalogRead = await readJsonBody(getMarketplaceCatalogPath());
|
|
138
|
+
if (catalogRead.kind === 'unreadable') {
|
|
139
|
+
fail(getMarketplaceCatalogPath(), 'marketplace.json is not valid JSON');
|
|
140
|
+
} else if (catalogRead.kind === 'body') {
|
|
141
|
+
const catalog = toMarketplaceCatalog(catalogRead.value, root);
|
|
142
|
+
if ('error' in catalog) {
|
|
143
|
+
fail(getMarketplaceCatalogPath(), catalog.error);
|
|
144
|
+
} else {
|
|
145
|
+
name = catalog.name ?? name;
|
|
146
|
+
description = catalog.description;
|
|
147
|
+
// A catalog entry naming a directory that holds no plugin is reported: it
|
|
148
|
+
// is the file saying "this is installed" while the scan found nothing, and
|
|
149
|
+
// silence would make a failed install look like a plugin that refused to
|
|
150
|
+
// load. The entry's own `source` rides along so the pane can drop that one
|
|
151
|
+
// entry — the row is otherwise a dead end the user cannot clear.
|
|
152
|
+
for (const entry of catalog.plugins ?? []) {
|
|
153
|
+
const source = resolve(root, entry.source);
|
|
154
|
+
if (!(await pathExists(source))) {
|
|
155
|
+
fail(source, `listed in marketplace.json but no plugin was found there (${entry.name})`, entry.source);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Read once, before the loop: whether a plugin is ON decides whether its
|
|
162
|
+
// bundle is published, and the flag is stored rather than derived.
|
|
163
|
+
const disabledList = await readDisabledPlugins();
|
|
164
|
+
const disabled = new Set(disabledList);
|
|
165
|
+
// The raw list travels with the payload: a BUILT-IN view is named by its bare
|
|
166
|
+
// id and the server has no built-in list to resolve it against, so the client
|
|
167
|
+
// is what filters its own views. The scan itself only ever asks about plugin
|
|
168
|
+
// ids, which is why the membership test above is the `Set`.
|
|
169
|
+
scan.disabledPanels = disabledList;
|
|
170
|
+
// Resolved ONCE per scan, and lazily relative to the loop: a plugin's
|
|
171
|
+
// `engines` is compared against what is running HERE, never a constant.
|
|
172
|
+
const running = await runningVersions();
|
|
173
|
+
const pluginStatus: PanelPluginStatus[] = [];
|
|
174
|
+
for (const pluginName of await subdirectories(pluginsRoot)) {
|
|
175
|
+
const pluginDir = join(pluginsRoot, pluginName);
|
|
176
|
+
const read = await readPluginManifest(pluginDir);
|
|
177
|
+
if (read.kind === 'none') continue;
|
|
178
|
+
if (read.kind === 'error') {
|
|
179
|
+
fail(pluginDir, read.reason);
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
const manifest = toManifest(read.value, pluginDir);
|
|
183
|
+
if ('error' in manifest) {
|
|
184
|
+
fail(pluginDir, manifest.error);
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Refused BEFORE it is admitted: an incompatible plugin must contribute
|
|
189
|
+
// nothing — no panel, no bundle, no directory for the route to resolve.
|
|
190
|
+
// The reason names both sides, because the pane's only repair is the author
|
|
191
|
+
// editing the range.
|
|
192
|
+
const refusal = describeIncompatibility(manifest, running);
|
|
193
|
+
if (refusal) {
|
|
194
|
+
fail(pluginDir, refusal);
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// A plugin is served from its build output, so every entry its manifest
|
|
199
|
+
// declares must already exist. A plugin whose build has not run is reported
|
|
200
|
+
// as UNBUILT rather than as broken — the manifest is fine, and the pane
|
|
201
|
+
// offers to run the build — which is why this is a separate list from
|
|
202
|
+
// `errors`. A plugin with BOTH an app and a server needs both.
|
|
203
|
+
const isPackage = await pathExists(join(pluginDir, 'package.json'));
|
|
204
|
+
// A plugin's enablement key carries the SAME prefix the client uses for its
|
|
205
|
+
// panel id (`plugin:<id>`), so one stored list answers for both kinds. Testing
|
|
206
|
+
// the bare manifest id here made a disabled plugin still report `enabled:
|
|
207
|
+
// true` while its panel stayed hidden — two answers for one question.
|
|
208
|
+
const enabled = !disabled.has(pluginPanelKey(manifest.id));
|
|
209
|
+
const entries = [manifest.app, manifest.server].filter((entry): entry is string => Boolean(entry));
|
|
210
|
+
let missingEntry: string | undefined;
|
|
211
|
+
for (const entry of entries) {
|
|
212
|
+
if (!(await pathExists(join(pluginDir, entry)))) {
|
|
213
|
+
missingEntry = entry;
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const built = missingEntry === undefined;
|
|
218
|
+
// The clone's own origin is what makes a plugin updatable. Read here rather
|
|
219
|
+
// than stored at install time: the directory is the install, so a URL kept
|
|
220
|
+
// beside it could disagree with it.
|
|
221
|
+
const gitOrigin = await readGitOrigin(pluginDir);
|
|
222
|
+
pluginStatus.push({
|
|
223
|
+
pluginId: manifest.id,
|
|
224
|
+
name: manifest.name,
|
|
225
|
+
version: manifest.version,
|
|
226
|
+
isPackage,
|
|
227
|
+
built,
|
|
228
|
+
enabled,
|
|
229
|
+
bundled: false,
|
|
230
|
+
gitOrigin,
|
|
231
|
+
...(missingEntry ? { reason: `the build produced no ${missingEntry}` } : {}),
|
|
232
|
+
});
|
|
233
|
+
// A switched-off plugin contributes NOTHING: no button, no tab, and no
|
|
234
|
+
// bundle for the route to serve. Its files stay on disk, which is the whole
|
|
235
|
+
// difference between disabling and removing.
|
|
236
|
+
if (!enabled || !built) continue;
|
|
237
|
+
// The directory map is the asset routes' root, so it is filled even for a
|
|
238
|
+
// server-only plugin: its README and icon are still served.
|
|
239
|
+
scan.dirs[manifest.id] = pluginDir;
|
|
240
|
+
// `panels` is the list of UI bundles the host IMPORTS, so a plugin with no
|
|
241
|
+
// `app` contributes none — its work happens on the server, not in the page.
|
|
242
|
+
if (!manifest.app) continue;
|
|
243
|
+
|
|
244
|
+
scan.panels.push({
|
|
245
|
+
pluginId: manifest.id,
|
|
246
|
+
name: manifest.name,
|
|
247
|
+
version: manifest.version,
|
|
248
|
+
appUrl: await bundleUrl(pluginDir, manifest.app),
|
|
249
|
+
// Only when the plugin DECLARED a stylesheet and the file is actually
|
|
250
|
+
// there. A manifest that names a `css` the build did not emit would
|
|
251
|
+
// otherwise put a 404 URL in the payload and a console error on every
|
|
252
|
+
// load, for a stylesheet the plugin does not have.
|
|
253
|
+
...(manifest.css && (await pathExists(join(pluginDir, manifest.css)))
|
|
254
|
+
? { cssUrl: await cssUrl(pluginDir, manifest.css) }
|
|
255
|
+
: {}),
|
|
256
|
+
...(manifest.icon ? { iconUrl: await iconUrl(pluginDir, manifest.icon) } : {}),
|
|
257
|
+
...(await readmeUrlFor(pluginDir, manifest)),
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// The bundled marketplace is a STORE, so its plugins are listed whether or
|
|
262
|
+
// not they are installed — that is what gives the pane something to install
|
|
263
|
+
// FROM. They are never scanned as contributions and never built: installing
|
|
264
|
+
// copies one into the working marketplace, where the loop above picks it up.
|
|
265
|
+
const installed = new Set(pluginStatus.map((plugin) => plugin.pluginId));
|
|
266
|
+
scan.catalog = await readBundledCatalog(getBundledMarketplaceDir(), installed);
|
|
267
|
+
// `bundled` is a property of the SOURCE, not of the install: it is what makes
|
|
268
|
+
// the pane offer "Remove" for a bundled plugin rather than "Uninstall", and
|
|
269
|
+
// it is read off the store's own list so a plugin id that exists in both
|
|
270
|
+
// places cannot report the wrong one.
|
|
271
|
+
//
|
|
272
|
+
// A git CLONE is excluded however its id reads: the store offers a plugin
|
|
273
|
+
// under that id, but the directory on disk is the user's own repository — and
|
|
274
|
+
// the sync that keeps bundled installs current selects on this same flag, so
|
|
275
|
+
// attributing a clone to the store would overwrite it on the next boot.
|
|
276
|
+
const bundledIds = new Set(scan.catalog.map((entry) => entry.pluginId));
|
|
277
|
+
for (const plugin of pluginStatus) plugin.bundled = bundledIds.has(plugin.pluginId) && plugin.gitOrigin === null;
|
|
278
|
+
|
|
279
|
+
scan.marketplaces.push({ id: MARKETPLACE_ID, name, description, panelCount: scan.panels.length, errors: [] });
|
|
280
|
+
scan.plugins = pluginStatus;
|
|
281
|
+
scan.gitStatus = readAllGitStatuses();
|
|
282
|
+
scan.autoUpdate = await readPluginAutoUpdate();
|
|
283
|
+
scan.syncBlocked = await readBlockedSyncs();
|
|
284
|
+
|
|
285
|
+
return scan;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
async function cachedScan(): Promise<PanelScan> {
|
|
289
|
+
const dir = getMarketplaceDir();
|
|
290
|
+
const cached = globalThis.__kabmoPanelScan;
|
|
291
|
+
if (cached && cached.dir === dir && Date.now() - cached.at < SCAN_CACHE_TTL_MS) return cached.scan;
|
|
292
|
+
const scan = await runPanelScan();
|
|
293
|
+
globalThis.__kabmoPanelScan = { at: Date.now(), dir, scan };
|
|
294
|
+
return scan;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/** The client payload: the marketplace, its panels, and its rejections. */
|
|
298
|
+
export async function discoverPanelPlugins(): Promise<PanelRegistryPayload> {
|
|
299
|
+
const { dirs: _dirs, ...payload } = await cachedScan();
|
|
300
|
+
return payload;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* The absolute file one plugin's bundle or icon is served from, addressed by the
|
|
305
|
+
* directory name the URL carries.
|
|
306
|
+
*
|
|
307
|
+
* The URL names a plugin DIRECTORY rather than an arbitrary path, so a caller
|
|
308
|
+
* can only ever reach a file inside a plugin the registry knows: the route
|
|
309
|
+
* resolves the root from this map and appends a relative path the manifest
|
|
310
|
+
* already had validated.
|
|
311
|
+
*
|
|
312
|
+
* TWO roots are searched, in this order, and the order is the whole point:
|
|
313
|
+
* the WORKING marketplace first, then the bundled STORE. A store card has to
|
|
314
|
+
* draw an icon for a plugin that is not installed yet, so the bundled directory
|
|
315
|
+
* must be reachable — while an installed plugin must win, or a card would keep
|
|
316
|
+
* showing the shipped icon after the user replaced it. A directory that is
|
|
317
|
+
* neither installed-and-enabled nor a bundled offer is not reachable at all,
|
|
318
|
+
* which is what makes disabling a plugin stop its code from loading rather than
|
|
319
|
+
* merely hiding its button.
|
|
320
|
+
*/
|
|
321
|
+
export async function findPluginDir(pluginName: string): Promise<string | undefined> {
|
|
322
|
+
const scan = await cachedScan();
|
|
323
|
+
for (const dir of Object.values(scan.dirs)) {
|
|
324
|
+
if (basenameOf(dir) === pluginName) return dir;
|
|
325
|
+
}
|
|
326
|
+
const bundledRoot = join(getBundledMarketplaceDir(), 'plugins');
|
|
327
|
+
for (const dir of await subdirectories(bundledRoot)) {
|
|
328
|
+
if (dir === pluginName) return join(bundledRoot, dir);
|
|
329
|
+
}
|
|
330
|
+
return undefined;
|
|
331
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Removing an installed plugin, and the catalog entry that goes with it.
|
|
8
|
+
*
|
|
9
|
+
* Split from the install suite because the two own different contracts: an
|
|
10
|
+
* install stages, validates and builds before it registers, while a remove is
|
|
11
|
+
* the one action that DELETES files and therefore has to say exactly what it
|
|
12
|
+
* deletes and what it leaves. The rule that matters is that the directory and
|
|
13
|
+
* the catalog entry go together — dropping only the directory left the catalog
|
|
14
|
+
* naming a path that no longer existed, so every removal produced a permanent
|
|
15
|
+
* "listed in marketplace.json but no plugin was found there" row, the pane
|
|
16
|
+
* showing the user's own successful action as a fault.
|
|
17
|
+
*
|
|
18
|
+
* The second rule is that a catalog which could not be pruned is reported. The
|
|
19
|
+
* directory is gone either way, so the removal SUCCEEDED; reporting it as a
|
|
20
|
+
* failure would leave the user believing the plugin is still installed, while
|
|
21
|
+
* silence would leave the leftover entry unexplained.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { afterEach, beforeEach, describe, expect, test } from 'bun:test';
|
|
25
|
+
import fs from 'node:fs';
|
|
26
|
+
import { tmpdir } from 'node:os';
|
|
27
|
+
import { join } from 'node:path';
|
|
28
|
+
|
|
29
|
+
import { discoverPanelPlugins, getMarketplaceCatalogPath, invalidatePanelScan } from '@/server/lib/panels/registry.server';
|
|
30
|
+
import { removePanelPlugin } from '@/server/lib/panels/install.server';
|
|
31
|
+
|
|
32
|
+
let root = '';
|
|
33
|
+
|
|
34
|
+
const VALID = { id: 'demo', name: 'Demo', version: '1.0.0', app: 'dist/app.js' };
|
|
35
|
+
|
|
36
|
+
/** A plugin directory with a manifest and a built bundle. */
|
|
37
|
+
function writePlugin(id: string): void {
|
|
38
|
+
const dir = join(root, 'plugins', id);
|
|
39
|
+
fs.mkdirSync(join(dir, 'dist'), { recursive: true });
|
|
40
|
+
fs.writeFileSync(join(dir, 'kabmo.json'), JSON.stringify({ ...VALID, id }));
|
|
41
|
+
fs.writeFileSync(join(dir, 'dist', 'app.js'), 'export default {};');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function writeCatalog(catalog: unknown): void {
|
|
45
|
+
fs.mkdirSync(root, { recursive: true });
|
|
46
|
+
fs.writeFileSync(getMarketplaceCatalogPath(), JSON.stringify(catalog));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
beforeEach(() => {
|
|
50
|
+
root = fs.mkdtempSync(join(tmpdir(), 'kabmo-remove-'));
|
|
51
|
+
process.env.KABMO_MARKETPLACE_DIR = root;
|
|
52
|
+
invalidatePanelScan();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
afterEach(() => {
|
|
56
|
+
delete process.env.KABMO_MARKETPLACE_DIR;
|
|
57
|
+
invalidatePanelScan();
|
|
58
|
+
fs.rmSync(root, { recursive: true, force: true });
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
describe('removePanelPlugin', () => {
|
|
62
|
+
test('removes the directory and its catalog entry, keeping other entries', async () => {
|
|
63
|
+
for (const id of ['from-git', 'keep-me']) writePlugin(id);
|
|
64
|
+
writeCatalog({
|
|
65
|
+
name: 'Keep',
|
|
66
|
+
plugins: [
|
|
67
|
+
{ name: 'keep-me', source: 'plugins/keep-me' },
|
|
68
|
+
{ name: 'from-git', source: 'plugins/from-git' },
|
|
69
|
+
],
|
|
70
|
+
});
|
|
71
|
+
invalidatePanelScan();
|
|
72
|
+
expect((await discoverPanelPlugins()).panels).toHaveLength(2);
|
|
73
|
+
|
|
74
|
+
expect((await removePanelPlugin('from-git')).ok).toBe(true);
|
|
75
|
+
expect(fs.existsSync(join(root, 'plugins', 'from-git'))).toBe(false);
|
|
76
|
+
|
|
77
|
+
// Pruning is by SOURCE, so an entry the removal does not name survives.
|
|
78
|
+
const catalog = JSON.parse(fs.readFileSync(getMarketplaceCatalogPath(), 'utf8')) as {
|
|
79
|
+
name: string;
|
|
80
|
+
plugins: Array<{ source: string }>;
|
|
81
|
+
};
|
|
82
|
+
expect(catalog.plugins.map((entry) => entry.source)).toEqual(['plugins/keep-me']);
|
|
83
|
+
expect(catalog.name).toBe('Keep');
|
|
84
|
+
|
|
85
|
+
const after = await discoverPanelPlugins();
|
|
86
|
+
expect(after.panels.map((panel) => panel.pluginId)).toEqual(['keep-me']);
|
|
87
|
+
expect(after.errors).toEqual([]);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test('refuses an id that is not installed', async () => {
|
|
91
|
+
const result = await removePanelPlugin('nope');
|
|
92
|
+
expect(result.ok).toBe(false);
|
|
93
|
+
expect(result.error).toContain('No installed plugin');
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test('reports a catalog it could not prune, with the directory still removed', async () => {
|
|
97
|
+
writePlugin('demo');
|
|
98
|
+
fs.mkdirSync(root, { recursive: true });
|
|
99
|
+
fs.writeFileSync(getMarketplaceCatalogPath(), '{ not json');
|
|
100
|
+
|
|
101
|
+
const result = await removePanelPlugin('demo');
|
|
102
|
+
expect(result.ok).toBe(true);
|
|
103
|
+
expect(result.error).toContain('not valid JSON');
|
|
104
|
+
expect(fs.existsSync(join(root, 'plugins', 'demo'))).toBe(false);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
test('refuses an id that would escape the plugins directory', async () => {
|
|
108
|
+
const result = await removePanelPlugin('../../etc');
|
|
109
|
+
expect(result.ok).toBe(false);
|
|
110
|
+
expect(result.error).toContain('Invalid plugin id');
|
|
111
|
+
});
|
|
112
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Panel-plugin state that must exist before the first request is served.
|
|
8
|
+
*
|
|
9
|
+
* The bundled marketplace used to be COPIED into the working directory on first
|
|
10
|
+
* boot. It no longer is: the bundled plugins are a STORE the user installs
|
|
11
|
+
* from (VS Code's model — an extension is not installed until you install it),
|
|
12
|
+
* so copying them would install everything on day one, which is exactly the
|
|
13
|
+
* behaviour this file exists to end.
|
|
14
|
+
*
|
|
15
|
+
* What remains is the one thing that genuinely has to happen before the
|
|
16
|
+
* listener opens: the working marketplace directory and its catalog must exist,
|
|
17
|
+
* because the scan reads them and a missing catalog is reported as a fault
|
|
18
|
+
* rather than as an empty store.
|
|
19
|
+
*
|
|
20
|
+
* There is deliberately NO marker and no one-time migration. A previous install
|
|
21
|
+
* left the bundled plugins copied into the working directory; those stay where
|
|
22
|
+
* they are and keep working (they are ordinary installed plugins now), and the
|
|
23
|
+
* user removes them from the pane if they do not want them. Deleting them on
|
|
24
|
+
* upgrade would be Kabmo taking a destructive action on files the user
|
|
25
|
+
* may be using.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import { mkdir } from 'fs/promises';
|
|
29
|
+
import { join } from 'path';
|
|
30
|
+
import { pathExists } from '@/server/lib/omp/core/paths';
|
|
31
|
+
import { getBundledMarketplaceDir, getMarketplaceCatalogPath, getMarketplacePluginsDir } from '@/server/lib/panels/registry.server';
|
|
32
|
+
|
|
33
|
+
export interface SeedResult {
|
|
34
|
+
/** True when the working marketplace had to be initialized (no catalog yet). */
|
|
35
|
+
seeded: boolean;
|
|
36
|
+
/** Why nothing was created, or what could not be. */
|
|
37
|
+
reason?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** The minimal catalog an empty working marketplace starts with. */
|
|
41
|
+
const EMPTY_CATALOG = {
|
|
42
|
+
name: 'Kabmo',
|
|
43
|
+
description: 'Panels you installed from the bundled marketplace or a git URL.',
|
|
44
|
+
owner: { name: 'Kabmo' },
|
|
45
|
+
plugins: [],
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Create the working marketplace if it does not exist yet.
|
|
50
|
+
*
|
|
51
|
+
* The bundled marketplace is only checked, never copied: a package with no
|
|
52
|
+
* `marketplace/` directory still starts (the pane simply offers nothing), and
|
|
53
|
+
* that is a state worth reporting rather than failing over.
|
|
54
|
+
*/
|
|
55
|
+
export async function seedDefaultMarketplace(): Promise<SeedResult> {
|
|
56
|
+
const catalogPath = getMarketplaceCatalogPath();
|
|
57
|
+
const hadCatalog = await pathExists(catalogPath);
|
|
58
|
+
try {
|
|
59
|
+
await mkdir(getMarketplacePluginsDir(), { recursive: true });
|
|
60
|
+
if (!hadCatalog) {
|
|
61
|
+
await Bun.write(catalogPath, JSON.stringify(EMPTY_CATALOG, null, 2) + '\n');
|
|
62
|
+
}
|
|
63
|
+
} catch (error) {
|
|
64
|
+
return { seeded: false, reason: error instanceof Error ? error.message : String(error) };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (!(await pathExists(join(getBundledMarketplaceDir(), 'plugins')))) {
|
|
68
|
+
return { seeded: !hadCatalog, reason: 'no bundled marketplace in this package' };
|
|
69
|
+
}
|
|
70
|
+
return { seeded: !hadCatalog };
|
|
71
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The runtime shim — the piece that decides whether a plugin bundle carries its
|
|
8
|
+
* own Preact.
|
|
9
|
+
*
|
|
10
|
+
* It is not a size optimisation. Two Preact instances mean two module-level hook
|
|
11
|
+
* states, and a component created by one rendered in the other's tree dies at
|
|
12
|
+
* the first render with `Cannot read properties of undefined (reading '__H')` —
|
|
13
|
+
* the whole app goes blank. So the two things pinned here are the two that
|
|
14
|
+
* matter:
|
|
15
|
+
*
|
|
16
|
+
* - every shared specifier resolves to the SHIM, not to the real module;
|
|
17
|
+
* - the generated reader forwards the module's ACTUAL named exports, because a
|
|
18
|
+
* hand-written list drifts the moment the host adds one and the plugin then
|
|
19
|
+
* fails at load with `does not provide an export named …`.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { describe, expect, test } from 'bun:test';
|
|
23
|
+
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
24
|
+
import { tmpdir } from 'node:os';
|
|
25
|
+
import { join } from 'node:path';
|
|
26
|
+
import { RUNTIME_SLOT_BY_SPECIFIER, runtimeShimPlugin, shimModuleSource } from '@/server/lib/panels/shim';
|
|
27
|
+
|
|
28
|
+
describe('RUNTIME_SLOT_BY_SPECIFIER', () => {
|
|
29
|
+
test('covers every specifier the SDK contract publishes a slot for', () => {
|
|
30
|
+
// These names are frozen by `PluginRuntimeSlots`; a rename on either side
|
|
31
|
+
// has to be caught here rather than at load in a browser.
|
|
32
|
+
expect(Object.keys(RUNTIME_SLOT_BY_SPECIFIER).sort()).toEqual(
|
|
33
|
+
[
|
|
34
|
+
'@kabmo-labs/kabmo-sdk/app',
|
|
35
|
+
'@kabmo-labs/kabmo-ui',
|
|
36
|
+
'@kabmo-labs/kabmo-ui/components',
|
|
37
|
+
// The package names before the `kabmo-` prefix was added. A bundle on
|
|
38
|
+
// disk imports these, so they have to resolve to the same slots.
|
|
39
|
+
'@kabmo-labs/plugin-sdk/app',
|
|
40
|
+
'@kabmo-labs/ui',
|
|
41
|
+
'@kabmo-labs/ui/components',
|
|
42
|
+
// And the names from before the product rename.
|
|
43
|
+
'@ompchamber/plugin-sdk/app',
|
|
44
|
+
'@ompchamber/ui',
|
|
45
|
+
'@ompchamber/ui/components',
|
|
46
|
+
'preact',
|
|
47
|
+
'preact/compat',
|
|
48
|
+
'preact/hooks',
|
|
49
|
+
'preact/jsx-dev-runtime',
|
|
50
|
+
'preact/jsx-runtime',
|
|
51
|
+
].sort(),
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
describe('legacy package specifiers', () => {
|
|
57
|
+
// A plugin bundle on disk imports the pre-rename names, and those packages are
|
|
58
|
+
// no longer installed — so introspecting the SPECIFIER answers nothing and Bun
|
|
59
|
+
// fails the build with `No matching export in "kabmo-plugin-runtime-shim:…"
|
|
60
|
+
// for import "definePluginApp"`. The export NAMES have to come from the
|
|
61
|
+
// module that ships.
|
|
62
|
+
test('a build from a legacy specifier carries the current exports', async () => {
|
|
63
|
+
const root = mkdtempSync(join(tmpdir(), 'kabmo-shim-legacy-'));
|
|
64
|
+
try {
|
|
65
|
+
mkdirSync(join(root, 'src'), { recursive: true });
|
|
66
|
+
writeFileSync(
|
|
67
|
+
join(root, 'src/app.tsx'),
|
|
68
|
+
[
|
|
69
|
+
"import { definePluginApp } from '@kabmo-labs/plugin-sdk/app';",
|
|
70
|
+
"import { Panel } from '@kabmo-labs/ui/components';",
|
|
71
|
+
'export default definePluginApp((app) => { app.rightPanel({ id: "x", component: () => Panel }); });',
|
|
72
|
+
].join('\n'),
|
|
73
|
+
);
|
|
74
|
+
const result = await Bun.build({
|
|
75
|
+
entrypoints: [join(root, 'src/app.tsx')],
|
|
76
|
+
target: 'browser',
|
|
77
|
+
format: 'esm',
|
|
78
|
+
outdir: join(root, 'dist'),
|
|
79
|
+
plugins: [runtimeShimPlugin()],
|
|
80
|
+
});
|
|
81
|
+
expect(result.logs.map((log) => log.message).join(' ')).not.toContain('No matching export');
|
|
82
|
+
expect(result.success).toBe(true);
|
|
83
|
+
const bundle = readFileSync(join(root, 'dist/app.js'), 'utf8');
|
|
84
|
+
// Still the HOST's runtime, under the name the plugin wrote.
|
|
85
|
+
expect(bundle).toContain('__kabmoPluginRuntime');
|
|
86
|
+
} finally {
|
|
87
|
+
rmSync(root, { recursive: true, force: true });
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
describe('shimModuleSource', () => {
|
|
93
|
+
test('reads the slot and throws a message naming the bundle when it is absent', () => {
|
|
94
|
+
const source = shimModuleSource('preact/hooks', 'hooks', ['useState']);
|
|
95
|
+
|
|
96
|
+
expect(source).toContain('globalThis.__kabmoPluginRuntime');
|
|
97
|
+
expect(source).toContain('runtime.hooks == null');
|
|
98
|
+
expect(source).toContain('must be loaded by Kabmo app');
|
|
99
|
+
// The specifier is named in the error, so the failing import is identifiable.
|
|
100
|
+
expect(source).toContain('preact/hooks');
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
test('forwards the named exports and a default', () => {
|
|
104
|
+
const source = shimModuleSource('preact', 'preact', ['Component', 'render']);
|
|
105
|
+
|
|
106
|
+
expect(source).toContain('export default ("default" in mod ? mod.default : mod);');
|
|
107
|
+
expect(source).toContain('Component,');
|
|
108
|
+
expect(source).toContain('render,');
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
test('emits a valid named-export list for an empty module', () => {
|
|
112
|
+
// An empty list still has to parse: `export const { } = mod;` is not valid
|
|
113
|
+
// syntax on its own line shape, so the generated text must stay well formed.
|
|
114
|
+
const source = shimModuleSource('@kabmo-labs/kabmo-ui/components', 'uiComponents', []);
|
|
115
|
+
expect(source).toContain('export const {');
|
|
116
|
+
expect(source.trimEnd().endsWith('} = mod;')).toBe(true);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
describe('runtimeShimPlugin', () => {
|
|
121
|
+
test('resolves the shared specifiers through the shim, and leaves others alone', async () => {
|
|
122
|
+
const plugin = runtimeShimPlugin();
|
|
123
|
+
const resolveHooks: ((args: { path: string }) => unknown)[] = [];
|
|
124
|
+
const loadHooks: ((args: { path: string; namespace: string }) => Promise<{ contents: string }>)[] = [];
|
|
125
|
+
|
|
126
|
+
plugin.setup({
|
|
127
|
+
onResolve: (_filter: unknown, handler: never) => resolveHooks.push(handler),
|
|
128
|
+
onLoad: (_filter: unknown, handler: never) => loadHooks.push(handler),
|
|
129
|
+
} as never);
|
|
130
|
+
|
|
131
|
+
const resolve = resolveHooks[0];
|
|
132
|
+
const load = loadHooks[0];
|
|
133
|
+
|
|
134
|
+
// A shared specifier is routed into the shim's own namespace...
|
|
135
|
+
const shared = resolve({ path: 'preact/hooks' }) as { namespace?: string; path: string } | undefined;
|
|
136
|
+
expect(shared?.namespace).toBeTruthy();
|
|
137
|
+
expect(shared?.path).toBe('preact/hooks');
|
|
138
|
+
|
|
139
|
+
// ...and the loaded source is the reader, not the module.
|
|
140
|
+
const loaded = await load({ path: 'preact/hooks', namespace: shared?.namespace as string });
|
|
141
|
+
expect(loaded.contents).toContain('__kabmoPluginRuntime');
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
test('introspects the real exports, so the runtime list cannot drift', async () => {
|
|
145
|
+
const plugin = runtimeShimPlugin();
|
|
146
|
+
const loadHooks: ((args: { path: string; namespace: string }) => Promise<{ contents: string }>)[] = [];
|
|
147
|
+
plugin.setup({
|
|
148
|
+
onResolve: () => {},
|
|
149
|
+
onLoad: (_filter: unknown, handler: never) => loadHooks.push(handler),
|
|
150
|
+
} as never);
|
|
151
|
+
|
|
152
|
+
const loaded = await loadHooks[0]({ path: 'preact/jsx-runtime', namespace: 'kabmo-plugin-runtime-shim' });
|
|
153
|
+
|
|
154
|
+
// These three are what a transpiled TSX file imports BY NAME; a shim that
|
|
155
|
+
// omitted them would break every plugin rather than degrade.
|
|
156
|
+
expect(loaded.contents).toContain('jsx,');
|
|
157
|
+
expect(loaded.contents).toContain('jsxs,');
|
|
158
|
+
expect(loaded.contents).toContain('Fragment,');
|
|
159
|
+
});
|
|
160
|
+
});
|