Skip to content

feat(negotiation): add first-class buyer and seller proposal APIs #1023

Description

@bokelley

Context

Add first-class AdCP 3.2 proposal-negotiation support to the Python client and seller framework, aligned with #6450 and adcontextprotocol/adcp#6547.

Parent program: adcontextprotocol/adcp#6556

Acceptance criteria

Buyer APIs

  • Typed/Pydantic request and discriminated response models for refine_proposals.
  • Capability-aware builders that distinguish typed dimensions from free-text ask and enforce seller/protocol limits before transport.
  • Verification helpers for ordered results, hard-budget satisfaction, product changes, unique alternatives, unsatisfied subsets, committed holds, and expiry-aware acceptance.
  • A documented orchestration example covering revised, partial counteroffer, unable, finalization, exact retry, and changed-request idempotency.
  • Error-first handling for task-level UNSUPPORTED_FEATURE and VALIDATION_ERROR.

Seller framework

  • Handler/ProposalManager support for declaring refinement capabilities and performing batch-wide preflight before mutation.
  • Application callbacks own commercial decisions; framework helpers own protocol validation, result classification, immutable proposal lineage, response validation, and atomic finalize hooks.
  • Compatibility with the existing decisioning and proposal-manager architecture rather than a parallel negotiation subsystem.

Verification

  • Tests cover every outcome/reason code, mixed batches, cardinality boundaries, fail-closed budgets, partial alternatives, source unavailability, idempotency, and finalize rollback.
  • Add runnable buyer and seller examples compatible with the AdCP training seller scenario in epic: make proposal negotiation easy to implement, teach, and verify adcp#6556.
  • Document legacy get_products refinement fallback limits.

Dependency

Blocked on the final 3.2 schema/API shape from adcontextprotocol/adcp#6547.

Out of scope

  • Commercial pricing or optimization policy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions