@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
@@ -25,7 +25,7 @@ export function SessionTerminalConnectBar({ projectSessionId }) {
25
25
  export function SessionTerminalConnectSteps({ id, projectSessionId, }) {
26
26
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
27
27
  const installCmd = useDeploymentCliInstallCommand(undefined);
28
- // A shell through the Kortix PTY: it works on every harness. `sessions connect` attaches OpenCode's own TUI and fails on pi.
28
+ // A shell through the Kortix PTY.
29
29
  const connectCmd = `kortix sessions shell ${projectSessionId}`;
30
30
  return (_jsxs("ol", { id: id, className: "space-y-3 pr-1.5 pb-3 pl-3", children: [_jsx(CommandStep, { label: tI18nComplete.raw('textd236e9cd730b'), command: installCmd }), _jsx(CommandStep, { label: tI18nComplete.raw('text842bad27af42'), command: connectCmd })] }));
31
31
  }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * /projects/[id]/admin/<section> — Project admin.
3
+ *
4
+ * Customize is agent-first: an agent's page configures what that agent draws
5
+ * on. Project admin is the project-wide view, one full page with a rail in two
6
+ * groups:
7
+ *
8
+ * - **Project resources**: the GLOBAL variant of every library page
9
+ * (Connectors, Skills, Triggers, Models, Secrets, Apps, and Repo
10
+ * with `drives` on), mounted with no props beyond `projectId`. This is
11
+ * their only home: Customize keeps Agents and Review (Marko, 2026-10-27).
12
+ * A page below a section (a connector, `/admin/connectors/<app>`) renders
13
+ * in that section's pane through `content`.
14
+ * - **Settings**: every section of the project Settings page
15
+ * (`project-settings-sections.ts`), plus the Members link.
16
+ *
17
+ * The section is the path segment (`projectAdminHref`); `/admin` alone opens
18
+ * the first resource the caller may open. Only the active section mounts, and
19
+ * each one is a lazy chunk: opening Project admin loads one catalog, not all
20
+ * of them. A section this caller cannot open, or a legacy `?section=`, is
21
+ * rewritten to the section that opened, so the URL always names the pane.
22
+ *
23
+ * Gated on `project.settings.write`, the Settings page's own leaf. Each row
24
+ * then follows the rule its own surface already applies: a resource row
25
+ * follows `capabilityAccess` (the Customize rule), a settings row follows
26
+ * `isCustomizeSectionVisible` (the Settings page rule). Nothing renders until
27
+ * those probes, the `drives` flag and the project detail (Members needs its
28
+ * account) answer, so a row never appears and then leaves.
29
+ *
30
+ * The page's `SettingsNav` catches `navigate(tab)` calls from a pane. A pane
31
+ * that pushes its own route (ConnectorsPage opening a connector) still leaves
32
+ * for that route: the resource pages take no base-path prop yet.
33
+ *
34
+ * Apps is a page of the host app, not of this package. The host passes it in
35
+ * `hostSections`; a row without a page is not listed. Loops were one until
36
+ * 2026-10-28: they are triggers on the Triggers page now.
37
+ */
38
+ import { type ComponentType, type ReactNode } from 'react';
39
+ export { buildProjectAdminNav } from './project-admin-nav.js';
40
+ export { DEFAULT_PROJECT_ADMIN_SECTION, parseProjectAdminSection, projectAdminHref, type ProjectAdminSectionKey, } from '../../customize/project-settings/project-admin-sections.js';
41
+ type SectionPage = ComponentType<{
42
+ projectId: string;
43
+ }>;
44
+ /** Pages that live in the host app (`apps/web`), passed in by its route. */
45
+ export type ProjectAdminHostSections = Partial<Record<'apps', SectionPage>>;
46
+ export declare function ProjectAdminDashboard({ projectId, section, content, hostSections, }: {
47
+ projectId: string;
48
+ /** The `/admin/<section>` segment. Absent: the first section the caller may open. */
49
+ section?: string;
50
+ /** A page below the section (`/admin/connectors/<app>`), shown in its pane. */
51
+ content?: ReactNode;
52
+ hostSections?: ProjectAdminHostSections;
53
+ }): import("react").JSX.Element;
@@ -0,0 +1,252 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ /**
4
+ * /projects/[id]/admin/<section> — Project admin.
5
+ *
6
+ * Customize is agent-first: an agent's page configures what that agent draws
7
+ * on. Project admin is the project-wide view, one full page with a rail in two
8
+ * groups:
9
+ *
10
+ * - **Project resources**: the GLOBAL variant of every library page
11
+ * (Connectors, Skills, Triggers, Models, Secrets, Apps, and Repo
12
+ * with `drives` on), mounted with no props beyond `projectId`. This is
13
+ * their only home: Customize keeps Agents and Review (Marko, 2026-10-27).
14
+ * A page below a section (a connector, `/admin/connectors/<app>`) renders
15
+ * in that section's pane through `content`.
16
+ * - **Settings**: every section of the project Settings page
17
+ * (`project-settings-sections.ts`), plus the Members link.
18
+ *
19
+ * The section is the path segment (`projectAdminHref`); `/admin` alone opens
20
+ * the first resource the caller may open. Only the active section mounts, and
21
+ * each one is a lazy chunk: opening Project admin loads one catalog, not all
22
+ * of them. A section this caller cannot open, or a legacy `?section=`, is
23
+ * rewritten to the section that opened, so the URL always names the pane.
24
+ *
25
+ * Gated on `project.settings.write`, the Settings page's own leaf. Each row
26
+ * then follows the rule its own surface already applies: a resource row
27
+ * follows `capabilityAccess` (the Customize rule), a settings row follows
28
+ * `isCustomizeSectionVisible` (the Settings page rule). Nothing renders until
29
+ * those probes, the `drives` flag and the project detail (Members needs its
30
+ * account) answer, so a row never appears and then leaves.
31
+ *
32
+ * The page's `SettingsNav` catches `navigate(tab)` calls from a pane. A pane
33
+ * that pushes its own route (ConnectorsPage opening a connector) still leaves
34
+ * for that route: the resource pages take no base-path prop yet.
35
+ *
36
+ * Apps is a page of the host app, not of this package. The host passes it in
37
+ * `hostSections`; a row without a page is not listed. Loops were one until
38
+ * 2026-10-28: they are triggers on the Triggers page now.
39
+ */
40
+ import { lazy, Suspense, useCallback, useEffect, useMemo } from 'react';
41
+ import { useQuery, useQueryClient } from '@tanstack/react-query';
42
+ import { getProjectDetail } from '@kortix/sdk';
43
+ import { contract, invalidatePermissionProbes, qk, useFeatureFlag } from '@kortix/sdk/react';
44
+ import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
45
+ import { Button } from '../../primitives/button.js';
46
+ import { EmptyState } from '../../primitives/empty-state.js';
47
+ import { ErrorState } from '../../primitives/error-state.js';
48
+ import { FadedScrollArea } from '../../primitives/faded-scroll-area.js';
49
+ import { SettingsSectionHeader } from '../../primitives/settings-section-header.js';
50
+ import { Skeleton } from '../../primitives/skeleton.js';
51
+ import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
52
+ import { UiLink as Link, useUiRouter, useUiSearchParams } from '../../providers/ui-provider.js';
53
+ import { CapabilitiesSkeleton } from '../../customize/shared/capability-skeleton.js';
54
+ import { projectSettingsSections } from '../../customize/project-settings/project-settings-sections.js';
55
+ import { SETTINGS_SIDEBAR_WIDTH_PX } from '../../internal/account-hub/account-settings-shell.js';
56
+ import { useIsMobile } from '../../internal/hooks/index.js';
57
+ import { RAIL_HORIZONTAL_ROW_CLASS, RAIL_ROW_CLASS, RailGroup } from '../../internal/components/nav-rail.js';
58
+ import { capabilityAccess } from '../../internal/layout/project-settings-nav.js';
59
+ import { SettingsNavProvider } from '../../internal/layout/settings-nav-context.js';
60
+ import { withStaleChunkRecovery } from '../../internal/lib/chunk-reload.js';
61
+ import { CUSTOMIZE_SECTION_GATE_ACTIONS, isCustomizeSectionVisible, PROJECT_ACTIONS, } from '../../internal/lib/project-actions.js';
62
+ import { useProjectCans, useProjectPageCans } from '../../internal/lib/use-project-can.js';
63
+ import { cn } from '../../internal/lib/utils.js';
64
+ import { useSettingsPanelStore } from '../../internal/stores/settings-panel-store.js';
65
+ import { buildProjectAdminNav } from './project-admin-nav.js';
66
+ import { DEFAULT_PROJECT_ADMIN_SECTION, isProjectAdminResource, RESOURCE_LABEL_KEYS, parseProjectAdminSection, PROJECT_ADMIN_RESOURCES, projectAdminHref, } from '../../customize/project-settings/project-admin-sections.js';
67
+ export { buildProjectAdminNav } from './project-admin-nav.js';
68
+ export { DEFAULT_PROJECT_ADMIN_SECTION, parseProjectAdminSection, projectAdminHref, } from '../../customize/project-settings/project-admin-sections.js';
69
+ function lazyPage(load, pick) {
70
+ return lazy(withStaleChunkRecovery(() => load().then((mod) => ({ default: pick(mod) }))));
71
+ }
72
+ /* The package's own pages, one lazy chunk each, mounted exactly as their
73
+ Customize routes mount them. */
74
+ const RESOURCE_PAGES = {
75
+ connectors: lazyPage(() => import('../../customize/connectors/connectors-page.js'), (m) => m.ConnectorsPage),
76
+ skills: lazyPage(() => import('../../customize/skills/skills-page.js'), (m) => m.SkillsPage),
77
+ tools: lazyPage(() => import('../../customize/skills/skills-page.js'), (m) => m.ToolsPage),
78
+ extensions: lazyPage(() => import('../../customize/skills/skills-page.js'), (m) => m.ExtensionsPage),
79
+ drives: lazyPage(() => import('../../customize/agents/agent-drives-section.js'), (m) => m.AgentDrivesSection),
80
+ triggers: lazyPage(() => import('../../customize/triggers/triggers-page.js'), (m) => m.TriggersPage),
81
+ models: lazyPage(() => import('../../customize/models/models-page.js'), (m) => m.ModelsPage),
82
+ secrets: lazyPage(() => import('../../customize/secrets/secrets-page.js'), (m) => m.SecretsPage),
83
+ repo: lazyPage(() => import('../layout/project-files-view.js'), (m) => m.ProjectFilesView),
84
+ };
85
+ /* A host page owns a full-viewport root (`AppsView` is `h-svh`). Inside this
86
+ pane that box would overflow by the header's height and clip its last row,
87
+ so the pane bounds its direct child to the pane's own height. */
88
+ const HOST_PANE_CLASS = '*:h-full';
89
+ /* The Settings page's panes, mounted with the same props and in the same
90
+ order `ProjectSettingsSectionPane` mounts them. */
91
+ const SETTINGS_PAGES = {
92
+ general: lazyPage(() => import('../../customize/settings/tabs/general-tab.js'), (m) => m.GeneralTab),
93
+ git: lazyPage(() => import('../../customize/sections/view/git-view.js'), (m) => {
94
+ const { GitView } = m;
95
+ return function GitSection({ projectId }) {
96
+ const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
97
+ return (_jsxs("div", { className: "mx-auto w-full max-w-2xl space-y-8", children: [_jsx(SettingsSectionHeader, { title: tI18nComplete.raw('text95ddc9c4dfd3'), description: tI18nComplete.raw('texte0d7209f4c07'), className: "pb-1" }), _jsx(GitView, { projectId: projectId })] }));
98
+ };
99
+ }),
100
+ sandbox: lazyPage(() => Promise.all([
101
+ import('../../customize/settings/tabs/sandbox-tab.js'),
102
+ import('../../customize/settings/tabs/snapshots-tab.js'),
103
+ ]), ([sandbox, snapshots]) => {
104
+ const { SandboxTab } = sandbox;
105
+ const { SnapshotsTab } = snapshots;
106
+ return function SandboxSection({ projectId }) {
107
+ return (_jsxs("div", { className: "space-y-8", children: [_jsx(SandboxTab, { projectId: projectId }), _jsx(SnapshotsTab, { projectId: projectId })] }));
108
+ };
109
+ }),
110
+ 'feature-flags': lazyPage(() => import('../../customize/settings/tabs/experimental-tab.js'), (m) => m.ExperimentalTab),
111
+ };
112
+ /** A verdict the engine returned: not a probe in flight, not a failed probe. */
113
+ function receivedDenial(result) {
114
+ return !!result && !result.isLoading && !result.isError && !result.allowed;
115
+ }
116
+ function answered(caps, actions) {
117
+ return actions.every((action) => caps[action] && !caps[action].isLoading);
118
+ }
119
+ const NO_HOST_SECTIONS = {};
120
+ export function ProjectAdminDashboard({ projectId, section, content, hostSections = NO_HOST_SECTIONS, }) {
121
+ const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
122
+ const tAdmin = useI18nTranslations('projectAdmin');
123
+ const isMobile = useIsMobile();
124
+ const searchParams = useUiSearchParams();
125
+ const router = useUiRouter();
126
+ const queryClient = useQueryClient();
127
+ const detail = useQuery({
128
+ queryKey: qk.project.detail(projectId),
129
+ queryFn: () => getProjectDetail(projectId),
130
+ enabled: !!projectId,
131
+ ...contract('config'),
132
+ });
133
+ const accountId = detail.data?.project?.account_id;
134
+ // One batch for the page gate, the resource rows and Members: the same
135
+ // `PROJECT_PAGE_ACTIONS` batch the sidebar has usually cached already.
136
+ const pageCans = useProjectPageCans(projectId);
137
+ const settingsCans = useProjectCans(projectId, CUSTOMIZE_SECTION_GATE_ACTIONS, { accountId });
138
+ const canAdmin = pageCans[PROJECT_ACTIONS.PROJECT_SETTINGS_WRITE];
139
+ const drives = useFeatureFlag(projectId, 'drives');
140
+ // The Customize rule for each library, without its flag clauses: a flag-off
141
+ // Loops page explains its own gate (`FeatureGateScreen`) instead of
142
+ // disappearing from the rail. Repo applies `drives` itself, below.
143
+ const resources = capabilityAccess(pageCans, { drives: true, reminders: true });
144
+ const settingsAnswered = answered(settingsCans, CUSTOMIZE_SECTION_GATE_ACTIONS);
145
+ const settingsProbeFailed = CUSTOMIZE_SECTION_GATE_ACTIONS.some((action) => settingsCans[action]?.isError);
146
+ const settled = !!canAdmin &&
147
+ !canAdmin.isLoading &&
148
+ resources.settled &&
149
+ settingsAnswered &&
150
+ !drives.isLoading &&
151
+ // Members needs the account id: wait for the detail so it never pops in.
152
+ detail.isFetched;
153
+ // `resources.tabs` is a fresh array each render; its contents are the key.
154
+ const allowedTabs = resources.tabs.join(',');
155
+ const drivesOn = drives.enabled;
156
+ const resourceRows = useMemo(() => {
157
+ const allowed = new Set(allowedTabs.split(','));
158
+ return PROJECT_ADMIN_RESOURCES.filter((r) => (r.host ? !!hostSections[r.key] : true))
159
+ .filter((r) => !r.capability || allowed.has(r.capability))
160
+ .filter((r) => r.flag !== 'drives' || drivesOn)
161
+ .map((r) => {
162
+ const legacy = RESOURCE_LABEL_KEYS[r.key];
163
+ return { key: r.key, label: legacy ? tI18nComplete.raw(legacy) : tAdmin(r.key), icon: r.icon };
164
+ });
165
+ }, [hostSections, allowedTabs, drivesOn, tI18nComplete, tAdmin]);
166
+ const settingsRows = useMemo(() => projectSettingsSections(tI18nComplete)
167
+ .filter((s) => s.key !== 'review')
168
+ // The Settings page's rule: a failed probe hides nothing. The pane
169
+ // itself reports a 403 if the server refuses it.
170
+ .filter((s) => settingsProbeFailed ||
171
+ isCustomizeSectionVisible(s.gate, (action) => settingsCans[action]?.allowed === true))
172
+ .map((s) => ({ key: s.key, label: s.label, icon: s.icon })), [settingsCans, settingsProbeFailed, tI18nComplete]);
173
+ const rows = [...resourceRows, ...settingsRows];
174
+ // A section named in the URL but not listed for this caller falls back to
175
+ // the first listed row, so a stale link lands on a real pane. A legacy
176
+ // `?section=` still names one.
177
+ const named = section ?? searchParams.get('section');
178
+ const requested = parseProjectAdminSection(named);
179
+ const active = (requested && rows.some((r) => r.key === requested) ? requested : undefined) ??
180
+ (rows.some((r) => r.key === DEFAULT_PROJECT_ADMIN_SECTION) ? DEFAULT_PROJECT_ADMIN_SECTION : rows[0]?.key);
181
+ // The rail is final once `settled`: move a legacy `?section=` or a fallen-
182
+ // back segment onto `/admin/<section>`, so a copied link names the pane on
183
+ // screen. A page below a section (`content`) keeps its own URL.
184
+ const legacyQuery = searchParams.get('section') !== null;
185
+ useEffect(() => {
186
+ if (!settled || !active || content)
187
+ return;
188
+ if (!legacyQuery && named === active)
189
+ return;
190
+ if (!legacyQuery && named === null && section === undefined)
191
+ return;
192
+ router.replace(projectAdminHref(projectId, active));
193
+ }, [settled, active, named, legacyQuery, section, content, projectId, router]);
194
+ const membersTab = useSettingsPanelStore((s) => s.membersTab);
195
+ const navigateTo = useCallback((href) => router.push(href), [router]);
196
+ const settingsNav = useMemo(() => buildProjectAdminNav({
197
+ projectId,
198
+ section: active ?? DEFAULT_PROJECT_ADMIN_SECTION,
199
+ membersTab,
200
+ accountId,
201
+ navigateTo,
202
+ }), [projectId, active, membersTab, accountId, navigateTo]);
203
+ // The gate probe failed: say so once, instead of guessing either way.
204
+ if (canAdmin?.isError) {
205
+ return (_jsx(AdminAccessCheckFailed, { onRetry: () => {
206
+ void invalidatePermissionProbes(queryClient, { accountId });
207
+ void queryClient.invalidateQueries({ queryKey: qk.project.detail(projectId) });
208
+ } }));
209
+ }
210
+ if (settled && (receivedDenial(canAdmin) || rows.length === 0)) {
211
+ return _jsx(AdminAccessDenied, { projectId: projectId });
212
+ }
213
+ const ActivePage = !active
214
+ ? null
215
+ : isProjectAdminResource(active)
216
+ ? (RESOURCE_PAGES[active] ?? hostSections[active] ?? null)
217
+ : SETTINGS_PAGES[active];
218
+ const title = tI18nComplete.raw('text73738b374f4b');
219
+ // The Customize bar above names every library and Settings, and holds Members.
220
+ // A library page runs full width; a settings section keeps a short sub-nav
221
+ // of the settings sections only (Jay, 2026-10-29: prod's layout).
222
+ const showRail = !!active && !isProjectAdminResource(active) && settingsRows.length > 1;
223
+ return (_jsx(SettingsNavProvider, { value: settingsNav, children: _jsxs("div", { className: cn('min-h-0 flex-1 overflow-hidden', isMobile || !showRail ? 'flex flex-col' : 'grid'),
224
+ // The Settings page's rail width, so the two settings surfaces are one shape.
225
+ style: isMobile || !showRail ? undefined : { gridTemplateColumns: `${SETTINGS_SIDEBAR_WIDTH_PX}px 1fr` }, children: [!showRail ? null : isMobile ? (_jsxs("nav", { "aria-label": title, className: "border-border/60 bg-background flex shrink-0 flex-col border-b", children: [_jsx("h1", { className: "text-foreground px-4 pt-3 text-sm font-medium", children: title }), _jsx(FadedScrollArea, { orientation: "horizontal", fadeColor: "from-background", className: "min-w-0 flex-1 py-2", children: settled ? (_jsx("div", { className: "flex w-fit items-center gap-2", children: _jsx(Tabs, { value: active, className: "w-fit", children: _jsx(TabsList, { orientation: "horizontal", className: "w-fit", children: settingsRows.map((row) => (_jsx(RailTrigger, { projectId: projectId, row: row, horizontal: true }, row.key))) }) }) })) : (_jsx(Skeleton, { className: "mx-3 h-7 w-64 rounded-md" })) })] })) : (_jsx("aside", { className: "flex min-h-0 flex-col border-r bg-inherit", children: _jsx("nav", { "aria-label": title, className: "flex min-h-0 flex-1 [scrollbar-width:none] flex-col gap-4 overflow-y-auto px-2 pt-4 pb-2 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", children: settled ? (_jsx(Tabs, { value: active, orientation: "vertical", className: "gap-4", children: _jsx(RailGroup, { label: tI18nComplete.raw('text74a883a037bc'), children: settingsRows.map((row) => (_jsx(RailTrigger, { projectId: projectId, row: row }, row.key))) }) })) : (_jsx(RailSkeleton, {})) }) })), _jsx("main", { className: "bg-background flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", children: settled && ActivePage && active ? (_jsx(Suspense, { fallback: _jsx(CapabilitiesSkeleton, {}), children: isProjectAdminResource(active) ? (_jsx("div", { className: cn('flex min-h-0 flex-1 flex-col overflow-hidden', active === 'apps' && HOST_PANE_CLASS), children: content ?? _jsx(ActivePage, { projectId: projectId }) })) : (_jsx("div", { className: "mx-auto flex min-h-0 w-full flex-1 flex-col space-y-6 overflow-y-auto px-4 py-10 pb-20 lg:py-14", children: _jsx(ActivePage, { projectId: projectId }) })) }, active)) : (_jsx(CapabilitiesSkeleton, {})) })] }) }));
226
+ }
227
+ /* ------------------------------------------------------------------ rail */
228
+ /** One row: a real link inside the trigger, since the section is URL state. */
229
+ function RailTrigger({ projectId, row, horizontal = false, }) {
230
+ const Glyph = row.icon;
231
+ return (_jsx(TabsTrigger, { value: row.key, asChild: true, size: horizontal ? undefined : 'md', className: horizontal ? RAIL_HORIZONTAL_ROW_CLASS : RAIL_ROW_CLASS, children: _jsxs(Link, { href: projectAdminHref(projectId, row.key), prefetch: true, children: [_jsx(Glyph, { className: "size-4 shrink-0" }), _jsx("span", { className: cn(!horizontal && 'truncate'), children: row.label })] }) }));
232
+ }
233
+ /** The loaded rail's shape: two labelled groups of icon + label rows. */
234
+ const RAIL_SKELETON_GROUPS = [
235
+ ['w-20', 'w-12', 'w-16', 'w-12', 'w-14', 'w-14', 'w-10'],
236
+ ['w-14', 'w-16', 'w-28', 'w-20', 'w-16', 'w-16'],
237
+ ];
238
+ function RailSkeleton() {
239
+ return (_jsx("div", { className: "space-y-4", "aria-hidden": true, children: RAIL_SKELETON_GROUPS.map((group, g) => (_jsxs("div", { className: "space-y-1", children: [_jsx(Skeleton, { className: "mx-2.5 my-2 h-3 w-20 rounded-sm" }), group.map((width, i) => (_jsxs("div", { className: "flex h-8 items-center gap-2 px-2.5", children: [_jsx(Skeleton, { className: "size-4 shrink-0 rounded-sm" }), _jsx(Skeleton, { className: cn('h-3.5 rounded-sm', width) })] }, i)))] }, g))) }));
240
+ }
241
+ /* ----------------------------------------------------------------- states */
242
+ function AdminAccessDenied({ projectId }) {
243
+ const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
244
+ // The voice rule for a refused action (voice-and-tone.md section 4): name
245
+ // the grant in mono once, then say who can grant it.
246
+ const [beforeGrant, afterGrant] = tI18nComplete.raw('textb24d48611918').split('{grant}');
247
+ return (_jsx("div", { className: "flex min-h-0 flex-1 items-center justify-center px-4 py-8", children: _jsx(EmptyState, { size: "sm", title: tI18nComplete.raw('text078931e34187'), description: _jsxs(_Fragment, { children: [beforeGrant, _jsx("code", { className: "font-mono", children: PROJECT_ACTIONS.PROJECT_SETTINGS_WRITE }), afterGrant] }), action: _jsx(Button, { asChild: true, variant: "outline", size: "sm", children: _jsx(Link, { href: `/projects/${projectId}`, children: tI18nComplete.raw('text37737d817d12') }) }) }) }));
248
+ }
249
+ function AdminAccessCheckFailed({ onRetry }) {
250
+ const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
251
+ return (_jsx("div", { className: "flex min-h-0 flex-1 items-center justify-center px-4 py-8", children: _jsx(ErrorState, { size: "sm", title: tI18nComplete.raw('text9eebeabf6094'), description: tI18nComplete.raw('texta0c2cc1374d9'), action: _jsx(Button, { variant: "outline", size: "sm", onClick: onRetry, children: tI18nComplete.raw('textd8b8392e2c54') }) }) }));
252
+ }
@@ -0,0 +1,20 @@
1
+ import type { SettingsNav } from '../../internal/layout/settings-nav-context.js';
2
+ import { type MembersTab } from '../../internal/stores/settings-panel-store.js';
3
+ import { type ProjectAdminSectionKey } from '../../customize/project-settings/project-admin-sections.js';
4
+ /**
5
+ * The `SettingsNav` for panes mounted in Project admin. Panes still speak the
6
+ * overlay's vocabulary (`navigate('llm-providers')`, `navigate('experimental')`):
7
+ * an id that names a section of this page stays on this page. Everything else
8
+ * (`members`, `review`, account sections, personal overlay tabs) resolves the
9
+ * way it does on every standalone capability page.
10
+ *
11
+ * It catches `navigate(tab)` calls only. A pane that pushes its own route
12
+ * (ConnectorsPage opening a connector) still leaves this page.
13
+ */
14
+ export declare function buildProjectAdminNav(state: {
15
+ projectId: string;
16
+ section: ProjectAdminSectionKey;
17
+ membersTab: MembersTab;
18
+ accountId?: string;
19
+ navigateTo: (href: string) => void;
20
+ }): SettingsNav;
@@ -0,0 +1,41 @@
1
+ import { buildStandaloneCapabilityNav } from '../../customize/shared/standalone-settings-nav.js';
2
+ import { useSettingsPanelStore } from '../../internal/stores/settings-panel-store.js';
3
+ import { projectAdminHref, projectAdminNavTarget } from '../../customize/project-settings/project-admin-sections.js';
4
+ /**
5
+ * The `SettingsNav` for panes mounted in Project admin. Panes still speak the
6
+ * overlay's vocabulary (`navigate('llm-providers')`, `navigate('experimental')`):
7
+ * an id that names a section of this page stays on this page. Everything else
8
+ * (`members`, `review`, account sections, personal overlay tabs) resolves the
9
+ * way it does on every standalone capability page.
10
+ *
11
+ * It catches `navigate(tab)` calls only. A pane that pushes its own route
12
+ * (ConnectorsPage opening a connector) still leaves this page.
13
+ */
14
+ export function buildProjectAdminNav(state) {
15
+ const fallback = buildStandaloneCapabilityNav({
16
+ projectId: state.projectId,
17
+ activeTab: state.section,
18
+ membersTab: state.membersTab,
19
+ accountId: state.accountId,
20
+ navigateTo: state.navigateTo,
21
+ });
22
+ return {
23
+ ...fallback,
24
+ navigate: (tab, opts) => {
25
+ const target = projectAdminNavTarget(tab);
26
+ if (!target) {
27
+ fallback.navigate(tab, opts);
28
+ return;
29
+ }
30
+ if (opts?.membersTab) {
31
+ useSettingsPanelStore.setState({ membersTab: opts.membersTab });
32
+ }
33
+ if (tab === 'channels') {
34
+ state.navigateTo(projectAdminHref(state.projectId, 'connectors', { scope: 'channels' }));
35
+ }
36
+ else if (target !== state.section) {
37
+ state.navigateTo(projectAdminHref(state.projectId, target));
38
+ }
39
+ },
40
+ };
41
+ }
@@ -1,8 +1,17 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useLayoutEffect, useState } from 'react';
4
+ import { HashIcon, XIcon } from '@phosphor-icons/react';
4
5
  import { SessionWelcome } from '../../session/thread/session-welcome.js';
5
- import { useProjectName } from '@kortix/sdk/react';
6
+ import { agentsInSpace, listSpaces } from '@kortix/sdk';
7
+ import { useProjectConfig, useProjectName } from '@kortix/sdk/react';
8
+ import { useTranslations } from '../../i18n/index.js';
9
+ import { AgentMark } from '../../internal/components/agent-mark.js';
10
+ import { agentHref } from '../../internal/lib/capability-tab-routes.js';
11
+ import { useActiveSpace } from '../../internal/stores/active-space-store.js';
12
+ import { uiRoutes } from '../../lib/routes.js';
13
+ import { Button } from '../../primitives/button.js';
14
+ import { UiLink as Link } from '../../providers/ui-provider.js';
6
15
  import { HOME_GREETINGS, HOME_GREETING_STORAGE_KEY, greetingIndexFor, spaceBefore, } from './home-greeting.js';
7
16
  /**
8
17
  * The project-home empty state: ONE centred column.
@@ -36,11 +45,24 @@ import { HOME_GREETINGS, HOME_GREETING_STORAGE_KEY, greetingIndexFor, spaceBefor
36
45
  export function ProjectHomeWelcomeBody({ projectId, composer, sentTurn, onPickSuggestion, }) {
37
46
  // One source for the project name — see `useProjectName`'s doc comment.
38
47
  const name = useProjectName(projectId) ?? '';
48
+ // The active space (the last space opened, or its New session). The heading
49
+ // names the space, its description reads as its brief, and the composer
50
+ // below starts only this space's agents. Leave clears it.
51
+ const [activeSpace, setActiveSpace] = useActiveSpace(projectId);
52
+ const config = useProjectConfig(projectId);
53
+ // Declared or only referenced by an agent; a stale selection (the space was
54
+ // removed) is no space.
55
+ const space = activeSpace
56
+ ? listSpaces(config).find((candidate) => candidate.name === activeSpace)
57
+ : undefined;
58
+ const spaceLabel = space ? space.label || space.name : null;
59
+ const spaceAgents = space ? agentsInSpace(space.name, config?.agents ?? []) : [];
60
+ const tSpaces = useTranslations('spaces');
39
61
  // One word, not two. The name sits inside the sentence in `text-foreground`
40
62
  // while the rest is muted, so the fallback has to read as a NAME in that
41
63
  // slot — "this project" is a description wearing a name's highlight, and it
42
64
  // stretches the line for a case where we know the least.
43
- const displayName = name.trim() || 'it';
65
+ const displayName = spaceLabel ?? (name.trim() || 'it');
44
66
  // Variant 0 on the server and through hydration; the stored visit count
45
67
  // picks the real one before first paint. See `home-greeting.ts`.
46
68
  const [greeting, setGreeting] = useState(HOME_GREETINGS[0]);
@@ -58,7 +80,7 @@ export function ProjectHomeWelcomeBody({ projectId, composer, sentTurn, onPickSu
58
80
  // Storage blocked (private mode, an in-app WebView): variant 0 stays.
59
81
  }
60
82
  }, []);
61
- return (_jsx("div", { className: "relative z-10 flex min-h-0 flex-1 flex-col overflow-y-auto", children: _jsx("div", { className: "m-auto flex w-full max-w-3xl shrink-0 flex-col gap-10 py-8 sm:px-4", children: _jsxs("div", { className: "flex w-full flex-col gap-6", children: [_jsxs("h1", { className: "text-muted-foreground w-full px-4 text-3xl leading-[1.2] tracking-tight text-balance max-sm:text-2xl", hidden: !!sentTurn, children: [greeting.before, ' ', _jsx("span", { className: "text-foreground", children: displayName }), spaceBefore(greeting.after) ? ' ' : '', greeting.after] }), sentTurn ? _jsx("div", { className: "w-full px-4", children: sentTurn }) : null, composer ? _jsx("div", { className: "flex w-full flex-col gap-4", children: composer }) : null] }) }) }));
83
+ return (_jsx("div", { className: "relative z-10 flex min-h-0 flex-1 flex-col overflow-y-auto", children: _jsx("div", { className: "m-auto flex w-full max-w-3xl shrink-0 flex-col gap-10 py-8 sm:px-4", children: _jsxs("div", { className: "flex w-full flex-col gap-6", children: [spaceLabel && !sentTurn ? (_jsxs("div", { className: "flex items-center gap-1 px-4", children: [_jsxs(Link, { href: uiRoutes().space(projectId, space.name) ?? uiRoutes().project(projectId), className: "hover:bg-hover text-foreground flex min-w-0 items-center gap-1 rounded-sm px-1 text-sm font-medium transition-colors", children: [_jsx(HashIcon, { className: "text-muted-foreground size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: spaceLabel })] }), _jsx(Button, { size: "icon-xs", variant: "ghost", onClick: () => setActiveSpace(null), "aria-label": tSpaces('leave', { name: spaceLabel }), children: _jsx(XIcon, {}) }), spaceAgents.length ? (_jsx("span", { role: "group", className: "ml-auto flex items-center gap-1", "aria-label": tSpaces('agents'), children: spaceAgents.map((name) => (_jsx(Link, { href: agentHref(projectId, name), className: "rounded-sm", "aria-label": tSpaces('openAgent', { name }), children: _jsx(AgentMark, { slug: name }) }, name))) })) : null] })) : null, _jsxs("h1", { className: "text-muted-foreground w-full px-4 text-2xl tracking-tight text-balance", hidden: !!sentTurn, children: [greeting.before, ' ', _jsx("span", { className: "text-foreground", children: displayName }), spaceBefore(greeting.after) ? ' ' : '', greeting.after] }), space?.description && !sentTurn ? (_jsx("p", { className: "text-muted-foreground w-full px-4 text-sm text-pretty", children: space.description })) : null, sentTurn ? _jsx("div", { className: "w-full px-4", children: sentTurn }) : null, composer ? _jsx("div", { className: "flex w-full flex-col gap-4", children: composer }) : null] }) }) }));
62
84
  }
63
85
  /** The wallpaper behind the hero. Pointer-transparent and inert — it is
64
86
  * scenery, and nothing in it is reachable. */
@@ -7,7 +7,6 @@ export { ProjectPageHeader } from '../internal/layout/project-page-header.js';
7
7
  export { useCapabilityAccess, useProjectNavRows } from '../internal/layout/project-settings-nav.js';
8
8
  export { SidebarToggle } from '../internal/layout/sidebar-toggle.js';
9
9
  export { activeCapabilityTab, agentHref, capabilityTabHref, channelsHref, remindersHref, reviewHref, } from '../internal/lib/capability-tab-routes.js';
10
- export { detectManifestVersion, manifestFilename, manifestNeedsUpgrade, useProjectManifestVersion, type ManifestVersion, } from '../internal/lib/manifest-version.js';
11
10
  export { CUSTOMIZE_SECTION_ACCESS, CUSTOMIZE_SECTION_GATE_ACTIONS, PROJECT_ACTIONS, isCustomizeSectionVisible, type CustomizeSection, type ProjectAction, } from '../internal/lib/project-actions.js';
12
11
  export { usePermission, usePermissions, usePermissionsFor } from '../internal/lib/use-permission.js';
13
12
  export { PROJECT_PAGE_ACTIONS, useProjectCan, useProjectCans, useProjectPageCans, type CanResult, } from '../internal/lib/use-project-can.js';
@@ -29,4 +28,9 @@ export { CompanyMemoryPage } from './memory/company-memory-page.js';
29
28
  export { ProjectSessionList } from './sidebar/project-session-list.js';
30
29
  export { ProjectSidebar } from './sidebar/project-sidebar.js';
31
30
  export { ShareSessionModal } from './sidebar/modal/share-session-modal.js';
32
- export { formatGoalTime, GoalHealthDot, goalHref, goalNeedsYou, goalOpenAsks, goalProgress, GoalStatusBadge, useGoalClock, useGoalIssueText, } from '../internal/goals/goal-meta.js';
31
+ export { formatGoalTime, goalAssignedTo, GoalHealthDot, goalHref, goalNeedsYou, goalNeedsAttention, goalLastWake, useGoalPerson, useStartGoal, goalOpenAsks, goalProgress, GoalStatusBadge, useGoalClock, useGoalIssueText, } from '../internal/goals/goal-meta.js';
32
+ export { useActiveSpace } from '../internal/stores/active-space-store.js';
33
+ export { ALL_SPACES } from '../customize/shared/catalog/catalog-space-tabs.js';
34
+ export { SpaceFilterTabs, spaceFilterLabel } from './space/space-filter-tabs.js';
35
+ export { useSpaceFilter } from './space/use-space-filter.js';
36
+ export { SPACES_FLAG, spaceScope, useSpacesEnabled } from '../internal/lib/space-scope.js';
@@ -3,11 +3,15 @@
3
3
  * resizable side panel), the project sidebar, sessions list, project home, and the
4
4
  * permission and route helpers they share.
5
5
  */
6
+ // NOTE: ProjectAdminDashboard is intentionally NOT re-exported here. It pulls
7
+ // every capability data hook (connectors/triggers/reminders/models/secrets/
8
+ // review); since Turbopack does not tree-shake this barrel in dev, re-exporting
9
+ // it made all ~44 routes that import `@kortix/ui/workspace` compile that graph.
10
+ // The /admin route imports it directly from '@kortix/ui/workspace/admin/project-admin-dashboard'.
6
11
  export { ProjectPageHeader } from '../internal/layout/project-page-header.js';
7
12
  export { useCapabilityAccess, useProjectNavRows } from '../internal/layout/project-settings-nav.js';
8
13
  export { SidebarToggle } from '../internal/layout/sidebar-toggle.js';
9
14
  export { activeCapabilityTab, agentHref, capabilityTabHref, channelsHref, remindersHref, reviewHref, } from '../internal/lib/capability-tab-routes.js';
10
- export { detectManifestVersion, manifestFilename, manifestNeedsUpgrade, useProjectManifestVersion, } from '../internal/lib/manifest-version.js';
11
15
  export { CUSTOMIZE_SECTION_ACCESS, CUSTOMIZE_SECTION_GATE_ACTIONS, PROJECT_ACTIONS, isCustomizeSectionVisible, } from '../internal/lib/project-actions.js';
12
16
  export { usePermission, usePermissions, usePermissionsFor } from '../internal/lib/use-permission.js';
13
17
  export { PROJECT_PAGE_ACTIONS, useProjectCan, useProjectCans, useProjectPageCans, } from '../internal/lib/use-project-can.js';
@@ -29,4 +33,10 @@ export { CompanyMemoryPage } from './memory/company-memory-page.js';
29
33
  export { ProjectSessionList } from './sidebar/project-session-list.js';
30
34
  export { ProjectSidebar } from './sidebar/project-sidebar.js';
31
35
  export { ShareSessionModal } from './sidebar/modal/share-session-modal.js';
32
- export { formatGoalTime, GoalHealthDot, goalHref, goalNeedsYou, goalOpenAsks, goalProgress, GoalStatusBadge, useGoalClock, useGoalIssueText, } from '../internal/goals/goal-meta.js';
36
+ export { formatGoalTime, goalAssignedTo, GoalHealthDot, goalHref, goalNeedsYou, goalNeedsAttention, goalLastWake, useGoalPerson, useStartGoal, goalOpenAsks, goalProgress, GoalStatusBadge, useGoalClock, useGoalIssueText, } from '../internal/goals/goal-meta.js';
37
+ // Spaces: the per-viewer active space and the space filter the Goals and Artifacts pages share.
38
+ export { useActiveSpace } from '../internal/stores/active-space-store.js';
39
+ export { ALL_SPACES } from '../customize/shared/catalog/catalog-space-tabs.js';
40
+ export { SpaceFilterTabs, spaceFilterLabel } from './space/space-filter-tabs.js';
41
+ export { useSpaceFilter } from './space/use-space-filter.js';
42
+ export { SPACES_FLAG, spaceScope, useSpacesEnabled } from '../internal/lib/space-scope.js';
@@ -1,4 +1,4 @@
1
- import { isMetaAgentName, META_SANDBOX_SLUG } from '../../_vendor/kortix-shared.js';
1
+ import { isMyKortixAgentName, MY_KORTIX_SANDBOX_SLUG } from '../../_vendor/kortix-shared.js';
2
2
  /**
3
3
  * Build the session-create payload from the composer's send options.
4
4
  *
@@ -15,8 +15,8 @@ import { isMetaAgentName, META_SANDBOX_SLUG } from '../../_vendor/kortix-shared.
15
15
  */
