@a2a-js/sdk 0.3.6 → 0.3.8

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/README.md CHANGED
@@ -23,16 +23,26 @@ npm install @a2a-js/sdk
23
23
 
24
24
  ### For Server Usage
25
25
 
26
- If you plan to use the A2A server functionality (`A2AExpressApp`), you'll also need to install Express as it's a peer dependency:
26
+ If you plan to use the Express integration (imports from `@a2a-js/sdk/server/express`) for A2A server, you'll also need to install Express as it's a peer dependency:
27
27
 
28
28
  ```bash
29
29
  npm install express
30
30
  ```
31
31
 
32
- You can also find JavaScript samples [here](https://github.com/google-a2a/a2a-samples/tree/main/samples/js).
32
+ You can also find some samples [here](https://github.com/a2aproject/a2a-js/tree/main/src/samples).
33
33
 
34
34
  ---
35
35
 
36
+ ## Compatibility
37
+
38
+ This SDK implements the A2A Protocol Specification [`v0.3.0`](https://a2a-protocol.org/v0.3.0/specification).
39
+
40
+ | Transport | Client | Server |
41
+ | :--- | :---: | :---: |
42
+ | **JSON-RPC** | ✅ | ✅ |
43
+ | **HTTP+JSON/REST** | ✅ | ✅ |
44
+ | **gRPC** | ❌ | ❌ |
45
+
36
46
  ## Quickstart
37
47
 
38
48
  This example shows how to create a simple "Hello World" agent server and a client to interact with it.
@@ -121,8 +131,8 @@ The [`ClientFactory`](src/client/factory.ts) makes it easy to communicate with a
121
131
 
122
132
  ```typescript
123
133
  // client.ts
124
- import { ClientFactory, SendMessageSuccessResponse } from '@a2a-js/sdk/client';
125
- import { Message, MessageSendParams } from '@a2a-js/sdk';
134
+ import { ClientFactory } from '@a2a-js/sdk/client';
135
+ import { Message, MessageSendParams, SendMessageSuccessResponse } from '@a2a-js/sdk';
126
136
  import { v4 as uuidv4 } from 'uuid';
127
137
 
128
138
  async function run() {
@@ -222,8 +232,8 @@ The client sends a message and receives a `Task` object as the result.
222
232
 
223
233
  ```typescript
224
234
  // client.ts
225
- import { ClientFactory, SendMessageSuccessResponse } from '@a2a-js/sdk/client';
226
- import { Message, MessageSendParams, Task } from '@a2a-js/sdk';
235
+ import { ClientFactory } from '@a2a-js/sdk/client';
236
+ import { Message, MessageSendParams, SendMessageSuccessResponse, Task } from '@a2a-js/sdk';
227
237
  // ... other imports ...
228
238
 
229
239
  const factory = new ClientFactory();
@@ -354,7 +364,7 @@ Here's how to use it to manage a Bearer token:
354
364
  ```typescript
355
365
  import {
356
366
  ClientFactory,
357
- ClientFactoryOptions
367
+ ClientFactoryOptions,
358
368
  JsonRpcTransportFactory,
359
369
  AuthenticationHandler,
360
370
  createAuthenticatingFetchWithRetry,