@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,188 +1,957 @@
1
1
  /**
2
- * @description Represents the base entity for FileParts
3
- * @optional name
4
- * @optional mimeType
2
+ * Copyright 2025 The Artinet Project
3
+ * SPDX-License-Identifier: Apache-2.0
5
4
  */
6
- export interface FileBase {
5
+ import { z } from "zod";
6
+ /**
7
+ * @description Defines base properties common to all message or artifact parts.
8
+ */
9
+ export declare const PartBaseSchema: z.ZodObject<{
10
+ /**
11
+ * @optional Optional metadata associated with this part.
12
+ */
13
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ metadata?: Record<string, unknown> | undefined;
16
+ }, {
17
+ metadata?: Record<string, unknown> | undefined;
18
+ }>;
19
+ export type PartBase = z.infer<typeof PartBaseSchema>;
20
+ /**
21
+ * @description Defines base properties for a file.
22
+ */
23
+ export declare const FileBaseSchema: z.ZodObject<{
7
24
  /**
8
- * @optional name of the file.
25
+ * @optional An optional name for the file (e.g., "document.pdf").
9
26
  */
10
- name?: string;
27
+ name: z.ZodOptional<z.ZodString>;
11
28
  /**
12
- * @optional MIME type of the file content.
29
+ * @optional The MIME type of the file (e.g., "application/pdf").
13
30
  */
14
- mimeType?: string;
15
- }
31
+ mimeType: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ name?: string | undefined;
34
+ mimeType?: string | undefined;
35
+ }, {
36
+ name?: string | undefined;
37
+ mimeType?: string | undefined;
38
+ }>;
39
+ export type FileBase = z.infer<typeof FileBaseSchema>;
16
40
  /**
17
- * @description Represents a file with its content encoded as a Base64 string.
18
- * @required bytes
19
- * @optional uri
41
+ * @description Represents a file with its content provided directly as a base64-encoded string.
20
42
  */
21
- export interface FileWithBytes extends FileBase {
43
+ export declare const FileWithBytesSchema: z.ZodObject<{
22
44
  /**
23
- * @required File content encoded as a Base64 string. Use this OR `uri`.
45
+ * @optional An optional name for the file (e.g., "document.pdf").
24
46
  */
25
- bytes: string;
47
+ name: z.ZodOptional<z.ZodString>;
48
+ /**
49
+ * @optional The MIME type of the file (e.g., "application/pdf").
50
+ */
51
+ mimeType: z.ZodOptional<z.ZodString>;
52
+ } & {
26
53
  /**
27
- * @optional URI pointing to the file content.
54
+ * @required The base64-encoded content of the file.
28
55
  */
29
- uri?: never;
30
- }
56
+ bytes: z.ZodString;
57
+ /**
58
+ * @optional The `uri` property must be absent when `bytes` is present.
59
+ */
60
+ uri: z.ZodOptional<z.ZodNever>;
61
+ }, "strip", z.ZodTypeAny, {
62
+ bytes: string;
63
+ name?: string | undefined;
64
+ mimeType?: string | undefined;
65
+ uri?: undefined;
66
+ }, {
67
+ bytes: string;
68
+ name?: string | undefined;
69
+ mimeType?: string | undefined;
70
+ uri?: undefined;
71
+ }>;
72
+ export type FileWithBytes = z.infer<typeof FileWithBytesSchema>;
31
73
  /**
32
- * @description Represents a file with its content encoded as a Base64 string.
33
- * @required uri
34
- * @optional bytes
74
+ * @description Represents a file with its content located at a specific URI.
35
75
  */
36
- export interface FileWithUri extends FileBase {
76
+ export declare const FileWithUriSchema: z.ZodObject<{
37
77
  /**
38
- * @required URI pointing to the file content.
78
+ * @optional An optional name for the file (e.g., "document.pdf").
39
79
  */
40
- uri: string;
80
+ name: z.ZodOptional<z.ZodString>;
81
+ /**
82
+ * @optional The MIME type of the file (e.g., "application/pdf").
83
+ */
84
+ mimeType: z.ZodOptional<z.ZodString>;
85
+ } & {
86
+ /**
87
+ * @required A URL pointing to the file's content. (keeping as string for now)
88
+ */
89
+ uri: z.ZodString;
41
90
  /**
42
- * @optional File content encoded as a Base64 string. Use this OR `uri`.
91
+ * @optional The `bytes` property must be absent when `uri` is present.
43
92
  */
44
- bytes?: never;
45
- }
93
+ bytes: z.ZodOptional<z.ZodNever>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ uri: string;
96
+ name?: string | undefined;
97
+ mimeType?: string | undefined;
98
+ bytes?: undefined;
99
+ }, {
100
+ uri: string;
101
+ name?: string | undefined;
102
+ mimeType?: string | undefined;
103
+ bytes?: undefined;
104
+ }>;
105
+ export type FileWithUri = z.infer<typeof FileWithUriSchema>;
46
106
  /**
47
- * @description Represents the base entity for Parts
48
- * @optional metadata
107
+ * @description Represents a file with its content provided directly as a base64-encoded string or located at a specific URI.
49
108
  */
