@tailor-platform/sdk 2.37.0 → 2.39.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 (113) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/dist/{application-83WVdH85.mjs → application-OeNMQzOC.mjs} +1 -1
  3. package/dist/application-mNOJx9Y2.mjs +207 -0
  4. package/dist/application-mNOJx9Y2.mjs.map +1 -0
  5. package/dist/cli/commands/deploy/deploy.d.mts +1 -0
  6. package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +2 -0
  7. package/dist/cli/commands/executor/trigger.d.mts +1 -0
  8. package/dist/cli/commands/generate/seed/bundler.d.mts +7 -5
  9. package/dist/cli/commands/workspace/transform.d.mts +1 -2
  10. package/dist/cli/lib.d.mts +5 -3
  11. package/dist/cli/lib.mjs +1 -1
  12. package/dist/cli/lib.mjs.map +1 -1
  13. package/dist/cli/main.mjs +67 -61
  14. package/dist/cli/main.mjs.map +1 -1
  15. package/dist/cli/shared/args.d.mts +14 -5
  16. package/dist/cli/shared/build-options.d.mts +13 -0
  17. package/dist/cli/shared/client.d.mts +15 -3
  18. package/dist/cli/shared/error-json.d.mts +12 -26
  19. package/dist/cli/shared/script-workflow.d.mts +65 -0
  20. package/dist/cli/shared/seed-chunker.d.mts +3 -3
  21. package/dist/client-CqiPQgMG.mjs +2 -0
  22. package/dist/client-CqiPQgMG.mjs.map +1 -0
  23. package/dist/client-DO2_Xz_z.mjs +1 -0
  24. package/dist/completion/zsh-worker.zsh +193 -74
  25. package/dist/configure/index.mjs +1 -1
  26. package/dist/configure/index.mjs.map +1 -1
  27. package/dist/configure/services/auth/types.d.mts +20 -3
  28. package/dist/configure/services/executor/operation.d.mts +5 -4
  29. package/dist/configure/services/executor/trigger/webhook.d.mts +8 -1
  30. package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -1
  31. package/dist/configure/services/index.d.mts +0 -1
  32. package/dist/configure/services/tailordb/types.d.mts +9 -0
  33. package/dist/context-CYBcQZyO.mjs +1 -0
  34. package/dist/context-aAgFGDBD.mjs +23 -0
  35. package/dist/context-aAgFGDBD.mjs.map +1 -0
  36. package/dist/{crashreport-D_wf4GZh.mjs → crashreport-CQTAlnbA.mjs} +2 -2
  37. package/dist/{crashreport-D_wf4GZh.mjs.map → crashreport-CQTAlnbA.mjs.map} +1 -1
  38. package/dist/crashreport-GRnWyDnF.mjs +1 -0
  39. package/dist/{errors-Dmdnq0zi.mjs → errors-9OOL3xOM.mjs} +6 -5
  40. package/dist/errors-9OOL3xOM.mjs.map +1 -0
  41. package/dist/field_behavior_pb-B196sUx6.mjs +2 -0
  42. package/dist/field_behavior_pb-B196sUx6.mjs.map +1 -0
  43. package/dist/{kysely-type-DVL90_oX.mjs → kysely-type-DhAZqdQg.mjs} +14 -10
  44. package/dist/kysely-type-DhAZqdQg.mjs.map +1 -0
  45. package/dist/notification_resource_pb-BZ0hCA01.mjs +1 -0
  46. package/dist/notification_resource_pb-Dwzah7gO.mjs +2 -0
  47. package/dist/notification_resource_pb-Dwzah7gO.mjs.map +1 -0
  48. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  49. package/dist/register-ts-hook-CORbtrSN.mjs +1105 -0
  50. package/dist/register-ts-hook-CORbtrSN.mjs.map +1 -0
  51. package/dist/repl-editor-Bposemei.mjs +2 -0
  52. package/dist/repl-editor-Bposemei.mjs.map +1 -0
  53. package/dist/resource_pb-elY668ZB.mjs +2 -0
  54. package/dist/resource_pb-elY668ZB.mjs.map +1 -0
  55. package/dist/{secret-file-DiuEcLFP.mjs → secret-file-CSXzcg4c.mjs} +2 -2
  56. package/dist/{secret-file-DiuEcLFP.mjs.map → secret-file-CSXzcg4c.mjs.map} +1 -1
  57. package/dist/service-B2vx6CGM.mjs +2 -0
  58. package/dist/{service-DDrbdyd-.mjs.map → service-B2vx6CGM.mjs.map} +1 -1
  59. package/dist/service-Bkz_TB5v.mjs +9 -0
  60. package/dist/service-Bkz_TB5v.mjs.map +1 -0
  61. package/dist/service-Dffd4how.mjs +1 -0
  62. package/dist/service_pb-Bethc2NW.mjs +1 -0
  63. package/dist/service_pb-CfpSriCy.mjs +2 -0
  64. package/dist/service_pb-CfpSriCy.mjs.map +1 -0
  65. package/dist/syntax-diagnostic-BQgOV8Fz.mjs +2 -0
  66. package/dist/syntax-diagnostic-BQgOV8Fz.mjs.map +1 -0
  67. package/dist/validation-errors-ChvCG6wT.mjs +3 -0
  68. package/dist/validation-errors-ChvCG6wT.mjs.map +1 -0
  69. package/{LICENSE → dist/vendor/graphql/LICENSE} +6 -6
  70. package/dist/vendor/graphql/language/KindTypeMap.d.mts +3 -0
  71. package/dist/vendor/graphql/language/ast.d.mts +784 -0
  72. package/dist/vendor/graphql/language/kinds_.d.mts +203 -0
  73. package/dist/vendor/graphql/language/source.d.mts +46 -0
  74. package/dist/vendor/graphql/language/tokenKind.d.mts +35 -0
  75. package/dist/vitest/index.mjs +1 -1
  76. package/dist/vitest/index.mjs.map +1 -1
  77. package/dist/workspace_resource_pb-Cow7mrJY.mjs +2 -0
  78. package/dist/workspace_resource_pb-Cow7mrJY.mjs.map +1 -0
  79. package/docs/cli/application.md +16 -12
  80. package/docs/cli/executor.md +13 -17
  81. package/docs/cli/function.md +1 -1
  82. package/docs/cli/notification.md +128 -0
  83. package/docs/cli/tailordb.md +26 -57
  84. package/docs/cli/workspace.md +3 -4
  85. package/docs/cli-reference.md +228 -48
  86. package/docs/configuration.md +28 -0
  87. package/docs/github-actions.md +241 -38
  88. package/docs/migration/v2.md +5 -3
  89. package/docs/services/auth.md +5 -0
  90. package/docs/services/executor.md +2 -0
  91. package/docs/services/tailordb/index.md +6 -2
  92. package/docs/services/tailordb/migration.md +54 -57
  93. package/docs/testing.md +0 -1
  94. package/package.json +25 -21
  95. package/dist/application-Cida-j1g.mjs +0 -207
  96. package/dist/application-Cida-j1g.mjs.map +0 -1
  97. package/dist/configure/services/http-adapter/index.d.mts +0 -2
  98. package/dist/crashreport-C2AcQNTe.mjs +0 -1
  99. package/dist/errors-Dmdnq0zi.mjs.map +0 -1
  100. package/dist/kysely-type-DVL90_oX.mjs.map +0 -1
  101. package/dist/register-ts-hook-Ht4zCseV.mjs +0 -1115
  102. package/dist/register-ts-hook-Ht4zCseV.mjs.map +0 -1
  103. package/dist/repl-editor-DkrCZmmg.mjs +0 -2
  104. package/dist/repl-editor-DkrCZmmg.mjs.map +0 -1
  105. package/dist/service-CZ0EdD2-.mjs +0 -10
  106. package/dist/service-CZ0EdD2-.mjs.map +0 -1
  107. package/dist/service-DDrbdyd-.mjs +0 -2
  108. package/dist/service-WhSyhaho.mjs +0 -1
  109. package/dist/service_pb-BMHhVot2.mjs +0 -1
  110. package/dist/service_pb-BxMSK0gg.mjs +0 -2
  111. package/dist/service_pb-BxMSK0gg.mjs.map +0 -1
  112. package/dist/workspace_resource_pb-7smKERdZ.mjs +0 -2
  113. package/dist/workspace_resource_pb-7smKERdZ.mjs.map +0 -1
