@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
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { UsersThreeIcon } from '@phosphor-icons/react';
4
+ import { useTranslations } from '../../i18n/index.js';
5
+ import { PeerMessageRow } from './peer-message-row.js';
6
+ import { SubagentNoticeRow } from './subagent-notice-row.js';
7
+ /**
8
+ * Several notices the API coalesced into one delivered prompt
9
+ * (`session-notice-batch.ts`): background subagents that ended, teammates that
10
+ * went idle, sessions that answered a `notify_when_idle`. One header line ("3
11
+ * agents finished") and one compact row each, with no user bubble around them:
12
+ * nobody typed this turn.
13
+ */
14
+ export function NoticeBatchGroup({ items, actions }) {
15
+ const t = useTranslations('multiAgent.notice');
16
+ return (_jsxs("div", { "data-testid": "notice-batch", "data-notice-count": items.length, className: "flex min-w-0 flex-col gap-1", children: [_jsxs("div", { className: "text-muted-foreground flex min-w-0 items-center gap-1.5 text-xs", children: [_jsx(UsersThreeIcon, { "aria-hidden": true, className: "size-3.5 shrink-0" }), _jsx("span", { children: t('batchTitle', { count: items.length }) })] }), _jsx("ul", { className: "border-border ml-1.5 flex min-w-0 flex-col gap-1 border-l pl-3", children: items.map((item, index) => (_jsx("li", { children: item.kind === 'peer_idle' ? _jsx(PeerMessageRow, { info: item.info }) : _jsx(SubagentNoticeRow, { notice: item.notice }) }, item.kind === 'peer_idle' ? `peer-${item.info.messageId}` : `${item.notice.sessionId}-${index}`))) }), actions] }));
17
+ }
@@ -0,0 +1,14 @@
1
+ import type { PeerMessageKind, PeerMessagePromptInfo } from '../../_vendor/shared/index.js';
2
+ /**
3
+ * The preview after the sender: the summary, else the first line of the text. CSS cuts it with `…`.
4
+ * An idle notice (`firePeerIdleNotices` in the API) previews its "Its last answer:" line; its
5
+ * first line ("reviewer finished its turn and is idle.") repeats the headline, so it shows only
6
+ * when it says something else (an error).
7
+ */
8
+ export declare function peerMessagePreview(info: Pick<PeerMessagePromptInfo, 'summary' | 'text'> & {
9
+ kind?: PeerMessageKind;
10
+ }): string;
11
+ export declare function PeerMessageRow({ info, actions }: {
12
+ info: PeerMessagePromptInfo;
13
+ actions?: React.ReactNode;
14
+ }): import("react").JSX.Element;
@@ -0,0 +1,57 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { peerHandleLabel } from '../../_vendor/kortix-shared.js';
4
+ import { ArrowBendDownLeftIcon, CaretRightIcon, ChatTeardropTextIcon, CheckCircleIcon, PowerIcon, } from '@phosphor-icons/react';
5
+ import { useId, useState } from 'react';
6
+ import { useTranslations } from '../../i18n/index.js';
7
+ import { cn } from '../../lib/utils.js';
8
+ /**
9
+ * A message another Kortix session sent this one (`send_message`), as Claude
10
+ * Code draws it: one dim line, "Message from @reviewer · Schema migration
11
+ * finished", that opens in place to the full text. The header and the footer
12
+ * the API wrapped around it (`peerMessagePromptText`) are for the agent, not
13
+ * the reader, so neither renders. An idle notice, a shutdown request and a
14
+ * shutdown answer get their own words.
15
+ */
16
+ const KIND_ICON = {
17
+ message: ChatTeardropTextIcon,
18
+ idle_notice: CheckCircleIcon,
19
+ shutdown_request: PowerIcon,
20
+ shutdown_response: ArrowBendDownLeftIcon,
21
+ };
22
+ const KIND_KEY = new Map([
23
+ ['message', 'message'],
24
+ ['idle_notice', 'idleNotice'],
25
+ ['shutdown_request', 'shutdownRequest'],
26
+ ['shutdown_response', 'shutdownResponse'],
27
+ ]);
28
+ /**
29
+ * The preview after the sender: the summary, else the first line of the text. CSS cuts it with `…`.
30
+ * An idle notice (`firePeerIdleNotices` in the API) previews its "Its last answer:" line; its
31
+ * first line ("reviewer finished its turn and is idle.") repeats the headline, so it shows only
32
+ * when it says something else (an error).
33
+ */
34
+ export function peerMessagePreview(info) {
35
+ if (info.summary?.trim())
36
+ return info.summary.trim();
37
+ const lines = info.text.split('\n').map((line) => line.trim()).filter(Boolean);
38
+ if (info.kind === 'idle_notice') {
39
+ const answer = lines.find((line) => line.startsWith('Its last answer:'));
40
+ if (answer)
41
+ return answer.slice('Its last answer:'.length).trim();
42
+ return lines[0] && !/finished its turn and is idle\.?$/.test(lines[0]) ? lines[0] : '';
43
+ }
44
+ return lines[0] ?? '';
45
+ }
46
+ export function PeerMessageRow({ info, actions }) {
47
+ const t = useTranslations('multiAgent.peer');
48
+ const [open, setOpen] = useState(false);
49
+ const bodyId = useId();
50
+ const KindIcon = KIND_ICON[info.kind];
51
+ const preview = peerMessagePreview(info);
52
+ const headline = t(KIND_KEY.get(info.kind) ?? 'message', { from: peerHandleLabel(info.from) });
53
+ // Nothing more to read than the line says: the row is not a disclosure.
54
+ const expandable = info.text.trim().length > 0 && info.text.trim() !== preview;
55
+ const line = (_jsxs(_Fragment, { children: [_jsx(KindIcon, { "aria-hidden": true, className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0", children: headline }), preview && (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, className: "shrink-0", children: "\u00B7" }), _jsx("span", { className: "min-w-0 truncate", title: preview, children: preview })] }))] }));
56
+ return (_jsxs("div", { "data-testid": "peer-message-turn", "data-peer-kind": info.kind, "data-peer-message-id": info.messageId, className: "flex min-w-0 flex-col gap-1", children: [expandable ? (_jsxs("button", { type: "button", "aria-expanded": open, "aria-controls": bodyId, onClick: () => setOpen((value) => !value), className: "text-muted-foreground hover:text-foreground duration-fast flex w-full min-w-0 items-center gap-1.5 text-left text-xs transition-colors", children: [line, _jsx(CaretRightIcon, { "aria-hidden": true, className: cn('size-3 shrink-0', open && 'rotate-90') }), _jsx("span", { className: "sr-only", children: open ? t('collapse') : t('expand') })] })) : (_jsx("div", { className: "text-muted-foreground flex w-full min-w-0 items-center gap-1.5 text-xs", children: line })), expandable && open && (_jsx("div", { id: bodyId, className: "text-muted-foreground border-border ml-1.5 border-l pl-3 text-sm whitespace-pre-wrap wrap-break-word", children: info.text })), actions] }));
57
+ }
@@ -0,0 +1,4 @@
1
+ import type { SubagentNotice } from './subagent-notice.js';
2
+ export declare function SubagentNoticeRow({ notice }: {
3
+ notice: SubagentNotice;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,50 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useProjectSession } from '@kortix/sdk/react';
4
+ import { CheckIcon, StopCircleIcon, WarningIcon } from '@phosphor-icons/react';
5
+ import { useState } from 'react';
6
+ import { useTranslations } from '../../i18n/index.js';
7
+ import { UnifiedMarkdown } from '../../markdown/unified-markdown.js';
8
+ import { useSessionIds } from '../../providers/session-ids.js';
9
+ import { SubagentDialog } from '../agents/subagent-view.js';
10
+ import { FullViewAction } from '../tool/shared/full-view-action.js';
11
+ import { BasicTool } from '../tool/shared/infrastructure.js';
12
+ import { ToolResultCard } from '../tool/shared/result-card.js';
13
+ /**
14
+ * A background subagent (or a background workflow run) this session started
15
+ * has ended, or a teammate of its agent team went idle, and the API delivered
16
+ * its notice as a prompt. It is not something the person typed, and its report
17
+ * is often long, so it draws as one tool row, the same row as the "Agent ·
18
+ * general" card that started it: "✓ post writer finished · <first line of the
19
+ * result> View". The row opens in place to the whole result; "View" opens the
20
+ * child's own session.
21
+ *
22
+ * The state is a glyph, as on every tool row, never an emoji: emoji status
23
+ * labels are the agent's own words (brand D31, D32), and the reply right under
24
+ * this row often starts with one.
25
+ */
26
+ // `data-tone` keeps the hue: the tool row header paints any other leading glyph muted.
27
+ const MARK = {
28
+ completed: _jsx(CheckIcon, { "data-notice-mark": "completed", "data-tone": "success", "aria-hidden": true, weight: "bold", className: "text-kortix-green size-3.5 shrink-0" }),
29
+ failed: _jsx(WarningIcon, { "data-notice-mark": "failed", "data-tone": "destructive", "aria-hidden": true, weight: "fill", className: "text-kortix-red size-3.5 shrink-0" }),
30
+ stopped: _jsx(StopCircleIcon, { "data-notice-mark": "stopped", "aria-hidden": true, className: "size-3.5 shrink-0" }),
31
+ };
32
+ /** A first line that only says the work is done repeats "finished". */
33
+ const FILLER_EXCERPT = /^(done|finished|completed?|all done|ok(ay)?)[.!]*$/i;
34
+ export function SubagentNoticeRow({ notice }) {
35
+ const t = useTranslations('multiAgent.notice');
36
+ const ids = useSessionIds();
37
+ const [viewing, setViewing] = useState(false);
38
+ // The name its parent gave it (`agent({ name })`) reads best: "writer finished".
39
+ const child = useProjectSession(ids.projectId, notice.sessionId, { enabled: !!ids.projectId });
40
+ const name = child.data?.agent_handle || notice.handle || notice.title || notice.agent || t('fallbackName');
41
+ const excerpt = notice.excerpt && !FILLER_EXCERPT.test(notice.excerpt.trim()) ? notice.excerpt : undefined;
42
+ const expandable = notice.result.trim().length > 0 && notice.result.trim() !== notice.excerpt;
43
+ const openSession = () => setViewing(true);
44
+ return (_jsxs("div", { "data-testid": "subagent-notice", "data-notice-status": notice.status, "data-child-session": notice.sessionId, className: "flex min-w-0 flex-col", children: [_jsx(BasicTool, { icon: MARK[notice.status], trigger: { title: t(notice.status, { name }), subtitle: excerpt }, triggerAction: _jsx(FullViewAction, { onOpen: openSession }),
45
+ // Nothing to unfold: the row is a plain way into the child's session.
46
+ onClick: expandable ? undefined : openSession, children: expandable ? (
47
+ // The report is the child's output, framed like every tool result, so
48
+ // it never reads as a second reply from this session's agent.
49
+ _jsx(ToolResultCard, { bodyClassName: "max-h-96 overflow-y-auto px-3 py-2 text-sm", children: _jsx(UnifiedMarkdown, { content: notice.result, trust: "agent", isStreaming: false }) })) : undefined }), notice.ownedTasks && (_jsx("p", { className: "text-muted-foreground ml-6 min-w-0 truncate text-xs", title: notice.ownedTasks, children: t('ownsTasks', { tasks: notice.ownedTasks }) })), _jsx(SubagentDialog, { open: viewing, onOpenChange: setViewing, sessionId: notice.sessionId, title: name })] }));
50
+ }
@@ -0,0 +1,58 @@
1
+ import { type PeerMessagePromptInfo } from '../../_vendor/shared/index.js';
2
+ /**
3
+ * The notices the API delivers into a session as a prompt, written by
4
+ * `subagentNoticeText` in `apps/api/src/projects/subagent-notice.ts`:
5
+ *
6
+ * A background subagent you started has finished. This message is from the platform, not from the user.
7
+ * (or) Your teammate <handle> finished its turn and is idle. This message is from the platform, not from the user.
8
+ * task_id: <child session id>
9
+ * status: completed | error | failed | stopped
10
+ *
11
+ * <kortix_system type="session-report" source="subagent"><session-report>…</session-report></kortix_system>
12
+ *
13
+ * Tasks <handle> still owns: #3 subject (in progress); … . (a teammate only)
14
+ * …
15
+ *
16
+ * `apps/api/src/projects/session-notice-batch.ts` coalesces the notices that
17
+ * arrive together into one prompt, joined by a blank line (at most 20): these,
18
+ * and the idle notice a `send_message({ notify_when_idle })` asked for
19
+ * (`peerMessagePromptText` kind `idle_notice`).
20
+ */
21
+ export interface SubagentNotice {
22
+ /** `teammate`: a teammate of an agent team went idle; `subagent`: a background subagent ended. */
23
+ kind: 'subagent' | 'teammate';
24
+ sessionId: string;
25
+ status: 'completed' | 'failed' | 'stopped';
26
+ /** A teammate's handle, from its lead line; null for a subagent. */
27
+ handle: string | null;
28
+ /** The project agent the child ran as, or null. */
29
+ agent: string | null;
30
+ /** The child's title, without the "(@agent subagent)" suffix, or null. */
31
+ title: string | null;
32
+ /** The child's final report (Markdown), or its error. */
33
+ result: string;
34
+ /** The first line of `result` that holds words. */
35
+ excerpt: string;
36
+ /** A teammate's unfinished tasks ("#3 Write the fix (in progress); #4 …"), or null when it owns none. */
37
+ ownedTasks: string | null;
38
+ }
39
+ /** One notice of a delivered notice prompt. */
40
+ export type NoticeBatchItem = {
41
+ kind: 'subagent' | 'teammate';
42
+ notice: SubagentNotice;
43
+ } | {
44
+ kind: 'peer_idle';
45
+ info: PeerMessagePromptInfo;
46
+ };
47
+ /** The first line with words, without Markdown heading, list and emphasis marks. */
48
+ export declare function firstLine(text: string): string;
49
+ /** The background subagent or teammate notice a text carries (one notice, not a batch), or null. */
50
+ export declare function parseSubagentNotice(text: string | null | undefined): SubagentNotice | null;
51
+ /**
52
+ * The notices a delivered prompt carries, in order, or null when the prompt is
53
+ * anything else. A notice starts at the start of the prompt or right after the
54
+ * blank line that joins two notices, so a notice line quoted inside a report
55
+ * never splits one. Every piece must parse: one that does not makes the whole
56
+ * prompt "not a batch", and it renders as the turn it is.
57
+ */
58
+ export declare function parseNoticeBatch(text: string | null | undefined): NoticeBatchItem[] | null;
@@ -0,0 +1,111 @@
1
+ import { parsePeerMessagePrompt, tagBlocks } from '../../_vendor/kortix-shared.js';
2
+ import { extractSessionReport } from '../../internal/lib/utils/kortix-system-tags.js';
3
+ const SUBAGENT_LEAD = 'A background subagent you started has finished.';
4
+ const TEAMMATE_LEAD = /^Your teammate (\S+) finished its turn and is idle\./;
5
+ const PEER_IDLE_HEAD = '[idle notice from ';
6
+ const STATUSES = new Set(['completed', 'failed', 'stopped']);
7
+ /** `session-notice-batch.ts` `NOTICE_BATCH_MAX`; a longer prompt is not a batch it wrote. */
8
+ const MAX_NOTICES = 20;
9
+ function block(text, tag) {
10
+ const found = tagBlocks(text, tag, { limit: 1 })[0];
11
+ return found ? found.body.trim() : null;
12
+ }
13
+ /** The first line with words, without Markdown heading, list and emphasis marks. */
14
+ export function firstLine(text) {
15
+ for (const raw of text.split('\n')) {
16
+ const line = raw
17
+ .replace(/^\s*(?:#{1,6}\s+|[-*+]\s+|>\s*|\d+\.\s+)/, '')
18
+ .replace(/[*_`]+/g, '')
19
+ .trim();
20
+ if (line)
21
+ return line;
22
+ }
23
+ return '';
24
+ }
25
+ /** The background subagent or teammate notice a text carries (one notice, not a batch), or null. */
26
+ export function parseSubagentNotice(text) {
27
+ if (!text)
28
+ return null;
29
+ const body = text.trimStart();
30
+ const teammate = TEAMMATE_LEAD.exec(body);
31
+ if (!teammate && !body.startsWith(SUBAGENT_LEAD))
32
+ return null;
33
+ const report = extractSessionReport(body);
34
+ const head = body.slice(0, 600);
35
+ const sessionId = /^task_id:\s*(\S+)/m.exec(head)?.[1] ?? report?.sessionId ?? '';
36
+ if (!sessionId)
37
+ return null;
38
+ const stated = /^status:\s*(\w+)/m.exec(head)?.[1];
39
+ // The API writes `error` for a turn that ended on an error; it reads as a failure.
40
+ const normalized = stated === 'error' ? 'failed' : stated;
41
+ const status = normalized && STATUSES.has(normalized)
42
+ ? normalized
43
+ : report?.status === 'FAILED'
44
+ ? 'failed'
45
+ : 'completed';
46
+ const resultXml = report?.result ?? '';
47
+ const answer = block(resultXml, 'task_result');
48
+ const error = block(resultXml, 'task_error');
49
+ const result = (status === 'completed' ? answer : (error ?? answer)) ?? resultXml;
50
+ const title = report?.prompt?.replace(/\s*\(@[^)]*\bsubagent\)\s*$/i, '').trim() || null;
51
+ const handle = teammate?.[1] ?? null;
52
+ const owned = handle ? /^Tasks \S+ still owns: (.+?)\.?$/m.exec(body)?.[1]?.trim() : undefined;
53
+ return {
54
+ kind: teammate ? 'teammate' : 'subagent',
55
+ sessionId,
56
+ status,
57
+ handle,
58
+ agent: report?.project?.trim() || null,
59
+ title,
60
+ result,
61
+ excerpt: firstLine(result),
62
+ ownedTasks: owned || null,
63
+ };
64
+ }
65
+ /** True when a notice of any kind starts at `index` of `text`. */
66
+ function startsNotice(text, index) {
67
+ return (text.startsWith(SUBAGENT_LEAD, index) ||
68
+ text.startsWith(PEER_IDLE_HEAD, index) ||
69
+ (text.startsWith('Your teammate ', index) && TEAMMATE_LEAD.test(text.slice(index, index + 300))));
70
+ }
71
+ /**
72
+ * The notices a delivered prompt carries, in order, or null when the prompt is
73
+ * anything else. A notice starts at the start of the prompt or right after the
74
+ * blank line that joins two notices, so a notice line quoted inside a report
75
+ * never splits one. Every piece must parse: one that does not makes the whole
76
+ * prompt "not a batch", and it renders as the turn it is.
77
+ */
78
+ export function parseNoticeBatch(text) {
79
+ if (!text)
80
+ return null;
81
+ const body = text.trim();
82
+ if (!startsNotice(body, 0))
83
+ return null;
84
+ const starts = [0];
85
+ for (let at = body.indexOf('\n\n'); at !== -1; at = body.indexOf('\n\n', at + 2)) {
86
+ // Several blank lines in a row: the notice starts at the first non-newline.
87
+ let index = at + 2;
88
+ while (body[index] === '\n')
89
+ index += 1;
90
+ if (index > starts[starts.length - 1] && startsNotice(body, index))
91
+ starts.push(index);
92
+ if (starts.length > MAX_NOTICES)
93
+ return null;
94
+ }
95
+ const items = [];
96
+ for (const [i, start] of starts.entries()) {
97
+ const piece = body.slice(start, starts[i + 1] ?? body.length).trim();
98
+ if (piece.startsWith(PEER_IDLE_HEAD)) {
99
+ const info = parsePeerMessagePrompt(piece);
100
+ if (!info || info.kind !== 'idle_notice')
101
+ return null;
102
+ items.push({ kind: 'peer_idle', info });
103
+ continue;
104
+ }
105
+ const notice = parseSubagentNotice(piece);
106
+ if (!notice)
107
+ return null;
108
+ items.push({ kind: notice.kind, notice });
109
+ }
110
+ return items;
111
+ }
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { attachmentMime } from '../../internal/lib/attachment-mime.js';
4
4
  import { AttachmentPreview } from './attachment-preview.js';
5
5
  import { getFileCategory } from '../../files/viewer/preview-policy.js';
6
- import { uiRoutes } from '../../lib/routes.js';
6
+ import { remindersHref } from '../../internal/lib/capability-tab-routes.js';
7
7
  import { MessageSenderAbove } from '../participants/session-participants.js';
8
8
  import { MessageAuthorLabel } from './message-author-label.js';
9
9
  import { MESSAGE_TEXT_CLASS, RowToolbar } from './message-row.js';
@@ -38,6 +38,10 @@ import { uploadedFileRefXml } from '../composer/uploaded-file-refs.js';
38
38
  import { buildMentionSegments, } from '../thread/mention-segments.js';
39
39
  import { parseChannelMessage, slackConversationName } from './channel-message.js';
40
40
  import { SourceCard, SourcePill } from './source-pill.js';
41
+ import { PeerMessageRow } from './peer-message-row.js';
42
+ import { NoticeBatchGroup } from './notice-batch-group.js';
43
+ import { parseNoticeBatch } from './subagent-notice.js';
44
+ import { parsePeerMessagePrompt } from '../../_vendor/kortix-shared.js';
41
45
  import { useChannelBindings } from '../../internal/hooks/use-channel-bindings.js';
42
46
  import { useSessionIds } from '../../providers/session-ids.js';
43
47
  import { CHANNEL_BRAND_COLOR, ChannelBrandMark, channelPlatformLabel } from './channel-brand.js';
@@ -121,14 +125,15 @@ function PlatformPromptMessage({ pill, text, actions, ...data }) {
121
125
  return (_jsxs("div", { className: "flex flex-col items-end gap-1.5", ...data, children: [pill, text && (_jsx("div", { className: cn(BUBBLE_SURFACE, 'max-w-[80%]'), children: _jsx("div", { className: BUBBLE_TEXT, children: text }) })), actions] }));
122
126
  }
123
127
  /**
124
- * A reminder fire (`[REMINDER reminder.<id> …]`). The pill says Reminder and
125
- * whether it repeats; its card carries the id and a link to the project's
126
- * reminders for this session.
128
+ * A loop fire (`[REMINDER reminder.<id> …]`, the wire name). The pill says
129
+ * Loop and whether it repeats; its card carries the id and a link to the
130
+ * project's Loops page, filtered to this session.
127
131
  */
128
132
  function ReminderMessage({ info, actions }) {
129
133
  const t = useTranslations('reminders');
130
134
  const ids = useSessionIds();
131
- const manageHref = ids.projectId && ids.sessionId ? uiRoutes().customize(ids.projectId, `reminders?session=${ids.sessionId}`) : null;
135
+ const loopsHref = ids.projectId ? remindersHref(ids.projectId) : null;
136
+ const manageHref = loopsHref && ids.sessionId ? `${loopsHref}?session=${ids.sessionId}` : null;
132
137
  return (_jsx(PlatformPromptMessage, { "data-testid": "reminder-turn", "data-reminder-id": info.id, text: info.prompt, actions: actions, pill: _jsx(SourcePill, { mark: _jsx(AlarmIcon, { className: "size-3 shrink-0", "aria-hidden": true }), source: t('cardLabel'), sender: info.recurring ? t('cardRecurring') : t('cardOneTime'), card: _jsx(SourceCard, { mark: _jsx(AlarmIcon, { className: "size-3.5 shrink-0", "aria-hidden": true }), title: t('cardLabel'), footer: _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-muted-foreground truncate font-mono", children: info.id }), manageHref && (_jsx(HoverPrefetchLink, { href: manageHref, className: "text-foreground shrink-0 font-medium underline-offset-2 hover:underline", children: t('cardManage') }))] }) }) }) }));
133
138
  }
134
139
  /**
@@ -916,6 +921,14 @@ export function UserMessage({ message, author, showAuthor, agentNames, commandIn
916
921
  const roomInfo = useMemo(() => parseRoomPrompt(rawText), [rawText]);
917
922
  // A batched digest of room traffic: `[room <name> · #a–#b · N new messages]`.
918
923
  const roomDigestInfo = useMemo(() => parseRoomDigest(rawText), [rawText]);
924
+ // A message from another Kortix session (`send_message`): `[message from reviewer · session 3f2a1b9c · #m_1]`.
925
+ const peerInfo = useMemo(() => parsePeerMessagePrompt(rawText), [rawText]);
926
+ // Several notices in one prompt (`session-notice-batch.ts`), whatever the first one is: a peer
927
+ // idle notice first must not read as one peer message with the rest of the batch inside it.
928
+ const noticeBatch = useMemo(() => {
929
+ const batch = parseNoticeBatch(rawText);
930
+ return batch && batch.length > 1 ? batch : null;
931
+ }, [rawText]);
919
932
  // `messageCreatedAt`'s rule on the record's ISO time: a missing or non-positive time is no time.
920
933
  const createdAt = Date.parse(message.created_at);
921
934
  // Built once and rendered by every branch below — channel card, trigger card,
@@ -1074,6 +1087,12 @@ export function UserMessage({ message, author, showAuthor, agentNames, commandIn
1074
1087
  if (reminderInfo) {
1075
1088
  return _jsx(ReminderMessage, { info: reminderInfo, actions: actions });
1076
1089
  }
1090
+ if (noticeBatch) {
1091
+ return _jsx(NoticeBatchGroup, { items: noticeBatch, actions: actions });
1092
+ }
1093
+ if (peerInfo) {
1094
+ return _jsx(PeerMessageRow, { info: peerInfo, actions: actions });
1095
+ }
1077
1096
  if (roomInfo) {
1078
1097
  return _jsx(RoomMessage, { info: roomInfo, actions: actions });
1079
1098
  }
@@ -55,6 +55,7 @@
55
55
  --terminal-surface: #0f0f0f;
56
56
  --terminal-fg: #e5e5e5;
57
57
  --terminal-border: rgb(255 255 255 / 0.1);
58
+ --terminal-accent: #0f7f80;
58
59
  --radius: 0.625rem;
59
60
  --tracking-normal: 0em;
60
61
  --spacing: 0.23rem;
@@ -139,6 +140,7 @@
139
140
  --sidebar-border: oklch(0.2178 0 0); /* hairline / hairline-soft #1a1a1a */
140
141
  --sidebar-ring: var(--ring);
141
142
  --kortix-base: var(--color-ring); /* #0099ff */
143
+ --terminal-accent: #2ec4c4;
142
144
  --liquid-glass-bg: color-mix(in oklch, var(--secondary) 38%, transparent);
143
145
  --liquid-glass-bg-hover: color-mix(in oklch, var(--secondary) 52%, transparent);
144
146
  --liquid-glass-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.1);