@artinet/sdk 0.5.2 → 0.5.4

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 (220) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +69 -89
  3. package/dist/client/a2a-client.js +25 -7
  4. package/dist/client/a2a-client.js.map +1 -1
  5. package/dist/server/a2a-server.js +51 -241
  6. package/dist/server/a2a-server.js.map +1 -1
  7. package/dist/server/interfaces/params.js.map +1 -1
  8. package/dist/server/interfaces/store.js +16 -0
  9. package/dist/server/interfaces/store.js.map +1 -1
  10. package/dist/server/lib/express-server.js +211 -2
  11. package/dist/server/lib/express-server.js.map +1 -1
  12. package/dist/server/lib/middleware/a2a-methods.js +61 -24
  13. package/dist/server/lib/middleware/a2a-methods.js.map +1 -1
  14. package/dist/server/lib/middleware/factory.js +6 -6
  15. package/dist/server/lib/middleware/factory.js.map +1 -1
  16. package/dist/server/lib/state.js +44 -72
  17. package/dist/server/lib/state.js.map +1 -1
  18. package/dist/server/lib/storage/memory.js.map +1 -1
  19. package/dist/server/lib/update/base.js +109 -0
  20. package/dist/server/lib/update/base.js.map +1 -0
  21. package/dist/services/a2a/index.js +3 -0
  22. package/dist/services/a2a/index.js.map +1 -0
  23. package/dist/services/a2a/repository.js +160 -0
  24. package/dist/services/a2a/repository.js.map +1 -0
  25. package/dist/services/a2a/service.js +247 -0
  26. package/dist/services/a2a/service.js.map +1 -0
  27. package/dist/services/index.js +2 -0
  28. package/dist/services/index.js.map +1 -0
  29. package/dist/services/manager.js +61 -0
  30. package/dist/services/manager.js.map +1 -0
  31. package/dist/services/mcp/index.js +2 -0
  32. package/dist/services/mcp/index.js.map +1 -0
  33. package/dist/services/mcp/service.js +75 -0
  34. package/dist/services/mcp/service.js.map +1 -0
  35. package/dist/transport/rpc/parser.js +2 -1
  36. package/dist/transport/rpc/parser.js.map +1 -1
  37. package/dist/transport/rpc/rpc-client.js.map +1 -1
  38. package/dist/transport/streaming/stream.js +19 -36
  39. package/dist/transport/streaming/stream.js.map +1 -1
  40. package/dist/types/client/a2a-client.d.ts +21 -7
  41. package/dist/types/client/a2a-client.d.ts.map +1 -1
  42. package/dist/types/express.js +2 -0
  43. package/dist/types/express.js.map +1 -0
  44. package/dist/types/extended-schema.js +1 -1
  45. package/dist/types/extended-schema.js.map +1 -1
  46. package/dist/types/index.js +2 -1
  47. package/dist/types/index.js.map +1 -1
  48. package/dist/types/schemas/a2a/auth/auth.js +2 -0
  49. package/dist/types/schemas/a2a/auth/auth.js.map +1 -0
  50. package/dist/types/schemas/a2a/auth/base.js +2 -0
  51. package/dist/types/schemas/a2a/auth/base.js.map +1 -0
  52. package/dist/types/schemas/a2a/auth/index.js +4 -0
  53. package/dist/types/schemas/a2a/auth/index.js.map +1 -0
  54. package/dist/types/schemas/a2a/auth/oauth.js +2 -0
  55. package/dist/types/schemas/a2a/auth/oauth.js.map +1 -0
  56. package/dist/types/schemas/a2a/error.js +45 -0
  57. package/dist/types/schemas/a2a/error.js.map +1 -0
  58. package/dist/types/schemas/a2a/index.js +8 -0
  59. package/dist/types/schemas/a2a/index.js.map +1 -0
  60. package/dist/types/schemas/a2a/message.js +2 -0
  61. package/dist/types/schemas/a2a/message.js.map +1 -0
  62. package/dist/types/schemas/a2a/notification.js +2 -0
  63. package/dist/types/schemas/a2a/notification.js.map +1 -0
  64. package/dist/types/schemas/a2a/parameters.js +2 -0
  65. package/dist/types/schemas/a2a/parameters.js.map +1 -0
  66. package/dist/types/schemas/a2a/ref.js +25 -0
  67. package/dist/types/schemas/a2a/ref.js.map +1 -0
  68. package/dist/types/schemas/a2a/rpc.js +2 -0
  69. package/dist/types/schemas/a2a/rpc.js.map +1 -0
  70. package/dist/types/schemas/a2a/task.js +16 -0
  71. package/dist/types/schemas/a2a/task.js.map +1 -0
  72. package/dist/types/schemas/index.js +2 -0
  73. package/dist/types/schemas/index.js.map +1 -0
  74. package/dist/types/server/a2a-server.d.ts +9 -20
  75. package/dist/types/server/a2a-server.d.ts.map +1 -1
  76. package/dist/types/server/interfaces/params.d.ts +11 -11
  77. package/dist/types/server/interfaces/params.d.ts.map +1 -1
  78. package/dist/types/server/interfaces/server.d.ts +4 -4
  79. package/dist/types/server/interfaces/server.d.ts.map +1 -1
  80. package/dist/types/server/interfaces/store.d.ts +6 -1
  81. package/dist/types/server/interfaces/store.d.ts.map +1 -1
  82. package/dist/types/server/lib/express-server.d.ts +49 -1
  83. package/dist/types/server/lib/express-server.d.ts.map +1 -1
  84. package/dist/types/server/lib/middleware/a2a-methods.d.ts.map +1 -1
  85. package/dist/types/server/lib/middleware/factory.d.ts +2 -2
  86. package/dist/types/server/lib/middleware/factory.d.ts.map +1 -1
  87. package/dist/types/server/lib/state.d.ts +7 -15
  88. package/dist/types/server/lib/state.d.ts.map +1 -1
  89. package/dist/types/server/lib/storage/memory.d.ts.map +1 -1
  90. package/dist/types/server/lib/update/base.d.ts +21 -0
  91. package/dist/types/server/lib/update/base.d.ts.map +1 -0
  92. package/dist/types/services/a2a/index.d.ts +3 -0
  93. package/dist/types/services/a2a/index.d.ts.map +1 -0
  94. package/dist/types/services/a2a/repository.d.ts +77 -0
  95. package/dist/types/services/a2a/repository.d.ts.map +1 -0
  96. package/dist/types/services/a2a/repository.js +2 -0
  97. package/dist/types/services/a2a/repository.js.map +1 -0
  98. package/dist/types/services/a2a/service.d.ts +45 -0
  99. package/dist/types/services/a2a/service.d.ts.map +1 -0
  100. package/dist/types/services/a2a/service.js +2 -0
  101. package/dist/types/services/a2a/service.js.map +1 -0
  102. package/dist/types/services/context.js +29 -0
  103. package/dist/types/services/context.js.map +1 -0
  104. package/dist/types/services/dispatcher.js +33 -0
  105. package/dist/types/services/dispatcher.js.map +1 -0
  106. package/dist/types/services/index.d.ts +2 -0
  107. package/dist/types/services/index.d.ts.map +1 -0
  108. package/dist/types/services/index.js +9 -0
  109. package/dist/types/services/index.js.map +1 -0
  110. package/dist/types/services/manager.d.ts +44 -0
  111. package/dist/types/services/manager.d.ts.map +1 -0
  112. package/dist/types/services/manager.js +2 -0
  113. package/dist/types/services/manager.js.map +1 -0
  114. package/dist/types/services/mcp/index.d.ts +2 -0
  115. package/dist/types/services/mcp/index.d.ts.map +1 -0
  116. package/dist/types/services/mcp/service.d.ts +30 -0
  117. package/dist/types/services/mcp/service.d.ts.map +1 -0
  118. package/dist/types/services/mcp/service.js +8 -0
  119. package/dist/types/services/mcp/service.js.map +1 -0
  120. package/dist/types/services/protocol.js +31 -0
  121. package/dist/types/services/protocol.js.map +1 -0
  122. package/dist/types/services/service.js +2 -0
  123. package/dist/types/services/service.js.map +1 -0
  124. package/dist/types/transform.js +35 -0
  125. package/dist/types/transform.js.map +1 -0
  126. package/dist/types/transport/rpc/parser.d.ts.map +1 -1
  127. package/dist/types/transport/rpc/rpc-client.d.ts.map +1 -1
  128. package/dist/types/transport/streaming/stream.d.ts +6 -5
  129. package/dist/types/transport/streaming/stream.d.ts.map +1 -1
  130. package/dist/types/types/client.d.ts +26 -9
  131. package/dist/types/types/client.d.ts.map +1 -1
  132. package/dist/types/types/express.d.ts +66 -0
  133. package/dist/types/types/express.d.ts.map +1 -0
  134. package/dist/types/types/extended-schema.d.ts +88 -33
  135. package/dist/types/types/extended-schema.d.ts.map +1 -1
  136. package/dist/types/types/index.d.ts +2 -1
  137. package/dist/types/types/index.d.ts.map +1 -1
  138. package/dist/types/types/proxy.d.ts +4 -5
  139. package/dist/types/types/proxy.d.ts.map +1 -1
  140. package/dist/types/types/schemas/a2a/auth/auth.d.ts +80 -0
  141. package/dist/types/types/schemas/a2a/auth/auth.d.ts.map +1 -0
  142. package/dist/types/types/schemas/a2a/auth/base.d.ts +16 -0
  143. package/dist/types/types/schemas/a2a/auth/base.d.ts.map +1 -0
  144. package/dist/types/types/schemas/a2a/auth/index.d.ts +4 -0
  145. package/dist/types/types/schemas/a2a/auth/index.d.ts.map +1 -0
  146. package/dist/types/types/schemas/a2a/auth/oauth.d.ts +124 -0
  147. package/dist/types/types/schemas/a2a/auth/oauth.d.ts.map +1 -0
  148. package/dist/types/types/schemas/a2a/error.d.ts +75 -0
  149. package/dist/types/types/schemas/a2a/error.d.ts.map +1 -0
  150. package/dist/types/types/schemas/a2a/index.d.ts +220 -0
  151. package/dist/types/types/schemas/a2a/index.d.ts.map +1 -0
  152. package/dist/types/types/schemas/a2a/message.d.ts +90 -0
  153. package/dist/types/types/schemas/a2a/message.d.ts.map +1 -0
  154. package/dist/types/types/schemas/a2a/notification.d.ts +87 -0
  155. package/dist/types/types/schemas/a2a/notification.d.ts.map +1 -0
  156. package/dist/types/types/schemas/a2a/parameters.d.ts +188 -0
  157. package/dist/types/types/schemas/a2a/parameters.d.ts.map +1 -0
  158. package/dist/types/types/schemas/a2a/ref.d.ts +2057 -0
  159. package/dist/types/types/schemas/a2a/ref.d.ts.map +1 -0
  160. package/dist/types/types/schemas/a2a/rpc.d.ts +104 -0
  161. package/dist/types/types/schemas/a2a/rpc.d.ts.map +1 -0
  162. package/dist/types/types/schemas/a2a/task.d.ts +252 -0
  163. package/dist/types/types/schemas/a2a/task.d.ts.map +1 -0
  164. package/dist/types/types/schemas/index.d.ts +2 -0
  165. package/dist/types/types/schemas/index.d.ts.map +1 -0
  166. package/dist/types/types/services/a2a/repository.d.ts +85 -0
  167. package/dist/types/types/services/a2a/repository.d.ts.map +1 -0
  168. package/dist/types/types/services/a2a/service.d.ts +29 -0
  169. package/dist/types/types/services/a2a/service.d.ts.map +1 -0
  170. package/dist/types/types/services/context.d.ts +167 -0
  171. package/dist/types/types/services/context.d.ts.map +1 -0
  172. package/dist/types/types/services/dispatcher.d.ts +20 -0
  173. package/dist/types/types/services/dispatcher.d.ts.map +1 -0
  174. package/dist/types/types/services/index.d.ts +9 -0
  175. package/dist/types/types/services/index.d.ts.map +1 -0
  176. package/dist/types/types/services/manager.d.ts +42 -0
  177. package/dist/types/types/services/manager.d.ts.map +1 -0
  178. package/dist/types/types/services/mcp/service.d.ts +57 -0
  179. package/dist/types/types/services/mcp/service.d.ts.map +1 -0
  180. package/dist/types/types/services/protocol.d.ts +30 -0
  181. package/dist/types/types/services/protocol.d.ts.map +1 -0
  182. package/dist/types/types/services/service.d.ts +35 -0
  183. package/dist/types/types/services/service.d.ts.map +1 -0
  184. package/dist/types/types/transform.d.ts +61 -0
  185. package/dist/types/types/transform.d.ts.map +1 -0
  186. package/dist/types/utils/api/register.d.ts.map +1 -1
  187. package/dist/types/utils/common/constants.d.ts +4 -4
  188. package/dist/types/utils/common/constants.d.ts.map +1 -1
  189. package/dist/types/utils/common/errors.d.ts +19 -15
  190. package/dist/types/utils/common/errors.d.ts.map +1 -1
  191. package/dist/types/utils/common/utils.d.ts +2 -13
  192. package/dist/types/utils/common/utils.d.ts.map +1 -1
  193. package/dist/types/utils/deployment/task-wrapper.d.ts +5 -6
  194. package/dist/types/utils/deployment/task-wrapper.d.ts.map +1 -1
  195. package/dist/types/utils/deployment/test-deployment.d.ts +2 -2
  196. package/dist/types/utils/deployment/test-deployment.d.ts.map +1 -1
  197. package/dist/types/utils/logging/log.d.ts.map +1 -1
  198. package/dist/utils/api/register.js +1 -3
  199. package/dist/utils/api/register.js.map +1 -1
  200. package/dist/utils/common/constants.js +37 -24
  201. package/dist/utils/common/constants.js.map +1 -1
  202. package/dist/utils/common/errors.js +20 -9
  203. package/dist/utils/common/errors.js.map +1 -1
  204. package/dist/utils/common/utils.js +5 -27
  205. package/dist/utils/common/utils.js.map +1 -1
  206. package/dist/utils/deployment/agents.js.map +1 -1
  207. package/dist/utils/deployment/task-wrapper.js +3 -3
  208. package/dist/utils/deployment/task-wrapper.js.map +1 -1
  209. package/dist/utils/deployment/test-deployment.js +3 -4
  210. package/dist/utils/deployment/test-deployment.js.map +1 -1
  211. package/dist/utils/logging/log.js.map +1 -1
  212. package/package.json +9 -5
  213. package/dist/types/context.js +0 -2
  214. package/dist/types/context.js.map +0 -1
  215. package/dist/types/schema.js +0 -23
  216. package/dist/types/schema.js.map +0 -1
  217. package/dist/types/types/context.d.ts +0 -41
  218. package/dist/types/types/context.d.ts.map +0 -1
  219. package/dist/types/types/schema.d.ts +0 -694
  220. package/dist/types/types/schema.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,7 +5,26 @@ All notable changes to the @artinet/sdk package will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [0.5.2] - 2025-05-25 (Please fill in the date)
