@kortix/ui 0.15.2 → 0.15.4

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 (455) hide show
  1. package/dist/_vendor/kortix-shared.js +243 -30
  2. package/dist/_vendor/shared/channel-descriptors.d.ts +1 -1
  3. package/dist/_vendor/shared/index.d.ts +1 -0
  4. package/dist/_vendor/shared/markdown-math.d.ts +6 -0
  5. package/dist/_vendor/shared/workspace-actions.d.ts +155 -0
  6. package/dist/_vendor/shared/workspace-settings.d.ts +62 -0
  7. package/dist/access/access/access-dialog-share.js +6 -6
  8. package/dist/access/access/access-dialog.d.ts +44 -1
  9. package/dist/access/access/access-dialog.js +8 -8
  10. package/dist/access/access/agent-principals.d.ts +3 -3
  11. package/dist/access/access/agent-principals.js +5 -4
  12. package/dist/access/access/invite-people-dialog.d.ts +37 -0
  13. package/dist/access/access/invite-people-dialog.js +140 -0
  14. package/dist/access/access/principal-picker.js +3 -2
  15. package/dist/access/access/project-select.js +2 -2
  16. package/dist/access/access/role-select.d.ts +9 -8
  17. package/dist/access/access/role-select.js +22 -25
  18. package/dist/access/access/workspace-role-dialog.d.ts +27 -0
  19. package/dist/access/access/workspace-role-dialog.js +48 -0
  20. package/dist/access/iam/add-github-account-dialog.d.ts +1 -1
  21. package/dist/access/iam/add-github-account-dialog.js +1 -1
  22. package/dist/access/iam/api-key-expiry.d.ts +18 -0
  23. package/dist/access/iam/api-key-expiry.js +47 -0
  24. package/dist/access/iam/api-key-rows.d.ts +6 -0
  25. package/dist/access/iam/api-key-rows.js +3 -0
  26. package/dist/access/iam/workspace-key-acts-as.d.ts +41 -0
  27. package/dist/access/iam/workspace-key-acts-as.js +48 -0
  28. package/dist/access/sharing-intent.js +1 -1
  29. package/dist/access/sharing-picker.js +1 -1
  30. package/dist/animated-copy-icon.d.ts +2 -2
  31. package/dist/animated-copy-icon.js +7 -4
  32. package/dist/apps/app-shared.js +2 -2
  33. package/dist/artifacts/artifact-session.js +1 -1
  34. package/dist/customize/agents/agent-drives-section.d.ts +1 -3
  35. package/dist/customize/agents/agent-drives-section.js +5 -6
  36. package/dist/customize/agents/agent-page-chrome.js +1 -1
  37. package/dist/customize/agents/agent-page.js +6 -7
  38. package/dist/customize/agents/agent-tabs.d.ts +1 -1
  39. package/dist/customize/agents/agent-tabs.js +1 -2
  40. package/dist/customize/agents/agents-page.js +2 -3
  41. package/dist/customize/connectors/connector-identity.d.ts +1 -1
  42. package/dist/customize/connectors/connector-identity.js +1 -1
  43. package/dist/customize/connectors/connector-moves-banner.js +2 -2
  44. package/dist/customize/connectors/connectors-page.d.ts +10 -2
  45. package/dist/customize/connectors/connectors-page.js +38 -5
  46. package/dist/customize/connectors/detail/app-page.js +1 -1
  47. package/dist/customize/connectors/detail/connector-page.d.ts +1 -1
  48. package/dist/customize/connectors/detail/connector-page.js +1 -1
  49. package/dist/customize/connectors/detail/connector-policy-sets.js +2 -2
  50. package/dist/customize/connectors/detail/connector-tools.js +7 -7
  51. package/dist/customize/connectors/detail/connector-triggers.js +2 -3
  52. package/dist/customize/connectors/detail/email-inboxes.js +2 -2
  53. package/dist/customize/models/models-page.d.ts +1 -1
  54. package/dist/customize/models/models-page.js +1 -1
  55. package/dist/customize/project-settings/project-admin-sections.d.ts +53 -17
  56. package/dist/customize/project-settings/project-admin-sections.js +80 -31
  57. package/dist/customize/project-settings/project-settings-page.d.ts +2 -2
  58. package/dist/customize/project-settings/project-settings-page.js +6 -4
  59. package/dist/customize/project-settings/project-settings-sections.d.ts +2 -3
  60. package/dist/customize/project-settings/project-settings-sections.js +9 -4
  61. package/dist/customize/providers/provider-accordion.d.ts +3 -1
  62. package/dist/customize/providers/provider-accordion.js +2 -2
  63. package/dist/customize/secrets/secrets-page.d.ts +1 -1
  64. package/dist/customize/secrets/secrets-page.js +1 -1
  65. package/dist/customize/sections/component/email-connect-form.js +2 -2
  66. package/dist/customize/sections/component/slack-byo-wizard.js +3 -3
  67. package/dist/customize/sections/connectors-view.js +17 -17
  68. package/dist/customize/sections/gateway-view.d.ts +7 -5
  69. package/dist/customize/sections/gateway-view.js +28 -17
  70. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +2 -2
  71. package/dist/customize/sections/llm-provider/custom-provider-form.js +2 -2
  72. package/dist/customize/sections/llm-provider/llm-provider-modal.d.ts +1 -1
  73. package/dist/customize/sections/llm-provider/llm-provider-modal.js +4 -4
  74. package/dist/customize/sections/llm-provider/models-tab-row.js +5 -3
  75. package/dist/customize/sections/llm-provider/types.d.ts +2 -0
  76. package/dist/customize/sections/view/agent-editor-access-fields.js +1 -3
  77. package/dist/customize/sections/view/agent-editor-catalog.d.ts +5 -6
  78. package/dist/customize/sections/view/agent-editor-catalog.js +33 -14
  79. package/dist/customize/sections/view/agent-editor.js +1 -1
  80. package/dist/customize/sections/view/channels-view.js +13 -13
  81. package/dist/customize/sections/view/gateway/gateway-budgets.js +12 -10
  82. package/dist/customize/sections/view/gateway/gateway-logs.d.ts +1 -1
  83. package/dist/customize/sections/view/gateway/gateway-logs.js +3 -3
  84. package/dist/customize/sections/view/gateway/gateway-overview.js +1 -1
  85. package/dist/customize/sections/view/gateway/gateway-routing.js +1 -1
  86. package/dist/customize/sections/view/git-view.js +3 -3
  87. package/dist/customize/sections/view/grant-mode-field.js +2 -2
  88. package/dist/customize/sections/view/review-center-connected.js +1 -1
  89. package/dist/customize/sections/view/review-view.d.ts +0 -15
  90. package/dist/customize/sections/view/review-view.js +1 -23
  91. package/dist/customize/sections/view/secret-delivery.js +2 -2
  92. package/dist/customize/sections/view/secrets-view.js +16 -16
  93. package/dist/customize/sections/view/subscription-usage-tab.d.ts +12 -1
  94. package/dist/customize/sections/view/subscription-usage-tab.js +71 -72
  95. package/dist/customize/settings/rail-copy-context.js +1 -1
  96. package/dist/customize/settings/rail.d.ts +1 -1
  97. package/dist/customize/settings/rail.js +11 -18
  98. package/dist/customize/settings/settings-tab-header.d.ts +1 -1
  99. package/dist/customize/settings/settings-tab-header.js +1 -1
  100. package/dist/customize/settings/settings-tabs.d.ts +5 -12
  101. package/dist/customize/settings/settings-tabs.js +31 -44
  102. package/dist/customize/settings/tabs/experimental-tab.js +4 -4
  103. package/dist/customize/settings/tabs/general-tab.d.ts +29 -11
  104. package/dist/customize/settings/tabs/general-tab.js +55 -25
  105. package/dist/customize/settings/tabs/project-edit-patch.d.ts +0 -13
  106. package/dist/customize/settings/tabs/project-edit-patch.js +0 -28
  107. package/dist/customize/settings/tabs/sandbox-tab.js +2 -2
  108. package/dist/customize/settings/tabs/tokens-tab.d.ts +32 -2
  109. package/dist/customize/settings/tabs/tokens-tab.js +157 -32
  110. package/dist/customize/settings/tabs/workspace-keys.d.ts +6 -0
  111. package/dist/customize/settings/tabs/workspace-keys.js +240 -0
  112. package/dist/customize/shared/capability-library.js +3 -1
  113. package/dist/customize/shared/catalog/catalog-space-tabs.js +2 -2
  114. package/dist/customize/shared/customize-tab-bar.d.ts +6 -2
  115. package/dist/customize/shared/customize-tab-bar.js +36 -35
  116. package/dist/customize/shared/standalone-settings-nav.js +2 -2
  117. package/dist/customize/triggers/schedule/schedule-copy.d.ts +1 -1
  118. package/dist/customize/triggers/schedule/trigger-composer.js +5 -6
  119. package/dist/customize/triggers/schedule/trigger-list.js +2 -2
  120. package/dist/customize/triggers/schedule/trigger-session-access-copy.d.ts +6 -6
  121. package/dist/customize/triggers/schedule/trigger-session-access-copy.js +3 -3
  122. package/dist/customize/triggers/schedule/when-event.js +4 -4
  123. package/dist/customize/triggers/schedule/when-webhook-address.js +2 -2
  124. package/dist/customize/triggers/schedule/when-webhook.js +2 -2
  125. package/dist/customize/triggers/schedule-view.js +4 -5
  126. package/dist/customize/triggers/triggers-page.d.ts +1 -1
  127. package/dist/customize/triggers/triggers-page.js +1 -1
  128. package/dist/files/drives/drive-storage.d.ts +2 -2
  129. package/dist/files/drives/drive-storage.js +13 -6
  130. package/dist/files/project/components/change-request-detail-dialog.js +6 -6
  131. package/dist/files/project/components/change-requests-panel.js +2 -2
  132. package/dist/files/project/components/diff-preview-banner.d.ts +1 -1
  133. package/dist/files/project/components/diff-preview-banner.js +1 -1
  134. package/dist/files/project/components/drive-explorer.js +64 -43
  135. package/dist/files/project/components/drive-grid-view.js +1 -1
  136. package/dist/files/project/components/drive-list-view.js +1 -1
  137. package/dist/files/project/components/drive-upload-tray.d.ts +2 -1
  138. package/dist/files/project/components/drive-upload-tray.js +9 -4
  139. package/dist/files/project/context.d.ts +1 -1
  140. package/dist/files/project/context.js +1 -1
  141. package/dist/files/project/drop-tree.d.ts +16 -0
  142. package/dist/files/project/drop-tree.js +39 -0
  143. package/dist/files/project/upload-batch.d.ts +15 -0
  144. package/dist/files/project/upload-batch.js +12 -0
  145. package/dist/files/renderers/image-renderer.js +1 -1
  146. package/dist/files/runtime/hooks/use-binary-blob.js +12 -2
  147. package/dist/files/runtime/hooks/use-file-content.js +18 -2
  148. package/dist/files/viewer/file-content-renderer.js +2 -2
  149. package/dist/files/viewer/preview-fit.d.ts +1 -1
  150. package/dist/files/viewer/preview-fit.js +1 -1
  151. package/dist/i18n/en.d.ts +317 -31
  152. package/dist/i18n/en.js +882 -596
  153. package/dist/i18n/ui-catalog/account-hub-translation-keys.generated.js +9 -9
  154. package/dist/i18n/ui-catalog/app-registry-translation-keys.generated.js +12 -6
  155. package/dist/i18n/ui-catalog/product-catalog-translation-keys.generated.js +5 -5
  156. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +67 -60
  157. package/dist/icons/index.d.ts +1 -0
  158. package/dist/icons/index.js +1 -0
  159. package/dist/icons/solid-right-arrow.d.ts +8 -0
  160. package/dist/icons/solid-right-arrow.js +11 -0
  161. package/dist/index.d.ts +1 -1
  162. package/dist/index.js +1 -1
  163. package/dist/internal/account-hub/account-hub-entry.js +9 -8
  164. package/dist/internal/account-hub/account-hub-location.d.ts +20 -3
  165. package/dist/internal/account-hub/account-hub-location.js +16 -7
  166. package/dist/internal/account-hub/hub-sheet.d.ts +1 -1
  167. package/dist/internal/account-hub/hub-sheet.js +1 -1
  168. package/dist/internal/account-hub/sections.d.ts +2 -2
  169. package/dist/internal/account-hub/sections.js +10 -10
  170. package/dist/internal/account-hub/use-account-hub-access.d.ts +2 -0
  171. package/dist/internal/account-hub/use-account-hub-access.js +13 -5
  172. package/dist/internal/account-hub/workspace-settings-route.d.ts +27 -0
  173. package/dist/internal/account-hub/workspace-settings-route.js +51 -0
  174. package/dist/internal/billing/use-cost-explorer.d.ts +19 -1
  175. package/dist/internal/billing/use-cost-explorer.js +27 -1
  176. package/dist/internal/components/nav-rail.d.ts +3 -1
  177. package/dist/internal/components/nav-rail.js +2 -0
  178. package/dist/internal/components/repository-disconnected.js +2 -2
  179. package/dist/internal/desktop/desktop-back-button.d.ts +1 -1
  180. package/dist/internal/files/file-read-retry.d.ts +13 -0
  181. package/dist/internal/files/file-read-retry.js +53 -1
  182. package/dist/internal/goals/goal-meta.d.ts +2 -1
  183. package/dist/internal/goals/goal-meta.js +4 -2
  184. package/dist/internal/hooks/account/use-accounts-list.d.ts +2 -12
  185. package/dist/internal/hooks/account/use-accounts-list.js +1 -14
  186. package/dist/internal/hooks/account/use-my-invites.d.ts +1 -1
  187. package/dist/internal/hooks/account/use-my-invites.js +1 -1
  188. package/dist/internal/hooks/use-review-session-summary.d.ts +7 -0
  189. package/dist/internal/hooks/use-review-session-summary.js +12 -1
  190. package/dist/internal/layout/project-capability-nav.d.ts +6 -17
  191. package/dist/internal/layout/project-capability-nav.js +7 -79
  192. package/dist/internal/layout/project-settings-nav.d.ts +2 -2
  193. package/dist/internal/layout/project-settings-nav.js +3 -3
  194. package/dist/internal/lib/billing/billing-gate-state.d.ts +10 -0
  195. package/dist/internal/lib/billing/billing-gate-state.js +20 -3
  196. package/dist/internal/lib/browser-error-noise.d.ts +1 -1
  197. package/dist/internal/lib/browser-error-noise.js +1 -1
  198. package/dist/internal/lib/browser-noise/rules/expected-states.js +2 -3
  199. package/dist/internal/lib/browser-noise/rules/extensions.js +18 -0
  200. package/dist/internal/lib/browser-noise/rules/injected-scripts.d.ts +5 -1
  201. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +141 -5
  202. package/dist/internal/lib/capability-tab-routes.d.ts +16 -40
  203. package/dist/internal/lib/capability-tab-routes.js +25 -54
  204. package/dist/internal/lib/desktop.d.ts +1 -1
  205. package/dist/internal/lib/desktop.js +1 -1
  206. package/dist/internal/lib/github-installations.d.ts +1 -1
  207. package/dist/internal/lib/github-installations.js +1 -1
  208. package/dist/internal/lib/mermaid-utils.js +2 -24
  209. package/dist/internal/lib/model-pricing.js +1 -1
  210. package/dist/internal/lib/navigation/session-href.d.ts +1 -1
  211. package/dist/internal/lib/navigation/session-href.js +1 -1
  212. package/dist/internal/lib/onboarding/landing-destination.d.ts +12 -4
  213. package/dist/internal/lib/onboarding/landing-destination.js +17 -5
  214. package/dist/internal/lib/onboarding/last-project-cookie.d.ts +1 -1
  215. package/dist/internal/lib/onboarding/last-project-cookie.js +1 -1
  216. package/dist/internal/lib/project-actions.d.ts +1 -4
  217. package/dist/internal/lib/project-actions.js +2 -5
  218. package/dist/internal/lib/provider-branding.js +11 -3
  219. package/dist/internal/lib/use-project-can.d.ts +1 -3
  220. package/dist/internal/lib/use-project-can.js +0 -5
  221. package/dist/internal/lib/web-notifications.js +5 -5
  222. package/dist/internal/notifications/notification-inbox.d.ts +8 -2
  223. package/dist/internal/notifications/notification-inbox.js +8 -5
  224. package/dist/internal/notifications/use-inbox-summary.d.ts +8 -4
  225. package/dist/internal/notifications/use-inbox-summary.js +12 -6
  226. package/dist/internal/reminders/use-refetch-after-fire.d.ts +0 -2
  227. package/dist/internal/reminders/use-refetch-after-fire.js +1 -10
  228. package/dist/internal/stores/account-panel-store.d.ts +17 -1
  229. package/dist/internal/stores/account-panel-store.js +19 -2
  230. package/dist/internal/stores/project-switch-store.d.ts +2 -2
  231. package/dist/internal/stores/project-switch-store.js +4 -4
  232. package/dist/internal/stores/settings-panel-store.d.ts +6 -0
  233. package/dist/internal/stores/settings-panel-store.js +4 -1
  234. package/dist/internal/stores/workspace-settings-rail-store.d.ts +67 -0
  235. package/dist/internal/stores/workspace-settings-rail-store.js +11 -0
  236. package/dist/lib/routes.js +19 -18
  237. package/dist/lib/z-stack.d.ts +7 -0
  238. package/dist/lib/z-stack.js +13 -0
  239. package/dist/markdown/copy-button.d.ts +2 -2
  240. package/dist/markdown/copy-button.js +22 -20
  241. package/dist/markdown/setup-links/setup-link-button.js +1 -1
  242. package/dist/primitives/emoji-tint.d.ts +1 -1
  243. package/dist/primitives/emoji-tint.js +1 -1
  244. package/dist/primitives/error-state.js +8 -1
  245. package/dist/primitives/inline-meta.d.ts +12 -1
  246. package/dist/primitives/inline-meta.js +38 -5
  247. package/dist/primitives/mermaid-render.js +3 -20
  248. package/dist/primitives/page-search-bar.js +6 -6
  249. package/dist/primitives/section.d.ts +3 -3
  250. package/dist/primitives/section.js +9 -9
  251. package/dist/primitives/status.d.ts +5 -5
  252. package/dist/primitives/status.js +33 -33
  253. package/dist/primitives/tabs.d.ts +14 -26
  254. package/dist/primitives/tabs.js +103 -105
  255. package/dist/primitives/tag.d.ts +1 -1
  256. package/dist/primitives/toast.d.ts +6 -6
  257. package/dist/primitives/toast.js +55 -48
  258. package/dist/providers/session-ids.d.ts +1 -1
  259. package/dist/providers/ui-provider.d.ts +2 -0
  260. package/dist/session/agents/agent-strip.js +6 -6
  261. package/dist/session/agents/subagent-dialog-content.js +3 -4
  262. package/dist/session/agents/workflow-run-controls.d.ts +0 -2
  263. package/dist/session/agents/workflow-run-controls.js +1 -12
  264. package/dist/session/composer/ComposerCard.d.ts +1 -1
  265. package/dist/session/composer/ComposerCard.js +2 -2
  266. package/dist/session/composer/animated-placeholder.js +1 -1
  267. package/dist/session/composer/chat-input/chat-input-control.js +1 -8
  268. package/dist/session/composer/composer-chat-input.d.ts +14 -1
  269. package/dist/session/composer/composer-chat-input.js +4 -2
  270. package/dist/session/composer/composer-toolbar.d.ts +22 -17
  271. package/dist/session/composer/composer-toolbar.js +12 -3
  272. package/dist/session/composer/composer.d.ts +8 -0
  273. package/dist/session/composer/composer.js +5 -13
  274. package/dist/session/composer/reasoning-effort-selector.d.ts +21 -0
  275. package/dist/session/composer/reasoning-effort-selector.js +46 -1
  276. package/dist/session/composer/send-stop-control.d.ts +15 -1
  277. package/dist/session/composer/send-stop-control.js +30 -5
  278. package/dist/session/header/session-embed-menu-item.d.ts +12 -0
  279. package/dist/session/header/session-embed-menu-item.js +30 -0
  280. package/dist/{workspace/sidebar/modal/session-embed-section.d.ts → session/header/session-embed-snippet.d.ts} +2 -11
  281. package/dist/session/header/session-embed-snippet.js +21 -0
  282. package/dist/session/header/session-goal-indicator.js +2 -3
  283. package/dist/session/header/session-reminders-indicator.js +3 -3
  284. package/dist/session/header/session-site-header.js +10 -3
  285. package/dist/session/index.d.ts +1 -1
  286. package/dist/session/models/ask-owner-for-credits-button.d.ts +7 -1
  287. package/dist/session/models/ask-owner-for-credits-button.js +3 -2
  288. package/dist/session/models/model-availability.d.ts +11 -0
  289. package/dist/session/models/model-availability.js +12 -0
  290. package/dist/session/models/model-connection-gate.d.ts +11 -26
  291. package/dist/session/models/model-connection-gate.js +22 -35
  292. package/dist/session/models/model-grouping.d.ts +30 -0
  293. package/dist/session/models/model-grouping.js +46 -0
  294. package/dist/session/models/model-picker-panel.d.ts +62 -0
  295. package/dist/session/models/model-picker-panel.js +181 -0
  296. package/dist/session/models/model-selector.d.ts +28 -4
  297. package/dist/session/models/model-selector.js +59 -15
  298. package/dist/session/models/model-tags.d.ts +4 -8
  299. package/dist/session/models/model-tags.js +20 -13
  300. package/dist/session/models/subscription-offer.d.ts +35 -0
  301. package/dist/session/models/subscription-offer.js +91 -0
  302. package/dist/session/models/use-model-connection-gate.d.ts +3 -3
  303. package/dist/session/models/use-model-connection-gate.js +8 -6
  304. package/dist/session/overrides/session-overrides-toolbar.js +8 -5
  305. package/dist/session/panel/open-session-quick-view.js +1 -1
  306. package/dist/session/panel/session-detail-panel.js +5 -1
  307. package/dist/session/panel/session-panel-provider.js +2 -2
  308. package/dist/session/panel/session-reminders-panel.js +2 -2
  309. package/dist/session/panel/shared/use-panel-derivations.d.ts +1 -0
  310. package/dist/session/panel/shared/use-panel-derivations.js +1 -1
  311. package/dist/session/panel/shared/use-panel-handoffs.d.ts +2 -2
  312. package/dist/session/panel/shared/use-panel-handoffs.js +22 -3
  313. package/dist/session/panel/use-session-panel-state.js +1 -1
  314. package/dist/session/prompts/ask-deck.d.ts +5 -3
  315. package/dist/session/prompts/ask-deck.js +30 -10
  316. package/dist/session/prompts/session-access-prompt.d.ts +61 -0
  317. package/dist/session/prompts/session-access-prompt.js +88 -0
  318. package/dist/session/prompts/session-permission-prompt.js +1 -1
  319. package/dist/session/scope/session-scope-control.js +2 -2
  320. package/dist/session/status/session-notice-banner.js +3 -3
  321. package/dist/session/status/session-route-prefetch.d.ts +2 -2
  322. package/dist/session/thread/optimistic-turn.js +1 -1
  323. package/dist/session/thread/session-chat.js +51 -19
  324. package/dist/session/thread/session-context-message-explorer.js +2 -2
  325. package/dist/session/thread/session-history.js +3 -3
  326. package/dist/session/tool/render-static.d.ts +11 -0
  327. package/dist/session/tool/render-static.js +16 -0
  328. package/dist/session/tool/shared/session-helpers.js +2 -2
  329. package/dist/session/tool/tool-part-renderer.d.ts +6 -1
  330. package/dist/session/tool/tool-part-renderer.js +9 -5
  331. package/dist/session/tool/tools/kortix-action-tool.js +4 -25
  332. package/dist/session/tool/tools/task-tool.js +9 -2
  333. package/dist/session/tool/tools/workflow-run-card.js +5 -1
  334. package/dist/session/tool/tools/workflow-tool.js +3 -14
  335. package/dist/session/turn/user-message.js +1 -1
  336. package/dist/session/voice/composer-call.d.ts +31 -0
  337. package/dist/session/voice/composer-call.js +46 -0
  338. package/dist/session/voice/voice-call-card.js +2 -0
  339. package/dist/session/voice/voice-call-store.d.ts +8 -0
  340. package/dist/session/voice/voice-call-store.js +5 -0
  341. package/dist/session/voice/voice-call.d.ts +2 -2
  342. package/dist/session/voice/voice-call.js +6 -6
  343. package/dist/styles.css +1 -1
  344. package/dist/test-utils/intl.d.ts +10103 -0
  345. package/dist/test-utils/intl.js +27 -0
  346. package/dist/test-utils/strip-tags.d.ts +24 -0
  347. package/dist/test-utils/strip-tags.js +32 -0
  348. package/dist/workspace/admin/project-admin-dashboard.d.ts +51 -33
  349. package/dist/workspace/admin/project-admin-dashboard.js +269 -81
  350. package/dist/workspace/admin/settings-search-landing.d.ts +11 -0
  351. package/dist/workspace/admin/settings-search-landing.js +103 -0
  352. package/dist/workspace/admin/settings-search.d.ts +69 -0
  353. package/dist/workspace/admin/settings-search.js +393 -0
  354. package/dist/workspace/home/existing-repo-setup-prompt.d.ts +22 -0
  355. package/dist/workspace/home/existing-repo-setup-prompt.js +57 -0
  356. package/dist/workspace/home/no-agent-home.d.ts +25 -0
  357. package/dist/workspace/home/no-agent-home.js +44 -0
  358. package/dist/workspace/home/welcome-body.js +2 -1
  359. package/dist/workspace/inbox/workspace-inbox.d.ts +21 -0
  360. package/dist/workspace/inbox/workspace-inbox.js +52 -0
  361. package/dist/workspace/instant-session-shell.js +11 -1
  362. package/dist/workspace/layout/project-files-view.js +1 -1
  363. package/dist/workspace/layout/project-home.js +84 -11
  364. package/dist/workspace/layout/use-project-home-call.d.ts +24 -0
  365. package/dist/workspace/layout/use-project-home-call.js +56 -0
  366. package/dist/workspace/memory/memory-body.js +2 -2
  367. package/dist/workspace/new/account-param.d.ts +1 -1
  368. package/dist/workspace/new/account-param.js +4 -4
  369. package/dist/workspace/new/advanced-fields.js +3 -3
  370. package/dist/workspace/new/clone-param.d.ts +1 -1
  371. package/dist/workspace/new/clone-param.js +1 -1
  372. package/dist/workspace/new/create-workspace-key.js +1 -1
  373. package/dist/workspace/new/github-source.d.ts +6 -6
  374. package/dist/workspace/new/github-source.js +6 -6
  375. package/dist/workspace/new/new-workspace-form.d.ts +11 -141
  376. package/dist/workspace/new/new-workspace-form.js +9 -195
  377. package/dist/workspace/new/provision-new-workspace.d.ts +14 -0
  378. package/dist/workspace/new/provision-new-workspace.js +14 -0
  379. package/dist/workspace/new/repository-options.d.ts +2 -2
  380. package/dist/workspace/new/repository-options.js +2 -2
  381. package/dist/workspace/new/source-param.d.ts +2 -2
  382. package/dist/workspace/new/source-param.js +2 -2
  383. package/dist/workspace/new/use-create-workspace.d.ts +43 -102
  384. package/dist/workspace/new/use-create-workspace.js +77 -136
  385. package/dist/workspace/new/use-project-quota.d.ts +1 -1
  386. package/dist/workspace/new/use-project-quota.js +1 -1
  387. package/dist/workspace/new/workspace-handoff.d.ts +2 -2
  388. package/dist/workspace/new/workspace-handoff.js +2 -2
  389. package/dist/workspace/new/workspace-name.d.ts +14 -1
  390. package/dist/workspace/new/workspace-name.js +21 -1
  391. package/dist/workspace/project-selector/project-selector-model.d.ts +115 -57
  392. package/dist/workspace/project-selector/project-selector-model.js +157 -111
  393. package/dist/workspace/projects/modal/project-icon-field.d.ts +5 -5
  394. package/dist/workspace/projects/modal/project-icon-field.js +4 -4
  395. package/dist/workspace/projects/policies-panel.js +3 -3
  396. package/dist/workspace/sessions/board-grouping.js +1 -1
  397. package/dist/workspace/sessions/project-sessions-view.js +2 -2
  398. package/dist/workspace/sessions/session-detail.js +2 -2
  399. package/dist/workspace/sessions/sessions-board.d.ts +1 -1
  400. package/dist/workspace/sessions/sessions-board.js +1 -1
  401. package/dist/workspace/settings/split-notice-banner.d.ts +13 -0
  402. package/dist/workspace/settings/split-notice-banner.js +59 -0
  403. package/dist/workspace/settings/use-leave-workspace.d.ts +16 -0
  404. package/dist/workspace/settings/use-leave-workspace.js +60 -0
  405. package/dist/workspace/sidebar/footer/project-balance-warning.js +9 -6
  406. package/dist/workspace/sidebar/footer/project-files-nav.js +2 -2
  407. package/dist/workspace/sidebar/footer/sandbox-health.js +1 -1
  408. package/dist/workspace/sidebar/footer/sidebar-alert.d.ts +1 -1
  409. package/dist/workspace/sidebar/invitations-menu-group.d.ts +2 -2
  410. package/dist/workspace/sidebar/invitations-menu-group.js +4 -4
  411. package/dist/workspace/sidebar/modal/share-session-access.js +1 -1
  412. package/dist/workspace/sidebar/modal/share-session-modal.js +4 -5
  413. package/dist/workspace/sidebar/project-nav-items.js +14 -25
  414. package/dist/workspace/sidebar/project-sidebar.js +17 -2
  415. package/dist/workspace/sidebar/project-spaces-nav.js +6 -15
  416. package/dist/workspace/sidebar/sidebar-drill.d.ts +37 -0
  417. package/dist/workspace/sidebar/sidebar-drill.js +110 -0
  418. package/dist/workspace/sidebar/use-workspace-directory.d.ts +24 -0
  419. package/dist/workspace/sidebar/use-workspace-directory.js +24 -0
  420. package/dist/workspace/sidebar/use-workspace-list.d.ts +37 -0
  421. package/dist/workspace/sidebar/use-workspace-list.js +71 -0
  422. package/dist/workspace/sidebar/workspace-grouping.d.ts +6 -67
  423. package/dist/workspace/sidebar/workspace-grouping.js +4 -107
  424. package/dist/workspace/sidebar/workspace-menu-model.d.ts +30 -12
  425. package/dist/workspace/sidebar/workspace-menu-model.js +13 -107
  426. package/dist/workspace/sidebar/workspace-menu-section.d.ts +7 -1
  427. package/dist/workspace/sidebar/workspace-menu-section.js +65 -100
  428. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +34 -0
  429. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +282 -0
  430. package/dist/workspace/space/space-filter-tabs.js +2 -2
  431. package/dist/workspace/space/space-page.d.ts +1 -1
  432. package/dist/workspace/space/space-page.js +1 -1
  433. package/package.json +55 -51
  434. package/skills/kortix-ui/SKILL.md +66 -66
  435. package/skills/kortix-ui/references/custom-dashboard.md +15 -15
  436. package/skills/kortix-ui/references/modules.md +15 -15
  437. package/dist/customize/agents/agent-pin-button.d.ts +0 -10
  438. package/dist/customize/agents/agent-pin-button.js +0 -20
  439. package/dist/customize/settings/tabs/transfer-workspace-dialog.d.ts +0 -4
  440. package/dist/customize/settings/tabs/transfer-workspace-dialog.js +0 -82
  441. package/dist/internal/account-hub/account-settings-shell.d.ts +0 -7
  442. package/dist/internal/account-hub/account-settings-shell.js +0 -87
  443. package/dist/internal/account-hub/account-settings-sidebar.d.ts +0 -2
  444. package/dist/internal/account-hub/account-settings-sidebar.js +0 -169
  445. package/dist/internal/lib/use-project-feature-flags.d.ts +0 -28
  446. package/dist/internal/lib/use-project-feature-flags.js +0 -76
  447. package/dist/internal/stores/pinned-agents-store.d.ts +0 -26
  448. package/dist/internal/stores/pinned-agents-store.js +0 -20
  449. package/dist/primitives/info-banner.d.ts +0 -14
  450. package/dist/primitives/info-banner.js +0 -72
  451. package/dist/workspace/new/account-picker.d.ts +0 -71
  452. package/dist/workspace/new/account-picker.js +0 -92
  453. package/dist/workspace/new/use-creatable-accounts.d.ts +0 -8
  454. package/dist/workspace/new/use-creatable-accounts.js +0 -33
  455. package/dist/workspace/sidebar/modal/session-embed-section.js +0 -71
@@ -66,3 +66,50 @@ export function expiresAtIso(value, now = Date.now()) {
66
66
  return undefined;
67
67
  return new Date(now + days * MS_PER_DAY).toISOString();
68
68
  }
69
+ /**
70
+ * The longest expiry a new API key may have when the workspace policy sets no
71
+ * maximum, and the expiry a key gets when the person picks none (design.md
72
+ * §3.2 C4a, `resolveMintExpiry` in apps/api). The API reports both on the
73
+ * policy (`effective_max_lifetime_days`, `default_lifetime_days`); these are
74
+ * the values of an API that does not.
75
+ */
76
+ const KEY_MAX_DAYS = 365;
77
+ const KEY_DEFAULT_DAYS = 90;
78
+ /**
79
+ * What a person may pick for a new API key (a workspace key or a personal
80
+ * key). Unlike a service account, a key always expires unless the workspace
81
+ * policy allows no expiry (`allow_no_expiry`, and not `require_expiry`):
82
+ *
83
+ * - every preset up to the policy maximum (365 days when none is set);
84
+ * - a maximum shorter than every preset becomes the only offer;
85
+ * - "Never" only when the policy allows it.
86
+ */
87
+ export function keyExpiryOptions(policy, tI18nComplete) {
88
+ const cap = policy?.effective_max_lifetime_days ?? policy?.max_lifetime_days ?? KEY_MAX_DAYS;
89
+ const withinCap = OFFERED_DAYS.filter((d) => d <= cap);
90
+ const days = cap < 30 && cap !== 1 ? [...withinCap, cap] : withinCap;
91
+ const options = days.map((d) => ({ value: String(d), label: dayLabel(d) }));
92
+ if (policy?.allow_no_expiry === true && policy.require_expiry !== true) {
93
+ options.push({ value: NEVER_EXPIRES, label: tI18nComplete.raw('text6300ef800bb8') });
94
+ }
95
+ return options;
96
+ }
97
+ /** The pre-selected expiry of a new key: 90 days, or the longest the policy allows. */
98
+ export function defaultKeyExpiryOption(policy, tI18nComplete) {
99
+ const options = keyExpiryOptions(policy, tI18nComplete);
100
+ const preferred = options.find((o) => o.value === String(policy?.default_lifetime_days ?? KEY_DEFAULT_DAYS));
101
+ if (preferred)
102
+ return preferred.value;
103
+ const dated = options.filter((o) => o.value !== NEVER_EXPIRES);
104
+ return dated[dated.length - 1]?.value ?? options[0]?.value ?? String(KEY_DEFAULT_DAYS);
105
+ }
106
+ /**
107
+ * The `expiresAt` a key mint sends: an ISO instant, or `null` for "Never".
108
+ * `null` is explicit because the API gives a key without `expires_at` the
109
+ * default lifetime (90 days), not "no expiry".
110
+ */
111
+ export function keyExpiresAt(value, now = Date.now()) {
112
+ if (value === NEVER_EXPIRES)
113
+ return null;
114
+ return expiresAtIso(value, now) ?? new Date(now + KEY_DEFAULT_DAYS * MS_PER_DAY).toISOString();
115
+ }
@@ -85,6 +85,12 @@ export interface ApiKeyRow {
85
85
  expiresAt: string | null;
86
86
  /** What the key can reach. `null` = everything in this workspace. */
87
87
  scopeLabel: string | null;
88
+ /** What the key may do inside its creator's role. Absent on service accounts and older APIs. */
89
+ access?: 'full' | 'read' | 'custom';
90
+ /** A `custom` key's permissions, workspace spelling. */
91
+ permissions?: string[];
92
+ /** True when each use moves the expiry out again (the CLI login). */
93
+ expiryRenews?: boolean;
88
94
  }
