@kortix/ui 0.14.12 → 0.14.13

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
@@ -1,152 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- /**
4
- * The "Upgrades" settings pane — one-off, agent-run project upgrades. Two
5
- * halves:
6
- *
7
- * 1. The registry (`upgrade-defs.ts`): known upgrades with a detection rule
8
- * (today: the v1/v2 → v3 manifest upgrade). Rows appear only while
9
- * applicable and disappear for good once done.
10
- * 2. A freeform one-off runner: describe a single change ("bump X",
11
- * "restructure Y") and a session makes it and opens a change request —
12
- * the same mechanics, minus the registry entry.
13
- *
14
- * Every run is a session, not a form: the only way config lands is through
15
- * an agent editing the repo on a branch and opening a CR the user reviews.
16
- * Nothing here merges anything.
17
- *
18
- * **Layout: the settings pane shape**, the same as `profile-tab.tsx`,
19
- * `general-tab.tsx`, and `organization-tab.tsx`. Pane heading, then rows —
20
- * label left, control right, consecutive rows sharing ONE bordered box
21
- * separated by hairlines (`SettingsRowGroup` / `SettingsRow`,
22
- * `packages/ui/src/primitives/settings-row.tsx`). Sections are a plain small heading
23
- * (`SettingsSubsectionHeader`).
24
- *
25
- * This pane was the odd one out. Six things changed, and each replaced
26
- * something that was there before:
27
- *
28
- * - **It reads its own heading from the rail now.** It used to render
29
- * `CustomizeSectionWrapper` with a hardcoded title and description, so the
30
- * pane's copy lived in three places at once — here, `rail.ts`'s
31
- * `UPGRADE_ITEM.description` (which never rendered), and a third wording in
32
- * a `<p>` inside the one-off panel. `SettingsTabHeader tab="upgrades"` makes
33
- * the rail entry the single source, exactly like every other pane.
34
- * `git-view.tsx` — also a `customize/` view the settings panel mounts — took
35
- * this shape first; `tab-content-width.test.ts` tracks both as sections that
36
- * declare the panel column themselves. Dropping the wrapper also drops a
37
- * nested scroll container: `settings-panel.tsx:524` already gives every pane
38
- * `overflow-y-auto`, and the wrapper added a second one inside it.
39
- * - **The upgrade row is a row, not a glowing card.** It carried
40
- * `border-kortix-base/30 bg-kortix-base/[0.06] shadow-kortix-base/20
41
- * shadow-md` plus a `ring-1 ring-inset` icon tile. The design system is
42
- * explicit that in-flow surfaces get a border and no shadow — elevation
43
- * belongs to overlays — and that `kortix-*` accents carry state, not
44
- * emphasis. A brand-tinted, shadowed panel in a settings pane is the one
45
- * surface here that shouted.
46
- * - **The "Recommended" badge is gone.** `ProjectUpgrade` has no field that
47
- * could ever make it false, so it rendered on every row unconditionally. A
48
- * badge that never varies is decoration, and it competed with the Run button
49
- * for the same job.
50
- * - **No dashed empty-state box.** "You're up to date" is one fact; it is a
51
- * row in the same group the upgrades would occupy, with the state as a
52
- * `Badge`. `EmptyState` is `rounded-lg` and `p-6 md:p-12` — a centred box of
53
- * a different shape and radius from everything else in the pane.
54
- * - **Section headings are headings.** `<Label>` renders a bare `<label>`, so
55
- * the pane's outline went `h2` → nothing → rows. `SettingsSubsectionHeader`
56
- * is the `h3` level that belongs between them (see that file's header).
57
- * - **Read-only is one line, not an empty box.** With `canWrite` false the
58
- * one-off section used to render a bordered panel holding a sentence and no
59
- * control. The section is omitted instead — it is nothing but a composer —
60
- * and the reason moves to the first section's description, said once.
61
- *
62
- * `UpgradesViewContent` is presentational — no data fetching, so every state
63
- * renders under `renderToStaticMarkup`. Local textarea and in-flight-row state
64
- * is fine; the network side lives in the `UpgradesView` wrapper below.
65
- */
66
- import { Badge } from '../../primitives/badge.js';
67
- import { Button } from '../../primitives/button.js';
68
- import Loading from '../../primitives/loading.js';
69
- import { SettingsRow, SettingsRowGroup } from '../../primitives/settings-row.js';
70
- import { SettingsSubsectionHeader } from '../../primitives/settings-subsection-header.js';
71
- import { Skeleton } from '../../primitives/skeleton.js';
72
- import { Textarea } from '../../primitives/textarea.js';
73
- import { SettingsTabHeader } from '../settings/settings-tab-header.js';
74
- import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
75
- import { useProjectCan } from '../../internal/lib/use-project-can.js';
76
- import { useTranslations } from '../../i18n/index.js';
77
- import { useState } from 'react';
78
- import { useProjectManifestVersion } from '../../internal/lib/manifest-version.js';
79
- import { applicableUpgrades, buildOneOffUpgradePrompt } from './upgrade-defs.js';
80
- import { useRunUpgrade } from './use-run-upgrade.js';
81
- /** The one-off runner's id in `startedId` below — it shares the single
82
- * `pending` flag with every registry row, so it needs a name in the same
83
- * space. Not a `ProjectUpgrade.id`, and it cannot collide with one: registry
84
- * ids come from `PROJECT_UPGRADES`, which has no entry by this name. */
85
- const ONE_OFF_ID = 'one-off';
86
- export const DEFAULT_UPGRADES_COPY = {
87
- available: 'Available upgrades',
88
- readOnly: 'Read-only — running an upgrade needs write access to this workspace.',
89
- none: 'No upgrades available',
90
- upToDateDescription: 'This workspace is already up to date.',
91
- upToDate: 'Up to date',
92
- run: 'Run',
93
- oneOff: 'One-off upgrade',
94
- oneOffDescription: 'Describe a single change instead. It runs the same way — a session makes it, validates it, and opens a change request.',
95
- oneOffPlaceholder: "e.g. Rename the release-bot agent to deploy-bot everywhere it's referenced",
96
- runUpgrade: 'Run upgrade',
97
- upgrades: {
98
- 'manifest-v3': {
99
- title: 'Upgrade manifest to v3 (kortix.yaml)',
100
- description: 'Moves kortix.toml or a version 2 kortix.yaml to version 3: the project registers skills, tools, commands and extensions, and each agent enables them by name. Refreshes platform-managed skills and opens a change request for review.',
101
- },
102
- },
103
- };
104
- export function UpgradesViewContent({ version, onRun, pending, canWrite = false, copy = DEFAULT_UPGRADES_COPY, }) {
105
- const [oneOff, setOneOff] = useState('');
106
- // Which control the user actually pressed. `pending` is global — only one
107
- // session can be minted at a time — so without this every Run button on the
108
- // pane spins at once the moment any one of them is clicked. Latent today
109
- // (the registry holds one entry) and wrong the day it holds two.
110
- const [startedId, setStartedId] = useState(null);
111
- const upgrades = version === null ? null : applicableUpgrades({ manifestVersion: version });
112
- function run(id, prompt) {
113
- setStartedId(id);
114
- onRun(prompt);
115
- }
116
- return (_jsxs("div", { className: "mx-auto w-full max-w-2xl space-y-8", children: [_jsx(SettingsTabHeader, { tab: "upgrades" }), _jsxs("section", { className: "space-y-3", children: [_jsx(SettingsSubsectionHeader, { title: copy.available,
117
- // Only said when it is true — an explanation of a control you can
118
- // see is noise; an explanation of a control that is missing is not.
119
- description: canWrite ? undefined : copy.readOnly }), upgrades === null ? (
120
- // Shape-matched to one grouped row (px-4 py-3 around a title and a
121
- // wrapped description), not to the two 64px cards this used to show
122
- // for a registry that has one entry.
123
- _jsx(Skeleton, { className: "h-[76px] w-full rounded-md" })) : (_jsx(SettingsRowGroup, { children: upgrades.length === 0 ? (_jsx(SettingsRow, { label: copy.none, description: copy.upToDateDescription, children: _jsx(Badge, { variant: "success", size: "sm", children: copy.upToDate }) })) : (upgrades.map((upgrade) => (_jsx(SettingsRow, { label: copy.upgrades[upgrade.id]?.title ?? upgrade.title, description: copy.upgrades[upgrade.id]?.description ?? upgrade.description, children: canWrite ? (_jsxs(Button, { size: "sm", disabled: pending, onClick: () => run(upgrade.id, upgrade.prompt), children: [pending && startedId === upgrade.id ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : null, copy.run] })) : null }, upgrade.id)))) }))] }), canWrite ? (_jsxs("section", { className: "space-y-3", children: [_jsx(SettingsSubsectionHeader, { title: copy.oneOff, description: copy.oneOffDescription }), _jsxs("div", { className: "bg-popover space-y-3 rounded-md border px-4 py-5", children: [_jsx(Textarea
124
- // The section heading is an `h3`, not a `<label htmlFor>`, so the
125
- // control carries its own accessible name — same as the rows in
126
- // `general-tab.tsx` and `organization-tab.tsx`.
127
- , { "aria-label": copy.oneOff, value: oneOff, onChange: (event) => setOneOff(event.target.value), placeholder: copy.oneOffPlaceholder, minHeight: 72 }), _jsx("div", { className: "flex justify-end", children: _jsxs(Button, { size: "sm", variant: "secondary", disabled: pending || !oneOff.trim(), onClick: () => run(ONE_OFF_ID, buildOneOffUpgradePrompt(oneOff)), children: [pending && startedId === ONE_OFF_ID ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : null, copy.runUpgrade] }) })] })] })) : null] }));
128
- }
129
- export function UpgradesView({ projectId }) {
130
- const t = useTranslations('settings.upgrades');
131
- const { version } = useProjectManifestVersion(projectId);
132
- const run = useRunUpgrade(projectId);
133
- const canWrite = useProjectCan(projectId, PROJECT_ACTIONS.PROJECT_WRITE).allowed === true;
134
- return (_jsx(UpgradesViewContent, { version: version, onRun: run.start, pending: run.pending, canWrite: canWrite, copy: {
135
- available: t('available'),
136
- readOnly: t('readOnly'),
137
- none: t('none'),
138
- upToDateDescription: t('upToDateDescription'),
139
- upToDate: t('upToDate'),
140
- run: t('run'),
141
- oneOff: t('oneOff'),
142
- oneOffDescription: t('oneOffDescription'),
143
- oneOffPlaceholder: t('oneOffPlaceholder'),
144
- runUpgrade: t('runUpgrade'),
145
- upgrades: {
146
- 'manifest-v3': {
147
- title: t('manifestV3.title'),
148
- description: t('manifestV3.description'),
149
- },
150
- },
151
- } }));
152
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * useRunUpgrade — start any agent-led upgrade session from Customize: mint a
3
- * fresh session, stash the given prompt as its first message, close the
4
- * overlay, and drop the user into the thread. The engine behind the registry
5
- * entries in `upgrade-defs.ts`, the one-off prompt runner and the sidebar
6
- * upgrade alert.
7
- *
8
- * Deliberately does NOT pass `agent_name` — the session boots the project's
9
- * default agent (the one with git/CR powers).
10
- */
11
- import type { PendingSessionPrompt } from '@kortix/sdk';
12
- /** Durable session-create payload; no model or agent override. */
13
- export declare function pendingUpgradePrompt(prompt: string): PendingSessionPrompt;
14
- export interface RunUpgrade {
15
- start: (prompt: string) => void;
16
- pending: boolean;
17
- }
18
- export declare function useRunUpgrade(projectId: string): RunUpgrade;
@@ -1,16 +0,0 @@
1
- 'use client';
2
- import { useConfigureThread } from '../use-configure-thread.js';
3
- /** Durable session-create payload; no model or agent override. */
4
- export function pendingUpgradePrompt(prompt) {
5
- return { text: prompt, agent: null, model: null, variant: null };
6
- }
7
- export function useRunUpgrade(projectId) {
8
- const configure = useConfigureThread(projectId);
9
- return {
10
- pending: configure.pending,
11
- start: (prompt) => {
12
- if (prompt.trim())
13
- configure.start(pendingUpgradePrompt(prompt));
14
- },
15
- };
16
- }
@@ -1,3 +0,0 @@
1
- export declare function CapabilityTabs({ projectId }: {
2
- projectId: string;
3
- }): import("react").JSX.Element;
@@ -1,137 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { hubTarget } from '../../internal/stores/account-panel-store.js';
4
- import { useLocalizedUiCatalog } from '../../i18n/ui-catalog/use-localized-ui-catalog.js';
5
- import { useTranslations } from '../../i18n/index.js';
6
- import { ArrowUpRightIcon } from '@phosphor-icons/react';
7
- import { UiLink as Link, useUiPathname } from '../../providers/ui-provider.js';
8
- import { FadedScrollArea } from '../../primitives/faded-scroll-area.js';
9
- import { useOptionalSidebar } from '../../primitives/sidebar.js';
10
- import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
11
- import { HubLink } from '../../internal/account-hub/account-hub-location.js';
12
- import { SidebarToggle } from '../../internal/layout/sidebar-toggle.js';
13
- import { useCapabilityAccess } from '../../internal/layout/project-settings-nav.js';
14
- import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
15
- import { useProjectPageCans } from '../../internal/lib/use-project-can.js';
16
- import { cn } from '../../internal/lib/utils.js';
17
- import { getProjectDetail } from '@kortix/sdk';
18
- import { contract, qk } from '@kortix/sdk/react';
19
- import { useQuery } from '@tanstack/react-query';
20
- import { receivedDenial } from './capability-access-gate.js';
21
- import { CAPABILITY_TABS, PRIMARY_TABS, activeCapabilityTab, capabilityTabHref, } from '../../internal/lib/capability-tab-routes.js';
22
- /**
23
- * "Members" — the tab-shaped row-item that launches the account-level Access
24
- * hub for this project, rather than a real capability page. It is NOT a
25
- * `CapabilityTab`: `capabilityTabHref`/`activeCapabilityTab` are shape-
26
- * sensitive to "every capability tab is a real page at /projects/<id>/<key>",
27
- * and this row is not one — clicking it navigates away entirely. So it's a
28
- * plain styled `Link` rendered as a `TabsList` sibling, matching a
29
- * `TabsTrigger`'s exact classes for visual parity, but living outside the
30
- * `Tabs`/`TabsTrigger` roving-tabindex/active-state machinery: it never lights
31
- * up as "current" (you're never actually on it), and Radix never needs to
32
- * reason about it as a tab panel.
33
- *
34
- * Needs the project's account_id, which this bar doesn't otherwise fetch —
35
- * `qk.project.detail(projectId)` is the same query key the page shell above
36
- * already populates, so this is a cache hit, not a second request.
37
- *
38
- * Gated on `project.members.read`, NOT `project.members.manage`: the hub's
39
- * project panel renders read-only for anyone who can read the member list and
40
- * probes `members.manage` itself for every write control it offers
41
- * (`components/iam/access-projects-tab.tsx`). Gating this launcher on manage
42
- * would hide a page a member can legitimately open.
43
- *
44
- * It holds its place from the first frame. While the account id or the probe
45
- * is still in flight it renders as inert text of the same size, so the row
46
- * never reflows when they land; it leaves only on a denial the engine
47
- * returned. The probe rides the shared `PROJECT_PAGE_ACTIONS` batch, which the
48
- * sidebar has usually cached already.
49
- */
50
- const MEMBERS_LINK_CLASS = 'text-muted-foreground hover:text-foreground ml-auto flex w-fit flex-none items-center gap-1 px-1 py-3 text-sm font-medium whitespace-nowrap transition-colors';
51
- function MembersLaunchLink({ projectId }) {
52
- const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
53
- const { data } = useQuery({
54
- queryKey: qk.project.detail(projectId),
55
- queryFn: () => getProjectDetail(projectId),
56
- ...contract('config'),
57
- });
58
- const canReadMembers = useProjectPageCans(projectId)[PROJECT_ACTIONS.PROJECT_MEMBERS_READ];
59
- const accountId = data?.project?.account_id;
60
- if (receivedDenial(canReadMembers))
61
- return null;
62
- const label = (_jsxs(_Fragment, { children: [tI18nComplete.raw('text1044a4c056d0'), _jsx(ArrowUpRightIcon, { className: "size-3 opacity-60", "aria-hidden": true })] }));
63
- if (!accountId)
64
- return _jsx("span", { className: MEMBERS_LINK_CLASS, children: label });
65
- return (_jsx(HubLink, { to: hubTarget(accountId, {
66
- tab: 'access-projects',
67
- project: projectId,
68
- }), className: MEMBERS_LINK_CLASS, children: label }));
69
- }
70
- /**
71
- * Shared tab bar for
72
- * /projects/[id]/{agent,connectors,skills,schedules,webhooks}. Lives in the
73
- * `(capabilities)` route group layout so it does not remount when switching
74
- * tabs. Each trigger wraps a real `next/link` via `asChild`.
75
- *
76
- * One flex row, everything in flow: [sidebar toggle?] [tabs].
77
- * Absolute overlays and expanded hit areas are forbidden here — they steal
78
- * pointer events across the row.
79
- *
80
- * Global rules used to sit at the far right of this bar. It is connector
81
- * approval policy, not a project-wide setting, so it now lives at the far
82
- * right of the Connectors page's own Discovery/All/Connected row
83
- * (`connectors/connectors-page.tsx`). Nothing capability-wide belongs here —
84
- * this bar navigates, it does not act.
85
- *
86
- * `shrink-0` keeps the bar pinned at full height inside the layout's `h-svh`
87
- * column; the page body below is the flex-1 scroller.
88
- *
89
- * **Only the tabs the caller may open** (`capabilityAccess()`, the rule the
90
- * sidebar row and `CapabilityAccessGate` read). Until that answer arrives the
91
- * bar paints every tab with `invisible`: the row holds its height and nothing
92
- * flies in, and no tab the caller cannot open is ever clickable. It used to
93
- * paint every tab unconditionally, so a limited member saw five tabs that
94
- * opened onto "You don't have access" (KRTX-2144).
95
- */
96
- /**
97
- * The hairline between Agents and everything an agent draws on (Skills
98
- * through Secrets). One `TabsList` still —
99
- * this is a `span`, not a second list, so the underline indicator and the
100
- * keyboard roving stay unified. It is `aria-hidden` because the grouping is
101
- * visual: a screen reader walks seven tabs either way.
102
- */
103
- /**
104
- * Settings trails the row, on the right, after the Members link — one
105
- * `TabsList`, so the underline indicator, keyboard roving and `role="tablist"`
106
- * stay unified; only the visual position of this tab changes. It reads as
107
- * "how the project is configured", a different register from the build-the-
108
- * agent tabs to its left, and the gap says so without a second list.
109
- */
110
- const TRAILING_TABS = ['config'];
111
- /** Tabs that need a project flag: left out of the bar until access settles. */
112
- const FLAG_GATED_TABS = ['files', 'reminders'];
113
- function GroupSeam() {
114
- return _jsx("span", { "aria-hidden": true, className: "bg-border mx-1 h-4 w-px shrink-0 self-center" });
115
- }
116
- export function CapabilityTabs({ projectId }) {
117
- const pathname = useUiPathname();
118
- const activeKey = activeCapabilityTab(pathname);
119
- // This bar is the first in-flow child of the capabilities layout, which the
120
- // layout's own doc confirms adds no vertical offset — so on the desktop
121
- // shell it starts at y=0 and shares the band with the OS window controls.
122
- // Without the indent the first tab renders under the macOS traffic lights.
123
- const sidebar = useOptionalSidebar();
124
- const allTabs = useLocalizedUiCatalog(CAPABILITY_TABS);
125
- // Repo (key `files`) and Reminders are the flag-gated tabs: each exists only
126
- // once the project turns its flag on. `capabilityAccess()` applies the flags
127
- // and the leaves; before it settles the bar is invisible and both are left out.
128
- const access = useCapabilityAccess(projectId);
129
- const allowedTabs = new Set(access.tabs);
130
- const tabs = allTabs.filter((tab) => access.settled ? allowedTabs.has(tab.key) : !FLAG_GATED_TABS.includes(tab.key));
131
- const leading = tabs.filter((tab) => !TRAILING_TABS.includes(tab.key));
132
- const primary = leading.filter((tab) => PRIMARY_TABS.includes(tab.key));
133
- const library = leading.filter((tab) => !PRIMARY_TABS.includes(tab.key));
134
- const trailing = tabs.filter((tab) => TRAILING_TABS.includes(tab.key));
135
- const renderTab = (tab) => (_jsx(TabsTrigger, { value: tab.key, asChild: true, className: "w-fit flex-none px-1 py-3", children: _jsx(Link, { href: capabilityTabHref(projectId, tab.key), prefetch: true, children: tab.label }) }, tab.key));
136
- return (_jsxs("div", { className: "kx-titlebar-row kx-capability-titlebar relative flex shrink-0 items-center gap-1 border-b px-2", "data-sidebar-collapsed": sidebar?.state === 'collapsed' || undefined, children: [_jsx(SidebarToggle, {}), _jsx(FadedScrollArea, { orientation: "horizontal", fadeColor: "from-background", rootClassName: "min-w-0 flex-1", children: _jsx(Tabs, { value: activeKey ?? '', className: "w-max min-w-full", children: _jsxs(TabsList, { type: "underline", underlineSize: "md", size: "lg", className: cn('kx-titlebar-tabs h-auto w-full justify-start gap-5 border-b-0 px-2', !access.settled && 'invisible'), "aria-busy": !access.settled || undefined, children: [primary.map(renderTab), primary.length > 0 && library.length > 0 ? _jsx(GroupSeam, {}) : null, library.map(renderTab), _jsx(MembersLaunchLink, { projectId: projectId }), trailing.map(renderTab)] }) }) })] }));
137
- }
@@ -1,14 +0,0 @@
1
- import type { ProjectConfigSummary } from '@kortix/sdk';
2
- export type SkillScope = 'project' | 'kortix';
3
- type Skill = ProjectConfigSummary['skills'][number];
4
- /**
5
- * The `kortix-*` family is platform runtime, force-injected into every session
6
- * at boot. It reads the same in every project and is not meaningfully editable
7
- * here, so it filters separately from the project's own skills.
8
- */
9
- export declare function skillScope(name: string): SkillScope;
10
- export declare function filterSkills(skills: readonly Skill[], opts: {
11
- scope: SkillScope | null;
12
- query: string;
13
- }): Skill[];
14
- export {};
@@ -1,18 +0,0 @@
1
- /**
2
- * The `kortix-*` family is platform runtime, force-injected into every session
3
- * at boot. It reads the same in every project and is not meaningfully editable
4
- * here, so it filters separately from the project's own skills.
5
- */
6
- export function skillScope(name) {
7
- return name.startsWith('kortix-') ? 'kortix' : 'project';
8
- }
9
- export function filterSkills(skills, opts) {
10
- const q = opts.query.trim().toLowerCase();
11
- return skills.filter((s) => {
12
- if (opts.scope && skillScope(s.name) !== opts.scope)
13
- return false;
14
- if (!q)
15
- return true;
16
- return s.name.toLowerCase().includes(q) || (s.description ?? '').toLowerCase().includes(q);
17
- });
18
- }
@@ -1,21 +0,0 @@
1
- /** @internal Kortix apps only. No semver: it may change in any release. */
2
- export type ManifestVersion = 1 | 2 | 3;
3
- export declare function detectManifestVersion(manifestRaw: string | null | undefined): ManifestVersion;
4
- /** The manifest file a version lives in. An unresolved read (`null`) reads as v1. */
5
- export declare function manifestFilename(version: number | null): 'kortix.toml' | 'kortix.yaml';
6
- /** A v1 or v2 project is offered the upgrade to v3. `null` (not read yet) is not. */
7
- export declare function manifestNeedsUpgrade(version: ManifestVersion | null): boolean;
8
- export interface ProjectManifestVersionState {
9
- /** `null` while the project-detail fetch is still in flight — callers that
10
- * only want to show v1-only UI once resolved should treat `null` as "not
11
- * yet known" rather than defaulting it to a version. */
12
- version: ManifestVersion | null;
13
- isLoading: boolean;
14
- }
15
- /**
16
- * Reads the SAME `qk.project.detail(id)` query the rest of Customize already
17
- * fetches — this hook
18
- * doesn't issue its own network request when that query is already warm;
19
- * react-query dedupes on the identical key + queryFn.
20
- */
21
- export declare function useProjectManifestVersion(projectId: string): ProjectManifestVersionState;
@@ -1,55 +0,0 @@
1
- 'use client';
2
- /**
3
- * Manifest version detection for the manifest upgrade surfaces. `ProjectConfigSummary`
4
- * doesn't carry a parsed `kortix_version` field, so we read it straight out
5
- * of the raw manifest text the project-detail endpoint already returns
6
- * (`config.manifest_raw`) — a plain regex works because both TOML
7
- * (`kortix_version = 1`) and YAML (`kortix_version: 3`) write it as a bare
8
- * `key <sep> value` line at the top of the file. Missing/unparsable defaults
9
- * to v1 (the schema itself treats an absent version as invalid-but-legacy —
10
- * treating it as "not yet migrated" is the safer UI default).
11
- */
12
- import { getProjectDetail, repositoryDisconnectedReason } from '@kortix/sdk';
13
- import { contract, qk } from '@kortix/sdk/react';
14
- import { useQuery } from '@tanstack/react-query';
15
- const VERSION_RE = /kortix_version\s*[:=]\s*"?(\d+)"?/;
16
- export function detectManifestVersion(manifestRaw) {
17
- if (!manifestRaw)
18
- return 1;
19
- const match = manifestRaw.match(VERSION_RE);
20
- if (!match)
21
- return 1;
22
- const parsed = Number(match[1]);
23
- // A version newer than this client reads as the newest it knows.
24
- return parsed >= 3 ? 3 : parsed === 2 ? 2 : 1;
25
- }
26
- /** The manifest file a version lives in. An unresolved read (`null`) reads as v1. */
27
- export function manifestFilename(version) {
28
- return (version ?? 1) >= 2 ? 'kortix.yaml' : 'kortix.toml';
29
- }
30
- /** A v1 or v2 project is offered the upgrade to v3. `null` (not read yet) is not. */
31
- export function manifestNeedsUpgrade(version) {
32
- return version === 1 || version === 2;
33
- }
34
- /**
35
- * Reads the SAME `qk.project.detail(id)` query the rest of Customize already
36
- * fetches — this hook
37
- * doesn't issue its own network request when that query is already warm;
38
- * react-query dedupes on the identical key + queryFn.
39
- */
40
- export function useProjectManifestVersion(projectId) {
41
- const detail = useQuery({
42
- queryKey: qk.project.detail(projectId),
43
- queryFn: () => getProjectDetail(projectId),
44
- enabled: !!projectId,
45
- ...contract('config'),
46
- });
47
- if (detail.isLoading || !detail.data) {
48
- return { version: null, isLoading: detail.isLoading };
49
- }
50
- // A disconnected repository was not read: its version is unknown, not v1,
51
- // so no surface offers an upgrade it cannot run (KRTX-2955).
52
- if (repositoryDisconnectedReason(detail.data.git_connection))
53
- return { version: null, isLoading: false };
54
- return { version: detectManifestVersion(detail.data.config.manifest_raw), isLoading: false };
55
- }
@@ -1,6 +0,0 @@
1
- export declare function useComposerEscapeStop({ editorElement, enabled, hasDraft, onStop, }: {
2
- editorElement: HTMLElement | null;
3
- enabled: boolean;
4
- hasDraft: boolean;
5
- onStop?: () => void;
6
- }): void;
@@ -1,28 +0,0 @@
1
- import { useEffect } from 'react';
2
- import { SUGGESTION_MENU_SELECTOR } from '../esc-to-stop.js';
3
- export function useComposerEscapeStop({ editorElement, enabled, hasDraft, onStop, }) {
4
- useEffect(() => {
5
- if (!editorElement || !enabled || hasDraft || !onStop)
6
- return;
7
- let suggestionMenuWasOpen = false;
8
- const capture = (event) => {
9
- if (event.key === 'Escape') {
10
- suggestionMenuWasOpen = document.querySelector(SUGGESTION_MENU_SELECTOR) !== null;
11
- }
12
- };
13
- const keydown = (event) => {
14
- if (event.key !== 'Escape' || event.isComposing || event.repeat || suggestionMenuWasOpen)
15
- return;
16
- // ProseMirror prevents every Escape, including one with no open menu.
17
- event.preventDefault();
18
- event.stopPropagation();
19
- onStop();
20
- };
21
- editorElement.addEventListener('keydown', capture, true);
22
- editorElement.addEventListener('keydown', keydown);
23
- return () => {
24
- editorElement.removeEventListener('keydown', capture, true);
25
- editorElement.removeEventListener('keydown', keydown);
26
- };
27
- }, [editorElement, enabled, hasDraft, onStop]);
28
- }
@@ -1,8 +0,0 @@
1
- export interface SubSessionModalProps {
2
- open: boolean;
3
- onOpenChange: (open: boolean) => void;
4
- sessionId: string;
5
- title?: string;
6
- }
7
- /** Body of `SubSessionModal` — it mounts a whole `SessionChat`, so it loads on first open. */
8
- export declare function SubSessionModalContent({ open, onOpenChange, sessionId, title }: SubSessionModalProps): import("react").JSX.Element;
@@ -1,23 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Modal, ModalContent, ModalTitle } from '../../primitives/modal.js';
4
- import { SessionChat } from './session-chat.js';
5
- import { cn } from '../../lib/utils.js';
6
- import { KanbanIcon as SquareKanban, XIcon as X } from '@phosphor-icons/react';
7
- import { useSessionIds } from '../../providers/session-ids.js';
8
- import { useTranslations } from '../../i18n/index.js';
9
- /** Body of `SubSessionModal` — it mounts a whole `SessionChat`, so it loads on first open. */
10
- export function SubSessionModalContent({ open, onOpenChange, sessionId, title }) {
11
- const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
12
- // The session page this sub-agent runs under. Its saved history holds the
13
- // sub-agent's transcript too, so the view paints while the computer is off.
14
- const ids = useSessionIds();
15
- const savedHistoryScope = ids.projectId && ids.sessionId ? `${ids.projectId}/${ids.sessionId}` : undefined;
16
- return (_jsx(Modal, { open: open, onOpenChange: onOpenChange, children: _jsxs(ModalContent, { showCloseButton: false, className: cn('flex flex-col gap-0 space-y-0 overflow-hidden p-0',
17
- // lg:max-w-* is required — the base modal sets lg:max-w-lg, which
18
- // tailwind-merge won't strip for an unprefixed max-w-* override.
19
- 'h-[80vh] max-h-[840px] lg:h-[80vh] lg:max-w-6xl'), "aria-describedby": undefined, children: [_jsxs("div", { className: "border-border/50 bg-muted/30 flex shrink-0 items-center gap-2 border-b px-4 py-2.5", children: [_jsx(SquareKanban, { className: "text-muted-foreground size-3.5 shrink-0" }), _jsx(ModalTitle, { className: "flex-1 truncate text-sm font-medium", children: title || 'Sub-session' }), _jsx("button", { type: "button", onClick: () => onOpenChange(false), "aria-label": tI18nComplete.raw('text35a0f571f5cd'), className: cn(
20
- // size-6 visible, 40px hit area — the header is dense, so the
21
- // target is grown with a pseudo-element instead of the box.
22
- 'hit-area-2 flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md', 'text-muted-foreground hover:text-foreground', 'hover:bg-muted/60 transition-colors'), children: _jsx(X, { className: "size-3.5" }) })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-hidden", children: _jsx(SessionChat, { sessionId: sessionId, hideHeader: true, readOnly: true, initialScrollTop: true, savedHistoryScope: savedHistoryScope }) })] }) }));
23
- }
@@ -1,2 +0,0 @@
1
- import type { SubSessionModalProps } from './sub-session-modal-content.js';
2
- export declare function SubSessionModal(props: SubSessionModalProps): import("react").JSX.Element | null;
@@ -1,14 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useOpenedOnce } from '../../internal/hooks/use-opened-once.js';
4
- import { lazyClient } from '../../lib/lazy-client.js';
5
- // The body mounts a full read-only `SessionChat` (composer, model gate,
6
- // provider modal, …). Tool rows render this modal closed on every transcript,
7
- // including the marketing home demo, so the body loads on first open only.
8
- const SubSessionModalContent = lazyClient(() => import('./sub-session-modal-content.js').then((mod) => mod.SubSessionModalContent));
9
- export function SubSessionModal(props) {
10
- const opened = useOpenedOnce(props.open);
11
- if (!opened)
12
- return null;
13
- return _jsx(SubSessionModalContent, { ...props });
14
- }
@@ -1,13 +0,0 @@
1
- /** Presentational shell — no data fetching, so every state renders under
2
- * renderToStaticMarkup. The network/permission reads live in the wrapper. */
3
- export declare function ProjectManifestUpgradeAlertView({ visible, pending, onMigrate, defaultOpen, }: {
4
- visible: boolean;
5
- pending: boolean;
6
- onMigrate: () => void;
7
- /** Seed the disclosure open — only used so the expanded body is renderable
8
- * in tests; the real sidebar always starts collapsed. */
9
- defaultOpen?: boolean;
10
- }): import("react").JSX.Element | null;
11
- export declare function ProjectManifestUpgradeAlert({ projectId }: {
12
- projectId: string;
13
- }): import("react").JSX.Element;
@@ -1,48 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- /**
4
- * ProjectManifestUpgradeAlert — the left-sidebar nudge that makes a project's
5
- * pre-v3 manifest (kortix_version 1 or 2) impossible to miss. Sits just above Files/Customize and
6
- * wears the shared footer alert shell (`sidebar-alert.tsx`) — the same one
7
- * `ProjectSandboxAlert` wears. It used to be a hand-copied duplicate of that
8
- * file's shell, which is how the two drifted to different paddings and
9
- * different open-state tints while their own comments claimed they matched.
10
- *
11
- * Tone is `info` rather than a failure colour: this is a recommended upgrade,
12
- * not something that is broken. A v2 project keeps running unchanged until
13
- * someone upgrades it. The action is one click, end to end: `useRunUpgrade`
14
- * mints a session seeded with `MIGRATE_TO_V3_PROMPT`, boots the project's
15
- * default agent (git/CR powers), and drops the user into the thread where it
16
- * auto-runs — `kortix migrate` to kortix.yaml version 3, then a change request
17
- * for review.
18
- *
19
- * Only renders while the project is on v1 or v2 AND the viewer can actually
20
- * act on it (`project.write` — the people who can push and open the CR); it
21
- * disappears for good the moment the manifest lands on v3.
22
- */
23
- import { useTranslations } from '../../../i18n/index.js';
24
- import { useState } from 'react';
25
- import { Button } from '../../../primitives/button.js';
26
- import Loading from '../../../primitives/loading.js';
27
- import { MIGRATE_TO_V3_PROMPT, manifestNeedsUpgrade, useProjectManifestVersion, useRunUpgrade, } from '../../../customize/migrate-to-v2/index.js';
28
- import { SidebarAlert, SidebarAlertActions, SidebarAlertBody, SidebarAlertText, } from './sidebar-alert.js';
29
- import { PROJECT_ACTIONS } from '../../../internal/lib/project-actions.js';
30
- import { useProjectPageCans } from '../../../internal/lib/use-project-can.js';
31
- import { ArrowCircleUpIcon as ArrowUpCircle } from '@phosphor-icons/react';
32
- /** Presentational shell — no data fetching, so every state renders under
33
- * renderToStaticMarkup. The network/permission reads live in the wrapper. */
34
- export function ProjectManifestUpgradeAlertView({ visible, pending, onMigrate, defaultOpen = false, }) {
35
- const t = useTranslations('sidebar');
36
- const [isOpen, setIsOpen] = useState(defaultOpen);
37
- if (!visible)
38
- return null;
39
- return (_jsxs(SidebarAlert, { tone: "info", icon: _jsx(ArrowUpCircle, { className: "size-4" }), label: t('manifestUpgrade.title'), open: isOpen, onOpenChange: setIsOpen, children: [_jsx(SidebarAlertBody, { children: _jsx(SidebarAlertText, { children: t.rich('manifestUpgrade.description', {
40
- yaml: (chunks) => _jsx("span", { className: "font-mono", children: chunks }),
41
- }) }) }), _jsx(SidebarAlertActions, { children: _jsxs(Button, { size: "sm", className: "w-full", disabled: pending, onClick: onMigrate, children: [pending ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(ArrowUpCircle, { className: "size-3.5 shrink-0" })), t('manifestUpgrade.start')] }) })] }));
42
- }
43
- export function ProjectManifestUpgradeAlert({ projectId }) {
44
- const { version } = useProjectManifestVersion(projectId);
45
- const canWrite = useProjectPageCans(projectId)[PROJECT_ACTIONS.PROJECT_WRITE]?.allowed === true;
46
- const run = useRunUpgrade(projectId);
47
- return (_jsx(ProjectManifestUpgradeAlertView, { visible: manifestNeedsUpgrade(version) && canWrite, pending: run.pending, onMigrate: () => run.start(MIGRATE_TO_V3_PROMPT) }));
48
- }