8
+ ## [0.5.4] - 2025-06-12
9
+
10
+ ### Added
11
+ - New `ExecutionContext` interface for enhanced parameter management across services
12
+ - `MCPExecutionContext` and `NLWebExecutionContext` interfaces for protocol-specific request handling
13
+ - New schema organization under `schemas/a2a` directory for improved code structure
14
+
15
+ ### Changed
16
+ - **BREAKING**: Renamed core methods to align with message-based approach:
17
+ - `sendTask` → `sendMessage`
18
+ - `sendTaskSubscribe` → `sendStreamingMessage`
19
+ - Updated push notification config methods to `tasks/pushNotificationConfig/set` and `tasks/pushNotificationConfig/get`
20
+ - Refactored import paths to use new schema structure under `schemas/a2a`
21
+ - Enhanced error handling and validation for message parameters across the codebase
22
+ - Updated documentation to reflect new method names and functionalities
23
+
24
+ ### Removed
25
+ - Deprecated submodules for `a2a-samples` and `mcp-use`
26
+
27
+ ## [0.5.2] - 2025-05-25
9
28
 
10
29
  ### Added
11
30
  - New `artinet.v0` namespace in `src/utils/deployment/agents.ts` providing `taskManager`, `connect`, and `agent` utilities. These are designed for agents running in sandboxed or managed environments, offering a standardized way to interact with the host system for task execution, inter-agent communication, and external API calls.
