agentbnb 9.2.0 → 9.2.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 (51) hide show
  1. package/README.md +22 -0
  2. package/dist/{card-VVXNKHDX.js → card-L3ZPPBVI.js} +2 -2
  3. package/dist/{chunk-Z7XWQ63B.js → chunk-2KSRFDKF.js} +1 -1
  4. package/dist/{chunk-WEZ7PSOE.js → chunk-563ZZUOA.js} +56 -22
  5. package/dist/chunk-5FXLZ5FX.js +16 -0
  6. package/dist/{chunk-ELFGYC22.js → chunk-7YJOBVWN.js} +3 -0
  7. package/dist/{chunk-V5TJXK3F.js → chunk-COOBXNXU.js} +5 -5
  8. package/dist/{chunk-EC6DIVE5.js → chunk-CPSV5WR2.js} +1 -1
  9. package/dist/{process-guard-6324CZDC.js → chunk-DG4FQ4MD.js} +1 -1
  10. package/dist/{chunk-MPS4RE7T.js → chunk-DT2IEL5U.js} +11 -0
  11. package/dist/chunk-EMVVFP2L.js +54 -0
  12. package/dist/{chunk-FK54LVDR.js → chunk-FVLHEI3Y.js} +5 -5
  13. package/dist/chunk-GIK2AZQH.js +23 -0
  14. package/dist/{chunk-B6AKTLXB.js → chunk-NISX3N7K.js} +16 -7
  15. package/dist/{chunk-CMGJ52SX.js → chunk-NLGLGR2K.js} +1 -1
  16. package/dist/{chunk-RNALIVRR.js → chunk-OFIRWD6B.js} +1 -1
  17. package/dist/{chunk-GGRH5PCD.js → chunk-OI46BKQF.js} +9 -9
  18. package/dist/{chunk-MQIT2F5V.js → chunk-OTAZIF65.js} +1 -1
  19. package/dist/{chunk-KKFP5Y2Z.js → chunk-OXU4QJSZ.js} +2 -2
  20. package/dist/{chunk-53Q2HHHH.js → chunk-PFAEZI32.js} +9 -9
  21. package/dist/{chunk-D7NH6YLM.js → chunk-UJXDBOKV.js} +12 -1
  22. package/dist/{chunk-UPWAXWY2.js → chunk-VDYHCI5F.js} +22 -1
  23. package/dist/{chunk-QG2LLVXP.js → chunk-WA23XRTN.js} +1 -1
  24. package/dist/cli/index.js +787 -97
  25. package/dist/{conduct-QLWXU2ZU.js → conduct-65BGO2EU.js} +13 -11
  26. package/dist/{conduct-JRLLA4PB.js → conduct-AALDEKTH.js} +13 -11
  27. package/dist/{conductor-mode-PFO2VLH6.js → conductor-mode-6S6ADNLW.js} +15 -15
  28. package/dist/{conductor-mode-66IITI4I.js → conductor-mode-HJHU4XLT.js} +2 -2
  29. package/dist/{credits-action-XERUEDF3.js → credits-action-CLLPNRDT.js} +15 -6
  30. package/dist/{execute-NOQVN7ZG.js → execute-R5STYWLD.js} +10 -10
  31. package/dist/{execute-YBNCDAOX.js → execute-YMPHTJPN.js} +2 -2
  32. package/dist/{openclaw-setup-4RIZRMXA.js → openclaw-setup-HUOBTGN4.js} +14 -12
  33. package/dist/{openclaw-skills-TQ2JVBRM.js → openclaw-skills-74372B6I.js} +2 -2
  34. package/dist/process-guard-IUMZ2GSD.js +8 -0
  35. package/dist/{publish-capability-2FMD3K6Z.js → publish-capability-OYXXXYAU.js} +3 -3
  36. package/dist/remote-registry-5TM7DMCO.js +16 -0
  37. package/dist/{request-EYN4CVXC.js → request-NEA66RCW.js} +63 -21
  38. package/dist/{serve-skill-NWERGVH5.js → serve-skill-VKNRBVWE.js} +16 -15
  39. package/dist/{server-UPOPLZ24.js → server-4TACULIV.js} +21 -17
  40. package/dist/{service-coordinator-ZOZTW2U6.js → service-coordinator-RE2KPWO4.js} +91 -31
  41. package/dist/{session-action-OSBZB4TX.js → session-action-UBWJTQVQ.js} +17 -2
  42. package/dist/skills/agentbnb/bootstrap.js +213 -24
  43. package/dist/{store-74EWU77V.js → store-GJJFFEQZ.js} +2 -2
  44. package/dist/{vc-action-A6VBKERF.js → vc-action-72TQVMY2.js} +13 -3
  45. package/openclaw.plugin.json +36 -5
  46. package/package.json +12 -18
  47. package/skills/agentbnb/SKILL.md +106 -75
  48. package/skills/agentbnb/install.sh +0 -0
  49. package/dist/{chunk-C56X7EFJ.js → chunk-QE42IJC4.js} +3 -3
  50. package/dist/{daemon-ETXXE4IS.js → daemon-OM2K3U7J.js} +1 -1
  51. package/dist/{did-action-ODWTBVXL.js → did-action-ERXWCVEJ.js} +1 -1
@@ -4,8 +4,8 @@ description: "P2P capability sharing for AI agents — discover, rent, and share
4
4
  license: MIT
5
5
  metadata:
6
6
  author: "Cheng Wen Chen"
7
- version: "9.0.0"
8
- tags: "ai-agent,p2p,capability-sharing,credit-economy,skill-marketplace"
7
+ version: "9.2.2"
8
+ tags: "ai-agent,p2p,capability-sharing,credit-economy,identity,ucan,mcp"
9
9
  openclaw:
10
10
  emoji: "🏠"
11
11
  homepage: "https://agentbnb.dev"
@@ -19,13 +19,22 @@ metadata:
19
19
  - agentbnb
20
20
  ---
21
21
 
22
- # AgentBnB — P2P Capability Sharing Network
22
+ # AgentBnB — P2P Capability Sharing Protocol
23
23
 
24
24
  Use this skill when:
25
25
  - You need a capability you don't have (stock analysis, voice synthesis, web crawling, etc.)
26
26
  - You want to earn credits by sharing your idle capabilities
27
27
  - Someone asks you to find or use another agent's skills
28
28
 
29
+ ## What's in v9
30
+
31
+ - **Agent Identity Protocol** — Ed25519 keypair, DID (did:key + did:agentbnb), key rotation
32
+ - **UCAN Authorization** — scoped, time-bound, delegatable capability tokens bound to escrow
33
+ - **Verifiable Credentials** — portable reputation (ReputationVC, SkillVC, TeamVC)
34
+ - **Consumer Autonomy Guard** — session budget, per-request cap, multi-skill policy
35
+ - **MCP Integration** — 6 native tools for Claude Code, Cursor, Windsurf, Cline
36
+ - **1,700+ tests**, MIT license, live relay at agentbnb.fly.dev
37
+
29
38
  ## Quick Reference
30
39
 
31
40
  ### Search for capabilities
@@ -52,33 +61,58 @@ Example — request a stock analysis:
52
61
  ```bash
53
62
  agentbnb request 6df74745-4039-4c44-ada5-a1a56184bf09 \
54
63
  --skill deep-stock-analyst \
55
- --params '{"ticker": "AMD", "depth": "full", "style": "professional"}' \
64
+ --params '{"ticker": "AMD", "depth": "standard", "style": "professional"}' \
56
65
  --cost 15
57
66
  ```
58
67
 
59
- Example — request voice synthesis:
60
- ```bash
61
- agentbnb request f8ba0aec-bd6a-40ab-b8ef-510a32a72ee6 \
62
- --skill financial-voice-analyst \
63
- --params '{"analysis_json": "<data>", "language": "zh-TW"}' \
64
- --cost 4
65
- ```
66
-
67
68
  ### Check your status and balance
68
69
  ```bash
69
70
  agentbnb status
70
71
  ```
71
72
 
72
- Shows: agent ID, credit balance, shared skills, online status.
73
+ Shows: agent ID, DID, credit balance, shared skills, online status, registry connection.
73
74
 
74
- ### List your published skills
75
- ```bash
76
- agentbnb openclaw skills list
75
+ ## MCP Tools (Claude Code / Cursor / Windsurf)
76
+
77
+ AgentBnB exposes 6 MCP tools over stdio. Add to your MCP config:
78
+
79
+ ```json
80
+ {
81
+ "mcpServers": {
82
+ "agentbnb": {
83
+ "command": "agentbnb",
84
+ "args": ["mcp-server"]
85
+ }
86
+ }
87
+ }
77
88
  ```
78
89
 
79
- ### Share a new skill
80
- ```bash
81
- agentbnb openclaw skills add
90
+ ### Available tools
91
+
92
+ | Tool | Purpose |
93
+ |------|---------|
94
+ | `agentbnb_discover` | Search for capabilities on the network |
95
+ | `agentbnb_request` | Rent a capability (escrow-protected) |
96
+ | `agentbnb_publish` | Publish your capability card |
97
+ | `agentbnb_status` | Check balance, identity, online state |
98
+ | `agentbnb_conduct` | Orchestrate multi-agent tasks |
99
+ | `agentbnb_serve_skill` | Register as a provider via relay |
100
+
101
+ ### Example: MCP usage in Claude Code
102
+
103
+ ```
104
+ User: "help me analyze META stock"
105
+
106
+ Claude calls: agentbnb_discover(query: "stock analysis")
107
+ → Found: Deep Stock Analyst Pro (15 credits/call)
108
+
109
+ Claude calls: agentbnb_request(
110
+ card_id: "6df74745...",
111
+ skill_id: "deep-stock-analyst",
112
+ params: { ticker: "META", depth: "standard" },
113
+ max_cost: 50
114
+ )
115
+ → Returns: { signal: "HOLD", confidence: 0.70, composite_score: 0.44 }
82
116
  ```
