agentbnb 8.3.2 → 8.4.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.
Files changed (45) hide show
  1. package/dist/{card-T2XJZA5A.js → card-HYTD2BJQ.js} +1 -1
  2. package/dist/{chunk-S7DZHKCG.js → chunk-2PP5MQPD.js} +5 -3
  3. package/dist/{chunk-75OC6E4F.js → chunk-3XPBFF6H.js} +1 -0
  4. package/dist/{chunk-5AH3CMOX.js → chunk-3YQ73ZM6.js} +1 -1
  5. package/dist/{chunk-FELGHDCA.js → chunk-6FZ4WYQL.js} +38 -4
  6. package/dist/{chunk-D242QZCR.js → chunk-6XCN62YU.js} +10 -54
  7. package/dist/chunk-AZKVGC5T.js +53 -0
  8. package/dist/{chunk-NHVHLUYS.js → chunk-CFHCG5FE.js} +6 -217
  9. package/dist/{chunk-5AIYALBX.js → chunk-COA2D7QM.js} +4 -3
  10. package/dist/chunk-G5WKW3ED.js +41 -0
  11. package/dist/{chunk-F3KIEVJ2.js → chunk-HU46M4JA.js} +2 -87
  12. package/dist/{chunk-77KGEDH4.js → chunk-MZSVVG55.js} +2 -41
  13. package/dist/chunk-PCQEHIGF.js +750 -0
  14. package/dist/chunk-PIPCGRCR.js +91 -0
  15. package/dist/{chunk-QFPXZITP.js → chunk-PMRTQ2RL.js} +34 -0
  16. package/dist/{chunk-7IQE34QK.js → chunk-UF6R2RVN.js} +5 -3
  17. package/dist/{chunk-IGQNP3ZO.js → chunk-VAAEBCMU.js} +1 -1
  18. package/dist/chunk-VRPLSK34.js +214 -0
  19. package/dist/{chunk-BARHNIKG.js → chunk-WK2QSO4E.js} +1 -1
  20. package/dist/chunk-WPB5LFGI.js +132 -0
  21. package/dist/chunk-XGOA5J2K.js +173 -0
  22. package/dist/{chunk-VJ7XBEY6.js → chunk-Z5726VPY.js} +6 -6
  23. package/dist/cli/index.js +118 -789
  24. package/dist/conduct-FZPUMPCI.js +25 -0
  25. package/dist/{conduct-VYYBCPHA.js → conduct-J2NXU6RM.js} +12 -9
  26. package/dist/{conductor-mode-SBDCRIX6.js → conductor-mode-HNNMWZIH.js} +11 -8
  27. package/dist/config-IRWLG6IW.js +12 -0
  28. package/dist/{execute-FZLQGIXB.js → execute-UAD5T3BQ.js} +1 -1
  29. package/dist/{execute-TEZPQ5WP.js → execute-UP46R7KS.js} +6 -5
  30. package/dist/index.js +34 -0
  31. package/dist/openclaw-setup-KA72IIEW.js +296 -0
  32. package/dist/openclaw-skills-CT673RBL.js +370 -0
  33. package/dist/{peers-K7FSHPN3.js → peers-F2EWUMVQ.js} +2 -2
  34. package/dist/{publish-capability-HVYILTPR.js → publish-capability-GNH5FHKG.js} +2 -2
  35. package/dist/{request-KJNKR27T.js → request-IM3ZLAOA.js} +13 -9
  36. package/dist/scanner-F5VNV5FP.js +8 -0
  37. package/dist/{serve-skill-GC6NIQ5T.js → serve-skill-6RKMVDMK.js} +6 -5
  38. package/dist/{server-6I7GU2OZ.js → server-MH7FTZFN.js} +11 -9
  39. package/dist/{service-coordinator-LZJCAQSJ.js → service-coordinator-R5LZVM6A.js} +31 -26
  40. package/dist/skills/agentbnb/bootstrap.js +34 -2
  41. package/dist/store-4Z446745.js +32 -0
  42. package/dist/writer-4QJ3U3WE.js +16 -0
  43. package/package.json +1 -1
  44. package/skills/agentbnb/bootstrap.ts +45 -2
  45. package/dist/conduct-4JDMWBQD.js +0 -22
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  executeCapabilityBatch,
36
36
  executeCapabilityRequest
