agentbnb 4.0.0 → 4.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 (44) hide show
  1. package/README.md +2 -0
  2. package/dist/{card-IE5UV5QX.js → card-RSGDCHCV.js} +11 -4
  3. package/dist/chunk-3MJT4PZG.js +50 -0
  4. package/dist/{chunk-HEVXCYCY.js → chunk-4P3EMGL4.js} +61 -24
  5. package/dist/chunk-5AH3CMOX.js +62 -0
  6. package/dist/{chunk-QO67IGCW.js → chunk-5KFI5X7B.js} +1 -1
  7. package/dist/chunk-75OC6E4F.js +33 -0
  8. package/dist/{chunk-CUVIWPQO.js → chunk-7NA43XCG.js} +7 -6
  9. package/dist/{conduct-IQYAT6ZU.js → chunk-BH6WGYFB.js} +70 -33
  10. package/dist/{chunk-QVV2P3FN.js → chunk-DNWT5FZQ.js} +22 -2
  11. package/dist/chunk-FF226TIV.js +148 -0
  12. package/dist/{chunk-UJWYE7VL.js → chunk-GGYC5U2Z.js} +28 -111
  13. package/dist/chunk-HH24WMFN.js +373 -0
  14. package/dist/{websocket-client-5TIQDYQ4.js → chunk-JOY533UH.js} +38 -4
  15. package/dist/chunk-QITOPASZ.js +96 -0
  16. package/dist/{chunk-3Y36WQDV.js → chunk-QT7TEVNV.js} +14 -2
  17. package/dist/{chunk-UOGDK2S2.js → chunk-T7NS2J2B.js} +1 -1
  18. package/dist/{chunk-XA63SD4T.js → chunk-WGZ5AGOX.js} +37 -0
  19. package/dist/{chunk-RSX4SCPN.js → chunk-XND2DWTZ.js} +4 -3
  20. package/dist/cli/index.js +2924 -835
  21. package/dist/{client-IOTK6GOS.js → client-T5MTY3CS.js} +3 -3
  22. package/dist/conduct-GZQNFTRP.js +19 -0
  23. package/dist/conduct-N52JX7RT.js +52 -0
  24. package/dist/{conductor-mode-XU7ONJWC.js → conductor-mode-XUWGR4ZE.js} +16 -9
  25. package/dist/execute-PNGQOMYO.js +10 -0
  26. package/dist/index.d.ts +1148 -915
  27. package/dist/index.js +589 -127
  28. package/dist/{peers-G36URZYB.js → peers-K7FSHPN3.js} +2 -1
  29. package/dist/request-4GQSSM4B.js +196 -0
  30. package/dist/serve-skill-TPHZH6BS.js +104 -0
  31. package/dist/server-365V3GYD.js +295 -0
  32. package/dist/websocket-client-6IIDGXKB.js +7 -0
  33. package/package.json +3 -6
  34. package/skills/agentbnb/HEARTBEAT.rules.md +47 -0
  35. package/skills/agentbnb/SKILL.md +166 -0
  36. package/skills/agentbnb/auto-request.ts +14 -0
  37. package/skills/agentbnb/auto-share.ts +10 -0
  38. package/skills/agentbnb/bootstrap.test.ts +323 -0
  39. package/skills/agentbnb/bootstrap.ts +126 -0
  40. package/skills/agentbnb/credit-mgr.ts +11 -0
  41. package/skills/agentbnb/gateway.ts +12 -0
  42. package/skills/agentbnb/install.sh +210 -0
  43. package/dist/chunk-BEI5MTNZ.js +0 -91
  44. package/dist/execute-GDGBU6DJ.js +0 -10
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestCapability,
3
3
  requestViaRelay
