@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
@@ -1,226 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { uiRoutes } from '../../lib/routes.js';
4
- import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
5
- /**
6
- * The agent editor's Access pages — Skills, Connectors, Secrets, Apps. Each
7
- * opens the SAME modal as the project-wide tab of the same name:
8
- * `EntityDetailModal` for a skill, `ConnectorModal` for a connector,
9
- * `ProjectSecretDialog` for a secret.
10
- *
11
- * Layout is the Settings page's: the pane title, one All · Pick · None row
12
- * (`grant-mode-field.tsx`), then the catalog as one bordered list. The list
13
- * stays on screen in every mode, so a person can still open any entry.
14
- */
15
- import { Badge } from '../../primitives/badge.js';
16
- import { Button } from '../../primitives/button.js';
17
- import { Checkbox } from '../../primitives/checkbox.js';
18
- import Hint from '../../primitives/hint.js';
19
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../../primitives/select.js';
20
- import { Skeleton } from '../../primitives/skeleton.js';
21
- import { EmptyState } from '../../primitives/empty-state.js';
22
- import { ErrorState } from '../../primitives/error-state.js';
23
- import { connectorDisplayName } from '../connectors/connector-filter.js';
24
- import { ConnectorStatusBadge } from '../connectors/connector-identity.js';
25
- import { ConnectorLogo } from '../../internal/connector-logo/connector-logo.js';
26
- import { installedConnectorLogoSource } from '../../internal/connector-logo/connector-logo-source.js';
27
- import { ConnectorModal } from '../connectors/detail/connector-modal.js';
28
- import { providerLabel } from '../connectors/provider-label.js';
29
- import { detailSelection } from '../shared/detail-selection.js';
30
- import { EntityDetailModal } from '../shared/entity/entity-modal.js';
31
- import { ManageButton, RequiredConnectorToggle, } from '../sections/view/agent-editor-access-fields.js';
32
- import { EditorList, EditorSection } from '../sections/view/agent-editor-primitives.js';
33
- import { GrantModeField } from '../sections/view/grant-mode-field.js';
34
- import { buildRows, ProjectSecretDialog, } from '../sections/view/secrets-view.js';
35
- import { toArray } from '../shared/utils.js';
36
- import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
37
- import { cn } from '../../internal/lib/utils.js';
38
- import { useProjectCan } from '../../internal/lib/use-project-can.js';
39
- import { listConnectors, listProjectSecrets, } from '@kortix/sdk';
40
- import { contract, qk, useProjectAccountId, useProjectApps, } from '@kortix/sdk/react';
41
- import { PlusIcon } from '@phosphor-icons/react';
42
- import { useQuery, useQueryClient } from '@tanstack/react-query';
43
- import { useState } from 'react';
44
- import { appGrantRows } from './agent-apps-grant.js';
45
- import { policySetRows, withPolicySet, } from './agent-policy-sets.js';
46
- /**
47
- * All · Pick · None over the project's catalog, as one bordered list. The
48
- * checkbox exists only in Pick mode, where it is the control; in All and
49
- * None the mode row above already answers for every row. A granted id the
50
- * catalog no longer has still renders, flagged, so a stale grant is visible
51
- * rather than silently dropped.
52
- */
53
- function GrantCatalog({ value, onChange, items, isLoading, isError, onRetry, empty, trailingFor, }) {
54
- const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
55
- return (_jsx(GrantModeField, { value: value, onChange: onChange, alwaysRender: true, children: ({ selected, toggle, mode }) => {
56
- if (isLoading) {
57
- return (_jsx(EditorList, { children: [0, 1, 2].map((i) => (_jsx("li", { className: "flex items-center gap-3 px-4 py-3", children: _jsx(Skeleton, { className: "h-4 w-40 rounded-sm" }) }, i))) }));
58
- }
59
- if (isError) {
60
- return (_jsx(ErrorState, { size: "sm", title: tI18nComplete.raw('text3f2d97c61a7e'), action: onRetry ? (_jsx(Button, { variant: "outline", size: "sm", onClick: onRetry, children: tI18nComplete.raw('text942087cc2d41') })) : undefined }));
61
- }
62
- const known = new Set(items.map((i) => i.id));
63
- const orphans = [...selected]
64
- .filter((id) => !known.has(id))
65
- .map((id) => ({
66
- id,
67
- title: _jsx("span", { className: "font-mono", children: id }),
68
- description: tI18nComplete.raw('textfecc36d012be'),
69
- status: (_jsx(Badge, { variant: "destructive", size: "xs", children: tI18nComplete.raw('text6be36ca49ee8') })),
70
- }));
71
- if (items.length === 0 && orphans.length === 0)
72
- return _jsx(_Fragment, { children: empty });
73
- return (_jsx(EditorList, { children: [...items, ...orphans].map((item) => (_jsx(GrantRow, { item: item, mode: mode, checked: selected.has(item.id), onToggle: () => toggle(item.id), checkLabel: tI18nComplete('textd4170e74c3b0', { value0: item.id }), trailing: mode === 'pick' && selected.has(item.id) ? trailingFor?.(item.id) : null }, item.id))) }));
74
- } }));
75
- }
76
- /**
77
- * One catalog row. The checkbox and the body are two sibling controls, never
78
- * one nested in the other: the checkbox grants, the body opens the entity.
79
- */
80
- function GrantRow({ item, mode, checked, onToggle, checkLabel, trailing, }) {
81
- const body = (_jsxs(_Fragment, { children: [item.leading, _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-foreground block truncate text-sm font-medium", children: item.title }), item.description ? (_jsx("span", { className: "text-muted-foreground block truncate text-xs", children: item.description })) : null] })] }));
82
- return (_jsxs("li", { className: cn('flex min-h-13 items-center gap-3 px-4 py-2 transition-colors duration-fast', item.onOpen && 'hover:bg-hover', mode === 'none' && 'opacity-60'), children: [mode === 'pick' ? (_jsx(Checkbox, { variant: "black", checked: checked, onCheckedChange: onToggle, "aria-label": checkLabel })) : null, item.onOpen ? (_jsx("button", { type: "button", onClick: item.onOpen, className: "focus-visible:ring-ring/50 flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left focus-visible:ring-2 focus-visible:outline-none", children: body })) : (_jsx("span", { className: "flex min-w-0 flex-1 items-center gap-3", children: body })), item.status || trailing ? (_jsxs("span", { className: "flex shrink-0 items-center gap-2", children: [item.status, trailing] })) : null] }));
83
- }
84
- // ─── Skills ──────────────────────────────────────────────────────────────
85
- export function SkillsGrantPage({ projectId, config, editor, }) {
86
- const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
87
- const skills = toArray(config.skills);
88
- const [selectedPath, setSelectedPath] = useState(null);
89
- const detail = detailSelection({
90
- selection: selectedPath,
91
- record: skills.find((skill) => skill.path === selectedPath),
92
- isSuccess: true,
93
- });
94
- return (_jsxs(_Fragment, { children: [_jsx(EditorSection, { title: tI18nComplete.raw('text66d0f523a379'), description: tI18nComplete.raw('text836cd8e8a791'), trailing: _jsx(ManageButton, { tab: "skills" }), lead: true, bare: true, children: _jsx(GrantCatalog, { value: editor.draft.skills, onChange: (v) => editor.set('skills', v), items: skills.map((skill) => ({
95
- id: skill.name,
96
- title: skill.name,
97
- description: skill.description,
98
- onOpen: () => setSelectedPath(skill.path),
99
- })), empty: _jsx(EmptyState, { size: "sm", title: tI18nComplete.raw('text32ae9b80f832'), description: tI18nComplete.raw('text62d220bbfcc8') }) }) }), _jsx(EntityDetailModal, { projectId: projectId, entity: detail.record, kind: "skill", open: detail.open, isResolving: detail.isResolving, onOpenChange: (next) => {
100
- if (!next)
101
- setSelectedPath(null);
102
- } })] }));
103
- }
104
- // ─── Connectors ──────────────────────────────────────────────────────────
105
- const BASE_SET_VALUE = '__base';
106
- /**
107
- * Which rule set the agent gets on each granted connector that defines sets
108
- * (`agents.<a>.policy_sets`). One list for Pick and All alike: under All the
109
- * catalog has no per-row controls, and a second rendering for that mode would
110
- * be two places to set one value. Choosing a set needs connector write as well
111
- * as agent write (the API checks both), so a viewer without it sees the
112
- * values but cannot change them.
113
- */
114
- function AgentPolicySetsSection({ editor, catalog, connectors, canWrite, }) {
115
- const t = useI18nTranslations('connectorPolicySets');
116
- const { draft, set } = editor;
117
- const rows = policySetRows(draft.connectors, catalog, draft.policy_sets, connectors.map((connector) => connector.slug));
118
- if (rows.length === 0)
119
- return null;
120
- return (_jsx(EditorSection, { title: t('agentSection'), bare: true, children: _jsx(EditorList, { children: rows.map((row) => {
121
- const connector = connectors.find((candidate) => candidate.slug === row.slug);
122
- const name = connector ? connectorDisplayName(connector) : row.slug;
123
- return (_jsxs("li", { className: "flex min-h-13 items-center gap-3 px-4 py-2", children: [connector ? (_jsx(ConnectorLogo, { source: installedConnectorLogoSource(connector), size: "sm" })) : null, _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-foreground block truncate text-sm font-medium", children: name }), _jsx("span", { className: "text-muted-foreground block truncate font-mono text-xs", children: row.slug })] }), row.missing && row.value ? (_jsx(Hint, { label: t('agentMissingHint', { name: row.value }), children: _jsx(Badge, { variant: "destructive", size: "xs", children: t('agentMissing') }) })) : null, _jsxs(Select, { value: row.value ?? BASE_SET_VALUE, disabled: !canWrite, onValueChange: (next) => set('policy_sets', withPolicySet(draft.policy_sets, row.slug, next === BASE_SET_VALUE ? null : next)), children: [_jsx(SelectTrigger, { size: "sm", className: "w-40 shrink-0", "aria-label": t('agentSelectLabel', { name }), children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { align: "end", children: [_jsx(SelectItem, { value: BASE_SET_VALUE, children: t('baseRules') }), row.options.map((option) => (_jsx(SelectItem, { value: option.name, description: option.description, children: _jsx("span", { className: "font-mono", children: option.name }) }, option.name))), row.missing && row.value ? (_jsx(SelectItem, { value: row.value, children: _jsx("span", { className: "font-mono", children: row.value }) })) : null] })] })] }, row.slug));
124
- }) }) }));
125
- }
126
- export function ConnectorsGrantPage({ projectId, editor, policySetOptions, }) {
127
- const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
128
- const queryClient = useQueryClient();
129
- const accountId = useProjectAccountId(projectId);
130
- const canWrite = useProjectCan(projectId, PROJECT_ACTIONS.PROJECT_CONNECTOR_WRITE, { accountId }).allowed ===
131
- true;
132
- const connectorsQuery = useQuery({
133
- queryKey: qk.project.connectors(projectId),
134
- queryFn: () => listConnectors(projectId, { includeSchemas: false }),
135
- ...contract('config'),
136
- });
137
- const connectors = connectorsQuery.data?.connectors ?? [];
138
- const [detailSlug, setDetailSlug] = useState(null);
139
- const detail = detailSelection({
140
- selection: detailSlug,
141
- record: connectors.find((c) => c.slug === detailSlug),
142
- isSuccess: connectorsQuery.isSuccess,
143
- });
144
- if (detail.isMissing)
145
- setDetailSlug(null);
146
- const invalidate = () => queryClient.invalidateQueries({ queryKey: qk.project.connectors(projectId) });
147
- const { draft, set } = editor;
148
- return (_jsxs(_Fragment, { children: [_jsx(EditorSection, { title: tI18nComplete.raw('textc3d2e79ebdd0'), description: tI18nComplete.raw('textc174fc077197'), trailing: _jsx(ManageButton, { tab: "connectors" }), lead: true, bare: true, children: _jsxs("div", { className: "space-y-3", children: [_jsx(GrantCatalog, { value: draft.connectors, onChange: (v) => {
149
- set('connectors', v);
150
- const required = draft.connectors_required ?? [];
151
- const picked = new Set(Array.isArray(v) ? v : []);
152
- const kept = v === 'all' || v === 'none' || !Array.isArray(v)
153
- ? []
154
- : required.filter((slug) => picked.has(slug));
155
- if (kept.length !== required.length) {
156
- set('connectors_required', kept.length ? kept : undefined);
157
- }
158
- }, isLoading: connectorsQuery.isLoading, isError: connectorsQuery.isError, onRetry: () => void connectorsQuery.refetch(), items: connectors.map((connector) => ({
159
- id: connector.slug,
160
- leading: _jsx(ConnectorLogo, { source: installedConnectorLogoSource(connector), size: "sm" }),
161
- title: connectorDisplayName(connector),
162
- description: `${providerLabel(connector.provider)} · ${connector.actions.length} ${connector.actions.length === 1 ? 'action' : 'actions'}`,
163
- status: _jsx(ConnectorStatusBadge, { connector: connector }),
164
- onOpen: () => setDetailSlug(connector.slug),
165
- })), trailingFor: (slug) => (_jsx(RequiredConnectorToggle, { active: draft.connectors_required?.includes(slug) === true, onToggle: () => {
166
- const current = draft.connectors_required ?? [];
167
- const next = current.includes(slug)
168
- ? current.filter((a) => a !== slug)
169
- : [...current, slug];
170
- set('connectors_required', next.length ? next : undefined);
171
- } })), empty: _jsx(EmptyState, { size: "sm", title: tI18nComplete.raw('text51ae0a7e3783'), description: tI18nComplete.raw('text9bf8fe539046') }) }), draft.connectors === 'all' && draft.connectors_required?.length ? (_jsxs("p", { className: "text-muted-foreground text-xs", children: [tI18nComplete.raw('textf39fe0fefce2'), ' ', _jsx("span", { className: "font-mono", children: draft.connectors_required.join(', ') }), tI18nComplete.raw('text954401fb96d1')] })) : null] }) }), _jsx(AgentPolicySetsSection, { editor: editor, catalog: policySetOptions ?? {}, connectors: connectors, canWrite: canWrite }), _jsx(ConnectorModal, { projectId: projectId, connector: detail.record, canWrite: canWrite, open: detail.open, isResolving: detail.isResolving, onOpenChange: (open) => !open && setDetailSlug(null), onChanged: invalidate, onRemoved: () => {
172
- invalidate();
173
- setDetailSlug(null);
174
- } })] }));
175
- }
176
- // ─── Secrets ─────────────────────────────────────────────────────────────
177
- export function SecretsGrantPage({ projectId, editor }) {
178
- const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
179
- const accountId = useProjectAccountId(projectId);
180
- const canWrite = useProjectCan(projectId, PROJECT_ACTIONS.PROJECT_SECRET_WRITE, { accountId }).allowed === true;
181
- const secretsQuery = useQuery({
182
- queryKey: qk.project.secrets(projectId),
183
- queryFn: () => listProjectSecrets(projectId),
184
- ...contract('config'),
185
- });
186
- const rows = buildRows(secretsQuery.data);
187
- const [dialog, setDialog] = useState({
188
- open: false,
189
- row: null,
190
- });
191
- return (_jsxs(_Fragment, { children: [_jsx(EditorSection, { title: tI18nComplete.raw('textd8707d411d99'), description: tI18nComplete.raw('textbb74cc7dce98'), trailing: canWrite ? (_jsxs(Button, { variant: "secondary", size: "sm", className: "gap-1.5", onClick: () => setDialog({ open: true, row: null }), children: [_jsx(PlusIcon, { className: "size-4" }), tI18nComplete.raw('text18fdd549b2ed')] })) : undefined, lead: true, bare: true, children: _jsx(GrantCatalog, { value: editor.draft.secrets, onChange: (v) => editor.set('secrets', v), isLoading: secretsQuery.isLoading, isError: secretsQuery.isError, onRetry: () => void secretsQuery.refetch(), items: rows.map((row) => ({
192
- id: row.identifier,
193
- title: _jsx("span", { className: "font-mono", children: row.identifier }),
194
- description: row.purpose ?? (row.key !== row.identifier ? `Env var ${row.key}` : null),
195
- status: !row.configured || row.system ? (_jsxs(_Fragment, { children: [!row.configured ? (_jsx(Badge, { variant: "destructive", size: "xs", children: tI18nComplete.raw('text4fd0272a5628') })) : null, row.system ? (_jsx(Badge, { variant: "muted", size: "xs", children: tI18nComplete.raw('text6725e7bbcd28') })) : null] })) : undefined,
196
- onOpen: () => setDialog({ open: true, row }),
197
- })), empty: _jsx(EmptyState, { size: "sm", title: tI18nComplete.raw('text5aa40906d187'), description: tI18nComplete.raw('textfc7605717e58'), action: canWrite ? (_jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", onClick: () => setDialog({ open: true, row: null }), children: [_jsx(PlusIcon, { className: "size-4" }), tI18nComplete.raw('text98aa52b34c8f')] })) : undefined }) }) }), _jsx(ProjectSecretDialog, { projectId: projectId, row: dialog.row, open: dialog.open, onOpenChange: (open) => setDialog((d) => ({ ...d, open })) })] }));
198
- }
199
- // ─── Apps ────────────────────────────────────────────────────────────────
200
- /**
201
- * Which Kortix Apps this agent may open — `agents.<name>.apps` in
202
- * kortix.yaml, the same All · Pick · None machine as Connectors and the same
203
- * cards.
204
- *
205
- * The grant decides admission for a `restricted` or `private` App only. A
206
- * `project` App admits any agent that holds `project.app.read`, a `public` App
207
- * admits everyone, and a `password` App admits no agent at all — so a row for
208
- * one of those is still grantable (its mode can change) but is flagged as not
209
- * currently load-bearing.
210
- *
211
- * Enforcement is the App gate (`agentAppAccessDecision`, apps/api/src/apps/
212
- * access.ts).
213
- */
214
- export function AppsGrantPage({ projectId, editor }) {
215
- const t = useI18nTranslations('agentApps');
216
- const appsQuery = useProjectApps(projectId);
217
- const rows = appGrantRows(appsQuery.data);
218
- return (_jsx(EditorSection, { title: t('title'), description: t('description'), trailing: _jsx(ManageButton, { href: (id) => uiRoutes().apps(id) }), lead: true, bare: true, children: _jsx("div", { className: "space-y-3", "data-testid": "agent-apps-grant", children: _jsx(GrantCatalog, { value: editor.draft.apps, onChange: (v) => editor.set('apps', v), isLoading: appsQuery.isLoading, isError: appsQuery.isError, onRetry: () => void appsQuery.refetch(), items: rows.map((row) => ({
219
- id: row.id,
220
- title: _jsx("span", { className: "font-mono", children: row.id }),
221
- description: row.name === row.id ? null : row.name,
222
- // The grant decides admission for a restricted or private App, the
223
- // normal case. Only an App that admits agents without it is flagged.
224
- status: row.needsGrant ? undefined : (_jsx(Badge, { variant: "muted", size: "xs", children: t('openWithoutGrant') })),
225
- })), empty: _jsx(EmptyState, { size: "sm", title: t('emptyTitle'), description: t('emptyDescription') }) }) }) }));
226
- }
@@ -1,17 +0,0 @@
1
- import { type ProjectTrigger } from '@kortix/sdk';
2
- /**
3
- * Whether `trigger` starts `agentName`. A trigger that names no agent is
4
- * stored as `default` (the manifest sentinel, `apps/api/src/projects/lib/
5
- * triggers.ts`), which means "the project's default agent" — so the default
6
- * agent's page owns those rows too, or a trigger created with the agent left
7
- * on its default would show up nowhere.
8
- */
9
- export declare function triggerStartsAgent(trigger: Pick<ProjectTrigger, 'agent'>, agentName: string, defaultAgent: string | null | undefined): boolean;
10
- /** The triggers that start `agentName`, in the order the API lists them. */
11
- export declare function triggersForAgent(triggers: readonly ProjectTrigger[], agentName: string, defaultAgent?: string | null | undefined): ProjectTrigger[];
12
- export declare function AgentTriggersSection({ projectId, agentName, defaultAgent, }: {
13
- projectId: string;
14
- agentName: string;
15
- /** The project's default agent name — see `triggerStartsAgent`. */
16
- defaultAgent?: string | null;
17
- }): import("react").JSX.Element;
@@ -1,109 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { useTriggerMutations } from '../triggers/schedule/use-trigger-mutations.js';
4
- import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
5
- /**
6
- * The Triggers section of the agent page — every project trigger that starts
7
- * THIS agent, and the way to add one.
8
- *
9
- * A trigger is a project resource that names an agent (`trigger.agent`, the
10
- * manifest key). The Triggers tab lists them all; this section is the same
11
- * list filtered to one agent, because "when does this agent run on its own?"
12
- * is a question about the agent, and the person configuring one should not
13
- * have to leave its page to answer it. Creating one here opens the same
14
- * wizard the Triggers tab opens, with the agent pre-selected.
15
- *
16
- * A row opens the same detail sheet the Triggers tab opens
17
- * (`schedule/schedule-detail-sheet.tsx`), in place — run, pause, edit and
18
- * delete without leaving the agent (Marko, 2026-09-03). The sheet owns
19
- * pause/resume itself; run and delete are the two mutations it asks its host
20
- * for, so this section carries the same two the Triggers tab does, against
21
- * the same query key, so a run started here shows up there.
22
- */
23
- import { describeWhen, isTriggerKind, KIND_COPY, triggerName, } from '../triggers/schedule/schedule-copy.js';
24
- import { ScheduleDetailSheet } from '../triggers/schedule/schedule-detail-sheet.js';
25
- import { TriggerComposer } from '../triggers/schedule/trigger-composer.js';
26
- import { useTriggerControls } from '../triggers/schedule/trigger-controls.js';
27
- import { Badge } from '../../primitives/badge.js';
28
- import { Button } from '../../primitives/button.js';
29
- import { ConfirmDialog } from '../../primitives/confirm-dialog.js';
30
- import { Skeleton } from '../../primitives/skeleton.js';
31
- import { EmptyState } from '../../primitives/empty-state.js';
32
- import { EditorList, EditorSection } from '../sections/view/agent-editor-primitives.js';
33
- import { useProjectFeatureFlags } from '../../internal/lib/use-project-feature-flags.js';
34
- import { cn } from '../../internal/lib/utils.js';
35
- import { listProjectTriggers } from '@kortix/sdk';
36
- import { contract, qk } from '@kortix/sdk/react';
37
- import { AppWindowIcon, LightningIcon, PlusIcon, PulseIcon, TimerIcon, WebhooksLogoIcon, } from '@phosphor-icons/react';
38
- import { useQuery, useQueryClient } from '@tanstack/react-query';
39
- import { useCallback, useMemo, useState } from 'react';
40
- const KIND_ICON = {
41
- cron: TimerIcon,
42
- webhook: WebhooksLogoIcon,
43
- monitor: PulseIcon,
44
- event: LightningIcon,
45
- app: AppWindowIcon,
46
- };
47
- /**
48
- * Whether `trigger` starts `agentName`. A trigger that names no agent is
49
- * stored as `default` (the manifest sentinel, `apps/api/src/projects/lib/
50
- * triggers.ts`), which means "the project's default agent" — so the default
51
- * agent's page owns those rows too, or a trigger created with the agent left
52
- * on its default would show up nowhere.
53
- */
54
- export function triggerStartsAgent(trigger, agentName, defaultAgent) {
55
- if (trigger.agent === agentName)
56
- return true;
57
- return trigger.agent === 'default' && !!defaultAgent && defaultAgent === agentName;
58
- }
59
- /** The triggers that start `agentName`, in the order the API lists them. */
60
- export function triggersForAgent(triggers, agentName, defaultAgent = null) {
61
- return triggers.filter((trigger) => triggerStartsAgent(trigger, agentName, defaultAgent));
62
- }
63
- export function AgentTriggersSection({ projectId, agentName, defaultAgent, }) {
64
- const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
65
- const queryClient = useQueryClient();
66
- // One leaf per control, the same as on the Triggers page (KRTX-1720).
67
- const controls = useTriggerControls(projectId);
68
- const eventsOn = useProjectFeatureFlags(projectId).flags.event_triggers === true;
69
- const canCreate = controls.canCreate;
70
- const [createOpen, setCreateOpen] = useState(false);
71
- const [selectedSlug, setSelectedSlug] = useState(null);
72
- const [deleteTarget, setDeleteTarget] = useState(null);
73
- const invalidate = useCallback(() => queryClient.invalidateQueries({ queryKey: qk.project.triggers(projectId) }), [queryClient, projectId]);
74
- // Same key and fetcher as the Triggers tab, so a trigger created there shows
75
- // here on the next focus without a second cache to reconcile.
76
- const triggersQuery = useQuery({
77
- queryKey: qk.project.triggers(projectId),
78
- queryFn: () => listProjectTriggers(projectId),
79
- ...contract('config'),
80
- });
81
- const mine = useMemo(() => triggersForAgent(triggersQuery.data?.triggers ?? [], agentName, defaultAgent), [triggersQuery.data, agentName, defaultAgent]);
82
- const selected = mine.find((t) => t.slug === selectedSlug) ?? null;
83
- // The same two mutations the Triggers tab owns, against the same key.
84
- const { run, remove } = useTriggerMutations({
85
- projectId,
86
- invalidate,
87
- runFailureKey: 'textfc56800b00af',
88
- deletedNoun: (trigger) => isTriggerKind(trigger.type) ? KIND_COPY[trigger.type].noun : 'trigger',
89
- onRemoved: () => {
90
- setDeleteTarget(null);
91
- setSelectedSlug(null);
92
- },
93
- });
94
- return (_jsxs(EditorSection, { title: tI18nComplete.raw('texte62f2148a64d'), description: tI18nComplete.raw('text1a1e4d549e85'), trailing: canCreate ? (_jsxs(Button, { variant: "secondary", size: "sm", className: "gap-1.5", onClick: () => setCreateOpen(true), children: [_jsx(PlusIcon, { className: "size-4" }), tI18nComplete.raw('text58fd308928dd')] })) : undefined, lead: true, bare: true, children: [_jsx("div", { children: triggersQuery.isLoading ? (_jsx(EditorList, { children: [0, 1].map((i) => (_jsxs("li", { className: "flex items-center gap-3 px-4 py-2.5", children: [_jsx(Skeleton, { className: "size-8 rounded-sm" }), _jsx(Skeleton, { className: "h-4 w-40 rounded-sm" })] }, i))) })) : mine.length === 0 ? (_jsx(EmptyState, { size: "sm", title: tI18nComplete.raw('textb254c6e02e1a') })) : (_jsx(EditorList, { children: mine.map((trigger) => {
95
- const KindIcon = KIND_ICON[trigger.type] ?? TimerIcon;
96
- return (_jsx("li", { children: _jsxs("button", { type: "button", onClick: () => setSelectedSlug(trigger.slug), className: cn('hover:bg-hover flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors duration-fast', 'focus-visible:bg-hover focus-visible:outline-none'), children: [_jsx("span", { className: cn('flex size-8 shrink-0 items-center justify-center rounded-sm', trigger.enabled ? 'bg-kortix-green/15' : 'bg-muted'), children: _jsx(KindIcon, { weight: "fill", className: cn('size-4', trigger.enabled ? 'text-kortix-green' : 'text-muted-foreground') }) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-foreground block truncate text-sm font-medium", children: triggerName(trigger) }), _jsx("span", { className: "text-muted-foreground block truncate text-xs", children: describeWhen(trigger) })] }), !trigger.enabled ? (_jsx(Badge, { variant: "muted", size: "xs", children: tI18nComplete.raw('texte159b06187d3') })) : null] }) }, trigger.slug));
97
- }) })) }), canCreate ? (_jsx(TriggerComposer, { projectId: projectId, open: createOpen, onOpenChange: setCreateOpen, initialAgent: agentName, onCreated: (slug) => {
98
- setCreateOpen(false);
99
- void invalidate();
100
- // The composer toasts the creation; straight into the new entry, as the Triggers tab does.
101
- setSelectedSlug(slug);
102
- } })) : null, _jsx(ScheduleDetailSheet, { projectId: projectId, trigger: selected, controls: controls, open: !!selected, onOpenChange: (next) => {
103
- if (!next)
104
- setSelectedSlug(null);
105
- }, onRun: () => selected && run.mutate(selected), running: run.isPending && run.variables?.slug === selected?.slug, onDelete: () => selected && setDeleteTarget(selected), onMutated: invalidate, eventsEnabled: eventsOn }), _jsx(ConfirmDialog, { open: !!deleteTarget, onOpenChange: (next) => {
106
- if (!next)
107
- setDeleteTarget(null);
108
- }, title: tI18nComplete.raw('text08a462df4350'), description: deleteTarget ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-foreground font-medium", children: triggerName(deleteTarget) }), " (", describeWhen(deleteTarget).toLowerCase(), tI18nComplete.raw('text3109205d1fc7')] })) : undefined, confirmLabel: tI18nComplete.raw('texte2d0a54968ea'), confirmVariant: "destructive", onConfirm: () => deleteTarget && remove.mutate(deleteTarget) })] }));
109
- }
@@ -1,5 +0,0 @@
1
- export { detectManifestVersion, manifestFilename, manifestNeedsUpgrade, useProjectManifestVersion, type ManifestVersion, type ProjectManifestVersionState, } from '../../internal/lib/manifest-version.js';
2
- export { MIGRATE_TO_V3_PROMPT } from './migration-prompt.js';
3
- export { PROJECT_UPGRADES, applicableUpgrades, buildOneOffUpgradePrompt, type ProjectUpgrade, type ProjectUpgradeContext, } from './upgrade-defs.js';
4
- export { UpgradesView, UpgradesViewContent } from './upgrade-view.js';
5
- export { useRunUpgrade, type RunUpgrade } from './use-run-upgrade.js';
@@ -1,5 +0,0 @@
1
- export { detectManifestVersion, manifestFilename, manifestNeedsUpgrade, useProjectManifestVersion, } from '../../internal/lib/manifest-version.js';
2
- export { MIGRATE_TO_V3_PROMPT } from './migration-prompt.js';
3
- export { PROJECT_UPGRADES, applicableUpgrades, buildOneOffUpgradePrompt, } from './upgrade-defs.js';
4
- export { UpgradesView, UpgradesViewContent } from './upgrade-view.js';
5
- export { useRunUpgrade } from './use-run-upgrade.js';
@@ -1,16 +0,0 @@
1
- /**
2
- * The seed prompt for "Upgrade manifest to v3": a normal agent session does
3
- * the conversion, because it is files and git. Upgrading starts a fresh
4
- * session with this as the first message; the project's default agent runs
5
- * `kortix migrate`, checks what it cannot know, and opens a change request for
6
- * a human to review. Nothing here merges anything.
7
- *
8
- * `kortix migrate` (apps/cli/src/commands/migrate.ts) holds the conversion
9
- * rules for kortix_version 1 and 2, so this prompt carries only what the tool
10
- * cannot decide: the marketplace baseline, the checks after the conversion, the
11
- * old folders, validation and the landing contract.
12
- *
13
- * `kortix projects upgrade` (apps/cli/src/commands/projects.ts) sends a
14
- * verbatim copy. `projects-parity.test.ts` fails when the two differ.
15
- */
16
- export declare const MIGRATE_TO_V3_PROMPT = "Upgrade this project's manifest to kortix_version 3 (kortix.yaml). Check `kortix_version` at the top of the manifest first: kortix_version 1 is `kortix.toml`, 2 and 3 are `kortix.yaml`. On kortix_version 3 there is nothing to upgrade: say so and stop. Land the upgrade as a change request \u2014 do not merge it yourself.\n\n## 1. Bring the platform baseline up to date first\n\n1. `kortix marketplace updates` \u2014 a hash-diff report of every marketplace-tracked item (the Kortix-managed skills, plus any marketplace skills the user installed).\n2. If updates are listed, apply them: `kortix marketplace update --all`. **This commits directly to `main` through the platform's own hash-safe update path \u2014 it is intentionally NOT part of your change request.**\n3. Sync your session branch on top of the refreshed main: `git fetch origin && git rebase origin/main`.\n4. Items reported as `orphaned` (no longer in the catalog) are not updatable \u2014 leave them alone and mention them in the change request description.\n\n## 2. Convert with kortix migrate\n\n1. Run `kortix migrate`. It prints the plan, the new `kortix.yaml`, a \"Not carried over\" list, and whether the result validates. It changes nothing.\n2. Run `kortix migrate --write`. It writes the v3 `kortix.yaml`, moves each agent's behavior out of its `.md` frontmatter into its `agents.<name>` block, keeps the prompt in the `.md` as its `prompt_file`, and deletes `kortix.toml` and `opencode.json(c)`. It refuses a result that does not validate: fix what it reports, then run it again.\n3. Carry over by hand each \"Not carried over\" item that has a v3 key. `kortix schema --version 3` prints the exact schema. List each item that has no v3 key in the change request description; do not invent a key for it.\n\n## 3. Check what kortix migrate cannot decide\n\n- **Grants.** v3 grants are deny-by-default. Every agent must keep the access it has today: `skills`, `subagents`, `commands`, `extensions`, `connectors`, `secrets`, `kortix_permissions` and `workspace: { project_repository: true }` for an agent that works in the repository. Never widen a grant to cover a key you removed.\n- **The default agent.** `default_agent` must name a declared agent with `mode: primary` or `all`. A kortix_version 1 project takes it from `opencode.jsonc`, else from its first agent. Confirm the choice and record it and the reason in the change request description.\n- **Old folders.** v3 reads no harness folder: `harnesses/` and `.kortix/opencode/` are not read. Move every file that a registry or a `prompt_file` still names there to the root folders (`agents/`, `skills/`, `tools/`, `commands/`, `extensions/`) with `git mv`, and update the path in `kortix.yaml`. From kortix_version 1, also run `git mv .kortix/memory memory`. Keep `.kortix/state/` and `.kortix/link.json`. Then delete what is left: `git rm -r harnesses/` or `git rm -r .kortix/opencode/`.\n- **OpenCode-only extensions.** Every new session runs pi, and pi loads only an extension's `pi:` implementation. `kortix migrate` turns each OpenCode plugin into an extension with only an `opencode:` implementation (under `extensions/opencode/`), which never loads. Remove each such extension from `extensions` and from every agent's `extensions` grant, and `git rm -r` its files. List each one in the change request description; when it did something the project needs, say that a pi extension (`pi:`) replaces it.\n- **Old paths.** Run `git grep -n -e '.kortix/opencode' -e '.kortix/memory' -e 'harnesses/'` and replace each old path with the new one, in prompts, skills, tools and `.gitignore`. Change only the path.\n\n## 4. Validate before you are done\n\nRun `kortix validate`. Fix every error it reports. Do not open the change request with a manifest that fails validation.\n\n## 5. Land it as a change request \u2014 never merge\n\nFirst, re-sync: `git fetch origin` and check whether `origin/main` advanced while you worked (`git log HEAD..origin/main --oneline`). If it moved, rebase. If the rebase conflicts on the manifest or a moved file, `git rebase --abort`, `git reset --hard origin/main`, and redo the conversion against the current files. Never revert main's changes to win a conflict.\n\nThen commit, **push the branch**, and open the change request. A commit that is never pushed leaves the CR empty (`422 CR_HEAD_NOT_AHEAD`):\n\n```\ngit add -A && git commit -m \"Upgrade to kortix_version 3\"\ngit push origin HEAD\nkortix cr open --head <your-branch> --title \"Upgrade to kortix_version 3\" --description \"<the default agent and why, every file you moved or removed, each agent's grants, every item kortix migrate did not carry over and why>\"\n```\n\nIf the push is rejected because the remote session branch moved, `git fetch origin` then `git push --force-with-lease origin HEAD` \u2014 your own session branch only, never any other branch.\n\nThen run `kortix cr diff <number>`. If it reports no changes, your push did not land; push again and re-check (the CR updates automatically, do not open a second one).\n\nDo **not** run `kortix cr merge`. Stop once the CR is open and verified non-empty, and tell the user its number so they can review the diff and merge it themselves.";
@@ -1,59 +0,0 @@
1
- /**
2
- * The seed prompt for "Upgrade manifest to v3": a normal agent session does
3
- * the conversion, because it is files and git. Upgrading starts a fresh
4
- * session with this as the first message; the project's default agent runs
5
- * `kortix migrate`, checks what it cannot know, and opens a change request for
6
- * a human to review. Nothing here merges anything.
7
- *
8
- * `kortix migrate` (apps/cli/src/commands/migrate.ts) holds the conversion
9
- * rules for kortix_version 1 and 2, so this prompt carries only what the tool
10
- * cannot decide: the marketplace baseline, the checks after the conversion, the
11
- * old folders, validation and the landing contract.
12
- *
13
- * `kortix projects upgrade` (apps/cli/src/commands/projects.ts) sends a
14
- * verbatim copy. `projects-parity.test.ts` fails when the two differ.
15
- */
16
- export const MIGRATE_TO_V3_PROMPT = `Upgrade this project's manifest to kortix_version 3 (kortix.yaml). Check \`kortix_version\` at the top of the manifest first: kortix_version 1 is \`kortix.toml\`, 2 and 3 are \`kortix.yaml\`. On kortix_version 3 there is nothing to upgrade: say so and stop. Land the upgrade as a change request — do not merge it yourself.
17
-
18
- ## 1. Bring the platform baseline up to date first
19
-
20
- 1. \`kortix marketplace updates\` — a hash-diff report of every marketplace-tracked item (the Kortix-managed skills, plus any marketplace skills the user installed).
21
- 2. If updates are listed, apply them: \`kortix marketplace update --all\`. **This commits directly to \`main\` through the platform's own hash-safe update path — it is intentionally NOT part of your change request.**
22
- 3. Sync your session branch on top of the refreshed main: \`git fetch origin && git rebase origin/main\`.
23
- 4. Items reported as \`orphaned\` (no longer in the catalog) are not updatable — leave them alone and mention them in the change request description.
24
-
25
- ## 2. Convert with kortix migrate
26
-
27
- 1. Run \`kortix migrate\`. It prints the plan, the new \`kortix.yaml\`, a "Not carried over" list, and whether the result validates. It changes nothing.
28
- 2. Run \`kortix migrate --write\`. It writes the v3 \`kortix.yaml\`, moves each agent's behavior out of its \`.md\` frontmatter into its \`agents.<name>\` block, keeps the prompt in the \`.md\` as its \`prompt_file\`, and deletes \`kortix.toml\` and \`opencode.json(c)\`. It refuses a result that does not validate: fix what it reports, then run it again.
29
- 3. Carry over by hand each "Not carried over" item that has a v3 key. \`kortix schema --version 3\` prints the exact schema. List each item that has no v3 key in the change request description; do not invent a key for it.
30
-
31
- ## 3. Check what kortix migrate cannot decide
32
-
33
- - **Grants.** v3 grants are deny-by-default. Every agent must keep the access it has today: \`skills\`, \`subagents\`, \`commands\`, \`extensions\`, \`connectors\`, \`secrets\`, \`kortix_permissions\` and \`workspace: { project_repository: true }\` for an agent that works in the repository. Never widen a grant to cover a key you removed.
34
- - **The default agent.** \`default_agent\` must name a declared agent with \`mode: primary\` or \`all\`. A kortix_version 1 project takes it from \`opencode.jsonc\`, else from its first agent. Confirm the choice and record it and the reason in the change request description.
35
- - **Old folders.** v3 reads no harness folder: \`harnesses/\` and \`.kortix/opencode/\` are not read. Move every file that a registry or a \`prompt_file\` still names there to the root folders (\`agents/\`, \`skills/\`, \`tools/\`, \`commands/\`, \`extensions/\`) with \`git mv\`, and update the path in \`kortix.yaml\`. From kortix_version 1, also run \`git mv .kortix/memory memory\`. Keep \`.kortix/state/\` and \`.kortix/link.json\`. Then delete what is left: \`git rm -r harnesses/\` or \`git rm -r .kortix/opencode/\`.
36
- - **OpenCode-only extensions.** Every new session runs pi, and pi loads only an extension's \`pi:\` implementation. \`kortix migrate\` turns each OpenCode plugin into an extension with only an \`opencode:\` implementation (under \`extensions/opencode/\`), which never loads. Remove each such extension from \`extensions\` and from every agent's \`extensions\` grant, and \`git rm -r\` its files. List each one in the change request description; when it did something the project needs, say that a pi extension (\`pi:\`) replaces it.
37
- - **Old paths.** Run \`git grep -n -e '.kortix/opencode' -e '.kortix/memory' -e 'harnesses/'\` and replace each old path with the new one, in prompts, skills, tools and \`.gitignore\`. Change only the path.
38
-
39
- ## 4. Validate before you are done
40
-
41
- Run \`kortix validate\`. Fix every error it reports. Do not open the change request with a manifest that fails validation.
42
-
43
- ## 5. Land it as a change request — never merge
44
-
45
- First, re-sync: \`git fetch origin\` and check whether \`origin/main\` advanced while you worked (\`git log HEAD..origin/main --oneline\`). If it moved, rebase. If the rebase conflicts on the manifest or a moved file, \`git rebase --abort\`, \`git reset --hard origin/main\`, and redo the conversion against the current files. Never revert main's changes to win a conflict.
46
-
47
- Then commit, **push the branch**, and open the change request. A commit that is never pushed leaves the CR empty (\`422 CR_HEAD_NOT_AHEAD\`):
48
-
49
- \`\`\`
50
- git add -A && git commit -m "Upgrade to kortix_version 3"
51
- git push origin HEAD
52
- kortix cr open --head <your-branch> --title "Upgrade to kortix_version 3" --description "<the default agent and why, every file you moved or removed, each agent's grants, every item kortix migrate did not carry over and why>"
53
- \`\`\`
54
-
55
- If the push is rejected because the remote session branch moved, \`git fetch origin\` then \`git push --force-with-lease origin HEAD\` — your own session branch only, never any other branch.
56
-
57
- Then run \`kortix cr diff <number>\`. If it reports no changes, your push did not land; push again and re-check (the CR updates automatically, do not open a second one).
58
-
59
- Do **not** run \`kortix cr merge\`. Stop once the CR is open and verified non-empty, and tell the user its number so they can review the diff and merge it themselves.`;
@@ -1,30 +0,0 @@
1
- /**
2
- * The project-upgrade registry — every one-off, agent-run upgrade the
3
- * Upgrades section can offer. An upgrade is nothing but a detection rule and
4
- * a seed prompt: running one mints a fresh session, the project's default
5
- * agent makes the change, and the result lands as a change request for human
6
- * review (never merged by the agent). Adding a new upgrade = adding an entry
7
- * here; the view renders whatever is applicable.
8
- */
9
- import { type ManifestVersion } from '../../internal/lib/manifest-version.js';
10
- export interface ProjectUpgradeContext {
11
- /** `null` while the manifest read hasn't resolved. */
12
- manifestVersion: ManifestVersion | null;
13
- }
14
- export interface ProjectUpgrade {
15
- id: string;
16
- title: string;
17
- description: string;
18
- applicable: (ctx: ProjectUpgradeContext) => boolean;
19
- prompt: string;
20
- }
21
- export declare const PROJECT_UPGRADES: readonly ProjectUpgrade[];
22
- export declare function applicableUpgrades(ctx: ProjectUpgradeContext): readonly ProjectUpgrade[];
23
- /**
24
- * Wrap a freeform "just do this one thing to the project" request in the
25
- * landing contract every upgrade session must follow. The wrapper is what
26
- * makes a one-off prompt safe to fire-and-review: whatever the request says,
27
- * the session still validates, pushes, opens a CR, verifies it's non-empty,
28
- * and never merges.
29
- */
30
- export declare function buildOneOffUpgradePrompt(request: string): string;
@@ -1,43 +0,0 @@
1
- /**
2
- * The project-upgrade registry — every one-off, agent-run upgrade the
3
- * Upgrades section can offer. An upgrade is nothing but a detection rule and
4
- * a seed prompt: running one mints a fresh session, the project's default
5
- * agent makes the change, and the result lands as a change request for human
6
- * review (never merged by the agent). Adding a new upgrade = adding an entry
7
- * here; the view renders whatever is applicable.
8
- */
9
- import { manifestNeedsUpgrade } from '../../internal/lib/manifest-version.js';
10
- import { MIGRATE_TO_V3_PROMPT } from './migration-prompt.js';
11
- export const PROJECT_UPGRADES = [
12
- {
13
- id: 'manifest-v3',
14
- title: 'Upgrade manifest to v3 (kortix.yaml)',
15
- description: 'Moves kortix.toml or a version 2 kortix.yaml to version 3: the project registers skills, tools, commands and extensions, and each agent enables them by name. Refreshes platform-managed skills and opens a change request for review.',
16
- applicable: (ctx) => manifestNeedsUpgrade(ctx.manifestVersion),
17
- prompt: MIGRATE_TO_V3_PROMPT,
18
- },
19
- ];
20
- export function applicableUpgrades(ctx) {
21
- return PROJECT_UPGRADES.filter((u) => u.applicable(ctx));
22
- }
23
- /**
24
- * Wrap a freeform "just do this one thing to the project" request in the
25
- * landing contract every upgrade session must follow. The wrapper is what
26
- * makes a one-off prompt safe to fire-and-review: whatever the request says,
27
- * the session still validates, pushes, opens a CR, verifies it's non-empty,
28
- * and never merges.
29
- */
30
- export function buildOneOffUpgradePrompt(request) {
31
- return `Run a one-off, self-contained upgrade of this project. The goal:
32
-
33
- ${request.trim()}
34
-
35
- Ground rules — these override nothing above, they define how the change LANDS:
36
-
37
- 1. Read the relevant files before writing anything; keep the change as small as the goal allows.
38
- 2. Work on your session branch only.
39
- 3. If you touched the manifest (kortix.yaml / kortix.toml), run \`kortix validate\` and fix every error before landing.
40
- 4. Land it exactly per the kortix-system mandate: \`git fetch origin\` (rebase onto origin/main if it advanced) → commit → \`git push origin HEAD\` → \`kortix cr open --title "<short imperative summary>" --description "<what changed and why>"\` → verify with \`kortix cr diff <n>\` that the CR actually carries your diff. If the push is rejected because the remote session branch moved, fetch and \`git push --force-with-lease origin HEAD\` (your own session branch only).
41
- 5. Do NOT run \`kortix cr merge\` — stop once the CR is open and verified non-empty, and tell the user its number.
42
- 6. If the goal is already satisfied and there is nothing to change, say so and stop — do not open an empty change request.`;
43
- }
@@ -1,32 +0,0 @@
1
- import type { ManifestVersion } from '../../internal/lib/manifest-version.js';
2
- export interface UpgradesCopy {
3
- available: string;
4
- readOnly: string;
5
- none: string;
6
- upToDateDescription: string;
7
- upToDate: string;
8
- run: string;
9
- oneOff: string;
10
- oneOffDescription: string;
11
- oneOffPlaceholder: string;
12
- runUpgrade: string;
13
- upgrades: Record<string, {
14
- title: string;
15
- description: string;
16
- }>;
17
- }
18
- export declare const DEFAULT_UPGRADES_COPY: UpgradesCopy;
19
- export declare function UpgradesViewContent({ version, onRun, pending, canWrite, copy, }: {
20
- /** `null` = the manifest read hasn't resolved yet. */
21
- version: ManifestVersion | null;
22
- onRun: (prompt: string) => void;
23
- pending: boolean;
24
- /** When false, the Run actions and the one-off composer are hidden and the
25
- * first section says why. The upgrade list itself stays visible — knowing
26
- * what is pending is a read, not a write. */
27
- canWrite?: boolean;
28
- copy?: UpgradesCopy;
29
- }): import("react").JSX.Element;
30
- export declare function UpgradesView({ projectId }: {
31
- projectId: string;
32
- }): import("react").JSX.Element;