@sequenceholdings/studio-cli 0.9.12 → 0.9.13

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/README.md CHANGED
@@ -915,12 +915,13 @@ compiled to canonical SQL before registration.
915
915
  | `seq-studio orm generate [dir]` | Generate `schema.graphql`, `operations.manifest.json`, `typePolicies.gen.ts`, `namespace.contract.json`, `sql-operations.gen.ts`, and consumer codegen when `codegen.ts` is present. |
916
916
  | `seq-studio orm generate [dir] --migration-export [--check]` | Export `orm.migration.json` after validating the committed ORM migration. Pipeline migration planning recompiles these declarative inputs. `--check` compares against the current source and operations without writing; use it in CI. |
917
917
  | `seq-studio orm validate [dir]` | Parse and compile the namespace, then verify its committed migration chain is current. |
918
- | `seq-studio orm plan [dir] -e <env>` | Compare the compiled namespace with registry state without applying database changes. |
918
+ | `seq-studio orm plan [dir] -e <env>` | Compare the compiled namespace with registry state without applying database changes; when available, print the live activation's source and provenance. |
919
919
  | `seq-studio orm diff [dir] [--check]` | Author the next committed migration, or verify the migration/snapshot chain offline for CI. |
920
- | `seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait]` | Author a migration if needed, register/apply the namespace, activate its operation set, publish its declared capabilities, and refresh generated outputs. Waits until the new version is live (prints `live:`; default up to 20m); `--no-wait` returns once queued. |
921
- | `seq-studio orm history <namespace> -e <env> [--limit N] [--json]` | List every change to the namespace's live schema and operations, newest first, with the actor and the Git Service source. `apply` from a clone of the target environment's Git Service (or `--repo`) sends its commit and package path; Atlas checks it and records `verified`, `ci` or `reported`. Recording never refuses an apply. |
922
- | `seq-studio orm deployment-policy <namespace> -e <env> [--json]` | Inspect whether a namespace permits manual deployment or requires its enrolled repository's verified CI deployment. |
920
+ | `seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait] [--unverified-source "<reason>"]` | Author a migration if needed, register/apply the namespace, activate its operation set, publish its declared capabilities, and refresh generated outputs. Waits until the new version is live (prints `live:`; default up to 20m); `--no-wait` returns once queued. |
921
+ | `seq-studio orm history <namespace> -e <env> [--limit N] [--json]` | List every change to the namespace's live schema and operations, newest first, with the actor and the Git Service source. `apply` from a clone of the target environment's Git Service (or `--repo`) sends its commit and package path; Atlas checks it and records `verified`, `ci`, `break_glass` or `reported`. Environments with `ORM_REQUIRE_VERIFIED_SOURCE=1`, and namespaces pinned with `--mode source`, refuse unverified applies; a namespace admin can override with `orm apply --unverified-source "<reason>"`. |
922
+ | `seq-studio orm deployment-policy <namespace> -e <env> [--json]` | Inspect whether a namespace permits manual deployment, requires its enrolled repository's verified CI deployment, or is pinned to a verified source repository, branch and package path. |
923
923
  | `seq-studio orm deployment-policy <namespace> -e <env> --mode ci --repo <ns>/<name> --branch <branch> --target <target-key>` | Explicitly enroll an existing namespace. Requires namespace Admin, repository Admin, and an automatic branch policy already bound to this exact namespace. |
924
+ | `seq-studio orm deployment-policy <namespace> -e <env> --mode source --repo <ns>/<name> --branch <branch> --path <dir>` | Keep direct applies but accept only ones Atlas verifies came from that repository, branch and package directory. Requires namespace Admin and repository Read. |
924
925
  | `seq-studio orm deployment-policy <namespace> -e <env> --mode manual` | Restore direct, permission-checked deployment; requires namespace Admin. |
925
926
  | `seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...` | Execute the deployed version's persisted operation by name, as the signed-in caller. Needs no checkout. |
926
927
  | `seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>` | Execute an operation from the checkout's manifest through the installed ORM package, with variables from a JSON object file, as the signed-in caller. |
@@ -1,9 +1,9 @@
1
1
  export { PIPELINE_HELP } from './pipeline/help.js';
2
2
  /** `--repo` on every init command; shared so the commands describe it identically. */
3
3
  export declare const INIT_INTO_REPO_HELP = " Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n";
