Releases: tailor-platform/sdk
@tailor-platform/sdk@1.50.1
@tailor-platform/create-sdk@1.50.1
Merge pull request #1227 from tailor-platform/changeset-release/main Version Packages
@tailor-platform/sdk@1.50.0
Minor Changes
-
#1223
c2f078dThanks @toiroakr! - Improvetailordb migrationhandling of data-loss-possible changes:- Removed fields (
field_removed) and removed types (type_removed) are now reported as warnings duringtailordb migration generate, not silent changes. They are no longer dropped beforemigrate.tsruns: the field/type stays available during the Pre-migration phase so that scripts can read it (e.g.innerJointhrough a foreign key that is being dropped in the same migration), then the physical drop happens in the Post-migration phase. - Add
tailordb migration script <number>subcommand to add amigrate.ts(anddb.ts) template to an existing migration directory. Useful for warning-tier changes where you want a custom data migration even though one was not generated automatically. migrate.tsis now executed whenever the file exists on disk for a pending migration, regardless of whether the diff originally required a script. Breaking changes still hard-require a script as before.
- Removed fields (
Patch Changes
-
#1194
4c227ccThanks @toiroakr! - Colocatesrc/vitest/tests next to their sources (drop the
src/vitest/__tests__/directory). Vitest discovers the test files
via the existing**/?(*.)+(spec|test).tsinclude pattern, so the
**/__tests__/**/*.tsentry has been removed fromvitest.config.ts.
The nested integration runner moves from
src/vitest/__tests__/integration/tosrc/vitest/integration/. Pure
refactor: no public API or behavior changes. -
#1207
c0b392dThanks @toiroakr! - Fixtailor deployso an intermediate migration's data script can still read fields that a later migration removes. Each migration's pre/post phase now submits the schema state reconstructed up to that migration (initial baseline + diffs through N), instead of the FINAL post-all-migrations schema. Previously, removals declared in later migrations leaked into earlier migrations' pre-phase and causedfield 'X' not foundfailures at script execution time. -
#1208
59d7e0eThanks @toiroakr! - fix(skills): rename bundled skill directory toagent-skills/sogh skill install tailor-platform/sdkresolves a single skill.gh skilluses a recursive**/skills/*/SKILL.mdmatch and was picking up bothskills/tailor-sdk/(the public mirror) andpackages/sdk/skills/tailor-sdk/(the npm bundle), erroring with conflicting names. The bundled copy is now underpackages/sdk/agent-skills/(excluded from gh's match), while the repo-rootskills/mirror remains the single discovery target forgh skill installandnpx skills add <repo>.npx tailor-sdk skills installcontinues to work via the bundledagent-skills/path inside the published package. -
#1217
b827cf9Thanks @renovate! - fix(deps): update dependency @toiroakr/read-multiline to v0.4.1 -
#1184
dee2ad7Thanks @toiroakr! - Fixtailor deployso decimal fields without an explicitscaleno longer show spurious drift against the platform (which materializes the default6). Deploy now plans and applies through the same snapshot pipeline astailordb migrate.
@tailor-platform/sdk@1.49.0
Minor Changes
-
#1147
f0de80aThanks @dqn! - Add--permission <write|read>flag toprofile create,profile update, andworkspace create(when--profile-nameis given) so editor users can use a viewer-style profile by default. Profiles created with--permission readblock platform-state mutations driven by the operator's bearer token (apply,remove,workspace create/delete/restore,secret create/update/delete,tailordb migrate set,tailordb truncate,tailordb erd deploy,executor trigger,staticwebsite deploy,authconnection authorize/revoke, organization / folder / PAT / workspace-user mutations, and directapi <endpoint>calls) with aPROFILE_READONLYerror. Application-data operations executed under a machine user (query,workflow start/resume,function test-run) are not gated because the machine user's own permissions already govern those mutations. Switch profile or runprofile update <name> --permission writeto lift the restriction. Profile management itself stays available so the flag can always be cleared.profile updateskips remote user / workspace validation when only--permissionis changing, so the flag can be cleared offline or with an expired token.The guard activates only when a profile is in scope: pass
--profile <name>or setTAILOR_PLATFORM_PROFILE.TAILOR_PLATFORM_TOKENand--workspace-iddirect access bypass the guard by design; they are intended for machine-user / CI flows where the platform token already encodes the permitted scope.
Patch Changes
-
#1204
6b1bbcbThanks @renovate! - fix(deps): update dependency rolldown to v1.0.1 -
#1196
c9b7d1eThanks @dqn! - Eliminate the Node.jsDEP0205DeprecationWarning(`module.register()` is deprecated. Use `module.registerHooks()` instead.) printed by everytailor-sdkCLI invocation on Node v26. The CLI now registerstsxthrough its own programmatic API (tsx/esm/api) instead of callingnode:module'sregister("tsx", …)directly, which on tsx 4.21.1+ routes throughmodule.registerHooks()on Node ≥ 24.11.1 / 25.1 / 26 and falls back tomodule.register()on older runtimes. Bumps the bundledtsxfrom 4.21.0 to 4.21.1. -
#1179
f72ffe1Thanks @toiroakr! - Fixtailor-sdk deploy --no-schema-checkto reconcile the TailorDB migration label to the working tree's latest migration number when it completes. Previously, runningdeploy --no-schema-checkfrom a revision whose working tree is older than the remote left the remote migration label stale; the nextdeploythen reconstructed a snapshot at a label that no longer existed in the working tree and aborted with a false "Remote schema drift detected" error.
@tailor-platform/create-sdk@1.50.0
Merge pull request #1224 from tailor-platform/changeset-release/main Version Packages
@tailor-platform/create-sdk@1.49.0
Merge pull request #1206 from tailor-platform/changeset-release/main Version Packages
@tailor-platform/sdk@1.48.0
Minor Changes
-
#1118
5ef8e01Thanks @toiroakr! - Detect app renames via a stable, auto-injectedidfield intailor.config.ts.The SDK now writes a generated
id: "<uuid>"field into the
defineConfig({...})call on firstdeploy, and stamps every managed
resource with ansdk-app-idmetadata label. Subsequent deploys identify
ownership by the stable id rather than by the app name, so renaming the
app (or any of its resources) cleanly removes the old resources before
creating the new ones. The id is a plain UUID; the SDK adds the
label-compatibleapp-prefix internally at the metadata boundary.Deleting the
idfield regenerates a new UUID on the nextdeploy—
typically done after copyingtailor.config.tsfrom another project so
the new application does not share the original's id. Existing
resources keep their data and are re-tagged in place;deployshows a
dedicated confirmation prompt for this case ("Application id was
regenerated for ..."), separate from the rename/transfer confirmation.If your
tailor.config.tsis a wrapper that re-exportsdefineConfigfrom
another file, the SDK skips id injection on the wrapper — add theid
field manually to the file that contains the actualdefineConfig({...})
call. Existing deployments without the id continue to work and migrate
transparently on the nextdeployrun. -
#1156
4311e05Thanks @toiroakr! - AdddisableIdpUserSyncoption toseedPluginfor opting out of the
_User <-> userProfileforeign keys emitted into the generated seed schema.The seed plugin emits two foreign keys when
auth.userProfileis configured
so thatvalidaterejects rows on either side that lack a matching
counterpart:_User.name → <userProfile>.<usernameField>(idpToUser)<userProfile>.<usernameField> → _User.name(userToIdp)
Both are emitted by default, matching the previous behavior. Neither
direction is enforced by the runtime, so it can be useful to relax one when
seeding asymmetric production-like states such as
invited-but-not-registered users.// Allow seeding invited userProfile rows without a _User row seedPlugin({ distPath: "./seed", disableIdpUserSync: { userToIdp: true }, }), // Allow seeding _User rows whose userProfile row does not exist yet seedPlugin({ distPath: "./seed", disableIdpUserSync: { idpToUser: true }, }),
Patch Changes
-
#1189
7bcd9c1Thanks @toiroakr! - Improve tree-shaking of@tailor-platform/sdkso applications that only import a subset of the public API ship less unused code:- Add a selective
sideEffectsallow-list topackage.json: onlydist/cli/*.mjsanddist/vitest/setup.mjsretain side effects, the rest ofdist/is marked side-effect-free so bundlers can drop modules whose only imports are unused. - Replace the top-level
export const t = { ..._t }spread inconfigure/index.tswith a direct alias, eliminating a side-effecting object construction that prevented elimination of unused field builders. - Annotate configure-layer factories (
defineConfig,defineAuth,defineIdp,defineStaticWebSite,definePlugins,createResolver,createExecutor,createWorkflow,createWorkflowJob, etc.) with@__NO_SIDE_EFFECTS__so calls whose return values are unused can be eliminated.
No public API surface changes.
- Add a selective
-
#1180
3411070Thanks @renovate! - fix(deps): update @InQuirer -
#1191
a20354dThanks @dqn! - Security: Harden permissions of the CLI config file (~/.config/tailor-platform/config.yaml) and local crash reports to0o600, with their parent directory at0o700. Previously these files inherited the user'sumask(typically0o644), so on multi-user hosts or shared CI volumes other accounts could read access/refresh tokens stored in the config when the OS keyring is unavailable, as well as crash payloads.Action recommended: If you have used the CLI on a multi-user host or in a shared CI environment, upgrade and run any
tailor-sdkcommand once to auto-tighten existing files, or manually:chmod 700 ~/.config/tailor-platform chmod 600 ~/.config/tailor-platform/config.yaml
POSIX-only; on Windows the mode bits are best-effort and ACLs continue to govern access.
@tailor-platform/sdk-codemod@0.2.0
Minor Changes
-
#1104
3c1571cThanks @dqn! - Add three v2 codemods that the upgrade runner can apply when migrating across the 1.x → 2.x boundary:v2/test-run-arg-inputstrips the deprecated{ "input": ... }wrapper fromtailor-sdk function test-run --argJSON insidepackage.jsonscripts, shell scripts, and Markdown code blocks.v2/sdk-skills-shimrewritestailor-sdk-skillsinvocations totailor-sdk skills installacrosspackage.json, shell, YAML, and Markdown files.v2/principal-unifyrenamesTailorUser/TailorActor/TailorInvokerto the unifiedTailorPrincipal, dropsunauthenticatedTailorUser(replacing standalone value references withnull; member-access forms are left as-is so the resulting type error points authors at sites that need manual review), and renamesusertocallerinsidecreateResolverbody parameters and member accesses.v2/apply-to-deployrewritestailor-sdk applyinvocations inpackage.jsonscripts, shell scripts, CI YAML, and Markdown to the v2-recommendedtailor-sdk deployalias. Optional@versionpins (tailor-sdk@latest,tailor-sdk@1.45.2) are preserved.v2/cli-renamerewritestailor-sdk crash-reportinvocations to the v2 single-wordtailor-sdk crashreportform acrosspackage.jsonscripts, shell scripts, CI YAML, and Markdown. Optional@versionpins are preserved.v2/auth-invoker-unwrapreplacesauth.invoker("name")calls with the bare"name"string literal and drops theauthimport when it has no other reference. Calls whose argument is not a literal string (auth.invoker(variable), template literals) are left untouched so the author can decide.
Patch Changes
@tailor-platform/create-sdk@1.48.0
Merge pull request #1203 from tailor-platform/changeset-release/main Version Packages
@tailor-platform/sdk@1.47.1
Patch Changes
-
#1176
5abed20Thanks @toiroakr! - Declareundicias a direct dependency. The SDK CLI importsgetGlobalDispatcherfromundici, but the package was previously available only through accidental hoisting of a transitive dependency. Strict node_modules layouts (e.g. pnpm 11 with stricter hoisting) would fail to resolve the import; declaring it directly fixes that. -
#1172
7f37a07Thanks @toiroakr! - WidenTailorEnvfallback toRecord<string, string | number | boolean>so it matches the values the type generator emits (string literal / number / boolean). Previously the fallback wasRecord<string, string>, which rejected number and boolean env values untiltailor.d.tswas generated. -
#1161
3e835c5Thanks @renovate! - fix(deps): update rolldown -
#1165
f4ff7bdThanks @toiroakr! - Fix a type/runtime mismatch where callingworkflowJob.trigger()withoutawaitreturned a raw value at runtime even though the static type isPromise<Awaited<Output>>. The bundler now wraps.trigger()in an async IIFE ((async () => tailor.workflow.triggerJobFunction("...", args))()), so the returned value is always aPromise(including for.then()chains), synchronous throws from the platform surface as Promise rejections, and the platform's synchronous suspend semantics are preserved (the call site runs to completion before subsequent statements).