@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,105 @@
1
+ import { MatrixError, MatrixManager } from '@ixo/matrix';
2
+ import { Logger } from '@nestjs/common';
3
+ import { z } from 'zod';
4
+ export const USER_PREFS_STATE_KEY = 'user_prefs';
5
+ export const UserPreferencesSchema = z.object({
6
+ agentName: z.string().max(80).optional(),
7
+ userName: z.string().max(80).optional(),
8
+ language: z.string().max(20).optional(), // BCP-47-ish, free-form
9
+ tone: z.string().optional(), // e.g. "casual", "playful"
10
+ formality: z
11
+ .enum([
12
+ 'casual',
13
+ 'friendly',
14
+ 'neutral',
15
+ 'semi-formal',
16
+ 'professional',
17
+ 'formal',
18
+ 'technical',
19
+ 'academic',
20
+ ])
21
+ .optional(),
22
+ customInstructions: z.string().max(2000).optional(),
23
+ updatedAt: z.iso.datetime().optional(), // service sets on every write
24
+ });
25
+ const SIXTY_SECONDS_MS = 60 * 1000;
26
+ /**
27
+ * Stores per-room user preferences in Matrix room state, with an optional
28
+ * in-memory cache. The singleton is consumed by the user-preferences
29
+ * middleware which loads prefs into `state.userPreferences` on every request.
30
+ */
31
+ export class UserPreferencesService {
32
+ static instance;
33
+ cacheManager = null;
34
+ constructor() { }
35
+ static getInstance() {
36
+ if (!UserPreferencesService.instance) {
37
+ UserPreferencesService.instance = new UserPreferencesService();
38
+ }
39
+ return UserPreferencesService.instance;
40
+ }
41
+ setCacheManager(cache) {
42
+ this.cacheManager = cache;
43
+ }
44
+ cacheKey(roomId) {
45
+ return `user-prefs:${roomId}`;
46
+ }
47
+ /**
48
+ * Read user preferences for a given room.
49
+ * Returns undefined if no preferences have been set, or if anything goes wrong
50
+ * (we never want missing prefs to break a chat session).
51
+ */
52
+ async get(roomId) {
53
+ const key = this.cacheKey(roomId);
54
+ const cached = await this.cacheManager?.get(key);
55
+ if (cached) {
56
+ return cached;
57
+ }
58
+ let raw;
59
+ try {
60
+ const stateManager = MatrixManager.getInstance().stateManager;
61
+ raw = await stateManager.getState(roomId, USER_PREFS_STATE_KEY);
62
+ }
63
+ catch (error) {
64
+ if (error instanceof MatrixError && error.errcode === 'M_NOT_FOUND') {
65
+ return undefined;
66
+ }
67
+ Logger.warn(`[UserPreferencesService] Failed to load prefs for room ${roomId}: ${error instanceof Error ? error.message : String(error)}`);
68
+ return undefined;
69
+ }
70
+ const parsed = UserPreferencesSchema.safeParse(raw);
71
+ if (!parsed.success) {
72
+ Logger.warn(`[UserPreferencesService] Invalid prefs payload for room ${roomId}: ${parsed.error.message}`);
73
+ return undefined;
74
+ }
75
+ await this.cacheManager?.set(key, parsed.data, SIXTY_SECONDS_MS);
76
+ return parsed.data;
77
+ }
78
+ /**
79
+ * Merge `partial` into the existing preferences, write to Matrix room state,
80
+ * invalidate the cache, and return the merged result.
81
+ * `updatedAt` is always set by this service.
82
+ */
83
+ async set(roomId, partial) {
84
+ const current = (await this.get(roomId)) ?? {};
85
+ if (Object.keys(partial).length === 0 && !partial.updatedAt) {
86
+ return current;
87
+ }
88
+ const merged = UserPreferencesSchema.parse({
89
+ ...current,
90
+ ...partial,
91
+ updatedAt: new Date().toISOString(),
92
+ });
93
+ const stateManager = MatrixManager.getInstance().stateManager;
94
+ await stateManager.setState({
95
+ roomId,
96
+ stateKey: USER_PREFS_STATE_KEY,
97
+ data: merged,
98
+ });
99
+ await this.invalidate(roomId);
100
+ return merged;
101
+ }
102
+ async invalidate(roomId) {
103
+ await this.cacheManager?.del(this.cacheKey(roomId));
104
+ }
105
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Plugin-owned HTTP surface. Returned from `UserPreferencesPlugin.getNestModules()`
3
+ * so the `GET /user-preferences` endpoint only exists when the plugin is
4
+ * loaded. Reads via `UserPreferencesService.getInstance()` — the same
5
+ * singleton the plugin's middleware + tool consume, so the controller
6
+ * shares state with the agent path.
7
+ */
8
+ export declare class UserPreferencesHttpModule {
9
+ }
10
+ //# sourceMappingURL=user-preferences-http.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-preferences-http.module.d.ts","sourceRoot":"","sources":["../../../src/plugins/user-preferences/user-preferences-http.module.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,qBAGa,yBAAyB;CAAG"}
@@ -0,0 +1,23 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Module } from '@nestjs/common';
8
+ import { UserPreferencesController } from './user-preferences.controller.js';
9
+ /**
10
+ * Plugin-owned HTTP surface. Returned from `UserPreferencesPlugin.getNestModules()`
11
+ * so the `GET /user-preferences` endpoint only exists when the plugin is
12
+ * loaded. Reads via `UserPreferencesService.getInstance()` — the same
13
+ * singleton the plugin's middleware + tool consume, so the controller
14
+ * shares state with the agent path.
15
+ */
16
+ let UserPreferencesHttpModule = class UserPreferencesHttpModule {
17
+ };
18
+ UserPreferencesHttpModule = __decorate([
19
+ Module({
20
+ controllers: [UserPreferencesController],
21
+ })
22
+ ], UserPreferencesHttpModule);
23
+ export { UserPreferencesHttpModule };
@@ -0,0 +1,22 @@
1
+ import type { Logger, PluginTool } from '../../plugin-api/types.js';
2
+ import type { UserPreferencesWriter } from './service/user-preferences.service.js';
3
+ export interface CreateSetUserPreferencesToolOptions {
4
+ /** Service the tool delegates writes to (typically the singleton). */
5
+ service: UserPreferencesWriter;
6
+ /** Optional logger; defaults to a no-op. */
7
+ logger?: Logger;
8
+ }
9
+ /**
10
+ * Builds the `set_user_preferences` plugin tool. The tool merges the supplied
11
+ * partial preferences into the user's stored preferences for the active room;
12
+ * only the fields provided are updated.
13
+ *
14
+ * The active `roomId` is read off `ctx.session.roomId` per invocation. Tools
15
+ * called from clients without a room (e.g. some non-Matrix flows) get a
16
+ * descriptive error string back rather than throwing — the agent can recover.
17
+ *
18
+ * Note: changes take effect from the user's NEXT message — the system prompt
19
+ * for the current turn has already been built.
20
+ */
21
+ export declare function createSetUserPreferencesTool(options: CreateSetUserPreferencesToolOptions): PluginTool;
22
+ //# sourceMappingURL=user-preferences-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-preferences-tool.d.ts","sourceRoot":"","sources":["../../../src/plugins/user-preferences/user-preferences-tool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,MAAM,EACN,UAAU,EAEX,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAmFnF,MAAM,WAAW,mCAAmC;IAClD,sEAAsE;IACtE,OAAO,EAAE,qBAAqB,CAAC;IAC/B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,mCAAmC,GAC3C,UAAU,CA0BZ"}
@@ -0,0 +1,103 @@
1
+ import { z } from 'zod';
2
+ import { tool } from '../../plugin-api/tool-helper.js';
3
+ const NOOP_LOGGER = {
4
+ log: () => undefined,
5
+ warn: () => undefined,
6
+ error: () => undefined,
7
+ };
8
+ const setUserPreferencesSchema = z.object({
9
+ agentName: z
10
+ .string()
11
+ .max(80)
12
+ .optional()
13
+ .describe("What the user wants you (the agent) to be called (e.g. 'Companion'). Use exactly the form the user asked for. Max 80 characters."),
14
+ userName: z
15
+ .string()
16
+ .max(80)
17
+ .optional()
18
+ .describe("What the user wants you to call them (e.g. 'Yousef'). Use exactly the form the user asked for. Max 80 characters."),
19
+ language: z
20
+ .string()
21
+ .max(20)
22
+ .optional()
23
+ .describe("Preferred reply language as a free-form code or name (e.g. 'en', 'ar', 'Arabic', 'Egyptian Arabic'). " +
24
+ 'Be precise — if the user specified a dialect or variant, capture that. Max 20 characters.'),
25
+ tone: z
26
+ .string()
27
+ .optional()
28
+ .describe("Short tone label your future self will see at the top of every prompt (e.g. 'playful and warm', " +
29
+ "'concise and dry', 'patient teacher'). Pick descriptive words, not vague ones."),
30
+ formality: z
31
+ .enum([
32
+ 'casual',
33
+ 'friendly',
34
+ 'neutral',
35
+ 'semi-formal',
36
+ 'professional',
37
+ 'formal',
38
+ 'technical',
39
+ 'academic',
40
+ ])
41
+ .optional()
42
+ .describe('How formal the replies should be. Pick the value closest to what the user actually wants, ' +
43
+ 'not what the request literally said.'),
44
+ customInstructions: z
45
+ .string()
46
+ .max(2000)
47
+ .optional()
48
+ .describe('Free-form custom instructions your FUTURE SELF will read every turn. Treat this like writing ' +
49
+ 'a system prompt: be specific, complete, and unambiguous. Include the WHY when it matters ' +
50
+ "(e.g. 'User has dyslexia — keep sentences short and avoid long lists'). " +
51
+ 'When updating, MERGE with existing instructions rather than replacing — read what is already ' +
52
+ 'there (visible in your current system prompt under "User Preferences") and write the full new ' +
53
+ 'instruction set, preserving anything still relevant. Max 2000 characters.'),
54
+ });
55
+ const SET_USER_PREFERENCES_DESCRIPTION = "Update the user's preferences. Call this whenever the user asks you to change how you behave " +
56
+ "(e.g. 'call me Yousef', 'reply in Arabic', 'be more casual').\n\n" +
57
+ 'IMPORTANT — you are writing instructions for your FUTURE SELF. ' +
58
+ 'On every later turn this exact text will be injected back into your system prompt and you will read it cold, ' +
59
+ 'with no memory of this conversation or why the user asked. So:\n' +
60
+ " • Be specific and self-contained. Don't write 'be more casual' — write 'Use casual, conversational " +
61
+ "tone. Avoid corporate phrasing. Use contractions. Drop filler words.'\n" +
62
+ " • Capture intent, not just the literal request. If the user says 'stop being so formal', infer the " +
63
+ 'positive form: what should you do instead?\n' +
64
+ ' • Preserve existing instructions when adding new ones — only overwrite the fields you mean to change. ' +
65
+ 'Other fields are kept as-is.\n' +
66
+ " • If unsure between two interpretations, pick the more specific one — your future self can't ask back.\n\n" +
67
+ "Note: changes apply from the user's NEXT message (the current turn's prompt is already built).";
68
+ /**
69
+ * Builds the `set_user_preferences` plugin tool. The tool merges the supplied
70
+ * partial preferences into the user's stored preferences for the active room;
71
+ * only the fields provided are updated.
72
+ *
73
+ * The active `roomId` is read off `ctx.session.roomId` per invocation. Tools
74
+ * called from clients without a room (e.g. some non-Matrix flows) get a
75
+ * descriptive error string back rather than throwing — the agent can recover.
76
+ *
77
+ * Note: changes take effect from the user's NEXT message — the system prompt
78
+ * for the current turn has already been built.
79
+ */
80
+ export function createSetUserPreferencesTool(options) {
81
+ const logger = options.logger ?? NOOP_LOGGER;
82
+ const { service } = options;
83
+ return tool(async (rawArgs, ctx) => {
84
+ const args = setUserPreferencesSchema.parse(rawArgs);
85
+ const roomId = ctx.session.roomId;
86
+ if (!roomId) {
87
+ return '[Error updating user preferences: no active room on this session]';
88
+ }
89
+ try {
90
+ const merged = await service.set(roomId, args);
91
+ return `Updated. New preferences: ${JSON.stringify(merged, null, 2)}`;
92
+ }
93
+ catch (error) {
94
+ const msg = error instanceof Error ? error.message : String(error);
95
+ logger.error(`set_user_preferences error: ${msg}`);
96
+ return `[Error updating user preferences: ${msg}]`;
97
+ }
98
+ }, {
99
+ name: 'set_user_preferences',
100
+ description: SET_USER_PREFERENCES_DESCRIPTION,
101
+ schema: setUserPreferencesSchema,
102
+ });
103
+ }
@@ -0,0 +1,18 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import type { Request } from 'express';
3
+ import { type UserPreferences } from './service/user-preferences.service.js';
4
+ /**
5
+ * Exposes the per-room user preferences read endpoint. Lives inside the
6
+ * plugin (not the runtime core) — the plugin's `getNestModules()` wires
7
+ * this controller into Nest only when the plugin is loaded.
8
+ *
9
+ * Writes happen via the agent's `set_user_preferences` tool (the
10
+ * plugin-supplied LLM tool), not over HTTP — keeping the surface narrow.
11
+ */
12
+ export declare class UserPreferencesController {
13
+ private readonly configService;
14
+ private readonly logger;
15
+ constructor(configService: ConfigService);
16
+ getPreferences(req: Request): Promise<UserPreferences | null>;
17
+ }
18
+ //# sourceMappingURL=user-preferences.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-preferences.controller.d.ts","sourceRoot":"","sources":["../../../src/plugins/user-preferences/user-preferences.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,uCAAuC,CAAC;AAE/C;;;;;;;GAOG;AACH,qBAEa,yBAAyB;IAGxB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAF1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8C;gBAExC,aAAa,EAAE,aAAa;IAYnD,cAAc,CAAQ,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;CA2B3E"}
@@ -0,0 +1,72 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ var UserPreferencesController_1;
14
+ import { MatrixManager } from '@ixo/matrix';
15
+ import { getMatrixHomeServerCroppedForDid } from '@ixo/oracles-chain-client';
16
+ import { Controller, Get, Logger, Req } from '@nestjs/common';
17
+ import { ConfigService } from '@nestjs/config';
18
+ import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
19
+ import { UserPreferencesService, } from './service/user-preferences.service.js';
20
+ /**
21
+ * Exposes the per-room user preferences read endpoint. Lives inside the
22
+ * plugin (not the runtime core) — the plugin's `getNestModules()` wires
23
+ * this controller into Nest only when the plugin is loaded.
24
+ *
25
+ * Writes happen via the agent's `set_user_preferences` tool (the
26
+ * plugin-supplied LLM tool), not over HTTP — keeping the surface narrow.
27
+ */
28
+ let UserPreferencesController = UserPreferencesController_1 = class UserPreferencesController {
29
+ configService;
30
+ logger = new Logger(UserPreferencesController_1.name);
31
+ constructor(configService) {
32
+ this.configService = configService;
33
+ }
34
+ async getPreferences(req) {
35
+ const { did } = req.authData;
36
+ const oracleEntityDid = this.configService.getOrThrow('ORACLE_ENTITY_DID');
37
+ const userHomeServer = await getMatrixHomeServerCroppedForDid(did);
38
+ const { roomId } = await MatrixManager.getInstance().getOracleRoomIdWithHomeServer({
39
+ userDid: did,
40
+ oracleEntityDid,
41
+ userHomeServer,
42
+ });
43
+ if (!roomId) {
44
+ this.logger.warn(`Could not resolve user↔oracle room for userDid=${did}, oracleEntityDid=${oracleEntityDid}, userHomeServer=${userHomeServer}`);
45
+ return null;
46
+ }
47
+ const prefs = await UserPreferencesService.getInstance().get(roomId);
48
+ this.logger.log(`Fetched user preferences for userDid=${did}, roomId=${roomId}: ${prefs ? 'Found' : 'null'}`);
49
+ return prefs ?? null;
50
+ }
51
+ };
52
+ __decorate([
53
+ Get(),
54
+ ApiOperation({
55
+ summary: 'Get user preferences for the user↔oracle Matrix room.',
56
+ }),
57
+ ApiResponse({
58
+ status: 200,
59
+ description: 'Preferences object, or null when no preferences have been set yet.',
60
+ }),
61
+ ApiResponse({ status: 401, description: 'Missing or invalid auth token.' }),
62
+ __param(0, Req()),
63
+ __metadata("design:type", Function),
64
+ __metadata("design:paramtypes", [Object]),
65
+ __metadata("design:returntype", Promise)
66
+ ], UserPreferencesController.prototype, "getPreferences", null);
67
+ UserPreferencesController = UserPreferencesController_1 = __decorate([
68
+ ApiTags('user-preferences'),
69
+ Controller('user-preferences'),
70
+ __metadata("design:paramtypes", [ConfigService])
71
+ ], UserPreferencesController);
72
+ export { UserPreferencesController };
@@ -0,0 +1,27 @@
1
+ import type { DynamicModule, Type } from '@nestjs/common';
2
+ import { OraclePlugin } from '../../plugin-api/oracle-plugin.js';
3
+ import type { PluginContext, PluginManifest, PluginTool } from '../../plugin-api/types.js';
4
+ import { type UserPreferencesReader, type UserPreferencesWriter } from './service/user-preferences.service.js';
5
+ /** Service contract the plugin needs: read for the middleware, write for the tool. */
6
+ export type UserPreferencesPluginService = UserPreferencesReader & UserPreferencesWriter;
7
+ /**
8
+ * Per-room user preferences plugin.
9
+ *
10
+ * - `state.userPreferences` is hydrated by `AgentBuilder` (via
11
+ * `UserPreferencesService.getInstance().get(roomId)`) BEFORE the agent is
12
+ * compiled so the system prompt sees the value on turn 1.
13
+ * - Exposes a `set_user_preferences` tool the agent calls when the user
14
+ * asks to change behavioral preferences (tone, language, formality,
15
+ * what to call the agent).
16
+ * - Ships `GET /user-preferences` via `getNestModules`.
17
+ */
18
+ export declare class UserPreferencesPlugin extends OraclePlugin {
19
+ readonly name = "user-preferences";
20
+ readonly version = "1.0.0";
21
+ readonly manifest: PluginManifest;
22
+ private readonly service;
23
+ constructor(service?: UserPreferencesPluginService);
24
+ getTools(ctx: PluginContext): PluginTool[];
25
+ getNestModules(): Array<Type | DynamicModule>;
26
+ }
27
+ //# sourceMappingURL=user-preferences.plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-preferences.plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/user-preferences/user-preferences.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,UAAU,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,uCAAuC,CAAC;AAI/C,sFAAsF;AACtF,MAAM,MAAM,4BAA4B,GAAG,qBAAqB,GAC9D,qBAAqB,CAAC;AAExB;;;;;;;;;;GAUG;AACH,qBAAa,qBAAsB,SAAQ,YAAY;IACrD,QAAQ,CAAC,IAAI,sBAAsB;IAEnC,QAAQ,CAAC,OAAO,WAAW;IAE3B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CA+B/B;IAEF,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA+B;gBAGrD,OAAO,GAAE,4BAAmE;IAMrE,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,UAAU,EAAE;IAS1C,cAAc,IAAI,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC;CAIvD"}
@@ -0,0 +1,66 @@
1
+ import { OraclePlugin } from '../../plugin-api/oracle-plugin.js';
2
+ import { UserPreferencesService, } from './service/user-preferences.service.js';
3
+ import { UserPreferencesHttpModule } from './user-preferences-http.module.js';
4
+ import { createSetUserPreferencesTool } from './user-preferences-tool.js';
5
+ /**
6
+ * Per-room user preferences plugin.
7
+ *
8
+ * - `state.userPreferences` is hydrated by `AgentBuilder` (via
9
+ * `UserPreferencesService.getInstance().get(roomId)`) BEFORE the agent is
10
+ * compiled so the system prompt sees the value on turn 1.
11
+ * - Exposes a `set_user_preferences` tool the agent calls when the user
12
+ * asks to change behavioral preferences (tone, language, formality,
13
+ * what to call the agent).
14
+ * - Ships `GET /user-preferences` via `getNestModules`.
15
+ */
16
+ export class UserPreferencesPlugin extends OraclePlugin {
17
+ name = 'user-preferences';
18
+ version = '1.0.0';
19
+ manifest = {
20
+ title: 'User Preferences',
21
+ summary: 'Behavioral preferences — how the user wants you to respond (tone, language, formality, what to call you).',
22
+ whenToUse: [
23
+ 'User states how they want you to behave: "be more terse", "respond in Spanish", "call me Alex", "stop using emojis".',
24
+ 'User asks to change the voice, formality, or language of your replies — save it so it persists across sessions, not just this turn.',
25
+ ],
26
+ whenNotToUse: [
27
+ 'Facts about who the user is (name, role, project) — those go to memory, not preferences.',
28
+ 'Artifacts you have produced or how the user reacted to them — also memory, not preferences.',
29
+ 'One-turn formatting requests ("just for this answer, use bullets") — adapt locally without saving.',
30
+ ],
31
+ examples: [
32
+ {
33
+ user: 'From now on, please respond in Spanish.',
34
+ thought: 'Behavioral preference about language — save it so it persists.',
35
+ tool: 'set_user_preferences',
36
+ args: { language: 'Spanish' },
37
+ },
38
+ {
39
+ user: 'Be more concise — drop the explanations.',
40
+ thought: 'Preference about tone/length, not a single-turn request.',
41
+ tool: 'set_user_preferences',
42
+ args: { tone: 'concise' },
43
+ },
44
+ ],
45
+ visibility: 'always',
46
+ stability: 'stable',
47
+ category: 'core',
48
+ };
49
+ service;
50
+ constructor(service = UserPreferencesService.getInstance()) {
51
+ super();
52
+ this.service = service;
53
+ }
54
+ getTools(ctx) {
55
+ return [
56
+ createSetUserPreferencesTool({
57
+ service: this.service,
58
+ logger: ctx.logger,
59
+ }),
60
+ ];
61
+ }
62
+ getNestModules() {
63
+ // Ships `GET /user-preferences` only when this plugin is loaded.
64
+ return [UserPreferencesHttpModule];
65
+ }
66
+ }
@@ -0,0 +1,24 @@
1
+ import type { z } from 'zod';
2
+ import type { OraclePlugin } from '../plugin-api/oracle-plugin.js';
3
+ /** A collected configSchema tagged with the plugin that contributed it. */
4
+ export interface RegisteredConfigSchema {
5
+ pluginName: string;
6
+ schema: z.ZodObject<any>;
7
+ }
8
+ /**
9
+ * Stores plugin-owned `configSchema` objects in registration order. The
10
+ * actual Zod merge — collision detection, plugin-ownership tracking, env
11
+ * validation — lives in `bootstrap/schema-composer.ts` via
12
+ * `composeEnvSchema()` so the merge logic exists in exactly one place.
13
+ */
14
+ export declare class ConfigSchemaRegistry {
15
+ private readonly entries;
16
+ register(plugin: OraclePlugin): void;
17
+ collect(): RegisteredConfigSchema[];
18
+ /**
19
+ * Config keys may collide intentionally (later wins, with warning), so
20
+ * collision is not fatal. Provided for a uniform registry surface.
21
+ */
22
+ assertNoCollisions(): void;
23
+ }
24
+ //# sourceMappingURL=config-schema-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-schema-registry.d.ts","sourceRoot":"","sources":["../../src/registries/config-schema-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,2EAA2E;AAC3E,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CAC1B;AAED;;;;;GAKG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgC;IAExD,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAQpC,OAAO,IAAI,sBAAsB,EAAE;IAInC;;;OAGG;IACH,kBAAkB,IAAI,IAAI;CAG3B"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Stores plugin-owned `configSchema` objects in registration order. The
3
+ * actual Zod merge — collision detection, plugin-ownership tracking, env
4
+ * validation — lives in `bootstrap/schema-composer.ts` via
5
+ * `composeEnvSchema()` so the merge logic exists in exactly one place.
6
+ */
7
+ export class ConfigSchemaRegistry {
8
+ entries = [];
9
+ register(plugin) {
10
+ if (!plugin.configSchema)
11
+ return;
12
+ this.entries.push({
13
+ pluginName: plugin.name,
14
+ schema: plugin.configSchema,
15
+ });
16
+ }
17
+ collect() {
18
+ return [...this.entries];
19
+ }
20
+ /**
21
+ * Config keys may collide intentionally (later wins, with warning), so
22
+ * collision is not fatal. Provided for a uniform registry surface.
23
+ */
24
+ assertNoCollisions() {
25
+ // intentional no-op
26
+ }
27
+ }
@@ -0,0 +1,13 @@
1
+ export { ToolRegistry } from './tool-registry.js';
2
+ export type { RegisteredTool } from './tool-registry.js';
3
+ export { SubAgentRegistry } from './subagent-registry.js';
4
+ export type { RegisteredSubAgent } from './subagent-registry.js';
5
+ export { MiddlewareRegistry } from './middleware-registry.js';
6
+ export type { RegisteredMiddleware } from './middleware-registry.js';
7
+ export { ManifestRegistry } from './manifest-registry.js';
8
+ export type { RegisteredManifest, ManifestCrossCheckResult, } from './manifest-registry.js';
9
+ export { ConfigSchemaRegistry } from './config-schema-registry.js';
10
+ export type { RegisteredConfigSchema } from './config-schema-registry.js';
11
+ export { SharedStateRegistry } from './shared-state-registry.js';
12
+ export type { RegisteredSharedAccessor } from './shared-state-registry.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EACV,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { ToolRegistry } from './tool-registry.js';
2
+ export { SubAgentRegistry } from './subagent-registry.js';
3
+ export { MiddlewareRegistry } from './middleware-registry.js';
4
+ export { ManifestRegistry } from './manifest-registry.js';
5
+ export { ConfigSchemaRegistry } from './config-schema-registry.js';
6
+ export { SharedStateRegistry } from './shared-state-registry.js';
@@ -0,0 +1,49 @@
1
+ import type { OraclePlugin } from '../plugin-api/oracle-plugin.js';
2
+ import type { PluginManifest } from '../plugin-api/types.js';
3
+ import type { SubAgentRegistry } from './subagent-registry.js';
4
+ import type { ToolRegistry } from './tool-registry.js';
5
+ /** A collected manifest tagged with the plugin that contributed it. */
6
+ export interface RegisteredManifest {
7
+ pluginName: string;
8
+ manifest: PluginManifest;
9
+ }
10
+ /** Result of cross-checking every plugin's example tools against a ToolRegistry. */
11
+ export interface ManifestCrossCheckResult {
12
+ errors: string[];
13
+ }
14
+ /**
15
+ * Stores plugin manifests and wires the cross-tool-reference check that can
16
+ * only run once tool registration is complete.
17
+ *
18
+ * Manifest titles can collide (display only); the registry does not block on
19
+ * title duplication.
20
+ */
21
+ export declare class ManifestRegistry {
22
+ private readonly entries;
23
+ /** Record a plugin's manifest. */
24
+ register(plugin: OraclePlugin): void;
25
+ /**
26
+ * Plain-pass collect — returns the registered manifests in registration
27
+ * order. Manifests are eagerly available on the plugin, so this method
28
+ * accepts no context but matches the registry shape used elsewhere.
29
+ */
30
+ collect(): RegisteredManifest[];
31
+ /**
32
+ * For each registered manifest, validate that every `examples[].tool`
33
+ * reference exists in the supplied registries. Sub-agents are first-class
34
+ * tools to the agent — they get wrapped as `call_<name>` StructuredTools —
35
+ * so the validator unions tool names with sub-agent wrapped names. Both
36
+ * registries MUST have been collected and asserted before calling this.
37
+ *
38
+ * Returns the union of all per-plugin error strings — each entry is
39
+ * prefixed with the plugin name and field path (delegated to
40
+ * `validateExamplesAgainstTools`).
41
+ */
42
+ validateAgainstTools(toolRegistry: ToolRegistry, subAgentRegistry: SubAgentRegistry): ManifestCrossCheckResult;
43
+ /**
44
+ * Manifest title collisions are display-only, so this is a no-op. Provided
45
+ * for a uniform registry surface.
46
+ */
47
+ assertNoCollisions(): void;
48
+ }
49
+ //# sourceMappingURL=manifest-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-registry.d.ts","sourceRoot":"","sources":["../../src/registries/manifest-registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,uEAAuE;AACvE,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,oFAAoF;AACpF,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;GAMG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4B;IAEpD,kCAAkC;IAClC,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAIpC;;;;OAIG;IACH,OAAO,IAAI,kBAAkB,EAAE;IAI/B;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,gBAAgB,GACjC,wBAAwB;IAiB3B;;;OAGG;IACH,kBAAkB,IAAI,IAAI;CAG3B"}