@teneo-protocol/sdk 1.0.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/.eslintrc.json +11 -2
  2. package/.github/CODEOWNERS +2 -0
  3. package/.github/ISSUE_TEMPLATE/01-bug.yml +85 -0
  4. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  6. package/.github/workflows/claude-code-review.yml +8 -3
  7. package/.github/workflows/claude-reviewer.yml +6 -4
  8. package/.github/workflows/publish-npm.yml +9 -6
  9. package/.github/workflows/push-to-main.yml +1 -1
  10. package/.github/workflows/top-issue.yml +102 -0
  11. package/CHANGELOG.md +334 -0
  12. package/CONCEPTS.md +747 -0
  13. package/README.md +577 -54
  14. package/dist/constants.js +8 -8
  15. package/dist/constants.js.map +1 -1
  16. package/dist/core/websocket-client.d.ts +25 -1
  17. package/dist/core/websocket-client.d.ts.map +1 -1
  18. package/dist/core/websocket-client.js +74 -15
  19. package/dist/core/websocket-client.js.map +1 -1
  20. package/dist/formatters/response-formatter.js +4 -0
  21. package/dist/formatters/response-formatter.js.map +1 -1
  22. package/dist/handlers/message-handler-registry.js +2 -1
  23. package/dist/handlers/message-handler-registry.js.map +1 -1
  24. package/dist/handlers/message-handlers/agent-details-response-handler.d.ts +1666 -0
  25. package/dist/handlers/message-handlers/agent-details-response-handler.d.ts.map +1 -0
  26. package/dist/handlers/message-handlers/agent-details-response-handler.js +38 -0
  27. package/dist/handlers/message-handlers/agent-details-response-handler.js.map +1 -0
  28. package/dist/handlers/message-handlers/agent-room-operation-response-handler.d.ts +76 -0
  29. package/dist/handlers/message-handlers/agent-room-operation-response-handler.d.ts.map +1 -0
  30. package/dist/handlers/message-handlers/agent-room-operation-response-handler.js +67 -0
  31. package/dist/handlers/message-handlers/agent-room-operation-response-handler.js.map +1 -0
  32. package/dist/handlers/message-handlers/agent-selected-handler.d.ts +92 -38
  33. package/dist/handlers/message-handlers/agent-selected-handler.d.ts.map +1 -1
  34. package/dist/handlers/message-handlers/agent-selected-handler.js +2 -5
  35. package/dist/handlers/message-handlers/agent-selected-handler.js.map +1 -1
  36. package/dist/handlers/message-handlers/agent-status-update-handler.d.ts +1687 -0
  37. package/dist/handlers/message-handlers/agent-status-update-handler.d.ts.map +1 -0
  38. package/dist/handlers/message-handlers/agent-status-update-handler.js +48 -0
  39. package/dist/handlers/message-handlers/agent-status-update-handler.js.map +1 -0
  40. package/dist/handlers/message-handlers/agents-list-handler.js +2 -5
  41. package/dist/handlers/message-handlers/agents-list-handler.js.map +1 -1
  42. package/dist/handlers/message-handlers/all-agents-response-handler.d.ts +439 -0
  43. package/dist/handlers/message-handlers/all-agents-response-handler.d.ts.map +1 -0
  44. package/dist/handlers/message-handlers/all-agents-response-handler.js +36 -0
  45. package/dist/handlers/message-handlers/all-agents-response-handler.js.map +1 -0
  46. package/dist/handlers/message-handlers/auth-error-handler.d.ts +45 -31
  47. package/dist/handlers/message-handlers/auth-error-handler.d.ts.map +1 -1
  48. package/dist/handlers/message-handlers/auth-error-handler.js +2 -5
  49. package/dist/handlers/message-handlers/auth-error-handler.js.map +1 -1
  50. package/dist/handlers/message-handlers/auth-message-handler.d.ts +6 -0
  51. package/dist/handlers/message-handlers/auth-message-handler.d.ts.map +1 -1
  52. package/dist/handlers/message-handlers/auth-message-handler.js +71 -10
  53. package/dist/handlers/message-handlers/auth-message-handler.js.map +1 -1
  54. package/dist/handlers/message-handlers/auth-required-handler.d.ts +49 -31
  55. package/dist/handlers/message-handlers/auth-required-handler.d.ts.map +1 -1
  56. package/dist/handlers/message-handlers/auth-required-handler.js +2 -5
  57. package/dist/handlers/message-handlers/auth-required-handler.js.map +1 -1
  58. package/dist/handlers/message-handlers/auth-success-handler.d.ts +6 -0
  59. package/dist/handlers/message-handlers/auth-success-handler.d.ts.map +1 -1
  60. package/dist/handlers/message-handlers/auth-success-handler.js +52 -9
  61. package/dist/handlers/message-handlers/auth-success-handler.js.map +1 -1
  62. package/dist/handlers/message-handlers/base-handler.d.ts +4 -4
  63. package/dist/handlers/message-handlers/base-handler.d.ts.map +1 -1
  64. package/dist/handlers/message-handlers/base-handler.js +3 -1
  65. package/dist/handlers/message-handlers/base-handler.js.map +1 -1
  66. package/dist/handlers/message-handlers/challenge-handler.d.ts +45 -31
  67. package/dist/handlers/message-handlers/challenge-handler.d.ts.map +1 -1
  68. package/dist/handlers/message-handlers/challenge-handler.js +3 -2
  69. package/dist/handlers/message-handlers/challenge-handler.js.map +1 -1
  70. package/dist/handlers/message-handlers/error-message-handler.d.ts +49 -31
  71. package/dist/handlers/message-handlers/error-message-handler.d.ts.map +1 -1
  72. package/dist/handlers/message-handlers/error-message-handler.js +2 -5
  73. package/dist/handlers/message-handlers/error-message-handler.js.map +1 -1
  74. package/dist/handlers/message-handlers/index.d.ts +11 -0
  75. package/dist/handlers/message-handlers/index.d.ts.map +1 -1
  76. package/dist/handlers/message-handlers/index.js +55 -1
  77. package/dist/handlers/message-handlers/index.js.map +1 -1
  78. package/dist/handlers/message-handlers/list-available-agents-handler.d.ts +1660 -0
  79. package/dist/handlers/message-handlers/list-available-agents-handler.d.ts.map +1 -0
  80. package/dist/handlers/message-handlers/list-available-agents-handler.js +35 -0
  81. package/dist/handlers/message-handlers/list-available-agents-handler.js.map +1 -0
  82. package/dist/handlers/message-handlers/list-room-agents-handler.d.ts +1669 -0
  83. package/dist/handlers/message-handlers/list-room-agents-handler.d.ts.map +1 -0
  84. package/dist/handlers/message-handlers/list-room-agents-handler.js +48 -0
  85. package/dist/handlers/message-handlers/list-room-agents-handler.js.map +1 -0
  86. package/dist/handlers/message-handlers/list-rooms-response-handler.d.ts +2 -110
  87. package/dist/handlers/message-handlers/list-rooms-response-handler.d.ts.map +1 -1
  88. package/dist/handlers/message-handlers/list-rooms-response-handler.js +4 -6
  89. package/dist/handlers/message-handlers/list-rooms-response-handler.js.map +1 -1
  90. package/dist/handlers/message-handlers/ping-pong-handler.d.ts +62 -58
  91. package/dist/handlers/message-handlers/ping-pong-handler.d.ts.map +1 -1
  92. package/dist/handlers/message-handlers/ping-pong-handler.js +4 -10
  93. package/dist/handlers/message-handlers/ping-pong-handler.js.map +1 -1
  94. package/dist/handlers/message-handlers/rate-limit-notification-handler.d.ts +94 -0
  95. package/dist/handlers/message-handlers/rate-limit-notification-handler.d.ts.map +1 -0
  96. package/dist/handlers/message-handlers/rate-limit-notification-handler.js +35 -0
  97. package/dist/handlers/message-handlers/rate-limit-notification-handler.js.map +1 -0
  98. package/dist/handlers/message-handlers/regular-message-handler.d.ts +31 -29
  99. package/dist/handlers/message-handlers/regular-message-handler.d.ts.map +1 -1
  100. package/dist/handlers/message-handlers/regular-message-handler.js +4 -6
  101. package/dist/handlers/message-handlers/regular-message-handler.js.map +1 -1
  102. package/dist/handlers/message-handlers/room-operation-response-handler.d.ts +328 -0
  103. package/dist/handlers/message-handlers/room-operation-response-handler.d.ts.map +1 -0
  104. package/dist/handlers/message-handlers/room-operation-response-handler.js +89 -0
  105. package/dist/handlers/message-handlers/room-operation-response-handler.js.map +1 -0
  106. package/dist/handlers/message-handlers/subscribe-response-handler.d.ts +53 -31
  107. package/dist/handlers/message-handlers/subscribe-response-handler.d.ts.map +1 -1
  108. package/dist/handlers/message-handlers/subscribe-response-handler.js +4 -6
  109. package/dist/handlers/message-handlers/subscribe-response-handler.js.map +1 -1
  110. package/dist/handlers/message-handlers/task-quote-handler.d.ts +14 -0
  111. package/dist/handlers/message-handlers/task-quote-handler.d.ts.map +1 -0
  112. package/dist/handlers/message-handlers/task-quote-handler.js +29 -0
  113. package/dist/handlers/message-handlers/task-quote-handler.js.map +1 -0
  114. package/dist/handlers/message-handlers/task-response-handler.js +2 -5
  115. package/dist/handlers/message-handlers/task-response-handler.js.map +1 -1
  116. package/dist/handlers/message-handlers/types.d.ts +21 -7
  117. package/dist/handlers/message-handlers/types.d.ts.map +1 -1
  118. package/dist/handlers/message-handlers/unsubscribe-response-handler.d.ts +53 -31
  119. package/dist/handlers/message-handlers/unsubscribe-response-handler.d.ts.map +1 -1
  120. package/dist/handlers/message-handlers/unsubscribe-response-handler.js +4 -6
  121. package/dist/handlers/message-handlers/unsubscribe-response-handler.js.map +1 -1
  122. package/dist/handlers/message-handlers/user-authenticated-handler.d.ts +40 -0
  123. package/dist/handlers/message-handlers/user-authenticated-handler.d.ts.map +1 -0
  124. package/dist/handlers/message-handlers/user-authenticated-handler.js +28 -0
  125. package/dist/handlers/message-handlers/user-authenticated-handler.js.map +1 -0
  126. package/dist/handlers/message-handlers/user-count-handler.d.ts +49 -0
  127. package/dist/handlers/message-handlers/user-count-handler.d.ts.map +1 -0
  128. package/dist/handlers/message-handlers/user-count-handler.js +31 -0
  129. package/dist/handlers/message-handlers/user-count-handler.js.map +1 -0
  130. package/dist/handlers/webhook-handler.d.ts +1 -1
  131. package/dist/handlers/webhook-handler.d.ts.map +1 -1
  132. package/dist/handlers/webhook-handler.js +14 -5
  133. package/dist/handlers/webhook-handler.js.map +1 -1
  134. package/dist/index.d.ts +6 -1
  135. package/dist/index.d.ts.map +1 -1
  136. package/dist/index.js +19 -2
  137. package/dist/index.js.map +1 -1
  138. package/dist/managers/admin-manager.d.ts +116 -0
  139. package/dist/managers/admin-manager.d.ts.map +1 -0
  140. package/dist/managers/admin-manager.js +169 -0
  141. package/dist/managers/admin-manager.js.map +1 -0
  142. package/dist/managers/agent-registry.d.ts +52 -1
  143. package/dist/managers/agent-registry.d.ts.map +1 -1
  144. package/dist/managers/agent-registry.js +145 -6
  145. package/dist/managers/agent-registry.js.map +1 -1
  146. package/dist/managers/agent-room-manager.d.ts +216 -0
  147. package/dist/managers/agent-room-manager.d.ts.map +1 -0
  148. package/dist/managers/agent-room-manager.js +555 -0
  149. package/dist/managers/agent-room-manager.js.map +1 -0
  150. package/dist/managers/connection-manager.js +2 -0
  151. package/dist/managers/connection-manager.js.map +1 -1
  152. package/dist/managers/index.d.ts +4 -1
  153. package/dist/managers/index.d.ts.map +1 -1
  154. package/dist/managers/index.js +7 -1
  155. package/dist/managers/index.js.map +1 -1
  156. package/dist/managers/message-router.d.ts +56 -5
  157. package/dist/managers/message-router.d.ts.map +1 -1
  158. package/dist/managers/message-router.js +155 -8
  159. package/dist/managers/message-router.js.map +1 -1
  160. package/dist/managers/room-management-manager.d.ts +213 -0
  161. package/dist/managers/room-management-manager.d.ts.map +1 -0
  162. package/dist/managers/room-management-manager.js +442 -0
  163. package/dist/managers/room-management-manager.js.map +1 -0
  164. package/dist/managers/room-manager.d.ts +11 -9
  165. package/dist/managers/room-manager.d.ts.map +1 -1
  166. package/dist/managers/room-manager.js +14 -10
  167. package/dist/managers/room-manager.js.map +1 -1
  168. package/dist/payments/index.d.ts +5 -0
  169. package/dist/payments/index.d.ts.map +1 -0
  170. package/dist/payments/index.js +21 -0
  171. package/dist/payments/index.js.map +1 -0
  172. package/dist/payments/payment-client.d.ts +74 -0
  173. package/dist/payments/payment-client.d.ts.map +1 -0
  174. package/dist/payments/payment-client.js +207 -0
  175. package/dist/payments/payment-client.js.map +1 -0
  176. package/dist/teneo-sdk.d.ts +467 -33
  177. package/dist/teneo-sdk.d.ts.map +1 -1
  178. package/dist/teneo-sdk.js +735 -26
  179. package/dist/teneo-sdk.js.map +1 -1
  180. package/dist/types/categories.d.ts +22 -0
  181. package/dist/types/categories.d.ts.map +1 -0
  182. package/dist/types/categories.js +40 -0
  183. package/dist/types/categories.js.map +1 -0
  184. package/dist/types/config.d.ts +134 -54
  185. package/dist/types/config.d.ts.map +1 -1
  186. package/dist/types/config.js +70 -9
  187. package/dist/types/config.js.map +1 -1
  188. package/dist/types/error-codes.d.ts +10 -0
  189. package/dist/types/error-codes.d.ts.map +1 -1
  190. package/dist/types/error-codes.js +12 -0
  191. package/dist/types/error-codes.js.map +1 -1
  192. package/dist/types/events.d.ts +176 -68
  193. package/dist/types/events.d.ts.map +1 -1
  194. package/dist/types/events.js +19 -1
  195. package/dist/types/events.js.map +1 -1
  196. package/dist/types/index.d.ts +3 -2
  197. package/dist/types/index.d.ts.map +1 -1
  198. package/dist/types/index.js +57 -2
  199. package/dist/types/index.js.map +1 -1
  200. package/dist/types/messages.d.ts +22225 -2592
  201. package/dist/types/messages.d.ts.map +1 -1
  202. package/dist/types/messages.js +537 -28
  203. package/dist/types/messages.js.map +1 -1
  204. package/dist/utils/bounded-queue.d.ts.map +1 -1
  205. package/dist/utils/bounded-queue.js +5 -2
  206. package/dist/utils/bounded-queue.js.map +1 -1
  207. package/dist/utils/circuit-breaker.js +11 -4
  208. package/dist/utils/circuit-breaker.js.map +1 -1
  209. package/dist/utils/deduplication-cache.js +3 -1
  210. package/dist/utils/deduplication-cache.js.map +1 -1
  211. package/dist/utils/event-waiter.d.ts +3 -3
  212. package/dist/utils/event-waiter.d.ts.map +1 -1
  213. package/dist/utils/index.d.ts +1 -0
  214. package/dist/utils/index.d.ts.map +1 -1
  215. package/dist/utils/index.js +4 -1
  216. package/dist/utils/index.js.map +1 -1
  217. package/dist/utils/logger.js.map +1 -1
  218. package/dist/utils/pricing-resolver.d.ts +26 -0
  219. package/dist/utils/pricing-resolver.d.ts.map +1 -0
  220. package/dist/utils/pricing-resolver.js +85 -0
  221. package/dist/utils/pricing-resolver.js.map +1 -0
  222. package/dist/utils/rate-limiter.d.ts.map +1 -1
  223. package/dist/utils/rate-limiter.js +6 -0
  224. package/dist/utils/rate-limiter.js.map +1 -1
  225. package/dist/utils/retry-policy.js +1 -0
  226. package/dist/utils/retry-policy.js.map +1 -1
  227. package/dist/utils/secure-private-key.js +3 -1
  228. package/dist/utils/secure-private-key.js.map +1 -1
  229. package/dist/utils/signature-verifier.d.ts.map +1 -1
  230. package/dist/utils/signature-verifier.js +3 -1
  231. package/dist/utils/signature-verifier.js.map +1 -1
  232. package/examples/.env.example +2 -2
  233. package/examples/agent-room-management-example.ts +335 -0
  234. package/examples/basic-usage.ts +3 -4
  235. package/examples/claude-agent-x-follower/.env.example +3 -3
  236. package/examples/claude-agent-x-follower/QUICKSTART.md +3 -3
  237. package/examples/claude-agent-x-follower/README.md +3 -3
  238. package/examples/claude-agent-x-follower/index.ts +120 -96
  239. package/examples/n8n-teneo/.env.example +3 -3
  240. package/examples/n8n-teneo/README.md +2 -2
  241. package/examples/n8n-teneo/index.ts +54 -44
  242. package/examples/nestjs-dashboard/.env.example +11 -0
  243. package/examples/nestjs-dashboard/README.md +297 -0
  244. package/examples/nestjs-dashboard/nest-cli.json +10 -0
  245. package/examples/nestjs-dashboard/package.json +44 -0
  246. package/examples/nestjs-dashboard/pnpm-lock.yaml +3079 -0
  247. package/examples/nestjs-dashboard/src/app.controller.ts +24 -0
  248. package/examples/nestjs-dashboard/src/app.module.ts +15 -0
  249. package/examples/nestjs-dashboard/src/main.ts +32 -0
  250. package/examples/nestjs-dashboard/src/public/dashboard.html +1144 -0
  251. package/examples/nestjs-dashboard/src/teneo/agents.controller.ts +54 -0
  252. package/examples/nestjs-dashboard/src/teneo/events.controller.ts +65 -0
  253. package/examples/nestjs-dashboard/src/teneo/messages.controller.ts +47 -0
  254. package/examples/nestjs-dashboard/src/teneo/rooms.controller.ts +258 -0
  255. package/examples/nestjs-dashboard/src/teneo/teneo.module.ts +13 -0
  256. package/examples/nestjs-dashboard/src/teneo/teneo.service.ts +484 -0
  257. package/examples/nestjs-dashboard/tsconfig.json +22 -0
  258. package/examples/openai-teneo/.env.example +3 -3
  259. package/examples/openai-teneo/README.md +3 -3
  260. package/examples/openai-teneo/index.ts +82 -71
  261. package/examples/production-dashboard/.env.example +3 -3
  262. package/examples/production-dashboard/README.md +90 -13
  263. package/examples/production-dashboard/public/dashboard.html +1173 -601
  264. package/examples/production-dashboard/server.ts +349 -7
  265. package/examples/room-management-example.ts +282 -0
  266. package/examples/usage/.env.example +2 -2
  267. package/examples/usage/01-connect.ts +3 -4
  268. package/examples/usage/02-list-agents.ts +2 -3
  269. package/examples/usage/03-pick-agent.ts +2 -3
  270. package/examples/usage/04-find-by-capability.ts +2 -3
  271. package/examples/usage/05-webhook-example.ts +2 -3
  272. package/examples/usage/06-simple-api-server.ts +2 -3
  273. package/examples/usage/07-event-listener.ts +2 -3
  274. package/examples/usage/README.md +1 -1
  275. package/examples/webhook-integration.ts +1 -1
  276. package/examples/x-influencer-battle-server.ts +2 -2
  277. package/package.json +12 -1
  278. package/src/core/websocket-client.test.ts +8 -3
  279. package/src/core/websocket-client.ts +58 -4
  280. package/src/formatters/response-formatter.test.ts +2 -0
  281. package/src/formatters/response-formatter.ts +3 -3
  282. package/src/handlers/message-handlers/agent-details-response-handler.ts +42 -0
  283. package/src/handlers/message-handlers/agent-room-operation-response-handler.ts +77 -0
  284. package/src/handlers/message-handlers/agent-status-update-handler.ts +52 -0
  285. package/src/handlers/message-handlers/all-agents-response-handler.ts +39 -0
  286. package/src/handlers/message-handlers/auth-message-handler.ts +78 -5
  287. package/src/handlers/message-handlers/auth-success-handler.ts +63 -6
  288. package/src/handlers/message-handlers/base-handler.ts +20 -7
  289. package/src/handlers/message-handlers/index.ts +53 -0
  290. package/src/handlers/message-handlers/list-available-agents-handler.ts +41 -0
  291. package/src/handlers/message-handlers/list-room-agents-handler.ts +58 -0
  292. package/src/handlers/message-handlers/list-rooms-response-handler.ts +4 -2
  293. package/src/handlers/message-handlers/rate-limit-notification-handler.ts +45 -0
  294. package/src/handlers/message-handlers/regular-message-handler.ts +3 -2
  295. package/src/handlers/message-handlers/room-operation-response-handler.ts +102 -0
  296. package/src/handlers/message-handlers/subscribe-response-handler.ts +12 -2
  297. package/src/handlers/message-handlers/task-quote-handler.ts +31 -0
  298. package/src/handlers/message-handlers/types.ts +41 -7
  299. package/src/handlers/message-handlers/unsubscribe-response-handler.ts +12 -2
  300. package/src/handlers/message-handlers/user-authenticated-handler.ts +31 -0
  301. package/src/handlers/message-handlers/user-count-handler.ts +34 -0
  302. package/src/handlers/webhook-handler.test.ts +3 -2
  303. package/src/handlers/webhook-handler.ts +13 -7
  304. package/src/index.ts +21 -0
  305. package/src/managers/admin-manager.ts +249 -0
  306. package/src/managers/agent-registry.test.ts +2 -1
  307. package/src/managers/agent-registry.ts +170 -2
  308. package/src/managers/agent-room-manager.ts +665 -0
  309. package/src/managers/index.ts +15 -1
  310. package/src/managers/message-router.ts +215 -17
  311. package/src/managers/room-management-manager.ts +520 -0
  312. package/src/managers/room-manager.ts +15 -20
  313. package/src/payments/index.ts +22 -0
  314. package/src/payments/payment-client.ts +240 -0
  315. package/src/teneo-sdk.ts +806 -30
  316. package/src/types/categories.ts +45 -0
  317. package/src/types/config.ts +80 -7
  318. package/src/types/error-codes.ts +14 -0
  319. package/src/types/events.test.ts +1 -0
  320. package/src/types/events.ts +67 -0
  321. package/src/types/index.ts +111 -0
  322. package/src/types/messages.test.ts +2 -1
  323. package/src/types/messages.ts +677 -42
  324. package/src/utils/bounded-queue.test.ts +1 -1
  325. package/src/utils/bounded-queue.ts +2 -1
  326. package/src/utils/circuit-breaker.test.ts +1 -1
  327. package/src/utils/deduplication-cache.test.ts +1 -1
  328. package/src/utils/event-waiter.test.ts +1 -1
  329. package/src/utils/event-waiter.ts +3 -3
  330. package/src/utils/index.ts +7 -0
  331. package/src/utils/logger.ts +8 -8
  332. package/src/utils/pricing-resolver.ts +128 -0
  333. package/src/utils/rate-limiter.test.ts +1 -1
  334. package/src/utils/rate-limiter.ts +1 -0
  335. package/src/utils/signature-verifier.test.ts +2 -2
  336. package/src/utils/signature-verifier.ts +3 -2
  337. package/tests/.env.example +7 -0
  338. package/tests/direct-agent-test.ts +151 -0
  339. package/tests/integration/real-server.test.ts +2 -0
  340. package/tests/integration/room-management.test.ts +516 -0
  341. package/tests/integration/websocket.test.ts +5 -2
  342. package/tests/payment-flow-test.ts +147 -0
  343. package/tests/unit/handlers/agent-room-operation-response-handler.test.ts +382 -0
  344. package/tests/unit/handlers/agent-status-update-handler.test.ts +403 -0
  345. package/tests/unit/handlers/auth-success-handler-rooms.test.ts +697 -0
  346. package/tests/unit/handlers/list-available-agents-handler.test.ts +248 -0
  347. package/tests/unit/handlers/list-room-agents-handler.test.ts +290 -0
  348. package/tests/unit/handlers/room-operation-response-handler.test.ts +500 -0
  349. package/tests/unit/managers/agent-room-manager.test.ts +527 -0
  350. package/tests/unit/managers/room-management-manager.test.ts +420 -0
  351. package/tsconfig.json +2 -2
  352. package/vitest.config.ts +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-room-agents-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-room-agents-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAA4B,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAKzC,qBAAa,qBAAsB,SAAQ,kBAAkB,CAAC,kBAAkB,CAAC;IAC/E,QAAQ,CAAC,IAAI,EAAG,sBAAsB,CAAU;IAChD,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAA4B;IAE3C,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CAyCtF"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /**
