@sequenceholdings/studio-cli 0.9.8 → 0.9.10

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
@@ -94,7 +94,7 @@ CLI authenticates both. Refresh tokens are neither requested nor persisted;
94
94
  interactive commands perform a bounded PKCE login again after expiry.
95
95
 
96
96
  ```bash
97
- seq-studio login # built-in Sequence environments
97
+ seq-studio login # built-in first-party environments
98
98
  seq-studio envs add bsm-staging <tenant-url> # one-time tenant registration
99
99
  seq-studio login --env bsm-staging # registered OpCo tenant realm
100
100
  seq-studio doctor # confirms config + auth + authorization
@@ -121,7 +121,7 @@ A valid cached user session wins over an ambient M2M secret (common under
121
121
  Doppler `atlas/dev`); force the service account with `SEQAPI_AUTH_MODE=m2m`:
122
122
 
123
123
  ```bash
124
- export AUTH0_M2M_CLIENT_SECRET=... # built-in Sequence environments
124
+ export AUTH0_M2M_CLIENT_SECRET=... # built-in first-party environments
125
125
  export AUTH0_M2M_CLIENT_SECRET_BSM_STAGING=... # registered bsm-staging realm
126
126
  export SEQAPI_AUTH_MODE=m2m # optional: ignore a leftover user session
127
127
  seq-studio artifact deploy -e <env>
@@ -911,6 +911,9 @@ compiled to canonical SQL before registration.
911
911
  | `seq-studio orm plan [dir] -e <env>` | Compare the compiled namespace with registry state without applying database changes. |
912
912
  | `seq-studio orm diff [dir] [--check]` | Author the next committed migration, or verify the migration/snapshot chain offline for CI. |
913
913
  | `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. |
914
+ | `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. |
915
+ | `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. |
916
+ | `seq-studio orm deployment-policy <namespace> -e <env> --mode manual` | Restore direct, permission-checked deployment; requires namespace Admin. |
914
917
  | `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. |
915
918
  | `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. |
916
919
  | `seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]` | List the namespaces you can read. |
@@ -946,6 +949,17 @@ pnpm exec seq-studio orm apply . -e local
946
949
  pnpm exec seq-studio orm validate .
947
950
  ```
948
951
 
952
+ Existing namespaces remain in manual mode until explicitly enrolled. Automatic
953
+ repository bindings alone do not enable CI-only enforcement. CI-managed namespaces
954
+ reject direct registration, schema apply, and operations-only activation on Atlas,
955
+ including old CLIs and applies queued before enrollment. CI must match the enrolled
956
+ repository, branch, target, authorizer, current deployment intent, and verified build
957
+ output. Removing a repository policy does not silently restore manual mode; an
958
+ administrator must explicitly change the namespace policy. Local generate, validate,
959
+ and plan remain available. Runtime reads and writes keep their existing permissions.
960
+ Deploy this support to Atlas and every ORM apply worker before enrolling namespaces,
961
+ so applies queued before enrollment also run the policy check.
962
+
949
963
  Global ORM commands require a CLI release that declares `drizzle-orm` directly.
950
964
  Older releases can fail during module loading because `drizzle-kit` imports
951
965
  `drizzle-orm` without declaring it. Update the global CLI if you see that error.
@@ -1309,10 +1323,23 @@ functions cannot opt in retroactively. The default remains mutable. See the
1309
1323
  | `seq-studio functions deploy --dir <dir> -e <env>` | Preview secrets and deploy a local function |
1310
1324
  | `seq-studio functions build --repo managed-functions/<name> [--path <dir>] -e <env>` | Materialize and validate a function from the platform Git Service |
1311
1325
  | `seq-studio functions deploy --repo managed-functions/<name> [--path <dir>] -e <env>` | Materialize and deploy a function from the platform Git Service |
1326
+ | `seq-studio functions show --fn <slug> -e <env>` | Show one function: its input and output JSON Schemas, and for readers its versions and secrets |
1327
+ | `seq-studio functions show --fn <slug> -e <env> --schema` | Print the function's identity (environment, id, slug, title, description, deployed) and its input and output JSON Schemas as JSON, for any caller who can see the function |
1312
1328
  | `seq-studio functions show --fn <slug> -e <env> --json [--version <id-or-name>]` | Inspect reader-gated active release provenance and optionally select an exact submitted version |
1313
1329
  | `seq-studio functions limits [-e <env>] [--json] [--fn <slug>]` | Inspect fleet, runtime, cache, and bundle defaults/caps; optionally inspect one function's effective runtime limits |
1314
1330
  | `seq-studio functions invoke --fn <slug> -e <env> [--data <json> \| --data @<file> \| --stdin]` | Invoke a deployed function and print its response body |
1315
1331
 
1332
+ Before invoking a function, read its input schema and build the payload from
1333
+ it. `--schema` needs only invoke access, so it works for callers who cannot
1334
+ read the function's versions:
1335
+
1336
+ ```bash
1337
+ seq-studio functions show --fn my-function -e <env> --schema | jq .inputSchema
1338
+ seq-studio functions invoke --fn my-function -e <env> --data '{"region": "east"}'
1339
+ ```
1340
+
1341
+ A function whose manifest declares no schema shows `null`.
1342
+
1316
1343
  `functions deploy` picks the next `vN` after the highest numbered version of
1317
1344
  that function. Versions named by repository CI, such as `ci-abc`, do not reset
1318
1345
  the sequence. A function with no numbered versions starts at `v1`.
@@ -1774,7 +1801,7 @@ successfully. Help does not initialize files, authenticate, or deploy.
1774
1801
  | `seq-studio artifact plan [dir] -e <env>` | `plan [dir] --env <env>` |
1775
1802
  | `seq-studio artifact deploy [dir] -e <env> [--skip-unchanged] [--no-create] [--project <id>]` | `deploy [dir] --env <env>` — `--skip-unchanged` no-ops (before building) when the remote active deployment's `sourceHash` **and** CLI/atlas-ui peer versions already match; `--no-create` errors instead of creating a missing project; `--project <id>` targets a project directly when duplicate slugs make the lookup ambiguous (slug must still match the manifest) |
1776
1803
  | `seq-studio artifact deploy --repo <ns>/<name> --ref <branch> --preview [--key <key>] -e <env>` | Builds any branch, tag, or commit as a preview and prints its link; see "Previews" below. Works for React/HTML and Next.js (`--key` is React/HTML only), and from an agent sandbox |
1777
- | `seq-studio artifact dev [dir] -e <env> [--link <pkgDir>[,<pkgDir>]] [--port <port>] [--local-secrets <bindings.json>] [--bundler turbopack\|webpack]` | React/HTML: rebuild preview on changes. Next.js: local development server and owner-only Atlas tunnel; `--port` selects its loopback port, `--bundler` its bundler (default Turbopack). |
1804
+ | `seq-studio artifact dev [dir] -e <env> [--link <pkgDir>[,<pkgDir>]] [--port <port>] [--secret-source local|hosted|none] [--local-secrets <bindings.json>] [--bundler turbopack\|webpack]` | React/HTML: rebuild preview on changes. Next.js: local development server and owner-only Atlas tunnel; `--port` selects its loopback port, `--bundler` its bundler (default Turbopack). |
1778
1805
  | `seq-studio artifact pull <project-id> -e <env> [--out <dir>]` | `pull <project-id> --env <env> [--out <dir>]` |
1779
1806
  | `seq-studio artifact list -e <env> [--json]` | `list --env <env>` — projects visible on the environment (slug, id, active version, visibility); `--json` emits the response object |
1780
1807
  | `seq-studio artifact show <slug-or-id> -e <env> [--json]` | `show <slug-or-id> --env <env>` — one project's detail incl. active deployment, git provenance, and (for newer deployments) the building `artifact-studio` / force-aliased `atlas-ui` versions; `--json` emits the response object |
@@ -1863,7 +1890,7 @@ pnpm type-check
1863
1890
  pnpm build
1864
1891
  ```
1865
1892
 
1866
- The scaffold pins approved Next.js 16.3 and React 19 versions and uses schema-v2
1893
+ The scaffold pins approved Next.js 16.4 and React 19 versions and uses schema-v2
1867
1894
  `artifact.bundle.yml`. It owns its React/Next dependencies; the React/Vite
1868
1895
  platform aliases do not apply. Commit the generated `pnpm-lock.yaml`. `pnpm dev`
1869
1896
  provides a standalone loopback UI check; SDK access to Atlas requires the
@@ -2342,7 +2369,8 @@ targets: []
2342
2369
  ```
2343
2370
 
2344
2371
  Atlas discovers the file on the pull request's head or base and runs checks on
2345
- PR creation and updates to its head or base. Repository CI and deployment jobs
2372
+ PR creation and updates to its head. A base change is re-verified at merge, and
2373
+ only a delta reaching control files or target inputs queues a recheck. Repository CI and deployment jobs
2346
2374
  use Buildkite, including for local destinations. Next.js resources may explicitly
2347
2375
  select Modal for compilation. Each run uses the platform
2348
2376
  image defaults; no image digest or manual branch-policy setup is
@@ -3045,10 +3073,31 @@ the normal local Atlas authorization and lifecycle, with a dedicated development
3045
3073
  GCS bucket. The standalone `functions dev` harness does not mint storage delegation.
3046
3074
 
3047
3075
 
