@sequenceholdings/studio-cli 0.9.22 → 0.9.24

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.
Files changed (133) hide show
  1. package/README.md +152 -144
  2. package/dist/access/commands.js +3 -5
  3. package/dist/access/principal.js +2 -2
  4. package/dist/access/tier-hosts.js +2 -2
  5. package/dist/agents/commands.d.ts +1 -1
  6. package/dist/agents/commands.js +9 -9
  7. package/dist/agents/scaffold.js +3 -3
  8. package/dist/agents/voice.d.ts +1 -1
  9. package/dist/agents/voice.js +1 -1
  10. package/dist/app/commands.d.ts +2 -2
  11. package/dist/app/commands.js +31 -21
  12. package/dist/app/deploy.d.ts +1 -1
  13. package/dist/app/deploy.js +1 -1
  14. package/dist/app/manifest.d.ts +9 -9
  15. package/dist/app/manifest.js +1 -1
  16. package/dist/app/prepare.js +1 -1
  17. package/dist/app/primitive-scaffold.js +1 -1
  18. package/dist/app/readme.js +6 -6
  19. package/dist/app/scaffold.js +1 -1
  20. package/dist/app/validate.d.ts +1 -1
  21. package/dist/app/workspace-scaffold.js +1 -1
  22. package/dist/artifact/delegate.d.ts +1 -1
  23. package/dist/artifact/delegate.js +43 -3
  24. package/dist/auth-cmds/commands.js +1 -2
  25. package/dist/bin.js +12 -2
  26. package/dist/cli-attribution.d.ts +4 -0
  27. package/dist/cli-attribution.js +25 -3
  28. package/dist/cli-errors.d.ts +9 -1
  29. package/dist/cli-errors.js +20 -9
  30. package/dist/command-contract.d.ts +7 -182
  31. package/dist/command-contract.js +9 -33
  32. package/dist/command-help.d.ts +4 -4
  33. package/dist/command-help.js +24 -24
  34. package/dist/command-telemetry.js +2 -2
  35. package/dist/config-dir.d.ts +8 -0
  36. package/dist/config-dir.js +35 -0
  37. package/dist/config.d.ts +6 -0
  38. package/dist/config.js +15 -3
  39. package/dist/docs/commands.js +9 -4
  40. package/dist/env-registry.d.ts +4 -0
  41. package/dist/env-registry.js +15 -6
  42. package/dist/envs/commands.d.ts +3 -0
  43. package/dist/envs/commands.js +11 -0
  44. package/dist/exit-codes.d.ts +16 -0
  45. package/dist/exit-codes.js +27 -0
  46. package/dist/functions/bundle.d.ts +1 -1
  47. package/dist/functions/commands.js +19 -18
  48. package/dist/functions/manifest.js +1 -1
  49. package/dist/functions/service-account-guidance.d.ts +1 -1
  50. package/dist/functions/service-account-guidance.js +2 -2
  51. package/dist/lifecycle/check.d.ts +13 -0
  52. package/dist/lifecycle/check.js +116 -0
  53. package/dist/lifecycle/commands.d.ts +14 -0
  54. package/dist/lifecycle/commands.js +121 -0
  55. package/dist/lifecycle/plan.d.ts +28 -0
  56. package/dist/lifecycle/plan.js +113 -0
  57. package/dist/lifecycle/rollback.d.ts +7 -0
  58. package/dist/lifecycle/rollback.js +89 -0
  59. package/dist/lifecycle/seq-ci-tools.d.ts +107 -0
  60. package/dist/lifecycle/seq-ci-tools.js +177 -0
  61. package/dist/lifecycle/upgrade.d.ts +3 -0
  62. package/dist/lifecycle/upgrade.js +38 -0
  63. package/dist/machine-output.d.ts +11 -2
  64. package/dist/machine-output.js +32 -10
  65. package/dist/main.d.ts +16 -6
  66. package/dist/main.js +187 -361
  67. package/dist/orgs.d.ts +45 -0
  68. package/dist/orgs.js +106 -0
  69. package/dist/orm/delegate.d.ts +1 -1
  70. package/dist/orm/delegate.js +32 -18
  71. package/dist/orm/deployment-policy.js +1 -2
  72. package/dist/orm/discover.js +6 -8
  73. package/dist/orm/execute.d.ts +1 -1
  74. package/dist/orm/execute.js +5 -6
  75. package/dist/orm/failures.js +2 -2
  76. package/dist/orm/help.d.ts +1 -1
  77. package/dist/orm/help.js +5 -5
  78. package/dist/orm/history.js +1 -2
  79. package/dist/orm/operation-show.js +1 -2
  80. package/dist/orm/version-guard.d.ts +7 -2
  81. package/dist/orm/version-guard.js +12 -7
  82. package/dist/pipeline/codegen.js +2 -2
  83. package/dist/pipeline/commands.js +9 -7
  84. package/dist/pipeline/discovery.d.ts +1 -1
  85. package/dist/pipeline/discovery.js +2 -3
  86. package/dist/pipeline/help.d.ts +1 -1
  87. package/dist/pipeline/help.js +1 -1
  88. package/dist/pipeline/lifecycle.js +1 -1
  89. package/dist/pipeline/stage-secrets.js +4 -4
  90. package/dist/pipeline/templates.js +2 -2
  91. package/dist/pnpm-auto-update.js +3 -3
  92. package/dist/preview.d.ts +1 -1
  93. package/dist/preview.js +1 -1
  94. package/dist/principals/commands.d.ts +1 -1
  95. package/dist/principals/commands.js +13 -14
  96. package/dist/process/commands.js +4 -1
  97. package/dist/process/run-steps.d.ts +2 -2
  98. package/dist/process/runs.js +1 -2
  99. package/dist/registry/commands.d.ts +4 -0
  100. package/dist/registry/commands.js +281 -0
  101. package/dist/registry/help.d.ts +8 -0
  102. package/dist/registry/help.js +64 -0
  103. package/dist/registry/lifecycle-commands.d.ts +3 -0
  104. package/dist/registry/lifecycle-commands.js +60 -0
  105. package/dist/registry/lookup.d.ts +6 -0
  106. package/dist/registry/lookup.js +18 -0
  107. package/dist/registry/runners.d.ts +14 -0
  108. package/dist/registry/runners.js +206 -0
  109. package/dist/registry/spec.d.ts +45 -0
  110. package/dist/registry/spec.js +8 -0
  111. package/dist/repos/commands.js +1 -2
  112. package/dist/repos/github-connect-command.d.ts +10 -1
  113. package/dist/repos/github-connect-command.js +52 -11
  114. package/dist/repos/github-init.d.ts +9 -2
  115. package/dist/repos/github-init.js +18 -2
  116. package/dist/repos/init-repo.js +1 -2
  117. package/dist/run-pinned.d.ts +48 -0
  118. package/dist/run-pinned.js +127 -0
  119. package/dist/sdk-source.d.ts +64 -0
  120. package/dist/sdk-source.js +199 -0
  121. package/dist/secrets/commands.d.ts +1 -1
  122. package/dist/secrets/commands.js +29 -24
  123. package/dist/service-accounts/commands.d.ts +1 -1
  124. package/dist/service-accounts/commands.js +4 -5
  125. package/dist/staged-env.d.ts +14 -0
  126. package/dist/staged-env.js +73 -0
  127. package/dist/storage/commands.js +21 -22
  128. package/dist/templates/catalog.d.ts +4 -4
  129. package/dist/update-check.js +3 -3
  130. package/dist/version-support.d.ts +39 -0
  131. package/dist/version-support.js +71 -0
  132. package/package.json +11 -10
  133. package/release-summary.json +3 -1
@@ -3,9 +3,9 @@ import { printCliError } from '../cli-errors.js';
3
3
  import { requiredStringFlag, validateCommandInput, wantsHelp } from '../command-input.js';
4
4
  import { buildContext, clientOptions } from '../functions/commands.js';
5
5
  export const SERVICE_ACCOUNTS_USAGE = `usage:
6
- seq-studio service-accounts list -e <env> [--json]
7
- seq-studio service-accounts show <account-id> -e <env> [--json]
8
- seq-studio service-accounts create <slug> --display-name <name> -e <env> [--description <text>] [--json]
6
+ seq-studio service-account list -e <env> [--json]
7
+ seq-studio service-account show <account-id> -e <env> [--json]
8
+ seq-studio service-account create <slug> --display-name <name> -e <env> [--description <text>] [--json]
9
9
 
10
10
  All results are JSON. Authenticate: seq-studio login --env <env>.
11
11
  Administrator provisioning: listing needs Service Accounts surface access;
@@ -56,7 +56,6 @@ export async function runServiceAccountsCommand(sub, args) {
56
56
  return 0;
57
57
  }
58
58
  catch (error) {
59
- printCliError(error);
60
- return 1;
59
+ return printCliError(error);
61
60
  }
62
61
  }
@@ -0,0 +1,14 @@
1
+ /** `-e <org>/<stage>` and bare-stage resolution; see docs/platform/seq-studio-cli-1.0.md §3. */
2
+ import type { LatticeConfig, ResolvedEnv } from './config.js';
3
+ export declare function knownOrgs(config: LatticeConfig): string;
4
+ /**
5
+ * `<org>/<stage>`, and a bare `staging` / `prod` inside a repository.
6
+ *
7
+ * Never retargets an existing name: a bare stage takes its org meaning only
8
+ * where it has no configured meaning, and a configured `staging` that belongs
9
+ * to another org than the repository's is refused rather than silently used.
10
+ */
11
+ export declare function resolveStagedEnv({ config, name }: {
12
+ config: LatticeConfig;
13
+ name: string;
14
+ }): ResolvedEnv | null;
@@ -0,0 +1,73 @@
1
+ import { UsageError } from './exit-codes.js';
2
+ import { isStage, orgOfUrl } from './orgs.js';
3
+ /**
4
+ * The configured environment serving `url`, so an org/stage target signs in with
5
+ * the same realm and cached tokens as that environment's own name.
6
+ */
7
+ function stagedTarget({ config, label, url }) {
8
+ const origin = new URL(url).origin;
9
+ const match = Object.entries(config.envs).find(([, env]) => {
10
+ try {
11
+ return new URL(env.url).origin === origin;
12
+ }
13
+ catch {
14
+ return false;
15
+ }
16
+ });
17
+ if (!match) {
18
+ throw new UsageError(`${label} is ${origin}, which is not a configured environment yet. ` +
19
+ `Add it once: seq-studio login ${origin}`);
20
+ }
21
+ return { name: match[0], url: match[1].url };
22
+ }
23
+ export function knownOrgs(config) {
24
+ const names = Object.keys(config.orgs ?? {});
25
+ return names.length > 0 ? names.join(', ') : 'none yet';
26
+ }
27
+ /** How to teach the CLI an org's deployments, with the URL its deployments usually have. */
28
+ function loginHint({ org, stage }) {
29
+ const host = stage === 'staging' ? `staging.${org}.seqholdings.com` : `${org}.seqholdings.com`;
30
+ return `Log in to one of its deployments once, for example: seq-studio login https://${host}`;
31
+ }
32
+ /**
33
+ * `<org>/<stage>`, and a bare `staging` / `prod` inside a repository.
34
+ *
35
+ * Never retargets an existing name: a bare stage takes its org meaning only
36
+ * where it has no configured meaning, and a configured `staging` that belongs
37
+ * to another org than the repository's is refused rather than silently used.
38
+ */
39
+ export function resolveStagedEnv({ config, name }) {
40
+ const orgs = config.orgs ?? {};
41
+ const slash = name.indexOf('/');
42
+ if (slash > 0) {
43
+ const org = name.slice(0, slash);
44
+ const stage = name.slice(slash + 1);
45
+ if (!isStage(stage))
46
+ throw new UsageError(`Unknown stage "${stage}" in -e ${name}: use ${org}/staging or ${org}/prod.`);
47
+ const url = orgs[org]?.[stage];
48
+ if (!url) {
49
+ throw new UsageError(`No ${stage} deployment known for org "${org}" (known orgs: ${knownOrgs(config)}). ${loginHint({ org, stage })}`);
50
+ }
51
+ return stagedTarget({ config, label: name, url });
52
+ }
53
+ if (!isStage(name))
54
+ return null;
55
+ const configured = config.envs[name];
56
+ const repoOrg = config.repoOrg;
57
+ if (configured) {
58
+ const owner = orgOfUrl(orgs, configured.url);
59
+ if (repoOrg && owner && owner.org !== repoOrg) {
60
+ throw new UsageError(`-e ${name} is ambiguous in this ${repoOrg} repository: it has always meant ${owner.org}/${owner.stage} (${configured.url}). ` +
61
+ `Use -e ${owner.org}/${owner.stage} for that, or -e ${repoOrg}/${name} for this repository's org.`);
62
+ }
63
+ return null;
64
+ }
65
+ // Outside a repository a bare stage keeps its old behavior, including its old error.
66
+ if (!repoOrg)
67
+ return null;
68
+ const url = orgs[repoOrg]?.[name];
69
+ if (!url) {
70
+ throw new UsageError(`No ${name} deployment known for org "${repoOrg}" (from .seq/github.yml). ${loginHint({ org: repoOrg, stage: name })}`);
71
+ }
72
+ return stagedTarget({ config, label: `${repoOrg}/${name}`, url });
73
+ }
@@ -14,26 +14,26 @@ import { runStorageImport } from './import-run.js';
14
14
  import { REQUIRE_EXPLICIT_ENV_MESSAGE, explicitOrSandboxEnv } from '../env-flags.js';
