@adcp/sdk 13.0.0-rc.8 → 13.0.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/adapters/roster-account-store.d.mts +9 -8
- package/dist/lib/adapters/roster-account-store.d.ts +9 -8
- package/dist/lib/adapters/roster-account-store.d.ts.map +1 -1
- package/dist/lib/adapters/roster-account-store.js +2 -1
- package/dist/lib/adapters/roster-account-store.js.map +1 -1
- package/dist/lib/adapters/roster-account-store.mjs +2 -1
- package/dist/lib/adapters/roster-account-store.mjs.map +1 -1
- package/dist/lib/net/address-guards.d.ts.map +1 -1
- package/dist/lib/net/address-guards.js +6 -0
- package/dist/lib/net/address-guards.js.map +1 -1
- package/dist/lib/net/address-guards.mjs +6 -0
- package/dist/lib/net/address-guards.mjs.map +1 -1
- package/dist/lib/net/ssrf-fetch.d.ts.map +1 -1
- package/dist/lib/net/ssrf-fetch.js +66 -53
- package/dist/lib/net/ssrf-fetch.js.map +1 -1
- package/dist/lib/net/ssrf-fetch.mjs +66 -53
- package/dist/lib/net/ssrf-fetch.mjs.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/account-mode.d.mts +2 -1
- package/dist/lib/server/account-mode.d.ts +2 -1
- package/dist/lib/server/account-mode.d.ts.map +1 -1
- package/dist/lib/server/account-mode.js +1 -0
- package/dist/lib/server/account-mode.js.map +1 -1
- package/dist/lib/server/account-mode.mjs +1 -0
- package/dist/lib/server/account-mode.mjs.map +1 -1
- package/dist/lib/server/create-adcp-server.d.mts +10 -6
- package/dist/lib/server/create-adcp-server.d.ts +10 -6
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +2 -1
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/create-adcp-server.mjs +2 -1
- package/dist/lib/server/create-adcp-server.mjs.map +1 -1
- package/dist/lib/server/decisioning/account.d.mts +16 -11
- package/dist/lib/server/decisioning/account.d.ts +16 -11
- package/dist/lib/server/decisioning/account.d.ts.map +1 -1
- package/dist/lib/server/decisioning/account.js.map +1 -1
- package/dist/lib/server/decisioning/account.mjs.map +1 -1
- package/dist/lib/server/decisioning/pagination.d.mts +2 -0
- package/dist/lib/server/decisioning/pagination.d.ts +2 -0
- package/dist/lib/server/decisioning/pagination.d.ts.map +1 -1
- package/dist/lib/server/decisioning/pagination.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +20 -14
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +20 -14
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +32 -6
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +32 -6
- package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sales.d.mts +16 -4
- package/dist/lib/server/decisioning/specialisms/sales.d.ts +16 -4
- package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sales.js.map +1 -1
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/index.mjs.map +1 -1
- package/dist/lib/server/legacy/v5/index.d.mts +2 -1
- package/dist/lib/server/legacy/v5/index.d.ts +2 -1
- package/dist/lib/server/legacy/v5/index.d.ts.map +1 -1
- package/dist/lib/server/legacy/v5/index.js.map +1 -1
- package/dist/lib/server/legacy/v5/index.mjs.map +1 -1
- package/dist/lib/testing/compliance/comply.d.mts +2 -0
- package/dist/lib/testing/compliance/comply.d.ts +2 -0
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +45 -14
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/comply.mjs +45 -14
- package/dist/lib/testing/compliance/comply.mjs.map +1 -1
- package/dist/lib/testing/compliance/index.d.mts +1 -1
- package/dist/lib/testing/compliance/index.d.ts +1 -1
- package/dist/lib/testing/compliance/index.d.ts.map +1 -1
- package/dist/lib/testing/compliance/index.js.map +1 -1
- package/dist/lib/testing/compliance/index.mjs.map +1 -1
- package/dist/lib/testing/compliance/storyboard-tracks.d.ts.map +1 -1
- package/dist/lib/testing/compliance/storyboard-tracks.js +9 -1
- package/dist/lib/testing/compliance/storyboard-tracks.js.map +1 -1
- package/dist/lib/testing/compliance/storyboard-tracks.mjs +9 -1
- package/dist/lib/testing/compliance/storyboard-tracks.mjs.map +1 -1
- package/dist/lib/testing/compliance/types.d.mts +26 -25
- package/dist/lib/testing/compliance/types.d.ts +26 -25
- package/dist/lib/testing/compliance/types.d.ts.map +1 -1
- package/dist/lib/testing/compliance/types.js.map +1 -1
- package/dist/lib/testing/index.d.mts +2 -2
- package/dist/lib/testing/index.d.ts +2 -2
- package/dist/lib/testing/index.d.ts.map +1 -1
- package/dist/lib/testing/index.js +16 -0
- package/dist/lib/testing/index.js.map +1 -1
- package/dist/lib/testing/index.mjs +16 -0
- package/dist/lib/testing/index.mjs.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.js +20 -12
- package/dist/lib/testing/scenarios/media-buy.js.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.mjs +20 -12
- package/dist/lib/testing/scenarios/media-buy.mjs.map +1 -1
- package/dist/lib/testing/storyboard/creative-assets.d.mts +23 -0
- package/dist/lib/testing/storyboard/creative-assets.d.ts +23 -0
- package/dist/lib/testing/storyboard/creative-assets.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/creative-assets.js +322 -45
- package/dist/lib/testing/storyboard/creative-assets.js.map +1 -1
- package/dist/lib/testing/storyboard/creative-assets.mjs +321 -45
- package/dist/lib/testing/storyboard/creative-assets.mjs.map +1 -1
- package/dist/lib/testing/storyboard/index.d.mts +4 -1
- package/dist/lib/testing/storyboard/index.d.ts +4 -1
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/index.js +20 -0
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/index.mjs +19 -0
- package/dist/lib/testing/storyboard/index.mjs.map +1 -1
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.d.mts +21 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.d.ts +22 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.js +668 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.js.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.mjs +638 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.mjs.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.d.mts +5 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.d.ts +6 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.js +44 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.js.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.mjs +20 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.mjs.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.d.mts +38 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.d.ts +39 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.js +17 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.js.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.mjs +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.mjs.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.d.mts +32 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.d.ts +33 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.js +105 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.js.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.mjs +80 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.mjs.map +1 -0
- package/dist/lib/testing/storyboard/probes.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/probes.js +2 -1
- package/dist/lib/testing/storyboard/probes.js.map +1 -1
- package/dist/lib/testing/storyboard/probes.mjs +2 -1
- package/dist/lib/testing/storyboard/probes.mjs.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +382 -69
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.mjs +387 -70
- package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
- package/dist/lib/testing/storyboard/seeding.js +3 -1
- package/dist/lib/testing/storyboard/seeding.js.map +1 -1
- package/dist/lib/testing/storyboard/seeding.mjs +3 -1
- package/dist/lib/testing/storyboard/seeding.mjs.map +1 -1
- package/dist/lib/testing/storyboard/task-map.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/task-map.js +16 -2
- package/dist/lib/testing/storyboard/task-map.js.map +1 -1
- package/dist/lib/testing/storyboard/task-map.mjs +16 -2
- package/dist/lib/testing/storyboard/task-map.mjs.map +1 -1
- package/dist/lib/testing/storyboard/trusted-match-context-replay.d.mts +11 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.d.ts +12 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.js +340 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.js.map +1 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.mjs +316 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.mjs.map +1 -0
- package/dist/lib/testing/storyboard/types.d.mts +84 -15
- package/dist/lib/testing/storyboard/types.d.ts +84 -15
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/types.js +2 -0
- package/dist/lib/testing/storyboard/types.js.map +1 -1
- package/dist/lib/testing/storyboard/types.mjs +2 -0
- package/dist/lib/testing/storyboard/types.mjs.map +1 -1
- package/dist/lib/testing/storyboard/validations.d.mts +3 -0
- package/dist/lib/testing/storyboard/validations.d.ts +3 -0
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/validations.js +64 -24
- package/dist/lib/testing/storyboard/validations.js.map +1 -1
- package/dist/lib/testing/storyboard/validations.mjs +64 -24
- package/dist/lib/testing/storyboard/validations.mjs.map +1 -1
- package/dist/lib/types/server-payload-aliases.d.mts +8 -2
- package/dist/lib/types/server-payload-aliases.d.ts +8 -2
- package/dist/lib/types/server-payload-aliases.d.ts.map +1 -1
- package/dist/lib/types/server-payload-aliases.js.map +1 -1
- package/dist/lib/upstream-recorder/recorder.d.mts +7 -18
- package/dist/lib/upstream-recorder/recorder.d.ts +7 -18
- package/dist/lib/upstream-recorder/recorder.d.ts.map +1 -1
- package/dist/lib/upstream-recorder/recorder.js +17 -10
- package/dist/lib/upstream-recorder/recorder.js.map +1 -1
- package/dist/lib/upstream-recorder/recorder.mjs +12 -5
- package/dist/lib/upstream-recorder/recorder.mjs.map +1 -1
- package/dist/lib/utils/redact-secrets.d.ts.map +1 -1
- package/dist/lib/utils/redact-secrets.js +7 -1
- package/dist/lib/utils/redact-secrets.js.map +1 -1
- package/dist/lib/utils/redact-secrets.mjs +7 -1
- package/dist/lib/utils/redact-secrets.mjs.map +1 -1
- 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.js.map +1 -1
- package/dist/lib/version.mjs +3 -3
- package/dist/lib/version.mjs.map +1 -1
- package/docs/guides/BUILD-AN-AGENT.md +4 -2
- package/docs/llms.txt +1 -1
- package/package.json +2 -2
|
@@ -18,6 +18,7 @@ import { detectShapeDriftHints } from "./shape-drift-hints.mjs";
|
|
|
18
18
|
import { PROBE_TASK_ALLOWLIST } from "./test-kit.mjs";
|
|
19
19
|
import { validateCanonicalFormatSatisfaction } from "./canonical-format-satisfaction.mjs";
|
|
20
20
|
import { extractTaskAdcpError } from "./rate-limit-trip.mjs";
|
|
21
|
+
import { normalizeOAuthResourceForComparison, redactOAuthUrlForOutput } from "./oauth-metadata-graph/index.mjs";
|
|
21
22
|
function runValidations(validations, context) {
|
|
22
23
|
return validations.map((v) => attachOnFailure(runValidation(v, context), context, v));
|
|
23
24
|
}
|
|
@@ -70,6 +71,8 @@ function runValidation(validation, ctx) {
|
|
|
70
71
|
return requireHttpResult(ctx, validation, (hr) => validateOn401RequireHeader(validation, hr));
|
|
71
72
|
case "resource_equals_agent_url":
|
|
72
73
|
return requireHttpResult(ctx, validation, (hr) => validateResourceEqualsAgentUrl(validation, hr, ctx.agentUrl));
|
|
74
|
+
case "oauth_metadata_graph":
|
|
75
|
+
return validateOAuthMetadataGraph(validation, ctx.oauthMetadataGraph);
|
|
73
76
|
case "any_of":
|
|
74
77
|
return validateAnyOf(validation, ctx.contributions);
|
|
75
78
|
case "a2a_submitted_artifact":
|
|
@@ -118,11 +121,12 @@ function runValidation(validation, ctx) {
|
|
|
118
121
|
default:
|
|
119
122
|
return {
|
|
120
123
|
check: validation.check,
|
|
121
|
-
passed:
|
|
122
|
-
not_applicable: true,
|
|
124
|
+
passed: false,
|
|
123
125
|
description: validation.description,
|
|
124
|
-
|
|
125
|
-
json_pointer: null
|
|
126
|
+
error: `runner does not implement authored check type '${validation.check}'`,
|
|
127
|
+
json_pointer: null,
|
|
128
|
+
expected: "a validation check implemented by this runner",
|
|
129
|
+
actual: validation.check
|
|
126
130
|
};
|
|
127
131
|
}
|
|
128
132
|
}
|
|
@@ -1099,21 +1103,6 @@ function validateOn401RequireHeader(validation, hr) {
|
|
|
1099
1103
|
actual: value ?? null
|
|
1100
1104
|
};
|
|
1101
1105
|
}
|
|
1102
|
-
function normalizeAgentUrl(url) {
|
|
1103
|
-
try {
|
|
1104
|
-
const u = new URL(url);
|
|
1105
|
-
u.hash = "";
|
|
1106
|
-
u.search = "";
|
|
1107
|
-
u.username = "";
|
|
1108
|
-
u.password = "";
|
|
1109
|
-
if (u.pathname.length > 1 && u.pathname.endsWith("/")) {
|
|
1110
|
-
u.pathname = u.pathname.slice(0, -1);
|
|
1111
|
-
}
|
|
1112
|
-
return `${u.protocol.toLowerCase()}//${u.host.toLowerCase()}${u.pathname}`;
|
|
1113
|
-
} catch {
|
|
1114
|
-
return url;
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
1106
|
const AGENT_CARD_SUFFIX_RE = /\/\.well-known\/agent(?:-card)?\.json$/i;
|
|
1118
1107
|
function canonicalizeAgentUrlForScope(url) {
|
|
1119
1108
|
try {
|
|
@@ -1145,12 +1134,14 @@ function validateResourceEqualsAgentUrl(validation, hr, agentUrl) {
|
|
|
1145
1134
|
description: validation.description,
|
|
1146
1135
|
error: "Response body missing string `resource` field.",
|
|
1147
1136
|
json_pointer: "/resource",
|
|
1148
|
-
expected:
|
|
1137
|
+
expected: redactOAuthUrlForOutput(normalizeOAuthResourceForComparison(agentUrl)),
|
|
1149
1138
|
actual: null
|
|
1150
1139
|
};
|
|
1151
1140
|
}
|
|
1152
|
-
const expected =
|
|
1153
|
-
const actual =
|
|
1141
|
+
const expected = normalizeOAuthResourceForComparison(agentUrl);
|
|
1142
|
+
const actual = normalizeOAuthResourceForComparison(resource);
|
|
1143
|
+
const displayExpected = redactOAuthUrlForOutput(expected);
|
|
1144
|
+
const displayActual = redactOAuthUrlForOutput(actual);
|
|
1154
1145
|
const passed = actual === expected;
|
|
1155
1146
|
let redactedError;
|
|
1156
1147
|
if (!passed) {
|
|
@@ -1161,7 +1152,7 @@ function validateResourceEqualsAgentUrl(validation, hr, agentUrl) {
|
|
|
1161
1152
|
}
|
|
1162
1153
|
const expectedHost = new URL(expected).host;
|
|
1163
1154
|
const hostDiffers = actualHost !== expectedHost;
|
|
1164
|
-
redactedError = `RFC 9728 \`resource\` does not equal the URL clients call (${
|
|
1155
|
+
redactedError = `RFC 9728 \`resource\` does not equal the URL clients call (${displayExpected}). ` + (hostDiffers ? `Advertised host differs from the agent host \u2014 the most common cause is copying your authorization server origin into \`resource\`. ` : `Advertised path differs from the agent path. `) + `Fix: set \`resource\` equal to the full agent URL in your protected-resource metadata document.`;
|
|
1165
1156
|
}
|
|
1166
1157
|
if (passed) {
|
|
1167
1158
|
return {
|
|
@@ -1177,10 +1168,59 @@ function validateResourceEqualsAgentUrl(validation, hr, agentUrl) {
|
|
|
1177
1168
|
description: validation.description,
|
|
1178
1169
|
error: redactedError,
|
|
1179
1170
|
json_pointer: "/resource",
|
|
1171
|
+
expected: displayExpected,
|
|
1172
|
+
actual: displayActual
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
function validateOAuthMetadataGraph(validation, grade) {
|
|
1176
|
+
const expected = {
|
|
1177
|
+
profile: "adcp/oauth-metadata-graph/v1",
|
|
1178
|
+
require_authorization_servers: true,
|
|
1179
|
+
follow_all_authorization_servers: true,
|
|
1180
|
+
probe_advertised_endpoints: true
|
|
1181
|
+
};
|
|
1182
|
+
if (!grade) {
|
|
1183
|
+
return {
|
|
1184
|
+
check: validation.check,
|
|
1185
|
+
passed: false,
|
|
1186
|
+
description: validation.description,
|
|
1187
|
+
error: "oauth_metadata_graph was not prefetched by the storyboard runner",
|
|
1188
|
+
json_pointer: null,
|
|
1189
|
+
expected,
|
|
1190
|
+
actual: null
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
if (grade.success) {
|
|
1194
|
+
return {
|
|
1195
|
+
check: validation.check,
|
|
1196
|
+
passed: true,
|
|
1197
|
+
description: validation.description,
|
|
1198
|
+
json_pointer: null,
|
|
1199
|
+
expected,
|
|
1200
|
+
observations: grade.observations
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
const primary = grade.findings[0];
|
|
1204
|
+
return {
|
|
1205
|
+
check: validation.check,
|
|
1206
|
+
passed: false,
|
|
1207
|
+
description: validation.description,
|
|
1208
|
+
error: `${grade.error_code}: ${grade.error}`,
|
|
1209
|
+
json_pointer: primary?.field ? findingFieldToJsonPointer(primary.field) : null,
|
|
1180
1210
|
expected,
|
|
1181
|
-
actual
|
|
1211
|
+
actual: {
|
|
1212
|
+
code: grade.error_code,
|
|
1213
|
+
...primary?.url && { url: primary.url },
|
|
1214
|
+
...primary?.field && { field: primary.field },
|
|
1215
|
+
...primary?.message && { detail: primary.message }
|
|
1216
|
+
},
|
|
1217
|
+
observations: grade.observations
|
|
1182
1218
|
};
|
|
1183
1219
|
}
|
|
1220
|
+
function findingFieldToJsonPointer(field) {
|
|
1221
|
+
const segments = field.replace(/\[(\d+)\]/g, ".$1").split(".");
|
|
1222
|
+
return `/${segments.map((segment) => segment.replace(/~/g, "~0").replace(/\//g, "~1")).join("/")}`;
|
|
1223
|
+
}
|
|
1184
1224
|
function validateAnyOf(validation, contributions) {
|
|
1185
1225
|
const flags = Array.isArray(validation.allowed_values) ? validation.allowed_values.map(String) : [];
|
|
1186
1226
|
const passed = flags.some((f) => contributions.has(f));
|