@withandeo/cli 0.11.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.
- package/README.md +42 -0
- package/dist/api.d.ts +8 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +12 -2
- package/dist/api.js.map +1 -1
- package/dist/artifact-limits.d.ts +8 -0
- package/dist/artifact-limits.d.ts.map +1 -0
- package/dist/artifact-limits.js +10 -0
- package/dist/artifact-limits.js.map +1 -0
- package/dist/artifact.d.ts.map +1 -1
- package/dist/artifact.js +28 -11
- package/dist/artifact.js.map +1 -1
- package/dist/capability-preflight.d.ts +7 -0
- package/dist/capability-preflight.d.ts.map +1 -0
- package/dist/capability-preflight.js +48 -0
- package/dist/capability-preflight.js.map +1 -0
- package/dist/contracts.d.ts +20 -0
- package/dist/contracts.d.ts.map +1 -1
- package/dist/documentation.d.ts +13 -0
- package/dist/documentation.d.ts.map +1 -0
- package/dist/documentation.js +70 -0
- package/dist/documentation.js.map +1 -0
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +16 -1
- package/dist/files.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +135 -15
- package/dist/main.js.map +1 -1
- package/dist/workflow-config.d.ts +9 -0
- package/dist/workflow-config.d.ts.map +1 -0
- package/dist/workflow-config.js +76 -0
- package/dist/workflow-config.js.map +1 -0
- package/dist/workflow-contract.d.ts +34 -0
- package/dist/workflow-contract.d.ts.map +1 -0
- package/dist/workflow-contract.js +96 -0
- package/dist/workflow-contract.js.map +1 -0
- package/dist/workflow-coordinator.d.ts +4 -0
- package/dist/workflow-coordinator.d.ts.map +1 -0
- package/dist/workflow-coordinator.js +49 -0
- package/dist/workflow-coordinator.js.map +1 -0
- package/dist/workflow-dev-host.d.ts +2 -0
- package/dist/workflow-dev-host.d.ts.map +1 -0
- package/dist/workflow-dev-host.js +34 -0
- package/dist/workflow-dev-host.js.map +1 -0
- package/dist/workflow-dev.d.ts +5 -0
- package/dist/workflow-dev.d.ts.map +1 -0
- package/dist/workflow-dev.js +112 -0
- package/dist/workflow-dev.js.map +1 -0
- package/dist/workflow-package.d.ts +5 -0
- package/dist/workflow-package.d.ts.map +1 -0
- package/dist/workflow-package.js +116 -0
- package/dist/workflow-package.js.map +1 -0
- package/package.json +8 -1
- package/skill/tender-accounts/SKILL.md +48 -376
- package/skill/tender-accounts/references/authentication.md +38 -0
- package/skill/tender-accounts/references/configuration-secrets.md +9 -0
- package/skill/tender-accounts/references/delivery.md +125 -0
- package/skill/tender-accounts/references/domains-auth.md +13 -0
- package/skill/tender-accounts/references/managed-source.md +131 -0
- package/skill/tender-accounts/references/observability.md +18 -0
- package/skill/tender-accounts/references/releases-recovery.md +16 -0
- package/skill/tender-accounts/references/services.md +11 -0
- package/skill/tender-accounts/references/storage.md +13 -0
- package/skill/tender-accounts/references/workflows.md +69 -0
- package/templates/shopify-customer-account/apps/gateway/README.md +2 -0
|
@@ -1,402 +1,74 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: andeo
|
|
3
|
-
description:
|
|
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
|
|
6
|
+
# Andeo applications
|
|
7
7
|
|
|
8
|
-
|
|
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
|
-
|
|
10
|
+
## Discover scope before acting
|
|
11
11
|
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
```
|
|
37
|
-
|
|
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
|
-
```
|
|
93
|
-
|
|
94
|
-
If the app has not been linked, run:
|
|
95
|
-
|
|
96
|
-
```sh
|
|
97
|
-
npx @withandeo/cli link --json
|
|
98
|
-
```
|
|
99
|
-
|
|
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
|
-
```
|
|
211
|
-
|
|
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.
|
|
215
|
-
|
|
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.
|
|
224
|
-
|
|
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.
|
|
231
|
-
|
|
232
|
-
## Build the requested portal as one customer journey
|
|
233
|
-
|
|
234
|
-
Before editing, turn the request into a small delivery contract:
|
|
235
|
-
|
|
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.
|
|
241
|
-
|
|
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.
|
|
30
|
+
## Materialize the right app
|
|
300
31
|
|
|
301
|
-
|
|
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.
|
|
302
33
|
|
|
303
|
-
|
|
34
|
+
Only create a new application when requested:
|
|
304
35
|
|
|
305
36
|
```sh
|
|
306
|
-
|
|
37
|
+
andeo init --name "Merchant customer account" --directory ./merchant-account --dry-run --json
|
|
38
|
+
andeo init --name "Merchant customer account" --directory ./merchant-account --json
|
|
307
39
|
```
|
|
308
40
|
|
|
309
|
-
|
|
41
|
+
Never initialize over an existing app. The starter does not install dependencies, authenticate, link projects or deploy.
|
|
310
42
|
|
|
311
|
-
|
|
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:
|
|
43
|
+
## Define the smallest delivery contract
|
|
352
44
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
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.
|
|
356
51
|
|
|
357
|
-
|
|
52
|
+
## Deliver and prove
|
|
358
53
|
|
|
359
|
-
|
|
360
|
-
npx @withandeo/cli preview entries --json
|
|
361
|
-
npx @withandeo/cli preview open --from <delivery-id> --json
|
|
362
|
-
npx @withandeo/cli preview open --from sbl_EXAMPLE --return-path /account --json
|
|
363
|
-
```
|
|
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.
|
|
364
55
|
|
|
365
|
-
|
|
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.
|
|
366
57
|
|
|
367
|
-
|
|
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.
|
|
368
59
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
```sh
|
|
372
|
-
npx @withandeo/cli tail --delivery <delivery-id> --status error --json
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
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.
|
|
376
|
-
|
|
377
|
-
## Finish with a one-shot handoff
|
|
378
|
-
|
|
379
|
-
Report one compact result containing:
|
|
380
|
-
|
|
381
|
-
- customer journeys implemented and deliberately out of scope;
|
|
382
|
-
- portal-only, gateway-only, or combined scope and the data authority for each new route;
|
|
383
|
-
- checks and dry runs for every changed app;
|
|
384
|
-
- exact preview URL, `deliveryId`, `releaseId`, `bundleDigest`, and combined `compositionId` when applicable;
|
|
385
|
-
- signed-out, signed-in, relevant empty/failure, desktop, and mobile proof actually completed;
|
|
386
|
-
- remaining merchant-admin actions such as Shopify callback/origin registration, runtime configuration, initial production bootstrap, or exact publication.
|
|
387
|
-
|
|
388
|
-
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.
|
|
389
61
|
|
|
390
62
|
## Hard boundaries
|
|
391
63
|
|
|
392
|
-
- Never bypass Andeo delivery
|
|
393
|
-
- Never
|
|
394
|
-
- Never
|
|
395
|
-
- Never
|
|
396
|
-
- Never
|
|
397
|
-
- Never
|
|
398
|
-
- Never
|
|
399
|
-
|
|
400
|
-
|
|
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
|
|
401
73
|
|
|
402
|
-
|
|
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.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Build, preview and publish
|
|
2
|
+
|
|
3
|
+
## Implement and validate
|
|
4
|
+
|
|
5
|
+
1. Inspect the existing application and tests before changing code.
|
|
6
|
+
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.
|
|
7
|
+
3. Make the smallest source change that satisfies the request.
|
|
8
|
+
4. Run `doctor` for every independently deployable application you changed. In a generated repository:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npx @withandeo/cli doctor --cwd apps/portal --json
|
|
12
|
+
npx @withandeo/cli doctor --cwd apps/gateway --json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Do not require gateway access for a portal-only task. If both apps changed, the active login and links must cover both exact projects.
|
|
16
|
+
5. Run the deterministic repository checks:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npx @withandeo/cli check --json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
6. Validate the complete portable artifact without uploading it:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
npx @withandeo/cli preview --dry-run --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Do not weaken checks, remove declared bindings, or place runtime values in the artifact to make validation pass.
|
|
29
|
+
|
|
30
|
+
## Retain a local build for administrator publication
|
|
31
|
+
|
|
32
|
+
When the user requests the manual build path, use `andeo upload --dry-run --json`
|
|
33
|
+
and then `andeo upload --json`. This runs the repository checks and packaging,
|
|
34
|
+
verifies and retains the artifact, and returns its exact release ID and digest.
|
|
35
|
+
It does not create a preview runtime or publish production. An administrator
|
|
36
|
+
reviews the artifact in **Changes → Publish a retained artifact** and approves
|
|
37
|
+
publication explicitly. Local builds do not require a GitHub run for this
|
|
38
|
+
manual path; their source labels remain unverified. The CLI cannot approve
|
|
39
|
+
publication, and automatic source publication still requires trusted main
|
|
40
|
+
evidence. Continue to honor explicit production approval from the user.
|
|
41
|
+
|
|
42
|
+
## Create an exact preview
|
|
43
|
+
|
|
44
|
+
After local validation succeeds, preview each changed application. For a portal-only change, run:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npx @withandeo/cli preview --cwd apps/portal --json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
For a new account stack or a change spanning both apps, package and preview the portal and gateway as separate projects:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
npx @withandeo/cli preview --cwd apps/portal --json
|
|
54
|
+
npx @withandeo/cli preview --cwd apps/gateway --json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
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.
|
|
58
|
+
|
|
59
|
+
Treat stdout as one machine-readable JSON object. Preserve and report:
|
|
60
|
+
|
|
61
|
+
- `previewUrl`;
|
|
62
|
+
- `deliveryId`;
|
|
63
|
+
- `releaseId`;
|
|
64
|
+
- `bundleDigest`;
|
|
65
|
+
- `compositionId` when the delivery sealed one;
|
|
66
|
+
- validation performed before delivery.
|
|
67
|
+
|
|
68
|
+
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.
|
|
69
|
+
|
|
70
|
+
## Prove the customer journey
|
|
71
|
+
|
|
72
|
+
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.
|
|
73
|
+
|
|
74
|
+
Inspect the actual rendered application, not only an HTTP `200` or deployment result. For the requested journey:
|
|
75
|
+
|
|
76
|
+
- verify `/api/bootstrap`, `/api/session`, and every new same-origin route on the exact preview;
|
|
77
|
+
- prove signed-out and signed-in behavior without reading or exposing tokens;
|
|
78
|
+
- exercise the requested read or mutation and confirm the authoritative response is reflected in the UI;
|
|
79
|
+
- verify a relevant empty or non-subscriber state and a contained provider failure;
|
|
80
|
+
- inspect desktop and 390 x 844 mobile behavior, including keyboard focus and pending/saved feedback.
|
|
81
|
+
|
|
82
|
+
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.
|
|
83
|
+
|
|
84
|
+
## Diagnose a delivery
|
|
85
|
+
|
|
86
|
+
Read exact workflow state:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
npx @withandeo/cli delivery status --delivery <delivery-id> --json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Retry only a requested or failed preview workflow:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
npx @withandeo/cli delivery retry --delivery <delivery-id> --json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
CLI 0.12.0 carries artifact/delivery access across automatic token refresh within
|
|
99
|
+
the same login. Logout, session expiry, or revoked owner/project access still
|
|
100
|
+
stop background work. For a pre-session-tracking preview stranded by an expired
|
|
101
|
+
credential, only its original owner may explicitly recover it from the linked
|
|
102
|
+
app with `delivery retry --delivery <delivery-id> --reauthorize --json`. This
|
|
103
|
+
requires current developer access, retains the exact artifact and upload
|
|
104
|
+
receipts, and cannot replace an already tracked login or publish production.
|
|
105
|
+
Do not clear pending provider holds or rewrite credential IDs to recover work.
|
|
106
|
+
|
|
107
|
+
Mint a new browser session for an already-succeeded delivery without rebuilding:
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
npx @withandeo/cli preview entries --json
|
|
111
|
+
npx @withandeo/cli preview open --from <delivery-id> --json
|
|
112
|
+
npx @withandeo/cli preview open --from sbl_EXAMPLE --return-path /account --json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
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.
|
|
116
|
+
|
|
117
|
+
`<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.
|
|
118
|
+
|
|
119
|
+
When runtime evidence is needed, stream only the linked project and exact target:
|
|
120
|
+
|
|
121
|
+
```sh
|
|
122
|
+
npx @withandeo/cli tail --delivery <delivery-id> --status error --json
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
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.
|