@adcp/sdk 15.9.4 → 15.9.5

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 (38) hide show
  1. package/dist/lib/core/TaskExecutor.d.mts +1 -0
  2. package/dist/lib/core/TaskExecutor.d.ts +1 -0
  3. package/dist/lib/core/TaskExecutor.js +48 -34
  4. package/dist/lib/core/TaskExecutor.mjs +49 -35
  5. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  6. package/dist/lib/testing/client.js +3 -5
  7. package/dist/lib/testing/client.mjs +4 -6
  8. package/dist/lib/testing/compliance/comply.js +7 -2
  9. package/dist/lib/testing/compliance/comply.mjs +8 -3
  10. package/dist/lib/testing/index.d.mts +1 -1
  11. package/dist/lib/testing/index.d.ts +1 -1
  12. package/dist/lib/testing/index.js +4 -2
  13. package/dist/lib/testing/index.mjs +8 -2
  14. package/dist/lib/testing/storyboard/runner.js +12 -12
  15. package/dist/lib/testing/storyboard/runner.mjs +14 -13
  16. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  17. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  18. package/dist/lib/testing/storyboard/validations.js +23 -1
  19. package/dist/lib/testing/storyboard/validations.mjs +28 -2
  20. package/dist/lib/testing/types.d.mts +39 -0
  21. package/dist/lib/testing/types.d.ts +39 -0
  22. package/dist/lib/validation/index.d.mts +1 -1
  23. package/dist/lib/validation/index.d.ts +1 -1
  24. package/dist/lib/validation/index.js +4 -2
  25. package/dist/lib/validation/index.mjs +4 -2
  26. package/dist/lib/validation/schema-loader.d.mts +26 -0
  27. package/dist/lib/validation/schema-loader.d.ts +26 -0
  28. package/dist/lib/validation/schema-loader.js +98 -14
  29. package/dist/lib/validation/schema-loader.mjs +95 -13
  30. package/dist/lib/version.d.mts +3 -3
  31. package/dist/lib/version.d.ts +3 -3
  32. package/dist/lib/version.js +3 -3
  33. package/dist/lib/version.mjs +3 -3
  34. package/docs/TYPE-SUMMARY.md +2 -2
  35. package/docs/guides/VALIDATE-YOUR-AGENT.md +34 -0
  36. package/docs/llms.txt +2 -2
  37. package/docs/migration-14.x-rc-worksheet.md +4 -4
  38. package/package.json +1 -1
