@openhands/agent-canvas 1.16.0 → 1.18.0

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 (1093) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{acp-providers-CX3Lh9gj.js → acp-providers-DcY_mKYa.js} +1 -1
  4. package/build/assets/active-backend-context-BnH4-L8h.js +2 -0
  5. package/build/assets/{agent-context-settings-DSZlXrLj.js → agent-context-settings-D3peZkjX.js} +1 -1
  6. package/build/assets/agent-profiles-service.api-DkeZaqIl.js +1 -0
  7. package/build/assets/agent-profiles-settings-7yMWYjGF.js +1 -0
  8. package/build/assets/agent-server-client-options-EHB23gyx.js +1 -0
  9. package/build/assets/agent-server-config-C_x8Otd9.js +1 -0
  10. package/build/assets/agent-server-conversation-service.api-jiCopc2E.js +88 -0
  11. package/build/assets/agent-settings-BF8hM6wb.js +2 -0
  12. package/build/assets/agent-settings-YPutBAeR.js +1 -0
  13. package/build/assets/alert-banner-eYyqvHL3.js +1 -0
  14. package/build/assets/{api-error-message-B-XdSk3b.js → api-error-message-BXo0lCI5.js} +1 -1
  15. package/build/assets/api-key-entry-screen-CCBvBD8u.js +1 -0
  16. package/build/assets/app-settings-BtYDs-Be.js +1 -0
  17. package/build/assets/automation-detail-BxXhb_m2.js +3 -0
  18. package/build/assets/{automation-export-D3a3of4G.js → automation-export-BJsfi7n2.js} +1 -1
  19. package/build/assets/automation-git-sync-B7o_Nbl-.js +1 -0
  20. package/build/assets/automation-setup-route-qaJ6lLCf.js +3 -0
  21. package/build/assets/{automation-templates-BRppNh99.js → automation-templates-Bb98r-kx.js} +1 -1
  22. package/build/assets/automations-list-DEPVNud3.js +1 -0
  23. package/build/assets/{back-nav-button-Cjl_hoxq.js → back-nav-button-B2yBiVMB.js} +1 -1
  24. package/build/assets/backend-form-modal-DxisQV_6.js +1 -0
  25. package/build/assets/backend-synced-settings-badge-DLEp6cq7.js +1 -0
  26. package/build/assets/badge-ehL-kgeO.js +1 -0
  27. package/build/assets/{base-modal-D_L0oEbG.js → base-modal-C1a0TsSx.js} +1 -1
  28. package/build/assets/bot-ByolqPEr.js +1 -0
  29. package/build/assets/{brand-button-BAfk4wGP.js → brand-button-CUMfjb99.js} +1 -1
  30. package/build/assets/browser-SE24Tk8g.js +46 -0
  31. package/build/assets/browser-tab-HjJxHA0V.js +1 -0
  32. package/build/assets/canvas-extension-page-BsUGBb1T.js +1 -0
  33. package/build/assets/canvas-extensions-C9Tm6s_E.js +1 -0
  34. package/build/assets/{canvas-extensions-runtime-2_x5Ezmi.js → canvas-extensions-runtime-B8kxM4rO.js} +1 -1
  35. package/build/assets/{chat-send-button-MUQqCZCS.js → chat-send-button-CGvc2wpE.js} +1 -1
  36. package/build/assets/check-Bo8s5Ylg.js +1 -0
  37. package/build/assets/chevron-down-Cr6Fn_wS.js +1 -0
  38. package/build/assets/chevron-right-CfdfRn-8.js +1 -0
  39. package/build/assets/circle-check-5pH3qCji.js +1 -0
  40. package/build/assets/circle-plus-check-toggle-BDX_ctNs.js +1 -0
  41. package/build/assets/{cloud-funnel-analytics-CztBCCPp.js → cloud-funnel-analytics-D5uJ_4JE.js} +1 -1
  42. package/build/assets/{cog-D-MPQW6G.js → cog-CAEugqtV.js} +1 -1
  43. package/build/assets/command-menu-CQxs4mtX.js +1 -0
  44. package/build/assets/commits-tab-D0xgjipP.js +1 -0
  45. package/build/assets/{condenser-settings-DmEOje-7.js → condenser-settings-D63NJRBT.js} +1 -1
  46. package/build/assets/confirmation-modal-78sd9Vny.js +1 -0
  47. package/build/assets/{context-menu-list-item-I86vKcmM.js → context-menu-list-item-Cm7-7Y-7.js} +1 -1
  48. package/build/assets/conversation-B_nweu5p.js +93 -0
  49. package/build/assets/conversation-edjzrv5w.js +1 -0
  50. package/build/assets/conversation-panel-edjzrv5w.js +1 -0
  51. package/build/assets/conversation-state-store-9D_3P7q4.js +1 -0
  52. package/build/assets/conversation-store-DC-JlJuq.js +6 -0
  53. package/build/assets/{conversation-tab-empty-state-FIbh_lc8.js → conversation-tab-empty-state-B3dpJXX0.js} +1 -1
  54. package/build/assets/copy-to-clipboard-button-B1ljgNxO.js +1 -0
  55. package/build/assets/device-verify-D5QRIS_x.js +1 -0
  56. package/build/assets/{dropdown-classes-Bc1djN0-.js → dropdown-classes-BGvOvW2_.js} +1 -1
  57. package/build/assets/edit-automation-modal-D_JWSmxT.js +1 -0
  58. package/build/assets/empty-state-FK_s1B60.js +1 -0
  59. package/build/assets/{entry.client-CqyPPjOq.js → entry.client-BMafTpjO.js} +2 -2
  60. package/build/assets/enum-filter-dropdown-UNaom12H.js +1 -0
  61. package/build/assets/environment-switch-overlay-COibRUA-.js +1 -0
  62. package/build/assets/error-state-Cf8LRuuY.js +1 -0
  63. package/build/assets/extensions-hub-C_6ahIua.js +1 -0
  64. package/build/assets/extensions-navigation-C5GfpzFe.js +1 -0
  65. package/build/assets/external-link-Bd7Tga-1.js +1 -0
  66. package/build/assets/files-tab-D5PPIWI1.js +1 -0
  67. package/build/assets/{form-control-classes-Bkh5FGrD.js → form-control-classes-Dbq-7YP_.js} +1 -1
  68. package/build/assets/format-model-name-Dfh9Udrx.js +1 -0
  69. package/build/assets/get-git-path-jU2zjqIB.js +1 -0
  70. package/build/assets/git-repo-dropdown-BoDDWXfX.js +1 -0
  71. package/build/assets/git-repo-dropdown-uxlFw2gn.js +1 -0
  72. package/build/assets/highlighted-source-view-C7pAXrT0.js +1 -0
  73. package/build/assets/home-BM5_Wz_R.js +1 -0
  74. package/build/assets/home-Ivfm7KC4.js +1 -0
  75. package/build/assets/home-automation-run-tooltip-B1N2uO9p.js +1 -0
  76. package/build/assets/home-store-DCbei3DX.js +1 -0
  77. package/build/assets/hooks-service-Dnmhqc0Z.js +1 -0
  78. package/build/assets/index-home-td9BN2T3.js +1 -0
  79. package/build/assets/info-BcajzHn1.js +1 -0
  80. package/build/assets/install-server-modal-B81I-5OE.js +1 -0
  81. package/build/assets/kebab-menu-item-content-SCJBwZnp.js +1 -0
  82. package/build/assets/{key-BmVyxs-2.js → key-O84CMFHb.js} +1 -1
  83. package/build/assets/launch-ZLxI4opd.js +1 -0
  84. package/build/assets/list-filter-B8PQk3RA.js +1 -0
  85. package/build/assets/{list-todo-apgLVjMw.js → list-todo-Caa8E1X_.js} +1 -1
  86. package/build/assets/llm-not-configured-banner-Dh_ajcM8.js +27 -0
  87. package/build/assets/llm-settings-CODhjQzy.js +1 -0
  88. package/build/assets/llm-settings-CZaXYgtw.js +1 -0
  89. package/build/assets/llm-subscription-service-CgIDc38n.js +1 -0
  90. package/build/assets/loader-circle-BxJgk73D.js +1 -0
  91. package/build/assets/{loading-spinner-BY9N3pOe.js → loading-spinner-BeLV0IXf.js} +1 -1
  92. package/build/assets/manage-backends-modal-cMXqCb-B.js +1 -0
  93. package/build/assets/manifest-bfeccb98.js +1 -0
  94. package/build/assets/manifest-subpage-layout-CVZgVKoY.js +1 -0
  95. package/build/assets/{map-provider-Cu3Zgumb.js → map-provider-iRs80q_6.js} +1 -1
  96. package/build/assets/markdown-renderer-DyFl9-mL.js +8 -0
  97. package/build/assets/mcp-CraxoXQv.js +1 -0
  98. package/build/assets/{mcp-marketplace-utils-AIBzzHTO.js → mcp-marketplace-utils-C7PYr293.js} +1 -1
  99. package/build/assets/mcp-page-CteH_K0N.js +9 -0
  100. package/build/assets/messages-Bk1xhbU2.js +41 -0
  101. package/build/assets/{modal-body-BxZjsju9.js → modal-body-C24WsdFb.js} +1 -1
  102. package/build/assets/{modal-classes-C8eycCwG.js → modal-classes-B0b9eiL8.js} +1 -1
  103. package/build/assets/modal-close-button-DfqfB2Nj.js +1 -0
  104. package/build/assets/{mouse-pointer-click-Co2uyaPA.js → mouse-pointer-click-BXlRN92t.js} +1 -1
  105. package/build/assets/onboarding-DXFBRqEy.js +1 -0
  106. package/build/assets/onboarding-modal-BT3Gx_sZ.js +1 -0
  107. package/build/assets/organization-service.api-B5CvmnYQ.js +1 -0
  108. package/build/assets/pencil-q-ihqDYv.js +1 -0
  109. package/build/assets/pin-BdroVQdN.js +1 -0
  110. package/build/assets/planner-tab-CstoOlAB.js +1 -0
  111. package/build/assets/plug-7ACOEbMs.js +1 -0
  112. package/build/assets/plugins-management-service-5rqVPEGN.js +1 -0
  113. package/build/assets/plus-C2e21TFC.js +1 -0
  114. package/build/assets/profiles-service.api-D1XKMgr0.js +1 -0
  115. package/build/assets/providers-XmZ9HM4Q.js +1 -0
  116. package/build/assets/proxy-XP6U1Dhv.js +1 -0
  117. package/build/assets/{puzzle-JM_QaRm0.js → puzzle-LJYnuxKe.js} +1 -1
  118. package/build/assets/react-BX7IV650.js +1 -0
  119. package/build/assets/recommended-automations-launcher-DEHRKIAg.js +1 -0
  120. package/build/assets/refresh-cw-BtdC3T8P.js +1 -0
  121. package/build/assets/root-CM6IZHlg.css +1 -0
  122. package/build/assets/root-DdFkodKW.js +2 -0
  123. package/build/assets/root-layout-DUquNZTU.js +2 -0
  124. package/build/assets/schema-field-Y3F8JvXd.js +1 -0
  125. package/build/assets/scroll-fade-state-Dt_fx2kf.js +1 -0
  126. package/build/assets/sdk-section-page-CNZTLwH9.js +1 -0
  127. package/build/assets/secret-form-9-BoGA40.js +1 -0
  128. package/build/assets/secrets-service-BOIsfD9j.js +1 -0
  129. package/build/assets/secrets-settings-CBJgFr42.js +1 -0
  130. package/build/assets/settings-D4hdToD4.js +1 -0
  131. package/build/assets/settings-dropdown-input-DBvsZ7-Q.js +1 -0
  132. package/build/assets/settings-index-DeQphyBK.js +1 -0
  133. package/build/assets/settings-input-dVuzapBA.js +1 -0
  134. package/build/assets/{settings-list-classes-BzeSZbF2.js → settings-list-classes-DhAPuXm6.js} +1 -1
  135. package/build/assets/settings-modal-tHiJ8iYV.js +1 -0
  136. package/build/assets/settings-nav-GAQjW1a-.js +16 -0
  137. package/build/assets/settings-service.api-C1vZH9Vh.js +1 -0
  138. package/build/assets/settings-switch-DDd1cQ8t.js +1 -0
  139. package/build/assets/{settings-utils-UYpEdPuD.js → settings-utils-BTaaRhLZ.js} +1 -1
  140. package/build/assets/shared-conversation-Cyg7m7ns.js +1 -0
  141. package/build/assets/shield-check-C3Rl0NF8.js +1 -0
  142. package/build/assets/{sidebar-layout-D6fS8-Gl.js → sidebar-layout-DH0E-5KW.js} +1 -1
  143. package/build/assets/sidebar-mobile-menu-toggle-CQ4iky__.js +1 -0
  144. package/build/assets/{sidebar-nav-link-DQQcMf1A.js → sidebar-nav-link-oLQiKUBu.js} +1 -1
  145. package/build/assets/{sidebar-onboarding-checklist-storage-BBkeI6Bp.js → sidebar-onboarding-checklist-storage-TfvNNnnr.js} +1 -1
  146. package/build/assets/sidebar-store-DAZVH-DR.js +1 -0
  147. package/build/assets/skill-card-pill-row-DfjIfj0K.js +1 -0
  148. package/build/assets/{skill-filter-w__3UCEE.js → skill-filter-DsNLmn76.js} +2 -2
  149. package/build/assets/{skill-icon-badge-RQkq8wvl.js → skill-icon-badge-0MK_68Nc.js} +1 -1
  150. package/build/assets/skill-scope-BE-H9TSZ.js +1 -0
  151. package/build/assets/skills-plugins-vzSdxSk_.js +1 -0
  152. package/build/assets/skills-settings-BiPOH9H9.js +1 -0
  153. package/build/assets/styled-tooltip-CejG0rqv.js +1 -0
  154. package/build/assets/task-list-tab-OkZSqnTp.js +1 -0
  155. package/build/assets/{terminal-CNElN42a.js → terminal-Dph60VFZ.js} +2 -2
  156. package/build/assets/toggle-switch-B2uXaAUS.js +1 -0
  157. package/build/assets/trash-2-Bb40zQzs.js +1 -0
  158. package/build/assets/trash-Ckh7yCaB.js +1 -0
  159. package/build/assets/triangle-alert-DEdu-b_L.js +1 -0
  160. package/build/assets/{typography-v1KN0tzi.js → typography-DgcLGdHk.js} +1 -1
  161. package/build/assets/usage-tab-MCmNRAnR.js +1 -0
  162. package/build/assets/use-acp-credential-form-ychoGqjC.js +1 -0
  163. package/build/assets/use-activate-agent-profile-8L8Xdghy.js +1 -0
  164. package/build/assets/use-agent-profiles-Bi8hSkze.js +1 -0
  165. package/build/assets/{use-automation-health-E6NZi9rb.js → use-automation-health-U99vvHxx.js} +1 -1
  166. package/build/assets/use-automation-permissions-Buus0R6h.js +1 -0
  167. package/build/assets/{use-automations-xijQKIl9.js → use-automations-Bq5hVuv0.js} +1 -1
  168. package/build/assets/{use-can-manage-org-profiles-CrJP5262.js → use-can-manage-org-profiles-MzIeEV8F.js} +1 -1
  169. package/build/assets/use-canvas-extensions-Ca9KoVEm.js +1 -0
  170. package/build/assets/{use-cloud-current-user-id-CDfAHpPX.js → use-cloud-current-user-id-B4ZLUZSa.js} +1 -1
  171. package/build/assets/use-config-l5tkDHyD.js +1 -0
  172. package/build/assets/use-create-conversation-i_PdFdIs.js +1 -0
  173. package/build/assets/use-create-secret-CjWq0J4O.js +1 -0
  174. package/build/assets/use-free-models-gCsJ5BV0.js +1 -0
  175. package/build/assets/{use-get-secrets-K3jmk-LH.js → use-get-secrets-CMTuWEp_.js} +1 -1
  176. package/build/assets/use-is-authed-A2Yinlt0.js +1 -0
  177. package/build/assets/{use-launch-skill-in-chat-BYjYihBP.js → use-launch-skill-in-chat-QbXDhiHr.js} +1 -1
  178. package/build/assets/use-llm-configured-Dl4zg8ht.js +1 -0
  179. package/build/assets/use-llm-profiles-SWsuFmFu.js +1 -0
  180. package/build/assets/use-manifest-capabilities-CdqYfUAC.js +1 -0
  181. package/build/assets/use-onboarding-completion-Xl63ZvzQ.js +1 -0
  182. package/build/assets/use-pinned-home-route-BXDIUaxQ.js +1 -0
  183. package/build/assets/use-plugins-marketplace-BIIaPiaB.js +1 -0
  184. package/build/assets/use-save-agent-profile-D-ZHHE94.js +1 -0
  185. package/build/assets/{use-save-settings-DYqkKv7T.js → use-save-settings-Dapkf4cC.js} +1 -1
  186. package/build/assets/use-settings-C2KKQKVC.js +1 -0
  187. package/build/assets/use-settings-nav-items-TOc0Rsfd.js +1 -0
  188. package/build/assets/use-tracking-j4uo9VEW.js +3 -0
  189. package/build/assets/{use-user-conversation-B9Gebw_g.js → use-user-conversation-5UFqMoO4.js} +1 -1
  190. package/build/assets/{useInfiniteQuery-C926xzY4.js → useInfiniteQuery-CtSRG7uW.js} +1 -1
  191. package/build/assets/{useMutation-B-qc391N.js → useMutation-Cszf8mKy.js} +1 -1
  192. package/build/assets/useQueries-pUohFMSP.js +1 -0
  193. package/build/assets/useQuery-DAAacS7O.js +1 -0
  194. package/build/assets/useTranslation-CCgUjPJF.js +1 -0
  195. package/build/assets/utils-BgLSZdyy.js +1 -0
  196. package/build/assets/{vendor~conversation-panel~conversation-C8Fn4XOf.js → vendor~conversation-panel~conversation-C22sJuWZ.js} +1 -1
  197. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +2 -0
  198. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js +185 -0
  199. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js +1 -0
  200. package/build/assets/{vendor~index-home~home~conversation-panel~conversation-hWywRBaR.js → vendor~index-home~home~conversation-panel~conversation-UTl7gUo9.js} +1 -1
  201. package/build/assets/vendor~root-layout-CcdIqs-C.js +1 -0
  202. package/build/assets/{vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js → vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js} +1 -1
  203. package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js +1 -0
  204. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js} +1 -1
  205. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js +1 -0
  206. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js} +1 -1
  207. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js} +12 -6
  208. package/build/assets/{verification-settings-gw_q6vkL.js → verification-settings-DdBpaVPz.js} +1 -1
  209. package/build/assets/{wrench-CUEI1krB.js → wrench-B8Wg_nbp.js} +1 -1
  210. package/build/assets/x-CX8lVGwm.js +1 -0
  211. package/build/index.html +4 -4
  212. package/build/locales/ar/openhands.json +79 -22
  213. package/build/locales/ca/openhands.json +79 -22
  214. package/build/locales/de/openhands.json +79 -22
  215. package/build/locales/en/openhands.json +79 -22
  216. package/build/locales/es/openhands.json +79 -22
  217. package/build/locales/fr/openhands.json +79 -22
  218. package/build/locales/it/openhands.json +79 -22
  219. package/build/locales/ja/openhands.json +79 -22
  220. package/build/locales/ko-KR/openhands.json +79 -22
  221. package/build/locales/no/openhands.json +79 -22
  222. package/build/locales/pt/openhands.json +79 -22
  223. package/build/locales/tr/openhands.json +79 -22
  224. package/build/locales/uk/openhands.json +79 -22
  225. package/build/locales/zh-CN/openhands.json +79 -22
  226. package/build/locales/zh-TW/openhands.json +79 -22
  227. package/config/defaults.json +3 -3
  228. package/dist/api/agent-server-adapter.cjs +3 -3
  229. package/dist/api/agent-server-adapter.cjs.map +1 -1
  230. package/dist/api/agent-server-adapter.d.ts +72 -12
  231. package/dist/api/agent-server-adapter.js +234 -132
  232. package/dist/api/agent-server-adapter.js.map +1 -1
  233. package/dist/api/agent-server-config.cjs +1 -1
  234. package/dist/api/agent-server-config.cjs.map +1 -1
  235. package/dist/api/agent-server-config.d.ts +6 -0
  236. package/dist/api/agent-server-config.js +6 -3
  237. package/dist/api/agent-server-config.js.map +1 -1
  238. package/dist/api/automation-service/automation-service.api.cjs +1 -1
  239. package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
  240. package/dist/api/automation-service/automation-service.api.d.ts +2 -2
  241. package/dist/api/automation-service/automation-service.api.js +7 -7
  242. package/dist/api/automation-service/automation-service.api.js.map +1 -1
  243. package/dist/api/cloud/organization-service.api.cjs.map +1 -1
  244. package/dist/api/cloud/organization-service.api.d.ts +9 -1
  245. package/dist/api/cloud/organization-service.api.js.map +1 -1
  246. package/dist/api/cloud/provider-connections-service.api.cjs +2 -0
  247. package/dist/api/cloud/provider-connections-service.api.cjs.map +1 -0
  248. package/dist/api/cloud/provider-connections-service.api.d.ts +5 -0
  249. package/dist/api/cloud/provider-connections-service.api.js +50 -0
  250. package/dist/api/cloud/provider-connections-service.api.js.map +1 -0
  251. package/dist/api/cloud/skills-service.api.cjs +1 -1
  252. package/dist/api/cloud/skills-service.api.cjs.map +1 -1
  253. package/dist/api/cloud/skills-service.api.d.ts +10 -0
  254. package/dist/api/cloud/skills-service.api.js +11 -1
  255. package/dist/api/cloud/skills-service.api.js.map +1 -1
  256. package/dist/api/config-service/config-service.api.cjs +1 -1
  257. package/dist/api/config-service/config-service.api.cjs.map +1 -1
  258. package/dist/api/config-service/config-service.api.js +6 -2
  259. package/dist/api/config-service/config-service.api.js.map +1 -1
  260. package/dist/api/config-service/config-service.types.d.ts +13 -0
  261. package/dist/api/conversation-metadata-store.cjs +1 -1
  262. package/dist/api/conversation-metadata-store.cjs.map +1 -1
  263. package/dist/api/conversation-metadata-store.d.ts +24 -0
  264. package/dist/api/conversation-metadata-store.js +10 -2
  265. package/dist/api/conversation-metadata-store.js.map +1 -1
  266. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  267. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  268. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +20 -0
  269. package/dist/api/conversation-service/agent-server-conversation-service.api.js +126 -77
  270. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  271. package/dist/api/hooks-service.cjs +2 -0
  272. package/dist/api/hooks-service.cjs.map +1 -0
  273. package/dist/api/hooks-service.d.ts +13 -0
  274. package/dist/api/hooks-service.js +20 -0
  275. package/dist/api/hooks-service.js.map +1 -0
  276. package/dist/api/provider-connections-service/provider-connections-service.api.cjs +1 -1
  277. package/dist/api/provider-connections-service/provider-connections-service.api.cjs.map +1 -1
  278. package/dist/api/provider-connections-service/provider-connections-service.api.js +25 -16
  279. package/dist/api/provider-connections-service/provider-connections-service.api.js.map +1 -1
  280. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  281. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  282. package/dist/api/settings-service/settings-service.api.d.ts +2 -0
  283. package/dist/api/settings-service/settings-service.api.js +18 -10
  284. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  285. package/dist/api/skills-service.cjs +1 -1
  286. package/dist/api/skills-service.cjs.map +1 -1
  287. package/dist/api/skills-service.d.ts +7 -0
  288. package/dist/api/skills-service.js +11 -8
  289. package/dist/api/skills-service.js.map +1 -1
  290. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
  291. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
  292. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs +1 -1
  293. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs.map +1 -1
  294. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js +2 -1
  295. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js.map +1 -1
  296. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
  297. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
  298. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
  299. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +28 -28
  300. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
  301. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs +1 -1
  302. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs.map +1 -1
  303. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js +2 -1
  304. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js.map +1 -1
  305. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
  306. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
  307. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +1 -1
  308. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +37 -37
  309. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
  310. package/dist/components/conversation-events/chat/event-message.cjs +2 -2
  311. package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
  312. package/dist/components/conversation-events/chat/event-message.js +79 -70
  313. package/dist/components/conversation-events/chat/event-message.js.map +1 -1
  314. package/dist/components/conversation-events/chat/messages.cjs +1 -1
  315. package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
  316. package/dist/components/conversation-events/chat/messages.js +28 -27
  317. package/dist/components/conversation-events/chat/messages.js.map +1 -1
  318. package/dist/components/features/automations/automation-card.cjs +1 -1
  319. package/dist/components/features/automations/automation-card.cjs.map +1 -1
  320. package/dist/components/features/automations/automation-card.js +104 -97
  321. package/dist/components/features/automations/automation-card.js.map +1 -1
  322. package/dist/components/features/automations/automation-list-row.cjs +1 -1
  323. package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
  324. package/dist/components/features/automations/automation-list-row.js +89 -77
  325. package/dist/components/features/automations/automation-list-row.js.map +1 -1
  326. package/dist/components/features/automations/build-automation-menu-items.cjs +1 -1
  327. package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -1
  328. package/dist/components/features/automations/build-automation-menu-items.d.ts +3 -1
  329. package/dist/components/features/automations/build-automation-menu-items.js +12 -11
  330. package/dist/components/features/automations/build-automation-menu-items.js.map +1 -1
  331. package/dist/components/features/automations/detail/configuration-section.d.ts +7 -1
  332. package/dist/components/features/automations/detail/detail-header.d.ts +10 -5
  333. package/dist/components/features/automations/detail/run-status-badge.cjs +1 -1
  334. package/dist/components/features/automations/detail/run-status-badge.cjs.map +1 -1
  335. package/dist/components/features/automations/detail/run-status-badge.d.ts +2 -2
  336. package/dist/components/features/automations/detail/run-status-badge.js +82 -53
  337. package/dist/components/features/automations/detail/run-status-badge.js.map +1 -1
  338. package/dist/components/features/automations/kebab-menu.cjs +1 -1
  339. package/dist/components/features/automations/kebab-menu.cjs.map +1 -1
  340. package/dist/components/features/automations/kebab-menu.js +9 -5
  341. package/dist/components/features/automations/kebab-menu.js.map +1 -1
  342. package/dist/components/features/automations/recommended-automations-launcher.cjs +1 -1
  343. package/dist/components/features/automations/recommended-automations-launcher.cjs.map +1 -1
  344. package/dist/components/features/automations/recommended-automations-launcher.js +12 -12
  345. package/dist/components/features/automations/recommended-automations-launcher.js.map +1 -1
  346. package/dist/components/features/automations/recommended-automations-section.cjs +1 -1
  347. package/dist/components/features/automations/recommended-automations-section.js +9 -9
  348. package/dist/components/features/backends/backend-selector.cjs +1 -1
  349. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  350. package/dist/components/features/backends/backend-selector.js +123 -112
  351. package/dist/components/features/backends/backend-selector.js.map +1 -1
  352. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  353. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  354. package/dist/components/features/backends/manage-backends-modal.js +29 -29
  355. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  356. package/dist/components/features/chat/change-agent-button.cjs +1 -1
  357. package/dist/components/features/chat/change-agent-button.js +4 -4
  358. package/dist/components/features/chat/chat-interface.cjs +2 -2
  359. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  360. package/dist/components/features/chat/chat-interface.js +137 -137
  361. package/dist/components/features/chat/chat-interface.js.map +1 -1
  362. package/dist/components/features/chat/chat-message.cjs +1 -1
  363. package/dist/components/features/chat/chat-message.cjs.map +1 -1
  364. package/dist/components/features/chat/chat-message.d.ts +2 -1
  365. package/dist/components/features/chat/chat-message.js +88 -79
  366. package/dist/components/features/chat/chat-message.js.map +1 -1
  367. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +1 -1
  368. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
  369. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +62 -61
  370. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
  371. package/dist/components/features/chat/components/context-window-meter.cjs +1 -1
  372. package/dist/components/features/chat/components/context-window-meter.js +4 -4
  373. package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
  374. package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
  375. package/dist/components/features/chat/generic-event-message.cjs +1 -1
  376. package/dist/components/features/chat/generic-event-message.cjs.map +1 -1
  377. package/dist/components/features/chat/generic-event-message.d.ts +2 -1
  378. package/dist/components/features/chat/generic-event-message.js +41 -22
  379. package/dist/components/features/chat/generic-event-message.js.map +1 -1
  380. package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
  381. package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
  382. package/dist/components/features/chat/interactive-chat-box.js +20 -19
  383. package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
  384. package/dist/components/features/chat/model-messages.cjs +1 -1
  385. package/dist/components/features/chat/model-messages.cjs.map +1 -1
  386. package/dist/components/features/chat/model-messages.js +27 -26
  387. package/dist/components/features/chat/model-messages.js.map +1 -1
  388. package/dist/components/features/conversation/conversation-overview-git-section.cjs +1 -1
  389. package/dist/components/features/conversation/conversation-overview-git-section.js +4 -4
  390. package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +1 -1
  391. package/dist/components/features/conversation/conversation-overview-skills-panel.js +4 -4
  392. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
  393. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
  394. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +77 -78
  395. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
  396. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
  397. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
  398. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +88 -88
  399. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
  400. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs +2 -0
  401. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs.map +1 -0
  402. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.d.ts +21 -0
  403. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js +239 -0
  404. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js.map +1 -0
  405. package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
  406. package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
  407. package/dist/components/features/conversation-panel/budget-display.d.ts +1 -2
  408. package/dist/components/features/conversation-panel/budget-display.js +12 -19
  409. package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
  410. package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs +2 -0
  411. package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs.map +1 -0
  412. package/dist/components/features/conversation-panel/conversation-active-tag-filters.d.ts +28 -0
  413. package/dist/components/features/conversation-panel/conversation-active-tag-filters.js +69 -0
  414. package/dist/components/features/conversation-panel/conversation-active-tag-filters.js.map +1 -0
  415. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
  416. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
  417. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +2 -1
  418. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +19 -18
  419. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
  420. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
  421. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
  422. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +2 -1
  423. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +91 -80
  424. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
  425. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
  426. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
  427. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +45 -44
  428. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
  429. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs +1 -1
  430. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs.map +1 -1
  431. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js +1 -1
  432. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js.map +1 -1
  433. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
  434. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
  435. package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +7 -1
  436. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +87 -81
  437. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
  438. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs +1 -1
  439. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs.map +1 -1
  440. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.d.ts +2 -1
  441. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js +1 -1
  442. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js.map +1 -1
  443. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs +1 -1
  444. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs.map +1 -1
  445. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.d.ts +2 -1
  446. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js +2 -1
  447. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js.map +1 -1
  448. package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs +2 -0
  449. package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs.map +1 -0
  450. package/dist/components/features/conversation-panel/conversation-layouts-menu.d.ts +29 -0
  451. package/dist/components/features/conversation-panel/conversation-layouts-menu.js +177 -0
  452. package/dist/components/features/conversation-panel/conversation-layouts-menu.js.map +1 -0
  453. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
  454. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
  455. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +37 -0
  456. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +85 -45
  457. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
  458. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  459. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  460. package/dist/components/features/conversation-panel/conversation-panel.js +296 -290
  461. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  462. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs +2 -0
  463. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs.map +1 -0
  464. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.d.ts +22 -0
  465. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js +153 -0
  466. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js.map +1 -0
  467. package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs +2 -0
  468. package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs.map +1 -0
  469. package/dist/components/features/conversation-panel/hide-older-conversations-row.d.ts +6 -0
  470. package/dist/components/features/conversation-panel/hide-older-conversations-row.js +65 -0
  471. package/dist/components/features/conversation-panel/hide-older-conversations-row.js.map +1 -0
  472. package/dist/components/features/conversation-panel/menu-row.cjs +1 -1
  473. package/dist/components/features/conversation-panel/menu-row.cjs.map +1 -1
  474. package/dist/components/features/conversation-panel/menu-row.d.ts +11 -1
  475. package/dist/components/features/conversation-panel/menu-row.js +27 -16
  476. package/dist/components/features/conversation-panel/menu-row.js.map +1 -1
  477. package/dist/components/features/home/featured-automations/automation-health-indicator.cjs +1 -1
  478. package/dist/components/features/home/featured-automations/automation-health-indicator.cjs.map +1 -1
  479. package/dist/components/features/home/featured-automations/automation-health-indicator.js +1 -1
  480. package/dist/components/features/home/featured-automations/automation-health-indicator.js.map +1 -1
  481. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs +1 -1
  482. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs.map +1 -1
  483. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +4 -3
  484. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js +22 -25
  485. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js.map +1 -1
  486. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs +1 -1
  487. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs.map +1 -1
  488. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +1 -1
  489. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js +15 -15
  490. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js.map +1 -1
  491. package/dist/components/features/home/featured-automations/automation-run-health.cjs +1 -1
  492. package/dist/components/features/home/featured-automations/automation-run-health.cjs.map +1 -1
  493. package/dist/components/features/home/featured-automations/automation-run-health.d.ts +5 -3
  494. package/dist/components/features/home/featured-automations/automation-run-health.js +30 -23
  495. package/dist/components/features/home/featured-automations/automation-run-health.js.map +1 -1
  496. package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +1 -2
  497. package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +0 -1
  498. package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +3 -2
  499. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
  500. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
  501. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +1 -1
  502. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +42 -42
  503. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
  504. package/dist/components/features/images/image-lightbox.cjs +2 -0
  505. package/dist/components/features/images/image-lightbox.cjs.map +1 -0
  506. package/dist/components/features/images/image-lightbox.d.ts +11 -0
  507. package/dist/components/features/images/image-lightbox.js +37 -0
  508. package/dist/components/features/images/image-lightbox.js.map +1 -0
  509. package/dist/components/features/images/image-preview.cjs +1 -1
  510. package/dist/components/features/images/image-preview.cjs.map +1 -1
  511. package/dist/components/features/images/image-preview.d.ts +2 -1
  512. package/dist/components/features/images/image-preview.js +33 -13
  513. package/dist/components/features/images/image-preview.js.map +1 -1
  514. package/dist/components/features/manifest/manifest-form-field.d.ts +3 -1
  515. package/dist/components/features/manifest/manifest-review-step.d.ts +3 -1
  516. package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +3 -4
  517. package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
  518. package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
  519. package/dist/components/features/settings/cloud-settings-link.d.ts +3 -1
  520. package/dist/components/features/settings/cloud-settings-link.js +22 -19
  521. package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
  522. package/dist/components/features/settings/integrations-settings-link.cjs +1 -1
  523. package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -1
  524. package/dist/components/features/settings/integrations-settings-link.d.ts +3 -1
  525. package/dist/components/features/settings/integrations-settings-link.js +20 -17
  526. package/dist/components/features/settings/integrations-settings-link.js.map +1 -1
  527. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  528. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +3 -2
  529. package/dist/components/features/settings/llm-profiles/profile-row.cjs +1 -1
  530. package/dist/components/features/settings/llm-profiles/profile-row.js +1 -1
  531. package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +2 -2
  532. package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
  533. package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs.map +1 -1
  534. package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +8 -7
  535. package/dist/components/features/settings/sdk-settings/sdk-section-page.js +172 -142
  536. package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
  537. package/dist/components/features/settings/secrets-settings/secret-form.cjs +1 -1
  538. package/dist/components/features/settings/secrets-settings/secret-form.cjs.map +1 -1
  539. package/dist/components/features/settings/secrets-settings/secret-form.js +38 -25
  540. package/dist/components/features/settings/secrets-settings/secret-form.js.map +1 -1
  541. package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
  542. package/dist/components/features/settings/settings-dropdown-input.js +6 -6
  543. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  544. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  545. package/dist/components/features/sidebar/sidebar-rail-body.d.ts +4 -1
  546. package/dist/components/features/sidebar/sidebar-rail-body.js +157 -139
  547. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  548. package/dist/components/features/sidebar/sidebar.cjs +1 -1
  549. package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
  550. package/dist/components/features/sidebar/sidebar.js +28 -26
  551. package/dist/components/features/sidebar/sidebar.js.map +1 -1
  552. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs +1 -1
  553. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js +3 -3
  554. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  555. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  556. package/dist/components/features/skills/extensions-navigation.js +3 -3
  557. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  558. package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
  559. package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
  560. package/dist/components/providers/agent-server-ui-providers.js +33 -29
  561. package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
  562. package/dist/components/shared/buttons/remove-button.cjs +1 -1
  563. package/dist/components/shared/buttons/remove-button.cjs.map +1 -1
  564. package/dist/components/shared/buttons/remove-button.d.ts +2 -1
  565. package/dist/components/shared/buttons/remove-button.js +2 -1
  566. package/dist/components/shared/buttons/remove-button.js.map +1 -1
  567. package/dist/components/shared/buttons/styled-tooltip.cjs +1 -1
  568. package/dist/components/shared/buttons/styled-tooltip.cjs.map +1 -1
  569. package/dist/components/shared/buttons/styled-tooltip.d.ts +2 -1
  570. package/dist/components/shared/buttons/styled-tooltip.js +2 -1
  571. package/dist/components/shared/buttons/styled-tooltip.js.map +1 -1
  572. package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
  573. package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
  574. package/dist/components/shared/filters/enum-filter-dropdown.d.ts +5 -1
  575. package/dist/components/shared/filters/enum-filter-dropdown.js +14 -14
  576. package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
  577. package/dist/components/shared/free-models-note.cjs +2 -0
  578. package/dist/components/shared/free-models-note.cjs.map +1 -0
  579. package/dist/components/shared/free-models-note.d.ts +3 -0
  580. package/dist/components/shared/free-models-note.js +20 -0
  581. package/dist/components/shared/free-models-note.js.map +1 -0
  582. package/dist/components/shared/modals/confirmation-modal.cjs +1 -1
  583. package/dist/components/shared/modals/confirmation-modal.cjs.map +1 -1
  584. package/dist/components/shared/modals/confirmation-modal.d.ts +2 -1
  585. package/dist/components/shared/modals/confirmation-modal.js +8 -8
  586. package/dist/components/shared/modals/confirmation-modal.js.map +1 -1
  587. package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
  588. package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
  589. package/dist/components/shared/modals/settings/model-selector.js +102 -112
  590. package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
  591. package/dist/config/defaults.cjs +1 -1
  592. package/dist/config/defaults.cjs.map +1 -1
  593. package/dist/config/defaults.js +3 -3
  594. package/dist/config/defaults.js.map +1 -1
  595. package/dist/constants/acp-providers.cjs.map +1 -1
  596. package/dist/constants/acp-providers.d.ts +12 -0
  597. package/dist/constants/acp-providers.js.map +1 -1
  598. package/dist/constants/settings-nav.d.ts +8 -0
  599. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  600. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  601. package/dist/contexts/conversation-websocket-context.d.ts +5 -0
  602. package/dist/contexts/conversation-websocket-context.js +194 -198
  603. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  604. package/dist/contexts/websocket-provider-wrapper.cjs +1 -1
  605. package/dist/contexts/websocket-provider-wrapper.cjs.map +1 -1
  606. package/dist/contexts/websocket-provider-wrapper.js +31 -15
  607. package/dist/contexts/websocket-provider-wrapper.js.map +1 -1
  608. package/dist/hooks/chat/record-model-switch-message.cjs +1 -1
  609. package/dist/hooks/chat/record-model-switch-message.cjs.map +1 -1
  610. package/dist/hooks/chat/record-model-switch-message.d.ts +31 -0
  611. package/dist/hooks/chat/record-model-switch-message.js +25 -12
  612. package/dist/hooks/chat/record-model-switch-message.js.map +1 -1
  613. package/dist/hooks/chat/use-plan-mode-interceptor.cjs +2 -0
  614. package/dist/hooks/chat/use-plan-mode-interceptor.cjs.map +1 -0
  615. package/dist/hooks/chat/use-plan-mode-interceptor.d.ts +16 -0
  616. package/dist/hooks/chat/use-plan-mode-interceptor.js +43 -0
  617. package/dist/hooks/chat/use-plan-mode-interceptor.js.map +1 -0
  618. package/dist/hooks/chat/use-slash-command.cjs +1 -1
  619. package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
  620. package/dist/hooks/chat/use-slash-command.js +63 -62
  621. package/dist/hooks/chat/use-slash-command.js.map +1 -1
  622. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  623. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  624. package/dist/hooks/mutation/use-create-conversation.js +5 -1
  625. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  626. package/dist/hooks/mutation/use-read-conversation-file.cjs +1 -1
  627. package/dist/hooks/mutation/use-read-conversation-file.cjs.map +1 -1
  628. package/dist/hooks/mutation/use-read-conversation-file.js +11 -4
  629. package/dist/hooks/mutation/use-read-conversation-file.js.map +1 -1
  630. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  631. package/dist/hooks/mutation/use-save-settings.js +3 -3
  632. package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
  633. package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
  634. package/dist/hooks/mutation/use-switch-llm-profile.js +13 -25
  635. package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
  636. package/dist/hooks/mutation/use-update-conversation-tags.cjs +2 -0
  637. package/dist/hooks/mutation/use-update-conversation-tags.cjs.map +1 -0
  638. package/dist/hooks/mutation/use-update-conversation-tags.d.ts +8 -0
  639. package/dist/hooks/mutation/use-update-conversation-tags.js +45 -0
  640. package/dist/hooks/mutation/use-update-conversation-tags.js.map +1 -0
  641. package/dist/hooks/query/query-keys.cjs +1 -1
  642. package/dist/hooks/query/query-keys.cjs.map +1 -1
  643. package/dist/hooks/query/query-keys.d.ts +6 -0
  644. package/dist/hooks/query/query-keys.js +2 -2
  645. package/dist/hooks/query/query-keys.js.map +1 -1
  646. package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
  647. package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
  648. package/dist/hooks/query/use-automation-sdk-version.d.ts +0 -1
  649. package/dist/hooks/query/use-automation-sdk-version.js +30 -55
  650. package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
  651. package/dist/hooks/query/use-conversation-skills.cjs +1 -1
  652. package/dist/hooks/query/use-conversation-skills.cjs.map +1 -1
  653. package/dist/hooks/query/use-conversation-skills.d.ts +14 -5
  654. package/dist/hooks/query/use-conversation-skills.js +20 -4
  655. package/dist/hooks/query/use-conversation-skills.js.map +1 -1
  656. package/dist/hooks/query/use-free-models.cjs +2 -0
  657. package/dist/hooks/query/use-free-models.cjs.map +1 -0
  658. package/dist/hooks/query/use-free-models.d.ts +23 -0
  659. package/dist/hooks/query/use-free-models.js +67 -0
  660. package/dist/hooks/query/use-free-models.js.map +1 -0
  661. package/dist/hooks/query/use-local-git-info.cjs.map +1 -1
  662. package/dist/hooks/query/use-local-git-info.js.map +1 -1
  663. package/dist/hooks/query/use-provider-connections.cjs +1 -1
  664. package/dist/hooks/query/use-provider-connections.cjs.map +1 -1
  665. package/dist/hooks/query/use-provider-connections.d.ts +6 -3
  666. package/dist/hooks/query/use-provider-connections.js +7 -3
  667. package/dist/hooks/query/use-provider-connections.js.map +1 -1
  668. package/dist/hooks/query/use-provider-models.cjs +1 -1
  669. package/dist/hooks/query/use-provider-models.cjs.map +1 -1
  670. package/dist/hooks/query/use-provider-models.js +34 -25
  671. package/dist/hooks/query/use-provider-models.js.map +1 -1
  672. package/dist/hooks/query/use-search-providers.cjs +1 -1
  673. package/dist/hooks/query/use-search-providers.cjs.map +1 -1
  674. package/dist/hooks/query/use-search-providers.js +31 -19
  675. package/dist/hooks/query/use-search-providers.js.map +1 -1
  676. package/dist/hooks/query/use-sub-conversations.cjs +1 -1
  677. package/dist/hooks/query/use-sub-conversations.cjs.map +1 -1
  678. package/dist/hooks/query/use-sub-conversations.js +16 -16
  679. package/dist/hooks/query/use-sub-conversations.js.map +1 -1
  680. package/dist/hooks/use-acp-model-context.cjs +1 -1
  681. package/dist/hooks/use-acp-model-context.js +3 -3
  682. package/dist/hooks/use-agent-state.cjs +1 -1
  683. package/dist/hooks/use-agent-state.cjs.map +1 -1
  684. package/dist/hooks/use-agent-state.d.ts +17 -1
  685. package/dist/hooks/use-agent-state.js +19 -9
  686. package/dist/hooks/use-agent-state.js.map +1 -1
  687. package/dist/hooks/use-automation-permissions.cjs +2 -0
  688. package/dist/hooks/use-automation-permissions.cjs.map +1 -0
  689. package/dist/hooks/use-automation-permissions.d.ts +43 -0
  690. package/dist/hooks/use-automation-permissions.js +52 -0
  691. package/dist/hooks/use-automation-permissions.js.map +1 -0
  692. package/dist/hooks/use-chat-input-model-state.cjs +1 -1
  693. package/dist/hooks/use-chat-input-model-state.js +3 -3
  694. package/dist/hooks/use-handle-plan-click.cjs +1 -1
  695. package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
  696. package/dist/hooks/use-handle-plan-click.d.ts +3 -1
  697. package/dist/hooks/use-handle-plan-click.js +85 -26
  698. package/dist/hooks/use-handle-plan-click.js.map +1 -1
  699. package/dist/hooks/use-home-automation-actions.cjs +1 -1
  700. package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
  701. package/dist/hooks/use-home-automation-actions.d.ts +1 -2
  702. package/dist/hooks/use-home-automation-actions.js +1 -1
  703. package/dist/hooks/use-home-automation-actions.js.map +1 -1
  704. package/dist/hooks/use-llm-configured.cjs +1 -1
  705. package/dist/hooks/use-llm-configured.js +3 -3
  706. package/dist/hooks/use-manifest-preflight.d.ts +1 -1
  707. package/dist/hooks/use-unified-websocket-status.cjs +1 -1
  708. package/dist/hooks/use-unified-websocket-status.cjs.map +1 -1
  709. package/dist/hooks/use-unified-websocket-status.d.ts +7 -0
  710. package/dist/hooks/use-unified-websocket-status.js +5 -1
  711. package/dist/hooks/use-unified-websocket-status.js.map +1 -1
  712. package/dist/i18n/declaration.cjs +1 -1
  713. package/dist/i18n/declaration.cjs.map +1 -1
  714. package/dist/i18n/declaration.d.ts +71 -14
  715. package/dist/i18n/declaration.js +1 -1
  716. package/dist/i18n/declaration.js.map +1 -1
  717. package/dist/i18n/translation.cjs +2 -2
  718. package/dist/i18n/translation.cjs.map +1 -1
  719. package/dist/i18n/translation.js +1281 -312
  720. package/dist/i18n/translation.js.map +1 -1
  721. package/dist/locales/ar/openhands.json +79 -22
  722. package/dist/locales/ca/openhands.json +79 -22
  723. package/dist/locales/de/openhands.json +79 -22
  724. package/dist/locales/en/openhands.json +79 -22
  725. package/dist/locales/es/openhands.json +79 -22
  726. package/dist/locales/fr/openhands.json +79 -22
  727. package/dist/locales/it/openhands.json +79 -22
  728. package/dist/locales/ja/openhands.json +79 -22
  729. package/dist/locales/ko-KR/openhands.json +79 -22
  730. package/dist/locales/no/openhands.json +79 -22
  731. package/dist/locales/pt/openhands.json +79 -22
  732. package/dist/locales/tr/openhands.json +79 -22
  733. package/dist/locales/uk/openhands.json +79 -22
  734. package/dist/locales/zh-CN/openhands.json +79 -22
  735. package/dist/locales/zh-TW/openhands.json +79 -22
  736. package/dist/manifests/automation-insights.cjs.map +1 -1
  737. package/dist/manifests/automation-insights.d.ts +10 -2
  738. package/dist/manifests/automation-insights.js.map +1 -1
  739. package/dist/manifests/automation-setup.cjs +1 -1
  740. package/dist/manifests/automation-setup.cjs.map +1 -1
  741. package/dist/manifests/automation-setup.d.ts +9 -16
  742. package/dist/manifests/automation-setup.js +17 -7
  743. package/dist/manifests/automation-setup.js.map +1 -1
  744. package/dist/manifests/manifest-actions.d.ts +1 -1
  745. package/dist/manifests/manifest-capabilities.d.ts +3 -1
  746. package/dist/manifests/manifest-local-validation.cjs +2 -0
  747. package/dist/manifests/manifest-local-validation.cjs.map +1 -0
  748. package/dist/manifests/manifest-local-validation.d.ts +15 -11
  749. package/dist/manifests/manifest-local-validation.js +8 -0
  750. package/dist/manifests/manifest-local-validation.js.map +1 -0
  751. package/dist/manifests/manifest-template.cjs +2 -0
  752. package/dist/manifests/manifest-template.cjs.map +1 -0
  753. package/dist/manifests/manifest-template.d.ts +4 -4
  754. package/dist/manifests/manifest-template.js +12 -0
  755. package/dist/manifests/manifest-template.js.map +1 -0
  756. package/dist/manifests/manifest-validation.cjs +1 -1
  757. package/dist/manifests/manifest-validation.cjs.map +1 -1
  758. package/dist/manifests/manifest-validation.js +106 -28
  759. package/dist/manifests/manifest-validation.js.map +1 -1
  760. package/dist/manifests/types.cjs.map +1 -1
  761. package/dist/manifests/types.d.ts +39 -4
  762. package/dist/manifests/types.js.map +1 -1
  763. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs +8 -0
  764. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs.map +1 -0
  765. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js +221 -0
  766. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js.map +1 -0
  767. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +1 -1
  768. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -1
  769. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +1 -1
  770. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -1
  771. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +1 -1
  772. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
  773. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +1 -1
  774. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
  775. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs +1 -1
  776. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -1
  777. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +1 -1
  778. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js.map +1 -1
  779. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
  780. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
  781. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +22 -20
  782. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
  783. package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
  784. package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
  785. package/dist/node_modules/@openhands/extensions/automations/interface.js +2 -1
  786. package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
  787. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +1 -1
  788. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -1
  789. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +24 -5
  790. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -1
  791. package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs +1 -1
  792. package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js +1 -1
  793. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs +2 -0
  794. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs.map +1 -0
  795. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js +21 -0
  796. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js.map +1 -0
  797. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs +2 -0
  798. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs.map +1 -0
  799. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js +23 -0
  800. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js.map +1 -0
  801. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs +2 -0
  802. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs.map +1 -0
  803. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js +43 -0
  804. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js.map +1 -0
  805. package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs +2 -0
  806. package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs.map +1 -0
  807. package/dist/node_modules/lucide-react/dist/esm/icons/tags.js +22 -0
  808. package/dist/node_modules/lucide-react/dist/esm/icons/tags.js.map +1 -0
  809. package/dist/package.cjs +1 -1
  810. package/dist/package.cjs.map +1 -1
  811. package/dist/package.js +4 -4
  812. package/dist/package.js.map +1 -1
  813. package/dist/routes/agent-settings.d.ts +2 -0
  814. package/dist/routes/app-settings.cjs +1 -1
  815. package/dist/routes/app-settings.cjs.map +1 -1
  816. package/dist/routes/app-settings.js +53 -48
  817. package/dist/routes/app-settings.js.map +1 -1
  818. package/dist/routes/llm-settings.cjs +1 -1
  819. package/dist/routes/llm-settings.cjs.map +1 -1
  820. package/dist/routes/llm-settings.d.ts +3 -1
  821. package/dist/routes/llm-settings.js +120 -127
  822. package/dist/routes/llm-settings.js.map +1 -1
  823. package/dist/routes/planner-tab.cjs +1 -1
  824. package/dist/routes/planner-tab.cjs.map +1 -1
  825. package/dist/routes/planner-tab.js +44 -28
  826. package/dist/routes/planner-tab.js.map +1 -1
  827. package/dist/services/telemetry.cjs +1 -1
  828. package/dist/services/telemetry.cjs.map +1 -1
  829. package/dist/services/telemetry.d.ts +5 -0
  830. package/dist/services/telemetry.js +122 -115
  831. package/dist/services/telemetry.js.map +1 -1
  832. package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
  833. package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
  834. package/dist/stores/conversation-panel-preferences-store.d.ts +32 -5
  835. package/dist/stores/conversation-panel-preferences-store.js +29 -12
  836. package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
  837. package/dist/stores/conversation-state-store.cjs +1 -1
  838. package/dist/stores/conversation-state-store.cjs.map +1 -1
  839. package/dist/stores/conversation-state-store.d.ts +9 -3
  840. package/dist/stores/conversation-state-store.js +6 -3
  841. package/dist/stores/conversation-state-store.js.map +1 -1
  842. package/dist/stores/conversation-store.cjs +1 -1
  843. package/dist/stores/conversation-store.cjs.map +1 -1
  844. package/dist/stores/conversation-store.d.ts +2 -0
  845. package/dist/stores/conversation-store.js +3 -0
  846. package/dist/stores/conversation-store.js.map +1 -1
  847. package/dist/stores/free-models-store.cjs +2 -0
  848. package/dist/stores/free-models-store.cjs.map +1 -0
  849. package/dist/stores/free-models-store.d.ts +30 -0
  850. package/dist/stores/free-models-store.js +22 -0
  851. package/dist/stores/free-models-store.js.map +1 -0
  852. package/dist/stores/model-store.cjs +1 -1
  853. package/dist/stores/model-store.cjs.map +1 -1
  854. package/dist/stores/model-store.d.ts +7 -0
  855. package/dist/stores/model-store.js +4 -0
  856. package/dist/stores/model-store.js.map +1 -1
  857. package/dist/types/automation.cjs.map +1 -1
  858. package/dist/types/automation.d.ts +46 -1
  859. package/dist/types/automation.js.map +1 -1
  860. package/dist/ui/context-menu.d.ts +1 -1
  861. package/dist/ui/toggle-switch.cjs +1 -1
  862. package/dist/ui/toggle-switch.cjs.map +1 -1
  863. package/dist/ui/toggle-switch.d.ts +4 -1
  864. package/dist/ui/toggle-switch.js +4 -3
  865. package/dist/ui/toggle-switch.js.map +1 -1
  866. package/dist/utils/automation-catalog.cjs +1 -1
  867. package/dist/utils/automation-catalog.cjs.map +1 -1
  868. package/dist/utils/automation-catalog.d.ts +12 -1
  869. package/dist/utils/automation-catalog.js +42 -12
  870. package/dist/utils/automation-catalog.js.map +1 -1
  871. package/dist/utils/automation-run-display.cjs +2 -0
  872. package/dist/utils/automation-run-display.cjs.map +1 -0
  873. package/dist/utils/automation-run-display.d.ts +20 -0
  874. package/dist/utils/automation-run-display.js +85 -0
  875. package/dist/utils/automation-run-display.js.map +1 -0
  876. package/dist/utils/automation-schedule.cjs +1 -1
  877. package/dist/utils/automation-schedule.cjs.map +1 -1
  878. package/dist/utils/automation-schedule.d.ts +16 -0
  879. package/dist/utils/automation-schedule.js +2 -0
  880. package/dist/utils/automation-schedule.js.map +1 -1
  881. package/dist/utils/constants.cjs +1 -1
  882. package/dist/utils/constants.cjs.map +1 -1
  883. package/dist/utils/constants.d.ts +4 -0
  884. package/dist/utils/constants.js +23 -3
  885. package/dist/utils/constants.js.map +1 -1
  886. package/dist/utils/format-event-timestamp.cjs +2 -0
  887. package/dist/utils/format-event-timestamp.cjs.map +1 -0
  888. package/dist/utils/format-event-timestamp.d.ts +1 -0
  889. package/dist/utils/format-event-timestamp.js +13 -0
  890. package/dist/utils/format-event-timestamp.js.map +1 -0
  891. package/dist/utils/format-model-name.cjs +1 -1
  892. package/dist/utils/format-model-name.cjs.map +1 -1
  893. package/dist/utils/format-model-name.d.ts +27 -6
  894. package/dist/utils/format-model-name.js +14 -6
  895. package/dist/utils/format-model-name.js.map +1 -1
  896. package/dist/utils/git-diff-stats.cjs +2 -2
  897. package/dist/utils/git-diff-stats.cjs.map +1 -1
  898. package/dist/utils/git-diff-stats.d.ts +4 -0
  899. package/dist/utils/git-diff-stats.js +12 -2
  900. package/dist/utils/git-diff-stats.js.map +1 -1
  901. package/dist/utils/plan-file.cjs +4 -0
  902. package/dist/utils/plan-file.cjs.map +1 -0
  903. package/dist/utils/plan-file.d.ts +18 -0
  904. package/dist/utils/plan-file.js +58 -0
  905. package/dist/utils/plan-file.js.map +1 -0
  906. package/dist/utils/recommended-automation-rail.cjs +1 -1
  907. package/dist/utils/recommended-automation-rail.cjs.map +1 -1
  908. package/dist/utils/recommended-automation-rail.js +1 -0
  909. package/dist/utils/recommended-automation-rail.js.map +1 -1
  910. package/dist/utils/scroll-fade-state.cjs +1 -1
  911. package/dist/utils/scroll-fade-state.cjs.map +1 -1
  912. package/dist/utils/scroll-fade-state.d.ts +6 -0
  913. package/dist/utils/scroll-fade-state.js +8 -1
  914. package/dist/utils/scroll-fade-state.js.map +1 -1
  915. package/dist/utils/sdk-settings-schema.cjs +1 -1
  916. package/dist/utils/sdk-settings-schema.cjs.map +1 -1
  917. package/dist/utils/sdk-settings-schema.d.ts +1 -0
  918. package/dist/utils/sdk-settings-schema.js +25 -22
  919. package/dist/utils/sdk-settings-schema.js.map +1 -1
  920. package/dist/utils/utils.cjs +1 -1
  921. package/dist/utils/utils.cjs.map +1 -1
  922. package/dist/utils/utils.js +11 -11
  923. package/dist/utils/utils.js.map +1 -1
  924. package/package.json +4 -4
  925. package/scripts/check-sdk-version-sync.mjs +6 -6
  926. package/scripts/dev-safe.mjs +1 -1
  927. package/scripts/dev-with-automation.mjs +1 -1
  928. package/scripts/static-server.mjs +33 -1
  929. package/build/assets/active-backend-context-CrHTlgvN.js +0 -2
  930. package/build/assets/agent-profiles-settings-Dzgb7G9z.js +0 -1
  931. package/build/assets/agent-server-conversation-service.api-tnqNjbpE.js +0 -86
  932. package/build/assets/agent-settings-DLtsqaOs.js +0 -2
  933. package/build/assets/agent-settings-fFvR-XC2.js +0 -1
  934. package/build/assets/alert-banner-HP6mX-Vr.js +0 -1
  935. package/build/assets/api-key-entry-screen-qTzrmJcr.js +0 -1
  936. package/build/assets/app-settings-dbnneVaV.js +0 -1
  937. package/build/assets/automation-detail-BmwlCUAB.js +0 -3
  938. package/build/assets/automation-git-sync-CprN5DcU.js +0 -1
  939. package/build/assets/automation-setup-route-C40kXjMY.js +0 -1
  940. package/build/assets/automations-list-DuNcRawl.js +0 -1
  941. package/build/assets/backend-form-modal-lhGwzXFI.js +0 -1
  942. package/build/assets/backend-synced-settings-badge-DPkz30BE.js +0 -1
  943. package/build/assets/badge-BU3S0VtE.js +0 -1
  944. package/build/assets/bot-dMYHVfYM.js +0 -1
  945. package/build/assets/browser-DSAo0tz1.js +0 -46
  946. package/build/assets/browser-tab-C9vy56R5.js +0 -1
  947. package/build/assets/canvas-extension-page-dx1gFrfW.js +0 -1
  948. package/build/assets/canvas-extensions-8A-XhpgP.js +0 -1
  949. package/build/assets/check-CS0vmpQQ.js +0 -1
  950. package/build/assets/chevron-down-e1QBpjVy.js +0 -1
  951. package/build/assets/chevron-right-ZG4R5G4Q.js +0 -1
  952. package/build/assets/circle-check-DzWLNsbE.js +0 -1
  953. package/build/assets/circle-plus-check-toggle-BO_kFZt3.js +0 -1
  954. package/build/assets/command-menu--UIlGL72.js +0 -1
  955. package/build/assets/commits-tab-AnZwLvh-.js +0 -1
  956. package/build/assets/confirmation-modal-Dv1ktp8K.js +0 -1
  957. package/build/assets/conversation-BbGrAO4Z.js +0 -93
  958. package/build/assets/conversation-mYT6NAoj.js +0 -1
  959. package/build/assets/conversation-panel-mYT6NAoj.js +0 -1
  960. package/build/assets/conversation-state-store-B0ImPLHO.js +0 -1
  961. package/build/assets/conversation-store-Ca3ghXap.js +0 -6
  962. package/build/assets/copy-to-clipboard-button-Ca8iSkkA.js +0 -1
  963. package/build/assets/device-verify-Bhn2e_Ye.js +0 -1
  964. package/build/assets/edit-automation-modal-DadGbJ2u.js +0 -1
  965. package/build/assets/empty-state-BoGVDecT.js +0 -1
  966. package/build/assets/enum-filter-dropdown-Bgca129f.js +0 -1
  967. package/build/assets/environment-switch-overlay-BmBRT7gv.js +0 -1
  968. package/build/assets/error-state-Body8Ngd.js +0 -1
  969. package/build/assets/extensions-hub-CcDqq_vR.js +0 -1
  970. package/build/assets/extensions-navigation-Cr4yzYk4.js +0 -1
  971. package/build/assets/external-link-DKUlnCQV.js +0 -1
  972. package/build/assets/files-tab-D4o2VyE_.js +0 -1
  973. package/build/assets/format-model-name-CasAP3nd.js +0 -1
  974. package/build/assets/get-git-path-ChKDVHZp.js +0 -1
  975. package/build/assets/git-repo-dropdown-4ROKl2cB.js +0 -1
  976. package/build/assets/git-repo-dropdown-BkqzkMmM.js +0 -1
  977. package/build/assets/highlighted-source-view-BFRxGT_Q.js +0 -1
  978. package/build/assets/home-ChpSuepX.js +0 -1
  979. package/build/assets/home-DIsB440S.js +0 -1
  980. package/build/assets/home-automation-run-tooltip-BVNDWjAH.js +0 -1
  981. package/build/assets/home-store-CY9Ej0ux.js +0 -1
  982. package/build/assets/index-home-BdlrFIif.js +0 -1
  983. package/build/assets/info-B6RQawoW.js +0 -1
  984. package/build/assets/install-server-modal-Dpy89p4g.js +0 -1
  985. package/build/assets/kebab-menu-item-content-D8hSNGmm.js +0 -1
  986. package/build/assets/launch-IrTDEFCs.js +0 -1
  987. package/build/assets/list-filter-DsEK7NFC.js +0 -1
  988. package/build/assets/llm-not-configured-banner-CIFABh3K.js +0 -27
  989. package/build/assets/llm-settings-B9juXhIa.js +0 -1
  990. package/build/assets/llm-settings-De1d5dfr.js +0 -1
  991. package/build/assets/llm-subscription-service-BpJ0ouQo.js +0 -1
  992. package/build/assets/loader-circle-CC1au6hc.js +0 -1
  993. package/build/assets/manage-backends-modal-BrPV3oB-.js +0 -1
  994. package/build/assets/manifest-80fb1c29.js +0 -1
  995. package/build/assets/manifest-subpage-layout-CAOYzrYp.js +0 -1
  996. package/build/assets/markdown-renderer-BzTlxI8x.js +0 -8
  997. package/build/assets/mcp-BTs_SXfZ.js +0 -1
  998. package/build/assets/mcp-page-BEBYqH_K.js +0 -9
  999. package/build/assets/messages-DKV9cRc2.js +0 -41
  1000. package/build/assets/modal-close-button-DDzdRvCs.js +0 -1
  1001. package/build/assets/onboarding-DV_OXoeP.js +0 -1
  1002. package/build/assets/onboarding-modal-rkyBYkeQ.js +0 -1
  1003. package/build/assets/organization-service.api-DrYNkEN_.js +0 -1
  1004. package/build/assets/pencil-47jAZH_V.js +0 -1
  1005. package/build/assets/pin-By41Vl5J.js +0 -1
  1006. package/build/assets/planner-tab-C9uZmhme.js +0 -1
  1007. package/build/assets/plug-CG5HFcNG.js +0 -1
  1008. package/build/assets/plugins-management-service-BMJgC3Ga.js +0 -1
  1009. package/build/assets/plus-C7Slq-0I.js +0 -1
  1010. package/build/assets/profiles-service.api-ChoKrL0l.js +0 -1
  1011. package/build/assets/providers-BhMcY5nv.js +0 -1
  1012. package/build/assets/proxy-9Fe1v5na.js +0 -1
  1013. package/build/assets/recommended-automations-launcher-6ABrI9Cy.js +0 -1
  1014. package/build/assets/refresh-cw-3q3Frrii.js +0 -1
  1015. package/build/assets/root-Dc8YmC9F.js +0 -2
  1016. package/build/assets/root-VDaypvK4.css +0 -1
  1017. package/build/assets/root-layout-CXkhSPYh.js +0 -2
  1018. package/build/assets/schema-field-D-y9-LDb.js +0 -1
  1019. package/build/assets/scroll-fade-state-Dw-i4SGq.js +0 -1
  1020. package/build/assets/sdk-section-page-BlFiizlG.js +0 -1
  1021. package/build/assets/secret-form-BB7the8W.js +0 -1
  1022. package/build/assets/secrets-service-ByZVENbp.js +0 -1
  1023. package/build/assets/secrets-settings-B_GpxKW2.js +0 -1
  1024. package/build/assets/settings-C0EWuBtA.js +0 -1
  1025. package/build/assets/settings-dropdown-input-BcwylHs2.js +0 -1
  1026. package/build/assets/settings-index-5w5UW2K3.js +0 -1
  1027. package/build/assets/settings-input-Db-1g8Ql.js +0 -1
  1028. package/build/assets/settings-modal-DfJ3tcJQ.js +0 -1
  1029. package/build/assets/settings-service.api-DJ1r62Zr.js +0 -1
  1030. package/build/assets/settings-switch-CS-dJDmA.js +0 -1
  1031. package/build/assets/shared-conversation-CA5ISEDy.js +0 -1
  1032. package/build/assets/shield-check-D2aCRd16.js +0 -1
  1033. package/build/assets/sidebar-mobile-menu-toggle-C_fb0Jki.js +0 -1
  1034. package/build/assets/sidebar-store-DGqHkVLw.js +0 -1
  1035. package/build/assets/skill-card-pill-row-B27-xyig.js +0 -1
  1036. package/build/assets/skill-scope-B42H-XOc.js +0 -1
  1037. package/build/assets/skills-plugins-tgF8EiXC.js +0 -1
  1038. package/build/assets/skills-settings-BgJ9PaOe.js +0 -1
  1039. package/build/assets/styled-tooltip-C4jf5Fv9.js +0 -1
  1040. package/build/assets/task-list-tab-C5zcaktH.js +0 -1
  1041. package/build/assets/toggle-switch-ChOLXv2n.js +0 -1
  1042. package/build/assets/trash-2-D7K26eDO.js +0 -1
  1043. package/build/assets/trash-D-HYiVYM.js +0 -1
  1044. package/build/assets/triangle-alert-CtdXWHUI.js +0 -1
  1045. package/build/assets/usage-tab-CVDffLPt.js +0 -1
  1046. package/build/assets/use-acp-credential-form-XIQmpX6M.js +0 -1
  1047. package/build/assets/use-activate-agent-profile-BLfmvDiG.js +0 -1
  1048. package/build/assets/use-agent-profiles-Bd9Bvvp1.js +0 -1
  1049. package/build/assets/use-canvas-extensions-Bi693ujJ.js +0 -1
  1050. package/build/assets/use-config-A9QovgXO.js +0 -1
  1051. package/build/assets/use-create-conversation-Dx3l7mFZ.js +0 -1
  1052. package/build/assets/use-create-secret-B9cUFWRG.js +0 -1
  1053. package/build/assets/use-has-permission-B3C8rQmR.js +0 -1
  1054. package/build/assets/use-is-authed-nTBcM7dE.js +0 -1
  1055. package/build/assets/use-llm-configured-BV9nZ1_j.js +0 -1
  1056. package/build/assets/use-llm-profiles-BO-P4Oyo.js +0 -1
  1057. package/build/assets/use-manifest-capabilities-Cw_flwEz.js +0 -1
  1058. package/build/assets/use-onboarding-completion-D8U7k4Qb.js +0 -1
  1059. package/build/assets/use-pinned-home-route-CckOZrmb.js +0 -1
  1060. package/build/assets/use-plugins-marketplace-7i94Zu3Z.js +0 -1
  1061. package/build/assets/use-save-agent-profile-BUjSsDXK.js +0 -1
  1062. package/build/assets/use-settings-DSXLbvBl.js +0 -1
  1063. package/build/assets/use-settings-nav-items-CwRw-CmX.js +0 -16
  1064. package/build/assets/use-tracking-D53y3TH9.js +0 -3
  1065. package/build/assets/useQueries-DlbhlH9I.js +0 -1
  1066. package/build/assets/useQuery-BSTgq1rl.js +0 -1
  1067. package/build/assets/utils-CN5ZfZy1.js +0 -1
  1068. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js +0 -186
  1069. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js +0 -1
  1070. package/build/assets/vendor~root-layout-C9Ju9DQg.js +0 -1
  1071. package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js +0 -1
  1072. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js +0 -1
  1073. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js +0 -1
  1074. package/build/assets/x-DJdhbdmt.js +0 -1
  1075. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +0 -2
  1076. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +0 -1
  1077. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +0 -35
  1078. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +0 -247
  1079. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +0 -1
  1080. package/dist/hooks/query/use-skills.cjs +0 -2
  1081. package/dist/hooks/query/use-skills.cjs.map +0 -1
  1082. package/dist/hooks/query/use-skills.d.ts +0 -7
  1083. package/dist/hooks/query/use-skills.js +0 -13
  1084. package/dist/hooks/query/use-skills.js.map +0 -1
  1085. package/dist/hooks/use-has-permission.cjs +0 -2
  1086. package/dist/hooks/use-has-permission.cjs.map +0 -1
  1087. package/dist/hooks/use-has-permission.d.ts +0 -1
  1088. package/dist/hooks/use-has-permission.js +0 -8
  1089. package/dist/hooks/use-has-permission.js.map +0 -1
  1090. package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs +0 -2
  1091. package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs.map +0 -1
  1092. package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +0 -14
  1093. package/dist/node_modules/lucide-react/dist/esm/icons/eye.js.map +0 -1
