@sequenceholdings/studio-cli 0.9.2 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1022,6 +1022,12 @@ seq-studio orm execute lending ListLoans -e <env> --var officer=<uuid> --var lim
1022
1022
  seq-studio orm execute lending ListLoans -e <env> --variables-file variables.json
1023
1023
  ```
1024
1024
 
1025
+ Both execute forms accept `--variables-file -` (or `/dev/stdin`) for piped JSON.
1026
+ Input is read as UTF-8 until EOF and must be a JSON object. Reading or parsing
1027
+ failures do not submit the operation; this does not add mutation retries or
1028
+ write the variables to a temporary file. The checkout form requires an installed
1029
+ ORM package with stdin support; upgrade that package alongside the CLI.
1030
+
1025
1031
  The by-name form looks the operation up in the namespace's deployed version and
1026
1032
  runs it as you, so it needs no checkout and runs what is deployed even when a
1027
1033
  local clone is behind. `--var <name>=<value>` (repeatable) sets one variable
@@ -1734,7 +1740,7 @@ The JSON file contains an object of uppercase entry names and string values. Kee
1734
1740
 
1735
1741
  To change only selected entries without reading or re-entering the others, put the changes in a JSON file and run `seq-studio secrets set CANDESCENT -e staging --from-json ./changes.json --merge`. Use `null` for an entry to remove it. The CLI checks the active version before writing and asks you to retry if another edit won the race.
1736
1742
 
1737
- Pipeline stages can select one entry from a set for each symbolic credential: `seq-studio secrets attach CANDESCENT --stage my-stage -e staging --credential api_key --entry PRIVATE_KEY`. The selected entry is copied at plan/deploy into that stage's credential scope. Artifact Studio applications currently require a single-value secret.
1743
+ Pipeline stages can select one entry from a set for each symbolic credential: `seq-studio secrets attach CANDESCENT --stage my-stage -e staging --credential api_key --entry PRIVATE_KEY`. To read several entries as one JSON credential, use `--fields api_key=API_KEY,application_key=APPLICATION_KEY`; `pipeline_runtime.get_credential("<symbolic>")` then returns JSON with those output field names. Each field comes from the same pinned or default secret version, and plan fails if a selected entry is missing. The selected value is copied at deploy into that stage's credential scope. Artifact Studio applications currently require a single-value secret.
1738
1744
 
1739
1745
  Existing single-value secrets keep their type. To consolidate them, create a new set, provide or rotate the entry values, update each consumer's manifest mapping, redeploy, verify the consumer, then retire the old secrets. The CLI and UI cannot read back existing secret values, so an agent needs the values from an authorized source or must rotate them during consolidation.
1740
1746
 
@@ -3177,6 +3183,9 @@ seq-studio repos pulls diff <namespace/name> <number> -e <env>
3177
3183
  seq-studio repos pulls merge <namespace/name> <number> --method squash -e <env>
3178
3184
  seq-studio repos pulls comment <namespace/name> <number> --body "Looks good" -e <env>
3179
3185
  seq-studio repos pulls comment <namespace/name> <number> --path src/memo.ts --line 42 --body-file note.md -e <env>
3186
+ seq-studio repos pulls comments <namespace/name> <number> -e <env>
3187
+ seq-studio repos pulls resolve <namespace/name> <number> <root-comment-id> -e <env>
3188
+ seq-studio repos pulls unresolve <namespace/name> <number> <root-comment-id> -e <env>
3180
3189
  seq-studio repos pulls review <namespace/name> <number> --request-changes --body-file review.md -e <env>
3181
3190
  seq-studio repos pulls checks <namespace/name> <number> -e <env>
3182
3191
  seq-studio repos pulls close <namespace/name> <number> -e <env>
@@ -3191,6 +3200,9 @@ displayed SHA is not a head-lock or policy bypass. Complete reviews before mergi
3191
3200
  `comment` adds a comment; `--path` with `--line` anchors it to a diff line on the
3192
3201
  new side (`--side LEFT` for the old side) at the commit the Pull's branch points at
3193
3202
  now (`--commit <sha>` to pin another), and `--reply-to <comment-id>` answers a thread.
3203
+ Use `comments` to find a thread root's UUID. `resolve` and `unresolve` update that
3204
+ root's resolution state and return the updated comment. They use the current CLI
3205
+ login and require repository read access; the server rejects reply IDs.
3194
3206
  `review` takes exactly one of `--approve`, `--request-changes`, or `--comment`, an
3195
3207
  optional `--body`/`--body-file`, and records the review against the commit the Pull's
3196
3208
  branch points at now unless `--commit` names another. `checks` returns one object with the Pull's check
package/dist/argv.js CHANGED
@@ -22,7 +22,7 @@ export function parseArgs(rest) {
22
22
  continue;
23
23
  }
24
24
  const next = rest[i + 1];
25
- if (next && !next.startsWith('-')) {
25
+ if (next && (next === '-' || !next.startsWith('-'))) {
26
26
  setFlag(body, next);
27
27
  i += 1;
28
28
  }
@@ -42,7 +42,7 @@ export function parseArgs(rest) {
42
42
  continue;
43
43
  }
44
44
  const next = rest[i + 1];
45
- if (next && !next.startsWith('-')) {
45
+ if (next && (next === '-' || !next.startsWith('-'))) {
46
46
  setFlag(longName, next);
47
47
  i += 1;
48
48
  }
@@ -7,10 +7,10 @@ export declare const ARTIFACT_SANDBOX_HELP = " In an agent sandbox (SEQ_STUDIO_
7
7
  export declare const ARTIFACT_HELP = "usage:\n seq-studio artifact init <dir> [--template react-vite|nextjs] [--repo <namespace>/<name>]\n seq-studio artifact whoami -e <env>\n seq-studio artifact link [dir] -e <env> [--project <id>]\n seq-studio artifact env list|use <env>\n seq-studio artifact status [-e <env>]\n seq-studio artifact list -e <env> [--json]\n seq-studio artifact show <slug-or-id> -e <env> [--json]\n seq-studio artifact validate [dir]\n seq-studio artifact build|plan|deploy [dir | --repo <namespace>/<name> | --git-url <url>] [--ref <ref>] -e <env>\n seq-studio artifact dev [dir] -e <env> [--once] [--key <name>] [--link <package-dir>] [--port <port>]\n seq-studio artifact pull <project-id> -e <env> --out <dir>\n seq-studio artifact promote|rollback <deployment-id> -e <env>\n\n Help is available offline. Authenticate with seq-studio login. Build and deploy\n sources may be local, a platform git-service repo, or a public HTTPS Git URL;\n deployments target a named environment with -e. Local, preview, and official\n deployment workflows have different source and approval rules; see the public\n CLI README.\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n\n In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), build, plan\n and deploy take --repo: push the app to a Git Service repository and deploy\n from it. Atlas builds Next.js applications; static applications are bundled\n from the repository and must declare no package.json dependencies or\n optionalDependencies, because the sandbox cannot reach a package registry.\n dev, login, logout, --git-url, --source-env, --pr and --env-url are\n unavailable there, and -e is ignored.\n";
8
8
  export declare const PIPELINE_HELP = "usage:\n seq-studio pipeline list -e <env> [--limit 1..200] [--offset N] [--json]\n list pipeline repository rollups (not assets)\n seq-studio pipeline assets -e <env> [--repo <namespace>/<slug>] [--json]\n list asset declarations, including assets that may not be deployed\n seq-studio pipeline search <query> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--limit N] [--offset N] [--json]\n seq-studio pipeline describe <asset-id> -e <env> [--target <id>] [--repo <namespace>/<slug>] [--json]\n seq-studio pipeline schema|sample <asset-id> -e <env> [--target <id>] [--limit N] [--json]\n seq-studio pipeline query <asset-id> --sql <read-only-sql> -e <env> [--target <id>] [--limit N] [--json]\n seq-studio pipeline init|validate|plan|deploy|status|migrate|adopt|unbind|run-now|promote|rollback ...\n seq-studio pipeline plan|deploy --repo <namespace>/<slug> --ref <sha|branch>\n [--root <directory>] [--source-env <first-party-env>] -e <env> [--target <id>]\n For an existing target release unit, source-env selects a separately\n authenticated canonical repository from banksouth, staging, or production.\n Source identity must be adopted and belong to the destination tenant.\n Registered OpCo source origins are not supported yet. The target verifies\n and snapshots source before planning; no target repository is created.\n Reviewed pipeline.config.yml source_paths can select runtime files and\n directories, retaining pipeline metadata, release identity and size limits.\n Not compatible with --dir, existing IDs, or coordinated migrations.\n Rollback uses retained snapshots; historical source commits can be re-planned\n explicitly with deploy --ref <sha> --source-env <env>.\n seq-studio pipeline plan --plan-request-id <id> -e <env> [--json]\n poll an existing durable plan without enqueueing or attaching credentials\n Lifecycle --json results use stdout; progress uses stderr. Deploy --run-now\n executes producers in the managed worker; local polling may disconnect.\n\n Discovery requires staff access. Use list for pipeline repositories, assets\n for declared assets, and search/describe for active deployment metadata;\n use schema to verify physical columns. -e chooses the environment and\n --target chooses a logical target when the environment has more than one.\n Help is available offline.\n";
9
9
  export declare const FUNCTIONS_USAGE = "usage:\n seq-studio functions init <dir> [--repo <ns>/<name>] scaffold manifest, TypeScript handler, and docs pointers;\n --repo scaffolds into a git-service repo (see Init into a repo)\n seq-studio functions build [--dir d] local pre-flight (manifest, lockfile, SDK timeout cap)\n seq-studio functions register -e <env> [--dir d] register a shell + initial secret declarations; no deploy\n seq-studio functions deploy -e <env> [-m msg] preflight, upload, then show version and lifecycle progress\n seq-studio functions list -e <env> [--match-local] functions visible on the environment\n seq-studio functions show -e <env> [--fn slug] detail for one function (versions, secrets)\n [--json] [--version id|name] reader-gated release provenance\n seq-studio functions limits [-e <env>] [--json] bundled defaults/caps, or deployed policy\n [--fn slug] also show effective runtime limits (requires -e)\n seq-studio functions dev [--dir path] [--port 8080] local HTTP server with cache context\n seq-studio functions invoke -e <env> [--data JSON | --data @file | --stdin]\n invoke a function and print its response\n seq-studio functions logs -e <env> [--limit N] [--since t] function logs (reader-gated)\n seq-studio functions promote <version> -e <env> make a version live\n seq-studio functions rollback [<version>] -e <env> redeploy a prior version\n seq-studio functions delete -e <env> [--yes] archive function + tear down its runtime\n (version history is retained)\n\n Flags: -e/--env <env|preview:<slug>> (required for network commands; see: seq-studio envs list) \u00B7 --fn <slug> \u00B7 --dir <path>\n --path <repo-subdirectory> (remote build/deploy only) select one function in a multi-function repo\n --from-env-file <path> (default: .env) source file for secret values\n --no-wait \u00B7 --yes\n --no-provision (deploy) update-only: error instead of registering a new\n shell, writing secret values, or attaching secrets (CI sweep)\n\n Local Atlas builds and runs deployed functions on this computer, including teardown.\n \"functions dev\" runs a standalone handler without Atlas registration.\n\n Configure per-function CPU and concurrency in managed-function.yml under limits.\n Run \"functions limits\" for valid settings; redeploy to apply manifest changes.\n Invocation rates are shared across Atlas replicas; 429 includes Retry-After.\n If the shared rate limiter is unavailable, invocation fails closed with 503.\n\n Source for build/deploy: a local --dir (default .), a platform git-service\n repo (--repo <ns>/<name>), or a public HTTPS git URL (--git-url <url>). --path selects\n a function directory within a remote repo; omit it for the existing root-manifest\n layout. --ref selects a branch/tag/commit (default: the repo's default branch).\n Remote sources record the pinned commit as provenance (never dirty) and NEVER\n read a repo-committed .env for secret values \u2014 provision secrets server-side\n or pass a local --from-env-file (resolved against your cwd).\n Local deploys record repository-wide gitDirty, including unignored files\n outside --dir. Check git status at the repository root before deploying.\n\n Workspace dependencies are compiled from packages declared in a containing\n sequence.app.yml, within the source repository. Only the selected function is\n deployed: no sibling primitives or Application registration. Shared Node packages\n can set package.json seqStudio.source to a root source entry for clean builds.\n Package build scripts are not run. Local secret paths remain relative to --dir.\n\n Interactive --repo builds clone over smart-HTTP using your seq-studio login\n and repository read access. No PAT is needed. Headless M2M builds use JSON\n materialize and accept only platform-managed --repo sources. Use --env to\n select the same environment for source and deployment.\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n In a git-service checkout (with or without --repo), orm init, functions init\n and artifact init also declare the scaffold under resources in\n .seq/repository.yml, so repository CI checks and deploys it. A scaffold inside\n a declared application is not declared; add it to that app with seq-studio add.\n";
10
- export declare const REPOS_USAGE = "usage:\n seq-studio repos list -e <env> [--namespace <slug>] [--mine] repos visible on the environment\n seq-studio repos namespaces [create <slug>] -e <env> list or create namespaces\n seq-studio repos show <ns>/<name> -e <env> repo detail (branches, clone URL)\n seq-studio repos identity <ns>/<name> -e <env> [--write --dir .] show/install the server-issued identity receipt\n --adopt --write --yes admin-only legacy binding; commit the receipt via PR\n seq-studio repos create <ns>/<name> -e <env> [--default-branch b] [--git-backend walgit]\n create a repo seeded with a README; --git-backend\n walgit creates it empty (for pushing existing\n history); needs namespace write. Returns once\n the repo resolves by name, so clone can follow\n at once. The init commands take --repo\n <ns>/<name> to create, clone, and scaffold\n seq-studio repos clone <ns>/<name> -e <env> [--ref r] [--output dir] [--force] [--full] [--transport auto|git|json]\n seq-studio repos clone --url <https://\u2026/repos/<id>/git> -e <env> [--ref r] [--output dir] [--full]\n seq-studio repos clone --id <uuid> -e <env> [--ref r] [--output dir] [--full]\n real Git clone using seq-studio login;\n configures login for subsequent git pull/push\n seq-studio repos pull <ns>/<name> -e <env> [--ref r] [--out dir] [--force]\n materialize the tree at a ref (JSON API)\n seq-studio repos pulls <list|show|create|diff|merge|close|comment|comments|review|reviews|checks> [args]\n review requests (see pulls --help)\n seq-studio repos delete <ns>/<name> -e <env> [--yes] delete a repo (confirm prompt)\n seq-studio repos ci init [--dir <repository>] create a native pipeline using platform defaults\n seq-studio repos ci show <ns>/<name> -e <env> --pr <number> [--json] inspect the server CI plan and runs\n seq-studio repos ci show <ns>/<name> -e <env> [--ref r] preview pipeline discovery or legacy checks\n seq-studio repos ci require <ns>/<name> --check <name> -e <env> disabled legacy control\n seq-studio repos ci import <ns>/<name> -e <env> [--ref r] disabled legacy control\n\n Flags: -e/--env <env> (required; see: seq-studio envs list)\n\n clone uses your login token (never written into the remote URL or Git config).\n A repository-local credential helper reads your current login for git pull/push.\n After expiry, run seq-studio login --env <env> again.\n --transport auto (default) and git both create a real Git checkout.\n Personal access tokens are retired; ATLAS_GIT_PAT is ignored.\n --transport json downloads files without .git; requires\n <ns>/<name>. repos pull also provides this files-only workflow.\n --ref accepts a branch, tag, or commit SHA (SHA \u2192 full clone, then checkout).\n Branch and tag clones are shallow (--depth 1). Pass --full for history.\n --output selects the clone directory (--out remains an alias).\n\n Authenticate JSON API calls with: seq-studio login\n Authenticate git clone/push with: seq-studio login --env <env>\n";
10
+ export declare const REPOS_USAGE = "usage:\n seq-studio repos list -e <env> [--namespace <slug>] [--mine] repos visible on the environment\n seq-studio repos namespaces [create <slug>] -e <env> list or create namespaces\n seq-studio repos show <ns>/<name> -e <env> repo detail (branches, clone URL)\n seq-studio repos identity <ns>/<name> -e <env> [--write --dir .] show/install the server-issued identity receipt\n --adopt --write --yes admin-only legacy binding; commit the receipt via PR\n seq-studio repos create <ns>/<name> -e <env> [--default-branch b] [--git-backend walgit]\n create a repo seeded with a README; --git-backend\n walgit creates it empty (for pushing existing\n history); needs namespace write. Returns once\n the repo resolves by name, so clone can follow\n at once. The init commands take --repo\n <ns>/<name> to create, clone, and scaffold\n seq-studio repos clone <ns>/<name> -e <env> [--ref r] [--output dir] [--force] [--full] [--transport auto|git|json]\n seq-studio repos clone --url <https://\u2026/repos/<id>/git> -e <env> [--ref r] [--output dir] [--full]\n seq-studio repos clone --id <uuid> -e <env> [--ref r] [--output dir] [--full]\n real Git clone using seq-studio login;\n configures login for subsequent git pull/push\n seq-studio repos pull <ns>/<name> -e <env> [--ref r] [--out dir] [--force]\n materialize the tree at a ref (JSON API)\n seq-studio repos pulls <list|show|create|diff|merge|close|comment|comments|resolve|unresolve|review|reviews|checks> [args]\n review requests (see pulls --help)\n seq-studio repos delete <ns>/<name> -e <env> [--yes] delete a repo (confirm prompt)\n seq-studio repos ci init [--dir <repository>] create a native pipeline using platform defaults\n seq-studio repos ci show <ns>/<name> -e <env> --pr <number> [--json] inspect the server CI plan and runs\n seq-studio repos ci show <ns>/<name> -e <env> [--ref r] preview pipeline discovery or legacy checks\n seq-studio repos ci require <ns>/<name> --check <name> -e <env> disabled legacy control\n seq-studio repos ci import <ns>/<name> -e <env> [--ref r] disabled legacy control\n\n Flags: -e/--env <env> (required; see: seq-studio envs list)\n\n clone uses your login token (never written into the remote URL or Git config).\n A repository-local credential helper reads your current login for git pull/push.\n After expiry, run seq-studio login --env <env> again.\n --transport auto (default) and git both create a real Git checkout.\n Personal access tokens are retired; ATLAS_GIT_PAT is ignored.\n --transport json downloads files without .git; requires\n <ns>/<name>. repos pull also provides this files-only workflow.\n --ref accepts a branch, tag, or commit SHA (SHA \u2192 full clone, then checkout).\n Branch and tag clones are shallow (--depth 1). Pass --full for history.\n --output selects the clone directory (--out remains an alias).\n\n Authenticate JSON API calls with: seq-studio login\n Authenticate git clone/push with: seq-studio login --env <env>\n";
11
11
  export declare const PROCESS_RUNS_USAGE = "usage:\n seq-studio process runs start <process-id> -e <env> [--version <v>] [--run-id <id>]\n [--metadata-file <file.json>] [--title <text>] [--entity <type>:<id>] [--json]\n seq-studio process runs retry <run-id> -e <env> [--run-id <new-id>] [--json]\n seq-studio process runs list -e <env> [--process <id>] [--status <status>]\n [--entity-type <type>] [--entity-id <id>] [--archived] [--limit 1..500] [--json]\n seq-studio process runs show <run-id> -e <env> [--wait [--timeout <seconds>]]\n [--steps [--node <node-id>] [--full]] [--json]\n seq-studio process runs cancel <run-id> -e <env> [--json]\n\n Runs start and are read as you: start and retry need invoker on the process,\n show and list return only runs you can view, and cancel needs invoker on the\n process.\n start prints the new run's id. Omit --run-id for a fresh id on every start.\n --run-id names exactly one run: repeating it for the same process returns that\n run, whatever its status, instead of starting another. To run a failed run\n again, retry it rather than inventing a new id.\n --version pins a published process version; omitted, the active version runs.\n --metadata-file is a JSON object stored on the run.\n retry (CLI 0.9.0+) starts a new run of a failed, cancelled or timed_out run's\n process version with the same metadata, entity and title, linked to the\n original in its lineage, and prints the new id. Other statuses are refused.\n Like start, a retry waits queued while the process is at its concurrent-run\n limit.\n --run-id on retry names the new run, so repeating the retry returns it.\n list returns the newest runs first, up to --limit (default 50, max 500); the run\n API has no cursor, so narrow with filters to reach older runs.\n --status: pending, running, completed, failed, cancelled, timed_out.\n show --wait polls until the run finishes (default timeout 600s); the run keeps\n going if the wait times out. show prints the run's error when it failed.\n show --steps (CLI 0.9.1+) prints each step's status, edge, error, input and\n output, with the same viewer permission as show. Inputs, outputs and errors\n over 2000 characters are cut to a preview; --full prints them whole.\n --node narrows to one node. With --json, --steps returns { run, steps } with\n the same bounds; each step's truncated map names its cut fields and their full\n length. A failure in a node's input mapper happens before its step\n starts, so it shows only as the run's error.\n";
12
12
  export declare const ORM_DISCOVER_HELP = "usage:\n seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json]\n seq-studio orm describe <namespace> [<table> | --operations] -e <env> [--json]\n seq-studio orm operation show <namespace> <name> -e <env> [--json]\n\n Find the ORM data you can read, then query it with orm read or orm sql.\n namespaces lists only namespaces you can read, ordered by name: format (v2 or\n v1), table and persisted-operation counts. It pages with --limit (default 50)\n and --offset; the total and the next page go to stderr.\n describe <namespace> lists its tables and views and the persisted operations\n it serves, with what each requires and the variables it declares (name: type,\n ! when required). --operations prints only the operations, ready for\n orm execute <namespace> <operation>. describe <namespace> <table> lists the\n table's columns (types, nullability, keys), enum values, links, actions, and\n the persisted operations that write it. Column names are the ones orm read and\n orm sql accept.\n A namespace you cannot read reports not found, the same as a missing one.\n --json prints the full description (describe omits the generated GraphQL SDL).\n operation show prints one active persisted operation's registered GraphQL\n document; --json includes its hash, declared variables, and requirements.\n Missing and unreadable operations both report not found.\n In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), -e is not needed.\n";
13
- export declare const ORM_EXECUTE_HELP = "usage:\n seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...\n seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>\n\n Run one persisted operation as you. The server applies the operation's\n required capability or role and the namespace's row policies.\n By name: execute <namespace> <operation> looks the operation up in the\n namespace's deployed version and runs it. No checkout is needed, so it runs\n what is deployed even when a local clone is behind. List what you can run:\n seq-studio orm describe <namespace> --operations\n From a checkout: execute <operation> [dir] delegates to the installed ORM\n package using the directory's operations.manifest.json (default dir: .).\n Updated ORM packages validate the name and kind, then call the active named\n operation. Older packages may still select the manifest hash. Confirm the\n installed package and platform support name selection before upgrading.\n The form is chosen by the second argument: an existing directory means a\n checkout; otherwise it is <namespace> <operation>.\n --variables-file takes a JSON object. --var <name>=<value> (repeatable, by\n name only) sets one variable and wins over the file: numbers and booleans\n parse by the declared type, lists, filter inputs and jsonb take JSON, and other\n types take the text as is. Use the file for null.\n Output is the JSON response: {\"data\": ...}.\n In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), -e is not needed.\n";
13
+ export declare const ORM_EXECUTE_HELP = "usage:\n seq-studio orm execute <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]...\n seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>\n\n Run one persisted operation as you. The server applies the operation's\n required capability or role and the namespace's row policies.\n By name: execute <namespace> <operation> looks the operation up in the\n namespace's deployed version and runs it. No checkout is needed, so it runs\n what is deployed even when a local clone is behind. List what you can run:\n seq-studio orm describe <namespace> --operations\n From a checkout: execute <operation> [dir] delegates to the installed ORM\n package using the directory's operations.manifest.json (default dir: .).\n Updated ORM packages validate the name and kind, then call the active named\n operation. Older packages may still select the manifest hash. Confirm the\n installed package and platform support name selection before upgrading.\n The form is chosen by the second argument: an existing directory means a\n checkout; otherwise it is <namespace> <operation>.\n --variables-file takes a JSON object; - or /dev/stdin reads UTF-8 stdin until EOF\n (the checkout form requires an ORM package with stdin support).\n --var <name>=<value> (repeatable, by\n name only) sets one variable and wins over the file: numbers and booleans\n parse by the declared type, lists, filter inputs and jsonb take JSON, and other\n types take the text as is. Use the file for null.\n Output is the JSON response: {\"data\": ...}.\n In an agent sandbox (SEQ_STUDIO_BASE_URL + SEQ_STUDIO_TOKEN_FILE), -e is not needed.\n";
14
14
  export declare function staticHelp({ namespace, sub }: {
15
15
  namespace: string;
16
16
  sub?: string;
@@ -184,7 +184,7 @@ export const REPOS_USAGE = `usage:
184
184
  configures login for subsequent git pull/push
185
185
  seq-studio repos pull <ns>/<name> -e <env> [--ref r] [--out dir] [--force]
186
186
  materialize the tree at a ref (JSON API)
187
- seq-studio repos pulls <list|show|create|diff|merge|close|comment|comments|review|reviews|checks> [args]
187
+ seq-studio repos pulls <list|show|create|diff|merge|close|comment|comments|resolve|unresolve|review|reviews|checks> [args]
188
188
  review requests (see pulls --help)
189
189
  seq-studio repos delete <ns>/<name> -e <env> [--yes] delete a repo (confirm prompt)
190
190
  seq-studio repos ci init [--dir <repository>] create a native pipeline using platform defaults
@@ -287,7 +287,9 @@ export const ORM_EXECUTE_HELP = `usage:
287
287
  installed package and platform support name selection before upgrading.
288
288
  The form is chosen by the second argument: an existing directory means a
289
289
  checkout; otherwise it is <namespace> <operation>.
290
- --variables-file takes a JSON object. --var <name>=<value> (repeatable, by
290
+ --variables-file takes a JSON object; - or /dev/stdin reads UTF-8 stdin until EOF
291
+ (the checkout form requires an ORM package with stdin support).
292
+ --var <name>=<value> (repeatable, by
291
293
  name only) sets one variable and wins over the file: numbers and booleans
292
294
  parse by the declared type, lists, filter inputs and jsonb take JSON, and other
293
295
  types take the text as is. Use the file for null.
@@ -44,6 +44,7 @@ const ORM_USAGE = `usage:
44
44
  run the deployed version's persisted operation by name as the caller (no checkout)