16
16
  export function buildNewSessionCreateInput(options = {}) {
17
17
  const input = {};
18
- if (isMetaAgentName(options.agent)) {
19
- input.sandbox_slug = META_SANDBOX_SLUG;
18
+ if (isMyKortixAgentName(options.agent)) {
19
+ input.sandbox_slug = MY_KORTIX_SANDBOX_SLUG;
20
20
  }
21
21
  else if (options.sandbox_slug) {
22
22
  input.sandbox_slug = options.sandbox_slug;
@@ -16,7 +16,7 @@ import { ProjectScope } from '../../internal/project-scope.js';
16
16
  import { useUiComponents, useUiRouter, useUiSearchParams } from '../../providers/ui-provider.js';
17
17
  import { getProjectDetail, listProjectAccessRequests, listProjectSandboxes, setProjectOnboardingComplete, } from '@kortix/sdk';
18
18
  import { contract, invalidateProject, qk } from '@kortix/sdk/react';
19
- import { META_SANDBOX_SLUG, isMetaAgentName } from '../../_vendor/kortix-shared.js';
19
+ import { MY_KORTIX_SANDBOX_SLUG, isMyKortixAgentName } from '../../_vendor/kortix-shared.js';
20
20
  import { AccessRequestsBell } from '../home/access-requests-bell.js';
21
21
  import { notificationCenterOn } from '../../internal/hooks/use-notification-center.js';
22
22
  import { FirstChat } from '../home/first-chat.js';
@@ -70,7 +70,7 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, onboarding: onbo
70
70
  const sandboxItems = sandboxesQuery.data?.items ?? [];
71
71
  const defaultSlug = sandboxesQuery.data?.default_slug ?? 'default';
72
72
  const activeSlug = selectedSlug ?? defaultSlug;
73
- const metaSelected = isMetaAgentName(selectedAgent);
73
+ const metaSelected = isMyKortixAgentName(selectedAgent);
74
74
  useEffect(() => {
75
75
  if (metaSelected)
76
76
  setSelectedSlug(null);
@@ -144,7 +144,7 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, onboarding: onbo
144
144
  const sent = Promise.resolve(send(text, files, {
145
145
  ...options,
146
146
  ...(metaSelected
147
- ? { sandbox_slug: META_SANDBOX_SLUG }
147
+ ? { sandbox_slug: MY_KORTIX_SANDBOX_SLUG }
148
148
  : selectedSlug
149
149
  ? { sandbox_slug: selectedSlug }
150
150
  : {}),
@@ -13,6 +13,11 @@ export const MEMORY_TYPE_ICON = {
13
13
  playbooks: BookOpenIcon,
14
14
  note: NoteIcon,
15
15
  other: FileTextIcon,
16
+ // My Kortix's own page types: no screen lists them, so they read as any other file.
17
+ user: FileTextIcon,
18
+ feedback: FileTextIcon,
19
+ project: FileTextIcon,
20
+ reference: FileTextIcon,
16
21
  };
17
22
  /**
18
23
  * A named person or agent wrote the change. A file with no front-matter author
@@ -9,7 +9,7 @@ import { PlugsIcon } from '@phosphor-icons/react';
9
9
  import { useState } from 'react';
10
10
  import { useTranslations } from '../i18n/index.js';
11
11
  import { ReconnectGitHubButton, RepositoryDisconnectText, useRepositoryDisconnect, } from '../internal/components/repository-disconnected.js';
12
- import { customizePath } from '../lib/routes.js';
12
+ import { adminPath } from '../lib/routes.js';
13
13
  import { Button } from '../primitives/button.js';
14
14
  import { UiLink as Link } from '../providers/ui-provider.js';
15
15
  import { SidebarAlert, SidebarAlertActions, SidebarAlertBody, SidebarAlertText, } from './sidebar/footer/sidebar-alert.js';
@@ -20,7 +20,7 @@ export function ProjectRepositoryDisconnectedAlertView({ projectId, disconnect,
20
20
  const [open, setOpen] = useState(defaultOpen);
21
21
  if (!disconnect)
22
22
  return null;
23
- return (_jsxs(SidebarAlert, { tone: "warning", icon: _jsx(PlugsIcon, { className: "size-4" }), label: t('title'), open: open, onOpenChange: setOpen, children: [_jsx(SidebarAlertBody, { children: _jsx(SidebarAlertText, { children: _jsx(RepositoryDisconnectText, { disconnect: disconnect }) }) }), _jsxs(SidebarAlertActions, { children: [_jsx(ReconnectGitHubButton, { projectId: projectId, className: "w-full" }), _jsx(Button, { asChild: true, size: "sm", variant: "ghost", className: "w-full", children: _jsx(Link, { href: customizePath(projectId, 'settings?section=git'), children: t('openSettings') }) })] })] }));
23
+ return (_jsxs(SidebarAlert, { tone: "warning", icon: _jsx(PlugsIcon, { className: "size-4" }), label: t('title'), open: open, onOpenChange: setOpen, children: [_jsx(SidebarAlertBody, { children: _jsx(SidebarAlertText, { children: _jsx(RepositoryDisconnectText, { disconnect: disconnect }) }) }), _jsxs(SidebarAlertActions, { children: [_jsx(ReconnectGitHubButton, { projectId: projectId, className: "w-full" }), _jsx(Button, { asChild: true, size: "sm", variant: "ghost", className: "w-full", children: _jsx(Link, { href: adminPath(projectId, 'git'), children: t('openSettings') }) })] })] }));
24
24
  }
25
25
  /** Project-wide: the sidebar footer shows it on every project page. */
26
26
  export function ProjectRepositoryDisconnectedAlert({ projectId }) {
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The agent board's dispatch input and keyboard, as pure functions.
3
+ *
4
+ * The input does two jobs, as Claude Code's agent view does. Filter tokens at
5
+ * the start (`s:working`, `a:reviewer`) narrow the board. Anything else is a
6
+ * prompt: Enter starts a new session with it. `@agent` as the first word, or a
7
+ * first word that names a project agent, runs that agent.
8
+ */
9
+ import type { SessionBoardState } from '@kortix/sdk';
10
+ /** Claude Code rejects a dispatch under 4 characters with "Too short". */
11
+ export declare const DISPATCH_MIN_CHARS = 4;
12
+ export interface BoardInput {
13
+ /** States from `s:` tokens; empty for none. */
14
+ states: SessionBoardState[];
15
+ /** Agents from `a:` tokens; empty for none. */
16
+ agents: string[];
17
+ /** The text after the filter tokens: the prompt to dispatch, or nothing. */
18
+ rest: string;
19
+ }
20
+ /** Split the leading `s:` / `a:` filter tokens off the input. An unknown state word is prompt text. */
21
+ export declare function parseBoardInput(input: string): BoardInput;
22
+ export type DispatchResult = {
23
+ kind: 'empty';
24
+ } | {
25
+ kind: 'too_short';
26
+ } | {
27
+ kind: 'dispatch';
28
+ prompt: string;
29
+ agent?: string;
30
+ };
31
+ /**
32
+ * What Enter does with the prompt part of the input. `agents` is the project's
33
+ * agent names; a match is case-insensitive and returns the agent's own spelling.
34
+ */
35
+ export declare function parseDispatch(text: string, agents: readonly string[]): DispatchResult;
36
+ export type BoardKeyAction = 'up' | 'down' | 'peek' | 'open' | 'stop' | 'close';
37
+ /**
38
+ * The board's keys when the list has focus: ↑/↓ move, Space opens or closes the
39
+ * peek, Enter opens the session, x stops it, Escape closes the peek. A key typed
40
+ * into a field, or with a modifier, belongs to the field or the browser.
41
+ */
42
+ export declare function boardKeyAction(event: Pick<KeyboardEvent, 'key' | 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey'>, target: {
43
+ tagName?: string;
44
+ isContentEditable?: boolean;
45
+ } | null): BoardKeyAction | null;
46
+ /** The row the selection moves to; it stays inside the list. */
47
+ export declare function moveBoardSelection(order: readonly string[], current: string | null, step: 1 | -1): string | null;
48
+ /** `?view=board` is the board; any other view (or none) is the list. */
49
+ export type SessionsLayout = 'list' | 'board';
50
+ export declare const sessionsLayoutOf: (view: string | null | undefined) => SessionsLayout;
51
+ /** The query string after the List/Board toggle: `view=board`, or no `view` for the list. */
52
+ export declare function withSessionsLayout(search: string, layout: SessionsLayout): string;