@@ -4,9 +4,15 @@ var t = /^[a-z0-9]+(-[a-z0-9]+)*$/, n = /^[a-z][A-Za-z0-9]*$/, r = /<[A-Za-z/!]/
4
4
  "text",
5
5
  "textarea",
6
6
  "select",
7
+ "number",
7
8
  "cron",
8
9
  "timezone",
9
- "repo-picker"
10
+ "repo-picker",
11
+ "llm-profile",
12
+ "event-source",
13
+ "event-type",
14
+ "plugin-sources",
15
+ "tarball-upload"
10
16
  ], d = [
11
17
  "github",
12
18
  "gitlab",
@@ -74,8 +80,8 @@ function S(e, t, n) {
74
80
  e.fail(n, "must be a non-empty object");
75
81
  return;
76
82
  }
77
- let { minLength: r, maxLength: i, format: a } = t;
78
- r !== void 0 && !_(r, 0) && e.fail(`${n}.minLength`, "must be a non-negative integer"), i !== void 0 && !_(i, 1) && e.fail(`${n}.maxLength`, "must be a positive integer"), a !== void 0 && !g(a, p) && e.fail(`${n}.format`, "is not a supported format");
83
+ let { minLength: r, maxLength: i, min: a, max: o, format: s } = t;
84
+ r !== void 0 && !_(r, 0) && e.fail(`${n}.minLength`, "must be a non-negative integer"), i !== void 0 && !_(i, 1) && e.fail(`${n}.maxLength`, "must be a positive integer"), a !== void 0 && !_(a, 0) && e.fail(`${n}.min`, "must be a non-negative integer"), o !== void 0 && !_(o, 1) && e.fail(`${n}.max`, "must be a positive integer"), s !== void 0 && !g(s, p) && e.fail(`${n}.format`, "is not a supported format");
79
85
  }
