@kortix/ui 0.15.11 → 0.16.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 (398) hide show
  1. package/dist/_vendor/kortix-shared.js +478 -179
  2. package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
  3. package/dist/_vendor/shared/session/attachment-tile.d.ts +8 -0
  4. package/dist/_vendor/shared/workspace-settings.d.ts +3 -0
  5. package/dist/access/access/copy-row.d.ts +7 -1
  6. package/dist/access/access/copy-row.js +2 -2
  7. package/dist/animated-copy-icon.js +2 -1
  8. package/dist/browser/sandbox-browser-chrome.d.ts +2 -1
  9. package/dist/browser/sandbox-browser-chrome.js +1 -1
  10. package/dist/customize/agents/agent-cover-card.d.ts +1 -1
  11. package/dist/customize/agents/agent-cover-card.js +10 -2
  12. package/dist/customize/agents/agent-filter.js +3 -1
  13. package/dist/customize/agents/agent-overview.d.ts +10 -0
  14. package/dist/customize/agents/agent-overview.js +5 -4
  15. package/dist/customize/agents/agent-page-chrome.d.ts +5 -6
  16. package/dist/customize/agents/agent-page-chrome.js +16 -13
  17. package/dist/customize/agents/agent-page.js +6 -28
  18. package/dist/customize/agents/agent-tabs.d.ts +1 -0
  19. package/dist/customize/agents/agent-tabs.js +1 -0
  20. package/dist/customize/agents/agents-page.js +3 -3
  21. package/dist/customize/agents/create-agent-modal.d.ts +9 -0
  22. package/dist/customize/agents/create-agent-modal.js +21 -3
  23. package/dist/customize/agents/use-default-agent.js +2 -2
  24. package/dist/customize/connectors/connector-identity.d.ts +11 -2
  25. package/dist/customize/connectors/connector-identity.js +16 -4
  26. package/dist/customize/connectors/connectors-page.js +10 -6
  27. package/dist/customize/connectors/detail/app-page.js +2 -2
  28. package/dist/customize/connectors/install/install-dialog.d.ts +2 -0
  29. package/dist/customize/connectors/install/install-dialog.js +6 -1
  30. package/dist/customize/connectors/use-agent-access.d.ts +1 -0
  31. package/dist/customize/evals/eval-compare-view.d.ts +10 -0
  32. package/dist/customize/evals/eval-compare-view.js +68 -0
  33. package/dist/customize/evals/eval-dataset-view.d.ts +20 -0
  34. package/dist/customize/evals/eval-dataset-view.js +81 -0
  35. package/dist/customize/evals/eval-datasets-page.d.ts +25 -0
  36. package/dist/customize/evals/eval-datasets-page.js +91 -0
  37. package/dist/customize/evals/eval-job-view.d.ts +12 -0
  38. package/dist/customize/evals/eval-job-view.js +360 -0
  39. package/dist/customize/evals/eval-jobs-page.d.ts +4 -0
  40. package/dist/customize/evals/eval-jobs-page.js +69 -0
  41. package/dist/customize/evals/eval-meta.d.ts +97 -0
  42. package/dist/customize/evals/eval-meta.js +228 -0
  43. package/dist/customize/evals/eval-task-view.d.ts +13 -0
  44. package/dist/customize/evals/eval-task-view.js +123 -0
  45. package/dist/customize/evals/eval-tasks-page.d.ts +8 -0
  46. package/dist/customize/evals/eval-tasks-page.js +56 -0
  47. package/dist/customize/evals/eval-ui.d.ts +97 -0
  48. package/dist/customize/evals/eval-ui.js +153 -0
  49. package/dist/customize/evals/evals-page.d.ts +10 -0
  50. package/dist/customize/evals/evals-page.js +56 -0
  51. package/dist/customize/evals/run-eval-modal.d.ts +28 -0
  52. package/dist/customize/evals/run-eval-modal.js +167 -0
  53. package/dist/customize/project-settings/project-admin-sections.d.ts +3 -2
  54. package/dist/customize/project-settings/project-admin-sections.js +6 -1
  55. package/dist/customize/providers/provider-connect.d.ts +13 -0
  56. package/dist/customize/providers/provider-connect.js +29 -5
  57. package/dist/customize/providers/provider-sheet.js +5 -4
  58. package/dist/customize/sections/view/gateway/gateway-overview.d.ts +5 -0
  59. package/dist/customize/sections/view/gateway/gateway-overview.js +32 -6
  60. package/dist/customize/sections/view/gateway/routing-parts.d.ts +6 -0
  61. package/dist/customize/sections/view/gateway/routing-parts.js +21 -13
  62. package/dist/customize/sections/view/git-view.d.ts +19 -1
  63. package/dist/customize/sections/view/git-view.js +7 -3
  64. package/dist/customize/sections/view/manifest-issue-list.d.ts +16 -0
  65. package/dist/customize/sections/view/manifest-issue-list.js +41 -0
  66. package/dist/customize/sections/view/manifest-issues-row.d.ts +24 -0
  67. package/dist/customize/sections/view/manifest-issues-row.js +39 -0
  68. package/dist/customize/sections/view/sandbox-provider-coverage.d.ts +7 -1
  69. package/dist/customize/sections/view/sandbox-provider-coverage.js +7 -5
  70. package/dist/customize/sections/view/secrets-view.d.ts +13 -0
  71. package/dist/customize/sections/view/secrets-view.js +10 -6
  72. package/dist/customize/sections/view/subscription-usage.d.ts +2 -7
  73. package/dist/customize/sections/view/subscription-usage.js +4 -8
  74. package/dist/customize/settings/settings-tab-header.js +12 -3
  75. package/dist/customize/settings/tabs/experimental-tab.d.ts +16 -5
  76. package/dist/customize/settings/tabs/experimental-tab.js +36 -11
  77. package/dist/customize/settings/tabs/general-tab.js +1 -1
  78. package/dist/customize/settings/tabs/sandbox-tab.d.ts +10 -0
  79. package/dist/customize/settings/tabs/sandbox-tab.js +27 -4
  80. package/dist/customize/settings/tabs/snapshots-tab.d.ts +31 -0
  81. package/dist/customize/settings/tabs/snapshots-tab.js +61 -5
  82. package/dist/customize/settings/tabs/workspace-keys.js +6 -3
  83. package/dist/customize/shared/capability-page-shell.js +9 -1
  84. package/dist/customize/shared/catalog/catalog-card.d.ts +1 -1
  85. package/dist/customize/shared/catalog/catalog-card.js +15 -5
  86. package/dist/customize/shared/customize-tab-bar.js +1 -1
  87. package/dist/customize/shared/new-entity-menu.d.ts +1 -1
  88. package/dist/customize/shared/new-entity-menu.js +38 -1
  89. package/dist/customize/triggers/runtime-triggers.d.ts +4 -0
  90. package/dist/customize/triggers/runtime-triggers.js +21 -2
  91. package/dist/customize/triggers/schedule/post-to-field.js +2 -2
  92. package/dist/customize/triggers/schedule-view.js +2 -1
  93. package/dist/files/project/components/drive-explorer.js +33 -70
  94. package/dist/files/project/components/drive-grid-view.d.ts +2 -31
  95. package/dist/files/project/components/drive-grid-view.js +12 -22
  96. package/dist/files/project/components/drive-list-view.d.ts +3 -30
  97. package/dist/files/project/components/drive-list-view.js +8 -18
  98. package/dist/files/project/components/drive-selection-bar.d.ts +4 -5
  99. package/dist/files/project/components/drive-selection-bar.js +13 -20
  100. package/dist/files/project/components/explorer-listing.d.ts +48 -0
  101. package/dist/files/project/components/explorer-listing.js +64 -0
  102. package/dist/files/project/components/file-explorer-page.js +7 -204
  103. package/dist/files/project/components/file-thumbnail.js +3 -1
  104. package/dist/files/project/components/manifest-issue-mark.d.ts +9 -0
  105. package/dist/files/project/components/manifest-issue-mark.js +26 -0
  106. package/dist/files/project/hooks/use-change-requests.d.ts +10 -0
  107. package/dist/files/project/hooks/use-change-requests.js +17 -0
  108. package/dist/files/project/manifest-annotations.d.ts +16 -0
  109. package/dist/files/project/manifest-annotations.js +19 -0
  110. package/dist/files/project/store/version-store.d.ts +1 -1
  111. package/dist/files/project/upload-batch.d.ts +20 -0
  112. package/dist/files/project/upload-batch.js +20 -0
  113. package/dist/files/runtime/hooks/use-binary-blob.js +3 -2
  114. package/dist/files/runtime/hooks/use-file-content.js +3 -2
  115. package/dist/files/runtime/hooks/use-file-list.js +1 -2
  116. package/dist/files/runtime/hooks/use-file-mutations.js +69 -6
  117. package/dist/files/runtime/hooks/use-file-refresh.d.ts +4 -0
  118. package/dist/files/runtime/hooks/use-file-refresh.js +6 -0
  119. package/dist/files/tree/components/file-tree-item.js +1 -4
  120. package/dist/files/viewer/file-annotations.d.ts +18 -0
  121. package/dist/files/viewer/file-annotations.js +21 -0
  122. package/dist/files/viewer/file-content-renderer.js +1 -1
  123. package/dist/files/viewer/file-viewer.js +2 -1
  124. package/dist/files/viewer/index.d.ts +1 -0
  125. package/dist/files/viewer/index.js +1 -0
  126. package/dist/files/viewer/use-file-content-state.js +8 -1
  127. package/dist/i18n/en.d.ts +495 -46
  128. package/dist/i18n/en.js +536 -87
  129. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -4
  130. package/dist/icons/caret-right-solid.d.ts +11 -0
  131. package/dist/icons/caret-right-solid.js +15 -0
  132. package/dist/internal/auth/auth-art.d.ts +12 -0
  133. package/dist/internal/auth/auth-art.js +118 -0
  134. package/dist/internal/auth/auth-card-shell.d.ts +14 -10
  135. package/dist/internal/auth/auth-card-shell.js +20 -31
  136. package/dist/internal/auth/auth-consent.d.ts +3 -1
  137. package/dist/internal/auth/auth-consent.js +2 -2
  138. package/dist/internal/auth/auth-primitives.d.ts +26 -1
  139. package/dist/internal/auth/auth-primitives.js +37 -8
  140. package/dist/internal/connector-logo/connector-logo.d.ts +2 -1
  141. package/dist/internal/connector-logo/connector-logo.js +11 -2
  142. package/dist/internal/files/file-read-retry.d.ts +18 -2
  143. package/dist/internal/files/file-read-retry.js +42 -4
  144. package/dist/internal/hooks/projects/use-new-project-session.js +5 -10
  145. package/dist/internal/hooks/use-auto-scroll-physics.d.ts +1 -1
  146. package/dist/internal/hooks/use-auto-scroll-physics.js +2 -10
  147. package/dist/internal/hooks/use-reduced-motion.d.ts +4 -0
  148. package/dist/internal/hooks/use-reduced-motion.js +12 -0
  149. package/dist/internal/hooks/use-save-shortcut.d.ts +8 -0
  150. package/dist/internal/hooks/use-save-shortcut.js +28 -0
  151. package/dist/internal/layout/connect-mcp-modal.d.ts +1 -1
  152. package/dist/internal/layout/connect-mcp-modal.js +9 -4
  153. package/dist/internal/layout/panel-chrome.d.ts +28 -0
  154. package/dist/internal/layout/panel-chrome.js +27 -0
  155. package/dist/internal/layout/project-page-header.js +5 -1
  156. package/dist/internal/lib/browser-noise/rules/webview.js +16 -0
  157. package/dist/internal/lib/manifest-health.d.ts +25 -1
  158. package/dist/internal/lib/manifest-health.js +56 -0
  159. package/dist/internal/lib/project-preamble.js +1 -1
  160. package/dist/internal/lib/web-notifications.d.ts +1 -1
  161. package/dist/internal/lib/web-notifications.js +3 -0
  162. package/dist/internal/notifications/notification-inbox.js +2 -1
  163. package/dist/internal/notifications/notification-rows.d.ts +1 -1
  164. package/dist/internal/notifications/notification-rows.js +15 -1
  165. package/dist/internal/selection/selection-bar.d.ts +2 -8
  166. package/dist/internal/selection/selection-bar.js +15 -38
  167. package/dist/internal/stores/active-space-store.d.ts +1 -1
  168. package/dist/internal/stores/browser-recents-store.d.ts +1 -1
  169. package/dist/internal/stores/current-account-store.d.ts +1 -1
  170. package/dist/internal/stores/first-chat-store.d.ts +1 -1
  171. package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
  172. package/dist/internal/stores/session-browser-store.d.ts +1 -1
  173. package/dist/internal/stores/session-expanded-store.d.ts +1 -1
  174. package/dist/internal/stores/session-filter-store.d.ts +1 -1
  175. package/dist/internal/stores/session-history-view-store.d.ts +1 -1
  176. package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
  177. package/dist/internal/stores/sound-store.d.ts +1 -1
  178. package/dist/internal/stores/tab-store.d.ts +1 -1
  179. package/dist/internal/stores/user-preferences-store.d.ts +9 -1
  180. package/dist/internal/stores/user-preferences-store.js +2 -0
  181. package/dist/internal/stores/web-notification-store.d.ts +1 -1
  182. package/dist/lib/base-ui-compat.js +28 -1
  183. package/dist/lib/dotmatrix-hooks.d.ts +1 -0
  184. package/dist/lib/dotmatrix-hooks.js +3 -13
  185. package/dist/lib/reduced-motion.d.ts +10 -0
  186. package/dist/lib/reduced-motion.js +104 -0
  187. package/dist/lib/routes.d.ts +9 -0
  188. package/dist/lib/routes.js +7 -4
  189. package/dist/markdown/artifact-link.d.ts +11 -0
  190. package/dist/markdown/artifact-link.js +62 -0
  191. package/dist/markdown/code/index.d.ts +1 -1
  192. package/dist/markdown/code/index.js +1 -1
  193. package/dist/markdown/code/inline-code.d.ts +1 -1
  194. package/dist/markdown/code/inline-code.js +1 -1
  195. package/dist/markdown/genui/components/map-canvas.js +2 -1
  196. package/dist/markdown/index.d.ts +3 -1
  197. package/dist/markdown/index.js +2 -1
  198. package/dist/markdown/{code/inline-chip.js → inline-chip.js} +2 -2
  199. package/dist/markdown/inline-code-text.d.ts +34 -0
  200. package/dist/markdown/inline-code-text.js +68 -0
  201. package/dist/markdown/setup-links/approval-decision.js +3 -3
  202. package/dist/markdown/soft-breaks.d.ts +21 -0
  203. package/dist/markdown/soft-breaks.js +33 -0
  204. package/dist/markdown/unified-markdown.d.ts +9 -1
  205. package/dist/markdown/unified-markdown.js +31 -9
  206. package/dist/primitives/action-bar.d.ts +50 -0
  207. package/dist/primitives/action-bar.js +87 -0
  208. package/dist/primitives/calendar.js +4 -2
  209. package/dist/primitives/inline-meta.js +2 -2
  210. package/dist/primitives/kortix-loader.js +2 -1
  211. package/dist/primitives/modal.d.ts +1 -1
  212. package/dist/primitives/paper-wallpaper-shaders.d.ts +1 -0
  213. package/dist/primitives/paper-wallpaper-shaders.js +6 -0
  214. package/dist/primitives/resizable.d.ts +1 -1
  215. package/dist/primitives/resize-seam.d.ts +3 -2
  216. package/dist/primitives/resize-seam.js +4 -3
  217. package/dist/primitives/settings-section-header.d.ts +30 -1
  218. package/dist/primitives/settings-section-header.js +37 -0
  219. package/dist/primitives/sliding-tab-indicator.js +2 -1
  220. package/dist/primitives/switch.js +15 -8
  221. package/dist/primitives/text-shimmer.js +6 -0
  222. package/dist/primitives/toast-clearance.d.ts +52 -0
  223. package/dist/primitives/toast-clearance.js +116 -0
  224. package/dist/primitives/toast.d.ts +3 -1
  225. package/dist/primitives/toast.js +2 -0
  226. package/dist/primitives/typed-title.js +1 -1
  227. package/dist/primitives/wallpaper-shaders.js +1 -1
  228. package/dist/session/actions/project-session-list-helpers.d.ts +16 -0
  229. package/dist/session/actions/project-session-list-helpers.js +18 -0
  230. package/dist/session/agents/agent-model.d.ts +1 -0
  231. package/dist/session/agents/agent-model.js +2 -1
  232. package/dist/session/agents/agent-strip.js +10 -4
  233. package/dist/session/agents/workflow-run-controls.d.ts +27 -4
  234. package/dist/session/agents/workflow-run-controls.js +63 -10
  235. package/dist/session/composer/ComposerCard.js +3 -0
  236. package/dist/session/composer/agent-selector.js +6 -4
  237. package/dist/session/composer/animated-placeholder.js +2 -1
  238. package/dist/session/composer/attachment-tile.d.ts +2 -2
  239. package/dist/session/composer/attachment-tile.js +25 -3
  240. package/dist/session/composer/composer-agent-access.d.ts +10 -1
  241. package/dist/session/composer/composer-agent-access.js +18 -4
  242. package/dist/session/composer/composer-chat-input.js +7 -2
  243. package/dist/session/composer/composer.d.ts +2 -2
  244. package/dist/session/composer/composer.js +7 -6
  245. package/dist/session/composer/hooks/use-file-search.d.ts +12 -2
  246. package/dist/session/composer/hooks/use-file-search.js +71 -7
  247. package/dist/session/composer/menus/menu-items.js +6 -2
  248. package/dist/session/composer/menus/menu-shell.d.ts +3 -1
  249. package/dist/session/composer/menus/menu-shell.js +2 -2
  250. package/dist/session/composer/menus/slash-menu.d.ts +7 -0
  251. package/dist/session/composer/menus/slash-menu.js +48 -1
  252. package/dist/session/composer/use-instant-session-send.js +7 -1
  253. package/dist/session/header/session-reminders-indicator.js +3 -2
  254. package/dist/session/header/session-site-header.js +24 -6
  255. package/dist/session/media/sandbox-url-detector.js +1 -1
  256. package/dist/session/models/model-connection-gate.js +2 -1
  257. package/dist/session/models/model-selector.js +1 -1
  258. package/dist/session/models/subscription-switcher.d.ts +7 -0
  259. package/dist/session/models/subscription-switcher.js +52 -10
  260. package/dist/session/models/subscription-windows.d.ts +2 -0
  261. package/dist/session/models/subscription-windows.js +2 -0
  262. package/dist/session/outcomes/session-outcomes-provider.js +14 -7
  263. package/dist/session/panel/action-panel.js +8 -19
  264. package/dist/session/panel/easy/app-preview.d.ts +4 -1
  265. package/dist/session/panel/easy/app-preview.js +95 -33
  266. package/dist/session/panel/easy/apps-card.js +6 -11
  267. package/dist/session/panel/easy/change-requests-card.js +1 -1
  268. package/dist/session/panel/easy/changes-card.d.ts +14 -0
  269. package/dist/session/panel/easy/changes-card.js +60 -0
  270. package/dist/session/panel/easy/context-card.d.ts +5 -1
  271. package/dist/session/panel/easy/context-card.js +13 -28
  272. package/dist/session/panel/easy/context-meter.d.ts +18 -0
  273. package/dist/session/panel/easy/context-meter.js +73 -0
  274. package/dist/session/panel/easy/detail-view.d.ts +1 -1
  275. package/dist/session/panel/easy/detail-view.js +24 -21
  276. package/dist/session/panel/easy/easy-panel.js +7 -5
  277. package/dist/session/panel/easy/file-preview.js +3 -1
  278. package/dist/session/panel/easy/frame-history.d.ts +91 -0
  279. package/dist/session/panel/easy/frame-history.js +198 -0
  280. package/dist/session/panel/easy/outputs-card.d.ts +10 -0
  281. package/dist/session/panel/easy/outputs-card.js +28 -31
  282. package/dist/session/panel/easy/panel-card.d.ts +1 -3
  283. package/dist/session/panel/easy/panel-card.js +24 -8
  284. package/dist/session/panel/easy/plan-card.js +2 -2
  285. package/dist/session/panel/easy/step-icon.d.ts +4 -1
  286. package/dist/session/panel/easy/step-icon.js +2 -2
  287. package/dist/session/panel/session-action-panel-column.d.ts +5 -0
  288. package/dist/session/panel/session-action-panel-column.js +198 -101
  289. package/dist/session/panel/session-desktop.js +5 -1
  290. package/dist/session/panel/session-diff-viewer.d.ts +3 -1
  291. package/dist/session/panel/session-diff-viewer.js +7 -4
  292. package/dist/session/panel/session-panel-provider.js +29 -5
  293. package/dist/session/panel/shared/derive-panels.js +64 -4
  294. package/dist/session/status/session-busy-indicator.js +2 -1
  295. package/dist/session/status/session-error-banner.js +1 -1
  296. package/dist/session/thread/chat-minimap.js +2 -1
  297. package/dist/session/thread/session-body.js +4 -1
  298. package/dist/session/thread/session-chat.js +18 -3
  299. package/dist/session/thread/session-turn-meta-rows.d.ts +13 -5
  300. package/dist/session/thread/session-turn-meta-rows.js +33 -5
  301. package/dist/session/thread/transcript.d.ts +1 -2
  302. package/dist/session/thread/transcript.js +26 -24
  303. package/dist/session/thread/typing-indicator.d.ts +2 -2
  304. package/dist/session/thread/typing-indicator.js +10 -3
  305. package/dist/session/tool/tools/session-spawn-tool.js +3 -3
  306. package/dist/session/tool/tools/workflow-run-card.d.ts +11 -1
  307. package/dist/session/tool/tools/workflow-run-card.js +31 -7
  308. package/dist/session/tool/tools/workflow-run-cost.d.ts +29 -0
  309. package/dist/session/tool/tools/workflow-run-cost.js +75 -0
  310. package/dist/session/tool/tools/workflow-tool.d.ts +1 -1
  311. package/dist/session/tool/tools/workflow-tool.js +40 -15
  312. package/dist/session/turn/peer-message-row.js +1 -1
  313. package/dist/session/turn/queued-prompt-bubbles.d.ts +3 -2
  314. package/dist/session/turn/queued-prompt-bubbles.js +1 -1
  315. package/dist/session/turn/throttled-markdown.js +1 -1
  316. package/dist/styles/theme.css +68 -0
  317. package/dist/styles.css +1 -1
  318. package/dist/terminal/pty-terminal.js +1 -1
  319. package/dist/terminal/session-terminal-connect-bar.js +2 -1
  320. package/dist/test-utils/intl.d.ts +495 -46
  321. package/dist/workspace/admin/project-admin-dashboard.js +21 -7
  322. package/dist/workspace/admin/settings-search-landing.js +2 -1
  323. package/dist/workspace/calendar/calendar-dates.d.ts +31 -0
  324. package/dist/workspace/calendar/calendar-dates.js +64 -0
  325. package/dist/workspace/calendar/calendar-new-item.d.ts +11 -0
  326. package/dist/workspace/calendar/calendar-new-item.js +47 -0
  327. package/dist/workspace/calendar/calendar-page.d.ts +3 -0
  328. package/dist/workspace/calendar/calendar-page.js +177 -0
  329. package/dist/workspace/calendar/calendar-panel.d.ts +13 -0
  330. package/dist/workspace/calendar/calendar-panel.js +103 -0
  331. package/dist/workspace/calendar/calendar-people.d.ts +52 -0
  332. package/dist/workspace/calendar/calendar-people.js +117 -0
  333. package/dist/workspace/calendar/calendar-scheduled.d.ts +29 -0
  334. package/dist/workspace/calendar/calendar-scheduled.js +118 -0
  335. package/dist/workspace/calendar/calendar-views.d.ts +32 -0
  336. package/dist/workspace/calendar/calendar-views.js +124 -0
  337. package/dist/workspace/calendar/calendar-when.d.ts +14 -0
  338. package/dist/workspace/calendar/calendar-when.js +81 -0
  339. package/dist/workspace/calendar/mention-textarea.d.ts +19 -0
  340. package/dist/workspace/calendar/mention-textarea.js +84 -0
  341. package/dist/workspace/home/access-requests-bell.js +2 -1
  342. package/dist/workspace/inbox/workspace-inbox.d.ts +1 -1
  343. package/dist/workspace/inbox/workspace-inbox.js +1 -1
  344. package/dist/workspace/layout/project-files-view.js +2 -1
  345. package/dist/workspace/memory/memory-page-list.js +1 -1
  346. package/dist/workspace/new/workspace-handoff.js +2 -1
  347. package/dist/workspace/projects/modal/project-icon-field.js +2 -1
  348. package/dist/workspace/session-workspace.js +13 -12
  349. package/dist/workspace/setup/setup-steps.d.ts +43 -0
  350. package/dist/workspace/setup/setup-steps.js +38 -0
  351. package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
  352. package/dist/workspace/setup/workspace-setup-page.js +124 -0
  353. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +5 -1
  354. package/dist/workspace/sidebar/footer/project-calendar-nav.d.ts +8 -0
  355. package/dist/workspace/sidebar/footer/project-calendar-nav.js +31 -0
  356. package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +14 -6
  357. package/dist/workspace/sidebar/footer/project-chrome-nav.js +37 -25
  358. package/dist/workspace/sidebar/footer/project-computer-nav.d.ts +17 -9
  359. package/dist/workspace/sidebar/footer/project-computer-nav.js +36 -26
  360. package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +7 -7
  361. package/dist/workspace/sidebar/footer/project-download-app-nav.js +25 -13
  362. package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +8 -0
  363. package/dist/workspace/sidebar/footer/project-inbox-nav.js +29 -0
  364. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +3 -13
  365. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +6 -48
  366. package/dist/workspace/sidebar/footer/project-mcp-nav.d.ts +7 -7
  367. package/dist/workspace/sidebar/footer/project-mcp-nav.js +31 -13
  368. package/dist/workspace/sidebar/footer/project-phone-app-nav.d.ts +10 -0
  369. package/dist/workspace/sidebar/footer/project-phone-app-nav.js +61 -0
  370. package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +21 -0
  371. package/dist/workspace/sidebar/footer/project-promo-cards.js +33 -0
  372. package/dist/workspace/sidebar/footer/promo-card.d.ts +41 -0
  373. package/dist/workspace/sidebar/footer/promo-card.js +47 -0
  374. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  375. package/dist/workspace/sidebar/project-nav-items.js +12 -4
  376. package/dist/workspace/sidebar/project-session-list.js +58 -26
  377. package/dist/workspace/sidebar/project-sidebar.js +2 -5
  378. package/dist/workspace/sidebar/project-spaces-nav.js +2 -1
  379. package/dist/workspace/sidebar/session-brief-hover-card.d.ts +24 -0
  380. package/dist/workspace/sidebar/session-brief-hover-card.js +4 -3
  381. package/dist/workspace/sidebar/session-group-sections.d.ts +26 -7
  382. package/dist/workspace/sidebar/session-group-sections.js +121 -41
  383. package/dist/workspace/sidebar/sidebar-drill.js +6 -0
  384. package/dist/workspace/sidebar/sidebar-more-group.js +3 -2
  385. package/dist/workspace/sidebar/use-workspace-list.d.ts +7 -0
  386. package/dist/workspace/sidebar/use-workspace-list.js +11 -1
  387. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +14 -0
  388. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +46 -2
  389. package/dist/workspace/space/space-tab-panels.js +1 -1
  390. package/dist/workspace/spaces/space-timeline.js +2 -2
  391. package/package.json +67 -10
  392. package/skills/kortix-ui/SKILL.md +2 -2
  393. package/skills/kortix-ui/references/modules.md +5 -3
  394. package/dist/session/thread/turn-share.d.ts +0 -16
  395. package/dist/session/thread/turn-share.js +0 -161
  396. package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +0 -11
  397. package/dist/workspace/sidebar/footer/promo-nav-row.js +0 -7
  398. /package/dist/markdown/{code/inline-chip.d.ts → inline-chip.d.ts} +0 -0