50
- export interface PartBase {
109
+ export declare const FileSchema: z.ZodUnion<[z.ZodObject<{
51
110
  /**
52
- * @optional metadata associated with the part.
111
+ * @optional An optional name for the file (e.g., "document.pdf").
53
112
  */
54
- metadata?: Record<string, unknown>;
55
- }
113
+ name: z.ZodOptional<z.ZodString>;
114
+ /**
115
+ * @optional The MIME type of the file (e.g., "application/pdf").
116
+ */
117
+ mimeType: z.ZodOptional<z.ZodString>;
118
+ } & {
119
+ /**
120
+ * @required The base64-encoded content of the file.
121
+ */
122
+ bytes: z.ZodString;
123
+ /**
124
+ * @optional The `uri` property must be absent when `bytes` is present.
125
+ */
126
+ uri: z.ZodOptional<z.ZodNever>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ bytes: string;
129
+ name?: string | undefined;
130
+ mimeType?: string | undefined;
131
+ uri?: undefined;
132
+ }, {
133
+ bytes: string;
134
+ name?: string | undefined;
135
+ mimeType?: string | undefined;
136
+ uri?: undefined;
137
+ }>, z.ZodObject<{
138
+ /**
139
+ * @optional An optional name for the file (e.g., "document.pdf").
140
+ */
141
+ name: z.ZodOptional<z.ZodString>;
142
+ /**
143
+ * @optional The MIME type of the file (e.g., "application/pdf").
144
+ */
145
+ mimeType: z.ZodOptional<z.ZodString>;
146
+ } & {
147
+ /**
148
+ * @required A URL pointing to the file's content. (keeping as string for now)
149
+ */
150
+ uri: z.ZodString;
151
+ /**
152
+ * @optional The `bytes` property must be absent when `uri` is present.
153
+ */
154
+ bytes: z.ZodOptional<z.ZodNever>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ uri: string;
157
+ name?: string | undefined;
158
+ mimeType?: string | undefined;
159
+ bytes?: undefined;
160
+ }, {
161
+ uri: string;
162
+ name?: string | undefined;
163
+ mimeType?: string | undefined;
164
+ bytes?: undefined;
165
+ }>]>;
166
+ export type File = z.infer<typeof FileSchema>;
56
167
  /**
57
- * @description Represents a part of a message containing text content.
58
- * @required kind
59
- * @required text
168
+ * @description Represents a file segment within a message or artifact. The file content can be
169
+ * provided either directly as bytes or as a URI.
60
170
  */
61
- export interface TextPart extends PartBase {
171
+ export declare const FilePartSchema: z.ZodObject<{
62
172
  /**
63
- * @required Type identifier for this part.
173
+ * @optional Optional metadata associated with this part.
64
174
  */
65
- kind: "text";
175
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
176
+ } & {
66
177
  /**
67
- * @required The text content.
178
+ * @required The type of this part, used as a discriminator. Always 'file'.
68
179
  */
69
- text: string;
70
- }
180
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "file", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
181
+ /**
182
+ * @required The file content, represented as either a URI or as base64-encoded bytes.
183
+ */
184
+ file: z.ZodUnion<[z.ZodObject<{
185
+ /**
186
+ * @optional An optional name for the file (e.g., "document.pdf").
187
+ */
188
+ name: z.ZodOptional<z.ZodString>;
189
+ /**
190
+ * @optional The MIME type of the file (e.g., "application/pdf").
191
+ */
192
+ mimeType: z.ZodOptional<z.ZodString>;
193
+ } & {
194
+ /**
195
+ * @required The base64-encoded content of the file.
196
+ */
197
+ bytes: z.ZodString;
198
+ /**
199
+ * @optional The `uri` property must be absent when `bytes` is present.
200
+ */
201
+ uri: z.ZodOptional<z.ZodNever>;
202
+ }, "strip", z.ZodTypeAny, {
203
+ bytes: string;
204
+ name?: string | undefined;
205
+ mimeType?: string | undefined;
206
+ uri?: undefined;
207
+ }, {
208
+ bytes: string;
209
+ name?: string | undefined;
210
+ mimeType?: string | undefined;
211
+ uri?: undefined;
212
+ }>, z.ZodObject<{
213
+ /**
214
+ * @optional An optional name for the file (e.g., "document.pdf").
215
+ */
216
+ name: z.ZodOptional<z.ZodString>;
217
+ /**
218
+ * @optional The MIME type of the file (e.g., "application/pdf").
219
+ */
220
+ mimeType: z.ZodOptional<z.ZodString>;
221
+ } & {
222
+ /**
223
+ * @required A URL pointing to the file's content. (keeping as string for now)
224
+ */
225
+ uri: z.ZodString;
226
+ /**
227
+ * @optional The `bytes` property must be absent when `uri` is present.
228
+ */
229
+ bytes: z.ZodOptional<z.ZodNever>;
230
+ }, "strip", z.ZodTypeAny, {
231
+ uri: string;
232
+ name?: string | undefined;
233
+ mimeType?: string | undefined;
234
+ bytes?: undefined;
235
+ }, {
236
+ uri: string;
237
+ name?: string | undefined;
238
+ mimeType?: string | undefined;
239
+ bytes?: undefined;
240
+ }>]>;
241
+ }, "strip", z.ZodTypeAny, {
242
+ file: {
243
+ bytes: string;
244
+ name?: string | undefined;
245
+ mimeType?: string | undefined;
246
+ uri?: undefined;
247
+ } | {
248
+ uri: string;
249
+ name?: string | undefined;
250
+ mimeType?: string | undefined;
251
+ bytes?: undefined;
252
+ };
253
+ kind: "file";
254
+ metadata?: Record<string, unknown> | undefined;
255
+ }, {
256
+ file: {
257
+ bytes: string;
258
+ name?: string | undefined;
259
+ mimeType?: string | undefined;
260
+ uri?: undefined;
261
+ } | {
262
+ uri: string;
263
+ name?: string | undefined;
264
+ mimeType?: string | undefined;
265
+ bytes?: undefined;
266
+ };
267
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
268
+ metadata?: Record<string, unknown> | undefined;
269
+ }>;
270
+ export type FilePart = z.infer<typeof FilePartSchema>;
71
271
  /**
72
- * @description Represents a part of a message containing file content.
73
- * @required kind
74
- * @required file
272
+ * @description Represents a text segment within a message or artifact.
75
273
  */
76
- export interface FilePart extends PartBase {
274
+ export declare const TextPartSchema: z.ZodObject<{
77
275
  /**
78
- * @required Type identifier for this part.
276
+ * @optional Optional metadata associated with this part.
79
277
  */
80
- kind: "file";
278
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
279
+ } & {
280
+ /**
281
+ * @required The type of this object, used as a discriminator. Always 'text' for a TextPart.
282
+ */
283
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "text", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
81
284
  /**
82
- * @required The file content, provided either inline or via URI.
285
+ * @required The string content of the text part.
83
286
  */
84
- file: FileWithBytes | FileWithUri;
85
- }
287
+ text: z.ZodString;
288
+ }, "strip", z.ZodTypeAny, {
289
+ text: string;
290
+ kind: "text";
291
+ metadata?: Record<string, unknown> | undefined;
292
+ }, {
293
+ text: string;
294
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
295
+ metadata?: Record<string, unknown> | undefined;
296
+ }>;
297
+ export type TextPart = z.infer<typeof TextPartSchema>;
86
298
  /**
87
- * @description Represents a part of a message containing structured data (JSON).
88
- * @required kind
89
- * @required data
299
+ * @description Represents a structured data segment (e.g., JSON) within a message or artifact.
90
300
  */
91
- export interface DataPart extends PartBase {
301
+ export declare const DataPartSchema: z.ZodObject<{
92
302
  /**
93
- * @required Type identifier for this part.
303
+ * @optional Optional metadata associated with this part.
94
304
  */
95
- kind: "data";
305
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
306
+ } & {
307
+ /**
308
+ * @required The type of this object, used as a discriminator. Always 'data' for a DataPart.
309
+ */
310
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "data", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
96
311
  /**
97
- * @required The structured data content as a JSON object.
312
+ * @required The structured data content of the data part.
98
313
  */
314
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ data: Record<string, unknown>;
317
+ kind: "data";
318
+ metadata?: Record<string, unknown> | undefined;
319
+ }, {
99
320
  data: Record<string, unknown>;
100
- }
321
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
322
+ metadata?: Record<string, unknown> | undefined;
323
+ }>;
324
+ export type DataPart = z.infer<typeof DataPartSchema>;
101
325
  /**
102
- * @description Represents a single part of a multi-part message. Can be text, file, or data.
326
+ * @description A discriminated union representing a part of a message or artifact, which can
327
+ * be text, a file, or structured data.
103
328
  */
104
- export type Part = TextPart | FilePart | DataPart;
329
+ export declare const PartSchema: z.ZodUnion<[z.ZodObject<{
330
+ /**
331
+ * @optional Optional metadata associated with this part.
332
+ */
333
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
334
+ } & {
335
+ /**
336
+ * @required The type of this object, used as a discriminator. Always 'text' for a TextPart.
337
+ */
338
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "text", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
339
+ /**
340
+ * @required The string content of the text part.
341
+ */
342
+ text: z.ZodString;
343
+ }, "strip", z.ZodTypeAny, {
344
+ text: string;
345
+ kind: "text";
346
+ metadata?: Record<string, unknown> | undefined;
347
+ }, {
348
+ text: string;
349
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
350
+ metadata?: Record<string, unknown> | undefined;
351
+ }>, z.ZodObject<{
352
+ /**
353
+ * @optional Optional metadata associated with this part.
354
+ */
355
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
356
+ } & {
357
+ /**
358
+ * @required The type of this part, used as a discriminator. Always 'file'.
359
+ */
360
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "file", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
361
+ /**
362
+ * @required The file content, represented as either a URI or as base64-encoded bytes.
363
+ */
364
+ file: z.ZodUnion<[z.ZodObject<{
365
+ /**
366
+ * @optional An optional name for the file (e.g., "document.pdf").
367
+ */
368
+ name: z.ZodOptional<z.ZodString>;
369
+ /**
370
+ * @optional The MIME type of the file (e.g., "application/pdf").
371
+ */
372
+ mimeType: z.ZodOptional<z.ZodString>;
373
+ } & {
374
+ /**
375
+ * @required The base64-encoded content of the file.
376
+ */
377
+ bytes: z.ZodString;
378
+ /**
379
+ * @optional The `uri` property must be absent when `bytes` is present.
380
+ */
381
+ uri: z.ZodOptional<z.ZodNever>;
382
+ }, "strip", z.ZodTypeAny, {
383
+ bytes: string;
384
+ name?: string | undefined;
385
+ mimeType?: string | undefined;
386
+ uri?: undefined;
387
+ }, {
388
+ bytes: string;
389
+ name?: string | undefined;
390
+ mimeType?: string | undefined;
391
+ uri?: undefined;
392
+ }>, z.ZodObject<{
393
+ /**
394
+ * @optional An optional name for the file (e.g., "document.pdf").
395
+ */
396
+ name: z.ZodOptional<z.ZodString>;
397
+ /**
398
+ * @optional The MIME type of the file (e.g., "application/pdf").
399
+ */
400
+ mimeType: z.ZodOptional<z.ZodString>;
401
+ } & {
402
+ /**
403
+ * @required A URL pointing to the file's content. (keeping as string for now)
404
+ */
405
+ uri: z.ZodString;
406
+ /**
407
+ * @optional The `bytes` property must be absent when `uri` is present.
408
+ */
409
+ bytes: z.ZodOptional<z.ZodNever>;
410
+ }, "strip", z.ZodTypeAny, {
411
+ uri: string;
412
+ name?: string | undefined;
413
+ mimeType?: string | undefined;
414
+ bytes?: undefined;
415
+ }, {
416
+ uri: string;
417
+ name?: string | undefined;
418
+ mimeType?: string | undefined;
419
+ bytes?: undefined;
420
+ }>]>;
421
+ }, "strip", z.ZodTypeAny, {
422
+ file: {
423
+ bytes: string;
424
+ name?: string | undefined;
425
+ mimeType?: string | undefined;
426
+ uri?: undefined;
427
+ } | {
428
+ uri: string;
429
+ name?: string | undefined;
430
+ mimeType?: string | undefined;
431
+ bytes?: undefined;
432
+ };
433
+ kind: "file";
434
+ metadata?: Record<string, unknown> | undefined;
435
+ }, {
436
+ file: {
437
+ bytes: string;
438
+ name?: string | undefined;
439
+ mimeType?: string | undefined;
440
+ uri?: undefined;
441
+ } | {
442
+ uri: string;
443
+ name?: string | undefined;
444
+ mimeType?: string | undefined;
445
+ bytes?: undefined;
446
+ };
447
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
448
+ metadata?: Record<string, unknown> | undefined;
449
+ }>, z.ZodObject<{
450
+ /**
451
+ * @optional Optional metadata associated with this part.
452
+ */
453
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
454
+ } & {
455
+ /**
456
+ * @required The type of this object, used as a discriminator. Always 'data' for a DataPart.
457
+ */
458
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "data", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
459
+ /**
460
+ * @required The structured data content of the data part.
461
+ */
462
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
463
+ }, "strip", z.ZodTypeAny, {
464
+ data: Record<string, unknown>;
465
+ kind: "data";
466
+ metadata?: Record<string, unknown> | undefined;
467
+ }, {
468
+ data: Record<string, unknown>;
469
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
470
+ metadata?: Record<string, unknown> | undefined;
471
+ }>]>;
472
+ export type Part = z.infer<typeof PartSchema>;
105
473
  /**
106
- * @description Represents an artifact generated or used by a task, potentially composed of multiple parts.
107
- * @required artifactId
108
- * @optional name
109
- * @optional description
110
- * @required parts
111
- * @optional metadata
112
- * @optional extensions
474
+ * @description Represents a file, data structure, or other resource generated by an agent during a task.
113
475
  */
114
- export interface Artifact {
476
+ export declare const ArtifactSchema: z.ZodObject<{
115
477
  /**
116
- * @required Unique identifier for the artifact.
478
+ * @required A unique identifier for the artifact within the scope of the task.
117
479
  */
118
- artifactId: string;
480
+ artifactId: z.ZodString;
119
481
  /**
120
- * @optional name for the artifact.
482
+ * @optional A human-readable name for the artifact.
121
483
  */
122
- name?: string;
484
+ name: z.ZodOptional<z.ZodString>;
123
485
  /**
124
- * @optional description of the artifact.
486
+ * @optional A human-readable description of the artifact.
125
487
  */
126
- description?: string;
488
+ description: z.ZodOptional<z.ZodString>;
127
489
  /**
128
- * @required The constituent parts of the artifact.
490
+ * @optional An array of content parts that make up the artifact.
129
491
  */
130
- parts: Part[];
492
+ parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
493
+ /**
494
+ * @optional Optional metadata associated with this part.
495
+ */
496
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
497
+ } & {
498
+ /**
499
+ * @required The type of this object, used as a discriminator. Always 'text' for a TextPart.
500
+ */
501
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "text", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
502
+ /**
503
+ * @required The string content of the text part.
504
+ */
505
+ text: z.ZodString;
506
+ }, "strip", z.ZodTypeAny, {
507
+ text: string;
508
+ kind: "text";
509
+ metadata?: Record<string, unknown> | undefined;
510
+ }, {
511
+ text: string;
512
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
513
+ metadata?: Record<string, unknown> | undefined;
514
+ }>, z.ZodObject<{
515
+ /**
516
+ * @optional Optional metadata associated with this part.
517
+ */
518
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
519
+ } & {
520
+ /**
521
+ * @required The type of this part, used as a discriminator. Always 'file'.
522
+ */
523
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "file", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
524
+ /**
525
+ * @required The file content, represented as either a URI or as base64-encoded bytes.
526
+ */
527
+ file: z.ZodUnion<[z.ZodObject<{
528
+ /**
529
+ * @optional An optional name for the file (e.g., "document.pdf").
530
+ */
531
+ name: z.ZodOptional<z.ZodString>;
532
+ /**
533
+ * @optional The MIME type of the file (e.g., "application/pdf").
534
+ */
535
+ mimeType: z.ZodOptional<z.ZodString>;
536
+ } & {
537
+ /**
538
+ * @required The base64-encoded content of the file.
539
+ */
540
+ bytes: z.ZodString;
541
+ /**
542
+ * @optional The `uri` property must be absent when `bytes` is present.
543
+ */
544
+ uri: z.ZodOptional<z.ZodNever>;
545
+ }, "strip", z.ZodTypeAny, {
546
+ bytes: string;
547
+ name?: string | undefined;
548
+ mimeType?: string | undefined;
549
+ uri?: undefined;
550
+ }, {
551
+ bytes: string;
552
+ name?: string | undefined;
553
+ mimeType?: string | undefined;
554
+ uri?: undefined;
555
+ }>, z.ZodObject<{
556
+ /**
557
+ * @optional An optional name for the file (e.g., "document.pdf").
558
+ */
559
+ name: z.ZodOptional<z.ZodString>;
560
+ /**
561
+ * @optional The MIME type of the file (e.g., "application/pdf").
562
+ */
563
+ mimeType: z.ZodOptional<z.ZodString>;
564
+ } & {
565
+ /**
566
+ * @required A URL pointing to the file's content. (keeping as string for now)
567
+ */
568
+ uri: z.ZodString;
569
+ /**
570
+ * @optional The `bytes` property must be absent when `uri` is present.
571
+ */
572
+ bytes: z.ZodOptional<z.ZodNever>;
573
+ }, "strip", z.ZodTypeAny, {
574
+ uri: string;
575
+ name?: string | undefined;
576
+ mimeType?: string | undefined;
577
+ bytes?: undefined;
578
+ }, {
579
+ uri: string;
580
+ name?: string | undefined;
581
+ mimeType?: string | undefined;
582
+ bytes?: undefined;
583
+ }>]>;
584
+ }, "strip", z.ZodTypeAny, {
585
+ file: {
586
+ bytes: string;
587
+ name?: string | undefined;
588
+ mimeType?: string | undefined;
589
+ uri?: undefined;
590
+ } | {
591
+ uri: string;
592
+ name?: string | undefined;
593
+ mimeType?: string | undefined;
594
+ bytes?: undefined;
595
+ };
596
+ kind: "file";
597
+ metadata?: Record<string, unknown> | undefined;
598
+ }, {
599
+ file: {
600
+ bytes: string;
601
+ name?: string | undefined;
602
+ mimeType?: string | undefined;
603
+ uri?: undefined;
604
+ } | {
605
+ uri: string;
606
+ name?: string | undefined;
607
+ mimeType?: string | undefined;
608
+ bytes?: undefined;
609
+ };
610
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
611
+ metadata?: Record<string, unknown> | undefined;
612
+ }>, z.ZodObject<{
613
+ /**
614
+ * @optional Optional metadata associated with this part.
615
+ */
616
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
617
+ } & {
618
+ /**
619
+ * @required The type of this object, used as a discriminator. Always 'data' for a DataPart.
620
+ */
621
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "data", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
622
+ /**
623
+ * @required The structured data content of the data part.
624
+ */
625
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
626
+ }, "strip", z.ZodTypeAny, {
627
+ data: Record<string, unknown>;
628
+ kind: "data";
629
+ metadata?: Record<string, unknown> | undefined;
630
+ }, {
631
+ data: Record<string, unknown>;
632
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
633
+ metadata?: Record<string, unknown> | undefined;
634
+ }>]>, "many">;
131
635
  /**
132
- * @optional metadata associated with the artifact.
636
+ * @optional Optional metadata for extensions. The key is an extension-specific identifier.
133
637
  */
