Repository navigation
Read and write an agent's name through its attributes - #143
Merged
Merged
Conversation
The ThunderID server no longer has a top-level name on agents
(thunder-id/thunderid 9114cab02, "Move the agent name into the agent type
schema"). An agent's name is now the `name` attribute in `attributes`, and
reads made with `include=display` also return `display`, the display value
the server resolves from those attributes. The SDKs still sent and read a
top-level `name`, so AgentCreate registered agents without a name (the
server drops the field), AgentDetails showed an empty title and asked
"Delete undefined?", the AgentList name column was blank, and agent
candidates in RoleAssignments and GroupMembers had blank labels.
- Models: `Agent` and `BasicAgent` drop `name` and gain `display`;
`BasicAgent` gains `attributes`. `CreateAgentRequest` and
`UpdateAgentRequest` drop `name`; the name goes in `attributes.name`.
- Add `getAgentName(agent)` to @thunderid/javascript. It returns
`display`, then a non-empty `attributes.name`, then the agent's id.
React and Vue re-export it.
- React and Vue: AgentList, AgentDetails (title, lifecycle confirmation
and delete confirmation), RoleAssignments and GroupMembers label agents
with getAgentName. AgentCreate sends `attributes: {name}`;
BaseAgentCreate's form and submission are unchanged.
- Update the doc examples, tests and playground samples, stories and
capability checks to the new shape.
Signed-off-by: Brion <info@brionmario.com>
|
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. |
Member
Author
Ports raised: |
rajithacharith
approved these changes
Oct 28, 2026
6 of 12 tasks
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
The ThunderID server no longer has a top-level
nameon agents (thunder-id/thunderid@9114cab02, "Move the agent name into the agent type schema"). An agent's name is now thenameattribute inattributes, and reads made withinclude=displayalso returndisplay, the display value the server resolves from those attributes.CreateAgentRequestandUpdateAgentRequesthave nonamefield.The SDKs still sent and read a top-level
name, so:AgentCreateregistered agents with no name, because the server drops the field.AgentDetailsshowed an empty title and asked "Delete undefined?".AgentListname column was blank.RoleAssignmentsandGroupMembershad blank labels.This surfaced in the Admin Console E2E tests on thunder-id/thunderid#6164.
Search is unaffected:
getAgentsandgetAgentalready requestinclude=display, and the server matches thename eq "x"filter against the name attribute.Approach
@thunderid/javascript,models/agent-resource.ts):AgentandBasicAgent:nameis replaced bydisplay?: string, the server-resolved display value from reads withinclude=display.Agentkeepsattributes, andBasicAgentgains it, since list responses carry it.CreateAgentRequestandUpdateAgentRequest:nameis removed; the name goes inattributes.name.createAgentandupdateAgentdoc examples now useattributes: {name}.getAgentName(agent): a new util in@thunderid/javascript. It returnsdisplay, thenattributes.namewhen that's a non-empty string, then the agent'sid. React and Vue re-export it, and Next.js and Nuxt get it through them.AgentList/BaseAgentList: the name column usesgetAgentName.AgentDetails/BaseAgentDetails: the title, the lifecycle confirmation and the delete confirmation usegetAgentName.AgentCreatesendsattributes: {name}.BaseAgentCreate's form and its{name, type, description}submission are unchanged.RoleAssignmentsandGroupMemberslabel agent candidates withgetAgentName.@thunderid/node's management client only passes the request types through.SAMPLE_AGENTSdata now carriesattributes.nameanddisplay, and the stories, custom-render snippets andagentMembershipscapability checks usegetAgentName.Related Issues
Related PRs
Checklist
packages/javascript/src/utils/__tests__/getAgentName.test.ts:displaywins, thenattributes.name, thenid.packages/react/src/components/admin/__tests__/adminComponents.test.tsx("agent names"): the list falls back fromdisplaytoattributes.nametoid; the details title and delete confirmation use the name attribute;AgentCreateposts{attributes: {name}, ouId, type}.packages/vue/src/__tests__/components/admin/admin-components.test.ts: the same list and details cases; theAgentCreatetest now asserts the exact{attributes: {name}, ouId, type}payload.attributes.nameanddisplay.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.b2b/managedeclares its own agent type, readsdisplayfirst and creates agents through a flow.Security checks