@tailor-platform/sdk 1.67.1 → 1.69.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 (95) hide show
  1. package/CHANGELOG.md +98 -1
  2. package/dist/application-Br48NXBD.mjs +4 -0
  3. package/dist/application-Cr-limKC.mjs +6192 -0
  4. package/dist/application-Cr-limKC.mjs.map +1 -0
  5. package/dist/cli/index.mjs +147 -34
  6. package/dist/cli/index.mjs.map +1 -1
  7. package/dist/cli/lib.d.mts +297 -157
  8. package/dist/cli/lib.mjs +4 -4
  9. package/dist/cli/lib.mjs.map +1 -1
  10. package/dist/cli/skills.mjs +1 -1
  11. package/dist/completion/zsh-worker.zsh +127 -48
  12. package/dist/configure/index.d.mts +2 -2
  13. package/dist/configure/index.mjs +4 -0
  14. package/dist/configure/index.mjs.map +1 -1
  15. package/dist/{crashreport-u9y2npiy.mjs → crashreport-BqyvFk-_.mjs} +2 -2
  16. package/dist/{crashreport-u9y2npiy.mjs.map → crashreport-BqyvFk-_.mjs.map} +1 -1
  17. package/dist/{crashreport-6jpCceOF.mjs → crashreport-BwF8cHF0.mjs} +1 -1
  18. package/dist/enum-constants-C7DaWeQo.mjs.map +1 -1
  19. package/dist/field-C4zdJLW5.mjs.map +1 -1
  20. package/dist/file-utils-BHPxPXmn.mjs.map +1 -1
  21. package/dist/{idp-BlBPtXJ-.d.mts → idp-BmYwCXnJ.d.mts} +30 -3
  22. package/dist/{idp-BZPqpcYY.mjs → idp-ynUfzwpz.mjs} +9 -1
  23. package/dist/idp-ynUfzwpz.mjs.map +1 -0
  24. package/dist/{index-DvEUb3pX.d.mts → index-B7VbJm0_.d.mts} +25 -16
  25. package/dist/{index-DRhMpdnA.d.mts → index-dKNk8hjo.d.mts} +2 -2
  26. package/dist/job-BpsFXPbi.mjs.map +1 -1
  27. package/dist/{kysely-type-D1e0Vwkd.mjs → kysely-type-CSoZxVKN.mjs} +2 -2
  28. package/dist/{kysely-type-D1e0Vwkd.mjs.map → kysely-type-CSoZxVKN.mjs.map} +1 -1
  29. package/dist/{logger-DpJyJvNz.mjs → logger-DKF-JsAK.mjs} +3 -3
  30. package/dist/{logger-DpJyJvNz.mjs.map → logger-DKF-JsAK.mjs.map} +1 -1
  31. package/dist/{mock-DMgIygjE.mjs → mock-wf5qeZLi.mjs} +19 -9
  32. package/dist/mock-wf5qeZLi.mjs.map +1 -0
  33. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  34. package/dist/plugin/index.mjs.map +1 -1
  35. package/dist/registry-D0uB0OrK.mjs.map +1 -1
  36. package/dist/{repl-editor-CJG3sz7A.mjs → repl-editor-DD5YP5mt.mjs} +4 -4
  37. package/dist/{repl-editor-CJG3sz7A.mjs.map → repl-editor-DD5YP5mt.mjs.map} +1 -1
  38. package/dist/runtime/globals.d.mts +3 -2
  39. package/dist/runtime/idp.d.mts +2 -2
  40. package/dist/runtime/idp.mjs +1 -1
  41. package/dist/runtime/index.d.mts +2 -2
  42. package/dist/runtime/index.mjs +1 -1
  43. package/dist/{runtime-BU6KtCvk.mjs → runtime-jowoN6qC.mjs} +803 -226
  44. package/dist/runtime-jowoN6qC.mjs.map +1 -0
  45. package/dist/schema-1msIhXwA.mjs.map +1 -1
  46. package/dist/seed-YAbtMy65.mjs.map +1 -1
  47. package/dist/{service-wI3Hvrgx.mjs → service-B2Jd9CxS.mjs} +2 -2
  48. package/dist/service-B2Jd9CxS.mjs.map +1 -0
  49. package/dist/service-CRaa4Joe.mjs +4 -0
  50. package/dist/{service-DMohAx8a.mjs → service-DDWgZL_L2.mjs} +2 -2
  51. package/dist/service-DDWgZL_L2.mjs.map +1 -0
  52. package/dist/service_pb-DGSmn-aF.mjs +4 -0
  53. package/dist/{application-WpWwTyk9.mjs → service_pb-DSNjrcbW.mjs} +22 -6176
  54. package/dist/service_pb-DSNjrcbW.mjs.map +1 -0
  55. package/dist/telemetry-BQbbVo2t.mjs.map +1 -1
  56. package/dist/types-CmzfQP_m.mjs.map +1 -1
  57. package/dist/utils/test/index.d.mts +2 -2
  58. package/dist/utils/test/index.mjs.map +1 -1
  59. package/dist/vitest/environment.mjs +1 -1
  60. package/dist/vitest/environment.mjs.map +1 -1
  61. package/dist/vitest/index.mjs +4 -4
  62. package/dist/vitest/index.mjs.map +1 -1
  63. package/dist/vitest/setup.mjs +1 -1
  64. package/dist/{workflow.generated-1S50BhEb.d.mts → workflow.generated-Br9bmLdX.d.mts} +98 -3
  65. package/docs/cli/application.md +5 -202
  66. package/docs/cli/auth.md +12 -256
  67. package/docs/cli/completion.md +0 -24
  68. package/docs/cli/crashreport.md +0 -58
  69. package/docs/cli/executor.md +53 -164
  70. package/docs/cli/function.md +2 -118
  71. package/docs/cli/organization.md +1 -211
  72. package/docs/cli/query.md +0 -20
  73. package/docs/cli/secret.md +70 -250
  74. package/docs/cli/setup.md +21 -59
  75. package/docs/cli/skills.md +0 -39
  76. package/docs/cli/staticwebsite.md +24 -172
  77. package/docs/cli/tailordb.md +5 -255
  78. package/docs/cli/upgrade.md +0 -20
  79. package/docs/cli/user.md +32 -247
  80. package/docs/cli/workflow.md +139 -161
  81. package/docs/cli/workspace.md +158 -537
  82. package/docs/cli-reference.md +59 -40
  83. package/docs/configuration.md +7 -1
  84. package/docs/github-actions.md +27 -14
  85. package/docs/services/idp.md +55 -2
  86. package/docs/services/staticwebsite.md +7 -1
  87. package/package.json +23 -18
  88. package/dist/application-Djeezk3m.mjs +0 -4
  89. package/dist/application-WpWwTyk9.mjs.map +0 -1
  90. package/dist/idp-BZPqpcYY.mjs.map +0 -1
  91. package/dist/mock-DMgIygjE.mjs.map +0 -1
  92. package/dist/runtime-BU6KtCvk.mjs.map +0 -1
  93. package/dist/service-BHQIerYh.mjs +0 -4
  94. package/dist/service-DMohAx8a.mjs.map +0 -1
  95. package/dist/service-wI3Hvrgx.mjs.map +0 -1
