Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
446c6a1
Update python server /samples to UCP 01-23 version.
cusell-google Mar 18, 2026
13a5e7f
Resolve PR comments: Update pyproject.toml ucp-sdk path and use base …
cusell-google Mar 24, 2026
7cfd827
Merge branch 'main' into main
cusell-google Mar 24, 2026
dfbffcc
Restore object-based payment payload creation using SDK model dump
cusell-google Mar 24, 2026
7678e3e
Update integration test models to conform with UCP SDK updates
cusell-google Mar 24, 2026
bc2ece5
Fix SDK 01-23 validation issues relating to unwrapped objects
cusell-google Mar 24, 2026
9e33737
chore: fix ruff line too long errors in checkout_service
cusell-google Mar 24, 2026
690ff38
Merge remote-tracking branch 'origin/main' into main
cusell-google Mar 24, 2026
5ab4914
chore: formatting fixes for pre-commit
cusell-google Mar 24, 2026
2cecdb0
docs: match python-sdk path in README with pyproject.toml
cusell-google Mar 31, 2026
c9391ee
Address PR comments
cusell-google Apr 7, 2026
8d38854
Fix formatting issues flagged by ruff
cusell-google Apr 7, 2026
21c50e1
chore: update protocol refs to 2026-01-23
cusell-google Apr 13, 2026
16c3ee3
Merge upstream/main to get google-adk fix
cusell-google Apr 15, 2026
e279780
fix(samples): comply with strict 01-23 UCP checkout payload and addre…
cusell-google Apr 17, 2026
8716304
fix(samples): update discovery profiles to include requested transpor…
cusell-google Apr 17, 2026
b724dde
fix(samples): update integration_test to use SDK models for payment c…
cusell-google Apr 17, 2026
ec015f4
Merge branch 'main' into main
cusell-google Apr 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion a2a/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ This sample uses the following UCP capabilities:

## Related Resources

