@adcp/sdk API Reference - v7.9.0
    Preparing search index...

    Interface A2AAdapterOptions

    Options for createA2AAdapter.

    Auth posture. authenticate(req) runs BEFORE the tool handler sees the request. Return an AdcpAuthInfo to let the pipeline proceed with that principal; return null (or throw) to reject. A rejection currently surfaces as a generic JSON-RPC -32000 server error — the @a2a-js/sdk doesn't yet expose a typed authentication-failed code for the UserBuilder path. Production deployments SHOULD wire upstream middleware (e.g. express-jwt) to reject with a proper HTTP 401 / WWW-Authenticate challenge before the request reaches jsonRpcHandler. The authenticate option here is a last-line-of-defense guard, not the primary auth surface.

    Agent-card securitySchemes. The agentCard.securitySchemes you provide is served verbatim at /.well-known/agent-card.json — only put non-secret discovery data there (token endpoint, scopes, OIDC issuer URL). Never paste client secrets, private JWKS, or internal URLs into the card. The SDK doesn't schema-validate securitySchemes at boot (v0 check is required-field presence only), so a hand-crafted malformed entry will ship as-written.

    Omitting authenticate makes the adapter anonymous — handlers see ctx.authInfo === undefined, matching serve({ authenticate: undefined }).

    interface A2AAdapterOptions {
        server: AdcpServer;
        authenticate?: (req: Request) => Promise<AdcpAuthInfo | null>;
        agentCard: A2AAgentCardOverrides;
        taskStore?: TaskStore;
        logger?: AdcpLogger;
    }
    Index

    Properties

    server: AdcpServer

    AdCP server whose registered tools this adapter exposes over A2A.

    authenticate?: (req: Request) => Promise<AdcpAuthInfo | null>

    Authenticate an inbound A2A request. Transport-level auth runs before AdcpServer.invoke() so the framework pipeline sees a verified authInfo. Return null (or throw) to reject.

    Seller-supplied agent-card identity fields. Required.

    taskStore?: TaskStore

    A2A task store. Defaults to the SDK's InMemoryTaskStore. Persistent deployments should supply a durable implementation (e.g. a Postgres-backed TaskStore).

    logger?: AdcpLogger

    Optional logger. Falls back to console.