@vorim/sdk 3.11.0 → 3.15.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 (75) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/integrations/cloudflare.cjs +134 -0
  4. package/dist/integrations/cloudflare.cjs.map +1 -0
  5. package/dist/integrations/cloudflare.d.cts +93 -0
  6. package/dist/integrations/cloudflare.d.ts +93 -0
  7. package/dist/integrations/cloudflare.js +108 -0
  8. package/dist/integrations/cloudflare.js.map +1 -0
  9. package/dist/integrations/coinbase-cdp.cjs +230 -0
  10. package/dist/integrations/coinbase-cdp.cjs.map +1 -0
  11. package/dist/integrations/coinbase-cdp.d.cts +169 -0
  12. package/dist/integrations/coinbase-cdp.d.ts +169 -0
  13. package/dist/integrations/coinbase-cdp.js +204 -0
  14. package/dist/integrations/coinbase-cdp.js.map +1 -0
  15. package/dist/integrations/fhir.cjs +304 -0
  16. package/dist/integrations/fhir.cjs.map +1 -0
  17. package/dist/integrations/fhir.d.cts +185 -0
  18. package/dist/integrations/fhir.d.ts +185 -0
  19. package/dist/integrations/fhir.js +278 -0
  20. package/dist/integrations/fhir.js.map +1 -0
  21. package/dist/integrations/guidewire.cjs +363 -0
  22. package/dist/integrations/guidewire.cjs.map +1 -0
  23. package/dist/integrations/guidewire.d.cts +258 -0
  24. package/dist/integrations/guidewire.d.ts +258 -0
  25. package/dist/integrations/guidewire.js +337 -0
  26. package/dist/integrations/guidewire.js.map +1 -0
  27. package/dist/integrations/legal.cjs +339 -0
  28. package/dist/integrations/legal.cjs.map +1 -0
  29. package/dist/integrations/legal.d.cts +225 -0
  30. package/dist/integrations/legal.d.ts +225 -0
  31. package/dist/integrations/legal.js +313 -0
  32. package/dist/integrations/legal.js.map +1 -0
  33. package/dist/integrations/life-sciences.cjs +335 -0
  34. package/dist/integrations/life-sciences.cjs.map +1 -0
  35. package/dist/integrations/life-sciences.d.cts +214 -0
  36. package/dist/integrations/life-sciences.d.ts +214 -0
  37. package/dist/integrations/life-sciences.js +309 -0
  38. package/dist/integrations/life-sciences.js.map +1 -0
  39. package/dist/integrations/lithic.cjs +290 -0
  40. package/dist/integrations/lithic.cjs.map +1 -0
  41. package/dist/integrations/lithic.d.cts +130 -0
  42. package/dist/integrations/lithic.d.ts +130 -0
  43. package/dist/integrations/lithic.js +264 -0
  44. package/dist/integrations/lithic.js.map +1 -0
  45. package/dist/integrations/marqeta.cjs +285 -0
  46. package/dist/integrations/marqeta.cjs.map +1 -0
  47. package/dist/integrations/marqeta.d.cts +121 -0
  48. package/dist/integrations/marqeta.d.ts +121 -0
  49. package/dist/integrations/marqeta.js +259 -0
  50. package/dist/integrations/marqeta.js.map +1 -0
  51. package/dist/integrations/ramp.cjs +206 -0
  52. package/dist/integrations/ramp.cjs.map +1 -0
  53. package/dist/integrations/ramp.d.cts +139 -0
  54. package/dist/integrations/ramp.d.ts +139 -0
  55. package/dist/integrations/ramp.js +180 -0
  56. package/dist/integrations/ramp.js.map +1 -0
  57. package/dist/integrations/shopify.cjs +203 -0
  58. package/dist/integrations/shopify.cjs.map +1 -0
  59. package/dist/integrations/shopify.d.cts +175 -0
  60. package/dist/integrations/shopify.d.ts +175 -0
  61. package/dist/integrations/shopify.js +177 -0
  62. package/dist/integrations/shopify.js.map +1 -0
  63. package/dist/integrations/stripe-issuing.cjs +316 -0
  64. package/dist/integrations/stripe-issuing.cjs.map +1 -0
  65. package/dist/integrations/stripe-issuing.d.cts +154 -0
  66. package/dist/integrations/stripe-issuing.d.ts +154 -0
  67. package/dist/integrations/stripe-issuing.js +290 -0
  68. package/dist/integrations/stripe-issuing.js.map +1 -0
  69. package/dist/integrations/web-bot-auth.cjs +143 -0
  70. package/dist/integrations/web-bot-auth.cjs.map +1 -0
  71. package/dist/integrations/web-bot-auth.d.cts +51 -0
  72. package/dist/integrations/web-bot-auth.d.ts +51 -0
  73. package/dist/integrations/web-bot-auth.js +108 -0
  74. package/dist/integrations/web-bot-auth.js.map +1 -0
  75. package/package.json +121 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/integrations/web-bot-auth.ts"],"sourcesContent":["// ============================================================================\n// Vorim AI — Web Bot Auth (RFC 9421 HTTP Message Signatures)\n//\n// The agentic web needs agents to prove who they are to publishers, instead of\n// hiding behind a spoofable User-Agent. Web Bot Auth does this with RFC 9421\n// HTTP Message Signatures: the agent signs a few request components with its\n// Ed25519 key, and the publisher verifies the signature against the agent's\n// published key directory. Cloudflare, and a growing set of sites, check for it.\n//\n// Vorim already gives every agent an Ed25519 identity, a live trust score, and a\n// signed audit trail. This turns that same identity into Web-Bot-Auth headers,\n// so a Vorim agent is a first-class, verifiable citizen of the agentic web: the\n// publisher can confirm which agent is knocking, and the same identity carries a\n// trust score and a signed record of what it did next.\n//\n// This is a standalone signer (no API call, no Node): it uses Web Crypto Ed25519,\n// so it runs in a Cloudflare Worker, the browser, Deno, Bun, or Node 20+. Keep\n// the agent private key in a secret; it never leaves the process.\n//\n// Usage:\n// import { signRequestForBot } from '@vorim/sdk/integrations/web-bot-auth';\n//\n// const headers = await signRequestForBot({\n// method: 'GET',\n// url: 'https://publisher.example/article',\n// privateKey: env.AGENT_PRIVATE_KEY, // Ed25519 PKCS#8 PEM\n// signatureAgent: 'https://vorim.ai/agents/agid_abc123', // your key directory\n// });\n// // -> { 'Signature-Input': '...', 'Signature': '...', 'Signature-Agent': '...' }\n//\n// const res = await fetch('https://publisher.example/article', { headers });\n// ============================================================================\n\nexport interface WebBotAuthRequest {\n /** HTTP method, e.g. 'GET'. */\n method: string;\n /** Absolute request URL. Its authority and path are covered by the signature. */\n url: string;\n /** The agent's Ed25519 private key, PKCS#8 PEM. Never leaves the process. */\n privateKey: string;\n /**\n * The URL where the agent's public key(s) are published (its directory). Sent\n * as the Signature-Agent header and covered by the signature, so a publisher\n * knows where to fetch the key to verify. With Vorim, this is typically your\n * agent's public verification URL.\n */\n signatureAgent: string;\n /**\n * The agent's Ed25519 PUBLIC key, needed to compute the `keyid` (the JWK\n * thumbprint the Web Bot Auth spec requires). Accepts a SPKI PEM, or the raw\n * 32-byte key as a base64/base64url string or Uint8Array. Optional: if omitted\n * it is derived from `privateKey` in runtimes that can (Node / workerd with\n * nodejs_compat). In a pure-Web-Crypto runtime that cannot derive it, pass it.\n */\n publicKey?: string | Uint8Array;\n /** Signature validity window in seconds. Default 300 (5 minutes). */\n expiresInSeconds?: number;\n /** Unix seconds the signature was created. Default: now (pass in for tests). */\n createdAt?: number;\n /**\n * Optional random nonce, base64url. The spec lets clients include one to make a\n * signed request single-use. Omitted by default (the spec marks it optional).\n */\n nonce?: string;\n /** RFC 9421 signature label. Default 'sig1'. */\n label?: string;\n}\n\nexport interface WebBotAuthHeaders {\n 'Signature-Input': string;\n 'Signature': string;\n 'Signature-Agent': string;\n}\n\nconst bytesToBinary = (bytes: Uint8Array): string => {\n let s = '';\n for (let i = 0; i < bytes.length; i++) s += String.fromCharCode(bytes[i]);\n return s;\n};\n\nconst b64 = (buf: ArrayBuffer | Uint8Array): string => {\n const bytes = buf instanceof Uint8Array ? buf : new Uint8Array(buf);\n const s = bytesToBinary(bytes);\n // Prefer btoa where available (browser / Workers); fall back to Buffer (Node).\n return typeof btoa !== 'undefined' ? btoa(s) : Buffer.from(bytes).toString('base64');\n};\n\n// base64url, unpadded — the encoding both keyid (JWK thumbprint) and JWK `x`\n// require.\nconst b64url = (buf: ArrayBuffer | Uint8Array): string =>\n b64(buf).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n\nfunction b64AnyToBytes(s: string): Uint8Array {\n const norm = s.replace(/-/g, '+').replace(/_/g, '/');\n const padded = norm + '='.repeat((4 - (norm.length % 4)) % 4);\n const raw = typeof atob !== 'undefined' ? atob(padded) : Buffer.from(padded, 'base64').toString('binary');\n const out = new Uint8Array(raw.length);\n for (let i = 0; i < raw.length; i++) out[i] = raw.charCodeAt(i);\n return out;\n}\n\nfunction pemBodyToBytes(pem: string): Uint8Array {\n const body = pem.replace(/-----BEGIN [^-]+-----/, '').replace(/-----END [^-]+-----/, '').replace(/\\s+/g, '');\n return b64AnyToBytes(body);\n}\n\nfunction pemToPkcs8(pem: string): ArrayBuffer {\n const bytes = pemBodyToBytes(pem);\n const out = new ArrayBuffer(bytes.length);\n new Uint8Array(out).set(bytes);\n return out;\n}\n\nasync function sha256(bytes: Uint8Array): Promise<Uint8Array> {\n if (typeof globalThis.crypto?.subtle !== 'undefined') {\n return new Uint8Array(await globalThis.crypto.subtle.digest('SHA-256', bytes));\n }\n const nodeCrypto = await import('node:crypto');\n return new Uint8Array(nodeCrypto.createHash('sha256').update(bytes).digest());\n}\n\n// Pull the raw 32-byte Ed25519 public key out of whatever the caller gave us,\n// or derive it from the private key where the runtime can (Node / nodejs_compat).\n// Returns null only when no public key is available and it cannot be derived —\n// the caller then throws a clear error rather than emitting a wrong keyid.\nasync function rawEd25519PublicKey(req: WebBotAuthRequest): Promise<Uint8Array | null> {\n const pk = req.publicKey;\n if (pk instanceof Uint8Array) return last32(pk);\n if (typeof pk === 'string') {\n if (pk.includes('-----BEGIN')) return spkiToRawEd25519(pemBodyToBytes(pk));\n return last32(b64AnyToBytes(pk)); // raw 32-byte key, base64 or base64url\n }\n // Derive from the private key. Web Crypto cannot export a public key from a\n // private-only import, so this path needs node:crypto (present in Node and in\n // workerd with nodejs_compat). In a pure-Web-Crypto runtime, pass publicKey.\n try {\n const nodeCrypto = await import('node:crypto');\n const keyObj = nodeCrypto.createPublicKey(nodeCrypto.createPrivateKey(req.privateKey));\n const spki = keyObj.export({ format: 'der', type: 'spki' }) as Uint8Array;\n return spkiToRawEd25519(new Uint8Array(spki));\n } catch {\n return null;\n }\n}\n\n// Ed25519 SPKI is a fixed 44-byte structure ending in the 32-byte key.\nconst spkiToRawEd25519 = (spki: Uint8Array): Uint8Array => last32(spki);\nconst last32 = (b: Uint8Array): Uint8Array => (b.length <= 32 ? b : b.slice(b.length - 32));\n\n/**\n * The Web Bot Auth keyid: base64url SHA-256 JWK thumbprint of the Ed25519 key,\n * per RFC 7638 with the RFC 8037 OKP members in lexical order (crv, kty, x).\n * This is the value a compliant verifier (Cloudflare and others) matches against\n * the key it fetched from the Signature-Agent directory.\n */\nasync function ed25519JwkThumbprint(rawPublicKey: Uint8Array): Promise<string> {\n const x = b64url(rawPublicKey);\n const json = `{\"crv\":\"Ed25519\",\"kty\":\"OKP\",\"x\":\"${x}\"}`;\n return b64url(await sha256(new TextEncoder().encode(json)));\n}\n\nasync function ed25519Sign(payload: string, privateKeyPem: string): Promise<ArrayBuffer> {\n if (typeof globalThis.crypto?.subtle !== 'undefined') {\n const key = await globalThis.crypto.subtle.importKey('pkcs8', pemToPkcs8(privateKeyPem), { name: 'Ed25519' }, false, ['sign']);\n return globalThis.crypto.subtle.sign('Ed25519', key, new TextEncoder().encode(payload));\n }\n const nodeCrypto = await import('node:crypto');\n const sig = nodeCrypto.sign(null, Buffer.from(payload), privateKeyPem);\n return sig.buffer.slice(sig.byteOffset, sig.byteOffset + sig.byteLength);\n}\n\n/**\n * Produce RFC 9421 Web Bot Auth headers for an outbound agent request.\n *\n * The signature covers @authority, @method, @path, and signature-agent, plus the\n * signature params (created, expires, keyid, alg=ed25519, tag=\"web-bot-auth\",\n * and nonce when supplied), per the Web Bot Auth profile. `keyid` is the base64url\n * SHA-256 JWK thumbprint of the Ed25519 key, as the spec requires. Returns the\n * three headers to attach to fetch().\n */\nexport async function signRequestForBot(req: WebBotAuthRequest): Promise<WebBotAuthHeaders> {\n if (!req?.privateKey) throw new Error('[vorim] Web Bot Auth requires the agent privateKey (Ed25519 PKCS#8 PEM).');\n if (!req?.signatureAgent) throw new Error('[vorim] Web Bot Auth requires a signatureAgent directory URL.');\n\n const u = new URL(req.url);\n const method = req.method.toUpperCase();\n const created = req.createdAt ?? Math.floor(nowSeconds());\n const expires = created + (req.expiresInSeconds ?? 300);\n const label = req.label ?? 'sig1';\n const sigAgentValue = `\"${req.signatureAgent}\"`;\n\n // keyid MUST be the base64url SHA-256 JWK thumbprint of the signing key\n // (RFC 7638 + RFC 8037 A.3), not the directory URL — that is what a compliant\n // verifier matches against the key it fetched from Signature-Agent.\n const rawPub = await rawEd25519PublicKey(req);\n if (!rawPub) {\n throw new Error('[vorim] Web Bot Auth could not derive the public key in this runtime. Pass `publicKey` (SPKI PEM or raw 32-byte base64) so keyid can be the JWK thumbprint the spec requires.');\n }\n const keyid = await ed25519JwkThumbprint(rawPub);\n\n // Covered components, in the order they appear in the signature base.\n const covered = ['@authority', '@method', '@path', 'signature-agent'];\n const nonceParam = req.nonce ? `;nonce=\"${req.nonce}\"` : '';\n const paramsInner = `(${covered.map((c) => `\"${c}\"`).join(' ')});created=${created};expires=${expires};keyid=\"${keyid}\";alg=\"ed25519\";tag=\"web-bot-auth\"${nonceParam}`;\n\n // RFC 9421 signature base: one line per covered component, then the\n // @signature-params line whose value is the inner params string above.\n const baseLines: string[] = [\n `\"@authority\": ${u.host}`,\n `\"@method\": ${method}`,\n `\"@path\": ${u.pathname}`,\n `\"signature-agent\": ${sigAgentValue}`,\n `\"@signature-params\": ${paramsInner}`,\n ];\n const signatureBase = baseLines.join('\\n');\n\n const signature = await ed25519Sign(signatureBase, req.privateKey);\n\n return {\n 'Signature-Input': `${label}=${paramsInner}`,\n 'Signature': `${label}=:${b64(signature)}:`,\n 'Signature-Agent': sigAgentValue,\n };\n}\n\n// nowSeconds is isolated so callers/tests can reason about time; production uses\n// Date.now(). (The SDK targets runtimes where Date is available.)\nfunction nowSeconds(): number {\n return Date.now() / 1000;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0EA,IAAM,gBAAgB,CAAC,UAA8B;AACnD,MAAI,IAAI;AACR,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,IAAK,MAAK,OAAO,aAAa,MAAM,CAAC,CAAC;AACxE,SAAO;AACT;AAEA,IAAM,MAAM,CAAC,QAA0C;AACrD,Q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,aAAa,GAAG,KAAK,KAAK,IAAI,SAAS,CAAC;AAAA,IACxC,mBAAmB;AAAA,EACrB;AACF;AAIA,SAAS,aAAqB;AAC5B,SAAO,KAAK,IAAI,IAAI;AACtB;","names":[]}
@@ -0,0 +1,51 @@
1
+ interface WebBotAuthRequest {
2
+ /** HTTP method, e.g. 'GET'. */
3
+ method: string;
4
+ /** Absolute request URL. Its authority and path are covered by the signature. */
5
+ url: string;
6
+ /** The agent's Ed25519 private key, PKCS#8 PEM. Never leaves the process. */
7
+ privateKey: string;
8
+ /**
9
+ * The URL where the agent's public key(s) are published (its directory). Sent
10
+ * as the Signature-Agent header and covered by the signature, so a publisher
11
+ * knows where to fetch the key to verify. With Vorim, this is typically your
12
+ * agent's public verification URL.
13
+ */
14
+ signatureAgent: string;
15
+ /**
16
+ * The agent's Ed25519 PUBLIC key, needed to compute the `keyid` (the JWK
17
+ * thumbprint the Web Bot Auth spec requires). Accepts a SPKI PEM, or the raw
18
+ * 32-byte key as a base64/base64url string or Uint8Array. Optional: if omitted
19
+ * it is derived from `privateKey` in runtimes that can (Node / workerd with
20
+ * nodejs_compat). In a pure-Web-Crypto runtime that cannot derive it, pass it.
21
+ */
22
+ publicKey?: string | Uint8Array;
23
+ /** Signature validity window in seconds. Default 300 (5 minutes). */
24
+ expiresInSeconds?: number;
25
+ /** Unix seconds the signature was created. Default: now (pass in for tests). */
26
+ createdAt?: number;
27
+ /**
28
+ * Optional random nonce, base64url. The spec lets clients include one to make a
29
+ * signed request single-use. Omitted by default (the spec marks it optional).
30
+ */
31
+ nonce?: string;
32
+ /** RFC 9421 signature label. Default 'sig1'. */
33
+ label?: string;
34
+ }
35
+ interface WebBotAuthHeaders {
36
+ 'Signature-Input': string;
37
+ 'Signature': string;
38
+ 'Signature-Agent': string;
39
+ }
40
+ /**
41
+ * Produce RFC 9421 Web Bot Auth headers for an outbound agent request.
42
+ *
43
+ * The signature covers @authority, @method, @path, and signature-agent, plus the
44
+ * signature params (created, expires, keyid, alg=ed25519, tag="web-bot-auth",
45
+ * and nonce when supplied), per the Web Bot Auth profile. `keyid` is the base64url
46
+ * SHA-256 JWK thumbprint of the Ed25519 key, as the spec requires. Returns the
47
+ * three headers to attach to fetch().
48
+ */
49
+ declare function signRequestForBot(req: WebBotAuthRequest): Promise<WebBotAuthHeaders>;
50
+
51
+ export { type WebBotAuthHeaders, type WebBotAuthRequest, signRequestForBot };
@@ -0,0 +1,51 @@
1
+ interface WebBotAuthRequest {
2
+ /** HTTP method, e.g. 'GET'. */
3
+ method: string;
4
+ /** Absolute request URL. Its authority and path are covered by the signature. */
5
+ url: string;
6
+ /** The agent's Ed25519 private key, PKCS#8 PEM. Never leaves the process. */
7
+ privateKey: string;
8
+ /**
9
+ * The URL where the agent's public key(s) are published (its directory). Sent
10
+ * as the Signature-Agent header and covered by the signature, so a publisher
11
+ * knows where to fetch the key to verify. With Vorim, this is typically your
12
+ * agent's public verification URL.
13
+ */
14
+ signatureAgent: string;
15
+ /**
16
+ * The agent's Ed25519 PUBLIC key, needed to compute the `keyid` (the JWK
17
+ * thumbprint the Web Bot Auth spec requires). Accepts a SPKI PEM, or the raw
18
+ * 32-byte key as a base64/base64url string or Uint8Array. Optional: if omitted
19
+ * it is derived from `privateKey` in runtimes that can (Node / workerd with
20
+ * nodejs_compat). In a pure-Web-Crypto runtime that cannot derive it, pass it.
21
+ */
22
+ publicKey?: string | Uint8Array;
23
+ /** Signature validity window in seconds. Default 300 (5 minutes). */
24
+ expiresInSeconds?: number;
25
+ /** Unix seconds the signature was created. Default: now (pass in for tests). */
26
+ createdAt?: number;
27
+ /**
28
+ * Optional random nonce, base64url. The spec lets clients include one to make a
29
+ * signed request single-use. Omitted by default (the spec marks it optional).
30
+ */
31
+ nonce?: string;
32
+ /** RFC 9421 signature label. Default 'sig1'. */
33
+ label?: string;
34
+ }
35
+ interface WebBotAuthHeaders {
36
+ 'Signature-Input': string;
37
+ 'Signature': string;
38
+ 'Signature-Agent': string;
39
+ }
40
+ /**
41
+ * Produce RFC 9421 Web Bot Auth headers for an outbound agent request.
42
+ *
43
+ * The signature covers @authority, @method, @path, and signature-agent, plus the
44
+ * signature params (created, expires, keyid, alg=ed25519, tag="web-bot-auth",
45
+ * and nonce when supplied), per the Web Bot Auth profile. `keyid` is the base64url
46
+ * SHA-256 JWK thumbprint of the Ed25519 key, as the spec requires. Returns the
47
+ * three headers to attach to fetch().
48
+ */
49
+ declare function signRequestForBot(req: WebBotAuthRequest): Promise<WebBotAuthHeaders>;
50
+
51
+ export { type WebBotAuthHeaders, type WebBotAuthRequest, signRequestForBot };
@@ -0,0 +1,108 @@
1
+ // src/integrations/web-bot-auth.ts
2
+ var bytesToBinary = (bytes) => {
3
+ let s = "";
4
+ for (let i = 0; i < bytes.length; i++) s += String.fromCharCode(bytes[i]);
5
+ return s;
6
+ };
7
+ var b64 = (buf) => {
8
+ const bytes = buf instanceof Uint8Array ? buf : new Uint8Array(buf);
9
+ const s = bytesToBinary(bytes);
10
+ return typeof btoa !== "undefined" ? btoa(s) : Buffer.from(bytes).toString("base64");
11
+ };
12
+ var b64url = (buf) => b64(buf).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
13
+ function b64AnyToBytes(s) {
14
+ const norm = s.replace(/-/g, "+").replace(/_/g, "/");
15
+ const padded = norm + "=".repeat((4 - norm.length % 4) % 4);
16
+ const raw = typeof atob !== "undefined" ? atob(padded) : Buffer.from(padded, "base64").toString("binary");
17
+ const out = new Uint8Array(raw.length);
18
+ for (let i = 0; i < raw.length; i++) out[i] = raw.charCodeAt(i);
19
+ return out;
20
+ }
21
+ function pemBodyToBytes(pem) {
22
+ const body = pem.replace(/-----BEGIN [^-]+-----/, "").replace(/-----END [^-]+-----/, "").replace(/\s+/g, "");
23
+ return b64AnyToBytes(body);
24
+ }
25
+ function pemToPkcs8(pem) {
26
+ const bytes = pemBodyToBytes(pem);
27
+ const out = new ArrayBuffer(bytes.length);
28
+ new Uint8Array(out).set(bytes);
29
+ return out;
30
+ }
31
+ async function sha256(bytes) {
32
+ if (typeof globalThis.crypto?.subtle !== "undefined") {
33
+ return new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256", bytes));
34
+ }
35
+ const nodeCrypto = await import("crypto");
36
+ return new Uint8Array(nodeCrypto.createHash("sha256").update(bytes).digest());
37
+ }
38
+ async function rawEd25519PublicKey(req) {
39
+ const pk = req.publicKey;
40
+ if (pk instanceof Uint8Array) return last32(pk);
41
+ if (typeof pk === "string") {
42
+ if (pk.includes("-----BEGIN")) return spkiToRawEd25519(pemBodyToBytes(pk));
43
+ return last32(b64AnyToBytes(pk));
44
+ }
45
+ try {
46
+ const nodeCrypto = await import("crypto");
47
+ const keyObj = nodeCrypto.createPublicKey(nodeCrypto.createPrivateKey(req.privateKey));
48
+ const spki = keyObj.export({ format: "der", type: "spki" });
49
+ return spkiToRawEd25519(new Uint8Array(spki));
50
+ } catch {
51
+ return null;
52
+ }
53
+ }
54
+ var spkiToRawEd25519 = (spki) => last32(spki);
55
+ var last32 = (b) => b.length <= 32 ? b : b.slice(b.length - 32);
56
+ async function ed25519JwkThumbprint(rawPublicKey) {
57
+ const x = b64url(rawPublicKey);
58
+ const json = `{"crv":"Ed25519","kty":"OKP","x":"${x}"}`;
59
+ return b64url(await sha256(new TextEncoder().encode(json)));
60
+ }
61
+ async function ed25519Sign(payload, privateKeyPem) {
62
+ if (typeof globalThis.crypto?.subtle !== "undefined") {
63
+ const key = await globalThis.crypto.subtle.importKey("pkcs8", pemToPkcs8(privateKeyPem), { name: "Ed25519" }, false, ["sign"]);
64
+ return globalThis.crypto.subtle.sign("Ed25519", key, new TextEncoder().encode(payload));
65
+ }
66
+ const nodeCrypto = await import("crypto");
67
+ const sig = nodeCrypto.sign(null, Buffer.from(payload), privateKeyPem);
68
+ return sig.buffer.slice(sig.byteOffset, sig.byteOffset + sig.byteLength);
69
+ }
70
+ async function signRequestForBot(req) {
71
+ if (!req?.privateKey) throw new Error("[vorim] Web Bot Auth requires the agent privateKey (Ed25519 PKCS#8 PEM).");
72
+ if (!req?.signatureAgent) throw new Error("[vorim] Web Bot Auth requires a signatureAgent directory URL.");
73
+ const u = new URL(req.url);
74
+ const method = req.method.toUpperCase();
75
+ const created = req.createdAt ?? Math.floor(nowSeconds());
76
+ const expires = created + (req.expiresInSeconds ?? 300);
77
+ const label = req.label ?? "sig1";
78
+ const sigAgentValue = `"${req.signatureAgent}"`;
79
+ const rawPub = await rawEd25519PublicKey(req);
80
+ if (!rawPub) {
81
+ throw new Error("[vorim] Web Bot Auth could not derive the public key in this runtime. Pass `publicKey` (SPKI PEM or raw 32-byte base64) so keyid can be the JWK thumbprint the spec requires.");
82
+ }
83
+ const keyid = await ed25519JwkThumbprint(rawPub);
84
+ const covered = ["@authority", "@method", "@path", "signature-agent"];
85
+ const nonceParam = req.nonce ? `;nonce="${req.nonce}"` : "";
86
+ const paramsInner = `(${covered.map((c) => `"${c}"`).join(" ")});created=${created};expires=${expires};keyid="${keyid}";alg="ed25519";tag="web-bot-auth"${nonceParam}`;
87
+ const baseLines = [
88
+ `"@authority": ${u.host}`,
89
+ `"@method": ${method}`,
90
+ `"@path": ${u.pathname}`,
91
+ `"signature-agent": ${sigAgentValue}`,
92
+ `"@signature-params": ${paramsInner}`
93
+ ];
94
+ const signatureBase = baseLines.join("\n");
95
+ const signature = await ed25519Sign(signatureBase, req.privateKey);
96
+ return {
97
+ "Signature-Input": `${label}=${paramsInner}`,
98
+ "Signature": `${label}=:${b64(signature)}:`,
99
+ "Signature-Agent": sigAgentValue
100
+ };
101
+ }
102
+ function nowSeconds() {
103
+ return Date.now() / 1e3;
104
+ }
105
+ export {
106
+ signRequestForBot
107
+ };
108
+ //# sourceMappingURL=web-bot-auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/integrations/web-bot-auth.ts"],"sourcesContent":["// ============================================================================\n// Vorim AI — Web Bot Auth (RFC 9421 HTTP Message Signatures)\n//\n// The agentic web needs agents to prove who they are to publishers, instead of\n// hiding behind a spoofable User-Agent. Web Bot Auth does this with RFC 9421\n// HTTP Message Signatures: the agent signs a few request components with its\n// Ed25519 key, and the publisher verifies the signature against the agent's\n// published key directory. Cloudflare, and a growing set of sites, check for it.\n//\n// Vorim already gives every agent an Ed25519 identity, a live trust score, and a\n// signed audit trail. This turns that same identity into Web-Bot-Auth headers,\n// so a Vorim agent is a first-class, verifiable citizen of the agentic web: the\n// publisher can confirm which agent is knocking, and the same identity carries a\n// trust score and a signed record of what it did next.\n//\n// This is a standalone signer (no API call, no Node): it uses Web Crypto Ed25519,\n// so it runs in a Cloudflare Worker, the browser, Deno, Bun, or Node 20+. Keep\n// the agent private key in a secret; it never leaves the process.\n//\n// Usage:\n// import { signRequestForBot } from '@vorim/sdk/integrations/web-bot-auth';\n//\n// const headers = await signRequestForBot({\n// method: 'GET',\n// url: 'https://publisher.example/article',\n// privateKey: env.AGENT_PRIVATE_KEY, // Ed25519 PKCS#8 PEM\n// signatureAgent: 'https://vorim.ai/agents/agid_abc123', // your key directory\n// });\n// // -> { 'Signature-Input': '...', 'Signature': '...', 'Signature-Agent': '...' }\n//\n// const res = await fetch('https://publisher.example/article', { headers });\n// ============================================================================\n\nexport interface WebBotAuthRequest {\n /** HTTP method, e.g. 'GET'. */\n method: string;\n /** Absolute request URL. Its authority and path are covered by the signature. */\n url: string;\n /** The agent's Ed25519 private key, PKCS#8 PEM. Never leaves the process. */\n privateKey: string;\n /**\n * The URL where the agent's public key(s) are published (its directory). Sent\n * as the Signature-Agent header and covered by the signature, so a publisher\n * knows where to fetch the key to verify. With Vorim, this is typically your\n * agent's public verification URL.\n */\n signatureAgent: string;\n /**\n * The agent's Ed25519 PUBLIC key, needed to compute the `keyid` (the JWK\n * thumbprint the Web Bot Auth spec requires). Accepts a SPKI PEM, or the raw\n * 32-byte key as a base64/base64url string or Uint8Array. Optional: if omitted\n * it is derived from `privateKey` in runtimes that can (Node / workerd with\n * nodejs_compat). In a pure-Web-Crypto runtime that cannot derive it, pass it.\n */\n publicKey?: string | Uint8Array;\n /** Signature validity window in seconds. Default 300 (5 minutes). */\n expiresInSeconds?: number;\n /** Unix seconds the signature was created. Default: now (pass in for tests). */\n createdAt?: number;\n /**\n * Optional random nonce, base64url. The spec lets clients include one to make a\n * signed request single-use. Omitted by default (the spec marks it optional).\n */\n nonce?: string;\n /** RFC 9421 signature label. Default 'sig1'. */\n label?: string;\n}\n\nexport interface WebBotAuthHeaders {\n 'Signature-Input': string;\n 'Signature': string;\n 'Signature-Agent': string;\n}\n\nconst bytesToBinary = (bytes: Uint8Array): string => {\n let s = '';\n for (let i = 0; i < bytes.length; i++) s += String.fromCharCode(bytes[i]);\n return s;\n};\n\nconst b64 = (buf: ArrayBuffer | Uint8Array): string => {\n const bytes = buf instanceof Uint8Array ? buf : new Uint8Array(buf);\n const s = bytesToBinary(bytes);\n // Prefer btoa where available (browser / Workers); fall back to Buffer (Node).\n return typeof btoa !== 'undefined' ? btoa(s) : Buffer.from(bytes).toString('base64');\n};\n\n// base64url, unpadded — the encoding both keyid (JWK thumbprint) and JWK `x`\n// require.\nconst b64url = (buf: ArrayBuffer | Uint8Array): string =>\n b64(buf).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n\nfunction b64AnyToBytes(s: string): Uint8Array {\n const norm = s.replace(/-/g, '+').replace(/_/g, '/');\n const padded = norm + '='.repeat((4 - (norm.length % 4)) % 4);\n const raw = typeof atob !== 'undefined' ? atob(padded) : Buffer.from(padded, 'base64').toString('binary');\n const out = new Uint8Array(raw.length);\n for (let i = 0; i < raw.length; i++) out[i] = raw.charCodeAt(i);\n return out;\n}\n\nfunction pemBodyToBytes(pem: string): Uint8Array {\n const body = pem.replace(/-----BEGIN [^-]+-----/, '').replace(/-----END [^-]+-----/, '').replace(/\\s+/g, '');\n return b64AnyToBytes(body);\n}\n\nfunction pemToPkcs8(pem: string): ArrayBuffer {\n const bytes = pemBodyToBytes(pem);\n const out = new ArrayBuffer(bytes.length);\n new Uint8Array(out).set(bytes);\n return out;\n}\n\nasync function sha256(bytes: Uint8Array): Promise<Uint8Array> {\n if (typeof globalThis.crypto?.subtle !== 'undefined') {\n return new Uint8Array(await globalThis.crypto.subtle.digest('SHA-256', bytes));\n }\n const nodeCrypto = await import('node:crypto');\n return new Uint8Array(nodeCrypto.createHash('sha256').update(bytes).digest());\n}\n\n// Pull the raw 32-byte Ed25519 public key out of whatever the caller gave us,\n// or derive it from the private key where the runtime can (Node / nodejs_compat).\n// Returns null only when no public key is available and it cannot be derived —\n// the caller then throws a clear error rather than emitting a wrong keyid.\nasync function rawEd25519PublicKey(req: WebBotAuthRequest): Promise<Uint8Array | null> {\n const pk = req.publicKey;\n if (pk instanceof Uint8Array) return last32(pk);\n if (typeof pk === 'string') {\n if (pk.includes('-----BEGIN')) return spkiToRawEd25519(pemBodyToBytes(pk));\n return last32(b64AnyToBytes(pk)); // raw 32-byte key, base64 or base64url\n }\n // Derive from the private key. Web Crypto cannot export a public key from a\n // private-only import, so this path needs node:crypto (present in Node and in\n // workerd with nodejs_compat). In a pure-Web-Crypto runtime, pass publicKey.\n try {\n const nodeCrypto = await import('node:crypto');\n const keyObj = nodeCrypto.createPublicKey(nodeCrypto.createPrivateKey(req.privateKey));\n const spki = keyObj.export({ format: 'der', type: 'spki' }) as Uint8Array;\n return spkiToRawEd25519(new Uint8Array(spki));\n } catch {\n return null;\n }\n}\n\n// Ed25519 SPKI is a fixed 44-byte structure ending in the 32-byte key.\nconst spkiToRawEd25519 = (spki: Uint8Array): Uint8Array => last32(spki);\nconst last32 = (b: Uint8Array): Uint8Array => (b.length <= 32 ? b : b.slice(b.length - 32));\n\n/**\n * The Web Bot Auth keyid: base64url SHA-256 JWK thumbprint of the Ed25519 key,\n * per RFC 7638 with the RFC 8037 OKP members in lexical order (crv, kty, x).\n * This is the value a compliant verifier (Cloudflare and others) matches against\n * the key it fetched from the Signature-Agent directory.\n */\nasync function ed25519JwkThumbprint(rawPublicKey: Uint8Array): Promise<string> {\n const x = b64url(rawPublicKey);\n const json = `{\"crv\":\"Ed25519\",\"kty\":\"OKP\",\"x\":\"${x}\"}`;\n return b64url(await sha256(new TextEncoder().encode(json)));\n}\n\nasync function ed25519Sign(payload: string, privateKeyPem: string): Promise<ArrayBuffer> {\n if (typeof globalThis.crypto?.subtle !== 'undefined') {\n const key = await globalThis.crypto.subtle.importKey('pkcs8', pemToPkcs8(privateKeyPem), { name: 'Ed25519' }, false, ['sign']);\n return globalThis.crypto.subtle.sign('Ed25519', key, new TextEncoder().encode(payload));\n }\n const nodeCrypto = await import('node:crypto');\n const sig = nodeCrypto.sign(null, Buffer.from(payload), privateKeyPem);\n return sig.buffer.slice(sig.byteOffset, sig.byteOffset + sig.byteLength);\n}\n\n/**\n * Produce RFC 9421 Web Bot Auth headers for an outbound agent request.\n *\n * The signature covers @authority, @method, @path, and signature-agent, plus the\n * signature params (created, expires, keyid, alg=ed25519, tag=\"web-bot-auth\",\n * and nonce when supplied), per the Web Bot Auth profile. `keyid` is the base64url\n * SHA-256 JWK thumbprint of the Ed25519 key, as the spec requires. Returns the\n * three headers to attach to fetch().\n */\nexport async function signRequestForBot(req: WebBotAuthRequest): Promise<WebBotAuthHeaders> {\n if (!req?.privateKey) throw new Error('[vorim] Web Bot Auth requires the agent privateKey (Ed25519 PKCS#8 PEM).');\n if (!req?.signatureAgent) throw new Error('[vorim] Web Bot Auth requires a signatureAgent directory URL.');\n\n const u = new URL(req.url);\n const method = req.method.toUpperCase();\n const created = req.createdAt ?? Math.floor(nowSeconds());\n const expires = created + (req.expiresInSeconds ?? 300);\n const label = req.label ?? 'sig1';\n const sigAgentValue = `\"${req.signatureAgent}\"`;\n\n // keyid MUST be the base64url SHA-256 JWK thumbprint of the signing key\n // (RFC 7638 + RFC 8037 A.3), not the directory URL — that is what a compliant\n // verifier matches against the key it fetched from Signature-Agent.\n const rawPub = await rawEd25519PublicKey(req);\n if (!rawPub) {\n throw new Error('[vorim] Web Bot Auth could not derive the public key in this runtime. Pass `publicKey` (SPKI PEM or raw 32-byte base64) so keyid can be the JWK thumbprint the spec requires.');\n }\n const keyid = await ed25519JwkThumbprint(rawPub);\n\n // Covered components, in the order they appear in the signature base.\n const covered = ['@authority', '@method', '@path', 'signature-agent'];\n const nonceParam = req.nonce ? `;nonce=\"${req.nonce}\"` : '';\n const paramsInner = `(${covered.map((c) => `\"${c}\"`).join(' ')});created=${created};expires=${expires};keyid=\"${keyid}\";alg=\"ed25519\";tag=\"web-bot-auth\"${nonceParam}`;\n\n // RFC 9421 signature base: one line per covered component, then the\n // @signature-params line whose value is the inner params string above.\n const baseLines: string[] = [\n `\"@authority\": ${u.host}`,\n `\"@method\": ${method}`,\n `\"@path\": ${u.pathname}`,\n `\"signature-agent\": ${sigAgentValue}`,\n `\"@signature-params\": ${paramsInner}`,\n ];\n const signatureBase = baseLines.join('\\n');\n\n const signature = await ed25519Sign(signatureBase, req.privateKey);\n\n return {\n 'Signature-Input': `${label}=${paramsInner}`,\n 'Signature': `${label}=:${b64(signature)}:`,\n 'Signature-Agent': sigAgentValue,\n };\n}\n\n// nowSeconds is isolated so callers/tests can reason about time; production uses\n// Date.now(). (The SDK targets runtimes where Date is available.)\nfunction nowSeconds(): number {\n return Date.now() / 1000;\n}\n"],"mappings":";AA0EA,IAAM,gBAAgB,CAAC,UAA8B;AACnD,MAAI,IAAI;AACR,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,IAAK,MAAK,OAAO,aAAa,MAAM,CAAC,CAAC;AACxE,SAAO;AACT;AAEA,IAAM,MAAM,CAAC,QAA0C;AACrD,QAAM,QAAQ,eAAe,aAAa,MAAM,IAAI,WAAW,GAAG;AAClE,QAAM,IAAI,cAAc,KAAK;AAE7B,SAAO,OAAO,SAAS,cAAc,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,EAAE,SAAS,QAAQ;AACrF;AAIA,IAAM,SAAS,CAAC,QACd,IAAI,GAAG,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,OAAO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,IAAI,IAAI,IAAI,GAAG;AACzB,QAAM,SAAS,IAAI,OAAO,YAAY;AACtC,QAAM,UAAU,IAAI,aAAa,KAAK,MAAM,WAAW,CAAC;AACxD,QAAM,UAAU,WAAW,IAAI,oBAAoB;AACnD,QAAM,QAAQ,IAAI,SAAS;AAC3B,QAAM,gBAAgB,IAAI,IAAI,cAAc;AAK5C,QAAM,SAAS,MAAM,oBAAoB,GAAG;AAC5C,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,MAAM,+KAA+K;AAAA,EACjM;AACA,QAAM,QAAQ,MAAM,qBAAqB,MAAM;AAG/C,QAAM,UAAU,CAAC,cAAc,WAAW,SAAS,iBAAiB;AACpE,QAAM,aAAa,IAAI,QAAQ,WAAW,IAAI,KAAK,MAAM;AACzD,QAAM,cAAc,IAAI,QAAQ,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,KAAK,GAAG,CAAC,aAAa,OAAO,YAAY,OAAO,WAAW,KAAK,qCAAqC,UAAU;AAIpK,QAAM,YAAsB;AAAA,IAC1B,iBAAiB,EAAE,IAAI;AAAA,IACvB,cAAc,MAAM;AAAA,IACpB,YAAY,EAAE,QAAQ;AAAA,IACtB,sBAAsB,aAAa;AAAA,IACnC,wBAAwB,WAAW;AAAA,EACrC;AACA,QAAM,gBAAgB,UAAU,KAAK,IAAI;AAEzC,QAAM,YAAY,MAAM,YAAY,eAAe,IAAI,UAAU;AAEjE,SAAO;AAAA,IACL,mBAAmB,GAAG,KAAK,IAAI,WAAW;AAAA,IAC1C,aAAa,GAAG,KAAK,KAAK,IAAI,SAAS,CAAC;AAAA,IACxC,mBAAmB;AAAA,EACrB;AACF;AAIA,SAAS,aAAqB;AAC5B,SAAO,KAAK,IAAI,IAAI;AACtB;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vorim/sdk",
3
- "version": "3.11.0",
3
+ "version": "3.15.0",
4
4
  "description": "Official TypeScript SDK for Vorim AI — AI Agent Identity, Permissions & Audit",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -217,6 +217,126 @@
