Repository navigation
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
🔀 Cross-SDK feature parity, ports raisedThis pull request is labelled Ports (DO NOT EDIT)
3 of 3 sibling SDKs accounted for. Every sibling SDK is accounted for. The contract is in the SDK development specification. |
This was referenced Nov 5, 2026
ThunderID now models an agent's owner as an object, so it can name a person managed in another identity system (thunder-id/thunderid#6435). The server returns `{"id", "idType", "isLocal"}` on reads and rejects a string owner with 400 AGT-1001. Add `AgentOwner` and `AgentOwnerIdType` and use them for `owner` on `Agent`, `CreateAgentRequest` and `UpdateAgentRequest`. Agent details show the owner's id, and `AgentCreate` takes the owner as an `AgentOwner` and sends it as given. The playground sample agent and the tests use the object. Signed-off-by: thiva-k <kalyanasundaramthivaharan@gmail.com>
thiva-k
force-pushed
the
agent-owner-object
branch
from
November 6, 2026 17:06
cca3fd5 to
3bd0e9a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
ThunderID is changing an agent's
ownerfrom a string to an object, so the owner can be a person managed in another identity system (thunder-id/thunderid#6435):The SDK still models
owneras aString?. Once the server returns the object, Gson fails to read the agent (it expects a string and finds an object), soAgentsClient.get, the agent details and secret regeneration all break. Agent create also sends the owner as a string, which the server now rejects with400 AGT-1001.🔧 Summary of Breaking Changes
owneronAgent,CreateAgentRequestandUpdateAgentRequestchanges fromString?toAgentOwner?.ownerparameter of theAgentCreatecomposable changes fromString?toAgentOwner?.💥 Impact
Code that reads
agent.owneras a string, or passes a stringownertoAgentCreateor the create and update requests, no longer compiles. It must ship together with thunder-id/thunderid#6435, since the server change breaks the string form anyway.🔄 Migration Guide
Read the owner's ID from
agent.owner?.id, and pass the owner as an object:The server defaults
idTypetouuidandisLocaltotrue, soAgentOwner(id = userId)names a user of the same deployment. To name an external owner:Approach
dev.thunderid.android.management: addsAgentOwner(id, optionalidType, optionalisLocal) and theAgentOwnerIdTypeenum (UUID,EMAIL,MOBILE, mapped to the wire values with@SerializedName, likeUserUsageBehavior).Agent,CreateAgentRequestandUpdateAgentRequestuse it. Gson leaves out the fields that arenull, soAgentOwner(id = ...)sends only the ID and the server applies its defaults.AgentsClient.regenerateSecretcopies the owner from the read into the update as before; it now carries the object.BaseAgentDetailsshowsagent.owner?.id, still falling back to "No owner".AgentCreatetakes the owner as anAgentOwner?and sends it unchanged, so a caller can also name an external owner.AgentOwner(id = "usr-1").No new strings, so no translation changes. No sample in thunder-id/samples uses
AgentCreateor an agent's owner, so no samples change is needed.Related Issues
Related PRs
SDK parity
Verification
./gradlew ktlintCheck(SDK) andcd playground && ./gradlew ktlintCheck: both pass../gradlew test,./gradlew lintand./gradlew buildwere not run: the machine this was written on has no Android SDK, and Gradle stops with "SDK location not found". The new and changed unit tests (below) have therefore not been run locally and rely on CI. The Kotlin was checked by reading every changed file and every use of the changed types.ManagementApiTest: create sends the owner object (withidTypeas its wire value), create leaves out the owner fields it was not given, a read parses the owner object, and a read without an owner leaves itnull.AdministrationApiTest's secret regeneration test now checks that the owner object read from the agent is sent back unchanged on the update.AgentDetailschange: the unit tests here do not render composables.Checklist
breaking changelabel added.parity/prs-raisedorparity/prs-not-neededadded.parity/prs-raised, the port links are posted as a reply on the parity check's comment.Security checks
🤖 Generated with Claude Code