agentbnb 8.4.5 → 9.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 (63) hide show
  1. package/README.md +216 -192
  2. package/dist/{card-BN643ZOY.js → card-6KL6L4GF.js} +2 -2
  3. package/dist/{card-HYTD2BJQ.js → card-NKQFB3HD.js} +3 -3
  4. package/dist/{chunk-UNXCKETK.js → chunk-27VHBFUP.js} +11 -9
  5. package/dist/{chunk-CFHCG5FE.js → chunk-2GWOFP24.js} +1 -1
  6. package/dist/{chunk-PQIP7EXY.js → chunk-3466S65P.js} +6 -2
  7. package/dist/{chunk-SME5LJTE.js → chunk-4FK45WJI.js} +4 -4
  8. package/dist/chunk-5CC6O6SO.js +152 -0
  9. package/dist/{chunk-MZSVVG55.js → chunk-5PV5YCSN.js} +1 -1
  10. package/dist/{chunk-5SIGMKOD.js → chunk-77HAL2ZL.js} +14 -5
  11. package/dist/{chunk-EKLVNIIY.js → chunk-AZEGOADG.js} +5 -5
  12. package/dist/{chunk-NQANA6WH.js → chunk-BNS76U6K.js} +2 -2
  13. package/dist/{chunk-JDAFLPR7.js → chunk-BOBND3QV.js} +5 -5
  14. package/dist/{chunk-VRPLSK34.js → chunk-D4IJQ3TK.js} +1 -1
  15. package/dist/{chunk-4NFJ3VYZ.js → chunk-DYJ7YGBM.js} +6 -2
  16. package/dist/{chunk-PIPCGRCR.js → chunk-ELFGYC22.js} +1 -1
  17. package/dist/{chunk-WTHMHNKC.js → chunk-J4RFJVXI.js} +1 -1
  18. package/dist/{chunk-IMLFBU3H.js → chunk-LLL3KYEM.js} +8 -8
  19. package/dist/{chunk-VAAEBCMU.js → chunk-N3TXLBGK.js} +2 -2
  20. package/dist/{chunk-COA2D7QM.js → chunk-NLQCHO7N.js} +2 -2
  21. package/dist/{chunk-WK2QSO4E.js → chunk-NZTLBAML.js} +7 -141
  22. package/dist/{chunk-HU46M4JA.js → chunk-P3FDT7G5.js} +4 -4
  23. package/dist/{chunk-ZU2TP7CN.js → chunk-PG3CLSAH.js} +1 -1
  24. package/dist/chunk-PMVHKTFG.js +199 -0
  25. package/dist/{chunk-OPRCWXD5.js → chunk-SLZBE2I5.js} +198 -5
  26. package/dist/{chunk-AZKVGC5T.js → chunk-TLT6F35V.js} +1 -1
  27. package/dist/{chunk-2PP5MQPD.js → chunk-UIPGGNRC.js} +4 -4
  28. package/dist/{chunk-NX27AFPA.js → chunk-UR3MISL2.js} +1 -1
  29. package/dist/{chunk-I7KWA7OB.js → chunk-UVCNMRPS.js} +4 -0
  30. package/dist/{chunk-RF4A5X5U.js → chunk-W5J3PEQ6.js} +6 -4
  31. package/dist/{chunk-YKMBFQC2.js → chunk-W6LOCBWQ.js} +2 -2
  32. package/dist/{chunk-U6LP4KWN.js → chunk-YDGXKH2T.js} +1 -1
  33. package/dist/{chunk-GIEJVKZZ.js → chunk-YNBZLXYS.js} +1 -1
  34. package/dist/cli/index.js +75 -61
  35. package/dist/{client-UQBGCIPA.js → client-YB3IYO3S.js} +3 -3
  36. package/dist/conduct-4NPMP4GL.js +25 -0
  37. package/dist/{conduct-TE4YAXKR.js → conduct-5FTKINWU.js} +16 -16
  38. package/dist/{conductor-mode-2F5OP7Q4.js → conductor-mode-NRSVP2AU.js} +157 -7
  39. package/dist/{conductor-mode-TLIQMU4A.js → conductor-mode-ZWC5BZUL.js} +167 -15
  40. package/dist/did-action-MQLDT4RF.js +50 -0
  41. package/dist/{execute-VRTABQ6F.js → execute-DNRNU3HM.js} +5 -5
  42. package/dist/execute-JTPFFEH6.js +20 -0
  43. package/dist/index.d.ts +34 -0
  44. package/dist/index.js +433 -50
  45. package/dist/{openclaw-setup-5ZWWRVF3.js → openclaw-setup-HVEVSKXQ.js} +14 -13
  46. package/dist/{openclaw-skills-6ZWQJ5V6.js → openclaw-skills-QLC4D6DZ.js} +12 -2
  47. package/dist/{process-guard-TNSUNHSR.js → process-guard-QDBIOLY4.js} +1 -1
  48. package/dist/{publish-capability-GNH5FHKG.js → publish-capability-FOCHYNYE.js} +4 -4
  49. package/dist/{reliability-metrics-G7LPUYJD.js → reliability-metrics-JSOY3PNW.js} +1 -1
  50. package/dist/{reliability-metrics-RRUKJ4ME.js → reliability-metrics-KKUFFVB6.js} +3 -3
  51. package/dist/{request-XWEOIVB3.js → request-WX3VLXBT.js} +14 -14
  52. package/dist/{serve-skill-UD7TLSRN.js → serve-skill-C7JU24CF.js} +14 -13
  53. package/dist/{server-GSG5T2TZ.js → server-Z6P3AHKN.js} +15 -13
  54. package/dist/{service-coordinator-ZO7QHQ6U.js → service-coordinator-PLUPMPSC.js} +209 -45
  55. package/dist/skills/agentbnb/bootstrap.js +198 -38
  56. package/dist/{store-4Z446745.js → store-S22F3I7G.js} +3 -3
  57. package/dist/vc-action-SUD7TMN2.js +75 -0
  58. package/dist/websocket-client-5CRE36Z5.js +7 -0
  59. package/dist/{websocket-client-SNDF3B6N.js → websocket-client-WHEHIYIZ.js} +1 -1
  60. package/package.json +1 -1
  61. package/dist/conduct-2RD45QKB.js +0 -25
  62. package/dist/execute-6EJSVBFB.js +0 -19
  63. package/dist/websocket-client-3U27WJUU.js +0 -7
@@ -1,25 +1,27 @@
1
1
  import {
2
2
  DEFAULT_BUDGET_CONFIG
3
- } from "./chunk-AZKVGC5T.js";
3
+ } from "./chunk-TLT6F35V.js";
4
4
  import {
5
5
  KNOWN_API_KEYS,
6
6
  buildDraftCard,
7
7
  detectApiKeys,
8
8
  detectOpenPorts
9
- } from "./chunk-CFHCG5FE.js";
9
+ } from "./chunk-2GWOFP24.js";
10
10
  import {
11
11
  DEFAULT_AUTONOMY_CONFIG
12
12
  } from "./chunk-G5WKW3ED.js";
13
13
  import {
14
- createLedger,
14
+ createLedger
15
+ } from "./chunk-NZTLBAML.js";
16
+ import {
15
17
  loadOrRepairIdentity
16
- } from "./chunk-WK2QSO4E.js";
18
+ } from "./chunk-5CC6O6SO.js";
17
19
  import {
18
20
  bootstrapAgent,
19
21
  getBalance,
20
22
  migrateOwner,
21
23
  openCreditDb
22
- } from "./chunk-HU46M4JA.js";
24
+ } from "./chunk-P3FDT7G5.js";
23
25
  import {
24
26
  getConfigDir,
25
27
  loadConfig,
@@ -27,23 +29,23 @@ import {
27
29
  } from "./chunk-3XPBFF6H.js";
28
30
  import {
29
31
  parseSoulMd
30
- } from "./chunk-VAAEBCMU.js";
32
+ } from "./chunk-N3TXLBGK.js";
31
33
  import {
32
34
  attachCanonicalAgentId,
33
35
  insertCard,
34
36
  listCards,
35
37
  openDatabase
36
- } from "./chunk-COA2D7QM.js";
38
+ } from "./chunk-NLQCHO7N.js";
37
39
  import {
38
40
  createAgentRecord,
39
41
  lookupAgent,
40
42
  lookupAgentByOwner,
41
43
  updateAgentRecord
42
- } from "./chunk-WTHMHNKC.js";
44
+ } from "./chunk-J4RFJVXI.js";
43
45
  import {
44
46
  AgentBnBError,
45
47
  CapabilityCardV2Schema
46
- } from "./chunk-I7KWA7OB.js";
48
+ } from "./chunk-UVCNMRPS.js";
47
49
 
48
50
  // src/openclaw/soul-sync.ts
49
51
  import { randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  searchCards
3
- } from "./chunk-HU46M4JA.js";
3
+ } from "./chunk-P3FDT7G5.js";
4
4
 
5
5
  // src/registry/pricing.ts
6
6
  function getPricingStats(db, query) {
@@ -34,7 +34,9 @@ var RelayRequestMessageSchema = z.object({
34
34
  skill_id: z.string().optional(),
35
35
  params: z.record(z.unknown()).default({}),
36
36
  requester: z.string().optional(),
37
- escrow_receipt: z.record(z.unknown()).optional()
37
+ escrow_receipt: z.record(z.unknown()).optional(),
38
+ /** Optional UCAN token for capability delegation. */
39
+ ucan_token: z.string().optional()
38
40
  });
39
41
  var IncomingRequestMessageSchema = z.object({
40
42
  type: z.literal("incoming_request"),
@@ -44,7 +46,9 @@ var IncomingRequestMessageSchema = z.object({
44
46
  skill_id: z.string().optional(),
45
47
  params: z.record(z.unknown()).default({}),
46
48
  requester: z.string().optional(),
47
- escrow_receipt: z.record(z.unknown()).optional()
49
+ escrow_receipt: z.record(z.unknown()).optional(),
50
+ /** Optional UCAN token for capability delegation. */
51
+ ucan_token: z.string().optional()
48
52
  });
49
53
  var RelayResponseMessageSchema = z.object({
50
54
  type: z.literal("relay_response"),
@@ -3,17 +3,17 @@ import {
3
3
  } from "./chunk-3MJT4PZG.js";
4
4
  import {
5
5
  scorePeers
6
- } from "./chunk-IMLFBU3H.js";
6
+ } from "./chunk-LLL3KYEM.js";
7
7
  import {
8
8
  fetchRemoteCards
9
- } from "./chunk-PIPCGRCR.js";
9
+ } from "./chunk-ELFGYC22.js";
10
10
  import {
11
11
  searchCards
12
- } from "./chunk-HU46M4JA.js";
12
+ } from "./chunk-P3FDT7G5.js";
13
13
  import {
14
14
  requestCapability,
15
15
  requestCapabilityBatch
16
- } from "./chunk-YKMBFQC2.js";
16
+ } from "./chunk-W6LOCBWQ.js";
17
17
 
18
18
  // src/conductor/decomposition-validator.ts
19
19
  function validateAndNormalizeSubtasks(raw, context) {
@@ -0,0 +1,152 @@
1
+ import {
2
+ generateKeyPair,
3
+ loadKeyPair,
4
+ saveKeyPair
5
+ } from "./chunk-YNBZLXYS.js";
6
+
7
+ // src/identity/identity.ts
8
+ import { z } from "zod";
9
+ import { createHash, createPrivateKey, createPublicKey } from "crypto";
10
+ import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
11
+ import { join } from "path";
12
+ var AgentIdentitySchema = z.object({
13
+ /** Deterministic ID derived from public key: sha256(hex).slice(0, 16). */
14
+ agent_id: z.string().min(1),
15
+ /** Human-readable owner name (from config or init). */
16
+ owner: z.string().min(1),
17
+ /** Hex-encoded Ed25519 public key. */
18
+ public_key: z.string().min(1),
19
+ /** W3C Decentralized Identifier (e.g. did:agentbnb:<agent_id>). */
20
+ did: z.string().optional(),
21
+ /** ISO 8601 timestamp of identity creation. */
22
+ created_at: z.string().datetime(),
23
+ /** Optional guarantor info if linked to a human. */
24
+ guarantor: z.object({
25
+ github_login: z.string().min(1),
26
+ verified_at: z.string().datetime()
27
+ }).optional()
28
+ });
29
+ var AgentCertificateSchema = z.object({
30
+ identity: AgentIdentitySchema,
31
+ /** ISO 8601 timestamp of certificate issuance. */
32
+ issued_at: z.string().datetime(),
33
+ /** ISO 8601 timestamp of certificate expiry. */
34
+ expires_at: z.string().datetime(),
35
+ /** Hex-encoded public key of the issuer (same as identity for self-signed). */
36
+ issuer_public_key: z.string().min(1),
37
+ /** Base64url Ed25519 signature over { identity, issued_at, expires_at, issuer_public_key }. */
38
+ signature: z.string().min(1)
39
+ });
40
+ var IDENTITY_FILENAME = "identity.json";
41
+ var PRIVATE_KEY_FILENAME = "private.key";
42
+ var PUBLIC_KEY_FILENAME = "public.key";
43
+ function derivePublicKeyFromPrivate(privateKey) {
44
+ const privateKeyObject = createPrivateKey({ key: privateKey, format: "der", type: "pkcs8" });
45
+ const publicKeyObject = createPublicKey(privateKeyObject);
46
+ const publicKey = publicKeyObject.export({ format: "der", type: "spki" });
47
+ return Buffer.from(publicKey);
48
+ }
49
+ function buildIdentityFromPublicKey(publicKey, owner, createdAt) {
50
+ const publicKeyHex = publicKey.toString("hex");
51
+ const agentId = deriveAgentId(publicKeyHex);
52
+ return {
53
+ agent_id: agentId,
54
+ owner,
55
+ public_key: publicKeyHex,
56
+ did: `did:agentbnb:${agentId}`,
57
+ created_at: createdAt ?? (/* @__PURE__ */ new Date()).toISOString()
58
+ };
59
+ }
60
+ function generateFreshIdentity(configDir, owner) {
61
+ const keys = generateKeyPair();
62
+ saveKeyPair(configDir, keys);
63
+ const identity = buildIdentityFromPublicKey(keys.publicKey, owner);
64
+ saveIdentity(configDir, identity);
65
+ return { identity, keys, status: "generated" };
66
+ }
67
+ function deriveAgentId(publicKeyHex) {
68
+ return createHash("sha256").update(publicKeyHex, "hex").digest("hex").slice(0, 16);
69
+ }
70
+ function loadIdentity(configDir) {
71
+ const filePath = join(configDir, IDENTITY_FILENAME);
72
+ if (!existsSync(filePath)) return null;
73
+ try {
74
+ const raw = readFileSync(filePath, "utf-8");
75
+ return AgentIdentitySchema.parse(JSON.parse(raw));
76
+ } catch {
77
+ return null;
78
+ }
79
+ }
80
+ function saveIdentity(configDir, identity) {
81
+ if (!existsSync(configDir)) {
82
+ mkdirSync(configDir, { recursive: true });
83
+ }
84
+ const filePath = join(configDir, IDENTITY_FILENAME);
85
+ writeFileSync(filePath, JSON.stringify(identity, null, 2), "utf-8");
86
+ }
87
+ function loadOrRepairIdentity(configDir, ownerHint) {
88
+ if (!existsSync(configDir)) {
89
+ mkdirSync(configDir, { recursive: true });
90
+ }
91
+ const identityPath = join(configDir, IDENTITY_FILENAME);
92
+ const privateKeyPath = join(configDir, PRIVATE_KEY_FILENAME);
93
+ const publicKeyPath = join(configDir, PUBLIC_KEY_FILENAME);
94
+ const hasIdentity = existsSync(identityPath);
95
+ const hasPrivateKey = existsSync(privateKeyPath);
96
+ const hasPublicKey = existsSync(publicKeyPath);
97
+ if (!hasIdentity || !hasPrivateKey || !hasPublicKey) {
98
+ return generateFreshIdentity(configDir, ownerHint ?? "agent");
99
+ }
100
+ let keys;
101
+ try {
102
+ keys = loadKeyPair(configDir);
103
+ } catch {
104
+ return generateFreshIdentity(configDir, ownerHint ?? "agent");
105
+ }
106
+ let derivedPublicKey;
107
+ try {
108
+ derivedPublicKey = derivePublicKeyFromPrivate(keys.privateKey);
109
+ } catch {
110
+ return generateFreshIdentity(configDir, ownerHint ?? "agent");
111
+ }
112
+ let keypairRepaired = false;
113
+ if (!keys.publicKey.equals(derivedPublicKey)) {
114
+ keypairRepaired = true;
115
+ keys = { privateKey: keys.privateKey, publicKey: derivedPublicKey };
116
+ saveKeyPair(configDir, keys);
117
+ }
118
+ const loadedIdentity = loadIdentity(configDir);
119
+ const expectedAgentId = deriveAgentId(derivedPublicKey.toString("hex"));
120
+ const expectedPublicKeyHex = derivedPublicKey.toString("hex");
121
+ const identityMismatch = !loadedIdentity || loadedIdentity.public_key !== expectedPublicKeyHex || loadedIdentity.agent_id !== expectedAgentId;
122
+ if (identityMismatch) {
123
+ const repairedIdentity = buildIdentityFromPublicKey(
124
+ derivedPublicKey,
125
+ loadedIdentity?.owner ?? ownerHint ?? "agent",
126
+ loadedIdentity?.created_at
127
+ );
128
+ saveIdentity(configDir, repairedIdentity);
129
+ return { identity: repairedIdentity, keys, status: "repaired" };
130
+ }
131
+ if (ownerHint && loadedIdentity.owner !== ownerHint) {
132
+ const updatedIdentity = { ...loadedIdentity, owner: ownerHint };
133
+ saveIdentity(configDir, updatedIdentity);
134
+ return { identity: updatedIdentity, keys, status: "repaired" };
135
+ }
136
+ if (!loadedIdentity.did) {
137
+ const updatedIdentity = { ...loadedIdentity, did: `did:agentbnb:${loadedIdentity.agent_id}` };
138
+ saveIdentity(configDir, updatedIdentity);
139
+ return { identity: updatedIdentity, keys, status: "repaired" };
140
+ }
141
+ return { identity: loadedIdentity, keys, status: keypairRepaired ? "repaired" : "existing" };
142
+ }
143
+ function ensureIdentity(configDir, owner) {
144
+ return loadOrRepairIdentity(configDir, owner).identity;
145
+ }
146
+
147
+ export {
148
+ deriveAgentId,
149
+ loadIdentity,
150
+ loadOrRepairIdentity,
151
+ ensureIdentity
152
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AgentBnBError
3
- } from "./chunk-I7KWA7OB.js";
3
+ } from "./chunk-UVCNMRPS.js";
4
4
 
5
5
  // src/autonomy/pending-requests.ts
6
6
  import { randomUUID } from "crypto";
@@ -8,7 +8,7 @@ import {
8
8
  releaseEscrow,
9
9
  resolveTargetCapability,
10
10
  settleEscrow
11
- } from "./chunk-NQANA6WH.js";
11
+ } from "./chunk-BNS76U6K.js";
12
12
  import {
13
13
  canonicalizeCreditOwner
14
14
  } from "./chunk-6QMDJVMS.js";
@@ -18,7 +18,7 @@ import {
18
18
  saveKeyPair,
19
19
  signEscrowReceipt,
20
20
  verifyEscrowReceipt
21
- } from "./chunk-GIEJVKZZ.js";
21
+ } from "./chunk-YNBZLXYS.js";
22
22
  import {
23
23
  getConfigDir,
24
24
  loadConfig
@@ -27,13 +27,13 @@ import {
27
27
  getCard,
28
28
  insertRequestLog,
29
29
  updateReputation
30
- } from "./chunk-ZU2TP7CN.js";
30
+ } from "./chunk-PG3CLSAH.js";
31
31
  import {
32
32
  lookupAgent
33
33
  } from "./chunk-EE3V3DXK.js";
34
34
  import {
35
35
  AgentBnBError
36
- } from "./chunk-I7KWA7OB.js";
36
+ } from "./chunk-UVCNMRPS.js";
37
37
 
38
38
  // src/gateway/execute.ts
39
39
  import { randomUUID } from "crypto";
@@ -50,6 +50,8 @@ var AgentIdentitySchema = z.object({
50
50
  owner: z.string().min(1),
51
51
  /** Hex-encoded Ed25519 public key. */
52
52
  public_key: z.string().min(1),
53
+ /** W3C Decentralized Identifier (e.g. did:agentbnb:<agent_id>). */
54
+ did: z.string().optional(),
53
55
  /** ISO 8601 timestamp of identity creation. */
54
56
  created_at: z.string().datetime(),
55
57
  /** Optional guarantor info if linked to a human. */
@@ -80,10 +82,12 @@ function derivePublicKeyFromPrivate(privateKey) {
80
82
  }
81
83
  function buildIdentityFromPublicKey(publicKey, owner, createdAt) {
82
84
  const publicKeyHex = publicKey.toString("hex");
85
+ const agentId = deriveAgentId(publicKeyHex);
83
86
  return {
84
- agent_id: deriveAgentId(publicKeyHex),
87
+ agent_id: agentId,
85
88
  owner,
86
89
  public_key: publicKeyHex,
90
+ did: `did:agentbnb:${agentId}`,
87
91
  created_at: createdAt ?? (/* @__PURE__ */ new Date()).toISOString()
88
92
  };
89
93
  }
@@ -163,6 +167,11 @@ function loadOrRepairIdentity(configDir, ownerHint) {
163
167
  saveIdentity(configDir, updatedIdentity);
164
168
  return { identity: updatedIdentity, keys, status: "repaired" };
165
169
  }
170
+ if (!loadedIdentity.did) {
171
+ const updatedIdentity = { ...loadedIdentity, did: `did:agentbnb:${loadedIdentity.agent_id}` };
172
+ saveIdentity(configDir, updatedIdentity);
173
+ return { identity: updatedIdentity, keys, status: "repaired" };
174
+ }
166
175
  return { identity: loadedIdentity, keys, status: keypairRepaired ? "repaired" : "existing" };
167
176
  }
168
177
  function ensureIdentity(configDir, owner) {
@@ -4,16 +4,16 @@ import {
4
4
  decompose,
5
5
  matchSubTasks,
6
6
  orchestrate
7
- } from "./chunk-SME5LJTE.js";
7
+ } from "./chunk-4FK45WJI.js";
8
8
  import {
9
9
  BudgetManager
10
- } from "./chunk-AZKVGC5T.js";
10
+ } from "./chunk-TLT6F35V.js";
11
11
  import {
12
12
  openCreditDb
13
- } from "./chunk-HU46M4JA.js";
13
+ } from "./chunk-P3FDT7G5.js";
14
14
  import {
15
15
  RelayClient
16
- } from "./chunk-NX27AFPA.js";
16
+ } from "./chunk-UR3MISL2.js";
17
17
  import {
18
18
  loadPeers
19
19
  } from "./chunk-3YQ73ZM6.js";
