Skip to content

Conversation

@BaiyuScope3
Copy link
Collaborator

@BaiyuScope3 BaiyuScope3 commented Jan 8, 2026

Upgrade to AdCP Protocol 2.6

Summary

Updates schema definitions and adds utilities to support the AdCP 2.6 protocol, including the migration from assets_required to the new assets field.

Changes

Schema Updates (from upstream)

  • Relaxed additionalProperties constraints across types for forward compatibility
  • Added new assets field on Format with explicit required boolean
  • Marked assets_required as deprecated (still supported)
  • Inlined reporting_webhook fields to fix JSON Schema allOf limitation

New Format Asset Utilities

  • get_format_assets() - Unified access preferring assets, falling back to assets_required
  • get_required_assets() / get_optional_assets() - Filter by required status
  • uses_deprecated_assets_field() - Check for deprecated field usage
  • Additional helpers: get_individual_assets(), get_repeatable_groups(), has_assets()

Deprecation Warnings

  • CLI now warns when responses contain deprecated fields

Bugfix

  • Fix wrong adcp version path using by schema sync script
  • Fix missing script in the make file

Tests

  • Added 19 tests for new format asset utilities
  • Added tests for new assets field while preserving assets_required tests for backward compatibility

Cli warnings
image

Breaking Changes

None. All changes should be backward compatible.

- Update ADCP_VERSION to 2.6.0
- Sync schemas from upstream adcontextprotocol.org
- Regenerate Python types from new schemas
- Fix sync_schemas.py to look for ADCP_VERSION in correct location (src/adcp/)
- Fix Makefile to use generate_types.py instead of missing generate_models_simple.py
@BaiyuScope3 BaiyuScope3 changed the title chore: upgrade to AdCP protocol 2.6.0 feat: upgrade to AdCP protocol 2.6.0 Jan 8, 2026
- Remove inline comments that broke import block sorting
- Fix generate_ergonomic_coercion.py to not emit comments in import block
Change format_ back to format in the FieldModel enum since enum members
are accessed via EnumName.member and don't conflict with Python builtins.
The enum value remains 'format' for correct JSON serialization.
…required migration

- Add format_assets.py with utilities for backward-compatible asset access:
  - get_format_assets(): prefers new 'assets' field, falls back to assets_required
  - normalize_assets_required(): converts deprecated format with required=True
  - get_required_assets() / get_optional_assets(): filter by required status
  - get_individual_assets() / get_repeatable_groups(): filter by item type
  - uses_deprecated_assets_field(): check if using deprecated field
  - get_asset_count() / has_assets(): utility helpers

- Add generic deprecation warning in CLI for any field with deprecated=True
- Update _create_sample_manifest_for_format() to use new utilities
- Export all utilities from adcp package
- Add comprehensive tests for new utilities (19 tests)
- Add new tests for assets field while keeping assets_required tests for backward compat

No breaking changes - all changes are backward compatible.
- Add add_deprecated_field_metadata() to post_generate_fixes.py
  - Reads JSON schemas to find fields with deprecated: true
  - Injects Field(deprecated=True) into generated Python files
- Fix Pydantic v2.11 deprecation warnings in CLI
  - Access model_fields from class instead of instance
  - Suppress DeprecationWarning when checking deprecated field values
- Add tests for CLI deprecation warning functionality
- Add test for normalize_assets_required with repeatable groups
- Simplify _is_required and _get_item_type helpers

Coverage: 80.47%
@BaiyuScope3 BaiyuScope3 marked this pull request as ready for review January 8, 2026 22:57
@BaiyuScope3 BaiyuScope3 merged commit 245a7d3 into main Jan 9, 2026
8 checks passed
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.

3 participants