agentbnb 9.0.0 → 9.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 (30) hide show
  1. package/dist/{chunk-27VHBFUP.js → chunk-2SOHHB2O.js} +4 -4
  2. package/dist/{chunk-NZTLBAML.js → chunk-74OZGLIT.js} +1 -1
  3. package/dist/{chunk-BOBND3QV.js → chunk-76YORWFJ.js} +3 -3
  4. package/dist/{chunk-D4IJQ3TK.js → chunk-7S4ZLFVI.js} +0 -73
  5. package/dist/{chunk-UIPGGNRC.js → chunk-ERT77HKY.js} +1 -1
  6. package/dist/{chunk-W5J3PEQ6.js → chunk-FMKBCO2Q.js} +2 -2
  7. package/dist/{chunk-2GWOFP24.js → chunk-FUGWPKXN.js} +1 -1
  8. package/dist/{chunk-AZEGOADG.js → chunk-I3RRMAAD.js} +3 -3
  9. package/dist/chunk-QEDVPJKP.js +203 -0
  10. package/dist/{chunk-4FK45WJI.js → chunk-SMQDT7CT.js} +2 -2
  11. package/dist/chunk-TA73FIZU.js +75 -0
  12. package/dist/{chunk-LLL3KYEM.js → chunk-UQCQ2JCG.js} +5 -3
  13. package/dist/{chunk-TLT6F35V.js → chunk-YJ3RGKPU.js} +1 -1
  14. package/dist/{chunk-P3FDT7G5.js → chunk-Z4IDXMSP.js} +0 -200
  15. package/dist/cli/index.js +106 -29
  16. package/dist/{conduct-4NPMP4GL.js → conduct-UAEEMVFD.js} +7 -6
  17. package/dist/{conduct-5FTKINWU.js → conduct-URYWMA5T.js} +7 -6
  18. package/dist/{conductor-mode-ZWC5BZUL.js → conductor-mode-2UFN6BUL.js} +6 -5
  19. package/dist/credits-action-24EPLUHG.js +148 -0
  20. package/dist/daemon-A7DXZIQW.js +188 -0
  21. package/dist/{execute-JTPFFEH6.js → execute-2Z3XIUHR.js} +6 -5
  22. package/dist/{openclaw-setup-HVEVSKXQ.js → openclaw-setup-WA625DZA.js} +9 -8
  23. package/dist/{openclaw-skills-QLC4D6DZ.js → openclaw-skills-76ZWXHFM.js} +53 -36
  24. package/dist/{request-WX3VLXBT.js → request-KPKWBL5W.js} +5 -4
  25. package/dist/{serve-skill-C7JU24CF.js → serve-skill-QSUIK3ZF.js} +6 -5
  26. package/dist/{server-Z6P3AHKN.js → server-TGV2OPUM.js} +10 -8
  27. package/dist/{service-coordinator-PLUPMPSC.js → service-coordinator-4JAUUNUL.js} +32 -12
  28. package/dist/skills/agentbnb/bootstrap.js +16 -0
  29. package/package.json +1 -1
  30. package/skills/agentbnb/SKILL.md +46 -1
@@ -4,9 +4,6 @@ import {
4
4
  migrateCreditOwnerData,
5
5
  recordSuccessfulHire
6
6
  } from "./chunk-YDGXKH2T.js";
7
- import {
8
- getFeedbackForProvider
9
- } from "./chunk-NLQCHO7N.js";
10
7
  import {
11
8
  ensureAgentsTable
12
9
  } from "./chunk-J4RFJVXI.js";
@@ -164,199 +161,6 @@ function migrateOwner(db, oldOwner, newOwner) {
164
161
  migrateCreditOwnerData(db, oldOwner, canonicalNewOwner);
165
162
  }
166
163
 
167
- // src/feedback/reputation.ts
168
- var QUALITY_SCORES = {
169
- excellent: 1,
170
- good: 0.8,
171
- acceptable: 0.6,
172
- poor: 0.3,
173
- failed: 0
174
- };
175
- var COST_VALUE_SCORES = {
176
- great: 1,
177
- fair: 0.6,
178
- overpriced: 0.2
179
- };
180
- var DECAY_DAYS = 30;
181
- var WEIGHTS = {
182
- rating: 0.4,
183
- quality: 0.3,
184
- would_reuse: 0.2,
185
- cost_value: 0.1
186
- };
187
- function computeReputation(feedbacks) {
188
- if (feedbacks.length === 0) return 0.5;
189
- const now = Date.now();
190
- let weightedSum = 0;
191
- let totalWeight = 0;
192
- for (const fb of feedbacks) {
193
- const feedbackDate = new Date(fb.timestamp).getTime();
194
- const ageDays = Math.max(0, (now - feedbackDate) / (1e3 * 60 * 60 * 24));
195
- const recencyWeight = Math.exp(-ageDays / DECAY_DAYS);
196
- const ratingScore = (fb.rating - 1) / 4;
197
- const qualityScore = QUALITY_SCORES[fb.result_quality];
198
- const reuseScore = fb.would_reuse ? 1 : 0;
199
- const costScore = COST_VALUE_SCORES[fb.cost_value_ratio];
200
- const componentScore = WEIGHTS.rating * ratingScore + WEIGHTS.quality * qualityScore + WEIGHTS.would_reuse * reuseScore + WEIGHTS.cost_value * costScore;
201
- weightedSum += recencyWeight * componentScore;
202
- totalWeight += recencyWeight;
203
- }
204
- if (totalWeight === 0) return 0.5;
205
- const raw = weightedSum / totalWeight;
206
- return Math.max(0, Math.min(1, raw));
207
- }
208
- function getReputationScore(db, agentId) {
209
- const feedbacks = getFeedbackForProvider(db, agentId);
210
- return computeReputation(feedbacks);
211
- }
212
-
213
- // src/registry/matcher.ts
214
- var CACHE_MAX_ENTRIES = 100;
215
- var CACHE_TTL_MS = 3e4;
216
- var dbCaches = /* @__PURE__ */ new WeakMap();
217
- function getDbCache(db) {
218
- let cache = dbCaches.get(db);
219
- if (!cache) {
220
- cache = /* @__PURE__ */ new Map();
221
- dbCaches.set(db, cache);
222
- }
223
- return cache;
224
- }
225
- function cacheKey(query, filters) {
226
- return `${query}|${filters.level ?? ""}|${filters.online ?? ""}|${(filters.apis_used ?? []).join(",")}|${filters.min_reputation ?? ""}`;
227
- }
228
- function evictCache(cache) {
229
- const now = Date.now();
230
- for (const [key, entry] of cache) {
231
- if (entry.expiresAt <= now) cache.delete(key);
232
- }
233
- while (cache.size > CACHE_MAX_ENTRIES) {
234
- const firstKey = cache.keys().next().value;
235
- cache.delete(firstKey);
236
- }
237
- }
238
- function searchCards(db, query, filters = {}) {
239
- const cache = getDbCache(db);
240
- const key = cacheKey(query, filters);
241
- const cached = cache.get(key);
242
- if (cached && cached.expiresAt > Date.now()) {
243
- return cached.results;
244
- }
245
- const trimmedQuery = query.trim();
246
- const exactSkillMatches = findCardsByExactSkillId(db, trimmedQuery, filters);
247
- const words = query.trim().split(/\s+/).map((w) => w.replace(/["*^{}():]/g, "")).filter((w) => w.length > 0);
248
- if (words.length === 0) {
249
- return exactSkillMatches;
250
- }
251
- const ftsQuery = words.map((w) => `"${w}"`).join(" OR ");
252
- const conditions = [];
253
- const params = [ftsQuery];
254
- if (filters.level !== void 0) {
255
- conditions.push(`json_extract(cc.data, '$.level') = ?`);
256
- params.push(filters.level);
257
- }
258
- if (filters.online !== void 0) {
259
- conditions.push(`json_extract(cc.data, '$.availability.online') = ?`);
260
- params.push(filters.online ? 1 : 0);
261
- }
262
- const whereClause = conditions.length > 0 ? `AND ${conditions.join(" AND ")}` : "";
263
- const sql = `
264
- SELECT cc.data
265
- FROM capability_cards cc
266
- JOIN cards_fts ON cc.rowid = cards_fts.rowid
267
- WHERE cards_fts MATCH ?
268
- ${whereClause}
269
- ORDER BY bm25(cards_fts)
270
- LIMIT 50
271
- `;
272
- const stmt = db.prepare(sql);
273
- const rows = stmt.all(...params);
274
- const results = rows.map((row) => JSON.parse(row.data));
275
- const mergedResults = mergeByCardId(exactSkillMatches, results);
276
- let filtered = mergedResults;
277
- if (filters.apis_used && filters.apis_used.length > 0) {
278
- const requiredApis = filters.apis_used;
279
- filtered = filtered.filter((card) => {
280
- const cardApis = card.metadata?.apis_used ?? [];
281
- return requiredApis.every((api) => cardApis.includes(api));
282
- });
283
- }
284
- if (filters.min_reputation !== void 0 && filters.min_reputation > 0) {
285
- filtered = applyReputationFilter(db, filtered, filters.min_reputation);
286
- }
287
- evictCache(cache);
288
- cache.set(key, { results: filtered, expiresAt: Date.now() + CACHE_TTL_MS });
289
- return filtered;
290
- }
291
- function mergeByCardId(primary, secondary) {
292
- const seen = /* @__PURE__ */ new Set();
293
- const merged = [];
294
- for (const card of primary) {
295
- if (seen.has(card.id)) continue;
296
- seen.add(card.id);
297
- merged.push(card);
298
- }
299
- for (const card of secondary) {
300
- if (seen.has(card.id)) continue;
301
- seen.add(card.id);
302
- merged.push(card);
303
- }
304
- return merged;
305
- }
306
- function findCardsByExactSkillId(db, query, filters) {
307
- if (query.length === 0) return [];
308
- const rows = db.prepare("SELECT data FROM capability_cards").all();
309
- const cards = rows.map((row) => JSON.parse(row.data));
310
- return cards.filter((card) => {
311
- if (filters.level !== void 0 && card.level !== filters.level) return false;
312
- if (filters.online !== void 0 && card.availability?.online !== filters.online) return false;
313
- const asRecord = card;
314
- const skills = asRecord["skills"];
315
- if (!Array.isArray(skills)) return false;
316
- return skills.some((skill) => String(skill["id"] ?? "") === query);
317
- });
318
- }
319
- function filterCards(db, filters) {
320
- const conditions = [];
321
- const params = [];
322
- if (filters.level !== void 0) {
323
- conditions.push(`json_extract(data, '$.level') = ?`);
324
- params.push(filters.level);
325
- }
326
- if (filters.online !== void 0) {
327
- conditions.push(`json_extract(data, '$.availability.online') = ?`);
328
- params.push(filters.online ? 1 : 0);
329
- }
330
- const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
331
- const sql = `SELECT data FROM capability_cards ${whereClause}`;
332
- const stmt = db.prepare(sql);
333
- const rows = stmt.all(...params);
334
- let cards = rows.map((row) => JSON.parse(row.data));
335
- if (filters.min_reputation !== void 0 && filters.min_reputation > 0) {
336
- cards = applyReputationFilter(db, cards, filters.min_reputation);
337
- }
338
- return cards;
339
- }
340
- function applyReputationFilter(db, cards, minReputation) {
341
- const owners = [...new Set(cards.map((c) => c.owner))];
342
- const reputationMap = /* @__PURE__ */ new Map();
343
- for (const owner of owners) {
344
- reputationMap.set(owner, getReputationScore(db, owner));
345
- }
346
- return cards.filter((card) => {
347
- const score = reputationMap.get(card.owner) ?? 0.5;
348
- return score >= minReputation;
349
- });
350
- }
351
- function buildReputationMap(db, owners) {
352
- const unique = [...new Set(owners)];
353
- const map = /* @__PURE__ */ new Map();
354
- for (const owner of unique) {
355
- map.set(owner, getReputationScore(db, owner));
356
- }
357
- return map;
358
- }
359
-
360
164
  // src/credit/escrow.ts
361
165
  import { randomUUID as randomUUID2 } from "crypto";
362
166
  var NETWORK_FEE_RATE = 0.05;
@@ -537,10 +341,6 @@ export {
537
341
  getBalance,
538
342
  getTransactions,
539
343
  migrateOwner,
540
- computeReputation,
541
- searchCards,
542
- filterCards,
543
- buildReputationMap,
544
344
  holdEscrow,
545
345
  markEscrowStarted,
546
346
  markEscrowProgressing,
package/dist/cli/index.js CHANGED
@@ -5,47 +5,52 @@ import {
5
5
  injectHeartbeatSection,
6
6
  performInit,
7
7
  publishFromSoulV2
8
- } from "../chunk-27VHBFUP.js";
8
+ } from "../chunk-2SOHHB2O.js";
9
+ import "../chunk-RJNKX347.js";
9
10
  import {
10
11
  AutoRequestor,
11
12
  requestViaTemporaryRelay
12
- } from "../chunk-LLL3KYEM.js";
13
+ } from "../chunk-UQCQ2JCG.js";
13
14
  import {
14
15
  BudgetManager,
15
16
  DEFAULT_BUDGET_CONFIG
16
- } from "../chunk-TLT6F35V.js";
17
+ } from "../chunk-YJ3RGKPU.js";
18
+ import {
19
+ discoverLocalAgents
20
+ } from "../chunk-TA73FIZU.js";
17
21
  import {
18
- discoverLocalAgents,
19
22
  resolveSelfCli
20
- } from "../chunk-D4IJQ3TK.js";
23
+ } from "../chunk-7S4ZLFVI.js";
21
24
  import {
22
25
  getPricingStats
23
- } from "../chunk-2GWOFP24.js";
26
+ } from "../chunk-FUGWPKXN.js";
24
27
  import "../chunk-5PV5YCSN.js";
25
28
  import {
26
29
  DEFAULT_AUTONOMY_CONFIG
27
30
  } from "../chunk-G5WKW3ED.js";
28
31
  import {
29
32
  syncCreditsFromRegistry
30
- } from "../chunk-W5J3PEQ6.js";
33
+ } from "../chunk-FMKBCO2Q.js";
31
34
  import {
32
35
  createLedger
33
- } from "../chunk-NZTLBAML.js";
36
+ } from "../chunk-74OZGLIT.js";
34
37
  import {
35
38
  ensureIdentity
36
39
  } from "../chunk-5CC6O6SO.js";
37
- import "../chunk-UIPGGNRC.js";
40
+ import "../chunk-ERT77HKY.js";
38
41
  import {
39
42
  fetchRemoteCards,
40
43
  mergeResults
41
44
  } from "../chunk-ELFGYC22.js";
42
45
  import {
43
46
  filterCards,
47
+ searchCards
48
+ } from "../chunk-QEDVPJKP.js";
49
+ import {
44
50
  getBalance,
45
51
  getTransactions,
46
- openCreditDb,
47
- searchCards
48
- } from "../chunk-P3FDT7G5.js";
52
+ openCreditDb
53
+ } from "../chunk-Z4IDXMSP.js";
49
54
  import "../chunk-UR3MISL2.js";
