portage-ucp-client 0.6.3 → 0.7.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +7 -5
- data/lib/portage/ucp/client/version.rb +1 -1
- data/lib/portage/ucp/client.rb +8 -3
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a1a9cbc441c1893347b4f899fe968932fb297f626285f37d848d65d2ca91e749
|
|
4
|
+
data.tar.gz: 0455b81249ce937ccbc88fb3ee19cf5590e1b0c94a187490ffb35116863bbf72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ef87e49709386c5f6f05ac388526ef9df1bedf8f7f2d5e6609a26b769d2ba3c9f56d5e4160e03eced891f502a55c795c340ffd17d09b694c8f4fe5d8ee81bb7
|
|
7
|
+
data.tar.gz: 712af022a1faea02752ba88b2023e34ec893bf567d6f8d2cc237ccf15981994fb7f85bee20124368369f4984c43699ca011b2d4af194ed308fc128a3dd46d0af
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to this project are documented here. Format loosely follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/); this project is
|
|
5
5
|
pre-1.0, so APIs may still shift between minor versions.
|
|
6
6
|
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.7.0] - 2026-10-22
|
|
10
|
+
|
|
11
|
+
- **Changed: requires `mcp` `~> 1.8`** (was `~> 0.24`), which serves MCP 2026-07-28 through `server/discover` and keeps `initialize` for 2025-11-25 and earlier. Minor bump because the `mcp` requirement moved from 0.x to 1.x; no API change and no changes under `lib/`. `portage-ucp` stays at `~> 0.8`: the client calls nothing newer, and the shared `mcp` `~> 1.8` requirement makes resolution pick `portage-ucp` 0.17.0 or later.
|
|
12
|
+
- Documentation only, no code change. Fixes a wrong comment on
|
|
13
|
+
`Client.ucp_section`. It said `Portage::Ucp::Manifest` still emits the old
|
|
14
|
+
flat manifest shape. It hasn't since `portage-ucp` 0.8.0, which nests
|
|
15
|
+
everything under `ucp` like live Shopify stores do. The flat fallback
|
|
16
|
+
stays, and the comment now says why: a store may still serve a manifest
|
|
17
|
+
from an older `portage-ucp`.
|
|
18
|
+
|
|
7
19
|
## [0.6.3] - 2026-09-24
|
|
8
20
|
|
|
9
21
|
- `Client.connect(url:, proxy:)` and `Client.discover(url, proxy:)` take a
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@ got:
|
|
|
15
15
|
| `Portage::Ucp::Client.for_adapter(adapter)` | Loopback over an in-process `Adapter` — no subprocess, no socket. Still runs the real authenticator/rate-limiter/`Dispatcher` stack, just without the wire hop. For driving your own store's `Adapter` directly. |
|
|
16
16
|
| `Portage::Ucp::Client.connect(command: ...)` | stdio, spawns a subprocess (an MCP server exe). |
|
|
17
17
|
| `Portage::Ucp::Client.connect(url: ...)` | Streamable HTTP, connects to a remote MCP endpoint. |
|
|
18
|
-
| `Portage::Ucp::Client.discover(url)` | Fetches `<url>/.well-known/ucp`, parses the manifest, and connects to
|
|
18
|
+
| `Portage::Ucp::Client.discover(url)` | Fetches `<url>/.well-known/ucp`, parses the manifest, and connects to its `mcp` service — the entry point for buying from a store you've never talked to before. |
|
|
19
19
|
|
|
20
20
|
Depends only on `portage-ucp` and the `mcp` gem's client half — no adapter gem is
|
|
21
21
|
a dependency.
|
|
@@ -39,11 +39,13 @@ require "portage/ucp/client"
|
|
|
39
39
|
|
|
40
40
|
# Discover and connect to a live store you've never talked to before:
|
|
41
41
|
session = Portage::Ucp::Client.discover("https://your-shop.example")
|
|
42
|
+
meta = { agent_profile: "https://example.com/agent-profile.json" } # required over HTTP
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
results = session.search_catalog(query: "snowboard", limit: 5, meta: meta) # string-keyed Hash, shaped by the store
|
|
45
|
+
product_id = "..." # pick from results
|
|
46
|
+
checkout = session.create_checkout(line_items: [{ product_id: product_id, quantity: 1 }], meta: meta)
|
|
47
|
+
completed = session.complete_checkout(checkout_id: checkout["id"], payment_token: "spt_1a2b3c...", meta: meta)
|
|
48
|
+
order = session.get_order(order_id: "gid://shopify/Order/9001", meta: meta)
|
|
47
49
|
```
|
|
48
50
|
|
|
49
51
|
`Session` generates an `idempotency_key` for you on every mutating call unless you
|
data/lib/portage/ucp/client.rb
CHANGED
|
@@ -92,9 +92,14 @@ module Portage
|
|
|
92
92
|
|
|
93
93
|
# Real UCP manifests (confirmed live on Casper, Allbirds, Glossier, and
|
|
94
94
|
# 34+ other Shopify UCP rollouts as of "2026-08-25") nest everything one
|
|
95
|
-
# level deeper under a "ucp" key.
|
|
96
|
-
#
|
|
97
|
-
#
|
|
95
|
+
# level deeper under a "ucp" key. Portage::Ucp::Manifest has emitted
|
|
96
|
+
# the same nested shape since portage-ucp 0.8.0. The flat fallback
|
|
97
|
+
# stays for stores still serving a manifest from an older portage-ucp:
|
|
98
|
+
# there, services and capabilities sit at the top level and
|
|
99
|
+
# capabilities is an array of {name:, version:}. This gem needing
|
|
100
|
+
# portage-ucp 0.8 says nothing about what a store runs, so dropping
|
|
101
|
+
# the fallback would break discovery against those stores — see
|
|
102
|
+
# docs/well-known-ucp.md.
|
|
98
103
|
def self.ucp_section(manifest)
|
|
99
104
|
manifest["ucp"] || manifest
|
|
100
105
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: portage-ucp-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom Whitbread
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
33
|
+
version: '1.8'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
40
|
+
version: '1.8'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: portage-ucp
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|