89
95
  /**
90
96
  * Trim a public key to something a person can eyeball without wrapping.
@@ -105,6 +105,9 @@ export function buildApiKeyRows({ tokens = [], serviceAccounts = [], projects =
105
105
  lastUsedAt: t.last_used_at,
106
106
  expiresAt: t.expires_at,
107
107
  scopeLabel: t.project_id ? (projectName.get(t.project_id) ?? shortId(t.project_id)) : null,
108
+ access: t.scope ?? 'full',
109
+ ...(t.workspace_permissions ? { permissions: t.workspace_permissions } : {}),
110
+ ...(t.expiry_renews ? { expiryRenews: true } : {}),
108
111
  });
109
112
  }
110
113
  const automation = serviceAccounts.map((sa) => ({
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Workspace settings › API keys: who a new key acts as, and what a row offers.
3
+ *
4
+ * Pure so the picker rules are testable without a DOM (design.md §3.2 C4b):
5
+ *
6
+ * - `me`: every member mints and revokes their own keys.
7
+ * - `agent` / `bot`: need `token.create` (`can_manage_principals`). An agent
8
+ * key needs an agent in kortix.yaml; a bot key names an existing bot or a
9
+ * new name (the API creates the bot with the Member role).
10
+ */
11
+ import type { WorkspaceKey, WorkspaceKeyActsAsInput, WorkspaceKeyList, WorkspaceKeyPrincipal } from '@kortix/sdk';
12
+ /** Why a principal cannot be picked, or null when it can. */
13
+ export type ActsAsBlock = 'needs_permission' | 'no_agents' | null;
14
+ export interface ActsAsOption {
15
+ value: WorkspaceKeyPrincipal;
16
+ block: ActsAsBlock;
17
+ }
18
+ /** The three choices of "Acts as", each with the reason it is off (if it is). */
19
+ export declare function actsAsOptions(list: Pick<WorkspaceKeyList, 'can_manage_principals' | 'agents'> | null | undefined): ActsAsOption[];
20
+ /** The bot Select's sentinel for "a new bot with this name". */
21
+ export declare const NEW_BOT = "__new_bot__";
22
+ export interface ActsAsDraft {
23
+ actsAs: WorkspaceKeyPrincipal;
24
+ agent: string;
25
+ /** A bot id, or `NEW_BOT`. */
26
+ bot: string;
27
+ newBotName: string;
28
+ }
29
+ /** The request field for a draft, or null while it is incomplete. */
30
+ export declare function actsAsInput(draft: ActsAsDraft): WorkspaceKeyActsAsInput | null;
31
+ export type KeyStatus = 'active' | 'expired' | 'revoked';
32
+ /** A key's state: revoked wins over expired. */
33
+ export declare function keyStatus(key: Pick<WorkspaceKey, 'status' | 'revoked_at' | 'expires_at'>, now?: number): KeyStatus;
34
+ /**
35
+ * What a row's menu offers. The caller's own key: revoke, then delete once
36
+ * revoked. An agent or bot key: revoke for a manager. An older bot's own
37
+ * bearer: revoke, then delete for a manager.
38
+ */
39
+ export declare function keyRowAction(key: Pick<WorkspaceKey, 'acts_as' | 'credential' | 'status' | 'revoked_at' | 'expires_at'>, canManagePrincipals: boolean, now?: number): 'revoke' | 'delete' | null;
40
+ /** Active keys first, then by creation, newest first. */
41
+ export declare function sortKeys<T extends Pick<WorkspaceKey, 'status' | 'revoked_at' | 'expires_at' | 'created_at'>>(keys: readonly T[], now?: number): T[];
@@ -0,0 +1,48 @@
1
+ /** The three choices of "Acts as", each with the reason it is off (if it is). */
2
+ export function actsAsOptions(list) {
3
+ const can = list?.can_manage_principals === true;
4
+ return [
5
+ { value: 'me', block: null },
6
+ { value: 'agent', block: !can ? 'needs_permission' : (list?.agents.length ?? 0) === 0 ? 'no_agents' : null },
7
+ { value: 'bot', block: !can ? 'needs_permission' : null },
8
+ ];
9
+ }
10
+ /** The bot Select's sentinel for "a new bot with this name". */
11
+ export const NEW_BOT = '__new_bot__';
12
+ /** The request field for a draft, or null while it is incomplete. */
13
+ export function actsAsInput(draft) {
14
+ if (draft.actsAs === 'me')
15
+ return { type: 'me' };
16
+ if (draft.actsAs === 'agent')
17
+ return draft.agent.trim() ? { type: 'agent', agent: draft.agent.trim() } : null;
18
+ if (draft.bot === NEW_BOT)
19
+ return draft.newBotName.trim() ? { type: 'bot', bot: draft.newBotName.trim() } : null;
20
+ return draft.bot ? { type: 'bot', bot: draft.bot } : null;
21
+ }
22
+ /** A key's state: revoked wins over expired. */
23
+ export function keyStatus(key, now = Date.now()) {
24
+ if (key.status !== 'active' || key.revoked_at)
25
+ return 'revoked';
26
+ if (key.expires_at && Date.parse(key.expires_at) <= now)
27
+ return 'expired';
28
+ return 'active';
29
+ }
30
+ /**
31
+ * What a row's menu offers. The caller's own key: revoke, then delete once
32
+ * revoked. An agent or bot key: revoke for a manager. An older bot's own
33
+ * bearer: revoke, then delete for a manager.
34
+ */
35
+ export function keyRowAction(key, canManagePrincipals, now = Date.now()) {
36
+ const status = keyStatus(key, now);
37
+ const own = key.acts_as.type === 'me';
38
+ if (!own && !canManagePrincipals)
39
+ return null;
40
+ if (status !== 'revoked')
41
+ return 'revoke';
42
+ return own || key.credential === 'service_account_bearer' ? 'delete' : null;
43
+ }
44
+ /** Active keys first, then by creation, newest first. */
45
+ export function sortKeys(keys, now = Date.now()) {
46
+ const rank = (k) => (keyStatus(k, now) === 'active' ? 0 : 1);
47
+ return [...keys].sort((a, b) => rank(a) - rank(b) || b.created_at.localeCompare(a.created_at));
48
+ }
@@ -1,6 +1,6 @@
1
1
  export const DEFAULT_COPY = {
2
2
  heading: 'Who can access this',
3
- project: { label: 'Project-wide', desc: 'Every member of this project' },
3
+ project: { label: 'Workspace-wide', desc: 'Every member of this workspace' },
4
4
  private: { label: 'Only me', desc: 'Just you' },
5
5
  members: {
6
6
  label: 'Specific members or groups',
@@ -53,7 +53,7 @@ const NO_INVITE_EMAILS = [];
53
53
  * @deprecated Use `PrincipalPicker` from
54
54
  * `@/features/workspace/shared/access`.
55
55
  */
56
- export function SubjectPicker({ projectId, accountId, memberIds, groupIds, inviteEmails = NO_INVITE_EMAILS, onChange, allowInvite = false, kinds = ['member', 'group'], excludeUserIds, emptyLabel = 'No members or groups in this project yet.', allExcludedLabel = 'Everyone is already added.', }) {
56
+ export function SubjectPicker({ projectId, accountId, memberIds, groupIds, inviteEmails = NO_INVITE_EMAILS, onChange, allowInvite = false, kinds = ['member', 'group'], excludeUserIds, emptyLabel, allExcludedLabel, }) {
57
57
  const value = useMemo(() => ({ memberIds, groupIds, inviteEmails }), [memberIds, groupIds, inviteEmails]);
58
58
  const scope = projectId
59
59
  ? { kind: 'project', projectId }
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from 'react';
2
- export declare function AnimatedCopyIcon({ copied, children }: {
1
+ import type { ReactNode } from "react";
2
+ export declare function AnimatedCopyIcon({ copied, children, }: {
3
3
  copied: boolean;
4
4
  children: ReactNode;
5
5
  }): import("react").JSX.Element;
@@ -1,6 +1,9 @@
1
- 'use client';
1
+ "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { AnimatePresence, m } from 'motion/react';
4
- export function AnimatedCopyIcon({ copied, children }) {
5
- return (_jsx(AnimatePresence, { initial: false, mode: "popLayout", children: _jsx(m.span, { initial: { scale: 0.25, opacity: 0, filter: 'blur(4px)' }, animate: { scale: 1, opacity: 1, filter: 'blur(0px)' }, exit: { scale: 0.25, opacity: 0, filter: 'blur(4px)' }, transition: { type: 'spring', duration: 0.3, bounce: 0 }, className: "absolute inset-0 inline-flex items-center justify-center", children: children }, copied ? 'check' : 'copy') }));
3
+ import { AnimatePresence, m, useReducedMotion } from "motion/react";
4
+ export function AnimatedCopyIcon({ copied, children, }) {
5
+ const reducedMotion = useReducedMotion();
6
+ if (reducedMotion)
7
+ return (_jsx("span", { className: "absolute inset-0 inline-flex items-center justify-center", children: children }));
8
+ return (_jsx(AnimatePresence, { initial: false, mode: "popLayout", children: _jsx(m.span, { initial: { scale: 0.25, opacity: 0, filter: "blur(4px)" }, animate: { scale: 1, opacity: 1, filter: "blur(0px)" }, exit: { scale: 0.25, opacity: 0, filter: "blur(4px)" }, transition: { type: "spring", duration: 0.3, bounce: 0 }, className: "absolute inset-0 inline-flex items-center justify-center", children: children }, copied ? "check" : "copy") }));
6
9
  }
@@ -178,8 +178,8 @@ export const ACCESS_COPY = {
178
178
  // private App does not become unmanageable the moment its creator leaves the
179
179
  // account. A false promise about access, in the one dialog where people
180
180
  // reason about access, is worse than a longer label.
181
- private: { label: 'Just you', desc: 'You, and anyone who can manage this project' },
182
- project: { label: 'Whole team', desc: 'Every member of this project' },
181
+ private: { label: 'Just you', desc: 'You, and anyone who can manage this workspace' },
182
+ project: { label: 'Whole team', desc: 'Every member of this workspace' },
183
183
  restricted: { label: 'Select members', desc: 'Chosen members and groups' },
184
184
  // These two describe PUBLIC traffic only. Both are still team-visible: a
185
185
  // password protects the App's hostname from the internet, it never hides the
@@ -59,7 +59,7 @@ function useShownArtifact(url) {
59
59
  type: detail.type,
60
60
  src: detail.version.view_url,
61
61
  frameKey: artifactFrameKey(detail),
62
- href: `/projects/${detail.project_id}/artifacts/${detail.artifact_id}`,
62
+ href: `/workspaces/${detail.project_id}/artifacts/${detail.artifact_id}`,
63
63
  },
64
64
  failed: false,
65
65
  };
@@ -18,10 +18,8 @@
18
18
  * wait for the page's Save. A folder that comes through the project is
19
19
  * changed in Files, where its sharing lives.
20
20
  */
21
- export declare function AgentDrivesSection({ projectId, agentName, repositoryAccess, }: {
21
+ export declare function AgentDrivesSection({ projectId, agentName, }: {
22
22
  projectId: string;
23
23
  /** Absent: the project's mounts (Project admin). */
24
24
  agentName?: string;
25
- /** Whether sessions of the agent get the project repository at /workspace. Agent mode only. */
26
- repositoryAccess?: boolean;
27
25
  }): import("react").JSX.Element;
@@ -40,14 +40,13 @@ import { CapabilityPageShell } from '../shared/capability-page-shell.js';
40
40
  * wait for the page's Save. A folder that comes through the project is
41
41
  * changed in Files, where its sharing lives.
42
42
  */
43
- export function AgentDrivesSection({ projectId, agentName, repositoryAccess = true, }) {
43
+ export function AgentDrivesSection({ projectId, agentName, }) {
44
44
  const t = useTranslations('agentMounts');
45
45
  const drive = useProjectDrive(projectId);
46
46
  const driveId = drive.data?.driveId ?? null;
47
47
  const agentPlan = useAgentMounts(agentName ? driveId : null, agentName ?? '');
48
48
  const projectPlan = useProjectMounts(agentName ? null : driveId);
49
49
  const plan = agentName ? agentPlan : projectPlan;
50
- const showRepository = !!agentName && repositoryAccess;
51
50
  const root = useFolderAccess(driveId, '/');
52
51
  // Mounting needs `manage` on the folder; someone who holds it at the top holds it below.
53
52
  const canMount = root.data?.access === 'manage';
@@ -57,13 +56,13 @@ export function AgentDrivesSection({ projectId, agentName, repositoryAccess = tr
57
56
  body = (_jsx(EditorList, { children: [0, 1].map((i) => (_jsx("li", { className: "flex min-h-12 items-center gap-3 px-4 py-2", children: _jsx(Skeleton, { className: "h-4 w-48 rounded-sm" }) }, i))) }));
58
57
  }
59
58
  else if (drive.isError || plan.isError || !driveId || !plan.data) {
60
- body = (_jsx(ErrorState, { size: "sm", title: t('loadError'), action: _jsx(Button, { variant: "outline", size: "sm", onClick: () => void plan.refetch(), children: t('retry') }) }));
59
+ body = (_jsx(ErrorState, { size: "sm", title: agentName ? t('loadError') : t('projectLoadError'), action: _jsx(Button, { variant: "outline", size: "sm", onClick: () => void plan.refetch(), children: t('retry') }) }));
61
60
  }
62
- else if (plan.data.mounts.length === 0 && !showRepository) {
63
- body = (_jsx(EmptyState, { media: _jsx(EmptyArt, { icon: HardDrivesIcon }), title: t('emptyTitle'), description: t('emptyDescription') }));
61
+ else if (plan.data.mounts.length === 0) {
62
+ body = (_jsx(EmptyState, { media: _jsx(EmptyArt, { icon: HardDrivesIcon }), title: t('emptyTitle'), description: agentName ? t('emptyDescription') : t('projectEmptyDescription') }));
64
63
  }
65
64
  else {
66
- body = (_jsxs("div", { className: "space-y-3", children: [_jsxs(EditorList, { children: [showRepository ? (_jsxs("li", { className: "flex min-h-12 items-center gap-3 px-4 py-2", children: [_jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("code", { className: "text-foreground block truncate font-mono text-sm", children: "/workspace" }), _jsx("span", { className: "text-muted-foreground block truncate text-xs", children: t('repository') })] }), _jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children: t('readWrite') })] })) : null, plan.data.mounts.map((mount) => (_jsx(MountRow, { driveId: driveId, agentName: agentName, mount: mount }, mount.path)))] }), plan.data.skipped.length > 0 ? (_jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: t('skipped', { slots: plan.data.slots, list: plan.data.skipped.join(', ') }) })) : null] }));
65
+ body = (_jsxs("div", { className: "space-y-3", children: [_jsx(EditorList, { children: plan.data.mounts.map((mount) => (_jsx(MountRow, { driveId: driveId, agentName: agentName, mount: mount }, mount.path))) }), plan.data.skipped.length > 0 ? (_jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: t('skipped', { slots: plan.data.slots, list: plan.data.skipped.join(', ') }) })) : null] }));
67
66
  }
68
67
  return (_jsxs(CapabilityPageShell, { title: t('title'), description: agentName ? t('lead') : t('projectLead'), action: _jsxs(_Fragment, { children: [canMount && driveId ? (_jsxs(Button, { variant: "secondary", size: "sm", className: "gap-1.5", onClick: () => setPicking(true), children: [_jsx(PlusIcon, { className: "size-3.5 shrink-0" }), t('mount')] })) : null, _jsx(ManageButton, { href: (id) => uiRoutes().drive(id) })] }), children: [_jsx("div", { "data-testid": "drive-mounts", children: body }), driveId ? (_jsx(FolderPicker, { open: picking, onOpenChange: setPicking, driveId: driveId, agentName: agentName, mounted: new Set(plan.data?.mounts.map((m) => m.path)) })) : null] }));
69
68
  }
@@ -23,7 +23,7 @@ import { useCallback } from 'react';
23
23
  import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
24
24
  import { AgentMark, agentDisplayName } from '../../internal/components/agent-mark.js';
25
25
  import { SidebarToggle } from '../../internal/layout/sidebar-toggle.js';
26
- import { SETTINGS_SIDEBAR_WIDTH_PX } from '../../internal/account-hub/account-settings-shell.js';
26
+ import { SETTINGS_SIDEBAR_WIDTH_PX } from '../../internal/components/nav-rail.js';
27
27
  import { CaretRightIcon } from '@phosphor-icons/react';
28
28
  import { useInCustomizeFrame } from '../shared/customize-tab-bar.js';
29
29
  import { cn } from '../../internal/lib/utils.js';
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { MY_KORTIX_AGENT_NAME } from '../../_vendor/kortix-shared.js';
4
4
  import { adminPath } from '../../lib/routes.js';
5
5
  /**
6
- * /projects/[id]/customize/agents/[name]: one agent, as a page with a rail.
6
+ * /workspaces/[id]/admin/agents/[name]: one agent, as a page with a rail, in the Workspace settings pane.
7
7
  *
8
8
  * Customize is agent-first. My Kortix is the one agent a person talks to; every
9
9
  * other agent is a work product with only the access its work needs. So the
@@ -64,7 +64,7 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSepara
64
64
  import { EmptyState } from '../../primitives/empty-state.js';
65
65
  import { ErrorState } from '../../primitives/error-state.js';
66
66
  import Hint from '../../primitives/hint.js';
67
- import { InfoBanner } from '../../primitives/info-banner.js';
67
+ import { Alert as BannerAlert, AlertTitle as BannerAlertTitle, AlertDescription as BannerAlertDescription, AlertMedia as BannerAlertMedia } from '../../primitives/alert.js';
68
68
  import { errorToast, successToast } from '../../primitives/toast.js';
69
69
  import { UiLink as Link, useUiPathname, useUiRouter, useUiSearchParams } from '../../providers/ui-provider.js';
70
70
  import { configEntitySourcePath } from '../sections/component/config-entity-source-path.js';
@@ -88,7 +88,6 @@ import { AgentOverview } from './agent-overview.js';
88
88
  import { AgentBreadcrumbHeader, AgentPageSkeleton, AgentRail, AgentStatePage, AgentTabBody, LeaveDialog, SaveBar, } from './agent-page-chrome.js';
89
89
  import { AgentModelView } from './agent-model-view.js';
90
90
  import { AgentApprovalRules } from './agent-approval-rules.js';
91
- import { AgentPinButton } from './agent-pin-button.js';
92
91
  import { AgentShareControl } from './agent-share-control.js';
93
92
  import { ACCESS_VIEWS, AGENT_TABS, agentLocationHref, changedItems, closestAgentName, resolveAgentLocation, railKeyOf, sectionLocationHref, } from './agent-tabs.js';
94
93
  import { useSpacesEnabled } from '../../internal/lib/space-scope.js';
@@ -353,7 +352,7 @@ function AgentActions({ projectId, agent, config, canWrite, share, }) {
353
352
  : null;
354
353
  const startLabel = tI18nComplete.raw('textb1c52ee3677d');
355
354
  const start = (_jsxs(_Fragment, { children: [_jsxs(Button, { size: "sm", disabled: startBlocked !== null, onClick: () => startSession({ create: { agent_name: agent.name } }), className: "hidden sm:inline-flex", children: [_jsx(PlayIcon, { weight: "fill", className: "size-3.5 shrink-0" }), startLabel] }), _jsx(Button, { size: "icon-base", "aria-label": startLabel, disabled: startBlocked !== null, onClick: () => startSession({ create: { agent_name: agent.name } }), className: "sm:hidden", children: _jsx(PlayIcon, { weight: "fill", className: "size-3.5" }) })] }));
356
- return (_jsxs(_Fragment, { children: [_jsx(AgentPinButton, { projectId: projectId, agent: agent.name }), _jsx(AgentShareControl, { projectId: projectId, agentName: agent.name, open: share.open, onOpenChange: share.setOpen }), startBlocked ? null : _jsx(AgentCallButton, { projectId: projectId, agentName: agent.name }), startBlocked ? (_jsx(Hint, { label: startBlocked, children: _jsx("span", { className: "inline-flex", children: start }) })) : (start), canWrite ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-base", "aria-label": tI18nComplete.raw('textf8d46c2570e7'), children: _jsx(DotsThreeIcon, { className: "size-4" }) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsxs(DropdownMenuItem, { disabled: isDefault || agent.enabled === false || makeDefault.isPending, onSelect: () => makeDefault.mutate(agent.name), children: [_jsx(StarIcon, { className: "size-4" }), isDefault ? tI18nComplete.raw('texte8cb80e5c5cb') : tI18nComplete.raw('texte8f43f910a4e')] }), _jsxs(DropdownMenuItem, { disabled: configure.pending, onSelect: () => setConfirm('edit'), children: [_jsx(AgentMark, { slug: MY_KORTIX_AGENT_NAME }), t('askToEditAgent')] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { variant: "destructive", disabled: configure.pending, onSelect: () => setConfirm('delete'), children: [_jsx(TrashIcon, { className: "size-4" }), t('deleteAgent', { name: agentDisplayName(agent.name) })] })] })] })) : null, _jsx(ConfirmDialog, { open: confirm !== null, onOpenChange: (open) => (open ? undefined : setConfirm(null)), title: confirm === 'delete' ? t('deleteTitle', { name: agentDisplayName(agent.name) }) : tI18nComplete.raw('text24ba36a8ec86'), description: confirm === 'delete'
355
+ return (_jsxs(_Fragment, { children: [_jsx(AgentShareControl, { projectId: projectId, agentName: agent.name, open: share.open, onOpenChange: share.setOpen }), startBlocked ? null : _jsx(AgentCallButton, { projectId: projectId, agentName: agent.name }), startBlocked ? (_jsx(Hint, { label: startBlocked, children: _jsx("span", { className: "inline-flex", children: start }) })) : (start), canWrite ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-base", "aria-label": tI18nComplete.raw('textf8d46c2570e7'), children: _jsx(DotsThreeIcon, { className: "size-4" }) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsxs(DropdownMenuItem, { disabled: isDefault || agent.enabled === false || makeDefault.isPending, onSelect: () => makeDefault.mutate(agent.name), children: [_jsx(StarIcon, { className: "size-4" }), isDefault ? tI18nComplete.raw('texte8cb80e5c5cb') : tI18nComplete.raw('texte8f43f910a4e')] }), _jsxs(DropdownMenuItem, { disabled: configure.pending, onSelect: () => setConfirm('edit'), children: [_jsx(AgentMark, { slug: MY_KORTIX_AGENT_NAME }), t('askToEditAgent')] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { variant: "destructive", disabled: configure.pending, onSelect: () => setConfirm('delete'), children: [_jsx(TrashIcon, { className: "size-4" }), t('deleteAgent', { name: agentDisplayName(agent.name) })] })] })] })) : null, _jsx(ConfirmDialog, { open: confirm !== null, onOpenChange: (open) => (open ? undefined : setConfirm(null)), title: confirm === 'delete' ? t('deleteTitle', { name: agentDisplayName(agent.name) }) : tI18nComplete.raw('text24ba36a8ec86'), description: confirm === 'delete'
357
356
  ? t('deleteBody')
358
357
  : tI18nComplete('text13324ae62b23', { value0: agent.name }), confirmLabel: tI18nComplete.raw('text0bce1a892dec'), cancelLabel: tI18nComplete.raw('text19766ed6ccb2'), confirmVariant: confirm === 'delete' ? 'destructive' : 'default', onConfirm: () => {
359
358
  const kind = confirm;
@@ -449,7 +448,7 @@ function EditableAgentPage({ projectId, agent, config, initial, renderApps, }) {
449
448
  const railItems = railGroups.flatMap((group) => group.items);
450
449
  const dirtyItems = useMemo(() => changedItems(editor.draft, editor.baseline), [editor.draft, editor.baseline]);
451
450
  const changed = new Intl.ListFormat(locale, { type: 'conjunction' }).format(dirtyItems.map((key) => railItems.find((item) => item.key === key)?.label ?? key));
452
- const editorSection = (view) => (_jsx(AgentConfigSections, { section: view, editor: editor, options: options, skillsOptions: skillsOptions, registryOptions: registryOptions, apps: null, drives: _jsx(AgentDrivesSection, { projectId: projectId, agentName: agent.name, repositoryAccess: draft.repository_access !== false }), sectionStyle: "tab" }));
451
+ const editorSection = (view) => (_jsx(AgentConfigSections, { section: view, editor: editor, options: options, skillsOptions: skillsOptions, registryOptions: registryOptions, apps: null, drives: _jsx(AgentDrivesSection, { projectId: projectId, agentName: agent.name }), sectionStyle: "tab" }));
453
452
  const body = (() => {
454
453
  const view = location.view;
455
454
  switch (location.tab) {
@@ -475,7 +474,7 @@ function EditableAgentPage({ projectId, agent, config, initial, renderApps, }) {
475
474
  if (view === 'apps' && renderApps)
476
475
  return (_jsx(Embedded, { agentName: agent.name, column: RAIL_COLUMN, children: renderApps({ agentName: agent.name, grant: appsGrant, needsAppRead: !grantsAppRead(draft.kortix_permissions ?? draft.kortix_cli) }) }));
477
476
  if (view === 'drives')
478
- return (_jsx(Embedded, { agentName: agent.name, column: RAIL_COLUMN, children: _jsx(AgentDrivesSection, { projectId: projectId, agentName: agent.name, repositoryAccess: draft.repository_access !== false }) }));
477
+ return (_jsx(Embedded, { agentName: agent.name, column: RAIL_COLUMN, children: _jsx(AgentDrivesSection, { projectId: projectId, agentName: agent.name }) }));
479
478
  // Model is this agent's model only. The project-wide gateway screens
480
479
  // (providers, routing, costs, logs) live once, in Project admin.
481
480
  if (view === 'model')
@@ -527,7 +526,7 @@ function ReadOnlyAgentPage({ projectId, agent, config, block, canWrite, }) {
527
526
  const name = agentDisplayName(agent.name);
528
527
  // A reader has a page for Kortix permissions and Model only. Every other
529
528
  // Access row shows its grant by name on the Overview and links nowhere.
530
- const banner = (_jsx(InfoBanner, { tone: "neutral", icon: LockSimpleIcon, title: t('readOnlyTitle'), children: t.rich('readOnlyBody', { code: (chunks) => _jsx("span", { className: "font-mono", children: chunks }) }) }));
529
+ const banner = (_jsxs(BannerAlert, { variant: "default", children: [_jsx(BannerAlertMedia, { children: _jsx(LockSimpleIcon, {}) }), _jsx(BannerAlertTitle, { children: t('readOnlyTitle') }), _jsx(BannerAlertDescription, { children: t.rich('readOnlyBody', { code: (chunks) => _jsx("span", { className: "font-mono", children: chunks }) }) })] }));
531
530
  const body = (() => {
532
531
  switch (location.tab) {
533
532
  case 'basics':
@@ -79,8 +79,8 @@ export declare const YAML_KEY_ROW: {
79
79
  readonly secrets: "secrets";
80
80
  readonly apps: "apps";
81
81
  readonly kortix_permissions: "actions";
82
- readonly workspace: "workspace";
83
82
  readonly sandbox: "workspace";
83
+ readonly workspace: "workspace";
84
84
  readonly network_egress: "workspace";
85
85
  };
86
86
  /** One row of the agent page's rail: a tab with no views, or a view. */
@@ -131,14 +131,13 @@ export const YAML_KEY_ROW = {
131
131
  secrets: 'secrets',
132
132
  apps: 'apps',
133
133
  kortix_permissions: 'actions',
134
- workspace: 'workspace',
135
134
  sandbox: 'workspace',
135
+ workspace: 'workspace',
136
136
  network_egress: 'workspace',
137
137
  };
138
138
  /** The editor draft's wire names for a kortix.yaml key (v2 aliases included). */
139
139
  const WIRE_KEY = {
140
140
  file: 'prompt_file',
141
- repository_access: 'workspace',
142
141
  kortix_cli: 'kortix_permissions',
143
142
  connectors_personal: 'connectors_required',
144
143
  };
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  /**
4
- * /projects/[id]/customize/agents: the Agents index, where the sidebar's
4
+ * /workspaces/[id]/admin/agents (Workspace settings › Agents): the Agents index, where the sidebar's
5
5
  * Customize row lands.
6
6
  *
7
7
  * Customize is agent-first. My Kortix is not listed: the project home starts
@@ -54,7 +54,6 @@ import { AgentCoverCard } from './agent-cover-card.js';
54
54
  import { agentInMode, filterAgents } from './agent-filter.js';
55
55
  import { CapabilityPageShell } from '../shared/capability-page-shell.js';
56
56
  import { CreateAgentModal } from './create-agent-modal.js';
57
- import { AgentPinButton } from './agent-pin-button.js';
58
57
  export function AgentsPage({ projectId }) {
59
58
  const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
60
59
  const t = useI18nTranslations('agentEditor.tabs');
@@ -137,7 +136,7 @@ export function AgentsPage({ projectId }) {
137
136
  // sit in their own section. `all` is usable both ways and stays with the first.
138
137
  const primaryAgents = shown.filter((agent) => agentInMode(agent, 'primary'));
139
138
  const subagents = shown.filter((agent) => !agentInMode(agent, 'primary'));
140
- const card = (agent, cover) => (_jsx(AgentCoverCard, { slug: agent.name, href: agentHref(projectId, agent.name), onIntent: () => prefetchAgentConfig(queryClient, projectId, agent.name), title: agentDisplayName(agent.name), description: agent.description, badges: _jsx(AgentCardBadges, { agent: agent }), coverLabel: cover, action: _jsx(AgentPinButton, { projectId: projectId, agent: agent.name, onCard: true }), meta: _jsx(AgentCardFacts, { agent: agent, triggerCount: triggerCounts.get(agent.name) ?? 0, grantCount: grantCounts.get(agent.name) ?? 0 }) }, agent.name));
139
+ const card = (agent, cover) => (_jsx(AgentCoverCard, { slug: agent.name, href: agentHref(projectId, agent.name), onIntent: () => prefetchAgentConfig(queryClient, projectId, agent.name), title: agentDisplayName(agent.name), description: agent.description, badges: _jsx(AgentCardBadges, { agent: agent }), coverLabel: cover, meta: _jsx(AgentCardFacts, { agent: agent, triggerCount: triggerCounts.get(agent.name) ?? 0, grantCount: grantCounts.get(agent.name) ?? 0 }) }, agent.name));
141
140
  const newButton = canWrite ? (_jsxs(Button, { size: "sm", onClick: () => setCreating(true), className: "gap-1.5", children: [_jsx(PlusIcon, { className: "size-4" }), t('newAgent')] })) : null;
142
141
  const body = (() => {
143
142
  if (detailQuery.isLoading)
@@ -6,7 +6,7 @@ import type { ConnectorLogoSource } from '../../internal/connector-logo/connecto
6
6
  * connector surface.
7
7
  *
8
8
  * These two render once per card in the connectors grid, so they sit on the
9
- * hottest path of `/projects/[id]/connectors`. They used to live in
9
+ * hottest path of `/workspaces/[id]/connectors`. They used to live in
10
10
  * `customize/sections/connectors-view.tsx`, which is ~5,100 lines across 50
11
11
  * components and pulls `HighlightedCode` and `PoliciesPanel`. Importing
12
12
  * two small components from there put that entire graph in this route's client
@@ -12,7 +12,7 @@ import { cn } from '../../internal/lib/utils.js';
12
12
  * connector surface.
13
13
  *
14
14
  * These two render once per card in the connectors grid, so they sit on the
15
- * hottest path of `/projects/[id]/connectors`. They used to live in
15
+ * hottest path of `/workspaces/[id]/connectors`. They used to live in
16
16
  * `customize/sections/connectors-view.tsx`, which is ~5,100 lines across 50
17
17
  * components and pulls `HighlightedCode` and `PoliciesPanel`. Importing
18
18
  * two small components from there put that entire graph in this route's client
@@ -4,7 +4,7 @@ import { listConnectorMoves } from '@kortix/sdk';
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { UiLink as Link } from '../../providers/ui-provider.js';
6
6
  import { Fragment } from 'react';
7
- import { InfoBanner } from '../../primitives/info-banner.js';
7
+ import { Alert as BannerAlert, AlertTitle as BannerAlertTitle, AlertDescription as BannerAlertDescription } from '../../primitives/alert.js';
8
8
  import { useTranslations } from '../../i18n/index.js';
9
9
  import { connectorHref } from './connector-routes.js';
10
10
  import { connectorMovesQueryKey } from './detail/connector-move-row.js';
@@ -19,5 +19,5 @@ export function ConnectorMovesBanner({ projectId }) {
19
19
  const movable = (moves.data ?? []).filter((move) => move.to && move.provider === 'pipedream');
20
20
  if (movable.length === 0)
21
21
  return null;
22
- return (_jsx(InfoBanner, { tone: "info", title: t('movesBannerTitle', { count: movable.length }), children: _jsxs("p", { className: "text-muted-foreground text-xs text-pretty", children: [t('movesBannerBody'), ' ', movable.map((move, index) => (_jsxs(Fragment, { children: [index > 0 ? ', ' : null, _jsx(Link, { href: connectorHref(projectId, move.slug), className: "text-foreground underline-offset-2 hover:underline", children: move.name })] }, move.slug)))] }) }));
22
+ return (_jsxs(BannerAlert, { variant: "default", children: [_jsx(BannerAlertTitle, { children: t('movesBannerTitle', { count: movable.length }) }), _jsx(BannerAlertDescription, { children: _jsxs("p", { className: "text-muted-foreground text-xs text-pretty", children: [t('movesBannerBody'), ' ', movable.map((move, index) => (_jsxs(Fragment, { children: [index > 0 ? ', ' : null, _jsx(Link, { href: connectorHref(projectId, move.slug), className: "text-foreground underline-offset-2 hover:underline", children: move.name })] }, move.slug)))] }) })] }));
23
23
  }
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { type AgentGrant, type ResourceScope } from '../shared/agent-resource-scope.js';
3
3
  /**
4
- * /projects/[id]/connectors — the standalone Connectors catalogue.
4
+ * /workspaces/[id]/connectors — the standalone Connectors catalogue.
5
5
  *
6
6
  * Reads the project's own connectors off `qk.project.connectors(projectId)`,
7
7
  * the same key `ConnectorsMasterDetail` uses, so the two surfaces cannot
@@ -22,7 +22,7 @@ import { type AgentGrant, type ResourceScope } from '../shared/agent-resource-sc
22
22
  * custom-connector Add button off the header while it is up.
23
23
  *
24
24
  * `?scope=` is the tab, so every scope is linkable — which is what lets the
25
- * retired `/projects/<id>/channels` route redirect to a real destination
25
+ * retired `/workspaces/<id>/channels` route redirect to a real destination
26
26
  * instead of a page that lands on All and hides what was asked for.
27
27
  *
28
28
  * **What Add opens.** Only the custom-connector form (OpenAPI / Postman /
@@ -51,3 +51,11 @@ export declare function ConnectorsPage({ projectId, surface, grant, agentPanel,
51
51
  /** Agent scope only: a granted connector's own rule control (its policy-set picker), in its row. */
52
52
  rowControl?: (slug: string) => ReactNode | undefined;
53
53
  }): import("react").JSX.Element;
54
+ /** The server an agent's `setup_url` asks a person to approve, or null. */
55
+ export declare function setupLinkFromParams(search: {
56
+ get(key: string): string | null;
57
+ } | null | undefined): {
58
+ provider: string;
59
+ url: string | null;
60
+ name: string | null;
61
+ } | null;
@@ -142,7 +142,7 @@ function parseScope(value) {
142
142
  return SCOPES.find((scope) => scope === value) ?? null;
143
143
  }
144
144
  /**
145
- * /projects/[id]/connectors — the standalone Connectors catalogue.
145
+ * /workspaces/[id]/connectors — the standalone Connectors catalogue.
146
146
  *
147
147
  * Reads the project's own connectors off `qk.project.connectors(projectId)`,
148
148
  * the same key `ConnectorsMasterDetail` uses, so the two surfaces cannot
@@ -163,7 +163,7 @@ function parseScope(value) {
163
163
  * custom-connector Add button off the header while it is up.
164
164
  *
165
165
  * `?scope=` is the tab, so every scope is linkable — which is what lets the
166
- * retired `/projects/<id>/channels` route redirect to a real destination
166
+ * retired `/workspaces/<id>/channels` route redirect to a real destination
167
167
  * instead of a page that lands on All and hides what was asked for.
168
168
  *
169
169
  * **What Add opens.** Only the custom-connector form (OpenAPI / Postman /
@@ -204,6 +204,27 @@ export function ConnectorsPage({ projectId, surface = { kind: 'global' }, grant,
204
204
  // The catalogue app whose own MCP server the MCP dialog connects. Null for
205
205
  // a server the user pastes (New → MCP server).
206
206
  const [mcpApp, setMcpApp] = useState(null);
207
+ // An agent's `setup_url` (`?custom=1&provider=mcp&url=…&name=…`): the one
208
+ // approval of an exact server. The MCP dialog opens prefilled; adding it is
209
+ // the approval. Read once, then dropped from the URL so closing the dialog
210
+ // does not reopen it.
211
+ const [setupLink, setSetupLink] = useState(null);
212
+ useEffect(() => {
213
+ const link = setupLinkFromParams(search);
214
+ if (!link)
215
+ return;
216
+ if (link.provider === 'mcp') {
217
+ setMcpApp(null);
218
+ setSetupLink({ url: link.url ?? '', ...(link.name ? { name: link.name } : {}) });
219
+ setPanel('mcp');
220
+ }
221
+ else
222
+ setPanel('custom');
223
+ replaceParams((params) => {
224
+ for (const key of SETUP_LINK_PARAMS)
225
+ params.delete(key);
226
+ });
227
+ }, [search, replaceParams]);
207
228
  // The catalogue opens on the apps that connect in one click.
208
229
  const [oneClick, setOneClick] = useState(true);
209
230
  const [kindFilter, setKindFilter] = useState('all');
@@ -400,10 +421,14 @@ export function ConnectorsPage({ projectId, surface = { kind: 'global' }, grant,
400
421
  connectors, one switch each, then every app), then the agent's
401
422
  rule sets. One library, two modes (Marko, 2026-10-28). */
402
423
  _jsxs("div", { className: "space-y-6", children: [settled && !isError ? catalogSection : listBody(ownMatches), agentPanel, railLayout ? (_jsxs("div", { className: "bg-popover flex items-center gap-3 rounded-lg px-4 py-3", children: [_jsx(ShieldIcon, { className: "text-muted-foreground size-4 shrink-0" }), _jsx("p", { className: "text-muted-foreground min-w-0 flex-1 text-xs text-pretty", children: tTabs.rich('policySetsNote', { file: () => _jsx("code", { className: "text-foreground font-mono", children: "kortix.yaml" }) }) }), addMenu] })) : null] })) : channelsActive ? (
403
- /* The whole of what used to be `/projects/<id>/channels`, minus the
424
+ /* The whole of what used to be `/workspaces/<id>/channels`, minus the
404
425
  shell it used to bring — this page's `CapabilityPageShell` is the
405
426
  one column, the one heading and the one scroll container now. */
406
- _jsx(ChannelsSection, { projectId: projectId })) : catalogActive ? (catalogSection) : (_jsxs(_Fragment, { children: [_jsx(ConnectorMovesBanner, { projectId: projectId }), listBody(filtered)] })), _jsx(AddMcpServerDialog, { projectId: projectId, app: mcpApp, open: panel === 'mcp', onOpenChange: (open) => setPanel(open ? 'mcp' : null), takenSlugs: connectors.map((connector) => connector.slug), onAdded: invalidate }, mcpApp?.url ?? 'paste'), installRequest ? (_jsx(InstallDialog, { appName: installRequest.target.appName, way: installRequest.way, open: true, pending: false, onOpenChange: (open) => !open && setInstallRequest(null), onConfirm: confirmInstall }, installRequest.target.appName)) : null, _jsx(Modal, { open: panel === 'custom', onOpenChange: (open) => !open && setPanel(null), children: _jsxs(ModalContent, { className: "lg:max-w-3xl", children: [_jsxs(ModalHeader, { children: [_jsx(ModalTitle, { children: tI18nComplete.raw('text90ccaee30bdc') }), _jsx(ModalDescription, { children: tI18nComplete.raw('textd2f3be0047c4') })] }), _jsx(ModalBody, { className: "max-h-[75vh] overflow-y-auto", children: _jsx(CustomConnectorForm, { projectId: projectId, onAdded: (slug, { addAccount }) => {
427
+ _jsx(ChannelsSection, { projectId: projectId })) : catalogActive ? (catalogSection) : (_jsxs(_Fragment, { children: [_jsx(ConnectorMovesBanner, { projectId: projectId }), listBody(filtered)] })), _jsx(AddMcpServerDialog, { projectId: projectId, app: mcpApp, initial: mcpApp ? null : setupLink, open: panel === 'mcp', onOpenChange: (open) => {
428
+ setPanel(open ? 'mcp' : null);
429
+ if (!open)
430
+ setSetupLink(null);
431
+ }, takenSlugs: connectors.map((connector) => connector.slug), onAdded: invalidate }, mcpApp?.url ?? setupLink?.url ?? 'paste'), installRequest ? (_jsx(InstallDialog, { appName: installRequest.target.appName, way: installRequest.way, open: true, pending: false, onOpenChange: (open) => !open && setInstallRequest(null), onConfirm: confirmInstall }, installRequest.target.appName)) : null, _jsx(Modal, { open: panel === 'custom', onOpenChange: (open) => !open && setPanel(null), children: _jsxs(ModalContent, { className: "lg:max-w-3xl", children: [_jsxs(ModalHeader, { children: [_jsx(ModalTitle, { children: tI18nComplete.raw('text90ccaee30bdc') }), _jsx(ModalDescription, { children: tI18nComplete.raw('textd2f3be0047c4') })] }), _jsx(ModalBody, { className: "max-h-[75vh] overflow-y-auto", children: _jsx(CustomConnectorForm, { projectId: projectId, onAdded: (slug, { addAccount }) => {
407
432
  invalidate();
408
433
  setPanel(null);
409
434
  router.push(connectorHref(projectId, slug, { addAccount }));
@@ -424,6 +449,14 @@ function useSearchInUrl(query, search, pathname) {
424
449
  shallowNavigate(suffix ? `${pathname}?${suffix}` : pathname, { replace: true });
425
450
  }, [debouncedValue, search, pathname, shallowNavigate]);
426
451
  }
452
+ /** The query keys of an agent's `setup_url` (`customConnectorSetupUrl` in the API). */
453
+ const SETUP_LINK_PARAMS = ['custom', 'provider', 'url', 'transport', 'endpoint', 'spec', 'base_url', 'name'];
454
+ /** The server an agent's `setup_url` asks a person to approve, or null. */
455
+ export function setupLinkFromParams(search) {
456
+ if (search?.get('custom') !== '1')
457
+ return null;
458
+ return { provider: search.get('provider') ?? 'mcp', url: search.get('url'), name: search.get('name') };
459
+ }
427
460
  function useConnectorNavigation(projectId) {
428
461
  const search = useUiSearchParams();
429
462
  const router = useUiRouter();
@@ -443,7 +476,7 @@ function useConnectorNavigation(projectId) {
443
476
  }, [pathname, router, search]);
444
477
  // Which scope the strip is on, held in the URL rather than in state.
445
478
  //
446
- // It has to be addressable: `/projects/<id>/channels` was a real route until
479
+ // It has to be addressable: `/workspaces/<id>/channels` was a real route until
447
480
  // Channels folded into this page, and every bookmark and every legacy nav id
448
481
  // pointing at it now redirects to `?scope=channels`. A tab that only local
449
482
  // state can reach is a tab nothing can link to.
@@ -47,7 +47,7 @@ const surfaceLabel = (kind) => wayKindLabel(kind);
47
47
  /** Tools shown before "Show all". */
48
48
  const TOOLS_PREVIEW = 40;
49
49
  /**
50
- * `/projects/<id>/admin/connectors/<app>` — one catalogue app: what it is,
50
+ * `/workspaces/<id>/admin/connectors/<app>` — one catalogue app: what it is,
51
51
  * the one Install button, the connectors this project already has for it, and
52
52
  * the other ways to connect it.
53
53
  *
@@ -3,7 +3,7 @@ import { type ReactNode } from 'react';
3
3
  import { type AppRef } from '../connector-routes.js';
4
4
  /** The column `CapabilityPageShell` gives the list page beside this one. */
5
5
  /**
6
- * `/projects/<id>/admin/connectors/<app>/<connector>` — one connector, as
6
+ * `/workspaces/<id>/admin/connectors/<app>/<connector>` — one connector, as
7
7
  * a page: its accounts, its tools, its settings.
8
8
  *
9
9
  * `appSegment` is navigation context only. It decides where Back goes: the
@@ -43,7 +43,7 @@ import { ConnectorStatusBadge } from './status-badge.js';
43
43
  import { useConnectorDetail } from './use-connector-detail.js';
44
44
  /** The column `CapabilityPageShell` gives the list page beside this one. */
45
45
  /**
46
- * `/projects/<id>/admin/connectors/<app>/<connector>` — one connector, as
46
+ * `/workspaces/<id>/admin/connectors/<app>/<connector>` — one connector, as
47
47
  * a page: its accounts, its tools, its settings.
48
48
  *
49
49
  * `appSegment` is navigation context only. It decides where Back goes: the