@sequenceholdings/studio-cli 0.9.0 → 0.9.2

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
@@ -43,7 +43,10 @@ that the underlying platform HTTP routes are public contracts.
43
43
 
44
44
  ### Piped output
45
45
 
46
- Commands with `--json` write their structured result to stdout. The executable
46
+ Commands with `--json` (or `--jsonl`) write only their structured result to
47
+ stdout, so `seq-studio … --json | jq` parses: while either flag is set, every
48
+ human status, progress, or hint line goes to stderr, including lines from the
49
+ delegated ORM and Artifact Studio commands. The executable
47
50
  allows stdout and stderr to drain before normal exit, including for large
48
51
  responses and nonzero command statuses. Check the exit status before using a
49
52
  result; an interrupted process or a closed downstream pipe can still leave
@@ -357,6 +360,11 @@ code. Put shared runtime business logic in a managed function and reference
357
360
  that primitive from the workflow. For reuse between app repositories, publish
358
361
  versioned packages and depend on registry versions.
359
362
 
363
+ Scaffolds write no `.npmrc` (CLI **0.9.2**+ also drops the `functions init`
364
+ one), so `pnpm install` resolves from the registry your user configuration
365
+ selects, `@sequenceholdings` packages included. Commit `pnpm-lock.yaml`:
366
+ repository CI installs from the registry the lockfile was resolved against.
367
+
360
368
  Workspace deployments outside `local` require the root lockfile. Staging keeps
361
369
  its registry resolutions and overrides; the existing Managed Functions registry
362
370
  policy still applies. A lockfile from an unsupported registry is reported and
@@ -904,7 +912,7 @@ compiled to canonical SQL before registration.
904
912
  | `seq-studio orm diff [dir] [--check]` | Author the next committed migration, or verify the migration/snapshot chain offline for CI. |
905
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. |
906
914
  | `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. |
907
- | `seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>` | Execute one named persisted operation as hashed in this checkout's `operations.manifest.json`, with variables from a JSON object file, as the signed-in caller. |
915
+ | `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. |
908
916
  | `seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]` | List the namespaces you can read. |
909
917
  | `seq-studio orm describe <namespace> [<table> \| --operations] -e <env> [--json]` | Show a namespace's tables, views, and persisted operations (with their variables), only its operations, or one table's columns, actions, and the operations that write it. |
910
918
  | `seq-studio orm operation show <namespace> <name> -e <env> [--json]` | Show the active persisted operation's registered GraphQL document; JSON also includes its hash and declared variables. Requires namespace read access. |
@@ -1022,11 +1030,12 @@ inputs, and `jsonb` take JSON, and other types take the text as is. Use the file
1022
1030
  for `null`. An unknown name lists the deployed operations, and an input error
1023
1031
  lists the operation's variables.
1024
1032
 
1025
- The checkout form, `orm execute <operation> [dir]`, sends the hash from that
1026
- directory's `operations.manifest.json`. When the deployed version hashes the
1027
- operation differently, it prints the local hash, the deployed hash, the deployed
1028
- version, and the by-name command to run instead. The second argument picks the
1029
- form: an existing directory means a checkout.
1033
+ The updated checkout form, `orm execute <operation> [dir]`, validates the name
1034
+ and kind from that directory's `operations.manifest.json`, then selects the
1035
+ active registered operation by name. Namespace-wide rehashes no longer strand
1036
+ the checkout. The second argument still picks the form: an existing directory
1037
+ means a checkout. Deploy matching Atlas runtime/broker support before publishing
1038
+ and using the updated CLI/SDKs.
1030
1039
  - A namespace you cannot read reports not found, the same as one that does not
1031
1040
  exist. `--json` prints the full description, including read and write
1032
1041
  policies, but not the generated GraphQL SDL.
@@ -1117,8 +1126,8 @@ datasets before adopting this path for latency-sensitive reads.
1117
1126
  | Command | What it does |
1118
1127
  |---------|--------------|
1119
1128
  | `seq-studio process init <dir>` | Scaffold a process repo: `package.json`, sample `process.ts`, `tsconfig.json` |
1120
- | `seq-studio process lint [--dir <path>] [--offline]` | Static checks (graph, return contracts, agent schema, timeouts, and JSONata syntax); `--offline` skips live agent-schema lookup |
1121
- | `seq-studio process plan [--dir <path>] -e <env>` | Build bundle, diff against currently-active version |
1129
+ | `seq-studio process lint [--dir <path>] [--offline]` | Static checks (graph, return contracts, agent schema, timeouts, JSONata syntax, and human `input` projections); `--offline` skips live agent-schema lookup |
1130
+ | `seq-studio process plan [--dir <path>] -e <env>` | Build bundle, run the same lint `apply` enforces (CLI **0.9.1**+), diff against currently-active version |
1122
1131
  | `seq-studio process apply [--dir <path>] -e <env> [--only <id1,id2>]` | Build → register bundle → promote each process. `--only` promotes just the named process ids (the bundle still contains the whole root — registration is inert) |
1123
1132
  | `seq-studio process apply --repo <namespace>/<name> [--ref <r>] -e <env> [--only <id1,id2>]` | Same as above, but materializes the source from a platform git-service repo in `processes`, `apps`, or your own namespace. Pinned commit SHA is injected as bundle provenance. Uses your `seq-studio login` (or the target realm's M2M JSON source path for CI) |
1124
1133
  | `seq-studio process test [--dir <path>] -e <env> [--offline]` | CI wrapper: lint + plan, non-zero exit on errors or BREAKING diffs; see the offline limitation below |
@@ -1131,7 +1140,7 @@ datasets before adopting this path for latency-sensitive reads.
1131
1140
  | `seq-studio process runs start <process-id> -e <env> [--version <v>] [--run-id <id>] [--metadata-file <file>]` | Start a run as you (needs `invoker` on the process); prints the new run id |
1132
1141
  | `seq-studio process runs retry <run-id> -e <env> [--run-id <new-id>]` | Start a failed, cancelled, or timed-out run again with the same inputs, linked to the original (needs `invoker` on the process; CLI **0.9.0**+) |
1133
1142
  | `seq-studio process runs list -e <env> [--process <id>] [--status <s>] [--limit N]` | List runs you can view, newest first |
1134
- | `seq-studio process runs show <run-id> -e <env> [--wait]` | Show a run's status and steps; `--wait` polls until it finishes |
1143
+ | `seq-studio process runs show <run-id> -e <env> [--wait] [--steps [--node <id>] [--full]]` | Show a run's status, error, and steps; `--wait` polls until it finishes; `--steps` (CLI **0.9.1**+) adds each step's edge, error, input, and output |
1135
1144
  | `seq-studio process runs cancel <run-id> -e <env>` | Cancel a run (needs `invoker` on the process) |
1136
1145
 
1137
1146
  Use `lint --offline` for checks without live registry lookups. `test --offline`
@@ -1145,6 +1154,7 @@ subprocess versions when needed. It is not a guarantee of network-free execution
1145
1154
  seq-studio process runs start credit-memo -e <env> --metadata-file run.json
1146
1155
  # prints: Run: <run-id> | Process: credit-memo@3 | Status: pending
1147
1156
  seq-studio process runs show <run-id> -e <env> --wait --json
1157
+ seq-studio process runs show <run-id> -e <env> --steps # each step's edge, error, input, output
1148
1158
  seq-studio process runs retry <run-id> -e <env> # after it failed
1149
1159
  seq-studio process runs list -e <env> --process credit-memo --status failed --limit 20
1150
1160
  ```
@@ -1176,6 +1186,22 @@ maximum 500). The run API has no cursor, so narrow the filters to reach older
1176
1186
  runs. `show --wait` stops waiting after `--timeout` seconds (default 600); the
1177
1187
  run itself continues. `--json` prints the API response on every command.
1178
1188
 
1189
+ `show` prints the run's `error` when it failed. `show --steps` (CLI **0.9.1**
1190
+ or later) prints each step's status, edge taken, error, input, and output, read
1191
+ from the same run response and permission (`viewer` on the run) as `show`.
1192
+ Inputs, outputs, and errors longer than 2,000 characters are cut to a preview
1193
+ that says their full length; `--full` prints them whole, and `--node <id>`
1194
+ narrows to one node. `--steps --json` returns `{ run, steps }` with the same
1195
+ bounds: a cut field holds its first 2,000 characters as a string, and the step's
1196
+ (or run's) `truncated` map names it with its full length, for example
1197
+ `"truncated": { "output": { "chars": 5012 } }`.
1198
+ A node whose input mapper fails never starts a step, so that failure shows only
1199
+ as the run's error.
1200
+
1201
+ ```bash
1202
+ seq-studio process runs show <run-id> -e <env> --steps --node review --full --json
1203
+ ```
1204
+
1179
1205
  ### JSONata mapper contracts
1180
1206
 
1181
1207
  `jsonata('…')` expressions are serialized as `*_expr` data and run in a
@@ -1185,7 +1211,7 @@ and returns an ISO-8601 string.
1185
1211
 
1186
1212
  | Mapper slot | `$` input | Named bindings | Expected result |
1187
1213
  |-------------|-----------|----------------|-----------------|
1188
- | `input` / human context projection | Context snapshot | — | Runner input; human projections return a context snapshot |
1214
+ | `input` / human context projection | Context snapshot | — | Runner input; human projections return `{ entity, run, upstream }` |
1189
1215
  | `artifact_refs` | Context snapshot | — | Artifact-reference array |
1190
1216
  | `dueDate` | Context snapshot | — | ISO date, epoch milliseconds, or `null` |
1191
1217
  | `emailNotification` template/reminder | Context snapshot | `$info` | `{ subject, body }` |
@@ -2114,6 +2140,43 @@ git -C get-loan add -A && git -C get-loan commit -m 'Scaffold get-loan' && git -
2114
2140
  `repos clone`.
2115
2141
  - It needs `-e <env>` and a user login, or an agent sandbox.
2116
2142
 
2143
+ #### Repository CI inventory for standalone primitives
2144
+
2145
+ Repository CI checks and deploys only what `.seq/repository.yml` (or a root
2146
+ `sequence.app.yml`) declares, and fails `undeclared-manifest` on any other
2147
+ `artifact.bundle.yml`, `managed-function.yml`, or `sequence.config.ts`. So in a
2148
+ git-service checkout (its `origin` is a git-service clone URL, or it already has
2149
+ `.seq/repository.yml`), `orm init`, `functions init`, and `artifact init` add
2150
+ the scaffold under `resources`, with or without `--repo`:
2151
+
2152
+ ```yaml
2153
+ # Repository CI checks every application and resource listed here and deploys it when changes merge to main.
2154
+ schema_version: 1
2155
+ resources:
2156
+ - id: maint-orm
2157
+ kind: orm
2158
+ path: orm/maint
2159
+ namespace: maint
2160
+ - id: notify
2161
+ kind: function
2162
+ path: functions/notify
2163
+ slug: notify
2164
+ - id: app-ui
2165
+ kind: artifact
2166
+ path: app
2167
+ project_id: app
2168
+ ```
2169
+
2170
+ The identity comes from the scaffold itself (`sequence.config.ts` namespace,
2171
+ `managed-function.yml` `function.id`, `artifact.bundle.yml`
2172
+ `artifact.project_id`), and existing comments and entries are kept. A scaffold
2173
+ inside a declared application is left out, with a note to add it to that app
2174
+ with `seq-studio add`; a path that overlaps a declared resource or an `ignore`
2175
+ entry, or that would deploy the same namespace, function, or project id as a
2176
+ declared resource (CI rejects duplicate identities), is left out with the
2177
+ reason on stderr. Other repositories are not touched.
2178
+ Commit `.seq/repository.yml` with the scaffold.
2179
+
2117
2180
  ### Repository identity
2118
2181
 
2119
2182
  New repositories created on identity-capable Atlas releases contain a committed
@@ -2226,7 +2289,7 @@ JSON API — the same repos `--repo <ns>/<name>` sources build from.
2226
2289
  | `seq-studio repos namespaces [create <slug>] -e <env>` | list namespaces, or create one (creator becomes owner) |
2227
2290
  | `seq-studio repos show <ns>/<name> -e <env>` | detail: id, branches, clone URL; artifact project id when slug matches |
2228
2291
  | `seq-studio repos identity <ns>/<name> -e <env> [--write --dir .]` | inspect the server-issued identity; `--write` restores its receipt at the matching clone's Git worktree root; admin-only `--adopt --write --yes` binds a legacy repository once |
2229
- | `seq-studio repos create <ns>/<name> -e <env> [--default-branch <b>] [--git-backend walgit]` | create a repo, seeded with a README on `main`. The server picks the backend (walgit wherever it is configured). `--git-backend walgit` creates it empty, for pushing existing history. Needs namespace write. |
2292
+ | `seq-studio repos create <ns>/<name> -e <env> [--default-branch <b>] [--git-backend walgit]` | create a repo, seeded with a README on `main`. The server picks the backend (walgit wherever it is configured). `--git-backend walgit` creates it empty, for pushing existing history. Needs namespace write. Returns once the repo resolves by name (the lookup `clone`, `show`, and `pull` use), so `repos clone` can follow at once. |
2230
2293
  | `seq-studio repos clone <ns>/<name> \| --url <clone-url> \| --id <uuid> -e <env> [--ref <r>] [--output <dir>] [--force] [--full] [--transport auto\|git\|json]` | smart-HTTP `git clone --depth 1` using login (`--full` fetches history; a commit SHA stays full). Configures login for subsequent Git commands. Use files-only `--transport json` for `<ns>/<name>`. `--out` remains an alias for `--output`. |
2231
2294
  | `seq-studio repos pull <ns>/<name> -e <env> [--ref <r>] [--out <dir>] [--force]` | always materialize via JSON API (no `.git` dir); refuses a non-empty destination unless `--force` |
2232
2295
  | `seq-studio repos delete <ns>/<name> -e <env> [--yes]` | delete a repo — interactive confirm unless `--yes` |
@@ -20,5 +20,5 @@ export declare function agentsApplyCommand(args: ParsedArgs, { mode }?: {
20
20
  }): Promise<number>;
21
21
  export declare function agentsListCommand(args: ParsedArgs): Promise<number>;
22
22
  export declare function agentsShowCommand(args: ParsedArgs): Promise<number>;
23
- export declare const AGENTS_USAGE = "usage:\n seq-studio agents init <dir> [--repo <ns>/<name>] scaffold a typed agent (--repo: into a git-service repo)\n seq-studio agents validate [--dir d] [--target app] [--only ids] offline compile + validation\n seq-studio agents bundle --out <file> [--dir d] [--target app] [--only ids] offline deploy body { definitions, bundleHash }\n seq-studio agents plan [--dir d] [-e <env>] [--only ids] [--managed] [--check-execution] offline bundle plan or live diff\n seq-studio agents apply [--dir d] -e <env> [--only ids] [--yes] [--managed] [--check-execution] apply creates/updates; never deletes\n seq-studio agents list -e <env> list visible agents\n seq-studio agents show <id> -e <env> show one agent\n seq-studio agents voice help internal Voice authoring/publication\n\n plan and apply deploy configuration only, as you: a new agent needs Can\n create on Agent Builder, an existing one needs editor, and access stays\n whatever Agent Builder or the API set. --managed is Sequence's code-managed\n path, where the definition also owns access; it is limited to Sequence staff.\n\n --check-execution requires -e, CONFIG mode and at most 20 existing agents in\n one whole bundle. It checks proposed pinned-execution eligibility before\n apply writes; it is point-in-time and grants no access or future identity.\n Unknown checked routes or missing acknowledgement fail without fallback.\n\n Source: local --dir (default .), --repo agents/<name>, or --git-url <url>.\n Use --ref for remote sources. --target selects the deployment APP_ENV when it\n differs from the CLI environment alias (notably OpCo registrations). --only\n accepts a comma-separated list of agent IDs after environment selection.\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";
23
+ export declare const AGENTS_USAGE = "usage:\n seq-studio agents init <dir> [--repo <ns>/<name>] scaffold a typed agent (--repo: into a git-service repo)\n seq-studio agents validate [--dir d] [--target app] [--only ids] offline compile + validation\n seq-studio agents bundle --out <file> [--dir d] [--target app] [--only ids] offline deploy body { definitions, bundleHash }\n seq-studio agents plan [--dir d] [-e <env>] [--only ids] [--managed] [--check-execution] offline bundle plan or live diff\n seq-studio agents apply [--dir d] -e <env> [--only ids] [--yes] [--managed] [--check-execution] apply creates/updates; never deletes\n seq-studio agents list -e <env> list visible agents\n seq-studio agents show <id> -e <env> show one agent\n seq-studio agents voice help internal Voice authoring/publication\n\n plan and apply deploy configuration only, as you: a new agent needs Can\n create on Agent Builder, an existing one needs editor, and access stays\n whatever Agent Builder or the API set. --managed is Sequence's code-managed\n path, where the definition also owns access; it is limited to Sequence staff.\n\n --check-execution requires -e, CONFIG mode and at most 20 existing agents in\n one whole bundle. It checks proposed pinned-execution eligibility before\n apply writes; it is point-in-time and grants no access or future identity.\n Unknown checked routes or missing acknowledgement fail without fallback.\n\n Source: local --dir (default .), --repo agents/<name>, or --git-url <url>.\n Use --ref for remote sources. --target selects the deployment APP_ENV when it\n differs from the CLI environment alias (notably OpCo registrations). --only\n accepts a comma-separated list of agent IDs after environment selection.\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";
24
24
  export declare function runAgentsCommand(sub: string | undefined, args: ParsedArgs): Promise<number>;
@@ -6,6 +6,12 @@ export interface RepositoryDeclaration {
6
6
  content: string;
7
7
  created: boolean;
8
8
  }
9
+ export declare function findGitRoot(start: string): string | null;
10
+ /** Same containment rule as repository CI: equal, or a descendant of a non-root path. */
11
+ export declare function under({ path, root }: {
12
+ path: string;
13
+ root: string;
14
+ }): boolean;
9
15
  /**
10
16
  * Plan the index change for an app about to be scaffolded at `appRoot`.
11
17
  * Returns null when nothing needs declaring: no enclosing git repository, an
@@ -16,7 +16,7 @@ const indexSchema = z.looseObject({
16
16
  applications: z.array(z.looseObject({ path: z.string().min(1) })).nullish(),
17
17
  ignore: z.array(z.string().min(1)).nullish(),
18
18
  });
19
- function findGitRoot(start) {
19
+ export function findGitRoot(start) {
20
20
  for (let directory = resolve(start);; directory = dirname(directory)) {
21
21
  if (existsSync(join(directory, '.git')))
22
22
  return directory;
@@ -25,7 +25,7 @@ function findGitRoot(start) {
25
25
  }
26
26
  }
27
27
  /** Same containment rule as repository CI: equal, or a descendant of a non-root path. */
28
- function under({ path, root }) {
28
+ export function under({ path, root }) {
29
29
  return root === '.' || path === root || path.startsWith(`${root}/`);
30
30
  }
31
31
  const NEW_INDEX_HEADER = '# Repository CI checks every application listed here and deploys it when changes merge to main.\n';
@@ -1,16 +1,16 @@
1
1
  /** Help text reachable before command implementations, auth, optional SDKs, or Atlas clients load. */
2
2
  /** `--repo` on every init command; shared so the commands describe it identically. */
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";
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";
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";
5
5
  /** Artifact commands in sandbox token mode; shared by the offline and delegate usage. */
6
6
  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>]\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\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";
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>]\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
8
  export declare const PIPELINE_HELP = "usage:\n seq-studio pipeline list -e <env> [--limit 1..200] [--offset N] [--json]\n list pipeline repository rollups (not assets)\n seq-studio pipeline assets -e <env> [--repo <namespace>/<slug>] [--json]\n list asset declarations, including assets that may not be deployed\n seq-studio pipeline search <query> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--limit N] [--offset N] [--json]\n seq-studio pipeline describe <asset-id> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--json]\n seq-studio pipeline schema|sample <asset-id> -e <env> [--target <id>] [--limit N] [--json]\n seq-studio pipeline query <asset-id> --sql <read-only-sql> -e <env> [--target <id>] [--limit N] [--json]\n seq-studio pipeline init|validate|plan|deploy|status|migrate|adopt|unbind|run-now|promote|rollback ...\n seq-studio pipeline plan|deploy --repo <namespace>/<slug> --ref <sha|branch>\n [--root <directory>] [--source-env <first-party-env>] -e <env> [--target <id>]\n For an existing target release unit, source-env selects a separately\n authenticated canonical repository from banksouth, staging, or production.\n Source identity must be adopted and belong to the destination tenant.\n Registered OpCo source origins are not supported yet. The target verifies\n and snapshots source before planning; no target repository is created.\n Reviewed pipeline.config.yml source_paths can select runtime files and\n directories, retaining pipeline metadata, release identity and size limits.\n Not compatible with --dir, existing IDs, or coordinated migrations.\n Rollback uses retained snapshots; historical source commits can be re-planned\n explicitly with deploy --ref <sha> --source-env <env>.\n seq-studio pipeline plan --plan-request-id <id> -e <env> [--json]\n poll an existing durable plan without enqueueing or attaching credentials\n Lifecycle --json results use stdout; progress uses stderr. Deploy --run-now\n executes producers in the managed worker; local polling may disconnect.\n\n Discovery requires staff access. Use list for pipeline repositories, assets\n for declared assets, and search/describe for active deployment metadata;\n use schema to verify physical columns. -e chooses the environment and\n --target chooses a logical target when the environment has more than one.\n Help is available offline.\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 (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";
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. The init\n commands take --repo <ns>/<name> to create,\n clone, and scaffold in one step\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|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";
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>]] [--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.\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 (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";
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|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";
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";
12
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 prints the full description (describe omits the generated GraphQL SDL).\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
- export declare const ORM_EXECUTE_HELP = "usage:\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\n Run one persisted operation as you. The server applies the operation's\n required capability or role and the namespace's row policies.\n By name: execute <namespace> <operation> looks the operation up in the\n namespace's deployed version and runs it. No checkout is needed, so it runs\n what is deployed even when a local clone is behind. List what you can run:\n seq-studio orm describe <namespace> --operations\n From a checkout: execute <operation> [dir] runs the operation as hashed in the\n namespace directory's operations.manifest.json (default dir: .). If the\n deployed version hashes it differently, execute prints both hashes and the\n by-name command instead of a bare 404.\n The form is chosen by the second argument: an existing directory means a\n checkout; otherwise it is <namespace> <operation>.\n --variables-file takes a JSON object. --var <name>=<value> (repeatable, by\n name only) sets one variable and wins over the file: numbers and booleans\n parse by the declared type, lists, filter inputs and jsonb take JSON, and other\n types take the text as is. Use the file for null.\n Output is the JSON response: {\"data\": ...}.\n In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), -e is not needed.\n";
13
+ export declare const ORM_EXECUTE_HELP = "usage:\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\n Run one persisted operation as you. The server applies the operation's\n required capability or role and the namespace's row policies.\n By name: execute <namespace> <operation> looks the operation up in the\n namespace's deployed version and runs it. No checkout is needed, so it runs\n what is deployed even when a local clone is behind. List what you can run:\n seq-studio orm describe <namespace> --operations\n From a checkout: execute <operation> [dir] delegates to the installed ORM\n package using the directory's operations.manifest.json (default dir: .).\n Updated ORM packages validate the name and kind, then call the active named\n operation. Older packages may still select the manifest hash. Confirm the\n installed package and platform support name selection before upgrading.\n The form is chosen by the second argument: an existing directory means a\n checkout; otherwise it is <namespace> <operation>.\n --variables-file takes a JSON object. --var <name>=<value> (repeatable, by\n name only) sets one variable and wins over the file: numbers and booleans\n parse by the declared type, lists, filter inputs and jsonb take JSON, and other\n types take the text as is. Use the file for null.\n Output is the JSON response: {\"data\": ...}.\n In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), -e is not needed.\n";
14
14
  export declare function staticHelp({ namespace, sub }: {
15
15
  namespace: string;
16
16
  sub?: string;
@@ -6,6 +6,10 @@ export const INIT_INTO_REPO_HELP = ` Init into a repo: --repo <ns>/<name> on an
6
6
  it as that checkout's origin (a different existing origin is refused). It
7
7
  needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the
8
8
  command prints the git add, commit, and push to run.
9
+ In a git-service checkout (with or without --repo), orm init, functions init
10
+ and artifact init also declare the scaffold under resources in
11
+ .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside
12
+ a declared application is not declared; add it to that app with seq-studio add.
9
13
  `;
10
14
  export const ORM_HELP = `usage:
11
15
  seq-studio orm init <dir> [--repo <ns>/<name>]
@@ -169,9 +173,10 @@ export const REPOS_USAGE = `usage:
169
173
  seq-studio repos create <ns>/<name> -e <env> [--default-branch b] [--git-backend walgit]
170
174
  create a repo seeded with a README; --git-backend
171
175
  walgit creates it empty (for pushing existing
172
- history); needs namespace write. The init
173
- commands take --repo <ns>/<name> to create,
174
- clone, and scaffold in one step
176
+ history); needs namespace write. Returns once
177
+ the repo resolves by name, so clone can follow
178
+ at once. The init commands take --repo
179
+ <ns>/<name> to create, clone, and scaffold
175
180
  seq-studio repos clone <ns>/<name> -e <env> [--ref r] [--output dir] [--force] [--full] [--transport auto|git|json]
176
181
  seq-studio repos clone --url <https://…/repos/<id>/git> -e <env> [--ref r] [--output dir] [--full]
177
182
  seq-studio repos clone --id <uuid> -e <env> [--ref r] [--output dir] [--full]
@@ -210,7 +215,8 @@ export const PROCESS_RUNS_USAGE = `usage:
210
215
  seq-studio process runs retry <run-id> -e <env> [--run-id <new-id>] [--json]
211
216
  seq-studio process runs list -e <env> [--process <id>] [--status <status>]
212
217
  [--entity-type <type>] [--entity-id <id>] [--archived] [--limit 1..500] [--json]
213
- seq-studio process runs show <run-id> -e <env> [--wait [--timeout <seconds>]] [--json]
218
+ seq-studio process runs show <run-id> -e <env> [--wait [--timeout <seconds>]]
219
+ [--steps [--node <node-id>] [--full]] [--json]
214
220
  seq-studio process runs cancel <run-id> -e <env> [--json]
215
221
 
216
222
  Runs start and are read as you: start and retry need invoker on the process,
@@ -232,7 +238,14 @@ export const PROCESS_RUNS_USAGE = `usage:
232
238
  API has no cursor, so narrow with filters to reach older runs.
233
239
  --status: pending, running, completed, failed, cancelled, timed_out.
234
240
  show --wait polls until the run finishes (default timeout 600s); the run keeps
235
- going if the wait times out.
241
+ going if the wait times out. show prints the run's error when it failed.
242
+ show --steps (CLI 0.9.1+) prints each step's status, edge, error, input and
243
+ output, with the same viewer permission as show. Inputs, outputs and errors
244
+ over 2000 characters are cut to a preview; --full prints them whole.
245
+ --node narrows to one node. With --json, --steps returns { run, steps } with
246
+ the same bounds; each step's truncated map names its cut fields and their full
247
+ length. A failure in a node's input mapper happens before its step
248
+ starts, so it shows only as the run's error.
236
249
  `;
237
250
  export const ORM_DISCOVER_HELP = `usage:
238
251
  seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]
@@ -267,10 +280,11 @@ export const ORM_EXECUTE_HELP = `usage:
267
280
  namespace's deployed version and runs it. No checkout is needed, so it runs
268
281
  what is deployed even when a local clone is behind. List what you can run:
269
282
  seq-studio orm describe <namespace> --operations
270
- From a checkout: execute <operation> [dir] runs the operation as hashed in the
271
- namespace directory's operations.manifest.json (default dir: .). If the
272
- deployed version hashes it differently, execute prints both hashes and the
273
- by-name command instead of a bare 404.
283
+ From a checkout: execute <operation> [dir] delegates to the installed ORM
284
+ package using the directory's operations.manifest.json (default dir: .).
285
+ Updated ORM packages validate the name and kind, then call the active named
286
+ operation. Older packages may still select the manifest hash. Confirm the
287
+ installed package and platform support name selection before upgrading.
274
288
  The form is chosen by the second argument: an existing directory means a
275
289
  checkout; otherwise it is <namespace> <operation>.
276
290
  --variables-file takes a JSON object. --var <name>=<value> (repeatable, by
@@ -378,28 +378,6 @@ dist/
378
378
  .env.*
379
379
  *.log
380
380
  `;
381
- // Local-only: makes `pnpm install` resolve against Chainguard so the lockfile
382
- // matches what the deploy worker installs from (the fast, version-pinned
383
- // path). Auth comes from your ~/.npmrc (scripts/chainguard-bootstrap). This
384
- // file is NEVER bundled — collectBundleFiles excludes it and the server
385
- // rejects it; the deploy worker pins the registry itself. Authors without
386
- // Chainguard credentials can delete it and install from public npm — see the
387
- // comment written into the scaffolded file.
388
- const TEMPLATE_NPMRC = `# Pins installs to Chainguard, Sequence's internal package registry, so your
389
- # lockfile matches what the deploy worker installs (fast, version-pinned
390
- # deploys). Requires Chainguard credentials in ~/.npmrc (Sequence engineers:
391
- # scripts/chainguard-bootstrap).
392
- #
393
- # No Chainguard credentials? \`pnpm install\` will fail with a 401 — DELETE THIS
394
- # FILE and install from public npm instead. That is safe: the deploy worker
395
- # always re-resolves dependencies against Chainguard server-side, and this
396
- # file is never included in the deployed bundle either way.
397
- registry=https://libraries.cgr.dev/javascript/
398
- # Sequence's own packages publish to public npm, as on the deploy worker.
399
- @sequenceholdings:registry=https://registry.npmjs.org/
400
- //libraries.cgr.dev/javascript/:always-auth=true
401
- //libraries.cgr.dev/javascript-upstream/:always-auth=true
402
- `;
403
381
  export async function functionsInitCommand(args) {
404
382
  const target = args.positional[0];
405
383
  if (!target) {
@@ -431,7 +409,6 @@ export async function functionsInitCommand(args) {
431
409
  await writeFile(join(dir, 'tsconfig.json'), TEMPLATE_TSCONFIG);
432
410
  await writeFile(join(dir, 'package.json'), TEMPLATE_PACKAGE_JSON(id));
433
411
  await writeFile(join(dir, '.gitignore'), TEMPLATE_GITIGNORE);
434
- await writeFile(join(dir, '.npmrc'), TEMPLATE_NPMRC);
435
412
  await writeScaffoldGuidance({ directory: dir });
436
413
  console.log(`${LOG} scaffolded managed function "${id}" (TypeScript) in ${dir}`);
437
414
  console.log(`${LOG} AGENTS.md points to your environment's live docs; CLAUDE.md imports it`);
@@ -0,0 +1,7 @@
1
+ /** True when the arguments ask for JSON (or JSON Lines) on stdout. */
2
+ export declare function requestsMachineOutput(argv: readonly string[]): boolean;
3
+ /**
4
+ * Route non-JSON console.log / console.info output to stderr until the
5
+ * returned restore function runs.
6
+ */
7
+ export declare function guardMachineOutput(): () => void;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Keep stdout parseable when a command prints machine output.
3
+ *
4
+ * `seq-studio … --json | jq` reads all of stdout, so a single `[seq-studio] …`
5
+ * status or progress line on it breaks the pipe. Status lines come from many
6
+ * places (shared source resolution, delegated ORM and Artifact Studio CLIs,
7
+ * per-command progress), so instead of trusting every call site, the CLI
8
+ * routes them centrally: while `--json` or `--jsonl` is set, console.log and
9
+ * console.info pass a value through to stdout only when it is JSON text, and
10
+ * send everything else to stderr. Humans still see every line in a terminal.
11
+ */
12
+ import { format } from 'node:util';
13
+ const MACHINE_OUTPUT_FLAGS = new Set(['--json', '--jsonl']);
14
+ /** True when the arguments ask for JSON (or JSON Lines) on stdout. */
15
+ export function requestsMachineOutput(argv) {
16
+ for (const arg of argv) {
17
+ if (arg === '--')
18
+ return false;
19
+ if (MACHINE_OUTPUT_FLAGS.has(arg))
20
+ return true;
21
+ const eq = arg.indexOf('=');
22
+ if (eq > 0 && MACHINE_OUTPUT_FLAGS.has(arg.slice(0, eq)) && arg.slice(eq + 1) !== 'false')
23
+ return true;
24
+ }
25
+ return false;
26
+ }
27
+ function isJsonText(text) {
28
+ if (text.trim() === '')
29
+ return false;
30
+ try {
31
+ JSON.parse(text);
32
+ return true;
33
+ }
34
+ catch {
35
+ return false;
36
+ }
37
+ }
38
+ /**
39
+ * Route non-JSON console.log / console.info output to stderr until the
40
+ * returned restore function runs.
41
+ */
42
+ export function guardMachineOutput() {
43
+ const { log, info } = console;
44
+ const route = (write) => (...args) => {
45
+ if (isJsonText(format(...args)))
46
+ write(...args);
47
+ else
48
+ console.error(...args);
49
+ };
50
+ console.log = route(log);
51
+ console.info = route(info);
52
+ return () => {
53
+ console.log = log;
54
+ console.info = info;
55
+ };
56
+ }
package/dist/main.js CHANGED
@@ -28,6 +28,7 @@ import { parseArgs } from './argv.js';
28
28
  import { renderCapabilities } from './command-contract.js';
29
29
  import { staticHelp } from './command-help.js';
30
30
  import { ignoredSandboxEnvNotice } from './env-flags.js';
31
+ import { guardMachineOutput, requestsMachineOutput } from './machine-output.js';
31
32
  import { sandboxUsageFooter } from './sandbox-auth.js';
32
33
  // Lazy-load artifact delegate: published @sequenceholdings/artifact-studio/cli
33
34
  // still auto-runs runCli() at module load; importing it here breaks doctor/process.
@@ -64,7 +65,8 @@ const TOP_LEVEL_USAGE = `usage:
64
65
  --repo <ns>/<name> to scaffold straight into a git-service repo; commit and push from there.
65
66
  In an agent sandbox, SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE select the
66
67
  deployment and token instead (no login; -e optional).
67
- Where supported, --json writes structured stdout; check exit status and pagination.
68
+ Where supported, --json writes only JSON to stdout (status lines go to stderr);
69
+ check exit status and pagination.
68
70
  Built-in env: local. Add your organization's deployment with
69
71
  \`seq-studio envs add <name> <url>\`; custom entries live in ~/.config/lattice/config.toml.
70
72
  If this CLI cannot complete a documented step, read that environment's docs
@@ -111,6 +113,17 @@ const SUBCOMMANDS = {
111
113
  envs: new Set(['add', 'list']),
112
114
  };
113
115
  export async function run(argv = process.argv.slice(2)) {
116
+ if (!requestsMachineOutput(argv))
117
+ return dispatch(argv);
118
+ const restore = guardMachineOutput();
119
+ try {
120
+ return await dispatch(argv);
121
+ }
122
+ finally {
123
+ restore();
124
+ }
125
+ }
126
+ async function dispatch(argv) {
114
127
  const [namespace, sub, ...rest] = argv;
115
128
  if (!namespace || namespace === 'help' || namespace === '--help' || namespace === '-h') {
116
129
  console.log(`${TOP_LEVEL_USAGE}${sandboxUsageFooter()}`);
@@ -163,10 +176,14 @@ export async function run(argv = process.argv.slice(2)) {
163
176
  return runProcessNamespace(sub, rest);
164
177
  case 'artifact': {
165
178
  const { runArtifactCommand } = await import('./artifact/delegate.js');
179
+ if (sub === 'init')
180
+ return (await import('./repos/primitive-declaration.js')).runStandaloneInit({ kind: 'artifact', argv: rest, defaultDir: '.', run: () => runArtifactCommand(sub, rest) });
166
181
  return runArtifactCommand(sub, rest);
167
182
  }
168
183
  case 'functions': {
169
184
  const { runFunctionsCommand } = await import('./functions/commands.js');
185
+ if (sub === 'init')
186
+ return (await import('./repos/primitive-declaration.js')).runStandaloneInit({ kind: 'function', argv: rest, run: () => runFunctionsCommand(sub, parseArgs(rest)) });
170
187
  return runFunctionsCommand(sub, parseArgs(rest));
171
188
  }
172
189
  case 'storage': {
@@ -209,6 +226,8 @@ export async function run(argv = process.argv.slice(2)) {
209
226
  }
210
227
  case 'orm': {
211
228
  const { runOrmCommand } = await import('./orm/delegate.js');
229
+ if (sub === 'init')
230
+ return (await import('./repos/primitive-declaration.js')).runStandaloneInit({ kind: 'orm', argv: rest, run: () => runOrmCommand(sub, rest) });
212
231
  return runOrmCommand(sub, rest);
213
232
  }
214
233
  case 'pipeline': {
@@ -43,7 +43,7 @@ const ORM_USAGE = `usage:
43
43
  seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...
44
44
  run the deployed version's persisted operation by name as the caller (no checkout)
45
45
  seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>
46
- run a persisted operation as hashed in this checkout's operations.manifest.json
46
+ execute from the checkout manifest through the installed ORM package
47
47
  seq-studio orm read <namespace> <table> -e <env> [--where c=op.v]... [--select c,...] [--order c.desc] [--limit N] [--offset N] [--json|--jsonl]
48
48
  read rows of a deployed v2 namespace as the caller (row-level security applies)
49
49
  seq-studio orm sql <namespace> --query <sql> | --file <path> -e <env> [--param name[:type]=v]... | [--params <json-object>] [--json|--jsonl]
@@ -171,7 +171,7 @@ function failureMessage({ namespace, operation, status, envelope }) {
171
171
  }
172
172
  }
173
173
  if (status === 404 && failure.details.cause === 'unknown_operation') {
174
- lines.push('The deployed operation changed between lookup and execution (the namespace was just redeployed). Retry.');
174
+ lines.push('The operation is unavailable after lookup. Retry; if it persists, update Atlas to support guarded operation names.');
175
175
  }
176
176
  else {
177
177
  const next = failureNextStep({ failure, namespace });
@@ -196,7 +196,7 @@ export async function ormExecuteDeployedCommand(args) {
196
196
  const response = await postJsonResponse({
197
197
  ...options,
198
198
  path: `/api/data/v2/${namespace}`,
199
- body: { op: operation.op_hash, variables },
199
+ body: { op: `${operation.kind}:${operationName}`, expectedKind: operation.kind, variables },
200
200
  });
201
201
  const envelope = parseEnvelope(response.body);
202
202
  const ok = response.status >= 200 && response.status < 300 && envelope !== null;
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * Both run the namespace's built-in read-only SQL operation through the
6
6
  * published ORM client (`createOperationExecutorWithTransport(...).sql()`),
7
- * which owns the `{ op, variables }` wire format. Requests go through the CLI's
7
+ * which owns the `{ op, variables, expectedKind? }` wire format. Requests go through the CLI's
8
8
  * Atlas client so environment resolution, sandbox tokens, and edge headers
9
9
  * behave like every other command. The server compiles the SQL in its closed
10
10
  * read-only grammar and enforces grants, row-level security, and its row,