agentbnb 5.1.10 → 6.0.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 (49) hide show
  1. package/dist/{card-RSGDCHCV.js → card-REW7BSWW.js} +1 -1
  2. package/dist/{chunk-EPIWHNB2.js → chunk-2TLZ6G2B.js} +446 -373
  3. package/dist/{chunk-WGZ5AGOX.js → chunk-3CIMVISQ.js} +24 -1
  4. package/dist/{chunk-NH2FIERR.js → chunk-574W3HHE.js} +1 -1
  5. package/dist/{chunk-B5FTAGFN.js → chunk-7XHDSWRD.js} +75 -75
  6. package/dist/{chunk-NLAWT4DT.js → chunk-7YLFLC5C.js} +6 -6
  7. package/dist/chunk-BP3L2TET.js +148 -0
  8. package/dist/{chunk-EGUOAHCW.js → chunk-C2T4BMRW.js} +12 -12
  9. package/dist/{chunk-5KFI5X7B.js → chunk-F53QQIM2.js} +1 -1
  10. package/dist/chunk-JR6TJDIF.js +425 -0
  11. package/dist/{chunk-DFBX3BBD.js → chunk-KA2VIEGM.js} +211 -16
  12. package/dist/chunk-NQTE577Q.js +159 -0
  13. package/dist/{chunk-WTXRY7R2.js → chunk-NYV3NE5Z.js} +157 -9
  14. package/dist/{chunk-UKT6H7YT.js → chunk-OZXCRLP3.js} +1 -1
  15. package/dist/{chunk-QITOPASZ.js → chunk-PSQHUZ7X.js} +1 -1
  16. package/dist/{chunk-EANI2N2V.js → chunk-RVYQSC6L.js} +2 -99
  17. package/dist/{chunk-MLS6IGGG.js → chunk-TQDV254A.js} +1 -1
  18. package/dist/{chunk-QQFBFV4V.js → chunk-TR6UZDNX.js} +57 -18
  19. package/dist/{chunk-ZX5623ER.js → chunk-VMH2YS2I.js} +1 -1
  20. package/dist/{chunk-XND2DWTZ.js → chunk-VPQ44XKE.js} +2 -2
  21. package/dist/{chunk-CSATDXZC.js → chunk-Y7T6IMM3.js} +1 -1
  22. package/dist/{chunk-FLY3WIQR.js → chunk-YRRVFTDR.js} +3 -3
  23. package/dist/cli/index.js +261 -125
  24. package/dist/{client-T5MTY3CS.js → client-HRYRJKSA.js} +3 -3
  25. package/dist/{conduct-WU3VEXB6.js → conduct-LF6FYPLD.js} +11 -11
  26. package/dist/conduct-QAFZIEY6.js +21 -0
  27. package/dist/{conductor-mode-ZMTFZGJP.js → conductor-mode-NUDQLZFM.js} +309 -13
  28. package/dist/conductor-mode-YQ6QSPPT.js +275 -0
  29. package/dist/{execute-4D4ITQCL.js → execute-ITHIYYOX.js} +4 -3
  30. package/dist/execute-PNJFABVJ.js +14 -0
  31. package/dist/index.d.ts +555 -0
  32. package/dist/index.js +592 -83
  33. package/dist/{process-guard-CC7CNRQJ.js → process-guard-QCCBGILS.js} +1 -1
  34. package/dist/publish-capability-TS6CNR5G.js +12 -0
  35. package/dist/{request-VOXBFUOG.js → request-P6QCTCCG.js} +14 -14
  36. package/dist/{serve-skill-IH7UAJNR.js → serve-skill-EZOL7UYN.js} +10 -9
  37. package/dist/{server-JVQW2TID.js → server-3G6ZTASA.js} +16 -16
  38. package/dist/{service-coordinator-EYRDTHL5.js → service-coordinator-CRSE4GWC.js} +174 -242
  39. package/dist/skill-config-4W5W5O6T.js +22 -0
  40. package/dist/skills/agentbnb/bootstrap.js +227 -67
  41. package/openclaw.plugin.json +1 -1
  42. package/package.json +1 -1
  43. package/skills/agentbnb/SKILL.md +50 -1
  44. package/skills/agentbnb/bootstrap.ts +126 -8
  45. package/skills/agentbnb/install.sh +49 -9
  46. package/dist/chunk-CRFCWD6V.js +0 -366
  47. package/dist/conduct-6LKIJJKQ.js +0 -21
  48. package/dist/conductor-mode-Q4IIDY5E.js +0 -123
  49. package/dist/execute-T7Y6RKSW.js +0 -13
@@ -1,123 +0,0 @@
1
- import {
2
- BudgetController,
3
- decompose,
4
- matchSubTasks,
5
- orchestrate
6
- } from "./chunk-WTXRY7R2.js";
7
- import "./chunk-3MJT4PZG.js";
8
- import {
9
- BudgetManager
10
- } from "./chunk-EGUOAHCW.js";
11
- import "./chunk-CSATDXZC.js";
12
- import "./chunk-ZX5623ER.js";
13
- import "./chunk-NH2FIERR.js";
14
- import "./chunk-XND2DWTZ.js";
15
- import "./chunk-5AH3CMOX.js";
16
- import "./chunk-75OC6E4F.js";
17
- import "./chunk-EANI2N2V.js";
18
- import "./chunk-5KFI5X7B.js";
19
- import "./chunk-WGZ5AGOX.js";
20
-
21
- // src/conductor/conductor-mode.ts
22
- var ConductorMode = class {
23
- db;
24
- creditDb;
25
- conductorOwner;
26
- gatewayToken;
27
- resolveAgentUrl;
28
- maxBudget;
29
- constructor(opts) {
30
- this.db = opts.db;
31
- this.creditDb = opts.creditDb;
32
- this.conductorOwner = opts.conductorOwner;
33
- this.gatewayToken = opts.gatewayToken;
34
- this.resolveAgentUrl = opts.resolveAgentUrl;
35
- this.maxBudget = opts.maxBudget ?? 100;
36
- }
37
- /**
38
- * Execute a conductor skill with the given config and params.
39
- *
40
- * @param config - SkillConfig with type 'conductor' and conductor_skill field.
41
- * @param params - Must include `task` string.
42
- * @returns Execution result without latency_ms (added by SkillExecutor).
43
- */
44
- async execute(config, params, onProgress) {
45
- const conductorSkill = config.conductor_skill;
46
- if (conductorSkill !== "orchestrate" && conductorSkill !== "plan") {
47
- return {
48
- success: false,
49
- error: `Unknown conductor skill: "${conductorSkill}"`
50
- };
51
- }
52
- const task = params.task;
53
- if (typeof task !== "string" || task.length === 0) {
54
- return {
55
- success: false,
56
- error: 'Missing or empty "task" parameter'
57
- };
58
- }
59
- const subtasks = decompose(task);
60
- if (subtasks.length === 0) {
61
- return {
62
- success: false,
63
- error: "No template matches task"
64
- };
65
- }
66
- onProgress?.({ step: 1, total: 5, message: `Decomposed into ${subtasks.length} sub-tasks` });
67
- const matchResults = await matchSubTasks({
68
- db: this.db,
69
- subtasks,
70
- conductorOwner: this.conductorOwner
71
- });
72
- onProgress?.({ step: 2, total: 5, message: `Matched ${matchResults.length} sub-tasks to agents` });
73
- const budgetManager = new BudgetManager(this.creditDb, this.conductorOwner);
74
- const budgetController = new BudgetController(budgetManager, this.maxBudget);
75
- const executionBudget = budgetController.calculateBudget(matchResults);
76
- if (!budgetController.canExecute(executionBudget)) {
77
- return {
78
- success: false,
79
- error: `Budget exceeded: estimated ${executionBudget.estimated_total} cr, max ${this.maxBudget} cr`
80
- };
81
- }
82
- onProgress?.({ step: 3, total: 5, message: `Budget approved: ${executionBudget.estimated_total} cr` });
83
- if (conductorSkill === "plan") {
84
- return {
85
- success: true,
86
- result: {
87
- subtasks,
88
- matches: matchResults,
89
- budget: executionBudget
90
- }
91
- };
92
- }
93
- const matchMap = new Map(
94
- matchResults.map((m) => [m.subtask_id, m])
95
- );
96
- const orchResult = await orchestrate({
97
- subtasks,
98
- matches: matchMap,
99
- gatewayToken: this.gatewayToken,
100
- resolveAgentUrl: this.resolveAgentUrl,
101
- maxBudget: this.maxBudget
102
- });
103
- onProgress?.({ step: 4, total: 5, message: "Pipeline execution complete" });
104
- const resultObj = {};
105
- for (const [key, value] of orchResult.results) {
106
- resultObj[key] = value;
107
- }
108
- return {
109
- success: orchResult.success,
110
- result: {
111
- plan: subtasks,
112
- execution: resultObj,
113
- total_credits: orchResult.total_credits,
114
- latency_ms: orchResult.latency_ms,
115
- errors: orchResult.errors
116
- },
117
- error: orchResult.success ? void 0 : orchResult.errors?.join("; ")
118
- };
119
- }
120
- };
121
- export {
122
- ConductorMode
123
- };
@@ -1,13 +0,0 @@
1
- import {
2
- executeCapabilityBatch,
3
- executeCapabilityRequest
4
- } from "./chunk-QQFBFV4V.js";
5
- import "./chunk-UKT6H7YT.js";
6
- import "./chunk-DFBX3BBD.js";
7
- import "./chunk-EANI2N2V.js";
8
- import "./chunk-5KFI5X7B.js";
9
- import "./chunk-WGZ5AGOX.js";
10
- export {
11
- executeCapabilityBatch,
12
- executeCapabilityRequest
13
- };