package/README.md CHANGED
@@ -5,22 +5,31 @@
5
5
 
6
6
  <!-- [![Coverage Status](https://coveralls.io/repos/github/the-artinet-project/artinet-sdk/badge.svg?branch=main)](https://coveralls.io/github/the-artinet-project/artinet-sdk?branch=main) -->
7
7
 
8
- # Artinet SDK
8
+ # artinet SDK
9
9
 
10
- Artinet SDK is a [Agent2Agent (A2A) Protocol](https://github.com/google/A2A) compliant server and client written in TypeScript for [node.js](https://nodejs.org/) that aims to simplify the creation of interoperable AI agents. Learn more at [the artinet project](https://artinet.io/).
10
+ The artinet SDK is a Full Stack Agent builder written in TypeScript for [node.js](https://nodejs.org/) that aims to simplify the creation of interoperable AI agents. Learn more at [the artinet project](https://artinet.io/).
11
11
 
12
- This SDK significantly enhances the foundational A2A concepts and samples provided by Google, offering a production-ready solution with a focus on developer experience, reliability, and comprehensive features.
12
+ This SDK significantly supports multiple agentic communication protocols, offering a production-ready solution with a focus on developer experience, reliability, and comprehensive features.
13
+
14
+ ### Quick Start
15
+
16
+ To build your own agent/server use the [`create-quick-agent`](https://www.npmjs.com/package/@artinet/create-quick-agent) command:
17
+
18
+ ```bash
19
+ npx @artinet/create-quick-agent@latest
20
+ ```
21
+
22
+ Its got [serveral template projects](https://github.com/the-artinet-project/create-quick-agent) that you can use to get started building agents today.
13
23
 
14
24
  ## Table of Contents
15
- - [Artinet SDK](#artinet-sdk)
25
+ - [artinet SDK](#artinet-sdk)
26
+ - [Quick Start](#quick-start)
16
27
  - [Table of Contents](#table-of-contents)
17
28
  - [Features](#features)
18
29
  - [Installation](#installation)
19
30
  - [Requirements](#requirements)
31
+ - [Documentation](#documentation)
20
32
  - [Example](#example)
21
- - [Class Documentation](#class-documentation)
22
- - [Core Classes](#core-classes)
23
- - [Key Types \& Interfaces](#key-types--interfaces)
24
33
  - [Running Tests](#running-tests)
25
34
  - [Typescript](#typescript)
26
35
  - [Usage](#usage)
@@ -41,27 +50,21 @@ This SDK significantly enhances the foundational A2A concepts and samples provid
41
50
 
42
51
  ## Features
43
52
 
44
- - **Plug-and-Play Server:** Built on Express.js, the `A2AServer` handles JSON-RPC complexity, routing, protocol compliance, and Server-Sent Events (SSE) streaming mechanics automatically. Just provide your core agent logic (`TaskHandler`) and configuration via `A2AServerParams`.
45
- - **Enhanced Client:** `A2AClient` features refined error handling (`RpcError`), flexible header management for authentication, and clear separation of concerns.
53
+ - **Plug-and-Play Server:** Built on Express.js, the `ExpressServer` handles Transport-layer complexity, routing, protocol compliance, and Server-Sent Events (SSE) streaming mechanics automatically. Just provide your core agent logic (`AgentEngine`) and configuration via `ExpressServerOptions`.
46
54
  - **TypeScript First:** Fully written in TypeScript with comprehensive type definitions for a robust developer experience.
47
- - **Flexible Storage:** Offers built-in `InMemoryTaskStore` (development/testing) and `FileStore` (persistent), with the `TaskStore` interface allowing custom storage solutions.
48
- - **Protocol Compliance:** Implements the complete A2A specification using the official JSON schema, ensuring interoperability.
49
- - **Robust Streaming:** Reliable SSE support for `tasks/sendSubscribe` & `tasks/resubscribe` using `eventsource-parser`.
50
- - **Configurable Logging:** Integrated structured logging via `pino`. Configurable levels using `configureLogger` and `LogLevel`.
51
- - **Advanced Customization:** Allows providing a custom `JSONRPCServerFactory` for fine-grained control over the JSON-RPC server, enabling integration with existing Express apps or adding custom methods.
52
- - **Comprehensive Testing:** Includes a suite of tests to ensure reliability and maintainability.
53
- - **Code Deployment (Experimental)** | Bundle, test, and deploy agent code onto the artinet. Includes bundler, task wrapper, and deployment utilities. | `bundle`, `test/fullDeployment`, `ServerDeploymentRequestParams`, `ServerDeploymentResponse`, `artinet.v0.taskManager`, `artinet.v0.connect`, `artinet.v0.agent` |
55
+ - **Protocol Compliance:** Implements the complete A2A specification with growing support for recieving commands via MCP & ACP.
56
+ - **Code Deployment (Experimental)** | Bundle, test, and deploy agent code onto the artinet. Includes bundler, task wrapper, and deployment utilities.
54
57
 
55
58
  | Component/Feature | Description | Key Classes/Types |
56
59
  | :------------------ | :-------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------- |
57
60
  | **Client** | Interact with A2A-compliant agents. Supports standard & streaming requests. | `A2AClient`, `RpcError` |
58
- | **Server** | Host A2A-compliant agents. Handles protocol details, routing, SSE. | `A2AServer`, `A2AServerParams` |
59
- | **Task Handling** | Define agent logic using async generators. | `TaskHandler`, `TaskContext`, `TaskYieldUpdate` |
60
- | **Storage** | Persist task state. In-memory and file-based options included. | `TaskStore`, `InMemoryTaskStore`, `FileStore` |
61
- | **Streaming (SSE)** | Handle real-time updates via SSE for `tasks/sendSubscribe`/`resubscribe`. | `TaskStatusUpdateEvent`, `TaskArtifactUpdateEvent` |
61
+ | **Server** | Host agents that can communicate using a variety of protocols. Handles protocol details, routing, SSE. | `ExpressServer`, `ExpressServerOptions` |
62
+ | **Reqeust Handling** | Define agent logic using async generators. | `AgentEngine`, `ExecutionContext`, `UpdateEvent` |
63
+ | **Storage** | Persist event state. In-memory and file-based options included. | `Store`, `InMemoryTaskStore`, `FileStore` |
64
+ | **Streaming (SSE)** | Handle real-time updates via SSE. | |
62
65
  | **Logging** | Configure structured logging for debugging and monitoring. | `logger`, `configureLogger`, `LogLevel` |
63
- | **Advanced Server** | Customize the underlying JSON-RPC server or integrate into existing apps. | `JSONRPCServerFactory`, `CreateJSONRPCServerParams`, `createJSONRPCMethod`, A2A Method Types |
64
- | **Core Types** | Based on the official A2A JSON Schema. | `AgentCard`, `Task`, `Message`, `Part`, `Artifact`, etc. |
66
+ | **Advanced Server** | Customize the underlying JSON-RPC server or integrate into existing apps. | `CreateJSONRPCServerParams`, `createJSONRPCMethod` |
67
+ | **Core Types** | Based on the official JSON Schemas. | `Tool`,`AgentCard`, `Task`, `Message`, `Part`, `Artifact`, etc. |
65
68
  | **Agent Utilities (for Sandboxed Environments)** | Standardized utilities for agents in managed environments to interact with the host system for task lifecycle, inter-agent communication, and external API calls. | `artinet.v0.taskManager`, `artinet.v0.connect`, `artinet.v0.agent`, `TaskProxy`, `ConnectAPICallback`, `ClientProxy`, `ClientFactory` |
66
69
 
67
70
  ## Installation
@@ -74,6 +77,10 @@ npm install @artinet/sdk
74
77
 
75
78
  - Node.js (v22.0.0 or higher recommended, check `package.json` engines for exact requirement)
76
79
 
80
+ ## Documentation
81
+
82
+ For more detailed documentation visit our documentation site [here](https://the-artinet-project.github.io/artinet-documentation/).
83
+
77
84
  ## Example
78
85
 
79
86
  A basic A2A server and client interaction. For more detailed examples, see the `examples/` directory.
@@ -82,16 +89,16 @@ A basic A2A server and client interaction. For more detailed examples, see the `
82
89
 
83
90
  ```typescript
84
91
  import {
85
- A2AServer,
86
- TaskContext,
87
- TaskHandler,
92
+ ExpressServer,
93
+ ExecutionContext,
94
+ AgentEngine,
88
95
  InMemoryTaskStore,
89
96
  } from "@artinet/sdk";
90
97
 
91
98
  // Minimal agent logic: receive text, yield working state, yield completed state with echo
92
- const quickAgentLogic: TaskHandler = async function* (context: TaskContext) {
93
- const userInput =
94
- context.userMessage.parts[0].type === "text"
99
+ const quickAgentLogic: AgentEngine = async function* (context: ExecutionContext) {
100
+ const params = context.getRequestParams() as MessageSendParams; //for A2A requests
101
+ const userInput = params.message.parts[0].kind === "text"
95
102
  ? context.userMessage.parts[0].text
96
103
  : "";
97
104
  yield { state: "working" };
@@ -100,13 +107,13 @@ const quickAgentLogic: TaskHandler = async function* (context: TaskContext) {
100
107
  state: "completed",
101
108
  message: {
102
109
  role: "agent",
103
- parts: [{ type: "text", text: `You said: ${userInput}` }],
110
+ parts: [{ kind: "text", text: `You said: ${userInput}` }],
104
111
  },
105
112
  };
106
113
  };
107
114
 
108
115
  const server = new A2AServer({
109
- taskHandler: quickAgentLogic,
116
+ handler: quickAgentLogic,
110
117
  taskStore: new InMemoryTaskStore(),
111
118
  port: 4000,
112
119
  basePath: "/a2a",
@@ -132,11 +139,13 @@ async function runClient() {
132
139
  const client = new A2AClient("http://localhost:4000/a2a");
133
140
 
134
141
  const message = {
135
- role: "user" as const,
136
- parts: [{ type: "text" as const, text: "Hello Quick Start!" }],
142
+ messageId: "test-message-id",
143
+ kind: "message",
144
+ role: "user",
145
+ parts: [{ kind: "text", text: "Hello Quick Start!" }],
137
146
  };
138
147
 
139
- const stream = client.sendTaskSubscribe({ id: "quick-task-1", message });
148
+ const stream = client.sendStreamingMessage({ message });
140
149
 
141
150
  for await (const update of stream) {
142
151
  // process the update
@@ -148,37 +157,6 @@ async function runClient() {
148
157
  runClient().catch(console.error);
149
158
  ```
150
159
 
151
- ## Class Documentation
152
-
153
- The Artinet SDK provides several core classes and interfaces for building A2A clients and servers.
154
-
155
- ### Core Classes
156
-
157
- | Class | Description |
158
- | :------------------ | :------------------------------------------------------------------ |
159
- | `A2AClient` | Client for interacting with A2A servers. |
160
- | `A2AServer` | Express-based server implementation for hosting A2A agents. |
161
- | `RpcError` | Represents client-side errors encountered during A2A communication. |
162
- | `InMemoryTaskStore` | Simple in-memory task persistence (ideal for development/testing). |
163
- | `FileStore` | File-based task persistence (stores task data in the filesystem). |
164
-
165
- ### Key Types & Interfaces
166
-
167
- | Type/Interface | Description |
168
- | :-------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
169
- | `TaskHandler` | Async generator function defining the core agent logic (`async function*(context: TaskContext): AsyncGenerator<TaskYieldUpdate>`). |
170
- | `TaskContext` | Provides task details (`task`, `userMessage`, `history`, `isCancelled()`) to the `TaskHandler`. |
171
- | `TaskStore` | Interface defining the contract for task persistence implementations (like `InMemoryTaskStore`, `FileStore`). |
172
- | `TaskYieldUpdate` | Union type for updates yielded by a `TaskHandler` (representing status changes or generated artifacts). |
173
- | `A2AServerParams` | Configuration object passed to the `A2AServer` constructor (port, store, card, basePath, handler, etc.). |
174
- | `AgentCard` | Describes the agent's capabilities, metadata, skills, and endpoint URL. |
175
- | `Message`, `Part`, `Artifact`, `Task`, `TaskStatus`, etc. | Core types mirroring the structures defined in the A2A JSON Schema specification. Used for requests, responses, and task state. |
176
- | `TaskStatusUpdateEvent`, `TaskArtifactUpdateEvent` | Specific types for Server-Sent Events (SSE) received during streaming operations (`tasks/sendSubscribe`, `tasks/resubscribe`). |
177
- | `LogLevel` | Enum defining logging levels (`error`, `warn`, `info`, `debug`, `trace`) used with the built-in logger. |
178
- | `JSONRPCServerFactory` | Function signature for providing a custom JSON-RPC server creation logic to `A2AServer` for advanced customization. |
179
- | `CreateJSONRPCServerParams` | Object containing dependencies provided _to_ a `JSONRPCServerFactory` function. |
180
- | `SendTaskMethod`, `GetTaskMethod`, ... | Type signatures for specific A2A method handlers, used when implementing custom server logic with `createJSONRPCMethod`. |
181
-
182
160
  ## Running Tests
183
161
 
184
162
  ```bash
@@ -203,7 +181,7 @@ Interact with A2A-compliant agents using the `A2AClient`. See `examples/` for mo
203
181
 
204
182
  #### Basic Client Usage
205
183
 
206
- Send a task using `tasks/send`.
184
+ Send a message using `message/send`.
207
185
 
208
186
  ```typescript
209
187
  import { A2AClient, Message } from "@artinet/sdk";
@@ -211,18 +189,20 @@ import { A2AClient, Message } from "@artinet/sdk";
211
189
  async function runBasicTask() {
212
190
  const client = new A2AClient("https://your-a2a-server.com/a2a");
213
191
  const message: Message = {
192
+ messageId: "test-message",
193
+ kind: "message",
214
194
  role: "user",
215
- parts: [{ type: "text", text: "What is the capital of France?" }],
195
+ parts: [{ kind: "text", text: "What is the capital of France?" }],
216
196
  };
217
197
 
218
- const task = await client.sendTask({ id: "basic-task-1", message });
198
+ const task = await client.sendMessage({ message });
219
199
  console.log("Task Completed:", task);
220
200
  }
221
201
  ```
222
202
 
223
203
  #### Streaming Updates
224
204
 
225
- Receive real-time updates via SSE using `tasks/sendSubscribe` (recommended).
205
+ Receive real-time updates via SSE using `message/stream` (recommended).
226
206
 
227
207
  ```typescript
228
208
  import {
@@ -239,7 +219,7 @@ async function runStreamingTask() {
239
219
  parts: [{ type: "text", text: "Tell me a short story." }],
240
220
  };
241
221
 
242
- const stream = client.sendTaskSubscribe({ id: "streaming-task-1", message });
222
+ const stream = client.sendStreamingMessage({ id: "streaming-task-1", message });
243
223
 
244
224
  for await (const update of stream) {
245
225
  if ((update as TaskStatusUpdateEvent).status) {
@@ -282,13 +262,13 @@ Define agent behavior with an async generator `TaskHandler`.
282
262
  ```typescript
283
263
  import {
284
264
  A2AServer,
285
- TaskContext,
286
- TaskHandler,
265
+ ExecutionContext,
266
+ AgentEngine,
287
267
  InMemoryTaskStore,
288
268
  } from "@artinet/sdk";
289
269
 
290
270
 
291
- const myAgent: TaskHandler = async function* (context: TaskContext) {
271
+ const myAgent: AgentEngine = async function* (context: ExecutionContext) {
292
272
 
293
273
  yield {
294
274
  state: "working",
@@ -409,9 +389,9 @@ The SDK includes features to help make your agent discoverable:
409
389
 
410
390
  Provide a custom `createJSONRPCServer` function (implementing `JSONRPCServerFactory`) for fine-grained control over the underlying RPC server.
411
391
 
412
- This factory function receives objects of type `CreateJSONRPCServerParams` & `RequestParams` containing the necessary SDK dependencies (`taskHandler`, `taskStore`, `agentCard`, `activeCancellations`, `createTaskContext`, `closeStreamsForTask`) and the specific method paramaters (i.e. `SendTaskRequest["params"]`). You can use these dependencies to configure the standard A2A methods and add your own custom JSON-RPC methods.
392
+ This factory function receives objects of type `CreateJSONRPCServerParams` & `RequestParams` containing the necessary SDK dependencies (`taskHandler`, `taskStore`, `agentCard`, `activeCancellations`, `createTaskContext`, `closeStreamsForTask`) and the specific method parameters (i.e. `SendMessageRequest["params"]`). You can use these dependencies to configure the standard A2A methods and add your own custom JSON-RPC methods.
413
393
 
414
- The SDK exports default handlers for the standard A2A methods (e.g., `defaultSendTaskMethod`), create your own using dedicated A2A method types(`SendTaskMethod`) and use `createJSONRPCMethod` to easily wrap these methods with dependency injection and error handling.
394
+ The SDK exports default handlers for the standard A2A methods (e.g., `defaultSendMessageMethod`), create your own using dedicated A2A method types(`SendMessageMethod`) and use `createJSONRPCMethod` to easily wrap these methods with dependency injection and error handling.
415
395
 
416
396
  See `src/server/lib/middleware/factory.ts` and `src/server/lib/middleware/a2a-methods.ts` for implementation details.
417
397
 
@@ -419,13 +399,13 @@ See `src/server/lib/middleware/factory.ts` and `src/server/lib/middleware/a2a-me
419
399
 
420
400
  ```typescript
421
401
 
422
- const myCustomSendMethod: SendTaskMethod = (
402
+ const myCustomSendMethod: SendMessageMethod = (
423
403
  deps,
424
404
  requestParams,
425
405
  callback
426
406
  ) => {
427
407
  const { taskStore, taskHandler, createTaskContext } = deps;
428
- const taskId = extractTaskId(requestParams.id);
408
+ const { id: taskId } = requestParams;
429
409
  const { message, sessionId, metadata } = requestParams;
430
410
  ...
431
411
  callback(null, ...);
@@ -434,21 +414,21 @@ const myCustomSendMethod: SendTaskMethod = (
434
414
  const myCustomRPCServer: JSONRPCServerFactory = (
435
415
  params: CreateJSONRPCServerParams
436
416
  ): JSONRPCServerType => {
437
- //Use a custom task/send method
438
- const taskSendMethod = createJSONRPCMethod(params, myCustomSendMethod, "tasks/send");
417
+ //Use a custom message/send method
418
+ const messageSendMethod = createJSONRPCMethod(params, myCustomSendMethod, "message/send");
439
419
  const taskGetMethod = createJSONRPCMethod(params, defaultGetTaskMethod, "tasks/get");
440
420
  const taskCancelMethod = createJSONRPCMethod(params, defaultCancelTaskMethod, "tasks/cancel");
441
421
 
442
422
  // Note: Push notifications are not fully implemented yet
443
- const taskPushNotificationSetMethod = createJSONRPCMethod(params, defaultSetTaskPushNotificationMethod, "tasks/pushNotification/set");
444
- const taskPushNotificationGetMethod = createJSONRPCMethod(params, defaultGetTaskPushNotificationMethod, "tasks/pushNotification/get");
423
+ const taskPushNotificationSetMethod = createJSONRPCMethod(params, defaultSetTaskPushNotificationMethod, "tasks/pushNotificationConfig/set");
424
+ const taskPushNotificationGetMethod = createJSONRPCMethod(params, defaultGetTaskPushNotificationMethod, "tasks/pushNotificationConfig/get");
445
425
 
446
426
  const rpcServer = new JSONRPCServer({
447
- "tasks/send": taskSendMethod,
427
+ "message/send": messageSendMethod,
448
428
  "tasks/get": taskGetMethod,
449
429
  "tasks/cancel": taskCancelMethod,
450
- "tasks/pushNotification/set": taskPushNotificationSetMethod,
451
- "tasks/pushNotification/get": taskPushNotificationGetMethod,
430
+ "tasks/pushNotificationConfig/set": taskPushNotificationSetMethod,
431
+ "tasks/pushNotificationConfig/get": taskPushNotificationGetMethod,
452
432
  });
453
433
 
454
434
  return rpcServer;
@@ -465,7 +445,7 @@ const server = new A2AServer({
465
445
 
466
446
  Pass your factory function via the `createJSONRPCServer` option during `A2AServer` initialization.
467
447
 
468
- **Important:** The default `A2AServer` setup automatically adds Express middleware to handle Server-Sent Events (SSE) for `tasks/sendSubscribe` and `tasks/resubscribe`, as well as the `/agent/card` (and `/.well-known/agent.json`) GET endpoints. If you are **not** using `A2AServer` and integrating the Jayson server middleware into your own Express application, you **must** implement these SSE and card endpoints yourself to maintain full A2A compliance, especially for streaming functionality. See `src/server/lib/express-server.ts` for how the default server handles these routes.
448
+ **Important:** The default `A2AServer` setup automatically adds Express middleware to handle Server-Sent Events (SSE) for `message/stream` and `tasks/resubscribe`, as well as the `/agent/card` (and `/.well-known/agent.json`) GET endpoints. If you are **not** using `A2AServer` and integrating the Jayson server middleware into your own Express application, you **must** implement these SSE and card endpoints yourself to maintain full A2A compliance, especially for streaming functionality. See `src/server/lib/express-server.ts` for how the default server handles these routes.
469
449
 
470
450
  ### Quick-Agents (Alpha)
471
451
 
@@ -473,7 +453,7 @@ We are excited to introduce new capabilities for deploying agents directly onto
473
453
 
474
454
  We've added a `testDeployment` utility which is available for all users letting you bundle and test your agent logic in a temporary sandboxed environment.
475
455
 
476
- **QUICK-AGENTS ARE HERE!** Use the new `fullDeployment` utility, which allows direct deployment of your bundled agent code and `AgentCard` to the Artinet platform (requires an `ARTINET_API_KEY`).
456
+ **QUICK-AGENTS** Use the `fullDeployment` utility, which allows direct deployment of your bundled agent code and `AgentCard` to the Artinet platform (requires an `ARTINET_API_KEY`).
477
457
 
478
458
  To join the beta waitlist, please email us at humans@artinet.io and stay tuned for more updates!
479
459
 
@@ -487,7 +467,7 @@ Key features include:
487
467
  ```
488
468
 
489
469
  - **Sandboxed Enviroments:** Streamline agent logic for quick and easy deployments. The new `artinet.v0` namespace (accessible via `@artinet/sdk/agents`) provides `taskManager`, `connect`, and `agent`.
490
- - `artinet.v0.taskManager`: Replaces the deprecated `taskHandlerProxy`. Manages the agent's task lifecycle by iterating over the agent's `TaskHandler` and communicating updates to the host environment.
470
+ - `artinet.v0.taskManager`: Manages the agent's lifecycle by iterating over the agent's `TaskHandler` and communicating updates to the host environment.
491
471
  - `artinet.v0.connect`: Replaces the deprecated `fetchResponseProxy`. Allows agents to make proxied calls to other agents or LLMs via the host environment.
492
472
  - `artinet.v0.agent`: A factory function to obtain a `ClientProxy` for type-safe communication with other agents, managed by the host environment.
493
473
 
@@ -551,7 +531,7 @@ Key features include:
551
531
  console.log("Deployment Result:", deploymentResult);
552
532
  ```
553
533
 
554
- - **Dedicated Endpoints:** Once deployed your agent will be available On-Demand at its dedicated enpoint. (e.g. "https://agents.stage.artinet.io/agentId=0xabf698845743538727a81352bfcfdb724e5c2bbe3113a26362482248f9f3e5fa/.well-known/agent.json")
534
+ - **Dedicated Endpoints:** Once deployed your agent will be available On-Demand at its dedicated enpoint. (e.g. "https://agents.artinet.io/agentId=0xabf698845743538727a81352bfcfdb724e5c2bbe3113a26362482248f9f3e5fa/.well-known/agent.json")
555
535
  - **New Types:** To support these features, new types for server deployment requests and responses (such as `ServerDeploymentRequestParams`, `ServerDeploymentResponse`) have been added to `src/types/extended-schema.ts`. New types for sandboxed agent interactions (`TaskProxy`, `ConnectAPICallback`, `ClientProxy`, etc.) are in `src/types/proxy.ts`.
556
536
 
557
537
  **QUICK-AGENT FAQs**
@@ -560,7 +540,7 @@ Key features include:
560
540
  - Quick-Agents v0 does not support streaming, push notifications or state transition history (these capabilities are on the project roadmap).
561
541
  - Larger deployments can take significant time to deploy which may cause `fullDeployment` to timeout. In such cases wait to see if the listing has been added to your account before trying to deploy again.
562
542
  - Quick-Agent logic is public, therefore the artinet project is not liable for any sensitive material held within a deployment.
563
- - v0.0.5c of the artinet platform will enable search by registrationId/agentId.
543
+ - Only availble with version 0.5.3 of the SDK.
564
544
 
565
545
  Sign-up at [artinet.io](https://artinet.io/) to deploy your Quick-Agent today!
566
546
 
@@ -576,7 +556,7 @@ This project is licensed under the Apache License 2.0 - see the `LICENSE` file f
576
556
 
577
557
  ## Acknowledgements
578
558
 
579
- This SDK builds upon the concepts and specifications of the [Agent2Agent (A2A) Protocol](https://github.com/google/A2A) initiated by Google. It utilizes the official [A2A JSON Schema](https://github.com/google/A2A/tree/main/specification/json) for protocol compliance.
559
+ This SDK builds upon the concepts and specifications of the [Agent2Agent (A2A) Protocol](https://github.com/google-a2a/A2A) initiated by Google. It utilizes the official [A2A JSON Schema](https://github.com/google-a2a/A2A/blob/main/specification/json/a2a.json) for protocol compliance.
580
560
 
581
561
  Libraries used include:
582
562
 
@@ -69,19 +69,37 @@ export class A2AClient {
69
69
  }
70
70
  /**
71
71
  * Sends a task request to the agent (non-streaming).
72
- * @param params The parameters for the tasks/send method.
72
+ * @param params The parameters for the message/send method.
73
+ * @returns A promise resolving to the Task object or null.
74
+ */
75
+ async sendMessage(params) {
76
+ return await executeJsonRpcRequest(this.baseUrl, "message/send", params, this.customHeaders);
77
+ }
78
+ /**
79
+ * @deprecated Use sendMessage instead.
80
+ * Sends a task request to the agent (non-streaming).
81
+ * @param params The parameters for the message/send method.
73
82
  * @returns A promise resolving to the Task object or null.
74
83
  */
75
84
  async sendTask(params) {
76
- return await executeJsonRpcRequest(this.baseUrl, "tasks/send", params, this.customHeaders);
85
+ return await this.sendMessage(params);
86
+ }
87
+ /**
88
+ * Sends a task and returns a subscription to status and artifact updates.
89
+ * @param params Task parameters for the request
90
+ * @returns An AsyncIterable that yields TaskStatusUpdateEvent or TaskArtifactUpdateEvent payloads.
91
+ */
92
+ sendStreamingMessage(params) {
93
+ return executeStreamEvents(this.baseUrl, "message/stream", params, this.customHeaders);
77
94
  }
78
95
  /**
96
+ * @deprecated Use sendStreamingMessage instead.
79
97
  * Sends a task and returns a subscription to status and artifact updates.
80
98
  * @param params Task parameters for the request
81
99
  * @returns An AsyncIterable that yields TaskStatusUpdateEvent or TaskArtifactUpdateEvent payloads.
82
100
  */
83
101
  sendTaskSubscribe(params) {
84
- return executeStreamEvents(this.baseUrl, "tasks/sendSubscribe", params, this.customHeaders);
102
+ return this.sendStreamingMessage(params);
85
103
  }
86
104
  /**
87
105
  * Retrieves the current state of a task.
@@ -101,19 +119,19 @@ export class A2AClient {
101
119
  }
102
120
  /**
103
121
  * Sets or updates the push notification config for a task.
104
- * @param params The parameters for the tasks/pushNotification/set method (which is TaskPushNotificationConfig).
122
+ * @param params The parameters for the tasks/pushNotificationConfig/set method (which is TaskPushNotificationConfig).
105
123
  * @returns A promise resolving to the confirmed TaskPushNotificationConfig or null.
106
124
  */
107
125
  async setTaskPushNotification(params) {
108
- return await executeJsonRpcRequest(this.baseUrl, "tasks/pushNotification/set", params, this.customHeaders);
126
+ return await executeJsonRpcRequest(this.baseUrl, "tasks/pushNotificationConfig/set", params, this.customHeaders);
109
127
  }
110
128
  /**
111
129
  * Retrieves the currently configured push notification config for a task.
112
- * @param params The parameters for the tasks/pushNotification/get method.
130
+ * @param params The parameters for the tasks/pushNotificationConfig/get method.
113
131
  * @returns A promise resolving to the TaskPushNotificationConfig or null.
114
132
  */
115
133
  async getTaskPushNotification(params) {
116
- return await executeJsonRpcRequest(this.baseUrl, "tasks/pushNotification/get", params, this.customHeaders);
134
+ return await executeJsonRpcRequest(this.baseUrl, "tasks/pushNotificationConfig/get", params, this.customHeaders);
117
135
  }
118
136
  /**
119
137
  * Resubscribes to an existing task's update stream.
@@ -1 +1 @@
1
- {"version":3,"file":"a2a-client.js","sourceRoot":"","sources":["../../src/client/a2a-client.ts"],"names":[],"mappings":"AAuBA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAI7D;;;GAGG;AACH,MAAM,OAAO,SAAS;IACZ,OAAO,CAAM;IACb,eAAe,GAAqB,IAAI,CAAC;IACzC,aAAa,GAA2B,EAAE,CAAC;IAC3C,YAAY,CAAS;IAC7B;;;;OAIG;IACH,YACE,OAAqB,EACrB,UAAkC,EAAE,EACpC,YAAqB;QAErB,IAAI,CAAC,OAAO,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI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