agentbnb 8.2.0 → 8.2.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 (38) hide show
  1. package/dist/{chunk-TBJ3FZKZ.js → chunk-7Q2XUXSA.js} +1 -1
  2. package/dist/{chunk-LJM7FHPM.js → chunk-BZOJ7HBT.js} +33 -1
  3. package/dist/{chunk-FTZTEHYG.js → chunk-DEWY7OQK.js} +135 -8
  4. package/dist/{chunk-CUONY5TO.js → chunk-EJKW57ZV.js} +19 -1
  5. package/dist/chunk-EZVOG7QS.js +161 -0
  6. package/dist/{chunk-E2OKP5CY.js → chunk-GJETGML6.js} +181 -83
  7. package/dist/{chunk-YHY7OG6S.js → chunk-GWMMYVLL.js} +4 -4
  8. package/dist/{chunk-D6RKW2XG.js → chunk-JLNHMNES.js} +16 -3
  9. package/dist/{chunk-5AAFG2V2.js → chunk-KBQNTUTN.js} +239 -24
  10. package/dist/{chunk-C537SFHV.js → chunk-LOUEJI6X.js} +4 -4
  11. package/dist/{chunk-ALX4WS3A.js → chunk-NP55V7RQ.js} +1 -1
  12. package/dist/{chunk-X32NE6V4.js → chunk-RBXTWWUH.js} +1 -1
  13. package/dist/{chunk-O2OYBAVR.js → chunk-SRBVKO2V.js} +9 -0
  14. package/dist/{chunk-7EF3HYVZ.js → chunk-STJLWMXH.js} +48 -4
  15. package/dist/{chunk-5GME4KJZ.js → chunk-UYCD3JBZ.js} +3 -3
  16. package/dist/{chunk-P4LOYSLA.js → chunk-WKWJWKX7.js} +286 -81
  17. package/dist/cli/index.js +35 -57
  18. package/dist/{client-HKV3QWZ3.js → client-66TFS7RS.js} +4 -2
  19. package/dist/{conduct-W6XF6DJW.js → conduct-A6COHLHY.js} +8 -8
  20. package/dist/{conduct-YB64OHI6.js → conduct-IUVAXUAV.js} +8 -8
  21. package/dist/{conductor-mode-TFCVCQHU.js → conductor-mode-D5TFQW5L.js} +2 -2
  22. package/dist/{conductor-mode-AKREGDIU.js → conductor-mode-L2MB44BW.js} +7 -7
  23. package/dist/{execute-AYQWORVH.js → execute-5AWLARB5.js} +5 -5
  24. package/dist/{execute-EPE6MZLT.js → execute-WOS457HW.js} +2 -2
  25. package/dist/index.js +438 -92
  26. package/dist/{publish-capability-AH2HDW54.js → publish-capability-JJCBBMSX.js} +2 -2
  27. package/dist/{request-HCCXSKAY.js → request-6YQLA7K3.js} +13 -8
  28. package/dist/{serve-skill-SZAQT5T5.js → serve-skill-X7TZSILV.js} +5 -5
  29. package/dist/{server-LMY2A3GT.js → server-5TSP4DBX.js} +10 -12
  30. package/dist/{service-coordinator-WGH6B2VT.js → service-coordinator-WTUSMPY6.js} +69 -46
  31. package/dist/skills/agentbnb/bootstrap.js +459 -189
  32. package/package.json +13 -17
  33. package/skills/agentbnb/bootstrap.test.ts +8 -6
  34. package/skills/agentbnb/bootstrap.ts +21 -13
  35. package/skills/agentbnb/install.sh +0 -0
  36. package/dist/chunk-64AK4FJM.js +0 -84
  37. package/dist/chunk-OH7BP5NP.js +0 -96
  38. package/dist/index.d.ts +0 -5069
