Skip to content

feat(generated): Agents (batch 13ebc8c1) - #437

Merged
workos-sdk-automation[bot] merged 2 commits into
mainfrom
oagen/batch-13ebc8c1
Sep 1, 2026
Merged

feat(generated): Agents (batch 13ebc8c1)#437
workos-sdk-automation[bot] merged 2 commits into
mainfrom
oagen/batch-13ebc8c1

Conversation

@workos-sdk-automation

Copy link
Copy Markdown
Contributor

Summary

Regenerated SDK from spec changes.

Triggered by workos/openapi-spec@b6350ef

@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Sep 1, 2026
@workos-sdk-automation
workos-sdk-automation Bot requested review from a team as code owners September 1, 2026 21:42
@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This generated SDK update makes blueprint session settings optional and adds agent-token validation support.

  • Adds validateBlueprintToken and its request and response resource models.
  • Updates generated manifests, fixtures, service tests, and changelog metadata.
  • Reorders an existing public parameter while making session settings optional, breaking positional callers.

Confidence Score: 4/5

The public parameter reorder should be fixed before merging because it causes existing positional blueprint-creation calls to fail at runtime.

Making sessionSettings optional moves it from the second argument to the fifth, so previously valid positional calls bind the settings object to the string description parameter and throw a TypeError.

Files Needing Attention: lib/Service/Agents.php and lib/Resource/AgentBlueprintsCreateRequest.php

Important Files Changed

Filename Overview
lib/Service/Agents.php Adds the token-validation endpoint and optionalizes session settings, but reorders a formerly required public parameter and breaks positional callers.
lib/Resource/AgentBlueprintsCreateRequest.php Makes sessionSettings nullable while introducing the same backward-incompatible constructor parameter reorder.
lib/Resource/AgentTokenValidation.php Adds the generated response model for successful agent-token validation results.
tests/Service/AgentsTest.php Covers the new endpoint and optional create call, but uses named arguments and therefore does not detect positional compatibility regressions.

Sequence Diagram

sequenceDiagram
  participant App as PHP application
  participant SDK as Agents service
  participant API as WorkOS API
  App->>SDK: validateBlueprintToken(blueprintId, token)
  SDK->>API: "POST /agents/blueprints/{id}/tokens/validate"
  alt Token is valid
    API-->>SDK: Claims and session metadata
    SDK-->>App: AgentTokenValidation
  else Token is invalid
    API-->>SDK: Stable error response
    SDK-->>App: WorkOSException
  end
Loading
Prompt To Fix All With AI
### Issue 1
lib/Service/Agents.php:70-76
**Session settings change position**

When existing consumers call `createBlueprint($name, $sessionSettings)` positionally, the settings object now binds to the `?string $description` parameter, causing a `TypeError`. Making this parameter optional should preserve its existing positional slot; the corresponding resource constructor has the same compatibility break.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "chore(generated): add release notes frag..." | Re-trigger Greptile

Comment thread lib/Service/Agents.php
Comment on lines 70 to 76
public function createBlueprint(
string $name,
\WorkOS\Resource\AgentBlueprintsCreateRequestSessionSetting $sessionSettings,
?string $description = null,
?array $permissions = null,
?\WorkOS\Resource\AgentBlueprintsCreateRequestInvocableBy $invocableBy = null,
?\WorkOS\Resource\AgentBlueprintsCreateRequestSessionSetting $sessionSettings = null,
?\WorkOS\RequestOptions $options = null,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Session settings change position

When existing consumers call createBlueprint($name, $sessionSettings) positionally, the settings object now binds to the ?string $description parameter, causing a TypeError. Making this parameter optional should preserve its existing positional slot; the corresponding resource constructor has the same compatibility break.

Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/Service/Agents.php
Line: 70-76

Comment:
**Session settings change position**

When existing consumers call `createBlueprint($name, $sessionSettings)` positionally, the settings object now binds to the `?string $description` parameter, causing a `TypeError`. Making this parameter optional should preserve its existing positional slot; the corresponding resource constructor has the same compatibility break.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@workos-sdk-automation
workos-sdk-automation Bot merged commit d43ede0 into main Sep 1, 2026
9 checks passed
@workos-sdk-automation
workos-sdk-automation Bot deleted the oagen/batch-13ebc8c1 branch September 1, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autogenerated Autogenerated code or content

Development

Successfully merging this pull request may close these issues.

0 participants