agentbnb 4.0.2 → 5.1.0

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/README.md +31 -2
  2. package/dist/chunk-AUBHR7HH.js +25 -0
  3. package/dist/chunk-B5FTAGFN.js +393 -0
  4. package/dist/{chunk-GGYC5U2Z.js → chunk-BTTL24TZ.js} +29 -91
  5. package/dist/chunk-C6KPAFCC.js +387 -0
  6. package/dist/chunk-CRFCWD6V.js +366 -0
  7. package/dist/chunk-CSATDXZC.js +89 -0
  8. package/dist/{chunk-T7NS2J2B.js → chunk-DFBX3BBD.js} +84 -1
  9. package/dist/{chunk-DNWT5FZQ.js → chunk-EANI2N2V.js} +98 -1
  10. package/dist/{chunk-HH24WMFN.js → chunk-FLY3WIQR.js} +1 -1
  11. package/dist/chunk-HLUEOLSZ.js +62 -0
  12. package/dist/chunk-IVOYM3WG.js +25 -0
  13. package/dist/chunk-LCAIAAG2.js +916 -0
  14. package/dist/chunk-MLS6IGGG.js +294 -0
  15. package/dist/{chunk-4P3EMGL4.js → chunk-MNO4COST.js} +5 -3
  16. package/dist/chunk-NH2FIERR.js +138 -0
  17. package/dist/chunk-UKT6H7YT.js +29 -0
  18. package/dist/{chunk-BH6WGYFB.js → chunk-VE3E4AMH.js} +8 -8
  19. package/dist/{chunk-7NA43XCG.js → chunk-W5BZMKMF.js} +163 -29
  20. package/dist/{chunk-FF226TIV.js → chunk-ZX5623ER.js} +0 -57
  21. package/dist/cli/index.js +362 -4631
  22. package/dist/{conduct-N52JX7RT.js → conduct-KM6ZNJGE.js} +10 -8
  23. package/dist/{conduct-GZQNFTRP.js → conduct-WGTMQND5.js} +10 -8
  24. package/dist/{conductor-mode-XUWGR4ZE.js → conductor-mode-OL2FNOYY.js} +6 -4
  25. package/dist/conductor-mode-VRO7TYW2.js +592 -0
  26. package/dist/execute-CPFSOOO3.js +13 -0
  27. package/dist/execute-IP2QHALV.js +10 -0
  28. package/dist/index.d.ts +19 -8
  29. package/dist/index.js +190 -37
  30. package/dist/peers-CJ7T4RJO.js +13 -0
  31. package/dist/process-guard-CC7CNRQJ.js +176 -0
  32. package/dist/{request-4GQSSM4B.js → request-YOWPXVLQ.js} +13 -10
  33. package/dist/schema-7BSSLZ4S.js +8 -0
  34. package/dist/{serve-skill-TPHZH6BS.js → serve-skill-JHFNR7BW.js} +8 -7
  35. package/dist/{server-365V3GYD.js → server-HKJJWFRG.js} +10 -8
  36. package/dist/service-coordinator-5R4LQW6L.js +4917 -0
  37. package/dist/skills/agentbnb/bootstrap.js +6181 -0
  38. package/dist/websocket-client-WRN3HO73.js +6 -0
  39. package/openclaw.plugin.json +54 -0
  40. package/package.json +11 -2
  41. package/skills/agentbnb/SKILL.md +87 -70
  42. package/skills/agentbnb/bootstrap.test.ts +142 -242
  43. package/skills/agentbnb/bootstrap.ts +88 -95
  44. package/skills/agentbnb/install.sh +97 -27
  45. package/dist/execute-PNGQOMYO.js +0 -10
@@ -0,0 +1,62 @@
1
+ import {
2
+ getConfigDir
3
+ } from "./chunk-IVOYM3WG.js";
4
+
5
+ // src/cli/peers.ts
6
+ import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
7
+ import { join } from "path";
8
+ function getPeersPath() {
9
+ return join(getConfigDir(), "peers.json");
10
+ }
11
+ function loadPeers() {
12
+ const peersPath = getPeersPath();
13
+ if (!existsSync(peersPath)) {
14
+ return [];
15
+ }
16
+ try {
17
+ const raw = readFileSync(peersPath, "utf-8");
18
+ return JSON.parse(raw);
19
+ } catch {
20
+ return [];
21
+ }
22
+ }
23
+ function writePeers(peers) {
24
+ const dir = getConfigDir();
25
+ if (!existsSync(dir)) {
26
+ mkdirSync(dir, { recursive: true });
27
+ }
28
+ writeFileSync(getPeersPath(), JSON.stringify(peers, null, 2), "utf-8");
29
+ }
30
+ function savePeer(peer) {
31
+ const peers = loadPeers();
32
+ const lowerName = peer.name.toLowerCase();
33
+ const existing = peers.findIndex((p) => p.name.toLowerCase() === lowerName);
34
+ if (existing >= 0) {
35
+ peers[existing] = peer;
36
+ } else {
37
+ peers.push(peer);
38
+ }
39
+ writePeers(peers);
40
+ }
41
+ function removePeer(name) {
42
+ const peers = loadPeers();
43
+ const lowerName = name.toLowerCase();
44
+ const filtered = peers.filter((p) => p.name.toLowerCase() !== lowerName);
45
+ if (filtered.length === peers.length) {
46
+ return false;
47
+ }
48
+ writePeers(filtered);
49
+ return true;
50
+ }
51
+ function findPeer(name) {
52
+ const peers = loadPeers();
53
+ const lowerName = name.toLowerCase();
54
+ return peers.find((p) => p.name.toLowerCase() === lowerName) ?? null;
55
+ }
56
+
57
+ export {
58
+ loadPeers,
59
+ savePeer,
60
+ removePeer,
61
+ findPeer
62
+ };
@@ -0,0 +1,25 @@
1
+ // src/cli/config.ts
2
+ import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
3
+ import { homedir } from "os";
4
+ import { join } from "path";
5
+ function getConfigDir() {
6
+ return process.env["AGENTBNB_DIR"] ?? join(homedir(), ".agentbnb");
7
+ }
8
+ function getConfigPath() {
9
+ return join(getConfigDir(), "config.json");
10
+ }
11
+ function loadConfig() {
12
+ const configPath = getConfigPath();
13
+ if (!existsSync(configPath)) return null;
14
+ try {
15
+ const raw = readFileSync(configPath, "utf-8");
16
+ return JSON.parse(raw);
17
+ } catch {
18
+ return null;
19
+ }
20
+ }
21
+
22
+ export {
23
+ getConfigDir,
24
+ loadConfig
25
+ };