@sequenceholdings/studio-cli 0.2.2 → 0.4.1

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 (128) hide show
  1. package/README.md +616 -78
  2. package/dist/access/commands.d.ts +3 -0
  3. package/dist/access/commands.js +91 -0
  4. package/dist/agents/commands.d.ts +1 -1
  5. package/dist/agents/commands.js +5 -0
  6. package/dist/agents/scaffold.js +5 -7
  7. package/dist/agents/voice-authoring.d.ts +5 -0
  8. package/dist/agents/voice-authoring.js +75 -0
  9. package/dist/agents/voice-publication.d.ts +5 -0
  10. package/dist/agents/voice-publication.js +63 -0
  11. package/dist/agents/voice-shared.d.ts +20 -0
  12. package/dist/agents/voice-shared.js +112 -0
  13. package/dist/agents/voice.d.ts +3 -0
  14. package/dist/agents/voice.js +57 -0
  15. package/dist/app/adapters.d.ts +6 -0
  16. package/dist/app/adapters.js +17 -2
  17. package/dist/app/agent-refs.d.ts +16 -0
  18. package/dist/app/agent-refs.js +36 -0
  19. package/dist/app/application-registration.d.ts +36 -6
  20. package/dist/app/application-registration.js +60 -15
  21. package/dist/app/commands.js +19 -2
  22. package/dist/app/deploy.d.ts +3 -0
  23. package/dist/app/deploy.js +22 -6
  24. package/dist/app/env-bindings.d.ts +21 -0
  25. package/dist/app/env-bindings.js +184 -0
  26. package/dist/app/manifest-validation.js +8 -0
  27. package/dist/app/manifest.d.ts +32 -14
  28. package/dist/app/manifest.js +16 -6
  29. package/dist/app/primitive-scaffold.d.ts +4 -1
  30. package/dist/app/primitive-scaffold.js +4 -4
  31. package/dist/app/readme.js +1 -0
  32. package/dist/app/scaffold-files.js +1 -1
  33. package/dist/app/scaffold.d.ts +6 -4
  34. package/dist/app/scaffold.js +7 -4
  35. package/dist/app/workspace-scaffold.js +12 -7
  36. package/dist/argv.d.ts +7 -0
  37. package/dist/argv.js +56 -0
  38. package/dist/artifact/delegate.js +8 -4
  39. package/dist/atlas-client.d.ts +6 -0
  40. package/dist/atlas-client.js +39 -2
  41. package/dist/auth-cmds/commands.d.ts +1 -1
  42. package/dist/auth-cmds/commands.js +16 -0
  43. package/dist/auth.d.ts +32 -0
  44. package/dist/auth.js +170 -33
  45. package/dist/bin.js +23 -4
  46. package/dist/command-contract.d.ts +137 -0
  47. package/dist/command-contract.js +43 -0
  48. package/dist/command-help.d.ts +8 -0
  49. package/dist/command-help.js +71 -0
  50. package/dist/command-input.d.ts +15 -0
  51. package/dist/command-input.js +33 -0
  52. package/dist/functions/commands.d.ts +2 -1
  53. package/dist/functions/commands.js +78 -33
  54. package/dist/functions/deploy-preflight.d.ts +21 -0
  55. package/dist/functions/deploy-preflight.js +58 -0
  56. package/dist/functions/egress-postgres.d.ts +7 -0
  57. package/dist/functions/egress-postgres.js +36 -0
  58. package/dist/functions/manifest.d.ts +15 -1
  59. package/dist/functions/manifest.js +49 -12
  60. package/dist/functions/secret-reconcile.d.ts +3 -3
  61. package/dist/functions/secret-reconcile.js +5 -7
  62. package/dist/functions/source-selection.js +4 -1
  63. package/dist/main.d.ts +2 -0
  64. package/dist/main.js +75 -25
  65. package/dist/manifest-roles-notice.d.ts +33 -0
  66. package/dist/manifest-roles-notice.js +75 -0
  67. package/dist/orm/delegate.d.ts +16 -0
  68. package/dist/orm/delegate.js +142 -7
  69. package/dist/pipeline/clone-deploy.d.ts +37 -0
  70. package/dist/pipeline/clone-deploy.js +125 -0
  71. package/dist/pipeline/codegen.js +6 -2
  72. package/dist/pipeline/commands.js +21 -5
  73. package/dist/pipeline/lifecycle.d.ts +1 -0
  74. package/dist/pipeline/lifecycle.js +95 -44
  75. package/dist/pipeline/repin-orm.js +6 -2
  76. package/dist/pipeline/stage-secrets.d.ts +4 -1
  77. package/dist/pipeline/stage-secrets.js +7 -3
  78. package/dist/process/build.js +17 -0
  79. package/dist/process/codegen.js +16 -0
  80. package/dist/process/commands.d.ts +15 -7
  81. package/dist/process/commands.js +294 -98
  82. package/dist/process/lint.js +35 -0
  83. package/dist/process/plan-diff.js +9 -0
  84. package/dist/process/simulate.js +8 -0
  85. package/dist/release-age.d.ts +12 -0
  86. package/dist/release-age.js +24 -0
  87. package/dist/repos/commands.d.ts +10 -1
  88. package/dist/repos/commands.js +42 -8
  89. package/dist/repos/pulls.d.ts +3 -0
  90. package/dist/repos/pulls.js +131 -0
  91. package/dist/scaffold-guidance.d.ts +4 -0
  92. package/dist/scaffold-guidance.js +15 -0
  93. package/dist/secrets/commands.d.ts +1 -1
  94. package/dist/secrets/commands.js +97 -16
  95. package/dist/service-accounts/commands.d.ts +3 -0
  96. package/dist/service-accounts/commands.js +50 -0
  97. package/dist/storage/commands.js +23 -1
  98. package/dist/storage/gcs-download.d.ts +13 -0
  99. package/dist/storage/gcs-download.js +41 -0
  100. package/dist/storage/import-cycle.d.ts +41 -0
  101. package/dist/storage/import-cycle.js +123 -0
  102. package/dist/storage/import-files.d.ts +30 -0
  103. package/dist/storage/import-files.js +133 -0
  104. package/dist/storage/import-gcloud.d.ts +12 -0
  105. package/dist/storage/import-gcloud.js +54 -0
  106. package/dist/storage/import-identity.d.ts +12 -0
  107. package/dist/storage/import-identity.js +15 -0
  108. package/dist/storage/import-plan.d.ts +120 -0
  109. package/dist/storage/import-plan.js +189 -0
  110. package/dist/storage/import-preflight.d.ts +36 -0
  111. package/dist/storage/import-preflight.js +62 -0
  112. package/dist/storage/import-progress-map.d.ts +5 -0
  113. package/dist/storage/import-progress-map.js +22 -0
  114. package/dist/storage/import-recover.d.ts +97 -0
  115. package/dist/storage/import-recover.js +186 -0
  116. package/dist/storage/import-run.d.ts +14 -0
  117. package/dist/storage/import-run.js +140 -0
  118. package/dist/templates/guidance/AGENTS.md +10 -0
  119. package/dist/templates/guidance/CLAUDE.md +1 -0
  120. package/dist/templates/process/package.json +2 -2
  121. package/dist/templates/process/pnpm-workspace.yaml +7 -4
  122. package/dist/validation-detail.d.ts +2 -0
  123. package/dist/validation-detail.js +20 -0
  124. package/package.json +9 -9
  125. package/templates/guidance/AGENTS.md +10 -0
  126. package/templates/guidance/CLAUDE.md +1 -0
  127. package/templates/process/package.json +2 -2
  128. package/templates/process/pnpm-workspace.yaml +7 -4