@@ -23,7 +23,7 @@ import {
23
23
  import {
24
24
  listCards,
25
25
  openDatabase
26
- } from "./chunk-COA2D7QM.js";
26
+ } from "./chunk-NLQCHO7N.js";
27
27
 
28
28
  // src/cli/conduct.ts
29
29
  async function conductAction(task, opts) {
@@ -7,14 +7,14 @@ import {
7
7
  import {
8
8
  getCard,
9
9
  getFeedbackForProvider
10
- } from "./chunk-ZU2TP7CN.js";
10
+ } from "./chunk-PG3CLSAH.js";
11
11
  import {
12
12
  ensureAgentsTable,
13
13
  resolveCanonicalIdentity
14
14
  } from "./chunk-EE3V3DXK.js";
15
15
  import {
16
16
  AgentBnBError
17
- } from "./chunk-I7KWA7OB.js";
17
+ } from "./chunk-UVCNMRPS.js";
18
18
 
19
19
  // src/credit/ledger.ts
20
20
  import Database from "better-sqlite3";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  syncCreditsFromRegistry
3
- } from "./chunk-RF4A5X5U.js";
3
+ } from "./chunk-W5J3PEQ6.js";
4
4
  import {
5
5
  resolveTargetCapability
6
- } from "./chunk-2PP5MQPD.js";
6
+ } from "./chunk-UIPGGNRC.js";
7
7
  import {
8
8
  getBalance,
9
9
  holdEscrow,
10
10
  releaseEscrow,
11
11
  settleEscrow
12
- } from "./chunk-HU46M4JA.js";
12
+ } from "./chunk-P3FDT7G5.js";
13
13
  import {
14
14
  loadConfig
15
15
  } from "./chunk-3XPBFF6H.js";