3
+ * Handler for room_agents_response messages (v2.0.0)
4
+ * Processes responses from list_room_agents requests
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ListRoomAgentsHandler = void 0;
8
+ const types_1 = require("../../types");
9
+ const base_handler_1 = require("./base-handler");
10
+ const events_1 = require("../../types/events");
11
+ const error_codes_1 = require("../../types/error-codes");
12
+ class ListRoomAgentsHandler extends base_handler_1.BaseMessageHandler {
13
+ type = "room_agents_response";
14
+ schema = types_1.RoomAgentsResponseSchema;
15
+ handleValidated(message, context) {
16
+ const { room_id, agents } = message.data;
17
+ context.logger.debug("Handling room_agents_response", {
18
+ roomId: room_id,
19
+ agentCount: agents?.length || 0
20
+ });
21
+ if (!room_id) {
22
+ const error = new events_1.SDKError("Room agents response missing room_id", error_codes_1.ErrorCode.VALIDATION_ERROR);
23
+ this.emit(context, "agent_room:list_error", error, undefined);
24
+ return;
25
+ }
26
+ // Parse agents array (handle undefined as empty array)
27
+ const agentList = agents || [];
28
+ context.logger.info("Room agents listed", {
29
+ roomId: room_id,
30
+ count: agentList.length
31
+ });
32
+ // Cache via agent room manager if available
33
+ const agentRoomManager = context.agentRoomManager;
34
+ if (agentRoomManager && typeof agentRoomManager.cacheRoomAgents === "function") {
35
+ agentRoomManager.cacheRoomAgents(room_id, agentList);
36
+ }
37
+ // Emit success event
38
+ this.emit(context, "agent_room:agents_listed", room_id, agentList);
39
+ // Send webhook
40
+ this.sendWebhook(context, "room_agents_listed", {
41
+ room_id,
42
+ agents: agentList,
43
+ count: agentList.length
44
+ });
45
+ }
46
+ }
47
+ exports.ListRoomAgentsHandler = ListRoomAgentsHandler;
48
+ //# sourceMappingURL=list-room-agents-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-room-agents-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-room-agents-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA2E;AAC3E,iDAAoD;AAEpD,+CAA8C;AAC9C,yDAAoD;AAGpD,MAAa,qBAAsB,SAAQ,iCAAsC;IACtE,IAAI,GAAG,sBAA+B,CAAC;IACvC,MAAM,GAAG,gCAAwB,CAAC;IAEjC,eAAe,CAAC,OAA2B,EAAE,OAAuB;QAC5E,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;QAEzC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE;YACpD,MAAM,EAAE,OAAO;YACf,UAAU,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;SAChC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,KAAK,GAAG,IAAI,iBAAQ,CACxB,sCAAsC,EACtC,uBAAS,CAAC,gBAAgB,CAC3B,CAAC;YACF,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;YAC9D,OAAO;QACT,CAAC;QAED,uDAAuD;QACvD,MAAM,SAAS,GAAoB,MAAM,IAAI,EAAE,CAAC;QAEhD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE;YACxC,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,SAAS,CAAC,MAAM;SACxB,CAAC,CAAC;QAEH,4CAA4C;QAC5C,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QAClD,IAAI,gBAAgB,IAAI,OAAO,gBAAgB,CAAC,eAAe,KAAK,UAAU,EAAE,CAAC;YAC/E,gBAAgB,CAAC,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACvD,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QAEnE,eAAe;QACf,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,oBAAoB,EAAE;YAC9C,OAAO;YACP,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,SAAS,CAAC,MAAM;SACxB,CAAC,CAAC;IACL,CAAC;CACF;AA7CD,sDA6CC"}
@@ -2,121 +2,13 @@
2
2
  * Handler for list_rooms response messages
