@blokkli/editor 2.0.0-alpha.31 → 2.0.0-alpha.33

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 (480) hide show
  1. package/dist/global/constants/index.d.ts +1 -0
  2. package/dist/global/constants/index.js +1 -0
  3. package/dist/global/types/blockOptions.d.ts +16 -0
  4. package/dist/global/types/features.d.ts +4 -0
  5. package/dist/module.d.mts +1 -24
  6. package/dist/module.json +1 -1
  7. package/dist/module.mjs +453 -10828
  8. package/dist/modules/agent/index.d.mts +64 -0
  9. package/dist/modules/agent/index.mjs +407 -0
  10. package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +55 -0
  11. package/dist/modules/agent/runtime/app/composables/agentProvider.js +875 -0
  12. package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentPrompt.d.ts +32 -0
  13. package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentPrompt.js +6 -0
  14. package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.d.ts +65 -0
  15. package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.js +6 -0
  16. package/dist/modules/agent/runtime/app/composables/index.d.ts +4 -0
  17. package/dist/modules/agent/runtime/app/composables/index.js +2 -0
  18. package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.d.vue.ts +12 -0
  19. package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.vue +62 -0
  20. package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.vue.d.ts +12 -0
  21. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.d.vue.ts +9 -0
  22. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue +38 -0
  23. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue.d.ts +9 -0
  24. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.d.vue.ts +14 -0
  25. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.vue +68 -0
  26. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.vue.d.ts +14 -0
  27. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.d.vue.ts +10 -0
  28. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.vue +72 -0
  29. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.vue.d.ts +10 -0
  30. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.d.vue.ts +13 -0
  31. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.vue +37 -0
  32. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.vue.d.ts +13 -0
  33. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.d.vue.ts +8 -0
  34. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.vue +17 -0
  35. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.vue.d.ts +8 -0
  36. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.d.vue.ts +11 -0
  37. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue +29 -0
  38. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue.d.ts +11 -0
  39. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.d.vue.ts +12 -0
  40. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.vue +30 -0
  41. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.vue.d.ts +12 -0
  42. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.d.vue.ts +3 -0
  43. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.vue +14 -0
  44. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.vue.d.ts +3 -0
  45. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.d.vue.ts +13 -0
  46. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.vue +46 -0
  47. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.vue.d.ts +13 -0
  48. package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.d.vue.ts +15 -0
  49. package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.vue +50 -0
  50. package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.vue.d.ts +15 -0
  51. package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.d.vue.ts +3 -0
  52. package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue +160 -0
  53. package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue.d.ts +3 -0
  54. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.d.vue.ts +12 -0
  55. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.vue +15 -0
  56. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.vue.d.ts +12 -0
  57. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.d.vue.ts +7 -0
  58. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue +67 -0
  59. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue.d.ts +7 -0
  60. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.d.vue.ts +23 -0
  61. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +109 -0
  62. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue.d.ts +23 -0
  63. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.d.vue.ts +45 -0
  64. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue +120 -0
  65. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue.d.ts +45 -0
  66. package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.d.vue.ts +15 -0
  67. package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.vue +47 -0
  68. package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.vue.d.ts +15 -0
  69. package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.d.vue.ts +14 -0
  70. package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.vue +55 -0
  71. package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.vue.d.ts +14 -0
  72. package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.d.vue.ts +25 -0
  73. package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue +36 -0
  74. package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue.d.ts +25 -0
  75. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/de.md +19 -0
  76. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/en.md +18 -0
  77. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.d.vue.ts +10 -0
  78. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue +44 -0
  79. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue.d.ts +10 -0
  80. package/dist/modules/agent/runtime/app/features/agent/Panel/index.d.vue.ts +58 -0
  81. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +274 -0
  82. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue.d.ts +58 -0
  83. package/dist/modules/agent/runtime/app/features/agent/index.d.vue.ts +3 -0
  84. package/dist/modules/agent/runtime/app/features/agent/index.vue +162 -0
  85. package/dist/modules/agent/runtime/app/features/agent/index.vue.d.ts +3 -0
  86. package/dist/modules/agent/runtime/app/features/agent/types.d.ts +58 -0
  87. package/dist/modules/agent/runtime/app/features/agent/types.js +0 -0
  88. package/dist/modules/agent/runtime/app/helpers/index.d.ts +55 -0
  89. package/dist/modules/agent/runtime/app/helpers/index.js +88 -0
  90. package/dist/modules/agent/runtime/app/helpers/pageStructure.d.ts +5 -0
  91. package/dist/modules/agent/runtime/app/helpers/pageStructure.js +106 -0
  92. package/dist/modules/agent/runtime/app/helpers/validation.d.ts +35 -0
  93. package/dist/modules/agent/runtime/app/helpers/validation.js +77 -0
  94. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.d.ts +2 -0
  95. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.js +69 -0
  96. package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +2 -0
  97. package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +83 -0
  98. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +2 -0
  99. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +62 -0
  100. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +2 -0
  101. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +289 -0
  102. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +2 -0
  103. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +76 -0
  104. package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +2 -0
  105. package/dist/modules/agent/runtime/app/tools/add_template/index.js +58 -0
  106. package/dist/modules/agent/runtime/app/tools/ask_question/Component.d.vue.ts +19 -0
  107. package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue +113 -0
  108. package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue.d.ts +19 -0
  109. package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +17 -0
  110. package/dist/modules/agent/runtime/app/tools/ask_question/index.js +54 -0
  111. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.d.vue.ts +29 -0
  112. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.vue +190 -0
  113. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.vue.d.ts +29 -0
  114. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.d.vue.ts +20 -0
  115. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.vue +90 -0
  116. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.vue.d.ts +20 -0
  117. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/index.d.ts +18 -0
  118. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/index.js +55 -0
  119. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +2 -0
  120. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +47 -0
  121. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +2 -0
  122. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +47 -0
  123. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +2 -0
  124. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +144 -0
  125. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +2 -0
  126. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +180 -0
  127. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +2 -0
  128. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +33 -0
  129. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +2 -0
  130. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +93 -0
  131. package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.d.ts +2 -0
  132. package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.js +104 -0
  133. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +2 -0
  134. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +108 -0
  135. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +2 -0
  136. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +192 -0
  137. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +2 -0
  138. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +102 -0
  139. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +2 -0
  140. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +113 -0
  141. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +2 -0
  142. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +275 -0
  143. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +2 -0
  144. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +63 -0
  145. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +2 -0
  146. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +180 -0
  147. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +2 -0
  148. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +46 -0
  149. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +2 -0
  150. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +54 -0
  151. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +2 -0
  152. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +69 -0
  153. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +2 -0
  154. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +95 -0
  155. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +2 -0
  156. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +80 -0
  157. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +2 -0
  158. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +85 -0
  159. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +128 -0
  160. package/dist/modules/agent/runtime/app/tools/schemas.js +242 -0
  161. package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +2 -0
  162. package/dist/modules/agent/runtime/app/tools/search_content/index.js +65 -0
  163. package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +14 -0
  164. package/dist/modules/agent/runtime/app/tools/search_media/index.js +60 -0
  165. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +2 -0
  166. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +75 -0
  167. package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +2 -0
  168. package/dist/modules/agent/runtime/app/tools/search_templates/index.js +51 -0
  169. package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +2 -0
  170. package/dist/modules/agent/runtime/app/tools/search_text/index.js +114 -0
  171. package/dist/modules/agent/runtime/app/tools/select_media/Component.d.vue.ts +29 -0
  172. package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +70 -0
  173. package/dist/modules/agent/runtime/app/tools/select_media/Component.vue.d.ts +29 -0
  174. package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +30 -0
  175. package/dist/modules/agent/runtime/app/tools/select_media/index.js +74 -0
  176. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +2 -0
  177. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +109 -0
  178. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +2 -0
  179. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +74 -0
  180. package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +2 -0
  181. package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +51 -0
  182. package/dist/modules/agent/runtime/app/types/index.d.ts +440 -0
  183. package/dist/modules/agent/runtime/app/types/index.js +51 -0
  184. package/dist/modules/agent/runtime/server/Session.d.ts +94 -0
  185. package/dist/modules/agent/runtime/server/Session.js +734 -0
  186. package/dist/modules/agent/runtime/server/SessionManager.d.ts +21 -0
  187. package/dist/modules/agent/runtime/server/SessionManager.js +80 -0
  188. package/dist/modules/agent/runtime/server/agent.d.ts +2 -0
  189. package/dist/modules/agent/runtime/server/agent.js +148 -0
  190. package/dist/modules/agent/runtime/server/agentPrompt.d.ts +22 -0
  191. package/dist/modules/agent/runtime/server/agentPrompt.js +53 -0
  192. package/dist/modules/agent/runtime/server/default-skills/adding-new-paragraphs.d.ts +2 -0
  193. package/dist/modules/agent/runtime/server/default-skills/adding-new-paragraphs.js +21 -0
  194. package/dist/modules/agent/runtime/server/default-skills/pageReview.d.ts +2 -0
  195. package/dist/modules/agent/runtime/server/default-skills/pageReview.js +28 -0
  196. package/dist/modules/agent/runtime/server/default-skills/reusable-paragraphs.d.ts +2 -0
  197. package/dist/modules/agent/runtime/server/default-skills/reusable-paragraphs.js +21 -0
  198. package/dist/modules/agent/runtime/server/default-skills/rewriteAndTranslate.d.ts +2 -0
  199. package/dist/modules/agent/runtime/server/default-skills/rewriteAndTranslate.js +14 -0
  200. package/dist/modules/agent/runtime/server/default-system-prompts/architecture.d.ts +2 -0
  201. package/dist/modules/agent/runtime/server/default-system-prompts/architecture.js +39 -0
  202. package/dist/modules/agent/runtime/server/default-system-prompts/available-skills.d.ts +2 -0
  203. package/dist/modules/agent/runtime/server/default-system-prompts/available-skills.js +18 -0
  204. package/dist/modules/agent/runtime/server/default-system-prompts/available-tools.d.ts +2 -0
  205. package/dist/modules/agent/runtime/server/default-system-prompts/available-tools.js +18 -0
  206. package/dist/modules/agent/runtime/server/default-system-prompts/fragments.d.ts +2 -0
  207. package/dist/modules/agent/runtime/server/default-system-prompts/fragments.js +19 -0
  208. package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.d.ts +2 -0
  209. package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +22 -0
  210. package/dist/modules/agent/runtime/server/default-system-prompts/interaction.d.ts +2 -0
  211. package/dist/modules/agent/runtime/server/default-system-prompts/interaction.js +20 -0
  212. package/dist/modules/agent/runtime/server/default-system-prompts/introduction.d.ts +2 -0
  213. package/dist/modules/agent/runtime/server/default-system-prompts/introduction.js +14 -0
  214. package/dist/modules/agent/runtime/server/default-system-prompts/page-context.d.ts +2 -0
  215. package/dist/modules/agent/runtime/server/default-system-prompts/page-context.js +60 -0
  216. package/dist/modules/agent/runtime/server/default-system-prompts/paragraph-bundles.d.ts +2 -0
  217. package/dist/modules/agent/runtime/server/default-system-prompts/paragraph-bundles.js +37 -0
  218. package/dist/modules/agent/runtime/server/default-system-prompts/plan-mode.d.ts +2 -0
  219. package/dist/modules/agent/runtime/server/default-system-prompts/plan-mode.js +36 -0
  220. package/dist/modules/agent/runtime/server/default-system-prompts/security.d.ts +2 -0
  221. package/dist/modules/agent/runtime/server/default-system-prompts/security.js +27 -0
  222. package/dist/modules/agent/runtime/server/default-system-prompts/workflow.d.ts +2 -0
  223. package/dist/modules/agent/runtime/server/default-system-prompts/workflow.js +22 -0
  224. package/dist/modules/agent/runtime/server/fetch.d.ts +2 -0
  225. package/dist/modules/agent/runtime/server/fetch.js +127 -0
  226. package/dist/modules/agent/runtime/server/helpers.d.ts +77 -0
  227. package/dist/modules/agent/runtime/server/helpers.js +352 -0
  228. package/dist/modules/agent/runtime/server/providers/anthropic.d.ts +12 -0
  229. package/dist/modules/agent/runtime/server/providers/anthropic.js +128 -0
  230. package/dist/modules/agent/runtime/server/providers/openai.d.ts +12 -0
  231. package/dist/modules/agent/runtime/server/providers/openai.js +165 -0
  232. package/dist/modules/agent/runtime/server/providers/types.d.ts +74 -0
  233. package/dist/modules/agent/runtime/server/providers/types.js +0 -0
  234. package/dist/modules/agent/runtime/server/server-tools/complete_plan_step/index.d.ts +3 -0
  235. package/dist/modules/agent/runtime/server/server-tools/complete_plan_step/index.js +79 -0
  236. package/dist/modules/agent/runtime/server/server-tools/create_plan/index.d.ts +9 -0
  237. package/dist/modules/agent/runtime/server/server-tools/create_plan/index.js +86 -0
  238. package/dist/modules/agent/runtime/server/server-tools/index.d.ts +86 -0
  239. package/dist/modules/agent/runtime/server/server-tools/index.js +30 -0
  240. package/dist/modules/agent/runtime/server/server-tools/load_skill/index.d.ts +7 -0
  241. package/dist/modules/agent/runtime/server/server-tools/load_skill/index.js +58 -0
  242. package/dist/modules/agent/runtime/server/server-tools/load_tools/index.d.ts +7 -0
  243. package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +43 -0
  244. package/dist/modules/agent/runtime/server/skills/defineBlokkliAgentSkill.d.ts +23 -0
  245. package/dist/modules/agent/runtime/server/skills/defineBlokkliAgentSkill.js +3 -0
  246. package/dist/modules/agent/runtime/server/skills/index.d.ts +2 -0
  247. package/dist/modules/agent/runtime/server/skills/index.js +1 -0
  248. package/dist/modules/agent/runtime/server/skills/types.d.ts +45 -0
  249. package/dist/modules/agent/runtime/server/skills/types.js +0 -0
  250. package/dist/modules/agent/runtime/server/system-prompts/defineBlokkliAgentSystemPrompt.d.ts +21 -0
  251. package/dist/modules/agent/runtime/server/system-prompts/defineBlokkliAgentSystemPrompt.js +3 -0
  252. package/dist/modules/agent/runtime/server/system-prompts/helpers.d.ts +20 -0
  253. package/dist/modules/agent/runtime/server/system-prompts/helpers.js +41 -0
  254. package/dist/modules/agent/runtime/server/system-prompts/index.d.ts +2 -0
  255. package/dist/modules/agent/runtime/server/system-prompts/index.js +1 -0
  256. package/dist/modules/agent/runtime/server/system-prompts/types.d.ts +49 -0
  257. package/dist/modules/agent/runtime/server/system-prompts/types.js +0 -0
  258. package/dist/modules/agent/runtime/shared/placeholders.d.ts +4 -0
  259. package/dist/modules/agent/runtime/shared/placeholders.js +1 -0
  260. package/dist/modules/agent/runtime/shared/types.d.ts +426 -0
  261. package/dist/modules/agent/runtime/shared/types.js +147 -0
  262. package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +27 -2
  263. package/dist/modules/drupal/graphql/features/agent.graphql +69 -0
  264. package/dist/modules/drupal/graphql/features/search.graphql +5 -0
  265. package/dist/modules/drupal/graphql/features/templates.graphql +36 -2
  266. package/dist/modules/drupal/graphql/mutations/add_multiple.graphql +25 -0
  267. package/dist/modules/drupal/graphql/mutations/bulk_update_field_values.graphql +15 -0
  268. package/dist/modules/drupal/graphql/mutations/rearrange.graphql +23 -0
  269. package/dist/modules/drupal/graphql/mutations/replace_entity_reference.graphql +25 -0
  270. package/dist/modules/drupal/graphql/mutations/swap.graphql +16 -0
  271. package/dist/modules/drupal/index.d.mts +18 -2
  272. package/dist/modules/drupal/index.mjs +60 -12
  273. package/dist/modules/drupal/runtime/adapter/index.js +246 -21
  274. package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.d.vue.ts +9 -0
  275. package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.vue +26 -0
  276. package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.vue.d.ts +9 -0
  277. package/dist/runtime/components/Blocks/Fragment/index.vue +11 -2
  278. package/dist/runtime/components/BlokkliItem.vue +3 -1
  279. package/dist/runtime/composables/defineBlokkli.js +1 -3
  280. package/dist/runtime/composables/defineBlokkliFeature.d.ts +5 -3
  281. package/dist/runtime/composables/defineBlokkliFeature.js +2 -1
  282. package/dist/runtime/composables/defineBlokkliProvider.js +1 -3
  283. package/dist/runtime/editor/adapter/index.d.ts +45 -4
  284. package/dist/runtime/editor/adapter/index.js +3 -0
  285. package/dist/runtime/editor/components/Actions/ItemDropdown.vue +6 -1
  286. package/dist/runtime/editor/components/Actions/index.vue +4 -1
  287. package/dist/runtime/editor/components/AddListItem/index.d.vue.ts +9 -1
  288. package/dist/runtime/editor/components/AddListItem/index.vue +36 -2
  289. package/dist/runtime/editor/components/AddListItem/index.vue.d.ts +9 -1
  290. package/dist/runtime/editor/components/AnimationCanvas/index.vue +17 -7
  291. package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +3 -1
  292. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -3
  293. package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +3 -1
  294. package/dist/runtime/editor/components/AutoHeight/index.d.vue.ts +16 -0
  295. package/dist/runtime/editor/components/AutoHeight/index.vue +32 -0
  296. package/dist/runtime/editor/components/AutoHeight/index.vue.d.ts +16 -0
  297. package/dist/runtime/editor/components/BlockPreviewItem/index.d.vue.ts +5 -1
  298. package/dist/runtime/editor/components/BlockPreviewItem/index.vue +10 -7
  299. package/dist/runtime/editor/components/BlockPreviewItem/index.vue.d.ts +5 -1
  300. package/dist/runtime/editor/components/DiffViewer/DiffValue.d.vue.ts +7 -0
  301. package/dist/runtime/editor/components/DiffViewer/DiffValue.vue +21 -0
  302. package/dist/runtime/editor/components/DiffViewer/DiffValue.vue.d.ts +7 -0
  303. package/dist/runtime/editor/components/DiffViewer/State.vue +4 -9
  304. package/dist/runtime/editor/components/EditProvider.vue +25 -4
  305. package/dist/runtime/editor/components/FeaturesRenderer/index.vue +26 -8
  306. package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +31 -0
  307. package/dist/runtime/editor/components/FlexTextarea/index.vue +179 -0
  308. package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +31 -0
  309. package/dist/runtime/editor/components/Form/Text/index.vue +23 -11
  310. package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
  311. package/dist/runtime/editor/components/Form/Toggle/index.vue +7 -3
  312. package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
  313. package/dist/runtime/editor/components/Icon/index.vue +3 -1
  314. package/dist/runtime/editor/components/Indicators/index.vue +20 -10
  315. package/dist/runtime/editor/components/ItemIcon/index.d.vue.ts +3 -0
  316. package/dist/runtime/editor/components/ItemIcon/index.vue +3 -2
  317. package/dist/runtime/editor/components/ItemIcon/index.vue.d.ts +3 -0
  318. package/dist/runtime/editor/components/ItemIconBox/index.vue +4 -1
  319. package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +3 -1
  320. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +150 -71
  321. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +3 -1
  322. package/dist/runtime/editor/components/PluginConfigForm/index.vue +6 -2
  323. package/dist/runtime/editor/components/RelativeTime/index.d.vue.ts +3 -2
  324. package/dist/runtime/editor/components/RelativeTime/index.vue +21 -7
  325. package/dist/runtime/editor/components/RelativeTime/index.vue.d.ts +3 -2
  326. package/dist/runtime/editor/components/StatusIcon/index.d.vue.ts +9 -0
  327. package/dist/runtime/editor/components/StatusIcon/index.vue +31 -0
  328. package/dist/runtime/editor/components/StatusIcon/index.vue.d.ts +9 -0
  329. package/dist/runtime/editor/components/SystemRequirements/index.vue +5 -1
  330. package/dist/runtime/editor/components/Transition/Height.vue +3 -2
  331. package/dist/runtime/editor/components/Transition/index.d.vue.ts +1 -1
  332. package/dist/runtime/editor/components/Transition/index.vue +2 -1
  333. package/dist/runtime/editor/components/Transition/index.vue.d.ts +1 -1
  334. package/dist/runtime/editor/components/index.d.ts +10 -6
  335. package/dist/runtime/editor/components/index.js +19 -11
  336. package/dist/runtime/editor/composables/index.d.ts +2 -0
  337. package/dist/runtime/editor/composables/index.js +2 -0
  338. package/dist/runtime/editor/composables/onElementResize.d.ts +3 -0
  339. package/dist/runtime/editor/composables/onElementResize.js +37 -0
  340. package/dist/runtime/editor/composables/useEditableFieldOverride.d.ts +24 -0
  341. package/dist/runtime/editor/composables/useEditableFieldOverride.js +130 -0
  342. package/dist/runtime/editor/composables/useStickyToolbar.d.ts +4 -3
  343. package/dist/runtime/editor/composables/useStickyToolbar.js +26 -10
  344. package/dist/runtime/editor/css/output.css +1 -1
  345. package/dist/runtime/editor/events/index.d.ts +31 -0
  346. package/dist/runtime/editor/features/add-list/Actions/Action.d.vue.ts +8 -1
  347. package/dist/runtime/editor/features/add-list/Actions/Action.vue +7 -1
  348. package/dist/runtime/editor/features/add-list/Actions/Action.vue.d.ts +8 -1
  349. package/dist/runtime/editor/features/add-list/Actions/index.d.vue.ts +11 -1
  350. package/dist/runtime/editor/features/add-list/Actions/index.vue +30 -10
  351. package/dist/runtime/editor/features/add-list/Actions/index.vue.d.ts +11 -1
  352. package/dist/runtime/editor/features/add-list/Blocks/index.d.vue.ts +11 -2
  353. package/dist/runtime/editor/features/add-list/Blocks/index.vue +27 -1
  354. package/dist/runtime/editor/features/add-list/Blocks/index.vue.d.ts +11 -2
  355. package/dist/runtime/editor/features/add-list/Help/Item.d.vue.ts +12 -0
  356. package/dist/runtime/editor/features/add-list/Help/Item.vue +186 -0
  357. package/dist/runtime/editor/features/add-list/Help/Item.vue.d.ts +12 -0
  358. package/dist/runtime/editor/features/add-list/Help/index.d.vue.ts +13 -0
  359. package/dist/runtime/editor/features/add-list/Help/index.vue +127 -0
  360. package/dist/runtime/editor/features/add-list/Help/index.vue.d.ts +13 -0
  361. package/dist/runtime/editor/features/add-list/docs.md +2 -2
  362. package/dist/runtime/editor/features/add-list/index.vue +108 -9
  363. package/dist/runtime/editor/features/add-list/types.d.ts +5 -0
  364. package/dist/runtime/editor/features/analyze/Main.vue +4 -1
  365. package/dist/runtime/editor/features/analyze/Summary/Chart.vue +9 -9
  366. package/dist/runtime/editor/features/analyze/index.vue +2 -14
  367. package/dist/runtime/editor/features/analyze/types.d.ts +4 -1
  368. package/dist/runtime/editor/features/artboard/Renderer.vue +43 -0
  369. package/dist/runtime/editor/features/assistant/docs.md +5 -5
  370. package/dist/runtime/editor/features/breadcrumbs/index.vue +4 -1
  371. package/dist/runtime/editor/features/clipboard/index.vue +6 -2
  372. package/dist/runtime/editor/features/comments/index.vue +1 -0
  373. package/dist/runtime/editor/features/comments/types.d.ts +6 -0
  374. package/dist/runtime/editor/features/dragging-overlay/DragItems/DragItem.d.vue.ts +1 -0
  375. package/dist/runtime/editor/features/dragging-overlay/DragItems/DragItem.vue +6 -31
  376. package/dist/runtime/editor/features/dragging-overlay/DragItems/DragItem.vue.d.ts +1 -0
  377. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.d.vue.ts +2 -1
  378. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +42 -18
  379. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue.d.ts +2 -1
  380. package/dist/runtime/editor/features/dragging-overlay/Renderer/fragment.glsl +77 -2
  381. package/dist/runtime/editor/features/dragging-overlay/Renderer/index.d.vue.ts +1 -0
  382. package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +143 -52
  383. package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue.d.ts +1 -0
  384. package/dist/runtime/editor/features/dragging-overlay/Renderer/vertex.glsl +84 -31
  385. package/dist/runtime/editor/features/dragging-overlay/index.vue +3 -2
  386. package/dist/runtime/editor/features/edit/index.vue +7 -1
  387. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +13 -23
  388. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +10 -102
  389. package/dist/runtime/editor/features/editable-field/types.d.ts +12 -2
  390. package/dist/runtime/editor/features/entity-title/index.vue +7 -7
  391. package/dist/runtime/editor/features/fragments/index.vue +1 -1
  392. package/dist/runtime/editor/features/import-existing/Dialog/index.vue +8 -13
  393. package/dist/runtime/editor/features/library/ReusableDialog/index.vue +6 -1
  394. package/dist/runtime/editor/features/library/index.vue +14 -5
  395. package/dist/runtime/editor/features/library/types.d.ts +6 -0
  396. package/dist/runtime/editor/features/media-library/Library/Item.d.vue.ts +2 -2
  397. package/dist/runtime/editor/features/media-library/Library/Item.vue +17 -1
  398. package/dist/runtime/editor/features/media-library/Library/Item.vue.d.ts +2 -2
  399. package/dist/runtime/editor/features/media-library/Library/index.vue +6 -1
  400. package/dist/runtime/editor/features/media-library/index.vue +4 -4
  401. package/dist/runtime/editor/features/options/Form/index.vue +11 -43
  402. package/dist/runtime/editor/features/ownership/Banner/index.d.vue.ts +6 -3
  403. package/dist/runtime/editor/features/ownership/Banner/index.vue +10 -1
  404. package/dist/runtime/editor/features/ownership/Banner/index.vue.d.ts +6 -3
  405. package/dist/runtime/editor/features/ownership/index.vue +18 -6
  406. package/dist/runtime/editor/features/ownership/types.d.ts +5 -0
  407. package/dist/runtime/editor/features/publish/index.vue +5 -1
  408. package/dist/runtime/editor/features/search/Overlay/index.vue +5 -2
  409. package/dist/runtime/editor/features/search/index.vue +64 -3
  410. package/dist/runtime/editor/features/search/types.d.ts +16 -1
  411. package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +1 -3
  412. package/dist/runtime/editor/features/selection/AddButtons/index.vue +24 -4
  413. package/dist/runtime/editor/features/selection/Renderer/index.vue +5 -1
  414. package/dist/runtime/editor/features/selection/index.vue +5 -1
  415. package/dist/runtime/editor/features/settings/Dialog/index.vue +3 -1
  416. package/dist/runtime/editor/features/settings/index.vue +4 -1
  417. package/dist/runtime/editor/features/templates/CreateDialog/index.vue +21 -2
  418. package/dist/runtime/editor/features/templates/Dialog/Item/index.d.vue.ts +1 -1
  419. package/dist/runtime/editor/features/templates/Dialog/Item/index.vue +3 -3
  420. package/dist/runtime/editor/features/templates/Dialog/Item/index.vue.d.ts +1 -1
  421. package/dist/runtime/editor/features/templates/Dialog/index.vue +21 -5
  422. package/dist/runtime/editor/features/templates/ManageDialog/Item.d.vue.ts +8 -0
  423. package/dist/runtime/editor/features/templates/ManageDialog/Item.vue +147 -0
  424. package/dist/runtime/editor/features/templates/ManageDialog/Item.vue.d.ts +8 -0
  425. package/dist/runtime/editor/features/templates/ManageDialog/index.vue +30 -107
  426. package/dist/runtime/editor/features/templates/index.vue +7 -5
  427. package/dist/runtime/editor/features/templates/types.d.ts +11 -2
  428. package/dist/runtime/editor/features/transform/Dialog/index.vue +6 -1
  429. package/dist/runtime/editor/features/transform/index.vue +25 -20
  430. package/dist/runtime/editor/features/transform/types.d.ts +6 -4
  431. package/dist/runtime/editor/features/validations/index.vue +6 -1
  432. package/dist/runtime/editor/helpers/date/index.d.ts +1 -0
  433. package/dist/runtime/editor/helpers/date/index.js +3 -0
  434. package/dist/runtime/editor/helpers/options/index.d.ts +20 -0
  435. package/dist/runtime/editor/helpers/options/index.js +60 -0
  436. package/dist/runtime/editor/helpers/webgl/index.d.ts +5 -1
  437. package/dist/runtime/editor/helpers/webgl/index.js +45 -13
  438. package/dist/runtime/editor/icons/svg/stars.svg +1 -0
  439. package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
  440. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue +13 -10
  441. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
  442. package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +3 -1
  443. package/dist/runtime/editor/plugins/Sidebar/index.vue +14 -2
  444. package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +3 -1
  445. package/dist/runtime/editor/providers/adapters.d.ts +33 -0
  446. package/dist/runtime/editor/providers/adapters.js +88 -0
  447. package/dist/runtime/editor/providers/animation.js +3 -0
  448. package/dist/runtime/editor/providers/definition.d.ts +8 -1
  449. package/dist/runtime/editor/providers/definition.js +7 -3
  450. package/dist/runtime/editor/providers/dom.d.ts +7 -0
  451. package/dist/runtime/editor/providers/dom.js +12 -0
  452. package/dist/runtime/editor/providers/permissions.d.ts +6 -0
  453. package/dist/runtime/editor/providers/permissions.js +9 -0
  454. package/dist/runtime/editor/providers/plugin.d.ts +1 -0
  455. package/dist/runtime/editor/providers/state.js +1 -0
  456. package/dist/runtime/editor/providers/texts.js +20 -6
  457. package/dist/runtime/editor/providers/types.d.ts +7 -0
  458. package/dist/runtime/editor/providers/types.js +4 -0
  459. package/dist/runtime/editor/providers/ui.d.ts +40 -0
  460. package/dist/runtime/editor/providers/ui.js +27 -1
  461. package/dist/runtime/editor/translations/de.json +2738 -0
  462. package/dist/runtime/editor/translations/fr.json +2738 -0
  463. package/dist/runtime/editor/translations/gsw_CH.json +2738 -0
  464. package/dist/runtime/editor/translations/it.json +2738 -0
  465. package/dist/runtime/editor/types/app.d.ts +9 -2
  466. package/dist/runtime/editor/types/definitions.d.ts +5 -0
  467. package/dist/runtime/editor/types/features.d.ts +3 -1
  468. package/dist/runtime/editor/types/permissions.d.ts +17 -0
  469. package/dist/runtime/editor/types/permissions.js +0 -0
  470. package/dist/runtime/helpers/runtimeHelpers/index.d.ts +2 -1
  471. package/dist/runtime/helpers/runtimeHelpers/index.js +44 -6
  472. package/dist/runtime/types/index.d.ts +6 -0
  473. package/dist/shared/editor.CGf7C_0M.mjs +10 -0
  474. package/dist/shared/editor.DMFfaLVE.mjs +175 -0
  475. package/dist/shared/{editor.BKQCh70G.d.mts → editor.Iax3GCvt.d.mts} +94 -40
  476. package/dist/types.d.mts +7 -1
  477. package/package.json +29 -7
  478. package/dist/runtime/css/output.css +0 -1
  479. package/dist/runtime/material-icons/index.d.ts +0 -12
  480. package/dist/runtime/material-icons/index.js +0 -1
