Repository navigation
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR #25 breaking-change review (
|
| Old name | New name |
|---|---|
UsersListRequest |
ListUsersRequest |
UsersDeleteRequest |
DeleteUsersRequest |
TeamsListRequest |
ListTeamsRequest |
TeamsListMembersRequest |
ListMembersTeamsRequest |
TeamsListManagersRequest |
ListManagersTeamsRequest |
ApplicationsListRequest |
ListApplicationsRequest |
ApplicationVersionsListRequest |
ListApplicationVersionsRequest |
ClustersListRequest |
ListClustersRequest |
ClustersGetAddonsRequest |
GetAddonsClustersRequest |
WorkspacesListRequest |
ListWorkspacesRequest |
WorkspacesSearchRequest |
SearchWorkspacesRequest |
VirtualAccountsListRequest |
ListVirtualAccountsRequest |
JobsListRunsRequest |
ListRunsJobsRequest |
JobsTerminateRequest |
TerminateJobsRequest |
SecretsDeleteRequest |
DeleteSecretsRequest |
PersonalAccessTokensListRequest |
ListPersonalAccessTokensRequest |
PersonalAccessTokensGetRequest |
GetPersonalAccessTokensRequest |
| … | (same pattern for agents, artifacts, alerts, events, logs, mlRepos, models, prompts, runs, secretGroups, dataDirectories, environments, agentSkills, agentSkillVersions, agentVersions) |
Response type rename:
ApplicationsCancelDeploymentResponse→CancelDeploymentApplicationsResponse
Scoped enum/type renames tied to requests:
AgentsListRequestType→ListAgentsRequestTypeApplicationsListRequestDeviceTypeFilter→ListApplicationsRequestDeviceTypeFilterApplicationsListRequestLifecycleStage→ListApplicationsRequestLifecycleStage
2. Removed exported types (compile breaks)
These types are deleted from src/api/types/ with no same-name replacement:
| Removed type | Replacement / notes |
|---|---|
BuildStatus |
Renamed → DeploymentBuildStatus (same values: STARTED, SUCCEEDED, FAILED) |
IChangeOperation |
Renamed → IChangeType (same values) |
ResourceType |
Split/replaced by scoped types like UpdateUserRolesRequestResourceType, RoleResourceType, PermissionSetV2ResourceType |
GatewayLoggingRule |
Removed — GatewayLoggingConfig restructured (see §4) |
GatewayLoggingWhen |
Removed — replaced by LoggingWhen |
3. Enum member removals (runtime / exhaustiveness breaks)
| Enum | Removed members | Added members |
|---|---|---|
SubjectType |
ExternalIdentity ("external-identity") |
Agent, AgentChannelIdentity |
SubjectSubjectType (new; used on Subject.subjectType) |
— | Same set as above |
RoleBindingSubjectType |
ExternalIdentity |
— |
RoleWithResourceResourceType |
ExternalIdentity, SsoBasedIdentity |
GatewayPolicy, GatewayApprovalRequest, AgentChannel |
Code comparing against "external-identity" or "sso-based-identity", or switch/if exhaustiveness over these enums, will break.
4. Model / manifest schema breaks (field removed or renamed)
These are actual field removals or renames on types consumers build or read — not just example/doc changes.
RegenerateVirtualAccountTokenRequest — breaking rename + unit change:
// before
gracePeriodInDays: number
// after
gracePeriodInMinutes: numberCallers passing gracePeriodInDays will fail at compile time; callers passing 30 thinking “days” will behave incorrectly at runtime.
GatewayLoggingConfig — full schema change:
// before
{ name, type, rules: GatewayLoggingRule[] }
// after
{ type, name, when?, log, redactWith? }The rules array is gone; GatewayLoggingRule type is deleted.
BudgetV2Alert — field removed:
notifyBreachingUser?: booleanremoved
TrueFoundryAgentUserMessage — discriminator renamed:
// before: role: "user"
// after: type: "user.message"IdentityProviderBackedIdentity — literal value changed:
// before: type: "idp-backed"
// after: type: "identity-provider-backed"Manifests or comparisons using the old literal will fail validation.
IChange.type — type reference changed:
TrueFoundry.IChangeOperation→TrueFoundry.IChangeType
Subject.subjectType — type reference changed:
TrueFoundry.SubjectType→TrueFoundry.SubjectSubjectType
DeploymentBuild.status — type reference changed:
TrueFoundry.BuildStatus→TrueFoundry.DeploymentBuildStatus
Deployment.deploymentBuilds — element type changed:
TrueFoundry.BuildInfo[]→TrueFoundry.DeploymentBuild[]
5. Request parameter type narrowing (compile breaks)
No list/filter fields were removed from public request interfaces, but several union types were narrowed. Code passing a scalar where an array was also allowed will now fail:
| Request type | Field | Before | After |
|---|---|---|---|
ListTeamsRequest, ListClustersRequest, ListWorkspacesRequest, ListAgentsRequest, etc. |
attributes |
string | string[] |
string[] | null |
ListVirtualAccountsRequest |
ownedByTeams |
string | string[] |
string[] | null |
ListRunsJobsRequest |
triggeredBy |
string | string[] |
string[] | null |
ListRunsJobsRequest |
versionNumbers |
number | number[] |
number[] | null |
Example fix: attributes: "id,name" → attributes: ["id", "name"].
6. Widespread nullable widening (~409 fields)
Most response/model/request optional fields changed from T to T | null (e.g. Application.id?: string → string | null, Account.createdAt: Date → Date | null).
This is backward-compatible at runtime (existing code still works) but breaks strict TypeScript consumers that assumed non-null when a field is present. Notable clusters:
- Nearly all entity IDs, timestamps, metadata on
Application,Deployment,User,Secret,Cluster, etc. Record<string, string>env maps →Record<string, string | null> | nullon job/service configs- Error type fields:
HttpError.code,HttpError.detailsnow nullable
7. Error class typing (minor compile impact)
Several error subclasses now declare body: TrueFoundry.HttpError explicitly (ConflictError, ForbiddenError, UnauthorizedError, etc.). Code that typed catch blocks against a wider/narrower body shape may need adjustment.
8. Client init / docs (soft break)
README now shows:
new TrueFoundryClient({ baseUrl: "...", apiKey: "..." })instead of environment. Both baseUrl and environment still exist on BaseClientOptions; environment is still required in the type signature. This is a documentation preference change, not a runtime removal — but copy-paste from README will differ from older code.
9. What is not breaking (for context)
- New APIs only:
client.gatewayBudgets.*,client.agents.{getToken,createToken,regenerateToken},client.personalAccessTokens.createForUser - New optional params:
TrueFoundryApplyRequest.force,DeleteUsersRequest.forceDelete,ListTeamsRequest.includeMembership - No public client methods removed
- List endpoints (
applications.list,users.list,teams.list, etc.) retain their filter fields — only examples were trimmed
Recommended migration checklist
- Global find/replace for the 36 request type renames (or import from regenerated
TrueFoundrynamespace). - Replace
BuildStatus→DeploymentBuildStatus,IChangeOperation→IChangeType,ResourceType→ scoped replacements. - Update
gracePeriodInDays→gracePeriodInMinuteson virtual account token regeneration. - Migrate
GatewayLoggingConfigmanifests fromrules[]to{ when, log, redactWith }. - Update agent message manifests:
role: "user"→type: "user.message". - Update identity manifests:
"idp-backed"→"identity-provider-backed". - Pass arrays instead of comma-separated strings for
attributes,ownedByTeams,triggeredBy,versionNumbers. - Audit code referencing
SubjectType.ExternalIdentityorRoleWithResourceResourceType.SsoBasedIdentity/.ExternalIdentity. - Enable/adjust strict-null handling for response types if using
strictNullChecks.
If you want, I can turn this into a PR comment or a MIGRATION.md draft keyed to your release version.
Note
Medium Risk
Breaking
baseUrlrequirement and widespread renamed request types can break existing SDK consumers at compile time; new budget and auth-related endpoints touch tenant security and spend controls.Overview
Regenerates the TrueFoundry TypeScript SDK from Fern (CLI 5.109.0, generator 3.88.3), aligning the client with the latest API definition and generator behavior.
Breaking client config:
TrueFoundryClientnow requiresbaseUrl(generatorrequireBaseUrl);environmentis optional fallback. README and examples switch fromenvironmenttobaseUrl.New API surface: Adds
client.gatewayBudgets(list, create/update, usage, simulate, get, delete, leaderboard) and a./gatewayBudgetspackage export. Also documents/adds methods such aspersonalAccessTokens.createForUser, agent identity token helpers (getToken,createToken,regenerateToken), andapplysupport for optionalforceplusadditionalBodyParameterson requests.Type and doc churn: Many request/response TypeScript names are renamed (e.g.
UsersListRequest→ListUsersRequest,InternalGetIdFromFqnRequest→GetIdFromFqnInternalRequest). Reference examples drop placeholder optional fields; several endpoint behaviors are clarified in docs (deployments, virtual accounts, secret sync, token grace periods in minutes).Build/tooling:
scripts/rename-to-esm-files.jsnow fixes extensionless relative imports for ESM.pnpm-lock.yamlbumps dev dependencies (vitest, vite, webpack, etc.).Reviewed by Cursor Bugbot for commit be04ef0. Bugbot is set up for automated code reviews on this repo. Configure here.