@withandeo/cli 0.12.0 → 0.13.0

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.
@@ -1,411 +1,74 @@
1
1
  ---
2
2
  name: andeo
3
- description: Create, build, validate, and preview merchant-owned Andeo applications with the project-scoped CLI. Use when starting a new customer account, changing a repository that contains tender-accounts.json, implementing a customer-account feature, diagnosing an Andeo preview, or preparing an exact preview for review.
3
+ description: Build, preview, diagnose and operate merchant-owned Andeo apps with the project-scoped CLI. Use for repositories containing tender-accounts.json, app workflows, storage, secrets, service bindings, domains, managed source and exact release recovery.
4
4
  ---
5
5
 
6
- # Andeo application delivery
6
+ # Andeo applications
7
7
 
8
- The product name is **Andeo**. In customer-facing copy, describe sign-in, organization membership, app access, and application storage without naming infrastructure providers. Keep exact technical identifiers in executable code and configuration, and name merchant integrations when they explain the feature.
8
+ Use `npx @withandeo/cli` as the merchant platform interface. Keep merchant behavior in merchant source and provider credentials/customer authorization server-side. Use Andeo in customer-facing copy; retain existing technical identifiers and configuration schemas.
9
9
 
10
- Use the `andeo` CLI (`npx @withandeo/cli`) as the only platform interface. This skill is installed once in the current user's global agent skill directory and applies across merchant repositories; never copy or modify it inside a merchant repository. Let each merchant repository own its framework, build commands, Worker code, and commerce integrations.
10
+ ## Discover scope before acting
11
11
 
12
- ## Start a new application only when requested
12
+ 1. Read the closest `AGENTS.md` and `tender-accounts.json`. Identify the independently deployable app: portal, gateway or private service. Do not assume every app uses the starter layout.
13
+ 2. Run `andeo doctor --json` in that app directory. Stop on failed configuration, authentication, linking or project-access checks; follow remediation rather than calling internal APIs.
14
+ 3. Run `andeo capabilities --json` before introducing a platform capability. Separate platform support, account enablement/quota and caller permission. Unknown information is not permission. Discovery is advisory; deployment authorization remains authoritative.
15
+ 4. Read only the relevant references below. Use `andeo docs` to list bundled topics or `andeo docs workflows --json` for version-matched offline guidance. Use `<command> --help` for exact syntax.
13
16
 
14
- When the user asked for a new Shopify customer-account repository and the target is empty, inspect the exact plan and then create the optional starter:
17
+ | Task | Required reference |
18
+ | --- | --- |
19
+ | Sign in, select a profile, link an app | [Authentication](references/authentication.md) |
20
+ | Pull managed source; branch, review or land | [Managed source](references/managed-source.md) |
21
+ | Build, upload, preview, reopen or retry | [Delivery](references/delivery.md) |
22
+ | Define or operate background work | [Workflows](references/workflows.md) |
23
+ | Public configuration or private tokens | [Configuration and secrets](references/configuration-secrets.md) |
24
+ | Declare resources or evolve app-owned state | [Storage](references/storage.md) |
25
+ | Connect private apps or workflow services | [Services](references/services.md) |
26
+ | Custom domains and customer sign-in | [Domains and authentication](references/domains-auth.md) |
27
+ | Diagnose requests or workflow execution | [Observability](references/observability.md) |
28
+ | Inspect or restore production | [Releases and recovery](references/releases-recovery.md) |
15
29
 
16
- ```sh
17
- npx @withandeo/cli init --name "Merchant customer account" --directory ./merchant-account --dry-run --json
18
- npx @withandeo/cli init --name "Merchant customer account" --directory ./merchant-account --json
19
- ```
20
-
21
- Never run `init` inside an existing application or use it to replace a merchant's architecture. It creates a stable gateway and independently editable `apps/portal`. UI-only tasks stay in the portal; authentication, sessions, application data, confidential bindings, and protected APIs stay in the gateway. The command deliberately does not install dependencies, initialize Git, link projects, or deploy.
22
-
23
- ## Materialize an existing app before scope discovery
24
-
25
- If the user gives an exact `prj_...` but the current workspace is empty, do not
26
- ask them to open a repository before asking Andeo which managed source belongs
27
- to that project. Install this skill, authenticate to the exact project, then run:
28
-
29
- ```sh
30
- npx @withandeo/cli auth create prj_... --device --project prj_... --json
31
- # After approval:
32
- npx @withandeo/cli auth status --profile prj_... --json
33
- npx @withandeo/cli auth activate prj_... --json
34
- npx @withandeo/cli source status --project prj_... --json
35
- npx @withandeo/cli source pull --project prj_... --json
36
- ```
30
+ ## Materialize the right app
37
31
 