3
3
  * Processes room list from server
4
4
  */
5
+ import { z } from "zod";
5
6
  import { ListRoomsResponse } from "../../types";
6
7
  import { BaseMessageHandler } from "./base-handler";
7
8
  import { HandlerContext } from "./types";
8
9
  export declare class ListRoomsResponseHandler extends BaseMessageHandler<ListRoomsResponse> {
9
10
  readonly type: "list_rooms";
10
- readonly schema: import("zod").ZodObject<{
11
- content: import("zod").ZodOptional<import("zod").ZodAny>;
12
- content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
13
- from: import("zod").ZodOptional<import("zod").ZodString>;
14
- to: import("zod").ZodOptional<import("zod").ZodString>;
15
- room: import("zod").ZodOptional<import("zod").ZodString>;
16
- timestamp: import("zod").ZodOptional<import("zod").ZodString>;
17
- signature: import("zod").ZodOptional<import("zod").ZodString>;
18
- publicKey: import("zod").ZodOptional<import("zod").ZodString>;
19
- reasoning: import("zod").ZodOptional<import("zod").ZodString>;
20
- task_id: import("zod").ZodOptional<import("zod").ZodString>;
21
- id: import("zod").ZodOptional<import("zod").ZodString>;
22
- } & {
23
- type: import("zod").ZodLiteral<"list_rooms">;
24
- data: import("zod").ZodObject<{
25
- rooms: import("zod").ZodArray<import("zod").ZodObject<{
26
- id: import("zod").ZodString;
27
- name: import("zod").ZodString;
28
- description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
29
- is_public: import("zod").ZodBoolean;
30
- created_at: import("zod").ZodString;
31
- updated_at: import("zod").ZodString;
32
- is_owner: import("zod").ZodBoolean;
33
- }, "strip", import("zod").ZodTypeAny, {
34
- name: string;
35
- id: string;
36
- is_public: boolean;
37
- created_at: string;
38
- updated_at: string;
39
- is_owner: boolean;
40
- description?: string | null | undefined;
41
- }, {
42
- name: string;
43
- id: string;
44
- is_public: boolean;
45
- created_at: string;
46
- updated_at: string;
47
- is_owner: boolean;
48
- description?: string | null | undefined;
49
- }>, "many">;
50
- }, "strip", import("zod").ZodTypeAny, {
51
- rooms: {
52
- name: string;
53
- id: string;
54
- is_public: boolean;
55
- created_at: string;
56
- updated_at: string;
57
- is_owner: boolean;
58
- description?: string | null | undefined;
59
- }[];
60
- }, {
61
- rooms: {
62
- name: string;
63
- id: string;
64
- is_public: boolean;
65
- created_at: string;
66
- updated_at: string;
67
- is_owner: boolean;
68
- description?: string | null | undefined;
69
- }[];
70
- }>;
71
- }, "strip", import("zod").ZodTypeAny, {
72
- type: "list_rooms";
73
- data: {
74
- rooms: {
75
- name: string;
76
- id: string;
77
- is_public: boolean;
78
- created_at: string;
79
- updated_at: string;
80
- is_owner: boolean;
81
- description?: string | null | undefined;
82
- }[];
83
- };
84
- id?: string | undefined;
85
- room?: string | undefined;
86
- content?: any;
87
- content_type?: "text/plain" | "text/markdown" | "text/html" | "application/json" | "image/*" | "STRING" | "JSON" | "MD" | "ARRAY" | undefined;
88
- from?: string | undefined;
89
- to?: string | undefined;
90
- timestamp?: string | undefined;
91
- signature?: string | undefined;
92
- publicKey?: string | undefined;
93
- reasoning?: string | undefined;
94
- task_id?: string | undefined;
95
- }, {
96
- type: "list_rooms";
97
- data: {
98
- rooms: {
99
- name: string;
100
- id: string;
101
- is_public: boolean;
102
- created_at: string;
103
- updated_at: string;
104
- is_owner: boolean;
105
- description?: string | null | undefined;
106
- }[];
107
- };
108
- id?: string | undefined;
109
- room?: string | undefined;
110
- content?: any;
111
- content_type?: "text/plain" | "text/markdown" | "text/html" | "application/json" | "image/*" | "STRING" | "JSON" | "MD" | "ARRAY" | undefined;
112
- from?: string | undefined;
113
- to?: string | undefined;
114
- timestamp?: string | undefined;
115
- signature?: string | undefined;
116
- publicKey?: string | undefined;
117
- reasoning?: string | undefined;
118
- task_id?: string | undefined;
119
- }>;
11
+ readonly schema: z.ZodType<ListRoomsResponse>;
120
12
  protected handleValidated(message: ListRoomsResponse, context: HandlerContext): void;
121
13
  }
