agentbnb 8.2.2 → 8.3.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 (62) hide show
  1. package/dist/{card-EX2EYGCZ.js → card-BN643ZOY.js} +6 -2
  2. package/dist/card-T2XJZA5A.js +92 -0
  3. package/dist/{chunk-3LWBH7P3.js → chunk-4NFJ3VYZ.js} +20 -1
  4. package/dist/chunk-5AIYALBX.js +857 -0
  5. package/dist/chunk-6QMDJVMS.js +238 -0
  6. package/dist/{chunk-LKLKYXLV.js → chunk-74LZDEDT.js} +6 -4
  7. package/dist/{chunk-GKVTD4EZ.js → chunk-77KGEDH4.js} +1 -1
  8. package/dist/{chunk-QCGIG7WW.js → chunk-7IQE34QK.js} +14 -7
  9. package/dist/{chunk-QHZGOG3O.js → chunk-D242QZCR.js} +168 -41
  10. package/dist/chunk-EE3V3DXK.js +60 -0
  11. package/dist/{chunk-RYISHSHB.js → chunk-F3KIEVJ2.js} +207 -265
  12. package/dist/{chunk-XBGVQMQJ.js → chunk-FELGHDCA.js} +16 -39
  13. package/dist/{chunk-EJKW57ZV.js → chunk-GIEJVKZZ.js} +1 -1
  14. package/dist/{chunk-WVY2W7AA.js → chunk-I7KWA7OB.js} +20 -0
  15. package/dist/{chunk-4IPJJRTP.js → chunk-IGQNP3ZO.js} +5 -2
  16. package/dist/chunk-NQANA6WH.js +797 -0
  17. package/dist/{chunk-Z4MCGKTL.js → chunk-NX27AFPA.js} +15 -2
  18. package/dist/{chunk-Z2GEFFDO.js → chunk-O4Q7BRG6.js} +2 -2
  19. package/dist/{chunk-SSK653A6.js → chunk-PQIP7EXY.js} +6 -0
  20. package/dist/{chunk-EG6RS4JC.js → chunk-QFPXZITP.js} +20 -65
  21. package/dist/chunk-R4F4XII4.js +264 -0
  22. package/dist/{chunk-DYQOFGGI.js → chunk-RVBW2QXU.js} +178 -49
  23. package/dist/{chunk-CQFBNTGT.js → chunk-S7DZHKCG.js} +25 -12
  24. package/dist/chunk-U6LP4KWN.js +238 -0
  25. package/dist/{chunk-MWOXW7JQ.js → chunk-VJ7XBEY6.js} +24 -16
  26. package/dist/chunk-WTHMHNKC.js +129 -0
  27. package/dist/{chunk-OCSU2S6W.js → chunk-WX3GZVFG.js} +2 -1
  28. package/dist/{chunk-CKOOVZOI.js → chunk-YKMBFQC2.js} +37 -5
  29. package/dist/{chunk-S3V6R3EN.js → chunk-ZU2TP7CN.js} +70 -27
  30. package/dist/cli/index.js +211 -278
  31. package/dist/client-OKJJ3UP2.js +19 -0
  32. package/dist/client-UQBGCIPA.js +20 -0
  33. package/dist/conduct-4JDMWBQD.js +22 -0
  34. package/dist/{conduct-AZFLNUX3.js → conduct-VYYBCPHA.js} +14 -13
  35. package/dist/{conductor-mode-WKB42PYM.js → conductor-mode-OPGQJFLA.js} +12 -8
  36. package/dist/{conductor-mode-PLTB6MS3.js → conductor-mode-SBDCRIX6.js} +16 -11
  37. package/dist/execute-FZLQGIXB.js +14 -0
  38. package/dist/execute-TEZPQ5WP.js +15 -0
  39. package/dist/index.d.ts +172 -11
  40. package/dist/index.js +1529 -433
  41. package/dist/{process-guard-GH5LRNWO.js → process-guard-TNSUNHSR.js} +1 -1
  42. package/dist/{publish-capability-QDR2QIZ2.js → publish-capability-HVYILTPR.js} +4 -3
  43. package/dist/{reliability-metrics-QG7WC5QK.js → reliability-metrics-G7LPUYJD.js} +3 -1
  44. package/dist/reliability-metrics-RRUKJ4ME.js +20 -0
  45. package/dist/{request-NX7GSPIG.js → request-KJNKR27T.js} +96 -43
  46. package/dist/{serve-skill-E6EJQYAK.js → serve-skill-GC6NIQ5T.js} +10 -11
  47. package/dist/{server-VBCT32FC.js → server-YV3XPTX5.js} +11 -10
  48. package/dist/{service-coordinator-KMSA6BST.js → service-coordinator-RY5AKUZS.js} +420 -171
  49. package/dist/{skill-config-FETXPNVP.js → skill-config-5O2VR546.js} +1 -1
  50. package/dist/skills/agentbnb/bootstrap.js +550 -231
  51. package/dist/websocket-client-3U27WJUU.js +7 -0
  52. package/dist/{websocket-client-4Z5P54RU.js → websocket-client-SNDF3B6N.js} +1 -1
  53. package/package.json +18 -12
  54. package/skills/agentbnb/install.sh +0 -0
  55. package/dist/chunk-MCED4GDW.js +0 -1572
  56. package/dist/chunk-NWIQJ2CL.js +0 -108
  57. package/dist/chunk-WNXXLCV5.js +0 -32
  58. package/dist/client-XOLP5IUZ.js +0 -12
  59. package/dist/conduct-VPUYTNEA.js +0 -21
  60. package/dist/execute-NNDCXTN4.js +0 -13
  61. package/dist/execute-RIRHTIBU.js +0 -16
  62. package/dist/websocket-client-QOVARTRN.js +0 -7
