feat(generated): Agents (batch 89943d4b) - #548
feat(generated): Agents (batch 89943d4b)#548workos-sdk-automation[bot] wants to merge 2 commits into
Conversation
Greptile SummaryThe PR regenerates the Agents SDK to make blueprint session settings optional and add agent-token validation.
Confidence Score: 4/5The response type contract should be corrected before merging so typed consumers do not treat nullable validation fields as guaranteed strings. The endpoint can construct a model containing nil identity and expiry fields, while its newly generated RBI promises non-null String values for those same accessors. Files Needing Attention: rbi/workos/agent_token_validation.rbi, lib/workos/agents/agent_token_validation.rb Important Files Changed
|
| sig { returns(String) } | ||
| def agent_instance_id; end | ||
|
|
||
| sig { params(value: String).returns(String) } | ||
| def agent_instance_id=(value); end | ||
|
|
||
| sig { returns(String) } | ||
| def agent_instance_session_id; end | ||
|
|
||
| sig { params(value: String).returns(String) } | ||
| def agent_instance_session_id=(value); end | ||
|
|
||
| sig { returns(String) } | ||
| def organization_id; end |
There was a problem hiding this comment.
Validation fields have wrong nullability
When a token-validation response omits identity or expiry fields, AgentTokenValidation returns nil while this RBI declares those accessors as non-null String, causing typed consumers to trust values that can produce downstream NoMethodError or TypeError failures.
Knowledge Base Used: Agents, actions, and widgets
Prompt To Fix With AI
This is a comment left during a code review.
Path: rbi/workos/agent_token_validation.rbi
Line: 18-31
Comment:
**Validation fields have wrong nullability**
When a token-validation response omits identity or expiry fields, `AgentTokenValidation` returns `nil` while this RBI declares those accessors as non-null `String`, causing typed consumers to trust values that can produce downstream `NoMethodError` or `TypeError` failures.
**Knowledge Base Used:** [Agents, actions, and widgets](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/agents-actions-and-widgets.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Regenerated SDK from spec changes.
Triggered by workos/openapi-spec@b6350ef