@sequenceholdings/studio-cli
v1.0.8
Published
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
Readme
@sequenceholdings/studio-cli — seq-studio
Standalone CLI for the Sequence platform: typed agents, Lattice processes, Artifact Studio apps, Managed Functions, Managed Secrets, ORM namespaces, Data Pipelines stage specs, and platform git repos. Its published workflows run from any repo against the platform over HTTP — no monorepo checkout required. The v0 app-monorepo commands below are currently internal; see their availability notice.
seq-studio process validate
seq-studio process plan -e <env>
seq-studio process apply -e <env>
seq-studio agent validate
seq-studio agent plan -e <env>
seq-studio artifact deploy -e <env>
seq-studio orm init lending
seq-studio pipeline validate
seq-studio templates list -e <env>
seq-studio init my-app --template <name>@<version> -e <env>
seq-studio envs list
seq-studio doctorPublished repository templates are available only to identities with reader
access to the environment's template catalog and repository. init --template
verifies and copies the selected release into a new or empty directory.
Note: all network commands require a Sequence platform account with the appropriate permissions. Without one, only the offline commands (
initwithout--templateor--repo,lint,simulate,build,bundle inspect,agents init,agents validate, offlineagents plan,pipeline init,pipeline validate) work. Repo and function command help is also available without an account; for example,seq-studio repos create --helpandseq-studio function run --help. An unknown subcommand, including one followed by--help, exits nonzero and points to the namespace help; check command spelling before retrying. Sequence-internal contributors: seeINTERNAL.mdin the monorepo for rollout SOPs, preview environments, and publishing docs.
seq-studio capabilities prints the versioned command/access summary; pass
--json for automation. It reports this CLI's command groups and does not imply
that the underlying platform HTTP routes are public contracts.
Authenticated commands send a best-effort completion event to the Atlas
environment they use, recording command name, outcome, duration, and CLI version
without arguments or error messages. Command telemetry is on by default. Use
seq-studio telemetry disable|enable|status to control it, or set
SEQ_STUDIO_TELEMETRY=off for one process. This setting affects command events;
Atlas still records authenticated API activity for version adoption.
Piped output
Commands with --json (or --jsonl) write only their structured result to
stdout, so seq-studio … --json | jq parses: while either flag is set, every
human status, progress, or hint line goes to stderr, including lines from the
delegated ORM and Artifact Studio commands. The executable
allows stdout and stderr to drain before normal exit, including for large
responses and nonzero command statuses. Check the exit status before using a
result; an interrupted process or a closed downstream pipe can still leave
incomplete output. CLI output delivery does not remove a server's row/page cap:
inspect truncated and pagination metadata where present.
Install
# In a process or artifact repo (devDependency, using pnpm — see below):
pnpm add -D @sequenceholdings/studio-cli @sequenceholdings/lattice
# Or globally:
pnpm add -g @sequenceholdings/studio-cliGlobal installations made with pnpm 10.28.2 through 10.x automatically follow the
latest npm tag on user machines. The CLI checks in the background at most
daily and upgrades only when the running package matches that pnpm global
installation. The command that triggered the check finishes before the upgrade;
the next eligible command reports a successful update on stderr. Run
seq-studio updater track next for previews, seq-studio updater track latest
to return, or seq-studio updater status to inspect the selected track.
Set SEQ_STUDIO_NO_AUTO_UPDATE=1 to keep update notices without installing
updates. Project dependencies, CI, and pinned devboxes keep their own versions.
Why pnpm and not npm
Sequence uses pnpm's minimumReleaseAge setting (in pnpm-workspace.yaml)
as a 7-day supply-chain quarantine on new package releases. npm has no
equivalent and would happily install a freshly-published malicious
version of any transitive dep. External process repos scaffolded by
seq-studio process init ship a pnpm-workspace.yaml with the same
guard. Stick with pnpm so the policy actually applies.
The scaffold's first-party quarantine exemptions are agent-spec,
artifact-studio, atlas-ui, custom-roles-manifest, lattice,
lattice-form-renderer, managed-functions, orm, pipeline-spec, platform,
storage, and studio-cli, all under @sequenceholdings/. These packages come
from the Studio repo's own publish pipelines, so new seq-studio releases
install immediately. Third-party dependencies retain the seven-day quarantine.
All initializers include a short AGENTS.md pointing to the target environment's
live /docs and /docs/llms.txt, plus a CLAUDE.md importing it. Use these paths
on the actual Atlas URL supplied by your platform administrator; a CLI environment
name is a configuration label, not a hostname. Agents should
read those docs at the start of each task and consult them as needed; platform
instructions stay in the hosted docs rather than being copied into scaffolds.
Existing agent instruction files are preserved or initialization is refused.
Authenticate
Run the built-in browser login. seq-studio and seqapi share short-lived
access tokens at ~/.config/sequence-api/tokens.json, so logging in with either
CLI authenticates both. Refresh tokens are neither requested nor persisted;
interactive commands perform a bounded PKCE login again after expiry.
seq-studio login # built-in first-party environments
seq-studio envs add bsm-staging <tenant-url> # one-time tenant registration
seq-studio login --env bsm-staging # registered OpCo tenant realm
seq-studio doctor # confirms config + auth + authorizationUse seq-studio logout to remove the shared Sequence session, or
seq-studio logout --env bsm-staging to remove only that OpCo realm's session.
Pipeline plan, deploy and status use the realm and exact origin selected by
-e, just like discovery commands. A login for a different environment is not
a substitute for that environment's session.
seq-studio doctor reports the selected environment, auth-cache state, resolved
CLI/SDK versions and paths, and deployment-access checks without printing
tokens. Use --json for structured output. --offline reads local config and
credential metadata only; it makes no discovery or HTTP requests and does not
validate whether a credential is currently accepted by Atlas.
Headless auth (CI) — M2M
When there's no interactive login (CI, automation), set the service-account
secret and seq-studio mints a token via the Auth0 client-credentials grant.
A valid cached user session wins over an ambient M2M secret (common under
Doppler atlas/dev); force the service account with SEQAPI_AUTH_MODE=m2m:
export AUTH0_M2M_CLIENT_SECRET=... # built-in first-party environments
export AUTH0_M2M_CLIENT_SECRET_BSM_STAGING=... # registered bsm-staging realm
export SEQAPI_AUTH_MODE=m2m # optional: ignore a leftover user session
seq-studio artifact deploy -e <env>Registered OpCo environment names are upper-snaked in the variable suffix
(bsm-staging → BSM_STAGING). Secrets are read at runtime — never commit them.
M2M carries app access but
no user identity / workspace membership, so it's blind to
user-scoped/private resources.
Artifact commands do not accept bearer tokens through argv or environment. Use interactive login or the realm-specific M2M secret above.
Sandbox token mode (agent sandboxes)
Run seq-studio --version inside the sandbox to see which CLI release Atlas installed.
An agent sandbox provisioned by Atlas has no browser and can reach only its Atlas origin. Atlas writes a short-lived token scoped to the calling user into a file and exports two variables:
export SEQ_STUDIO_BASE_URL=https://<your-atlas-origin>
export SEQ_STUDIO_TOKEN_FILE=/run/seq/token
seq-studio auth whoami # authMode: sandbox
seq-studio orm namespaces # what data can I read?
seq-studio orm show lending loans # columns, types, actions
seq-studio orm read lending loans --limit 5 --jsonWith both set, every command targets SEQ_STUDIO_BASE_URL with the token from
SEQ_STUDIO_TOKEN_FILE. There is no login, token cache, or environment
registry lookup, and -e is optional (any value is ignored). The file is read
again for every request, so a token Atlas rotates mid-command is picked up.
Setting only one of the two variables is an error rather than a fallback to a
cached login. seq-studio doctor reports the mode.
Git uses the same token: repos clone installs the usual helper, and the helper
answers only for git-service repositories on SEQ_STUDIO_BASE_URL. To use plain
git against that host, configure the helper once:
git config --global credential."$SEQ_STUDIO_BASE_URL".helper '!seq-studio auth git-credential'
git config --global credential."$SEQ_STUDIO_BASE_URL".useHttpPath trueRepository sources for --repo builds are materialized through the JSON API,
like other headless callers; public --git-url sources are refused.
The sandbox is temporary: Atlas resets it after inactivity and its files can be
lost. Keep real work in a git-service repository and push often. Scaffold
straight into one with --repo <ns>/<name> on any init command (see
Scaffold into a repository). After every
command, seq-studio prints one line to stderr when the current directory's
checkout has uncommitted changes or commits that are not pushed. The check is
skipped outside sandbox token mode, never changes the exit code or stdout, and
gives up silently on any Git error.
Artifact Studio apps deploy from a Git Service repository. The sandbox has no package registry, so nothing is installed or built from a local directory:
seq-studio artifact init portal --repo acme/portal # creates acme/portal if missing, clones it into ./portal
# keep package.json dependencies and optionalDependencies empty
git -C portal add -A && git -C portal commit -m "Portal" && git -C portal push -u origin HEAD
seq-studio artifact deploy --repo acme/portalAtlas builds Next.js applications from the pushed commit. A static (React/Vite)
application is bundled in the sandbox against the CLI's pinned platform
packages, so its package.json must have no entries in dependencies or
optionalDependencies; one that does is refused rather than installed. Atlas
needs a committed pnpm-lock.yaml for a Next.js build, which a sandbox cannot
generate, so start new sandbox apps from the default static template. build, plan and deploy require --repo;
dev, login, logout, --git-url and --source-env are unavailable, and --token is refused as everywhere else. List, show,
status, whoami, pull, link, promote and rollback work as usual.
Environments
The CLI ships with a single built-in environment, local
(http://localhost:5001). Add your organization's deployment with the name
and URL your administrator gives you. Registration reads the deployment's
public sign-in settings; it does not grant access.
seq-studio envs add <name> <url> # register your organization's deployment
seq-studio login --env <name> # sign in to it
seq-studio envs list # show configured environments (name, URL, source)The reserved names staging, production and banksouth are for deployments
that sign in through the shared Sequence login: envs add saves one of them to
~/.config/seq-studio/config.toml only after the deployment confirms that login,
and seq-studio login signs you in.
You can also add or override environments yourself in
~/.config/seq-studio/config.toml.
Authenticated requests accept only HTTPS origins at seqholdings.com or its
subdomains, plus HTTP loopback origins for local development. The CLI
revalidates that exact origin immediately before attaching credentials and
never follows authenticated redirects.
# Must come before any [env.*] table — TOML attaches bare keys to the
# preceding table, so a trailing default_env is silently ignored.
default_env = "local"
[env.local]
url = "http://localhost:5001"
[env.my-atlas]
url = "https://my-atlas.seqholdings.com"Pass --env <name> (or -e <name>) on commands that talk to the platform.
default_env applies to process commands. artifact commands read
config.toml only when --env is passed; with no --env they fall back to
the artifact folder's .artifact-studio/config.json defaultEnv (set by
artifact link / artifact env use).
App bundle commands
A single sequence.app.yml defines the deployable contents of an app: ORM
namespaces, Workspaces V2 workspaces, managed functions, typed agents, Lattice
processes, Data Pipelines, and Artifact Studio UIs. Shared packages are declared separately as build inputs.
Each primitive keeps its own runtime definition; the app manifest controls source
locations, dependencies, and deployment selection.
Availability: App orchestration remains an internal workflow. Standalone primitives retain their documented public/Preview availability. This change does not publish app orchestration. Function-to-ORM execution is supported by two SDK helpers:
createFunctionOrmExecutoracts as the invoking user, andcreateFunctionServiceOrmExecutoracts as the function's attached service account (for Lattice steps and other invocations with no human caller).
| Command | What it does |
|---------|--------------|
| seq-studio init <dir> [--with <kinds>] [--skip-install] [--repo <ns>/<name>] | Scaffold a version 3 app, root pnpm workspace, shared package, README, and selected primitives; by default creates ORM, function, process, and artifact primitives, installs dependencies, and authors the first ORM migration |
| seq-studio add <kind> <name> [--depends-on <ids>] [--template <t>] | Add any primitive, including additional ORM namespaces and UIs |
| seq-studio add package <name> | Add a shared TypeScript package to the manifest and pnpm workspace |
| seq-studio validate [--dir <path>] [--json] | Offline check of the app manifest, dependency graph, contained primitive directories, and resolved member refs |
| seq-studio apply -e <env> [--yes] [--only id1,id2] [--dry-run] | Validate and deploy the selected app graph, including prerequisites |
seq-studio validate works before a legacy repository is adopted: it needs no
login or environment and lists existing members such as process refs. It does
not verify that remote members exist or that primitive-specific source can
deploy. seq-studio apply --dry-run still requires the repository identity
receipt and performs its existing deployment preflight.
init accepts orm, workspace, function, agent, process, pipeline, and artifact as
a comma-separated --with list or boolean flags (--agent --process). With no
kind flags it scaffolds orm,function,process,artifact. Repository CI/CD
creates and deploys those, workspaces, pipelines and agents on merge (see
What a merge deploys). --skip-install skips the install and
migration step (offline). The first
function defaults to hello (--function-name changes it). Agent, process, and
pipeline folders use the app name. Pipelines default to transformation stages;
--pipeline-type ingestion|transformation|serving selects another template.
Artifacts default to the React/Vite template; --template nextjs (on init or
add artifact) scaffolds a Next.js application instead. A Next.js artifact keeps
its own pnpm-workspace.yaml and pnpm-lock.yaml and stays out of the app's root
workspace, because hosted builds require a standalone lockfile without workspace:
dependencies; run pnpm install inside its directory. App deploys send its
directory (for example artifacts/admin) so Atlas builds it from the app repository.
seq-studio init loan-tools
cd loan-tools
# Init installs dependencies and authors the first migration; review and commit
# pnpm-lock.yaml and orm/loan_tools/migrations/ before opening the PR.
# In a git-service repo, push a branch and open a PR: checks run automatically
# and merging main creates and deploys the declared supported primitives.
# Outside one, deploy directly:
seq-studio login -e <env>
seq-studio apply -e <env> --dry-run
seq-studio apply -e <env> --yes
seq-studio add agent reviewer
seq-studio add process approvals --depends-on reviewer-agent
seq-studio add orm audit
pnpm install
seq-studio orm build orm/audit
seq-studio orm diff orm/audit
# Review and commit orm/audit/migrations/.
seq-studio add artifact admin
seq-studio add package contracts
pnpm install
seq-studio apply -e <env> --only approvals-process --yesCreating a platform git-service repo without --git-backend (seq-studio repos
create, or the Repositories UI) seeds it with a Sequence app README on either
backend; only an explicit --git-backend walgit starts empty. A fresh clone with that seed README is a valid init . target. Inside an
existing repository, init <subdir> also declares the app in
.seq/repository.yml so repository CI picks it up. Init
preserves its git remote and existing ignores, replaces the seed README, and
refuses ordinary non-empty repositories. The initial UI stays at artifact/;
additional UIs live under artifacts/<name>/.
New scaffolds use schema version 3. Deploying all of their primitives registers the app as an Application visible in Builder Studio; scaffolding alone does not create a project there. Roles and grants are configured in Atlas after registration. Existing version 2 manifests remain supported for bundles that do not register.
One workspace, shared packages
Install once from the root and commit the generated pnpm-lock.yaml. The root
pnpm-workspace.yaml lists the manifest's JavaScript primitives and shared
packages, preserves the seven-day dependency age gate, and explicitly controls
build scripts. Generated nested install configuration is consolidated at the
root. CI should use pnpm install --frozen-lockfile.
Every new app includes packages/shared, named @<app-id>/shared. Processes
receive ordinary workspace:* dependencies. Functions and artifacts do not:
a function's deployed bundle cannot resolve workspace links, and an artifact
deployed on its own (seq-studio artifact deploy --repo) builds from its
directory alone. Add the link to an artifact or function that imports it. Export common types,
validation, and helpers from src/index.ts. Additional packages are registered
with seq-studio add package <name>; add them to consumers with:
pnpm --filter @loan-tools/primitive-hello add '@loan-tools/contracts@workspace:*'The app deployment prepares self-contained function and artifact sources from
their declared workspace dependencies. Shared packages are not independently
deployed resources. Shared source packages support JavaScript, TypeScript, and
JSON; keep browser assets in the artifact and keep shared packages independent
of primitive source directories. Shared registry dependency ranges must agree
with their consumers. Custom function builds must provide their built main
entry or set package.json seqStudio.source to an explicit source entry.
File-relative runtime constructs whose meaning would change during function
bundling fail preflight; use explicit file imports for bundled data.
Agent definitions compile to declarative data; imported helpers do not run at runtime. Lattice mapper closures cannot capture arbitrary shared executable code. Put shared runtime business logic in a managed function and reference that primitive from the workflow. For reuse between app repositories, publish versioned packages and depend on registry versions.
Scaffolds write no .npmrc (CLI 0.9.2+ also drops the functions init
one), so pnpm install resolves from the registry your user configuration
selects, @sequenceholdings packages included. Commit pnpm-lock.yaml.
Hosted repository CI installs only from Chainguard Libraries
(https://libraries.cgr.dev/javascript/), so a lockfile resolved against
another registry fails its frozen install. init (after installing) and
deploy name any such lockfile and the command that regenerates it:
pnpm install --registry=https://libraries.cgr.dev/javascript/ with Chainguard
credentials in ~/.npmrc.
Workspace deployments outside local require the root lockfile. Staging keeps
its registry resolutions and overrides; the existing Managed Functions registry
policy still applies. A lockfile from an unsupported registry is reported and
resolved again by the function service, just as in standalone function deploys.
Manifest and deployment behavior
schema_version: 3
app:
id: loan-tools
title: Loan Tools
studio:
created_with: 0.1.27
min_cli: 0.1.27
packages:
- name: '@loan-tools/shared'
path: packages/shared
primitives:
- id: reviewer-agent
kind: agent
path: agents/reviewer
- id: approvals-process
kind: process
path: processes/approvals
depends_on: [reviewer-agent]
- id: admin-ui
kind: artifact
path: artifacts/admin
project_id: admin
depends_on: [approvals-process]
deploy:
on_error: stopVersions 2 and 3 topologically order depends_on prerequisites. Optional deploy.order
is a preference among ready primitives. --only includes the selected primitives'
transitive prerequisites; use app primitive IDs, not agent/process runtime IDs.
Agent and process entries may set only to select definitions from their source
folder. Agent and pipeline entries may set target to select a deployment identity.
A workspace primitive is a Workspaces V2 workspace. Its path holds the
workspace.yml that seq-studio workspace init writes, and the entry's name
must match workspace.name in it. Deploy runs seq-studio workspace apply, an
idempotent upsert by name, so it needs the same authority as applying the file
yourself. Workspaces are never part of Application roles: their access depends
on the folders and files in them and is managed in Workspaces V2.
Workspaces V2 stores files; it does not index them yet. Agent file_search
searches Chat Workspaces only, so declaring a workspace primitive does not give
an app's agents retrieval over its files. Read the files you need from a managed
function and pass them to the agent explicitly.
Runtime dependencies (uses)
depends_on orders deploys. uses says what a primitive uses while it runs,
and draws the Application's Dependencies graph in Atlas. It never orders
deploys and grants nothing, so cycles are fine:
primitives:
- { id: loan-docs, kind: workspace, path: workspaces/loan-docs, name: loan-desk-docs }
- id: desk-api
kind: function
path: functions/desk-api
slug: loan-desk-api
uses:
- { primitive: loan-data, as: reads/writes } # `as` labels the edge
- { primitive: loan-docs, as: stores files }Every primitive appears in the graph, including agents, pipelines and
workspaces. seq-studio apply and seq-studio artifact deploy resolve these
names in the selected environment and validate explicit manifest bindings.
An artifact's selected targets.<environment>.url must match that environment's
API origin; the targets map may list every environment. A uses edge to a
workspace resolves its name in the selected environment (uses needs schema
version 2 or later). Workspaces declared in artifact.bundle.yml under
capabilities.storage or server.capabilities.storage, by ID or by name, must
exist there.
Source files, shared packages, arbitrary config keys, and environment-variable
values are not scanned for URLs or UUIDs. Repository tenant identity admission,
manifest validation, deployment permissions, and runtime authorization still apply.
After changing an ORM schema, run
seq-studio orm build <namespace-path> followed by
seq-studio orm diff <namespace-path>. Review and commit the generated migration
ledger. init authors the baseline for its initial namespace (unless
--skip-install); namespaces added later still need this workflow. A namespace without migrations fails deployment
preflight with instructions to run orm diff.
Before any deployment, all versions check the repository's adopted identity and
committed receipt against the selected server. Versions 2 and 3 then validate and
compile the selected sources. --dry-run performs this preflight without deploying;
it still needs network access and an existing authenticated session for identity
admission and never opens a login browser. Pipeline preflight additionally reads
the remote repository, validates its source, and pins the resolved commit. Local primitive
checks do not deploy resources. Official artifact deployments require the full app
checkout to be clean on main, including shared packages and the app manifest;
local deployments retain the local development path.
Pipeline entries require repo: <namespace>/<name> and ref; they may specify
target. The repo is a dedicated Pipeline repo (pipelines/<name>), an app
monorepo (apps/<name>), or your own namespace's repo. For any repo outside
pipelines, path is both the local authoring directory and the contained
pipeline root in the remote repository. A
dedicated pipelines/<name> repository retains its historical repository-root
package. Commit and push pipeline source before deploying. The
app reuses the existing pipeline release workflow and waits for completion.
Use --approved-by <caller-sub> when the target requires recorded approval and
--wait-timeout 2h to control polling. Pipeline deployment plants jobs; it does
not run them. Removing a manifest entry never implicitly deletes a resource.
deploy.on_error defaults to stop. continue deploys independent primitives
and skips dependents of failed/skipped prerequisites. The operation is not atomic:
successful deployments remain if a later primitive fails. Versions 2 and 3 record the
plan and outcomes in .sequence/deployments/<encoded-env>.json, ignored by Git.
Existing version 1 manifests retain their explicit/kind ordering, exact --only
selection, and plan-only dry run. Change schema_version to 2 to opt into the
new dependency/preflight semantics, then declare shared packages and configure a
root pnpm workspace if you want shared builds. Adding an agent, process, or pipeline to a version 1 app upgrades the manifest to version 2 and raises its minimum CLI version; it preserves existing package files and deployment-order preferences. Existing function/artifact/ORM additions retain version 1. There is no automatic migration of existing dependency files or lockfiles.
Application roles (schema version 3)
Version 3 is version 2 plus Application registration: after its primitives
deploy, the app is registered with Atlas as an Application. Create its
roles in Atlas — Permissions → Applications → the app → Edit roles, or
POST /api/custom-roles/applications/<id>/roles — so granting someone one
Application role gives them everything the app needs: each member's end-user
access plus the member roles and capabilities the role bundles. Grants are made
in Atlas too, never in the manifest.
Include everything the app runs on. Roles can only grant what the Application includes, and its access review only covers its members, so a complete member list is what makes one role enough:
Every primitive the app deploys. A directory of several agents (or processes) becomes several members by giving each its own entry with
only:— entries may share a path when each selects different definitions:primitives: - { id: classify, kind: agent, path: agents/desk, only: ["31b3b339c468f584e458a647"] } - { id: draft, kind: agent, path: agents/desk, only: [fd65cc240450d380e18af0b8] }The service accounts its code runs as, under
service_accounts:, and the secrets its functions and pipelines read, undersecrets:.Anything shared that another app deploys, under
existing:.After each deploy, act on the suggested members it prints: add what the app depends on, or mark what you mean to leave out "not needed" on the Application's Members page. A member left out keeps working; the Application just can't grant it.
A role's includes can reach
artifact,function,orm,process, andagentprimitives: a member's end-user access (invokeron functions, processes and agents), one of its registered roles, or one of its capabilities. A member role or capability doesn't grant end-user access by itself — as on the primitive, a role needs an explicit end-user include on each member its holders should be able to open.A
processprimitive offers only end-user access (starting runs), and a role can include it only when it deploys exactly one process,only: [<process-id>]:- { id: approval-flow, kind: process, path: processes/approval, only: [loan-approval] }An
agentprimitive likewise offers only end-user access (chatting with it and starting jobs), and a role can include it only when the entry deploys exactly one agent — a directory with one agent, oronly: [<agent-id>]. Its member ref is the agent id that entry deploys to the target environment, so the deploy refuses a role that reaches an entry deploying several agents. Seeing other people's conversations with the agent is never bundled.The Application registers after every primitive deploys; if one fails, it is skipped. Registering requires capability admin on every member (owner, for a process or an agent), checked on every deploy.
Members are synced every deploy. Removing one removes every role's access into it.
A Next.js artifact is an ordinary
artifactmember. Its server calls ORM and functions, and starts processes, as the signed-in user unless it declaresservice_account, so a role that includes it should also includeend_useron every namespace andinvokeron every function and process itsserver.capabilitiesreach (the same holds for any artifact's browsercapabilities). The deploy prints anaccess_gapwarning for each missing namespace, function or process grant. It never adds grants for you.An agent runs as whoever uses it, so a role giving "Can use" on an agent should also include its subagents and managed functions. The deploy prints an
access_gapwarning for each one missing, saying whether the agent requires it (runs are refused) or not (runs go ahead without it), then a link to the Application's Runtime access, where each gap is one click to fix.
Deprecated: role definitions in YAML
Capabilities are code, roles are data. Capabilities live in YAML because your code checks them; roles are bundles of capabilities that admins create and change in Atlas.
roles: and collaborators: blocks in sequence.app.yml — like
capabilities.roles.definitions in artifact.bundle.yml,
managed-function.yml, and namespace.yaml — are deprecated. They are
still accepted as a one-time seed: a deploy creates any role Atlas doesn't have
yet and never updates it after; a changed definition is reported as drift,
not applied. seq-studio prints a notice when a manifest it deploys defines
roles. Don't add new ones — create roles in Atlas. Capabilities stay in YAML:
they're the contract your code checks.
The legacy seed format, for reading existing manifests:
roles:
definitions:
member:
includes:
- { primitive: admin-ui, role: end_user }
- { primitive: loans-orm, capability: loan-read }
collaborators:
definitions:
maintainer:
includes:
- { primitive: admin-ui, tier: writer }Collaborator roles (schema version 3)
Runtime roles bundle use. Collaborator roles bundle the tiers that let
people change the members: one grant can make someone a writer on the UI, an
editor on its function, and a writer on its namespace. Create them in Atlas
(the Application's Collaborator access tab, or ?kind=collaborator on the
roles API) — a collaborators: block here is the deprecated seed described
above. The two kinds never mix: a collaborator role includes only member tiers
and inherits only other collaborator roles.
| Kind | Tiers a collaborator role can bundle |
|---|---|
| artifact | reader, writer |
| function | reader, editor |
| orm | reader, writer |
| process (exactly one, only: [<process-id>]) | editor |
| pipeline (needs repo) | viewer, operator, editor |
| agent (exactly one agent) | editor |
| secret (listed under secrets:) | editor |
| service account (listed under service_accounts:) | actor |
Never
adminorowner: admin can share a member and bundle it into other Applications, so it stays a direct grant. Workspaces are never bundled.Every tier includes the ones below it, and use where the member has any, so a maintainer can always use what they maintain. A pipeline runs as a service principal, so it has nothing to use and appears only in collaborator roles:
viewersees its runs,operatorruns its stages,editordeploys it.A pipeline member is its release unit, the same id deploy registers:
pipelines/<name>, or<namespace>/<name>@<path>for one of an app's pipelines (inappsor your own namespace).Secrets the app's functions and pipelines read are listed under a top-level
secrets:block by their name in each environment. Deploy doesn't create or set them — useseq-studio secret— it bundles them so a collaborator role can giveeditor(set the value, roll back, attach and pin it; values stay write-only). Like a pipeline, a secret has nothing to use: functions and stages read it through their own attachments whether or not it's listed, so it appears only in collaborator roles. Ausesedge may point at one.Service accounts the app's members run as are listed under a top-level
service_accounts:block by slug (- { id: runtime, slug: loan-desk-runtime }). A collaborator role may giveactor, which every deploy that runs code as the account requires. Actor is close to the account's own access, so its admins see what the account holds before they allow it. Members run as the account whether or not it's listed.secrets: - { id: candescent-oauth, name: CANDESCENT_OAUTH } collaborators: definitions: maintainer: includes: - { primitive: desk-api, tier: editor } - { primitive: candescent-oauth, tier: editor }Something already deployed elsewhere — another app's function, a shared namespace, a process, an agent, an artifact or a pipeline — is included without deploying it under a top-level
existing:block, by the name Atlas knows it by: a function's slug, a namespace, a process id, an agent id, an artifact's slug, or a pipeline's release unit (<namespace>/<name>[@<path>]). Roles, collaborator roles andusesreach it like any member.existing: - { id: billing, kind: function, ref: billing-fn } - { id: lending, kind: orm, ref: lending } - { id: intake, kind: process, ref: loan-intake }After registering,
seq-studio applyprints suggested members: what the app's members depend on that it doesn't include — secrets they read, accounts they run as, functions and agents their process steps run, data they declare, and what traces saw them call — with the lines to paste (undersecrets:,service_accounts:orexisting:). Review them, or mark ones you mean to leave out "not needed", on the Application's Members page.Consent is stricter than for runtime roles: bundling a member's tiers needs admin on it (owner, for a process), checked on every deploy.
Only the Application's admins create, edit and grant collaborator roles in Atlas (runtime roles need only its capability admins and grant managers).
Agent commands
Typed agent repositories export one or more defineAgent(...) values from files
named agent.ts. Definitions are compiled in a credential-scrubbed child process,
validated with the published @sequenceholdings/agent-spec contract, normalized,
and hashed before deployment. Apply creates or updates only the definitions in the
bundle; it never implicitly deletes agents.
| Command | What it does |
|---------|--------------|
| seq-studio agent init <dir> [--repo <ns>/<name>] | Scaffold a standalone typed agent repository on the recommended model (RECOMMENDED_AGENT_MODEL from @sequenceholdings/agent-spec); --repo scaffolds into a git-service repo (Scaffold into a repository) |
| seq-studio agent validate [--dir <dir>] [--target <APP_ENV>] [--only <id1,id2>] | Compile and validate locally, without API access |
| seq-studio agent bundle --out <file> [--dir <dir>] [--target <APP_ENV>] [--only <id1,id2>] | Write the config deploy body, { definitions, bundleHash }, offline; repository CI's agent build |
| seq-studio agent plan [--dir <dir>] [--only <id1,id2>] | Offline compile/hash plan |
| seq-studio agent plan [--dir <dir>] -e <env> [--target <APP_ENV>] [--only <id1,id2>] [--managed] [--check-execution] | Diff creates, updates, and unchanged definitions against an environment |
| seq-studio agent apply [--dir <dir>] -e <env> [--target <APP_ENV>] [--only <id1,id2>] [--yes] [--managed] [--check-execution] | Deploy agent configuration after showing the plan |
| seq-studio agent list -e <env> | List visible runtime agents |
| seq-studio agent show <id> -e <env> | Show one runtime agent |
For validate, bundle, plan, and apply, --only accepts a comma-separated list of
agent IDs after deployment-environment selection; every requested ID must be
selected.
Access is managed in Atlas, not in code. seq-studio agent plan/apply
and seq-studio apply deploy agents config-only, as you, with the same rules
as an Agent Builder save:
- A new agent needs Can create on Agent Builder; you become its owner and it starts unshared.
- An existing agent needs editor on it.
- The skills, MCP servers, Managed Functions and subagents it attaches must be ones you may use, the same checks Agent Builder runs.
- The deploy never changes who can use the agent. Grant access in Agent Builder
or through the API. A definition that sets
permissions,isPublicorpublicOutputsis refused.
A merge deploys an agent the same way, as the person who merged, when its
sequence.app.yml entry names exactly one agent with only: [<agent id>]
(seq-studio add agent writes it). See What a merge deploys.
--managed selects the Sequence-staff path for Sequence's own code-managed
agents, whose definitions own their access as well.
Studio CLI 0.8.0 adds --check-execution to CONFIG agents plan and agents
apply. Confirm matching backend support before using this release candidate:
seq-studio agent plan --dir . -e <env> --check-execution
seq-studio agent apply --dir . -e <env> --check-executionThis opt-in accepts at most 20 existing agents in one whole bundle and
requires your actual interactive login, editor access and current invocation
rights. Create a new agent through ordinary CONFIG deployment first. Checked
plan evaluates the proposed configurations together with their current,
authorized dependencies; checked apply repeats every readiness check before
its first write. Access remains managed through the UI or API. Offline and
--managed use are refused, and an unavailable checked endpoint or missing
acknowledgement never falls back to an unchecked deployment or smaller chunks.
Readiness is a point-in-time eligibility check, not a reservation, an execution identity, a new permission, or proof that a model/tool run succeeded. Apply still uses the existing per-agent writes. Obtain the actual current execution identity after applying, and use the ordinary admission precondition when starting a pinned run; source and access can change after a successful check.
Where the runtime has enabled pinned private context, references in an agent's
systemPrompt and recursive string values of structuredOutput.schema can be
captured for the actual execution owner. Captures contain reference IDs, owner
IDs and fragment versions only, never decrypted values or hashes of those
values. Any edit (including label/purpose), deletion, owner mismatch or disabled
private-capture support invalidates the pin at the next checked boundary.
Private configuration anywhere in the declared closure redacts input/output
telemetry and leaves private-dependent runtime evidence explicitly incomplete.
Other private placements, mounted per-agent credentials, unsupported runtimes
and completion hooks keep their existing capture refusals. New message-private
references cannot introduce an uncaptured source; references already admitted
by the configuration use the exact captured version. Ordinary saves and
existing unpinned owner-only resolution keep their current behavior.
An optional deploy-manifest.json targets definitions by deployment identity:
{
"schemaVersion": 1,
"definitions": [
{
"id": "680000000000000000000001",
"path": "support/agent.ts",
"environments": ["local", "staging", "production"]
}
]
}Standalone workflow:
pnpm dlx @sequenceholdings/studio-cli agents init support-agent
cd support-agent
pnpm install
pnpm exec seq-studio agent validate
pnpm exec seq-studio agent plan
# Authenticate only when ready to inspect or apply an environment:
pnpm exec seq-studio login
pnpm exec seq-studio agent plan -e <env>
pnpm exec seq-studio agent apply -e <env>Sequence staff deploying Sequence's own code-managed agents add --managed to
plan and apply.
Use --repo agents/<name> [--ref <ref>] or --git-url <url> instead of
--dir to materialize reviewed source from the platform git service.
Voice authoring (internal staging demo)
agents voice is restricted to the internal synthetic demo in the configured
Sequence staging environment. It is not a customer-facing Voice release. Use a
human seq-studio login session with current demo participant and Agent editor
access; publication additionally requires a demo operator. Machine/M2M credentials
are rejected. All network commands require an explicit environment. The server
uses the same authorization, supported catalogs, source resolution, dependency
reviews and publication service as the Atlas Voice builder.
Voice uses the same defineAgent(...)/agent.ts format and offline compiler as
text Agents. An Agent ID has one immutable mode. Generic agents apply does not
activate Voice; use agents voice save for revision-checked draft authoring and
the separate publication command when ready. No command creates a Skill or a
Managed Function. Create those with their existing authoring tools, then attach
their references. The built-in banking examples are documented in the contributor
guide; they contain fictional data and unresolved catalog/Skill placeholders.
| Command (append -e <env>) | Result |
|---|---|
| agents voice inspect <id> [--out inspection.json] | Captured draft, current source drift/access, supported catalogs and publication permission |
| agents voice export <id> [--out agent.ts] | Exact captured authored definition using the builder's source serializer |
| agents voice save <id> --expected-revision <N\|new> [--dir .] [--yes] | Compile that ID and save only its draft; new means create-only, 0 is a real revision |
| agents voice capture <id> --request-file capture.json [--yes] | Explicitly attach or refresh the current native Skill text |
| agents voice validate <id> --expected-revision N [--out review.json] | Current authored/projection hashes, source status and concrete tool bindings requiring review |
| agents voice publish <id> --request-file publication.json [--yes] | One explicit, revision-checked publication attempt |
| agents voice status <id> --key <uuid> or --operation <uuid> | Read-only recovery; never dispatches publication |
| agents voice retry <id> --operation <uuid> [--yes] | Resume the recorded publication under current operator/dependency checks |
save also accepts the usual --repo agents/<name> or --git-url <url> source,
--ref, and --target <APP_ENV>. It selects exactly the positional Agent ID after
environment selection. Output files are created with restricted permissions and
never overwrite an existing file. Export includes only the strict authored
definition, including captured SOP text, native source references and declared
Agent permissions. It excludes provider resource IDs, runtime grants, credentials,
call state and draft audit metadata. Treat source text as untrusted and review it
before executing anything from a repository.
Start in your existing standalone typed-Agent repository:
seq-studio agent voice help
seq-studio login
seq-studio agent voice inspect <id> -e staging --out inspection.json
seq-studio agent voice export <id> -e staging --out agent.ts
# Edit agent.ts, retaining its Voice mode and the same ID.
seq-studio agent validate --dir .
seq-studio agent voice save <id> -e staging --dir . --expected-revision 3
seq-studio agent voice inspect <id> -e staging
# Use the actual returned draft revision, not the illustrative number here.
seq-studio agent voice validate <id> -e staging --expected-revision 4 --out review.jsoninspect never replaces captured text when a source Skill changes. save checks
current Skill access but also preserves that text. For an explicit refresh, write
capture.json using the actual ID/revision and the procedure's declared references:
{
"agentId": "680000000000000000000001",
"expectedDraftRevision": 4,
"action": "REFRESH",
"skillId": "native-skill-id",
"procedureKey": "replacement_card",
"activationDescription": "When asked to request a replacement for an eligible fictional card.",
"toolAliases": ["prepare_demo_service_request", "confirm_demo_service_request"],
"subprocedures": []
}Run agents voice capture <id> -e staging --request-file capture.json, inspect the
new draft and validate its returned revision. Use ATTACH for a new local key;
REFRESH must identify the Skill already attached to that key. Cross-environment
Skill or function references are not silently mapped. Resolve SOURCE_MISSING,
SOURCE_FORBIDDEN or INVALID_BINDING in the target environment before publication.
Editing captured text recalculates its content hash; restoring older source from
Git retains its text but still requires current access and dependency review.
Read review.json, including each binding's function version and authority policy.
Create publication.json with its actual draft/deployment revisions, a fresh UUID
for this intentional publication, and only the exact tool aliases/binding hashes
you reviewed. toolReviewConfirmations may be empty only when no confirmation is
required. --yes confirms the displayed action; it never manufactures reviews.
{
"agentId": "680000000000000000000001",
"expectedDraftRevision": 5,
"expectedDeploymentRevision": 2,
"idempotencyKey": "ea9d0f81-75c3-4a15-bbef-dbac20c4353c",
"toolReviewConfirmations": []
}Each confirmation has shape {"toolAlias":"alias","bindingHash":"<64-hex hash from review>"}.
Generate your own UUID (for example node -e 'console.log(crypto.randomUUID())');
the example key is illustrative. Keep the exact request file before dispatch:
seq-studio agent voice publish <id> -e staging --request-file publication.json
seq-studio agent voice status <id> -e staging --key <uuid-from-file>
# Only when the recorded operation requires an explicit retry:
seq-studio agent voice retry <id> -e staging --operation <returned-operation-uuid>Calls time out after 30 seconds and responses are bounded to 8 MiB. Voice requests
never automatically retry a 503, timeout or lost response. A status response may
be preparing/waiting; a successful CLI exit means the request/status was read,
not that publication is active. Status exits 2 when no operation is recorded;
an in-flight request may still arrive. Keep checking the same key. If retrying the
initial dispatch is necessary, explicitly resend the unchanged publication
file; do not allocate a new key to escape uncertainty. After a stale-revision
rejection, inspect and validate current state before preparing a different request.
Saving, capturing or publishing never enrolls callers, provisions phone numbers,
opens call admission, places calls, or changes the demo limits.
ORM commands
seq-studio orm authors and deploys governed ORM v2 namespaces: TypeScript
table definitions, Drizzle-authored read-only views, and policies plus named
GraphQL documents compiled into persisted operations. Import Drizzle query
helpers from @sequenceholdings/orm/drizzle; managed view builders are
compiled to canonical SQL before registration.
| Command | What it does |
|---------|--------------|
| seq-studio orm init <dir> [--repo <ns>/<name>] | Scaffold one v2 namespace package (sequence.config.ts, schema/*.ts, graphql/**, and codegen config). --repo scaffolds into a git-service repo (Scaffold into a repository). |
| seq-studio orm build [dir] | Generate schema.graphql, operations.manifest.json, typePolicies.gen.ts, namespace.contract.json, sql-operations.gen.ts, and consumer codegen when codegen.ts is present. |
| seq-studio orm build [dir] --migration-export [--check] | Export orm.migration.json after validating the committed ORM migration. Pipeline migration planning recompiles these declarative inputs. --check compares against the current source and operations without writing; use it in CI. |
| seq-studio orm validate [dir] | Parse and compile the namespace, then verify its committed migration chain is current. |
| seq-studio orm plan [dir] -e <env> | Print fresh-schema DDL using current names, including tables with retained rename hints, and compare registry versions without writes. This is not an incremental live migration diff; when available, print the live activation's source and provenance. |
| seq-studio orm diff [dir] [--check] | Author the next committed migration, or verify the migration/snapshot chain offline for CI. |
| seq-studio orm apply [dir] -e <env> [--timeout <duration>] [--no-wait] [--unverified-source "<reason>"] [--source-env <env>] | Author a migration if needed, register/apply the namespace, activate its operation set, publish its declared capabilities, and refresh generated outputs. Waits until the new version is live (prints live:; default up to 20m); --no-wait returns once queued. --source-env verifies a checkout of another registered environment's Git Service; sign in there first. |
| seq-studio orm history <namespace> -e <env> [--limit N] [--json] | List every change to the namespace's live schema and operations, newest first, with the actor and the Git Service source. apply from a clone of the target environment's Git Service (or --repo) sends its commit and package path; Atlas checks it and records verified, ci, break_glass or reported. Environments with ORM_REQUIRE_VERIFIED_SOURCE=1, and namespaces pinned with --mode source, refuse unverified applies; a namespace admin can override with orm apply --unverified-source "<reason>". |
| seq-studio orm deployment-policy <namespace> -e <env> [--json] | Inspect whether a namespace permits manual deployment, requires its enrolled repository's verified CI deployment, or is pinned to a verified source repository, branch and package path. |
| seq-studio orm deployment-policy <namespace> -e <env> --mode ci --repo <ns>/<name> --branch <branch> --target <target-key> | Explicitly enroll an existing namespace. Requires namespace Admin, repository Admin, and an automatic branch policy already bound to this exact namespace. |
| seq-studio orm deployment-policy <namespace> -e <env> --mode source --repo <ns>/<name> --branch <branch> --path <dir> [--source-env <env>] | Keep direct applies but accept only ones Atlas verifies came from that repository, branch and package directory. Requires namespace Admin and repository Read; --source-env finds the repository in another registered environment and checks Read with your sign-in there. |
| seq-studio orm deployment-policy <namespace> -e <env> --mode manual | Restore direct, permission-checked deployment; requires namespace Admin. |
| seq-studio orm run <namespace> <operation> -e <env> [--variables-file <file>] [--var <name>=<value>]... | Execute the deployed version's persisted operation by name, as the signed-in caller. Needs no checkout. |
| seq-studio orm run <operation> [dir] --variables-file <file> -e <env> | Execute an operation from the checkout's manifest through the installed ORM package, with variables from a JSON object file, as the signed-in caller. |
| seq-studio orm namespaces -e <env> [--limit N] [--offset N] [--json] | List the namespaces you can read. |
| seq-studio orm show <namespace> [<table> \| --operations] -e <env> [--json] | Show a namespace's tables, views, and persisted operations (with their variables), only its operations, or one table's columns, actions, and the operations that write it. |
| seq-studio orm operation show <namespace> <name> -e <env> [--json] | Show the active persisted operation's registered GraphQL document; JSON also includes its hash and declared variables. Requires namespace read access. |
| seq-studio orm read <namespace> <table> -e <env> [--where …] [--select …] [--order …] [--limit N] [--offset N] [--json\|--jsonl] | Read rows of a deployed v2 namespace's table as the caller. |
| seq-studio orm sql <namespace> --query <sql> \| --file <path> -e <env> [--param …] [--json\|--jsonl] | Run read-only SQL against a deployed v2 namespace as the caller. |
| seq-studio orm migrate-from-yaml <dir> | Convert a legacy YAML namespace to TypeScript authoring while preserving its committed migrations. |
| seq-studio orm import [dir] --spec <file> | Plan a batched copy from an existing Postgres relation (a synced warehouse table) into an owned ORM table. Writes a SQL script; it does not connect or apply row policies. |
For v2 schema commands (generate, validate, plan, diff, and apply),
seq-studio checks the ORM version it loads against the namespace's declared
@sequenceholdings/orm range in package.json before compiling. If they do
not match, install the namespace's dependencies and run its local CLI, or
upgrade the CLI and ORM together. A missing package.json has no declared
range to check; use a package manifest for versioned namespace builds.
Run ORM commands with the CLI installed in the package that owns the
namespace. A new namespace package lists both @sequenceholdings/studio-cli and
@sequenceholdings/orm, so after pnpm install everything runs through
pnpm exec. Start one with a one-off CLI:
pnpm dlx --package @sequenceholdings/studio-cli --package @sequenceholdings/orm \
seq-studio orm init lending
cd lending
pnpm install
# Edit sequence.config.ts, schema/*.ts, and graphql/**/*.ts.
pnpm exec seq-studio orm build .
pnpm exec seq-studio orm plan . -e local
pnpm exec seq-studio orm apply . -e local
pnpm exec seq-studio orm validate .Existing namespaces remain in manual mode until explicitly enrolled. Automatic repository bindings alone do not enable CI-only enforcement. CI-managed namespaces reject direct registration, schema apply, and operations-only activation on Atlas, including old CLIs and applies queued before enrollment. CI must match the enrolled repository, branch, target, authorizer, current deployment intent, and verified build output. Removing a repository policy does not silently restore manual mode; an administrator must explicitly change the namespace policy. Local generate, validate, and plan remain available. Runtime reads and writes keep their existing permissions. Deploy this support to Atlas and every ORM apply worker before enrolling namespaces, so applies queued before enrollment also run the policy check.
Global ORM commands require a CLI release that declares drizzle-orm directly.
Older releases can fail during module loading because drizzle-kit imports
drizzle-orm without declaring it. Update the global CLI if you see that error.
apply waits until the new version is live and serving, then prints a live:
line: every operation of the new version, by hash or by name, can run from that
point, so apply followed by execute needs no sleep. --timeout bounds the
wait (90s, 15m, 1h; a bare number is seconds) and --no-wait returns once
the apply is queued. A timed-out wait leaves the apply running on the server;
re-run the same command to keep waiting.
The scaffold's sample operations include create, get, update, and delete by
primary key, each governed by the table's write policy. Optional variables
follow GraphQL input rules: an omitted variable omits its field (the column
default applies on insert; an update leaves the column alone), and an explicit
null writes NULL.
A refused data-plane request prints the server's message, error code, and the variable, column, constraint, or capability at fault (schema names only, never values), followed by a next step.
apply --dry-run rehearses a migration against a disposable branch copy of
the target environment's data. apply --no-create is the CI guard that refuses
to provision a missing namespace. Destructive DDL requires explicit
--allow-destructive consent.
Queued rehearsals wait at most 35 minutes for a recorded verdict. If that wait expires, the CLI reports an unknown status; it does not apply the schema or retry the job. Inspect the printed run ID and disposable-branch cleanup before starting another rehearsal.
Preview: ORM v2 is a Preview workflow. The generated namespace package depends on
@sequenceholdings/orm@^2.0.0; use the matching published major version and keep generated manifests and migrations committed with source.
Discovering data (orm namespaces, orm describe)
Find what you can read before you query it. Both commands run as you and are read-only.
seq-studio orm namespaces -e <env> # NAMESPACE FORMAT TABLES OPERATIONS DESCRIPTION
seq-studio orm namespaces -e <env> --limit 20 --offset 20 --json
seq-studio orm show lending -e <env> # tables, views, persisted operations
seq-studio orm show lending --operations -e <env> # operations, requirements, variables
seq-studio orm show lending loans -e <env> # columns, enum values, links, actions
seq-studio orm operation show lending ListLoans -e <env> --json # active document and hashnamespaceslists only namespaces you can read, ordered by name, with their format (v2,v1, ornot applied), table count, and persisted-operation count. It pages with--limit(default 50) and--offset; the total and the next page go to stderr.--jsonprints the page as the server returns it, withtotal,limit, andoffset.describe <namespace>lists the active version's tables and views, and the persisted operations it serves with the capability or role each requires.describe <namespace> <table>lists the table's columns (type, nullability, primary key or unique), the values of its enums, its links and actions, and the persisted operations that write it. The column names are the onesreadandsqlaccept.- Each persisted operation lists the variables it declares as
name: type, with!when required and= valuefor a default.--operationsprints only the operations.describe --jsonincludesoperation_set_id,schema_version_id, andops_hashwhen Atlas provides them, alongside the schemaversion_id. If the active set changes during pagination or the schema version differs, retryorm describeto get a consistent result. operation showreads one active operation through the namespace reader gate. Without--jsonit prints the registered GraphQL document.--jsonincludes the document, hash, variables, and requirements for contract review. Missing and unreadable operations return the same not-found result. It does not run the operation or read rows.
Running a deployed operation (orm execute <namespace> <operation>)
seq-studio orm run lending ListLoans -e <env> --var officer=<uuid> --var limit=5
seq-studio orm run lending ListLoans -e <env> --variables-file variables.jsonBoth execute forms accept --variables-file - (or /dev/stdin) for piped JSON.
Input is read as UTF-8 until EOF and must be a JSON object. Reading or parsing
failures do not submit the operation; this does not add mutation retries or
write the variables to a temporary file. The checkout form requires an installed
ORM package with stdin support; upgrade that package alongside the CLI.
The by-name form looks the operation up in the namespace's deployed version and
runs it as you, so it needs no checkout and runs what is deployed even when a
local clone is behind. --var <name>=<value> (repeatable) sets one variable
over the file: numbers and booleans parse by the declared type, lists, filter
inputs, and jsonb take JSON, and other types take the text as is. Use the file
for null. An unknown name lists the deployed operations, and an input error
lists the operation's variables.
The updated checkout form, orm execute <operation> [dir], validates the name
and kind from that directory's operations.manifest.json, then selects the
active registered operation by name. Namespace-wide rehashes no longer strand
the checkout. The second argument still picks the form: an existing directory
means a checkout. Deploy matching Atlas runtime/broker support before publishing
and using the updated CLI/SDKs.
- A namespace you cannot read reports not found, the same as one that does not
exist.
--jsonprints the full description, including read and write policies, but not the generated GraphQL SDL.
Ad-hoc reads (orm read, orm sql)
read and sql query a deployed ORM v2 namespace without authoring an
operation. Both run the namespace's built-in read-only SQL operation (the same
one orm.sql() uses in apps and functions) as you: grants and row-level
security apply, the server accepts only its read-only SQL grammar, and a result
is bounded to 1,000 rows, 8 MiB, and a 10-second statement timeout. Legacy v1
YAML namespaces are not supported; convert them with orm migrate-from-yaml.
seq-studio orm read lending loans -e <env> \
--where status=eq.open --where balance=gte.1000 \
--select id,officer,balance --order balance.desc --limit 50 --json
seq-studio orm sql lending -e <env> \
--query 'SELECT officer, sum(balance) AS total FROM lending.loans WHERE status = :status GROUP BY officer' \
--param status=open --jsonl | jq -r '.officer'readfilters with repeatable--where <column>=<op>.<value>. Operators:eq,ne,gt,gte,lt,lte,in(id=in.(a,b,c)), andis(closed_at=is.null,active=is.true). Values bind as parameters typed like their columns, whichreadlooks up with one extra request.--order <column>[.asc|.desc]is repeatable or comma-separated.sqltakes the statement from--queryor--fileand binds:nameplaceholders.--param <name>[:<type>]=<value>is repeatable; the type defaults totextand may beuuid,date,timestamptz,numeric,bigint,integer,double, orboolean.--params '{"closed": {"type": "timestamptz", "value": null}}'passes the wire shape, including null values.- Declared JSONB properties can be selected as JSON results. JSONB is not a supported
parameter type; the listed
--paramtypes remain unchanged. sqlmust reference every table as<namespace>.<table>(FROM lending.loans, notFROM loans); unqualified names and queries without a table (SELECT 1) are rejected. Double-quote mixed-case column names, for exampleSELECT "loanNumber" FROM lending.loans; unquoted SQL identifiers are folded to lowercase. The grammar is read-onlySELECTwith joins, CTEs,UNION, aggregates, and comparison operators; it has noLIKEorIN. When the server rejects a statement it says only "SQL query is invalid or unsupported", so the CLI adds a hint with these rules.--jsonprints a JSON array of row objects (pandas.read_json),--jsonlone object per line (pandas.read_json(lines=True),jq). Without either, ro