15
15
  import { writeScaffoldGuidance } from '../scaffold-guidance.js';
16
16
  const usage = `usage:
17
- seq-studio storage init <workspace-name> [--out workspace.yml]
18
- seq-studio storage validate [workspace.yml]
19
- seq-studio storage apply [workspace.yml] -e <env>
20
- seq-studio storage list -e <env> [--workspace <id>] [--parent <id>] [--trash] [--cursor <cursor>]
21
- seq-studio storage show --workspace <id> [--node <id>] -e <env>
22
- seq-studio storage mkdir <name> --workspace <id> [--parent <id>] -e <env>
23
- seq-studio storage upload <file> --workspace <id> [--path <path>] [--parent <id>] [--replace <file-id> --revision <n>] [--resume <upload-id>] -e <env>
24
- seq-studio storage import <directory|gs://bucket/prefix> --workspace <id> [--path <prefix>] [--parent <id>] [--concurrency <n>] [--progress <file>] [--yes] -e <env>
25
- seq-studio storage uploads --workspace <id> -e <env>
26
- seq-studio storage reconcile --workspace <id> [--abort-incomplete] -e <env>
27
- seq-studio storage download --workspace <id> --node <id> --out <file> [--version <id>] -e <env>
28
- seq-studio storage trash|restore|purge --workspace <id> --node <id> --revision <n> [-e <env>] [--yes]
29
- seq-studio storage access --workspace <id> [--node <id>] [--file <access.json>] -e <env>
30
- seq-studio storage operations --workspace <id> [--retry <operation-id>] -e <env>
31
- seq-studio storage abort --workspace <id> --upload <id> -e <env>
32
- seq-studio storage source show|apply --workspace <id> [--target <id>] [--readers <principal-ids>] [--auto-sync true|false] -e <env>
33
- seq-studio storage sync --workspace <id> [--idempotency-key <key>] [--wait] -e <env>
34
- seq-studio storage sync status|retry|cancel <sync-id> --workspace <id> -e <env>
35
- seq-studio storage snapshots [list|show <snapshot-id>] --workspace <id> [--cursor <cursor>] -e <env>
36
- seq-studio storage delete --workspace <id> --revision <n> --yes -e <env>
17
+ seq-studio workspace init <workspace-name> [--out workspace.yml]
18
+ seq-studio workspace validate [workspace.yml]
19
+ seq-studio workspace apply [workspace.yml] -e <env>
20
+ seq-studio workspace list -e <env> [--workspace <id>] [--parent <id>] [--trash] [--cursor <cursor>]
21
+ seq-studio workspace show --workspace <id> [--node <id>] -e <env>
22
+ seq-studio workspace mkdir <name> --workspace <id> [--parent <id>] -e <env>
23
+ seq-studio workspace upload <file> --workspace <id> [--path <path>] [--parent <id>] [--replace <file-id> --revision <n>] [--resume <upload-id>] -e <env>
24
+ seq-studio workspace import <directory|gs://bucket/prefix> --workspace <id> [--path <prefix>] [--parent <id>] [--concurrency <n>] [--progress <file>] [--yes] -e <env>
25
+ seq-studio workspace uploads --workspace <id> -e <env>
26
+ seq-studio workspace reconcile --workspace <id> [--abort-incomplete] -e <env>
27
+ seq-studio workspace download --workspace <id> --node <id> --out <file> [--version <id>] -e <env>
28
+ seq-studio workspace trash|restore|purge --workspace <id> --node <id> --revision <n> [-e <env>] [--yes]
29
+ seq-studio workspace access --workspace <id> [--node <id>] [--file <access.json>] -e <env>
30
+ seq-studio workspace operations --workspace <id> [--retry <operation-id>] -e <env>
31
+ seq-studio workspace abort --workspace <id> --upload <id> -e <env>
32
+ seq-studio workspace source show|apply --workspace <id> [--target <id>] [--readers <principal-ids>] [--auto-sync true|false] -e <env>
33
+ seq-studio workspace sync --workspace <id> [--idempotency-key <key>] [--wait] -e <env>
34
+ seq-studio workspace sync status|retry|cancel <sync-id> --workspace <id> -e <env>
35
+ seq-studio workspace snapshots [list|show <snapshot-id>] --workspace <id> [--cursor <cursor>] -e <env>
36
+ seq-studio workspace delete --workspace <id> --revision <n> --yes -e <env>
37
37
 
38
38
  Workspaces are provisioned from YAML; paths create folders at upload time.
39
39
  Uploads print their session ID to stderr for retry. Resume uses the same original file.
@@ -309,7 +309,6 @@ export async function runStorageCommand(sub, args) {
309
309
  return 0;
310
310
  }
311
311
  catch (error) {
312
- printCliError(error);
313
- return 1;
312
+ return printCliError(error);
314
313
  }
315
314
  }
@@ -9,10 +9,10 @@ export declare const templateMetadataSchema: z.ZodObject<{
9
9
  description: z.ZodString;
10
10
  includes: z.ZodArray<z.ZodEnum<{
11
11
  function: "function";
12
- process: "process";
13
12
  artifact: "artifact";
14
- pipeline: "pipeline";
15
13
  orm: "orm";
14
+ pipeline: "pipeline";
15
+ process: "process";
16
16
  agent: "agent";
17
17
  workspace: "workspace";
18
18
  }>>;
@@ -24,10 +24,10 @@ export declare const templateReleaseSchema: z.ZodObject<{
24
24
  description: z.ZodString;
25
25
  includes: z.ZodArray<z.ZodEnum<{
26
26
  function: "function";
27
- process: "process";
28
27
  artifact: "artifact";
29
- pipeline: "pipeline";
30
28
  orm: "orm";
29
+ pipeline: "pipeline";
30
+ process: "process";
31
31
  agent: "agent";
32
32
  workspace: "workspace";
33
33
  }>>;
@@ -1,8 +1,8 @@
1
+ import { cliConfigDir } from './config-dir.js';
1
2
  import { spawn } from 'node:child_process';
2
3
  import { createHash } from 'node:crypto';
3
4
  import { mkdir, readFile, rename, rm, stat, writeFile } from 'node:fs/promises';
4
5
  import { readFileSync } from 'node:fs';
5
- import { homedir } from 'node:os';
6
6
  import { dirname, join } from 'node:path';
7
7
  import { fileURLToPath } from 'node:url';
8
8
  import { gt, valid } from 'semver';
@@ -10,7 +10,7 @@ import { gt, valid } from 'semver';
10
10
  * Update discovery: tell CLI users and agents when a newer version is on npm.
11
11
  *
12
12
  * Zero foreground network latency is the design constraint. The command path
13
- * reads the on-disk cache (~/.config/lattice/update-check.json) and prints;
13
+ * reads the on-disk cache (~/.config/seq-studio/update-check.json) and prints;
14
14
  * the registry poll and eligible global pnpm upgrade run in a detached process spawned
15
15
  * at most once per CHECK_INTERVAL_MS — including after failures, which
16
16
  * record their attempt time so a downed registry doesn't retry on every
@@ -41,7 +41,7 @@ export function updateCheckCachePath(installationFile = fileURLToPath(import.met
41
41
  // A project-pinned CLI must not consume the global installation's daily
42
42
  // check. pnpm versions live at distinct real paths, so hash the package path.
43
43
  const installation = createHash('sha256').update(dirname(installationFile)).digest('hex').slice(0, 16);
44
- return join(homedir(), '.config', 'lattice', `update-check-${installation}.json`);
44
+ return join(cliConfigDir(), `update-check-${installation}.json`);
45
45
  }
46
46
  /** Exclusive-create marker that makes "who spawns the refresh?" atomic. */
47
47
  export function updateCheckClaimPath() {
@@ -0,0 +1,39 @@
1
+ export declare const SUPPORTED_HEADER = "x-seq-studio-supported";
2
+ /** SemVer precedence: numeric prerelease identifiers compare as numbers (rc.10 > rc.2). */
3
+ export declare function compareVersions(a: string, b: string): number;
4
+ export interface SupportedRange {
5
+ min: string;
6
+ deprecatedBelow: string;
7
+ }
8
+ export declare function parseSupportedHeader(value: string | null): SupportedRange | null;
9
+ export declare class UnsupportedCliError extends Error {
10
+ name: string;
11
+ }
12
+ export type Support = {
13
+ kind: 'ok';
14
+ } | {
15
+ kind: 'deprecated';
16
+ range: SupportedRange;
17
+ } | {
18
+ kind: 'unsupported';
19
+ range: SupportedRange;
20
+ };
21
+ export declare function supportFor({ installed, range }: {
22
+ installed: string;
23
+ range: SupportedRange | null;
24
+ }): Support;
25
+ /**
26
+ * Apply an Atlas response's supported range: throw below the minimum, warn once
27
+ * below the deprecation floor. Responses without the header are left alone.
28
+ */
29
+ export declare function enforceSupportedVersion(response: Response, installed?: string): void;
30
+ /** A note when the running CLI is not the repository's pinned `<major>.<minor>`, else null. */
31
+ export declare function pinNote({ pin, installed }: {
32
+ pin: string | undefined;
33
+ installed?: string;
34
+ }): string | null;
35
+ /** One doctor line: the repository's pin against the running CLI. */
36
+ export declare function pinStatusLine({ pin, installed }: {
37
+ pin: string | undefined;
38
+ installed?: string;
39
+ }): string;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Which seq-studio a request may use (spec §5).
3
+ *
4
+ * Atlas sends `x-seq-studio-supported: min=<v>; deprecated-below=<v>` on API
5
+ * responses. Below `deprecated-below` the CLI warns once; below `min` it refuses,
6
+ * naming the upgrade. A repository pins `cli: <major>.<minor>` in
7
+ * `.seq/github.yml`; running another minor prints how to run the pinned one.
8
+ */
9
+ import { compare, valid } from 'semver';
10
+ import { currentVersion } from './update-check.js';
11
+ export const SUPPORTED_HEADER = 'x-seq-studio-supported';
12
+ const UPGRADE = 'pnpm add -g @sequenceholdings/studio-cli@latest';
13
+ /** SemVer precedence: numeric prerelease identifiers compare as numbers (rc.10 > rc.2). */
14
+ export function compareVersions(a, b) {
15
+ return compare(a, b);
16
+ }
17
+ const VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
18
+ export function parseSupportedHeader(value) {
19
+ if (!value)
20
+ return null;
21
+ const fields = new Map(value.split(';').map((part) => part.trim().split('=', 2)));
22
+ const min = fields.get('min');
23
+ const deprecatedBelow = fields.get('deprecated-below');
24
+ if (!min || !deprecatedBelow || !VERSION.test(min) || !VERSION.test(deprecatedBelow))
25
+ return null;
26
+ return { min, deprecatedBelow };
27
+ }
28
+ export class UnsupportedCliError extends Error {
29
+ name = 'UnsupportedCliError';
30
+ }
31
+ export function supportFor({ installed, range }) {
32
+ // A development build without a release version is never refused.
33
+ if (!range || !valid(installed))
34
+ return { kind: 'ok' };
35
+ if (compareVersions(installed, range.min) < 0)
36
+ return { kind: 'unsupported', range };
37
+ if (compareVersions(installed, range.deprecatedBelow) < 0)
38
+ return { kind: 'deprecated', range };
39
+ return { kind: 'ok' };
40
+ }
41
+ let warned = false;
42
+ /**
43
+ * Apply an Atlas response's supported range: throw below the minimum, warn once
44
+ * below the deprecation floor. Responses without the header are left alone.
45
+ */
46
+ export function enforceSupportedVersion(response, installed = currentVersion()) {
47
+ const support = supportFor({ installed, range: parseSupportedHeader(response.headers.get(SUPPORTED_HEADER)) });
48
+ if (support.kind === 'unsupported') {
49
+ throw new UnsupportedCliError(`seq-studio ${installed} is older than this Atlas supports (minimum ${support.range.min}). Upgrade: ${UPGRADE}`);
50
+ }
51
+ if (support.kind === 'deprecated' && !warned) {
52
+ warned = true;
53
+ console.error(`note: seq-studio ${installed} is deprecated on this Atlas; ${support.range.deprecatedBelow} or newer is supported. Upgrade: ${UPGRADE}`);
54
+ }
55
+ }
56
+ /** A note when the running CLI is not the repository's pinned `<major>.<minor>`, else null. */
57
+ export function pinNote({ pin, installed = currentVersion() }) {
58
+ if (!pin)
59
+ return null;
60
+ const running = installed.split('.').slice(0, 2).join('.');
61
+ if (running === pin)
62
+ return null;
63
+ return `note: this repository pins seq-studio ${pin}; this is ${installed}. ` +
64
+ `Run the pinned one with: pnpm dlx @sequenceholdings/studio-cli@${pin} <command> (or set SEQ_STUDIO_USE_PIN=1 to always), or move the pin: seq-studio upgrade`;
65
+ }
66
+ /** One doctor line: the repository's pin against the running CLI. */
67
+ export function pinStatusLine({ pin, installed = currentVersion() }) {
68
+ if (!pin)
69
+ return `cli pin: none (running ${installed}; seq-studio upgrade pins it)`;
70
+ return pinNote({ pin, installed }) ? `cli pin: MISMATCH — repository pins ${pin}, running ${installed}` : `cli pin: ok — ${pin} (running ${installed})`;
71
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequenceholdings/studio-cli",
3
- "version": "0.9.22",
3
+ "version": "0.9.24",
4
4
  "description": "Unified Sequence Studio CLI — `seq-studio init` / `add` / `deploy` (app monorepos), `seq-studio agents`, `seq-studio process` (Lattice), `seq-studio artifact`, `seq-studio functions` / `secrets`, `seq-studio repos`, and `seq-studio auth whoami`. Includes Auth0 browser login shared with seqapi.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -45,16 +45,16 @@
45
45
  "tsx": "^4.20.3",
46
46
  "yaml": "^2.8.4",
47
47
  "zod": "4.6.6",
48
- "@sequenceholdings/artifact-studio": "0.11.19",
49
48
  "@sequenceholdings/lattice": "0.1.9",
50
- "@sequenceholdings/managed-functions": "0.5.13",
49
+ "@sequenceholdings/managed-functions": "0.5.14",
50
+ "@sequenceholdings/agent-spec": "0.1.6",
51
+ "@sequenceholdings/artifact-studio": "0.11.21",
51
52
  "@sequenceholdings/storage": "0.1.8",
52
- "@sequenceholdings/platform": "0.1.5",
53
- "@sequenceholdings/agent-spec": "0.1.6"
53
+ "@sequenceholdings/platform": "0.1.5"
54
54
  },
55
55
  "peerDependencies": {
56
- "@sequenceholdings/orm": "2.11.0",
57
- "@sequenceholdings/pipeline-spec": "0.3.12"
56
+ "@sequenceholdings/orm": "2.11.1",
57
+ "@sequenceholdings/pipeline-spec": "0.3.13"
58
58
  },
59
59
  "peerDependenciesMeta": {
60
60
  "@sequenceholdings/orm": {
@@ -70,8 +70,8 @@
70
70
  "@types/semver": "^7.8.0",
71
71
  "typescript": "^5.6.0",
72
72
  "vitest": "^4.1.12",
73
- "@sequenceholdings/orm": "2.11.0",
74
- "@sequenceholdings/pipeline-spec": "0.3.12"
73
+ "@sequenceholdings/orm": "2.11.1",
74
+ "@sequenceholdings/pipeline-spec": "0.3.13"
75
75
  },
76
76
  "engines": {
77
77
  "node": ">=20"
@@ -90,6 +90,7 @@
90
90
  "type-check": "tsc --noEmit",
91
91
  "test": "vitest run",
92
92
  "test:watch": "vitest",
93
- "test:git-login": "pnpm run build && node scripts/test-git-login.mjs"
93
+ "test:git-login": "pnpm run build && node scripts/test-git-login.mjs",
94
+ "compat-check": "node scripts/cli-compat-check.mjs"
94
95
  }
95
96
  }
@@ -5,5 +5,7 @@
5
5
  "0.9.19": "Next.js artifact manifests can name secrets without a version (and in another org with secret_org), name a service account by slug, and key storage by workspace name, so one manifest deploys to every environment.",
6
6
  "0.9.20": "Lattice date forms now use DatePicker instead of the browser's native date popup.",
7
7
  "0.9.21": "New seq-studio docs search|read|list; repos clone adds agent docs guidance. Clones roll back on failure; new repos attach-login. Devbox sign-in no longer uses a shared identity. Browser login fails fast without a terminal. envs add accepts local:<name>. init and deploy flag lockfiles CI can't use.",
8
- "0.9.22": "New init --github <owner>/<name> --org <org> starts an app in its own new private GitHub repository. repos pulls create and edit take --type (bug, performance, enhancement, feature, chore); a Pull needs one to merge. repo init adds a required pr-type check."
8
+ "0.9.22": "New init --github <owner>/<name> --org <org> starts an app in its own new private GitHub repository. repos pulls create and edit take --type (bug, performance, enhancement, feature, chore); a Pull needs one to merge. repo init adds a required pr-type check.",
9
+ "0.9.23": "ORM plans now accept retained table and column rename hints when previewing a fresh schema. Includes ORM 2.11.1 and updated dependent packages; incremental migrations retain rename-source validation.",
10
+ "0.9.24": "Artifact builds now use Atlas UI 4.0.0 and its DatePicker and DateRangePicker controls. Legacy public date field exports are removed."
9
11
  }