@kortix/ui 0.14.11 → 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 (447) 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/browser/browser-panel.d.ts +2 -1
  18. package/dist/browser/browser-panel.js +12 -2
  19. package/dist/customize/agents/agent-access-text.d.ts +16 -0
  20. package/dist/customize/agents/agent-access-text.js +54 -0
  21. package/dist/customize/agents/agent-approval-rules.d.ts +8 -0
  22. package/dist/customize/agents/agent-approval-rules.js +26 -0
  23. package/dist/customize/agents/agent-authority-card.js +4 -1
  24. package/dist/customize/agents/agent-cover-card.d.ts +4 -1
  25. package/dist/customize/agents/agent-cover-card.js +2 -2
  26. package/dist/customize/agents/agent-detail-aside.d.ts +1 -2
  27. package/dist/customize/agents/agent-detail-aside.js +8 -11
  28. package/dist/customize/agents/agent-drives-section.d.ts +23 -7
  29. package/dist/customize/agents/agent-drives-section.js +107 -41
  30. package/dist/customize/agents/agent-instructions.d.ts +11 -0
  31. package/dist/customize/agents/agent-instructions.js +114 -0
  32. package/dist/customize/agents/agent-model-view.d.ts +17 -0
  33. package/dist/customize/agents/agent-model-view.js +67 -0
  34. package/dist/customize/agents/agent-overview.d.ts +53 -0
  35. package/dist/customize/agents/agent-overview.js +242 -0
  36. package/dist/customize/agents/agent-page-chrome.d.ts +128 -0
  37. package/dist/customize/agents/agent-page-chrome.js +145 -0
  38. package/dist/customize/agents/agent-page.d.ts +13 -1
  39. package/dist/customize/agents/agent-page.js +478 -367
  40. package/dist/customize/agents/agent-pin-button.d.ts +10 -0
  41. package/dist/customize/agents/agent-pin-button.js +20 -0
  42. package/dist/customize/agents/agent-policy-sets-section.d.ts +16 -0
  43. package/dist/customize/agents/agent-policy-sets-section.js +80 -0
  44. package/dist/customize/agents/agent-policy-sets.js +1 -1
  45. package/dist/customize/agents/agent-section-rail.d.ts +21 -0
  46. package/dist/customize/agents/agent-section-rail.js +23 -0
  47. package/dist/customize/agents/agent-share-control.d.ts +4 -3
  48. package/dist/customize/agents/agent-share-control.js +15 -16
  49. package/dist/customize/agents/{agent-people-section.d.ts → agent-share-dialog.d.ts} +3 -1
  50. package/dist/customize/agents/{agent-people-section.js → agent-share-dialog.js} +21 -21
  51. package/dist/customize/agents/agent-tabs.d.ts +95 -0
  52. package/dist/customize/agents/agent-tabs.js +199 -0
  53. package/dist/customize/agents/agents-page.d.ts +0 -21
  54. package/dist/customize/agents/agents-page.js +104 -118
  55. package/dist/customize/agents/connectors-required.d.ts +16 -0
  56. package/dist/customize/agents/connectors-required.js +19 -0
  57. package/dist/customize/agents/create-agent-modal.d.ts +19 -0
  58. package/dist/customize/agents/create-agent-modal.js +94 -0
  59. package/dist/customize/connectors/agent-access.d.ts +4 -4
  60. package/dist/customize/connectors/agent-access.js +7 -10
  61. package/dist/customize/connectors/connector-identity.d.ts +12 -0
  62. package/dist/customize/connectors/connector-identity.js +15 -2
  63. package/dist/customize/connectors/connector-routes.js +2 -2
  64. package/dist/customize/connectors/connectors-page.d.ts +14 -1
  65. package/dist/customize/connectors/connectors-page.js +101 -32
  66. package/dist/customize/connectors/detail/app-page.js +1 -1
  67. package/dist/customize/connectors/detail/connector-agents.js +0 -3
  68. package/dist/customize/connectors/detail/connector-page.d.ts +1 -1
  69. package/dist/customize/connectors/detail/connector-page.js +5 -2
  70. package/dist/customize/connectors/detail/connector-policy-sets.js +1 -1
  71. package/dist/customize/connectors/detail/connector-triggers.js +2 -2
  72. package/dist/customize/connectors/use-agent-access.d.ts +7 -5
  73. package/dist/customize/connectors/use-agent-access.js +2 -6
  74. package/dist/customize/models/models-page.d.ts +7 -1
  75. package/dist/customize/models/models-page.js +2 -2
  76. package/dist/customize/project-settings/project-admin-sections.d.ts +63 -0
  77. package/dist/customize/project-settings/project-admin-sections.js +80 -0
  78. package/dist/customize/project-settings/project-settings-page.d.ts +1 -1
  79. package/dist/customize/project-settings/project-settings-page.js +4 -13
  80. package/dist/customize/project-settings/project-settings-sections.d.ts +5 -5
  81. package/dist/customize/project-settings/project-settings-sections.js +6 -20
  82. package/dist/customize/providers/provider-accordion.js +29 -17
  83. package/dist/customize/providers/provider-connect.js +1 -1
  84. package/dist/customize/providers/provider-sheet.d.ts +4 -1
  85. package/dist/customize/providers/provider-sheet.js +15 -5
  86. package/dist/customize/secrets/secrets-page.d.ts +5 -1
  87. package/dist/customize/secrets/secrets-page.js +2 -2
  88. package/dist/customize/sections/gateway-view.d.ts +10 -2
  89. package/dist/customize/sections/gateway-view.js +16 -4
  90. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.d.ts +12 -5
  91. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +131 -8
  92. package/dist/customize/sections/llm-provider/claude-code-step.d.ts +10 -0
  93. package/dist/customize/sections/llm-provider/claude-code-step.js +32 -0
  94. package/dist/customize/sections/llm-provider/models-tab.js +5 -1
  95. package/dist/customize/sections/view/account-secret-resources-panel.d.ts +5 -3
  96. package/dist/customize/sections/view/account-secret-resources-panel.js +122 -19
  97. package/dist/customize/sections/view/agent-editor-access-fields.d.ts +1 -1
  98. package/dist/customize/sections/view/agent-editor-access-fields.js +8 -4
  99. package/dist/customize/sections/view/agent-editor-basics-fields.d.ts +4 -1
  100. package/dist/customize/sections/view/agent-editor-basics-fields.js +33 -4
  101. package/dist/customize/sections/view/agent-editor-catalog.d.ts +2 -2
  102. package/dist/customize/sections/view/agent-editor-catalog.js +10 -12
  103. package/dist/customize/sections/view/agent-editor-primitives.d.ts +1 -1
  104. package/dist/customize/sections/view/agent-editor-primitives.js +4 -4
  105. package/dist/customize/sections/view/agent-editor.d.ts +37 -26
  106. package/dist/customize/sections/view/agent-editor.js +19 -19
  107. package/dist/customize/sections/view/grant-mode-field.d.ts +8 -20
  108. package/dist/customize/sections/view/grant-mode-field.js +31 -57
  109. package/dist/customize/sections/view/permission-editor.d.ts +3 -1
  110. package/dist/customize/sections/view/permission-editor.js +19 -10
  111. package/dist/customize/sections/view/review-view.d.ts +8 -0
  112. package/dist/customize/sections/view/review-view.js +12 -1
  113. package/dist/customize/sections/view/secret-delivery.js +1 -4
  114. package/dist/customize/sections/view/secrets-view.d.ts +7 -1
  115. package/dist/customize/sections/view/secrets-view.js +42 -6
  116. package/dist/customize/settings/rail.js +2 -8
  117. package/dist/customize/settings/settings-tabs.d.ts +2 -2
  118. package/dist/customize/settings/settings-tabs.js +17 -19
  119. package/dist/customize/settings/tabs/experimental-tab.d.ts +3 -0
  120. package/dist/customize/settings/tabs/experimental-tab.js +6 -1
  121. package/dist/customize/settings/tabs/sandbox-tab.d.ts +4 -6
  122. package/dist/customize/settings/tabs/sandbox-tab.js +9 -9
  123. package/dist/customize/shared/access-list.d.ts +39 -0
  124. package/dist/customize/shared/access-list.js +62 -0
  125. package/dist/customize/shared/agent-resource-scope.d.ts +87 -0
  126. package/dist/customize/shared/agent-resource-scope.js +123 -0
  127. package/dist/customize/shared/capability-library.d.ts +41 -0
  128. package/dist/customize/shared/capability-library.js +271 -0
  129. package/dist/customize/shared/capability-page-shell.d.ts +18 -1
  130. package/dist/customize/shared/capability-page-shell.js +21 -1
  131. package/dist/customize/shared/catalog/catalog-space-tabs.d.ts +14 -0
  132. package/dist/customize/shared/catalog/catalog-space-tabs.js +20 -0
  133. package/dist/customize/shared/customize-tab-bar.d.ts +13 -0
  134. package/dist/customize/shared/customize-tab-bar.js +95 -0
  135. package/dist/customize/shared/entity/entity-modal.d.ts +17 -1
  136. package/dist/customize/shared/entity/entity-modal.js +10 -9
  137. package/dist/customize/shared/leave-guard.d.ts +23 -0
  138. package/dist/customize/shared/leave-guard.js +87 -0
  139. package/dist/customize/shared/standalone-settings-nav.js +4 -1
  140. package/dist/customize/shared/tool-rules.d.ts +11 -0
  141. package/dist/customize/shared/tool-rules.js +29 -0
  142. package/dist/customize/skills/builtin-skill-modal.d.ts +6 -0
  143. package/dist/customize/skills/builtin-skill-modal.js +41 -0
  144. package/dist/customize/skills/skills-page.d.ts +21 -18
  145. package/dist/customize/skills/skills-page.js +16 -110
  146. package/dist/customize/triggers/runtime-triggers.d.ts +17 -0
  147. package/dist/customize/triggers/runtime-triggers.js +57 -0
  148. package/dist/customize/triggers/schedule/event-trigger-copy.js +2 -2
  149. package/dist/customize/triggers/schedule/post-to-field.js +2 -2
  150. package/dist/customize/triggers/schedule/schedule-copy.d.ts +11 -6
  151. package/dist/customize/triggers/schedule/schedule-copy.js +29 -8
  152. package/dist/customize/triggers/schedule/schedule-detail-sheet.js +7 -3
  153. package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +26 -1
  154. package/dist/customize/triggers/schedule/trigger-composer-logic.js +64 -3
  155. package/dist/customize/triggers/schedule/trigger-composer.js +57 -20
  156. package/dist/customize/triggers/schedule/trigger-edit-logic.js +18 -5
  157. package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -0
  158. package/dist/customize/triggers/schedule/trigger-filter.js +16 -0
  159. package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -0
  160. package/dist/customize/triggers/schedule/trigger-toast.js +2 -1
  161. package/dist/customize/triggers/schedule/use-trigger-mutations.d.ts +1 -1
  162. package/dist/customize/triggers/schedule/use-trigger-mutations.js +1 -1
  163. package/dist/customize/triggers/schedule/when-app.d.ts +15 -0
  164. package/dist/customize/triggers/schedule/when-app.js +21 -0
  165. package/dist/customize/triggers/schedule/when-change-request.d.ts +10 -0
  166. package/dist/customize/triggers/schedule/when-change-request.js +15 -0
  167. package/dist/customize/triggers/schedule-view.d.ts +17 -3
  168. package/dist/customize/triggers/schedule-view.js +46 -16
  169. package/dist/customize/triggers/triggers-page.d.ts +3 -3
  170. package/dist/customize/triggers/triggers-page.js +2 -2
  171. package/dist/customize/use-configure-thread.d.ts +8 -2
  172. package/dist/customize/use-configure-thread.js +30 -18
  173. package/dist/files/project/components/change-request-detail-dialog.js +2 -3
  174. package/dist/files/project/components/drive-explorer.js +6 -5
  175. package/dist/files/project/explorer-source.d.ts +3 -0
  176. package/dist/files/project/upload-batch.d.ts +3 -3
  177. package/dist/files/project/upload-batch.js +7 -6
  178. package/dist/files/runtime/sandbox-explorer-source.js +3 -3
  179. package/dist/i18n/en.d.ts +1331 -53
  180. package/dist/i18n/en.js +1423 -145
  181. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +16 -7
  182. package/dist/internal/auth/auth-primitives.d.ts +1 -3
  183. package/dist/internal/auth/auth-primitives.js +2 -2
  184. package/dist/internal/billing/session-cost-format.d.ts +1 -0
  185. package/dist/internal/billing/session-cost-format.js +11 -0
  186. package/dist/internal/components/agent-mark.d.ts +12 -1
  187. package/dist/internal/components/agent-mark.js +34 -11
  188. package/dist/internal/components/nav-rail.d.ts +22 -0
  189. package/dist/internal/components/nav-rail.js +16 -0
  190. package/dist/internal/components/repository-disconnected.js +2 -2
  191. package/dist/internal/goals/goal-meta.d.ts +15 -1
  192. package/dist/internal/goals/goal-meta.js +42 -2
  193. package/dist/internal/hooks/projects/use-agent-config.d.ts +11 -7
  194. package/dist/internal/hooks/projects/use-agent-config.js +28 -11
  195. package/dist/internal/hooks/use-slash-focus.d.ts +7 -1
  196. package/dist/internal/hooks/use-slash-focus.js +9 -3
  197. package/dist/internal/layout/project-capability-nav.d.ts +24 -0
  198. package/dist/internal/layout/project-capability-nav.js +86 -0
  199. package/dist/internal/layout/project-page-header.d.ts +1 -1
  200. package/dist/internal/layout/project-page-header.js +1 -1
  201. package/dist/internal/layout/project-settings-nav.d.ts +3 -2
  202. package/dist/internal/layout/project-settings-nav.js +5 -3
  203. package/dist/internal/lib/browser-noise/rules/extensions.js +3 -0
  204. package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
  205. package/dist/internal/lib/capability-tab-routes.d.ts +34 -3
  206. package/dist/internal/lib/capability-tab-routes.js +76 -8
  207. package/dist/internal/lib/manifest-health.d.ts +10 -0
  208. package/dist/internal/lib/manifest-health.js +20 -0
  209. package/dist/internal/lib/pixel-mark.d.ts +4 -1
  210. package/dist/internal/lib/pixel-mark.js +33 -6
  211. package/dist/internal/lib/project-actions.d.ts +1 -1
  212. package/dist/internal/lib/project-actions.js +0 -4
  213. package/dist/internal/lib/provider-branding.js +2 -0
  214. package/dist/internal/lib/space-scope.d.ts +29 -0
  215. package/dist/internal/lib/space-scope.js +28 -0
  216. package/dist/internal/lib/use-project-feature-flags.js +3 -3
  217. package/dist/internal/lib/web-notifications.d.ts +74 -8
  218. package/dist/internal/lib/web-notifications.js +243 -117
  219. package/dist/internal/notifications/notification-rows.d.ts +14 -7
  220. package/dist/internal/notifications/notification-rows.js +21 -14
  221. package/dist/internal/notifications/session-toast-cards.d.ts +2 -2
  222. package/dist/internal/reminders/reminder-format.d.ts +6 -2
  223. package/dist/internal/reminders/reminder-format.js +7 -1
  224. package/dist/internal/stores/active-space-store.d.ts +35 -0
  225. package/dist/internal/stores/active-space-store.js +29 -0
  226. package/dist/internal/stores/kortix-computer-store.d.ts +2 -1
  227. package/dist/internal/stores/kortix-computer-store.js +18 -7
  228. package/dist/internal/stores/pinned-agents-store.d.ts +26 -0
  229. package/dist/internal/stores/pinned-agents-store.js +20 -0
  230. package/dist/internal/stores/session-panel-memory-store.js +3 -0
  231. package/dist/internal/stores/turn-attention-store.d.ts +5 -4
  232. package/dist/lib/routes.d.ts +16 -1
  233. package/dist/lib/routes.js +15 -3
  234. package/dist/markdown/doc-editor/doc-embed.d.ts +31 -0
  235. package/dist/markdown/doc-editor/doc-embed.js +168 -0
  236. package/dist/markdown/doc-editor/doc-extensions.d.ts +26 -0
  237. package/dist/markdown/doc-editor/doc-extensions.js +149 -0
  238. package/dist/markdown/doc-editor/doc-menus.d.ts +9 -0
  239. package/dist/markdown/doc-editor/doc-menus.js +56 -0
  240. package/dist/markdown/doc-editor/markdown.d.ts +12 -0
  241. package/dist/markdown/doc-editor/markdown.js +140 -0
  242. package/dist/markdown/genui/components/inline.d.ts +1 -1
  243. package/dist/primitives/badge.d.ts +1 -1
  244. package/dist/primitives/button.d.ts +1 -1
  245. package/dist/primitives/pixel-kortix-mark.d.ts +5 -4
  246. package/dist/primitives/pixel-kortix-mark.js +5 -15
  247. package/dist/primitives/tag.d.ts +1 -1
  248. package/dist/primitives/textarea.js +14 -0
  249. package/dist/primitives/toast.d.ts +2 -0
  250. package/dist/primitives/toast.js +4 -2
  251. package/dist/providers/ui-provider.d.ts +16 -0
  252. package/dist/session/actions/session-label.d.ts +1 -1
  253. package/dist/session/actions/session-label.js +3 -3
  254. package/dist/session/agents/agent-model.d.ts +92 -0
  255. package/dist/session/agents/agent-model.js +123 -0
  256. package/dist/session/agents/agent-state-mark.d.ts +10 -0
  257. package/dist/session/agents/agent-state-mark.js +22 -0
  258. package/dist/session/agents/agent-strip.d.ts +58 -0
  259. package/dist/session/agents/agent-strip.js +259 -0
  260. package/dist/session/agents/held-messages.d.ts +33 -0
  261. package/dist/session/agents/held-messages.js +50 -0
  262. package/dist/session/agents/legacy-subagent-chat.d.ts +11 -0
  263. package/dist/session/agents/legacy-subagent-chat.js +19 -0
  264. package/dist/session/agents/session-peek.d.ts +20 -0
  265. package/dist/session/agents/session-peek.js +67 -0
  266. package/dist/session/agents/session-prompt.d.ts +13 -0
  267. package/dist/session/agents/session-prompt.js +18 -0
  268. package/dist/session/agents/steer-session.d.ts +13 -0
  269. package/dist/session/agents/steer-session.js +29 -0
  270. package/dist/session/agents/subagent-dialog-content.d.ts +11 -0
  271. package/dist/session/agents/subagent-dialog-content.js +115 -0
  272. package/dist/session/agents/subagent-view.d.ts +8 -0
  273. package/dist/session/agents/subagent-view.js +18 -0
  274. package/dist/session/agents/tasks-panel.d.ts +13 -0
  275. package/dist/session/agents/tasks-panel.js +41 -0
  276. package/dist/session/agents/workflow-run-controls.d.ts +43 -0
  277. package/dist/session/agents/workflow-run-controls.js +141 -0
  278. package/dist/session/composer/ComposerCard.d.ts +1 -1
  279. package/dist/session/composer/ComposerCard.js +3 -3
  280. package/dist/session/composer/agent-selector.js +13 -19
  281. package/dist/session/composer/composer-underbar.d.ts +3 -1
  282. package/dist/session/composer/composer-underbar.js +2 -2
  283. package/dist/session/composer/composer.d.ts +5 -0
  284. package/dist/session/composer/composer.js +16 -10
  285. package/dist/session/composer/editor/composer-editor.js +19 -8
  286. package/dist/session/composer/editor/ultracode.d.ts +34 -0
  287. package/dist/session/composer/editor/ultracode.js +127 -0
  288. package/dist/session/composer/index.d.ts +1 -0
  289. package/dist/session/composer/index.js +1 -0
  290. package/dist/session/composer/send-blockers.d.ts +1 -11
  291. package/dist/session/composer/send-blockers.js +1 -11
  292. package/dist/session/composer/session-composer-readiness.d.ts +1 -28
  293. package/dist/session/composer/session-composer-readiness.js +5 -16
  294. package/dist/session/header/reminder-parts.d.ts +1 -1
  295. package/dist/session/header/session-site-header.js +6 -3
  296. package/dist/session/header/subagent-hover-card.d.ts +0 -2
  297. package/dist/session/header/subagent-hover-card.js +1 -4
  298. package/dist/session/models/claude-connection-slot.d.ts +11 -0
  299. package/dist/session/models/claude-connection-slot.js +30 -0
  300. package/dist/session/models/model-availability.d.ts +3 -1
  301. package/dist/session/models/model-availability.js +3 -0
  302. package/dist/session/models/model-selector.js +11 -12
  303. package/dist/session/models/model-tags.d.ts +9 -0
  304. package/dist/session/models/model-tags.js +8 -0
  305. package/dist/session/panel/easy/detail-view.js +7 -0
  306. package/dist/session/panel/easy/easy-panel.js +1 -1
  307. package/dist/session/panel/easy/step-icon.js +5 -1
  308. package/dist/session/panel/mobile-tool-drawer.js +7 -3
  309. package/dist/session/panel/open-session-quick-view.js +1 -1
  310. package/dist/session/panel/session-action-panel-column.js +1 -1
  311. package/dist/session/panel/session-desktop.js +41 -14
  312. package/dist/session/panel/session-panel-provider.d.ts +1 -1
  313. package/dist/session/panel/session-panel-provider.js +7 -11
  314. package/dist/session/prompts/question-prompt.js +3 -1
  315. package/dist/session/status/session-error-banner.js +4 -1
  316. package/dist/session/thread/session-chat.js +286 -296
  317. package/dist/session/thread/session-context-modal.js +29 -10
  318. package/dist/session/thread/session-context-spawned-sessions.d.ts +13 -0
  319. package/dist/session/thread/session-context-spawned-sessions.js +44 -0
  320. package/dist/session/thread/session-context-sub-sessions.js +3 -8
  321. package/dist/session/thread/transcript.d.ts +3 -0
  322. package/dist/session/thread/transcript.js +32 -8
  323. package/dist/session/tool/shared/full-view-action.d.ts +29 -0
  324. package/dist/session/tool/shared/full-view-action.js +43 -0
  325. package/dist/session/tool/tool-part-renderer.js +10 -2
  326. package/dist/session/tool/tools/agent-message-tool.js +2 -2
  327. package/dist/session/tool/tools/agent-spawn-tool.js +2 -2
  328. package/dist/session/tool/tools/agent-status-tool.js +2 -2
  329. package/dist/session/tool/tools/kortix-action-tool.d.ts +2 -0
  330. package/dist/session/tool/tools/kortix-action-tool.js +148 -0
  331. package/dist/session/tool/tools/kortix-tool-card.d.ts +83 -0
  332. package/dist/session/tool/tools/kortix-tool-card.js +186 -0
  333. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +11 -0
  334. package/dist/session/tool/tools/multi-agent-tool-bodies.js +141 -0
  335. package/dist/session/tool/tools/multi-agent-tool-data.d.ts +63 -0
  336. package/dist/session/tool/tools/multi-agent-tool-data.js +118 -0
  337. package/dist/session/tool/tools/multi-agent-tools.d.ts +9 -0
  338. package/dist/session/tool/tools/multi-agent-tools.js +38 -0
  339. package/dist/session/tool/tools/question-tool.js +1 -1
  340. package/dist/session/tool/tools/register.d.ts +3 -0
  341. package/dist/session/tool/tools/register.js +3 -0
  342. package/dist/session/tool/tools/session-spawn-tool.js +2 -2
  343. package/dist/session/tool/tools/task-tool.d.ts +1 -1
  344. package/dist/session/tool/tools/task-tool.js +29 -41
  345. package/dist/session/tool/tools/workflow-progress.d.ts +34 -0
  346. package/dist/session/tool/tools/workflow-progress.js +186 -0
  347. package/dist/session/tool/tools/workflow-run.d.ts +128 -0
  348. package/dist/session/tool/tools/workflow-run.js +251 -0
  349. package/dist/session/tool/tools/workflow-tool.d.ts +9 -0
  350. package/dist/session/tool/tools/workflow-tool.js +253 -0
  351. package/dist/session/turn/notice-batch-group.d.ts +12 -0
  352. package/dist/session/turn/notice-batch-group.js +17 -0
  353. package/dist/session/turn/peer-message-row.d.ts +14 -0
  354. package/dist/session/turn/peer-message-row.js +57 -0
  355. package/dist/session/turn/subagent-notice-row.d.ts +4 -0
  356. package/dist/session/turn/subagent-notice-row.js +50 -0
  357. package/dist/session/turn/subagent-notice.d.ts +58 -0
  358. package/dist/session/turn/subagent-notice.js +111 -0
  359. package/dist/session/turn/user-message.d.ts +5 -4
  360. package/dist/session/turn/user-message.js +31 -10
  361. package/dist/styles/tokens.css +2 -0
  362. package/dist/styles.css +1 -1
  363. package/dist/terminal/session-terminal-connect-bar.js +1 -1
  364. package/dist/workspace/admin/project-admin-dashboard.d.ts +53 -0
  365. package/dist/workspace/admin/project-admin-dashboard.js +252 -0
  366. package/dist/workspace/admin/project-admin-nav.d.ts +20 -0
  367. package/dist/workspace/admin/project-admin-nav.js +41 -0
  368. package/dist/workspace/home/welcome-body.js +25 -3
  369. package/dist/workspace/index.d.ts +6 -2
  370. package/dist/workspace/index.js +12 -2
  371. package/dist/workspace/layout/new-session-create.js +3 -3
  372. package/dist/workspace/layout/project-home.js +3 -3
  373. package/dist/workspace/memory/memory-labels.js +5 -0
  374. package/dist/workspace/repository-disconnected.js +2 -2
  375. package/dist/workspace/sessions/board-dispatch.d.ts +52 -0
  376. package/dist/workspace/sessions/board-dispatch.js +110 -0
  377. package/dist/workspace/sessions/board-grouping.d.ts +63 -0
  378. package/dist/workspace/sessions/board-grouping.js +141 -0
  379. package/dist/workspace/sessions/board-peek.d.ts +15 -0
  380. package/dist/workspace/sessions/board-peek.js +54 -0
  381. package/dist/workspace/sessions/board-state-mark.d.ts +15 -0
  382. package/dist/workspace/sessions/board-state-mark.js +24 -0
  383. package/dist/workspace/sessions/project-sessions-view.js +42 -31
  384. package/dist/workspace/sessions/sessions-board.d.ts +12 -0
  385. package/dist/workspace/sessions/sessions-board.js +214 -0
  386. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +46 -0
  387. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +85 -0
  388. package/dist/workspace/sidebar/footer/sidebar-alert.js +1 -1
  389. package/dist/workspace/sidebar/new-agent-modal-provider.d.ts +12 -0
  390. package/dist/workspace/sidebar/new-agent-modal-provider.js +19 -0
  391. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  392. package/dist/workspace/sidebar/project-nav-items.js +53 -5
  393. package/dist/workspace/sidebar/project-session-list.js +35 -12
  394. package/dist/workspace/sidebar/project-sidebar.js +6 -3
  395. package/dist/workspace/sidebar/session-filter-menu.js +2 -1
  396. package/dist/workspace/space/space-blocks.d.ts +25 -0
  397. package/dist/workspace/space/space-blocks.js +124 -0
  398. package/dist/workspace/space/space-filter-tabs.d.ts +17 -0
  399. package/dist/workspace/space/space-filter-tabs.js +31 -0
  400. package/dist/workspace/space/space-page.d.ts +24 -0
  401. package/dist/workspace/space/space-page.js +157 -0
  402. package/dist/workspace/space/space-room.d.ts +20 -0
  403. package/dist/workspace/space/space-room.js +27 -0
  404. package/dist/workspace/space/space-tab-menu.d.ts +14 -0
  405. package/dist/workspace/space/space-tab-menu.js +127 -0
  406. package/dist/workspace/space/space-tab-panels.d.ts +9 -0
  407. package/dist/workspace/space/space-tab-panels.js +203 -0
  408. package/dist/workspace/space/space-templates.d.ts +34 -0
  409. package/dist/workspace/space/space-templates.js +71 -0
  410. package/dist/workspace/space/use-space-filter.d.ts +10 -0
  411. package/dist/workspace/space/use-space-filter.js +40 -0
  412. package/dist/workspace/space/use-space-manifest.d.ts +8 -0
  413. package/dist/workspace/space/use-space-manifest.js +27 -0
  414. package/dist/workspace/spaces/space-timeline.js +2 -2
  415. package/package.json +56 -53
  416. package/skills/kortix-ui/SKILL.md +1 -1
  417. package/skills/kortix-ui/references/custom-dashboard.md +10 -4
  418. package/skills/kortix-ui/references/modules.md +11 -9
  419. package/dist/_vendor/shared/meta-agent.d.ts +0 -7
  420. package/dist/customize/agents/agent-grant-pages.d.ts +0 -37
  421. package/dist/customize/agents/agent-grant-pages.js +0 -226
  422. package/dist/customize/agents/agent-triggers-section.d.ts +0 -17
  423. package/dist/customize/agents/agent-triggers-section.js +0 -109
  424. package/dist/customize/migrate-to-v2/index.d.ts +0 -5
  425. package/dist/customize/migrate-to-v2/index.js +0 -5
  426. package/dist/customize/migrate-to-v2/migration-prompt.d.ts +0 -16
  427. package/dist/customize/migrate-to-v2/migration-prompt.js +0 -59
  428. package/dist/customize/migrate-to-v2/upgrade-defs.d.ts +0 -30
  429. package/dist/customize/migrate-to-v2/upgrade-defs.js +0 -43
  430. package/dist/customize/migrate-to-v2/upgrade-view.d.ts +0 -32
  431. package/dist/customize/migrate-to-v2/upgrade-view.js +0 -152
  432. package/dist/customize/migrate-to-v2/use-run-upgrade.d.ts +0 -18
  433. package/dist/customize/migrate-to-v2/use-run-upgrade.js +0 -16
  434. package/dist/customize/shared/capability-tabs.d.ts +0 -3
  435. package/dist/customize/shared/capability-tabs.js +0 -137
  436. package/dist/customize/skills/skill-scope.d.ts +0 -14
  437. package/dist/customize/skills/skill-scope.js +0 -18
  438. package/dist/internal/lib/manifest-version.d.ts +0 -21
  439. package/dist/internal/lib/manifest-version.js +0 -55
  440. package/dist/session/composer/hooks/use-composer-escape-stop.d.ts +0 -6
  441. package/dist/session/composer/hooks/use-composer-escape-stop.js +0 -28
  442. package/dist/session/thread/sub-session-modal-content.d.ts +0 -8
  443. package/dist/session/thread/sub-session-modal-content.js +0 -23
  444. package/dist/session/thread/sub-session-modal.d.ts +0 -2
  445. package/dist/session/thread/sub-session-modal.js +0 -14
  446. package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.d.ts +0 -13
  447. package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.js +0 -48
@@ -1,24 +1,14 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { PIXEL_KORTIX_ROWS } from '../_vendor/kortix-shared.js';
3
4
  import { useId } from 'react';
4
5
  import { cn } from '../lib/utils.js';
5
6
  /**
6
- * The Kortix symbol (`kortix-logo.tsx`, `variant="icon"`) sampled onto a
7
- * 12 × 10 grid. `#` is a cell the symbol fully covers; `+` is a cell on a curve
8
- * that it only partly covers, drawn as a checker so the curves read as dither.
7
+ * The Kortix symbol on a 12 × 10 grid: `#` a full cell, `+` a curve cell drawn
8
+ * as a checker. The rows live in `@kortix/shared/pixel-mark` so the TUI splash
9
+ * draws the same symbol; this module re-exports them under the same name.
9
10
  */
10
- export const PIXEL_KORTIX_ROWS = [
11
- '## ## ##',
12
- '## ## ##',
13
- '+#+ ## +#+',
14
- ' ##+ ## +## ',
15
- ' ######## ',
16
- ' ######## ',
17
- ' ##+ ## +## ',
18
- '+#+ ## +#+',
19
- '## ## ##',
20
- '## ## ##',
21
- ];
11
+ export { PIXEL_KORTIX_ROWS };
22
12
  /** Cell size and the gap after it, in viewBox units. At the default size one
23
13
  * unit is one CSS pixel, so cells and the 1px checker land on whole pixels. */
