@kabmo-labs/kabmo 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/README.md +1 -1
  2. package/dist/client/index.html +1 -1
  3. package/dist/client/index.js +873 -524
  4. package/dist/client/static/js/{index-297dck9a.js → index-jcr5twtp.js} +799 -795
  5. package/dist/client/static/js/index-z3w7n85q.css +1 -0
  6. package/marketplace/plugins/stats/package.json +2 -2
  7. package/marketplace/plugins/stats/src/groups.test.ts +14 -0
  8. package/marketplace/plugins/stats/src/groups.ts +20 -0
  9. package/marketplace/plugins/stats/src/labels.test.ts +9 -0
  10. package/marketplace/plugins/stats/src/labels.ts +7 -0
  11. package/marketplace/plugins/stats/src/server.ts +1 -1
  12. package/package.json +1 -1
  13. package/src/client/App.tsx +20 -19
  14. package/src/client/components/common/ComposerTextarea.tsx +10 -1
  15. package/src/client/components/common/Modal.tsx +2 -6
  16. package/src/client/components/common/PWAInstallButton.tsx +3 -2
  17. package/src/client/components/common/Toast.test.tsx +298 -0
  18. package/src/client/components/common/Toast.tsx +103 -37
  19. package/src/client/components/common/ToastStack.tsx +33 -12
  20. package/src/client/components/common/ViewportSelector.tsx +122 -114
  21. package/src/client/components/common/context-usage-button/Ring.tsx +38 -1
  22. package/src/client/components/common/context-usage-button/index.test.tsx +19 -3
  23. package/src/client/components/common/context-usage-button/index.tsx +5 -2
  24. package/src/client/components/common/harness-glyph/brands.ts +65 -0
  25. package/src/client/components/common/harness-glyph/harness-glyph.test.ts +185 -0
  26. package/src/client/components/common/harness-glyph/index.tsx +131 -0
  27. package/src/client/components/common/header-controls/MoreMenu.tsx +2 -1
  28. package/src/client/components/common/header-controls/index.tsx +16 -8
  29. package/src/client/components/common/header-panel-buttons/index.tsx +4 -3
  30. package/src/client/components/common/panel-mark/index.test.tsx +2 -2
  31. package/src/client/components/common/panel-mark/index.tsx +11 -2
  32. package/src/client/components/common/search-select/index.tsx +305 -0
  33. package/src/client/components/common/search-select/search-select.test.tsx +217 -0
  34. package/src/client/components/common/server-control/index.tsx +3 -2
  35. package/src/client/components/common/session-row/index.tsx +18 -1
  36. package/src/client/components/common/toolbar-row/index.tsx +57 -20
  37. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +1 -3
  38. package/src/client/components/layout/desktop-layout/TopNavbar.tsx +3 -2
  39. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +7 -1
  40. package/src/client/components/layout/desktop-layout/index.tsx +1 -3
  41. package/src/client/components/layout/session-sidebar/CategoryItem.tsx +1 -0
  42. package/src/client/components/layout/session-sidebar/SessionItem.tsx +18 -1
  43. package/src/client/components/layout/session-sidebar/SessionsView.tsx +1 -3
  44. package/src/client/components/layout/session-sidebar/about-modal/HarnessTable.test.tsx +332 -0
  45. package/src/client/components/layout/session-sidebar/about-modal/HarnessTable.tsx +310 -0
  46. package/src/client/components/layout/session-sidebar/about-modal/SocialLinks.tsx +63 -51
  47. package/src/client/components/layout/session-sidebar/about-modal/UpdateSection.tsx +4 -2
  48. package/src/client/components/layout/session-sidebar/about-modal/index.test.tsx +122 -0
  49. package/src/client/components/layout/session-sidebar/about-modal/index.tsx +136 -35
  50. package/src/client/components/layout/session-sidebar/harness-mark.test.tsx +126 -0
  51. package/src/client/components/layout/session-sidebar/modern/ActionRow.tsx +4 -3
  52. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +1 -0
  53. package/src/client/components/mobile/LayoutWrapper.tsx +1 -7
  54. package/src/client/components/mobile/SessionSidebar.tsx +1 -3
  55. package/src/client/components/mobile/mobile-main-view/Header.tsx +3 -2
  56. package/src/client/components/mobile/mobile-session-sidebar/Dialogs.tsx +0 -8
  57. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +1 -0
  58. package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +17 -1
  59. package/src/client/components/settings/Modal.tsx +26 -22
  60. package/src/client/components/settings/Sidebar.tsx +45 -5
  61. package/src/client/components/settings/categories/HarnessSettings.tsx +207 -0
  62. package/src/client/components/settings/categories/ProjectSettings.tsx +1 -3
  63. package/src/client/components/settings/categories/ProviderSettings.tsx +0 -4
  64. package/src/client/components/settings/categories/SkillCatalogSettings.tsx +13 -23
  65. package/src/client/components/settings/categories/agent-settings/ModelPicker.tsx +23 -30
  66. package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +20 -11
  67. package/src/client/components/settings/categories/chat-settings/GoalSection.tsx +16 -16
  68. package/src/client/components/settings/categories/harness-settings/AddProviderForm.tsx +219 -0
  69. package/src/client/components/settings/categories/harness-settings/ConfigForm.tsx +268 -0
  70. package/src/client/components/settings/categories/harness-settings/EnvProviderForm.tsx +146 -0
  71. package/src/client/components/settings/categories/harness-settings/HarnessCard.tsx +278 -0
  72. package/src/client/components/settings/categories/harness-settings/ImportSection.tsx +195 -0
  73. package/src/client/components/settings/categories/harness-settings/ProviderPanel.tsx +152 -0
  74. package/src/client/components/settings/categories/harness-settings/ToggleList.tsx +147 -0
  75. package/src/client/components/settings/categories/harness-settings/parts.test.tsx +97 -0
  76. package/src/client/components/settings/categories/harness-settings/parts.tsx +84 -0
  77. package/src/client/components/settings/categories/harness-settings/provider-panel.test.tsx +313 -0
  78. package/src/client/components/settings/categories/omp-settings/RoleEditor.test.ts +60 -39
  79. package/src/client/components/settings/categories/omp-settings/RoleRow.tsx +32 -41
  80. package/src/client/components/settings/categories/omp-settings/role-picker.test-util.ts +45 -0
  81. package/src/client/components/settings/categories/panel-plugins/PluginMark.test.ts +1 -1
  82. package/src/client/components/settings/categories/panel-plugins/PluginMark.tsx +11 -4
  83. package/src/client/components/settings/groups.test.tsx +160 -0
  84. package/src/client/components/settings/harness-icons.test.tsx +134 -0
  85. package/src/client/components/workspace/browser-panel/AddressBar.tsx +3 -13
  86. package/src/client/components/workspace/browser-toolbar/clusters.tsx +237 -0
  87. package/src/client/components/workspace/browser-toolbar/index.test.tsx +167 -0
  88. package/src/client/components/workspace/browser-toolbar/index.tsx +99 -100
  89. package/src/client/components/workspace/btw-panel/Messages.tsx +4 -1
  90. package/src/client/components/workspace/btw-panel/index.tsx +2 -0
  91. package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +11 -7
  92. package/src/client/components/workspace/chat-timeline/ChatOverlays.tsx +5 -2
  93. package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +13 -0
  94. package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +13 -0
  95. package/src/client/components/workspace/chat-timeline/GeneratingIndicator.test.ts +41 -0
  96. package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +19 -14
  97. package/src/client/components/workspace/chat-timeline/MessageList.test.ts +14 -0
  98. package/src/client/components/workspace/chat-timeline/MessageList.tsx +6 -0
  99. package/src/client/components/workspace/chat-timeline/PendingChatView.tsx +14 -0
  100. package/src/client/components/workspace/chat-timeline/RunFooter.tsx +4 -0
  101. package/src/client/components/workspace/chat-timeline/RunMark.tsx +58 -0
  102. package/src/client/components/workspace/chat-timeline/SubagentView.tsx +4 -1
  103. package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +4 -0
  104. package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +1 -0
  105. package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +11 -0
  106. package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +13 -0
  107. package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +8 -1
  108. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +27 -1
  109. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +48 -23
  110. package/src/client/components/workspace/chat-timeline/chat-input/composer-portal.test.tsx +1 -0
  111. package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +21 -1
  112. package/src/client/components/workspace/chat-timeline/chat-input/modes-props.ts +7 -0
  113. package/src/client/components/workspace/chat-timeline/chat-input/props.ts +13 -0
  114. package/src/client/components/workspace/chat-timeline/chat-input/selection.ts +11 -2
  115. package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +1 -0
  116. package/src/client/components/workspace/chat-timeline/index.tsx +17 -15
  117. package/src/client/components/workspace/chat-timeline/pending-harness.test.tsx +157 -0
  118. package/src/client/components/workspace/chat-timeline/run-mark.test.ts +104 -0
  119. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FrameControl.tsx +11 -20
  120. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/GroupedAsk.tsx +1 -1
  121. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionBlock.tsx +1 -1
  122. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/drafts.ts +1 -1
  123. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.tsx +2 -1
  124. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.test.ts +31 -3
  125. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +5 -1
  126. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.test.ts +56 -45
  127. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +38 -94
  128. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/wait-parts.tsx +76 -0
  129. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.ts +2 -1
  130. package/src/client/components/workspace/file-explorer/index.test.ts +25 -0
  131. package/src/client/components/workspace/file-explorer/index.tsx +10 -6
  132. package/src/client/components/workspace/git-panel/index.test.ts +13 -3
  133. package/src/client/components/workspace/git-panel/index.tsx +1 -3
  134. package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +92 -0
  135. package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +290 -0
  136. package/src/client/components/workspace/model-dropdown/Item.tsx +11 -0
  137. package/src/client/components/workspace/model-dropdown/Panel.tsx +119 -8
  138. package/src/client/components/workspace/model-dropdown/Section.tsx +4 -0
  139. package/src/client/components/workspace/model-dropdown/fullscreen-picker.ts +51 -0
  140. package/src/client/components/workspace/model-dropdown/harness-models.test.ts +177 -0
  141. package/src/client/components/workspace/model-dropdown/harness-models.ts +148 -0
  142. package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +336 -0
  143. package/src/client/components/workspace/model-dropdown/index.tsx +114 -85
  144. package/src/client/components/workspace/model-dropdown/placement.test.tsx +127 -0
  145. package/src/client/components/workspace/model-dropdown/popover-metrics.test.ts +107 -0
  146. package/src/client/components/workspace/model-dropdown/popover-metrics.ts +118 -0
  147. package/src/client/components/workspace/model-dropdown/row-mutations.ts +106 -0
  148. package/src/client/components/workspace/model-dropdown/trigger.test.ts +22 -2
  149. package/src/client/components/workspace/model-dropdown/use-popover-size.ts +89 -0
  150. package/src/client/data/settings/omp-schema.json +224 -17
  151. package/src/client/hooks/chat/composer/index.ts +11 -2
  152. package/src/client/hooks/chat/composer/items.test.ts +11 -0
  153. package/src/client/hooks/chat/composer/items.ts +4 -2
  154. package/src/client/hooks/chat/composer/model-selection.test.ts +110 -0
  155. package/src/client/hooks/chat/composer/model-selection.ts +45 -4
  156. package/src/client/hooks/chat/omp/prompt-send.ts +4 -2
  157. package/src/client/hooks/chat/timeline/actions.ts +10 -5
  158. package/src/client/hooks/chat/timeline/ask-frames.ts +5 -4
  159. package/src/client/hooks/chat/timeline/composer-local-actions.test.ts +19 -81
  160. package/src/client/hooks/chat/timeline/composer-modes.ts +11 -2
  161. package/src/client/hooks/chat/timeline/composer-refs.ts +16 -1
  162. package/src/client/hooks/chat/timeline/index.ts +27 -35
  163. package/src/client/hooks/chat/timeline/mode-availability.test.ts +51 -0
  164. package/src/client/hooks/chat/timeline/modes-contract.ts +6 -0
  165. package/src/client/hooks/chat/timeline/modes.ts +41 -2
  166. package/src/client/hooks/chat/timeline/new-chat-open.test.ts +86 -0
  167. package/src/client/hooks/chat/timeline/new-chat-open.ts +23 -5
  168. package/src/client/hooks/chat/timeline/new-chat.test.ts +32 -4
  169. package/src/client/hooks/chat/timeline/new-chat.ts +18 -6
  170. package/src/client/hooks/chat/timeline/prompt-text.test.ts +7 -0
  171. package/src/client/hooks/chat/timeline/prompt-text.ts +15 -6
  172. package/src/client/hooks/chat/timeline/rewind-actions.test.ts +51 -1
  173. package/src/client/hooks/chat/timeline/rewind-actions.ts +23 -1
  174. package/src/client/hooks/chat/timeline/run-identity.test.ts +52 -0
  175. package/src/client/hooks/chat/timeline/run-identity.ts +23 -11
  176. package/src/client/hooks/chat/timeline/send-execute.test.ts +55 -0
  177. package/src/client/hooks/chat/timeline/send-props.ts +11 -3
  178. package/src/client/hooks/chat/timeline/send-steer.test.ts +2 -3
  179. package/src/client/hooks/chat/timeline/send.test-util.ts +3 -2
  180. package/src/client/hooks/chat/timeline/send.test.ts +2 -3
  181. package/src/client/hooks/chat/timeline/send.ts +34 -8
  182. package/src/client/hooks/chat/timeline/session-harness.test.ts +163 -0
  183. package/src/client/hooks/chat/timeline/session-harness.ts +164 -0
  184. package/src/client/hooks/chat/timeline/session-load.test-util.ts +6 -2
  185. package/src/client/hooks/chat/timeline/session-load.test.ts +31 -0
  186. package/src/client/hooks/chat/timeline/session-load.ts +6 -14
  187. package/src/client/hooks/chat/timeline/session-shapes.ts +32 -0
  188. package/src/client/hooks/chat/timeline/spawn-harness.ts +41 -0
  189. package/src/client/hooks/chat/timeline/timeline-running.ts +55 -0
  190. package/src/client/hooks/chat/timeline/tui-only-guard.ts +9 -0
  191. package/src/client/hooks/chat/timeline/undo-confirmation.test.ts +131 -0
  192. package/src/client/hooks/models/harness-catalog.ts +114 -0
  193. package/src/client/hooks/models/provider-writes.test.ts +81 -0
  194. package/src/client/hooks/models/provider-writes.ts +144 -0
  195. package/src/client/hooks/models/use-harness-versions.test.ts +152 -0
  196. package/src/client/hooks/models/use-harness-versions.ts +136 -0
  197. package/src/client/hooks/models/use-harnesses-controller.ts +57 -0
  198. package/src/client/hooks/models/use-harnesses-signal.test.ts +128 -0
  199. package/src/client/hooks/models/use-harnesses.test.ts +187 -0
  200. package/src/client/hooks/models/use-harnesses.ts +215 -0
  201. package/src/client/hooks/settings/providers/index.ts +1 -3
  202. package/src/client/hooks/ui/editor-error-toast.ts +10 -3
  203. package/src/client/hooks/ui/icon-style.ts +28 -0
  204. package/src/client/hooks/ui/on-click-outside.test.ts +104 -0
  205. package/src/client/hooks/ui/on-click-outside.ts +14 -2
  206. package/src/client/hooks/ui/theme.ts +6 -0
  207. package/src/client/hooks/ui/toast-queue.test.ts +126 -0
  208. package/src/client/hooks/ui/toasts.ts +132 -27
  209. package/src/client/hooks/ui/ui-feedback.test.ts +4 -91
  210. package/src/client/lib/ui/control-plate.test.ts +76 -0
  211. package/src/client/lib/ui/control-plate.ts +65 -0
  212. package/src/client/tailwind.css +47 -1
  213. package/src/server/lib/assets/shell-attributes.server.ts +9 -2
  214. package/src/server/lib/assets/shell-attributes.test.ts +22 -6
  215. package/src/server/lib/db/schema.ts +4 -0
  216. package/src/server/lib/harness/acp/acp-audit.server.ts +107 -0
  217. package/src/server/lib/harness/acp/acp-goal-driver.server.ts +153 -0
  218. package/src/server/lib/harness/acp/acp-goal-state.server.ts +136 -0
  219. package/src/server/lib/harness/acp/acp-goal.server.ts +273 -0
  220. package/src/server/lib/harness/acp/acp-goal.test.ts +229 -0
  221. package/src/server/lib/harness/acp/acp-telemetry.server.ts +133 -0
  222. package/src/server/lib/harness/acp/acp-telemetry.test.ts +85 -0
  223. package/src/server/lib/harness/acp/acp-todos.server.ts +45 -0
  224. package/src/server/lib/harness/acp/acp-todos.test.ts +43 -0
  225. package/src/server/lib/harness/acp/activation.test.ts +81 -0
  226. package/src/server/lib/harness/acp/activation.ts +72 -0
  227. package/src/server/lib/harness/acp/calls.ts +97 -0
  228. package/src/server/lib/harness/acp/client.test.ts +73 -0
  229. package/src/server/lib/harness/acp/client.ts +339 -0
  230. package/src/server/lib/harness/acp/commands.test.ts +92 -0
  231. package/src/server/lib/harness/acp/commands.ts +165 -0
  232. package/src/server/lib/harness/acp/frames.test.ts +315 -0
  233. package/src/server/lib/harness/acp/frames.ts +349 -0
  234. package/src/server/lib/harness/acp/mapper.ts +204 -0
  235. package/src/server/lib/harness/acp/permissions.test.ts +66 -0
  236. package/src/server/lib/harness/acp/permissions.ts +155 -0
  237. package/src/server/lib/harness/acp/prompt.test.ts +130 -0
  238. package/src/server/lib/harness/acp/prompt.ts +134 -0
  239. package/src/server/lib/harness/acp/protocol.ts +162 -0
  240. package/src/server/lib/harness/acp/session-config.test.ts +73 -0
  241. package/src/server/lib/harness/acp/session-config.ts +148 -0
  242. package/src/server/lib/harness/acp/session-facts.ts +71 -0
  243. package/src/server/lib/harness/acp/session-handshake.ts +89 -0
  244. package/src/server/lib/harness/acp/session-idle.ts +51 -0
  245. package/src/server/lib/harness/acp/session-notifications.ts +95 -0
  246. package/src/server/lib/harness/acp/session-observers.test.ts +193 -0
  247. package/src/server/lib/harness/acp/session-options.ts +33 -0
  248. package/src/server/lib/harness/acp/session-permissions.test.ts +105 -0
  249. package/src/server/lib/harness/acp/session-permissions.ts +74 -0
  250. package/src/server/lib/harness/acp/session-reaper.test.ts +96 -0
  251. package/src/server/lib/harness/acp/session-turns.ts +95 -0
  252. package/src/server/lib/harness/acp/session-usage.ts +60 -0
  253. package/src/server/lib/harness/acp/session-web-state.ts +61 -0
  254. package/src/server/lib/harness/acp/session.test-util.ts +160 -0
  255. package/src/server/lib/harness/acp/session.test.ts +233 -0
  256. package/src/server/lib/harness/acp/session.ts +350 -0
  257. package/src/server/lib/harness/acp/turn.ts +199 -0
  258. package/src/server/lib/harness/acp/verbs.ts +87 -0
  259. package/src/server/lib/harness/auto-probe.server.test.ts +121 -0
  260. package/src/server/lib/harness/auto-probe.server.ts +178 -0
  261. package/src/server/lib/harness/capabilities.ts +67 -0
  262. package/src/server/lib/harness/config-invalidation.test.ts +91 -0
  263. package/src/server/lib/harness/config.server.test.ts +105 -0
  264. package/src/server/lib/harness/config.server.ts +98 -0
  265. package/src/server/lib/harness/enabled.server.test.ts +87 -0
  266. package/src/server/lib/harness/enabled.server.ts +61 -0
  267. package/src/server/lib/harness/launch-table.ts +195 -0
  268. package/src/server/lib/harness/launch.test.ts +220 -0
  269. package/src/server/lib/harness/launch.ts +216 -0
  270. package/src/server/lib/harness/probe-cache.server.test.ts +154 -0
  271. package/src/server/lib/harness/probe-cache.server.ts +177 -0
  272. package/src/server/lib/harness/provider-entry.ts +212 -0
  273. package/src/server/lib/harness/provider-file.server.ts +67 -0
  274. package/src/server/lib/harness/provider-import.test.ts +191 -0
  275. package/src/server/lib/harness/provider-probe.server.ts +123 -0
  276. package/src/server/lib/harness/provider-sources.server.test.ts +45 -0
  277. package/src/server/lib/harness/provider-sources.server.ts +308 -0
  278. package/src/server/lib/harness/provider-write-error.ts +19 -0
  279. package/src/server/lib/harness/provider-write.server.test.ts +308 -0
  280. package/src/server/lib/harness/provider-write.server.ts +339 -0
  281. package/src/server/lib/harness/provider-zcode.server.test.ts +270 -0
  282. package/src/server/lib/harness/provider-zcode.server.ts +324 -0
  283. package/src/server/lib/harness/register.server.ts +36 -0
  284. package/src/server/lib/harness/registry.ts +58 -0
  285. package/src/server/lib/harness/schema.server.ts +129 -0
  286. package/src/server/lib/harness/session-store.server.test.ts +175 -0
  287. package/src/server/lib/harness/session-store.server.ts +206 -0
  288. package/src/server/lib/harness/session-title.server.test.ts +109 -0
  289. package/src/server/lib/harness/session-title.server.ts +70 -0
  290. package/src/server/lib/harness/session.ts +74 -0
  291. package/src/server/lib/harness/spawn.server.ts +133 -0
  292. package/src/server/lib/harness/update-state.server.ts +185 -0
  293. package/src/server/lib/lifecycle/after-listen.ts +7 -0
  294. package/src/server/lib/models/provider-items.server.ts +1 -1
  295. package/src/server/lib/models/registry-refresh.server.test.ts +87 -0
  296. package/src/server/lib/models/registry-refresh.server.ts +98 -0
  297. package/src/server/lib/omp/config/models-config.ts +4 -0
  298. package/src/server/lib/omp/core/cli.ts +13 -0
  299. package/src/server/lib/omp/core/host-resolution.test.ts +6 -3
  300. package/src/server/lib/omp/rpc/child-config.ts +5 -4
  301. package/src/server/lib/omp/rpc/constants.test.ts +2 -1
  302. package/src/server/lib/omp/rpc/event-fanout.ts +9 -0
  303. package/src/server/lib/omp/rpc/forked-resume.test.ts +14 -3
  304. package/src/server/lib/omp/rpc/rpc-primitives.test.ts +11 -0
  305. package/src/server/lib/omp/rpc/session-registration.ts +7 -2
  306. package/src/server/lib/omp/rpc/session-registry.test.ts +2 -1
  307. package/src/server/lib/omp/rpc/session-registry.ts +74 -5
  308. package/src/server/lib/omp/session/acp-rows.server.ts +79 -0
  309. package/src/server/lib/omp/session/delete-flow.server.ts +15 -8
  310. package/src/server/lib/omp/session/delete.server.ts +12 -0
  311. package/src/server/lib/omp/session/sidebar-data.harness.test.ts +247 -0
  312. package/src/server/lib/omp/session/sidebar-data.server.ts +56 -3
  313. package/src/server/lib/queue/delivery.server.test.ts +4 -2
  314. package/src/server/lib/queue/payload.test.ts +67 -0
  315. package/src/server/lib/queue/payload.ts +9 -3
  316. package/src/server/lib/realtime/signals.server.test.ts +99 -0
  317. package/src/server/lib/realtime/signals.server.ts +25 -5
  318. package/src/server/lib/realtime/topics/session-data.server.ts +29 -0
  319. package/src/server/lib/realtime/topics/session.server.ts +3 -3
  320. package/src/server/routes/agent/command-resume.test.ts +77 -0
  321. package/src/server/routes/agent/command.test.ts +243 -2
  322. package/src/server/routes/agent/command.ts +78 -15
  323. package/src/server/routes/agent/harness-command.ts +133 -0
  324. package/src/server/routes/agent/new.ts +63 -1
  325. package/src/server/routes/chat/rewind.test.ts +147 -0
  326. package/src/server/routes/chat/rewind.ts +29 -7
  327. package/src/server/routes/chat/session.test.ts +240 -0
  328. package/src/server/routes/chat/session.ts +96 -4
  329. package/src/server/routes/harness/add-provider.test.ts +233 -0
  330. package/src/server/routes/harness/import-action.ts +272 -0
  331. package/src/server/routes/harness/import.test.ts +196 -0
  332. package/src/server/routes/harness/index.ts +13 -0
  333. package/src/server/routes/harness/root.ts +280 -0
  334. package/src/server/routes/harness/toggle.test.ts +127 -0
  335. package/src/server/routes/harness/update.ts +259 -0
  336. package/src/server/routes/harness/versions.test.ts +148 -0
  337. package/src/server/routes/harness/versions.ts +105 -0
  338. package/src/server/routes/index.ts +2 -0
  339. package/src/server/routes/sessions/delete-acp.test.ts +227 -0
  340. package/src/server/routes/sessions/queue.ts +7 -2
  341. package/src/server/routes/sessions/routes-queue.test.ts +52 -0
  342. package/src/server/routes/sessions/routes.test.ts +47 -13
  343. package/src/server/routes/sessions/session.ts +35 -0
  344. package/src/server/routes/settings/commands-harness.test.ts +92 -0
  345. package/src/server/routes/settings/commands.ts +26 -0
  346. package/src/server/routes/settings/model-override.ts +5 -2
  347. package/src/server/routes/settings/provider-entry.ts +2 -2
  348. package/src/server/routes/settings/provider-model.ts +2 -2
  349. package/src/server/routes/settings/provider-models.ts +2 -2
  350. package/src/server/routes/settings/provider-refresh.ts +6 -4
  351. package/src/server/routes/settings/providers.ts +3 -1
  352. package/src/server/routes/settings/settings-config-routes.test.ts +10 -2
  353. package/src/server/routes/settings/skills.ts +12 -0
  354. package/src/shared/lib/chat/ask-form/fields.ts +76 -0
  355. package/src/shared/lib/chat/ask-form/index.ts +323 -0
  356. package/src/shared/lib/chat/ask-form/tokens.ts +199 -0
  357. package/src/shared/lib/chat/ask-form/types.ts +43 -0
  358. package/src/shared/lib/chat/ask-form.test.ts +137 -0
  359. package/src/shared/lib/chat/ask-questions.test.ts +65 -1
  360. package/src/shared/lib/chat/ask-questions.ts +51 -145
  361. package/src/shared/lib/chat/ask-results.ts +198 -0
  362. package/src/shared/lib/chat/composer/client.ts +20 -8
  363. package/src/shared/lib/chat/context/usage.test.ts +8 -4
  364. package/src/shared/lib/chat/context/usage.ts +17 -3
  365. package/src/shared/lib/chat/omp/abort.test.ts +61 -0
  366. package/src/shared/lib/chat/omp/abort.ts +8 -2
  367. package/src/shared/lib/chat/omp/tool-frames.test.ts +23 -0
  368. package/src/shared/lib/chat/omp/tool-frames.ts +12 -2
  369. package/src/shared/lib/chat/timeline/omp-callbacks.ts +13 -1
  370. package/src/shared/lib/chat/timeline/prompt-error.test.ts +146 -0
  371. package/src/shared/lib/chat/timeline/prompt-error.ts +88 -0
  372. package/src/shared/lib/chat/tool/summary-wait.test.ts +18 -8
  373. package/src/shared/lib/chat/tool/wait-facts.ts +14 -8
  374. package/src/shared/lib/harness/brand-color.test.ts +66 -0
  375. package/src/shared/lib/harness/brand-color.ts +96 -0
  376. package/src/shared/lib/harness/catalog.test.ts +88 -0
  377. package/src/shared/lib/harness/catalog.ts +169 -0
  378. package/src/shared/lib/harness/config-fields.test.ts +139 -0
  379. package/src/shared/lib/harness/config-fields.ts +168 -0
  380. package/src/shared/lib/harness/config.test.ts +153 -0
  381. package/src/shared/lib/harness/config.ts +206 -0
  382. package/src/shared/lib/harness/dialects.test.ts +140 -0
  383. package/src/shared/lib/harness/dialects.ts +249 -0
  384. package/src/shared/lib/harness/enabled.test.ts +79 -0
  385. package/src/shared/lib/harness/enabled.ts +72 -0
  386. package/src/shared/lib/harness/menu.test.ts +94 -0
  387. package/src/shared/lib/harness/menu.ts +88 -0
  388. package/src/shared/lib/harness/provider-facts.test.ts +199 -0
  389. package/src/shared/lib/harness/provider-facts.ts +349 -0
  390. package/src/shared/lib/harness/provider-slug.ts +46 -0
  391. package/src/shared/lib/harness/providers.ts +175 -0
  392. package/src/shared/lib/harness/rewind.ts +24 -0
  393. package/src/shared/lib/harness/status.test.ts +158 -0
  394. package/src/shared/lib/harness/status.ts +112 -0
  395. package/src/shared/lib/harness/update-plan.test.ts +163 -0
  396. package/src/shared/lib/harness/update-plan.ts +140 -0
  397. package/src/shared/lib/harness/updates.test.ts +106 -0
  398. package/src/shared/lib/harness/updates.ts +177 -0
  399. package/src/shared/lib/icons/icon-paint-authority.test.ts +16 -4
  400. package/src/shared/lib/icons/icon-paint-authority.ts +57 -12
  401. package/src/shared/lib/icons/icon-paint-bucket.test.ts +84 -0
  402. package/src/shared/lib/icons/icon-paint-css.test.ts +23 -25
  403. package/src/shared/lib/icons/icon-paint-css.ts +69 -55
  404. package/src/shared/lib/icons/icon-paint-harness.test.ts +73 -0
  405. package/src/shared/lib/icons/icon-paint-harness.ts +75 -0
  406. package/src/shared/lib/icons/icon-paint-ink.ts +108 -0
  407. package/src/shared/lib/icons/icon-paint-panel.ts +19 -4
  408. package/src/shared/lib/icons/icon-paint-weight.ts +21 -2
  409. package/src/shared/lib/icons/icon-tone.ts +118 -21
  410. package/src/shared/lib/icons/tint-hues.generated.ts +100 -284
  411. package/src/shared/lib/icons/tint-tones.test.ts +79 -25
  412. package/src/shared/lib/icons/tint.ts +66 -6
  413. package/src/shared/lib/models/client.ts +10 -1
  414. package/src/shared/lib/models/provider/vendors.ts +72 -0
  415. package/src/shared/lib/omp/config/schema.test.ts +36 -0
  416. package/src/shared/lib/omp/dialog-methods.ts +4 -3
  417. package/src/shared/lib/omp/session/messages-map-trace.test.ts +42 -0
  418. package/src/shared/lib/omp/session/messages-map.ts +6 -1
  419. package/src/shared/lib/omp/session/parse-message-blocks-toolcall.test.ts +8 -0
  420. package/src/shared/lib/omp/session/parse-message-blocks.ts +6 -1
  421. package/src/shared/lib/omp/session/shell-trace.test.ts +69 -0
  422. package/src/shared/lib/omp/session/shell-trace.ts +63 -0
  423. package/src/shared/lib/omp/session/sidebar.ts +37 -10
  424. package/src/shared/lib/omp/session/wait-idle.test.ts +47 -0
  425. package/src/shared/lib/omp/session/wait-idle.ts +93 -0
  426. package/src/shared/lib/omp/session/wait.test.ts +34 -33
  427. package/src/shared/lib/omp/session/wait.ts +25 -39
  428. package/src/shared/lib/settings/sections.ts +24 -0
  429. package/src/shared/lib/theme/css.ts +2 -0
  430. package/src/shared/lib/theme/ink-scale.ts +21 -1
  431. package/src/shared/lib/theme/theme.test.ts +25 -9
  432. package/src/shared/lib/ui/safe-area.test.ts +28 -0
  433. package/src/shared/lib/ui/safe-area.ts +42 -0
  434. package/src/shared/lib/ui/toast-duration.test.ts +74 -0
  435. package/src/shared/lib/ui/toast-duration.ts +70 -0
  436. package/src/shared/types/harness-version.ts +59 -0
  437. package/src/shared/types/harness.ts +201 -0
  438. package/src/shared/types/index.ts +2 -0
  439. package/src/shared/types/omp/agent.ts +13 -0
  440. package/src/shared/types/settings/state.ts +10 -1
  441. package/src/shared/types/workspace.ts +10 -0
  442. package/src/test-support/env.ts +38 -0
  443. package/src/test-support/file-explorer-render.test-util.ts +37 -0
  444. package/src/test-support/file-explorer.test-util.ts +20 -18
  445. package/src/test-support/harness-table.test-util.ts +108 -0
  446. package/dist/client/static/js/index-7ppta1pb.css +0 -1
@@ -76,23 +76,61 @@ export const ICON_TONE_CONTRAST = 3.15;
76
76
  * toolbar glyph, not as a hue. 0.19 keeps every capped hue vivid and leaves the
77
77
  * ones that cannot reach it (yellow, teal) at their gamut maximum.
78
78
  *
79
- * Raising the cap is NOT the lever for a dull hue, which is why it stays: the
80
- * rows that read greyest (teal/cyan, C 0.096-0.102) are at the sRGB gamut
81
- * boundary for their lightness, so a bigger cap changes nothing there and only
82
- * pushes magenta and red further toward neon — a wider spread, not a more even
83
- * wheel. Consistency is bought by solving each variant and by the weight floor,
84
- * not by more chroma at the top.
79
+ * Raising the cap is NOT the lever for a DULL hue: the rows that read greyest
80
+ * (teal/cyan) sit at the sRGB gamut boundary for their lightness, so a bigger cap
81
+ * changes nothing there. It IS the lever for "more alive": measured, lifting
82
+ * 0.19 → 0.22 takes the light table's mean chroma 0.167 → **0.180** with the
83
+ * worst painted contrast unchanged at 3.15:1, and 0 rows below the floor over
84
+ * all 32 light palettes. Above 0.25 only magenta and red move, toward neon.
85
85
  */
86
- export const ICON_TONE_CHROMA_CAP = 0.19;
86
+ export const ICON_TONE_CHROMA_CAP = 0.22;
87
87
 
88
88
  /**
89
- * Lightnesses the LIGHT solver may use, lightest first — ties prefer the lighter.
89
+ * Lightnesses the LIGHT solver may use, brightest first.
90
90
  *
91
- * The ceiling is not taste: above 0.62 the darkest light papers in the catalog
92
- * (`tokyonight-light` `#dee0ee`, `kanagawa-light` `#eae4bf`) drop the most
93
- * chromatic hues under the floor.
91
+ * The ladder exists only to enumerate candidates; the ORDER the solver prefers is
92
+ * stated in `solveIconTone`. Brightest-first is the order the user's report asked
93
+ * for: "aku perlu lebih cerah untuk icon di light mode".
94
94
  */
95
- const LIGHTNESS_LADDER = [0.62, 0.6, 0.58, 0.56, 0.54, 0.52, 0.5, 0.48, 0.46, 0.44, 0.4];
95
+ const LIGHT_LADDER = Array.from({ length: 61 }, (_, index) => 0.90 - index * 0.01);
96
+
97
+ /**
98
+ * How bright a palette's paper is, as the three groups the LIGHT tone table is
99
+ * solved for.
100
+ *
101
+ * One table for all 32 light palettes is solved against the DARKEST paper
102
+ * (`tokyonight-light` `#dee0ee`) so that every palette clears the floor — which
103
+ * means the 24 palettes with a brighter paper paint an icon at lightness the
104
+ * catalog already grants more of. Measured on the default `paper` (`#faf8f3`):
105
+ * the shared table lands at mean L **0.582** where that paper allows **0.640**,
106
+ * a 0.05 gap that reads as "light mode kusam" beside dark's 0.782.
107
+ *
108
+ * Splitting the solve removes most of that gap without a table per palette:
109
+ * measured over the 32 light palettes, three buckets lift the weighted mean from
110
+ * **0.589 to 0.620**, and six buckets only reach 0.625 — so the extra rows buy
111
+ * nothing. Every row still clears 3.15:1 on every paper of its own bucket
112
+ * (verified per palette, 1152/1152 rows).
113
+ *
114
+ * The thresholds are on RELATIVE LUMINANCE, not OKLCH lightness, because that is
115
+ * the quantity contrast is computed from: `#dee0ee` and `#faf8f3` differ by 0.06
116
+ * in OKLCH L but by 0.19 in luminance.
117
+ */
118
+ export type PaperBucket = 'deepest' | 'deeper' | 'deep' | 'mid' | 'light' | 'bright';
119
+
120
+ /**
121
+ * Luminance at which each bucket ends, ascending.
122
+ *
123
+ * Six groups rather than three because three stopped paying: measured over the 32
124
+ * light palettes (weighted), three buckets reach mean L 0.6222 and six reach
125
+ * **0.6291** — the same solve per palette tops out at 0.6335, so six buckets buy
126
+ * 78% of the available headroom for 216 generated rows instead of 1080. The edges
127
+ * are midway between consecutive papers in the catalog, which is why they look
128
+ * arbitrary: they are derived, and `icon-tone.test.ts` re-derives them.
129
+ */
130
+ export const PAPER_BUCKET_EDGES = [0.8503, 0.8888, 0.9137, 0.9433, 1.0] as const;
131
+
132
+ /** Every bucket, deepest first — the order the tables are generated in. */
133
+ export const PAPER_BUCKETS: readonly PaperBucket[] = ['deepest', 'deeper', 'deep', 'mid', 'light', 'bright'];
96
134
 
