@sequenceholdings/studio-cli 0.4.7 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +162 -84
  2. package/dist/agents/commands.js +7 -0
  3. package/dist/app/adapters.d.ts +2 -2
  4. package/dist/app/adapters.js +15 -14
  5. package/dist/app/commands.d.ts +1 -1
  6. package/dist/app/commands.js +77 -14
  7. package/dist/app/deploy.d.ts +2 -0
  8. package/dist/app/deploy.js +25 -13
  9. package/dist/app/kinds.d.ts +6 -0
  10. package/dist/app/kinds.js +6 -0
  11. package/dist/app/manifest.js +1 -1
  12. package/dist/app/official-source.d.ts +10 -0
  13. package/dist/app/official-source.js +23 -0
  14. package/dist/app/prepare.d.ts +27 -0
  15. package/dist/app/prepare.js +58 -0
  16. package/dist/app/primitive-ids.d.ts +6 -0
  17. package/dist/app/primitive-ids.js +16 -0
  18. package/dist/app/primitive-scaffold.d.ts +0 -4
  19. package/dist/app/primitive-scaffold.js +7 -18
  20. package/dist/app/readme.js +23 -16
  21. package/dist/app/repository-index.d.ts +19 -0
  22. package/dist/app/repository-index.js +86 -0
  23. package/dist/app/scaffold.d.ts +12 -1
  24. package/dist/app/scaffold.js +32 -19
  25. package/dist/app/workspace-compile.d.ts +9 -0
  26. package/dist/app/workspace-compile.js +13 -1
  27. package/dist/app/workspace-scaffold.js +5 -1
  28. package/dist/artifact/delegate.js +4 -4
  29. package/dist/auth-cmds/commands.d.ts +1 -13
  30. package/dist/auth-cmds/commands.js +11 -246
  31. package/dist/auth.d.ts +17 -0
  32. package/dist/auth.js +29 -0
  33. package/dist/bin.js +1 -1
  34. package/dist/command-contract.d.ts +11 -5
  35. package/dist/command-contract.js +4 -3
  36. package/dist/command-help.d.ts +2 -2
  37. package/dist/command-help.js +14 -16
  38. package/dist/config.d.ts +16 -0
  39. package/dist/config.js +38 -5
  40. package/dist/env-registry.d.ts +8 -0
  41. package/dist/env-registry.js +9 -1
  42. package/dist/envs/commands.js +14 -1
  43. package/dist/functions/manifest.d.ts +4 -1
  44. package/dist/functions/manifest.js +8 -2
  45. package/dist/main.d.ts +3 -2
  46. package/dist/main.js +12 -6
  47. package/dist/orm/delegate.js +5 -2
  48. package/dist/pipeline/clone-deploy.d.ts +2 -3
  49. package/dist/pipeline/clone-deploy.js +9 -10
  50. package/dist/pipeline/commands.js +4 -3
  51. package/dist/pipeline/lifecycle.d.ts +3 -1
  52. package/dist/pipeline/lifecycle.js +12 -4
  53. package/dist/process/commands.d.ts +6 -3
  54. package/dist/process/commands.js +26 -10
  55. package/dist/repos/commands.d.ts +2 -11
  56. package/dist/repos/commands.js +71 -157
  57. package/dist/repos/git-clone.d.ts +1 -10
  58. package/dist/repos/git-clone.js +1 -49
  59. package/dist/repos/git-credential.d.ts +15 -0
  60. package/dist/repos/git-credential.js +91 -0
  61. package/dist/repos/pulls.d.ts +19 -1
  62. package/dist/repos/pulls.js +15 -2
  63. package/dist/templates/catalog.d.ts +69 -0
  64. package/dist/templates/catalog.js +68 -0
  65. package/dist/templates/commands.d.ts +29 -0
  66. package/dist/templates/commands.js +443 -0
  67. package/dist/templates/process/example-process/process.ts +2 -0
  68. package/dist/templates/process/package.json +1 -1
  69. package/package.json +13 -11
  70. package/templates/process/example-process/process.ts +2 -0
  71. package/templates/process/package.json +1 -1
  72. package/dist/pat-hints.d.ts +0 -15
  73. package/dist/pat-hints.js +0 -28
package/README.md CHANGED
@@ -16,13 +16,19 @@ seq-studio agents plan -e <env>
16
16
  seq-studio artifact deploy -e <env>
17
17
  seq-studio orm init lending
18
18
  seq-studio pipeline validate
19
+ seq-studio templates list -e <env>
20
+ seq-studio init my-app --template <name>@<version> -e <env>
19
21
  seq-studio envs list
20
22
  seq-studio doctor
21
23
  ```
22
24
 
25
+ Published repository templates are available only to identities with reader
26
+ access to the environment's template catalog and repository. `init --template`
27
+ verifies and copies the selected release into a new or empty directory.
28
+
23
29
  > **Note:** all network commands require a Sequence platform account with the
24
- > appropriate permissions. Without one, the offline commands
25
- > (`init`, `lint`, `simulate`, `build`, `bundle inspect`, `agents init`,
30
+ > appropriate permissions. Without one, only the offline commands
31
+ > (`init` without `--template`, `lint`, `simulate`, `build`, `bundle inspect`, `agents init`,
26
32
  > `agents validate`, offline `agents plan`, `pipeline init`, `pipeline validate`) work.
27
33
  > Repo and function command help is also available without an account; for
28
34
  > example, `seq-studio repos create --help` and `seq-studio functions invoke --help`.
@@ -48,7 +54,7 @@ inspect `truncated` and pagination metadata where present.
48
54
  # In a process or artifact repo (devDependency, using pnpm — see below):
49
55
  pnpm add -D @sequenceholdings/studio-cli @sequenceholdings/lattice
50
56
 
51
- # Or globally:
57
+ # Or globally (ORM commands need the in-repo install; see "ORM commands"):
52
58
  pnpm add -g @sequenceholdings/studio-cli
53
59
  ```
54
60
 
@@ -136,6 +142,11 @@ seq-studio login --env <name> # sign in to it
136
142
  seq-studio envs list # show configured environments (name, URL, source)
137
143
  ```
138
144
 
145
+ The reserved names `staging`, `production` and `banksouth` are for deployments
146
+ that sign in through the shared Sequence login: `envs add` saves one of them to
147
+ `~/.config/lattice/config.toml` only after the deployment confirms that login,
148
+ and `seq-studio login` signs you in.
149
+
139
150
  You can also add or override environments yourself in
140
151
  `~/.config/lattice/config.toml`.
141
152
  Authenticated requests accept only HTTPS origins at `seqholdings.com` or its
@@ -176,13 +187,16 @@ locations, dependencies, and deployment selection.
176
187
 
177
188
  | Command | What it does |
178
189
  |---------|--------------|
179
- | `seq-studio init <dir> --with <kinds>` | Scaffold a version 2 app, root pnpm workspace, shared package, README, and selected primitives |
190
+ | `seq-studio init <dir> [--with <kinds>] [--skip-install]` | 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 |
180
191
  | `seq-studio add <kind> <name> [--depends-on <ids>] [--template <t>]` | Add any primitive, including additional ORM namespaces and UIs |
181
192
  | `seq-studio add package <name>` | Add a shared TypeScript package to the manifest and pnpm workspace |
182
193
  | `seq-studio deploy -e <env> [--yes] [--only id1,id2] [--dry-run]` | Validate and deploy the selected app graph, including prerequisites |
183
194
 
184
195
  `init` accepts `orm`, `workspace`, `function`, `agent`, `process`, `pipeline`, and `artifact` as
185
- a comma-separated `--with` list or boolean flags (`--agent --process`). The first
196
+ a comma-separated `--with` list or boolean flags (`--agent --process`). With no
197
+ kind flags it scaffolds `orm,function,process,artifact`, the kinds repository
198
+ CI/CD creates and deploys on merge. `--skip-install` skips the install and
199
+ migration step (offline). The first
186
200
  function defaults to `hello` (`--function-name` changes it). Agent, process, and
187
201
  pipeline folders use the app name. Pipelines default to transformation stages;
188
202
  `--pipeline-type ingestion|transformation|serving` selects another template.
@@ -194,12 +208,13 @@ dependencies; run `pnpm install` inside its directory. App deploys send its
194
208
  directory (for example `artifacts/admin`) so Atlas builds it from the app repository.
195
209
 
196
210
  ```bash
197
- seq-studio init loan-tools --with orm,function,agent,process,artifact
211
+ seq-studio init loan-tools
198
212
  cd loan-tools
199
- pnpm install
200
- seq-studio orm generate orm/loan_tools
201
- seq-studio orm diff orm/loan_tools
202
- # Review and commit the generated migrations before deployment.
213
+ # Init installs dependencies and authors the first migration; review and commit
214
+ # pnpm-lock.yaml and orm/loan_tools/migrations/ before opening the PR.
215
+ # In a git-service repo, push a branch and open a PR: checks run automatically
216
+ # and merging main creates and deploys the declared supported primitives.
217
+ # Outside one, deploy directly:
203
218
  seq-studio login -e <env>
204
219
  seq-studio deploy -e <env> --dry-run
205
220
  seq-studio deploy -e <env> --yes
@@ -219,11 +234,18 @@ seq-studio deploy -e <env> --only approvals-process --yes
219
234
 
220
235
  Creating a platform git-service repo without `--git-backend` (`seq-studio repos
221
236
  create`, or the Repositories UI) seeds it with a Sequence app README on either
222
- backend; only an explicit `--git-backend walgit` starts empty. A fresh clone with that seed README is a valid `init .` target. Init
237
+ backend; only an explicit `--git-backend walgit` starts empty. A fresh clone with that seed README is a valid `init .` target. Inside an
238
+ existing repository, `init <subdir>` also declares the app in
239
+ `.seq/repository.yml` so repository CI picks it up. Init
223
240
  preserves its git remote and existing ignores, replaces the seed README, and
224
241
  refuses ordinary non-empty repositories. The initial UI stays at `artifact/`;
225
242
  additional UIs live under `artifacts/<name>/`.
226
243
 
244
+ New scaffolds use schema version 3. Deploying all of their primitives registers
245
+ the app as an Application visible in Builder Studio; scaffolding alone does not
246
+ create a project there. Roles and grants are configured in Atlas after registration.
247
+ Existing version 2 manifests remain supported for bundles that do not register.
248
+
227
249
  ### One workspace, shared packages
228
250
 
229
251
  Install once from the root and commit the generated `pnpm-lock.yaml`. The root
@@ -232,8 +254,9 @@ packages, preserves the seven-day dependency age gate, and explicitly controls
232
254
  build scripts. Generated nested install configuration is consolidated at the
233
255
  root. CI should use `pnpm install --frozen-lockfile`.
234
256
 
235
- Every new app includes `packages/shared`, named `@<app-id>/shared`, with ordinary
236
- `workspace:*` dependencies from its JavaScript primitives. Export common types,
257
+ Every new app includes `packages/shared`, named `@<app-id>/shared`. Artifacts and
258
+ processes receive ordinary `workspace:*` dependencies; functions do not, because
259
+ their deployed bundles cannot resolve workspace links. Export common types,
237
260
  validation, and helpers from `src/index.ts`. Additional packages are registered
238
261
  with `seq-studio add package <name>`; add them to consumers with:
239
262
 
@@ -265,7 +288,7 @@ resolved again by the function service, just as in standalone function deploys.
265
288
  ### Manifest and deployment behavior
266
289
 
267
290
  ```yaml
268
- schema_version: 2
291
+ schema_version: 3
269
292
  app:
270
293
  id: loan-tools
271
294
  title: Loan Tools
@@ -292,7 +315,7 @@ deploy:
292
315
  on_error: stop
293
316
  ```
294
317
 
295
- Version 2 topologically orders `depends_on` prerequisites. Optional `deploy.order`
318
+ Versions 2 and 3 topologically order `depends_on` prerequisites. Optional `deploy.order`
296
319
  is a preference among ready primitives. `--only` includes the selected primitives'
297
320
  transitive prerequisites; use app primitive IDs, not agent/process runtime IDs.
298
321
  Agent and process entries may set `only` to select definitions from their source
@@ -338,14 +361,14 @@ to a workspace resolves that workspace by name in the selected environment. A
338
361
  workspace UUID in source must be one that exists there; an ID from another
339
362
  environment fails the deployment. `uses` needs schema version 2 or later.
340
363
 
341
- Before the first ORM deployment, and after changing its schema, run
364
+ After changing an ORM schema, run
342
365
  `seq-studio orm generate <namespace-path>` followed by
343
366
  `seq-studio orm diff <namespace-path>`. Review and commit the generated migration
344
- ledger. Init creates the namespace source; it does not create this reviewed
345
- baseline automatically. A namespace without migrations fails deployment
367
+ ledger. `init` authors the baseline for its initial namespace (unless
368
+ `--skip-install`); namespaces added later still need this workflow. A namespace without migrations fails deployment
346
369
  preflight with instructions to run `orm diff`.
