@artinet/sdk 0.5.3 → 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 +57 -88
  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,11 +5,11 @@
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
13
 
14
14
  ### Quick Start
15
15
 
@@ -22,16 +22,14 @@ npx @artinet/create-quick-agent@latest
22
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.
23
23
 
24
24
  ## Table of Contents
25
- - [Artinet SDK](#artinet-sdk)
25
+ - [artinet SDK](#artinet-sdk)
26
26
  - [Quick Start](#quick-start)
27
27
  - [Table of Contents](#table-of-contents)
28
28
  - [Features](#features)
29
29
  - [Installation](#installation)
30
30
  - [Requirements](#requirements)
31
+ - [Documentation](#documentation)
31
32
  - [Example](#example)
32
- - [Class Documentation](#class-documentation)
33
- - [Core Classes](#core-classes)
34
- - [Key Types \& Interfaces](#key-types--interfaces)
35
33
  - [Running Tests](#running-tests)
36
34
  - [Typescript](#typescript)
37
35
  - [Usage](#usage)
@@ -52,27 +50,21 @@ Its got [serveral template projects](https://github.com/the-artinet-project/crea
52
50
 
53
51
  ## Features
54
52
 
55
- - **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`.
56
- - **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`.
57
54
  - **TypeScript First:** Fully written in TypeScript with comprehensive type definitions for a robust developer experience.
58
- - **Flexible Storage:** Offers built-in `InMemoryTaskStore` (development/testing) and `FileStore` (persistent), with the `TaskStore` interface allowing custom storage solutions.
59
- - **Protocol Compliance:** Implements the complete A2A specification using the official JSON schema, ensuring interoperability.
60
- - **Robust Streaming:** Reliable SSE support for `tasks/sendSubscribe` & `tasks/resubscribe` using `eventsource-parser`.
61
- - **Configurable Logging:** Integrated structured logging via `pino`. Configurable levels using `configureLogger` and `LogLevel`.
62
- - **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.
63
- - **Comprehensive Testing:** Includes a suite of tests to ensure reliability and maintainability.
64
- - **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.
65
57
 
66
58
  | Component/Feature | Description | Key Classes/Types |
67
59
  | :------------------ | :-------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------- |
68
60
  | **Client** | Interact with A2A-compliant agents. Supports standard & streaming requests. | `A2AClient`, `RpcError` |
69
- | **Server** | Host A2A-compliant agents. Handles protocol details, routing, SSE. | `A2AServer`, `A2AServerParams` |
70
- | **Task Handling** | Define agent logic using async generators. | `TaskHandler`, `TaskContext`, `TaskYieldUpdate` |
71
- | **Storage** | Persist task state. In-memory and file-based options included. | `TaskStore`, `InMemoryTaskStore`, `FileStore` |
72
- | **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. | |
73
65
  | **Logging** | Configure structured logging for debugging and monitoring. | `logger`, `configureLogger`, `LogLevel` |
74
- | **Advanced Server** | Customize the underlying JSON-RPC server or integrate into existing apps. | `JSONRPCServerFactory`, `CreateJSONRPCServerParams`, `createJSONRPCMethod`, A2A Method Types |
75
- | **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. |
76
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` |
77
69
 
78
70
  ## Installation
@@ -85,6 +77,10 @@ npm install @artinet/sdk
85
77
 
86
78
  - Node.js (v22.0.0 or higher recommended, check `package.json` engines for exact requirement)
87
79
 
80
+ ## Documentation
81
+
82
+ For more detailed documentation visit our documentation site [here](https://the-artinet-project.github.io/artinet-documentation/).
83
+
88
84
  ## Example
89
85
 
90
86
  A basic A2A server and client interaction. For more detailed examples, see the `examples/` directory.
@@ -93,16 +89,16 @@ A basic A2A server and client interaction. For more detailed examples, see the `
93
89
 
94
90
  ```typescript
95
91
  import {
96
- A2AServer,
97
- TaskContext,
98
- TaskHandler,
92
+ ExpressServer,
93
+ ExecutionContext,
94
+ AgentEngine,
99
95
  InMemoryTaskStore,
100
96
  } from "@artinet/sdk";
101
97
 
102
98
  // Minimal agent logic: receive text, yield working state, yield completed state with echo
103
- const quickAgentLogic: TaskHandler = async function* (context: TaskContext) {
104
- const userInput =
105
- 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"
106
102
  ? context.userMessage.parts[0].text
107
103
  : "";
108
104
  yield { state: "working" };
@@ -111,13 +107,13 @@ const quickAgentLogic: TaskHandler = async function* (context: TaskContext) {
111
107
  state: "completed",
112
108
  message: {
113
109
  role: "agent",
114
- parts: [{ type: "text", text: `You said: ${userInput}` }],
110
+ parts: [{ kind: "text", text: `You said: ${userInput}` }],
115
111
  },
116
112
  };
117
113
  };
118
114
 
119
115
  const server = new A2AServer({
120
- taskHandler: quickAgentLogic,
116
+ handler: quickAgentLogic,
121
117
  taskStore: new InMemoryTaskStore(),
122
118
  port: 4000,
123
119
  basePath: "/a2a",
@@ -143,11 +139,13 @@ async function runClient() {
143
139
  const client = new A2AClient("http://localhost:4000/a2a");
144
140
 
145
141
  const message = {
146
- role: "user" as const,
147
- 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!" }],
148
146
  };
149
147
 
150
- const stream = client.sendTaskSubscribe({ id: "quick-task-1", message });
148
+ const stream = client.sendStreamingMessage({ message });
151
149
 
152
150
  for await (const update of stream) {
153
151
  // process the update
@@ -159,37 +157,6 @@ async function runClient() {
159
157
  runClient().catch(console.error);
160
158
  ```
161
159
 
162
- ## Class Documentation
163
-
164
- The Artinet SDK provides several core classes and interfaces for building A2A clients and servers.
165
-
166
- ### Core Classes
167
-
168
- | Class | Description |
169
- | :------------------ | :------------------------------------------------------------------ |
170
- | `A2AClient` | Client for interacting with A2A servers. |
171
- | `A2AServer` | Express-based server implementation for hosting A2A agents. |
172
- | `RpcError` | Represents client-side errors encountered during A2A communication. |
173
- | `InMemoryTaskStore` | Simple in-memory task persistence (ideal for development/testing). |
174
- | `FileStore` | File-based task persistence (stores task data in the filesystem). |
175
-
176
- ### Key Types & Interfaces
177
-
178
- | Type/Interface | Description |
179
- | :-------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
180
- | `TaskHandler` | Async generator function defining the core agent logic (`async function*(context: TaskContext): AsyncGenerator<TaskYieldUpdate>`). |
181
- | `TaskContext` | Provides task details (`task`, `userMessage`, `history`, `isCancelled()`) to the `TaskHandler`. |
182
- | `TaskStore` | Interface defining the contract for task persistence implementations (like `InMemoryTaskStore`, `FileStore`). |
183
- | `TaskYieldUpdate` | Union type for updates yielded by a `TaskHandler` (representing status changes or generated artifacts). |
184
- | `A2AServerParams` | Configuration object passed to the `A2AServer` constructor (port, store, card, basePath, handler, etc.). |
185
- | `AgentCard` | Describes the agent's capabilities, metadata, skills, and endpoint URL. |
186
- | `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. |
187
- | `TaskStatusUpdateEvent`, `TaskArtifactUpdateEvent` | Specific types for Server-Sent Events (SSE) received during streaming operations (`tasks/sendSubscribe`, `tasks/resubscribe`). |
188
- | `LogLevel` | Enum defining logging levels (`error`, `warn`, `info`, `debug`, `trace`) used with the built-in logger. |
189
- | `JSONRPCServerFactory` | Function signature for providing a custom JSON-RPC server creation logic to `A2AServer` for advanced customization. |
190
- | `CreateJSONRPCServerParams` | Object containing dependencies provided _to_ a `JSONRPCServerFactory` function. |
191
- | `SendTaskMethod`, `GetTaskMethod`, ... | Type signatures for specific A2A method handlers, used when implementing custom server logic with `createJSONRPCMethod`. |
192
-
193
160
  ## Running Tests
194
161
 
195
162
  ```bash
@@ -214,7 +181,7 @@ Interact with A2A-compliant agents using the `A2AClient`. See `examples/` for mo
214
181
 
215
182
  #### Basic Client Usage
216
183
 
217
- Send a task using `tasks/send`.
184
+ Send a message using `message/send`.
218
185
 
219
186
  ```typescript
220
187
  import { A2AClient, Message } from "@artinet/sdk";
@@ -222,18 +189,20 @@ import { A2AClient, Message } from "@artinet/sdk";
222
189
  async function runBasicTask() {
223
190
  const client = new A2AClient("https://your-a2a-server.com/a2a");
224
191
  const message: Message = {
192
+ messageId: "test-message",
193
+ kind: "message",
225
194
  role: "user",
226
- parts: [{ type: "text", text: "What is the capital of France?" }],
195
+ parts: [{ kind: "text", text: "What is the capital of France?" }],
227
196
  };
228
197
 
229
- const task = await client.sendTask({ id: "basic-task-1", message });
198
+ const task = await client.sendMessage({ message });
230
199
  console.log("Task Completed:", task);
231
200
  }
232
201
  ```
233
202
 
234
203
  #### Streaming Updates
235
204
 
236
- Receive real-time updates via SSE using `tasks/sendSubscribe` (recommended).
205
+ Receive real-time updates via SSE using `message/stream` (recommended).
237
206
 
238
207
  ```typescript
239
208
  import {
@@ -250,7 +219,7 @@ async function runStreamingTask() {
250
219
  parts: [{ type: "text", text: "Tell me a short story." }],
251
220
  };
252
221
 
253
- const stream = client.sendTaskSubscribe({ id: "streaming-task-1", message });
222
+ const stream = client.sendStreamingMessage({ id: "streaming-task-1", message });
254
223
 
255
224
  for await (const update of stream) {
256
225
  if ((update as TaskStatusUpdateEvent).status) {
@@ -293,13 +262,13 @@ Define agent behavior with an async generator `TaskHandler`.
293
262
  ```typescript
294
263
  import {
295
264
  A2AServer,
296
- TaskContext,
297
- TaskHandler,
265
+ ExecutionContext,
266
+ AgentEngine,
298
267
  InMemoryTaskStore,
299
268
  } from "@artinet/sdk";
300
269
 
301
270
 
302
- const myAgent: TaskHandler = async function* (context: TaskContext) {
271
+ const myAgent: AgentEngine = async function* (context: ExecutionContext) {
303
272
 
304
273
  yield {
305
274
  state: "working",
@@ -420,9 +389,9 @@ The SDK includes features to help make your agent discoverable:
420
389
 
421
390
  Provide a custom `createJSONRPCServer` function (implementing `JSONRPCServerFactory`) for fine-grained control over the underlying RPC server.
422
391
 
423
- 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.
424
393
 
425
- 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.
426
395
 
427
396
  See `src/server/lib/middleware/factory.ts` and `src/server/lib/middleware/a2a-methods.ts` for implementation details.
428
397
 
@@ -430,13 +399,13 @@ See `src/server/lib/middleware/factory.ts` and `src/server/lib/middleware/a2a-me
430
399
 
431
400
  ```typescript
432
401
 
433
- const myCustomSendMethod: SendTaskMethod = (
402
+ const myCustomSendMethod: SendMessageMethod = (
434
403
  deps,
435
404
  requestParams,
436
405
  callback
437
406
  ) => {
438
407
  const { taskStore, taskHandler, createTaskContext } = deps;
439
- const taskId = extractTaskId(requestParams.id);
408
+ const { id: taskId } = requestParams;
440
409
  const { message, sessionId, metadata } = requestParams;
441
410
  ...
442
411
  callback(null, ...);
@@ -445,21 +414,21 @@ const myCustomSendMethod: SendTaskMethod = (
445
414
  const myCustomRPCServer: JSONRPCServerFactory = (
446
415
  params: CreateJSONRPCServerParams
447
416
  ): JSONRPCServerType => {
448
- //Use a custom task/send method
449
- const taskSendMethod = createJSONRPCMethod(params, myCustomSendMethod, "tasks/send");
417
+ //Use a custom message/send method
418
+ const messageSendMethod = createJSONRPCMethod(params, myCustomSendMethod, "message/send");
450
419
  const taskGetMethod = createJSONRPCMethod(params, defaultGetTaskMethod, "tasks/get");
451
420
  const taskCancelMethod = createJSONRPCMethod(params, defaultCancelTaskMethod, "tasks/cancel");
452
421
 
453
422
  // Note: Push notifications are not fully implemented yet
454
- const taskPushNotificationSetMethod = createJSONRPCMethod(params, defaultSetTaskPushNotificationMethod, "tasks/pushNotification/set");
455
- 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");
456
425
 
457
426
  const rpcServer = new JSONRPCServer({
458
- "tasks/send": taskSendMethod,
427
+ "message/send": messageSendMethod,
459
428
  "tasks/get": taskGetMethod,
460
429
  "tasks/cancel": taskCancelMethod,
461
- "tasks/pushNotification/set": taskPushNotificationSetMethod,
462
- "tasks/pushNotification/get": taskPushNotificationGetMethod,
430
+ "tasks/pushNotificationConfig/set": taskPushNotificationSetMethod,
431
+ "tasks/pushNotificationConfig/get": taskPushNotificationGetMethod,
463
432
  });
464
433
 
465
434
  return rpcServer;
@@ -476,7 +445,7 @@ const server = new A2AServer({
476
445
 
477
446
  Pass your factory function via the `createJSONRPCServer` option during `A2AServer` initialization.
478
447
 
479
- **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.
480
449
 
481
450
  ### Quick-Agents (Alpha)
482
451
 
@@ -484,7 +453,7 @@ We are excited to introduce new capabilities for deploying agents directly onto
484
453
 
485
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.
486
455
 
487
- **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`).
488
457
 
489
458
  To join the beta waitlist, please email us at humans@artinet.io and stay tuned for more updates!
490
459
 
@@ -498,7 +467,7 @@ Key features include:
498
467
  ```
499
468
 
500
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`.
501
- - `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.
502
471
  - `artinet.v0.connect`: Replaces the deprecated `fetchResponseProxy`. Allows agents to make proxied calls to other agents or LLMs via the host environment.
503
472
  - `artinet.v0.agent`: A factory function to obtain a `ClientProxy` for type-safe communication with other agents, managed by the host environment.
504
473
 
@@ -571,7 +540,7 @@ Key features include:
571
540
  - Quick-Agents v0 does not support streaming, push notifications or state transition history (these capabilities are on the project roadmap).
572
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.
573
542
  - Quick-Agent logic is public, therefore the artinet project is not liable for any sensitive material held within a deployment.
574
- - v0.0.5c of the artinet platform will enable search by registrationId/agentId.
543
+ - Only availble with version 0.5.3 of the SDK.
575
544
 
576
545
  Sign-up at [artinet.io](https://artinet.io/) to deploy your Quick-Agent today!
577
546
 
@@ -587,7 +556,7 @@ This project is licensed under the Apache License 2.0 - see the `LICENSE` file f
587
556
 
588
557
  ## Acknowledgements
589
558
 
590
- 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.
591
560
 
592
561
  Libraries used include:
593
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,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACxE,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,aAAa,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,SAAS;QACb,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC,eAAe,CAAC;QAC9B,CAAC;QAED,oCAAoC;QACpC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,yBAAyB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,IAAI,CAAC;YACH,IAAI,CAAC;gBACH,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;oBAChC,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;gBAC5C,CAAC;gBACD,MAAM,IAAI,GAAc,MAAM,iBAAiB,CAC7C,YAAY,EACZ,IAAI,CAAC,aAAa,E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