@@ -1,7 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { cn } from '../lib/utils.js';
4
- import { m, useReducedMotion } from 'motion/react';
4
+ import { m } from 'motion/react';
5
+ import { useReducedMotion } from '../lib/reduced-motion.js';
5
6
  import { useCallback, useLayoutEffect, useRef, useState, } from 'react';
6
7
  const EMPTY_RECT = { x: 0, y: 0, width: 0, height: 0 };
7
8
  /**
@@ -27,13 +27,16 @@ const Switch = forwardRef(({ label, checked, onCheckedChange, disabled = false,
27
27
  useEffect(() => {
28
28
  hasMounted.current = true;
29
29
  }, []);
30
- const thumbWidth = pressed
30
+ // A disabled switch does not move under the pointer: no hover pill, no press squash.
31
+ const isPressed = pressed && !disabled;
32
+ const isHovered = hovered && !disabled;
33
+ const thumbWidth = isPressed
31
34
  ? THUMB_SIZE + PRESS_EXTEND
32
- : hovered
35
+ : isHovered
33
36
  ? THUMB_SIZE + PILL_EXTEND
34
37
  : THUMB_SIZE;
35
- const thumbHeight = pressed ? THUMB_SIZE - PRESS_SHRINK : THUMB_SIZE;
36
- const thumbY = pressed ? THUMB_OFFSET + PRESS_SHRINK / 2 : THUMB_OFFSET;
38
+ const thumbHeight = isPressed ? THUMB_SIZE - PRESS_SHRINK : THUMB_SIZE;
39
+ const thumbY = isPressed ? THUMB_OFFSET + PRESS_SHRINK / 2 : THUMB_OFFSET;
37
40
  const extraWidth = thumbWidth - THUMB_SIZE;
38
41
  const thumbX = isChecked ? THUMB_OFFSET + THUMB_TRAVEL - extraWidth : THUMB_OFFSET;
39
42
  useEffect(() => {
@@ -102,13 +105,17 @@ const Switch = forwardRef(({ label, checked, onCheckedChange, disabled = false,
102
105
  pointerStart.current = null;
103
106
  }, [isChecked, onCheckedChange, motionX]);
104
107
  const switchControl = (_jsx(SwitchPrimitive.Root, { ref: ref, id: id, checked: checked, disabled: disabled, tabIndex: 0, className: cn('group/switch relative h-[20px] w-[34px] shrink-0 touch-none rounded-full outline-none', // pointer comes from the global rule; disabled keeps the default cursor
105
- 'transition-colors duration-80', 'focus-visible:ring-ring focus-visible:ring-offset-background focus-visible:ring-1 focus-visible:ring-offset-2',
108
+ 'transition-colors duration-80',
109
+ // Disabled reads as unavailable: half opacity (a labelled switch dims
110
+ // its whole row below instead). The cursor stays default: globals.css
111
+ // forces it on every disabled control.
112
+ !label && 'disabled:opacity-50', 'focus-visible:ring-ring focus-visible:ring-offset-background focus-visible:ring-1 focus-visible:ring-offset-2',
106
113
  // Colours come from `data-state` (checked / unchecked), never from JS state.
107
114
  // Off is translucent ink, so one class reads in both themes and on
108
115
  // any panel. Thumb vs track (WCAG 1.4.11, 3:1), worst of page /
109
116
  // card / muted: rest 3.13:1, hover 4.13:1. On: white thumb 3.23:1.
110
- 'data-[state=checked]:bg-kortix-blue', 'data-[state=unchecked]:bg-foreground/10 data-[state=unchecked]:hover:bg-foreground/15', !label && className), onPointerEnter: (e) => {
111
- if (e.pointerType === 'mouse')
117
+ 'data-[state=checked]:bg-kortix-blue', 'data-[state=unchecked]:bg-foreground/10 data-[state=unchecked]:enabled:hover:bg-foreground/15', !label && className), onPointerEnter: (e) => {
118
+ if (e.pointerType === 'mouse' && !disabled)
112
119
  setHovered(true);
113
120
  }, onPointerLeave: () => setHovered(false), onPointerDown: handlePointerDown, onPointerMove: handlePointerMove, onPointerUp: handlePointerUp, onCheckedChange: (nextChecked) => {
114
121
  if (didDrag.current)
@@ -116,7 +123,7 @@ const Switch = forwardRef(({ label, checked, onCheckedChange, disabled = false,
116
123
  onCheckedChange?.(nextChecked);
117
124
  }, ...props, nativeButton: true, render: controlRender(checkedState), children: _jsx(SwitchPrimitive.Thumb, { render: stateRender('span', checkedState, _jsx(m.span, { className: cn('duration-fast absolute top-0 left-0 rounded-full shadow-sm transition-colors', 'data-[state=checked]:bg-white',
118
125
  // A white thumb on the light off track would be ~1.25:1.
119
- 'data-[state=unchecked]:bg-foreground/45 group-hover/switch:data-[state=unchecked]:bg-foreground/55'), initial: false,
126
+ 'data-[state=unchecked]:bg-foreground/45 group-enabled/switch:group-hover/switch:data-[state=unchecked]:bg-foreground/55'), initial: false,
120
127
  // Motion value binding for drag, not a colour or layout style.
121
128
  style: { x: motionX }, animate: {
122
129
  y: thumbY,
@@ -66,6 +66,12 @@ const SHIMMER_STYLE = `
66
66
  -webkit-text-fill-color: var(--base-color) !important;
67
67
  }
68
68
  }
69
+ :root[data-reduce-motion] [data-kx-text-shimmer] {
70
+ animation: none !important;
71
+ background-image: none !important;
72
+ color: var(--base-color) !important;
73
+ -webkit-text-fill-color: var(--base-color) !important;
74
+ }
69
75
  `;
70
76
  function TextShimmerComponent({ children, as: Component = 'span', className, duration = 2, spread = 2, repeat = Infinity, }) {
71
77
  const dynamicSpread = children.length * spread;
@@ -0,0 +1,52 @@
1
+ import { type RefObject } from 'react';
2
+ /**
3
+ * Keeps bottom-right toasts clear of a composer docked at the bottom of the
4
+ * window. The app's `<Toaster>` reads its bottom offset from
5
+ * `--toast-offset-bottom` (`apps/web/src/app/[locale]/layout.tsx`); a docked
6
+ * composer sets that variable to the distance from its top edge to the window
7
+ * bottom while it shares the toast lane. Before this, a toast covered the
8
+ * session composer's Send/Stop button (dev audit, 2026-11-14).
9
+ */
10
+ export declare const TOAST_OFFSET_VAR = "--toast-offset-bottom";
11
+ /**
12
+ * The toast's right offset while it is lifted. A lifted toast aligns its right
13
+ * edge with the composer's right edge, so it sits flush above the composer
14
+ * instead of straddling whatever is docked to the composer's right (the
15
+ * session's side panel).
16
+ */
17
+ export declare const TOAST_OFFSET_RIGHT_VAR = "--toast-offset-right";
18
+ /** The element whose resize moves a docked composer (the chat column). */
19
+ export declare const TOAST_ANCHOR_ATTR = "data-toast-anchor";
20
+ export interface ClearanceRect {
21
+ top: number;
22
+ right: number;
23
+ width: number;
24
+ height: number;
25
+ }
26
+ /**
27
+ * The bottom offset that puts a toast just above `rect`, or 0 when the element
28
+ * is hidden or not docked at the window bottom. A docked composer always
29
+ * hosts the toast, wherever it sits horizontally: the toast stands above it,
30
+ * right-aligned with it (`toastRightOffset`). Anchoring to the window corner
31
+ * instead left the toast straddling whatever is docked beside the composer
32
+ * (the session's side panel). A tall composer (long draft, attachments) still
33
+ * counts: only its bottom edge says whether it is docked.
34
+ */
35
+ export declare function toastClearance(rect: ClearanceRect & {
36
+ bottom: number;
37
+ }, viewport: {
38
+ width: number;
39
+ height: number;
40
+ }): number;
41
+ /**
42
+ * The right offset that aligns a lifted toast with `rect`'s right edge, or 0
43
+ * (keep the default) when nothing lifts it or the viewport stacks toasts full
44
+ * width. Never closer to the window edge than Sonner's own 24px.
45
+ */
46
+ export declare function toastRightOffset(rect: {
47
+ right: number;
48
+ }, viewport: {
49
+ width: number;
50
+ }, bottom: number): number;
51
+ /** Registers `ref`'s element as a docked composer while `active`. */
52
+ export declare function useToastClearance(ref: RefObject<HTMLElement | null>, active: boolean): void;
@@ -0,0 +1,116 @@
1
+ 'use client';
2
+ import { useEffect } from 'react';
3
+ /**
4
+ * Keeps bottom-right toasts clear of a composer docked at the bottom of the
5
+ * window. The app's `<Toaster>` reads its bottom offset from
6
+ * `--toast-offset-bottom` (`apps/web/src/app/[locale]/layout.tsx`); a docked
7
+ * composer sets that variable to the distance from its top edge to the window
8
+ * bottom while it shares the toast lane. Before this, a toast covered the
9
+ * session composer's Send/Stop button (dev audit, 2026-11-14).
10
+ */
11
+ export const TOAST_OFFSET_VAR = '--toast-offset-bottom';
12
+ /**
13
+ * The toast's right offset while it is lifted. A lifted toast aligns its right
14
+ * edge with the composer's right edge, so it sits flush above the composer
15
+ * instead of straddling whatever is docked to the composer's right (the
16
+ * session's side panel).
17
+ */
18
+ export const TOAST_OFFSET_RIGHT_VAR = '--toast-offset-right';
19
+ /** Sonner's default edge offset on desktop. */
20
+ const EDGE_PX = 24;
21
+ /** Sonner's toast width. */
22
+ const TOAST_WIDTH_PX = 356;
23
+ /** The element whose resize moves a docked composer (the chat column). */
24
+ export const TOAST_ANCHOR_ATTR = 'data-toast-anchor';
25
+ /** Sonner stacks toasts full width at and below this viewport width. */
26
+ const MOBILE_BREAKPOINT_PX = 600;
27
+ /** Space between the composer's top edge and the lowest toast. */
28
+ const GAP_PX = 12;
29
+ /** A composer whose bottom edge is this close to the window bottom is docked there. */
30
+ const DOCKED_BOTTOM_PX = 160;
31
+ /**
32
+ * The bottom offset that puts a toast just above `rect`, or 0 when the element
33
+ * is hidden or not docked at the window bottom. A docked composer always
34
+ * hosts the toast, wherever it sits horizontally: the toast stands above it,
35
+ * right-aligned with it (`toastRightOffset`). Anchoring to the window corner
36
+ * instead left the toast straddling whatever is docked beside the composer
37
+ * (the session's side panel). A tall composer (long draft, attachments) still
38
+ * counts: only its bottom edge says whether it is docked.
39
+ */
40
+ export function toastClearance(rect, viewport) {
41
+ if (rect.width === 0 || rect.height === 0)
42
+ return 0;
43
+ if (viewport.height - rect.bottom > DOCKED_BOTTOM_PX)
44
+ return 0;
45
+ return Math.max(0, Math.ceil(viewport.height - rect.top + GAP_PX));
46
+ }
47
+ /**
48
+ * The right offset that aligns a lifted toast with `rect`'s right edge, or 0
49
+ * (keep the default) when nothing lifts it or the viewport stacks toasts full
50
+ * width. Never closer to the window edge than Sonner's own 24px.
51
+ */
52
+ export function toastRightOffset(rect, viewport, bottom) {
53
+ if (bottom <= 0 || viewport.width <= MOBILE_BREAKPOINT_PX)
54
+ return 0;
55
+ // Never past the left window edge either: a narrow window with a wide side
56
+ // panel leaves less than a toast's width left of the composer's right edge.
57
+ const max = viewport.width - TOAST_WIDTH_PX - EDGE_PX;
58
+ return Math.max(EDGE_PX, Math.min(max, Math.ceil(viewport.width - rect.right)));
59
+ }
60
+ // replica-local: one entry per mounted docked composer in this window.
61
+ const clearances = new Map();
62
+ function apply() {
63
+ if (typeof document === 'undefined')
64
+ return;
65
+ // The composer that lifts the toast highest decides both offsets.
66
+ let top = { bottom: 0, right: 0 };
67
+ for (const c of clearances.values())
68
+ if (c.bottom > top.bottom)
69
+ top = c;
70
+ const root = document.documentElement.style;
71
+ if (top.bottom > 0)
72
+ root.setProperty(TOAST_OFFSET_VAR, `${top.bottom}px`);
73
+ else
74
+ root.removeProperty(TOAST_OFFSET_VAR);
75
+ if (top.right > 0)
76
+ root.setProperty(TOAST_OFFSET_RIGHT_VAR, `${top.right}px`);
77
+ else
78
+ root.removeProperty(TOAST_OFFSET_RIGHT_VAR);
79
+ }
80
+ /** Registers `ref`'s element as a docked composer while `active`. */
81
+ export function useToastClearance(ref, active) {
82
+ useEffect(() => {
83
+ const el = ref.current;
84
+ if (!active || !el || typeof window === 'undefined')
85
+ return;
86
+ const id = Symbol('toast-clearance');
87
+ const measure = () => {
88
+ const rect = el.getBoundingClientRect();
89
+ const viewport = { width: window.innerWidth, height: window.innerHeight };
90
+ const bottom = toastClearance(rect, viewport);
91
+ const right = toastRightOffset(rect, viewport, bottom);
92
+ const prev = clearances.get(id);
93
+ if (prev && prev.bottom === bottom && prev.right === right)
94
+ return;
95
+ clearances.set(id, { bottom, right });
96
+ apply();
97
+ };
98
+ measure();
99
+ const observer = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(measure);
100
+ observer?.observe(el);
101
+ // The composer is width-capped and centered, so a side panel opening
102
+ // MOVES it without resizing it. The column it sits in (marked with
103
+ // `data-toast-anchor`) does resize, so watch that too, or the right offset
104
+ // keeps the pre-panel position.
105
+ const anchor = el.closest(`[${TOAST_ANCHOR_ATTR}]`);
106
+ if (anchor)
107
+ observer?.observe(anchor);
108
+ window.addEventListener('resize', measure);
109
+ return () => {
110
+ observer?.disconnect();
111
+ window.removeEventListener('resize', measure);
112
+ clearances.delete(id);
113
+ apply();
114
+ };
115
+ }, [ref, active]);
116
+ }
@@ -32,7 +32,9 @@ type ToastOptions = {
32
32
  button?: React.ReactNode;
33
33
  };