4
- export declare const ORM_HISTORY_HELP = "usage:\n seq-studio orm history <namespace> -e <env> [--limit N] [--json]\n\n Lists every change to the namespace's live schema and operations, newest\n first: when, who, what moved, and the Git Service source. \"verified\" and \"ci\"\n sources were checked by Atlas against the repository; \"reported\" means Atlas\n could not tie the change to a pushed commit on a release branch, with the\n reason when one was claimed. * marks the live activation. History starts with\n the first apply after the environment recorded it.\n";
5
- export declare const ORM_DEPLOYMENT_POLICY_HELP = "usage:\n seq-studio orm deployment-policy <namespace> -e <env> [--json]\n seq-studio orm deployment-policy <namespace> -e <env> --mode ci --repo <ns>/<name> --branch <branch> --target <target-key>\n seq-studio orm deployment-policy <namespace> -e <env> --mode manual\n\n Existing namespaces default to manual deployment. CI mode rejects direct ORM\n registration, schema apply, and operations-only activation on the server;\n only the enrolled repository's verified merge deployment may activate changes.\n Enabling CI mode requires namespace Admin, repository Admin, and an existing\n automatic branch binding to this namespace. Restoring manual mode requires\n namespace Admin. This changes deployment policy; it does not deploy source.\n";
6
- export declare const ORM_HELP = "usage:\n seq-studio orm init <dir> [--repo <ns>/<name>]\n seq-studio orm generate [dir] [--migration-export] [--check]\n seq-studio orm validate [dir]\n seq-studio orm plan [dir] -e <env>\n seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait]\n seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci] [--repo <ns>/<name> --branch <branch> --target <target-key>] [--json]\n seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...\n seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>\n seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]\n seq-studio orm describe <namespace> [<table> | --operations] -e <env> [--json]\n seq-studio orm operation show <namespace> <name> -e <env> [--json]\n seq-studio orm read <namespace> <table> -e <env> [--where <column>=<op>.<value>]... [--select <cols>] [--order <col>[.desc]] [--limit N] [--offset N] [--json|--jsonl]\n seq-studio orm sql <namespace> --query <sql> | --file <path> -e <env> [--param <name>[:<type>]=<value>]... | [--params <json-object>] [--json|--jsonl]\n seq-studio orm diff [dir] [--check] [--allow-destructive] [--rebase]\n seq-studio orm migrate-from-yaml <dir>\n seq-studio orm import [dir] --spec <file> | --table <table> --from <schema.table> --map <target=source,...>\n\n -e/--env is required for commands that contact Atlas. Use seq-studio envs list\n to discover environments and seq-studio login to authenticate.\n Schema commands require the ORM loaded by seq-studio to satisfy the v2\n namespace's package.json @sequenceholdings/orm range before compiling.\n apply waits until the new version is live and serving (default up to 20m), then\n prints \"live:\"; --no-wait returns once the apply is queued.\n CI-managed namespaces reject direct apply; use the enrolled repository's merge\n workflow. deployment-policy reads or explicitly changes this namespace setting.\n namespaces lists what you can read; describe shows its tables and operations.\n Run seq-studio orm describe --help for the output.\n execute <namespace> <operation> runs the deployed version's persisted operation by\n name, with no checkout. Run seq-studio orm execute --help for both forms.\n read and sql query a v2 namespace as you through its built-in read-only SQL.\n sql must name tables as <namespace>.<table> (FROM lending.loans, not FROM loans).\n Run seq-studio orm read --help for the filter grammar, parameters, and output formats.\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n";
4
+ export declare const ORM_HISTORY_HELP = "usage:\n seq-studio orm history <namespace> -e <env> [--limit N] [--json]\n\n Lists every change to the namespace's live schema and operations, newest\n first: when, who, what moved, and the Git Service source. \"verified\" and \"ci\"\n sources were checked by Atlas against the repository; \"reported\" means Atlas\n could not tie the change to a pushed commit on a release branch, with the\n reason when one was claimed. \"break_glass\" is an admin override made with\n orm apply --unverified-source \"<reason>\". * marks the live activation.\n History starts with the first apply after the environment recorded it.\n";
5
+ export declare const ORM_DEPLOYMENT_POLICY_HELP = "usage:\n seq-studio orm deployment-policy <namespace> -e <env> [--json]\n seq-studio orm deployment-policy <namespace> -e <env> --mode ci --repo <ns>/<name> --branch <branch> --target <target-key>\n seq-studio orm deployment-policy <namespace> -e <env> --mode manual\n seq-studio orm deployment-policy <namespace> -e <env> --mode source --repo <ns>/<name> --branch <branch> --path <dir>\n\n Existing namespaces default to manual deployment. CI mode rejects direct ORM\n registration, schema apply, and operations-only activation on the server;\n only the enrolled repository's verified merge deployment may activate changes.\n Enabling CI mode requires namespace Admin, repository Admin, and an existing\n automatic branch binding to this namespace. Restoring manual mode requires\n namespace Admin. This changes deployment policy; it does not deploy source.\n\n Source mode keeps direct applies but accepts only ones Atlas verifies came\n from that repository, branch and package directory (pass --path . for the\n repository root). It requires namespace Admin and repository Read. Namespace\n admins can still apply with --unverified-source \"<reason>\", which is recorded.\n";
6
+ export declare const ORM_HELP = "usage:\n seq-studio orm init <dir> [--repo <ns>/<name>]\n seq-studio orm generate [dir] [--migration-export] [--check]\n seq-studio orm validate [dir]\n seq-studio orm plan [dir] -e <env>\n seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait] [--unverified-source \"<reason>\"]\n seq-studio orm history <namespace> -e <env> [--limit N] [--json]\n seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci|source] [--repo <ns>/<name> --branch <branch> (--target <target-key> | --path <dir>)] [--json]\n seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...\n seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>\n seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]\n seq-studio orm describe <namespace> [<table> | --operations] -e <env> [--json]\n seq-studio orm operation show <namespace> <name> -e <env> [--json]\n seq-studio orm read <namespace> <table> -e <env> [--where <column>=<op>.<value>]... [--select <cols>] [--order <col>[.desc]] [--limit N] [--offset N] [--json|--jsonl]\n seq-studio orm sql <namespace> --query <sql> | --file <path> -e <env> [--param <name>[:<type>]=<value>]... | [--params <json-object>] [--json|--jsonl]\n seq-studio orm diff [dir] [--check] [--allow-destructive] [--rebase]\n seq-studio orm migrate-from-yaml <dir>\n seq-studio orm import [dir] --spec <file> | --table <table> --from <schema.table> --map <target=source,...>\n\n -e/--env is required for commands that contact Atlas. Use seq-studio envs list\n to discover environments and seq-studio login to authenticate.\n Schema commands require the ORM loaded by seq-studio to satisfy the v2\n namespace's package.json @sequenceholdings/orm range before compiling.\n apply waits until the new version is live and serving (default up to 20m), then\n prints \"live:\"; --no-wait returns once the apply is queued.\n CI-managed namespaces reject direct apply; use the enrolled repository's merge\n workflow. Source-pinned namespaces accept only applies Atlas verifies against\n their repository, branch and package path, and an environment can require a\n verified source for every apply. A namespace admin may record an audited\n exception with --unverified-source \"<reason>\". deployment-policy reads or\n explicitly changes this namespace setting.\n namespaces lists what you can read; describe shows its tables and operations.\n Run seq-studio orm describe --help for the output.\n execute <namespace> <operation> runs the deployed version's persisted operation by\n name, with no checkout. Run seq-studio orm execute --help for both forms.\n read and sql query a v2 namespace as you through its built-in read-only SQL.\n sql must name tables as <namespace>.<table> (FROM lending.loans, not FROM loans).\n Run seq-studio orm read --help for the filter grammar, parameters, and output formats.\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n";
7
7
  /** Artifact commands in sandbox token mode; shared by the offline and delegate usage. */
