frontpage-host 0.1.1 → 0.1.3
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/AGENTS.md +65 -25
- package/README.md +2 -1
- package/dist/commands/diff.js +24 -16
- package/dist/git-blob-sha.d.ts +7 -0
- package/dist/git-blob-sha.js +14 -0
- package/dist/registry.js +41 -16
- package/llms.txt +4 -2
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -17,6 +17,28 @@ frontpage help --json # introspect commands + topics
|
|
|
17
17
|
|
|
18
18
|
Node.js ≥ 20.
|
|
19
19
|
|
|
20
|
+
## Staging vs production (read this first)
|
|
21
|
+
|
|
22
|
+
Frontpage has two surfaces:
|
|
23
|
+
|
|
24
|
+
| Surface | URL | What it is |
|
|
25
|
+
|---------|-----|------------|
|
|
26
|
+
| **Staging** | `https://<subdomain>.frontpage.host` | Working copy for edits, previews, and review |
|
|
27
|
+
| **Production** | Custom domain (when connected), after **publish** | What end customers see on the live domain |
|
|
28
|
+
|
|
29
|
+
**How changes become visible on staging**
|
|
30
|
+
|
|
31
|
+
- `frontpage push`, `frontpage prompt`, and `frontpage edit` update the site branch and the **staging** surface.
|
|
32
|
+
- After a push or agent run finishes building, changes are visible at `https://<subdomain>.frontpage.host`.
|
|
33
|
+
- There is **no separate “deploy to staging” step** agents must run. Do not treat `frontpage deploy wait` as “going live.” At most it waits for an in-flight build to finish before you open the subdomain to review.
|
|
34
|
+
- `frontpage open` opens the subdomain staging URL.
|
|
35
|
+
|
|
36
|
+
**Production publish is a deliberate promote**
|
|
37
|
+
|
|
38
|
+
- `frontpage publish` copies the current **staging tip** to **production** (custom domain / published site).
|
|
39
|
+
- **Never run `publish` or `unpublish` unless the user explicitly asked**, or the user’s own automation/workflow clearly requires autonomous publishing.
|
|
40
|
+
- Default: finish work on staging, tell the user to review `https://<subdomain>.frontpage.host`, and let **them** publish (or ask you to publish after they approve).
|
|
41
|
+
|
|
20
42
|
## Non-interactive auth
|
|
21
43
|
|
|
22
44
|
```bash
|
|
@@ -32,8 +54,8 @@ frontpage doctor --json
|
|
|
32
54
|
|
|
33
55
|
## Site IDs
|
|
34
56
|
|
|
35
|
-
- Always use the **subdomain** (`arbiter`, `asimov-press`)
|
|
36
|
-
- Never pass custom domains, FQDNs, or URLs
|
|
57
|
+
- Always use the **subdomain** (`arbiter`, `asimov-press`) with `use` / `--site`.
|
|
58
|
+
- Never pass custom domains, FQDNs, or URLs as the site id.
|
|
37
59
|
- Folder state: `.frontpage/state.json` → `{ slug, baseCommitSha }`.
|
|
38
60
|
|
|
39
61
|
```bash
|
|
@@ -44,36 +66,42 @@ frontpage use <subdomain>
|
|
|
44
66
|
|
|
45
67
|
## File sync recipe
|
|
46
68
|
|
|
47
|
-
Allowlisted roots only: `src/`, `public/`, `content/`. Other paths
|
|
69
|
+
Allowlisted roots only: `src/`, `public/`, `content/`. Other paths never sync (including platform-owned scaffold/overlay files such as `BaseLayout.astro`, `Modules.astro`, and `src/components/extensions/**`). Do not store secrets in the site tree (`.env`, `*.pem`, `secrets/`, `credentials.json`) — the API rejects those paths.
|
|
48
70
|
|
|
49
71
|
```bash
|
|
72
|
+
# Session start / before editing: refresh if tip may have moved
|
|
73
|
+
frontpage status --json # data.tipDrift === true → must pull
|
|
74
|
+
# or just:
|
|
50
75
|
frontpage pull
|
|
51
76
|
# edit local allowlisted files
|
|
52
|
-
frontpage diff --json # data.dirty
|
|
77
|
+
frontpage diff --json # data.dirty / data.tipDrift; compares git blob SHAs (one list GET)
|
|
53
78
|
frontpage push --message "…"
|
|
54
79
|
# on exit 3 (CAS / active run): frontpage status --json → pull or wait → retry push
|
|
55
|
-
|
|
56
|
-
#
|
|
57
|
-
frontpage publish --site <subdomain>
|
|
80
|
+
# Review at https://<subdomain>.frontpage.host
|
|
81
|
+
# Do NOT publish unless the user asked.
|
|
58
82
|
```
|
|
59
83
|
|
|
60
84
|
Rules:
|
|
61
85
|
|
|
62
|
-
1. **Pull before
|
|
63
|
-
2. **
|
|
64
|
-
3.
|
|
65
|
-
4.
|
|
66
|
-
5.
|
|
86
|
+
1. **Pull before edit** when the remote tip may have moved (UI agent, another machine, or you pushed elsewhere). Check `status --json` / `diff --json` → `tipDrift`, or pull at session start. Stale local trees are not auto-healed; CAS only blocks a bad **push**.
|
|
87
|
+
2. **Pull before push** so `baseCommitSha` is set (CAS). Still required even if you already pulled to edit.
|
|
88
|
+
3. **Do not push** while an agent run is active (`status` / `runs`).
|
|
89
|
+
4. Push updates **staging** (subdomain). Production is unchanged until someone runs `publish`.
|
|
90
|
+
5. Pushing module markup may auto-activate modules (same as the editor agent).
|
|
91
|
+
6. Binaries use base64; do not UTF-8 round-trip them.
|
|
92
|
+
7. Prefer reviewing the subdomain after push; only use `deploy wait` if you need to block until a build finishes.
|
|
93
|
+
8. The **UI / canvas agent does not use this CLI** — it edits the live tip in-process. Only CLI checkouts need `pull`.
|
|
67
94
|
|
|
68
95
|
## Agent prompt loop
|
|
69
96
|
|
|
70
97
|
```bash
|
|
71
|
-
|
|
72
|
-
frontpage runs wait
|
|
73
|
-
#
|
|
74
|
-
frontpage deploy wait
|
|
98
|
+
frontpage prompt "make the hero shorter"
|
|
99
|
+
frontpage runs wait # wait for the agent run to finish
|
|
100
|
+
# Review https://<subdomain>.frontpage.host — do not publish unless asked.
|
|
75
101
|
```
|
|
76
102
|
|
|
103
|
+
Mid-task continuation is automatic. There is **no** `runs continue` in v1.
|
|
104
|
+
|
|
77
105
|
## Content / JSON-native commands
|
|
78
106
|
|
|
79
107
|
These already return JSON bodies (wrap further with global `--json` where supported):
|
|
@@ -81,21 +109,23 @@ These already return JSON bodies (wrap further with global `--json` where suppor
|
|
|
81
109
|
- `usage`, `analytics`, `seo`, `articles`, `settings`, `inbox` (default JSON)
|
|
82
110
|
- Mutate: `modules enable|disable|archive|config`, `extensions …`
|
|
83
111
|
|
|
84
|
-
Click-edit (exact single occurrence
|
|
112
|
+
Click-edit (exact single occurrence), **not** file push:
|
|
85
113
|
|
|
86
114
|
```bash
|
|
87
115
|
frontpage edit --path / --old "exact old" --new "exact new"
|
|
88
116
|
```
|
|
89
117
|
|
|
118
|
+
`edit` also updates **staging**, same as push. Still do not publish unless asked.
|
|
119
|
+
|
|
90
120
|
## History / revert
|
|
91
121
|
|
|
92
122
|
```bash
|
|
93
123
|
frontpage history --json
|
|
94
|
-
frontpage revert <40-char-sha> --yes # required --yes when non-TTY
|
|
124
|
+
frontpage revert <40-char-sha> --yes # required --yes when non-TTY; only if user asked
|
|
95
125
|
```
|
|
96
126
|
|
|
97
127
|
- `S` = staging tip, `P` = production tip.
|
|
98
|
-
- Revert creates a **new** commit whose tree matches the target (linear restore).
|
|
128
|
+
- Revert creates a **new** commit whose tree matches the target (linear restore) on the site branch (staging).
|
|
99
129
|
- Full 40-char SHA only. Refused while an agent run is active.
|
|
100
130
|
|
|
101
131
|
## Exit codes — what to do next
|
|
@@ -129,24 +159,33 @@ Failures with `--json` print the envelope on **stdout** (still use the process e
|
|
|
129
159
|
|
|
130
160
|
## Destructive ops — defaults for agents
|
|
131
161
|
|
|
132
|
-
**Never** run unless the user explicitly asked:
|
|
162
|
+
**Never** run unless the user explicitly asked (or their workflow clearly requires it):
|
|
133
163
|
|
|
164
|
+
- `frontpage publish` (promotes staging → **production** / custom domain)
|
|
134
165
|
- `frontpage unpublish` (takes production offline) — requires `--yes` when non-TTY
|
|
135
166
|
- `frontpage revert <sha>` — requires `--yes` when non-TTY
|
|
136
167
|
- `frontpage inbox … --mark-read` (side-effecting)
|
|
137
|
-
- Broad `
|
|
168
|
+
- Broad `settings` mutations or mass `edit` without a clear request
|
|
138
169
|
|
|
139
|
-
|
|
170
|
+
Safe default after finishing work: summarize what changed and give the staging URL for review.
|
|
140
171
|
|
|
141
|
-
##
|
|
172
|
+
## Other nuances agents often miss
|
|
142
173
|
|
|
143
|
-
|
|
174
|
+
1. **CLI site id ≠ public domain.** Target `asimov-press`, not `asimov-press.frontpage.host` or a custom domain.
|
|
175
|
+
2. **Keys are account-wide.** One key can reach every site the user can access.
|
|
176
|
+
3. **404 → exit 4** often means “no access / not found,” not only a bad password.
|
|
177
|
+
4. **Allowlist only.** If a file is not under `src/`, `public/`, or `content/`, the CLI will not sync it. Some scaffold files are platform-owned and refuse CLI read/write.
|
|
178
|
+
5. **Full-tree push for allowlisted roots.** Local allowlisted files become the intended remote tree for those roots on push.
|
|
179
|
+
6. **Active-run guard.** Push/revert refuse while an editor agent run is active (exit 3).
|
|
180
|
+
7. **CAS.** Tip moved since pull → exit 3; pull and retry.
|
|
181
|
+
8. **No invented v1 commands:** `domains*`, `billing*`, `members*`, `suggestions*`, `sites delete|restore`, `runs continue`, MCP, git remotes / clone URLs.
|
|
182
|
+
9. **`deploy wait` ≠ publish.** Optional build wait only; staging visibility is the subdomain.
|
|
183
|
+
10. **Honesty on stubs.** `open --prod` is currently a no-op stub (still opens the subdomain).
|
|
144
184
|
|
|
145
185
|
## Isolation (hard fence)
|
|
146
186
|
|
|
147
187
|
- API never returns another site’s branch, GitHub tokens, or clone URLs.
|
|
148
188
|
- Site targeting is subdomain → `site/<slug>` only.
|
|
149
|
-
- Non-member site calls → 404 (exit 4) — do not treat as “wrong password” only.
|
|
150
189
|
- See `frontpage help isolation`.
|
|
151
190
|
|
|
152
191
|
## Canonical introspection
|
|
@@ -155,5 +194,6 @@ Failures with `--json` print the envelope on **stdout** (still use the process e
|
|
|
155
194
|
frontpage help
|
|
156
195
|
frontpage help --json
|
|
157
196
|
frontpage help sync
|
|
197
|
+
frontpage help agent
|
|
158
198
|
frontpage doctor --json
|
|
159
199
|
```
|
package/README.md
CHANGED
|
@@ -24,7 +24,8 @@ Requires Node.js ≥ 20.
|
|
|
24
24
|
4. `mkdir my-site && cd my-site && frontpage use <subdomain>`
|
|
25
25
|
5. `frontpage pull` → edit files under `src/`, `public/`, or `content/`
|
|
26
26
|
6. `frontpage push --message "describe the change"`
|
|
27
|
-
7.
|
|
27
|
+
7. Review staging at `https://<subdomain>.frontpage.host` (no separate staging-deploy step).
|
|
28
|
+
8. `frontpage publish` only when you intentionally promote to production.
|
|
28
29
|
|
|
29
30
|
## Environment
|
|
30
31
|
|
package/dist/commands/diff.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { readFile, readdir
|
|
2
|
-
import { createHash } from "node:crypto";
|
|
1
|
+
import { readFile, readdir } from "node:fs/promises";
|
|
3
2
|
import { join, relative, sep } from "node:path";
|
|
4
3
|
import { resolveSlug } from "../site.js";
|
|
5
4
|
import { EXIT_OK, EXIT_USAGE, v1Get } from "../http/client.js";
|
|
6
5
|
import { emitErr, emitOk, emitUsage, isJson } from "../runtime.js";
|
|
6
|
+
import { readState } from "../state/frontpage-state.js";
|
|
7
|
+
import { gitBlobSha, isGitBlobSha } from "../git-blob-sha.js";
|
|
7
8
|
const ROOTS = ["src", "public", "content"];
|
|
8
9
|
async function walkLocal(cwd) {
|
|
9
10
|
const map = new Map();
|
|
@@ -27,7 +28,7 @@ async function walkLocal(cwd) {
|
|
|
27
28
|
if (!ROOTS.some((r) => rel === r || rel.startsWith(`${r}/`)))
|
|
28
29
|
continue;
|
|
29
30
|
const buf = await readFile(child);
|
|
30
|
-
map.set(rel,
|
|
31
|
+
map.set(rel, gitBlobSha(buf));
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -35,32 +36,32 @@ async function walkLocal(cwd) {
|
|
|
35
36
|
await walk(join(cwd, root));
|
|
36
37
|
return map;
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
function assertRemoteBlobShas(files) {
|
|
40
|
+
for (const f of files) {
|
|
41
|
+
if (!isGitBlobSha(f.blobSha)) {
|
|
42
|
+
throw new Error("Remote file list is missing blobSha. Upgrade Frontpage (API) — this CLI requires git blob SHAs on GET /files and will not fall back to per-file downloads.");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
export async function runDiff(args) {
|
|
45
47
|
try {
|
|
46
48
|
const { slug } = await resolveSlug(args);
|
|
47
49
|
const cwd = process.cwd();
|
|
50
|
+
const state = await readState(cwd);
|
|
48
51
|
const local = await walkLocal(cwd);
|
|
49
52
|
const listing = await v1Get(`/api/v1/sites/${encodeURIComponent(slug)}/files`);
|
|
50
|
-
|
|
53
|
+
assertRemoteBlobShas(listing.files);
|
|
54
|
+
const remoteByPath = new Map(listing.files.map((f) => [f.path, f.blobSha]));
|
|
51
55
|
const added = [];
|
|
52
56
|
const modified = [];
|
|
53
57
|
const deleted = [];
|
|
54
58
|
for (const path of [...local.keys()].sort()) {
|
|
55
|
-
|
|
59
|
+
const remoteSha = remoteByPath.get(path);
|
|
60
|
+
if (!remoteSha) {
|
|
56
61
|
added.push(path);
|
|
57
62
|
continue;
|
|
58
63
|
}
|
|
59
|
-
|
|
60
|
-
const remote = await v1Get(`/api/v1/sites/${encodeURIComponent(slug)}/files/${encPath}`);
|
|
61
|
-
const rh = remoteHash(remote.file);
|
|
62
|
-
const lh = local.get(path);
|
|
63
|
-
if (rh !== lh)
|
|
64
|
+
if (remoteSha.toLowerCase() !== local.get(path).toLowerCase())
|
|
64
65
|
modified.push(path);
|
|
65
66
|
}
|
|
66
67
|
for (const f of listing.files) {
|
|
@@ -68,12 +69,16 @@ export async function runDiff(args) {
|
|
|
68
69
|
deleted.push(f.path);
|
|
69
70
|
}
|
|
70
71
|
const dirty = added.length + modified.length + deleted.length > 0;
|
|
71
|
-
|
|
72
|
+
const tipDrift = Boolean(state.baseCommitSha &&
|
|
73
|
+
listing.baseCommitSha &&
|
|
74
|
+
state.baseCommitSha !== listing.baseCommitSha);
|
|
72
75
|
if (isJson()) {
|
|
73
76
|
emitOk("diff", {
|
|
74
77
|
slug,
|
|
75
78
|
baseCommitSha: listing.baseCommitSha,
|
|
76
79
|
dirty,
|
|
80
|
+
tipDrift,
|
|
81
|
+
comparedWith: "blobSha",
|
|
77
82
|
added,
|
|
78
83
|
modified,
|
|
79
84
|
deleted,
|
|
@@ -92,6 +97,9 @@ export async function runDiff(args) {
|
|
|
92
97
|
else {
|
|
93
98
|
console.error(`# ${added.length + modified.length + deleted.length} difference(s) · tip ${(listing.baseCommitSha ?? "").slice(0, 7) || "?"} · A=local-only M=modified D=remote-only`);
|
|
94
99
|
}
|
|
100
|
+
if (tipDrift) {
|
|
101
|
+
console.error("# tipDrift: remote tip moved since last pull — run frontpage pull before editing further");
|
|
102
|
+
}
|
|
95
103
|
return EXIT_OK;
|
|
96
104
|
}
|
|
97
105
|
catch (err) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git blob object SHA-1 — same digest as `git hash-object` / GitHub tree `sha`.
|
|
3
|
+
* Header is `blob <byteLength>\0` followed by raw file bytes (not UTF-8 reinterpreted).
|
|
4
|
+
*/
|
|
5
|
+
export declare function gitBlobSha(content: Buffer): string;
|
|
6
|
+
/** True when a remote list entry carries a usable git blob SHA. */
|
|
7
|
+
export declare function isGitBlobSha(value: unknown): value is string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
/**
|
|
3
|
+
* Git blob object SHA-1 — same digest as `git hash-object` / GitHub tree `sha`.
|
|
4
|
+
* Header is `blob <byteLength>\0` followed by raw file bytes (not UTF-8 reinterpreted).
|
|
5
|
+
*/
|
|
6
|
+
export function gitBlobSha(content) {
|
|
7
|
+
const header = Buffer.from(`blob ${content.length}\0`, "utf8");
|
|
8
|
+
return createHash("sha1").update(header).update(content).digest("hex");
|
|
9
|
+
}
|
|
10
|
+
const BLOB_SHA_RE = /^[0-9a-f]{40}$/i;
|
|
11
|
+
/** True when a remote list entry carries a usable git blob SHA. */
|
|
12
|
+
export function isGitBlobSha(value) {
|
|
13
|
+
return typeof value === "string" && BLOB_SHA_RE.test(value);
|
|
14
|
+
}
|
package/dist/registry.js
CHANGED
|
@@ -86,11 +86,14 @@ export const COMMANDS = [
|
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
name: "diff",
|
|
89
|
-
summary: "Compare local allowlisted files to the remote tip",
|
|
89
|
+
summary: "Compare local allowlisted files to the remote tip (git blob SHA)",
|
|
90
90
|
usage: "frontpage diff [--site <slug>] [--json]",
|
|
91
91
|
topics: ["sync"],
|
|
92
92
|
examples: ["frontpage diff --json"],
|
|
93
|
-
flags: [
|
|
93
|
+
flags: [
|
|
94
|
+
"--site <slug>",
|
|
95
|
+
"JSON data.dirty when local ≠ remote; data.tipDrift when last pull tip ≠ remote tip",
|
|
96
|
+
],
|
|
94
97
|
},
|
|
95
98
|
{
|
|
96
99
|
name: "ls",
|
|
@@ -153,7 +156,10 @@ export const COMMANDS = [
|
|
|
153
156
|
summary: "Promote staging to production",
|
|
154
157
|
usage: "frontpage publish [--site <slug>] [--json]",
|
|
155
158
|
topics: ["agent"],
|
|
156
|
-
dangers: [
|
|
159
|
+
dangers: [
|
|
160
|
+
"Promotes the current staging tip to PRODUCTION (custom domain)",
|
|
161
|
+
"Agents: never run unless the user explicitly asked to publish",
|
|
162
|
+
],
|
|
157
163
|
seeAlso: ["unpublish", "deploy"],
|
|
158
164
|
},
|
|
159
165
|
{
|
|
@@ -161,13 +167,21 @@ export const COMMANDS = [
|
|
|
161
167
|
summary: "Take the live site offline (admin)",
|
|
162
168
|
usage: "frontpage unpublish [--site <slug>] [--yes] [--json]",
|
|
163
169
|
topics: ["agent"],
|
|
164
|
-
dangers: [
|
|
170
|
+
dangers: [
|
|
171
|
+
"Takes production offline",
|
|
172
|
+
"Requires --yes when stdin is not a TTY",
|
|
173
|
+
"Agents: never run unless the user explicitly asked",
|
|
174
|
+
],
|
|
165
175
|
},
|
|
166
176
|
{
|
|
167
177
|
name: "deploy",
|
|
168
|
-
summary: "Wait for
|
|
178
|
+
summary: "Wait for an in-flight build to finish (not publish)",
|
|
169
179
|
usage: "frontpage deploy wait [--site <slug>] [--json]",
|
|
170
180
|
topics: ["agent"],
|
|
181
|
+
flags: [
|
|
182
|
+
"Optional build wait only — staging is https://<subdomain>.frontpage.host",
|
|
183
|
+
"Does NOT promote to production; use publish only when the user asks",
|
|
184
|
+
],
|
|
171
185
|
},
|
|
172
186
|
{
|
|
173
187
|
name: "usage",
|
|
@@ -296,9 +310,11 @@ export const TOPICS = {
|
|
|
296
310
|
5. frontpage pull
|
|
297
311
|
6. Edit files under src/, public/, or content/
|
|
298
312
|
7. frontpage push --message "…"
|
|
299
|
-
8. frontpage
|
|
300
|
-
9. frontpage publish #
|
|
313
|
+
8. Review https://<subdomain>.frontpage.host (staging)
|
|
314
|
+
9. frontpage publish # ONLY if the user asked — promotes to production
|
|
301
315
|
|
|
316
|
+
Staging is the subdomain. There is no separate staging-deploy step for agents.
|
|
317
|
+
Never publish/unpublish unless the user explicitly asks.
|
|
302
318
|
Agents: read AGENTS.md in the npm package; use --json for structured I/O.
|
|
303
319
|
More: frontpage help auth | sync | agent | content | history | isolation | exit-codes`,
|
|
304
320
|
auth: `Authentication
|
|
@@ -313,31 +329,39 @@ export const TOPICS = {
|
|
|
313
329
|
PUBLIC_CLI_ENABLED is server-side — the CLI cannot enable it.`,
|
|
314
330
|
sync: `File sync
|
|
315
331
|
frontpage use <subdomain>
|
|
332
|
+
frontpage status # tipDrift when remote moved since last pull
|
|
316
333
|
frontpage pull # downloads src/, public/, content/ into cwd
|
|
317
|
-
frontpage diff # local vs remote
|
|
334
|
+
frontpage diff # local vs remote via git blobSha (--json → dirty + tipDrift)
|
|
318
335
|
frontpage push [--message …] # uploads allowlisted files; CAS + active-run guard
|
|
319
336
|
frontpage ls [prefix]
|
|
320
337
|
frontpage cat <path>
|
|
321
338
|
frontpage search <pattern>
|
|
322
|
-
frontpage status
|
|
323
339
|
frontpage open # opens https://<slug>.frontpage.host/ (--prod is a no-op stub)
|
|
324
340
|
|
|
325
341
|
Local state: .frontpage/state.json { slug, baseCommitSha }
|
|
326
|
-
Pull
|
|
327
|
-
Do not push while the editor agent is building
|
|
342
|
+
Pull BEFORE EDITING when tip may have moved (UI agent / another checkout) — check tipDrift.
|
|
343
|
+
Pull before push so CAS has baseCommitSha. Do not push while the editor agent is building.
|
|
344
|
+
The UI/canvas agent does not use this CLI; only CLI checkouts need pull.
|
|
328
345
|
Pushing module markup may auto-activate modules (same as the agent).
|
|
329
346
|
tokens.ts may be auto-repaired at commit if it would break the build.
|
|
330
347
|
Binaries use base64 (not utf8-corrupted).
|
|
331
|
-
|
|
348
|
+
Platform overlay files (BaseLayout, Modules, Analytics, extensions, …) are not syncable.
|
|
349
|
+
Do not store secrets in the site tree (.env, *.pem, secrets/, credentials.json) — rejected by the API.
|
|
350
|
+
|
|
351
|
+
Staging vs production:
|
|
352
|
+
- Push/prompt/edit update STAGING: https://<subdomain>.frontpage.host
|
|
353
|
+
- No separate "deploy to staging" step for agents — review the subdomain after the build.
|
|
354
|
+
- frontpage deploy wait only waits for an in-flight build; it is NOT go-live.
|
|
355
|
+
- frontpage publish promotes staging → production (custom domain). Never publish unless asked.`,
|
|
332
356
|
agent: `Agent + publish
|
|
333
357
|
frontpage prompt "make the hero shorter"
|
|
334
358
|
frontpage runs # latest + active
|
|
335
359
|
frontpage runs wait [runId]
|
|
336
360
|
frontpage runs cancel <runId>
|
|
337
361
|
frontpage runs retry <runId>
|
|
338
|
-
frontpage deploy wait
|
|
339
|
-
frontpage publish
|
|
340
|
-
frontpage unpublish --yes # admin only; --yes
|
|
362
|
+
frontpage deploy wait # optional: wait for build; NOT publish
|
|
363
|
+
frontpage publish # ONLY if the user asked — production promote
|
|
364
|
+
frontpage unpublish --yes # admin only; never unless asked; --yes when non-TTY
|
|
341
365
|
frontpage usage
|
|
342
366
|
frontpage analytics [--days 7]
|
|
343
367
|
frontpage pages
|
|
@@ -345,7 +369,8 @@ export const TOPICS = {
|
|
|
345
369
|
frontpage extensions
|
|
346
370
|
|
|
347
371
|
Mid-task continuation is automatic — there is no runs continue.
|
|
348
|
-
Do not push while an agent run is active
|
|
372
|
+
Do not push while an agent run is active.
|
|
373
|
+
Default after work: review https://<subdomain>.frontpage.host; do not publish.`,
|
|
349
374
|
content: `Content
|
|
350
375
|
frontpage media list|upload <file>
|
|
351
376
|
frontpage inbox [leads|subscribers|orders|…] [--mark-read] [--csv]
|
package/llms.txt
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
- Topics: quickstart, auth, sync, agent, content, history, isolation, exit-codes
|
|
7
7
|
- Auth: mint fp_live_ key in Frontpage UI (Developers); frontpage login KEY or FRONTPAGE_API_KEY
|
|
8
8
|
- Site id: subdomain only (frontpage use <subdomain>). Not custom domains.
|
|
9
|
-
-
|
|
10
|
-
-
|
|
9
|
+
- Staging: https://<subdomain>.frontpage.host — push/prompt/edit update staging; no separate staging deploy step for agents
|
|
10
|
+
- Production: custom domain after frontpage publish — NEVER publish/unpublish unless the user explicitly asks
|
|
11
|
+
- Sync: allowlist src/ public/ content/; platform overlay + secret-like paths rejected; pull before edit if tip may have moved (status/diff tipDrift); pull → edit → diff (blobSha) → push (CAS); no push during active agent run; UI agent does not use CLI pull; review on subdomain
|
|
11
12
|
- Machine: global --json / --quiet; exit 0/2/3/4/5 (see help exit-codes)
|
|
13
|
+
- deploy wait = optional build wait only; it is NOT go-live / publish
|
|
12
14
|
- No runs continue, domains, billing, members, MCP, or git remotes in v1
|