@twin3-ai/agent-id 0.3.49 → 0.3.50

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/browser-sdk.js CHANGED
@@ -16,7 +16,7 @@
16
16
  // browser script and shipped in the package byte-for-byte, so it can
17
17
  // neither read the package at runtime nor go through a build step:
18
18
  // the version is written once here and CI refuses a mismatch.
19
- var SDK_VERSION = "0.3.49";
19
+ var SDK_VERSION = "0.3.50";
20
20
  var w = window;
21
21
  var d = document;
22
22
  var s = d.currentScript || {};
@@ -62,7 +62,7 @@ function responseRows(response, siteUrl, observedAt, windowKey = "") {
62
62
  if (!userAgent || count < 1 || status < 100 || status > 599) return [];
63
63
  const clean = cleanPath(dimensions.clientRequestPath);
64
64
  const eventId = `cfa1_${crypto.createHash("sha256").update(JSON.stringify([host, windowKey, userAgent, clean, status])).digest("hex").slice(0, 32)}`;
65
- return [{ event_id: eventId, host, path: clean, user_agent: userAgent, status, bytes: Math.max(0, Math.floor(Number(group && group.sum && group.sum.edgeResponseBytes || 0))), request_count: count, timestamp: observedAt, source: "cloudflare_ai_crawl_control" }];
65
+ return [{ event_id: eventId, host, path: clean, user_agent: userAgent, status, bytes: Math.max(0, Math.floor(Number(group && group.sum && group.sum.edgeResponseBytes || 0))), request_count: count, timestamp: observedAt, timestamp_is_request_time: false, observed_at: observedAt, event_time: null, record_kind: "aggregate", aggregate: true, window_key: String(windowKey || ""), time_basis: "observed_window", source_strength: "ua_claim", source: "cloudflare_ai_crawl_control" }];
66
66
  });
67
67
  }
68
68
  function createCloudflareA1Sync({ client, statePath, siteUrl, zoneId, apiToken, userAgents = DEFAULT_USER_AGENTS, lookbackMs = 3600000, intervalMs = 900000, maxPendingRows = 5000, fetchCloudflare = defaultFetchCloudflare, now = Date.now, random = Math.random } = {}) {
package/installer.js CHANGED
@@ -731,9 +731,11 @@ async function readEnterpriseVerificationCapability(projectRoot, expectedChallen
731
731
  }
732
732
  try {
733
733
  const key = await enterpriseCapabilityWrapKey(paths);
734
- const decipher = crypto.createDecipheriv("aes-256-gcm", key, Buffer.from(sealed.iv, "base64url"));
734
+ const decipher = crypto.createDecipheriv("aes-256-gcm", key, Buffer.from(sealed.iv, "base64url"), { authTagLength: 16 });
735
735
  decipher.setAAD(Buffer.from(`${VERIFICATION_CAPABILITY_AAD}\0${challenge}`, "utf8"));
736
- decipher.setAuthTag(Buffer.from(sealed.auth_tag, "base64url"));
736
+ const authTag = Buffer.from(sealed.auth_tag, "base64url");
737
+ if (authTag.length !== 16) throw new Error("invalid auth tag length");
738
+ decipher.setAuthTag(authTag);
737
739
  const capability = Buffer.concat([
738
740
  decipher.update(Buffer.from(sealed.ciphertext, "base64url")),
739
741
  decipher.final(),
package/mcp-i18n.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ const MCP_MESSAGES = Object.freeze({
4
+ en: Object.freeze({
5
+ backend_authentication_failed: "Backend authentication failed.",
6
+ backend_permission_denied: "Backend denied permission or tenant scope.",
7
+ backend_rate_limited: "Backend rate limit exceeded; retry later.",
8
+ backend_unavailable: "Backend service is unavailable or failed.",
9
+ backend_rejected_request: "Backend rejected the tool request.",
10
+ agentx_passport_verify: "Verify an AgentX.ID Passport issuer proof, content hash, revocation, and current xAgent ID without exposing issuer secrets; returns failure_codes, next_actions, and execution_policy.",
11
+ checkout_session: "Create a Stripe Checkout session bound to the verified website and xAgent ID.",
12
+ register_site_agent: "Create a stable Site xAgent ID and domain ownership challenge.",
13
+ recruiting_authorize_pull: "Issue one 60-second, purpose-bound authorization with use_limit=1 for the private Career orchestrator. XHuman atomically enforces consumption; xAgent ID stores only receipt/idempotency/audit evidence and never handles Human profile or message content.",
14
+ recruiting_disclosed_profile: "Read only the Human-owner-granted profile fields for one mutually consented introduction. xAgent ID does not persist the returned profile.",
15
+ recruiting_conversation_message: "Send one bounded text message from the authenticated Company Agent to the exact owner-opened Human Agent A2A thread. xAgent ID does not persist message content."
16
+ })
17
+ });
18
+
19
+ module.exports = { MCP_MESSAGES };