4
- } from "./chunk-RSX4SCPN.js";
5
- import "./chunk-QO67IGCW.js";
6
- import "./chunk-XA63SD4T.js";
4
+ } from "./chunk-XND2DWTZ.js";
5
+ import "./chunk-5KFI5X7B.js";
6
+ import "./chunk-WGZ5AGOX.js";
7
7
  export {
8
8
  requestCapability,
9
9
  requestViaRelay
@@ -0,0 +1,19 @@
1
+ import {
2
+ conductAction
3
+ } from "./chunk-BH6WGYFB.js";
4
+ import "./chunk-4P3EMGL4.js";
5
+ import "./chunk-3MJT4PZG.js";
6
+ import "./chunk-GGYC5U2Z.js";
7
+ import "./chunk-FF226TIV.js";
8
+ import "./chunk-XND2DWTZ.js";
9
+ import "./chunk-5AH3CMOX.js";
10
+ import "./chunk-75OC6E4F.js";
11
+ import "./chunk-T7NS2J2B.js";
12
+ import "./chunk-DNWT5FZQ.js";
13
+ import "./chunk-5KFI5X7B.js";
14
+ import "./chunk-WGZ5AGOX.js";
15
+ import "./chunk-JOY533UH.js";
16
+ import "./chunk-QT7TEVNV.js";
17
+ export {
18
+ conductAction
19
+ };
@@ -0,0 +1,52 @@
1
+ import {
2
+ conductAction
3
+ } from "./chunk-BH6WGYFB.js";
4
+ import "./chunk-4P3EMGL4.js";
5
+ import "./chunk-3MJT4PZG.js";
6
+ import "./chunk-GGYC5U2Z.js";
7
+ import "./chunk-FF226TIV.js";
8
+ import "./chunk-XND2DWTZ.js";
9
+ import "./chunk-5AH3CMOX.js";
10
+ import "./chunk-75OC6E4F.js";
11
+ import "./chunk-T7NS2J2B.js";
12
+ import "./chunk-DNWT5FZQ.js";
13
+ import "./chunk-5KFI5X7B.js";
14
+ import "./chunk-WGZ5AGOX.js";
15
+ import "./chunk-JOY533UH.js";
16
+ import "./chunk-QT7TEVNV.js";
17
+
18
+ // src/mcp/tools/conduct.ts
19
+ import { z } from "zod";
20
+ var conductInputSchema = {
21
+ task: z.string().describe("Natural language task description"),
22
+ plan_only: z.boolean().optional().default(false).describe("If true, return execution plan without executing"),
23
+ max_budget: z.number().optional().default(100).describe("Maximum credits to spend")
24
+ };
25
+ async function handleConduct(args, _ctx) {
26
+ try {
27
+ const result = await conductAction(args.task, {
28
+ planOnly: args.plan_only ?? false,
29
+ maxBudget: String(args.max_budget ?? 100)
30
+ });
31
+ return {
32
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
33
+ };
34
+ } catch (err) {
35
+ const message = err instanceof Error ? err.message : "Unknown error during conduct";
36
+ return {
37
+ content: [{ type: "text", text: JSON.stringify({ success: false, error: message }) }]
38
+ };
39
+ }
40
+ }
41
+ function registerConductTool(server, ctx) {
42
+ server.registerTool("agentbnb_conduct", {
43
+ description: "Orchestrate a complex task across multiple agents on the AgentBnB network. Decomposes the task, matches sub-tasks to agents, and executes the pipeline.",
44
+ inputSchema: conductInputSchema
45
+ }, async (args) => {
46
+ return handleConduct(args, ctx);
47
+ });
48
+ }
49
+ export {
50
+ handleConduct,
51
+ registerConductTool
52
+ };
@@ -3,15 +3,18 @@ import {
3
3
  decompose,
4
4
  matchSubTasks,
5
5
  orchestrate
6
- } from "./chunk-HEVXCYCY.js";
6
+ } from "./chunk-4P3EMGL4.js";
7
+ import "./chunk-3MJT4PZG.js";
7
8
  import {
8
9
  BudgetManager
9
- } from "./chunk-UJWYE7VL.js";
10
- import "./chunk-RSX4SCPN.js";
11
- import "./chunk-BEI5MTNZ.js";
12
- import "./chunk-QVV2P3FN.js";
13
- import "./chunk-QO67IGCW.js";
14
- import "./chunk-XA63SD4T.js";
10
+ } from "./chunk-GGYC5U2Z.js";
11
+ import "./chunk-FF226TIV.js";
12
+ import "./chunk-XND2DWTZ.js";
13
+ import "./chunk-5AH3CMOX.js";
14
+ import "./chunk-75OC6E4F.js";
15
+ import "./chunk-DNWT5FZQ.js";
16
+ import "./chunk-5KFI5X7B.js";
17
+ import "./chunk-WGZ5AGOX.js";
15
18
 
16
19
  // src/conductor/conductor-mode.ts
17
20
  var ConductorMode = class {
@@ -36,7 +39,7 @@ var ConductorMode = class {
36
39
  * @param params - Must include `task` string.
37
40
  * @returns Execution result without latency_ms (added by SkillExecutor).
38
41
  */
39
- async execute(config, params) {
42
+ async execute(config, params, onProgress) {
40
43
  const conductorSkill = config.conductor_skill;
41
44
  if (conductorSkill !== "orchestrate" && conductorSkill !== "plan") {
42
45
  return {
@@ -58,11 +61,13 @@ var ConductorMode = class {
58
61
  error: "No template matches task"
59
62
  };
60
63
  }
61
- const matchResults = matchSubTasks({
64
+ onProgress?.({ step: 1, total: 5, message: `Decomposed into ${subtasks.length} sub-tasks` });
65
+ const matchResults = await matchSubTasks({
62
66
  db: this.db,
63
67
  subtasks,
64
68
  conductorOwner: this.conductorOwner
65
69
  });
70
+ onProgress?.({ step: 2, total: 5, message: `Matched ${matchResults.length} sub-tasks to agents` });
66
71
  const budgetManager = new BudgetManager(this.creditDb, this.conductorOwner);
67
72
  const budgetController = new BudgetController(budgetManager, this.maxBudget);
68
73
  const executionBudget = budgetController.calculateBudget(matchResults);
@@ -72,6 +77,7 @@ var ConductorMode = class {
72
77
  error: `Budget exceeded: estimated ${executionBudget.estimated_total} cr, max ${this.maxBudget} cr`
73
78
  };
74
79
  }
80
+ onProgress?.({ step: 3, total: 5, message: `Budget approved: ${executionBudget.estimated_total} cr` });
75
81
  if (conductorSkill === "plan") {
76
82
  return {
77
83
  success: true,
@@ -92,6 +98,7 @@ var ConductorMode = class {
92
98
  resolveAgentUrl: this.resolveAgentUrl,
93
99
  maxBudget: this.maxBudget
94
100
  });
101
+ onProgress?.({ step: 4, total: 5, message: "Pipeline execution complete" });
95
102
  const resultObj = {};
96
103
  for (const [key, value] of orchResult.results) {
97
104
  resultObj[key] = value;
@@ -0,0 +1,10 @@
1
+ import {
2
+ executeCapabilityRequest
3
+ } from "./chunk-7NA43XCG.js";
4
+ import "./chunk-T7NS2J2B.js";
5
+ import "./chunk-DNWT5FZQ.js";
6
+ import "./chunk-5KFI5X7B.js";
7
+ import "./chunk-WGZ5AGOX.js";
8
+ export {
9
+ executeCapabilityRequest
10
+ };