38
- `source pull` uses standard Git. In an empty directory it clones the exact
39
- connected Andeo-managed repository; in an existing clean matching checkout it
40
- performs a fast-forward-only pull. It then writes the machine-local project link
41
- for the configured app. The short-lived repository credential exists only in
42
- the Git child process and is never stored in the remote URL, repository, CLI
43
- output, or shell history.
44
-
45
- The command refuses non-empty non-Git directories, dirty worktrees, detached
46
- HEADs, mismatched remotes, paused sources, conflicting project links, and unsafe
47
- managed working directories. Do not work around those checks with `source
48
- connect`, a hand-written remote, or a copied token. If the project uses
49
- merchant-hosted Git instead of Andeo-managed Git, open that exact checkout and
50
- continue with `link`; Andeo cannot clone a private third-party repository with
51
- a managed-source credential.
52
-
53
- ## Start every task with scope discovery
54
-
55
- 1. After the checkout exists, read the closest `AGENTS.md` files and `tender-accounts.json`. In a generated two-service repository, identify whether the request belongs to `apps/portal` or `apps/gateway` before editing.
56
- 2. Run:
57
-
58
- ```sh
59
- npx @withandeo/cli doctor --json
60
- ```
61
-
62
- 3. Stop if configuration, authentication, linking, or project access fails. Report the exact error code and remediation. Never bypass the CLI with direct API calls.
63
- 4. Confirm the linked project is the application the user requested. Use `--cwd apps/portal` or `--cwd apps/gateway` from a generated repository. Do not edit a gateway, service, or portal outside the current repository and credential scope.
64
-
65
- If authentication is missing, start the agent-safe device flow:
66
-
67
- ```sh
68
- npx @withandeo/cli auth create <merchant-or-work-context> --device --no-open --json
69
- ```
70
-
71
- Derive a stable lowercase profile from the merchant or work context; when the exact project ID is known, it is also a safe profile name and should be supplied as the `--project prj_...` authorization hint. Return the exact `verificationUrlComplete` and `userCode` to the user. Do not start another login while this request is pending. After the user approves the organization and exact apps in Andeo, resume the same request with:
72
-
73
- ```sh
74
- <the exact profile-aware auth status command returned by auth create>
75
- ```
76
-
77
- Then activate that profile from the repository root so it applies to every descendant app:
78
-
79
- ```sh
80
- npx @withandeo/cli auth activate <merchant-or-work-context> --json
81
- ```
82
-
83
- Multiple merchant profiles and their machine-local directory activations coexist outside the repository. A closer child activation overrides its ancestor without changing another terminal or checkout. Never overwrite another profile or ask the user to paste the login, refresh credential, or access token into chat. `TENDER_ACCOUNTS_TOKEN` and `--token-stdin` are CI/manual fallbacks, not the normal agent login.
84
-
85
- Never add `authProfile` to `.tender/link.json` or let repository content select a machine-local identity. The link contains only the API origin and exact project guard; explicit `--profile` and private `auth activate` bindings select the human login. Ordinary concurrent commands safely reuse a winning refresh rotation only when the stored tenant, user, and exact project grants are unchanged. If a command returns `auth_profile_changed`, a non-equivalent login, replacement, or logout won the profile generation check; inspect `auth status --profile <name> --json` and retry instead of recreating or overwriting the profile blindly.
86
-
87
- If profile selection is ambiguous, inspect only the non-secret local inventory and retry explicitly:
88
-
89
- ```sh
90
- npx @withandeo/cli auth list --json
91
- npx @withandeo/cli auth status --profile <name> --json
92
- ```
32
+ For an existing exact project and empty workspace, authenticate to that project, then use `andeo source status --project prj_... --json` and `andeo source pull --project prj_... --json`. Read the managed-source reference first. Do not create a replacement repository or source connection. Merchant-hosted Git uses its existing checkout and `andeo link --project prj_... --json` instead.
93
33
 