@@ -0,0 +1,274 @@
1
+ <template>
2
+ <div
3
+ v-if="hasBeenReady || debugStyling"
4
+ class="bk bk-agent-panel"
5
+ @mousedown.capture.stop
6
+ @pointerdown.capture.stop
7
+ @pointerup.capture.stop
8
+ @mouseup.capture.stop
9
+ @contextmenu.capture.stop
10
+ >
11
+ <div
12
+ ref="scrollContainer"
13
+ class="bk-agent-panel-inner bk-scrollbar-light"
14
+ @scroll="onScroll"
15
+ >
16
+ <div ref="conversationContainer" class="bk-agent-panel-conversation">
17
+ <button
18
+ v-if="debugStyling"
19
+ class="bk-button"
20
+ @click="debugShowPlan = !debugShowPlan"
21
+ >
22
+ {{ debugShowPlan ? "Hide" : "Show" }} Plan
23
+ </button>
24
+ <DebugGallery v-if="debugStyling" />
25
+ <template v-else>
26
+ <Welcome v-if="showWelcome" :agent-name @prompt="onWelcomePrompt" />
27
+ <Conversation
28
+ v-if="conversation.length || activeItem || isThinking"
29
+ :history="conversation"
30
+ :active-item="activeItem"
31
+ :is-thinking="isThinking"
32
+ @retry="emit('retry')"
33
+ />
34
+ <component
35
+ :is="pendingToolComponent"
36
+ v-if="pendingToolComponent && pendingToolCall"
37
+ :context="toolContext"
38
+ :params="pendingToolCall.params"
39
+ @done="(result) => emit('toolComponentDone', result)"
40
+ />
41
+ <PendingMutation
42
+ v-else-if="pendingMutation && !autoApprove"
43
+ :action="pendingMutation.action"
44
+ @approve="emit('approve')"
45
+ @reject="emit('reject')"
46
+ @always-approve="onAlwaysApprove"
47
+ />
48
+ </template>
49
+ </div>
50
+
51
+ <div class="bk-agent-panel-input">
52
+ <AgentInput
53
+ ref="inputEl"
54
+ v-model="inputValue"
55
+ :is-processing="debugIsProcessing"
56
+ :is-connected
57
+ :has-pending-approval="!!(pendingMutation || pendingToolCall)"
58
+ :has-conversation="conversation.length > 0"
59
+ :usage-turns
60
+ :has-active-plan="!!activePlan"
61
+ @submit="onSubmit"
62
+ @cancel="emit('cancel')"
63
+ @new-conversation="onNewConversation"
64
+ @show-transcript="emit('getTranscript')"
65
+ @show-conversations="emit('showConversations')"
66
+ >
67
+ <TransitionHeight :duration="600" opacity>
68
+ <Plan
69
+ v-if="activePlan"
70
+ :plan="activePlan"
71
+ :pending-approval="isPlanPendingApproval"
72
+ @approve="emit('approvePlan')"
73
+ @reject="emit('rejectPlan')"
74
+ />
75
+ </TransitionHeight>
76
+ </AgentInput>
77
+ </div>
78
+ </div>
79
+ <Transition name="bk-agent-overlay" :duration="500">
80
+ <div
81
+ v-if="showConversationList"
82
+ class="bk-agent-conversation-list-overlay"
83
+ >
84
+ <div
85
+ class="bk-agent-conversation-list-backdrop"
86
+ @click="emit('hideConversations')"
87
+ />
88
+ <div class="bk-agent-conversation-list-sheet bk-scrollbar-light">
89
+ <ConversationList
90
+ :conversations="conversationList"
91
+ @switch="(id) => emit('switchConversation', id)"
92
+ @delete="(id) => emit('deleteConversation', id)"
93
+ @close="emit('hideConversations')"
94
+ />
95
+ </div>
96
+ </div>
97
+ </Transition>
98
+ </div>
99
+ <div v-else-if="!hasBeenReady" class="bk-agent-connecting">
100
+ <Icon name="loader" />
101
+ <span>{{ $t("aiAgentConnecting", "Connecting...") }}</span>
102
+ </div>
103
+ </template>
104
+
105
+ <script setup>
106
+ import {
107
+ ref,
108
+ computed,
109
+ useTemplateRef,
110
+ nextTick,
111
+ watch,
112
+ onBeforeUnmount,
113
+ useBlokkli
114
+ } from "#imports";
115
+ import { Icon, TransitionHeight } from "#blokkli/editor/components";
116
+ import Conversation from "./Conversation/index.vue";
117
+ import PendingMutation from "./PendingMutation/index.vue";
118
+ import DebugGallery from "./DebugGallery/index.vue";
119
+ import Welcome from "./Welcome/index.vue";
120
+ import AgentInput from "./Input/index.vue";
121
+ import ConversationList from "./ConversationList/index.vue";
122
+ import Plan from "./Plan/index.vue";
123
+ import { mcpTools } from "#blokkli-build/agent-client";
124
+ import { isToolDefinition } from "#blokkli/agent/app/helpers";
125
+ import { itemEntityType } from "#blokkli-build/config";
126
+ const props = defineProps({
127
+ agentName: { type: String, required: true },
128
+ isShown: { type: Boolean, required: true },
129
+ debugStyling: { type: Boolean, required: false },
130
+ conversation: { type: Array, required: true },
131
+ activeItem: { type: null, required: true },
132
+ isThinking: { type: Boolean, required: true },
133
+ isProcessing: { type: Boolean, required: true },
134
+ isConnected: { type: Boolean, required: true },
135
+ hasBeenReady: { type: Boolean, required: true },
136
+ pendingToolCall: { type: [Object, null], required: true },
137
+ pendingMutation: { type: [Object, null], required: true },
138
+ autoApprove: { type: Boolean, required: true },
139
+ conversationList: { type: Array, required: true },
140
+ showConversationList: { type: Boolean, required: true },
141
+ plan: { type: [Object, null], required: true },
142
+ usageTurns: { type: Array, required: true }
143
+ });
144
+ const emit = defineEmits(["connect", "sendPrompt", "cancel", "approve", "reject", "setAutoApprove", "newConversation", "getTranscript", "toolComponentDone", "switchConversation", "deleteConversation", "showConversations", "hideConversations", "retry", "approvePlan", "rejectPlan"]);
145
+ const app = useBlokkli();
146
+ const { $t } = app;
147
+ watch(
148
+ () => props.isShown,
149
+ (isShown) => {
150
+ if (isShown && !props.debugStyling) {
151
+ emit("connect");
152
+ }
153
+ },
154
+ { immediate: true }
155
+ );
156
+ const toolContext = computed(() => ({
157
+ app,
158
+ itemEntityType,
159
+ adapter: app.adapter
160
+ }));
161
+ const staticTools = mcpTools.filter(isToolDefinition);
162
+ const pendingToolComponent = computed(() => {
163
+ if (!props.pendingToolCall) return null;
164
+ const tool = staticTools.find(
165
+ (t) => t.name === props.pendingToolCall.toolName
166
+ );
167
+ return tool?.component || null;
168
+ });
169
+ const inputValue = ref("");
170
+ const inputEl = useTemplateRef("inputEl");
171
+ const scrollContainer = useTemplateRef("scrollContainer");
172
+ const isAtBottom = ref(true);
173
+ const SCROLL_THRESHOLD = 50;
174
+ function onScroll() {
175
+ if (!scrollContainer.value) return;
176
+ const { scrollTop, scrollHeight, clientHeight } = scrollContainer.value;
177
+ isAtBottom.value = scrollHeight - scrollTop - clientHeight < SCROLL_THRESHOLD;
178
+ }
179
+ function scrollToBottom() {
180
+ if (!scrollContainer.value) return;
181
+ scrollContainer.value.scrollTop = scrollContainer.value.scrollHeight;
182
+ }
183
+ const conversationContainer = useTemplateRef("conversationContainer");
184
+ let resizeObserver = null;
185
+ watch(
186
+ conversationContainer,
187
+ (el, _oldEl, onCleanup) => {
188
+ if (!el) return;
189
+ resizeObserver = new ResizeObserver(() => {
190
+ if (isAtBottom.value) {
191
+ scrollToBottom();
192
+ }
193
+ });
194
+ resizeObserver.observe(el);
195
+ onCleanup(() => {
196
+ resizeObserver?.disconnect();
197
+ resizeObserver = null;
198
+ });
199
+ },
200
+ { immediate: true }
201
+ );
202
+ onBeforeUnmount(() => {
203
+ resizeObserver?.disconnect();
204
+ resizeObserver = null;
205
+ });
206
+ watch(
207
+ () => props.isProcessing,
208
+ (isProcessing, wasProcessing) => {
209
+ if (wasProcessing && !isProcessing) {
210
+ nextTick(() => inputEl.value?.focus());
211
+ }
212
+ }
213
+ );
214
+ const debugPlan = {
215
+ title: "Restructure page content",
216
+ steps: [
217
+ { label: "Analyze current page structure", status: "completed" },
218
+ { label: "Add hero section with title", status: "completed" },
219
+ { label: "Rewrite introduction text", status: "in_progress" },
220
+ { label: "Add feature cards grid", status: "pending" },
221
+ { label: "Add footer with contact info", status: "pending" }
222
+ ]
223
+ };
224
+ const debugShowPlan = ref(true);
225
+ const debugIsProcessing = computed(() => {
226
+ if (props.debugStyling) {
227
+ return debugShowPlan.value;
228
+ }
229
+ return props.isProcessing;
230
+ });
231
+ const activePlan = computed(() => {
232
+ return props.debugStyling ? debugShowPlan.value ? debugPlan : null : props.plan;
233
+ });
234
+ const isPlanPendingApproval = computed(() => {
235
+ return props.debugStyling || activePlan.value !== null && activePlan.value.steps.every((s) => s.status === "pending");
236
+ });
237
+ const showWelcome = computed(() => {
238
+ return !props.conversation.length && !props.activeItem && !props.isThinking;
239
+ });
240
+ function onAlwaysApprove() {
241
+ emit("setAutoApprove", true);
242
+ }
243
+ function scrollToBottomOnSend() {
244
+ isAtBottom.value = true;
245
+ nextTick(scrollToBottom);
246
+ }
247
+ function onWelcomePrompt(prompt) {
248
+ emit("sendPrompt", prompt);
249
+ scrollToBottomOnSend();
250
+ }
251
+ function onSubmit(submitAttachments) {
252
+ const text = inputValue.value.trim();
253
+ if (!text && !submitAttachments.length || props.isProcessing || !props.isConnected)
254
+ return;
255
+ if (!submitAttachments.length) {
256
+ emit("sendPrompt", inputValue.value);
257
+ } else {
258
+ const attachmentBlocks = submitAttachments.map(
259
+ (att) => `<attachment type="${att.type}">
260
+ ${att.content}
261
+ </attachment>`
262
+ ).join("\n\n");
263
+ const prompt = text ? `${text}
264
+
265
+ ${attachmentBlocks}` : attachmentBlocks;
266
+ emit("sendPrompt", prompt, text, void 0, submitAttachments);
267
+ }
268
+ inputValue.value = "";
269
+ scrollToBottomOnSend();
270
+ }
271
+ function onNewConversation() {
272
+ emit("newConversation");
273
+ }
274
+ </script>
@@ -0,0 +1,58 @@
1
+ import type { AgentConversationSummary, PendingMutationState, PendingToolCall } from '#blokkli/agent/app/composables';
2
+ import type { ConversationItem, ActiveItem } from '#blokkli/agent/app/types';
3
+ import type { ClientPlanState, UsageTurn } from '#blokkli/agent/shared/types';
4
+ type __VLS_Props = {
5
+ agentName: string;
6
+ isShown: boolean;
7
+ debugStyling?: boolean;
8
+ conversation: ConversationItem[];
9
+ activeItem: ActiveItem | null;
10
+ isThinking: boolean;
11
+ isProcessing: boolean;
12
+ isConnected: boolean;
13
+ hasBeenReady: boolean;
14
+ pendingToolCall: PendingToolCall | null;
15
+ pendingMutation: PendingMutationState | null;
16
+ autoApprove: boolean;
17
+ conversationList: AgentConversationSummary[];
18
+ showConversationList: boolean;
19
+ plan: ClientPlanState | null;
20
+ usageTurns: UsageTurn[];
21
+ };
22
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
+ cancel: () => any;
24
+ retry: () => any;
25
+ approve: () => any;
26
+ reject: () => any;
27
+ newConversation: () => any;
28
+ showConversations: () => any;
29
+ connect: () => any;
30
+ sendPrompt: (prompt: string, displayPrompt?: string | undefined, selectedUuids?: string[] | undefined, attachments?: Attachment[] | undefined) => any;
31
+ setAutoApprove: (value: boolean) => any;
32
+ getTranscript: () => any;
33
+ toolComponentDone: (result: unknown) => any;
34
+ switchConversation: (id: string) => any;
35
+ deleteConversation: (id: string) => any;
36
+ hideConversations: () => any;
37
+ approvePlan: () => any;
38
+ rejectPlan: () => any;
39
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
40
+ onCancel?: (() => any) | undefined;
41
+ onRetry?: (() => any) | undefined;
42
+ onApprove?: (() => any) | undefined;
43
+ onReject?: (() => any) | undefined;
44
+ onNewConversation?: (() => any) | undefined;
45
+ onShowConversations?: (() => any) | undefined;
46
+ onConnect?: (() => any) | undefined;
47
+ onSendPrompt?: ((prompt: string, displayPrompt?: string | undefined, selectedUuids?: string[] | undefined, attachments?: Attachment[] | undefined) => any) | undefined;
48
+ onSetAutoApprove?: ((value: boolean) => any) | undefined;
49
+ onGetTranscript?: (() => any) | undefined;
50
+ onToolComponentDone?: ((result: unknown) => any) | undefined;
51
+ onSwitchConversation?: ((id: string) => any) | undefined;
52
+ onDeleteConversation?: ((id: string) => any) | undefined;
53
+ onHideConversations?: (() => any) | undefined;
54
+ onApprovePlan?: (() => any) | undefined;
55
+ onRejectPlan?: (() => any) | undefined;
56
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
57
+ declare const _default: typeof __VLS_export;
58
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,162 @@
1
+ <template>
2
+ <PluginSidebar
3
+ id="agent"
4
+ v-slot="{ isShown }"
5
+ :title="agentName"
6
+ :tour-text="
7
+ $t('aiAgentTourText', 'Chat with an AI assistant to edit page content.')
8
+ "
9
+ icon="stars"
10
+ weight="-900"
11
+ render-always
12
+ beta
13
+ >
14
+ <AgentPanel
15
+ :is-shown
16
+ :debug-styling="DEBUG_STYLING"
17
+ :agent-name
18
+ :conversation
19
+ :active-item
20
+ :is-thinking
21
+ :is-processing
22
+ :is-connected
23
+ :has-been-ready
24
+ :pending-tool-call
25
+ :pending-mutation
26
+ :auto-approve
27
+ :conversation-list
28
+ :show-conversation-list
29
+ :plan
30
+ :usage-turns="usageTurns"
31
+ @connect="connect"
32
+ @send-prompt="sendPrompt"
33
+ @retry="retry"
34
+ @cancel="cancel"
35
+ @approve="approve"
36
+ @reject="reject"
37
+ @set-auto-approve="setAutoApprove"
38
+ @new-conversation="newConversation"
39
+ @get-transcript="getTranscript"
40
+ @tool-component-done="onToolComponentDone"
41
+ @switch-conversation="switchConversation"
42
+ @delete-conversation="deleteConversation"
43
+ @show-conversations="onShowConversations"
44
+ @hide-conversations="onHideConversations"
45
+ @approve-plan="approvePlan"
46
+ @reject-plan="rejectPlan"
47
+ />
48
+ </PluginSidebar>
49
+
50
+ <Teleport :to="ui.mainLayoutElement.value">
51
+ <BlokkliTransition name="slide-up">
52
+ <DialogModal
53
+ v-if="showTranscript"
54
+ id="agent-transcript"
55
+ title="Agent Transcript"
56
+ :width="900"
57
+ hide-buttons
58
+ full-screen
59
+ @cancel="showTranscript = false"
60
+ >
61
+ <pre class="bk-agent-transcript">{{ transcriptContent }}</pre>
62
+ </DialogModal>
63
+ </BlokkliTransition>
64
+ </Teleport>
65
+ </template>
66
+
67
+ <script setup>
68
+ import { useBlokkli, defineBlokkliFeature, onBeforeUnmount } from "#imports";
69
+ import { PluginSidebar } from "#blokkli/editor/plugins";
70
+ import { DialogModal, BlokkliTransition } from "#blokkli/editor/components";
71
+ import agentProvider from "#blokkli/agent/app/composables/agentProvider";
72
+ import { agentPrompts, agentName } from "#blokkli-build/agent-client";
73
+ import AgentPanel from "./Panel/index.vue";
74
+ import { defineItemDropdownAction } from "#blokkli/editor/composables";
75
+ const DEBUG_STYLING = false;
76
+ const { adapter } = defineBlokkliFeature({
77
+ id: "agent",
78
+ icon: "stars",
79
+ label: "AI Agent",
80
+ description: "Chat with an AI assistant to edit page content.",
81
+ requiredPermissions: ["use_agent"],
82
+ requiredAdapterMethods: [
83
+ "updateFieldValue",
84
+ "addNewBlock",
85
+ "deleteBlocks",
86
+ "moveMultipleBlocks"
87
+ ]
88
+ });
89
+ const app = useBlokkli();
90
+ const { $t, ui } = app;
91
+ const {
92
+ isConnected,
93
+ hasBeenReady,
94
+ connect,
95
+ disconnect,
96
+ conversation,
97
+ activeItem,
98
+ isProcessing,
99
+ isThinking,
100
+ autoApprove,
101
+ pendingMutation,
102
+ pendingToolCall,
103
+ plan,
104
+ approvePlan,
105
+ rejectPlan,
106
+ usageTurns,
107
+ sendPrompt,
108
+ retry,
109
+ approve,
110
+ reject,
111
+ setAutoApprove,
112
+ cancel,
113
+ newConversation,
114
+ getTranscript,
115
+ onToolComponentDone,
116
+ transcriptContent,
117
+ showTranscript,
118
+ conversationList,
119
+ showConversationList,
120
+ switchConversation,
121
+ deleteConversation,
122
+ refreshConversationList
123
+ } = agentProvider(app, adapter, agentName);
124
+ async function onShowConversations() {
125
+ await refreshConversationList();
126
+ showConversationList.value = true;
127
+ }
128
+ function onHideConversations() {
129
+ showConversationList.value = false;
130
+ }
131
+ onBeforeUnmount(() => {
132
+ disconnect();
133
+ });
134
+ defineItemDropdownAction(() => {
135
+ return agentPrompts.flatMap((promptFactory) => {
136
+ const promptsResult = "__factory" in promptFactory ? promptFactory.resolve(app) : promptFactory;
137
+ const prompts = Array.isArray(promptsResult) ? promptsResult : [promptsResult];
138
+ return prompts.map((prompt) => {
139
+ const promptText = prompt.getPrompt(app);
140
+ const userPromptText = prompt.getUserPrompt?.(app);
141
+ return {
142
+ id: "agent:prompt:" + prompt.id,
143
+ label: prompt.getLabel(app),
144
+ icon: "stars",
145
+ group: "agent",
146
+ variant: "agent",
147
+ weight: -900,
148
+ callback: () => {
149
+ app.eventBus.emit("sidebar:open", "agent");
150
+ sendPrompt(promptText, userPromptText, [...app.selection.uuids.value]);
151
+ }
152
+ };
153
+ });
154
+ });
155
+ });
156
+ </script>
157
+
158
+ <script>
159
+ export default {
160
+ name: "Agent"
161
+ };
162
+ </script>
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,58 @@
1
+ export type AgentConversationData = {
2
+ uuid: string;
3
+ title: string;
4
+ clientState: string;
5
+ serverState: string;
6
+ hash: string;
7
+ };
8
+ export type AgentConversationSummary = {
9
+ uuid: string;
10
+ title: string;
11
+ createdAt: string;
12
+ updatedAt: string;
13
+ };
14
+ declare module '#blokkli/editor/types/permissions' {
15
+ interface UserPermissionMap {
16
+ use_agent: 'Use the AI agent.';
17
+ }
18
+ }
19
+ declare module '#blokkli/editor/adapter' {
20
+ interface BlokkliAdapter<T> {
21
+ /**
22
+ * Swap two blocks.
23
+ */
24
+ swapBlocks?: (first: string, second: string) => Promise<MutationResponseLike<T>>;
25
+ /**
26
+ * Rearrange blocks within a field by specifying the desired order.
27
+ *
28
+ * All provided UUIDs must belong to the same field. The blocks
29
+ * are reordered to match the given UUID array order.
30
+ */
31
+ rearrangeBlocks?: (e: {
32
+ host: import('#blokkli/editor/types/field').BlokkliItemHost;
33
+ uuids: string[];
34
+ }) => Promise<MutationResponseLike<T>>;
35
+ /**
36
+ * Get an authentication token for the agent WebSocket connection.
37
+ *
38
+ * The token is included in the WebSocket init message and validated
39
+ * server-side using HMAC. The adapter should obtain the token from
40
+ * an authenticated CMS endpoint.
41
+ */
42
+ getAgentAuthToken?: () => Promise<string | null>;
43
+ /**
44
+ * Manage persisted agent conversations for the current entity.
45
+ *
46
+ * Each conversation is stored as a structured record with separate
47
+ * fields for client state, server state, and the HMAC hash.
48
+ * Timestamps (createdAt, updatedAt) are managed by the backend.
49
+ */
50
+ agentConversations?: {
51
+ upsert: (data: AgentConversationData) => Promise<boolean>;
52
+ load: (uuid: string) => Promise<AgentConversationData | null>;
53
+ loadLatest: () => Promise<AgentConversationData | null>;
54
+ list: () => Promise<AgentConversationSummary[]>;
55
+ delete: (uuid: string) => Promise<boolean>;
56
+ };
57
+ }
58
+ }
@@ -0,0 +1,55 @@
1
+ import type { McpToolDefinition, McpToolFactory, McpToolItem, McpToolContext, McpToolCategory, MutationAction, QueryResult, ToolError } from '#blokkli/agent/app/types';
2
+ import type { ClientToolDefinition } from '#blokkli/agent/shared/types';
3
+ import type { BlokkliAdapter } from '#blokkli/editor/adapter';
4
+ import type { EditMode } from '#blokkli/editor/types/state';
5
+ /**
6
+ * Create a map of tool name to tool definition for quick lookup.
7
+ */
8
+ export declare function createToolMap(tools: McpToolDefinition[]): Record<string, McpToolDefinition>;
9
+ /**
10
+ * Get tools formatted for the server with JSON schemas.
11
+ * Filters by edit mode and adapter methods if provided.
12
+ */
13
+ export declare function getToolsForServer(tools: McpToolDefinition[], editMode: EditMode, adapter?: BlokkliAdapter<unknown>): ClientToolDefinition[];
14
+ /**
15
+ * Execute a tool by name with the given context and parameters.
16
+ * Validates parameters with Zod before executing.
17
+ */
18
+ export declare function executeTool(toolMap: Record<string, McpToolDefinition>, name: string, context: McpToolContext, params: Record<string, unknown>): Promise<unknown>;
19
+ /**
20
+ * Get the category of a tool by name.
21
+ */
22
+ export declare function getToolCategory(toolMap: Record<string, McpToolDefinition>, name: string): McpToolCategory;
23
+ /**
24
+ * Get the tool definition by name.
25
+ */
26
+ export declare function getToolDefinition(toolMap: Record<string, McpToolDefinition>, name: string): McpToolDefinition;
27
+ /**
28
+ * Check if a result is a MutationAction.
29
+ */
30
+ export declare function isMutationAction(result: unknown): result is MutationAction;
31
+ /**
32
+ * Check if a result is a QueryResult.
33
+ */
34
+ export declare function isQueryResult(result: unknown): result is QueryResult;
35
+ /**
36
+ * Check if a result is a ToolError.
37
+ */
38
+ export declare function isToolError(result: unknown): result is ToolError;
39
+ /**
40
+ * Check if a tool item is a factory (produces tools dynamically at runtime).
41
+ */
42
+ export declare function isToolFactory(item: McpToolItem): item is McpToolFactory;
43
+ /**
44
+ * Check if a tool item is a static tool definition (not a factory).
45
+ */
46
+ export declare function isToolDefinition(item: McpToolItem): item is McpToolDefinition;
47
+ /**
48
+ * Resolve an array of tool items (static definitions + factories) into
49
+ * a flat array of McpToolDefinition objects.
50
+ *
51
+ * Each factory's resolve callback is called to produce tools. The individual
52
+ * tools returned by factories have their own requiredAdapterMethods, which
53
+ * are checked later by getToolsForServer.
54
+ */
55
+ export declare function resolveTools(tools: McpToolItem[], context: McpToolContext): Promise<McpToolDefinition[]>;