@tailor-platform/sdk 1.48.0 → 1.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +1 -1
  3. package/dist/{application-DUENhx4Y.mjs → application-CZMzt9jL.mjs} +3 -2
  4. package/dist/application-CZMzt9jL.mjs.map +1 -0
  5. package/dist/application-v_E2W-Fz.mjs +4 -0
  6. package/dist/brand-D-d15jx3.mjs.map +1 -1
  7. package/dist/cli/index.mjs +137 -25
  8. package/dist/cli/index.mjs.map +1 -1
  9. package/dist/cli/lib.d.mts +1409 -1373
  10. package/dist/cli/lib.mjs +4 -4
  11. package/dist/cli/lib.mjs.map +1 -1
  12. package/dist/cli/skills.mjs.map +1 -1
  13. package/dist/client-_kHh0Pip.mjs.map +1 -1
  14. package/dist/configure/index.mjs.map +1 -1
  15. package/dist/crashreport-CvmdFs4i.mjs.map +1 -1
  16. package/dist/enum-constants-C3KSpsYj.mjs.map +1 -1
  17. package/dist/errors-pMPXghkO.mjs.map +1 -1
  18. package/dist/field-DLSIuMTu.mjs.map +1 -1
  19. package/dist/file-utils-DjNi_3U_.mjs.map +1 -1
  20. package/dist/interceptor-DTNS0EtF.mjs.map +1 -1
  21. package/dist/job-M3Avv_SV.mjs.map +1 -1
  22. package/dist/kysely/index.mjs.map +1 -1
  23. package/dist/kysely-type-B8aRz_oC.mjs.map +1 -1
  24. package/dist/logger-DTNAMYGy.mjs.map +1 -1
  25. package/dist/mock-BfL09ULZ.mjs.map +1 -1
  26. package/dist/multiline-e3IpANmS.mjs.map +1 -1
  27. package/dist/package-json-6Px8bDpG.mjs.map +1 -1
  28. package/dist/plugin/index.mjs.map +1 -1
  29. package/dist/repl-editor-jZ493eQI.mjs.map +1 -1
  30. package/dist/{runtime-CNg0w27y.mjs → runtime-B2K6JW7V.mjs} +543 -164
  31. package/dist/runtime-B2K6JW7V.mjs.map +1 -0
  32. package/dist/schema-C5QjYEc-.mjs.map +1 -1
  33. package/dist/secret-file-BHpxGyNf.mjs.map +1 -1
  34. package/dist/seed/index.mjs.map +1 -1
  35. package/dist/seed-DjfAn0BC.mjs.map +1 -1
  36. package/dist/service-DCgJxdg1.mjs.map +1 -1
  37. package/dist/telemetry-C1Y56L5E.mjs.map +1 -1
  38. package/dist/types-sir9UPht.mjs.map +1 -1
  39. package/dist/utils/test/index.mjs.map +1 -1
  40. package/dist/vitest/environment.mjs.map +1 -1
  41. package/dist/vitest/index.mjs.map +1 -1
  42. package/dist/vitest/setup.mjs.map +1 -1
  43. package/docs/cli/tailordb.md +50 -0
  44. package/docs/cli/workspace.md +20 -17
  45. package/docs/cli-reference.md +1 -0
  46. package/docs/services/tailordb-migration.md +49 -31
  47. package/package.json +8 -8
  48. package/dist/application-BNkNt47b.mjs +0 -4
  49. package/dist/application-DUENhx4Y.mjs.map +0 -1
  50. package/dist/runtime-CNg0w27y.mjs.map +0 -1
  51. /package/{skills → agent-skills}/tailor-sdk/SKILL.md +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 1.50.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1223](https://github.com/tailor-platform/sdk/pull/1223) [`c2f078d`](https://github.com/tailor-platform/sdk/commit/c2f078d6fb82d42bcc8c040e020b34072a2d2eb6) Thanks [@toiroakr](https://github.com/toiroakr)! - Improve `tailordb migration` handling of data-loss-possible changes:
8
+
9
+ - Removed fields (`field_removed`) and removed types (`type_removed`) are now reported as **warnings** during `tailordb migration generate`, not silent changes. They are no longer dropped before `migrate.ts` runs: the field/type stays available during the Pre-migration phase so that scripts can read it (e.g. `innerJoin` through a foreign key that is being dropped in the same migration), then the physical drop happens in the Post-migration phase.
10
+ - Add `tailordb migration script <number>` subcommand to add a `migrate.ts` (and `db.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.
11
+ - `migrate.ts` is 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.
12
+
13
+ ### Patch Changes
14
+
15
+ - [#1194](https://github.com/tailor-platform/sdk/pull/1194) [`4c227cc`](https://github.com/tailor-platform/sdk/commit/4c227cc404e51331c0514b0aaa07d96d8940c347) Thanks [@toiroakr](https://github.com/toiroakr)! - Colocate `src/vitest/` tests next to their sources (drop the
16
+ `src/vitest/__tests__/` directory). Vitest discovers the test files
17
+ via the existing `**/?(*.)+(spec|test).ts` include pattern, so the
18
+ `**/__tests__/**/*.ts` entry has been removed from `vitest.config.ts`.
19
+ The nested integration runner moves from
20
+ `src/vitest/__tests__/integration/` to `src/vitest/integration/`. Pure
21
+ refactor: no public API or behavior changes.
22
+
23
+ - [#1207](https://github.com/tailor-platform/sdk/pull/1207) [`c0b392d`](https://github.com/tailor-platform/sdk/commit/c0b392d95f81bcb2a4bfd9e856183222da87ef06) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix `tailor deploy` so 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 caused `field 'X' not found` failures at script execution time.
24
+
25
+ - [#1208](https://github.com/tailor-platform/sdk/pull/1208) [`59d7e0e`](https://github.com/tailor-platform/sdk/commit/59d7e0e7c1b42dcd1571365780114d596e44350c) Thanks [@toiroakr](https://github.com/toiroakr)! - fix(skills): rename bundled skill directory to `agent-skills/` so `gh skill install tailor-platform/sdk` resolves a single skill. `gh skill` uses a recursive `**/skills/*/SKILL.md` match and was picking up both `skills/tailor-sdk/` (the public mirror) and `packages/sdk/skills/tailor-sdk/` (the npm bundle), erroring with conflicting names. The bundled copy is now under `packages/sdk/agent-skills/` (excluded from gh's match), while the repo-root `skills/` mirror remains the single discovery target for `gh skill install` and `npx skills add <repo>`. `npx tailor-sdk skills install` continues to work via the bundled `agent-skills/` path inside the published package.
26
+
27
+ - [#1217](https://github.com/tailor-platform/sdk/pull/1217) [`b827cf9`](https://github.com/tailor-platform/sdk/commit/b827cf95c0c048959c269f7ed9a31fdc81a5eb13) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @toiroakr/read-multiline to v0.4.1
28
+
29
+ - [#1184](https://github.com/tailor-platform/sdk/pull/1184) [`dee2ad7`](https://github.com/tailor-platform/sdk/commit/dee2ad7199b2da238b7e9edea2d9bb9605033456) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix `tailor deploy` so decimal fields without an explicit `scale` no longer show spurious drift against the platform (which materializes the default `6`). Deploy now plans and applies through the same snapshot pipeline as `tailordb migrate`.
30
+
31
+ ## 1.49.0
32
+
33
+ ### Minor Changes
34
+
35
+ - [#1147](https://github.com/tailor-platform/sdk/pull/1147) [`f0de80a`](https://github.com/tailor-platform/sdk/commit/f0de80ac83a3e76bcb65be7957cb3d7bd1f80ec1) Thanks [@dqn](https://github.com/dqn)! - Add `--permission <write|read>` flag to `profile create`, `profile update`, and `workspace create` (when `--profile-name` is given) so editor users can use a viewer-style profile by default. Profiles created with `--permission read` block 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 direct `api <endpoint>` calls) with a `PROFILE_READONLY` error. 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 run `profile update <name> --permission write` to lift the restriction. Profile management itself stays available so the flag can always be cleared. `profile update` skips remote user / workspace validation when only `--permission` is changing, so the flag can be cleared offline or with an expired token.
36
+
37
+ The guard activates only when a profile is in scope: pass `--profile <name>` or set `TAILOR_PLATFORM_PROFILE`. `TAILOR_PLATFORM_TOKEN` and `--workspace-id` direct access bypass the guard by design; they are intended for machine-user / CI flows where the platform token already encodes the permitted scope.
38
+
39
+ ### Patch Changes
40
+
41
+ - [#1204](https://github.com/tailor-platform/sdk/pull/1204) [`6b1bbcb`](https://github.com/tailor-platform/sdk/commit/6b1bbcbe843340a912a3c75c2ecdb03c5697f967) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency rolldown to v1.0.1
42
+
43
+ - [#1196](https://github.com/tailor-platform/sdk/pull/1196) [`c9b7d1e`](https://github.com/tailor-platform/sdk/commit/c9b7d1eae8a3cccf70191bd8c228cd11db6ed060) Thanks [@dqn](https://github.com/dqn)! - Eliminate the Node.js `DEP0205` `DeprecationWarning` (`` `module.register()` is deprecated. Use `module.registerHooks()` instead. ``) printed by every `tailor-sdk` CLI invocation on Node v26. The CLI now registers `tsx` through its own programmatic API (`tsx/esm/api`) instead of calling `node:module`'s `register("tsx", …)` directly, which on tsx 4.21.1+ routes through `module.registerHooks()` on Node ≥ 24.11.1 / 25.1 / 26 and falls back to `module.register()` on older runtimes. Bumps the bundled `tsx` from 4.21.0 to 4.21.1.
44
+
45
+ - [#1179](https://github.com/tailor-platform/sdk/pull/1179) [`f72ffe1`](https://github.com/tailor-platform/sdk/commit/f72ffe1aed824eb9af5e7520529c3ebde029b5a6) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix `tailor-sdk deploy --no-schema-check` to reconcile the TailorDB migration label to the working tree's latest migration number when it completes. Previously, running `deploy --no-schema-check` from a revision whose working tree is older than the remote left the remote migration label stale; the next `deploy` then reconstructed a snapshot at a label that no longer existed in the working tree and aborted with a false "Remote schema drift detected" error.
46
+
3
47
  ## 1.48.0
4
48
 
5
49
  ### Minor Changes
package/README.md CHANGED
@@ -60,7 +60,7 @@ npx tailor-sdk skills install -a codex -y
60
60
  ```
61
61
 
62
62
  This uses the `skills` CLI under the hood, sourcing the skill from
63
- `node_modules/@tailor-platform/sdk/skills` so the skill version always matches
63
+ `node_modules/@tailor-platform/sdk/agent-skills` so the skill version always matches
64
64
  the installed SDK version. Files are copied (not symlinked) so they survive
65
65
  `pnpm install` wiping `node_modules`.
66
66
 
@@ -198,7 +198,8 @@ async function deleteKeyringTokens(account) {
198
198
  //#region src/cli/shared/context.ts
199
199
  const pfProfileSchema = z.object({
200
200
  user: z.string(),
201
- workspace_id: z.string()
201
+ workspace_id: z.string(),
202
+ readonly: z.boolean().optional()
202
203
  });
203
204
  const pfUserSchemaV1 = z.object({
204
205
  access_token: z.string(),
@@ -5344,4 +5345,4 @@ async function loadApplication(params) {
5344
5345
 
5345
5346
  //#endregion
5346
5347
  export { loadConfigPath as C, saveUserTokens as D, resolveTokens as E, writePlatformConfig as O, loadAccessToken as S, readPlatformConfig as T, getDistDir as _, WorkflowJobSchema as a, deleteUserTokens as b, ExecutorSchema as c, buildResolverOperationHookExpr as d, OAuth2ClientSchema as f, createBundleCache as g, loadFilesWithIgnores as h, resolveInlineSourcemap as i, INVOKER_EXPR as l, stringifyFunction as m, generatePluginFilesIfNeeded as n, ResolverSchema as o, TailorDBTypeSchema as p, loadApplication as r, createExecutorService as s, defineApplication as t, buildExecutorArgsExpr as u, hashFile as v, loadWorkspaceId as w, fetchLatestToken as x, loadConfig as y };
5347
- //# sourceMappingURL=application-DUENhx4Y.mjs.map
5348
+ //# sourceMappingURL=application-CZMzt9jL.mjs.map