@kortix/ui 0.15.11 → 0.16.1

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 (404) hide show
  1. package/dist/_vendor/kortix-shared.js +485 -187
  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 +497 -46
  128. package/dist/i18n/en.js +538 -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 +497 -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/layout/project-home.js +2 -1
  346. package/dist/workspace/memory/memory-page-list.js +1 -1
  347. package/dist/workspace/new/workspace-handoff.js +2 -1
  348. package/dist/workspace/projects/modal/project-icon-field.js +2 -1
  349. package/dist/workspace/session-workspace.js +13 -12
  350. package/dist/workspace/setup/setup-banner.d.ts +4 -0
  351. package/dist/workspace/setup/setup-banner.js +57 -0
  352. package/dist/workspace/setup/setup-steps.d.ts +57 -0
  353. package/dist/workspace/setup/setup-steps.js +53 -0
  354. package/dist/workspace/setup/use-setup-steps.d.ts +18 -0
  355. package/dist/workspace/setup/use-setup-steps.js +57 -0
  356. package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
  357. package/dist/workspace/setup/workspace-setup-page.js +91 -0
  358. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +5 -1
  359. package/dist/workspace/sidebar/footer/project-calendar-nav.d.ts +8 -0
  360. package/dist/workspace/sidebar/footer/project-calendar-nav.js +31 -0
  361. package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +14 -6
  362. package/dist/workspace/sidebar/footer/project-chrome-nav.js +37 -25
  363. package/dist/workspace/sidebar/footer/project-computer-nav.d.ts +17 -9
  364. package/dist/workspace/sidebar/footer/project-computer-nav.js +36 -26
  365. package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +7 -7
  366. package/dist/workspace/sidebar/footer/project-download-app-nav.js +25 -13
  367. package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +8 -0
  368. package/dist/workspace/sidebar/footer/project-inbox-nav.js +29 -0
  369. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +3 -13
  370. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +6 -48
  371. package/dist/workspace/sidebar/footer/project-mcp-nav.d.ts +7 -7
  372. package/dist/workspace/sidebar/footer/project-mcp-nav.js +31 -13
  373. package/dist/workspace/sidebar/footer/project-phone-app-nav.d.ts +10 -0
  374. package/dist/workspace/sidebar/footer/project-phone-app-nav.js +61 -0
  375. package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +21 -0
  376. package/dist/workspace/sidebar/footer/project-promo-cards.js +33 -0
  377. package/dist/workspace/sidebar/footer/promo-card.d.ts +41 -0
  378. package/dist/workspace/sidebar/footer/promo-card.js +47 -0
  379. package/dist/workspace/sidebar/footer/sandbox-health.js +1 -1
  380. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  381. package/dist/workspace/sidebar/project-nav-items.js +12 -4
  382. package/dist/workspace/sidebar/project-session-list.js +58 -26
  383. package/dist/workspace/sidebar/project-sidebar.js +2 -5
  384. package/dist/workspace/sidebar/project-spaces-nav.js +2 -1
  385. package/dist/workspace/sidebar/session-brief-hover-card.d.ts +24 -0
  386. package/dist/workspace/sidebar/session-brief-hover-card.js +4 -3
  387. package/dist/workspace/sidebar/session-group-sections.d.ts +26 -7
  388. package/dist/workspace/sidebar/session-group-sections.js +121 -41
  389. package/dist/workspace/sidebar/sidebar-drill.js +6 -0
  390. package/dist/workspace/sidebar/sidebar-more-group.js +3 -2
  391. package/dist/workspace/sidebar/use-workspace-list.d.ts +7 -0
  392. package/dist/workspace/sidebar/use-workspace-list.js +11 -1
  393. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +14 -0
  394. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +46 -2
  395. package/dist/workspace/space/space-tab-panels.js +1 -1
  396. package/dist/workspace/spaces/space-timeline.js +2 -2
  397. package/package.json +67 -10
  398. package/skills/kortix-ui/SKILL.md +2 -2
  399. package/skills/kortix-ui/references/modules.md +5 -3
  400. package/dist/session/thread/turn-share.d.ts +0 -16
  401. package/dist/session/thread/turn-share.js +0 -161
  402. package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +0 -11
  403. package/dist/workspace/sidebar/footer/promo-nav-row.js +0 -7
  404. /package/dist/markdown/{code/inline-chip.d.ts → inline-chip.d.ts} +0 -0
