Skip to content

Conversation

@bokelley
Copy link
Contributor

Summary

Integrates upstream AdCP schema improvements that resolved all type naming collisions, enabling cleaner SDK APIs and better type safety.

Upstream PRs: AdCP #222 (enum consolidation) + #223 (Package unification)

Changes

  • New enums: AssetContentType (13 values) and FormatCategory (7 values) - replacing scattered variants
  • Unified Package responses: create_media_buy and update_media_buy now return identical structures
  • Removed deprecated types: CreatedPackageReference, AffectedPackage, orphaned asset-type.json
  • Enhanced tooling: Automatic orphan schema detection in sync script prevents future issues
  • Tests: 290/290 passing, all schema APIs updated

Backward compatible: SDK maintains AssetType deprecation alias through 2.x releases.

🤖 Generated with Claude Code

bokelley and others added 9 commits November 20, 2025 07:05
…, and unified Package

Implements changes from upstream AdCP PR #222 and PR #223:

**New Types (PR #222)**
- AssetContentType: Consolidated enum for asset content types (13 values)
- FormatCategory: Semantic enum for format categories (7 values)

**Unified Package (PR #223)**
- create_media_buy and update_media_buy now return full Package objects
- Removed CreatedPackageReference (deprecated)
- Better API consistency and developer experience

**Breaking Changes**
- Removed CreatedPackageReference: use Package directly
- Removed AffectedPackage: removed from upstream schemas

**Backward Compatibility**
- AssetType maintained as deprecated alias to AssetContentType

Test results: 283/295 passing (12 failures for removed CreatedPackageReference - expected)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removed 5 test functions that tested CreatedPackageReference since this type
was removed in AdCP PR #223. The PR unified Package responses so that both
create_media_buy and update_media_buy now return full Package objects instead
of minimal references.

Removed tests:
- test_package_type_aliases_imports
- test_package_type_aliases_point_to_correct_modules
- test_package_type_aliases_have_correct_fields
- test_package_type_aliases_in_exports
- test_package_aliases_can_instantiate

All 290 tests now pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removed temporary documentation files (SCHEMA_COLLISION_PROPOSAL.md,
UPSTREAM_SCHEMA_RECOMMENDATIONS.md) that were used during analysis.

Enhanced CHANGELOG_ENTRY.md to include:
- Detailed description of upstream schema improvements (PR #222 + #223)
- Complete list of new types with all enum values
- Expanded migration guide with more examples
- Upstream recommendations identified during integration

The key findings (orphaned asset-type.json, enum organization suggestions,
discriminator standardization opportunities) are now captured in the changelog
for future reference.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Upstream PR #222 removed the orphaned asset-type.json schema file. Our local
cache had stale copies that were no longer referenced upstream.

Changes:
- Removed stale asset-type.json from schemas/cache/1.0.0/
- Removed asset_type.py generated file (no longer has upstream schema)
- Removed orphaned type exports: AssetTypeSchema, ContentLength, Dimensions,
  Duration, FileSize, Quality, Requirements
- Added deprecation alias: AssetType = AssetContentType
- Synced 6 updated schemas (deployment, destination, activate-signal, get-signals)

The sync discovered asset-type.json was 404 upstream - it was removed in PR #222
as part of the enum consolidation work.

Tests: 288/290 passing (2 failures in signals tests due to schema API changes
from destinations → deployments in upstream)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
….json

The orphaned asset-type.json was already removed by the AdCP team in PR #222.
Updated changelog to acknowledge this was properly handled upstream.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added automatic cleanup of schema files that no longer exist upstream.
This prevents stale cached schemas from causing issues when upstream
removes or renames schema files.

Changes:
- Scan for JSON files in cache that aren't in the upstream schema list
- Remove orphaned files and their empty parent directories
- Report removed count in sync summary
- Updated script documentation to explain new feature

Example output:
  Cleaning up orphaned schemas:
    ✗ asset-type.json (removed - no longer in upstream)
    ✗ core/asset-type.json (removed - no longer in upstream)

This would have automatically caught the stale asset-type.json files
that were orphaned after PR #222.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Upstream schema updates changed the signals API from using 'destinations'
to 'deployments'. Updated test fixtures to match new API structure.

Changes:
- GetSignalsRequest.deliver_to.destinations → deployments
- ActivateSignalRequest.destinations → deployments

Tests now passing: 290/290 (100%)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Release Please will automatically generate changelog from commits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Integrated latest changes from main branch including:
- README updates
- Client and protocol improvements
- CLI enhancements
- Test updates

All conflicts resolved by regenerating types from latest schemas.
All 292 tests passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley changed the title Integrate AdCP schema improvements (PR #222 + #223) feat: integrate AdCP schema improvements (PR #222 + #223) Nov 20, 2025
- Fix import sorting per ruff I001 rules
- Fix line length by moving comment above import
- Remove orphaned 'Requirements' from __all__ (type was removed with asset-type.json)

All linter checks now passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley merged commit d61ca33 into main Nov 20, 2025
7 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.

2 participants