Skip to content

Commit 67119bf

Browse files
authored
Merge pull request #199 from adcontextprotocol/bokelley/issue-185-rc4-schemas
feat: sync rc.4 schemas + wire update_rights task
2 parents 7bce09a + 6c0e0e9 commit 67119bf

640 files changed

Lines changed: 13163 additions & 10718 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,41 @@ serve(MySeller(), name="my-seller")
613613

614614
**Principal contract.** `caller_identity` MUST be a stable, globally-unique identifier per tenant — an opaque buyer ID, not an email or display name. Email reuse after account deletion would cause cross-principal cache collisions. The value is logged at DEBUG (prefix-truncated) and keyed on in the cache; treat it as you would any user-scoping identifier.
615615

616+
### AdCP 3.0.0-rc.4 migration
617+
618+
**`plan.budget.authority_level` removed.** The single enum (`agent_full` / `agent_limited` / `human_required`) is replaced by two orthogonal fields on `plan.budget`, plus a new top-level flag on `plan`:
619+
620+
| Old (removed) | New |
621+
|---|---|
622+
| `budget.authority_level: agent_full` | `budget.reallocation_unlimited: true` |
623+
| `budget.authority_level: agent_limited` | `budget.reallocation_threshold: <amount>` (in `budget.currency`) |
624+
| `budget.authority_level: human_required` | Set `plan.human_review_required: true` **and** `budget.reallocation_threshold: 0` |
625+
626+
`reallocation_threshold` and `reallocation_unlimited` are mutually exclusive — pick one. `plan.human_review_required` is a separate field governing decisions that affect data subjects (targeting, creative, delivery) under GDPR Art 22 / EU AI Act Annex III; set it independently from the budget reallocation autonomy.
627+
628+
```python
629+
# Before (rc.3 and earlier)
630+
plan = SyncPlansRequest(plans=[{
631+
"plan_id": "...",
632+
"budget": {"total": 100000, "currency": "USD", "authority_level": "agent_limited"},
633+
}])
634+
635+
# After (rc.4+)
636+
plan = SyncPlansRequest(plans=[{
637+
"plan_id": "...",
638+
"budget": {
639+
"total": 100000,
640+
"currency": "USD",
641+
"reallocation_threshold": 5000, # agent may reallocate up to $5K per change
642+
},
643+
"human_review_required": False, # defaults to False; set True for GDPR Art 22 gating
644+
}])
645+
```
646+
647+
Any hand-coded `plan.budget` payload using `authority_level` will fail Pydantic validation against the rc.4 schema with `extra fields not permitted`. The SDK itself has no code references to the old enum; downstream consumers need to update their payloads.
648+
649+
**`update_rights` task added.** Buyers can now modify an existing rights acquisition without re-acquiring. See `client.update_rights(request)` or the MCP/A2A `update_rights` tool.
650+
616651
## Available Tools
617652

618653
All AdCP tools with full type safety:

schemas/cache/a2ui/bound-value.json

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "/schemas/latest/a2ui/bound-value.json",
34
"title": "A2UI Bound Value",
45
"description": "A value that can be a literal or bound to a path in the data model",
56
"oneOf": [
@@ -12,9 +13,7 @@
1213
"description": "Static string value"
1314
}
1415
},
15-
"required": [
16-
"literalString"
17-
],
16+
"required": ["literalString"],
1817
"additionalProperties": false
1918
},
2019
{
@@ -26,9 +25,7 @@
2625
"description": "Static number value"
2726
}
2827
},
29-
"required": [
30-
"literalNumber"
31-
],
28+
"required": ["literalNumber"],
3229
"additionalProperties": false
3330
},
3431
{
@@ -40,9 +37,7 @@
4037
"description": "Static boolean value"
4138
}
4239
},
43-
"required": [
44-
"literalBoolean"
45-
],
40+
"required": ["literalBoolean"],
4641
"additionalProperties": false
4742
},
4843
{
@@ -54,9 +49,7 @@
5449
"description": "JSON pointer path to value in data model (e.g., '/products/0/title')"
5550
}
5651
},
57-
"required": [
58-
"path"
59-
],
52+
"required": ["path"],
6053
"additionalProperties": false
6154
},
6255
{
@@ -70,11 +63,8 @@
7063
"type": "string"
7164
}
7265
},
73-
"required": [
74-
"literalString",
75-
"path"
76-
],
66+
"required": ["literalString", "path"],
7767
"additionalProperties": false
7868
}
7969
]
80-
}
70+
}

schemas/cache/a2ui/component.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "/schemas/latest/a2ui/component.json",
34
"title": "A2UI Component",
45
"description": "A component in an A2UI surface",
56
"type": "object",
@@ -23,9 +24,6 @@
2324
}
2425
}
2526
},
26-
"required": [
27-
"id",
28-
"component"
29-
],
27+
"required": ["id", "component"],
3028
"additionalProperties": true
31-
}
29+
}

0 commit comments

Comments
 (0)