frontpage-host 0.1.15 → 0.1.17

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/dist/registry.js CHANGED
@@ -104,7 +104,7 @@ export const COMMANDS = [
104
104
  flags: [
105
105
  "--site <slug>",
106
106
  "--message <text>",
107
- "--wait: after push, wait until no agent run is queued/running/deploying (same as deploy wait; not a Vercel oracle)",
107
+ "--wait: after push, wait until the new commit's site compile is live (agent-run idle first, then GET /deploy ready)",
108
108
  ],
109
109
  dangers: [
110
110
  "Requires prior pull (baseCommitSha)",
@@ -249,10 +249,16 @@ export const COMMANDS = [
249
249
  {
250
250
  name: "publish",
251
251
  summary: "Promote staging to production",
252
- usage: "frontpage publish [--site <slug>] [--json]",
252
+ usage: "frontpage publish [--site <slug>] [--wait] [--json]",
253
253
  topics: ["agent"],
254
+ examples: ["frontpage publish", "frontpage publish --wait"],
255
+ flags: [
256
+ "--wait: wait until the staging tip's site compile is live, then publish (refuses a previous build)",
257
+ "Prints tip SHA and serving SHA; warns if they differ",
258
+ ],
254
259
  dangers: [
255
- "Promotes the current staging tip to PRODUCTION (custom domain)",
260
+ "Promotes the last ready staging compile to PRODUCTION (custom domain)",
261
+ "409 if the tip is not compiled yet — wait, then publish",
256
262
  "Agents: never run unless the user explicitly asked to publish",
257
263
  ],
258
264
  seeAlso: ["unpublish", "deploy"],
@@ -270,13 +276,14 @@ export const COMMANDS = [
270
276
  },
271
277
  {
272
278
  name: "deploy",
273
- summary: "Wait for an in-flight build to finish (not publish)",
279
+ summary: "Wait for the current tip's site compile (not publish)",
274
280
  usage: "frontpage deploy wait [--site <slug>] [--json]",
275
281
  topics: ["agent"],
276
282
  flags: [
277
- "Optional build wait only — staging is https://<subdomain>.frontpage.host",
283
+ "Waits for editor-agent idle (if a run is in flight), then until GET /deploy ready",
284
+ "ready = the live compile SHA equals the git tip — not a historical agent run",
278
285
  "Does NOT promote to production; use publish only when the user asks",
279
- "Fail-closed: exit 2 when the waited run (or latest, if already idle) is failed/canceled",
286
+ "Fail-closed: exit 2 when the waited agent run is failed/canceled, or the compile fails or times out",
280
287
  ],
281
288
  },
282
289
  {
@@ -348,7 +355,7 @@ export const COMMANDS = [
348
355
  dangers: [
349
356
  "Secret values are never returned — masks only",
350
357
  "request-setup surfaces an owner prompt in the editor status bar (CLI cannot show it)",
351
- "payments and shop share one Stripe account — disconnect warns before teardown",
358
+ "payments and shop share one Stripe account — payments disconnect 409s if the store still uses it",
352
359
  "OAuth cannot finish in the terminal; connect only opens the vendor URL",
353
360
  "Do not write placeId through generic config — that skips listing resolve + seed",
354
361
  ],
@@ -361,6 +368,24 @@ export const COMMANDS = [
361
368
  topics: ["agent", "content"],
362
369
  examples: ["frontpage extensions docs charts"],
363
370
  },
371
+ {
372
+ name: "images",
373
+ summary: "Generate 1–4 AI image variations of one prompt (counts against AI $ and storage)",
374
+ usage: 'frontpage images generate --prompt "…" [--count N] [--site <slug>] [--json]',
375
+ topics: ["content"],
376
+ examples: [
377
+ 'frontpage images generate --prompt "flat illustration of a red stand mixer on marble"',
378
+ 'frontpage images generate --prompt "watercolor cafe storefront at dusk" --count 4',
379
+ ],
380
+ flags: [
381
+ "One prompt; --count 1–4 is variations of that same picture (default 1)",
382
+ "Human success: sitePath first (markup-safe), then filename",
383
+ "Counts against the site AI $ budget and storage; 402 when the cycle is spent",
384
+ "--count outside 1–4 fails locally (exit 2) with no request",
385
+ "Unknown leftover flags fail closed (exit 2)",
386
+ ],
387
+ seeAlso: ["media", "prompt", "help content", "help site-building"],
388
+ },
364
389
  {
365
390
  name: "media",
366
391
  summary: "List or upload site media (images/PDF ≤25 MB, video ≤50 MB)",
@@ -478,12 +503,13 @@ export const TOPICS = {
478
503
  5. frontpage pull
479
504
  6. Edit files under src/, public/, or content/
480
505
  7. frontpage push --message "…"
481
- 8. Review staging: https://<subdomain>.frontpage.host when that subdomain is publicly shareable.
506
+ 8. frontpage deploy wait # tip compile ready (optional; push --wait does this)
507
+ Review staging: https://<subdomain>.frontpage.host when that subdomain is publicly shareable.
482
508
  With a custom domain connected, the subdomain is often owner-private (login wall ≠ failed push);
483
509
  anonymous review is on the published custom domain after publish.
484
- 9. frontpage publish # ONLY if the user asked — promotes to production
510
+ 9. frontpage publish [--wait] # ONLY if the user asked — promotes the ready compile
485
511
 
486
- Staging is the subdomain. There is no separate staging-deploy step for agents.
512
+ Push updates the git tip. The site compile is a second clock. deploy wait is not go-live.
487
513
  Never publish/unpublish unless the user explicitly asks.
488
514
  Agents: read AGENTS.md + frontpage help site-building; use --json for structured I/O.
489
515
  More: frontpage help auth | sync | site-building | agent | content | history | isolation | exit-codes`,
@@ -511,7 +537,7 @@ export const TOPICS = {
511
537
  Local state: .frontpage/state.json { slug, baseCommitSha }
512
538
  Pull BEFORE EDITING when tip may have moved (UI agent / another checkout) — check tipDrift.
513
539
  Pull before push so CAS has baseCommitSha. Do not push while the editor agent is building.
514
- --wait after push blocks until no agent run is queued/running/deploying (same as deploy wait).
540
+ --wait after push blocks until the new commit's site compile is live (agent idle, then GET /deploy ready).
515
541
  The UI/canvas agent does not use this CLI; only CLI checkouts need pull.
516
542
  Pushing module markup may auto-activate modules (same as the agent).
517
543
  tokens.ts may be auto-repaired at commit if it would break the build.
@@ -520,12 +546,15 @@ export const TOPICS = {
520
546
  Do not store secrets in the site tree (.env, *.pem, secrets/, credentials.json) — rejected by the API.
521
547
 
522
548
  Staging vs production:
523
- - Push/prompt/edit update STAGING: https://<subdomain>.frontpage.host
524
- - No separate "deploy to staging" step for agents — review the subdomain after the build.
525
- - frontpage deploy wait only waits for an in-flight build; it is NOT go-live.
526
- - frontpage publish promotes staging → production (custom domain). Never publish unless asked.`,
549
+ - Push/prompt/edit update the git tip. The site compile is a second clock.
550
+ - Review STAGING at https://<subdomain>.frontpage.host after GET /deploy is ready.
551
+ - frontpage deploy wait = agent-run idle (if any) + tip compile ready. It is NOT go-live.
552
+ - A file-only push has no agent run. deploy wait / push --wait must still wait for the compile.
553
+ - frontpage publish promotes the last ready staging compile. 409 if the tip is not built yet.
554
+ - frontpage publish --wait waits for that compile, then publishes. Never publish unless asked.`,
527
555
  "site-building": `Site building (Astro contract)
528
- Stack: Astro 6 + Tailwind v4. Pages in src/pages/. Every page wraps <BaseLayout title description>.
556
+ Stack: Astro 6 + Tailwind v4. Pages in src/pages/. Every page wraps <BaseLayout title description>,
557
+ or a site layout that itself wraps BaseLayout.
529
558
  Control files: src/config/tokens.ts (design tokens), src/config/site.ts (title, nav, pages map, seo).
530
559
 
531
560
  Pages map:
@@ -538,7 +567,10 @@ export const TOPICS = {
538
567
  - No API routes, serverless backends, or databases.
539
568
  - No fake lead forms / checkout / card fields — use data-fp-* modules + frontpage modules, or refuse.
540
569
  - Platform-owned paths are not syncable (BaseLayout overlay, module/extension shells, package.json…).
541
- - Customer layouts (DocsLayout, GuideLayout, …) are fine when site-owned.
570
+ - Customer layouts (DocsLayout, GuideLayout, …) are fine when site-owned. A wrapper MUST render
571
+ <BaseLayout> and forward SEO: description={description}, ogImage={ogImage}, and
572
+ title={seoTitle ?? derivedFallback} from a 1:1 Astro.props destructure. NEVER title={pageTitle}
573
+ with no seoTitle alias (locks Title/Share image in Search & Social for every page on that layout).
542
574
 
543
575
  Tokens & fonts:
544
576
  - Keep required colors/fonts/spacing/radii keys; style via CSS variables / token Tailwind.
@@ -556,7 +588,7 @@ export const TOPICS = {
556
588
  Modules & articles (short):
557
589
  - Forms: <form data-fp-form="slug"> with named inputs; no action/onsubmit/honeypot.
558
590
  - Articles: frontpage articles …; migrate folders via frontpage prompt (don't invent mass delete+write).
559
- - Media: frontpage media upload (images/PDF ≤25 MB, video ≤50 MB). Use sitePath /__media/uploads/<slug>/… in markup (not raw blob URLs). Optional ?w= on rasters only.
591
+ - Media: frontpage media upload (images/PDF ≤25 MB, video ≤50 MB). frontpage images generate --prompt "…" [--count N] for 1–4 AI variations of one invented picture (AI $ + storage). Use sitePath /__media/uploads/<slug>/… in markup (not raw blob URLs). Optional ?w= on rasters only.
560
592
 
561
593
  Full guide: https://frontpage.host/developers/site-building
562
594
  See also: frontpage help sync | content | AGENTS.md`,
@@ -568,8 +600,8 @@ export const TOPICS = {
568
600
  frontpage runs wait [runId] # failed/canceled → exit 2; JSON ok:false + run.error
569
601
  frontpage runs cancel <runId>
570
602
  frontpage runs retry <runId>
571
- frontpage deploy wait # optional build wait; fail-closed on failed/canceled; NOT publish
572
- frontpage publish # ONLY if the user asked — production promote
603
+ frontpage deploy wait # agent idle + tip compile ready; fail-closed; NOT publish
604
+ frontpage publish [--wait] # ONLY if the user asked — promotes the ready compile
573
605
  frontpage unpublish --yes # admin only; never unless asked; --yes when non-TTY
574
606
  frontpage usage
575
607
  frontpage analytics [--days 7]
@@ -589,6 +621,7 @@ export const TOPICS = {
589
621
  Do not publish unless asked.`,
590
622
  content: `Content
591
623
  frontpage media list|upload <file> # images/PDF/video; text/CSV = inline not library; sitePath first when stored
624
+ frontpage images generate --prompt "…" [--count N] # 1–4 AI variations of one prompt; sitePath first; AI $ + storage
592
625
  frontpage inbox [leads|subscribers|orders|google_reviews|…] [--mark-read] [--csv]
593
626
  frontpage seo get [/path|--path /path] | seo set --path /
594
627
  frontpage articles list|content|create-section|create-article|set-draft|…
@@ -596,7 +629,7 @@ export const TOPICS = {
596
629
  frontpage tokens set --group … --key … --value …
597
630
  frontpage modules list|docs|request-setup|enable|disable|archive|config <key>
598
631
  frontpage modules <key> # that key's CLI usage
599
- frontpage modules payments|shop|ordering connect [--no-open] # opens Stripe/Square; then status
632
+ frontpage modules payments|shop|ordering connect [--no-open] # opens Frontpage then Stripe/Square; then status
600
633
  frontpage modules ordering sync
601
634
  # mailing list key: signups. Index: https://frontpage.host/developers/modules
602
635
  frontpage extensions list|docs|enable|disable|config <key>
@@ -607,7 +640,7 @@ export const TOPICS = {
607
640
  Do not fake payments/checkout. LOCKED extensions → do not fake; say plan required.
608
641
  Migrate pages → articles: prefer frontpage prompt "migrate …" over mass delete+write.
609
642
  edit uses click-edit (exact single occurrence), not push / gated-write.
610
- Connect opens Stripe/Square in the browser; this CLI never accepts or returns OAuth secrets.
643
+ Connect opens Frontpage (logged-in), then Stripe/Square; never accepts or returns OAuth secrets. payments/shop connect is admin.
611
644
  Site contract: frontpage help site-building · https://frontpage.host/developers/site-building
612
645
  Domains, billing, members, and site delete are out of v1.`,
613
646
  history: `History
package/llms.txt CHANGED
@@ -8,7 +8,7 @@
8
8
  - Fonts: frontpage fonts [--slot] [--query] → exact value → tokens set fonts.<role> → APPLY font-sans|serif|mono|display. Build bundles catalog faces from tokens.ts and/or CSS font-family contexts (not prose). Inline-only without tokens works for catalog faces after rebuild; prefer tokens+utilities for brand roles.
9
9
  - Module/extension docs: frontpage modules docs <key> | frontpage extensions docs <key>
10
10
  - Search flags: --regex --case-sensitive --whole-word --files-only --context-lines --max-results
11
- - Modules setup: wizard modules (payments/shop/ordering): frontpage modules <key> connect [--no-open] opens Stripe/Square; finish in the browser, then status. request-setup remains valid for the editor amber bar. payments and shop share one Stripe account. frontpage modules <key> prints that key's CLI usage. Index: https://frontpage.host/developers/modules. Typed config: frontpage modules callbar|forms|booking|signups get|set (forms set needs --instance; confirm emails paid-plan only). google_reviews: frontpage modules google_reviews connect --place-id | --maps-url (server resolve + seed; no Autocomplete; do not write placeId via config). Also status, list-reviews, hide/show, set-stars, set-sort, set-weight, reset-weights, refresh, disconnect. Docs: https://frontpage.host/developers/modules/google-reviews. Markup: data-fp-google-reviews / data-fp-google-ask + required data-fp-requires="google_reviews". Ask scores: frontpage inbox google_reviews.
11
+ - Modules setup: wizard modules (payments/shop/ordering): frontpage modules <key> connect [--no-open] opens Frontpage (logged-in browser) then Stripe/Square; already-connected stays live. payments/shop connect = admin key; ordering = editor. payments disconnect 409s if shop still uses the shared Stripe account. request-setup remains valid for the editor amber bar. frontpage modules <key> prints that key's CLI usage. Index: https://frontpage.host/developers/modules. Typed config: frontpage modules callbar|forms|booking|signups get|set (forms set needs --instance; confirm emails paid-plan only). Form destinations: frontpage modules forms destinations|connect-destination|attach-destination|detach-destination|remove-destination --yes|request-destination-setup (token = admin; request-destination-setup lights the editor bar; request-setup forms is a no-op; connect does not attach every form). Privyr: paste Incoming Webhook URL (https://www.privyr.com/api/v1/incoming-leads/…), not a token. HubSpot: Development → Keys → Service keys or Legacy apps → Auth → Show token. Pipedrive: profile → Company settings → Personal preferences → API. Docs: https://frontpage.host/developers/modules#forms-destinations. google_reviews: frontpage modules google_reviews connect --place-id | --maps-url (server resolve + seed; no Autocomplete; do not write placeId via config). Also status, list-reviews, hide/show, set-stars, set-sort, set-weight, reset-weights, refresh, disconnect. Docs: https://frontpage.host/developers/modules/google-reviews. Markup: data-fp-google-reviews / data-fp-google-ask + required data-fp-requires="google_reviews". Ask scores: frontpage inbox google_reviews.
12
12
  - Analytics ops: frontpage analytics summary|query|funnel|timeseries|compare|sql (bare analytics = dashboard)
13
13
  - Media: frontpage media upload <file> (images/PDF ≤25 MB, video ≤50 MB, SVG/text ≤4 MB); human prints sitePath first — use /__media/uploads/<slug>/… in markup. Text/CSV is inline only (not media library; --json omits full content).
14
14
  - Prompt attachments: frontpage prompt "…" --attach <file|/__media/…|https://…> [--asset-url https://…] (same media caps as media upload)
@@ -16,12 +16,12 @@
16
16
  - SEO get: frontpage seo get [/path|--path /path]; search path filter: [path|--path <path>]; open [/path|--path /path]
17
17
  - Analytics funnel: --steps JSON array or comma paths (/, /pricing); bad JSON → Invalid JSON for --steps
18
18
  - Modules: unknown key errors list Known: …; mailing list module key is signups (not subscribe)
19
- - Errors: --json API envelopes include requestId when the server returned one; local validation omits requestId/httpStatus; runs wait failed/canceled → ok:false + run.error (exit 2); deploy wait fail-closed; push --wait
19
+ - Errors: --json API envelopes include requestId when the server returned one; local validation omits requestId/httpStatus; runs wait failed/canceled → ok:false + run.error (exit 2); deploy wait = agent idle + tip compile ready (fail-closed / compile timeout → exit 2); push --wait and publish --wait wait for GET /deploy ready
20
20
  - Auth: mint fp_live_ key in Frontpage UI (Developers); frontpage login KEY or FRONTPAGE_API_KEY
21
21
  - Site id: subdomain only (frontpage use <subdomain>). Not custom domains.
22
- - Staging: https://<subdomain>.frontpage.host — push/prompt/edit update staging; no separate staging deploy step. With a custom domain, subdomain may be owner-private (login wall ≠ failed push); public review is published custom domain.
23
- - Production: custom domain after frontpage publish — NEVER publish/unpublish unless the user explicitly asks
22
+ - Three clocks: git tip (push/prompt/edit) ≠ site compile (GET /deploy ready) ≠ editor agent run (runs wait). File-only push has no agent run.
23
+ - Production: frontpage publish promotes the last ready compile (409 if tip not built). frontpage publish --wait waits then publishes. NEVER publish/unpublish unless the user explicitly asks. Verify live <meta name="frontpage:commit">.
24
24
  - 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 [--wait] (CAS); no push during active agent run; UI agent does not use CLI pull; review on subdomain
25
25
  - Machine: global --json / --quiet; exit 0/2/3/4/5 (see help exit-codes)
26
- - deploy wait = optional build wait only (fail-closed on failed/canceled); it is NOT go-live / publish
26
+ - deploy wait = agent-run idle (if any) + tip compile ready; it is NOT go-live / publish
27
27
  - No runs continue, domains, billing, members, MCP, or git remotes in v1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frontpage-host",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Frontpage CLI — manage your site from the terminal",
5
5
  "type": "module",
6
6
  "bin": {