package/dist/auth.js CHANGED
@@ -8,6 +8,30 @@ import { withCrossProcessFileLock } from './file-lock.js';
8
8
  function hasErrorCode(error, code) {
9
9
  return error instanceof Error && Reflect.get(error, 'code') === code;
10
10
  }
11
+ function errorCode(error) {
12
+ const code = error instanceof Error ? Reflect.get(error, 'code') : undefined;
13
+ return typeof code === 'string' ? code : undefined;
14
+ }
15
+ /** A token-cache failure is distinct from an absent or expired login. */
16
+ export class AuthTokenStoreError extends Error {
17
+ kind;
18
+ path;
19
+ name = 'AuthTokenStoreError';
20
+ constructor(message, kind, path, options) {
21
+ super(message, options);
22
+ this.kind = kind;
23
+ this.path = path;
24
+ }
25
+ }
26
+ function tokenStoreError(error, operation) {
27
+ const code = errorCode(error);
28
+ if (code !== 'EACCES' && code !== 'EPERM')
29
+ return undefined;
30
+ const path = seqapiTokenPath();
31
+ return new AuthTokenStoreError(`Cannot ${operation} the shared Sequence token cache at ${path}: ${code}. ` +
32
+ `This is a file-permission problem, not an expired login. Check ownership and permissions for ${seqapiTokenDir()}; ` +
33
+ 'do not remove a lock file while another Sequence CLI is running.', 'permission', path, { cause: error });
34
+ }
11
35
  /**
12
36
  * seq-studio and seqapi share one token file and one Auth0 application:
13
37
  * same tenant, client id, audience, and token shape. Either CLI can log in,
@@ -168,6 +192,8 @@ async function discoverLoopbackRealm({ envName, fetchImpl = fetch, targetUrl, })
168
192
  };
169
193
  }
170
194
  async function maybeDiscoverLoopbackRealm({ envName, options, }) {
195
+ if (options.offline)
196
+ return undefined;
171
197
  if (!envName || !isLoopbackEnvName(envName))
172
198
  return undefined;
173
199
  const targetUrl = loopbackTargetUrl({
@@ -261,18 +287,14 @@ function tokenStillValid(entry) {
261
287
  return Boolean(entry?.accessToken && (entry.expiresAt ?? 0) > now + 60);
262
288
  }
263
289
  async function loadPersistedM2m(realmName) {
264
- if (!existsSync(seqapiTokenPath()))
290
+ const file = await readTokenFile();
291
+ const entry = file?.m2m?.[realmName];
292
+ if (!entry?.access_token)
265
293
  return null;
266
- return withTokenFileLock(async () => {
267
- const file = await readTokenFile();
268
- const entry = file?.m2m?.[realmName];
269
- if (!entry?.access_token)
270
- return null;
271
- return {
272
- accessToken: entry.access_token,
273
- expiresAt: entry.expires_at ?? 0,
274
- };
275
- });
294
+ return {
295
+ accessToken: entry.access_token,
296
+ expiresAt: entry.expires_at ?? 0,
297
+ };
276
298
  }
277
299
  async function persistM2m({ realmName, accessToken, expiresAt, }) {
278
300
  await withTokenFileLock(async () => {
@@ -486,6 +508,8 @@ export async function tryGetAccessTokenWithMode(options) {
486
508
  catch (err) {
487
509
  if (err instanceof UnsafeAuthTargetError)
488
510
  throw err;
511
+ if (err instanceof AuthTokenStoreError)
512
+ throw err;
489
513
  if (options?.failClosedForM2m) {
490
514
  // Do not replace an invalid tenant registration with the Sequence realm:
491
515
  // that could hide a rejected discovery token host or inspect the wrong
@@ -500,6 +524,94 @@ export async function tryGetAccessTokenWithMode(options) {
500
524
  export async function tryGetAccessToken(options) {
501
525
  return (await tryGetAccessTokenWithMode(options))?.token ?? null;
502
526
  }
527
+ /**
528
+ * Read-only, non-interactive authentication preflight. This never returns a
529
+ * credential, launches a browser, contacts Auth0, or writes the shared cache.
530
+ * Atomic rename means reading the cache without taking its write lock is safe;
531
+ * importantly, a read-only doctor still works when the cache directory cannot
532
+ * create the lock file.
533
+ */
534
+ export async function inspectAuthPreflight(options) {
535
+ const authMode = authModePrefersM2m() ? 'm2m' : 'auto';
536
+ // Offline diagnostics intentionally avoid local Auth0 discovery. A local
537
+ // target's actual realm stays unverified until an online command resolves it.
538
+ const realm = await realmForEnv(options?.env, {
539
+ ...(options?.offline ? { offline: true } : { targetUrl: options?.targetUrl }),
540
+ });
541
+ const realmVerified = !(options?.offline && options.env && isLoopbackEnvName(options.env));
542
+ const cachePath = seqapiTokenPath();
543
+ const credentialConfigured = Boolean(realm.m2mClientId && process.env[m2mSecretEnvName(realm)]?.trim());
544
+ let file;
545
+ try {
546
+ file = await readTokenFile();
547
+ }
548
+ catch (error) {
549
+ const status = error instanceof AuthTokenStoreError ? error.kind : 'io';
550
+ const tokenCache = status === 'permission'
551
+ ? 'permission-denied'
552
+ : status === 'invalid'
553
+ ? 'invalid-json'
554
+ : 'io-error';
555
+ return {
556
+ authMode,
557
+ realm: realm.name,
558
+ realmVerified,
559
+ tokenCachePath: cachePath,
560
+ tokenCache,
561
+ cachedUserToken: 'unavailable',
562
+ cachedM2mToken: 'unavailable',
563
+ m2mCredentialConfigured: credentialConfigured,
564
+ selectedCredential: 'unavailable',
565
+ detail: error instanceof Error ? error.message : String(error),
566
+ };
567
+ }
568
+ if (!file) {
569
+ const selectedCredential = credentialConfigured ? 'm2m' : 'none';
570
+ return {
571
+ authMode,
572
+ realm: realm.name,
573
+ realmVerified,
574
+ tokenCachePath: cachePath,
575
+ tokenCache: 'missing',
576
+ cachedUserToken: 'missing',
577
+ cachedM2mToken: 'missing',
578
+ m2mCredentialConfigured: credentialConfigured,
579
+ selectedCredential,
580
+ };
581
+ }
582
+ const user = realm.name === SEQUENCE_REALM ? file : file.realms?.[realm.name];
583
+ const m2m = file.m2m?.[realm.name];
584
+ const userState = user?.access_token
585
+ ? tokenStillValid({ accessToken: user.access_token, expiresAt: user.expires_at })
586
+ ? 'valid'
587
+ : 'expired'
588
+ : 'missing';
589
+ const m2mState = m2m?.access_token
590
+ ? tokenStillValid({ accessToken: m2m.access_token, expiresAt: m2m.expires_at })
591
+ ? 'valid'
592
+ : 'expired'
593
+ : 'missing';
594
+ const selectedCredential = authMode === 'm2m'
595
+ ? credentialConfigured
596
+ ? 'm2m'
597
+ : 'none'
598
+ : userState === 'valid'
599
+ ? 'user'
600
+ : credentialConfigured
601
+ ? 'm2m'
602
+ : 'none';
603
+ return {
604
+ authMode,
605
+ realm: realm.name,
606
+ realmVerified,
607
+ tokenCachePath: cachePath,
608
+ tokenCache: 'readable',
609
+ cachedUserToken: userState,
610
+ cachedM2mToken: m2mState,
611
+ m2mCredentialConfigured: credentialConfigured,
612
+ selectedCredential,
613
+ };
614
+ }
503
615
  /**
504
616
  * Decode the `sub` claim from a JWT without verification. Verification is the
505
617
  * server's job — this is only used to compare identities locally (e.g. to
@@ -572,13 +684,27 @@ export async function currentIdentitySubject(options = {}) {
572
684
  }
573
685
  async function readTokenFile() {
574
686
  const path = seqapiTokenPath();
575
- if (!existsSync(path))
576
- return null;
687
+ let text;
577
688
  try {
578
- return JSON.parse(await readFile(path, 'utf8'));
689
+ text = await readFile(path, 'utf8');
579
690
  }
580
- catch {
581
- return null;
691
+ catch (error) {
692
+ if (hasErrorCode(error, 'ENOENT'))
693
+ return null;
694
+ const permissionError = tokenStoreError(error, 'read');
695
+ if (permissionError)
696
+ throw permissionError;
697
+ throw new AuthTokenStoreError(`Could not read the shared Sequence token cache at ${path}: ${error instanceof Error ? error.message : String(error)}`, 'io', path, { cause: error });
698
+ }
699
+ try {
700
+ const parsed = JSON.parse(text);
701
+ if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
702
+ throw new Error('expected a JSON object');
703
+ }
704
+ return parsed;
705
+ }
706
+ catch (error) {
707
+ throw new AuthTokenStoreError(`The shared Sequence token cache at ${path} is not valid JSON. Preserve a copy before repairing it; do not delete it while another Sequence CLI is running.`, 'invalid', path, { cause: error });
582
708
  }
583
709
  }
584
710
  function stripPersistedRefreshTokens(file) {
@@ -598,26 +724,37 @@ function stripPersistedRefreshTokens(file) {
598
724
  return changed;
599
725
  }
600
726
  export async function loadCachedUserTokens(realmName = SEQUENCE_REALM) {
601
- if (!existsSync(seqapiTokenPath()))
727
+ const file = await readTokenFile();
728
+ if (!file)
602
729
  return null;
603
- return withTokenFileLock(async () => {
604
- const file = await readTokenFile();
605
- if (!file)
606
- return null;
607
- if (stripPersistedRefreshTokens(file)) {
608
- await writeTokenFile(file);
609
- }
610
- const entry = realmName === SEQUENCE_REALM ? file : file.realms?.[realmName];
611
- if (!entry?.access_token)
612
- return null;
613
- return {
614
- access_token: entry.access_token,
615
- expires_at: entry.expires_at,
616
- };
617
- });
730
+ const entry = realmName === SEQUENCE_REALM ? file : file.realms?.[realmName];
731
+ if (!entry?.access_token)
732
+ return null;
733
+ if (stripPersistedRefreshTokens(file)) {
734
+ await withTokenFileLock(async () => {
735
+ // Re-read under the inter-CLI lock before the atomic rewrite so another
736
+ // process's realm update is preserved.
737
+ const current = (await readTokenFile()) ?? {};
738
+ if (stripPersistedRefreshTokens(current))
739
+ await writeTokenFile(current);
740
+ });
741
+ }
742
+ return {
743
+ access_token: entry.access_token,
744
+ expires_at: entry.expires_at,
745
+ };
618
746
  }
619
747
  async function withTokenFileLock(operation) {
620
- return withCrossProcessFileLock({ operation, path: seqapiTokenPath() });
748
+ const path = seqapiTokenPath();
749
+ try {
750
+ return await withCrossProcessFileLock({ operation, path });
751
+ }
752
+ catch (error) {
753
+ const permissionError = tokenStoreError(error, 'lock or update');
754
+ if (permissionError)
755
+ throw permissionError;
756
+ throw error;
757
+ }
621
758
  }
622
759
  async function writeTokenFile(tokens) {
623
760
  const path = seqapiTokenPath();
package/dist/bin.js CHANGED
@@ -1,7 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import { run } from './main.js';
3
- import { maybeNotifyUpdate } from './update-check.js';
4
- run()
3
+ import { parseArgs } from './argv.js';
4
+ // A consumer may close stdout while a remote operation continues. Stop local
5
+ // output quietly; never cancel or retry the remote operation.
6
+ process.stdout.on('error', (error) => {
7
+ if (error.code === 'EPIPE')
8
+ process.exit(0);
9
+ else
10
+ throw error;
11
+ });
12
+ const argv = process.argv.slice(2);
13
+ const isHelpOrDiscovery = argv.includes('--help') || argv.includes('-h') || argv[0] === 'help' || argv[0] === 'capabilities';
14
+ const doctorOffline = argv[0] === 'doctor' && (() => {
15
+ const value = parseArgs(argv.slice(1)).flags.offline;
16
+ return value === true || value === 'true';
17
+ })();
18
+ run(argv)
5
19
  .catch((error) => {
6
20
  console.error(error instanceof Error ? error.message : error);
7
21
  return 1;
@@ -9,6 +23,11 @@ run()
9
23
  // The update notice runs after the command so it never delays real output,
10
24
  // and it is best-effort (never throws, never changes the exit code).
11
25
  .then(async (code) => {
12
- await maybeNotifyUpdate();
13
- process.exit(code);
26
+ if (!isHelpOrDiscovery && !doctorOffline) {
27
+ const { maybeNotifyUpdate } = await import('./update-check.js');
28
+ await maybeNotifyUpdate();
29
+ }
30
+ // Forced exit discards queued stdout/stderr when callers pipe large JSON
31
+ // responses. Let Node drain pending writes before exiting with this status.
32
+ process.exitCode = code;
14
33
  });
@@ -0,0 +1,137 @@
1
+ /** Machine-readable summary of the CLI surface, kept independent of command implementations. */
2
+ export declare const COMMAND_CONTRACT: readonly [{
3
+ readonly name: "init";
4
+ readonly description: "Scaffold an app workspace";
5
+ readonly lifecycle: "internal";
6
+ readonly access: "offline";
7
+ readonly subcommands: readonly [];
8
+ }, {
9
+ readonly name: "add";
10
+ readonly description: "Add a primitive to an app workspace";
11
+ readonly lifecycle: "internal";
12
+ readonly access: "offline";
13
+ readonly subcommands: readonly [];
14
+ }, {
15
+ readonly name: "deploy";
16
+ readonly description: "Deploy an app workspace";
17
+ readonly lifecycle: "internal";
18
+ readonly access: "authenticated";
19
+ readonly subcommands: readonly [];
20
+ }, {
21
+ readonly name: "process";
22
+ readonly description: "Build and operate Lattice processes";
23
+ readonly lifecycle: "preview";
24
+ readonly access: "mixed";
25
+ readonly subcommands: readonly ["init", "lint", "plan", "apply", "test", "simulate", "bundle", "promote", "pull", "safety-baseline"];
26
+ }, {
27
+ readonly name: "artifact";
28
+ readonly description: "Build and operate Artifact Studio apps";
29
+ readonly lifecycle: "stable";
30
+ readonly access: "mixed";
31
+ readonly subcommands: readonly ["init", "whoami", "link", "env", "status", "list", "show", "validate", "build", "plan", "deploy", "dev", "promote", "pull", "rollback"];
32
+ }, {
33
+ readonly name: "functions";
34
+ readonly description: "Build and operate Managed Functions";
35
+ readonly lifecycle: "stable";
36
+ readonly access: "authenticated";
37
+ readonly subcommands: readonly ["init", "build", "deploy", "list", "show", "limits", "invoke", "logs", "promote", "rollback", "delete"];
38
+ }, {
39
+ readonly name: "agents";
40
+ readonly description: "Validate and deploy typed agent definitions";
41
+ readonly lifecycle: "preview";
42
+ readonly access: "mixed";
43
+ readonly subcommands: readonly ["init", "validate", "plan", "apply", "list", "show"];
44
+ }, {
45
+ readonly name: "secrets";
46
+ readonly description: "Manage organization-owned secrets";
47
+ readonly lifecycle: "stable";
48
+ readonly access: "authenticated";
49
+ readonly subcommands: readonly ["create", "set", "list", "attach", "detach", "apply"];
50
+ }, {
51
+ readonly name: "repos";
52
+ readonly description: "Manage platform Git Service repositories";
53
+ readonly lifecycle: "stable";
54
+ readonly access: "authenticated";
55
+ readonly subcommands: readonly ["list", "namespaces", "show", "create", "clone", "pull", "pulls", "delete"];
56
+ }, {
57
+ readonly name: "pipeline";
58
+ readonly description: "Discover and operate Data Pipelines";
59
+ readonly lifecycle: "preview";
60
+ readonly access: "staff";
61
+ readonly subcommands: readonly ["list", "assets", "search", "describe", "schema", "sample", "query", "init", "validate", "plan", "deploy", "status", "migrate", "adopt", "unbind", "run-now", "promote", "rollback"];
62
+ }, {
63
+ readonly name: "auth";
64
+ readonly description: "Manage Git Service personal access tokens";
65
+ readonly lifecycle: "stable";
66
+ readonly access: "authenticated";
67
+ readonly subcommands: readonly ["whoami", "pat"];
68
+ }, {
69
+ readonly name: "orm";
70
+ readonly description: "Author and operate ORM namespaces";
71
+ readonly lifecycle: "preview";
72
+ readonly access: "mixed";
73
+ readonly subcommands: readonly ["init", "generate", "validate", "plan", "apply", "execute", "diff", "migrate-from-yaml", "import"];
74
+ }, {
75
+ readonly name: "envs";
76
+ readonly description: "Manage CLI environments";
77
+ readonly lifecycle: "stable";
78
+ readonly access: "mixed";
79
+ readonly subcommands: readonly ["add", "list", "refresh"];
80
+ }, {
81
+ readonly name: "login";
82
+ readonly description: "Authenticate with Sequence";
83
+ readonly lifecycle: "stable";
84
+ readonly access: "public";
85
+ readonly subcommands: readonly [];
86
+ }, {
87
+ readonly name: "logout";
88
+ readonly description: "Remove cached user tokens";
89
+ readonly lifecycle: "stable";
90
+ readonly access: "public";
91
+ readonly subcommands: readonly [];
92
+ }, {
93
+ readonly name: "doctor";
94
+ readonly description: "Diagnose CLI configuration and access";
95
+ readonly lifecycle: "stable";
96
+ readonly access: "mixed";
97
+ readonly subcommands: readonly [];
98
+ }, {
99
+ readonly name: "version";
100
+ readonly description: "Print the installed CLI version";
101
+ readonly lifecycle: "stable";
102
+ readonly access: "offline";
103
+ readonly subcommands: readonly [];
104
+ }, {
105
+ readonly name: "help";
106
+ readonly description: "Show command help";
107
+ readonly lifecycle: "stable";
108
+ readonly access: "offline";
109
+ readonly subcommands: readonly [];
110
+ }, {
111
+ readonly name: "storage";
112
+ readonly description: "Manage platform storage";
113
+ readonly lifecycle: "blocked";
114
+ readonly access: "authenticated";
115
+ readonly subcommands: readonly ["init", "validate", "apply", "list", "show", "mkdir", "upload", "download", "access", "trash", "restore", "purge", "operations", "abort", "delete"];
116
+ }, {
117
+ readonly name: "access";
118
+ readonly description: "Manage runtime resource access";
119
+ readonly lifecycle: "preview";
120
+ readonly access: "authenticated";
121
+ readonly subcommands: readonly ["definitions", "list", "grant", "revoke", "resolve"];
122
+ }, {
123
+ readonly name: "service-accounts";
124
+ readonly description: "Manage runtime service accounts";
125
+ readonly lifecycle: "preview";
126
+ readonly access: "authenticated";
127
+ readonly subcommands: readonly ["list", "show", "create"];
128
+ }, {
129
+ readonly name: "capabilities";
130
+ readonly description: "Print the supported CLI command surface";
131
+ readonly lifecycle: "blocked";
132
+ readonly access: "offline";
133
+ readonly subcommands: readonly [];
134
+ }];
135
+ export declare function renderCapabilities({ json }?: {
136
+ json?: boolean;
137
+ }): string;
@@ -0,0 +1,43 @@
1
+ /** Machine-readable summary of the CLI surface, kept independent of command implementations. */
2
+ export const COMMAND_CONTRACT = [
3
+ { name: 'init', description: 'Scaffold an app workspace', lifecycle: 'internal', access: 'offline', subcommands: [] },
4
+ { name: 'add', description: 'Add a primitive to an app workspace', lifecycle: 'internal', access: 'offline', subcommands: [] },
5
+ { name: 'deploy', description: 'Deploy an app workspace', lifecycle: 'internal', access: 'authenticated', subcommands: [] },
6
+ { name: 'process', description: 'Build and operate Lattice processes', lifecycle: 'preview', access: 'mixed', subcommands: ['init', 'lint', 'plan', 'apply', 'test', 'simulate', 'bundle', 'promote', 'pull', 'safety-baseline'] },
7
+ { name: 'artifact', description: 'Build and operate Artifact Studio apps', lifecycle: 'stable', access: 'mixed', subcommands: ['init', 'whoami', 'link', 'env', 'status', 'list', 'show', 'validate', 'build', 'plan', 'deploy', 'dev', 'promote', 'pull', 'rollback'] },
8
+ { name: 'functions', description: 'Build and operate Managed Functions', lifecycle: 'stable', access: 'authenticated', subcommands: ['init', 'build', 'deploy', 'list', 'show', 'limits', 'invoke', 'logs', 'promote', 'rollback', 'delete'] },
9
+ { name: 'agents', description: 'Validate and deploy typed agent definitions', lifecycle: 'preview', access: 'mixed', subcommands: ['init', 'validate', 'plan', 'apply', 'list', 'show'] },
10
+ { name: 'secrets', description: 'Manage organization-owned secrets', lifecycle: 'stable', access: 'authenticated', subcommands: ['create', 'set', 'list', 'attach', 'detach', 'apply'] },
11
+ { name: 'repos', description: 'Manage platform Git Service repositories', lifecycle: 'stable', access: 'authenticated', subcommands: ['list', 'namespaces', 'show', 'create', 'clone', 'pull', 'pulls', 'delete'] },
12
+ { 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'] },
13
+ { name: 'auth', description: 'Manage Git Service personal access tokens', lifecycle: 'stable', access: 'authenticated', subcommands: ['whoami', 'pat'] },
14
+ { name: 'orm', description: 'Author and operate ORM namespaces', lifecycle: 'preview', access: 'mixed', subcommands: ['init', 'generate', 'validate', 'plan', 'apply', 'execute', 'diff', 'migrate-from-yaml', 'import'] },
15
+ { name: 'envs', description: 'Manage CLI environments', lifecycle: 'stable', access: 'mixed', subcommands: ['add', 'list', 'refresh'] },
16
+ { name: 'login', description: 'Authenticate with Sequence', lifecycle: 'stable', access: 'public', subcommands: [] },
17
+ { name: 'logout', description: 'Remove cached user tokens', lifecycle: 'stable', access: 'public', subcommands: [] },
18
+ { name: 'doctor', description: 'Diagnose CLI configuration and access', lifecycle: 'stable', access: 'mixed', subcommands: [] },
19
+ { name: 'version', description: 'Print the installed CLI version', lifecycle: 'stable', access: 'offline', subcommands: [] },
20
+ { name: 'help', description: 'Show command help', lifecycle: 'stable', access: 'offline', subcommands: [] },
21
+ { name: 'storage', description: 'Manage platform storage', lifecycle: 'blocked', access: 'authenticated', subcommands: ['init', 'validate', 'apply', 'list', 'show', 'mkdir', 'upload', 'download', 'access', 'trash', 'restore', 'purge', 'operations', 'abort', 'delete'] },
22
+ { name: 'access', description: 'Manage runtime resource access', lifecycle: 'preview', access: 'authenticated', subcommands: ['definitions', 'list', 'grant', 'revoke', 'resolve'] },
23
+ { name: 'service-accounts', description: 'Manage runtime service accounts', lifecycle: 'preview', access: 'authenticated', subcommands: ['list', 'show', 'create'] },
24
+ { name: 'capabilities', description: 'Print the supported CLI command surface', lifecycle: 'blocked', access: 'offline', subcommands: [] },
25
+ ];
26
+ export function renderCapabilities({ json = false } = {}) {
27
+ const commands = COMMAND_CONTRACT.map(({ name, description, lifecycle, access, subcommands }) => ({
28
+ name,
29
+ description,
30
+ lifecycle,
31
+ access,
32
+ subcommands: [...subcommands],
33
+ }));
34
+ if (json)
35
+ return JSON.stringify({ version: 1, commands }, null, 2);
36
+ return [
37
+ 'seq-studio capabilities (version 1)',
38
+ ...commands.map(({ name, description, lifecycle, access, subcommands }) => ` ${name.padEnd(18)} ${lifecycle}/${access} ${description}${subcommands.length ? ` [${subcommands.join(', ')}]` : ''}`),
39
+ '',
40
+ 'Lifecycle: stable, preview, internal, or blocked. Access: offline, public, mixed, authenticated, or staff.',
41
+ 'Use `seq-studio <command> --help` for command usage. This summary does not promise an underlying HTTP API.',
42
+ ].join('\n');
43
+ }
@@ -0,0 +1,8 @@
1
+ /** Help text reachable before command implementations, auth, optional SDKs, or Atlas clients load. */
2
+ export declare const ORM_HELP = "usage:\n seq-studio orm init <dir>\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>\n seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>\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";
3
+ export declare const ARTIFACT_HELP = "usage:\n seq-studio artifact init <dir> [--template react-vite|nextjs]\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";
4
+ 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 --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";
5
+ export declare function staticHelp({ namespace, sub }: {
6
+ namespace: string;
7
+ sub?: string;
8
+ }): string | undefined;
@@ -0,0 +1,71 @@
1
+ /** Help text reachable before command implementations, auth, optional SDKs, or Atlas clients load. */
2
+ export const ORM_HELP = `usage:
3
+ seq-studio orm init <dir>
4
+ seq-studio orm generate [dir] [--migration-export] [--check]
5
+ seq-studio orm validate [dir]
6
+ seq-studio orm plan [dir] -e <env>
7
+ seq-studio orm apply [dir] -e <env>
8
+ seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>
9
+ seq-studio orm diff [dir] [--check] [--allow-destructive] [--rebase]
10
+ seq-studio orm migrate-from-yaml <dir>
11
+ seq-studio orm import [dir] --spec <file> | --table <table> --from <schema.table> --map <target=source,...>
12
+
13
+ -e/--env is required for commands that contact Atlas. Use seq-studio envs list
14
+ to discover environments and seq-studio login to authenticate.
15
+ `;
16
+ export const ARTIFACT_HELP = `usage:
17
+ seq-studio artifact init <dir> [--template react-vite|nextjs]
18
+ seq-studio artifact whoami -e <env>
19
+ seq-studio artifact link [dir] -e <env> [--project <id>]
20
+ seq-studio artifact env list|use <env>
21
+ seq-studio artifact status [-e <env>]
22
+ seq-studio artifact list -e <env> [--json]
23
+ seq-studio artifact show <slug-or-id> -e <env> [--json]
24
+ seq-studio artifact validate [dir]
25
+ seq-studio artifact build|plan|deploy [dir | --repo <namespace>/<name> | --git-url <url>] [--ref <ref>] -e <env>
26
+ seq-studio artifact dev [dir] -e <env> [--once] [--key <name>] [--link <package-dir>] [--port <port>]
27
+ seq-studio artifact pull <project-id> -e <env> --out <dir>
28
+ seq-studio artifact promote|rollback <deployment-id> -e <env>
29
+
30
+ Help is available offline. Authenticate with seq-studio login. Build and deploy
31
+ sources may be local, a platform git-service repo, or a public HTTPS Git URL;
32
+ deployments target a named environment with -e. Local, preview, and official
33
+ deployment workflows have different source and approval rules; see the public
34
+ CLI README.
35
+ `;
36
+ export const PIPELINE_HELP = `usage:
37
+ seq-studio pipeline list -e <env> [--limit 1..200] [--offset N] [--json]
38
+ list pipeline repository rollups (not assets)
39
+ seq-studio pipeline assets -e <env> [--repo <namespace>/<slug>] [--json]
40
+ list asset declarations, including assets that may not be deployed
41
+ seq-studio pipeline search <query> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--limit N] [--offset N] [--json]
42
+ seq-studio pipeline describe <asset-id> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--json]
43
+ seq-studio pipeline schema|sample <asset-id> -e <env> [--target <id>] [--limit N] [--json]
44
+ seq-studio pipeline query <asset-id> --sql <read-only-sql> -e <env> [--target <id>] [--limit N] [--json]
45
+ seq-studio pipeline init|validate|plan|deploy|status|migrate|adopt|unbind|run-now|promote|rollback ...
46
+ seq-studio pipeline plan --plan-request-id <id> -e <env> [--json]
47
+ poll an existing durable plan without enqueueing or attaching credentials
48
+ Lifecycle --json results use stdout; progress uses stderr. Deploy --run-now
49
+ executes producers in the managed worker; local polling may disconnect.
50
+
51
+ Discovery requires staff access. Use list for pipeline repositories, assets
52
+ for declared assets, and search/describe for active deployment metadata;
53
+ use schema to verify physical columns. -e chooses the environment and
54
+ --target chooses a logical target when the environment has more than one.
55
+ Help is available offline.
56
+ `;
57
+ export function staticHelp({ namespace, sub }) {
58
+ if (namespace === 'artifact')
59
+ return ARTIFACT_HELP;
60
+ if (namespace === 'orm')
61
+ return ORM_HELP;
62
+ if (namespace === 'pipeline')
63
+ return PIPELINE_HELP;
64
+ if (namespace === 'doctor') {
65
+ return `usage: seq-studio doctor [-e <env>] [--json] [--offline]\n\nDiagnose config, auth, local service availability, CLI/SDK resolution, and deployment access. --offline reads local metadata without discovery or HTTP requests. Help is available offline.\n`;
66
+ }
67
+ if (namespace === 'process' && (!sub || sub === 'help' || sub === '--help' || sub === '-h')) {
68
+ return `usage: seq-studio process <init|lint|plan|apply|promote|pull|test|simulate|bundle> [args]\n\nHelp is available offline.\n`;
69
+ }
70
+ return undefined;
71
+ }
@@ -0,0 +1,15 @@
1
+ import type { ParsedArgs } from './process/commands.js';
2
+ /** Validate before authentication: a typo must never silently widen a mutation. */
3
+ export declare function validateCommandInput({ args, flags, positional, }: {
4
+ args: ParsedArgs;
5
+ flags: Record<string, 'string' | 'boolean'>;
6
+ positional: number;
7
+ }): void;
8
+ export declare function requiredStringFlag({ args, key }: {
9
+ args: ParsedArgs;
10
+ key: string;
11
+ }): string;
12
+ export declare function wantsHelp({ sub, args }: {
13
+ sub?: string;
14
+ args: ParsedArgs;
15
+ }): boolean;
@@ -0,0 +1,33 @@
1
+ import { REQUIRE_EXPLICIT_ENV_MESSAGE } from './env-flags.js';
2
+ /** Validate before authentication: a typo must never silently widen a mutation. */
3
+ export function validateCommandInput({ args, flags, positional, }) {
4
+ const allowed = { ...flags, env: 'string', e: 'string', json: 'boolean' };
5
+ for (const [key, value] of Object.entries(args.flags)) {
6
+ if (!Object.hasOwn(allowed, key))
7
+ throw new Error(`Unknown flag --${key}. See --help.`);
8
+ if (allowed[key] === 'string' && (typeof value !== 'string' || !value.trim())) {
9
+ throw new Error(`--${key} requires a non-empty value.`);
10
+ }
11
+ if (allowed[key] === 'boolean' && value !== true) {
12
+ throw new Error(`--${key} does not take a value.`);
13
+ }
14
+ }
15
+ const envs = [args.flags.env, args.flags.e, ...(args.repeatedFlags?.env ?? []), ...(args.repeatedFlags?.e ?? [])]
16
+ .filter((value) => typeof value === 'string');
17
+ if (new Set(envs).size > 1)
18
+ throw new Error('Specify only one environment per command.');
19
+ if (envs.length === 0)
20
+ throw new Error(REQUIRE_EXPLICIT_ENV_MESSAGE);
21
+ if (args.positional.length !== positional) {
22
+ throw new Error(`Expected ${positional} positional argument(s). See --help.`);
23
+ }
24
+ }
25
+ export function requiredStringFlag({ args, key }) {
26
+ const value = args.flags[key];
27
+ if (typeof value !== 'string' || !value.trim())
28
+ throw new Error(`--${key} requires a value.`);
29
+ return value;
30
+ }
31
+ export function wantsHelp({ sub, args }) {
32
+ return sub === 'help' || sub === '--help' || sub === '-h' || args.flags.help === true || args.positional.includes('-h');
33
+ }
@@ -61,6 +61,7 @@ export declare function resolveOrRegisterFunction({ ctx, slug, title, descriptio
61
61
  fn: FunctionSummary;
62
62
  created: boolean;
63
63
  }>;
64
+ export declare function functionsRegisterCommand(args: ParsedArgs): Promise<number>;
64
65
  export declare function predictNextVersion(latest: string | undefined): string;
65
66
  /** Prompt on the TTY with echo suppressed — secret values are never displayed. */
66
67
  export declare function promptHidden(question: string): Promise<string>;
@@ -92,5 +93,5 @@ export declare function functionsRollbackCommand(args: ParsedArgs): Promise<numb
92
93
  /** Minimal dotenv parser — KEY=VALUE lines, quotes stripped, comments skipped. */
93
94
  export declare function parseDotenv(content: string): Record<string, string>;
94
95
  export declare function functionsDeleteCommand(args: ParsedArgs): Promise<number>;
95
- export declare const FUNCTIONS_USAGE = "usage:\n seq-studio functions init <dir> scaffold manifest + TypeScript hello-world handler\n seq-studio functions build [--dir d] local pre-flight (manifest, lockfile, size)\n seq-studio functions deploy -e <env> [-m msg] preview + confirm secrets + upload and deploy\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 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\n Interactive --repo builds clone over smart-HTTP and require a repo:read git\n PAT in ATLAS_GIT_PAT (`seq-studio auth pat create --scopes repo:read`, or\n Atlas \u2192 Settings \u2192 Tokens). Headless M2M builds use JSON materialize and\n accept only platform-managed --repo sources. Interactive builds also need\n --env + seq-studio login to resolve the repo and deploy.\n";
96
+ export declare const FUNCTIONS_USAGE = "usage:\n seq-studio functions init <dir> scaffold manifest, TypeScript handler, and docs pointers\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 function shell without deploying\n seq-studio functions deploy -e <env> [-m msg] preflight deployed capabilities, then upload and deploy\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 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\n Interactive --repo builds clone over smart-HTTP and require a repo:read git\n PAT in ATLAS_GIT_PAT (`seq-studio auth pat create --scopes repo:read`, or\n Atlas \u2192 Settings \u2192 Tokens). Headless M2M builds use JSON materialize and\n accept only platform-managed --repo sources. Interactive builds also need\n --env + seq-studio login to resolve the repo and deploy.\n";
96
97
  export declare function runFunctionsCommand(sub: string | undefined, args: ParsedArgs): Promise<number>;