package/dist/cli/index.js CHANGED
@@ -5,26 +5,26 @@ import {
5
5
  detectApiKeys,
6
6
  detectOpenPorts,
7
7
  discoverLocalAgents,
8
- getPricingStats
9
- } from "../chunk-FTZTEHYG.js";
10
- import {
11
- ensureIdentity
12
- } from "../chunk-OH7BP5NP.js";
8
+ getPricingStats,
9
+ resolveSelfCli
10
+ } from "../chunk-DEWY7OQK.js";
13
11
  import {
14
12
  releaseRequesterEscrow,
15
13
  settleRequesterEscrow
16
- } from "../chunk-X32NE6V4.js";
14
+ } from "../chunk-RBXTWWUH.js";
17
15
  import {
18
- createLedger
19
- } from "../chunk-5AAFG2V2.js";
16
+ createLedger,
17
+ ensureIdentity,
18
+ loadOrRepairIdentity
19
+ } from "../chunk-KBQNTUTN.js";
20
20
  import {
21
21
  parseSoulMd
22
- } from "../chunk-TBJ3FZKZ.js";
22
+ } from "../chunk-7Q2XUXSA.js";
23
23
  import {
24
24
  AutoRequestor,
25
25
  BudgetManager,
26
26
  DEFAULT_BUDGET_CONFIG
27
- } from "../chunk-5GME4KJZ.js";
27
+ } from "../chunk-UYCD3JBZ.js";
28
28
  import {
29
29
  fetchRemoteCards,
30
30
  mergeResults
@@ -35,7 +35,7 @@ import {
35
35
  import {
36
36
  filterCards,
37
37
  searchCards
38
- } from "../chunk-LJM7FHPM.js";
38
+ } from "../chunk-BZOJ7HBT.js";
39
39
  import {
40
40
  bootstrapAgent,
41
41
  createAgentRecord,
@@ -46,17 +46,17 @@ import {
46
46
  lookupAgentByOwner,
47
47
  migrateOwner,
48
48
  openCreditDb
49
- } from "../chunk-D6RKW2XG.js";
49
+ } from "../chunk-JLNHMNES.js";
50
50
  import "../chunk-NWIQJ2CL.js";
51
51
  import {
52
52
  requestCapability
53
- } from "../chunk-64AK4FJM.js";
53
+ } from "../chunk-EZVOG7QS.js";
54
54
  import {
55
55
  generateKeyPair,
56
56
  loadKeyPair,
57
57
  saveKeyPair,
58
58
  signEscrowReceipt
59
- } from "../chunk-CUONY5TO.js";
59
+ } from "../chunk-EJKW57ZV.js";
60
60
  import {
61
61
  findPeer,
62
62
  loadPeers,
@@ -74,7 +74,7 @@ import {
74
74
  insertCard,
75
75
  listCards,
76
76
  openDatabase
77
- } from "../chunk-O2OYBAVR.js";
77
+ } from "../chunk-SRBVKO2V.js";
78
78
  import {
79
79
  AgentBnBError,
80
80
  AnyCardSchema,
@@ -528,14 +528,7 @@ function getLanIp() {
528
528
  }
529
529
  function loadIdentityAuth(owner) {
530
530
  const configDir = getConfigDir();
531
- let keys;
532
- try {
533
- keys = loadKeyPair(configDir);
534
- } catch {
535
- keys = generateKeyPair();
536
- saveKeyPair(configDir, keys);
537
- }
538
- const identity = ensureIdentity(configDir, owner);
531
+ const { identity, keys } = loadOrRepairIdentity(configDir, owner);
539
532
  return {
540
533
  agentId: identity.agent_id,
541
534
  publicKey: identity.public_key,
@@ -563,15 +556,9 @@ async function performInit(opts) {
563
556
  ...existingConfig?.registry ? { registry: existingConfig.registry } : yesMode ? { registry: "https://agentbnb.fly.dev" } : {}
564
557
  };
565
558
  saveConfig(config);
566
- let keypairStatus = "existing";
567
- try {
568
- loadKeyPair(configDir);
569
- } catch {
570
- const keys = generateKeyPair();
571
- saveKeyPair(configDir, keys);
572
- keypairStatus = "generated";
573
- }
574
- const identity = ensureIdentity(configDir, owner);
559
+ const identityMaterial = loadOrRepairIdentity(configDir, owner);
560
+ const identity = identityMaterial.identity;
561
+ const keypairStatus = identityMaterial.status === "generated" ? "generated" : "existing";
575
562
  const creditDb = openCreditDb(creditDbPath);
576
563
  if (existingConfig?.owner && existingConfig.owner !== owner) {
577
564
  migrateOwner(creditDb, existingConfig.owner, owner);
@@ -802,7 +789,6 @@ Publish these ${card.skills.length} capabilities? [y/N] `);
802
789
  import { existsSync as existsSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "fs";
803
790
  import { join as join3 } from "path";
804
791
  import { homedir } from "os";
805
- import { execSync } from "child_process";
806
792
  var SKILLS_YAML_TEMPLATE = `skills:
807
793
  # General-purpose AI task execution via Claude Code CLI
808
794
  - id: claude-code-run
@@ -862,23 +848,12 @@ function registerMcpWithClaudeCode() {
862
848
  };
863
849
  }
864
850
  const settingsPath = join3(claudeDir, "settings.json");
865
- let agentbnbCommand = "agentbnb";
851
+ let agentbnbCommand;
866
852
  try {
867
- const resolved = execSync("which agentbnb", { encoding: "utf-8" }).trim();
868
- if (resolved) agentbnbCommand = resolved;
869
- } catch {
870
- try {
871
- const scriptPath = process.argv[1];
872
- if (scriptPath && existsSync3(scriptPath)) {
873
- agentbnbCommand = scriptPath;
874
- }
875
- } catch {
876
- }
877
- }
878
- if (agentbnbCommand === "agentbnb") {
879
- console.warn(
880
- "Warning: Could not resolve absolute path to agentbnb binary.\n Claude Code MCP may not work. Install globally first:\n npm install -g agentbnb"
881
- );
853
+ agentbnbCommand = resolveSelfCli();
854
+ } catch (err) {
855
+ const reason = err instanceof Error ? err.message : String(err);
856
+ return { registered: false, path: settingsPath, reason: `MCP registration skipped: ${reason}` };
882
857
  }
883
858
  let settings = {};
884
859
  if (existsSync3(settingsPath)) {
@@ -893,7 +868,10 @@ function registerMcpWithClaudeCode() {
893
868
  }
894
869
  }
895
870
  const mcpServers = settings.mcpServers ?? {};
896
- if (mcpServers.agentbnb) {
871
+ const existingEntry = mcpServers.agentbnb;
872
+ const existingCommand = typeof existingEntry?.command === "string" ? existingEntry.command : void 0;
873
+ const existingArgs = Array.isArray(existingEntry?.args) ? existingEntry.args : void 0;
874
+ if (existingCommand === agentbnbCommand && existingArgs?.length === 1 && existingArgs[0] === "mcp-server") {
897
875
  return { registered: false, path: settingsPath, reason: "already registered" };
898
876
  }
899
877
  mcpServers.agentbnb = {
@@ -944,7 +922,7 @@ Skills: ${skills.skillCount} skill(s) in ${skills.path}`);
944
922
  if (!skipServe) {
945
923
  try {
946
924
  const { ProcessGuard } = await import("../process-guard-GH5LRNWO.js");
947
- const { ServiceCoordinator } = await import("../service-coordinator-WGH6B2VT.js");
925
+ const { ServiceCoordinator } = await import("../service-coordinator-WTUSMPY6.js");
948
926
  const guard = new ProcessGuard(join3(initResult.configDir, ".pid"));
949
927
  const coordinator = new ServiceCoordinator(initResult.config, guard);
950
928
  const result = await coordinator.ensureRunning({
@@ -1006,7 +984,7 @@ Skills: ${skills.skillCount} skill(s) in ${skills.path}`);
1006
984
  }
1007
985
 
1008
986
  // src/cli/index.ts
1009
- var VERSION = "8.2.0";
987
+ var VERSION = "8.2.1";
1010
988
  function loadIdentityAuth2(owner) {
1011
989
  const configDir = getConfigDir();
1012
990
  let keys;
@@ -1187,7 +1165,7 @@ program.command("publish-skills").description("Publish capabilities from skills.
1187
1165
  process.exit(1);
1188
1166
  }
1189
1167
  const { parseSkillsFile } = await import("../skill-config-FETXPNVP.js");
1190
- const { skillConfigToSkill } = await import("../publish-capability-AH2HDW54.js");
1168
+ const { skillConfigToSkill } = await import("../publish-capability-JJCBBMSX.js");
1191
1169
  const skillsPath = typeof opts.fromSkills === "string" ? opts.fromSkills : "./skills.yaml";
1192
1170
  let yamlContent;
1193
1171
  try {
@@ -1721,7 +1699,7 @@ Batch Results (${res.results.length} items):`);
1721
1699
  };
1722
1700
  const tryViaRelay = async () => {
1723
1701
  const { RelayClient } = await import("../websocket-client-QOVARTRN.js");
1724
- const { requestViaRelay } = await import("../client-HKV3QWZ3.js");
1702
+ const { requestViaRelay } = await import("../client-66TFS7RS.js");
1725
1703
  const requesterId = `${config.owner}:req:${randomUUID4()}`;
1726
1704
  const tempRelay = new RelayClient({
1727
1705
  registryUrl: config.registry,
@@ -1851,7 +1829,7 @@ program.command("serve").description("Start the AgentBnB gateway server").option
1851
1829
  process.exit(1);
1852
1830
  }
1853
1831
  const { ProcessGuard } = await import("../process-guard-GH5LRNWO.js");
1854
- const { ServiceCoordinator } = await import("../service-coordinator-WGH6B2VT.js");
1832
+ const { ServiceCoordinator } = await import("../service-coordinator-WTUSMPY6.js");
1855
1833
  const port = opts.port ? parseInt(opts.port, 10) : config.gateway_port;
1856
1834
  const registryPort = parseInt(opts.registryPort, 10);
1857
1835
  if (!Number.isFinite(port) || !Number.isFinite(registryPort)) {
@@ -2225,7 +2203,7 @@ openclaw.command("rules").description("Print HEARTBEAT.md rules block (or inject
2225
2203
  }
2226
2204
  });
2227
2205
  program.command("conduct <task>").description("Orchestrate a complex task across the AgentBnB network").option("--plan-only", "Show execution plan without executing").option("--max-budget <credits>", "Maximum credits to spend", "100").option("--json", "Output as JSON").action(async (task, opts) => {
2228
- const { conductAction } = await import("../conduct-YB64OHI6.js");
2206
+ const { conductAction } = await import("../conduct-IUVAXUAV.js");
2229
2207
  const result = await conductAction(task, opts);
2230
2208
  if (opts.json) {
2231
2209
  console.log(JSON.stringify(result, null, 2));
@@ -2337,7 +2315,7 @@ Feedback for skill: ${opts.skill} (${feedbacks.length} entries)
2337
2315
  });
2338
2316
  program.command("quickstart").alias("qs").description("One-command setup: init + skills.yaml + MCP registration + serve daemon").option("--owner <name>", "Agent owner name").option("--port <port>", "Gateway port", "7700").option("--no-serve", "Skip starting background daemon").option("--no-mcp", "Skip MCP registration with Claude Code").option("--json", "Output as JSON").action(runQuickstart);
2339
2317
  program.command("mcp-server").description("Start an MCP (Model Context Protocol) server for IDE integration").action(async () => {
2340
- const { startMcpServer } = await import("../server-LMY2A3GT.js");
2318
+ const { startMcpServer } = await import("../server-5TSP4DBX.js");
2341
2319
  await startMcpServer();
2342
2320
  });
2343
2321
  await program.parseAsync(process.argv);
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  requestCapability,
3
+ requestCapabilityBatch,
3
4
  requestViaRelay
4
- } from "./chunk-64AK4FJM.js";
5
- import "./chunk-CUONY5TO.js";
5
+ } from "./chunk-EZVOG7QS.js";
6
+ import "./chunk-EJKW57ZV.js";
6
7
  import "./chunk-WVY2W7AA.js";
7
8
  export {
8
9
  requestCapability,
10
+ requestCapabilityBatch,
9
11
  requestViaRelay
10
12
  };
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  conductAction
3
- } from "./chunk-YHY7OG6S.js";
3
+ } from "./chunk-GWMMYVLL.js";
4
4
  import "./chunk-Z4MCGKTL.js";
5
5
  import "./chunk-SSK653A6.js";
6
- import "./chunk-E2OKP5CY.js";
6
+ import "./chunk-GJETGML6.js";
7
7
  import "./chunk-3MJT4PZG.js";
8
- import "./chunk-5GME4KJZ.js";
8
+ import "./chunk-UYCD3JBZ.js";
9
9
  import "./chunk-KF3TZHA5.js";
10
10
  import "./chunk-GKVTD4EZ.js";
11
- import "./chunk-LJM7FHPM.js";
12
- import "./chunk-D6RKW2XG.js";
11
+ import "./chunk-BZOJ7HBT.js";
12
+ import "./chunk-JLNHMNES.js";
13
13
  import "./chunk-NWIQJ2CL.js";
14
- import "./chunk-64AK4FJM.js";
15
- import "./chunk-CUONY5TO.js";
14
+ import "./chunk-EZVOG7QS.js";
15
+ import "./chunk-EJKW57ZV.js";
16
16
  import "./chunk-5AH3CMOX.js";
17
17
  import "./chunk-75OC6E4F.js";
18
- import "./chunk-O2OYBAVR.js";
18
+ import "./chunk-SRBVKO2V.js";
19
19
  import "./chunk-WVY2W7AA.js";
20
20
 
21
21
  // src/mcp/tools/conduct.ts
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  conductAction
3
- } from "./chunk-YHY7OG6S.js";
3
+ } from "./chunk-GWMMYVLL.js";
4
4
  import "./chunk-Z4MCGKTL.js";
5
5
  import "./chunk-SSK653A6.js";
6
- import "./chunk-E2OKP5CY.js";
6
+ import "./chunk-GJETGML6.js";
7
7
  import "./chunk-3MJT4PZG.js";
8
- import "./chunk-5GME4KJZ.js";
8
+ import "./chunk-UYCD3JBZ.js";
9
9
  import "./chunk-KF3TZHA5.js";
10
10
  import "./chunk-GKVTD4EZ.js";
11
- import "./chunk-LJM7FHPM.js";
12
- import "./chunk-D6RKW2XG.js";
11
+ import "./chunk-BZOJ7HBT.js";
12
+ import "./chunk-JLNHMNES.js";
13
13
  import "./chunk-NWIQJ2CL.js";
14
- import "./chunk-64AK4FJM.js";
15
- import "./chunk-CUONY5TO.js";
14
+ import "./chunk-EZVOG7QS.js";
15
+ import "./chunk-EJKW57ZV.js";
16
16
  import "./chunk-5AH3CMOX.js";
17
17
  import "./chunk-75OC6E4F.js";
18
- import "./chunk-O2OYBAVR.js";
18
+ import "./chunk-SRBVKO2V.js";
19
19
  import "./chunk-WVY2W7AA.js";
20
20
  export {
21
21
  conductAction
@@ -6,12 +6,12 @@ import {
6
6
  orchestrate,
7
7
  requestCapability,
8
8
  validateAndNormalizeSubtasks
9
- } from "./chunk-P4LOYSLA.js";
9
+ } from "./chunk-WKWJWKX7.js";
10
10
  import "./chunk-HLUEOLSZ.js";
11
11
  import {
12
12
  getCardsByCapabilityType,
13
13
  getCardsBySkillCapability
14
- } from "./chunk-7EF3HYVZ.js";
14
+ } from "./chunk-STJLWMXH.js";
15
15
  import "./chunk-NWIQJ2CL.js";
16
16
  import "./chunk-IVOYM3WG.js";
17
17
  import "./chunk-WVY2W7AA.js";
@@ -4,26 +4,26 @@ import {
4
4
  matchSubTasks,
5
5
  orchestrate,
6
6
  validateAndNormalizeSubtasks
7
- } from "./chunk-E2OKP5CY.js";
7
+ } from "./chunk-GJETGML6.js";
8
8
  import "./chunk-3MJT4PZG.js";
9
9
  import {
10
10
  BudgetManager
11
- } from "./chunk-5GME4KJZ.js";
11
+ } from "./chunk-UYCD3JBZ.js";
12
12
  import "./chunk-KF3TZHA5.js";
13
13
  import "./chunk-GKVTD4EZ.js";
14
- import "./chunk-LJM7FHPM.js";
15
- import "./chunk-D6RKW2XG.js";
14
+ import "./chunk-BZOJ7HBT.js";
15
+ import "./chunk-JLNHMNES.js";
16
16
  import "./chunk-NWIQJ2CL.js";
17
17
  import {
18
18
  requestCapability
19
- } from "./chunk-64AK4FJM.js";
20
- import "./chunk-CUONY5TO.js";
19
+ } from "./chunk-EZVOG7QS.js";
20
+ import "./chunk-EJKW57ZV.js";
21
21
  import "./chunk-5AH3CMOX.js";
22
22
  import "./chunk-75OC6E4F.js";
23
23
  import {
24
24
  getCardsByCapabilityType,
25
25
  getCardsBySkillCapability
26
- } from "./chunk-O2OYBAVR.js";
26
+ } from "./chunk-SRBVKO2V.js";
27
27
  import "./chunk-WVY2W7AA.js";
28
28
 
29
29
  // src/conductor/team-formation.ts
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  executeCapabilityBatch,
3
3
  executeCapabilityRequest
4
- } from "./chunk-C537SFHV.js";
5
- import "./chunk-X32NE6V4.js";
6
- import "./chunk-D6RKW2XG.js";
4
+ } from "./chunk-LOUEJI6X.js";
5
+ import "./chunk-RBXTWWUH.js";
6
+ import "./chunk-JLNHMNES.js";
7
7
  import "./chunk-NWIQJ2CL.js";
8
- import "./chunk-CUONY5TO.js";
8
+ import "./chunk-EJKW57ZV.js";
9
9
  import "./chunk-75OC6E4F.js";
10
- import "./chunk-O2OYBAVR.js";
10
+ import "./chunk-SRBVKO2V.js";
11
11
  import "./chunk-WVY2W7AA.js";
12
12
  export {
13
13
  executeCapabilityBatch,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  executeCapabilityBatch,
3
3
  executeCapabilityRequest
4
- } from "./chunk-ALX4WS3A.js";
5
- import "./chunk-7EF3HYVZ.js";
4
+ } from "./chunk-NP55V7RQ.js";
5
+ import "./chunk-STJLWMXH.js";
6
6
  import "./chunk-NWIQJ2CL.js";
7
7
  import "./chunk-IVOYM3WG.js";
8
8
  import "./chunk-WVY2W7AA.js";