37
- } from "../../chunk-QFPXZITP.js";
37
+ } from "../../chunk-PMRTQ2RL.js";
38
38
  import {
39
39
  bootstrapAgent,
40
40
  buildReputationMap,
@@ -91,6 +91,7 @@ import {
91
91
 
92
92
  // skills/agentbnb/bootstrap.ts
93
93
  import { join as join7, basename as basename2, dirname as dirname4 } from "path";
94
+ import { existsSync as existsSync8, writeFileSync as writeFileSync3 } from "fs";
94
95
  import { homedir as homedir4 } from "os";
95
96
  import { exec } from "child_process";
96
97
  import { promisify as promisify2 } from "util";
@@ -6654,7 +6655,7 @@ var ServiceCoordinator = class {
6654
6655
  }
6655
6656
  if (opts.registryUrl && opts.relay) {
6656
6657
  const { RelayClient: RelayClient2 } = await import("../../websocket-client-SNDF3B6N.js");
6657
- const { executeCapabilityRequest: executeCapabilityRequest2 } = await import("../../execute-FZLQGIXB.js");
6658
+ const { executeCapabilityRequest: executeCapabilityRequest2 } = await import("../../execute-UAD5T3BQ.js");
6658
6659
  const localCards = listCards(this.runtime.registryDb, this.config.owner);
6659
6660
  const { primaryCard, additionalCards } = buildRelayRegistrationCards(this.config.owner, localCards);
6660
6661
  if (this.config.conductor?.public) {
@@ -8198,6 +8199,24 @@ async function autoOnboard(configDir, deps = defaultDeps) {
8198
8199
  function quoteShellArg(input) {
8199
8200
  return `'${input.replace(/'/g, `'\\''`)}'`;
8200
8201
  }
8202
+ function writeBootstrapMd(bootstrapPath, configDir) {
8203
+ const content = [
8204
+ "# AgentBnB First-Run Setup",
8205
+ "",
8206
+ "Run this command to connect to the AgentBnB network:",
8207
+ "",
8208
+ "```bash",
8209
+ `AGENTBNB_DIR=${configDir} agentbnb openclaw setup`,
8210
+ "```",
8211
+ "",
8212
+ "After setup completes, delete this file and tell your owner:",
8213
+ `"AgentBnB setup complete! I'm now connected to the network."`,
8214
+ "",
8215
+ "---",
8216
+ "_Generated by AgentBnB bootstrap on first install._"
8217
+ ].join("\n");
8218
+ writeFileSync3(bootstrapPath, content, "utf-8");
8219
+ }
8201
8220
  async function activate(config = {}, _onboardDeps) {
8202
8221
  const debug = process.env["AGENTBNB_DEBUG"] === "1";
8203
8222
  if (config.agentDir) {
@@ -8224,6 +8243,19 @@ async function activate(config = {}, _onboardDeps) {
8224
8243
  }
8225
8244
  let agentConfig = loadConfig();
8226
8245
  if (!agentConfig) {
8246
+ const agentName = deriveAgentName(configDir);
8247
+ const brainsDir = join7(homedir4(), ".openclaw", "workspace", "brains");
8248
+ const brainDir = join7(brainsDir, agentName);
8249
+ if (existsSync8(brainDir)) {
8250
+ const bootstrapPath = join7(brainDir, "BOOTSTRAP.md");
8251
+ if (!existsSync8(bootstrapPath)) {
8252
+ try {
8253
+ writeBootstrapMd(bootstrapPath, configDir);
8254
+ if (debug) process.stderr.write("[agentbnb] Created BOOTSTRAP.md for first-run setup\n");
8255
+ } catch {
8256
+ }
8257
+ }
8258
+ }
8227
8259
  agentConfig = await autoOnboard(configDir, _onboardDeps);
8228
8260
  }
8229
8261
  if (debug) {
@@ -0,0 +1,32 @@
1
+ import {
2
+ attachCanonicalAgentId,
3
+ deleteCard,
4
+ getCard,
5
+ getCardsByCapabilityType,
6
+ getCardsBySkillCapability,
7
+ insertCard,
8
+ listCards,
9
+ openDatabase,
10
+ runMigrations,
11
+ updateCard,
12
+ updateReputation,
13
+ updateSkillAvailability,
14
+ updateSkillIdleRate
15
+ } from "./chunk-COA2D7QM.js";
16
+ import "./chunk-WTHMHNKC.js";
17
+ import "./chunk-I7KWA7OB.js";
18
+ export {
19
+ attachCanonicalAgentId,
20
+ deleteCard,
21
+ getCard,
22
+ getCardsByCapabilityType,
23
+ getCardsBySkillCapability,
24
+ insertCard,
25
+ listCards,
26
+ openDatabase,
27
+ runMigrations,
28
+ updateCard,
29
+ updateReputation,
30
+ updateSkillAvailability,
31
+ updateSkillIdleRate
32
+ };
@@ -0,0 +1,16 @@
1
+ import {
2
+ appendHeartbeatTradingSection,
3
+ appendSoulMdTradingSection,
4
+ appendToolsMdAgentBnB,
5
+ join,
6
+ updateSoulMdSkillsTable,
7
+ writeBootstrapMd
8
+ } from "./chunk-WPB5LFGI.js";
9
+ export {
10
+ appendHeartbeatTradingSection,
11
+ appendSoulMdTradingSection,
12
+ appendToolsMdAgentBnB,
13
+ join,
14
+ updateSoulMdSkillsTable,
15
+ writeBootstrapMd
16
+ };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "8.3.2",
6
+ "version": "8.4.1",
7
7
  "description": "P2P Agent Capability Sharing Protocol — Airbnb for AI agent pipelines",
8
8
  "type": "module",
9
9
  "main": "dist/index.js",
@@ -9,7 +9,7 @@
9
9
  */
10
10
 
11
11
  import { join, basename, dirname } from 'node:path';
12
- import { existsSync } from 'node:fs';
12
+ import { existsSync, writeFileSync } from 'node:fs';
13
13
  import { homedir } from 'node:os';
14
14
  import { exec } from 'node:child_process';
15
15
  import { promisify } from 'node:util';
@@ -284,6 +284,33 @@ function quoteShellArg(input: string): string {
284
284
  return `'${input.replace(/'/g, `'\\''`)}'`;
285
285
  }
286
286
 
287
+ /**
288
+ * Writes a BOOTSTRAP.md file to the agent's brain directory on first install.
289
+ * This file instructs the agent to run the setup wizard.
290
+ *
291
+ * @param bootstrapPath - Full path where BOOTSTRAP.md should be written.
292
+ * @param configDir - The AGENTBNB_DIR for this agent (used in the command).
293
+ */
294
+ function writeBootstrapMd(bootstrapPath: string, configDir: string): void {
295
+ const content = [
296
+ '# AgentBnB First-Run Setup',
297
+ '',
298
+ 'Run this command to connect to the AgentBnB network:',
299
+ '',
300
+ '```bash',
301
+ `AGENTBNB_DIR=${configDir} agentbnb openclaw setup`,
302
+ '```',
303
+ '',
304
+ 'After setup completes, delete this file and tell your owner:',
305
+ '"AgentBnB setup complete! I\'m now connected to the network."',
306
+ '',
307
+ '---',
308
+ '_Generated by AgentBnB bootstrap on first install._',
309
+ ].join('\n');
310
+
311
+ writeFileSync(bootstrapPath, content, 'utf-8');
312
+ }
313
+
287
314
  /**
288
315
  * Brings an AgentBnB node online (idempotent — safe to call when already running).
289
316
  * Registers SIGTERM/SIGINT handlers that conditionally stop the node on process exit.
@@ -322,7 +349,23 @@ export async function activate(config: BootstrapConfig = {}, _onboardDeps?: Onbo
322
349
 
323
350
  let agentConfig = loadConfig();
324
351
  if (!agentConfig) {
325
- // First-time setup: auto-onboard this agent onto the AgentBnB network.
352
+ // First-time setup: write BOOTSTRAP.md to brain dir so the agent sees instructions.
353
+ const agentName = deriveAgentName(configDir);
354
+ const brainsDir = join(homedir(), '.openclaw', 'workspace', 'brains');
355
+ const brainDir = join(brainsDir, agentName);
356
+ if (existsSync(brainDir)) {
357
+ const bootstrapPath = join(brainDir, 'BOOTSTRAP.md');
358
+ if (!existsSync(bootstrapPath)) {
359
+ try {
360
+ writeBootstrapMd(bootstrapPath, configDir);
361
+ if (debug) process.stderr.write('[agentbnb] Created BOOTSTRAP.md for first-run setup\n');
362
+ } catch {
363
+ // Non-fatal
364
+ }
365
+ }
366
+ }
367
+
368
+ // Auto-onboard this agent onto the AgentBnB network.
326
369
  agentConfig = await autoOnboard(configDir, _onboardDeps);
327
370
  }
328
371
 
@@ -1,22 +0,0 @@
1
- import {
2
- conductAction
3
- } from "./chunk-VJ7XBEY6.js";
4
- import "./chunk-7IQE34QK.js";
5
- import "./chunk-3MJT4PZG.js";
6
- import "./chunk-D242QZCR.js";
7
- import "./chunk-77KGEDH4.js";
8
- import "./chunk-S7DZHKCG.js";
9
- import "./chunk-F3KIEVJ2.js";
10
- import "./chunk-NX27AFPA.js";
11
- import "./chunk-PQIP7EXY.js";
12
- import "./chunk-YKMBFQC2.js";
13
- import "./chunk-GIEJVKZZ.js";
14
- import "./chunk-U6LP4KWN.js";
15
- import "./chunk-5AH3CMOX.js";
16
- import "./chunk-75OC6E4F.js";
17
- import "./chunk-5AIYALBX.js";
18
- import "./chunk-WTHMHNKC.js";
19
- import "./chunk-I7KWA7OB.js";
20
- export {
21
- conductAction
22
- };