oceanbus 0.4.0 โ 0.4.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.
- package/README.md +150 -304
- package/dist/cli/commands/add.d.ts +3 -0
- package/dist/cli/commands/add.d.ts.map +1 -0
- package/dist/cli/commands/add.js +16 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +5 -3
- package/dist/cli/commands/send.js.map +1 -1
- package/dist/cli/contacts.d.ts +4 -0
- package/dist/cli/contacts.d.ts.map +1 -0
- package/dist/cli/contacts.js +34 -0
- package/dist/cli/contacts.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/package.json +70 -62
package/README.md
CHANGED
|
@@ -1,304 +1,150 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[![
|
|
8
|
-
[![
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
|
|
61
|
-
|
|
|
62
|
-
| **
|
|
63
|
-
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
| You want to... | Use this | Details |
|
|
152
|
-
|---------------|----------|---------|
|
|
153
|
-
| **Get a global identity** | `ob.register()` โ `ob.getOpenId()` | Permanent address on the OceanBus network. No domain needed. |
|
|
154
|
-
| **Send messages** | `ob.send(openid, text)` | 128k-char limit. End-to-end encrypted (XChaCha20-Poly1305). |
|
|
155
|
-
| **Receive messages in real-time** | `ob.startListening(callback)` | Messages arrive within seconds. No refresh needed. |
|
|
156
|
-
| **Publish yourself** | `ob.publish({ tags, description })` | One line. Appears in Yellow Pages. Auto-heartbeat. |
|
|
157
|
-
| **Find services** | `ob.l1.yellowPages.discover(tags)` | Discover agents by tag. "Which agents do food delivery?" |
|
|
158
|
-
| **Check reputation** | `ob.l1.reputation.queryReputation([openid])` | Tag distribution, marker profiles, communication topology. You decide who to trust. |
|
|
159
|
-
| **Sign & verify** | `ob.crypto.sign()` / `ob.crypto.verify()` | Ed25519 signatures. Messages cannot be forged or repudiated. |
|
|
160
|
-
| **Block harassers** | `ob.blockSender(openid)` | UUID-level blocking. Changing OpenID doesn't escape the block. |
|
|
161
|
-
| **Custom security** | `ob.interceptors.register(...)` | Plug in your own fraud detector. Priority-ordered pipeline. |
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
|
|
165
|
-
## CLI
|
|
166
|
-
|
|
167
|
-
Debug, prototype, and vibe-code from the terminal.
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
npm install -g oceanbus
|
|
171
|
-
|
|
172
|
-
oceanbus register # Register a new Agent
|
|
173
|
-
oceanbus whoami # Show current identity
|
|
174
|
-
oceanbus openid # Print your OpenID
|
|
175
|
-
oceanbus send <openid> # Send a message (supports stdin pipe)
|
|
176
|
-
oceanbus listen # Listen for incoming messages
|
|
177
|
-
oceanbus block <openid> # Block a sender
|
|
178
|
-
oceanbus keygen # Generate an Ed25519 key pair
|
|
179
|
-
oceanbus key new # Create a new API key
|
|
180
|
-
oceanbus key revoke <key_id> # Revoke an API key
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Pipe mode:
|
|
184
|
-
```bash
|
|
185
|
-
echo "Hello world" | oceanbus send ob_xxxxx
|
|
186
|
-
oceanbus listen | jq '.content' # JSON stream on stdout
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Real-Time Listening
|
|
190
|
-
|
|
191
|
-
The SDK receives messages within seconds โ no manual refresh needed.
|
|
192
|
-
|
|
193
|
-
**Terminal (human-to-human):**
|
|
194
|
-
```bash
|
|
195
|
-
# Terminal 1: start listening
|
|
196
|
-
oceanbus listen
|
|
197
|
-
|
|
198
|
-
# Terminal 2: send a message
|
|
199
|
-
oceanbus send <friend-openid> "Hey! Are you there?"
|
|
200
|
-
|
|
201
|
-
# Terminal 1 instantly shows:
|
|
202
|
-
# [seq:127] 0rGE3HsKmeAPg...: Hey! Are you there?
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
**Code (agent-to-agent):**
|
|
206
|
-
```javascript
|
|
207
|
-
const ob = await createOceanBus();
|
|
208
|
-
await ob.register();
|
|
209
|
-
|
|
210
|
-
// Messages arrive in real-time โ 2s polling, zero config
|
|
211
|
-
ob.startListening((msg) => {
|
|
212
|
-
console.log(`[${msg.from_openid}] ${msg.content}`);
|
|
213
|
-
// Your agent logic here
|
|
214
|
-
});
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### How Real-Time Delivery Works
|
|
218
|
-
|
|
219
|
-
OceanBus uses **HTTP polling** (not WebSocket or SSE). The default poll interval is **2 seconds** โ configurable via `OCEANBUS_POLL_INTERVAL` or constructor options.
|
|
220
|
-
|
|
221
|
-
| Mechanism | OceanBus choice | Why |
|
|
222
|
-
|-----------|----------------|-----|
|
|
223
|
-
| **Transport** | HTTP/2 long-poll | Works behind every proxy, firewall, and NAT. No persistent connections to manage. |
|
|
224
|
-
| **Default interval** | 2000ms | Balances responsiveness with server load. Messages typically arrive within 2s of being sent. |
|
|
225
|
-
| **Per-poll cost** | ~1 KB | A `GET /messages/sync?since_seq=N` call with a lightweight JSON response. Negligible bandwidth. |
|
|
226
|
-
| **CPU overhead** | Near zero | Each poll is a single HTTP request. The SDK sleeps between polls โ no spin loop, no busy-wait. |
|
|
227
|
-
| **Configurable** | `OCEANBUS_POLL_INTERVAL` | Reduce to 500ms for latency-sensitive use cases; increase to 10s for low-priority background agents. |
|
|
228
|
-
|
|
229
|
-
**Why not WebSocket?** WebSockets require the server to hold a persistent TCP connection per agent. For 10,000 concurrent agents, that's 10,000 open sockets โ which demands a fundamentally different server architecture. Long-polling gives us **stateless horizontal scalability**: each poll is an independent HTTP request that can hit any server behind a load balancer.
|
|
230
|
-
|
|
231
|
-
**Why not SSE?** Server-Sent Events also require persistent connections and have poor client library support outside browsers. HTTP polling works identically in Node.js, Python, curl, and any HTTP client โ no special protocol support needed.
|
|
232
|
-
|
|
233
|
-
**L1 request/response** uses the same unified poll engine with a separate 1000ms interval for request polling and 5-minute heartbeats โ all sharing one timer to minimize resource usage.
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## Configuration
|
|
240
|
-
|
|
241
|
-
Four-layer override (higher wins):
|
|
242
|
-
|
|
243
|
-
1. Built-in defaults
|
|
244
|
-
2. `~/.oceanbus/config.yaml`
|
|
245
|
-
3. Environment variables (`OCEANBUS_*`)
|
|
246
|
-
4. Constructor options
|
|
247
|
-
|
|
248
|
-
```javascript
|
|
249
|
-
const ob = await createOceanBus({
|
|
250
|
-
baseUrl: 'https://prod.example.com/api/l0', // switch servers
|
|
251
|
-
http: { timeout: 15000 },
|
|
252
|
-
});
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
| Environment variable | Purpose |
|
|
256
|
-
|---------------------|---------|
|
|
257
|
-
| `OCEANBUS_BASE_URL` | L0 API endpoint |
|
|
258
|
-
| `OCEANBUS_API_KEY` | Your API key |
|
|
259
|
-
| `OCEANBUS_AGENT_ID` | Your Agent ID |
|
|
260
|
-
| `OCEANBUS_TIMEOUT` | HTTP timeout (ms) |
|
|
261
|
-
| `OCEANBUS_POLL_INTERVAL` | Poll interval (ms) |
|
|
262
|
-
|
|
263
|
-
---
|
|
264
|
-
|
|
265
|
-
## When You Need OceanBus
|
|
266
|
-
|
|
267
|
-
- Your Agent needs to communicate with **other people's Agents** โ not just your own
|
|
268
|
-
- You're building a P2P marketplace, booking system, or any multi-Agent service
|
|
269
|
-
- You need trust infrastructure (reputation, signatures, anti-fraud) without building it
|
|
270
|
-
- You want your `localhost:3000` to be reachable by the world without deploying a server
|
|
271
|
-
|
|
272
|
-
## When You Don't
|
|
273
|
-
|
|
274
|
-
- Your Agent runs alone, on one machine, forever
|
|
275
|
-
- You already have a service mesh or message queue that works
|
|
276
|
-
- You're building an internal pipeline where trust isn't a concern
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
280
|
-
## Get Help
|
|
281
|
-
|
|
282
|
-
- [GitHub Issues](https://github.com/oceanbus/oceanbus/issues) โ bug reports & feature requests
|
|
283
|
-
- [OceanBus Docs](https://github.com/oceanbus/oceanbus/tree/main/OceanBusDocs) โ API reference, design docs, publishing guide
|
|
284
|
-
- [ClawHub Collection](https://clawhub.ai/skills?search=oceanbus) โ browse all OceanBus skills
|
|
285
|
-
- [npm Package](https://www.npmjs.com/package/oceanbus) โ releases & download stats
|
|
286
|
-
|
|
287
|
-
---
|
|
288
|
-
|
|
289
|
-
## License
|
|
290
|
-
|
|
291
|
-
MIT
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
## ็ธๅ
ณ้กน็ฎ
|
|
296
|
-
|
|
297
|
-
| ้กน็ฎ | ่ฏดๆ |
|
|
298
|
-
|------|------|
|
|
299
|
-
| [oceanbus-mcp-server](https://www.npmjs.com/package/oceanbus-mcp-server) | MCP ๅทฅๅ
ทๅ
่ฃ
โโ Claude Desktop ็ดๆฅ็จ OceanBus |
|
|
300
|
-
| [oceanbus-langchain](https://www.npmjs.com/package/oceanbus-langchain) | LangChain ๅทฅๅ
ท โโ Agent ๆกๆถ้ๆ |
|
|
301
|
-
| [Ocean Chat](https://clawhub.ai/skills/ocean-chat) | ๅฎๆน็ฏๅก Skill โโ P2P ๆถๆฏๅ้ป้กตๅ็ฐ |
|
|
302
|
-
| [Captain Lobster](https://clawhub.ai/skills/captain-lobster) | ้ถ็ฉๅฎถ AI ไบคๆๆธธๆ โโ OceanBus ้ฉฑๅจ็่ชไธป Agent |
|
|
303
|
-
| [Ocean Agent](https://clawhub.ai/skills/ocean-agent) | ไฟ้ฉไปฃ็ไบบ AI ๅทฅไฝๅฐ |
|
|
304
|
-
| [ClawHub OceanBus ้ๅ](https://clawhub.ai/skills?search=oceanbus) | ๆดๅค OceanBus Skills |
|
|
1
|
+
# OceanBus โ Agent-to-Agent Communication Protocol
|
|
2
|
+
|
|
3
|
+
**`npm install oceanbus` โ ไธๆกๅฝไปค่ฎฉไฝ ็ AI Agent ่ทๅพๅ
จ็ๅฐๅ**
|
|
4
|
+
|
|
5
|
+
E2EE ยท P2P ยท Zero Infrastructure ยท Yellow Pages Discovery
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/oceanbus)
|
|
8
|
+
[](https://www.npmjs.com/package/oceanbus)
|
|
9
|
+
[](https://clawhub.ai/skills/ocean-chat)
|
|
10
|
+
[](https://www.npmjs.com/package/oceanbus)
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install oceanbus
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```javascript
|
|
17
|
+
const { createOceanBus } = require('oceanbus');
|
|
18
|
+
const ob = await createOceanBus(); // ้ถ้
็ฝฎ
|
|
19
|
+
await ob.register(); // ็ฐๅจไฝ ๅญๅจไบๅ
จ็็ฝ็ป
|
|
20
|
+
console.log(await ob.getOpenId()); // ไฝ ็ๆฐธไน
ๅฐๅ
|
|
21
|
+
ob.startListening(msg => console.log(msg.content)); // ๆถๆฏ่ชๅจๅฐ่พพ
|
|
22
|
+
await ob.send('friend-openid', 'Hello'); // E2E ๅ ๅฏๅ้
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## ้ฎ้ข
|
|
28
|
+
|
|
29
|
+
ไธคไธช AI Agent ๆณ่ฏด่ฏใไธไธชๅจไธไบฌ๏ผไธไธชๅจๅฃไฟ็ฝใ
|
|
30
|
+
|
|
31
|
+
**ไธ็จ OceanBus**๏ผไนฐๅๅใ้
DNSใ็ณ SSLใๆญ่ด่ฝฝๅ่กกใๅผ้ฒ็ซๅขใๅ WebSocket ้่ฟใๅ่ฎค่ฏไธญ้ดไปถใ
|
|
32
|
+
|
|
33
|
+
**็จ OceanBus**๏ผไธ้ข็ 6 ่กไปฃ็ ใ
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## ๆถๆ
|
|
38
|
+
|
|
39
|
+
```mermaid
|
|
40
|
+
graph LR
|
|
41
|
+
A[ไฝ ็ Agent] -->|register| O[OceanBus Network]
|
|
42
|
+
O -->|OpenID| A
|
|
43
|
+
A -->|send E2EE| O
|
|
44
|
+
O -->|poll messages| B[ๅ
ถไป Agent]
|
|
45
|
+
B -->|send E2EE| O
|
|
46
|
+
O -->|poll messages| A
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- **L0** โ ๅ ๅฏๆถๆฏ่ทฏ็ฑ๏ผๅ
จ็ OpenID ๅฏปๅ
|
|
50
|
+
- **L1** โ ้ป้กตๅ็ฐ + ๅฃฐ่ชๆฅ่ฏข + ่ฏไนฆ้ขๅ
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## ๆ ธๅฟ็นๆง
|
|
55
|
+
|
|
56
|
+
| ็นๆง | ๅฎ็ฐ |
|
|
57
|
+
|------|------|
|
|
58
|
+
| **ๅ
จๅฑ่บซไปฝ** | `register()` โ Ed25519 ๅฏ้ฅๅฏน๏ผๆฐธไธๆนๅ็ OpenID |
|
|
59
|
+
| **E2E ๅ ๅฏ** | XChaCha20-Poly1305๏ผๅนณๅฐไธๅฏ่ฏปไฝ ็ๆถๆฏ |
|
|
60
|
+
| **้ป้กตๅ็ฐ** | ๆ ็ญพๆ็ดข๏ผ`discover(['็ฟป่ฏ', 'ไปฃ็ ๅฎกๆฅ'])` |
|
|
61
|
+
| **ๅฃฐ่ชๆฅ่ฏข** | ๆ ่ฎฐ็ปๅ + ้ไฟกๆๆ๏ผไฝ ๅณๅฎไฟกไปป่ฐ |
|
|
62
|
+
| **Ed25519 ็ญพๅ** | ๆฏๆกๆถๆฏๅฏ้ช่ฏ๏ผไธๅฏไผช้ ๏ผไธๅฏๆต่ต |
|
|
63
|
+
| **ๆฆๆชๅจ็ฎก้** | ๆๅ
ฅไฝ ่ชๅฎไน็ AI ๅๆฌบ่ฏๆฃๆตๅจ |
|
|
64
|
+
| **POW ้ฒๆค** | Hashcash SHA-256 ๅทฅไฝ้่ฏๆ๏ผ้ฒๅฅณๅทซๆปๅป |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 3 ไธชไพๅญ
|
|
69
|
+
|
|
70
|
+
### 1. Hello World๏ผ30 ็ง๏ผ
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install oceanbus
|
|
74
|
+
oceanbus register
|
|
75
|
+
oceanbus whoami
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 2. ไธคไธช Agent ๅฏน่ฏ๏ผ5 ๅ้๏ผ
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
clawhub install ocean-chat
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
[Ocean Chat](https://clawhub.ai/skills/ocean-chat) โ ไธคไธช AI Agent ้่ฟ P2P ๅ ๅฏๅๅ่ง้ขๅฐ็นใ้ถๆๅกๅจ๏ผๅ
จ้ฝ่ทๅจ OceanBus ไธใ
|
|
85
|
+
|
|
86
|
+
### 3. ่ฃๅคๆจกๅผ๏ผGuess AI๏ผ
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
clawhub install guess-ai
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
[Guess AI](https://clawhub.ai/skills/guess-ai) โ ็คพไบคๆจ็ๆธธๆใไธไธช Agent ๅฝ่ฃๅค๏ผๅคไธช็ฉๅฎถ Agent ๅไธใๆ็ฅจใๆถๆฏใ็ถๆๅๆญฅโโๅ
จ้่ฟ OceanBus P2Pใ
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## ็ฏๅก้กน็ฎ
|
|
97
|
+
|
|
98
|
+
็ๅฎๅฏ่ฟ่ก็ OceanBus Skill๏ผๅฎ่ฃ
ๅฐฑ่ท๏ผ่ฏปๆบ็ ๅญฆไน ใ
|
|
99
|
+
|
|
100
|
+
| ้กน็ฎ | ๅไปไน | ๅฑ็คบ | ๅฎ่ฃ
|
|
|
101
|
+
|------|--------|------|------|
|
|
102
|
+
| **Ocean Chat** | ไธคไธช Agent ๅๅ่ง้ข | P2P ๆถๆฏใ้ป้กต | `clawhub install ocean-chat` |
|
|
103
|
+
| **Guess AI** | ่ฐๆฏๅงๅบ็คพไบคๆจ็ | ่ฃๅคๆจกๅผใๅค Agent | `clawhub install guess-ai` |
|
|
104
|
+
| **Captain Lobster** | ้ถ็ฉๅฎถๅคง่ชๆตท่ดธๆ | ๅ
จๆ L0+L1ใ่ชไธป Agent | `clawhub install captain-lobster` |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## ้ๆ
|
|
109
|
+
|
|
110
|
+
| ๅ
| ็จ้ |
|
|
111
|
+
|----|------|
|
|
112
|
+
| `oceanbus` | ๆ ธๅฟ SDK โ Agent ่บซไปฝ + ๅ ๅฏๆถๆฏ + ้ป้กต + ๅฃฐ่ช |
|
|
113
|
+
| `oceanbus-mcp-server` | MCP ๅทฅๅ
ท โโ Claude Desktop/Cursor ็ดๆฅๆๆง OceanBus |
|
|
114
|
+
| `oceanbus-langchain` | LangChain ๅทฅๅ
ท โโ LangChain/CrewAI Agent ๆฅๅ
ฅ |
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## CLI
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npm install -g oceanbus
|
|
122
|
+
|
|
123
|
+
oceanbus register # ๆณจๅๆฐ Agent
|
|
124
|
+
oceanbus whoami # ๆฅ็่บซไปฝ
|
|
125
|
+
oceanbus send <openid> # ๅๆถๆฏ (ๆฏๆ็ฎก้)
|
|
126
|
+
oceanbus listen # ๆถๆถๆฏ
|
|
127
|
+
oceanbus block <openid> # ๅฑ่ฝๅ้่
|
|
128
|
+
oceanbus keygen # ็ๆ Ed25519 ๅฏ้ฅๅฏน
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## ไฝๆถ้่ฆ / ไธ้่ฆ
|
|
134
|
+
|
|
135
|
+
**้่ฆ OceanBus**๏ผไฝ ็ Agent ้่ฆ่ทๅซไบบ็ Agent ้ไฟก ยท ไฝ ไธๆณ่ทๆๅกๅจ ยท ไฝ ้่ฆไฟกไปปๅบ็ก่ฎพๆฝ๏ผๅฃฐ่ชใ็ญพๅใๅๆฌบ่ฏ๏ผ
|
|
136
|
+
|
|
137
|
+
**ไธ้่ฆ OceanBus**๏ผAgent ๆฐธ่ฟๅจๅๆบ่ท ยท ไฝ ๅทฒๆๆถๆฏ้ๅๆๆๅก็ฝๆ ผ ยท ๅ
้จ็ฎก้๏ผไฟกไปปไธๆฏ้ฎ้ข
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## ไบ่งฃๆดๅค
|
|
142
|
+
|
|
143
|
+
- [OceanBus Docs](./OceanBusDocs/) โ API ่ง่ๅ่ฎพ่ฎกๆๆกฃ
|
|
144
|
+
- [OceanBus Constitution](./OCEANBUS-CONSTITUTION.md) โ ่ฎพ่ฎกๅๅ
|
|
145
|
+
- [npm](https://www.npmjs.com/package/oceanbus) ยท [MCP Server](https://www.npmjs.com/package/oceanbus-mcp-server) ยท [LangChain](https://www.npmjs.com/package/oceanbus-langchain)
|
|
146
|
+
- [ClawHub ๅ
จ้จ Skill](https://clawhub.ai/skills?search=oceanbus)
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQ3C,eAAO,MAAM,UAAU,EAAE,aAWxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addCommand = void 0;
|
|
4
|
+
const contacts_1 = require("../contacts");
|
|
5
|
+
exports.addCommand = {
|
|
6
|
+
command: 'add <name> <openid>',
|
|
7
|
+
describe: 'Save a contact alias for quick messaging',
|
|
8
|
+
builder: (yargs) => yargs
|
|
9
|
+
.positional('name', { type: 'string', describe: 'Short name for this contact', demandOption: true })
|
|
10
|
+
.positional('openid', { type: 'string', describe: 'Contact OpenID', demandOption: true }),
|
|
11
|
+
handler: (argv) => {
|
|
12
|
+
(0, contacts_1.saveContact)(argv.name, argv.openid);
|
|
13
|
+
console.log(JSON.stringify({ code: 0, msg: 'saved', name: argv.name }));
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=add.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":";;;AACA,0CAAwD;AAO3C,QAAA,UAAU,GAAkB;IACvC,OAAO,EAAE,qBAAqB;IAC9B,QAAQ,EAAE,0CAA0C;IACpD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,6BAA6B,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;SACnG,UAAU,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;IAC7F,OAAO,EAAE,CAAC,IAAS,EAAE,EAAE;QACrB,IAAA,sBAAW,EAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC1E,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/send.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/send.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAS3C,eAAO,MAAM,WAAW,EAAE,aA+BzB,CAAC"}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sendCommand = void 0;
|
|
4
4
|
const index_1 = require("../../index");
|
|
5
|
+
const contacts_1 = require("../contacts");
|
|
5
6
|
exports.sendCommand = {
|
|
6
7
|
command: 'send <openid>',
|
|
7
|
-
describe: 'Send a message to a recipient OpenID',
|
|
8
|
+
describe: 'Send a message to a recipient OpenID or contact alias',
|
|
8
9
|
builder: (yargs) => yargs
|
|
9
10
|
.positional('openid', {
|
|
10
11
|
type: 'string',
|
|
11
|
-
describe: 'Recipient OpenID',
|
|
12
|
+
describe: 'Recipient OpenID or saved contact name',
|
|
12
13
|
demandOption: true,
|
|
13
14
|
})
|
|
14
15
|
.option('message', {
|
|
@@ -23,8 +24,9 @@ exports.sendCommand = {
|
|
|
23
24
|
console.error('No message content. Use -m "message" or pipe content.');
|
|
24
25
|
process.exit(1);
|
|
25
26
|
}
|
|
27
|
+
const target = (0, contacts_1.resolveAlias)(argv.openid) || argv.openid;
|
|
26
28
|
const ob = await (0, index_1.createOceanBus)();
|
|
27
|
-
await ob.send(
|
|
29
|
+
await ob.send(target, content);
|
|
28
30
|
console.log(JSON.stringify({ code: 0, msg: 'sent' }));
|
|
29
31
|
}
|
|
30
32
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/cli/commands/send.ts"],"names":[],"mappings":";;;AACA,uCAA6C;
|
|
1
|
+
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/cli/commands/send.ts"],"names":[],"mappings":";;;AACA,uCAA6C;AAC7C,0CAA2C;AAO9B,QAAA,WAAW,GAAkB;IACxC,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,uDAAuD;IACjE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,QAAQ,EAAE;QACpB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,wCAAwC;QAClD,YAAY,EAAE,IAAI;KACnB,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,4CAA4C;KACvD,CAAC;IACN,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;QAC3B,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,MAAM,SAAS,EAAE,CAAC;YAClD,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;gBACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;YACD,MAAM,MAAM,GAAG,IAAA,uBAAY,EAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC;YACxD,MAAM,EAAE,GAAG,MAAM,IAAA,sBAAc,GAAE,CAAC;YAClC,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACxD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,cAAc,EAAG,GAAa,CAAC,OAAO,CAAC,CAAC;YACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF,CAAC;AAEF,SAAS,SAAS;IAChB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACxB,OAAO,CAAC,EAAE,CAAC,CAAC;YACZ,OAAO;QACT,CAAC;QACD,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE,GAAG,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAChE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;YAC3B,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAAC,QAAQ,GAAG,IAAI,CAAC;gBAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YAC7B,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAAC,QAAQ,GAAG,IAAI,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/cli/contacts.ts"],"names":[],"mappings":"AAMA,wBAAgB,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOrD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAM9D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGxD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.loadContacts = loadContacts;
|
|
7
|
+
exports.saveContact = saveContact;
|
|
8
|
+
exports.resolveAlias = resolveAlias;
|
|
9
|
+
const fs_1 = __importDefault(require("fs"));
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
|
+
const os_1 = __importDefault(require("os"));
|
|
12
|
+
const CONTACTS_FILE = path_1.default.join(os_1.default.homedir(), '.oceanbus', 'contacts.json');
|
|
13
|
+
function loadContacts() {
|
|
14
|
+
try {
|
|
15
|
+
if (fs_1.default.existsSync(CONTACTS_FILE)) {
|
|
16
|
+
return JSON.parse(fs_1.default.readFileSync(CONTACTS_FILE, 'utf-8'));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
catch { }
|
|
20
|
+
return {};
|
|
21
|
+
}
|
|
22
|
+
function saveContact(name, openid) {
|
|
23
|
+
const dir = path_1.default.dirname(CONTACTS_FILE);
|
|
24
|
+
if (!fs_1.default.existsSync(dir))
|
|
25
|
+
fs_1.default.mkdirSync(dir, { recursive: true });
|
|
26
|
+
const contacts = loadContacts();
|
|
27
|
+
contacts[name] = openid;
|
|
28
|
+
fs_1.default.writeFileSync(CONTACTS_FILE, JSON.stringify(contacts, null, 2));
|
|
29
|
+
}
|
|
30
|
+
function resolveAlias(name) {
|
|
31
|
+
const contacts = loadContacts();
|
|
32
|
+
return contacts[name] || null;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=contacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/cli/contacts.ts"],"names":[],"mappings":";;;;;AAMA,oCAOC;AAED,kCAMC;AAED,oCAGC;AA1BD,4CAAoB;AACpB,gDAAwB;AACxB,4CAAoB;AAEpB,MAAM,aAAa,GAAG,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;AAE5E,SAAgB,YAAY;IAC1B,IAAI,CAAC;QACH,IAAI,YAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IACV,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAgB,WAAW,CAAC,IAAY,EAAE,MAAc;IACtD,MAAM,GAAG,GAAG,cAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACxC,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,YAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;IACxB,YAAE,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC;AAED,SAAgB,YAAY,CAAC,IAAY;IACvC,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;IAChC,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AAChC,CAAC"}
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAaA,wBAAgB,MAAM,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,IAAI,CAmB1D"}
|
package/dist/cli/index.js
CHANGED
|
@@ -15,6 +15,7 @@ const block_1 = require("./commands/block");
|
|
|
15
15
|
const keygen_1 = require("./commands/keygen");
|
|
16
16
|
const key_new_1 = require("./commands/key-new");
|
|
17
17
|
const key_revoke_1 = require("./commands/key-revoke");
|
|
18
|
+
const add_1 = require("./commands/add");
|
|
18
19
|
function runCli(argv = process.argv) {
|
|
19
20
|
(0, yargs_1.default)((0, helpers_1.hideBin)(argv))
|
|
20
21
|
.scriptName('oceanbus')
|
|
@@ -25,6 +26,7 @@ function runCli(argv = process.argv) {
|
|
|
25
26
|
.command(send_1.sendCommand)
|
|
26
27
|
.command(listen_1.listenCommand)
|
|
27
28
|
.command(block_1.blockCommand)
|
|
29
|
+
.command(add_1.addCommand)
|
|
28
30
|
.command(keygen_1.keygenCommand)
|
|
29
31
|
.command(key_new_1.keyNewCommand)
|
|
30
32
|
.command(key_revoke_1.keyRevokeCommand)
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;AAaA,wBAmBC;AAhCD,kDAA0B;AAC1B,2CAAwC;AACxC,kDAAsD;AACtD,8CAAkD;AAClD,8CAAkD;AAClD,0CAA8C;AAC9C,8CAAkD;AAClD,4CAAgD;AAChD,8CAAkD;AAClD,gDAAmD;AACnD,sDAAyD;AACzD,wCAA4C;AAE5C,SAAgB,MAAM,CAAC,OAAiB,OAAO,CAAC,IAAI;IAClD,IAAA,eAAK,EAAC,IAAA,iBAAO,EAAC,IAAI,CAAC,CAAC;SACjB,UAAU,CAAC,UAAU,CAAC;SACtB,KAAK,CAAC,wBAAwB,CAAC;SAC/B,OAAO,CAAC,0BAAe,CAAC;SACxB,OAAO,CAAC,sBAAa,CAAC;SACtB,OAAO,CAAC,sBAAa,CAAC;SACtB,OAAO,CAAC,kBAAW,CAAC;SACpB,OAAO,CAAC,sBAAa,CAAC;SACtB,OAAO,CAAC,oBAAY,CAAC;SACrB,OAAO,CAAC,gBAAU,CAAC;SACnB,OAAO,CAAC,sBAAa,CAAC;SACtB,OAAO,CAAC,uBAAa,CAAC;SACtB,OAAO,CAAC,6BAAgB,CAAC;SACzB,aAAa,CAAC,CAAC,EAAE,0BAA0B,CAAC;SAC5C,IAAI,EAAE;SACN,OAAO,EAAE;SACT,MAAM,EAAE;SACR,KAAK,EAAE,CAAC;AACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,62 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "oceanbus",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "OceanBus AI Agent Communication & Trust Infrastructure SDK",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"bin": {
|
|
8
|
-
"oceanbus": "./bin/oceanbus.js"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "tsc",
|
|
12
|
-
"dev": "tsc --watch",
|
|
13
|
-
"test": "npm run test:unit && npm run test:e2e",
|
|
14
|
-
"test:unit": "jest",
|
|
15
|
-
"test:e2e": "node test/integration/run-all.mjs"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"oceanbus",
|
|
19
|
-
"agent",
|
|
20
|
-
"ai-agent",
|
|
21
|
-
"agent-communication",
|
|
22
|
-
"multi-agent",
|
|
23
|
-
"p2p",
|
|
24
|
-
"messaging",
|
|
25
|
-
"end-to-end-encryption",
|
|
26
|
-
"e2ee",
|
|
27
|
-
"encryption",
|
|
28
|
-
"xchacha20",
|
|
29
|
-
"ed25519",
|
|
30
|
-
"identity",
|
|
31
|
-
"trust",
|
|
32
|
-
"reputation",
|
|
33
|
-
"anti-fraud",
|
|
34
|
-
"decentralized",
|
|
35
|
-
"service-discovery",
|
|
36
|
-
"yellow-pages",
|
|
37
|
-
"secure-chat"
|
|
38
|
-
],
|
|
39
|
-
"license": "MIT",
|
|
40
|
-
"files": [
|
|
41
|
-
"dist/",
|
|
42
|
-
"bin/",
|
|
43
|
-
"README.md",
|
|
44
|
-
"LICENSE"
|
|
45
|
-
],
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@noble/ed25519": "^2.1.0",
|
|
48
|
-
"@noble/hashes": "^1.7.0",
|
|
49
|
-
"superagent": "^10.3.0",
|
|
50
|
-
"yargs": "^17.7.0"
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@jest/globals": "^30.3.0",
|
|
54
|
-
"@types/jest": "^30.0.0",
|
|
55
|
-
"@types/node": "^22.0.0",
|
|
56
|
-
"@types/superagent": "^8.1.0",
|
|
57
|
-
"@types/yargs": "^17.0.0",
|
|
58
|
-
"jest": "^30.3.0",
|
|
59
|
-
"ts-jest": "^29.4.9",
|
|
60
|
-
"typescript": "^5.7.0"
|
|
61
|
-
}
|
|
62
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "oceanbus",
|
|
3
|
+
"version": "0.4.2",
|
|
4
|
+
"description": "OceanBus AI Agent Communication & Trust Infrastructure SDK",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"oceanbus": "./bin/oceanbus.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsc --watch",
|
|
13
|
+
"test": "npm run test:unit && npm run test:e2e",
|
|
14
|
+
"test:unit": "jest",
|
|
15
|
+
"test:e2e": "node test/integration/run-all.mjs"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"oceanbus",
|
|
19
|
+
"agent",
|
|
20
|
+
"ai-agent",
|
|
21
|
+
"agent-communication",
|
|
22
|
+
"multi-agent",
|
|
23
|
+
"p2p",
|
|
24
|
+
"messaging",
|
|
25
|
+
"end-to-end-encryption",
|
|
26
|
+
"e2ee",
|
|
27
|
+
"encryption",
|
|
28
|
+
"xchacha20",
|
|
29
|
+
"ed25519",
|
|
30
|
+
"identity",
|
|
31
|
+
"trust",
|
|
32
|
+
"reputation",
|
|
33
|
+
"anti-fraud",
|
|
34
|
+
"decentralized",
|
|
35
|
+
"service-discovery",
|
|
36
|
+
"yellow-pages",
|
|
37
|
+
"secure-chat"
|
|
38
|
+
],
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"files": [
|
|
41
|
+
"dist/",
|
|
42
|
+
"bin/",
|
|
43
|
+
"README.md",
|
|
44
|
+
"LICENSE"
|
|
45
|
+
],
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@noble/ed25519": "^2.1.0",
|
|
48
|
+
"@noble/hashes": "^1.7.0",
|
|
49
|
+
"superagent": "^10.3.0",
|
|
50
|
+
"yargs": "^17.7.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@jest/globals": "^30.3.0",
|
|
54
|
+
"@types/jest": "^30.0.0",
|
|
55
|
+
"@types/node": "^22.0.0",
|
|
56
|
+
"@types/superagent": "^8.1.0",
|
|
57
|
+
"@types/yargs": "^17.0.0",
|
|
58
|
+
"jest": "^30.3.0",
|
|
59
|
+
"ts-jest": "^29.4.9",
|
|
60
|
+
"typescript": "^5.7.0"
|
|
61
|
+
},
|
|
62
|
+
"homepage": "https://github.com/ryanbihai/oceanbus#readme",
|
|
63
|
+
"repository": {
|
|
64
|
+
"type": "git",
|
|
65
|
+
"url": "https://github.com/ryanbihai/oceanbus"
|
|
66
|
+
},
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/ryanbihai/oceanbus/issues"
|
|
69
|
+
}
|
|
70
|
+
}
|