@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.
- package/CHANGELOG.md +20 -1
- package/README.md +69 -89
- package/dist/client/a2a-client.js +25 -7
- package/dist/client/a2a-client.js.map +1 -1
- package/dist/server/a2a-server.js +51 -241
- package/dist/server/a2a-server.js.map +1 -1
- package/dist/server/interfaces/params.js.map +1 -1
- package/dist/server/interfaces/store.js +16 -0
- package/dist/server/interfaces/store.js.map +1 -1
- package/dist/server/lib/express-server.js +211 -2
- package/dist/server/lib/express-server.js.map +1 -1
- package/dist/server/lib/middleware/a2a-methods.js +61 -24
- package/dist/server/lib/middleware/a2a-methods.js.map +1 -1
- package/dist/server/lib/middleware/factory.js +6 -6
- package/dist/server/lib/middleware/factory.js.map +1 -1
- package/dist/server/lib/state.js +44 -72
- package/dist/server/lib/state.js.map +1 -1
- package/dist/server/lib/storage/memory.js.map +1 -1
- package/dist/server/lib/update/base.js +109 -0
- package/dist/server/lib/update/base.js.map +1 -0
- package/dist/services/a2a/index.js +3 -0
- package/dist/services/a2a/index.js.map +1 -0
- package/dist/services/a2a/repository.js +160 -0
- package/dist/services/a2a/repository.js.map +1 -0
- package/dist/services/a2a/service.js +247 -0
- package/dist/services/a2a/service.js.map +1 -0
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/manager.js +61 -0
- package/dist/services/manager.js.map +1 -0
- package/dist/services/mcp/index.js +2 -0
- package/dist/services/mcp/index.js.map +1 -0
- package/dist/services/mcp/service.js +75 -0
- package/dist/services/mcp/service.js.map +1 -0
- package/dist/transport/rpc/parser.js +2 -1
- package/dist/transport/rpc/parser.js.map +1 -1
- package/dist/transport/rpc/rpc-client.js.map +1 -1
- package/dist/transport/streaming/stream.js +19 -36
- package/dist/transport/streaming/stream.js.map +1 -1
- package/dist/types/client/a2a-client.d.ts +21 -7
- package/dist/types/client/a2a-client.d.ts.map +1 -1
- package/dist/types/express.js +2 -0
- package/dist/types/express.js.map +1 -0
- package/dist/types/extended-schema.js +1 -1
- package/dist/types/extended-schema.js.map +1 -1
- package/dist/types/index.js +2 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/schemas/a2a/auth/auth.js +2 -0
- package/dist/types/schemas/a2a/auth/auth.js.map +1 -0
- package/dist/types/schemas/a2a/auth/base.js +2 -0
- package/dist/types/schemas/a2a/auth/base.js.map +1 -0
- package/dist/types/schemas/a2a/auth/index.js +4 -0
- package/dist/types/schemas/a2a/auth/index.js.map +1 -0
- package/dist/types/schemas/a2a/auth/oauth.js +2 -0
- package/dist/types/schemas/a2a/auth/oauth.js.map +1 -0
- package/dist/types/schemas/a2a/error.js +45 -0
- package/dist/types/schemas/a2a/error.js.map +1 -0
- package/dist/types/schemas/a2a/index.js +8 -0
- package/dist/types/schemas/a2a/index.js.map +1 -0
- package/dist/types/schemas/a2a/message.js +2 -0
- package/dist/types/schemas/a2a/message.js.map +1 -0
- package/dist/types/schemas/a2a/notification.js +2 -0
- package/dist/types/schemas/a2a/notification.js.map +1 -0
- package/dist/types/schemas/a2a/parameters.js +2 -0
- package/dist/types/schemas/a2a/parameters.js.map +1 -0
- package/dist/types/schemas/a2a/ref.js +25 -0
- package/dist/types/schemas/a2a/ref.js.map +1 -0
- package/dist/types/schemas/a2a/rpc.js +2 -0
- package/dist/types/schemas/a2a/rpc.js.map +1 -0
- package/dist/types/schemas/a2a/task.js +16 -0
- package/dist/types/schemas/a2a/task.js.map +1 -0
- package/dist/types/schemas/index.js +2 -0
- package/dist/types/schemas/index.js.map +1 -0
- package/dist/types/server/a2a-server.d.ts +9 -20
- package/dist/types/server/a2a-server.d.ts.map +1 -1
- package/dist/types/server/interfaces/params.d.ts +11 -11
- package/dist/types/server/interfaces/params.d.ts.map +1 -1
- package/dist/types/server/interfaces/server.d.ts +4 -4
- package/dist/types/server/interfaces/server.d.ts.map +1 -1
- package/dist/types/server/interfaces/store.d.ts +6 -1
- package/dist/types/server/interfaces/store.d.ts.map +1 -1
- package/dist/types/server/lib/express-server.d.ts +49 -1
- package/dist/types/server/lib/express-server.d.ts.map +1 -1
- package/dist/types/server/lib/middleware/a2a-methods.d.ts.map +1 -1
- package/dist/types/server/lib/middleware/factory.d.ts +2 -2
- package/dist/types/server/lib/middleware/factory.d.ts.map +1 -1
- package/dist/types/server/lib/state.d.ts +7 -15
- package/dist/types/server/lib/state.d.ts.map +1 -1
- package/dist/types/server/lib/storage/memory.d.ts.map +1 -1
- package/dist/types/server/lib/update/base.d.ts +21 -0
- package/dist/types/server/lib/update/base.d.ts.map +1 -0
- package/dist/types/services/a2a/index.d.ts +3 -0
- package/dist/types/services/a2a/index.d.ts.map +1 -0
- package/dist/types/services/a2a/repository.d.ts +77 -0
- package/dist/types/services/a2a/repository.d.ts.map +1 -0
- package/dist/types/services/a2a/repository.js +2 -0
- package/dist/types/services/a2a/repository.js.map +1 -0
- package/dist/types/services/a2a/service.d.ts +45 -0
- package/dist/types/services/a2a/service.d.ts.map +1 -0
- package/dist/types/services/a2a/service.js +2 -0
- package/dist/types/services/a2a/service.js.map +1 -0
- package/dist/types/services/context.js +29 -0
- package/dist/types/services/context.js.map +1 -0
- package/dist/types/services/dispatcher.js +33 -0
- package/dist/types/services/dispatcher.js.map +1 -0
- package/dist/types/services/index.d.ts +2 -0
- package/dist/types/services/index.d.ts.map +1 -0
- package/dist/types/services/index.js +9 -0
- package/dist/types/services/index.js.map +1 -0
- package/dist/types/services/manager.d.ts +44 -0
- package/dist/types/services/manager.d.ts.map +1 -0
- package/dist/types/services/manager.js +2 -0
- package/dist/types/services/manager.js.map +1 -0
- package/dist/types/services/mcp/index.d.ts +2 -0
- package/dist/types/services/mcp/index.d.ts.map +1 -0
- package/dist/types/services/mcp/service.d.ts +30 -0
- package/dist/types/services/mcp/service.d.ts.map +1 -0
- package/dist/types/services/mcp/service.js +8 -0
- package/dist/types/services/mcp/service.js.map +1 -0
- package/dist/types/services/protocol.js +31 -0
- package/dist/types/services/protocol.js.map +1 -0
- package/dist/types/services/service.js +2 -0
- package/dist/types/services/service.js.map +1 -0
- package/dist/types/transform.js +35 -0
- package/dist/types/transform.js.map +1 -0
- package/dist/types/transport/rpc/parser.d.ts.map +1 -1
- package/dist/types/transport/rpc/rpc-client.d.ts.map +1 -1
- package/dist/types/transport/streaming/stream.d.ts +6 -5
- package/dist/types/transport/streaming/stream.d.ts.map +1 -1
- package/dist/types/types/client.d.ts +26 -9
- package/dist/types/types/client.d.ts.map +1 -1
- package/dist/types/types/express.d.ts +66 -0
- package/dist/types/types/express.d.ts.map +1 -0
- package/dist/types/types/extended-schema.d.ts +88 -33
- package/dist/types/types/extended-schema.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/proxy.d.ts +4 -5
- package/dist/types/types/proxy.d.ts.map +1 -1
- package/dist/types/types/schemas/a2a/auth/auth.d.ts +80 -0
- package/dist/types/types/schemas/a2a/auth/auth.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/auth/base.d.ts +16 -0
- package/dist/types/types/schemas/a2a/auth/base.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/auth/index.d.ts +4 -0
- package/dist/types/types/schemas/a2a/auth/index.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/auth/oauth.d.ts +124 -0
- package/dist/types/types/schemas/a2a/auth/oauth.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/error.d.ts +75 -0
- package/dist/types/types/schemas/a2a/error.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/index.d.ts +220 -0
- package/dist/types/types/schemas/a2a/index.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/message.d.ts +90 -0
- package/dist/types/types/schemas/a2a/message.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/notification.d.ts +87 -0
- package/dist/types/types/schemas/a2a/notification.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/parameters.d.ts +188 -0
- package/dist/types/types/schemas/a2a/parameters.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/ref.d.ts +2057 -0
- package/dist/types/types/schemas/a2a/ref.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/rpc.d.ts +104 -0
- package/dist/types/types/schemas/a2a/rpc.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/task.d.ts +252 -0
- package/dist/types/types/schemas/a2a/task.d.ts.map +1 -0
- package/dist/types/types/schemas/index.d.ts +2 -0
- package/dist/types/types/schemas/index.d.ts.map +1 -0
- package/dist/types/types/services/a2a/repository.d.ts +85 -0
- package/dist/types/types/services/a2a/repository.d.ts.map +1 -0
- package/dist/types/types/services/a2a/service.d.ts +29 -0
- package/dist/types/types/services/a2a/service.d.ts.map +1 -0
- package/dist/types/types/services/context.d.ts +167 -0
- package/dist/types/types/services/context.d.ts.map +1 -0
- package/dist/types/types/services/dispatcher.d.ts +20 -0
- package/dist/types/types/services/dispatcher.d.ts.map +1 -0
- package/dist/types/types/services/index.d.ts +9 -0
- package/dist/types/types/services/index.d.ts.map +1 -0
- package/dist/types/types/services/manager.d.ts +42 -0
- package/dist/types/types/services/manager.d.ts.map +1 -0
- package/dist/types/types/services/mcp/service.d.ts +57 -0
- package/dist/types/types/services/mcp/service.d.ts.map +1 -0
- package/dist/types/types/services/protocol.d.ts +30 -0
- package/dist/types/types/services/protocol.d.ts.map +1 -0
- package/dist/types/types/services/service.d.ts +35 -0
- package/dist/types/types/services/service.d.ts.map +1 -0
- package/dist/types/types/transform.d.ts +61 -0
- package/dist/types/types/transform.d.ts.map +1 -0
- package/dist/types/utils/api/register.d.ts.map +1 -1
- package/dist/types/utils/common/constants.d.ts +4 -4
- package/dist/types/utils/common/constants.d.ts.map +1 -1
- package/dist/types/utils/common/errors.d.ts +19 -15
- package/dist/types/utils/common/errors.d.ts.map +1 -1
- package/dist/types/utils/common/utils.d.ts +2 -13
- package/dist/types/utils/common/utils.d.ts.map +1 -1
- package/dist/types/utils/deployment/task-wrapper.d.ts +5 -6
- package/dist/types/utils/deployment/task-wrapper.d.ts.map +1 -1
- package/dist/types/utils/deployment/test-deployment.d.ts +2 -2
- package/dist/types/utils/deployment/test-deployment.d.ts.map +1 -1
- package/dist/types/utils/logging/log.d.ts.map +1 -1
- package/dist/utils/api/register.js +1 -3
- package/dist/utils/api/register.js.map +1 -1
- package/dist/utils/common/constants.js +37 -24
- package/dist/utils/common/constants.js.map +1 -1
- package/dist/utils/common/errors.js +20 -9
- package/dist/utils/common/errors.js.map +1 -1
- package/dist/utils/common/utils.js +5 -27
- package/dist/utils/common/utils.js.map +1 -1
- package/dist/utils/deployment/agents.js.map +1 -1
- package/dist/utils/deployment/task-wrapper.js +3 -3
- package/dist/utils/deployment/task-wrapper.js.map +1 -1
- package/dist/utils/deployment/test-deployment.js +3 -4
- package/dist/utils/deployment/test-deployment.js.map +1 -1
- package/dist/utils/logging/log.js.map +1 -1
- package/package.json +9 -5
- package/dist/types/context.js +0 -2
- package/dist/types/context.js.map +0 -1
- package/dist/types/schema.js +0 -23
- package/dist/types/schema.js.map +0 -1
- package/dist/types/types/context.d.ts +0 -41
- package/dist/types/types/context.d.ts.map +0 -1
- package/dist/types/types/schema.d.ts +0 -694
- 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.
|
|
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
|
<!-- [](https://coveralls.io/github/the-artinet-project/artinet-sdk?branch=main) -->
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# artinet SDK
|
|
9
9
|
|
|
10
|
-
|
|
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
|
|
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
|
-
- [
|
|
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 `
|
|
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
|
-
- **
|
|
48
|
-
- **
|
|
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
|
|
59
|
-
| **
|
|
60
|
-
| **Storage** | Persist
|
|
61
|
-
| **Streaming (SSE)** | Handle real-time updates via SSE
|
|
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. | `
|
|
64
|
-
| **Core Types** | Based on the official
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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:
|
|
93
|
-
const
|
|
94
|
-
|
|
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: [{
|
|
110
|
+
parts: [{ kind: "text", text: `You said: ${userInput}` }],
|
|
104
111
|
},
|
|
105
112
|
};
|
|
106
113
|
};
|
|
107
114
|
|
|
108
115
|
const server = new A2AServer({
|
|
109
|
-
|
|
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
|
-
|
|
136
|
-
|
|
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.
|
|
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
|
|
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: [{
|
|
195
|
+
parts: [{ kind: "text", text: "What is the capital of France?" }],
|
|
216
196
|
};
|
|
217
197
|
|
|
218
|
-
const task = await client.
|
|
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 `
|
|
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.
|
|
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
|
-
|
|
286
|
-
|
|
265
|
+
ExecutionContext,
|
|
266
|
+
AgentEngine,
|
|
287
267
|
InMemoryTaskStore,
|
|
288
268
|
} from "@artinet/sdk";
|
|
289
269
|
|
|
290
270
|
|
|
291
|
-
const myAgent:
|
|
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
|
|
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., `
|
|
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:
|
|
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 =
|
|
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
|
|
438
|
-
const
|
|
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/
|
|
444
|
-
const taskPushNotificationGetMethod = createJSONRPCMethod(params, defaultGetTaskPushNotificationMethod, "tasks/
|
|
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
|
-
"
|
|
427
|
+
"message/send": messageSendMethod,
|
|
448
428
|
"tasks/get": taskGetMethod,
|
|
449
429
|
"tasks/cancel": taskCancelMethod,
|
|
450
|
-
"tasks/
|
|
451
|
-
"tasks/
|
|
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 `
|
|
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
|
|
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`:
|
|
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.
|
|
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
|
-
-
|
|
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/
|
|
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
|
|
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
|
|
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
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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":"
|
|
1
|
+
{"version":3,"file":"a2a-client.js","sourceRoot":"","sources":["../../src/client/a2a-client.ts"],"names":[],"mappings":"AAwBA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAI7D;;;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