Skip to content

Releases: adcontextprotocol/adcp-client

v3.7.0

08 Jan 18:20
91e48e0

Choose a tag to compare

Minor Changes

  • 302089a: Add AdCP v2.6 support with backward compatibility for Format schema changes
    • New assets field in Format schema (replaces deprecated assets_required)
    • Added format-assets utilities: getFormatAssets(), getRequiredAssets(), getOptionalAssets(), etc.
    • Updated testing framework to use new utilities
    • Added URL input option for image/video assets in testing UI
    • Added 21 unit tests for format-assets utilities

v3.6.0

07 Jan 18:05
3efe672

Choose a tag to compare

Minor Changes

  • 2749985: Add test subcommand to CLI for running agent test scenarios

    New CLI command enables testing AdCP agents directly from the command line:

    # List available test scenarios
    npx @adcp/client test --list-scenarios
    
    # Run discovery tests against the built-in test agent
    npx @adcp/client test test
    
    # Run a specific scenario
    npx @adcp/client test test full_sales_flow
    
    # Test your own agent
    npx @adcp/client test https://my-agent.com discovery --auth $TOKEN
    
    # JSON output for CI pipelines
    npx @adcp/client test test discovery --json

    Available scenarios include: health_check, discovery, create_media_buy, full_sales_flow,
    error_handling, validation, pricing_edge_cases, and more.

    The command exits with code 0 on success, 3 on test failure, making it suitable for CI pipelines.

v3.5.2

04 Jan 20:08
1617c64

Choose a tag to compare

Patch Changes

  • fb041b6: Fix validation error when agents return empty publisher_domains array

    The JSON Schema defines minItems: 1 for publisher_domains, which caused validation to fail when agents returned empty arrays. This is a common scenario when an agent isn't authorized for any publishers yet.

    The fix relaxes the generated TypeScript types and Zod schemas to accept empty arrays by:

    • Removing minItems constraints during TypeScript type generation
    • Converting tuple patterns (z.tuple([]).rest()) to arrays (z.array()) in Zod schema generation

    This change improves interoperability with real-world agents that may return empty arrays for optional array fields.

v3.5.1

04 Jan 16:49
7a70258

Choose a tag to compare

Patch Changes

  • 15244b1: fix(testing): Use publisher_domains instead of legacy authorized_properties in discovery tests

v3.5.0

03 Jan 18:41
278c59c

Choose a tag to compare

Minor Changes

  • 6d5d050: Add comprehensive E2E agent testing framework with support for discovery, media buy creation, creative sync, and behavioral analysis scenarios.

  • 9b34827: Simplify authentication configuration by removing requiresAuth and auth_token_env fields.

    Breaking Changes:

    • AgentConfig.requiresAuth has been removed - if auth_token is provided, it will be used
    • AgentConfig.auth_token_env has been removed - use auth_token directly with the token value

    Migration:

    // Before
    const config = {
      id: 'my-agent',
      agent_uri: 'https://agent.example.com',
      protocol: 'mcp',
      requiresAuth: true,
      auth_token_env: 'MY_TOKEN_ENV_VAR', // or auth_token: 'direct-token'
    };
    
    // After
    const config = {
      id: 'my-agent',
      agent_uri: 'https://agent.example.com',
      protocol: 'mcp',
      auth_token: process.env.MY_TOKEN_ENV_VAR, // or 'direct-token'
    };

    The simplified model: if auth_token is provided, it's sent with requests. If not provided, no authentication is sent.

Patch Changes

  • e602659: Regenerate TypeScript types to match AdCP v2.5.1 schemas

v3.4.0

19 Dec 14:45
0332cc0

Choose a tag to compare

Minor Changes

  • 0494341: Updates webhook handler to better support mcp and a2a payloads. Adds typed payloads; Makes reporting webhook configurable;

Patch Changes

  • a639f2c: Fix skipping .data generation when status is submitted

  • b1ad29d: feat: URL canonicalization and agent comparison

    Auto-detect A2A protocol for .well-known/agent-card.json URLs

    When users provide a .well-known/agent-card.json URL (e.g., https://example.com/.well-known/agent-card.json), the library now correctly detects this as an A2A agent card discovery URL and switches to the A2A protocol.

    Canonical URL resolution

    Added methods to resolve and compare agents by their canonical base URL:

    • getCanonicalUrl() - Synchronously returns the canonical base URL (computed from configured URL)
    • resolveCanonicalUrl() - Async method that fetches the agent card (A2A) or discovers endpoint (MCP) to get the authoritative canonical URL
    • isSameAgent(other) - Compare two agents by canonical URL
    • isSameAgentResolved(other) - Async comparison that resolves canonical URLs first
    • getResolvedAgent() - Get agent config with canonical URL resolved

    Canonical URL computation:

    • For A2A: Uses the url field from the agent card, or strips /.well-known/agent-card.json
    • For MCP: Strips /mcp or /mcp/ suffix from discovered endpoint

    This enables comparing agents regardless of how they were configured:

    // These all resolve to the same canonical URL: https://example.com
    agent1.agent_uri = 'https://example.com';
    agent2.agent_uri = 'https://example.com/mcp';
    agent3.agent_uri = 'https://example.com/.well-known/agent-card.json';
    
    client.agent('agent1').isSameAgent(client.agent('agent2')); // true

    Fixes #175

v3.3.3

07 Dec 17:48
51755f8

Choose a tag to compare

Patch Changes

  • fbc29ae: Fix CLI --auth flag to use literal token values directly

    The CLI was incorrectly setting auth_token_env (environment variable name) instead of auth_token (direct value) when the user provided --auth TOKEN. This caused authentication to fail with "Environment variable not found" warnings because the auth module tried to look up the literal token as an environment variable name.

  • 53d7cec: Remove spurious index signature types from generated validation schemas

    The json-schema-to-typescript library was incorrectly generating index signature types (e.g., { [k: string]: unknown }) for schemas with oneOf and additionalProperties: false. This caused validation to allow arbitrary extra fields on requests like update_media_buy and provide_performance_feedback.

    Changes:

    • Added removeIndexSignatureTypes() function to post-process generated types
    • Added update_media_buy and list_creatives schemas to the validation map
    • Added tests for request validation with extra fields

v3.3.2

26 Nov 18:01
469b2a5

Choose a tag to compare

Patch Changes

  • 27693b2: Fixed CLI bug where agentConfig was not wrapped in array for AdCPClient constructor

v3.3.1

25 Nov 19:43
0a9ce8d

Choose a tag to compare

Patch Changes

  • ec50aae: Fix Zod schema validation to accept null values for all optional fields. Updated the schema generator to apply .nullish() globally to all optional schema fields, allowing both null and undefined values where TypeScript types permit.

v3.3.0

25 Nov 16:40
88793a3

Choose a tag to compare

Minor Changes

  • a322f4c: fix: treat working/input-required as valid intermediate states and extract A2A webhook payloads

    • working status now returns immediately with status: 'working' instead of polling and timing out
    • input-required status returns valid result instead of throwing InputRequiredError when no handler provided
    • Made success=true consistent for all intermediate states (working, submitted, input-required, deferred)
    • Added taskType parameter to handleWebhook for all client classes (SingleAgentClient, AgentClient, ADCPMultiAgentClient)
    • handleWebhook now extracts ADCP response from raw A2A task payloads (artifacts[0].parts[].data where kind === 'data')
    • Handlers now receive unwrapped ADCP responses instead of raw A2A protocol structure