24
14
  const CELL = 5;
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const tagVariants: (props?: ({
4
- variant?: "custom" | "warning" | "default" | "free" | "new" | "latest" | null | undefined;
4
+ variant?: "custom" | "warning" | "default" | "new" | "free" | "latest" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  declare function Tag({ className, variant, ...props }: React.ComponentProps<'span'> & VariantProps<typeof tagVariants>): React.JSX.Element;
7
7
  export { Tag, tagVariants };
@@ -4,11 +4,25 @@ import { inputFocusClasses, inputInvalidClasses, inputSurfaceClasses, inputTrans
4
4
  import { cn } from '../lib/utils.js';
5
5
  import * as React from 'react';
6
6
  import { useImperativeHandle } from 'react';
7
+ const useIsomorphicLayoutEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
7
8
  export const useAutosizeTextArea = ({ textAreaRef, triggerAutoSize, maxHeight = Number.MAX_SAFE_INTEGER, minHeight = 0, }) => {
8
9
  const [init, setInit] = React.useState(true);
9
10
  const [currentHeight, setCurrentHeight] = React.useState(minHeight);
10
11
  const previousContentRef = React.useRef(triggerAutoSize);
11
12
  const resizeTimeoutRef = React.useRef(null);
13
+ // Size an empty textarea before the first paint. Otherwise it paints at the
14
+ // browser's `rows` height and the resize below snaps it 100 ms later: a
15
+ // visible jump (the New agent modal's "What it does" field).
16
+ useIsomorphicLayoutEffect(() => {
17
+ const textAreaElement = textAreaRef.current;
18
+ if (!textAreaElement)
19
+ return;
20
+ textAreaElement.style.minHeight = `${minHeight + 6}px`;
21
+ if (maxHeight > minHeight)
22
+ textAreaElement.style.maxHeight = `${maxHeight}px`;
23
+ if (textAreaElement.value.trim() === '')
24
+ textAreaElement.style.height = `${minHeight}px`;
25
+ }, [textAreaRef, minHeight, maxHeight]);
12
26
  React.useEffect(() => {
13
27
  const offsetBorder = 6;
14
28
  const textAreaElement = textAreaRef.current;
@@ -10,6 +10,8 @@ type ToastOptions = {
10
10
  description?: string;
11
11
  duration?: number;
12
12
  id?: string | number;
13
+ /** Runs when the toast leaves: a dismissal or its timeout. */
14
+ onClose?: () => void;
13
15
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'top-center' | 'bottom-center';
14
16
  /** Text links under the body, joined by a dot. */
15
17
  actions?: ToastAction[];
@@ -34,6 +34,8 @@ const toastData = (options, duration, isMobile) => ({
34
34
  duration,
35
35
  position: isMobile ? 'top-center' : options?.position || DEFAULT_POSITION,
36
36
  });
37
+ /** sonner's two ways off the screen, as one callback. */
38
+ const closeCallbacks = (onClose) => onClose ? { onDismiss: onClose, onAutoClose: onClose } : {};
37
39
  /** A 16px filled status disc. The mark inside is drawn in the card's own color. */
38
40
  function Disc({ className, children }) {
39
41
  return (
@@ -150,7 +152,7 @@ function UndoToastCard({ message, icon, undoLabel, onUndo, onDismiss, }) {
150
152
  */
151
153
  const renderToast = (message, variant, options, duration) => {
152
154
  const isMobile = window.innerWidth <= 768;
153
- return toast.custom((t) => (_jsx(ToastCard, { message: message, icon: toastIcon(variant), variant: variant, options: options, onDismiss: () => toast.dismiss(t) })), toastData(options, duration, isMobile));
155
+ return toast.custom((t) => (_jsx(ToastCard, { message: message, icon: toastIcon(variant), variant: variant, options: options, onDismiss: () => toast.dismiss(t) })), { ...toastData(options, duration, isMobile), ...closeCallbacks(options?.onClose) });
154
156
  };
155
157
  export const successToast = (message, options) => {
156
158
  renderToast(message, 'success', options, options?.duration || DEFAULT_DURATION);
@@ -216,7 +218,7 @@ export const customToast = (render, options) => {
216
218
  const isMobile = window.innerWidth <= 768;
217
219
  return toast.custom((t) => render(() => toast.dismiss(t)), {
218
220
  ...toastData(options, options.duration ?? DEFAULT_DURATION, isMobile),
219
- ...(options.onClose ? { onDismiss: options.onClose, onAutoClose: options.onClose } : {}),
221
+ ...closeCallbacks(options.onClose),
220
222
  });
221
223
  };
222
224
  /**
@@ -320,6 +320,22 @@ export interface UiHostComponents {
320
320
  * (apps/web: its mobile app). Without it, nothing is shown.
321
321
  */
322
322
  HomeAnnouncement?: React.ComponentType;
323
+ /**
324
+ * One room's conversation (flag `agent_rooms`): its messages and a composer,
325
+ * by room NAME. A room that does not exist yet shows an empty state, and the
326
+ * first post creates it with `emptyTopic`. A space page renders its own room
327
+ * (the room named like the space's slug) through it, `fill` in its room
328
+ * tab: no frame, no header, the container's full height. Without it, a link
329
+ * to the rooms page.
330
+ */
331
+ RoomPanel?: React.ComponentType<{
332
+ projectId: string;
333
+ roomName: string;
334
+ emptyTopic?: string;
335
+ fill?: boolean;
336
+ /** Replaces the room's one-line intro above its first message (the space page's room tab). */
337
+ intro?: React.ReactNode;
338
+ }>;
323
339
  /** Who can open a session, and its public link. Without it, the header has no Share button. */
324
340
  ShareSessionModal?: React.ComponentType<{
325
341
  projectId: string;
@@ -27,7 +27,7 @@ export interface SessionSource {
27
27
  /** For trigger-fired sessions: the kortix.yaml trigger slug. */
28
28
  triggerSlug: string | null;
29
29
  }
30
- /** The platform meta coordinator — drives other sessions from its own sandbox. */
30
+ /** My Kortix (slug `mykortix`, `meta` on an older session), the built-in agent — drives other sessions from its own sandbox. */
31
31
  export declare function isMetaCoordinatorSession(session: ProjectSession): boolean;
32
32
  /**
33
33
  * Viewer-relative ownership marker.
@@ -1,8 +1,8 @@
1
- import { stripChatMentionMarkup } from '../../_vendor/kortix-shared.js';
1
+ import { isMyKortixAgentName, stripChatMentionMarkup } from '../../_vendor/kortix-shared.js';
2
2
  import { isLegacyMigratedSession, SESSION_LIST_STATUS, sessionListStatus, } from '@kortix/sdk';
3
- /** The platform meta coordinator — drives other sessions from its own sandbox. */
3
+ /** My Kortix (slug `mykortix`, `meta` on an older session), the built-in agent — drives other sessions from its own sandbox. */
4
4
  export function isMetaCoordinatorSession(session) {
5
- return session.agent_name === 'meta';
5
+ return isMyKortixAgentName(session.agent_name);
6
6
  }
7
7
  /**
8
8
  * Viewer-relative ownership marker.
@@ -0,0 +1,92 @@
1
+ /**
2
+ * The agents line's model: which child sessions it lists, in which group and
3
+ * in which order, and what the one line under the composer says. Pure, so the
4
+ * rules are tested without a render tree.
5
+ *
6
+ * Claude Code's agent panel lists the agents a session started (subagents and
7
+ * teammates) under the prompt; Kortix lists the child sessions of this session.
8
+ * A teammate (`team_lead_session_id` = this session) goes under "Team". The
9
+ * sessions a workflow run started are that run's agents, so they stay out of
10
+ * the agent rows: the "Workflows" group shows the run instead.
11
+ */
12
+ import type { ProjectSession, SessionBoardState } from '@kortix/sdk';
13
+ /** The states a row draws, Claude's agent view states. */
14
+ export type AgentRowState = SessionBoardState;
15
+ export interface AgentRow {
16
+ sessionId: string;
17
+ /**
18
+ * What the line calls it: the agent handle, else the session name, else the
19
+ * agent's display name (`kortix` → "Kortix"), never a raw slug.
20
+ */
21
+ handle: string;
22
+ /** The project agent slug it runs as. */
23
+ agent: string | null;
24
+ /** The handle is a name of its own (a handle or a session name), so "runs as <agent>" adds something. */
25
+ named: boolean;
26
+ state: AgentRowState;
27
+ /** What it waits for, when `needs_input`. */
28
+ attention: 'question' | 'approval' | null;
29
+ /** One line: the result excerpt, else the session title. */
30
+ line: string | null;
31
+ /** Epoch ms of its newest activity, for the order inside a state. */
32
+ activityMs: number;
33
+ /** Epoch ms its current turn started, while it works and the API says when. */
34
+ workingSinceMs: number | null;
35
+ }
36
+ /** A child older than this that has settled is no longer "recent": it leaves the line. */
37
+ export declare const RECENT_MS: number;
38
+ /** The popover lists at most this many agent rows per group. */
39
+ export declare const MAX_ROWS = 20;
40
+ /** Board state of a session row: the API's `board_state`, else derived from the older fields. */
41
+ export declare function boardStateOf(session: ProjectSession): AgentRowState;
42
+ /** True while a row works or waits on its person: it can be stopped. */
43
+ export declare function isActive(state: AgentRowState): boolean;
44
+ /**
45
+ * A spawned session's own title. pi named a child `<description> (@agent
46
+ * subagent)` until 2026-10-31, and those rows keep the name: every surface shows
47
+ * the agent apart (`agent_name`), never in the title.
48
+ */
49
+ export declare function subagentTitle(name: string): string;
50
+ export declare function agentRowOf(session: ProjectSession): AgentRow;
51
+ export interface StripGroups {
52
+ agents: AgentRow[];
53
+ team: AgentRow[];
54
+ }
55
+ /**
56
+ * The agent rows of a session: its children and its teammates, each once.
57
+ * `exclude` holds the sessions a workflow run owns (its agents and its runner).
58
+ * A settled row older than {@link RECENT_MS} leaves the line.
59
+ */
60
+ export declare function stripGroups(input: {
61
+ leadSessionId: string;
62
+ children: readonly ProjectSession[];
63
+ teammates: readonly ProjectSession[];
64
+ exclude: ReadonlySet<string>;
65
+ now: number;
66
+ }): StripGroups;
67
+ export interface StripCounts {
68
+ agents: number;
69
+ working: number;
70
+ needsInput: number;
71
+ }
72
+ export declare function stripCounts(rows: readonly AgentRow[]): StripCounts;
73
+ /**
74
+ * The one mark at the head of the agents line: needs you (an agent waits on the
75
+ * person), working (an agent or a workflow run works), failed (the newest agent
76
+ * did not finish), done (everything else: every agent ended its turn).
77
+ */
78
+ export type LineMark = 'needs_input' | 'working' | 'failed' | 'done';
79
+ export interface LineSummary extends StripCounts {
80
+ mark: LineMark;
81
+ /** Workflow runs listed, and how many of them run. */
82
+ runs: number;
83
+ runningRuns: number;
84
+ /** The agent with the newest activity, named on the line while nothing works. */
85
+ newest: AgentRow | null;
86
+ }
87
+ /** What the agents line says: `2 agents · 1 working`, `2 agents · poet done`, `1 workflow running`. */
88
+ export declare function lineSummary(rows: readonly AgentRow[], runs: readonly {
89
+ status: string;
90
+ }[]): LineSummary;
91
+ /** `12s`, `4m`, `2h`: the short elapsed time of a working row. */
92
+ export declare function shortElapsed(ms: number): string;
@@ -0,0 +1,123 @@
1
+ import { agentDisplayName } from '../../internal/components/agent-mark.js';
2
+ /** A child older than this that has settled is no longer "recent": it leaves the line. */
3
+ export const RECENT_MS = 60 * 60_000;
4
+ /** The popover lists at most this many agent rows per group. */
5
+ export const MAX_ROWS = 20;
6
+ const STATE_ORDER = {
7
+ needs_input: 0,
8
+ working: 1,
9
+ failed: 2,
10
+ idle: 3,
11
+ completed: 4,
12
+ stopped: 5,
13
+ };
14
+ /** Board state of a session row: the API's `board_state`, else derived from the older fields. */
15
+ export function boardStateOf(session) {
16
+ if (session.board_state)
17
+ return session.board_state;
18
+ if (session.attention)
19
+ return 'needs_input';
20
+ switch (session.status) {
21
+ case 'failed':
22
+ return 'failed';
23
+ case 'completed':
24
+ return 'completed';
25
+ case 'stopped':
26
+ return 'stopped';
27
+ case 'queued':
28
+ case 'branching':
29
+ case 'provisioning':
30
+ return 'working';
31
+ default:
32
+ return session.working?.state === 'working' ? 'working' : 'idle';
33
+ }
34
+ }
35
+ /** True while a row works or waits on its person: it can be stopped. */
36
+ export function isActive(state) {
37
+ return state === 'working' || state === 'needs_input';
38
+ }
39
+ /**
40
+ * A spawned session's own title. pi named a child `<description> (@agent
41
+ * subagent)` until 2026-10-31, and those rows keep the name: every surface shows
42
+ * the agent apart (`agent_name`), never in the title.
43
+ */
44
+ export function subagentTitle(name) {
45
+ return name.replace(/\s*\(@[^)]*\)\s*$/, '').trim();
46
+ }
47
+ export function agentRowOf(session) {
48
+ const name = session.name ? subagentTitle(session.name) : '';
49
+ const own = session.agent_handle?.trim() || name;
50
+ const agent = session.agent_name?.trim() || null;
51
+ const handle = own || (agent ? agentDisplayName(agent) : session.session_id.slice(0, 8));
52
+ const excerpt = session.result_excerpt?.replace(/\s+/g, ' ').trim() || null;
53
+ const activity = Date.parse(session.last_activity_at ?? session.updated_at ?? session.created_at);
54
+ const state = boardStateOf(session);
55
+ const since = state === 'working' && session.working?.since ? Date.parse(session.working.since) : NaN;
56
+ return {
57
+ sessionId: session.session_id,
58
+ handle,
59
+ agent,
60
+ named: !!own,
61
+ state,
62
+ attention: session.attention ?? null,
63
+ line: excerpt ?? (name && name !== handle ? name : null),
64
+ activityMs: Number.isFinite(activity) ? activity : 0,
65
+ workingSinceMs: Number.isFinite(since) ? since : null,
66
+ };
67
+ }
68
+ /**
69
+ * The agent rows of a session: its children and its teammates, each once.
70
+ * `exclude` holds the sessions a workflow run owns (its agents and its runner).
71
+ * A settled row older than {@link RECENT_MS} leaves the line.
72
+ */
73
+ export function stripGroups(input) {
74
+ const seen = new Set();
75
+ const agents = [];
76
+ const team = [];
77
+ for (const session of [...input.teammates, ...input.children]) {
78
+ if (seen.has(session.session_id) || input.exclude.has(session.session_id))
79
+ continue;
80
+ if (session.session_id === input.leadSessionId)
81
+ continue;
82
+ seen.add(session.session_id);
83
+ const row = agentRowOf(session);
84
+ if (!isActive(row.state) && row.state !== 'idle' && input.now - row.activityMs > RECENT_MS)
85
+ continue;
86
+ const isTeammate = session.team_lead_session_id === input.leadSessionId || input.teammates.includes(session);
87
+ (isTeammate ? team : agents).push(row);
88
+ }
89
+ const order = (a, b) => STATE_ORDER[a.state] - STATE_ORDER[b.state] || b.activityMs - a.activityMs;
90
+ return { agents: agents.sort(order).slice(0, MAX_ROWS), team: team.sort(order).slice(0, MAX_ROWS) };
91
+ }
92
+ export function stripCounts(rows) {
93
+ return {
94
+ agents: rows.length,
95
+ working: rows.filter((row) => row.state === 'working').length,
96
+ needsInput: rows.filter((row) => row.state === 'needs_input').length,
97
+ };
98
+ }
99
+ /** What the agents line says: `2 agents · 1 working`, `2 agents · poet done`, `1 workflow running`. */
100
+ export function lineSummary(rows, runs) {
101
+ const counts = stripCounts(rows);
102
+ const runningRuns = runs.filter((run) => run.status === 'running').length;
103
+ let newest = null;
104
+ for (const row of rows)
105
+ if (!newest || row.activityMs > newest.activityMs)
106
+ newest = row;
107
+ const mark = counts.needsInput > 0
108
+ ? 'needs_input'
109
+ : counts.working > 0 || runningRuns > 0
110
+ ? 'working'
111
+ : newest?.state === 'failed'
112
+ ? 'failed'
113
+ : 'done';
114
+ return { ...counts, mark, runs: runs.length, runningRuns, newest };
115
+ }
116
+ /** `12s`, `4m`, `2h`: the short elapsed time of a working row. */
117
+ export function shortElapsed(ms) {
118
+ const seconds = Math.max(0, Math.floor(ms / 1000));
119
+ if (seconds < 60)
120
+ return `${seconds}s`;
121
+ const minutes = Math.floor(seconds / 60);
122
+ return minutes < 60 ? `${minutes}m` : `${Math.floor(minutes / 60)}h`;
123
+ }
@@ -0,0 +1,10 @@
1
+ import type { AgentRowState } from './agent-model.js';
2
+ /**
3
+ * The state mark of an agent row: the live dot while it works, the attention
4
+ * dot while it waits on the person, a check once its turn ended. The words
5
+ * beside it say the state; the mark repeats it. The agents line and the
6
+ * multi-agent tool cards draw the same mark.
7
+ */
8
+ export declare function AgentStateMark({ state }: {
9
+ state: AgentRowState;
10
+ }): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { CheckIcon } from '@phosphor-icons/react';
4
+ import { StatusDot } from '../../primitives/status.js';
5
+ import { useTranslations } from '../../i18n/index.js';
6
+ import { cn } from '../../lib/utils.js';
7
+ const DOT_TONE = {
8
+ working: 'success',
9
+ needs_input: 'warning',
10
+ failed: 'destructive',
11
+ stopped: 'neutral',
12
+ };
13
+ /**
14
+ * The state mark of an agent row: the live dot while it works, the attention
15
+ * dot while it waits on the person, a check once its turn ended. The words
16
+ * beside it say the state; the mark repeats it. The agents line and the
17
+ * multi-agent tool cards draw the same mark.
18
+ */
19
+ export function AgentStateMark({ state }) {
20
+ const t = useTranslations('multiAgent.strip');
21
+ return (_jsxs("span", { className: "flex size-3 shrink-0 items-center justify-center", children: [state === 'idle' || state === 'completed' ? (_jsx(CheckIcon, { "aria-hidden": true, weight: "bold", className: "text-kortix-green size-3" })) : (_jsx(StatusDot, { tone: DOT_TONE[state], pulse: state === 'working', className: cn(state === 'working' && 'motion-reduce:animate-none') })), _jsx("span", { className: "sr-only", children: t(`state.${state}`) })] }));
22
+ }
@@ -0,0 +1,58 @@
1
+ import { type SessionTask, type WorkflowRunMetadata } from '@kortix/sdk';
2
+ import { type WorkflowRun } from '../tool/tools/workflow-run.js';
3
+ import { type AgentRow } from './agent-model.js';
4
+ /** The runs the line lists: running ones, and ones that ended in the last hour; newest first. */
5
+ export declare function stripRuns(runs: readonly WorkflowRunMetadata[], now: number): WorkflowRun[];
6
+ /** Every session a run owns: its runner and its agents. They show under the run, not as agent rows. */
7
+ export declare function runSessionIds(runs: readonly WorkflowRun[]): Set<string>;
8
+ export type OpenTarget = {
9
+ sessionId: string;
10
+ title: string;
11
+ };
12
+ export interface AgentsLineViewProps {
13
+ projectId: string | undefined;
14
+ sessionId: string | undefined;
15
+ agents: AgentRow[];
16
+ team: AgentRow[];
17
+ runs: WorkflowRun[];
18
+ /** The team's tasks; `null` when this session leads no team (or `agent_teams` is off). */
19
+ tasks: SessionTask[] | null;
20
+ onOpen: (target: OpenTarget) => void;
21
+ onStop: (row: AgentRow) => void;
22
+ stopping: ReadonlySet<string>;
23
+ /** The line shows the mark and the count only: a narrow toolbar (a channel's thread panel). */
24
+ compact?: boolean;
25
+ /** First render state of the popover (tests). */
26
+ defaultOpen?: boolean;
27
+ }
28
+ export declare function AgentsLineView({ projectId, sessionId, agents, team, runs, tasks, onOpen, onStop, stopping, compact, defaultOpen, }: AgentsLineViewProps): import("react").JSX.Element | null;
29
+ export interface AgentsPanelProps extends Omit<AgentsLineViewProps, 'compact' | 'defaultOpen'> {
30
+ /** The popover is open: a working row's elapsed time ticks. */
31
+ live: boolean;
32
+ }
33
+ /** The popover body: Agents, Team, Workflows, and a Tasks tab when this session leads a team. */
34
+ export declare function AgentsPanel({ projectId, sessionId, agents, team, runs, tasks, onOpen, onStop, stopping, live }: AgentsPanelProps): import("react").JSX.Element;
35
+ /**
36
+ * The agents of one session, read live: its children (polled every 5 s), its
37
+ * teammates and team tasks (flag `agent_teams`) and its workflow runs; and the
38
+ * stop of one agent.
39
+ */
40
+ export declare function useAgentsLine(projectId: string | undefined, sessionId: string | undefined): {
41
+ ready: boolean;
42
+ agents: AgentRow[];
43
+ team: AgentRow[];
44
+ runs: WorkflowRun[];
45
+ tasks: SessionTask[] | null;
46
+ stopping: ReadonlySet<string>;
47
+ stop: (row: AgentRow) => void;
48
+ };
49
+ /**
50
+ * The agents line of one session, for the composer's under-row
51
+ * (`SessionChatInputProps.underbarSlot`). Nothing renders while the session
52
+ * started no agent and no workflow run.
53
+ */
54
+ export declare function AgentsLine({ projectId, sessionId, compact, }: {
55
+ projectId: string | undefined;
56
+ sessionId: string | undefined;
57
+ compact?: boolean;
58
+ }): import("react").JSX.Element | null;