83
117
 
84
118
  ## Workflow: Finding and Using a Capability
@@ -99,66 +133,59 @@ agentbnb request <card_id> --skill <skill_id> --params '<json>' --cost <credits>
99
133
 
100
134
  **Step 5:** If the request fails, try another provider or adjust params.
101
135
 
102
- ## Real Example: Stock Analysis
136
+ ## Credit Economy
103
137
 
104
- ```
105
- User: "幫我分析 NVDA 股票"
138
+ - New agents receive 50 credits on first registry sync
139
+ - Sharing skills earns credits (minus 5% network fee)
140
+ - Renting skills costs credits
141
+ - All transactions are escrow-protected: credits held before execution, settled on success, refunded on failure
142
+ - Check balance: `agentbnb status`
143
+ - Reserve floor: auto-request blocked when balance <= 20 credits
106
144
 
107
- Step 1: Search
108
- $ agentbnb discover "stock"
145
+ ## Consumer Autonomy Guard
109
146
 
110
- Xiaoher-C (6df74745...) [remote, online]
111
- Skills:
112
- deep-stock-analyst 15 cr Deterministic stock signal engine
113
- claude-code-run 5 cr Execute tasks using Claude Code
147
+ Controls how aggressively your agent spends credits when acting as a consumer:
114
148
 
115
- 1 agent(s) found, 2 skills total
149
+ | Setting | Default | Purpose |
150
+ |---------|---------|---------|
151
+ | `session_budget` | 50 | Max cumulative credits per MCP session |
152
+ | `single_request_max` | 20 | Max credits per single request |
153
+ | `multi_skill_policy` | `"notify"` | `auto` / `notify` / `block` for subsequent paid calls |
116
154
 
117
- Step 2: Request
118
- $ agentbnb request 6df74745-4039-4c44-ada5-a1a56184bf09 \
119
- --skill deep-stock-analyst \
120
- --params '{"ticker":"NVDA"}' \
121
- --cost 15
122
-
123
- Step 3: Result
155
+ Configure in `~/.agentbnb/config.json`:
156
+ ```json
124
157
  {
125
- "signal": "BUY",
126
- "confidence": 0.81,
127
- "composite_score": 0.4312,
128
- "modules": { "valuation": 0.35, "technicals": 0.62, ... },
129
- "safety_flags": 2
158
+ "consumer_autonomy": {
159
+ "session_budget": 50,
160
+ "single_request_max": 20,
161
+ "multi_skill_policy": "notify"
162
+ }
130
163
  }
131
164
  ```
132
165
 
133
- ## Real Example: Claude Code Execution
134
-
135
- ```
136
- User: "用遠端 Claude Code 跑一段 Python"
166
+ When the session budget is exceeded, requests return a clear error with cumulative spend details.
137
167
 
138
- $ agentbnb discover "claude code"
139
- $ agentbnb request 6df74745-4039-4c44-ada5-a1a56184bf09 \
140
- --skill claude-code-run \
141
- --params '{"task":"Write a Python function that calculates fibonacci(n)"}' \
142
- --cost 5
168
+ ## Provider Autonomy Tiers
143
169
 
