@artinet/sdk 0.5.5 → 0.5.7

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 (630) hide show
  1. package/CHANGELOG.md +128 -20
  2. package/README.md +542 -212
  3. package/dist/client/a2a-client.js +6 -1
  4. package/dist/client/a2a-client.js.map +1 -1
  5. package/dist/index.js +3 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/server/express/errors.js +51 -0
  8. package/dist/server/express/errors.js.map +1 -0
  9. package/dist/server/express/index.js +4 -0
  10. package/dist/server/express/index.js.map +1 -0
  11. package/dist/server/express/middeware.js +116 -0
  12. package/dist/server/express/middeware.js.map +1 -0
  13. package/dist/server/express/server.js +80 -0
  14. package/dist/server/express/server.js.map +1 -0
  15. package/dist/server/index.js +1 -7
  16. package/dist/server/index.js.map +1 -1
  17. package/dist/services/a2a/factory/builder.js +392 -0
  18. package/dist/services/a2a/factory/builder.js.map +1 -0
  19. package/dist/services/a2a/factory/context.js +151 -0
  20. package/dist/services/a2a/factory/context.js.map +1 -0
  21. package/dist/services/a2a/factory/event.js +182 -0
  22. package/dist/services/a2a/factory/event.js.map +1 -0
  23. package/dist/services/a2a/factory/index.js +6 -0
  24. package/dist/services/a2a/factory/index.js.map +1 -0
  25. package/dist/services/a2a/factory/method.js +15 -0
  26. package/dist/services/a2a/factory/method.js.map +1 -0
  27. package/dist/services/a2a/factory/service.js +12 -0
  28. package/dist/services/a2a/factory/service.js.map +1 -0
  29. package/dist/services/a2a/helpers/index.js +2 -0
  30. package/dist/services/a2a/helpers/index.js.map +1 -0
  31. package/dist/services/a2a/helpers/part.js +47 -0
  32. package/dist/services/a2a/helpers/part.js.map +1 -0
  33. package/dist/services/a2a/index.js +5 -1
  34. package/dist/services/a2a/index.js.map +1 -1
  35. package/dist/services/a2a/managers/cancellation.js +17 -0
  36. package/dist/services/a2a/managers/cancellation.js.map +1 -0
  37. package/dist/services/a2a/managers/connection.js +17 -0
  38. package/dist/services/a2a/managers/connection.js.map +1 -0
  39. package/dist/services/a2a/managers/context.js +17 -0
  40. package/dist/services/a2a/managers/context.js.map +1 -0
  41. package/dist/services/a2a/managers/index.js +6 -0
  42. package/dist/services/a2a/managers/index.js.map +1 -0
  43. package/dist/services/a2a/managers/task.js +17 -0
  44. package/dist/services/a2a/managers/task.js.map +1 -0
  45. package/dist/services/a2a/methods/cancel-task.js +47 -0
  46. package/dist/services/a2a/methods/cancel-task.js.map +1 -0
  47. package/dist/services/a2a/methods/get-task.js +15 -0
  48. package/dist/services/a2a/methods/get-task.js.map +1 -0
  49. package/dist/services/a2a/methods/index.js +6 -0
  50. package/dist/services/a2a/methods/index.js.map +1 -0
  51. package/dist/services/a2a/methods/resubscribe-task.js +77 -0
  52. package/dist/services/a2a/methods/resubscribe-task.js.map +1 -0
  53. package/dist/services/a2a/methods/send-message.js +20 -0
  54. package/dist/services/a2a/methods/send-message.js.map +1 -0
  55. package/dist/services/a2a/methods/stream-message.js +39 -0
  56. package/dist/services/a2a/methods/stream-message.js.map +1 -0
  57. package/dist/services/a2a/service.js +82 -236
  58. package/dist/services/a2a/service.js.map +1 -1
  59. package/dist/services/a2a/state/index.js +4 -0
  60. package/dist/services/a2a/state/index.js.map +1 -0
  61. package/dist/services/a2a/state/load.js +43 -0
  62. package/dist/services/a2a/state/load.js.map +1 -0
  63. package/dist/services/a2a/state/process.js +14 -0
  64. package/dist/services/a2a/state/process.js.map +1 -0
  65. package/dist/services/a2a/state/update/artifact.js +40 -0
  66. package/dist/services/a2a/state/update/artifact.js.map +1 -0
  67. package/dist/services/a2a/state/update/index.js +3 -0
  68. package/dist/services/a2a/state/update/index.js.map +1 -0
  69. package/dist/{server/lib/update/base.js → services/a2a/state/update/update.js} +23 -9
  70. package/dist/services/a2a/state/update/update.js.map +1 -0
  71. package/dist/services/core/execution/execute.js +26 -0
  72. package/dist/services/core/execution/execute.js.map +1 -0
  73. package/dist/services/core/execution/index.js +2 -0
  74. package/dist/services/core/execution/index.js.map +1 -0
  75. package/dist/services/core/index.js +3 -0
  76. package/dist/services/core/index.js.map +1 -0
  77. package/dist/services/core/managers/command.js +95 -0
  78. package/dist/services/core/managers/command.js.map +1 -0
  79. package/dist/services/core/managers/event.js +57 -0
  80. package/dist/services/core/managers/event.js.map +1 -0
  81. package/dist/services/core/managers/index.js +4 -0
  82. package/dist/services/core/managers/index.js.map +1 -0
  83. package/dist/services/core/managers/stream.js +78 -0
  84. package/dist/services/core/managers/stream.js.map +1 -0
  85. package/dist/services/index.js +3 -1
  86. package/dist/services/index.js.map +1 -1
  87. package/dist/services/mcp/service.js +114 -66
  88. package/dist/services/mcp/service.js.map +1 -1
  89. package/dist/transport/index.js +1 -1
  90. package/dist/transport/index.js.map +1 -1
  91. package/dist/transport/rpc/parser.js +13 -5
  92. package/dist/transport/rpc/parser.js.map +1 -1
  93. package/dist/transport/rpc/rpc-client.js +10 -2
  94. package/dist/transport/rpc/rpc-client.js.map +1 -1
  95. package/dist/transport/streaming/event-stream.js +5 -1
  96. package/dist/transport/streaming/event-stream.js.map +1 -1
  97. package/dist/transport/trpc/a2a/factory/index.js +2 -0
  98. package/dist/transport/trpc/a2a/factory/index.js.map +1 -0
  99. package/dist/transport/trpc/a2a/factory/router.js +17 -0
  100. package/dist/transport/trpc/a2a/factory/router.js.map +1 -0
  101. package/dist/transport/trpc/a2a/index.js +4 -0
  102. package/dist/transport/trpc/a2a/index.js.map +1 -0
  103. package/dist/transport/trpc/a2a/routes/index.js +4 -0
  104. package/dist/transport/trpc/a2a/routes/index.js.map +1 -0
  105. package/dist/transport/trpc/a2a/routes/info.js +10 -0
  106. package/dist/transport/trpc/a2a/routes/info.js.map +1 -0
  107. package/dist/transport/trpc/a2a/routes/message/index.js +2 -0
  108. package/dist/transport/trpc/a2a/routes/message/index.js.map +1 -0
  109. package/dist/transport/trpc/a2a/routes/message/route.js +38 -0
  110. package/dist/transport/trpc/a2a/routes/message/route.js.map +1 -0
  111. package/dist/transport/trpc/a2a/routes/tasks/index.js +2 -0
  112. package/dist/transport/trpc/a2a/routes/tasks/index.js.map +1 -0
  113. package/dist/transport/trpc/a2a/routes/tasks/route.js +71 -0
  114. package/dist/transport/trpc/a2a/routes/tasks/route.js.map +1 -0
  115. package/dist/transport/trpc/a2a/trpc.js +36 -0
  116. package/dist/transport/trpc/a2a/trpc.js.map +1 -0
  117. package/dist/transport/trpc/index.js +2 -0
  118. package/dist/transport/trpc/index.js.map +1 -0
  119. package/dist/types/client/a2a-client.d.ts +5 -1
  120. package/dist/types/client/a2a-client.d.ts.map +1 -1
  121. package/dist/types/ext.js +11 -0
  122. package/dist/types/ext.js.map +1 -0
  123. package/dist/types/index.d.ts +3 -2
  124. package/dist/types/index.d.ts.map +1 -1
  125. package/dist/types/index.js +3 -4
  126. package/dist/types/index.js.map +1 -1
  127. package/dist/types/interfaces/client.js +6 -0
  128. package/dist/types/interfaces/client.js.map +1 -0
  129. package/dist/types/interfaces/index.js +4 -0
  130. package/dist/types/interfaces/index.js.map +1 -0
  131. package/dist/types/interfaces/services/a2a/builder.js +6 -0
  132. package/dist/types/interfaces/services/a2a/builder.js.map +1 -0
  133. package/dist/types/interfaces/services/a2a/context.js +6 -0
  134. package/dist/types/interfaces/services/a2a/context.js.map +1 -0
  135. package/dist/types/interfaces/services/a2a/engine.js +6 -0
  136. package/dist/types/interfaces/services/a2a/engine.js.map +1 -0
  137. package/dist/types/interfaces/services/a2a/index.js +6 -0
  138. package/dist/types/interfaces/services/a2a/index.js.map +1 -0
  139. package/dist/types/interfaces/services/a2a/legacy.js +6 -0
  140. package/dist/types/interfaces/services/a2a/legacy.js.map +1 -0
  141. package/dist/types/interfaces/services/a2a/service.js +6 -0
  142. package/dist/types/interfaces/services/a2a/service.js.map +1 -0
  143. package/dist/types/interfaces/services/core/context/command.js +6 -0
  144. package/dist/types/interfaces/services/core/context/command.js.map +1 -0
  145. package/dist/types/interfaces/services/core/context/context.js +6 -0
  146. package/dist/types/interfaces/services/core/context/context.js.map +1 -0
  147. package/dist/types/interfaces/services/core/context/index.js +4 -0
  148. package/dist/types/interfaces/services/core/context/index.js.map +1 -0
  149. package/dist/types/interfaces/services/core/context/types.js +6 -0
  150. package/dist/types/interfaces/services/core/context/types.js.map +1 -0
  151. package/dist/types/interfaces/services/core/execution/engine.js +6 -0
  152. package/dist/types/interfaces/services/core/execution/engine.js.map +1 -0
  153. package/dist/types/interfaces/services/core/execution/environment.js +6 -0
  154. package/dist/types/interfaces/services/core/execution/environment.js.map +1 -0
  155. package/dist/types/interfaces/services/core/execution/execute.js +6 -0
  156. package/dist/types/interfaces/services/core/execution/execute.js.map +1 -0
  157. package/dist/types/interfaces/services/core/execution/index.js +4 -0
  158. package/dist/types/interfaces/services/core/execution/index.js.map +1 -0
  159. package/dist/types/interfaces/services/core/index.js +5 -0
  160. package/dist/types/interfaces/services/core/index.js.map +1 -0
  161. package/dist/types/interfaces/services/core/managers/cancellation.js +6 -0
  162. package/dist/types/interfaces/services/core/managers/cancellation.js.map +1 -0
  163. package/dist/types/interfaces/services/core/managers/connection.js +6 -0
  164. package/dist/types/interfaces/services/core/managers/connection.js.map +1 -0
  165. package/dist/types/interfaces/services/core/managers/context.js +6 -0
  166. package/dist/types/interfaces/services/core/managers/context.js.map +1 -0
  167. package/dist/types/interfaces/services/core/managers/event.js +6 -0
  168. package/dist/types/interfaces/services/core/managers/event.js.map +1 -0
  169. package/dist/types/interfaces/services/core/managers/index.js +7 -0
  170. package/dist/types/interfaces/services/core/managers/index.js.map +1 -0
  171. package/dist/types/interfaces/services/core/managers/stream.js +6 -0
  172. package/dist/types/interfaces/services/core/managers/stream.js.map +1 -0
  173. package/dist/types/interfaces/services/core/managers/task.js +2 -0
  174. package/dist/types/interfaces/services/core/managers/task.js.map +1 -0
  175. package/dist/types/interfaces/services/core/service.js +6 -0
  176. package/dist/types/interfaces/services/core/service.js.map +1 -0
  177. package/dist/types/interfaces/services/index.js +5 -0
  178. package/dist/types/interfaces/services/index.js.map +1 -0
  179. package/dist/types/interfaces/services/mcp/index.js +2 -0
  180. package/dist/types/interfaces/services/mcp/index.js.map +1 -0
  181. package/dist/types/interfaces/services/mcp/service.js +6 -0
  182. package/dist/types/interfaces/services/mcp/service.js.map +1 -0
  183. package/dist/types/{services → interfaces/services}/protocol.js +4 -0
  184. package/dist/types/interfaces/services/protocol.js.map +1 -0
  185. package/dist/types/interfaces/storage.js +6 -0
  186. package/dist/types/interfaces/storage.js.map +1 -0
  187. package/dist/types/schemas/a2a/agent.js +325 -0
  188. package/dist/types/schemas/a2a/agent.js.map +1 -0
  189. package/dist/types/schemas/a2a/auth.js +284 -0
  190. package/dist/types/schemas/a2a/auth.js.map +1 -0
  191. package/dist/types/schemas/a2a/error.js +119 -0
  192. package/dist/types/schemas/a2a/error.js.map +1 -1
  193. package/dist/types/schemas/a2a/index.js +8 -4
  194. package/dist/types/schemas/a2a/index.js.map +1 -1
  195. package/dist/types/schemas/a2a/kind.js +21 -0
  196. package/dist/types/schemas/a2a/kind.js.map +1 -0
  197. package/dist/types/schemas/a2a/message.js +130 -1
  198. package/dist/types/schemas/a2a/message.js.map +1 -1
  199. package/dist/types/schemas/a2a/notification.js +203 -1
  200. package/dist/types/schemas/a2a/notification.js.map +1 -1
  201. package/dist/types/schemas/a2a/parameters.js +241 -1
  202. package/dist/types/schemas/a2a/parameters.js.map +1 -1
  203. package/dist/types/schemas/a2a/protocol.js +60 -0
  204. package/dist/types/schemas/a2a/protocol.js.map +1 -0
  205. package/dist/types/schemas/a2a/rpc.js +126 -1
  206. package/dist/types/schemas/a2a/rpc.js.map +1 -1
  207. package/dist/types/schemas/a2a/task.js +131 -12
  208. package/dist/types/schemas/a2a/task.js.map +1 -1
  209. package/dist/types/schemas/a2a/transport.js +29 -0
  210. package/dist/types/schemas/a2a/transport.js.map +1 -0
  211. package/dist/types/schemas/deployment/index.js +3 -0
  212. package/dist/types/schemas/deployment/index.js.map +1 -0
  213. package/dist/types/schemas/deployment/proxy.js +6 -0
  214. package/dist/types/schemas/deployment/proxy.js.map +1 -0
  215. package/dist/types/schemas/deployment/request.js +88 -0
  216. package/dist/types/schemas/deployment/request.js.map +1 -0
  217. package/dist/types/schemas/index.js +1 -0
  218. package/dist/types/schemas/index.js.map +1 -1
  219. package/dist/types/server/express/errors.d.ts +10 -0
  220. package/dist/types/server/express/errors.d.ts.map +1 -0
  221. package/dist/types/server/express/index.d.ts +4 -0
  222. package/dist/types/server/express/index.d.ts.map +1 -0
  223. package/dist/types/server/express/middeware.d.ts +8 -0
  224. package/dist/types/server/express/middeware.d.ts.map +1 -0
  225. package/dist/types/server/express/server.d.ts +71 -0
  226. package/dist/types/server/express/server.d.ts.map +1 -0
  227. package/dist/types/server/index.d.ts +1 -7
  228. package/dist/types/server/index.d.ts.map +1 -1
  229. package/dist/types/services/a2a/factory/builder.d.ts +352 -0
  230. package/dist/types/services/a2a/factory/builder.d.ts.map +1 -0
  231. package/dist/types/services/a2a/factory/context.d.ts +133 -0
  232. package/dist/types/services/a2a/factory/context.d.ts.map +1 -0
  233. package/dist/types/services/a2a/factory/event.d.ts +59 -0
  234. package/dist/types/services/a2a/factory/event.d.ts.map +1 -0
  235. package/dist/types/services/a2a/factory/index.d.ts +6 -0
  236. package/dist/types/services/a2a/factory/index.d.ts.map +1 -0
  237. package/dist/types/services/a2a/factory/method.d.ts +7 -0
  238. package/dist/types/services/a2a/factory/method.d.ts.map +1 -0
  239. package/dist/types/services/a2a/factory/service.d.ts +10 -0
  240. package/dist/types/services/a2a/factory/service.d.ts.map +1 -0
  241. package/dist/types/services/a2a/helpers/index.d.ts +2 -0
  242. package/dist/types/services/a2a/helpers/index.d.ts.map +1 -0
  243. package/dist/types/services/a2a/helpers/part.d.ts +49 -0
  244. package/dist/types/services/a2a/helpers/part.d.ts.map +1 -0
  245. package/dist/types/services/a2a/index.d.ts +5 -1
  246. package/dist/types/services/a2a/index.d.ts.map +1 -1
  247. package/dist/types/services/a2a/managers/cancellation.d.ts +12 -0
  248. package/dist/types/services/a2a/managers/cancellation.d.ts.map +1 -0
  249. package/dist/types/services/a2a/managers/connection.d.ts +12 -0
  250. package/dist/types/services/a2a/managers/connection.d.ts.map +1 -0
  251. package/dist/types/services/a2a/managers/context.d.ts +12 -0
  252. package/dist/types/services/a2a/managers/context.d.ts.map +1 -0
  253. package/dist/types/services/a2a/managers/index.d.ts +6 -0
  254. package/dist/types/services/a2a/managers/index.d.ts.map +1 -0
  255. package/dist/types/services/a2a/managers/task.d.ts +12 -0
  256. package/dist/types/services/a2a/managers/task.d.ts.map +1 -0
  257. package/dist/types/services/a2a/methods/cancel-task.d.ts +8 -0
  258. package/dist/types/services/a2a/methods/cancel-task.d.ts.map +1 -0
  259. package/dist/types/services/a2a/methods/get-task.d.ts +113 -0
  260. package/dist/types/services/a2a/methods/get-task.d.ts.map +1 -0
  261. package/dist/types/services/a2a/methods/index.d.ts +6 -0
  262. package/dist/types/services/a2a/methods/index.d.ts.map +1 -0
  263. package/dist/types/services/a2a/methods/resubscribe-task.d.ts +8 -0
  264. package/dist/types/services/a2a/methods/resubscribe-task.d.ts.map +1 -0
  265. package/dist/types/services/a2a/methods/send-message.d.ts +8 -0
  266. package/dist/types/services/a2a/methods/send-message.d.ts.map +1 -0
  267. package/dist/types/services/a2a/methods/stream-message.d.ts +9 -0
  268. package/dist/types/services/a2a/methods/stream-message.d.ts.map +1 -0
  269. package/dist/types/services/a2a/service.d.ts +374 -41
  270. package/dist/types/services/a2a/service.d.ts.map +1 -1
  271. package/dist/types/services/a2a/state/index.d.ts +4 -0
  272. package/dist/types/services/a2a/state/index.d.ts.map +1 -0
  273. package/dist/types/services/a2a/state/load.d.ts +15 -0
  274. package/dist/types/services/a2a/state/load.d.ts.map +1 -0
  275. package/dist/types/services/a2a/state/process.d.ts +8 -0
  276. package/dist/types/services/a2a/state/process.d.ts.map +1 -0
  277. package/dist/types/services/a2a/state/update/artifact.d.ts +11 -0
  278. package/dist/types/services/a2a/state/update/artifact.d.ts.map +1 -0
  279. package/dist/types/services/a2a/state/update/index.d.ts +3 -0
  280. package/dist/types/services/a2a/state/update/index.d.ts.map +1 -0
  281. package/dist/types/services/a2a/state/update/update.d.ts +24 -0
  282. package/dist/types/services/a2a/state/update/update.d.ts.map +1 -0
  283. package/dist/types/services/core/execution/execute.d.ts +7 -0
  284. package/dist/types/services/core/execution/execute.d.ts.map +1 -0
  285. package/dist/types/services/core/execution/index.d.ts +2 -0
  286. package/dist/types/services/core/execution/index.d.ts.map +1 -0
  287. package/dist/types/services/core/index.d.ts +3 -0
  288. package/dist/types/services/core/index.d.ts.map +1 -0
  289. package/dist/types/services/core/managers/command.d.ts +40 -0
  290. package/dist/types/services/core/managers/command.d.ts.map +1 -0
  291. package/dist/types/services/core/managers/event.d.ts +19 -0
  292. package/dist/types/services/core/managers/event.d.ts.map +1 -0
  293. package/dist/types/services/core/managers/index.d.ts +4 -0
  294. package/dist/types/services/core/managers/index.d.ts.map +1 -0
  295. package/dist/types/services/core/managers/stream.d.ts +21 -0
  296. package/dist/types/services/core/managers/stream.d.ts.map +1 -0
  297. package/dist/types/services/index.d.ts +3 -1
  298. package/dist/types/services/index.d.ts.map +1 -1
  299. package/dist/types/services/mcp/service.d.ts +23 -22
  300. package/dist/types/services/mcp/service.d.ts.map +1 -1
  301. package/dist/types/transport/index.d.ts +1 -1
  302. package/dist/types/transport/index.d.ts.map +1 -1
  303. package/dist/types/transport/rpc/parser.d.ts +5 -1
  304. package/dist/types/transport/rpc/parser.d.ts.map +1 -1
  305. package/dist/types/transport/rpc/rpc-client.d.ts +5 -1
  306. package/dist/types/transport/rpc/rpc-client.d.ts.map +1 -1
  307. package/dist/types/transport/streaming/event-stream.d.ts +5 -1
  308. package/dist/types/transport/streaming/event-stream.d.ts.map +1 -1
  309. package/dist/types/transport/trpc/a2a/factory/index.d.ts +2 -0
  310. package/dist/types/transport/trpc/a2a/factory/index.d.ts.map +1 -0
  311. package/dist/types/transport/trpc/a2a/factory/router.d.ts +2631 -0
  312. package/dist/types/transport/trpc/a2a/factory/router.d.ts.map +1 -0
  313. package/dist/types/transport/trpc/a2a/index.d.ts +4 -0
  314. package/dist/types/transport/trpc/a2a/index.d.ts.map +1 -0
  315. package/dist/types/transport/trpc/a2a/routes/index.d.ts +4 -0
  316. package/dist/types/transport/trpc/a2a/routes/index.d.ts.map +1 -0
  317. package/dist/types/transport/trpc/a2a/routes/info.d.ts +102 -0
  318. package/dist/types/transport/trpc/a2a/routes/info.d.ts.map +1 -0
  319. package/dist/types/transport/trpc/a2a/routes/message/index.d.ts +2 -0
  320. package/dist/types/transport/trpc/a2a/routes/message/index.d.ts.map +1 -0
  321. package/dist/types/transport/trpc/a2a/routes/message/route.d.ts +523 -0
  322. package/dist/types/transport/trpc/a2a/routes/message/route.d.ts.map +1 -0
  323. package/dist/types/transport/trpc/a2a/routes/tasks/index.d.ts +2 -0
  324. package/dist/types/transport/trpc/a2a/routes/tasks/index.d.ts.map +1 -0
  325. package/dist/types/transport/trpc/a2a/routes/tasks/route.d.ts +646 -0
  326. package/dist/types/transport/trpc/a2a/routes/tasks/route.d.ts.map +1 -0
  327. package/dist/types/transport/trpc/a2a/trpc.d.ts +272 -0
  328. package/dist/types/transport/trpc/a2a/trpc.d.ts.map +1 -0
  329. package/dist/types/transport/trpc/index.d.ts +2 -0
  330. package/dist/types/transport/trpc/index.d.ts.map +1 -0
  331. package/dist/types/types/ext.d.ts +14 -0
  332. package/dist/types/types/ext.d.ts.map +1 -0
  333. package/dist/types/types/index.d.ts +3 -4
  334. package/dist/types/types/index.d.ts.map +1 -1
  335. package/dist/types/types/{client.d.ts → interfaces/client.d.ts} +7 -2
  336. package/dist/types/types/interfaces/client.d.ts.map +1 -0
  337. package/dist/types/types/interfaces/index.d.ts +4 -0
  338. package/dist/types/types/interfaces/index.d.ts.map +1 -0
  339. package/dist/types/types/interfaces/services/a2a/builder.d.ts +37 -0
  340. package/dist/types/types/interfaces/services/a2a/builder.d.ts.map +1 -0
  341. package/dist/types/types/interfaces/services/a2a/context.d.ts +163 -0
  342. package/dist/types/types/interfaces/services/a2a/context.d.ts.map +1 -0
  343. package/dist/types/types/interfaces/services/a2a/engine.d.ts +8 -0
  344. package/dist/types/types/interfaces/services/a2a/engine.d.ts.map +1 -0
  345. package/dist/types/types/interfaces/services/a2a/index.d.ts +6 -0
  346. package/dist/types/types/interfaces/services/a2a/index.d.ts.map +1 -0
  347. package/dist/types/types/interfaces/services/a2a/legacy.d.ts +90 -0
  348. package/dist/types/types/interfaces/services/a2a/legacy.d.ts.map +1 -0
  349. package/dist/types/types/interfaces/services/a2a/service.d.ts +409 -0
  350. package/dist/types/types/interfaces/services/a2a/service.d.ts.map +1 -0
  351. package/dist/types/types/interfaces/services/core/context/command.d.ts +26 -0
  352. package/dist/types/types/interfaces/services/core/context/command.d.ts.map +1 -0
  353. package/dist/types/types/interfaces/services/core/context/context.d.ts +208 -0
  354. package/dist/types/types/interfaces/services/core/context/context.d.ts.map +1 -0
  355. package/dist/types/types/interfaces/services/core/context/index.d.ts +4 -0
  356. package/dist/types/types/interfaces/services/core/context/index.d.ts.map +1 -0
  357. package/dist/types/types/interfaces/services/core/context/types.d.ts +12 -0
  358. package/dist/types/types/interfaces/services/core/context/types.d.ts.map +1 -0
  359. package/dist/types/types/interfaces/services/core/execution/engine.d.ts +107 -0
  360. package/dist/types/types/interfaces/services/core/execution/engine.d.ts.map +1 -0
  361. package/dist/types/types/interfaces/services/core/execution/environment.d.ts +12 -0
  362. package/dist/types/types/interfaces/services/core/execution/environment.d.ts.map +1 -0
  363. package/dist/types/types/interfaces/services/core/execution/execute.d.ts +8 -0
  364. package/dist/types/types/interfaces/services/core/execution/execute.d.ts.map +1 -0
  365. package/dist/types/types/interfaces/services/core/execution/index.d.ts +4 -0
  366. package/dist/types/types/interfaces/services/core/execution/index.d.ts.map +1 -0
  367. package/dist/types/types/interfaces/services/core/index.d.ts +5 -0
  368. package/dist/types/types/interfaces/services/core/index.d.ts.map +1 -0
  369. package/dist/types/types/interfaces/services/core/managers/cancellation.d.ts +10 -0
  370. package/dist/types/types/interfaces/services/core/managers/cancellation.d.ts.map +1 -0
  371. package/dist/types/types/interfaces/services/core/managers/connection.d.ts +10 -0
  372. package/dist/types/types/interfaces/services/core/managers/connection.d.ts.map +1 -0
  373. package/dist/types/types/interfaces/services/core/managers/context.d.ts +18 -0
  374. package/dist/types/types/interfaces/services/core/managers/context.d.ts.map +1 -0
  375. package/dist/types/types/interfaces/services/core/managers/event.d.ts +329 -0
  376. package/dist/types/types/interfaces/services/core/managers/event.d.ts.map +1 -0
  377. package/dist/types/types/interfaces/services/core/managers/index.d.ts +7 -0
  378. package/dist/types/types/interfaces/services/core/managers/index.d.ts.map +1 -0
  379. package/dist/types/types/interfaces/services/core/managers/stream.d.ts +218 -0
  380. package/dist/types/types/interfaces/services/core/managers/stream.d.ts.map +1 -0
  381. package/dist/types/types/interfaces/services/core/managers/task.d.ts +10 -0
  382. package/dist/types/types/interfaces/services/core/managers/task.d.ts.map +1 -0
  383. package/dist/types/types/interfaces/services/core/service.d.ts +116 -0
  384. package/dist/types/types/interfaces/services/core/service.d.ts.map +1 -0
  385. package/dist/types/types/interfaces/services/index.d.ts +5 -0
  386. package/dist/types/types/interfaces/services/index.d.ts.map +1 -0
  387. package/dist/types/types/interfaces/services/mcp/index.d.ts +2 -0
  388. package/dist/types/types/interfaces/services/mcp/index.d.ts.map +1 -0
  389. package/dist/types/types/interfaces/services/mcp/service.d.ts +50 -0
  390. package/dist/types/types/interfaces/services/mcp/service.d.ts.map +1 -0
  391. package/dist/types/types/{services → interfaces/services}/protocol.d.ts +4 -0
  392. package/dist/types/types/interfaces/services/protocol.d.ts.map +1 -0
  393. package/dist/types/types/interfaces/storage.d.ts +9 -0
  394. package/dist/types/types/interfaces/storage.d.ts.map +1 -0
  395. package/dist/types/types/schemas/a2a/agent.d.ts +2584 -0
  396. package/dist/types/types/schemas/a2a/agent.d.ts.map +1 -0
  397. package/dist/types/types/schemas/a2a/auth.d.ts +909 -0
  398. package/dist/types/types/schemas/a2a/auth.d.ts.map +1 -0
  399. package/dist/types/types/schemas/a2a/error.d.ts +349 -27
  400. package/dist/types/types/schemas/a2a/error.d.ts.map +1 -1
  401. package/dist/types/types/schemas/a2a/index.d.ts +8 -216
  402. package/dist/types/types/schemas/a2a/index.d.ts.map +1 -1
  403. package/dist/types/types/schemas/a2a/kind.d.ts +12 -0
  404. package/dist/types/types/schemas/a2a/kind.d.ts.map +1 -0
  405. package/dist/types/types/schemas/a2a/message.d.ts +10309 -55
  406. package/dist/types/types/schemas/a2a/message.d.ts.map +1 -1
  407. package/dist/types/types/schemas/a2a/notification.d.ts +1480 -49
  408. package/dist/types/types/schemas/a2a/notification.d.ts.map +1 -1
  409. package/dist/types/types/schemas/a2a/parameters.d.ts +878 -109
  410. package/dist/types/types/schemas/a2a/parameters.d.ts.map +1 -1
  411. package/dist/types/types/schemas/a2a/protocol.d.ts +14364 -0
  412. package/dist/types/types/schemas/a2a/protocol.d.ts.map +1 -0
  413. package/dist/types/types/schemas/a2a/rpc.d.ts +135 -56
  414. package/dist/types/types/schemas/a2a/rpc.d.ts.map +1 -1
  415. package/dist/types/types/schemas/a2a/task.d.ts +5841 -206
  416. package/dist/types/types/schemas/a2a/task.d.ts.map +1 -1
  417. package/dist/types/types/schemas/a2a/transport.d.ts +32 -0
  418. package/dist/types/types/schemas/a2a/transport.d.ts.map +1 -0
  419. package/dist/types/types/schemas/deployment/index.d.ts +3 -0
  420. package/dist/types/types/schemas/deployment/index.d.ts.map +1 -0
  421. package/dist/types/types/{proxy.d.ts → schemas/deployment/proxy.d.ts} +6 -2
  422. package/dist/types/types/schemas/deployment/proxy.d.ts.map +1 -0
  423. package/dist/types/types/schemas/deployment/request.d.ts +2848 -0
  424. package/dist/types/types/schemas/deployment/request.d.ts.map +1 -0
  425. package/dist/types/types/utils/index.d.ts +2 -0
  426. package/dist/types/types/utils/index.d.ts.map +1 -0
  427. package/dist/types/types/{transform.d.ts → utils/transform.d.ts} +4 -0
  428. package/dist/types/types/utils/transform.d.ts.map +1 -0
  429. package/dist/types/utils/api/register.d.ts +4 -0
  430. package/dist/types/utils/api/register.d.ts.map +1 -1
  431. package/dist/types/utils/common/constants.d.ts +8 -4
  432. package/dist/types/utils/common/constants.d.ts.map +1 -1
  433. package/dist/types/utils/common/errors.d.ts +6 -12
  434. package/dist/types/utils/common/errors.d.ts.map +1 -1
  435. package/dist/types/utils/common/utils.d.ts +4 -14
  436. package/dist/types/utils/common/utils.d.ts.map +1 -1
  437. package/dist/types/utils/common/zAsyncIterable-v3.d.ts +25 -0
  438. package/dist/types/utils/common/zAsyncIterable-v3.d.ts.map +1 -0
  439. package/dist/types/utils/common/zAsyncIterable.d.ts +23 -0
  440. package/dist/types/utils/common/zAsyncIterable.d.ts.map +1 -0
  441. package/dist/types/utils/deployment/agents.d.ts +5 -1
  442. package/dist/types/utils/deployment/agents.d.ts.map +1 -1
  443. package/dist/types/utils/deployment/bundler.d.ts +4 -0
  444. package/dist/types/utils/deployment/bundler.d.ts.map +1 -1
  445. package/dist/types/utils/deployment/full-deployment.d.ts +12 -2
  446. package/dist/types/utils/deployment/full-deployment.d.ts.map +1 -1
  447. package/dist/types/utils/deployment/index.d.ts +5 -0
  448. package/dist/types/utils/deployment/index.d.ts.map +1 -0
  449. package/dist/types/utils/deployment/task-wrapper.d.ts +6 -2
  450. package/dist/types/utils/deployment/task-wrapper.d.ts.map +1 -1
  451. package/dist/types/utils/deployment/test-deployment.d.ts +7 -2
  452. package/dist/types/utils/deployment/test-deployment.d.ts.map +1 -1
  453. package/dist/types/utils/index.d.ts +4 -6
  454. package/dist/types/utils/index.d.ts.map +1 -1
  455. package/dist/types/utils/index.js +2 -0
  456. package/dist/types/utils/index.js.map +1 -0
  457. package/dist/types/utils/logging/index.d.ts +3 -0
  458. package/dist/types/utils/logging/index.d.ts.map +1 -0
  459. package/dist/types/utils/logging/log.d.ts +4 -0
  460. package/dist/types/utils/logging/log.d.ts.map +1 -1
  461. package/dist/types/utils/logging/logger.d.ts +4 -0
  462. package/dist/types/utils/logging/logger.d.ts.map +1 -1
  463. package/dist/types/{server/lib → utils}/storage/file.d.ts +9 -4
  464. package/dist/types/utils/storage/file.d.ts.map +1 -0
  465. package/dist/types/{server/lib → utils}/storage/memory.d.ts +9 -4
  466. package/dist/types/utils/storage/memory.d.ts.map +1 -0
  467. package/dist/types/{transform.js → utils/transform.js} +2 -1
  468. package/dist/types/utils/transform.js.map +1 -0
  469. package/dist/utils/api/register.js +4 -0
  470. package/dist/utils/api/register.js.map +1 -1
  471. package/dist/utils/common/constants.js +20 -11
  472. package/dist/utils/common/constants.js.map +1 -1
  473. package/dist/utils/common/errors.js +7 -40
  474. package/dist/utils/common/errors.js.map +1 -1
  475. package/dist/utils/common/utils.js +4 -46
  476. package/dist/utils/common/utils.js.map +1 -1
  477. package/dist/utils/common/zAsyncIterable-v3.js +39 -0
  478. package/dist/utils/common/zAsyncIterable-v3.js.map +1 -0
  479. package/dist/utils/common/zAsyncIterable.js +41 -0
  480. package/dist/utils/common/zAsyncIterable.js.map +1 -0
  481. package/dist/utils/deployment/agents.js +4 -0
  482. package/dist/utils/deployment/agents.js.map +1 -1
  483. package/dist/utils/deployment/bundler.js +4 -0
  484. package/dist/utils/deployment/bundler.js.map +1 -1
  485. package/dist/utils/deployment/full-deployment.js +6 -2
  486. package/dist/utils/deployment/full-deployment.js.map +1 -1
  487. package/dist/utils/deployment/index.js +5 -0
  488. package/dist/utils/deployment/index.js.map +1 -0
  489. package/dist/utils/deployment/task-wrapper.js +4 -0
  490. package/dist/utils/deployment/task-wrapper.js.map +1 -1
  491. package/dist/utils/deployment/test-deployment.js +15 -7
  492. package/dist/utils/deployment/test-deployment.js.map +1 -1
  493. package/dist/utils/index.js +10 -6
  494. package/dist/utils/index.js.map +1 -1
  495. package/dist/utils/logging/index.js +3 -0
  496. package/dist/utils/logging/index.js.map +1 -0
  497. package/dist/utils/logging/log.js +4 -0
  498. package/dist/utils/logging/log.js.map +1 -1
  499. package/dist/utils/logging/logger.js +13 -0
  500. package/dist/utils/logging/logger.js.map +1 -1
  501. package/dist/{server/lib → utils}/storage/file.js +17 -6
  502. package/dist/utils/storage/file.js.map +1 -0
  503. package/dist/{server/lib → utils}/storage/memory.js +15 -5
  504. package/dist/utils/storage/memory.js.map +1 -0
  505. package/package.json +18 -7
  506. package/dist/server/a2a-server.js +0 -237
  507. package/dist/server/a2a-server.js.map +0 -1
  508. package/dist/server/interfaces/params.js +0 -3
  509. package/dist/server/interfaces/params.js.map +0 -1
  510. package/dist/server/interfaces/server.js +0 -2
  511. package/dist/server/interfaces/server.js.map +0 -1
  512. package/dist/server/interfaces/store.js +0 -18
  513. package/dist/server/interfaces/store.js.map +0 -1
  514. package/dist/server/lib/express-server.js +0 -252
  515. package/dist/server/lib/express-server.js.map +0 -1
  516. package/dist/server/lib/json-middleware.js +0 -3
  517. package/dist/server/lib/json-middleware.js.map +0 -1
  518. package/dist/server/lib/middleware/a2a-methods.js +0 -140
  519. package/dist/server/lib/middleware/a2a-methods.js.map +0 -1
  520. package/dist/server/lib/middleware/factory.js +0 -59
  521. package/dist/server/lib/middleware/factory.js.map +0 -1
  522. package/dist/server/lib/state.js +0 -80
  523. package/dist/server/lib/state.js.map +0 -1
  524. package/dist/server/lib/storage/file.js.map +0 -1
  525. package/dist/server/lib/storage/memory.js.map +0 -1
  526. package/dist/server/lib/update/base.js.map +0 -1
  527. package/dist/services/a2a/repository.js +0 -160
  528. package/dist/services/a2a/repository.js.map +0 -1
  529. package/dist/services/manager.js +0 -61
  530. package/dist/services/manager.js.map +0 -1
  531. package/dist/transport/streaming/stream.js +0 -111
  532. package/dist/transport/streaming/stream.js.map +0 -1
  533. package/dist/types/client.js +0 -2
  534. package/dist/types/client.js.map +0 -1
  535. package/dist/types/express.js +0 -2
  536. package/dist/types/express.js.map +0 -1
  537. package/dist/types/extended-schema.js +0 -7
  538. package/dist/types/extended-schema.js.map +0 -1
  539. package/dist/types/proxy.js +0 -2
  540. package/dist/types/proxy.js.map +0 -1
  541. package/dist/types/schemas/a2a/auth/auth.js +0 -2
  542. package/dist/types/schemas/a2a/auth/auth.js.map +0 -1
  543. package/dist/types/schemas/a2a/auth/base.js +0 -2
  544. package/dist/types/schemas/a2a/auth/base.js.map +0 -1
  545. package/dist/types/schemas/a2a/auth/index.js +0 -4
  546. package/dist/types/schemas/a2a/auth/index.js.map +0 -1
  547. package/dist/types/schemas/a2a/auth/oauth.js +0 -2
  548. package/dist/types/schemas/a2a/auth/oauth.js.map +0 -1
  549. package/dist/types/schemas/a2a/ref.js +0 -25
  550. package/dist/types/schemas/a2a/ref.js.map +0 -1
  551. package/dist/types/server/a2a-server.d.ts +0 -145
  552. package/dist/types/server/a2a-server.d.ts.map +0 -1
  553. package/dist/types/server/interfaces/params.d.ts +0 -109
  554. package/dist/types/server/interfaces/params.d.ts.map +0 -1
  555. package/dist/types/server/interfaces/server.d.ts +0 -35
  556. package/dist/types/server/interfaces/server.d.ts.map +0 -1
  557. package/dist/types/server/interfaces/store.d.ts +0 -35
  558. package/dist/types/server/interfaces/store.d.ts.map +0 -1
  559. package/dist/types/server/lib/express-server.d.ts +0 -59
  560. package/dist/types/server/lib/express-server.d.ts.map +0 -1
  561. package/dist/types/server/lib/json-middleware.d.ts +0 -3
  562. package/dist/types/server/lib/json-middleware.d.ts.map +0 -1
  563. package/dist/types/server/lib/middleware/a2a-methods.d.ts +0 -7
  564. package/dist/types/server/lib/middleware/a2a-methods.d.ts.map +0 -1
  565. package/dist/types/server/lib/middleware/factory.d.ts +0 -12
  566. package/dist/types/server/lib/middleware/factory.d.ts.map +0 -1
  567. package/dist/types/server/lib/state.d.ts +0 -20
  568. package/dist/types/server/lib/state.d.ts.map +0 -1
  569. package/dist/types/server/lib/storage/file.d.ts.map +0 -1
  570. package/dist/types/server/lib/storage/memory.d.ts.map +0 -1
  571. package/dist/types/server/lib/update/base.d.ts +0 -21
  572. package/dist/types/server/lib/update/base.d.ts.map +0 -1
  573. package/dist/types/services/a2a/repository.d.ts +0 -77
  574. package/dist/types/services/a2a/repository.d.ts.map +0 -1
  575. package/dist/types/services/a2a/repository.js +0 -2
  576. package/dist/types/services/a2a/repository.js.map +0 -1
  577. package/dist/types/services/a2a/service.js +0 -2
  578. package/dist/types/services/a2a/service.js.map +0 -1
  579. package/dist/types/services/context.js +0 -29
  580. package/dist/types/services/context.js.map +0 -1
  581. package/dist/types/services/dispatcher.js +0 -33
  582. package/dist/types/services/dispatcher.js.map +0 -1
  583. package/dist/types/services/index.js +0 -9
  584. package/dist/types/services/index.js.map +0 -1
  585. package/dist/types/services/manager.d.ts +0 -44
  586. package/dist/types/services/manager.d.ts.map +0 -1
  587. package/dist/types/services/manager.js +0 -2
  588. package/dist/types/services/manager.js.map +0 -1
  589. package/dist/types/services/mcp/service.js +0 -8
  590. package/dist/types/services/mcp/service.js.map +0 -1
  591. package/dist/types/services/protocol.js.map +0 -1
  592. package/dist/types/services/service.js +0 -2
  593. package/dist/types/services/service.js.map +0 -1
  594. package/dist/types/transform.js.map +0 -1
  595. package/dist/types/transport/streaming/stream.d.ts +0 -42
  596. package/dist/types/transport/streaming/stream.d.ts.map +0 -1
  597. package/dist/types/types/client.d.ts.map +0 -1
  598. package/dist/types/types/express.d.ts +0 -66
  599. package/dist/types/types/express.d.ts.map +0 -1
  600. package/dist/types/types/extended-schema.d.ts +0 -174
  601. package/dist/types/types/extended-schema.d.ts.map +0 -1
  602. package/dist/types/types/proxy.d.ts.map +0 -1
  603. package/dist/types/types/schemas/a2a/auth/auth.d.ts +0 -80
  604. package/dist/types/types/schemas/a2a/auth/auth.d.ts.map +0 -1
  605. package/dist/types/types/schemas/a2a/auth/base.d.ts +0 -16
  606. package/dist/types/types/schemas/a2a/auth/base.d.ts.map +0 -1
  607. package/dist/types/types/schemas/a2a/auth/index.d.ts +0 -4
  608. package/dist/types/types/schemas/a2a/auth/index.d.ts.map +0 -1
  609. package/dist/types/types/schemas/a2a/auth/oauth.d.ts +0 -124
  610. package/dist/types/types/schemas/a2a/auth/oauth.d.ts.map +0 -1
  611. package/dist/types/types/schemas/a2a/ref.d.ts +0 -2057
  612. package/dist/types/types/schemas/a2a/ref.d.ts.map +0 -1
  613. package/dist/types/types/services/a2a/repository.d.ts +0 -85
  614. package/dist/types/types/services/a2a/repository.d.ts.map +0 -1
  615. package/dist/types/types/services/a2a/service.d.ts +0 -29
  616. package/dist/types/types/services/a2a/service.d.ts.map +0 -1
  617. package/dist/types/types/services/context.d.ts +0 -167
  618. package/dist/types/types/services/context.d.ts.map +0 -1
  619. package/dist/types/types/services/dispatcher.d.ts +0 -20
  620. package/dist/types/types/services/dispatcher.d.ts.map +0 -1
  621. package/dist/types/types/services/index.d.ts +0 -9
  622. package/dist/types/types/services/index.d.ts.map +0 -1
  623. package/dist/types/types/services/manager.d.ts +0 -42
  624. package/dist/types/types/services/manager.d.ts.map +0 -1
  625. package/dist/types/types/services/mcp/service.d.ts +0 -57
  626. package/dist/types/types/services/mcp/service.d.ts.map +0 -1
  627. package/dist/types/types/services/protocol.d.ts.map +0 -1
  628. package/dist/types/types/services/service.d.ts +0 -35
  629. package/dist/types/types/services/service.d.ts.map +0 -1
  630. package/dist/types/types/transform.d.ts.map +0 -1