97
135
  /**
98
136
  * Lightnesses the DARK solver may use, lightest first — ties prefer the lighter.
@@ -145,18 +183,59 @@ export function oklchOf(hex: string): { lightness: number; chroma: number; hue:
145
183
  };
146
184
  }
147
185
 
148
- /** The lowest contrast `hex` reaches on any palette surface of `variant`. */
149
- function worstVariantContrast(hex: string, variant: 'light' | 'dark'): number {
186
+ /**
187
+ * Which bucket a paper falls in, by the luminance the contrast is computed from.
188
+ */
189
+ export function paperBucketOf(paper: string): PaperBucket {
190
+ const color = parseHexColor(paper);
191
+ if (!color) return 'deep';
192
+ const lin = (raw: number) => {
193
+ const c = raw / 255;
194
+ return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
195
+ };
196
+ const luminance = 0.2126 * lin(color.r) + 0.7152 * lin(color.g) + 0.0722 * lin(color.b);
197
+ const index = PAPER_BUCKET_EDGES.findIndex((edge) => luminance < edge);
198
+ return PAPER_BUCKETS[index === -1 ? PAPER_BUCKETS.length - 1 : index]!;
199
+ }
200
+
201
+ /**
202
+ * The darkest paper of a bucket — what its table is solved against.
203
+ *
204
+ * The bucket's OWN worst paper, not the catalog's: that is the whole point of
205
+ * splitting, and it is what makes a `bright` row brighter than a `deep` row
206
+ * while both still clear the floor on every palette that uses them.
207
+ */
208
+ function bucketPaper(bucket: PaperBucket): string {
209
+ let darkest: { paper: string; luminance: number } | null = null;
210
+ const lin = (raw: number) => {
211
+ const c = raw / 255;
212
+ return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
213
+ };
214
+ for (const theme of THEMES) {
215
+ if (theme.variant !== 'light') continue;
216
+ if (paperBucketOf(theme.paper) !== bucket) continue;
217
+ const color = parseHexColor(theme.paper);
218
+ if (!color) continue;
219
+ const luminance = 0.2126 * lin(color.r) + 0.7152 * lin(color.g) + 0.0722 * lin(color.b);
220
+ if (!darkest || luminance < darkest.luminance) darkest = { paper: theme.paper, luminance };
221
+ }
222
+ return darkest?.paper ?? '#dee0ee';
223
+ }
224
+
225
+ /** The lowest contrast `hex` reaches on any paper of `variant` (and bucket). */
226
+ function worstVariantContrast(hex: string, variant: 'light' | 'dark', paper?: string): number {
150
227
  let worst = Number.POSITIVE_INFINITY;
151
228
  for (const theme of THEMES) {
152
229
  if (theme.variant !== variant) continue;
230
+ if (paper && paperBucketOf(theme.paper) !== paperBucketOf(paper)) continue;
153
231
  worst = Math.min(worst, contrastRatio(hex, theme.paper));
154
232
  }
155
233
  return worst === Number.POSITIVE_INFINITY ? BRAND_CONTRAST_FLOOR : worst;
156
234
  }
157
235
 
158
236
  /**
159
- * The tone for ONE wheel hue in ONE variant.
237
+ * The tone for ONE wheel hue in ONE variant — and, on the light side, ONE paper
238
+ * bucket.
160
239
  *
161
240
  * `saturation`/`lightness` are the pair the mode used to paint with, and they
162
241
  * are only used to NAME the colour: `hsl(H 60% 30%)` (light) and `hsl(H 65% 70%)`
@@ -168,15 +247,22 @@ function worstVariantContrast(hex: string, variant: 'light' | 'dark'): number {
168
247
  * because the complaint and the fix are the same on either side: a single pair
169
248
  * spends its whole budget on the worst hue and leaves the muddiest row at less
170
249
  * than half the chroma of the vividest one.
250
+ *
251
+ * The `bucket` picks which papers the floor is measured against, which is how
252
+ * the light side stops painting every icon at the lightness the darkest paper in
253
+ * the catalog merely tolerates. Dark has one band for every palette, so it
254
+ * ignores the argument.
171
255
  */
172
256
  export function solveIconTone(
173
257
  wheelHue: number,
174
258
  variant: 'light' | 'dark' = 'light',
259
+ bucket: PaperBucket = 'deep',
175
260
  saturation = variant === 'light' ? 60 : 65,
176
261
  lightness = variant === 'light' ? 30 : 70,
177
262
  ): string {
178
263
  const colorHue = oklchOf(hslToHex(wheelHue, saturation, lightness)).hue;
179
- const ladder = variant === 'light' ? LIGHTNESS_LADDER : DARK_LIGHTNESS_LADDER;
264
+ const ladder = variant === 'light' ? LIGHT_LADDER : DARK_LIGHTNESS_LADDER;
265
+ const paper = variant === 'light' ? bucketPaper(bucket) : undefined;
180
266
  let best: { hex: string; chroma: number; lightness: number } | null = null;
181
267
  let darkest = '';
182
268
  for (const candidate of ladder) {
@@ -185,16 +271,27 @@ export function solveIconTone(
185
271
  const hex = rgbaToHex(paint);
186
272
  darkest = hex;
187
273
  if (!paint.inGamut) continue;
188
- if (worstVariantContrast(hex, variant) < ICON_TONE_CONTRAST) continue;
189
- const better = !best || chroma > best.chroma + 1e-6 || (Math.abs(chroma - best.chroma) <= 1e-6 && candidate > best.lightness);
274
+ if (worstVariantContrast(hex, variant, paper) < ICON_TONE_CONTRAST) continue;
275
+ // LIGHT prefers the BRIGHTEST legal candidate, then the most chroma; dark
276
+ // prefers chroma, then lightness. The order is the report: "aku perlu lebih
277
+ // cerah untuk icon di light mode" — and the previous chroma-first order was
278
+ // spending lightness to buy chroma the hue could not use anyway. Dark was
279
+ // never reported as dull, so its order is left exactly as it was.
280
+ const better = !best || (variant === 'light'
281
+ ? candidate > best.lightness + 1e-6 || (Math.abs(candidate - best.lightness) <= 1e-6 && chroma > best.chroma)
282
+ : chroma > best.chroma + 1e-6 || (Math.abs(chroma - best.chroma) <= 1e-6 && candidate > best.lightness));
190
283
  if (better) best = { hex, chroma, lightness: candidate };
191
284
  }
192
285
  return best?.hex ?? darkest;
193
286
  }
194
287
 
195
- /** Every wheel hue's light tone: what the generator writes to disk. */
196
- export function solveIconTones(variant: 'light' | 'dark' = 'light'): Record<number, string> {
197
- return Object.fromEntries(ICON_TONE_WHEEL.map((hue) => [hue, solveIconTone(hue, variant)]));
288
+ /**
289
+ * Every wheel hue's tone: what the generator writes to disk.
290
+ *
291
+ * Light is keyed by bucket (`ICON_TONES` holds all three); dark has one band.
292
+ */
293
+ export function solveIconTones(variant: 'light' | 'dark' = 'light', bucket: PaperBucket = 'deep'): Record<number, string> {
294
+ return Object.fromEntries(ICON_TONE_WHEEL.map((hue) => [hue, solveIconTone(hue, variant, bucket)]));
198
295
  }
199
296
 
200
297
  /** `hsl(h <saturation>% <lightness>%)` as `#rrggbb` — the paint this module replaces. */
@@ -28,295 +28,111 @@
28
28
  * so a stale table cannot ship.
29
29
  */
30
30
 
31
+ import type { PaperBucket } from '@/shared/lib/icons/icon-tone';
32
+
31
33
  export const ICON_HUES: Readonly<Record<string, number>> = {
32
- Activity: 240,
33
- AlignJustify: 100,
34
- AlignLeft: 150,
35
- Archive: 50,
36
- ArchiveRestore: 90,
37
- ArrowDown: 100,
38
- ArrowDownToLine: 330,
39
- ArrowLeft: 350,
40
- ArrowRight: 80,
41
- ArrowUp: 150,
42
- ArrowUpDown: 310,
43
- BarChart3: 150,
44
- Blocks: 110,
45
- Bot: 220,
46
- Box: 260,
47
- Boxes: 220,
48
- Brain: 350,
49
- BrainCircuit: 300,
50
- Briefcase: 310,
51
- Camera: 60,
52
- CaseSensitive: 110,
53
- ChevronDown: 120,
54
- ChevronLeft: 250,
55
- ChevronRight: 300,
56
- ChevronUp: 250,
57
- ChevronsUpDown: 80,
58
- Circle: 50,
59
- CircleDot: 240,
60
- ClipboardCopy: 280,
61
- ClipboardList: 290,
62
- ClipboardPaste: 200,
63
- Cloud: 340,
64
- CloudDownload: 300,
65
- Code: 200,
66
- Code2: 260,
67
- Coins: 210,
68
- Columns: 280,
69
- Columns2: 20,
70
- Command: 100,
71
- Component: 200,
72
- Copy: 320,
73
- CopyPlus: 40,
74
- CornerDownLeft: 10,
75
- Cpu: 250,
76
- Database: 280,
77
- Dice5: 50,
78
- Diff: 300,
79
- DollarSign: 220,
80
- Download: 210,
81
- DownloadCloud: 180,
82
- Edit2: 210,
83
- Ellipsis: 100,
84
- ExternalLink: 60,
85
- Eye: 20,
86
- EyeOff: 350,
87
- File: 310,
88
- FileCode: 260,
89
- FileCog: 340,
90
- FileEdit: 270,
91
- FileImage: 40,
92
- FilePlus: 350,
93
- FilePlus2: 350,
94
- FileSearch: 310,
95
- FileText: 80,
96
- Files: 320,
97
- Flag: 350,
98
- FlaskConical: 170,
99
- Folder: 290,
100
- FolderGit: 190,
101
- FolderGit2: 190,
102
- FolderInput: 310,
103
- FolderOpen: 330,
104
- FolderPlus: 250,
105
- FolderSearch: 10,
106
- FolderTree: 10,
107
- Gamepad2: 300,
108
- GitBranch: 30,
109
- GitCommitVertical: 240,
110
- GitCompare: 340,
111
- GitFork: 30,
112
- GitMerge: 90,
113
- GitPullRequest: 10,
114
- Globe: 340,
115
- GraduationCap: 190,
116
- GripVertical: 350,
117
- Hammer: 310,
118
- Hand: 200,
119
- HardDrive: 0,
120
- Hash: 330,
121
- Heading: 250,
122
- Heart: 270,
123
- History: 110,
124
- Home: 20,
125
- Image: 140,
126
- Key: 240,
127
- KeyRound: 240,
128
- Keyboard: 120,
129
- Laptop: 170,
130
- Layers: 30,
131
- LayoutTemplate: 170,
132
- Leaf: 50,
133
- Library: 160,
134
- Lightbulb: 0,
135
- List: 170,
136
- ListChecks: 320,
137
- ListFilter: 230,
138
- ListOrdered: 220,
139
- ListTodo: 210,
140
- ListTree: 330,
141
- Loader2: 40,
142
- Lock: 220,
143
- LockKeyhole: 270,
144
- LockOpen: 180,
145
- LogIn: 140,
146
- LogOut: 190,
147
- Maximize: 310,
148
- Maximize2: 270,
149
- Menu: 100,
150
- MessageSquare: 150,
151
- MessageSquareOff: 40,
152
- MessageSquarePlus: 350,
153
- MessagesSquare: 220,
154
- Mic: 160,
155
- MicOff: 170,
156
- Minimize: 290,
157
- Minimize2: 130,
158
- Minus: 110,
159
- Monitor: 250,
160
- Moon: 80,
161
- MoreHorizontal: 160,
162
- MousePointerClick: 70,
163
- MoveVertical: 300,
164
- Music: 280,
165
- Package: 270,
166
- Paintbrush: 250,
167
- Palette: 320,
168
- PanelLeft: 280,
169
- PanelLeftClose: 160,
170
- PanelRight: 330,
171
- PanelRightClose: 350,
172
- Paperclip: 310,
173
- Pause: 10,
174
- Pencil: 0,
175
- PencilLine: 260,
176
- Pin: 0,
177
- PinOff: 50,
178
- Pipette: 120,
179
- Play: 310,
180
- Plug: 50,
181
- Plus: 210,
182
- Power: 340,
183
- Puzzle: 50,
184
- Quote: 110,
185
- Radio: 320,
186
- Ratio: 160,
187
- RefreshCw: 180,
188
- Regex: 280,
189
- Replace: 190,
190
- ReplaceAll: 140,
191
- Rocket: 210,
192
- RotateCcw: 330,
193
- RotateCw: 0,
194
- Rows: 160,
195
- Rows3: 250,
196
- Save: 40,
197
- SaveAll: 190,
198
- Scissors: 260,
199
- Search: 250,
200
- Send: 110,
201
- Server: 300,
202
- ServerCog: 50,
203
- Settings: 240,
204
- Settings2: 20,
205
- Shield: 160,
206
- Shrink: 160,
207
- Sliders: 290,
208
- SlidersHorizontal: 50,
209
- Smartphone: 20,
210
- Space: 290,
211
- Sparkles: 180,
212
- Square: 60,
213
- SquareFunction: 220,
214
- SquarePen: 10,
215
- Star: 170,
216
- StickyNote: 100,
217
- Store: 340,
218
- Sun: 90,
219
- Tablet: 290,
220
- Tag: 310,
221
- Target: 200,
222
- Terminal: 210,
223
- TextSelect: 220,
224
- Ticket: 170,
225
- Type: 170,
226
- Undo2: 310,
227
- Upload: 0,
228
- UploadCloud: 50,
229
- User: 140,
230
- Variable: 330,
231
- Volume2: 270,
232
- VolumeX: 50,
233
- Wand2: 270,
234
- WandSparkles: 40,
235
- WholeWord: 240,
236
- WrapText: 340,
237
- Wrench: 0,
238
- X: 230,
239
- Zap: 120,
240
- ZoomIn: 250,
241
- ZoomOut: 340,
34
+ Activity: 240, AlignJustify: 100, AlignLeft: 150, Archive: 50, ArchiveRestore: 90, ArrowDown: 100,
35
+ ArrowDownToLine: 330, ArrowLeft: 350, ArrowRight: 80, ArrowUp: 150, ArrowUpDown: 310, ArrowUpRight: 70,
36
+ BarChart3: 150, Blocks: 110, Bot: 220, Box: 260, Boxes: 220, Brain: 350,
37
+ BrainCircuit: 300, Briefcase: 310, Camera: 60, CaseSensitive: 110, ChevronDown: 120, ChevronLeft: 250,
38
+ ChevronRight: 300, ChevronUp: 250, ChevronsUpDown: 80, Circle: 50, CircleDashed: 120, CircleDot: 240,
39
+ ClipboardCopy: 280, ClipboardList: 290, ClipboardPaste: 200, Cloud: 340, CloudDownload: 300, Code: 200,
40
+ Code2: 260, Coins: 210, Columns: 280, Columns2: 20, Command: 100, Component: 200,
41
+ Copy: 320, CopyPlus: 40, CornerDownLeft: 10, Cpu: 250, Database: 280, Dice5: 50,
42
+ Diff: 300, DollarSign: 220, Download: 210, DownloadCloud: 180, Edit2: 210, Ellipsis: 100,
43
+ ExternalLink: 60, Eye: 20, EyeOff: 350, File: 310, FileCode: 260, FileCog: 340,
44
+ FileEdit: 270, FileImage: 40, FilePlus: 350, FilePlus2: 350, FileSearch: 310, FileText: 80,
45
+ Files: 320, Flag: 350, FlaskConical: 170, Folder: 290, FolderGit: 190, FolderGit2: 190,
46
+ FolderInput: 310, FolderOpen: 330, FolderPlus: 250, FolderSearch: 10, FolderTree: 10, Gamepad2: 300,
47
+ GitBranch: 30, GitCommitVertical: 240, GitCompare: 340, GitFork: 30, GitMerge: 90, GitPullRequest: 10,
48
+ Globe: 340, GraduationCap: 190, GripVertical: 350, Hammer: 310, Hand: 200, HardDrive: 0,
49
+ Hash: 330, Heading: 250, Heart: 270, History: 110, Home: 20, Image: 140,
50
+ Key: 240, KeyRound: 240, Keyboard: 120, Laptop: 170, Layers: 30, LayoutTemplate: 170,
51
+ Leaf: 50, Library: 160, Lightbulb: 0, List: 170, ListChecks: 320, ListFilter: 230,
52
+ ListOrdered: 220, ListTodo: 210, ListTree: 330, Loader2: 40, Lock: 220, LockKeyhole: 270,
53
+ LockOpen: 180, LogIn: 140, LogOut: 190, Maximize: 310, Maximize2: 270, Menu: 100,
54
+ MessageSquare: 150, MessageSquareOff: 40, MessageSquarePlus: 350, MessagesSquare: 220, Mic: 160, MicOff: 170,
55
+ Minimize: 290, Minimize2: 130, Minus: 110, Monitor: 250, Moon: 80, MoreHorizontal: 160,
56
+ MousePointerClick: 70, MoveVertical: 300, Music: 280, Package: 270, Paintbrush: 250, Palette: 320,
57
+ PanelLeft: 280, PanelLeftClose: 160, PanelRight: 330, PanelRightClose: 350, Paperclip: 310, Pause: 10,
58
+ Pencil: 0, PencilLine: 260, Pin: 0, PinOff: 50, Pipette: 120, Play: 310,
59
+ Plug: 50, Plus: 210, Power: 340, Puzzle: 50, Quote: 110, Radio: 320,
60
+ Ratio: 160, RefreshCw: 180, Regex: 280, Replace: 190, ReplaceAll: 140, Rocket: 210,
61
+ RotateCcw: 330, RotateCw: 0, Rows: 160, Rows3: 250, Save: 40, SaveAll: 190,
62
+ Scissors: 260, Search: 250, Send: 110, Server: 300, ServerCog: 50, Settings: 240,
63
+ Settings2: 20, Shield: 160, Shrink: 160, Sliders: 290, SlidersHorizontal: 50, Smartphone: 20,
64
+ Space: 290, Sparkles: 180, Square: 60, SquareFunction: 220, SquarePen: 10, Star: 170,
65
+ StickyNote: 100, Store: 340, Sun: 90, Tablet: 290, Tag: 310, Target: 200,
66
+ Terminal: 210, TextSelect: 220, Ticket: 170, Type: 170, Undo2: 310, Upload: 0,
67
+ UploadCloud: 50, User: 140, Variable: 330, Volume2: 270, VolumeX: 50, Wand2: 270,
68
+ WandSparkles: 40, Waypoints: 30, WholeWord: 240, WrapText: 340, Wrench: 0, X: 230,
69
+ Zap: 120, ZoomIn: 250, ZoomOut: 340,
242
70
  };
243
71
 
244
- /** The light paint for each wheel hue, darkest-legible-but-most-chromatic. */
245
- export const ICON_TONES: Readonly<Record<number, string>> = {
246
- 0: '#db4241',
247
- 10: '#da4528',
248
- 20: '#cf5500',
249
- 30: '#b06600',
250
- 40: '#9e7200',
251
- 50: '#8e7a00',
252
- 60: '#808000',
253
- 70: '#738400',
254
- 80: '#5f8200',
255
- 90: '#4f8600',
256
- 100: '#3a8a00',
257
- 110: '#218c00',
258
- 120: '#008e0a',
259
- 130: '#008d29',
260
- 140: '#008c3e',
261
- 150: '#008b53',
262
- 160: '#008965',
263
- 170: '#008876',
264
- 180: '#008686',
265
- 190: '#00899f',
266
- 200: '#0085b7',
267
- 210: '#007cd8',
268
- 220: '#3972e9',
269
- 230: '#4f6de9',
270
- 240: '#6070ef',
271
- 250: '#736aec',
272
- 260: '#8663e6',
273
- 270: '#985cdc',
274
- 280: '#a556d0',
275
- 290: '#b051c4',
276
- 300: '#b94db8',
277
- 310: '#c149ab',
278
- 320: '#c9459b',
279
- 330: '#d04188',
280
- 340: '#d63f70',
281
- 350: '#da3f58',
72
+ /**
73
+ * The light paint for each wheel hue, PER PAPER BUCKET, darkest-legible-but-most-
74
+ * chromatic. Keyed by bucket so a bright palette paints a brighter icon: one
75
+ * table for all 32 light palettes has to be solved against the darkest paper in
76
+ * the catalog, and measured that leaves the default palette painting icons at
77
+ * mean L 0.582 where the same paper allows 0.640.
78
+ */
79
+ export const ICON_TONES: Readonly<Record<PaperBucket, Readonly<Record<number, string>>>> = {
80
+ deepest: {
81
+ 0: '#ea3037', 10: '#e9350b', 20: '#cf5500', 30: '#b46800', 40: '#a17400', 50: '#8e7a00',
82
+ 60: '#808000', 70: '#738400', 80: '#618600', 90: '#518a00', 100: '#3c8d00', 110: '#229000',
83
+ 120: '#00910a', 130: '#008d29', 140: '#009040', 150: '#008e55', 160: '#008d67', 170: '#008b79',
84
+ 180: '#008989', 190: '#00899f', 200: '#0085b7', 210: '#007fdd', 220: '#2e71fd', 230: '#506fff',
85
+ 240: '#5c6bff', 250: '#7363fd', 260: '#8b5ef9', 270: '#9f55ed', 280: '#ae4ee0', 290: '#bb47d2',
86
+ 300: '#c442c4', 310: '#cd3cb5', 320: '#d637a3', 330: '#de318c', 340: '#e52c71', 350: '#e92c54',
87
+ },
88
+ deeper: {
89
+ 0: '#f53d40', 10: '#f4421d', 20: '#dd5c00', 30: '#c07000', 40: '#ac7d00', 50: '#988300',
90
+ 60: '#898900', 70: '#7b8e00', 80: '#698f00', 90: '#579400', 100: '#419700', 110: '#269a00',
91
+ 120: '#00980b', 130: '#00982d', 140: '#009a45', 150: '#00995c', 160: '#00976f', 170: '#009582',
92
+ 180: '#009393', 190: '#0090a6', 200: '#008ec4', 210: '#0085e7', 220: '#3e7dff', 230: '#5777ff',
93
+ 240: '#6678ff', 250: '#7b70ff', 260: '#9065ff', 270: '#a85ff8', 280: '#b858ea', 290: '#c452dc',
94
+ 300: '#cf4cce', 310: '#d847bf', 320: '#e042ac', 330: '#e93d95', 340: '#f0397a', 350: '#f4395d',
95
+ },
96
+ deep: {
97
+ 0: '#f94143', 10: '#f84522', 20: '#e25e00', 30: '#c47200', 40: '#b08000', 50: '#9b8600',
98
+ 60: '#8d8c00', 70: '#7e9100', 80: '#6b9300', 90: '#599700', 100: '#429b00', 110: '#269a00',
99
+ 120: '#009f0d', 130: '#009b2e', 140: '#009a45', 150: '#009c5e', 160: '#009b72', 170: '#009985',
100
+ 180: '#009696', 190: '#0093aa', 200: '#0091c8', 210: '#008bf1', 220: '#4381ff', 230: '#5b7bff',
101
+ 240: '#6a7cff', 250: '#7e75ff', 260: '#936aff', 270: '#ab62fb', 280: '#bb5bee', 290: '#c855df',
102
+ 300: '#d250d1', 310: '#db4bc2', 320: '#e446af', 330: '#ec4199', 340: '#f43d7c', 350: '#f83d60',
103
+ },
104
+ mid: {
105
+ 0: '#fc4546', 10: '#fc4926', 20: '#e66000', 30: '#c97500', 40: '#b08000', 50: '#9f8900',
106
+ 60: '#908f00', 70: '#7e9100', 80: '#6e9600', 90: '#5b9a00', 100: '#429b00', 110: '#279e00',
107
+ 120: '#009f0d', 130: '#009f2f', 140: '#009e47', 150: '#009c5e', 160: '#009b72', 170: '#009c88',
108
+ 180: '#009a9a', 190: '#0096ae', 200: '#0091c8', 210: '#008bf1', 220: '#4985ff', 230: '#5f80ff',
109
+ 240: '#6a7cff', 250: '#8179ff', 260: '#956fff', 270: '#ab62fb', 280: '#be5ff1', 290: '#cb58e3',
110
+ 300: '#d553d4', 310: '#df4ec5', 320: '#e849b2', 330: '#f0449c', 340: '#f7417f', 350: '#fb4163',
111
+ },
112
+ light: {
113
+ 0: '#ff4a4a', 10: '#fc4926', 20: '#eb6200', 30: '#cd7700', 40: '#b48200', 50: '#a28c00',
114
+ 60: '#908f00', 70: '#819400', 80: '#709900', 90: '#5b9a00', 100: '#449e00', 110: '#28a100',
115
+ 120: '#00a30d', 130: '#00a230', 140: '#00a149', 150: '#00a060', 160: '#009e74', 170: '#009f8b',
116
+ 180: '#009d9d', 190: '#009ab2', 200: '#0095cc', 210: '#008ef6', 220: '#4985ff', 230: '#6384ff',
117
+ 240: '#6e80ff', 250: '#8179ff', 260: '#9874ff', 270: '#ae66ff', 280: '#c162f4', 290: '#ce5ce6',
118
+ 300: '#d957d8', 310: '#e252c8', 320: '#eb4db6', 330: '#f4489f', 340: '#fb4582', 350: '#ff4566',
119
+ },
120
+ bright: {
121
+ 0: '#ff5351', 10: '#ff5636', 20: '#f06400', 30: '#d17a00', 40: '#bc8800', 50: '#a68f00',
122
+ 60: '#969500', 70: '#849800', 80: '#739d00', 90: '#5fa100', 100: '#47a500', 110: '#29a500',
123
+ 120: '#00a70e', 130: '#00a632', 140: '#00a54b', 150: '#00a362', 160: '#00a57a', 170: '#00a38e',
124
+ 180: '#00a0a1', 190: '#009db5', 200: '#009bd5', 210: '#0091fb', 220: '#548dff', 230: '#6788ff',
125
+ 240: '#7185ff', 250: '#847eff', 260: '#9a79ff', 270: '#b270ff', 280: '#c565f8', 290: '#d25fe9',
126
+ 300: '#dc5adb', 310: '#e655cc', 320: '#ef50b9', 330: '#f74ca2', 340: '#ff4985', 350: '#ff4f6b',
127
+ },
282
128
  };
283
129
 
284
130
  /** The dark paint for each wheel hue: the same hue, solved for ink surfaces. */
285
131
  export const ICON_TONES_DARK: Readonly<Record<number, string>> = {
286
- 0: '#ff7d7f',
287
- 10: '#ff8069',
288
- 20: '#ff843d',
289
- 30: '#ff9e07',
290
- 40: '#f7b900',
291
- 50: '#e1c400',
292
- 60: '#cfcc00',
293
- 70: '#bed200',
294
- 80: '#abd82f',
295
- 90: '#99dc46',
296
- 100: '#88df57',
297
- 110: '#79e164',
298
- 120: '#6ce36e',
299
- 130: '#5be479',
300
- 140: '#3ee687',
301
- 150: '#00e79c',
302
- 160: '#00e5b4',
303
- 170: '#00e2cc',
304
- 180: '#00e0e1',
305
- 190: '#00dcf8',
306
- 200: '#09c1ff',
307
- 210: '#5cb1ff',
308
- 220: '#7fa9ff',
309
- 230: '#91a3ff',
310
- 240: '#9d9fff',
311
- 250: '#a99aff',
312
- 260: '#b793ff',
313
- 270: '#c68bff',
314
- 280: '#d581fe',
315
- 290: '#ea87fd',
316
- 300: '#fc8dfc',
317
- 310: '#fd84ea',
318
- 320: '#fe7ad5',
319
- 330: '#fe71bd',
320
- 340: '#ff76a7',
321
- 350: '#ff7a93',
132
+ 0: '#ff7d7f', 10: '#ff8069', 20: '#ff843d', 30: '#ff9e07', 40: '#f7b900', 50: '#e1c400',
133
+ 60: '#cfcc00', 70: '#bed200', 80: '#a9d900', 90: '#92de0b', 100: '#7ce239', 110: '#68e54e',
134
+ 120: '#55e75b', 130: '#38e96a', 140: '#00e980', 150: '#00e79c', 160: '#00e5b4', 170: '#00e2cc',
135
+ 180: '#00e0e1', 190: '#00dcf8', 200: '#09c1ff', 210: '#5cb1ff', 220: '#7fa9ff', 230: '#91a3ff',
136
+ 240: '#9d9fff', 250: '#a99aff', 260: '#b793ff', 270: '#c68bff', 280: '#d680ff', 290: '#e772fd',
137
+ 300: '#fe7cff', 310: '#fc6ee8', 320: '#ff69d2', 330: '#ff70bd', 340: '#ff76a7', 350: '#ff7a93',
322
138
  };