45
45
  seq-studio orm execute <operation> [dir] --variables-file <file> -e <env>
46
46
  execute from the checkout manifest through the installed ORM package
47
+ both execute forms accept --variables-file - (or /dev/stdin) for JSON stdin until EOF
47
48
  seq-studio orm read <namespace> <table> -e <env> [--where c=op.v]... [--select c,...] [--order c.desc] [--limit N] [--offset N] [--json|--jsonl]
48
49
  read rows of a deployed v2 namespace as the caller (row-level security applies)
49
50
  seq-studio orm sql <namespace> --query <sql> | --file <path> -e <env> [--param name[:type]=v]... | [--params <json-object>] [--json|--jsonl]
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { readFile, stat } from 'node:fs/promises';
13
13
  import { resolve } from 'node:path';
14
+ import { text } from 'node:stream/consumers';
14
15
  import { getJsonOr404, postJsonResponse } from '../atlas-client.js';
15
16
  import { printCliError } from '../cli-errors.js';
16
17
  import { validateCommandInput } from '../command-input.js';
@@ -104,7 +105,11 @@ async function readVariablesFile(args) {
104
105
  return {};
105
106
  let parsed;
106
107
  try {
107
- parsed = JSON.parse(await readFile(resolve(file), 'utf8'));
108
+ // Reopening a nonblocking stdin pipe with readFile can fail with EAGAIN.
109
+ const contents = file === '-' || file === '/dev/stdin'
110
+ ? await text(process.stdin)
111
+ : await readFile(resolve(file), 'utf8');
112
+ parsed = JSON.parse(contents);
108
113
  }
109
114
  catch (error) {
110
115
  throw new Error(`Could not read JSON variables from ${file}: ${error instanceof Error ? error.message : String(error)}`);
@@ -34,19 +34,21 @@ export declare function resolveStage({ client, slug, repo, }: {
34
34
  slug: string;
35
35
  repo?: string;
36
36
  }): Promise<StageRef>;
37
- export declare function attachSecretToStage({ client, stageId, deployTarget, symbolic, secretId, entryKey, }: {
37
+ export declare function attachSecretToStage({ client, stageId, deployTarget, symbolic, secretId, entryKey, entryMappings, }: {
38
38
  client: ClientOptions;
39
39
  stageId: string;
40
40
  deployTarget: string;
41
41
  symbolic: string;
42
42
  secretId: string;
43
43
  entryKey?: string;
44
+ entryMappings?: Record<string, string>;
44
45
  }): Promise<void>;
45
46
  export interface StageBinding {
46
47
  deployTarget: string;
47
48
  symbolic: string;
48
49
  secretId: string;
49
50
  entryKey?: string | null;
51
+ entryMappings?: Record<string, string> | null;
50
52
  secretName: string;
51
53
  }
52
54
  export declare function listStageBindings({ client, stageId }: {
@@ -34,11 +34,11 @@ export async function resolveStage({ client, slug, repo, }) {
34
34
  }
35
35
  return stages[0];
36
36
  }
37
- export async function attachSecretToStage({ client, stageId, deployTarget, symbolic, secretId, entryKey, }) {
37
+ export async function attachSecretToStage({ client, stageId, deployTarget, symbolic, secretId, entryKey, entryMappings, }) {
38
38
  await postJson({
39
39
  ...client,
40
40
  path: `/api/data-pipelines/stages/${encodeURIComponent(stageId)}/secret-bindings`,
41
- body: { deployTarget, symbolic, secretId, ...(entryKey ? { entryKey } : {}) },
41
+ body: { deployTarget, symbolic, secretId, ...(entryKey ? { entryKey } : {}), ...(entryMappings ? { entryMappings } : {}) },
42
42
  });
43
43
  }
44
44
  export async function listStageBindings({ client, stageId }) {
@@ -1,12 +1,2 @@
1
- /**
2
- * First-party packages a scaffolded project may resolve, directly or
3
- * transitively (studio-cli → managed-functions → storage, artifact-studio →
4
- * custom-roles-manifest, …). Scaffolds exempt exactly these from pnpm's
5
- * seven-day `minimumReleaseAge` gate: they ship from the Studio repo's audited
6
- * release pipeline, so a fresh scaffold must install the day they publish.
7
- * A missing entry fails `pnpm install` for a week after every release.
8
- *
9
- * The YAML templates under templates/ carry the same list; a test keeps them
10
- * in sync with this one.
11
- */
12
- export declare const FIRST_PARTY_RELEASE_AGE_EXCLUDE: readonly ["@sequenceholdings/agent-spec", "@sequenceholdings/artifact-studio", "@sequenceholdings/atlas-ui", "@sequenceholdings/custom-roles-manifest", "@sequenceholdings/lattice", "@sequenceholdings/lattice-form-renderer", "@sequenceholdings/managed-functions", "@sequenceholdings/orm", "@sequenceholdings/pipeline-spec", "@sequenceholdings/platform", "@sequenceholdings/storage", "@sequenceholdings/studio-cli"];
1
+ /** First-party releases may resolve immediately; third-party packages retain the seven-day gate. */
2
+ export declare const FIRST_PARTY_RELEASE_AGE_EXCLUDE: readonly ["@sequenceholdings/*"];
@@ -1,25 +1,2 @@
1
- /**
2
- * First-party packages a scaffolded project may resolve, directly or
3
- * transitively (studio-cli → managed-functions → storage, artifact-studio →
4
- * custom-roles-manifest, …). Scaffolds exempt exactly these from pnpm's
5
- * seven-day `minimumReleaseAge` gate: they ship from the Studio repo's audited
6
- * release pipeline, so a fresh scaffold must install the day they publish.
7
- * A missing entry fails `pnpm install` for a week after every release.
8
- *
9
- * The YAML templates under templates/ carry the same list; a test keeps them
10
- * in sync with this one.
11
- */
12
- export const FIRST_PARTY_RELEASE_AGE_EXCLUDE = [
13
- '@sequenceholdings/agent-spec',
14
- '@sequenceholdings/artifact-studio',
15
- '@sequenceholdings/atlas-ui',
16
- '@sequenceholdings/custom-roles-manifest',
17
- '@sequenceholdings/lattice',
18
- '@sequenceholdings/lattice-form-renderer',
19
- '@sequenceholdings/managed-functions',
20
- '@sequenceholdings/orm',
21
- '@sequenceholdings/pipeline-spec',
22
- '@sequenceholdings/platform',
23
- '@sequenceholdings/storage',
24
- '@sequenceholdings/studio-cli',
25
- ];
1
+ /** First-party releases may resolve immediately; third-party packages retain the seven-day gate. */
2
+ export const FIRST_PARTY_RELEASE_AGE_EXCLUDE = ['@sequenceholdings/*'];
@@ -1,5 +1,5 @@
1
1
  import type { ParsedArgs } from '../process/commands.js';
2
- export declare const PULLS_USAGE = "usage:\n seq-studio repos pulls list <ns>/<name> -e <env> [--state open|closed|merged] [--limit N] [--cursor <cursor>]\n seq-studio repos pulls show <ns>/<name> <number> -e <env>\n seq-studio repos pulls create <ns>/<name> --head <branch> --base <branch> --title <title> -e <env> [--body-file <path>]\n seq-studio repos pulls diff <ns>/<name> <number> -e <env> [--max-files N]\n seq-studio repos pulls merge <ns>/<name> <number> -e <env> [--method squash|merge|ff] [--message <text>] [--yes]\n seq-studio repos pulls close <ns>/<name> <number> -e <env>\n seq-studio repos pulls comment <ns>/<name> <number> -e <env> (--body <text> | --body-file <path>)\n [--path <file> --line N [--side LEFT|RIGHT] [--commit <sha>]] [--reply-to <comment-id>]\n seq-studio repos pulls comments <ns>/<name> <number> -e <env> [--limit N] [--cursor <cursor>]\n seq-studio repos pulls review <ns>/<name> <number> -e <env> (--approve | --request-changes | --comment)\n [--body <text> | --body-file <path>] [--commit <sha>]\n seq-studio repos pulls reviews <ns>/<name> <number> -e <env> [--limit N] [--cursor <cursor>]\n seq-studio repos pulls checks <ns>/<name> <number> -e <env> [--head <sha>]\n\n All results are JSON (--json is accepted). Authenticate: seq-studio login --env <env>.\n create needs repository write; merge needs merge/admin authority and passing server\n review/check policy. There is no policy bypass. Review show and diff before merging.\n Merge operates on the current branch head under server policy. When repository CI\n checks the branch, merge sends the checked head and base revisions; a newer push\n makes the server refuse until checks rerun. Default merge method: squash.\n list returns one page with nextCursor; pass --cursor to continue.\n diff compares live base/head branches for open Pulls, recorded SHAs for terminal\n Pulls, and reports truncated when its file\n limit is reached (default 100, maximum 500).\n close needs to be the Pull's author or have repository write; it is idempotent.\n comment adds a Pull comment; --path and --line anchor it to a diff line (side RIGHT\n and the branch's current commit unless --side/--commit say otherwise), and\n --reply-to answers an existing thread. review records approve, request-changes, or\n comment against the commit the Pull's branch points at now (or --commit). checks prints the check runs,\n CI plan and runs, and merge gates (mergeability, reviews, code owners) in one object.\n repos pull (singular) materializes files; repos pulls manages review requests.\n";
2
+ export declare const PULLS_USAGE = "usage:\n seq-studio repos pulls list <ns>/<name> -e <env> [--state open|closed|merged] [--limit N] [--cursor <cursor>]\n seq-studio repos pulls show <ns>/<name> <number> -e <env>\n seq-studio repos pulls create <ns>/<name> --head <branch> --base <branch> --title <title> -e <env> [--body-file <path>]\n seq-studio repos pulls diff <ns>/<name> <number> -e <env> [--max-files N]\n seq-studio repos pulls merge <ns>/<name> <number> -e <env> [--method squash|merge|ff] [--message <text>] [--yes]\n seq-studio repos pulls close <ns>/<name> <number> -e <env>\n seq-studio repos pulls comment <ns>/<name> <number> -e <env> (--body <text> | --body-file <path>)\n [--path <file> --line N [--side LEFT|RIGHT] [--commit <sha>]] [--reply-to <comment-id>]\n seq-studio repos pulls comments <ns>/<name> <number> -e <env> [--limit N] [--cursor <cursor>]\n seq-studio repos pulls resolve <ns>/<name> <number> <root-comment-id> -e <env>\n seq-studio repos pulls unresolve <ns>/<name> <number> <root-comment-id> -e <env>\n seq-studio repos pulls review <ns>/<name> <number> -e <env> (--approve | --request-changes | --comment)\n [--body <text> | --body-file <path>] [--commit <sha>]\n seq-studio repos pulls reviews <ns>/<name> <number> -e <env> [--limit N] [--cursor <cursor>]\n seq-studio repos pulls checks <ns>/<name> <number> -e <env> [--head <sha>]\n\n All results are JSON (--json is accepted). Authenticate: seq-studio login --env <env>.\n create needs repository write; merge needs merge/admin authority and passing server\n review/check policy. There is no policy bypass. Review show and diff before merging.\n Merge operates on the current branch head under server policy. When repository CI\n checks the branch, merge sends the checked head and base revisions; a newer push\n makes the server refuse until checks rerun. Default merge method: squash.\n list returns one page with nextCursor; pass --cursor to continue.\n diff compares live base/head branches for open Pulls, recorded SHAs for terminal\n Pulls, and reports truncated when its file\n limit is reached (default 100, maximum 500).\n close needs to be the Pull's author or have repository write; it is idempotent.\n comment adds a Pull comment; --path and --line anchor it to a diff line (side RIGHT\n and the branch's current commit unless --side/--commit say otherwise), and\n --reply-to answers an existing thread. review records approve, request-changes, or\n comment against the commit the Pull's branch points at now (or --commit). checks prints the check runs,\n CI plan and runs, and merge gates (mergeability, reviews, code owners) in one object.\n resolve and unresolve require repository read access and a root comment UUID from\n comments; the server rejects replies. They return the updated comment as JSON.\n repos pull (singular) materializes files; repos pulls manages review requests.\n";
3
3
  /** Only the revisions this command needs from GET .../pulls/<n>/ci. */
4
4
  interface PullCiStatus {
5
5
  plan?: {
@@ -1,6 +1,7 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { resolveCommitSha, resolveRepo } from '@sequenceholdings/artifact-studio/git-service-client';
3
- import { getJson, postJson } from '../atlas-client.js';
3
+ import { z } from 'zod';
4
+ import { getJson, patchJson, postJson } from '../atlas-client.js';
4
5
  import { requiredStringFlag, validateCommandInput, wantsHelp } from '../command-input.js';
5
6
  import { clientOptions } from '../functions/commands.js';
6
7
  import { confirmYes } from '../prompt.js';
@@ -15,6 +16,8 @@ export const PULLS_USAGE = `usage:
15
16
  seq-studio repos pulls comment <ns>/<name> <number> -e <env> (--body <text> | --body-file <path>)
16
17
  [--path <file> --line N [--side LEFT|RIGHT] [--commit <sha>]] [--reply-to <comment-id>]
17
18
  seq-studio repos pulls comments <ns>/<name> <number> -e <env> [--limit N] [--cursor <cursor>]
19
+ seq-studio repos pulls resolve <ns>/<name> <number> <root-comment-id> -e <env>
20
+ seq-studio repos pulls unresolve <ns>/<name> <number> <root-comment-id> -e <env>
18
21
  seq-studio repos pulls review <ns>/<name> <number> -e <env> (--approve | --request-changes | --comment)
19
22
  [--body <text> | --body-file <path>] [--commit <sha>]
20
23
  seq-studio repos pulls reviews <ns>/<name> <number> -e <env> [--limit N] [--cursor <cursor>]
@@ -36,6 +39,8 @@ export const PULLS_USAGE = `usage:
36
39
  --reply-to answers an existing thread. review records approve, request-changes, or
37
40
  comment against the commit the Pull's branch points at now (or --commit). checks prints the check runs,
38
41
  CI plan and runs, and merge gates (mergeability, reviews, code owners) in one object.
42
+ resolve and unresolve require repository read access and a root comment UUID from
43
+ comments; the server rejects replies. They return the updated comment as JSON.
39
44
  repos pull (singular) materializes files; repos pulls manages review requests.
40
45
  `;
41
46
  /**
@@ -68,6 +73,8 @@ function actionFlags(action) {
68
73
  case 'comment': return { body: 'string', 'body-file': 'string', path: 'string', line: 'string', side: 'string', commit: 'string', 'reply-to': 'string' };
69
74
  case 'comments':
70
75
  case 'reviews': return { limit: 'string', cursor: 'string' };
76
+ case 'resolve':
77
+ case 'unresolve': return {};
71
78
  case 'review': return { approve: 'boolean', 'request-changes': 'boolean', comment: 'boolean', body: 'string', 'body-file': 'string', commit: 'string' };
72
79
  case 'checks': return { head: 'string' };
73
80
  default: throw new Error(`Unknown pulls command: ${action}. See: seq-studio repos pulls --help`);
@@ -201,6 +208,13 @@ async function pullInput({ action, args }) {
201
208
  return { review: await reviewInput(args) };
202
209
  if (action === 'checks')
203
210
  return { head: shaFlag({ args, key: 'head' }) };
211
+ if (action === 'resolve' || action === 'unresolve') {
212
+ const commentId = args.positional[2];
213
+ if (typeof commentId !== 'string' || !z.uuid().safeParse(commentId).success) {
214
+ throw new Error('Root comment ID must be a UUID. Use the ID from repos pulls comments.');
215
+ }
216
+ return { commentId };
217
+ }
204
218
  return {};
205
219
  }
206
220
  /**
@@ -214,13 +228,16 @@ async function liveHeadSha({ ctx, path, repoId }) {
214
228
  return pullRequest.headSha;
215
229
  return resolveCommitSha({ ...clientOptions(ctx), repoId, ref: pullRequest.headRef });
216
230
  }
217
- /** close, comment, review, and checks: the review-request actions. */
231
+ /** Mutation and inspection actions on a review request. */
218
232
  async function reviewActionResult({ action, ctx, path, repoId, input }) {
219
233
  const options = clientOptions(ctx);
220
234
  if (action === 'close')
221
235
  return postJson({ ...options, path: `${path}/close` });
222
236
  if (action === 'checks')
223
237
  return pullChecks({ ctx, path, head: input.head });
238
+ if (action === 'resolve' || action === 'unresolve') {
239
+ return patchJson({ ...options, path: `${path}/comments/${input.commentId}`, body: { resolved: action === 'resolve' } });
240
+ }
224
241
  if (action === 'comment') {
225
242
  const body = input.body;
226
243
  const anchored = body.path !== undefined && body.commitSha === undefined
@@ -251,7 +268,7 @@ async function pullRead({ action, args, ctx, path, state, limit }) {
251
268
  const listPath = action === 'comments' || action === 'reviews' ? `${path}/${action}` : path;
252
269
  return getJson({ ...clientOptions(ctx), path: `${listPath}${query.size ? `?${query}` : ''}` });
253
270
  }
254
- const REVIEW_ACTIONS = new Set(['close', 'comment', 'review', 'checks']);
271
+ const REVIEW_ACTIONS = new Set(['close', 'comment', 'review', 'checks', 'resolve', 'unresolve']);
255
272
  export async function reposPullsCommand(input) {
256
273
  const [action, ...positional] = input.positional;
257
274
  if (!action || wantsHelp({ sub: action, args: input })) {
@@ -259,7 +276,7 @@ export async function reposPullsCommand(input) {
259
276
  return action || input.flags.help ? 0 : 1;
260
277
  }
261
278
  const args = { ...input, positional };
262
- validateCommandInput({ args, flags: actionFlags(action), positional: ['list', 'create'].includes(action) ? 1 : 2 });
279
+ validateCommandInput({ args, flags: actionFlags(action), positional: ['list', 'create'].includes(action) ? 1 : ['resolve', 'unresolve'].includes(action) ? 3 : 2 });
263
280
  const repoPath = positional[0];
264
281
  const repo = parseRepoPath(repoPath);
265
282
  const { state, limit, maxFiles } = parsePullOptions(args);
@@ -22,5 +22,5 @@ export declare function secretsSetDefaultCommand(args: ParsedArgs): Promise<numb
22
22
  * UI: pin + redeploy the function's active version / pin only / cancel.
23
23
  */
24
24
  export declare function secretsPinCommand(args: ParsedArgs): Promise<number>;
25
- export declare const SECRETS_USAGE = "usage:\n seq-studio secrets create <NAME> -e <env> [--type key-value|single] [--org <slug>] [--description text]\n register an org-owned secret\n seq-studio secrets set <NAME> -e <env> [--org <slug>] [--from-file <path>|--from-json <path>] [--merge]\n set the shared default value (write-only)\n seq-studio secrets list -e <env> secrets you can see (never values)\n seq-studio secrets attach <NAME> --fn <slug> -e <env> [--org <slug>] [--map KEY=ENV,KEY=ENV]\n mount default on a function env var\n seq-studio secrets detach <NAME> --fn <slug> -e <env> [--org <slug>]\n remove attachment\n seq-studio secrets attach <NAME> --stage <slug> -e <env> [--target <id>] [--credential <name>] [--entry KEY]\n attach to a pipeline stage's credential for one deploy target\n seq-studio secrets detach <NAME> --stage <slug> -e <env> [--target <id>] [--credential <name>]\n remove it (the stage's copy is deleted now)\n seq-studio secrets apply --from-env-file .env -e <env> push defaults + attach (keys default from manifest)\n seq-studio secrets versions <NAME> -e <env> [--org <slug>] value version history (never values)\n seq-studio secrets set-default <NAME> [version] -e <env> [--org <slug>]\n point the default at a prior version (editor)\n seq-studio secrets pin <NAME> --fn <slug> [version] -e <env> [--org <slug>]\n pin one function to a version (sticky; --unpin clears)\n\n Note: for the common deploy loop, secrets declared in managed-function.yml are\n reconciled automatically by `seq-studio functions deploy` using a local .env.\n Explicit function attachments require the same secret source and mapping in the active manifest.\n Use `secrets` commands for CI (no .env), bulk/multi-function ops, or write-only\n value changes without a redeploy.\n\n Pipelines: managed secrets are the preferred way to give a stage a credential.\n Declare source.credential in the stage spec and read it in code with\n pipeline_runtime.get_credential(\"<name>\"). `seq-studio pipeline plan|deploy`\n attaches the secret named by convention (abrigo_oauth -> ABRIGO_OAUTH) when\n you can edit it (stages already deployed the legacy way are left alone); use\n `secrets attach --stage` for any other name.\n\n Flags: -e/--env <env> (required; see: seq-studio envs list)\n --org <slug> (target/select managed-scope org; required when a name exists in multiple orgs)\n set: --from-file <path> for single values; --from-json <path> for key/value sets; --merge changes only listed entries (null removes one)\n --fn <slug> \u00B7 --env-var <NAME> \u00B7 --yes\n --stage <slug> \u00B7 --target <id> (deploy target; default from -e) \u00B7 --credential <name> \u00B7 --entry <KEY> (key/value sets)\n (the spec's source.credential; default: NAME lowercased) \u00B7 --repo <ns>/<name> (disambiguate)\n --functions <f1,f2> \u00B7 --keys <K1,K2> \u00B7 --all (override key selection)\n set-default: [version|version-row-id] (defaults to the most recent non-default) \u00B7 --yes\n pin: [version|version-row-id] (defaults to the current default) \u00B7 --unpin \u00B7 --yes (redeploy) \u00B7 --yes --no-redeploy\n";
25
+ export declare const SECRETS_USAGE = "usage:\n seq-studio secrets create <NAME> -e <env> [--type key-value|single] [--org <slug>] [--description text]\n register an org-owned secret\n seq-studio secrets set <NAME> -e <env> [--org <slug>] [--from-file <path>|--from-json <path>] [--merge]\n set the shared default value (write-only)\n seq-studio secrets list -e <env> secrets you can see (never values)\n seq-studio secrets attach <NAME> --fn <slug> -e <env> [--org <slug>] [--map KEY=ENV,KEY=ENV]\n mount default on a function env var\n seq-studio secrets detach <NAME> --fn <slug> -e <env> [--org <slug>]\n remove attachment\n seq-studio secrets attach <NAME> --stage <slug> -e <env> [--target <id>] [--credential <name>] [--entry KEY | --fields field=KEY,field=KEY]\n attach to a pipeline stage's credential for one deploy target\n seq-studio secrets detach <NAME> --stage <slug> -e <env> [--target <id>] [--credential <name>]\n remove it (the stage's copy is deleted now)\n seq-studio secrets apply --from-env-file .env -e <env> push defaults + attach (keys default from manifest)\n seq-studio secrets versions <NAME> -e <env> [--org <slug>] value version history (never values)\n seq-studio secrets set-default <NAME> [version] -e <env> [--org <slug>]\n point the default at a prior version (editor)\n seq-studio secrets pin <NAME> --fn <slug> [version] -e <env> [--org <slug>]\n pin one function to a version (sticky; --unpin clears)\n\n Note: for the common deploy loop, secrets declared in managed-function.yml are\n reconciled automatically by `seq-studio functions deploy` using a local .env.\n Explicit function attachments require the same secret source and mapping in the active manifest.\n Use `secrets` commands for CI (no .env), bulk/multi-function ops, or write-only\n value changes without a redeploy.\n\n Pipelines: managed secrets are the preferred way to give a stage a credential.\n Declare source.credential in the stage spec and read it in code with\n pipeline_runtime.get_credential(\"<name>\"). `seq-studio pipeline plan|deploy`\n attaches the secret named by convention (abrigo_oauth -> ABRIGO_OAUTH) when\n you can edit it (stages already deployed the legacy way are left alone); use\n `secrets attach --stage` for any other name.\n\n Flags: -e/--env <env> (required; see: seq-studio envs list)\n --org <slug> (target/select managed-scope org; required when a name exists in multiple orgs)\n set: --from-file <path> for single values; --from-json <path> for key/value sets; --merge changes only listed entries (null removes one)\n --fn <slug> \u00B7 --env-var <NAME> \u00B7 --yes\n --stage <slug> \u00B7 --target <id> (deploy target; default from -e) \u00B7 --credential <name> \u00B7 --entry <KEY> or --fields field=KEY,field=KEY (key/value sets)\n (the spec's source.credential; default: NAME lowercased) \u00B7 --repo <ns>/<name> (disambiguate)\n --functions <f1,f2> \u00B7 --keys <K1,K2> \u00B7 --all (override key selection)\n set-default: [version|version-row-id] (defaults to the most recent non-default) \u00B7 --yes\n pin: [version|version-row-id] (defaults to the current default) \u00B7 --unpin \u00B7 --yes (redeploy) \u00B7 --yes --no-redeploy\n";
26
26
  export declare function runSecretsCommand(sub: string | undefined, args: ParsedArgs): Promise<number>;
@@ -309,12 +309,26 @@ async function secretsAttachToStage(args, name) {
309
309
  const ctx = await buildContext(args);
310
310
  const secret = await resolveSecretByName({ ctx, name, org: orgFlag(args) });
311
311
  const entryKey = typeof args.flags.entry === 'string' ? args.flags.entry : undefined;
312
- if (secret.valueType === 'key_value' && !entryKey) {
313
- console.error(`${LOG} key/value set ${name} requires --entry KEY for a pipeline credential`);
312
+ const fieldsFlag = typeof args.flags.fields === 'string' ? args.flags.fields : undefined;
313
+ let entryMappings;
314
+ if (fieldsFlag) {
315
+ const pairs = fieldsFlag.split(',').map((part) => part.trim().split('='));
316
+ if (pairs.length < 2 || pairs.length > 32 || pairs.some((pair) => pair.length !== 2 || !/^[a-z][a-z0-9_]*$/.test(pair[0] ?? '') || !/^[A-Z][A-Z0-9_]*$/.test(pair[1] ?? '')) || new Set(pairs.map((pair) => pair[0])).size !== pairs.length) {
317
+ console.error(`${LOG} --fields requires 2 to 32 distinct field=SECRET_ENTRY pairs`);
318
+ return 1;
319
+ }
320
+ entryMappings = Object.fromEntries(pairs.map(([field, key]) => [field, key]));
321
+ }
322
+ if (entryKey && entryMappings) {
323
+ console.error(`${LOG} choose --entry or --fields, not both`);
324
+ return 1;
325
+ }
326
+ if (secret.valueType === 'key_value' && !entryKey && !entryMappings) {
327
+ console.error(`${LOG} key/value set ${name} requires --entry KEY or --fields field=KEY,field=KEY`);
314
328
  return 1;
315
329
  }
316
- if (secret.valueType !== 'key_value' && entryKey) {
317
- console.error(`${LOG} --entry is only for key/value sets`);
330
+ if (secret.valueType !== 'key_value' && (entryKey || entryMappings)) {
331
+ console.error(`${LOG} --entry and --fields are only for key/value sets`);
318
332
  return 1;
319
333
  }
320
334
  const { stage, symbolic, deployTarget } = await resolveStageAttachment({ args, ctx, name });
@@ -322,6 +336,7 @@ async function secretsAttachToStage(args, name) {
322
336
  `${LOG} attach preview:`,
323
337
  `${LOG} secret: ${name}`,
324
338
  ...(entryKey ? [`${LOG} entry: ${entryKey}`] : []),
339
+ ...(entryMappings ? [`${LOG} fields: ${Object.entries(entryMappings).map(([field, key]) => `${field}=${key}`).join(',')}`] : []),
325
340
  `${LOG} stage: ${stage.slug} (${stage.repo})`,
326
341
  `${LOG} credential: ${symbolic}`,
327
342
  `${LOG} target: ${deployTarget}`,
@@ -329,7 +344,7 @@ async function secretsAttachToStage(args, name) {
329
344
  ];
330
345
  if (!(await confirmYes({ preview, confirmed: flagBool(args.flags, 'yes') })))
331
346
  return 1;
332
- await attachSecretToStage({ client: clientOptions(ctx), stageId: stage.id, deployTarget, symbolic, secretId: secret.id, entryKey });
347
+ await attachSecretToStage({ client: clientOptions(ctx), stageId: stage.id, deployTarget, symbolic, secretId: secret.id, entryKey, entryMappings });
333
348
  console.log(`${LOG} attached "${name}" to ${stage.slug} as ${symbolic} for ${deployTarget}`);
334
349
  console.log(`${LOG} plan and deploy the stage to copy it; read it with pipeline_runtime.get_credential("${symbolic}")`);
335
350
  return 0;
@@ -360,7 +375,7 @@ export async function secretsAttachCommand(args) {
360
375
  const fnSlug = typeof args.flags.fn === 'string' ? args.flags.fn : args.positional[1];
361
376
  if (!name || !fnSlug) {
362
377
  console.error('usage: seq-studio secrets attach <NAME> --fn <slug> -e <env> [--org <slug>] [--env-var NAME] [--map KEY=ENV,KEY=ENV]\n' +
363
- ' seq-studio secrets attach <NAME> --stage <slug> -e <env> [--target <id>] [--credential <name>] [--entry KEY] [--repo <ns>/<name>] [--org <slug>]');
378
+ ' seq-studio secrets attach <NAME> --stage <slug> -e <env> [--target <id>] [--credential <name>] [--entry KEY | --fields field=KEY,field=KEY] [--repo <ns>/<name>] [--org <slug>]');
364
379
  return 1;
365
380
  }
366
381
  const ctx = await buildContext(args);
@@ -842,7 +857,7 @@ export const SECRETS_USAGE = `usage:
842
857
  mount default on a function env var
843
858
  seq-studio secrets detach <NAME> --fn <slug> -e <env> [--org <slug>]
844
859
  remove attachment
845
- seq-studio secrets attach <NAME> --stage <slug> -e <env> [--target <id>] [--credential <name>] [--entry KEY]
860
+ seq-studio secrets attach <NAME> --stage <slug> -e <env> [--target <id>] [--credential <name>] [--entry KEY | --fields field=KEY,field=KEY]
846
861
  attach to a pipeline stage's credential for one deploy target
847
862
  seq-studio secrets detach <NAME> --stage <slug> -e <env> [--target <id>] [--credential <name>]
848
863
  remove it (the stage's copy is deleted now)
@@ -870,7 +885,7 @@ export const SECRETS_USAGE = `usage:
870
885
  --org <slug> (target/select managed-scope org; required when a name exists in multiple orgs)
871
886
  set: --from-file <path> for single values; --from-json <path> for key/value sets; --merge changes only listed entries (null removes one)
872
887
  --fn <slug> · --env-var <NAME> · --yes
873
- --stage <slug> · --target <id> (deploy target; default from -e) · --credential <name> · --entry <KEY> (key/value sets)
888
+ --stage <slug> · --target <id> (deploy target; default from -e) · --credential <name> · --entry <KEY> or --fields field=KEY,field=KEY (key/value sets)
874
889
  (the spec's source.credential; default: NAME lowercased) · --repo <ns>/<name> (disambiguate)
875
890
  --functions <f1,f2> · --keys <K1,K2> · --all (override key selection)
876
891
  set-default: [version|version-row-id] (defaults to the most recent non-default) · --yes
@@ -1,28 +1,5 @@
1
- # Sequence supply-chain guard: require packages to be at least 7 days
2
- # old before they can be installed. Mirrors the Studio monorepo policy
3
- # (`pnpm-workspace.yaml` at the root). External process repos
4
- # scaffolded by `seq-studio process init` inherit the same guard so a
5
- # freshly-published malicious version of `@sequenceholdings/lattice` (or
6
- # any transitive dep) is gated out for a week, giving us time to react.
7
- #
8
- # 10080 minutes = 7 days. Increase if you want a longer window; do not
9
- # remove this without security review.
1
+ # First-party releases resolve immediately; external dependencies retain the
2
+ # seven-day quarantine used by the Studio monorepo.
10
3
  minimumReleaseAge: 10080
11
-
12
- # The seq-studio publish chain is exempt: those packages are published
13
- # from the Studio repo's audited CI pipeline, and consumers shouldn't
14
- # wait a week to pick up a new seq-studio / lattice release. Scoped to
15
- # the exact packages (not @sequenceholdings/*) to limit blast radius.
16
4
  minimumReleaseAgeExclude:
17
- - '@sequenceholdings/agent-spec'
18
- - '@sequenceholdings/artifact-studio'
19
- - '@sequenceholdings/atlas-ui'
20
- - '@sequenceholdings/custom-roles-manifest'
21
- - '@sequenceholdings/lattice'
22
- - '@sequenceholdings/lattice-form-renderer'
23
- - '@sequenceholdings/managed-functions'
24
- - '@sequenceholdings/orm'
25
- - '@sequenceholdings/pipeline-spec'
26
- - '@sequenceholdings/platform'
27
- - '@sequenceholdings/storage'
28
- - '@sequenceholdings/studio-cli'
5
+ - '@sequenceholdings/*'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequenceholdings/studio-cli",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
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,15 +45,15 @@
45
45
  "yaml": "^2.8.4",
46
46
  "zod": "^4.1.13",
47
47
  "@sequenceholdings/agent-spec": "0.1.5",
48
- "@sequenceholdings/artifact-studio": "0.11.2",
48
+ "@sequenceholdings/artifact-studio": "0.11.4",
49
49
  "@sequenceholdings/lattice": "0.1.8",
50
- "@sequenceholdings/managed-functions": "0.5.2",
50
+ "@sequenceholdings/managed-functions": "0.5.4",
51
51
  "@sequenceholdings/storage": "0.1.4",
52
52
  "@sequenceholdings/platform": "0.1.1"
53
53
  },
54
54
  "peerDependencies": {
55
- "@sequenceholdings/orm": "2.8.1",
56
- "@sequenceholdings/pipeline-spec": "0.3.1"
55
+ "@sequenceholdings/orm": "2.8.3",
56
+ "@sequenceholdings/pipeline-spec": "0.3.3"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@sequenceholdings/orm": {
@@ -69,8 +69,8 @@
69
69
  "@types/semver": "^7.8.0",
70
70
  "typescript": "^5.6.0",
71
71
  "vitest": "^4.1.11",
72
- "@sequenceholdings/orm": "2.8.1",
73
- "@sequenceholdings/pipeline-spec": "0.3.1"
72
+ "@sequenceholdings/pipeline-spec": "0.3.3",
73
+ "@sequenceholdings/orm": "2.8.3"
74
74
  },
75
75
  "engines": {
76
76
  "node": ">=20"
@@ -1,28 +1,5 @@
1
- # Sequence supply-chain guard: require packages to be at least 7 days
2
- # old before they can be installed. Mirrors the Studio monorepo policy
3
- # (`pnpm-workspace.yaml` at the root). External process repos
4
- # scaffolded by `seq-studio process init` inherit the same guard so a
5
- # freshly-published malicious version of `@sequenceholdings/lattice` (or
6
- # any transitive dep) is gated out for a week, giving us time to react.
7
- #
8
- # 10080 minutes = 7 days. Increase if you want a longer window; do not
9
- # remove this without security review.
1
+ # First-party releases resolve immediately; external dependencies retain the
2
+ # seven-day quarantine used by the Studio monorepo.
10
3
  minimumReleaseAge: 10080
11
-
12
- # The seq-studio publish chain is exempt: those packages are published
13
- # from the Studio repo's audited CI pipeline, and consumers shouldn't
14
- # wait a week to pick up a new seq-studio / lattice release. Scoped to
15
- # the exact packages (not @sequenceholdings/*) to limit blast radius.
16
4
  minimumReleaseAgeExclude:
17
- - '@sequenceholdings/agent-spec'
18
- - '@sequenceholdings/artifact-studio'
19
- - '@sequenceholdings/atlas-ui'
20
- - '@sequenceholdings/custom-roles-manifest'
21
- - '@sequenceholdings/lattice'
22
- - '@sequenceholdings/lattice-form-renderer'
23
- - '@sequenceholdings/managed-functions'
24
- - '@sequenceholdings/orm'
25
- - '@sequenceholdings/pipeline-spec'
26
- - '@sequenceholdings/platform'
27
- - '@sequenceholdings/storage'
28
- - '@sequenceholdings/studio-cli'
5
+ - '@sequenceholdings/*'