Skip to content

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

Description

@bokelley

Context

Add first-class proposal-negotiation APIs to the Java/Kotlin client, server, and testing modules for AdCP 3.2 (#6450, adcontextprotocol/adcp#6547).

Parent program: adcontextprotocol/adcp#6556

Acceptance criteria

Client

  • Generated/maintained sealed or otherwise safely discriminated models for refine_proposals outcomes.
  • Capability-aware builders that enforce supported dimensions, seller ceilings, and protocol cardinality before transport.
  • Verification utilities for response ordering, budget and product constraints, unique alternatives, machine-readable failure subsets, and finalize/expiry semantics.
  • Reactive and Kotlin surfaces preserve the same error-first and outcome-safe behavior.

Server

  • Handler registration and capability declaration for proposal refinement.
  • Batch preflight before mutation, with commercial decisions delegated to application callbacks.
  • Hooks/utilities for immutable successors, digest/lineage, validated persistence, and atomic finalize transactions.

Testing and examples

  • Extend adcp-testing with fixtures/assertions for all outcomes, reason codes, mixed-batch rejection, 10/25 limits, fail-closed budgets, partial alternatives, idempotency, and finalization atomicity.
  • Add a runnable buyer/server example compatible with the training seller scenario in epic: make proposal negotiation easy to implement, teach, and verify adcp#6556.
  • Document legacy refinement compatibility limits.

Dependency

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

Out of scope

  • Commercial pricing and optimization policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions