@adcp/sdk 13.0.0-rc.4 → 13.0.0-rc.6
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/README.md +7 -1
- package/bin/adcp.js +7 -1
- package/dist/lib/adapters/property-list-adapter.d.mts +5 -1
- package/dist/lib/adapters/property-list-adapter.d.ts +5 -1
- package/dist/lib/adapters/property-list-adapter.d.ts.map +1 -1
- package/dist/lib/adapters/property-list-adapter.js +7 -7
- package/dist/lib/adapters/property-list-adapter.js.map +1 -1
- package/dist/lib/adapters/property-list-adapter.mjs +7 -7
- package/dist/lib/adapters/property-list-adapter.mjs.map +1 -1
- package/dist/lib/auth/oauth/CLIFlowHandler.d.mts +10 -3
- package/dist/lib/auth/oauth/CLIFlowHandler.d.ts +10 -3
- package/dist/lib/auth/oauth/CLIFlowHandler.d.ts.map +1 -1
- package/dist/lib/auth/oauth/CLIFlowHandler.js +40 -4
- package/dist/lib/auth/oauth/CLIFlowHandler.js.map +1 -1
- package/dist/lib/auth/oauth/CLIFlowHandler.mjs +40 -4
- package/dist/lib/auth/oauth/CLIFlowHandler.mjs.map +1 -1
- package/dist/lib/auth/oauth/index.d.mts +1 -1
- package/dist/lib/auth/oauth/index.d.ts +1 -1
- package/dist/lib/auth/oauth/index.d.ts.map +1 -1
- package/dist/lib/auth/oauth/index.js +2 -0
- package/dist/lib/auth/oauth/index.js.map +1 -1
- package/dist/lib/auth/oauth/index.mjs +2 -0
- package/dist/lib/auth/oauth/index.mjs.map +1 -1
- package/dist/lib/auth/oauth/web-flow.d.mts +12 -0
- package/dist/lib/auth/oauth/web-flow.d.ts +12 -0
- package/dist/lib/auth/oauth/web-flow.d.ts.map +1 -1
- package/dist/lib/auth/oauth/web-flow.js +20 -2
- package/dist/lib/auth/oauth/web-flow.js.map +1 -1
- package/dist/lib/auth/oauth/web-flow.mjs +19 -2
- package/dist/lib/auth/oauth/web-flow.mjs.map +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.mts +27 -1
- package/dist/lib/core/SingleAgentClient.d.ts +27 -1
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +46 -18
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/core/SingleAgentClient.mjs +46 -18
- package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
- package/dist/lib/net/address-guards.d.ts.map +1 -1
- package/dist/lib/net/address-guards.js +4 -0
- package/dist/lib/net/address-guards.js.map +1 -1
- package/dist/lib/net/address-guards.mjs +4 -0
- package/dist/lib/net/address-guards.mjs.map +1 -1
- package/dist/lib/protocols/a2a.js +2 -2
- package/dist/lib/protocols/a2a.js.map +1 -1
- package/dist/lib/protocols/a2a.mjs +2 -2
- package/dist/lib/protocols/a2a.mjs.map +1 -1
- package/dist/lib/protocols/index.d.ts.map +1 -1
- package/dist/lib/protocols/index.js +28 -7
- package/dist/lib/protocols/index.js.map +1 -1
- package/dist/lib/protocols/index.mjs +28 -7
- package/dist/lib/protocols/index.mjs.map +1 -1
- package/dist/lib/protocols/mcp-modern.d.ts.map +1 -1
- package/dist/lib/protocols/mcp-modern.js +18 -5
- package/dist/lib/protocols/mcp-modern.js.map +1 -1
- package/dist/lib/protocols/mcp-modern.mjs +18 -5
- package/dist/lib/protocols/mcp-modern.mjs.map +1 -1
- package/dist/lib/protocols/mcp-tasks.d.ts.map +1 -1
- package/dist/lib/protocols/mcp-tasks.js +2 -12
- package/dist/lib/protocols/mcp-tasks.js.map +1 -1
- package/dist/lib/protocols/mcp-tasks.mjs +2 -12
- package/dist/lib/protocols/mcp-tasks.mjs.map +1 -1
- package/dist/lib/protocols/mcp.js +2 -2
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/protocols/mcp.mjs +2 -2
- package/dist/lib/protocols/mcp.mjs.map +1 -1
- package/dist/lib/registry/types.generated.d.mts +554 -15
- package/dist/lib/registry/types.generated.d.ts +554 -15
- package/dist/lib/registry/types.generated.d.ts.map +1 -1
- package/dist/lib/registry/types.generated.js.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/decisioning/account.d.mts +6 -4
- package/dist/lib/server/decisioning/account.d.ts +6 -4
- package/dist/lib/server/decisioning/account.d.ts.map +1 -1
- package/dist/lib/server/decisioning/account.js.map +1 -1
- package/dist/lib/server/decisioning/account.mjs.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.d.mts +6 -5
- package/dist/lib/server/decisioning/manifest-helpers.d.ts +6 -5
- package/dist/lib/server/decisioning/manifest-helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.js.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +4 -2
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +4 -2
- package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
- package/dist/lib/server/decisioning/tenant-store.d.mts +26 -14
- package/dist/lib/server/decisioning/tenant-store.d.ts +26 -14
- package/dist/lib/server/decisioning/tenant-store.d.ts.map +1 -1
- package/dist/lib/server/decisioning/tenant-store.js +6 -1
- package/dist/lib/server/decisioning/tenant-store.js.map +1 -1
- package/dist/lib/server/decisioning/tenant-store.mjs +6 -1
- package/dist/lib/server/decisioning/tenant-store.mjs.map +1 -1
- package/dist/lib/server/pin-and-bind-fetch.d.mts +2 -0
- package/dist/lib/server/pin-and-bind-fetch.d.ts +2 -0
- package/dist/lib/server/pin-and-bind-fetch.d.ts.map +1 -1
- package/dist/lib/server/pin-and-bind-fetch.js +2 -0
- package/dist/lib/server/pin-and-bind-fetch.js.map +1 -1
- package/dist/lib/server/pin-and-bind-fetch.mjs +2 -0
- package/dist/lib/server/pin-and-bind-fetch.mjs.map +1 -1
- package/dist/lib/server/structured-serialize.d.ts.map +1 -1
- package/dist/lib/server/structured-serialize.js +10 -2
- package/dist/lib/server/structured-serialize.js.map +1 -1
- package/dist/lib/server/structured-serialize.mjs +10 -2
- package/dist/lib/server/structured-serialize.mjs.map +1 -1
- package/dist/lib/server/webhook-emitter.d.ts.map +1 -1
- package/dist/lib/server/webhook-emitter.js +4 -2
- package/dist/lib/server/webhook-emitter.js.map +1 -1
- package/dist/lib/server/webhook-emitter.mjs +4 -2
- package/dist/lib/server/webhook-emitter.mjs.map +1 -1
- package/dist/lib/signing/middleware.d.mts +2 -1
- package/dist/lib/signing/middleware.d.ts +2 -1
- package/dist/lib/signing/middleware.d.ts.map +1 -1
- package/dist/lib/signing/middleware.js +26 -4
- package/dist/lib/signing/middleware.js.map +1 -1
- package/dist/lib/signing/middleware.mjs +26 -4
- package/dist/lib/signing/middleware.mjs.map +1 -1
- package/dist/lib/signing/webhook-verifier.d.ts.map +1 -1
- package/dist/lib/signing/webhook-verifier.js +4 -2
- package/dist/lib/signing/webhook-verifier.js.map +1 -1
- package/dist/lib/signing/webhook-verifier.mjs +4 -2
- package/dist/lib/signing/webhook-verifier.mjs.map +1 -1
- package/dist/lib/testing/agent-tester.d.ts.map +1 -1
- package/dist/lib/testing/agent-tester.js +46 -1
- package/dist/lib/testing/agent-tester.js.map +1 -1
- package/dist/lib/testing/agent-tester.mjs +46 -1
- package/dist/lib/testing/agent-tester.mjs.map +1 -1
- package/dist/lib/types/asset-instances.d.mts +8 -6
- package/dist/lib/types/asset-instances.d.ts +8 -6
- package/dist/lib/types/asset-instances.d.ts.map +1 -1
- package/dist/lib/types/asset-instances.js.map +1 -1
- package/dist/lib/types/index.d.ts.map +1 -1
- package/dist/lib/types/index.js.map +1 -1
- package/dist/lib/types/index.mjs.map +1 -1
- package/dist/lib/utils/capabilities.d.mts +2 -0
- package/dist/lib/utils/capabilities.d.ts +2 -0
- package/dist/lib/utils/capabilities.d.ts.map +1 -1
- package/dist/lib/utils/capabilities.js +2 -1
- package/dist/lib/utils/capabilities.js.map +1 -1
- package/dist/lib/utils/capabilities.mjs +2 -1
- package/dist/lib/utils/capabilities.mjs.map +1 -1
- package/dist/lib/utils/probe-policy.d.mts +0 -16
- package/dist/lib/utils/probe-policy.d.ts +0 -16
- package/dist/lib/utils/probe-policy.d.ts.map +1 -1
- package/dist/lib/utils/probe-policy.js +15 -1
- package/dist/lib/utils/probe-policy.js.map +1 -1
- package/dist/lib/utils/probe-policy.mjs +15 -1
- package/dist/lib/utils/probe-policy.mjs.map +1 -1
- package/dist/lib/utils/redact-args.d.mts +36 -0
- package/dist/lib/utils/redact-args.d.ts +37 -0
- package/dist/lib/utils/redact-args.d.ts.map +1 -0
- package/dist/lib/utils/redact-args.js +46 -0
- package/dist/lib/utils/redact-args.js.map +1 -0
- package/dist/lib/utils/redact-args.mjs +22 -0
- package/dist/lib/utils/redact-args.mjs.map +1 -0
- package/dist/lib/v2/projection/creative-delivery.js +1 -5
- package/dist/lib/v2/projection/creative-delivery.js.map +1 -1
- package/dist/lib/v2/projection/creative-delivery.mjs +1 -5
- package/dist/lib/v2/projection/creative-delivery.mjs.map +1 -1
- package/dist/lib/validation/index.d.mts +15 -1
- package/dist/lib/validation/index.d.ts +15 -1
- package/dist/lib/validation/index.d.ts.map +1 -1
- package/dist/lib/validation/index.js +4 -8
- package/dist/lib/validation/index.js.map +1 -1
- package/dist/lib/validation/index.mjs +4 -8
- package/dist/lib/validation/index.mjs.map +1 -1
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.js.map +1 -1
- package/dist/lib/version.mjs +3 -3
- package/dist/lib/version.mjs.map +1 -1
- package/examples/hello_seller_adapter_multi_tenant.ts +7 -0
- package/package.json +3 -2
- package/skills/build-holdco-agent/SKILL.md +19 -0
- package/skills/cross-cutting.md +3 -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":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,oBAA2E;AAG3E,uBAAmF;AAGnF,uBAoDO;AAIP,IAAAA,iBAA0B;AAqX1B,0BAQO;AAGP,IAAAC,oBA2DO;AAtbP,eAAsB,UACpB,UACA,UACA,UAAuB,CAAC,GACH;AACrB,QAAM,YAAY,KAAK,IAAI;AAC3B,MAAI,QAA0B,CAAC;AAC/B,MAAI;AACJ,QAAM,aAAS,0BAAU;AAEzB,QAAM,mBAAgC;AAAA,IACpC,GAAG;AAAA,IACH,SAAS,QAAQ,YAAY;AAAA,IAC7B,iBAAiB,QAAQ,mBAAmB,cAAc,KAAK,IAAI,CAAC;AAAA,EACtE;AAEA,SAAO,KAAK,EAAE,UAAU,UAAU,SAAS,iBAAiB,GAAG,qBAAqB;AAEpF,MAAI;AACF,QAAI;AAEJ,YAAQ,UAAU;AAAA,MAChB,KAAK;AACH,gBAAQ,UAAM,kCAAgB,UAAU,gBAAgB;AACxD;AAAA,MAEF,KAAK;AACH,iBAAS,UAAM,gCA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AAA,YACE,MAAM;AAAA,YACN,QAAQ;AAAA,YACR,aAAa;AAAA,YACb,OAAO,0BAA0B,QAAQ;AAAA,UAC3C;AAAA,QACF;AAAA,IACJ;AAAA,EACF,SAAS,OAAO;AACd,WAAO,MAAM,EAAE,OAAO,UAAU,SAAS,GAAG,kCAAkC;AAC9E,UAAM,KAAK;AAAA,MACT,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,aAAa,KAAK,IAAI,IAAI;AAAA,MAC1B,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAAA,IAC9D,CAAC;AAAA,EACH;AAEA,QAAM,gBAAgB,KAAK,IAAI,IAAI;AACnC,QAAM,cAAc,MAAM,OAAO,OAAK,EAAE,MAAM,EAAE;AAChD,QAAM,cAAc,MAAM,OAAO,OAAK,CAAC,EAAE,MAAM,EAAE;AACjD,QAAM,gBAAgB,gBAAgB,KAAK,cAAc;AAGzD,MAAI;AACJ,MAAI,eAAe;AACjB,cAAU,OAAO,WAAW,2BAA2B,aAAa;AAAA,EACtE,WAAW,gBAAgB,GAAG;AAC5B,cAAU,OAAO,WAAW;AAAA,EAC9B,OAAO;AACL,cAAU,GAAG,WAAW,YAAY,WAAW,kBAAkB,MAAM,MAAM;AAAA,EAC/E;AAEA,QAAM,aAAyB;AAAA,IAC7B,WAAW;AAAA,IACX;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA,mBAAmB;AAAA,IACnB,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,IAClC,eAAe;AAAA,EACjB;AAEA,SAAO,KAAK,EAAE,UAAU,UAAU,eAAe,aAAa,aAAa,cAAc,GAAG,sBAAsB;AAElH,SAAO;AACT;","names":["import_client","import_scenarios"]}
|
|
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\nconst REDACTED = '[redacted]';\n\n/**\n * Strip credentials out of `TestOptions` before it reaches a logger.\n *\n * `TestOptions` carries bearer tokens, Basic passwords, OAuth access/refresh\n * tokens, client-credential secrets, test-kit API keys, and caller-supplied\n * headers that may hold any of the above. The default logger serializes its\n * whole context with `JSON.stringify` to `console.log`, so logging the object\n * verbatim puts live credentials into ordinary stdout and CI logs. Shapes are\n * preserved — which auth type and which header names were in play is the useful\n * part for debugging; the values are not.\n */\nfunction redactTestOptions(options: TestOptions): Record<string, unknown> {\n // Allowlist, not `{...options}` minus known secrets.\n //\n // Spreading was the bug: `TestOptions._client` is a live `SingleAgentClient`,\n // set on the primary `comply()` and orchestrator paths, and its `agent` field\n // is an own enumerable property — so `JSON.stringify` walked straight back\n // into the bearer token, OAuth tokens, client secret, custom headers, and\n // `webhookSecret` that the masking above had just removed, three times over\n // via nested client references. A denylist over a graph that holds a\n // reference to the whole client cannot be made safe; only naming what may be\n // logged can.\n const safe: Record<string, unknown> = {};\n\n for (const key of LOGGABLE_OPTION_KEYS) {\n if (options[key] !== undefined) safe[key] = options[key];\n }\n\n if (options.auth) {\n // Keep `type` so the log still shows which scheme was exercised.\n safe.auth = { type: options.auth.type, ...redactedFieldsFor(options.auth) };\n }\n if (options.headers) {\n // Names are the debuggable part; values may be credentials.\n safe.headers = Object.fromEntries(Object.keys(options.headers).map(name => [name, REDACTED]));\n }\n if (options.test_kit) {\n // Test kits come from arbitrary `test-kits/*.yaml` and the type carries an\n // index signature, so a credential can sit at any depth. Log the shape only.\n safe.test_kit = { keys: Object.keys(options.test_kit) };\n }\n\n return safe;\n}\n\n/**\n * Fields of `TestOptions` that may be written to a log verbatim.\n *\n * Anything not named here is dropped — in particular the `_`-prefixed internals\n * (`_client`, `_profile`, `_webhookReceiver`, …), which hold live client objects\n * whose own fields include every credential the caller supplied. `agentUrl` is\n * logged separately by the caller, so the client adds no diagnostic value.\n */\nconst LOGGABLE_OPTION_KEYS = [\n 'protocol',\n 'adcpVersion',\n 'wireAdcpVersion',\n 'versionEnvelope',\n 'schemaRoot',\n 'userAgent',\n 'brand',\n 'brief',\n 'budget',\n 'format_ids',\n 'sandbox',\n 'test_session_id',\n] as const satisfies readonly (keyof TestOptions)[];\n\n/** Every credential-bearing field of the auth union, masked. */\nfunction redactedFieldsFor(auth: NonNullable<TestOptions['auth']>): Record<string, string> {\n switch (auth.type) {\n case 'bearer':\n return { token: REDACTED };\n case 'basic':\n return { username: REDACTED, password: REDACTED };\n case 'oauth':\n return { tokens: REDACTED };\n case 'oauth_client_credentials':\n return { credentials: REDACTED, tokens: REDACTED };\n default:\n // Unreachable for the declared union; masks wholesale if it ever widens.\n return { value: REDACTED };\n }\n}\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: redactTestOptions(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":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,oBAA2E;AAG3E,uBAAmF;AAGnF,uBAoDO;AAIP,IAAAA,iBAA0B;AA4c1B,0BAQO;AAGP,IAAAC,oBA2DO;AAhhBP,MAAM,WAAW;AAajB,SAAS,kBAAkB,SAA+C;AAWxE,QAAM,OAAgC,CAAC;AAEvC,aAAW,OAAO,sBAAsB;AACtC,QAAI,QAAQ,GAAG,MAAM,OA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AG,sBAAsB;AAElH,SAAO;AACT;","names":["import_client","import_scenarios"]}
|
|
@@ -50,6 +50,51 @@ import {
|
|
|
50
50
|
testCreativeApproval
|
|
51
51
|
} from "./scenarios/index.mjs";
|
|
52
52
|
import { getLogger as getLogger2 } from "./client.mjs";
|
|
53
|
+
const REDACTED = "[redacted]";
|
|
54
|
+
function redactTestOptions(options) {
|
|
55
|
+
const safe = {};
|
|
56
|
+
for (const key of LOGGABLE_OPTION_KEYS) {
|
|
57
|
+
if (options[key] !== void 0) safe[key] = options[key];
|
|
58
|
+
}
|
|
59
|
+
if (options.auth) {
|
|
60
|
+
safe.auth = { type: options.auth.type, ...redactedFieldsFor(options.auth) };
|
|
61
|
+
}
|
|
62
|
+
if (options.headers) {
|
|
63
|
+
safe.headers = Object.fromEntries(Object.keys(options.headers).map((name) => [name, REDACTED]));
|
|
64
|
+
}
|
|
65
|
+
if (options.test_kit) {
|
|
66
|
+
safe.test_kit = { keys: Object.keys(options.test_kit) };
|
|
67
|
+
}
|
|
68
|
+
return safe;
|
|
69
|
+
}
|
|
70
|
+
const LOGGABLE_OPTION_KEYS = [
|
|
71
|
+
"protocol",
|
|
72
|
+
"adcpVersion",
|
|
73
|
+
"wireAdcpVersion",
|
|
74
|
+
"versionEnvelope",
|
|
75
|
+
"schemaRoot",
|
|
76
|
+
"userAgent",
|
|
77
|
+
"brand",
|
|
78
|
+
"brief",
|
|
79
|
+
"budget",
|
|
80
|
+
"format_ids",
|
|
81
|
+
"sandbox",
|
|
82
|
+
"test_session_id"
|
|
83
|
+
];
|
|
84
|
+
function redactedFieldsFor(auth) {
|
|
85
|
+
switch (auth.type) {
|
|
86
|
+
case "bearer":
|
|
87
|
+
return { token: REDACTED };
|
|
88
|
+
case "basic":
|
|
89
|
+
return { username: REDACTED, password: REDACTED };
|
|
90
|
+
case "oauth":
|
|
91
|
+
return { tokens: REDACTED };
|
|
92
|
+
case "oauth_client_credentials":
|
|
93
|
+
return { credentials: REDACTED, tokens: REDACTED };
|
|
94
|
+
default:
|
|
95
|
+
return { value: REDACTED };
|
|
96
|
+
}
|
|
97
|
+
}
|
|
53
98
|
async function testAgent(agentUrl, scenario, options = {}) {
|
|
54
99
|
const startTime = Date.now();
|
|
55
100
|
let steps = [];
|
|
@@ -60,7 +105,7 @@ async function testAgent(agentUrl, scenario, options = {}) {
|
|
|
60
105
|
sandbox: options.sandbox !== false,
|
|
61
106
|
test_session_id: options.test_session_id || `addie-test-${Date.now()}`
|
|
62
107
|
};
|
|
63
|
-
logger.info({ agentUrl, scenario, options: effectiveOptions }, "Starting agent test");
|
|
108
|
+
logger.info({ agentUrl, scenario, options: redactTestOptions(effectiveOptions) }, "Starting agent test");
|
|
64
109
|
try {
|
|
65
110
|
let result;
|
|
66
111
|
switch (scenario) {
|
|
@@ -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":"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,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AC;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\nconst REDACTED = '[redacted]';\n\n/**\n * Strip credentials out of `TestOptions` before it reaches a logger.\n *\n * `TestOptions` carries bearer tokens, Basic passwords, OAuth access/refresh\n * tokens, client-credential secrets, test-kit API keys, and caller-supplied\n * headers that may hold any of the above. The default logger serializes its\n * whole context with `JSON.stringify` to `console.log`, so logging the object\n * verbatim puts live credentials into ordinary stdout and CI logs. Shapes are\n * preserved — which auth type and which header names were in play is the useful\n * part for debugging; the values are not.\n */\nfunction redactTestOptions(options: TestOptions): Record<string, unknown> {\n // Allowlist, not `{...options}` minus known secrets.\n //\n // Spreading was the bug: `TestOptions._client` is a live `SingleAgentClient`,\n // set on the primary `comply()` and orchestrator paths, and its `agent` field\n // is an own enumerable property — so `JSON.stringify` walked straight back\n // into the bearer token, OAuth tokens, client secret, custom headers, and\n // `webhookSecret` that the masking above had just removed, three times over\n // via nested client references. A denylist over a graph that holds a\n // reference to the whole client cannot be made safe; only naming what may be\n // logged can.\n const safe: Record<string, unknown> = {};\n\n for (const key of LOGGABLE_OPTION_KEYS) {\n if (options[key] !== undefined) safe[key] = options[key];\n }\n\n if (options.auth) {\n // Keep `type` so the log still shows which scheme was exercised.\n safe.auth = { type: options.auth.type, ...redactedFieldsFor(options.auth) };\n }\n if (options.headers) {\n // Names are the debuggable part; values may be credentials.\n safe.headers = Object.fromEntries(Object.keys(options.headers).map(name => [name, REDACTED]));\n }\n if (options.test_kit) {\n // Test kits come from arbitrary `test-kits/*.yaml` and the type carries an\n // index signature, so a credential can sit at any depth. Log the shape only.\n safe.test_kit = { keys: Object.keys(options.test_kit) };\n }\n\n return safe;\n}\n\n/**\n * Fields of `TestOptions` that may be written to a log verbatim.\n *\n * Anything not named here is dropped — in particular the `_`-prefixed internals\n * (`_client`, `_profile`, `_webhookReceiver`, …), which hold live client objects\n * whose own fields include every credential the caller supplied. `agentUrl` is\n * logged separately by the caller, so the client adds no diagnostic value.\n */\nconst LOGGABLE_OPTION_KEYS = [\n 'protocol',\n 'adcpVersion',\n 'wireAdcpVersion',\n 'versionEnvelope',\n 'schemaRoot',\n 'userAgent',\n 'brand',\n 'brief',\n 'budget',\n 'format_ids',\n 'sandbox',\n 'test_session_id',\n] as const satisfies readonly (keyof TestOptions)[];\n\n/** Every credential-bearing field of the auth union, masked. */\nfunction redactedFieldsFor(auth: NonNullable<TestOptions['auth']>): Record<string, string> {\n switch (auth.type) {\n case 'bearer':\n return { token: REDACTED };\n case 'basic':\n return { username: REDACTED, password: REDACTED };\n case 'oauth':\n return { tokens: REDACTED };\n case 'oauth_client_credentials':\n return { credentials: REDACTED, tokens: REDACTED };\n default:\n // Unreachable for the declared union; masks wholesale if it ever widens.\n return { value: REDACTED };\n }\n}\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: redactTestOptions(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;AAE1B,MAAM,WAAW;AAajB,SAAS,kBAAkB,SAA+C;AAWxE,QAAM,OAAgC,CAAC;AAEvC,aAAW,OAAO,sBAAsB;AACtC,QAAI,QAAQ,GAAG,MAAM,OAAW,MAAK,GAAG,IAAI,QAAQ,GAAG;AAAA,EACzD;AAEA,MAAI,QAAQ,MAAM;AAEhB,SAAK,OAAO,EAAE,MAAM,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K;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,4 +1,4 @@
|
|
|
1
|
-
import type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, CatalogAsset, WebhookAsset } from './tools.generated.mjs';
|
|
1
|
+
import type { AssetVariant, ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset } from './tools.generated.mjs';
|
|
2
2
|
/**
|
|
3
3
|
* Discriminated union of every creative asset instance recognised by the
|
|
4
4
|
* AdCP creative protocol. Narrow by `asset_type` to access the per-type
|
|
@@ -18,15 +18,17 @@ import type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset
|
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
21
|
-
* This is the type to use for
|
|
22
|
-
* The `assets` map itself is
|
|
23
|
-
*
|
|
21
|
+
* This is the type to use for individual values in
|
|
22
|
+
* `creative_manifest.assets[<key>]`. The `assets` map itself is
|
|
23
|
+
* `Record<string, AssetInstance | AssetInstance[]>` — keys come from the
|
|
24
|
+
* format's declared asset slot ids; values are single instances or arrays
|
|
25
|
+
* for slots whose format declaration accepts multiple assets.
|
|
24
26
|
*/
|
|
25
|
-
export type AssetInstance =
|
|
27
|
+
export type AssetInstance = AssetVariant;
|
|
26
28
|
/**
|
|
27
29
|
* The discriminator value (`asset_type`) of every variant in
|
|
28
30
|
* {@link AssetInstance}. Useful for runtime branching and exhaustive
|
|
29
31
|
* switch-case helpers.
|
|
30
32
|
*/
|
|
31
33
|
export type AssetInstanceType = AssetInstance['asset_type'];
|
|
32
|
-
export type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, CatalogAsset, WebhookAsset, };
|
|
34
|
+
export type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, CatalogAsset, WebhookAsset } from './tools.generated';
|
|
1
|
+
import type { AssetVariant, ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset } from './tools.generated';
|
|
2
2
|
/**
|
|
3
3
|
* Discriminated union of every creative asset instance recognised by the
|
|
4
4
|
* AdCP creative protocol. Narrow by `asset_type` to access the per-type
|
|
@@ -18,16 +18,18 @@ import type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset
|
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
21
|
-
* This is the type to use for
|
|
22
|
-
* The `assets` map itself is
|
|
23
|
-
*
|
|
21
|
+
* This is the type to use for individual values in
|
|
22
|
+
* `creative_manifest.assets[<key>]`. The `assets` map itself is
|
|
23
|
+
* `Record<string, AssetInstance | AssetInstance[]>` — keys come from the
|
|
24
|
+
* format's declared asset slot ids; values are single instances or arrays
|
|
25
|
+
* for slots whose format declaration accepts multiple assets.
|
|
24
26
|
*/
|
|
25
|
-
export type AssetInstance =
|
|
27
|
+
export type AssetInstance = AssetVariant;
|
|
26
28
|
/**
|
|
27
29
|
* The discriminator value (`asset_type`) of every variant in
|
|
28
30
|
* {@link AssetInstance}. Useful for runtime branching and exhaustive
|
|
29
31
|
* switch-case helpers.
|
|
30
32
|
*/
|
|
31
33
|
export type AssetInstanceType = AssetInstance['asset_type'];
|
|
32
|
-
export type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, CatalogAsset, WebhookAsset, };
|
|
34
|
+
export type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset, };
|
|
33
35
|
//# sourceMappingURL=asset-instances.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-instances.d.ts","sourceRoot":"","sources":["../../../src/lib/types/asset-instances.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,aAAa,EACb,SAAS,EACT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,YAAY,
|
|
1
|
+
{"version":3,"file":"asset-instances.d.ts","sourceRoot":"","sources":["../../../src/lib/types/asset-instances.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,aAAa,EACb,SAAS,EACT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;AAM5D,YAAY,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,aAAa,EACb,SAAS,EACT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,GAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/types/asset-instances.ts"],"sourcesContent":["// Discriminated union of creative asset instances — what a buyer DELIVERS\n// inside `creative_manifest.assets`. Distinct from the asset slots that a\n// publisher declares in `Format.assets[]` (see `format-asset-slots.ts`).\n//\n// The per-asset-type interfaces (`ImageAsset`, `VideoAsset`, …) already\n// exist in `tools.generated.ts` and each carries an `asset_type` literal\n// discriminator. What was missing was the union itself: a canonical\n// `AssetInstance` you can use as a parameter or return type so TypeScript\n// narrows correctly on the discriminator and won't accept an asset\n// without one.\n//\n// Why this matters: handlers that returned a plain\n// `{ url: '...', width: 1920, height: 1080 }` typed against\n// `Record<string, unknown>` slipped through without `asset_type`. The\n// schema validator caught it at runtime; with a strict union as the\n// declared parameter / return type, the same error surfaces at compile\n// time. PR #945's `videoAsset({...})` width/height GA tightening came\n// out of this same drift class.\n//\n// Source of truth: schemas/cache/{version}/creative/asset-types/index.json\n// (registry) and schemas/cache/{version}/core/assets/*-asset.json (per-type).\n\nimport type {\n ImageAsset,\n VideoAsset,\n AudioAsset,\n TextAsset,\n HTMLAsset,\n URLAsset,\n CSSAsset,\n JavaScriptAsset,\n MarkdownAsset,\n VASTAsset,\n DAASTAsset,\n BriefAsset,\n CatalogAsset,\n WebhookAsset,\n} from './tools.generated';\n\n/**\n * Discriminated union of every creative asset instance recognised by the\n * AdCP creative protocol. Narrow by `asset_type` to access the per-type\n * fields:\n *\n * ```ts\n * function describe(asset: AssetInstance): string {\n * switch (asset.asset_type) {\n * case 'image':\n * return `${asset.width}x${asset.height} @ ${asset.url}`;\n * case 'video':\n * return `${asset.duration_ms ?? 0}ms ${asset.container_format ?? ''}`;\n * case 'html':\n * return `${asset.content.length}B inline HTML`;\n * // ...all branches required — exhaustiveness is enforced\n * }\n * }\n * ```\n *\n * This is the type to use for `creative_manifest.assets[<key>]
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/types/asset-instances.ts"],"sourcesContent":["// Discriminated union of creative asset instances — what a buyer DELIVERS\n// inside `creative_manifest.assets`. Distinct from the asset slots that a\n// publisher declares in `Format.assets[]` (see `format-asset-slots.ts`).\n//\n// The per-asset-type interfaces (`ImageAsset`, `VideoAsset`, …) already\n// exist in `tools.generated.ts` and each carries an `asset_type` literal\n// discriminator. What was missing was the union itself: a canonical\n// `AssetInstance` you can use as a parameter or return type so TypeScript\n// narrows correctly on the discriminator and won't accept an asset\n// without one.\n//\n// Why this matters: handlers that returned a plain\n// `{ url: '...', width: 1920, height: 1080 }` typed against\n// `Record<string, unknown>` slipped through without `asset_type`. The\n// schema validator caught it at runtime; with a strict union as the\n// declared parameter / return type, the same error surfaces at compile\n// time. PR #945's `videoAsset({...})` width/height GA tightening came\n// out of this same drift class.\n//\n// Source of truth: schemas/cache/{version}/creative/asset-types/index.json\n// (registry) and schemas/cache/{version}/core/assets/*-asset.json (per-type).\n\nimport type {\n AssetVariant,\n ImageAsset,\n VideoAsset,\n AudioAsset,\n TextAsset,\n HTMLAsset,\n URLAsset,\n CSSAsset,\n JavaScriptAsset,\n MarkdownAsset,\n VASTAsset,\n DAASTAsset,\n BriefAsset,\n CatalogAsset,\n WebhookAsset,\n ZipAsset,\n PublishedPostAsset,\n CardAsset,\n PixelTrackerAsset,\n VASTTrackerAsset,\n DAASTTrackerAsset,\n} from './tools.generated';\n\n/**\n * Discriminated union of every creative asset instance recognised by the\n * AdCP creative protocol. Narrow by `asset_type` to access the per-type\n * fields:\n *\n * ```ts\n * function describe(asset: AssetInstance): string {\n * switch (asset.asset_type) {\n * case 'image':\n * return `${asset.width}x${asset.height} @ ${asset.url}`;\n * case 'video':\n * return `${asset.duration_ms ?? 0}ms ${asset.container_format ?? ''}`;\n * case 'html':\n * return `${asset.content.length}B inline HTML`;\n * // ...all branches required — exhaustiveness is enforced\n * }\n * }\n * ```\n *\n * This is the type to use for individual values in\n * `creative_manifest.assets[<key>]`. The `assets` map itself is\n * `Record<string, AssetInstance | AssetInstance[]>` — keys come from the\n * format's declared asset slot ids; values are single instances or arrays\n * for slots whose format declaration accepts multiple assets.\n */\nexport type AssetInstance = AssetVariant;\n\n/**\n * The discriminator value (`asset_type`) of every variant in\n * {@link AssetInstance}. Useful for runtime branching and exhaustive\n * switch-case helpers.\n */\nexport type AssetInstanceType = AssetInstance['asset_type'];\n\n// Re-export the individual asset types so adopters can use them for\n// returning / narrowing without reaching into `tools.generated`. The\n// generated module is the source of truth; this re-export is the public\n// surface.\nexport type {\n ImageAsset,\n VideoAsset,\n AudioAsset,\n TextAsset,\n HTMLAsset,\n URLAsset,\n CSSAsset,\n JavaScriptAsset,\n MarkdownAsset,\n VASTAsset,\n DAASTAsset,\n BriefAsset,\n CatalogAsset,\n WebhookAsset,\n ZipAsset,\n PublishedPostAsset,\n CardAsset,\n PixelTrackerAsset,\n VASTTrackerAsset,\n DAASTTrackerAsset,\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/types/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AAGvB,YAAY,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,2BAA2B,EAC3B,wBAAwB,EACxB,QAAQ,EACR,SAAS,EACT,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,iCAAiC,EACjC,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,QAAQ,CAAC;AAOhB,YAAY,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AACxE,YAAY,EAAE,6BAA6B,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACrF,cAAc,0BAA0B,CAAC;AACzC;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,+BAA+B,CAAC;AAqBvD,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,cAAc,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAGjH,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACn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,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,cAAc,EACd,UAAU,EACV,eAAe,EACf,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAK3B,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAC5B,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAI1B,cAAc,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/types/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AAGvB,YAAY,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,2BAA2B,EAC3B,wBAAwB,EACxB,QAAQ,EACR,SAAS,EACT,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,iCAAiC,EACjC,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,QAAQ,CAAC;AAOhB,YAAY,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AACxE,YAAY,EAAE,6BAA6B,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACrF,cAAc,0BAA0B,CAAC;AACz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CAAC;AAQxC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/types/index.ts"],"sourcesContent":["// AdCP Core Types - Main exports for external consumers\nexport * from './adcp';\n\n// Re-export key types for easier importing\nexport type {\n AgentConfig,\n TestResult,\n TestRequest,\n ApiResponse,\n LegacyCreativeFormatSummary,\n LegacyAdvertisingProduct,\n MediaBuy,\n Targeting,\n LegacyManagedCreativeAsset,\n LegacyManageSyncCreativesRequest,\n LegacyManageListCreativesRequest,\n LegacyManageListCreativesResponse,\n LegacyManagedCreativeFilters,\n ManageCreativeAssetsRequest,\n ManageCreativeAssetsResponse,\n CreateMediaBuyAsyncResponseData,\n UpdateMediaBuyAsyncResponseData,\n GetProductsAsyncResponseData,\n SyncCreativesAsyncResponseData,\n} from './adcp';\n\n// Re-export the structured format identifier from generated core types.\n// AdCP 3.0.1 renamed the schema title from \"Format ID\" to \"Format Reference\n// (Structured Object)\" — purely a doc change, the wire shape is identical.\n// We expose the new canonical name AND keep the historical `FormatID` alias\n// so SDK consumers don't break across the version bump.\nexport type { FormatReferenceStructuredObject } from './core.generated';\nimport type { FormatReferenceStructuredObject } from './core.generated';\nexport type { RequireCacheScopeWhenProducts, ServerPayload } from './server-payload';\nexport * from './server-payload-aliases';\n/**\n * @deprecated AdCP 3.0.1 renamed this type to `FormatReferenceStructuredObject`\n * (the wire shape is identical — pure documentation rename per the spec). This\n * alias is preserved for one minor cycle so existing imports keep compiling;\n * editor tooling will surface the rename so downstream code can migrate at its\n * own pace. Slated for removal in the next major.\n */\nexport type FormatID = FormatReferenceStructuredObject;\n\n// Re-export wire request/response types adopters need when building a\n// DecisioningPlatform or calling AdCP agents. Source of truth is\n// `tools.generated.ts`; this curated block is the public surface so\n// adopters never reach into generated files.\n//\n// Intentionally excluded — name conflicts with legacy adcp.ts shapes:\n// LegacyManageSyncCreativesRequest, LegacyManageListCreativesRequest, LegacyManageListCreativesResponse,\n// ManageCreativeAssetsRequest, ManageCreativeAssetsResponse (adcp.ts versions\n// already public via `export * from './adcp'` above; use those).\n// Intentionally excluded — comply-runner internals, not specialism surface:\n// ComplyTestControllerRequest/Response, SeedSuccess, SimulationSuccess,\n// ControllerError, ForcedDirectiveSuccess, StateTransitionSuccess,\n// ListScenariosSuccess.\n// Intentionally excluded — internal pagination/packaging sub-shapes, not\n// part of the top-level tool request/response surface:\n// PaginationRequest, PaginationResponse, PackageRequest,\n// TMPResponseType, WebhookResponseType.\n\n// Account model + account operations\nexport type {\n AccountReference,\n ListAccountsRequest,\n ListAccountsResponse,\n SyncAccountsRequest,\n SyncAccountsResponse,\n SyncAccountsSuccess,\n SyncAccountsError,\n GetAccountFinancialsRequest,\n GetAccountFinancialsResponse,\n GetAccountFinancialsSuccess,\n GetAccountFinancialsError,\n} from './tools.generated';\n\n// Capabilities\nexport type { AdCPSpecialism, GetAdCPCapabilitiesRequest, GetAdCPCapabilitiesResponse } from './tools.generated';\n\n// Sales — media buy\nexport type {\n GetProductsRequest,\n GetProductsResponse,\n GetProductsAsyncSubmitted,\n CreateMediaBuyRequest,\n CreateMediaBuyResponse,\n CreateMediaBuySuccess,\n CreateMediaBuyError,\n CreateMediaBuySubmitted,\n CreateMediaBuyAsyncSubmitted,\n UpdateMediaBuyRequest,\n UpdateMediaBuyResponse,\n UpdateMediaBuySuccess,\n UpdateMediaBuyError,\n UpdateMediaBuyAsyncSubmitted,\n GetMediaBuysRequest,\n GetMediaBuysResponse,\n GetMediaBuyDeliveryRequest,\n GetMediaBuyDeliveryResponse,\n GetMediaBuyArtifactsRequest,\n GetMediaBuyArtifactsResponse,\n ProvidePerformanceFeedbackRequest,\n ProvidePerformanceFeedbackResponse,\n ProvidePerformanceFeedbackSuccess,\n ProvidePerformanceFeedbackError,\n SyncPlansRequest,\n SyncPlansResponse,\n ReportUsageRequest,\n ReportUsageResponse,\n ReportPlanOutcomeRequest,\n ReportPlanOutcomeResponse,\n GetPlanAuditLogsRequest,\n GetPlanAuditLogsResponse,\n} from './tools.generated';\n\n// Pricing models (discriminated union across pricing types)\nexport type { PricingOption, CPMPricingOption, CPCPricingOption, CPVPricingOption } from './tools.generated';\n\n// Media-channel + status enums; publisher property + reporting shapes\nexport type {\n MediaChannel,\n AudienceStatus,\n MediaBuyStatus,\n CreativeStatus,\n Placement,\n PublisherPropertySelector,\n ReportingCapabilities,\n} from './tools.generated';\n\n// Audiences, catalogs, event sources, and events (audience-sync + retail media)\nexport type {\n SyncAudiencesRequest,\n SyncAudiencesResponse,\n SyncAudiencesSuccess,\n SyncAudiencesError,\n SyncCatalogsRequest,\n SyncCatalogsResponse,\n SyncCatalogsSuccess,\n SyncCatalogsError,\n SyncCatalogsAsyncSubmitted,\n SyncEventSourcesRequest,\n SyncEventSourcesResponse,\n SyncEventSourcesSuccess,\n SyncEventSourcesError,\n LogEventRequest,\n LogEventResponse,\n LogEventSuccess,\n LogEventError,\n} from './tools.generated';\n\n// Signals\nexport type {\n GetSignalsRequest,\n GetSignalsResponse,\n ActivateSignalRequest,\n ActivateSignalResponse,\n ActivateSignalSuccess,\n ActivateSignalError,\n SignalID,\n SignalValueType,\n SignalAvailabilityType,\n SignalAvailabilityType as SignalCatalogType,\n Destination,\n Deployment,\n ActivationKey,\n VendorPricingOption,\n SignalFilters, // embedded in GetSignalsRequest.filters\n SignalTargeting, // embedded in ActivateSignalRequest.signal_targeting\n} from './tools.generated';\n\n// Creative\nexport type {\n BuildCreativeRequest,\n BuildCreativeResponse,\n BuildCreativeSuccess,\n BuildCreativeError,\n BuildCreativeMultiSuccess,\n BuildCreativeAsyncSubmitted,\n CreativeManifest,\n PreviewCreativeRequest,\n PreviewCreativeResponse,\n PreviewCreativeSingleResponse,\n PreviewCreativeVariantResponse,\n PreviewCreativeBatchResponse,\n PreviewBatchResultSuccess,\n PreviewBatchResultError,\n ListCreativeFormatsRequest,\n ListCreativeFormatsResponse,\n GetCreativeFeaturesRequest,\n GetCreativeFeaturesResponse,\n GetCreativeDeliveryRequest,\n GetCreativeDeliveryResponse,\n SyncCreativesRequest,\n SyncCreativesResponse,\n SyncCreativesSuccess,\n SyncCreativesError,\n SyncCreativesSubmitted,\n SyncCreativesAsyncSubmitted,\n ListCreativesRequest,\n ListCreativesResponse,\n CreativeFilters,\n CreativeAsset,\n CreativeQuality,\n Format,\n ProductFormatDeclaration,\n FormatIDParameter,\n} from './tools.generated';\n\n// Governance — property lists\nexport type {\n PropertyList,\n CreatePropertyListRequest,\n CreatePropertyListResponse,\n UpdatePropertyListRequest,\n UpdatePropertyListResponse,\n GetPropertyListRequest,\n GetPropertyListResponse,\n ListPropertyListsRequest,\n ListPropertyListsResponse,\n DeletePropertyListRequest,\n DeletePropertyListResponse,\n} from './tools.generated';\n\n// Governance — collection lists\nexport type {\n CollectionList,\n CreateCollectionListRequest,\n CreateCollectionListResponse,\n UpdateCollectionListRequest,\n UpdateCollectionListResponse,\n GetCollectionListRequest,\n GetCollectionListResponse,\n ListCollectionListsRequest,\n ListCollectionListsResponse,\n DeleteCollectionListRequest,\n DeleteCollectionListResponse,\n} from './tools.generated';\n\n// Governance — content standards + delivery validation\nexport type {\n CheckGovernanceRequest,\n CheckGovernanceResponse,\n SyncGovernanceRequest,\n SyncGovernanceResponse,\n SyncGovernanceSuccess,\n SyncGovernanceError,\n CreateContentStandardsRequest,\n CreateContentStandardsResponse,\n UpdateContentStandardsRequest,\n UpdateContentStandardsResponse,\n UpdateContentStandardsSuccess,\n UpdateContentStandardsError,\n ListContentStandardsRequest,\n ListContentStandardsResponse,\n GetContentStandardsRequest,\n GetContentStandardsResponse,\n CalibrateContentRequest,\n CalibrateContentResponse,\n ValidateContentDeliveryRequest,\n ValidateContentDeliveryResponse,\n} from './tools.generated';\n\n// Sponsored intelligence\nexport type {\n SIGetOfferingRequest,\n SIGetOfferingResponse,\n SIInitiateSessionRequest,\n SIInitiateSessionResponse,\n SISendMessageRequest,\n SISendMessageResponse,\n SITerminateSessionRequest,\n SITerminateSessionResponse,\n SICapabilities,\n SIIdentity,\n SISessionStatus,\n SIUIElement,\n} from './tools.generated';\n\n// Brand rights — identity discovery + licensing for branded inventory.\n// `creative_approval` is webhook-only (not an MCP/A2A tool) — types\n// re-exported for adopters wiring their own HTTP receiver.\nexport type {\n GetBrandIdentityRequest,\n GetBrandIdentityResponse,\n GetBrandIdentitySuccess,\n GetRightsRequest,\n GetRightsResponse,\n GetRightsSuccess,\n AcquireRightsRequest,\n AcquireRightsResponse,\n AcquireRightsAcquired,\n AcquireRightsPendingApproval,\n AcquireRightsRejected,\n AcquireRightsError,\n UpdateRightsRequest,\n UpdateRightsResponse,\n UpdateRightsSuccess,\n UpdateRightsError,\n CreativeApprovalRequest,\n CreativeApprovalResponse,\n CreativeApproved,\n CreativeRejected,\n CreativePendingReview,\n CreativeApprovalError,\n RightsTerms,\n RightsConstraint,\n RightUse,\n RightType,\n GenerationCredential,\n} from './core.generated';\n\n// Strict format asset slot types (hand-authored — the codegen drops the\n// discriminated per-asset-type branches of Format.assets[]).\nexport * from './format-asset-slots';\n\n// Discriminated union of creative asset INSTANCES (what a buyer delivers\n// inside `creative_manifest.assets`). Companion to format-asset-slots.ts\n// (which describes what a publisher SELLS in `Format.assets[]`). The\n// individual ImageAsset / VideoAsset / etc. interfaces are generated; this\n// file is the missing canonical union over them.\n// Note: tools.generated.ts also has `AssetVariant`, a narrower generated union\n// that omits AudioAsset. `AssetInstance` (this file) is the curated, complete\n// union — prefer it. `AssetVariant` is intentionally not re-exported.\nexport * from './asset-instances';\n\n// Strict per-row types for sync_* response success arms. The codegen\n// leaves these row shapes inline; named types make the discriminators\n// (e.g., SyncAccountsResponseRow.action) reachable to handler authors.\nexport * from './sync-rows';\n\n// Re-export const-array enum values (e.g., MediaChannelValues, PacingValues)\n// for consumers that need to enumerate or validate against the spec's\n// literal sets without re-deriving them from Zod schemas.\nexport * from './enums.generated';\n\n// Re-export inline-union value arrays for anonymous string-literal unions\n// inside named schemas (e.g., ImageAssetRequirements_FormatsValues,\n// VideoAssetRequirements_ContainersValues). Companion to enums.generated;\n// see scripts/generate-inline-enum-arrays.ts.\nexport * from './inline-enums.generated';\n\n// Back-compat aliases for inline-enum exports collapsed in AdCP 3.0.1\n// (adcp#3148 / #3174 hoisted byte-identical literal sets into shared\n// `enums/*.json` files). Each alias is `@deprecated` so editor tooling\n// surfaces the canonical replacement; slated for removal in the next major.\nexport * from './inline-enums.aliases';\n\n// Back-compat aliases for the 6 error-details schemas renamed in AdCP 3.0.x\n// (adcp#3149 / adcp#3566 canonicalized SCREAMING_SNAKE titles into Title Case).\n// Each alias is `@deprecated`; slated for removal in the next major.\nexport * from './error-details.aliases';\n\n// Well-known file shapes (brand.json, adagents.json) inferred from the\n// canonical Zod schemas. Re-exported so adopters can derive types like\n// `BrandDefinition` directly from the spec instead of hand-rolling\n// interfaces that drift across versions. Source of truth is the schema\n// cache (`schemas/cache/{version}/{brand,adagents}.json`) — regenerate\n// with `npm run generate-wellknown-schemas` when the spec bumps.\nexport type { BrandJson, AdagentsJson } from './wellknown-schemas.generated';\nexport { BrandJsonSchema, AdagentsJsonSchema } from './wellknown-schemas.generated';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAc,mBADd;AAkCA,0BAAc,qCAlCd;AA0TA,0BAAc,iCA1Td;AAoUA,0BAAc,8BApUd;AAyUA,0BAAc,wBAzUd;AA8UA,0BAAc,8BA9Ud;AAoVA,0BAAc,qCApVd;AA0VA,0BAAc,mCA1Vd;AA+VA,0BAAc,oCA/Vd;AAwWA,+BAAoD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/types/index.ts"],"sourcesContent":["// AdCP Core Types - Main exports for external consumers\nexport * from './adcp';\n\n// Re-export key types for easier importing\nexport type {\n AgentConfig,\n TestResult,\n TestRequest,\n ApiResponse,\n LegacyCreativeFormatSummary,\n LegacyAdvertisingProduct,\n MediaBuy,\n Targeting,\n LegacyManagedCreativeAsset,\n LegacyManageSyncCreativesRequest,\n LegacyManageListCreativesRequest,\n LegacyManageListCreativesResponse,\n LegacyManagedCreativeFilters,\n ManageCreativeAssetsRequest,\n ManageCreativeAssetsResponse,\n CreateMediaBuyAsyncResponseData,\n UpdateMediaBuyAsyncResponseData,\n GetProductsAsyncResponseData,\n SyncCreativesAsyncResponseData,\n} from './adcp';\n\n// Re-export the structured format identifier from generated core types.\n// AdCP 3.0.1 renamed the schema title from \"Format ID\" to \"Format Reference\n// (Structured Object)\" — purely a doc change, the wire shape is identical.\n// We expose the new canonical name AND keep the historical `FormatID` alias\n// so SDK consumers don't break across the version bump.\nexport type { FormatReferenceStructuredObject } from './core.generated';\nimport type { FormatReferenceStructuredObject } from './core.generated';\nexport type { RequireCacheScopeWhenProducts, ServerPayload } from './server-payload';\nexport * from './server-payload-aliases';\n/**\n * @deprecated AdCP 3.0.1 renamed this type to `FormatReferenceStructuredObject`\n * (the wire shape is identical — pure documentation rename per the spec). This\n * alias is preserved for one minor cycle so existing imports keep compiling;\n * editor tooling will surface the rename so downstream code can migrate at its\n * own pace. Slated for removal in the next major.\n */\nexport type FormatID = FormatReferenceStructuredObject;\n\n// Re-export wire request/response types adopters need when building a\n// DecisioningPlatform or calling AdCP agents. Source of truth is\n// `tools.generated.ts`; this curated block is the public surface so\n// adopters never reach into generated files.\n//\n// Intentionally excluded — name conflicts with legacy adcp.ts shapes:\n// LegacyManageSyncCreativesRequest, LegacyManageListCreativesRequest, LegacyManageListCreativesResponse,\n// ManageCreativeAssetsRequest, ManageCreativeAssetsResponse (adcp.ts versions\n// already public via `export * from './adcp'` above; use those).\n// Intentionally excluded — comply-runner internals, not specialism surface:\n// ComplyTestControllerRequest/Response, SeedSuccess, SimulationSuccess,\n// ControllerError, ForcedDirectiveSuccess, StateTransitionSuccess,\n// ListScenariosSuccess.\n// Intentionally excluded — internal pagination/packaging sub-shapes, not\n// part of the top-level tool request/response surface:\n// PaginationRequest, PaginationResponse, PackageRequest,\n// TMPResponseType, WebhookResponseType.\n\n// Account model + account operations\nexport type {\n AccountReference,\n ListAccountsRequest,\n ListAccountsResponse,\n SyncAccountsRequest,\n SyncAccountsResponse,\n SyncAccountsSuccess,\n SyncAccountsError,\n GetAccountFinancialsRequest,\n GetAccountFinancialsResponse,\n GetAccountFinancialsSuccess,\n GetAccountFinancialsError,\n} from './tools.generated';\n\n// Capabilities\nexport type { AdCPSpecialism, GetAdCPCapabilitiesRequest, GetAdCPCapabilitiesResponse } from './tools.generated';\n\n// Sales — media buy\nexport type {\n GetProductsRequest,\n GetProductsResponse,\n GetProductsAsyncSubmitted,\n CreateMediaBuyRequest,\n CreateMediaBuyResponse,\n CreateMediaBuySuccess,\n CreateMediaBuyError,\n CreateMediaBuySubmitted,\n CreateMediaBuyAsyncSubmitted,\n UpdateMediaBuyRequest,\n UpdateMediaBuyResponse,\n UpdateMediaBuySuccess,\n UpdateMediaBuyError,\n UpdateMediaBuyAsyncSubmitted,\n GetMediaBuysRequest,\n GetMediaBuysResponse,\n GetMediaBuyDeliveryRequest,\n GetMediaBuyDeliveryResponse,\n GetMediaBuyArtifactsRequest,\n GetMediaBuyArtifactsResponse,\n ProvidePerformanceFeedbackRequest,\n ProvidePerformanceFeedbackResponse,\n ProvidePerformanceFeedbackSuccess,\n ProvidePerformanceFeedbackError,\n SyncPlansRequest,\n SyncPlansResponse,\n ReportUsageRequest,\n ReportUsageResponse,\n ReportPlanOutcomeRequest,\n ReportPlanOutcomeResponse,\n GetPlanAuditLogsRequest,\n GetPlanAuditLogsResponse,\n} from './tools.generated';\n\n// Pricing models (discriminated union across pricing types)\nexport type { PricingOption, CPMPricingOption, CPCPricingOption, CPVPricingOption } from './tools.generated';\n\n// Media-channel + status enums; publisher property + reporting shapes\nexport type {\n MediaChannel,\n AudienceStatus,\n MediaBuyStatus,\n CreativeStatus,\n Placement,\n PublisherPropertySelector,\n ReportingCapabilities,\n} from './tools.generated';\n\n// Audiences, catalogs, event sources, and events (audience-sync + retail media)\nexport type {\n SyncAudiencesRequest,\n SyncAudiencesResponse,\n SyncAudiencesSuccess,\n SyncAudiencesError,\n SyncCatalogsRequest,\n SyncCatalogsResponse,\n SyncCatalogsSuccess,\n SyncCatalogsError,\n SyncCatalogsAsyncSubmitted,\n SyncEventSourcesRequest,\n SyncEventSourcesResponse,\n SyncEventSourcesSuccess,\n SyncEventSourcesError,\n LogEventRequest,\n LogEventResponse,\n LogEventSuccess,\n LogEventError,\n} from './tools.generated';\n\n// Signals\nexport type {\n GetSignalsRequest,\n GetSignalsResponse,\n ActivateSignalRequest,\n ActivateSignalResponse,\n ActivateSignalSuccess,\n ActivateSignalError,\n SignalID,\n SignalValueType,\n SignalAvailabilityType,\n SignalAvailabilityType as SignalCatalogType,\n Destination,\n Deployment,\n ActivationKey,\n VendorPricingOption,\n SignalFilters, // embedded in GetSignalsRequest.filters\n SignalTargeting, // embedded in ActivateSignalRequest.signal_targeting\n} from './tools.generated';\n\n// Creative\nexport type {\n BuildCreativeRequest,\n BuildCreativeResponse,\n BuildCreativeSuccess,\n BuildCreativeError,\n BuildCreativeMultiSuccess,\n BuildCreativeAsyncSubmitted,\n CreativeManifest,\n PreviewCreativeRequest,\n PreviewCreativeResponse,\n PreviewCreativeSingleResponse,\n PreviewCreativeVariantResponse,\n PreviewCreativeBatchResponse,\n PreviewBatchResultSuccess,\n PreviewBatchResultError,\n ListCreativeFormatsRequest,\n ListCreativeFormatsResponse,\n GetCreativeFeaturesRequest,\n GetCreativeFeaturesResponse,\n GetCreativeDeliveryRequest,\n GetCreativeDeliveryResponse,\n SyncCreativesRequest,\n SyncCreativesResponse,\n SyncCreativesSuccess,\n SyncCreativesError,\n SyncCreativesSubmitted,\n SyncCreativesAsyncSubmitted,\n ListCreativesRequest,\n ListCreativesResponse,\n CreativeFilters,\n CreativeAsset,\n CreativeQuality,\n Format,\n ProductFormatDeclaration,\n FormatIDParameter,\n} from './tools.generated';\n\n// Governance — property lists\nexport type {\n PropertyList,\n CreatePropertyListRequest,\n CreatePropertyListResponse,\n UpdatePropertyListRequest,\n UpdatePropertyListResponse,\n GetPropertyListRequest,\n GetPropertyListResponse,\n ListPropertyListsRequest,\n ListPropertyListsResponse,\n DeletePropertyListRequest,\n DeletePropertyListResponse,\n} from './tools.generated';\n\n// Governance — collection lists\nexport type {\n CollectionList,\n CreateCollectionListRequest,\n CreateCollectionListResponse,\n UpdateCollectionListRequest,\n UpdateCollectionListResponse,\n GetCollectionListRequest,\n GetCollectionListResponse,\n ListCollectionListsRequest,\n ListCollectionListsResponse,\n DeleteCollectionListRequest,\n DeleteCollectionListResponse,\n} from './tools.generated';\n\n// Governance — content standards + delivery validation\nexport type {\n CheckGovernanceRequest,\n CheckGovernanceResponse,\n SyncGovernanceRequest,\n SyncGovernanceResponse,\n SyncGovernanceSuccess,\n SyncGovernanceError,\n CreateContentStandardsRequest,\n CreateContentStandardsResponse,\n UpdateContentStandardsRequest,\n UpdateContentStandardsResponse,\n UpdateContentStandardsSuccess,\n UpdateContentStandardsError,\n ListContentStandardsRequest,\n ListContentStandardsResponse,\n GetContentStandardsRequest,\n GetContentStandardsResponse,\n CalibrateContentRequest,\n CalibrateContentResponse,\n ValidateContentDeliveryRequest,\n ValidateContentDeliveryResponse,\n} from './tools.generated';\n\n// Sponsored intelligence\nexport type {\n SIGetOfferingRequest,\n SIGetOfferingResponse,\n SIInitiateSessionRequest,\n SIInitiateSessionResponse,\n SISendMessageRequest,\n SISendMessageResponse,\n SITerminateSessionRequest,\n SITerminateSessionResponse,\n SICapabilities,\n SIIdentity,\n SISessionStatus,\n SIUIElement,\n} from './tools.generated';\n\n// Brand rights — identity discovery + licensing for branded inventory.\n// `creative_approval` is webhook-only (not an MCP/A2A tool) — types\n// re-exported for adopters wiring their own HTTP receiver.\nexport type {\n GetBrandIdentityRequest,\n GetBrandIdentityResponse,\n GetBrandIdentitySuccess,\n GetRightsRequest,\n GetRightsResponse,\n GetRightsSuccess,\n AcquireRightsRequest,\n AcquireRightsResponse,\n AcquireRightsAcquired,\n AcquireRightsPendingApproval,\n AcquireRightsRejected,\n AcquireRightsError,\n UpdateRightsRequest,\n UpdateRightsResponse,\n UpdateRightsSuccess,\n UpdateRightsError,\n CreativeApprovalRequest,\n CreativeApprovalResponse,\n CreativeApproved,\n CreativeRejected,\n CreativePendingReview,\n CreativeApprovalError,\n RightsTerms,\n RightsConstraint,\n RightUse,\n RightType,\n GenerationCredential,\n} from './core.generated';\n\n// Strict format asset slot types (hand-authored — the codegen drops the\n// discriminated per-asset-type branches of Format.assets[]).\nexport * from './format-asset-slots';\n\n// Discriminated union of creative asset INSTANCES (what a buyer delivers\n// inside `creative_manifest.assets`). Companion to format-asset-slots.ts\n// (which describes what a publisher SELLS in `Format.assets[]`). The\n// individual ImageAsset / VideoAsset / etc. interfaces and their canonical\n// `AssetVariant` union are generated. `AssetInstance` aliases that union so\n// every registry-backed asset branch remains available without curated drift.\n// `AssetVariant` itself is intentionally not re-exported.\nexport * from './asset-instances';\n\n// Strict per-row types for sync_* response success arms. The codegen\n// leaves these row shapes inline; named types make the discriminators\n// (e.g., SyncAccountsResponseRow.action) reachable to handler authors.\nexport * from './sync-rows';\n\n// Re-export const-array enum values (e.g., MediaChannelValues, PacingValues)\n// for consumers that need to enumerate or validate against the spec's\n// literal sets without re-deriving them from Zod schemas.\nexport * from './enums.generated';\n\n// Re-export inline-union value arrays for anonymous string-literal unions\n// inside named schemas (e.g., ImageAssetRequirements_FormatsValues,\n// VideoAssetRequirements_ContainersValues). Companion to enums.generated;\n// see scripts/generate-inline-enum-arrays.ts.\nexport * from './inline-enums.generated';\n\n// Back-compat aliases for inline-enum exports collapsed in AdCP 3.0.1\n// (adcp#3148 / #3174 hoisted byte-identical literal sets into shared\n// `enums/*.json` files). Each alias is `@deprecated` so editor tooling\n// surfaces the canonical replacement; slated for removal in the next major.\nexport * from './inline-enums.aliases';\n\n// Back-compat aliases for the 6 error-details schemas renamed in AdCP 3.0.x\n// (adcp#3149 / adcp#3566 canonicalized SCREAMING_SNAKE titles into Title Case).\n// Each alias is `@deprecated`; slated for removal in the next major.\nexport * from './error-details.aliases';\n\n// Well-known file shapes (brand.json, adagents.json) inferred from the\n// canonical Zod schemas. Re-exported so adopters can derive types like\n// `BrandDefinition` directly from the spec instead of hand-rolling\n// interfaces that drift across versions. Source of truth is the schema\n// cache (`schemas/cache/{version}/{brand,adagents}.json`) — regenerate\n// with `npm run generate-wellknown-schemas` when the spec bumps.\nexport type { BrandJson, AdagentsJson } from './wellknown-schemas.generated';\nexport { BrandJsonSchema, AdagentsJsonSchema } from './wellknown-schemas.generated';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAc,mBADd;AAkCA,0BAAc,qCAlCd;AA0TA,0BAAc,iCA1Td;AAmUA,0BAAc,8BAnUd;AAwUA,0BAAc,wBAxUd;AA6UA,0BAAc,8BA7Ud;AAmVA,0BAAc,qCAnVd;AAyVA,0BAAc,mCAzVd;AA8VA,0BAAc,oCA9Vd;AAuWA,+BAAoD;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/types/index.ts"],"sourcesContent":["// AdCP Core Types - Main exports for external consumers\nexport * from './adcp';\n\n// Re-export key types for easier importing\nexport type {\n AgentConfig,\n TestResult,\n TestRequest,\n ApiResponse,\n LegacyCreativeFormatSummary,\n LegacyAdvertisingProduct,\n MediaBuy,\n Targeting,\n LegacyManagedCreativeAsset,\n LegacyManageSyncCreativesRequest,\n LegacyManageListCreativesRequest,\n LegacyManageListCreativesResponse,\n LegacyManagedCreativeFilters,\n ManageCreativeAssetsRequest,\n ManageCreativeAssetsResponse,\n CreateMediaBuyAsyncResponseData,\n UpdateMediaBuyAsyncResponseData,\n GetProductsAsyncResponseData,\n SyncCreativesAsyncResponseData,\n} from './adcp';\n\n// Re-export the structured format identifier from generated core types.\n// AdCP 3.0.1 renamed the schema title from \"Format ID\" to \"Format Reference\n// (Structured Object)\" — purely a doc change, the wire shape is identical.\n// We expose the new canonical name AND keep the historical `FormatID` alias\n// so SDK consumers don't break across the version bump.\nexport type { FormatReferenceStructuredObject } from './core.generated';\nimport type { FormatReferenceStructuredObject } from './core.generated';\nexport type { RequireCacheScopeWhenProducts, ServerPayload } from './server-payload';\nexport * from './server-payload-aliases';\n/**\n * @deprecated AdCP 3.0.1 renamed this type to `FormatReferenceStructuredObject`\n * (the wire shape is identical — pure documentation rename per the spec). This\n * alias is preserved for one minor cycle so existing imports keep compiling;\n * editor tooling will surface the rename so downstream code can migrate at its\n * own pace. Slated for removal in the next major.\n */\nexport type FormatID = FormatReferenceStructuredObject;\n\n// Re-export wire request/response types adopters need when building a\n// DecisioningPlatform or calling AdCP agents. Source of truth is\n// `tools.generated.ts`; this curated block is the public surface so\n// adopters never reach into generated files.\n//\n// Intentionally excluded — name conflicts with legacy adcp.ts shapes:\n// LegacyManageSyncCreativesRequest, LegacyManageListCreativesRequest, LegacyManageListCreativesResponse,\n// ManageCreativeAssetsRequest, ManageCreativeAssetsResponse (adcp.ts versions\n// already public via `export * from './adcp'` above; use those).\n// Intentionally excluded — comply-runner internals, not specialism surface:\n// ComplyTestControllerRequest/Response, SeedSuccess, SimulationSuccess,\n// ControllerError, ForcedDirectiveSuccess, StateTransitionSuccess,\n// ListScenariosSuccess.\n// Intentionally excluded — internal pagination/packaging sub-shapes, not\n// part of the top-level tool request/response surface:\n// PaginationRequest, PaginationResponse, PackageRequest,\n// TMPResponseType, WebhookResponseType.\n\n// Account model + account operations\nexport type {\n AccountReference,\n ListAccountsRequest,\n ListAccountsResponse,\n SyncAccountsRequest,\n SyncAccountsResponse,\n SyncAccountsSuccess,\n SyncAccountsError,\n GetAccountFinancialsRequest,\n GetAccountFinancialsResponse,\n GetAccountFinancialsSuccess,\n GetAccountFinancialsError,\n} from './tools.generated';\n\n// Capabilities\nexport type { AdCPSpecialism, GetAdCPCapabilitiesRequest, GetAdCPCapabilitiesResponse } from './tools.generated';\n\n// Sales — media buy\nexport type {\n GetProductsRequest,\n GetProductsResponse,\n GetProductsAsyncSubmitted,\n CreateMediaBuyRequest,\n CreateMediaBuyResponse,\n CreateMediaBuySuccess,\n CreateMediaBuyError,\n CreateMediaBuySubmitted,\n CreateMediaBuyAsyncSubmitted,\n UpdateMediaBuyRequest,\n UpdateMediaBuyResponse,\n UpdateMediaBuySuccess,\n UpdateMediaBuyError,\n UpdateMediaBuyAsyncSubmitted,\n GetMediaBuysRequest,\n GetMediaBuysResponse,\n GetMediaBuyDeliveryRequest,\n GetMediaBuyDeliveryResponse,\n GetMediaBuyArtifactsRequest,\n GetMediaBuyArtifactsResponse,\n ProvidePerformanceFeedbackRequest,\n ProvidePerformanceFeedbackResponse,\n ProvidePerformanceFeedbackSuccess,\n ProvidePerformanceFeedbackError,\n SyncPlansRequest,\n SyncPlansResponse,\n ReportUsageRequest,\n ReportUsageResponse,\n ReportPlanOutcomeRequest,\n ReportPlanOutcomeResponse,\n GetPlanAuditLogsRequest,\n GetPlanAuditLogsResponse,\n} from './tools.generated';\n\n// Pricing models (discriminated union across pricing types)\nexport type { PricingOption, CPMPricingOption, CPCPricingOption, CPVPricingOption } from './tools.generated';\n\n// Media-channel + status enums; publisher property + reporting shapes\nexport type {\n MediaChannel,\n AudienceStatus,\n MediaBuyStatus,\n CreativeStatus,\n Placement,\n PublisherPropertySelector,\n ReportingCapabilities,\n} from './tools.generated';\n\n// Audiences, catalogs, event sources, and events (audience-sync + retail media)\nexport type {\n SyncAudiencesRequest,\n SyncAudiencesResponse,\n SyncAudiencesSuccess,\n SyncAudiencesError,\n SyncCatalogsRequest,\n SyncCatalogsResponse,\n SyncCatalogsSuccess,\n SyncCatalogsError,\n SyncCatalogsAsyncSubmitted,\n SyncEventSourcesRequest,\n SyncEventSourcesResponse,\n SyncEventSourcesSuccess,\n SyncEventSourcesError,\n LogEventRequest,\n LogEventResponse,\n LogEventSuccess,\n LogEventError,\n} from './tools.generated';\n\n// Signals\nexport type {\n GetSignalsRequest,\n GetSignalsResponse,\n ActivateSignalRequest,\n ActivateSignalResponse,\n ActivateSignalSuccess,\n ActivateSignalError,\n SignalID,\n SignalValueType,\n SignalAvailabilityType,\n SignalAvailabilityType as SignalCatalogType,\n Destination,\n Deployment,\n ActivationKey,\n VendorPricingOption,\n SignalFilters, // embedded in GetSignalsRequest.filters\n SignalTargeting, // embedded in ActivateSignalRequest.signal_targeting\n} from './tools.generated';\n\n// Creative\nexport type {\n BuildCreativeRequest,\n BuildCreativeResponse,\n BuildCreativeSuccess,\n BuildCreativeError,\n BuildCreativeMultiSuccess,\n BuildCreativeAsyncSubmitted,\n CreativeManifest,\n PreviewCreativeRequest,\n PreviewCreativeResponse,\n PreviewCreativeSingleResponse,\n PreviewCreativeVariantResponse,\n PreviewCreativeBatchResponse,\n PreviewBatchResultSuccess,\n PreviewBatchResultError,\n ListCreativeFormatsRequest,\n ListCreativeFormatsResponse,\n GetCreativeFeaturesRequest,\n GetCreativeFeaturesResponse,\n GetCreativeDeliveryRequest,\n GetCreativeDeliveryResponse,\n SyncCreativesRequest,\n SyncCreativesResponse,\n SyncCreativesSuccess,\n SyncCreativesError,\n SyncCreativesSubmitted,\n SyncCreativesAsyncSubmitted,\n ListCreativesRequest,\n ListCreativesResponse,\n CreativeFilters,\n CreativeAsset,\n CreativeQuality,\n Format,\n ProductFormatDeclaration,\n FormatIDParameter,\n} from './tools.generated';\n\n// Governance — property lists\nexport type {\n PropertyList,\n CreatePropertyListRequest,\n CreatePropertyListResponse,\n UpdatePropertyListRequest,\n UpdatePropertyListResponse,\n GetPropertyListRequest,\n GetPropertyListResponse,\n ListPropertyListsRequest,\n ListPropertyListsResponse,\n DeletePropertyListRequest,\n DeletePropertyListResponse,\n} from './tools.generated';\n\n// Governance — collection lists\nexport type {\n CollectionList,\n CreateCollectionListRequest,\n CreateCollectionListResponse,\n UpdateCollectionListRequest,\n UpdateCollectionListResponse,\n GetCollectionListRequest,\n GetCollectionListResponse,\n ListCollectionListsRequest,\n ListCollectionListsResponse,\n DeleteCollectionListRequest,\n DeleteCollectionListResponse,\n} from './tools.generated';\n\n// Governance — content standards + delivery validation\nexport type {\n CheckGovernanceRequest,\n CheckGovernanceResponse,\n SyncGovernanceRequest,\n SyncGovernanceResponse,\n SyncGovernanceSuccess,\n SyncGovernanceError,\n CreateContentStandardsRequest,\n CreateContentStandardsResponse,\n UpdateContentStandardsRequest,\n UpdateContentStandardsResponse,\n UpdateContentStandardsSuccess,\n UpdateContentStandardsError,\n ListContentStandardsRequest,\n ListContentStandardsResponse,\n GetContentStandardsRequest,\n GetContentStandardsResponse,\n CalibrateContentRequest,\n CalibrateContentResponse,\n ValidateContentDeliveryRequest,\n ValidateContentDeliveryResponse,\n} from './tools.generated';\n\n// Sponsored intelligence\nexport type {\n SIGetOfferingRequest,\n SIGetOfferingResponse,\n SIInitiateSessionRequest,\n SIInitiateSessionResponse,\n SISendMessageRequest,\n SISendMessageResponse,\n SITerminateSessionRequest,\n SITerminateSessionResponse,\n SICapabilities,\n SIIdentity,\n SISessionStatus,\n SIUIElement,\n} from './tools.generated';\n\n// Brand rights — identity discovery + licensing for branded inventory.\n// `creative_approval` is webhook-only (not an MCP/A2A tool) — types\n// re-exported for adopters wiring their own HTTP receiver.\nexport type {\n GetBrandIdentityRequest,\n GetBrandIdentityResponse,\n GetBrandIdentitySuccess,\n GetRightsRequest,\n GetRightsResponse,\n GetRightsSuccess,\n AcquireRightsRequest,\n AcquireRightsResponse,\n AcquireRightsAcquired,\n AcquireRightsPendingApproval,\n AcquireRightsRejected,\n AcquireRightsError,\n UpdateRightsRequest,\n UpdateRightsResponse,\n UpdateRightsSuccess,\n UpdateRightsError,\n CreativeApprovalRequest,\n CreativeApprovalResponse,\n CreativeApproved,\n CreativeRejected,\n CreativePendingReview,\n CreativeApprovalError,\n RightsTerms,\n RightsConstraint,\n RightUse,\n RightType,\n GenerationCredential,\n} from './core.generated';\n\n// Strict format asset slot types (hand-authored — the codegen drops the\n// discriminated per-asset-type branches of Format.assets[]).\nexport * from './format-asset-slots';\n\n// Discriminated union of creative asset INSTANCES (what a buyer delivers\n// inside `creative_manifest.assets`). Companion to format-asset-slots.ts\n// (which describes what a publisher SELLS in `Format.assets[]`). The\n// individual ImageAsset / VideoAsset / etc. interfaces are generated; this\n// file is the missing canonical union over them.\n// Note: tools.generated.ts also has `AssetVariant`, a narrower generated union\n// that omits AudioAsset. `AssetInstance` (this file) is the curated, complete\n// union — prefer it. `AssetVariant` is intentionally not re-exported.\nexport * from './asset-instances';\n\n// Strict per-row types for sync_* response success arms. The codegen\n// leaves these row shapes inline; named types make the discriminators\n// (e.g., SyncAccountsResponseRow.action) reachable to handler authors.\nexport * from './sync-rows';\n\n// Re-export const-array enum values (e.g., MediaChannelValues, PacingValues)\n// for consumers that need to enumerate or validate against the spec's\n// literal sets without re-deriving them from Zod schemas.\nexport * from './enums.generated';\n\n// Re-export inline-union value arrays for anonymous string-literal unions\n// inside named schemas (e.g., ImageAssetRequirements_FormatsValues,\n// VideoAssetRequirements_ContainersValues). Companion to enums.generated;\n// see scripts/generate-inline-enum-arrays.ts.\nexport * from './inline-enums.generated';\n\n// Back-compat aliases for inline-enum exports collapsed in AdCP 3.0.1\n// (adcp#3148 / #3174 hoisted byte-identical literal sets into shared\n// `enums/*.json` files). Each alias is `@deprecated` so editor tooling\n// surfaces the canonical replacement; slated for removal in the next major.\nexport * from './inline-enums.aliases';\n\n// Back-compat aliases for the 6 error-details schemas renamed in AdCP 3.0.x\n// (adcp#3149 / adcp#3566 canonicalized SCREAMING_SNAKE titles into Title Case).\n// Each alias is `@deprecated`; slated for removal in the next major.\nexport * from './error-details.aliases';\n\n// Well-known file shapes (brand.json, adagents.json) inferred from the\n// canonical Zod schemas. Re-exported so adopters can derive types like\n// `BrandDefinition` directly from the spec instead of hand-rolling\n// interfaces that drift across versions. Source of truth is the schema\n// cache (`schemas/cache/{version}/{brand,adagents}.json`) — regenerate\n// with `npm run generate-wellknown-schemas` when the spec bumps.\nexport type { BrandJson, AdagentsJson } from './wellknown-schemas.generated';\nexport { BrandJsonSchema, AdagentsJsonSchema } from './wellknown-schemas.generated';\n"],"mappings":"AACA,cAAc;AAiCd,cAAc;AAwRd,cAAc;AAUd,cAAc;AAKd,cAAc;AAKd,cAAc;AAMd,cAAc;AAMd,cAAc;AAKd,cAAc;AASd,SAAS,iBAAiB,0BAA0B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/types/index.ts"],"sourcesContent":["// AdCP Core Types - Main exports for external consumers\nexport * from './adcp';\n\n// Re-export key types for easier importing\nexport type {\n AgentConfig,\n TestResult,\n TestRequest,\n ApiResponse,\n LegacyCreativeFormatSummary,\n LegacyAdvertisingProduct,\n MediaBuy,\n Targeting,\n LegacyManagedCreativeAsset,\n LegacyManageSyncCreativesRequest,\n LegacyManageListCreativesRequest,\n LegacyManageListCreativesResponse,\n LegacyManagedCreativeFilters,\n ManageCreativeAssetsRequest,\n ManageCreativeAssetsResponse,\n CreateMediaBuyAsyncResponseData,\n UpdateMediaBuyAsyncResponseData,\n GetProductsAsyncResponseData,\n SyncCreativesAsyncResponseData,\n} from './adcp';\n\n// Re-export the structured format identifier from generated core types.\n// AdCP 3.0.1 renamed the schema title from \"Format ID\" to \"Format Reference\n// (Structured Object)\" — purely a doc change, the wire shape is identical.\n// We expose the new canonical name AND keep the historical `FormatID` alias\n// so SDK consumers don't break across the version bump.\nexport type { FormatReferenceStructuredObject } from './core.generated';\nimport type { FormatReferenceStructuredObject } from './core.generated';\nexport type { RequireCacheScopeWhenProducts, ServerPayload } from './server-payload';\nexport * from './server-payload-aliases';\n/**\n * @deprecated AdCP 3.0.1 renamed this type to `FormatReferenceStructuredObject`\n * (the wire shape is identical — pure documentation rename per the spec). This\n * alias is preserved for one minor cycle so existing imports keep compiling;\n * editor tooling will surface the rename so downstream code can migrate at its\n * own pace. Slated for removal in the next major.\n */\nexport type FormatID = FormatReferenceStructuredObject;\n\n// Re-export wire request/response types adopters need when building a\n// DecisioningPlatform or calling AdCP agents. Source of truth is\n// `tools.generated.ts`; this curated block is the public surface so\n// adopters never reach into generated files.\n//\n// Intentionally excluded — name conflicts with legacy adcp.ts shapes:\n// LegacyManageSyncCreativesRequest, LegacyManageListCreativesRequest, LegacyManageListCreativesResponse,\n// ManageCreativeAssetsRequest, ManageCreativeAssetsResponse (adcp.ts versions\n// already public via `export * from './adcp'` above; use those).\n// Intentionally excluded — comply-runner internals, not specialism surface:\n// ComplyTestControllerRequest/Response, SeedSuccess, SimulationSuccess,\n// ControllerError, ForcedDirectiveSuccess, StateTransitionSuccess,\n// ListScenariosSuccess.\n// Intentionally excluded — internal pagination/packaging sub-shapes, not\n// part of the top-level tool request/response surface:\n// PaginationRequest, PaginationResponse, PackageRequest,\n// TMPResponseType, WebhookResponseType.\n\n// Account model + account operations\nexport type {\n AccountReference,\n ListAccountsRequest,\n ListAccountsResponse,\n SyncAccountsRequest,\n SyncAccountsResponse,\n SyncAccountsSuccess,\n SyncAccountsError,\n GetAccountFinancialsRequest,\n GetAccountFinancialsResponse,\n GetAccountFinancialsSuccess,\n GetAccountFinancialsError,\n} from './tools.generated';\n\n// Capabilities\nexport type { AdCPSpecialism, GetAdCPCapabilitiesRequest, GetAdCPCapabilitiesResponse } from './tools.generated';\n\n// Sales — media buy\nexport type {\n GetProductsRequest,\n GetProductsResponse,\n GetProductsAsyncSubmitted,\n CreateMediaBuyRequest,\n CreateMediaBuyResponse,\n CreateMediaBuySuccess,\n CreateMediaBuyError,\n CreateMediaBuySubmitted,\n CreateMediaBuyAsyncSubmitted,\n UpdateMediaBuyRequest,\n UpdateMediaBuyResponse,\n UpdateMediaBuySuccess,\n UpdateMediaBuyError,\n UpdateMediaBuyAsyncSubmitted,\n GetMediaBuysRequest,\n GetMediaBuysResponse,\n GetMediaBuyDeliveryRequest,\n GetMediaBuyDeliveryResponse,\n GetMediaBuyArtifactsRequest,\n GetMediaBuyArtifactsResponse,\n ProvidePerformanceFeedbackRequest,\n ProvidePerformanceFeedbackResponse,\n ProvidePerformanceFeedbackSuccess,\n ProvidePerformanceFeedbackError,\n SyncPlansRequest,\n SyncPlansResponse,\n ReportUsageRequest,\n ReportUsageResponse,\n ReportPlanOutcomeRequest,\n ReportPlanOutcomeResponse,\n GetPlanAuditLogsRequest,\n GetPlanAuditLogsResponse,\n} from './tools.generated';\n\n// Pricing models (discriminated union across pricing types)\nexport type { PricingOption, CPMPricingOption, CPCPricingOption, CPVPricingOption } from './tools.generated';\n\n// Media-channel + status enums; publisher property + reporting shapes\nexport type {\n MediaChannel,\n AudienceStatus,\n MediaBuyStatus,\n CreativeStatus,\n Placement,\n PublisherPropertySelector,\n ReportingCapabilities,\n} from './tools.generated';\n\n// Audiences, catalogs, event sources, and events (audience-sync + retail media)\nexport type {\n SyncAudiencesRequest,\n SyncAudiencesResponse,\n SyncAudiencesSuccess,\n SyncAudiencesError,\n SyncCatalogsRequest,\n SyncCatalogsResponse,\n SyncCatalogsSuccess,\n SyncCatalogsError,\n SyncCatalogsAsyncSubmitted,\n SyncEventSourcesRequest,\n SyncEventSourcesResponse,\n SyncEventSourcesSuccess,\n SyncEventSourcesError,\n LogEventRequest,\n LogEventResponse,\n LogEventSuccess,\n LogEventError,\n} from './tools.generated';\n\n// Signals\nexport type {\n GetSignalsRequest,\n GetSignalsResponse,\n ActivateSignalRequest,\n ActivateSignalResponse,\n ActivateSignalSuccess,\n ActivateSignalError,\n SignalID,\n SignalValueType,\n SignalAvailabilityType,\n SignalAvailabilityType as SignalCatalogType,\n Destination,\n Deployment,\n ActivationKey,\n VendorPricingOption,\n SignalFilters, // embedded in GetSignalsRequest.filters\n SignalTargeting, // embedded in ActivateSignalRequest.signal_targeting\n} from './tools.generated';\n\n// Creative\nexport type {\n BuildCreativeRequest,\n BuildCreativeResponse,\n BuildCreativeSuccess,\n BuildCreativeError,\n BuildCreativeMultiSuccess,\n BuildCreativeAsyncSubmitted,\n CreativeManifest,\n PreviewCreativeRequest,\n PreviewCreativeResponse,\n PreviewCreativeSingleResponse,\n PreviewCreativeVariantResponse,\n PreviewCreativeBatchResponse,\n PreviewBatchResultSuccess,\n PreviewBatchResultError,\n ListCreativeFormatsRequest,\n ListCreativeFormatsResponse,\n GetCreativeFeaturesRequest,\n GetCreativeFeaturesResponse,\n GetCreativeDeliveryRequest,\n GetCreativeDeliveryResponse,\n SyncCreativesRequest,\n SyncCreativesResponse,\n SyncCreativesSuccess,\n SyncCreativesError,\n SyncCreativesSubmitted,\n SyncCreativesAsyncSubmitted,\n ListCreativesRequest,\n ListCreativesResponse,\n CreativeFilters,\n CreativeAsset,\n CreativeQuality,\n Format,\n ProductFormatDeclaration,\n FormatIDParameter,\n} from './tools.generated';\n\n// Governance — property lists\nexport type {\n PropertyList,\n CreatePropertyListRequest,\n CreatePropertyListResponse,\n UpdatePropertyListRequest,\n UpdatePropertyListResponse,\n GetPropertyListRequest,\n GetPropertyListResponse,\n ListPropertyListsRequest,\n ListPropertyListsResponse,\n DeletePropertyListRequest,\n DeletePropertyListResponse,\n} from './tools.generated';\n\n// Governance — collection lists\nexport type {\n CollectionList,\n CreateCollectionListRequest,\n CreateCollectionListResponse,\n UpdateCollectionListRequest,\n UpdateCollectionListResponse,\n GetCollectionListRequest,\n GetCollectionListResponse,\n ListCollectionListsRequest,\n ListCollectionListsResponse,\n DeleteCollectionListRequest,\n DeleteCollectionListResponse,\n} from './tools.generated';\n\n// Governance — content standards + delivery validation\nexport type {\n CheckGovernanceRequest,\n CheckGovernanceResponse,\n SyncGovernanceRequest,\n SyncGovernanceResponse,\n SyncGovernanceSuccess,\n SyncGovernanceError,\n CreateContentStandardsRequest,\n CreateContentStandardsResponse,\n UpdateContentStandardsRequest,\n UpdateContentStandardsResponse,\n UpdateContentStandardsSuccess,\n UpdateContentStandardsError,\n ListContentStandardsRequest,\n ListContentStandardsResponse,\n GetContentStandardsRequest,\n GetContentStandardsResponse,\n CalibrateContentRequest,\n CalibrateContentResponse,\n ValidateContentDeliveryRequest,\n ValidateContentDeliveryResponse,\n} from './tools.generated';\n\n// Sponsored intelligence\nexport type {\n SIGetOfferingRequest,\n SIGetOfferingResponse,\n SIInitiateSessionRequest,\n SIInitiateSessionResponse,\n SISendMessageRequest,\n SISendMessageResponse,\n SITerminateSessionRequest,\n SITerminateSessionResponse,\n SICapabilities,\n SIIdentity,\n SISessionStatus,\n SIUIElement,\n} from './tools.generated';\n\n// Brand rights — identity discovery + licensing for branded inventory.\n// `creative_approval` is webhook-only (not an MCP/A2A tool) — types\n// re-exported for adopters wiring their own HTTP receiver.\nexport type {\n GetBrandIdentityRequest,\n GetBrandIdentityResponse,\n GetBrandIdentitySuccess,\n GetRightsRequest,\n GetRightsResponse,\n GetRightsSuccess,\n AcquireRightsRequest,\n AcquireRightsResponse,\n AcquireRightsAcquired,\n AcquireRightsPendingApproval,\n AcquireRightsRejected,\n AcquireRightsError,\n UpdateRightsRequest,\n UpdateRightsResponse,\n UpdateRightsSuccess,\n UpdateRightsError,\n CreativeApprovalRequest,\n CreativeApprovalResponse,\n CreativeApproved,\n CreativeRejected,\n CreativePendingReview,\n CreativeApprovalError,\n RightsTerms,\n RightsConstraint,\n RightUse,\n RightType,\n GenerationCredential,\n} from './core.generated';\n\n// Strict format asset slot types (hand-authored — the codegen drops the\n// discriminated per-asset-type branches of Format.assets[]).\nexport * from './format-asset-slots';\n\n// Discriminated union of creative asset INSTANCES (what a buyer delivers\n// inside `creative_manifest.assets`). Companion to format-asset-slots.ts\n// (which describes what a publisher SELLS in `Format.assets[]`). The\n// individual ImageAsset / VideoAsset / etc. interfaces and their canonical\n// `AssetVariant` union are generated. `AssetInstance` aliases that union so\n// every registry-backed asset branch remains available without curated drift.\n// `AssetVariant` itself is intentionally not re-exported.\nexport * from './asset-instances';\n\n// Strict per-row types for sync_* response success arms. The codegen\n// leaves these row shapes inline; named types make the discriminators\n// (e.g., SyncAccountsResponseRow.action) reachable to handler authors.\nexport * from './sync-rows';\n\n// Re-export const-array enum values (e.g., MediaChannelValues, PacingValues)\n// for consumers that need to enumerate or validate against the spec's\n// literal sets without re-deriving them from Zod schemas.\nexport * from './enums.generated';\n\n// Re-export inline-union value arrays for anonymous string-literal unions\n// inside named schemas (e.g., ImageAssetRequirements_FormatsValues,\n// VideoAssetRequirements_ContainersValues). Companion to enums.generated;\n// see scripts/generate-inline-enum-arrays.ts.\nexport * from './inline-enums.generated';\n\n// Back-compat aliases for inline-enum exports collapsed in AdCP 3.0.1\n// (adcp#3148 / #3174 hoisted byte-identical literal sets into shared\n// `enums/*.json` files). Each alias is `@deprecated` so editor tooling\n// surfaces the canonical replacement; slated for removal in the next major.\nexport * from './inline-enums.aliases';\n\n// Back-compat aliases for the 6 error-details schemas renamed in AdCP 3.0.x\n// (adcp#3149 / adcp#3566 canonicalized SCREAMING_SNAKE titles into Title Case).\n// Each alias is `@deprecated`; slated for removal in the next major.\nexport * from './error-details.aliases';\n\n// Well-known file shapes (brand.json, adagents.json) inferred from the\n// canonical Zod schemas. Re-exported so adopters can derive types like\n// `BrandDefinition` directly from the spec instead of hand-rolling\n// interfaces that drift across versions. Source of truth is the schema\n// cache (`schemas/cache/{version}/{brand,adagents}.json`) — regenerate\n// with `npm run generate-wellknown-schemas` when the spec bumps.\nexport type { BrandJson, AdagentsJson } from './wellknown-schemas.generated';\nexport { BrandJsonSchema, AdagentsJsonSchema } from './wellknown-schemas.generated';\n"],"mappings":"AACA,cAAc;AAiCd,cAAc;AAwRd,cAAc;AASd,cAAc;AAKd,cAAc;AAKd,cAAc;AAMd,cAAc;AAMd,cAAc;AAKd,cAAc;AASd,SAAS,iBAAiB,0BAA0B;","names":[]}
|
|
@@ -162,6 +162,8 @@ export interface AdcpCapabilities {
|
|
|
162
162
|
publisherDomains?: string[];
|
|
163
163
|
/** Supported advertising channels */
|
|
164
164
|
channels?: string[];
|
|
165
|
+
/** Primary countries in the agent's portfolio, not a declaration of geo-targeting support */
|
|
166
|
+
countries?: string[];
|
|
165
167
|
/** Last updated timestamp (if provided by server) */
|
|
166
168
|
lastUpdated?: string;
|
|
167
169
|
/** Whether this was synthesized from tool list (v2) or from get_adcp_capabilities (v3) */
|
|
@@ -162,6 +162,8 @@ export interface AdcpCapabilities {
|
|
|
162
162
|
publisherDomains?: string[];
|
|
163
163
|
/** Supported advertising channels */
|
|
164
164
|
channels?: string[];
|
|
165
|
+
/** Primary countries in the agent's portfolio, not a declaration of geo-targeting support */
|
|
166
|
+
countries?: string[];
|
|
165
167
|
/** Last updated timestamp (if provided by server) */
|
|
166
168
|
lastUpdated?: string;
|
|
167
169
|
/** Whether this was synthesized from tool list (v2) or from get_adcp_capabilities (v3) */
|