- [UCP Specification](https://ucp.dev/specification/overview/)
- [UCP Specification](https://ucp.dev/2026-01-23/specification/overview/)
- [Google ADK Documentation](https://google.github.io/adk-docs/)
- [A2A Protocol Specification](https://a2a-protocol.org/latest/specification/)
- [UCP Python SDK](https://github.com/Universal-Commerce-Protocol/python-sdk)
Expand Down
14 changes: 7 additions & 7 deletions a2a/SKILLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ UCP_PAYMENT_DATA_KEY = "a2a.ucp.checkout.payment_data"
UCP_RISK_SIGNALS_KEY = "a2a.ucp.checkout.risk_signals"

# Extension constants
A2A_UCP_EXTENSION_URL = "https://ucp.dev/specification/reference?v=2026-01-11"
A2A_UCP_EXTENSION_URL = "https://ucp.dev/2026-01-23/specification/overview?v=2026-01-23"
UCP_AGENT_HEADER = "UCP-Agent" # HTTP header for client profile
```

Expand Down Expand Up @@ -248,12 +248,12 @@ return {"message": "Error description", "status": "error"}

## External Resources

| Resource | URL |
| --------------------- | --------------------------------------- |
| **ADK Docs** | https://google.github.io/adk-docs/ |
| **A2A Protocol** | https://a2a-protocol.org/latest/ |
| **UCP Specification** | https://ucp.dev/specification/overview/ |
| **Gemini API** | https://ai.google.dev/gemini-api/docs |
| Resource | URL |
| --------------------- | -------------------------------------------------- |
| **ADK Docs** | https://google.github.io/adk-docs/ |
| **A2A Protocol** | https://a2a-protocol.org/latest/ |
| **UCP Specification** | https://ucp.dev/2026-01-23/specification/overview/ |
| **Gemini API** | https://ai.google.dev/gemini-api/docs |

## Dependencies

Expand Down
2 changes: 1 addition & 1 deletion a2a/business_agent/src/business_agent/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
ADK_EXTENSIONS_STATE_KEY = "__session_extensions__"
ADK_LATEST_TOOL_RESULT = "temp:LATEST_TOOL_RESULT"

A2A_UCP_EXTENSION_URL = "https://ucp.dev/specification/reference?v=2026-01-11"
A2A_UCP_EXTENSION_URL = "https://ucp.dev/2026-01-23/specification/overview?v=2026-01-23"

UCP_AGENT_HEADER = "UCP-Agent"
UCP_FULFILLMENT_EXTENSION = "dev.ucp.shopping.fulfillment"
Expand Down
23 changes: 10 additions & 13 deletions a2a/business_agent/src/business_agent/data/agent_card.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,24 @@
{
"description": "UCP Extension",
"required": true,
"uri": "https://ucp.dev/specification/reference?v=2026-01-11",
"uri": "https://ucp.dev/2026-01-23/specification/overview?v=2026-01-23",
"params": {
"capabilities": [
{
"name": "dev.ucp.shopping.checkout",
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping/checkout",
"schema": "https://ucp.dev/schemas/shopping/checkout.json"
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping/checkout",
"schema": "https://ucp.dev/2026-01-23/schemas/shopping/checkout.json"
},
{
"name": "dev.ucp.shopping.fulfillment",
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping/fulfillment",
"schema": "https://ucp.dev/schemas/shopping/fulfillment.json",
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping/fulfillment",
"schema": "https://ucp.dev/2026-01-23/schemas/shopping/fulfillment.json",
"extends": "dev.ucp.shopping.checkout"
},
{
"name": "dev.ucp.shopping.discount",
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping/discount",
"schema": "https://ucp.dev/schemas/shopping/discount.json",
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping/discount",
"schema": "https://ucp.dev/2026-01-23/schemas/shopping/discount.json",
"extends": "dev.ucp.shopping.checkout"
}
]
Expand Down
24 changes: 11 additions & 13 deletions a2a/business_agent/src/business_agent/data/ucp.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
{
"ucp": {
"version": "2026-01-11",
"version": "2026-01-23",
"services": {
"dev.ucp.shopping": {
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping",
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping",
"a2a": {
"endpoint": "http://localhost:10999/.well-known/agent-card.json"
}
}
},
"capabilities": [
{
"name": "dev.ucp.shopping.checkout",
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping/checkout",
"schema": "https://ucp.dev/schemas/shopping/checkout.json"
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping/checkout",
"schema": "https://ucp.dev/2026-01-23/schemas/shopping/checkout.json"
},
{
"name": "dev.ucp.shopping.fulfillment",
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping/fulfillment",
"schema": "https://ucp.dev/schemas/shopping/fulfillment.json",
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping/fulfillment",
"schema": "https://ucp.dev/2026-01-23/schemas/shopping/fulfillment.json",
"extends": "dev.ucp.shopping.checkout"
}
]
Expand All @@ -31,11 +29,11 @@
{
"id": "example_payment_provider",
"name": "example.payment.provider",
"version": "2026-01-11",
"version": "2026-01-23",
"spec": "https://pay.provider.example/specs/handlers/payments",
"config_schema": "https://pay.provider.example/specs/handlers/config.json",
"instrument_schemas": [
"https://ucp.dev/schemas/shopping/types/card_payment_instrument.json"
"https://ucp.dev/2026-01-23/schemas/shopping/types/card_payment_instrument.json"
],
"config": {
"business_id": "1234567890"
Expand Down
2 changes: 1 addition & 1 deletion a2a/chat-client/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function App() {
const defaultHeaders = {
"Content-Type": "application/json",
"X-A2A-Extensions":
"https://ucp.dev/specification/reference?v=2026-01-11",
"https://ucp.dev/2026-01-23/specification/overview?v=2026-01-23",
"UCP-Agent":
'profile="http://localhost:3000/profile/agent_profile.json"',
};
Expand Down
4 changes: 2 additions & 2 deletions a2a/chat-client/components/PaymentConfirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ const PaymentConfirmationComponent: React.FC<PaymentConfirmationProps> = ({
<div className="flex justify-between items-center text-md mb-4">
<span>Selected Payment Method</span>
<span>
{paymentInstrument.brand.toUpperCase()} ending in{" "}
{paymentInstrument.last_digits}
{paymentInstrument.display.brand.toUpperCase()} ending in{" "}
{paymentInstrument.display.last_digits}
</span>
</div>
<p className="text-gray-600 mb-4">
Expand Down
3 changes: 2 additions & 1 deletion a2a/chat-client/components/PaymentMethodSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ const PaymentMethodSelector: React.FC<PaymentMethodSelectorProps> = ({
className="form-radio h-4 w-4 text-blue-600"
/>
<span className="ml-3 text-gray-700">
{method.brand.toUpperCase()} ending in {method.last_digits}
{method.display.brand.toUpperCase()} ending in{" "}
{method.display.last_digits}
</span>
</label>
))}
Expand Down
32 changes: 18 additions & 14 deletions a2a/chat-client/mocks/credentialProviderProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,39 @@ import type { PaymentInstrument, PaymentMethod } from "../types";
*/
export class CredentialProviderProxy {
handler_id = "example_payment_provider";
handler_name = "example.payment.provider";

_getMockPaymentMethods(): { payment_method_aliases: PaymentMethod[] } {
return {
payment_method_aliases: [
{
id: "instr_1",
type: "card",
brand: "amex",
last_digits: "1111",
expiry_month: 12,
expiry_year: 2026,
display: {
brand: "amex",
last_digits: "1111",
expiry_month: 12,
expiry_year: 2026,
},
},
{
id: "instr_2",
type: "card",
brand: "visa",
last_digits: "8888",
expiry_month: 12,
expiry_year: 2026,
display: {
brand: "visa",
last_digits: "8888",
expiry_month: 12,
expiry_year: 2026,
},
},
{
id: "instr_3",
type: "card",
brand: "mastercard",
last_digits: "5555",
expiry_month: 12,
expiry_year: 2026,
display: {
brand: "mastercard",
last_digits: "5555",
expiry_month: 12,
expiry_year: 2026,
},
},
],
};
Expand Down Expand Up @@ -100,7 +105,6 @@ export class CredentialProviderProxy {
return {
...payment_method,
handler_id: this.handler_id,
handler_name: this.handler_name,
credential: {
type: "token",
token: `mock_token_${randomId}`,
Expand Down
30 changes: 13 additions & 17 deletions a2a/chat-client/profile/agent_profile.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
{
"ucp": {
"version": "2026-01-11",
"version": "2026-01-23",
"capabilities": [
{
"name": "dev.ucp.shopping.checkout",
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping/checkout",
"schema": "https://ucp.dev/schemas/shopping/checkout.json"
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping/checkout",
"schema": "https://ucp.dev/2026-01-23/schemas/shopping/checkout.json"
},
{
"name": "dev.ucp.shopping.fulfillment",
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping/fulfillment",
"schema": "https://ucp.dev/schemas/shopping/fulfillment.json",
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping/fulfillment",
"schema": "https://ucp.dev/2026-01-23/schemas/shopping/fulfillment.json",
"extends": "dev.ucp.shopping.checkout"
},
{
"name": "dev.ucp.shopping.discount",
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping/discount",
"schema": "https://ucp.dev/schemas/shopping/discount.json",
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping/discount",
"schema": "https://ucp.dev/2026-01-23/schemas/shopping/discount.json",
"extends": "dev.ucp.shopping.checkout"
},
{
"name": "dev.ucp.shopping.buyer_consent",
"version": "2026-01-11",
"version": "2026-01-23",
"extends": "dev.ucp.shopping.checkout"
}
]
Expand All @@ -34,11 +30,11 @@
{
"id": "example_payment_provider",
"name": "example.payment.provider",
"version": "2026-01-11",
"version": "2026-01-23",
"spec": "https://pay.provider.example/specs/handlers/payments",
"config_schema": "https://pay.provider.example/specs/handlers/config.json",
"instrument_schemas": [
"https://ucp.dev/schemas/shopping/types/card_payment_instrument.json"
"https://ucp.dev/2026-01-23/schemas/shopping/types/card_payment_instrument.json"
]
}
]
Expand Down
11 changes: 7 additions & 4 deletions a2a/chat-client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,21 @@ export interface Credential {
token: string;
}

export interface PaymentMethod {
id: string;
type: string;
export interface DisplayInfo {
brand: string;
last_digits: string;
expiry_month: number;
expiry_year: number;
}

export interface PaymentMethod {
id: string;
type: string;
display: DisplayInfo;
}

export interface PaymentInstrument extends PaymentMethod {
handler_id: string;
handler_name: string;
credential: Credential;
}

Expand Down
2 changes: 1 addition & 1 deletion a2a/docs/00-glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Official documentation for the core technologies used in this sample.
| Resource | URL |
| -------------------------- | -------------------------------------------------------------------------------------------------------------- |
| **Official Site** | [ucp.dev](https://ucp.dev/) |
| **Specification Overview** | [UCP Specification](https://ucp.dev/specification/overview/) |
| **Specification Overview** | [UCP Specification](https://ucp.dev/2026-01-23/specification/overview/) |
| **Developer Guide** | [Google Merchant UCP Guide](https://developers.google.com/merchant/ucp) |
| **GitHub Repository** | [github.com/Universal-Commerce-Protocol/ucp](https://github.com/Universal-Commerce-Protocol/ucp) |
| **Python SDK** | [github.com/Universal-Commerce-Protocol/python-sdk](https://github.com/Universal-Commerce-Protocol/python-sdk) |
Expand Down
21 changes: 9 additions & 12 deletions a2a/docs/03-ucp-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,24 @@ This enables any UCP-compliant client to work with any UCP-compliant merchant.
```json
{
"ucp": {
"version": "2026-01-11",
"version": "2026-01-23",
"services": {
"dev.ucp.shopping": {
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping",
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping",
"a2a": {
"endpoint": "http://localhost:10999/.well-known/agent-card.json"
}
}
},
"capabilities": [
{
"name": "dev.ucp.shopping.checkout",
"version": "2026-01-11",
"spec": "https://ucp.dev/specs/shopping/checkout",
"schema": "https://ucp.dev/schemas/shopping/checkout.json"
"version": "2026-01-23",
"spec": "https://ucp.dev/2026-01-23/specification/shopping/checkout",
"schema": "https://ucp.dev/2026-01-23/schemas/shopping/checkout.json"
},
{
"name": "dev.ucp.shopping.fulfillment",
"version": "2026-01-11",
"version": "2026-01-23",
"extends": "dev.ucp.shopping.checkout"
}
]
Expand All @@ -70,7 +68,7 @@ This enables any UCP-compliant client to work with any UCP-compliant merchant.
{
"id": "example_payment_provider",
"name": "example.payment.provider",
"version": "2026-01-11"
"version": "2026-01-23"
}
]
}
Expand All @@ -84,7 +82,7 @@ This enables any UCP-compliant client to work with any UCP-compliant merchant.
```json
{
"ucp": {
"version": "2026-01-11",
"version": "2026-01-23",
"capabilities": [
{ "name": "dev.ucp.shopping.checkout" },
{ "name": "dev.ucp.shopping.fulfillment" },
Expand Down Expand Up @@ -186,7 +184,6 @@ UCP_RISK_SIGNALS_KEY = "a2a.ucp.checkout.risk_signals" # Risk data
{
"capabilities": [
...,
{"name": "dev.ucp.shopping.new_capability", "extends": "checkout"}
]
}
```
Expand Down
9 changes: 5 additions & 4 deletions a2a/docs/04-commerce-flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,12 @@ Without this intermediate state, you'd risk creating orders with missing shippin
```json
{
"type": "card",
"last_digits": "1111",
"brand": "AMEX",
"expiry": "12/2026",
"display": {
"brand": "AMEX",
"last_digits": "1111",
"expiry": "12/2026"
},
"handler_id": "example_payment_provider",
"handler_name": "example.payment.provider",
"credential": {
"type": "card_token",
"token": "mock_token_abc123"
Expand Down
Loading
Loading