agentbnb 9.0.0 → 9.0.1

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/dist/cli/index.js CHANGED
@@ -232,7 +232,7 @@ Skills: ${skills2.skillCount} skill(s) in ${skills2.path}`);
232
232
  if (!skipServe) {
233
233
  try {
234
234
  const { ProcessGuard } = await import("../process-guard-QDBIOLY4.js");
235
- const { ServiceCoordinator } = await import("../service-coordinator-PLUPMPSC.js");
235
+ const { ServiceCoordinator } = await import("../service-coordinator-2NFUCXYX.js");
236
236
  const guard = new ProcessGuard(join(initResult.configDir, ".pid"));
237
237
  const coordinator = new ServiceCoordinator(initResult.config, guard);
238
238
  const result = await coordinator.ensureRunning({
@@ -294,7 +294,7 @@ Skills: ${skills2.skillCount} skill(s) in ${skills2.path}`);
294
294
  }
295
295
 
296
296
  // src/cli/index.ts
297
- var VERSION = true ? "9.0.0" : "0.0.0-dev";
297
+ var VERSION = true ? "9.0.1" : "0.0.0-dev";
298
298
  function loadIdentityAuth(owner) {
299
299
  const configDir = getConfigDir();
300
300
  let keys;
@@ -1118,7 +1118,7 @@ program.command("serve").description("Start the AgentBnB gateway server").option
1118
1118
  process.exit(1);
1119
1119
  }
1120
1120
  const { ProcessGuard } = await import("../process-guard-QDBIOLY4.js");
1121
- const { ServiceCoordinator } = await import("../service-coordinator-PLUPMPSC.js");
1121
+ const { ServiceCoordinator } = await import("../service-coordinator-2NFUCXYX.js");
1122
1122
  const port = opts.port ? parseInt(opts.port, 10) : config.gateway_port;
1123
1123
  const registryPort = parseInt(opts.registryPort, 10);
1124
1124
  if (!Number.isFinite(port) || !Number.isFinite(registryPort)) {
@@ -1645,7 +1645,7 @@ vc.command("show").description("Display Verifiable Credentials for this agent").
1645
1645
  await vcShow(opts);
1646
1646
  });
1647
1647
  program.command("mcp-server").description("Start an MCP (Model Context Protocol) server for IDE integration").action(async () => {
1648
- const { startMcpServer } = await import("../server-Z6P3AHKN.js");
1648
+ const { startMcpServer } = await import("../server-F4WXNK5B.js");
1649
1649
  await startMcpServer();
1650
1650
  });
1651
1651
  await program.parseAsync(process.argv);
@@ -256,7 +256,7 @@ function registerPublishTool(server, ctx) {
256
256
  }
257
257
 
258
258
  // src/mcp/server.ts
259
- var VERSION = true ? "9.0.0" : "0.0.0-dev";
259
+ var VERSION = true ? "9.0.1" : "0.0.0-dev";
260
260
  async function startMcpServer() {
261
261
  const config = loadConfig();
262
262
  if (!config) {
@@ -4285,6 +4285,22 @@ function createRegistryServer(opts) {
4285
4285
  }
4286
4286
  const card = result.data;
4287
4287
  const now = (/* @__PURE__ */ new Date()).toISOString();
4288
+ if (card.spec_version === "2.0") {
4289
+ if (!card.skills || card.skills.length === 0) {
4290
+ return reply.code(400).send({ error: "Card must have at least 1 skill" });
4291
+ }
4292
+ const badSkill = card.skills.find((s) => !s.description || s.description.length < 20);
4293
+ if (badSkill) {
4294
+ return reply.code(400).send({ error: `Skill "${badSkill.id}" must have a description (20+ chars)` });
4295
+ }
4296
+ if (card.agent_name === card.owner || /^[0-9a-f]{16}$/.test(card.agent_name)) {
4297
+ return reply.code(400).send({ error: "agent_name must be a readable name, not an ID" });
4298
+ }
4299
+ } else {
4300
+ if (!card.description || card.description.length < 20) {
4301
+ return reply.code(400).send({ error: "Card must have a description (20+ chars)" });
4302
+ }
4303
+ }
4288
4304
  if (card.spec_version === "2.0") {
4289
4305
  const cardWithTimestamps = attachCanonicalAgentId(db, {
4290
4306
  ...card,
@@ -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.1",
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