@sequenceholdings/studio-cli 0.9.4 → 0.9.6
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 +68 -10
- package/dist/access/custom-role-hosts.js +0 -6
- package/dist/agents/source.js +4 -4
- package/dist/app/agent-refs.js +1 -1
- package/dist/app/manifest.d.ts +1 -1
- package/dist/app/manifest.js +1 -1
- package/dist/artifact/delegate.js +6 -1
- package/dist/command-contract.d.ts +1 -1
- package/dist/command-contract.js +1 -1
- package/dist/command-help.d.ts +3 -4
- package/dist/command-help.js +4 -35
- package/dist/functions/manifest.d.ts +4 -0
- package/dist/main.js +2 -2
- package/dist/orm/discover-operations.d.ts +19 -0
- package/dist/orm/discover-operations.js +60 -0
- package/dist/orm/discover-schema.d.ts +5 -0
- package/dist/orm/discover-schema.js +5 -1
- package/dist/orm/discover.js +12 -38
- package/dist/pipeline/clone-deploy.js +2 -2
- package/dist/pipeline/commands.d.ts +1 -0
- package/dist/pipeline/commands.js +15 -11
- package/dist/pipeline/help.d.ts +2 -0
- package/dist/pipeline/help.js +45 -0
- package/dist/pipeline/lifecycle.js +5 -6
- package/dist/pipeline/retirement.js +8 -3
- package/dist/pipeline/stage-secrets.d.ts +2 -2
- package/dist/pipeline/stage-secrets.js +1 -1
- package/dist/process/agent-loader.d.ts +1 -2
- package/dist/process/agent-loader.js +1 -2
- package/dist/process/build.js +3 -3
- package/dist/process/commands.js +2 -3
- package/dist/process/discover.js +1 -1
- package/dist/process/lint.js +5 -7
- package/dist/process/plan-diff.js +1 -1
- package/dist/process/safety-baseline.d.ts +1 -1
- package/dist/process/safety-baseline.js +5 -5
- package/dist/repos/commands.d.ts +1 -0
- package/dist/secrets/commands.js +2 -19
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1008,7 +1008,10 @@ seq-studio orm operation show lending ListLoans -e <env> --json # active docume
|
|
|
1008
1008
|
and `sql` accept.
|
|
1009
1009
|
- Each persisted operation lists the variables it declares as `name: type`, with
|
|
1010
1010
|
`!` when required and `= value` for a default. `--operations` prints only the
|
|
1011
|
-
operations.
|
|
1011
|
+
operations. `describe --json` includes `operation_set_id`, `schema_version_id`,
|
|
1012
|
+
and `ops_hash` when Atlas provides them, alongside the schema `version_id`.
|
|
1013
|
+
If the active set changes during pagination or the schema version differs,
|
|
1014
|
+
retry `orm describe` to get a consistent result.
|
|
1012
1015
|
- `operation show` reads one active operation through the namespace reader gate.
|
|
1013
1016
|
Without `--json` it prints the registered GraphQL document. `--json` includes
|
|
1014
1017
|
the document, hash, variables, and requirements for contract review. Missing
|
|
@@ -1519,7 +1522,7 @@ platform policy and defaults, not that function's selected cache configuration.
|
|
|
1519
1522
|
Changing defaults or deployment caps does not rewrite existing functions' stored
|
|
1520
1523
|
runtime settings; inspect those with `--fn` and redeploy to apply manifest changes.
|
|
1521
1524
|
|
|
1522
|
-
Each environment supports at most **
|
|
1525
|
+
Each environment supports at most **125 non-archived managed functions** across
|
|
1523
1526
|
all organizations. Registered functions count even before their first deploy;
|
|
1524
1527
|
versions do not consume additional slots. At capacity, creating a new function
|
|
1525
1528
|
fails. Delete an unused function to free a slot. Existing functions can still
|
|
@@ -1747,10 +1750,11 @@ Existing single-value secrets keep their type. To consolidate them, create a new
|
|
|
1747
1750
|
`--org` targets a managed-scope org other than the login tenant and selects
|
|
1748
1751
|
the intended same-named secret for `set`, `attach`, `detach`, `versions`,
|
|
1749
1752
|
`set-default`, and `pin`; it is required when the name exists in multiple
|
|
1750
|
-
orgs.
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1753
|
+
orgs. Atlas validates it against the selected deployment's registry owner. A
|
|
1754
|
+
local Atlas instance may use a tenant owner even when addressed with `-e local`;
|
|
1755
|
+
use that tenant's slug. Tenant pipeline credentials must be created on that
|
|
1756
|
+
tenant's deployment: `seq-studio secrets create NAME -e <tenant> --org <tenant>`.
|
|
1757
|
+
Creating a secret requires Can create on Secrets or Managed Functions in that org.
|
|
1754
1758
|
|
|
1755
1759
|
## Artifact commands
|
|
1756
1760
|
|
|
@@ -1770,7 +1774,7 @@ successfully. Help does not initialize files, authenticate, or deploy.
|
|
|
1770
1774
|
| `seq-studio artifact plan [dir] -e <env>` | `plan [dir] --env <env>` |
|
|
1771
1775
|
| `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) |
|
|
1772
1776
|
| `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 |
|
|
1773
|
-
| `seq-studio artifact dev [dir] -e <env> [--link <pkgDir>[,<pkgDir>]] [--port <port>]` | React/HTML: rebuild preview on changes. Next.js: local development server and owner-only Atlas tunnel; `--port` selects its loopback port. |
|
|
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). |
|
|
1774
1778
|
| `seq-studio artifact pull <project-id> -e <env> [--out <dir>]` | `pull <project-id> --env <env> [--out <dir>]` |
|
|
1775
1779
|
| `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 |
|
|
1776
1780
|
| `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 |
|
|
@@ -1872,13 +1876,20 @@ seq-studio artifact link --env <environment>
|
|
|
1872
1876
|
seq-studio artifact dev --env <environment>
|
|
1873
1877
|
```
|
|
1874
1878
|
|
|
1875
|
-
The CLI starts Next.js
|
|
1879
|
+
The CLI starts the Next.js development server on loopback and connects an authenticated outbound tunnel
|
|
1876
1880
|
to Atlas. It prints the owner-only preview URL and opens it in an interactive
|
|
1877
1881
|
terminal. Source stays on your computer. Fast Refresh handles compatible UI
|
|
1878
1882
|
edits; Next.js also reloads server code and reports compiler errors. Ctrl+C
|
|
1879
1883
|
stops the child process and revokes the session. A disconnected laptop has no
|
|
1880
1884
|
live preview; use a hosted preview when someone else needs to review the app.
|
|
1881
1885
|
|
|
1886
|
+
`artifact dev` uses Turbopack, the Next.js 16 default, unless the Next config has a
|
|
1887
|
+
custom `webpack` function and no `turbopack` config. Turbopack transfers far less
|
|
1888
|
+
over the tunnel and reloads from the browser cache, but on Next 16.3.4 and 16.4.0 it
|
|
1889
|
+
can miss Fast Refresh for a client component on a route first opened by client-side
|
|
1890
|
+
navigation (reload the page to pick the change up). Use Webpack with
|
|
1891
|
+
`--bundler webpack` or `ARTIFACT_NEXT_DEV_BUNDLER=webpack`.
|
|
1892
|
+
|
|
1882
1893
|
Development recovery behavior:
|
|
1883
1894
|
|
|
1884
1895
|
- Manifest/capability changes stop the session with a restart instruction so
|
|
@@ -2426,7 +2437,15 @@ repo (`pipelines/<domain>`), an app monorepo (`apps/<app>`), or a repo in your
|
|
|
2426
2437
|
own namespace (`<namespace>/<repo>`).
|
|
2427
2438
|
Validation logic lives in
|
|
2428
2439
|
`@sequenceholdings/pipeline-spec` (an optional peer, like `@sequenceholdings/orm`);
|
|
2429
|
-
install it alongside the CLI
|
|
2440
|
+
install it alongside the CLI in the pipeline tooling/app directory for local spec
|
|
2441
|
+
authoring and validation:
|
|
2442
|
+
|
|
2443
|
+
```bash
|
|
2444
|
+
pnpm add --save-dev @sequenceholdings/studio-cli @sequenceholdings/pipeline-spec
|
|
2445
|
+
pnpm exec seq-studio pipeline validate .
|
|
2446
|
+
```
|
|
2447
|
+
|
|
2448
|
+
Run these commands from that directory so pnpm resolves both local packages. The
|
|
2430
2449
|
discovery and data-reading commands below do not require the optional SDK.
|
|
2431
2450
|
|
|
2432
2451
|
Pipeline packages discover `*.stage.yml` and `*.stage.yaml` files from their
|
|
@@ -2528,7 +2547,7 @@ explicit source-qualified planning workflow instead.
|
|
|
2528
2547
|
| `seq-studio pipeline status --deployment-id <id> -e <env> [--json]` | Fetch the current remote deployment status without changing it. Use this public command to continue monitoring after local polling stops |
|
|
2529
2548
|
| `seq-studio pipeline adopt --stage <slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] --native-id <id> --approved-by <you> [--resource-key <key>] [--kind job\|dlt_pipeline] [--old-source-removal-pr <url>] [--repo <namespace>/<slug>]` | Bind a live Databricks job/pipeline into the stage without recreation (`bundle deployment bind` on Trigger). Always requires `--approved-by` naming the caller. When the key is still in the monorepo DAB, pass `--old-source-removal-pr` and follow the returned cutover checklist: unbind the old bundle state without deleting the remote, then remove its DAB declaration and add the target-specific adopted-resource entry in the same PR before redeploying. |
|
|
2530
2549
|
| `seq-studio pipeline unbind --stage <slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] --approved-by <you> [--resource-key <key>] [--repo <namespace>/<slug>]` | Release an adopted binding on Trigger; the remote object stays live (never deleted) |
|
|
2531
|
-
| `seq-studio pipeline retire --repo <release-unit> -e <env> [--target <id>] [--json]` | Preview the
|
|
2550
|
+
| `seq-studio pipeline retire --repo <release-unit> -e <env> [--stages <slugs>] [--target <id>] [--json]` | Preview the whole pipeline, or comma-separated selected stages omitted from its latest published source collection. Approve the same scope with `--plan-hash <hash> --yes`. Inspect with `--retirement-id <id>`; explicitly resume a stopped failure with `--retirement-id <id> --resume --yes` (no replacement stages). Requires a human pipeline administrator and the existing staff destructive-operation gate. Deletes supported execution resources, releases bindings, and archives stages; retains data objects, source repositories, permissions and historical records. Live synced-table configurations remain blocked. Scoped completion releases the live pipeline while keeping retired stages fenced. `pipeline retire --help` is available offline; `capabilities --json` lists the command. |
|
|
2532
2551
|
| `seq-studio pipeline run-now --stage <slug> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--json]` | Run the stage's active job or DLT pipeline immediately and print its Databricks run URL |
|
|
2533
2552
|
| `seq-studio pipeline promote --stage <slug> --version <v> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--approved-by <you>] [--wait-timeout <duration>] [--no-wait] [--json]` | Promote a validated version to another target. Targets that require approval need `--approved-by`; `--repo` disambiguates a slug that exists in multiple Pipelines |
|
|
2534
2553
|
| `seq-studio pipeline rollback --stage <slug> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--approved-by <you>] [--wait-timeout <duration>] [--no-wait] [--json]` | Redeploy the previously retired deployment's version. Targets that require approval need `--approved-by`. |
|
|
@@ -3026,6 +3045,45 @@ the normal local Atlas authorization and lifecycle, with a dedicated development
|
|
|
3026
3045
|
GCS bucket. The standalone `functions dev` harness does not mint storage delegation.
|
|
3027
3046
|
|
|
3028
3047
|
|
|
3048
|
+
### Local Next.js server secrets
|
|
3049
|
+
|
|
3050
|
+
With local Atlas running on a personal `dev-*` Lakebase branch, create a managed
|
|
3051
|
+
secret and set its value through the local Secrets store:
|
|
3052
|
+
|
|
3053
|
+
```sh
|
|
3054
|
+
seq-studio secrets create PROVIDER_KEY -e local
|
|
3055
|
+
seq-studio secrets set PROVIDER_KEY --from-file /private/path/provider-key -e local
|
|
3056
|
+
seq-studio artifact dev ./web -e local
|
|
3057
|
+
```
|
|
3058
|
+
|
|
3059
|
+
Only declared `server.secrets` entries are injected into the Next server child.
|
|
3060
|
+
A `secret_name` declaration defaults to that registry name; a `secret_id`
|
|
3061
|
+
declaration defaults locally to the declared environment name. Local development
|
|
3062
|
+
uses the local default value, independently of the hosted ID/version pin.
|
|
3063
|
+
The registry owner follows local Atlas's existing deployment identity, including
|
|
3064
|
+
`ATLAS_TENANT_ID` when configured. Create the secret in that owner's registry
|
|
3065
|
+
with `secrets create PROVIDER_KEY --org <tenant> -e local`, and use the same
|
|
3066
|
+
`--org <tenant>` when setting its value. Atlas validates the requested owner.
|
|
3067
|
+
|
|
3068
|
+
To use a different local name, pass `--local-secrets ./local-secret-bindings.json`:
|
|
3069
|
+
|
|
3070
|
+
```json
|
|
3071
|
+
{ "APP_PROVIDER_KEY": "MY_DEV_PROVIDER_KEY" }
|
|
3072
|
+
```
|
|
3073
|
+
|
|
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.
|
|
3081
|
+
|
|
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.
|
|
3085
|
+
|
|
3086
|
+
|
|
3029
3087
|
## Composed applications (0.4.0)
|
|
3030
3088
|
|
|
3031
3089
|
The public builder path combines standalone Artifacts, ORM namespaces, and Managed
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
import { deleteJson, getJson, postJson } from '../atlas-client.js';
|
|
3
3
|
import { unsupportedPrincipal } from './host-contract.js';
|
|
4
4
|
import { serviceAccountSubject } from './principal.js';
|
|
5
|
-
// ---------------------------------------------------------------------------
|
|
6
|
-
// Custom Roles hosts: artifact, function, orm
|
|
7
|
-
// ---------------------------------------------------------------------------
|
|
8
5
|
const CUSTOM_ROLE_FLOOR = { artifact: 'end_user', function: 'invoker', orm: 'end_user' };
|
|
9
6
|
function customRolePrincipal(principal) {
|
|
10
7
|
return principal.kind === 'service-account'
|
|
@@ -45,9 +42,6 @@ function customRoleMutation({ host, call, method, base }) {
|
|
|
45
42
|
? postJson({ ...call.request, path, body })
|
|
46
43
|
: deleteJson({ ...call.request, path, body });
|
|
47
44
|
}
|
|
48
|
-
// ---------------------------------------------------------------------------
|
|
49
|
-
// Application roles
|
|
50
|
-
// ---------------------------------------------------------------------------
|
|
51
45
|
function applicationKind(flags) {
|
|
52
46
|
const kind = flags.kind ?? 'runtime';
|
|
53
47
|
if (kind !== 'runtime' && kind !== 'collaborator')
|
package/dist/agents/source.js
CHANGED
|
@@ -46,10 +46,10 @@ async function readManifest(directory) {
|
|
|
46
46
|
* agent.ts would silently deploy under a different identity and defeat tenant
|
|
47
47
|
* overrides.
|
|
48
48
|
*
|
|
49
|
-
* Every selected path is parsed in one pass
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
49
|
+
* Every selected path is parsed in one pass: compiling one file at a time
|
|
50
|
+
* re-parses each agent separately and dominates validate latency on a large
|
|
51
|
+
* fleet — paid again on plan, and twice more on apply, since apply plans
|
|
52
|
+
* before it writes.
|
|
53
53
|
*/
|
|
54
54
|
async function compileManifestEntries({ directory, entries, allowDuplicateIds = false, }) {
|
|
55
55
|
if (entries.length === 0) {
|
package/dist/app/agent-refs.js
CHANGED
|
@@ -34,7 +34,7 @@ export async function agentSelections({ manifest, rootDir, env, }) {
|
|
|
34
34
|
selections.set(entry.id, bundle.definitions.map((definition) => ({ id: definition.id, name: definition.name })));
|
|
35
35
|
}
|
|
36
36
|
catch {
|
|
37
|
-
// Nothing selected: the graph shows the agent without resolving it
|
|
37
|
+
// Nothing selected: the graph shows the agent without resolving it.
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
return selections;
|
package/dist/app/manifest.d.ts
CHANGED
|
@@ -269,7 +269,7 @@ export declare function writeAppManifest({ rootDir, manifest, }: {
|
|
|
269
269
|
rootDir: string;
|
|
270
270
|
manifest: AppManifest;
|
|
271
271
|
}): Promise<string>;
|
|
272
|
-
/** Default deploy order:
|
|
272
|
+
/** Default deploy order: `PRIMITIVE_KINDS` ranking (storage before the code that uses it). */
|
|
273
273
|
export declare function defaultDeployOrder(primitives: readonly PrimitiveEntry[]): string[];
|
|
274
274
|
/**
|
|
275
275
|
* Extend deploy.order when adding a primitive. Preserves any explicit custom
|
package/dist/app/manifest.js
CHANGED
|
@@ -296,7 +296,7 @@ export async function writeAppManifest({ rootDir, manifest, }) {
|
|
|
296
296
|
await writeFile(path, `# Sequence app bundle — review deployment dependencies and package sources in git.\n${body}`, 'utf8');
|
|
297
297
|
return path;
|
|
298
298
|
}
|
|
299
|
-
/** Default deploy order:
|
|
299
|
+
/** Default deploy order: `PRIMITIVE_KINDS` ranking (storage before the code that uses it). */
|
|
300
300
|
export function defaultDeployOrder(primitives) {
|
|
301
301
|
return defaultDeployOrderForValidation(primitives);
|
|
302
302
|
}
|
|
@@ -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>]
|
|
31
|
+
seq-studio artifact dev [dir] -e <env> [--once] [--key default] [--link <pkgDir>[,<pkgDir>]] [--port <port>] [--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,6 +66,11 @@ 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.
|
|
72
|
+
dev uses Turbopack unless the Next config has a custom webpack function and no turbopack config; opt out
|
|
73
|
+
with --bundler webpack or ARTIFACT_NEXT_DEV_BUNDLER=webpack.
|
|
69
74
|
Deploy validates the selected targets.<environment>.url and declared storage
|
|
70
75
|
capability workspace IDs against -e. It does not scan source text or arbitrary
|
|
71
76
|
config values for URLs or UUIDs. Repository identity checks still apply.
|
|
@@ -70,7 +70,7 @@ export declare const COMMAND_CONTRACT: readonly [{
|
|
|
70
70
|
readonly description: "Discover and operate Data Pipelines";
|
|
71
71
|
readonly lifecycle: "preview";
|
|
72
72
|
readonly access: "staff";
|
|
73
|
-
readonly subcommands: readonly ["list", "assets", "search", "describe", "schema", "sample", "query", "init", "validate", "plan", "deploy", "status", "migrate", "adopt", "unbind", "run-now", "promote", "rollback"];
|
|
73
|
+
readonly subcommands: readonly ["list", "assets", "search", "describe", "schema", "sample", "query", "init", "validate", "plan", "deploy", "status", "migrate", "adopt", "unbind", "retire", "run-now", "promote", "rollback"];
|
|
74
74
|
}, {
|
|
75
75
|
readonly name: "feedback";
|
|
76
76
|
readonly description: "Submit agent feedback";
|
package/dist/command-contract.js
CHANGED
|
@@ -11,7 +11,7 @@ export const COMMAND_CONTRACT = [
|
|
|
11
11
|
{ name: 'secrets', description: 'Manage organization-owned secrets', lifecycle: 'stable', access: 'authenticated', subcommands: ['create', 'set', 'list', 'attach', 'detach', 'apply'] },
|
|
12
12
|
{ name: 'repos', description: 'Manage repositories and native CI; ci init is offline', lifecycle: 'stable', access: 'mixed', subcommands: ['list', 'namespaces', 'show', 'identity', 'create', 'clone', 'pull', 'pulls', 'delete', 'ci'] },
|
|
13
13
|
{ name: 'templates', description: 'Publish, synchronize, and list repository templates', lifecycle: 'internal', access: 'mixed', subcommands: ['publish', 'sync', 'list'] },
|
|
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', 'run-now', 'promote', 'rollback'] },
|
|
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
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'] },
|
package/dist/command-help.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
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
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 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 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";
|
|
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";
|
|
9
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";
|
|
10
9
|
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";
|
|
11
10
|
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
|
-
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
|
|
11
|
+
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
|
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; - or /dev/stdin reads UTF-8 stdin until EOF\n (the checkout form requires an ORM package with stdin support).\n --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
13
|
export declare function staticHelp({ namespace, sub }: {
|
|
15
14
|
namespace: string;
|
package/dist/command-help.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/** Help text reachable before command implementations, auth, optional SDKs, or Atlas clients load. */
|
|
2
|
+
import { PIPELINE_HELP } from './pipeline/help.js';
|
|
3
|
+
export { PIPELINE_HELP } from './pipeline/help.js';
|
|
2
4
|
/** `--repo` on every init command; shared so the commands describe it identically. */
|
|
3
5
|
export const INIT_INTO_REPO_HELP = ` Init into a repo: --repo <ns>/<name> on an init command creates that platform
|
|
4
6
|
git-service repo if missing (same name rules as repos create), then clones it
|
|
@@ -62,7 +64,7 @@ export const ARTIFACT_HELP = `usage:
|
|
|
62
64
|
seq-studio artifact show <slug-or-id> -e <env> [--json]
|
|
63
65
|
seq-studio artifact validate [dir]
|
|
64
66
|
seq-studio artifact build|plan|deploy [dir | --repo <namespace>/<name> | --git-url <url>] [--ref <ref>] -e <env>
|
|
65
|
-
seq-studio artifact dev [dir] -e <env> [--once] [--key <name>] [--link <package-dir>] [--port <port>]
|
|
67
|
+
seq-studio artifact dev [dir] -e <env> [--once] [--key <name>] [--link <package-dir>] [--port <port>] [--local-secrets <bindings.json>] [--bundler turbopack|webpack]
|
|
66
68
|
seq-studio artifact pull <project-id> -e <env> --out <dir>
|
|
67
69
|
seq-studio artifact promote|rollback <deployment-id> -e <env>
|
|
68
70
|
|
|
@@ -74,39 +76,6 @@ export const ARTIFACT_HELP = `usage:
|
|
|
74
76
|
|
|
75
77
|
${INIT_INTO_REPO_HELP}
|
|
76
78
|
${ARTIFACT_SANDBOX_HELP}`;
|
|
77
|
-
export const PIPELINE_HELP = `usage:
|
|
78
|
-
seq-studio pipeline list -e <env> [--limit 1..200] [--offset N] [--json]
|
|
79
|
-
list pipeline repository rollups (not assets)
|
|
80
|
-
seq-studio pipeline assets -e <env> [--repo <namespace>/<slug>] [--json]
|
|
81
|
-
list asset declarations, including assets that may not be deployed
|
|
82
|
-
seq-studio pipeline search <query> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--limit N] [--offset N] [--json]
|
|
83
|
-
seq-studio pipeline describe <asset-id> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--json]
|
|
84
|
-
seq-studio pipeline schema|sample <asset-id> -e <env> [--target <id>] [--limit N] [--json]
|
|
85
|
-
seq-studio pipeline query <asset-id> --sql <read-only-sql> -e <env> [--target <id>] [--limit N] [--json]
|
|
86
|
-
seq-studio pipeline init|validate|plan|deploy|status|migrate|adopt|unbind|run-now|promote|rollback ...
|
|
87
|
-
seq-studio pipeline plan|deploy --repo <namespace>/<slug> --ref <sha|branch>
|
|
88
|
-
[--root <directory>] [--source-env <first-party-env>] -e <env> [--target <id>]
|
|
89
|
-
For an existing target release unit, source-env selects a separately
|
|
90
|
-
authenticated canonical repository from banksouth, staging, or production.
|
|
91
|
-
Source identity must be adopted and belong to the destination tenant.
|
|
92
|
-
Registered OpCo source origins are not supported yet. The target verifies
|
|
93
|
-
and snapshots source before planning; no target repository is created.
|
|
94
|
-
Reviewed pipeline.config.yml source_paths can select runtime files and
|
|
95
|
-
directories, retaining pipeline metadata, release identity and size limits.
|
|
96
|
-
Not compatible with --dir, existing IDs, or coordinated migrations.
|
|
97
|
-
Rollback uses retained snapshots; historical source commits can be re-planned
|
|
98
|
-
explicitly with deploy --ref <sha> --source-env <env>.
|
|
99
|
-
seq-studio pipeline plan --plan-request-id <id> -e <env> [--json]
|
|
100
|
-
poll an existing durable plan without enqueueing or attaching credentials
|
|
101
|
-
Lifecycle --json results use stdout; progress uses stderr. Deploy --run-now
|
|
102
|
-
executes producers in the managed worker; local polling may disconnect.
|
|
103
|
-
|
|
104
|
-
Discovery requires staff access. Use list for pipeline repositories, assets
|
|
105
|
-
for declared assets, and search/describe for active deployment metadata;
|
|
106
|
-
use schema to verify physical columns. -e chooses the environment and
|
|
107
|
-
--target chooses a logical target when the environment has more than one.
|
|
108
|
-
Help is available offline.
|
|
109
|
-
`;
|
|
110
79
|
export const FUNCTIONS_USAGE = `usage:
|
|
111
80
|
seq-studio functions init <dir> [--repo <ns>/<name>] scaffold manifest, TypeScript handler, and docs pointers;
|
|
112
81
|
--repo scaffolds into a git-service repo (see Init into a repo)
|
|
@@ -264,7 +233,7 @@ export const ORM_DISCOVER_HELP = `usage:
|
|
|
264
233
|
the persisted operations that write it. Column names are the ones orm read and
|
|
265
234
|
orm sql accept.
|
|
266
235
|
A namespace you cannot read reports not found, the same as a missing one.
|
|
267
|
-
--json
|
|
236
|
+
--json omits SDL, adds active set/schema IDs and ops hash; retry on a mismatch.
|
|
268
237
|
operation show prints one active persisted operation's registered GraphQL
|
|
269
238
|
document; --json includes its hash, declared variables, and requirements.
|
|
270
239
|
Missing and unreadable operations both report not found.
|
|
@@ -119,6 +119,10 @@ export declare const managedFunctionManifestSchema: z.ZodObject<{
|
|
|
119
119
|
admin: "admin";
|
|
120
120
|
}>>>;
|
|
121
121
|
processes: z.ZodOptional<z.ZodObject<{
|
|
122
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
forms: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
124
|
+
comments: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
125
|
+
}, z.core.$strict>>;
|
|
122
126
|
read: z.ZodArray<z.ZodString>;
|
|
123
127
|
}, z.core.$strict>>;
|
|
124
128
|
agents: z.ZodOptional<z.ZodObject<{
|
package/dist/main.js
CHANGED
|
@@ -45,7 +45,7 @@ const TOP_LEVEL_USAGE = `usage:
|
|
|
45
45
|
seq-studio secrets <sub> [args] create | set | list | attach | detach | apply
|
|
46
46
|
seq-studio repos <sub> [args] list | namespaces | show | identity | create | clone | pull | pulls | delete | ci
|
|
47
47
|
seq-studio templates <sub> [args] publish | sync | list
|
|
48
|
-
seq-studio pipeline <sub> [args] list | assets | search | describe | schema | sample | query | init | validate | repin-orm | codegen | plan | adopt | unbind | deploy | status | migrate | promote | rollback | run-now
|
|
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
51
|
seq-studio orm <sub> [args] init | generate | validate | plan | apply | execute | read | sql | diff | migrate-from-yaml | import
|
|
@@ -109,7 +109,7 @@ const SUBCOMMANDS = {
|
|
|
109
109
|
auth: new Set(['whoami', 'git-credential', 'pat']),
|
|
110
110
|
feedback: new Set(['submit']),
|
|
111
111
|
orm: new Set(['init', 'generate', 'validate', 'plan', 'apply', 'execute', 'namespaces', 'describe', 'read', 'sql', 'diff', 'migrate-from-yaml', 'import']),
|
|
112
|
-
pipeline: new Set(['list', 'assets', 'search', 'describe', 'schema', 'sample', 'query', 'init', 'validate', 'repin-orm', 'codegen', 'adopt', 'unbind', 'plan', 'deploy', 'status', 'migrate', 'promote', 'rollback', 'run-now']),
|
|
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
|
};
|
|
115
115
|
export async function run(argv = process.argv.slice(2)) {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Operation, type OperationsPage } from './discover-schema.js';
|
|
2
|
+
export declare function getNamespaceJson({ options, namespace, path }: {
|
|
3
|
+
options: {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
token: string;
|
|
6
|
+
};
|
|
7
|
+
namespace: string;
|
|
8
|
+
path: string;
|
|
9
|
+
}): Promise<unknown>;
|
|
10
|
+
export type OperationListing = Pick<OperationsPage, 'operation_set_id' | 'schema_version_id' | 'ops_hash'> & {
|
|
11
|
+
operations: Operation[];
|
|
12
|
+
};
|
|
13
|
+
export declare function listAllOperations({ options, namespace }: {
|
|
14
|
+
options: {
|
|
15
|
+
baseUrl: string;
|
|
16
|
+
token: string;
|
|
17
|
+
};
|
|
18
|
+
namespace: string;
|
|
19
|
+
}): Promise<OperationListing>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { AtlasApiError, getJson } from '../atlas-client.js';
|
|
2
|
+
import { operationsPageSchema, parseResponse } from './discover-schema.js';
|
|
3
|
+
const OPERATIONS_PAGE_SIZE = 500;
|
|
4
|
+
export async function getNamespaceJson({ options, namespace, path }) {
|
|
5
|
+
try {
|
|
6
|
+
return await getJson({ ...options, path });
|
|
7
|
+
}
|
|
8
|
+
catch (error) {
|
|
9
|
+
if (error instanceof AtlasApiError && error.status === 404) {
|
|
10
|
+
throw new Error(`Namespace '${namespace}' was not found, has no applied version, or you cannot read it. ` +
|
|
11
|
+
'List the namespaces you can read: seq-studio orm namespaces');
|
|
12
|
+
}
|
|
13
|
+
throw error;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export async function listAllOperations({ options, namespace }) {
|
|
17
|
+
const operations = [];
|
|
18
|
+
let first;
|
|
19
|
+
for (;;) {
|
|
20
|
+
const query = new URLSearchParams({ limit: String(OPERATIONS_PAGE_SIZE), offset: String(operations.length) });
|
|
21
|
+
const page = parseResponse({
|
|
22
|
+
schema: operationsPageSchema,
|
|
23
|
+
body: await getNamespaceJson({
|
|
24
|
+
options,
|
|
25
|
+
namespace,
|
|
26
|
+
path: `/api/orm/namespaces/${encodeURIComponent(namespace)}/operations?${query.toString()}`,
|
|
27
|
+
}),
|
|
28
|
+
what: 'operations',
|
|
29
|
+
});
|
|
30
|
+
if (page.namespace !== undefined && page.namespace !== namespace) {
|
|
31
|
+
throw new Error(`Operations response names '${page.namespace}' instead of '${namespace}'. Retry orm describe ${namespace}.`);
|
|
32
|
+
}
|
|
33
|
+
if (page.offset !== undefined && page.offset !== operations.length) {
|
|
34
|
+
throw new Error(`Operations page offset changed while reading '${namespace}'. Retry orm describe ${namespace}.`);
|
|
35
|
+
}
|
|
36
|
+
if (first) {
|
|
37
|
+
if (page.operation_set_id !== first.operation_set_id || page.schema_version_id !== first.schema_version_id ||
|
|
38
|
+
page.ops_hash !== first.ops_hash || page.total !== first.total) {
|
|
39
|
+
throw new Error(`The active operation set changed while reading '${namespace}'. Retry orm describe ${namespace}.`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else
|
|
43
|
+
first = page;
|
|
44
|
+
if (page.operation_set_id === null && (page.operations.length !== 0 || page.total !== 0 ||
|
|
45
|
+
page.schema_version_id != null || page.ops_hash != null)) {
|
|
46
|
+
throw new Error(`Invalid empty active operation set for '${namespace}'. Retry orm describe ${namespace}.`);
|
|
47
|
+
}
|
|
48
|
+
if (page.operations.length === 0 && operations.length < page.total) {
|
|
49
|
+
throw new Error(`Operations pagination ended before the total for '${namespace}'. Retry orm describe ${namespace}.`);
|
|
50
|
+
}
|
|
51
|
+
operations.push(...page.operations);
|
|
52
|
+
if (operations.length > page.total) {
|
|
53
|
+
throw new Error(`Operations pagination exceeded the total for '${namespace}'. Retry orm describe ${namespace}.`);
|
|
54
|
+
}
|
|
55
|
+
if (operations.length === page.total) {
|
|
56
|
+
return { operations, operation_set_id: first.operation_set_id,
|
|
57
|
+
schema_version_id: first.schema_version_id, ops_hash: first.ops_hash };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -220,7 +220,11 @@ export declare const operationsPageSchema: z.ZodObject<{
|
|
|
220
220
|
}, z.core.$loose>>>;
|
|
221
221
|
}, z.core.$loose>>;
|
|
222
222
|
total: z.ZodNumber;
|
|
223
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
224
|
+
operation_set_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
223
225
|
schema_version_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
226
|
+
ops_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
227
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
224
228
|
}, z.core.$loose>;
|
|
225
229
|
/** `GET /api/orm/namespaces/<ns>/operations/<name>`: one operation of the active set. */
|
|
226
230
|
export declare const operationDetailSchema: z.ZodObject<{
|
|
@@ -274,6 +278,7 @@ export declare const operationInspectionSchema: z.ZodObject<{
|
|
|
274
278
|
}, z.core.$loose>;
|
|
275
279
|
export type SchemaView = z.infer<typeof schemaViewSchema>;
|
|
276
280
|
export type Operation = z.infer<typeof operationSchema>;
|
|
281
|
+
export type OperationsPage = z.infer<typeof operationsPageSchema>;
|
|
277
282
|
export type OperationDetail = z.infer<typeof operationDetailSchema>;
|
|
278
283
|
export type OperationVariable = z.infer<typeof variableSchema>;
|
|
279
284
|
export type Column = z.infer<typeof columnSchema>;
|
|
@@ -91,8 +91,12 @@ const operationSchema = z.looseObject({
|
|
|
91
91
|
});
|
|
92
92
|
export const operationsPageSchema = z.looseObject({
|
|
93
93
|
operations: z.array(operationSchema),
|
|
94
|
-
total: z.number(),
|
|
94
|
+
total: z.number().int().nonnegative(),
|
|
95
|
+
namespace: z.string().optional(),
|
|
96
|
+
operation_set_id: z.string().nullable().optional(),
|
|
95
97
|
schema_version_id: z.string().nullable().optional(),
|
|
98
|
+
ops_hash: z.string().nullable().optional(),
|
|
99
|
+
offset: z.number().int().nonnegative().optional(),
|
|
96
100
|
});
|
|
97
101
|
/** `GET /api/orm/namespaces/<ns>/operations/<name>`: one operation of the active set. */
|
|
98
102
|
export const operationDetailSchema = z.looseObject({
|
package/dist/orm/discover.js
CHANGED
|
@@ -8,15 +8,14 @@
|
|
|
8
8
|
* `describe` joins the active version's compiled schema with its active
|
|
9
9
|
* persisted-operation set.
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
11
|
+
import { getJson } from '../atlas-client.js';
|
|
12
12
|
import { printCliError } from '../cli-errors.js';
|
|
13
13
|
import { validateCommandInput } from '../command-input.js';
|
|
14
14
|
import { buildContext, clientOptions } from '../functions/commands.js';
|
|
15
15
|
import { table } from '../text-table.js';
|
|
16
|
-
import { namespaceListSchema,
|
|
16
|
+
import { namespaceListSchema, parseResponse, schemaViewSchema, } from './discover-schema.js';
|
|
17
17
|
import { variablesLabel } from './execute.js';
|
|
18
|
-
|
|
19
|
-
const OPERATIONS_PAGE_SIZE = 500;
|
|
18
|
+
import { getNamespaceJson, listAllOperations } from './discover-operations.js';
|
|
20
19
|
const DESCRIPTION_WIDTH = 60;
|
|
21
20
|
function pageFlag({ args, key, min }) {
|
|
22
21
|
const raw = args.flags[key];
|
|
@@ -89,37 +88,6 @@ export async function ormNamespacesCommand(args) {
|
|
|
89
88
|
return 1;
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
|
-
async function getNamespaceJson({ options, namespace, path }) {
|
|
93
|
-
try {
|
|
94
|
-
return await getJson({ ...options, path });
|
|
95
|
-
}
|
|
96
|
-
catch (error) {
|
|
97
|
-
// Missing and unreadable are deliberately indistinguishable on the server.
|
|
98
|
-
if (error instanceof AtlasApiError && error.status === 404) {
|
|
99
|
-
throw new Error(`Namespace '${namespace}' was not found, has no applied version, or you cannot read it. ` +
|
|
100
|
-
'List the namespaces you can read: seq-studio orm namespaces');
|
|
101
|
-
}
|
|
102
|
-
throw error;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
async function listAllOperations({ options, namespace }) {
|
|
106
|
-
const operations = [];
|
|
107
|
-
for (;;) {
|
|
108
|
-
const query = new URLSearchParams({ limit: String(OPERATIONS_PAGE_SIZE), offset: String(operations.length) });
|
|
109
|
-
const page = parseResponse({
|
|
110
|
-
schema: operationsPageSchema,
|
|
111
|
-
body: await getNamespaceJson({
|
|
112
|
-
options,
|
|
113
|
-
namespace,
|
|
114
|
-
path: `/api/orm/namespaces/${encodeURIComponent(namespace)}/operations?${query.toString()}`,
|
|
115
|
-
}),
|
|
116
|
-
what: 'operations',
|
|
117
|
-
});
|
|
118
|
-
operations.push(...page.operations);
|
|
119
|
-
if (page.operations.length === 0 || operations.length >= page.total)
|
|
120
|
-
return operations;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
91
|
function findRelation({ schema, name }) {
|
|
124
92
|
const found = schema.tables.find((relation) => relation.table === name);
|
|
125
93
|
if (found)
|
|
@@ -248,14 +216,19 @@ export async function ormDescribeCommand(args) {
|
|
|
248
216
|
}
|
|
249
217
|
const options = clientOptions(await buildContext(args));
|
|
250
218
|
const encoded = encodeURIComponent(namespace);
|
|
251
|
-
const [schemaBody,
|
|
219
|
+
const [schemaBody, listing] = await Promise.all([
|
|
252
220
|
getNamespaceJson({ options, namespace: namespace, path: `/api/orm/namespaces/${encoded}/schema` }),
|
|
253
221
|
listAllOperations({ options, namespace: namespace }),
|
|
254
222
|
]);
|
|
255
223
|
const schema = parseResponse({ schema: schemaViewSchema, body: schemaBody, what: 'schema' });
|
|
224
|
+
if (schema.namespace !== namespace ||
|
|
225
|
+
(listing.schema_version_id != null && listing.schema_version_id !== schema.version_id)) {
|
|
226
|
+
throw new Error(`The active schema or operation set changed while reading '${namespace}'. Retry orm describe ${namespace}.`);
|
|
227
|
+
}
|
|
228
|
+
const { operations, ...identity } = listing;
|
|
256
229
|
if (onlyOperations) {
|
|
257
230
|
if (args.flags.json === true) {
|
|
258
|
-
console.log(JSON.stringify({ namespace: schema.namespace, version_id: schema.version_id, operations }, null, 2));
|
|
231
|
+
console.log(JSON.stringify({ namespace: schema.namespace, version_id: schema.version_id, ...identity, operations }, null, 2));
|
|
259
232
|
}
|
|
260
233
|
else {
|
|
261
234
|
console.log(`${schema.namespace} ${formatLabel(schema.definition_format)} version ${schema.version_id}`);
|
|
@@ -268,7 +241,7 @@ export async function ormDescribeCommand(args) {
|
|
|
268
241
|
// The generated GraphQL SDL is large and restates the tables; leave it out.
|
|
269
242
|
const { sdl: _sdl, ...described } = schema;
|
|
270
243
|
if (args.flags.json === true)
|
|
271
|
-
console.log(JSON.stringify({ ...described, operations }, null, 2));
|
|
244
|
+
console.log(JSON.stringify({ ...described, ...identity, operations }, null, 2));
|
|
272
245
|
else {
|
|
273
246
|
printNamespace({ schema, operations });
|
|
274
247
|
console.error(`Describe a table: seq-studio orm describe ${schema.namespace} <table>`);
|
|
@@ -289,6 +262,7 @@ export async function ormDescribeCommand(args) {
|
|
|
289
262
|
namespace: schema.namespace,
|
|
290
263
|
definition_format: schema.definition_format,
|
|
291
264
|
version_id: schema.version_id,
|
|
265
|
+
...identity,
|
|
292
266
|
kind: found.kind,
|
|
293
267
|
[found.kind]: found.relation,
|
|
294
268
|
enums: schema.enums.filter((declared) => found.relation.columns.some((column) => column.enum_name === declared.name)),
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* materializes source from the target environment's git service, so a laptop
|
|
5
5
|
* directory cannot be the deploy source by itself.
|
|
6
6
|
*
|
|
7
|
-
* Clone publish is limited to targets that do not require approval
|
|
8
|
-
*
|
|
7
|
+
* Clone publish is limited to targets that do not require approval;
|
|
8
|
+
* approval-gated targets keep deploying commits that already live in that
|
|
9
9
|
* environment's git service.
|
|
10
10
|
*/
|
|
11
11
|
import { spawn } from 'node:child_process';
|
|
@@ -19,6 +19,7 @@ export declare const ORM_CONTRACTS_FILENAME = "orm-contracts.json";
|
|
|
19
19
|
* itself absent (installable) or did one of its dependencies fail to load?
|
|
20
20
|
*/
|
|
21
21
|
export declare function isPipelineSpecMissing(message: string): boolean;
|
|
22
|
+
export declare function pipelineSpecLoadErrorMessage(message: string): string;
|
|
22
23
|
export declare function pipelineInitCommand(args: ParsedArgs): Promise<number>;
|
|
23
24
|
interface ValidateReportFinding {
|
|
24
25
|
readonly severity: 'error' | 'warning';
|
|
@@ -38,14 +38,17 @@ ${PIPELINE_DISCOVERY_USAGE}
|
|
|
38
38
|
supplies ORM synced-table contracts for serving satisfies pins. Exits 1 on
|
|
39
39
|
any error-severity finding. Also validates optional pipeline.yml native
|
|
40
40
|
workflow dependencies and manual stage membership.
|
|
41
|
+
From the pipeline tooling/app directory, install both CLI and spec:
|
|
42
|
+
pnpm add --save-dev @sequenceholdings/studio-cli @sequenceholdings/pipeline-spec
|
|
43
|
+
pnpm exec seq-studio pipeline validate .
|
|
41
44
|
|
|
42
45
|
seq-studio pipeline repin-orm [dir] -e <env> [--target <id>] [--dry-run]
|
|
43
46
|
fetch active ORM synced-table contracts, verify serving compatibility,
|
|
44
47
|
then update orm-contracts.json and every matching satisfies.content_hash;
|
|
45
48
|
target is inferred when the environment exposes exactly one
|
|
46
49
|
|
|
47
|
-
seq-studio pipeline retire --repo <release-unit> -e <env> [--target <id>] [--json]
|
|
48
|
-
preview whole
|
|
50
|
+
seq-studio pipeline retire --repo <release-unit> -e <env> [--stages <slugs>] [--target <id>] [--json]
|
|
51
|
+
preview retirement of the whole pipeline or selected omitted stages; retain data and history
|
|
49
52
|
approve the exact inventory with --plan-hash <hash> --yes
|
|
50
53
|
inspect with --retirement-id <id>; resume a stopped operation with
|
|
51
54
|
--retirement-id <id> --resume --yes (never creates a replacement plan)
|
|
@@ -155,6 +158,15 @@ export function isPipelineSpecMissing(message) {
|
|
|
155
158
|
const specifier = message.match(/Cannot find (?:package|module) '([^']+)'/)?.[1];
|
|
156
159
|
return specifier === '@sequenceholdings/pipeline-spec' || (specifier?.startsWith('@sequenceholdings/pipeline-spec/') ?? false);
|
|
157
160
|
}
|
|
161
|
+
export function pipelineSpecLoadErrorMessage(message) {
|
|
162
|
+
if (isPipelineSpecMissing(message)) {
|
|
163
|
+
return ('seq-studio pipeline needs the @sequenceholdings/pipeline-spec package. From your pipeline tooling/app directory, install both packages and run the local CLI:\n' +
|
|
164
|
+
' pnpm add --save-dev @sequenceholdings/studio-cli @sequenceholdings/pipeline-spec\n' +
|
|
165
|
+
' pnpm exec seq-studio pipeline validate .');
|
|
166
|
+
}
|
|
167
|
+
return ('@sequenceholdings/pipeline-spec is installed but a dependency failed to load. Reinstall dependencies, then retry.\n' +
|
|
168
|
+
` ${message}`);
|
|
169
|
+
}
|
|
158
170
|
async function importPipelineSpec() {
|
|
159
171
|
try {
|
|
160
172
|
return await import('@sequenceholdings/pipeline-spec');
|
|
@@ -162,15 +174,7 @@ async function importPipelineSpec() {
|
|
|
162
174
|
catch (err) {
|
|
163
175
|
if (err.code === 'ERR_MODULE_NOT_FOUND') {
|
|
164
176
|
const message = err instanceof Error ? err.message : String(err);
|
|
165
|
-
|
|
166
|
-
console.error('seq-studio pipeline needs the @sequenceholdings/pipeline-spec package. Add it to your app, then run the app\'s CLI:\n' +
|
|
167
|
-
' pnpm add -D @sequenceholdings/pipeline-spec\n' +
|
|
168
|
-
' pnpm exec seq-studio pipeline …');
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
console.error('@sequenceholdings/pipeline-spec is installed but a dependency failed to load. Reinstall dependencies, then retry.\n' +
|
|
172
|
-
` ${message}`);
|
|
173
|
-
}
|
|
177
|
+
console.error(pipelineSpecLoadErrorMessage(message));
|
|
174
178
|
return null;
|
|
175
179
|
}
|
|
176
180
|
throw err;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/** Offline help: keep this module free of authentication and runtime SDK imports. */
|
|
2
|
+
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 For local validation, run from the pipeline tooling/app directory:\n pnpm add --save-dev @sequenceholdings/studio-cli @sequenceholdings/pipeline-spec\n pnpm exec seq-studio pipeline validate .\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 seq-studio pipeline retire --repo <release-unit> -e <env> [--target <id>] [--stages <slugs>] [--json]\n preview the whole pipeline, or comma-separated stages omitted from its\n latest published source collection. Approve the same scope with\n --plan-hash <hash> --yes. Deletes supported execution resources and archives\n stages; retains data and history. Live synced-table configurations block.\n Inspect with --retirement-id <id>; resume a stopped failure with\n --retirement-id <id> --resume --yes (omit --stages; the scope is immutable).\n Requires a human pipeline administrator and staff destructive-operation access.\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";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Offline help: keep this module free of authentication and runtime SDK imports. */
|
|
2
|
+
export const PIPELINE_HELP = `usage:
|
|
3
|
+
seq-studio pipeline list -e <env> [--limit 1..200] [--offset N] [--json]
|
|
4
|
+
list pipeline repository rollups (not assets)
|
|
5
|
+
seq-studio pipeline assets -e <env> [--repo <namespace>/<slug>] [--json]
|
|
6
|
+
list asset declarations, including assets that may not be deployed
|
|
7
|
+
seq-studio pipeline search <query> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--limit N] [--offset N] [--json]
|
|
8
|
+
seq-studio pipeline describe <asset-id> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--json]
|
|
9
|
+
seq-studio pipeline schema|sample <asset-id> -e <env> [--target <id>] [--limit N] [--json]
|
|
10
|
+
seq-studio pipeline query <asset-id> --sql <read-only-sql> -e <env> [--target <id>] [--limit N] [--json]
|
|
11
|
+
seq-studio pipeline init|validate|plan|deploy|status|migrate|adopt|unbind|run-now|promote|rollback ...
|
|
12
|
+
For local validation, run from the pipeline tooling/app directory:
|
|
13
|
+
pnpm add --save-dev @sequenceholdings/studio-cli @sequenceholdings/pipeline-spec
|
|
14
|
+
pnpm exec seq-studio pipeline validate .
|
|
15
|
+
seq-studio pipeline plan|deploy --repo <namespace>/<slug> --ref <sha|branch>
|
|
16
|
+
[--root <directory>] [--source-env <first-party-env>] -e <env> [--target <id>]
|
|
17
|
+
For an existing target release unit, source-env selects a separately
|
|
18
|
+
authenticated canonical repository from banksouth, staging, or production.
|
|
19
|
+
Source identity must be adopted and belong to the destination tenant.
|
|
20
|
+
Registered OpCo source origins are not supported yet. The target verifies
|
|
21
|
+
and snapshots source before planning; no target repository is created.
|
|
22
|
+
Reviewed pipeline.config.yml source_paths can select runtime files and
|
|
23
|
+
directories, retaining pipeline metadata, release identity and size limits.
|
|
24
|
+
Not compatible with --dir, existing IDs, or coordinated migrations.
|
|
25
|
+
Rollback uses retained snapshots; historical source commits can be re-planned
|
|
26
|
+
explicitly with deploy --ref <sha> --source-env <env>.
|
|
27
|
+
seq-studio pipeline plan --plan-request-id <id> -e <env> [--json]
|
|
28
|
+
poll an existing durable plan without enqueueing or attaching credentials
|
|
29
|
+
seq-studio pipeline retire --repo <release-unit> -e <env> [--target <id>] [--stages <slugs>] [--json]
|
|
30
|
+
preview the whole pipeline, or comma-separated stages omitted from its
|
|
31
|
+
latest published source collection. Approve the same scope with
|
|
32
|
+
--plan-hash <hash> --yes. Deletes supported execution resources and archives
|
|
33
|
+
stages; retains data and history. Live synced-table configurations block.
|
|
34
|
+
Inspect with --retirement-id <id>; resume a stopped failure with
|
|
35
|
+
--retirement-id <id> --resume --yes (omit --stages; the scope is immutable).
|
|
36
|
+
Requires a human pipeline administrator and staff destructive-operation access.
|
|
37
|
+
Lifecycle --json results use stdout; progress uses stderr. Deploy --run-now
|
|
38
|
+
executes producers in the managed worker; local polling may disconnect.
|
|
39
|
+
|
|
40
|
+
Discovery requires staff access. Use list for pipeline repositories, assets
|
|
41
|
+
for declared assets, and search/describe for active deployment metadata;
|
|
42
|
+
use schema to verify physical columns. -e chooses the environment and
|
|
43
|
+
--target chooses a logical target when the environment has more than one.
|
|
44
|
+
Help is available offline.
|
|
45
|
+
`;
|
|
@@ -623,7 +623,7 @@ async function pollDeployment({ baseUrl, token, deploymentId, environment, timeo
|
|
|
623
623
|
* on the target, attach (as the caller) the managed secret named by convention
|
|
624
624
|
* and plan once more — `functions deploy`'s manifest reconcile, for pipelines.
|
|
625
625
|
* A failed plan still registers its stages, so this also covers new stages.
|
|
626
|
-
* `--no-provision` (CI) skips attaching and fails
|
|
626
|
+
* `--no-provision` (CI) skips attaching and fails on the first plan.
|
|
627
627
|
*/
|
|
628
628
|
async function planAttachingCredentials({ request, provision, }) {
|
|
629
629
|
let response;
|
|
@@ -892,11 +892,10 @@ export async function pipelineUnbindCommand(args) {
|
|
|
892
892
|
* ambiguous bare slug fails with the candidate repos rather than guessing.
|
|
893
893
|
*
|
|
894
894
|
* The `slug` query param is an EXACT server-side filter (contracts.ts
|
|
895
|
-
* `listStagesQuerySchema`)
|
|
896
|
-
* `updated_at DESC`, so scanning only the first page
|
|
897
|
-
*
|
|
898
|
-
*
|
|
899
|
-
* bare-slug lookup as unique (SEQ-2447 review). Filtering server-side by the
|
|
895
|
+
* `listStagesQuerySchema`). The list route's default sort is
|
|
896
|
+
* `updated_at DESC`, so scanning only the first page would silently miss a
|
|
897
|
+
* matching stage buried on a later page, and a same-slug duplicate there would
|
|
898
|
+
* falsely read as unique (SEQ-2447 review). Filtering server-side by the
|
|
900
899
|
* exact slug means every match is guaranteed to fit on one page regardless
|
|
901
900
|
* of how many other stages exist.
|
|
902
901
|
*/
|
|
@@ -11,22 +11,27 @@ export async function pipelineRetireCommand(args) {
|
|
|
11
11
|
const repo = string('repo');
|
|
12
12
|
const planHash = string('plan-hash');
|
|
13
13
|
const retirementId = string('retirement-id');
|
|
14
|
+
const stageSelection = string('stages');
|
|
15
|
+
const stageSlugs = stageSelection === undefined ? undefined : stageSelection.split(',').map(s => s.trim()).sort();
|
|
16
|
+
if (stageSlugs && (retirementId || stageSlugs.some(s => !s) || new Set(stageSlugs).size !== stageSlugs.length)) {
|
|
17
|
+
throw new Error('--stages must be a nonempty, unique comma-separated list; omit it when reading or resuming the original retirement ID');
|
|
18
|
+
}
|
|
14
19
|
const resume = args.flags.resume === true;
|
|
15
20
|
const confirmed = args.flags.yes === true;
|
|
16
21
|
if (!repo || ((planHash || resume) && !confirmed) || (resume && !retirementId) || (confirmed && !planHash && !resume)) {
|
|
17
|
-
console.error('usage: seq-studio pipeline retire --repo <release-unit> -e <env> [--target <id>] [--plan-hash <hash> --yes | --retirement-id <id> [--resume --yes]] [--json]');
|
|
22
|
+
console.error('usage: seq-studio pipeline retire --repo <release-unit> -e <env> [--target <id>] [--stages <slug,slug>] [--plan-hash <hash> --yes | --retirement-id <id> [--resume --yes]] [--json]');
|
|
18
23
|
return 1;
|
|
19
24
|
}
|
|
20
25
|
const { env, token } = await envAndToken(args, { human: true });
|
|
21
26
|
const target = await resolvePipelineTarget({ args, env, token });
|
|
22
|
-
const result = await postJson({ baseUrl: env.url, token, path: '/api/data-pipelines/pipelines/retire', body: { repo, environment: target.id, ...(planHash ? { planHash } : {}), ...(retirementId ? { retirementId } : {}), resume } });
|
|
27
|
+
const result = await postJson({ baseUrl: env.url, token, path: '/api/data-pipelines/pipelines/retire', body: { repo, environment: target.id, ...(stageSlugs ? { stageSlugs } : {}), ...(planHash ? { planHash } : {}), ...(retirementId ? { retirementId } : {}), resume } });
|
|
23
28
|
if (args.flags.json)
|
|
24
29
|
console.log(JSON.stringify(result, null, 2));
|
|
25
30
|
else if (result.plan) {
|
|
26
31
|
console.log(`Retire ${repo} in ${target.id}: ${result.plan.inventory.stageRows.length} stages. Data and history retained.`);
|
|
27
32
|
for (const r of result.plan.inventory.resources)
|
|
28
33
|
console.log(` ${['job', 'dlt_pipeline', 'synced_table'].includes(r.kind) ? 'Verify/remove execution resource' : 'Retain data object'}: ${r.kind} ${r.nativeId} (${r.resourceKey})`);
|
|
29
|
-
console.log(`Review the inventory, then approve with --plan-hash ${result.plan.planHash} --yes. Native preflight can still block unsafe deletion.`);
|
|
34
|
+
console.log(`Review the inventory, then approve with ${stageSlugs ? `--stages ${stageSlugs.join(',')} ` : ''}--plan-hash ${result.plan.planHash} --yes. Native preflight can still block unsafe deletion.`);
|
|
30
35
|
}
|
|
31
36
|
else
|
|
32
37
|
console.log(`Retirement ${result.retirementId}: ${result.status}${result.statusDetail ? ` — ${result.statusDetail}` : ''}\nCheck with --retirement-id ${result.retirementId}. Resume a stopped failure with --retirement-id ${result.retirementId} --resume --yes.`);
|
|
@@ -22,12 +22,12 @@ export interface AttachableSecret {
|
|
|
22
22
|
export interface MissingStageCredential {
|
|
23
23
|
stage: StageRef;
|
|
24
24
|
symbolic: string;
|
|
25
|
-
/** Convention name (`
|
|
25
|
+
/** Convention name (`vendor_oauth` → `VENDOR_OAUTH`), from the stage detail. */
|
|
26
26
|
managedSecretName: string;
|
|
27
27
|
/** The target's secret org (what the legacy lookup reads), when it has one. */
|
|
28
28
|
secretOrgId: string | null;
|
|
29
29
|
}
|
|
30
|
-
/** The credential name a secret binds to when none is given: `
|
|
30
|
+
/** The credential name a secret binds to when none is given: `VENDOR_OAUTH` → `vendor_oauth`. */
|
|
31
31
|
export declare function symbolicForSecretName(name: string): string;
|
|
32
32
|
export declare function resolveStage({ client, slug, repo, }: {
|
|
33
33
|
client: ClientOptions;
|
|
@@ -12,7 +12,7 @@ import { deleteJson, getJson, postJson } from '../atlas-client.js';
|
|
|
12
12
|
*/
|
|
13
13
|
const LOG = '[seq-studio]';
|
|
14
14
|
const EDIT_ACCESS = new Set(['editor', 'admin', 'owner']);
|
|
15
|
-
/** The credential name a secret binds to when none is given: `
|
|
15
|
+
/** The credential name a secret binds to when none is given: `VENDOR_OAUTH` → `vendor_oauth`. */
|
|
16
16
|
export function symbolicForSecretName(name) {
|
|
17
17
|
return name.toLowerCase();
|
|
18
18
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Online agent loader for lint's "agent output schema matches
|
|
3
3
|
* outgoing_edges" check. Hits `GET /api/agents/agents/:id` on the
|
|
4
|
-
* resolved env
|
|
5
|
-
* required an Atlas tsx runtime).
|
|
4
|
+
* resolved env.
|
|
6
5
|
*
|
|
7
6
|
* Outcomes are distinguished so lint can react proportionally: a
|
|
8
7
|
* definitive 404 returns 'not-found' (hard error — a misspelled or
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Online agent loader for lint's "agent output schema matches
|
|
3
3
|
* outgoing_edges" check. Hits `GET /api/agents/agents/:id` on the
|
|
4
|
-
* resolved env
|
|
5
|
-
* required an Atlas tsx runtime).
|
|
4
|
+
* resolved env.
|
|
6
5
|
*
|
|
7
6
|
* Outcomes are distinguished so lint can react proportionally: a
|
|
8
7
|
* definitive 404 returns 'not-found' (hard error — a misspelled or
|
package/dist/process/build.js
CHANGED
|
@@ -285,7 +285,7 @@ function serializeNodeMetadata(node) {
|
|
|
285
285
|
}
|
|
286
286
|
// First-class comment-chain opt-in — packed alongside artifact_refs (NOT
|
|
287
287
|
// inside the author `metadata` bag), so it serializes as its own node
|
|
288
|
-
// field that
|
|
288
|
+
// field that consumers read at `node.metadata.comments`.
|
|
289
289
|
if (human.comments)
|
|
290
290
|
meta.comments = human.comments;
|
|
291
291
|
serializeMapperSlot(meta, 'input_mapper', human.input);
|
|
@@ -355,8 +355,8 @@ function serializeNodeMetadata(node) {
|
|
|
355
355
|
// directive. It must live at TOP-LEVEL `input_mapper_source` — the same
|
|
356
356
|
// slot every other node kind uses — so the orchestrator's runInputMapper
|
|
357
357
|
// executes it and the runner reads the directive from its payload input.
|
|
358
|
-
// (
|
|
359
|
-
// re-run + epoch invalidation
|
|
358
|
+
// (Nested under `parallel` it would go unread, disabling selective
|
|
359
|
+
// re-run + epoch invalidation.)
|
|
360
360
|
serializeMapperSlot(meta, 'input_mapper', parallel.input);
|
|
361
361
|
if (parallel.bindings)
|
|
362
362
|
meta.bindings = parallel.bindings;
|
package/dist/process/commands.js
CHANGED
|
@@ -1144,9 +1144,8 @@ export async function doctorCommand(args) {
|
|
|
1144
1144
|
lines.push(`writer gate: WARN — could not probe: ${err instanceof Error ? err.message : String(err)}`);
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
|
-
// Git-service discovery: empty current env often means the repos live on
|
|
1148
|
-
// another deployment
|
|
1149
|
-
// staging). Hint when staging has repos and the current env does not.
|
|
1147
|
+
// Git-service discovery: an empty current env often means the repos live on
|
|
1148
|
+
// another deployment. Hint when staging has repos and the current env does not.
|
|
1150
1149
|
try {
|
|
1151
1150
|
const current = await getJson({
|
|
1152
1151
|
baseUrl: env.url,
|
package/dist/process/discover.js
CHANGED
|
@@ -72,7 +72,7 @@ export async function loadProcessDefinitions(explicitRoot) {
|
|
|
72
72
|
const entries = await readdir(root);
|
|
73
73
|
const found = [];
|
|
74
74
|
const seenIds = new Set();
|
|
75
|
-
// Group dirs
|
|
75
|
+
// Group dirs have no `process.ts` of their own but
|
|
76
76
|
// contain `<group>/<id>/process.ts`. Discovery is one level deep, so they're
|
|
77
77
|
// silently skipped from this root — warn so a dev doesn't believe they
|
|
78
78
|
// linted/applied everything (run from inside the group dir, or set
|
package/dist/process/lint.js
CHANGED
|
@@ -350,9 +350,8 @@ async function lintNodeContract(processId, node, errors, warnings, loadAgentSche
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
/**
|
|
353
|
-
* A node whose config declares `routeRules` (content-conditional routing
|
|
354
|
-
*
|
|
355
|
-
* outgoing edge. This is the only place the hole can be closed: the native fn
|
|
353
|
+
* A node whose config declares `routeRules` (content-conditional routing)
|
|
354
|
+
* must declare EVERY rule's `edge_id` as an outgoing edge. This is the only place the hole can be closed: the native fn
|
|
356
355
|
* can't see the graph from its execution context, and the engine's edge router
|
|
357
356
|
* AUTO-TAKES a sole outgoing edge while silently discarding the returned
|
|
358
357
|
* edge_id — so a rule targeting a forgotten edge would route every submission
|
|
@@ -367,10 +366,9 @@ function lintRouteRulesEdges(processId, node, errors) {
|
|
|
367
366
|
if (!Array.isArray(rules) || rules.length === 0)
|
|
368
367
|
return;
|
|
369
368
|
const edgeIds = new Set(node.outgoing_edges.map((e) => e.id));
|
|
370
|
-
//
|
|
371
|
-
//
|
|
372
|
-
//
|
|
373
|
-
// submission at runtime (InvalidEdgeIdError). Catch it at lint time.
|
|
369
|
+
// A routeRules fn returns 'ok' when no rule matches, so a routeRules node
|
|
370
|
+
// without an ok edge would pass the per-rule check below and then fail the
|
|
371
|
+
// FIRST non-matching submission at runtime (InvalidEdgeIdError). Catch it at lint time.
|
|
374
372
|
if (!edgeIds.has('ok')) {
|
|
375
373
|
errors.push({
|
|
376
374
|
process_id: processId,
|
|
@@ -221,7 +221,7 @@ const BEHAVIORAL_METADATA_FIELDS = {
|
|
|
221
221
|
'advance_allowed_mapper_source',
|
|
222
222
|
'advance_allowed_mapper_expr',
|
|
223
223
|
// dueDate fn computes the task's due instant at parking — a change alters
|
|
224
|
-
// run behavior
|
|
224
|
+
// run behavior, so it must diff as behavioral.
|
|
225
225
|
'due_date_source',
|
|
226
226
|
'due_date_expr',
|
|
227
227
|
'email_notification',
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* RECURSIVELY finding each `process.ts` under both bases (`atlas/processes`
|
|
12
12
|
* and repo-root `processes/`, skipping node_modules/hidden dirs) and taking
|
|
13
13
|
* `dirname(dirname(file))` as its apply root — so arbitrarily nested layouts
|
|
14
|
-
* (
|
|
14
|
+
* (`<group>/<pkg>/<id>/process.ts`) are covered.
|
|
15
15
|
* Repo-root packages' `@sequenceholdings/lattice` import resolves through the
|
|
16
16
|
* repo-root node_modules (the workspace SDK is a root devDependency), so they
|
|
17
17
|
* load through the same tsx lane.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* RECURSIVELY finding each `process.ts` under both bases (`atlas/processes`
|
|
12
12
|
* and repo-root `processes/`, skipping node_modules/hidden dirs) and taking
|
|
13
13
|
* `dirname(dirname(file))` as its apply root — so arbitrarily nested layouts
|
|
14
|
-
* (
|
|
14
|
+
* (`<group>/<pkg>/<id>/process.ts`) are covered.
|
|
15
15
|
* Repo-root packages' `@sequenceholdings/lattice` import resolves through the
|
|
16
16
|
* repo-root node_modules (the workspace SDK is a root devDependency), so they
|
|
17
17
|
* load through the same tsx lane.
|
|
@@ -84,10 +84,10 @@ async function fileExists(path) {
|
|
|
84
84
|
* directory whose IMMEDIATE child owns it (`dirname(dirname(file))` — the
|
|
85
85
|
* `<root>/<id>/process.ts` registration unit loadProcessDefinitions loads one
|
|
86
86
|
* level deep). Unique + sorted. Arbitrarily nested layouts (e.g.
|
|
87
|
-
* `atlas/processes
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
87
|
+
* `atlas/processes/<group>/<pkg>/<id>/process.ts`) resolve to their own root,
|
|
88
|
+
* and a dir can be an id dir under one root while parenting deeper roots
|
|
89
|
+
* without overlapping loads, because each root loads only its immediate
|
|
90
|
+
* children.
|
|
91
91
|
*/
|
|
92
92
|
async function discoverApplyRoots({ repoRoot }) {
|
|
93
93
|
const roots = new Set();
|
package/dist/repos/commands.d.ts
CHANGED
package/dist/secrets/commands.js
CHANGED
|
@@ -46,18 +46,6 @@ function parseCommaList(value) {
|
|
|
46
46
|
function orgFlag(args) {
|
|
47
47
|
return typeof args.flags.org === 'string' ? args.flags.org.trim().toLowerCase() : undefined;
|
|
48
48
|
}
|
|
49
|
-
/** First-party Sequence Atlas envs — their Lakebase registry is org=sequence. */
|
|
50
|
-
const SEQUENCE_OWNED_ENVS = new Set(['local', 'staging', 'production']);
|
|
51
|
-
/** Refuse --org that would write a tenant row into the wrong deployment registry. */
|
|
52
|
-
function orgDeploymentError(org, envName) {
|
|
53
|
-
if (SEQUENCE_OWNED_ENVS.has(envName) && org !== 'sequence') {
|
|
54
|
-
return `--org ${org} must be used with -e ${org} (${envName} only holds the sequence secret registry)`;
|
|
55
|
-
}
|
|
56
|
-
if (!SEQUENCE_OWNED_ENVS.has(envName) && org === 'sequence') {
|
|
57
|
-
return `--org sequence is not valid on -e ${envName} (that deployment does not own the Sequence registry)`;
|
|
58
|
-
}
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
49
|
/** Drop one trailing LF or CRLF so Windows-authored --from-file values match Unix. */
|
|
62
50
|
export function stripOneTrailingNewline(value) {
|
|
63
51
|
return value.replace(/\r?\n$/, '');
|
|
@@ -173,13 +161,8 @@ export async function secretsCreateCommand(args) {
|
|
|
173
161
|
console.error(`${LOG} --type must be key-value or single`);
|
|
174
162
|
return 1;
|
|
175
163
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
if (mismatch) {
|
|
179
|
-
console.error(`${LOG} ${mismatch}`);
|
|
180
|
-
return 1;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
164
|
+
// Atlas owns registry identity and validates orgId against deploymentOwnerSlug.
|
|
165
|
+
// CLI aliases (especially local tenant profiles) do not identify that owner.
|
|
183
166
|
const secret = await postJson({
|
|
184
167
|
...clientOptions(ctx),
|
|
185
168
|
path: '/api/managed-secrets',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequenceholdings/studio-cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
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": {
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"tsx": "^4.20.3",
|
|
45
45
|
"yaml": "^2.8.4",
|
|
46
46
|
"zod": "^4.1.13",
|
|
47
|
+
"@sequenceholdings/artifact-studio": "0.11.6",
|
|
47
48
|
"@sequenceholdings/agent-spec": "0.1.5",
|
|
48
|
-
"@sequenceholdings/artifact-studio": "0.11.4",
|
|
49
49
|
"@sequenceholdings/lattice": "0.1.8",
|
|
50
|
-
"@sequenceholdings/managed-functions": "0.5.
|
|
51
|
-
"@sequenceholdings/storage": "0.1.
|
|
52
|
-
"@sequenceholdings/platform": "0.1.
|
|
50
|
+
"@sequenceholdings/managed-functions": "0.5.5",
|
|
51
|
+
"@sequenceholdings/storage": "0.1.5",
|
|
52
|
+
"@sequenceholdings/platform": "0.1.2"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@sequenceholdings/
|
|
56
|
-
"@sequenceholdings/
|
|
55
|
+
"@sequenceholdings/pipeline-spec": "0.3.3",
|
|
56
|
+
"@sequenceholdings/orm": "2.8.3"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"@sequenceholdings/orm": {
|