80
86
  function C(e, t, n) {
81
87
  if (!h(t)) {
@@ -83,7 +89,7 @@ function C(e, t, n) {
83
89
  return;
84
90
  }
85
91
  let { type: r, label: i, help: a, placeholder: o, required: s, provider: c, options: l } = t;
86
- g(r, u) || e.fail(`${n}.type`, "is not a supported field type"), e.copy(i, `${n}.label`), e.copy(a, `${n}.help`), o !== void 0 && e.copy(o, `${n}.placeholder`), t.default !== void 0 && typeof t.default != "string" && e.fail(`${n}.default`, "must be a string"), typeof s != "boolean" && e.fail(`${n}.required`, "must be a boolean"), c !== void 0 && !g(c, d) && e.fail(`${n}.provider`, "is not a supported provider"), r === "repo-picker" && c === void 0 && e.fail(`${n}.provider`, "is required for a repository field"), t.multiple !== void 0 && (t.multiple !== !0 || r !== "repo-picker") && e.fail(`${n}.multiple`, "may only be true, and only on a repository field"), l !== void 0 && (r === "select" ? !Array.isArray(l) || l.length === 0 ? e.fail(`${n}.options`, "must be a non-empty array") : l.forEach((t, r) => {
92
+ g(r, u) || e.fail(`${n}.type`, "is not a supported field type"), e.copy(i, `${n}.label`), e.copy(a, `${n}.help`), o !== void 0 && e.copy(o, `${n}.placeholder`), t.default !== void 0 && typeof t.default != "string" && typeof t.default != "number" && typeof t.default != "boolean" && t.default !== null && e.fail(`${n}.default`, "must be a string, number, boolean or null"), typeof s != "boolean" && e.fail(`${n}.required`, "must be a boolean"), c !== void 0 && !g(c, d) && e.fail(`${n}.provider`, "is not a supported provider"), r === "repo-picker" && c === void 0 && e.fail(`${n}.provider`, "is required for a repository field"), t.multiple !== void 0 && (t.multiple !== !0 || r !== "repo-picker") && e.fail(`${n}.multiple`, "may only be true, and only on a repository field"), l !== void 0 && (r === "select" ? !Array.isArray(l) || l.length === 0 ? e.fail(`${n}.options`, "must be a non-empty array") : l.forEach((t, r) => {
87
93
  let i = `${n}.options[${r}]`;
88
94
  if (!h(t)) {
89
95
  e.fail(i, "must be an object");
@@ -96,7 +102,10 @@ function w(e, t, r) {
96
102
  return !h(t) || Object.keys(t).length === 0 ? (e.fail(r, "must be a non-empty object"), []) : Object.entries(t).map(([t, i]) => (n.test(t) || e.fail(`${r}.${t}`, "is not a valid field name"), C(e, i, `${r}.${t}`), t));
97
103
  }
98
104
  function T(e, t) {
99
- if (!h(t)) return e.fail("setup.form", "must be an object"), [];
105
+ if (!h(t)) return e.fail("setup.form", "must be an object"), {
106
+ kinds: [],
107
+ fieldNames: []
108
+ };
100
109
  t.note !== void 0 && e.copy(t.note, "setup.form.note");
101
110
  let n = w(e, t.args, "setup.form.args"), r = [];
102
111
  t.triggers !== void 0 && (!h(t.triggers) || Object.keys(t.triggers).length === 0 ? e.fail("setup.form.triggers", "must be a non-empty object") : Object.entries(t.triggers).forEach(([t, i]) => {
@@ -107,72 +116,141 @@ function T(e, t) {
107
116
  r.push(t), n.push(...w(e, i, `setup.form.triggers.${t}`));
108
117
  }));
109
118
  let i = n.filter((e, t) => n.indexOf(e) !== t);
110
- return Array.from(new Set(i)).forEach((t) => e.fail(`setup.form.${t}`, "is declared more than once")), r;
119
+ return Array.from(new Set(i)).forEach((t) => e.fail(`setup.form.${t}`, "is declared more than once")), {
120
+ kinds: r,
121
+ fieldNames: n
122
+ };
123
+ }
124
+ function E(e, t, n) {
125
+ if (!Array.isArray(t) || t.length === 0) {
126
+ e.fail(n, "must be a non-empty array");
127
+ return;
128
+ }
129
+ t.forEach((t, r) => {
130
+ (typeof t != "string" || t.length === 0) && e.fail(`${n}[${r}]`, "must be a non-empty string");
131
+ });
132
+ }
133
+ function D(e, t, n, r) {
134
+ let i = `setup.actions.${t}`;
135
+ if (!h(n)) {
136
+ e.fail(i, "must be an object");
137
+ return;
138
+ }
139
+ e.copy(n.label, `${i}.label`), e.copy(n.help, `${i}.help`), E(e, n.features, `${i}.features`), w(e, n.args, `${i}.args`).filter((e) => r.includes(e)).forEach((t) => e.fail(`${i}.args.${t}`, "is already declared by the form")), t === "prompt" ? e.templateValue(n.prompt, `${i}.prompt`) : t === "plugin" ? (e.templateValue(n.prompt, `${i}.prompt`), e.templateValue(n.plugins, `${i}.plugins`)) : t === "upload" ? (e.templateValue(n.tarballPath, `${i}.tarballPath`), e.templateValue(n.entrypoint, `${i}.entrypoint`), n.setupScript !== void 0 && e.templateValue(n.setupScript, `${i}.setupScript`)) : e.fail(i, "is not a supported action kind");
140
+ let a = {
141
+ prompt: [
142
+ "label",
143
+ "help",
144
+ "features",
145
+ "args",
146
+ "prompt"
147
+ ],
148
+ plugin: [
149
+ "label",
150
+ "help",
151
+ "features",
152
+ "args",
153
+ "prompt",
154
+ "plugins"
155
+ ],
156
+ upload: [
157
+ "label",
158
+ "help",
159
+ "features",
160
+ "args",
161
+ "tarballPath",
162
+ "entrypoint",
163
+ "setupScript"
164
+ ]
165
+ }[t] ?? [];
166
+ Object.keys(n).filter((e) => !a.includes(e)).forEach((t) => e.fail(`${i}.${t}`, "is not allowed"));
167
+ }
168
+ function O(e, t, n) {
169
+ if (!h(t) || Object.keys(t).length === 0) {
170
+ e.fail("setup.actions", "must be a non-empty object");
171
+ return;
172
+ }
173
+ Object.entries(t).forEach(([t, r]) => D(e, t, r, n));
174
+ }
175
+ function k(e, t) {
176
+ return h(e) ? Object.values(e).some((e) => h(e) && e.type === t) : !1;
111
177
  }
112
- function E(e) {
113
- return h(e) ? [e.args, ...Object.values(h(e.triggers) ? e.triggers : {})].some((e) => h(e) && Object.values(e).some((e) => h(e) && e.type === "repo-picker")) : !1;
178
+ function A(e) {
179
+ return h(e) && k(e.args, "repo-picker");
114
180
  }
115
- function D(e, t) {
181
+ function j(e) {
182
+ let t = h(e.form) ? e.form : {}, n = h(t.triggers) ? t.triggers : {}, r = n.event;
183
+ return k(r, "event-source") || "event" in n && Object.keys(n).length === 1 && k(r, "repo-picker") || k(t.args, "repo-picker") ? !0 : !h(e.actions) || Object.keys(e.actions).length === 0 ? !1 : Object.values(e.actions).every(A);
184
+ }
185
+ function M(e, t) {
116
186
  e.templateCopy(t, "setup.message") && t.length > m && e.fail("setup.message", `must be at most ${m} characters`);
117
187
  }
118
- function O(e, t) {
188
+ function N(e, t) {
119
189
  if (!h(t)) {
120
190
  e.fail("setup.bundle", "must be an object");
121
191
  return;
122
192
  }
123
193
  (typeof t.version != "string" || !i.test(t.version)) && e.fail("setup.bundle.version", "must be a semantic version"), b(t.entrypoint) || e.fail("setup.bundle.entrypoint", "must be a plain command that stays inside the archive"), t.setupScript !== void 0 && !y(t.setupScript, o) && e.fail("setup.bundle.setupScript", "must be a relative path"), t.timeout !== void 0 && !_(t.timeout, 1) && e.fail("setup.bundle.timeout", "must be a positive integer"), !h(t.files) || Object.keys(t.files).length === 0 ? e.fail("setup.bundle.files", "must be a non-empty object") : (Object.entries(t.files).forEach(([t, n]) => {
124
194
  y(t, o) || e.fail(`setup.bundle.files.${t}`, "is not a packed path"), t === "config.json" && e.fail(`setup.bundle.files.${t}`, "is the name the rendered config is packed under"), y(n, s) || e.fail(`setup.bundle.files.${t}`, "must name a file under skills/ or automations/");
125
- }), typeof t.setupScript == "string" && !(t.setupScript in t.files) && e.fail("setup.bundle.setupScript", "must name a packed file")), !h(t.config) || Object.keys(t.config).length === 0 ? e.fail("setup.bundle.config", "must be a non-empty object") : k(e, t.config, "setup.bundle.config");
195
+ }), typeof t.setupScript == "string" && !(t.setupScript in t.files) && e.fail("setup.bundle.setupScript", "must name a packed file")), !h(t.config) || Object.keys(t.config).length === 0 ? e.fail("setup.bundle.config", "must be a non-empty object") : P(e, t.config, "setup.bundle.config");
126
196
  }
127
- function k(e, t, n) {
197
+ function P(e, t, n) {
128
198
  if (typeof t == "string") {
129
199
  e.templateValue(t, n);
130
200
  return;
131
201
  }
132
202
  if (Array.isArray(t)) {
133
- t.forEach((t, r) => k(e, t, `${n}[${r}]`));
203
+ t.forEach((t, r) => P(e, t, `${n}[${r}]`));
134
204
  return;
135
205
  }
136
206
  if (h(t)) {
137
- Object.entries(t).forEach(([t, r]) => k(e, r, `${n}.${t}`));
207
+ Object.entries(t).forEach(([t, r]) => P(e, r, `${n}.${t}`));
138
208
  return;
139
209
  }
140
210
  t !== null && typeof t != "number" && typeof t != "boolean" && e.fail(n, "must be a string, number, boolean, null, array or object");
141
211
  }
142
- function A(e, t, n) {
212
+ function F(e, t, n, r) {
143
213
  if (!g(t.mode, l)) {
144
214
  e.fail("setup.mode", "is not a supported mode");
145
215
  return;
146
216
  }
147
217
  if (t.mode === "direct") {
148
- let r = t.prompt !== void 0, i = t.bundle !== void 0;
149
- r === i ? e.fail("setup", "must declare exactly one of prompt or bundle for direct setup") : i ? O(e, t.bundle) : e.templateValue(t.prompt, "setup.prompt"), t.message !== void 0 && D(e, t.message), n.length !== 1 && e.fail("setup.form.triggers", "must declare exactly one trigger kind"), n.includes("event") && !E(t.form) && e.fail("setup.form", "must declare a repository field for an event trigger"), t.filter !== void 0 && (n.includes("event") ? e.templateValue(t.filter, "setup.filter") : e.fail("setup.filter", "is only allowed for an event trigger"));
218
+ let i = t.prompt !== void 0, a = t.bundle !== void 0, o = t.actions !== void 0;
219
+ [
220
+ i,
221
+ a,
222
+ o
223
+ ].filter(Boolean).length === 1 ? a ? N(e, t.bundle) : o ? O(e, t.actions, r) : e.templateValue(t.prompt, "setup.prompt") : e.fail("setup", "must declare exactly one of prompt, bundle or actions for direct setup"), t.message !== void 0 && M(e, t.message), n.length === 0 && e.fail("setup.form.triggers", "must declare at least one trigger kind"), n.includes("event") && !j(t) && e.fail("setup.form.triggers.event", "must declare an event source field or repository picker"), t.filter !== void 0 && (n.includes("event") ? e.templateValue(t.filter, "setup.filter") : e.fail("setup.filter", "is only allowed for an event trigger"));
150
224
  return;
151
225
  }
152
- D(e, t.message), e.absent(t, "prompt", "setup", "is only allowed for direct setup"), e.absent(t, "bundle", "setup", "is only allowed for direct setup"), e.absent(t, "filter", "setup", "is only allowed for direct setup");
226
+ M(e, t.message), e.absent(t, "prompt", "setup", "is only allowed for direct setup"), e.absent(t, "bundle", "setup", "is only allowed for direct setup"), e.absent(t, "actions", "setup", "is only allowed for direct setup"), e.absent(t, "filter", "setup", "is only allowed for direct setup");
153
227
  }
154
- function j(e) {
228
+ function I(e) {
155
229
  return h(e) && e.setup !== void 0;
156
230
  }
157
- function M(e) {
231
+ function L(e) {
158
232
  let n = new v();
159
233
  if (!h(e)) return {
160
234
  valid: !1,
161
235
  errors: ["manifest: must be an object"]
162
236
  };
163
237
  let { setup: r } = e;
164
- return h(r) ? r.version === "1.0" ? ((typeof e.id != "string" || !t.test(e.id)) && n.fail("id", "must be a lowercase slug"), n.copy(e.name, "name"), n.copy(e.description, "description"), e.version !== void 0 && (typeof e.version != "string" || !i.test(e.version)) && n.fail("version", "must be a semantic version"), e.skill !== void 0 && (typeof e.skill != "string" || !t.test(e.skill)) && n.fail("skill", "must be a lowercase slug"), x(n, e.requires), A(n, r, T(n, r.form)), {
165
- valid: n.errors.length === 0,
166
- errors: n.errors
167
- }) : {
168
- valid: !1,
169
- errors: ["setup.version: must be \"1.0\""]
170
- } : {
238
+ if (!h(r)) return {
171
239
  valid: !1,
172
240
  errors: ["setup: must be an object"]
173
241
  };
242
+ if (r.version !== "1.0") return {
243
+ valid: !1,
244
+ errors: ["setup.version: must be \"1.0\""]
245
+ };
246
+ (typeof e.id != "string" || !t.test(e.id)) && n.fail("id", "must be a lowercase slug"), n.copy(e.name, "name"), n.copy(e.description, "description"), e.version !== void 0 && (typeof e.version != "string" || !i.test(e.version)) && n.fail("version", "must be a semantic version"), e.skill !== void 0 && (typeof e.skill != "string" || !t.test(e.skill)) && n.fail("skill", "must be a lowercase slug"), x(n, e.requires);
247
+ let { kinds: a, fieldNames: o } = T(n, r.form);
248
+ return F(n, r, a, o), {
249
+ valid: n.errors.length === 0,
250
+ errors: n.errors
251
+ };
174
252
  }
175
253
  //#endregion
176
- export { j as hasSetupBlock, M as validateSetupEntry };
254
+ export { I as hasSetupBlock, L as validateSetupEntry };
177
255
 
178
256
  //# sourceMappingURL=manifest-validation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-validation.js","names":[],"sources":["../../src/manifests/manifest-validation.ts"],"sourcesContent":["/**\n * Admission policy for extension-authored catalog manifests.\n *\n * A manifest is data authored in a different repository that instructs this host\n * to render copy and compose a request. The host therefore decides what a\n * manifest is *permitted* to do rather than trusting the file — validation here\n * is a trust boundary, not a convenience check, and it deliberately does not\n * defer to a schema shipped alongside the manifests it would be validating.\n *\n * Beyond mirroring the published schema, this adds the invariants the host's own\n * derivation depends on: a single trigger kind to read, a repository field for\n * an event trigger's source, and field names unique across the form. Without\n * them the derived request body would be silently wrong rather than rejected.\n *\n * A manifest that fails any check is rejected outright. It never renders a\n * partial UI, because everything downstream treats its content as instructions.\n */\n\nimport {\n BUNDLE_CONFIG_FILENAME,\n SETUP_PLACEHOLDER_NAMESPACES,\n SETUP_VERSION,\n} from \"./types\";\n\nconst ENTRY_ID_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;\nconst FIELD_NAME_PATTERN = /^[a-z][A-Za-z0-9]*$/;\n/** Copy must never be able to inject markup into the host. */\nconst MARKUP_PATTERN = /<[A-Za-z/!]/;\n/**\n * A template version, declared as `version` by a prompt entry and as\n * `setup.bundle.version` by a bundle one. Sent to the service as template\n * provenance, so it is checked at admission. Full semver, as the spec at\n * semver.org states it: a catalog entry published with a pre-release or build\n * suffix is still a version this host may forward, and refusing one would drop\n * the entry from the registry outright.\n */\nconst TEMPLATE_VERSION_PATTERN =\n /^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\\+[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*)?$/;\n// The characters a command of plain words and paths is made of. No shell\n// metacharacters, which the service rejects anyway and a bundle has no reason\n// to need; where those words may point is `isPlainCommand`'s to say.\nconst BUNDLE_COMMAND_PATTERN = /^[A-Za-z0-9 ._/-]+$/;\nconst BUNDLE_PATH_PATTERN = /^[A-Za-z0-9._-]+(\\/[A-Za-z0-9._-]+)*$/;\nconst BUNDLE_SOURCE_PATTERN =\n /^(skills|automations)\\/[A-Za-z0-9._-]+(\\/[A-Za-z0-9._-]+)*$/;\n/** Every `{{` must open a known namespace and close immediately. */\nconst UNKNOWN_PLACEHOLDER_PATTERN = new RegExp(\n `\\\\{\\\\{(?!(?:${SETUP_PLACEHOLDER_NAMESPACES.join(\"|\")})\\\\.[A-Za-z0-9_.]+\\\\}\\\\})`,\n);\n\nconst SETUP_MODES = [\"direct\", \"assisted\"] as const;\nconst FIELD_TYPES = [\n \"text\",\n \"textarea\",\n \"select\",\n \"cron\",\n \"timezone\",\n \"repo-picker\",\n] as const;\nconst GIT_PROVIDERS = [\"github\", \"gitlab\", \"bitbucket\"] as const;\nconst TRIGGER_KINDS = [\"cron\", \"event\"] as const;\nconst CONSTRAINT_FORMATS = [\"safeExpressionLiteral\"] as const;\n\n/** Setup context only, so this can never become a channel for runtime instructions. */\nconst MAX_MESSAGE_LENGTH = 2000;\n\nexport interface SetupValidationResult {\n valid: boolean;\n errors: string[];\n}\n\ntype Rec = Record<string, unknown>;\n\nfunction isRecord(value: unknown): value is Rec {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction isOneOf<T extends readonly string[]>(\n value: unknown,\n allowed: T,\n): value is T[number] {\n return (\n typeof value === \"string\" && (allowed as readonly string[]).includes(value)\n );\n}\n\nfunction isInteger(value: unknown, minimum: number): boolean {\n return (\n typeof value === \"number\" && Number.isInteger(value) && value >= minimum\n );\n}\n\nclass SetupChecker {\n readonly errors: string[] = [];\n\n fail(path: string, reason: string): false {\n this.errors.push(`${path}: ${reason}`);\n return false;\n }\n\n /** Literal user-visible copy. Carries no markup. */\n copy(value: unknown, path: string): boolean {\n if (typeof value !== \"string\" || value.length === 0) {\n return this.fail(path, \"must be a non-empty string\");\n }\n if (MARKUP_PATTERN.test(value)) {\n return this.fail(path, \"must not contain markup\");\n }\n return true;\n }\n\n placeholders(value: string, path: string): boolean {\n if (UNKNOWN_PLACEHOLDER_PATTERN.test(value)) {\n return this.fail(path, \"uses an unknown placeholder namespace\");\n }\n return true;\n }\n\n /** Copy that may embed `{{namespace.key}}` placeholders. */\n templateCopy(value: unknown, path: string): boolean {\n return this.copy(value, path) && this.placeholders(value as string, path);\n }\n\n /**\n * A request-body string that may embed placeholders. Never rendered, so\n * expression syntax such as a JMESPath filter is allowed through.\n */\n templateValue(value: unknown, path: string): boolean {\n if (typeof value !== \"string\" || value.length === 0) {\n return this.fail(path, \"must be a non-empty string\");\n }\n return this.placeholders(value, path);\n }\n\n absent(container: Rec, key: string, path: string, reason: string): boolean {\n if (key in container) return this.fail(`${path}.${key}`, reason);\n return true;\n }\n}\n\n/**\n * A relative path that stays inside the archive it names.\n *\n * The character class alone is not enough: `.` and `..` are made of allowed\n * characters, so a segment check is what actually keeps a packed file from\n * climbing out of the directory it is extracted into.\n */\nfunction isRelativePath(value: unknown, pattern: RegExp): value is string {\n return (\n typeof value === \"string\" &&\n pattern.test(value) &&\n !value.split(\"/\").some((segment) => segment === \".\" || segment === \"..\")\n );\n}\n\n/**\n * A command whose every word stays inside the archive it is run in.\n *\n * The character class is not what keeps it there: `/` and `.` are allowed\n * characters, so `/bin/sh setup.sh` and `python3 ../../etc/x.py` are made of\n * them and each names something outside the extracted directory. The segment\n * rule packed paths are held to is what refuses those, and requiring a word at\n * all is what refuses an entrypoint of nothing but spaces.\n */\nfunction isPlainCommand(value: unknown): value is string {\n if (typeof value !== \"string\" || !BUNDLE_COMMAND_PATTERN.test(value)) {\n return false;\n }\n const words = value.split(\" \").filter((word) => word.length > 0);\n return (\n words.length > 0 &&\n words.every(\n (word) =>\n !word.startsWith(\"/\") &&\n !word.split(\"/\").some((segment) => segment === \"..\"),\n )\n );\n}\n\nfunction checkRequires(check: SetupChecker, requires: unknown): void {\n if (!isRecord(requires)) {\n check.fail(\"requires\", \"must be an object\");\n return;\n }\n\n const { integrations, features } = requires;\n // Empty is meaningful rather than malformed: an automation that needs no\n // credential connects to nothing, and the key stays required so that saying\n // so is a deliberate statement instead of an omission.\n if (!isRecord(integrations)) {\n check.fail(\"requires.integrations\", \"must be an object\");\n } else {\n Object.entries(integrations).forEach(([id, requirement]) => {\n const path = `requires.integrations.${id}`;\n if (!isRecord(requirement)) {\n check.fail(path, \"must be an object\");\n return;\n }\n check.copy(requirement.message, `${path}.message`);\n if (\"required\" in requirement && requirement.required !== false) {\n check.fail(`${path}.required`, \"may only be false\");\n }\n const allowed = [\"message\", \"required\"];\n Object.keys(requirement)\n .filter((key) => !allowed.includes(key))\n .forEach((key) => check.fail(`${path}.${key}`, \"is not allowed\"));\n });\n }\n\n if (features !== undefined) {\n if (!Array.isArray(features) || features.length === 0) {\n check.fail(\"requires.features\", \"must be a non-empty array\");\n } else {\n features.forEach((feature, index) => {\n if (typeof feature !== \"string\" || feature.length === 0) {\n check.fail(\n `requires.features[${index}]`,\n \"must be a non-empty string\",\n );\n }\n });\n }\n }\n}\n\nfunction checkConstraints(\n check: SetupChecker,\n constraints: unknown,\n path: string,\n): void {\n if (!isRecord(constraints) || Object.keys(constraints).length === 0) {\n check.fail(path, \"must be a non-empty object\");\n return;\n }\n\n const { minLength, maxLength, format } = constraints;\n if (minLength !== undefined && !isInteger(minLength, 0)) {\n check.fail(`${path}.minLength`, \"must be a non-negative integer\");\n }\n if (maxLength !== undefined && !isInteger(maxLength, 1)) {\n check.fail(`${path}.maxLength`, \"must be a positive integer\");\n }\n if (format !== undefined && !isOneOf(format, CONSTRAINT_FORMATS)) {\n check.fail(`${path}.format`, \"is not a supported format\");\n }\n}\n\nfunction checkField(check: SetupChecker, field: unknown, path: string): void {\n if (!isRecord(field)) {\n check.fail(path, \"must be an object\");\n return;\n }\n\n const { type, label, help, placeholder, required, provider, options } = field;\n\n if (!isOneOf(type, FIELD_TYPES)) {\n check.fail(`${path}.type`, \"is not a supported field type\");\n }\n check.copy(label, `${path}.label`);\n check.copy(help, `${path}.help`);\n if (placeholder !== undefined) check.copy(placeholder, `${path}.placeholder`);\n if (field.default !== undefined && typeof field.default !== \"string\") {\n check.fail(`${path}.default`, \"must be a string\");\n }\n if (typeof required !== \"boolean\") {\n check.fail(`${path}.required`, \"must be a boolean\");\n }\n if (provider !== undefined && !isOneOf(provider, GIT_PROVIDERS)) {\n check.fail(`${path}.provider`, \"is not a supported provider\");\n }\n if (type === \"repo-picker\" && provider === undefined) {\n check.fail(`${path}.provider`, \"is required for a repository field\");\n }\n // The host branches on this key to decide whether a field's value is a list,\n // so a field declaring it anywhere else would be seeded with a list and\n // rendered as a string.\n if (\n field.multiple !== undefined &&\n (field.multiple !== true || type !== \"repo-picker\")\n ) {\n check.fail(\n `${path}.multiple`,\n \"may only be true, and only on a repository field\",\n );\n }\n\n if (options !== undefined) {\n if (type !== \"select\") {\n check.fail(`${path}.options`, \"is only allowed on a select field\");\n } else if (!Array.isArray(options) || options.length === 0) {\n check.fail(`${path}.options`, \"must be a non-empty array\");\n } else {\n options.forEach((option, index) => {\n const optionPath = `${path}.options[${index}]`;\n if (!isRecord(option)) {\n check.fail(optionPath, \"must be an object\");\n return;\n }\n if (typeof option.value !== \"string\" || option.value.length === 0) {\n check.fail(`${optionPath}.value`, \"must be a non-empty string\");\n }\n check.copy(option.label, `${optionPath}.label`);\n });\n }\n }\n\n if (field.constraints !== undefined) {\n checkConstraints(check, field.constraints, `${path}.constraints`);\n }\n}\n\n/** Returns the declared field names, so the caller can check them for collisions. */\nfunction checkFields(\n check: SetupChecker,\n fields: unknown,\n path: string,\n): string[] {\n if (!isRecord(fields) || Object.keys(fields).length === 0) {\n check.fail(path, \"must be a non-empty object\");\n return [];\n }\n\n return Object.entries(fields).map(([name, field]) => {\n if (!FIELD_NAME_PATTERN.test(name)) {\n check.fail(`${path}.${name}`, \"is not a valid field name\");\n }\n checkField(check, field, `${path}.${name}`);\n return name;\n });\n}\n\n/** Returns the trigger kinds declared, in order. */\nfunction checkForm(check: SetupChecker, form: unknown): string[] {\n if (!isRecord(form)) {\n check.fail(\"setup.form\", \"must be an object\");\n return [];\n }\n\n if (form.note !== undefined) check.copy(form.note, \"setup.form.note\");\n\n const names = checkFields(check, form.args, \"setup.form.args\");\n const kinds: string[] = [];\n\n if (form.triggers !== undefined) {\n if (!isRecord(form.triggers) || Object.keys(form.triggers).length === 0) {\n check.fail(\"setup.form.triggers\", \"must be a non-empty object\");\n } else {\n Object.entries(form.triggers).forEach(([kind, fields]) => {\n if (!isOneOf(kind, TRIGGER_KINDS)) {\n check.fail(`setup.form.triggers.${kind}`, \"is not a trigger kind\");\n return;\n }\n kinds.push(kind);\n names.push(\n ...checkFields(check, fields, `setup.form.triggers.${kind}`),\n );\n });\n }\n }\n\n // The host merges both halves into one value map, so a repeated name would\n // silently shadow a field and misaddress every error reported against it.\n const duplicates = names.filter(\n (name, index) => names.indexOf(name) !== index,\n );\n Array.from(new Set(duplicates)).forEach((name) =>\n check.fail(`setup.form.${name}`, \"is declared more than once\"),\n );\n\n return kinds;\n}\n\nfunction hasRepoPicker(form: unknown): boolean {\n if (!isRecord(form)) return false;\n const groups = [\n form.args,\n ...Object.values(isRecord(form.triggers) ? form.triggers : {}),\n ];\n return groups.some(\n (group) =>\n isRecord(group) &&\n Object.values(group).some(\n (field) => isRecord(field) && field.type === \"repo-picker\",\n ),\n );\n}\n\nfunction checkMessage(check: SetupChecker, message: unknown): void {\n if (check.templateCopy(message, \"setup.message\")) {\n if ((message as string).length > MAX_MESSAGE_LENGTH) {\n check.fail(\n \"setup.message\",\n `must be at most ${MAX_MESSAGE_LENGTH} characters`,\n );\n }\n }\n}\n\n/**\n * The script tarball a direct entry may ship.\n *\n * The strings here are commands and paths this host acts on, so they are held\n * to a closed character set rather than the placeholder rules copy uses: an\n * entrypoint with a shell metacharacter, or a packed path that escapes the\n * archive, is refused here rather than by the service.\n */\nfunction checkBundle(check: SetupChecker, bundle: unknown): void {\n if (!isRecord(bundle)) {\n check.fail(\"setup.bundle\", \"must be an object\");\n return;\n }\n\n if (\n typeof bundle.version !== \"string\" ||\n !TEMPLATE_VERSION_PATTERN.test(bundle.version)\n ) {\n check.fail(\"setup.bundle.version\", \"must be a semantic version\");\n }\n if (!isPlainCommand(bundle.entrypoint)) {\n check.fail(\n \"setup.bundle.entrypoint\",\n \"must be a plain command that stays inside the archive\",\n );\n }\n if (\n bundle.setupScript !== undefined &&\n !isRelativePath(bundle.setupScript, BUNDLE_PATH_PATTERN)\n ) {\n check.fail(\"setup.bundle.setupScript\", \"must be a relative path\");\n }\n if (bundle.timeout !== undefined && !isInteger(bundle.timeout, 1)) {\n check.fail(\"setup.bundle.timeout\", \"must be a positive integer\");\n }\n\n if (!isRecord(bundle.files) || Object.keys(bundle.files).length === 0) {\n check.fail(\"setup.bundle.files\", \"must be a non-empty object\");\n } else {\n Object.entries(bundle.files).forEach(([packedPath, source]) => {\n if (!isRelativePath(packedPath, BUNDLE_PATH_PATTERN)) {\n check.fail(`setup.bundle.files.${packedPath}`, \"is not a packed path\");\n }\n // The rendered config is packed under this name too, and a tar carrying\n // the name twice leaves which one the script reads to whichever\n // extractor unpacks it.\n if (packedPath === BUNDLE_CONFIG_FILENAME) {\n check.fail(\n `setup.bundle.files.${packedPath}`,\n \"is the name the rendered config is packed under\",\n );\n }\n if (!isRelativePath(source, BUNDLE_SOURCE_PATTERN)) {\n check.fail(\n `setup.bundle.files.${packedPath}`,\n \"must name a file under skills/ or automations/\",\n );\n }\n });\n\n // A setup script the archive does not carry is a create request the\n // service accepts and the first run fails on, and it is also the only\n // thing packed executable - naming an unpacked file makes that rule\n // unreachable.\n if (\n typeof bundle.setupScript === \"string\" &&\n !(bundle.setupScript in bundle.files)\n ) {\n check.fail(\"setup.bundle.setupScript\", \"must name a packed file\");\n }\n }\n\n if (!isRecord(bundle.config) || Object.keys(bundle.config).length === 0) {\n check.fail(\"setup.bundle.config\", \"must be a non-empty object\");\n } else {\n checkBundleConfig(check, bundle.config, \"setup.bundle.config\");\n }\n}\n\n/** Every string leaf of the config is a payload value: placeholders, no markup rule. */\nfunction checkBundleConfig(\n check: SetupChecker,\n node: unknown,\n path: string,\n): void {\n if (typeof node === \"string\") {\n check.templateValue(node, path);\n return;\n }\n if (Array.isArray(node)) {\n node.forEach((item, index) =>\n checkBundleConfig(check, item, `${path}[${index}]`),\n );\n return;\n }\n if (isRecord(node)) {\n Object.entries(node).forEach(([key, value]) =>\n checkBundleConfig(check, value, `${path}.${key}`),\n );\n return;\n }\n if (node !== null && typeof node !== \"number\" && typeof node !== \"boolean\") {\n check.fail(\n path,\n \"must be a string, number, boolean, null, array or object\",\n );\n }\n}\n\nfunction checkMode(check: SetupChecker, setup: Rec, kinds: string[]): void {\n if (!isOneOf(setup.mode, SETUP_MODES)) {\n check.fail(\"setup.mode\", \"is not a supported mode\");\n return;\n }\n\n if (setup.mode === \"direct\") {\n // A direct entry produces one of two things: a prompt, or a script bundle\n // the host packs and uploads. Both would be ambiguous, neither is nothing\n // to create.\n const hasPrompt = setup.prompt !== undefined;\n const hasBundle = setup.bundle !== undefined;\n if (hasPrompt === hasBundle) {\n check.fail(\n \"setup\",\n \"must declare exactly one of prompt or bundle for direct setup\",\n );\n } else if (hasBundle) {\n checkBundle(check, setup.bundle);\n } else {\n check.templateValue(setup.prompt, \"setup.prompt\");\n }\n // A direct entry may carry a fallback-conversation seed for deployments\n // that cannot run the direct path, held to the same rules as an assisted\n // message.\n if (setup.message !== undefined) checkMessage(check, setup.message);\n\n // The derivation reads a single trigger kind, and an event trigger takes\n // its source from the repository field's provider.\n if (kinds.length !== 1) {\n check.fail(\n \"setup.form.triggers\",\n \"must declare exactly one trigger kind\",\n );\n }\n if (kinds.includes(\"event\") && !hasRepoPicker(setup.form)) {\n check.fail(\n \"setup.form\",\n \"must declare a repository field for an event trigger\",\n );\n }\n if (setup.filter !== undefined) {\n if (!kinds.includes(\"event\")) {\n check.fail(\"setup.filter\", \"is only allowed for an event trigger\");\n } else {\n check.templateValue(setup.filter, \"setup.filter\");\n }\n }\n return;\n }\n\n checkMessage(check, setup.message);\n check.absent(setup, \"prompt\", \"setup\", \"is only allowed for direct setup\");\n check.absent(setup, \"bundle\", \"setup\", \"is only allowed for direct setup\");\n check.absent(setup, \"filter\", \"setup\", \"is only allowed for direct setup\");\n}\n\n/** Whether a catalog entry ships a setup experience at all. It is optional. */\nexport function hasSetupBlock(candidate: unknown): boolean {\n return isRecord(candidate) && candidate.setup !== undefined;\n}\n\n/**\n * Decide whether this host will act on a catalog manifest.\n *\n * The version is checked first and fails closed: a format this host does not\n * recognise is refused rather than interpreted with today's rules.\n */\nexport function validateSetupEntry(candidate: unknown): SetupValidationResult {\n const check = new SetupChecker();\n\n if (!isRecord(candidate)) {\n return { valid: false, errors: [\"manifest: must be an object\"] };\n }\n\n const { setup } = candidate;\n if (!isRecord(setup)) {\n return { valid: false, errors: [\"setup: must be an object\"] };\n }\n if (setup.version !== SETUP_VERSION) {\n return {\n valid: false,\n errors: [`setup.version: must be \"${SETUP_VERSION}\"`],\n };\n }\n\n if (\n typeof candidate.id !== \"string\" ||\n !ENTRY_ID_PATTERN.test(candidate.id)\n ) {\n check.fail(\"id\", \"must be a lowercase slug\");\n }\n check.copy(candidate.name, \"name\");\n check.copy(candidate.description, \"description\");\n if (\n candidate.version !== undefined &&\n (typeof candidate.version !== \"string\" ||\n !TEMPLATE_VERSION_PATTERN.test(candidate.version))\n ) {\n check.fail(\"version\", \"must be a semantic version\");\n }\n if (\n candidate.skill !== undefined &&\n (typeof candidate.skill !== \"string\" ||\n !ENTRY_ID_PATTERN.test(candidate.skill))\n ) {\n check.fail(\"skill\", \"must be a lowercase slug\");\n }\n\n checkRequires(check, candidate.requires);\n const kinds = checkForm(check, setup.form);\n checkMode(check, setup, kinds);\n\n return { valid: check.errors.length === 0, errors: check.errors };\n}\n"],"mappings":";;AAwBA,IAAM,IAAmB,4BACnB,IAAqB,uBAErB,IAAiB,eASjB,IACJ,yLAII,IAAyB,uBACzB,IAAsB,yCACtB,IACJ,+DAEI,IAAkC,OACtC,eAAe,EAA6B,KAAK,GAAG,EAAE,0BACxD,GAEM,IAAc,CAAC,UAAU,UAAU,GACnC,IAAc;CAClB;CACA;CACA;CACA;CACA;CACA;AACF,GACM,IAAgB;CAAC;CAAU;CAAU;AAAW,GAChD,IAAgB,CAAC,QAAQ,OAAO,GAChC,IAAqB,CAAC,uBAAuB,GAG7C,IAAqB;AAS3B,SAAS,EAAS,GAA8B;CAC9C,OAAO,OAAO,KAAU,cAAY,KAAkB,CAAC,MAAM,QAAQ,CAAK;AAC5E;AAEA,SAAS,EACP,GACA,GACoB;CACpB,OACE,OAAO,KAAU,YAAa,EAA8B,SAAS,CAAK;AAE9E;AAEA,SAA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AM,KAAK,EAAU,aAAa,aAAa,GAE7C,EAAU,YAAY,KAAA,MACrB,OAAO,EAAU,WAAY,YAC5B,CAAC,EAAyB,KAAK,EAAU,OAAO,MAElD,EAAM,KAAK,WAAW,4BAA4B,GAGlD,EAAU,UAAU,KAAA,MACnB,OAAO,EAAU,SAAU,YAC1B,CAAC,EAAiB,KAAK,EAAU,KAAK,MAExC,EAAM,KAAK,SAAS,0BAA0B,GAGhD,EAAc,GAAO,EAAU,QAAQ,GAEvC,EAAU,GAAO,GADH,EAAU,GAAO,EAAM,IACb,CAAK,GAEtB;EAAE,OAAO,EAAM,OAAO,WAAW;EAAG,QAAQ,EAAM;CAAO,KAjCvD;EACL,OAAO;EACP,QAAQ,CAAC,gCAA2C;CACtD,IANO;EAAE,OAAO;EAAO,QAAQ,CAAC,0BAA0B;CAAE;AAqChE"}
1
+ {"version":3,"file":"manifest-validation.js","names":[],"sources":["../../src/manifests/manifest-validation.ts"],"sourcesContent":["/**\n * Admission policy for extension-authored catalog manifests.\n *\n * A manifest is data authored in a different repository that instructs this host\n * to render copy and compose a request. The host therefore decides what a\n * manifest is *permitted* to do rather than trusting the file — validation here\n * is a trust boundary, not a convenience check, and it deliberately does not\n * defer to a schema shipped alongside the manifests it would be validating.\n *\n * Beyond mirroring the published schema, this adds the invariants the host's own\n * derivation depends on: a single trigger kind to read, a repository field for\n * an event trigger's source, and field names unique across the form. Without\n * them the derived request body would be silently wrong rather than rejected.\n *\n * A manifest that fails any check is rejected outright. It never renders a\n * partial UI, because everything downstream treats its content as instructions.\n */\n\nimport {\n BUNDLE_CONFIG_FILENAME,\n SETUP_PLACEHOLDER_NAMESPACES,\n SETUP_VERSION,\n} from \"./types\";\n\nconst ENTRY_ID_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;\nconst FIELD_NAME_PATTERN = /^[a-z][A-Za-z0-9]*$/;\n/** Copy must never be able to inject markup into the host. */\nconst MARKUP_PATTERN = /<[A-Za-z/!]/;\n/**\n * A template version, declared as `version` by a prompt entry and as\n * `setup.bundle.version` by a bundle one. Sent to the service as template\n * provenance, so it is checked at admission. Full semver, as the spec at\n * semver.org states it: a catalog entry published with a pre-release or build\n * suffix is still a version this host may forward, and refusing one would drop\n * the entry from the registry outright.\n */\nconst TEMPLATE_VERSION_PATTERN =\n /^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\\+[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*)?$/;\n// The characters a command of plain words and paths is made of. No shell\n// metacharacters, which the service rejects anyway and a bundle has no reason\n// to need; where those words may point is `isPlainCommand`'s to say.\nconst BUNDLE_COMMAND_PATTERN = /^[A-Za-z0-9 ._/-]+$/;\nconst BUNDLE_PATH_PATTERN = /^[A-Za-z0-9._-]+(\\/[A-Za-z0-9._-]+)*$/;\nconst BUNDLE_SOURCE_PATTERN =\n /^(skills|automations)\\/[A-Za-z0-9._-]+(\\/[A-Za-z0-9._-]+)*$/;\n/** Every `{{` must open a known namespace and close immediately. */\nconst UNKNOWN_PLACEHOLDER_PATTERN = new RegExp(\n `\\\\{\\\\{(?!(?:${SETUP_PLACEHOLDER_NAMESPACES.join(\"|\")})\\\\.[A-Za-z0-9_.]+\\\\}\\\\})`,\n);\n\nconst SETUP_MODES = [\"direct\", \"assisted\"] as const;\nconst FIELD_TYPES = [\n \"text\",\n \"textarea\",\n \"select\",\n \"number\",\n \"cron\",\n \"timezone\",\n \"repo-picker\",\n \"llm-profile\",\n \"event-source\",\n \"event-type\",\n \"plugin-sources\",\n \"tarball-upload\",\n] as const;\nconst GIT_PROVIDERS = [\"github\", \"gitlab\", \"bitbucket\"] as const;\nconst TRIGGER_KINDS = [\"cron\", \"event\"] as const;\nconst CONSTRAINT_FORMATS = [\"safeExpressionLiteral\"] as const;\n\n/** Setup context only, so this can never become a channel for runtime instructions. */\nconst MAX_MESSAGE_LENGTH = 2000;\n\nexport interface SetupValidationResult {\n valid: boolean;\n errors: string[];\n}\n\ntype Rec = Record<string, unknown>;\n\nfunction isRecord(value: unknown): value is Rec {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction isOneOf<T extends readonly string[]>(\n value: unknown,\n allowed: T,\n): value is T[number] {\n return (\n typeof value === \"string\" && (allowed as readonly string[]).includes(value)\n );\n}\n\nfunction isInteger(value: unknown, minimum: number): boolean {\n return (\n typeof value === \"number\" && Number.isInteger(value) && value >= minimum\n );\n}\n\nclass SetupChecker {\n readonly errors: string[] = [];\n\n fail(path: string, reason: string): false {\n this.errors.push(`${path}: ${reason}`);\n return false;\n }\n\n /** Literal user-visible copy. Carries no markup. */\n copy(value: unknown, path: string): boolean {\n if (typeof value !== \"string\" || value.length === 0) {\n return this.fail(path, \"must be a non-empty string\");\n }\n if (MARKUP_PATTERN.test(value)) {\n return this.fail(path, \"must not contain markup\");\n }\n return true;\n }\n\n placeholders(value: string, path: string): boolean {\n if (UNKNOWN_PLACEHOLDER_PATTERN.test(value)) {\n return this.fail(path, \"uses an unknown placeholder namespace\");\n }\n return true;\n }\n\n /** Copy that may embed `{{namespace.key}}` placeholders. */\n templateCopy(value: unknown, path: string): boolean {\n return this.copy(value, path) && this.placeholders(value as string, path);\n }\n\n /**\n * A request-body string that may embed placeholders. Never rendered, so\n * expression syntax such as a JMESPath filter is allowed through.\n */\n templateValue(value: unknown, path: string): boolean {\n if (typeof value !== \"string\" || value.length === 0) {\n return this.fail(path, \"must be a non-empty string\");\n }\n return this.placeholders(value, path);\n }\n\n absent(container: Rec, key: string, path: string, reason: string): boolean {\n if (key in container) return this.fail(`${path}.${key}`, reason);\n return true;\n }\n}\n\n/**\n * A relative path that stays inside the archive it names.\n *\n * The character class alone is not enough: `.` and `..` are made of allowed\n * characters, so a segment check is what actually keeps a packed file from\n * climbing out of the directory it is extracted into.\n */\nfunction isRelativePath(value: unknown, pattern: RegExp): value is string {\n return (\n typeof value === \"string\" &&\n pattern.test(value) &&\n !value.split(\"/\").some((segment) => segment === \".\" || segment === \"..\")\n );\n}\n\n/**\n * A command whose every word stays inside the archive it is run in.\n *\n * The character class is not what keeps it there: `/` and `.` are allowed\n * characters, so `/bin/sh setup.sh` and `python3 ../../etc/x.py` are made of\n * them and each names something outside the extracted directory. The segment\n * rule packed paths are held to is what refuses those, and requiring a word at\n * all is what refuses an entrypoint of nothing but spaces.\n */\nfunction isPlainCommand(value: unknown): value is string {\n if (typeof value !== \"string\" || !BUNDLE_COMMAND_PATTERN.test(value)) {\n return false;\n }\n const words = value.split(\" \").filter((word) => word.length > 0);\n return (\n words.length > 0 &&\n words.every(\n (word) =>\n !word.startsWith(\"/\") &&\n !word.split(\"/\").some((segment) => segment === \"..\"),\n )\n );\n}\n\nfunction checkRequires(check: SetupChecker, requires: unknown): void {\n if (!isRecord(requires)) {\n check.fail(\"requires\", \"must be an object\");\n return;\n }\n\n const { integrations, features } = requires;\n // Empty is meaningful rather than malformed: an automation that needs no\n // credential connects to nothing, and the key stays required so that saying\n // so is a deliberate statement instead of an omission.\n if (!isRecord(integrations)) {\n check.fail(\"requires.integrations\", \"must be an object\");\n } else {\n Object.entries(integrations).forEach(([id, requirement]) => {\n const path = `requires.integrations.${id}`;\n if (!isRecord(requirement)) {\n check.fail(path, \"must be an object\");\n return;\n }\n check.copy(requirement.message, `${path}.message`);\n if (\"required\" in requirement && requirement.required !== false) {\n check.fail(`${path}.required`, \"may only be false\");\n }\n const allowed = [\"message\", \"required\"];\n Object.keys(requirement)\n .filter((key) => !allowed.includes(key))\n .forEach((key) => check.fail(`${path}.${key}`, \"is not allowed\"));\n });\n }\n\n if (features !== undefined) {\n if (!Array.isArray(features) || features.length === 0) {\n check.fail(\"requires.features\", \"must be a non-empty array\");\n } else {\n features.forEach((feature, index) => {\n if (typeof feature !== \"string\" || feature.length === 0) {\n check.fail(\n `requires.features[${index}]`,\n \"must be a non-empty string\",\n );\n }\n });\n }\n }\n}\n\nfunction checkConstraints(\n check: SetupChecker,\n constraints: unknown,\n path: string,\n): void {\n if (!isRecord(constraints) || Object.keys(constraints).length === 0) {\n check.fail(path, \"must be a non-empty object\");\n return;\n }\n\n const { minLength, maxLength, min, max, format } = constraints;\n if (minLength !== undefined && !isInteger(minLength, 0)) {\n check.fail(`${path}.minLength`, \"must be a non-negative integer\");\n }\n if (maxLength !== undefined && !isInteger(maxLength, 1)) {\n check.fail(`${path}.maxLength`, \"must be a positive integer\");\n }\n if (min !== undefined && !isInteger(min, 0)) {\n check.fail(`${path}.min`, \"must be a non-negative integer\");\n }\n if (max !== undefined && !isInteger(max, 1)) {\n check.fail(`${path}.max`, \"must be a positive integer\");\n }\n if (format !== undefined && !isOneOf(format, CONSTRAINT_FORMATS)) {\n check.fail(`${path}.format`, \"is not a supported format\");\n }\n}\n\nfunction checkField(check: SetupChecker, field: unknown, path: string): void {\n if (!isRecord(field)) {\n check.fail(path, \"must be an object\");\n return;\n }\n\n const { type, label, help, placeholder, required, provider, options } = field;\n\n if (!isOneOf(type, FIELD_TYPES)) {\n check.fail(`${path}.type`, \"is not a supported field type\");\n }\n check.copy(label, `${path}.label`);\n check.copy(help, `${path}.help`);\n if (placeholder !== undefined) check.copy(placeholder, `${path}.placeholder`);\n if (\n field.default !== undefined &&\n typeof field.default !== \"string\" &&\n typeof field.default !== \"number\" &&\n typeof field.default !== \"boolean\" &&\n field.default !== null\n ) {\n check.fail(`${path}.default`, \"must be a string, number, boolean or null\");\n }\n if (typeof required !== \"boolean\") {\n check.fail(`${path}.required`, \"must be a boolean\");\n }\n if (provider !== undefined && !isOneOf(provider, GIT_PROVIDERS)) {\n check.fail(`${path}.provider`, \"is not a supported provider\");\n }\n if (type === \"repo-picker\" && provider === undefined) {\n check.fail(`${path}.provider`, \"is required for a repository field\");\n }\n // The host branches on this key to decide whether a field's value is a list,\n // so a field declaring it anywhere else would be seeded with a list and\n // rendered as a string.\n if (\n field.multiple !== undefined &&\n (field.multiple !== true || type !== \"repo-picker\")\n ) {\n check.fail(\n `${path}.multiple`,\n \"may only be true, and only on a repository field\",\n );\n }\n\n if (options !== undefined) {\n if (type !== \"select\") {\n check.fail(`${path}.options`, \"is only allowed on a select field\");\n } else if (!Array.isArray(options) || options.length === 0) {\n check.fail(`${path}.options`, \"must be a non-empty array\");\n } else {\n options.forEach((option, index) => {\n const optionPath = `${path}.options[${index}]`;\n if (!isRecord(option)) {\n check.fail(optionPath, \"must be an object\");\n return;\n }\n if (typeof option.value !== \"string\" || option.value.length === 0) {\n check.fail(`${optionPath}.value`, \"must be a non-empty string\");\n }\n check.copy(option.label, `${optionPath}.label`);\n });\n }\n }\n\n if (field.constraints !== undefined) {\n checkConstraints(check, field.constraints, `${path}.constraints`);\n }\n}\n\n/** Returns the declared field names, so the caller can check them for collisions. */\nfunction checkFields(\n check: SetupChecker,\n fields: unknown,\n path: string,\n): string[] {\n if (!isRecord(fields) || Object.keys(fields).length === 0) {\n check.fail(path, \"must be a non-empty object\");\n return [];\n }\n\n return Object.entries(fields).map(([name, field]) => {\n if (!FIELD_NAME_PATTERN.test(name)) {\n check.fail(`${path}.${name}`, \"is not a valid field name\");\n }\n checkField(check, field, `${path}.${name}`);\n return name;\n });\n}\n\n/** Returns the trigger kinds declared, in order. */\nfunction checkForm(\n check: SetupChecker,\n form: unknown,\n): { kinds: string[]; fieldNames: string[] } {\n if (!isRecord(form)) {\n check.fail(\"setup.form\", \"must be an object\");\n return { kinds: [], fieldNames: [] };\n }\n\n if (form.note !== undefined) check.copy(form.note, \"setup.form.note\");\n\n const names = checkFields(check, form.args, \"setup.form.args\");\n const kinds: string[] = [];\n\n if (form.triggers !== undefined) {\n if (!isRecord(form.triggers) || Object.keys(form.triggers).length === 0) {\n check.fail(\"setup.form.triggers\", \"must be a non-empty object\");\n } else {\n Object.entries(form.triggers).forEach(([kind, fields]) => {\n if (!isOneOf(kind, TRIGGER_KINDS)) {\n check.fail(`setup.form.triggers.${kind}`, \"is not a trigger kind\");\n return;\n }\n kinds.push(kind);\n names.push(\n ...checkFields(check, fields, `setup.form.triggers.${kind}`),\n );\n });\n }\n }\n\n // The host merges both halves into one value map, so a repeated name would\n // silently shadow a field and misaddress every error reported against it.\n const duplicates = names.filter(\n (name, index) => names.indexOf(name) !== index,\n );\n Array.from(new Set(duplicates)).forEach((name) =>\n check.fail(`setup.form.${name}`, \"is declared more than once\"),\n );\n\n return { kinds, fieldNames: names };\n}\n\nfunction checkActionFeatures(\n check: SetupChecker,\n features: unknown,\n path: string,\n): void {\n if (!Array.isArray(features) || features.length === 0) {\n check.fail(path, \"must be a non-empty array\");\n return;\n }\n features.forEach((feature, index) => {\n if (typeof feature !== \"string\" || feature.length === 0) {\n check.fail(`${path}[${index}]`, \"must be a non-empty string\");\n }\n });\n}\n\nfunction checkAction(\n check: SetupChecker,\n kind: string,\n action: unknown,\n commonFieldNames: string[],\n): void {\n const path = `setup.actions.${kind}`;\n if (!isRecord(action)) {\n check.fail(path, \"must be an object\");\n return;\n }\n\n check.copy(action.label, `${path}.label`);\n check.copy(action.help, `${path}.help`);\n checkActionFeatures(check, action.features, `${path}.features`);\n const actionFieldNames = checkFields(check, action.args, `${path}.args`);\n actionFieldNames\n .filter((name) => commonFieldNames.includes(name))\n .forEach((name) =>\n check.fail(`${path}.args.${name}`, \"is already declared by the form\"),\n );\n\n if (kind === \"prompt\") {\n check.templateValue(action.prompt, `${path}.prompt`);\n } else if (kind === \"plugin\") {\n check.templateValue(action.prompt, `${path}.prompt`);\n check.templateValue(action.plugins, `${path}.plugins`);\n } else if (kind === \"upload\") {\n check.templateValue(action.tarballPath, `${path}.tarballPath`);\n check.templateValue(action.entrypoint, `${path}.entrypoint`);\n if (action.setupScript !== undefined) {\n check.templateValue(action.setupScript, `${path}.setupScript`);\n }\n } else {\n check.fail(path, \"is not a supported action kind\");\n }\n\n const allowedByKind: Record<string, string[]> = {\n prompt: [\"label\", \"help\", \"features\", \"args\", \"prompt\"],\n plugin: [\"label\", \"help\", \"features\", \"args\", \"prompt\", \"plugins\"],\n upload: [\n \"label\",\n \"help\",\n \"features\",\n \"args\",\n \"tarballPath\",\n \"entrypoint\",\n \"setupScript\",\n ],\n };\n const allowed = allowedByKind[kind] ?? [];\n Object.keys(action)\n .filter((key) => !allowed.includes(key))\n .forEach((key) => check.fail(`${path}.${key}`, \"is not allowed\"));\n}\n\nfunction checkActions(\n check: SetupChecker,\n actions: unknown,\n commonFieldNames: string[],\n): void {\n if (!isRecord(actions) || Object.keys(actions).length === 0) {\n check.fail(\"setup.actions\", \"must be a non-empty object\");\n return;\n }\n Object.entries(actions).forEach(([kind, action]) =>\n checkAction(check, kind, action, commonFieldNames),\n );\n}\n\nfunction fieldsContainType(fields: unknown, type: string): boolean {\n if (!isRecord(fields)) return false;\n return Object.values(fields).some(\n (field) => isRecord(field) && field.type === type,\n );\n}\n\nfunction actionHasRepoPicker(action: unknown): boolean {\n return isRecord(action) && fieldsContainType(action.args, \"repo-picker\");\n}\n\n/**\n * Whether an event trigger's `source` is derivable for every selectable action.\n *\n * `buildTrigger` fills `source` from a field named `source` in the event\n * trigger, or failing that from the selected action's repo-picker provider. A\n * picker in another trigger group (such as `cron`) is never collected for the\n * event trigger, and a picker in only some actions is invisible when one of the\n * others is selected — so neither may satisfy this check, or the user can end\n * up with an empty `source` no form field can fix.\n */\nfunction setupSuppliesEventSource(setup: Rec): boolean {\n const form = isRecord(setup.form) ? setup.form : {};\n const triggers = isRecord(form.triggers) ? form.triggers : {};\n const eventFields = triggers.event;\n\n // An explicit event-source field fills `source` directly, regardless of which\n // action is selected.\n if (fieldsContainType(eventFields, \"event-source\")) return true;\n\n // A repo-picker in the event trigger is only collected when `event` is the\n // sole trigger kind; with a sibling trigger the derivation reads no trigger\n // fields for the picker. `form.args` is shared across every selection, so a\n // picker there is always available.\n const singleEventTrigger =\n \"event\" in triggers && Object.keys(triggers).length === 1;\n if (\n (singleEventTrigger && fieldsContainType(eventFields, \"repo-picker\")) ||\n fieldsContainType(form.args, \"repo-picker\")\n ) {\n return true;\n }\n\n // Without a shared or event-trigger picker, every selectable action must\n // carry its own repo-picker; otherwise selecting an action without one\n // derives `source: \"\"`.\n if (!isRecord(setup.actions) || Object.keys(setup.actions).length === 0) {\n return false;\n }\n return Object.values(setup.actions).every(actionHasRepoPicker);\n}\n\nfunction checkMessage(check: SetupChecker, message: unknown): void {\n if (check.templateCopy(message, \"setup.message\")) {\n if ((message as string).length > MAX_MESSAGE_LENGTH) {\n check.fail(\n \"setup.message\",\n `must be at most ${MAX_MESSAGE_LENGTH} characters`,\n );\n }\n }\n}\n\n/**\n * The script tarball a direct entry may ship.\n *\n * The strings here are commands and paths this host acts on, so they are held\n * to a closed character set rather than the placeholder rules copy uses: an\n * entrypoint with a shell metacharacter, or a packed path that escapes the\n * archive, is refused here rather than by the service.\n */\nfunction checkBundle(check: SetupChecker, bundle: unknown): void {\n if (!isRecord(bundle)) {\n check.fail(\"setup.bundle\", \"must be an object\");\n return;\n }\n\n if (\n typeof bundle.version !== \"string\" ||\n !TEMPLATE_VERSION_PATTERN.test(bundle.version)\n ) {\n check.fail(\"setup.bundle.version\", \"must be a semantic version\");\n }\n if (!isPlainCommand(bundle.entrypoint)) {\n check.fail(\n \"setup.bundle.entrypoint\",\n \"must be a plain command that stays inside the archive\",\n );\n }\n if (\n bundle.setupScript !== undefined &&\n !isRelativePath(bundle.setupScript, BUNDLE_PATH_PATTERN)\n ) {\n check.fail(\"setup.bundle.setupScript\", \"must be a relative path\");\n }\n if (bundle.timeout !== undefined && !isInteger(bundle.timeout, 1)) {\n check.fail(\"setup.bundle.timeout\", \"must be a positive integer\");\n }\n\n if (!isRecord(bundle.files) || Object.keys(bundle.files).length === 0) {\n check.fail(\"setup.bundle.files\", \"must be a non-empty object\");\n } else {\n Object.entries(bundle.files).forEach(([packedPath, source]) => {\n if (!isRelativePath(packedPath, BUNDLE_PATH_PATTERN)) {\n check.fail(`setup.bundle.files.${packedPath}`, \"is not a packed path\");\n }\n // The rendered config is packed under this name too, and a tar carrying\n // the name twice leaves which one the script reads to whichever\n // extractor unpacks it.\n if (packedPath === BUNDLE_CONFIG_FILENAME) {\n check.fail(\n `setup.bundle.files.${packedPath}`,\n \"is the name the rendered config is packed under\",\n );\n }\n if (!isRelativePath(source, BUNDLE_SOURCE_PATTERN)) {\n check.fail(\n `setup.bundle.files.${packedPath}`,\n \"must name a file under skills/ or automations/\",\n );\n }\n });\n\n // A setup script the archive does not carry is a create request the\n // service accepts and the first run fails on, and it is also the only\n // thing packed executable - naming an unpacked file makes that rule\n // unreachable.\n if (\n typeof bundle.setupScript === \"string\" &&\n !(bundle.setupScript in bundle.files)\n ) {\n check.fail(\"setup.bundle.setupScript\", \"must name a packed file\");\n }\n }\n\n if (!isRecord(bundle.config) || Object.keys(bundle.config).length === 0) {\n check.fail(\"setup.bundle.config\", \"must be a non-empty object\");\n } else {\n checkBundleConfig(check, bundle.config, \"setup.bundle.config\");\n }\n}\n\n/** Every string leaf of the config is a payload value: placeholders, no markup rule. */\nfunction checkBundleConfig(\n check: SetupChecker,\n node: unknown,\n path: string,\n): void {\n if (typeof node === \"string\") {\n check.templateValue(node, path);\n return;\n }\n if (Array.isArray(node)) {\n node.forEach((item, index) =>\n checkBundleConfig(check, item, `${path}[${index}]`),\n );\n return;\n }\n if (isRecord(node)) {\n Object.entries(node).forEach(([key, value]) =>\n checkBundleConfig(check, value, `${path}.${key}`),\n );\n return;\n }\n if (node !== null && typeof node !== \"number\" && typeof node !== \"boolean\") {\n check.fail(\n path,\n \"must be a string, number, boolean, null, array or object\",\n );\n }\n}\n\nfunction checkMode(\n check: SetupChecker,\n setup: Rec,\n kinds: string[],\n commonFieldNames: string[],\n): void {\n if (!isOneOf(setup.mode, SETUP_MODES)) {\n check.fail(\"setup.mode\", \"is not a supported mode\");\n return;\n }\n\n if (setup.mode === \"direct\") {\n // A direct entry produces one of three things: a prompt, a script bundle\n // the host packs and uploads, or a selectable set of action variants.\n // More than one would be ambiguous, and none is nothing to create.\n const hasPrompt = setup.prompt !== undefined;\n const hasBundle = setup.bundle !== undefined;\n const hasActions = setup.actions !== undefined;\n const variants = [hasPrompt, hasBundle, hasActions].filter(Boolean);\n if (variants.length !== 1) {\n check.fail(\n \"setup\",\n \"must declare exactly one of prompt, bundle or actions for direct setup\",\n );\n } else if (hasBundle) {\n checkBundle(check, setup.bundle);\n } else if (hasActions) {\n checkActions(check, setup.actions, commonFieldNames);\n } else {\n check.templateValue(setup.prompt, \"setup.prompt\");\n }\n // A direct entry may carry a fallback-conversation seed for deployments\n // that cannot run the direct path, held to the same rules as an assisted\n // message.\n if (setup.message !== undefined) checkMessage(check, setup.message);\n\n if (kinds.length === 0) {\n check.fail(\n \"setup.form.triggers\",\n \"must declare at least one trigger kind\",\n );\n }\n if (kinds.includes(\"event\") && !setupSuppliesEventSource(setup)) {\n check.fail(\n \"setup.form.triggers.event\",\n \"must declare an event source field or repository picker\",\n );\n }\n if (setup.filter !== undefined) {\n if (!kinds.includes(\"event\")) {\n check.fail(\"setup.filter\", \"is only allowed for an event trigger\");\n } else {\n check.templateValue(setup.filter, \"setup.filter\");\n }\n }\n return;\n }\n\n checkMessage(check, setup.message);\n check.absent(setup, \"prompt\", \"setup\", \"is only allowed for direct setup\");\n check.absent(setup, \"bundle\", \"setup\", \"is only allowed for direct setup\");\n check.absent(setup, \"actions\", \"setup\", \"is only allowed for direct setup\");\n check.absent(setup, \"filter\", \"setup\", \"is only allowed for direct setup\");\n}\n\n/** Whether a catalog entry ships a setup experience at all. It is optional. */\nexport function hasSetupBlock(candidate: unknown): boolean {\n return isRecord(candidate) && candidate.setup !== undefined;\n}\n\n/**\n * Decide whether this host will act on a catalog manifest.\n *\n * The version is checked first and fails closed: a format this host does not\n * recognise is refused rather than interpreted with today's rules.\n */\nexport function validateSetupEntry(candidate: unknown): SetupValidationResult {\n const check = new SetupChecker();\n\n if (!isRecord(candidate)) {\n return { valid: false, errors: [\"manifest: must be an object\"] };\n }\n\n const { setup } = candidate;\n if (!isRecord(setup)) {\n return { valid: false, errors: [\"setup: must be an object\"] };\n }\n if (setup.version !== SETUP_VERSION) {\n return {\n valid: false,\n errors: [`setup.version: must be \"${SETUP_VERSION}\"`],\n };\n }\n\n if (\n typeof candidate.id !== \"string\" ||\n !ENTRY_ID_PATTERN.test(candidate.id)\n ) {\n check.fail(\"id\", \"must be a lowercase slug\");\n }\n check.copy(candidate.name, \"name\");\n check.copy(candidate.description, \"description\");\n if (\n candidate.version !== undefined &&\n (typeof candidate.version !== \"string\" ||\n !TEMPLATE_VERSION_PATTERN.test(candidate.version))\n ) {\n check.fail(\"version\", \"must be a semantic version\");\n }\n if (\n candidate.skill !== undefined &&\n (typeof candidate.skill !== \"string\" ||\n !ENTRY_ID_PATTERN.test(candidate.skill))\n ) {\n check.fail(\"skill\", \"must be a lowercase slug\");\n }\n\n checkRequires(check, candidate.requires);\n const { kinds, fieldNames } = checkForm(check, setup.form);\n checkMode(check, setup, kinds, fieldNames);\n\n return { valid: check.errors.length === 0, errors: check.errors };\n}\n"],"mappings":";;AAwBA,IAAM,IAAmB,4BACnB,IAAqB,uBAErB,IAAiB,eASjB,IACJ,yLAII,IAAyB,uBACzB,IAAsB,yCACtB,IACJ,+DAEI,IAAkC,OACtC,eAAe,EAA6B,KAAK,GAAG,EAAE,0BACxD,GAEM,IAAc,CAAC,UAAU,UAAU,GACnC,IAAc;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GACM,IAAgB;CAAC;CAAU;CAAU;AAAW,GAChD,IAAgB,CAAC,QAAQ,OAAO,GAChC,IAAqB,CAAC,uBAAuB,GAG7C,IAAqB;AAS3B,SAAS,EAAS,GAA8B;CAC9C,OAAO,OAAO,KAAU,cAAY,KAAkB,CAAC,MAAM,QAAQ,CAAK;AAC5E;AAEA,SAAS,EACP,GACA,GACoB;CACpB,OACE,OAAO,KAAU,YAAa,EAA8B,SAAS,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EAAE,aAAU;CAClB,IAAI,CAAC,EAAS,CAAK,GACjB,OAAO;EAAE,OAAO;EAAO,QAAQ,CAAC,0BAA0B;CAAE;CAE9D,IAAI,EAAM,YAAA,OACR,OAAO;EACL,OAAO;EACP,QAAQ,CAAC,gCAA2C;CACtD;CA0BF,CAtBE,OAAO,EAAU,MAAO,YACxB,CAAC,EAAiB,KAAK,EAAU,EAAE,MAEnC,EAAM,KAAK,MAAM,0BAA0B,GAE7C,EAAM,KAAK,EAAU,MAAM,MAAM,GACjC,EAAM,KAAK,EAAU,aAAa,aAAa,GAE7C,EAAU,YAAY,KAAA,MACrB,OAAO,EAAU,WAAY,YAC5B,CAAC,EAAyB,KAAK,EAAU,OAAO,MAElD,EAAM,KAAK,WAAW,4BAA4B,GAGlD,EAAU,UAAU,KAAA,MACnB,OAAO,EAAU,SAAU,YAC1B,CAAC,EAAiB,KAAK,EAAU,KAAK,MAExC,EAAM,KAAK,SAAS,0BAA0B,GAGhD,EAAc,GAAO,EAAU,QAAQ;CACvC,IAAM,EAAE,UAAO,kBAAe,EAAU,GAAO,EAAM,IAAI;CAGzD,OAFA,EAAU,GAAO,GAAO,GAAO,CAAU,GAElC;EAAE,OAAO,EAAM,OAAO,WAAW;EAAG,QAAQ,EAAM;CAAO;AAClE"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","names":[],"sources":["../../src/manifests/types.ts"],"sourcesContent":["/**\n * Host-owned shape of an extension-authored setup experience.\n *\n * A catalog entry is declarative data published by `@openhands/extensions`. Its\n * optional `setup` block says what to ask a user for; everything derivable from\n * that — the request to send, the route, the review screen, the analytics — is\n * this host's to generate, so none of it appears here.\n *\n * The names mirror `@openhands/extensions/automations`' own declarations, so an\n * entry from the published package assigns without an adapter.\n */\n\nexport const SETUP_VERSION = \"1.0\";\n\nexport type SetupMode = \"direct\" | \"assisted\";\n\nexport type SetupFieldType =\n | \"text\"\n | \"textarea\"\n | \"select\"\n | \"cron\"\n | \"timezone\"\n | \"repo-picker\";\n\nexport type SetupGitProvider = \"github\" | \"gitlab\" | \"bitbucket\";\n\nexport type SetupTriggerKind = \"cron\" | \"event\";\n\n/** Placeholder namespaces a setup block may reference inside `{{...}}`. */\nexport const SETUP_PLACEHOLDER_NAMESPACES = [\"form\", \"automation\"] as const;\n\nexport interface SetupFieldOption {\n value: string;\n label: string;\n}\n\nexport interface SetupFieldConstraints {\n minLength?: number;\n maxLength?: number;\n /**\n * A host-implemented check named from a closed set. Entries supply no regex\n * of their own, so they cannot hand the host a pathological pattern.\n */\n format?: \"safeExpressionLiteral\";\n}\n\nexport interface SetupFormField {\n type: SetupFieldType;\n label: string;\n help: string;\n placeholder?: string;\n default?: string;\n required: boolean;\n provider?: SetupGitProvider;\n /**\n * repo-picker only. The field collects several repositories rather than one,\n * and its value is a list. A placeholder that is the whole value resolves to\n * that list, so a payload can state one and get an array.\n */\n multiple?: true;\n options?: SetupFieldOption[];\n constraints?: SetupFieldConstraints;\n}\n\n/** Keyed by field name, which is what `{{form.<name>}}` resolves against. */\nexport type SetupFormFields = Record<string, SetupFormField>;\n\nexport interface SetupForm {\n note?: string;\n /** Inputs that decide when the automation runs, keyed by trigger kind. */\n triggers?: Partial<Record<SetupTriggerKind, SetupFormFields>>;\n /** Every other input: the arguments to the automation itself. */\n args: SetupFormFields;\n}\n\n/** A config.json leaf: templated string, number, boolean, null, or a nesting. */\nexport type SetupBundleConfigValue =\n | string\n | number\n | boolean\n | null\n | SetupBundleConfigValue[]\n | { [key: string]: SetupBundleConfigValue };\n\n/**\n * The name the rendered configuration is packed under, which is therefore a\n * name a bundle's own files may not claim. Stated here rather than beside the\n * packing, so admission can refuse the collision without importing it.\n */\nexport const BUNDLE_CONFIG_FILENAME = \"config.json\";\n\n/**\n * The script tarball a direct entry may ship instead of a prompt, for an\n * automation that is deterministic machinery rather than judgement.\n *\n * `files` maps a path inside the archive to the repository path the extensions\n * package read it from; the contents themselves come from that package's\n * `getAutomationBundleFiles`, because this host has the package and not the\n * repository.\n */\nexport interface SetupBundle {\n /** Provenance recorded on the created automation, alongside the entry id. */\n version: string;\n /** The command the service runs inside the extracted tarball. */\n entrypoint: string;\n /** Script run once before the entrypoint. Absent when nothing to install. */\n setupScript?: string;\n /** Seconds a run may take, when the service default is not enough. */\n timeout?: number;\n files: Record<string, string>;\n /** Rendered from the form and packed as config.json. */\n config: Record<string, SetupBundleConfigValue>;\n}\n\nexport interface SetupBlock {\n version: typeof SETUP_VERSION;\n mode: SetupMode;\n form: SetupForm;\n /** direct only. What the automation is told to do. */\n prompt?: string;\n /** direct only, and the alternative to `prompt`. Exactly one is present. */\n bundle?: SetupBundle;\n /** direct only, event trigger only. Which delivered events belong to it. */\n filter?: string;\n /**\n * Setup context for the conversation that finishes setup. Required for\n * assisted mode. Optional for direct mode, where it seeds the fallback\n * conversation offered when the deployment cannot run the direct path.\n */\n message?: string;\n}\n\nexport interface SetupIntegrationRequirement {\n /** Why this entry needs the integration. */\n message: string;\n /** Defaults to true. `false` lets setup continue while it is unconnected. */\n required?: false;\n}\n\nexport interface SetupPrerequisites {\n /** Keyed by integration catalog id. */\n integrations: Record<string, SetupIntegrationRequirement>;\n /** Deployment capabilities this entry cannot run without. */\n features?: string[];\n}\n\n/**\n * The part of a catalog entry this host reads. An admitted entry always has a\n * `setup` block; entries without one are simply not setup entries.\n */\nexport interface SetupEntry {\n id: string;\n name: string;\n description: string;\n /**\n * Version of the template this entry publishes, sent with the create request\n * as provenance. A bundle declares its own at `setup.bundle.version`; a\n * prompt entry declares it here. Absent means the entry sends none, so the\n * service records no template for what it creates.\n */\n version?: string;\n requires: SetupPrerequisites;\n /** The skill that owns the launch command. Defaults to `id`. */\n skill?: string;\n setup: SetupBlock;\n}\n\nexport type SetupPayloadValue =\n | string\n | number\n | boolean\n | null\n | SetupPayloadValue[]\n | { [key: string]: SetupPayloadValue };\n\nexport interface SetupRequestBody {\n [key: string]: SetupPayloadValue;\n}\n\n/**\n * Form values as collected; the payload mapping shapes them.\n *\n * A field collecting several values holds a list. Everything else holds a\n * string, including fields whose value is a number to the service - the\n * payload mapping is where a value stops being what was typed.\n */\nexport type SetupFormValue = string | string[];\nexport type SetupFormValues = Record<string, SetupFormValue>;\n\n/** `GET /v1/capabilities` — what this deployment supports. */\nexport interface DeploymentCapabilities {\n ready: boolean;\n /** Absolute timeout ceiling enforced by this deployment's automation API. */\n maxAutomationTimeoutSeconds?: number;\n triggerKinds: string[];\n eventSources: string[];\n eventTypes: string[];\n triggers: {\n cron?: { minIntervalSeconds: number; timezones: string[] };\n event?: { filterLanguage: string; filterFunctions: string[] };\n };\n features: string[];\n}\n\n/** A single problem with a draft, addressed to the field that caused it. */\nexport interface DraftValidationError {\n /** Dotted path into the draft. Null when the problem spans the whole draft. */\n field: string | null;\n code: string;\n message: string;\n}\n\n/** `POST /v1/validate` — an invalid draft is still a 200. */\nexport interface ValidateDraftResponse {\n valid: boolean;\n errors: DraftValidationError[];\n sampleEventMatched?: boolean | null;\n}\n\n/**\n * Host-owned shape of the production Automation interface manifest, published\n * by `@openhands/extensions/automations` as `AUTOMATION_INTERFACE`.\n *\n * The catalog states what varies per automation; this states the domain-level\n * facts of the interface itself. As with setup entries, the published data is\n * validated at admission rather than trusted, and a package that predates the\n * manifest simply leaves the host on its own defaults.\n */\n\nexport const INTERFACE_VERSION = \"1.0\";\n\n/** The closed set of runtime-model properties a client may offer for setting. */\nexport type AutomationAttributeName =\n | \"name\"\n | \"prompt\"\n | \"model\"\n | \"timeout\"\n | \"schedule\";\n\nexport type InterfaceAttributeType =\n | \"text\"\n | \"textarea\"\n | \"number\"\n | \"llm-profile\"\n | \"schedule\";\n\n/** How one settable attribute of an existing Automation is offered. */\nexport interface InterfaceAttribute {\n type: InterfaceAttributeType;\n label: string;\n help?: string;\n required: boolean;\n /** Only a `number` attribute carries constraints. */\n constraints?: { min?: number; max?: number };\n}\n\nexport interface InterfaceRoutes {\n list: string;\n /** Carries the `:automationId` segment the host substitutes. */\n setup: string;\n /** Carries the `:automationId` segment the host substitutes. */\n detail: string;\n /** The templates sub-page. Static: there is no parameter to substitute. */\n templates?: string;\n}\n\n/**\n * Service-relative paths the host calls. The base path, methods, headers, and\n * auth remain the host's. `{id}` marks where the automation id is substituted.\n */\nexport interface InterfaceEndpoints {\n list: string;\n detail: string;\n dispatch: string;\n runs: string;\n tarball: string;\n health: string;\n capabilities: string;\n validate: string;\n createPrompt: string;\n createPlugin: string;\n /**\n * The raw create endpoint, which a bundle entry is created through, and\n * where its tarball is uploaded first. Optional: a manifest published before\n * bundles existed declares neither, and is still admitted.\n */\n createBundle?: string;\n uploads?: string;\n}\n\nexport type InterfaceEndpointName = keyof InterfaceEndpoints;\n\nexport interface InterfaceImportExport {\n fileKind: string;\n fileVersion: number;\n filenameSuffix: string;\n importDefaults: {\n /** Provider inferred for short owner/repo repository URLs on import. */\n repoProvider: SetupGitProvider;\n /** Event source of the placeholder trigger that keeps an import inert. */\n placeholderEventSource: string;\n };\n}\n\n/**\n * The sub-page surface: navigation, overview tiles, filters, sort, and run\n * insights for the list page, and a templates page. Every value below names\n * something this host implements from a closed set — a metric it computes, a\n * predicate it applies, a comparator it runs, an icon it ships — and the\n * manifest picks and captions it, never defines it. The host carries no\n * definitions of its own for this surface, so a manifest without it simply\n * leaves the sub-pages unrendered.\n */\n\nexport const INTERFACE_SUB_PAGE_IDS = [\"list\", \"templates\"] as const;\n\nexport type InterfaceSubPageId = (typeof INTERFACE_SUB_PAGE_IDS)[number];\n\n/** Icon names this host maps to artwork. A manifest cannot supply its own. */\nexport const INTERFACE_ICON_SLUGS = [\n \"layout-dashboard\",\n \"sparkles\",\n \"library\",\n \"bot\",\n \"circle-alert\",\n \"activity\",\n \"timer\",\n] as const;\n\nexport type InterfaceIconSlug = (typeof INTERFACE_ICON_SLUGS)[number];\n\nexport interface InterfaceSubPageNavItem {\n /** The `pages` entry this item navigates to; its route comes from `routes`. */\n page: InterfaceSubPageId;\n label: string;\n icon: InterfaceIconSlug;\n}\n\n/** Values this host computes over the loaded automations and their runs. */\nexport const OVERVIEW_METRICS = [\n \"automations\",\n \"needs-attention\",\n \"total-runs\",\n \"average-duration\",\n] as const;\n\nexport type OverviewMetric = (typeof OVERVIEW_METRICS)[number];\n\n/**\n * Placeholder names a tile's `detail`/`zeroDetail` copy may reference inside\n * `{{...}}`, per metric. Plain substitution, like setup copy.\n */\nexport const OVERVIEW_TILE_PLACEHOLDERS: Record<\n OverviewMetric,\n readonly string[]\n> = {\n automations: [\"active\"],\n \"needs-attention\": [],\n \"total-runs\": [],\n \"average-duration\": [],\n};\n\nexport interface InterfaceOverviewTile {\n metric: OverviewMetric;\n label: string;\n /** Caption under the value. */\n detail: string;\n /** Replaces `detail` while the metric's value is zero. */\n zeroDetail?: string;\n icon: InterfaceIconSlug;\n}\n\nexport interface InterfaceOverview {\n /** Names the tiles section for assistive technology. */\n label: string;\n tiles: InterfaceOverviewTile[];\n}\n\n/** Filter values name predicates this host implements, per filter id. */\nexport const DASHBOARD_FILTER_VALUES = {\n status: [\"all\", \"active\", \"failing\", \"disabled\"],\n trigger: [\"all\", \"schedule\", \"event\"],\n} as const;\n\nexport type DashboardFilterId = keyof typeof DASHBOARD_FILTER_VALUES;\n\nexport const DASHBOARD_FILTER_IDS = Object.keys(\n DASHBOARD_FILTER_VALUES,\n) as readonly DashboardFilterId[];\n\nexport type DashboardStatusValue =\n (typeof DASHBOARD_FILTER_VALUES.status)[number];\n\nexport type DashboardTriggerValue =\n (typeof DASHBOARD_FILTER_VALUES.trigger)[number];\n\nexport interface InterfaceStatusFilter {\n id: \"status\";\n /** The control's accessible name. */\n label: string;\n options: { value: DashboardStatusValue; label: string }[];\n}\n\nexport interface InterfaceTriggerFilter {\n id: \"trigger\";\n /** The control's accessible name. */\n label: string;\n options: { value: DashboardTriggerValue; label: string }[];\n}\n\nexport type InterfaceDashboardFilter =\n | InterfaceStatusFilter\n | InterfaceTriggerFilter;\n\n/** Sort values name comparators this host implements. */\nexport const DASHBOARD_SORT_VALUES = [\"last-run\", \"runs\", \"name\"] as const;\n\nexport type DashboardSortValue = (typeof DASHBOARD_SORT_VALUES)[number];\n\nexport interface InterfaceDashboardSort {\n /** The control's accessible name. */\n label: string;\n options: { value: DashboardSortValue; label: string }[];\n /** One of the declared option values. */\n default: DashboardSortValue;\n}\n\n/**\n * Copy for the per-automation run insights on cards and rows. The states,\n * precedence, sampling, and value formatting are this host's; the manifest\n * names them.\n */\nexport interface InterfaceListInsights {\n health: {\n healthy: string;\n failing: string;\n running: string;\n disabled: string;\n neverRun: string;\n checking: string;\n };\n lastRun: { label: string; never: string; justNow: string };\n stats: { runs: string; recentSuccess: string; averageDuration: string };\n}\n\n/**\n * The templates sub-page identity. Its body — the catalog cards and their\n * launch behavior — is this host's existing catalog surface.\n */\nexport interface InterfaceTemplatesPage {\n title: string;\n description: string;\n}\n\nexport interface InterfaceManifest {\n version: typeof INTERFACE_VERSION;\n routes: InterfaceRoutes;\n navigation: {\n sidebar: { label: string };\n commandMenu: { title: string; description: string; keywords: string };\n /** The ordered sub-page navigation of the interface. */\n subPages?: InterfaceSubPageNavItem[];\n };\n pages: {\n list: {\n title: string;\n subtitle: string;\n overview?: InterfaceOverview;\n /** The filter dropdowns of the list page, in render order. */\n filters?: InterfaceDashboardFilter[];\n sort?: InterfaceDashboardSort;\n insights?: InterfaceListInsights;\n };\n detail: { backLabel: string };\n edit: { title: string };\n templates?: InterfaceTemplatesPage;\n };\n docsUrl: string;\n /**\n * The input surface of an existing Automation, keyed by the runtime-model\n * property the host sends. Rendering it as an edit dialog is this host's\n * choice, not stated here.\n */\n attributes: Partial<Record<AutomationAttributeName, InterfaceAttribute>>;\n importExport: InterfaceImportExport;\n endpoints: InterfaceEndpoints;\n featuredAutomationIds: string[];\n responderIntegrationIds: string[];\n}\n"],"mappings":"6CA6BA,IAAa,EAA+B,CAAC,OAAQ,YAAY,EA4DpD,EAAyB,cAiOzB,EAAyB,CAAC,OAAQ,WAAW,EAK7C,EAAuB,CAClC,mBACA,WACA,UACA,MACA,eACA,WACA,OACF,EAYa,EAAmB,CAC9B,cACA,kBACA,aACA,kBACF,EAQa,EAGT,CACF,YAAa,CAAC,QAAQ,EACtB,kBAAmB,CAAC,EACpB,aAAc,CAAC,EACf,mBAAoB,CAAC,CACvB,EAmBa,EAA0B,CACrC,OAAQ,CAAC,MAAO,SAAU,UAAW,UAAU,EAC/C,QAAS,CAAC,MAAO,WAAY,OAAO,CACtC,EAIa,EAAuB,OAAO,KACzC,CACF,EA2Ba,EAAwB,CAAC,WAAY,OAAQ,MAAM"}
1
+ {"version":3,"file":"types.cjs","names":[],"sources":["../../src/manifests/types.ts"],"sourcesContent":["/**\n * Host-owned shape of an extension-authored setup experience.\n *\n * A catalog entry is declarative data published by `@openhands/extensions`. Its\n * optional `setup` block says what to ask a user for; everything derivable from\n * that — the request to send, the route, the review screen, the analytics — is\n * this host's to generate, so none of it appears here.\n *\n * The names mirror `@openhands/extensions/automations`' own declarations, so an\n * entry from the published package assigns without an adapter.\n */\n\nexport const SETUP_VERSION = \"1.0\";\n\nexport type SetupMode = \"direct\" | \"assisted\";\n\nexport type SetupFieldType =\n | \"text\"\n | \"textarea\"\n | \"select\"\n | \"number\"\n | \"cron\"\n | \"timezone\"\n | \"repo-picker\"\n | \"llm-profile\"\n | \"event-source\"\n | \"event-type\"\n | \"plugin-sources\"\n | \"tarball-upload\";\n\nexport type SetupGitProvider = \"github\" | \"gitlab\" | \"bitbucket\";\n\nexport type SetupTriggerKind = \"cron\" | \"event\";\n\n/** Placeholder namespaces a setup block may reference inside `{{...}}`. */\nexport const SETUP_PLACEHOLDER_NAMESPACES = [\"form\", \"automation\"] as const;\n\nexport interface SetupFieldOption {\n value: string;\n label: string;\n}\n\nexport interface SetupFieldConstraints {\n minLength?: number;\n maxLength?: number;\n min?: number;\n max?: number;\n /**\n * A host-implemented check named from a closed set. Entries supply no regex\n * of their own, so they cannot hand the host a pathological pattern.\n */\n format?: \"safeExpressionLiteral\";\n}\n\nexport interface SetupFormField {\n type: SetupFieldType;\n label: string;\n help: string;\n placeholder?: string;\n default?: string | number | boolean | null;\n required: boolean;\n provider?: SetupGitProvider;\n /**\n * repo-picker only. The field collects several repositories rather than one,\n * and its value is a list. A placeholder that is the whole value resolves to\n * that list, so a payload can state one and get an array.\n */\n multiple?: true;\n options?: SetupFieldOption[];\n constraints?: SetupFieldConstraints;\n}\n\n/** Keyed by field name, which is what `{{form.<name>}}` resolves against. */\nexport type SetupFormFields = Record<string, SetupFormField>;\n\nexport interface SetupForm {\n note?: string;\n /** Inputs that decide when the automation runs, keyed by trigger kind. Multiple keys are selectable variants. */\n triggers?: Partial<Record<SetupTriggerKind, SetupFormFields>>;\n /** Every other input: the arguments to the automation itself. */\n args: SetupFormFields;\n}\n\n/** A config.json leaf: templated string, number, boolean, null, or a nesting. */\nexport type SetupBundleConfigValue =\n | string\n | number\n | boolean\n | null\n | SetupBundleConfigValue[]\n | { [key: string]: SetupBundleConfigValue };\n\n/**\n * The name the rendered configuration is packed under, which is therefore a\n * name a bundle's own files may not claim. Stated here rather than beside the\n * packing, so admission can refuse the collision without importing it.\n */\nexport const BUNDLE_CONFIG_FILENAME = \"config.json\";\n\n/**\n * The script tarball a direct entry may ship instead of a prompt, for an\n * automation that is deterministic machinery rather than judgement.\n *\n * `files` maps a path inside the archive to the repository path the extensions\n * package read it from; the contents themselves come from that package's\n * `getAutomationBundleFiles`, because this host has the package and not the\n * repository.\n */\nexport interface SetupBundle {\n /** Provenance recorded on the created automation, alongside the entry id. */\n version: string;\n /** The command the service runs inside the extracted tarball. */\n entrypoint: string;\n /** Script run once before the entrypoint. Absent when nothing to install. */\n setupScript?: string;\n /** Seconds a run may take, when the service default is not enough. */\n timeout?: number;\n files: Record<string, string>;\n /** Rendered from the form and packed as config.json. */\n config: Record<string, SetupBundleConfigValue>;\n}\n\nexport type SetupActionKind = \"prompt\" | \"plugin\" | \"upload\";\n\nexport interface SetupPromptAction {\n label: string;\n help: string;\n features: string[];\n args: SetupFormFields;\n prompt: string;\n}\n\nexport interface SetupPluginAction {\n label: string;\n help: string;\n features: string[];\n args: SetupFormFields;\n prompt: string;\n plugins: string;\n}\n\nexport interface SetupUploadAction {\n label: string;\n help: string;\n features: string[];\n args: SetupFormFields;\n tarballPath: string;\n entrypoint: string;\n setupScript?: string;\n}\n\nexport interface SetupActions {\n prompt?: SetupPromptAction;\n plugin?: SetupPluginAction;\n upload?: SetupUploadAction;\n}\n\nexport type SetupAction =\n | SetupPromptAction\n | SetupPluginAction\n | SetupUploadAction;\n\nexport interface SetupBlock {\n version: typeof SETUP_VERSION;\n mode: SetupMode;\n form: SetupForm;\n /** direct only. What the automation is told to do. */\n prompt?: string;\n /** direct only, and the alternative to `prompt`. Exactly one is present. */\n bundle?: SetupBundle;\n /** direct only, and the alternative to `prompt` or `bundle`. */\n actions?: SetupActions;\n /** direct only, event trigger only. Which delivered events belong to it. */\n filter?: string;\n /**\n * Setup context for the conversation that finishes setup. Required for\n * assisted mode. Optional for direct mode, where it seeds the fallback\n * conversation offered when the deployment cannot run the direct path.\n */\n message?: string;\n}\n\nexport interface SetupIntegrationRequirement {\n /** Why this entry needs the integration. */\n message: string;\n /** Defaults to true. `false` lets setup continue while it is unconnected. */\n required?: false;\n}\n\nexport interface SetupPrerequisites {\n /** Keyed by integration catalog id. */\n integrations: Record<string, SetupIntegrationRequirement>;\n /** Deployment capabilities this entry cannot run without. */\n features?: string[];\n}\n\n/**\n * The part of a catalog entry this host reads. An admitted entry always has a\n * `setup` block; entries without one are simply not setup entries.\n */\nexport interface SetupEntry {\n id: string;\n name: string;\n description: string;\n /**\n * Version of the template this entry publishes, sent with the create request\n * as provenance. A bundle declares its own at `setup.bundle.version`; a\n * prompt entry declares it here. Absent means the entry sends none, so the\n * service records no template for what it creates.\n */\n version?: string;\n requires: SetupPrerequisites;\n /** The skill that owns the launch command. Defaults to `id`. */\n skill?: string;\n setup: SetupBlock;\n}\n\nexport type SetupPayloadValue =\n | string\n | number\n | boolean\n | null\n | SetupPayloadValue[]\n | { [key: string]: SetupPayloadValue };\n\nexport interface SetupRequestBody {\n [key: string]: SetupPayloadValue;\n}\n\n/**\n * Form values as collected; the payload mapping shapes them.\n *\n * A field collecting several values holds a list. Everything else holds a\n * string, including fields whose value is a number to the service - the\n * payload mapping is where a value stops being what was typed.\n */\nexport type SetupFormValue = string | number | boolean | null | string[] | File;\nexport type SetupFormValues = Record<string, SetupFormValue>;\n\n/** `GET /v1/capabilities` — what this deployment supports. */\nexport interface DeploymentCapabilities {\n ready: boolean;\n /** Absolute timeout ceiling enforced by this deployment's automation API. */\n maxAutomationTimeoutSeconds?: number;\n triggerKinds: string[];\n eventSources: string[];\n eventTypes: string[];\n triggers: {\n cron?: { minIntervalSeconds: number; timezones: string[] };\n event?: { filterLanguage: string; filterFunctions: string[] };\n };\n features: string[];\n}\n\n/** A single problem with a draft, addressed to the field that caused it. */\nexport interface DraftValidationError {\n /** Dotted path into the draft. Null when the problem spans the whole draft. */\n field: string | null;\n code: string;\n message: string;\n}\n\n/** `POST /v1/validate` — an invalid draft is still a 200. */\nexport interface ValidateDraftResponse {\n valid: boolean;\n errors: DraftValidationError[];\n sampleEventMatched?: boolean | null;\n}\n\n/**\n * Host-owned shape of the production Automation interface manifest, published\n * by `@openhands/extensions/automations` as `AUTOMATION_INTERFACE`.\n *\n * The catalog states what varies per automation; this states the domain-level\n * facts of the interface itself. As with setup entries, the published data is\n * validated at admission rather than trusted, and a package that predates the\n * manifest simply leaves the host on its own defaults.\n */\n\nexport const INTERFACE_VERSION = \"1.0\";\n\n/** The closed set of runtime-model properties a client may offer for setting. */\nexport type AutomationAttributeName =\n | \"name\"\n | \"prompt\"\n | \"model\"\n | \"timeout\"\n | \"schedule\";\n\nexport type InterfaceAttributeType =\n | \"text\"\n | \"textarea\"\n | \"number\"\n | \"llm-profile\"\n | \"schedule\";\n\n/** How one settable attribute of an existing Automation is offered. */\nexport interface InterfaceAttribute {\n type: InterfaceAttributeType;\n label: string;\n help?: string;\n required: boolean;\n /** Only a `number` attribute carries constraints. */\n constraints?: { min?: number; max?: number };\n}\n\nexport interface InterfaceRoutes {\n list: string;\n /** Carries the `:automationId` segment the host substitutes. */\n setup: string;\n /** Carries the `:automationId` segment the host substitutes. */\n detail: string;\n /** The templates sub-page. Static: there is no parameter to substitute. */\n templates?: string;\n}\n\n/**\n * Service-relative paths the host calls. The base path, methods, headers, and\n * auth remain the host's. `{id}` marks where the automation id is substituted.\n */\nexport interface InterfaceEndpoints {\n list: string;\n detail: string;\n dispatch: string;\n runs: string;\n tarball: string;\n health: string;\n capabilities: string;\n validate: string;\n createPrompt: string;\n createPlugin: string;\n /**\n * The raw create endpoint, which a bundle entry is created through, and\n * where its tarball is uploaded first. Optional: a manifest published before\n * bundles existed declares neither, and is still admitted.\n */\n createBundle?: string;\n uploads?: string;\n}\n\nexport type InterfaceEndpointName = keyof InterfaceEndpoints;\n\nexport interface InterfaceImportExport {\n fileKind: string;\n fileVersion: number;\n filenameSuffix: string;\n importDefaults: {\n /** Provider inferred for short owner/repo repository URLs on import. */\n repoProvider: SetupGitProvider;\n /** Event source of the placeholder trigger that keeps an import inert. */\n placeholderEventSource: string;\n };\n}\n\n/**\n * The sub-page surface: navigation, overview tiles, filters, sort, and run\n * insights for the list page, and a templates page. Every value below names\n * something this host implements from a closed set — a metric it computes, a\n * predicate it applies, a comparator it runs, an icon it ships — and the\n * manifest picks and captions it, never defines it. The host carries no\n * definitions of its own for this surface, so a manifest without it simply\n * leaves the sub-pages unrendered.\n */\n\nexport const INTERFACE_SUB_PAGE_IDS = [\"list\", \"templates\"] as const;\n\nexport type InterfaceSubPageId = (typeof INTERFACE_SUB_PAGE_IDS)[number];\n\n/** Icon names this host maps to artwork. A manifest cannot supply its own. */\nexport const INTERFACE_ICON_SLUGS = [\n \"layout-dashboard\",\n \"sparkles\",\n \"library\",\n \"bot\",\n \"circle-alert\",\n \"activity\",\n \"timer\",\n] as const;\n\nexport type InterfaceIconSlug = (typeof INTERFACE_ICON_SLUGS)[number];\n\nexport interface InterfaceSubPageNavItem {\n /** The `pages` entry this item navigates to; its route comes from `routes`. */\n page: InterfaceSubPageId;\n label: string;\n icon: InterfaceIconSlug;\n}\n\n/** Values this host computes over the loaded automations and their runs. */\nexport const OVERVIEW_METRICS = [\n \"automations\",\n \"needs-attention\",\n \"total-runs\",\n \"average-duration\",\n] as const;\n\nexport type OverviewMetric = (typeof OVERVIEW_METRICS)[number];\n\n/**\n * Placeholder names a tile's `detail`/`zeroDetail` copy may reference inside\n * `{{...}}`, per metric. Plain substitution, like setup copy.\n */\nexport const OVERVIEW_TILE_PLACEHOLDERS: Record<\n OverviewMetric,\n readonly string[]\n> = {\n automations: [\"active\"],\n \"needs-attention\": [],\n \"total-runs\": [],\n \"average-duration\": [],\n};\n\nexport interface InterfaceOverviewTile {\n metric: OverviewMetric;\n label: string;\n /** Caption under the value. */\n detail: string;\n /** Replaces `detail` while the metric's value is zero. */\n zeroDetail?: string;\n icon: InterfaceIconSlug;\n}\n\nexport interface InterfaceOverview {\n /** Names the tiles section for assistive technology. */\n label: string;\n tiles: InterfaceOverviewTile[];\n}\n\n/** Filter values name predicates this host implements, per filter id. */\nexport const DASHBOARD_FILTER_VALUES = {\n status: [\"all\", \"active\", \"failing\", \"disabled\"],\n trigger: [\"all\", \"schedule\", \"event\"],\n} as const;\n\nexport type DashboardFilterId = keyof typeof DASHBOARD_FILTER_VALUES;\n\nexport const DASHBOARD_FILTER_IDS = Object.keys(\n DASHBOARD_FILTER_VALUES,\n) as readonly DashboardFilterId[];\n\nexport type DashboardStatusValue =\n (typeof DASHBOARD_FILTER_VALUES.status)[number];\n\nexport type DashboardTriggerValue =\n (typeof DASHBOARD_FILTER_VALUES.trigger)[number];\n\nexport interface InterfaceStatusFilter {\n id: \"status\";\n /** The control's accessible name. */\n label: string;\n options: { value: DashboardStatusValue; label: string }[];\n}\n\nexport interface InterfaceTriggerFilter {\n id: \"trigger\";\n /** The control's accessible name. */\n label: string;\n options: { value: DashboardTriggerValue; label: string }[];\n}\n\nexport type InterfaceDashboardFilter =\n | InterfaceStatusFilter\n | InterfaceTriggerFilter;\n\n/** Sort values name comparators this host implements. */\nexport const DASHBOARD_SORT_VALUES = [\"last-run\", \"runs\", \"name\"] as const;\n\nexport type DashboardSortValue = (typeof DASHBOARD_SORT_VALUES)[number];\n\nexport interface InterfaceDashboardSort {\n /** The control's accessible name. */\n label: string;\n options: { value: DashboardSortValue; label: string }[];\n /** One of the declared option values. */\n default: DashboardSortValue;\n}\n\n/**\n * Copy for the per-automation run insights on cards and rows. The states,\n * precedence, sampling, and value formatting are this host's; the manifest\n * names them.\n */\nexport interface InterfaceListInsights {\n health: {\n healthy: string;\n failing: string;\n running: string;\n disabled: string;\n neverRun: string;\n checking: string;\n };\n lastRun: { label: string; never: string; justNow: string };\n stats: { runs: string; recentSuccess: string; averageDuration: string };\n}\n\n/**\n * The templates sub-page identity. Its body — the catalog cards and their\n * launch behavior — is this host's existing catalog surface.\n */\nexport interface InterfaceTemplatesPage {\n title: string;\n description: string;\n}\n\nexport interface InterfaceManifest {\n version: typeof INTERFACE_VERSION;\n routes: InterfaceRoutes;\n navigation: {\n sidebar: { label: string };\n commandMenu: { title: string; description: string; keywords: string };\n /** The ordered sub-page navigation of the interface. */\n subPages?: InterfaceSubPageNavItem[];\n };\n pages: {\n list: {\n title: string;\n subtitle: string;\n overview?: InterfaceOverview;\n /** The filter dropdowns of the list page, in render order. */\n filters?: InterfaceDashboardFilter[];\n sort?: InterfaceDashboardSort;\n insights?: InterfaceListInsights;\n };\n detail: { backLabel: string };\n edit: { title: string };\n templates?: InterfaceTemplatesPage;\n };\n docsUrl: string;\n /**\n * The input surface of an existing Automation, keyed by the runtime-model\n * property the host sends. Rendering it as an edit dialog is this host's\n * choice, not stated here.\n */\n attributes: Partial<Record<AutomationAttributeName, InterfaceAttribute>>;\n importExport: InterfaceImportExport;\n endpoints: InterfaceEndpoints;\n featuredAutomationIds: string[];\n responderIntegrationIds: string[];\n}\n"],"mappings":"6CAmCA,IAAa,EAA+B,CAAC,OAAQ,YAAY,EA8DpD,EAAyB,cA2QzB,EAAyB,CAAC,OAAQ,WAAW,EAK7C,EAAuB,CAClC,mBACA,WACA,UACA,MACA,eACA,WACA,OACF,EAYa,EAAmB,CAC9B,cACA,kBACA,aACA,kBACF,EAQa,EAGT,CACF,YAAa,CAAC,QAAQ,EACtB,kBAAmB,CAAC,EACpB,aAAc,CAAC,EACf,mBAAoB,CAAC,CACvB,EAmBa,EAA0B,CACrC,OAAQ,CAAC,MAAO,SAAU,UAAW,UAAU,EAC/C,QAAS,CAAC,MAAO,WAAY,OAAO,CACtC,EAIa,EAAuB,OAAO,KACzC,CACF,EA2Ba,EAAwB,CAAC,WAAY,OAAQ,MAAM"}
@@ -11,7 +11,7 @@
11
11
  */
12
12
  export declare const SETUP_VERSION = "1.0";
13
13
  export type SetupMode = "direct" | "assisted";
14
- export type SetupFieldType = "text" | "textarea" | "select" | "cron" | "timezone" | "repo-picker";
14
+ export type SetupFieldType = "text" | "textarea" | "select" | "number" | "cron" | "timezone" | "repo-picker" | "llm-profile" | "event-source" | "event-type" | "plugin-sources" | "tarball-upload";
15
15
  export type SetupGitProvider = "github" | "gitlab" | "bitbucket";
16
16
  export type SetupTriggerKind = "cron" | "event";
17
17
  /** Placeholder namespaces a setup block may reference inside `{{...}}`. */
@@ -23,6 +23,8 @@ export interface SetupFieldOption {
23
23
  export interface SetupFieldConstraints {
24
24
  minLength?: number;
25
25
  maxLength?: number;
26
+ min?: number;
27
+ max?: number;
26
28
  /**
27
29
  * A host-implemented check named from a closed set. Entries supply no regex
28
30
  * of their own, so they cannot hand the host a pathological pattern.
@@ -34,7 +36,7 @@ export interface SetupFormField {
34
36
  label: string;
35
37
  help: string;
36
38
  placeholder?: string;
37
- default?: string;
39
+ default?: string | number | boolean | null;
38
40
  required: boolean;
39
41
  provider?: SetupGitProvider;
40
42
  /**
@@ -50,7 +52,7 @@ export interface SetupFormField {
50
52
  export type SetupFormFields = Record<string, SetupFormField>;
51
53
  export interface SetupForm {
52
54
  note?: string;
53
- /** Inputs that decide when the automation runs, keyed by trigger kind. */
55
+ /** Inputs that decide when the automation runs, keyed by trigger kind. Multiple keys are selectable variants. */
54
56
  triggers?: Partial<Record<SetupTriggerKind, SetupFormFields>>;
55
57
  /** Every other input: the arguments to the automation itself. */
56
58
  args: SetupFormFields;
@@ -87,6 +89,37 @@ export interface SetupBundle {
87
89
  /** Rendered from the form and packed as config.json. */
88
90
  config: Record<string, SetupBundleConfigValue>;
89
91
  }
92
+ export type SetupActionKind = "prompt" | "plugin" | "upload";
93
+ export interface SetupPromptAction {
94
+ label: string;
95
+ help: string;
96
+ features: string[];
97
+ args: SetupFormFields;
98
+ prompt: string;
99
+ }
100
+ export interface SetupPluginAction {
101
+ label: string;
102
+ help: string;
103
+ features: string[];
104
+ args: SetupFormFields;
105
+ prompt: string;
106
+ plugins: string;
107
+ }
108
+ export interface SetupUploadAction {
109
+ label: string;
110
+ help: string;
111
+ features: string[];
112
+ args: SetupFormFields;
113
+ tarballPath: string;
114
+ entrypoint: string;
115
+ setupScript?: string;
116
+ }
117
+ export interface SetupActions {
118
+ prompt?: SetupPromptAction;
119
+ plugin?: SetupPluginAction;
120
+ upload?: SetupUploadAction;
121
+ }
122
+ export type SetupAction = SetupPromptAction | SetupPluginAction | SetupUploadAction;
90
123
  export interface SetupBlock {
91
124
  version: typeof SETUP_VERSION;
92
125
  mode: SetupMode;
@@ -95,6 +128,8 @@ export interface SetupBlock {
95
128
  prompt?: string;
96
129
  /** direct only, and the alternative to `prompt`. Exactly one is present. */
97
130
  bundle?: SetupBundle;
131
+ /** direct only, and the alternative to `prompt` or `bundle`. */
132
+ actions?: SetupActions;
98
133
  /** direct only, event trigger only. Which delivered events belong to it. */
99
134
  filter?: string;
100
135
  /**
@@ -149,7 +184,7 @@ export interface SetupRequestBody {
149
184
  * string, including fields whose value is a number to the service - the
150
185
  * payload mapping is where a value stops being what was typed.
151
186
  */
152
- export type SetupFormValue = string | string[];
187
+ export type SetupFormValue = string | number | boolean | null | string[] | File;
153
188
  export type SetupFormValues = Record<string, SetupFormValue>;
154
189
  /** `GET /v1/capabilities` — what this deployment supports. */
155
190
  export interface DeploymentCapabilities {