@awesomate/hosting-mcp 0.9.0 → 0.10.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/dist/index.js CHANGED
@@ -40108,7 +40108,7 @@ readTool(
40108
40108
  );
40109
40109
  readTool(
40110
40110
  "awesomate_get_limits",
40111
- "Usage vs plan limits across every dimension (sites, custom domains, workflow credits, AI-editor credits) plus a nudges[] array. Call BEFORE any create action; when a nudge has severity 'approaching' or 'exceeded', surface it to the user with the recommended plan \u2014 never execute an upgrade without preview + explicit confirmation (upgrade tools ship in a later release; for now deep-link to the hub billing page).",
40111
+ "Usage vs plan limits across every dimension (sites, custom domains, apps, database provisions today, workflow credits, AI-editor credits) plus a nudges[] array. Call BEFORE any create action; when a nudge has severity 'approaching' or 'exceeded', surface it to the user with the recommended plan \u2014 never execute an upgrade without preview + explicit confirmation (upgrade tools ship in a later release; for now deep-link to the hub billing page). pgProvisionsToday is a flat daily cap that resets within 24h \u2014 no plan raises it, so don't pitch an upgrade for it.",
40112
40112
  "/api/client-hosting/limits"
40113
40113
  );
40114
40114
  server.registerTool(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
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",
@@ -95,7 +95,12 @@ target; never touch prod without an explicit ask.**
95
95
  user the live dev URL and let them try it. Iterate on dev until they're happy.
96
96
  7. **Wrap-up / promote** — only when the user approves, promote **dev → staging
97
97
  → main** (merge + push per branch). `awesomate_app_deploy` reports the
98
- branch→env map + last-deploy state. Prod is `main`.
98
+ branch→env map + last-deploy state. Prod is `main`. **Before merging to
99
+ main**, walk [references/security-checklist.md](references/security-checklist.md)
100
+ — the deploy workflow's automated gate blocks prod on high-severity
101
+ findings (secrets, injectable SQL, eval…), and the checklist covers what
102
+ a scanner can't (authorization, webhook secrets, data minimization).
103
+ Never remove the gate step to make a deploy pass — fix the finding.
99
104
 
100
105
  **Promote / rollback (git-based):** promoting is merging the tested branch
101
106
  forward (`dev`→`staging`→`main`); rolling back is `git revert` of the bad
@@ -0,0 +1,57 @@
1
+ # Security checklist — walk this before promoting to prod
2
+
3
+ Two layers guard prod. The **automated gate** runs in every app's deploy
4
+ workflow (`scripts/security-check.mjs` — report-only on dev/staging,
5
+ BLOCKING on `main`, plus `npm audit --audit-level=critical`). This checklist
6
+ is the **human layer**: the things a scanner cannot see. Walk it with the
7
+ user in plain language before merging staging → main.
8
+
9
+ ## What the automated gate already catches (don't re-litigate)
10
+
11
+ Committed secrets / a tracked `.env` / private keys · SQL built by
12
+ interpolation or concatenation · `eval` / `new Function` · shell exec with
13
+ interpolated input · critical dependency advisories. If the prod deploy
14
+ fails on the gate, read the Actions log — every finding prints its fix.
15
+ **Never remove or bypass the gate step to make a deploy pass.**
16
+
17
+ ## The human checks (scanner-blind spots)
18
+
19
+ 1. **Authorization, not just authentication.** Logged-in is not allowed.
20
+ For every route that reads/writes data: could user A pass user B's id and
21
+ touch B's data? Filter by the session's user id server-side, never trust
22
+ an id from the request body.
23
+ 2. **Every input validated at the edge.** Each POST/PATCH handler starts
24
+ with a zod `safeParse`, with sane max lengths. No handler touches
25
+ `await c.req.json()` raw.
26
+ 3. **Secrets flow one way.** Values live in env vars (set via
27
+ `awesomate_app_set_env`), are never logged, never echoed in responses,
28
+ never sent to the browser.
29
+ 4. **Rendering is escape-safe.** Browser code uses `textContent` /
30
+ `createElement` for user data; server HTML never string-interpolates
31
+ user input without escaping.
32
+ 5. **The n8n webhook is not world-callable.** If n8n is attached, the
33
+ workflow checks the `X-Awesomate-Webhook-Secret` header (set during
34
+ attach). Test: call the webhook without the header — it must refuse.
35
+ 6. **Public API surface is intentional.** api-only starter: is `API_KEY`
36
+ set for prod, or is a public API genuinely intended? CORS open on
37
+ purpose?
38
+ 7. **Sensitive data is minimized.** Only collect what the app needs; if it
39
+ stores personal data, tell the user plainly: connections are TLS and
40
+ secrets are encrypted, but the DATABASE is not blanket-encrypted at
41
+ rest — sensitive fields deserve app-level encryption (ask before adding).
42
+ 8. **Errors don't leak.** 500 responses return a generic message, not stack
43
+ traces or SQL (the starters already do this — keep it).
44
+
45
+ ## Static sites
46
+
47
+ No server code, so the gate doesn't run — the risks are the lead form's
48
+ webhook (point 5) and third-party scripts (don't add any that aren't
49
+ needed). Never put an API key in page JavaScript: anything in a static page
50
+ is public.
51
+
52
+ ## How to talk about it
53
+
54
+ Non-technical user — say what you checked, not the jargon: *"Before making
55
+ it live I checked that people can only see their own data, that the contact
56
+ form can't be abused, and that your API key never appears anywhere public.
57
+ The deploy pipeline also scans every release automatically."*
@@ -8,7 +8,7 @@ confirm before building. **Never default to WordPress.**
8
8
 
9
9
  | What the user is really trying to do | Stack | Why / how |
10
10
  |---|---|---|
11
- | "I already have a WordPress site" / a blog / publishes content regularly / **wants to rank on Google & AI** | **WordPress** | Best CMS for indexable content, sitemaps, schema. Hand to the awesomate-hosting skill to provision, then run **awesomate-seo**. |
11
+ | "I already have a WordPress site" / a blog / publishes content regularly / **wants to rank on Google & AI** | **WordPress** | Best CMS for indexable content, sitemaps, schema. Hand to the awesomate-hosting skill to provision, then run **awesomate-seo**. Existing WP elsewhere → migrate it, don't rebuild: [wp-migrate.md](wp-migrate.md) (also covers WP ↔ app coexistence on subdomains). |
12
12
  | Sell products / online shop | **WordPress + WooCommerce** | Reuse the `woo-agent-storefront` (AI-shopping feeds + `llms.txt`) and `woo-catalog-perfection` skills. |
13
13
  | A landing page / capture leads / a one-pager / "just needs to look good and be found" | **static site** (`kind: 'static'`) | Served straight from the cPanel docroot — no database, no server process, fastest load. Add SEO + a lead form (below). The right default for marketing pages. |
14
14
  | A tool/app with **logins, custom logic, a dashboard, or an API** | **Node app** (`kind: 'node'`) | A real backend + database. |
@@ -0,0 +1,60 @@
1
+ # Moving an existing WordPress site to Awesomate (and WP ↔ app coexistence)
2
+
3
+ When the stack decision lands on WordPress **and the user already has a WP
4
+ site elsewhere**, don't rebuild it — migrate it. Plain-language framing:
5
+ *"We'll make an exact copy of your current site on your Awesomate hosting,
6
+ check it works, then point your domain at it. Your old site stays untouched
7
+ until you're happy."*
8
+
9
+ ## The migration path
10
+
11
+ 1. **Provision WP on Awesomate first** — the awesomate-hosting skill's
12
+ normal WP install (their plan's site limit applies; check
13
+ `awesomate_get_limits`). This gives a working target with SSL.
14
+ 2. **Export from the old host.** Preference order:
15
+ - **A full-copy plugin** (Duplicator / All-in-One WP Migration): the user
16
+ installs it on their OLD site and downloads the archive — the only step
17
+ that happens outside Awesomate, so give them click-by-click guidance.
18
+ - **Host export**: many hosts offer a backup download (files + a `.sql`).
19
+ - **WP admin export (XML)**: last resort — content only (posts/pages/
20
+ media), loses theme/plugins/settings; expect to reassemble the look.
21
+ 3. **Import on Awesomate.** With shell access (Support Plus+) prefer
22
+ `wp-cli` over the target install: unpack files into the docroot, import
23
+ the DB, then `wp search-replace 'https://old-domain.com'
24
+ 'https://new-domain.com' --all-tables` (serialized-data-safe — never do
25
+ this with raw SQL). Plugin archives restore through the same plugin
26
+ installed on the new site.
27
+ 4. **Verify before DNS.** Browse the copy on its Awesomate URL: pages,
28
+ images, forms, admin login, HTTPS. Run **awesomate-seo** (sitemap,
29
+ robots, meta) and offer the **wp-security-review** skill — a migrated
30
+ site imports its old plugins, and stale plugins are the top WP risk.
31
+ 5. **Cut over DNS** — point the domain at Awesomate (add it as a custom
32
+ domain first; plan limits apply). Old site stays live as the fallback
33
+ until the user confirms; propagation can take up to a day and both
34
+ copies serve during it (avoid content edits that day).
35
+ 6. **After cutover:** confirm SSL issued for the domain, re-run the SEO
36
+ check on the final URL, and remind them to cancel the old hosting only
37
+ once everything's verified.
38
+
39
+ ## WP ↔ app coexistence (they want both)
40
+
41
+ The platform already separates them cleanly — **WordPress owns the main
42
+ domain; every app lives on its own subdomain** (`app.domain.com`,
43
+ `dev-app.domain.com`, …). No conflict: Apache routes the main site to WP's
44
+ docroot and each subdomain to its app.
45
+
46
+ - Marketing/blog/shop stays in WP; the tool their customers log into is the
47
+ Node app on a subdomain. Link between them with plain links.
48
+ - Don't try to serve an app *under a WP path* (`domain.com/app`) — that
49
+ fights WP's rewrites. A subdomain is the supported shape.
50
+ - Shared look: reuse the WP site's colors/logo in the app's UI rather than
51
+ loading WP themes into the app.
52
+ - Shared backend jobs (a form on either side emailing/CRM-ing): both can
53
+ call the same n8n webhook — one workflow, two callers.
54
+
55
+ ## When NOT to migrate
56
+
57
+ If the old "WP site" is really one landing page and they don't blog or
58
+ sell: recommend rebuilding it as a **static site** on Awesomate instead
59
+ (faster, nothing to update) — see stack-decision.md. Migration is for sites
60
+ with real content, plugins, or a shop.