@kortix/ui 0.14.12 → 0.14.14

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 (438) hide show
  1. package/README.md +1 -1
  2. package/dist/_vendor/kortix-shared.js +521 -7045
  3. package/dist/_vendor/shared/app-config.d.ts +8 -0
  4. package/dist/_vendor/shared/artifact-annotations.d.ts +708 -0
  5. package/dist/_vendor/shared/artifact-comments.d.ts +327 -0
  6. package/dist/_vendor/shared/index.d.ts +3 -1
  7. package/dist/_vendor/shared/my-kortix-agent.d.ts +40 -0
  8. package/dist/_vendor/shared/peer-message-prompt.d.ts +35 -0
  9. package/dist/_vendor/shared/pixel-mark.d.ts +11 -0
  10. package/dist/_vendor/shared/prompt-attachments.d.ts +1 -0
  11. package/dist/_vendor/shared/reminder-prompt.d.ts +8 -2
  12. package/dist/_vendor/shared/runtime-versions.d.ts +8 -0
  13. package/dist/artifacts/artifact-frame.d.ts +1 -0
  14. package/dist/artifacts/artifact-frame.js +18 -5
  15. package/dist/artifacts/frame-policy.d.ts +1 -1
  16. package/dist/artifacts/frame-policy.js +10 -5
  17. package/dist/customize/agents/agent-access-text.d.ts +16 -0
  18. package/dist/customize/agents/agent-access-text.js +54 -0
  19. package/dist/customize/agents/agent-approval-rules.d.ts +8 -0
  20. package/dist/customize/agents/agent-approval-rules.js +26 -0
  21. package/dist/customize/agents/agent-authority-card.js +4 -1
  22. package/dist/customize/agents/agent-cover-card.d.ts +4 -1
  23. package/dist/customize/agents/agent-cover-card.js +2 -2
  24. package/dist/customize/agents/agent-detail-aside.d.ts +1 -2
  25. package/dist/customize/agents/agent-detail-aside.js +8 -11
  26. package/dist/customize/agents/agent-drives-section.d.ts +23 -7
  27. package/dist/customize/agents/agent-drives-section.js +107 -41
  28. package/dist/customize/agents/agent-instructions.d.ts +11 -0
  29. package/dist/customize/agents/agent-instructions.js +114 -0
  30. package/dist/customize/agents/agent-model-view.d.ts +17 -0
  31. package/dist/customize/agents/agent-model-view.js +67 -0
  32. package/dist/customize/agents/agent-overview.d.ts +53 -0
  33. package/dist/customize/agents/agent-overview.js +242 -0
  34. package/dist/customize/agents/agent-page-chrome.d.ts +128 -0
  35. package/dist/customize/agents/agent-page-chrome.js +145 -0
  36. package/dist/customize/agents/agent-page.d.ts +13 -1
  37. package/dist/customize/agents/agent-page.js +478 -367
  38. package/dist/customize/agents/agent-pin-button.d.ts +10 -0
  39. package/dist/customize/agents/agent-pin-button.js +20 -0
  40. package/dist/customize/agents/agent-policy-sets-section.d.ts +16 -0
  41. package/dist/customize/agents/agent-policy-sets-section.js +80 -0
  42. package/dist/customize/agents/agent-policy-sets.js +1 -1
  43. package/dist/customize/agents/agent-section-rail.d.ts +21 -0
  44. package/dist/customize/agents/agent-section-rail.js +23 -0
  45. package/dist/customize/agents/agent-share-control.d.ts +4 -3
  46. package/dist/customize/agents/agent-share-control.js +15 -16
  47. package/dist/customize/agents/{agent-people-section.d.ts → agent-share-dialog.d.ts} +3 -1
  48. package/dist/customize/agents/{agent-people-section.js → agent-share-dialog.js} +21 -21
  49. package/dist/customize/agents/agent-tabs.d.ts +95 -0
  50. package/dist/customize/agents/agent-tabs.js +199 -0
  51. package/dist/customize/agents/agents-page.d.ts +0 -21
  52. package/dist/customize/agents/agents-page.js +104 -118
  53. package/dist/customize/agents/connectors-required.d.ts +16 -0
  54. package/dist/customize/agents/connectors-required.js +19 -0
  55. package/dist/customize/agents/create-agent-modal.d.ts +19 -0
  56. package/dist/customize/agents/create-agent-modal.js +94 -0
  57. package/dist/customize/connectors/agent-access.d.ts +4 -4
  58. package/dist/customize/connectors/agent-access.js +7 -10
  59. package/dist/customize/connectors/connector-identity.d.ts +12 -0
  60. package/dist/customize/connectors/connector-identity.js +15 -2
  61. package/dist/customize/connectors/connector-routes.js +2 -2
  62. package/dist/customize/connectors/connectors-page.d.ts +14 -1
  63. package/dist/customize/connectors/connectors-page.js +101 -32
  64. package/dist/customize/connectors/detail/app-page.js +1 -1
  65. package/dist/customize/connectors/detail/connector-agents.js +0 -3
  66. package/dist/customize/connectors/detail/connector-page.d.ts +1 -1
  67. package/dist/customize/connectors/detail/connector-page.js +5 -2
  68. package/dist/customize/connectors/detail/connector-policy-sets.js +1 -1
  69. package/dist/customize/connectors/detail/connector-triggers.js +2 -2
  70. package/dist/customize/connectors/use-agent-access.d.ts +7 -5
  71. package/dist/customize/connectors/use-agent-access.js +2 -6
  72. package/dist/customize/models/models-page.d.ts +7 -1
  73. package/dist/customize/models/models-page.js +2 -2
  74. package/dist/customize/project-settings/project-admin-sections.d.ts +63 -0
  75. package/dist/customize/project-settings/project-admin-sections.js +80 -0
  76. package/dist/customize/project-settings/project-settings-page.d.ts +1 -1
  77. package/dist/customize/project-settings/project-settings-page.js +4 -13
  78. package/dist/customize/project-settings/project-settings-sections.d.ts +5 -5
  79. package/dist/customize/project-settings/project-settings-sections.js +6 -20
  80. package/dist/customize/providers/provider-accordion.js +29 -17
  81. package/dist/customize/providers/provider-connect.js +1 -1
  82. package/dist/customize/providers/provider-sheet.d.ts +4 -1
  83. package/dist/customize/providers/provider-sheet.js +15 -5
  84. package/dist/customize/secrets/secrets-page.d.ts +5 -1
  85. package/dist/customize/secrets/secrets-page.js +2 -2
  86. package/dist/customize/sections/gateway-view.d.ts +10 -2
  87. package/dist/customize/sections/gateway-view.js +16 -4
  88. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.d.ts +12 -5
  89. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +131 -8
  90. package/dist/customize/sections/llm-provider/claude-code-step.d.ts +10 -0
  91. package/dist/customize/sections/llm-provider/claude-code-step.js +32 -0
  92. package/dist/customize/sections/llm-provider/models-tab.js +5 -1
  93. package/dist/customize/sections/view/account-secret-resources-panel.d.ts +5 -3
  94. package/dist/customize/sections/view/account-secret-resources-panel.js +122 -19
  95. package/dist/customize/sections/view/agent-editor-access-fields.d.ts +1 -1
  96. package/dist/customize/sections/view/agent-editor-access-fields.js +8 -4
  97. package/dist/customize/sections/view/agent-editor-basics-fields.d.ts +4 -1
  98. package/dist/customize/sections/view/agent-editor-basics-fields.js +33 -4
  99. package/dist/customize/sections/view/agent-editor-catalog.d.ts +2 -2
  100. package/dist/customize/sections/view/agent-editor-catalog.js +10 -12
  101. package/dist/customize/sections/view/agent-editor-primitives.d.ts +1 -1
  102. package/dist/customize/sections/view/agent-editor-primitives.js +4 -4
  103. package/dist/customize/sections/view/agent-editor.d.ts +37 -26
  104. package/dist/customize/sections/view/agent-editor.js +19 -19
  105. package/dist/customize/sections/view/grant-mode-field.d.ts +8 -20
  106. package/dist/customize/sections/view/grant-mode-field.js +31 -57
  107. package/dist/customize/sections/view/permission-editor.d.ts +3 -1
  108. package/dist/customize/sections/view/permission-editor.js +19 -10
  109. package/dist/customize/sections/view/review-view.d.ts +8 -0
  110. package/dist/customize/sections/view/review-view.js +12 -1
  111. package/dist/customize/sections/view/secret-delivery.js +1 -4
  112. package/dist/customize/sections/view/secrets-view.d.ts +7 -1
  113. package/dist/customize/sections/view/secrets-view.js +42 -6
  114. package/dist/customize/settings/rail.js +2 -8
  115. package/dist/customize/settings/settings-tabs.d.ts +2 -2
  116. package/dist/customize/settings/settings-tabs.js +17 -19
  117. package/dist/customize/settings/tabs/experimental-tab.d.ts +3 -0
  118. package/dist/customize/settings/tabs/experimental-tab.js +6 -1
  119. package/dist/customize/settings/tabs/sandbox-tab.d.ts +4 -6
  120. package/dist/customize/settings/tabs/sandbox-tab.js +9 -9
  121. package/dist/customize/shared/access-list.d.ts +39 -0
  122. package/dist/customize/shared/access-list.js +62 -0
  123. package/dist/customize/shared/agent-resource-scope.d.ts +87 -0
  124. package/dist/customize/shared/agent-resource-scope.js +123 -0
  125. package/dist/customize/shared/capability-library.d.ts +41 -0
  126. package/dist/customize/shared/capability-library.js +271 -0
  127. package/dist/customize/shared/capability-page-shell.d.ts +18 -1
  128. package/dist/customize/shared/capability-page-shell.js +21 -1
  129. package/dist/customize/shared/catalog/catalog-space-tabs.d.ts +14 -0
  130. package/dist/customize/shared/catalog/catalog-space-tabs.js +20 -0
  131. package/dist/customize/shared/customize-tab-bar.d.ts +13 -0
  132. package/dist/customize/shared/customize-tab-bar.js +95 -0
  133. package/dist/customize/shared/entity/entity-modal.d.ts +17 -1
  134. package/dist/customize/shared/entity/entity-modal.js +10 -9
  135. package/dist/customize/shared/leave-guard.d.ts +23 -0
  136. package/dist/customize/shared/leave-guard.js +87 -0
  137. package/dist/customize/shared/standalone-settings-nav.js +4 -1
  138. package/dist/customize/shared/tool-rules.d.ts +11 -0
  139. package/dist/customize/shared/tool-rules.js +29 -0
  140. package/dist/customize/skills/builtin-skill-modal.d.ts +6 -0
  141. package/dist/customize/skills/builtin-skill-modal.js +41 -0
  142. package/dist/customize/skills/skills-page.d.ts +21 -18
  143. package/dist/customize/skills/skills-page.js +16 -110
  144. package/dist/customize/triggers/runtime-triggers.d.ts +17 -0
  145. package/dist/customize/triggers/runtime-triggers.js +57 -0
  146. package/dist/customize/triggers/schedule/event-trigger-copy.js +2 -2
  147. package/dist/customize/triggers/schedule/post-to-field.js +2 -2
  148. package/dist/customize/triggers/schedule/schedule-copy.d.ts +11 -6
  149. package/dist/customize/triggers/schedule/schedule-copy.js +29 -8
  150. package/dist/customize/triggers/schedule/schedule-detail-sheet.js +7 -3
  151. package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +26 -1
  152. package/dist/customize/triggers/schedule/trigger-composer-logic.js +64 -3
  153. package/dist/customize/triggers/schedule/trigger-composer.js +57 -20
  154. package/dist/customize/triggers/schedule/trigger-edit-logic.js +18 -5
  155. package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -0
  156. package/dist/customize/triggers/schedule/trigger-filter.js +16 -0
  157. package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -0
  158. package/dist/customize/triggers/schedule/trigger-toast.js +2 -1
  159. package/dist/customize/triggers/schedule/use-trigger-mutations.d.ts +1 -1
  160. package/dist/customize/triggers/schedule/use-trigger-mutations.js +1 -1
  161. package/dist/customize/triggers/schedule/when-app.d.ts +15 -0
  162. package/dist/customize/triggers/schedule/when-app.js +21 -0
  163. package/dist/customize/triggers/schedule/when-change-request.d.ts +10 -0
  164. package/dist/customize/triggers/schedule/when-change-request.js +15 -0
  165. package/dist/customize/triggers/schedule-view.d.ts +17 -3
  166. package/dist/customize/triggers/schedule-view.js +46 -16
  167. package/dist/customize/triggers/triggers-page.d.ts +3 -3
  168. package/dist/customize/triggers/triggers-page.js +2 -2
  169. package/dist/customize/use-configure-thread.d.ts +8 -2
  170. package/dist/customize/use-configure-thread.js +30 -18
  171. package/dist/files/project/components/change-request-detail-dialog.js +2 -3
  172. package/dist/files/project/components/drive-explorer.js +6 -5
  173. package/dist/files/project/explorer-source.d.ts +3 -0
  174. package/dist/files/project/upload-batch.d.ts +3 -3
  175. package/dist/files/project/upload-batch.js +7 -6
  176. package/dist/files/runtime/sandbox-explorer-source.js +3 -3
  177. package/dist/i18n/en.d.ts +1330 -53
  178. package/dist/i18n/en.js +1422 -145
  179. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +16 -7
  180. package/dist/internal/auth/auth-primitives.d.ts +1 -3
  181. package/dist/internal/auth/auth-primitives.js +2 -2
  182. package/dist/internal/billing/session-cost-format.d.ts +1 -0
  183. package/dist/internal/billing/session-cost-format.js +11 -0
  184. package/dist/internal/components/agent-mark.d.ts +12 -1
  185. package/dist/internal/components/agent-mark.js +34 -11
  186. package/dist/internal/components/nav-rail.d.ts +22 -0
  187. package/dist/internal/components/nav-rail.js +16 -0
  188. package/dist/internal/components/repository-disconnected.js +2 -2
  189. package/dist/internal/goals/goal-meta.d.ts +15 -1
  190. package/dist/internal/goals/goal-meta.js +42 -2
  191. package/dist/internal/hooks/projects/use-agent-config.d.ts +11 -7
  192. package/dist/internal/hooks/projects/use-agent-config.js +28 -11
  193. package/dist/internal/hooks/use-slash-focus.d.ts +7 -1
  194. package/dist/internal/hooks/use-slash-focus.js +9 -3
  195. package/dist/internal/layout/project-capability-nav.d.ts +24 -0
  196. package/dist/internal/layout/project-capability-nav.js +86 -0
  197. package/dist/internal/layout/project-page-header.d.ts +1 -1
  198. package/dist/internal/layout/project-page-header.js +1 -1
  199. package/dist/internal/layout/project-settings-nav.d.ts +3 -2
  200. package/dist/internal/layout/project-settings-nav.js +5 -3
  201. package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
  202. package/dist/internal/lib/capability-tab-routes.d.ts +34 -3
  203. package/dist/internal/lib/capability-tab-routes.js +76 -8
  204. package/dist/internal/lib/manifest-health.d.ts +10 -0
  205. package/dist/internal/lib/manifest-health.js +20 -0
  206. package/dist/internal/lib/pixel-mark.d.ts +4 -1
  207. package/dist/internal/lib/pixel-mark.js +33 -6
  208. package/dist/internal/lib/project-actions.d.ts +1 -1
  209. package/dist/internal/lib/project-actions.js +0 -4
  210. package/dist/internal/lib/provider-branding.js +2 -0
  211. package/dist/internal/lib/space-scope.d.ts +29 -0
  212. package/dist/internal/lib/space-scope.js +28 -0
  213. package/dist/internal/lib/use-project-feature-flags.js +3 -3
  214. package/dist/internal/lib/web-notifications.d.ts +74 -8
  215. package/dist/internal/lib/web-notifications.js +243 -117
  216. package/dist/internal/notifications/notification-rows.d.ts +14 -7
  217. package/dist/internal/notifications/notification-rows.js +21 -14
  218. package/dist/internal/notifications/session-toast-cards.d.ts +2 -2
  219. package/dist/internal/reminders/reminder-format.d.ts +6 -2
  220. package/dist/internal/reminders/reminder-format.js +7 -1
  221. package/dist/internal/stores/active-space-store.d.ts +35 -0
  222. package/dist/internal/stores/active-space-store.js +29 -0
  223. package/dist/internal/stores/kortix-computer-store.js +13 -4
  224. package/dist/internal/stores/pinned-agents-store.d.ts +26 -0
  225. package/dist/internal/stores/pinned-agents-store.js +20 -0
  226. package/dist/internal/stores/session-panel-memory-store.js +3 -0
  227. package/dist/internal/stores/turn-attention-store.d.ts +5 -4
  228. package/dist/lib/routes.d.ts +16 -1
  229. package/dist/lib/routes.js +15 -3
  230. package/dist/markdown/doc-editor/doc-embed.d.ts +31 -0
  231. package/dist/markdown/doc-editor/doc-embed.js +168 -0
  232. package/dist/markdown/doc-editor/doc-extensions.d.ts +26 -0
  233. package/dist/markdown/doc-editor/doc-extensions.js +149 -0
  234. package/dist/markdown/doc-editor/doc-menus.d.ts +9 -0
  235. package/dist/markdown/doc-editor/doc-menus.js +56 -0
  236. package/dist/markdown/doc-editor/markdown.d.ts +12 -0
  237. package/dist/markdown/doc-editor/markdown.js +140 -0
  238. package/dist/markdown/genui/components/inline.d.ts +1 -1
  239. package/dist/primitives/badge.d.ts +1 -1
  240. package/dist/primitives/button.d.ts +1 -1
  241. package/dist/primitives/pixel-kortix-mark.d.ts +5 -4
  242. package/dist/primitives/pixel-kortix-mark.js +5 -15
  243. package/dist/primitives/tag.d.ts +1 -1
  244. package/dist/primitives/textarea.js +14 -0
  245. package/dist/primitives/toast.d.ts +2 -0
  246. package/dist/primitives/toast.js +4 -2
  247. package/dist/providers/ui-provider.d.ts +16 -0
  248. package/dist/session/actions/session-label.d.ts +1 -1
  249. package/dist/session/actions/session-label.js +3 -3
  250. package/dist/session/agents/agent-model.d.ts +92 -0
  251. package/dist/session/agents/agent-model.js +123 -0
  252. package/dist/session/agents/agent-state-mark.d.ts +10 -0
  253. package/dist/session/agents/agent-state-mark.js +22 -0
  254. package/dist/session/agents/agent-strip.d.ts +58 -0
  255. package/dist/session/agents/agent-strip.js +259 -0
  256. package/dist/session/agents/held-messages.d.ts +33 -0
  257. package/dist/session/agents/held-messages.js +50 -0
  258. package/dist/session/agents/legacy-subagent-chat.d.ts +11 -0
  259. package/dist/session/agents/legacy-subagent-chat.js +19 -0
  260. package/dist/session/agents/session-peek.d.ts +20 -0
  261. package/dist/session/agents/session-peek.js +67 -0
  262. package/dist/session/agents/session-prompt.d.ts +13 -0
  263. package/dist/session/agents/session-prompt.js +18 -0
  264. package/dist/session/agents/steer-session.d.ts +13 -0
  265. package/dist/session/agents/steer-session.js +29 -0
  266. package/dist/session/agents/subagent-dialog-content.d.ts +11 -0
  267. package/dist/session/agents/subagent-dialog-content.js +115 -0
  268. package/dist/session/agents/subagent-view.d.ts +8 -0
  269. package/dist/session/agents/subagent-view.js +18 -0
  270. package/dist/session/agents/tasks-panel.d.ts +13 -0
  271. package/dist/session/agents/tasks-panel.js +41 -0
  272. package/dist/session/agents/workflow-run-controls.d.ts +43 -0
  273. package/dist/session/agents/workflow-run-controls.js +141 -0
  274. package/dist/session/composer/ComposerCard.d.ts +1 -1
  275. package/dist/session/composer/ComposerCard.js +3 -3
  276. package/dist/session/composer/agent-selector.js +13 -19
  277. package/dist/session/composer/composer-underbar.d.ts +3 -1
  278. package/dist/session/composer/composer-underbar.js +2 -2
  279. package/dist/session/composer/composer.d.ts +5 -0
  280. package/dist/session/composer/composer.js +16 -10
  281. package/dist/session/composer/editor/composer-editor.js +19 -8
  282. package/dist/session/composer/editor/ultracode.d.ts +34 -0
  283. package/dist/session/composer/editor/ultracode.js +127 -0
  284. package/dist/session/composer/send-blockers.d.ts +1 -11
  285. package/dist/session/composer/send-blockers.js +1 -11
  286. package/dist/session/composer/session-composer-readiness.d.ts +1 -28
  287. package/dist/session/composer/session-composer-readiness.js +5 -16
  288. package/dist/session/header/reminder-parts.d.ts +1 -1
  289. package/dist/session/header/session-site-header.js +6 -3
  290. package/dist/session/header/subagent-hover-card.d.ts +0 -2
  291. package/dist/session/header/subagent-hover-card.js +1 -4
  292. package/dist/session/models/claude-connection-slot.d.ts +11 -0
  293. package/dist/session/models/claude-connection-slot.js +30 -0
  294. package/dist/session/models/model-availability.d.ts +3 -1
  295. package/dist/session/models/model-availability.js +3 -0
  296. package/dist/session/models/model-selector.js +11 -12
  297. package/dist/session/models/model-tags.d.ts +9 -0
  298. package/dist/session/models/model-tags.js +8 -0
  299. package/dist/session/panel/easy/easy-panel.js +1 -1
  300. package/dist/session/panel/easy/step-icon.js +5 -1
  301. package/dist/session/panel/mobile-tool-drawer.js +1 -1
  302. package/dist/session/panel/session-action-panel-column.js +1 -1
  303. package/dist/session/panel/session-desktop.js +41 -14
  304. package/dist/session/panel/session-panel-provider.d.ts +1 -1
  305. package/dist/session/panel/session-panel-provider.js +7 -11
  306. package/dist/session/prompts/question-prompt.js +3 -1
  307. package/dist/session/status/session-error-banner.js +4 -1
  308. package/dist/session/thread/session-chat.js +286 -296
  309. package/dist/session/thread/session-context-modal.js +29 -10
  310. package/dist/session/thread/session-context-spawned-sessions.d.ts +13 -0
  311. package/dist/session/thread/session-context-spawned-sessions.js +44 -0
  312. package/dist/session/thread/session-context-sub-sessions.js +3 -8
  313. package/dist/session/thread/transcript.d.ts +3 -0
  314. package/dist/session/thread/transcript.js +32 -8
  315. package/dist/session/tool/shared/full-view-action.d.ts +29 -0
  316. package/dist/session/tool/shared/full-view-action.js +43 -0
  317. package/dist/session/tool/tool-part-renderer.js +10 -2
  318. package/dist/session/tool/tools/agent-message-tool.js +2 -2
  319. package/dist/session/tool/tools/agent-spawn-tool.js +2 -2
  320. package/dist/session/tool/tools/agent-status-tool.js +2 -2
  321. package/dist/session/tool/tools/kortix-action-tool.d.ts +2 -0
  322. package/dist/session/tool/tools/kortix-action-tool.js +148 -0
  323. package/dist/session/tool/tools/kortix-tool-card.d.ts +83 -0
  324. package/dist/session/tool/tools/kortix-tool-card.js +186 -0
  325. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +11 -0
  326. package/dist/session/tool/tools/multi-agent-tool-bodies.js +141 -0
  327. package/dist/session/tool/tools/multi-agent-tool-data.d.ts +63 -0
  328. package/dist/session/tool/tools/multi-agent-tool-data.js +118 -0
  329. package/dist/session/tool/tools/multi-agent-tools.d.ts +9 -0
  330. package/dist/session/tool/tools/multi-agent-tools.js +38 -0
  331. package/dist/session/tool/tools/question-tool.js +1 -1
  332. package/dist/session/tool/tools/register.d.ts +3 -0
  333. package/dist/session/tool/tools/register.js +3 -0
  334. package/dist/session/tool/tools/session-spawn-tool.js +2 -2
  335. package/dist/session/tool/tools/task-tool.d.ts +1 -1
  336. package/dist/session/tool/tools/task-tool.js +29 -41
  337. package/dist/session/tool/tools/workflow-progress.d.ts +34 -0
  338. package/dist/session/tool/tools/workflow-progress.js +186 -0
  339. package/dist/session/tool/tools/workflow-run.d.ts +128 -0
  340. package/dist/session/tool/tools/workflow-run.js +251 -0
  341. package/dist/session/tool/tools/workflow-tool.d.ts +9 -0
  342. package/dist/session/tool/tools/workflow-tool.js +253 -0
  343. package/dist/session/turn/notice-batch-group.d.ts +12 -0
  344. package/dist/session/turn/notice-batch-group.js +17 -0
  345. package/dist/session/turn/peer-message-row.d.ts +14 -0
  346. package/dist/session/turn/peer-message-row.js +57 -0
  347. package/dist/session/turn/subagent-notice-row.d.ts +4 -0
  348. package/dist/session/turn/subagent-notice-row.js +50 -0
  349. package/dist/session/turn/subagent-notice.d.ts +58 -0
  350. package/dist/session/turn/subagent-notice.js +111 -0
  351. package/dist/session/turn/user-message.js +24 -5
  352. package/dist/styles/tokens.css +2 -0
  353. package/dist/styles.css +1 -1
  354. package/dist/terminal/session-terminal-connect-bar.js +1 -1
  355. package/dist/workspace/admin/project-admin-dashboard.d.ts +53 -0
  356. package/dist/workspace/admin/project-admin-dashboard.js +252 -0
  357. package/dist/workspace/admin/project-admin-nav.d.ts +20 -0
  358. package/dist/workspace/admin/project-admin-nav.js +41 -0
  359. package/dist/workspace/home/welcome-body.js +25 -3
  360. package/dist/workspace/index.d.ts +6 -2
  361. package/dist/workspace/index.js +12 -2
  362. package/dist/workspace/layout/new-session-create.js +3 -3
  363. package/dist/workspace/layout/project-home.js +3 -3
  364. package/dist/workspace/memory/memory-labels.js +5 -0
  365. package/dist/workspace/repository-disconnected.js +2 -2
  366. package/dist/workspace/sessions/board-dispatch.d.ts +52 -0
  367. package/dist/workspace/sessions/board-dispatch.js +110 -0
  368. package/dist/workspace/sessions/board-grouping.d.ts +63 -0
  369. package/dist/workspace/sessions/board-grouping.js +141 -0
  370. package/dist/workspace/sessions/board-peek.d.ts +15 -0
  371. package/dist/workspace/sessions/board-peek.js +54 -0
  372. package/dist/workspace/sessions/board-state-mark.d.ts +15 -0
  373. package/dist/workspace/sessions/board-state-mark.js +24 -0
  374. package/dist/workspace/sessions/project-sessions-view.js +42 -31
  375. package/dist/workspace/sessions/sessions-board.d.ts +12 -0
  376. package/dist/workspace/sessions/sessions-board.js +214 -0
  377. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +46 -0
  378. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +85 -0
  379. package/dist/workspace/sidebar/footer/sidebar-alert.js +1 -1
  380. package/dist/workspace/sidebar/new-agent-modal-provider.d.ts +12 -0
  381. package/dist/workspace/sidebar/new-agent-modal-provider.js +19 -0
  382. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  383. package/dist/workspace/sidebar/project-nav-items.js +53 -5
  384. package/dist/workspace/sidebar/project-session-list.js +35 -12
  385. package/dist/workspace/sidebar/project-sidebar.js +6 -3
  386. package/dist/workspace/sidebar/session-filter-menu.js +2 -1
  387. package/dist/workspace/space/space-blocks.d.ts +25 -0
  388. package/dist/workspace/space/space-blocks.js +124 -0
  389. package/dist/workspace/space/space-filter-tabs.d.ts +17 -0
  390. package/dist/workspace/space/space-filter-tabs.js +31 -0
  391. package/dist/workspace/space/space-page.d.ts +24 -0
  392. package/dist/workspace/space/space-page.js +157 -0
  393. package/dist/workspace/space/space-room.d.ts +20 -0
  394. package/dist/workspace/space/space-room.js +27 -0
  395. package/dist/workspace/space/space-tab-menu.d.ts +14 -0
  396. package/dist/workspace/space/space-tab-menu.js +127 -0
  397. package/dist/workspace/space/space-tab-panels.d.ts +9 -0
  398. package/dist/workspace/space/space-tab-panels.js +203 -0
  399. package/dist/workspace/space/space-templates.d.ts +34 -0
  400. package/dist/workspace/space/space-templates.js +71 -0
  401. package/dist/workspace/space/use-space-filter.d.ts +10 -0
  402. package/dist/workspace/space/use-space-filter.js +40 -0
  403. package/dist/workspace/space/use-space-manifest.d.ts +8 -0
  404. package/dist/workspace/space/use-space-manifest.js +27 -0
  405. package/dist/workspace/spaces/space-timeline.js +2 -2
  406. package/package.json +56 -53
  407. package/skills/kortix-ui/SKILL.md +1 -1
  408. package/skills/kortix-ui/references/custom-dashboard.md +10 -4
  409. package/skills/kortix-ui/references/modules.md +10 -8
  410. package/dist/_vendor/shared/meta-agent.d.ts +0 -7
  411. package/dist/customize/agents/agent-grant-pages.d.ts +0 -37
  412. package/dist/customize/agents/agent-grant-pages.js +0 -226
  413. package/dist/customize/agents/agent-triggers-section.d.ts +0 -17
  414. package/dist/customize/agents/agent-triggers-section.js +0 -109
  415. package/dist/customize/migrate-to-v2/index.d.ts +0 -5
  416. package/dist/customize/migrate-to-v2/index.js +0 -5
  417. package/dist/customize/migrate-to-v2/migration-prompt.d.ts +0 -16
  418. package/dist/customize/migrate-to-v2/migration-prompt.js +0 -59
  419. package/dist/customize/migrate-to-v2/upgrade-defs.d.ts +0 -30
  420. package/dist/customize/migrate-to-v2/upgrade-defs.js +0 -43
  421. package/dist/customize/migrate-to-v2/upgrade-view.d.ts +0 -32
  422. package/dist/customize/migrate-to-v2/upgrade-view.js +0 -152
  423. package/dist/customize/migrate-to-v2/use-run-upgrade.d.ts +0 -18
  424. package/dist/customize/migrate-to-v2/use-run-upgrade.js +0 -16
  425. package/dist/customize/shared/capability-tabs.d.ts +0 -3
  426. package/dist/customize/shared/capability-tabs.js +0 -137
  427. package/dist/customize/skills/skill-scope.d.ts +0 -14
  428. package/dist/customize/skills/skill-scope.js +0 -18
  429. package/dist/internal/lib/manifest-version.d.ts +0 -21
  430. package/dist/internal/lib/manifest-version.js +0 -55
  431. package/dist/session/composer/hooks/use-composer-escape-stop.d.ts +0 -6
  432. package/dist/session/composer/hooks/use-composer-escape-stop.js +0 -28
  433. package/dist/session/thread/sub-session-modal-content.d.ts +0 -8
  434. package/dist/session/thread/sub-session-modal-content.js +0 -23
  435. package/dist/session/thread/sub-session-modal.d.ts +0 -2
  436. package/dist/session/thread/sub-session-modal.js +0 -14
  437. package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.d.ts +0 -13
  438. package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.js +0 -48