@@ -435,6 +435,7 @@ export declare class TaskExecutor {
435
435
  * AJV runs.
436
436
  */
437
437
  private validateResponseSchema;
438
+ private validateResponseSchemaAgainst;
438
439
  private responseAdcpVersionForValidation;
439
440
  private effectiveResponseAdcpVersion;
440
441
  /**
@@ -435,6 +435,7 @@ export declare class TaskExecutor {
435
435
  * AJV runs.
436
436
  */
437
437
  private validateResponseSchema;
438
+ private validateResponseSchemaAgainst;
438
439
  private responseAdcpVersionForValidation;
439
440
  private effectiveResponseAdcpVersion;
440
441
  /**
@@ -4398,41 +4398,22 @@ class TaskExecutor {
4398
4398
  const mode = this.responseValidationMode;
4399
4399
  const logViolations = this.config.logSchemaViolations !== false;
4400
4400
  try {
4401
- let validationVersion = (serverVersion ?? this.lastKnownServerVersion) === "v2" ? "v2.5" : this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? import_version.ADCP_VERSION;
4402
- if (taskName === "get_adcp_capabilities" && validationVersion !== "v2.5") {
4403
- validationVersion = (0, import_schema_loader.resolveServedValidationVersion)(response, validationVersion);
4404
- }
4405
- const normalizedResponse = this.normalizeResponseForValidation(response, taskName, validationVersion === "v2.5");
4406
- const outcome = (0, import_client_hooks.validateIncomingResponse)(taskName, normalizedResponse, mode, void 0, validationVersion);
4407
- if (outcome.valid) return { valid: true, errors: [] };
4408
- const errorStrings = outcome.issues.map((i) => `${i.pointer}: ${i.message}`);
4409
- if (logViolations) {
4410
- debugLogs.push({
4411
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
4412
- type: mode === "strict" ? "error" : "warning",
4413
- message: `Schema validation ${mode === "strict" ? "failed" : "warning"} for ${taskName}: ${(0, import_schema_validator.formatIssues)(
4414
- outcome.issues
4415
- )}`,
4416
- errors: errorStrings,
4417
- issues: outcome.issues,
4418
- schemaVariant: outcome.variant,
4419
- schemaVersion: validationVersion,
4420
- mode
4421
- });
4422
- }
4423
- if (mode === "warn") {
4424
- if (logViolations) {
4425
- console.warn(
4426
- `Schema validation failed for ${taskName} against AdCP ${validationVersion} (non-blocking):`,
4427
- errorStrings
4428
- );
4429
- }
4430
- return { valid: true, errors: [] };
4431
- }
4432
- if (logViolations) {
4433
- console.error(`Schema validation failed for ${taskName} against AdCP ${validationVersion}:`, errorStrings);
4401
+ const pinnedValidationVersion = (serverVersion ?? this.lastKnownServerVersion) === "v2" ? "v2.5" : this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? import_version.ADCP_VERSION;
4402
+ if (taskName === "get_adcp_capabilities" && pinnedValidationVersion !== "v2.5") {
4403
+ return (0, import_schema_loader.withServedValidationVersion)(
4404
+ response,
4405
+ pinnedValidationVersion,
4406
+ (validationVersion) => this.validateResponseSchemaAgainst(response, taskName, debugLogs, mode, logViolations, validationVersion)
4407
+ );
4434
4408
  }
4435
- return { valid: false, errors: errorStrings };
4409
+ return this.validateResponseSchemaAgainst(
4410
+ response,
4411
+ taskName,
4412
+ debugLogs,
4413
+ mode,
4414
+ logViolations,
4415
+ pinnedValidationVersion
4416
+ );
4436
4417
  } catch (error) {
4437
4418
  const errorMessage = error instanceof Error ? error.message : "unknown error";
4438
4419
  console.error("Error during schema validation:", errorMessage);
@@ -4442,6 +4423,39 @@ class TaskExecutor {
4442
4423
  };
4443
4424
  }
4444
4425
  }
4426
+ validateResponseSchemaAgainst(response, taskName, debugLogs, mode, logViolations, validationVersion) {
4427
+ const normalizedResponse = this.normalizeResponseForValidation(response, taskName, validationVersion === "v2.5");
4428
+ const outcome = (0, import_client_hooks.validateIncomingResponse)(taskName, normalizedResponse, mode, void 0, validationVersion);
4429
+ if (outcome.valid) return { valid: true, errors: [] };
4430
+ const errorStrings = outcome.issues.map((i) => `${i.pointer}: ${i.message}`);
4431
+ if (logViolations) {
4432
+ debugLogs.push({
4433
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
4434
+ type: mode === "strict" ? "error" : "warning",
4435
+ message: `Schema validation ${mode === "strict" ? "failed" : "warning"} for ${taskName}: ${(0, import_schema_validator.formatIssues)(
4436
+ outcome.issues
4437
+ )}`,
4438
+ errors: errorStrings,
4439
+ issues: outcome.issues,
4440
+ schemaVariant: outcome.variant,
4441
+ schemaVersion: validationVersion,
4442
+ mode
4443
+ });
4444
+ }
4445
+ if (mode === "warn") {
4446
+ if (logViolations) {
4447
+ console.warn(
4448
+ `Schema validation failed for ${taskName} against AdCP ${validationVersion} (non-blocking):`,
4449
+ errorStrings
4450
+ );
4451
+ }
4452
+ return { valid: true, errors: [] };
4453
+ }
4454
+ if (logViolations) {
4455
+ console.error(`Schema validation failed for ${taskName} against AdCP ${validationVersion}:`, errorStrings);
4456
+ }
4457
+ return { valid: false, errors: errorStrings };
4458
+ }
4445
4459
  responseAdcpVersionForValidation() {
4446
4460
  if (this.config.versionEnvelope === "major-only") return "3.0";
4447
4461
  return void 0;
@@ -15,7 +15,7 @@ import {
15
15
  resolveValidationModes
16
16
  } from "../validation/client-hooks.mjs";
17
17
  import { formatIssues } from "../validation/schema-validator.mjs";
18
- import { resolveServedValidationVersion } from "../validation/schema-loader.mjs";
18
+ import { withServedValidationVersion } from "../validation/schema-loader.mjs";
19
19
  import { ADCP_VERSION } from "../version.mjs";
20
20
  import { unwrapProtocolResponse, isAdcpOperationSuccess } from "../utils/response-unwrapper.mjs";
21
21
  import { extractAdcpErrorInfo, extractCorrelationId } from "../utils/error-extraction.mjs";
@@ -4371,41 +4371,22 @@ class TaskExecutor {
4371
4371
  const mode = this.responseValidationMode;
4372
4372
  const logViolations = this.config.logSchemaViolations !== false;
4373
4373
  try {
4374
- let validationVersion = (serverVersion ?? this.lastKnownServerVersion) === "v2" ? "v2.5" : this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? ADCP_VERSION;
4375
- if (taskName === "get_adcp_capabilities" && validationVersion !== "v2.5") {
4376
- validationVersion = resolveServedValidationVersion(response, validationVersion);
4377
- }
4378
- const normalizedResponse = this.normalizeResponseForValidation(response, taskName, validationVersion === "v2.5");
4379
- const outcome = validateIncomingResponse(taskName, normalizedResponse, mode, void 0, validationVersion);
4380
- if (outcome.valid) return { valid: true, errors: [] };
4381
- const errorStrings = outcome.issues.map((i) => `${i.pointer}: ${i.message}`);
4382
- if (logViolations) {
4383
- debugLogs.push({
4384
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
4385
- type: mode === "strict" ? "error" : "warning",
4386
- message: `Schema validation ${mode === "strict" ? "failed" : "warning"} for ${taskName}: ${formatIssues(
4387
- outcome.issues
4388
- )}`,
4389
- errors: errorStrings,
4390
- issues: outcome.issues,
4391
- schemaVariant: outcome.variant,
4392
- schemaVersion: validationVersion,
4393
- mode
4394
- });
4395
- }
4396
- if (mode === "warn") {
4397
- if (logViolations) {
4398
- console.warn(
4399
- `Schema validation failed for ${taskName} against AdCP ${validationVersion} (non-blocking):`,
4400
- errorStrings
4401
- );
4402
- }
4403
- return { valid: true, errors: [] };
4404
- }
4405
- if (logViolations) {
4406
- console.error(`Schema validation failed for ${taskName} against AdCP ${validationVersion}:`, errorStrings);
4374
+ const pinnedValidationVersion = (serverVersion ?? this.lastKnownServerVersion) === "v2" ? "v2.5" : this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? ADCP_VERSION;
4375
+ if (taskName === "get_adcp_capabilities" && pinnedValidationVersion !== "v2.5") {
4376
+ return withServedValidationVersion(
4377
+ response,
4378
+ pinnedValidationVersion,
4379
+ (validationVersion) => this.validateResponseSchemaAgainst(response, taskName, debugLogs, mode, logViolations, validationVersion)
4380
+ );
4407
4381
  }
4408
- return { valid: false, errors: errorStrings };
4382
+ return this.validateResponseSchemaAgainst(
4383
+ response,
4384
+ taskName,
4385
+ debugLogs,
4386
+ mode,
4387
+ logViolations,
4388
+ pinnedValidationVersion
4389
+ );
4409
4390
  } catch (error) {
4410
4391
  const errorMessage = error instanceof Error ? error.message : "unknown error";
4411
4392
  console.error("Error during schema validation:", errorMessage);
@@ -4415,6 +4396,39 @@ class TaskExecutor {
4415
4396
  };
4416
4397
  }
4417
4398
  }
4399
+ validateResponseSchemaAgainst(response, taskName, debugLogs, mode, logViolations, validationVersion) {
4400
+ const normalizedResponse = this.normalizeResponseForValidation(response, taskName, validationVersion === "v2.5");
4401
+ const outcome = validateIncomingResponse(taskName, normalizedResponse, mode, void 0, validationVersion);
4402
+ if (outcome.valid) return { valid: true, errors: [] };
4403
+ const errorStrings = outcome.issues.map((i) => `${i.pointer}: ${i.message}`);
4404
+ if (logViolations) {
4405
+ debugLogs.push({
4406
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
4407
+ type: mode === "strict" ? "error" : "warning",
4408
+ message: `Schema validation ${mode === "strict" ? "failed" : "warning"} for ${taskName}: ${formatIssues(
4409
+ outcome.issues
4410
+ )}`,
4411
+ errors: errorStrings,
4412
+ issues: outcome.issues,
4413
+ schemaVariant: outcome.variant,
4414
+ schemaVersion: validationVersion,
4415
+ mode
4416
+ });
4417
+ }
4418
+ if (mode === "warn") {
4419
+ if (logViolations) {
4420
+ console.warn(
4421
+ `Schema validation failed for ${taskName} against AdCP ${validationVersion} (non-blocking):`,
4422
+ errorStrings
4423
+ );
4424
+ }
4425
+ return { valid: true, errors: [] };
4426
+ }
4427
+ if (logViolations) {
4428
+ console.error(`Schema validation failed for ${taskName} against AdCP ${validationVersion}:`, errorStrings);
4429
+ }
4430
+ return { valid: false, errors: errorStrings };
4431
+ }
4418
4432
  responseAdcpVersionForValidation() {
4419
4433
  if (this.config.versionEnvelope === "major-only") return "3.0";
4420
4434
  return void 0;
@@ -4,5 +4,5 @@
4
4
  "source_sha": "4e553ad955f83b49c7d221ab5c3ff78237ad02e3",
5
5
  "source_tarball_sha256": "580656d6466ef9f0d1119985e6726c2efea718dc671e2ad30957fcb2fd54af0f",
6
6
  "upstream_adcp_version": "2.5.3",
7
- "synced_at": "2026-10-16T23:43:47.149Z"
7
+ "synced_at": "2026-10-17T14:53:03.023Z"
8
8
  }
@@ -414,12 +414,10 @@ async function discoverAgentProfile(client, signal, schemaAdcpVersion) {
414
414
  step.error = versionUnsupported;
415
415
  } else if (caps?.data) {
416
416
  profile.raw_capabilities = caps.data;
417
- const validation = (0, import_client_hooks.validateIncomingResponse)(
418
- "get_adcp_capabilities",
417
+ const validation = (0, import_schema_loader.withServedValidationVersion)(
419
418
  caps.data,
420
- "strict",
421
- void 0,
422
- (0, import_schema_loader.resolveServedValidationVersion)(caps.data, schemaAdcpVersion ?? client.getAdcpVersion())
419
+ schemaAdcpVersion ?? client.getAdcpVersion(),
420
+ (validationVersion) => (0, import_client_hooks.validateIncomingResponse)("get_adcp_capabilities", caps.data, "strict", void 0, validationVersion)
423
421
  );
424
422
  if (!validation.valid) {
425
423
  profile.capabilities_schema_issues = validation.issues.map((issue) => ({
@@ -10,7 +10,7 @@ import { SsrfRefusedError } from "../net/ssrf-fetch.mjs";
10
10
  import { ADCP_VERSION, toReleasePrecisionVersion } from "../version.mjs";
11
11
  import { createHmac, hkdfSync, randomBytes } from "node:crypto";
12
12
  import { validateIncomingResponse } from "../validation/client-hooks.mjs";
13
- import { resolveServedValidationVersion } from "../validation/schema-loader.mjs";
13
+ import { withServedValidationVersion } from "../validation/schema-loader.mjs";
14
14
  import { extractVersionUnsupportedDetails } from "../utils/error-extraction.mjs";
15
15
  import { buildAgentSigningContext } from "../signing/client.mjs";
16
16
  import { bindAgentStorage } from "../auth/oauth/storage-registry.mjs";
@@ -374,12 +374,10 @@ async function discoverAgentProfile(client, signal, schemaAdcpVersion) {
374
374
  step.error = versionUnsupported;
375
375
  } else if (caps?.data) {
376
376
  profile.raw_capabilities = caps.data;
377
- const validation = validateIncomingResponse(
378
- "get_adcp_capabilities",
377
+ const validation = withServedValidationVersion(
379
378
  caps.data,
380
- "strict",
381
- void 0,
382
- resolveServedValidationVersion(caps.data, schemaAdcpVersion ?? client.getAdcpVersion())
379
+ schemaAdcpVersion ?? client.getAdcpVersion(),
380
+ (validationVersion) => validateIncomingResponse("get_adcp_capabilities", caps.data, "strict", void 0, validationVersion)
383
381
  );
384
382
  if (!validation.valid) {
385
383
  profile.capabilities_schema_issues = validation.issues.map((issue) => ({
@@ -1344,7 +1344,12 @@ async function complyImpl(agentUrl, options) {
1344
1344
  }
1345
1345
  (0, import_test_kit.validateTestKit)(testOptions.test_kit);
1346
1346
  const signal = externalSignal;
1347
- return await (0, import_schema_loader.withExternalSchemaRoot)(complianceIndex.adcp_version, scopedSchemaRoot, async () => {
1347
+ return await (0, import_schema_loader.withExternalSchemaRoot)(
1348
+ complianceIndex.adcp_version,
1349
+ scopedSchemaRoot,
1350
+ () => (0, import_schema_loader.withServedReleaseSchemaRoots)(testOptions.servedReleaseSchemaRoots, () => complyInSchemaScope())
1351
+ );
1352
+ async function complyInSchemaScope() {
1348
1353
  let effectiveOptions = (0, import_runner.applyAdcpVersionRunOptions)(complianceIndex.adcp_version, {
1349
1354
  ...testOptions,
1350
1355
  // `comply()` has always defaulted an unset transport to MCP when it built
@@ -1648,7 +1653,7 @@ async function complyImpl(agentUrl, options) {
1648
1653
  total_duration_ms: Date.now() - start,
1649
1654
  notices: noticesDedup
1650
1655
  };
1651
- });
1656
+ }
1652
1657
  }
1653
1658
  function hasComplyTimeoutBudgetExpired(start, timeout_ms, now = Date.now()) {
1654
1659
  return timeout_ms !== void 0 && now - start >= timeout_ms;
@@ -28,7 +28,7 @@ import { closeScopedConnections, withMCPConnectionScope } from "../../protocols/
28
28
  import { detectController, hasTestController } from "../test-controller.mjs";
29
29
  import { randomBytes } from "crypto";
30
30
  import { isPre31AdcpVersion } from "../../utils/adcp-version-config.mjs";
31
- import { withExternalSchemaRoot } from "../../validation/schema-loader.mjs";
31
+ import { withExternalSchemaRoot, withServedReleaseSchemaRoots } from "../../validation/schema-loader.mjs";
32
32
  import { redactOAuthUrlForOutput, redactOAuthUrlsInText } from "../storyboard/oauth-metadata-graph/index.mjs";
33
33
  import { LIBRARY_VERSION } from "../../version.mjs";
34
34
  import { validationFailsStep } from "../storyboard/validations.mjs";
@@ -1327,7 +1327,12 @@ async function complyImpl(agentUrl, options) {
1327
1327
  }
1328
1328
  validateTestKit(testOptions.test_kit);
1329
1329
  const signal = externalSignal;
1330
- return await withExternalSchemaRoot(complianceIndex.adcp_version, scopedSchemaRoot, async () => {
1330
+ return await withExternalSchemaRoot(
1331
+ complianceIndex.adcp_version,
1332
+ scopedSchemaRoot,
1333
+ () => withServedReleaseSchemaRoots(testOptions.servedReleaseSchemaRoots, () => complyInSchemaScope())
1334
+ );
1335
+ async function complyInSchemaScope() {
1331
1336
  let effectiveOptions = applyAdcpVersionRunOptions(complianceIndex.adcp_version, {
1332
1337
  ...testOptions,
1333
1338
  // `comply()` has always defaulted an unset transport to MCP when it built
@@ -1631,7 +1636,7 @@ async function complyImpl(agentUrl, options) {
1631
1636
  total_duration_ms: Date.now() - start,
1632
1637
  notices: noticesDedup
1633
1638
  };
1634
- });
1639
+ }
1635
1640
  }
1636
1641
  function hasComplyTimeoutBudgetExpired(start, timeout_ms, now = Date.now()) {
1637
1642
  return timeout_ms !== void 0 && now - start >= timeout_ms;
@@ -16,5 +16,5 @@ export { isSandboxRequest, mergeSeededProductsIntoResponse, filterValidSeededPro
16
16
  export type { TestControllerBridge, TestControllerBridgeContext, BridgeFromSessionStoreOptions, SeededCreative, SeededMediaBuy, SeededAccountFinancials, } from '../server/test-controller-bridge.mjs';
17
17
  export { runAgainstLocalAgent } from './local-agent-runner.mjs';
18
18
  export type { LocalAgentRunResult, PerStoryboardOverride, RunAgainstLocalAgentOptions } from './local-agent-runner.mjs';
19
- export { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot } from '../validation/index.mjs';
19
+ export { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot, withServedReleaseSchemaRoots, } from '../validation/index.mjs';
20
20
  export { runStoryboard, runStoryboardStep, applyAdcpVersionRunOptions, applyStoryboardVersionOptions, getFirstStepPreview, parseStoryboard, loadStoryboardFile, normalizeValidationOnlyTasks, VALIDATION_ONLY_TASK, applyFixtureBindingsToRequest, buildFixtureResolutionSpecs, FixtureBindingRegistry, matchesFixtureRequirements, normalizeFixtureMatchExpression, validateFixtureResolutionDeclarations, getComplianceCacheDir, loadComplianceIndex, listBundles, loadBundleStoryboards, listAllComplianceStoryboards, getComplianceStoryboardById, findBundleById, resolveBundleOrStoryboard, resolveStoryboardsForCapabilities, isComplianceVersionSupported, CapabilityResolutionError, TASK_TO_METHOD, executeStoryboardTask, expandCreativeAssetDirectives, findUnresolvedCreativeAssetDirectives, extractContext, injectContext, runValidations, resolvePath, RateLimitTripObserver, RATE_LIMIT_TRIP_CONTRACT, RATE_LIMIT_TRIP_DEFAULT_REPLAY_MAX_WAIT_SECONDS, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MAX, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MIN, validateRateLimitTripSpec, getSandboxEntities, getSandboxBrands, getSandboxBrand, isSandboxDomain, clearSandboxCache, registerAssertion, getAssertion, listAssertions, listDefaultAssertions, clearAssertionRegistry, resolveAssertions, type AssertionSpec, type AssertionContext, type AssertionResult, type RegisterAssertionOptions, type Storyboard, type StoryboardFixtureResolution, type FixtureResolutionStrategy, type FixtureMatchOperator, type FixtureMatchClause, type FixtureResolutionDeclaration, type ProductFixtureResolutionDeclaration, type PricingOptionFixtureResolutionDeclaration, type FixtureResolutionStatus, type FixtureResolutionRecord, type FixtureResolutionAttempt, type FixtureResolutionEvidence, type FixtureResolutionCoverageGap, type StoryboardInvariants, type StoryboardInvariantsObject, type StepInvariantsObject, type StoryboardPhase, type StoryboardStep, type RateLimitTripSpec, type StoryboardValidation, type RateLimitTripClient, type RateLimitTripFailureCode, type RateLimitTripObservation, type RateLimitTripObserverOptions, type RateLimitTripResponseSnapshot, type RateLimitTripStructuredResult, type RateLimitTripTaskOptions, type StoryboardContext, type StoryboardRunOptions, type TrustedMatchContextProviderEndpoint, type TrustedMatchContextRegistrationContext, type TrustedMatchContextRouterRunnerOptions, type TrustedMatchPublisherAuthOperation, type TrustedMatchPublisherCredentialState, type TrustedMatchPublisherAuthTls, type TrustedMatchPublisherAuthProbeConfiguration, type TrustedMatchPublisherAuthRunner, type ValidationResult, type StoryboardStepPreview, type StoryboardStepResult, type StoryboardStepHint, type StoryboardStepHintBase, type ContextValueRejectedHint, type ShapeDriftHint, type MissingRequiredFieldHint, type FormatMismatchHint, type MonotonicViolationHint, type ContextProvenanceEntry, type StoryboardPhaseResult, type StoryboardResult, type RunnerNotice, type NoticeCode, type NoticeSeverity, type AgentCapabilities, type BundleKind, type BundleRef, type CapabilityResolutionCode, type ComplianceIndex, type ComplianceIndexProtocol, type ComplianceIndexSpecialism, type ResolveOptions, type ResolvedBundle, type ResolvedStoryboards, type SandboxBrand, type SandboxAgent, type SandboxEntities, type BrandJson, type AdagentsJson, gradeOAuthMetadataGraph, gradeOAuthMetadataGraphVector, loadOAuthMetadataGraphVectors, normalizeOAuthResourceForComparison, redactOAuthUrlForOutput, type GradeOAuthMetadataGraphOptions, type OAuthMetadataGraphErrorCode, type OAuthMetadataGraphFinding, type OAuthMetadataGraphGrade, type OAuthMetadataGraphObservation, type OAuthMetadataGraphVector, type OAuthMetadataGraphVectorCorpus, BrandJsonSchema, AdagentsJsonSchema, MCP_SESSION_PROBE_TASK, } from './storyboard/index.mjs';
@@ -16,5 +16,5 @@ export { isSandboxRequest, mergeSeededProductsIntoResponse, filterValidSeededPro
16
16
  export type { TestControllerBridge, TestControllerBridgeContext, BridgeFromSessionStoreOptions, SeededCreative, SeededMediaBuy, SeededAccountFinancials, } from '../server/test-controller-bridge';
17
17
  export { runAgainstLocalAgent } from './local-agent-runner';
18
18
  export type { LocalAgentRunResult, PerStoryboardOverride, RunAgainstLocalAgentOptions } from './local-agent-runner';
19
- export { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot } from '../validation';
19
+ export { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot, withServedReleaseSchemaRoots, } from '../validation';
20
20
  export { runStoryboard, runStoryboardStep, applyAdcpVersionRunOptions, applyStoryboardVersionOptions, getFirstStepPreview, parseStoryboard, loadStoryboardFile, normalizeValidationOnlyTasks, VALIDATION_ONLY_TASK, applyFixtureBindingsToRequest, buildFixtureResolutionSpecs, FixtureBindingRegistry, matchesFixtureRequirements, normalizeFixtureMatchExpression, validateFixtureResolutionDeclarations, getComplianceCacheDir, loadComplianceIndex, listBundles, loadBundleStoryboards, listAllComplianceStoryboards, getComplianceStoryboardById, findBundleById, resolveBundleOrStoryboard, resolveStoryboardsForCapabilities, isComplianceVersionSupported, CapabilityResolutionError, TASK_TO_METHOD, executeStoryboardTask, expandCreativeAssetDirectives, findUnresolvedCreativeAssetDirectives, extractContext, injectContext, runValidations, resolvePath, RateLimitTripObserver, RATE_LIMIT_TRIP_CONTRACT, RATE_LIMIT_TRIP_DEFAULT_REPLAY_MAX_WAIT_SECONDS, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MAX, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MIN, validateRateLimitTripSpec, getSandboxEntities, getSandboxBrands, getSandboxBrand, isSandboxDomain, clearSandboxCache, registerAssertion, getAssertion, listAssertions, listDefaultAssertions, clearAssertionRegistry, resolveAssertions, type AssertionSpec, type AssertionContext, type AssertionResult, type RegisterAssertionOptions, type Storyboard, type StoryboardFixtureResolution, type FixtureResolutionStrategy, type FixtureMatchOperator, type FixtureMatchClause, type FixtureResolutionDeclaration, type ProductFixtureResolutionDeclaration, type PricingOptionFixtureResolutionDeclaration, type FixtureResolutionStatus, type FixtureResolutionRecord, type FixtureResolutionAttempt, type FixtureResolutionEvidence, type FixtureResolutionCoverageGap, type StoryboardInvariants, type StoryboardInvariantsObject, type StepInvariantsObject, type StoryboardPhase, type StoryboardStep, type RateLimitTripSpec, type StoryboardValidation, type RateLimitTripClient, type RateLimitTripFailureCode, type RateLimitTripObservation, type RateLimitTripObserverOptions, type RateLimitTripResponseSnapshot, type RateLimitTripStructuredResult, type RateLimitTripTaskOptions, type StoryboardContext, type StoryboardRunOptions, type TrustedMatchContextProviderEndpoint, type TrustedMatchContextRegistrationContext, type TrustedMatchContextRouterRunnerOptions, type TrustedMatchPublisherAuthOperation, type TrustedMatchPublisherCredentialState, type TrustedMatchPublisherAuthTls, type TrustedMatchPublisherAuthProbeConfiguration, type TrustedMatchPublisherAuthRunner, type ValidationResult, type StoryboardStepPreview, type StoryboardStepResult, type StoryboardStepHint, type StoryboardStepHintBase, type ContextValueRejectedHint, type ShapeDriftHint, type MissingRequiredFieldHint, type FormatMismatchHint, type MonotonicViolationHint, type ContextProvenanceEntry, type StoryboardPhaseResult, type StoryboardResult, type RunnerNotice, type NoticeCode, type NoticeSeverity, type AgentCapabilities, type BundleKind, type BundleRef, type CapabilityResolutionCode, type ComplianceIndex, type ComplianceIndexProtocol, type ComplianceIndexSpecialism, type ResolveOptions, type ResolvedBundle, type ResolvedStoryboards, type SandboxBrand, type SandboxAgent, type SandboxEntities, type BrandJson, type AdagentsJson, gradeOAuthMetadataGraph, gradeOAuthMetadataGraphVector, loadOAuthMetadataGraphVectors, normalizeOAuthResourceForComparison, redactOAuthUrlForOutput, type GradeOAuthMetadataGraphOptions, type OAuthMetadataGraphErrorCode, type OAuthMetadataGraphFinding, type OAuthMetadataGraphGrade, type OAuthMetadataGraphObservation, type OAuthMetadataGraphVector, type OAuthMetadataGraphVectorCorpus, BrandJsonSchema, AdagentsJsonSchema, MCP_SESSION_PROBE_TASK, } from './storyboard';
@@ -192,7 +192,8 @@ __export(testing_exports, {
192
192
  unregisterExternalSchemaRoot: () => import_validation.unregisterExternalSchemaRoot,
193
193
  validateFixtureResolutionDeclarations: () => import_storyboard.validateFixtureResolutionDeclarations,
194
194
  validateRateLimitTripSpec: () => import_storyboard.validateRateLimitTripSpec,
195
- withExternalSchemaRoot: () => import_validation.withExternalSchemaRoot
195
+ withExternalSchemaRoot: () => import_validation.withExternalSchemaRoot,
196
+ withServedReleaseSchemaRoots: () => import_validation.withServedReleaseSchemaRoots
196
197
  });
197
198
  module.exports = __toCommonJS(testing_exports);
198
199
  var import_pending_web_flow_store = require('./pending-web-flow-store.js');
@@ -384,5 +385,6 @@ var import_storyboard = require('./storyboard/index.js');
384
385
  unregisterExternalSchemaRoot,
385
386
  validateFixtureResolutionDeclarations,
386
387
  validateRateLimitTripSpec,
387
- withExternalSchemaRoot
388
+ withExternalSchemaRoot,
389
+ withServedReleaseSchemaRoots
388
390
  });
@@ -122,7 +122,12 @@ import {
122
122
  bridgeFromSessionStore
123
123
  } from "../server/test-controller-bridge.mjs";
124
124
  import { runAgainstLocalAgent } from "./local-agent-runner.mjs";
125
- import { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot } from "../validation/index.mjs";
125
+ import {
126
+ registerExternalSchemaRoot,
127
+ unregisterExternalSchemaRoot,
128
+ withExternalSchemaRoot,
129
+ withServedReleaseSchemaRoots
130
+ } from "../validation/index.mjs";
126
131
  import {
127
132
  runStoryboard,
128
133
  runStoryboardStep,
@@ -359,5 +364,6 @@ export {
359
364
  unregisterExternalSchemaRoot,
360
365
  validateFixtureResolutionDeclarations,
361
366
  validateRateLimitTripSpec,
362
- withExternalSchemaRoot
367
+ withExternalSchemaRoot,
368
+ withServedReleaseSchemaRoots
363
369
  };
@@ -770,14 +770,14 @@ async function runStoryboard(agentUrlOrUrls, storyboard, options = {}) {
770
770
  options = (0, import_test_kit.resolveDeclaredTestKit)(storyboard, options);
771
771
  options = (0, import_native_a2a_compliance.applyNativeA2AComplianceTransportOptions)(options);
772
772
  const schemaRoot = getRunSchemaRoot(options);
773
+ const runBody = () => (0, import_schema_loader.withServedReleaseSchemaRoots)(
774
+ options.servedReleaseSchemaRoots,
775
+ () => runStoryboardBody(agentUrlOrUrls, storyboard, options)
776
+ );
773
777
  if (schemaRoot) {
774
- return await (0, import_schema_loader.withExternalSchemaRoot)(
775
- schemaRoot.adcpVersion,
776
- schemaRoot.schemaRoot,
777
- () => runStoryboardBody(agentUrlOrUrls, storyboard, options)
778
- );
778
+ return await (0, import_schema_loader.withExternalSchemaRoot)(schemaRoot.adcpVersion, schemaRoot.schemaRoot, runBody);
779
779
  }
780
- return await runStoryboardBody(agentUrlOrUrls, storyboard, options);
780
+ return await runBody();
781
781
  },
782
782
  { isolate: true }
783
783
  );
@@ -3102,14 +3102,14 @@ async function runStoryboardStep(agentUrl, storyboard, stepId, options = {}) {
3102
3102
  options = (0, import_test_kit.resolveDeclaredTestKit)(storyboard, options);
3103
3103
  options = (0, import_native_a2a_compliance.applyNativeA2AComplianceTransportOptions)(options);
3104
3104
  const schemaRoot = getRunSchemaRoot(options);
3105
+ const runBody = () => (0, import_schema_loader.withServedReleaseSchemaRoots)(
3106
+ options.servedReleaseSchemaRoots,
3107
+ () => runStoryboardStepBody(agentUrl, storyboard, stepId, options)
3108
+ );
3105
3109
  if (schemaRoot) {
3106
- return await (0, import_schema_loader.withExternalSchemaRoot)(
3107
- schemaRoot.adcpVersion,
3108
- schemaRoot.schemaRoot,
3109
- () => runStoryboardStepBody(agentUrl, storyboard, stepId, options)
3110
- );
3110
+ return await (0, import_schema_loader.withExternalSchemaRoot)(schemaRoot.adcpVersion, schemaRoot.schemaRoot, runBody);
3111
3111
  }
3112
- return await runStoryboardStepBody(agentUrl, storyboard, stepId, options);
3112
+ return await runBody();
3113
3113
  },
3114
3114
  { isolate: true }
3115
3115
  );
@@ -60,7 +60,8 @@ import {
60
60
  getSchemaValidatorByRef,
61
61
  resolveBundleKey,
62
62
  schemaAllowsTopLevelField,
63
- withExternalSchemaRoot
63
+ withExternalSchemaRoot,
64
+ withServedReleaseSchemaRoots
64
65
  } from "../../validation/schema-loader.mjs";
65
66
  import { ADCP_VERSION, parseAdcpMajorVersion } from "../../version.mjs";
66
67
  import {
@@ -792,14 +793,14 @@ async function runStoryboard(agentUrlOrUrls, storyboard, options = {}) {
792
793
  options = resolveDeclaredTestKit(storyboard, options);
793
794
  options = applyNativeA2AComplianceTransportOptions(options);
794
795
  const schemaRoot = getRunSchemaRoot(options);
796
+ const runBody = () => withServedReleaseSchemaRoots(
797
+ options.servedReleaseSchemaRoots,
798
+ () => runStoryboardBody(agentUrlOrUrls, storyboard, options)
799
+ );
795
800
  if (schemaRoot) {
796
- return await withExternalSchemaRoot(
797
- schemaRoot.adcpVersion,
798
- schemaRoot.schemaRoot,
799
- () => runStoryboardBody(agentUrlOrUrls, storyboard, options)
800
- );
801
+ return await withExternalSchemaRoot(schemaRoot.adcpVersion, schemaRoot.schemaRoot, runBody);
801
802
  }
802
- return await runStoryboardBody(agentUrlOrUrls, storyboard, options);
803
+ return await runBody();
803
804
  },
804
805
  { isolate: true }
805
806
  );
@@ -3124,14 +3125,14 @@ async function runStoryboardStep(agentUrl, storyboard, stepId, options = {}) {
3124
3125
  options = resolveDeclaredTestKit(storyboard, options);
3125
3126
  options = applyNativeA2AComplianceTransportOptions(options);
3126
3127
  const schemaRoot = getRunSchemaRoot(options);
3128
+ const runBody = () => withServedReleaseSchemaRoots(
3129
+ options.servedReleaseSchemaRoots,
3130
+ () => runStoryboardStepBody(agentUrl, storyboard, stepId, options)
3131
+ );
3127
3132
  if (schemaRoot) {
3128
- return await withExternalSchemaRoot(
3129
- schemaRoot.adcpVersion,
3130
- schemaRoot.schemaRoot,
3131
- () => runStoryboardStepBody(agentUrl, storyboard, stepId, options)
3132
- );
3133
+ return await withExternalSchemaRoot(schemaRoot.adcpVersion, schemaRoot.schemaRoot, runBody);
3133
3134
  }
3134
- return await runStoryboardStepBody(agentUrl, storyboard, stepId, options);
3135
+ return await runBody();
3135
3136
  },
3136
3137
  { isolate: true }
3137
3138
  );
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
197
197
  */
198
198
  export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
199
199
  /** Capability semver emitted in run summaries and used for advisory expiry. */
200
- export declare const RUNNER_CAPABILITY_VERSION = "15.9.4";
200
+ export declare const RUNNER_CAPABILITY_VERSION = "15.9.5";
201
201
  /** True when a failed validation contributes to the owning step's grade. */
202
202
  export declare function validationFailsStep(result: ValidationResult): boolean;
203
203
  /**
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
197
197
  */
198
198
  export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
199
199
  /** Capability semver emitted in run summaries and used for advisory expiry. */
200
- export declare const RUNNER_CAPABILITY_VERSION = "15.9.4";
200
+ export declare const RUNNER_CAPABILITY_VERSION = "15.9.5";
201
201
  /** True when a failed validation contributes to the owning step's grade. */
202
202
  export declare function validationFailsStep(result: ValidationResult): boolean;
203
203
  /**
@@ -259,6 +259,21 @@ function mapZodIssueToSchemaKeyword(issue) {
259
259
  }
260
260
  }
261
261
  function validateResponseSchema(validation, ctx, taskResult) {
262
+ const pinnedVersion = ctx.adcpVersion;
263
+ if (ctx.taskName === "get_adcp_capabilities" && pinnedVersion !== void 0) {
264
+ return (0, import_schema_loader.withServedValidationVersion)(
265
+ taskResult.data,
266
+ pinnedVersion,
267
+ (validationVersion) => validateResponseSchemaForVersion(
268
+ validation,
269
+ validationVersion === pinnedVersion ? ctx : { ...ctx, adcpVersion: validationVersion, responseAdcpVersion: validationVersion },
270
+ taskResult
271
+ )
272
+ );
273
+ }
274
+ return validateResponseSchemaForVersion(validation, ctx, taskResult);
275
+ }
276
+ function validateResponseSchemaForVersion(validation, ctx, taskResult) {
262
277
  const taskName = ctx.taskName;
263
278
  const schemaIdentityVersion = ctx.adcpVersion ?? ctx.responseAdcpVersion ?? import_version.ADCP_VERSION;
264
279
  const { schema_id, schema_url } = resolveSchemaIdentity(ctx.responseSchemaRef, schemaIdentityVersion);
@@ -356,7 +371,14 @@ function validateResponseSchema(validation, ctx, taskResult) {
356
371
  }
357
372
  function isExternalResponseSchemaAuthoritative(ctx) {
358
373
  const validationVersion = responseSchemaValidationVersion(ctx.adcpVersion, ctx.responseAdcpVersion);
359
- return validationVersion !== void 0 && (0, import_schema_loader.isExternalSchemaRootActive)(validationVersion);
374
+ if (validationVersion !== void 0 && (0, import_schema_loader.isExternalSchemaRootActive)(validationVersion)) return true;
375
+ const pinnedVersion = ctx.adcpVersion;
376
+ if (ctx.taskName !== "get_adcp_capabilities" || pinnedVersion === void 0 || !ctx.taskResult) return false;
377
+ return (0, import_schema_loader.withServedValidationVersion)(
378
+ ctx.taskResult.data,
379
+ pinnedVersion,
380
+ (version) => version !== pinnedVersion && (0, import_schema_loader.isExternalSchemaRootActive)(version)
381
+ );
360
382
  }
361
383
  function responseSchemaValidationVersion(adcpVersion, responseAdcpVersion) {
362
384
  if (adcpVersion && (0, import_schema_loader.isExternalSchemaRootActive)(adcpVersion)) return adcpVersion;
@@ -2,7 +2,11 @@ import { prepareResponseForSchemaValidation, TOOL_RESPONSE_SCHEMAS } from "../..
2
2
  import { injectLegacyEnvelopeStatus } from "../../utils/envelope-status-compat.mjs";
3
3
  import { TRANSPORT_SUFFIX_REGEX } from "../../utils/a2a-discovery.mjs";
4
4
  import { validateResponse } from "../../validation/schema-validator.mjs";
5
- import { hasSchemaBundle, isExternalSchemaRootActive } from "../../validation/schema-loader.mjs";
5
+ import {
6
+ hasSchemaBundle,
7
+ isExternalSchemaRootActive,
8
+ withServedValidationVersion
9
+ } from "../../validation/schema-loader.mjs";
6
10
  import { ADCP_VERSION, LIBRARY_VERSION } from "../../version.mjs";
7
11
  import { isPre31AdcpVersion } from "../../utils/adcp-version-config.mjs";
8
12
  import { gte as semverGte, valid as validSemver } from "semver";
@@ -234,6 +238,21 @@ function mapZodIssueToSchemaKeyword(issue) {
234
238
  }
235
239
  }
236
240
  function validateResponseSchema(validation, ctx, taskResult) {
241
+ const pinnedVersion = ctx.adcpVersion;
242
+ if (ctx.taskName === "get_adcp_capabilities" && pinnedVersion !== void 0) {
243
+ return withServedValidationVersion(
244
+ taskResult.data,
245
+ pinnedVersion,
246
+ (validationVersion) => validateResponseSchemaForVersion(
247
+ validation,
248
+ validationVersion === pinnedVersion ? ctx : { ...ctx, adcpVersion: validationVersion, responseAdcpVersion: validationVersion },
249
+ taskResult
250
+ )
251
+ );
252
+ }
253
+ return validateResponseSchemaForVersion(validation, ctx, taskResult);
254
+ }
255
+ function validateResponseSchemaForVersion(validation, ctx, taskResult) {
237
256
  const taskName = ctx.taskName;
238
257
  const schemaIdentityVersion = ctx.adcpVersion ?? ctx.responseAdcpVersion ?? ADCP_VERSION;
239
258
  const { schema_id, schema_url } = resolveSchemaIdentity(ctx.responseSchemaRef, schemaIdentityVersion);
@@ -331,7 +350,14 @@ function validateResponseSchema(validation, ctx, taskResult) {
331
350
  }
332
351
  function isExternalResponseSchemaAuthoritative(ctx) {
333
352
  const validationVersion = responseSchemaValidationVersion(ctx.adcpVersion, ctx.responseAdcpVersion);
334
- return validationVersion !== void 0 && isExternalSchemaRootActive(validationVersion);
353
+ if (validationVersion !== void 0 && isExternalSchemaRootActive(validationVersion)) return true;
354
+ const pinnedVersion = ctx.adcpVersion;
355
+ if (ctx.taskName !== "get_adcp_capabilities" || pinnedVersion === void 0 || !ctx.taskResult) return false;
356
+ return withServedValidationVersion(
357
+ ctx.taskResult.data,
358
+ pinnedVersion,
359
+ (version) => version !== pinnedVersion && isExternalSchemaRootActive(version)
360
+ );
335
361
  }
336
362
  function responseSchemaValidationVersion(adcpVersion, responseAdcpVersion) {
337
363
  if (adcpVersion && isExternalSchemaRootActive(adcpVersion)) return adcpVersion;