@adcp/sdk 16.1.0 → 16.3.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/AGENTS.md +2 -0
- package/dist/lib/core/AgentClient.js +17 -1
- package/dist/lib/core/AgentClient.mjs +17 -1
- package/dist/lib/core/SingleAgentClient.js +13 -0
- package/dist/lib/core/SingleAgentClient.mjs +13 -0
- package/dist/lib/core/TaskExecutor.js +88 -13
- package/dist/lib/core/TaskExecutor.mjs +89 -14
- package/dist/lib/errors/index.d.mts +34 -0
- package/dist/lib/errors/index.d.ts +34 -0
- package/dist/lib/errors/index.js +11 -0
- package/dist/lib/errors/index.mjs +10 -0
- package/dist/lib/governance/authorization.d.mts +66 -0
- package/dist/lib/governance/authorization.d.ts +66 -0
- package/dist/lib/governance/authorization.js +181 -37
- package/dist/lib/governance/authorization.mjs +183 -36
- package/dist/lib/governance/index.d.mts +2 -2
- package/dist/lib/governance/index.d.ts +2 -2
- package/dist/lib/governance/index.js +4 -2
- package/dist/lib/governance/index.mjs +3 -1
- package/dist/lib/identity-3.3/index.d.mts +1 -0
- package/dist/lib/identity-3.3/index.d.ts +1 -0
- package/dist/lib/identity-3.3/index.js +3 -1
- package/dist/lib/identity-3.3/index.mjs +1 -0
- package/dist/lib/identity-3.3/jws-artifacts.d.mts +147 -0
- package/dist/lib/identity-3.3/jws-artifacts.d.ts +147 -0
- package/dist/lib/identity-3.3/jws-artifacts.js +258 -0
- package/dist/lib/identity-3.3/jws-artifacts.mjs +234 -0
- package/dist/lib/identity-3.3/revocation.d.mts +7 -0
- package/dist/lib/identity-3.3/revocation.d.ts +7 -0
- package/dist/lib/identity-3.3/revocation.js +13 -0
- package/dist/lib/identity-3.3/revocation.mjs +13 -0
- package/dist/lib/index.d.mts +3 -3
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +4 -0
- package/dist/lib/index.mjs +4 -0
- package/dist/lib/media-buy/compatibility.d.mts +1 -0
- package/dist/lib/media-buy/compatibility.d.ts +1 -0
- package/dist/lib/media-buy/compatibility.js +33 -10
- package/dist/lib/media-buy/compatibility.mjs +32 -14
- package/dist/lib/negotiation/buyer.js +11 -5
- package/dist/lib/negotiation/buyer.mjs +11 -5
- package/dist/lib/negotiation/types.d.mts +4 -2
- package/dist/lib/negotiation/types.d.ts +4 -2
- package/dist/lib/negotiation/verification.d.mts +15 -6
- package/dist/lib/negotiation/verification.d.ts +15 -6
- package/dist/lib/negotiation/verification.js +146 -27
- package/dist/lib/negotiation/verification.mjs +146 -28
- package/dist/lib/negotiation/version.d.mts +6 -0
- package/dist/lib/negotiation/version.d.ts +6 -0
- package/dist/lib/negotiation/version.js +60 -0
- package/dist/lib/negotiation/version.mjs +33 -0
- package/dist/lib/registry/types.generated.d.mts +24 -1
- package/dist/lib/registry/types.generated.d.ts +24 -1
- package/dist/lib/server/create-adcp-server.js +1 -1
- package/dist/lib/server/create-adcp-server.mjs +1 -1
- package/dist/lib/server/error-arm-tools.d.mts +10 -10
- package/dist/lib/server/error-arm-tools.d.ts +10 -10
- package/dist/lib/server/error-arm-tools.js +22 -58
- package/dist/lib/server/error-arm-tools.mjs +30 -65
- package/dist/lib/server/index.d.mts +2 -2
- package/dist/lib/server/index.d.ts +2 -2
- package/dist/lib/server/index.js +2 -0
- package/dist/lib/server/index.mjs +2 -0
- package/dist/lib/signing/web-bot-auth.js +5 -0
- package/dist/lib/signing/web-bot-auth.mjs +4 -0
- package/dist/lib/testing/compliance/comply.js +17 -0
- package/dist/lib/testing/compliance/comply.mjs +17 -0
- package/dist/lib/testing/index.d.mts +3 -0
- package/dist/lib/testing/index.d.ts +3 -0
- package/dist/lib/testing/index.js +44 -2
- package/dist/lib/testing/index.mjs +42 -0
- package/dist/lib/testing/storyboard/collection-selection.d.mts +259 -0
- package/dist/lib/testing/storyboard/collection-selection.d.ts +259 -0
- package/dist/lib/testing/storyboard/collection-selection.js +384 -0
- package/dist/lib/testing/storyboard/collection-selection.mjs +348 -0
- package/dist/lib/testing/storyboard/context.js +12 -6
- package/dist/lib/testing/storyboard/context.mjs +12 -6
- package/dist/lib/testing/storyboard/fixture-resolution.d.mts +39 -1
- package/dist/lib/testing/storyboard/fixture-resolution.d.ts +39 -1
- package/dist/lib/testing/storyboard/fixture-resolution.js +216 -12
- package/dist/lib/testing/storyboard/fixture-resolution.mjs +218 -12
- package/dist/lib/testing/storyboard/index.d.mts +9 -2
- package/dist/lib/testing/storyboard/index.d.ts +9 -2
- package/dist/lib/testing/storyboard/index.js +51 -2
- package/dist/lib/testing/storyboard/index.mjs +49 -1
- package/dist/lib/testing/storyboard/prepared-fixtures.d.mts +471 -0
- package/dist/lib/testing/storyboard/prepared-fixtures.d.ts +471 -0
- package/dist/lib/testing/storyboard/prepared-fixtures.js +434 -0
- package/dist/lib/testing/storyboard/prepared-fixtures.mjs +389 -0
- package/dist/lib/testing/storyboard/protected-context.d.mts +127 -0
- package/dist/lib/testing/storyboard/protected-context.d.ts +127 -0
- package/dist/lib/testing/storyboard/protected-context.js +301 -0
- package/dist/lib/testing/storyboard/protected-context.mjs +267 -0
- package/dist/lib/testing/storyboard/rejection-hints.js +13 -4
- package/dist/lib/testing/storyboard/rejection-hints.mjs +13 -4
- package/dist/lib/testing/storyboard/runner.d.mts +24 -0
- package/dist/lib/testing/storyboard/runner.d.ts +24 -0
- package/dist/lib/testing/storyboard/runner.js +1061 -105
- package/dist/lib/testing/storyboard/runner.mjs +1075 -106
- package/dist/lib/testing/storyboard/seeding.d.mts +15 -1
- package/dist/lib/testing/storyboard/seeding.d.ts +15 -1
- package/dist/lib/testing/storyboard/seeding.js +272 -12
- package/dist/lib/testing/storyboard/seeding.mjs +274 -13
- package/dist/lib/testing/storyboard/types.d.mts +207 -10
- package/dist/lib/testing/storyboard/types.d.ts +207 -10
- package/dist/lib/testing/storyboard/types.js +1 -1
- package/dist/lib/testing/storyboard/types.mjs +1 -1
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/testing/storyboard/validations.js +95 -0
- package/dist/lib/testing/storyboard/validations.mjs +95 -0
- package/dist/lib/validation/bundled-schema-store.js +5 -0
- package/dist/lib/validation/bundled-schema-store.mjs +4 -0
- package/dist/lib/validation/schema-loader.js +19 -2
- package/dist/lib/validation/schema-loader.mjs +22 -3
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/guides/COLLECTION-FIXTURE-FOUNDATION.md +850 -0
- package/docs/guides/PROPOSAL-TERMS-VERIFICATION.md +66 -0
- package/docs/llms.txt +4 -3
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-agent-identity-3.3.md +51 -6
- package/package.json +6 -4
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var version_exports = {};
|
|
20
|
+
__export(version_exports, {
|
|
21
|
+
applicableRefinementServedVersion: () => applicableRefinementServedVersion,
|
|
22
|
+
compareProposalRefinementVersions: () => compareProposalRefinementVersions,
|
|
23
|
+
describeRefinementVersion: () => describeRefinementVersion,
|
|
24
|
+
isProposalRefinementVersion: () => isProposalRefinementVersion
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(version_exports);
|
|
27
|
+
var import_semver = require("semver");
|
|
28
|
+
var import_version = require('../version.js');
|
|
29
|
+
function isProposalRefinementVersion(value) {
|
|
30
|
+
if (typeof value !== "string" || !/^3\.[23](?:-[A-Za-z0-9]+(?:[.-][A-Za-z0-9]+)*)?$/.test(value)) return false;
|
|
31
|
+
const comparable = value.replace(/^(3\.[23])(?=-|$)/, "$1.0");
|
|
32
|
+
return (0, import_semver.valid)(comparable) === comparable;
|
|
33
|
+
}
|
|
34
|
+
function applicableRefinementServedVersion(served, ceiling, discoveryCeiling = ceiling) {
|
|
35
|
+
if (!isProposalRefinementVersion(discoveryCeiling)) return void 0;
|
|
36
|
+
if (!isProposalRefinementVersion(ceiling) || compareProposalRefinementVersions(ceiling, discoveryCeiling) > 0)
|
|
37
|
+
return void 0;
|
|
38
|
+
if (typeof served !== "string" || !isProposalRefinementVersion(ceiling)) return void 0;
|
|
39
|
+
if (!isProposalRefinementVersion(served) && (0, import_semver.valid)(served) !== served) return void 0;
|
|
40
|
+
const release = (0, import_version.toReleasePrecisionVersion)(served);
|
|
41
|
+
return isProposalRefinementVersion(release) && compareProposalRefinementVersions(release, ceiling) <= 0 ? served : void 0;
|
|
42
|
+
}
|
|
43
|
+
function compareProposalRefinementVersions(left, right) {
|
|
44
|
+
const semver = (value) => value.replace(/^(3\.[23])(?=-|$)/, "$1.0");
|
|
45
|
+
return (0, import_semver.compare)(semver(left), semver(right));
|
|
46
|
+
}
|
|
47
|
+
function describeRefinementVersion(value) {
|
|
48
|
+
try {
|
|
49
|
+
return (JSON.stringify(value) ?? String(value)).slice(0, 160);
|
|
50
|
+
} catch {
|
|
51
|
+
return "[unserializable version]";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
applicableRefinementServedVersion,
|
|
57
|
+
compareProposalRefinementVersions,
|
|
58
|
+
describeRefinementVersion,
|
|
59
|
+
isProposalRefinementVersion
|
|
60
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { compare, valid } from "semver";
|
|
2
|
+
import { toReleasePrecisionVersion } from "../version.mjs";
|
|
3
|
+
function isProposalRefinementVersion(value) {
|
|
4
|
+
if (typeof value !== "string" || !/^3\.[23](?:-[A-Za-z0-9]+(?:[.-][A-Za-z0-9]+)*)?$/.test(value)) return false;
|
|
5
|
+
const comparable = value.replace(/^(3\.[23])(?=-|$)/, "$1.0");
|
|
6
|
+
return valid(comparable) === comparable;
|
|
7
|
+
}
|
|
8
|
+
function applicableRefinementServedVersion(served, ceiling, discoveryCeiling = ceiling) {
|
|
9
|
+
if (!isProposalRefinementVersion(discoveryCeiling)) return void 0;
|
|
10
|
+
if (!isProposalRefinementVersion(ceiling) || compareProposalRefinementVersions(ceiling, discoveryCeiling) > 0)
|
|
11
|
+
return void 0;
|
|
12
|
+
if (typeof served !== "string" || !isProposalRefinementVersion(ceiling)) return void 0;
|
|
13
|
+
if (!isProposalRefinementVersion(served) && valid(served) !== served) return void 0;
|
|
14
|
+
const release = toReleasePrecisionVersion(served);
|
|
15
|
+
return isProposalRefinementVersion(release) && compareProposalRefinementVersions(release, ceiling) <= 0 ? served : void 0;
|
|
16
|
+
}
|
|
17
|
+
function compareProposalRefinementVersions(left, right) {
|
|
18
|
+
const semver = (value) => value.replace(/^(3\.[23])(?=-|$)/, "$1.0");
|
|
19
|
+
return compare(semver(left), semver(right));
|
|
20
|
+
}
|
|
21
|
+
function describeRefinementVersion(value) {
|
|
22
|
+
try {
|
|
23
|
+
return (JSON.stringify(value) ?? String(value)).slice(0, 160);
|
|
24
|
+
} catch {
|
|
25
|
+
return "[unserializable version]";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
applicableRefinementServedVersion,
|
|
30
|
+
compareProposalRefinementVersions,
|
|
31
|
+
describeRefinementVersion,
|
|
32
|
+
isProposalRefinementVersion
|
|
33
|
+
};
|
|
@@ -4314,6 +4314,12 @@ export interface components {
|
|
|
4314
4314
|
severity: string;
|
|
4315
4315
|
message: string;
|
|
4316
4316
|
}[];
|
|
4317
|
+
/** @description Advisory AdCP 4.0 readiness from the latest non-dry-run compliance run, graded against universal/v4-compatibility.yaml. Does not affect 3.x verification or conformance. Null when the latest run predates the report. */
|
|
4318
|
+
v4_readiness?: {
|
|
4319
|
+
registry_version: string;
|
|
4320
|
+
target_version: string;
|
|
4321
|
+
checks: components["schemas"]["V4ReadinessCheck"][];
|
|
4322
|
+
} | null;
|
|
4317
4323
|
/** @description Owner-scoped: the agent owner's membership tier. Populated only when the authenticated viewer owns the agent; null otherwise. Field is always present so response shape doesn't reveal ownership. */
|
|
4318
4324
|
membership_tier?: string | null;
|
|
4319
4325
|
/** @description Owner-scoped: human-readable label for membership_tier (e.g. 'Builder'). Null for non-owners. */
|
|
@@ -4388,6 +4394,23 @@ export interface components {
|
|
|
4388
4394
|
/** Format: uri */
|
|
4389
4395
|
reference_url?: string;
|
|
4390
4396
|
};
|
|
4397
|
+
V4ReadinessCheck: {
|
|
4398
|
+
/** @description Stable check id from universal/v4-compatibility.yaml. */
|
|
4399
|
+
id: string;
|
|
4400
|
+
/** @enum {string} */
|
|
4401
|
+
status: "passed" | "failing" | "not_observable";
|
|
4402
|
+
/**
|
|
4403
|
+
* @description Why a not_observable check could not be graded. Null for passed and failing.
|
|
4404
|
+
* @enum {string|null}
|
|
4405
|
+
*/
|
|
4406
|
+
reason: "storyboard_not_run" | "step_not_run" | "step_skipped" | "not_graded" | "notice_absent" | "not_observed_by_suite" | null;
|
|
4407
|
+
issue: number | null;
|
|
4408
|
+
change: string | null;
|
|
4409
|
+
detection: string;
|
|
4410
|
+
fix: string;
|
|
4411
|
+
/** @description Migration guide anchor for the check. */
|
|
4412
|
+
guide_url: string | null;
|
|
4413
|
+
};
|
|
4391
4414
|
/** @description Owner-scoped membership leg of badge eligibility. Non-owners receive eligible: null and an empty blocker list. */
|
|
4392
4415
|
OwnerComplianceEligibility: {
|
|
4393
4416
|
criteria_version: string;
|
|
@@ -4405,7 +4428,7 @@ export interface components {
|
|
|
4405
4428
|
adcp_version: string;
|
|
4406
4429
|
verified_at: string;
|
|
4407
4430
|
/** @description Specialisms demonstrably passed (enums/specialism.json). Preview specialisms are excluded from stable badges. */
|
|
4408
|
-
verified_specialisms: ("audience-sync" | "brand-rights" | "buyer-activation" | "buyer-discovery" | "buyer-monitoring" | "buyer-negotiation" | "buyer-recovery" | "collection-lists" | "content-standards" | "creative-ad-server" | "creative-generative" | "creative-template" | "creative-transformers" | "governance-aware-seller" | "governance-delivery-monitor" | "governance-spend-authority" | "property-lists" | "sales-broadcast-tv" | "sales-catalog-driven" | "sales-dooh" | "sales-exchange" | "sales-guaranteed" | "sales-non-guaranteed" | "sales-proposal-mode" | "sales-retail-media" | "sales-streaming-tv" | "sales-social" | "signal-marketplace" | "orchestrator-multi-agent" | "signal-owned" | "signed-requests" | "sponsored-intelligence")[];
|
|
4431
|
+
verified_specialisms: ("audience-sync" | "brand-rights" | "buyer-activation" | "buyer-discovery" | "buyer-monitoring" | "buyer-negotiation" | "buyer-recovery" | "collection-lists" | "content-standards" | "creative-ad-server" | "creative-generative" | "creative-template" | "creative-transformers" | "governance-aware-seller" | "governance-delivery-monitor" | "governance-spend-authority" | "property-lists" | "sales-broadcast-tv" | "sales-catalog-driven" | "sales-dooh" | "sales-exchange" | "sales-fixed-rate" | "sales-guaranteed" | "sales-non-guaranteed" | "sales-proposal-mode" | "sales-retail-media" | "sales-streaming-tv" | "sales-social" | "signal-marketplace" | "orchestrator-multi-agent" | "signal-owned" | "signed-requests" | "sponsored-intelligence")[];
|
|
4409
4432
|
/** @description Evidence modes earned. 'spec' = AdCP storyboards were exercised; 'live' = production traffic was observed. Independent of grading_profile and always non-empty when a badge is present. */
|
|
4410
4433
|
verification_modes: ("spec" | "live")[];
|
|
4411
4434
|
/**
|
|
@@ -4314,6 +4314,12 @@ export interface components {
|
|
|
4314
4314
|
severity: string;
|
|
4315
4315
|
message: string;
|
|
4316
4316
|
}[];
|
|
4317
|
+
/** @description Advisory AdCP 4.0 readiness from the latest non-dry-run compliance run, graded against universal/v4-compatibility.yaml. Does not affect 3.x verification or conformance. Null when the latest run predates the report. */
|
|
4318
|
+
v4_readiness?: {
|
|
4319
|
+
registry_version: string;
|
|
4320
|
+
target_version: string;
|
|
4321
|
+
checks: components["schemas"]["V4ReadinessCheck"][];
|
|
4322
|
+
} | null;
|
|
4317
4323
|
/** @description Owner-scoped: the agent owner's membership tier. Populated only when the authenticated viewer owns the agent; null otherwise. Field is always present so response shape doesn't reveal ownership. */
|
|
4318
4324
|
membership_tier?: string | null;
|
|
4319
4325
|
/** @description Owner-scoped: human-readable label for membership_tier (e.g. 'Builder'). Null for non-owners. */
|
|
@@ -4388,6 +4394,23 @@ export interface components {
|
|
|
4388
4394
|
/** Format: uri */
|
|
4389
4395
|
reference_url?: string;
|
|
4390
4396
|
};
|
|
4397
|
+
V4ReadinessCheck: {
|
|
4398
|
+
/** @description Stable check id from universal/v4-compatibility.yaml. */
|
|
4399
|
+
id: string;
|
|
4400
|
+
/** @enum {string} */
|
|
4401
|
+
status: "passed" | "failing" | "not_observable";
|
|
4402
|
+
/**
|
|
4403
|
+
* @description Why a not_observable check could not be graded. Null for passed and failing.
|
|
4404
|
+
* @enum {string|null}
|
|
4405
|
+
*/
|
|
4406
|
+
reason: "storyboard_not_run" | "step_not_run" | "step_skipped" | "not_graded" | "notice_absent" | "not_observed_by_suite" | null;
|
|
4407
|
+
issue: number | null;
|
|
4408
|
+
change: string | null;
|
|
4409
|
+
detection: string;
|
|
4410
|
+
fix: string;
|
|
4411
|
+
/** @description Migration guide anchor for the check. */
|
|
4412
|
+
guide_url: string | null;
|
|
4413
|
+
};
|
|
4391
4414
|
/** @description Owner-scoped membership leg of badge eligibility. Non-owners receive eligible: null and an empty blocker list. */
|
|
4392
4415
|
OwnerComplianceEligibility: {
|
|
4393
4416
|
criteria_version: string;
|
|
@@ -4405,7 +4428,7 @@ export interface components {
|
|
|
4405
4428
|
adcp_version: string;
|
|
4406
4429
|
verified_at: string;
|
|
4407
4430
|
/** @description Specialisms demonstrably passed (enums/specialism.json). Preview specialisms are excluded from stable badges. */
|
|
4408
|
-
verified_specialisms: ("audience-sync" | "brand-rights" | "buyer-activation" | "buyer-discovery" | "buyer-monitoring" | "buyer-negotiation" | "buyer-recovery" | "collection-lists" | "content-standards" | "creative-ad-server" | "creative-generative" | "creative-template" | "creative-transformers" | "governance-aware-seller" | "governance-delivery-monitor" | "governance-spend-authority" | "property-lists" | "sales-broadcast-tv" | "sales-catalog-driven" | "sales-dooh" | "sales-exchange" | "sales-guaranteed" | "sales-non-guaranteed" | "sales-proposal-mode" | "sales-retail-media" | "sales-streaming-tv" | "sales-social" | "signal-marketplace" | "orchestrator-multi-agent" | "signal-owned" | "signed-requests" | "sponsored-intelligence")[];
|
|
4431
|
+
verified_specialisms: ("audience-sync" | "brand-rights" | "buyer-activation" | "buyer-discovery" | "buyer-monitoring" | "buyer-negotiation" | "buyer-recovery" | "collection-lists" | "content-standards" | "creative-ad-server" | "creative-generative" | "creative-template" | "creative-transformers" | "governance-aware-seller" | "governance-delivery-monitor" | "governance-spend-authority" | "property-lists" | "sales-broadcast-tv" | "sales-catalog-driven" | "sales-dooh" | "sales-exchange" | "sales-fixed-rate" | "sales-guaranteed" | "sales-non-guaranteed" | "sales-proposal-mode" | "sales-retail-media" | "sales-streaming-tv" | "sales-social" | "signal-marketplace" | "orchestrator-multi-agent" | "signal-owned" | "signed-requests" | "sponsored-intelligence")[];
|
|
4409
4432
|
/** @description Evidence modes earned. 'spec' = AdCP storyboards were exercised; 'live' = production traffic was observed. Independent of grading_profile and always non-empty when a badge is present. */
|
|
4410
4433
|
verification_modes: ("spec" | "live")[];
|
|
4411
4434
|
/**
|
|
@@ -726,7 +726,7 @@ function validateFrameworkPayload(toolName, direction, payload, version, proposa
|
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
|
-
const verification = (0, import_verification.validateRefineProposalsResponseShape)(payload);
|
|
729
|
+
const verification = (0, import_verification.validateRefineProposalsResponseShape)(payload, { adcpVersion: version });
|
|
730
730
|
if (verification.ok) {
|
|
731
731
|
return {
|
|
732
732
|
valid: true,
|
|
@@ -817,7 +817,7 @@ function validateFrameworkPayload(toolName, direction, payload, version, proposa
|
|
|
817
817
|
};
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
|
-
const verification = validateRefineProposalsResponseShape(payload);
|
|
820
|
+
const verification = validateRefineProposalsResponseShape(payload, { adcpVersion: version });
|
|
821
821
|
if (verification.ok) {
|
|
822
822
|
return {
|
|
823
823
|
valid: true,
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
* response schema doesn't define it would add a key the schema
|
|
11
11
|
* doesn't expect.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* Derived from the active schema-loader authority. Bundle inventories are
|
|
14
|
+
* memoised by bundle key and resolved root, with loader-epoch invalidation
|
|
15
|
+
* so scoped or re-registered candidate bundles cannot leak.
|
|
16
|
+
* Raw external roots use the loader's response index when no bundled
|
|
17
|
+
* store exists.
|
|
17
18
|
*
|
|
18
19
|
* Spec basis: `error-code.json#GOVERNANCE_DENIED` and
|
|
19
20
|
* `#GOVERNANCE_UNAVAILABLE` both prescribe "populate `errors[].code` in
|
|
@@ -44,12 +45,11 @@ export interface ErrorArmDescriptor {
|
|
|
44
45
|
* gate for two-layer auto-emission, plus the per-arm constants the
|
|
45
46
|
* dispatcher needs to set when synthesising the wrap.
|
|
46
47
|
*
|
|
47
|
-
* Scans the
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* rather than breaking server startup.
|
|
48
|
+
* Scans the active schema authority lazily. Missing roots return an empty map
|
|
49
|
+
* without caching, so later external registration takes effect. Re-registering
|
|
50
|
+
* or entering another schema scope invalidates cached inventories, including
|
|
51
|
+
* replacements of candidate bundles at the same path.
|
|
52
52
|
*/
|
|
53
53
|
export declare function getToolsWithErrorArm(version?: string): ReadonlyMap<string, ErrorArmDescriptor>;
|
|
54
|
-
/** Test hook: clear
|
|
54
|
+
/** Test hook: clear cached error-arm inventories. */
|
|
55
55
|
export declare function _resetErrorArmToolsCache(): void;
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
* response schema doesn't define it would add a key the schema
|
|
11
11
|
* doesn't expect.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* Derived from the active schema-loader authority. Bundle inventories are
|
|
14
|
+
* memoised by bundle key and resolved root, with loader-epoch invalidation
|
|
15
|
+
* so scoped or re-registered candidate bundles cannot leak.
|
|
16
|
+
* Raw external roots use the loader's response index when no bundled
|
|
17
|
+
* store exists.
|
|
17
18
|
*
|
|
18
19
|
* Spec basis: `error-code.json#GOVERNANCE_DENIED` and
|
|
19
20
|
* `#GOVERNANCE_UNAVAILABLE` both prescribe "populate `errors[].code` in
|
|
@@ -44,12 +45,11 @@ export interface ErrorArmDescriptor {
|
|
|
44
45
|
* gate for two-layer auto-emission, plus the per-arm constants the
|
|
45
46
|
* dispatcher needs to set when synthesising the wrap.
|
|
46
47
|
*
|
|
47
|
-
* Scans the
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* rather than breaking server startup.
|
|
48
|
+
* Scans the active schema authority lazily. Missing roots return an empty map
|
|
49
|
+
* without caching, so later external registration takes effect. Re-registering
|
|
50
|
+
* or entering another schema scope invalidates cached inventories, including
|
|
51
|
+
* replacements of candidate bundles at the same path.
|
|
52
52
|
*/
|
|
53
53
|
export declare function getToolsWithErrorArm(version?: string): ReadonlyMap<string, ErrorArmDescriptor>;
|
|
54
|
-
/** Test hook: clear
|
|
54
|
+
/** Test hook: clear cached error-arm inventories. */
|
|
55
55
|
export declare function _resetErrorArmToolsCache(): void;
|
|
@@ -37,49 +37,6 @@ var import_path = __toESM(require("path"));
|
|
|
37
37
|
var import_version = require('../version.js');
|
|
38
38
|
var import_schema_loader = require('../validation/schema-loader.js');
|
|
39
39
|
var import_bundled_schema_store = require('../validation/bundled-schema-store.js');
|
|
40
|
-
function findPrereleaseBundle(root, key) {
|
|
41
|
-
if (!(0, import_fs.existsSync)(root)) return void 0;
|
|
42
|
-
const candidates = (0, import_fs.readdirSync)(root, { withFileTypes: true }).filter((entry) => entry.isDirectory() && !entry.name.endsWith(".previous")).map((entry) => {
|
|
43
|
-
try {
|
|
44
|
-
return { name: entry.name, releasePrecision: (0, import_schema_loader.toReleasePrecisionWire)(entry.name) };
|
|
45
|
-
} catch {
|
|
46
|
-
return void 0;
|
|
47
|
-
}
|
|
48
|
-
}).filter(
|
|
49
|
-
(entry) => entry !== void 0 && (entry.releasePrecision === key || entry.releasePrecision.startsWith(`${key}.`))
|
|
50
|
-
).sort((a, b) => b.name.localeCompare(a.name, void 0, { numeric: true, sensitivity: "base" }));
|
|
51
|
-
return candidates[0] ? import_path.default.join(root, candidates[0].name) : void 0;
|
|
52
|
-
}
|
|
53
|
-
function resolveBundledRoot(version) {
|
|
54
|
-
const key = (0, import_schema_loader.resolveBundleKey)(version);
|
|
55
|
-
const distRoot = import_path.default.join(__dirname, "..", "schemas-data");
|
|
56
|
-
const distCandidate = import_path.default.join(distRoot, key, "bundled");
|
|
57
|
-
if ((0, import_bundled_schema_store.hasBundledSchemaStore)(distCandidate)) return distCandidate;
|
|
58
|
-
const releasePrecisionMatch = /^\d+\.\d+-/.test(key);
|
|
59
|
-
if (releasePrecisionMatch) {
|
|
60
|
-
const distPrerelease = findPrereleaseBundle(distRoot, key);
|
|
61
|
-
if (distPrerelease) return import_path.default.join(distPrerelease, "bundled");
|
|
62
|
-
}
|
|
63
|
-
const cacheRoot = import_path.default.join(__dirname, "..", "..", "..", "schemas", "cache");
|
|
64
|
-
const exactCandidate = import_path.default.join(cacheRoot, version, "bundled");
|
|
65
|
-
if ((0, import_bundled_schema_store.hasBundledSchemaStore)(exactCandidate)) return exactCandidate;
|
|
66
|
-
const minorMatch = key.match(/^(\d+)\.(\d+)$/);
|
|
67
|
-
if (minorMatch && (0, import_fs.existsSync)(cacheRoot)) {
|
|
68
|
-
const [, major, minor] = minorMatch;
|
|
69
|
-
const prefix = `${major}.${minor}.`;
|
|
70
|
-
const cached = (0, import_fs.readdirSync)(cacheRoot, { withFileTypes: true }).filter(
|
|
71
|
-
(e) => e.isDirectory() && e.name.startsWith(prefix) && !e.name.endsWith(".previous") && /^\d+\.\d+\.\d+$/.test(e.name)
|
|
72
|
-
).map((e) => ({ name: e.name, patch: parseInt(e.name.slice(prefix.length), 10) })).filter((c) => Number.isFinite(c.patch)).sort((a, b) => b.patch - a.patch);
|
|
73
|
-
if (cached.length > 0) {
|
|
74
|
-
return import_path.default.join(cacheRoot, cached[0].name, "bundled");
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (releasePrecisionMatch) {
|
|
78
|
-
const cachePrerelease = findPrereleaseBundle(cacheRoot, key);
|
|
79
|
-
if (cachePrerelease) return import_path.default.join(cachePrerelease, "bundled");
|
|
80
|
-
}
|
|
81
|
-
return void 0;
|
|
82
|
-
}
|
|
83
40
|
function resolveBranch(branch, rootSchema) {
|
|
84
41
|
if (!branch || typeof branch !== "object") return void 0;
|
|
85
42
|
const obj = branch;
|
|
@@ -113,19 +70,21 @@ function describeErrorArm(branch, rootSchema) {
|
|
|
113
70
|
}
|
|
114
71
|
return { extraRequired: Object.freeze(extraRequired) };
|
|
115
72
|
}
|
|
116
|
-
function scanForErrorArmTools(
|
|
73
|
+
function scanForErrorArmTools(root, version) {
|
|
74
|
+
const bundledRoot = import_path.default.join(root, "bundled");
|
|
117
75
|
const map = /* @__PURE__ */ new Map();
|
|
118
76
|
let manifestTools;
|
|
119
77
|
try {
|
|
120
|
-
const manifest = JSON.parse((0, import_fs.readFileSync)(import_path.default.join(
|
|
78
|
+
const manifest = JSON.parse((0, import_fs.readFileSync)(import_path.default.join(root, "manifest.json"), "utf-8"));
|
|
121
79
|
if (manifest.tools) manifestTools = new Set(Object.keys(manifest.tools));
|
|
122
80
|
} catch {
|
|
123
81
|
}
|
|
124
|
-
const
|
|
125
|
-
|
|
82
|
+
const bundled = (0, import_bundled_schema_store.hasBundledSchemaStore)(bundledRoot);
|
|
83
|
+
const responses = bundled ? (0, import_bundled_schema_store.listBundledSchemaFiles)(bundledRoot).filter((file) => file.endsWith("-response.json")).map((file) => ({ toolName: import_path.default.basename(file, "-response.json").replace(/-/g, "_"), file })) : (0, import_schema_loader.listValidatorKeys)(version).filter((key) => key.endsWith("::sync")).map((key) => ({ toolName: key.slice(0, -"::sync".length), file: void 0 }));
|
|
84
|
+
for (const { toolName, file } of responses) {
|
|
126
85
|
let schema;
|
|
127
86
|
try {
|
|
128
|
-
const loaded = (0, import_bundled_schema_store.loadBundledSchemaFile)(file);
|
|
87
|
+
const loaded = file ? (0, import_bundled_schema_store.loadBundledSchemaFile)(file) : (0, import_schema_loader.getToolSchemaDocument)(toolName, "sync", version)?.schema;
|
|
129
88
|
if (!loaded) continue;
|
|
130
89
|
schema = loaded;
|
|
131
90
|
} catch {
|
|
@@ -142,25 +101,30 @@ function scanForErrorArmTools(bundledRoot) {
|
|
|
142
101
|
}
|
|
143
102
|
}
|
|
144
103
|
if (!descriptor) continue;
|
|
145
|
-
const base = import_path.default.basename(file, "-response.json");
|
|
146
|
-
const toolName = base.replace(/-/g, "_");
|
|
147
104
|
if (manifestTools && !manifestTools.has(toolName)) continue;
|
|
148
105
|
map.set(toolName, descriptor);
|
|
149
106
|
}
|
|
150
107
|
return map;
|
|
151
108
|
}
|
|
109
|
+
let cachedGeneration = -1;
|
|
152
110
|
const cachedMaps = /* @__PURE__ */ new Map();
|
|
153
111
|
function getToolsWithErrorArm(version = import_version.ADCP_VERSION) {
|
|
154
|
-
const
|
|
112
|
+
const bundleKey = (0, import_schema_loader.resolveBundleKey)(version);
|
|
113
|
+
let root;
|
|
114
|
+
try {
|
|
115
|
+
root = (0, import_schema_loader.resolveSchemaRoot)(version);
|
|
116
|
+
} catch {
|
|
117
|
+
return /* @__PURE__ */ new Map();
|
|
118
|
+
}
|
|
119
|
+
const generation = (0, import_schema_loader.getSchemaLoaderGeneration)();
|
|
120
|
+
if (cachedGeneration !== generation) {
|
|
121
|
+
cachedMaps.clear();
|
|
122
|
+
cachedGeneration = generation;
|
|
123
|
+
}
|
|
124
|
+
const key = `${bundleKey}\0${import_path.default.resolve(root)}`;
|
|
155
125
|
const cached = cachedMaps.get(key);
|
|
156
126
|
if (cached) return cached;
|
|
157
|
-
const
|
|
158
|
-
if (!root) {
|
|
159
|
-
const empty = /* @__PURE__ */ new Map();
|
|
160
|
-
cachedMaps.set(key, empty);
|
|
161
|
-
return empty;
|
|
162
|
-
}
|
|
163
|
-
const map = scanForErrorArmTools(root);
|
|
127
|
+
const map = scanForErrorArmTools(root, version);
|
|
164
128
|
cachedMaps.set(key, map);
|
|
165
129
|
return map;
|
|
166
130
|
}
|
|
@@ -1,60 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { dirname as __adcpDirname } from "node:path";
|
|
3
|
-
import { createRequire as __adcpCreateRequire } from "node:module";
|
|
4
|
-
const __dirname = __adcpDirname(__adcpFileURLToPath(import.meta.url));
|
|
5
|
-
const require2 = __adcpCreateRequire(import.meta.url);
|
|
6
|
-
import { readdirSync, readFileSync, existsSync } from "fs";
|
|
1
|
+
import { readFileSync } from "fs";
|
|
7
2
|
import path from "path";
|
|
8
3
|
import { ADCP_VERSION } from "../version.mjs";
|
|
9
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
getToolSchemaDocument,
|
|
6
|
+
getSchemaLoaderGeneration,
|
|
7
|
+
listValidatorKeys,
|
|
8
|
+
resolveBundleKey,
|
|
9
|
+
resolveSchemaRoot
|
|
10
|
+
} from "../validation/schema-loader.mjs";
|
|
10
11
|
import {
|
|
11
12
|
hasBundledSchemaStore,
|
|
12
13
|
listBundledSchemaFiles,
|
|
13
14
|
loadBundledSchemaFile
|
|
14
15
|
} from "../validation/bundled-schema-store.mjs";
|
|
15
|
-
function findPrereleaseBundle(root, key) {
|
|
16
|
-
if (!existsSync(root)) return void 0;
|
|
17
|
-
const candidates = readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory() && !entry.name.endsWith(".previous")).map((entry) => {
|
|
18
|
-
try {
|
|
19
|
-
return { name: entry.name, releasePrecision: toReleasePrecisionWire(entry.name) };
|
|
20
|
-
} catch {
|
|
21
|
-
return void 0;
|
|
22
|
-
}
|
|
23
|
-
}).filter(
|
|
24
|
-
(entry) => entry !== void 0 && (entry.releasePrecision === key || entry.releasePrecision.startsWith(`${key}.`))
|
|
25
|
-
).sort((a, b) => b.name.localeCompare(a.name, void 0, { numeric: true, sensitivity: "base" }));
|
|
26
|
-
return candidates[0] ? path.join(root, candidates[0].name) : void 0;
|
|
27
|
-
}
|
|
28
|
-
function resolveBundledRoot(version) {
|
|
29
|
-
const key = resolveBundleKey(version);
|
|
30
|
-
const distRoot = path.join(__dirname, "..", "schemas-data");
|
|
31
|
-
const distCandidate = path.join(distRoot, key, "bundled");
|
|
32
|
-
if (hasBundledSchemaStore(distCandidate)) return distCandidate;
|
|
33
|
-
const releasePrecisionMatch = /^\d+\.\d+-/.test(key);
|
|
34
|
-
if (releasePrecisionMatch) {
|
|
35
|
-
const distPrerelease = findPrereleaseBundle(distRoot, key);
|
|
36
|
-
if (distPrerelease) return path.join(distPrerelease, "bundled");
|
|
37
|
-
}
|
|
38
|
-
const cacheRoot = path.join(__dirname, "..", "..", "..", "schemas", "cache");
|
|
39
|
-
const exactCandidate = path.join(cacheRoot, version, "bundled");
|
|
40
|
-
if (hasBundledSchemaStore(exactCandidate)) return exactCandidate;
|
|
41
|
-
const minorMatch = key.match(/^(\d+)\.(\d+)$/);
|
|
42
|
-
if (minorMatch && existsSync(cacheRoot)) {
|
|
43
|
-
const [, major, minor] = minorMatch;
|
|
44
|
-
const prefix = `${major}.${minor}.`;
|
|
45
|
-
const cached = readdirSync(cacheRoot, { withFileTypes: true }).filter(
|
|
46
|
-
(e) => e.isDirectory() && e.name.startsWith(prefix) && !e.name.endsWith(".previous") && /^\d+\.\d+\.\d+$/.test(e.name)
|
|
47
|
-
).map((e) => ({ name: e.name, patch: parseInt(e.name.slice(prefix.length), 10) })).filter((c) => Number.isFinite(c.patch)).sort((a, b) => b.patch - a.patch);
|
|
48
|
-
if (cached.length > 0) {
|
|
49
|
-
return path.join(cacheRoot, cached[0].name, "bundled");
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (releasePrecisionMatch) {
|
|
53
|
-
const cachePrerelease = findPrereleaseBundle(cacheRoot, key);
|
|
54
|
-
if (cachePrerelease) return path.join(cachePrerelease, "bundled");
|
|
55
|
-
}
|
|
56
|
-
return void 0;
|
|
57
|
-
}
|
|
58
16
|
function resolveBranch(branch, rootSchema) {
|
|
59
17
|
if (!branch || typeof branch !== "object") return void 0;
|
|
60
18
|
const obj = branch;
|
|
@@ -88,19 +46,21 @@ function describeErrorArm(branch, rootSchema) {
|
|
|
88
46
|
}
|
|
89
47
|
return { extraRequired: Object.freeze(extraRequired) };
|
|
90
48
|
}
|
|
91
|
-
function scanForErrorArmTools(
|
|
49
|
+
function scanForErrorArmTools(root, version) {
|
|
50
|
+
const bundledRoot = path.join(root, "bundled");
|
|
92
51
|
const map = /* @__PURE__ */ new Map();
|
|
93
52
|
let manifestTools;
|
|
94
53
|
try {
|
|
95
|
-
const manifest = JSON.parse(readFileSync(path.join(
|
|
54
|
+
const manifest = JSON.parse(readFileSync(path.join(root, "manifest.json"), "utf-8"));
|
|
96
55
|
if (manifest.tools) manifestTools = new Set(Object.keys(manifest.tools));
|
|
97
56
|
} catch {
|
|
98
57
|
}
|
|
99
|
-
const
|
|
100
|
-
|
|
58
|
+
const bundled = hasBundledSchemaStore(bundledRoot);
|
|
59
|
+
const responses = bundled ? listBundledSchemaFiles(bundledRoot).filter((file) => file.endsWith("-response.json")).map((file) => ({ toolName: path.basename(file, "-response.json").replace(/-/g, "_"), file })) : listValidatorKeys(version).filter((key) => key.endsWith("::sync")).map((key) => ({ toolName: key.slice(0, -"::sync".length), file: void 0 }));
|
|
60
|
+
for (const { toolName, file } of responses) {
|
|
101
61
|
let schema;
|
|
102
62
|
try {
|
|
103
|
-
const loaded = loadBundledSchemaFile(file);
|
|
63
|
+
const loaded = file ? loadBundledSchemaFile(file) : getToolSchemaDocument(toolName, "sync", version)?.schema;
|
|
104
64
|
if (!loaded) continue;
|
|
105
65
|
schema = loaded;
|
|
106
66
|
} catch {
|
|
@@ -117,25 +77,30 @@ function scanForErrorArmTools(bundledRoot) {
|
|
|
117
77
|
}
|
|
118
78
|
}
|
|
119
79
|
if (!descriptor) continue;
|
|
120
|
-
const base = path.basename(file, "-response.json");
|
|
121
|
-
const toolName = base.replace(/-/g, "_");
|
|
122
80
|
if (manifestTools && !manifestTools.has(toolName)) continue;
|
|
123
81
|
map.set(toolName, descriptor);
|
|
124
82
|
}
|
|
125
83
|
return map;
|
|
126
84
|
}
|
|
85
|
+
let cachedGeneration = -1;
|
|
127
86
|
const cachedMaps = /* @__PURE__ */ new Map();
|
|
128
87
|
function getToolsWithErrorArm(version = ADCP_VERSION) {
|
|
129
|
-
const
|
|
88
|
+
const bundleKey = resolveBundleKey(version);
|
|
89
|
+
let root;
|
|
90
|
+
try {
|
|
91
|
+
root = resolveSchemaRoot(version);
|
|
92
|
+
} catch {
|
|
93
|
+
return /* @__PURE__ */ new Map();
|
|
94
|
+
}
|
|
95
|
+
const generation = getSchemaLoaderGeneration();
|
|
96
|
+
if (cachedGeneration !== generation) {
|
|
97
|
+
cachedMaps.clear();
|
|
98
|
+
cachedGeneration = generation;
|
|
99
|
+
}
|
|
100
|
+
const key = `${bundleKey}\0${path.resolve(root)}`;
|
|
130
101
|
const cached = cachedMaps.get(key);
|
|
131
102
|
if (cached) return cached;
|
|
132
|
-
const
|
|
133
|
-
if (!root) {
|
|
134
|
-
const empty = /* @__PURE__ */ new Map();
|
|
135
|
-
cachedMaps.set(key, empty);
|
|
136
|
-
return empty;
|
|
137
|
-
}
|
|
138
|
-
const map = scanForErrorArmTools(root);
|
|
103
|
+
const map = scanForErrorArmTools(root, version);
|
|
139
104
|
cachedMaps.set(key, map);
|
|
140
105
|
return map;
|
|
141
106
|
}
|
|
@@ -83,8 +83,8 @@ export { createPinAndBindFetch, WEBHOOK_SSRF_POLICY, LOOPBACK_OK_WEBHOOK_SSRF_PO
|
|
|
83
83
|
export type { PinAndBindFetchOptions, DnsLookupAll } from './pin-and-bind-fetch.mjs';
|
|
84
84
|
export { checkGovernance, createAdcpGovernanceEnforcementMiddleware, governanceDeniedError, governanceUnavailableError, } from './governance.mjs';
|
|
85
85
|
export type { AdcpGovernanceEnforcementMiddleware, CheckGovernanceOptions, GovernanceCallResult, GovernanceApproved, GovernanceDenied, GovernanceConditions, } from './governance.mjs';
|
|
86
|
-
export { GovernanceAuthorizationError, GovernanceReplayStoreAdapter, InMemoryGovernanceReplayStore, buildGovernanceExecutionCommitment, buildGovernanceExecutionRequest, computeGovernedPayloadHash, createGovernanceEnforcementMiddleware, verifyGovernanceAuthorization, createGovernanceAgentJwksResolver, } from '../governance/index.mjs';
|
|
87
|
-
export type { BuildGovernanceExecutionRequestInput, GovernanceAuthorizationClaims, GovernanceAuthorizationErrorCode, GovernanceAuthorizationResult, GovernanceAuthorizationSuccess, GovernanceCommitment, GovernanceEnforcementMiddleware, GovernanceEnforcementMiddlewareConfig, GovernanceEnforcementMiddlewareInput, GovernanceReplayStore, GovernanceReplayBinding, GovernanceRevocationResolver, GovernanceRevocationStatus, VerifyGovernanceAuthorizationOptions, GovernanceBuyerIdentity, } from '../governance/index.mjs';
|
|
86
|
+
export { GovernanceAuthorizationError, GovernanceReplayStoreAdapter, InMemoryGovernanceReplayStore, buildGovernanceExecutionCommitment, buildGovernanceExecutionRequest, computeGovernedPayloadHash, createGovernanceEnforcementMiddleware, verifyGovernanceAuthorization, verifyHistoricalGovernanceContext, createGovernanceAgentJwksResolver, } from '../governance/index.mjs';
|
|
87
|
+
export type { BuildGovernanceExecutionRequestInput, GovernanceAuthorizationClaims, GovernanceAuthorizationErrorCode, GovernanceAuthorizationResult, GovernanceAuthorizationSuccess, GovernanceCommitment, GovernanceEnforcementMiddleware, GovernanceEnforcementMiddlewareConfig, GovernanceEnforcementMiddlewareInput, GovernanceReplayStore, GovernanceReplayBinding, GovernanceRevocationResolver, GovernanceRevocationStatus, VerifyGovernanceAuthorizationOptions, VerifyHistoricalGovernanceContextOptions, HistoricalGovernanceContextResult, GovernanceBuyerIdentity, } from '../governance/index.mjs';
|
|
88
88
|
export { clearDefaultResolvedListCache, createResolvedListCache, DEFAULT_RESOLVE_LIST_PAGE_SIZE, defaultResolvedListCache, resolvePropertyList, resolveCollectionList, resolvedListCacheKey, matchesPropertyList, matchesCollectionList, } from './targeting-helpers.mjs';
|
|
89
89
|
export type { ResolvedListCache, ResolvedListCacheEntry, ResolvedListCacheValue, ResolvedListKind, ResolvedPropertyList, ResolvedCollectionList, ResolvedCollection, ResolveListCallTool, ResolveListOptions, } from './targeting-helpers.mjs';
|
|
90
90
|
export * from './decisioning/index.mjs';
|
|
@@ -83,8 +83,8 @@ export { createPinAndBindFetch, WEBHOOK_SSRF_POLICY, LOOPBACK_OK_WEBHOOK_SSRF_PO
|
|
|
83
83
|
export type { PinAndBindFetchOptions, DnsLookupAll } from './pin-and-bind-fetch';
|
|
84
84
|
export { checkGovernance, createAdcpGovernanceEnforcementMiddleware, governanceDeniedError, governanceUnavailableError, } from './governance';
|
|
85
85
|
export type { AdcpGovernanceEnforcementMiddleware, CheckGovernanceOptions, GovernanceCallResult, GovernanceApproved, GovernanceDenied, GovernanceConditions, } from './governance';
|
|
86
|
-
export { GovernanceAuthorizationError, GovernanceReplayStoreAdapter, InMemoryGovernanceReplayStore, buildGovernanceExecutionCommitment, buildGovernanceExecutionRequest, computeGovernedPayloadHash, createGovernanceEnforcementMiddleware, verifyGovernanceAuthorization, createGovernanceAgentJwksResolver, } from '../governance';
|
|
87
|
-
export type { BuildGovernanceExecutionRequestInput, GovernanceAuthorizationClaims, GovernanceAuthorizationErrorCode, GovernanceAuthorizationResult, GovernanceAuthorizationSuccess, GovernanceCommitment, GovernanceEnforcementMiddleware, GovernanceEnforcementMiddlewareConfig, GovernanceEnforcementMiddlewareInput, GovernanceReplayStore, GovernanceReplayBinding, GovernanceRevocationResolver, GovernanceRevocationStatus, VerifyGovernanceAuthorizationOptions, GovernanceBuyerIdentity, } from '../governance';
|
|
86
|
+
export { GovernanceAuthorizationError, GovernanceReplayStoreAdapter, InMemoryGovernanceReplayStore, buildGovernanceExecutionCommitment, buildGovernanceExecutionRequest, computeGovernedPayloadHash, createGovernanceEnforcementMiddleware, verifyGovernanceAuthorization, verifyHistoricalGovernanceContext, createGovernanceAgentJwksResolver, } from '../governance';
|
|
87
|
+
export type { BuildGovernanceExecutionRequestInput, GovernanceAuthorizationClaims, GovernanceAuthorizationErrorCode, GovernanceAuthorizationResult, GovernanceAuthorizationSuccess, GovernanceCommitment, GovernanceEnforcementMiddleware, GovernanceEnforcementMiddlewareConfig, GovernanceEnforcementMiddlewareInput, GovernanceReplayStore, GovernanceReplayBinding, GovernanceRevocationResolver, GovernanceRevocationStatus, VerifyGovernanceAuthorizationOptions, VerifyHistoricalGovernanceContextOptions, HistoricalGovernanceContextResult, GovernanceBuyerIdentity, } from '../governance';
|
|
88
88
|
export { clearDefaultResolvedListCache, createResolvedListCache, DEFAULT_RESOLVE_LIST_PAGE_SIZE, defaultResolvedListCache, resolvePropertyList, resolveCollectionList, resolvedListCacheKey, matchesPropertyList, matchesCollectionList, } from './targeting-helpers';
|
|
89
89
|
export type { ResolvedListCache, ResolvedListCacheEntry, ResolvedListCacheValue, ResolvedListKind, ResolvedPropertyList, ResolvedCollectionList, ResolvedCollection, ResolveListCallTool, ResolveListOptions, } from './targeting-helpers';
|
|
90
90
|
export * from './decisioning';
|
package/dist/lib/server/index.js
CHANGED
|
@@ -293,6 +293,7 @@ __export(server_exports, {
|
|
|
293
293
|
verifyApiKey: () => import_auth.verifyApiKey,
|
|
294
294
|
verifyBearer: () => import_auth.verifyBearer,
|
|
295
295
|
verifyGovernanceAuthorization: () => import_governance2.verifyGovernanceAuthorization,
|
|
296
|
+
verifyHistoricalGovernanceContext: () => import_governance2.verifyHistoricalGovernanceContext,
|
|
296
297
|
verifyIntrospection: () => import_auth_introspection.verifyIntrospection,
|
|
297
298
|
verifyProposalTermsDigest: () => import_verification.verifyProposalTermsDigest,
|
|
298
299
|
verifySignatureAsAuthenticator: () => import_auth_signature.verifySignatureAsAuthenticator,
|
|
@@ -633,6 +634,7 @@ var import_property_lists = require('./property-lists.js');
|
|
|
633
634
|
verifyApiKey,
|
|
634
635
|
verifyBearer,
|
|
635
636
|
verifyGovernanceAuthorization,
|
|
637
|
+
verifyHistoricalGovernanceContext,
|
|
636
638
|
verifyIntrospection,
|
|
637
639
|
verifyProposalTermsDigest,
|
|
638
640
|
verifySignatureAsAuthenticator,
|
|
@@ -236,6 +236,7 @@ import {
|
|
|
236
236
|
computeGovernedPayloadHash,
|
|
237
237
|
createGovernanceEnforcementMiddleware,
|
|
238
238
|
verifyGovernanceAuthorization,
|
|
239
|
+
verifyHistoricalGovernanceContext,
|
|
239
240
|
createGovernanceAgentJwksResolver
|
|
240
241
|
} from "../governance/index.mjs";
|
|
241
242
|
import {
|
|
@@ -579,6 +580,7 @@ export {
|
|
|
579
580
|
verifyApiKey,
|
|
580
581
|
verifyBearer,
|
|
581
582
|
verifyGovernanceAuthorization,
|
|
583
|
+
verifyHistoricalGovernanceContext,
|
|
582
584
|
verifyIntrospection,
|
|
583
585
|
verifyProposalTermsDigest,
|
|
584
586
|
verifySignatureAsAuthenticator,
|
|
@@ -35,6 +35,7 @@ __export(web_bot_auth_exports, {
|
|
|
35
35
|
deferWebBotAuthPrincipalFailure: () => deferWebBotAuthPrincipalFailure,
|
|
36
36
|
getWebBotAuthAuthorizationFailure: () => getWebBotAuthAuthorizationFailure,
|
|
37
37
|
getWebBotAuthLegacyOriginGate: () => getWebBotAuthLegacyOriginGate,
|
|
38
|
+
isRefusedWebBotAuthTestKey: () => isRefusedWebBotAuthTestKey,
|
|
38
39
|
isVerifiedWebBotSigner: () => isVerifiedWebBotSigner,
|
|
39
40
|
isWebBotAuthRevocationChecked: () => isWebBotAuthRevocationChecked,
|
|
40
41
|
jwkThumbprint: () => jwkThumbprint,
|
|
@@ -570,6 +571,9 @@ async function legacyRevocationCheck(options, origin, keyid) {
|
|
|
570
571
|
function testKeysAllowed(allowTestKeys) {
|
|
571
572
|
return allowTestKeys === true && ["test", "development"].includes(process.env.NODE_ENV ?? "");
|
|
572
573
|
}
|
|
574
|
+
function isRefusedWebBotAuthTestKey(kid, allowTestKeys) {
|
|
575
|
+
return TEST_KIDS.has(kid) && !testKeysAllowed(allowTestKeys);
|
|
576
|
+
}
|
|
573
577
|
async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}) {
|
|
574
578
|
try {
|
|
575
579
|
if (!Number.isFinite(now)) denied("directory_invalid");
|
|
@@ -937,6 +941,7 @@ function createWebBotAuthFetch(upstream, key, options) {
|
|
|
937
941
|
deferWebBotAuthPrincipalFailure,
|
|
938
942
|
getWebBotAuthAuthorizationFailure,
|
|
939
943
|
getWebBotAuthLegacyOriginGate,
|
|
944
|
+
isRefusedWebBotAuthTestKey,
|
|
940
945
|
isVerifiedWebBotSigner,
|
|
941
946
|
isWebBotAuthRevocationChecked,
|
|
942
947
|
jwkThumbprint,
|