kiosk-core 0.5.20 → 0.6.1

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: e13d8c20ff22d54f80b08ce121162c575f73cf7159f2a623c9a52dc8afda820a
4
- data.tar.gz: 4cd1571a390aad1e782ce844b2d35d7d4bfe2697466ad14b0e1ef3c49cf3cfc7
3
+ metadata.gz: 2ae058e2f502098d86eaaf73f923777a3a26c15a5a7e639aadf9603fc0127b99
4
+ data.tar.gz: cd5fa11750a7ee2e47a2392132981f964c7524fbe2b570dea326485785af043b
5
5
  SHA512:
6
- metadata.gz: 75e6135c30f091b70d05104c8179bcf275b4ec99a8e0e771981c7ab90ae3c6c2de8f180efc9d3d37ba0f16116e302843a6d1a945356cc163f337caabbbfd17b2
7
- data.tar.gz: d9e5bbd82971df57550ace1912ef0d499b0066f7a7d325ea6c5e334063c37e132a4731602d5f7096bc101aa164b690acf7558dd83d85816710212f1314aed08f
6
+ metadata.gz: 4f37b026e62693cbc19c2cdb863d10b1f9a900d7506490bfe7386fb258d645875d59c0506eaeb8970f2f71d81f7aecae88d9058779839120cfb6039e306dfc83
7
+ data.tar.gz: 40ef0e8d8ae11bd56428d5c49bd7a39ae5042270469c323eedf1ed32cf7319db338108f3c1155a803addea92745cf326038df44fbf6493f0f76beee9ebb23fc9
data/CHANGELOG.md CHANGED
@@ -12,6 +12,45 @@ already written is edited.
12
12
 
13
13
  ## [Unreleased]
14
14
 
15
+ ## [0.6.1] — 2026-10-22
16
+
17
+ - 2026-10-22: Version 0.6.1, the tree cut that matches skill 0.6.1.
18
+
19
+ ## [0.6.0] — 2026-10-21
20
+
21
+ - 2026-10-21: Version 0.6.0, the tree cut that matches skill 0.6.0.
22
+
23
+ ## [0.5.27] — 2026-10-21
24
+
25
+ - 2026-10-21: Version 0.5.27, the tree cut that matches skill 0.5.27.
26
+
27
+ ## [0.5.26] — 2026-10-21
28
+
29
+ - 2026-10-21: Version 0.5.26, the tree cut that matches skill 0.5.26.
30
+
31
+ ## [0.5.25] — 2026-10-21
32
+
33
+ - 2026-10-21: Version 0.5.25, the tree cut that matches skill 0.5.25.
34
+
35
+ ## [0.5.24] — 2026-10-21
36
+
37
+ - 2026-10-21: `PaymentProviders::Base#capture` may answer `network_confirmation_id`, the card network's id of the charge, which the payment receipt names.
38
+ - 2026-10-21: Version 0.5.24, the tree cut that matches skill 0.5.24.
39
+
40
+ ## [0.5.23] — 2026-10-21
41
+
42
+ - 2026-10-21: `AgentIdentityProviders::Base` states that an identity's claims carry `cnf: { jkt: }`, the key that signs the call's DPoP proof.
43
+ - 2026-10-21: Version 0.5.23, the tree cut that matches skill 0.5.23.
44
+
45
+ ## [0.5.22] — 2026-10-21
46
+
47
+ - 2026-10-21: `Kiosk::Mandate` holds the two AP2 v0.2 mandates, `CheckoutMandate` and `PaymentMandate`; the payment port captures a checkout mandate.
48
+ - 2026-10-21: Version 0.5.22, the tree cut that matches skill 0.5.22.
49
+
50
+ ## [0.5.21] — 2026-10-21
51
+
52
+ - 2026-10-21: Version 0.5.21, the tree cut that matches skill 0.5.21.
53
+
15
54
  ## [0.5.20] — 2026-10-20
16
55
 
17
56
  - 2026-10-20: Version 0.5.20, the tree cut that matches skill 0.5.20.
@@ -6,7 +6,10 @@ module Kiosk
6
6
  # (`c.agent_idp`). The engine calls only `verify`: it mints tokens and reads
7
7
  # mandate-signing keys through its bundled DefaultAgentIdp. The `agent_id` it
8
8
  # returns must be a uuid: every schema column and `kiosk.current_agent_id()`
9
- # are typed `uuid`, so map foreign ids.
9
+ # are typed `uuid`, so map foreign ids. The token comes as
10
+ # `Authorization: DPoP <token>`, and the identity's `claims` carry
11
+ # `cnf: { jkt: }`, the thumbprint of the key that must sign the request's
12
+ # DPoP proof (RFC 9449).
10
13
  class Base
