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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d79c922ef93a60d8ae293284eb680bb4db51aba09be905ccdd61c0f756723ef5
4
- data.tar.gz: f133375b2803b101f0c1bf5e9a70fa88cb6bc7c0126277e303eb909b4fff59aa
3
+ metadata.gz: a1a9cbc441c1893347b4f899fe968932fb297f626285f37d848d65d2ca91e749
4
+ data.tar.gz: 0455b81249ce937ccbc88fb3ee19cf5590e1b0c94a187490ffb35116863bbf72
5
5
  SHA512:
6
- metadata.gz: a849432b3f19bfb560d54a7bf5d122dafefc55476a98d93708fed59b6f274362bcbff2c7f1799f833f2237e25991d06064b7bf0481a7c29faa7bd7e7a0e84b79
7
- data.tar.gz: ee79d83b07f4da1678839b0006de2156112f22327c24e9750bf6c63bf6ef48971e46b9d1e73cc9f136ba11ffa3f4f3fb741b092c6dfb9001b6c69ff6228a492e
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 whatever transport it advertises — the entry point for buying from a store you've never talked to before. |
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
- products = session.search_catalog(query: "snowboard", limit: 5)
44
- checkout = session.create_checkout(line_items: [{ product_id: products.first.id, quantity: 1 }])
45
- completed = session.complete_checkout(checkout_id: checkout["id"], payment_token: "spt_1a2b3c...")
46
- order = session.get_order(order_id: "gid://shopify/Order/9001")
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
@@ -1,7 +1,7 @@
1
1
  module Portage
2
2
  module Ucp
3
3
  module Client
4
- VERSION = "0.6.3".freeze
4
+ VERSION = "0.7.0".freeze
5
5
  end
6
6
  end
7
7
  end
@@ -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. This gem's own server side
96
- # (Portage::Ucp::Manifest) still emits the old flat shape, so both are
97
- # supported rather than picking one — see docs/well-known-ucp.md.
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.6.3
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-09-25 00:00:00.000000000 Z
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: '0.24'
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: '0.24'
40
+ version: '1.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: portage-ucp
43
43
  requirement: !ruby/object:Gem::Requirement