50
55
  import "../chunk-3466S65P.js";
51
56
  import {
@@ -84,7 +89,7 @@ import {
84
89
 
85
90
  // src/cli/index.ts
86
91
  import { Command } from "commander";
87
- import { readFileSync as readFileSync2 } from "fs";
92
+ import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
88
93
  import { randomUUID } from "crypto";
89
94
  import { join as join2 } from "path";
90
95
  import { networkInterfaces } from "os";
@@ -232,7 +237,7 @@ Skills: ${skills2.skillCount} skill(s) in ${skills2.path}`);
232
237
  if (!skipServe) {
233
238
  try {
234
239
  const { ProcessGuard } = await import("../process-guard-QDBIOLY4.js");
235
- const { ServiceCoordinator } = await import("../service-coordinator-PLUPMPSC.js");
240
+ const { ServiceCoordinator } = await import("../service-coordinator-4JAUUNUL.js");
236
241
  const guard = new ProcessGuard(join(initResult.configDir, ".pid"));
237
242
  const coordinator = new ServiceCoordinator(initResult.config, guard);
238
243
  const result = await coordinator.ensureRunning({
@@ -294,7 +299,7 @@ Skills: ${skills2.skillCount} skill(s) in ${skills2.path}`);
294
299
  }
295
300
 
296
301
  // src/cli/index.ts
