agentadmit 1.14.0 → 1.14.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: 4614ce271d54fa958f580f2180349bbdad92764566efe17d3a459c0fca62815c
4
- data.tar.gz: 5c46517cd626d99eda4482cf47fdb14ae98b13f9a451216bcb117f6fd236f9c8
3
+ metadata.gz: 1af95260c413c1ce419cfdd29dbb64abffa228c2c252d729f62d8d8514713d43
4
+ data.tar.gz: c9a638031a64b6d5a634687f0d8bd150b928ff10e76af2b6203215c908aae7c6
5
5
  SHA512:
6
- metadata.gz: 716a550dd977efc852984419c4f79e8fba5e28fd282a3c5b8630251fc48dba14548ac6e1950d2c548057acf84862d9c023525cdfe1ba5e8c2ef60e5ca0d021a7
7
- data.tar.gz: c568d905a1930f6376109751c2fe3c464a181049f359b50f280872f9b18042d82d75a73e628119ed0d8f51270bfa843b39ca4585f7867182c4ed3242d6d8000f
6
+ metadata.gz: e12e4ede6e53c77634ef65d249a5e8363ba9a2a7bba650fe9a3b5696410dbe30a90c170bdd44ac1a44dbe8b7c0fa5145b8fa4d1ae5c8d47084d5f2e2e6d4f0e4
7
+ data.tar.gz: d6c0bfb352a0af3044b8153846969b0e9500e13d7a82489d06ad80383bc0b171156bbe5a95e84913c43b21f11127523342359f6f9939a0ba5e3b1ea8f004e6f1
data/README.md CHANGED
@@ -419,6 +419,8 @@ puts "Reported by the agent: #{reported&.dig('model', 'id') || '(nothing)'}"
419
419
 
420
420
  Use `designated_agent["name"]` when you tell a user which of their connections did something: it is the name they chose. `agent_id` and `model["model_id"]` are the ids of your list entries, or `nil` when the user typed a name that is not on your list.
421
421
 
422
+ If your code redeems connection tokens with `TokensClient#exchange`, pass `agent_platform:` and `agent_model:` to send along what the agent says it runs on (since 1.14.1).
423
+
422
424
  Do not branch authorization on either field. They are records for people reviewing a connection, not a gate. Scope checks, connection status, and consent verdicts remain the only decision inputs. To act on a designation, use the hosted revoke API (`designated_agent_id`, `designated_model_id`) or your list's block setting in the dashboard.
423
425
 
424
426
  ## App-Attested Presence
@@ -111,13 +111,22 @@ module AgentAdmit
111
111
  # @param connection_token [String] the ag_ct_… connection token
112
112
  # @param agent_label [String, nil] human-readable agent name
113
113
  # @param agent_id [String, nil] agent identifier
114
+ # @param agent_platform [String, nil] the agent app or runtime the agent
115
+ # says it runs in (reported by the agent, unverified)
116
+ # @param agent_model [Hash, nil] the AI model the agent says it runs on:
117
+ # {"id" => String, "version" => String (optional)} (reported by the
118
+ # agent, unverified). The hosted service records both and never lets
119
+ # them decide the outcome of the exchange.
114
120
  # @return [Hash] the exchange response — "access_token" is the ag_at_… token
115
121
  # @raise [IntrospectionError] if the exchange fails
116
122
  #
117
- def exchange(connection_token, agent_label: nil, agent_id: nil)
123
+ def exchange(connection_token, agent_label: nil, agent_id: nil,
124
+ agent_platform: nil, agent_model: nil)
118
125
  body = { "token" => connection_token }
119
126
  body["agent_label"] = agent_label if agent_label
120
127
  body["agent_id"] = agent_id if agent_id
128
+ body["agent_platform"] = agent_platform if agent_platform
129
+ body["agent_model"] = agent_model if agent_model
121
130
 
122
131
  post("/api/v1/exchange", body, authenticated: false, op: "exchange")
123
132
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AgentAdmit
4
- VERSION = "1.14.0"
4
+ VERSION = "1.14.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agentadmit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Emerson