347
370
 
348
- Before any deployment, version 2 validates and compiles the selected sources.
371
+ Before any deployment, versions 2 and 3 validate and compile the selected sources.
349
372
  `--dry-run` performs this preflight without deploying. Pipeline preflight reads
350
373
  the remote repository, validates its source, and pins the resolved commit, so a
351
374
  pipeline dry run needs network access and authentication. Other local primitive
@@ -353,9 +376,11 @@ checks do not deploy resources. Official artifact deployments require the full a
353
376
  checkout to be clean on `main`, including shared packages and the app manifest;
354
377
  local deployments retain the local development path.
355
378
 
356
- Pipeline entries require `repo: pipelines/<name>` or `repo: apps/<name>` and `ref`;
357
- they may specify `target`. For `apps/<name>` repositories, `path` is both the local
358
- authoring directory and the contained pipeline root in the remote monorepo. A
379
+ Pipeline entries require `repo: <namespace>/<name>` and `ref`; they may specify
380
+ `target`. The repo is a dedicated Pipeline repo (`pipelines/<name>`), an app
381
+ monorepo (`apps/<name>`), or your own namespace's repo. For any repo outside
382
+ `pipelines`, `path` is both the local authoring directory and the contained
383
+ pipeline root in the remote repository. A
359
384
  dedicated `pipelines/<name>` repository retains its historical repository-root
360
385
  package. Commit and push pipeline source before deploying. The
361
386
  app reuses the existing pipeline release workflow and waits for completion.
@@ -365,7 +390,7 @@ not run them. Removing a manifest entry never implicitly deletes a resource.
365
390
 
366
391
  `deploy.on_error` defaults to `stop`. `continue` deploys independent primitives
367
392
  and skips dependents of failed/skipped prerequisites. The operation is not atomic:
368
- successful deployments remain if a later primitive fails. Version 2 records the
393
+ successful deployments remain if a later primitive fails. Versions 2 and 3 record the
369
394
  plan and outcomes in `.sequence/deployments/<encoded-env>.json`, ignored by Git.
370
395
 
371
396
  Existing version 1 manifests retain their explicit/kind ordering, exact `--only`
@@ -498,7 +523,8 @@ and inherits only other collaborator roles.
498
523
  principal, so it has nothing to use and appears only in collaborator roles:
499
524
  `viewer` sees its runs, `operator` runs its stages, `editor` deploys it.
500
525
  - A pipeline member is its release unit, the same id deploy registers:
501
- `pipelines/<name>`, or `apps/<name>@<path>` for one of an app's pipelines.
526
+ `pipelines/<name>`, or `<namespace>/<name>@<path>` for one of an app's
527
+ pipelines (in `apps` or your own namespace).
502
528
  - Secrets the app's functions and pipelines read are listed under a top-level
503
529
  `secrets:` block by their name in each environment. Deploy doesn't create or
504
530
  set them — use `seq-studio secrets` — it bundles them so a collaborator role
@@ -527,7 +553,7 @@ and inherits only other collaborator roles.
527
553
  namespace, a process, an agent, an artifact or a pipeline — is included
528
554
  without deploying it under a top-level `existing:` block, by the name Atlas
529
555
  knows it by: a function's slug, a namespace, a process id, an agent id, an
530
- artifact's slug, or a pipeline's release unit (`pipelines/<name>`).
556
+ artifact's slug, or a pipeline's release unit (`<namespace>/<name>[@<path>]`).
531
557
  Roles, collaborator roles and `uses` reach it like any member.
532
558
 
533
559
  ```yaml
@@ -738,26 +764,27 @@ compiled to canonical SQL before registration.
738
764
  | `seq-studio orm migrate-from-yaml <dir>` | Convert a legacy YAML namespace to TypeScript authoring while preserving its committed migrations. |
739
765
  | `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. |
740
766
 
741
- Install the CLI and ORM package together:
767
+ Run ORM commands with the CLI installed in the package that owns the
768
+ namespace. A new namespace package lists both `@sequenceholdings/studio-cli` and
769
+ `@sequenceholdings/orm`, so after `pnpm install` everything runs through
770
+ `pnpm exec`. Start one with a one-off CLI:
742
771
 
743
772
  ```bash
744
- pnpm add -g @sequenceholdings/studio-cli@0.1.36 @sequenceholdings/orm@2.1.0
745
- ```
746
-
747
- The everyday loop is:
748
-
749
- ```bash
750
- seq-studio orm init lending
773
+ pnpm dlx --package @sequenceholdings/studio-cli --package @sequenceholdings/orm \
774
+ seq-studio orm init lending
751
775
  cd lending
752
776
  pnpm install
753
777
 
754
778
  # Edit sequence.config.ts, schema/*.ts, and graphql/**/*.ts.
755
- seq-studio orm generate .
756
- seq-studio orm plan . -e local
757
- seq-studio orm apply . -e local
758
- seq-studio orm validate .
779
+ pnpm exec seq-studio orm generate .
780
+ pnpm exec seq-studio orm plan . -e local
781
+ pnpm exec seq-studio orm apply . -e local
782
+ pnpm exec seq-studio orm validate .
759
783
  ```
760
784
 
785
+ A globally installed CLI can't run ORM commands under pnpm 11: pnpm 11 isolates
786
+ global packages, and `drizzle-kit` imports `drizzle-orm` without declaring it.
787
+
761
788
  `apply --dry-run` rehearses a migration against a disposable branch copy of
762
789
  the target environment's data. `apply --no-create` is the CI guard that refuses
763
790
  to provision a missing namespace. Destructive DDL requires explicit
@@ -774,6 +801,14 @@ starting another rehearsal.
774
801
 
775
802
  ### Registered SQL operations in development builds
776
803
 
804
+ The planned Studio CLI 0.5.0 package chain also carries default namespace SQL:
805
+ ORM 2.6.0, Artifact Studio 0.7.0, and Managed Functions 0.4.0. With the matching
806
+ Atlas runtime, app/function executors expose `sql({ sql, parameters })` without
807
+ an authored operation or manifest. Namespace access, object policies, foreign
808
+ exports and delegated table scopes still apply. This is an SDK execution path,
809
+ not a new CLI command; `orm execute` continues using generated manifests for
810
+ registered operations. These source versions require publication and rollout.
811
+
777
812
  Development builds containing SQL operation support also discover exported
778
813
  `defineOperation({ language: 'sql', kind: 'query', ... })` definitions under