122
14
  //# sourceMappingURL=list-rooms-response-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-rooms-response-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-rooms-response-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAA2B,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,wBAAyB,SAAQ,kBAAkB,CAAC,iBAAiB,CAAC;IACjF,QAAQ,CAAC,IAAI,EAAG,YAAY,CAAU;IACtC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAA2B;IAE1C,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CAcrF"}
1
+ {"version":3,"file":"list-rooms-response-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-rooms-response-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAA2B,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,wBAAyB,SAAQ,kBAAkB,CAAC,iBAAiB,CAAC;IACjF,QAAQ,CAAC,IAAI,EAAG,YAAY,CAAU;IAEtC,QAAQ,CAAC,MAAM,EAA8B,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE1E,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CAcrF"}
@@ -8,13 +8,11 @@ exports.ListRoomsResponseHandler = void 0;
8
8
  const types_1 = require("../../types");
9
9
  const base_handler_1 = require("./base-handler");
10
10
  class ListRoomsResponseHandler extends base_handler_1.BaseMessageHandler {
11
- constructor() {
12
- super(...arguments);
13
- this.type = "list_rooms";
14
- this.schema = types_1.ListRoomsResponseSchema;
15
- }
11
+ type = "list_rooms";
12
+ // Cast needed due to Zod transform creating input/output type mismatch
13
+ schema = types_1.ListRoomsResponseSchema;
16
14
  handleValidated(message, context) {
17
- context.logger.debug("Handling list_rooms response", {
15
+ context.logger.debug("Handling list_rooms", {
18
16
  roomCount: message.data.rooms.length
19
17
  });
20
18
  // Emit room:list event with room info array
@@ -1 +1 @@
1
- {"version":3,"file":"list-rooms-response-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-rooms-response-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAAyE;AACzE,iDAAoD;AAGpD,MAAa,wBAAyB,SAAQ,iCAAqC;IAAnF;;QACW,SAAI,GAAG,YAAqB,CAAC;QAC7B,WAAM,GAAG,+BAAuB,CAAC;IAgB5C,CAAC;IAdW,eAAe,CAAC,OAA0B,EAAE,OAAuB;QAC3E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE;YACnD,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;SACrC,CAAC,CAAC;QAEH,4CAA4C;QAC5C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEpD,iCAAiC;QACjC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE;YACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;YACzB,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;SACjC,CAAC,CAAC;IACL,CAAC;CACF;AAlBD,4DAkBC"}
1
+ {"version":3,"file":"list-rooms-response-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-rooms-response-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uCAAyE;AACzE,iDAAoD;AAGpD,MAAa,wBAAyB,SAAQ,iCAAqC;IACxE,IAAI,GAAG,YAAqB,CAAC;IACtC,uEAAuE;IAC9D,MAAM,GAAG,+BAAuD,CAAC;IAEhE,eAAe,CAAC,OAA0B,EAAE,OAAuB;QAC3E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE;YAC1C,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;SACrC,CAAC,CAAC;QAEH,4CAA4C;QAC5C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEpD,iCAAiC;QACjC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE;YACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;YACzB,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;SACjC,CAAC,CAAC;IACL,CAAC;CACF;AAnBD,4DAmBC"}
@@ -22,35 +22,37 @@ export declare class PingHandler extends BaseMessageHandler<PingMessage> {
22
22
  id: import("zod").ZodOptional<import("zod").ZodString>;
23
23
  } & {
24
24
  type: import("zod").ZodLiteral<"ping">;
25
- }, "strip", import("zod").ZodTypeAny, {
26
- type: "ping";
27
- id?: string | undefined;
28
- room?: string | undefined;
29
- content?: any;
30
- content_type?: "text/plain" | "text/markdown" | "text/html" | "application/json" | "image/*" | "STRING" | "JSON" | "MD" | "ARRAY" | undefined;
31
- from?: string | undefined;
32
- to?: string | undefined;
33
- timestamp?: string | undefined;
34
- data?: Record<string, any> | undefined;
35
- signature?: string | undefined;
36
- publicKey?: string | undefined;
37
- reasoning?: string | undefined;
38
- task_id?: string | undefined;
39
- }, {
40
- type: "ping";
41
- id?: string | undefined;
42
- room?: string | undefined;
43
- content?: any;
44
- content_type?: "text/plain" | "text/markdown" | "text/html" | "application/json" | "image/*" | "STRING" | "JSON" | "MD" | "ARRAY" | undefined;
45
- from?: string | undefined;
46
- to?: string | undefined;
47
- timestamp?: string | undefined;
48
- data?: Record<string, any> | undefined;
49
- signature?: string | undefined;
50
- publicKey?: string | undefined;
51
- reasoning?: string | undefined;
52
- task_id?: string | undefined;
53
- }>;
25
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
26
+ content: import("zod").ZodOptional<import("zod").ZodAny>;
27
+ content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
28
+ from: import("zod").ZodOptional<import("zod").ZodString>;
29
+ to: import("zod").ZodOptional<import("zod").ZodString>;
30
+ room: import("zod").ZodOptional<import("zod").ZodString>;
31
+ timestamp: import("zod").ZodOptional<import("zod").ZodString>;
32
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
33
+ signature: import("zod").ZodOptional<import("zod").ZodString>;
34
+ publicKey: import("zod").ZodOptional<import("zod").ZodString>;
35
+ reasoning: import("zod").ZodOptional<import("zod").ZodString>;
36
+ task_id: import("zod").ZodOptional<import("zod").ZodString>;
37
+ id: import("zod").ZodOptional<import("zod").ZodString>;
38
+ } & {
39
+ type: import("zod").ZodLiteral<"ping">;
40
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
41
+ content: import("zod").ZodOptional<import("zod").ZodAny>;
42
+ content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
43
+ from: import("zod").ZodOptional<import("zod").ZodString>;
44
+ to: import("zod").ZodOptional<import("zod").ZodString>;
45
+ room: import("zod").ZodOptional<import("zod").ZodString>;
46
+ timestamp: import("zod").ZodOptional<import("zod").ZodString>;
47
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
48
+ signature: import("zod").ZodOptional<import("zod").ZodString>;
49
+ publicKey: import("zod").ZodOptional<import("zod").ZodString>;
50
+ reasoning: import("zod").ZodOptional<import("zod").ZodString>;
51
+ task_id: import("zod").ZodOptional<import("zod").ZodString>;
52
+ id: import("zod").ZodOptional<import("zod").ZodString>;
53
+ } & {
54
+ type: import("zod").ZodLiteral<"ping">;
55
+ }, import("zod").ZodTypeAny, "passthrough">>;
54
56
  protected handleValidated(_message: PingMessage, context: HandlerContext): Promise<void>;
55
57
  }
56
58
  export declare class PongHandler extends BaseMessageHandler<PongMessage> {
@@ -70,35 +72,37 @@ export declare class PongHandler extends BaseMessageHandler<PongMessage> {
70
72
  id: import("zod").ZodOptional<import("zod").ZodString>;
71
73
  } & {
72
74
  type: import("zod").ZodLiteral<"pong">;
73
- }, "strip", import("zod").ZodTypeAny, {
74
- type: "pong";
75
- id?: string | undefined;
76
- room?: string | undefined;
77
- content?: any;
78
- content_type?: "text/plain" | "text/markdown" | "text/html" | "application/json" | "image/*" | "STRING" | "JSON" | "MD" | "ARRAY" | undefined;
79
- from?: string | undefined;
80
- to?: string | undefined;
81
- timestamp?: string | undefined;
82
- data?: Record<string, any> | undefined;
83
- signature?: string | undefined;
84
- publicKey?: string | undefined;
85
- reasoning?: string | undefined;
86
- task_id?: string | undefined;
87
- }, {
88
- type: "pong";
89
- id?: string | undefined;
90
- room?: string | undefined;
91
- content?: any;
92
- content_type?: "text/plain" | "text/markdown" | "text/html" | "application/json" | "image/*" | "STRING" | "JSON" | "MD" | "ARRAY" | undefined;
93
- from?: string | undefined;
94
- to?: string | undefined;
95
- timestamp?: string | undefined;
96
- data?: Record<string, any> | undefined;
97
- signature?: string | undefined;
98
- publicKey?: string | undefined;
99
- reasoning?: string | undefined;
100
- task_id?: string | undefined;
101
- }>;
75
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
76
+ content: import("zod").ZodOptional<import("zod").ZodAny>;
77
+ content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
78
+ from: import("zod").ZodOptional<import("zod").ZodString>;
79
+ to: import("zod").ZodOptional<import("zod").ZodString>;
80
+ room: import("zod").ZodOptional<import("zod").ZodString>;
81
+ timestamp: import("zod").ZodOptional<import("zod").ZodString>;
82
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
83
+ signature: import("zod").ZodOptional<import("zod").ZodString>;
84
+ publicKey: import("zod").ZodOptional<import("zod").ZodString>;
85
+ reasoning: import("zod").ZodOptional<import("zod").ZodString>;
86
+ task_id: import("zod").ZodOptional<import("zod").ZodString>;
87
+ id: import("zod").ZodOptional<import("zod").ZodString>;
88
+ } & {
89
+ type: import("zod").ZodLiteral<"pong">;
90
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
91
+ content: import("zod").ZodOptional<import("zod").ZodAny>;
92
+ content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
93
+ from: import("zod").ZodOptional<import("zod").ZodString>;
94
+ to: import("zod").ZodOptional<import("zod").ZodString>;
95
+ room: import("zod").ZodOptional<import("zod").ZodString>;
96
+ timestamp: import("zod").ZodOptional<import("zod").ZodString>;
97
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
98
+ signature: import("zod").ZodOptional<import("zod").ZodString>;
99
+ publicKey: import("zod").ZodOptional<import("zod").ZodString>;
100
+ reasoning: import("zod").ZodOptional<import("zod").ZodString>;
101
+ task_id: import("zod").ZodOptional<import("zod").ZodString>;
102
+ id: import("zod").ZodOptional<import("zod").ZodString>;
103
+ } & {
104
+ type: import("zod").ZodLiteral<"pong">;
105
+ }, import("zod").ZodTypeAny, "passthrough">>;
102
106
  protected handleValidated(_message: PongMessage, context: HandlerContext): Promise<void>;
103
107
  }
104
108
  //# sourceMappingURL=ping-pong-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ping-pong-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/ping-pong-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAwC,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,WAAY,SAAQ,kBAAkB,CAAC,WAAW,CAAC;IAC9D,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAU;IAChC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAqB;cAEpB,eAAe,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAK/F;AAED,qBAAa,WAAY,SAAQ,kBAAkB,CAAC,WAAW,CAAC;IAC9D,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAU;IAChC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAqB;cAEpB,eAAe,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAK/F"}
1
+ {"version":3,"file":"ping-pong-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/ping-pong-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAwC,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,WAAY,SAAQ,kBAAkB,CAAC,WAAW,CAAC;IAC9D,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAU;IAChC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAqB;cAEpB,eAAe,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAK/F;AAED,qBAAa,WAAY,SAAQ,kBAAkB,CAAC,WAAW,CAAC;IAC9D,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAU;IAChC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAqB;cAEpB,eAAe,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAK/F"}
@@ -8,11 +8,8 @@ exports.PongHandler = exports.PingHandler = void 0;
8
8
  const types_1 = require("../../types");
9
9
  const base_handler_1 = require("./base-handler");
10
10
  class PingHandler extends base_handler_1.BaseMessageHandler {
11
- constructor() {
12
- super(...arguments);
13
- this.type = "ping";
14
- this.schema = types_1.PingMessageSchema;
15
- }
11
+ type = "ping";
12
+ schema = types_1.PingMessageSchema;
16
13
  async handleValidated(_message, context) {
17
14
  // Ping messages are handled at the WebSocket level (ws library)
18
15
  // No special processing needed here
@@ -21,11 +18,8 @@ class PingHandler extends base_handler_1.BaseMessageHandler {
21
18
  }
22
19
  exports.PingHandler = PingHandler;
23
20
  class PongHandler extends base_handler_1.BaseMessageHandler {
24
- constructor() {
25
- super(...arguments);
26
- this.type = "pong";
27
- this.schema = types_1.PongMessageSchema;
28
- }
21
+ type = "pong";
22
+ schema = types_1.PongMessageSchema;
29
23
  async handleValidated(_message, context) {
30
24
  // Pong messages are handled at the WebSocket level (ws library)
31
25
  // No special processing needed here
@@ -1 +1 @@
1
- {"version":3,"file":"ping-pong-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/ping-pong-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA6F;AAC7F,iDAAoD;AAGpD,MAAa,WAAY,SAAQ,iCAA+B;IAAhE;;QACW,SAAI,GAAG,MAAe,CAAC;QACvB,WAAM,GAAG,yBAAiB,CAAC;IAOtC,CAAC;IALW,KAAK,CAAC,eAAe,CAAC,QAAqB,EAAE,OAAuB;QAC5E,gEAAgE;QAChE,oCAAoC;QACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACxC,CAAC;CACF;AATD,kCASC;AAED,MAAa,WAAY,SAAQ,iCAA+B;IAAhE;;QACW,SAAI,GAAG,MAAe,CAAC;QACvB,WAAM,GAAG,yBAAiB,CAAC;IAOtC,CAAC;IALW,KAAK,CAAC,eAAe,CAAC,QAAqB,EAAE,OAAuB;QAC5E,gEAAgE;QAChE,oCAAoC;QACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACxC,CAAC;CACF;AATD,kCASC"}
1
+ {"version":3,"file":"ping-pong-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/ping-pong-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA6F;AAC7F,iDAAoD;AAGpD,MAAa,WAAY,SAAQ,iCAA+B;IACrD,IAAI,GAAG,MAAe,CAAC;IACvB,MAAM,GAAG,yBAAiB,CAAC;IAE1B,KAAK,CAAC,eAAe,CAAC,QAAqB,EAAE,OAAuB;QAC5E,gEAAgE;QAChE,oCAAoC;QACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACxC,CAAC;CACF;AATD,kCASC;AAED,MAAa,WAAY,SAAQ,iCAA+B;IACrD,IAAI,GAAG,MAAe,CAAC;IACvB,MAAM,GAAG,yBAAiB,CAAC;IAE1B,KAAK,CAAC,eAAe,CAAC,QAAqB,EAAE,OAAuB;QAC5E,gEAAgE;QAChE,oCAAoC;QACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACxC,CAAC;CACF;AATD,kCASC"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Handler for rate_limit_notification messages
3
+ * Processes rate limit notifications from the server
4
+ */
5
+ import { RateLimitNotificationMessage } from "../../types";
6
+ import { BaseMessageHandler } from "./base-handler";
7
+ import { HandlerContext } from "./types";
8
+ export declare class RateLimitNotificationHandler extends BaseMessageHandler<RateLimitNotificationMessage> {
9
+ readonly type: "rate_limit_notification";
10
+ readonly schema: import("zod").ZodObject<{
11
+ type: import("zod").ZodLiteral<"rate_limit_notification">;
12
+ data: import("zod").ZodObject<{
13
+ title: import("zod").ZodString;
14
+ message: import("zod").ZodString;
15
+ cta_text: import("zod").ZodOptional<import("zod").ZodString>;
16
+ cta_link: import("zod").ZodOptional<import("zod").ZodString>;
17
+ message_type: import("zod").ZodString;
18
+ limit_type: import("zod").ZodString;
19
+ reset_at: import("zod").ZodOptional<import("zod").ZodString>;
20
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
21
+ title: import("zod").ZodString;
22
+ message: import("zod").ZodString;
23
+ cta_text: import("zod").ZodOptional<import("zod").ZodString>;
24
+ cta_link: import("zod").ZodOptional<import("zod").ZodString>;
25
+ message_type: import("zod").ZodString;
26
+ limit_type: import("zod").ZodString;
27
+ reset_at: import("zod").ZodOptional<import("zod").ZodString>;
28
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
29
+ title: import("zod").ZodString;
30
+ message: import("zod").ZodString;
31
+ cta_text: import("zod").ZodOptional<import("zod").ZodString>;
32
+ cta_link: import("zod").ZodOptional<import("zod").ZodString>;
33
+ message_type: import("zod").ZodString;
34
+ limit_type: import("zod").ZodString;
35
+ reset_at: import("zod").ZodOptional<import("zod").ZodString>;
36
+ }, import("zod").ZodTypeAny, "passthrough">>;
37
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
38
+ type: import("zod").ZodLiteral<"rate_limit_notification">;
39
+ data: import("zod").ZodObject<{
40
+ title: import("zod").ZodString;
41
+ message: import("zod").ZodString;
42
+ cta_text: import("zod").ZodOptional<import("zod").ZodString>;
43
+ cta_link: import("zod").ZodOptional<import("zod").ZodString>;
44
+ message_type: import("zod").ZodString;
45
+ limit_type: import("zod").ZodString;
46
+ reset_at: import("zod").ZodOptional<import("zod").ZodString>;
47
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
48
+ title: import("zod").ZodString;
49
+ message: import("zod").ZodString;
50
+ cta_text: import("zod").ZodOptional<import("zod").ZodString>;
51
+ cta_link: import("zod").ZodOptional<import("zod").ZodString>;
52
+ message_type: import("zod").ZodString;
53
+ limit_type: import("zod").ZodString;
54
+ reset_at: import("zod").ZodOptional<import("zod").ZodString>;
55
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
56
+ title: import("zod").ZodString;
57
+ message: import("zod").ZodString;
58
+ cta_text: import("zod").ZodOptional<import("zod").ZodString>;
59
+ cta_link: import("zod").ZodOptional<import("zod").ZodString>;
60
+ message_type: import("zod").ZodString;
61
+ limit_type: import("zod").ZodString;
62
+ reset_at: import("zod").ZodOptional<import("zod").ZodString>;
63
+ }, import("zod").ZodTypeAny, "passthrough">>;
64
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
65
+ type: import("zod").ZodLiteral<"rate_limit_notification">;
66
+ data: import("zod").ZodObject<{
67
+ title: import("zod").ZodString;
68
+ message: import("zod").ZodString;
69
+ cta_text: import("zod").ZodOptional<import("zod").ZodString>;
70
+ cta_link: import("zod").ZodOptional<import("zod").ZodString>;
71
+ message_type: import("zod").ZodString;
72
+ limit_type: import("zod").ZodString;
73
+ reset_at: import("zod").ZodOptional<import("zod").ZodString>;
74
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
75
+ title: import("zod").ZodString;
76
+ message: import("zod").ZodString;
77
+ cta_text: import("zod").ZodOptional<import("zod").ZodString>;
78
+ cta_link: import("zod").ZodOptional<import("zod").ZodString>;
79
+ message_type: import("zod").ZodString;
80
+ limit_type: import("zod").ZodString;
81
+ reset_at: import("zod").ZodOptional<import("zod").ZodString>;
82
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
83
+ title: import("zod").ZodString;
84
+ message: import("zod").ZodString;
85
+ cta_text: import("zod").ZodOptional<import("zod").ZodString>;
86
+ cta_link: import("zod").ZodOptional<import("zod").ZodString>;
87
+ message_type: import("zod").ZodString;
88
+ limit_type: import("zod").ZodString;
89
+ reset_at: import("zod").ZodOptional<import("zod").ZodString>;
90
+ }, import("zod").ZodTypeAny, "passthrough">>;
91
+ }, import("zod").ZodTypeAny, "passthrough">>;
92
+ protected handleValidated(message: RateLimitNotificationMessage, context: HandlerContext): void;
93
+ }
94
+ //# sourceMappingURL=rate-limit-notification-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rate-limit-notification-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/rate-limit-notification-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,4BAA4B,EAAsC,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,4BAA6B,SAAQ,kBAAkB,CAAC,4BAA4B,CAAC;IAChG,QAAQ,CAAC,IAAI,EAAG,yBAAyB,CAAU;IACnD,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAsC;IAErD,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,4BAA4B,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CA+BhG"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * Handler for rate_limit_notification messages
4
+ * Processes rate limit notifications from the server
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.RateLimitNotificationHandler = void 0;
8
+ const types_1 = require("../../types");
9
+ const base_handler_1 = require("./base-handler");
10
+ class RateLimitNotificationHandler extends base_handler_1.BaseMessageHandler {
11
+ type = "rate_limit_notification";
12
+ schema = types_1.RateLimitNotificationMessageSchema;
13
+ handleValidated(message, context) {
14
+ const { title, message: msg, cta_text, cta_link, message_type, limit_type, reset_at } = message.data;
15
+ context.logger.warn("Rate limit notification received", {
16
+ title,
17
+ limitType: limit_type,
18
+ resetAt: reset_at
19
+ });
20
+ // Emit rate limit event with camelCase conversion
21
+ this.emit(context, "rate_limit", {
22
+ title,
23
+ message: msg,
24
+ ctaText: cta_text,
25
+ ctaLink: cta_link,
26
+ messageType: message_type,
27
+ limitType: limit_type,
28
+ resetAt: reset_at
29
+ });
30
+ // Send webhook
31
+ this.sendWebhook(context, "rate_limit_notification", message.data);
32
+ }
33
+ }
34
+ exports.RateLimitNotificationHandler = RateLimitNotificationHandler;
35
+ //# sourceMappingURL=rate-limit-notification-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rate-limit-notification-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/rate-limit-notification-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA+F;AAC/F,iDAAoD;AAGpD,MAAa,4BAA6B,SAAQ,iCAAgD;IACvF,IAAI,GAAG,yBAAkC,CAAC;IAC1C,MAAM,GAAG,0CAAkC,CAAC;IAE3C,eAAe,CAAC,OAAqC,EAAE,OAAuB;QACtF,MAAM,EACJ,KAAK,EACL,OAAO,EAAE,GAAG,EACZ,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,QAAQ,EACT,GAAG,OAAO,CAAC,IAAI,CAAC;QAEjB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE;YACtD,KAAK;YACL,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;QAEH,kDAAkD;QAClD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE;YAC/B,KAAK;YACL,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,YAAY;YACzB,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;QAEH,eAAe;QACf,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,yBAAyB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;CACF;AAnCD,oEAmCC"}
@@ -22,35 +22,37 @@ export declare class RegularMessageHandler extends BaseMessageHandler<UserMessag
22
22
  type: import("zod").ZodLiteral<"message">;
23
23
  content: import("zod").ZodString;
24
24
  room: import("zod").ZodOptional<import("zod").ZodString>;
25
- }, "strip", import("zod").ZodTypeAny, {
26
- type: "message";
27
- content: string;
28
- id?: string | undefined;
29
- room?: string | undefined;
30
- content_type?: "text/plain" | "text/markdown" | "text/html" | "application/json" | "image/*" | "STRING" | "JSON" | "MD" | "ARRAY" | undefined;
31
- from?: string | undefined;
32
- to?: string | undefined;
33
- timestamp?: string | undefined;
34
- data?: Record<string, any> | undefined;
35
- signature?: string | undefined;
36
- publicKey?: string | undefined;
37
- reasoning?: string | undefined;
38
- task_id?: string | undefined;
39
- }, {
40
- type: "message";
41
- content: string;
42
- id?: string | undefined;
43
- room?: string | undefined;
44
- content_type?: "text/plain" | "text/markdown" | "text/html" | "application/json" | "image/*" | "STRING" | "JSON" | "MD" | "ARRAY" | undefined;
45
- from?: string | undefined;
46
- to?: string | undefined;
47
- timestamp?: string | undefined;
48
- data?: Record<string, any> | undefined;
49
- signature?: string | undefined;
50
- publicKey?: string | undefined;
51
- reasoning?: string | undefined;
52
- task_id?: string | undefined;
53
- }>;
25
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
26
+ content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
27
+ from: import("zod").ZodOptional<import("zod").ZodString>;
28
+ to: import("zod").ZodOptional<import("zod").ZodString>;
29
+ timestamp: import("zod").ZodOptional<import("zod").ZodString>;
30
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
31
+ signature: import("zod").ZodOptional<import("zod").ZodString>;
32
+ publicKey: import("zod").ZodOptional<import("zod").ZodString>;
33
+ reasoning: import("zod").ZodOptional<import("zod").ZodString>;
34
+ task_id: import("zod").ZodOptional<import("zod").ZodString>;
35
+ id: import("zod").ZodOptional<import("zod").ZodString>;
36
+ } & {
37
+ type: import("zod").ZodLiteral<"message">;
38
+ content: import("zod").ZodString;
39
+ room: import("zod").ZodOptional<import("zod").ZodString>;
40
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
41
+ content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
42
+ from: import("zod").ZodOptional<import("zod").ZodString>;
43
+ to: import("zod").ZodOptional<import("zod").ZodString>;
44
+ timestamp: import("zod").ZodOptional<import("zod").ZodString>;
45
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
46
+ signature: import("zod").ZodOptional<import("zod").ZodString>;
47
+ publicKey: import("zod").ZodOptional<import("zod").ZodString>;
48
+ reasoning: import("zod").ZodOptional<import("zod").ZodString>;
49
+ task_id: import("zod").ZodOptional<import("zod").ZodString>;
50
+ id: import("zod").ZodOptional<import("zod").ZodString>;
51
+ } & {
52
+ type: import("zod").ZodLiteral<"message">;
53
+ content: import("zod").ZodString;
54
+ room: import("zod").ZodOptional<import("zod").ZodString>;
55
+ }, import("zod").ZodTypeAny, "passthrough">>;
54
56
  protected handleValidated(message: UserMessage, context: HandlerContext): Promise<void>;
55
57
  }
56
58
  //# sourceMappingURL=regular-message-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"regular-message-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/regular-message-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAqB,MAAM,aAAa,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,qBAAsB,SAAQ,kBAAkB,CAAC,WAAW,CAAC;IACxE,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IACnC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAqB;cAEpB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAmD9F"}
1
+ {"version":3,"file":"regular-message-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/regular-message-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAA0C,MAAM,aAAa,CAAC;AAElF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,qBAAsB,SAAQ,kBAAkB,CAAC,WAAW,CAAC;IACxE,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IACnC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAqB;cAEpB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAoD9F"}