@sequenceholdings/studio-cli 0.9.23 → 0.9.26
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 +166 -146
- package/dist/access/commands.js +3 -5
- package/dist/access/principal.js +2 -2
- package/dist/access/tier-hosts.js +2 -2
- package/dist/agents/commands.d.ts +1 -1
- package/dist/agents/commands.js +9 -9
- package/dist/agents/scaffold.js +3 -3
- package/dist/agents/voice.d.ts +1 -1
- package/dist/agents/voice.js +1 -1
- package/dist/app/commands.d.ts +2 -2
- package/dist/app/commands.js +31 -21
- package/dist/app/deploy.d.ts +1 -1
- package/dist/app/deploy.js +1 -1
- package/dist/app/manifest.d.ts +9 -9
- package/dist/app/manifest.js +1 -1
- package/dist/app/prepare.js +1 -1
- package/dist/app/primitive-scaffold.js +1 -1
- package/dist/app/readme.js +6 -6
- package/dist/app/scaffold.js +1 -1
- package/dist/app/validate.d.ts +1 -1
- package/dist/app/workspace-scaffold.js +1 -1
- package/dist/app-preview/commands.d.ts +7 -0
- package/dist/app-preview/commands.js +264 -0
- package/dist/app-preview/fingerprint.d.ts +20 -0
- package/dist/app-preview/fingerprint.js +32 -0
- package/dist/app-preview/install.d.ts +31 -0
- package/dist/app-preview/install.js +53 -0
- package/dist/app-preview/namespace-probe.d.ts +13 -0
- package/dist/app-preview/namespace-probe.js +50 -0
- package/dist/app-preview/plan.d.ts +28 -0
- package/dist/app-preview/plan.js +41 -0
- package/dist/app-preview/run.d.ts +32 -0
- package/dist/app-preview/run.js +48 -0
- package/dist/app-preview/runners.d.ts +73 -0
- package/dist/app-preview/runners.js +226 -0
- package/dist/app-preview/secrets.d.ts +48 -0
- package/dist/app-preview/secrets.js +104 -0
- package/dist/app-preview/target.d.ts +28 -0
- package/dist/app-preview/target.js +62 -0
- package/dist/artifact/delegate.d.ts +1 -12
- package/dist/artifact/delegate.js +43 -124
- package/dist/artifact/sandbox.js +1 -1
- package/dist/auth-cmds/commands.js +1 -2
- package/dist/auth.js +1 -3
- package/dist/bin.js +12 -2
- package/dist/cli-attribution.d.ts +4 -0
- package/dist/cli-attribution.js +25 -3
- package/dist/cli-errors.d.ts +9 -1
- package/dist/cli-errors.js +20 -9
- package/dist/command-contract.d.ts +7 -182
- package/dist/command-contract.js +9 -33
- package/dist/command-help.d.ts +6 -6
- package/dist/command-help.js +31 -27
- package/dist/command-telemetry.js +2 -2
- package/dist/config-dir.d.ts +8 -0
- package/dist/config-dir.js +35 -0
- package/dist/config.d.ts +6 -7
- package/dist/config.js +15 -15
- package/dist/docs/commands.js +9 -4
- package/dist/edge-auth-headers.js +1 -18
- package/dist/env-registry.d.ts +4 -0
- package/dist/env-registry.js +15 -6
- package/dist/envs/commands.d.ts +3 -0
- package/dist/envs/commands.js +11 -0
- package/dist/exit-codes.d.ts +16 -0
- package/dist/exit-codes.js +27 -0
- package/dist/functions/bundle.d.ts +1 -1
- package/dist/functions/commands.d.ts +15 -0
- package/dist/functions/commands.js +86 -29
- package/dist/functions/manifest.js +1 -1
- package/dist/functions/service-account-guidance.d.ts +1 -1
- package/dist/functions/service-account-guidance.js +2 -2
- package/dist/lifecycle/check.d.ts +13 -0
- package/dist/lifecycle/check.js +116 -0
- package/dist/lifecycle/commands.d.ts +14 -0
- package/dist/lifecycle/commands.js +121 -0
- package/dist/lifecycle/plan.d.ts +28 -0
- package/dist/lifecycle/plan.js +113 -0
- package/dist/lifecycle/rollback.d.ts +7 -0
- package/dist/lifecycle/rollback.js +89 -0
- package/dist/lifecycle/seq-ci-tools.d.ts +107 -0
- package/dist/lifecycle/seq-ci-tools.js +177 -0
- package/dist/lifecycle/upgrade.d.ts +3 -0
- package/dist/lifecycle/upgrade.js +38 -0
- package/dist/machine-output.d.ts +11 -2
- package/dist/machine-output.js +32 -10
- package/dist/main.d.ts +16 -6
- package/dist/main.js +187 -361
- package/dist/orgs.d.ts +45 -0
- package/dist/orgs.js +106 -0
- package/dist/orm/delegate.d.ts +1 -1
- package/dist/orm/delegate.js +32 -18
- package/dist/orm/deployment-policy.js +1 -2
- package/dist/orm/discover.js +6 -8
- package/dist/orm/execute.d.ts +1 -1
- package/dist/orm/execute.js +5 -6
- package/dist/orm/failures.js +2 -2
- package/dist/orm/help.d.ts +1 -1
- package/dist/orm/help.js +5 -5
- package/dist/orm/history.js +1 -2
- package/dist/orm/operation-show.js +1 -2
- package/dist/orm/version-guard.d.ts +7 -2
- package/dist/orm/version-guard.js +12 -7
- package/dist/pipeline/codegen.js +2 -2
- package/dist/pipeline/commands.js +9 -7
- package/dist/pipeline/discovery.d.ts +1 -1
- package/dist/pipeline/discovery.js +2 -3
- package/dist/pipeline/help.d.ts +1 -1
- package/dist/pipeline/help.js +1 -1
- package/dist/pipeline/lifecycle.js +1 -1
- package/dist/pipeline/stage-secrets.js +4 -4
- package/dist/pipeline/templates.js +2 -2
- package/dist/pnpm-auto-update.js +3 -3
- package/dist/principals/commands.d.ts +1 -1
- package/dist/principals/commands.js +13 -14
- package/dist/process/commands.js +4 -1
- package/dist/process/run-steps.d.ts +2 -2
- package/dist/process/runs.js +1 -2
- package/dist/registry/commands.d.ts +4 -0
- package/dist/registry/commands.js +281 -0
- package/dist/registry/help.d.ts +8 -0
- package/dist/registry/help.js +64 -0
- package/dist/registry/lifecycle-commands.d.ts +3 -0
- package/dist/registry/lifecycle-commands.js +67 -0
- package/dist/registry/lookup.d.ts +6 -0
- package/dist/registry/lookup.js +18 -0
- package/dist/registry/runners.d.ts +14 -0
- package/dist/registry/runners.js +206 -0
- package/dist/registry/spec.d.ts +45 -0
- package/dist/registry/spec.js +8 -0
- package/dist/repos/commands.d.ts +1 -4
- package/dist/repos/commands.js +3 -21
- package/dist/repos/github-connect-command.d.ts +10 -1
- package/dist/repos/github-connect-command.js +52 -11
- package/dist/repos/github-init.d.ts +9 -2
- package/dist/repos/github-init.js +18 -2
- package/dist/repos/init-repo.js +1 -2
- package/dist/run-pinned.d.ts +48 -0
- package/dist/run-pinned.js +127 -0
- package/dist/sdk-source.d.ts +64 -0
- package/dist/sdk-source.js +199 -0
- package/dist/secrets/commands.d.ts +1 -1
- package/dist/secrets/commands.js +29 -24
- package/dist/service-accounts/commands.d.ts +1 -1
- package/dist/service-accounts/commands.js +4 -5
- package/dist/staged-env.d.ts +14 -0
- package/dist/staged-env.js +73 -0
- package/dist/storage/commands.js +21 -22
- package/dist/templates/catalog.d.ts +5 -5
- package/dist/templates/catalog.js +1 -1
- package/dist/update-check.js +3 -3
- package/dist/version-support.d.ts +39 -0
- package/dist/version-support.js +71 -0
- package/package.json +11 -10
- package/release-summary.json +4 -1
- package/dist/preview.d.ts +0 -90
- package/dist/preview.js +0 -292
package/dist/command-contract.js
CHANGED
|
@@ -1,36 +1,12 @@
|
|
|
1
|
-
/** Machine-readable summary of the CLI surface,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{ name: 'agents', description: 'Validate and deploy typed agent definitions', lifecycle: 'preview', access: 'mixed', subcommands: ['init', 'validate', 'bundle', 'plan', 'apply', 'list', 'show'] },
|
|
11
|
-
{ name: 'secrets', description: 'Manage organization-owned secrets', lifecycle: 'stable', access: 'authenticated', subcommands: ['create', 'set', 'list', 'attach', 'detach', 'apply'] },
|
|
12
|
-
{ name: 'repos', description: 'Manage repositories and native CI; ci init is offline', lifecycle: 'stable', access: 'mixed', subcommands: ['list', 'namespaces', 'show', 'identity', 'create', 'clone', 'attach-login', 'pull', 'pulls', 'delete', 'ci'] },
|
|
13
|
-
{ name: 'repo', description: 'Set up a GitHub repository and connect it to Atlas deploys', lifecycle: 'preview', access: 'mixed', subcommands: ['init', 'connect', 'bind', 'disconnect', 'status'] },
|
|
14
|
-
{ name: 'templates', description: 'Publish, synchronize, and list repository templates', lifecycle: 'internal', access: 'mixed', subcommands: ['publish', 'sync', 'list'] },
|
|
15
|
-
{ 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'] },
|
|
16
|
-
{ name: 'docs', description: 'Search and read the environment\'s developer documentation', lifecycle: 'preview', access: 'public', subcommands: ['search', 'read', 'list'] },
|
|
17
|
-
{ name: 'feedback', description: 'Submit agent feedback', lifecycle: 'preview', access: 'authenticated', subcommands: ['submit'] },
|
|
18
|
-
{ name: 'auth', description: 'Manage Git authentication', lifecycle: 'stable', access: 'authenticated', subcommands: ['whoami', 'git-credential', 'pat'] },
|
|
19
|
-
{ name: 'orm', description: 'Author and operate ORM namespaces', lifecycle: 'preview', access: 'mixed', subcommands: ['init', 'generate', 'validate', 'plan', 'apply', 'history', 'deployment-policy', 'execute', 'namespaces', 'describe', 'read', 'sql', 'diff', 'migrate-from-yaml', 'import'] },
|
|
20
|
-
{ name: 'envs', description: 'Manage CLI environments', lifecycle: 'stable', access: 'mixed', subcommands: ['add', 'list'] },
|
|
21
|
-
{ name: 'login', description: 'Authenticate with Sequence', lifecycle: 'stable', access: 'public', subcommands: [] },
|
|
22
|
-
{ name: 'logout', description: 'Remove cached user tokens', lifecycle: 'stable', access: 'public', subcommands: [] },
|
|
23
|
-
{ name: 'doctor', description: 'Diagnose CLI configuration and access', lifecycle: 'stable', access: 'mixed', subcommands: [] },
|
|
24
|
-
{ name: 'telemetry', description: 'Control authenticated command telemetry', lifecycle: 'preview', access: 'offline', subcommands: ['enable', 'disable', 'status'] },
|
|
25
|
-
{ name: 'updater', description: 'Control global pnpm CLI updates', lifecycle: 'preview', access: 'offline', subcommands: ['status', 'track'] },
|
|
26
|
-
{ name: 'version', description: 'Print the installed CLI version', lifecycle: 'stable', access: 'offline', subcommands: [] },
|
|
27
|
-
{ name: 'help', description: 'Show command help', lifecycle: 'stable', access: 'offline', subcommands: [] },
|
|
28
|
-
{ name: 'storage', description: 'Manage Workspaces V2 file storage', lifecycle: 'preview', access: 'authenticated', subcommands: ['init', 'validate', 'apply', 'list', 'show', 'mkdir', 'upload', 'import', 'uploads', 'reconcile', 'download', 'access', 'trash', 'restore', 'purge', 'operations', 'abort', 'delete'] },
|
|
29
|
-
{ name: 'access', description: 'Manage resource access on every primitive', lifecycle: 'preview', access: 'authenticated', subcommands: ['definitions', 'list', 'grant', 'revoke', 'resolve'] },
|
|
30
|
-
{ name: 'principals', description: 'Find principals and manage local groups', lifecycle: 'preview', access: 'authenticated', subcommands: ['search', 'users', 'groups'] },
|
|
31
|
-
{ name: 'service-accounts', description: 'Manage runtime service accounts', lifecycle: 'preview', access: 'authenticated', subcommands: ['list', 'show', 'create'] },
|
|
32
|
-
{ name: 'capabilities', description: 'Print the supported CLI command surface', lifecycle: 'blocked', access: 'offline', subcommands: [] },
|
|
33
|
-
];
|
|
1
|
+
/** Machine-readable summary of the CLI surface, derived from the command registry. */
|
|
2
|
+
import { COMMANDS } from './registry/commands.js';
|
|
3
|
+
export const COMMAND_CONTRACT = COMMANDS.map(({ name, description, lifecycle, access, subcommands }) => ({
|
|
4
|
+
name,
|
|
5
|
+
description,
|
|
6
|
+
lifecycle,
|
|
7
|
+
access,
|
|
8
|
+
subcommands: subcommands.filter(({ listed }) => listed !== false).map((sub) => sub.name),
|
|
9
|
+
}));
|
|
34
10
|
export function renderCapabilities({ json = false } = {}) {
|
|
35
11
|
const commands = COMMAND_CONTRACT.map(({ name, description, lifecycle, access, subcommands }) => ({
|
|
36
12
|
name,
|
package/dist/command-help.d.ts
CHANGED
|
@@ -3,15 +3,15 @@ export { PIPELINE_HELP } from './pipeline/help.js';
|
|
|
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_HISTORY_HELP = "usage:\n seq-studio orm history <namespace> -e <env> [--limit N] [--json]\n\n Lists every change to the namespace's live schema and operations, newest\n first: when, who, what moved, and the Git Service source. \"verified\" and \"ci\"\n sources were checked by Atlas against the repository; \"reported\" means Atlas\n could not tie the change to a pushed commit on a release branch, with the\n reason when one was claimed. \"break_glass\" is an admin override made with\n orm apply --unverified-source \"<reason>\". * marks the live activation.\n History starts with the first apply after the environment recorded it.\n";
|
|
5
5
|
export declare const ORM_DEPLOYMENT_POLICY_HELP = "usage:\n seq-studio orm deployment-policy <namespace> -e <env> [--json]\n seq-studio orm deployment-policy <namespace> -e <env> --mode ci --repo <ns>/<name> --branch <branch> --target <target-key>\n seq-studio orm deployment-policy <namespace> -e <env> --mode manual\n seq-studio orm deployment-policy <namespace> -e <env> --mode source --repo <ns>/<name> --branch <branch> --path <dir> [--source-env <env>]\n\n Existing namespaces default to manual deployment. CI mode rejects direct ORM\n registration, schema apply, and operations-only activation on the server;\n only the enrolled repository's verified merge deployment may activate changes.\n Enabling CI mode requires namespace Admin, repository Admin, and an existing\n automatic branch binding to this namespace. Restoring manual mode requires\n namespace Admin. This changes deployment policy; it does not deploy source.\n\n Source mode keeps direct applies but accepts only ones Atlas verifies came\n from that repository, branch and package directory (pass --path . for the\n repository root). It requires namespace Admin and repository Read. Namespace\n admins can still apply with --unverified-source \"<reason>\", which is recorded.\n --source-env names the environment whose Git Service holds the repository when\n it is not this one's (sign in there too); applies must then pass the same\n --source-env from a clean clone of that repository.\n";
|
|
6
|
-
export declare const ORM_HELP = "usage:\n seq-studio orm init <dir> [--repo <ns>/<name>]\n seq-studio orm
|
|
6
|
+
export declare const ORM_HELP = "usage:\n seq-studio orm init <dir> [--repo <ns>/<name>]\n seq-studio orm build [dir] [--migration-export] [--check]\n seq-studio orm validate [dir]\n seq-studio orm plan [dir] -e <env>\n seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait] [--unverified-source \"<reason>\"] [--source-env <env>]\n seq-studio orm history <namespace> -e <env> [--limit N] [--json]\n seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci|source] [--repo <ns>/<name> --branch <branch> (--target <target-key> | --path <dir> [--source-env <env>])] [--json]\n seq-studio orm run <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...\n seq-studio orm run <operation> [dir] --variables-file <file> -e <env>\n seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]\n seq-studio orm show <namespace> [<table> | --operations] -e <env> [--json]\n seq-studio orm operation show <namespace> <name> -e <env> [--json]\n seq-studio orm read <namespace> <table> -e <env> [--where <column>=<op>.<value>]... [--select <cols>] [--order <col>[.desc]] [--limit N] [--offset N] [--json|--jsonl]\n seq-studio orm sql <namespace> --query <sql> | --file <path> -e <env> [--param <name>[:<type>]=<value>]... | [--params <json-object>] [--json|--jsonl]\n seq-studio orm diff [dir] [--check] [--allow-destructive] [--rebase]\n seq-studio orm migrate-from-yaml <dir>\n seq-studio orm import [dir] --spec <file> | --table <table> --from <schema.table> --map <target=source,...>\n\n -e/--env is required for commands that contact Atlas. Use seq-studio envs list\n to discover environments and seq-studio login to authenticate.\n Schema commands require the ORM loaded by seq-studio to satisfy the v2\n namespace's package.json @sequenceholdings/orm range before compiling.\n apply waits until the new version is live and serving (default up to 20m), then\n prints \"live:\"; --no-wait returns once the apply is queued.\n CI-managed namespaces reject direct apply; use the enrolled repository's merge\n workflow. Source-pinned namespaces accept only applies Atlas verifies against\n their repository, branch and package path, and an environment can require a\n verified source for every apply. A namespace admin may record an audited\n exception with --unverified-source \"<reason>\". --source-env <env> applies from a\n clone of another environment's Git Service, which Atlas verifies there with your\n sign-in for it. deployment-policy reads or explicitly changes this namespace setting.\n namespaces lists what you can read; describe shows its tables and operations.\n Run seq-studio orm show --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 run --help for both forms.\n read and sql query a v2 namespace as you through its built-in read-only SQL.\n sql must name tables as <namespace>.<table> (FROM lending.loans, not FROM loans).\n Run seq-studio orm read --help for the filter grammar, parameters, and output formats.\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n";
|
|
7
7
|
/** Artifact commands in sandbox token mode; shared by the offline and delegate usage. */
|
|
8
|
-
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
|
|
9
|
-
export declare const ARTIFACT_HELP = "usage:\n seq-studio artifact init <dir> [--template react-vite|nextjs] [--repo <namespace>/<name>]\n seq-studio artifact whoami -e <env>\n seq-studio artifact link [dir] -e <env> [--project <id>]\n seq-studio artifact env list|use <env>\n seq-studio artifact status [-e <env>]\n seq-studio artifact list -e <env> [--json]\n seq-studio artifact show <slug-or-id> -e <env> [--json]\n seq-studio artifact validate [dir]\n seq-studio artifact build|plan|deploy [dir | --repo <namespace>/<name> | --git-url <url>] [--ref <ref>] -e <env>\n seq-studio artifact dev [dir] -e <env> [--once] [--key <name>] [--link <package-dir>] [--port <port>] [--secret-source local|hosted|none] [--local-secrets <bindings.json>] [--bundler turbopack|webpack]\n seq-studio artifact pull <project-id> -e <env> --out <dir>\n seq-studio artifact promote|rollback <deployment-id> -e <env>\n\n Help is available offline. Authenticate with seq-studio login. Build and deploy\n sources may be local, a platform git-service repo, or a public HTTPS Git URL;\n deployments target a named environment with -e. Local, preview, and official\n deployment workflows have different source and approval rules; see the public\n CLI README.\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n\n In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), build, plan\n and deploy take --repo: push the app to a Git Service repository and deploy\n from it. Atlas builds Next.js applications; static applications are bundled\n from the repository and must declare no package.json dependencies or\n optionalDependencies, because the sandbox cannot reach a package registry.\n dev, login, logout, --git-url
|
|
10
|
-
export declare const FUNCTIONS_USAGE = "usage:\n seq-studio
|
|
8
|
+
export declare const ARTIFACT_SANDBOX_HELP = " In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), build, plan\n and deploy take --repo: push the app to a Git Service repository and deploy\n from it. Atlas builds Next.js applications; static applications are bundled\n from the repository and must declare no package.json dependencies or\n optionalDependencies, because the sandbox cannot reach a package registry.\n dev, login, logout, --git-url and --source-env are unavailable there, and\n -e is ignored.\n";
|
|
9
|
+
export declare const ARTIFACT_HELP = "usage:\n seq-studio artifact init <dir> [--template react-vite|nextjs] [--repo <namespace>/<name>]\n seq-studio artifact whoami -e <env>\n seq-studio artifact link [dir] -e <env> [--project <id>]\n seq-studio artifact env list|use <env>\n seq-studio artifact status [-e <env>]\n seq-studio artifact list -e <env> [--json]\n seq-studio artifact show <slug-or-id> -e <env> [--json]\n seq-studio artifact validate [dir]\n seq-studio artifact build|plan|deploy [dir | --repo <namespace>/<name> | --git-url <url>] [--ref <ref>] -e <env>\n seq-studio artifact dev [dir] -e <env> [--once] [--key <name>] [--link <package-dir>] [--port <port>] [--secret-source local|hosted|none] [--local-secrets <bindings.json>] [--bundler turbopack|webpack]\n seq-studio artifact pull <project-id> -e <env> --out <dir>\n seq-studio artifact promote|rollback <deployment-id> -e <env>\n\n Help is available offline. Authenticate with seq-studio login. Build and deploy\n sources may be local, a platform git-service repo, or a public HTTPS Git URL;\n deployments target a named environment with -e. Local, preview, and official\n deployment workflows have different source and approval rules; see the public\n CLI README.\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n\n In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), build, plan\n and deploy take --repo: push the app to a Git Service repository and deploy\n from it. Atlas builds Next.js applications; static applications are bundled\n from the repository and must declare no package.json dependencies or\n optionalDependencies, because the sandbox cannot reach a package registry.\n dev, login, logout, --git-url and --source-env are unavailable there, and\n -e is ignored.\n";
|
|
10
|
+
export declare const FUNCTIONS_USAGE = "usage:\n seq-studio function 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 function build [--dir d] local pre-flight (manifest, lockfile, SDK timeout cap)\n seq-studio function register -e <env> [--dir d] register a shell + initial secret declarations; no deploy\n seq-studio function deploy -e <env> [-m msg] preflight, upload, then show version and lifecycle progress\n seq-studio function list -e <env> [--match-local] functions visible on the environment\n seq-studio function show -e <env> [--fn slug] detail for one function (input/output schemas, versions, secrets)\n [--schema] function identity plus input/output JSON Schemas, as JSON (any caller who can see it)\n [--json] [--version id|name] reader-gated release provenance\n seq-studio function limits [-e <env>] [--json] bundled defaults/caps, or deployed policy\n [--fn slug] also show effective runtime limits (requires -e)\n seq-studio function dev [--dir path] [--port 8080] local HTTP server with cache context\n seq-studio function run -e <env> [--data JSON | --data @file | --stdin]\n invoke a function and print its response\n seq-studio function logs -e <env> [--limit N] [--since t] function logs (reader-gated)\n seq-studio function promote <version> -e <env> [--fn <slug>]\n make a version live\n seq-studio function rollback [<version>] -e <env> [--fn <slug>]\n redeploy a prior version\n seq-studio function delete -e <env> [--fn <slug>] [--yes]\n archive function + tear down its runtime\n (version history is retained)\n\n Flags: -e/--env <env> (required for network commands; see: seq-studio envs list) \u00B7 --fn <slug> \u00B7 --dir <path>\n --fn selects a deployed function without a local manifest; otherwise the manifest in --dir (default .) supplies its slug\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 --adopt (deploy, local Atlas only) take over a function that a database fork copied from\n another runtime, so it deploys and runs here under its own slug. Refused unless\n the local Atlas runs on a personal development database branch. The runtime the\n function was copied from is not contacted or changed.\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";
|
|
11
11
|
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 a failed clone leaves no partial checkout\n seq-studio repos attach-login [dir] -e <env> [--remote origin] bind the login credential helper to an\n existing checkout (plain git clone, or\n after an upgrade moved seq-studio)\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|edit|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";
|
|
12
12
|
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";
|
|
13
|
-
export declare const ORM_DISCOVER_HELP = "usage:\n seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]\n seq-studio orm
|
|
14
|
-
export declare const ORM_EXECUTE_HELP = "usage:\n seq-studio orm
|
|
13
|
+
export declare const ORM_DISCOVER_HELP = "usage:\n seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]\n seq-studio orm show <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";
|
|
14
|
+
export declare const ORM_EXECUTE_HELP = "usage:\n seq-studio orm run <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...\n seq-studio orm run <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 show <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";
|
|
15
15
|
export declare function staticHelp({ namespace, sub }: {
|
|
16
16
|
namespace: string;
|
|
17
17
|
sub?: string;
|
package/dist/command-help.js
CHANGED
|
@@ -48,16 +48,16 @@ export const ORM_DEPLOYMENT_POLICY_HELP = `usage:
|
|
|
48
48
|
`;
|
|
49
49
|
export const ORM_HELP = `usage:
|
|
50
50
|
seq-studio orm init <dir> [--repo <ns>/<name>]
|
|
51
|
-
seq-studio orm
|
|
51
|
+
seq-studio orm build [dir] [--migration-export] [--check]
|
|
52
52
|
seq-studio orm validate [dir]
|
|
53
53
|
seq-studio orm plan [dir] -e <env>
|
|
54
54
|
seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait] [--unverified-source "<reason>"] [--source-env <env>]
|
|
55
55
|
seq-studio orm history <namespace> -e <env> [--limit N] [--json]
|
|
56
56
|
seq-studio orm deployment-policy <namespace> -e <env> [--mode manual|ci|source] [--repo <ns>/<name> --branch <branch> (--target <target-key> | --path <dir> [--source-env <env>])] [--json]
|
|
57
|
-
seq-studio orm
|
|
58
|
-
seq-studio orm
|
|
57
|
+
seq-studio orm run <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...
|
|
58
|
+
seq-studio orm run <operation> [dir] --variables-file <file> -e <env>
|
|
59
59
|
seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]
|
|
60
|
-
seq-studio orm
|
|
60
|
+
seq-studio orm show <namespace> [<table> | --operations] -e <env> [--json]
|
|
61
61
|
seq-studio orm operation show <namespace> <name> -e <env> [--json]
|
|
62
62
|
seq-studio orm read <namespace> <table> -e <env> [--where <column>=<op>.<value>]... [--select <cols>] [--order <col>[.desc]] [--limit N] [--offset N] [--json|--jsonl]
|
|
63
63
|
seq-studio orm sql <namespace> --query <sql> | --file <path> -e <env> [--param <name>[:<type>]=<value>]... | [--params <json-object>] [--json|--jsonl]
|
|
@@ -79,9 +79,9 @@ export const ORM_HELP = `usage:
|
|
|
79
79
|
clone of another environment's Git Service, which Atlas verifies there with your
|
|
80
80
|
sign-in for it. deployment-policy reads or explicitly changes this namespace setting.
|
|
81
81
|
namespaces lists what you can read; describe shows its tables and operations.
|
|
82
|
-
Run seq-studio orm
|
|
82
|
+
Run seq-studio orm show --help for the output.
|
|
83
83
|
execute <namespace> <operation> runs the deployed version's persisted operation by
|
|
84
|
-
name, with no checkout. Run seq-studio orm
|
|
84
|
+
name, with no checkout. Run seq-studio orm run --help for both forms.
|
|
85
85
|
read and sql query a v2 namespace as you through its built-in read-only SQL.
|
|
86
86
|
sql must name tables as <namespace>.<table> (FROM lending.loans, not FROM loans).
|
|
87
87
|
Run seq-studio orm read --help for the filter grammar, parameters, and output formats.
|
|
@@ -93,8 +93,8 @@ export const ARTIFACT_SANDBOX_HELP = ` In an agent sandbox (SEQ_STUDIO_BASE_URL
|
|
|
93
93
|
from it. Atlas builds Next.js applications; static applications are bundled
|
|
94
94
|
from the repository and must declare no package.json dependencies or
|
|
95
95
|
optionalDependencies, because the sandbox cannot reach a package registry.
|
|
96
|
-
dev, login, logout, --git-url
|
|
97
|
-
|
|
96
|
+
dev, login, logout, --git-url and --source-env are unavailable there, and
|
|
97
|
+
-e is ignored.
|
|
98
98
|
`;
|
|
99
99
|
export const ARTIFACT_HELP = `usage:
|
|
100
100
|
seq-studio artifact init <dir> [--template react-vite|nextjs] [--repo <namespace>/<name>]
|
|
@@ -119,36 +119,40 @@ export const ARTIFACT_HELP = `usage:
|
|
|
119
119
|
${INIT_INTO_REPO_HELP}
|
|
120
120
|
${ARTIFACT_SANDBOX_HELP}`;
|
|
121
121
|
export const FUNCTIONS_USAGE = `usage:
|
|
122
|
-
seq-studio
|
|
122
|
+
seq-studio function init <dir> [--repo <ns>/<name>] scaffold manifest, TypeScript handler, and docs pointers;
|
|
123
123
|
--repo scaffolds into a git-service repo (see Init into a repo)
|
|
124
|
-
seq-studio
|
|
125
|
-
seq-studio
|
|
126
|
-
seq-studio
|
|
127
|
-
seq-studio
|
|
128
|
-
seq-studio
|
|
124
|
+
seq-studio function build [--dir d] local pre-flight (manifest, lockfile, SDK timeout cap)
|
|
125
|
+
seq-studio function register -e <env> [--dir d] register a shell + initial secret declarations; no deploy
|
|
126
|
+
seq-studio function deploy -e <env> [-m msg] preflight, upload, then show version and lifecycle progress
|
|
127
|
+
seq-studio function list -e <env> [--match-local] functions visible on the environment
|
|
128
|
+
seq-studio function show -e <env> [--fn slug] detail for one function (input/output schemas, versions, secrets)
|
|
129
129
|
[--schema] function identity plus input/output JSON Schemas, as JSON (any caller who can see it)
|
|
130
130
|
[--json] [--version id|name] reader-gated release provenance
|
|
131
|
-
seq-studio
|
|
131
|
+
seq-studio function limits [-e <env>] [--json] bundled defaults/caps, or deployed policy
|
|
132
132
|
[--fn slug] also show effective runtime limits (requires -e)
|
|
133
|
-
seq-studio
|
|
134
|
-
seq-studio
|
|
133
|
+
seq-studio function dev [--dir path] [--port 8080] local HTTP server with cache context
|
|
134
|
+
seq-studio function run -e <env> [--data JSON | --data @file | --stdin]
|
|
135
135
|
invoke a function and print its response
|
|
136
|
-
seq-studio
|
|
137
|
-
seq-studio
|
|
136
|
+
seq-studio function logs -e <env> [--limit N] [--since t] function logs (reader-gated)
|
|
137
|
+
seq-studio function promote <version> -e <env> [--fn <slug>]
|
|
138
138
|
make a version live
|
|
139
|
-
seq-studio
|
|
139
|
+
seq-studio function rollback [<version>] -e <env> [--fn <slug>]
|
|
140
140
|
redeploy a prior version
|
|
141
|
-
seq-studio
|
|
141
|
+
seq-studio function delete -e <env> [--fn <slug>] [--yes]
|
|
142
142
|
archive function + tear down its runtime
|
|
143
143
|
(version history is retained)
|
|
144
144
|
|
|
145
|
-
Flags: -e/--env <env
|
|
145
|
+
Flags: -e/--env <env> (required for network commands; see: seq-studio envs list) · --fn <slug> · --dir <path>
|
|
146
146
|
--fn selects a deployed function without a local manifest; otherwise the manifest in --dir (default .) supplies its slug
|
|
147
147
|
--path <repo-subdirectory> (remote build/deploy only) select one function in a multi-function repo
|
|
148
148
|
--from-env-file <path> (default: .env) source file for secret values
|
|
149
149
|
--no-wait · --yes
|
|
150
150
|
--no-provision (deploy) update-only: error instead of registering a new
|
|
151
151
|
shell, writing secret values, or attaching secrets (CI sweep)
|
|
152
|
+
--adopt (deploy, local Atlas only) take over a function that a database fork copied from
|
|
153
|
+
another runtime, so it deploys and runs here under its own slug. Refused unless
|
|
154
|
+
the local Atlas runs on a personal development database branch. The runtime the
|
|
155
|
+
function was copied from is not contacted or changed.
|
|
152
156
|
|
|
153
157
|
Local Atlas builds and runs deployed functions on this computer, including teardown.
|
|
154
158
|
"functions dev" runs a standalone handler without Atlas registration.
|
|
@@ -269,7 +273,7 @@ export const PROCESS_RUNS_USAGE = `usage:
|
|
|
269
273
|
`;
|
|
270
274
|
export const ORM_DISCOVER_HELP = `usage:
|
|
271
275
|
seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]
|
|
272
|
-
seq-studio orm
|
|
276
|
+
seq-studio orm show <namespace> [<table> | --operations] -e <env> [--json]
|
|
273
277
|
seq-studio orm operation show <namespace> <name> -e <env> [--json]
|
|
274
278
|
|
|
275
279
|
Find the ORM data you can read, then query it with orm read or orm sql.
|
|
@@ -291,15 +295,15 @@ export const ORM_DISCOVER_HELP = `usage:
|
|
|
291
295
|
In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), -e is not needed.
|
|
292
296
|
`;
|
|
293
297
|
export const ORM_EXECUTE_HELP = `usage:
|
|
294
|
-
seq-studio orm
|
|
295
|
-
seq-studio orm
|
|
298
|
+
seq-studio orm run <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...
|
|
299
|
+
seq-studio orm run <operation> [dir] --variables-file <file> -e <env>
|
|
296
300
|
|
|
297
301
|
Run one persisted operation as you. The server applies the operation's
|
|
298
302
|
required capability or role and the namespace's row policies.
|
|
299
303
|
By name: execute <namespace> <operation> looks the operation up in the
|
|
300
304
|
namespace's deployed version and runs it. No checkout is needed, so it runs
|
|
301
305
|
what is deployed even when a local clone is behind. List what you can run:
|
|
302
|
-
seq-studio orm
|
|
306
|
+
seq-studio orm show <namespace> --operations
|
|
303
307
|
From a checkout: execute <operation> [dir] delegates to the installed ORM
|
|
304
308
|
package using the directory's operations.manifest.json (default dir: .).
|
|
305
309
|
Updated ORM packages validate the name and kind, then call the active named
|
|
@@ -335,7 +339,7 @@ export function staticHelp({ namespace, sub }) {
|
|
|
335
339
|
return ormHelp(sub);
|
|
336
340
|
if (namespace === 'pipeline')
|
|
337
341
|
return PIPELINE_HELP;
|
|
338
|
-
if (namespace === '
|
|
342
|
+
if (namespace === 'function')
|
|
339
343
|
return FUNCTIONS_USAGE;
|
|
340
344
|
if (namespace === 'repos' && sub !== 'pulls' && sub !== 'ci')
|
|
341
345
|
return REPOS_USAGE;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { cliConfigDir } from './config-dir.js';
|
|
1
2
|
import { randomUUID } from 'node:crypto';
|
|
2
3
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
|
-
import { homedir } from 'node:os';
|
|
4
4
|
import { dirname, join } from 'node:path';
|
|
5
5
|
import { currentVersion } from './update-check.js';
|
|
6
6
|
import { edgeAuthHeaders } from './edge-auth-headers.js';
|
|
7
|
-
const preferencePath = () => join(
|
|
7
|
+
const preferencePath = () => join(cliConfigDir(), 'telemetry.json');
|
|
8
8
|
const targets = new Map();
|
|
9
9
|
let active = false;
|
|
10
10
|
let terminalFailure;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function cliConfigDir(home?: string): string;
|
|
2
|
+
export declare function legacyConfigDir(home?: string): string;
|
|
3
|
+
/**
|
|
4
|
+
* Move `~/.config/lattice` to `~/.config/seq-studio` once. Best-effort: on any
|
|
5
|
+
* failure both paths are left as they were and the error is returned, so a
|
|
6
|
+
* read-only home never stops a command.
|
|
7
|
+
*/
|
|
8
|
+
export declare function migrateLegacyConfigDir(home?: string): Error | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where seq-studio keeps user configuration: `~/.config/seq-studio`.
|
|
3
|
+
*
|
|
4
|
+
* Earlier releases used `~/.config/lattice`. The first run moves that directory
|
|
5
|
+
* here and leaves a symlink at the old path, so tools that still read it (and
|
|
6
|
+
* older CLI versions pinned by a repository) see the same files.
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync, lstatSync, renameSync, symlinkSync } from 'node:fs';
|
|
9
|
+
import { homedir } from 'node:os';
|
|
10
|
+
import { join } from 'node:path';
|
|
11
|
+
export function cliConfigDir(home = homedir()) {
|
|
12
|
+
return join(home, '.config', 'seq-studio');
|
|
13
|
+
}
|
|
14
|
+
export function legacyConfigDir(home = homedir()) {
|
|
15
|
+
return join(home, '.config', 'lattice');
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Move `~/.config/lattice` to `~/.config/seq-studio` once. Best-effort: on any
|
|
19
|
+
* failure both paths are left as they were and the error is returned, so a
|
|
20
|
+
* read-only home never stops a command.
|
|
21
|
+
*/
|
|
22
|
+
export function migrateLegacyConfigDir(home = homedir()) {
|
|
23
|
+
const legacy = legacyConfigDir(home);
|
|
24
|
+
const current = cliConfigDir(home);
|
|
25
|
+
try {
|
|
26
|
+
if (existsSync(current) || !existsSync(legacy) || lstatSync(legacy).isSymbolicLink())
|
|
27
|
+
return null;
|
|
28
|
+
renameSync(legacy, current);
|
|
29
|
+
symlinkSync(current, legacy, 'dir');
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
return error instanceof Error ? error : new Error(String(error));
|
|
34
|
+
}
|
|
35
|
+
}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
* `--env preview:<branch-or-slug>` targets a per-PR Vercel preview deployment
|
|
3
|
-
* without a config.toml entry. The slug after the prefix is run through the
|
|
4
|
-
* canonical branch→slug transform (see `preview.ts`). PR-number resolution and
|
|
5
|
-
* the Cloudflare WAF bypass header live in `artifact/delegate.ts`.
|
|
6
|
-
*/
|
|
7
|
-
export declare const PREVIEW_ENV_PREFIX = "preview:";
|
|
1
|
+
import { type CliOrg, type OrgRegistry } from './orgs.js';
|
|
8
2
|
export declare const ENV_NAMES: string[];
|
|
9
3
|
export interface LatticeConfig {
|
|
10
4
|
envs: Record<string, {
|
|
11
5
|
url: string;
|
|
12
6
|
}>;
|
|
7
|
+
/** Orgs learned from deployments' discovery, for `-e <org>/<stage>`. */
|
|
8
|
+
orgs?: OrgRegistry;
|
|
9
|
+
/** The `org` of the repository the command runs in (`.seq/github.yml`). */
|
|
10
|
+
repoOrg?: string;
|
|
13
11
|
defaultEnv: string;
|
|
14
12
|
}
|
|
15
13
|
export declare function globalConfigDir(): string;
|
|
@@ -70,6 +68,7 @@ export declare function addSharedLoginEnvironment({ name, baseUrl: rawBaseUrl, f
|
|
|
70
68
|
name: string;
|
|
71
69
|
baseUrl: string;
|
|
72
70
|
changed: boolean;
|
|
71
|
+
cliOrg?: CliOrg;
|
|
73
72
|
}>;
|
|
74
73
|
/**
|
|
75
74
|
* Save `local:<name>` for an Atlas on a loopback port that is not a
|
package/dist/config.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { cliConfigDir } from './config-dir.js';
|
|
2
|
+
import { isStage, readOrgs, repositoryOrg } from './orgs.js';
|
|
3
|
+
import { knownOrgs, resolveStagedEnv } from './staged-env.js';
|
|
1
4
|
import { execFile } from 'node:child_process';
|
|
2
5
|
import { mkdir, readFile, readdir, writeFile } from 'node:fs/promises';
|
|
3
6
|
import { existsSync } from 'node:fs';
|
|
@@ -8,15 +11,7 @@ import { parse as parseToml, stringify as stringifyToml } from 'smol-toml';
|
|
|
8
11
|
import { validateDeploymentBaseUrl } from '@sequenceholdings/artifact-studio/deployment-validation';
|
|
9
12
|
import { isSequenceAuthEnvName, isSharedLoginDeploymentName, usesSharedSequenceLogin } from './auth.js';
|
|
10
13
|
import { fetchDeploymentLogin, readRegisteredEnvironmentUrls } from './env-registry.js';
|
|
11
|
-
import { resolvePreviewFromSlug } from './preview.js';
|
|
12
14
|
import { SANDBOX_ENV_NAME, sandboxTarget } from './sandbox-auth.js';
|
|
13
|
-
/**
|
|
14
|
-
* `--env preview:<branch-or-slug>` targets a per-PR Vercel preview deployment
|
|
15
|
-
* without a config.toml entry. The slug after the prefix is run through the
|
|
16
|
-
* canonical branch→slug transform (see `preview.ts`). PR-number resolution and
|
|
17
|
-
* the Cloudflare WAF bypass header live in `artifact/delegate.ts`.
|
|
18
|
-
*/
|
|
19
|
-
export const PREVIEW_ENV_PREFIX = 'preview:';
|
|
20
15
|
/**
|
|
21
16
|
* Only `local` ships in the published package. Every other environment is
|
|
22
17
|
* one the user configures: `seq-studio envs add <name> <url>` for an OpCo
|
|
@@ -92,7 +87,7 @@ async function worktreeEnvironmentUrls() {
|
|
|
92
87
|
return environments;
|
|
93
88
|
}
|
|
94
89
|
export function globalConfigDir() {
|
|
95
|
-
return
|
|
90
|
+
return cliConfigDir();
|
|
96
91
|
}
|
|
97
92
|
export function configPath() {
|
|
98
93
|
return join(globalConfigDir(), 'config.toml');
|
|
@@ -136,6 +131,10 @@ export async function readConfig() {
|
|
|
136
131
|
for (const [name, value] of Object.entries(registered)) {
|
|
137
132
|
merged.envs[name] = value;
|
|
138
133
|
}
|
|
134
|
+
merged.orgs = await readOrgs();
|
|
135
|
+
const repoOrg = await repositoryOrg();
|
|
136
|
+
if (repoOrg)
|
|
137
|
+
merged.repoOrg = repoOrg;
|
|
139
138
|
return merged;
|
|
140
139
|
}
|
|
141
140
|
export async function localAuthRealmOptions(envName) {
|
|
@@ -192,18 +191,18 @@ export function resolveEnv({ config, requested, }) {
|
|
|
192
191
|
if (sandbox)
|
|
193
192
|
return sandbox;
|
|
194
193
|
const name = requested ?? config.defaultEnv;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
return
|
|
198
|
-
}
|
|
194
|
+
const staged = resolveStagedEnv({ config, name });
|
|
195
|
+
if (staged)
|
|
196
|
+
return staged;
|
|
199
197
|
const env = config.envs[name];
|
|
200
198
|
if (!env) {
|
|
201
199
|
const known = Object.keys(config.envs).join(', ');
|
|
202
200
|
const addHint = isSequenceAuthEnvName(name) && !isSharedLoginDeploymentName(name)
|
|
203
201
|
? `add an [env.${name}] entry to ${configPath()}`
|
|
204
202
|
: `register the deployment with: seq-studio envs add ${name} <url>`;
|
|
203
|
+
const orgHint = isStage(name) ? ` For an org's ${name}, use -e <org>/${name} (known orgs: ${knownOrgs(config)}).` : '';
|
|
205
204
|
throw new Error(`Unknown env "${name}". Known envs: ${known}. ` +
|
|
206
|
-
`Pass --env <name>, set default_env in ${configPath()}, or ${addHint}`);
|
|
205
|
+
`Pass --env <name>, set default_env in ${configPath()}, or ${addHint}.${orgHint}`);
|
|
207
206
|
}
|
|
208
207
|
return { name, url: env.url };
|
|
209
208
|
}
|
|
@@ -227,7 +226,8 @@ export async function addSharedLoginEnvironment({ name, baseUrl: rawBaseUrl, fet
|
|
|
227
226
|
throw new Error(`'${name}' is reserved for a deployment on the shared Sequence login, and ${baseUrl} uses its own ` +
|
|
228
227
|
`login. Register it under another name: seq-studio envs add <name> ${baseUrl}`);
|
|
229
228
|
}
|
|
230
|
-
|
|
229
|
+
const added = await appendEnvTable({ name, baseUrl });
|
|
230
|
+
return login.cliOrg ? { ...added, cliOrg: login.cliOrg } : added;
|
|
231
231
|
}
|
|
232
232
|
/**
|
|
233
233
|
* Save `local:<name>` for an Atlas on a loopback port that is not a
|
package/dist/docs/commands.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `seq-studio docs`: read the target environment's published developer docs from the terminal, so an agent in any
|
|
3
3
|
* checkout (cloned, created or scaffolded) reaches the docs that match the deployment it builds against, through the
|
|
4
|
-
* same origin, edge credentials and login the rest of the CLI uses. The docs
|
|
5
|
-
*
|
|
4
|
+
* same origin, edge credentials and login the rest of the CLI uses. The docs are for signed-in users: the login is
|
|
5
|
+
* sent whenever one is cached or injected. Without one the request goes out anonymously, which an Atlas that still
|
|
6
|
+
* serves public docs answers and a current one refuses with 401, reported as a sign-in step.
|
|
6
7
|
*/
|
|
7
8
|
import { z } from 'zod';
|
|
8
9
|
import { AtlasApiError, getJson } from '../atlas-client.js';
|
|
@@ -10,6 +11,7 @@ import { fetchWithCliAttribution } from '../cli-attribution.js';
|
|
|
10
11
|
import { resolveConfiguredEnv } from '../config.js';
|
|
11
12
|
import { edgeAuthHeaders } from '../edge-auth-headers.js';
|
|
12
13
|
import { REQUIRE_EXPLICIT_ENV_MESSAGE } from '../env-flags.js';
|
|
14
|
+
import { ExitCode } from '../exit-codes.js';
|
|
13
15
|
import { requestedEnvironment } from '../functions/commands.js';
|
|
14
16
|
import { DOCS_HELP } from './help.js';
|
|
15
17
|
const SUBCOMMANDS = new Set(['search', 'read', 'list']);
|
|
@@ -29,7 +31,7 @@ const listResponseSchema = z.object({
|
|
|
29
31
|
}).loose();
|
|
30
32
|
class DocsUsageError extends Error {
|
|
31
33
|
}
|
|
32
|
-
/** Send the login when one is cached or injected; never start a browser login just to read
|
|
34
|
+
/** Send the login when one is cached or injected; never start a browser login just to read docs. */
|
|
33
35
|
async function docsRequester(env) {
|
|
34
36
|
const { getAccessTokenWithMode } = await import('../auth.js');
|
|
35
37
|
const token = await getAccessTokenWithMode({ env: env.name, targetUrl: env.url, allowInteractiveLogin: false })
|
|
@@ -127,7 +129,7 @@ export async function runDocsCommand(sub, args, client) {
|
|
|
127
129
|
console.error(docsErrorMessage({ error, sub }));
|
|
128
130
|
if (error instanceof DocsUsageError)
|
|
129
131
|
console.error(DOCS_HELP);
|
|
130
|
-
return 1;
|
|
132
|
+
return error instanceof AtlasApiError && error.status === 401 ? ExitCode.Auth : 1;
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
135
|
function docsPath({ sub, args }) {
|
|
@@ -156,6 +158,9 @@ function docsPath({ sub, args }) {
|
|
|
156
158
|
function docsErrorMessage({ error, sub }) {
|
|
157
159
|
if (error instanceof DocsUsageError)
|
|
158
160
|
return error.message;
|
|
161
|
+
if (error instanceof AtlasApiError && error.status === 401) {
|
|
162
|
+
return 'The Sequence docs are for signed-in users. Sign in with seq-studio login -e <env>, then run this again.';
|
|
163
|
+
}
|
|
159
164
|
if (error instanceof AtlasApiError && error.status === 404) {
|
|
160
165
|
return sub === 'read'
|
|
161
166
|
? 'Documentation page not found. Find a published slug with seq-studio docs search <query> or seq-studio docs list.'
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
import { PREVIEW_DOMAIN } from './preview.js';
|
|
2
1
|
const CF_ACCESS_DOMAIN = 'seqholdings.com';
|
|
3
|
-
function previewAccessHeaders(baseUrl) {
|
|
4
|
-
const secret = process.env.PREVIEW_ACCESS_HEADER?.trim();
|
|
5
|
-
if (!secret)
|
|
6
|
-
return {};
|
|
7
|
-
try {
|
|
8
|
-
const parsed = new URL(baseUrl);
|
|
9
|
-
if (parsed.protocol !== 'https:')
|
|
10
|
-
return {};
|
|
11
|
-
if (!parsed.hostname.toLowerCase().endsWith(`.${PREVIEW_DOMAIN}`))
|
|
12
|
-
return {};
|
|
13
|
-
return { 'x-preview-access': secret };
|
|
14
|
-
}
|
|
15
|
-
catch {
|
|
16
|
-
return {};
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
2
|
/** Only send Cloudflare credentials to HTTPS origins in the company domain. */
|
|
20
3
|
function cfAccessHeaders(baseUrl) {
|
|
21
4
|
const clientId = process.env.CF_ACCESS_CLIENT_ID?.trim();
|
|
@@ -36,5 +19,5 @@ function cfAccessHeaders(baseUrl) {
|
|
|
36
19
|
}
|
|
37
20
|
}
|
|
38
21
|
export function edgeAuthHeaders(baseUrl) {
|
|
39
|
-
return
|
|
22
|
+
return cfAccessHeaders(baseUrl);
|
|
40
23
|
}
|
package/dist/env-registry.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CliOrg } from './orgs.js';
|
|
1
2
|
interface DiscoveredRealm {
|
|
2
3
|
domain: string;
|
|
3
4
|
clientId: string;
|
|
@@ -8,12 +9,15 @@ interface DiscoveredRealm {
|
|
|
8
9
|
/** A deployment's public CLI login, and the CLI environment name it advertises for itself. */
|
|
9
10
|
interface DeploymentLogin extends DiscoveredRealm {
|
|
10
11
|
cliEnvironment?: string;
|
|
12
|
+
/** The deployment's org and stage, when it advertises them. */
|
|
13
|
+
cliOrg?: CliOrg;
|
|
11
14
|
}
|
|
12
15
|
interface RegistrationResult {
|
|
13
16
|
name: string;
|
|
14
17
|
baseUrl: string;
|
|
15
18
|
replacing: boolean;
|
|
16
19
|
realm: DiscoveredRealm;
|
|
20
|
+
cliOrg?: CliOrg;
|
|
17
21
|
}
|
|
18
22
|
export declare function seqapiConfigPath(): string;
|
|
19
23
|
/**
|