11
14
  # @return [Kiosk::Identity, nil] nil when the credential is absent or invalid (the caller answers 401)
12
15
  def verify(_request)
data/lib/kiosk/mandate.rb CHANGED
@@ -2,21 +2,21 @@
2
2
 
3
3
  module Kiosk
4
4
  # AP2 (Agent Payments Protocol) mandate value objects.
5
- # Each is a JWS the assistant signs; its `iss` must equal the origin's issuer.
5
+ # Each is a closed AP2 v0.2 mandate: an SD-JWT the assistant signs with its
6
+ # registered key. `reference` is the base64url SHA-256 of the presented SD-JWT.
6
7
  module Mandate
7
- IntentMandate = Data.define(
8
- :id, :user_id, :agent_id, :issuer, :scope, :cap_amount_cents, :currency,
9
- :expires_at, :created_at, :raw_jws
10
- )
11
-
12
- CartMandate = Data.define(
13
- :id, :intent_mandate_id, :user_id, :agent_id, :issuer, :line_items,
14
- :total_amount_cents, :currency, :expires_at, :created_at, :raw_jws
8
+ # Binds the operator-signed checkout by `checkout_hash`; the line items,
9
+ # total and currency come from that checkout.
10
+ CheckoutMandate = Data.define(
11
+ :reference, :checkout_hash, :user_id, :agent_id, :issuer, :line_items,
12
+ :total_amount_cents, :currency, :expires_at, :sd_jwt
15
13
  )
16
14
 
15
+ # Pays for the checkout whose hash is `transaction_id`. `payment_instrument`
16
+ # is the instrument id: a PSP payment-method id, or `on_file`.
17
17
  PaymentMandate = Data.define(
18
- :id, :cart_mandate_id, :user_id, :agent_id, :issuer, :payment_method,
19
- :amount_cents, :currency, :expires_at, :created_at, :raw_jws
18
+ :reference, :transaction_id, :user_id, :agent_id, :issuer, :payment_instrument,
19
+ :amount_cents, :currency, :expires_at, :sd_jwt
20
20
  )
21
21
  end
22
22
  end
@@ -31,8 +31,11 @@ module Kiosk
31
31
  'whose setup_required? can answer true'
32
32
  end
33
33
 
34
- # @return [Hash] `psp_reference`, `settled_amount_cents`, `settled_at`
35
- def capture(_cart_mandate, payment_method:)
34
+ # @param checkout_mandate [Kiosk::Mandate::CheckoutMandate] what to charge, and its key
35
+ # @param payment_method [String, nil] the PSP payment-method id; nil charges the saved card
36
+ # @return [Hash] `psp_reference`, `settled_amount_cents`, `settled_at`, and
37
+ # `network_confirmation_id`: the card network's id of the charge, or nil when the PSP reports none
38
+ def capture(_checkout_mandate, payment_method:)
36
39
  raise NotImplementedError, "#{self.class}#capture must be implemented by the adapter"
37
40
  end
38
41
 
@@ -44,9 +47,10 @@ module Kiosk
44
47
  raise NotImplementedError, "#{self.class}#refund must be implemented by an adapter whose operator refunds"
45
48
  end
46
49
 
47
- # A repeat of a chain whose capture did not complete. The adapter keys its
48
- # capture by the cart mandate id, so a second capture cannot charge twice.
49
- def resume(cart_mandate, payment_method:) = capture(cart_mandate, payment_method:)
50
+ # A repeat of a pair of mandates whose capture did not complete. The adapter
51
+ # keys its capture by the checkout mandate's `reference`, so a second
52
+ # capture cannot charge twice.
53
+ def resume(checkout_mandate, payment_method:) = capture(checkout_mandate, payment_method:)
50
54
  end
51
55
  end
52
56
  end
@@ -4,11 +4,11 @@ module Kiosk
4
4
  # Wire-protocol version and header names.
5
5
  module Protocol
6
6
  # Before 1.0 every gem and every pinned skill cut carry this exact version (spec §14.1).
7
- API_VERSION = '0.5.20'
7
+ API_VERSION = '0.6.1'
8
8
 
9
9
  # The oldest skill cut that works with this release: same MAJOR.MINOR as
10
10
  # API_VERSION, no newer (spec §3.6). Advisory.
11
- MIN_CLIENT = '0.5.20'
11
+ MIN_CLIENT = '0.6.0'
12
12
 
13
13
  HEADER_SERVER_VERSION = 'Kiosk-Server-Version'
14
14
  HEADER_API_VERSION = 'Kiosk-API-Version'
data/lib/kiosk/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kiosk
4
- VERSION = '0.5.20'
4
+ VERSION = '0.6.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kiosk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.20
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Pirozhkov