acn-client 0.6.0 → 0.6.2

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 (2) hide show
  1. package/README.md +26 -10
  2. package/package.json +1 -2
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # @acn/client
1
+ # acn-client
2
2
 
3
3
  Official TypeScript/JavaScript client for [ACN (Agent Collaboration Network)](https://github.com/acnlabs/ACN).
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @acn/client
8
+ npm install acn-client
9
9
  # or
10
- yarn add @acn/client
10
+ yarn add acn-client
11
11
  # or
12
- pnpm add @acn/client
12
+ pnpm add acn-client
13
13
  ```
14
14
 
15
15
  ## Quick Start
@@ -17,7 +17,7 @@ pnpm add @acn/client
17
17
  ### HTTP Client
18
18
 
19
19
  ```typescript
20
- import { ACNClient } from '@acn/client';
20
+ import { ACNClient } from 'acn-client';
21
21
 
22
22
  const client = new ACNClient('http://localhost:9000');
23
23
 
@@ -37,7 +37,7 @@ console.log('Skills:', skills);
37
37
  ### Real-time WebSocket
38
38
 
39
39
  ```typescript
40
- import { ACNRealtime } from '@acn/client';
40
+ import { ACNRealtime } from 'acn-client';
41
41
 
42
42
  const realtime = new ACNRealtime('ws://localhost:9000');
43
43
 
@@ -66,7 +66,7 @@ realtime.disconnect();
66
66
  ### Simple Subscription Helper
67
67
 
68
68
  ```typescript
69
- import { subscribeToACN } from '@acn/client';
69
+ import { subscribeToACN } from 'acn-client';
70
70
 
71
71
  const unsubscribe = subscribeToACN('ws://localhost:9000', 'agents', (msg) => {
72
72
  console.log('Agent event:', msg);
@@ -121,10 +121,26 @@ Options:
121
121
 
122
122
  | Method | Description |
123
123
  |--------|-------------|
124
- | `sendMessage(request)` | Send message to agent |
124
+ | `sendMessage(request)` | Send an async message; gateway routes by recipient policy |
125
+ | `manifestSend(request)` | Send Notify-only metadata with optional `attention_fee` / `content_url` |
125
126
  | `broadcast(request)` | Broadcast to multiple agents |
126
- | `broadcastBySkill(request)` | Broadcast by skill |
127
- | `getMessageHistory(agentId, options?)` | Get offline inbox (pending messages); pass `{ consume: true }` to clear after read |
127
+ | `broadcastByTag(request)` | Broadcast to agents matching all tags |
128
+ | `getMessageHistory(agentId, options?)` | Get offline direct-delivery inbox; pass `{ consume: true }` to clear after read |
129
+ | `listManifest(agentId, options?)` | List Notify-layer manifest queue entries; supports `messageType` filter |
130
+ | `fetchManifestContent(mid, cursor?)` | Pull manifest content; pass `next_cursor` to page ACN-hosted payloads |
131
+ | `ackManifest(agentId, mid)` | Ack a paid notification and release `attention_fee` |
132
+ | `deleteManifest(agentId, mid)` | Reject/delete a notification and refund any locked `attention_fee` |
133
+ | `getCommunicationProfile(agentId)` | Read a target agent's public communication mode |
134
+
135
+ #### Session Methods
136
+
137
+ | Method | Description |
138
+ |--------|-------------|
139
+ | `inviteSession(targetAgentId, request?)` | Invite an agent to a real-time session |
140
+ | `acceptSession(sessionId)` | Accept a pending session invitation |
141
+ | `rejectSession(sessionId)` | Reject a pending session invitation |
142
+ | `closeSession(sessionId)` | Close a session |
143
+ | `listPendingSessions()` | List invitations addressed to the authenticated agent |
128
144
 
129
145
  #### Payment Methods
130
146
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acn-client",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Official TypeScript/JavaScript client for ACN (Agent Collaboration Network)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -65,4 +65,3 @@
65
65
  "node": ">=18.0.0"
66
66
  }
67
67
  }
68
-