@tailor-platform/sdk 2.29.0 → 2.29.2

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 (88) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +2 -1
  3. package/agent-skills/tailor/SKILL.md +2 -1
  4. package/dist/aigateway-DsWDjzk4.mjs.map +1 -1
  5. package/dist/application-D8jruzwo.mjs +199 -0
  6. package/dist/application-D8jruzwo.mjs.map +1 -0
  7. package/dist/{application-dalGHdrI.mjs → application-Dm_21z-i.mjs} +1 -1
  8. package/dist/assert-WeXvmG4j.mjs.map +1 -1
  9. package/dist/authconnection-CynFBIv8.mjs.map +1 -1
  10. package/dist/brand-C8nMKhJC.mjs.map +1 -1
  11. package/dist/cli/lib.mjs +1 -1
  12. package/dist/cli/lib.mjs.map +1 -1
  13. package/dist/cli/main.mjs +50 -50
  14. package/dist/cli/main.mjs.map +1 -1
  15. package/dist/completion/zsh-worker.zsh +1 -1
  16. package/dist/configure/index.d.mts +1 -1
  17. package/dist/configure/index.mjs.map +1 -1
  18. package/dist/context-D0QjfxzD.mjs.map +1 -1
  19. package/dist/crashreport-BAG8c7hB.mjs.map +1 -1
  20. package/dist/date-CgP7gMG_.mjs.map +1 -1
  21. package/dist/date-representation-Cr7W7Pn2.mjs.map +1 -1
  22. package/dist/errors-D3qpNHR6.mjs.map +1 -1
  23. package/dist/es-builtins-SfvXRVoG.mjs.map +1 -1
  24. package/dist/field-parse-C41e3UAF.mjs.map +1 -1
  25. package/dist/file-DKBOj5q4.mjs.map +1 -1
  26. package/dist/globals-BCmGX05J.mjs.map +1 -1
  27. package/dist/guards-yDXyKC9F.mjs.map +1 -1
  28. package/dist/iconv-DlFMt2gW.mjs.map +1 -1
  29. package/dist/idp-G_ojPBB5.mjs.map +1 -1
  30. package/dist/interceptor-DQg3cR_9.mjs.map +1 -1
  31. package/dist/kysely/index.mjs.map +1 -1
  32. package/dist/kysely-type-BWMfV301.mjs.map +1 -1
  33. package/dist/logger-DP2BjQ93.mjs.map +1 -1
  34. package/dist/logger-DuaT2zY3.mjs.map +1 -1
  35. package/dist/manager-Bk-7vkwd.mjs.map +1 -1
  36. package/dist/migration-steps-C6F3zNdQ.mjs.map +1 -1
  37. package/dist/multiline-EyzjEwn9.mjs.map +1 -1
  38. package/dist/node-builtins-DYfhPBnz.mjs.map +1 -1
  39. package/dist/package-json-C690ceex.mjs.map +1 -1
  40. package/dist/platform-serialize-DkiTdHOt.mjs.map +1 -1
  41. package/dist/plugin/builtin/enum-constants/index.mjs.map +1 -1
  42. package/dist/plugin/builtin/file-utils/index.mjs.map +1 -1
  43. package/dist/plugin/index.mjs.map +1 -1
  44. package/dist/{register-ts-hook-CkfKqhJT.mjs → register-ts-hook-B5ZbbJwS.mjs} +75 -77
  45. package/dist/register-ts-hook-B5ZbbJwS.mjs.map +1 -0
  46. package/dist/registry-BijIDRVA.mjs.map +1 -1
  47. package/dist/repl-editor-DGJBfIt1.mjs.map +1 -1
  48. package/dist/schema-B6hJQWp6.mjs.map +1 -1
  49. package/dist/secret-file-C9wp_FCX.mjs.map +1 -1
  50. package/dist/secretmanager-vHQoXdQz.mjs.map +1 -1
  51. package/dist/seed/index.mjs.map +1 -1
  52. package/dist/seed-C3P_T_Eh.mjs.map +1 -1
  53. package/dist/service-C_CogLQr.mjs +1 -0
  54. package/dist/service-b1g22NN9.mjs.map +1 -1
  55. package/dist/service-l_tEI8sS.mjs +8 -0
  56. package/dist/service-l_tEI8sS.mjs.map +1 -0
  57. package/dist/service_pb-Bbu2QSIr.mjs.map +1 -1
  58. package/dist/telemetry-Xk7J829P.mjs.map +1 -1
  59. package/dist/type-source--ZNcV8RJ.mjs.map +1 -1
  60. package/dist/types/helpers.d.mts +2 -5
  61. package/dist/user-agent-vdHYF3QL.mjs.map +1 -1
  62. package/dist/utils/test/index.mjs.map +1 -1
  63. package/dist/vitest/environment.mjs.map +1 -1
  64. package/dist/vitest/index.mjs.map +1 -1
  65. package/dist/vitest/mocks/file.d.mts +1 -1
  66. package/dist/vitest/setup.mjs.map +1 -1
  67. package/dist/wait-point-invoker-eiP-IIux.mjs.map +1 -1
  68. package/dist/wait-point-registry-B-ESkTZX.mjs.map +1 -1
  69. package/dist/workflow-Cs9ISw6j.mjs.map +1 -1
  70. package/dist/workspace_resource_pb-CaoM2npP.mjs.map +1 -1
  71. package/docs/cli/application.md +2 -2
  72. package/docs/cli/data.md +2 -0
  73. package/docs/cli/tailordb.md +2 -2
  74. package/docs/configuration.md +4 -2
  75. package/docs/data-clone.md +71 -0
  76. package/docs/migration/v2.md +1 -1
  77. package/docs/quickstart.md +1 -1
  78. package/docs/services/executor.md +1 -1
  79. package/docs/services/{tailordb.md → tailordb/index.md} +4 -4
  80. package/docs/services/{tailordb-migration.md → tailordb/migration.md} +12 -10
  81. package/docs/testing.md +3 -3
  82. package/package.json +8 -8
  83. package/dist/application-rWYDAfNU.mjs +0 -200
  84. package/dist/application-rWYDAfNU.mjs.map +0 -1
  85. package/dist/register-ts-hook-CkfKqhJT.mjs.map +0 -1
  86. package/dist/service-CETr0AKY.mjs +0 -7
  87. package/dist/service-CETr0AKY.mjs.map +0 -1
  88. package/dist/service-DREWLYxD.mjs +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 2.29.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2639](https://github.com/tailor-platform/sdk/pull/2639) [`48377b3`](https://github.com/tailor-platform/sdk/commit/48377b3d8bcdd76f6a55a9c1c9b96430ba9dce30) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency execa to v10.1.1
8
+
9
+ - [#2675](https://github.com/tailor-platform/sdk/pull/2675) [`4c63cf3`](https://github.com/tailor-platform/sdk/commit/4c63cf38d0058cf55d39bc464827adfc04e52a79) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @​politty/zod to v0.5.2
10
+
11
+ - [#2676](https://github.com/tailor-platform/sdk/pull/2676) [`d1479d8`](https://github.com/tailor-platform/sdk/commit/d1479d84cfe2f0d330d12733aa3758ae026d73a3) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @​toiroakr/read-multiline to v0.4.3
12
+
13
+ - [#2677](https://github.com/tailor-platform/sdk/pull/2677) [`5fd1e48`](https://github.com/tailor-platform/sdk/commit/5fd1e48e226aea6b67b5135cb81a30739f3fcc13) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency rolldown to v1.2.14
14
+
15
+ - [#2678](https://github.com/tailor-platform/sdk/pull/2678) [`80d7b54`](https://github.com/tailor-platform/sdk/commit/80d7b548bc9c7c0a2b62ef5df86f1ea6bb7fd35f) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency temporal-polyfill to v1.0.6
16
+
17
+ - [#2663](https://github.com/tailor-platform/sdk/pull/2663) [`587fd77`](https://github.com/tailor-platform/sdk/commit/587fd773bfee3399e4d773646ed669073101eb21) Thanks [@dqn](https://github.com/dqn)! - Report invalid configs and SDK definitions with specific error codes that list each offending field, instead of `UNEXPECTED_ERROR` carrying the raw validation output:
18
+
19
+ - `CONFIG_INVALID`: `tailor.config.ts` fails validation, in its top-level fields, its `plugins` export, or a TailorDB, IdP, Auth, static website, AI Gateway, or secret manager config. Each field is named by its path in the failing export, such as `auth.machineUserAttributes.role` or a `plugins` item's index. Under `--json`, `error.context` carries `file`, `exportName`, and `issues` (`path` and `message` per field), plus `configKey` and `name` for a service.
20
+ - `DEFINITION_INVALID`: a resolver, executor, TailorDB type, HTTP adapter, workflow, or workflow job fails validation. `error.context` carries `kind`, `file`, `exportName`, and `issues`.
21
+ - `OPTIONS_INVALID`: options passed to an SDK function such as `listWorkspaces()` fail validation. The message is unchanged, and `error.context.issues` lists each field.
22
+ - `MIGRATION_FILE_INVALID`: an invalid schema snapshot or migration diff now lists its fields in the same format, with `error.context.issues`.
23
+ - `DEFINITION_EXPORT_INVALID`: a workflow or HTTP adapter is exported under a name, or a workflow job is the default export. A misplaced workflow or job was previously reported with validation errors that did not apply to it.
24
+
25
+ ## 2.29.1
26
+
27
+ ### Patch Changes
28
+
29
+ - [#2653](https://github.com/tailor-platform/sdk/pull/2653) [`98d8d01`](https://github.com/tailor-platform/sdk/commit/98d8d01b8f4ab80a73ec90df6ec4ca29c8ac55d3) Thanks [@toiroakr](https://github.com/toiroakr)! - Move the TailorDB guides under `docs/services/tailordb/`: the service guide is now `docs/services/tailordb/index.md` and the migration guide `docs/services/tailordb/migration.md`. Add a `docs/data-clone.md` guide for `tailor data clone`, and note that `tailor tailordb migration test --data clone` copies TailorDB records only, without the `--copy-files` and `--copy-idp-users` options of `data clone`.
30
+
3
31
  ## 2.29.0
4
32
 
5
33
  ### Minor Changes
package/README.md CHANGED
@@ -66,7 +66,7 @@ into the current project under `.agents/skills` and `.claude/skills`, so rerun
66
66
 
67
67
  | Service | Description |
68
68
  | -------------------------------------------------- | -------------------------------------------- |
69
- | [TailorDB](./docs/services/tailordb.md) | Type-safe database schema definition |
69
+ | [TailorDB](./docs/services/tailordb/index.md) | Type-safe database schema definition |
70
70
  | [Resolver](./docs/services/resolver.md) | Custom GraphQL resolvers with business logic |
71
71
  | [Executor](./docs/services/executor.md) | Event-driven handlers for automation |
72
72
  | [Workflow](./docs/services/workflow.md) | Job orchestration for complex operations |
@@ -78,6 +78,7 @@ into the current project under `.agents/skills` and `.claude/skills`, so rerun
78
78
  ### Guides
79
79
 
80
80
  - [Multi-Environment Configuration](./docs/multi-environment.md) - Deploying one config to multiple workspaces
81
+ - [Cloning Application Data](./docs/data-clone.md) - Copying an application's data from one workspace to another
81
82
  - [Runtime API](./docs/runtime.md) - Typed wrappers for `tailor.iconv`, `tailor.secretmanager`, `tailor.idp`, `tailor.workflow`, `tailor.context`, `tailor.authconnection`, and `tailordb.file`
82
83
  - [Testing Guide](./docs/testing.md) - Unit and E2E testing patterns
83
84
  - [CLI Reference](./docs/cli-reference.md) - Command-line interface documentation
@@ -16,6 +16,7 @@ Use these files as the single source of truth:
16
16
  - `node_modules/@tailor-platform/sdk/README.md`
17
17
  - `node_modules/@tailor-platform/sdk/docs/configuration.md`
18
18
  - `node_modules/@tailor-platform/sdk/docs/services/*.md`
19
+ - `node_modules/@tailor-platform/sdk/docs/services/tailordb/*.md`
19
20
  - `node_modules/@tailor-platform/sdk/docs/cli-reference.md`
20
21
  - `node_modules/@tailor-platform/sdk/docs/cli/*.md`
21
22
  - `node_modules/@tailor-platform/sdk/docs/testing.md`
@@ -36,7 +37,7 @@ Use these files as the single source of truth:
36
37
 
37
38
  - Setup and first deploy: `docs/quickstart.md`
38
39
  - Core config shape: `docs/configuration.md`
39
- - Service details: `docs/services/*.md`
40
+ - Service details: `docs/services/*.md`; TailorDB and its migrations: `docs/services/tailordb/*.md`
40
41
  - CLI commands: `docs/cli-reference.md` and `docs/cli/*.md`
41
42
  - Testing patterns: `docs/testing.md`
42
43
  - Runtime API wrappers (`tailor.iconv`, `tailor.secretmanager`, `tailor.idp`, `tailor.workflow`, `tailor.context`, `tailor.authconnection`, `tailordb.file`): `docs/runtime.md`
@@ -1 +1 @@
1
- {"version":3,"file":"aigateway-DsWDjzk4.mjs","names":["aigateway","args"],"sources":["../src/runtime/aigateway.ts"],"sourcesContent":["/**\n * AI Gateway utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.aigateway` runtime API.\n * At runtime this delegates to `globalThis.tailor.aigateway`. Use `mockAigateway`\n * from `@tailor-platform/sdk/vitest` to mock these calls in unit tests.\n *\n * `name` is narrowed to the AI Gateway names defined via `defineAIGateway()`\n * once `tailor.d.ts` has been generated (via `tailor deploy`/`generate`).\n * @example\n * import { aigateway } from \"@tailor-platform/sdk/runtime\";\n *\n * const { url } = await aigateway.get(\"my-aigateway\");\n */\n\n// Import from the public entry (not `#/configure/types/aigateway-name`) so this d.ts\n// references `@tailor-platform/sdk` externally instead of inlining the registry — the\n// same generated `declare module \"@tailor-platform/sdk\"` that narrows\n// `authconnection.getConnectionToken` then also narrows this entry.\nimport type { AIGatewayName } from \"@tailor-platform/sdk\";\n\n/** Result of {@link TailorAigatewayAPI.get}. */\nexport interface GetAIGatewayResult {\n /** The platform-assigned URL of the AI Gateway. */\n url: string;\n}\n\n/**\n * Platform API surface for `tailor.aigateway`. Describes the shape the\n * platform runtime injects on `globalThis.tailor.aigateway`.\n */\nexport interface TailorAigatewayAPI {\n /**\n * Resolves an AI Gateway defined in the caller's own workspace.\n * @param name - AI Gateway name, as passed to `defineAIGateway()`\n * @returns The resolved AI Gateway's platform-assigned URL\n */\n get(name: AIGatewayName): Promise<GetAIGatewayResult>;\n}\n\nconst api = (): TailorAigatewayAPI =>\n (globalThis as unknown as { tailor: { aigateway: TailorAigatewayAPI } }).tailor.aigateway;\n\nconst get: TailorAigatewayAPI[\"get\"] = (...args) => api().get(...args);\n\n/** Runtime wrapper namespace for `tailor.aigateway`. */\nexport const aigateway = { get } as const satisfies TailorAigatewayAPI;\n"],"mappings":"AAwCA,MAAM,QACH,WAAwE,OAAO,UAKrEA,EAAY,CAAE,KAHa,GAAGC,IAAS,IAAI,CAAC,CAAC,IAAI,GAAGA,CAAI,CAGtC"}
1
+ {"version":3,"file":"aigateway-DsWDjzk4.mjs","names":["aigateway","args"],"sources":["../src/runtime/aigateway.ts"],"sourcesContent":["/**\n * AI Gateway utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.aigateway` runtime API.\n * At runtime this delegates to `globalThis.tailor.aigateway`. Use `mockAigateway`\n * from `@tailor-platform/sdk/vitest` to mock these calls in unit tests.\n *\n * `name` is narrowed to the AI Gateway names defined via `defineAIGateway()`\n * once `tailor.d.ts` has been generated (via `tailor deploy`/`generate`).\n * @example\n * import { aigateway } from \"@tailor-platform/sdk/runtime\";\n *\n * const { url } = await aigateway.get(\"my-aigateway\");\n */\n\n// Import from the public entry (not `#/configure/types/aigateway-name`) so this d.ts\n// references `@tailor-platform/sdk` externally instead of inlining the registry — the\n// same generated `declare module \"@tailor-platform/sdk\"` that narrows\n// `authconnection.getConnectionToken` then also narrows this entry.\nimport type { AIGatewayName } from \"@tailor-platform/sdk\";\n\n/** Result of {@link TailorAigatewayAPI.get}. */\nexport interface GetAIGatewayResult {\n /** The platform-assigned URL of the AI Gateway. */\n url: string;\n}\n\n/**\n * Platform API surface for `tailor.aigateway`. Describes the shape the\n * platform runtime injects on `globalThis.tailor.aigateway`.\n */\nexport interface TailorAigatewayAPI {\n /**\n * Resolves an AI Gateway defined in the caller's own workspace.\n * @param name - AI Gateway name, as passed to `defineAIGateway()`\n * @returns The resolved AI Gateway's platform-assigned URL\n */\n get(name: AIGatewayName): Promise<GetAIGatewayResult>;\n}\n\nconst api = (): TailorAigatewayAPI =>\n (globalThis as unknown as { tailor: { aigateway: TailorAigatewayAPI } }).tailor.aigateway;\n\nconst get: TailorAigatewayAPI[\"get\"] = (...args) => api().get(...args);\n\n/** Runtime wrapper namespace for `tailor.aigateway`. */\nexport const aigateway = { get } as const satisfies TailorAigatewayAPI;\n"],"mappings":"AAwCA,MAAM,QACH,WAAwE,OAAO,UAKrEA,EAAY,CAAE,KAHa,GAAGC,IAAS,IAAI,CAAC,CAAC,IAAI,GAAGA,CAAI,CAGtC,E"}