agentbnb 4.0.0 → 4.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/{card-IE5UV5QX.js → card-4XH4AOTE.js} +11 -4
- package/dist/chunk-3MJT4PZG.js +50 -0
- package/dist/{conduct-IQYAT6ZU.js → chunk-3UKAVIMC.js} +70 -33
- package/dist/chunk-5AH3CMOX.js +62 -0
- package/dist/{chunk-UJWYE7VL.js → chunk-6K5WUVF3.js} +28 -111
- package/dist/chunk-75OC6E4F.js +33 -0
- package/dist/{chunk-QO67IGCW.js → chunk-DVAS2443.js} +1 -1
- package/dist/{chunk-XA63SD4T.js → chunk-FNKBHBYK.js} +3 -0
- package/dist/{websocket-client-5TIQDYQ4.js → chunk-JOY533UH.js} +38 -4
- package/dist/{chunk-RSX4SCPN.js → chunk-KJG2UJV5.js} +3 -3
- package/dist/chunk-M3G5NR2Z.js +90 -0
- package/dist/{chunk-HEVXCYCY.js → chunk-MQKYGY5I.js} +61 -24
- package/dist/chunk-ODBGCCEH.js +358 -0
- package/dist/{chunk-CUVIWPQO.js → chunk-Q7HRI666.js} +7 -6
- package/dist/chunk-QJEOCKVF.js +148 -0
- package/dist/{chunk-3Y36WQDV.js → chunk-QT7TEVNV.js} +14 -2
- package/dist/{chunk-UOGDK2S2.js → chunk-TLU7ALCZ.js} +1 -1
- package/dist/{chunk-QVV2P3FN.js → chunk-XQHN6ITI.js} +1 -1
- package/dist/cli/index.js +2665 -845
- package/dist/{client-IOTK6GOS.js → client-BTPIFY7E.js} +3 -3
- package/dist/conduct-CW62HBPT.js +52 -0
- package/dist/conduct-FXLVGKD5.js +19 -0
- package/dist/{conductor-mode-XU7ONJWC.js → conductor-mode-3JS4VWCR.js} +16 -9
- package/dist/execute-EXOITLHN.js +10 -0
- package/dist/index.d.ts +1005 -916
- package/dist/index.js +516 -120
- package/dist/{peers-G36URZYB.js → peers-K7FSHPN3.js} +2 -1
- package/dist/request-CNZ3XIVX.js +196 -0
- package/dist/serve-skill-SUOGUM7N.js +104 -0
- package/dist/server-2LWHL24P.js +295 -0
- package/dist/types-FGBUZ3QV.js +18 -0
- package/dist/websocket-client-6IIDGXKB.js +7 -0
- package/package.json +1 -1
- package/dist/chunk-BEI5MTNZ.js +0 -91
- package/dist/cli/index.d.ts +0 -1
- package/dist/execute-GDGBU6DJ.js +0 -10
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestCapability,
|
|
3
3
|
requestViaRelay
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-KJG2UJV5.js";
|
|
5
|
+
import "./chunk-DVAS2443.js";
|
|
6
|
+
import "./chunk-FNKBHBYK.js";
|
|
7
7
|
export {
|
|
8
8
|
requestCapability,
|
|
9
9
|
requestViaRelay
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
conductAction
|
|
3
|
+
} from "./chunk-3UKAVIMC.js";
|
|
4
|
+
import "./chunk-MQKYGY5I.js";
|
|
5
|
+
import "./chunk-3MJT4PZG.js";
|
|
6
|
+
import "./chunk-6K5WUVF3.js";
|
|
7
|
+
import "./chunk-QJEOCKVF.js";
|
|
8
|
+
import "./chunk-KJG2UJV5.js";
|
|
9
|
+
import "./chunk-5AH3CMOX.js";
|
|
10
|
+
import "./chunk-75OC6E4F.js";
|
|
11
|
+
import "./chunk-TLU7ALCZ.js";
|
|
12
|
+
import "./chunk-XQHN6ITI.js";
|
|
13
|
+
import "./chunk-DVAS2443.js";
|
|
14
|
+
import "./chunk-FNKBHBYK.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
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
conductAction
|
|
3
|
+
} from "./chunk-3UKAVIMC.js";
|
|
4
|
+
import "./chunk-MQKYGY5I.js";
|
|
5
|
+
import "./chunk-3MJT4PZG.js";
|
|
6
|
+
import "./chunk-6K5WUVF3.js";
|
|
7
|
+
import "./chunk-QJEOCKVF.js";
|
|
8
|
+
import "./chunk-KJG2UJV5.js";
|
|
9
|
+
import "./chunk-5AH3CMOX.js";
|
|
10
|
+
import "./chunk-75OC6E4F.js";
|
|
11
|
+
import "./chunk-TLU7ALCZ.js";
|
|
12
|
+
import "./chunk-XQHN6ITI.js";
|
|
13
|
+
import "./chunk-DVAS2443.js";
|
|
14
|
+
import "./chunk-FNKBHBYK.js";
|
|
15
|
+
import "./chunk-JOY533UH.js";
|
|
16
|
+
import "./chunk-QT7TEVNV.js";
|
|
17
|
+
export {
|
|
18
|
+
conductAction
|
|
19
|
+
};
|
|
@@ -3,15 +3,18 @@ import {
|
|
|
3
3
|
decompose,
|
|
4
4
|
matchSubTasks,
|
|
5
5
|
orchestrate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MQKYGY5I.js";
|
|
7
|
+
import "./chunk-3MJT4PZG.js";
|
|
7
8
|
import {
|
|
8
9
|
BudgetManager
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-6K5WUVF3.js";
|
|
11
|
+
import "./chunk-QJEOCKVF.js";
|
|
12
|
+
import "./chunk-KJG2UJV5.js";
|
|
13
|
+
import "./chunk-5AH3CMOX.js";
|
|
14
|
+
import "./chunk-75OC6E4F.js";
|
|
15
|
+
import "./chunk-XQHN6ITI.js";
|
|
16
|
+
import "./chunk-DVAS2443.js";
|
|
17
|
+
import "./chunk-FNKBHBYK.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
|
-
|
|
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;
|