@adcp/sdk API Reference - v17.0.0-rc.0
    Preparing search index...

    Function agentUrlMatchesAuthorizedEntry

    • Whether agentUrl matches an authorized_agents[].url entry under Agent URL matching.

      Both sides are canonicalized with canonicalizeAgentUrl, so scheme and host case, default ports, unreserved percent-encoding and fragments never matter, and the scheme, host and port always do. A URL with userinfo never canonicalizes, so it matches nothing. Then:

      • AdCP 3.3 or later (DR-0023, adcp#8862): an origin-only entry, one whose canonical form has the root path and no query (https://agent.example.com or https://agent.example.com/), matches any agent URL with the same canonical origin, including https://agent.example.com/mcp. An entry with a path, or with a query (even an empty ?), matches only the same canonical URL, so path case and a trailing slash (/mcp vs /mcp/) stay significant. Both sides also drop one trailing root-label dot from a DNS host (https://agent.example. matches https://agent.example/mcp), and a host ending in more than one dot matches nothing.
      • AdCP 3.2 and earlier: every entry matches only the same canonical URL, so an origin-only entry matches only an agent served at the root.

      Returns false when either URL fails to canonicalize.

      Parameters

      Returns boolean