portage-ucp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +15 -0
  3. data/LICENSE +21 -0
  4. data/README.md +97 -0
  5. data/exe/portage-ucp-check +25 -0
  6. data/lib/portage/ucp/adapter.rb +58 -0
  7. data/lib/portage/ucp/authenticator.rb +26 -0
  8. data/lib/portage/ucp/capabilities/cart.rb +16 -0
  9. data/lib/portage/ucp/capabilities/catalog.rb +11 -0
  10. data/lib/portage/ucp/capabilities/checkout.rb +17 -0
  11. data/lib/portage/ucp/capabilities/identity_linking.rb +13 -0
  12. data/lib/portage/ucp/capabilities/order.rb +11 -0
  13. data/lib/portage/ucp/capability.rb +27 -0
  14. data/lib/portage/ucp/capability_negotiator.rb +40 -0
  15. data/lib/portage/ucp/capability_registry.rb +21 -0
  16. data/lib/portage/ucp/check.rb +96 -0
  17. data/lib/portage/ucp/configuration.rb +35 -0
  18. data/lib/portage/ucp/dispatcher.rb +39 -0
  19. data/lib/portage/ucp/errors.rb +12 -0
  20. data/lib/portage/ucp/manifest.rb +58 -0
  21. data/lib/portage/ucp/mcp/server.rb +83 -0
  22. data/lib/portage/ucp/observability.rb +31 -0
  23. data/lib/portage/ucp/payment_token_guard.rb +41 -0
  24. data/lib/portage/ucp/rack/manifest_endpoint.rb +49 -0
  25. data/lib/portage/ucp/rack/webhook_endpoint.rb +54 -0
  26. data/lib/portage/ucp/rate_limiter.rb +27 -0
  27. data/lib/portage/ucp/resolver.rb +133 -0
  28. data/lib/portage/ucp/schema_validator.rb +53 -0
  29. data/lib/portage/ucp/support/amounts.rb +43 -0
  30. data/lib/portage/ucp/support/api_error.rb +39 -0
  31. data/lib/portage/ucp/support/checkout_state.rb +42 -0
  32. data/lib/portage/ucp/support/http_client.rb +54 -0
  33. data/lib/portage/ucp/support/idempotency.rb +26 -0
  34. data/lib/portage/ucp/support/line_item_status.rb +44 -0
  35. data/lib/portage/ucp/support/not_found.rb +25 -0
  36. data/lib/portage/ucp/support/token_exchange.rb +43 -0
  37. data/lib/portage/ucp/support/totals.rb +31 -0
  38. data/lib/portage/ucp/value_objects.rb +186 -0
  39. data/lib/portage/ucp/version.rb +5 -0
  40. data/lib/portage/ucp/wire_envelope.rb +25 -0
  41. data/lib/portage/ucp.rb +44 -0
  42. data/schemas/2026-04-08/schemas/capability.json +70 -0
  43. data/schemas/2026-04-08/schemas/payment_handler.json +67 -0
  44. data/schemas/2026-04-08/schemas/service.json +190 -0
  45. data/schemas/2026-04-08/schemas/shopping/cart.json +134 -0
  46. data/schemas/2026-04-08/schemas/shopping/catalog_lookup.json +207 -0
  47. data/schemas/2026-04-08/schemas/shopping/catalog_search.json +64 -0
  48. data/schemas/2026-04-08/schemas/shopping/checkout.json +131 -0
  49. data/schemas/2026-04-08/schemas/shopping/discount.json +148 -0
  50. data/schemas/2026-04-08/schemas/shopping/fulfillment.json +154 -0
  51. data/schemas/2026-04-08/schemas/shopping/order.json +113 -0
  52. data/schemas/2026-04-08/schemas/shopping/payment.json +16 -0
  53. data/schemas/2026-04-08/schemas/shopping/types/adjustment.json +69 -0
  54. data/schemas/2026-04-08/schemas/shopping/types/amount.json +8 -0
  55. data/schemas/2026-04-08/schemas/shopping/types/attribution.json +11 -0
  56. data/schemas/2026-04-08/schemas/shopping/types/available_payment_instrument.json +22 -0
  57. data/schemas/2026-04-08/schemas/shopping/types/business_fulfillment_config.json +38 -0
  58. data/schemas/2026-04-08/schemas/shopping/types/buyer.json +25 -0
  59. data/schemas/2026-04-08/schemas/shopping/types/category.json +20 -0
  60. data/schemas/2026-04-08/schemas/shopping/types/context.json +42 -0
  61. data/schemas/2026-04-08/schemas/shopping/types/description.json +22 -0
  62. data/schemas/2026-04-08/schemas/shopping/types/detail_option_value.json +22 -0
  63. data/schemas/2026-04-08/schemas/shopping/types/error_code.json +17 -0
  64. data/schemas/2026-04-08/schemas/shopping/types/error_response.json +31 -0
  65. data/schemas/2026-04-08/schemas/shopping/types/expectation.json +62 -0
  66. data/schemas/2026-04-08/schemas/shopping/types/fulfillment.json +25 -0
  67. data/schemas/2026-04-08/schemas/shopping/types/fulfillment_available_method.json +45 -0
  68. data/schemas/2026-04-08/schemas/shopping/types/fulfillment_destination.json +16 -0
  69. data/schemas/2026-04-08/schemas/shopping/types/fulfillment_event.json +67 -0
  70. data/schemas/2026-04-08/schemas/shopping/types/fulfillment_group.json +45 -0
  71. data/schemas/2026-04-08/schemas/shopping/types/fulfillment_method.json +67 -0
  72. data/schemas/2026-04-08/schemas/shopping/types/fulfillment_option.json +56 -0
  73. data/schemas/2026-04-08/schemas/shopping/types/info_code.json +13 -0
  74. data/schemas/2026-04-08/schemas/shopping/types/input_correlation.json +24 -0
  75. data/schemas/2026-04-08/schemas/shopping/types/item.json +33 -0
  76. data/schemas/2026-04-08/schemas/shopping/types/line_item.json +46 -0
  77. data/schemas/2026-04-08/schemas/shopping/types/link.json +25 -0
  78. data/schemas/2026-04-08/schemas/shopping/types/media.json +36 -0
  79. data/schemas/2026-04-08/schemas/shopping/types/message.json +18 -0
  80. data/schemas/2026-04-08/schemas/shopping/types/message_error.json +49 -0
  81. data/schemas/2026-04-08/schemas/shopping/types/message_info.json +37 -0
  82. data/schemas/2026-04-08/schemas/shopping/types/message_warning.json +53 -0
  83. data/schemas/2026-04-08/schemas/shopping/types/option_value.json +20 -0
  84. data/schemas/2026-04-08/schemas/shopping/types/order_confirmation.json +26 -0
  85. data/schemas/2026-04-08/schemas/shopping/types/order_line_item.json +69 -0
  86. data/schemas/2026-04-08/schemas/shopping/types/pagination.json +62 -0
  87. data/schemas/2026-04-08/schemas/shopping/types/payment_credential.json +17 -0
  88. data/schemas/2026-04-08/schemas/shopping/types/payment_instrument.json +58 -0
  89. data/schemas/2026-04-08/schemas/shopping/types/platform_fulfillment_config.json +14 -0
  90. data/schemas/2026-04-08/schemas/shopping/types/postal_address.json +44 -0
  91. data/schemas/2026-04-08/schemas/shopping/types/price.json +22 -0
  92. data/schemas/2026-04-08/schemas/shopping/types/price_filter.json +17 -0
  93. data/schemas/2026-04-08/schemas/shopping/types/price_range.json +21 -0
  94. data/schemas/2026-04-08/schemas/shopping/types/product.json +89 -0
  95. data/schemas/2026-04-08/schemas/shopping/types/product_option.json +25 -0
  96. data/schemas/2026-04-08/schemas/shopping/types/rating.json +34 -0
  97. data/schemas/2026-04-08/schemas/shopping/types/retail_location.json +28 -0
  98. data/schemas/2026-04-08/schemas/shopping/types/reverse_domain_name.json +8 -0
  99. data/schemas/2026-04-08/schemas/shopping/types/search_filters.json +20 -0
  100. data/schemas/2026-04-08/schemas/shopping/types/selected_option.json +25 -0
  101. data/schemas/2026-04-08/schemas/shopping/types/shipping_destination.json +26 -0
  102. data/schemas/2026-04-08/schemas/shopping/types/signals.json +22 -0
  103. data/schemas/2026-04-08/schemas/shopping/types/signed_amount.json +7 -0
  104. data/schemas/2026-04-08/schemas/shopping/types/total.json +75 -0
  105. data/schemas/2026-04-08/schemas/shopping/types/totals.json +98 -0
  106. data/schemas/2026-04-08/schemas/shopping/types/variant.json +193 -0
  107. data/schemas/2026-04-08/schemas/shopping/types/warning_code.json +13 -0
  108. data/schemas/2026-04-08/schemas/transports/embedded_config.json +27 -0
  109. data/schemas/2026-04-08/schemas/ucp.json +364 -0
  110. data/schemas/2026-04-08/services/shopping/embedded.openrpc.json +634 -0
  111. data/schemas/2026-04-08/services/shopping/mcp.openrpc.json +492 -0
  112. metadata +283 -0
@@ -0,0 +1,193 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ucp.dev/2026-04-08/schemas/shopping/types/variant.json",
4
+ "title": "Variant",
5
+ "description": "A purchasable variant of a product with specific option selections.",
6
+ "type": "object",
7
+ "required": [
8
+ "id",
9
+ "title",
10
+ "description",
11
+ "price"
12
+ ],
13
+ "properties": {
14
+ "id": {
15
+ "type": "string",
16
+ "description": "Global ID (GID) uniquely identifying this variant. Used as item.id in checkout."
17
+ },
18
+ "sku": {
19
+ "type": "string",
20
+ "description": "Business-assigned identifier for inventory and fulfillment."
21
+ },
22
+ "barcodes": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "object",
26
+ "required": [
27
+ "type",
28
+ "value"
29
+ ],
30
+ "properties": {
31
+ "type": {
32
+ "type": "string",
33
+ "description": "Barcode standard. Well-known values: UPC, EAN, ISBN, GTIN, JAN."
34
+ },
35
+ "value": {
36
+ "type": "string",
37
+ "description": "Barcode value."
38
+ }
39
+ }
40
+ },
41
+ "description": "Industry-standard product identifiers for cross-reference and correlation."
42
+ },
43
+ "handle": {
44
+ "type": "string",
45
+ "description": "URL-safe variant handle/slug."
46
+ },
47
+ "title": {
48
+ "type": "string",
49
+ "description": "Variant display title (e.g., 'Blue / Large')."
50
+ },
51
+ "description": {
52
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/description.json",
53
+ "description": "Variant description in one or more formats."
54
+ },
55
+ "url": {
56
+ "type": "string",
57
+ "format": "uri",
58
+ "description": "Canonical variant page URL."
59
+ },
60
+ "categories": {
61
+ "type": "array",
62
+ "items": {
63
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/category.json"
64
+ },
65
+ "description": "Variant categories with optional taxonomy identifiers."
66
+ },
67
+ "price": {
68
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/price.json",
69
+ "description": "Current selling price."
70
+ },
71
+ "list_price": {
72
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/price.json",
73
+ "description": "List price before discounts (for strikethrough display)."
74
+ },
75
+ "unit_price": {
76
+ "type": "object",
77
+ "description": "Price per standard unit of measurement. MAY be omitted when unit pricing does not apply.",
78
+ "required": [
79
+ "amount",
80
+ "currency",
81
+ "measure",
82
+ "reference"
83
+ ],
84
+ "properties": {
85
+ "amount": {
86
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/amount.json",
87
+ "description": "Unit price in ISO 4217 minor units. Business MUST return precomputed unit price value: (variant.price / measure.value) * reference.value."
88
+ },
89
+ "currency": {
90
+ "type": "string",
91
+ "pattern": "^[A-Z]{3}$",
92
+ "description": "ISO 4217 currency code."
93
+ },
94
+ "measure": {
95
+ "type": "object",
96
+ "description": "Product quantity in packaging (e.g., 750ml bottle).",
97
+ "required": [
98
+ "value",
99
+ "unit"
100
+ ],
101
+ "properties": {
102
+ "value": {
103
+ "type": "number",
104
+ "description": "Package quantity."
105
+ },
106
+ "unit": {
107
+ "type": "string",
108
+ "description": "Unit of measurement."
109
+ }
110
+ }
111
+ },
112
+ "reference": {
113
+ "type": "object",
114
+ "description": "Denominator for unit price display (e.g., per 100ml, per 1kg).",
115
+ "required": [
116
+ "value",
117
+ "unit"
118
+ ],
119
+ "properties": {
120
+ "value": {
121
+ "type": "integer",
122
+ "description": "Reference quantity."
123
+ },
124
+ "unit": {
125
+ "type": "string",
126
+ "description": "Unit of measurement."
127
+ }
128
+ }
129
+ }
130
+ }
131
+ },
132
+ "availability": {
133
+ "type": "object",
134
+ "description": "Variant availability for purchase.",
135
+ "properties": {
136
+ "available": {
137
+ "type": "boolean",
138
+ "description": "Whether this variant can be purchased. See status for fulfillment details."
139
+ },
140
+ "status": {
141
+ "type": "string",
142
+ "description": "Qualifies available with fulfillment state. Well-known values: `in_stock`, `backorder`, `preorder`, `out_of_stock`, `discontinued`."
143
+ }
144
+ }
145
+ },
146
+ "options": {
147
+ "type": "array",
148
+ "items": {
149
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/selected_option.json"
150
+ },
151
+ "description": "Option values that define this variant (e.g., Color: Blue, Size: Large)."
152
+ },
153
+ "media": {
154
+ "type": "array",
155
+ "items": {
156
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/media.json"
157
+ },
158
+ "description": "Variant media (images, videos, 3D models). First item is the featured media for listings."
159
+ },
160
+ "rating": {
161
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/rating.json",
162
+ "description": "Variant rating."
163
+ },
164
+ "tags": {
165
+ "type": "array",
166
+ "items": {
167
+ "type": "string"
168
+ },
169
+ "description": "Variant tags for categorization and search."
170
+ },
171
+ "metadata": {
172
+ "type": "object",
173
+ "description": "Business-defined custom data extending the standard variant model."
174
+ },
175
+ "seller": {
176
+ "type": "object",
177
+ "description": "Optional seller context for this variant.",
178
+ "properties": {
179
+ "name": {
180
+ "type": "string",
181
+ "description": "Seller display name."
182
+ },
183
+ "links": {
184
+ "type": "array",
185
+ "items": {
186
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/link.json"
187
+ },
188
+ "description": "Seller policy and information links."
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ucp.dev/2026-04-08/schemas/shopping/types/warning_code.json",
4
+ "title": "Warning Code",
5
+ "description": "Warning code identifying the type of warning. Standard codes are defined in capability specs (see examples), and have standardized semantics; freeform codes are permitted.",
6
+ "type": "string",
7
+ "examples": [
8
+ "final_sale",
9
+ "prop65",
10
+ "fulfillment_changed",
11
+ "age_restricted"
12
+ ]
13
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ucp.dev/2026-04-08/schemas/transports/embedded_config.json",
4
+ "title": "Embedded Transport Config",
5
+ "description": "Per-session configuration for embedded transport binding. Allows businesses to vary EP availability and delegations based on cart contents, agent authorization, or policy.",
6
+ "type": "object",
7
+ "properties": {
8
+ "delegate": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "string"
12
+ },
13
+ "description": "Delegations the business allows. At service-level, declares available delegations. In UCP responses, confirms accepted delegations for this session."
14
+ },
15
+ "color_scheme": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string",
19
+ "enum": [
20
+ "light",
21
+ "dark"
22
+ ]
23
+ },
24
+ "description": "Color schemes the business supports. Hosts use ec_color_scheme query parameter to request a scheme from this list."
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,364 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ucp.dev/2026-04-08/schemas/ucp.json",
4
+ "title": "UCP Metadata",
5
+ "description": "Protocol metadata for discovery profiles and responses. Uses slim schema pattern with context-specific required fields.",
6
+ "$defs": {
7
+ "version": {
8
+ "type": "string",
9
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
10
+ "description": "UCP version in YYYY-MM-DD format."
11
+ },
12
+ "version_constraint": {
13
+ "type": "object",
14
+ "description": "Version range requirement with minimum and optional maximum.",
15
+ "properties": {
16
+ "min": {
17
+ "$ref": "#/$defs/version",
18
+ "description": "Minimum required version (inclusive)."
19
+ },
20
+ "max": {
21
+ "$ref": "#/$defs/version",
22
+ "description": "Maximum compatible version (inclusive). When absent, no upper bound."
23
+ }
24
+ },
25
+ "required": [
26
+ "min"
27
+ ],
28
+ "additionalProperties": true
29
+ },
30
+ "requires": {
31
+ "type": "object",
32
+ "description": "Version requirements for extension schemas. Declares minimum (and optionally maximum) protocol and capability versions needed for correct operation.",
33
+ "properties": {
34
+ "protocol": {
35
+ "$ref": "#/$defs/version_constraint",
36
+ "description": "Required protocol version."
37
+ },
38
+ "capabilities": {
39
+ "type": "object",
40
+ "description": "Required capability versions, keyed by capability name. Keys must be a subset of the extension's $defs keys.",
41
+ "propertyNames": {
42
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/reverse_domain_name.json"
43
+ },
44
+ "additionalProperties": {
45
+ "$ref": "#/$defs/version_constraint"
46
+ }
47
+ }
48
+ },
49
+ "additionalProperties": true
50
+ },
51
+ "entity": {
52
+ "type": "object",
53
+ "description": "Shared foundation for all UCP entities.",
54
+ "required": [
55
+ "version"
56
+ ],
57
+ "properties": {
58
+ "version": {
59
+ "$ref": "#/$defs/version",
60
+ "description": "Entity version in YYYY-MM-DD format."
61
+ },
62
+ "spec": {
63
+ "type": "string",
64
+ "format": "uri",
65
+ "description": "URL to human-readable specification document."
66
+ },
67
+ "schema": {
68
+ "type": "string",
69
+ "format": "uri",
70
+ "description": "URL to JSON Schema defining this entity's structure and payloads."
71
+ },
72
+ "id": {
73
+ "type": "string",
74
+ "description": "Unique identifier for this entity instance. Used to disambiguate when multiple instances exist."
75
+ },
76
+ "config": {
77
+ "type": "object",
78
+ "description": "Entity-specific configuration. Structure defined by each entity's schema.",
79
+ "additionalProperties": true
80
+ }
81
+ }
82
+ },
83
+ "base": {
84
+ "description": "Base UCP metadata with shared properties for all schema types.",
85
+ "type": "object",
86
+ "required": [
87
+ "version"
88
+ ],
89
+ "properties": {
90
+ "version": {
91
+ "$ref": "#/$defs/version"
92
+ },
93
+ "status": {
94
+ "type": "string",
95
+ "enum": [
96
+ "success",
97
+ "error"
98
+ ],
99
+ "default": "success",
100
+ "description": "Application-level status of the UCP operation."
101
+ },
102
+ "services": {
103
+ "type": "object",
104
+ "description": "Service registry keyed by reverse-domain name.",
105
+ "propertyNames": {
106
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/reverse_domain_name.json"
107
+ },
108
+ "additionalProperties": {
109
+ "type": "array",
110
+ "items": {
111
+ "$ref": "https://ucp.dev/2026-04-08/schemas/service.json#/$defs/base"
112
+ }
113
+ }
114
+ },
115
+ "capabilities": {
116
+ "type": "object",
117
+ "description": "Capability registry keyed by reverse-domain name.",
118
+ "propertyNames": {
119
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/reverse_domain_name.json"
120
+ },
121
+ "additionalProperties": {
122
+ "type": "array",
123
+ "items": {
124
+ "$ref": "https://ucp.dev/2026-04-08/schemas/capability.json#/$defs/base"
125
+ }
126
+ }
127
+ },
128
+ "payment_handlers": {
129
+ "type": "object",
130
+ "description": "Payment handler registry keyed by reverse-domain name.",
131
+ "propertyNames": {
132
+ "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/reverse_domain_name.json"
133
+ },
134
+ "additionalProperties": {
135
+ "type": "array",
136
+ "items": {
137
+ "$ref": "https://ucp.dev/2026-04-08/schemas/payment_handler.json#/$defs/base"
138
+ }
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "success": {
144
+ "description": "UCP metadata with status 'success'. Use for response branches that carry the expected payload.",
145
+ "allOf": [
146
+ {
147
+ "$ref": "#/$defs/base"
148
+ },
149
+ {
150
+ "properties": {
151
+ "status": {
152
+ "const": "success"
153
+ }
154
+ },
155
+ "required": [
156
+ "status"
157
+ ]
158
+ }
159
+ ]
160
+ },
161
+ "error": {
162
+ "description": "UCP metadata with status 'error'. Use for response branches that carry error information.",
163
+ "allOf": [
164
+ {
165
+ "$ref": "#/$defs/base"
166
+ },
167
+ {
168
+ "properties": {
169
+ "status": {
170
+ "const": "error"
171
+ }
172
+ },
173
+ "required": [
174
+ "status"
175
+ ]
176
+ }
177
+ ]
178
+ },
179
+ "platform_schema": {
180
+ "title": "UCP Platform Schema",
181
+ "description": "Full UCP metadata for platform-level configuration. Hosted at a URI advertised by the platform in request headers.",
182
+ "allOf": [
183
+ {
184
+ "$ref": "#/$defs/base"
185
+ },
186
+ {
187
+ "required": [
188
+ "services",
189
+ "payment_handlers"
190
+ ],
191
+ "properties": {
192
+ "services": {
193
+ "additionalProperties": {
194
+ "items": {
195
+ "$ref": "https://ucp.dev/2026-04-08/schemas/service.json#/$defs/platform_schema"
196
+ }
197
+ }
198
+ },
199
+ "capabilities": {
200
+ "additionalProperties": {
201
+ "items": {
202
+ "$ref": "https://ucp.dev/2026-04-08/schemas/capability.json#/$defs/platform_schema"
203
+ }
204
+ }
205
+ },
206
+ "payment_handlers": {
207
+ "additionalProperties": {
208
+ "items": {
209
+ "$ref": "https://ucp.dev/2026-04-08/schemas/payment_handler.json#/$defs/platform_schema"
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
215
+ ]
216
+ },
217
+ "business_schema": {
218
+ "title": "UCP Business Schema",
219
+ "description": "UCP metadata for business/merchant-level configuration. Subset of platform schema with business-specific settings.",
220
+ "allOf": [
221
+ {
222
+ "$ref": "#/$defs/base"
223
+ },
224
+ {
225
+ "required": [
226
+ "services",
227
+ "payment_handlers"
228
+ ],
229
+ "properties": {
230
+ "supported_versions": {
231
+ "type": "object",
232
+ "description": "Previous protocol versions this business supports, mapped to profile URIs. Businesses that support older protocol versions SHOULD advertise each version and link to its profile. Each URI points to a complete, self-contained profile for that version. When omitted, only `version` is supported.",
233
+ "propertyNames": {
234
+ "$ref": "#/$defs/version"
235
+ },
236
+ "additionalProperties": {
237
+ "type": "string",
238
+ "format": "uri"
239
+ }
240
+ },
241
+ "services": {
242
+ "additionalProperties": {
243
+ "items": {
244
+ "$ref": "https://ucp.dev/2026-04-08/schemas/service.json#/$defs/business_schema"
245
+ }
246
+ }
247
+ },
248
+ "capabilities": {
249
+ "additionalProperties": {
250
+ "items": {
251
+ "$ref": "https://ucp.dev/2026-04-08/schemas/capability.json#/$defs/business_schema"
252
+ }
253
+ }
254
+ },
255
+ "payment_handlers": {
256
+ "additionalProperties": {
257
+ "items": {
258
+ "$ref": "https://ucp.dev/2026-04-08/schemas/payment_handler.json#/$defs/business_schema"
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ ]
265
+ },
266
+ "response_checkout_schema": {
267
+ "title": "UCP Checkout Response Schema",
268
+ "description": "UCP metadata for checkout responses.",
269
+ "allOf": [
270
+ {
271
+ "$ref": "#/$defs/base"
272
+ },
273
+ {
274
+ "required": [
275
+ "payment_handlers"
276
+ ],
277
+ "properties": {
278
+ "services": {
279
+ "additionalProperties": {
280
+ "items": {
281
+ "$ref": "https://ucp.dev/2026-04-08/schemas/service.json#/$defs/response_schema"
282
+ }
283
+ }
284
+ },
285
+ "capabilities": {
286
+ "additionalProperties": {
287
+ "items": {
288
+ "$ref": "https://ucp.dev/2026-04-08/schemas/capability.json#/$defs/response_schema"
289
+ }
290
+ }
291
+ },
292
+ "payment_handlers": {
293
+ "additionalProperties": {
294
+ "items": {
295
+ "$ref": "https://ucp.dev/2026-04-08/schemas/payment_handler.json#/$defs/response_schema"
296
+ }
297
+ }
298
+ }
299
+ }
300
+ }
301
+ ]
302
+ },
303
+ "response_order_schema": {
304
+ "title": "UCP Order Response Schema",
305
+ "description": "UCP metadata for order responses. No payment handlers needed post-purchase.",
306
+ "allOf": [
307
+ {
308
+ "$ref": "#/$defs/base"
309
+ },
310
+ {
311
+ "properties": {
312
+ "capabilities": {
313
+ "additionalProperties": {
314
+ "items": {
315
+ "$ref": "https://ucp.dev/2026-04-08/schemas/capability.json#/$defs/response_schema"
316
+ }
317
+ }
318
+ }
319
+ }
320
+ }
321
+ ]
322
+ },
323
+ "response_cart_schema": {
324
+ "title": "UCP Cart Response Schema",
325
+ "description": "UCP metadata for cart responses. No payment handlers needed pre-checkout.",
326
+ "allOf": [
327
+ {
328
+ "$ref": "#/$defs/base"
329
+ },
330
+ {
331
+ "properties": {
332
+ "capabilities": {
333
+ "additionalProperties": {
334
+ "items": {
335
+ "$ref": "https://ucp.dev/2026-04-08/schemas/capability.json#/$defs/response_schema"
336
+ }
337
+ }
338
+ }
339
+ }
340
+ }
341
+ ]
342
+ },
343
+ "response_catalog_schema": {
344
+ "title": "UCP Catalog Response Schema",
345
+ "description": "UCP metadata for catalog responses.",
346
+ "allOf": [
347
+ {
348
+ "$ref": "#/$defs/base"
349
+ },
350
+ {
351
+ "properties": {
352
+ "capabilities": {
353
+ "additionalProperties": {
354
+ "items": {
355
+ "$ref": "https://ucp.dev/2026-04-08/schemas/capability.json#/$defs/response_schema"
356
+ }
357
+ }
358
+ }
359
+ }
360
+ }
361
+ ]
362
+ }
363
+ }
364
+ }