@relai-fi/x402 0.6.0-rc.3 → 0.6.0-rc.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.
package/dist/plugins.cjs CHANGED
@@ -21467,7 +21467,13 @@ var SCORE_FEEDBACK_IFACE = new import_ethers2.ethers.Interface([
21467
21467
  var SCORE_BATCH = 1900;
21468
21468
  var SCORE_HISTORY = 1e4;
21469
21469
  function score(config2) {
21470
- const agentId2 = String(config2.agentId);
21470
+ const rawAgentId = config2.agentId ?? (typeof process !== "undefined" ? process.env?.ERC8004_AGENT_ID : void 0);
21471
+ if (!rawAgentId || String(rawAgentId) === "undefined") {
21472
+ console.warn("[relai:score] ERC8004_AGENT_ID not set \u2014 score plugin is a no-op");
21473
+ return { name: "score", async onInit() {
21474
+ } };
21475
+ }
21476
+ const agentId2 = String(rawAgentId);
21471
21477
  const cacheTtlMs = config2.cacheTtlMs ?? 5 * 60 * 1e3;
21472
21478
  const rpcUrl = config2.rpcUrl ?? (typeof process !== "undefined" ? process.env?.ERC8004_RPC_URL : void 0) ?? "https://base-sepolia-testnet.skalenodes.com/v1/jubilant-horrible-ancha";
21473
21479
  let cached = null;
@@ -21565,7 +21571,13 @@ var FEEDBACK_REPUTATION_ABI = [
21565
21571
  "function giveFeedback(uint256 agentId, int128 value, uint8 valueDecimals, string tag1, string tag2, string endpoint, string feedbackURI, bytes32 feedbackHash) external"
21566
21572
  ];
21567
21573
  function feedback(config2) {
21568
- const agentId2 = String(config2.agentId);
21574
+ const rawAgentId = config2.agentId ?? (typeof process !== "undefined" ? process.env?.ERC8004_AGENT_ID : void 0);
21575
+ if (!rawAgentId || String(rawAgentId) === "undefined") {
21576
+ console.warn("[relai:feedback] ERC8004_AGENT_ID not set \u2014 feedback plugin is a no-op");
21577
+ return { name: "feedback", async onInit() {
21578
+ } };
21579
+ }
21580
+ const agentId2 = String(rawAgentId);
21569
21581
  const tag2 = config2.tag2 ?? "x402";
21570
21582
  const submitSuccessRate = config2.submitSuccessRate ?? true;
21571
21583
  const submitResponseTime = config2.submitResponseTime ?? true;