@@ -34,6 +34,8 @@ import { Switch } from '../../primitives/switch.js';
34
34
  import { Copy } from '../../icons/copy.js';
35
35
  import { InputGroup, InputGroupInput } from '../../primitives/input-group.js';
36
36
  import Loading from '../../primitives/loading.js';
37
+ import { ClaudeCodeStep } from '../sections/llm-provider/claude-code-step.js';
38
+ export { ClaudeCodeStep };
37
39
  import { SplitSheetBody, SplitSheetDescription, SplitSheetFooter, SplitSheetHeader, SplitSheetTitle, } from '../../primitives/split-sheet.js';
38
40
  import { errorToast, successToast } from '../../primitives/toast.js';
39
41
  import { ProviderLogoStatus, connectedVia, providerMethod, supportsPooledProviderKey, useManagedProvider, usePooledProviderIds, useProviderMeta, } from './provider-connect.js';
@@ -50,6 +52,8 @@ import { useMutation, useQueryClient } from '@tanstack/react-query';
50
52
  /** The subscription each two-way provider signs in with, and how it is named. */
51
53
  export const SUBSCRIPTION_BY_PROVIDER = {
52
54
  openai: { kind: 'chatgpt', name: 'ChatGPT', plan: 'ChatGPT Plus or Pro' },
55
+ // Claude models run through Claude Code on the member's own plan; the login is the member's own.
56
+ anthropic: { kind: 'claude', name: 'Claude', plan: 'Claude Pro or Max' },
53
57
  'opencode-go': { kind: 'opencode-go', name: 'OpenCode', plan: 'OpenCode Go' },
54
58
  };
55
59
  /** Stable DOM id shared by a credential input and its label. */
@@ -107,7 +111,7 @@ export function SavedKey({ envVars, onReplace, }) {
107
111
  /** Two ways in: a subscription sign-in or an API key. */
108
112
  export function ConnectChoice({ name, plan, providerLabel, onSignIn, onUseKey, }) {
109
113
  const t = useTranslations('providerSheet');
110
- return (_jsxs("div", { className: "space-y-3", "data-provider-connect-choice": "", children: [_jsxs("div", { className: "border-border space-y-3 rounded-lg border p-4", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Badge, { variant: "info", size: "sm", children: t('fewerSteps') }), _jsx("p", { className: "text-foreground text-sm font-medium", children: t('signInTitle', { name }) }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: t('signInBody', { plan }) })] }), _jsx(Button, { type: "button", size: "sm", className: "w-full", onClick: onSignIn, children: t('signInAction', { name }) })] }), _jsxs("div", { className: "border-border space-y-3 rounded-lg border p-4", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Badge, { variant: "muted", size: "sm", children: t('payPerUse') }), _jsx("p", { className: "text-foreground text-sm font-medium", children: t('keyOptionTitle') }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: t('keyOptionBody', { name: providerLabel }) })] }), _jsx(Button, { type: "button", size: "sm", variant: "secondary", className: "w-full", onClick: onUseKey, children: t('keyOptionAction') })] }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: t('bothHint') })] }));
114
+ return (_jsxs("div", { className: "space-y-3", "data-provider-connect-choice": "", children: [_jsxs("div", { className: "border-border space-y-3 rounded-lg border p-4", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Badge, { variant: "info", size: "sm", children: t('fewerSteps') }), _jsx("p", { className: "text-foreground text-sm font-medium", children: t('signInTitle', { name }) }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: t('signInBody', { plan }) })] }), _jsx(Button, { type: "button", size: "sm", className: "w-full", onClick: onSignIn, children: t('signInAction', { name }) })] }), onUseKey ? _jsxs("div", { className: "border-border space-y-3 rounded-lg border p-4", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Badge, { variant: "muted", size: "sm", children: t('payPerUse') }), _jsx("p", { className: "text-foreground text-sm font-medium", children: t('keyOptionTitle') }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: t('keyOptionBody', { name: providerLabel }) })] }), _jsx(Button, { type: "button", size: "sm", variant: "secondary", className: "w-full", onClick: onUseKey, children: t('keyOptionAction') })] }) : null, onUseKey ? _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: t('bothHint') }) : null] }));
111
115
  }
112
116
  function hostOf(url) {
113
117
  try {
@@ -226,17 +230,19 @@ function SubscriptionBody({ projectId, entry, connected: keyConnected, canWrite,
226
230
  const [confirmDisconnect, setConfirmDisconnect] = useState(false);
227
231
  const waiting = sign.phase === 'waiting';
228
232
  const anyConnected = sign.connected || keyConnected;
233
+ // A Claude login is the member's own: any member signs in. A shared login or a key needs write access.
234
+ const canSignIn = canWrite || sign.pastesCode;
229
235
  const copyCode = () => {
230
236
  if (!sign.challenge?.code)
231
237
  return;
232
238
  void navigator.clipboard?.writeText(sign.challenge.code).then(() => successToast(t('codeCopied')));
233
239
  };
234
240
  let body;
235
- if (!canWrite) {
241
+ if (!canSignIn) {
236
242
  body = anyConnected ? null : _jsx("p", { className: "text-muted-foreground text-sm", children: t('readOnly') });
237
243
  }
238
244
  else if (waiting) {
239
- body = (_jsx(DeviceCode, { name: sub.name, code: sign.challenge?.code ?? null, url: sign.challenge?.url ?? null, onCopy: copyCode }));
245
+ body = sign.pastesCode ? (_jsx(ClaudeCodeStep, { url: sign.challenge?.url ?? null, checking: sign.checking, onSubmit: (code) => void sign.submitCode(code) })) : (_jsx(DeviceCode, { name: sub.name, code: sign.challenge?.code ?? null, url: sign.challenge?.url ?? null, onCopy: copyCode }));
240
246
  }
241
247
  else if (addingKey) {
242
248
  body = (_jsx(ProviderKeyForm, { entry: entry, values: key.values, onValueChange: key.setValue, saving: key.saving, error: key.error, onCancel: () => {
@@ -245,9 +251,9 @@ function SubscriptionBody({ projectId, entry, connected: keyConnected, canWrite,
245
251
  }, onSave: () => void key.save()?.then((ok) => ok && setAddingKey(false)) }));
246
252
  }
247
253
  else if (!anyConnected) {
248
- body = (_jsx(ConnectChoice, { name: sub.name, plan: sub.plan, providerLabel: entry.label, onSignIn: () => void sign.start(), onUseKey: () => setAddingKey(true) }));
254
+ body = (_jsx(ConnectChoice, { name: sub.name, plan: sub.plan, providerLabel: entry.label, onSignIn: () => void sign.start(), onUseKey: canWrite ? () => setAddingKey(true) : undefined }));
249
255
  }
250
- const connections = anyConnected && !waiting && !addingKey && (_jsxs(Section, { title: t('connections'), children: [_jsxs("ul", { className: "border-border divide-border divide-y rounded-lg border", children: [sign.connected ? (_jsx(ConnectionRow, { title: t('subscription', { plan: sub.plan }), detail: t('signedIn'), action: canWrite ? (_jsx(Button, { type: "button", size: "sm", variant: "ghost", disabled: sign.disconnect.isPending, onClick: () => setConfirmDisconnect(true), children: t('disconnect') })) : null })) : null, keyConnected ? (_jsx(ConnectionRow, { title: t('apiKey'), detail: t('savedKey'), action: canWrite ? (_jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Button, { type: "button", size: "sm", variant: "ghost", onClick: () => setAddingKey(true), children: t('replace') }), _jsx(Button, { type: "button", size: "sm", variant: "ghost", className: "text-destructive hover:text-destructive", onClick: () => setConfirmRemove(true), children: t('removeKey') })] })) : null })) : null] }), canWrite && !(sign.connected && keyConnected) ? (_jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: () => (sign.connected ? setAddingKey(true) : void sign.start()), children: sign.connected ? t('addKey') : t('signInTitle', { name: sub.name }) })) : null] }));
256
+ const connections = anyConnected && !waiting && !addingKey && (_jsxs(Section, { title: t('connections'), children: [_jsxs("ul", { className: "border-border divide-border divide-y rounded-lg border", children: [sign.connected ? (_jsx(ConnectionRow, { title: t('subscription', { plan: sub.plan }), detail: t('signedIn'), action: canSignIn ? (_jsx(Button, { type: "button", size: "sm", variant: "ghost", disabled: sign.disconnect.isPending, onClick: () => setConfirmDisconnect(true), children: t('disconnect') })) : null })) : null, keyConnected ? (_jsx(ConnectionRow, { title: t('apiKey'), detail: t('savedKey'), action: canWrite ? (_jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Button, { type: "button", size: "sm", variant: "ghost", onClick: () => setAddingKey(true), children: t('replace') }), _jsx(Button, { type: "button", size: "sm", variant: "ghost", className: "text-destructive hover:text-destructive", onClick: () => setConfirmRemove(true), children: t('removeKey') })] })) : null })) : null] }), (sign.connected ? canWrite && !keyConnected : canSignIn) ? (_jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: () => (sign.connected ? setAddingKey(true) : void sign.start()), children: sign.connected ? t('addKey') : t('signInTitle', { name: sub.name }) })) : null] }));
251
257
  return (_jsxs(_Fragment, { children: [_jsxs(SplitSheetBody, { className: "space-y-7", children: [sign.error ? (_jsx("p", { role: "alert", className: "text-destructive text-xs text-pretty", children: sign.error })) : null, body, connections, !waiting ? models : null] }), _jsx(SplitSheetFooter, { className: "justify-between", children: waiting ? (_jsx(Button, { type: "button", size: "sm", variant: "ghost", className: "-ml-2", onClick: sign.cancel, children: t('cancel') })) : (_jsx("span", { className: "text-muted-foreground text-xs", children: t('sharedNote') })) }), _jsx(RemoveKeyDialog, { open: confirmRemove, onOpenChange: setConfirmRemove, entry: entry, pending: key.removing, onConfirm: () => void key.remove()?.then((ok) => ok && setConfirmRemove(false)) }), _jsx(AlertDialog, { open: confirmDisconnect, onOpenChange: setConfirmDisconnect, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: t('disconnectTitle', { plan: sub.plan }) }), _jsx(AlertDialogDescription, { children: t('disconnectBody') })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: t('cancel') }), _jsx(AlertDialogAction, { variant: "destructive", disabled: sign.disconnect.isPending, onClick: () => sign.disconnect.mutate(), children: t('disconnect') })] })] }) })] }));
