Skip to content

v5.7.0

Choose a tag to compare

@github-actions github-actions released this 20 Apr 23:06
· 1504 commits to main since this release
92f97b1

Minor Changes

  • 7d33a92: AdCP 3.0 release blockers — SDK-level wiring for conformance-runner integration.

    New subpath exports

    • @adcp/client/compliance-fixtures — canonical COMPLIANCE_FIXTURES data for every hardcoded ID storyboards reference (test-product, sports_ctv_q2, video_30s, native_post, native_content, campaign_hero_video, gov_acme_q2_2027, mb_acme_q2_2026_auction, cpm_guaranteed, etc.) plus a seedComplianceFixtures(server) helper that writes fixtures into the state store under well-known compliance:* collections. Closes #663.
    • @adcp/client/schemas — re-exports every generated Zod request schema plus TOOL_INPUT_SHAPES (ready-to-register inputSchema map covering non-framework tools like creative_approval and update_rights) and a customToolFor(name, description, shape, handler) helper. Closes #667.

    Server (@adcp/client/server)

    • createExpressAdapter({ mountPath, publicUrl, prm, server }) returns the four pieces an Express-mounted agent needs: rawBodyVerify (captures raw bytes for RFC 9421), protectedResourceMiddleware (RFC 9728 PRM at the origin root), getUrl (mount-aware URL reconstruction for the signature verifier), and resetHook (delegates to server.compliance.reset()). Closes #664.
    • requireAuthenticatedOrSigned({ signature, fallback, requiredFor, resolveOperation }) bundles presence-gated signature composition with required_for enforcement on the no-signature path. requireSignatureWhenPresent grew an options parameter that carries the same requiredFor + resolveOperation semantics. Unsigned requests with no credentials on a required_for operation throw AuthError whose cause is RequestSignatureError('request_signature_required'); valid bearer bypass stays valid. Closes #665.
    • respondUnauthorized({ signatureError }) emits a WWW-Authenticate: Signature error="<code>" challenge when the rejection comes from the RFC 9421 verifier. serve() auto-detects this via signatureErrorCodeFromCause(err) — the signed_requests negative-vector grader reads the error code off the challenge, so previously callers had to override the 401 response by hand.
    • AdcpServer.compliance.reset({ force? }) drops session state and the idempotency cache between storyboards. Refuses to run in production-like deployments unless force: true is passed. IdempotencyStore.clearAll is now an optional method on the store; memoryBackend implements it, production backends leave it undefined. Closes #666.

    Testing (@adcp/client/testing)

    • Request-signing grader accepts an agentCapability option. When present, vectors whose verifier_capability can't coexist with the agent's declared profile (covers_content_digest disagreement, vector-asserted required_for not in agent's list) auto-skip with skip_reason: 'capability_profile_mismatch'. skipVectors stays available for operator-driven overrides. Closes #668.
  • 5b2ebb3: v3 audit follow-ups — tightened per expert review:

    Build pipeline

    • build:lib now runs sync-version before tsc so src/lib/version.ts can't drift from package.json across changeset-driven bumps. sync-version now validates both version strings against /^[0-9A-Za-z.\-+]+$/ to prevent template injection into the generated TS file.

    sync_creatives validator

    • New SyncCreativesItemSchema, SyncCreativesSuccessStrictSchema, and SyncCreativesResponseStrictSchema exports. The strict schema enforces: required creative_id + action; spec's conditional that status MUST be absent when action ∈ {failed, deleted}; preview_url limited to http(s): URLs; ISO-8601 expires_at; assignment_errors key regex. Wired into TOOL_RESPONSE_SCHEMAS so pipeline-level strict validation catches per-item drift for sync_creatives responses automatically.

    V3 guard

    • New VersionUnsupportedError with typed reason ('version' | 'idempotency' | 'synthetic'). Agent URL stays on the instance property but is omitted from the default message to prevent leakage into shared log sinks.
    • client.requireV3() now corroborates the v3 claim: requires majorVersions.includes(3), adcp.idempotency.replayTtlSeconds present, and rejects synthetic capabilities. Closes the "lying seller" bypass path.
    • New allowV2 config option on SingleAgentClientConfig — per-client bypass; ADCP_ALLOW_V2=1 env fallback only applies when allowV2 is undefined. Enables safe use in multi-tenant deployments.
    • requireV3ForMutations: true opt-in gates mutating calls before dispatch.