@@ -1,2 +1,204 @@
1
- export {};
1
+ /**
2
+ * Copyright 2025 The Artinet Project
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from "zod";
6
+ import { JSONRPCErrorResponseSchema, JSONRPCRequestSchema, JSONRPCSuccessResponseSchema, } from "./rpc.js";
7
+ import { TaskIdParamsSchema } from "./task.js";
8
+ /**
9
+ * Defines parameters for fetching a specific push notification configuration for a task.
10
+ */
11
+ export const GetTaskPushNotificationConfigParamSchema = TaskIdParamsSchema.extend({
12
+ /**
13
+ * @optional The ID of the push notification configuration to retrieve.
14
+ */
15
+ pushNotificationConfigId: z.string().optional(),
16
+ });
17
+ export const GetTaskPushNotificationConfigParamsSchema = z.union([
18
+ GetTaskPushNotificationConfigParamSchema,
19
+ TaskIdParamsSchema,
20
+ ]);
21
+ /**
22
+ * Defines parameters for listing all push notification configurations for a task.
23
+ */
24
+ export const ListTaskPushNotificationConfigsParamsSchema = TaskIdParamsSchema.extend({});
25
+ /**
26
+ * Defines parameters for deleting a specific push notification configuration for a task.
27
+ */
28
+ export const DeleteTaskPushNotificationConfigParamsSchema = TaskIdParamsSchema.extend({
29
+ /**
30
+ * @required The ID of the push notification configuration to delete.
31
+ */
32
+ pushNotificationConfigId: z.string(),
33
+ });
34
+ /**
35
+ * @description Defines authentication details for a push notification endpoint.
36
+ */
37
+ export const PushNotificationAuthenticationInfoSchema = z
38
+ .object({
39
+ /**
40
+ * @required A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
41
+ */
42
+ schemes: z
43
+ .array(z.string())
44
+ .describe("The authentication schemes supported by the endpoint."),
45
+ /**
46
+ * @optional Optional credentials required by the push notification endpoint.
47
+ */
48
+ credentials: z.string().optional(),
49
+ })
50
+ .describe("Defines authentication details for a push notification endpoint.");
51
+ /**
52
+ * @description Defines the configuration for setting up push notifications for task updates.
53
+ */
54
+ export const PushNotificationConfigSchema = z
55
+ .object({
56
+ /**
57
+ * @optional A unique ID for the push notification configuration, created by the server
58
+ * to support multiple notification callbacks.
59
+ */
60
+ id: z
61
+ .string()
62
+ .optional()
63
+ .describe("A unique ID for the push notification configuration, created by the server to support multiple notification callbacks."),
64
+ /**
65
+ * @required The callback URL where the agent should send push notifications.
66
+ */
67
+ url: z
68
+ .string()
69
+ .url()
70
+ .describe("The callback URL where the agent should send push notifications."),
71
+ /**
72
+ * @optional A unique token for this task or session to validate incoming push notifications.
73
+ */
74
+ token: z
75
+ .string()
76
+ .optional()
77
+ .describe("A unique token for this task or session to validate incoming push notifications."),
78
+ /**
79
+ * @optional Authentication details for the agent to use when calling the notification URL.
80
+ */
81
+ authentication: PushNotificationAuthenticationInfoSchema.optional().describe("Authentication details for the agent to use when calling the notification URL."),
82
+ })
83
+ .describe("Defines the configuration for setting up push notifications for task updates.");
84
+ /**
85
+ * @description A container associating a push notification configuration with a specific task.
86
+ */
87
+ export const TaskPushNotificationConfigSchema = z
88
+ .object({
89
+ /**
90
+ * @required The ID of the task to associate with the push notification configuration.
91
+ */
92
+ taskId: z
93
+ .string()
94
+ .describe("The ID of the task to associate with the push notification configuration."),
95
+ /**
96
+ * @required The push notification configuration to associate with the task.
97
+ */
98
+ pushNotificationConfig: PushNotificationConfigSchema.describe("The push notification configuration to associate with the task."),
99
+ })
100
+ .describe("A container associating a push notification configuration with a specific task.");
101
+ /**
102
+ * @description Request to set or update the push notification config for a task.
103
+ */
104
+ export const SetTaskPushNotificationConfigRequestSchema = JSONRPCRequestSchema.extend({
105
+ method: z.literal("tasks/pushNotificationConfig/set"),
106
+ params: TaskPushNotificationConfigSchema.describe("Defines the parameters for a request to set or update the push notification config for a task."),
107
+ }).describe("Represents a JSON-RPC request for the `tasks/pushNotificationConfig/set` method.");
108
+ /**
109
+ * @description JSON-RPC success response model for the 'tasks/pushNotificationConfig/set' method.
110
+ */
111
+ export const SetTaskPushNotificationConfigSuccessResponseSchema = JSONRPCSuccessResponseSchema.extend({
112
+ /**
113
+ * @required The result of the request, which can be a direct reply Message or the initial Task object.
114
+ */
115
+ result: TaskPushNotificationConfigSchema.describe("The result of the request, which can be a direct reply Message or the initial Task object."),
116
+ }).describe("JSON-RPC success response model for the 'tasks/pushNotificationConfig/set' method.");
117
+ /**
118
+ * @description Response to a `tasks/pushNotificationConfig/set` request.
119
+ */
120
+ export const SetTaskPushNotificationConfigResponseSchema = z
121
+ .union([
122
+ SetTaskPushNotificationConfigSuccessResponseSchema,
123
+ JSONRPCErrorResponseSchema,
124
+ ])
125
+ .describe("Response to a `tasks/pushNotificationConfig/set` request.");
126
+ /**
127
+ * @description Request to retrieve the currently configured push notification configuration for a task.
128
+ */
129
+ export const GetTaskPushNotificationConfigRequestSchema = JSONRPCRequestSchema.extend({
130
+ method: z.literal("tasks/pushNotificationConfig/get"),
131
+ params: GetTaskPushNotificationConfigParamsSchema.describe("Defines the parameters for a request to retrieve the currently configured push notification configuration for a task."),
132
+ }).describe("Represents a JSON-RPC request for the `tasks/pushNotificationConfig/get` method.");
133
+ /**
134
+ * @description JSON-RPC success response model for the 'tasks/pushNotificationConfig/get' method.
135
+ */
136
+ export const GetTaskPushNotificationConfigSuccessResponseSchema = JSONRPCSuccessResponseSchema.extend({
137
+ /**
138
+ * @required The result, containing the requested push notification configuration.
139
+ */
140
+ result: TaskPushNotificationConfigSchema.describe("The result, containing the requested push notification configuration."),
141
+ }).describe("JSON-RPC success response model for the 'tasks/pushNotificationConfig/get' method.");
142
+ /**
143
+ * @description Response to a `tasks/pushNotificationConfig/get` request.
144
+ */
145
+ export const GetTaskPushNotificationConfigResponseSchema = z
146
+ .union([
147
+ GetTaskPushNotificationConfigSuccessResponseSchema,
148
+ JSONRPCErrorResponseSchema,
149
+ ])
150
+ .describe("Response to a `tasks/pushNotificationConfig/get` request.");
151
+ /**
152
+ * @description Request to list all push notification configurations for a task.
153
+ */
154
+ export const ListTaskPushNotificationConfigRequestSchema = JSONRPCRequestSchema.extend({
155
+ method: z.literal("tasks/pushNotificationConfig/list"),
156
+ params: ListTaskPushNotificationConfigsParamsSchema.describe("Defines the parameters for a request to list all push notification configurations for a task."),
157
+ }).describe("Represents a JSON-RPC request for the `tasks/pushNotificationConfig/list` method.");
158
+ export const ListTaskPushNotificationConfigResultSchema = z
159
+ .array(TaskPushNotificationConfigSchema)
160
+ .describe("The list of push notification configurations.");
161
+ /**
162
+ * @description JSON-RPC success response model for the 'tasks/pushNotificationConfig/list' method.
163
+ */
164
+ export const ListTaskPushNotificationConfigSuccessResponseSchema = JSONRPCSuccessResponseSchema.extend({
165
+ /**
166
+ * @required The result, containing the list of push notification configurations.
167
+ */
168
+ result: ListTaskPushNotificationConfigResultSchema.describe("The result, containing the list of push notification configurations."),
169
+ }).describe("JSON-RPC success response model for the 'tasks/pushNotificationConfig/list' method.");
170
+ /**
171
+ * @description Response to a `tasks/pushNotificationConfig/list` request.
172
+ */
173
+ export const ListTaskPushNotificationConfigResponseSchema = z
174
+ .union([
175
+ ListTaskPushNotificationConfigSuccessResponseSchema,
176
+ JSONRPCErrorResponseSchema,
177
+ ])
178
+ .describe("Response to a `tasks/pushNotificationConfig/list` request.");
179
+ /**
180
+ * @description Request to delete a specific push notification configuration for a task.
181
+ */
182
+ export const DeleteTaskPushNotificationConfigRequestSchema = JSONRPCRequestSchema.extend({
183
+ method: z.literal("tasks/pushNotificationConfig/delete"),
184
+ params: DeleteTaskPushNotificationConfigParamsSchema.describe("Defines the parameters for a request to delete a specific push notification configuration for a task."),
185
+ }).describe("Represents a JSON-RPC request for the `tasks/pushNotificationConfig/delete` method.");
186
+ /**
187
+ * @description JSON-RPC success response model for the 'tasks/pushNotificationConfig/delete' method.
188
+ */
189
+ export const DeleteTaskPushNotificationConfigSuccessResponseSchema = JSONRPCSuccessResponseSchema.extend({
190
+ /**
191
+ * @required The result is null on successful deletion.
192
+ */
193
+ result: z.null().describe("The result is null on successful deletion."),
194
+ }).describe("JSON-RPC success response model for the 'tasks/pushNotificationConfig/delete' method.");
195
+ /**
196
+ * @description Response to a `tasks/pushNotificationConfig/delete` request.
197
+ */
198
+ export const DeleteTaskPushNotificationConfigResponseSchema = z
199
+ .union([
200
+ DeleteTaskPushNotificationConfigSuccessResponseSchema,
201
+ JSONRPCErrorResponseSchema,
202
+ ])
203
+ .describe("Response to a `tasks/pushNotificationConfig/delete` request.");
2
204
  //# sourceMappingURL=notification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../../src/types/schemas/a2a/notification.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../../src/types/schemas/a2a/notification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kB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M,EAAE,CAAC,CAAC,OAAO,CAAC,qCAAqC,CAAC;IACxD,MAAM,EAAE,4CAA4C,CAAC,QAAQ,CAC3D,uGAAuG,CACxG;CACF,CAAC,CAAC,QAAQ,CACT,qFAAqF,CACtF,CAAC;AAKJ;;GAEG;AACH,MAAM,CAAC,MAAM,qDAAqD,GAChE,4BAA4B,CAAC,MAAM,CAAC;IAClC;;OAEG;IACH,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;CACxE,CAAC,CAAC,QAAQ,CACT,uFAAuF,CACxF,CAAC;AAKJ;;GAEG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAG,CAAC;KAC5D,KAAK,CAAC;IACL,qDAAqD;IACrD,0BAA0B;CAC3B,CAAC;KACD,QAAQ,CAAC,8DAA8D,CAAC,CAAC"}