297
- var VERSION = true ? "9.0.0" : "0.0.0-dev";
302
+ var VERSION = true ? "9.0.2" : "0.0.0-dev";
298
303
  function loadIdentityAuth(owner) {
299
304
  const configDir = getConfigDir();
300
305
  let keys;
@@ -1111,14 +1116,46 @@ Active Escrows (${heldEscrows.length}):`);
1111
1116
  }
1112
1117
  }
1113
1118
  });
1114
- program.command("serve").description("Start the AgentBnB gateway server").option("--port <port>", "Port to listen on (overrides config)").option("--handler-url <url>", "Local capability handler URL", "http://localhost:8080").option("--skills-yaml <path>", "Path to skills.yaml (default: ~/.agentbnb/skills.yaml)").option("--registry-port <port>", "Public registry API port (0 to disable)", "7701").option("--registry <url>", "Connect to remote registry via WebSocket relay (e.g., hub.agentbnb.dev)").option("--conductor", "Enable Conductor orchestration mode").option("--announce", "Announce this gateway on the local network via mDNS").option("--no-relay", "Do not auto-connect to remote registry relay").action(async (opts) => {
1119
+ program.command("serve").description("Start the AgentBnB gateway server").option("--port <port>", "Port to listen on (overrides config)").option("--handler-url <url>", "Local capability handler URL", "http://localhost:8080").option("--skills-yaml <path>", "Path to skills.yaml (default: ~/.agentbnb/skills.yaml)").option("--registry-port <port>", "Public registry API port (0 to disable)", "7701").option("--registry <url>", "Connect to remote registry via WebSocket relay (e.g., hub.agentbnb.dev)").option("--conductor", "Enable Conductor orchestration mode").option("--announce", "Announce this gateway on the local network via mDNS").option("--no-relay", "Do not auto-connect to remote registry relay").option("--daemon", "Run in background as daemon").option("--status", "Show daemon status").option("--stop", "Stop the daemon").option("--restart", "Restart the daemon").option("--startup", "Register for auto-start on boot").action(async (opts) => {
1120
+ if (opts.status || opts.stop || opts.restart || opts.daemon || opts.startup) {
1121
+ const { startDaemon, stopDaemon, restartDaemon, daemonStatus, registerStartup } = await import("../daemon-A7DXZIQW.js");
1122
+ if (opts.status) {
1123
+ daemonStatus();
1124
+ return;
1125
+ }
1126
+ if (opts.stop) {
1127
+ stopDaemon();
1128
+ return;
1129
+ }
1130
+ const serveArgs = [];
1131
+ if (opts.port) serveArgs.push("--port", opts.port);
1132
+ if (opts.handlerUrl && opts.handlerUrl !== "http://localhost:8080") serveArgs.push("--handler-url", opts.handlerUrl);
1133
+ if (opts.skillsYaml) serveArgs.push("--skills-yaml", opts.skillsYaml);
1134
+ if (opts.registryPort) serveArgs.push("--registry-port", opts.registryPort);
1135
+ if (opts.registry) serveArgs.push("--registry", opts.registry);
1136
+ if (opts.conductor) serveArgs.push("--conductor");
1137
+ if (opts.announce) serveArgs.push("--announce");
1138
+ if (opts.relay === false) serveArgs.push("--no-relay");
1139
+ if (opts.restart) {
1140
+ await restartDaemon(serveArgs);
1141
+ return;
1142
+ }
1143
+ if (opts.startup) {
1144
+ registerStartup(serveArgs);
1145
+ if (!opts.daemon) return;
1146
+ }
1147
+ if (opts.daemon) {
1148
+ startDaemon(serveArgs);
1149
+ return;
1150
+ }
1151
+ }
1115
1152
  const config = loadConfig();
1116
1153
  if (!config) {
1117
1154
  console.error("Error: not initialized. Run `agentbnb init` first.");
1118
1155
  process.exit(1);
1119
1156
  }
1120
1157
  const { ProcessGuard } = await import("../process-guard-QDBIOLY4.js");
1121
- const { ServiceCoordinator } = await import("../service-coordinator-PLUPMPSC.js");
1158
+ const { ServiceCoordinator } = await import("../service-coordinator-4JAUUNUL.js");
1122
1159
  const port = opts.port ? parseInt(opts.port, 10) : config.gateway_port;
1123
1160
  const registryPort = parseInt(opts.registryPort, 10);
1124
1161
  if (!Number.isFinite(port) || !Number.isFinite(registryPort)) {
@@ -1414,24 +1451,51 @@ cardsCmd.command("delete <card-id>").description("Delete a published capability
1414
1451
  }
1415
1452
  });
1416
1453
  var openclaw = program.command("openclaw").description("OpenClaw integration commands");
1417
- openclaw.command("sync").description("Read SOUL.md and publish/update a v2.0 capability card").option("--soul-path <path>", "Path to SOUL.md", "./SOUL.md").option("--skills <ids>", "Comma-separated skill IDs to publish (overrides shared-skills config and skill visibility)").action(async (opts) => {
1454
+ openclaw.command("sync").description("Read SOUL.md and publish/update a v2.0 capability card").option("--soul-path <path>", "Path to SOUL.md (auto-detected if omitted)").option("--skills <ids>", "Comma-separated skill IDs to publish (overrides shared-skills config and skill visibility)").action(async (opts) => {
1418
1455
  const config = loadConfig();
1419
1456
  if (!config) {
1420
1457
  console.error("Error: not initialized. Run `agentbnb init` first.");
1421
1458
  process.exit(1);
1422
1459
  }
1460
+ let resolvedSoulPath;
1461
+ if (opts.soulPath) {
1462
+ resolvedSoulPath = opts.soulPath;
1463
+ } else {
1464
+ const { findSoulMd, getOpenClawWorkspaceDir } = await import("../scanner-GP4AOCW6.js");
1465
+ const found = findSoulMd(config.owner);
1466
+ if (found) {
1467
+ resolvedSoulPath = found;
1468
+ } else if (existsSync2("./SOUL.md")) {
1469
+ resolvedSoulPath = "./SOUL.md";
1470
+ } else {
1471
+ const { homedir: homedir2 } = await import("os");
1472
+ const home = homedir2();
1473
+ const workspaceDir = getOpenClawWorkspaceDir();
1474
+ console.error(`No SOUL.md found for agent "${config.owner}".`);
1475
+ console.error("Searched:");
1476
+ console.error(` - ${join2(workspaceDir, "brains", config.owner, "SOUL.md")}`);
1477
+ console.error(` - ${join2(home, ".openclaw", "agents", config.owner, "SOUL.md")}`);
1478
+ console.error(` - ${join2(workspaceDir, "SOUL.md")}`);
1479
+ console.error(` - ./SOUL.md`);
1480
+ console.error("");
1481
+ console.error("Create a SOUL.md file in one of these locations, or use:");
1482
+ console.error(" agentbnb openclaw sync --soul-path /path/to/SOUL.md");
1483
+ console.error(` agentbnb openclaw setup --agent ${config.owner}`);
1484
+ process.exit(1);
1485
+ }
1486
+ }
1423
1487
  let content;
1424
1488
  try {
1425
- content = readFileSync2(opts.soulPath, "utf-8");
1489
+ content = readFileSync2(resolvedSoulPath, "utf-8");
1426
1490
  } catch {
1427
- console.error(`Error: cannot read SOUL.md at ${opts.soulPath}`);
1491
+ console.error(`Error: cannot read SOUL.md at ${resolvedSoulPath}`);
1428
1492
  process.exit(1);
1429
1493
  }
1430
1494
  const sharedSkills = opts.skills ? opts.skills.split(",").map((s) => s.trim()).filter(Boolean) : config.shared_skills && config.shared_skills.length > 0 ? config.shared_skills : void 0;
1431
1495
  const db = openDatabase(config.db_path);
1432
1496
  try {
1433
1497
  const card = publishFromSoulV2(db, content, config.owner, sharedSkills);
1434
- console.log(`Published card ${card.id} with ${card.skills.length} skill(s)`);
1498
+ console.log(`Published card ${card.id} with ${card.skills.length} skill(s) (from ${resolvedSoulPath})`);
1435
1499
  for (const skill of card.skills) {
1436
1500
  const stats = getPricingStats(db, skill.name);
1437
1501
  if (stats.count > 0) {
@@ -1492,34 +1556,34 @@ openclaw.command("rules").description("Print HEARTBEAT.md rules block (or inject
1492
1556
  }
1493
1557
  });
1494
1558
  openclaw.command("setup").description("Interactive onboarding: connect an OpenClaw agent to AgentBnB").option("--agent <name>", "Agent name to set up (skip interactive selection)").option("--soul-path <path>", "Override SOUL.md path").option("-y, --yes", "Skip confirmation prompts").action(async (opts) => {
1495
- const { runOpenClawSetup } = await import("../openclaw-setup-HVEVSKXQ.js");
1559
+ const { runOpenClawSetup } = await import("../openclaw-setup-WA625DZA.js");
1496
1560
  await runOpenClawSetup(opts);
1497
1561
  });
1498
1562
  var skills = openclaw.command("skills").description("Manage shared skills on AgentBnB");
1499
1563
  skills.command("list").description("List all shared skills with stats").action(async () => {
1500
- const { skillsList } = await import("../openclaw-skills-QLC4D6DZ.js");
1564
+ const { skillsList } = await import("../openclaw-skills-76ZWXHFM.js");
1501
1565
  await skillsList({});
1502
1566
  });
1503
1567
  skills.command("add").description("Add a skill to share (interactive or --manual)").option("--manual", "Non-interactive: use flags instead of prompts").option("--name <id>", "Skill ID").option("--type <type>", "Skill type (command|openclaw)").option("--price <n>", "Credits per call", parseFloat).option("--description <text>", "Skill description").action(
1504
1568
  async (opts) => {
1505
- const { skillsAdd } = await import("../openclaw-skills-QLC4D6DZ.js");
1569
+ const { skillsAdd } = await import("../openclaw-skills-76ZWXHFM.js");
1506
1570
  await skillsAdd(opts);
1507
1571
  }
1508
1572
  );
1509
1573
  skills.command("remove <skillId>").description("Remove a skill from AgentBnB").action(async (skillId) => {
1510
- const { skillsRemove } = await import("../openclaw-skills-QLC4D6DZ.js");
1574
+ const { skillsRemove } = await import("../openclaw-skills-76ZWXHFM.js");
1511
1575
  await skillsRemove(skillId);
1512
1576
  });
1513
1577
  skills.command("price <skillId> <price>").description("Update skill price").action(async (skillId, price) => {
1514
- const { skillsPrice } = await import("../openclaw-skills-QLC4D6DZ.js");
1578
+ const { skillsPrice } = await import("../openclaw-skills-76ZWXHFM.js");
1515
1579
  await skillsPrice(skillId, parseFloat(price));
1516
1580
  });
1517
1581
  skills.command("stats").description("Revenue and performance report").option("--days <n>", "Days to look back", parseInt, 7).action(async (opts) => {
1518
- const { skillsStats } = await import("../openclaw-skills-QLC4D6DZ.js");
1582
+ const { skillsStats } = await import("../openclaw-skills-76ZWXHFM.js");
1519
1583
  await skillsStats(opts);
1520
1584
  });
1521
1585
  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) => {
1522
- const { conductAction } = await import("../conduct-4NPMP4GL.js");
1586
+ const { conductAction } = await import("../conduct-UAEEMVFD.js");
1523
1587
  const result = await conductAction(task, opts);
1524
1588
  if (opts.json) {
1525
1589
  console.log(JSON.stringify(result, null, 2));
@@ -1644,8 +1708,21 @@ vc.command("show").description("Display Verifiable Credentials for this agent").
1644
1708
  const { vcShow } = await import("../vc-action-SUD7TMN2.js");
1645
1709
  await vcShow(opts);
1646
1710
  });
1711
+ var credits = program.command("credits").description("Credit balance and transaction management");
1712
+ credits.command("sync").description("Sync local credit balance from remote registry").action(async () => {
1713
+ const { creditsSync } = await import("../credits-action-24EPLUHG.js");
1714
+ await creditsSync();
1715
+ });
1716
+ credits.command("history").description("Show recent credit transactions").option("--limit <n>", "Number of transactions to show", "20").option("--json", "Output as JSON").action(async (opts) => {
1717
+ const { creditsHistory } = await import("../credits-action-24EPLUHG.js");
1718
+ await creditsHistory(opts);
1719
+ });
1720
+ credits.command("grant <agent_id> <amount>").description("Admin: grant credits to an agent (requires ADMIN_TOKEN)").action(async (agentId, amount) => {
1721
+ const { creditsGrant } = await import("../credits-action-24EPLUHG.js");
1722
+ await creditsGrant(agentId, amount);
1723
+ });
1647
1724
  program.command("mcp-server").description("Start an MCP (Model Context Protocol) server for IDE integration").action(async () => {
1648
- const { startMcpServer } = await import("../server-Z6P3AHKN.js");
1725
+ const { startMcpServer } = await import("../server-TGV2OPUM.js");
1649
1726
  await startMcpServer();
1650
1727
  });
1651
1728
  await program.parseAsync(process.argv);
@@ -1,15 +1,16 @@
1
1
  import {
2
2
  conductAction
3
- } from "./chunk-AZEGOADG.js";
4
- import "./chunk-4FK45WJI.js";
3
+ } from "./chunk-I3RRMAAD.js";
4
+ import "./chunk-SMQDT7CT.js";
5
5
  import "./chunk-3MJT4PZG.js";
6
- import "./chunk-LLL3KYEM.js";
7
- import "./chunk-TLT6F35V.js";
6
+ import "./chunk-UQCQ2JCG.js";
7
+ import "./chunk-YJ3RGKPU.js";
8
8
  import "./chunk-5PV5YCSN.js";
9
9
  import "./chunk-G5WKW3ED.js";
10
- import "./chunk-UIPGGNRC.js";
10
+ import "./chunk-ERT77HKY.js";
11
11
  import "./chunk-ELFGYC22.js";
12
- import "./chunk-P3FDT7G5.js";
12
+ import "./chunk-QEDVPJKP.js";
13
+ import "./chunk-Z4IDXMSP.js";
13
14
  import "./chunk-UR3MISL2.js";
14
15
  import "./chunk-3466S65P.js";
15
16
  import "./chunk-W6LOCBWQ.js";
@@ -1,15 +1,16 @@
1
1
  import {
2
2
  conductAction
3
- } from "./chunk-AZEGOADG.js";
4
- import "./chunk-4FK45WJI.js";
3
+ } from "./chunk-I3RRMAAD.js";
4
+ import "./chunk-SMQDT7CT.js";
5
5
  import "./chunk-3MJT4PZG.js";
6
- import "./chunk-LLL3KYEM.js";
7
- import "./chunk-TLT6F35V.js";
6
+ import "./chunk-UQCQ2JCG.js";
7
+ import "./chunk-YJ3RGKPU.js";
8
8
  import "./chunk-5PV5YCSN.js";
9
9
  import "./chunk-G5WKW3ED.js";
10
- import "./chunk-UIPGGNRC.js";
10
+ import "./chunk-ERT77HKY.js";
11
11
  import "./chunk-ELFGYC22.js";
12
- import "./chunk-P3FDT7G5.js";
12
+ import "./chunk-QEDVPJKP.js";
13
+ import "./chunk-Z4IDXMSP.js";
13
14
  import "./chunk-UR3MISL2.js";
14
15
  import "./chunk-3466S65P.js";
15
16
  import "./chunk-W6LOCBWQ.js";
@@ -4,21 +4,22 @@ import {
4
4
  matchSubTasks,
5
5
  orchestrate,
6
6
  validateAndNormalizeSubtasks
7
- } from "./chunk-4FK45WJI.js";
7
+ } from "./chunk-SMQDT7CT.js";
8
8
  import {
9
9
  createUCAN,
10
10
  decodeUCAN
11
11
  } from "./chunk-PMVHKTFG.js";
12
12
  import "./chunk-3MJT4PZG.js";
13
- import "./chunk-LLL3KYEM.js";
13
+ import "./chunk-UQCQ2JCG.js";
14
14
  import {
15
15
  BudgetManager
16
- } from "./chunk-TLT6F35V.js";
16
+ } from "./chunk-YJ3RGKPU.js";
17
17
  import "./chunk-5PV5YCSN.js";
18
18
  import "./chunk-G5WKW3ED.js";
19
- import "./chunk-UIPGGNRC.js";
19
+ import "./chunk-ERT77HKY.js";
20
20
  import "./chunk-ELFGYC22.js";
21
- import "./chunk-P3FDT7G5.js";
21
+ import "./chunk-QEDVPJKP.js";
22
+ import "./chunk-Z4IDXMSP.js";
22
23
  import "./chunk-UR3MISL2.js";
23
24
  import "./chunk-3466S65P.js";
24
25
  import {