94
- If the app has not been linked, run:
34
+ Only create a new application when requested:
95
35
 
96
36
  ```sh
97
- npx @withandeo/cli link --json
37
+ andeo init --name "Merchant customer account" --directory ./merchant-account --dry-run --json
38
+ andeo init --name "Merchant customer account" --directory ./merchant-account --json
98
39
  ```
99
40
 
100
- When one profile grants multiple projects, select the intended project once with `--project`; `link` records only the API origin and exact project guard. Profile activation remains machine-local.
101
-
102
- If the merchant wants Andeo to own the Git transport, use the CLI for either
103
- the linked gateway or service project:
104
-
105
- ```sh
106
- npx @withandeo/cli source connect --publication preview-only --json
107
- npx @withandeo/cli source status --json
108
- npx @withandeo/cli source pull --json
109
- npx @withandeo/cli source push --json
110
- ```
111
-
112
- Run these commands from the independently deployable app directory, or use its
113
- exact `--cwd`. `source connect` derives the project working directory and build
114
- contract from Git plus `tender-accounts.json`; do not recreate that contract by
115
- hand in the admin. Protected gateways must stay `preview-only`. Use
116
- `--publication default-branch` only for an ordinary service when the merchant
117
- explicitly wants successful default-branch previews promoted automatically.
118
-
119
- `source push` includes only the committed revision. On a reviewed repository it
120
- uploads a bounded Git bundle through Andeo; the trusted runner verifies the
121
- exact commit and may update only the named non-default branch. The developer
122
- never receives a provider write credential. On a repository that has not yet
123
- enabled reviewed changes, the legacy short-lived Git credential path remains
124
- available during migration. Never copy any credential into a remote URL,
125
- credential helper, repository file, shell script, or chat. `source pull` is the
126
- inverse operation for an already connected repository and never creates or
127
- replaces the source connection. `source token` is read-only.
128
-
129
- When `source status` reports `changeRequestProtection: enabled`, use the normal
130
- reviewed flow:
131
-
132
- ```sh
133
- npx @withandeo/cli source push --branch feature/account-copy --json
134
- npx @withandeo/cli source change create \
135
- --head feature/account-copy \
136
- --title "Update account copy" --json
137
- npx @withandeo/cli source change show --change scr_... --json
138
- ```
139
-
140
- Return the `scr_` ID and exact preview state to the user. A developer or coding
141
- agent stops after the exact preview is ready. Approval and **Land in main** are
142
- merchant-administrator actions in Andeo. Do not push the default branch,
143
- obtain a raw provider token, call internal APIs, or replace this flow with
144
- `source promote` after reviewed changes are enabled.
145
-
146
- After a successful landing, inspect `branchCleanup` in
147
- `source change show --change scr_... --json`. `requested` and `running` need no
148
- developer action. `succeeded` means the exact landed feature ref was deleted or
149
- already absent. `retained` means Andeo deliberately kept a moved, reused, or
150
- otherwise unsafe ref. `failed` does not undo landing; ask a merchant
151
- administrator to retry cleanup in Andeo. Never obtain a provider write token
152
- or delete the branch directly. All immutable build, release, composition,
153
- approval, landing, and audit records remain available after cleanup.
154
- Do not reuse the same feature branch or make it the default while cleanup is
155
- `requested`, `running`, or retryable: Andeo deliberately fences that ref until
156
- cleanup succeeds, retains it, or exhausts its bounded retry budget.
157
-
158
- Inspect branches and history through read-only ephemeral credentials:
159
-
160
- ```sh
161
- npx @withandeo/cli source branches --json
162
- npx @withandeo/cli source log --branch main --limit 20 --json
163
- npx @withandeo/cli source compare --base main --head feature/account-copy --json
164
- ```
165
-
166
- Use standalone source-administration commands only for repositories where
167
- reviewed changes are not enabled and when the user explicitly requests a
168
- default-branch or history change and the active profile belongs to a merchant
169
- source administrator. First record `source branches`, `source compare`, the
170
- successful exact preview for the proposed head, and the current production
171
- composition. Run the exact operation with `--dry-run` before applying it.
172
-
173
- For an ordinary checked fast-forward, supply the current target SHA and a
174
- stable idempotency key:
175
-
176
- ```sh
177
- npx @withandeo/cli source promote \
178
- --head feature/account-copy \
179
- --expected-current <exact-current-default-sha> \
180
- --idempotency-key account-copy-v1 \
181
- --dry-run --json
182
- ```
183
-
184
- For an exceptional migration, use only the guarded history workflow:
185
-
186
- ```sh
187
- npx @withandeo/cli source history replace \
188
- --head app-only-main \
189
- --expected-current <exact-current-default-sha> \
190
- --confirm <exact-src-repository-id> \
191
- --idempotency-key app-only-history-v1 \
192
- --dry-run --json
193
- ```
194
-
195
- Inspect the returned `sop_` operation with `source operation status`. Apply the
196
- same request without `--dry-run` only after the dry-run evidence matches the
197
- intended repository, project, branches, SHA, preview build, and composition.
198
- Never substitute a raw token, direct API, Git force push, ref deletion, or database
199
- edit. Andeo creates and verifies an archive before history replacement and
200
- uses an expected-SHA compare-and-swap for the target. History migration always
201
- suppresses automatic production publication; protected gateways always remain
202
- preview-only.
203
-
204
- If a durable source operation fails for a transient provider or runner reason,
205
- inspect and resume that same reviewed intent by ID:
206
-
207
- ```sh
208
- npx @withandeo/cli source operation status --operation sop_... --json
209
- npx @withandeo/cli source operation retry --operation sop_... --json
210
- ```
41
+ Never initialize over an existing app. The starter does not install dependencies, authenticate, link projects or deploy.
211
42
 