217
217
  "default": "./dist/integrations/truanon.cjs"
218
218
  }
219
219
  },
220
+ "./integrations/cloudflare": {
221
+ "import": {
222
+ "types": "./dist/integrations/cloudflare.d.ts",
223
+ "default": "./dist/integrations/cloudflare.js"
224
+ },
225
+ "require": {
226
+ "types": "./dist/integrations/cloudflare.d.cts",
227
+ "default": "./dist/integrations/cloudflare.cjs"
228
+ }
229
+ },
230
+ "./integrations/web-bot-auth": {
231
+ "import": {
232
+ "types": "./dist/integrations/web-bot-auth.d.ts",
233
+ "default": "./dist/integrations/web-bot-auth.js"
234
+ },
235
+ "require": {
236
+ "types": "./dist/integrations/web-bot-auth.d.cts",
237
+ "default": "./dist/integrations/web-bot-auth.cjs"
238
+ }
239
+ },
240
+ "./integrations/shopify": {
241
+ "import": {
242
+ "types": "./dist/integrations/shopify.d.ts",
243
+ "default": "./dist/integrations/shopify.js"
244
+ },
245
+ "require": {
246
+ "types": "./dist/integrations/shopify.d.cts",
247
+ "default": "./dist/integrations/shopify.cjs"
248
+ }
249
+ },
250
+ "./integrations/guidewire": {
251
+ "import": {
252
+ "types": "./dist/integrations/guidewire.d.ts",
253
+ "default": "./dist/integrations/guidewire.js"
254
+ },
255
+ "require": {
256
+ "types": "./dist/integrations/guidewire.d.cts",
257
+ "default": "./dist/integrations/guidewire.cjs"
258
+ }
259
+ },
260
+ "./integrations/life-sciences": {
261
+ "import": {
262
+ "types": "./dist/integrations/life-sciences.d.ts",
263
+ "default": "./dist/integrations/life-sciences.js"
264
+ },
265
+ "require": {
266
+ "types": "./dist/integrations/life-sciences.d.cts",
267
+ "default": "./dist/integrations/life-sciences.cjs"
268
+ }
269
+ },
270
+ "./integrations/fhir": {
271
+ "import": {
272
+ "types": "./dist/integrations/fhir.d.ts",
273
+ "default": "./dist/integrations/fhir.js"
274
+ },
275
+ "require": {
276
+ "types": "./dist/integrations/fhir.d.cts",
277
+ "default": "./dist/integrations/fhir.cjs"
278
+ }
279
+ },
280
+ "./integrations/legal": {
281
+ "import": {
282
+ "types": "./dist/integrations/legal.d.ts",
283
+ "default": "./dist/integrations/legal.js"
284
+ },
285
+ "require": {
286
+ "types": "./dist/integrations/legal.d.cts",
287
+ "default": "./dist/integrations/legal.cjs"
288
+ }
289
+ },
290
+ "./integrations/stripe-issuing": {
291
+ "import": {
292
+ "types": "./dist/integrations/stripe-issuing.d.ts",
293
+ "default": "./dist/integrations/stripe-issuing.js"
294
+ },
295
+ "require": {
296
+ "types": "./dist/integrations/stripe-issuing.d.cts",
297
+ "default": "./dist/integrations/stripe-issuing.cjs"
298
+ }
299
+ },
300
+ "./integrations/lithic": {
301
+ "import": {
302
+ "types": "./dist/integrations/lithic.d.ts",
303
+ "default": "./dist/integrations/lithic.js"
304
+ },
305
+ "require": {
306
+ "types": "./dist/integrations/lithic.d.cts",
307
+ "default": "./dist/integrations/lithic.cjs"
308
+ }
309
+ },
310
+ "./integrations/marqeta": {
311
+ "import": {
312
+ "types": "./dist/integrations/marqeta.d.ts",
313
+ "default": "./dist/integrations/marqeta.js"
314
+ },
315
+ "require": {
316
+ "types": "./dist/integrations/marqeta.d.cts",
317
+ "default": "./dist/integrations/marqeta.cjs"
318
+ }
319
+ },
320
+ "./integrations/coinbase-cdp": {
321
+ "import": {
322
+ "types": "./dist/integrations/coinbase-cdp.d.ts",
323
+ "default": "./dist/integrations/coinbase-cdp.js"
324
+ },
325
+ "require": {
326
+ "types": "./dist/integrations/coinbase-cdp.d.cts",
327
+ "default": "./dist/integrations/coinbase-cdp.cjs"
328
+ }
329
+ },
330
+ "./integrations/ramp": {
331
+ "import": {
332
+ "types": "./dist/integrations/ramp.d.ts",
333
+ "default": "./dist/integrations/ramp.js"
334
+ },
335
+ "require": {
336
+ "types": "./dist/integrations/ramp.d.cts",
337
+ "default": "./dist/integrations/ramp.cjs"
338
+ }
339
+ },
220
340
  "./integrations/siem": {
221
341
  "import": {
222
342
  "types": "./dist/integrations/siem.d.ts",