@@ -35,11 +35,20 @@ export declare function ConnectorStatusBadge({ connector, accountCount, }: {
35
35
  /**
36
36
  * A project connector's logo with its state on it, the way a Slack or Teams
37
37
  * app tile shows one: a dot on the bottom-right corner (green Connected,
38
- * orange Needs account, red Error). The word is for screen readers; the dot
39
- * carries it on screen.
38
+ * orange Needs account, red Error). The dot is a second cue only: colour is
39
+ * never the only means (WCAG 1.4.1). Put {@link ConnectorStatusWord} in the
40
+ * tile's subtitle, which says the state in words.
40
41
  */
41
42
  export declare function ConnectorStatusLogo({ connector, source, accountCount, }: {
42
43
  connector: AdminConnector;
43
44
  source: ConnectorLogoSource;
44
45
  accountCount?: number;
45
46
  }): import("react").JSX.Element;
47
+ /**
48
+ * The state as visible text after a tile's subtitle (" · Needs account").
49
+ * A healthy connector stays quiet and renders nothing.
50
+ */
51
+ export declare function ConnectorStatusWord({ connector, accountCount }: {
52
+ connector: AdminConnector;
53
+ accountCount?: number;
54
+ }): import("react").JSX.Element | null;
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { CheckIcon, } from '@phosphor-icons/react';
4
4
  import { useTranslations } from '../../i18n/index.js';
5
5
  import { ConnectorLogo } from '../../internal/connector-logo/connector-logo.js';
@@ -41,11 +41,23 @@ export function ConnectorStatusBadge({ connector, accountCount, }) {
41
41
  /**
42
42
  * A project connector's logo with its state on it, the way a Slack or Teams
43
43
  * app tile shows one: a dot on the bottom-right corner (green Connected,
44
- * orange Needs account, red Error). The word is for screen readers; the dot
45
- * carries it on screen.
44
+ * orange Needs account, red Error). The dot is a second cue only: colour is
45
+ * never the only means (WCAG 1.4.1). Put {@link ConnectorStatusWord} in the
46
+ * tile's subtitle, which says the state in words.
46
47
  */
47
48
  export function ConnectorStatusLogo({ connector, source, accountCount, }) {
48
49
  const t = useTranslations('connectorPages');
49
50
  const tone = connectorTone(connector, accountCount);
50
- return (_jsxs("span", { className: "relative flex shrink-0", children: [_jsx(ConnectorLogo, { source: source, size: "lg" }), _jsx("span", { "aria-hidden": true, className: "bg-background absolute -right-1 -bottom-1 flex size-3 items-center justify-center rounded-full", children: _jsx("span", { className: cn('size-2 rounded-full', STATUS_DOT[tone]) }) }), _jsx("span", { className: "sr-only", children: t(STATUS_WORD[tone]) })] }));
51
+ return (_jsxs("span", { className: "relative flex shrink-0", children: [_jsx(ConnectorLogo, { source: source, size: "lg" }), _jsx("span", { "aria-hidden": true, className: "bg-background absolute -right-1 -bottom-1 flex size-3 items-center justify-center rounded-full", children: _jsx("span", { className: cn('size-2 rounded-full', STATUS_DOT[tone]) }) }), tone === 'connected' ? _jsx("span", { className: "sr-only", children: t(STATUS_WORD[tone]) }) : null] }));
52
+ }
53
+ /**
54
+ * The state as visible text after a tile's subtitle (" · Needs account").
55
+ * A healthy connector stays quiet and renders nothing.
56
+ */
57
+ export function ConnectorStatusWord({ connector, accountCount }) {
58
+ const t = useTranslations('connectorPages');
59
+ const tone = connectorTone(connector, accountCount);
60
+ if (tone === 'connected')
61
+ return null;
62
+ return (_jsxs(_Fragment, { children: [' · ', _jsx("span", { className: "text-foreground", "data-connector-tone": tone, children: t(STATUS_WORD[tone]) })] }));
51
63
  }
@@ -26,7 +26,7 @@ import { EmptyState } from '../../primitives/empty-state.js';
26
26
  import { connectorConnectionQueryKeys } from '../../internal/hooks/connectors/invalidate-connections.js';
27
27
  import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
28
28
  import { useProjectCan } from '../../internal/lib/use-project-can.js';
29
- import { ConnectorStatusBadge, ConnectorStatusLogo } from './connector-identity.js';
29
+ import { ConnectorStatusBadge, ConnectorStatusLogo, ConnectorStatusWord } from './connector-identity.js';
30
30
  import { CatalogCard } from '../shared/catalog/catalog-card.js';
31
31
  import { DENSE_GRID_CLASSNAME, DENSE_GRID_CONTAINER_CLASSNAME } from '../shared/catalog/catalog-grid-tokens.js';
32
32
  import { ConnectorLogo } from '../../internal/connector-logo/connector-logo.js';
@@ -119,12 +119,16 @@ function ChannelsFallback() {
119
119
  * reach the agent, rather than what the agent can reach).
120
120
  */
121
121
  const SCOPES = ['all', 'connected', 'channels'];
122
+ /** The `connectorPages` key of each scope's tab label. */
122
123
  const SCOPE_LABEL = {
123
- all: 'All',
124
- connected: 'Connected',
124
+ all: 'scopeAll',
125
+ // "Added", not "Connected": the tab lists every connector added to this
126
+ // workspace, whatever its state. A connector that still needs an account
127
+ // is added, not connected; its tile says so in words.
128
+ connected: 'scopeAdded',
125
129
  // The tab holds everything Kortix built (Slack, Teams, Email, Telegram and
126
130
  // the computer). People call those channels; the catalog type stays "Kortix".
127
- channels: 'Channels',
131
+ channels: 'scopeChannels',
128
132
  };
129
133
  /**
130
134
  * The heading follows the scope. "Give agents access to outside tools and
@@ -343,7 +347,7 @@ export function ConnectorsPage({ projectId, surface = { kind: 'global' }, grant,
343
347
  return (_jsx("div", { className: DENSE_GRID_CONTAINER_CLASSNAME, children: _jsx("div", { className: DENSE_GRID_CLASSNAME, children: list.map((connector) => {
344
348
  const row = rows.get(connector.slug);
345
349
  const toggle = agentScoped && row?.onCheckedChange ? (_jsxs("span", { className: "flex items-center gap-2", children: [row.checked && row.control && row.control !== '—' ? row.control : null, _jsx(Switch, { "aria-label": connectorDisplayName(connector), checked: row.checked === true, onCheckedChange: row.onCheckedChange, disabled: row.disabled })] })) : undefined;
346
- return (_jsx(CatalogCard, { variant: "plain", href: connectorHref(projectId, connector.slug), leading: _jsx(ConnectorStatusLogo, { connector: connector, source: installedConnectorLogoSource(connector) }), title: connectorDisplayName(connector), subtitle: _jsx("span", { className: "text-muted-foreground truncate text-xs", children: describeConnector(connector) }), trailing: toggle, trailingInteractive: toggle !== undefined, className: cn(agentScoped && row?.checked === false && 'opacity-60 hover:opacity-100') }, connector.slug));
350
+ return (_jsx(CatalogCard, { variant: "plain", href: connectorHref(projectId, connector.slug), leading: _jsx(ConnectorStatusLogo, { connector: connector, source: installedConnectorLogoSource(connector) }), title: connectorDisplayName(connector), subtitle: _jsxs("span", { className: "text-muted-foreground truncate text-xs", children: [describeConnector(connector), _jsx(ConnectorStatusWord, { connector: connector })] }), trailing: toggle, trailingInteractive: toggle !== undefined, className: cn(agentScoped && row?.checked === false && 'opacity-60 hover:opacity-100') }, connector.slug));
347
351
  }) }) }));
348
352
  };
349
353
  // Quiet on purpose: a filter, not a second tab strip.
@@ -369,7 +373,7 @@ export function ConnectorsPage({ projectId, surface = { kind: 'global' }, grant,
369
373
  // static labels over a scope read out of the URL have nothing to wait for.
370
374
  // Project scope shows it in the filter row; agent scope shows it on the
371
375
  // heading of the list it narrows, below the grant sentence.
372
- const scopeTabs = visibleScopes.length > 1 ? (_jsx(Tabs, { value: scope, onValueChange: (value) => setScope(value), children: _jsx(TabsList, { children: visibleScopes.map((value) => (_jsx(TabsTrigger, { value: value, children: SCOPE_LABEL[value] }, value))) }) })) : null;
376
+ const scopeTabs = visibleScopes.length > 1 ? (_jsx(Tabs, { value: scope, onValueChange: (value) => setScope(value), children: _jsx(TabsList, { children: visibleScopes.map((value) => (_jsx(TabsTrigger, { value: value, children: tPages(SCOPE_LABEL[value]) }, value))) }) })) : null;
373
377
  // The project's connectors as rows, with the page-level states: loading,
374
378
  // a failed load, nothing yet, nothing matching.
375
379
  const listBody = (list) => {
@@ -162,7 +162,7 @@ function CatalogAppPage({ projectId, appSegment }) {
162
162
  setPendingControl(key);
163
163
  // The way the user picked is the way installed.
164
164
  const mcpUrl = surface.kind === 'mcp' && surface.oneClick ? surface.url : null;
165
- const askName = () => ask({ target, way: { kind: surface.kind, oneClick: surface.oneClick }, connectors, app, asNewProfile });
165
+ const askName = () => ask({ target, way: { kind: surface.kind, oneClick: surface.oneClick, url: surface.url }, connectors, app, asNewProfile });
166
166
  if (!mcpUrl) {
167
167
  askName();
168
168
  return;
@@ -244,7 +244,7 @@ function CatalogAppPage({ projectId, appSegment }) {
244
244
  _jsx(ChannelHeroLogoInHeader, { children: _jsx(ChannelsSection, { projectId: projectId, platform: channelPlatform }) })) : null, !channelPlatform && (infoCells.length > 0 || resolved.description) ? (_jsxs("div", { className: "bg-popover divide-border divide-y overflow-hidden rounded-md border", children: [infoCells.length > 0 ? (_jsx("dl", { className: "flex flex-wrap gap-x-8 gap-y-3 px-4 py-3", children: infoCells.map((cell) => (_jsxs("div", { className: "min-w-0 space-y-0.5", children: [_jsxs("dt", { className: "text-muted-foreground flex h-4 items-center justify-between gap-2 text-xs", children: [_jsx("span", { children: cell.label }), cell.labelAddon] }), _jsx("dd", { className: "text-foreground truncate text-sm font-medium", children: cell.value })] }, cell.key))) })) : null, resolved.description ? (_jsxs("div", { className: "space-y-1.5 px-4 py-4", children: [_jsx("h2", { className: "text-muted-foreground text-xs", children: t('overview') }), _jsx("p", { className: "text-foreground text-sm text-pretty", children: resolved.description })] })) : null] })) : null, inProject.length > 0 ? (_jsxs("section", { className: "space-y-3", children: [_jsx("h2", { className: "text-foreground text-sm font-medium", children: projectName ? t('installedIn', { project: projectName }) : t('installedHere') }), _jsx("ul", { className: ROW_GROUP, children: inProject.map((connector) => {
245
245
  const tone = connectorTone(connector, connectionsQuery.data ? connectorAccounts(connectionsQuery.data.connections, connector).length : undefined);
246
246
  return (_jsx("li", { children: _jsxs(Link, { href: connectorHref(projectId, connector.slug, { app }), className: "hover:bg-muted/50 flex items-center gap-3 px-4 py-3 transition-colors", children: [_jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-foreground block truncate text-sm font-medium", children: connectorDisplayName(connector) }), _jsx("span", { className: "text-muted-foreground block truncate text-xs", children: connectorSummary(connector, providerLabel(connector.provider)) })] }), _jsx("span", { className: "flex w-28 shrink-0 items-center", children: _jsx(ConnectorStatusBadge, { tone: tone }) }), _jsxs("span", { className: "text-muted-foreground flex w-16 shrink-0 items-center justify-end gap-1 text-xs", children: [t('open'), _jsx(CaretRightIcon, { "aria-hidden": true, className: "size-4" })] })] }) }, connector.slug));
247
- }) })] })) : null, resolved.surfaces.length === 0 && resolved.references.length === 0 ? (_jsx(EmptyState, { icon: GlobeIcon, size: "sm", title: tI18nComplete.raw('text363579e1d66b'), description: tI18nComplete.raw('text4d286e47d580') })) : null, waySurfaces.length > (channelPlatform ? 0 : 1) || resolved.references.length > 0 ? (_jsxs("section", { className: "space-y-3", children: [_jsx("h2", { className: "text-foreground text-sm font-medium", children: channelPlatform ? t('otherWaysToConnect') : t('waysToConnect') }), waySurfaces.length > 0 ? (_jsx("ul", { className: ROW_GROUP, children: waySurfaces.map((surface) => (_jsxs("li", { className: SURFACE_ROW, children: [_jsxs("span", { className: "min-w-0 flex-1 space-y-0.5", children: [_jsxs("span", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [_jsx("span", { className: "text-foreground truncate text-sm font-medium", children: surface.label }), _jsx(Badge, { variant: "muted", size: "xs", children: wayKindLabel(surface.kind) }), surface.oneClick ? (_jsx(Badge, { variant: "secondary", size: "xs", children: t('wayOneClick') })) : null, surface.recommended ? (_jsx(Badge, { variant: "success", size: "xs", children: t('wayRecommended') })) : null] }), _jsx("span", { className: "text-muted-foreground block text-xs text-pretty", children: wayDescription(t, { kind: surface.kind, oneClick: surface.oneClick }, resolved.name) })] }), surface.variantId && detail ? (_jsx(Button, { type: "button", variant: shownWay?.variantId === surface.variantId ? 'secondary' : 'outline-ghost', size: "sm", "aria-pressed": shownWay?.variantId === surface.variantId, onClick: () => {
247
+ }) })] })) : null, resolved.surfaces.length === 0 && resolved.references.length === 0 ? (_jsx(EmptyState, { icon: GlobeIcon, size: "sm", title: tI18nComplete.raw('text363579e1d66b'), description: tI18nComplete.raw('text4d286e47d580') })) : null, waySurfaces.length > (channelPlatform ? 0 : 1) || resolved.references.length > 0 ? (_jsxs("section", { className: "space-y-3", children: [_jsx("h2", { className: "text-foreground text-sm font-medium", children: channelPlatform ? t('otherWaysToConnect') : t('waysToConnect') }), waySurfaces.length > 0 ? (_jsx("ul", { className: ROW_GROUP, children: waySurfaces.map((surface) => (_jsxs("li", { className: SURFACE_ROW, children: [_jsxs("span", { className: "min-w-0 flex-1 space-y-0.5", children: [_jsxs("span", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [_jsx("span", { className: "text-foreground truncate text-sm font-medium", children: surface.label }), _jsx(Badge, { variant: "muted", size: "xs", children: wayKindLabel(surface.kind) }), surface.oneClick ? (_jsx(Badge, { variant: "secondary", size: "xs", children: t('wayOneClick') })) : null, surface.recommended ? (_jsx(Badge, { variant: "success", size: "xs", children: t('wayRecommended') })) : null] }), _jsx("span", { className: "text-muted-foreground block text-xs text-pretty", children: wayDescription(t, { kind: surface.kind, oneClick: surface.oneClick, url: surface.url }, resolved.name) })] }), surface.variantId && detail ? (_jsx(Button, { type: "button", variant: shownWay?.variantId === surface.variantId ? 'secondary' : 'outline-ghost', size: "sm", "aria-pressed": shownWay?.variantId === surface.variantId, onClick: () => {
248
248
  setToolsWay(surface.variantId);
249
249
  setAllTools(false);
250
250
  }, children: t('wayTools') })) : null, installMenu(surface.key, surface, 'secondary', surface.label)] }, surface.key))) })) : null, resolved.references.length > 0 ? (_jsxs("p", { className: "text-muted-foreground text-xs text-pretty", children: [t('otherWaysLead'), ' ', resolved.references.map((reference, index) => (_jsxs(Fragment, { children: [index > 0 ? ', ' : null, reference.href ? (_jsxs("a", { href: reference.href, target: "_blank", rel: "noreferrer", className: "text-foreground inline-flex items-center gap-0.5 underline-offset-4 hover:underline", children: [reference.label, _jsx(ArrowSquareOutIcon, { "aria-hidden": true, className: "size-3 shrink-0" })] })) : (reference.label)] }, reference.key)))] })) : null] })) : null, shownWay ? (_jsxs("section", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [_jsx("h2", { className: "text-foreground text-sm font-medium", children: t('toolsOf', { kind: wayKindLabel(shownWay.kind) }) }), toolsQuery.data ? (_jsx("span", { className: "text-muted-foreground text-xs tabular-nums", children: t('toolsCount', { count: toolsQuery.data.total }) })) : null] }), toolsQuery.isPending ? (_jsx(Skeleton, { className: "h-24 w-full py-0" })) : toolsQuery.isError ? (_jsx("p", { className: "text-muted-foreground text-sm", children: t('toolsUnavailable') })) : toolsQuery.data && toolsQuery.data.tools.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-muted-foreground text-xs", children: t(`toolsSource_${toolsQuery.data.source}`) }), groupAppTools(allTools ? toolsQuery.data.tools : toolsQuery.data.tools.slice(0, TOOLS_PREVIEW), appNames).map((group) => (_jsxs("div", { className: "space-y-2", children: [_jsxs("h3", { className: "text-muted-foreground text-xs", children: [tI18nComplete.raw(TOOL_GROUP_LABEL[group.key]), " \u00B7 ", group.tools.length] }), _jsx("ul", { className: ROW_GROUP, children: group.tools.map((tool) => {
@@ -4,6 +4,8 @@ import { type WayKind } from './way-kind.js';
4
4
  export interface InstallWay {
5
5
  kind: WayKind;
6
6
  oneClick: boolean;
7
+ /** The server URL of an MCP way, when the catalogue has one. */
8
+ url?: string | null;
7
9
  }
8
10
  /**
9
11
  * Install → this dialog → the connector. The text says which way it
@@ -9,6 +9,8 @@ import Loading from '../../../primitives/loading.js';
9
9
  import { Modal, ModalBody, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle, } from '../../../primitives/modal.js';
10
10
  import { useTranslations } from '../../../i18n/index.js';
11
11
  import { wayKindLabel } from './way-kind.js';
12
+ /** Kortix's own Google servers (the API's `connectors/google`): Kortix connects, not the vendor's MCP server. */
13
+ const KORTIX_GOOGLE_MCP = 'https://google.mcp.kortix.com/';
12
14
  /**
13
15
  * Install → this dialog → the connector. The text says which way it
14
16
  * connects, so a Composio app or an API key never comes as a surprise. The
@@ -34,7 +36,10 @@ export function wayDescription(t, way, appName) {
34
36
  return t('wayComposio', { name: appName });
35
37
  if (way.kind === 'kortix')
36
38
  return t('wayChannel', { name: appName });
37
- if (way.kind === 'mcp')
39
+ if (way.kind === 'mcp') {
40
+ if (way.url?.startsWith(KORTIX_GOOGLE_MCP))
41
+ return t('wayKortixGoogle', { name: appName });
38
42
  return way.oneClick ? t('wayMcpOneClick', { name: appName }) : t('wayMcpSetup', { name: appName });
43
+ }
39
44
  return t('wayApi', { name: appName, kind: wayKindLabel(way.kind) });
40
45
  }
@@ -24,6 +24,7 @@ export declare function useAgentAccess(projectId: string): {
24
24
  agents: Array<{
25
25
  name: string;
26
26
  path: string;
27
+ title?: string | null;
27
28
  description: string | null;
28
29
  mode: string | null;
29
30
  hidden?: boolean;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Customize → Evals → Jobs → Compare (`/admin/eval-jobs/compare?jobs=a,b`):
3
+ * jobs side by side, task by task. The first job is the baseline; `change`
4
+ * reads the last job against it. The way to tell whether an agent got better
5
+ * or worse on the same tasks, and on which ones.
6
+ */
7
+ export declare function EvalCompareView({ projectId, jobIds }: {
8
+ projectId: string;
9
+ jobIds: string[];
10
+ }): import("react").JSX.Element;
@@ -0,0 +1,68 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useWorkspaceEvalCompare } from '@kortix/sdk/react';
4
+ import { ArrowDownIcon, ArrowUpIcon, EqualsIcon, MinusIcon } from '@phosphor-icons/react';
5
+ import { useState } from 'react';
6
+ import { useTranslations } from '../../i18n/index.js';
7
+ import { cn } from '../../internal/lib/utils.js';
8
+ import { Button } from '../../primitives/button.js';
9
+ import { EmptyState } from '../../primitives/empty-state.js';
10
+ import { ErrorState } from '../../primitives/error-state.js';
11
+ import { LocalTime } from '../../primitives/local-time.js';
12
+ import { Skeleton } from '../../primitives/skeleton.js';
13
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '../../primitives/table.js';
14
+ import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
15
+ import { Tag } from '../../primitives/tag.js';
16
+ import { UiLink as Link } from '../../providers/ui-provider.js';
17
+ import { agentLabel, evalJobHref, evalJobScore, evalJobsHref, jobSource, percent } from './eval-meta.js';
18
+ import { EVAL_FRAME, EVAL_TIME, EvalDetailPage, InfoHint, ScoreValue } from './eval-ui.js';
19
+ const VIEWS = ['all', 'changed', 'worse', 'better'];
20
+ const CHANGE = {
21
+ better: { icon: ArrowUpIcon, className: 'text-kortix-green' },
22
+ worse: { icon: ArrowDownIcon, className: 'text-kortix-red' },
23
+ same: { icon: EqualsIcon, className: 'text-muted-foreground' },
24
+ only_one: { icon: MinusIcon, className: 'text-muted-foreground' },
25
+ };
26
+ /**
27
+ * Customize → Evals → Jobs → Compare (`/admin/eval-jobs/compare?jobs=a,b`):
28
+ * jobs side by side, task by task. The first job is the baseline; `change`
29
+ * reads the last job against it. The way to tell whether an agent got better
30
+ * or worse on the same tasks, and on which ones.
31
+ */
32
+ export function EvalCompareView({ projectId, jobIds }) {
33
+ const t = useTranslations('evals');
34
+ const [by, setBy] = useState('task');
35
+ const [view, setView] = useState('changed');
36
+ const query = useWorkspaceEvalCompare(projectId, jobIds, by);
37
+ const data = query.data;
38
+ const rows = (data?.rows ?? []).filter((row) => view === 'all' ||
39
+ (view === 'changed' ? row.change === 'better' || row.change === 'worse' : row.change === view));
40
+ const manyAgents = (data?.jobs ?? []).some((job) => job.stats.agents.length > 1);
41
+ return (_jsx(EvalDetailPage, { wide: true, crumbs: [{ label: t('jobsTitle'), href: evalJobsHref(projectId) }, { label: t('compare') }], children: jobIds.length < 2 ? (_jsx(EmptyState, { size: "sm", title: t('compareNeedsTwo'), action: _jsx(Button, { asChild: true, size: "sm", variant: "outline", children: _jsx(Link, { href: evalJobsHref(projectId), children: t('jobsTitle') }) }) })) : query.isError ? (_jsx(ErrorState, { size: "sm", title: t('loadError'), description: query.error instanceof Error ? query.error.message : undefined, action: _jsx(Button, { size: "sm", variant: "outline", onClick: () => query.refetch(), children: t('retry') }) })) : !data ? (_jsxs("div", { className: "flex flex-col gap-3", "aria-busy": true, children: [_jsx(Skeleton, { className: "h-7 w-72" }), _jsx(Skeleton, { className: "h-24 w-full rounded-md" }), _jsx(Skeleton, { className: "h-64 w-full rounded-md" })] })) : (_jsxs(_Fragment, { children: [_jsxs("header", { className: "flex flex-col gap-1.5", children: [_jsxs("h1", { className: "text-foreground flex items-center gap-1.5 text-lg font-medium", children: [t('compareTitle', { count: data.jobs.length }), _jsx(InfoHint, { text: t('compareInfo') })] }), _jsx("p", { className: "text-muted-foreground text-sm", "data-testid": "evals-compare-summary", children: t('compareSummary', {
42
+ better: data.summary.better,
43
+ worse: data.summary.worse,
44
+ same: data.summary.same,
45
+ only: data.summary.only_one,
46
+ }) })] }), _jsx("div", { className: cn('grid gap-3', data.jobs.length > 2 ? 'sm:grid-cols-3' : 'sm:grid-cols-2'), children: data.jobs.map((job, i) => {
47
+ const score = evalJobScore(job);
48
+ return (_jsxs(Link, { href: evalJobHref(projectId, job.job_id), className: cn(EVAL_FRAME, 'hover:bg-hover flex flex-col gap-1 px-4 py-3 transition-colors'), "data-testid": "evals-compare-job", children: [_jsxs("span", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-foreground min-w-0 truncate text-sm font-medium", children: job.job_name }), i === 0 ? _jsx(Tag, { children: t('baseline') }) : null] }), _jsx("span", { className: "text-muted-foreground truncate text-xs", children: [jobSource(job), score ? agentLabel(score.agent, score.model) : null].filter(Boolean).join(' · ') }), _jsxs("span", { className: "flex items-baseline justify-between gap-2 pt-1", children: [_jsx(ScoreValue, { rate: score?.passAt1 ?? score?.mean, n: score?.validTrials ?? 0 }), _jsx("span", { className: "text-muted-foreground text-xs", children: _jsx(LocalTime, { value: job.created_at, options: EVAL_TIME }) })] })] }, job.job_id));
49
+ }) }), _jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsx(Tabs, { value: view, onValueChange: (value) => setView(value), children: _jsx(TabsList, { variant: "segmented", "aria-label": t('compareView'), children: VIEWS.map((value) => (_jsxs(TabsTrigger, { value: value, "data-testid": `evals-compare-view-${value}`, children: [t(`compareViews.${value}`), _jsx("span", { className: "text-muted-foreground ml-1 tabular-nums", children: value === 'all'
50
+ ? data.rows.length
51
+ : value === 'changed'
52
+ ? data.summary.better + data.summary.worse
53
+ : data.summary[value] })] }, value))) }) }), manyAgents ? (_jsx(Tabs, { value: by, onValueChange: (value) => setBy(value), children: _jsxs(TabsList, { variant: "segmented", "aria-label": t('compareBy'), children: [_jsx(TabsTrigger, { value: "task", children: t('byTask') }), _jsx(TabsTrigger, { value: "task_agent_model", children: t('byTaskAgent') })] }) })) : null] }), rows.length === 0 ? (_jsx("div", { className: `${EVAL_FRAME} text-muted-foreground px-4 py-6 text-center text-sm`, children: view === 'all' ? t('noCompareRows') : t('noChanges') })) : (_jsxs(Table, { "data-testid": "evals-compare-table", children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t('colTask') }), data.jobs.map((job, i) => (_jsx(TableHead, { className: "max-w-40 truncate text-right", title: job.job_name, children: i === 0 ? t('baseline') : job.job_name }, job.job_id))), _jsx(TableHead, { className: "w-24 text-right", children: t('colChange') })] }) }), _jsx(TableBody, { children: rows.map((row) => (_jsx(CompareRow, { row: row }, `${row.task_name}-${row.agent}-${row.model}`))) })] }))] })) }));
54
+ }
55
+ function CompareRow({ row }) {
56
+ const t = useTranslations('evals');
57
+ const change = CHANGE[row.change];
58
+ const Icon = change.icon;
59
+ return (_jsxs(TableRow, { "data-testid": "evals-compare-row", "data-change": row.change, children: [_jsxs(TableCell, { className: "max-w-72", children: [_jsx("span", { className: "text-foreground block truncate font-mono text-sm", children: row.task_name }), row.agent ? (_jsx("span", { className: "text-muted-foreground block truncate text-xs", children: agentLabel(row.agent, row.model) })) : null] }), row.cells.map((cell) => (_jsx(TableCell, { className: "text-right", children: _jsx(Cell, { cell: cell }) }, cell.job_id))), _jsx(TableCell, { className: "w-24 text-right", children: _jsxs("span", { className: cn('inline-flex items-center gap-1 text-xs', change.className), children: [_jsx(Icon, { weight: "bold", className: "size-3", "aria-hidden": true }), t(`changeKind.${row.change}`)] }) })] }));
60
+ }
61
+ /** One job on one task: the pass rate over its counted attempts, or the error that left none. */
62
+ function Cell({ cell }) {
63
+ const t = useTranslations('evals');
64
+ if (cell.n === 0)
65
+ return (_jsx("span", { className: "text-muted-foreground text-xs", title: cell.exception_type ?? undefined, children: cell.exception_type ? t('tone.error') : t('notRun') }));
66
+ const tint = cell.pass_rate === 1 ? 'bg-kortix-green/15' : cell.pass_rate === 0 ? 'bg-kortix-red/15' : 'bg-kortix-orange/15';
67
+ return (_jsxs("span", { className: cn('inline-flex items-baseline gap-1.5 rounded-sm px-1.5 py-0.5 tabular-nums', tint), children: [_jsx("span", { className: "text-foreground text-sm font-medium", children: percent(cell.pass_rate) }), cell.n > 1 ? _jsx("span", { className: "text-muted-foreground text-xs", children: `${cell.n_passed}/${cell.n}` }) : null] }));
68
+ }
@@ -0,0 +1,20 @@
1
+ import type { WorkspaceEvalTask } from '@kortix/sdk';
2
+ import { type EvalDatasetRef } from './eval-meta.js';
3
+ /** `403` from a task read: the caller may not read the repository's files. */
4
+ export declare const isNoFileAccess: (error: unknown) => boolean;
5
+ /**
6
+ * Customize → Evals → Datasets → one dataset (`/admin/eval-datasets/<kind>/<name>`),
7
+ * the Harbor Hub's dataset page: the name, New job, the CLI command, a version
8
+ * select, then README, Tasks, Leaderboard (this dataset's agents × models) and
9
+ * Jobs. A tab with nothing in it is left out.
10
+ */
11
+ export declare function EvalDatasetView({ projectId, dataset }: {
12
+ projectId: string;
13
+ dataset: EvalDatasetRef;
14
+ }): import("react").JSX.Element;
15
+ /** The tasks of one dataset: searchable by name, category and tag; a row opens the task. */
16
+ export declare function TaskTable({ projectId, dataset, tasks, }: {
17
+ projectId: string;
18
+ dataset: EvalDatasetRef;
19
+ tasks: WorkspaceEvalTask[];
20
+ }): import("react").JSX.Element;
@@ -0,0 +1,81 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useVisibleAgents, useWorkspaceEvalDatasets, useWorkspaceEvalJobs, useWorkspaceEvalSuites, useWorkspaceEvalTasks, } from '@kortix/sdk/react';
4
+ import { PlayIcon } from '@phosphor-icons/react';
5
+ import { useState } from 'react';
6
+ import { useTranslations } from '../../i18n/index.js';
7
+ import { UnifiedMarkdown } from '../../markdown/index.js';
8
+ import { Button } from '../../primitives/button.js';
9
+ import { EmptyState } from '../../primitives/empty-state.js';
10
+ import { ErrorState } from '../../primitives/error-state.js';
11
+ import { PageSearchBar } from '../../primitives/page-search-bar.js';
12
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../../primitives/select.js';
13
+ import { Skeleton } from '../../primitives/skeleton.js';
14
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '../../primitives/table.js';
15
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from '../../primitives/tabs.js';
16
+ import { Tag } from '../../primitives/tag.js';
17
+ import { UiLink as Link, useUiRouter } from '../../providers/ui-provider.js';
18
+ import { datasetLabel, evalDatasetHref, evalDatasetsHref, evalTaskHref, leaderboard, runCommand, } from './eval-meta.js';
19
+ import { EVAL_FRAME, EvalDetailPage, EvalTitle, JobsTable, LeaderboardTable, ListFooter, RunCommand, ShareButton, useUrlTab, } from './eval-ui.js';
20
+ import { RunEvalModal } from './run-eval-modal.js';
21
+ const TABS = ['readme', 'tasks', 'leaderboard', 'jobs'];
22
+ /** `403` from a task read: the caller may not read the repository's files. */
23
+ export const isNoFileAccess = (error) => error?.status === 403;
24
+ /**
25
+ * Customize → Evals → Datasets → one dataset (`/admin/eval-datasets/<kind>/<name>`),
26
+ * the Harbor Hub's dataset page: the name, New job, the CLI command, a version
27
+ * select, then README, Tasks, Leaderboard (this dataset's agents × models) and
28
+ * Jobs. A tab with nothing in it is left out.
29
+ */
30
+ export function EvalDatasetView({ projectId, dataset }) {
31
+ const t = useTranslations('evals');
32
+ const router = useUiRouter();
33
+ const suites = useWorkspaceEvalSuites(projectId);
34
+ const catalog = useWorkspaceEvalDatasets(dataset.kind === 'dataset' ? projectId : null);
35
+ const agents = useVisibleAgents({ projectId });
36
+ const tasks = useWorkspaceEvalTasks(projectId, dataset.kind === 'suite' ? { suite: dataset.name } : { dataset: dataset.name, version: dataset.version });
37
+ const jobs = useWorkspaceEvalJobs(projectId, dataset.kind === 'suite' ? { suite: dataset.name } : { dataset: dataset.name });
38
+ const [running, setRunning] = useState(false);
39
+ const suite = dataset.kind === 'suite' ? suites.data?.find((s) => s.name === dataset.name) : undefined;
40
+ const meta = dataset.kind === 'dataset' ? catalog.data?.datasets.find((d) => d.name === dataset.name) : undefined;
41
+ const version = dataset.kind === 'dataset' ? (dataset.version ?? meta?.version ?? null) : null;
42
+ const ref = dataset.kind === 'dataset' ? { ...dataset, version } : dataset;
43
+ const jobList = jobs.data ?? [];
44
+ // A dataset's jobs can name several versions: the board keeps this one's.
45
+ const board = leaderboard(version ? jobList.filter((job) => !job.config.datasets.some((d) => d.version && d.version !== version)) : jobList);
46
+ const readme = tasks.data?.readme ?? null;
47
+ const tabs = TABS.filter((tab) => (tab !== 'readme' || !!readme) &&
48
+ (tab !== 'leaderboard' || board.length > 0) &&
49
+ (tab !== 'jobs' || jobList.length > 0));
50
+ const [tab, setTab] = useUrlTab(tabs);
51
+ const firstAgent = suite ? null : (agents.find((agent) => agent.name !== 'kortix')?.name ?? null);
52
+ const unknown = (dataset.kind === 'suite' && suites.isSuccess && !suite) ||
53
+ (dataset.kind === 'dataset' && catalog.isSuccess && !meta && tasks.isError);
54
+ const description = dataset.kind === 'suite'
55
+ ? suite?.error
56
+ ? `${t('suiteError')}: ${suite.error}`
57
+ : suite?.source === 'config' && suite.config_path
58
+ ? t('suiteFromConfig', { path: suite.config_path })
59
+ : t('suiteInline')
60
+ : (meta?.description ?? null);
61
+ return (_jsxs(EvalDetailPage, { crumbs: [{ label: t('datasetsTitle'), href: evalDatasetsHref(projectId) }, { label: dataset.name }], children: [_jsx(RunEvalModal, { projectId: projectId, suites: suites.data ?? [], target: dataset.kind === 'suite' ? { kind: 'suite', name: dataset.name } : { kind: 'dataset', name: dataset.name, version }, open: running, onOpenChange: setRunning }), unknown ? (_jsx(EmptyState, { size: "sm", title: t('datasetNotFound'), action: _jsx(Button, { asChild: true, size: "sm", variant: "outline", children: _jsx(Link, { href: evalDatasetsHref(projectId), children: t('datasetsTitle') }) }) })) : (_jsxs(_Fragment, { children: [_jsxs("header", { className: "flex flex-wrap items-start justify-between gap-x-4 gap-y-3", children: [_jsx(EvalTitle, { name: dataset.name, badge: _jsx(Tag, { children: t(`origin.${dataset.kind === 'suite' ? 'suite' : meta?.kind === 'builtin' ? 'builtin' : 'registry'}`) }), description: description }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [meta && meta.versions.length > 1 ? (_jsxs(Select, { value: version ?? meta.version, onValueChange: (next) => router.push(evalDatasetHref(projectId, { kind: 'dataset', name: dataset.name, version: next })), children: [_jsx(SelectTrigger, { size: "sm", className: "w-36", "aria-label": t('version'), "data-testid": "evals-version", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: meta.versions.map((v) => (_jsx(SelectItem, { value: v, children: v === meta.version ? t('versionLatest', { version: v }) : v }, v))) })] })) : null, _jsx(ShareButton, {}), _jsxs(Button, { size: "sm", className: "gap-1.5", onClick: () => setRunning(true), disabled: dataset.kind === 'suite' && !suite?.config, "data-testid": "evals-dataset-run", children: [_jsx(PlayIcon, { weight: "fill", className: "size-3.5 shrink-0", "aria-hidden": true }), t('newJob')] })] })] }), _jsx(RunCommand, { command: runCommand(ref, { agent: firstAgent }) }), tasks.isLoading ? (_jsxs("div", { className: "flex flex-col gap-2", "aria-busy": true, children: [_jsx(Skeleton, { className: "h-8 w-64" }), _jsx(Skeleton, { className: "h-40 w-full rounded-md" })] })) : (_jsxs(Tabs, { value: tab, onValueChange: (value) => setTab(value), children: [_jsx(TabsList, { className: "w-fit", children: tabs.map((value) => (_jsxs(TabsTrigger, { value: value, "data-testid": `evals-tab-${value}`, children: [t(`datasetTab.${value}`), value === 'tasks' && tasks.data ? (_jsx("span", { className: "text-muted-foreground ml-1 tabular-nums", children: tasks.data.tasks.length })) : value === 'jobs' ? (_jsx("span", { className: "text-muted-foreground ml-1 tabular-nums", children: jobs.total })) : null] }, value))) }), readme ? (_jsx(TabsContent, { value: "readme", className: "pt-4", children: _jsx("article", { className: `${EVAL_FRAME} px-6 py-5`, "data-testid": "evals-readme", children: _jsx(UnifiedMarkdown, { content: readme, trust: "untrusted", variant: "document" }) }) })) : null, _jsx(TabsContent, { value: "tasks", className: "pt-4", children: tasks.isError ? (_jsx(ErrorState, { size: "sm", title: isNoFileAccess(tasks.error) ? t('noFileAccess') : t('tasksLoadError'), description: isNoFileAccess(tasks.error)
62
+ ? t('noFileAccessDescription')
63
+ : tasks.error instanceof Error
64
+ ? tasks.error.message
65
+ : undefined, action: isNoFileAccess(tasks.error) ? undefined : (_jsx(Button, { size: "sm", variant: "outline", onClick: () => tasks.refetch(), children: t('retry') })) })) : (_jsx(TaskTable, { projectId: projectId, dataset: ref, tasks: tasks.data?.tasks ?? [] })) }), board.length ? (_jsx(TabsContent, { value: "leaderboard", className: "pt-4", children: _jsx(LeaderboardTable, { projectId: projectId, rows: board, showDataset: false }) })) : null, jobList.length ? (_jsxs(TabsContent, { value: "jobs", className: "flex flex-col gap-3 pt-4", children: [_jsx(JobsTable, { projectId: projectId, jobs: jobList, showDataset: false }), jobs.total > jobList.length ? (_jsx(ListFooter, { children: t('displayingJobs', { shown: jobList.length, total: jobs.total }) })) : null] })) : null] }))] }))] }));
66
+ }
67
+ /** The tasks of one dataset: searchable by name, category and tag; a row opens the task. */
68
+ export function TaskTable({ projectId, dataset, tasks, }) {
69
+ const t = useTranslations('evals');
70
+ const router = useUiRouter();
71
+ const [search, setSearch] = useState('');
72
+ const needle = search.trim().toLowerCase();
73
+ const shown = tasks.filter((task) => !needle ||
74
+ task.name.toLowerCase().includes(needle) ||
75
+ (task.category ?? '').toLowerCase().includes(needle) ||
76
+ task.tags.some((tag) => tag.toLowerCase().includes(needle)));
77
+ return (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx(PageSearchBar, { value: search, onChange: setSearch, placeholder: t('searchTasks') }), shown.length === 0 ? (_jsx("div", { className: `${EVAL_FRAME} text-muted-foreground px-4 py-6 text-center text-sm`, children: needle ? t('noTaskMatch') : t('noTasks') })) : (_jsxs(Table, { "data-testid": "evals-tasks", children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t('colTask') }), _jsx(TableHead, { className: "hidden md:table-cell", children: t('colCategory') }), _jsx(TableHead, { className: "hidden sm:table-cell", children: t('colDifficulty') }), _jsx(TableHead, { className: "hidden lg:table-cell", children: t('colTags') })] }) }), _jsx(TableBody, { children: shown.map((task) => {
78
+ const href = evalTaskHref(projectId, task.task_id, dataset);
79
+ return (_jsxs(TableRow, { className: "hover:bg-hover cursor-pointer", onClick: () => router.push(href), "data-testid": "evals-task-row", children: [_jsx(TableCell, { className: "max-w-80", children: _jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx(Link, { href: href, className: "text-foreground truncate font-mono text-sm", onClick: (e) => e.stopPropagation(), children: task.name }), task.unsupported ? _jsx(Tag, { title: task.unsupported, children: t('unsupported') }) : null] }) }), _jsx(TableCell, { className: "text-muted-foreground hidden text-sm md:table-cell", children: task.category ?? '—' }), _jsx(TableCell, { className: "text-muted-foreground hidden text-sm sm:table-cell", children: task.difficulty ?? '—' }), _jsx(TableCell, { className: "hidden lg:table-cell", children: _jsxs("span", { className: "flex flex-wrap gap-1", children: [task.tags.slice(0, 3).map((tag) => (_jsx(Tag, { children: tag }, tag))), task.tags.length > 3 ? (_jsx("span", { className: "text-muted-foreground text-xs", children: `+${task.tags.length - 3}` })) : null] }) })] }, task.task_id));
80
+ }) })] })), _jsxs(ListFooter, { children: [t('displayingTasks', { shown: shown.length, total: tasks.length }), dataset ? ` · ${datasetLabel(dataset)}` : ''] })] }));
81
+ }
@@ -0,0 +1,25 @@
1
+ import type { WorkspaceEvalJob } from '@kortix/sdk';
2
+ import { type EvalDatasetRef } from './eval-meta.js';
3
+ export type DatasetOrigin = 'suite' | 'builtin' | 'registry';
4
+ export interface DatasetRow {
5
+ ref: EvalDatasetRef;
6
+ origin: DatasetOrigin;
7
+ description: string;
8
+ /** Null: unknown without reading the dataset (a suite reads its own count). */
9
+ nTasks: number | null;
10
+ error: string | null;
11
+ }
12
+ /** The newest completed job of each dataset, and how many jobs each has. */
13
+ export declare function jobsByDataset(jobs: WorkspaceEvalJob[]): {
14
+ latest: Map<string, WorkspaceEvalJob>;
15
+ count: Map<string, number>;
16
+ };
17
+ /**
18
+ * Customize → Evals → Datasets: every dataset a job can run, in one table —
19
+ * the suites of kortix.yaml, Kortix's built-in datasets and Harbor's (Harbor
20
+ * Hub packages and the legacy registry) — with its task count and its latest score here. A row opens the
21
+ * dataset (README, tasks, leaderboard, jobs).
22
+ */
23
+ export declare function EvalDatasetsPage({ projectId }: {
24
+ projectId: string;
25
+ }): import("react").JSX.Element;
@@ -0,0 +1,91 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useWorkspaceEvalDatasets, useWorkspaceEvalJobs, useWorkspaceEvalSuites, useWorkspaceEvalTasks, } from '@kortix/sdk/react';
4
+ import { DatabaseIcon } from '@phosphor-icons/react';
5
+ import { useMemo, useState } from 'react';
6
+ import { useTranslations } from '../../i18n/index.js';
7
+ import { Alert, AlertDescription } from '../../primitives/alert.js';
8
+ import { Button } from '../../primitives/button.js';
9
+ import { EmptyState } from '../../primitives/empty-state.js';
10
+ import { ErrorState } from '../../primitives/error-state.js';
11
+ import { PageSearchBar } from '../../primitives/page-search-bar.js';
12
+ import { Skeleton } from '../../primitives/skeleton.js';
13
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '../../primitives/table.js';
14
+ import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
15
+ import { Tag } from '../../primitives/tag.js';
16
+ import { UiLink as Link, useUiRouter } from '../../providers/ui-provider.js';
17
+ import { CapabilityPageShell } from '../shared/capability-page-shell.js';
18
+ import { datasetKey, evalDatasetHref, evalJobScore, jobDataset, } from './eval-meta.js';
19
+ import { InfoHint, ListFooter, ScoreValue } from './eval-ui.js';
20
+ const FILTERS = ['all', 'suite', 'builtin', 'registry'];
21
+ /** The newest completed job of each dataset, and how many jobs each has. */
22
+ export function jobsByDataset(jobs) {
23
+ const latest = new Map();
24
+ const count = new Map();
25
+ for (const job of jobs) {
26
+ const ref = jobDataset(job);
27
+ if (!ref)
28
+ continue;
29
+ const key = datasetKey(ref);
30
+ count.set(key, (count.get(key) ?? 0) + 1);
31
+ if (job.status === 'completed' && !latest.has(key))
32
+ latest.set(key, job);
33
+ }
34
+ return { latest, count };
35
+ }
36
+ /**
37
+ * Customize → Evals → Datasets: every dataset a job can run, in one table —
38
+ * the suites of kortix.yaml, Kortix's built-in datasets and Harbor's (Harbor
39
+ * Hub packages and the legacy registry) — with its task count and its latest score here. A row opens the
40
+ * dataset (README, tasks, leaderboard, jobs).
41
+ */
42
+ export function EvalDatasetsPage({ projectId }) {
43
+ const t = useTranslations('evals');
44
+ const router = useUiRouter();
45
+ const suites = useWorkspaceEvalSuites(projectId);
46
+ const datasets = useWorkspaceEvalDatasets(projectId);
47
+ const jobs = useWorkspaceEvalJobs(projectId);
48
+ const [search, setSearch] = useState('');
49
+ const [filter, setFilter] = useState('all');
50
+ const rows = useMemo(() => [
51
+ ...(suites.data ?? []).map((suite) => ({
52
+ ref: { kind: 'suite', name: suite.name },
53
+ origin: 'suite',
54
+ description: suite.source === 'config' && suite.config_path
55
+ ? suite.config_path
56
+ : (suite.config?.agents ?? []).map((a) => a.name).join(', '),
57
+ nTasks: null,
58
+ error: suite.error,
59
+ })),
60
+ ...(datasets.data?.datasets ?? []).map((dataset) => ({
61
+ ref: { kind: 'dataset', name: dataset.name, version: dataset.version },
62
+ // Harbor Hub and Harbor's legacy registry are one source to a reader: Harbor.
63
+ origin: dataset.kind === 'builtin' ? 'builtin' : 'registry',
64
+ description: dataset.description,
65
+ nTasks: dataset.n_tasks,
66
+ error: null,
67
+ })),
68
+ ], [suites.data, datasets.data]);
69
+ const { latest, count } = jobsByDataset(jobs.data ?? []);
70
+ const needle = search.trim().toLowerCase();
71
+ const shown = rows.filter((row) => (filter === 'all' || row.origin === filter) &&
72
+ (!needle ||
73
+ row.ref.name.toLowerCase().includes(needle) ||
74
+ row.description.toLowerCase().includes(needle)));
75
+ const loading = suites.isLoading || datasets.isLoading;
76
+ const counts = (origin) => origin === 'all' ? rows.length : rows.filter((row) => row.origin === origin).length;
77
+ return (_jsx(CapabilityPageShell, { title: t('datasetsTitle'), description: t('datasetsDescription'), titleAddon: _jsx(InfoHint, { text: t('datasetsInfo') }), search: _jsx(PageSearchBar, { value: search, onChange: setSearch, placeholder: t('searchDatasets') }), children: suites.isError && datasets.isError ? (_jsx(ErrorState, { size: "sm", title: t('loadError'), action: _jsx(Button, { size: "sm", variant: "outline", onClick: () => void Promise.all([suites.refetch(), datasets.refetch()]), children: t('retry') }) })) : loading ? (_jsx("div", { className: "flex flex-col gap-2", "aria-busy": true, children: [0, 1, 2, 3, 4].map((i) => (_jsx(Skeleton, { className: "h-12 w-full rounded-md" }, i))) })) : (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx(Tabs, { value: filter, onValueChange: (value) => setFilter(value), children: _jsx(TabsList, { variant: "segmented", className: "w-fit", "aria-label": t('datasetFilter'), children: FILTERS.map((value) => (_jsxs(TabsTrigger, { value: value, "data-testid": `evals-datasets-filter-${value}`, children: [t(`origin.${value}`), _jsx("span", { className: "text-muted-foreground ml-1 tabular-nums", children: counts(value) })] }, value))) }) }), datasets.data?.registry_error ? (_jsx(Alert, { children: _jsx(AlertDescription, { children: t('registryUnavailable', { reason: datasets.data.registry_error }) }) })) : null, shown.length === 0 ? (_jsx(EmptyState, { size: "sm", media: _jsx(DatabaseIcon, { className: "text-muted-foreground size-6" }), title: needle ? t('noDatasetMatch') : t('noDatasets'), action: needle ? (_jsx(Button, { size: "sm", variant: "outline", onClick: () => setSearch(''), children: t('clearSearch') })) : undefined })) : (_jsxs(Table, { "data-testid": "evals-datasets", children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t('colDataset') }), _jsx(TableHead, { className: "hidden sm:table-cell", children: t('colSource') }), _jsx(TableHead, { className: "text-right", children: t('colTaskCount') }), _jsx(TableHead, { className: "hidden text-right md:table-cell", children: t('colLastScore') }), _jsx(TableHead, { className: "hidden text-right md:table-cell", children: t('colJobs') })] }) }), _jsx(TableBody, { children: shown.map((row) => {
78
+ const key = datasetKey(row.ref);
79
+ const last = latest.get(key);
80
+ const score = last ? evalJobScore(last) : null;
81
+ const href = evalDatasetHref(projectId, row.ref);
82
+ return (_jsxs(TableRow, { className: "hover:bg-hover cursor-pointer", onClick: () => router.push(href), "data-testid": "evals-dataset-row", children: [_jsxs(TableCell, { className: "max-w-96", children: [_jsx(Link, { href: href, className: "text-foreground block truncate font-mono text-sm", onClick: (e) => e.stopPropagation(), children: row.ref.name }), _jsx("span", { className: "text-muted-foreground line-clamp-1 text-xs", children: row.error ? `${t('suiteError')}: ${row.error}` : row.description })] }), _jsx(TableCell, { className: "hidden sm:table-cell", children: _jsx(Tag, { children: t(`origin.${row.origin}`) }) }), _jsx(TableCell, { className: "text-muted-foreground text-right tabular-nums", children: row.origin === 'suite' ? (_jsx(SuiteTaskCount, { projectId: projectId, suite: row.ref.name })) : row.nTasks === null ? ('—') : (row.nTasks.toLocaleString()) }), _jsx(TableCell, { className: "hidden text-right md:table-cell", children: score ? (_jsx(ScoreValue, { rate: score.passAt1 ?? score.mean, n: score.validTrials })) : (_jsx("span", { className: "text-muted-foreground", children: "\u2014" })) }), _jsx(TableCell, { className: "text-muted-foreground hidden text-right tabular-nums md:table-cell", children: count.get(key) ?? 0 })] }, key));
83
+ }) })] })), _jsx(ListFooter, { children: t('displayingDatasets', { shown: shown.length, total: rows.length }) })] })) }));
84
+ }
85
+ /** A suite's task count, read from its task list (the same request its Tasks tab makes). */
86
+ function SuiteTaskCount({ projectId, suite }) {
87
+ const tasks = useWorkspaceEvalTasks(projectId, { suite });
88
+ if (!tasks.data)
89
+ return _jsx(_Fragment, { children: "\u2014" });
90
+ return _jsx(_Fragment, { children: tasks.data.tasks.length.toLocaleString() });
91
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Customize → Evals → Jobs → one job (`/admin/eval-jobs/<id>`), the Harbor
3
+ * Hub's job page: the progress bar (each bucket filters the trials), then
4
+ * Overview (cost, tokens, the score of each agent × model), Run health (the
5
+ * task × attempt matrix and where errors concentrate), Trials and Config. A
6
+ * trial opens beside the page (`?trial=<id>`). Re-reads every 5 seconds until
7
+ * the job ends.
8
+ */
9
+ export declare function EvalJobView({ projectId, jobId }: {
10
+ projectId: string;
11
+ jobId: string;
12
+ }): import("react").JSX.Element;