@@ -10,8 +10,6 @@ tailor-sdk <command> [options]
10
10
 
11
11
  ## Global Options
12
12
 
13
- <!-- politty:global-options:start -->
14
-
15
13
  <a id="global-options"></a>
16
14
  | Option | Alias | Description | Required | Default |
17
15
  |--------|-------|-------------|----------|---------|
@@ -20,8 +18,6 @@ tailor-sdk <command> [options]
20
18
  | `--verbose` | - | Enable verbose logging | No | `false` |
21
19
  | `--json` | `-j` | Output as JSON | No | `false` |
22
20
 
23
- <!-- politty:global-options:end -->
24
-
25
21
  ### JSON Output
26
22
 
27
23
  For commands that return structured results, passing `--json` writes one parseable JSON document
@@ -103,8 +99,6 @@ Workspace ID resolution follows this priority order:
103
99
 
104
100
  ## Commands
105
101
 
106
- <!-- politty:index:docs/cli-reference.md:start -->
107
-
108
102
  ### [Application Commands](./cli/application.md)
109
103
 
110
104
  Commands for managing Tailor Platform applications (work with `tailor.config.ts`).
@@ -117,8 +111,9 @@ Commands for managing Tailor Platform applications (work with `tailor.config.ts`
117
111
  | [remove](./cli/application.md#remove) | Remove all resources managed by the application from the workspace. |
118
112
  | [show](./cli/application.md#show) | Show information about the deployed application. |
119
113
  | [open](./cli/application.md#open) | Open Tailor Platform Console. |
120
- | [api list](./cli/application.md#api-list) | List all invocable OperatorService methods. |
114
+ | [api](./cli/application.md#api) | Call Tailor Platform API endpoints directly. |
121
115
  | [api inspect](./cli/application.md#api-inspect) | Print the input message tree of an OperatorService endpoint. |
116
+ | [api list](./cli/application.md#api-list) | List all invocable OperatorService methods. |
122
117
 
123
118
  ### [TailorDB Commands](./cli/tailordb.md)
124
119
 
@@ -126,12 +121,15 @@ Commands for managing TailorDB tables, data, and schema migrations.
126
121
 
127
122
  | Command | Description |
128
123
  | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
124
+ | [tailordb](./cli/tailordb.md#tailordb) | Manage TailorDB tables and data. |
129
125
  | [tailordb truncate](./cli/tailordb.md#tailordb-truncate) | Truncate (delete all records from) TailorDB tables. |
126
+ | [tailordb migration](./cli/tailordb.md#tailordb-migration) | Manage TailorDB schema migrations. |
130
127
  | [tailordb migration generate](./cli/tailordb.md#tailordb-migration-generate) | Generate migration files by detecting schema differences between current local types and the previous migration snapshot. |
131
128
  | [tailordb migration script](./cli/tailordb.md#tailordb-migration-script) | Add a migration script (migrate.ts) template to an existing migration directory. |
132
129
  | [tailordb migration set](./cli/tailordb.md#tailordb-migration-set) | Set migration checkpoint to a specific number. |
133
130
  | [tailordb migration status](./cli/tailordb.md#tailordb-migration-status) | Show the current migration status for TailorDB namespaces, including applied and pending migrations. |
134
131
  | [tailordb migration sync](./cli/tailordb.md#tailordb-migration-sync) | Sync remote TailorDB schema to a specific migration snapshot (recovery from --no-schema-check drift). |
132
+ | [tailordb erd](./cli/tailordb.md#tailordb-erd) | Generate TailorDB ERD viewer artifacts from local TailorDB schema. (beta) |
135
133
  | [tailordb erd export](./cli/tailordb.md#tailordb-erd-export) | Export TailorDB ERD static viewer from local TailorDB schema. |
136
134
  | [tailordb erd serve](./cli/tailordb.md#tailordb-erd-serve) | Generate and serve TailorDB ERD locally with watch reload. (beta) |
137
135
  | [tailordb erd deploy](./cli/tailordb.md#tailordb-erd-deploy) | Deploy ERD static website for TailorDB namespace(s). |
@@ -152,13 +150,15 @@ Commands for authentication and user management.
152
150
  | ------------------------------------------------ | ----------------------------------------------------- |
153
151
  | [login](./cli/user.md#login) | Login to Tailor Platform. |
154
152
  | [logout](./cli/user.md#logout) | Logout from Tailor Platform. |
153
+ | [user](./cli/user.md#user) | Manage Tailor Platform users. |
155
154
  | [user current](./cli/user.md#user-current) | Show current user. |
156
155
  | [user list](./cli/user.md#user-list) | List all users. |
157
- | [user switch](./cli/user.md#user-switch) | Set current user. |
158
- | [user pat list](./cli/user.md#user-pat-list) | List all personal access tokens. |
156
+ | [user pat](./cli/user.md#user-pat) | Manage personal access tokens. |
159
157
  | [user pat create](./cli/user.md#user-pat-create) | Create a new personal access token. |
160
158
  | [user pat delete](./cli/user.md#user-pat-delete) | Delete a personal access token. |
159
+ | [user pat list](./cli/user.md#user-pat-list) | List all personal access tokens. |
161
160
  | [user pat update](./cli/user.md#user-pat-update) | Update a personal access token (delete and recreate). |
161
+ | [user switch](./cli/user.md#user-switch) | Set current user. |
162
162
 
163
163
  ### [Organization Commands](./cli/organization.md)
164
164
 
@@ -166,6 +166,8 @@ Commands for managing organizations and folders.
166
166
 
167
167
  | Command | Description |
168
168
  | ------------------------------------------------------------------------------ | ------------------------------------------------ |
169
+ | [organization](./cli/organization.md#organization) | Manage Tailor Platform organizations. |
170
+ | [organization folder](./cli/organization.md#organization-folder) | Manage organization folders. |
169
171
  | [organization folder create](./cli/organization.md#organization-folder-create) | Create a new folder in an organization. |
170
172
  | [organization folder delete](./cli/organization.md#organization-folder-delete) | Delete a folder from an organization. |
171
173
  | [organization folder get](./cli/organization.md#organization-folder-get) | Show detailed information about a folder. |
@@ -180,23 +182,27 @@ Commands for managing organizations and folders.
180
182
 
181
183
  Commands for managing workspaces and profiles.
182
184
 
183
- | Command | Description |
184
- | ----------------------------------------------------------------- | ------------------------------------------- |
185
- | [workspace app health](./cli/workspace.md#workspace-app-health) | Check application schema health |
186
- | [workspace app list](./cli/workspace.md#workspace-app-list) | List applications in a workspace |
187
- | [workspace create](./cli/workspace.md#workspace-create) | Create a new Tailor Platform workspace. |
188
- | [workspace delete](./cli/workspace.md#workspace-delete) | Delete a Tailor Platform workspace. |
189
- | [workspace get](./cli/workspace.md#workspace-get) | Show detailed information about a workspace |
190
- | [workspace list](./cli/workspace.md#workspace-list) | List all Tailor Platform workspaces. |
191
- | [workspace restore](./cli/workspace.md#workspace-restore) | Restore a deleted workspace |
192
- | [workspace user invite](./cli/workspace.md#workspace-user-invite) | Invite a user to a workspace |
193
- | [workspace user list](./cli/workspace.md#workspace-user-list) | List users in a workspace |
194
- | [workspace user remove](./cli/workspace.md#workspace-user-remove) | Remove a user from a workspace |
195
- | [workspace user update](./cli/workspace.md#workspace-user-update) | Update a user's role in a workspace |
196
- | [profile create](./cli/workspace.md#profile-create) | Create a new profile. |
197
- | [profile delete](./cli/workspace.md#profile-delete) | Delete a profile. |
198
- | [profile list](./cli/workspace.md#profile-list) | List all profiles. |
199
- | [profile update](./cli/workspace.md#profile-update) | Update profile properties. |
185
+ | Command | Description |
186
+ | ----------------------------------------------------------------- | ---------------------------------------------------------- |
187
+ | [workspace](./cli/workspace.md#workspace) | Manage Tailor Platform workspaces. |
188
+ | [workspace app](./cli/workspace.md#workspace-app) | Manage workspace applications |
189
+ | [workspace app health](./cli/workspace.md#workspace-app-health) | Check application schema health |
190
+ | [workspace app list](./cli/workspace.md#workspace-app-list) | List applications in a workspace |
191
+ | [workspace create](./cli/workspace.md#workspace-create) | Create a new Tailor Platform workspace. |
192
+ | [workspace delete](./cli/workspace.md#workspace-delete) | Delete a Tailor Platform workspace. |
193
+ | [workspace get](./cli/workspace.md#workspace-get) | Show detailed information about a workspace |
194
+ | [workspace list](./cli/workspace.md#workspace-list) | List all Tailor Platform workspaces. |
195
+ | [workspace restore](./cli/workspace.md#workspace-restore) | Restore a deleted workspace |
196
+ | [workspace user](./cli/workspace.md#workspace-user) | Manage workspace users |
197
+ | [workspace user invite](./cli/workspace.md#workspace-user-invite) | Invite a user to a workspace |
198
+ | [workspace user list](./cli/workspace.md#workspace-user-list) | List users in a workspace |
199
+ | [workspace user remove](./cli/workspace.md#workspace-user-remove) | Remove a user from a workspace |
200
+ | [workspace user update](./cli/workspace.md#workspace-user-update) | Update a user's role in a workspace |
201
+ | [profile](./cli/workspace.md#profile) | Manage workspace profiles (user + workspace combinations). |
202
+ | [profile create](./cli/workspace.md#profile-create) | Create a new profile. |
203
+ | [profile delete](./cli/workspace.md#profile-delete) | Delete a profile. |
204
+ | [profile list](./cli/workspace.md#profile-list) | List all profiles. |
205
+ | [profile update](./cli/workspace.md#profile-update) | Update profile properties. |
200
206
 
201
207
  ### [Auth Resource Commands](./cli/auth.md)
202
208
 
@@ -204,13 +210,16 @@ Commands for managing Auth service resources.
204
210
 
205
211
  | Command | Description |
206
212
  | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
213
+ | [authconnection](./cli/auth.md#authconnection) | Manage auth connections. |
207
214
  | [authconnection authorize](./cli/auth.md#authconnection-authorize) | Authorize an auth connection via OAuth2 flow. |
215
+ | [authconnection delete](./cli/auth.md#authconnection-delete) | Delete an auth connection entirely. |
208
216
  | [authconnection list](./cli/auth.md#authconnection-list) | List all auth connections. |
209
217
  | [authconnection open](./cli/auth.md#authconnection-open) | Open the auth connections page in the Tailor Platform Console. |
210
218
  | [authconnection revoke](./cli/auth.md#authconnection-revoke) | Revoke an auth connection's tokens (keeps the connection; use 'delete' to remove it). |
211
- | [authconnection delete](./cli/auth.md#authconnection-delete) | Delete an auth connection entirely. |
219
+ | [machineuser](./cli/auth.md#machineuser) | Manage machine users in your Tailor Platform application. |
212
220
  | [machineuser list](./cli/auth.md#machineuser-list) | List all machine users in the application. |
213
221
  | [machineuser token](./cli/auth.md#machineuser-token) | Get an access token for a machine user. |
222
+ | [oauth2client](./cli/auth.md#oauth2client) | Manage OAuth2 clients in your Tailor Platform application. |
214
223
  | [oauth2client list](./cli/auth.md#oauth2client-list) | List all OAuth2 clients in the application. |
215
224
  | [oauth2client get](./cli/auth.md#oauth2client-get) | Get OAuth2 client credentials (including client secret). |
216
225
 
@@ -220,9 +229,11 @@ Commands for managing workflows and executions.
220
229
 
221
230
  | Command | Description |
222
231
  | ------------------------------------------------------------ | ---------------------------------------------- |
232
+ | [workflow](./cli/workflow.md#workflow) | Manage workflows and workflow executions. |
223
233
  | [workflow list](./cli/workflow.md#workflow-list) | List all workflows in the workspace. |
224
234
  | [workflow get](./cli/workflow.md#workflow-get) | Get workflow details. |
225
235
  | [workflow start](./cli/workflow.md#workflow-start) | Start a workflow execution. |
236
+ | [workflow wait](./cli/workflow.md#workflow-wait) | Wait for a workflow execution. |
226
237
  | [workflow executions](./cli/workflow.md#workflow-executions) | List or get workflow executions. |
227
238
  | [workflow resume](./cli/workflow.md#workflow-resume) | Resume a failed or pending workflow execution. |
228
239
 
@@ -232,6 +243,7 @@ Commands for managing function registries and viewing function execution logs.
232
243
 
233
244
  | Command | Description |
234
245
  | -------------------------------------------------------- | --------------------------------------------------------------- |
246
+ | [function](./cli/function.md#function) | Manage functions |
235
247
  | [function get](./cli/function.md#function-get) | Get a function registry by name |
236
248
  | [function list](./cli/function.md#function-list) | List function registries in a workspace |
237
249
  | [function logs](./cli/function.md#function-logs) | List or get function execution logs. |
@@ -243,10 +255,12 @@ Commands for managing executors and executor jobs.
243
255
 
244
256
  | Command | Description |
245
257
  | ---------------------------------------------------------------- | --------------------------------------------- |
246
- | [executor trigger](./cli/executor.md#executor-trigger) | Trigger an executor manually. |
247
- | [executor jobs](./cli/executor.md#executor-jobs) | List or get executor jobs. |
258
+ | [executor](./cli/executor.md#executor) | Manage executors |
248
259
  | [executor list](./cli/executor.md#executor-list) | List all executors |
249
260
  | [executor get](./cli/executor.md#executor-get) | Get executor details |
261
+ | [executor jobs](./cli/executor.md#executor-jobs) | List or get executor jobs. |
262
+ | [executor trigger](./cli/executor.md#executor-trigger) | Trigger an executor manually. |
263
+ | [executor webhook](./cli/executor.md#executor-webhook) | Manage executor webhooks |
250
264
  | [executor webhook list](./cli/executor.md#executor-webhook-list) | List executors with incoming webhook triggers |
251
265
 
252
266
  ### [Secret Commands](./cli/secret.md)
@@ -255,13 +269,15 @@ Commands for managing secrets and vaults.
255
269
 
256
270
  | Command | Description |
257
271
  | ---------------------------------------------------------- | ------------------------------------------------ |
272
+ | [secret](./cli/secret.md#secret) | Manage Secret Manager vaults and secrets. |
273
+ | [secret create](./cli/secret.md#secret-create) | Create a secret in a vault. |
274
+ | [secret delete](./cli/secret.md#secret-delete) | Delete a secret in a vault. |
275
+ | [secret list](./cli/secret.md#secret-list) | List all secrets in a vault. |
276
+ | [secret update](./cli/secret.md#secret-update) | Update a secret in a vault. |
277
+ | [secret vault](./cli/secret.md#secret-vault) | Manage Secret Manager vaults. |
258
278
  | [secret vault create](./cli/secret.md#secret-vault-create) | Create a new Secret Manager vault. |
259
279
  | [secret vault delete](./cli/secret.md#secret-vault-delete) | Delete a Secret Manager vault. |
260
280
  | [secret vault list](./cli/secret.md#secret-vault-list) | List all Secret Manager vaults in the workspace. |
261
- | [secret create](./cli/secret.md#secret-create) | Create a secret in a vault. |
262
- | [secret update](./cli/secret.md#secret-update) | Update a secret in a vault. |
263
- | [secret list](./cli/secret.md#secret-list) | List all secrets in a vault. |
264
- | [secret delete](./cli/secret.md#secret-delete) | Delete a secret in a vault. |
265
281
 
266
282
  ### [Static Website Commands](./cli/staticwebsite.md)
267
283
 
@@ -269,10 +285,12 @@ Commands for managing and deploying static websites.
269
285
 
270
286
  | Command | Description |
271
287
  | ----------------------------------------------------------------------------- | ----------------------------------------------------- |
288
+ | [staticwebsite](./cli/staticwebsite.md#staticwebsite) | Manage static websites in your workspace. |
272
289
  | [staticwebsite deploy](./cli/staticwebsite.md#staticwebsite-deploy) | Deploy a static website from a local build directory. |
273
- | [staticwebsite domain list](./cli/staticwebsite.md#staticwebsite-domain-list) | List custom domains for a static website. |
274
- | [staticwebsite domain get](./cli/staticwebsite.md#staticwebsite-domain-get) | Get details of a custom domain. |
275
290
  | [staticwebsite list](./cli/staticwebsite.md#staticwebsite-list) | List all static websites in a workspace. |
291
+ | [staticwebsite domain](./cli/staticwebsite.md#staticwebsite-domain) | Manage custom domains for static websites. |
292
+ | [staticwebsite domain get](./cli/staticwebsite.md#staticwebsite-domain-get) | Get details of a custom domain. |
293
+ | [staticwebsite domain list](./cli/staticwebsite.md#staticwebsite-domain-list) | List custom domains for a static website. |
276
294
  | [staticwebsite get](./cli/staticwebsite.md#staticwebsite-get) | Get details of a specific static website. |
277
295
 
278
296
  ### [Crash Report Commands](./cli/crashreport.md)
@@ -281,6 +299,7 @@ Commands for managing crash reports.
281
299
 
282
300
  | Command | Description |
283
301
  | --------------------------------------------------------- | ---------------------------------------------- |
302
+ | [crashreport](./cli/crashreport.md#crashreport) | Manage crash reports. |
284
303
  | [crashreport list](./cli/crashreport.md#crashreport-list) | List local crash report files. |
285
304
  | [crashreport send](./cli/crashreport.md#crashreport-send) | Submit a crash report to help improve the SDK. |
286
305
 
@@ -288,9 +307,10 @@ Commands for managing crash reports.
288
307
 
289
308
  Commands for setting up project infrastructure.
290
309
 
291
- | Command | Description |
292
- | ------------------------------------------- | ------------------------------------------------- |
293
- | [setup github](./cli/setup.md#setup-github) | Generate a GitHub Actions deploy workflow. (beta) |
310
+ | Command | Description |
311
+ | ----------------------------------------- | -------------------------------------------------------------------------------- |
312
+ | [setup](./cli/setup.md#setup) | Generate a CI deploy workflow for your project. (beta) |
313
+ | [setup check](./cli/setup.md#setup-check) | Audit generated workflows for drift against the current config/repo (read-only). |
294
314
 
295
315
  ### [Upgrade Commands](./cli/upgrade.md)
296
316
 
@@ -306,6 +326,7 @@ Commands for installing Tailor SDK agent skills.
306
326
 
307
327
  | Command | Description |
308
328
  | ------------------------------------------------ | ------------------------------------------------------------------ |
329
+ | [skills](./cli/skills.md#skills) | Manage Tailor SDK agent skills. |
309
330
  | [skills install](./cli/skills.md#skills-install) | Install the tailor-sdk agent skill from the installed SDK package. |
310
331
 
311
332
  ### [Completion](./cli/completion.md)
@@ -315,5 +336,3 @@ Generate shell completion scripts for bash, zsh, and fish.
315
336
  | Command | Description |
316
337
  | -------------------------------------------- | -------------------------------- |
317
338
  | [completion](./cli/completion.md#completion) | Generate shell completion script |
318
-
319
- <!-- politty:index:docs/cli-reference.md:end -->
@@ -118,8 +118,14 @@ Configure the Built-in IdP service using `defineIdp()`. See [IdP](./services/idp
118
118
  import { defineIdp } from "@tailor-platform/sdk";
119
119
 
120
120
  const idp = defineIdp("my-idp", {
121
- authorization: "loggedIn",
122
121
  clients: ["my-client"],
122
+ permission: {
123
+ create: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
124
+ read: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
125
+ update: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
126
+ delete: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
127
+ sendPasswordResetEmail: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
128
+ },
123
129
  });
124
130
 
125
131
  export default defineConfig({
@@ -1,6 +1,6 @@
1
1
  # GitHub Actions Integration
2
2
 
3
- `tailor-sdk setup github` generates a GitHub Actions workflow that deploys your
3
+ `tailor-sdk setup` generates a GitHub Actions workflow that deploys your
4
4
  Tailor Platform application automatically on push or tag.
5
5
 
6
6
  > **Beta:** This command is under active development. CLI flags, the generated
@@ -14,13 +14,16 @@ lives):
14
14
 
15
15
  ```bash
16
16
  # Branch target: deploy to stg on every push to main
17
- tailor-sdk setup github -n my-app-stg
17
+ tailor-sdk setup -n my-app-stg
18
18
 
19
19
  # Tag target: deploy to production when a tag is pushed, with an approval gate
20
- tailor-sdk setup github -n my-app-prod \
20
+ tailor-sdk setup -n my-app-prod \
21
21
  --tag --branch main --environment production
22
22
  ```
23
23
 
24
+ `setup` defaults to the GitHub provider; `--provider github` (`-p github`) is
25
+ accepted but optional, and other providers are not yet supported.
26
+
24
27
  After running the command, follow the **Next steps** printed to the terminal to
25
28
  set the required secrets, set the `TAILOR_PLATFORM_WORKSPACE_ID` variable, and
26
29
  commit the generated files.
@@ -33,7 +36,7 @@ before the first deploy (see [Targeting a workspace](#targeting-a-workspace)).
33
36
  ## Targets
34
37
 
35
38
  A _target_ is one workflow file that handles one deployment destination.
36
- Run `setup github` once per target.
39
+ Run `setup` once per target.
37
40
 
38
41
  ### Branch target (recommended for staging)
39
42
 
@@ -41,9 +44,9 @@ The branch target fires on pull requests and pushes to the branch you specify
41
44
  (defaulting to the repository's default branch when `--branch` is omitted):
42
45
 
43
46
  ```bash
44
- tailor-sdk setup github -n my-app-stg
47
+ tailor-sdk setup -n my-app-stg
45
48
  # Equivalent to:
46
- tailor-sdk setup github -n my-app-stg --branch main
49
+ tailor-sdk setup -n my-app-stg --branch main
47
50
  ```
48
51
 
49
52
  What it does:
@@ -66,7 +69,7 @@ The tag target fires when a tag matching `--tag-pattern` (default `v*`) is
66
69
  pushed:
67
70
 
68
71
  ```bash
69
- tailor-sdk setup github -n my-app-prod \
72
+ tailor-sdk setup -n my-app-prod \
70
73
  --tag --tag-pattern "v*" --branch main --environment production
71
74
  ```
72
75
 
@@ -136,7 +139,7 @@ environment is planned.)
136
139
 
137
140
  ## Generated files
138
141
 
139
- Running `setup github` creates or updates:
142
+ Running `setup` creates or updates:
140
143
 
141
144
  ### `.github/workflows/tailor-<workspace-name>.yml`
142
145
 
@@ -151,7 +154,7 @@ project-specific setup (such as private registry authentication or a system
151
154
  dependency), add a step _before_ the managed `tailor-setup` step. For
152
155
  post-install extras (such as `playwright install`), add a step _after_ it.
153
156
 
154
- Note that re-running `setup github` currently regenerates the whole file: if
157
+ Note that re-running `setup` currently regenerates the whole file: if
155
158
  the file differs from what the SDK last wrote — whether you edited a managed
156
159
  step or added your own — the command stops and reports the conflict. Pass
157
160
  `--force` to discard your edits and regenerate from the current template, then
@@ -167,7 +170,7 @@ detect hand edits.
167
170
 
168
171
  ### `tailor.config.ts` (id injection)
169
172
 
170
- If your config does not already have an `id` field, `setup github` injects one.
173
+ If your config does not already have an `id` field, `setup` injects one.
171
174
  This `id` must be committed alongside the workflow file. In CI, `tailor-sdk
172
175
  deploy` refuses to inject a new id — if the id were assigned fresh on each CI
173
176
  run, every deploy would create a brand-new application and lose ownership of
@@ -238,7 +241,7 @@ you can deploy any commit regardless of branch membership.
238
241
  For a monorepo where your SDK app lives in a subdirectory, pass `--dir`:
239
242
 
240
243
  ```bash
241
- tailor-sdk setup github -n my-app --dir apps/backend
244
+ tailor-sdk setup -n my-app --dir apps/backend
242
245
  ```
243
246
 
244
247
  The generated workflow adds a `paths` filter on `apps/backend/**` so the
@@ -303,10 +306,10 @@ A typical setup with staging and production:
303
306
 
304
307
  ```bash
305
308
  # Staging: main → stg (deploy on every push to main)
306
- tailor-sdk setup github -n my-app-stg
309
+ tailor-sdk setup -n my-app-stg
307
310
 
308
311
  # Production: tagged commits → prod, with approval gate and branch guard
309
- tailor-sdk setup github -n my-app-prod \
312
+ tailor-sdk setup -n my-app-prod \
310
313
  --tag --branch main --environment production
311
314
  ```
312
315
 
@@ -326,9 +329,19 @@ gh secret set TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET --env production
326
329
 
327
330
  Commit both workflow files and `.github/tailor-sdk.lock`.
328
331
 
332
+ ## Checking for drift
333
+
334
+ `tailor-sdk setup check` audits the workflows recorded in
335
+ `.github/tailor-sdk.lock` against your current config and repository, without
336
+ writing anything. It reports when a workflow file is missing or hand-edited, a
337
+ newer template is available, `tailor.config.ts` is no longer under the recorded
338
+ `--dir`, or the repository default branch no longer matches a branch target's
339
+ trigger. It exits non-zero when it finds drift, so you can run it in CI. Each
340
+ finding names a stable rule key for future suppression.
341
+
329
342
  ## Updating the generated workflow
330
343
 
331
- When you upgrade the SDK, re-run `setup github` with the same flags to pick up
344
+ When you upgrade the SDK, re-run `setup` with the same flags to pick up
332
345
  template improvements. If the SDK detects that you have hand-edited a managed
333
346
  section, it stops and asks you to use `--force` to overwrite your edits, or to
334
347
  move your customizations into your own steps before regenerating.
@@ -86,7 +86,8 @@ defineIdp("my-idp", {
86
86
  - `read` - Controls who can read IdP users
87
87
  - `update` - Controls who can update IdP users
88
88
  - `delete` - Controls who can delete IdP users
89
- - `sendPasswordResetEmail` - Controls who can send password reset emails. The examples above disable this operation; to enable it, use a permission such as `[{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }]`.
89
+ - `sendPasswordResetEmail` - Controls who can send password reset emails. Required unless `userAuthPolicy.disablePasswordAuth` is `true` or `gqlOperations.sendPasswordResetEmail` is `false` (the password-reset flow has no meaning when password authentication is off or the operation is disabled). Set `[{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }]` to allow, or `[]` to deny.
90
+ - `unenrollMfa` - Controls who can remove an enrolled MFA factor from a user. Required when `userAuthPolicy.enableMfa` is `true` unless `gqlOperations.unenrollMfa` is `false`; omit otherwise. Typically restricted to administrators.
90
91
 
91
92
  **Policy fields:** each entry in an operation's policy array supports:
92
93
 
@@ -166,6 +167,37 @@ defineIdp("my-idp", {
166
167
  - `allowGoogleOauth` - Enable the "Sign in with Google" button. Default `false`.
167
168
  - `allowMicrosoftOauth` - Enable the "Sign in with Microsoft" button. Default `false`.
168
169
 
170
+ **MFA (TOTP):**
171
+
172
+ ```typescript
173
+ import { defineIdp, defineStaticWebSite } from "@tailor-platform/sdk";
174
+
175
+ const website = defineStaticWebSite("my-frontend", { description: "App frontend" });
176
+
177
+ defineIdp("my-idp", {
178
+ clients: ["my-client"],
179
+ userAuthPolicy: {
180
+ enableMfa: true,
181
+ requireMfa: false,
182
+ allowedReturnOrigins: [website.url, "https://admin.example.com"],
183
+ mfaIssuer: "My App",
184
+ },
185
+ permission: {
186
+ create: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
187
+ read: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
188
+ update: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
189
+ delete: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
190
+ sendPasswordResetEmail: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
191
+ unenrollMfa: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
192
+ },
193
+ });
194
+ ```
195
+
196
+ - `enableMfa` - Make TOTP MFA available for users in this namespace. Default `false`. When enabled, users can register an authenticator app (Google Authenticator, 1Password, etc.) from the IdP self-service page.
197
+ - `requireMfa` - Force password-authenticated users to enroll and pass an MFA challenge on each sign-in. Default `false`. Social sign-in (`allowGoogleOauth` / `allowMicrosoftOauth`) is not affected; the upstream provider's MFA covers those sessions.
198
+ - `allowedReturnOrigins` - Origins the IdP self-service pages (such as `/mfa/settings`) are allowed to redirect back to. Each entry is either a literal origin (`https://app.example.com`, scheme + host + optional port, no path/query/fragment) or a static-website placeholder `<name>:url` (e.g. `website.url`) that the CLI resolves to the deployed website's URL at apply time. Required when `enableMfa` is `true`.
199
+ - `mfaIssuer` - Label shown next to the user account in authenticator apps when TOTP is enrolled. Up to 64 characters. Falls back to `"Tailor Platform IdP"` when empty.
200
+
169
201
  **Constraints:** the following combinations are rejected at parse time.
170
202
 
171
203
  - `passwordMinLength` must be less than or equal to `passwordMaxLength`.
@@ -173,6 +205,23 @@ defineIdp("my-idp", {
173
205
  - `allowGoogleOauth` requires a non-empty `allowedEmailDomains`.
174
206
  - `allowMicrosoftOauth` requires both a non-empty `allowedEmailDomains` and `disablePasswordAuth: true`.
175
207
  - `disablePasswordAuth` requires `allowGoogleOauth` or `allowMicrosoftOauth`, and cannot be combined with `allowSelfPasswordReset`.
208
+ - `requireMfa: true` requires `enableMfa: true`.
209
+ - `enableMfa: true` requires at least one entry in `allowedReturnOrigins`.
210
+ - `enableMfa: true` requires `permission` to be defined and to include an explicit `unenrollMfa` policy (an empty array `[]` to deny is fine), unless `gqlOperations.unenrollMfa` is `false` (or `gqlOperations: "query"`, which normalizes to the same), in which case the operation is turned off and the policy may be omitted.
211
+
212
+ **Runtime API:** function code can inspect and revoke a user's enrolled factor through `idp.Client`. The `User` records returned by `user`, `userByName`, `users`, `createUser`, and `updateUser` expose `mfaEnrolled` (boolean) and `mfaFactorIds` (string array), and `client.unenrollMfa({ userId, mfaFactorId })` removes a single factor. The factor ID to pass back is one of the entries in `user.mfaFactorIds`. Calling `unenrollMfa` requires the `unenrollMfa` permission above.
213
+
214
+ ```typescript
215
+ import { idp } from "@tailor-platform/sdk/runtime";
216
+
217
+ const client = new idp.Client({ namespace: "my-idp" });
218
+ const user = await client.user("user-id");
219
+ if (user.mfaEnrolled) {
220
+ for (const factorId of user.mfaFactorIds) {
221
+ await client.unenrollMfa({ userId: user.id, mfaFactorId: factorId });
222
+ }
223
+ }
224
+ ```
176
225
 
177
226
  ### gqlOperations
178
227
 
@@ -187,6 +236,8 @@ defineIdp("my-idp", {
187
236
  update: true,
188
237
  delete: false,
189
238
  sendPasswordResetEmail: false,
239
+ requestMfaSettingsUrl: false,
240
+ unenrollMfa: false,
190
241
  },
191
242
  });
192
243
  ```
@@ -198,8 +249,10 @@ defineIdp("my-idp", {
198
249
  - `update` - The `_updateUser` mutation.
199
250
  - `delete` - The `_deleteUser` mutation.
200
251
  - `sendPasswordResetEmail` - The `_sendPasswordResetEmail` mutation.
252
+ - `requestMfaSettingsUrl` - The `_requestMfaSettingsUrl` query that issues a self-service URL for MFA settings.
253
+ - `unenrollMfa` - The `_unenrollMfa` mutation that removes a user's enrolled MFA factor. When set to `false`, `permission.unenrollMfa` may be omitted even with `userAuthPolicy.enableMfa: true`.
201
254
 
202
- **Shortcut:** pass the string `"query"` to expose a read-only IdP. It enables `read` and disables every mutation.
255
+ **Shortcut:** pass the string `"query"` to expose a read-only IdP. It enables the queries (`read`, `requestMfaSettingsUrl`) and disables every mutation.
203
256
 
204
257
  ```typescript
205
258
  defineIdp("my-idp", {
@@ -124,8 +124,14 @@ const website = defineStaticWebSite("my-frontend", {
124
124
  });
125
125
 
126
126
  const idp = defineIdp("my-idp", {
127
- authorization: "loggedIn",
128
127
  clients: ["default-client"],
128
+ permission: {
129
+ create: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
130
+ read: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
131
+ update: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
132
+ delete: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
133
+ sendPasswordResetEmail: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
134
+ },
129
135
  });
130
136
 
131
137
  const auth = defineAuth("my-auth", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "1.67.1",
3
+ "version": "1.69.0",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,6 +16,7 @@
16
16
  "CHANGELOG.md",
17
17
  "dist",
18
18
  "docs",
19
+ "!docs/**/*.*.md",
19
20
  "postinstall.mjs",
20
21
  "README.md",
21
22
  "agent-skills"
@@ -27,6 +28,9 @@
27
28
  ],
28
29
  "main": "./dist/configure/index.mjs",
29
30
  "types": "./dist/configure/index.d.mts",
31
+ "imports": {
32
+ "#/*": "./src/*.ts"
33
+ },
30
34
  "exports": {
31
35
  ".": {
32
36
  "types": "./dist/configure/index.d.mts",
@@ -150,40 +154,40 @@
150
154
  "@opentelemetry/resources": "2.8.0",
151
155
  "@opentelemetry/sdk-trace-node": "2.8.0",
152
156
  "@opentelemetry/semantic-conventions": "1.41.1",
153
- "@oxc-project/types": "0.135.0",
157
+ "@oxc-project/types": "0.137.0",
154
158
  "@standard-schema/spec": "1.1.0",
155
159
  "@tailor-platform/function-kysely-tailordb": "0.1.3",
156
160
  "@toiroakr/lines-db": "0.9.2",
157
161
  "@toiroakr/read-multiline": "0.4.1",
158
- "@urql/core": "6.0.1",
162
+ "@urql/core": "6.0.2",
159
163
  "chalk": "5.6.2",
160
164
  "chokidar": "5.0.0",
161
165
  "confbox": "0.2.4",
162
166
  "date-fns": "4.4.0",
163
- "es-toolkit": "1.47.1",
167
+ "es-toolkit": "1.48.1",
164
168
  "find-up-simple": "1.0.1",
165
169
  "globals": "17.6.0",
166
- "graphql": "16.14.2",
170
+ "graphql": "17.0.1",
167
171
  "inflection": "3.0.2",
168
172
  "kysely": "0.29.2",
169
173
  "madge": "8.0.0",
170
174
  "mime-types": "3.0.2",
171
175
  "open": "11.0.0",
172
- "oxc-parser": "0.135.0",
176
+ "oxc-parser": "0.137.0",
173
177
  "p-limit": "7.3.0",
174
178
  "pathe": "2.0.3",
175
179
  "pgsql-ast-parser": "12.0.2",
176
180
  "pkg-types": "2.3.1",
177
- "politty": "0.6.0",
178
- "rolldown": "1.1.1",
179
- "semver": "7.8.4",
181
+ "politty": "0.9.2",
182
+ "rolldown": "1.1.2",
183
+ "semver": "7.8.5",
180
184
  "sql-highlight": "6.1.0",
181
185
  "std-env": "4.1.0",
182
186
  "table": "6.9.0",
183
187
  "ts-cron-validator": "1.1.5",
184
188
  "tsx": "4.22.4",
185
189
  "type-fest": "5.7.0",
186
- "undici": "8.4.1",
190
+ "undici": "8.5.0",
187
191
  "xdg-basedir": "5.1.0",
188
192
  "zod": "4.4.3"
189
193
  },
@@ -193,16 +197,17 @@
193
197
  "@types/mime-types": "3.0.1",
194
198
  "@types/node": "24.13.2",
195
199
  "@types/semver": "7.7.1",
196
- "@typescript/native-preview": "7.0.0-dev.20260614.1",
197
- "@vitest/coverage-v8": "4.1.8",
198
- "oxfmt": "0.54.0",
199
- "oxlint": "1.69.0",
200
+ "@typescript/native-preview": "7.0.0-dev.20260621.1",
201
+ "@vitest/coverage-v8": "4.1.9",
202
+ "oxfmt": "0.55.0",
203
+ "oxlint": "1.70.0",
200
204
  "oxlint-tsgolint": "0.23.0",
201
- "sonda": "0.13.0",
202
- "tsdown": "0.22.2",
205
+ "sonda": "0.13.1",
206
+ "tsdown": "0.22.3",
203
207
  "typescript": "6.0.3",
204
- "vitest": "4.1.8",
205
- "zinfer": "0.1.8"
208
+ "vitest": "4.1.9",
209
+ "zinfer": "0.2.2",
210
+ "@tailor-platform/tailor-proto": "^0.0.0"
206
211
  },
207
212
  "peerDependencies": {
208
213
  "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
@@ -1,4 +0,0 @@
1
-
2
- import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-WpWwTyk9.mjs";
3
-
4
- export { defineApplication, generatePluginFilesIfNeeded };