agentbnb 9.0.0 → 9.0.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 (30) hide show
  1. package/dist/{chunk-27VHBFUP.js → chunk-2SOHHB2O.js} +4 -4
  2. package/dist/{chunk-NZTLBAML.js → chunk-74OZGLIT.js} +1 -1
  3. package/dist/{chunk-BOBND3QV.js → chunk-76YORWFJ.js} +3 -3
  4. package/dist/{chunk-D4IJQ3TK.js → chunk-7S4ZLFVI.js} +0 -73
  5. package/dist/{chunk-UIPGGNRC.js → chunk-ERT77HKY.js} +1 -1
  6. package/dist/{chunk-W5J3PEQ6.js → chunk-FMKBCO2Q.js} +2 -2
  7. package/dist/{chunk-2GWOFP24.js → chunk-FUGWPKXN.js} +1 -1
  8. package/dist/{chunk-AZEGOADG.js → chunk-I3RRMAAD.js} +3 -3
  9. package/dist/chunk-QEDVPJKP.js +203 -0
  10. package/dist/{chunk-4FK45WJI.js → chunk-SMQDT7CT.js} +2 -2
  11. package/dist/chunk-TA73FIZU.js +75 -0
  12. package/dist/{chunk-LLL3KYEM.js → chunk-UQCQ2JCG.js} +5 -3
  13. package/dist/{chunk-TLT6F35V.js → chunk-YJ3RGKPU.js} +1 -1
  14. package/dist/{chunk-P3FDT7G5.js → chunk-Z4IDXMSP.js} +0 -200
  15. package/dist/cli/index.js +106 -29
  16. package/dist/{conduct-4NPMP4GL.js → conduct-UAEEMVFD.js} +7 -6
  17. package/dist/{conduct-5FTKINWU.js → conduct-URYWMA5T.js} +7 -6
  18. package/dist/{conductor-mode-ZWC5BZUL.js → conductor-mode-2UFN6BUL.js} +6 -5
  19. package/dist/credits-action-24EPLUHG.js +148 -0
  20. package/dist/daemon-A7DXZIQW.js +188 -0
  21. package/dist/{execute-JTPFFEH6.js → execute-2Z3XIUHR.js} +6 -5
  22. package/dist/{openclaw-setup-HVEVSKXQ.js → openclaw-setup-WA625DZA.js} +9 -8
  23. package/dist/{openclaw-skills-QLC4D6DZ.js → openclaw-skills-76ZWXHFM.js} +53 -36
  24. package/dist/{request-WX3VLXBT.js → request-KPKWBL5W.js} +5 -4
  25. package/dist/{serve-skill-C7JU24CF.js → serve-skill-QSUIK3ZF.js} +6 -5
  26. package/dist/{server-Z6P3AHKN.js → server-TGV2OPUM.js} +10 -8
  27. package/dist/{service-coordinator-PLUPMPSC.js → service-coordinator-4JAUUNUL.js} +32 -12
  28. package/dist/skills/agentbnb/bootstrap.js +16 -0
  29. package/package.json +1 -1
  30. package/skills/agentbnb/SKILL.md +46 -1
@@ -12,21 +12,23 @@ import {
12
12
  import {
13
13
  executeCapabilityBatch,
14
14
  executeCapabilityRequest
15
- } from "./chunk-BOBND3QV.js";
15
+ } from "./chunk-76YORWFJ.js";
16
16
  import {
17
17
  StructuredFeedbackSchema
18
18
  } from "./chunk-AUBHR7HH.js";
19
19
  import {
20
20
  announceGateway,
21
- resolveSelfCli,
22
21
  stopAnnouncement
23
- } from "./chunk-D4IJQ3TK.js";
22
+ } from "./chunk-TA73FIZU.js";
23
+ import {
24
+ resolveSelfCli
25
+ } from "./chunk-7S4ZLFVI.js";
24
26
  import {
25
27
  KNOWN_API_KEYS,
26
28
  buildDraftCard,
27
29
  detectApiKeys,
28
30
  getPricingStats
29
- } from "./chunk-2GWOFP24.js";
31
+ } from "./chunk-FUGWPKXN.js";
30
32
  import {
31
33
  listPendingRequests,
32
34
  resolvePendingRequest
@@ -38,21 +40,24 @@ import {
38
40
  } from "./chunk-G5WKW3ED.js";
39
41
  import {
40
42
  syncCreditsFromRegistry
41
- } from "./chunk-W5J3PEQ6.js";
43
+ } from "./chunk-FMKBCO2Q.js";
42
44
  import {
43
45
  createLedger,
44
46
  identityAuthPlugin
45
- } from "./chunk-NZTLBAML.js";
47
+ } from "./chunk-74OZGLIT.js";
46
48
  import {
47
49
  deriveAgentId
48
50
  } from "./chunk-5CC6O6SO.js";
49
- import "./chunk-UIPGGNRC.js";
51
+ import "./chunk-ERT77HKY.js";
50
52
  import "./chunk-ELFGYC22.js";
51
53
  import {
52
- bootstrapAgent,
53
54
  buildReputationMap,
54
55
  computeReputation,
55
56
  filterCards,
57
+ searchCards
58
+ } from "./chunk-QEDVPJKP.js";
59
+ import {
60
+ bootstrapAgent,
56
61
  getBalance,
57
62
  getTransactions,
58
63
  holdEscrow,
@@ -62,9 +67,8 @@ import {
62
67
  migrateOwner,
63
68
  openCreditDb,
64
69
  releaseEscrow,
65
- searchCards,
66
70
  settleEscrow
67
- } from "./chunk-P3FDT7G5.js";
71
+ } from "./chunk-Z4IDXMSP.js";
68
72
  import {
69
73
  RelayMessageSchema
70
74
  } from "./chunk-3466S65P.js";
@@ -1061,7 +1065,7 @@ var AgentRuntime = class {
1061
1065
  }
1062
1066
  const modes = /* @__PURE__ */ new Map();
1063
1067
  if (this.conductorEnabled) {
1064
- const { ConductorMode } = await import("./conductor-mode-ZWC5BZUL.js");
1068
+ const { ConductorMode } = await import("./conductor-mode-2UFN6BUL.js");
1065
1069
  const { registerConductorCard, CONDUCTOR_OWNER } = await import("./card-NKQFB3HD.js");
1066
1070
  const { loadPeers } = await import("./peers-F2EWUMVQ.js");
1067
1071
  registerConductorCard(this.registryDb);
@@ -4285,6 +4289,22 @@ function createRegistryServer(opts) {
4285
4289
  }
4286
4290
  const card = result.data;
4287
4291
  const now = (/* @__PURE__ */ new Date()).toISOString();
4292
+ if (card.spec_version === "2.0") {
4293
+ if (!card.skills || card.skills.length === 0) {
4294
+ return reply.code(400).send({ error: "Card must have at least 1 skill" });
4295
+ }
4296
+ const badSkill = card.skills.find((s) => !s.description || s.description.length < 20);
4297
+ if (badSkill) {
4298
+ return reply.code(400).send({ error: `Skill "${badSkill.id}" must have a description (20+ chars)` });
4299
+ }
4300
+ if (card.agent_name === card.owner || /^[0-9a-f]{16}$/.test(card.agent_name)) {
4301
+ return reply.code(400).send({ error: "agent_name must be a readable name, not an ID" });
4302
+ }
4303
+ } else {
4304
+ if (!card.description || card.description.length < 20) {
4305
+ return reply.code(400).send({ error: "Card must have a description (20+ chars)" });
4306
+ }
4307
+ }
4288
4308
  if (card.spec_version === "2.0") {
4289
4309
  const cardWithTimestamps = attachCanonicalAgentId(db, {
4290
4310
  ...card,
@@ -5640,7 +5660,7 @@ var ServiceCoordinator = class {
5640
5660
  }
5641
5661
  if (opts.registryUrl && opts.relay) {
5642
5662
  const { RelayClient } = await import("./websocket-client-5CRE36Z5.js");
5643
- const { executeCapabilityRequest: executeCapabilityRequest2 } = await import("./execute-JTPFFEH6.js");
5663
+ const { executeCapabilityRequest: executeCapabilityRequest2 } = await import("./execute-2Z3XIUHR.js");
5644
5664
  const localCards = listCards(this.runtime.registryDb, this.config.owner);
5645
5665
  const { primaryCard, additionalCards } = buildRelayRegistrationCards(this.config.owner, localCards);
5646
5666
  if (this.config.conductor?.public) {
@@ -4821,6 +4821,22 @@ function createRegistryServer(opts) {
4821
4821
  }
4822
4822
  const card = result.data;
4823
4823
  const now = (/* @__PURE__ */ new Date()).toISOString();
4824
+ if (card.spec_version === "2.0") {
4825
+ if (!card.skills || card.skills.length === 0) {
4826
+ return reply.code(400).send({ error: "Card must have at least 1 skill" });
4827
+ }
4828
+ const badSkill = card.skills.find((s) => !s.description || s.description.length < 20);
4829
+ if (badSkill) {
4830
+ return reply.code(400).send({ error: `Skill "${badSkill.id}" must have a description (20+ chars)` });
4831
+ }
4832
+ if (card.agent_name === card.owner || /^[0-9a-f]{16}$/.test(card.agent_name)) {
4833
+ return reply.code(400).send({ error: "agent_name must be a readable name, not an ID" });
4834
+ }
4835
+ } else {
4836
+ if (!card.description || card.description.length < 20) {
4837
+ return reply.code(400).send({ error: "Card must have a description (20+ chars)" });
4838
+ }
4839
+ }
4824
4840
  if (card.spec_version === "2.0") {
4825
4841
  const cardWithTimestamps = attachCanonicalAgentId(db, {
4826
4842
  ...card,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "9.0.0",
6
+ "version": "9.0.2",
7
7
  "description": "P2P Agent Capability Sharing Protocol — Airbnb for AI agent pipelines",
8
8
  "type": "module",
9
9
  "main": "dist/index.js",
@@ -4,7 +4,7 @@ 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: "8.4.4"
7
+ version: "9.0.0"
8
8
  tags: "ai-agent,p2p,capability-sharing,credit-economy,skill-marketplace"
9
9
  openclaw:
10
10
  emoji: "🏠"
@@ -99,6 +99,51 @@ agentbnb request <card_id> --skill <skill_id> --params '<json>' --cost <credits>
99
99
 
100
100
  **Step 5:** If the request fails, try another provider or adjust params.
101
101
 
102
+ ## Real Example: Stock Analysis
103
+
104
+ ```
105
+ User: "幫我分析 NVDA 股票"
106
+
107
+ Step 1: Search
108
+ $ agentbnb discover "stock"
109
+
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
114
+
115
+ 1 agent(s) found, 2 skills total
116
+
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
124
+ {
125
+ "signal": "BUY",
126
+ "confidence": 0.81,
127
+ "composite_score": 0.4312,
128
+ "modules": { "valuation": 0.35, "technicals": 0.62, ... },
129
+ "safety_flags": 2
130
+ }
131
+ ```
132
+
133
+ ## Real Example: Claude Code Execution
134
+
135
+ ```
136
+ User: "用遠端 Claude Code 跑一段 Python"
137
+
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
143
+
144
+ Result: def fibonacci(n): ...
145
+ ```
146
+
102
147
  ## Credit Economy
103
148
 
104
149
  - You start with 50 credits