Skip to content

Conversation

@bokelley
Copy link
Contributor

Summary

When an authorized_agent in adagents.json has no property_ids/property_tags/properties/publisher_properties fields, it means the agent has access to ALL properties from that publisher per the AdCP spec. Our property discovery service now correctly syncs all top-level properties in this case instead of zero.

Changes

  • Detect unrestricted agents (all authorization fields missing/empty)
  • When unrestricted agent exists + top-level properties exist, sync ALL properties
  • Fall back to per-agent properties for standard restricted agents

Testing

Added 3 test cases covering unrestricted agents, edge cases, and mixed agent scenarios. All 11 property discovery tests pass.

…s = all properties)

Per AdCP spec, when an authorized_agent has no property_ids, property_tags,
properties, or publisher_properties fields, it means the agent has access to
ALL properties from that publisher.

Previously, our property discovery service would sync ZERO properties for
such agents (because get_all_properties() returns empty list). Now we:

1. Detect unrestricted agents (all authorization fields missing/empty)
2. When unrestricted agent exists + top-level properties exist, sync ALL
   top-level properties
3. Fall back to per-agent properties for standard restricted agents

Example: wonderstruck.org's adagents.json has an agent with no property_ids,
which should give access to all properties, but was syncing none.

Changes:
- src/services/property_discovery_service.py: Add unrestricted agent detection
- tests/unit/test_property_discovery_service.py: Add 3 test cases covering:
  * Unrestricted agent with top-level properties (should sync all)
  * Unrestricted agent without top-level properties (graceful handling)
  * Mixed restricted/unrestricted agents (unrestricted wins)

All tests pass (11/11 in test_property_discovery_service.py).

Resolves: #748 property discovery syncing issue
@bokelley bokelley merged commit 136575b into main Nov 13, 2025
8 checks passed
youbek pushed a commit that referenced this pull request Nov 17, 2025
…s = all properties) (#750)

Per AdCP spec, when an authorized_agent has no property_ids, property_tags,
properties, or publisher_properties fields, it means the agent has access to
ALL properties from that publisher.

Previously, our property discovery service would sync ZERO properties for
such agents (because get_all_properties() returns empty list). Now we:

1. Detect unrestricted agents (all authorization fields missing/empty)
2. When unrestricted agent exists + top-level properties exist, sync ALL
   top-level properties
3. Fall back to per-agent properties for standard restricted agents

Example: wonderstruck.org's adagents.json has an agent with no property_ids,
which should give access to all properties, but was syncing none.

Changes:
- src/services/property_discovery_service.py: Add unrestricted agent detection
- tests/unit/test_property_discovery_service.py: Add 3 test cases covering:
  * Unrestricted agent with top-level properties (should sync all)
  * Unrestricted agent without top-level properties (graceful handling)
  * Mixed restricted/unrestricted agents (unrestricted wins)

All tests pass (11/11 in test_property_discovery_service.py).

Resolves: #748 property discovery syncing issue
danf-newton pushed a commit to Newton-Research-Inc/salesagent that referenced this pull request Nov 24, 2025
…s = all properties) (adcontextprotocol#750)

Per AdCP spec, when an authorized_agent has no property_ids, property_tags,
properties, or publisher_properties fields, it means the agent has access to
ALL properties from that publisher.

Previously, our property discovery service would sync ZERO properties for
such agents (because get_all_properties() returns empty list). Now we:

1. Detect unrestricted agents (all authorization fields missing/empty)
2. When unrestricted agent exists + top-level properties exist, sync ALL
   top-level properties
3. Fall back to per-agent properties for standard restricted agents

Example: wonderstruck.org's adagents.json has an agent with no property_ids,
which should give access to all properties, but was syncing none.

Changes:
- src/services/property_discovery_service.py: Add unrestricted agent detection
- tests/unit/test_property_discovery_service.py: Add 3 test cases covering:
  * Unrestricted agent with top-level properties (should sync all)
  * Unrestricted agent without top-level properties (graceful handling)
  * Mixed restricted/unrestricted agents (unrestricted wins)

All tests pass (11/11 in test_property_discovery_service.py).

Resolves: adcontextprotocol#748 property discovery syncing issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants