@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,26 @@
1
+ import { Node, type Extensions } from '@tiptap/core';
2
+ /** An image in a doc (`![alt](src)` in the file). */
3
+ export declare const DocImage: Node<import("@tiptap/extension-image").ImageOptions, any>;
4
+ /** A video in a doc: `<video src controls>`, kept as HTML in the Markdown file. */
5
+ export declare const Video: Node<any, any>;
6
+ /**
7
+ * Code blocks; a ```mermaid block also shows its diagram under the source.
8
+ * The editor ignores events in the caption and the diagram: they belong to the
9
+ * language field, Copy and Edit. A doc's diagram has no fullscreen view.
10
+ */
11
+ export declare const DocCodeBlock: Node<import("@tiptap/extension-code-block").CodeBlockOptions, any>;
12
+ /**
13
+ * A line break in the Markdown source inside a paragraph. It reads as a space
14
+ * and saves as the newline it was (`markdown.ts`), so a hard-wrapped file
15
+ * keeps its lines. Backspace over it joins the words, like a space.
16
+ */
17
+ export declare const SoftBreak: Node<any, any>;
18
+ /** The document editor's extensions. `placeholder` names the empty line. */
19
+ export declare function docExtensions({ editable, placeholder, }: {
20
+ editable: boolean;
21
+ placeholder: (node: {
22
+ type: {
23
+ name: string;
24
+ };
25
+ }) => string;
26
+ }): Extensions;
@@ -0,0 +1,149 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * The one Kortix document editor's schema: what a Markdown doc can hold when
5
+ * a person edits it in place. Doc artifacts and an agent's instructions use
6
+ * the same set, so a doc reads and edits the same everywhere. The look is
7
+ * `ARTIFACT_DOC_CSS` (`.kx-doc`); Markdown goes in and out through
8
+ * `markdown.ts`.
9
+ */
10
+ import { Code } from '@tiptap/extension-code';
11
+ import CodeBlock from '@tiptap/extension-code-block';
12
+ import Image from '@tiptap/extension-image';
13
+ import { TaskItem, TaskList } from '@tiptap/extension-list';
14
+ import { TableKit } from '@tiptap/extension-table';
15
+ import { Placeholder } from '@tiptap/extensions';
16
+ import { Node, mergeAttributes } from '@tiptap/core';
17
+ import { NodeViewContent, NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react';
18
+ import StarterKit from '@tiptap/starter-kit';
19
+ import { CheckIcon, PencilSimpleIcon } from '@phosphor-icons/react';
20
+ import { useState } from 'react';
21
+ import { useTranslations } from '../../i18n/index.js';
22
+ import { Button } from '../../primitives/button.js';
23
+ import Hint from '../../primitives/hint.js';
24
+ import { SessionDotMatrix } from '../../primitives/dot-matrix/session-dot-matrix.js';
25
+ import { MermaidRenderer } from '../../primitives/mermaid-renderer.js';
26
+ import { TextShimmer } from '../../primitives/text-shimmer.js';
27
+ import { CopyButton } from '../copy-button.js';
28
+ import { LinkEmbed } from './doc-embed.js';
29
+ /**
30
+ * `uploading`: a pasted or dropped file shown from a local URL while it
31
+ * uploads (`data-uploading`). Never saved: `htmlToMarkdown` drops it.
32
+ */
33
+ const uploadingAttribute = {
34
+ uploading: {
35
+ default: false,
36
+ parseHTML: (el) => el.hasAttribute('data-uploading'),
37
+ renderHTML: (attrs) => (attrs.uploading ? { 'data-uploading': '' } : {}),
38
+ },
39
+ };
40
+ /** An image or video in the editor, with an "Uploading…" chip while its file uploads. */
41
+ function MediaView({ node }) {
42
+ const t = useTranslations('artifacts');
43
+ const { src, alt, title, uploading } = node.attrs;
44
+ return (_jsxs(NodeViewWrapper, { className: "kx-media", "data-uploading": uploading || undefined, "data-drag-handle": "", children: [node.type.name === 'video' ? (_jsx("video", { src: src, controls: true, preload: "metadata" })) : (
45
+ // eslint-disable-next-line @next/next/no-img-element -- a doc's own media, any origin
46
+ _jsx("img", { src: src, alt: alt ?? '', title: title })), uploading ? (_jsxs("span", { contentEditable: false, className: "bg-popover text-foreground absolute bottom-3 left-3 flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium shadow-sm", children: [_jsx(SessionDotMatrix, { sessionId: src, size: 14, className: "shrink-0" }), _jsx(TextShimmer, { duration: 1, spread: 2, className: "text-xs", children: t('uploading') })] })) : null] }));
47
+ }
48
+ /** An image in a doc (`![alt](src)` in the file). */
49
+ export const DocImage = Image.extend({
50
+ draggable: true,
51
+ addAttributes() {
52
+ return { ...this.parent?.(), ...uploadingAttribute };
53
+ },
54
+ addNodeView() {
55
+ return ReactNodeViewRenderer(MediaView);
56
+ },
57
+ });
58
+ /** A video in a doc: `<video src controls>`, kept as HTML in the Markdown file. */
59
+ export const Video = Node.create({
60
+ name: 'video',
61
+ group: 'block',
62
+ atom: true,
63
+ draggable: true,
64
+ addAttributes() {
65
+ return { src: { default: null }, ...uploadingAttribute };
66
+ },
67
+ addNodeView() {
68
+ return ReactNodeViewRenderer(MediaView);
69
+ },
70
+ parseHTML() {
71
+ return [{ tag: 'video[src]' }];
72
+ },
73
+ renderHTML({ HTMLAttributes }) {
74
+ return ['video', mergeAttributes(HTMLAttributes, { controls: 'true', preload: 'metadata' })];
75
+ },
76
+ });
77
+ /** The code-fence language id of a block that names none: a Markdown token, not UI copy. */
78
+ const PLAIN_LANGUAGE = 'text';
79
+ function CodeBlockView({ node, editor, updateAttributes }) {
80
+ const t = useTranslations('artifacts');
81
+ const [editing, setEditing] = useState(false);
82
+ const source = node.textContent.trim();
83
+ const language = node.attrs.language ?? '';
84
+ const diagram = language === 'mermaid' && source;
85
+ // A diagram shows as a picture; its source opens only for someone editing it.
86
+ const showSource = !diagram || editing;
87
+ return (_jsxs(NodeViewWrapper, { as: "div", children: [_jsxs("figure", { className: "kx-code", hidden: !showSource, children: [_jsxs("figcaption", { contentEditable: false, children: [editor.isEditable ? (_jsx("input", { "aria-label": t('codeLanguage'), placeholder: PLAIN_LANGUAGE, value: language, onChange: (e) => updateAttributes({ language: e.target.value.trim().toLowerCase() || null }) })) : (_jsx("span", { children: language || PLAIN_LANGUAGE })), source ? _jsx(CopyButton, { code: node.textContent }) : null] }), _jsx("pre", { children: _jsx(NodeViewContent, { as: "code" }) })] }), diagram ? (_jsx("div", { contentEditable: false, className: "kx-diagram", children: _jsx(MermaidRenderer, { chart: source, enableFullscreen: false, actions: editor.isEditable ? (_jsx(Hint, { label: editing ? t('diagramDone') : t('diagramEdit'), side: "top", children: _jsx(Button, { variant: "secondary", size: "icon-sm", "aria-label": editing ? t('diagramDone') : t('diagramEdit'), "aria-pressed": editing, onClick: () => setEditing((v) => !v), children: editing ? _jsx(CheckIcon, { className: "size-3.5" }) : _jsx(PencilSimpleIcon, { className: "size-3.5" }) }) })) : null }) })) : null] }));
88
+ }
89
+ /**
90
+ * Code blocks; a ```mermaid block also shows its diagram under the source.
91
+ * The editor ignores events in the caption and the diagram: they belong to the
92
+ * language field, Copy and Edit. A doc's diagram has no fullscreen view.
93
+ */
94
+ export const DocCodeBlock = CodeBlock.extend({
95
+ addNodeView() {
96
+ // The element a DOM node or event target is, or sits in (a text node's parent).
97
+ const elementOf = (target) => target instanceof Element ? target : (target?.parentElement ?? null);
98
+ const controls = (target) => !!elementOf(target)?.closest('.kx-diagram, .kx-code > figcaption');
99
+ return ReactNodeViewRenderer(CodeBlockView, {
100
+ stopEvent: ({ event }) => controls(event.target),
101
+ });
102
+ },
103
+ });
104
+ /**
105
+ * A line break in the Markdown source inside a paragraph. It reads as a space
106
+ * and saves as the newline it was (`markdown.ts`), so a hard-wrapped file
107
+ * keeps its lines. Backspace over it joins the words, like a space.
108
+ */
109
+ export const SoftBreak = Node.create({
110
+ name: 'softBreak',
111
+ group: 'inline',
112
+ inline: true,
113
+ selectable: false,
114
+ parseHTML() {
115
+ return [{ tag: 'span[data-soft-break]' }];
116
+ },
117
+ renderHTML() {
118
+ return ['span', { 'data-soft-break': '' }, ' '];
119
+ },
120
+ renderText() {
121
+ return ' ';
122
+ },
123
+ });
124
+ /**
125
+ * Inline code that may sit inside bold or a link: StarterKit's code mark
126
+ * excludes every other mark, which would drop the bold from
127
+ * "**`view` before a task**" on the first save.
128
+ */
129
+ const DocCode = Code.extend({ excludes: '' });
130
+ /** The document editor's extensions. `placeholder` names the empty line. */
131
+ export function docExtensions({ editable, placeholder, }) {
132
+ return [
133
+ StarterKit.configure({
134
+ code: false,
135
+ codeBlock: false,
136
+ link: { openOnClick: !editable, autolink: true, defaultProtocol: 'https' },
137
+ }),
138
+ DocCode,
139
+ DocCodeBlock,
140
+ SoftBreak,
141
+ TableKit.configure({ table: { resizable: false } }),
142
+ DocImage,
143
+ Video,
144
+ TaskList,
145
+ TaskItem.configure({ nested: true }),
146
+ LinkEmbed,
147
+ Placeholder.configure({ placeholder: ({ node }) => placeholder(node) }),
148
+ ];
149
+ }
@@ -0,0 +1,9 @@
1
+ import { type Editor } from '@tiptap/react';
2
+ export declare function DocMenus({ editor, blockMenu, editable, canComment, commenting, onComment, }: {
3
+ editor: Editor;
4
+ blockMenu?: boolean;
5
+ editable?: boolean;
6
+ canComment?: boolean;
7
+ commenting?: boolean;
8
+ onComment?: () => void;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,56 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * The document editor's two menus: one over selected text (marks, headings,
5
+ * quote, table rows) and a `+` menu on an empty line (blocks). Markdown
6
+ * shortcuts (`# `, `- `, `1. `, `[ ] `, `> `, ``` ```) work without them.
7
+ * `blockMenu={false}` drops the `+` menu, for an editor with a `/` block menu.
8
+ * `canComment` adds a Comment button over selected text; with `editable={false}`
9
+ * it is the only button.
10
+ */
11
+ import { ChatCircleIcon, CheckSquareIcon, CodeBlockIcon, CodeIcon, LinkSimpleIcon, ListBulletsIcon, ListNumbersIcon, MinusIcon, PlusIcon, QuotesIcon, TableIcon, TextBIcon, TextHOneIcon, TextHThreeIcon, TextHTwoIcon, TextItalicIcon, TextStrikethroughIcon, TrashIcon, } from '@phosphor-icons/react';
12
+ import { TextSelection } from '@tiptap/pm/state';
13
+ import { useEditorState } from '@tiptap/react';
14
+ import { BubbleMenu, FloatingMenu } from '@tiptap/react/menus';
15
+ import { useTranslations } from '../../i18n/index.js';
16
+ import { Button } from '../../primitives/button.js';
17
+ import Hint from '../../primitives/hint.js';
18
+ function MenuButton({ icon: IconCmp, label, active, onClick, disabled, }) {
19
+ return (_jsx(Hint, { label: label, side: "top", sideOffset: 6, children: _jsx(Button, { type: "button", size: "icon-sm", variant: "ghost", "aria-label": label, "aria-pressed": active, "aria-busy": disabled || undefined, disabled: disabled, onMouseDown: (e) => e.preventDefault(), onClick: onClick, className: "data-[active=true]:bg-active data-[active=true]:text-foreground text-muted-foreground", "data-active": active || undefined, children: _jsx(IconCmp, { className: "size-4" }) }) }));
20
+ }
21
+ const MENU = 'bg-popover text-popover-foreground flex items-center gap-0.5 rounded-lg border p-1 shadow-md';
22
+ export function DocMenus({ editor, blockMenu = true, editable = true, canComment = false, commenting = false, onComment, }) {
23
+ const t = useTranslations('artifacts');
24
+ const state = useEditorState({
25
+ editor,
26
+ selector: ({ editor: e }) => ({
27
+ bold: e.isActive('bold'),
28
+ italic: e.isActive('italic'),
29
+ strike: e.isActive('strike'),
30
+ code: e.isActive('code'),
31
+ link: e.isActive('link'),
32
+ h1: e.isActive('heading', { level: 1 }),
33
+ h2: e.isActive('heading', { level: 2 }),
34
+ h3: e.isActive('heading', { level: 3 }),
35
+ quote: e.isActive('blockquote'),
36
+ table: e.isActive('table'),
37
+ }),
38
+ });
39
+ const chain = () => editor.chain().focus();
40
+ const setLink = () => {
41
+ const previous = editor.getAttributes('link').href;
42
+ const url = window.prompt(t('linkPrompt'), previous ?? 'https://');
43
+ if (url === null)
44
+ return;
45
+ if (url.trim() === '')
46
+ chain().extendMarkRange('link').unsetLink().run();
47
+ else
48
+ chain().extendMarkRange('link').setLink({ href: url.trim() }).run();
49
+ };
50
+ return (_jsxs(_Fragment, { children: [_jsx(BubbleMenu, { editor: editor, options: { placement: 'top' }, shouldShow: ({ editor: e, state: s, from, to }) => (editable || canComment) &&
51
+ s.selection instanceof TextSelection &&
52
+ from !== to &&
53
+ !!s.doc.textBetween(from, to).trim() &&
54
+ !e.isActive('image') &&
55
+ !e.isActive('video'), children: _jsxs("div", { className: MENU, children: [editable ? (_jsxs(_Fragment, { children: [_jsx(MenuButton, { icon: TextBIcon, label: t('bold'), active: state.bold, onClick: () => chain().toggleBold().run() }), _jsx(MenuButton, { icon: TextItalicIcon, label: t('italic'), active: state.italic, onClick: () => chain().toggleItalic().run() }), _jsx(MenuButton, { icon: TextStrikethroughIcon, label: t('strike'), active: state.strike, onClick: () => chain().toggleStrike().run() }), _jsx(MenuButton, { icon: CodeIcon, label: t('inlineCode'), active: state.code, onClick: () => chain().toggleCode().run() }), _jsx(MenuButton, { icon: LinkSimpleIcon, label: t('link'), active: state.link, onClick: setLink }), _jsx("span", { className: "bg-border mx-0.5 h-5 w-px" }), _jsx(MenuButton, { icon: TextHOneIcon, label: t('heading1'), active: state.h1, onClick: () => chain().toggleHeading({ level: 1 }).run() }), _jsx(MenuButton, { icon: TextHTwoIcon, label: t('heading2'), active: state.h2, onClick: () => chain().toggleHeading({ level: 2 }).run() }), _jsx(MenuButton, { icon: TextHThreeIcon, label: t('heading3'), active: state.h3, onClick: () => chain().toggleHeading({ level: 3 }).run() }), _jsx(MenuButton, { icon: QuotesIcon, label: t('quote'), active: state.quote, onClick: () => chain().toggleBlockquote().run() }), state.table ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "bg-border mx-0.5 h-5 w-px" }), _jsx(MenuButton, { icon: PlusIcon, label: t('addRow'), onClick: () => chain().addRowAfter().run() }), _jsx(MenuButton, { icon: ListBulletsIcon, label: t('addColumn'), onClick: () => chain().addColumnAfter().run() }), _jsx(MenuButton, { icon: MinusIcon, label: t('deleteRow'), onClick: () => chain().deleteRow().run() }), _jsx(MenuButton, { icon: TrashIcon, label: t('deleteTable'), onClick: () => chain().deleteTable().run() })] })) : null] })) : null, canComment && onComment ? (_jsxs(_Fragment, { children: [editable ? _jsx("span", { className: "bg-border mx-0.5 h-5 w-px" }) : null, _jsx(MenuButton, { icon: ChatCircleIcon, label: t('discussion.commentSelection'), onClick: onComment, disabled: commenting })] })) : null] }) }), editable && blockMenu ? (_jsx(FloatingMenu, { editor: editor, options: { placement: 'bottom-start', offset: 6 }, children: _jsxs("div", { className: MENU, children: [_jsx(MenuButton, { icon: TextHOneIcon, label: t('heading1'), onClick: () => chain().setHeading({ level: 1 }).run() }), _jsx(MenuButton, { icon: TextHTwoIcon, label: t('heading2'), onClick: () => chain().setHeading({ level: 2 }).run() }), _jsx(MenuButton, { icon: TextHThreeIcon, label: t('heading3'), onClick: () => chain().setHeading({ level: 3 }).run() }), _jsx(MenuButton, { icon: ListBulletsIcon, label: t('bulletList'), onClick: () => chain().toggleBulletList().run() }), _jsx(MenuButton, { icon: ListNumbersIcon, label: t('numberedList'), onClick: () => chain().toggleOrderedList().run() }), _jsx(MenuButton, { icon: CheckSquareIcon, label: t('taskList'), onClick: () => chain().toggleTaskList().run() }), _jsx(MenuButton, { icon: QuotesIcon, label: t('quote'), onClick: () => chain().toggleBlockquote().run() }), _jsx(MenuButton, { icon: CodeBlockIcon, label: t('codeBlock'), onClick: () => chain().toggleCodeBlock().run() }), _jsx(MenuButton, { icon: TableIcon, label: t('table'), onClick: () => chain().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run() }), _jsx(MenuButton, { icon: MinusIcon, label: t('divider'), onClick: () => chain().setHorizontalRule().run() })] }) })) : null] }));
56
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The document editor holds Markdown files (a doc artifact, an agent's
3
+ * instructions). The editor works in HTML, so a doc goes Markdown → HTML on
4
+ * load and HTML → Markdown on save. GFM tables, strikethrough and task lists
5
+ * survive the round trip, and so do the file's own line breaks: a source
6
+ * line break inside a paragraph (a soft break) becomes
7
+ * `<span data-soft-break>`, which reads as a space and saves as a newline.
8
+ * A file wrapped at 72 columns stays wrapped, so a one-word edit is a
9
+ * one-line diff.
10
+ */
11
+ export declare function markdownToHtml(markdown: string): string;
12
+ export declare function htmlToMarkdown(html: string): string;
@@ -0,0 +1,140 @@
1
+ import { Marked } from 'marked';
2
+ import TurndownService from 'turndown';
3
+ import { strikethrough, tables } from 'turndown-plugin-gfm';
4
+ const escapeHtml = (text) => text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
5
+ /**
6
+ * Raw HTML in the Markdown shows as the text it is (`<package>` in a
7
+ * sentence), so the editor keeps it and saves it back. The editor has no
8
+ * node for an unknown tag and would drop it. A `<video>` and a link card
9
+ * (`<div class="kx-embed">`, doc-embed.tsx) are the tags a doc holds as HTML.
10
+ */
11
+ const DOC_HTML = /^(<\/?video\b|<div class="kx-embed">)/i;
12
+ const parser = new Marked({
13
+ renderer: {
14
+ html: ({ text }) => (DOC_HTML.test(text.trim()) ? text : escapeHtml(text)),
15
+ },
16
+ });
17
+ /**
18
+ * The document editor holds Markdown files (a doc artifact, an agent's
19
+ * instructions). The editor works in HTML, so a doc goes Markdown → HTML on
20
+ * load and HTML → Markdown on save. GFM tables, strikethrough and task lists
21
+ * survive the round trip, and so do the file's own line breaks: a source
22
+ * line break inside a paragraph (a soft break) becomes
23
+ * `<span data-soft-break>`, which reads as a space and saves as a newline.
24
+ * A file wrapped at 72 columns stays wrapped, so a one-word edit is a
25
+ * one-line diff.
26
+ */
27
+ export function markdownToHtml(markdown) {
28
+ const html = parser.parse(markdown, { gfm: true, async: false })
29
+ // marked's task items → the editor's (`li[data-type=taskItem]`).
30
+ // A loose list (blank lines between items) puts the box inside a <p>: keep the <p> as the item's text.
31
+ .replace(/<li>(<p>)?<input (checked="" )?disabled="" type="checkbox">\s*/g, (_m, p, checked) => `<li data-type="taskItem" data-checked="${checked ? 'true' : 'false'}">${p ?? ''}`)
32
+ .replace(/<ul>(\s*<li data-type="taskItem")/g, '<ul data-type="taskList">$1')
33
+ // marked keeps a fence's last newline; the editor would show it as an empty line.
34
+ .replace(/\n<\/code><\/pre>/g, '</code></pre>');
35
+ return markSoftBreaks(html);
36
+ }
37
+ const TEXT_BLOCK = 'p, li, h1, h2, h3, h4, h5, h6, td, th';
38
+ const BLOCK_TAGS = new Set(['UL', 'OL', 'P', 'PRE', 'BLOCKQUOTE', 'TABLE', 'DIV', 'HR', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6']);
39
+ const CONTAINER_TAGS = new Set([...BLOCK_TAGS, 'LI', 'THEAD', 'TBODY', 'TR']);
40
+ /** Each newline inside a text block's text → `<span data-soft-break> </span>`. */
41
+ function markSoftBreaks(html) {
42
+ const doc = new DOMParser().parseFromString(html, 'text/html');
43
+ const walker = doc.createTreeWalker(doc.body, 4 /* NodeFilter.SHOW_TEXT */);
44
+ const texts = [];
45
+ for (let node = walker.nextNode(); node; node = walker.nextNode())
46
+ texts.push(node);
47
+ for (const text of texts) {
48
+ const parent = text.parentElement;
49
+ if (!parent || !text.data.includes('\n') || parent.closest('pre, code'))
50
+ continue;
51
+ const block = parent.closest(TEXT_BLOCK);
52
+ // Only text that flows in the block: not the newlines between a nested list's items.
53
+ if (!block || (parent !== block && CONTAINER_TAGS.has(parent.nodeName)))
54
+ continue;
55
+ // A newline beside a block edge (before a nested list, at the item's end) is layout, not a break.
56
+ const edge = (sibling) => (sibling ? BLOCK_TAGS.has(sibling.nodeName) : parent === block);
57
+ let data = text.data;
58
+ if (edge(text.nextSibling))
59
+ data = data.replace(/\n+$/, '');
60
+ if (edge(text.previousSibling))
61
+ data = data.replace(/^\n+/, '');
62
+ const pieces = [];
63
+ data.split('\n').forEach((part, i) => {
64
+ if (i > 0) {
65
+ const soft = doc.createElement('span');
66
+ soft.setAttribute('data-soft-break', '');
67
+ soft.textContent = ' ';
68
+ pieces.push(soft);
69
+ }
70
+ if (part)
71
+ pieces.push(doc.createTextNode(part));
72
+ });
73
+ text.replaceWith(...pieces);
74
+ }
75
+ return doc.body.innerHTML;
76
+ }
77
+ let service = null;
78
+ function turndown() {
79
+ if (service)
80
+ return service;
81
+ const td = new TurndownService({
82
+ headingStyle: 'atx',
83
+ bulletListMarker: '-',
84
+ codeBlockStyle: 'fenced',
85
+ emDelimiter: '*',
86
+ // A soft break holds only a space, so turndown sees it as blank: it saves as the newline it was.
87
+ blankReplacement: (_content, node) => node.nodeName === 'SPAN' && node.hasAttribute('data-soft-break')
88
+ ? '\n'
89
+ : node.isBlock
90
+ ? '\n\n'
91
+ : '',
92
+ });
93
+ tables(td);
94
+ strikethrough(td);
95
+ td.addRule('taskItem', {
96
+ filter: (node) => node.nodeName === 'LI' && node.getAttribute('data-type') === 'taskItem',
97
+ replacement: (content, node) => `- [${node.getAttribute('data-checked') === 'true' ? 'x' : ' '}] ${content.trim().replace(/\n+/g, ' ')}\n`,
98
+ });
99
+ // Tight items (`- a`, `1. a`), nested lines indented to the marker's width.
100
+ // Added after taskItem, so it would win (turndown tries later rules first): skip task items.
101
+ td.addRule('listItem', {
102
+ filter: (node) => node.nodeName === 'LI' && node.getAttribute('data-type') !== 'taskItem',
103
+ replacement: (content, node) => {
104
+ const parent = node.parentNode;
105
+ const index = parent ? Array.prototype.indexOf.call(parent.children, node) : 0;
106
+ const start = Number(parent?.getAttribute('start') ?? 1);
107
+ const prefix = parent?.nodeName === 'OL' ? `${start + index}. ` : '- ';
108
+ const body = content.replace(/^\n+/, '').replace(/\n+$/, '').replace(/\n/g, `\n${' '.repeat(prefix.length)}`);
109
+ return `${prefix}${body}\n`;
110
+ },
111
+ });
112
+ // An underscore inside a word (`feature_disabled`) never starts emphasis: keep it bare.
113
+ const escape = td.escape.bind(td);
114
+ td.escape = (text) => escape(text).replace(/(\w)\\_(?=\w)/g, '$1_');
115
+ td.remove(['label']);
116
+ // A video stays an HTML tag inside the Markdown: Markdown has none.
117
+ td.keep(['video']);
118
+ // A link card stays one line of HTML (doc-embed.tsx): a Markdown HTML block, served as written.
119
+ td.addRule('linkEmbed', {
120
+ filter: (node) => node.nodeName === 'DIV' && node.classList.contains('kx-embed'),
121
+ replacement: (_content, node) => `\n\n${node.outerHTML.replace(/\s*\n\s*/g, ' ')}\n\n`,
122
+ });
123
+ service = td;
124
+ return td;
125
+ }
126
+ export function htmlToMarkdown(html) {
127
+ const doc = new DOMParser().parseFromString(html, 'text/html');
128
+ // A table cell holds one line in Markdown: unwrap the editor's paragraphs.
129
+ doc.querySelectorAll('td > p, th > p').forEach((p) => p.replaceWith(...Array.from(p.childNodes)));
130
+ // A list item with one paragraph is one line: unwrap it, so the list stays tight.
131
+ doc.querySelectorAll('li > p:only-of-type').forEach((p) => p.replaceWith(...Array.from(p.childNodes)));
132
+ doc.querySelectorAll('colgroup').forEach((c) => c.remove());
133
+ // Media still uploading is a local preview: the file gets it once the upload lands.
134
+ doc.querySelectorAll('[data-uploading]').forEach((el) => el.remove());
135
+ // Empty, so turndown adds no flanking space: the soft break saves as a bare newline.
136
+ doc.querySelectorAll('span[data-soft-break]').forEach((s) => {
137
+ s.textContent = '';
138
+ });
139
+ return `${turndown().turndown(doc.body.innerHTML).trim()}\n`;
140
+ }
@@ -12,6 +12,6 @@ export declare const genuiBadgeClass: (tone: BadgeTone) => string;
12
12
  export declare function GenuiBadge({ props }: GenuiComponentProps): import("react").JSX.Element;
13
13
  export declare function GenuiCallout({ props }: GenuiComponentProps): import("react").JSX.Element;
14
14
  /** Set inside an image gallery (layout.tsx): the tile sizes the image, which covers it. A `tile` shows its caption on hover. */
15
- export declare const GenuiImageGridContext: import("react").Context<false | "tile" | "lead">;
15
+ export declare const GenuiImageGridContext: import("react").Context<false | "lead" | "tile">;
16
16
  export declare function GenuiImage({ props }: GenuiComponentProps): import("react").JSX.Element;
17
17
  export declare function GenuiLink({ props }: GenuiComponentProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "outline" | "accent" | "secondary" | "success" | "warning" | "info" | "beta" | "default" | "kortix" | "destructive" | "update" | "new" | "muted" | "transparent" | "solid" | "badgeSuccess" | "highlight" | "royal" | null | undefined;
4
+ variant?: "outline" | "accent" | "secondary" | "success" | "warning" | "info" | "beta" | "default" | "kortix" | "new" | "destructive" | "update" | "muted" | "transparent" | "solid" | "badgeSuccess" | "highlight" | "royal" | null | undefined;
5
5
  size?: "default" | "xs" | "sm" | "tabular" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  declare function Badge({ className, variant, size, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "link" | "input" | "text" | "popover" | "background" | "outline" | "accent" | "error" | "secondary" | "success" | "warning" | "info" | "default" | "destructive" | "muted" | "danger" | "blue" | "transparent" | "brand" | "blue-ghost" | "blue-secondary" | "outline-ghost" | "secondary-outline" | "sidebar" | "ghost" | "foreground" | "outline-foreground" | "inverse" | "invert-outline-foreground" | "ghost-input" | "ghost-sidebar" | "outline-sidebar" | null | undefined;
4
+ variant?: "link" | "input" | "text" | "popover" | "background" | "outline" | "accent" | "error" | "secondary" | "success" | "warning" | "info" | "default" | "destructive" | "blue" | "muted" | "danger" | "transparent" | "brand" | "blue-ghost" | "blue-secondary" | "outline-ghost" | "secondary-outline" | "sidebar" | "ghost" | "foreground" | "outline-foreground" | "inverse" | "invert-outline-foreground" | "ghost-input" | "ghost-sidebar" | "outline-sidebar" | null | undefined;
5
5
  size?: "base" | "default" | "icon" | "toolbar" | "xs" | "sm" | "lg" | "xl" | "icon-xs" | "icon-sm" | "icon-base" | "icon-md" | "icon-lg" | "magic-sm" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -1,10 +1,11 @@
1
+ import { PIXEL_KORTIX_ROWS } from '../_vendor/shared/pixel-mark.js';
1
2
  import { type ComponentPropsWithoutRef } from 'react';
2
3
  /**
3
- * The Kortix symbol (`kortix-logo.tsx`, `variant="icon"`) sampled onto a
4
- * 12 × 10 grid. `#` is a cell the symbol fully covers; `+` is a cell on a curve
5
- * that it only partly covers, drawn as a checker so the curves read as dither.
4
+ * The Kortix symbol on a 12 × 10 grid: `#` a full cell, `+` a curve cell drawn
5
+ * as a checker. The rows live in `@kortix/shared/pixel-mark` so the TUI splash
6
+ * draws the same symbol; this module re-exports them under the same name.
6
7
  */
7
- export declare const PIXEL_KORTIX_ROWS: readonly ["## ## ##", "## ## ##", "+#+ ## +#+", " ##+ ## +## ", " ######## ", " ######## ", " ##+ ## +## ", "+#+ ## +#+", "## ## ##", "## ## ##"];
8
+ export { PIXEL_KORTIX_ROWS };
8
9
  /**
9
10
  * Decorative pixel art of the Kortix symbol, for empty states. It paints in
10
11
  * `currentColor`, so the caller sets the tone. It is always `aria-hidden`: the
@@ -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.