779
814
  `operations/**/*.ts`, or equivalent `*.operation.json` files. Import the
@@ -813,7 +848,7 @@ datasets before adopting this path for latency-sensitive reads.
813
848
  | `seq-studio process lint [--dir <path>] [--offline]` | Static checks (graph, return contracts, agent schema, timeouts, and JSONata syntax); `--offline` skips live agent-schema lookup |
814
849
  | `seq-studio process plan [--dir <path>] -e <env>` | Build bundle, diff against currently-active version |
815
850
  | `seq-studio process apply [--dir <path>] -e <env> [--only <id1,id2>]` | Build → register bundle → promote each process. `--only` promotes just the named process ids (the bundle still contains the whole root — registration is inert) |
816
- | `seq-studio process apply --repo processes/<name> [--ref <r>] -e <env> [--only <id1,id2>]` | Same as above, but materializes the source from a platform git-service repo. Pinned commit SHA is injected as bundle provenance. Requires `ATLAS_GIT_PAT` (or the target realm's M2M secret for CI) |
851
+ | `seq-studio process apply --repo <namespace>/<name> [--ref <r>] -e <env> [--only <id1,id2>]` | Same as above, but materializes the source from a platform git-service repo in `processes`, `apps`, or your own namespace. Pinned commit SHA is injected as bundle provenance. Uses your `seq-studio login` (or the target realm's M2M JSON source path for CI) |
817
852
  | `seq-studio process test [--dir <path>] -e <env> [--offline]` | CI wrapper: lint + plan, non-zero exit on errors or BREAKING diffs; see the offline limitation below |
818
853
  | `seq-studio process simulate <id> [--dir <path>]` | Isolated child-process walk with stubbed runners and hardened JSONata data-flow mapper evaluation (offline) |
819
854
  | `seq-studio process bundle build [--dir <path>] [-o file.json]` | Build a bundle locally |
@@ -869,7 +904,7 @@ are discovered, the bundle is built with the pinned commit as provenance, and th
869
904
  temp tree is cleaned up — even on error. Only the `processes` namespace is
870
905
  accepted; other namespaces (artifacts, managed-functions) are rejected.
871
906
 
872
- Auth: same as `artifact deploy --repo` — `ATLAS_GIT_PAT` for the smart-HTTP
907
+ Auth: same as `artifact deploy --repo` — your `seq-studio login` token for the smart-HTTP
873
908
  clone path, or the target realm's M2M secret for CI's JSON materialize path.
874
909
  Those credentials remain in the parent CLI and are not forwarded to dependency
875
910
  installation or process build tooling. Each install uses fresh temporary
@@ -948,6 +983,30 @@ same repo share Git review and commit provenance, but keep separate manifests,
948
983
  versions, runtime resources, secrets, and permissions. `--path` accepts only a
949
984
  canonical relative directory inside a remote repo; use `--dir` for local source.
950
985
 
986
+ ### Scoped group-member directory reads
987
+
988
+ A function may opt in to resolving selected members of existing Atlas groups:
989
+
990
+ ```yaml
991
+ capabilities:
992
+ directory:
993
+ groups: ["<existing-group-id>"]
994
+ ```
995
+
996
+ Use `createFunctionDirectoryClient` from
997
+ `@sequenceholdings/managed-functions` to resolve selected group row IDs or
998
+ exact canonical subjects (1–50 per request). This is a caller-delegated
999
+ read capability, not a group grant or global user search; service/system
1000
+ invocations do not receive it. Current function access, declared group reach,
1001
+ caller visibility, and active tenant membership are checked at read time.
1002
+
1003
+ Requires CLI 0.5.2+, SDK 0.4.1+, and a deployment advertising
1004
+ `directory_members` in `seq-studio functions limits --json -e <env>`.
1005
+ Deploy preflight rejects unsupported deployments or stale tooling. Release
1006
+ the supporting Atlas build and packages before adding the declaration to a
1007
+ consumer; declaring it does not create groups, grant access, or bypass action
1008
+ permissions. See the SDK README for client usage and security boundaries.
1009
+
951
1010
  ### Deploying to local Atlas
952
1011
 
953
1012
  Start local Atlas, then use the same deployment workflow:
@@ -1168,6 +1227,13 @@ scope check. Keep the handler's accepted operation names explicit. The caller
1168
1227
  must still satisfy namespace runtime access, operation requirements, and row
1169
1228
  policies; declaring a table does not grant access to every row.
1170
1229
 
1230
+ Queries joining a built-in platform user (for example, an `author` relationship)
1231
+ also require the exact logical table name `platformUsers` in that namespace's
1232
+ `tables` list. Use `tables: [entries, platformUsers]` for an entries query that
1233
+ reads its author. Do not substitute a physical directory table name. This is
1234
+ an explicit read scope only; namespace access, operation requirements and row
1235
+ policies still apply. Ordinary namespace table names remain lowercase identifiers.
1236
+
1171
1237
  A function that reaches a namespace must attach a top-level `service_account`
1172
1238
  provided by its administrator. Caller-mode execution remains on behalf of the
1173
1239
  invoking user; attaching the account does not select service mode.
@@ -1480,7 +1546,7 @@ process simulations run in short-lived children with an allowlisted runtime
1480
1546
  environment and a synthetic home/config directory. Parent bearer tokens, Auth0
1481
1547
  M2M secrets, Doppler tokens, cloud credentials, GitHub tokens, and user config
1482
1548
  files are not inherited. The platform Git Service clone path passes only its
1483
- single scoped PAT to `git` through an ephemeral askpass helper.
1549
+ selected login token to `git` through an ephemeral askpass helper.
1484
1550
  This is a credential-inheritance boundary, not an OS filesystem sandbox:
1485
1551
  child code still runs as the invoking user and must be treated as trusted to
1486
1552
  read files that it names explicitly outside the synthetic home.
@@ -1492,47 +1558,44 @@ These three look similar but fetch different things:
1492
1558
  | Command | What you get |
1493
1559
  |---------|--------------|
1494
1560
  | `seq-studio artifact pull <project-id>` | Active **deployment** source files for an Artifact Studio project (built bundle inputs), keyed by project UUID — **not** git history |
1495
- | `seq-studio repos clone <ns>/<name>` | Repo source tree. With `ATLAS_GIT_PAT`, a real `git clone` via smart-HTTP; otherwise JSON-API materialize (no `.git` dir) |
1561
+ | `seq-studio repos clone <ns>/<name>` | Real Git checkout using your login and a repository-local credential helper. Explicit `--transport json` downloads files only |
1496
1562
  | `seq-studio artifact deploy --repo <ns>/<name>` | Build and deploy repository source; React/HTML builds locally, while Next.js uses Atlas's verified hosted build. |
1497
1563
 
1498
- ## Auth (git-service PATs)
1499
-
1500
- Personal Access Tokens authenticate `git clone` / `git push` (Basic auth:
1501
- any username, PAT as password). **You do not need `seqapi`.**
1502
-
1503
- ### Everyone (recommended) — Atlas UI
1564
+ ## Git authentication
1504
1565
 
1505
- 1. Open **Settings → Tokens** in Atlas for your environment
1506
- (`<your-atlas-url>/settings/tokens` — run `seq-studio envs list` for the
1507
- URLs visible to your identity)
1508
- 2. **New token** → scopes `repo:read` (add `repo:write` for push) → copy once
1509
- Merge is a repository grant (Merge / Admin), not a PAT scope.
1510
- 3. Export and clone:
1566
+ Use your existing platform login for a real Git checkout:
1511
1567
 
1512
1568
  ```bash
1513
- export ATLAS_GIT_PAT=atlas_git_…
1569
+ seq-studio login --env <env>
1514
1570
  seq-studio repos clone <namespace>/<repo> -e <env>
1515
- # or: git clone https://git:$ATLAS_GIT_PAT@<your-atlas-host>/api/git-service/repos/<id>/git
1571
+ cd <repo>
1572
+ git pull
1573
+ git push
1516
1574
  ```
1517
1575
 
1518
- You can also open **Repositories → Access tokens** / the clone popover’s
1519
- **Manage tokens** link.
1520
-
1521
- ### CLI mint (optional)
1576
+ No PAT is required. `repos clone` configures a repository-local credential helper
1577
+ that reads your current login token for that exact environment and repository.
1578
+ It never stores the token in the remote URL or Git config, and does not pass it
1579
+ to inherited credential stores. Keep `seq-studio` installed on your `PATH`.
1580
+ Once your session expires, run `seq-studio login --env <env>` and retry;
1581
+ Git itself does not open a browser or silently switch to a machine identity.
1582
+ Repository grants and protected-branch rules still apply.
1522
1583
 
1523
- Requires Auth0 login. Same identity as the UI:
1584
+ This requires an Atlas deployment that supports login-token Git authentication.
1585
+ Deploy login-capable server support before upgrading the CLI; this CLI cannot
1586
+ authenticate Git against older PAT-only servers. `clone` no longer silently downloads a files-only tree.
1587
+ Use `seq-studio repos pull` or `repos clone --transport json` explicitly when you want files without `.git`.
1524
1588
 
1525
- ```bash
1526
- seq-studio login # add --env <registered-opco-env> for a tenant realm
1527
- seq-studio auth pat create --name laptop --scopes repo:read,repo:write -e <env>
1528
- # optional: --expires 1d|7d|30d|90d|1y|never (default 30d)
1529
- # optional: --store-credentials # git credential approve for the env host
1589
+ ### Retired personal access tokens
1530
1590
 
1531
- seq-studio auth pat list -e <env>
1532
- seq-studio auth pat revoke <id> -e <env> --yes
1533
- ```
1591
+ Git authentication requires a human `seq-studio login --env <env>` session.
1592
+ `ATLAS_GIT_PAT` is ignored; `auth pat` no longer issues or manages credentials.
1593
+ For an existing PAT-backed checkout, clone again to install the repository-local
1594
+ login helper. Old globally stored Git credentials are not modified automatically.
1534
1595
 
1535
- The raw token is printed **once** on create.
1596
+ M2M identities cannot authenticate Git. Supported headless repository build
1597
+ workflows continue to materialize source through the JSON API; they never borrow
1598
+ a human identity or extend a human login's expiry.
1536
1599
 
1537
1600
  ## Repos commands
1538
1601
 
@@ -1540,8 +1603,7 @@ Add `--help` to a repo command to read its usage offline, without an
1540
1603
  environment or credentials.
1541
1604
 
1542
1605
  `repos create` creates the hosted repository; it does not configure Git in your
1543
- current folder. For a new local checkout, use `repos clone` with `ATLAS_GIT_PAT`
1544
- and `--full` to get `origin`, branch tracking, and complete history for your
1606
+ current folder. For a new local checkout, use `seq-studio login`, then `repos clone --full` to get `origin`, branch tracking, and complete history for your
1545
1607
  editor's Git graph. For an existing folder, discover the clone URL with
1546
1608
  `repos show`, inspect `git remote -v`, and add a missing `origin` with
1547
1609
  `git remote add origin <clone-url>`, then `git fetch origin`. Fetching does not
@@ -1553,7 +1615,7 @@ for handling folders with no commits or separate local history. Replace
1553
1615
  `<atlas-origin>` with the actual Atlas URL supplied by your platform administrator
1554
1616
  for the target environment. Verify with
1555
1617
  `git branch -vv` and `git status --short --branch`. Plain Git needs its own
1556
- credential-manager or PAT prompt setup; it does not read `ATLAS_GIT_PAT`.
1618
+ credential helper configured for the current `seq-studio login`; it does not read `ATLAS_GIT_PAT`.
1557
1619
 
1558
1620
  `seq-studio repos <sub>` manages repos in the platform Git Service over the
1559
1621
  JSON API — the same repos `--repo <ns>/<name>` sources build from.
@@ -1564,7 +1626,7 @@ JSON API — the same repos `--repo <ns>/<name>` sources build from.
1564
1626
  | `seq-studio repos namespaces [create <slug>] -e <env>` | list namespaces, or create one (creator becomes owner) |
1565
1627
  | `seq-studio repos show <ns>/<name> -e <env>` | detail: id, branches, clone URL; artifact project id when slug matches |
1566
1628
  | `seq-studio repos create <ns>/<name> -e <env> [--default-branch <b>] [--git-backend walgit]` | create a repo, seeded with a README on `main`. The server picks the backend (walgit wherever it is configured). `--git-backend walgit` creates it empty, for pushing existing history. Needs namespace write. |
1567
- | `seq-studio repos clone <ns>/<name> \| --url <clone-url> \| --id <uuid> -e <env> [--ref <r>] [--output <dir>] [--force] [--full] [--transport auto\|git\|json]` | smart-HTTP `git clone --depth 1` when `ATLAS_GIT_PAT` is set (`--full` fetches history; a commit SHA stays full). `--url`/`--id` need no seqapi. Otherwise JSON materialize + PAT hint. `--out` remains an alias for `--output`. |
1629
+ | `seq-studio repos clone <ns>/<name> \| --url <clone-url> \| --id <uuid> -e <env> [--ref <r>] [--output <dir>] [--force] [--full] [--transport auto\|git\|json]` | smart-HTTP `git clone --depth 1` using login (`--full` fetches history; a commit SHA stays full). Configures login for subsequent Git commands. Use files-only `--transport json` for `<ns>/<name>`. `--out` remains an alias for `--output`. |
1568
1630
  | `seq-studio repos pull <ns>/<name> -e <env> [--ref <r>] [--out <dir>] [--force]` | always materialize via JSON API (no `.git` dir); refuses a non-empty destination unless `--force` |
1569
1631
  | `seq-studio repos delete <ns>/<name> -e <env> [--yes]` | delete a repo — interactive confirm unless `--yes` |
1570
1632
  | `seq-studio repos ci init [--dir <repository>]` | create `.seq/pipeline.yml` with native defaults; offline, preserves existing configuration |
@@ -1573,9 +1635,10 @@ JSON API — the same repos `--repo <ns>/<name>` sources build from.
1573
1635
  | `seq-studio repos ci require <ns>/<name> --check <name> -e <env>` | disabled legacy required-check control; use native pipeline discovery |
1574
1636
  | `seq-studio repos ci import <ns>/<name> -e <env> [--ref <r>]` | disabled legacy required-check control; use native pipeline discovery |
1575
1637
 
1576
- `show` prints the smart-HTTP clone URL (`…/repos/<id>/git`). Basic auth:
1577
- any username, PAT as password. Prefer `repos clone` over hand-rolling the
1578
- tree API.
1638
+ `show` prints the smart-HTTP clone URL (`…/repos/<id>/git`). Prefer `repos clone`
1639
+ to configure Git authentication automatically. The helper protocol command is
1640
+ `seq-studio auth git-credential --env <env> --url <clone-url> <get|store|erase>`;
1641
+ it is invoked by Git and must not be run to print credentials into a terminal.
1579
1642
 
1580
1643
  To enable native repository checks, run this from the checkout containing your
1581
1644
  `sequence.app.yml` or supported standalone resource manifest:
@@ -1626,6 +1689,11 @@ the old file in one commit. Both files together, invalid syntax and duplicate
1626
1689
  YAML keys fail planning. Empty native `targets` means use discovered inventory
1627
1690
  defaults; it does not disable required checks.
1628
1691
 
1692
+ In a multi-application repository, scope CI with `.seq/repository.yml`: list the
1693
+ checked `applications:` and put every other deployable path under `ignore:`.
1694
+ Repository CI never checks or deploys ignored paths, and they may not overlap a
1695
+ declared root.
1696
+
1629
1697
  Without `--pr`, `ci show` previews the selected ref. For native schema version 2
1630
1698
  it reports discovery and points to the authoritative PR plan. Legacy `checks`
1631
1699
  declarations and package-script discovery remain preview-only: they post neutral
@@ -1639,8 +1707,9 @@ check-runs and cannot satisfy required merge gates. The legacy `require` and
1639
1707
  > for your environment with your administrator.
1640
1708
 
1641
1709
  `seq-studio pipeline <sub>` authors and validates Data Pipelines **stage
1642
- specs** — the typed contracts (`<name>.stage.yml`) in either a dedicated
1643
- Pipeline repo (`pipelines/<domain>`) or an app monorepo (`apps/<app>`).
1710
+ specs** — the typed contracts (`<name>.stage.yml`) in a dedicated Pipeline
1711
+ repo (`pipelines/<domain>`), an app monorepo (`apps/<app>`), or a repo in your
1712
+ own namespace (`<namespace>/<repo>`).
1644
1713
  Validation logic lives in
1645
1714
  `@sequenceholdings/pipeline-spec` (an optional peer, like `@sequenceholdings/orm`);
1646
1715
  install it alongside the CLI for local spec authoring and validation. The
@@ -1671,12 +1740,14 @@ first listed stage directory; without config it keeps using the package root.
1671
1740
  | `seq-studio pipeline codegen tables [--from <authoring.ts>] [--dir <dir>] [--dry-run] [--force]` | Generate one ingestion stage spec per table from a `PerTableIngestionAuthoring` TypeScript module. `--from` defaults to `authoring.tables.ts`; `--dir` defaults to the current package root and writes into its first configured stage directory (or the root without config). `--dry-run` lists output files without writing; existing files are preserved unless `--force` is supplied |
1672
1741
  | `seq-studio pipeline validate [dir] [--assets <file\|url>] [--orm-contracts <file\|url>] [--json]` | Run the full offline spec gate: envelope + body validation, `schema_ref` resolution, and repo-level graph validation (reference resolution, single-writer, cycles, column subsets, serving projection checks). Auto-loads `orm-contracts.json` from the pipeline dir when present. Exit 0/1 |
1673
1742
  | `seq-studio pipeline repin-orm [dir] -e <env> [--target <id>] [--dry-run]` | Resolve the environment's pipeline target (or use `--target` when ambiguous), fetch its active ORM v2 contracts, verify those serving projections remain compatible, then update `orm-contracts.json` and their `satisfies.content_hash` pins. Refuses to write when compatibility fails |
1674
- | `seq-studio pipeline plan --repo <namespace>/<slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] [--json]` | Enqueue and poll a durable Pipeline plan (materialize → SDK/`validateSpecGraph` → compile → live-diff → provision findings). `<namespace>` is `pipelines` or `apps`. Fails closed listing **every** missing target binding (alert channels, workspace, Databricks `source.credential`) plus Data Sync edge-worker machine/operation/`credEnvFamilies` mismatches before registry writes. Does **not** run Databricks `bundle validate` (that is a Trigger deploy-path hard gate). Exit 1 on destructive findings (CI-safe). `--json` emits the completed stable plan envelope |
1675
- | `seq-studio pipeline deploy --repo <namespace>/<slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] [--approved-by <sub>] [--allow-destructive <resource-key> ...] [--run-now] [--wait-timeout <duration>] [--no-wait] [--json]` | Plan then enqueue deploy; Trigger runs `bundle validate` then `bundle deploy` against reviewed bytes. `<namespace>` is `pipelines` or `apps`. Default is plant-only (jobs are created, not run). `--run-now` runs in-unit producer roots after bundle deploy; serving refresh provisioning completes before producer trigger.after tasks can run. If a producer fails, the terminal status includes the remote Databricks task/event error when available. `--allow-destructive` is repeatable and must exactly name every deletion/recreation finding in the immutable plan; only authenticated `@seqholdings.com` users may authorize it; permission, ownership, schedule-drift, and provisioning blockers cannot be overridden. Polls to terminal unless `--no-wait`. Targets that require approval need `--approved-by` naming the authenticated caller. |
1743
+ | `seq-studio pipeline plan --repo <namespace>/<slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] [--json]` | Enqueue and poll a durable Pipeline plan (materialize → SDK/`validateSpecGraph` → compile → live-diff → provision findings). `<namespace>` is `pipelines`, `apps`, or your own namespace. Fails closed listing **every** missing target binding (alert channels, workspace, Databricks `source.credential`) plus Data Sync edge-worker machine/operation/`credEnvFamilies` mismatches before registry writes. Does **not** run Databricks `bundle validate` (that is a Trigger deploy-path hard gate). Exit 1 on destructive findings (CI-safe). `--json` emits the completed stable plan envelope |
1744
+ | `seq-studio pipeline deploy --repo <namespace>/<slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] [--approved-by <sub>] [--allow-destructive <resource-key> ...] [--run-now] [--wait-timeout <duration>] [--no-wait] [--json]` | Plan then enqueue deploy; Trigger runs `bundle validate` then `bundle deploy` against reviewed bytes. `<namespace>` is `pipelines`, `apps`, or your own namespace. Default is plant-only (jobs are created, not run). `--run-now` runs in-unit producer roots after bundle deploy; serving refresh provisioning completes before producer trigger.after tasks can run. If a producer fails, the terminal status includes the remote Databricks task/event error when available. `--allow-destructive` is repeatable and must exactly name every deletion/recreation finding in the immutable plan; only authenticated `@seqholdings.com` users may authorize it; permission, ownership, schedule-drift, and provisioning blockers cannot be overridden. Polls to terminal unless `--no-wait`. Targets that require approval need `--approved-by` naming the authenticated caller. |
1676
1745
 
1677
1746
  `--root` selects a contained Pipeline package inside the repository. The directory becomes the package and Databricks bundle root, so its `*.stage.yml`, `src/`, manifests, contracts, schemas, and extra resources keep their normal root-relative layout. Each repository/root pair is an independent release unit; sibling pipelines and unrelated app files are not included in its bundle. Omitting `--root` preserves the historical whole-repository release unit.
1678
1747
 
1679
- `seq-studio pipeline deploy --dir <checkout> --repo <namespace>/<slug> -e <env>` publishes a clean local checkout into that environment's git service, then deploys the published commit through the same path. It is available on targets that do not require approval (`dev`, `staging`). BankSouth and production still deploy a commit that already exists in that environment's git service. Set `ATLAS_GIT_PAT` (repo:write) before publishing. Do not pass `--ref` with `--dir`. When the repository is created by this command, `main` is set to the published commit so a later clone without `--ref` resolves; an existing repository's default branch is left unchanged.
1748
+ Creating a release unit requires both **Can create** on Pipelines and Git Service **Writer** on the named repository. Once the release unit exists, further changes require its Pipeline `editor` tier.
1749
+
1750
+ `seq-studio pipeline deploy --dir <checkout> --repo <namespace>/<slug> -e <env>` publishes a clean local checkout into that environment's git service, then deploys the published commit through the same path. It is available on targets that do not require approval (`dev`, `staging`). BankSouth and production still deploy a commit that already exists in that environment's git service. Log in with `seq-studio login -e <env>` before publishing; the same user authenticates API and Git requests. Do not pass `--ref` with `--dir`. When the repository is created by this command, `main` is set to the published commit so a later clone without `--ref` resolves; an existing repository's default branch is left unchanged.
1680
1751
  | `seq-studio pipeline status --deployment-id <id> -e <env> [--json]` | Fetch the current remote deployment status without changing it. Use this public command to continue monitoring after local polling stops |
1681
1752
  | `seq-studio pipeline adopt --stage <slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] --native-id <id> --approved-by <you> [--resource-key <key>] [--kind job\|dlt_pipeline] [--old-source-removal-pr <url>] [--repo <namespace>/<slug>]` | Bind a live Databricks job/pipeline into the stage without recreation (`bundle deployment bind` on Trigger). Always requires `--approved-by` naming the caller. When the key is still in the monorepo DAB, pass `--old-source-removal-pr` and follow the returned cutover checklist: unbind the old bundle state without deleting the remote, then remove its DAB declaration and add the target-specific adopted-resource entry in the same PR before redeploying. |
1682
1753
  | `seq-studio pipeline unbind --stage <slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] --approved-by <you> [--resource-key <key>] [--repo <namespace>/<slug>]` | Release an adopted binding on Trigger; the remote object stays live (never deleted) |
@@ -1691,9 +1762,9 @@ matches a target id or when the endpoint has exactly one target.
1691
1762
  If Git authentication fails for a named repository, inspect its source with
1692
1763
  `seq-studio repos clone pipelines/<name> -e <env> --transport json --output ./source`.
1693
1764
  This explicitly uses your Atlas session and creates no `.git` directory. It is
1694
- suitable for source inspection; obtain a Git checkout with a PAT valid for that
1765
+ suitable for source inspection; obtain a Git checkout with `seq-studio login` for that
1695
1766
  environment when you need to push commits. URL/id-only clones require Git
1696
- transport and a PAT. Avoid issuing more PATs without diagnosing the rejection.
1767
+ transport and a current user login. Check repository access and login expiry before retrying.
1697
1768
 
1698
1769
  ### Run a repository through the managed pipeline workflow
1699
1770
 
@@ -1861,6 +1932,13 @@ undocumented physical columns may be absent here. Use `schema` for live column
1861
1932
  verification, then `sample` and `query` for values. Schema reads annotate observed
1862
1933
  columns only; row queries do not infer descriptions for computed expressions.
1863
1934
 
1935
+ For ingestion feeds, `schema`, `sample`, and `query` use the active deployment's
1936
+ declared format. JSON, CSV, and custom-format feeds read the materialized bronze
1937
+ table, not raw landing files; a missing table reports a not-materialized error (409)
1938
+ rather than a successful empty result. Parquet feeds retain landing-volume reads,
1939
+ as do historical deployments that omit a format. These commands do not activate
1940
+ decoders, materialize a feed, or establish ingestion completeness.
1941
+
1864
1942
  `assets` exports the latest registered declarations, including undeployed assets.
1865
1943
  With `assets --repo`, the list, contract export, and total all match that repository.
1866
1944
 
@@ -2170,7 +2248,7 @@ the normal local Atlas authorization and lifecycle, with a dedicated development
2170
2248
  GCS bucket. The standalone `functions dev` harness does not mint storage delegation.
2171
2249
 
2172
2250
 
2173
- ## Composed applications (0.3.0)
2251
+ ## Composed applications (0.4.0)
2174
2252
 
2175
2253
  The public builder path combines standalone Artifacts, ORM namespaces, and Managed
2176
2254
  Functions in a platform repository. Use the environment's `/docs/getting-started/builder-handoff`
@@ -1,5 +1,6 @@
1
1
  import { getJson, postJson } from '../atlas-client.js';
2
2
  import { readConfig } from '../config.js';
3
+ import { wantsHelp } from '../command-input.js';
3
4
  import { applyInChunks } from './apply-chunks.js';
4
5
  import { confirmYes } from '../prompt.js';
5
6
  import { buildContext, clientOptions, flagBool, printError, requestedEnvironment, } from '../functions/commands.js';
@@ -207,6 +208,12 @@ export const AGENTS_USAGE = `usage:
207
208
  `;
208
209
  export async function runAgentsCommand(sub, args) {
209
210
  try {
211
+ // `agents <sub> --help` prints help instead of running the subcommand.
212
+ // Voice has its own help.
213
+ if (sub !== 'voice' && wantsHelp({ args })) {
214
+ console.log(AGENTS_USAGE);
215
+ return 0;
216
+ }
210
217
  switch (sub) {
211
218
  case 'voice': {
212
219
  const { runVoiceCommand } = await import('./voice.js');
@@ -2,8 +2,8 @@ import type { DeployPrimitiveArgs, PrimitiveDeployers } from './deploy.js';
2
2
  import type { PrimitiveEntry } from './manifest.js';
3
3
  /**
4
4
  * The pipeline's release unit — its id in Atlas, the same one deploy
5
- * registers: `pipelines/<name>`, or `apps/<name>@<path>` for one of an app's
6
- * pipelines.
5
+ * registers: `pipelines/<name>`, or `<namespace>/<name>@<path>` for one of an
6
+ * app's pipelines.
7
7
  */
8
8
  export declare function pipelineReleaseUnit(entry: PrimitiveEntry): string | undefined;
9
9
  /**
@@ -4,8 +4,8 @@ import { readFile, stat } from 'node:fs/promises';
4
4
  import { join } from 'node:path';
5
5
  import { load as loadYaml } from 'js-yaml';
6
6
  import { z } from 'zod';
7
- import { assertActiveDeployProvenance } from '@sequenceholdings/artifact-studio/active-deploy-policy';
8
- import { localGitMetadata, resolveArtifactSource } from '@sequenceholdings/artifact-studio/source-resolver';
7
+ import { resolveArtifactSource } from '@sequenceholdings/artifact-studio/source-resolver';
8
+ import { checkOfficialArtifactSource } from './official-source.js';
9
9
  const functionIdentitySchema = z.object({ function: z.object({ id: z.string() }) });
10
10
  const artifactIdentitySchema = z.object({ artifact: z.object({ project_id: z.string() }) });
11
11
  function selectedFlags({ entry }) {
@@ -55,18 +55,23 @@ async function validatePrimitiveIdentity({ entry, path }) {
55
55
  function requirePipelineSource({ entry }) {
56
56
  if (!entry.repo || !entry.ref) {
57
57
  throw new Error(`Pipeline "${entry.id}" requires repo and ref in sequence.app.yml. ` +
58
- 'Push its source to a pipelines/<name> or apps/<name> repository and pin that repository/ref; ' +
58
+ 'Push its source to a git-service repository (pipelines/<name>, apps/<name>, or your own namespace) and pin that repository/ref; ' +
59
59
  'pipeline deployment reads committed source from the platform git service.');
60
60
  }
61
61
  return { repo: entry.repo, ref: entry.ref };
62
62
  }
63
+ /**
64
+ * A `pipelines/*` repo is a dedicated Pipeline repo, deployed from its root.
65
+ * Any other repo (`apps/*` or a builder's own namespace) is the app's
66
+ * repository, holding this pipeline at its manifest path.
67
+ */
63
68
  function pipelineRoot(entry) {
64
- return entry.repo?.startsWith('apps/') ? entry.path : undefined;
69
+ return entry.repo && !entry.repo.startsWith('pipelines/') ? entry.path : undefined;
65
70
  }
66
71
  /**
67
72
  * The pipeline's release unit — its id in Atlas, the same one deploy
68
- * registers: `pipelines/<name>`, or `apps/<name>@<path>` for one of an app's
69
- * pipelines.
73
+ * registers: `pipelines/<name>`, or `<namespace>/<name>@<path>` for one of an
74
+ * app's pipelines.
70
75
  */
71
76
  export function pipelineReleaseUnit(entry) {
72
77
  if (!entry.repo)
@@ -80,8 +85,8 @@ async function validatePipelineSource(args) {
80
85
  const { buildContext, clientOptions } = await import('../functions/commands.js');
81
86
  const context = await buildContext({ positional: [], flags: { env: args.env } });
82
87
  const [namespace, name] = repo.split('/');
83
- if ((namespace !== 'pipelines' && namespace !== 'apps') || !name || repo.split('/').length !== 2) {
84
- throw new Error(`Pipeline "${args.entry.id}" requires a pipelines/<name> or apps/<name> repository.`);
88
+ if (!namespace || !name || repo.split('/').length !== 2) {
89
+ throw new Error(`Pipeline "${args.entry.id}" requires a <namespace>/<name> repository.`);
85
90
  }
86
91
  const source = await resolveArtifactSource({ kind: 'git-service', namespace, name, ref }, { ...clientOptions(context), ...(context.authMode ? { authMode: context.authMode } : {}) });
87
92
  try {
@@ -151,12 +156,8 @@ export async function validateAppPrimitive(args) {
151
156
  break;
152
157
  }
153
158
  case 'artifact': {
154
- if (env !== 'local') {
155
- assertActiveDeployProvenance({
156
- ...localGitMetadata(path),
157
- environment: env,
158
- });
159
- }
159
+ if (env !== 'local')
160
+ checkOfficialArtifactSource({ dir: path, env, dryRun: args.dryRun });
160
161
  const { runArtifactCommand } = await import('../artifact/delegate.js');
161
162
  code = await runArtifactCommand('validate', [path]);
162
163
  break;