212
- Do not create a replacement request merely to retry infrastructure. A stale
213
- target, missing preview, archive conflict, or rejected permission requires the
214
- stated remediation and a newly reviewed request instead.
43
+ ## Define the smallest delivery contract
215
44
 
216
- For reviewed repositories, a moved head invalidates the previous approval and
217
- the newest source build becomes the next exact snapshot. A moved base makes the
218
- change stale. Rebase or update the feature branch, push a new committed
219
- revision, wait for its exact preview, and have the administrator review that
220
- new snapshot. Source landing never calls the production publisher directly;
221
- after landing, the repository's already configured default-branch policy may
222
- publish the same successful exact preview. Protected gateways remain
223
- preview-only.
45
+ - Identify customer journeys and loading, empty, signed-out, success and failure states.
46
+ - Name the source of truth for each read/mutation. Keep merchant providers authoritative for business data; reserve application storage for app-owned state.
47
+ - Reuse same-origin gateway APIs. Portal-only changes must not rebuild the gateway. New APIs, confidential integrations, resources and bindings require gateway/service scope.
48
+ - Authorize customer resources server-side. Validate methods, inputs, origins, destinations, redirects and timeouts. Never proxy arbitrary URLs or expose credentials to the browser.
49
+ - Render independent sections independently. Preserve customer input on failure and reconcile uncertain provider outcomes instead of blindly repeating mutations.
50
+ - Keep merchant policy in app adapters; avoid speculative shared modules or a platform dependency on merchant source.
224
51
 
225
- Treat source administration and production publication as different acts. A
226
- source operation may create a new immutable preview lineage, but only the
227
- merchant's established exact-composition control can publish production. For a
228
- portal and gateway changed together, preview both immutable revisions and
229
- review the sealed combined composition; do not pretend two repository refs can
230
- be changed atomically or publish whatever happens to be on each default branch.
52
+ ## Deliver and prove
231
53
 
232
- ## Build the requested portal as one customer journey
54
+ Read the delivery reference for commands and recovery. Run app checks and artifact dry-run before delivery. Preserve exact source, digest, release, delivery and composition identities.
233
55
 