252
258
  }
253
259
  /** The sheet's header and body for one provider. Render inside `SplitSheetContent`. */
@@ -285,6 +291,10 @@ export function ProviderSheet({ projectId, providerId, canWrite, enabled = true,
285
291
  else if (pooled.pooledSecretsEnabled && pooled.accountId && entry.id === 'openai') {
286
292
  content = (_jsxs(SplitSheetBody, { className: "space-y-7", children: [_jsxs("div", { className: "space-y-3", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: tPooled('chatGptAccounts') }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: tPooled('oauthPrivateDescription') }), _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: "codex", providerName: "ChatGPT Plus/Pro", envVar: "CODEX_AUTH_JSON", canWrite: true, oauth: { projectId, onConnected: () => undefined } }), _jsx(ChatGptSubscriptionConnect, { projectId: projectId, onConnected: () => undefined, legacyOnly: true })] }), models] }));
287
293
  }
294
+ else if (pooled.pooledSecretsEnabled && pooled.accountId && entry.id === 'anthropic') {
295
+ // Claude accounts, exactly as OpenAI lists ChatGPT accounts; Anthropic API keys below them.
296
+ content = (_jsxs(SplitSheetBody, { className: "space-y-7", children: [_jsxs("div", { className: "space-y-3", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: tPooled('claudeAccounts') }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: tPooled('claudeOauthPrivateDescription') }), _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: "claude-agent", providerName: "Claude Pro/Max", envVar: "CLAUDE_CODE_OAUTH_TOKEN", canWrite: true, oauth: { projectId, onConnected: () => undefined, kind: 'claude' } })] }), _jsxs("div", { className: "space-y-3", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: tPooled('providerKeysFor', { provider: entry.label }) }), _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: entry.id, providerName: entry.label, envVar: entry.envVars[0], canWrite: true })] }), models] }));
297
+ }
288
298
  else if (pooled.pooledSecretsEnabled && pooled.accountId && supportsPooledProviderKey(entry)) {
289
299
  content = (_jsxs(SplitSheetBody, { className: "space-y-7", children: [_jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: entry.id, providerName: entry.label, envVar: entry.envVars[0], canWrite: true }), models] }));
290
300
  }
@@ -1,3 +1,4 @@
1
+ import type { AgentGrant, ResourceScope } from '../shared/agent-resource-scope.js';
1
2
  /**
2
3
  * The page body for /projects/[id]/secrets — Secrets graduated out of the
3
4
  * project Settings sub-nav into its own top-level Customize tab. It is the
@@ -24,6 +25,9 @@
24
25
  * four beside it — the same wrapper `triggers-page.tsx` shed for the same
25
26
  * reason.
26
27
  */
27
- export declare function SecretsPage({ projectId }: {
28
+ export declare function SecretsPage({ projectId, surface, grant, }: {
28
29
  projectId: string;
30
+ /** `agent` renders the same screen for one agent's page (`agent-page.tsx`). */
31
+ surface?: ResourceScope;
32
+ grant?: AgentGrant;
29
33
  }): import("react").JSX.Element;
@@ -29,7 +29,7 @@ import { SettingsNavProvider } from '../../internal/layout/settings-nav-context.
29
29
  * four beside it — the same wrapper `triggers-page.tsx` shed for the same
30
30
  * reason.
31
31
  */
32
- export function SecretsPage({ projectId }) {
32
+ export function SecretsPage({ projectId, surface, grant, }) {
33
33
  const settingsNav = useStandaloneCapabilityNav(projectId, 'secrets');
34
- return (_jsx(SettingsNavProvider, { value: settingsNav, children: _jsx(SecretsView, { projectId: projectId }) }));
34
+ return (_jsx(SettingsNavProvider, { value: settingsNav, children: _jsx(SecretsView, { projectId: projectId, surface: surface, grant: grant }) }));
35
35
  }
@@ -67,11 +67,13 @@
67
67
  * double-indents the page.
68
68
  */
69
69
  import { type ReactNode } from 'react';
70
+ import type { ResourceScope } from '../shared/agent-resource-scope.js';
70
71
  export declare const MODELS_PAGE_TITLE = "Models";
71
72
  export declare const MODELS_PAGE_DESCRIPTION = "Choose the providers and models this project can use.";
72
73
  type LlmTab = 'providers' | 'models' | 'custom' | 'gateway' | 'routing' | 'overview' | 'logs';
73
74
  interface LlmTabEntry {
74
- id: LlmTab;
75
+ /** `agent` exists only on the agent variant (`AGENT_LLM_TABS`). */
76
+ id: LlmTab | 'agent';
75
77
  label: string;
76
78
  }
77
79
  export declare const LLM_TABS: LlmTabEntry[];
@@ -155,8 +157,14 @@ export declare function LlmSections({ projectId, tab, onTabChange, canWrite, ena
155
157
  * rows that open in place (Paper PM01 + AK01) — no room for a second column. */
156
158
  providersVariant?: 'split' | 'accordion';
157
159
  }): import("react").JSX.Element;
158
- export declare function LlmManagementView({ projectId }: {
160
+ export declare function LlmManagementView({ projectId, surface, agentSettings, }: {
159
161
  projectId: string;
162
+ /** `agent` is the same page on one agent's editor: a leading "This agent"
163
+ * tab holds the agent's own model, and the project default picker steps
164
+ * aside — the project default is the global variant's control. */
165
+ surface?: ResourceScope;
166
+ /** The agent's model settings, rendered as the "This agent" tab. */
167
+ agentSettings?: ReactNode;
160
168
  }): import("react").JSX.Element;
161
169
  /**
162
170
  * The provider list beside the provider it opened — the page and the quick
@@ -79,6 +79,7 @@ import { ProviderConnect } from '../providers/provider-connect.js';
79
79
  import { ProviderSheet } from '../providers/provider-sheet.js';
80
80
  import { ModelsPageSheetContext, } from './models-page-sheet.js';
81
81
  import { cn } from '../../internal/lib/utils.js';
82
+ import { FadedScrollArea } from '../../primitives/faded-scroll-area.js';
82
83
  import { ModelSelector } from '../../session/models/model-selector.js';
83
84
  import { CapabilityPageShell } from '../shared/capability-page-shell.js';
84
85
  import { GatewayAccessTab } from './gateway-access-tab.js';
@@ -201,9 +202,14 @@ export function LlmSections({ projectId, tab, onTabChange, canWrite, enabled, se
201
202
  carries the padding. */
202
203
  _jsx(ProviderConnect, { projectId: projectId, canWrite: canWrite, enabled: enabled, selectedId: selectedProviderId, onSelect: onSelectProvider })), tab === 'models' && _jsx(ModelsTab, { projectId: projectId, canWrite: canWrite }), tab === 'custom' && _jsx(CustomProviderPanel, { projectId: projectId, canWrite: canWrite }), tab === 'gateway' && (_jsx(GatewayAccessTab, { projectId: projectId, canWrite: canWrite, onViewModels: () => onTabChange('models') })), tab === 'routing' && (_jsx(GatewayRouting, { projectId: projectId, canWrite: canWrite, projectDefaultPending: modelDefaults.isUpdating })), tab === 'overview' && _jsx(GatewayOverview, { projectId: projectId, canWrite: canWrite }), tab === 'logs' && _jsx(GatewayLogs, { projectId: projectId })] }));
203
204
  }
204
- export function LlmManagementView({ projectId }) {
205
+ /** The agent variant's own tab, ahead of the seven project tabs. */
206
+ const AGENT_TAB = 'agent';
207
+ export function LlmManagementView({ projectId, surface = { kind: 'global' }, agentSettings, }) {
205
208
  const { isOpen: open, activeTab: section } = useSettingsNav();
206
- const [tab, setTab] = useState(() => TAB_BY_SECTION[section] ?? 'providers');
209
+ const agentScoped = surface.kind === 'agent' && agentSettings !== undefined;
210
+ const tAgentScope = useTranslations('agentScope');
211
+ const agentTabs = useMemo(() => [{ id: AGENT_TAB, label: tAgentScope('thisAgent') }, ...LLM_TABS], [tAgentScope]);
212
+ const [tab, setTab] = useState(() => TAB_BY_SECTION[section] ?? (agentScoped ? AGENT_TAB : 'providers'));
207
213
  // A role with the LLM section's READ leaf (project.read) but not
208
214
  // project.write sees the gateway read-only: logs/overview/spend stay
209
215
  // visible, but the project-default model picker is hidden so a read-only
@@ -217,10 +223,16 @@ export function LlmManagementView({ projectId }) {
217
223
  setTab(next);
218
224
  }, [section]);
219
225
  const [providerId, setProviderId] = useState(null);
220
- return (_jsx(ProviderSheetSplit, { projectId: projectId, providerId: tab === 'providers' ? providerId : null, onProviderChange: setProviderId, canWrite: canWrite, children: _jsx(CapabilityPageShell, { title: MODELS_PAGE_TITLE, description: MODELS_PAGE_DESCRIPTION, filters:
226
+ return (_jsx(ProviderSheetSplit, { projectId: projectId, providerId: tab === 'providers' ? providerId : null, onProviderChange: setProviderId, canWrite: canWrite, children: _jsx(CapabilityPageShell, { title: MODELS_PAGE_TITLE, description:
227
+ // Only "This agent" is the agent's own; every other tab edits state
228
+ // that all of the project's agents share, and the line says so.
229
+ agentScoped ? tAgentScope('modelsDescription') : MODELS_PAGE_DESCRIPTION, filters:
221
230
  /* The tab strip on the left, the project default on the right of the
222
231
  same row. */
223
- _jsxs(_Fragment, { children: [_jsx(LlmTabStrip, { value: tab, onValueChange: (v) => setTab(v) }), canWrite ? _jsx(ProjectDefaultPicker, { projectId: projectId }) : null] }), children: _jsx(LlmSections, { projectId: projectId, tab: tab, onTabChange: setTab, canWrite: canWrite, enabled: open, selectedProviderId: providerId, onSelectProvider: setProviderId }) }) }));
232
+ _jsxs(_Fragment, { children: [agentScoped ? (
233
+ // Eight tabs in the editor's pane, beside the rail: the strip
234
+ // scrolls rather than push the row wider than the column.
235
+ _jsx(FadedScrollArea, { orientation: "horizontal", fadeColor: "from-background", className: "min-w-0 max-w-full", children: _jsx(LlmTabStrip, { value: tab, onValueChange: (v) => setTab(v), tabs: agentTabs }) })) : (_jsx(LlmTabStrip, { value: tab, onValueChange: (v) => setTab(v), tabs: LLM_TABS })), canWrite && !agentScoped ? _jsx(ProjectDefaultPicker, { projectId: projectId }) : null] }), children: tab === AGENT_TAB ? (agentSettings) : (_jsx(LlmSections, { projectId: projectId, tab: tab, onTabChange: setTab, canWrite: canWrite, enabled: open, selectedProviderId: providerId, onSelectProvider: setProviderId })) }) }));
224
236
  }
225
237
  /**
226
238
  * The provider list beside the provider it opened — the page and the quick
@@ -3,9 +3,14 @@ import type { ChatGptChallenge, ChatGptPhase } from './types.js';
3
3
  /**
4
4
  * A subscription sign-in card. `chatgpt` is the ChatGPT Plus/Pro login (Codex
5
5
  * device grant); `opencode-go` is an OpenCode Console account login for
6
- * OpenCode Go. Same flow, same card; only the provider and the copy differ.
6
+ * OpenCode Go; `claude` is the member's own Claude Pro or Max login for Claude
7
+ * models run through Claude Code (`claude setup-token` on the server: the
8
+ * member approves on claude.com and pastes the code back, `submitCode`).
9
+ * Same flow, same card; only the provider, the copy and that last step differ.
7
10
  */
8
- export type SubscriptionKind = 'chatgpt' | 'opencode-go';
11
+ export type SubscriptionKind = 'chatgpt' | 'opencode-go' | 'claude';
12
+ /** Whether the caller can use a Claude account in the project (`GET /projects/:id/claude-subscription`). */
13
+ export declare const claudeSubscriptionKey: (projectId: string) => readonly ["claude-subscription", string];
9
14
  /**
10
15
  * The sign-in state machine behind every subscription surface: the card below
11
16
  * and the provider sheet (`packages/ui/src/customize/providers/provider-sheet.tsx`). One copy,
@@ -53,9 +58,11 @@ export declare function useSubscriptionSignIn({ projectId, onConnected, kind, }:
53
58
  connected: boolean;
54
59
  start: () => Promise<void>;
55
60
  cancel: () => void;
56
- disconnect: import("@tanstack/react-query").UseMutationResult<{
57
- ok: boolean;
58
- }, Error, void, unknown>;
61
+ disconnect: import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
62
+ /** Claude only: the member pastes the code claude.com shows (`submitCode`) instead of typing one into the provider. */
63
+ pastesCode: boolean;
64
+ submitCode: (code: string) => Promise<void>;
65
+ checking: boolean;
59
66
  };
