@adcp/sdk 17.0.0-beta.15 → 17.0.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/lib/schemas-data/3.0/compliance/comply-test-controller-request.json +647 -0
  2. package/dist/lib/schemas-data/3.0/compliance/comply-test-controller-response.json +486 -0
  3. package/dist/lib/schemas-data/3.1/compliance/comply-test-controller-request.json +1073 -0
  4. package/dist/lib/schemas-data/3.1/compliance/comply-test-controller-response.json +940 -0
  5. package/dist/lib/schemas-data/3.2/compliance/comply-test-controller-request.json +1778 -0
  6. package/dist/lib/schemas-data/3.2/compliance/comply-test-controller-response.json +1013 -0
  7. package/dist/lib/schemas-data/3.2/compliance/get-creative-features-completion.json +44 -0
  8. package/dist/lib/schemas-data/3.2/compliance/task-completion-data.json +24 -0
  9. package/dist/lib/schemas-data/3.3.0-beta.3/compliance/comply-test-controller-request.json +2150 -0
  10. package/dist/lib/schemas-data/3.3.0-beta.3/compliance/comply-test-controller-response.json +1064 -0
  11. package/dist/lib/schemas-data/3.3.0-beta.3/compliance/get-creative-features-completion.json +44 -0
  12. package/dist/lib/schemas-data/3.3.0-beta.3/compliance/task-completion-data.json +24 -0
  13. package/dist/lib/testing/storyboard/account-policy.d.mts +4 -1
  14. package/dist/lib/testing/storyboard/account-policy.d.ts +4 -1
  15. package/dist/lib/testing/storyboard/account-policy.js +18 -3
  16. package/dist/lib/testing/storyboard/account-policy.mjs +18 -3
  17. package/dist/lib/testing/storyboard/runner-owned-task.d.mts +3 -0
  18. package/dist/lib/testing/storyboard/runner-owned-task.d.ts +3 -0
  19. package/dist/lib/testing/storyboard/runner-owned-task.js +38 -0
  20. package/dist/lib/testing/storyboard/runner-owned-task.mjs +13 -0
  21. package/dist/lib/testing/storyboard/runner.js +6 -9
  22. package/dist/lib/testing/storyboard/runner.mjs +1 -4
  23. package/dist/lib/testing/storyboard/seeding.js +19 -2
  24. package/dist/lib/testing/storyboard/seeding.mjs +19 -2
  25. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  26. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  27. package/dist/lib/testing/storyboard/webhook-assertions.js +10 -9
  28. package/dist/lib/testing/storyboard/webhook-assertions.mjs +11 -10
  29. package/dist/lib/version.d.mts +3 -3
  30. package/dist/lib/version.d.ts +3 -3
  31. package/dist/lib/version.js +3 -3
  32. package/dist/lib/version.mjs +3 -3
  33. package/docs/TYPE-SUMMARY.md +2 -2
  34. package/docs/guides/VALIDATE-YOUR-AGENT.md +32 -2
  35. package/docs/llms.txt +2 -2
  36. package/docs/migration-14.x-rc-worksheet.md +4 -4
  37. package/package.json +1 -1
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://adcontextprotocol.org/schemas/3.3.0-beta.3/compliance/get-creative-features-completion.json",
4
+ "title": "Get Creative Features Compliance Completion",
5
+ "description": "Bounded get_creative_features terminal success fixture accepted by force_task_completion. It carries the result identity and optional economics exercised by conformance; production terminal artifacts validate against the full task response schema.",
6
+ "type": "object",
7
+ "properties": {
8
+ "status": {
9
+ "type": "string",
10
+ "const": "completed"
11
+ },
12
+ "evaluation_id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "x-entity": "creative_evaluation"
16
+ },
17
+ "results": {
18
+ "type": "array",
19
+ "items": {
20
+ "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.3/creative/creative-feature-result.json"
21
+ }
22
+ },
23
+ "pricing_option_id": {
24
+ "type": "string",
25
+ "x-entity": "vendor_pricing_option"
26
+ },
27
+ "vendor_cost": {
28
+ "type": "number",
29
+ "minimum": 0
30
+ },
31
+ "currency": {
32
+ "type": "string",
33
+ "pattern": "^[A-Z]{3}$"
34
+ },
35
+ "consumption": {
36
+ "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.3/core/creative-consumption.json"
37
+ }
38
+ },
39
+ "required": [
40
+ "evaluation_id",
41
+ "results"
42
+ ],
43
+ "additionalProperties": true
44
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://adcontextprotocol.org/schemas/3.3.0-beta.3/compliance/task-completion-data.json",
4
+ "title": "Compliance Task Completion Data",
5
+ "description": "Bounded completion union for the async tasks supported by force_task_completion. Polling and production task-result resolution use the originating task's manifest response schema rather than embedding the global async union.",
6
+ "anyOf": [
7
+ {
8
+ "title": "GetProductsCompletion",
9
+ "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.3/media-buy/get-products-response.json"
10
+ },
11
+ {
12
+ "title": "GetSignalsCompletion",
13
+ "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.3/signals/get-signals-response.json"
14
+ },
15
+ {
16
+ "title": "CreateMediaBuyCompletion",
17
+ "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.3/media-buy/create-media-buy-response.json#/oneOf/0"
18
+ },
19
+ {
20
+ "title": "GetCreativeFeaturesCompletion",
21
+ "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.3/compliance/get-creative-features-completion.json"
22
+ }
23
+ ]
24
+ }
@@ -25,7 +25,10 @@ export declare const BRAND_SUBJECT_TASKS: ReadonlySet<string>;
25
25
  * (brand belongs inside each `Plan` object) — injecting it would fail
26
26
  * the framework's strict AJV validation (#940).
27
27
  * - `account.brand` — merged into an existing `account` object only when
28
- * it uses the natural-key variant (`{brand, operator, sandbox?}`). The
28
+ * it uses the natural-key variant (`{brand, operator, sandbox?}`), and
29
+ * only as an ADDITION when the request is account-subject (see
30
+ * {@link ACCOUNT_SUBJECT_TASKS}): there the account is the thing being
31
+ * addressed, so a resolved identity survives verbatim. The
29
32
  * `{account_id}` variant is closed (`additionalProperties: false`); merging
30
33
  * `brand` into it produces a payload that matches neither `oneOf` branch
31
34
  * and is rejected by AJV strict request validation. Detect the natural-key
@@ -25,7 +25,10 @@ export declare const BRAND_SUBJECT_TASKS: ReadonlySet<string>;
25
25
  * (brand belongs inside each `Plan` object) — injecting it would fail
26
26
  * the framework's strict AJV validation (#940).
27
27
  * - `account.brand` — merged into an existing `account` object only when
28
- * it uses the natural-key variant (`{brand, operator, sandbox?}`). The
28
+ * it uses the natural-key variant (`{brand, operator, sandbox?}`), and
29
+ * only as an ADDITION when the request is account-subject (see
30
+ * {@link ACCOUNT_SUBJECT_TASKS}): there the account is the thing being
31
+ * addressed, so a resolved identity survives verbatim. The
29
32
  * `{account_id}` variant is closed (`additionalProperties: false`); merging
30
33
  * `brand` into it produces a payload that matches neither `oneOf` branch
31
34
  * and is rejected by AJV strict request validation. Detect the natural-key
@@ -35,12 +35,26 @@ const ACCOUNT_FREE_DISCOVERY_TASKS = /* @__PURE__ */ new Set([
35
35
  "decline_proposals"
36
36
  ]);
37
37
  const BRAND_SUBJECT_TASKS = /* @__PURE__ */ new Set(["request_account"]);
38
+ const ACCOUNT_SUBJECT_TASKS = /* @__PURE__ */ new Set([
39
+ "list_accounts",
40
+ "get_account_financials",
41
+ "list_account_changes"
42
+ ]);
43
+ const ACCOUNT_SUBJECT_CONTROLLER_SCENARIOS = /* @__PURE__ */ new Set([
44
+ "force_account_status",
45
+ "expire_account_change_cursor"
46
+ ]);
47
+ function isAccountSubjectRequest(request, taskName) {
48
+ if (taskName === void 0) return false;
49
+ if (ACCOUNT_SUBJECT_TASKS.has(taskName)) return true;
50
+ return taskName === "comply_test_controller" && typeof request.scenario === "string" && ACCOUNT_SUBJECT_CONTROLLER_SCENARIOS.has(request.scenario);
51
+ }
38
52
  function applyBrandInvariant(request, options, taskName, stepFlags) {
39
53
  if (!options.brand && !options.brand_manifest) return request;
40
54
  if (taskName !== void 0 && BRAND_SUBJECT_TASKS.has(taskName)) return request;
41
55
  const brand = (0, import_client.resolveBrand)(options);
42
- const topBrandOk = !taskName || (0, import_schema_loader.schemaAllowsTopLevelField)(taskName, "brand");
43
- const topAccountOk = !taskName || (0, import_schema_loader.schemaAllowsTopLevelField)(taskName, "account");
56
+ const topBrandOk = !taskName || (0, import_schema_loader.schemaAllowsTopLevelField)(taskName, "brand", options.adcpVersion);
57
+ const topAccountOk = !taskName || (0, import_schema_loader.schemaAllowsTopLevelField)(taskName, "account", options.adcpVersion);
44
58
  const result = { ...request };
45
59
  if (topBrandOk) result.brand = brand;
46
60
  if (stepFlags?.omit_account) return result;
@@ -51,9 +65,10 @@ function applyBrandInvariant(request, options, taskName, stepFlags) {
51
65
  const isNaturalKeyVariant = "brand" in acct || "operator" in acct;
52
66
  if (isNaturalKeyVariant) {
53
67
  const preserveWholesaleAccountBrand = (taskName === "get_products" && request.buying_mode === "wholesale" || taskName === "get_signals" && request.discovery_mode === "wholesale") && acct.brand !== void 0;
68
+ const preserveSubjectAccountBrand = isAccountSubjectRequest(request, taskName) && Object.hasOwn(acct, "brand") && acct.brand !== void 0;
54
69
  const merged = {
55
70
  ...acct,
56
- brand: preserveWholesaleAccountBrand ? acct.brand : brand
71
+ brand: preserveWholesaleAccountBrand || preserveSubjectAccountBrand ? acct.brand : brand
57
72
  };
58
73
  const accountBrand = merged.brand;
59
74
  if (typeof merged.operator !== "string" && typeof accountBrand?.domain === "string") {
@@ -10,12 +10,26 @@ const ACCOUNT_FREE_DISCOVERY_TASKS = /* @__PURE__ */ new Set([
10
10
  "decline_proposals"
11
11
  ]);
12
12
  const BRAND_SUBJECT_TASKS = /* @__PURE__ */ new Set(["request_account"]);
13
+ const ACCOUNT_SUBJECT_TASKS = /* @__PURE__ */ new Set([
14
+ "list_accounts",
15
+ "get_account_financials",
16
+ "list_account_changes"
17
+ ]);
18
+ const ACCOUNT_SUBJECT_CONTROLLER_SCENARIOS = /* @__PURE__ */ new Set([
19
+ "force_account_status",
20
+ "expire_account_change_cursor"
21
+ ]);
22
+ function isAccountSubjectRequest(request, taskName) {
23
+ if (taskName === void 0) return false;
24
+ if (ACCOUNT_SUBJECT_TASKS.has(taskName)) return true;
25
+ return taskName === "comply_test_controller" && typeof request.scenario === "string" && ACCOUNT_SUBJECT_CONTROLLER_SCENARIOS.has(request.scenario);
26
+ }
13
27
  function applyBrandInvariant(request, options, taskName, stepFlags) {
14
28
  if (!options.brand && !options.brand_manifest) return request;
15
29
  if (taskName !== void 0 && BRAND_SUBJECT_TASKS.has(taskName)) return request;
16
30
  const brand = resolveBrand(options);
17
- const topBrandOk = !taskName || schemaAllowsTopLevelField(taskName, "brand");
18
- const topAccountOk = !taskName || schemaAllowsTopLevelField(taskName, "account");
31
+ const topBrandOk = !taskName || schemaAllowsTopLevelField(taskName, "brand", options.adcpVersion);
32
+ const topAccountOk = !taskName || schemaAllowsTopLevelField(taskName, "account", options.adcpVersion);
19
33
  const result = { ...request };
20
34
  if (topBrandOk) result.brand = brand;
21
35
  if (stepFlags?.omit_account) return result;
@@ -26,9 +40,10 @@ function applyBrandInvariant(request, options, taskName, stepFlags) {
26
40
  const isNaturalKeyVariant = "brand" in acct || "operator" in acct;
27
41
  if (isNaturalKeyVariant) {
28
42
  const preserveWholesaleAccountBrand = (taskName === "get_products" && request.buying_mode === "wholesale" || taskName === "get_signals" && request.discovery_mode === "wholesale") && acct.brand !== void 0;
43
+ const preserveSubjectAccountBrand = isAccountSubjectRequest(request, taskName) && Object.hasOwn(acct, "brand") && acct.brand !== void 0;
29
44
  const merged = {
30
45
  ...acct,
31
- brand: preserveWholesaleAccountBrand ? acct.brand : brand
46
+ brand: preserveWholesaleAccountBrand || preserveSubjectAccountBrand ? acct.brand : brand
32
47
  };
33
48
  const accountBrand = merged.brand;
34
49
  if (typeof merged.operator !== "string" && typeof accountBrand?.domain === "string") {
@@ -0,0 +1,3 @@
1
+ export declare const REPLAY_WEBHOOK_VECTOR_TASK = "replay_webhook_vector";
2
+ /** Runner operations are not seller request-schema names. */
3
+ export declare function isRunnerOwnedTask(task: string): boolean;
@@ -0,0 +1,3 @@
1
+ export declare const REPLAY_WEBHOOK_VECTOR_TASK = "replay_webhook_vector";
2
+ /** Runner operations are not seller request-schema names. */
3
+ export declare function isRunnerOwnedTask(task: string): boolean;
@@ -0,0 +1,38 @@
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 runner_owned_task_exports = {};
20
+ __export(runner_owned_task_exports, {
21
+ REPLAY_WEBHOOK_VECTOR_TASK: () => REPLAY_WEBHOOK_VECTOR_TASK,
22
+ isRunnerOwnedTask: () => isRunnerOwnedTask
23
+ });
24
+ module.exports = __toCommonJS(runner_owned_task_exports);
25
+ var import_loader = require('./loader.js');
26
+ var import_probes = require('./probes.js');
27
+ var import_trusted_match_publisher_auth = require('./trusted-match-publisher-auth.js');
28
+ var import_types = require('./types.js');
29
+ var import_webhook_assertions = require('./webhook-assertions.js');
30
+ const REPLAY_WEBHOOK_VECTOR_TASK = "replay_webhook_vector";
31
+ function isRunnerOwnedTask(task) {
32
+ return task === import_loader.VALIDATION_ONLY_TASK || task === import_types.MCP_SESSION_PROBE_TASK || task === "assert_contribution" || task === REPLAY_WEBHOOK_VECTOR_TASK || import_trusted_match_publisher_auth.TRUSTED_MATCH_PUBLISHER_AUTH_TASKS.has(task) || import_probes.PROBE_TASKS.has(task) || import_webhook_assertions.WEBHOOK_ASSERTION_TASKS.has(task);
33
+ }
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ REPLAY_WEBHOOK_VECTOR_TASK,
37
+ isRunnerOwnedTask
38
+ });
@@ -0,0 +1,13 @@
1
+ import { VALIDATION_ONLY_TASK } from "./loader.mjs";
2
+ import { PROBE_TASKS } from "./probes.mjs";
3
+ import { TRUSTED_MATCH_PUBLISHER_AUTH_TASKS } from "./trusted-match-publisher-auth.mjs";
4
+ import { MCP_SESSION_PROBE_TASK } from "./types.mjs";
5
+ import { WEBHOOK_ASSERTION_TASKS } from "./webhook-assertions.mjs";
6
+ const REPLAY_WEBHOOK_VECTOR_TASK = "replay_webhook_vector";
7
+ function isRunnerOwnedTask(task) {
8
+ return task === VALIDATION_ONLY_TASK || task === MCP_SESSION_PROBE_TASK || task === "assert_contribution" || task === REPLAY_WEBHOOK_VECTOR_TASK || TRUSTED_MATCH_PUBLISHER_AUTH_TASKS.has(task) || PROBE_TASKS.has(task) || WEBHOOK_ASSERTION_TASKS.has(task);
9
+ }
10
+ export {
11
+ REPLAY_WEBHOOK_VECTOR_TASK,
12
+ isRunnerOwnedTask
13
+ };
@@ -71,6 +71,7 @@ var import_node_fs = require("node:fs");
71
71
  var import_node_path = require("node:path");
72
72
  var import_node_util = require("node:util");
73
73
  var import_account_policy = require('./account-policy.js');
74
+ var import_runner_owned_task = require('./runner-owned-task.js');
74
75
  var import_creative_build_probe = require('./creative-build-probe.js');
75
76
  var import_client = require('../client.js');
76
77
  var import_protocols = require('../../protocols/index.js');
@@ -250,10 +251,6 @@ const CANONICAL_SKIP_DETAILS = {
250
251
  signing_transport_unavailable: "signing_transport_unavailable"
251
252
  };
252
253
  const MCP_SESSION_PROBE_REQUEST_TIMEOUT_MS = 5e3;
253
- const REPLAY_WEBHOOK_VECTOR_TASK = "replay_webhook_vector";
254
- function isRunnerOwnedTask(task) {
255
- return task === import_loader.VALIDATION_ONLY_TASK || task === import_types.MCP_SESSION_PROBE_TASK || task === "assert_contribution" || task === REPLAY_WEBHOOK_VECTOR_TASK || import_trusted_match_publisher_auth.TRUSTED_MATCH_PUBLISHER_AUTH_TASKS.has(task) || import_probes.PROBE_TASKS.has(task) || import_webhook_assertions.WEBHOOK_ASSERTION_TASKS.has(task);
256
- }
257
254
  const REPLAY_TRUSTED_MATCH_CONTEXT_VECTOR_TASK = "replay_trusted_match_context_vector";
258
255
  const WEBHOOK_REPLAY_DEFAULT_TIMEOUT_MS = 1e4;
259
256
  function selectionForProbeSkip(reason, detail) {
@@ -1439,7 +1436,7 @@ function detectImplicitRequires(storyboard, options = {}) {
1439
1436
  if (!needsSigner && step.task === "request_signing_probe") {
1440
1437
  needsSigner = true;
1441
1438
  }
1442
- if (!needsWebhookReplayReceiver && stepContractInScope && step.task === REPLAY_WEBHOOK_VECTOR_TASK) {
1439
+ if (!needsWebhookReplayReceiver && stepContractInScope && step.task === import_runner_owned_task.REPLAY_WEBHOOK_VECTOR_TASK) {
1443
1440
  needsWebhookReplayReceiver = true;
1444
1441
  }
1445
1442
  if (!needsTrustedMatchContextRouterRunner && stepContractInScope && step.task === REPLAY_TRUSTED_MATCH_CONTEXT_VECTOR_TASK) {
@@ -3433,7 +3430,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
3433
3430
  const cascade = step.stateful ? cascadeForPhase(phase, priorPhaseIds) : { tripped: false };
3434
3431
  if (cascade.tripped && step.stateful && routedCapabilityDetail === void 0) {
3435
3432
  const resolvedTask = (0, import_agent_routing.resolveTaskName)(step, selectedOptions);
3436
- const missingTool = selectedOptions.agentTools && (routingContext && step.requires_tool && !selectedOptions.agentTools.includes(step.requires_tool) ? step.requires_tool : resolvedTask && !isRunnerOwnedTask(resolvedTask) && !selectedOptions.agentTools.includes(resolvedTask) ? resolvedTask : void 0);
3433
+ const missingTool = selectedOptions.agentTools && (routingContext && step.requires_tool && !selectedOptions.agentTools.includes(step.requires_tool) ? step.requires_tool : resolvedTask && !(0, import_runner_owned_task.isRunnerOwnedTask)(resolvedTask) && !selectedOptions.agentTools.includes(resolvedTask) ? resolvedTask : void 0);
3437
3434
  if (missingTool) {
3438
3435
  const missingReason = routingContext && missingTool === "comply_test_controller" ? "missing_test_controller" : "missing_tool";
3439
3436
  const toolDetail = `Agent did not advertise tool "${missingTool}"; agent tools: [${selectedOptions.agentTools.join(", ")}].`;
@@ -3464,7 +3461,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
3464
3461
  const trigger = cascade.trigger;
3465
3462
  let detail = trigger ? trigger.substitution_chain ? `Skipped: prior stateful step "${trigger.stepId}" skipped (${trigger.reason}); ${trigger.substitution_chain}; state never materialized.` : `Skipped: prior stateful step "${trigger.stepId}" skipped (${trigger.reason}); state never materialized.` : "Skipped: prior stateful step failed.";
3466
3463
  let capabilityUnavailable = trigger?.capabilityUnavailable === true;
3467
- if (capabilityUnavailable && routingContext && !import_trusted_match_publisher_auth.TRUSTED_MATCH_PUBLISHER_AUTH_TASKS.has(step.task) && !import_probes.PROBE_TASKS.has(step.task) && !import_webhook_assertions.WEBHOOK_ASSERTION_TASKS.has(step.task) && step.task !== REPLAY_WEBHOOK_VECTOR_TASK && (!step.requires_contract || (selectedOptions.contracts ?? []).includes(step.requires_contract))) {
3464
+ if (capabilityUnavailable && routingContext && !import_trusted_match_publisher_auth.TRUSTED_MATCH_PUBLISHER_AUTH_TASKS.has(step.task) && !import_probes.PROBE_TASKS.has(step.task) && !import_webhook_assertions.WEBHOOK_ASSERTION_TASKS.has(step.task) && step.task !== import_runner_owned_task.REPLAY_WEBHOOK_VECTOR_TASK && (!step.requires_contract || (selectedOptions.contracts ?? []).includes(step.requires_contract))) {
3468
3465
  const hardKeys = unavailableContextKeysForPhase(phase, priorPhaseIds, missingPrerequisiteContextKeysByPhase);
3469
3466
  if (hardKeys.size > 0) {
3470
3467
  const effectiveRequest = buildEffectiveStepRequest(
@@ -4791,7 +4788,7 @@ async function runStoryboardStepBody(agentUrl, storyboard, stepId, options) {
4791
4788
  if (storyboard.prerequisites?.controller_seeding === true && storyboard.fixture_resolution === void 0 && options.skip_controller_seeding !== true && runState.preparedFixtures === void 0 && options.agentTools !== void 0 && !options.agentTools.includes("comply_test_controller")) {
4792
4789
  const seeds = (0, import_seeding.buildSeedCalls)(storyboard.fixtures);
4793
4790
  const resolvedTask = (0, import_agent_routing.resolveTaskName)(found.step, options);
4794
- const intrinsicSkip = found.step.requires_tool !== void 0 && !options.agentTools.includes(found.step.requires_tool) || found.step.requires_contract !== void 0 && !(options.contracts ?? []).includes(found.step.requires_contract) || resolvedTask !== void 0 && !isRunnerOwnedTask(resolvedTask) && !options.agentTools.includes(resolvedTask);
4791
+ const intrinsicSkip = found.step.requires_tool !== void 0 && !options.agentTools.includes(found.step.requires_tool) || found.step.requires_contract !== void 0 && !(options.contracts ?? []).includes(found.step.requires_contract) || resolvedTask !== void 0 && !(0, import_runner_owned_task.isRunnerOwnedTask)(resolvedTask) && !options.agentTools.includes(resolvedTask);
4795
4792
  if (seeds.length > 0 && !seeds.some((seed) => seed.authoring_error !== void 0) && resolvedTask !== void 0 && resolvedTask !== "get_adcp_capabilities" && !intrinsicSkip) {
4796
4793
  const capabilityDetail = collectPhaseCapabilitySkipDetails(
4797
4794
  storyboard,
@@ -5075,7 +5072,7 @@ async function executeStep(client, step, storyboardId, phaseId, context, allStep
5075
5072
  if (import_webhook_assertions.WEBHOOK_ASSERTION_TASKS.has(step.task)) {
5076
5073
  return (0, import_webhook_assertions.executeWebhookAssertionStep)(step, phaseId, context, allSteps, options, runState);
5077
5074
  }
5078
- if (step.task === REPLAY_WEBHOOK_VECTOR_TASK) {
5075
+ if (step.task === import_runner_owned_task.REPLAY_WEBHOOK_VECTOR_TASK) {
5079
5076
  return executeReplayWebhookVectorStep(step, phaseId, context, allSteps, options, runState);
5080
5077
  }
5081
5078
  if (step.requires_contract && !new Set(options.contracts ?? []).has(step.requires_contract)) {
@@ -7,6 +7,7 @@ import { existsSync, readFileSync } from "node:fs";
7
7
  import { basename, join } from "node:path";
8
8
  import { isDeepStrictEqual } from "node:util";
9
9
  import { applyBrandInvariant } from "./account-policy.mjs";
10
+ import { isRunnerOwnedTask, REPLAY_WEBHOOK_VECTOR_TASK } from "./runner-owned-task.mjs";
10
11
  import { prepareCreativeBuildProbe } from "./creative-build-probe.mjs";
11
12
  import {
12
13
  createTestClient,
@@ -292,10 +293,6 @@ const CANONICAL_SKIP_DETAILS = {
292
293
  signing_transport_unavailable: "signing_transport_unavailable"
293
294
  };
294
295
  const MCP_SESSION_PROBE_REQUEST_TIMEOUT_MS = 5e3;
295
- const REPLAY_WEBHOOK_VECTOR_TASK = "replay_webhook_vector";
296
- function isRunnerOwnedTask(task) {
297
- return task === VALIDATION_ONLY_TASK || task === MCP_SESSION_PROBE_TASK || task === "assert_contribution" || task === REPLAY_WEBHOOK_VECTOR_TASK || TRUSTED_MATCH_PUBLISHER_AUTH_TASKS.has(task) || PROBE_TASKS.has(task) || WEBHOOK_ASSERTION_TASKS.has(task);
298
- }
299
296
  const REPLAY_TRUSTED_MATCH_CONTEXT_VECTOR_TASK = "replay_trusted_match_context_vector";
300
297
  const WEBHOOK_REPLAY_DEFAULT_TIMEOUT_MS = 1e4;
301
298
  function selectionForProbeSkip(reason, detail) {
@@ -38,6 +38,7 @@ var import_collection_selection = require('./collection-selection.js');
38
38
  var import_path = require('./path.js');
39
39
  var import_context = require('./context.js');
40
40
  var import_account_policy = require('./account-policy.js');
41
+ var import_runner_owned_task = require('./runner-owned-task.js');
41
42
  var import_redact_secrets = require('../../utils/redact-secrets.js');
42
43
  var import_jcs = require('../../utils/jcs.js');
43
44
  var import_discovery_evidence = require('../discovery-evidence.js');
@@ -93,7 +94,13 @@ function storyboardSeedScope(storyboard, context, options, call) {
93
94
  sample_request: { account }
94
95
  }))
95
96
  ];
96
- for (const step of seedScopeSteps) {
97
+ for (const authoredStep of seedScopeSteps) {
98
+ const step = authoredStep.task === "expect_rate_limit_not_replayed" && authoredStep.rate_limit_trip ? {
99
+ ...authoredStep,
100
+ task: authoredStep.rate_limit_trip.trip_target_task,
101
+ sample_request: authoredStep.rate_limit_trip.trip_target_sample_request
102
+ } : authoredStep;
103
+ if ((0, import_runner_owned_task.isRunnerOwnedTask)(step.task)) continue;
97
104
  if (step.expect_error || step.omit_account) continue;
98
105
  const source = options.request ?? step.sample_request ?? {};
99
106
  if (JSON.stringify(source.account ?? {}).includes("$generate:")) {
@@ -103,11 +110,21 @@ function storyboardSeedScope(storyboard, context, options, call) {
103
110
  {
104
111
  ...source.account !== void 0 && { account: source.account },
105
112
  buying_mode: source.buying_mode,
106
- discovery_mode: source.discovery_mode
113
+ discovery_mode: source.discovery_mode,
114
+ ...step.task === "validate_input" && { targets: source.targets },
115
+ ...step.task === "comply_test_controller" && { scenario: source.scenario }
107
116
  },
108
117
  context
109
118
  );
110
119
  if (step.context_inputs?.length) request = (0, import_context.applyContextInputs)(request, step.context_inputs, context);
120
+ const formatOnlyValidation = step.task === "validate_input" && Array.isArray(request.targets) && request.targets.length > 0 && request.targets.every(
121
+ (target) => isPlainRecord(target) && ["canonical", "third_party_format", "capability"].includes(String(target.kind))
122
+ );
123
+ const controllerMetadata = step.task === "comply_test_controller" && request.scenario === "list_scenarios";
124
+ if (request.account === void 0 && (controllerMetadata || formatOnlyValidation)) continue;
125
+ if (request.account === void 0 && step.task === "comply_test_controller") {
126
+ request.account = { ...(0, import_client.resolveAccount)(options), sandbox: true };
127
+ }
111
128
  request = (0, import_account_policy.applyBrandInvariant)(request, options, step.task, { omit_account: step.omit_account });
112
129
  if (request.account === void 0) continue;
113
130
  if (JSON.stringify(request.account).includes("$generate:")) {
@@ -18,6 +18,7 @@ import { readCollectionWitness } from "./collection-selection.mjs";
18
18
  import { resolvePath } from "./path.mjs";
19
19
  import { injectContext, applyContextInputs } from "./context.mjs";
20
20
  import { applyBrandInvariant } from "./account-policy.mjs";
21
+ import { isRunnerOwnedTask } from "./runner-owned-task.mjs";
21
22
  import { redactSecrets } from "../../utils/redact-secrets.mjs";
22
23
  import { canonicalize } from "../../utils/jcs.mjs";
23
24
  import { redactDiscoveryEvidence as redactDiscoveryResponse } from "../discovery-evidence.mjs";
@@ -73,7 +74,13 @@ function storyboardSeedScope(storyboard, context, options, call) {
73
74
  sample_request: { account }
74
75
  }))
75
76
  ];
76
- for (const step of seedScopeSteps) {
77
+ for (const authoredStep of seedScopeSteps) {
78
+ const step = authoredStep.task === "expect_rate_limit_not_replayed" && authoredStep.rate_limit_trip ? {
79
+ ...authoredStep,
80
+ task: authoredStep.rate_limit_trip.trip_target_task,
81
+ sample_request: authoredStep.rate_limit_trip.trip_target_sample_request
82
+ } : authoredStep;
83
+ if (isRunnerOwnedTask(step.task)) continue;
77
84
  if (step.expect_error || step.omit_account) continue;
78
85
  const source = options.request ?? step.sample_request ?? {};
79
86
  if (JSON.stringify(source.account ?? {}).includes("$generate:")) {
@@ -83,11 +90,21 @@ function storyboardSeedScope(storyboard, context, options, call) {
83
90
  {
84
91
  ...source.account !== void 0 && { account: source.account },
85
92
  buying_mode: source.buying_mode,
86
- discovery_mode: source.discovery_mode
93
+ discovery_mode: source.discovery_mode,
94
+ ...step.task === "validate_input" && { targets: source.targets },
95
+ ...step.task === "comply_test_controller" && { scenario: source.scenario }
87
96
  },
88
97
  context
89
98
  );
90
99
  if (step.context_inputs?.length) request = applyContextInputs(request, step.context_inputs, context);
100
+ const formatOnlyValidation = step.task === "validate_input" && Array.isArray(request.targets) && request.targets.length > 0 && request.targets.every(
101
+ (target) => isPlainRecord(target) && ["canonical", "third_party_format", "capability"].includes(String(target.kind))
102
+ );
103
+ const controllerMetadata = step.task === "comply_test_controller" && request.scenario === "list_scenarios";
104
+ if (request.account === void 0 && (controllerMetadata || formatOnlyValidation)) continue;
105
+ if (request.account === void 0 && step.task === "comply_test_controller") {
106
+ request.account = { ...resolveAccount(options), sandbox: true };
107
+ }
91
108
  request = applyBrandInvariant(request, options, step.task, { omit_account: step.omit_account });
92
109
  if (request.account === void 0) continue;
93
110
  if (JSON.stringify(request.account).includes("$generate:")) {
@@ -200,7 +200,7 @@ export interface UpstreamTrafficQueryResult {
200
200
  */
201
201
  export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
202
202
  /** Capability semver emitted in run summaries and used for advisory expiry. */
203
- export declare const RUNNER_CAPABILITY_VERSION = "17.0.0-beta.15";
203
+ export declare const RUNNER_CAPABILITY_VERSION = "17.0.0-beta.17";
204
204
  /** True when a failed validation contributes to the owning step's grade. */
205
205
  export declare function validationFailsStep(result: ValidationResult): boolean;
206
206
  /**
@@ -200,7 +200,7 @@ export interface UpstreamTrafficQueryResult {
200
200
  */
201
201
  export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
202
202
  /** Capability semver emitted in run summaries and used for advisory expiry. */
203
- export declare const RUNNER_CAPABILITY_VERSION = "17.0.0-beta.15";
203
+ export declare const RUNNER_CAPABILITY_VERSION = "17.0.0-beta.17";
204
204
  /** True when a failed validation contributes to the owning step's grade. */
205
205
  export declare function validationFailsStep(result: ValidationResult): boolean;
206
206
  /**
@@ -362,7 +362,7 @@ async function executeWebhookAssertionStep(step, phaseId, context, allSteps, opt
362
362
  } else
363
363
  switch (step.task) {
364
364
  case "expect_webhook": {
365
- const outcome = await runExpectWebhook(step, filter, receiver);
365
+ const outcome = await runExpectWebhook(step, filter, receiver, options.adcpVersion ?? import_version.ADCP_VERSION);
366
366
  validations = outcome.validations;
367
367
  passed = outcome.passed;
368
368
  let changeKey;
@@ -523,7 +523,7 @@ async function runExpectNoWebhook(step, filter, receiver) {
523
523
  passed: true
524
524
  };
525
525
  }
526
- async function runExpectWebhook(step, filter, receiver) {
526
+ async function runExpectWebhook(step, filter, receiver, adcpVersion) {
527
527
  const timeoutMs = clampTimeoutSeconds(step.timeout_seconds, DEFAULT_TIMEOUT_SECONDS) * 1e3;
528
528
  const checkIdempotency = step.expect_idempotency_key !== false;
529
529
  const capCount = step.expect_max_deliveries_per_logical_event;
@@ -553,7 +553,7 @@ async function runExpectWebhook(step, filter, receiver) {
553
553
  first.raw_body.slice(0, 256)
554
554
  );
555
555
  }
556
- const schemaCheck = validateWebhookPayloadSchema(step, first);
556
+ const schemaCheck = validateWebhookPayloadSchema(step, first, adcpVersion);
557
557
  if (schemaCheck && !schemaCheck.passed) return { validations: [schemaCheck], passed: false };
558
558
  if (checkIdempotency) {
559
559
  const idempotencyCheck = assertIdempotencyKey(first);
@@ -759,11 +759,11 @@ function mapSignatureErrorCode(code) {
759
759
  }
760
760
  }
761
761
  }
762
- function validateWebhookPayloadSchema(step, webhook) {
762
+ function validateWebhookPayloadSchema(step, webhook, adcpVersion) {
763
763
  const schemaRef = step.webhook_payload_schema_ref ?? step.response_schema_webhook_ref;
764
764
  if (!schemaRef) return void 0;
765
- const { schema_id, schema_url } = resolveWebhookSchemaIdentity(schemaRef);
766
- const validator = (0, import_schema_loader.getSchemaValidatorByRef)(schemaRef);
765
+ const { schema_id, schema_url } = resolveWebhookSchemaIdentity(schemaRef, adcpVersion);
766
+ const validator = (0, import_schema_loader.getSchemaValidatorByRef)(schemaRef, adcpVersion);
767
767
  if (!validator) {
768
768
  return {
769
769
  check: "expect_webhook",
@@ -818,9 +818,10 @@ function validateWebhookPayloadSchema(step, webhook) {
818
818
  schema_url
819
819
  };
820
820
  }
821
- function resolveWebhookSchemaIdentity(schemaRef) {
822
- const trimmed = schemaRef.replace(/^\/+/, "");
823
- const schemaId = `/schemas/${import_version.ADCP_VERSION}/${trimmed}`;
821
+ function resolveWebhookSchemaIdentity(schemaRef, adcpVersion) {
822
+ const document = (0, import_schema_loader.getSchemaDocumentByRef)(schemaRef, adcpVersion);
823
+ const ref = document?.schemaRef ?? schemaRef.replace(/^\/+/, "");
824
+ const schemaId = `/schemas/${document?.resolvedVersion ?? adcpVersion}/${ref}`;
824
825
  return { schema_id: schemaId, schema_url: `${SCHEMA_URL_BASE}${schemaId}` };
825
826
  }
826
827
  function ajvErrorToSchemaError(error) {
@@ -7,7 +7,7 @@ import { verifyWebhookSignature } from "../../signing/webhook-verifier.mjs";
7
7
  import { WebhookSignatureError } from "../../signing/errors.mjs";
8
8
  import { InMemoryReplayStore } from "../../signing/replay.mjs";
9
9
  import { InMemoryRevocationStore } from "../../signing/revocation.mjs";
10
- import { getSchemaValidatorByRef } from "../../validation/schema-loader.mjs";
10
+ import { getSchemaDocumentByRef, getSchemaValidatorByRef } from "../../validation/schema-loader.mjs";
11
11
  import { ADCP_VERSION } from "../../version.mjs";
12
12
  import { ConfigurationError } from "../../errors/index.mjs";
13
13
  const RUN_STATE_REPLAY_KEY = "__webhook_signing_replay_store";
@@ -337,7 +337,7 @@ async function executeWebhookAssertionStep(step, phaseId, context, allSteps, opt
337
337
  } else
338
338
  switch (step.task) {
339
339
  case "expect_webhook": {
340
- const outcome = await runExpectWebhook(step, filter, receiver);
340
+ const outcome = await runExpectWebhook(step, filter, receiver, options.adcpVersion ?? ADCP_VERSION);
341
341
  validations = outcome.validations;
342
342
  passed = outcome.passed;
343
343
  let changeKey;
@@ -498,7 +498,7 @@ async function runExpectNoWebhook(step, filter, receiver) {
498
498
  passed: true
499
499
  };
500
500
  }
501
- async function runExpectWebhook(step, filter, receiver) {
501
+ async function runExpectWebhook(step, filter, receiver, adcpVersion) {
502
502
  const timeoutMs = clampTimeoutSeconds(step.timeout_seconds, DEFAULT_TIMEOUT_SECONDS) * 1e3;
503
503
  const checkIdempotency = step.expect_idempotency_key !== false;
504
504
  const capCount = step.expect_max_deliveries_per_logical_event;
@@ -528,7 +528,7 @@ async function runExpectWebhook(step, filter, receiver) {
528
528
  first.raw_body.slice(0, 256)
529
529
  );
530
530
  }
531
- const schemaCheck = validateWebhookPayloadSchema(step, first);
531
+ const schemaCheck = validateWebhookPayloadSchema(step, first, adcpVersion);
532
532
  if (schemaCheck && !schemaCheck.passed) return { validations: [schemaCheck], passed: false };
533
533
  if (checkIdempotency) {
534
534
  const idempotencyCheck = assertIdempotencyKey(first);
@@ -734,11 +734,11 @@ function mapSignatureErrorCode(code) {
734
734
  }
735
735
  }
736
736
  }
737
- function validateWebhookPayloadSchema(step, webhook) {
737
+ function validateWebhookPayloadSchema(step, webhook, adcpVersion) {
738
738
  const schemaRef = step.webhook_payload_schema_ref ?? step.response_schema_webhook_ref;
739
739
  if (!schemaRef) return void 0;
740
- const { schema_id, schema_url } = resolveWebhookSchemaIdentity(schemaRef);
741
- const validator = getSchemaValidatorByRef(schemaRef);
740
+ const { schema_id, schema_url } = resolveWebhookSchemaIdentity(schemaRef, adcpVersion);
741
+ const validator = getSchemaValidatorByRef(schemaRef, adcpVersion);
742
742
  if (!validator) {
743
743
  return {
744
744
  check: "expect_webhook",
@@ -793,9 +793,10 @@ function validateWebhookPayloadSchema(step, webhook) {
793
793
  schema_url
794
794
  };
795
795
  }
796
- function resolveWebhookSchemaIdentity(schemaRef) {
797
- const trimmed = schemaRef.replace(/^\/+/, "");
798
- const schemaId = `/schemas/${ADCP_VERSION}/${trimmed}`;
796
+ function resolveWebhookSchemaIdentity(schemaRef, adcpVersion) {
797
+ const document = getSchemaDocumentByRef(schemaRef, adcpVersion);
798
+ const ref = document?.schemaRef ?? schemaRef.replace(/^\/+/, "");
799
+ const schemaId = `/schemas/${document?.resolvedVersion ?? adcpVersion}/${ref}`;
799
800
  return { schema_id: schemaId, schema_url: `${SCHEMA_URL_BASE}${schemaId}` };
800
801
  }
801
802
  function ajvErrorToSchemaError(error) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * AdCP SDK library version
3
3
  */
4
- export declare const LIBRARY_VERSION = "17.0.0-beta.15";
4
+ export declare const LIBRARY_VERSION = "17.0.0-beta.17";
5
5
  /**
6
6
  * AdCP specification version this library is built for
7
7
  */
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
33
33
  * Full version information
34
34
  */
35
35
  export declare const VERSION_INFO: {
36
- readonly library: "17.0.0-beta.15";
36
+ readonly library: "17.0.0-beta.17";
37
37
  readonly adcp: "3.3.0-beta.3";
38
38
  readonly compatibleVersions: readonly ["v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.1.25", "3.1.26", "3.1.27", "3.1.28", "3.1.29", "3.1.30", "3.1.31", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4", "3.2.5", "3.2.6", "3.2.7", "3.2.8", "3.3.0-beta.3", "3.3-beta.3"];
39
- readonly generatedAt: "2026-11-03T12:43:16.598Z";
39
+ readonly generatedAt: "2026-11-04T07:33:28.225Z";
40
40
  };
41
41
  /**
42
42
  * Get the AdCP specification version this library is built for
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * AdCP SDK library version
3
3
  */
4
- export declare const LIBRARY_VERSION = "17.0.0-beta.15";
4
+ export declare const LIBRARY_VERSION = "17.0.0-beta.17";
5
5
  /**
6
6
  * AdCP specification version this library is built for
7
7
  */
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
33
33
  * Full version information
34
34
  */
35
35
  export declare const VERSION_INFO: {
36
- readonly library: "17.0.0-beta.15";
36
+ readonly library: "17.0.0-beta.17";
37
37
  readonly adcp: "3.3.0-beta.3";
38
38
  readonly compatibleVersions: readonly ["v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.1.25", "3.1.26", "3.1.27", "3.1.28", "3.1.29", "3.1.30", "3.1.31", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4", "3.2.5", "3.2.6", "3.2.7", "3.2.8", "3.3.0-beta.3", "3.3-beta.3"];
39
- readonly generatedAt: "2026-11-03T12:43:16.598Z";
39
+ readonly generatedAt: "2026-11-04T07:33:28.225Z";
40
40
  };
41
41
  /**
42
42
  * Get the AdCP specification version this library is built for