@ixo/oracle-runtime 0.0.1

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 (583) hide show
  1. package/dist/bootstrap/ambient-factory.d.ts +32 -0
  2. package/dist/bootstrap/ambient-factory.d.ts.map +1 -0
  3. package/dist/bootstrap/ambient-factory.js +128 -0
  4. package/dist/bootstrap/create-oracle-app.d.ts +112 -0
  5. package/dist/bootstrap/create-oracle-app.d.ts.map +1 -0
  6. package/dist/bootstrap/create-oracle-app.js +530 -0
  7. package/dist/bootstrap/graceful-shutdown.d.ts +20 -0
  8. package/dist/bootstrap/graceful-shutdown.d.ts.map +1 -0
  9. package/dist/bootstrap/graceful-shutdown.js +61 -0
  10. package/dist/bootstrap/index.d.ts +13 -0
  11. package/dist/bootstrap/index.d.ts.map +1 -0
  12. package/dist/bootstrap/index.js +6 -0
  13. package/dist/bootstrap/inspect.d.ts +74 -0
  14. package/dist/bootstrap/inspect.d.ts.map +1 -0
  15. package/dist/bootstrap/inspect.js +111 -0
  16. package/dist/bootstrap/plugin-loader.d.ts +50 -0
  17. package/dist/bootstrap/plugin-loader.d.ts.map +1 -0
  18. package/dist/bootstrap/plugin-loader.js +119 -0
  19. package/dist/bootstrap/runtime-app-module.d.ts +38 -0
  20. package/dist/bootstrap/runtime-app-module.d.ts.map +1 -0
  21. package/dist/bootstrap/runtime-app-module.js +114 -0
  22. package/dist/bootstrap/schema-composer.d.ts +46 -0
  23. package/dist/bootstrap/schema-composer.d.ts.map +1 -0
  24. package/dist/bootstrap/schema-composer.js +65 -0
  25. package/dist/config/base-env-config.d.ts +31 -0
  26. package/dist/config/base-env-config.d.ts.map +1 -0
  27. package/dist/config/base-env-config.js +70 -0
  28. package/dist/config/base-env-schema.d.ts +77 -0
  29. package/dist/config/base-env-schema.d.ts.map +1 -0
  30. package/dist/config/base-env-schema.js +102 -0
  31. package/dist/events/scoped-emitter.d.ts +33 -0
  32. package/dist/events/scoped-emitter.d.ts.map +1 -0
  33. package/dist/events/scoped-emitter.js +32 -0
  34. package/dist/graph/index.d.ts +8 -0
  35. package/dist/graph/index.d.ts.map +1 -0
  36. package/dist/graph/index.js +6 -0
  37. package/dist/graph/main-agent-types.d.ts +88 -0
  38. package/dist/graph/main-agent-types.d.ts.map +1 -0
  39. package/dist/graph/main-agent-types.js +20 -0
  40. package/dist/graph/main-agent.d.ts +16 -0
  41. package/dist/graph/main-agent.d.ts.map +1 -0
  42. package/dist/graph/main-agent.js +251 -0
  43. package/dist/graph/middlewares/capability-gate-middleware.d.ts +35 -0
  44. package/dist/graph/middlewares/capability-gate-middleware.d.ts.map +1 -0
  45. package/dist/graph/middlewares/capability-gate-middleware.js +54 -0
  46. package/dist/graph/middlewares/index.d.ts +7 -0
  47. package/dist/graph/middlewares/index.d.ts.map +1 -0
  48. package/dist/graph/middlewares/index.js +6 -0
  49. package/dist/graph/middlewares/page-context-middleware.d.ts +23 -0
  50. package/dist/graph/middlewares/page-context-middleware.d.ts.map +1 -0
  51. package/dist/graph/middlewares/page-context-middleware.js +68 -0
  52. package/dist/graph/middlewares/safety-guardrail-middleware.d.ts +26 -0
  53. package/dist/graph/middlewares/safety-guardrail-middleware.d.ts.map +1 -0
  54. package/dist/graph/middlewares/safety-guardrail-middleware.js +88 -0
  55. package/dist/graph/middlewares/summarization-middleware.d.ts +17 -0
  56. package/dist/graph/middlewares/summarization-middleware.d.ts.map +1 -0
  57. package/dist/graph/middlewares/summarization-middleware.js +62 -0
  58. package/dist/graph/middlewares/tool-repetition-guard-middleware.d.ts +24 -0
  59. package/dist/graph/middlewares/tool-repetition-guard-middleware.d.ts.map +1 -0
  60. package/dist/graph/middlewares/tool-repetition-guard-middleware.js +112 -0
  61. package/dist/graph/middlewares/tool-validation-middleware.d.ts +24 -0
  62. package/dist/graph/middlewares/tool-validation-middleware.d.ts.map +1 -0
  63. package/dist/graph/middlewares/tool-validation-middleware.js +61 -0
  64. package/dist/graph/prompt-composer.d.ts +69 -0
  65. package/dist/graph/prompt-composer.d.ts.map +1 -0
  66. package/dist/graph/prompt-composer.js +315 -0
  67. package/dist/graph/state.d.ts +65 -0
  68. package/dist/graph/state.d.ts.map +1 -0
  69. package/dist/graph/state.js +60 -0
  70. package/dist/graph/sub-agent-fallback.d.ts +56 -0
  71. package/dist/graph/sub-agent-fallback.d.ts.map +1 -0
  72. package/dist/graph/sub-agent-fallback.js +79 -0
  73. package/dist/graph/subagent-as-tool.d.ts +77 -0
  74. package/dist/graph/subagent-as-tool.d.ts.map +1 -0
  75. package/dist/graph/subagent-as-tool.js +197 -0
  76. package/dist/graph/wrap-plugin-tool.d.ts +28 -0
  77. package/dist/graph/wrap-plugin-tool.d.ts.map +1 -0
  78. package/dist/graph/wrap-plugin-tool.js +30 -0
  79. package/dist/index.d.ts +33 -0
  80. package/dist/index.d.ts.map +1 -0
  81. package/dist/index.js +28 -0
  82. package/dist/llm/index.d.ts +2 -0
  83. package/dist/llm/index.d.ts.map +1 -0
  84. package/dist/llm/index.js +1 -0
  85. package/dist/llm/llm-provider.d.ts +41 -0
  86. package/dist/llm/llm-provider.d.ts.map +1 -0
  87. package/dist/llm/llm-provider.js +130 -0
  88. package/dist/manifest/index.d.ts +6 -0
  89. package/dist/manifest/index.d.ts.map +1 -0
  90. package/dist/manifest/index.js +3 -0
  91. package/dist/manifest/schema.d.ts +31 -0
  92. package/dist/manifest/schema.d.ts.map +1 -0
  93. package/dist/manifest/schema.js +44 -0
  94. package/dist/manifest/tier1-renderer.d.ts +31 -0
  95. package/dist/manifest/tier1-renderer.d.ts.map +1 -0
  96. package/dist/manifest/tier1-renderer.js +68 -0
  97. package/dist/manifest/validator.d.ts +34 -0
  98. package/dist/manifest/validator.d.ts.map +1 -0
  99. package/dist/manifest/validator.js +111 -0
  100. package/dist/matrix/checkpointer/matrix-upload-utils.d.ts +66 -0
  101. package/dist/matrix/checkpointer/matrix-upload-utils.d.ts.map +1 -0
  102. package/dist/matrix/checkpointer/matrix-upload-utils.js +228 -0
  103. package/dist/matrix/checkpointer/type.d.ts +4 -0
  104. package/dist/matrix/checkpointer/type.d.ts.map +1 -0
  105. package/dist/matrix/checkpointer/type.js +1 -0
  106. package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.module.d.ts +3 -0
  107. package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.module.d.ts.map +1 -0
  108. package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.module.js +22 -0
  109. package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.service.d.ts +93 -0
  110. package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.service.d.ts.map +1 -0
  111. package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.service.js +856 -0
  112. package/dist/matrix/room-membership.d.ts +11 -0
  113. package/dist/matrix/room-membership.d.ts.map +1 -0
  114. package/dist/matrix/room-membership.js +33 -0
  115. package/dist/meta-tools/index.d.ts +28 -0
  116. package/dist/meta-tools/index.d.ts.map +1 -0
  117. package/dist/meta-tools/index.js +24 -0
  118. package/dist/meta-tools/list-capabilities.d.ts +12 -0
  119. package/dist/meta-tools/list-capabilities.d.ts.map +1 -0
  120. package/dist/meta-tools/list-capabilities.js +55 -0
  121. package/dist/meta-tools/load-capability.d.ts +24 -0
  122. package/dist/meta-tools/load-capability.d.ts.map +1 -0
  123. package/dist/meta-tools/load-capability.js +82 -0
  124. package/dist/modules/auth/auth-header.middleware.d.ts +37 -0
  125. package/dist/modules/auth/auth-header.middleware.d.ts.map +1 -0
  126. package/dist/modules/auth/auth-header.middleware.js +115 -0
  127. package/dist/modules/auth/auth.module.d.ts +9 -0
  128. package/dist/modules/auth/auth.module.d.ts.map +1 -0
  129. package/dist/modules/auth/auth.module.js +27 -0
  130. package/dist/modules/auth/index.d.ts +3 -0
  131. package/dist/modules/auth/index.d.ts.map +1 -0
  132. package/dist/modules/auth/index.js +2 -0
  133. package/dist/modules/auth/validate-ucan-delegation.d.ts +31 -0
  134. package/dist/modules/auth/validate-ucan-delegation.d.ts.map +1 -0
  135. package/dist/modules/auth/validate-ucan-delegation.js +36 -0
  136. package/dist/modules/blob-store/blob-store.module.d.ts +10 -0
  137. package/dist/modules/blob-store/blob-store.module.d.ts.map +1 -0
  138. package/dist/modules/blob-store/blob-store.module.js +25 -0
  139. package/dist/modules/blob-store/blob-store.service.d.ts +66 -0
  140. package/dist/modules/blob-store/blob-store.service.d.ts.map +1 -0
  141. package/dist/modules/blob-store/blob-store.service.js +108 -0
  142. package/dist/modules/blob-store/index.d.ts +3 -0
  143. package/dist/modules/blob-store/index.d.ts.map +1 -0
  144. package/dist/modules/blob-store/index.js +2 -0
  145. package/dist/modules/health/health.controller.d.ts +18 -0
  146. package/dist/modules/health/health.controller.d.ts.map +1 -0
  147. package/dist/modules/health/health.controller.js +48 -0
  148. package/dist/modules/health/health.module.d.ts +8 -0
  149. package/dist/modules/health/health.module.d.ts.map +1 -0
  150. package/dist/modules/health/health.module.js +21 -0
  151. package/dist/modules/index.d.ts +8 -0
  152. package/dist/modules/index.d.ts.map +1 -0
  153. package/dist/modules/index.js +6 -0
  154. package/dist/modules/messages/__test-fixtures__/deps.d.ts +41 -0
  155. package/dist/modules/messages/__test-fixtures__/deps.d.ts.map +1 -0
  156. package/dist/modules/messages/__test-fixtures__/deps.js +73 -0
  157. package/dist/modules/messages/__test-fixtures__/fake-agent.d.ts +27 -0
  158. package/dist/modules/messages/__test-fixtures__/fake-agent.d.ts.map +1 -0
  159. package/dist/modules/messages/__test-fixtures__/fake-agent.js +41 -0
  160. package/dist/modules/messages/__test-fixtures__/fake-response.d.ts +29 -0
  161. package/dist/modules/messages/__test-fixtures__/fake-response.d.ts.map +1 -0
  162. package/dist/modules/messages/__test-fixtures__/fake-response.js +55 -0
  163. package/dist/modules/messages/agent-builder.d.ts +64 -0
  164. package/dist/modules/messages/agent-builder.d.ts.map +1 -0
  165. package/dist/modules/messages/agent-builder.js +219 -0
  166. package/dist/modules/messages/batch-invoker.d.ts +36 -0
  167. package/dist/modules/messages/batch-invoker.d.ts.map +1 -0
  168. package/dist/modules/messages/batch-invoker.js +58 -0
  169. package/dist/modules/messages/dto/list-messages.dto.d.ts +4 -0
  170. package/dist/modules/messages/dto/list-messages.dto.d.ts.map +1 -0
  171. package/dist/modules/messages/dto/list-messages.dto.js +17 -0
  172. package/dist/modules/messages/dto/send-message.dto.d.ts +73 -0
  173. package/dist/modules/messages/dto/send-message.dto.d.ts.map +1 -0
  174. package/dist/modules/messages/dto/send-message.dto.js +318 -0
  175. package/dist/modules/messages/file-processing-credit-sink.port.d.ts +20 -0
  176. package/dist/modules/messages/file-processing-credit-sink.port.d.ts.map +1 -0
  177. package/dist/modules/messages/file-processing-credit-sink.port.js +1 -0
  178. package/dist/modules/messages/file-processing.service.d.ts +195 -0
  179. package/dist/modules/messages/file-processing.service.d.ts.map +1 -0
  180. package/dist/modules/messages/file-processing.service.js +1278 -0
  181. package/dist/modules/messages/homeserver-cache.d.ts +11 -0
  182. package/dist/modules/messages/homeserver-cache.d.ts.map +1 -0
  183. package/dist/modules/messages/homeserver-cache.js +31 -0
  184. package/dist/modules/messages/matrix-listener-bridge.d.ts +63 -0
  185. package/dist/modules/messages/matrix-listener-bridge.d.ts.map +1 -0
  186. package/dist/modules/messages/matrix-listener-bridge.js +280 -0
  187. package/dist/modules/messages/messages.controller.d.ts +13 -0
  188. package/dist/modules/messages/messages.controller.d.ts.map +1 -0
  189. package/dist/modules/messages/messages.controller.js +95 -0
  190. package/dist/modules/messages/messages.module.d.ts +3 -0
  191. package/dist/modules/messages/messages.module.d.ts.map +1 -0
  192. package/dist/modules/messages/messages.module.js +75 -0
  193. package/dist/modules/messages/messages.service.d.ts +112 -0
  194. package/dist/modules/messages/messages.service.d.ts.map +1 -0
  195. package/dist/modules/messages/messages.service.js +279 -0
  196. package/dist/modules/messages/oracle-runtime-bundle.d.ts +38 -0
  197. package/dist/modules/messages/oracle-runtime-bundle.d.ts.map +1 -0
  198. package/dist/modules/messages/oracle-runtime-bundle.js +40 -0
  199. package/dist/modules/messages/post-message-syncer.d.ts +30 -0
  200. package/dist/modules/messages/post-message-syncer.d.ts.map +1 -0
  201. package/dist/modules/messages/post-message-syncer.js +73 -0
  202. package/dist/modules/messages/request-preparer.d.ts +53 -0
  203. package/dist/modules/messages/request-preparer.d.ts.map +1 -0
  204. package/dist/modules/messages/request-preparer.js +139 -0
  205. package/dist/modules/messages/sse-stream-runner.d.ts +73 -0
  206. package/dist/modules/messages/sse-stream-runner.d.ts.map +1 -0
  207. package/dist/modules/messages/sse-stream-runner.js +352 -0
  208. package/dist/modules/messages/sse.utils.d.ts +29 -0
  209. package/dist/modules/messages/sse.utils.d.ts.map +1 -0
  210. package/dist/modules/messages/sse.utils.js +77 -0
  211. package/dist/modules/messages/user-context-fetcher.d.ts +41 -0
  212. package/dist/modules/messages/user-context-fetcher.d.ts.map +1 -0
  213. package/dist/modules/messages/user-context-fetcher.js +117 -0
  214. package/dist/modules/secrets/index.d.ts +2 -0
  215. package/dist/modules/secrets/index.d.ts.map +1 -0
  216. package/dist/modules/secrets/index.js +1 -0
  217. package/dist/modules/secrets/secrets.service.d.ts +29 -0
  218. package/dist/modules/secrets/secrets.service.d.ts.map +1 -0
  219. package/dist/modules/secrets/secrets.service.js +107 -0
  220. package/dist/modules/sessions/dto/create-session.dto.d.ts +6 -0
  221. package/dist/modules/sessions/dto/create-session.dto.d.ts.map +1 -0
  222. package/dist/modules/sessions/dto/create-session.dto.js +5 -0
  223. package/dist/modules/sessions/dto/delete-session.dto.d.ts +6 -0
  224. package/dist/modules/sessions/dto/delete-session.dto.d.ts.map +1 -0
  225. package/dist/modules/sessions/dto/delete-session.dto.js +5 -0
  226. package/dist/modules/sessions/dto/list-sessions.dto.d.ts +7 -0
  227. package/dist/modules/sessions/dto/list-sessions.dto.d.ts.map +1 -0
  228. package/dist/modules/sessions/dto/list-sessions.dto.js +6 -0
  229. package/dist/modules/sessions/session-history-processor.service.d.ts +48 -0
  230. package/dist/modules/sessions/session-history-processor.service.d.ts.map +1 -0
  231. package/dist/modules/sessions/session-history-processor.service.js +254 -0
  232. package/dist/modules/sessions/sessions.controller.d.ts +13 -0
  233. package/dist/modules/sessions/sessions.controller.d.ts.map +1 -0
  234. package/dist/modules/sessions/sessions.controller.js +113 -0
  235. package/dist/modules/sessions/sessions.module.d.ts +3 -0
  236. package/dist/modules/sessions/sessions.module.d.ts.map +1 -0
  237. package/dist/modules/sessions/sessions.module.js +49 -0
  238. package/dist/modules/sessions/sessions.service.d.ts +23 -0
  239. package/dist/modules/sessions/sessions.service.d.ts.map +1 -0
  240. package/dist/modules/sessions/sessions.service.js +168 -0
  241. package/dist/modules/subscription/subscription.middleware.d.ts +37 -0
  242. package/dist/modules/subscription/subscription.middleware.d.ts.map +1 -0
  243. package/dist/modules/subscription/subscription.middleware.js +141 -0
  244. package/dist/modules/subscription/subscription.module.d.ts +12 -0
  245. package/dist/modules/subscription/subscription.module.d.ts.map +1 -0
  246. package/dist/modules/subscription/subscription.module.js +26 -0
  247. package/dist/modules/throttler/throttler.module.d.ts +11 -0
  248. package/dist/modules/throttler/throttler.module.d.ts.map +1 -0
  249. package/dist/modules/throttler/throttler.module.js +32 -0
  250. package/dist/modules/ucan/index.d.ts +7 -0
  251. package/dist/modules/ucan/index.d.ts.map +1 -0
  252. package/dist/modules/ucan/index.js +6 -0
  253. package/dist/modules/ucan/ucan.config.d.ts +87 -0
  254. package/dist/modules/ucan/ucan.config.d.ts.map +1 -0
  255. package/dist/modules/ucan/ucan.config.js +114 -0
  256. package/dist/modules/ucan/ucan.module.d.ts +29 -0
  257. package/dist/modules/ucan/ucan.module.d.ts.map +1 -0
  258. package/dist/modules/ucan/ucan.module.js +46 -0
  259. package/dist/modules/ucan/ucan.service.d.ts +129 -0
  260. package/dist/modules/ucan/ucan.service.d.ts.map +1 -0
  261. package/dist/modules/ucan/ucan.service.js +582 -0
  262. package/dist/modules/ws/emitter.d.ts +12 -0
  263. package/dist/modules/ws/emitter.d.ts.map +1 -0
  264. package/dist/modules/ws/emitter.js +12 -0
  265. package/dist/modules/ws/ws.gateway.d.ts +34 -0
  266. package/dist/modules/ws/ws.gateway.d.ts.map +1 -0
  267. package/dist/modules/ws/ws.gateway.js +241 -0
  268. package/dist/modules/ws/ws.module.d.ts +3 -0
  269. package/dist/modules/ws/ws.module.d.ts.map +1 -0
  270. package/dist/modules/ws/ws.module.js +21 -0
  271. package/dist/modules/ws/ws.service.d.ts +25 -0
  272. package/dist/modules/ws/ws.service.d.ts.map +1 -0
  273. package/dist/modules/ws/ws.service.js +113 -0
  274. package/dist/plugin-api/define-plugin.d.ts +19 -0
  275. package/dist/plugin-api/define-plugin.d.ts.map +1 -0
  276. package/dist/plugin-api/define-plugin.js +25 -0
  277. package/dist/plugin-api/oracle-plugin.d.ts +92 -0
  278. package/dist/plugin-api/oracle-plugin.d.ts.map +1 -0
  279. package/dist/plugin-api/oracle-plugin.js +15 -0
  280. package/dist/plugin-api/tool-helper.d.ts +33 -0
  281. package/dist/plugin-api/tool-helper.d.ts.map +1 -0
  282. package/dist/plugin-api/tool-helper.js +40 -0
  283. package/dist/plugin-api/types.d.ts +378 -0
  284. package/dist/plugin-api/types.d.ts.map +1 -0
  285. package/dist/plugin-api/types.js +1 -0
  286. package/dist/plugins/agui/agui-agent.d.ts +10 -0
  287. package/dist/plugins/agui/agui-agent.d.ts.map +1 -0
  288. package/dist/plugins/agui/agui-agent.js +110 -0
  289. package/dist/plugins/agui/agui.plugin.d.ts +16 -0
  290. package/dist/plugins/agui/agui.plugin.d.ts.map +1 -0
  291. package/dist/plugins/agui/agui.plugin.js +117 -0
  292. package/dist/plugins/agui/index.d.ts +3 -0
  293. package/dist/plugins/agui/index.d.ts.map +1 -0
  294. package/dist/plugins/agui/index.js +2 -0
  295. package/dist/plugins/composio/composio-tools.d.ts +59 -0
  296. package/dist/plugins/composio/composio-tools.d.ts.map +1 -0
  297. package/dist/plugins/composio/composio-tools.js +88 -0
  298. package/dist/plugins/composio/composio-ucan.d.ts +14 -0
  299. package/dist/plugins/composio/composio-ucan.d.ts.map +1 -0
  300. package/dist/plugins/composio/composio-ucan.js +32 -0
  301. package/dist/plugins/composio/composio.plugin.d.ts +45 -0
  302. package/dist/plugins/composio/composio.plugin.d.ts.map +1 -0
  303. package/dist/plugins/composio/composio.plugin.js +116 -0
  304. package/dist/plugins/composio/index.d.ts +4 -0
  305. package/dist/plugins/composio/index.d.ts.map +1 -0
  306. package/dist/plugins/composio/index.js +3 -0
  307. package/dist/plugins/credits/claim-processing.module.d.ts +28 -0
  308. package/dist/plugins/credits/claim-processing.module.d.ts.map +1 -0
  309. package/dist/plugins/credits/claim-processing.module.js +37 -0
  310. package/dist/plugins/credits/claim-processing.service.d.ts +92 -0
  311. package/dist/plugins/credits/claim-processing.service.d.ts.map +1 -0
  312. package/dist/plugins/credits/claim-processing.service.js +406 -0
  313. package/dist/plugins/credits/credits-middleware.d.ts +23 -0
  314. package/dist/plugins/credits/credits-middleware.d.ts.map +1 -0
  315. package/dist/plugins/credits/credits-middleware.js +154 -0
  316. package/dist/plugins/credits/credits.plugin.d.ts +55 -0
  317. package/dist/plugins/credits/credits.plugin.d.ts.map +1 -0
  318. package/dist/plugins/credits/credits.plugin.js +95 -0
  319. package/dist/plugins/credits/file-processing-sink.module.d.ts +18 -0
  320. package/dist/plugins/credits/file-processing-sink.module.d.ts.map +1 -0
  321. package/dist/plugins/credits/file-processing-sink.module.js +56 -0
  322. package/dist/plugins/credits/index.d.ts +8 -0
  323. package/dist/plugins/credits/index.d.ts.map +1 -0
  324. package/dist/plugins/credits/index.js +7 -0
  325. package/dist/plugins/credits/subscription-sink.module.d.ts +23 -0
  326. package/dist/plugins/credits/subscription-sink.module.d.ts.map +1 -0
  327. package/dist/plugins/credits/subscription-sink.module.js +54 -0
  328. package/dist/plugins/credits/token-limiter.d.ts +139 -0
  329. package/dist/plugins/credits/token-limiter.d.ts.map +1 -0
  330. package/dist/plugins/credits/token-limiter.js +302 -0
  331. package/dist/plugins/domain-indexer/domain-indexer-agent.d.ts +7 -0
  332. package/dist/plugins/domain-indexer/domain-indexer-agent.d.ts.map +1 -0
  333. package/dist/plugins/domain-indexer/domain-indexer-agent.js +48 -0
  334. package/dist/plugins/domain-indexer/domain-indexer-tools.d.ts +8 -0
  335. package/dist/plugins/domain-indexer/domain-indexer-tools.d.ts.map +1 -0
  336. package/dist/plugins/domain-indexer/domain-indexer-tools.js +194 -0
  337. package/dist/plugins/domain-indexer/domain-indexer.plugin.d.ts +20 -0
  338. package/dist/plugins/domain-indexer/domain-indexer.plugin.d.ts.map +1 -0
  339. package/dist/plugins/domain-indexer/domain-indexer.plugin.js +78 -0
  340. package/dist/plugins/domain-indexer/index.d.ts +2 -0
  341. package/dist/plugins/domain-indexer/index.d.ts.map +1 -0
  342. package/dist/plugins/domain-indexer/index.js +1 -0
  343. package/dist/plugins/editor/apply-sandbox-output.d.ts +33 -0
  344. package/dist/plugins/editor/apply-sandbox-output.d.ts.map +1 -0
  345. package/dist/plugins/editor/apply-sandbox-output.js +302 -0
  346. package/dist/plugins/editor/block-actions.d.ts +84 -0
  347. package/dist/plugins/editor/block-actions.d.ts.map +1 -0
  348. package/dist/plugins/editor/block-actions.js +471 -0
  349. package/dist/plugins/editor/blocknote-helper.d.ts +147 -0
  350. package/dist/plugins/editor/blocknote-helper.d.ts.map +1 -0
  351. package/dist/plugins/editor/blocknote-helper.js +542 -0
  352. package/dist/plugins/editor/blocknote-tools.d.ts +364 -0
  353. package/dist/plugins/editor/blocknote-tools.d.ts.map +1 -0
  354. package/dist/plugins/editor/blocknote-tools.js +2123 -0
  355. package/dist/plugins/editor/editor-agent.d.ts +47 -0
  356. package/dist/plugins/editor/editor-agent.d.ts.map +1 -0
  357. package/dist/plugins/editor/editor-agent.js +158 -0
  358. package/dist/plugins/editor/editor-mx.d.ts +56 -0
  359. package/dist/plugins/editor/editor-mx.d.ts.map +1 -0
  360. package/dist/plugins/editor/editor-mx.js +100 -0
  361. package/dist/plugins/editor/editor.plugin.d.ts +32 -0
  362. package/dist/plugins/editor/editor.plugin.d.ts.map +1 -0
  363. package/dist/plugins/editor/editor.plugin.js +189 -0
  364. package/dist/plugins/editor/index.d.ts +6 -0
  365. package/dist/plugins/editor/index.d.ts.map +1 -0
  366. package/dist/plugins/editor/index.js +5 -0
  367. package/dist/plugins/editor/mint-invocation-tool.d.ts +72 -0
  368. package/dist/plugins/editor/mint-invocation-tool.d.ts.map +1 -0
  369. package/dist/plugins/editor/mint-invocation-tool.js +173 -0
  370. package/dist/plugins/editor/page-functions.d.ts +100 -0
  371. package/dist/plugins/editor/page-functions.d.ts.map +1 -0
  372. package/dist/plugins/editor/page-functions.js +317 -0
  373. package/dist/plugins/editor/page-tools.d.ts +75 -0
  374. package/dist/plugins/editor/page-tools.d.ts.map +1 -0
  375. package/dist/plugins/editor/page-tools.js +238 -0
  376. package/dist/plugins/editor/prompts.d.ts +22 -0
  377. package/dist/plugins/editor/prompts.d.ts.map +1 -0
  378. package/dist/plugins/editor/prompts.js +451 -0
  379. package/dist/plugins/editor/provider.d.ts +101 -0
  380. package/dist/plugins/editor/provider.d.ts.map +1 -0
  381. package/dist/plugins/editor/provider.js +249 -0
  382. package/dist/plugins/editor/standalone-editor-tool.d.ts +17 -0
  383. package/dist/plugins/editor/standalone-editor-tool.d.ts.map +1 -0
  384. package/dist/plugins/editor/standalone-editor-tool.js +136 -0
  385. package/dist/plugins/editor/survey-helpers.d.ts +112 -0
  386. package/dist/plugins/editor/survey-helpers.d.ts.map +1 -0
  387. package/dist/plugins/editor/survey-helpers.js +358 -0
  388. package/dist/plugins/firecrawl/firecrawl-agent.d.ts +7 -0
  389. package/dist/plugins/firecrawl/firecrawl-agent.d.ts.map +1 -0
  390. package/dist/plugins/firecrawl/firecrawl-agent.js +84 -0
  391. package/dist/plugins/firecrawl/firecrawl-tools.d.ts +37 -0
  392. package/dist/plugins/firecrawl/firecrawl-tools.d.ts.map +1 -0
  393. package/dist/plugins/firecrawl/firecrawl-tools.js +129 -0
  394. package/dist/plugins/firecrawl/firecrawl.plugin.d.ts +32 -0
  395. package/dist/plugins/firecrawl/firecrawl.plugin.d.ts.map +1 -0
  396. package/dist/plugins/firecrawl/firecrawl.plugin.js +69 -0
  397. package/dist/plugins/firecrawl/index.d.ts +3 -0
  398. package/dist/plugins/firecrawl/index.d.ts.map +1 -0
  399. package/dist/plugins/firecrawl/index.js +2 -0
  400. package/dist/plugins/index.d.ts +47 -0
  401. package/dist/plugins/index.d.ts.map +1 -0
  402. package/dist/plugins/index.js +69 -0
  403. package/dist/plugins/matrix-group-chats/channel-memory.module.d.ts +7 -0
  404. package/dist/plugins/matrix-group-chats/channel-memory.module.d.ts.map +1 -0
  405. package/dist/plugins/matrix-group-chats/channel-memory.module.js +22 -0
  406. package/dist/plugins/matrix-group-chats/channel-memory.repo.d.ts +62 -0
  407. package/dist/plugins/matrix-group-chats/channel-memory.repo.d.ts.map +1 -0
  408. package/dist/plugins/matrix-group-chats/channel-memory.repo.js +311 -0
  409. package/dist/plugins/matrix-group-chats/channel-memory.service.d.ts +89 -0
  410. package/dist/plugins/matrix-group-chats/channel-memory.service.d.ts.map +1 -0
  411. package/dist/plugins/matrix-group-chats/channel-memory.service.js +565 -0
  412. package/dist/plugins/matrix-group-chats/channel-memory.summarizer.d.ts +18 -0
  413. package/dist/plugins/matrix-group-chats/channel-memory.summarizer.d.ts.map +1 -0
  414. package/dist/plugins/matrix-group-chats/channel-memory.summarizer.js +128 -0
  415. package/dist/plugins/matrix-group-chats/channel-memory.types.d.ts +50 -0
  416. package/dist/plugins/matrix-group-chats/channel-memory.types.d.ts.map +1 -0
  417. package/dist/plugins/matrix-group-chats/channel-memory.types.js +2 -0
  418. package/dist/plugins/matrix-group-chats/guard.d.ts +83 -0
  419. package/dist/plugins/matrix-group-chats/guard.d.ts.map +1 -0
  420. package/dist/plugins/matrix-group-chats/guard.js +138 -0
  421. package/dist/plugins/matrix-group-chats/index.d.ts +59 -0
  422. package/dist/plugins/matrix-group-chats/index.d.ts.map +1 -0
  423. package/dist/plugins/matrix-group-chats/index.js +140 -0
  424. package/dist/plugins/matrix-group-chats/middleware.d.ts +31 -0
  425. package/dist/plugins/matrix-group-chats/middleware.d.ts.map +1 -0
  426. package/dist/plugins/matrix-group-chats/middleware.js +186 -0
  427. package/dist/plugins/matrix-group-chats/power-levels.d.ts +15 -0
  428. package/dist/plugins/matrix-group-chats/power-levels.d.ts.map +1 -0
  429. package/dist/plugins/matrix-group-chats/power-levels.js +36 -0
  430. package/dist/plugins/matrix-group-chats/room-info.d.ts +23 -0
  431. package/dist/plugins/matrix-group-chats/room-info.d.ts.map +1 -0
  432. package/dist/plugins/matrix-group-chats/room-info.js +34 -0
  433. package/dist/plugins/matrix-group-chats/tools.d.ts +8 -0
  434. package/dist/plugins/matrix-group-chats/tools.d.ts.map +1 -0
  435. package/dist/plugins/matrix-group-chats/tools.js +154 -0
  436. package/dist/plugins/memory/index.d.ts +5 -0
  437. package/dist/plugins/memory/index.d.ts.map +1 -0
  438. package/dist/plugins/memory/index.js +3 -0
  439. package/dist/plugins/memory/memory-tools.d.ts +52 -0
  440. package/dist/plugins/memory/memory-tools.d.ts.map +1 -0
  441. package/dist/plugins/memory/memory-tools.js +88 -0
  442. package/dist/plugins/memory/memory-ucan.d.ts +17 -0
  443. package/dist/plugins/memory/memory-ucan.d.ts.map +1 -0
  444. package/dist/plugins/memory/memory-ucan.js +43 -0
  445. package/dist/plugins/memory/memory.plugin.d.ts +51 -0
  446. package/dist/plugins/memory/memory.plugin.d.ts.map +1 -0
  447. package/dist/plugins/memory/memory.plugin.js +76 -0
  448. package/dist/plugins/memory/types.d.ts +75 -0
  449. package/dist/plugins/memory/types.d.ts.map +1 -0
  450. package/dist/plugins/memory/types.js +2 -0
  451. package/dist/plugins/portal/index.d.ts +3 -0
  452. package/dist/plugins/portal/index.d.ts.map +1 -0
  453. package/dist/plugins/portal/index.js +2 -0
  454. package/dist/plugins/portal/portal-agent.d.ts +9 -0
  455. package/dist/plugins/portal/portal-agent.d.ts.map +1 -0
  456. package/dist/plugins/portal/portal-agent.js +70 -0
  457. package/dist/plugins/portal/portal.plugin.d.ts +16 -0
  458. package/dist/plugins/portal/portal.plugin.d.ts.map +1 -0
  459. package/dist/plugins/portal/portal.plugin.js +115 -0
  460. package/dist/plugins/sandbox/index.d.ts +3 -0
  461. package/dist/plugins/sandbox/index.d.ts.map +1 -0
  462. package/dist/plugins/sandbox/index.js +2 -0
  463. package/dist/plugins/sandbox/sandbox-mcp.d.ts +46 -0
  464. package/dist/plugins/sandbox/sandbox-mcp.d.ts.map +1 -0
  465. package/dist/plugins/sandbox/sandbox-mcp.js +80 -0
  466. package/dist/plugins/sandbox/sandbox-write-blob.d.ts +22 -0
  467. package/dist/plugins/sandbox/sandbox-write-blob.d.ts.map +1 -0
  468. package/dist/plugins/sandbox/sandbox-write-blob.js +80 -0
  469. package/dist/plugins/sandbox/sandbox.plugin.d.ts +80 -0
  470. package/dist/plugins/sandbox/sandbox.plugin.d.ts.map +1 -0
  471. package/dist/plugins/sandbox/sandbox.plugin.js +204 -0
  472. package/dist/plugins/skills/index.d.ts +3 -0
  473. package/dist/plugins/skills/index.d.ts.map +1 -0
  474. package/dist/plugins/skills/index.js +2 -0
  475. package/dist/plugins/skills/skills-tools.d.ts +20 -0
  476. package/dist/plugins/skills/skills-tools.d.ts.map +1 -0
  477. package/dist/plugins/skills/skills-tools.js +204 -0
  478. package/dist/plugins/skills/skills-ucan.d.ts +24 -0
  479. package/dist/plugins/skills/skills-ucan.d.ts.map +1 -0
  480. package/dist/plugins/skills/skills-ucan.js +28 -0
  481. package/dist/plugins/skills/skills.plugin.d.ts +37 -0
  482. package/dist/plugins/skills/skills.plugin.d.ts.map +1 -0
  483. package/dist/plugins/skills/skills.plugin.js +82 -0
  484. package/dist/plugins/slack/index.d.ts +4 -0
  485. package/dist/plugins/slack/index.d.ts.map +1 -0
  486. package/dist/plugins/slack/index.js +3 -0
  487. package/dist/plugins/slack/slack.module.d.ts +9 -0
  488. package/dist/plugins/slack/slack.module.d.ts.map +1 -0
  489. package/dist/plugins/slack/slack.module.js +27 -0
  490. package/dist/plugins/slack/slack.plugin.d.ts +30 -0
  491. package/dist/plugins/slack/slack.plugin.d.ts.map +1 -0
  492. package/dist/plugins/slack/slack.plugin.js +40 -0
  493. package/dist/plugins/slack/slack.service.d.ts +32 -0
  494. package/dist/plugins/slack/slack.service.d.ts.map +1 -0
  495. package/dist/plugins/slack/slack.service.js +157 -0
  496. package/dist/plugins/user-preferences/index.d.ts +4 -0
  497. package/dist/plugins/user-preferences/index.d.ts.map +1 -0
  498. package/dist/plugins/user-preferences/index.js +3 -0
  499. package/dist/plugins/user-preferences/service/user-preferences.service.d.ts +61 -0
  500. package/dist/plugins/user-preferences/service/user-preferences.service.d.ts.map +1 -0
  501. package/dist/plugins/user-preferences/service/user-preferences.service.js +105 -0
  502. package/dist/plugins/user-preferences/user-preferences-http.module.d.ts +10 -0
  503. package/dist/plugins/user-preferences/user-preferences-http.module.d.ts.map +1 -0
  504. package/dist/plugins/user-preferences/user-preferences-http.module.js +23 -0
  505. package/dist/plugins/user-preferences/user-preferences-tool.d.ts +22 -0
  506. package/dist/plugins/user-preferences/user-preferences-tool.d.ts.map +1 -0
  507. package/dist/plugins/user-preferences/user-preferences-tool.js +103 -0
  508. package/dist/plugins/user-preferences/user-preferences.controller.d.ts +18 -0
  509. package/dist/plugins/user-preferences/user-preferences.controller.d.ts.map +1 -0
  510. package/dist/plugins/user-preferences/user-preferences.controller.js +72 -0
  511. package/dist/plugins/user-preferences/user-preferences.plugin.d.ts +27 -0
  512. package/dist/plugins/user-preferences/user-preferences.plugin.d.ts.map +1 -0
  513. package/dist/plugins/user-preferences/user-preferences.plugin.js +66 -0
  514. package/dist/registries/config-schema-registry.d.ts +24 -0
  515. package/dist/registries/config-schema-registry.d.ts.map +1 -0
  516. package/dist/registries/config-schema-registry.js +27 -0
  517. package/dist/registries/index.d.ts +13 -0
  518. package/dist/registries/index.d.ts.map +1 -0
  519. package/dist/registries/index.js +6 -0
  520. package/dist/registries/manifest-registry.d.ts +49 -0
  521. package/dist/registries/manifest-registry.d.ts.map +1 -0
  522. package/dist/registries/manifest-registry.js +53 -0
  523. package/dist/registries/middleware-registry.d.ts +41 -0
  524. package/dist/registries/middleware-registry.d.ts.map +1 -0
  525. package/dist/registries/middleware-registry.js +52 -0
  526. package/dist/registries/shared-state-registry.d.ts +41 -0
  527. package/dist/registries/shared-state-registry.d.ts.map +1 -0
  528. package/dist/registries/shared-state-registry.js +65 -0
  529. package/dist/registries/subagent-registry.d.ts +55 -0
  530. package/dist/registries/subagent-registry.d.ts.map +1 -0
  531. package/dist/registries/subagent-registry.js +106 -0
  532. package/dist/registries/test-fixtures.d.ts +47 -0
  533. package/dist/registries/test-fixtures.d.ts.map +1 -0
  534. package/dist/registries/test-fixtures.js +168 -0
  535. package/dist/registries/tool-registry.d.ts +74 -0
  536. package/dist/registries/tool-registry.d.ts.map +1 -0
  537. package/dist/registries/tool-registry.js +130 -0
  538. package/dist/runtime-context/ambient.d.ts +118 -0
  539. package/dist/runtime-context/ambient.d.ts.map +1 -0
  540. package/dist/runtime-context/ambient.js +1 -0
  541. package/dist/runtime-context/build-plugin.d.ts +20 -0
  542. package/dist/runtime-context/build-plugin.d.ts.map +1 -0
  543. package/dist/runtime-context/build-plugin.js +16 -0
  544. package/dist/runtime-context/build-runtime.d.ts +60 -0
  545. package/dist/runtime-context/build-runtime.d.ts.map +1 -0
  546. package/dist/runtime-context/build-runtime.js +81 -0
  547. package/dist/testing/create-test-runtime.d.ts +95 -0
  548. package/dist/testing/create-test-runtime.d.ts.map +1 -0
  549. package/dist/testing/create-test-runtime.js +302 -0
  550. package/dist/testing/index.d.ts +5 -0
  551. package/dist/testing/index.d.ts.map +1 -0
  552. package/dist/testing/index.js +5 -0
  553. package/dist/testing/integration/chat-client.d.ts +143 -0
  554. package/dist/testing/integration/chat-client.d.ts.map +1 -0
  555. package/dist/testing/integration/chat-client.js +238 -0
  556. package/dist/testing/integration/harness.d.ts +189 -0
  557. package/dist/testing/integration/harness.d.ts.map +1 -0
  558. package/dist/testing/integration/harness.js +461 -0
  559. package/dist/testing/integration/index.d.ts +14 -0
  560. package/dist/testing/integration/index.d.ts.map +1 -0
  561. package/dist/testing/integration/index.js +18 -0
  562. package/dist/testing/integration/setup.d.ts +2 -0
  563. package/dist/testing/integration/setup.d.ts.map +1 -0
  564. package/dist/testing/integration/setup.js +41 -0
  565. package/dist/testing/integration/sse-parser.d.ts +99 -0
  566. package/dist/testing/integration/sse-parser.d.ts.map +1 -0
  567. package/dist/testing/integration/sse-parser.js +125 -0
  568. package/dist/testing/integration/ucan.d.ts +74 -0
  569. package/dist/testing/integration/ucan.d.ts.map +1 -0
  570. package/dist/testing/integration/ucan.js +95 -0
  571. package/dist/testing/integration/wait-for-matrix-loaded.d.ts +19 -0
  572. package/dist/testing/integration/wait-for-matrix-loaded.d.ts.map +1 -0
  573. package/dist/testing/integration/wait-for-matrix-loaded.js +31 -0
  574. package/dist/testing/mocks.d.ts +64 -0
  575. package/dist/testing/mocks.d.ts.map +1 -0
  576. package/dist/testing/mocks.js +141 -0
  577. package/dist/testing/nest-doubles.d.ts +10 -0
  578. package/dist/testing/nest-doubles.d.ts.map +1 -0
  579. package/dist/testing/nest-doubles.js +19 -0
  580. package/dist/utils/emoji.d.ts +3 -0
  581. package/dist/utils/emoji.d.ts.map +1 -0
  582. package/dist/utils/emoji.js +36 -0
  583. package/package.json +102 -0
@@ -0,0 +1,471 @@
1
+ import { Logger } from '@nestjs/common';
2
+ import { randomUUID } from 'node:crypto';
3
+ import * as Y from 'yjs';
4
+ const logger = {
5
+ ...Logger,
6
+ info: Logger.log,
7
+ };
8
+ export const PROPOSAL_STATUS_VALUES = [
9
+ 'draft',
10
+ 'open',
11
+ 'passed',
12
+ 'rejected',
13
+ 'executed',
14
+ 'closed',
15
+ 'execution_failed',
16
+ 'veto_timelock',
17
+ ];
18
+ const DEFAULT_FRAGMENT_NAME = 'document';
19
+ const DEFAULT_BLOCK_TYPE = 'paragraph';
20
+ const MUTATION_ORIGIN = 'blocknote-crdt-playground';
21
+ const randomId = () => randomUUID();
22
+ const setAnyAttribute = (element, key, value) => {
23
+ element.setAttribute(key, value);
24
+ };
25
+ const getAnyAttribute = (element, key) => {
26
+ return element.getAttribute(key);
27
+ };
28
+ const isPlainObject = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
29
+ const ensureRootGroup = (fragment) => {
30
+ const existingGroup = fragment
31
+ .toArray()
32
+ .find((node) => node instanceof Y.XmlElement && node.nodeName === 'blockGroup');
33
+ if (existingGroup) {
34
+ return existingGroup;
35
+ }
36
+ const blockGroup = new Y.XmlElement('blockGroup');
37
+ fragment.push([blockGroup]);
38
+ return blockGroup;
39
+ };
40
+ const createBlockStructure = (blockId, blockType, text, attributes) => {
41
+ const blockContainer = new Y.XmlElement('blockContainer');
42
+ blockContainer.setAttribute('id', blockId);
43
+ // BlockNote UI requires these attributes directly on blockContainer
44
+ blockContainer.setAttribute('textColor', 'default');
45
+ blockContainer.setAttribute('backgroundColor', 'default');
46
+ const mergedAttributes = {
47
+ id: blockId,
48
+ type: blockType,
49
+ ...attributes,
50
+ };
51
+ // Set attrs on parent blockContainer
52
+ setAnyAttribute(blockContainer, 'attrs', mergedAttributes);
53
+ const blockContent = new Y.XmlElement(blockType);
54
+ blockContent.setAttribute('id', `${blockId}:content`);
55
+ // Also set props on child element (matching edit behavior)
56
+ if (isPlainObject(attributes)) {
57
+ const props = attributes.props;
58
+ if (isPlainObject(props)) {
59
+ for (const [key, value] of Object.entries(props)) {
60
+ blockContent.setAttribute(key, value);
61
+ }
62
+ }
63
+ }
64
+ if (typeof text === 'string') {
65
+ const inlineText = new Y.XmlText();
66
+ inlineText.insert(0, text);
67
+ blockContent.push([inlineText]);
68
+ }
69
+ blockContainer.push([blockContent]);
70
+ return blockContainer;
71
+ };
72
+ const findBlockById = (container, blockId) => {
73
+ const nodes = container.toArray();
74
+ for (const node of nodes) {
75
+ if (!(node instanceof Y.XmlElement)) {
76
+ continue;
77
+ }
78
+ const candidateId = getAnyAttribute(node, 'id') ?? node.getAttribute('id');
79
+ if (candidateId === blockId) {
80
+ return node;
81
+ }
82
+ const nested = findBlockById(node, blockId);
83
+ if (nested) {
84
+ return nested;
85
+ }
86
+ }
87
+ return null;
88
+ };
89
+ const extractText = (element) => {
90
+ const parts = [];
91
+ const visit = (node) => {
92
+ if (node instanceof Y.XmlText) {
93
+ parts.push(node.toString());
94
+ return;
95
+ }
96
+ node.toArray().forEach((child) => {
97
+ if (child instanceof Y.XmlElement || child instanceof Y.XmlText) {
98
+ visit(child);
99
+ }
100
+ });
101
+ };
102
+ visit(element);
103
+ return parts.join('');
104
+ };
105
+ const snapshotBlock = (element) => {
106
+ const attrs = getAnyAttribute(element, 'attrs') ?? {};
107
+ const blockId = attrs.id ?? getAnyAttribute(element, 'id');
108
+ if (!blockId) {
109
+ throw new Error('Unable to derive block id from element');
110
+ }
111
+ const blockType = attrs.type ?? element.nodeName;
112
+ const textNode = element
113
+ .toArray()
114
+ .find((node) => node instanceof Y.XmlElement && node.nodeName !== 'blockGroup');
115
+ return {
116
+ id: blockId,
117
+ type: blockType,
118
+ text: textNode ? extractText(textNode) : '',
119
+ attributes: attrs,
120
+ };
121
+ };
122
+ const applyAttributeUpdates = (element, updates = {}, removals = []) => {
123
+ const existing = getAnyAttribute(element, 'attrs') ?? {};
124
+ const { props: propsUpdates, ...rest } = updates;
125
+ const next = { ...existing, ...rest };
126
+ if (isPlainObject(propsUpdates)) {
127
+ const existingProps = isPlainObject(existing.props) ? existing.props : {};
128
+ const mergedProps = { ...existingProps };
129
+ for (const [key, value] of Object.entries(propsUpdates)) {
130
+ // Auto-serialize: if existing value is a JSON string and new value is an object/array,
131
+ // merge (for objects) or replace (for arrays) and serialize back to JSON string
132
+ if (typeof existingProps[key] === 'string' &&
133
+ value !== null &&
134
+ typeof value === 'object') {
135
+ if (Array.isArray(value)) {
136
+ // Arrays (e.g. links): replace entirely
137
+ mergedProps[key] = JSON.stringify(value);
138
+ }
139
+ else {
140
+ // Objects (e.g. inputs): merge into existing JSON
141
+ let existingObj = {};
142
+ try {
143
+ const parsed = JSON.parse(String(existingProps[key]));
144
+ if (parsed &&
145
+ typeof parsed === 'object' &&
146
+ !Array.isArray(parsed)) {
147
+ existingObj = parsed;
148
+ }
149
+ }
150
+ catch {
151
+ // not valid JSON, treat as empty
152
+ }
153
+ mergedProps[key] = JSON.stringify({
154
+ ...existingObj,
155
+ ...value,
156
+ });
157
+ }
158
+ }
159
+ else {
160
+ mergedProps[key] = value;
161
+ }
162
+ }
163
+ next.props = mergedProps;
164
+ }
165
+ for (const key of removals) {
166
+ if (key.startsWith('props.')) {
167
+ const propKey = key.slice('props.'.length);
168
+ if (isPlainObject(next.props)) {
169
+ delete next.props[propKey];
170
+ }
171
+ continue;
172
+ }
173
+ delete next[key];
174
+ }
175
+ setAnyAttribute(element, 'attrs', next);
176
+ const nextId = next['id'];
177
+ if (typeof nextId === 'string') {
178
+ element.setAttribute('id', nextId);
179
+ }
180
+ // Also update the child element's direct attributes with props
181
+ const blockContent = element
182
+ .toArray()
183
+ .find((node) => node instanceof Y.XmlElement && node.nodeName !== 'blockGroup');
184
+ if (blockContent && isPlainObject(next.props)) {
185
+ // Mirror updated props to child element — use next.props (post-merge/serialization)
186
+ // so JSON-string props like inputs/links get the serialized value
187
+ const finalProps = next.props;
188
+ for (const key of Object.keys(propsUpdates)) {
189
+ const val = finalProps[key];
190
+ blockContent.setAttribute(key, typeof val === 'string' ? val : JSON.stringify(val));
191
+ }
192
+ }
193
+ // Handle removals on child element too
194
+ if (blockContent && removals.length > 0) {
195
+ for (const key of removals) {
196
+ if (key.startsWith('props.')) {
197
+ const propKey = key.slice('props.'.length);
198
+ blockContent.removeAttribute(propKey);
199
+ }
200
+ }
201
+ }
202
+ };
203
+ const applyTextUpdate = (element, text) => {
204
+ if (typeof text === 'undefined') {
205
+ return;
206
+ }
207
+ const blockContent = element
208
+ .toArray()
209
+ .find((node) => node instanceof Y.XmlElement && node.nodeName !== 'blockGroup');
210
+ if (!blockContent) {
211
+ // TODO: Adapt logic when working with complex blocks (tables, media, custom nodes).
212
+ if (text === null || text === '') {
213
+ return;
214
+ }
215
+ const contentNode = new Y.XmlElement(DEFAULT_BLOCK_TYPE);
216
+ const inlineText = new Y.XmlText();
217
+ inlineText.insert(0, text);
218
+ contentNode.push([inlineText]);
219
+ element.push([contentNode]);
220
+ return;
221
+ }
222
+ const textNode = blockContent
223
+ .toArray()
224
+ .find((child) => child instanceof Y.XmlText);
225
+ if (!textNode) {
226
+ if (text === null || text === '') {
227
+ return;
228
+ }
229
+ const inlineText = new Y.XmlText();
230
+ inlineText.insert(0, text);
231
+ blockContent.push([inlineText]);
232
+ return;
233
+ }
234
+ textNode.delete(0, textNode.length);
235
+ if (text && text.length > 0) {
236
+ textNode.insert(0, text);
237
+ }
238
+ };
239
+ /**
240
+ * Walks the Y.js tree to find a block's parent container and its index within it.
241
+ */
242
+ export const findParentOf = (container, blockId) => {
243
+ const nodes = container.toArray();
244
+ for (let i = 0; i < nodes.length; i++) {
245
+ const node = nodes[i];
246
+ if (!(node instanceof Y.XmlElement))
247
+ continue;
248
+ const candidateId = getAnyAttribute(node, 'id') ?? node.getAttribute('id');
249
+ if (candidateId === blockId) {
250
+ return { parent: container, index: i };
251
+ }
252
+ const nested = findParentOf(node, blockId);
253
+ if (nested)
254
+ return nested;
255
+ }
256
+ return null;
257
+ };
258
+ /**
259
+ * Inserts a new block before or after a reference block.
260
+ */
261
+ export const insertBlock = (doc, options) => {
262
+ const { referenceBlockId, placement, blockId, blockType = DEFAULT_BLOCK_TYPE, text, attributes = {}, docName = DEFAULT_FRAGMENT_NAME, namespace, } = options;
263
+ const resolvedBlockId = blockId ?? (namespace ? `${namespace}-${randomId()}` : randomId());
264
+ let snapshot;
265
+ doc.transact(() => {
266
+ const fragment = doc.getXmlFragment(docName);
267
+ const result = findParentOf(fragment, referenceBlockId);
268
+ if (!result) {
269
+ throw new Error(`Reference block with id ${referenceBlockId} not found`);
270
+ }
271
+ const { parent, index } = result;
272
+ const block = createBlockStructure(resolvedBlockId, blockType, text, attributes);
273
+ const insertIndex = placement === 'before' ? index : index + 1;
274
+ parent.insert(insertIndex, [block]);
275
+ snapshot = snapshotBlock(block);
276
+ }, MUTATION_ORIGIN);
277
+ if (!snapshot) {
278
+ throw new Error('Failed to create block snapshot');
279
+ }
280
+ return snapshot;
281
+ };
282
+ /**
283
+ * Moves a block to a new position relative to a reference block.
284
+ * Preserves block ID, content, runtime state, and audit trail.
285
+ */
286
+ export const moveBlock = (doc, options) => {
287
+ const { blockId, referenceBlockId, placement, docName = DEFAULT_FRAGMENT_NAME, } = options;
288
+ if (blockId === referenceBlockId) {
289
+ throw new Error('Cannot move a block relative to itself');
290
+ }
291
+ let snapshot;
292
+ doc.transact(() => {
293
+ const fragment = doc.getXmlFragment(docName);
294
+ const sourceResult = findParentOf(fragment, blockId);
295
+ if (!sourceResult) {
296
+ throw new Error(`Source block with id ${blockId} not found`);
297
+ }
298
+ // Clone the block element before removing (Y.js elements can't be reinserted after deletion)
299
+ const sourceBlock = sourceResult.parent.toArray()[sourceResult.index];
300
+ // Remove from source
301
+ sourceResult.parent.delete(sourceResult.index, 1);
302
+ // Re-find reference block (index may have shifted after removal)
303
+ const targetResult = findParentOf(fragment, referenceBlockId);
304
+ if (!targetResult) {
305
+ throw new Error(`Reference block with id ${referenceBlockId} not found`);
306
+ }
307
+ const insertIndex = placement === 'before' ? targetResult.index : targetResult.index + 1;
308
+ targetResult.parent.insert(insertIndex, [sourceBlock]);
309
+ snapshot = snapshotBlock(sourceBlock);
310
+ }, MUTATION_ORIGIN);
311
+ if (!snapshot) {
312
+ throw new Error('Failed to move block');
313
+ }
314
+ return snapshot;
315
+ };
316
+ /**
317
+ * Finds and replaces text across all blocks in the document.
318
+ * Walks all blocks, finds Y.XmlText nodes, performs replacements.
319
+ * Uses a single doc.transact() for atomicity.
320
+ */
321
+ export const findAndReplaceInDoc = (doc, options) => {
322
+ const { searchText, replaceText, caseSensitive = true, replaceAll = true, docName = DEFAULT_FRAGMENT_NAME, } = options;
323
+ let replacementCount = 0;
324
+ const affectedBlockIds = [];
325
+ doc.transact(() => {
326
+ const fragment = doc.getXmlFragment(docName);
327
+ const rootGroup = fragment
328
+ .toArray()
329
+ .find((node) => node instanceof Y.XmlElement && node.nodeName === 'blockGroup');
330
+ if (!rootGroup)
331
+ return;
332
+ const processContainer = (container) => {
333
+ const nodes = container.toArray();
334
+ for (const node of nodes) {
335
+ if (!(node instanceof Y.XmlElement))
336
+ continue;
337
+ // If this is a blockContainer, get the block ID and process content
338
+ const candidateId = getAnyAttribute(node, 'id') ?? node.getAttribute('id');
339
+ // Recursively process children (content elements, nested blockGroups)
340
+ processElement(node, candidateId);
341
+ }
342
+ };
343
+ const processElement = (element, blockId) => {
344
+ const children = element.toArray();
345
+ for (const child of children) {
346
+ if (child instanceof Y.XmlText) {
347
+ const replaced = replaceInTextNode(child);
348
+ if (replaced && blockId && !affectedBlockIds.includes(blockId)) {
349
+ affectedBlockIds.push(blockId);
350
+ }
351
+ }
352
+ else if (child instanceof Y.XmlElement) {
353
+ processElement(child, blockId);
354
+ }
355
+ }
356
+ };
357
+ const replaceInTextNode = (textNode) => {
358
+ const content = textNode.toString();
359
+ const flags = caseSensitive ? 'g' : 'gi';
360
+ const escapedSearch = searchText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
361
+ let hadMatch = false;
362
+ // Find all matches and process from end to start to avoid index shifting
363
+ const matches = [];
364
+ let match;
365
+ const searchRegex = new RegExp(escapedSearch, flags);
366
+ while ((match = searchRegex.exec(content)) !== null) {
367
+ matches.push({ index: match.index, length: match[0].length });
368
+ if (!replaceAll)
369
+ break;
370
+ }
371
+ // Process from end to start
372
+ for (let i = matches.length - 1; i >= 0; i--) {
373
+ const m = matches[i];
374
+ if (!m)
375
+ continue;
376
+ textNode.delete(m.index, m.length);
377
+ textNode.insert(m.index, replaceText);
378
+ replacementCount++;
379
+ hadMatch = true;
380
+ }
381
+ return hadMatch;
382
+ };
383
+ processContainer(rootGroup);
384
+ }, MUTATION_ORIGIN);
385
+ return {
386
+ success: replacementCount > 0,
387
+ replacementCount,
388
+ affectedBlockIds,
389
+ };
390
+ };
391
+ export const appendBlock = (doc, options) => {
392
+ const { blockId, blockType = DEFAULT_BLOCK_TYPE, text, attributes = {}, docName = DEFAULT_FRAGMENT_NAME, namespace, } = options;
393
+ const resolvedBlockId = blockId ?? (namespace ? `${namespace}-${randomId()}` : randomId());
394
+ let snapshot;
395
+ doc.transact(() => {
396
+ const fragment = doc.getXmlFragment(docName);
397
+ const rootGroup = ensureRootGroup(fragment);
398
+ const block = createBlockStructure(resolvedBlockId, blockType, text, attributes);
399
+ rootGroup.push([block]);
400
+ snapshot = snapshotBlock(block);
401
+ }, MUTATION_ORIGIN);
402
+ if (!snapshot) {
403
+ throw new Error('Failed to create block snapshot');
404
+ }
405
+ return snapshot;
406
+ };
407
+ export const deleteBlock = (doc, options) => {
408
+ const { blockId, docName = DEFAULT_FRAGMENT_NAME } = options;
409
+ let deleted = false;
410
+ const deleteFromContainer = (container) => {
411
+ const nodes = container.toArray();
412
+ for (let i = 0; i < nodes.length; i++) {
413
+ const node = nodes[i];
414
+ if (!(node instanceof Y.XmlElement))
415
+ continue;
416
+ const candidateId = getAnyAttribute(node, 'id') ?? node.getAttribute('id');
417
+ if (candidateId === blockId) {
418
+ container.delete(i, 1);
419
+ return true;
420
+ }
421
+ if (deleteFromContainer(node))
422
+ return true;
423
+ }
424
+ return false;
425
+ };
426
+ doc.transact(() => {
427
+ const fragment = doc.getXmlFragment(docName);
428
+ deleted = deleteFromContainer(fragment);
429
+ }, MUTATION_ORIGIN);
430
+ return deleted;
431
+ };
432
+ export const editBlock = (doc, options) => {
433
+ const { blockId, attributes = {}, removeAttributes = [], text, docName = DEFAULT_FRAGMENT_NAME, } = options;
434
+ let snapshot;
435
+ doc.transact(() => {
436
+ const fragment = doc.getXmlFragment(docName);
437
+ const target = findBlockById(fragment, blockId);
438
+ if (!target) {
439
+ throw new Error(`Block with id ${blockId} not found`);
440
+ }
441
+ const currentSnapshot = snapshotBlock(target);
442
+ logger.info('Block found - current state:', JSON.stringify(currentSnapshot, null, 2));
443
+ // Log the actual XML element attributes
444
+ const allAttrs = {};
445
+ const attrs = target.getAttributes();
446
+ for (const [key, value] of Object.entries(attrs)) {
447
+ allAttrs[key] = value;
448
+ }
449
+ logger.info('Target element raw attributes:', JSON.stringify(allAttrs, null, 2));
450
+ // Log children
451
+ const children = target.toArray();
452
+ logger.info('Target has', children.length, 'children');
453
+ children.forEach((child, idx) => {
454
+ if (child instanceof Y.XmlElement) {
455
+ const childAttrs = {};
456
+ const cAttrs = child.getAttributes();
457
+ for (const [key, value] of Object.entries(cAttrs)) {
458
+ childAttrs[key] = value;
459
+ }
460
+ logger.info(`Child ${idx} (${child.nodeName}):`, JSON.stringify(childAttrs, null, 2));
461
+ }
462
+ });
463
+ applyAttributeUpdates(target, attributes, removeAttributes);
464
+ applyTextUpdate(target, text);
465
+ snapshot = snapshotBlock(target);
466
+ }, MUTATION_ORIGIN);
467
+ if (!snapshot) {
468
+ throw new Error('Failed to update block snapshot');
469
+ }
470
+ return snapshot;
471
+ };
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Helper functions for Y.js BlockNote operations
3
+ *
4
+ * These functions handle the low-level Y.Doc operations
5
+ * that the LangChain tools use.
6
+ *
7
+ * Matches the pattern from the CLI commands (runAddBlock, runEditBlock, etc.)
8
+ */
9
+ import type { MatrixClient } from 'matrix-js-sdk';
10
+ import * as Y from 'yjs';
11
+ import type { AppConfig } from './provider.js';
12
+ export { appendBlock, editBlock, deleteBlock, type BlockSnapshot, } from './block-actions.js';
13
+ export interface BlockDetail {
14
+ id: string;
15
+ blockType: string;
16
+ nodeName: string;
17
+ attributes: Record<string, unknown>;
18
+ text?: string;
19
+ children?: BlockDetail[];
20
+ }
21
+ export type ConditionOperator = 'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'contains' | 'not_contains' | 'is_empty' | 'is_not_empty';
22
+ export type ConditionEffect = 'enable' | 'disable' | 'hide' | 'show';
23
+ export interface BlockCondition {
24
+ id: string;
25
+ name: string;
26
+ description?: string;
27
+ sourceBlockId: string;
28
+ sourceBlockType: string;
29
+ rule: {
30
+ type: 'property_value';
31
+ property: string;
32
+ operator: ConditionOperator;
33
+ value: string | number | boolean;
34
+ };
35
+ effect: {
36
+ action: ConditionEffect;
37
+ message?: string;
38
+ };
39
+ }
40
+ export interface ConditionConfig {
41
+ enabled: boolean;
42
+ mode: 'all_must_pass' | 'any_can_pass';
43
+ conditions: BlockCondition[];
44
+ }
45
+ export interface ConditionEvaluationResult {
46
+ isVisible: boolean;
47
+ isEnabled: boolean;
48
+ actions: Array<{
49
+ action: ConditionEffect;
50
+ message?: string;
51
+ conditionName: string;
52
+ }>;
53
+ }
54
+ /**
55
+ * Initialize provider, do work, and dispose
56
+ * This matches the pattern from runAddBlock.ts exactly
57
+ */
58
+ export declare function withProvider<T>(matrixClient: MatrixClient, config: AppConfig, work: (doc: Y.Doc) => T | Promise<T>): Promise<T>;
59
+ /**
60
+ * Find a block container by ID
61
+ */
62
+ export declare function findBlockById(container: Y.XmlElement | Y.XmlFragment, blockId: string): Y.XmlElement | null;
63
+ export declare const getAnyAttribute: <T>(element: Y.XmlElement, key: string) => T | undefined;
64
+ /**
65
+ * Extract text content from an element (EXACT copy from runListBlocks.ts)
66
+ */
67
+ export declare function extractText(element: Y.XmlElement): string;
68
+ /**
69
+ * Extract user-facing properties from a block.
70
+ * Flattens the internal CRDT structure so ALL block properties are visible:
71
+ * 1. Extracts every entry from attrs.props (the canonical source)
72
+ * 2. Fills gaps from child element direct attributes (BlockNote mirrors props there)
73
+ * 3. Parses surveySchema and answers from JSON strings when present
74
+ *
75
+ * Generic — works for any block type without hardcoding field names.
76
+ */
77
+ export declare function extractBlockProperties(detail: BlockDetail): Record<string, unknown>;
78
+ /**
79
+ * Transform block detail into agent-friendly format
80
+ */
81
+ export declare function simplifyBlockForAgent(detail: BlockDetail): {
82
+ id: string;
83
+ type: string;
84
+ properties: Record<string, unknown>;
85
+ text?: string;
86
+ };
87
+ /**
88
+ * Collect all block containers from the document (EXACT copy from runListBlocks.ts)
89
+ */
90
+ export declare function collectAllBlocks(fragment: Y.XmlFragment, _includeText?: boolean): BlockDetail[];
91
+ /**
92
+ * Get block by ID and return its details
93
+ */
94
+ export declare function getBlockDetail(doc: Y.Doc, blockId: string, _includeText?: boolean): BlockDetail | null;
95
+ /**
96
+ * Read flow metadata from Y.Map('root') + Y.Text('title').
97
+ * Returns ALL entries from the root map — no field filtering.
98
+ */
99
+ export declare function readFlowMetadata(doc: Y.Doc): Record<string, unknown>;
100
+ /**
101
+ * Read all flow nodes from Y.Array('flow').
102
+ * Returns raw entries without type casting.
103
+ */
104
+ export declare function readFlowNodes(doc: Y.Doc): Record<string, unknown>[];
105
+ /**
106
+ * Read runtime state from Y.Map('runtime').
107
+ * If nodeId provided, returns only that node's state.
108
+ * Returns raw objects — no type filtering.
109
+ */
110
+ export declare function readRuntimeState(doc: Y.Doc, nodeId?: string): Record<string, Record<string, unknown>>;
111
+ /**
112
+ * Merge updates into a block's runtime state in Y.Map('runtime').
113
+ * Reads existing state first, spreads, then writes the merged result.
114
+ * Must be called inside a doc.transact() by the caller.
115
+ */
116
+ export declare function updateRuntimeState(doc: Y.Doc, blockId: string, updates: Record<string, unknown>): Record<string, unknown>;
117
+ /**
118
+ * Read audit trail events for a specific block from Y.Map('auditTrail').
119
+ * Returns raw entries without type casting.
120
+ */
121
+ export declare function readAuditTrailForBlock(doc: Y.Doc, blockId: string): Record<string, unknown>[];
122
+ /**
123
+ * Read invocations from Y.Map('invocations'), optionally filtered by blockId.
124
+ * Sorted by executedAt descending (most recent first) if the field exists.
125
+ * Returns raw entries without type casting.
126
+ */
127
+ export declare function readInvocations(doc: Y.Doc, blockId?: string): Record<string, unknown>[];
128
+ /**
129
+ * Read delegations from Y.Map('delegations').
130
+ * Handles both v2 StoredEntry { v: 2, data: ... } and legacy JSON strings.
131
+ * Returns raw entries without type casting.
132
+ */
133
+ export declare function readDelegations(doc: Y.Doc): {
134
+ rootCid: string | null;
135
+ delegations: Record<string, unknown>[];
136
+ };
137
+ /**
138
+ * Evaluate a block's condition config against all blocks in the document.
139
+ * Returns computed visibility and enabled state.
140
+ */
141
+ export declare function evaluateBlockConditions(conditionConfig: ConditionConfig, allBlocks: BlockDetail[]): ConditionEvaluationResult;
142
+ /**
143
+ * Resolve {{blockId.propPath}} template references in a string.
144
+ * Returns the string with all references replaced by their resolved values.
145
+ */
146
+ export declare function resolveBlockReferences(template: string, allBlocks: BlockDetail[]): string;
147
+ //# sourceMappingURL=blocknote-helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blocknote-helper.d.ts","sourceRoot":"","sources":["../../../src/plugins/editor/blocknote-helper.ts"],"names":[],"mappings":"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"}