@awesomate/hosting-mcp 0.22.0 → 0.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -41224,7 +41224,7 @@ server.registerTool(
41224
41224
  server.registerTool(
41225
41225
  "awesomate_site_create",
41226
41226
  {
41227
- description: "Create a WordPress site on the user's hosting. Plan limits are enforced server-side (429/403 with an upgrade hint if they're at their cap \u2014 relay it). Ask 'live or dev?' first per the awesomate-hosting skill. Returns the new site's admin details.",
41227
+ description: "Create a WordPress site on the user's hosting. Plan limits are enforced server-side (429/403 with an upgrade hint if they're at their cap \u2014 relay it; 409 means WordPress already exists at that domain). Ask 'live or dev?' first per the awesomate-hosting skill. Omit `domain` and the next free siteN.{primary} subdomain is chosen for you. ASYNC and returns only {success:true} \u2014 no domain, no admin details: poll awesomate_list_sites to learn the name, and expect HTTPS to refuse connections for a minute or two while AutoSSL issues even though the site is already serving over http. See 'After creating a site' in the skill.",
41228
41228
  inputSchema: {
41229
41229
  domain: external_exports.string().optional().describe("Custom domain if they have one; omit for a default *.awesomate.site subdomain"),
41230
41230
  siteTitle: external_exports.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.22.0",
3
+ "version": "0.22.2",
4
4
  "description": "Awesomate MCP server — lets Claude manage your Awesomate WordPress hosting, plan, limits, n8n automations, and build Node/static apps + databases",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -88,6 +88,24 @@ wrong account) · `references/connect-troubleshooting.md` (bootstrap, sandbox/
88
88
  proxy failures, resuming a connect, support report) ·
89
89
  `references/rest-fallback.md` (no `awesomate_*` tools — serve over REST) ·
90
90
  `references/voice.md` (how to talk to a non-technical owner).
91
+ `references/wordpress-launch-checks.md` (what to MEASURE in a real browser after any theme,
92
+ template or page deploy — boxed sections, missing logo/favicon, the post-domain re-key, http asset
93
+ URLs — every item a defect an owner reported before the agent noticed).
94
+
95
+ ## After creating a site
96
+
97
+ Creation is queued, not instant, and the certificate lags the install. For a
98
+ minute or two afterwards `https://` refuses the connection while `http://`
99
+ already returns real WordPress HTML — and `sslActive` in the site list may
100
+ already read `true`, because it reports intent rather than the live cert.
101
+
102
+ That combination is the expected intermediate state, not a contradiction and
103
+ not a failed build. Confirm over plain HTTP, say the certificate is still
104
+ issuing, and poll until HTTPS answers. Never delete and recreate the site or
105
+ start debugging DNS on the strength of it.
106
+
107
+ New sites come up on the host's default theme (`hello-elementor`). A fresh
108
+ install is not evidence that a custom theme shipped.
91
109
 
92
110
  ## 0a. Tool map — reach for it when
93
111
 
@@ -100,7 +118,7 @@ proxy failures, resuming a connect, support report) ·
100
118
  | `awesomate_get_hosting_status` | Is hosting provisioned at all — eligible/provisioned flags, in-progress step, primary domain, DNS targets. Check before suggesting any site action |
101
119
  | `awesomate_get_hosting_account` | cPanel account details: package, server, provisioned-at, masked username |
102
120
  | `awesomate_list_sites` | What WordPress sites exist on this account |
103
- | `awesomate_site_create` | Spin up a new WordPress site (check limits first) |
121
+ | `awesomate_site_create` | Spin up a new WordPress site (check limits first). Async — poll `awesomate_list_sites` for the name, and expect HTTPS to fail for a minute or two while AutoSSL issues; see **After creating a site** below |
104
122
  | `awesomate_list_domains` | What domains are attached, and to which site |
105
123
  | `awesomate_domain_add` | Attach a custom domain to a site |
106
124
  | `awesomate_dns_check` | Live answer to "where does this domain actually point" — before and after any DNS change |
@@ -295,6 +313,11 @@ scripts/deploy.sh --from ~/Studio/mysite --domain mysite.awesomate.site --with-d
295
313
  Never deploy without confirming with the user first, and always report the
296
314
  snapshot id and the verified live status.
297
315
 
316
+ **"Verified live status" means a real browser at 390px and 1440px, not a 200 from curl.**
317
+ Run the checklist in `references/wordpress-launch-checks.md` — full-bleed sections, gutters,
318
+ logo and favicon present, fonts loaded, no broken images, a real 404 — before saying done. Every
319
+ item on it was reported by a site owner after an agent had already said done.
320
+
298
321
  ## 5a. Staging on awesomate.dev (Support Plus+)
299
322
 
300
323
  The middle tier between "edit live" and "local Studio": a private full copy of
@@ -26,5 +26,50 @@ GET with `Authorization: Bearer <pat>`:
26
26
  | `awesomate_list_domains` | `GET {apiBase}/api/client-hosting/domains` |
27
27
  | `awesomate_get_limits` | `GET {apiBase}/api/client-hosting/limits` |
28
28
 
29
+ ## Creating a site over REST
30
+
31
+ `POST {apiBase}/api/client-hosting/sites` (JSON, same bearer) is the fallback
32
+ for `awesomate_site_create`. Three things about it trip people up:
33
+
34
+ - **The body field is `siteTitle`, not `title`.** An unknown key is ignored
35
+ silently, so the site ends up titled after its domain. `domain`, `themeSlug`,
36
+ `adminEmail` and `intent` are the other accepted keys; all are optional.
37
+ - **Omit `domain` and the server picks the next free `siteN.{primary}`** —
38
+ the first install takes the bare primary domain, then `site2`, `site3`, and
39
+ so on. Pass `domain` explicitly if the user named one.
40
+ - **The response is bare `{"success":true}`** — no domain, no id. It does not
41
+ tell you what got built, so read the name back from `GET /sites`.
42
+
43
+ Refusals are specific and worth relaying verbatim: `403` means the plan's site
44
+ cap is reached (staging clones are excluded from the count), `409` means
45
+ WordPress already exists at that domain.
46
+
47
+ ## Provisioning is async — do not call it broken
48
+
49
+ The POST returns as soon as the install is queued. Poll
50
+ `GET {apiBase}/api/client-hosting/sites` until the new hostname appears rather
51
+ than assuming the call failed.
52
+
53
+ Then expect a **gap of a minute or two where HTTPS does not answer at all**
54
+ while AutoSSL issues the certificate. During that window the symptom looks
55
+ alarming but is normal and self-resolving:
56
+
57
+ | Check | During issuance | Meaning |
58
+ |---|---|---|
59
+ | `curl https://…` | `000` / connection failed | Cert not issued **yet** |
60
+ | `curl http://…` | `200`, real WordPress HTML | The site is genuinely built |
61
+ | `dig +short` | resolves to the hosting IP | DNS is fine |
62
+ | `/sites` `sslActive` | may already say `true` | Reports intent, not the live cert |
63
+
64
+ So: an HTTPS failure straight after creation is not a failed build. Confirm
65
+ over plain HTTP, tell the user the certificate is still issuing, and poll
66
+ HTTPS until it answers. Do not delete and recreate the site, and do not go
67
+ hunting through DNS or Cloudflare — `sslActive: true` alongside a dead HTTPS
68
+ port is the expected intermediate state, not a contradiction.
69
+
70
+ New sites come up on the host's default theme (currently
71
+ `hello-elementor`). If the user asked for a custom theme, that is still ahead
72
+ of you — the fresh install is not evidence their theme shipped.
73
+
29
74
  Serve the request with these now, then suggest restarting Claude Code at a
30
75
  natural break so the richer MCP integration loads.
@@ -0,0 +1,108 @@
1
+ # WordPress launch checks — what to verify after deploying a theme or content
2
+
3
+ Every item here was a real defect that shipped to a live client site and was reported by the
4
+ owner, not caught by the agent. Each one looked fine in the generated code and was only visible
5
+ in a browser — so the rule is: **after any theme, template or page deploy, load the live site in a
6
+ real browser at 390px and 1440px and MEASURE, before telling the user it is done.**
7
+
8
+ ## 1. Sections boxed with white strips at the sides (the "margins are off" report)
9
+
10
+ **Symptom:** coloured section backgrounds stop short of the viewport edges, leaving white strips;
11
+ on a phone the text sits hard against the coloured band with no gutter. The home page often looks
12
+ fine while every inner page is wrong.
13
+
14
+ **Cause:** the inner-page template gives the **post-content block its own `layout`**:
15
+ `<!-- wp:post-content {"layout":{"type":"constrained"}} /-->`. That boxes every child group to
16
+ `contentSize` and strips its side padding. A front page written as `<!-- wp:post-content /-->`
17
+ (no layout) does not have the problem — which is why only some pages break.
18
+
19
+ **Fix:** post-content carries **no layout attribute** in templates whose content is built from
20
+ full-bleed section groups. Each section group is `{"layout":{"type":"constrained"}}` itself, so its
21
+ background runs edge to edge while its content is constrained. Keep a constrained post-content
22
+ only for deliberately narrow long-form templates (legal, single post), where every section is white
23
+ anyway.
24
+
25
+ **Measure it (Playwright, or DevTools console):**
26
+ ```js
27
+ const g = document.querySelector('main .wp-block-group.has-background');
28
+ const r = g.getBoundingClientRect();
29
+ const fullBleed = r.left <= 1 && r.width >= innerWidth - 1; // must be true
30
+ const inset = g.querySelector('h1,h2,p').getBoundingClientRect().left - r.left; // ≥16 on a phone
31
+ ```
32
+
33
+ Two related spacing faults usually travel with it:
34
+ - **Every `<section>` converted to a 96px-top-and-bottom group.** A page header flowing into its
35
+ content then stacks 192px of dead space. Padding must follow the design's section types (a full
36
+ section, a page header, a bare container), not one flat value.
37
+ - **WordPress's block gap opens a white line between two coloured bands.** Give section groups
38
+ `"margin":{"top":"0","bottom":"0"}`.
39
+ - **A fixed root gutter** (`styles.spacing.padding` = 40px) is far too wide on a phone. Use a
40
+ responsive value, e.g. `min(40px, 5vw)`.
41
+
42
+ ## 2. Logo missing, no favicon
43
+
44
+ **Symptom:** the header and footer show no logo at all; the browser tab has no icon.
45
+
46
+ **Cause:** `<!-- wp:site-logo /-->` renders **nothing** until a logo is set in Site Identity
47
+ (`custom_logo` theme mod), and no `<link rel="icon">` is emitted until `site_icon` is set. A fresh
48
+ install has neither, and the media library is empty. On these hosts **SVG uploads are disabled**
49
+ (`image/svg+xml` is not an allowed mime type), so the brand's SVGs cannot be uploaded as media.
50
+
51
+ **Fix, both halves:**
52
+ - Header/footer logos from the **theme's own files**, not media: make the header and footer
53
+ *patterns* (PHP) included from the parts —
54
+ `<!-- wp:pattern {"slug":"<theme>/header"} /-->` in `parts/header.html` — so the pattern can use
55
+ `get_theme_file_uri('assets/logos/logo.svg')`. This also lets the footer use the on-dark variant
56
+ while the header uses the primary, which a single Site Identity logo cannot do.
57
+ - Still set Site Identity, because WordPress uses it elsewhere:
58
+ `wp media import logo.png --porcelain` → `wp theme mod set custom_logo <id>`;
59
+ `wp media import icon-512.png --porcelain` → `wp option update site_icon <id>`.
60
+ The site icon must be a **PNG, square, ≥512px** — make one from the brand emblem with
61
+ transparent padding rather than uploading a rectangular PNG.
62
+
63
+ **Verify:** the live HTML contains an `<img alt="…">` in the header and `<link rel="icon"`, and both
64
+ URLs return 200 with an image content type.
65
+
66
+ ## 3. The hub re-keys a site when a custom domain becomes its primary
67
+
68
+ After a custom domain is attached and made primary, `GET /api/client-hosting/sites` reports the
69
+ site under **the new domain** (`domain: example.com`), and per-site endpoints keyed by the old
70
+ `siteN.<slug>.awesomate.site` name return **404** — including the snapshot call, which will abort a
71
+ snapshot-first deploy that worked yesterday. Read `/sites` and use the `domain` it reports.
72
+
73
+ ## 4. Content seeded over WP-CLI stores `http://` asset URLs
74
+
75
+ Pages created with `wp eval-file` / `wp post create` while the install is still on its
76
+ `*.awesomate.site` address store theme asset URLs as `http://<install host>/...`. A later
77
+ `wp search-replace https://<install host> https://example.com` misses every one of them because of
78
+ the scheme. Replace on the **bare host**: `wp search-replace <install-host> example.com --all-tables
79
+ --precise`, then recount with `LIKE '%<install-host>%'`.
80
+
81
+ ## 5. New pattern files render as nothing until the theme Version changes
82
+
83
+ **Symptom:** you add `patterns/header.php` (or any new pattern) to a live theme, deploy it, and
84
+ `<!-- wp:pattern {"slug":"theme/header"} /-->` renders an empty string — no error, no logo, nothing.
85
+ Patterns that already existed keep working, which makes the new one look broken rather than
86
+ unregistered.
87
+
88
+ **Cause:** WordPress caches the theme's `patterns/` directory listing in a transient keyed by the
89
+ theme's `Version:` header (`style.css`). A new file is not seen until that key changes.
90
+
91
+ **Fix:** bump `Version:` in `style.css` on every deploy that adds, removes or renames a pattern
92
+ file. Verified: the same deploy with `0.1.0 → 0.2.0` registered the patterns instantly. Treat the
93
+ version bump as part of the deploy, not a release ceremony.
94
+
95
+ ## The launch checklist
96
+
97
+ Run in a real browser against the LIVE domain, at 390 and 1440, before reporting done:
98
+
99
+ 1. Every coloured section is full-bleed (`getBoundingClientRect().left <= 1`) with text inset ≥16px.
100
+ 2. No horizontal overflow (`documentElement.scrollWidth <= clientWidth + 1`).
101
+ 3. Header shows the logo; `<link rel="icon">` is present; both URLs return 200.
102
+ 4. `document.fonts` reports the brand faces `loaded` (self-hosted fonts actually shipped).
103
+ 5. Zero broken images (`img.complete && naturalWidth > 0`), and zero assets still on the install host.
104
+ 6. A nonsense URL returns **404** with the theme's 404 template, not a 200 page.
105
+ 7. Section order matches the design (read the `h1,h2` sequence), and neither nav nor decorative
106
+ marks appear inside page content.
107
+ 8. If the deploy added pattern files, the theme `Version:` was bumped and every `wp:pattern`
108
+ in the parts actually rendered (an unregistered slug renders as empty, silently).