3048
- ### Local Next.js server secrets
3076
+ ### Next.js server secrets in `artifact dev`
3077
+
3078
+ `artifact dev` always runs your Next.js server on your machine, with a scrubbed
3079
+ environment: no Atlas, cloud, or Doppler credentials reach it. `-e` selects the
3080
+ control plane (sessions, permissions, the preview tunnel), not where the code
3081
+ runs. Hosted servers come only from `artifact deploy --preview` or an official
3082
+ deploy, which mount secrets themselves.
3083
+
3084
+ Choose where declared `server.secrets` values come from with `--secret-source`:
3085
+
3086
+ | `--secret-source` | Default when | Reads | Authority |
3087
+ | --- | --- | --- | --- |
3088
+ | `local` | `-e local` (a loopback Atlas) | The local Atlas's personal store | Project write, editor on each local secret |
3089
+ | `hosted` | never (explicit only) | The selected hosted Atlas, at the manifest's exact pinned `version` | Project write, editor on each secret, a staging deployment |
3090
+ | `none` | any hosted `-e` | Nothing; `artifact dev` lists the declared names it skipped | None |
3091
+
3092
+ Only declared `server.secrets` entries are injected, and only into the Next
3093
+ server process. They never become `NEXT_PUBLIC_*` or build variables, and they are
3094
+ never written to session metadata, runtime files, or logs. Your server code must
3095
+ keep them out of responses. Values are read once when `artifact dev` starts.
3096
+
3097
+ #### Local store (`-e local`)
3049
3098
 
3050
3099
  With local Atlas running on a personal `dev-*` Lakebase branch, create a managed
3051
- secret and set its value through the local Secrets store:
3100
+ secret and set its value in the local Secrets store:
3052
3101
 
3053
3102
  ```sh
3054
3103
  seq-studio secrets create PROVIDER_KEY -e local
@@ -3056,7 +3105,6 @@ seq-studio secrets set PROVIDER_KEY --from-file /private/path/provider-key -e lo
3056
3105
  seq-studio artifact dev ./web -e local
3057
3106
  ```
3058
3107
 
3059
- Only declared `server.secrets` entries are injected into the Next server child.
3060
3108
  A `secret_name` declaration defaults to that registry name; a `secret_id`
3061
3109
  declaration defaults locally to the declared environment name. Local development
3062
3110
  uses the local default value, independently of the hosted ID/version pin.
@@ -3071,17 +3119,48 @@ To use a different local name, pass `--local-secrets ./local-secret-bindings.jso
3071
3119
  { "APP_PROVIDER_KEY": "MY_DEV_PROVIDER_KEY" }
3072
3120
  ```
3073
3121
 
3074
- The file contains names only. The developer needs project write access, an owned
3075
- active session, and managed-secret editor (or higher) permission. Use-only secret
3076
- permission cannot export values. Only single-value secrets stored in this Atlas
3077
- workspace are accepted; hosted values and values from another checkout are
3078
- rejected, even when their metadata came from a database clone. Hosted Atlas
3079
- sessions never export secrets to the local CLI. The flag requires a loopback
3080
- Atlas URL, including local environments discovered on another port.
3122
+ The file contains names only. Use-only secret permission cannot export values.
3123
+ Only single-value secrets stored in this Atlas workspace are accepted; hosted
3124
+ values and values from another checkout are rejected, even when their metadata
3125
+ came from a database clone. The local source requires a loopback Atlas URL,
3126
+ including local environments discovered on another port.
3081
3127
 
3082
- Values are passed explicitly to the Next child, never to public build variables,
3083
- logs, or persisted runtime/session metadata. Restart `artifact dev` after rotation
3084
- or a local binding change. App server code must keep secrets out of responses.
3128
+ #### Hosted source (a staging environment)
3129
+
3130
+ To test against a hosted integration, such as a provider's UAT credential, read
3131
+ the same secret versions a hosted preview would mount, without copying values:
3132
+
3133
+ ```sh
3134
+ seq-studio envs list # find your staging environment's name
3135
+ seq-studio login -e <staging-env>
3136
+ seq-studio artifact dev ./web -e <staging-env> --secret-source hosted
3137
+ ```
3138
+
3139
+ The hosted Atlas checks, on every start: your project write access and active
3140
+ session; managed-secret **editor** (or higher) on each declared secret, the same
3141
+ authority `deploy --preview` needs to attach it; that each secret is a
3142
+ single-value secret in this deployment's registry; and that the pinned `version`
3143
+ is recorded and enabled. Use-only (`user`) permission lets a hosted runtime
3144
+ consume a secret but never exports it to your machine. Hosted values are available only from
3145
+ staging deployments, and `--secret-source hosted` always needs an explicit `-e`,
3146
+ so a default environment never supplies a production credential. Use dedicated
3147
+ staging test secrets. Each release is audited with secret names, IDs, and
3148
+ versions, never values. `--local-secrets` does not apply: hosted values follow
3149
+ `server.secrets` exactly.
3150
+
3151
+ #### Rotation and restarts
3152
+
3153
+ Values are read once, when `artifact dev` starts. Automatic Next.js restarts
3154
+ (dependency changes, crashes) reuse them.
3155
+
3156
+ - **Local:** after `secrets set`, stop and restart `artifact dev`.
3157
+ - **Hosted:** bindings are pinned. Set the new value, update `version` in
3158
+ `artifact.bundle.yml` (`artifact dev` stops and asks you to restart), and
3159
+ start it again. A disabled or destroyed pinned version fails at start with the
3160
+ secret's name and version.
3161
+ - Revoking the session in Atlas, or losing project write access, stops
3162
+ `artifact dev`. Removing secret permission takes effect at the next start: a
3163
+ running server keeps the values it received until it stops.
3085
3164
 
3086
3165
 
3087
3166
  ## Composed applications (0.4.0)
@@ -3250,7 +3329,8 @@ seq-studio repos pulls close <namespace/name> <number> -e <env>
3250
3329
  ```
3251
3330
 
3252
3331
  All results are JSON (`--json` is accepted). Listing returns one page and `nextCursor`;
3253
- use `--cursor` to continue. Diff accepts `--max-files` (maximum 500) and reports truncation.
3332
+ use `--cursor` to continue. `create`, `show` (on `pullRequest`) and `list` (on each item)
3333
+ add a `url` field: the Atlas web link `<env origin>/repositories/<namespace>/<name>/pull/<number>`. Diff accepts `--max-files` (maximum 500) and reports truncation.
3254
3334
  Merge requires merge/admin authority, confirmation (or approved automation's `--yes`),
3255
3335
  and the existing server review/check policy. It merges the current branch head; a
3256
3336
  displayed SHA is not a head-lock or policy bypass. Complete reviews before merging.
@@ -3308,7 +3388,7 @@ operations and application-owned compatibility routes.
3308
3388
  ### Workspace snapshots for independent pipeline consumers (internal preview)
3309
3389
 
3310
3390
  ```sh
3311
- seq-studio storage source apply --workspace <uuid> --retention-days 30 -e local
3391
+ seq-studio storage source apply --workspace <uuid> --retention-days 30 --auto-sync true -e local
3312
3392
  seq-studio storage sync --workspace <uuid> --idempotency-key import-2026-10-21 --wait -e local
3313
3393
  seq-studio storage sync status <sync-id> --workspace <uuid> -e local
3314
3394
  seq-studio storage snapshots list --workspace <uuid> -e local
@@ -3322,7 +3402,17 @@ the current deployment permits. `--readers <application-id,...>` sets explicit
3322
3402
  Databricks readers, and omission preserves the current audience. Waiting times out
3323
3403
  after one hour by default (`--timeout <seconds>`); it leaves the sync running.
3324
3404
  Snapshot history supports `--cursor` and `--limit`. Workspace manifests may include
3325
- `pipelineSource: { target, readers, retentionDays }` for declarative configuration.
3405
+ `pipelineSource: { target, readers, retentionDays, autoSyncEnabled }` for declarative configuration.
3406
+
3407
+ Automatic syncing is off by default. `--auto-sync true` enables it for subsequent
3408
+ uploads and file replacements; `--auto-sync false` disables it. Omission preserves
3409
+ the current setting. Completed uploads are grouped after a 10-second quiet period,
3410
+ with at most 60 seconds of postponement during continuous uploads. Only one
3411
+ automatic copy runs per workspace; uploads during a copy remain pending for a
3412
+ follow-up. Disabling clears pending work and allows an accepted copy to finish.
3413
+ Automatic sync uses the enabling administrator's identity and rechecks access
3414
+ before exporting. Errors remain visible in the workspace panel and retry with
3415
+ backoff. This publishes snapshots; pipelines still define their own feeds and runs.
3326
3416
 
3327
3417
  Use the same symbolic source in two pipeline repositories; each gets its own
3328
3418
  materialized bronze tables and batches:
@@ -28,7 +28,7 @@ const ARTIFACT_USAGE = `usage:
28
28
  seq-studio artifact build [dir | --repo <ns>/<name> | --git-url <url>] [--ref <ref>] [--path <dir>] [--source-env <env>] [--out file.json]
29
29
  seq-studio artifact plan [dir | --repo <ns>/<name> | --git-url <url>] [--ref <ref>] [--path <dir>] [--source-env <env>] -e <env>
30
30
  seq-studio artifact deploy [dir | --repo <ns>/<name> | --git-url <url>] [--ref <ref>] [--path <dir>] [--source-env <env>] -e <env> [--skip-unchanged] [--no-create] [--project <id>]
31
- seq-studio artifact dev [dir] -e <env> [--once] [--key default] [--link <pkgDir>[,<pkgDir>]] [--port <port>] [--local-secrets <bindings.json>] [--bundler turbopack|webpack]
31
+ seq-studio artifact dev [dir] -e <env> [--once] [--key default] [--link <pkgDir>[,<pkgDir>]] [--port <port>] [--secret-source local|hosted|none] [--local-secrets <bindings.json>] [--bundler turbopack|webpack]
32
32
  seq-studio artifact pull <project-id> -e <env> --out <dir>
33
33
  seq-studio artifact promote <deployment-id> -e <env>
34
34
  seq-studio artifact rollback <deployment-id> -e <env>
@@ -66,9 +66,13 @@ const ARTIFACT_USAGE = `usage:
66
66
  with a Git Service origin on the selected source environment also works.
67
67
  Use pnpm build for a local production-build check. --once is static-only;
68
68
  --port selects the local Next loopback port.
69
- Local Next sessions inject declared server secrets from local Atlas's private
70
- store. --local-secrets maps environment names to local secret names (JSON,
71
- never values). Restart artifact dev after changing a local secret.
69
+ dev always runs Next on this machine; --secret-source picks where declared
70
+ server.secrets come from. local (default for -e local): local Atlas's private
71
+ store. hosted: the selected hosted Atlas at the pinned versions; needs an
72
+ explicit -e, managed-secret editor on each secret, and a staging deployment.
73
+ none (default for hosted environments): inject nothing. --local-secrets maps
74
+ environment names to local secret names (JSON, never values; local only).
75
+ Values are read once: restart artifact dev after changing a value or pin.
72
76
  dev uses Turbopack unless the Next config has a custom webpack function and no turbopack config; opt out
73
77
  with --bundler webpack or ARTIFACT_NEXT_DEV_BUNDLER=webpack.
74
78
  Deploy validates the selected targets.<environment>.url and declared storage
@@ -88,7 +88,7 @@ export declare const COMMAND_CONTRACT: readonly [{
88
88
  readonly description: "Author and operate ORM namespaces";
89
89
  readonly lifecycle: "preview";
90
90
  readonly access: "mixed";
91
- readonly subcommands: readonly ["init", "generate", "validate", "plan", "apply", "execute", "namespaces", "describe", "read", "sql", "diff", "migrate-from-yaml", "import"];
91
+ readonly subcommands: readonly ["init", "generate", "validate", "plan", "apply", "deployment-policy", "execute", "namespaces", "describe", "read", "sql", "diff", "migrate-from-yaml", "import"];
92
92
  }, {
93
93
  readonly name: "envs";
94
94
  readonly description: "Manage CLI environments";
@@ -14,7 +14,7 @@ export const COMMAND_CONTRACT = [
14
14
  { name: 'pipeline', description: 'Discover and operate Data Pipelines', lifecycle: 'preview', access: 'staff', subcommands: ['list', 'assets', 'search', 'describe', 'schema', 'sample', 'query', 'init', 'validate', 'plan', 'deploy', 'status', 'migrate', 'adopt', 'unbind', 'retire', 'run-now', 'promote', 'rollback'] },
15
15
  { name: 'feedback', description: 'Submit agent feedback', lifecycle: 'preview', access: 'authenticated', subcommands: ['submit'] },
16
16
  { name: 'auth', description: 'Manage Git authentication', lifecycle: 'stable', access: 'authenticated', subcommands: ['whoami', 'git-credential', 'pat'] },
17
- { name: 'orm', description: 'Author and operate ORM namespaces', lifecycle: 'preview', access: 'mixed', subcommands: ['init', 'generate', 'validate', 'plan', 'apply', 'execute', 'namespaces', 'describe', 'read', 'sql', 'diff', 'migrate-from-yaml', 'import'] },
17
+ { name: 'orm', description: 'Author and operate ORM namespaces', lifecycle: 'preview', access: 'mixed', subcommands: ['init', 'generate', 'validate', 'plan', 'apply', 'deployment-policy', 'execute', 'namespaces', 'describe', 'read', 'sql', 'diff', 'migrate-from-yaml', 'import'] },
18
18
  { name: 'envs', description: 'Manage CLI environments', lifecycle: 'stable', access: 'mixed', subcommands: ['add', 'list'] },
19
19
  { name: 'login', description: 'Authenticate with Sequence', lifecycle: 'stable', access: 'public', subcommands: [] },
20
20
  { name: 'logout', description: 'Remove cached user tokens', lifecycle: 'stable', access: 'public', subcommands: [] },
@@ -1,11 +1,12 @@
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_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 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 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_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";
5
+ 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";
5
6
  /** Artifact commands in sandbox token mode; shared by the offline and delegate usage. */
6
7
  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";
7
- 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>] [--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";
8
- export declare const FUNCTIONS_USAGE = "usage:\n seq-studio functions init <dir> [--repo <ns>/<name>] scaffold manifest, TypeScript handler, and docs pointers;\n --repo scaffolds into a git-service repo (see Init into a repo)\n seq-studio functions build [--dir d] local pre-flight (manifest, lockfile, SDK timeout cap)\n seq-studio functions register -e <env> [--dir d] register a shell + initial secret declarations; no deploy\n seq-studio functions deploy -e <env> [-m msg] preflight, upload, then show version and lifecycle progress\n seq-studio functions list -e <env> [--match-local] functions visible on the environment\n seq-studio functions show -e <env> [--fn slug] detail for one function (versions, secrets)\n [--json] [--version id|name] reader-gated release provenance\n seq-studio functions limits [-e <env>] [--json] bundled defaults/caps, or deployed policy\n [--fn slug] also show effective runtime limits (requires -e)\n seq-studio functions dev [--dir path] [--port 8080] local HTTP server with cache context\n seq-studio functions invoke -e <env> [--data JSON | --data @file | --stdin]\n invoke a function and print its response\n seq-studio functions logs -e <env> [--limit N] [--since t] function logs (reader-gated)\n seq-studio functions promote <version> -e <env> make a version live\n seq-studio functions rollback [<version>] -e <env> redeploy a prior version\n seq-studio functions delete -e <env> [--yes] archive function + tear down its runtime\n (version history is retained)\n\n Flags: -e/--env <env|preview:<slug>> (required for network commands; see: seq-studio envs list) \u00B7 --fn <slug> \u00B7 --dir <path>\n --path <repo-subdirectory> (remote build/deploy only) select one function in a multi-function repo\n --from-env-file <path> (default: .env) source file for secret values\n --no-wait \u00B7 --yes\n --no-provision (deploy) update-only: error instead of registering a new\n shell, writing secret values, or attaching secrets (CI sweep)\n\n Local Atlas builds and runs deployed functions on this computer, including teardown.\n \"functions dev\" runs a standalone handler without Atlas registration.\n\n Configure per-function CPU and concurrency in managed-function.yml under limits.\n Run \"functions limits\" for valid settings; redeploy to apply manifest changes.\n Invocation rates are shared across Atlas replicas; 429 includes Retry-After.\n If the shared rate limiter is unavailable, invocation fails closed with 503.\n\n Source for build/deploy: a local --dir (default .), a platform git-service\n repo (--repo <ns>/<name>), or a public HTTPS git URL (--git-url <url>). --path selects\n a function directory within a remote repo; omit it for the existing root-manifest\n layout. --ref selects a branch/tag/commit (default: the repo's default branch).\n Remote sources record the pinned commit as provenance (never dirty) and NEVER\n read a repo-committed .env for secret values \u2014 provision secrets server-side\n or pass a local --from-env-file (resolved against your cwd).\n Local deploys record repository-wide gitDirty, including unignored files\n outside --dir. Check git status at the repository root before deploying.\n\n Workspace dependencies are compiled from packages declared in a containing\n sequence.app.yml, within the source repository. Only the selected function is\n deployed: no sibling primitives or Application registration. Shared Node packages\n can set package.json seqStudio.source to a root source entry for clean builds.\n Package build scripts are not run. Local secret paths remain relative to --dir.\n\n Interactive --repo builds clone over smart-HTTP using your seq-studio login\n and repository read access. No PAT is needed. Headless M2M builds use JSON\n materialize and accept only platform-managed --repo sources. Use --env to\n select the same environment for source and deployment.\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";
8
+ 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";
9
+ export declare const FUNCTIONS_USAGE = "usage:\n seq-studio functions init <dir> [--repo <ns>/<name>] scaffold manifest, TypeScript handler, and docs pointers;\n --repo scaffolds into a git-service repo (see Init into a repo)\n seq-studio functions build [--dir d] local pre-flight (manifest, lockfile, SDK timeout cap)\n seq-studio functions register -e <env> [--dir d] register a shell + initial secret declarations; no deploy\n seq-studio functions deploy -e <env> [-m msg] preflight, upload, then show version and lifecycle progress\n seq-studio functions list -e <env> [--match-local] functions visible on the environment\n seq-studio functions show -e <env> [--fn slug] detail for one function (input/output schemas, versions, secrets)\n [--schema] function identity plus input/output JSON Schemas, as JSON (any caller who can see it)\n [--json] [--version id|name] reader-gated release provenance\n seq-studio functions limits [-e <env>] [--json] bundled defaults/caps, or deployed policy\n [--fn slug] also show effective runtime limits (requires -e)\n seq-studio functions dev [--dir path] [--port 8080] local HTTP server with cache context\n seq-studio functions invoke -e <env> [--data JSON | --data @file | --stdin]\n invoke a function and print its response\n seq-studio functions logs -e <env> [--limit N] [--since t] function logs (reader-gated)\n seq-studio functions promote <version> -e <env> make a version live\n seq-studio functions rollback [<version>] -e <env> redeploy a prior version\n seq-studio functions delete -e <env> [--yes] archive function + tear down its runtime\n (version history is retained)\n\n Flags: -e/--env <env|preview:<slug>> (required for network commands; see: seq-studio envs list) \u00B7 --fn <slug> \u00B7 --dir <path>\n --path <repo-subdirectory> (remote build/deploy only) select one function in a multi-function repo\n --from-env-file <path> (default: .env) source file for secret values\n --no-wait \u00B7 --yes\n --no-provision (deploy) update-only: error instead of registering a new\n shell, writing secret values, or attaching secrets (CI sweep)\n\n Local Atlas builds and runs deployed functions on this computer, including teardown.\n \"functions dev\" runs a standalone handler without Atlas registration.\n\n Configure per-function CPU and concurrency in managed-function.yml under limits.\n Run \"functions limits\" for valid settings; redeploy to apply manifest changes.\n Invocation rates are shared across Atlas replicas; 429 includes Retry-After.\n If the shared rate limiter is unavailable, invocation fails closed with 503.\n\n Source for build/deploy: a local --dir (default .), a platform git-service\n repo (--repo <ns>/<name>), or a public HTTPS git URL (--git-url <url>). --path selects\n a function directory within a remote repo; omit it for the existing root-manifest\n layout. --ref selects a branch/tag/commit (default: the repo's default branch).\n Remote sources record the pinned commit as provenance (never dirty) and NEVER\n read a repo-committed .env for secret values \u2014 provision secrets server-side\n or pass a local --from-env-file (resolved against your cwd).\n Local deploys record repository-wide gitDirty, including unignored files\n outside --dir. Check git status at the repository root before deploying.\n\n Workspace dependencies are compiled from packages declared in a containing\n sequence.app.yml, within the source repository. Only the selected function is\n deployed: no sibling primitives or Application registration. Shared Node packages\n can set package.json seqStudio.source to a root source entry for clean builds.\n Package build scripts are not run. Local secret paths remain relative to --dir.\n\n Interactive --repo builds clone over smart-HTTP using your seq-studio login\n and repository read access. No PAT is needed. Headless M2M builds use JSON\n materialize and accept only platform-managed --repo sources. Use --env to\n select the same environment for source and deployment.\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";
9
10
  export declare const REPOS_USAGE = "usage:\n seq-studio repos list -e <env> [--namespace <slug>] [--mine] repos visible on the environment\n seq-studio repos namespaces [create <slug>] -e <env> list or create namespaces\n seq-studio repos show <ns>/<name> -e <env> repo detail (branches, clone URL)\n seq-studio repos identity <ns>/<name> -e <env> [--write --dir .] show/install the server-issued identity receipt\n --adopt --write --yes admin-only legacy binding; commit the receipt via PR\n seq-studio repos create <ns>/<name> -e <env> [--default-branch b] [--git-backend walgit]\n create a repo seeded with a README; --git-backend\n walgit creates it empty (for pushing existing\n history); needs namespace write. Returns once\n the repo resolves by name, so clone can follow\n at once. The init commands take --repo\n <ns>/<name> to create, clone, and scaffold\n seq-studio repos clone <ns>/<name> -e <env> [--ref r] [--output dir] [--force] [--full] [--transport auto|git|json]\n seq-studio repos clone --url <https://\u2026/repos/<id>/git> -e <env> [--ref r] [--output dir] [--full]\n seq-studio repos clone --id <uuid> -e <env> [--ref r] [--output dir] [--full]\n real Git clone using seq-studio login;\n configures login for subsequent git pull/push\n seq-studio repos pull <ns>/<name> -e <env> [--ref r] [--out dir] [--force]\n materialize the tree at a ref (JSON API)\n seq-studio repos pulls <list|show|create|diff|merge|close|comment|comments|resolve|unresolve|review|reviews|checks> [args]\n review requests (see pulls --help)\n seq-studio repos delete <ns>/<name> -e <env> [--yes] delete a repo (confirm prompt)\n seq-studio repos ci init [--dir <repository>] create a native pipeline using platform defaults\n seq-studio repos ci show <ns>/<name> -e <env> --pr <number> [--json] inspect the server CI plan and runs\n seq-studio repos ci show <ns>/<name> -e <env> [--ref r] preview pipeline discovery or legacy checks\n seq-studio repos ci require <ns>/<name> --check <name> -e <env> disabled legacy control\n seq-studio repos ci import <ns>/<name> -e <env> [--ref r] disabled legacy control\n\n Flags: -e/--env <env> (required; see: seq-studio envs list)\n\n clone uses your login token (never written into the remote URL or Git config).\n A repository-local credential helper reads your current login for git pull/push.\n After expiry, run seq-studio login --env <env> again.\n --transport auto (default) and git both create a real Git checkout.\n Personal access tokens are retired; ATLAS_GIT_PAT is ignored.\n --transport json downloads files without .git; requires\n <ns>/<name>. repos pull also provides this files-only workflow.\n --ref accepts a branch, tag, or commit SHA (SHA \u2192 full clone, then checkout).\n Branch and tag clones are shallow (--depth 1). Pass --full for history.\n --output selects the clone directory (--out remains an alias).\n\n Authenticate JSON API calls with: seq-studio login\n Authenticate git clone/push with: seq-studio login --env <env>\n";
10
11
  export declare const PROCESS_RUNS_USAGE = "usage:\n seq-studio process runs start <process-id> -e <env> [--version <v>] [--run-id <id>]\n [--metadata-file <file.json>] [--title <text>] [--entity <type>:<id>] [--json]\n seq-studio process runs retry <run-id> -e <env> [--run-id <new-id>] [--json]\n seq-studio process runs list -e <env> [--process <id>] [--status <status>]\n [--entity-type <type>] [--entity-id <id>] [--archived] [--limit 1..500] [--json]\n seq-studio process runs show <run-id> -e <env> [--wait [--timeout <seconds>]]\n [--steps [--node <node-id>] [--full]] [--json]\n seq-studio process runs cancel <run-id> -e <env> [--json]\n\n Runs start and are read as you: start and retry need invoker on the process,\n show and list return only runs you can view, and cancel needs invoker on the\n process.\n start prints the new run's id. Omit --run-id for a fresh id on every start.\n --run-id names exactly one run: repeating it for the same process returns that\n run, whatever its status, instead of starting another. To run a failed run\n again, retry it rather than inventing a new id.\n --version pins a published process version; omitted, the active version runs.\n --metadata-file is a JSON object stored on the run.\n retry (CLI 0.9.0+) starts a new run of a failed, cancelled or timed_out run's\n process version with the same metadata, entity and title, linked to the\n original in its lineage, and prints the new id. Other statuses are refused.\n Like start, a retry waits queued while the process is at its concurrent-run\n limit.\n --run-id on retry names the new run, so repeating the retry returns it.\n list returns the newest runs first, up to --limit (default 50, max 500); the run\n API has no cursor, so narrow with filters to reach older runs.\n --status: pending, running, completed, failed, cancelled, timed_out.\n show --wait polls until the run finishes (default timeout 600s); the run keeps\n going if the wait times out. show prints the run's error when it failed.\n show --steps (CLI 0.9.1+) prints each step's status, edge, error, input and\n output, with the same viewer permission as show. Inputs, outputs and errors\n over 2000 characters are cut to a preview; --full prints them whole.\n --node narrows to one node. With --json, --steps returns { run, steps } with\n the same bounds; each step's truncated map names its cut fields and their full\n length. A failure in a node's input mapper happens before its step\n starts, so it shows only as the run's error.\n";
11
12
  export declare const ORM_DISCOVER_HELP = "usage:\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\n Find the ORM data you can read, then query it with orm read or orm sql.\n namespaces lists only namespaces you can read, ordered by name: format (v2 or\n v1), table and persisted-operation counts. It pages with --limit (default 50)\n and --offset; the total and the next page go to stderr.\n describe <namespace> lists its tables and views and the persisted operations\n it serves, with what each requires and the variables it declares (name: type,\n ! when required). --operations prints only the operations, ready for\n orm execute <namespace> <operation>. describe <namespace> <table> lists the\n table's columns (types, nullability, keys), enum values, links, actions, and\n the persisted operations that write it. Column names are the ones orm read and\n orm sql accept.\n A namespace you cannot read reports not found, the same as a missing one.\n --json omits SDL, adds active set/schema IDs and ops hash; retry on a mismatch.\n operation show prints one active persisted operation's registered GraphQL\n document; --json includes its hash, declared variables, and requirements.\n Missing and unreadable operations both report not found.\n In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), -e is not needed.\n";
@@ -13,12 +13,25 @@ export const INIT_INTO_REPO_HELP = ` Init into a repo: --repo <ns>/<name> on an
13
13
  .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside
14
14
  a declared application is not declared; add it to that app with seq-studio add.
15
15
  `;
16
+ export const ORM_DEPLOYMENT_POLICY_HELP = `usage:
17
+ seq-studio orm deployment-policy <namespace> -e <env> [--json]
18
+ seq-studio orm deployment-policy <namespace> -e <env> --mode ci --repo <ns>/<name> --branch <branch> --target <target-key>
19
+ seq-studio orm deployment-policy <namespace> -e <env> --mode manual
20
+
21
+ Existing namespaces default to manual deployment. CI mode rejects direct ORM
22
+ registration, schema apply, and operations-only activation on the server;
23
+ only the enrolled repository's verified merge deployment may activate changes.
24
+ Enabling CI mode requires namespace Admin, repository Admin, and an existing
25
+ automatic branch binding to this namespace. Restoring manual mode requires
26
+ namespace Admin. This changes deployment policy; it does not deploy source.
27
+ `;
16
28
  export const ORM_HELP = `usage:
17
29
  seq-studio orm init <dir> [--repo <ns>/<name>]
18
30
  seq-studio orm generate [dir] [--migration-export] [--check]
19
31
  seq-studio orm validate [dir]
20
32
  seq-studio orm plan [dir] -e <env>
21
33
  seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait]
34
+ seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci] [--repo <ns>/<name> --branch <branch> --target <target-key>] [--json]
22
35
  seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...
23
36
  seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>
24
37
  seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]
@@ -36,6 +49,8 @@ export const ORM_HELP = `usage:
36
49
  namespace's package.json @sequenceholdings/orm range before compiling.
37
50
  apply waits until the new version is live and serving (default up to 20m), then
38
51
  prints "live:"; --no-wait returns once the apply is queued.
52
+ CI-managed namespaces reject direct apply; use the enrolled repository's merge
53
+ workflow. deployment-policy reads or explicitly changes this namespace setting.
39
54
  namespaces lists what you can read; describe shows its tables and operations.
40
55
  Run seq-studio orm describe --help for the output.
41
56
  execute <namespace> <operation> runs the deployed version's persisted operation by
@@ -64,7 +79,7 @@ export const ARTIFACT_HELP = `usage:
64
79
  seq-studio artifact show <slug-or-id> -e <env> [--json]
65
80
  seq-studio artifact validate [dir]
66
81
  seq-studio artifact build|plan|deploy [dir | --repo <namespace>/<name> | --git-url <url>] [--ref <ref>] -e <env>
67
- seq-studio artifact dev [dir] -e <env> [--once] [--key <name>] [--link <package-dir>] [--port <port>] [--local-secrets <bindings.json>] [--bundler turbopack|webpack]
82
+ 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]
68
83
  seq-studio artifact pull <project-id> -e <env> --out <dir>
69
84
  seq-studio artifact promote|rollback <deployment-id> -e <env>
70
85
 
@@ -83,7 +98,8 @@ export const FUNCTIONS_USAGE = `usage:
83
98
  seq-studio functions register -e <env> [--dir d] register a shell + initial secret declarations; no deploy
84
99
  seq-studio functions deploy -e <env> [-m msg] preflight, upload, then show version and lifecycle progress
85
100
  seq-studio functions list -e <env> [--match-local] functions visible on the environment
86
- seq-studio functions show -e <env> [--fn slug] detail for one function (versions, secrets)
101
+ seq-studio functions show -e <env> [--fn slug] detail for one function (input/output schemas, versions, secrets)
102
+ [--schema] function identity plus input/output JSON Schemas, as JSON (any caller who can see it)
87
103
  [--json] [--version id|name] reader-gated release provenance
88
104
  seq-studio functions limits [-e <env>] [--json] bundled defaults/caps, or deployed policy
89
105
  [--fn slug] also show effective runtime limits (requires -e)
@@ -267,6 +283,8 @@ export const ORM_EXECUTE_HELP = `usage:
267
283
  `;
268
284
  /** read and sql print their own grammar help from the delegate. */
269
285
  function ormHelp(sub) {
286
+ if (sub === 'deployment-policy')
287
+ return ORM_DEPLOYMENT_POLICY_HELP;
270
288
  if (sub === 'namespaces' || sub === 'describe')
271
289
  return ORM_DISCOVER_HELP;
272
290
  if (sub === 'execute')
@@ -22,6 +22,9 @@ export interface FunctionSummary {
22
22
  egressIpRanges?: string[];
23
23
  egressEnforced?: boolean;
24
24
  limits?: Record<string, number | string>;
25
+ /** JSON Schema for the invoke payload; returned to every caller who can see the function. */
26
+ inputSchema?: Record<string, unknown> | null;
27
+ outputSchema?: Record<string, unknown> | null;
25
28
  }
26
29
  export interface VersionSummary {
27
30
  id: string;
@@ -1038,18 +1038,46 @@ async function printFunctionReleaseJson(ctx, fn, selected) {
1038
1038
  }, null, 2));
1039
1039
  return 0;
1040
1040
  }
1041
- export async function functionsShowCommand(args) {
1042
- const selected = args.flags.version;
1041
+ function printSchema(label, schema) {
1042
+ if (!schema) {
1043
+ console.log(` ${label}: (none declared)`);
1044
+ return;
1045
+ }
1046
+ console.log(` ${label}:`);
1047
+ for (const line of JSON.stringify(schema, null, 2).split('\n'))
1048
+ console.log(` ${line}`);
1049
+ }
1050
+ /** Rejects contradictory show flags before any request; returns the selected `--version`. */
1051
+ function showVersionFlag(flags) {
1052
+ const selected = flags.version;
1053
+ if (flagBool(flags, 'schema') && (flagBool(flags, 'json') || selected !== undefined)) {
1054
+ throw new Error('--schema cannot be combined with --json or --version');
1055
+ }
1043
1056
  if (selected !== undefined && (typeof selected !== 'string' || !selected.trim())) {
1044
1057
  throw new Error('--version requires a version ID or name');
1045
1058
  }
1046
- if (selected !== undefined && !flagBool(args.flags, 'json')) {
1059
+ if (selected !== undefined && !flagBool(flags, 'json')) {
1047
1060
  throw new Error('--version requires --json');
1048
1061
  }
1062
+ return selected;
1063
+ }
1064
+ function printFunctionSchemaJson(ctx, fn) {
1065
+ console.log(JSON.stringify({
1066
+ environment: ctx.env.name,
1067
+ function: { id: fn.id, slug: fn.slug, title: fn.title, description: fn.description ?? null, deployed: fn.deployed },
1068
+ inputSchema: fn.inputSchema ?? null,
1069
+ outputSchema: fn.outputSchema ?? null,
1070
+ }, null, 2));
1071
+ return 0;
1072
+ }
1073
+ export async function functionsShowCommand(args) {
1074
+ const selected = showVersionFlag(args.flags);
1049
1075
  const ctx = await buildContext(args);
1050
1076
  const fn = await resolveFunction({ ctx, args, required: true });
1051
1077
  if (!fn)
1052
1078
  return 1;
1079
+ if (flagBool(args.flags, 'schema'))
1080
+ return printFunctionSchemaJson(ctx, fn);
1053
1081
  if (flagBool(args.flags, 'json'))
1054
1082
  return printFunctionReleaseJson(ctx, fn, selected);
1055
1083
  console.log(`${LOG} function on ${ctx.env.name}:`);
@@ -1066,6 +1094,8 @@ export async function functionsShowCommand(args) {
1066
1094
  else if (fn.canInvoke) {
1067
1095
  console.log(` access: invoke-only`);
1068
1096
  }
1097
+ printSchema('input schema', fn.inputSchema);
1098
+ printSchema('output schema', fn.outputSchema);
1069
1099
  if (fn.currentUserAccess) {
1070
1100
  try {
1071
1101
  await printFunctionShowDetails({ ctx, fn });
package/dist/main.js CHANGED
@@ -48,7 +48,7 @@ const TOP_LEVEL_USAGE = `usage:
48
48
  seq-studio pipeline <sub> [args] list | assets | search | describe | schema | sample | query | init | validate | repin-orm | codegen | plan | adopt | unbind | retire | deploy | status | migrate | promote | rollback | run-now
49
49
  seq-studio auth <sub> [args] whoami | git-credential
50
50
  seq-studio feedback submit --file report.json [-e <env>] [--json]
51
- seq-studio orm <sub> [args] init | generate | validate | plan | apply | execute | read | sql | diff | migrate-from-yaml | import
51
+ seq-studio orm <sub> [args] init | generate | validate | plan | apply | deployment-policy | execute | read | sql | diff | migrate-from-yaml | import
52
52
  seq-studio service-accounts <sub> list | show | create (requires provisioning authority)
53
53
  seq-studio access <sub> definitions | list | grant | revoke | resolve
54
54
  seq-studio principals <sub> search | users search | groups list | groups show
@@ -108,7 +108,7 @@ const SUBCOMMANDS = {
108
108
  principals: new Set(['search', 'users', 'groups']),
109
109
  auth: new Set(['whoami', 'git-credential', 'pat']),
110
110
  feedback: new Set(['submit']),
111
- orm: new Set(['init', 'generate', 'validate', 'plan', 'apply', 'execute', 'namespaces', 'describe', 'read', 'sql', 'diff', 'migrate-from-yaml', 'import']),
111
+ orm: new Set(['init', 'generate', 'validate', 'plan', 'apply', 'deployment-policy', 'execute', 'namespaces', 'describe', 'read', 'sql', 'diff', 'migrate-from-yaml', 'import']),
112
112
  pipeline: new Set(['list', 'assets', 'search', 'describe', 'schema', 'sample', 'query', 'init', 'validate', 'repin-orm', 'codegen', 'adopt', 'unbind', 'retire', 'plan', 'deploy', 'status', 'migrate', 'promote', 'rollback', 'run-now']),
113
113
  envs: new Set(['add', 'list']),
114
114
  };
@@ -6,6 +6,7 @@
6
6
  * SEQUENCE_ORM_BASE_URL, share the seqapi token, forward argv.
7
7
  */
8
8
  import { fileURLToPath } from 'node:url';
9
+ import { ORM_USAGE } from './help.js';
9
10
  import { parseArgs } from '../argv.js';
10
11
  import { parseSourceSpec, resolveArtifactSource, } from '@sequenceholdings/artifact-studio/source-resolver';
11
12
  import { getAccessToken, tryGetAccessTokenWithMode } from '../auth.js';
@@ -15,7 +16,7 @@ import { explicitOrSandboxEnv, normalizeShortEnvFlag, readEnvFromArgv, withoutEn
15
16
  import { REQUIRE_EXPLICIT_ENV_MESSAGE } from '../env-flags.js';
16
17
  import { resolveFunctionSourceDir } from '../functions/source-selection.js';
17
18
  import { warnBeforeHostDeploy } from '../manifest-roles-notice.js';
18
- import { INIT_INTO_REPO_HELP, ORM_DISCOVER_HELP, ORM_EXECUTE_HELP, ORM_HELP } from '../command-help.js';
19
+ import { ORM_DEPLOYMENT_POLICY_HELP, ORM_DISCOVER_HELP, ORM_EXECUTE_HELP, ORM_HELP } from '../command-help.js';
19
20
  import { ormVersionMismatch, requiresSchemaVersionCheck } from './version-guard.js';
20
21
  /**
21
22
  * ORM subcommands that talk to Atlas — must not silently target `local`.
@@ -24,45 +25,6 @@ import { ormVersionMismatch, requiresSchemaVersionCheck } from './version-guard.
24
25
  const ORM_NETWORK_SUBS = new Set(['plan', 'apply', 'execute']);
25
26
  /** Subcommands that may read their namespace from a git-service repo (`--repo`). */
26
27
  const ORM_REPO_SUBS = new Set(['plan', 'apply']);
27
- const ORM_USAGE = `usage:
28
- seq-studio orm init <dir> [--repo <ns>/<name>]
29
- scaffold a namespace package (v2: TypeScript schema + GraphQL documents);
30
- --repo scaffolds into a git-service repo (see Init into a repo below)
31
- seq-studio orm generate [dir] write schema.graphql + operations.manifest.json + typePolicies.gen.ts (offline; runs consumer codegen when codegen.ts is present)
32
- seq-studio orm generate [dir] --migration-export [--check]
33
- export reviewed ORM inputs for a coordinated pipeline migration; --check verifies without writing
34
- seq-studio orm validate [dir] parse + validate definitions and verify committed migrations are in sync
35
- seq-studio orm plan [dir] -e <env> compile definitions and diff against the registry
36
- seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait]
37
- author the migration, register, apply, and refresh the generated outputs (the everyday command);
38
- waits until the new version is live (default up to 20m; e.g. --timeout 90s), --no-wait returns once queued
39
- seq-studio orm plan|apply --repo <ns>/<name> [--path <dir>] [--ref <ref>] -e <env>
40
- plan/apply a namespace committed to a platform git-service repo (CI deploy-from-git);
41
- --path selects the namespace directory (default: repo root). A remote apply never
42
- authors migrations: the committed ledger must already match the definitions.
43
- seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...
44
- run the deployed version's persisted operation by name as the caller (no checkout)
45
- seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>
46
- execute from the checkout manifest through the installed ORM package
47
- both execute forms accept --variables-file - (or /dev/stdin) for JSON stdin until EOF
48
- seq-studio orm read <namespace> <table> -e <env> [--where c=op.v]... [--select c,...] [--order c.desc] [--limit N] [--offset N] [--json|--jsonl]
49
- read rows of a deployed v2 namespace as the caller (row-level security applies)
50
- seq-studio orm sql <namespace> --query <sql> | --file <path> -e <env> [--param name[:type]=v]... | [--params <json-object>] [--json|--jsonl]
51
- run read-only SQL against a deployed v2 namespace as the caller
52
- seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]
53
- list the namespaces you can read
54
- seq-studio orm describe <namespace> [<table> | --operations] -e <env> [--json]
55
- show a namespace's tables, views, and persisted operations (with variables), or one table's columns and actions
56
- 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)
57
- seq-studio orm migrate-from-yaml <dir> convert a v1 YAML namespace to the v2 TypeScript format (offline; migrations/ preserved)
58
- seq-studio orm import [dir] --spec <file> | --table <t> --from <schema.table> --map <target=source,...>
59
- plan a batched copy from an existing Postgres relation into an owned table (writes a SQL script; no database connection)
60
-
61
- Environments: see \`seq-studio envs list\` (built-in: local; more are
62
- discovered after you authenticate).
63
- Authenticate with: seq-studio login
64
-
65
- ${INIT_INTO_REPO_HELP}`;
66
28
  /**
67
29
  * Classify an ERR_MODULE_NOT_FOUND from importing `@sequenceholdings/orm/cli`:
68
30
  * is the orm package itself absent, or is it present but a dependency (e.g.
@@ -221,9 +183,17 @@ export function formatOrmDependencyFailure(message) {
221
183
  * CLI: discovery reads Atlas's registry, and ad-hoc reads go through the ORM
222
184
  * client. None of them needs a namespace directory.
223
185
  */
224
- const NATIVE_ORM_SUBS = new Set(['namespaces', 'describe', 'operation', 'read', 'sql']);
186
+ const NATIVE_ORM_SUBS = new Set(['namespaces', 'describe', 'operation', 'read', 'sql', 'deployment-policy']);
225
187
  async function runNativeOrmCommand(sub, rest) {
226
188
  const help = rest.includes('--help') || rest.includes('-h');
189
+ if (sub === 'deployment-policy') {
190
+ if (help) {
191
+ console.log(ORM_DEPLOYMENT_POLICY_HELP);
192
+ return 0;
193
+ }
194
+ const { ormDeploymentPolicyCommand } = await import('./deployment-policy.js');
195
+ return ormDeploymentPolicyCommand(parseArgs(rest));
196
+ }
227
197
  if (sub === 'namespaces' || sub === 'describe' || sub === 'operation') {
228
198
  if (help) {
229
199
  console.log(ORM_DISCOVER_HELP);
@@ -0,0 +1,2 @@
1
+ import type { ParsedArgs } from '../argv.js';
2
+ export declare function ormDeploymentPolicyCommand(args: ParsedArgs): Promise<number>;
@@ -0,0 +1,49 @@
1
+ import { resolveRepo } from '@sequenceholdings/artifact-studio/git-service-client';
2
+ import { getJson, putJson } from '../atlas-client.js';
3
+ import { printCliError } from '../cli-errors.js';
4
+ import { requiredStringFlag, validateCommandInput } from '../command-input.js';
5
+ import { buildContext, clientOptions } from '../functions/commands.js';
6
+ function selection(args) {
7
+ validateCommandInput({ args, flags: { mode: 'string', repo: 'string', branch: 'string', target: 'string' }, positional: 1 });
8
+ 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.');
14
+ return { mode };
15
+ }
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' }) };
21
+ }
22
+ export async function ormDeploymentPolicyCommand(args) {
23
+ try {
24
+ const selected = selection(args);
25
+ const options = clientOptions(await buildContext(args));
26
+ const path = `/api/orm/namespaces/${encodeURIComponent(args.positional[0])}/deployment-policy`;
27
+ let result;
28
+ if (selected.mode === undefined)
29
+ result = await getJson({ ...options, path });
30
+ else {
31
+ 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' };
35
+ result = await putJson({ ...options, path, body });
36
+ }
37
+ if (args.flags.json === true)
38
+ 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
+ }
43
+ return 0;
44
+ }
45
+ catch (error) {
46
+ printCliError(error);
47
+ return 1;
48
+ }
49
+ }
@@ -0,0 +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 seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]\n list the namespaces you can read\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";
@@ -0,0 +1,42 @@
1
+ import { INIT_INTO_REPO_HELP } from '../command-help.js';
2
+ export const ORM_USAGE = `usage:
3
+ seq-studio orm init <dir> [--repo <ns>/<name>]
4
+ scaffold a namespace package (v2: TypeScript schema + GraphQL documents);
5
+ --repo scaffolds into a git-service repo (see Init into a repo below)
6
+ seq-studio orm generate [dir] write schema.graphql + operations.manifest.json + typePolicies.gen.ts (offline; runs consumer codegen when codegen.ts is present)
7
+ seq-studio orm generate [dir] --migration-export [--check]
8
+ export reviewed ORM inputs for a coordinated pipeline migration; --check verifies without writing
9
+ seq-studio orm validate [dir] parse + validate definitions and verify committed migrations are in sync
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]
12
+ author the migration, register, apply, and refresh the generated outputs (the everyday command);
13
+ waits until the new version is live (default up to 20m; e.g. --timeout 90s), --no-wait returns once queued
14
+ seq-studio orm plan|apply --repo <ns>/<name> [--path <dir>] [--ref <ref>] -e <env>
15
+ plan/apply a namespace committed to a platform git-service repo (CI deploy-from-git);
16
+ --path selects the namespace directory (default: repo root). A remote apply never
17
+ authors migrations: the committed ledger must already match the definitions.
18
+ seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...
19
+ run the deployed version's persisted operation by name as the caller (no checkout)
20
+ seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>
21
+ execute from the checkout manifest through the installed ORM package
22
+ both execute forms accept --variables-file - (or /dev/stdin) for JSON stdin until EOF
23
+ seq-studio orm read <namespace> <table> -e <env> [--where c=op.v]... [--select c,...] [--order c.desc] [--limit N] [--offset N] [--json|--jsonl]
24
+ read rows of a deployed v2 namespace as the caller (row-level security applies)
25
+ seq-studio orm sql <namespace> --query <sql> | --file <path> -e <env> [--param name[:type]=v]... | [--params <json-object>] [--json|--jsonl]
26
+ run read-only SQL against a deployed v2 namespace as the caller
27
+ seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]
28
+ list the namespaces you can read
29
+ seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci] [--repo <ns>/<name> --branch <branch> --target <target-key>] [--json]
30
+ inspect or explicitly change the namespace's deployment controller
31
+ seq-studio orm describe <namespace> [<table> | --operations] -e <env> [--json]
32
+ show a namespace's tables, views, and persisted operations (with variables), or one table's columns and actions
33
+ 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)
34
+ seq-studio orm migrate-from-yaml <dir> convert a v1 YAML namespace to the v2 TypeScript format (offline; migrations/ preserved)
35
+ seq-studio orm import [dir] --spec <file> | --table <t> --from <schema.table> --map <target=source,...>
36
+ plan a batched copy from an existing Postgres relation into an owned table (writes a SQL script; no database connection)
37
+
38
+ Environments: see \`seq-studio envs list\` (built-in: local; more are
39
+ discovered after you authenticate).
40
+ Authenticate with: seq-studio login
41
+
42
+ ${INIT_INTO_REPO_HELP}`;
@@ -293,6 +293,11 @@ function serializeNodeMetadata(node) {
293
293
  }
294
294
  case 'subprocess': {
295
295
  const subprocess = node;
296
+ // Child title/entity mappers serialize only when authored, so existing
297
+ // bundles keep their hashes.
298
+ const childMappers = {};
299
+ serializeMapperSlot(childMappers, 'child_title_mapper', subprocess.child_title);
300
+ serializeMapperSlot(childMappers, 'child_entity_mapper', subprocess.child_entity);
296
301
  const smeta = {
297
302
  process_id: subprocess.process,
298
303
  version: subprocess.version ?? '',
@@ -304,6 +309,7 @@ function serializeNodeMetadata(node) {
304
309
  ...(subprocess.supervisor_retry !== undefined
305
310
  ? { supervisor_retry: serializeRetryConfig(subprocess.supervisor_retry) }
306
311
  : {}),
312
+ ...childMappers,
307
313
  };
308
314
  const meta = { subprocess: smeta };
309
315
  serializeMapperSlot(meta, 'input_mapper', subprocess.input);
@@ -171,6 +171,8 @@ function emitNode(node, ctx) {
171
171
  : null,
172
172
  bindings(m.bindings),
173
173
  mapper('input', m.input_mapper_source, m.input_mapper_expr, ctx),
174
+ mapper('child_title', sub.child_title_mapper_source, sub.child_title_mapper_expr, ctx),
175
+ mapper('child_entity', sub.child_entity_mapper_source, sub.child_entity_mapper_expr, ctx),
174
176
  requiredMapper('output', sub.output_mapper_source, sub.output_mapper_expr, ctx, `subprocess node "${node.id}"`),
175
177
  tail,
176
178
  ]);
@@ -241,6 +241,10 @@ const SUBPROCESS_BEHAVIORAL_FIELDS = [
241
241
  'on_child_error',
242
242
  'output_mapper_source',
243
243
  'output_mapper_expr',
244
+ 'child_title_mapper_source',
245
+ 'child_title_mapper_expr',
246
+ 'child_entity_mapper_source',
247
+ 'child_entity_mapper_expr',
244
248
  'supervisor_retry',
245
249
  ];
246
250
  function diffNode(a, b) {
@@ -1,5 +1,5 @@
1
1
  import type { ParsedArgs } from '../process/commands.js';
2
- export declare const PULLS_USAGE = "usage:\n seq-studio repos pulls list <ns>/<name> -e <env> [--state open|closed|merged] [--limit N] [--cursor <cursor>]\n seq-studio repos pulls show <ns>/<name> <number> -e <env>\n seq-studio repos pulls create <ns>/<name> --head <branch> --base <branch> --title <title> -e <env> [--body-file <path>]\n seq-studio repos pulls diff <ns>/<name> <number> -e <env> [--max-files N]\n seq-studio repos pulls merge <ns>/<name> <number> -e <env> [--method squash|merge|ff] [--message <text>] [--yes]\n seq-studio repos pulls close <ns>/<name> <number> -e <env>\n seq-studio repos pulls comment <ns>/<name> <number> -e <env> (--body <text> | --body-file <path>)\n [--path <file> --line N [--side LEFT|RIGHT] [--commit <sha>]] [--reply-to <comment-id>]\n seq-studio repos pulls comments <ns>/<name> <number> -e <env> [--limit N] [--cursor <cursor>]\n seq-studio repos pulls resolve <ns>/<name> <number> <root-comment-id> -e <env>\n seq-studio repos pulls unresolve <ns>/<name> <number> <root-comment-id> -e <env>\n seq-studio repos pulls review <ns>/<name> <number> -e <env> (--approve | --request-changes | --comment)\n [--body <text> | --body-file <path>] [--commit <sha>]\n seq-studio repos pulls reviews <ns>/<name> <number> -e <env> [--limit N] [--cursor <cursor>]\n seq-studio repos pulls checks <ns>/<name> <number> -e <env> [--head <sha>]\n\n All results are JSON (--json is accepted). Authenticate: seq-studio login --env <env>.\n create needs repository write; merge needs merge/admin authority and passing server\n review/check policy. There is no policy bypass. Review show and diff before merging.\n Merge operates on the current branch head under server policy. When repository CI\n checks the branch, merge sends the checked head and base revisions; a newer push\n makes the server refuse until checks rerun. Default merge method: squash.\n list returns one page with nextCursor; pass --cursor to continue.\n diff compares live base/head branches for open Pulls, recorded SHAs for terminal\n Pulls, and reports truncated when its file\n limit is reached (default 100, maximum 500).\n close needs to be the Pull's author or have repository write; it is idempotent.\n comment adds a Pull comment; --path and --line anchor it to a diff line (side RIGHT\n and the branch's current commit unless --side/--commit say otherwise), and\n --reply-to answers an existing thread. review records approve, request-changes, or\n comment against the commit the Pull's branch points at now (or --commit). checks prints the check runs,\n CI plan and runs, and merge gates (mergeability, reviews, code owners) in one object.\n resolve and unresolve require repository read access and a root comment UUID from\n comments; the server rejects replies. They return the updated comment as JSON.\n repos pull (singular) materializes files; repos pulls manages review requests.\n";
2
+ export declare const PULLS_USAGE = "usage:\n seq-studio repos pulls list <ns>/<name> -e <env> [--state open|closed|merged] [--limit N] [--cursor <cursor>]\n seq-studio repos pulls show <ns>/<name> <number> -e <env>\n seq-studio repos pulls create <ns>/<name> --head <branch> --base <branch> --title <title> -e <env> [--body-file <path>]\n seq-studio repos pulls diff <ns>/<name> <number> -e <env> [--max-files N]\n seq-studio repos pulls merge <ns>/<name> <number> -e <env> [--method squash|merge|ff] [--message <text>] [--yes]\n seq-studio repos pulls close <ns>/<name> <number> -e <env>\n seq-studio repos pulls comment <ns>/<name> <number> -e <env> (--body <text> | --body-file <path>)\n [--path <file> --line N [--side LEFT|RIGHT] [--commit <sha>]] [--reply-to <comment-id>]\n seq-studio repos pulls comments <ns>/<name> <number> -e <env> [--limit N] [--cursor <cursor>]\n seq-studio repos pulls resolve <ns>/<name> <number> <root-comment-id> -e <env>\n seq-studio repos pulls unresolve <ns>/<name> <number> <root-comment-id> -e <env>\n seq-studio repos pulls review <ns>/<name> <number> -e <env> (--approve | --request-changes | --comment)\n [--body <text> | --body-file <path>] [--commit <sha>]\n seq-studio repos pulls reviews <ns>/<name> <number> -e <env> [--limit N] [--cursor <cursor>]\n seq-studio repos pulls checks <ns>/<name> <number> -e <env> [--head <sha>]\n\n All results are JSON (--json is accepted). Authenticate: seq-studio login --env <env>.\n create needs repository write; merge needs merge/admin authority and passing server\n review/check policy. There is no policy bypass. Review show and diff before merging.\n Merge operates on the current branch head under server policy. When repository CI\n checks the branch, merge sends the checked head and base revisions; a newer push\n makes the server refuse until checks rerun. Default merge method: squash.\n list returns one page with nextCursor; pass --cursor to continue.\n create, show and list add a web url field to each Pull (<env>/repositories/<ns>/<name>/pull/<n>).\n diff compares live base/head branches for open Pulls, recorded SHAs for terminal\n Pulls, and reports truncated when its file\n limit is reached (default 100, maximum 500).\n close needs to be the Pull's author or have repository write; it is idempotent.\n comment adds a Pull comment; --path and --line anchor it to a diff line (side RIGHT\n and the branch's current commit unless --side/--commit say otherwise), and\n --reply-to answers an existing thread. review records approve, request-changes, or\n comment against the commit the Pull's branch points at now (or --commit). checks prints the check runs,\n CI plan and runs, and merge gates (mergeability, reviews, code owners) in one object.\n resolve and unresolve require repository read access and a root comment UUID from\n comments; the server rejects replies. They return the updated comment as JSON.\n repos pull (singular) materializes files; repos pulls manages review requests.\n";
3
3
  /** Only the revisions this command needs from GET .../pulls/<n>/ci. */
4
4
  interface PullCiStatus {
5
5
  plan?: {
@@ -17,6 +17,19 @@ export declare function checkedMergeRevision({ fetchStatus }: {
17
17
  expectedHeadSha: string;
18
18
  expectedBaseSha: string;
19
19
  } | Record<string, never>>;
20
+ /** Atlas web URL for a Pull: <env origin>/repositories/<ns>/<name>/pull/<number>. */
21
+ export declare function pullWebUrl({ baseUrl, repoPath, number }: {
22
+ baseUrl: string;
23
+ repoPath: string;
24
+ number: number | string;
25
+ }): string;
26
+ /** Adds `url` to a Pull (create), `pullRequest` (show), or each `items` entry (list). */
27
+ export declare function addPullUrls({ action, result, baseUrl, repoPath }: {
28
+ action: string;
29
+ result: unknown;
30
+ baseUrl: string;
31
+ repoPath: string;
32
+ }): unknown;
20
33
  export declare function commentBody(args: ParsedArgs): Promise<object>;
21
34
  export declare function reviewInput(args: ParsedArgs): Promise<{
22
35
  state: string;
@@ -30,6 +30,7 @@ export const PULLS_USAGE = `usage:
30
30
  checks the branch, merge sends the checked head and base revisions; a newer push
31
31
  makes the server refuse until checks rerun. Default merge method: squash.
32
32
  list returns one page with nextCursor; pass --cursor to continue.
33
+ create, show and list add a web url field to each Pull (<env>/repositories/<ns>/<name>/pull/<n>).
33
34
  diff compares live base/head branches for open Pulls, recorded SHAs for terminal
34
35
  Pulls, and reports truncated when its file
35
36
  limit is reached (default 100, maximum 500).
@@ -90,6 +91,31 @@ async function createBody(args) {
90
91
  throw new Error('--body-file exceeds 65,536 characters.');
91
92
  return { headRef, baseRef, title, ...(body === undefined ? {} : { body }) };
92
93
  }
94
+ /** Atlas web URL for a Pull: <env origin>/repositories/<ns>/<name>/pull/<number>. */
95
+ export function pullWebUrl({ baseUrl, repoPath, number }) {
96
+ const [namespace = '', name = ''] = repoPath.split('/');
97
+ return `${new URL(baseUrl).origin}/repositories/${encodeURIComponent(namespace)}/${encodeURIComponent(name)}/pull/${encodeURIComponent(String(number))}`;
98
+ }
99
+ function withPullUrl({ pull, baseUrl, repoPath }) {
100
+ const number = pull?.number;
101
+ if (typeof number !== 'number' && typeof number !== 'string')
102
+ return pull;
103
+ return { ...pull, url: pullWebUrl({ baseUrl, repoPath, number }) };
104
+ }
105
+ /** Adds `url` to a Pull (create), `pullRequest` (show), or each `items` entry (list). */
106
+ export function addPullUrls({ action, result, baseUrl, repoPath }) {
107
+ const add = (pull) => withPullUrl({ pull, baseUrl, repoPath });
108
+ const record = result;
109
+ if (!record || typeof record !== 'object')
110
+ return result;
111
+ if (action === 'create')
112
+ return add(record);
113
+ if (action === 'show' && record.pullRequest)
114
+ return { ...record, pullRequest: add(record.pullRequest) };
115
+ if (action === 'list' && Array.isArray(record.items))
116
+ return { ...record, items: record.items.map(add) };
117
+ return result;
118
+ }
93
119
  const MAX_BODY_LENGTH = 65_536;
94
120
  const COMMIT_SHA = /^[0-9a-f]{40}$/i;
95
121
  const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -296,6 +322,6 @@ export async function reposPullsCommand(input) {
296
322
  result = await pullDiff({ ctx, path, repoBase, maxFiles });
297
323
  else
298
324
  result = await pullRead({ action, args, ctx, path, state, limit });
299
- console.log(JSON.stringify(result, null, 2));
325
+ console.log(JSON.stringify(addPullUrls({ action, result, baseUrl: ctx.env.url, repoPath }), null, 2));
300
326
  return 0;
301
327
  }
@@ -29,7 +29,7 @@ const usage = `usage:
29
29
  seq-studio storage access --workspace <id> [--node <id>] [--file <access.json>] -e <env>
30
30
  seq-studio storage operations --workspace <id> [--retry <operation-id>] -e <env>
31
31
  seq-studio storage abort --workspace <id> --upload <id> -e <env>
32
- seq-studio storage source show|apply --workspace <id> [--target <id>] [--readers <principal-ids>] -e <env>
32
+ seq-studio storage source show|apply --workspace <id> [--target <id>] [--readers <principal-ids>] [--auto-sync true|false] -e <env>
33
33
  seq-studio storage sync --workspace <id> [--idempotency-key <key>] [--wait] -e <env>
34
34
  seq-studio storage sync status|retry|cancel <sync-id> --workspace <id> -e <env>
35
35
  seq-studio storage snapshots [list|show <snapshot-id>] --workspace <id> [--cursor <cursor>] -e <env>
@@ -127,11 +127,14 @@ export async function runStorageCommand(sub, args) {
127
127
  switch (sub) {
128
128
  case 'source': {
129
129
  if (args.positional[0] === 'apply') {
130
+ const autoSync = args.flags['auto-sync'];
131
+ if (autoSync !== undefined && autoSync !== 'true' && autoSync !== 'false')
132
+ throw new Error('--auto-sync must be true or false');
130
133
  const current = await workspace.pipelineSource();
131
134
  const target = flag('target') ?? current.targets[0]?.id;
132
135
  if (!target)
133
136
  throw new Error('No pipeline destination is configured for this environment');
134
- print(await workspace.applyPipelineSource({ target, readers: flag('readers') === undefined ? current.source?.readers ?? [] : flag('readers').split(',').map(x => x.trim()).filter(Boolean), retentionDays: flag('retention-days') ? Number(flag('retention-days')) : current.source?.retentionDays ?? 30 }));
137
+ print(await workspace.applyPipelineSource({ target, ...(autoSync === undefined ? {} : { autoSyncEnabled: autoSync === 'true' }), readers: flag('readers') === undefined ? current.source?.readers ?? [] : flag('readers').split(',').map(x => x.trim()).filter(Boolean), retentionDays: flag('retention-days') ? Number(flag('retention-days')) : current.source?.retentionDays ?? 30 }));
135
138
  }
136
139
  else if (!args.positional[0] || args.positional[0] === 'show')
137
140
  print(await workspace.pipelineSource());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequenceholdings/studio-cli",
3
- "version": "0.9.8",
3
+ "version": "0.9.10",
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": {
@@ -43,17 +43,17 @@
43
43
  "smol-toml": "^1.9.0",
44
44
  "tsx": "^4.20.3",
45
45
  "yaml": "^2.8.4",
46
- "zod": "^4.1.13",
46
+ "zod": "4.6.6",
47
47
  "@sequenceholdings/agent-spec": "0.1.5",
48
- "@sequenceholdings/artifact-studio": "0.11.8",
48
+ "@sequenceholdings/artifact-studio": "0.11.10",
49
+ "@sequenceholdings/managed-functions": "0.5.8",
50
+ "@sequenceholdings/storage": "0.1.6",
49
51
  "@sequenceholdings/lattice": "0.1.8",
50
- "@sequenceholdings/storage": "0.1.5",
51
- "@sequenceholdings/platform": "0.1.2",
52
- "@sequenceholdings/managed-functions": "0.5.7"
52
+ "@sequenceholdings/platform": "0.1.3"
53
53
  },
54
54
  "peerDependencies": {
55
- "@sequenceholdings/orm": "2.8.5",
56
- "@sequenceholdings/pipeline-spec": "0.3.5"
55
+ "@sequenceholdings/pipeline-spec": "0.3.6",
56
+ "@sequenceholdings/orm": "2.8.5"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@sequenceholdings/orm": {
@@ -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/orm": "2.8.5",
73
- "@sequenceholdings/pipeline-spec": "0.3.5"
72
+ "@sequenceholdings/pipeline-spec": "0.3.6",
73
+ "@sequenceholdings/orm": "2.8.5"
74
74
  },
75
75
  "engines": {
76
76
  "node": ">=20"