8
8
  export declare const ARTIFACT_SANDBOX_HELP = " In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), build, plan\n and deploy take --repo: push the app to a Git Service repository and deploy\n from it. Atlas builds Next.js applications; static applications are bundled\n from the repository and must declare no package.json dependencies or\n optionalDependencies, because the sandbox cannot reach a package registry.\n dev, login, logout, --git-url, --source-env, --pr and --env-url are\n unavailable there, and -e is ignored.\n";
9
9
  export declare const ARTIFACT_HELP = "usage:\n seq-studio artifact init <dir> [--template react-vite|nextjs] [--repo <namespace>/<name>]\n seq-studio artifact whoami -e <env>\n seq-studio artifact link [dir] -e <env> [--project <id>]\n seq-studio artifact env list|use <env>\n seq-studio artifact status [-e <env>]\n seq-studio artifact list -e <env> [--json]\n seq-studio artifact show <slug-or-id> -e <env> [--json]\n seq-studio artifact validate [dir]\n seq-studio artifact build|plan|deploy [dir | --repo <namespace>/<name> | --git-url <url>] [--ref <ref>] -e <env>\n seq-studio artifact dev [dir] -e <env> [--once] [--key <name>] [--link <package-dir>] [--port <port>] [--secret-source local|hosted|none] [--local-secrets <bindings.json>] [--bundler turbopack|webpack]\n seq-studio artifact pull <project-id> -e <env> --out <dir>\n seq-studio artifact promote|rollback <deployment-id> -e <env>\n\n Help is available offline. Authenticate with seq-studio login. Build and deploy\n sources may be local, a platform git-service repo, or a public HTTPS Git URL;\n deployments target a named environment with -e. Local, preview, and official\n deployment workflows have different source and approval rules; see the public\n CLI README.\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n\n In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), build, plan\n and deploy take --repo: push the app to a Git Service repository and deploy\n from it. Atlas builds Next.js applications; static applications are bundled\n from the repository and must declare no package.json dependencies or\n optionalDependencies, because the sandbox cannot reach a package registry.\n dev, login, logout, --git-url, --source-env, --pr and --env-url are\n unavailable there, and -e is ignored.\n";
@@ -20,13 +20,15 @@ export const ORM_HISTORY_HELP = `usage:
20
20
  first: when, who, what moved, and the Git Service source. "verified" and "ci"
21
21
  sources were checked by Atlas against the repository; "reported" means Atlas
22
22
  could not tie the change to a pushed commit on a release branch, with the
23
- reason when one was claimed. * marks the live activation. History starts with
24
- the first apply after the environment recorded it.
23
+ reason when one was claimed. "break_glass" is an admin override made with
24
+ orm apply --unverified-source "<reason>". * marks the live activation.
25
+ History starts with the first apply after the environment recorded it.
25
26
  `;
26
27
  export const ORM_DEPLOYMENT_POLICY_HELP = `usage:
27
28
  seq-studio orm deployment-policy <namespace> -e <env> [--json]
28
29
  seq-studio orm deployment-policy <namespace> -e <env> --mode ci --repo <ns>/<name> --branch <branch> --target <target-key>
29
30
  seq-studio orm deployment-policy <namespace> -e <env> --mode manual
31
+ seq-studio orm deployment-policy <namespace> -e <env> --mode source --repo <ns>/<name> --branch <branch> --path <dir>
30
32
 
31
33
  Existing namespaces default to manual deployment. CI mode rejects direct ORM
32
34
  registration, schema apply, and operations-only activation on the server;
@@ -34,14 +36,20 @@ export const ORM_DEPLOYMENT_POLICY_HELP = `usage:
34
36
  Enabling CI mode requires namespace Admin, repository Admin, and an existing
35
37
  automatic branch binding to this namespace. Restoring manual mode requires
36
38
  namespace Admin. This changes deployment policy; it does not deploy source.
39
+
40
+ Source mode keeps direct applies but accepts only ones Atlas verifies came
41
+ from that repository, branch and package directory (pass --path . for the
42
+ repository root). It requires namespace Admin and repository Read. Namespace
43
+ admins can still apply with --unverified-source "<reason>", which is recorded.
37
44
  `;
38
45
  export const ORM_HELP = `usage:
39
46
  seq-studio orm init <dir> [--repo <ns>/<name>]
40
47
  seq-studio orm generate [dir] [--migration-export] [--check]
41
48
  seq-studio orm validate [dir]
42
49
  seq-studio orm plan [dir] -e <env>
43
- seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait]
44
- seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci] [--repo <ns>/<name> --branch <branch> --target <target-key>] [--json]
50
+ seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait] [--unverified-source "<reason>"]
51
+ seq-studio orm history <namespace> -e <env> [--limit N] [--json]
52
+ seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci|source] [--repo <ns>/<name> --branch <branch> (--target <target-key> | --path <dir>)] [--json]
45
53
  seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...
46
54
  seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>
47
55
  seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]