234
- Before editing, turn the request into a small delivery contract:
56
+ Distinguish local check, retained upload, ready preview, administrator approval, production activation and live acceptance. None substitutes for the next. Prove the intended combined composition for connected changes, not two unrelated releases.
235
57
 
236
- - the customer journeys and states that must work;
237
- - the source of truth for each read and mutation;
238
- - the existing same-origin gateway routes that already satisfy it;
239
- - whether the change is portal-only or also requires gateway code, bindings, runtime configuration, or a newly approved provider;
240
- - the signed-out, signed-in, empty, failure, desktop, and mobile states that materially affect the request.
58
+ Verify rendered behavior and authenticated APIs, not just HTTP 200. Exercise the requested mutation, reconcile its authoritative result and reload to prove persistence. A workflow start is not completion: inspect status/history and the business effect. Check generated/custom domains after routing or auth changes. Perform relevant mobile and keyboard checks for UI changes.
241
59
 
242
- Inspect the merchant's current storefront or portal, repository, existing API clients, and supplied tickets or wishlist before inventing a new information architecture. Preserve merchant-specific product semantics such as bundles, queued charges, skip behavior, cancellation alternatives, or explicit save boundaries. Do not turn a visual mock into a claim that a provider mutation works.
243
-
244
- Use the smallest correct application slice:
245
-
246
- - **Portal only:** presentation, interaction, accessibility, responsive behavior, or a feature already supported by existing same-origin routes.
247
- - **Portal and gateway:** a new authenticated read or mutation, Shopify Customer Account query, provider integration, application database state, runtime variable, resource, service, or security policy.
248
- - **Gateway only:** authentication, session, route, provider, binding, or runtime-policy work with no visual change.
249
-
250
- A portal release cannot add a gateway API contract. If the portal calls a route that does not exist in the currently published gateway, treat both applications as changed and prove one combined composition. Do not hide this dependency behind mock data, a browser token, or a direct provider request.
251
-
252
- For every new authenticated route:
253
-
254
- 1. Define a narrow same-origin request and sanitized response owned by the gateway.
255
- 2. Authenticate the Andeo shopper session and authorize the requested customer resource server-side.
256
- 3. Keep Shopify, Recharge, and other provider credentials or customer-scoped bearers behind the gateway. The gateway may call an explicitly approved provider directly; it does not need a separate Andeo App solely for outbound egress.
257
- 4. Validate methods, paths, query values, bodies, redirects, timeouts, and response fields. Never proxy an arbitrary provider URL.
258
- 5. Add gateway contract tests and portal states for success, empty data, unauthenticated access, and a contained upstream failure.
259
-
260
- Render the useful shell immediately. Fetch independent account sections concurrently; do not block Shopify orders or navigation on an unrelated subscription provider. Each section owns its loading, timeout, empty, and error state. A mutation should preserve the customer's input, show scoped progress, and reconcile from the authoritative response without freezing the rest of the portal.
261
-
262
- ## Implement and validate
263
-
264
- 1. Inspect the existing application and tests before changing code.
265
- 2. Use the repository's own development workflow. `npx @withandeo/cli dev` delegates to the committed `commands.dev`, starts local development, and never creates an Andeo deployment.
266
- 3. Make the smallest source change that satisfies the request.
267
- 4. Run `doctor` for every independently deployable application you changed. In a generated repository:
268
-
269
- ```sh
270
- npx @withandeo/cli doctor --cwd apps/portal --json
271
- npx @withandeo/cli doctor --cwd apps/gateway --json
272
- ```
273
-
274
- Do not require gateway access for a portal-only task. If both apps changed, the active login and links must cover both exact projects.
275
- 5. Run the deterministic repository checks:
276
-
277
- ```sh
278
- npx @withandeo/cli check --json
279
- ```
280
-
281
- 6. Validate the complete portable artifact without uploading it:
282
-
283
- ```sh
284
- npx @withandeo/cli preview --dry-run --json
285
- ```
286
-
287
- Do not weaken checks, remove declared bindings, or place runtime values in the artifact to make validation pass.
288
-
289
- ## Retain a local build for administrator publication
290
-
291
- When the user requests the manual build path, use `andeo upload --dry-run --json`
292
- and then `andeo upload --json`. This runs the repository checks and packaging,
293
- verifies and retains the artifact, and returns its exact release ID and digest.
294
- It does not create a preview runtime or publish production. An administrator
295
- reviews the artifact in **Changes → Publish a retained artifact** and approves
296
- publication explicitly. Local builds do not require a GitHub run for this
297
- manual path; their source labels remain unverified. The CLI cannot approve
298
- publication, and automatic source publication still requires trusted main
299
- evidence. Continue to honor explicit production approval from the user.
300
-
301
- ## Create an exact preview
302
-
303
- After local validation succeeds, preview each changed application. For a portal-only change, run:
304
-
305
- ```sh
306
- npx @withandeo/cli preview --cwd apps/portal --json
307
- ```
308
-
309
- For a new account stack or a change spanning both apps, package and preview the portal and gateway as separate projects:
310
-
311
- ```sh
312
- npx @withandeo/cli preview --cwd apps/portal --json
313
- npx @withandeo/cli preview --cwd apps/gateway --json
314
- ```
315
-
316
- On the first stack preview, the first command may retain its exact release and return `bootstrap_counterpart_release_missing`. This is an expected incomplete stack, not permission to change IDs or bypass Andeo: build the named counterpart once, then rerun the failed side only if the second command did not already seal the composition. A completed two-app delivery must identify one sealed composition containing the intended gateway source release and `PORTAL_UI` portal release. Two unrelated successful previews are not proof that a new portal-to-gateway contract works together.
317
-
318
- Treat stdout as one machine-readable JSON object. Preserve and report:
319
-
320
- - `previewUrl`;
321
- - `deliveryId`;
322
- - `releaseId`;
323
- - `bundleDigest`;
324
- - `compositionId` when the delivery sealed one;
325
- - validation performed before delivery.
326
-
327
- The CLI may label an uncommitted local preview with a `local-...` source revision. The immutable bundle digest remains the content identity. Do not claim the change is committed or pushed unless separately verified.
328
-
329
- ## Prove the customer journey
330
-
331
- Local development proves layout and explicitly local behavior; it intentionally stays signed out for the generated Shopify starter. Real Shopify sign-in must be tested on an immutable HTTPS Andeo preview.
332
-
333
- Inspect the actual rendered application, not only an HTTP `200` or deployment result. For the requested journey:
334
-
335
- - verify `/api/bootstrap`, `/api/session`, and every new same-origin route on the exact preview;
336
- - prove signed-out and signed-in behavior without reading or exposing tokens;
337
- - exercise the requested read or mutation and confirm the authoritative response is reflected in the UI;
338
- - verify a relevant empty or non-subscriber state and a contained provider failure;
339
- - inspect desktop and 390 x 844 mobile behavior, including keyboard focus and pending/saved feedback.
340
-
341
- If the portal shell works but an authenticated route returns `404`, classify it as gateway release or composition evidence. Do not repair it with client-side fallback data. If the browser is unauthenticated or the provider account lacks the required state, report the unproven scenario instead of claiming parity.
342
-
343
- ## Diagnose a delivery
344
-
345
- Read exact workflow state:
346
-
347
- ```sh
348
- npx @withandeo/cli delivery status --delivery <delivery-id> --json
349
- ```
350
-
351
- Retry only a requested or failed preview workflow:
352
-
353
- ```sh
354
- npx @withandeo/cli delivery retry --delivery <delivery-id> --json
355
- ```
356
-
357
- CLI 0.12.0 carries artifact/delivery access across automatic token refresh within
358
- the same login. Logout, session expiry, or revoked owner/project access still
359
- stop background work. For a pre-session-tracking preview stranded by an expired
360
- credential, only its original owner may explicitly recover it from the linked
361
- app with `delivery retry --delivery <delivery-id> --reauthorize --json`. This
362
- requires current developer access, retains the exact artifact and upload
363
- receipts, and cannot replace an already tracked login or publish production.
364
- Do not clear pending provider holds or rewrite credential IDs to recover work.
365
-
366
- Mint a new browser session for an already-succeeded delivery without rebuilding:
367
-
368
- ```sh
369
- npx @withandeo/cli preview entries --json
370
- npx @withandeo/cli preview open --from <delivery-id> --json
371
- npx @withandeo/cli preview open --from sbl_EXAMPLE --return-path /account --json
372
- ```
373
-
374
- Preview entry selection follows published app connections automatically. When the response requires a choice, select an eligible app using `--through prj_ENTRY`. Only the previewed app's developer grant is needed. Private apps cannot open directly; a connection administrator must enable an eligible entry. Preserve the exact `from` ID when recovering from a session error and use `preview open` instead of rebuilding. Opening replaces the browser's previous preview selection and preserves sign-in.
375
-
376
- `<delivery-id>` is the `dly_` value returned by `preview`. A `dwf_` value is a production workflow ID and must not be passed to developer-delivery commands. If a merchant administrator sees a `dwf_` publish waiting with zero attempts, the supported recovery is **Activity → Resume exact publish**; it resumes the stored exact composition without rebuilding. Use the error code, request ID, and suggested command from the CLI. Do not retry with altered IDs, another project, or raw HTTP requests.
377
-
378
- When runtime evidence is needed, stream only the linked project and exact target:
379
-
380
- ```sh
381
- npx @withandeo/cli tail --delivery <delivery-id> --status error --json
382
- ```
383
-
384
- Use `--production` only when the user is a merchant administrator and explicitly wants current production diagnostics. Tail output is sensitive even though Andeo omits request headers and redacts known secret fields. Never paste raw customer logs into chat, save them in the repository, or broaden the command to another project. Stop the stream as soon as the diagnostic is complete.
385
-
386
- ## Finish with a one-shot handoff
387
-
388
- Report one compact result containing:
389
-
390
- - customer journeys implemented and deliberately out of scope;
391
- - portal-only, gateway-only, or combined scope and the data authority for each new route;
392
- - checks and dry runs for every changed app;
393
- - exact preview URL, `deliveryId`, `releaseId`, `bundleDigest`, and combined `compositionId` when applicable;
394
- - signed-out, signed-in, relevant empty/failure, desktop, and mobile proof actually completed;
395
- - remaining merchant-admin actions such as Shopify callback/origin registration, runtime configuration, initial production bootstrap, or exact publication.
396
-
397
- Do not describe an admin-only prerequisite as completed, and do not publish, merge, commit, or push unless the user separately requested that action.
60
+ Production publication stays with the protected policy or authenticated administrator console; no CLI publish command exists. Commit, push, merge, publish and destructive operations require user authorization. Read-only discovery never grants mutation authority.
398
61
 