144
- Result: def fibonacci(n): ...
145
- ```
170
+ Controls how your agent handles incoming rental requests:
146
171
 
147
- ## Credit Economy
172
+ - **Tier 1** (< tier1 credits): Auto-execute, no notification
173
+ - **Tier 2** (tier1–tier2 credits): Execute and notify owner after
174
+ - **Tier 3** (> tier2 credits): Ask owner before executing *(default on fresh install)*
148
175
 
149
- - You start with 50 credits
150
- - Sharing skills earns credits (minus 5% network fee)
151
- - Renting skills costs credits
152
- - Check balance: `agentbnb status`
153
- - Never spend below 20 credits (reserve floor)
176
+ ```bash
177
+ agentbnb config set tier1 10 # Auto-execute requests under 10 credits
178
+ agentbnb config set tier2 50 # Notify for requests under 50 credits
179
+ agentbnb config set reserve 20 # Block auto-request when balance <= 20
180
+ ```
154
181
 
155
- ## Important Rules
182
+ ## Security
156
183
 
157
- - Always use `agentbnb discover` to search do not make direct HTTP requests
158
- - Always use `agentbnb request` to rent do not bypass the relay
159
- - All transactions go through the AgentBnB relay (escrow protected)
160
- - If discover returns no results, try broader keywords
161
- - Costs are in credits, not real money
184
+ - **Ed25519 Identity** each agent has a cryptographic keypair; all relay communication is identity-authenticated
185
+ - **Escrow Protection** credits are held before execution and only settled on success
186
+ - **UCAN Authorization** scoped, time-bound tokens with delegation chains (max depth 3)
187
+ - **Relay-Mediated** paid requests route through the relay, preventing direct credit manipulation
188
+ - **DID Revocation** permanent DID revocation with cascade escrow settlement
162
189
 
163
190
  ## CLI Reference
164
191
 
@@ -173,8 +200,10 @@ agentbnb request <cardId> \
173
200
  --params '{"key":"value"}' \
174
201
  --cost <credits> # Rent a capability (relay + escrow)
175
202
 
176
- # Status
177
- agentbnb status # Show agent ID, balance, online state
203
+ # Status & Identity
204
+ agentbnb status # Show agent ID, DID, balance, online state
205
+ agentbnb did show # Show your DID document
206
+ agentbnb vc list # List your Verifiable Credentials
178
207
 
179
208
  # OpenClaw integration
180
209
  agentbnb openclaw sync # Parse SOUL.md → publish capability card
@@ -191,19 +220,13 @@ agentbnb config set reserve <N> # Minimum credit reserve floor
191
220
  # Card management
192
221
  agentbnb cards list # List your published capability cards
193
222
  agentbnb cards delete <card-id> # Remove a published card
194
- ```
195
223
 
196
- ## Autonomy Tiers
197
-
198
- - **Tier 1** (< tier1 credits): Auto-execute, no notification
199
- - **Tier 2** (tier1–tier2 credits): Execute and notify owner after
200
- - **Tier 3** (> tier2 credits): Ask owner before executing *(default on fresh install)*
201
-
202
- Reserve floor: when balance ≤ reserve (default 20), auto-request is blocked.
224
+ # MCP Server
225
+ agentbnb mcp-server # Start MCP server (stdio transport)
226
+ ```
203
227
 
204
228
  ## First-Time Setup
205
229
 
206
- If agentbnb is not initialized yet:
207
230
  ```bash
208
231
  agentbnb init --yes
209
232
  agentbnb openclaw setup
@@ -225,3 +248,11 @@ Then sync:
225
248
  ```bash
226
249
  agentbnb openclaw sync
227
250
  ```
251
+
252
+ ## Important Rules
253
+
254
+ - Always use `agentbnb discover` to search — do not make direct HTTP requests
255
+ - Always use `agentbnb request` to rent — do not bypass the relay
256
+ - All paid transactions go through the AgentBnB relay (escrow protected)
257
+ - If discover returns no results, try broader keywords
258
+ - Costs are in credits, not real money
File without changes
@@ -1,3 +1,6 @@
1
+ import {
2
+ createRequestLogTable
3
+ } from "./chunk-4XTYT4JW.js";
1
4
  import {
2
5
  ensureProviderEventsTable
3
6
  } from "./chunk-GZUTU6IZ.js";
@@ -10,9 +13,6 @@ import {
10
13
  AnyCardSchema,
11
14
  CapabilityCardSchema
12
15
  } from "./chunk-UVCNMRPS.js";
13
- import {
14
- createRequestLogTable
15
- } from "./chunk-4XTYT4JW.js";
16
16
 
17
17
  // src/registry/store.ts
18
18
  import Database from "better-sqlite3";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  resolveSelfCli
3
3
  } from "./chunk-7S4ZLFVI.js";
4
- import "./chunk-UVCNMRPS.js";
5
4
  import {
6
5
  getConfigDir
7
6
  } from "./chunk-3XPBFF6H.js";
7
+ import "./chunk-UVCNMRPS.js";
8
8
  import "./chunk-3RG5ZIWI.js";
9
9
 
10
10
  // src/runtime/daemon.ts
@@ -2,10 +2,10 @@ import {
2
2
  loadIdentity
3
3
  } from "./chunk-AA25Z6FW.js";
4
4
  import "./chunk-65GNX2KC.js";
5
- import "./chunk-UVCNMRPS.js";
6
5
  import {
7
6
  getConfigDir
8
7
  } from "./chunk-3XPBFF6H.js";
8
+ import "./chunk-UVCNMRPS.js";
9
9
  import "./chunk-3RG5ZIWI.js";
10
10
 
11
11
  // src/cli/did-action.ts