@@ -17,10 +17,10 @@ import {
17
17
  getCard,
18
18
  insertRequestLog,
19
19
  updateReputation
20
- } from "./chunk-COA2D7QM.js";
20
+ } from "./chunk-NLQCHO7N.js";
21
21
  import {
22
22
  AgentBnBError
23
- } from "./chunk-I7KWA7OB.js";
23
+ } from "./chunk-UVCNMRPS.js";
24
24
 
25
25
  // src/gateway/execute.ts
26
26
  import { randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AgentBnBError
3
- } from "./chunk-I7KWA7OB.js";
3
+ } from "./chunk-UVCNMRPS.js";
4
4
 
5
5
  // src/discovery/mdns.ts
6
6
  import { Bonjour } from "bonjour-service";
@@ -38,7 +38,9 @@ var RelayRequestMessageSchema = z.object({
38
38
  skill_id: z.string().optional(),
39
39
  params: z.record(z.unknown()).default({}),
40
40
  requester: z.string().optional(),
41
- escrow_receipt: z.record(z.unknown()).optional()
41
+ escrow_receipt: z.record(z.unknown()).optional(),
42
+ /** Optional UCAN token for capability delegation. */
43
+ ucan_token: z.string().optional()
42
44
  });
43
45
  var IncomingRequestMessageSchema = z.object({
44
46
  type: z.literal("incoming_request"),
@@ -48,7 +50,9 @@ var IncomingRequestMessageSchema = z.object({
48
50
  skill_id: z.string().optional(),
49
51
  params: z.record(z.unknown()).default({}),
50
52
  requester: z.string().optional(),
51
- escrow_receipt: z.record(z.unknown()).optional()
53
+ escrow_receipt: z.record(z.unknown()).optional(),
54
+ /** Optional UCAN token for capability delegation. */
55
+ ucan_token: z.string().optional()
52
56
  });
53
57
  var RelayResponseMessageSchema = z.object({
54
58
  type: z.literal("relay_response"),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AgentBnBError
3
- } from "./chunk-I7KWA7OB.js";
3
+ } from "./chunk-UVCNMRPS.js";
4
4
 
5
5
  // src/cli/remote-registry.ts
6
6
  var RegistryTimeoutError = class extends AgentBnBError {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AgentBnBError
3
- } from "./chunk-I7KWA7OB.js";
3
+ } from "./chunk-UVCNMRPS.js";
4
4
 
5
5
  // src/identity/agent-identity.ts
6
6
  var AGENTS_SCHEMA = `
@@ -1,38 +1,38 @@
1
1
  import {
2
2
  createPendingRequest
3
- } from "./chunk-MZSVVG55.js";
3
+ } from "./chunk-5PV5YCSN.js";
4
4
  import {
5
5
  getAutonomyTier,
6
6
  insertAuditEvent
7
7
  } from "./chunk-G5WKW3ED.js";
8
8
  import {
9
9
  resolveTargetCapability
10
- } from "./chunk-2PP5MQPD.js";
10
+ } from "./chunk-UIPGGNRC.js";
11
11
  import {
12
12
  fetchRemoteCards
13
- } from "./chunk-PIPCGRCR.js";
13
+ } from "./chunk-ELFGYC22.js";
14
14
  import {
15
15
  holdEscrow,
16
16
  releaseEscrow,
17
17
  searchCards,
18
18
  settleEscrow
19
- } from "./chunk-HU46M4JA.js";
19
+ } from "./chunk-P3FDT7G5.js";
20
20
  import {
21
21
  RelayClient
22
- } from "./chunk-NX27AFPA.js";
22
+ } from "./chunk-UR3MISL2.js";
23
23
  import {
24
24
  requestCapability,
25
25
  requestViaRelay
26
- } from "./chunk-YKMBFQC2.js";
26
+ } from "./chunk-W6LOCBWQ.js";
27
27
  import {
28
28
  findPeer
29
29
  } from "./chunk-3YQ73ZM6.js";
30
30
  import {
31
31
  resolveCanonicalIdentity
32
- } from "./chunk-WTHMHNKC.js";
32
+ } from "./chunk-J4RFJVXI.js";
33
33
  import {
34
34
  AgentBnBError
35
- } from "./chunk-I7KWA7OB.js";
35
+ } from "./chunk-UVCNMRPS.js";
36
36
 
37
37
  // src/gateway/relay-dispatch.ts
38
38
  import { randomUUID } from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  insertCard
3
- } from "./chunk-COA2D7QM.js";
3
+ } from "./chunk-NLQCHO7N.js";
4
4
  import {
5
5
  CapabilityCardSchema
6
- } from "./chunk-I7KWA7OB.js";
6
+ } from "./chunk-UVCNMRPS.js";
7
7
 
8
8
  // src/skills/publish-capability.ts
9
9
  import { randomUUID } from "crypto";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ensureAgentsTable,
3
3
  resolveCanonicalIdentity
4
- } from "./chunk-WTHMHNKC.js";
4
+ } from "./chunk-J4RFJVXI.js";
5
5
  import {
6
6
  AgentBnBError,
7
7
  AnyCardSchema,
8
8
  CapabilityCardSchema
9
- } from "./chunk-I7KWA7OB.js";
9
+ } from "./chunk-UVCNMRPS.js";
10
10
 
11
11
  // src/registry/store.ts
12
12
  import Database from "better-sqlite3";