@@ -1,6 +1,10 @@
1
+ import {
2
+ attachCanonicalAgentId
3
+ } from "./chunk-ZU2TP7CN.js";
4
+ import "./chunk-EE3V3DXK.js";
1
5
  import {
2
6
  CapabilityCardV2Schema
3
- } from "./chunk-WVY2W7AA.js";
7
+ } from "./chunk-I7KWA7OB.js";
4
8
 
5
9
  // src/conductor/card.ts
6
10
  import { createHash } from "crypto";
@@ -67,7 +71,7 @@ function buildConductorCard(owner) {
67
71
  return CapabilityCardV2Schema.parse(card);
68
72
  }
69
73
  function registerConductorCard(db) {
70
- const card = buildConductorCard();
74
+ const card = attachCanonicalAgentId(db, buildConductorCard());
71
75
  const now = (/* @__PURE__ */ new Date()).toISOString();
72
76
  const existing = db.prepare("SELECT id FROM capability_cards WHERE id = ?").get(card.id);
73
77
  if (existing) {
@@ -0,0 +1,92 @@
1
+ import {
2
+ attachCanonicalAgentId
3
+ } from "./chunk-5AIYALBX.js";
4
+ import "./chunk-WTHMHNKC.js";
5
+ import {
6
+ CapabilityCardV2Schema
7
+ } from "./chunk-I7KWA7OB.js";
8
+
9
+ // src/conductor/card.ts
10
+ import { createHash } from "crypto";
11
+ var CONDUCTOR_OWNER = "agentbnb-conductor";
12
+ var CONDUCTOR_CARD_ID = "00000000-0000-4000-8000-000000000001";
13
+ function ownerToCardId(owner) {
14
+ const hash = createHash("sha256").update(owner).digest("hex").slice(0, 32);
15
+ return `${hash.slice(0, 8)}-${hash.slice(8, 12)}-4${hash.slice(13, 16)}-8${hash.slice(17, 20)}-${hash.slice(20, 32)}`;
16
+ }
17
+ function buildConductorCard(owner) {
18
+ const cardOwner = owner ?? CONDUCTOR_OWNER;
19
+ const cardId = owner ? ownerToCardId(owner) : CONDUCTOR_CARD_ID;
20
+ const card = {
21
+ spec_version: "2.0",
22
+ id: cardId,
23
+ owner: cardOwner,
24
+ agent_name: "AgentBnB Conductor",
25
+ skills: [
26
+ {
27
+ id: "orchestrate",
28
+ name: "Task Orchestration",
29
+ description: "Decomposes complex tasks and coordinates multi-agent execution",
30
+ level: 3,
31
+ inputs: [
32
+ {
33
+ name: "task",
34
+ type: "text",
35
+ description: "Natural language task description"
36
+ }
37
+ ],
38
+ outputs: [
39
+ {
40
+ name: "result",
41
+ type: "json",
42
+ description: "Aggregated execution results"
43
+ }
44
+ ],
45
+ pricing: { credits_per_call: 5 }
46
+ },
47
+ {
48
+ id: "plan",
49
+ name: "Execution Planning",
50
+ description: "Returns an execution plan with cost estimate without executing",
51
+ level: 1,
52
+ inputs: [
53
+ {
54
+ name: "task",
55
+ type: "text",
56
+ description: "Natural language task description"
57
+ }
58
+ ],
59
+ outputs: [
60
+ {
61
+ name: "plan",
62
+ type: "json",
63
+ description: "Execution plan with cost breakdown"
64
+ }
65
+ ],
66
+ pricing: { credits_per_call: 1 }
67
+ }
68
+ ],
69
+ availability: { online: true }
70
+ };
71
+ return CapabilityCardV2Schema.parse(card);
72
+ }
73
+ function registerConductorCard(db) {
74
+ const card = attachCanonicalAgentId(db, buildConductorCard());
75
+ const now = (/* @__PURE__ */ new Date()).toISOString();
76
+ const existing = db.prepare("SELECT id FROM capability_cards WHERE id = ?").get(card.id);
77
+ if (existing) {
78
+ db.prepare(
79
+ "UPDATE capability_cards SET data = ?, updated_at = ? WHERE id = ?"
80
+ ).run(JSON.stringify(card), now, card.id);
81
+ } else {
82
+ db.prepare(
83
+ "INSERT INTO capability_cards (id, owner, data, created_at, updated_at) VALUES (?, ?, ?, ?, ?)"
84
+ ).run(card.id, card.owner, JSON.stringify(card), now, now);
85
+ }
86
+ return card;
87
+ }
88
+ export {
89
+ CONDUCTOR_OWNER,
90
+ buildConductorCard,
91
+ registerConductorCard
92
+ };
@@ -83,6 +83,11 @@ var RelayProgressMessageSchema = z.object({
83
83
  message: z.string().optional()
84
84
  // optional status message
85
85
  });
86
+ var RelayStartedMessageSchema = z.object({
87
+ type: z.literal("relay_started"),
88
+ id: z.string().uuid(),
89
+ message: z.string().optional()
90
+ });
86
91
  var HeartbeatMessageSchema = z.object({
87
92
  type: z.literal("heartbeat"),
88
93
  owner: z.string().min(1),
@@ -159,6 +164,7 @@ var RelayMessageSchema = z.discriminatedUnion("type", [
159
164
  ResponseMessageSchema,
160
165
  ErrorMessageSchema,
161
166
  RelayProgressMessageSchema,
167
+ RelayStartedMessageSchema,
162
168
  HeartbeatMessageSchema,
163
169
  EscrowHoldMessageSchema,
164
170
  EscrowHoldConfirmedMessageSchema,
@@ -289,10 +295,23 @@ var RelayClient = class {
289
295
  });
290
296
  });
291
297
  }
298
+ /**
299
+ * Send a relay_started message to acknowledge that provider has started work.
300
+ *
301
+ * @param requestId - The relay request ID being processed.
302
+ * @param message - Optional status message.
303
+ */
304
+ sendStarted(requestId, message) {
305
+ this.send({
306
+ type: "relay_started",
307
+ id: requestId,
308
+ ...message ? { message } : {}
309
+ });
310
+ }
292
311
  /**
293
312
  * Send a relay_progress message to the relay server for a given request.
294
313
  * Used by the onRequest handler to forward SkillExecutor progress updates
295
- * to the requesting agent so it can reset its timeout window.
314
+ * to the requesting agent while work is in-flight.
296
315
  *
297
316
  * @param requestId - The relay request ID to associate progress with.
298
317
  * @param info - Progress details (step, total, message).