@tailor-platform/sdk 1.63.0 → 1.66.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.
- package/CHANGELOG.md +51 -0
- package/dist/{actor-J2gJ0eK5.d.mts → actor-D_2aJjYO.d.mts} +2 -2
- package/dist/{application-BezXGbrU.mjs → application-DGDmL8i_.mjs} +72 -9
- package/dist/application-DGDmL8i_.mjs.map +1 -0
- package/dist/application-nTydHJm8.mjs +4 -0
- package/dist/cli/index.mjs +66 -22
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +375 -375
- package/dist/cli/lib.mjs +3 -3
- package/dist/{client-CobIRHl-.mjs → client-F0a4cWUM.mjs} +3 -2
- package/dist/client-F0a4cWUM.mjs.map +1 -0
- package/dist/{client-C68VWo4g.mjs → client-boxXYevx.mjs} +1 -1
- package/dist/completion/zsh-worker.zsh +4043 -0
- package/dist/configure/index.d.mts +5 -5
- package/dist/configure/index.mjs +17 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crashreport-BhD0y14F.mjs → crashreport-0EHy-ayY.mjs} +2 -2
- package/dist/{crashreport-BhD0y14F.mjs.map → crashreport-0EHy-ayY.mjs.map} +1 -1
- package/dist/{crashreport-D1wKBJ8N.mjs → crashreport-Bf6uT6mf.mjs} +1 -1
- package/dist/{index-CLxubakC.d.mts → index-BdLqzJDu.d.mts} +19 -6
- package/dist/{index-CfRFkXIO.d.mts → index-Bhjep8cS.d.mts} +2 -2
- package/dist/{index-DUupuPhZ.d.mts → index-CZ2r3qiO.d.mts} +2 -2
- package/dist/{index-CPRnOjjt.d.mts → index-Db2RvnEH.d.mts} +2 -2
- package/dist/{index-CQZVJ5SX.d.mts → index-QpC0TNbH.d.mts} +2 -2
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/index.d.mts +2 -2
- package/dist/{plugin-C_FyVSdl.d.mts → plugin-DylAsA4Z.d.mts} +2 -2
- package/dist/{runtime-CW3jcQCc.mjs → runtime-2nzOZCUb.mjs} +728 -182
- package/dist/runtime-2nzOZCUb.mjs.map +1 -0
- package/dist/{tailordb-BlBGmQK-.d.mts → tailordb-C-ar4XCX.d.mts} +4 -4
- package/dist/utils/test/index.d.mts +3 -3
- package/dist/{workflow.generated-Bf1tWylx.d.mts → workflow.generated--1Qc15Et.d.mts} +62 -7
- package/docs/cli/auth.md +4 -4
- package/docs/cli/completion.md +3 -0
- package/docs/cli/function.md +8 -8
- package/docs/cli/query.md +1 -1
- package/docs/cli/workflow.md +10 -10
- package/docs/cli/workspace.md +14 -10
- package/docs/cli-reference.md +1 -1
- package/docs/services/aigateway.md +97 -0
- package/docs/services/auth.md +19 -0
- package/docs/services/idp.md +96 -0
- package/docs/services/tailordb-migration.md +17 -6
- package/package.json +12 -12
- package/dist/application-BezXGbrU.mjs.map +0 -1
- package/dist/application-DSXntqnV.mjs +0 -4
- package/dist/client-CobIRHl-.mjs.map +0 -1
- package/dist/runtime-CW3jcQCc.mjs.map +0 -1
|
@@ -11,8 +11,8 @@ type InferFieldsOutput<F extends Record<string, {
|
|
|
11
11
|
_output: any;
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
}>> = DeepWritable<Prettify<NullableToOptional<{ [K in keyof F]: output<F[K]> }>>>;
|
|
14
|
-
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
15
|
-
[key: string]: JsonValue;
|
|
14
|
+
type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | {
|
|
15
|
+
[key: string]: JsonValue$1;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* A looser version of JsonValue that accepts interfaces.
|
|
@@ -859,5 +859,5 @@ interface TailorDBType {
|
|
|
859
859
|
files?: TailorDBTypeMetadata["files"];
|
|
860
860
|
}
|
|
861
861
|
//#endregion
|
|
862
|
-
export { InferredAttributeList as A, FieldOutput as C, Validators as D, FieldValidateInput as E, InferFieldsOutput as F, JsonCompatible as I, JsonValue as L, TailorInvoker as M, TailorUser as N, AttributeList as O, unauthenticatedTailorUser as P, Prettify as R, FieldOptions as S, TailorToTs as T, PluginAttachment as _, TypeSourceInfoEntry as a, EnumValue as b, TailorAnyDBType as c, TailorDBType$1 as d, DBFieldMetadata as f, TailorField as g, SerialConfig as h, TailorDBType as i, InferredAttributeMap as j, AttributeMap as k, TailorDBField as l, GqlOperationsConfig as m, RelationType as n, ValueOperand as o, DefinedDBFieldMetadata as p, TailorDBServiceInput as r, TailorAnyDBField as s, IndexDef as t, TailorDBInstance as u, ArrayFieldOutput as v, TailorFieldType as w, FieldMetadata as x, DefinedFieldMetadata as y, output as z };
|
|
863
|
-
//# sourceMappingURL=tailordb-
|
|
862
|
+
export { InferredAttributeList as A, FieldOutput as C, Validators as D, FieldValidateInput as E, InferFieldsOutput as F, JsonCompatible as I, JsonValue$1 as L, TailorInvoker as M, TailorUser as N, AttributeList as O, unauthenticatedTailorUser as P, Prettify as R, FieldOptions as S, TailorToTs as T, PluginAttachment as _, TypeSourceInfoEntry as a, EnumValue as b, TailorAnyDBType as c, TailorDBType$1 as d, DBFieldMetadata as f, TailorField as g, SerialConfig as h, TailorDBType as i, InferredAttributeMap as j, AttributeMap as k, TailorDBField as l, GqlOperationsConfig as m, RelationType as n, ValueOperand as o, DefinedDBFieldMetadata as p, TailorDBServiceInput as r, TailorAnyDBField as s, IndexDef as t, TailorDBInstance as u, ArrayFieldOutput as v, TailorFieldType as w, FieldMetadata as x, DefinedFieldMetadata as y, output as z };
|
|
863
|
+
//# sourceMappingURL=tailordb-C-ar4XCX.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as TailorInvoker } from "../../tailordb-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { M as TailorInvoker } from "../../tailordb-C-ar4XCX.mjs";
|
|
2
|
+
import { Z as TailorDBType } from "../../workflow.generated--1Qc15Et.mjs";
|
|
3
|
+
import { jt as TailorField, n as output, wt as WORKFLOW_TEST_ENV_KEY } from "../../index-BdLqzJDu.mjs";
|
|
4
4
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
5
|
|
|
6
6
|
//#region src/utils/test/mock.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as FieldOutput$1, D as Validators, E as FieldValidateInput, F as InferFieldsOutput, N as TailorUser, R as Prettify, S as FieldOptions, T as TailorToTs, b as EnumValue, d as TailorDBType$1, f as DBFieldMetadata, g as TailorField, h as SerialConfig, j as InferredAttributeMap, l as TailorDBField$1, m as GqlOperationsConfig, n as RelationType, o as ValueOperand, p as DefinedDBFieldMetadata, r as TailorDBServiceInput, s as TailorAnyDBField$1, t as IndexDef, u as TailorDBInstance$1, v as ArrayFieldOutput, w as TailorFieldType, x as FieldMetadata, y as DefinedFieldMetadata, z as output } from "./tailordb-
|
|
2
|
-
import { B as IdProvider, G as SCIMAttribute, H as OAuth2ClientInput, J as SCIMConfig, L as AuthInvoker, R as BuiltinIdP, V as OAuth2Client, X as TenantProvider, r as PluginConfigs } from "./plugin-
|
|
1
|
+
import { C as FieldOutput$1, D as Validators, E as FieldValidateInput, F as InferFieldsOutput, N as TailorUser, R as Prettify, S as FieldOptions, T as TailorToTs, b as EnumValue, d as TailorDBType$1, f as DBFieldMetadata, g as TailorField, h as SerialConfig, j as InferredAttributeMap, l as TailorDBField$1, m as GqlOperationsConfig, n as RelationType, o as ValueOperand, p as DefinedDBFieldMetadata, r as TailorDBServiceInput, s as TailorAnyDBField$1, t as IndexDef, u as TailorDBInstance$1, v as ArrayFieldOutput, w as TailorFieldType, x as FieldMetadata, y as DefinedFieldMetadata, z as output } from "./tailordb-C-ar4XCX.mjs";
|
|
2
|
+
import { B as IdProvider, G as SCIMAttribute, H as OAuth2ClientInput, J as SCIMConfig, L as AuthInvoker, R as BuiltinIdP, V as OAuth2Client, X as TenantProvider, r as PluginConfigs } from "./plugin-DylAsA4Z.mjs";
|
|
3
3
|
import { n as TailorEnv } from "./env-B-g-qgE4.mjs";
|
|
4
|
-
import { IsAny, JsonObject, NonEmptyObject } from "type-fest";
|
|
4
|
+
import { IsAny, JsonObject, JsonValue, NonEmptyObject } from "type-fest";
|
|
5
5
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
6
|
|
|
7
7
|
//#region src/configure/types/field.d.ts
|
|
@@ -700,8 +700,44 @@ type MachineUser<User extends TailorDBInstance$1, AttributeMap extends UserAttri
|
|
|
700
700
|
} : {
|
|
701
701
|
attributeList: AttributeListToTuple<User, AttributeList>;
|
|
702
702
|
});
|
|
703
|
+
/** Upstream OAuth provider that federated a login through the Built-in IdP. */
|
|
704
|
+
type FederatedIdentityProvider = "google" | "microsoft";
|
|
705
|
+
/**
|
|
706
|
+
* Profile claims forwarded from the upstream OAuth provider's ID token.
|
|
707
|
+
*
|
|
708
|
+
* Commonly present claims are typed; any other claim the provider issues is
|
|
709
|
+
* forwarded as-is and reachable through the index signature. Availability
|
|
710
|
+
* varies by provider (e.g. Microsoft does not issue `picture`).
|
|
711
|
+
*/
|
|
712
|
+
type FederatedIdentityClaims = {
|
|
713
|
+
name?: string;
|
|
714
|
+
given_name?: string;
|
|
715
|
+
family_name?: string;
|
|
716
|
+
picture?: string;
|
|
717
|
+
locale?: string;
|
|
718
|
+
[claim: string]: JsonValue | undefined;
|
|
719
|
+
};
|
|
720
|
+
/**
|
|
721
|
+
* The upstream identity that federated this login, populated when a user signs
|
|
722
|
+
* in through a Built-in IdP OAuth provider (Google or Microsoft).
|
|
723
|
+
*
|
|
724
|
+
* Available on {@link BeforeLoginClaims.federated_identity}; `undefined` for
|
|
725
|
+
* password logins.
|
|
726
|
+
*/
|
|
727
|
+
type FederatedIdentity = {
|
|
728
|
+
provider: FederatedIdentityProvider;
|
|
729
|
+
claims: FederatedIdentityClaims;
|
|
730
|
+
};
|
|
731
|
+
/**
|
|
732
|
+
* Token claims passed to the {@link BeforeLoginHook} handler. Carries the IdP's
|
|
733
|
+
* own claims (e.g. `sub`, `email`) plus, for federated logins, the upstream
|
|
734
|
+
* provider's profile under {@link BeforeLoginClaims.federated_identity}.
|
|
735
|
+
*/
|
|
736
|
+
type BeforeLoginClaims = JsonObject & {
|
|
737
|
+
/** Present only for federated (Google/Microsoft) logins; `undefined` for password logins. */federated_identity?: FederatedIdentity;
|
|
738
|
+
};
|
|
703
739
|
type BeforeLoginHookArgs = {
|
|
704
|
-
claims:
|
|
740
|
+
claims: BeforeLoginClaims;
|
|
705
741
|
idpConfigName: string; /** Environment variables defined in `defineConfig({ env })`. */
|
|
706
742
|
env: TailorEnv;
|
|
707
743
|
};
|
|
@@ -748,6 +784,22 @@ type AuthServiceInputLoose = AuthServiceInput<any, any, any, string, any>;
|
|
|
748
784
|
type AuthOwnConfig = DefinedAuth<string, AuthServiceInputLoose, string>;
|
|
749
785
|
type AuthConfig = AuthOwnConfig | AuthExternalConfig;
|
|
750
786
|
//#endregion
|
|
787
|
+
//#region src/types/aigateway.generated.d.ts
|
|
788
|
+
type AIGateway = {
|
|
789
|
+
/** AI Gateway name */name: string; /** Auth namespace used to resolve request tokens against the workspace's auth */
|
|
790
|
+
authNamespace: string; /** Allowed CORS origins for browser-based clients. Each entry is `*`, `http(s)://*`, `http(s)://*.example.com`, or `http(s)://app.example.com`, optionally with `:port`. Empty list disables cross-origin access. */
|
|
791
|
+
cors?: string[] | undefined;
|
|
792
|
+
};
|
|
793
|
+
type AIGatewayInput = AIGateway;
|
|
794
|
+
//#endregion
|
|
795
|
+
//#region src/types/aigateway-config.d.ts
|
|
796
|
+
declare const aiGatewayDefinitionBrand: unique symbol;
|
|
797
|
+
type AIGatewayDefinitionBrand = {
|
|
798
|
+
readonly [aiGatewayDefinitionBrand]: true;
|
|
799
|
+
};
|
|
800
|
+
/** Type accepted by `AppConfig.aiGateways`. Only values returned by `defineAIGateway()` satisfy this. */
|
|
801
|
+
type AIGatewayConfig = AIGatewayInput & AIGatewayDefinitionBrand;
|
|
802
|
+
//#endregion
|
|
751
803
|
//#region src/types/app-config.generated.d.ts
|
|
752
804
|
type LogLevelEnum = "DEBUG" | "INFO" | "WARN" | "ERROR" | "SILENT";
|
|
753
805
|
//#endregion
|
|
@@ -1332,9 +1384,10 @@ type WorkflowServiceInput = WorkflowServiceConfig;
|
|
|
1332
1384
|
* - `auth`: Single auth config object (not an array)
|
|
1333
1385
|
* - `idp`: Array of IdP configs, e.g. `[myIdp]`
|
|
1334
1386
|
* - `staticWebsites`: Array of static website configs, e.g. `[website]`
|
|
1387
|
+
* - `aiGateways`: Array of AI Gateway configs, e.g. `[gateway]`
|
|
1335
1388
|
* - `db`, `resolver`, `executor`, `workflow`: Service configs with file globs
|
|
1336
1389
|
*/
|
|
1337
|
-
interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[] = IdPConfig[], StaticWebsites extends StaticWebsiteConfig[] = StaticWebsiteConfig[], Env extends Record<string, string | number | boolean> = Record<string, string | number | boolean>> {
|
|
1390
|
+
interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[] = IdPConfig[], StaticWebsites extends StaticWebsiteConfig[] = StaticWebsiteConfig[], AIGateways extends AIGatewayConfig[] = AIGatewayConfig[], Env extends Record<string, string | number | boolean> = Record<string, string | number | boolean>> {
|
|
1338
1391
|
/** Application name (required). */
|
|
1339
1392
|
name: string;
|
|
1340
1393
|
/**
|
|
@@ -1371,6 +1424,8 @@ interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[
|
|
|
1371
1424
|
httpAdapter?: HttpAdapterServiceInput;
|
|
1372
1425
|
/** Static website configurations. Must be an array, e.g. `[website]`. */
|
|
1373
1426
|
staticWebsites?: StaticWebsites;
|
|
1427
|
+
/** AI Gateway configurations. Must be an array, e.g. `[gateway]`. */
|
|
1428
|
+
aiGateways?: AIGateways;
|
|
1374
1429
|
/** Secret Manager vault configurations. Keys are vault names, values are records of secret names to values. */
|
|
1375
1430
|
secrets?: SecretsConfig;
|
|
1376
1431
|
/**
|
|
@@ -1412,5 +1467,5 @@ type ConcurrencyPolicy = {
|
|
|
1412
1467
|
/** Maximum number of concurrent executions (1-1000) */maxConcurrentExecutions: number;
|
|
1413
1468
|
};
|
|
1414
1469
|
//#endregion
|
|
1415
|
-
export {
|
|
1416
|
-
//# sourceMappingURL=workflow.generated
|
|
1470
|
+
export { PermissionCondition as $, AuthExternalConfig as A, SCIMAttributeType as B, IdPGqlOperationsInput as C, AIGatewayInput as D, AIGatewayDefinitionBrand as E, DefinedAuth as F, AuthConnectionConfig as G, UserAttributeListKey as H, FederatedIdentity as I, TailorAnyDBType as J, AuthConnectionOAuth2Config as K, FederatedIdentityClaims as L, AuthServiceInput as M, BeforeLoginClaims as N, AuthConfig as O, BeforeLoginHookArgs as P, db as Q, FederatedIdentityProvider as R, IdPGqlOperations as S, AIGatewayConfig as T, UserAttributeMap as U, UserAttributeKey as V, UsernameFieldKey as W, TailorDBInstance as X, TailorDBField as Y, TailorDBType as Z, IdPConfig as _, ExecutorServiceConfig as a, AllowedValuesOutput as at, IdpDefinitionBrand as b, ResolverServiceConfig as c, WorkflowServiceInput as d, TailorTypeGqlPermission as et, StaticWebsiteConfig as f, SecretsDefinitionBrand as g, SecretsConfig as h, AppConfig as i, AllowedValues as it, AuthOwnConfig as j, AuthConnectionTokenResult as k, ResolverServiceInput as l, StaticWebsiteInput as m, RetryPolicy as n, unsafeAllowAllGqlPermission as nt, ExecutorServiceInput as o, StaticWebsiteDefinitionBrand as p, TailorAnyDBField as q, HttpAdapterConfigInput as r, unsafeAllowAllTypePermission as rt, ResolverExternalConfig as s, ConcurrencyPolicy as t, TailorTypePermission as tt, WorkflowServiceConfig as u, IdPExternalConfig as v, IdPInput as w, IdPEmailConfig as x, IdPUserField as y, OAuth2ClientGrantType as z };
|
|
1471
|
+
//# sourceMappingURL=workflow.generated--1Qc15Et.d.mts.map
|
package/docs/cli/auth.md
CHANGED
|
@@ -350,7 +350,7 @@ Get an access token for a machine user.
|
|
|
350
350
|
**Usage**
|
|
351
351
|
|
|
352
352
|
```
|
|
353
|
-
tailor-sdk machineuser token [options]
|
|
353
|
+
tailor-sdk machineuser token [options] [name]
|
|
354
354
|
```
|
|
355
355
|
|
|
356
356
|
<!-- politty:command:machineuser token:usage:end -->
|
|
@@ -359,9 +359,9 @@ tailor-sdk machineuser token [options] <name>
|
|
|
359
359
|
|
|
360
360
|
**Arguments**
|
|
361
361
|
|
|
362
|
-
| Argument | Description
|
|
363
|
-
| -------- |
|
|
364
|
-
| `name` | Machine user name |
|
|
362
|
+
| Argument | Description | Required |
|
|
363
|
+
| -------- | --------------------------------------------------------------------------- | -------- |
|
|
364
|
+
| `name` | Machine user name. Falls back to the active profile's default machine user. | No |
|
|
365
365
|
|
|
366
366
|
<!-- politty:command:machineuser token:arguments:end -->
|
|
367
367
|
|
package/docs/cli/completion.md
CHANGED
|
@@ -41,6 +41,9 @@ tailor-sdk completion [options] [shell]
|
|
|
41
41
|
| `--instructions` | `-i` | Show installation instructions | No | `false` |
|
|
42
42
|
| `--loader` | - | Print just the rc loader snippet (bash/zsh). Add it to ~/.bashrc or ~/.zshrc; it auto-regenerates the cache when the binary changes. | No | `false` |
|
|
43
43
|
| `--install` | - | Write the completion script to its on-disk cache (bash/zsh) or autoload location (fish) instead of printing it. | No | `false` |
|
|
44
|
+
| `--static` | - | Generate the legacy static completion script with command metadata baked in. | No | `false` |
|
|
45
|
+
| `--dispatcher` | - | Generate the runtime dispatcher completion script. This is the default. | No | `false` |
|
|
46
|
+
| `--worker` | - | Generate an internal static worker artifact for dispatcher mode. | No | `false` |
|
|
44
47
|
|
|
45
48
|
<!-- politty:command:completion:options:end -->
|
|
46
49
|
|
package/docs/cli/function.md
CHANGED
|
@@ -245,14 +245,14 @@ tailor-sdk function test-run [options] <file>
|
|
|
245
245
|
|
|
246
246
|
**Options**
|
|
247
247
|
|
|
248
|
-
| Option | Alias | Description
|
|
249
|
-
| ------------------------------- | ----- |
|
|
250
|
-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID
|
|
251
|
-
| `--profile <PROFILE>` | `-p` | Workspace profile
|
|
252
|
-
| `--name <NAME>` | `-n` | Workflow job name to run (matches the `name` field of createWorkflowJob)
|
|
253
|
-
| `--arg <ARG>` | `-a` | JSON argument to pass to the function
|
|
254
|
-
| `--machine-user <MACHINE_USER>` | `-m` | Machine user name for authentication
|
|
255
|
-
| `--config <CONFIG>` | `-c` | Path to SDK config file
|
|
248
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
249
|
+
| ------------------------------- | ----- | ---------------------------------------------------------------------------------------------- | -------- | -------------------- | ----------------------------------- |
|
|
250
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
|
|
251
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
252
|
+
| `--name <NAME>` | `-n` | Workflow job name to run (matches the `name` field of createWorkflowJob) | No | - | - |
|
|
253
|
+
| `--arg <ARG>` | `-a` | JSON argument to pass to the function | No | - | - |
|
|
254
|
+
| `--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` |
|
|
255
|
+
| `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | - |
|
|
256
256
|
|
|
257
257
|
<!-- politty:command:function test-run:options:end -->
|
|
258
258
|
<!-- politty:command:function test-run:examples:start -->
|
package/docs/cli/query.md
CHANGED
|
@@ -33,7 +33,7 @@ tailor-sdk query [options]
|
|
|
33
33
|
| `--query <QUERY>` | `-q` | Query string to execute directly; omit to start REPL mode | No | - | - |
|
|
34
34
|
| `--file <FILE>` | `-f` | Read query string from file; omit to start REPL mode | No | - | - |
|
|
35
35
|
| `--edit` | - | Open a temporary file in your editor; omit to start REPL mode | No | `false` | - |
|
|
36
|
-
| `--machine-user <MACHINE_USER>` | `-m` | Machine user name for query execution
|
|
36
|
+
| `--machine-user <MACHINE_USER>` | `-m` | Machine user name for query execution. Falls back to the active profile's default machine user. | No | - | `TAILOR_PLATFORM_MACHINE_USER_NAME` |
|
|
37
37
|
| `--newline-on-enter` | - | REPL: when true, Enter inserts a newline and Shift+Enter submits. Use --no-newline-on-enter to swap. | No | - | - |
|
|
38
38
|
|
|
39
39
|
<!-- politty:command:query:options:end -->
|
package/docs/cli/workflow.md
CHANGED
|
@@ -167,16 +167,16 @@ tailor-sdk workflow start [options] <name>
|
|
|
167
167
|
|
|
168
168
|
**Options**
|
|
169
169
|
|
|
170
|
-
| Option | Alias | Description
|
|
171
|
-
| ------------------------------- | ----- |
|
|
172
|
-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID
|
|
173
|
-
| `--profile <PROFILE>` | `-p` | Workspace profile
|
|
174
|
-
| `--config <CONFIG>` | `-c` | Path to SDK config file
|
|
175
|
-
| `--machine-user <MACHINE_USER>` | `-m` | Machine user name
|
|
176
|
-
| `--arg <ARG>` | `-a` | Workflow argument (JSON string)
|
|
177
|
-
| `--wait` | `-W` | Wait for execution to complete
|
|
178
|
-
| `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m')
|
|
179
|
-
| `--logs` | `-l` | Display job execution logs after completion (requires --wait)
|
|
170
|
+
| Option | Alias | Description | Required | Default | Env |
|
|
171
|
+
| ------------------------------- | ----- | --------------------------------------------------------------------------- | -------- | -------------------- | ----------------------------------- |
|
|
172
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
|
|
173
|
+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
|
|
174
|
+
| `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
|
|
175
|
+
| `--machine-user <MACHINE_USER>` | `-m` | Machine user name. Falls back to the active profile's default machine user. | No | - | `TAILOR_PLATFORM_MACHINE_USER_NAME` |
|
|
176
|
+
| `--arg <ARG>` | `-a` | Workflow argument (JSON string) | No | - | - |
|
|
177
|
+
| `--wait` | `-W` | Wait for execution to complete | No | `false` | - |
|
|
178
|
+
| `--interval <INTERVAL>` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - |
|
|
179
|
+
| `--logs` | `-l` | Display job execution logs after completion (requires --wait) | No | `false` | - |
|
|
180
180
|
|
|
181
181
|
<!-- politty:command:workflow start:options:end -->
|
|
182
182
|
|
package/docs/cli/workspace.md
CHANGED
|
@@ -241,11 +241,13 @@ tailor-sdk profile create [options] <name>
|
|
|
241
241
|
|
|
242
242
|
**Options**
|
|
243
243
|
|
|
244
|
-
| Option
|
|
245
|
-
|
|
|
246
|
-
| `--user <USER>`
|
|
247
|
-
| `--workspace-id <WORKSPACE_ID>`
|
|
248
|
-
| `--permission <PERMISSION>`
|
|
244
|
+
| Option | Alias | Description | Required | Default |
|
|
245
|
+
| ------------------------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------- |
|
|
246
|
+
| `--user <USER>` | `-u` | User email | Yes | - |
|
|
247
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | Yes | - |
|
|
248
|
+
| `--permission <PERMISSION>` | - | Profile permission. 'read' blocks all write commands while the profile is active. | No | `"write"` |
|
|
249
|
+
| `--machine-user <MACHINE_USER>` | `-m` | Default machine user name for application-data commands (query, workflow start, function test-run, machineuser token). | No | - |
|
|
250
|
+
| `--machine-user-override <MACHINE_USER_OVERRIDE>` | - | Whether the command line or TAILOR_PLATFORM_MACHINE_USER_NAME may override the profile's machine user. 'deny' requires --machine-user. | No | - |
|
|
249
251
|
|
|
250
252
|
<!-- politty:command:profile create:options:end -->
|
|
251
253
|
|
|
@@ -320,11 +322,13 @@ tailor-sdk profile update [options] <name>
|
|
|
320
322
|
|
|
321
323
|
**Options**
|
|
322
324
|
|
|
323
|
-
| Option
|
|
324
|
-
|
|
|
325
|
-
| `--user <USER>`
|
|
326
|
-
| `--workspace-id <WORKSPACE_ID>`
|
|
327
|
-
| `--permission <PERMISSION>`
|
|
325
|
+
| Option | Alias | Description | Required | Default |
|
|
326
|
+
| ------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
|
|
327
|
+
| `--user <USER>` | `-u` | New user email | No | - |
|
|
328
|
+
| `--workspace-id <WORKSPACE_ID>` | `-w` | New workspace ID | No | - |
|
|
329
|
+
| `--permission <PERMISSION>` | - | Profile permission. 'read' blocks all write commands; 'write' lifts the restriction. | No | - |
|
|
330
|
+
| `--machine-user <MACHINE_USER>` | `-m` | Default machine user name for application-data commands (query, workflow start, function test-run, machineuser token). Pass an empty string to clear. | No | - |
|
|
331
|
+
| `--machine-user-override <MACHINE_USER_OVERRIDE>` | - | Whether the command line or TAILOR_PLATFORM_MACHINE_USER_NAME may override the profile's machine user. 'deny' requires --machine-user; 'allow' lifts the restriction. | No | - |
|
|
328
332
|
|
|
329
333
|
<!-- politty:command:profile update:options:end -->
|
|
330
334
|
|
package/docs/cli-reference.md
CHANGED
|
@@ -77,7 +77,7 @@ You can use environment variables to configure workspace and authentication:
|
|
|
77
77
|
| `TAILOR_PLATFORM_SDK_DTS_PATH` | Output path for generated `tailor.d.ts` type definition file |
|
|
78
78
|
| `TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID` | Client ID for `login --machine-user` |
|
|
79
79
|
| `TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET` | Client secret for `login --machine-user` |
|
|
80
|
-
| `TAILOR_PLATFORM_MACHINE_USER_NAME` | Default machine user name for `query`, `workflow start`, `function test-run`
|
|
80
|
+
| `TAILOR_PLATFORM_MACHINE_USER_NAME` | Default machine user name for `query`, `workflow start`, `function test-run`, `machineuser token` |
|
|
81
81
|
| `TAILOR_BUNDLE_CONCURRENCY` | Max concurrent bundle workers for `deploy` (resolvers/executors/workflows). Defaults to CPU count |
|
|
82
82
|
| `VISUAL` / `EDITOR` | Preferred editor for commands that open files (e.g., `vim`, `code`, `nano`) |
|
|
83
83
|
| `TAILOR_CRASH_REPORTS_LOCAL` | Local crash log writing: `on` (default) or `off` |
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# AI Gateway
|
|
2
|
+
|
|
3
|
+
AI Gateway provides a unified endpoint for accessing multiple LLM providers (Azure OpenAI, Google Vertex AI Gemini, Anthropic via Vertex AI) through a single OpenAI-compatible API, with platform-managed credentials and workspace-scoped authentication.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
AI Gateway provides:
|
|
8
|
+
|
|
9
|
+
- A unified, OpenAI-compatible endpoint for multiple LLM providers
|
|
10
|
+
- Mandatory authentication via your workspace's auth (request tokens are resolved against the configured auth namespace)
|
|
11
|
+
- Per-workspace isolation: each gateway is provisioned with its own platform-assigned URL
|
|
12
|
+
- Optional CORS allow-list for browser-based clients
|
|
13
|
+
- Built-in usage tracking and rate limiting (configured platform-side)
|
|
14
|
+
|
|
15
|
+
## Configuration
|
|
16
|
+
|
|
17
|
+
Configure an AI Gateway using `defineAIGateway()`:
|
|
18
|
+
|
|
19
|
+
**Definition Rules:**
|
|
20
|
+
|
|
21
|
+
- **Multiple gateways allowed**: You can define multiple AI Gateways in your config file
|
|
22
|
+
- **Configuration location**: Define in `tailor.config.ts` and add to the `aiGateways` array
|
|
23
|
+
- **Uniqueness**: Gateway names must be unique across all AI Gateways
|
|
24
|
+
- **Name pattern**: `name` must match `^[a-z0-9][a-z0-9-]{1,28}[a-z0-9]$` (lowercase alphanumeric and hyphens, 3-30 characters)
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { defineAIGateway, defineConfig } from "@tailor-platform/sdk";
|
|
28
|
+
|
|
29
|
+
const aiGateway = defineAIGateway("my-aigateway", {
|
|
30
|
+
authNamespace: "default",
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export default defineConfig({
|
|
34
|
+
aiGateways: [aiGateway],
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Options
|
|
39
|
+
|
|
40
|
+
### authNamespace
|
|
41
|
+
|
|
42
|
+
The auth namespace used to resolve request tokens against your workspace's auth configuration. Must match an existing auth namespace.
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
defineAIGateway("my-aigateway", {
|
|
46
|
+
authNamespace: "default",
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### cors
|
|
51
|
+
|
|
52
|
+
Optional list of allowed origins for browser-based clients. Each entry is one of:
|
|
53
|
+
|
|
54
|
+
- `*` — any origin (any scheme, any host)
|
|
55
|
+
- `http(s)://*` — any host on the given scheme
|
|
56
|
+
- `http(s)://*.example.com` — any subdomain of `example.com` on the given scheme
|
|
57
|
+
- `http(s)://app.example.com` — an exact origin
|
|
58
|
+
|
|
59
|
+
An optional `:port` may be appended in all URL forms. Omitting `cors` (or passing `[]`) disables cross-origin access — browsers will block any cross-origin reads.
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
defineAIGateway("my-aigateway", {
|
|
63
|
+
authNamespace: "default",
|
|
64
|
+
cors: ["https://app.example.com", "https://*.example.com"],
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Complete Example
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
import {
|
|
72
|
+
defineAIGateway,
|
|
73
|
+
defineAuth,
|
|
74
|
+
defineConfig,
|
|
75
|
+
defineStaticWebSite,
|
|
76
|
+
} from "@tailor-platform/sdk";
|
|
77
|
+
|
|
78
|
+
const website = defineStaticWebSite("my-frontend", {
|
|
79
|
+
description: "Frontend application",
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const aiGateway = defineAIGateway("my-aigateway", {
|
|
83
|
+
authNamespace: "default",
|
|
84
|
+
cors: [website.url],
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const auth = defineAuth("my-auth", {
|
|
88
|
+
// ...auth configuration...
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export default defineConfig({
|
|
92
|
+
name: "my-app",
|
|
93
|
+
auth,
|
|
94
|
+
staticWebsites: [website],
|
|
95
|
+
aiGateways: [aiGateway],
|
|
96
|
+
});
|
|
97
|
+
```
|
package/docs/services/auth.md
CHANGED
|
@@ -515,6 +515,25 @@ export const auth = defineAuth("my-auth", {
|
|
|
515
515
|
|
|
516
516
|
**invoker**: The machine user whose permissions are used to execute the hook. Must reference a machine user defined in the same auth configuration.
|
|
517
517
|
|
|
518
|
+
### Federated identity claims
|
|
519
|
+
|
|
520
|
+
When a user signs in through a Built-in IdP OAuth provider (Google or Microsoft), the upstream provider's profile is available on `claims.federated_identity`. It is `undefined` for password logins, so guard before reading it. Commonly present claims (`name`, `given_name`, `family_name`, `picture`, `locale`) are typed; any other claim the provider issues is forwarded as-is. Availability varies by provider (for example, Microsoft does not issue `picture`).
|
|
521
|
+
|
|
522
|
+
```typescript
|
|
523
|
+
hooks: {
|
|
524
|
+
beforeLogin: {
|
|
525
|
+
handler: async ({ claims }) => {
|
|
526
|
+
const federated = claims.federated_identity;
|
|
527
|
+
if (federated?.provider === "google") {
|
|
528
|
+
// Populate the user record from the upstream profile
|
|
529
|
+
const avatarUrl = federated.claims.picture;
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
invoker: "hook-invoker",
|
|
533
|
+
},
|
|
534
|
+
}
|
|
535
|
+
```
|
|
536
|
+
|
|
518
537
|
## CLI Commands
|
|
519
538
|
|
|
520
539
|
Manage Auth resources using the CLI:
|
package/docs/services/idp.md
CHANGED
|
@@ -125,6 +125,89 @@ defineIdp("my-idp", {
|
|
|
125
125
|
});
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
+
### userAuthPolicy
|
|
129
|
+
|
|
130
|
+
User authentication policy. Controls password requirements, the identifier used for login, allowed email domains, and social login providers. Every field is optional. The boolean options default to disabled, and the password length fields default to a minimum of 6 and a maximum of 4096.
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
defineIdp("my-idp", {
|
|
134
|
+
clients: ["my-client"],
|
|
135
|
+
userAuthPolicy: {
|
|
136
|
+
useNonEmailIdentifier: false,
|
|
137
|
+
allowSelfPasswordReset: true,
|
|
138
|
+
passwordRequireUppercase: true,
|
|
139
|
+
passwordRequireLowercase: true,
|
|
140
|
+
passwordRequireNonAlphanumeric: true,
|
|
141
|
+
passwordRequireNumeric: true,
|
|
142
|
+
passwordMinLength: 8,
|
|
143
|
+
passwordMaxLength: 128,
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Login behavior:**
|
|
149
|
+
|
|
150
|
+
- `useNonEmailIdentifier` - Allow a non-email identifier (username) instead of requiring an email address. Default `false`.
|
|
151
|
+
- `allowSelfPasswordReset` - Show the "Forgot password?" flow so users can reset their own password. Default `false`.
|
|
152
|
+
- `disablePasswordAuth` - Remove password authentication entirely. Default `false`. Requires at least one social login provider to be enabled.
|
|
153
|
+
|
|
154
|
+
**Password requirements:**
|
|
155
|
+
|
|
156
|
+
- `passwordRequireUppercase` - Require at least one uppercase letter. Default `false`.
|
|
157
|
+
- `passwordRequireLowercase` - Require at least one lowercase letter. Default `false`.
|
|
158
|
+
- `passwordRequireNumeric` - Require at least one numeric character. Default `false`.
|
|
159
|
+
- `passwordRequireNonAlphanumeric` - Require at least one non-alphanumeric character. Default `false`.
|
|
160
|
+
- `passwordMinLength` - Minimum password length. Must be between 6 and 30. Default `6`.
|
|
161
|
+
- `passwordMaxLength` - Maximum password length. Must be between 6 and 4096. Default `4096`.
|
|
162
|
+
|
|
163
|
+
**Email domains and social login:**
|
|
164
|
+
|
|
165
|
+
- `allowedEmailDomains` - Restrict registration to these email domains. An empty list (the default) allows all domains, but a non-empty list is required when `allowGoogleOauth` or `allowMicrosoftOauth` is enabled.
|
|
166
|
+
- `allowGoogleOauth` - Enable the "Sign in with Google" button. Default `false`.
|
|
167
|
+
- `allowMicrosoftOauth` - Enable the "Sign in with Microsoft" button. Default `false`.
|
|
168
|
+
|
|
169
|
+
**Constraints:** the following combinations are rejected at parse time.
|
|
170
|
+
|
|
171
|
+
- `passwordMinLength` must be less than or equal to `passwordMaxLength`.
|
|
172
|
+
- A non-empty `allowedEmailDomains` cannot be combined with `useNonEmailIdentifier: true` (an empty list is allowed). Enabling `allowGoogleOauth` or `allowMicrosoftOauth` is likewise rejected with `useNonEmailIdentifier: true` (leaving them `false` or unset is fine).
|
|
173
|
+
- `allowGoogleOauth` requires a non-empty `allowedEmailDomains`.
|
|
174
|
+
- `allowMicrosoftOauth` requires both a non-empty `allowedEmailDomains` and `disablePasswordAuth: true`.
|
|
175
|
+
- `disablePasswordAuth` requires `allowGoogleOauth` or `allowMicrosoftOauth`, and cannot be combined with `allowSelfPasswordReset`.
|
|
176
|
+
|
|
177
|
+
### gqlOperations
|
|
178
|
+
|
|
179
|
+
Controls which GraphQL user-management operations the IdP exposes. All operations are enabled by default. Use this to turn operations off entirely, independent of the `permission` policies that decide who may call them.
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
defineIdp("my-idp", {
|
|
183
|
+
clients: ["my-client"],
|
|
184
|
+
gqlOperations: {
|
|
185
|
+
create: true,
|
|
186
|
+
read: true,
|
|
187
|
+
update: true,
|
|
188
|
+
delete: false,
|
|
189
|
+
sendPasswordResetEmail: false,
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Fields:** each field defaults to `true` (enabled). Set a field to `false` to disable that operation.
|
|
195
|
+
|
|
196
|
+
- `create` - The `_createUser` mutation.
|
|
197
|
+
- `read` - The `_users` and `_user` query operations.
|
|
198
|
+
- `update` - The `_updateUser` mutation.
|
|
199
|
+
- `delete` - The `_deleteUser` mutation.
|
|
200
|
+
- `sendPasswordResetEmail` - The `_sendPasswordResetEmail` mutation.
|
|
201
|
+
|
|
202
|
+
**Shortcut:** pass the string `"query"` to expose a read-only IdP. It enables `read` and disables every mutation.
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
defineIdp("my-idp", {
|
|
206
|
+
clients: ["my-client"],
|
|
207
|
+
gqlOperations: "query",
|
|
208
|
+
});
|
|
209
|
+
```
|
|
210
|
+
|
|
128
211
|
### authorization (optional, legacy)
|
|
129
212
|
|
|
130
213
|
Legacy access control field. Use `permission` instead for fine-grained per-operation control. This field is kept for backward compatibility.
|
|
@@ -170,6 +253,19 @@ defineIdp("my-idp", {
|
|
|
170
253
|
|
|
171
254
|
**Validation:** Each field must be 200 characters or less and must not contain newline characters.
|
|
172
255
|
|
|
256
|
+
### lang
|
|
257
|
+
|
|
258
|
+
UI language for the IdP-hosted pages such as the login and password reset screens.
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
defineIdp("my-idp", {
|
|
262
|
+
clients: ["my-client"],
|
|
263
|
+
lang: "ja",
|
|
264
|
+
});
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Values:** `"en"` or `"ja"`.
|
|
268
|
+
|
|
173
269
|
### publishUserEvents
|
|
174
270
|
|
|
175
271
|
Publish IdP user lifecycle events (`idp.user.created`, `idp.user.updated`, `idp.user.deleted`). These events are consumed by executors that use `idpUserCreatedTrigger`, `idpUserUpdatedTrigger`, `idpUserDeletedTrigger`, or `idpUserTrigger`.
|
|
@@ -355,20 +355,21 @@ Coordinate this with your team because everyone else's local migrations will be
|
|
|
355
355
|
|
|
356
356
|
## Failure Recovery
|
|
357
357
|
|
|
358
|
-
If
|
|
358
|
+
If the pre-migration phase or `migrate.ts` fails:
|
|
359
359
|
|
|
360
360
|
- **The transaction rolls back** for that migration's script. Database changes the script made are undone.
|
|
361
|
-
- **The pre-migration
|
|
362
|
-
- The whole `apply` aborts. Subsequent migrations in the same run do not execute.
|
|
361
|
+
- **The pre-migration schema changes are rolled back** to the prior checkpoint: types that already existed are restored to their previous shape, and types the migration newly introduced are dropped. The workspace is left at its prior checkpoint and prior schema — not half-applied.
|
|
362
|
+
- The whole `apply` aborts and the checkpoint label is not bumped. Subsequent migrations in the same run do not execute.
|
|
363
|
+
|
|
364
|
+
The rollback is best-effort per type; if reverting a type fails, a warning is logged and the original migration error is still reported.
|
|
363
365
|
|
|
364
366
|
After a failure:
|
|
365
367
|
|
|
366
368
|
1. Read the `Logs:` block in the apply output to find the cause.
|
|
367
369
|
2. Fix `migrate.ts` (or the data it depends on).
|
|
368
|
-
3. Re-run `tailor-sdk deploy`. The same migration runs again because its label was never bumped.
|
|
369
|
-
4. If the pre-migration relaxation is causing problems for application code in the meantime, accept the temporary optionality or roll forward with a fix; do not try to manually re-tighten the schema, or you'll create remote drift.
|
|
370
|
+
3. Re-run `tailor-sdk deploy`. The same migration runs again because its label was never bumped, and the prior-checkpoint schema is a clean baseline to retry against.
|
|
370
371
|
|
|
371
|
-
If a migration **succeeds in script** but the post-migration phase fails (rare; usually
|
|
372
|
+
If a migration **succeeds in script** but the **post-migration phase** fails (rare; usually a constraint violation the script should have prevented), the pre-migration changes are **not** rolled back: the script's data changes are already committed and the post-migration phase may have dropped removed columns or types, which cannot be reverted without data loss. Investigate, fix, and re-run.
|
|
372
373
|
|
|
373
374
|
## Rollback Strategy
|
|
374
375
|
|
|
@@ -444,6 +445,16 @@ For genuinely different schemas across environments, prefer separate workspaces
|
|
|
444
445
|
4. To force the remote schema back to a known snapshot, use `migration sync <N>` (see [`migration sync` Semantics](#migration-sync-semantics)).
|
|
445
446
|
5. As a last resort in non-production environments, `--no-schema-check` skips both checks. Do not use this as a routine workaround.
|
|
446
447
|
|
|
448
|
+
### "Invalid schema snapshot" or "Invalid migration diff" error
|
|
449
|
+
|
|
450
|
+
**Cause:** A `schema.json` or `diff.json` file in the `migrations/` directory is corrupted or does not match the expected structure. Merge conflicts left in these files are a common cause.
|
|
451
|
+
|
|
452
|
+
**Resolution:**
|
|
453
|
+
|
|
454
|
+
1. Read the error message — it includes the file path and the offending field.
|
|
455
|
+
2. Restore the file from version control (`git checkout -- <path>`), or regenerate migration files with `migration generate` / `migration script`.
|
|
456
|
+
3. Do not hand-edit `schema.json` or `diff.json`; they are managed by the CLI.
|
|
457
|
+
|
|
447
458
|
### "No machine user available for migration execution"
|
|
448
459
|
|
|
449
460
|
**Cause:** Neither `migration.machineUser` is set nor are there any machine users in `auth.machineUsers`.
|