134
- metadata?: Record<string, unknown>;
638
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
135
639
  /**
136
- * @optional The URIs of extensions that are present or contributed to this Artifact.
640
+ * @optional The URIs of extensions that are relevant to this artifact.
137
641
  */
138
- extension?: string;
139
- }
642
+ extension: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
643
+ }, "strip", z.ZodTypeAny, {
644
+ artifactId: string;
645
+ parts: ({
646
+ file: {
647
+ bytes: string;
648
+ name?: string | undefined;
649
+ mimeType?: string | undefined;
650
+ uri?: undefined;
651
+ } | {
652
+ uri: string;
653
+ name?: string | undefined;
654
+ mimeType?: string | undefined;
655
+ bytes?: undefined;
656
+ };
657
+ kind: "file";
658
+ metadata?: Record<string, unknown> | undefined;
659
+ } | {
660
+ text: string;
661
+ kind: "text";
662
+ metadata?: Record<string, unknown> | undefined;
663
+ } | {
664
+ data: Record<string, unknown>;
665
+ kind: "data";
666
+ metadata?: Record<string, unknown> | undefined;
667
+ })[];
668
+ description?: string | undefined;
669
+ name?: string | undefined;
670
+ metadata?: Record<string, unknown> | undefined;
671
+ extension?: string[] | undefined;
672
+ }, {
673
+ artifactId: string;
674
+ parts: ({
675
+ file: {
676
+ bytes: string;
677
+ name?: string | undefined;
678
+ mimeType?: string | undefined;
679
+ uri?: undefined;
680
+ } | {
681
+ uri: string;
682
+ name?: string | undefined;
683
+ mimeType?: string | undefined;
684
+ bytes?: undefined;
685
+ };
686
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
687
+ metadata?: Record<string, unknown> | undefined;
688
+ } | {
689
+ text: string;
690
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
691
+ metadata?: Record<string, unknown> | undefined;
692
+ } | {
693
+ data: Record<string, unknown>;
694
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
695
+ metadata?: Record<string, unknown> | undefined;
696
+ })[];
697
+ description?: string | undefined;
698
+ name?: string | undefined;
699
+ metadata?: Record<string, unknown> | undefined;
700
+ extension?: string[] | undefined;
701
+ }>;
702
+ export type Artifact = z.infer<typeof ArtifactSchema>;
140
703
  /**
141
- * @description Represents a message exchanged between a user and an agent.
142
- * @required role
143
- * @required parts
144
- * @optional metadata
145
- * @optional extensions
146
- * @optional referenceTaskIds
147
- * @optional messageId
148
- * @optional taskId
704
+ * @description Represents the role of a message sender.
149
705
  */
150
- export interface Message {
706
+ export declare const MessageRoleSchema: z.ZodEnum<["user", "agent"]>;
707
+ export type MessageRole = z.infer<typeof MessageRoleSchema>;
708
+ /**
709
+ * @description Represents a single message in the conversation between a user and an agent.
710
+ */
711
+ export declare const MessageSchema: z.ZodObject<{
151
712
  /**
152
- * @required The role of the sender (user or agent).
713
+ * @required Identifies the sender of the message. `user` for the client, `agent` for the service.
153
714
  */
154
- role: "user" | "agent";
715
+ role: z.ZodEnum<["user", "agent"]>;
155
716
  /**
156
- * @required The content of the message, composed of one or more parts.
717
+ * @required An array of content parts that form the message body. A message can be
718
+ * composed of multiple parts of different types (e.g., text and files).
157
719
  */
158
- parts: Part[];
720
+ parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
721
+ /**
722
+ * @optional Optional metadata associated with this part.
723
+ */
724
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
725
+ } & {
726
+ /**
727
+ * @required The type of this object, used as a discriminator. Always 'text' for a TextPart.
728
+ */
729
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "text", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
730
+ /**
731
+ * @required The string content of the text part.
732
+ */
733
+ text: z.ZodString;
734
+ }, "strip", z.ZodTypeAny, {
735
+ text: string;
736
+ kind: "text";
737
+ metadata?: Record<string, unknown> | undefined;
738
+ }, {
739
+ text: string;
740
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
741
+ metadata?: Record<string, unknown> | undefined;
742
+ }>, z.ZodObject<{
743
+ /**
744
+ * @optional Optional metadata associated with this part.
745
+ */
746
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
747
+ } & {
748
+ /**
749
+ * @required The type of this part, used as a discriminator. Always 'file'.
750
+ */
751
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "file", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
752
+ /**
753
+ * @required The file content, represented as either a URI or as base64-encoded bytes.
754
+ */
755
+ file: z.ZodUnion<[z.ZodObject<{
756
+ /**
757
+ * @optional An optional name for the file (e.g., "document.pdf").
758
+ */
759
+ name: z.ZodOptional<z.ZodString>;
760
+ /**
761
+ * @optional The MIME type of the file (e.g., "application/pdf").
762
+ */
763
+ mimeType: z.ZodOptional<z.ZodString>;
764
+ } & {
765
+ /**
766
+ * @required The base64-encoded content of the file.
767
+ */
768
+ bytes: z.ZodString;
769
+ /**
770
+ * @optional The `uri` property must be absent when `bytes` is present.
771
+ */
772
+ uri: z.ZodOptional<z.ZodNever>;
773
+ }, "strip", z.ZodTypeAny, {
774
+ bytes: string;
775
+ name?: string | undefined;
776
+ mimeType?: string | undefined;
777
+ uri?: undefined;
778
+ }, {
779
+ bytes: string;
780
+ name?: string | undefined;
781
+ mimeType?: string | undefined;
782
+ uri?: undefined;
783
+ }>, z.ZodObject<{
784
+ /**
785
+ * @optional An optional name for the file (e.g., "document.pdf").
786
+ */
787
+ name: z.ZodOptional<z.ZodString>;
788
+ /**
789
+ * @optional The MIME type of the file (e.g., "application/pdf").
790
+ */
791
+ mimeType: z.ZodOptional<z.ZodString>;
792
+ } & {
793
+ /**
794
+ * @required A URL pointing to the file's content. (keeping as string for now)
795
+ */
796
+ uri: z.ZodString;
797
+ /**
798
+ * @optional The `bytes` property must be absent when `uri` is present.
799
+ */
800
+ bytes: z.ZodOptional<z.ZodNever>;
801
+ }, "strip", z.ZodTypeAny, {
802
+ uri: string;
803
+ name?: string | undefined;
804
+ mimeType?: string | undefined;
805
+ bytes?: undefined;
806
+ }, {
807
+ uri: string;
808
+ name?: string | undefined;
809
+ mimeType?: string | undefined;
810
+ bytes?: undefined;
811
+ }>]>;
812
+ }, "strip", z.ZodTypeAny, {
813
+ file: {
814
+ bytes: string;
815
+ name?: string | undefined;
816
+ mimeType?: string | undefined;
817
+ uri?: undefined;
818
+ } | {
819
+ uri: string;
820
+ name?: string | undefined;
821
+ mimeType?: string | undefined;
822
+ bytes?: undefined;
823
+ };
824
+ kind: "file";
825
+ metadata?: Record<string, unknown> | undefined;
826
+ }, {
827
+ file: {
828
+ bytes: string;
829
+ name?: string | undefined;
830
+ mimeType?: string | undefined;
831
+ uri?: undefined;
832
+ } | {
833
+ uri: string;
834
+ name?: string | undefined;
835
+ mimeType?: string | undefined;
836
+ bytes?: undefined;
837
+ };
838
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
839
+ metadata?: Record<string, unknown> | undefined;
840
+ }>, z.ZodObject<{
841
+ /**
842
+ * @optional Optional metadata associated with this part.
843
+ */
844
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
845
+ } & {
846
+ /**
847
+ * @required The type of this object, used as a discriminator. Always 'data' for a DataPart.
848
+ */
849
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "data", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
850
+ /**
851
+ * @required The structured data content of the data part.
852
+ */
853
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ data: Record<string, unknown>;
856
+ kind: "data";
857
+ metadata?: Record<string, unknown> | undefined;
858
+ }, {
859
+ data: Record<string, unknown>;
860
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
861
+ metadata?: Record<string, unknown> | undefined;
862
+ }>]>, "many">;
159
863
  /**
160
- * @optional metadata associated with the message.
864
+ * @optional Optional metadata for extensions. The key is an extension-specific identifier.
161
865
  */
162
- metadata?: Record<string, unknown>;
866
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
163
867
  /**
164
- * @optional The URIs of extensions that are present or contributed to this Message.
868
+ * @optional The URIs of extensions that are relevant to this message.
165
869
  */
166
- extensions?: string[];
870
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
167
871
  /**
168
- * @optional List of tasks referenced as context by this message.
872
+ * @optional A list of other task IDs that this message references for additional context.
169
873
  */
170
- referenceTaskIds?: string[];
874
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
171
875
  /**
172
- * @required Identifier created by the message creator
876
+ * @required A unique identifier for the message, typically a UUID, generated by the sender.
173
877
  */
174
- messageId: string;
878
+ messageId: z.ZodString;
175
879
  /**
176
- * @optional Identifier of task the message is related to
880
+ * @optional The identifier of the task this message is part of. Can be omitted for the first message of a new task.
177
881
  */
178
- taskId?: string;
882
+ taskId: z.ZodOptional<z.ZodString>;
179
883
  /**
180
- * @optional The context the message is associated with
884
+ * @optional The context identifier for this message, used to group related interactions.
181
885
  */
182
- contextId?: string;
886
+ contextId: z.ZodOptional<z.ZodString>;
183
887
  /**
184
- * @required Event type
888
+ * @required The type of this object, used as a discriminator. Always 'message' for a Message.
185
889
  */
890
+ kind: z.ZodEffects<z.ZodEnum<["artifact-update", "data", "file", "message", "status-update", "task", "text"]>, "message", "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text">;
891
+ }, "strip", z.ZodTypeAny, {
186
892
  kind: "message";
187
- }
893
+ parts: ({
894
+ file: {
895
+ bytes: string;
896
+ name?: string | undefined;
897
+ mimeType?: string | undefined;
898
+ uri?: undefined;
899
+ } | {
900
+ uri: string;
901
+ name?: string | undefined;
902
+ mimeType?: string | undefined;
903
+ bytes?: undefined;
904
+ };
905
+ kind: "file";
906
+ metadata?: Record<string, unknown> | undefined;
907
+ } | {
908
+ text: string;
909
+ kind: "text";
910
+ metadata?: Record<string, unknown> | undefined;
911
+ } | {
912
+ data: Record<string, unknown>;
913
+ kind: "data";
914
+ metadata?: Record<string, unknown> | undefined;
915
+ })[];
916
+ role: "user" | "agent";
917
+ messageId: string;
918
+ metadata?: Record<string, unknown> | undefined;
919
+ extensions?: string[] | undefined;
920
+ referenceTaskIds?: string[] | undefined;
921
+ taskId?: string | undefined;
922
+ contextId?: string | undefined;
923
+ }, {
924
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
925
+ parts: ({
926
+ file: {
927
+ bytes: string;
928
+ name?: string | undefined;
929
+ mimeType?: string | undefined;
930
+ uri?: undefined;
931
+ } | {
932
+ uri: string;
933
+ name?: string | undefined;
934
+ mimeType?: string | undefined;
935
+ bytes?: undefined;
936
+ };
937
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
938
+ metadata?: Record<string, unknown> | undefined;
939
+ } | {
940
+ text: string;
941
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
942
+ metadata?: Record<string, unknown> | undefined;
943
+ } | {
944
+ data: Record<string, unknown>;
945
+ kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
946
+ metadata?: Record<string, unknown> | undefined;
947
+ })[];
948
+ role: "user" | "agent";
949
+ messageId: string;
950
+ metadata?: Record<string, unknown> | undefined;
951
+ extensions?: string[] | undefined;
952
+ referenceTaskIds?: string[] | undefined;
953
+ taskId?: string | undefined;
954
+ contextId?: string | undefined;
955
+ }>;
956
+ export type Message = z.infer<typeof MessageSchema>;
188
957
  //# sourceMappingURL=parameters.d.ts.map