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 +4 -4
- data/README.md +2 -0
- data/lib/agentadmit/tokens_client.rb +10 -1
- data/lib/agentadmit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1af95260c413c1ce419cfdd29dbb64abffa228c2c252d729f62d8d8514713d43
|
|
4
|
+
data.tar.gz: c9a638031a64b6d5a634687f0d8bd150b928ff10e76af2b6203215c908aae7c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/agentadmit/version.rb
CHANGED