agentbnb 4.0.2 → 4.0.4

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  executeCapabilityRequest
3
- } from "./chunk-7NA43XCG.js";
3
+ } from "./chunk-5QGXARLJ.js";
4
4
  import "./chunk-T7NS2J2B.js";
5
5
  import "./chunk-DNWT5FZQ.js";
6
6
  import "./chunk-5KFI5X7B.js";
package/dist/index.d.ts CHANGED
@@ -3851,6 +3851,11 @@ interface ExecuteRequestOptions {
3851
3851
  timeoutMs?: number;
3852
3852
  /** Optional progress callback forwarded to SkillExecutor during execution. */
3853
3853
  onProgress?: ProgressCallback;
3854
+ /**
3855
+ * When true, skip local credit check and escrow management.
3856
+ * Used for relay-routed requests where the Hub relay has already held credits.
3857
+ */
3858
+ relayAuthorized?: boolean;
3854
3859
  }
3855
3860
  /**
3856
3861
  * Result of a capability execution.
package/dist/index.js CHANGED
@@ -797,7 +797,8 @@ async function executeCapabilityRequest(opts) {
797
797
  skillExecutor,
798
798
  handlerUrl,
799
799
  timeoutMs = 3e5,
800
- onProgress
800
+ onProgress,
801
+ relayAuthorized = false
801
802
  } = opts;
802
803
  const card = getCard(registryDb, cardId);
803
804
  if (!card) {
@@ -822,7 +823,8 @@ async function executeCapabilityRequest(opts) {
822
823
  }
823
824
  let escrowId = null;
824
825
  let isRemoteEscrow = false;
825
- if (receipt) {
826
+ if (relayAuthorized) {
827
+ } else if (receipt) {
826
828
  const { signature, ...receiptData2 } = receipt;
827
829
  const publicKeyBuf = Buffer.from(receipt.requester_public_key, "hex");
828
830
  const valid = verifyEscrowReceipt(receiptData2, signature, publicKeyBuf);
@@ -0,0 +1,12 @@
1
+ import {
2
+ findPeer,
3
+ loadPeers,
4
+ removePeer,
5
+ savePeer
6
+ } from "./chunk-EVBX22YU.js";
7
+ export {
8
+ findPeer,
9
+ loadPeers,
10
+ removePeer,
11
+ savePeer
12
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  executeCapabilityRequest
3
- } from "./chunk-7NA43XCG.js";
3
+ } from "./chunk-5QGXARLJ.js";
4
4
  import {
5
5
  listCards,
6
6
  openDatabase
@@ -275,7 +275,7 @@ async function startMcpServer() {
275
275
  registerPublishTool(server, ctx);
276
276
  const { registerRequestTool } = await import("./request-4GQSSM4B.js");
277
277
  const { registerConductTool } = await import("./conduct-N52JX7RT.js");
278
- const { registerServeSkillTool } = await import("./serve-skill-TPHZH6BS.js");
278
+ const { registerServeSkillTool } = await import("./serve-skill-Q6NHX2RA.js");
279
279
  registerRequestTool(server, ctx);
280
280
  registerConductTool(server, ctx);
281
281
  registerServeSkillTool(server, ctx);