@adcp/sdk 12.0.0 → 12.0.1
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/content-standards-adapter.mjs +0 -6
- package/dist/lib/adapters/content-standards-adapter.mjs.map +1 -1
- package/dist/lib/adapters/derived-account-store.mjs +0 -6
- package/dist/lib/adapters/derived-account-store.mjs.map +1 -1
- package/dist/lib/adapters/governance-adapter.mjs +0 -6
- package/dist/lib/adapters/governance-adapter.mjs.map +1 -1
- package/dist/lib/adapters/implicit-account-store.mjs +0 -6
- package/dist/lib/adapters/implicit-account-store.mjs.map +1 -1
- package/dist/lib/adapters/index.mjs +0 -6
- package/dist/lib/adapters/index.mjs.map +1 -1
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.mjs +0 -6
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.mjs.map +1 -1
- package/dist/lib/adapters/legacy/v2-5/get_products.mjs +0 -6
- package/dist/lib/adapters/legacy/v2-5/get_products.mjs.map +1 -1
- package/dist/lib/adapters/legacy/v2-5/index.mjs +0 -6
- package/dist/lib/adapters/legacy/v2-5/index.mjs.map +1 -1
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.mjs +0 -6
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.mjs.map +1 -1
- package/dist/lib/adapters/legacy/v2-5/preview_creative.mjs +0 -6
- package/dist/lib/adapters/legacy/v2-5/preview_creative.mjs.map +1 -1
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.mjs +0 -6
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.mjs.map +1 -1
- package/dist/lib/adapters/legacy/v2-5/types.mjs +0 -6
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.mjs +0 -6
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.mjs.map +1 -1
- package/dist/lib/adapters/oauth-passthrough-resolver.mjs +0 -6
- package/dist/lib/adapters/oauth-passthrough-resolver.mjs.map +1 -1
- package/dist/lib/adapters/property-list-adapter.mjs +0 -6
- package/dist/lib/adapters/property-list-adapter.mjs.map +1 -1
- package/dist/lib/adapters/roster-account-store.mjs +0 -6
- package/dist/lib/adapters/roster-account-store.mjs.map +1 -1
- package/dist/lib/adapters/si-session-manager.mjs +0 -6
- package/dist/lib/adapters/si-session-manager.mjs.map +1 -1
- package/dist/lib/adapters/version/3.0/brand-fields.mjs +0 -6
- package/dist/lib/adapters/version/3.0/brand-fields.mjs.map +1 -1
- package/dist/lib/adapters/version/3.0/get-products.mjs +0 -6
- package/dist/lib/adapters/version/3.0/get-products.mjs.map +1 -1
- package/dist/lib/adapters/version/3.0/index.mjs +0 -6
- package/dist/lib/adapters/version/3.0/index.mjs.map +1 -1
- package/dist/lib/adapters/version/3.0/sync-accounts.mjs +0 -6
- package/dist/lib/adapters/version/3.0/sync-accounts.mjs.map +1 -1
- package/dist/lib/adapters/version/index.mjs +0 -6
- package/dist/lib/adapters/version/index.mjs.map +1 -1
- package/dist/lib/adapters/version/types.mjs +0 -6
- package/dist/lib/advanced.mjs +0 -6
- package/dist/lib/advanced.mjs.map +1 -1
- package/dist/lib/agents/index.generated.mjs +0 -6
- package/dist/lib/agents/index.generated.mjs.map +1 -1
- package/dist/lib/auth/index.mjs +0 -6
- package/dist/lib/auth/index.mjs.map +1 -1
- package/dist/lib/auth/oauth/CLIFlowHandler.mjs +0 -6
- package/dist/lib/auth/oauth/CLIFlowHandler.mjs.map +1 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.mjs +0 -6
- package/dist/lib/auth/oauth/ClientCredentialsFlow.mjs.map +1 -1
- package/dist/lib/auth/oauth/MCPOAuthProvider.mjs +0 -6
- package/dist/lib/auth/oauth/MCPOAuthProvider.mjs.map +1 -1
- package/dist/lib/auth/oauth/NonInteractiveFlowHandler.mjs +0 -6
- package/dist/lib/auth/oauth/NonInteractiveFlowHandler.mjs.map +1 -1
- package/dist/lib/auth/oauth/authorization-required.mjs +0 -6
- package/dist/lib/auth/oauth/authorization-required.mjs.map +1 -1
- package/dist/lib/auth/oauth/diagnose.mjs +0 -6
- package/dist/lib/auth/oauth/diagnose.mjs.map +1 -1
- package/dist/lib/auth/oauth/diagnostics.mjs +0 -6
- package/dist/lib/auth/oauth/diagnostics.mjs.map +1 -1
- package/dist/lib/auth/oauth/discovery.mjs +0 -6
- package/dist/lib/auth/oauth/discovery.mjs.map +1 -1
- package/dist/lib/auth/oauth/file-storage.mjs +0 -6
- package/dist/lib/auth/oauth/file-storage.mjs.map +1 -1
- package/dist/lib/auth/oauth/index.mjs +0 -6
- package/dist/lib/auth/oauth/index.mjs.map +1 -1
- package/dist/lib/auth/oauth/secret-resolver.mjs +0 -6
- package/dist/lib/auth/oauth/secret-resolver.mjs.map +1 -1
- package/dist/lib/auth/oauth/storage-registry.mjs +0 -6
- package/dist/lib/auth/oauth/storage-registry.mjs.map +1 -1
- package/dist/lib/auth/oauth/types.mjs +0 -6
- package/dist/lib/auth/oauth/types.mjs.map +1 -1
- package/dist/lib/auth/oauth/web-flow.mjs +0 -6
- package/dist/lib/auth/oauth/web-flow.mjs.map +1 -1
- package/dist/lib/brand/index.mjs +0 -6
- package/dist/lib/brand/index.mjs.map +1 -1
- package/dist/lib/canonical-references/index.mjs +6 -7
- package/dist/lib/canonical-references/index.mjs.map +1 -1
- package/dist/lib/client/index.mjs +0 -6
- package/dist/lib/client/index.mjs.map +1 -1
- package/dist/lib/compliance/index.mjs +0 -6
- package/dist/lib/compliance/index.mjs.map +1 -1
- package/dist/lib/compliance-fixtures/index.mjs +0 -6
- package/dist/lib/compliance-fixtures/index.mjs.map +1 -1
- package/dist/lib/compliance-fixtures/test-authorization-server.mjs +0 -6
- package/dist/lib/compliance-fixtures/test-authorization-server.mjs.map +1 -1
- package/dist/lib/conformance/index.mjs +0 -6
- package/dist/lib/conformance/index.mjs.map +1 -1
- package/dist/lib/conformance/invariants/uniformError.mjs +0 -6
- package/dist/lib/conformance/invariants/uniformError.mjs.map +1 -1
- package/dist/lib/conformance/invariants/uniformErrorComparator.mjs +0 -6
- package/dist/lib/conformance/invariants/uniformErrorComparator.mjs.map +1 -1
- package/dist/lib/conformance/oracle.mjs +0 -6
- package/dist/lib/conformance/oracle.mjs.map +1 -1
- package/dist/lib/conformance/runConformance.mjs +0 -6
- package/dist/lib/conformance/runConformance.mjs.map +1 -1
- package/dist/lib/conformance/runners.mjs +0 -6
- package/dist/lib/conformance/runners.mjs.map +1 -1
- package/dist/lib/conformance/schemaArbitrary.mjs +0 -6
- package/dist/lib/conformance/schemaArbitrary.mjs.map +1 -1
- package/dist/lib/conformance/schemaLoader.mjs +5 -6
- package/dist/lib/conformance/schemaLoader.mjs.map +1 -1
- package/dist/lib/conformance/seeder.mjs +0 -6
- package/dist/lib/conformance/seeder.mjs.map +1 -1
- package/dist/lib/conformance/types.mjs +0 -6
- package/dist/lib/conformance/types.mjs.map +1 -1
- package/dist/lib/conformance/webhook.mjs +0 -6
- package/dist/lib/conformance/webhook.mjs.map +1 -1
- package/dist/lib/core/ADCPMultiAgentClient.mjs +0 -6
- package/dist/lib/core/ADCPMultiAgentClient.mjs.map +1 -1
- package/dist/lib/core/AgentClient.mjs +0 -6
- package/dist/lib/core/AgentClient.mjs.map +1 -1
- package/dist/lib/core/AsyncHandler.mjs +0 -6
- package/dist/lib/core/AsyncHandler.mjs.map +1 -1
- package/dist/lib/core/ConfigurationManager.mjs +0 -6
- package/dist/lib/core/ConfigurationManager.mjs.map +1 -1
- package/dist/lib/core/ConversationTypes.mjs +0 -6
- package/dist/lib/core/CreativeAgentClient.mjs +0 -6
- package/dist/lib/core/CreativeAgentClient.mjs.map +1 -1
- package/dist/lib/core/GovernanceMiddleware.mjs +0 -6
- package/dist/lib/core/GovernanceMiddleware.mjs.map +1 -1
- package/dist/lib/core/GovernanceTypes.mjs +0 -6
- package/dist/lib/core/GovernanceTypes.mjs.map +1 -1
- package/dist/lib/core/ProtocolResponseParser.mjs +0 -6
- package/dist/lib/core/ProtocolResponseParser.mjs.map +1 -1
- package/dist/lib/core/ResponseValidator.mjs +0 -6
- package/dist/lib/core/ResponseValidator.mjs.map +1 -1
- package/dist/lib/core/SingleAgentClient.mjs +0 -6
- package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
- package/dist/lib/core/TaskEventTypes.mjs +0 -6
- package/dist/lib/core/TaskEventTypes.mjs.map +1 -1
- package/dist/lib/core/TaskExecutor.mjs +0 -6
- package/dist/lib/core/TaskExecutor.mjs.map +1 -1
- package/dist/lib/core/match.mjs +0 -6
- package/dist/lib/core/match.mjs.map +1 -1
- package/dist/lib/core/task-status.mjs +0 -6
- package/dist/lib/core/task-status.mjs.map +1 -1
- package/dist/lib/core/webhook-url.mjs +0 -6
- package/dist/lib/core/webhook-url.mjs.map +1 -1
- package/dist/lib/discovery/adagents-redirects.mjs +0 -6
- package/dist/lib/discovery/adagents-redirects.mjs.map +1 -1
- package/dist/lib/discovery/agent-directory.mjs +0 -6
- package/dist/lib/discovery/agent-directory.mjs.map +1 -1
- package/dist/lib/discovery/inline-publisher-properties.mjs +0 -6
- package/dist/lib/discovery/inline-publisher-properties.mjs.map +1 -1
- package/dist/lib/discovery/network-consistency-checker.mjs +0 -6
- package/dist/lib/discovery/network-consistency-checker.mjs.map +1 -1
- package/dist/lib/discovery/property-crawler.mjs +0 -6
- package/dist/lib/discovery/property-crawler.mjs.map +1 -1
- package/dist/lib/discovery/property-index.mjs +0 -6
- package/dist/lib/discovery/property-index.mjs.map +1 -1
- package/dist/lib/discovery/publisher-property-selector.mjs +0 -6
- package/dist/lib/discovery/publisher-property-selector.mjs.map +1 -1
- package/dist/lib/discovery/resolve-agent-properties.mjs +0 -6
- package/dist/lib/discovery/resolve-agent-properties.mjs.map +1 -1
- package/dist/lib/discovery/types.mjs +0 -6
- package/dist/lib/discovery/validate-adagents.mjs +0 -6
- package/dist/lib/discovery/validate-adagents.mjs.map +1 -1
- package/dist/lib/enums.mjs +0 -6
- package/dist/lib/enums.mjs.map +1 -1
- package/dist/lib/errors/index.mjs +0 -6
- package/dist/lib/errors/index.mjs.map +1 -1
- package/dist/lib/express-mcp/index.mjs +0 -6
- package/dist/lib/express-mcp/index.mjs.map +1 -1
- package/dist/lib/governance/index.mjs +0 -6
- package/dist/lib/governance/index.mjs.map +1 -1
- package/dist/lib/handlers/types.mjs +0 -6
- package/dist/lib/handlers/types.mjs.map +1 -1
- package/dist/lib/index.mjs +0 -6
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/media-buy/available-actions.mjs +0 -6
- package/dist/lib/media-buy/available-actions.mjs.map +1 -1
- package/dist/lib/media-buy/index.mjs +0 -6
- package/dist/lib/media-buy/index.mjs.map +1 -1
- package/dist/lib/media-buy/preflight.mjs +0 -6
- package/dist/lib/media-buy/preflight.mjs.map +1 -1
- package/dist/lib/media-buy/property-policy.mjs +0 -6
- package/dist/lib/media-buy/property-policy.mjs.map +1 -1
- package/dist/lib/media-buy/types.mjs +0 -6
- package/dist/lib/media-buy/types.mjs.map +1 -1
- package/dist/lib/media-buy/update-fields.generated.mjs +0 -6
- package/dist/lib/media-buy/update-fields.generated.mjs.map +1 -1
- package/dist/lib/mock-server/creative-ad-server/seed-data.mjs +0 -6
- package/dist/lib/mock-server/creative-ad-server/seed-data.mjs.map +1 -1
- package/dist/lib/mock-server/creative-ad-server/server.mjs +0 -6
- package/dist/lib/mock-server/creative-ad-server/server.mjs.map +1 -1
- package/dist/lib/mock-server/creative-template/seed-data.mjs +0 -6
- package/dist/lib/mock-server/creative-template/seed-data.mjs.map +1 -1
- package/dist/lib/mock-server/creative-template/server.mjs +0 -6
- package/dist/lib/mock-server/creative-template/server.mjs.map +1 -1
- package/dist/lib/mock-server/index.mjs +0 -6
- package/dist/lib/mock-server/index.mjs.map +1 -1
- package/dist/lib/mock-server/sales-guaranteed/recipe.mjs +0 -6
- package/dist/lib/mock-server/sales-guaranteed/recipe.mjs.map +1 -1
- package/dist/lib/mock-server/sales-guaranteed/seed-data.mjs +0 -6
- package/dist/lib/mock-server/sales-guaranteed/seed-data.mjs.map +1 -1
- package/dist/lib/mock-server/sales-guaranteed/server.mjs +0 -6
- package/dist/lib/mock-server/sales-guaranteed/server.mjs.map +1 -1
- package/dist/lib/mock-server/sales-non-guaranteed/recipe.mjs +0 -6
- package/dist/lib/mock-server/sales-non-guaranteed/recipe.mjs.map +1 -1
- package/dist/lib/mock-server/sales-non-guaranteed/seed-data.mjs +0 -6
- package/dist/lib/mock-server/sales-non-guaranteed/seed-data.mjs.map +1 -1
- package/dist/lib/mock-server/sales-non-guaranteed/server.mjs +0 -6
- package/dist/lib/mock-server/sales-non-guaranteed/server.mjs.map +1 -1
- package/dist/lib/mock-server/sales-social/seed-data.mjs +0 -6
- package/dist/lib/mock-server/sales-social/seed-data.mjs.map +1 -1
- package/dist/lib/mock-server/sales-social/server.mjs +0 -6
- package/dist/lib/mock-server/sales-social/server.mjs.map +1 -1
- package/dist/lib/mock-server/scenario.mjs +0 -6
- package/dist/lib/mock-server/scenario.mjs.map +1 -1
- package/dist/lib/mock-server/signal-marketplace/seed-data.mjs +0 -6
- package/dist/lib/mock-server/signal-marketplace/seed-data.mjs.map +1 -1
- package/dist/lib/mock-server/signal-marketplace/server.mjs +0 -6
- package/dist/lib/mock-server/signal-marketplace/server.mjs.map +1 -1
- package/dist/lib/mock-server/sponsored-intelligence/seed-data.mjs +0 -6
- package/dist/lib/mock-server/sponsored-intelligence/seed-data.mjs.map +1 -1
- package/dist/lib/mock-server/sponsored-intelligence/server.mjs +0 -6
- package/dist/lib/mock-server/sponsored-intelligence/server.mjs.map +1 -1
- package/dist/lib/net/address-guards.mjs +0 -6
- package/dist/lib/net/address-guards.mjs.map +1 -1
- package/dist/lib/net/index.mjs +0 -6
- package/dist/lib/net/index.mjs.map +1 -1
- package/dist/lib/net/ssrf-fetch.mjs +0 -6
- package/dist/lib/net/ssrf-fetch.mjs.map +1 -1
- package/dist/lib/observability/index.mjs +0 -6
- package/dist/lib/observability/index.mjs.map +1 -1
- package/dist/lib/observability/tracing.mjs +6 -7
- package/dist/lib/observability/tracing.mjs.map +1 -1
- package/dist/lib/protocols/a2a.mjs +0 -6
- package/dist/lib/protocols/a2a.mjs.map +1 -1
- package/dist/lib/protocols/abort.mjs +0 -6
- package/dist/lib/protocols/abort.mjs.map +1 -1
- package/dist/lib/protocols/index.mjs +0 -6
- package/dist/lib/protocols/index.mjs.map +1 -1
- package/dist/lib/protocols/mcp-modern.mjs +0 -6
- package/dist/lib/protocols/mcp-modern.mjs.map +1 -1
- package/dist/lib/protocols/mcp-tasks.mjs +0 -6
- package/dist/lib/protocols/mcp-tasks.mjs.map +1 -1
- package/dist/lib/protocols/mcp.mjs +0 -6
- package/dist/lib/protocols/mcp.mjs.map +1 -1
- package/dist/lib/protocols/rawResponseCapture.mjs +0 -6
- package/dist/lib/protocols/rawResponseCapture.mjs.map +1 -1
- package/dist/lib/protocols/responseSizeLimit.mjs +0 -6
- package/dist/lib/protocols/responseSizeLimit.mjs.map +1 -1
- package/dist/lib/protocols/transportDiagnostics.mjs +0 -6
- package/dist/lib/protocols/transportDiagnostics.mjs.map +1 -1
- package/dist/lib/registry/cursor-store.mjs +0 -6
- package/dist/lib/registry/cursor-store.mjs.map +1 -1
- package/dist/lib/registry/feed-stream.mjs +0 -6
- package/dist/lib/registry/feed-stream.mjs.map +1 -1
- package/dist/lib/registry/index.mjs +0 -6
- package/dist/lib/registry/index.mjs.map +1 -1
- package/dist/lib/registry/property-registry.mjs +0 -6
- package/dist/lib/registry/property-registry.mjs.map +1 -1
- package/dist/lib/registry/sync.mjs +0 -6
- package/dist/lib/registry/sync.mjs.map +1 -1
- package/dist/lib/registry/types.generated.mjs +0 -6
- package/dist/lib/registry/types.mjs +0 -6
- package/dist/lib/schemas/index.mjs +0 -6
- package/dist/lib/schemas/index.mjs.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/a2a-adapter.mjs +0 -6
- package/dist/lib/server/a2a-adapter.mjs.map +1 -1
- package/dist/lib/server/account-mode.mjs +0 -6
- package/dist/lib/server/account-mode.mjs.map +1 -1
- package/dist/lib/server/adcp-server.mjs +0 -6
- package/dist/lib/server/adcp-server.mjs.map +1 -1
- package/dist/lib/server/auth-introspection.mjs +0 -6
- package/dist/lib/server/auth-introspection.mjs.map +1 -1
- package/dist/lib/server/auth-signature.mjs +0 -6
- package/dist/lib/server/auth-signature.mjs.map +1 -1
- package/dist/lib/server/auth.mjs +0 -6
- package/dist/lib/server/auth.mjs.map +1 -1
- package/dist/lib/server/create-adcp-server.mjs +0 -6
- package/dist/lib/server/create-adcp-server.mjs.map +1 -1
- package/dist/lib/server/credential-policy.mjs +0 -6
- package/dist/lib/server/credential-policy.mjs.map +1 -1
- package/dist/lib/server/ctx-metadata/backends/memory.mjs +0 -6
- package/dist/lib/server/ctx-metadata/backends/memory.mjs.map +1 -1
- package/dist/lib/server/ctx-metadata/backends/pg.mjs +0 -6
- package/dist/lib/server/ctx-metadata/backends/pg.mjs.map +1 -1
- package/dist/lib/server/ctx-metadata/backends/redis.mjs +0 -6
- package/dist/lib/server/ctx-metadata/backends/redis.mjs.map +1 -1
- package/dist/lib/server/ctx-metadata/index.mjs +0 -6
- package/dist/lib/server/ctx-metadata/index.mjs.map +1 -1
- package/dist/lib/server/ctx-metadata/store.mjs +0 -6
- package/dist/lib/server/ctx-metadata/store.mjs.map +1 -1
- package/dist/lib/server/ctx-metadata/wire-shape.mjs +0 -6
- package/dist/lib/server/ctx-metadata/wire-shape.mjs.map +1 -1
- package/dist/lib/server/decisioning/account.mjs +0 -6
- package/dist/lib/server/decisioning/account.mjs.map +1 -1
- package/dist/lib/server/decisioning/admin-router.mjs +0 -6
- package/dist/lib/server/decisioning/admin-router.mjs.map +1 -1
- package/dist/lib/server/decisioning/assembly-helpers.mjs +0 -6
- package/dist/lib/server/decisioning/assembly-helpers.mjs.map +1 -1
- package/dist/lib/server/decisioning/async-outcome.mjs +0 -6
- package/dist/lib/server/decisioning/async-outcome.mjs.map +1 -1
- package/dist/lib/server/decisioning/buyer-agent.mjs +0 -6
- package/dist/lib/server/decisioning/buyer-agent.mjs.map +1 -1
- package/dist/lib/server/decisioning/capabilities.mjs +0 -6
- package/dist/lib/server/decisioning/capabilities.mjs.map +1 -1
- package/dist/lib/server/decisioning/compose.mjs +0 -6
- package/dist/lib/server/decisioning/compose.mjs.map +1 -1
- package/dist/lib/server/decisioning/context.mjs +0 -6
- package/dist/lib/server/decisioning/errors-typed.mjs +0 -6
- package/dist/lib/server/decisioning/errors-typed.mjs.map +1 -1
- package/dist/lib/server/decisioning/helpers.mjs +0 -6
- package/dist/lib/server/decisioning/helpers.mjs.map +1 -1
- package/dist/lib/server/decisioning/index.mjs +0 -6
- package/dist/lib/server/decisioning/index.mjs.map +1 -1
- package/dist/lib/server/decisioning/list-helpers.mjs +0 -6
- package/dist/lib/server/decisioning/list-helpers.mjs.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.mjs +0 -6
- package/dist/lib/server/decisioning/manifest-helpers.mjs.map +1 -1
- package/dist/lib/server/decisioning/pagination.mjs +0 -6
- package/dist/lib/server/decisioning/platform-helpers.mjs +0 -6
- package/dist/lib/server/decisioning/platform-helpers.mjs.map +1 -1
- package/dist/lib/server/decisioning/platform.mjs +0 -6
- package/dist/lib/server/decisioning/proposal/dispatch.mjs +0 -6
- package/dist/lib/server/decisioning/proposal/dispatch.mjs.map +1 -1
- package/dist/lib/server/decisioning/proposal/index.mjs +0 -6
- package/dist/lib/server/decisioning/proposal/index.mjs.map +1 -1
- package/dist/lib/server/decisioning/proposal/lifecycle.mjs +0 -6
- package/dist/lib/server/decisioning/proposal/lifecycle.mjs.map +1 -1
- package/dist/lib/server/decisioning/proposal/mock-manager.mjs +0 -6
- package/dist/lib/server/decisioning/proposal/mock-manager.mjs.map +1 -1
- package/dist/lib/server/decisioning/proposal/store.mjs +0 -6
- package/dist/lib/server/decisioning/proposal/store.mjs.map +1 -1
- package/dist/lib/server/decisioning/proposal/types.mjs +0 -6
- package/dist/lib/server/decisioning/proposal/types.mjs.map +1 -1
- package/dist/lib/server/decisioning/resolve-presets.mjs +0 -6
- package/dist/lib/server/decisioning/resolve-presets.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.mjs +0 -6
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +0 -6
- package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/observed-modes.mjs +0 -6
- package/dist/lib/server/decisioning/runtime/observed-modes.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.mjs +0 -6
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/protocol-for-tool.mjs +0 -6
- package/dist/lib/server/decisioning/runtime/protocol-for-tool.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/task-registry.mjs +0 -6
- package/dist/lib/server/decisioning/runtime/task-registry.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.mjs +0 -6
- package/dist/lib/server/decisioning/runtime/to-context.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/validate-platform.mjs +0 -6
- package/dist/lib/server/decisioning/runtime/validate-platform.mjs.map +1 -1
- package/dist/lib/server/decisioning/specialisms/audiences.mjs +0 -6
- package/dist/lib/server/decisioning/specialisms/brand-rights.mjs +0 -6
- package/dist/lib/server/decisioning/specialisms/campaign-governance.mjs +0 -6
- package/dist/lib/server/decisioning/specialisms/content-standards.mjs +0 -6
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.mjs +0 -6
- package/dist/lib/server/decisioning/specialisms/creative.mjs +0 -6
- package/dist/lib/server/decisioning/specialisms/lists.mjs +0 -6
- package/dist/lib/server/decisioning/specialisms/sales.mjs +0 -6
- package/dist/lib/server/decisioning/specialisms/signals.mjs +0 -6
- package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.mjs +0 -6
- package/dist/lib/server/decisioning/start-time.mjs +0 -6
- package/dist/lib/server/decisioning/start-time.mjs.map +1 -1
- package/dist/lib/server/decisioning/status-changes.mjs +0 -6
- package/dist/lib/server/decisioning/status-changes.mjs.map +1 -1
- package/dist/lib/server/decisioning/status-mappers.mjs +0 -6
- package/dist/lib/server/decisioning/status-mappers.mjs.map +1 -1
- package/dist/lib/server/decisioning/tenant-registry.mjs +0 -6
- package/dist/lib/server/decisioning/tenant-registry.mjs.map +1 -1
- package/dist/lib/server/decisioning/tenant-store.mjs +0 -6
- package/dist/lib/server/decisioning/tenant-store.mjs.map +1 -1
- package/dist/lib/server/decisioning/validate-specialisms.mjs +0 -6
- package/dist/lib/server/decisioning/validate-specialisms.mjs.map +1 -1
- package/dist/lib/server/dynamic-registry.mjs +0 -6
- package/dist/lib/server/dynamic-registry.mjs.map +1 -1
- package/dist/lib/server/envelope-allowlist.mjs +0 -6
- package/dist/lib/server/envelope-allowlist.mjs.map +1 -1
- package/dist/lib/server/error-arm-tools.mjs +5 -6
- package/dist/lib/server/error-arm-tools.mjs.map +1 -1
- package/dist/lib/server/errors.mjs +0 -6
- package/dist/lib/server/errors.mjs.map +1 -1
- package/dist/lib/server/example-tld-guard.mjs +0 -6
- package/dist/lib/server/example-tld-guard.mjs.map +1 -1
- package/dist/lib/server/express-adapter.mjs +0 -6
- package/dist/lib/server/express-adapter.mjs.map +1 -1
- package/dist/lib/server/governance.mjs +0 -6
- package/dist/lib/server/governance.mjs.map +1 -1
- package/dist/lib/server/idempotency/backends/lazy.mjs +0 -6
- package/dist/lib/server/idempotency/backends/lazy.mjs.map +1 -1
- package/dist/lib/server/idempotency/backends/memory.mjs +0 -6
- package/dist/lib/server/idempotency/backends/memory.mjs.map +1 -1
- package/dist/lib/server/idempotency/backends/pg.mjs +0 -6
- package/dist/lib/server/idempotency/backends/pg.mjs.map +1 -1
- package/dist/lib/server/idempotency/backends/redis.mjs +0 -6
- package/dist/lib/server/idempotency/backends/redis.mjs.map +1 -1
- package/dist/lib/server/idempotency/index.mjs +0 -6
- package/dist/lib/server/idempotency/index.mjs.map +1 -1
- package/dist/lib/server/idempotency/store.mjs +0 -6
- package/dist/lib/server/idempotency/store.mjs.map +1 -1
- package/dist/lib/server/index.mjs +0 -6
- package/dist/lib/server/index.mjs.map +1 -1
- package/dist/lib/server/legacy/v5/index.mjs +0 -6
- package/dist/lib/server/legacy/v5/index.mjs.map +1 -1
- package/dist/lib/server/mcp-modern-server.mjs +0 -6
- package/dist/lib/server/mcp-modern-server.mjs.map +1 -1
- package/dist/lib/server/media-buy-actions.mjs +0 -6
- package/dist/lib/server/media-buy-actions.mjs.map +1 -1
- package/dist/lib/server/media-buy-helpers.mjs +0 -6
- package/dist/lib/server/media-buy-helpers.mjs.map +1 -1
- package/dist/lib/server/media-buy-store.mjs +0 -6
- package/dist/lib/server/media-buy-store.mjs.map +1 -1
- package/dist/lib/server/normalize-errors.mjs +0 -6
- package/dist/lib/server/normalize-errors.mjs.map +1 -1
- package/dist/lib/server/operational-platform.mjs +0 -6
- package/dist/lib/server/operational-platform.mjs.map +1 -1
- package/dist/lib/server/pick-safe-details.mjs +0 -6
- package/dist/lib/server/pick-safe-details.mjs.map +1 -1
- package/dist/lib/server/pin-and-bind-fetch.mjs +0 -6
- package/dist/lib/server/pin-and-bind-fetch.mjs.map +1 -1
- package/dist/lib/server/postgres-state-store.mjs +0 -6
- package/dist/lib/server/postgres-state-store.mjs.map +1 -1
- package/dist/lib/server/postgres-task-store.mjs +0 -6
- package/dist/lib/server/postgres-task-store.mjs.map +1 -1
- package/dist/lib/server/product-defaults.mjs +0 -6
- package/dist/lib/server/product-defaults.mjs.map +1 -1
- package/dist/lib/server/redact.mjs +0 -6
- package/dist/lib/server/redact.mjs.map +1 -1
- package/dist/lib/server/responses.mjs +0 -6
- package/dist/lib/server/responses.mjs.map +1 -1
- package/dist/lib/server/serve.mjs +0 -6
- package/dist/lib/server/serve.mjs.map +1 -1
- package/dist/lib/server/socket-mode/conformance-client.mjs +0 -6
- package/dist/lib/server/socket-mode/conformance-client.mjs.map +1 -1
- package/dist/lib/server/socket-mode/index.mjs +0 -6
- package/dist/lib/server/socket-mode/index.mjs.map +1 -1
- package/dist/lib/server/socket-mode/ws-transport.mjs +0 -6
- package/dist/lib/server/socket-mode/ws-transport.mjs.map +1 -1
- package/dist/lib/server/state-machine.mjs +0 -6
- package/dist/lib/server/state-machine.mjs.map +1 -1
- package/dist/lib/server/state-store.mjs +0 -6
- package/dist/lib/server/state-store.mjs.map +1 -1
- package/dist/lib/server/structured-serialize.mjs +0 -6
- package/dist/lib/server/structured-serialize.mjs.map +1 -1
- package/dist/lib/server/targeting-helpers.mjs +0 -6
- package/dist/lib/server/targeting-helpers.mjs.map +1 -1
- package/dist/lib/server/tasks.mjs +0 -6
- package/dist/lib/server/tasks.mjs.map +1 -1
- package/dist/lib/server/test-controller-bridge.mjs +0 -6
- package/dist/lib/server/test-controller-bridge.mjs.map +1 -1
- package/dist/lib/server/test-controller.mjs +0 -6
- package/dist/lib/server/test-controller.mjs.map +1 -1
- package/dist/lib/server/upstream-helpers.mjs +0 -6
- package/dist/lib/server/upstream-helpers.mjs.map +1 -1
- package/dist/lib/server/webhook-emitter.mjs +0 -6
- package/dist/lib/server/webhook-emitter.mjs.map +1 -1
- package/dist/lib/server/wire-safe.mjs +0 -6
- package/dist/lib/server/wire-safe.mjs.map +1 -1
- package/dist/lib/server/wire-spec-fields.generated.mjs +0 -6
- package/dist/lib/server/wire-spec-fields.generated.mjs.map +1 -1
- package/dist/lib/server/wrap-envelope.mjs +0 -6
- package/dist/lib/server/wrap-envelope.mjs.map +1 -1
- package/dist/lib/signing/agent-context.mjs +0 -6
- package/dist/lib/signing/agent-context.mjs.map +1 -1
- package/dist/lib/signing/agent-fetch.mjs +0 -6
- package/dist/lib/signing/agent-fetch.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/canonicalize.mjs +0 -6
- package/dist/lib/signing/agent-resolver/canonicalize.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/capabilities-types.mjs +0 -6
- package/dist/lib/signing/agent-resolver/capabilities-types.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/consistency.mjs +0 -6
- package/dist/lib/signing/agent-resolver/consistency.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/errors.mjs +0 -6
- package/dist/lib/signing/agent-resolver/errors.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/etld.mjs +0 -6
- package/dist/lib/signing/agent-resolver/etld.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/fetch-helpers.mjs +0 -6
- package/dist/lib/signing/agent-resolver/fetch-helpers.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/index.mjs +0 -6
- package/dist/lib/signing/agent-resolver/index.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/jwks-set.mjs +0 -6
- package/dist/lib/signing/agent-resolver/jwks-set.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/resolve-agent.mjs +0 -6
- package/dist/lib/signing/agent-resolver/resolve-agent.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/select-agent.mjs +0 -6
- package/dist/lib/signing/agent-resolver/select-agent.mjs.map +1 -1
- package/dist/lib/signing/agent-resolver/strict-json.mjs +0 -6
- package/dist/lib/signing/agent-resolver/strict-json.mjs.map +1 -1
- package/dist/lib/signing/brand-jwks.mjs +0 -6
- package/dist/lib/signing/brand-jwks.mjs.map +1 -1
- package/dist/lib/signing/canonicalize.mjs +0 -6
- package/dist/lib/signing/canonicalize.mjs.map +1 -1
- package/dist/lib/signing/capability-cache.mjs +0 -6
- package/dist/lib/signing/capability-cache.mjs.map +1 -1
- package/dist/lib/signing/capability-priming.mjs +0 -6
- package/dist/lib/signing/capability-priming.mjs.map +1 -1
- package/dist/lib/signing/client.mjs +0 -6
- package/dist/lib/signing/client.mjs.map +1 -1
- package/dist/lib/signing/content-digest.mjs +0 -6
- package/dist/lib/signing/content-digest.mjs.map +1 -1
- package/dist/lib/signing/crypto.mjs +0 -6
- package/dist/lib/signing/crypto.mjs.map +1 -1
- package/dist/lib/signing/ecdsa-encoding.mjs +0 -6
- package/dist/lib/signing/ecdsa-encoding.mjs.map +1 -1
- package/dist/lib/signing/errors.mjs +0 -6
- package/dist/lib/signing/errors.mjs.map +1 -1
- package/dist/lib/signing/fetch-async.mjs +0 -6
- package/dist/lib/signing/fetch-async.mjs.map +1 -1
- package/dist/lib/signing/fetch.mjs +0 -6
- package/dist/lib/signing/fetch.mjs.map +1 -1
- package/dist/lib/signing/index.mjs +0 -6
- package/dist/lib/signing/index.mjs.map +1 -1
- package/dist/lib/signing/jwks-helpers.mjs +0 -6
- package/dist/lib/signing/jwks-helpers.mjs.map +1 -1
- package/dist/lib/signing/jwks-https.mjs +0 -6
- package/dist/lib/signing/jwks-https.mjs.map +1 -1
- package/dist/lib/signing/jwks.mjs +0 -6
- package/dist/lib/signing/jwks.mjs.map +1 -1
- package/dist/lib/signing/middleware.mjs +0 -6
- package/dist/lib/signing/middleware.mjs.map +1 -1
- package/dist/lib/signing/parser.mjs +0 -6
- package/dist/lib/signing/parser.mjs.map +1 -1
- package/dist/lib/signing/postgres-replay-store.mjs +0 -6
- package/dist/lib/signing/postgres-replay-store.mjs.map +1 -1
- package/dist/lib/signing/protocol-response.mjs +0 -6
- package/dist/lib/signing/protocol-response.mjs.map +1 -1
- package/dist/lib/signing/provider.mjs +0 -6
- package/dist/lib/signing/redis-replay-store.mjs +0 -6
- package/dist/lib/signing/redis-replay-store.mjs.map +1 -1
- package/dist/lib/signing/replay.mjs +0 -6
- package/dist/lib/signing/replay.mjs.map +1 -1
- package/dist/lib/signing/request-context.mjs +0 -6
- package/dist/lib/signing/request-context.mjs.map +1 -1
- package/dist/lib/signing/revocation-https.mjs +0 -6
- package/dist/lib/signing/revocation-https.mjs.map +1 -1
- package/dist/lib/signing/revocation.mjs +0 -6
- package/dist/lib/signing/revocation.mjs.map +1 -1
- package/dist/lib/signing/server.mjs +0 -6
- package/dist/lib/signing/server.mjs.map +1 -1
- package/dist/lib/signing/signer-async.mjs +0 -6
- package/dist/lib/signing/signer-async.mjs.map +1 -1
- package/dist/lib/signing/signer.mjs +0 -6
- package/dist/lib/signing/signer.mjs.map +1 -1
- package/dist/lib/signing/testing.mjs +0 -6
- package/dist/lib/signing/testing.mjs.map +1 -1
- package/dist/lib/signing/types.mjs +0 -6
- package/dist/lib/signing/types.mjs.map +1 -1
- package/dist/lib/signing/verifier.mjs +0 -6
- package/dist/lib/signing/verifier.mjs.map +1 -1
- package/dist/lib/signing/webhook-auth-detection.mjs +0 -6
- package/dist/lib/signing/webhook-auth-detection.mjs.map +1 -1
- package/dist/lib/signing/webhook-verifier.mjs +0 -6
- package/dist/lib/signing/webhook-verifier.mjs.map +1 -1
- package/dist/lib/storage/MemoryStorage.mjs +0 -6
- package/dist/lib/storage/MemoryStorage.mjs.map +1 -1
- package/dist/lib/storage/interfaces.mjs +0 -6
- package/dist/lib/substitution/encoder/SubstitutionEncoder.mjs +0 -6
- package/dist/lib/substitution/encoder/SubstitutionEncoder.mjs.map +1 -1
- package/dist/lib/substitution/encoder/index.mjs +0 -6
- package/dist/lib/substitution/encoder/index.mjs.map +1 -1
- package/dist/lib/substitution/index.mjs +0 -6
- package/dist/lib/substitution/index.mjs.map +1 -1
- package/dist/lib/substitution/observer/SubstitutionObserver.mjs +0 -6
- package/dist/lib/substitution/observer/SubstitutionObserver.mjs.map +1 -1
- package/dist/lib/substitution/observer/alignment.mjs +0 -6
- package/dist/lib/substitution/observer/alignment.mjs.map +1 -1
- package/dist/lib/substitution/observer/assertions.mjs +0 -6
- package/dist/lib/substitution/observer/assertions.mjs.map +1 -1
- package/dist/lib/substitution/observer/html-parser.mjs +0 -6
- package/dist/lib/substitution/observer/html-parser.mjs.map +1 -1
- package/dist/lib/substitution/observer/index.mjs +0 -6
- package/dist/lib/substitution/observer/index.mjs.map +1 -1
- package/dist/lib/substitution/observer/ssrf.mjs +0 -6
- package/dist/lib/substitution/observer/ssrf.mjs.map +1 -1
- package/dist/lib/substitution/rfc3986.mjs +0 -6
- package/dist/lib/substitution/rfc3986.mjs.map +1 -1
- package/dist/lib/substitution/translate.mjs +0 -6
- package/dist/lib/substitution/translate.mjs.map +1 -1
- package/dist/lib/substitution/types.mjs +0 -6
- package/dist/lib/substitution/vectors.mjs +0 -6
- package/dist/lib/substitution/vectors.mjs.map +1 -1
- package/dist/lib/testing/agent-tester.mjs +0 -6
- package/dist/lib/testing/agent-tester.mjs.map +1 -1
- package/dist/lib/testing/client.mjs +0 -6
- package/dist/lib/testing/client.mjs.map +1 -1
- package/dist/lib/testing/compliance/briefs.mjs +0 -6
- package/dist/lib/testing/compliance/briefs.mjs.map +1 -1
- package/dist/lib/testing/compliance/comply.mjs +0 -6
- package/dist/lib/testing/compliance/comply.mjs.map +1 -1
- package/dist/lib/testing/compliance/index.mjs +0 -6
- package/dist/lib/testing/compliance/index.mjs.map +1 -1
- package/dist/lib/testing/compliance/spec-conformance.mjs +0 -6
- package/dist/lib/testing/compliance/spec-conformance.mjs.map +1 -1
- package/dist/lib/testing/compliance/storyboard-tracks.mjs +0 -6
- package/dist/lib/testing/compliance/storyboard-tracks.mjs.map +1 -1
- package/dist/lib/testing/compliance/summary.mjs +0 -6
- package/dist/lib/testing/compliance/summary.mjs.map +1 -1
- package/dist/lib/testing/compliance/types.mjs +0 -6
- package/dist/lib/testing/comply-controller.mjs +0 -6
- package/dist/lib/testing/comply-controller.mjs.map +1 -1
- package/dist/lib/testing/controller-assertions.mjs +0 -6
- package/dist/lib/testing/controller-assertions.mjs.map +1 -1
- package/dist/lib/testing/formatter.mjs +0 -6
- package/dist/lib/testing/formatter.mjs.map +1 -1
- package/dist/lib/testing/index.mjs +0 -6
- package/dist/lib/testing/index.mjs.map +1 -1
- package/dist/lib/testing/local-agent-runner.mjs +0 -6
- package/dist/lib/testing/local-agent-runner.mjs.map +1 -1
- package/dist/lib/testing/orchestrator.mjs +0 -6
- package/dist/lib/testing/orchestrator.mjs.map +1 -1
- package/dist/lib/testing/personas/index.mjs +0 -6
- package/dist/lib/testing/personas/index.mjs.map +1 -1
- package/dist/lib/testing/scenarios/brand-rights.mjs +0 -6
- package/dist/lib/testing/scenarios/brand-rights.mjs.map +1 -1
- package/dist/lib/testing/scenarios/capabilities.mjs +0 -6
- package/dist/lib/testing/scenarios/capabilities.mjs.map +1 -1
- package/dist/lib/testing/scenarios/creative.mjs +0 -6
- package/dist/lib/testing/scenarios/creative.mjs.map +1 -1
- package/dist/lib/testing/scenarios/deterministic.mjs +0 -6
- package/dist/lib/testing/scenarios/deterministic.mjs.map +1 -1
- package/dist/lib/testing/scenarios/discovery.mjs +0 -6
- package/dist/lib/testing/scenarios/discovery.mjs.map +1 -1
- package/dist/lib/testing/scenarios/edge-cases.mjs +0 -6
- package/dist/lib/testing/scenarios/edge-cases.mjs.map +1 -1
- package/dist/lib/testing/scenarios/error-compliance.mjs +0 -6
- package/dist/lib/testing/scenarios/error-compliance.mjs.map +1 -1
- package/dist/lib/testing/scenarios/governance.mjs +0 -6
- package/dist/lib/testing/scenarios/governance.mjs.map +1 -1
- package/dist/lib/testing/scenarios/health.mjs +0 -6
- package/dist/lib/testing/scenarios/health.mjs.map +1 -1
- package/dist/lib/testing/scenarios/index.mjs +0 -6
- package/dist/lib/testing/scenarios/index.mjs.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.mjs +0 -6
- package/dist/lib/testing/scenarios/media-buy.mjs.map +1 -1
- package/dist/lib/testing/scenarios/schema-compliance.mjs +0 -6
- package/dist/lib/testing/scenarios/schema-compliance.mjs.map +1 -1
- package/dist/lib/testing/scenarios/signals.mjs +0 -6
- package/dist/lib/testing/scenarios/signals.mjs.map +1 -1
- package/dist/lib/testing/scenarios/sponsored-intelligence.mjs +0 -6
- package/dist/lib/testing/scenarios/sponsored-intelligence.mjs.map +1 -1
- package/dist/lib/testing/scenarios/trusted-match.mjs +0 -6
- package/dist/lib/testing/scenarios/trusted-match.mjs.map +1 -1
- package/dist/lib/testing/seed-merge.mjs +0 -6
- package/dist/lib/testing/seed-merge.mjs.map +1 -1
- package/dist/lib/testing/storyboard/agent-routing.mjs +0 -6
- package/dist/lib/testing/storyboard/agent-routing.mjs.map +1 -1
- package/dist/lib/testing/storyboard/assertions.mjs +0 -6
- package/dist/lib/testing/storyboard/assertions.mjs.map +1 -1
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs +0 -6
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs.map +1 -1
- package/dist/lib/testing/storyboard/compliance.mjs +5 -6
- package/dist/lib/testing/storyboard/compliance.mjs.map +1 -1
- package/dist/lib/testing/storyboard/context.mjs +0 -6
- package/dist/lib/testing/storyboard/context.mjs.map +1 -1
- package/dist/lib/testing/storyboard/default-invariants.mjs +0 -6
- package/dist/lib/testing/storyboard/default-invariants.mjs.map +1 -1
- package/dist/lib/testing/storyboard/index.mjs +0 -6
- package/dist/lib/testing/storyboard/index.mjs.map +1 -1
- package/dist/lib/testing/storyboard/junit.mjs +0 -6
- package/dist/lib/testing/storyboard/junit.mjs.map +1 -1
- package/dist/lib/testing/storyboard/loader.mjs +0 -6
- package/dist/lib/testing/storyboard/loader.mjs.map +1 -1
- package/dist/lib/testing/storyboard/parallel-dispatch.mjs +0 -6
- package/dist/lib/testing/storyboard/parallel-dispatch.mjs.map +1 -1
- package/dist/lib/testing/storyboard/path.mjs +0 -6
- package/dist/lib/testing/storyboard/path.mjs.map +1 -1
- package/dist/lib/testing/storyboard/probes.mjs +0 -6
- package/dist/lib/testing/storyboard/probes.mjs.map +1 -1
- package/dist/lib/testing/storyboard/rate-limit-trip.mjs +0 -6
- package/dist/lib/testing/storyboard/rate-limit-trip.mjs.map +1 -1
- package/dist/lib/testing/storyboard/rejection-hints.mjs +0 -6
- package/dist/lib/testing/storyboard/rejection-hints.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.mjs +0 -6
- package/dist/lib/testing/storyboard/request-builder.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-signing/builder.mjs +0 -6
- package/dist/lib/testing/storyboard/request-signing/builder.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-signing/grader.mjs +0 -6
- package/dist/lib/testing/storyboard/request-signing/grader.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-signing/index.mjs +0 -6
- package/dist/lib/testing/storyboard/request-signing/index.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-signing/probe-dispatch.mjs +0 -6
- package/dist/lib/testing/storyboard/request-signing/probe-dispatch.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-signing/probe.mjs +0 -6
- package/dist/lib/testing/storyboard/request-signing/probe.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-signing/synthesize.mjs +0 -6
- package/dist/lib/testing/storyboard/request-signing/synthesize.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-signing/test-kit.mjs +0 -6
- package/dist/lib/testing/storyboard/request-signing/test-kit.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-signing/types.mjs +0 -6
- package/dist/lib/testing/storyboard/request-signing/types.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +0 -6
- package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs.map +1 -1
- package/dist/lib/testing/storyboard/runner.mjs +0 -6
- package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
- package/dist/lib/testing/storyboard/sandbox-entities.mjs +0 -6
- package/dist/lib/testing/storyboard/sandbox-entities.mjs.map +1 -1
- package/dist/lib/testing/storyboard/seeding.mjs +0 -6
- package/dist/lib/testing/storyboard/seeding.mjs.map +1 -1
- package/dist/lib/testing/storyboard/shape-drift-hints.mjs +0 -6
- package/dist/lib/testing/storyboard/shape-drift-hints.mjs.map +1 -1
- package/dist/lib/testing/storyboard/signer-grader/grader.mjs +0 -6
- package/dist/lib/testing/storyboard/signer-grader/grader.mjs.map +1 -1
- package/dist/lib/testing/storyboard/signer-grader/index.mjs +0 -6
- package/dist/lib/testing/storyboard/signer-grader/index.mjs.map +1 -1
- package/dist/lib/testing/storyboard/signer-grader/types.mjs +0 -6
- package/dist/lib/testing/storyboard/strict-validation-hints.mjs +0 -6
- package/dist/lib/testing/storyboard/strict-validation-hints.mjs.map +1 -1
- package/dist/lib/testing/storyboard/task-map.mjs +0 -6
- package/dist/lib/testing/storyboard/task-map.mjs.map +1 -1
- package/dist/lib/testing/storyboard/test-kit.mjs +0 -6
- package/dist/lib/testing/storyboard/test-kit.mjs.map +1 -1
- package/dist/lib/testing/storyboard/types.mjs +0 -6
- package/dist/lib/testing/storyboard/types.mjs.map +1 -1
- package/dist/lib/testing/storyboard/validations.mjs +0 -6
- package/dist/lib/testing/storyboard/validations.mjs.map +1 -1
- package/dist/lib/testing/storyboard/webhook-assertions.mjs +0 -6
- package/dist/lib/testing/storyboard/webhook-assertions.mjs.map +1 -1
- package/dist/lib/testing/storyboard/webhook-receiver.mjs +0 -6
- package/dist/lib/testing/storyboard/webhook-receiver.mjs.map +1 -1
- package/dist/lib/testing/stubs/governance-agent-stub.mjs +0 -6
- package/dist/lib/testing/stubs/governance-agent-stub.mjs.map +1 -1
- package/dist/lib/testing/stubs/index.mjs +0 -6
- package/dist/lib/testing/stubs/index.mjs.map +1 -1
- package/dist/lib/testing/test-controller.mjs +0 -6
- package/dist/lib/testing/test-controller.mjs.map +1 -1
- package/dist/lib/testing/test-helpers.mjs +0 -6
- package/dist/lib/testing/test-helpers.mjs.map +1 -1
- package/dist/lib/testing/types.mjs +0 -6
- package/dist/lib/types/adcp.mjs +0 -6
- package/dist/lib/types/adcp.mjs.map +1 -1
- package/dist/lib/types/asset-instances.mjs +0 -6
- package/dist/lib/types/compat.mjs +0 -6
- package/dist/lib/types/compat.mjs.map +1 -1
- package/dist/lib/types/core.generated.mjs +0 -6
- package/dist/lib/types/enums.generated.mjs +0 -6
- package/dist/lib/types/enums.generated.mjs.map +1 -1
- package/dist/lib/types/error-codes.mjs +0 -6
- package/dist/lib/types/error-codes.mjs.map +1 -1
- package/dist/lib/types/error-details.aliases.mjs +0 -6
- package/dist/lib/types/error-details.aliases.mjs.map +1 -1
- package/dist/lib/types/format-asset-slots.mjs +0 -6
- package/dist/lib/types/forward-compat-error-codes.mjs +0 -6
- package/dist/lib/types/forward-compat-error-codes.mjs.map +1 -1
- package/dist/lib/types/index.mjs +0 -6
- package/dist/lib/types/index.mjs.map +1 -1
- package/dist/lib/types/inline-enums.aliases.mjs +0 -6
- package/dist/lib/types/inline-enums.aliases.mjs.map +1 -1
- package/dist/lib/types/inline-enums.generated.mjs +0 -6
- package/dist/lib/types/inline-enums.generated.mjs.map +1 -1
- package/dist/lib/types/manifest.generated.mjs +0 -6
- package/dist/lib/types/manifest.generated.mjs.map +1 -1
- package/dist/lib/types/schemas.generated.mjs +0 -6
- package/dist/lib/types/schemas.generated.mjs.map +1 -1
- package/dist/lib/types/server-payload-aliases.mjs +0 -6
- package/dist/lib/types/server-payload.mjs +0 -6
- package/dist/lib/types/sync-rows.mjs +0 -6
- package/dist/lib/types/tools.generated.mjs +0 -6
- package/dist/lib/types/v2-5/index.mjs +0 -6
- package/dist/lib/types/v2-5/index.mjs.map +1 -1
- package/dist/lib/types/v2-5/tools.generated.mjs +0 -6
- package/dist/lib/types/v3-1-beta/index.mjs +0 -6
- package/dist/lib/types/v3-1-beta/index.mjs.map +1 -1
- package/dist/lib/types/v3-1-beta/tools.generated.mjs +0 -6
- package/dist/lib/types/wellknown-schemas.generated.mjs +0 -6
- package/dist/lib/types/wellknown-schemas.generated.mjs.map +1 -1
- package/dist/lib/upstream-recorder/constants.mjs +0 -6
- package/dist/lib/upstream-recorder/constants.mjs.map +1 -1
- package/dist/lib/upstream-recorder/index.mjs +0 -6
- package/dist/lib/upstream-recorder/index.mjs.map +1 -1
- package/dist/lib/upstream-recorder/recorder.mjs +0 -6
- package/dist/lib/upstream-recorder/recorder.mjs.map +1 -1
- package/dist/lib/upstream-recorder/types.mjs +0 -6
- package/dist/lib/upstream-recorder/types.mjs.map +1 -1
- package/dist/lib/utils/a2a-artifacts.mjs +0 -6
- package/dist/lib/utils/a2a-artifacts.mjs.map +1 -1
- package/dist/lib/utils/a2a-discovery.mjs +0 -6
- package/dist/lib/utils/a2a-discovery.mjs.map +1 -1
- package/dist/lib/utils/activation-key-builders.mjs +0 -6
- package/dist/lib/utils/activation-key-builders.mjs.map +1 -1
- package/dist/lib/utils/adcp-version-config.mjs +0 -6
- package/dist/lib/utils/adcp-version-config.mjs.map +1 -1
- package/dist/lib/utils/asset-builders.mjs +0 -6
- package/dist/lib/utils/asset-builders.mjs.map +1 -1
- package/dist/lib/utils/build-creative-return-builders.mjs +0 -6
- package/dist/lib/utils/build-creative-return-builders.mjs.map +1 -1
- package/dist/lib/utils/buyer-retry-policy.mjs +0 -6
- package/dist/lib/utils/buyer-retry-policy.mjs.map +1 -1
- package/dist/lib/utils/capabilities.mjs +0 -6
- package/dist/lib/utils/capabilities.mjs.map +1 -1
- package/dist/lib/utils/capability-rollups.mjs +0 -6
- package/dist/lib/utils/capability-rollups.mjs.map +1 -1
- package/dist/lib/utils/creative-adapter.mjs +0 -6
- package/dist/lib/utils/creative-adapter.mjs.map +1 -1
- package/dist/lib/utils/creative-delivery.mjs +0 -6
- package/dist/lib/utils/creative-delivery.mjs.map +1 -1
- package/dist/lib/utils/deprecation.mjs +0 -6
- package/dist/lib/utils/deprecation.mjs.map +1 -1
- package/dist/lib/utils/envelope-status-compat.mjs +0 -6
- package/dist/lib/utils/envelope-status-compat.mjs.map +1 -1
- package/dist/lib/utils/error-extraction.mjs +0 -6
- package/dist/lib/utils/error-extraction.mjs.map +1 -1
- package/dist/lib/utils/extract-result.mjs +0 -6
- package/dist/lib/utils/extract-result.mjs.map +1 -1
- package/dist/lib/utils/format-asset-slot-builders.mjs +0 -6
- package/dist/lib/utils/format-asset-slot-builders.mjs.map +1 -1
- package/dist/lib/utils/format-assets.mjs +0 -6
- package/dist/lib/utils/format-assets.mjs.map +1 -1
- package/dist/lib/utils/format-render-builders.mjs +0 -6
- package/dist/lib/utils/format-render-builders.mjs.map +1 -1
- package/dist/lib/utils/format-renders.mjs +0 -6
- package/dist/lib/utils/format-renders.mjs.map +1 -1
- package/dist/lib/utils/get-products-cache-scope.mjs +0 -6
- package/dist/lib/utils/get-products-cache-scope.mjs.map +1 -1
- package/dist/lib/utils/glob.mjs +0 -6
- package/dist/lib/utils/glob.mjs.map +1 -1
- package/dist/lib/utils/global-async-local-storage.mjs +0 -6
- package/dist/lib/utils/global-async-local-storage.mjs.map +1 -1
- package/dist/lib/utils/idempotency.mjs +0 -6
- package/dist/lib/utils/idempotency.mjs.map +1 -1
- package/dist/lib/utils/index.mjs +0 -6
- package/dist/lib/utils/index.mjs.map +1 -1
- package/dist/lib/utils/jcs.mjs +0 -6
- package/dist/lib/utils/jcs.mjs.map +1 -1
- package/dist/lib/utils/json-depth.mjs +0 -6
- package/dist/lib/utils/json-depth.mjs.map +1 -1
- package/dist/lib/utils/logger.mjs +0 -6
- package/dist/lib/utils/logger.mjs.map +1 -1
- package/dist/lib/utils/media-buy-delivery-notification-builders.mjs +0 -6
- package/dist/lib/utils/media-buy-delivery-notification-builders.mjs.map +1 -1
- package/dist/lib/utils/media-buy-status.mjs +0 -6
- package/dist/lib/utils/media-buy-status.mjs.map +1 -1
- package/dist/lib/utils/pagination.mjs +0 -6
- package/dist/lib/utils/pagination.mjs.map +1 -1
- package/dist/lib/utils/preview-creative-builders.mjs +0 -6
- package/dist/lib/utils/preview-creative-builders.mjs.map +1 -1
- package/dist/lib/utils/preview-normalizer.mjs +0 -6
- package/dist/lib/utils/preview-normalizer.mjs.map +1 -1
- package/dist/lib/utils/preview-utils.mjs +0 -6
- package/dist/lib/utils/preview-utils.mjs.map +1 -1
- package/dist/lib/utils/pricing-adapter.mjs +0 -6
- package/dist/lib/utils/pricing-adapter.mjs.map +1 -1
- package/dist/lib/utils/probe-policy.mjs +0 -6
- package/dist/lib/utils/probe-policy.mjs.map +1 -1
- package/dist/lib/utils/protocol-detection.mjs +0 -6
- package/dist/lib/utils/protocol-detection.mjs.map +1 -1
- package/dist/lib/utils/redact-secrets.mjs +0 -6
- package/dist/lib/utils/redact-secrets.mjs.map +1 -1
- package/dist/lib/utils/redis-default-prefix-warn.mjs +0 -6
- package/dist/lib/utils/redis-default-prefix-warn.mjs.map +1 -1
- package/dist/lib/utils/render-builders.mjs +0 -6
- package/dist/lib/utils/render-builders.mjs.map +1 -1
- package/dist/lib/utils/request-normalizer.mjs +0 -6
- package/dist/lib/utils/request-normalizer.mjs.map +1 -1
- package/dist/lib/utils/response-schemas.mjs +0 -6
- package/dist/lib/utils/response-schemas.mjs.map +1 -1
- package/dist/lib/utils/response-unwrapper.mjs +0 -6
- package/dist/lib/utils/response-unwrapper.mjs.map +1 -1
- package/dist/lib/utils/retry.mjs +0 -6
- package/dist/lib/utils/retry.mjs.map +1 -1
- package/dist/lib/utils/signal-discovery-helpers.mjs +0 -6
- package/dist/lib/utils/signal-discovery-helpers.mjs.map +1 -1
- package/dist/lib/utils/signal-id-builders.mjs +0 -6
- package/dist/lib/utils/signal-id-builders.mjs.map +1 -1
- package/dist/lib/utils/sync-creatives-adapter.mjs +0 -6
- package/dist/lib/utils/sync-creatives-adapter.mjs.map +1 -1
- package/dist/lib/utils/task-state.mjs +0 -6
- package/dist/lib/utils/task-state.mjs.map +1 -1
- package/dist/lib/utils/tool-request-schemas.mjs +0 -6
- package/dist/lib/utils/tool-request-schemas.mjs.map +1 -1
- package/dist/lib/utils/typeGuards.mjs +0 -6
- package/dist/lib/utils/typeGuards.mjs.map +1 -1
- package/dist/lib/utils/union-errors.mjs +0 -6
- package/dist/lib/utils/union-errors.mjs.map +1 -1
- package/dist/lib/utils/validate-user-agent.mjs +0 -6
- package/dist/lib/utils/validate-user-agent.mjs.map +1 -1
- package/dist/lib/v2/format-schema/fetch.mjs +0 -6
- package/dist/lib/v2/format-schema/fetch.mjs.map +1 -1
- package/dist/lib/v2/format-schema/index.mjs +0 -6
- package/dist/lib/v2/format-schema/index.mjs.map +1 -1
- package/dist/lib/v2/format-schema/regex-safety.mjs +0 -6
- package/dist/lib/v2/format-schema/regex-safety.mjs.map +1 -1
- package/dist/lib/v2/format-schema/resolver.mjs +7 -8
- package/dist/lib/v2/format-schema/resolver.mjs.map +1 -1
- package/dist/lib/v2/format-schema/sandbox-refs.mjs +0 -6
- package/dist/lib/v2/format-schema/sandbox-refs.mjs.map +1 -1
- package/dist/lib/v2/projection/augment-response.mjs +0 -6
- package/dist/lib/v2/projection/augment-response.mjs.map +1 -1
- package/dist/lib/v2/projection/builders.mjs +0 -6
- package/dist/lib/v2/projection/builders.mjs.map +1 -1
- package/dist/lib/v2/projection/cache-versions.mjs +0 -6
- package/dist/lib/v2/projection/cache-versions.mjs.map +1 -1
- package/dist/lib/v2/projection/canonical-properties.mjs +5 -6
- package/dist/lib/v2/projection/canonical-properties.mjs.map +1 -1
- package/dist/lib/v2/projection/catalog.mjs +5 -6
- package/dist/lib/v2/projection/catalog.mjs.map +1 -1
- package/dist/lib/v2/projection/constants.mjs +0 -6
- package/dist/lib/v2/projection/constants.mjs.map +1 -1
- package/dist/lib/v2/projection/index.mjs +0 -6
- package/dist/lib/v2/projection/index.mjs.map +1 -1
- package/dist/lib/v2/projection/registry.mjs +5 -6
- package/dist/lib/v2/projection/registry.mjs.map +1 -1
- package/dist/lib/v2/projection/types.mjs +0 -6
- package/dist/lib/v2/projection/v1-to-v2.mjs +0 -6
- package/dist/lib/v2/projection/v1-to-v2.mjs.map +1 -1
- package/dist/lib/v2/projection/v2-to-v1.mjs +0 -6
- package/dist/lib/v2/projection/v2-to-v1.mjs.map +1 -1
- package/dist/lib/v2/projection/write-side.mjs +0 -6
- package/dist/lib/v2/projection/write-side.mjs.map +1 -1
- package/dist/lib/v2/publisher-catalog/formats.mjs +0 -6
- package/dist/lib/v2/publisher-catalog/formats.mjs.map +1 -1
- package/dist/lib/v2/publisher-catalog/index.mjs +0 -6
- package/dist/lib/v2/publisher-catalog/index.mjs.map +1 -1
- package/dist/lib/validation/client-hooks.mjs +0 -6
- package/dist/lib/validation/client-hooks.mjs.map +1 -1
- package/dist/lib/validation/hints.mjs +0 -6
- package/dist/lib/validation/hints.mjs.map +1 -1
- package/dist/lib/validation/index.mjs +0 -6
- package/dist/lib/validation/index.mjs.map +1 -1
- package/dist/lib/validation/schema-errors.mjs +0 -6
- package/dist/lib/validation/schema-errors.mjs.map +1 -1
- package/dist/lib/validation/schema-loader.mjs +5 -6
- package/dist/lib/validation/schema-loader.mjs.map +1 -1
- package/dist/lib/validation/schema-validator.mjs +0 -6
- package/dist/lib/validation/schema-validator.mjs.map +1 -1
- package/dist/lib/validation/sync-creatives.mjs +0 -6
- package/dist/lib/validation/sync-creatives.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 -9
- package/dist/lib/version.mjs.map +1 -1
- package/dist/lib/webhooks/index.mjs +0 -6
- package/dist/lib/webhooks/index.mjs.map +1 -1
- package/dist/lib/wholesale-feed-sync/index.mjs +0 -6
- package/dist/lib/wholesale-feed-sync/index.mjs.map +1 -1
- package/dist/lib/wholesale-feed-sync/sync.mjs +0 -6
- package/dist/lib/wholesale-feed-sync/sync.mjs.map +1 -1
- package/dist/lib/wholesale-feed-sync/types.mjs +0 -6
- package/dist/lib/wholesale-feed-sync/webhook-notification.mjs +0 -6
- package/dist/lib/wholesale-feed-sync/webhook-notification.mjs.map +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/testing/agent-tester.ts"],"sourcesContent":["/**\n * AdCP Agent E2E Tester\n *\n * Provides comprehensive end-to-end testing of AdCP agents (sales, creative, signals).\n *\n * Features:\n * - Channel-aware testing (only tests features the agent supports)\n * - Sandbox mode for safe testing (real testing requires actual media buys)\n * - Comprehensive scenario coverage based on AdCP spec\n * - Schema validation via @adcp/sdk\n *\n * @example\n * ```typescript\n * import { testAgent, formatTestResults } from '@adcp/sdk/testing';\n *\n * const result = await testAgent(\n * 'https://test-agent.adcontextprotocol.org/mcp',\n * 'discovery',\n * { auth: { type: 'bearer', token: 'your-token' } }\n * );\n * console.log(formatTestResults(result));\n * ```\n */\n\n// Re-export types\nexport type {\n TestScenario,\n TestOptions,\n TestStepResult,\n AgentProfile,\n TestResult,\n SuiteResult,\n TaskResult,\n Logger,\n} from './types';\nexport type { TestClient } from './client';\n\n// Re-export client utilities\nexport { setAgentTesterLogger, getLogger, createTestClient, runStep } from './client';\n\n// Re-export formatter\nexport { formatTestResults, formatTestResultsJSON, formatTestResultsSummary } from './formatter';\n\n// Import scenarios\nimport {\n testHealthCheck,\n testDiscovery,\n testCreateMediaBuy,\n testFullSalesFlow,\n testReportingFlow,\n testCreativeSync,\n testCreativeInline,\n testCreativeReference,\n testCreativeFlow,\n testCreativeLifecycle,\n testSignalsFlow,\n testErrorHandling,\n testValidation,\n testPricingEdgeCases,\n testTemporalValidation,\n testBehaviorAnalysis,\n testResponseConsistency,\n // v3 scenarios\n testGovernancePropertyLists,\n testGovernanceContentStandards,\n testPropertyListFilters,\n testCampaignGovernance,\n testCampaignGovernanceDenied,\n testCampaignGovernanceConditions,\n testCampaignGovernanceDelivery,\n testSellerGovernanceContext,\n testSISessionLifecycle,\n testSIAvailability,\n testSIHandoff,\n testCapabilityDiscovery,\n testSyncAudiences,\n testSchemaCompliance,\n testErrorCodes,\n testErrorStructure,\n testErrorTransport,\n // State machine compliance\n testMediaBuyLifecycle,\n testTerminalStateEnforcement,\n testPackageLifecycle,\n // Deterministic state machine testing\n testCreativeStateMachine,\n testMediaBuyStateMachine,\n testAccountStateMachine,\n testSessionStateMachine,\n testDeliverySimulation,\n testBudgetSimulation,\n testControllerValidation,\n // Brand rights\n testBrandIdentity,\n testBrandRightsFlow,\n testCreativeApproval,\n} from './scenarios';\n\n// Import types\nimport type { TestScenario, TestOptions, TestResult, TestStepResult, AgentProfile } from './types';\nimport { getLogger } from './client';\n\n/**\n * Main entry point: Run a test scenario against an agent\n */\nexport async function testAgent(\n agentUrl: string,\n scenario: TestScenario,\n options: TestOptions = {}\n): Promise<TestResult> {\n const startTime = Date.now();\n let steps: TestStepResult[] = [];\n let profile: AgentProfile | undefined;\n const logger = getLogger();\n\n const effectiveOptions: TestOptions = {\n ...options,\n sandbox: options.sandbox !== false,\n test_session_id: options.test_session_id || `addie-test-${Date.now()}`,\n };\n\n logger.info({ agentUrl, scenario, options: effectiveOptions }, 'Starting agent test');\n\n try {\n let result: { steps: TestStepResult[]; profile?: AgentProfile };\n\n switch (scenario) {\n case 'health_check':\n steps = await testHealthCheck(agentUrl, effectiveOptions);\n break;\n\n case 'discovery':\n result = await testDiscovery(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'create_media_buy':\n result = await testCreateMediaBuy(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'full_sales_flow':\n result = await testFullSalesFlow(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'reporting_flow':\n result = await testReportingFlow(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_sync':\n result = await testCreativeSync(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_inline':\n result = await testCreativeInline(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_reference':\n result = await testCreativeReference(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'pricing_models':\n // Re-use pricing edge cases for now\n result = await testPricingEdgeCases(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_flow':\n result = await testCreativeFlow(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_lifecycle':\n result = await testCreativeLifecycle(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'signals_flow':\n result = await testSignalsFlow(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'error_handling':\n result = await testErrorHandling(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'validation':\n result = await testValidation(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'pricing_edge_cases':\n result = await testPricingEdgeCases(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'temporal_validation':\n result = await testTemporalValidation(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'behavior_analysis':\n result = await testBehaviorAnalysis(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'response_consistency':\n result = await testResponseConsistency(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // v3 Governance protocol scenarios\n case 'governance_property_lists':\n result = await testGovernancePropertyLists(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'governance_content_standards':\n result = await testGovernanceContentStandards(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'property_list_filters':\n result = await testPropertyListFilters(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // v3 Campaign governance scenarios\n case 'campaign_governance':\n result = await testCampaignGovernance(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'campaign_governance_denied':\n result = await testCampaignGovernanceDenied(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'campaign_governance_conditions':\n result = await testCampaignGovernanceConditions(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'campaign_governance_delivery':\n result = await testCampaignGovernanceDelivery(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'seller_governance_context':\n result = await testSellerGovernanceContext(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // v3 SI protocol scenarios\n case 'si_session_lifecycle':\n result = await testSISessionLifecycle(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'si_availability':\n result = await testSIAvailability(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'si_handoff':\n result = await testSIHandoff(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // v3 Capability discovery\n case 'capability_discovery':\n result = await testCapabilityDiscovery(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'sync_audiences':\n result = await testSyncAudiences(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'schema_compliance':\n result = await testSchemaCompliance(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'error_codes':\n result = await testErrorCodes(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'error_structure':\n result = await testErrorStructure(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'error_transport':\n result = await testErrorTransport(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // State machine compliance\n case 'media_buy_lifecycle':\n result = await testMediaBuyLifecycle(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'terminal_state_enforcement':\n result = await testTerminalStateEnforcement(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'package_lifecycle':\n result = await testPackageLifecycle(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // Deterministic state machine scenarios (require comply_test_controller)\n case 'deterministic_creative':\n result = await testCreativeStateMachine(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'deterministic_media_buy':\n result = await testMediaBuyStateMachine(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'deterministic_account':\n result = await testAccountStateMachine(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'deterministic_session':\n result = await testSessionStateMachine(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'deterministic_delivery':\n result = await testDeliverySimulation(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'deterministic_budget':\n result = await testBudgetSimulation(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'controller_validation':\n result = await testControllerValidation(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // Brand rights protocol\n case 'brand_identity':\n result = await testBrandIdentity(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'brand_rights_flow':\n result = await testBrandRightsFlow(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_approval':\n result = await testCreativeApproval(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n default:\n steps = [\n {\n step: 'Unknown scenario',\n passed: false,\n duration_ms: 0,\n error: `Unknown test scenario: ${scenario}`,\n },\n ];\n }\n } catch (error) {\n logger.error({ error, agentUrl, scenario }, 'Agent test failed with exception');\n steps.push({\n step: 'Test execution',\n passed: false,\n duration_ms: Date.now() - startTime,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n\n const totalDuration = Date.now() - startTime;\n const passedCount = steps.filter(s => s.passed).length;\n const failedCount = steps.filter(s => !s.passed).length;\n const overallPassed = failedCount === 0 && passedCount > 0;\n\n // Generate summary\n let summary: string;\n if (overallPassed) {\n summary = `All ${passedCount} test step(s) passed in ${totalDuration}ms`;\n } else if (passedCount === 0) {\n summary = `All ${failedCount} test step(s) failed`;\n } else {\n summary = `${passedCount} passed, ${failedCount} failed out of ${steps.length} step(s)`;\n }\n\n const testResult: TestResult = {\n agent_url: agentUrl,\n scenario,\n overall_passed: overallPassed,\n steps,\n summary,\n total_duration_ms: totalDuration,\n tested_at: new Date().toISOString(),\n agent_profile: profile,\n };\n\n logger.info({ agentUrl, scenario, overallPassed, passedCount, failedCount, totalDuration }, 'Agent test completed');\n\n return testResult;\n}\n\n// Re-export orchestrator\nexport {\n testAllScenarios,\n getApplicableScenarios,\n SCENARIO_REQUIREMENTS,\n DEFAULT_SCENARIOS,\n formatSuiteResults,\n formatSuiteResultsJSON,\n type OrchestratorOptions,\n} from './orchestrator';\n\n// Re-export individual scenarios for direct use\nexport {\n testHealthCheck,\n testDiscovery,\n testCreateMediaBuy,\n testFullSalesFlow,\n testReportingFlow,\n testCreativeSync,\n testCreativeInline,\n testCreativeFlow,\n testCreativeLifecycle,\n testSignalsFlow,\n testErrorHandling,\n testValidation,\n testPricingEdgeCases,\n testTemporalValidation,\n testBehaviorAnalysis,\n testResponseConsistency,\n // v3 scenarios\n testGovernancePropertyLists,\n testGovernanceContentStandards,\n testPropertyListFilters,\n testCampaignGovernance,\n testCampaignGovernanceDenied,\n testCampaignGovernanceConditions,\n testCampaignGovernanceDelivery,\n testSellerGovernanceContext,\n testSISessionLifecycle,\n testSIAvailability,\n testSIHandoff,\n testCapabilityDiscovery,\n testSyncAudiences,\n resolveAccountForMediaBuy,\n resolveAccountForAudiences,\n testSchemaCompliance,\n testErrorCodes,\n testErrorStructure,\n testErrorTransport,\n // State machine compliance\n testMediaBuyLifecycle,\n testTerminalStateEnforcement,\n testPackageLifecycle,\n // Deterministic state machine testing\n testCreativeStateMachine,\n testMediaBuyStateMachine,\n testAccountStateMachine,\n testSessionStateMachine,\n testDeliverySimulation,\n testBudgetSimulation,\n testControllerValidation,\n // Brand rights\n testBrandIdentity,\n testBrandRightsFlow,\n testCreativeApproval,\n hasBrandRightsTools,\n // v3 helpers\n hasGovernanceTools,\n hasCampaignGovernanceTools,\n hasSITools,\n likelySupportsV3,\n} from './scenarios';\n"],"mappings":";;;;;;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EACA,mBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,2BAAAC;AAAA,EAEA,+BAAAC;AAAA,EACA,kCAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,gCAAAC;AAAA,EACA,oCAAAC;AAAA,EACA,kCAAAC;AAAA,EACA,+BAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,qBAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA,wBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,sBAAAC;AAAA,EAEA,yBAAAC;AAAA,EACA,gCAAAC;AAAA,EACA,wBAAAC;AAAA,EAEA,4BAAAC;AAAA,EACA,4BAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,4BAAAC;AAAA,EAEA,qBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,wBAAAC;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["getLogger","testHealthCheck","testDiscovery","testCreateMediaBuy","testFullSalesFlow","testReportingFlow","testCreativeSync","testCreativeInline","testCreativeFlow","testCreativeLifecycle","testSignalsFlow","testErrorHandling","testValidation","testPricingEdgeCases","testTemporalValidation","testBehaviorAnalysis","testResponseConsistency","testGovernancePropertyLists","testGovernanceContentStandards","testPropertyListFilters","testCampaignGovernance","testCampaignGovernanceDenied","testCampaignGovernanceConditions","testCampaignGovernanceDelivery","testSellerGovernanceContext","testSISessionLifecycle","testSIAvailability","testSIHandoff","testCapabilityDiscovery","testSyncAudiences","testSchemaCompliance","testErrorCodes","testErrorStructure","testErrorTransport","testMediaBuyLifecycle","testTerminalStateEnforcement","testPackageLifecycle","testCreativeStateMachine","testMediaBuyStateMachine","testAccountStateMachine","testSessionStateMachine","testDeliverySimulation","testBudgetSimulation","testControllerValidation","testBrandIdentity","testBrandRightsFlow","testCreativeApproval"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/testing/agent-tester.ts"],"sourcesContent":["/**\n * AdCP Agent E2E Tester\n *\n * Provides comprehensive end-to-end testing of AdCP agents (sales, creative, signals).\n *\n * Features:\n * - Channel-aware testing (only tests features the agent supports)\n * - Sandbox mode for safe testing (real testing requires actual media buys)\n * - Comprehensive scenario coverage based on AdCP spec\n * - Schema validation via @adcp/sdk\n *\n * @example\n * ```typescript\n * import { testAgent, formatTestResults } from '@adcp/sdk/testing';\n *\n * const result = await testAgent(\n * 'https://test-agent.adcontextprotocol.org/mcp',\n * 'discovery',\n * { auth: { type: 'bearer', token: 'your-token' } }\n * );\n * console.log(formatTestResults(result));\n * ```\n */\n\n// Re-export types\nexport type {\n TestScenario,\n TestOptions,\n TestStepResult,\n AgentProfile,\n TestResult,\n SuiteResult,\n TaskResult,\n Logger,\n} from './types';\nexport type { TestClient } from './client';\n\n// Re-export client utilities\nexport { setAgentTesterLogger, getLogger, createTestClient, runStep } from './client';\n\n// Re-export formatter\nexport { formatTestResults, formatTestResultsJSON, formatTestResultsSummary } from './formatter';\n\n// Import scenarios\nimport {\n testHealthCheck,\n testDiscovery,\n testCreateMediaBuy,\n testFullSalesFlow,\n testReportingFlow,\n testCreativeSync,\n testCreativeInline,\n testCreativeReference,\n testCreativeFlow,\n testCreativeLifecycle,\n testSignalsFlow,\n testErrorHandling,\n testValidation,\n testPricingEdgeCases,\n testTemporalValidation,\n testBehaviorAnalysis,\n testResponseConsistency,\n // v3 scenarios\n testGovernancePropertyLists,\n testGovernanceContentStandards,\n testPropertyListFilters,\n testCampaignGovernance,\n testCampaignGovernanceDenied,\n testCampaignGovernanceConditions,\n testCampaignGovernanceDelivery,\n testSellerGovernanceContext,\n testSISessionLifecycle,\n testSIAvailability,\n testSIHandoff,\n testCapabilityDiscovery,\n testSyncAudiences,\n testSchemaCompliance,\n testErrorCodes,\n testErrorStructure,\n testErrorTransport,\n // State machine compliance\n testMediaBuyLifecycle,\n testTerminalStateEnforcement,\n testPackageLifecycle,\n // Deterministic state machine testing\n testCreativeStateMachine,\n testMediaBuyStateMachine,\n testAccountStateMachine,\n testSessionStateMachine,\n testDeliverySimulation,\n testBudgetSimulation,\n testControllerValidation,\n // Brand rights\n testBrandIdentity,\n testBrandRightsFlow,\n testCreativeApproval,\n} from './scenarios';\n\n// Import types\nimport type { TestScenario, TestOptions, TestResult, TestStepResult, AgentProfile } from './types';\nimport { getLogger } from './client';\n\n/**\n * Main entry point: Run a test scenario against an agent\n */\nexport async function testAgent(\n agentUrl: string,\n scenario: TestScenario,\n options: TestOptions = {}\n): Promise<TestResult> {\n const startTime = Date.now();\n let steps: TestStepResult[] = [];\n let profile: AgentProfile | undefined;\n const logger = getLogger();\n\n const effectiveOptions: TestOptions = {\n ...options,\n sandbox: options.sandbox !== false,\n test_session_id: options.test_session_id || `addie-test-${Date.now()}`,\n };\n\n logger.info({ agentUrl, scenario, options: effectiveOptions }, 'Starting agent test');\n\n try {\n let result: { steps: TestStepResult[]; profile?: AgentProfile };\n\n switch (scenario) {\n case 'health_check':\n steps = await testHealthCheck(agentUrl, effectiveOptions);\n break;\n\n case 'discovery':\n result = await testDiscovery(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'create_media_buy':\n result = await testCreateMediaBuy(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'full_sales_flow':\n result = await testFullSalesFlow(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'reporting_flow':\n result = await testReportingFlow(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_sync':\n result = await testCreativeSync(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_inline':\n result = await testCreativeInline(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_reference':\n result = await testCreativeReference(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'pricing_models':\n // Re-use pricing edge cases for now\n result = await testPricingEdgeCases(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_flow':\n result = await testCreativeFlow(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_lifecycle':\n result = await testCreativeLifecycle(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'signals_flow':\n result = await testSignalsFlow(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'error_handling':\n result = await testErrorHandling(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'validation':\n result = await testValidation(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'pricing_edge_cases':\n result = await testPricingEdgeCases(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'temporal_validation':\n result = await testTemporalValidation(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'behavior_analysis':\n result = await testBehaviorAnalysis(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'response_consistency':\n result = await testResponseConsistency(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // v3 Governance protocol scenarios\n case 'governance_property_lists':\n result = await testGovernancePropertyLists(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'governance_content_standards':\n result = await testGovernanceContentStandards(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'property_list_filters':\n result = await testPropertyListFilters(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // v3 Campaign governance scenarios\n case 'campaign_governance':\n result = await testCampaignGovernance(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'campaign_governance_denied':\n result = await testCampaignGovernanceDenied(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'campaign_governance_conditions':\n result = await testCampaignGovernanceConditions(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'campaign_governance_delivery':\n result = await testCampaignGovernanceDelivery(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'seller_governance_context':\n result = await testSellerGovernanceContext(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // v3 SI protocol scenarios\n case 'si_session_lifecycle':\n result = await testSISessionLifecycle(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'si_availability':\n result = await testSIAvailability(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'si_handoff':\n result = await testSIHandoff(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // v3 Capability discovery\n case 'capability_discovery':\n result = await testCapabilityDiscovery(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'sync_audiences':\n result = await testSyncAudiences(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'schema_compliance':\n result = await testSchemaCompliance(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'error_codes':\n result = await testErrorCodes(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'error_structure':\n result = await testErrorStructure(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'error_transport':\n result = await testErrorTransport(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // State machine compliance\n case 'media_buy_lifecycle':\n result = await testMediaBuyLifecycle(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'terminal_state_enforcement':\n result = await testTerminalStateEnforcement(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'package_lifecycle':\n result = await testPackageLifecycle(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // Deterministic state machine scenarios (require comply_test_controller)\n case 'deterministic_creative':\n result = await testCreativeStateMachine(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'deterministic_media_buy':\n result = await testMediaBuyStateMachine(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'deterministic_account':\n result = await testAccountStateMachine(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'deterministic_session':\n result = await testSessionStateMachine(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'deterministic_delivery':\n result = await testDeliverySimulation(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'deterministic_budget':\n result = await testBudgetSimulation(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'controller_validation':\n result = await testControllerValidation(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n // Brand rights protocol\n case 'brand_identity':\n result = await testBrandIdentity(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'brand_rights_flow':\n result = await testBrandRightsFlow(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n case 'creative_approval':\n result = await testCreativeApproval(agentUrl, effectiveOptions);\n steps = result.steps;\n profile = result.profile;\n break;\n\n default:\n steps = [\n {\n step: 'Unknown scenario',\n passed: false,\n duration_ms: 0,\n error: `Unknown test scenario: ${scenario}`,\n },\n ];\n }\n } catch (error) {\n logger.error({ error, agentUrl, scenario }, 'Agent test failed with exception');\n steps.push({\n step: 'Test execution',\n passed: false,\n duration_ms: Date.now() - startTime,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n\n const totalDuration = Date.now() - startTime;\n const passedCount = steps.filter(s => s.passed).length;\n const failedCount = steps.filter(s => !s.passed).length;\n const overallPassed = failedCount === 0 && passedCount > 0;\n\n // Generate summary\n let summary: string;\n if (overallPassed) {\n summary = `All ${passedCount} test step(s) passed in ${totalDuration}ms`;\n } else if (passedCount === 0) {\n summary = `All ${failedCount} test step(s) failed`;\n } else {\n summary = `${passedCount} passed, ${failedCount} failed out of ${steps.length} step(s)`;\n }\n\n const testResult: TestResult = {\n agent_url: agentUrl,\n scenario,\n overall_passed: overallPassed,\n steps,\n summary,\n total_duration_ms: totalDuration,\n tested_at: new Date().toISOString(),\n agent_profile: profile,\n };\n\n logger.info({ agentUrl, scenario, overallPassed, passedCount, failedCount, totalDuration }, 'Agent test completed');\n\n return testResult;\n}\n\n// Re-export orchestrator\nexport {\n testAllScenarios,\n getApplicableScenarios,\n SCENARIO_REQUIREMENTS,\n DEFAULT_SCENARIOS,\n formatSuiteResults,\n formatSuiteResultsJSON,\n type OrchestratorOptions,\n} from './orchestrator';\n\n// Re-export individual scenarios for direct use\nexport {\n testHealthCheck,\n testDiscovery,\n testCreateMediaBuy,\n testFullSalesFlow,\n testReportingFlow,\n testCreativeSync,\n testCreativeInline,\n testCreativeFlow,\n testCreativeLifecycle,\n testSignalsFlow,\n testErrorHandling,\n testValidation,\n testPricingEdgeCases,\n testTemporalValidation,\n testBehaviorAnalysis,\n testResponseConsistency,\n // v3 scenarios\n testGovernancePropertyLists,\n testGovernanceContentStandards,\n testPropertyListFilters,\n testCampaignGovernance,\n testCampaignGovernanceDenied,\n testCampaignGovernanceConditions,\n testCampaignGovernanceDelivery,\n testSellerGovernanceContext,\n testSISessionLifecycle,\n testSIAvailability,\n testSIHandoff,\n testCapabilityDiscovery,\n testSyncAudiences,\n resolveAccountForMediaBuy,\n resolveAccountForAudiences,\n testSchemaCompliance,\n testErrorCodes,\n testErrorStructure,\n testErrorTransport,\n // State machine compliance\n testMediaBuyLifecycle,\n testTerminalStateEnforcement,\n testPackageLifecycle,\n // Deterministic state machine testing\n testCreativeStateMachine,\n testMediaBuyStateMachine,\n testAccountStateMachine,\n testSessionStateMachine,\n testDeliverySimulation,\n testBudgetSimulation,\n testControllerValidation,\n // Brand rights\n testBrandIdentity,\n testBrandRightsFlow,\n testCreativeApproval,\n hasBrandRightsTools,\n // v3 helpers\n hasGovernanceTools,\n hasCampaignGovernanceTools,\n hasSITools,\n likelySupportsV3,\n} from './scenarios';\n"],"mappings":"AAsCA,SAAS,sBAAsB,WAAW,kBAAkB,eAAe;AAG3E,SAAS,mBAAmB,uBAAuB,gCAAgC;AAGnF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,aAAAA,kBAAiB;AAK1B,eAAsB,UACpB,UACA,UACA,UAAuB,CAAC,GACH;AACrB,QAAM,YAAY,KAAK,IAAI;AAC3B,MAAI,QAA0B,CAAC;AAC/B,MAAI;AACJ,QAAM,SAASA,WAAU;AAEzB,QAAM,mBAAgC;AAAA,IACpC,GAAG;AAAA,IACH,SAAS,QAAQ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AAA,IAClC,eAAe;AAAA,EACjB;AAEA,SAAO,KAAK,EAAE,UAAU,UAAU,eAAe,aAAa,aAAa,cAAc,GAAG,sBAAsB;AAElH,SAAO;AACT;AAGA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAGP;AAAA,EACE,mBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,2BAAAC;AAAA,EAEA,+BAAAC;AAAA,EACA,kCAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,gCAAAC;AAAA,EACA,oCAAAC;AAAA,EACA,kCAAAC;AAAA,EACA,+BAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,qBAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA,wBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,sBAAAC;AAAA,EAEA,yBAAAC;AAAA,EACA,gCAAAC;AAAA,EACA,wBAAAC;AAAA,EAEA,4BAAAC;AAAA,EACA,4BAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,4BAAAC;AAAA,EAEA,qBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,wBAAAC;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["getLogger","testHealthCheck","testDiscovery","testCreateMediaBuy","testFullSalesFlow","testReportingFlow","testCreativeSync","testCreativeInline","testCreativeFlow","testCreativeLifecycle","testSignalsFlow","testErrorHandling","testValidation","testPricingEdgeCases","testTemporalValidation","testBehaviorAnalysis","testResponseConsistency","testGovernancePropertyLists","testGovernanceContentStandards","testPropertyListFilters","testCampaignGovernance","testCampaignGovernanceDenied","testCampaignGovernanceConditions","testCampaignGovernanceDelivery","testSellerGovernanceContext","testSISessionLifecycle","testSIAvailability","testSIHandoff","testCapabilityDiscovery","testSyncAudiences","testSchemaCompliance","testErrorCodes","testErrorStructure","testErrorTransport","testMediaBuyLifecycle","testTerminalStateEnforcement","testPackageLifecycle","testCreativeStateMachine","testMediaBuyStateMachine","testAccountStateMachine","testSessionStateMachine","testDeliverySimulation","testBudgetSimulation","testControllerValidation","testBrandIdentity","testBrandRightsFlow","testCreativeApproval"]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { fileURLToPath as __adcpFileURLToPath } from 'node:url';
|
|
2
|
-
import { dirname as __adcpDirname } from 'node:path';
|
|
3
|
-
import { createRequire as __adcpCreateRequire } from 'node:module';
|
|
4
|
-
const __filename = __adcpFileURLToPath(import.meta.url);
|
|
5
|
-
const __dirname = __adcpDirname(__filename);
|
|
6
|
-
const require = __adcpCreateRequire(import.meta.url);
|
|
7
1
|
import { ADCPMultiAgentClient } from "../core/ADCPMultiAgentClient.mjs";
|
|
8
2
|
import { getBestUnionErrors } from "../utils/union-errors.mjs";
|
|
9
3
|
import { getFormatAssets, usesDeprecatedAssetsField } from "../utils/format-assets.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/testing/client.ts"],"sourcesContent":["/**\n * Test client utilities for AdCP Agent E2E Testing\n */\n\nimport { ADCPMultiAgentClient } from '../core/ADCPMultiAgentClient';\nimport { getBestUnionErrors, type SchemaViolation } from '../utils/union-errors';\nimport { getFormatAssets, usesDeprecatedAssetsField } from '../utils/format-assets';\nimport { brandManifestToBrandReference } from '../types/compat';\nimport type { Product } from '../types/core.generated';\nimport type {\n GetProductsResponse,\n ListCreativeFormatsResponse,\n Format,\n GetSignalsResponse,\n AccountReference,\n BrandReference,\n} from '../types/tools.generated';\nimport type { TestOptions, TestStepResult, AgentProfile, TaskResult, Logger } from './types';\nimport { prepareResponseForSchemaValidation, TOOL_RESPONSE_SCHEMAS } from '../utils/response-schemas';\nimport { injectLegacyEnvelopeStatus } from '../utils/envelope-status-compat';\nimport { parseCapabilitiesResponse } from '../utils/capabilities';\nimport { classifyProbeUrl } from '../utils/probe-policy';\nimport { SsrfRefusedError } from '../net/ssrf-fetch';\nimport { ADCP_VERSION } from '../version';\nimport type { VersionEnvelopeMode } from '../protocols';\n\nconst TEST_CLIENT_VERSION_OPTIONS = Symbol('adcp.testClientVersionOptions');\n\ninterface TestClientVersionOptions {\n adcpVersion: string;\n wireAdcpVersion?: string;\n versionEnvelope: VersionEnvelopeMode;\n authMode?: string;\n}\n\n/**\n * Extract a principal identifier from TestOptions auth.\n * For bearer auth this is the token; for basic auth this is the username;\n * for oauth this is the access_token.\n */\nexport function resolveAuthPrincipal(options: TestOptions): string | undefined {\n if (!options.auth) return undefined;\n switch (options.auth.type) {\n case 'basic':\n return options.auth.username;\n case 'oauth':\n return options.auth.tokens.access_token;\n case 'bearer':\n return options.auth.token;\n }\n}\n\nconst DEFAULT_BRAND_REF: BrandReference = { domain: 'test.example' };\n\n/**\n * Resolve the brand reference to use for a test call.\n * Prefers the new brand field, falls back to converting a legacy brand_manifest.\n *\n * The runner enforces a storyboard-run-scoped brand invariant on every\n * outgoing request, so a missing brand yields a stable default that stays\n * consistent across create/get/update/delete within a single run.\n */\nexport function resolveBrand(options: TestOptions): BrandReference {\n return (\n options.brand ||\n (options.brand_manifest && brandManifestToBrandReference(options.brand_manifest)) ||\n DEFAULT_BRAND_REF\n );\n}\n\n/**\n * Resolve the account reference to use for a test call.\n * Uses the brand+operator form of AccountReference.\n */\nexport function resolveAccount(options: TestOptions): AccountReference {\n const brand = resolveBrand(options);\n return {\n brand,\n operator: brand.domain,\n sandbox: options.sandbox,\n };\n}\n\n// Default console-based logger\nconst defaultLogger: Logger = {\n info: (ctx, msg) => console.log(`[INFO] ${msg}`, JSON.stringify(ctx, null, 2)),\n error: (ctx, msg) => console.error(`[ERROR] ${msg}`, JSON.stringify(ctx, null, 2)),\n warn: (ctx, msg) => console.warn(`[WARN] ${msg}`, JSON.stringify(ctx, null, 2)),\n debug: () => {}, // Silent by default\n};\n\n// Allow custom logger injection\nlet logger: Logger = defaultLogger;\n\n/**\n * Set a custom logger for the agent tester\n */\nexport function setAgentTesterLogger(customLogger: Logger): void {\n logger = customLogger;\n}\n\n/**\n * Get current logger instance\n */\nexport function getLogger(): Logger {\n return logger;\n}\n\n/**\n * Create a test client for an agent\n */\nexport function createTestClient(agentUrl: string, protocol: 'mcp' | 'a2a' = 'mcp', options: TestOptions = {}) {\n options = withTestKitAuthDefaults(options);\n\n // adcp-client#1618: SSRF policy gate at client construction. Once the\n // TestClient exists, every transport call inherits its agent URI; guarding\n // once here covers the entire client lifecycle, including downstream\n // `discoverAgentProfile` fetches (`getAgentInfo`, `getAdcpCapabilities`).\n // Throws synchronously — `SsrfRefusedError` is the documented refusal\n // type and operators see a clear hostname-only message (no resolved IP\n // in the user-visible text; see `probe-policy.ts` rationale).\n const policy = classifyProbeUrl(agentUrl);\n if (!policy.allowed) {\n // `classifyProbeUrl` already returned `{ allowed: true }` for any URL\n // that fails `new URL(...)`, so reaching the !allowed branch implies the\n // URL parses cleanly. Reparse only to extract the bare hostname for the\n // SsrfRefusedError meta.\n const hostname = new URL(agentUrl).hostname.replace(/^\\[|\\]$/g, '');\n throw new SsrfRefusedError(\n policy.code === 'always_blocked' ? 'always_blocked_address' : 'private_address',\n policy.reason,\n { url: agentUrl, hostname }\n );\n }\n\n const headers: Record<string, string> = {};\n\n if (options.test_session_id) {\n headers['X-Test-Session-ID'] = options.test_session_id;\n }\n\n // Build agent config with auth_token if provided\n const agentConfig: {\n id: string;\n name: string;\n agent_uri: string;\n protocol: 'mcp' | 'a2a';\n auth_token?: string;\n oauth_tokens?: import('../types/adcp').AgentOAuthTokens;\n oauth_client?: import('../types/adcp').AgentOAuthClient;\n oauth_client_credentials?: import('../types/adcp').AgentOAuthClientCredentials;\n headers?: Record<string, string>;\n } = {\n id: 'test',\n name: 'E2E Test Client',\n agent_uri: agentUrl,\n protocol,\n };\n\n // Caller-supplied tenant/routing headers carry through to every transport\n // request. Merged before auth so auth still wins on Authorization conflicts\n // (the basic-auth branch below intentionally overwrites this).\n if (options.headers && Object.keys(options.headers).length > 0) {\n agentConfig.headers = { ...options.headers };\n }\n\n // Add auth to agent config - the library will use it automatically\n if (options.auth) {\n if (options.auth.type === 'basic') {\n // basic: encode credentials here; library sends the Authorization header as-is\n const encoded = Buffer.from(`${options.auth.username}:${options.auth.password}`).toString('base64');\n agentConfig.headers = { ...agentConfig.headers, Authorization: `Basic ${encoded}` };\n } else if (options.auth.type === 'oauth') {\n // oauth: attach tokens + client registration; ProtocolClient detects\n // oauth_tokens and routes through the refresh-capable MCP OAuth path.\n agentConfig.oauth_tokens = options.auth.tokens;\n if (options.auth.client) agentConfig.oauth_client = options.auth.client;\n } else if (options.auth.type === 'oauth_client_credentials') {\n // oauth_client_credentials: attach credentials + optional cached tokens.\n // ProtocolClient pre-refreshes via secret re-exchange before each call\n // and sends the resulting access_token as a plain bearer.\n agentConfig.oauth_client_credentials = options.auth.credentials;\n if (options.auth.tokens) agentConfig.oauth_tokens = options.auth.tokens;\n } else {\n // bearer: raw token stored; library prepends 'Bearer ' internally via createMCPAuthHeaders\n agentConfig.auth_token = options.auth.token;\n }\n }\n\n const multiClient = new ADCPMultiAgentClient([agentConfig], {\n headers,\n validation: { logSchemaViolations: false },\n ...(options.adcpVersion !== undefined && { adcpVersion: options.adcpVersion }),\n ...(options.wireAdcpVersion !== undefined && { wireAdcpVersion: options.wireAdcpVersion }),\n ...(options.versionEnvelope !== undefined && { versionEnvelope: options.versionEnvelope }),\n ...(options.userAgent && { userAgent: options.userAgent }),\n });\n\n const client = multiClient.agent('test');\n const authMode = authReuseMode(options);\n Object.defineProperty(client, TEST_CLIENT_VERSION_OPTIONS, {\n value: {\n adcpVersion: multiClient.getAdcpVersion(),\n ...(options.wireAdcpVersion !== undefined && { wireAdcpVersion: options.wireAdcpVersion }),\n versionEnvelope: options.versionEnvelope ?? 'auto',\n ...(authMode !== undefined && { authMode }),\n } satisfies TestClientVersionOptions,\n enumerable: false,\n });\n return client;\n}\n\nexport type TestClient = ReturnType<typeof createTestClient>;\nexport interface TestClientResolution {\n client: TestClient;\n reusedShared: boolean;\n}\n\n/**\n * Return a shared client from options (set by comply()) or create a fresh one.\n * When comply() runs, it creates a single client and passes it via options._client\n * so scenarios reuse the same MCP connection instead of opening 36+ connections.\n */\nexport function getOrCreateClient(agentUrl: string, options: TestOptions): TestClient {\n return getOrCreateClientResolution(agentUrl, options).client;\n}\n\nexport function getOrCreateClientResolution(agentUrl: string, options: TestOptions): TestClientResolution {\n const shared = options._client as TestClient | undefined;\n if (shared && isExecutableTestClient(shared) && testClientMatchesVersionOptions(shared, options)) {\n return { client: shared, reusedShared: true };\n }\n return { client: createTestClient(agentUrl, options.protocol || 'mcp', options), reusedShared: false };\n}\n\nfunction isExecutableTestClient(client: unknown): client is TestClient {\n if (client == null || typeof client !== 'object') return false;\n const candidate = client as Record<string, unknown>;\n if (typeof candidate['executeTask'] === 'function' || typeof candidate['resetContext'] === 'function') return true;\n return Object.entries(candidate).some(([key, value]) => key !== 'getAgentInfo' && typeof value === 'function');\n}\n\nfunction testClientMatchesVersionOptions(client: TestClient, options: TestOptions): boolean {\n const effectiveOptions = withTestKitAuthDefaults(options);\n const meta = (client as unknown as { [TEST_CLIENT_VERSION_OPTIONS]?: TestClientVersionOptions })[\n TEST_CLIENT_VERSION_OPTIONS\n ];\n const expectedAuthMode = authReuseMode(effectiveOptions);\n if (!meta) {\n return effectiveOptions.adcpVersion === undefined && effectiveOptions.versionEnvelope === undefined;\n }\n const expectedAdcpVersion = effectiveOptions.adcpVersion ?? ADCP_VERSION;\n const expectedWireAdcpVersion = effectiveOptions.wireAdcpVersion;\n const expectedVersionEnvelope = effectiveOptions.versionEnvelope ?? 'auto';\n return (\n meta.adcpVersion === expectedAdcpVersion &&\n meta.wireAdcpVersion === expectedWireAdcpVersion &&\n meta.versionEnvelope === expectedVersionEnvelope &&\n meta.authMode === expectedAuthMode\n );\n}\n\nfunction withTestKitAuthDefaults(options: TestOptions): TestOptions {\n if (options.auth) return options;\n const apiKey = options.test_kit?.auth?.api_key;\n if (typeof apiKey === 'string' && apiKey.length > 0) {\n return { ...options, auth: { type: 'bearer', token: apiKey } };\n }\n\n const basic = options.test_kit?.auth?.basic;\n if (!basic) return options;\n if (\n typeof basic.username === 'string' &&\n basic.username.length > 0 &&\n typeof basic.password === 'string' &&\n basic.password.length > 0\n ) {\n return { ...options, auth: { type: 'basic', username: basic.username, password: basic.password } };\n }\n if (typeof basic.credentials === 'string') {\n const splitAt = basic.credentials.indexOf(':');\n if (splitAt > 0) {\n return {\n ...options,\n auth: {\n type: 'basic',\n username: basic.credentials.slice(0, splitAt),\n password: basic.credentials.slice(splitAt + 1),\n },\n };\n }\n }\n return options;\n}\n\nfunction authReuseMode(options: TestOptions): string | undefined {\n return options.auth?.type;\n}\n\n/**\n * Return a pre-discovered profile from options (set by comply()) or discover fresh.\n */\nexport async function getOrDiscoverProfile(\n client: TestClient,\n options: TestOptions\n): Promise<{ profile: AgentProfile; step: TestStepResult }> {\n if (options._profile) {\n return {\n profile: options._profile,\n step: { step: 'Discover agent capabilities', passed: true, duration_ms: 0 },\n };\n }\n return discoverAgentProfile(client, options.signal);\n}\n\n/**\n * Run a single test step with timing\n */\n/**\n * Race a promise against an AbortSignal. Adopted by `discoverAgentProfile`\n * so the comply pipeline's timeout actually bounds discovery wall-clock —\n * the underlying transport's `getAgentInfo()` doesn't accept a signal\n * (public API), so we resolve the wrapper promise on abort and let the\n * orphaned in-flight request finish on its own. (adcp-client#1612)\n *\n * Throws the signal's reason on abort.\n *\n * **SECURITY (security-reviewer follow-up on #1612):** the orphaned\n * promise's `.then` handlers below stay attached until the underlying\n * transport call settles. The resolved value `v` carries an authenticated\n * agent response — `getAgentInfo()` and `getAdcpCapabilities()` round-trip\n * through the bearer-token transport, so the promise body holds the wire\n * response in memory until GC'd. **Do not log `v` from inside this\n * resolver** (or any future `console.error` / telemetry hook on the\n * orphaned path) — the buyer has already moved on past the abort, and\n * logging here would leak agent-side data after the caller stopped\n * trusting it. The early `resolve(v)` is intentionally a no-op on the\n * already-rejected race-promise; `v` becomes unreferenced and GC-eligible\n * the moment this `.then` returns.\n */\nfunction raceWithSignal<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T> {\n if (!signal) return promise;\n if (signal.aborted) {\n return Promise.reject(signal.reason ?? new Error('aborted'));\n }\n return new Promise<T>((resolve, reject) => {\n const onAbort = () => reject(signal.reason ?? new Error('aborted'));\n signal.addEventListener('abort', onAbort, { once: true });\n promise.then(\n v => {\n signal.removeEventListener('abort', onAbort);\n // INTENTIONAL: no-op on an already-rejected race-promise. Do NOT\n // log `v` here — see security note in the JSDoc above.\n resolve(v);\n },\n e => {\n signal.removeEventListener('abort', onAbort);\n // INTENTIONAL: no-op on an already-rejected race-promise. Do NOT\n // log `e` here either — `Error.message` from a transport rejection\n // can carry an echoed response body, see security note above.\n reject(e);\n }\n );\n });\n}\n\n/**\n * Result of {@link runStep}. The optional `caughtError` carries the raw\n * thrown value (typed `unknown`, narrow via `instanceof` at the call site)\n * so callers can pattern-match on typed exceptions like\n * `ResponseSchemaValidationError` without losing the freeform string\n * representation on `step.error`. Pre-existing callers that only consume\n * `result` and `step` are unaffected.\n *\n * Spec: adcp-client#1709 (storyboard runner attributes Zod rejects to\n * the canonical `response_schema` validation entry by detecting the typed\n * error here).\n */\nexport interface RunStepOutcome<T> {\n result?: T;\n step: TestStepResult;\n caughtError?: unknown;\n}\n\nexport async function runStep<T>(\n stepName: string,\n taskName: string | undefined,\n fn: () => Promise<T>\n): Promise<RunStepOutcome<T>> {\n const start = Date.now();\n try {\n const result = await fn();\n const duration = Date.now() - start;\n return {\n result,\n step: {\n step: stepName,\n task: taskName,\n passed: true,\n duration_ms: duration,\n },\n };\n } catch (error) {\n const duration = Date.now() - start;\n const errorMessage = error instanceof Error ? error.message : String(error);\n return {\n step: {\n step: stepName,\n task: taskName,\n passed: false,\n duration_ms: duration,\n error: errorMessage,\n },\n caughtError: error,\n };\n }\n}\n\n/**\n * Discover agent profile - what capabilities does this agent have?\n *\n * When the agent exposes `get_adcp_capabilities`, its response populates\n * `supported_protocols` + `specialisms` on the profile so the compliance\n * runner can select domain and specialism bundles.\n *\n * Pass `signal` for hard external cancellation. `comply()` deliberately does\n * not pass its soft `timeout_ms` storyboard-start budget here; that budget\n * stops new storyboards after discovery instead of aborting an active run.\n */\nexport async function discoverAgentProfile(\n client: TestClient,\n signal?: AbortSignal\n): Promise<{ profile: AgentProfile; step: TestStepResult }> {\n const { result: agentInfo, step } = await runStep('Discover agent capabilities', 'getAgentInfo', () =>\n raceWithSignal(client.getAgentInfo({ signal }), signal)\n );\n\n const profile: AgentProfile = {\n name: agentInfo?.name || 'Unknown',\n tools: agentInfo?.tools?.map((t: { name: string }) => t.name) || [],\n };\n\n if (agentInfo) {\n step.details = `Agent: ${profile.name}, Tools: ${profile.tools.length}`;\n step.response_preview = JSON.stringify(\n {\n name: profile.name,\n tools: profile.tools,\n },\n null,\n 2\n );\n }\n\n if (profile.tools.includes('get_adcp_capabilities')) {\n try {\n const caps = (await raceWithSignal(client.getAdcpCapabilities({}, undefined, { signal }), signal)) as TaskResult;\n if (caps?.success && caps?.data) {\n profile.raw_capabilities = caps.data;\n const parsed = parseCapabilitiesResponse(caps.data);\n profile.adcp_version = parsed.version;\n profile.adcp_major_versions = parsed.majorVersions;\n if (parsed.supportedVersions !== undefined) profile.adcp_supported_versions = parsed.supportedVersions;\n if (parsed.buildVersion !== undefined) profile.adcp_build_version = parsed.buildVersion;\n profile.supported_protocols = parsed.protocols;\n profile.supports_governance = parsed.protocols.includes('governance');\n profile.supports_si = parsed.protocols.includes('sponsored_intelligence');\n const specialisms = (caps.data as { specialisms?: unknown }).specialisms;\n if (Array.isArray(specialisms)) {\n profile.specialisms = specialisms.filter((s): s is string => typeof s === 'string');\n }\n const libVersion = (caps.data as Record<string, unknown>).library_version;\n if (typeof libVersion === 'string') profile.library_version = libVersion;\n } else {\n profile.capabilities_probe_error = caps?.error || 'get_adcp_capabilities returned no data';\n }\n } catch (err) {\n // Agent advertises the tool but the call failed. Don't silently downgrade —\n // record the failure so the compliance report shows why only universal ran.\n profile.capabilities_probe_error = (err as Error)?.message || String(err);\n }\n }\n\n return { profile, step };\n}\n\n/**\n * Discover what channels, pricing models, formats the agent supports\n * by calling get_products and analyzing the response\n */\nexport async function discoverAgentCapabilities(\n client: TestClient,\n profile: AgentProfile,\n options: TestOptions\n): Promise<{ capabilities: Partial<AgentProfile>; steps: TestStepResult[] }> {\n const steps: TestStepResult[] = [];\n const capabilities: Partial<AgentProfile> = {};\n\n if (!profile.tools.includes('get_products')) {\n return { capabilities, steps };\n }\n\n const brief = options.brief || 'Show me all available advertising products across all channels';\n const getProductsParams: Record<string, unknown> = {\n buying_mode: 'brief',\n brief,\n brand: resolveBrand(options),\n };\n const { result, step } = await runStep<TaskResult>(\n 'Discover products for capability analysis',\n 'get_products',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- bypasses strict request typing\n async () => client.getProducts(getProductsParams as any) as Promise<TaskResult>\n );\n\n if (result?.success && result?.data) {\n const responseData = result.data as GetProductsResponse;\n const products: Product[] = responseData.products ?? [];\n\n // Extract unique channels\n const channels = new Set<string>();\n const pricingModels = new Set<string>();\n const formatIds = new Set<string>();\n const deliveryTypes = new Set<string>();\n\n for (const product of products) {\n // Channels from product\n if (product.channels) {\n for (const ch of product.channels) {\n channels.add(ch);\n }\n }\n // Delivery type\n if (product.delivery_type) {\n deliveryTypes.add(product.delivery_type);\n }\n // Pricing models\n if (product.pricing_options) {\n for (const po of product.pricing_options) {\n if (po.pricing_model) pricingModels.add(po.pricing_model);\n }\n }\n // Format IDs\n if (product.format_ids) {\n for (const fid of product.format_ids) {\n const id = typeof fid === 'string' ? fid : fid.id;\n if (id) formatIds.add(id);\n }\n }\n }\n\n capabilities.channels = Array.from(channels);\n capabilities.pricing_models = Array.from(pricingModels);\n capabilities.format_ids = Array.from(formatIds);\n capabilities.delivery_types = Array.from(deliveryTypes);\n\n step.details = `Found ${products.length} products across ${channels.size} channel(s), ${pricingModels.size} pricing model(s)`;\n step.response_preview = JSON.stringify(\n {\n products_count: products.length,\n channels: capabilities.channels,\n pricing_models: capabilities.pricing_models,\n delivery_types: capabilities.delivery_types,\n format_count: capabilities.format_ids?.length,\n },\n null,\n 2\n );\n step.observation_data = { products_count: products.length, channels: capabilities.channels };\n } else if (result && !result.success) {\n step.passed = false;\n step.error = result.error || 'get_products failed';\n }\n\n steps.push(step);\n return { capabilities, steps };\n}\n\n/**\n * Discover creative formats from a creative agent\n */\nexport async function discoverCreativeFormats(\n client: TestClient,\n profile: AgentProfile\n): Promise<{ formats: AgentProfile['supported_formats']; step: TestStepResult }> {\n const formats: AgentProfile['supported_formats'] = [];\n\n if (!profile.tools.includes('list_creative_formats')) {\n return {\n formats,\n step: {\n step: 'Discover creative formats',\n passed: false,\n duration_ms: 0,\n error: 'Agent does not support list_creative_formats',\n },\n };\n }\n\n const { result, step } = await runStep<TaskResult>(\n 'Discover creative formats',\n 'list_creative_formats',\n async () => client.listCreativeFormats({}) as Promise<TaskResult>\n );\n\n if (result?.success && result?.data) {\n const responseData = result.data as ListCreativeFormatsResponse;\n const rawFormats: Format[] = responseData.formats ?? [];\n const deprecatedFormats: string[] = [];\n\n for (const format of rawFormats) {\n const formatInfo: NonNullable<AgentProfile['supported_formats']>[0] = {\n format_id: format.format_id,\n name: format.name,\n required_assets: [],\n optional_assets: [],\n };\n\n // Check for deprecated assets_required usage\n if (usesDeprecatedAssetsField(format)) {\n const displayId = typeof formatInfo.format_id === 'object' ? formatInfo.format_id.id : formatInfo.format_id;\n deprecatedFormats.push(displayId);\n }\n\n // Extract asset requirements from format spec using format-assets utilities\n // This handles both v2.6 `assets` and deprecated `assets_required` fields\n const formatAssets = getFormatAssets(format);\n for (const asset of formatAssets) {\n const assetId = asset.item_type === 'individual' ? asset.asset_id : asset.asset_group_id;\n\n if (asset.required) {\n formatInfo.required_assets?.push(assetId);\n } else {\n formatInfo.optional_assets?.push(assetId);\n }\n }\n\n formats.push(formatInfo);\n }\n\n step.details = `Found ${formats.length} format(s)`;\n step.response_preview = JSON.stringify(\n {\n format_count: formats.length,\n sample_formats: formats.slice(0, 3).map(f => ({\n id: f.format_id,\n name: f.name,\n required_assets: f.required_assets?.length || 0,\n })),\n },\n null,\n 2\n );\n\n // Add deprecation warnings if any formats use assets_required\n if (deprecatedFormats.length > 0) {\n step.warnings = [\n `⚠️ DEPRECATION: ${deprecatedFormats.length} format(s) use 'assets_required' field which is deprecated and will be removed in a future version. Please migrate to the 'assets' field instead. (adcp-client 3.6.0+)`,\n ];\n logger.warn(\n { deprecated_formats: deprecatedFormats },\n `Agent uses deprecated 'assets_required' field in ${deprecatedFormats.length} format(s). Migrate to 'assets' field.`\n );\n }\n } else if (result && !result.success) {\n step.passed = false;\n step.error = result.error || 'list_creative_formats failed';\n }\n\n return { formats, step };\n}\n\n/**\n * Discover signals from a signals agent\n */\nexport async function discoverSignals(\n client: TestClient,\n profile: AgentProfile,\n options: TestOptions\n): Promise<{\n signals: AgentProfile['supported_signals'];\n rawSignals: GetSignalsResponse['signals'];\n step: TestStepResult;\n schemaStep?: TestStepResult;\n}> {\n const signals: AgentProfile['supported_signals'] = [];\n let rawSignals: GetSignalsResponse['signals'] = [];\n\n if (!profile.tools.includes('get_signals')) {\n return {\n signals,\n rawSignals,\n step: {\n step: 'Discover signals',\n passed: false,\n duration_ms: 0,\n error: 'Agent does not support get_signals',\n },\n };\n }\n\n const { result, step } = await runStep<TaskResult>(\n 'Discover available signals',\n 'get_signals',\n async () =>\n client.getSignals({\n signal_spec: options.brief || 'Show me all available audience signals and segments',\n }) as Promise<TaskResult>\n );\n\n let schemaStep: TestStepResult | undefined;\n\n if (result?.success && result?.data) {\n schemaStep = validateResponseSchema('get_signals', result.data);\n const responseData = result.data as GetSignalsResponse;\n rawSignals = responseData.signals ?? [];\n\n for (const signal of rawSignals) {\n const signalData = signal as {\n signal_agent_segment_id?: unknown;\n signal_ref?: unknown;\n name?: unknown;\n signal_type?: unknown;\n type?: unknown;\n };\n let signalId: string | undefined;\n if (typeof signalData.signal_agent_segment_id === 'string') {\n signalId = signalData.signal_agent_segment_id;\n } else if (typeof signalData.signal_ref === 'string') {\n signalId = signalData.signal_ref;\n } else if (signalData.signal_ref != null) {\n // Summary-only convenience for the test report; rawSignals above\n // preserves the seller's canonical signal_ref object.\n signalId = JSON.stringify(signalData.signal_ref);\n }\n if (!signalId) continue;\n signals.push({\n signal_id: signalId,\n name: typeof signalData.name === 'string' ? signalData.name : undefined,\n type:\n typeof signalData.signal_type === 'string'\n ? signalData.signal_type\n : typeof signalData.type === 'string'\n ? signalData.type\n : undefined,\n });\n }\n\n step.details = `Found ${signals.length} signal(s)`;\n step.response_preview = JSON.stringify(\n {\n signal_count: signals.length,\n signal_types: [...new Set(signals.map(s => s.type).filter(Boolean))],\n sample_signals: signals.slice(0, 5).map(s => ({\n id: s.signal_id,\n name: s.name,\n type: s.type,\n })),\n },\n null,\n 2\n );\n } else if (result && !result.success) {\n step.passed = false;\n step.error = result.error || 'get_signals failed';\n }\n\n return { signals, rawSignals, step, schemaStep };\n}\n\n/**\n * Validate response data against the AdCP Zod schema for a tool.\n * Returns a TestStepResult indicating pass/fail with details on schema violations.\n *\n * For union schemas (success | error responses), Zod's top-level error is the\n * unhelpful \"(root): Invalid input\". This function detects that case and\n * reports per-variant errors instead, picking the variant with the fewest\n * issues (the closest match) so the developer sees actionable field names.\n *\n * Violations are split into two categories so remediation guidance differs\n * appropriately (set the field vs. fix the value):\n * - `required` — a required field is absent from the response. Zod emits\n * `invalid_type` with `received: 'undefined'` for this case; we re-tag\n * it as `required` and report it as a missing field.\n * - constraint keyword (`minimum`, `maximum`, `enum`, `format`, …) — the\n * field is present but violates a JSON Schema keyword constraint.\n */\nexport function validateResponseSchema(toolName: string, data: unknown, responseAdcpVersion?: string): TestStepResult {\n const schema = TOOL_RESPONSE_SCHEMAS[toolName];\n if (!schema) {\n return {\n step: `Schema validation: ${toolName}`,\n passed: true,\n duration_ms: 0,\n details: `No response schema available for ${toolName}`,\n warnings: [`No Zod schema registered for \"${toolName}\" — validation skipped`],\n };\n }\n\n // 3.0.x back-compat: synthesize envelope `status` for legacy peers so\n // strict 3.1 validators don't reject otherwise-conformant 3.0 wire\n // responses. See `utils/envelope-status-compat.ts`.\n const compatData =\n data && typeof data === 'object' && !Array.isArray(data)\n ? injectLegacyEnvelopeStatus(data as Record<string, unknown>, { toolName })\n : data;\n const result = schema.safeParse(prepareResponseForSchemaValidation(toolName, compatData, responseAdcpVersion));\n if (result.success) {\n return {\n step: `Schema validation: ${toolName}`,\n passed: true,\n duration_ms: 0,\n details: `Response matches ${toolName} schema`,\n };\n }\n\n let violations: SchemaViolation[] = result.error.issues.map(i => {\n const path = i.path.length > 0 ? i.path.join('.') : '(root)';\n return { path, message: i.message, code: i.code };\n });\n\n // Union schemas produce \"(root): Invalid input\" when no variant matches.\n // Try each variant individually and report the closest match's errors.\n const first = violations[0];\n const isUnionError = violations.length === 1 && first && first.path === '(root)' && first.code === 'invalid_union';\n\n if (isUnionError) {\n const betterErrors = getBestUnionErrors(schema, data);\n if (betterErrors && betterErrors.length > 0) {\n violations = betterErrors;\n }\n }\n\n const classified = violations.map(classifyViolation);\n const missing = classified.filter(v => v.kind === 'missing');\n const constraint = classified.filter(v => v.kind === 'constraint');\n\n const parts: string[] = [];\n if (missing.length > 0) {\n parts.push(`Response missing required fields: ${missing.map(v => v.json_pointer).join(', ')}`);\n }\n if (constraint.length > 0) {\n parts.push(\n `Response constraint violations: ${constraint\n .map(v => `${v.json_pointer} (${v.keyword}): ${v.message}`)\n .join('; ')}`\n );\n }\n\n return {\n step: `Schema validation: ${toolName}`,\n passed: false,\n duration_ms: 0,\n error: parts.join(' | '),\n response_preview: JSON.stringify({ violations: classified }, null, 2),\n };\n}\n\n/**\n * Classify a Zod-flavored schema violation as either a missing required field\n * or a constraint violation (with the failed JSON Schema keyword). Adds a\n * JSON Pointer (`/foo/0/bar`) so downstream tooling can locate the field\n * without re-parsing dot paths.\n */\nfunction classifyViolation(v: SchemaViolation): {\n kind: 'missing' | 'constraint';\n json_pointer: string;\n keyword: string;\n message: string;\n code: SchemaViolation['code'];\n} {\n const segments = v.path === '(root)' ? [] : v.path.split('.');\n const json_pointer = '/' + segments.map(s => s.replace(/~/g, '~0').replace(/\\//g, '~1')).join('/');\n\n // Zod emits `invalid_type` with `received: 'undefined'` for missing required\n // fields. The `code` alone is ambiguous (`invalid_type` also covers wrong-\n // type-but-present), so we sniff the message for the canonical Zod wording.\n const isMissing = v.code === 'invalid_type' && /received `?undefined`?/i.test(v.message);\n if (isMissing) {\n return { kind: 'missing', json_pointer, keyword: 'required', message: v.message, code: v.code };\n }\n\n return {\n kind: 'constraint',\n json_pointer,\n keyword: zodCodeToKeyword(v.code),\n message: v.message,\n code: v.code,\n };\n}\n\n/**\n * Map a Zod error code to the equivalent JSON Schema keyword so downstream\n * tooling (and humans reading the report) see the standard vocabulary\n * (`minimum`, `enum`, `format`, …) instead of Zod-specific names.\n */\nfunction zodCodeToKeyword(code: SchemaViolation['code']): string {\n switch (code) {\n case 'invalid_type':\n return 'type';\n case 'invalid_value':\n return 'enum';\n case 'too_small':\n return 'minimum';\n case 'too_big':\n return 'maximum';\n case 'invalid_format':\n return 'format';\n case 'unrecognized_keys':\n return 'additionalProperties';\n case 'invalid_union':\n return 'oneOf';\n case 'not_multiple_of':\n return 'multipleOf';\n default:\n return code;\n }\n}\n"],"mappings":";;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n * Test client utilities for AdCP Agent E2E Testing\n */\n\nimport { ADCPMultiAgentClient } from '../core/ADCPMultiAgentClient';\nimport { getBestUnionErrors, type SchemaViolation } from '../utils/union-errors';\nimport { getFormatAssets, usesDeprecatedAssetsField } from '../utils/format-assets';\nimport { brandManifestToBrandReference } from '../types/compat';\nimport type { Product } from '../types/core.generated';\nimport type {\n GetProductsResponse,\n ListCreativeFormatsResponse,\n Format,\n GetSignalsResponse,\n AccountReference,\n BrandReference,\n} from '../types/tools.generated';\nimport type { TestOptions, TestStepResult, AgentProfile, TaskResult, Logger } from './types';\nimport { prepareResponseForSchemaValidation, TOOL_RESPONSE_SCHEMAS } from '../utils/response-schemas';\nimport { injectLegacyEnvelopeStatus } from '../utils/envelope-status-compat';\nimport { parseCapabilitiesResponse } from '../utils/capabilities';\nimport { classifyProbeUrl } from '../utils/probe-policy';\nimport { SsrfRefusedError } from '../net/ssrf-fetch';\nimport { ADCP_VERSION } from '../version';\nimport type { VersionEnvelopeMode } from '../protocols';\n\nconst TEST_CLIENT_VERSION_OPTIONS = Symbol('adcp.testClientVersionOptions');\n\ninterface TestClientVersionOptions {\n adcpVersion: string;\n wireAdcpVersion?: string;\n versionEnvelope: VersionEnvelopeMode;\n authMode?: string;\n}\n\n/**\n * Extract a principal identifier from TestOptions auth.\n * For bearer auth this is the token; for basic auth this is the username;\n * for oauth this is the access_token.\n */\nexport function resolveAuthPrincipal(options: TestOptions): string | undefined {\n if (!options.auth) return undefined;\n switch (options.auth.type) {\n case 'basic':\n return options.auth.username;\n case 'oauth':\n return options.auth.tokens.access_token;\n case 'bearer':\n return options.auth.token;\n }\n}\n\nconst DEFAULT_BRAND_REF: BrandReference = { domain: 'test.example' };\n\n/**\n * Resolve the brand reference to use for a test call.\n * Prefers the new brand field, falls back to converting a legacy brand_manifest.\n *\n * The runner enforces a storyboard-run-scoped brand invariant on every\n * outgoing request, so a missing brand yields a stable default that stays\n * consistent across create/get/update/delete within a single run.\n */\nexport function resolveBrand(options: TestOptions): BrandReference {\n return (\n options.brand ||\n (options.brand_manifest && brandManifestToBrandReference(options.brand_manifest)) ||\n DEFAULT_BRAND_REF\n );\n}\n\n/**\n * Resolve the account reference to use for a test call.\n * Uses the brand+operator form of AccountReference.\n */\nexport function resolveAccount(options: TestOptions): AccountReference {\n const brand = resolveBrand(options);\n return {\n brand,\n operator: brand.domain,\n sandbox: options.sandbox,\n };\n}\n\n// Default console-based logger\nconst defaultLogger: Logger = {\n info: (ctx, msg) => console.log(`[INFO] ${msg}`, JSON.stringify(ctx, null, 2)),\n error: (ctx, msg) => console.error(`[ERROR] ${msg}`, JSON.stringify(ctx, null, 2)),\n warn: (ctx, msg) => console.warn(`[WARN] ${msg}`, JSON.stringify(ctx, null, 2)),\n debug: () => {}, // Silent by default\n};\n\n// Allow custom logger injection\nlet logger: Logger = defaultLogger;\n\n/**\n * Set a custom logger for the agent tester\n */\nexport function setAgentTesterLogger(customLogger: Logger): void {\n logger = customLogger;\n}\n\n/**\n * Get current logger instance\n */\nexport function getLogger(): Logger {\n return logger;\n}\n\n/**\n * Create a test client for an agent\n */\nexport function createTestClient(agentUrl: string, protocol: 'mcp' | 'a2a' = 'mcp', options: TestOptions = {}) {\n options = withTestKitAuthDefaults(options);\n\n // adcp-client#1618: SSRF policy gate at client construction. Once the\n // TestClient exists, every transport call inherits its agent URI; guarding\n // once here covers the entire client lifecycle, including downstream\n // `discoverAgentProfile` fetches (`getAgentInfo`, `getAdcpCapabilities`).\n // Throws synchronously — `SsrfRefusedError` is the documented refusal\n // type and operators see a clear hostname-only message (no resolved IP\n // in the user-visible text; see `probe-policy.ts` rationale).\n const policy = classifyProbeUrl(agentUrl);\n if (!policy.allowed) {\n // `classifyProbeUrl` already returned `{ allowed: true }` for any URL\n // that fails `new URL(...)`, so reaching the !allowed branch implies the\n // URL parses cleanly. Reparse only to extract the bare hostname for the\n // SsrfRefusedError meta.\n const hostname = new URL(agentUrl).hostname.replace(/^\\[|\\]$/g, '');\n throw new SsrfRefusedError(\n policy.code === 'always_blocked' ? 'always_blocked_address' : 'private_address',\n policy.reason,\n { url: agentUrl, hostname }\n );\n }\n\n const headers: Record<string, string> = {};\n\n if (options.test_session_id) {\n headers['X-Test-Session-ID'] = options.test_session_id;\n }\n\n // Build agent config with auth_token if provided\n const agentConfig: {\n id: string;\n name: string;\n agent_uri: string;\n protocol: 'mcp' | 'a2a';\n auth_token?: string;\n oauth_tokens?: import('../types/adcp').AgentOAuthTokens;\n oauth_client?: import('../types/adcp').AgentOAuthClient;\n oauth_client_credentials?: import('../types/adcp').AgentOAuthClientCredentials;\n headers?: Record<string, string>;\n } = {\n id: 'test',\n name: 'E2E Test Client',\n agent_uri: agentUrl,\n protocol,\n };\n\n // Caller-supplied tenant/routing headers carry through to every transport\n // request. Merged before auth so auth still wins on Authorization conflicts\n // (the basic-auth branch below intentionally overwrites this).\n if (options.headers && Object.keys(options.headers).length > 0) {\n agentConfig.headers = { ...options.headers };\n }\n\n // Add auth to agent config - the library will use it automatically\n if (options.auth) {\n if (options.auth.type === 'basic') {\n // basic: encode credentials here; library sends the Authorization header as-is\n const encoded = Buffer.from(`${options.auth.username}:${options.auth.password}`).toString('base64');\n agentConfig.headers = { ...agentConfig.headers, Authorization: `Basic ${encoded}` };\n } else if (options.auth.type === 'oauth') {\n // oauth: attach tokens + client registration; ProtocolClient detects\n // oauth_tokens and routes through the refresh-capable MCP OAuth path.\n agentConfig.oauth_tokens = options.auth.tokens;\n if (options.auth.client) agentConfig.oauth_client = options.auth.client;\n } else if (options.auth.type === 'oauth_client_credentials') {\n // oauth_client_credentials: attach credentials + optional cached tokens.\n // ProtocolClient pre-refreshes via secret re-exchange before each call\n // and sends the resulting access_token as a plain bearer.\n agentConfig.oauth_client_credentials = options.auth.credentials;\n if (options.auth.tokens) agentConfig.oauth_tokens = options.auth.tokens;\n } else {\n // bearer: raw token stored; library prepends 'Bearer ' internally via createMCPAuthHeaders\n agentConfig.auth_token = options.auth.token;\n }\n }\n\n const multiClient = new ADCPMultiAgentClient([agentConfig], {\n headers,\n validation: { logSchemaViolations: false },\n ...(options.adcpVersion !== undefined && { adcpVersion: options.adcpVersion }),\n ...(options.wireAdcpVersion !== undefined && { wireAdcpVersion: options.wireAdcpVersion }),\n ...(options.versionEnvelope !== undefined && { versionEnvelope: options.versionEnvelope }),\n ...(options.userAgent && { userAgent: options.userAgent }),\n });\n\n const client = multiClient.agent('test');\n const authMode = authReuseMode(options);\n Object.defineProperty(client, TEST_CLIENT_VERSION_OPTIONS, {\n value: {\n adcpVersion: multiClient.getAdcpVersion(),\n ...(options.wireAdcpVersion !== undefined && { wireAdcpVersion: options.wireAdcpVersion }),\n versionEnvelope: options.versionEnvelope ?? 'auto',\n ...(authMode !== undefined && { authMode }),\n } satisfies TestClientVersionOptions,\n enumerable: false,\n });\n return client;\n}\n\nexport type TestClient = ReturnType<typeof createTestClient>;\nexport interface TestClientResolution {\n client: TestClient;\n reusedShared: boolean;\n}\n\n/**\n * Return a shared client from options (set by comply()) or create a fresh one.\n * When comply() runs, it creates a single client and passes it via options._client\n * so scenarios reuse the same MCP connection instead of opening 36+ connections.\n */\nexport function getOrCreateClient(agentUrl: string, options: TestOptions): TestClient {\n return getOrCreateClientResolution(agentUrl, options).client;\n}\n\nexport function getOrCreateClientResolution(agentUrl: string, options: TestOptions): TestClientResolution {\n const shared = options._client as TestClient | undefined;\n if (shared && isExecutableTestClient(shared) && testClientMatchesVersionOptions(shared, options)) {\n return { client: shared, reusedShared: true };\n }\n return { client: createTestClient(agentUrl, options.protocol || 'mcp', options), reusedShared: false };\n}\n\nfunction isExecutableTestClient(client: unknown): client is TestClient {\n if (client == null || typeof client !== 'object') return false;\n const candidate = client as Record<string, unknown>;\n if (typeof candidate['executeTask'] === 'function' || typeof candidate['resetContext'] === 'function') return true;\n return Object.entries(candidate).some(([key, value]) => key !== 'getAgentInfo' && typeof value === 'function');\n}\n\nfunction testClientMatchesVersionOptions(client: TestClient, options: TestOptions): boolean {\n const effectiveOptions = withTestKitAuthDefaults(options);\n const meta = (client as unknown as { [TEST_CLIENT_VERSION_OPTIONS]?: TestClientVersionOptions })[\n TEST_CLIENT_VERSION_OPTIONS\n ];\n const expectedAuthMode = authReuseMode(effectiveOptions);\n if (!meta) {\n return effectiveOptions.adcpVersion === undefined && effectiveOptions.versionEnvelope === undefined;\n }\n const expectedAdcpVersion = effectiveOptions.adcpVersion ?? ADCP_VERSION;\n const expectedWireAdcpVersion = effectiveOptions.wireAdcpVersion;\n const expectedVersionEnvelope = effectiveOptions.versionEnvelope ?? 'auto';\n return (\n meta.adcpVersion === expectedAdcpVersion &&\n meta.wireAdcpVersion === expectedWireAdcpVersion &&\n meta.versionEnvelope === expectedVersionEnvelope &&\n meta.authMode === expectedAuthMode\n );\n}\n\nfunction withTestKitAuthDefaults(options: TestOptions): TestOptions {\n if (options.auth) return options;\n const apiKey = options.test_kit?.auth?.api_key;\n if (typeof apiKey === 'string' && apiKey.length > 0) {\n return { ...options, auth: { type: 'bearer', token: apiKey } };\n }\n\n const basic = options.test_kit?.auth?.basic;\n if (!basic) return options;\n if (\n typeof basic.username === 'string' &&\n basic.username.length > 0 &&\n typeof basic.password === 'string' &&\n basic.password.length > 0\n ) {\n return { ...options, auth: { type: 'basic', username: basic.username, password: basic.password } };\n }\n if (typeof basic.credentials === 'string') {\n const splitAt = basic.credentials.indexOf(':');\n if (splitAt > 0) {\n return {\n ...options,\n auth: {\n type: 'basic',\n username: basic.credentials.slice(0, splitAt),\n password: basic.credentials.slice(splitAt + 1),\n },\n };\n }\n }\n return options;\n}\n\nfunction authReuseMode(options: TestOptions): string | undefined {\n return options.auth?.type;\n}\n\n/**\n * Return a pre-discovered profile from options (set by comply()) or discover fresh.\n */\nexport async function getOrDiscoverProfile(\n client: TestClient,\n options: TestOptions\n): Promise<{ profile: AgentProfile; step: TestStepResult }> {\n if (options._profile) {\n return {\n profile: options._profile,\n step: { step: 'Discover agent capabilities', passed: true, duration_ms: 0 },\n };\n }\n return discoverAgentProfile(client, options.signal);\n}\n\n/**\n * Run a single test step with timing\n */\n/**\n * Race a promise against an AbortSignal. Adopted by `discoverAgentProfile`\n * so the comply pipeline's timeout actually bounds discovery wall-clock —\n * the underlying transport's `getAgentInfo()` doesn't accept a signal\n * (public API), so we resolve the wrapper promise on abort and let the\n * orphaned in-flight request finish on its own. (adcp-client#1612)\n *\n * Throws the signal's reason on abort.\n *\n * **SECURITY (security-reviewer follow-up on #1612):** the orphaned\n * promise's `.then` handlers below stay attached until the underlying\n * transport call settles. The resolved value `v` carries an authenticated\n * agent response — `getAgentInfo()` and `getAdcpCapabilities()` round-trip\n * through the bearer-token transport, so the promise body holds the wire\n * response in memory until GC'd. **Do not log `v` from inside this\n * resolver** (or any future `console.error` / telemetry hook on the\n * orphaned path) — the buyer has already moved on past the abort, and\n * logging here would leak agent-side data after the caller stopped\n * trusting it. The early `resolve(v)` is intentionally a no-op on the\n * already-rejected race-promise; `v` becomes unreferenced and GC-eligible\n * the moment this `.then` returns.\n */\nfunction raceWithSignal<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T> {\n if (!signal) return promise;\n if (signal.aborted) {\n return Promise.reject(signal.reason ?? new Error('aborted'));\n }\n return new Promise<T>((resolve, reject) => {\n const onAbort = () => reject(signal.reason ?? new Error('aborted'));\n signal.addEventListener('abort', onAbort, { once: true });\n promise.then(\n v => {\n signal.removeEventListener('abort', onAbort);\n // INTENTIONAL: no-op on an already-rejected race-promise. Do NOT\n // log `v` here — see security note in the JSDoc above.\n resolve(v);\n },\n e => {\n signal.removeEventListener('abort', onAbort);\n // INTENTIONAL: no-op on an already-rejected race-promise. Do NOT\n // log `e` here either — `Error.message` from a transport rejection\n // can carry an echoed response body, see security note above.\n reject(e);\n }\n );\n });\n}\n\n/**\n * Result of {@link runStep}. The optional `caughtError` carries the raw\n * thrown value (typed `unknown`, narrow via `instanceof` at the call site)\n * so callers can pattern-match on typed exceptions like\n * `ResponseSchemaValidationError` without losing the freeform string\n * representation on `step.error`. Pre-existing callers that only consume\n * `result` and `step` are unaffected.\n *\n * Spec: adcp-client#1709 (storyboard runner attributes Zod rejects to\n * the canonical `response_schema` validation entry by detecting the typed\n * error here).\n */\nexport interface RunStepOutcome<T> {\n result?: T;\n step: TestStepResult;\n caughtError?: unknown;\n}\n\nexport async function runStep<T>(\n stepName: string,\n taskName: string | undefined,\n fn: () => Promise<T>\n): Promise<RunStepOutcome<T>> {\n const start = Date.now();\n try {\n const result = await fn();\n const duration = Date.now() - start;\n return {\n result,\n step: {\n step: stepName,\n task: taskName,\n passed: true,\n duration_ms: duration,\n },\n };\n } catch (error) {\n const duration = Date.now() - start;\n const errorMessage = error instanceof Error ? error.message : String(error);\n return {\n step: {\n step: stepName,\n task: taskName,\n passed: false,\n duration_ms: duration,\n error: errorMessage,\n },\n caughtError: error,\n };\n }\n}\n\n/**\n * Discover agent profile - what capabilities does this agent have?\n *\n * When the agent exposes `get_adcp_capabilities`, its response populates\n * `supported_protocols` + `specialisms` on the profile so the compliance\n * runner can select domain and specialism bundles.\n *\n * Pass `signal` for hard external cancellation. `comply()` deliberately does\n * not pass its soft `timeout_ms` storyboard-start budget here; that budget\n * stops new storyboards after discovery instead of aborting an active run.\n */\nexport async function discoverAgentProfile(\n client: TestClient,\n signal?: AbortSignal\n): Promise<{ profile: AgentProfile; step: TestStepResult }> {\n const { result: agentInfo, step } = await runStep('Discover agent capabilities', 'getAgentInfo', () =>\n raceWithSignal(client.getAgentInfo({ signal }), signal)\n );\n\n const profile: AgentProfile = {\n name: agentInfo?.name || 'Unknown',\n tools: agentInfo?.tools?.map((t: { name: string }) => t.name) || [],\n };\n\n if (agentInfo) {\n step.details = `Agent: ${profile.name}, Tools: ${profile.tools.length}`;\n step.response_preview = JSON.stringify(\n {\n name: profile.name,\n tools: profile.tools,\n },\n null,\n 2\n );\n }\n\n if (profile.tools.includes('get_adcp_capabilities')) {\n try {\n const caps = (await raceWithSignal(client.getAdcpCapabilities({}, undefined, { signal }), signal)) as TaskResult;\n if (caps?.success && caps?.data) {\n profile.raw_capabilities = caps.data;\n const parsed = parseCapabilitiesResponse(caps.data);\n profile.adcp_version = parsed.version;\n profile.adcp_major_versions = parsed.majorVersions;\n if (parsed.supportedVersions !== undefined) profile.adcp_supported_versions = parsed.supportedVersions;\n if (parsed.buildVersion !== undefined) profile.adcp_build_version = parsed.buildVersion;\n profile.supported_protocols = parsed.protocols;\n profile.supports_governance = parsed.protocols.includes('governance');\n profile.supports_si = parsed.protocols.includes('sponsored_intelligence');\n const specialisms = (caps.data as { specialisms?: unknown }).specialisms;\n if (Array.isArray(specialisms)) {\n profile.specialisms = specialisms.filter((s): s is string => typeof s === 'string');\n }\n const libVersion = (caps.data as Record<string, unknown>).library_version;\n if (typeof libVersion === 'string') profile.library_version = libVersion;\n } else {\n profile.capabilities_probe_error = caps?.error || 'get_adcp_capabilities returned no data';\n }\n } catch (err) {\n // Agent advertises the tool but the call failed. Don't silently downgrade —\n // record the failure so the compliance report shows why only universal ran.\n profile.capabilities_probe_error = (err as Error)?.message || String(err);\n }\n }\n\n return { profile, step };\n}\n\n/**\n * Discover what channels, pricing models, formats the agent supports\n * by calling get_products and analyzing the response\n */\nexport async function discoverAgentCapabilities(\n client: TestClient,\n profile: AgentProfile,\n options: TestOptions\n): Promise<{ capabilities: Partial<AgentProfile>; steps: TestStepResult[] }> {\n const steps: TestStepResult[] = [];\n const capabilities: Partial<AgentProfile> = {};\n\n if (!profile.tools.includes('get_products')) {\n return { capabilities, steps };\n }\n\n const brief = options.brief || 'Show me all available advertising products across all channels';\n const getProductsParams: Record<string, unknown> = {\n buying_mode: 'brief',\n brief,\n brand: resolveBrand(options),\n };\n const { result, step } = await runStep<TaskResult>(\n 'Discover products for capability analysis',\n 'get_products',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- bypasses strict request typing\n async () => client.getProducts(getProductsParams as any) as Promise<TaskResult>\n );\n\n if (result?.success && result?.data) {\n const responseData = result.data as GetProductsResponse;\n const products: Product[] = responseData.products ?? [];\n\n // Extract unique channels\n const channels = new Set<string>();\n const pricingModels = new Set<string>();\n const formatIds = new Set<string>();\n const deliveryTypes = new Set<string>();\n\n for (const product of products) {\n // Channels from product\n if (product.channels) {\n for (const ch of product.channels) {\n channels.add(ch);\n }\n }\n // Delivery type\n if (product.delivery_type) {\n deliveryTypes.add(product.delivery_type);\n }\n // Pricing models\n if (product.pricing_options) {\n for (const po of product.pricing_options) {\n if (po.pricing_model) pricingModels.add(po.pricing_model);\n }\n }\n // Format IDs\n if (product.format_ids) {\n for (const fid of product.format_ids) {\n const id = typeof fid === 'string' ? fid : fid.id;\n if (id) formatIds.add(id);\n }\n }\n }\n\n capabilities.channels = Array.from(channels);\n capabilities.pricing_models = Array.from(pricingModels);\n capabilities.format_ids = Array.from(formatIds);\n capabilities.delivery_types = Array.from(deliveryTypes);\n\n step.details = `Found ${products.length} products across ${channels.size} channel(s), ${pricingModels.size} pricing model(s)`;\n step.response_preview = JSON.stringify(\n {\n products_count: products.length,\n channels: capabilities.channels,\n pricing_models: capabilities.pricing_models,\n delivery_types: capabilities.delivery_types,\n format_count: capabilities.format_ids?.length,\n },\n null,\n 2\n );\n step.observation_data = { products_count: products.length, channels: capabilities.channels };\n } else if (result && !result.success) {\n step.passed = false;\n step.error = result.error || 'get_products failed';\n }\n\n steps.push(step);\n return { capabilities, steps };\n}\n\n/**\n * Discover creative formats from a creative agent\n */\nexport async function discoverCreativeFormats(\n client: TestClient,\n profile: AgentProfile\n): Promise<{ formats: AgentProfile['supported_formats']; step: TestStepResult }> {\n const formats: AgentProfile['supported_formats'] = [];\n\n if (!profile.tools.includes('list_creative_formats')) {\n return {\n formats,\n step: {\n step: 'Discover creative formats',\n passed: false,\n duration_ms: 0,\n error: 'Agent does not support list_creative_formats',\n },\n };\n }\n\n const { result, step } = await runStep<TaskResult>(\n 'Discover creative formats',\n 'list_creative_formats',\n async () => client.listCreativeFormats({}) as Promise<TaskResult>\n );\n\n if (result?.success && result?.data) {\n const responseData = result.data as ListCreativeFormatsResponse;\n const rawFormats: Format[] = responseData.formats ?? [];\n const deprecatedFormats: string[] = [];\n\n for (const format of rawFormats) {\n const formatInfo: NonNullable<AgentProfile['supported_formats']>[0] = {\n format_id: format.format_id,\n name: format.name,\n required_assets: [],\n optional_assets: [],\n };\n\n // Check for deprecated assets_required usage\n if (usesDeprecatedAssetsField(format)) {\n const displayId = typeof formatInfo.format_id === 'object' ? formatInfo.format_id.id : formatInfo.format_id;\n deprecatedFormats.push(displayId);\n }\n\n // Extract asset requirements from format spec using format-assets utilities\n // This handles both v2.6 `assets` and deprecated `assets_required` fields\n const formatAssets = getFormatAssets(format);\n for (const asset of formatAssets) {\n const assetId = asset.item_type === 'individual' ? asset.asset_id : asset.asset_group_id;\n\n if (asset.required) {\n formatInfo.required_assets?.push(assetId);\n } else {\n formatInfo.optional_assets?.push(assetId);\n }\n }\n\n formats.push(formatInfo);\n }\n\n step.details = `Found ${formats.length} format(s)`;\n step.response_preview = JSON.stringify(\n {\n format_count: formats.length,\n sample_formats: formats.slice(0, 3).map(f => ({\n id: f.format_id,\n name: f.name,\n required_assets: f.required_assets?.length || 0,\n })),\n },\n null,\n 2\n );\n\n // Add deprecation warnings if any formats use assets_required\n if (deprecatedFormats.length > 0) {\n step.warnings = [\n `⚠️ DEPRECATION: ${deprecatedFormats.length} format(s) use 'assets_required' field which is deprecated and will be removed in a future version. Please migrate to the 'assets' field instead. (adcp-client 3.6.0+)`,\n ];\n logger.warn(\n { deprecated_formats: deprecatedFormats },\n `Agent uses deprecated 'assets_required' field in ${deprecatedFormats.length} format(s). Migrate to 'assets' field.`\n );\n }\n } else if (result && !result.success) {\n step.passed = false;\n step.error = result.error || 'list_creative_formats failed';\n }\n\n return { formats, step };\n}\n\n/**\n * Discover signals from a signals agent\n */\nexport async function discoverSignals(\n client: TestClient,\n profile: AgentProfile,\n options: TestOptions\n): Promise<{\n signals: AgentProfile['supported_signals'];\n rawSignals: GetSignalsResponse['signals'];\n step: TestStepResult;\n schemaStep?: TestStepResult;\n}> {\n const signals: AgentProfile['supported_signals'] = [];\n let rawSignals: GetSignalsResponse['signals'] = [];\n\n if (!profile.tools.includes('get_signals')) {\n return {\n signals,\n rawSignals,\n step: {\n step: 'Discover signals',\n passed: false,\n duration_ms: 0,\n error: 'Agent does not support get_signals',\n },\n };\n }\n\n const { result, step } = await runStep<TaskResult>(\n 'Discover available signals',\n 'get_signals',\n async () =>\n client.getSignals({\n signal_spec: options.brief || 'Show me all available audience signals and segments',\n }) as Promise<TaskResult>\n );\n\n let schemaStep: TestStepResult | undefined;\n\n if (result?.success && result?.data) {\n schemaStep = validateResponseSchema('get_signals', result.data);\n const responseData = result.data as GetSignalsResponse;\n rawSignals = responseData.signals ?? [];\n\n for (const signal of rawSignals) {\n const signalData = signal as {\n signal_agent_segment_id?: unknown;\n signal_ref?: unknown;\n name?: unknown;\n signal_type?: unknown;\n type?: unknown;\n };\n let signalId: string | undefined;\n if (typeof signalData.signal_agent_segment_id === 'string') {\n signalId = signalData.signal_agent_segment_id;\n } else if (typeof signalData.signal_ref === 'string') {\n signalId = signalData.signal_ref;\n } else if (signalData.signal_ref != null) {\n // Summary-only convenience for the test report; rawSignals above\n // preserves the seller's canonical signal_ref object.\n signalId = JSON.stringify(signalData.signal_ref);\n }\n if (!signalId) continue;\n signals.push({\n signal_id: signalId,\n name: typeof signalData.name === 'string' ? signalData.name : undefined,\n type:\n typeof signalData.signal_type === 'string'\n ? signalData.signal_type\n : typeof signalData.type === 'string'\n ? signalData.type\n : undefined,\n });\n }\n\n step.details = `Found ${signals.length} signal(s)`;\n step.response_preview = JSON.stringify(\n {\n signal_count: signals.length,\n signal_types: [...new Set(signals.map(s => s.type).filter(Boolean))],\n sample_signals: signals.slice(0, 5).map(s => ({\n id: s.signal_id,\n name: s.name,\n type: s.type,\n })),\n },\n null,\n 2\n );\n } else if (result && !result.success) {\n step.passed = false;\n step.error = result.error || 'get_signals failed';\n }\n\n return { signals, rawSignals, step, schemaStep };\n}\n\n/**\n * Validate response data against the AdCP Zod schema for a tool.\n * Returns a TestStepResult indicating pass/fail with details on schema violations.\n *\n * For union schemas (success | error responses), Zod's top-level error is the\n * unhelpful \"(root): Invalid input\". This function detects that case and\n * reports per-variant errors instead, picking the variant with the fewest\n * issues (the closest match) so the developer sees actionable field names.\n *\n * Violations are split into two categories so remediation guidance differs\n * appropriately (set the field vs. fix the value):\n * - `required` — a required field is absent from the response. Zod emits\n * `invalid_type` with `received: 'undefined'` for this case; we re-tag\n * it as `required` and report it as a missing field.\n * - constraint keyword (`minimum`, `maximum`, `enum`, `format`, …) — the\n * field is present but violates a JSON Schema keyword constraint.\n */\nexport function validateResponseSchema(toolName: string, data: unknown, responseAdcpVersion?: string): TestStepResult {\n const schema = TOOL_RESPONSE_SCHEMAS[toolName];\n if (!schema) {\n return {\n step: `Schema validation: ${toolName}`,\n passed: true,\n duration_ms: 0,\n details: `No response schema available for ${toolName}`,\n warnings: [`No Zod schema registered for \"${toolName}\" — validation skipped`],\n };\n }\n\n // 3.0.x back-compat: synthesize envelope `status` for legacy peers so\n // strict 3.1 validators don't reject otherwise-conformant 3.0 wire\n // responses. See `utils/envelope-status-compat.ts`.\n const compatData =\n data && typeof data === 'object' && !Array.isArray(data)\n ? injectLegacyEnvelopeStatus(data as Record<string, unknown>, { toolName })\n : data;\n const result = schema.safeParse(prepareResponseForSchemaValidation(toolName, compatData, responseAdcpVersion));\n if (result.success) {\n return {\n step: `Schema validation: ${toolName}`,\n passed: true,\n duration_ms: 0,\n details: `Response matches ${toolName} schema`,\n };\n }\n\n let violations: SchemaViolation[] = result.error.issues.map(i => {\n const path = i.path.length > 0 ? i.path.join('.') : '(root)';\n return { path, message: i.message, code: i.code };\n });\n\n // Union schemas produce \"(root): Invalid input\" when no variant matches.\n // Try each variant individually and report the closest match's errors.\n const first = violations[0];\n const isUnionError = violations.length === 1 && first && first.path === '(root)' && first.code === 'invalid_union';\n\n if (isUnionError) {\n const betterErrors = getBestUnionErrors(schema, data);\n if (betterErrors && betterErrors.length > 0) {\n violations = betterErrors;\n }\n }\n\n const classified = violations.map(classifyViolation);\n const missing = classified.filter(v => v.kind === 'missing');\n const constraint = classified.filter(v => v.kind === 'constraint');\n\n const parts: string[] = [];\n if (missing.length > 0) {\n parts.push(`Response missing required fields: ${missing.map(v => v.json_pointer).join(', ')}`);\n }\n if (constraint.length > 0) {\n parts.push(\n `Response constraint violations: ${constraint\n .map(v => `${v.json_pointer} (${v.keyword}): ${v.message}`)\n .join('; ')}`\n );\n }\n\n return {\n step: `Schema validation: ${toolName}`,\n passed: false,\n duration_ms: 0,\n error: parts.join(' | '),\n response_preview: JSON.stringify({ violations: classified }, null, 2),\n };\n}\n\n/**\n * Classify a Zod-flavored schema violation as either a missing required field\n * or a constraint violation (with the failed JSON Schema keyword). Adds a\n * JSON Pointer (`/foo/0/bar`) so downstream tooling can locate the field\n * without re-parsing dot paths.\n */\nfunction classifyViolation(v: SchemaViolation): {\n kind: 'missing' | 'constraint';\n json_pointer: string;\n keyword: string;\n message: string;\n code: SchemaViolation['code'];\n} {\n const segments = v.path === '(root)' ? [] : v.path.split('.');\n const json_pointer = '/' + segments.map(s => s.replace(/~/g, '~0').replace(/\\//g, '~1')).join('/');\n\n // Zod emits `invalid_type` with `received: 'undefined'` for missing required\n // fields. The `code` alone is ambiguous (`invalid_type` also covers wrong-\n // type-but-present), so we sniff the message for the canonical Zod wording.\n const isMissing = v.code === 'invalid_type' && /received `?undefined`?/i.test(v.message);\n if (isMissing) {\n return { kind: 'missing', json_pointer, keyword: 'required', message: v.message, code: v.code };\n }\n\n return {\n kind: 'constraint',\n json_pointer,\n keyword: zodCodeToKeyword(v.code),\n message: v.message,\n code: v.code,\n };\n}\n\n/**\n * Map a Zod error code to the equivalent JSON Schema keyword so downstream\n * tooling (and humans reading the report) see the standard vocabulary\n * (`minimum`, `enum`, `format`, …) instead of Zod-specific names.\n */\nfunction zodCodeToKeyword(code: SchemaViolation['code']): string {\n switch (code) {\n case 'invalid_type':\n return 'type';\n case 'invalid_value':\n return 'enum';\n case 'too_small':\n return 'minimum';\n case 'too_big':\n return 'maximum';\n case 'invalid_format':\n return 'format';\n case 'unrecognized_keys':\n return 'additionalProperties';\n case 'invalid_union':\n return 'oneOf';\n case 'not_multiple_of':\n return 'multipleOf';\n default:\n return code;\n }\n}\n"],"mappings":"AAIA,SAAS,4BAA4B;AACrC,SAAS,0BAAgD;AACzD,SAAS,iBAAiB,iCAAiC;AAC3D,SAAS,qCAAqC;AAW9C,SAAS,oCAAoC,6BAA6B;AAC1E,SAAS,kCAAkC;AAC3C,SAAS,iCAAiC;AAC1C,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAG7B,MAAM,8BAA8B,uBAAO,+BAA+B;AAcnE,SAAS,qBAAqB,SAA0C;AAC7E,MAAI,CAAC,QAAQ,KAAM,QAAO;AAC1B,UAAQ,QAAQ,KAAK,MAAM;AAAA,IACzB,KAAK;AACH,aAAO,QAAQ,KAAK;AAAA,IACtB,KAAK;AACH,aAAO,QAAQ,KAAK,OAAO;AAAA,IAC7B,KAAK;AACH,aAAO,QAAQ,KAAK;AAAA,EACxB;AACF;AAEA,MAAM,oBAAoC,EAAE,QAAQ,eAAe;AAU5D,SAAS,aAAa,SAAsC;AACjE,SACE,QAAQ,SACP,QAAQ,kBAAkB,8BAA8B,QAAQ,cAAc,KAC/E;AAEJ;AAMO,SAAS,eAAe,SAAwC;AACrE,QAAM,QAAQ,aAAa,OAAO;AAClC,SAAO;AAAA,IACL;AAAA,IACA,UAAU,MAAM;AAAA,IAChB,SAAS,QAAQ;AAAA,EACnB;AACF;AAGA,MAAM,gBAAwB;AAAA,EAC5B,MAAM,CAAC,KAAK,QAAQ,QAAQ,IAAI,UAAU,GAAG,IAAI,KAAK,UAAU,KAAK,MAAM,CAAC,CAAC;AAAA,EAC7E,OAAO,CAAC,KAAK,QAAQ,QAAQ,MAAM,WAAW,GAAG,IAAI,KAAK,UAAU,KAAK,MAAM,CAAC,CAAC;AAAA,EACj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,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;","names":[]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { fileURLToPath as __adcpFileURLToPath } from 'node:url';
|
|
2
|
-
import { dirname as __adcpDirname } from 'node:path';
|
|
3
|
-
import { createRequire as __adcpCreateRequire } from 'node:module';
|
|
4
|
-
const __filename = __adcpFileURLToPath(import.meta.url);
|
|
5
|
-
const __dirname = __adcpDirname(__filename);
|
|
6
|
-
const require = __adcpCreateRequire(import.meta.url);
|
|
7
1
|
const SAMPLE_BRIEFS = [
|
|
8
2
|
{
|
|
9
3
|
id: "luxury_auto_ev",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/testing/compliance/briefs.ts"],"sourcesContent":["/**\n * Sample Brief Library\n *\n * Curated briefs across verticals, objectives, and constraints.\n * Available as building blocks for platforms and testing tools.\n */\n\nimport type { SampleBrief } from './types';\n\nexport const SAMPLE_BRIEFS: SampleBrief[] = [\n {\n id: 'luxury_auto_ev',\n name: 'Luxury Auto EV Launch',\n vertical: 'Automotive',\n brief:\n 'Luxury automotive brand launching a new electric crossover SUV. ' +\n 'Targeting high-income households ($150K+ HHI), ages 30-55, in major US metros. ' +\n 'Need high-impact video and premium display placements. ' +\n '$500,000 budget, Q3 flight (July-September). ' +\n 'Key message: \"The future of luxury driving.\" Brand safety is critical — no UGC or controversial adjacency.',\n evaluation_hints:\n 'Strong response returns both video AND display products (the brief explicitly asks for both). ' +\n 'Products should reference auto/luxury vertical targeting or premium audience segments. ' +\n 'Pricing should make sense for a $500K budget. ' +\n 'Products with audience targeting fields populated score higher. ' +\n 'Weak response: only one format, generic descriptions, no audience data.',\n budget_context: '$500,000 total campaign budget',\n expected_channels: ['display', 'olv', 'ctv'],\n },\n {\n id: 'dtc_skincare_genZ',\n name: 'DTC Skincare Gen Z Sprint',\n vertical: 'Beauty & Personal Care',\n brief:\n 'Direct-to-consumer skincare brand targeting Gen Z females (18-25). ' +\n 'Social-first campaign with UGC-style creative preferred. ' +\n '$50,000 test budget, 2-week sprint. ' +\n 'Goal is driving trial purchases through a 20% off promo code. ' +\n 'Performance-oriented: need clear CPA/CPC pricing.',\n evaluation_hints:\n 'Strong response returns products with performance pricing models (CPC, CPA) — not just CPM. ' +\n 'Social or native placements are ideal given the brief. ' +\n 'Products should be appropriate for a $50K test budget (not enterprise minimums). ' +\n 'Audience targeting for younger demographics is a plus. ' +\n 'Weak response: only premium CPM products, high minimums, no performance options.',\n budget_context: '$50,000 test budget',\n expected_channels: ['social', 'display'],\n },\n {\n id: 'b2b_saas_awareness',\n name: 'B2B SaaS Brand Awareness',\n vertical: 'Technology / B2B',\n brief:\n 'Enterprise SaaS company building brand awareness among IT decision-makers and C-suite executives. ' +\n 'Looking for premium editorial environments — business, technology, and finance publishers. ' +\n '$200,000 budget over 6 weeks. ' +\n 'Display and native content placements preferred. CTV is acceptable if targeting is precise. ' +\n 'Viewability benchmarks are important — need 70%+ viewability guarantee.',\n evaluation_hints:\n 'Strong response returns products with premium publisher placements (not just programmatic remnant). ' +\n 'Products mentioning B2B audience segments, professional targeting, or contextual targeting score higher. ' +\n 'Viewability guarantees or benchmarks in the product metadata are valuable. ' +\n 'Native content placements alongside editorial content are ideal. ' +\n 'Weak response: generic display products with no premium differentiation.',\n budget_context: '$200,000 over 6 weeks',\n expected_channels: ['display', 'ctv'],\n },\n {\n id: 'restaurant_local',\n name: 'Restaurant Chain Local Promotion',\n vertical: 'QSR / Restaurant',\n brief:\n 'Regional restaurant chain promoting a new menu launch across 15 metro areas. ' +\n 'Need geo-targeted mobile and display ads within 5-mile radius of each location. ' +\n '$75,000 budget, 3-week flight. ' +\n 'Audio/podcast ads are also interesting if available. ' +\n 'Performance tracking: need foot traffic attribution or store visit metrics.',\n evaluation_hints:\n 'Strong response returns products with geo-targeting capabilities at the metro or zip level. ' +\n 'Mobile-specific products score higher given the local intent. ' +\n 'Audio/podcast products show catalog breadth. ' +\n 'Products with attribution/measurement capabilities (foot traffic, store visits) are very valuable. ' +\n 'Weak response: national-only products with no geo-targeting capability.',\n budget_context: '$75,000 across 15 metros',\n expected_channels: ['display', 'streaming_audio', 'podcast', 'dooh'],\n },\n {\n id: 'streaming_ctv_entertainment',\n name: 'Streaming Service CTV Campaign',\n vertical: 'Entertainment / Media',\n brief:\n 'Major streaming service promoting original content launch. ' +\n 'CTV and OLV-focused campaign targeting cord-cutters ages 18-49. ' +\n '$1,000,000 budget, 4-week premiere window. ' +\n 'Need non-skippable pre-roll and mid-roll video placements. ' +\n 'Frequency cap of 3x/week per household. ' +\n 'Must support VAST 4.2 tags.',\n evaluation_hints:\n 'Strong response returns CTV and OLV products with clear video format specifications. ' +\n 'Products should mention non-skip capabilities, VAST support, or programmatic video standards. ' +\n 'Frequency capping capability in the product metadata is important. ' +\n 'Premium/long-form video inventory scores higher than short-form. ' +\n 'Weak response: display-only products, no video inventory, no mention of VAST/video specs.',\n budget_context: '$1,000,000 premiere campaign',\n expected_channels: ['ctv', 'olv'],\n },\n {\n id: 'ecommerce_holiday',\n name: 'E-Commerce Holiday Retargeting',\n vertical: 'Retail / E-Commerce',\n brief:\n 'E-commerce retailer running holiday retargeting campaign. ' +\n 'Targeting past site visitors and cart abandoners with dynamic product ads. ' +\n '$150,000 budget across Black Friday through Cyber Monday (5 days). ' +\n 'Need dynamic creative optimization and product feed integration. ' +\n 'Pricing: CPC or CPA preferred for direct response.',\n evaluation_hints:\n 'Strong response returns products supporting dynamic creative, retargeting audiences, or product feed integration. ' +\n 'CPC/CPA pricing models are better fits than CPM for this performance brief. ' +\n 'Products with audience targeting or first-party data capabilities score higher. ' +\n 'Short flight window means products should support fast activation. ' +\n 'Weak response: awareness-only products, no performance pricing, no dynamic creative capabilities.',\n budget_context: '$150,000 over 5 days (intensive)',\n expected_channels: ['display', 'social'],\n },\n {\n id: 'pharma_awareness',\n name: 'Pharmaceutical HCP Campaign',\n vertical: 'Healthcare / Pharma',\n brief:\n 'Pharmaceutical company promoting a new treatment to healthcare professionals (HCPs). ' +\n 'Targeting physicians, pharmacists, and nurse practitioners in oncology. ' +\n 'Need endemic medical publisher placements — JAMA, Medscape, WebMD Pro. ' +\n '$300,000 budget, 8-week awareness flight. ' +\n 'Strict regulatory compliance: all ads must include ISI (Important Safety Information). ' +\n 'No programmatic open exchange — direct or PMP only.',\n evaluation_hints:\n 'Strong response returns products on medical/healthcare publisher inventory with HCP targeting. ' +\n 'Direct or PMP deal types (not open exchange) match the brief requirements. ' +\n 'Products mentioning compliance, regulatory support, or ISI handling score higher. ' +\n 'Endemic publisher inventory is more valuable than general programmatic for this brief. ' +\n 'Weak response: open exchange programmatic with no vertical targeting or compliance features.',\n budget_context: '$300,000 over 8 weeks',\n expected_channels: ['display'],\n },\n {\n id: 'small_budget_test',\n name: 'Small Budget Performance Test',\n vertical: 'General',\n brief:\n 'Small business testing digital advertising for the first time. ' +\n '$5,000 total budget, 2-week test. ' +\n 'Looking for the most efficient way to drive website traffic. ' +\n 'Open to any format or channel. Needs clear reporting.',\n evaluation_hints:\n 'Strong response returns accessible products with low minimums that work at $5K scale. ' +\n 'CPC pricing is ideal for traffic-driving goals. ' +\n 'Products should be actionable without complex setup. ' +\n 'Showing variety of options at accessible price points demonstrates good catalog design. ' +\n 'Weak response: enterprise-only products with $50K minimums, or no products at this budget level.',\n budget_context: '$5,000 total (very small)',\n },\n];\n\nexport function getBriefById(id: string): SampleBrief | undefined {\n return SAMPLE_BRIEFS.find(b => b.id === id);\n}\n\nexport function getBriefsByVertical(vertical: string): SampleBrief[] {\n return SAMPLE_BRIEFS.filter(b => b.vertical.toLowerCase().includes(vertical.toLowerCase()));\n}\n"],"mappings":";;;;;;AASO,MAAM,gBAA+B;AAAA,EAC1C;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OACE;AAAA,IAKF,kBACE;AAAA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,aAAa,IAAqC;AAChE,SAAO,cAAc,KAAK,OAAK,EAAE,OAAO,EAAE;AAC5C;AAEO,SAAS,oBAAoB,UAAiC;AACnE,SAAO,cAAc,OAAO,OAAK,EAAE,SAAS,YAAY,EAAE,SAAS,SAAS,YAAY,CAAC,CAAC;AAC5F;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/testing/compliance/briefs.ts"],"sourcesContent":["/**\n * Sample Brief Library\n *\n * Curated briefs across verticals, objectives, and constraints.\n * Available as building blocks for platforms and testing tools.\n */\n\nimport type { SampleBrief } from './types';\n\nexport const SAMPLE_BRIEFS: SampleBrief[] = [\n {\n id: 'luxury_auto_ev',\n name: 'Luxury Auto EV Launch',\n vertical: 'Automotive',\n brief:\n 'Luxury automotive brand launching a new electric crossover SUV. ' +\n 'Targeting high-income households ($150K+ HHI), ages 30-55, in major US metros. ' +\n 'Need high-impact video and premium display placements. ' +\n '$500,000 budget, Q3 flight (July-September). ' +\n 'Key message: \"The future of luxury driving.\" Brand safety is critical — no UGC or controversial adjacency.',\n evaluation_hints:\n 'Strong response returns both video AND display products (the brief explicitly asks for both). ' +\n 'Products should reference auto/luxury vertical targeting or premium audience segments. ' +\n 'Pricing should make sense for a $500K budget. ' +\n 'Products with audience targeting fields populated score higher. ' +\n 'Weak response: only one format, generic descriptions, no audience data.',\n budget_context: '$500,000 total campaign budget',\n expected_channels: ['display', 'olv', 'ctv'],\n },\n {\n id: 'dtc_skincare_genZ',\n name: 'DTC Skincare Gen Z Sprint',\n vertical: 'Beauty & Personal Care',\n brief:\n 'Direct-to-consumer skincare brand targeting Gen Z females (18-25). ' +\n 'Social-first campaign with UGC-style creative preferred. ' +\n '$50,000 test budget, 2-week sprint. ' +\n 'Goal is driving trial purchases through a 20% off promo code. ' +\n 'Performance-oriented: need clear CPA/CPC pricing.',\n evaluation_hints:\n 'Strong response returns products with performance pricing models (CPC, CPA) — not just CPM. ' +\n 'Social or native placements are ideal given the brief. ' +\n 'Products should be appropriate for a $50K test budget (not enterprise minimums). ' +\n 'Audience targeting for younger demographics is a plus. ' +\n 'Weak response: only premium CPM products, high minimums, no performance options.',\n budget_context: '$50,000 test budget',\n expected_channels: ['social', 'display'],\n },\n {\n id: 'b2b_saas_awareness',\n name: 'B2B SaaS Brand Awareness',\n vertical: 'Technology / B2B',\n brief:\n 'Enterprise SaaS company building brand awareness among IT decision-makers and C-suite executives. ' +\n 'Looking for premium editorial environments — business, technology, and finance publishers. ' +\n '$200,000 budget over 6 weeks. ' +\n 'Display and native content placements preferred. CTV is acceptable if targeting is precise. ' +\n 'Viewability benchmarks are important — need 70%+ viewability guarantee.',\n evaluation_hints:\n 'Strong response returns products with premium publisher placements (not just programmatic remnant). ' +\n 'Products mentioning B2B audience segments, professional targeting, or contextual targeting score higher. ' +\n 'Viewability guarantees or benchmarks in the product metadata are valuable. ' +\n 'Native content placements alongside editorial content are ideal. ' +\n 'Weak response: generic display products with no premium differentiation.',\n budget_context: '$200,000 over 6 weeks',\n expected_channels: ['display', 'ctv'],\n },\n {\n id: 'restaurant_local',\n name: 'Restaurant Chain Local Promotion',\n vertical: 'QSR / Restaurant',\n brief:\n 'Regional restaurant chain promoting a new menu launch across 15 metro areas. ' +\n 'Need geo-targeted mobile and display ads within 5-mile radius of each location. ' +\n '$75,000 budget, 3-week flight. ' +\n 'Audio/podcast ads are also interesting if available. ' +\n 'Performance tracking: need foot traffic attribution or store visit metrics.',\n evaluation_hints:\n 'Strong response returns products with geo-targeting capabilities at the metro or zip level. ' +\n 'Mobile-specific products score higher given the local intent. ' +\n 'Audio/podcast products show catalog breadth. ' +\n 'Products with attribution/measurement capabilities (foot traffic, store visits) are very valuable. ' +\n 'Weak response: national-only products with no geo-targeting capability.',\n budget_context: '$75,000 across 15 metros',\n expected_channels: ['display', 'streaming_audio', 'podcast', 'dooh'],\n },\n {\n id: 'streaming_ctv_entertainment',\n name: 'Streaming Service CTV Campaign',\n vertical: 'Entertainment / Media',\n brief:\n 'Major streaming service promoting original content launch. ' +\n 'CTV and OLV-focused campaign targeting cord-cutters ages 18-49. ' +\n '$1,000,000 budget, 4-week premiere window. ' +\n 'Need non-skippable pre-roll and mid-roll video placements. ' +\n 'Frequency cap of 3x/week per household. ' +\n 'Must support VAST 4.2 tags.',\n evaluation_hints:\n 'Strong response returns CTV and OLV products with clear video format specifications. ' +\n 'Products should mention non-skip capabilities, VAST support, or programmatic video standards. ' +\n 'Frequency capping capability in the product metadata is important. ' +\n 'Premium/long-form video inventory scores higher than short-form. ' +\n 'Weak response: display-only products, no video inventory, no mention of VAST/video specs.',\n budget_context: '$1,000,000 premiere campaign',\n expected_channels: ['ctv', 'olv'],\n },\n {\n id: 'ecommerce_holiday',\n name: 'E-Commerce Holiday Retargeting',\n vertical: 'Retail / E-Commerce',\n brief:\n 'E-commerce retailer running holiday retargeting campaign. ' +\n 'Targeting past site visitors and cart abandoners with dynamic product ads. ' +\n '$150,000 budget across Black Friday through Cyber Monday (5 days). ' +\n 'Need dynamic creative optimization and product feed integration. ' +\n 'Pricing: CPC or CPA preferred for direct response.',\n evaluation_hints:\n 'Strong response returns products supporting dynamic creative, retargeting audiences, or product feed integration. ' +\n 'CPC/CPA pricing models are better fits than CPM for this performance brief. ' +\n 'Products with audience targeting or first-party data capabilities score higher. ' +\n 'Short flight window means products should support fast activation. ' +\n 'Weak response: awareness-only products, no performance pricing, no dynamic creative capabilities.',\n budget_context: '$150,000 over 5 days (intensive)',\n expected_channels: ['display', 'social'],\n },\n {\n id: 'pharma_awareness',\n name: 'Pharmaceutical HCP Campaign',\n vertical: 'Healthcare / Pharma',\n brief:\n 'Pharmaceutical company promoting a new treatment to healthcare professionals (HCPs). ' +\n 'Targeting physicians, pharmacists, and nurse practitioners in oncology. ' +\n 'Need endemic medical publisher placements — JAMA, Medscape, WebMD Pro. ' +\n '$300,000 budget, 8-week awareness flight. ' +\n 'Strict regulatory compliance: all ads must include ISI (Important Safety Information). ' +\n 'No programmatic open exchange — direct or PMP only.',\n evaluation_hints:\n 'Strong response returns products on medical/healthcare publisher inventory with HCP targeting. ' +\n 'Direct or PMP deal types (not open exchange) match the brief requirements. ' +\n 'Products mentioning compliance, regulatory support, or ISI handling score higher. ' +\n 'Endemic publisher inventory is more valuable than general programmatic for this brief. ' +\n 'Weak response: open exchange programmatic with no vertical targeting or compliance features.',\n budget_context: '$300,000 over 8 weeks',\n expected_channels: ['display'],\n },\n {\n id: 'small_budget_test',\n name: 'Small Budget Performance Test',\n vertical: 'General',\n brief:\n 'Small business testing digital advertising for the first time. ' +\n '$5,000 total budget, 2-week test. ' +\n 'Looking for the most efficient way to drive website traffic. ' +\n 'Open to any format or channel. Needs clear reporting.',\n evaluation_hints:\n 'Strong response returns accessible products with low minimums that work at $5K scale. ' +\n 'CPC pricing is ideal for traffic-driving goals. ' +\n 'Products should be actionable without complex setup. ' +\n 'Showing variety of options at accessible price points demonstrates good catalog design. ' +\n 'Weak response: enterprise-only products with $50K minimums, or no products at this budget level.',\n budget_context: '$5,000 total (very small)',\n },\n];\n\nexport function getBriefById(id: string): SampleBrief | undefined {\n return SAMPLE_BRIEFS.find(b => b.id === id);\n}\n\nexport function getBriefsByVertical(vertical: string): SampleBrief[] {\n return SAMPLE_BRIEFS.filter(b => b.vertical.toLowerCase().includes(vertical.toLowerCase()));\n}\n"],"mappings":"AASO,MAAM,gBAA+B;AAAA,EAC1C;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OACE;AAAA,IAKF,kBACE;AAAA,IAKF,gBAAgB;AAAA,IAChB,mBAAmB,CAAC,WAAW,OAAO,KAAK;AAAA,EAC7C;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OACE;AAAA,IAKF,kBACE;AAAA,IAKF,gBAAgB;AAAA,IAChB,mBAAmB,CAAC,UAAU,SAAS;AAAA,EACzC;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OACE;AAAA,IAKF,kBACE;AAAA,IAKF,gBAAgB;AAAA,IAChB,mBAAmB,CAAC,WAAW,KAAK;AAAA,EACtC;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OACE;AAAA,IAKF,kBACE;AAAA,IAKF,gBAAgB;AAAA,IAChB,mBAAmB,CAAC,WAAW,mBAAmB,WAAW,MAAM;AAAA,EACrE;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OACE;AAAA,IAMF,kBACE;AAAA,IAKF,gBAAgB;AAAA,IAChB,mBAAmB,CAAC,OAAO,KAAK;AAAA,EAClC;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OACE;AAAA,IAKF,kBACE;AAAA,IAKF,gBAAgB;AAAA,IAChB,mBAAmB,CAAC,WAAW,QAAQ;AAAA,EACzC;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OACE;AAAA,IAMF,kBACE;AAAA,IAKF,gBAAgB;AAAA,IAChB,mBAAmB,CAAC,SAAS;AAAA,EAC/B;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OACE;AAAA,IAIF,kBACE;AAAA,IAKF,gBAAgB;AAAA,EAClB;AACF;AAEO,SAAS,aAAa,IAAqC;AAChE,SAAO,cAAc,KAAK,OAAK,EAAE,OAAO,EAAE;AAC5C;AAEO,SAAS,oBAAoB,UAAiC;AACnE,SAAO,cAAc,OAAO,OAAK,EAAE,SAAS,YAAY,EAAE,SAAS,SAAS,YAAY,CAAC,CAAC;AAC5F;","names":[]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { fileURLToPath as __adcpFileURLToPath } from 'node:url';
|
|
2
|
-
import { dirname as __adcpDirname } from 'node:path';
|
|
3
|
-
import { createRequire as __adcpCreateRequire } from 'node:module';
|
|
4
|
-
const __filename = __adcpFileURLToPath(import.meta.url);
|
|
5
|
-
const __dirname = __adcpDirname(__filename);
|
|
6
|
-
const require = __adcpCreateRequire(import.meta.url);
|
|
7
1
|
import { createTestClient, discoverAgentProfile } from "../client.mjs";
|
|
8
2
|
import { mapStoryboardResultsToTrackResult, TRACK_LABELS } from "./storyboard-tracks.mjs";
|
|
9
3
|
import { applyAdcpVersionRunOptions, runStoryboard } from "../storyboard/runner.mjs";
|