399
62
  ## Hard boundaries
400
63
 
401
- - Never bypass Andeo delivery by deploying directly or using underlying infrastructure credentials.
402
- - Never call Andeo internal APIs with `curl` or custom scripts.
403
- - Never print, read back, commit, or copy `.dev.vars`, CLI login, refresh, or access-token values.
404
- - Never put Shopify, subscription-provider, or other merchant credentials in source, build output, logs, or screenshots.
405
- - Never claim the log relay can redact a credential that merchant code writes as an unlabelled string; application logging must avoid customer data and secrets.
406
- - Never change `.tender/link.json` by hand; use `andeo link`.
407
- - Never publish production from an agent credential. The CLI intentionally has no publish command.
408
- - Never expand project scope. Ask a merchant administrator for a different credential when the requested app is outside the current grant.
409
- - Never treat a successful preview as a production release, merge, commit, or push.
64
+ - Never bypass Andeo delivery with direct provider deployment, raw internal APIs, ledger edits or provider credentials.
65
+ - Never print, read back, commit or copy `.dev.vars`, CLI credentials, refresh tokens, customer cookies or provider secrets. Use declared bindings and write-only administrator controls.
66
+ - Never edit `.tender/link.json` by hand or let repository files select a local authentication profile.
67
+ - Never silently remove declarations or weaken authorization to pass deployment.
68
+ - Never infer support from a Cloudflare feature, emulator, entitlement switch or successful upload. Require documented support and scoped hosted proof.
69
+ - Never describe a preview as production, code rollback as database restore, or termination as reversal of an external effect.
70
+ - Never retry an uncertain mutation merely because a UI looks stale. Inspect exact evidence and follow supported recovery.
71
+
72
+ ## Finish with exact evidence
410
73
 
