@agent-score/commerce 2.3.0 → 2.5.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.
- package/README.md +6 -6
- package/dist/challenge/index.d.mts +9 -5
- package/dist/challenge/index.d.ts +9 -5
- package/dist/challenge/index.js +11 -4
- package/dist/challenge/index.js.map +1 -1
- package/dist/challenge/index.mjs +11 -4
- package/dist/challenge/index.mjs.map +1 -1
- package/dist/{checkout-ChyOi7aU.d.ts → checkout-McfNpZJf.d.ts} +80 -12
- package/dist/{checkout-Ceo1_rVJ.d.mts → checkout-o17dIxHi.d.mts} +80 -12
- package/dist/core.d.mts +27 -7
- package/dist/core.d.ts +27 -7
- package/dist/core.js +25 -11
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +25 -11
- package/dist/core.mjs.map +1 -1
- package/dist/discovery/index.d.mts +26 -10
- package/dist/discovery/index.d.ts +26 -10
- package/dist/discovery/index.js +58 -10
- package/dist/discovery/index.js.map +1 -1
- package/dist/discovery/index.mjs +58 -10
- package/dist/discovery/index.mjs.map +1 -1
- package/dist/gate-CWP10xPQ.d.mts +339 -0
- package/dist/gate-CWP10xPQ.d.ts +339 -0
- package/dist/identity/express.d.mts +26 -1
- package/dist/identity/express.d.ts +26 -1
- package/dist/identity/express.js +599 -25
- package/dist/identity/express.js.map +1 -1
- package/dist/identity/express.mjs +595 -24
- package/dist/identity/express.mjs.map +1 -1
- package/dist/identity/fastify.d.mts +12 -2
- package/dist/identity/fastify.d.ts +12 -2
- package/dist/identity/fastify.js +607 -25
- package/dist/identity/fastify.js.map +1 -1
- package/dist/identity/fastify.mjs +603 -24
- package/dist/identity/fastify.mjs.map +1 -1
- package/dist/identity/hono.d.mts +26 -1
- package/dist/identity/hono.d.ts +26 -1
- package/dist/identity/hono.js +588 -25
- package/dist/identity/hono.js.map +1 -1
- package/dist/identity/hono.mjs +584 -24
- package/dist/identity/hono.mjs.map +1 -1
- package/dist/identity/nextjs.d.mts +3 -0
- package/dist/identity/nextjs.d.ts +3 -0
- package/dist/identity/nextjs.js +593 -25
- package/dist/identity/nextjs.js.map +1 -1
- package/dist/identity/nextjs.mjs +589 -24
- package/dist/identity/nextjs.mjs.map +1 -1
- package/dist/identity/policy.js.map +1 -1
- package/dist/identity/policy.mjs.map +1 -1
- package/dist/identity/web.d.mts +24 -1
- package/dist/identity/web.d.ts +24 -1
- package/dist/identity/web.js +593 -25
- package/dist/identity/web.js.map +1 -1
- package/dist/identity/web.mjs +589 -24
- package/dist/identity/web.mjs.map +1 -1
- package/dist/index.d.mts +129 -14
- package/dist/index.d.ts +129 -14
- package/dist/index.js +978 -99
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +956 -99
- package/dist/index.mjs.map +1 -1
- package/dist/{default_rails-DtR_E9N9.d.ts → network_kind-BIJM2peR.d.ts} +22 -8
- package/dist/{default_rails-K25PtWrL.d.mts → network_kind-C0EMkdzz.d.mts} +22 -8
- package/dist/payment/index.d.mts +16 -26
- package/dist/payment/index.d.ts +16 -26
- package/dist/payment/index.js +62 -57
- package/dist/payment/index.js.map +1 -1
- package/dist/payment/index.mjs +62 -57
- package/dist/payment/index.mjs.map +1 -1
- package/dist/{pricing-B3-aKxSz.d.ts → pricing-CytRwhC2.d.ts} +1 -1
- package/dist/{pricing-BReyZiqN.d.mts → pricing-KHDqMLd7.d.mts} +1 -1
- package/dist/{rail_spec-B1239jPp.d.mts → rail_spec-BFZmW9RN.d.mts} +3 -4
- package/dist/{rail_spec-B1239jPp.d.ts → rail_spec-BFZmW9RN.d.ts} +3 -4
- package/dist/stripe-multichain/index.d.mts +2 -9
- package/dist/stripe-multichain/index.d.ts +2 -9
- package/dist/stripe-multichain/index.js.map +1 -1
- package/dist/stripe-multichain/index.mjs.map +1 -1
- package/dist/{wwwauthenticate-D_FMnPgU.d.mts → wwwauthenticate-CVaGUMjU.d.mts} +8 -6
- package/dist/{wwwauthenticate-D_FMnPgU.d.ts → wwwauthenticate-CVaGUMjU.d.ts} +8 -6
- package/package.json +14 -13
package/dist/identity/nextjs.mjs
CHANGED
|
@@ -155,7 +155,520 @@ function denialReasonToBody(reason) {
|
|
|
155
155
|
return body;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
// src/aip/verify.ts
|
|
159
|
+
import { decodeJwt, decodeProtectedHeader, importJWK as importJWK2, jwtVerify } from "jose";
|
|
160
|
+
|
|
161
|
+
// src/aip/http-signature.ts
|
|
162
|
+
import { calculateJwkThumbprint, importJWK } from "jose";
|
|
163
|
+
var { subtle } = globalThis.crypto;
|
|
164
|
+
var b64ToBytes = (b64) => {
|
|
165
|
+
const bin = atob(b64);
|
|
166
|
+
const out = new Uint8Array(bin.length);
|
|
167
|
+
for (let i = 0; i < bin.length; i++) {
|
|
168
|
+
out[i] = bin.charCodeAt(i);
|
|
169
|
+
}
|
|
170
|
+
return out;
|
|
171
|
+
};
|
|
172
|
+
var AIP_COVERED_COMPONENTS = ["@method", "@authority", "@path", "agent-identity"];
|
|
173
|
+
var AIP_SIGNATURE_TAG = "agent-identity";
|
|
174
|
+
var DEFAULT_MAX_SKEW_SECONDS = 60;
|
|
175
|
+
var normalizeAuthority = (authority) => {
|
|
176
|
+
const lower = authority.trim().toLowerCase();
|
|
177
|
+
const colon = lower.lastIndexOf(":");
|
|
178
|
+
if (colon === -1) {
|
|
179
|
+
return lower;
|
|
180
|
+
}
|
|
181
|
+
if (lower.includes("]") && colon < lower.indexOf("]")) {
|
|
182
|
+
return lower;
|
|
183
|
+
}
|
|
184
|
+
const host = lower.slice(0, colon);
|
|
185
|
+
const port = lower.slice(colon + 1);
|
|
186
|
+
if (port === "80" || port === "443") {
|
|
187
|
+
return host;
|
|
188
|
+
}
|
|
189
|
+
return lower;
|
|
190
|
+
};
|
|
191
|
+
var componentValue = (name, input) => {
|
|
192
|
+
switch (name) {
|
|
193
|
+
case "@method":
|
|
194
|
+
return input.method.toUpperCase();
|
|
195
|
+
case "@authority":
|
|
196
|
+
return normalizeAuthority(input.authority);
|
|
197
|
+
case "@path":
|
|
198
|
+
return input.path;
|
|
199
|
+
case "agent-identity":
|
|
200
|
+
return input.agentIdentity.trim();
|
|
201
|
+
default:
|
|
202
|
+
return input.extra?.[name] ?? null;
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
var serializeComponentList = (components) => `(${components.map((c) => `"${c}"`).join(" ")})`;
|
|
206
|
+
var serializeParams = (p) => {
|
|
207
|
+
const parts = [];
|
|
208
|
+
if (p.created !== void 0) {
|
|
209
|
+
parts.push(`created=${p.created}`);
|
|
210
|
+
}
|
|
211
|
+
if (p.expires !== void 0) {
|
|
212
|
+
parts.push(`expires=${p.expires}`);
|
|
213
|
+
}
|
|
214
|
+
if (p.keyid !== void 0) {
|
|
215
|
+
parts.push(`keyid="${p.keyid}"`);
|
|
216
|
+
}
|
|
217
|
+
if (p.alg !== void 0) {
|
|
218
|
+
parts.push(`alg="${p.alg}"`);
|
|
219
|
+
}
|
|
220
|
+
if (p.tag !== void 0) {
|
|
221
|
+
parts.push(`tag="${p.tag}"`);
|
|
222
|
+
}
|
|
223
|
+
return parts.map((s) => `;${s}`).join("");
|
|
224
|
+
};
|
|
225
|
+
var buildSignatureBase = (params, input) => {
|
|
226
|
+
const lines = [];
|
|
227
|
+
for (const name of params.components) {
|
|
228
|
+
const value = componentValue(name, input);
|
|
229
|
+
if (value === null) {
|
|
230
|
+
throw new MissingComponentError(name);
|
|
231
|
+
}
|
|
232
|
+
lines.push(`"${name}": ${value}`);
|
|
233
|
+
}
|
|
234
|
+
const paramsValue = serializeComponentList(params.components) + serializeParams(params);
|
|
235
|
+
lines.push(`"@signature-params": ${paramsValue}`);
|
|
236
|
+
return lines.join("\n");
|
|
237
|
+
};
|
|
238
|
+
var MissingComponentError = class extends Error {
|
|
239
|
+
constructor(component) {
|
|
240
|
+
super(`signature base missing covered component: ${component}`);
|
|
241
|
+
this.component = component;
|
|
242
|
+
this.name = "MissingComponentError";
|
|
243
|
+
}
|
|
244
|
+
component;
|
|
245
|
+
};
|
|
246
|
+
var parseSignatureInput = (header, tag = AIP_SIGNATURE_TAG) => {
|
|
247
|
+
const members = splitDictionary(header);
|
|
248
|
+
if (members.length === 0) {
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
const parsed = members.map((m) => {
|
|
252
|
+
const params = parseInnerListMember(m.value);
|
|
253
|
+
return params ? { label: m.label, params } : null;
|
|
254
|
+
}).filter((x) => x !== null);
|
|
255
|
+
if (parsed.length === 0) {
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
const tagged = parsed.find((p) => p.params.tag === tag);
|
|
259
|
+
if (tagged) {
|
|
260
|
+
return tagged;
|
|
261
|
+
}
|
|
262
|
+
if (parsed.length === 1 && parsed[0].params.tag === void 0) {
|
|
263
|
+
return parsed[0];
|
|
264
|
+
}
|
|
265
|
+
return null;
|
|
266
|
+
};
|
|
267
|
+
var parseSignatureValue = (header, label) => {
|
|
268
|
+
const members = splitDictionary(header);
|
|
269
|
+
const member = members.find((m) => m.label === label);
|
|
270
|
+
if (!member) {
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
const v = member.value.trim();
|
|
274
|
+
if (!v.startsWith(":") || !v.endsWith(":") || v.length < 2) {
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
277
|
+
const b64 = v.slice(1, -1);
|
|
278
|
+
try {
|
|
279
|
+
return b64ToBytes(b64);
|
|
280
|
+
} catch {
|
|
281
|
+
return null;
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
var splitDictionary = (header) => {
|
|
285
|
+
const out = [];
|
|
286
|
+
let depth = 0;
|
|
287
|
+
let inBytes = false;
|
|
288
|
+
let inString = false;
|
|
289
|
+
let current = "";
|
|
290
|
+
for (let i = 0; i < header.length; i++) {
|
|
291
|
+
const ch = header[i];
|
|
292
|
+
if (inString) {
|
|
293
|
+
current += ch;
|
|
294
|
+
if (ch === '"' && header[i - 1] !== "\\") {
|
|
295
|
+
inString = false;
|
|
296
|
+
}
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
if (ch === '"') {
|
|
300
|
+
inString = true;
|
|
301
|
+
current += ch;
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
if (ch === ":") {
|
|
305
|
+
inBytes = !inBytes;
|
|
306
|
+
current += ch;
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
if (!inBytes && ch === "(") {
|
|
310
|
+
depth++;
|
|
311
|
+
current += ch;
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
if (!inBytes && ch === ")") {
|
|
315
|
+
depth = Math.max(0, depth - 1);
|
|
316
|
+
current += ch;
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
if (!inBytes && depth === 0 && ch === ",") {
|
|
320
|
+
pushMember(out, current);
|
|
321
|
+
current = "";
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
324
|
+
current += ch;
|
|
325
|
+
}
|
|
326
|
+
pushMember(out, current);
|
|
327
|
+
return out;
|
|
328
|
+
};
|
|
329
|
+
var pushMember = (out, raw) => {
|
|
330
|
+
const trimmed = raw.trim();
|
|
331
|
+
if (!trimmed) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const eq = trimmed.indexOf("=");
|
|
335
|
+
if (eq === -1) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
const label = trimmed.slice(0, eq).trim();
|
|
339
|
+
const value = trimmed.slice(eq + 1).trim();
|
|
340
|
+
if (label) {
|
|
341
|
+
out.push({ label, value });
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
var parseInnerListMember = (value) => {
|
|
345
|
+
const open = value.indexOf("(");
|
|
346
|
+
const close = value.indexOf(")", open + 1);
|
|
347
|
+
if (open === -1 || close === -1) {
|
|
348
|
+
return null;
|
|
349
|
+
}
|
|
350
|
+
const listBody = value.slice(open + 1, close).trim();
|
|
351
|
+
const components = listBody.length === 0 ? [] : (listBody.match(/"[^"]*"/g) ?? []).map((s) => s.slice(1, -1));
|
|
352
|
+
const params = { components };
|
|
353
|
+
const paramStr = value.slice(close + 1);
|
|
354
|
+
const re = /;\s*([a-zA-Z][a-zA-Z0-9_-]*)\s*=\s*("(?:[^"\\]|\\.)*"|-?\d+)/g;
|
|
355
|
+
let match;
|
|
356
|
+
while ((match = re.exec(paramStr)) !== null) {
|
|
357
|
+
const key = match[1];
|
|
358
|
+
const raw = match[2];
|
|
359
|
+
const val = raw.startsWith('"') ? raw.slice(1, -1) : Number(raw);
|
|
360
|
+
if (key === "created") {
|
|
361
|
+
params.created = val;
|
|
362
|
+
} else if (key === "expires") {
|
|
363
|
+
params.expires = val;
|
|
364
|
+
} else if (key === "keyid") {
|
|
365
|
+
params.keyid = val;
|
|
366
|
+
} else if (key === "tag") {
|
|
367
|
+
params.tag = val;
|
|
368
|
+
} else if (key === "alg") {
|
|
369
|
+
params.alg = val;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return params;
|
|
373
|
+
};
|
|
374
|
+
var verifyMessageSignature = async (input) => {
|
|
375
|
+
const selected = parseSignatureInput(input.signatureInput);
|
|
376
|
+
if (!selected) {
|
|
377
|
+
return { ok: false, reason: "no_aip_signature" };
|
|
378
|
+
}
|
|
379
|
+
const { label, params } = selected;
|
|
380
|
+
if (params.alg !== void 0 && !["ed25519", "eddsa"].includes(params.alg.toLowerCase())) {
|
|
381
|
+
return { ok: false, reason: "unsupported_alg" };
|
|
382
|
+
}
|
|
383
|
+
for (const required of AIP_COVERED_COMPONENTS) {
|
|
384
|
+
if (!params.components.includes(required)) {
|
|
385
|
+
return { ok: false, reason: "missing_covered_component" };
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
const now = input.now ?? Math.floor(Date.now() / 1e3);
|
|
389
|
+
const skew = input.maxSkewSeconds ?? DEFAULT_MAX_SKEW_SECONDS;
|
|
390
|
+
if (params.created !== void 0 && params.created > now + skew) {
|
|
391
|
+
return { ok: false, reason: "created_in_future" };
|
|
392
|
+
}
|
|
393
|
+
if (params.expires !== void 0 && params.expires < now - skew) {
|
|
394
|
+
return { ok: false, reason: "expired" };
|
|
395
|
+
}
|
|
396
|
+
if (!params.keyid) {
|
|
397
|
+
return { ok: false, reason: "missing_keyid" };
|
|
398
|
+
}
|
|
399
|
+
const cnf = input.cnfJwk;
|
|
400
|
+
if (cnf.kty !== "OKP" || cnf.crv !== "Ed25519" || typeof cnf.x !== "string" || cnf.x.length === 0) {
|
|
401
|
+
return { ok: false, reason: "unsupported_cnf_key" };
|
|
402
|
+
}
|
|
403
|
+
let thumbprint;
|
|
404
|
+
try {
|
|
405
|
+
thumbprint = await calculateJwkThumbprint(input.cnfJwk, "sha256");
|
|
406
|
+
} catch {
|
|
407
|
+
return { ok: false, reason: "unsupported_cnf_key" };
|
|
408
|
+
}
|
|
409
|
+
if (params.keyid !== thumbprint) {
|
|
410
|
+
return { ok: false, reason: "keyid_mismatch" };
|
|
411
|
+
}
|
|
412
|
+
const sig = parseSignatureValue(input.signature, label);
|
|
413
|
+
if (!sig) {
|
|
414
|
+
return { ok: false, reason: "malformed_signature" };
|
|
415
|
+
}
|
|
416
|
+
let base;
|
|
417
|
+
try {
|
|
418
|
+
base = buildSignatureBase(params, {
|
|
419
|
+
method: input.method,
|
|
420
|
+
authority: input.authority,
|
|
421
|
+
path: input.path,
|
|
422
|
+
agentIdentity: input.agentIdentity,
|
|
423
|
+
extra: input.extraComponents
|
|
424
|
+
});
|
|
425
|
+
} catch (err) {
|
|
426
|
+
if (err instanceof MissingComponentError) {
|
|
427
|
+
return { ok: false, reason: "missing_covered_component" };
|
|
428
|
+
}
|
|
429
|
+
throw err;
|
|
430
|
+
}
|
|
431
|
+
let valid;
|
|
432
|
+
try {
|
|
433
|
+
const key = await importJWK(input.cnfJwk, "EdDSA");
|
|
434
|
+
if (!(key instanceof CryptoKey)) {
|
|
435
|
+
return { ok: false, reason: "signature_invalid" };
|
|
436
|
+
}
|
|
437
|
+
valid = await subtle.verify(
|
|
438
|
+
{ name: "Ed25519" },
|
|
439
|
+
key,
|
|
440
|
+
sig,
|
|
441
|
+
new TextEncoder().encode(base)
|
|
442
|
+
);
|
|
443
|
+
} catch {
|
|
444
|
+
return { ok: false, reason: "signature_invalid" };
|
|
445
|
+
}
|
|
446
|
+
return valid ? { ok: true, params } : { ok: false, reason: "signature_invalid" };
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
// src/aip/types.ts
|
|
450
|
+
var isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
451
|
+
var isNonEmptyString = (v) => typeof v === "string" && v.length > 0;
|
|
452
|
+
var isAitShape = (payload) => isObject(payload) && isObject(payload.cnf) && isObject(payload.agent);
|
|
453
|
+
var validateAitPayload = (payload) => {
|
|
454
|
+
if (!isObject(payload)) {
|
|
455
|
+
return { ok: false, reason: "not_an_object" };
|
|
456
|
+
}
|
|
457
|
+
if (!isNonEmptyString(payload.aip_version)) {
|
|
458
|
+
return { ok: false, reason: "missing_aip_version" };
|
|
459
|
+
}
|
|
460
|
+
if (!isNonEmptyString(payload.iss)) {
|
|
461
|
+
return { ok: false, reason: "missing_iss" };
|
|
462
|
+
}
|
|
463
|
+
if (!isNonEmptyString(payload.sub)) {
|
|
464
|
+
return { ok: false, reason: "missing_sub" };
|
|
465
|
+
}
|
|
466
|
+
if (typeof payload.iat !== "number") {
|
|
467
|
+
return { ok: false, reason: "missing_iat" };
|
|
468
|
+
}
|
|
469
|
+
if (typeof payload.exp !== "number") {
|
|
470
|
+
return { ok: false, reason: "missing_exp" };
|
|
471
|
+
}
|
|
472
|
+
if (!isObject(payload.cnf) || !isObject(payload.cnf.jwk)) {
|
|
473
|
+
return { ok: false, reason: "missing_cnf" };
|
|
474
|
+
}
|
|
475
|
+
if (!isObject(payload.agent) || !isNonEmptyString(payload.agent.provider)) {
|
|
476
|
+
return { ok: false, reason: "missing_agent_provider" };
|
|
477
|
+
}
|
|
478
|
+
if (payload.trust_level === "human_confirmed") {
|
|
479
|
+
const auth = payload.auth;
|
|
480
|
+
const amr = isObject(auth) ? auth.amr : void 0;
|
|
481
|
+
if (!Array.isArray(amr) || amr.length === 0) {
|
|
482
|
+
return { ok: false, reason: "human_confirmed_without_amr" };
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
return { ok: true, payload };
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
// src/aip/verify.ts
|
|
489
|
+
var AGENT_IDENTITY_HEADER = "agent-identity";
|
|
490
|
+
var verifyAit = async (ctx, opts) => {
|
|
491
|
+
if (ctx.agentIdentityHeaders.length === 0) {
|
|
492
|
+
return { ok: false, reason: "no_token" };
|
|
493
|
+
}
|
|
494
|
+
if (!ctx.signatureInput || !ctx.signature) {
|
|
495
|
+
return { ok: false, reason: "pop_signature_missing" };
|
|
496
|
+
}
|
|
497
|
+
let lastFailure = "malformed_token";
|
|
498
|
+
for (const raw of ctx.agentIdentityHeaders) {
|
|
499
|
+
const token = stripBearer(raw);
|
|
500
|
+
let header;
|
|
501
|
+
let payload;
|
|
502
|
+
try {
|
|
503
|
+
header = decodeProtectedHeader(token);
|
|
504
|
+
payload = decodeJwt(token);
|
|
505
|
+
} catch {
|
|
506
|
+
lastFailure = "malformed_token";
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
if (header.alg === void 0 || header.alg.toLowerCase() === "none") {
|
|
510
|
+
lastFailure = "malformed_token";
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
if (!isAitShape(payload)) {
|
|
514
|
+
lastFailure = "malformed_token";
|
|
515
|
+
continue;
|
|
516
|
+
}
|
|
517
|
+
const validated = validateAitPayload(payload);
|
|
518
|
+
if (!validated.ok) {
|
|
519
|
+
lastFailure = "invalid_claims";
|
|
520
|
+
continue;
|
|
521
|
+
}
|
|
522
|
+
const claims = validated.payload;
|
|
523
|
+
const keyLookup = await opts.jwks.getKey(claims.iss, header.kid);
|
|
524
|
+
if (!keyLookup.ok) {
|
|
525
|
+
lastFailure = keyLookup.reason === "untrusted_issuer" || keyLookup.reason === "insecure_issuer" ? "untrusted_issuer" : "key_unavailable";
|
|
526
|
+
continue;
|
|
527
|
+
}
|
|
528
|
+
const jwtClockTolerance = opts.maxSkewSeconds ?? 60;
|
|
529
|
+
try {
|
|
530
|
+
const idpKey = await importJWK2(keyLookup.key, normalizeAlg(header.alg));
|
|
531
|
+
await jwtVerify(token, idpKey, {
|
|
532
|
+
// Pin the signature algorithm allowlist (RFC 8725 §3.1) — also rejects `alg:none`. Without
|
|
533
|
+
// this, jose accepts whatever alg the resolved JWK supports, so a trusted IdP publishing a
|
|
534
|
+
// non-Ed25519 (e.g. RSA/EC) `use:sig` key would let an attacker present an RS256/ES256
|
|
535
|
+
// token that verifies. Matches the server-side allowlist in core/api aip-verify.
|
|
536
|
+
algorithms: AIT_SIGNING_ALGS,
|
|
537
|
+
clockTolerance: jwtClockTolerance,
|
|
538
|
+
currentDate: opts.now !== void 0 ? new Date(opts.now * 1e3) : void 0
|
|
539
|
+
});
|
|
540
|
+
} catch (err) {
|
|
541
|
+
lastFailure = isExpiry(err) ? "expired_token" : "idp_signature_invalid";
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
const nowSec = opts.now ?? Math.floor(Date.now() / 1e3);
|
|
545
|
+
if (claims.iat > nowSec + jwtClockTolerance) {
|
|
546
|
+
lastFailure = "expired_token";
|
|
547
|
+
continue;
|
|
548
|
+
}
|
|
549
|
+
const popResult = await verifyMessageSignature({
|
|
550
|
+
method: ctx.method,
|
|
551
|
+
authority: ctx.authority,
|
|
552
|
+
path: ctx.path,
|
|
553
|
+
agentIdentity: raw,
|
|
554
|
+
signatureInput: ctx.signatureInput,
|
|
555
|
+
signature: ctx.signature,
|
|
556
|
+
cnfJwk: claims.cnf.jwk,
|
|
557
|
+
now: opts.now,
|
|
558
|
+
maxSkewSeconds: opts.maxSkewSeconds
|
|
559
|
+
});
|
|
560
|
+
if (!popResult.ok) {
|
|
561
|
+
lastFailure = "pop_signature_invalid";
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
return { ok: true, ait: { payload: claims, iss: claims.iss, cnfJwk: claims.cnf.jwk, token } };
|
|
565
|
+
}
|
|
566
|
+
return { ok: false, reason: lastFailure };
|
|
567
|
+
};
|
|
568
|
+
var stripBearer = (value) => {
|
|
569
|
+
const trimmed = value.trim();
|
|
570
|
+
return /^bearer\s+/i.test(trimmed) ? trimmed.replace(/^bearer\s+/i, "") : trimmed;
|
|
571
|
+
};
|
|
572
|
+
var AIT_SIGNING_ALGS = ["EdDSA", "ES256"];
|
|
573
|
+
var normalizeAlg = (alg) => alg.toLowerCase() === "eddsa" ? "EdDSA" : alg;
|
|
574
|
+
var isExpiry = (err) => typeof err === "object" && err !== null && err.code === "ERR_JWT_EXPIRED";
|
|
575
|
+
|
|
576
|
+
// src/aip/request.ts
|
|
577
|
+
var readAgentIdentityHeaders = (headers) => {
|
|
578
|
+
const raw = headers.get(AGENT_IDENTITY_HEADER);
|
|
579
|
+
if (!raw) {
|
|
580
|
+
return [];
|
|
581
|
+
}
|
|
582
|
+
return raw.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
583
|
+
};
|
|
584
|
+
var deriveAuthority = (req, url) => req.headers.get("host") ?? url.host;
|
|
585
|
+
var buildVerifyContextFromRequest = (req) => {
|
|
586
|
+
const url = new URL(req.url);
|
|
587
|
+
return {
|
|
588
|
+
method: req.method,
|
|
589
|
+
authority: deriveAuthority(req, url),
|
|
590
|
+
path: url.pathname,
|
|
591
|
+
agentIdentityHeaders: readAgentIdentityHeaders(req.headers),
|
|
592
|
+
signatureInput: req.headers.get("signature-input"),
|
|
593
|
+
signature: req.headers.get("signature")
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
var hasAgentIdentityHeader = (req) => readAgentIdentityHeaders(req.headers).length > 0;
|
|
597
|
+
|
|
598
|
+
// src/aip/gate.ts
|
|
599
|
+
var verifyFromContext = async (ctx, opts) => {
|
|
600
|
+
const result = await verifyAit(ctx, { jwks: opts.jwks, now: opts.now, maxSkewSeconds: opts.maxSkewSeconds });
|
|
601
|
+
return result.ok ? { ok: true, ait: result.ait } : { ok: false, failure: result.reason };
|
|
602
|
+
};
|
|
603
|
+
var verifyAitRequest = (req, opts) => verifyFromContext(buildVerifyContextFromRequest(req), opts);
|
|
604
|
+
var aipErrorCode = (failure) => {
|
|
605
|
+
switch (failure) {
|
|
606
|
+
case "no_token":
|
|
607
|
+
case "pop_signature_missing":
|
|
608
|
+
return "agent_identity_required";
|
|
609
|
+
case "untrusted_issuer":
|
|
610
|
+
return "untrusted_issuer";
|
|
611
|
+
case "expired_token":
|
|
612
|
+
return "expired_token";
|
|
613
|
+
case "invalid_claims":
|
|
614
|
+
return "insufficient_claims";
|
|
615
|
+
case "key_unavailable":
|
|
616
|
+
return "idp_unavailable";
|
|
617
|
+
case "malformed_token":
|
|
618
|
+
case "idp_signature_invalid":
|
|
619
|
+
case "pop_signature_invalid":
|
|
620
|
+
return "invalid_signature";
|
|
621
|
+
default:
|
|
622
|
+
return "invalid_signature";
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
var aipErrorStatus = (failure) => {
|
|
626
|
+
switch (failure) {
|
|
627
|
+
case "key_unavailable":
|
|
628
|
+
return 503;
|
|
629
|
+
case "untrusted_issuer":
|
|
630
|
+
case "invalid_claims":
|
|
631
|
+
return 403;
|
|
632
|
+
default:
|
|
633
|
+
return 401;
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
var aipErrorDetail = (failure) => {
|
|
637
|
+
switch (failure) {
|
|
638
|
+
case "no_token":
|
|
639
|
+
return "No Agent-Identity token was presented.";
|
|
640
|
+
case "pop_signature_missing":
|
|
641
|
+
return "The request is missing the RFC 9421 HTTP Message Signature that proves possession of the token-bound key.";
|
|
642
|
+
case "untrusted_issuer":
|
|
643
|
+
return "The token's issuer is not in this service's trusted-issuer list.";
|
|
644
|
+
case "expired_token":
|
|
645
|
+
return "The Agent Identity Token has expired.";
|
|
646
|
+
case "invalid_claims":
|
|
647
|
+
return "The token is missing required claims for this endpoint.";
|
|
648
|
+
case "malformed_token":
|
|
649
|
+
return "The Agent-Identity header could not be parsed as an Agent Identity Token.";
|
|
650
|
+
case "idp_signature_invalid":
|
|
651
|
+
return "The identity provider's signature on the token failed verification.";
|
|
652
|
+
case "pop_signature_invalid":
|
|
653
|
+
return "The request signature did not match the key bound to the token.";
|
|
654
|
+
case "key_unavailable":
|
|
655
|
+
return "The identity provider's signing key could not be resolved.";
|
|
656
|
+
default:
|
|
657
|
+
return "Token verification failed.";
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
var buildAipErrorBody = (failure) => {
|
|
661
|
+
const code = aipErrorCode(failure);
|
|
662
|
+
return {
|
|
663
|
+
type: `urn:aip:error:${code}`,
|
|
664
|
+
title: code.replace(/_/g, " "),
|
|
665
|
+
status: aipErrorStatus(failure),
|
|
666
|
+
detail: aipErrorDetail(failure)
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
|
|
158
670
|
// src/core.ts
|
|
671
|
+
import { createHash } from "crypto";
|
|
159
672
|
import {
|
|
160
673
|
AgentScore,
|
|
161
674
|
InvalidCredentialError,
|
|
@@ -257,8 +770,9 @@ var INVALID_CREDENTIAL_INSTRUCTIONS = JSON.stringify({
|
|
|
257
770
|
],
|
|
258
771
|
user_message: "The operator_token is not recognized. Use a different stored token, or restart the verification session flow to mint a new one."
|
|
259
772
|
});
|
|
260
|
-
function buildAgentMemoryHint() {
|
|
773
|
+
function buildAgentMemoryHint(aipTrustedIssuers) {
|
|
261
774
|
const api = CANONICAL_AGENTSCORE_API;
|
|
775
|
+
const acceptsAip = aipTrustedIssuers !== void 0 && aipTrustedIssuers.length > 0;
|
|
262
776
|
return {
|
|
263
777
|
save_for_future_agentscore_gates: true,
|
|
264
778
|
pattern_summary: "AgentScore is a cross-merchant identity substrate for agent commerce. Any endpoint that returns 403 missing_identity / identity_verification_required or 402 challenges referencing AgentScore uses the same identity system. One KYC works across all AgentScore merchants \u2014 no re-verification per site. Save this pattern (and the endpoints below) to persistent memory so future AgentScore encounters skip the cold-start session flow.",
|
|
@@ -266,8 +780,12 @@ function buildAgentMemoryHint() {
|
|
|
266
780
|
identity_check_endpoint: `${api}/v1/credentials`,
|
|
267
781
|
identity_paths: {
|
|
268
782
|
wallet: "If paying from a crypto wallet you have used before on any AgentScore merchant, send `X-Wallet-Address: 0x...`. Shortest path; no token lifecycle to manage.",
|
|
269
|
-
operator_token: "For any rail (Stripe SPT, card, or a wallet you have not linked yet), send `X-Operator-Token: opc_...`. Reusable across merchants until the token expires."
|
|
783
|
+
operator_token: "For any rail (Stripe SPT, card, or a wallet you have not linked yet), send `X-Operator-Token: opc_...`. Reusable across merchants until the token expires.",
|
|
784
|
+
...acceptsAip && {
|
|
785
|
+
agent_identity: 'If you hold an AIP Agent Identity Token from a trusted issuer (see aip_trusted_issuers), present it: send the JWT in an `Agent-Identity` header plus an RFC 9421 HTTP Message Signature (Signature-Input + Signature over @method @authority @path agent-identity, tag="agent-identity") signed with the token-bound cnf key. The merchant verifies it and applies its policy \u2014 no separate AgentScore credential needed.'
|
|
786
|
+
}
|
|
270
787
|
},
|
|
788
|
+
...acceptsAip && { aip_trusted_issuers: aipTrustedIssuers },
|
|
271
789
|
bootstrap: "If you have neither a linked wallet nor a valid operator_token, follow the session/verify flow in the per-request `agent_instructions` block. This happens at most once per agent identity \u2014 after first verification, the operator_token and any subsequently used wallet are reusable everywhere.",
|
|
272
790
|
do_not_persist_in_memory: ["operator_token", "poll_secret"],
|
|
273
791
|
persist_in_credential_store: ["operator_token"]
|
|
@@ -289,11 +807,12 @@ function createAgentScoreCore(options) {
|
|
|
289
807
|
baseUrl: rawBaseUrl = "https://api.agentscore.sh",
|
|
290
808
|
chain: gateChain,
|
|
291
809
|
userAgent,
|
|
292
|
-
createSessionOnMissing
|
|
810
|
+
createSessionOnMissing,
|
|
811
|
+
aipTrustedIssuers
|
|
293
812
|
} = options;
|
|
294
813
|
const baseUrl = stripTrailingSlashes(rawBaseUrl);
|
|
295
|
-
const agentMemoryHint = buildAgentMemoryHint();
|
|
296
|
-
const defaultUa = `@agent-score/commerce@${"2.
|
|
814
|
+
const agentMemoryHint = buildAgentMemoryHint(aipTrustedIssuers);
|
|
815
|
+
const defaultUa = `@agent-score/commerce@${"2.5.0"}`;
|
|
297
816
|
const userAgentHeader = userAgent ? `${userAgent} (${defaultUa})` : defaultUa;
|
|
298
817
|
const sdk = new AgentScore({ apiKey, baseUrl, userAgent: userAgentHeader });
|
|
299
818
|
const sessionSdkCache = /* @__PURE__ */ new Map();
|
|
@@ -311,6 +830,7 @@ function createAgentScoreCore(options) {
|
|
|
311
830
|
return s;
|
|
312
831
|
}
|
|
313
832
|
const cache = new TTLCache(cacheSeconds * 1e3);
|
|
833
|
+
const lastSignerRaw = /* @__PURE__ */ new Map();
|
|
314
834
|
async function tryMintSessionDenial(ctx) {
|
|
315
835
|
if (!createSessionOnMissing) return void 0;
|
|
316
836
|
try {
|
|
@@ -368,13 +888,18 @@ function createAgentScoreCore(options) {
|
|
|
368
888
|
}
|
|
369
889
|
}
|
|
370
890
|
async function evaluate(identity, ctx, signer) {
|
|
371
|
-
if (!identity || !identity.address && !identity.operatorToken) {
|
|
891
|
+
if (!identity || !identity.address?.trim() && !identity.operatorToken?.trim() && !identity.aipToken?.trim()) {
|
|
372
892
|
if (failOpen) return { kind: "allow" };
|
|
373
893
|
const sessionReason = await tryMintSessionDenial(ctx);
|
|
374
894
|
if (sessionReason) return { kind: "deny", reason: sessionReason };
|
|
895
|
+
const acceptsAip = aipTrustedIssuers !== void 0 && aipTrustedIssuers.length > 0;
|
|
896
|
+
const aipStep = acceptsAip ? [
|
|
897
|
+
`If you hold an AIP Agent Identity Token from a trusted issuer (${aipTrustedIssuers.join(", ")}): present it \u2014 send the JWT in an Agent-Identity header plus an RFC 9421 HTTP Message Signature (Signature-Input + Signature over @method @authority @path agent-identity, tag="agent-identity") signed with the token-bound cnf key. This satisfies identity in one round trip without an AgentScore credential.`
|
|
898
|
+
] : [];
|
|
375
899
|
const missingIdentityInstructions = JSON.stringify({
|
|
376
900
|
action: "probe_identity_then_session",
|
|
377
901
|
steps: [
|
|
902
|
+
...aipStep,
|
|
378
903
|
"If you have a wallet AND this merchant accepts a wallet-signing rail (Tempo MPP or x402 \u2014 see openapi.json x-payment-info): send X-Wallet-Address and retry. If the wallet is already linked to an AgentScore operator (via prior SIWE claim or prior captureWallet), this passes in one round trip. If the wallet is unlinked or the account has no KYC, the 403 will include a verify_url \u2014 share it with the user to claim the wallet + complete KYC, then retry.",
|
|
379
904
|
"If step 1 is denied or you already have a stored operator_token (valid + not expired): send X-Operator-Token: opc_... and retry.",
|
|
380
905
|
"If neither applies: retry with NO identity header. Merchants that auto-create verification sessions (most AgentScore merchants do) return verify_url + session_id + poll_secret in the 403 body \u2014 share verify_url with the user, then poll poll_url every 5s with the X-Poll-Secret header until status=verified (the poll returns a one-time operator_token). If the retry returns the same bare 403, this merchant does not support self-service session bootstrapping \u2014 direct the user to https://agentscore.sh/sign-up to create an AgentScore identity and mint an operator_token from their dashboard (https://agentscore.sh/dashboard/verify). The user hands the opc_... to you, and you retry with X-Operator-Token."
|
|
@@ -390,7 +915,7 @@ function createAgentScoreCore(options) {
|
|
|
390
915
|
}
|
|
391
916
|
};
|
|
392
917
|
}
|
|
393
|
-
const cacheKey = identity.operatorToken?.toLowerCase() ?? (identity.address ? normalizeAddress(identity.address) : "");
|
|
918
|
+
const cacheKey = identity.aipToken ? `aip:${createHash("sha256").update(identity.aipToken).digest("hex")}` : identity.operatorToken?.toLowerCase() ?? (identity.address ? normalizeAddress(identity.address) : "");
|
|
394
919
|
const cached = cache.get(cacheKey);
|
|
395
920
|
if (cached) {
|
|
396
921
|
if (cached.allow) {
|
|
@@ -435,7 +960,7 @@ function createAgentScoreCore(options) {
|
|
|
435
960
|
// regardless of policy.require_sanctions_clear (which gates the separate NAME screen).
|
|
436
961
|
...signer && { signer: { address: signer.address, network: signer.network } }
|
|
437
962
|
};
|
|
438
|
-
const result = identity.address ? await sdk.assess(identity.address, { ...opts, operatorToken: identity.operatorToken }) : await sdk.assess(null, { ...opts, operatorToken: identity.operatorToken });
|
|
963
|
+
const result = identity.aipToken ? await sdk.assess(null, { ...opts, aipToken: identity.aipToken }) : identity.address ? await sdk.assess(identity.address, { ...opts, operatorToken: identity.operatorToken }) : await sdk.assess(null, { ...opts, operatorToken: identity.operatorToken });
|
|
439
964
|
data = result;
|
|
440
965
|
} catch (err) {
|
|
441
966
|
if (err instanceof PaymentRequiredError) {
|
|
@@ -506,6 +1031,9 @@ function createAgentScoreCore(options) {
|
|
|
506
1031
|
const decisionReasons = data.decision_reasons ?? [];
|
|
507
1032
|
const allow = decision === "allow" || decision == null;
|
|
508
1033
|
cache.set(cacheKey, { allow, decision: decision ?? void 0, reasons: decisionReasons, raw: data });
|
|
1034
|
+
if (identity.address !== void 0 && identity.operatorToken === void 0 && identity.aipToken === void 0 && (data.signer_match !== void 0 || data.signer_sanctions !== void 0)) {
|
|
1035
|
+
lastSignerRaw.set(normalizeAddress(identity.address), data);
|
|
1036
|
+
}
|
|
509
1037
|
if (allow) {
|
|
510
1038
|
const quota = data.quota;
|
|
511
1039
|
return {
|
|
@@ -570,9 +1098,7 @@ function createAgentScoreCore(options) {
|
|
|
570
1098
|
}
|
|
571
1099
|
function getSignerVerdict(claimedAddress) {
|
|
572
1100
|
const claimedNorm = normalizeAddress(claimedAddress);
|
|
573
|
-
const
|
|
574
|
-
if (!cached) return void 0;
|
|
575
|
-
const raw = cached.raw;
|
|
1101
|
+
const raw = lastSignerRaw.get(claimedNorm) ?? cache.get(claimedNorm)?.raw;
|
|
576
1102
|
if (!raw) return void 0;
|
|
577
1103
|
const rawMatch = raw.signer_match;
|
|
578
1104
|
const rawSanctions = raw.signer_sanctions;
|
|
@@ -626,6 +1152,18 @@ async function extractSolanaSignerFromCredential(credential) {
|
|
|
626
1152
|
}
|
|
627
1153
|
}
|
|
628
1154
|
async function extractPaymentSigner(request, x402PaymentHeader) {
|
|
1155
|
+
if (x402PaymentHeader) {
|
|
1156
|
+
try {
|
|
1157
|
+
const decoded = atob(x402PaymentHeader);
|
|
1158
|
+
const parsed = JSON.parse(decoded);
|
|
1159
|
+
const from = parsed?.payload?.authorization?.from;
|
|
1160
|
+
if (typeof from === "string" && /^0x[0-9a-fA-F]{40}$/.test(from)) {
|
|
1161
|
+
return { address: from.toLowerCase(), network: "evm" };
|
|
1162
|
+
}
|
|
1163
|
+
} catch (err) {
|
|
1164
|
+
console.warn("[gate] x402 signer extraction failed:", err instanceof Error ? err.message : err);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
629
1167
|
const authHeader = request.headers.get("authorization");
|
|
630
1168
|
if (authHeader) {
|
|
631
1169
|
try {
|
|
@@ -645,18 +1183,6 @@ async function extractPaymentSigner(request, x402PaymentHeader) {
|
|
|
645
1183
|
console.warn("[gate] MPP signer extraction failed:", err instanceof Error ? err.message : err);
|
|
646
1184
|
}
|
|
647
1185
|
}
|
|
648
|
-
if (x402PaymentHeader) {
|
|
649
|
-
try {
|
|
650
|
-
const decoded = atob(x402PaymentHeader);
|
|
651
|
-
const parsed = JSON.parse(decoded);
|
|
652
|
-
const from = parsed?.payload?.authorization?.from;
|
|
653
|
-
if (typeof from === "string" && /^0x[0-9a-fA-F]{40}$/.test(from)) {
|
|
654
|
-
return { address: from.toLowerCase(), network: "evm" };
|
|
655
|
-
}
|
|
656
|
-
} catch (err) {
|
|
657
|
-
console.warn("[gate] x402 signer extraction failed:", err instanceof Error ? err.message : err);
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
1186
|
return null;
|
|
661
1187
|
}
|
|
662
1188
|
function readX402PaymentHeader(request) {
|
|
@@ -702,6 +1228,42 @@ function createAgentScoreGate(options) {
|
|
|
702
1228
|
return { allowed: false, response };
|
|
703
1229
|
};
|
|
704
1230
|
}
|
|
1231
|
+
var defaultAipResponse = (body) => new Response(JSON.stringify(body), { status: body.status, headers: { "content-type": "application/problem+json" } });
|
|
1232
|
+
function createAipGate(options) {
|
|
1233
|
+
const { onDenied, ...gateOpts } = options;
|
|
1234
|
+
return async (req) => {
|
|
1235
|
+
const result = await verifyAitRequest(req, gateOpts);
|
|
1236
|
+
if (result.ok) {
|
|
1237
|
+
return { allowed: true, ait: result.ait };
|
|
1238
|
+
}
|
|
1239
|
+
const body = buildAipErrorBody(result.failure);
|
|
1240
|
+
const response = onDenied ? await onDenied(req, body) : defaultAipResponse(body);
|
|
1241
|
+
return { allowed: false, response };
|
|
1242
|
+
};
|
|
1243
|
+
}
|
|
1244
|
+
function withAipGate(options, handler) {
|
|
1245
|
+
const guard = createAipGate(options);
|
|
1246
|
+
return async (req, ctx) => {
|
|
1247
|
+
const result = await guard(req);
|
|
1248
|
+
if (!result.allowed) {
|
|
1249
|
+
return result.response;
|
|
1250
|
+
}
|
|
1251
|
+
return handler(req, { ait: result.ait }, ctx);
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
function withConditionalAipGate(options, handler) {
|
|
1255
|
+
const guard = createAipGate(options);
|
|
1256
|
+
return async (req, ctx) => {
|
|
1257
|
+
if (!hasAgentIdentityHeader(req)) {
|
|
1258
|
+
return handler(req, {}, ctx);
|
|
1259
|
+
}
|
|
1260
|
+
const result = await guard(req);
|
|
1261
|
+
if (!result.allowed) {
|
|
1262
|
+
return result.response;
|
|
1263
|
+
}
|
|
1264
|
+
return handler(req, { ait: result.ait }, ctx);
|
|
1265
|
+
};
|
|
1266
|
+
}
|
|
705
1267
|
|
|
706
1268
|
// src/identity/nextjs.ts
|
|
707
1269
|
function withAgentScoreGate(options, handler) {
|
|
@@ -750,7 +1312,10 @@ function conditionalAgentscoreMiddleware(options) {
|
|
|
750
1312
|
export {
|
|
751
1313
|
agentscoreMiddleware,
|
|
752
1314
|
conditionalAgentscoreMiddleware,
|
|
1315
|
+
createAipGate,
|
|
753
1316
|
withAgentScoreGate,
|
|
754
|
-
|
|
1317
|
+
withAipGate,
|
|
1318
|
+
withConditionalAgentScoreGate,
|
|
1319
|
+
withConditionalAipGate
|
|
755
1320
|
};
|
|
756
1321
|
//# sourceMappingURL=nextjs.mjs.map
|