@@ -1,2 +1,242 @@
1
- export {};
1
+ /**
2
+ * Copyright 2025 The Artinet Project
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from "zod";
6
+ import { KindSchema } from "./kind.js";
7
+ /**
8
+ * @description Defines base properties common to all message or artifact parts.
9
+ */
10
+ export const PartBaseSchema = z
11
+ .object({
12
+ /**
13
+ * @optional Optional metadata associated with this part.
14
+ */
15
+ metadata: z
16
+ .record(z.string(), z.unknown())
17
+ .optional()
18
+ .describe("Optional metadata associated with this part."),
19
+ })
20
+ .describe("Defines base properties common to all message or artifact parts.");
21
+ /**
22
+ * @description Defines base properties for a file.
23
+ */
24
+ export const FileBaseSchema = z
25
+ .object({
26
+ /**
27
+ * @optional An optional name for the file (e.g., "document.pdf").
28
+ */
29
+ name: z
30
+ .string()
31
+ .optional()
32
+ .describe("An optional name for the file (e.g., 'document.pdf')."),
33
+ /**
34
+ * @optional The MIME type of the file (e.g., "application/pdf").
35
+ */
36
+ mimeType: z
37
+ .string()
38
+ .optional()
39
+ .describe("The MIME type of the file (e.g., 'application/pdf')."),
40
+ })
41
+ .describe("Defines base properties for a file.");
42
+ /**
43
+ * @description Represents a file with its content provided directly as a base64-encoded string.
44
+ */
45
+ export const FileWithBytesSchema = FileBaseSchema.extend({
46
+ /**
47
+ * @required The base64-encoded content of the file.
48
+ */
49
+ bytes: z.string().describe("The base64-encoded content of the file."),
50
+ /**
51
+ * @optional The `uri` property must be absent when `bytes` is present.
52
+ */
53
+ uri: z.never().optional().describe("The URI of the file."),
54
+ }).describe("Represents a file with its content provided directly as a base64-encoded string.");
55
+ /**
56
+ * @description Represents a file with its content located at a specific URI.
57
+ */
58
+ export const FileWithUriSchema = FileBaseSchema.extend({
59
+ /**
60
+ * @required A URL pointing to the file's content. (keeping as string for now)
61
+ */
62
+ uri: z.string().describe("A URL pointing to the file's content."),
63
+ /**
64
+ * @optional The `bytes` property must be absent when `uri` is present.
65
+ */
66
+ bytes: z
67
+ .never()
68
+ .optional()
69
+ .describe("The base64-encoded content of the file."),
70
+ }).describe("Represents a file with its content located at a specific URI.");
71
+ /**
72
+ * @description Represents a file with its content provided directly as a base64-encoded string or located at a specific URI.
73
+ */
74
+ export const FileSchema = z
75
+ .union([FileWithBytesSchema, FileWithUriSchema])
76
+ .describe("Represents a file with its content provided directly as a base64-encoded string or located at a specific URI.");
77
+ /**
78
+ * @description Represents a file segment within a message or artifact. The file content can be
79
+ * provided either directly as bytes or as a URI.
80
+ */
81
+ export const FilePartSchema = PartBaseSchema.extend({
82
+ /**
83
+ * @required The type of this part, used as a discriminator. Always 'file'.
84
+ */
85
+ kind: KindSchema.refine((kind) => kind === "file").describe("The type of this object, used as a discriminator. Always 'file' for a FilePart."),
86
+ /**
87
+ * @required The file content, represented as either a URI or as base64-encoded bytes.
88
+ */
89
+ file: FileSchema.describe("The file content, represented as either a URI or as base64-encoded bytes."),
90
+ }).describe("Represents a file segment within a message or artifact.");
91
+ /**
92
+ * @description Represents a text segment within a message or artifact.
93
+ */
94
+ export const TextPartSchema = PartBaseSchema.extend({
95
+ /**
96
+ * @required The type of this object, used as a discriminator. Always 'text' for a TextPart.
97
+ */
98
+ kind: KindSchema.refine((kind) => kind === "text").describe("The type of this object, used as a discriminator. Always 'text' for a TextPart."),
99
+ /**
100
+ * @required The string content of the text part.
101
+ */
102
+ text: z.string().describe("The string content of the text part."),
103
+ }).describe("Represents a text segment within a message or artifact.");
104
+ /**
105
+ * @description Represents a structured data segment (e.g., JSON) within a message or artifact.
106
+ */
107
+ export const DataPartSchema = PartBaseSchema.extend({
108
+ /**
109
+ * @required The type of this object, used as a discriminator. Always 'data' for a DataPart.
110
+ */
111
+ kind: KindSchema.refine((kind) => kind === "data").describe("The type of this object, used as a discriminator. Always 'data' for a DataPart."),
112
+ /**
113
+ * @required The structured data content of the data part.
114
+ */
115
+ data: z
116
+ .record(z.string(), z.unknown())
117
+ .describe("The structured data content of the data part."),
118
+ }).describe("Represents a structured data segment (e.g., JSON) within a message or artifact.");
119
+ /**
120
+ * @description A discriminated union representing a part of a message or artifact, which can
121
+ * be text, a file, or structured data.
122
+ */
123
+ export const PartSchema = z
124
+ .union([TextPartSchema, FilePartSchema, DataPartSchema])
125
+ .describe("A discriminated union representing a part of a message or artifact, which can be text, a file, or structured data.");
126
+ /**
127
+ * @description Represents a file, data structure, or other resource generated by an agent during a task.
128
+ */
129
+ export const ArtifactSchema = z
130
+ .object({
131
+ /**
132
+ * @required A unique identifier for the artifact within the scope of the task.
133
+ */
134
+ artifactId: z
135
+ .string()
136
+ .describe("A unique identifier for the artifact within the scope of the task."),
137
+ /**
138
+ * @optional A human-readable name for the artifact.
139
+ */
140
+ name: z
141
+ .string()
142
+ .optional()
143
+ .describe("A human-readable name for the artifact."),
144
+ /**
145
+ * @optional A human-readable description of the artifact.
146
+ */
147
+ description: z
148
+ .string()
149
+ .optional()
150
+ .describe("A human-readable description of the artifact."),
151
+ /**
152
+ * @optional An array of content parts that make up the artifact.
153
+ */
154
+ parts: z
155
+ .array(PartSchema)
156
+ .describe("An array of content parts that make up the artifact."),
157
+ /**
158
+ * @optional Optional metadata for extensions. The key is an extension-specific identifier.
159
+ */
160
+ metadata: z
161
+ .record(z.string(), z.unknown())
162
+ .optional()
163
+ .describe("Optional metadata for extensions. The key is an extension-specific identifier."),
164
+ /**
165
+ * @optional The URIs of extensions that are relevant to this artifact.
166
+ */
167
+ extension: z
168
+ .array(z.string())
169
+ .optional()
170
+ .describe("The URIs of extensions that are relevant to this artifact."),
171
+ })
172
+ .describe("Represents a file, data structure, or other resource generated by an agent during a task. It can be composed of multiple parts.");
173
+ /**
174
+ * @description Represents the role of a message sender.
175
+ */
176
+ export const MessageRoleSchema = z
177
+ .enum(["user", "agent"])
178
+ .describe("Identifies the sender of the message. `user` for the client, `agent` for the service.");
179
+ /**
180
+ * @description Represents a single message in the conversation between a user and an agent.
181
+ */
182
+ export const MessageSchema = z
183
+ .object({
184
+ /**
185
+ * @required Identifies the sender of the message. `user` for the client, `agent` for the service.
186
+ */
187
+ role: MessageRoleSchema.describe("Identifies the sender of the message. `user` for the client, `agent` for the service."),
188
+ /**
189
+ * @required An array of content parts that form the message body. A message can be
190
+ * composed of multiple parts of different types (e.g., text and files).
191
+ */
192
+ parts: z
193
+ .array(PartSchema)
194
+ .describe("An array of content parts that form the message body. A message can be composed of multiple parts of different types (e.g., text and files)."),
195
+ /**
196
+ * @optional Optional metadata for extensions. The key is an extension-specific identifier.
197
+ */
198
+ metadata: z
199
+ .record(z.string(), z.unknown())
200
+ .optional()
201
+ .describe("Optional metadata for extensions. The key is an extension-specific identifier."),
202
+ /**
203
+ * @optional The URIs of extensions that are relevant to this message.
204
+ */
205
+ extensions: z
206
+ .array(z.string())
207
+ .optional()
208
+ .describe("The URIs of extensions that are relevant to this message."),
209
+ /**
210
+ * @optional A list of other task IDs that this message references for additional context.
211
+ */
212
+ referenceTaskIds: z
213
+ .array(z.string())
214
+ .optional()
215
+ .describe("A list of other task IDs that this message references for additional context."),
216
+ /**
217
+ * @required A unique identifier for the message, typically a UUID, generated by the sender.
218
+ */
219
+ messageId: z
220
+ .string()
221
+ .describe("A unique identifier for the message, typically a UUID, generated by the sender."),
222
+ /**
223
+ * @optional The identifier of the task this message is part of. Can be omitted for the first message of a new task.
224
+ */
225
+ taskId: z
226
+ .string()
227
+ .optional()
228
+ .describe("The identifier of the task this message is part of. Can be omitted for the first message of a new task."),
229
+ /**
230
+ * @optional The context identifier for this message, used to group related interactions.
231
+ */
232
+ contextId: z
233
+ .string()
234
+ .optional()
235
+ .describe("The context identifier for this message, used to group related interactions."),
236
+ /**
237
+ * @required The type of this object, used as a discriminator. Always 'message' for a Message.
238
+ */
239
+ kind: KindSchema.refine((kind) => kind === "message").describe("The type of this object, used as a discriminator. Always 'message' for a Message."),
240
+ })
241
+ .describe("Represents a single message in the conversation between a user and an agent.");
2
242
  //# sourceMappingURL=parameters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/types/schemas/a2a/parameters.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/types/schemas/a2a/parameters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,CAAC;IACN;;OAEG;IACH,QAAQ,EAAE,CAAC;SACR,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;SAC/B,QAAQ,EAAE;SACV,QAAQ,CAAC,8CAA8C,CAAC;CAC5D,CAAC;KACD,QAAQ,CAAC,kEAAkE,CAAC,CAAC;AAIhF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,CAAC;IACN;;OAEG;IACH,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,uDAAuD,CAAC;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QAAQ,CAAC,2DAA2D,CAAC;IACxE;;OAEG;IACH,gBAAgB,EAAE,CAAC;SAChB,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,EAAE;SACV,QAAQ,CACP,+EAA+E,CAChF;IACH;;OAEG;IACH,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,CACP,iFAAiF,CAClF;IACH;;OAEG;IACH,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,yGAAyG,CAC1G;IACH;;OAEG;IACH,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,8EAA8E,CAC/E;IACH;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,QAAQ,CAC5D,mFAAmF,CACpF;CACF,CAAC;KACD,QAAQ,CACP,8EAA8E,CAC/E,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Copyright 2025 The Artinet Project
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from "zod";
6
+ import { SendMessageRequestSchema, SendMessageResponseSchema, SendStreamingMessageRequestSchema, SendStreamingMessageResponseSchema, } from "./message.js";
7
+ import { GetTaskRequestSchema, GetTaskResponseSchema, CancelTaskRequestSchema, CancelTaskResponseSchema, TaskResubscriptionRequestSchema, } from "./task.js";
8
+ import { SetTaskPushNotificationConfigRequestSchema, SetTaskPushNotificationConfigResponseSchema, GetTaskPushNotificationConfigRequestSchema, GetTaskPushNotificationConfigResponseSchema, DeleteTaskPushNotificationConfigRequestSchema, ListTaskPushNotificationConfigRequestSchema, DeleteTaskPushNotificationConfigResponseSchema, ListTaskPushNotificationConfigResponseSchema, } from "./notification.js";
9
+ import { GetAuthenticatedExtendedCardRequestSchema, GetAuthenticatedExtendedCardResponseSchema, } from "./agent.js";
10
+ import { JSONRPCSuccessResponseSchema, JSONRPCErrorResponseSchema, } from "./rpc.js";
11
+ /**
12
+ * @description Union of all valid A2A request types defined in the protocol.
13
+ * @description Represents any valid JSON-RPC request defined in the A2A protocol.
14
+ */
15
+ export const A2ARequestSchema = z.union([
16
+ SendMessageRequestSchema,
17
+ SendStreamingMessageRequestSchema,
18
+ TaskResubscriptionRequestSchema,
19
+ GetTaskRequestSchema,
20
+ CancelTaskRequestSchema,
21
+ SetTaskPushNotificationConfigRequestSchema,
22
+ GetTaskPushNotificationConfigRequestSchema,
23
+ ListTaskPushNotificationConfigRequestSchema,
24
+ DeleteTaskPushNotificationConfigRequestSchema,
25
+ GetAuthenticatedExtendedCardRequestSchema,
26
+ ]);
27
+ /**
28
+ * @description Union of all valid A2A response types defined in the protocol.
29
+ * @description Represents any valid JSON-RPC response defined in the A2A protocol.
30
+ * (This is a helper type, not explicitly defined with `oneOf` in the spec like A2ARequest, but useful).
31
+ */
32
+ export const A2AResponseSchema = z.union([
33
+ SendMessageResponseSchema,
34
+ SendStreamingMessageResponseSchema,
35
+ GetTaskResponseSchema,
36
+ CancelTaskResponseSchema,
37
+ SetTaskPushNotificationConfigResponseSchema,
38
+ GetTaskPushNotificationConfigResponseSchema,
39
+ ListTaskPushNotificationConfigResponseSchema,
40
+ DeleteTaskPushNotificationConfigResponseSchema,
41
+ GetAuthenticatedExtendedCardResponseSchema,
42
+ ]);
43
+ /**
44
+ * @description Represents a JSON-RPC response object.
45
+ */
46
+ export const JSONRPCResponseSchema = z
47
+ .union([
48
+ A2AResponseSchema,
49
+ JSONRPCSuccessResponseSchema.extend({
50
+ result: z.any(),
51
+ }),
52
+ JSONRPCErrorResponseSchema.extend({
53
+ error: z.any(),
54
+ }),
55
+ ])
56
+ .describe("Represents a JSON-RPC response object.");
57
+ // // Re-export A2AError from error.js for convenience
58
+ // export { A2AErrorSchema } from "./error.js";
59
+ // export type { A2AError } from "./error.js";
60
+ //# sourceMappingURL=protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../../src/types/schemas/a2a/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,iCAAiC,EACjC,kCAAkC,GACnC,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,+BAA+B,GAChC,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,0CAA0C,EAC1C,2CAA2C,EAC3C,0CAA0C,EAC1C,2CAA2C,EAC3C,6CAA6C,EAC7C,2CAA2C,EAC3C,8CAA8C,EAC9C,4CAA4C,GAC7C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,yCAAyC,EACzC,0CAA0C,GAC3C,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC;IACtC,wBAAwB;IACxB,iCAAiC;IACjC,+BAA+B;IAC/B,oBAAoB;IACpB,uBAAuB;IACvB,0CAA0C;IAC1C,0CAA0C;IAC1C,2CAA2C;IAC3C,6CAA6C;IAC7C,yCAAyC;CAC1C,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC;IACvC,yBAAyB;IACzB,kCAAkC;IAClC,qBAAqB;IACrB,wBAAwB;IACxB,2CAA2C;IAC3C,2CAA2C;IAC3C,4CAA4C;IAC5C,8CAA8C;IAC9C,0CAA0C;CAC3C,CAAC,CAAC;AACH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,KAAK,CAAC;IACL,iBAAiB;IACjB,4BAA4B,CAAC,MAAM,CAAC;QAClC,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE;KAChB,CAAC;IACF,0BAA0B,CAAC,MAAM,CAAC;QAChC,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE;KACf,CAAC;CACH,CAAC;KACD,QAAQ,CAAC,wCAAwC,CAAC,CAAC;AAMtD,sDAAsD;AACtD,+CAA+C;AAC/C,8CAA8C"}
@@ -1,2 +1,127 @@
1
- export {};
1
+ /**
2
+ * Copyright 2025 The Artinet Project
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { z } from "zod";
6
+ /**
7
+ * @description Base interface for all JSON-RPC messages (Requests and Responses).
8
+ */
9
+ export const JSONRPCMessageSchema = z
10
+ .object({
11
+ /**
12
+ * @required Specifies the JSON-RPC version. Must be "2.0".
13
+ * @default "2.0"
14
+ * @const "2.0"
15
+ */
16
+ jsonrpc: z
17
+ .literal("2.0")
18
+ .describe("Specifies the JSON-RPC version. Must be '2.0'."),
19
+ /**
20
+ * @optional An identifier established by the Client that MUST contain a String, Number.
21
+ * @description Can be a string, number. Responses must have the same ID as the request they relate to.
22
+ * Notifications (requests without an expected response) should omit the ID.
23
+ */
24
+ id: z
25
+ .union([z.string(), z.number()])
26
+ .optional()
27
+ .describe("An identifier established by the Client that MUST contain a String, Number. Responses must have the same ID as the request they relate to. Notifications (requests without an expected response) should omit the ID."),
28
+ })
29
+ .describe("Base interface for all JSON-RPC messages (Requests and Responses).");
30
+ /**
31
+ * @description Represents a JSON-RPC request object base structure.
32
+ */
33
+ export const JSONRPCRequestSchema = JSONRPCMessageSchema.extend({
34
+ /**
35
+ * @required Request identifier.
36
+ */
37
+ id: z
38
+ .union([z.string(), z.number()])
39
+ .describe("Request identifier. Must be a String, Number, or NULL. The value MUST remain the same throughout the request."),
40
+ /**
41
+ * @required A string containing the name of the method to be invoked.
42
+ */
43
+ method: z
44
+ .string()
45
+ .describe("A String containing the name of the method to be invoked. Method names that begin with the word rpc are reserved and MUST NOT be used."),
46
+ /**
47
+ * @optional Parameters for the method. Can be a structured object, an array, or omitted.
48
+ * @description A Structured value that holds the parameter values to be used during the invocation of the method.
49
+ */
50
+ params: z
51
+ .record(z.string(), z.unknown())
52
+ .optional()
53
+ .describe("A Structured value that holds the parameter values to be used during the invocation of the method."),
54
+ }).describe("Represents a JSON-RPC request object base structure.");
55
+ // /**
56
+ // * @description Represents a JSON-RPC request object with parameters.
57
+ // */
58
+ // export const JSONRPCRequestWithParamsSchema = JSONRPCRequestSchema.extend({
59
+ // params: z.unknown(),
60
+ // });
61
+ // export type JSONRPCRequestWithParams = z.infer<
62
+ // typeof JSONRPCRequestWithParamsSchema
63
+ // >;
64
+ /**
65
+ * @description Represents a JSON-RPC 2.0 Error object, included in an error response.
66
+ */
67
+ export const JSONRPCErrorSchema = z
68
+ .object({
69
+ /**
70
+ * @required A number indicating the error type that occurred.
71
+ */
72
+ code: z
73
+ .number()
74
+ .describe("A Number indicating the error type that occurred. This MUST be an integer."),
75
+ /**
76
+ * @required A string providing a short description of the error.
77
+ */
78
+ message: z
79
+ .string()
80
+ .describe("A String providing a short description of the error. The message SHOULD be limited to a concise single sentence."),
81
+ /**
82
+ * @optional A Primitive or Structured value that contains additional information about the error.
83
+ */
84
+ data: z
85
+ .unknown()
86
+ .optional()
87
+ .describe("A Primitive or Structured value that contains additional information about the error."),
88
+ })
89
+ .describe("Represents a JSON-RPC 2.0 Error object, included in an error response.");
90
+ /**
91
+ * @description Represents a JSON-RPC 2.0 Success Response object.
92
+ */
93
+ export const JSONRPCSuccessResponseSchema = JSONRPCMessageSchema.extend({
94
+ /**
95
+ * @required The result object on success
96
+ * @description The value of this member is determined by the method invoked on the Server.
97
+ */
98
+ result: z
99
+ .unknown()
100
+ .describe("The value of this member is determined by the method invoked on the Server."),
101
+ /**
102
+ * @optional The error object on failure
103
+ * @description Optional 'never' helps enforce exclusivity
104
+ */
105
+ error: z
106
+ .never()
107
+ .optional()
108
+ .describe("Optional 'never' helps enforce exclusivity"),
109
+ }).describe("Represents a JSON-RPC 2.0 Success Response object.");
110
+ /**
111
+ * @description Represents a JSON-RPC 2.0 Error Response object.
112
+ */
113
+ export const JSONRPCErrorResponseSchema = JSONRPCMessageSchema.extend({
114
+ /**
115
+ * @optional The result object on success
116
+ * @description Optional 'never' helps enforce exclusivity
117
+ */
118
+ result: z
119
+ .never()
120
+ .optional()
121
+ .describe("Optional 'never' helps enforce exclusivity"),
122
+ /**
123
+ * @required The result object on failure
124
+ */
125
+ error: JSONRPCErrorSchema.extend({}).describe("Represents a JSON-RPC 2.0 Error Response object."),
126
+ }).describe("Represents a JSON-RPC 2.0 Error Response object.");
2
127
  //# sourceMappingURL=rpc.js.map