60
67
  export declare function ChatGptSubscriptionConnect({ projectId, onConnected, accessSlot, legacyOnly, kind, }: {
61
68
  projectId: string;
@@ -6,11 +6,12 @@ import { InfoBanner } from '../../../primitives/info-banner.js';
6
6
  import Loading from '../../../primitives/loading.js';
7
7
  import { errorToast, successToast } from '../../../primitives/toast.js';
8
8
  import { ProviderLogo } from '../../../internal/lib/provider-branding.js';
9
- import { deleteProjectProviderOAuth, listProjectProviderOAuth, listProjectSecrets, pollProjectProviderOAuth, startProjectProviderOAuth, } from '@kortix/sdk';
9
+ import { completeClaudeSubscriptionLogin, deleteAccountSecretResource, deleteProjectProviderOAuth, getClaudeSubscription, getProjectDetail, listAccountSecretResources, listProjectProviderOAuth, listProjectSecrets, pollProjectProviderOAuth, startClaudeSubscriptionLogin, startProjectProviderOAuth, } from '@kortix/sdk';
10
10
  import { contract, qk, refreshProjectProviderState } from '@kortix/sdk/react';
11
11
  import { CheckCircleIcon as CheckCircle2, WarningIcon as TriangleAlert, } from '@phosphor-icons/react';
12
12
  import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
13
13
  import { useTranslations } from '../../../i18n/index.js';
14
+ import { useUiViewer } from '../../../providers/ui-provider.js';
14
15
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15
16
  import { forgetSubscriptionCredentials, subscriptionIsConnected, subscriptionPrimaryAction, } from './subscription-control.js';
16
17
  import { sleep } from './utils.js';
@@ -19,7 +20,10 @@ import { runDeviceGrant } from './device-grant.js';
19
20
  const SUBSCRIPTIONS = {
20
21
  chatgpt: { oauth: 'openai', providerId: 'codex', logo: 'openai', logoName: 'OpenAI' },
21
22
  'opencode-go': { oauth: 'opencode-go', providerId: 'opencode-go', logo: 'opencode-go', logoName: 'OpenCode Go' },
23
+ claude: { oauth: 'claude', providerId: 'claude-agent', logo: 'anthropic', logoName: 'Anthropic' },
22
24
  };
25
+ /** Whether the caller can use a Claude account in the project (`GET /projects/:id/claude-subscription`). */
26
+ export const claudeSubscriptionKey = (projectId) => ['claude-subscription', projectId];
23
27
  const providerLoginsKey = (projectId) => ['project-provider-oauth', projectId];
24
28
  /**
25
29
  * The sign-in state machine behind every subscription surface: the card below
@@ -30,9 +34,24 @@ export function useSubscriptionSignIn({ projectId, onConnected, kind = 'chatgpt'
30
34
  const tHardcodedUi = useTranslations('hardcodedUi');
31
35
  const tPooled = useTranslations('pooledSecrets');
32
36
  const queryClient = useQueryClient();
37
+ const viewer = useUiViewer();
33
38
  const subscription = SUBSCRIPTIONS[kind];
34
39
  const chatgpt = kind === 'chatgpt';
35
- const copy = chatgpt ? {
40
+ const claude = kind === 'claude';
41
+ const tClaude = useTranslations('claudeSubscription');
42
+ const copy = claude ? {
43
+ title: tClaude('title'),
44
+ description: tClaude('description'),
45
+ connectedBanner: tClaude('connectedTitle'),
46
+ connectedToast: tClaude('connected'),
47
+ disconnectedToast: tClaude('disconnected'),
48
+ connect: tClaude('connectClaude'),
49
+ reconnect: tClaude('reconnectClaude'),
50
+ disconnect: tClaude('disconnect'),
51
+ connecting: tClaude('starting'),
52
+ deviceDescription: undefined,
53
+ failed: tClaude('startError'),
54
+ } : chatgpt ? {
36
55
  title: tHardcodedUi.raw('autoComponentsProjectsProjectProviderModalJsxTextChatGPTPlusPro0deb5530'),
37
56
  description: tHardcodedUi.raw('autoComponentsProjectsProjectProviderModalJsxTextSignInWitha0c5128c'),
38
57
  connectedBanner: tHardcodedUi.raw('autoComponentsProjectsProjectProviderModalJsxTextChatGPTSubscriptionConnectedcf12bc87'),
@@ -60,6 +79,9 @@ export function useSubscriptionSignIn({ projectId, onConnected, kind = 'chatgpt'
60
79
  const [phase, setPhase] = useState('idle');
61
80
  const [error, setError] = useState(null);
62
81
  const [challenge, setChallenge] = useState(null);
82
+ /** Claude: the sign-in the pasted code completes, and whether it is being checked. */
83
+ const [claudeFlow, setClaudeFlow] = useState(null);
84
+ const [checking, setChecking] = useState(false);
63
85
  const cancelledRef = useRef(false);
64
86
  useEffect(() => {
65
87
  return () => {
@@ -69,10 +91,71 @@ export function useSubscriptionSignIn({ projectId, onConnected, kind = 'chatgpt'
69
91
  const reset = useCallback(() => {
70
92
  cancelledRef.current = true;
71
93
  setChallenge(null);
94
+ setClaudeFlow(null);
95
+ setChecking(false);
72
96
  setError(null);
73
97
  setPhase('idle');
74
98
  }, []);
99
+ const claudeConnected = useCallback(async () => {
100
+ setPhase('done');
101
+ setChallenge(null);
102
+ setClaudeFlow(null);
103
+ successToast(copy.connectedToast);
104
+ await queryClient.invalidateQueries({ queryKey: claudeSubscriptionKey(projectId) });
105
+ void queryClient.invalidateQueries({ queryKey: ['account-secret-resources'] });
106
+ refreshProjectProviderState(queryClient, projectId);
107
+ onConnected(subscription.providerId);
108
+ }, [copy.connectedToast, onConnected, projectId, queryClient, subscription.providerId]);
109
+ /** Claude: start `claude setup-token` and open claude.com. The tab opens inside the click, so a popup blocker lets it through. */
110
+ const startClaude = useCallback(async () => {
111
+ cancelledRef.current = false;
112
+ setError(null);
113
+ setChallenge(null);
114
+ setPhase('waiting');
115
+ const popup = typeof window === 'undefined' ? null : window.open('about:blank', '_blank');
116
+ try {
117
+ const started = await startClaudeSubscriptionLogin(projectId);
118
+ if (cancelledRef.current) {
119
+ popup?.close();
120
+ return;
121
+ }
122
+ setClaudeFlow(started.flow_id);
123
+ setChallenge({ url: started.authorize_url, code: null });
124
+ if (popup && !popup.closed)
125
+ popup.location.href = started.authorize_url;
126
+ }
127
+ catch (err) {
128
+ popup?.close();
129
+ setPhase('idle');
130
+ setError(err instanceof Error && err.message ? err.message : copy.failed);
131
+ }
132
+ }, [copy.failed, projectId]);
133
+ /** Claude: hand the code claude.com showed to the sign-in. A refused code ends it: the next try signs in again. */
134
+ const submitCode = useCallback(async (code) => {
135
+ if (!claudeFlow || !code.trim())
136
+ return;
137
+ setChecking(true);
138
+ setError(null);
139
+ try {
140
+ await completeClaudeSubscriptionLogin(projectId, { flowId: claudeFlow, code: code.trim() });
141
+ if (!cancelledRef.current)
142
+ await claudeConnected();
143
+ }
144
+ catch (err) {
145
+ if (cancelledRef.current)
146
+ return;
147
+ setPhase('idle');
148
+ setChallenge(null);
149
+ setClaudeFlow(null);
150
+ setError(err instanceof Error && err.message ? err.message : tClaude('codeError'));
151
+ }
152
+ finally {
153
+ setChecking(false);
154
+ }
155
+ }, [claudeConnected, claudeFlow, projectId, tClaude]);
75
156
  const handleConnect = useCallback(async () => {
157
+ if (claude)
158
+ return startClaude();
76
159
  cancelledRef.current = false;
77
160
  setError(null);
78
161
  setChallenge(null);
@@ -96,7 +179,7 @@ export function useSubscriptionSignIn({ projectId, onConnected, kind = 'chatgpt'
96
179
  onConnected(subscription.providerId);
97
180
  },
98
181
  });
99
- }, [projectId, queryClient, onConnected, subscription, copy.connectedToast, copy.failed]);
182
+ }, [claude, startClaude, projectId, queryClient, onConnected, subscription, copy.connectedToast, copy.failed]);
100
183
  // What the PROJECT holds, not what this component remembers doing. A
101
184
  // credential connected in another tab, another surface, or before this page
102
185
  // load is still connected — and until this read existed the card offered
@@ -105,6 +188,13 @@ export function useSubscriptionSignIn({ projectId, onConnected, kind = 'chatgpt'
105
188
  queryKey: qk.project.secrets(projectId),
106
189
  queryFn: () => listProjectSecrets(projectId),
107
190
  ...contract('config'),
191
+ enabled: !claude,
192
+ });
193
+ // A Claude account is an account secret resource: own or shared, the server counts the usable ones.
194
+ const claudeQuery = useQuery({
195
+ queryKey: claudeSubscriptionKey(projectId),
196
+ queryFn: () => getClaudeSubscription(projectId),
197
+ enabled: claude,
108
198
  });
109
199
  // An OpenCode key secret can hold a plain API key, so a secret name does not
110
200
  // say "signed in"; the login list does.
@@ -112,25 +202,44 @@ export function useSubscriptionSignIn({ projectId, onConnected, kind = 'chatgpt'
112
202
  queryKey: providerLoginsKey(projectId),
113
203
  queryFn: () => listProjectProviderOAuth(projectId),
114
204
  ...contract('config'),
115
- enabled: !chatgpt,
205
+ enabled: !chatgpt && !claude,
116
206
  });
117
207
  const connected = useMemo(() => {
208
+ if (claude)
209
+ return claudeQuery.data?.connected === true;
118
210
  if (!chatgpt)
119
211
  return (loginsQuery.data ?? []).some((login) => login.provider_id === subscription.oauth);
120
212
  const data = secretsQuery.data;
121
213
  const items = Array.isArray(data) ? data : (data?.items ?? []);
122
214
  return subscriptionIsConnected(items.map((item) => item.name));
123
- }, [chatgpt, loginsQuery.data, secretsQuery.data, subscription.oauth]);
215
+ }, [chatgpt, claude, claudeQuery.data, loginsQuery.data, secretsQuery.data, subscription.oauth]);
124
216
  const disconnect = useMutation({
125
217
  // The server route was always correct and always unreachable: it deletes
126
218
  // the credential, audits it, and refreshes the model catalog. Nothing in
127
219
  // the product called it.
128
- mutationFn: () => deleteProjectProviderOAuth(projectId, subscription.oauth),
220
+ mutationFn: async () => {
221
+ if (claude) {
222
+ // The caller's own Claude accounts in this project; one shared by someone else stays theirs to remove.
223
+ const accountId = (await getProjectDetail(projectId)).project?.account_id;
224
+ if (!accountId)
225
+ throw new Error(tClaude('startError'));
226
+ const { secrets } = await listAccountSecretResources(accountId, projectId);
227
+ for (const secret of secrets.filter((item) => item.provider_id === subscription.providerId && item.created_by === viewer?.id)) {
228
+ await deleteAccountSecretResource(accountId, secret.secret_id);
229
+ }
230
+ }
231
+ else
232
+ await deleteProjectProviderOAuth(projectId, subscription.oauth);
233
+ },
129
234
  // Returning the promise keeps the button in its pending state until the
130
235
  // cache says "disconnected", so the card never shows a live Disconnect
131
236
  // button over a credential the server already removed.
132
237
  onSuccess: async () => {
133
- if (chatgpt)
238
+ if (claude) {
239
+ await queryClient.invalidateQueries({ queryKey: claudeSubscriptionKey(projectId) });
240
+ void queryClient.invalidateQueries({ queryKey: ['account-secret-resources'] });
241
+ }
242
+ else if (chatgpt)
134
243
  await forgetSubscriptionCredentials(queryClient, projectId);
135
244
  else {
136
245
  queryClient.setQueryData(providerLoginsKey(projectId), (logins) => logins?.filter((login) => login.provider_id !== subscription.oauth));
@@ -143,7 +252,21 @@ export function useSubscriptionSignIn({ projectId, onConnected, kind = 'chatgpt'
143
252
  },
144
253
  onError: (err) => errorToast(err instanceof Error ? err.message : tHardcodedUi.raw('i18nComplete.text7b7e67f5f919')),
145
254
  });
146
- return { subscription, copy, phase, challenge, error, connected, start: handleConnect, cancel: reset, disconnect };
255
+ return {
256
+ subscription,
257
+ copy,
258
+ phase,
259
+ challenge,
260
+ error,
261
+ connected,
262
+ start: handleConnect,
263
+ cancel: reset,
264
+ disconnect,
265
+ /** Claude only: the member pastes the code claude.com shows (`submitCode`) instead of typing one into the provider. */
266
+ pastesCode: claude,
267
+ submitCode,
268
+ checking,
269
+ };
147
270
  }
148
271
  // Legacy ChatGPT subscription login. With pooled connections enabled this
149
272
  // component shows only an existing project login; new accounts use resources.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Claude's step where ChatGPT shows a device code: Kortix ran the unmodified
3
+ * `claude setup-token`, claude.com is open in a new tab, and the member pastes
4
+ * the code it shows after the approval.
5
+ */
6
+ export declare function ClaudeCodeStep({ url, checking, onSubmit, }: {
7
+ url: string | null;
8
+ checking: boolean;
9
+ onSubmit: (code: string) => void;
10
+ }): import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ArrowSquareOutIcon } from '@phosphor-icons/react';
4
+ import { useState } from 'react';
5
+ import { useTranslations } from '../../../i18n/index.js';
6
+ import { Button } from '../../../primitives/button.js';
7
+ import { InputGroup, InputGroupInput } from '../../../primitives/input-group.js';
8
+ import Loading from '../../../primitives/loading.js';
9
+ function hostOf(url) {
10
+ try {
11
+ return new URL(url).host;
12
+ }
13
+ catch {
14
+ return url;
15
+ }
16
+ }
17
+ /**
18
+ * Claude's step where ChatGPT shows a device code: Kortix ran the unmodified
19
+ * `claude setup-token`, claude.com is open in a new tab, and the member pastes
20
+ * the code it shows after the approval.
21
+ */
22
+ export function ClaudeCodeStep({ url, checking, onSubmit, }) {
23
+ const t = useTranslations('claudeSubscription');
24
+ const tSheet = useTranslations('providerSheet');
25
+ const [code, setCode] = useState('');
26
+ const canSubmit = !!url && code.trim().length > 0 && !checking;
27
+ return (_jsxs("div", { className: "bg-muted/60 space-y-3 rounded-lg p-4", "data-provider-claude-code": "", children: [_jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: t('approveDescription') }), _jsxs("form", { className: "flex items-center gap-2", onSubmit: (event) => {
28
+ event.preventDefault();
29
+ if (canSubmit)
30
+ onSubmit(code.trim());
31
+ }, children: [_jsx(InputGroup, { className: "h-8 min-w-0 flex-1", children: _jsx(InputGroupInput, { autoFocus: true, autoComplete: "off", spellCheck: false, "data-1p-ignore": "", "data-lpignore": "true", "aria-label": t('codeLabel'), placeholder: t('codeLabel'), value: code, disabled: !url || checking, onChange: (event) => setCode(event.target.value), className: "font-mono text-xs" }) }), _jsxs(Button, { type: "submit", size: "sm", disabled: !canSubmit, className: "gap-1.5", children: [checking ? _jsx(Loading, { className: "size-3.5 shrink-0" }) : null, checking ? t('connecting') : t('connect')] })] }), url ? (_jsx(Button, { size: "sm", variant: "secondary", className: "gap-1.5", asChild: true, children: _jsxs("a", { href: url, target: "_blank", rel: "noopener noreferrer", children: [tSheet('openLink', { host: hostOf(url) }), _jsx(ArrowSquareOutIcon, { className: "size-3.5 shrink-0" })] }) })) : (_jsxs("p", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(Loading, { className: "size-3.5 shrink-0" }), t('starting')] }))] }));
32
+ }
@@ -28,6 +28,7 @@ import { InputGroupSearch, InputGroupSearchClear, InputGroupSearchIcon, InputGro
28
28
  import { MagnifyingGlassIcon as Search } from '@phosphor-icons/react';
29
29
  import { useSlashFocus } from '../../../internal/hooks/index.js';
30
30
  import { buildModelGroups } from './model-rows.js';
31
+ import { isClaudeSubscriptionModel } from '../../../session/models/model-tags.js';
31
32
  /**
32
33
  * `search` used to be driven by the provider modal's always-on search bar,
33
34
  * which JAY-510 deleted (it sat above the tabs and filtered whichever tab
@@ -46,7 +47,10 @@ export function ModelsTab({ projectId, search: hostSearch, canWrite = false, })
46
47
  // the two views can never show different models — and each model's `enabled`
47
48
  // flag is resolved server-side and enforced by the gateway, so a switch here
48
49
  // is the one and only thing deciding whether it appears there.
49
- const models = useProjectModels(projectId);
50
+ const projectModels = useProjectModels(projectId);
51
+ // Claude subscription models are listed once the member can use a Claude
52
+ // account, as ChatGPT models are listed once a ChatGPT account is connected.
53
+ const models = useMemo(() => projectModels.filter((m) => !(isClaudeSubscriptionModel(m) && m.available === false)), [projectModels]);
50
54
  const pickerCatalog = useProjectModelPickerCatalog(projectId);
51
55
  const enablement = useModelEnablement(projectId);
52
56
  // Prices below are the provider's base price; the fee is added when the call bills.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Provider keys live beside the provider they configure. The secret value stays
3
- * write-only. With `oauth`, the panel manages ChatGPT accounts: any project
4
- * member can connect their own subscription ("Only you"); sharing one with
5
- * others needs `project.secret.write`, the same rule the API enforces.
3
+ * write-only. With `oauth`, the panel manages ChatGPT or Claude accounts: any
4
+ * project member can connect their own subscription ("Only you"); sharing one
5
+ * with others needs `project.secret.write`, the same rule the API enforces.
6
6
  */
7
7
  export declare function AccountSecretResourcesPanel({ accountId, projectId, providerId, providerName, envVar, canWrite, oauth }: {
8
8
  accountId: string;
@@ -11,8 +11,10 @@ export declare function AccountSecretResourcesPanel({ accountId, projectId, prov
11
11
  providerName: string;
12
12
  envVar: string;
13
13
  canWrite: boolean;
14
+ /** A sign-in account list: ChatGPT (device code, the default) or Claude (`kind: 'claude'`, a pasted code). */
14
15
  oauth?: {
15
16
  projectId: string;
16
17
  onConnected: (providerId: string) => void;
18
+ kind?: 'chatgpt' | 'claude';
17
19
  };
18
20
  }): import("react").JSX.Element;