34
34
  type LoadingToastOptions<T = unknown> = ToastOptions & {
35
- success?: string | ((data: T) => string);
35
+ /** `false`: the loading toast closes with no success toast after it, for
36
+ * work whose result is already on screen (a new session opens itself). */
37
+ success?: string | ((data: T) => string) | false;
36
38
  error?: string | ((error: unknown) => string);
37
39
  showErrorToast?: boolean;
38
40
  };
@@ -173,6 +173,8 @@ export const loadingToast = (message, promiseInput, options) => {
173
173
  const toastId = renderToast(message, "progress", options, Infinity);
174
174
  return promise.then((data) => {
175
175
  toast.dismiss(toastId);
176
+ if (options?.success === false)
177
+ return data;
176
178
  const successMessage = typeof options?.success === "function"
177
179
  ? options.success(data)
178
180
  : (options?.success ?? "Completed");
@@ -18,7 +18,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
18
18
  import { shouldTypeOnChange, TYPE_SPEED_MS } from './typed-title-logic.js';
19
19
  import { TypingAnimation } from './typing-animation.js';
20
20
  import { cn } from '../lib/utils.js';
21
- import { useReducedMotion } from 'motion/react';
21
+ import { useReducedMotion } from '../lib/reduced-motion.js';
22
22
  import { useCallback, useState } from 'react';
23
23
  export { TYPE_SPEED_MS };
24
24
  export function useTypeOnChange(text) {
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useReducedMotion } from 'motion/react';
3
+ import { useReducedMotion } from '../lib/reduced-motion.js';
4
4
  import { useIsDark } from '../hooks/use-is-dark.js';
5
5
  import { lazyClient } from '../lib/lazy-client.js';
6
6
  import { memo } from 'react';
@@ -29,6 +29,20 @@ export declare function groupChangeRequestsBySession(changeRequests: readonly Ch
29
29
  /** Whether the session list should keep polling — true while any session is
30
30
  * still mid-provisioning (queued/branching/provisioning). */
31
31
  export declare function shouldPollProjectSessions(sessions: ProjectSession[] | undefined): boolean;
32
+ /**
33
+ * Poll while a row works and no stream speaks for it: a session the person is
34
+ * not in (a workflow runner, a colleague, a second chat). On /drive a runner
35
+ * row said "Working" for 3+ minutes after the run ended (audit finding 04).
36
+ * Bounded by the condition: the moment no such row works, this stops.
37
+ */
38
+ export declare const BACKGROUND_WORK_POLL_MS = 10000;
39
+ /**
40
+ * Does a listed session work where no stream reaches it? `working.state` is
41
+ * the server's verdict; the open session's stream patches its own row
42
+ * (`patchCachedSessionWorking`), so it does not count. A row without
43
+ * `working` (an older API) adds no poll.
44
+ */
45
+ export declare function sessionsWorkingInBackground(sessions: readonly ProjectSession[] | undefined, openSessionId: string | null | undefined): boolean;
32
46
  /**
33
47
  * How often the sidebar refetches the session list, or false for not at all.
34
48
  *
@@ -43,6 +57,8 @@ export declare function shouldPollProjectSessions(sessions: ProjectSession[] | u
43
57
  export declare function projectSessionsRefetchInterval(params: {
44
58
  sessions: ProjectSession[] | undefined;
45
59
  hasOpenSession: boolean;
60
+ /** The open session's id: its own stream keeps its row live, so its work adds no poll. */
61
+ openSessionId?: string | null;
46
62
  /** Injected so the title window below is asserted rather than raced. */
47
63
  now?: number;
48
64
  }): number | false;
@@ -83,6 +83,22 @@ const PENDING_TITLE_POLL_MS = 3_000;
83
83
  * follow the conversation you are having, slow enough to be one cheap request
84
84
  * a minute. */
85
85
  const OPEN_SESSION_POLL_MS = 60_000;
86
+ /**
87
+ * Poll while a row works and no stream speaks for it: a session the person is
88
+ * not in (a workflow runner, a colleague, a second chat). On /drive a runner
89
+ * row said "Working" for 3+ minutes after the run ended (audit finding 04).
90
+ * Bounded by the condition: the moment no such row works, this stops.
91
+ */
92
+ export const BACKGROUND_WORK_POLL_MS = 10_000;
93
+ /**
94
+ * Does a listed session work where no stream reaches it? `working.state` is
95
+ * the server's verdict; the open session's stream patches its own row
96
+ * (`patchCachedSessionWorking`), so it does not count. A row without
97
+ * `working` (an older API) adds no poll.
98
+ */
99
+ export function sessionsWorkingInBackground(sessions, openSessionId) {
100
+ return (sessions ?? []).some((session) => session.working?.state === 'working' && session.session_id !== openSessionId);
101
+ }
86
102
  /**
87
103
  * How often the sidebar refetches the session list, or false for not at all.
88
104
  *
@@ -111,6 +127,8 @@ export function projectSessionsRefetchInterval(params) {
111
127
  if (hasSessionAwaitingTitle(params.sessions, params.now ?? Date.now())) {
112
128
  return PENDING_TITLE_POLL_MS;
113
129
  }
130
+ if (sessionsWorkingInBackground(params.sessions, params.openSessionId))
131
+ return BACKGROUND_WORK_POLL_MS;
114
132
  return params.hasOpenSession ? OPEN_SESSION_POLL_MS : false;
115
133
  }
116
134
  /** Epoch ms from an ISO string or an epoch-ms number, or null. `metadata` is
@@ -87,6 +87,7 @@ export interface LineSummary extends StripCounts {
87
87
  /** What the agents line says: `2 agents · 1 working`, `2 agents · poet done`, `1 workflow running`. */
88
88
  export declare function lineSummary(rows: readonly AgentRow[], runs: readonly {
89
89
  status: string;
90
+ awaitingApproval?: boolean;
90
91
  }[]): LineSummary;
91
92
  /** `12s`, `4m`, `2h`: the short elapsed time of a working row. */
92
93
  export declare function shortElapsed(ms: number): string;
@@ -103,7 +103,8 @@ export function stripCounts(rows) {
103
103
  /** What the agents line says: `2 agents · 1 working`, `2 agents · poet done`, `1 workflow running`. */
104
104
  export function lineSummary(rows, runs) {
105
105
  const counts = stripCounts(rows);
106
- const runningRuns = runs.filter((run) => run.status === 'running').length;
106
+ // A run whose approval is still open has not started: it is not running.
107
+ const runningRuns = runs.filter((run) => run.status === 'running' && run.awaitingApproval !== true).length;
107
108
  let newest = null;
108
109
  for (const row of rows)
109
110
  if (!newest || row.activityMs > newest.activityMs)
@@ -23,7 +23,7 @@ import { RunProgressRing } from '../tool/tools/workflow-progress.js';
23
23
  import { WorkflowRunRows } from '../tool/tools/workflow-run-card.js';
24
24
  import { isActive, lineSummary, shortElapsed, stripGroups, } from './agent-model.js';
25
25
  import { TasksPanel } from './tasks-panel.js';
26
- import { isLargeRun, LargeRunBadge, useLiveWorkflowRun, useRestartAgent, WorkflowRunControls, } from './workflow-run-controls.js';
26
+ import { isLargeRun, LargeRunBadge, useLiveWorkflowRun, useRestartAgent, useStopAgent, WorkflowRunControls, } from './workflow-run-controls.js';
27
27
  /**
28
28
  * The agents line: one muted control in the composer's under-row, right of the
29
29
  * agent picker (Claude Code's agent panel, folded to one line).
@@ -171,9 +171,10 @@ function WorkflowLineRow({ projectId, sessionId, run: listed, onOpen, }) {
171
171
  const { run, controlSessionId } = useLiveWorkflowRun(projectId, sessionId, listed);
172
172
  const now = useNow(1_000, open && run?.status === 'running');
173
173
  const restart = useRestartAgent(projectId, controlSessionId, run);
174
+ const stopWorkflowAgent = useStopAgent(projectId, controlSessionId, run);
174
175
  const queryClient = useQueryClient();
175
176
  const stopAgent = useMutation({
176
- mutationFn: (agent) => stopProjectSession(projectId, agent.sessionId),
177
+ mutationFn: (agent) => stopWorkflowAgent(agent),
177
178
  onSuccess: () => projectId && queryClient.invalidateQueries({ queryKey: qk.project.sessionsScope(projectId) }),
178
179
  onError: (error) => errorToast(t('stopFailed'), { description: error instanceof Error ? error.message : undefined }),
179
180
  });
@@ -182,7 +183,7 @@ function WorkflowLineRow({ projectId, sessionId, run: listed, onOpen, }) {
182
183
  const counts = countAgents(run.agents);
183
184
  const progress = counts.total > 0 ? t('runProgress', { done: counts.done, total: counts.total }) : undefined;
184
185
  const line = (run.status === 'running'
185
- ? [run.paused ? tw('paused') : run.background ? t('runBackground') : t('runRunning'), progress]
186
+ ? [run.paused ? tw('holding') : run.background ? t('runBackground') : t('runRunning'), progress]
186
187
  : [progress])
187
188
  .filter(Boolean)
188
189
  .join(' · ');
@@ -233,9 +234,14 @@ export function useAgentsLine(projectId, sessionId, { live = false } = {}) {
233
234
  if (wasLive.current && !live && ready) {
234
235
  void queryClient.invalidateQueries({ queryKey: qk.project.sessionChildren(pid, sid) });
235
236
  void queryClient.invalidateQueries({ queryKey: qk.project.sessionAgents(pid, sid) });
237
+ // Each child's own row (the colleague row in the chat reads it): exact, so
238
+ // its multi-agent reads nested under the same key are not refetched too.
239
+ for (const child of children) {
240
+ void queryClient.invalidateQueries({ queryKey: qk.project.session(pid, child.session_id), exact: true });
241
+ }
236
242
  }
237
243
  wasLive.current = live;
238
- }, [live, ready, pid, sid, queryClient]);
244
+ }, [live, ready, pid, sid, queryClient, children]);
239
245
  const stopMutation = useMutation({
240
246
  mutationFn: (row) => stopProjectSession(pid, row.sessionId),
241
247
  onSettled: (_data, _error, row) => {
@@ -1,11 +1,28 @@
1
1
  import { type WorkflowRun, type WorkflowRunAgent } from '../tool/tools/workflow-run.js';
2
2
  /**
3
3
  * One workflow run's controls, for the run card in the chat and the strip's
4
- * "Workflows" group: Claude Code's `/workflows` keys as buttons. Pause or
5
- * resume (`p`), stop the run (`x`), save its script as a workflow (`s`), and,
6
- * per agent row, restart (`r`). Every control goes to the box that runs the
7
- * run: the session that called `workflow`, or a background run's runner.
4
+ * "Workflows" group: Claude Code's `/workflows` keys as buttons. Hold new
5
+ * agents or resume (`p`), stop the run (`x`), save its script as a workflow
6
+ * (`s`), and, per agent row, restart (`r`). Every control goes to the box that
7
+ * runs the run: the session that called `workflow`, or a background run's
8
+ * runner.
9
+ *
10
+ * The run's `pause` holds only the agents the script has not started: agents
11
+ * already working go on. So the control says "Hold new agents", and it shows
12
+ * only while the script can still start one (or the run is held, to resume
13
+ * it). Before the run exists (its approval is open) there is nothing to hold
14
+ * or stop: no control shows.
8
15
  */
16
+ /**
17
+ * No run exists yet: its approval question is open, or no agent started and
18
+ * no runner took it (a box older than `awaitingApproval`).
19
+ */
20
+ export declare function runNotStarted(run: Pick<WorkflowRun, 'status' | 'awaitingApproval' | 'agents' | 'background' | 'paused'>): boolean;
21
+ /**
22
+ * The script can still start an agent: one is queued for a slot (`starting`, no session yet),
23
+ * a phase it declared has not started, or it is under its cap.
24
+ */
25
+ export declare function runCanStartAgents(run: Pick<WorkflowRun, 'phases' | 'agents' | 'maxAgents'>): boolean;
9
26
  /** A run's large-run warning: more agents than Claude Code's "Large workflow" threshold, or the run says so. */
10
27
  export declare function isLargeRun(run: Pick<WorkflowRun, 'agents' | 'large' | 'maxAgents'>): boolean;
11
28
  /** The file name a run saves as: its saved name, else its title in kebab case. */
@@ -35,6 +52,12 @@ export interface WorkflowRunControlsProps {
35
52
  run: WorkflowRun;
36
53
  }
37
54
  export declare function WorkflowRunControls({ projectId, controlSessionId, ownerSessionId, run, appearance }: WorkflowRunControlsProps): import("react").JSX.Element | null;
55
+ /**
56
+ * Stop one agent as the person's stop: the run's `stop_agent` control, so the runner records
57
+ * "Stopped by you" and goes on. A box older than that control (or a run the control cannot
58
+ * reach) gets the old path: stop the agent's session, which the run reads as a stop.
59
+ */
60
+ export declare function useStopAgent(projectId: string | undefined, controlSessionId: string | undefined, run: Pick<WorkflowRun, 'runId' | 'status'> | null): (agent: Pick<WorkflowRunAgent, "sessionId">) => Promise<void>;
38
61
  /** `restart_agent` for one agent row of a run, on the box that runs it. */
39
62
  export declare function useRestartAgent(projectId: string | undefined, controlSessionId: string | undefined, run: WorkflowRun | null): {
40
63
  enabled: boolean;
@@ -9,17 +9,40 @@ import { errorToast, successToast } from '../../primitives/toast.js';
9
9
  import { useTranslations } from '../../i18n/index.js';
10
10
  import { FloppyDiskIcon, PauseIcon, PlayIcon, SquareIcon, WarningIcon } from '@phosphor-icons/react';
11
11
  import { useMemo } from 'react';
12
- import { WORKFLOW_LARGE_AGENT_COUNT } from '@kortix/sdk';
12
+ import { stopProjectSession, WORKFLOW_LARGE_AGENT_COUNT } from '@kortix/sdk';
13
13
  import { useSessionWorkflows } from '@kortix/sdk/react';
14
14
  import { parseWorkflowRun } from '../tool/tools/workflow-run.js';
15
15
  import { useSessionPromptSend } from './session-prompt.js';
16
16
  /**
17
17
  * One workflow run's controls, for the run card in the chat and the strip's
18
- * "Workflows" group: Claude Code's `/workflows` keys as buttons. Pause or
19
- * resume (`p`), stop the run (`x`), save its script as a workflow (`s`), and,
20
- * per agent row, restart (`r`). Every control goes to the box that runs the
21
- * run: the session that called `workflow`, or a background run's runner.
18
+ * "Workflows" group: Claude Code's `/workflows` keys as buttons. Hold new
19
+ * agents or resume (`p`), stop the run (`x`), save its script as a workflow
20
+ * (`s`), and, per agent row, restart (`r`). Every control goes to the box that
21
+ * runs the run: the session that called `workflow`, or a background run's
22
+ * runner.
23
+ *
24
+ * The run's `pause` holds only the agents the script has not started: agents
25
+ * already working go on. So the control says "Hold new agents", and it shows
26
+ * only while the script can still start one (or the run is held, to resume
27
+ * it). Before the run exists (its approval is open) there is nothing to hold
28
+ * or stop: no control shows.
22
29
  */
30
+ /**
31
+ * No run exists yet: its approval question is open, or no agent started and
32
+ * no runner took it (a box older than `awaitingApproval`).
33
+ */
34
+ export function runNotStarted(run) {
35
+ return run.status === 'running' && (run.awaitingApproval === true || (run.agents.length === 0 && !run.background && !run.paused));
36
+ }
37
+ /**
38
+ * The script can still start an agent: one is queued for a slot (`starting`, no session yet),
39
+ * a phase it declared has not started, or it is under its cap.
40
+ */
41
+ export function runCanStartAgents(run) {
42
+ return (run.agents.some((agent) => agent.status === 'starting' && !agent.sessionId) ||
43
+ run.phases.some((phase) => phase.status === 'pending') ||
44
+ run.agents.length < (run.maxAgents ?? Number.POSITIVE_INFINITY));
45
+ }
23
46
  /** A run's large-run warning: more agents than Claude Code's "Large workflow" threshold, or the run says so. */
24
47
  export function isLargeRun(run) {
25
48
  return run.large === true || run.agents.length > WORKFLOW_LARGE_AGENT_COUNT;
@@ -43,7 +66,13 @@ export function workflowFileName(run) {
43
66
  */
44
67
  export function useLiveWorkflowRun(projectId, sessionId, run) {
45
68
  const runner = run?.background?.sessionId;
46
- const { data } = useSessionWorkflows(projectId, runner, { enabled: !!projectId && !!runner });
69
+ // A run the card knows ended reads its runner at the idle rate; once the runner lists
70
+ // every run as ended, the read stops (`useSessionWorkflows`).
71
+ const ended = !!run?.status && run.status !== 'running';
72
+ const { data } = useSessionWorkflows(projectId, runner, {
73
+ enabled: !!projectId && !!runner,
74
+ ...(ended ? { live: false } : {}),
75
+ });
47
76
  const live = useMemo(() => {
48
77
  if (!run || !runner || !data)
49
78
  return null;
@@ -61,7 +90,7 @@ export function useLiveWorkflowRun(projectId, sessionId, run) {
61
90
  /** The prompt "Save" sends to the session that owns the run. */
62
91
  export function useSaveWorkflowPrompt() {
63
92
  const t = useTranslations('multiAgent.workflow');
64
- return (run) => t('savePrompt', { title: run.title || run.name || run.runId, runId: run.runId, file: `.kortix/workflows/${workflowFileName(run)}.js` });
93
+ return (run) => t('savePrompt', { title: run.title || run.name || run.runId, runId: run.runId, file: `workflows/${workflowFileName(run)}.js` });
65
94
  }
66
95
  export function LargeRunBadge() {
67
96
  const t = useTranslations('multiAgent.workflow');
@@ -76,7 +105,9 @@ export function WorkflowRunControls({ projectId, controlSessionId, ownerSessionI
76
105
  const send = useSessionPromptSend(ownerSessionId);
77
106
  const savePrompt = useSaveWorkflowPrompt();
78
107
  const running = run.status === 'running';
79
- const canControl = !!projectId && !!controlSessionId && !!run.runId && running;
108
+ const canControl = !!projectId && !!controlSessionId && !!run.runId && running && !runNotStarted(run);
109
+ // Hold is about agents still to start: none left, nothing to hold (a held run keeps Resume).
110
+ const canHold = canControl && (run.paused === true || runCanStartAgents(run));
80
111
  const pending = control.isPending ? control.variables?.body.action : undefined;
81
112
  const act = (action) => control.mutate({ runId: run.runId, body: { action } }, {
82
113
  onError: (error) => errorToast(t(`failed.${action}`), { description: error instanceof Error ? error.message : undefined }),
@@ -93,10 +124,10 @@ export function WorkflowRunControls({ projectId, controlSessionId, ownerSessionI
93
124
  }
94
125
  };
95
126
  const buttons = [
96
- canControl && (_jsx(Hint, { label: run.paused ? t('resumeHint') : t('pauseHint'), side: "top", children: _jsx(Button, { type: "button", variant: "ghost", size: text ? 'xs' : 'icon-xs', className: text ? textClass : undefined, "aria-label": run.paused ? t('resume') : t('pause'), disabled: !!pending, onClick: (event) => {
127
+ canHold && (_jsx(Hint, { label: run.paused ? t('resumeHint') : t('holdHint'), side: "top", children: _jsx(Button, { type: "button", variant: "ghost", size: text ? 'xs' : 'icon-xs', className: text ? textClass : undefined, "aria-label": run.paused ? t('resume') : t('hold'), disabled: !!pending, onClick: (event) => {
97
128
  event.stopPropagation();
98
129
  act(run.paused ? 'resume' : 'pause');
99
- }, children: pending === 'pause' || pending === 'resume' ? (_jsx(Loading, { className: "size-3 shrink-0" })) : text ? (run.paused ? t('resumeShort') : t('pauseShort')) : run.paused ? (_jsx(PlayIcon, { weight: "fill", className: "size-3 shrink-0" })) : (_jsx(PauseIcon, { weight: "fill", className: "size-3 shrink-0" })) }) }, "pause")),
130
+ }, children: pending === 'pause' || pending === 'resume' ? (_jsx(Loading, { className: "size-3 shrink-0" })) : text ? (run.paused ? t('resumeShort') : t('holdShort')) : run.paused ? (_jsx(PlayIcon, { weight: "fill", className: "size-3 shrink-0" })) : (_jsx(PauseIcon, { weight: "fill", className: "size-3 shrink-0" })) }) }, "pause")),
100
131
  canControl && (_jsx(Hint, { label: t('stopHint'), side: "top", children: _jsx(Button, { type: "button", variant: "ghost", size: text ? 'xs' : 'icon-xs', className: text ? textClass : undefined, "aria-label": t('stop'), disabled: !!pending, onClick: (event) => {
101
132
  event.stopPropagation();
102
133
  act('stop');
@@ -113,6 +144,28 @@ export function WorkflowRunControls({ projectId, controlSessionId, ownerSessionI
113
144
  return _jsx(_Fragment, { children: buttons });
114
145
  return buttons.length === 1 ? _jsx(_Fragment, { children: buttons }) : _jsx(ButtonGroup, { children: buttons });
115
146
  }
147
+ /**
148
+ * Stop one agent as the person's stop: the run's `stop_agent` control, so the runner records
149
+ * "Stopped by you" and goes on. A box older than that control (or a run the control cannot
150
+ * reach) gets the old path: stop the agent's session, which the run reads as a stop.
151
+ */
152
+ export function useStopAgent(projectId, controlSessionId, run) {
153
+ const { control } = useSessionWorkflows(projectId, controlSessionId, { enabled: false });
154
+ return async (agent) => {
155
+ if (!projectId || !agent.sessionId)
156
+ return;
157
+ if (controlSessionId && run?.runId && run.status === 'running') {
158
+ try {
159
+ await control.mutateAsync({ runId: run.runId, body: { action: 'stop_agent', session_id: agent.sessionId } });
160
+ return;
161
+ }
162
+ catch {
163
+ // Fall through: stopping the session still stops the agent.
164
+ }
165
+ }
166
+ await stopProjectSession(projectId, agent.sessionId);
167
+ };
168
+ }
116
169
  /** `restart_agent` for one agent row of a run, on the box that runs it. */
117
170
  export function useRestartAgent(projectId, controlSessionId, run) {
118
171
  const t = useTranslations('multiAgent.workflow');
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { cn } from '../../lib/utils.js';
4
4
  import { WarningIcon } from '@phosphor-icons/react';
5
5
  import { lazy, Suspense, useContext, useMemo, useRef } from 'react';
6
+ import { useToastClearance } from '../../primitives/toast-clearance.js';
6
7
  import { SpaceMentionContext } from './menus/space-mentions.js';
7
8
  import { useFeatureFlag } from '@kortix/sdk/react';
8
9
  import { ModelConnectionLayoutContext } from '../models/model-connection-layout.js';
@@ -29,6 +30,8 @@ export function ComposerCard({ tHardcodedUi, isDragOver, handleDragEnter, handle
29
30
  agents = EMPTY_AGENTS, commands = EMPTY_COMMANDS, slashFiles = EMPTY_SLASH_FILES, models = EMPTY_MODELS, notice = null, disabled = false, lockForQuestion = false, lockForApproval = false, questionButtonLabel = null, questionActive = false, submitLabel = null, questionCanAct = true, escCount = 0, isBusy = false, isSending = false, onStop, stopDisabled = false, canStop = true, modelsLoading = false, modelRequired = false, onModelChange, modelDefaultControls, inheritedModel, providers, variants = EMPTY_VARIANTS, selectedVariant = null, onVariantChange, projectId, toolbarSlot, underbarSlot, rewind, selectedAgent = null, onAgentChange, noAccessibleAgents = false, agentLocked = false, onContextClick, messages, underbarPlacement = 'below', agentPickerCompact = false, slashMenuPlacement = 'above', cardClassName, call, }) {
30
31
  const connectionsAbove = useContext(ModelConnectionLayoutContext) === 'above';
31
32
  const cardRef = useRef(null);
33
+ // A composer docked at the window bottom keeps toasts above its Send/Stop button.
34
+ useToastClearance(cardRef, slashMenuPlacement === 'above');
32
35
  const { attachAccept, modelPickerEnabled } = useUiHostConfig();
33
36
  const inlineUnderbar = underbarPlacement === 'inline';
34
37
  /*