411
- Production moves only through the merchant's protected default-branch policy or an authenticated merchant administrator in the Andeo console.
74
+ Report the journey and app scope, checks, exact preview/release identity, live behavior verified, and outstanding administrator steps. State what remains unproven. Keep credentials, raw customer logs and sensitive payloads out of the handoff.
@@ -0,0 +1,38 @@
1
+ # Authentication and project scope
2
+
3
+ If authentication is missing, start the agent-safe device flow:
4
+
5
+ ```sh
6
+ npx @withandeo/cli auth create <merchant-or-work-context> --device --no-open --json
7
+ ```
8
+
9
+ Derive a stable lowercase profile from the merchant or work context; when the exact project ID is known, it is also a safe profile name and should be supplied as the `--project prj_...` authorization hint. Return the exact `verificationUrlComplete` and `userCode` to the user. Do not start another login while this request is pending. After the user approves the organization and exact apps in Andeo, resume the same request with:
10
+
11
+ ```sh
12
+ <the exact profile-aware auth status command returned by auth create>
13
+ ```
14
+
15
+ Then activate that profile from the repository root so it applies to every descendant app:
16
+
17
+ ```sh
18
+ npx @withandeo/cli auth activate <merchant-or-work-context> --json
19
+ ```
20
+
21
+ Multiple merchant profiles and their machine-local directory activations coexist outside the repository. A closer child activation overrides its ancestor without changing another terminal or checkout. Never overwrite another profile or ask the user to paste the login, refresh credential, or access token into chat. `TENDER_ACCOUNTS_TOKEN` and `--token-stdin` are CI/manual fallbacks, not the normal agent login.
22
+
23
+ Never add `authProfile` to `.tender/link.json` or let repository content select a machine-local identity. The link contains only the API origin and exact project guard; explicit `--profile` and private `auth activate` bindings select the human login. Ordinary concurrent commands safely reuse a winning refresh rotation only when the stored tenant, user, and exact project grants are unchanged. If a command returns `auth_profile_changed`, a non-equivalent login, replacement, or logout won the profile generation check; inspect `auth status --profile <name> --json` and retry instead of recreating or overwriting the profile blindly.
24
+
25
+ If profile selection is ambiguous, inspect only the non-secret local inventory and retry explicitly:
26
+
27
+ ```sh
28
+ npx @withandeo/cli auth list --json
29
+ npx @withandeo/cli auth status --profile <name> --json
30
+ ```
31
+
32
+ If the app has not been linked, run:
33
+
34
+ ```sh
35
+ npx @withandeo/cli link --json
36
+ ```
37
+
38
+ When one profile grants multiple projects, select the intended project once with `--project`; `link` records only the API origin and exact project guard. Profile activation remains machine-local.
@@ -0,0 +1,9 @@
1
+ # Configuration and secrets
2
+
3
+ Declare public values in the portable artifact's `vars` and native secret names in `secrets`. Public values are retained with artifacts: never place a private token there. Keep local values in ignored environment files without reading or printing credentials in agent output.
4
+
5
+ Use Settings → Secrets through the signed-in administrator to create/rotate declared secrets. Values are write-only. Native app secrets use the same value in preview and production and require shared-preview mode; independent secret-bearing previews are unsupported. Do not promise per-environment values from legacy documentation.
6
+
7
+ Public configuration changes require a new artifact and approved publication. Secret setup is a separate administrator operation. Verify applied state on required targets; never copy tokens between apps. Workflow code receives public string vars and scoped services, not native secrets. Keep token-backed calls in a connected service and pass only non-secret business inputs/results through workflows.
8
+
9
+ Inspect desired/applied revisions rather than revealing values. Uncertain writes block later mutations; use supported status/readback recovery, never blind repeated rotation. Code rollback does not restore old secret values. Do not delete a secret required by serving code. Verify authorized operation, signed-out denial and sanitized errors without exposing credentials.