@@ -42,9 +42,9 @@ tailor generate [options]
42
42
 
43
43
  **Options**
44
44
 
45
- | Option | Alias | Description | Required | Default |
46
- | ------------------- | ----- | ----------------------- | -------- | -------------------- |
47
- | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` |
45
+ | Option | Alias | Description | Required | Default | Env |
46
+ | ------------------- | ----- | -------------------------- | -------- | -------------------- | -------------------- |
47
+ | `--config <CONFIG>` | `-c` | Path to Tailor config file | No | `"tailor.config.ts"` | `TAILOR_CONFIG_PATH` |
48
48
 
49
49
  See [Global Options](../cli-reference.md#global-options) for options available to all commands.
50
50
 
@@ -82,7 +82,7 @@ See [Global Options](../cli-reference.md#global-options) for options available t
82
82
 
83
83
  **Notes**
84
84
 
85
- Every workspace belongs to an organization; when none is given or set as a default, interactive runs ask for one and non-interactive runs fail. Workspace creation uses the selected user's default organization and folder set by `user update` when neither location is given and TAILOR_PLATFORM_TOKEN is not set. Giving --organization-id or --folder-id replaces both defaults. Organization and folder IDs loaded by --env-file also replace the defaults; command-line options take precedence, and empty env-file values are ignored. With --create-workspace, an existing workspace must match the resolved name, region, organization, and folder to be reused.
85
+ Every workspace belongs to an organization; when none is given or set as a default, interactive runs ask for one and non-interactive runs fail. Workspace creation uses the selected user's default organization and folder set by `user update` when neither location is given and TAILOR_PLATFORM_TOKEN is not set. Giving --organization-id or --folder-id replaces both defaults. TAILOR_PLATFORM_ORGANIZATION_ID and TAILOR_PLATFORM_FOLDER_ID, including values loaded by --env-file, also replace the defaults; command-line options take precedence, and an empty value of either variable is ignored. With --create-workspace, an existing workspace must match the resolved name, region, organization, and folder to be reused.
86
86
 
87
87
  **JSON result:**
88
88
 
@@ -183,16 +183,20 @@ Names that identify a resource across the whole workspace, such as application,
183
183
 
184
184
  Each config's `files` and `ignores` patterns (see [Service Configuration](../configuration.md#service-configuration)) resolve relative to that config's own directory, not the directory you ran `deploy` from. For example, `apps/buyer/tailor.config.ts` declaring `files: ["db/**/*.ts"]` loads files from `apps/buyer/db/`, independent of where `apps/supplier/tailor.config.ts`'s patterns resolve. If a config's relative patterns match nothing under its own directory, the SDK falls back to the invocation directory and logs a warning (see [Service Configuration](../configuration.md#service-configuration) for details).
185
185
 
186
- **Migration Handling:**
186
+ **Migration Handling (Beta):**
187
187
 
188
- When migrations are configured (`db.tailordb.migration` in config), the `deploy` command automatically:
188
+ When migrations are configured (`db.<namespace>.migration` in config), the `deploy` command:
189
189
 
190
- 1. Detects pending migration scripts that haven't been executed
191
- 2. Applies schema changes in a safe order (pre-migration → script execution → post-migration)
192
- 3. Runs the pending migration scripts
193
- 4. Updates the migration checkpoint so the same migrations are not re-run
190
+ 1. Checks the migration files and the migration state of each namespace (see Schema Check below) three times: while planning, so `--dry-run` reports a failure too; before it applies anything for any config; and again when it applies each config's TailorDB changes. If the migration files, a checkpoint reset, or the tables to delete changed after planning, the deploy stops with `DEPLOY_PLAN_STALE`.
191
+ 2. Resets the checkpoints that the plan showed would be reset to `0000` after a re-baseline, clears an in-progress record that an earlier deploy left on a migration it had already committed, and deletes the tables that a committed migration removed but an earlier deploy did not delete.
192
+ 3. Applies the changes of namespaces without pending migrations, except deletions. This also takes their tables out of a maintenance mode that an interrupted deploy left.
193
+ 4. Puts every namespace with pending migrations into maintenance mode, unless `maintenanceMode` is `false`.
194
+ 5. Runs the pending migrations one namespace at a time, in alphabetical order of the namespace names, and in number order within a namespace. Each migration applies its pre-migration schema, runs its `migrate.ts`, applies its post-migration schema, advances the checkpoint, and then deletes the tables and GraphQL permissions it removed.
195
+ 6. With `--no-schema-check`, applies the local table definitions that the pending migrations do not include (see [Schema verification](../services/tailordb/migration.md#schema-verification)).
196
+ 7. Takes the tables out of maintenance mode, or with `maintenanceMode: "deploy"`, leaves that to the end of the deploy.
197
+ 8. Deletes the remaining tables and GraphQL permissions that are no longer in the config.
194
198
 
195
- See [Automatic Migration Execution](../services/tailordb/migration.md#automatic-migration-execution) for details on automatic migration execution.
199
+ See [Automatic Migration Execution](../services/tailordb/migration.md#automatic-migration-execution) for details on automatic migration execution, and [Several configs in one deploy](../services/tailordb/migration.md#several-configs-in-one-deploy) for the state a failed migration leaves the other configs in.
196
200
 
197
201
  **Concurrent Deploys:**
198
202
 
@@ -207,7 +211,7 @@ By default, `deploy` performs two verification steps:
207
211
 
208
212
  If remote schema drift is detected, the deploy will fail with an error showing the differences. This helps prevent applying migrations to an inconsistent state.
209
213
 
210
- Use `--no-schema-check` to skip both verifications (not recommended for production). It does not skip the check that the remote migration checkpoint is in the local migration history: when the deployed checkpoint is ahead of the local migration files or belongs to another migration history, the deploy stops before changing anything. Pull the latest migration files, or move the checkpoint on purpose with `tailor tailordb migration sync` or `tailor tailordb migration set`, adding `--force` when the checkpoint belongs to another migration history or has a history label that cannot be read, then deploy again.
214
+ Use `--no-schema-check` to skip both verifications (not recommended for production). It does not skip the check that the remote migration checkpoint is in the local migration history: when the deployed checkpoint is ahead of the local migration files or belongs to another migration history, the deploy stops before changing anything. Pull the latest migration files, or move the checkpoint on purpose with `tailor tailordb migration sync`, adding `--force` when the checkpoint belongs to another migration history or has a history label that cannot be read, then deploy again.
211
215
 
212
216
  **Plan Output:**
213
217
 
@@ -172,16 +172,16 @@ tailor executor trigger [options] <executor-name>
172
172
 
173
173
  **Options**
174
174
 
175
- | Option | Alias | Description | Required | Default | Env |
176
- | ------------------------------- | ----- | ---------------------------------------------------------------------------------- | -------- | ------- | ------------------------------ |
177
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
178
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
179
- | `--data <DATA>` | `-d` | Request body (JSON string) | No | - | - |
180
- | `--header <HEADER>` | `-H` | Request header (format: 'Key: Value', can be specified multiple times) | No | - | - |
181
- | `--wait` | `-W` | Wait for job completion and downstream execution (workflow/function) if applicable | No | `false` | - |
182
- | `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
183
- | `--timeout <TIMEOUT>` | `-t` | Maximum time to wait when using --wait (e.g., '30s', '5m') | No | `"5m"` | - |
184
- | `--logs` | `-l` | Display function execution logs after completion (requires --wait) | No | `false` | - |
175
+ | Option | Alias | Description | Required | Default | Env |
176
+ | ------------------------------- | ----- | ------------------------------------------------------------------------------------------------------- | -------- | ------- | ------------------------------ |
177
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
178
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
179
+ | `--data <DATA>` | `-d` | Request body (JSON string) | No | - | - |
180
+ | `--header <HEADER>` | `-H` | Ignored, as the executor receives empty headers (format: 'Key: Value', can be specified multiple times) | No | - | - |
181
+ | `--wait` | `-W` | Wait for job completion and downstream execution (workflow/function) if applicable | No | `false` | - |
182
+ | `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
183
+ | `--timeout <TIMEOUT>` | `-t` | Maximum time to wait when using --wait (e.g., '30s', '5m') | No | `"5m"` | - |
184
+ | `--logs` | `-l` | Display function execution logs after completion (requires --wait) | No | `false` | - |
185
185
 
186
186
  **Examples**
187
187
 
@@ -197,12 +197,6 @@ $ tailor executor trigger my-executor
197
197
  $ tailor executor trigger my-executor -d '{"message": "hello"}'
198
198
  ```
199
199
 
200
- **Trigger with data and headers**
201
-
202
- ```bash
203
- $ tailor executor trigger my-executor -d '{"message": "hello"}' -H "X-Custom: value" -H "X-Another: value2"
204
- ```
205
-
206
200
  **Trigger and wait for completion**
207
201
 
208
202
  ```bash
@@ -271,7 +265,9 @@ if (result.timedOut) {
271
265
  Only executors with `INCOMING_WEBHOOK` or `SCHEDULE` trigger types can be triggered manually.
272
266
  Executors with `EVENT` trigger types (such as `recordCreated`, `recordUpdated`, `recordDeleted`) cannot be triggered manually.
273
267
 
274
- The `--data` and `--header` options are only available for `INCOMING_WEBHOOK` trigger type.
268
+ The `--data` and `--header` options are accepted only for `INCOMING_WEBHOOK` trigger type.
269
+
270
+ The executor receives the `--data` JSON as `body`, with empty `headers` and no `rawBody`. `--header` values are not passed to the executor. To test an executor that reads headers or verifies a signature over `rawBody`, send the request to its webhook URL, which `executor webhook list` shows.
275
271
 
276
272
  **Downstream Execution Tracking**
277
273
 
@@ -172,7 +172,7 @@ tailor function run [options] <file>
172
172
  | `--name <NAME>` | `-n` | Workflow job name to run (matches the `name` field of createWorkflowJob) | No | - | - |
173
173
  | `--arg <ARG>` | `-a` | JSON argument to pass to the function | No | - | - |
174
174
  | `--machine-user <MACHINE_USER>` | `-m` | Machine user name for authentication. Falls back to the active profile's default machine user. | No | - | `TAILOR_PLATFORM_MACHINE_USER_NAME` |
175
- | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | - |
175
+ | `--config <CONFIG>` | `-c` | Path to Tailor config file | No | `"tailor.config.ts"` | `TAILOR_CONFIG_PATH` |
176
176
  | `--allow-schema-drift` | - | Run a scaffolded script even when its schema snapshot no longer matches | No | `false` | - |
177
177
 
178
178
  See [Global Options](../cli-reference.md#global-options) for options available to all commands.
@@ -0,0 +1,128 @@
1
+ ---
2
+ description: "List, read and dismiss the platform notifications sent to you from the tailor CLI."
3
+ ---
4
+
5
+ # Notification Commands
6
+
7
+ Commands for reading the platform notifications addressed to you: alerts you must act on,
8
+ incidents, maintenance notices and announcements. The inbox is per user, so these commands take a
9
+ profile (for its login) but no workspace. Marking a notification read or dismissing it in the CLI
10
+ also changes it in the Console, which shows the same inbox.
11
+
12
+ When no subcommand is provided, defaults to `list`.
13
+
14
+ ## notification
15
+
16
+ Read the platform notifications sent to you.
17
+
18
+ **Usage**
19
+
20
+ ```
21
+ tailor notification [command]
22
+ ```
23
+
24
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
25
+
26
+ **Commands**
27
+
28
+ | Command | Description |
29
+ | ----------------------------------------------- | ---------------------------------------- |
30
+ | [`notification list`](#notification-list) | List the notifications in your inbox. |
31
+ | [`notification read`](#notification-read) | Show a notification and mark it as read. |
32
+ | [`notification dismiss`](#notification-dismiss) | Remove a notification from your inbox. |
33
+
34
+ ### notification dismiss
35
+
36
+ Remove a notification from your inbox.
37
+
38
+ **Usage**
39
+
40
+ ```
41
+ tailor notification dismiss [options] <id>
42
+ ```
43
+
44
+ **Arguments**
45
+
46
+ | Argument | Description | Required |
47
+ | -------- | --------------- | -------- |
48
+ | `id` | Notification ID | Yes |
49
+
50
+ **Options**
51
+
52
+ | Option | Alias | Description | Required | Default | Env |
53
+ | --------------------- | ----- | ----------------- | -------- | ------- | ------------------------- |
54
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
55
+
56
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
57
+
58
+ ### notification list
59
+
60
+ List the notifications in your inbox.
61
+
62
+ **Usage**
63
+
64
+ ```
65
+ tailor notification list [options]
66
+ ```
67
+
68
+ **Options**
69
+
70
+ | Option | Alias | Description | Required | Default | Env |
71
+ | ------------------------------------------- | ----- | --------------------------------------------------------------- | -------- | -------- | ------------------------- |
72
+ | `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` | - |
73
+ | `--limit <LIMIT>` | `-l` | Maximum number of items to return (0: unlimited) | No | `50` | - |
74
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
75
+ | `--category <CATEGORY>` | - | Only this category (alert, incident, maintenance, announcement) | No | - | - |
76
+ | `--severity <SEVERITY>` | - | Only this severity or higher (info, warning, critical) | No | - | - |
77
+ | `--unread` | - | Only unread notifications | No | `false` | - |
78
+ | `--scope-workspace <SCOPE_WORKSPACE>` | - | Only notifications about this workspace ID | No | - | - |
79
+ | `--scope-organization <SCOPE_ORGANIZATION>` | - | Only notifications about this organization ID | No | - | - |
80
+
81
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
82
+
83
+ ### notification read
84
+
85
+ Show a notification and mark it as read.
86
+
87
+ **Usage**
88
+
89
+ ```
90
+ tailor notification read [options] <id>
91
+ ```
92
+
93
+ **Arguments**
94
+
95
+ | Argument | Description | Required |
96
+ | -------- | ---------------------------- | -------- |
97
+ | `id` | Notification ID (repeatable) | Yes |
98
+
99
+ **Options**
100
+
101
+ | Option | Alias | Description | Required | Default | Env |
102
+ | --------------------- | ----- | ------------------------------------------------ | -------- | ------- | ------------------------- |
103
+ | `--no-mark-read` | - | Show the notification without marking it as read | No | `false` | - |
104
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
105
+
106
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
107
+
108
+ **Output (default):**
109
+
110
+ ```
111
+ ┌──────────────────────────────────────┬──────────┬──────────────┬─────────────────────────────────┬─────────────┬────────────┐
112
+ │ id │ severity │ category │ title │ arrivedAt │ readAt │
113
+ ├──────────────────────────────────────┼──────────┼──────────────┼─────────────────────────────────┼─────────────┼────────────┤
114
+ │ 0d2c0f1e-5c2b-4e3a-9c1d-2f6a7b8c9d0e │ warning │ maintenance │ Scheduled maintenance on Nov 3 │ 2 hours ago │ unread │
115
+ │ 1d2c0f1e-5c2b-4e3a-9c1d-2f6a7b8c9d0e │ info │ announcement │ Platform notifications are live │ 3 days ago │ 2 days ago │
116
+ └──────────────────────────────────────┴──────────┴──────────────┴─────────────────────────────────┴─────────────┴────────────┘
117
+ ```
118
+
119
+ `tailor notification read <id>` prints the title, the metadata, the body as plain text (it is
120
+ Markdown, shown as written) and the action links, then marks the notification read. Pass
121
+ `--no-mark-read` to only display it. Several IDs can be given at once. If some of them are not
122
+ found, the others are still shown and marked read, and the command then fails naming the missing
123
+ IDs. With a read-only login, the notifications are shown but not marked read, and a warning says
124
+ so.
125
+
126
+ `tailor notification dismiss <id>` removes a notification from your inbox. This cannot be undone:
127
+ `read` and `list` no longer show it. It needs a profile that is not read-only. Notifications you
128
+ do not dismiss stay until the platform expires or revokes them.
@@ -98,17 +98,16 @@ tailor tailordb migration <command>
98
98
 
99
99
  **Commands**
100
100
 
101
- | Command | Description |
102
- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
103
- | [`tailordb migration generate`](#tailordb-migration-generate) | Generate migration files by detecting schema differences between current local tables and the previous migration snapshot. |
104
- | [`tailordb migration rebaseline`](#tailordb-migration-rebaseline) | Collapse the full migration history into a new 0000 baseline. |
105
- | [`tailordb migration resolve`](#tailordb-migration-resolve) | Settle a migration that a failed deploy left partially applied, or whose run a deploy could not confirm. |
106
- | [`tailordb migration script`](#tailordb-migration-script) | Add a migration script (migrate.ts) template to an existing migration directory, or record with --no-script that a migration intentionally has none. |
107
- | [`tailordb migration set`](#tailordb-migration-set) | Set migration checkpoint to a specific number. |
108
- | [`tailordb migration status`](#tailordb-migration-status) | Show the current migration status for TailorDB namespaces, including applied and pending migrations. |
109
- | [`tailordb migration sync`](#tailordb-migration-sync) | Sync remote TailorDB schema and checkpoint to a local migration snapshot to recover from schema drift or a checkpoint outside the local history. |
110
- | [`tailordb migration test`](#tailordb-migration-test) | Test pending migrations with seed fixtures or cloned data in a temporary workspace. |
111
- | [`tailordb migration validate`](#tailordb-migration-validate) | Validate the full migration history, unreviewed generated migration scripts, and schema drift (local tables vs. migration snapshot, remote schema vs. migration checkpoint) without deploying. This includes the migration and schema-drift checks used by 'deploy' and exits with a non-zero code when issues are found. |
101
+ | Command | Description |
102
+ | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
103
+ | [`tailordb migration generate`](#tailordb-migration-generate) | Generate migration files by detecting schema differences between current local tables and the previous migration snapshot. |
104
+ | [`tailordb migration rebaseline`](#tailordb-migration-rebaseline) | Collapse the full migration history into a new 0000 baseline. |
105
+ | [`tailordb migration resolve`](#tailordb-migration-resolve) | Settle a migration that a failed deploy left partially applied, or whose run a deploy could not confirm. |
106
+ | [`tailordb migration script`](#tailordb-migration-script) | Add a migration script (migrate.ts) template to an existing migration directory, or record with --no-script that a migration intentionally has none. |
107
+ | [`tailordb migration status`](#tailordb-migration-status) | Show the current migration status for TailorDB namespaces, including applied and pending migrations. |
108
+ | [`tailordb migration sync`](#tailordb-migration-sync) | Sync remote TailorDB schema and checkpoint to a local migration snapshot to recover from schema drift or a checkpoint outside the local history. |
109
+ | [`tailordb migration test`](#tailordb-migration-test) | Test pending migrations with seed fixtures or cloned data in a temporary workspace. |
110
+ | [`tailordb migration validate`](#tailordb-migration-validate) | Run the migration and schema-drift checks that 'deploy' runs before changing anything, without deploying, and exit with a non-zero code when issues are found. |
112
111
 
113
112
  See [Global Options](../cli-reference.md#global-options) for options available to all commands.
114
113
 
@@ -197,6 +196,8 @@ Use this after a deploy failed partway through a migration whose `migrate.ts` ex
197
196
 
198
197
  For a run that a deploy could not confirm, the command reads how the run ended and shows it before asking for confirmation: use `--complete` when it succeeded, and `--rollback` when it failed, was canceled, or did not start. It refuses while the run is still running, and warns when the option you chose does not fit how the run ended.
199
198
 
199
+ `--rollback` also settles a migration that no deploy recorded as in progress, but whose pre-migration schema or maintenance mode a deploy left in place, for example because the deploy stopped before recording it. See "Settling a migration that stays in progress" in the TailorDB Migrations guide for when it runs.
200
+
200
201
  Both options remove the in-progress record, take the tables out of maintenance mode, and remove the temporary resources of the failed run, so `deploy` and the other migration commands work again. As with `tailordb migration sync`, the local migration history must reproduce the current table definitions. If sending the schema stops partway, run the command again.
201
202
 
202
203
  #### tailordb migration script
@@ -231,43 +232,6 @@ See [Global Options](../cli-reference.md#global-options) for options available t
231
232
 
232
233
  When `migrate.ts` already exists, running the command clears a previously recorded `--no-script` acknowledgment, and `--with-test` adds only the tests that do not exist yet (writing `db.pglite.ts` if it is missing). `migrate.pglite.test.ts` is scaffolded only when `@electric-sql/pglite` is installed in the project.
233
234
 
234
- #### tailordb migration set
235
-
236
- Set migration checkpoint to a specific number.
237
-
238
- **Usage**
239
-
240
- ```
241
- tailor tailordb migration set [options] <number>
242
- ```
243
-
244
- **Arguments**
245
-
246
- | Argument | Description | Required |
247
- | -------- | ----------------------------------------- | -------- |
248
- | `number` | Migration number to set (e.g., 0001 or 1) | Yes |
249
-
250
- **Options**
251
-
252
- | Option | Alias | Description | Required | Default | Env |
253
- | ------------------------------- | ----- | --------------------------------------------------------------------------------------- | -------- | -------------------- | ------------------------------ |
254
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
255
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
256
- | `--config <CONFIG>` | `-c` | Path to Tailor config file | No | `"tailor.config.ts"` | `TAILOR_CONFIG_PATH` |
257
- | `--yes` | `-y` | Skip confirmation prompts | No | `false` | - |
258
- | `--namespace <NAMESPACE>` | `-n` | Target TailorDB namespace (required if multiple namespaces exist) | No | - | - |
259
- | `--force` | - | Proceed even when the namespace records a migration history ID other than the local one | No | `false` | - |
260
-
261
- See [Global Options](../cli-reference.md#global-options) for options available to all commands.
262
-
263
- **Notes**
264
-
265
- The migration number must be a 4-digit value (e.g. `0001`) or a bare integer (e.g. `1`) within 0–9999, and must exist in the local migration history; `0` is always accepted as the baseline, provided the local history passes validation. A gapped history is rejected.
266
-
267
- The command refuses to run when the namespace records a migration history ID other than the local one, or one that cannot be read, unless the namespace has neither a checkpoint nor a history ID yet. `--force` replaces that history ID with the local one, or removes it when the local history has none, and still asks for confirmation unless `--yes` is given.
268
-
269
- Metadata lookup failures (authentication, permission, or network errors) are reported as errors; only a not-yet-deployed namespace is treated as having no checkpoint.
270
-
271
235
  #### tailordb migration status
272
236
 
273
237
  Show the current migration status for TailorDB namespaces, including applied and pending migrations.
@@ -359,11 +323,11 @@ See [Global Options](../cli-reference.md#global-options) for options available t
359
323
 
360
324
  **Notes**
361
325
 
362
- The source workspace is read-only. Without --target-workspace-id, the command creates a workspace in the source workspace's region and deletes it after success or failure; pass --keep to retain it for inspection. Right after creating the workspace it records a 24h expiry (unless --keep is given without --keep-ttl), so if the run is interrupted before the command can delete the workspace, workspace prune --expired removes it later. A designated target is retained and requires --yes. Clone mode copies TailorDB records only; it does not copy IdP users or file blobs. With --keep-ttl, the kept workspace records an expiry; it is not deleted automatically, but workspace prune --expired removes it once the expiry has passed. Organization and folder IDs loaded by --env-file are used the same way as the options; command-line options take precedence, and empty env-file values are ignored.
326
+ The source workspace is read-only. Without --target-workspace-id, the command creates a workspace in the source workspace's region and deletes it after success or failure; pass --keep to retain it for inspection. Right after creating the workspace it records a 24h expiry (unless --keep is given without --keep-ttl), so if the run is interrupted before the command can delete the workspace, workspace prune --expired removes it later. A designated target is retained and requires --yes. Clone mode copies TailorDB records only; it does not copy IdP users or file blobs. With --keep-ttl, the kept workspace records an expiry; it is not deleted automatically, but workspace prune --expired removes it once the expiry has passed. Command-line options take precedence over TAILOR_PLATFORM_ORGANIZATION_ID and TAILOR_PLATFORM_FOLDER_ID, including values loaded by --env-file, and an empty value of either variable is ignored.
363
327
 
364
328
  #### tailordb migration validate
365
329
 
366
- Validate the full migration history, unreviewed generated migration scripts, and schema drift (local tables vs. migration snapshot, remote schema vs. migration checkpoint) without deploying. This includes the migration and schema-drift checks used by 'deploy' and exits with a non-zero code when issues are found.
330
+ Run the migration and schema-drift checks that 'deploy' runs before changing anything, without deploying, and exit with a non-zero code when issues are found.
367
331
 
368
332
  **Usage**
369
333
 
@@ -373,16 +337,21 @@ tailor tailordb migration validate [options]
373
337
 
374
338
  **Options**
375
339
 
376
- | Option | Alias | Description | Required | Default | Env |
377
- | ------------------------------- | ----- | -------------------------------------------------------------------------- | -------- | -------------------- | ------------------------------ |
378
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
379
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
380
- | `--config <CONFIG>` | `-c` | Path to Tailor config file | No | `"tailor.config.ts"` | `TAILOR_CONFIG_PATH` |
381
- | `--namespace <NAMESPACE>` | `-n` | Target TailorDB namespace (validates all namespaces if not specified) | No | - | - |
382
- | `--strict` | - | Also fail when a pending migration can drop data without an acknowledgment | No | `false` | - |
340
+ | Option | Alias | Description | Required | Default | Env |
341
+ | ----------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------- | ------------------------------ |
342
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
343
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
344
+ | `--config <CONFIG>` | `-c` | Path to Tailor config file | No | `"tailor.config.ts"` | `TAILOR_CONFIG_PATH` |
345
+ | `--namespace <NAMESPACE>` | `-n` | Target TailorDB namespace (validates all namespaces if not specified) | No | - | - |
346
+ | `--strict` | - | Also fail when a pending migration can drop data without an acknowledgment | No | `false` | - |
347
+ | `--migration-skip-steps <MIGRATION_SKIP_STEPS>` | - | Also check that 'deploy --migration-skip-steps' can skip these steps of a partially applied multi-step migration, as comma-separated namespace/step entries | No | - | - |
383
348
 
384
349
  See [Global Options](../cli-reference.md#global-options) for options available to all commands.
385
350
 
351
+ **Notes**
352
+
353
+ Migration scripts are checked across the full migration history, not only the pending migrations that `deploy` checks. Like `deploy`, the command bundles only the pending scripts and checks the machine user that runs them.
354
+
386
355
  **See also:** For migration concepts, configuration, workflow, and troubleshooting, see the [TailorDB Migrations guide](../services/tailordb/migration.md).
387
356
 
388
357
  ### tailordb erd (Beta)
@@ -123,7 +123,7 @@ See [Global Options](../cli-reference.md#global-options) for options available t
123
123
 
124
124
  Every workspace belongs to an organization. Without --organization-id and --folder-id, on the command line or through TAILOR_PLATFORM_ORGANIZATION_ID / TAILOR_PLATFORM_FOLDER_ID, the workspace is created in the default organization and folder that the logged-in user set with `user update`, unless TAILOR_PLATFORM_TOKEN is set. When none of these gives an organization, the command fails. Giving either option replaces both defaults, and --folder-id requires --organization-id.
125
125
 
126
- TAILOR_PLATFORM_ORGANIZATION_ID and TAILOR_PLATFORM_FOLDER_ID are also read from --env-file. Command-line options take precedence over the corresponding environment variables. Empty values in the env file are treated as not given.
126
+ Command-line options take precedence over TAILOR_PLATFORM_ORGANIZATION_ID and TAILOR_PLATFORM_FOLDER_ID, including values loaded by --env-file. An empty value of either variable is treated as not given.
127
127
 
128
128
  When --ttl is given but the expiry cannot be confirmed, the command still prints the created workspace, then fails with WORKSPACE_TTL_WRITE_FAILED. With --json, the printed `ttl.state` is then `unconfirmed` instead of `written`, so a script can read the workspace ID and record the expiry again with `workspace ttl set`.
129
129
 
@@ -201,10 +201,9 @@ tailor workspace prune [options]
201
201
  | --------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- | ------------------------- |
202
202
  | `--name <NAME>` | - | Select workspaces whose whole name matches this regular expression (repeatable) | No | - | - |
203
203
  | `--older-than <OLDER_THAN>` | - | Minimum age since creation, such as 30m, 24h, or 7d. 0s disables the age check and requires a location. Required unless --expired is given | No | - | - |
204
- | `--expired` | - | Select workspaces whose own --ttl expiry has passed, instead of by name and age. Requires --organization-root, --folder-id, or --personal | No | `false` | - |
204
+ | `--expired` | - | Select workspaces whose own --ttl expiry has passed, instead of by name and age. Requires --organization-root or --folder-id | No | `false` | - |
205
205
  | `--organization-root <ORGANIZATION_ID>` | - | Consider the workspaces directly under this organization, excluding those in its folders (repeatable) | No | - | - |
206
206
  | `--folder-id <FOLDER_ID>` | - | Consider the workspaces in this folder (repeatable) | No | - | - |
207
- | `--personal` | - | Consider the workspaces belonging to no organization and no folder | No | `false` | - |
208
207
  | `--exclude <EXCLUDE>` | - | Keep a workspace with this exact name even when it matches (repeatable) | No | - | - |
209
208
  | `--limit <LIMIT>` | - | Abort when more workspaces match than this, without deleting anything. 0 removes the cap | No | `20` | - |
210
209
  | `--dry-run` | - | List the workspaces that would be deleted without deleting them | No | `false` | - |
@@ -219,7 +218,7 @@ Use this to reclaim workspaces left behind by CI runs, preview deployments, or i
219
218
 
220
219
  With --expired the workspaces select themselves instead: each one is deleted only once the --ttl expiry it recorded at creation has passed, so callers need no --name or --older-than. A workspace that records no expiry is never deleted this way, and neither is one whose recorded expiry cannot be read. Because that expiry is recorded on the workspace rather than derived from its name, anything able to write the workspace's metadata can bring its deletion forward -- and writing a workspace's metadata is a lesser permission than deleting it. --expired therefore requires at least one location, and --name still applies on top.
221
220
 
222
- Every workspace lives in exactly one location, and the location options name them explicitly: --organization-root selects the workspaces directly under an organization and none inside its folders, --folder-id selects the workspaces in one folder, and --personal selects the workspaces belonging to no organization and no folder. Each option can be given more than once, they combine as a union, and none of them is read from the environment or from the default organization/folder set by `user update` -- a sweep covers exactly the locations spelled out on the command line. Selecting --personal is a deliberate choice to accept, for every organization-less workspace visible to this login, the expiry that anyone able to write a workspace's metadata may have recorded. Without any location option, a --name / --older-than sweep considers every visible workspace.
221
+ Every workspace lives in exactly one location, and the location options name them explicitly: --organization-root selects the workspaces directly under an organization and none inside its folders, and --folder-id selects the workspaces in one folder. Each option can be given more than once, they combine as a union, and none of them is read from the environment or from the default organization/folder set by `user update` -- a sweep covers exactly the locations spelled out on the command line. Without any location option, a --name / --older-than sweep considers every visible workspace.
223
222
 
224
223
  Without a location option, prune warns before listing workspaces that every workspace visible to this login is a candidate for the name and age filters, even with --yes or --dry-run. The default organization/folder set by `tailor user update` is not used.
225
224