@@ -60,7 +68,11 @@ export const ORM_HELP = `usage:
60
68
  apply waits until the new version is live and serving (default up to 20m), then
61
69
  prints "live:"; --no-wait returns once the apply is queued.
62
70
  CI-managed namespaces reject direct apply; use the enrolled repository's merge
63
- workflow. deployment-policy reads or explicitly changes this namespace setting.
71
+ workflow. Source-pinned namespaces accept only applies Atlas verifies against
72
+ their repository, branch and package path, and an environment can require a
73
+ verified source for every apply. A namespace admin may record an audited
74
+ exception with --unverified-source "<reason>". deployment-policy reads or
75
+ explicitly changes this namespace setting.
64
76
  namespaces lists what you can read; describe shows its tables and operations.
65
77
  Run seq-studio orm describe --help for the output.
66
78
  execute <namespace> <operation> runs the deployed version's persisted operation by
@@ -25,29 +25,52 @@ export declare function repoOrmApplySource({ targetUrl, token, namespace, name,
25
25
  commit: string | null;
26
26
  path: string | undefined;
27
27
  }): Promise<OrmApplySource | null>;
28
- /** Whether the target records apply sources; an older Atlas rejects the unknown `source` field. */
29
- export declare function targetRecordsApplySource({ targetUrl, token }: {
28
+ /** Mirrors `UNVERIFIED_SOURCE_REASON_ENV` in `@sequenceholdings/orm/cli`. */
29
+ export declare const ORM_UNVERIFIED_SOURCE_REASON_ENV = "SEQUENCE_ORM_UNVERIFIED_SOURCE_REASON";
30
+ /** Pull `--unverified-source <reason>` (or `=reason`) off the argv; only `apply` accepts it. */
31
+ export declare function takeUnverifiedSourceFlag({ sub, argv }: {
32
+ sub: string;
33
+ argv: readonly string[];
34
+ }): {
35
+ reason?: string;
36
+ args: string[];
37
+ } | {
38
+ error: string;
39
+ };
40
+ export interface ApplySourceCapabilities {
41
+ /** The target records apply sources; an older Atlas rejects the unknown `source` field. */
42
+ records: boolean;
43
+ /** The target refuses applies whose source it cannot verify. */
44
+ enforced: boolean;
45
+ }
46
+ export declare function applySourceCapabilities({ targetUrl, token }: {
30
47
  targetUrl: string;
31
48
  token: string;
32
- }): Promise<boolean>;
49
+ }): Promise<ApplySourceCapabilities>;
33
50
  /**
34
- * Hand the apply's Git Service source to the pinned ORM package, which sends
35
- * it for the namespace's activation history. Best effort: an unresolvable
36
- * source or an older Atlas leaves the activation recorded as `reported`.
51
+ * Hand the apply's Git Service source, and any override reason, to the pinned
52
+ * ORM package, which sends them with the apply. Returns why the apply cannot
53
+ * succeed when the target enforces verified sources and this one plainly will
54
+ * not verify, so the caller stops before registering anything.
37
55
  */
38
- export declare function exportApplySource({ auth, targetUrl, resolve }: {
56
+ export declare function exportApplySource({ auth, targetUrl, resolve, unverifiedReason, dryRun }: {
39
57
  auth: {
40
58
  token: string;
41
59
  } | null;
42
60
  targetUrl: string;
43
61
  resolve: () => Promise<OrmApplySource | null>;
44
- }): Promise<void>;
62
+ unverifiedReason?: string;
63
+ /** A rehearsal on a disposable fork activates nothing, so it is never refused for its source. */
64
+ dryRun?: boolean;
65
+ }): Promise<string | null>;
45
66
  /** `orm apply <dir>` from a local checkout; every other subcommand sends no source. */
46
- export declare function exportLocalApplySource({ sub, auth, targetUrl, dir }: {
67
+ export declare function exportLocalApplySource({ sub, auth, targetUrl, dir, unverifiedReason, dryRun }: {
47
68
  sub: string;
48
69
  auth: {
49
70
  token: string;
50
71
  } | null;
51
72
  targetUrl: string | undefined;
52
73
  dir?: string;
53
- }): Promise<void>;
74
+ unverifiedReason?: string;
75
+ dryRun?: boolean;
76
+ }): Promise<string | null>;
@@ -45,42 +45,83 @@ export async function repoOrmApplySource({ targetUrl, token, namespace, name, co
45
45
  const repo = await resolveRepo({ baseUrl: targetUrl, token, namespace, name });
46
46
  return { repository_id: repo.id, commit, path: path ?? '.', dirty: false };
47
47
  }
48
- /** Whether the target records apply sources; an older Atlas rejects the unknown `source` field. */
49
- export async function targetRecordsApplySource({ targetUrl, token }) {
48
+ /** Mirrors `UNVERIFIED_SOURCE_REASON_ENV` in `@sequenceholdings/orm/cli`. */
49
+ export const ORM_UNVERIFIED_SOURCE_REASON_ENV = 'SEQUENCE_ORM_UNVERIFIED_SOURCE_REASON';
50
+ const UNVERIFIED_SOURCE_FLAG = '--unverified-source';
51
+ /** Pull `--unverified-source <reason>` (or `=reason`) off the argv; only `apply` accepts it. */
52
+ export function takeUnverifiedSourceFlag({ sub, argv }) {
53
+ const args = [];
54
+ let reason;
55
+ for (let index = 0; index < argv.length; index += 1) {
56
+ const arg = argv[index];
57
+ if (arg !== UNVERIFIED_SOURCE_FLAG && !arg.startsWith(`${UNVERIFIED_SOURCE_FLAG}=`)) {
58
+ args.push(arg);
59
+ continue;
60
+ }
61
+ const value = arg === UNVERIFIED_SOURCE_FLAG ? argv[(index += 1)] : arg.slice(UNVERIFIED_SOURCE_FLAG.length + 1);
62
+ if (value === undefined || value.startsWith('-') || value.trim().length < 10) {
63
+ return { error: `${UNVERIFIED_SOURCE_FLAG} needs a reason of at least 10 characters, e.g. ${UNVERIFIED_SOURCE_FLAG} "incident 123 hotfix before merge"` };
64
+ }
65
+ reason = value.trim();
66
+ }
67
+ if (reason !== undefined && sub !== 'apply')
68
+ return { error: `${UNVERIFIED_SOURCE_FLAG} applies only to apply` };
69
+ return reason === undefined ? { args } : { reason, args };
70
+ }
71
+ export async function applySourceCapabilities({ targetUrl, token }) {
50
72
  try {
51
73
  const response = await fetch(new URL('/api/orm/runtime-capabilities', targetUrl), { headers: { authorization: `Bearer ${token}` } });
52
74
  if (!response.ok)
53
- return false;
75
+ return { records: false, enforced: false };
54
76
  const body = await response.json();
55
- return typeof body === 'object' && body !== null && 'activationSource' in body && body.activationSource === true;
77
+ if (typeof body !== 'object' || body === null)
78
+ return { records: false, enforced: false };
79
+ const records = 'activationSource' in body && body.activationSource === true;
80
+ return { records, enforced: records && 'requireVerifiedSource' in body && body.requireVerifiedSource === true };
56
81
  }
57
82
  catch {
58
- return false;
83
+ return { records: false, enforced: false };
59
84
  }
60
85
  }
61
86
  /**
62
- * Hand the apply's Git Service source to the pinned ORM package, which sends
63
- * it for the namespace's activation history. Best effort: an unresolvable
64
- * source or an older Atlas leaves the activation recorded as `reported`.
87
+ * Hand the apply's Git Service source, and any override reason, to the pinned
88
+ * ORM package, which sends them with the apply. Returns why the apply cannot
89
+ * succeed when the target enforces verified sources and this one plainly will
90
+ * not verify, so the caller stops before registering anything.
65
91
  */
66
- export async function exportApplySource({ auth, targetUrl, resolve }) {
92
+ export async function exportApplySource({ auth, targetUrl, resolve, unverifiedReason, dryRun = false }) {
67
93
  delete process.env[ORM_SOURCE_ENV];
68
- if (!auth || !(await targetRecordsApplySource({ targetUrl, token: auth.token })))
69
- return;
94
+ delete process.env[ORM_UNVERIFIED_SOURCE_REASON_ENV];
95
+ const capabilities = auth ? await applySourceCapabilities({ targetUrl, token: auth.token }) : { records: false, enforced: false };
96
+ if (!capabilities.records)
97
+ return null;
98
+ if (unverifiedReason)
99
+ process.env[ORM_UNVERIFIED_SOURCE_REASON_ENV] = unverifiedReason;
100
+ let source = null;
70
101
  try {
71
- const source = await resolve();
72
- if (source)
73
- process.env[ORM_SOURCE_ENV] = JSON.stringify(source);
74
- else
75
- console.warn('[seq-studio] apply source unknown (not a clone of this environment\'s Git Service); the activation is recorded as reported');
102
+ source = await resolve();
76
103
  }
77
104
  catch (error) {
78
105
  console.warn(`[seq-studio] could not resolve the apply source: ${error instanceof Error ? error.message : String(error)}`);
79
106
  }
107
+ if (source)
108
+ process.env[ORM_SOURCE_ENV] = JSON.stringify(source);
109
+ const problem = !source ? 'is not a clone of this environment\'s Git Service' : source.dirty ? 'has uncommitted changes in the ORM package' : null;
110
+ if (!problem)
111
+ return null;
112
+ if (capabilities.enforced && !unverifiedReason && !dryRun) {
113
+ return `This environment applies ORM changes only from a pushed commit Atlas can verify, and this checkout ${problem}. ` +
114
+ `Commit and push the package (run \`seq-studio orm diff\` first so its migration is committed), then apply again or use --repo. ` +
115
+ `Namespace admins can override with ${UNVERIFIED_SOURCE_FLAG} "<reason>".`;
116
+ }
117
+ if (dryRun)
118
+ return null;
119
+ console.warn(`[seq-studio] this checkout ${problem}; the activation is recorded as ${unverifiedReason ? 'break_glass' : 'reported'}`);
120
+ return null;
80
121
  }
81
122
  /** `orm apply <dir>` from a local checkout; every other subcommand sends no source. */
82
- export async function exportLocalApplySource({ sub, auth, targetUrl, dir = '.' }) {
123
+ export async function exportLocalApplySource({ sub, auth, targetUrl, dir = '.', unverifiedReason, dryRun }) {
83
124
  if (sub !== 'apply' || !targetUrl)
84
- return;
85
- await exportApplySource({ auth, targetUrl, resolve: async () => localOrmApplySource({ dir, targetUrl }) });
125
+ return null;
126
+ return exportApplySource({ auth, targetUrl, unverifiedReason, dryRun, resolve: async () => localOrmApplySource({ dir, targetUrl }) });
86
127
  }
@@ -18,7 +18,7 @@ import { resolveFunctionSourceDir } from '../functions/source-selection.js';
18
18
  import { warnBeforeHostDeploy } from '../manifest-roles-notice.js';
19
19
  import { ORM_DEPLOYMENT_POLICY_HELP, ORM_DISCOVER_HELP, ORM_EXECUTE_HELP, ORM_HELP, ORM_HISTORY_HELP } from '../command-help.js';
20
20
  import { ormVersionMismatch, requiresSchemaVersionCheck } from './version-guard.js';
21
- import { exportApplySource, exportLocalApplySource, repoOrmApplySource } from './apply-source.js';
21
+ import { exportApplySource, exportLocalApplySource, repoOrmApplySource, takeUnverifiedSourceFlag } from './apply-source.js';
22
22
  /**
23
23
  * ORM subcommands that talk to Atlas — must not silently target `local`.
24
24
  * `init`, `generate`, `validate`, `diff`, `migrate-from-yaml`, and `import` are offline.
@@ -114,7 +114,7 @@ function aliasOrmModuleForRemoteSource(envName) {
114
114
  // error names the missing module.
115
115
  }
116
116
  }
117
- async function runOrmFromRepo({ sub, selection, auth, targetUrl, ormCli, }) {
117
+ async function runOrmFromRepo({ sub, selection, auth, targetUrl, ormCli, unverifiedReason, }) {
118
118
  if (!auth || !targetUrl) {
119
119
  console.error('[seq-studio] orm --repo needs a target environment and auth. Pass -e <env> and run `seq-studio login`.');
120
120
  return 1;
@@ -143,11 +143,13 @@ async function runOrmFromRepo({ sub, selection, auth, targetUrl, ormCli, }) {
143
143
  'committed migrations are out of date — run `seq-studio orm diff` in the repository, commit the migration, and retry.');
144
144
  return 1;
145
145
  }
146
- if (sub === 'apply') {
147
- await exportApplySource({ auth, targetUrl, resolve: () => repoOrmApplySource({
148
- targetUrl, token: auth.token, namespace: selection.spec.namespace, name: selection.spec.name,
149
- commit: source.provenance.gitCommit, path: selection.path,
150
- }) });
146
+ const refusal = sub === 'apply' ? await exportApplySource({ auth, targetUrl, unverifiedReason, dryRun: selection.rest.includes('--dry-run'), resolve: () => repoOrmApplySource({
147
+ targetUrl, token: auth.token, namespace: selection.spec.namespace, name: selection.spec.name,
148
+ commit: source.provenance.gitCommit, path: selection.path,
149
+ }) }) : null;
150
+ if (refusal) {
151
+ console.error(`[seq-studio] ${refusal}`);
152
+ return 1;
151
153
  }
152
154
  const args = [dir, ...selection.rest];
153
155
  await warnBeforeHostDeploy({ sub, deploySub: 'apply', args, file: 'namespace.yaml' });
@@ -271,7 +273,12 @@ export async function runOrmCommand(sub, rest) {
271
273
  }
272
274
  if (NATIVE_ORM_SUBS.has(sub))
273
275
  return runNativeOrmCommand(sub, rest);
274
- const normalized = normalizeShortEnvFlag(rest);
276
+ const unverified = takeUnverifiedSourceFlag({ sub, argv: normalizeShortEnvFlag(rest) });
277
+ if ('error' in unverified) {
278
+ console.error(`[seq-studio] ${unverified.error}`);
279
+ return 1;
280
+ }
281
+ const { reason: unverifiedReason, args: normalized } = unverified;
275
282
  const repoInit = sub === 'init' ? await runOrmInitWithRepo(normalized) : null;
276
283
  if (repoInit !== null)
277
284
  return repoInit;
@@ -327,15 +334,17 @@ export async function runOrmCommand(sub, rest) {
327
334
  }
328
335
  });
329
336
  if (repoSelection)
330
- return runOrmFromRepo({ sub, selection: repoSelection, auth, targetUrl, ormCli });
331
- if (requiresSchemaVersionCheck(sub)) {
332
- const mismatch = await ormVersionMismatch(positionalDir(normalized) ?? '.');
333
- if (mismatch) {
334
- console.error(`[seq-studio] ${mismatch}`);
335
- return 1;
336
- }
337
+ return runOrmFromRepo({ sub, selection: repoSelection, auth, targetUrl, ormCli, unverifiedReason });
338
+ return runLocalOrm({ sub, normalized, auth, targetUrl, unverifiedReason, runCli });
339
+ }
340
+ /** A namespace directory on disk: check its ORM version, attach the apply source, then forward. */
341
+ async function runLocalOrm({ sub, normalized, auth, targetUrl, unverifiedReason, runCli }) {
342
+ const problem = (requiresSchemaVersionCheck(sub) ? await ormVersionMismatch(positionalDir(normalized) ?? '.') : null) ??
343
+ await exportLocalApplySource({ sub, auth, targetUrl, dir: positionalDir(normalized), unverifiedReason, dryRun: normalized.includes('--dry-run') });
344
+ if (problem) {
345
+ console.error(`[seq-studio] ${problem}`);
346
+ return 1;
337
347
  }
338
- await exportLocalApplySource({ sub, auth, targetUrl, dir: positionalDir(normalized) });
339
348
  await warnBeforeHostDeploy({ sub, deploySub: 'apply', args: normalized, file: 'namespace.yaml' });
340
349
  return runCli([sub, ...normalized]);
341
350
  }
@@ -3,21 +3,37 @@ import { getJson, putJson } from '../atlas-client.js';
3
3
  import { printCliError } from '../cli-errors.js';
4
4
  import { requiredStringFlag, validateCommandInput } from '../command-input.js';
5
5
  import { buildContext, clientOptions } from '../functions/commands.js';
6
+ function repository(args) {
7
+ const repo = requiredStringFlag({ args, key: 'repo' }).split('/');
8
+ if (repo.length !== 2 || !repo[0] || !repo[1])
9
+ throw new Error('--repo must be <namespace>/<name>.');
10
+ return { repositoryNamespace: repo[0], repositoryName: repo[1], branch: requiredStringFlag({ args, key: 'branch' }) };
11
+ }
6
12
  function selection(args) {
7
- validateCommandInput({ args, flags: { mode: 'string', repo: 'string', branch: 'string', target: 'string' }, positional: 1 });
13
+ validateCommandInput({ args, flags: { mode: 'string', repo: 'string', branch: 'string', target: 'string', path: 'string' }, positional: 1 });
8
14
  const mode = args.flags.mode;
9
- if (mode !== undefined && mode !== 'manual' && mode !== 'ci')
10
- throw new Error('--mode must be manual or ci.');
11
- if (mode !== 'ci') {
12
- if (['repo', 'branch', 'target'].some(key => args.flags[key] !== undefined))
13
- throw new Error('--repo, --branch and --target require --mode ci.');
15
+ if (mode !== undefined && mode !== 'manual' && mode !== 'ci' && mode !== 'source')
16
+ throw new Error('--mode must be manual, ci or source.');
17
+ if (mode === undefined || mode === 'manual') {
18
+ if (['repo', 'branch', 'target', 'path'].some(key => args.flags[key] !== undefined))
19
+ throw new Error('--repo, --branch, --target and --path require --mode ci or source.');
14
20
  return { mode };
15
21
  }
16
- const repo = requiredStringFlag({ args, key: 'repo' }).split('/');
17
- if (repo.length !== 2 || !repo[0] || !repo[1])
18
- throw new Error('--repo must be <namespace>/<name>.');
19
- return { mode, repositoryNamespace: repo[0], repositoryName: repo[1],
20
- branch: requiredStringFlag({ args, key: 'branch' }), target: requiredStringFlag({ args, key: 'target' }) };
22
+ if (mode === 'ci') {
23
+ if (args.flags.path !== undefined)
24
+ throw new Error('--path applies only to --mode source.');
25
+ return { mode, ...repository(args), target: requiredStringFlag({ args, key: 'target' }) };
26
+ }
27
+ if (args.flags.target !== undefined)
28
+ throw new Error('--target applies only to --mode ci.');
29
+ return { mode, ...repository(args), path: requiredStringFlag({ args, key: 'path' }) };
30
+ }
31
+ function describe(policy) {
32
+ if (policy.mode === 'manual')
33
+ return 'manual deployment';
34
+ if (policy.mode === 'ci')
35
+ return `CI-managed (${policy.repository_id}, ${policy.branch}, ${policy.target_key})`;
36
+ return `direct applies only from ${policy.branch}:${policy.path === '' ? '.' : policy.path} in ${policy.repository_id}, verified by Atlas`;
21
37
  }
22
38
  export async function ormDeploymentPolicyCommand(args) {
23
39
  try {
@@ -27,19 +43,19 @@ export async function ormDeploymentPolicyCommand(args) {
27
43
  let result;
28
44
  if (selected.mode === undefined)
29
45
  result = await getJson({ ...options, path });
46
+ else if (!('repositoryNamespace' in selected))
47
+ result = await putJson({ ...options, path, body: { mode: 'manual' } });
30
48
  else {
49
+ const repositoryId = (await resolveRepo({ ...options, namespace: selected.repositoryNamespace, name: selected.repositoryName })).id;
31
50
  const body = selected.mode === 'ci'
32
- ? { mode: 'ci', repository_id: (await resolveRepo({ ...options, namespace: selected.repositoryNamespace, name: selected.repositoryName })).id,
33
- branch: selected.branch, target_key: selected.target }
34
- : { mode: 'manual' };
51
+ ? { mode: 'ci', repository_id: repositoryId, branch: selected.branch, target_key: selected.target }
52
+ : { mode: 'source', repository_id: repositoryId, branch: selected.branch, path: selected.path };
35
53
  result = await putJson({ ...options, path, body });
36
54
  }
37
55
  if (args.flags.json === true)
38
56
  console.log(JSON.stringify(result, null, 2));
39
- else {
40
- const policy = result.deployment_policy;
41
- console.log(`${result.namespace}: ${policy.mode === 'manual' ? 'manual deployment' : `CI-managed (${policy.repository_id}, ${policy.branch}, ${policy.target_key})`}`);
42
- }
57
+ else
58
+ console.log(`${result.namespace}: ${describe(result.deployment_policy)}`);
43
59
  return 0;
44
60
  }
45
61
  catch (error) {
@@ -1 +1 @@
1
- export declare const ORM_USAGE = "usage:\n seq-studio orm init <dir> [--repo <ns>/<name>]\n scaffold a namespace package (v2: TypeScript schema + GraphQL documents);\n --repo scaffolds into a git-service repo (see Init into a repo below)\n seq-studio orm generate [dir] write schema.graphql + operations.manifest.json + typePolicies.gen.ts (offline; runs consumer codegen when codegen.ts is present)\n seq-studio orm generate [dir] --migration-export [--check]\n export reviewed ORM inputs for a coordinated pipeline migration; --check verifies without writing\n seq-studio orm validate [dir] parse + validate definitions and verify committed migrations are in sync\n seq-studio orm plan [dir] -e <env> compile definitions and diff against the registry\n seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait]\n author the migration, register, apply, and refresh the generated outputs (the everyday command);\n waits until the new version is live (default up to 20m; e.g. --timeout 90s), --no-wait returns once queued\n seq-studio orm plan|apply --repo <ns>/<name> [--path <dir>] [--ref <ref>] -e <env>\n plan/apply a namespace committed to a platform git-service repo (CI deploy-from-git);\n --path selects the namespace directory (default: repo root). A remote apply never\n authors migrations: the committed ledger must already match the definitions.\n seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...\n run the deployed version's persisted operation by name as the caller (no checkout)\n seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>\n execute from the checkout manifest through the installed ORM package\n both execute forms accept --variables-file - (or /dev/stdin) for JSON stdin until EOF\n seq-studio orm read <namespace> <table> -e <env> [--where c=op.v]... [--select c,...] [--order c.desc] [--limit N] [--offset N] [--json|--jsonl]\n read rows of a deployed v2 namespace as the caller (row-level security applies)\n seq-studio orm sql <namespace> --query <sql> | --file <path> -e <env> [--param name[:type]=v]... | [--params <json-object>] [--json|--jsonl]\n run read-only SQL against a deployed v2 namespace as the caller\n qualify tables and double-quote mixed-case columns (e.g. SELECT \"loanNumber\" FROM lending.loans)\n seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]\n list the namespaces you can read\n seq-studio orm history <namespace> -e <env> [--limit N] [--json]\n seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci] [--repo <ns>/<name> --branch <branch> --target <target-key>] [--json]\n inspect or explicitly change the namespace's deployment controller\n seq-studio orm describe <namespace> [<table> | --operations] -e <env> [--json]\n show a namespace's tables, views, and persisted operations (with variables), or one table's columns and actions\n seq-studio orm diff [dir] write/verify the committed migration standalone (--check is the offline CI gate; --allow-destructive consents; --rebase records a v1 -> v2 conversion)\n seq-studio orm migrate-from-yaml <dir> convert a v1 YAML namespace to the v2 TypeScript format (offline; migrations/ preserved)\n seq-studio orm import [dir] --spec <file> | --table <t> --from <schema.table> --map <target=source,...>\n plan a batched copy from an existing Postgres relation into an owned table (writes a SQL script; no database connection)\n\n Environments: see `seq-studio envs list` (built-in: local; more are\n discovered after you authenticate).\n Authenticate with: seq-studio login\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n";
1
+ export declare const ORM_USAGE = "usage:\n seq-studio orm init <dir> [--repo <ns>/<name>]\n scaffold a namespace package (v2: TypeScript schema + GraphQL documents);\n --repo scaffolds into a git-service repo (see Init into a repo below)\n seq-studio orm generate [dir] write schema.graphql + operations.manifest.json + typePolicies.gen.ts (offline; runs consumer codegen when codegen.ts is present)\n seq-studio orm generate [dir] --migration-export [--check]\n export reviewed ORM inputs for a coordinated pipeline migration; --check verifies without writing\n seq-studio orm validate [dir] parse + validate definitions and verify committed migrations are in sync\n seq-studio orm plan [dir] -e <env> compile definitions and diff against the registry\n seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait] [--unverified-source \"<reason>\"]\n author the migration, register, apply, and refresh the generated outputs (the everyday command);\n waits until the new version is live (default up to 20m; e.g. --timeout 90s), --no-wait returns once queued\n seq-studio orm plan|apply --repo <ns>/<name> [--path <dir>] [--ref <ref>] -e <env>\n plan/apply a namespace committed to a platform git-service repo (CI deploy-from-git);\n --path selects the namespace directory (default: repo root). A remote apply never\n authors migrations: the committed ledger must already match the definitions.\n seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...\n run the deployed version's persisted operation by name as the caller (no checkout)\n seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>\n execute from the checkout manifest through the installed ORM package\n both execute forms accept --variables-file - (or /dev/stdin) for JSON stdin until EOF\n seq-studio orm read <namespace> <table> -e <env> [--where c=op.v]... [--select c,...] [--order c.desc] [--limit N] [--offset N] [--json|--jsonl]\n read rows of a deployed v2 namespace as the caller (row-level security applies)\n seq-studio orm sql <namespace> --query <sql> | --file <path> -e <env> [--param name[:type]=v]... | [--params <json-object>] [--json|--jsonl]\n run read-only SQL against a deployed v2 namespace as the caller\n qualify tables and double-quote mixed-case columns (e.g. SELECT \"loanNumber\" FROM lending.loans)\n seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]\n list the namespaces you can read\n seq-studio orm history <namespace> -e <env> [--limit N] [--json]\n seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci|source] [--repo <ns>/<name> --branch <branch> (--target <target-key> | --path <dir>)] [--json]\n inspect or explicitly change the namespace's deployment controller\n seq-studio orm describe <namespace> [<table> | --operations] -e <env> [--json]\n show a namespace's tables, views, and persisted operations (with variables), or one table's columns and actions\n seq-studio orm diff [dir] write/verify the committed migration standalone (--check is the offline CI gate; --allow-destructive consents; --rebase records a v1 -> v2 conversion)\n seq-studio orm migrate-from-yaml <dir> convert a v1 YAML namespace to the v2 TypeScript format (offline; migrations/ preserved)\n seq-studio orm import [dir] --spec <file> | --table <t> --from <schema.table> --map <target=source,...>\n plan a batched copy from an existing Postgres relation into an owned table (writes a SQL script; no database connection)\n\n Environments: see `seq-studio envs list` (built-in: local; more are\n discovered after you authenticate).\n Authenticate with: seq-studio login\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n";
package/dist/orm/help.js CHANGED
@@ -8,7 +8,7 @@ export const ORM_USAGE = `usage:
8
8
  export reviewed ORM inputs for a coordinated pipeline migration; --check verifies without writing
9
9
  seq-studio orm validate [dir] parse + validate definitions and verify committed migrations are in sync
10
10
  seq-studio orm plan [dir] -e <env> compile definitions and diff against the registry
11
- seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait]
11
+ seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait] [--unverified-source "<reason>"]
12
12
  author the migration, register, apply, and refresh the generated outputs (the everyday command);
13
13
  waits until the new version is live (default up to 20m; e.g. --timeout 90s), --no-wait returns once queued
14
14
  seq-studio orm plan|apply --repo <ns>/<name> [--path <dir>] [--ref <ref>] -e <env>
@@ -28,7 +28,7 @@ export const ORM_USAGE = `usage:
28
28
  seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]
29
29
  list the namespaces you can read
30
30
  seq-studio orm history <namespace> -e <env> [--limit N] [--json]
31
- seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci] [--repo <ns>/<name> --branch <branch> --target <target-key>] [--json]
31
+ seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci|source] [--repo <ns>/<name> --branch <branch> (--target <target-key> | --path <dir>)] [--json]
32
32
  inspect or explicitly change the namespace's deployment controller
33
33
  seq-studio orm describe <namespace> [<table> | --operations] -e <env> [--json]
34
34
  show a namespace's tables, views, and persisted operations (with variables), or one table's columns and actions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequenceholdings/studio-cli",
3
- "version": "0.9.12",
3
+ "version": "0.9.13",
4
4
  "description": "Unified Sequence Studio CLI — `seq-studio init` / `add` / `deploy` (app monorepos), `seq-studio agents`, `seq-studio process` (Lattice), `seq-studio artifact`, `seq-studio functions` / `secrets`, `seq-studio repos`, and `seq-studio auth whoami`. Includes Auth0 browser login shared with seqapi.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -45,8 +45,8 @@
45
45
  "yaml": "^2.8.4",
46
46
  "zod": "4.6.6",
47
47
  "@sequenceholdings/agent-spec": "0.1.5",
48
+ "@sequenceholdings/artifact-studio": "0.11.12",
48
49
  "@sequenceholdings/lattice": "0.1.8",
49
- "@sequenceholdings/artifact-studio": "0.11.11",
50
50
  "@sequenceholdings/managed-functions": "0.5.9",
51
51
  "@sequenceholdings/storage": "0.1.7",
52
52
  "@sequenceholdings/platform": "0.1.4"
@@ -69,8 +69,8 @@
69
69
  "@types/semver": "^7.8.0",
70
70
  "typescript": "^5.6.0",
71
71
  "vitest": "^4.1.11",
72
- "@sequenceholdings/pipeline-spec": "0.3.8",
73
- "@sequenceholdings/orm": "2.8.5"
72
+ "@sequenceholdings/orm": "2.8.5",
73
+ "@sequenceholdings/pipeline-spec": "0.3.8"
74
74
  },
75
75
  "engines": {
76
76
  "node": ">=20"