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

    Function resolveAgentProperties

    • Resolve agentUrl's authorization scope against an adagents.json file. Entries are matched with agentUrlMatchesAuthorizedEntry: two URLs differing only in host case, default port, percent-encoding of unreserved chars, or fragment are the same agent, and scheme differences remain distinct. At AdCP 3.3 or later (options.adcpVersion, default the SDK's pinned ADCP_VERSION) an origin-only entry also matches an agent at any path on that origin; below 3.3 it matches only an agent served at the root. An entry with a path always matches only its canonical URL, trailing slash included.

      At 3.3 or later every matching entry authorizes the agent, and the scope is the union of theirs: properties, cross_publisher and cross_publisher_expanded combine (duplicates removed), so a narrower entry never removes scope another matching entry grants (adcontextprotocol/adcp#9011). unresolvable is set only when the union is empty, and then carries the first matching entry's reason.

      Below 3.3 the behaviour is unchanged: only exact canonical matches count, and more than one fails closed as ambiguous_agent_url.

      Returns { properties: [], cross_publisher: [], cross_publisher_expanded: [], unresolvable: '...' } (never throws) when the agent isn't listed, when its entry is malformed, or when the agent uses a signals authorization type.

      Parameters

      Returns ResolvedAgentScope