@hostinger/mcp 3.39.1 → 3.40.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/CHANGELOG.md +21 -0
- package/README.md +14 -8
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/headless/VERSION +2 -2
- package/skills/headless/steps/06-frontend/SKILL.md +14 -2
- package/skills/headless/steps/07-validate/SKILL.md +7 -6
- package/src/core/runtime.js +1 -1
- package/src/core/runtime.ts +1 -1
- package/src/core/skills.js +6 -6
- package/src/core/skills.ts +6 -6
- package/src/core/tools/all.js +3 -3
- package/src/core/tools/all.ts +3 -3
- package/src/core/tools/mail.js +3 -3
- package/src/core/tools/mail.ts +3 -3
- package/src/servers/agency-hosting.js +1 -1
- package/src/servers/agency-hosting.ts +1 -1
- package/src/servers/agent-readiness.js +1 -1
- package/src/servers/agent-readiness.ts +1 -1
- package/src/servers/all.js +1 -1
- package/src/servers/all.ts +1 -1
- package/src/servers/billing.js +1 -1
- package/src/servers/billing.ts +1 -1
- package/src/servers/dns.js +1 -1
- package/src/servers/dns.ts +1 -1
- package/src/servers/domains.js +1 -1
- package/src/servers/domains.ts +1 -1
- package/src/servers/ecommerce.js +1 -1
- package/src/servers/ecommerce.ts +1 -1
- package/src/servers/gpu.js +1 -1
- package/src/servers/gpu.ts +1 -1
- package/src/servers/horizons.js +1 -1
- package/src/servers/horizons.ts +1 -1
- package/src/servers/hosting.js +1 -1
- package/src/servers/hosting.ts +1 -1
- package/src/servers/mail.js +1 -1
- package/src/servers/mail.ts +1 -1
- package/src/servers/reach.js +1 -1
- package/src/servers/reach.ts +1 -1
- package/src/servers/vps.js +1 -1
- package/src/servers/vps.ts +1 -1
- package/src/servers/wordpress.js +1 -1
- package/src/servers/wordpress.ts +1 -1
- package/types.d.ts +14 -8
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ Generated at release time from the diff between the previous and current
|
|
|
4
4
|
build. Tool changes are listed individually; everything else is summarised
|
|
5
5
|
by area.
|
|
6
6
|
|
|
7
|
+
## v3.40.0 — 2026-11-12
|
|
8
|
+
|
|
9
|
+
### Also in this release
|
|
10
|
+
|
|
11
|
+
- Bundled agent skills: `skills/headless/VERSION`, `skills/headless/steps/06-frontend/SKILL.md`, `skills/headless/steps/07-validate/SKILL.md`
|
|
12
|
+
- Other files: `src/core/skills.js`, `src/core/skills.ts`
|
|
13
|
+
|
|
14
|
+
## v3.39.2 — 2026-11-12
|
|
15
|
+
|
|
16
|
+
### Operations
|
|
17
|
+
|
|
18
|
+
- Changed the description of `mail_api-tokens_create`
|
|
19
|
+
- Changed the description of `mail_api-tokens_revoke`
|
|
20
|
+
- Changed the description of `mail_api-tokens_list`
|
|
21
|
+
|
|
22
|
+
### Also in this release
|
|
23
|
+
|
|
24
|
+
- Documentation: `README.md`
|
|
25
|
+
- Request handling and authentication: `src/core/runtime.js`, `src/core/runtime.ts`
|
|
26
|
+
- Build and packaging: `types.d.ts`
|
|
27
|
+
|
|
7
28
|
## v3.39.1 — 2026-11-12
|
|
8
29
|
|
|
9
30
|
### Also in this release
|
package/README.md
CHANGED
|
@@ -2809,14 +2809,20 @@ order.
|
|
|
2809
2809
|
|
|
2810
2810
|
#### mail_api-tokens_create
|
|
2811
2811
|
|
|
2812
|
-
Create an API token for the given mail order.
|
|
2813
|
-
|
|
2814
|
-
|
|
2812
|
+
Create an API token for the given mail order. Through the
|
|
2813
|
+
[Hostinger Mail API](https://api.mail.hostinger.com/), the token
|
|
2814
|
+
grants access to the mailboxes it is scoped to (for example, to read,
|
|
2815
|
+
search, send and organise email messages), without signing in with a
|
|
2816
|
+
mailbox password over IMAP, SMTP or webmail.
|
|
2817
|
+
|
|
2818
|
+
A token covers either all mailboxes of the order or only the ones you
|
|
2819
|
+
choose. Set `scope.has_all_mailboxes` to `true` to cover all current
|
|
2820
|
+
and future mailboxes, or to `false` and list specific mailboxes in
|
|
2821
|
+
`scope.mailbox_ids`.
|
|
2815
2822
|
|
|
2816
2823
|
The plaintext token is returned only in this response, never again.
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
or list specific mailboxes in `scope.mailbox_ids`.
|
|
2824
|
+
Store it securely, because anyone who has it gets the same access. A
|
|
2825
|
+
maximum of 10 tokens can exist per order.
|
|
2820
2826
|
|
|
2821
2827
|
- **Method**: `POST`
|
|
2822
2828
|
- **Path**: `/api/mail/v1/orders/{orderId}/api-tokens`
|
|
@@ -2824,7 +2830,7 @@ or list specific mailboxes in `scope.mailbox_ids`.
|
|
|
2824
2830
|
#### mail_api-tokens_revoke
|
|
2825
2831
|
|
|
2826
2832
|
Revoke an API token. The token immediately loses access to the
|
|
2827
|
-
[Hostinger
|
|
2833
|
+
[Hostinger Mail API](https://api.mail.hostinger.com/). This action
|
|
2828
2834
|
cannot be undone.
|
|
2829
2835
|
|
|
2830
2836
|
- **Method**: `DELETE`
|
|
@@ -2833,7 +2839,7 @@ cannot be undone.
|
|
|
2833
2839
|
#### mail_api-tokens_list
|
|
2834
2840
|
|
|
2835
2841
|
Retrieve a paginated list of
|
|
2836
|
-
[Hostinger
|
|
2842
|
+
[Hostinger Mail API](https://api.mail.hostinger.com/) tokens across
|
|
2837
2843
|
all your mail orders, optionally filtered by order. Plaintext tokens
|
|
2838
2844
|
are never included; they are returned only when a token is created.
|
|
2839
2845
|
|
package/gemini-extension.json
CHANGED
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"url": "https://github.com/hostinger/api-mcp-server",
|
|
18
18
|
"source": "github"
|
|
19
19
|
},
|
|
20
|
-
"version": "3.
|
|
20
|
+
"version": "3.40.0",
|
|
21
21
|
"packages": [
|
|
22
22
|
{
|
|
23
23
|
"registryType": "npm",
|
|
24
24
|
"identifier": "@hostinger/mcp",
|
|
25
|
-
"version": "3.
|
|
25
|
+
"version": "3.40.0",
|
|
26
26
|
"transport": {
|
|
27
27
|
"type": "stdio"
|
|
28
28
|
},
|
package/skills/headless/VERSION
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
version=3.
|
|
2
|
-
commit=
|
|
1
|
+
version=3.40.0
|
|
2
|
+
commit=84eff187aaa9
|
|
3
3
|
built=2026-11-12
|
|
@@ -182,11 +182,23 @@ Guidelines (framework-agnostic):
|
|
|
182
182
|
|
|
183
183
|
## Step 4 — Hand off
|
|
184
184
|
|
|
185
|
-
Confirm the project builds clean locally against the live backend,
|
|
186
|
-
remains, and `state.json → frontend` matches what you
|
|
185
|
+
Confirm the project builds clean locally against the live backend, looks right at desktop and phone
|
|
186
|
+
width (below), no placeholder/fixture content remains, and `state.json → frontend` matches what you
|
|
187
|
+
built. Update `state.json` (`stage: "validate"`).
|
|
187
188
|
Validate (Step 7) owns the clean rebuild + user preview; deploy (Step 8) ships it with the `app_type`
|
|
188
189
|
and output directory that match the chosen framework + rendering.
|
|
189
190
|
|
|
191
|
+
**Visual check.** With the site running locally against the live backend, look at the home page and one
|
|
192
|
+
page of each template (e.g. a post, a product, the contact page) at desktop and phone width. Take all the
|
|
193
|
+
screenshots first, then open them all in one turn where your tool can open several images at once, since
|
|
194
|
+
each separate look costs a model turn. Don't tile several pages onto one image or take one tall
|
|
195
|
+
full-page shot: the viewer shrinks big images, and a shrunk page hides small bugs like a wrapped line.
|
|
196
|
+
After a fix, re-shoot only what changed. Phone width is where most layout bugs show. Headless Chrome
|
|
197
|
+
won't size a window below ~500 px, so a phone-width window comes back cropped: set a 390 px viewport
|
|
198
|
+
(e.g. Playwright), or put one route in 1280 px and 390 px iframes side by side on a local page to get
|
|
199
|
+
both widths in one image. The live site runs this same build, so it needs no screenshots; deploy checks
|
|
200
|
+
that it serves.
|
|
201
|
+
|
|
190
202
|
> **Webapp:** just confirm the app builds clean and `state.json → frontend` is right — there's no
|
|
191
203
|
> `content-model.md` or headless backend to check. A DB-backed app can't reach its database locally
|
|
192
204
|
> (`127.0.0.1` is server-only), so its data layer is verified **after** deploy, not here.
|
|
@@ -6,9 +6,9 @@ description: "Step 7 (validate) of the Hostinger Headless flow. OPTIONAL quick g
|
|
|
6
6
|
# headless-step-validate
|
|
7
7
|
|
|
8
8
|
> **Optional / fast.** Every stage before this one already verifies its own work (provision checks the
|
|
9
|
-
> backend, content-model push checks the REST counts, frontend builds clean
|
|
10
|
-
> live result**. So validate is **not** a re-run of all
|
|
11
|
-
> optional human preview/sign-off. **Skip Steps 3–4 (rebuild + approval) entirely** on an autonomous or
|
|
9
|
+
> backend, content-model push checks the REST counts, frontend builds clean and looks right at desktop
|
|
10
|
+
> and phone width), and **deploy verifies the live result**. So validate is **not** a re-run of all
|
|
11
|
+
> that — it's a quick confirmation, plus the optional human preview/sign-off. **Skip Steps 3–4 (rebuild + approval) entirely** on an autonomous or
|
|
12
12
|
> temp-domain run where no one is signing off; just do the two 10-second checks below and move on. Spend
|
|
13
13
|
> time here only when a person wants to see it before it goes live.
|
|
14
14
|
|
|
@@ -61,9 +61,10 @@ fixtures, placeholder copy or `.htaccess` in the output).
|
|
|
61
61
|
## 4 — Preview & approval (optional — only when a person is signing off)
|
|
62
62
|
|
|
63
63
|
When someone wants to see it first: start the local preview (Astro: `npm run preview`; Next.js:
|
|
64
|
-
`npx next start`),
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
`npx next start`), show the user a couple of key routes at desktop and phone width (capture phone width
|
|
65
|
+
as in frontend's *Visual check*; frontend already caught the layout bugs, so this is for the user, not a
|
|
66
|
+
re-review) and navigation, and present it for **explicit approval**. If preview tooling is unavailable,
|
|
67
|
+
give the user the command and URL. On an autonomous or temp-domain run, skip this — deploy will verify the live result anyway.
|
|
67
68
|
|
|
68
69
|
Then (after approval, or immediately if 3–4 were skipped): `state.json` → `stage: "deploy"`, fresh
|
|
69
70
|
`updated_at`; leave `provision` unchanged.
|
package/src/core/runtime.js
CHANGED
|
@@ -62,7 +62,7 @@ const GetSkillRequestSchema = z.object({
|
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* MCP Server for Hostinger API
|
|
65
|
-
* Generated from OpenAPI spec version 2.14.
|
|
65
|
+
* Generated from OpenAPI spec version 2.14.1
|
|
66
66
|
*/
|
|
67
67
|
class MCPServer {
|
|
68
68
|
constructor({ name, version, tools, instructions, skills = [] }) {
|
package/src/core/runtime.ts
CHANGED
|
@@ -96,7 +96,7 @@ interface Skill { uri: string; frontmatter: Record<string, unknown>; resources:
|
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* MCP Server for Hostinger API
|
|
99
|
-
* Generated from OpenAPI spec version 2.14.
|
|
99
|
+
* Generated from OpenAPI spec version 2.14.1
|
|
100
100
|
*/
|
|
101
101
|
class MCPServer {
|
|
102
102
|
private readonly name: string;
|
package/src/core/skills.js
CHANGED
|
@@ -260,17 +260,17 @@ export default [
|
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
"uri": "skill://hostinger-headless/steps/06-frontend/SKILL.md",
|
|
263
|
-
"digest": "sha256:
|
|
264
|
-
"size":
|
|
263
|
+
"digest": "sha256:54e8925e3ccc05992cb01557a8c1480424b594533513a127bfe2ebb7c256fdf5",
|
|
264
|
+
"size": 15959,
|
|
265
265
|
"mimeType": "text/markdown",
|
|
266
|
-
"text": "---\nname: headless-step-frontend\ndescription: \"Step 6 (frontend) of the Hostinger Headless flow. Builds the website that renders the backend's content. Figures out (or confirms) the framework — defaulting to Next.js SSR — implements the look already chosen in design.md (the design step's contract), and builds the source into src/. Only ask for the clarifications you actually need.\"\n---\n\n# headless-step-frontend\n\nBuild the site's frontend against the backend from `site.json`, implementing the look the design step\nalready chose and wrote to **`design.md`** (plus the logo in `brand/`). The design is decided; this step\nis where it becomes real code. There's no per-framework recipe — use good judgement, follow `design.md`\nas the contract, and ask only for the clarifications you genuinely need. **Out:** source in the site\nworkspace `~/.hostinger/<domain>/src/`.\n\n> ## ⚠️ Build mode: \"Bring your own frontend\"? Read this first (any backend)\n> Read `brief.md` → **Build mode**. When it is **Bring your own frontend**, the user already has a\n> frontend (the project in the folder the command was run in) and this step **wires it to the backend\n> from `site.json` — it does not scaffold a new project and there is usually no `design.md` to\n> implement** (the design step deferred to the user). **Use their project as the source**: copy or\n> point `~/.hostinger/<domain>/src/` at it, keep its framework and UI, and collaborate on changes at\n> the user's direction (vibe-code with them). Your job is to connect it to the live backend (WordPress\n> `wp/v2` reads, the WooCommerce/Ecommerce Store API, env/keys) and make it deployable (set\n> `engines.node` to `22`, remove any `.htaccess`), then hand off to deploy. This generalises the Webapp\n> \"existing app\" case below to WordPress and Ecommerce too. When **Build mode is \"Agent designs and\n> builds\"**, ignore this box and proceed normally (scaffold + implement `design.md`).\n\n> ## ⚠️ Webapp backend? Read this first\n> A `webapp` brief has **no CMS/store and no `content-model.md`** — the app owns its own data (its own\n> API, or the MySQL database recorded in `site.json → database`). It comes in two shapes, decided back in\n> **refine**:\n>\n> - **An existing app under Build mode \"Bring your own frontend\"** (refine routes \"deploy my app\" here). **Use their\n> project as the source** — copy/point `~/.hostinger/<domain>/src/` at it and keep its own framework and\n> UI. **Do not scaffold a new project, and do not re-implement `design.md` over it** (so **the design\n> step does not apply** to an app that brings its own UI). Your job is only to make it deployable: set\n> `engines.node` to `22`, remove any `.htaccess`, wire its data/env, then hand off to deploy. **Skip the\n> Step 2 design pass**, and ignore the `content-model.md` requirement in Step 3.\n> - **A new app built from the brief.** Scaffold and build it from `brief.md` (and `design.md` if the\n> design step produced one — design *does* run for a from-scratch app). Its data is owned by the app, so\n> there is still **no `content-model.md`** to bind against. An existing app under **Build mode \"Agent\n> designs and builds\"** takes this shape too, but starts from its source: copy the project at\n> `brief.md` → **Existing project** into `~/.hostinger/<domain>/src/`, keep its framework, screens,\n> features and data wiring, and rebuild its UI to `design.md` instead of scaffolding a new project.\n>\n> Framework choice (Step 1), the build, and hand-off (Step 4) apply to both. The per-backend bullets in\n> Step 3 are **WordPress / WooCommerce / Ecommerce only** — for a webapp follow the Webapp bullet there.\n\n## Step 1 — Pick the framework (guess → default → confirm)\n\n**The rendering is already decided in `brief.md` → Rendering** (SSR or SSG, set during refine). Honour\nit, and the backend constraint:\n\n- **Ecommerce → SSR required** (carts/search need per-request rendering). Any SSR framework works —\n Next.js is the default, not a requirement (Express, Nuxt, SvelteKit, etc. are all fine).\n- **WordPress + WooCommerce → SSR required** (same reason — cart/checkout need per-request rendering).\n- **WordPress → SSG (Astro)** when the brief says SSG, otherwise **SSR (Next.js default)**.\n- **Webapp → the app's own stack.** An **existing app** keeps its current framework (don't impose one), including\n one rebuilt under **Agent designs and builds**; a\n **new app** uses whatever fits the brief (SSR or SPA). Either way it deploys as a Node.js app (Step 8) —\n an SSR app runs a server, a SPA builds to static output.\n- Map rendering → framework: **`ssr` → Next.js**, **`ssg` → Astro** — unless the brief/prompt explicitly\n names another supported framework, in which case use that.\n\nSupported frameworks (what the Hostinger build pipeline can deploy — the `app_type` in Step 8 deploy):\n\n- **Server/SSR-capable:** Next.js, Nuxt.js, Astro, SvelteKit, Express, NestJS, Fastify.\n- **Static / SPA:** React, Vue, Angular, Vite, Parcel, Preact, Svelte, (Astro / SvelteKit static too).\n\nConfirm the framework with the user in one line only if the brief left it open. Record the choice in\n`state.json`:\n\n```json\n{ \"frontend\": { \"framework\": \"nextjs\", \"rendering\": \"ssr\" } }\n```\n\nIf the brief is silent, default to **Next.js SSR**. Ecommerce must be SSR (never SSG) — but the SSR\nframework itself is free to be any supported one, not just Next.js.\n\n## Step 2 — Implement `design.md` (don't re-design)\n\nThe look was already chosen and written by the design step. **Read `~/.hostinger/<domain>/design.md` and\nimplement it faithfully** — tokens (colour, type, spacing), components, per-page composition, imagery and\naccessibility — plus the logo files in `brand/`. Don't re-run design questions or invent a new direction here.\n\n- Treat `design.md` as the contract: the built pages should match its tokens, type scale, components and\n per-page composition, and the 8-point grid / WCAG 2.2 AA rules it carries.\n- Build the **logo** and favicon exactly as `design.md` → **Logo** → *Use* says; never recolour or redraw\n what is in `brand/`.\n- If `design.md` is **missing** (e.g. a resumed older build), fall back to `brief.md → Design direction`\n (reference site, colours, brand, adjectives) and a tasteful, accessible default — but prefer `design.md`\n whenever it exists.\n- **Don't gate on approval here** — the result is shown at **validate** (Step 7).\n\n**Only ask about the code, and only if it matters** (design decisions belong in the design step):\n- Where the **source should live** — default `~/.hostinger/<domain>/src/`; ask only if they want a\n specific folder or an existing repo.\n- **Git** — initialise / connect / push (default: a local project, no remote).\n- A specific **component library** or technical must-have, if they implied one.\n\n## Step 3 — Build against the backend\n\nTwo phases around the instance barrier (see the top-level `SKILL.md`): scaffold + build the shell while\nprovision settles, then wire live data once `provision.status == \"completed\"`.\n\nRead the backend from `site.json`:\n\n- **WordPress** → `urls.rest_api` (`wp/v2`), public read. Content is in the posts/pages/categories/media\n the content-model push created; nav/plan come from `content-model.md`. Map each item's **SEO** from its\n `yoast_head_json` into the page `<head>` (title, description, Open Graph, JSON-LD schema) — Yoast is\n installed by default at provision (`site.json → seo.enabled: true`). If `seo.enabled` is `false`\n (Yoast absent), fall back to generating per-page title/description/OG tags from each item's content.\n - **Decode WordPress text.** WordPress returns titles and names HTML-encoded (`Tea & Cake`,\n `don’t`). Add the `entities` package and, in the one data module, run every title, name\n and SEO field you render as plain text (posts, pages, terms, Yoast, Store API products and\n categories) through `decodeHTML` once; strip an excerpt's tags first if you show it as text.\n Leave HTML fields (`content.rendered`, an excerpt shown as HTML) as they are, and never inject a\n decoded field as raw HTML.\n - **Contact form** (`site.json → contact_form.enabled: true`, any WordPress backend) → render the\n contact page's form and submit it **client-side** to Contact Form 7's public feedback endpoint. Put a\n `submitContactForm(data)` helper in the one data module: build a `FormData` with the field names from\n `contact_form.fields` (e.g. `your-name`, `your-email`, `your-subject`, `your-message`) **plus CF7's\n hidden fields** — `_wpcf7` = `contact_form.form_id`, `_wpcf7_version`, `_wpcf7_locale` (e.g. `en_US`),\n `_wpcf7_unit_tag` (any stable string), `_wpcf7_container_post` = `0` — and `POST` it to\n `contact_form.feedback_url` **without setting `Content-Type`** (let the browser add the multipart\n boundary). `/cms` is same-origin, so no CORS and no secret. Branch on the JSON `status`: `mail_sent`\n → success state; `validation_failed` → map `invalid_fields[].field` to per-input errors;\n `spam`/`aborted`/`mail_failed` → a generic \"couldn't send, try again\" message. Include the honeypot\n decoy field named in `contact_form.honeypot_field` (e.g. `your_website`), rendered hidden/off-screen,\n **empty**, `autocomplete=\"off\"`, `tabindex=\"-1\"` — the deployed spam guard rejects it if filled. A user\n validation error is a **normal UI state, not a build error**. When `contact_form.enabled` is `false` or absent, render the contact page with\n plain contact details and **no form** — graceful, like disabled checkout; never half-build. Full\n contract: `../04-content-model/wordpress/contact-form.md` §3.\n- **WordPress + WooCommerce** (`site.json → woocommerce.enabled: true`) → the WordPress bullet above **plus**\n the store. Read the catalog over the **public WooCommerce Store API** (`site.json → urls.store_api`,\n `/cms/wp-json/wc/store/v1`, no auth, open CORS): `GET /products` (prices are **integer minor units** on\n `prices.price` with `prices.currency_minor_unit` — divide to display), `GET /products/categories`. Cart,\n coupons and checkout are **client-side** against the Store API with the `Nonce` + `Cart-Token` headers\n (`GET /cart`, `POST /cart/add-item`, `/cart/apply-coupon`, `POST /checkout`) — see\n `../04-content-model/wordpress/woocommerce.md`. **Never embed a consumer key client-side**; the\n storefront is fully public. Blog/pages on the same site still come from `urls.rest_api` (`wp/v2`) + Yoast.\n - **Honour `site.json → woocommerce.payment_enabled`.** It is `false` until the owner enables a payment\n gateway + shipping in wp-admin (that config isn't reachable headlessly — see the provision note). While\n `false`, build the full catalog, product pages and the client-side cart as normal, but render a\n graceful disabled-checkout state (e.g. a disabled \"Checkout\" with \"Checkout isn't set up yet\"), **don't\n call `/checkout`**, and don't treat it as a build error. When `true`, wire checkout (`payment_method`\n `\"cod\"` works out of the box).\n- **Ecommerce** → the **public Hostinger Storefront Core V2 API** (`https://api-ecommerce.hostinger.com/v2`,\n no auth, open CORS), keyed on the **custom sales channel** (`site.json → ecommerce.sales_channel.id`):\n `GET /channels/<scha_*>/products` (prices are **minor units** on variants), `POST /channels/<scha_*>/checkout`\n for buying. Cart is client-side; never embed a token. Read\n `ecommerce_miscellaneous_custom-storefront-setup-instructions` for the authoritative, current guide.\n - **Honour `site.json → ecommerce.payment_enabled`.** When it is `false` (free account / no paid\n Ecommerce plan — see the provision gate), there is **no checkout**: build the full catalog, product\n pages and the client-side cart as normal, but **do not call the checkout endpoint**. Instead render\n a clear, graceful state at the checkout step — e.g. a disabled \"Checkout\" button with a short note\n like \"Online checkout isn't available on this plan yet\" (and/or a contact/enquiry fallback). A\n missing checkout is **not** a build error here — never leave the storefront half-built, throw, or\n retry checkout because payment is off. When `payment_enabled` is `true`, wire checkout normally.\n- **Webapp** → **no `content-model.md` and no headless backend to read**. The app uses its own data source:\n the MySQL database from `site.json → database` (through the `DB_*` / `DATABASE_URL` env vars — set at\n provision/deploy, see `../03-provision/webapp/SKILL.md` Step 3; `127.0.0.1` only resolves on the server,\n not locally), or whatever external API the app calls. For an existing app, keep its data layer as-is.\n\nGuidelines (framework-agnostic):\n\n- **One data module** is the single place that talks to the backend (e.g. `src/lib/data.ts`) — one file\n to inspect, one base URL to switch. Keep it swappable so the shell can build against stubs first.\n- **Fetch at request time for SSR** (fresh content, no rebuild); a static build fetches at build time.\n- **A failed or incomplete fetch is an error, not a silent empty/placeholder.** Planned content missing\n from the API is a build error too — a site that builds with holes ships with holes. *(WordPress/Ecommerce;\n a webapp has no planned content to check.)*\n- **`content-model.md` is the source for what should exist** (pages, nav, collections mapping) — for\n WordPress/Ecommerce only; a **webapp has no `content-model.md`**.\n- **No `.htaccess`** in the project (deploy would overwrite the live one); don't commit `node_modules`\n or build output.\n- Set `engines.node` to `22` (the deploy builds on Node 22).\n- **Next.js 16+ only:** set the `build` script to `next build --webpack`, not plain `next build`. Next.js\n 16 defaults `next build` to **Turbopack**, whose native compiler needs a newer glibc than the Hostinger\n build server has, so a Turbopack build fails on deploy and won't fall back to webpack. Webpack builds\n clean there. The `--webpack` flag exists only on Next.js 16+; on **Next.js 15.x** leave the build script\n as plain `next build` (it already defaults to webpack). (Alternative: pin Next.js to `15.x`, keeping\n plain `next build`.)\n\n## Step 4 — Hand off\n\nConfirm the project builds clean locally against the live backend, no placeholder/fixture content\nremains, and `state.json → frontend` matches what you built. Update `state.json` (`stage: \"validate\"`).\nValidate (Step 7) owns the clean rebuild + user preview; deploy (Step 8) ships it with the `app_type`\nand output directory that match the chosen framework + rendering.\n\n> **Webapp:** just confirm the app builds clean and `state.json → frontend` is right — there's no\n> `content-model.md` or headless backend to check. A DB-backed app can't reach its database locally\n> (`127.0.0.1` is server-only), so its data layer is verified **after** deploy, not here.\n"
|
|
266
|
+
"text": "---\nname: headless-step-frontend\ndescription: \"Step 6 (frontend) of the Hostinger Headless flow. Builds the website that renders the backend's content. Figures out (or confirms) the framework — defaulting to Next.js SSR — implements the look already chosen in design.md (the design step's contract), and builds the source into src/. Only ask for the clarifications you actually need.\"\n---\n\n# headless-step-frontend\n\nBuild the site's frontend against the backend from `site.json`, implementing the look the design step\nalready chose and wrote to **`design.md`** (plus the logo in `brand/`). The design is decided; this step\nis where it becomes real code. There's no per-framework recipe — use good judgement, follow `design.md`\nas the contract, and ask only for the clarifications you genuinely need. **Out:** source in the site\nworkspace `~/.hostinger/<domain>/src/`.\n\n> ## ⚠️ Build mode: \"Bring your own frontend\"? Read this first (any backend)\n> Read `brief.md` → **Build mode**. When it is **Bring your own frontend**, the user already has a\n> frontend (the project in the folder the command was run in) and this step **wires it to the backend\n> from `site.json` — it does not scaffold a new project and there is usually no `design.md` to\n> implement** (the design step deferred to the user). **Use their project as the source**: copy or\n> point `~/.hostinger/<domain>/src/` at it, keep its framework and UI, and collaborate on changes at\n> the user's direction (vibe-code with them). Your job is to connect it to the live backend (WordPress\n> `wp/v2` reads, the WooCommerce/Ecommerce Store API, env/keys) and make it deployable (set\n> `engines.node` to `22`, remove any `.htaccess`), then hand off to deploy. This generalises the Webapp\n> \"existing app\" case below to WordPress and Ecommerce too. When **Build mode is \"Agent designs and\n> builds\"**, ignore this box and proceed normally (scaffold + implement `design.md`).\n\n> ## ⚠️ Webapp backend? Read this first\n> A `webapp` brief has **no CMS/store and no `content-model.md`** — the app owns its own data (its own\n> API, or the MySQL database recorded in `site.json → database`). It comes in two shapes, decided back in\n> **refine**:\n>\n> - **An existing app under Build mode \"Bring your own frontend\"** (refine routes \"deploy my app\" here). **Use their\n> project as the source** — copy/point `~/.hostinger/<domain>/src/` at it and keep its own framework and\n> UI. **Do not scaffold a new project, and do not re-implement `design.md` over it** (so **the design\n> step does not apply** to an app that brings its own UI). Your job is only to make it deployable: set\n> `engines.node` to `22`, remove any `.htaccess`, wire its data/env, then hand off to deploy. **Skip the\n> Step 2 design pass**, and ignore the `content-model.md` requirement in Step 3.\n> - **A new app built from the brief.** Scaffold and build it from `brief.md` (and `design.md` if the\n> design step produced one — design *does* run for a from-scratch app). Its data is owned by the app, so\n> there is still **no `content-model.md`** to bind against. An existing app under **Build mode \"Agent\n> designs and builds\"** takes this shape too, but starts from its source: copy the project at\n> `brief.md` → **Existing project** into `~/.hostinger/<domain>/src/`, keep its framework, screens,\n> features and data wiring, and rebuild its UI to `design.md` instead of scaffolding a new project.\n>\n> Framework choice (Step 1), the build, and hand-off (Step 4) apply to both. The per-backend bullets in\n> Step 3 are **WordPress / WooCommerce / Ecommerce only** — for a webapp follow the Webapp bullet there.\n\n## Step 1 — Pick the framework (guess → default → confirm)\n\n**The rendering is already decided in `brief.md` → Rendering** (SSR or SSG, set during refine). Honour\nit, and the backend constraint:\n\n- **Ecommerce → SSR required** (carts/search need per-request rendering). Any SSR framework works —\n Next.js is the default, not a requirement (Express, Nuxt, SvelteKit, etc. are all fine).\n- **WordPress + WooCommerce → SSR required** (same reason — cart/checkout need per-request rendering).\n- **WordPress → SSG (Astro)** when the brief says SSG, otherwise **SSR (Next.js default)**.\n- **Webapp → the app's own stack.** An **existing app** keeps its current framework (don't impose one), including\n one rebuilt under **Agent designs and builds**; a\n **new app** uses whatever fits the brief (SSR or SPA). Either way it deploys as a Node.js app (Step 8) —\n an SSR app runs a server, a SPA builds to static output.\n- Map rendering → framework: **`ssr` → Next.js**, **`ssg` → Astro** — unless the brief/prompt explicitly\n names another supported framework, in which case use that.\n\nSupported frameworks (what the Hostinger build pipeline can deploy — the `app_type` in Step 8 deploy):\n\n- **Server/SSR-capable:** Next.js, Nuxt.js, Astro, SvelteKit, Express, NestJS, Fastify.\n- **Static / SPA:** React, Vue, Angular, Vite, Parcel, Preact, Svelte, (Astro / SvelteKit static too).\n\nConfirm the framework with the user in one line only if the brief left it open. Record the choice in\n`state.json`:\n\n```json\n{ \"frontend\": { \"framework\": \"nextjs\", \"rendering\": \"ssr\" } }\n```\n\nIf the brief is silent, default to **Next.js SSR**. Ecommerce must be SSR (never SSG) — but the SSR\nframework itself is free to be any supported one, not just Next.js.\n\n## Step 2 — Implement `design.md` (don't re-design)\n\nThe look was already chosen and written by the design step. **Read `~/.hostinger/<domain>/design.md` and\nimplement it faithfully** — tokens (colour, type, spacing), components, per-page composition, imagery and\naccessibility — plus the logo files in `brand/`. Don't re-run design questions or invent a new direction here.\n\n- Treat `design.md` as the contract: the built pages should match its tokens, type scale, components and\n per-page composition, and the 8-point grid / WCAG 2.2 AA rules it carries.\n- Build the **logo** and favicon exactly as `design.md` → **Logo** → *Use* says; never recolour or redraw\n what is in `brand/`.\n- If `design.md` is **missing** (e.g. a resumed older build), fall back to `brief.md → Design direction`\n (reference site, colours, brand, adjectives) and a tasteful, accessible default — but prefer `design.md`\n whenever it exists.\n- **Don't gate on approval here** — the result is shown at **validate** (Step 7).\n\n**Only ask about the code, and only if it matters** (design decisions belong in the design step):\n- Where the **source should live** — default `~/.hostinger/<domain>/src/`; ask only if they want a\n specific folder or an existing repo.\n- **Git** — initialise / connect / push (default: a local project, no remote).\n- A specific **component library** or technical must-have, if they implied one.\n\n## Step 3 — Build against the backend\n\nTwo phases around the instance barrier (see the top-level `SKILL.md`): scaffold + build the shell while\nprovision settles, then wire live data once `provision.status == \"completed\"`.\n\nRead the backend from `site.json`:\n\n- **WordPress** → `urls.rest_api` (`wp/v2`), public read. Content is in the posts/pages/categories/media\n the content-model push created; nav/plan come from `content-model.md`. Map each item's **SEO** from its\n `yoast_head_json` into the page `<head>` (title, description, Open Graph, JSON-LD schema) — Yoast is\n installed by default at provision (`site.json → seo.enabled: true`). If `seo.enabled` is `false`\n (Yoast absent), fall back to generating per-page title/description/OG tags from each item's content.\n - **Decode WordPress text.** WordPress returns titles and names HTML-encoded (`Tea & Cake`,\n `don’t`). Add the `entities` package and, in the one data module, run every title, name\n and SEO field you render as plain text (posts, pages, terms, Yoast, Store API products and\n categories) through `decodeHTML` once; strip an excerpt's tags first if you show it as text.\n Leave HTML fields (`content.rendered`, an excerpt shown as HTML) as they are, and never inject a\n decoded field as raw HTML.\n - **Contact form** (`site.json → contact_form.enabled: true`, any WordPress backend) → render the\n contact page's form and submit it **client-side** to Contact Form 7's public feedback endpoint. Put a\n `submitContactForm(data)` helper in the one data module: build a `FormData` with the field names from\n `contact_form.fields` (e.g. `your-name`, `your-email`, `your-subject`, `your-message`) **plus CF7's\n hidden fields** — `_wpcf7` = `contact_form.form_id`, `_wpcf7_version`, `_wpcf7_locale` (e.g. `en_US`),\n `_wpcf7_unit_tag` (any stable string), `_wpcf7_container_post` = `0` — and `POST` it to\n `contact_form.feedback_url` **without setting `Content-Type`** (let the browser add the multipart\n boundary). `/cms` is same-origin, so no CORS and no secret. Branch on the JSON `status`: `mail_sent`\n → success state; `validation_failed` → map `invalid_fields[].field` to per-input errors;\n `spam`/`aborted`/`mail_failed` → a generic \"couldn't send, try again\" message. Include the honeypot\n decoy field named in `contact_form.honeypot_field` (e.g. `your_website`), rendered hidden/off-screen,\n **empty**, `autocomplete=\"off\"`, `tabindex=\"-1\"` — the deployed spam guard rejects it if filled. A user\n validation error is a **normal UI state, not a build error**. When `contact_form.enabled` is `false` or absent, render the contact page with\n plain contact details and **no form** — graceful, like disabled checkout; never half-build. Full\n contract: `../04-content-model/wordpress/contact-form.md` §3.\n- **WordPress + WooCommerce** (`site.json → woocommerce.enabled: true`) → the WordPress bullet above **plus**\n the store. Read the catalog over the **public WooCommerce Store API** (`site.json → urls.store_api`,\n `/cms/wp-json/wc/store/v1`, no auth, open CORS): `GET /products` (prices are **integer minor units** on\n `prices.price` with `prices.currency_minor_unit` — divide to display), `GET /products/categories`. Cart,\n coupons and checkout are **client-side** against the Store API with the `Nonce` + `Cart-Token` headers\n (`GET /cart`, `POST /cart/add-item`, `/cart/apply-coupon`, `POST /checkout`) — see\n `../04-content-model/wordpress/woocommerce.md`. **Never embed a consumer key client-side**; the\n storefront is fully public. Blog/pages on the same site still come from `urls.rest_api` (`wp/v2`) + Yoast.\n - **Honour `site.json → woocommerce.payment_enabled`.** It is `false` until the owner enables a payment\n gateway + shipping in wp-admin (that config isn't reachable headlessly — see the provision note). While\n `false`, build the full catalog, product pages and the client-side cart as normal, but render a\n graceful disabled-checkout state (e.g. a disabled \"Checkout\" with \"Checkout isn't set up yet\"), **don't\n call `/checkout`**, and don't treat it as a build error. When `true`, wire checkout (`payment_method`\n `\"cod\"` works out of the box).\n- **Ecommerce** → the **public Hostinger Storefront Core V2 API** (`https://api-ecommerce.hostinger.com/v2`,\n no auth, open CORS), keyed on the **custom sales channel** (`site.json → ecommerce.sales_channel.id`):\n `GET /channels/<scha_*>/products` (prices are **minor units** on variants), `POST /channels/<scha_*>/checkout`\n for buying. Cart is client-side; never embed a token. Read\n `ecommerce_miscellaneous_custom-storefront-setup-instructions` for the authoritative, current guide.\n - **Honour `site.json → ecommerce.payment_enabled`.** When it is `false` (free account / no paid\n Ecommerce plan — see the provision gate), there is **no checkout**: build the full catalog, product\n pages and the client-side cart as normal, but **do not call the checkout endpoint**. Instead render\n a clear, graceful state at the checkout step — e.g. a disabled \"Checkout\" button with a short note\n like \"Online checkout isn't available on this plan yet\" (and/or a contact/enquiry fallback). A\n missing checkout is **not** a build error here — never leave the storefront half-built, throw, or\n retry checkout because payment is off. When `payment_enabled` is `true`, wire checkout normally.\n- **Webapp** → **no `content-model.md` and no headless backend to read**. The app uses its own data source:\n the MySQL database from `site.json → database` (through the `DB_*` / `DATABASE_URL` env vars — set at\n provision/deploy, see `../03-provision/webapp/SKILL.md` Step 3; `127.0.0.1` only resolves on the server,\n not locally), or whatever external API the app calls. For an existing app, keep its data layer as-is.\n\nGuidelines (framework-agnostic):\n\n- **One data module** is the single place that talks to the backend (e.g. `src/lib/data.ts`) — one file\n to inspect, one base URL to switch. Keep it swappable so the shell can build against stubs first.\n- **Fetch at request time for SSR** (fresh content, no rebuild); a static build fetches at build time.\n- **A failed or incomplete fetch is an error, not a silent empty/placeholder.** Planned content missing\n from the API is a build error too — a site that builds with holes ships with holes. *(WordPress/Ecommerce;\n a webapp has no planned content to check.)*\n- **`content-model.md` is the source for what should exist** (pages, nav, collections mapping) — for\n WordPress/Ecommerce only; a **webapp has no `content-model.md`**.\n- **No `.htaccess`** in the project (deploy would overwrite the live one); don't commit `node_modules`\n or build output.\n- Set `engines.node` to `22` (the deploy builds on Node 22).\n- **Next.js 16+ only:** set the `build` script to `next build --webpack`, not plain `next build`. Next.js\n 16 defaults `next build` to **Turbopack**, whose native compiler needs a newer glibc than the Hostinger\n build server has, so a Turbopack build fails on deploy and won't fall back to webpack. Webpack builds\n clean there. The `--webpack` flag exists only on Next.js 16+; on **Next.js 15.x** leave the build script\n as plain `next build` (it already defaults to webpack). (Alternative: pin Next.js to `15.x`, keeping\n plain `next build`.)\n\n## Step 4 — Hand off\n\nConfirm the project builds clean locally against the live backend, looks right at desktop and phone\nwidth (below), no placeholder/fixture content remains, and `state.json → frontend` matches what you\nbuilt. Update `state.json` (`stage: \"validate\"`).\nValidate (Step 7) owns the clean rebuild + user preview; deploy (Step 8) ships it with the `app_type`\nand output directory that match the chosen framework + rendering.\n\n**Visual check.** With the site running locally against the live backend, look at the home page and one\npage of each template (e.g. a post, a product, the contact page) at desktop and phone width. Take all the\nscreenshots first, then open them all in one turn where your tool can open several images at once, since\neach separate look costs a model turn. Don't tile several pages onto one image or take one tall\nfull-page shot: the viewer shrinks big images, and a shrunk page hides small bugs like a wrapped line.\nAfter a fix, re-shoot only what changed. Phone width is where most layout bugs show. Headless Chrome\nwon't size a window below ~500 px, so a phone-width window comes back cropped: set a 390 px viewport\n(e.g. Playwright), or put one route in 1280 px and 390 px iframes side by side on a local page to get\nboth widths in one image. The live site runs this same build, so it needs no screenshots; deploy checks\nthat it serves.\n\n> **Webapp:** just confirm the app builds clean and `state.json → frontend` is right — there's no\n> `content-model.md` or headless backend to check. A DB-backed app can't reach its database locally\n> (`127.0.0.1` is server-only), so its data layer is verified **after** deploy, not here.\n"
|
|
267
267
|
},
|
|
268
268
|
{
|
|
269
269
|
"uri": "skill://hostinger-headless/steps/07-validate/SKILL.md",
|
|
270
|
-
"digest": "sha256:
|
|
271
|
-
"size":
|
|
270
|
+
"digest": "sha256:c99acbf4ad77166cb9c5769d04c5c1aa60a1d5984ee535beb693d4e419431983",
|
|
271
|
+
"size": 4882,
|
|
272
272
|
"mimeType": "text/markdown",
|
|
273
|
-
"text": "---\nname: headless-step-validate\ndescription: \"Step 7 (validate) of the Hostinger Headless flow. OPTIONAL quick gate before deploy: every prior stage already self-verifies, so this is a fast confirmation (instance live + backend API answers with seeded content) plus optional local preview and user sign-off. Skip the heavy parts when nobody needs to approve.\"\n---\n\n# headless-step-validate\n\n> **Optional / fast.** Every stage before this one already verifies its own work (provision checks the\n> backend, content-model push checks the REST counts, frontend builds clean), and **deploy verifies the
|
|
273
|
+
"text": "---\nname: headless-step-validate\ndescription: \"Step 7 (validate) of the Hostinger Headless flow. OPTIONAL quick gate before deploy: every prior stage already self-verifies, so this is a fast confirmation (instance live + backend API answers with seeded content) plus optional local preview and user sign-off. Skip the heavy parts when nobody needs to approve.\"\n---\n\n# headless-step-validate\n\n> **Optional / fast.** Every stage before this one already verifies its own work (provision checks the\n> backend, content-model push checks the REST counts, frontend builds clean and looks right at desktop\n> and phone width), and **deploy verifies the live result**. So validate is **not** a re-run of all\n> that — it's a quick confirmation, plus the optional human preview/sign-off. **Skip Steps 3–4 (rebuild + approval) entirely** on an autonomous or\n> temp-domain run where no one is signing off; just do the two 10-second checks below and move on. Spend\n> time here only when a person wants to see it before it goes live.\n\n**In:** project in `~/.hostinger/<domain>/src/`, `site.json`, `state.json`.\n\n## 1 — Instance status (always, quick)\n\n`provision.status == \"completed\"` in `state.json`. Anything else → not ready; return to the instance\nbarrier, don't deploy. Deploy's pre-flight asks the connector again (see *State and artifacts* in the\ntop-level `SKILL.md`).\n\n## 2 — Backend API status (WordPress / WooCommerce / Ecommerce, always, quick)\n\nHit the live API from `site.json` and confirm it answers **with the content the push created** — a 200\nwith an empty catalog means the push didn't land:\n\n- **WordPress:** `GET {urls.rest_api}/posts?per_page=1` → 200 JSON array; check `X-WP-Total` against the\n planned post count, and `GET {urls.rest_api}/media?per_page=1` → `X-WP-Total` matches the planned\n image count (more = duplicates).\n- **WordPress + WooCommerce** (`site.json → woocommerce.enabled`): the WordPress check above **plus**\n `GET {urls.store_api}/products?per_page=100` → 200 with the seeded products and `prices` (minor units);\n count matches the plan. Don't test checkout while `woocommerce.payment_enabled` is `false`.\n- **Ecommerce:** query `urls.storefront_api` for the sales channel → 200 with the seeded products and\n prices *(confirm against the store)*.\n- **Contact form** (`site.json → contact_form.enabled`): POST one throwaway test submission (dummy\n name/email/subject/message + CF7's hidden `_wpcf7*` fields — see\n `../04-content-model/wordpress/contact-form.md` §3) to `contact_form.feedback_url` and assert the JSON\n `status` is **`mail_sent`**. This is the one place a real send happens, so one test email reaches the\n owner — not several. `mail_failed` is a real finding: surface it to the user (CF7 is wired, but\n `wp_mail` delivery/SPF needs attention — a Hostinger mailbox on the domain is the most reliable\n recipient) and log it as an issue. A `validation_failed` means the test payload didn't match the form's\n fields — fix the field names in `site.json`, not the plugin.\n **Then check the honeypot:** POST a **second** throwaway submission with the same valid fields **plus**\n `contact_form.honeypot_field` **filled**, and assert the `status` is **`spam`** (no mail sent). Keep the\n real fields valid — CF7 validates **before** running the spam filter, so an invalid payload would return\n `validation_failed` and never reach the honeypot check. A `mail_sent` here means the\n `cf7-headless-spamguard` plugin isn't active — surface it and re-check its deploy.\n\nFail or counts off → fix content-model push before building against live data.\n\n## 3 — Clean rebuild against the live API (optional — skip unless signing off)\n\nFrontend already produced a clean build; only redo this if you want a from-scratch guarantee before a\nhuman sign-off. Remove the build output and rebuild; a failed or incomplete build is a stop (no\nfixtures, placeholder copy or `.htaccess` in the output).\n\n- **Astro (SSG):** `rm -rf dist && npm run build && npm run check:dist`.\n- **Next.js (SSR):** `rm -rf .next && npm run check && npm run build`.\n\n## 4 — Preview & approval (optional — only when a person is signing off)\n\nWhen someone wants to see it first: start the local preview (Astro: `npm run preview`; Next.js:\n`npx next start`), show the user a couple of key routes at desktop and phone width (capture phone width\nas in frontend's *Visual check*; frontend already caught the layout bugs, so this is for the user, not a\nre-review) and navigation, and present it for **explicit approval**. If preview tooling is unavailable,\ngive the user the command and URL. On an autonomous or temp-domain run, skip this — deploy will verify the live result anyway.\n\nThen (after approval, or immediately if 3–4 were skipped): `state.json` → `stage: \"deploy\"`, fresh\n`updated_at`; leave `provision` unchanged.\n"
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
276
|
"uri": "skill://hostinger-headless/steps/08-deploy/SKILL.md",
|
package/src/core/skills.ts
CHANGED
|
@@ -274,17 +274,17 @@ const skills: Skill[] = [
|
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
276
|
"uri": "skill://hostinger-headless/steps/06-frontend/SKILL.md",
|
|
277
|
-
"digest": "sha256:
|
|
278
|
-
"size":
|
|
277
|
+
"digest": "sha256:54e8925e3ccc05992cb01557a8c1480424b594533513a127bfe2ebb7c256fdf5",
|
|
278
|
+
"size": 15959,
|
|
279
279
|
"mimeType": "text/markdown",
|
|
280
|
-
"text": "---\nname: headless-step-frontend\ndescription: \"Step 6 (frontend) of the Hostinger Headless flow. Builds the website that renders the backend's content. Figures out (or confirms) the framework — defaulting to Next.js SSR — implements the look already chosen in design.md (the design step's contract), and builds the source into src/. Only ask for the clarifications you actually need.\"\n---\n\n# headless-step-frontend\n\nBuild the site's frontend against the backend from `site.json`, implementing the look the design step\nalready chose and wrote to **`design.md`** (plus the logo in `brand/`). The design is decided; this step\nis where it becomes real code. There's no per-framework recipe — use good judgement, follow `design.md`\nas the contract, and ask only for the clarifications you genuinely need. **Out:** source in the site\nworkspace `~/.hostinger/<domain>/src/`.\n\n> ## ⚠️ Build mode: \"Bring your own frontend\"? Read this first (any backend)\n> Read `brief.md` → **Build mode**. When it is **Bring your own frontend**, the user already has a\n> frontend (the project in the folder the command was run in) and this step **wires it to the backend\n> from `site.json` — it does not scaffold a new project and there is usually no `design.md` to\n> implement** (the design step deferred to the user). **Use their project as the source**: copy or\n> point `~/.hostinger/<domain>/src/` at it, keep its framework and UI, and collaborate on changes at\n> the user's direction (vibe-code with them). Your job is to connect it to the live backend (WordPress\n> `wp/v2` reads, the WooCommerce/Ecommerce Store API, env/keys) and make it deployable (set\n> `engines.node` to `22`, remove any `.htaccess`), then hand off to deploy. This generalises the Webapp\n> \"existing app\" case below to WordPress and Ecommerce too. When **Build mode is \"Agent designs and\n> builds\"**, ignore this box and proceed normally (scaffold + implement `design.md`).\n\n> ## ⚠️ Webapp backend? Read this first\n> A `webapp` brief has **no CMS/store and no `content-model.md`** — the app owns its own data (its own\n> API, or the MySQL database recorded in `site.json → database`). It comes in two shapes, decided back in\n> **refine**:\n>\n> - **An existing app under Build mode \"Bring your own frontend\"** (refine routes \"deploy my app\" here). **Use their\n> project as the source** — copy/point `~/.hostinger/<domain>/src/` at it and keep its own framework and\n> UI. **Do not scaffold a new project, and do not re-implement `design.md` over it** (so **the design\n> step does not apply** to an app that brings its own UI). Your job is only to make it deployable: set\n> `engines.node` to `22`, remove any `.htaccess`, wire its data/env, then hand off to deploy. **Skip the\n> Step 2 design pass**, and ignore the `content-model.md` requirement in Step 3.\n> - **A new app built from the brief.** Scaffold and build it from `brief.md` (and `design.md` if the\n> design step produced one — design *does* run for a from-scratch app). Its data is owned by the app, so\n> there is still **no `content-model.md`** to bind against. An existing app under **Build mode \"Agent\n> designs and builds\"** takes this shape too, but starts from its source: copy the project at\n> `brief.md` → **Existing project** into `~/.hostinger/<domain>/src/`, keep its framework, screens,\n> features and data wiring, and rebuild its UI to `design.md` instead of scaffolding a new project.\n>\n> Framework choice (Step 1), the build, and hand-off (Step 4) apply to both. The per-backend bullets in\n> Step 3 are **WordPress / WooCommerce / Ecommerce only** — for a webapp follow the Webapp bullet there.\n\n## Step 1 — Pick the framework (guess → default → confirm)\n\n**The rendering is already decided in `brief.md` → Rendering** (SSR or SSG, set during refine). Honour\nit, and the backend constraint:\n\n- **Ecommerce → SSR required** (carts/search need per-request rendering). Any SSR framework works —\n Next.js is the default, not a requirement (Express, Nuxt, SvelteKit, etc. are all fine).\n- **WordPress + WooCommerce → SSR required** (same reason — cart/checkout need per-request rendering).\n- **WordPress → SSG (Astro)** when the brief says SSG, otherwise **SSR (Next.js default)**.\n- **Webapp → the app's own stack.** An **existing app** keeps its current framework (don't impose one), including\n one rebuilt under **Agent designs and builds**; a\n **new app** uses whatever fits the brief (SSR or SPA). Either way it deploys as a Node.js app (Step 8) —\n an SSR app runs a server, a SPA builds to static output.\n- Map rendering → framework: **`ssr` → Next.js**, **`ssg` → Astro** — unless the brief/prompt explicitly\n names another supported framework, in which case use that.\n\nSupported frameworks (what the Hostinger build pipeline can deploy — the `app_type` in Step 8 deploy):\n\n- **Server/SSR-capable:** Next.js, Nuxt.js, Astro, SvelteKit, Express, NestJS, Fastify.\n- **Static / SPA:** React, Vue, Angular, Vite, Parcel, Preact, Svelte, (Astro / SvelteKit static too).\n\nConfirm the framework with the user in one line only if the brief left it open. Record the choice in\n`state.json`:\n\n```json\n{ \"frontend\": { \"framework\": \"nextjs\", \"rendering\": \"ssr\" } }\n```\n\nIf the brief is silent, default to **Next.js SSR**. Ecommerce must be SSR (never SSG) — but the SSR\nframework itself is free to be any supported one, not just Next.js.\n\n## Step 2 — Implement `design.md` (don't re-design)\n\nThe look was already chosen and written by the design step. **Read `~/.hostinger/<domain>/design.md` and\nimplement it faithfully** — tokens (colour, type, spacing), components, per-page composition, imagery and\naccessibility — plus the logo files in `brand/`. Don't re-run design questions or invent a new direction here.\n\n- Treat `design.md` as the contract: the built pages should match its tokens, type scale, components and\n per-page composition, and the 8-point grid / WCAG 2.2 AA rules it carries.\n- Build the **logo** and favicon exactly as `design.md` → **Logo** → *Use* says; never recolour or redraw\n what is in `brand/`.\n- If `design.md` is **missing** (e.g. a resumed older build), fall back to `brief.md → Design direction`\n (reference site, colours, brand, adjectives) and a tasteful, accessible default — but prefer `design.md`\n whenever it exists.\n- **Don't gate on approval here** — the result is shown at **validate** (Step 7).\n\n**Only ask about the code, and only if it matters** (design decisions belong in the design step):\n- Where the **source should live** — default `~/.hostinger/<domain>/src/`; ask only if they want a\n specific folder or an existing repo.\n- **Git** — initialise / connect / push (default: a local project, no remote).\n- A specific **component library** or technical must-have, if they implied one.\n\n## Step 3 — Build against the backend\n\nTwo phases around the instance barrier (see the top-level `SKILL.md`): scaffold + build the shell while\nprovision settles, then wire live data once `provision.status == \"completed\"`.\n\nRead the backend from `site.json`:\n\n- **WordPress** → `urls.rest_api` (`wp/v2`), public read. Content is in the posts/pages/categories/media\n the content-model push created; nav/plan come from `content-model.md`. Map each item's **SEO** from its\n `yoast_head_json` into the page `<head>` (title, description, Open Graph, JSON-LD schema) — Yoast is\n installed by default at provision (`site.json → seo.enabled: true`). If `seo.enabled` is `false`\n (Yoast absent), fall back to generating per-page title/description/OG tags from each item's content.\n - **Decode WordPress text.** WordPress returns titles and names HTML-encoded (`Tea & Cake`,\n `don’t`). Add the `entities` package and, in the one data module, run every title, name\n and SEO field you render as plain text (posts, pages, terms, Yoast, Store API products and\n categories) through `decodeHTML` once; strip an excerpt's tags first if you show it as text.\n Leave HTML fields (`content.rendered`, an excerpt shown as HTML) as they are, and never inject a\n decoded field as raw HTML.\n - **Contact form** (`site.json → contact_form.enabled: true`, any WordPress backend) → render the\n contact page's form and submit it **client-side** to Contact Form 7's public feedback endpoint. Put a\n `submitContactForm(data)` helper in the one data module: build a `FormData` with the field names from\n `contact_form.fields` (e.g. `your-name`, `your-email`, `your-subject`, `your-message`) **plus CF7's\n hidden fields** — `_wpcf7` = `contact_form.form_id`, `_wpcf7_version`, `_wpcf7_locale` (e.g. `en_US`),\n `_wpcf7_unit_tag` (any stable string), `_wpcf7_container_post` = `0` — and `POST` it to\n `contact_form.feedback_url` **without setting `Content-Type`** (let the browser add the multipart\n boundary). `/cms` is same-origin, so no CORS and no secret. Branch on the JSON `status`: `mail_sent`\n → success state; `validation_failed` → map `invalid_fields[].field` to per-input errors;\n `spam`/`aborted`/`mail_failed` → a generic \"couldn't send, try again\" message. Include the honeypot\n decoy field named in `contact_form.honeypot_field` (e.g. `your_website`), rendered hidden/off-screen,\n **empty**, `autocomplete=\"off\"`, `tabindex=\"-1\"` — the deployed spam guard rejects it if filled. A user\n validation error is a **normal UI state, not a build error**. When `contact_form.enabled` is `false` or absent, render the contact page with\n plain contact details and **no form** — graceful, like disabled checkout; never half-build. Full\n contract: `../04-content-model/wordpress/contact-form.md` §3.\n- **WordPress + WooCommerce** (`site.json → woocommerce.enabled: true`) → the WordPress bullet above **plus**\n the store. Read the catalog over the **public WooCommerce Store API** (`site.json → urls.store_api`,\n `/cms/wp-json/wc/store/v1`, no auth, open CORS): `GET /products` (prices are **integer minor units** on\n `prices.price` with `prices.currency_minor_unit` — divide to display), `GET /products/categories`. Cart,\n coupons and checkout are **client-side** against the Store API with the `Nonce` + `Cart-Token` headers\n (`GET /cart`, `POST /cart/add-item`, `/cart/apply-coupon`, `POST /checkout`) — see\n `../04-content-model/wordpress/woocommerce.md`. **Never embed a consumer key client-side**; the\n storefront is fully public. Blog/pages on the same site still come from `urls.rest_api` (`wp/v2`) + Yoast.\n - **Honour `site.json → woocommerce.payment_enabled`.** It is `false` until the owner enables a payment\n gateway + shipping in wp-admin (that config isn't reachable headlessly — see the provision note). While\n `false`, build the full catalog, product pages and the client-side cart as normal, but render a\n graceful disabled-checkout state (e.g. a disabled \"Checkout\" with \"Checkout isn't set up yet\"), **don't\n call `/checkout`**, and don't treat it as a build error. When `true`, wire checkout (`payment_method`\n `\"cod\"` works out of the box).\n- **Ecommerce** → the **public Hostinger Storefront Core V2 API** (`https://api-ecommerce.hostinger.com/v2`,\n no auth, open CORS), keyed on the **custom sales channel** (`site.json → ecommerce.sales_channel.id`):\n `GET /channels/<scha_*>/products` (prices are **minor units** on variants), `POST /channels/<scha_*>/checkout`\n for buying. Cart is client-side; never embed a token. Read\n `ecommerce_miscellaneous_custom-storefront-setup-instructions` for the authoritative, current guide.\n - **Honour `site.json → ecommerce.payment_enabled`.** When it is `false` (free account / no paid\n Ecommerce plan — see the provision gate), there is **no checkout**: build the full catalog, product\n pages and the client-side cart as normal, but **do not call the checkout endpoint**. Instead render\n a clear, graceful state at the checkout step — e.g. a disabled \"Checkout\" button with a short note\n like \"Online checkout isn't available on this plan yet\" (and/or a contact/enquiry fallback). A\n missing checkout is **not** a build error here — never leave the storefront half-built, throw, or\n retry checkout because payment is off. When `payment_enabled` is `true`, wire checkout normally.\n- **Webapp** → **no `content-model.md` and no headless backend to read**. The app uses its own data source:\n the MySQL database from `site.json → database` (through the `DB_*` / `DATABASE_URL` env vars — set at\n provision/deploy, see `../03-provision/webapp/SKILL.md` Step 3; `127.0.0.1` only resolves on the server,\n not locally), or whatever external API the app calls. For an existing app, keep its data layer as-is.\n\nGuidelines (framework-agnostic):\n\n- **One data module** is the single place that talks to the backend (e.g. `src/lib/data.ts`) — one file\n to inspect, one base URL to switch. Keep it swappable so the shell can build against stubs first.\n- **Fetch at request time for SSR** (fresh content, no rebuild); a static build fetches at build time.\n- **A failed or incomplete fetch is an error, not a silent empty/placeholder.** Planned content missing\n from the API is a build error too — a site that builds with holes ships with holes. *(WordPress/Ecommerce;\n a webapp has no planned content to check.)*\n- **`content-model.md` is the source for what should exist** (pages, nav, collections mapping) — for\n WordPress/Ecommerce only; a **webapp has no `content-model.md`**.\n- **No `.htaccess`** in the project (deploy would overwrite the live one); don't commit `node_modules`\n or build output.\n- Set `engines.node` to `22` (the deploy builds on Node 22).\n- **Next.js 16+ only:** set the `build` script to `next build --webpack`, not plain `next build`. Next.js\n 16 defaults `next build` to **Turbopack**, whose native compiler needs a newer glibc than the Hostinger\n build server has, so a Turbopack build fails on deploy and won't fall back to webpack. Webpack builds\n clean there. The `--webpack` flag exists only on Next.js 16+; on **Next.js 15.x** leave the build script\n as plain `next build` (it already defaults to webpack). (Alternative: pin Next.js to `15.x`, keeping\n plain `next build`.)\n\n## Step 4 — Hand off\n\nConfirm the project builds clean locally against the live backend, no placeholder/fixture content\nremains, and `state.json → frontend` matches what you built. Update `state.json` (`stage: \"validate\"`).\nValidate (Step 7) owns the clean rebuild + user preview; deploy (Step 8) ships it with the `app_type`\nand output directory that match the chosen framework + rendering.\n\n> **Webapp:** just confirm the app builds clean and `state.json → frontend` is right — there's no\n> `content-model.md` or headless backend to check. A DB-backed app can't reach its database locally\n> (`127.0.0.1` is server-only), so its data layer is verified **after** deploy, not here.\n"
|
|
280
|
+
"text": "---\nname: headless-step-frontend\ndescription: \"Step 6 (frontend) of the Hostinger Headless flow. Builds the website that renders the backend's content. Figures out (or confirms) the framework — defaulting to Next.js SSR — implements the look already chosen in design.md (the design step's contract), and builds the source into src/. Only ask for the clarifications you actually need.\"\n---\n\n# headless-step-frontend\n\nBuild the site's frontend against the backend from `site.json`, implementing the look the design step\nalready chose and wrote to **`design.md`** (plus the logo in `brand/`). The design is decided; this step\nis where it becomes real code. There's no per-framework recipe — use good judgement, follow `design.md`\nas the contract, and ask only for the clarifications you genuinely need. **Out:** source in the site\nworkspace `~/.hostinger/<domain>/src/`.\n\n> ## ⚠️ Build mode: \"Bring your own frontend\"? Read this first (any backend)\n> Read `brief.md` → **Build mode**. When it is **Bring your own frontend**, the user already has a\n> frontend (the project in the folder the command was run in) and this step **wires it to the backend\n> from `site.json` — it does not scaffold a new project and there is usually no `design.md` to\n> implement** (the design step deferred to the user). **Use their project as the source**: copy or\n> point `~/.hostinger/<domain>/src/` at it, keep its framework and UI, and collaborate on changes at\n> the user's direction (vibe-code with them). Your job is to connect it to the live backend (WordPress\n> `wp/v2` reads, the WooCommerce/Ecommerce Store API, env/keys) and make it deployable (set\n> `engines.node` to `22`, remove any `.htaccess`), then hand off to deploy. This generalises the Webapp\n> \"existing app\" case below to WordPress and Ecommerce too. When **Build mode is \"Agent designs and\n> builds\"**, ignore this box and proceed normally (scaffold + implement `design.md`).\n\n> ## ⚠️ Webapp backend? Read this first\n> A `webapp` brief has **no CMS/store and no `content-model.md`** — the app owns its own data (its own\n> API, or the MySQL database recorded in `site.json → database`). It comes in two shapes, decided back in\n> **refine**:\n>\n> - **An existing app under Build mode \"Bring your own frontend\"** (refine routes \"deploy my app\" here). **Use their\n> project as the source** — copy/point `~/.hostinger/<domain>/src/` at it and keep its own framework and\n> UI. **Do not scaffold a new project, and do not re-implement `design.md` over it** (so **the design\n> step does not apply** to an app that brings its own UI). Your job is only to make it deployable: set\n> `engines.node` to `22`, remove any `.htaccess`, wire its data/env, then hand off to deploy. **Skip the\n> Step 2 design pass**, and ignore the `content-model.md` requirement in Step 3.\n> - **A new app built from the brief.** Scaffold and build it from `brief.md` (and `design.md` if the\n> design step produced one — design *does* run for a from-scratch app). Its data is owned by the app, so\n> there is still **no `content-model.md`** to bind against. An existing app under **Build mode \"Agent\n> designs and builds\"** takes this shape too, but starts from its source: copy the project at\n> `brief.md` → **Existing project** into `~/.hostinger/<domain>/src/`, keep its framework, screens,\n> features and data wiring, and rebuild its UI to `design.md` instead of scaffolding a new project.\n>\n> Framework choice (Step 1), the build, and hand-off (Step 4) apply to both. The per-backend bullets in\n> Step 3 are **WordPress / WooCommerce / Ecommerce only** — for a webapp follow the Webapp bullet there.\n\n## Step 1 — Pick the framework (guess → default → confirm)\n\n**The rendering is already decided in `brief.md` → Rendering** (SSR or SSG, set during refine). Honour\nit, and the backend constraint:\n\n- **Ecommerce → SSR required** (carts/search need per-request rendering). Any SSR framework works —\n Next.js is the default, not a requirement (Express, Nuxt, SvelteKit, etc. are all fine).\n- **WordPress + WooCommerce → SSR required** (same reason — cart/checkout need per-request rendering).\n- **WordPress → SSG (Astro)** when the brief says SSG, otherwise **SSR (Next.js default)**.\n- **Webapp → the app's own stack.** An **existing app** keeps its current framework (don't impose one), including\n one rebuilt under **Agent designs and builds**; a\n **new app** uses whatever fits the brief (SSR or SPA). Either way it deploys as a Node.js app (Step 8) —\n an SSR app runs a server, a SPA builds to static output.\n- Map rendering → framework: **`ssr` → Next.js**, **`ssg` → Astro** — unless the brief/prompt explicitly\n names another supported framework, in which case use that.\n\nSupported frameworks (what the Hostinger build pipeline can deploy — the `app_type` in Step 8 deploy):\n\n- **Server/SSR-capable:** Next.js, Nuxt.js, Astro, SvelteKit, Express, NestJS, Fastify.\n- **Static / SPA:** React, Vue, Angular, Vite, Parcel, Preact, Svelte, (Astro / SvelteKit static too).\n\nConfirm the framework with the user in one line only if the brief left it open. Record the choice in\n`state.json`:\n\n```json\n{ \"frontend\": { \"framework\": \"nextjs\", \"rendering\": \"ssr\" } }\n```\n\nIf the brief is silent, default to **Next.js SSR**. Ecommerce must be SSR (never SSG) — but the SSR\nframework itself is free to be any supported one, not just Next.js.\n\n## Step 2 — Implement `design.md` (don't re-design)\n\nThe look was already chosen and written by the design step. **Read `~/.hostinger/<domain>/design.md` and\nimplement it faithfully** — tokens (colour, type, spacing), components, per-page composition, imagery and\naccessibility — plus the logo files in `brand/`. Don't re-run design questions or invent a new direction here.\n\n- Treat `design.md` as the contract: the built pages should match its tokens, type scale, components and\n per-page composition, and the 8-point grid / WCAG 2.2 AA rules it carries.\n- Build the **logo** and favicon exactly as `design.md` → **Logo** → *Use* says; never recolour or redraw\n what is in `brand/`.\n- If `design.md` is **missing** (e.g. a resumed older build), fall back to `brief.md → Design direction`\n (reference site, colours, brand, adjectives) and a tasteful, accessible default — but prefer `design.md`\n whenever it exists.\n- **Don't gate on approval here** — the result is shown at **validate** (Step 7).\n\n**Only ask about the code, and only if it matters** (design decisions belong in the design step):\n- Where the **source should live** — default `~/.hostinger/<domain>/src/`; ask only if they want a\n specific folder or an existing repo.\n- **Git** — initialise / connect / push (default: a local project, no remote).\n- A specific **component library** or technical must-have, if they implied one.\n\n## Step 3 — Build against the backend\n\nTwo phases around the instance barrier (see the top-level `SKILL.md`): scaffold + build the shell while\nprovision settles, then wire live data once `provision.status == \"completed\"`.\n\nRead the backend from `site.json`:\n\n- **WordPress** → `urls.rest_api` (`wp/v2`), public read. Content is in the posts/pages/categories/media\n the content-model push created; nav/plan come from `content-model.md`. Map each item's **SEO** from its\n `yoast_head_json` into the page `<head>` (title, description, Open Graph, JSON-LD schema) — Yoast is\n installed by default at provision (`site.json → seo.enabled: true`). If `seo.enabled` is `false`\n (Yoast absent), fall back to generating per-page title/description/OG tags from each item's content.\n - **Decode WordPress text.** WordPress returns titles and names HTML-encoded (`Tea & Cake`,\n `don’t`). Add the `entities` package and, in the one data module, run every title, name\n and SEO field you render as plain text (posts, pages, terms, Yoast, Store API products and\n categories) through `decodeHTML` once; strip an excerpt's tags first if you show it as text.\n Leave HTML fields (`content.rendered`, an excerpt shown as HTML) as they are, and never inject a\n decoded field as raw HTML.\n - **Contact form** (`site.json → contact_form.enabled: true`, any WordPress backend) → render the\n contact page's form and submit it **client-side** to Contact Form 7's public feedback endpoint. Put a\n `submitContactForm(data)` helper in the one data module: build a `FormData` with the field names from\n `contact_form.fields` (e.g. `your-name`, `your-email`, `your-subject`, `your-message`) **plus CF7's\n hidden fields** — `_wpcf7` = `contact_form.form_id`, `_wpcf7_version`, `_wpcf7_locale` (e.g. `en_US`),\n `_wpcf7_unit_tag` (any stable string), `_wpcf7_container_post` = `0` — and `POST` it to\n `contact_form.feedback_url` **without setting `Content-Type`** (let the browser add the multipart\n boundary). `/cms` is same-origin, so no CORS and no secret. Branch on the JSON `status`: `mail_sent`\n → success state; `validation_failed` → map `invalid_fields[].field` to per-input errors;\n `spam`/`aborted`/`mail_failed` → a generic \"couldn't send, try again\" message. Include the honeypot\n decoy field named in `contact_form.honeypot_field` (e.g. `your_website`), rendered hidden/off-screen,\n **empty**, `autocomplete=\"off\"`, `tabindex=\"-1\"` — the deployed spam guard rejects it if filled. A user\n validation error is a **normal UI state, not a build error**. When `contact_form.enabled` is `false` or absent, render the contact page with\n plain contact details and **no form** — graceful, like disabled checkout; never half-build. Full\n contract: `../04-content-model/wordpress/contact-form.md` §3.\n- **WordPress + WooCommerce** (`site.json → woocommerce.enabled: true`) → the WordPress bullet above **plus**\n the store. Read the catalog over the **public WooCommerce Store API** (`site.json → urls.store_api`,\n `/cms/wp-json/wc/store/v1`, no auth, open CORS): `GET /products` (prices are **integer minor units** on\n `prices.price` with `prices.currency_minor_unit` — divide to display), `GET /products/categories`. Cart,\n coupons and checkout are **client-side** against the Store API with the `Nonce` + `Cart-Token` headers\n (`GET /cart`, `POST /cart/add-item`, `/cart/apply-coupon`, `POST /checkout`) — see\n `../04-content-model/wordpress/woocommerce.md`. **Never embed a consumer key client-side**; the\n storefront is fully public. Blog/pages on the same site still come from `urls.rest_api` (`wp/v2`) + Yoast.\n - **Honour `site.json → woocommerce.payment_enabled`.** It is `false` until the owner enables a payment\n gateway + shipping in wp-admin (that config isn't reachable headlessly — see the provision note). While\n `false`, build the full catalog, product pages and the client-side cart as normal, but render a\n graceful disabled-checkout state (e.g. a disabled \"Checkout\" with \"Checkout isn't set up yet\"), **don't\n call `/checkout`**, and don't treat it as a build error. When `true`, wire checkout (`payment_method`\n `\"cod\"` works out of the box).\n- **Ecommerce** → the **public Hostinger Storefront Core V2 API** (`https://api-ecommerce.hostinger.com/v2`,\n no auth, open CORS), keyed on the **custom sales channel** (`site.json → ecommerce.sales_channel.id`):\n `GET /channels/<scha_*>/products` (prices are **minor units** on variants), `POST /channels/<scha_*>/checkout`\n for buying. Cart is client-side; never embed a token. Read\n `ecommerce_miscellaneous_custom-storefront-setup-instructions` for the authoritative, current guide.\n - **Honour `site.json → ecommerce.payment_enabled`.** When it is `false` (free account / no paid\n Ecommerce plan — see the provision gate), there is **no checkout**: build the full catalog, product\n pages and the client-side cart as normal, but **do not call the checkout endpoint**. Instead render\n a clear, graceful state at the checkout step — e.g. a disabled \"Checkout\" button with a short note\n like \"Online checkout isn't available on this plan yet\" (and/or a contact/enquiry fallback). A\n missing checkout is **not** a build error here — never leave the storefront half-built, throw, or\n retry checkout because payment is off. When `payment_enabled` is `true`, wire checkout normally.\n- **Webapp** → **no `content-model.md` and no headless backend to read**. The app uses its own data source:\n the MySQL database from `site.json → database` (through the `DB_*` / `DATABASE_URL` env vars — set at\n provision/deploy, see `../03-provision/webapp/SKILL.md` Step 3; `127.0.0.1` only resolves on the server,\n not locally), or whatever external API the app calls. For an existing app, keep its data layer as-is.\n\nGuidelines (framework-agnostic):\n\n- **One data module** is the single place that talks to the backend (e.g. `src/lib/data.ts`) — one file\n to inspect, one base URL to switch. Keep it swappable so the shell can build against stubs first.\n- **Fetch at request time for SSR** (fresh content, no rebuild); a static build fetches at build time.\n- **A failed or incomplete fetch is an error, not a silent empty/placeholder.** Planned content missing\n from the API is a build error too — a site that builds with holes ships with holes. *(WordPress/Ecommerce;\n a webapp has no planned content to check.)*\n- **`content-model.md` is the source for what should exist** (pages, nav, collections mapping) — for\n WordPress/Ecommerce only; a **webapp has no `content-model.md`**.\n- **No `.htaccess`** in the project (deploy would overwrite the live one); don't commit `node_modules`\n or build output.\n- Set `engines.node` to `22` (the deploy builds on Node 22).\n- **Next.js 16+ only:** set the `build` script to `next build --webpack`, not plain `next build`. Next.js\n 16 defaults `next build` to **Turbopack**, whose native compiler needs a newer glibc than the Hostinger\n build server has, so a Turbopack build fails on deploy and won't fall back to webpack. Webpack builds\n clean there. The `--webpack` flag exists only on Next.js 16+; on **Next.js 15.x** leave the build script\n as plain `next build` (it already defaults to webpack). (Alternative: pin Next.js to `15.x`, keeping\n plain `next build`.)\n\n## Step 4 — Hand off\n\nConfirm the project builds clean locally against the live backend, looks right at desktop and phone\nwidth (below), no placeholder/fixture content remains, and `state.json → frontend` matches what you\nbuilt. Update `state.json` (`stage: \"validate\"`).\nValidate (Step 7) owns the clean rebuild + user preview; deploy (Step 8) ships it with the `app_type`\nand output directory that match the chosen framework + rendering.\n\n**Visual check.** With the site running locally against the live backend, look at the home page and one\npage of each template (e.g. a post, a product, the contact page) at desktop and phone width. Take all the\nscreenshots first, then open them all in one turn where your tool can open several images at once, since\neach separate look costs a model turn. Don't tile several pages onto one image or take one tall\nfull-page shot: the viewer shrinks big images, and a shrunk page hides small bugs like a wrapped line.\nAfter a fix, re-shoot only what changed. Phone width is where most layout bugs show. Headless Chrome\nwon't size a window below ~500 px, so a phone-width window comes back cropped: set a 390 px viewport\n(e.g. Playwright), or put one route in 1280 px and 390 px iframes side by side on a local page to get\nboth widths in one image. The live site runs this same build, so it needs no screenshots; deploy checks\nthat it serves.\n\n> **Webapp:** just confirm the app builds clean and `state.json → frontend` is right — there's no\n> `content-model.md` or headless backend to check. A DB-backed app can't reach its database locally\n> (`127.0.0.1` is server-only), so its data layer is verified **after** deploy, not here.\n"
|
|
281
281
|
},
|
|
282
282
|
{
|
|
283
283
|
"uri": "skill://hostinger-headless/steps/07-validate/SKILL.md",
|
|
284
|
-
"digest": "sha256:
|
|
285
|
-
"size":
|
|
284
|
+
"digest": "sha256:c99acbf4ad77166cb9c5769d04c5c1aa60a1d5984ee535beb693d4e419431983",
|
|
285
|
+
"size": 4882,
|
|
286
286
|
"mimeType": "text/markdown",
|
|
287
|
-
"text": "---\nname: headless-step-validate\ndescription: \"Step 7 (validate) of the Hostinger Headless flow. OPTIONAL quick gate before deploy: every prior stage already self-verifies, so this is a fast confirmation (instance live + backend API answers with seeded content) plus optional local preview and user sign-off. Skip the heavy parts when nobody needs to approve.\"\n---\n\n# headless-step-validate\n\n> **Optional / fast.** Every stage before this one already verifies its own work (provision checks the\n> backend, content-model push checks the REST counts, frontend builds clean), and **deploy verifies the
|
|
287
|
+
"text": "---\nname: headless-step-validate\ndescription: \"Step 7 (validate) of the Hostinger Headless flow. OPTIONAL quick gate before deploy: every prior stage already self-verifies, so this is a fast confirmation (instance live + backend API answers with seeded content) plus optional local preview and user sign-off. Skip the heavy parts when nobody needs to approve.\"\n---\n\n# headless-step-validate\n\n> **Optional / fast.** Every stage before this one already verifies its own work (provision checks the\n> backend, content-model push checks the REST counts, frontend builds clean and looks right at desktop\n> and phone width), and **deploy verifies the live result**. So validate is **not** a re-run of all\n> that — it's a quick confirmation, plus the optional human preview/sign-off. **Skip Steps 3–4 (rebuild + approval) entirely** on an autonomous or\n> temp-domain run where no one is signing off; just do the two 10-second checks below and move on. Spend\n> time here only when a person wants to see it before it goes live.\n\n**In:** project in `~/.hostinger/<domain>/src/`, `site.json`, `state.json`.\n\n## 1 — Instance status (always, quick)\n\n`provision.status == \"completed\"` in `state.json`. Anything else → not ready; return to the instance\nbarrier, don't deploy. Deploy's pre-flight asks the connector again (see *State and artifacts* in the\ntop-level `SKILL.md`).\n\n## 2 — Backend API status (WordPress / WooCommerce / Ecommerce, always, quick)\n\nHit the live API from `site.json` and confirm it answers **with the content the push created** — a 200\nwith an empty catalog means the push didn't land:\n\n- **WordPress:** `GET {urls.rest_api}/posts?per_page=1` → 200 JSON array; check `X-WP-Total` against the\n planned post count, and `GET {urls.rest_api}/media?per_page=1` → `X-WP-Total` matches the planned\n image count (more = duplicates).\n- **WordPress + WooCommerce** (`site.json → woocommerce.enabled`): the WordPress check above **plus**\n `GET {urls.store_api}/products?per_page=100` → 200 with the seeded products and `prices` (minor units);\n count matches the plan. Don't test checkout while `woocommerce.payment_enabled` is `false`.\n- **Ecommerce:** query `urls.storefront_api` for the sales channel → 200 with the seeded products and\n prices *(confirm against the store)*.\n- **Contact form** (`site.json → contact_form.enabled`): POST one throwaway test submission (dummy\n name/email/subject/message + CF7's hidden `_wpcf7*` fields — see\n `../04-content-model/wordpress/contact-form.md` §3) to `contact_form.feedback_url` and assert the JSON\n `status` is **`mail_sent`**. This is the one place a real send happens, so one test email reaches the\n owner — not several. `mail_failed` is a real finding: surface it to the user (CF7 is wired, but\n `wp_mail` delivery/SPF needs attention — a Hostinger mailbox on the domain is the most reliable\n recipient) and log it as an issue. A `validation_failed` means the test payload didn't match the form's\n fields — fix the field names in `site.json`, not the plugin.\n **Then check the honeypot:** POST a **second** throwaway submission with the same valid fields **plus**\n `contact_form.honeypot_field` **filled**, and assert the `status` is **`spam`** (no mail sent). Keep the\n real fields valid — CF7 validates **before** running the spam filter, so an invalid payload would return\n `validation_failed` and never reach the honeypot check. A `mail_sent` here means the\n `cf7-headless-spamguard` plugin isn't active — surface it and re-check its deploy.\n\nFail or counts off → fix content-model push before building against live data.\n\n## 3 — Clean rebuild against the live API (optional — skip unless signing off)\n\nFrontend already produced a clean build; only redo this if you want a from-scratch guarantee before a\nhuman sign-off. Remove the build output and rebuild; a failed or incomplete build is a stop (no\nfixtures, placeholder copy or `.htaccess` in the output).\n\n- **Astro (SSG):** `rm -rf dist && npm run build && npm run check:dist`.\n- **Next.js (SSR):** `rm -rf .next && npm run check && npm run build`.\n\n## 4 — Preview & approval (optional — only when a person is signing off)\n\nWhen someone wants to see it first: start the local preview (Astro: `npm run preview`; Next.js:\n`npx next start`), show the user a couple of key routes at desktop and phone width (capture phone width\nas in frontend's *Visual check*; frontend already caught the layout bugs, so this is for the user, not a\nre-review) and navigation, and present it for **explicit approval**. If preview tooling is unavailable,\ngive the user the command and URL. On an autonomous or temp-domain run, skip this — deploy will verify the live result anyway.\n\nThen (after approval, or immediately if 3–4 were skipped): `state.json` → `stage: \"deploy\"`, fresh\n`updated_at`; leave `provision` unchanged.\n"
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
290
|
"uri": "skill://hostinger-headless/steps/08-deploy/SKILL.md",
|
package/src/core/tools/all.js
CHANGED
|
@@ -10525,7 +10525,7 @@ export default [
|
|
|
10525
10525
|
"readOnlyHint": false,
|
|
10526
10526
|
"destructiveHint": false
|
|
10527
10527
|
},
|
|
10528
|
-
"description": "Create an API token for the given mail order.
|
|
10528
|
+
"description": "Create an API token for the given mail order. Through the\n[Hostinger Mail API](https://api.mail.hostinger.com/), the token\ngrants access to the mailboxes it is scoped to (for example, to read,\nsearch, send and organise email messages), without signing in with a\nmailbox password over IMAP, SMTP or webmail.\n\nA token covers either all mailboxes of the order or only the ones you\nchoose. Set `scope.has_all_mailboxes` to `true` to cover all current\nand future mailboxes, or to `false` and list specific mailboxes in\n`scope.mailbox_ids`.\n\nThe plaintext token is returned only in this response, never again.\nStore it securely, because anyone who has it gets the same access. A\nmaximum of 10 tokens can exist per order.",
|
|
10529
10529
|
"method": "POST",
|
|
10530
10530
|
"path": "/api/mail/v1/orders/{orderId}/api-tokens",
|
|
10531
10531
|
"inputSchema": {
|
|
@@ -10583,7 +10583,7 @@ export default [
|
|
|
10583
10583
|
"destructiveHint": true,
|
|
10584
10584
|
"idempotentHint": true
|
|
10585
10585
|
},
|
|
10586
|
-
"description": "Revoke an API token. The token immediately loses access to the\n[Hostinger
|
|
10586
|
+
"description": "Revoke an API token. The token immediately loses access to the\n[Hostinger Mail API](https://api.mail.hostinger.com/). This action\ncannot be undone.",
|
|
10587
10587
|
"method": "DELETE",
|
|
10588
10588
|
"path": "/api/mail/v1/api-tokens/{tokenId}",
|
|
10589
10589
|
"inputSchema": {
|
|
@@ -10613,7 +10613,7 @@ export default [
|
|
|
10613
10613
|
"readOnlyHint": true,
|
|
10614
10614
|
"destructiveHint": false
|
|
10615
10615
|
},
|
|
10616
|
-
"description": "Retrieve a paginated list of\n[Hostinger
|
|
10616
|
+
"description": "Retrieve a paginated list of\n[Hostinger Mail API](https://api.mail.hostinger.com/) tokens across\nall your mail orders, optionally filtered by order. Plaintext tokens\nare never included; they are returned only when a token is created.",
|
|
10617
10617
|
"method": "GET",
|
|
10618
10618
|
"path": "/api/mail/v1/api-tokens",
|
|
10619
10619
|
"inputSchema": {
|
package/src/core/tools/all.ts
CHANGED
|
@@ -10544,7 +10544,7 @@ const tools: OpenApiTool[] = [
|
|
|
10544
10544
|
"readOnlyHint": false,
|
|
10545
10545
|
"destructiveHint": false
|
|
10546
10546
|
},
|
|
10547
|
-
"description": "Create an API token for the given mail order.
|
|
10547
|
+
"description": "Create an API token for the given mail order. Through the\n[Hostinger Mail API](https://api.mail.hostinger.com/), the token\ngrants access to the mailboxes it is scoped to (for example, to read,\nsearch, send and organise email messages), without signing in with a\nmailbox password over IMAP, SMTP or webmail.\n\nA token covers either all mailboxes of the order or only the ones you\nchoose. Set `scope.has_all_mailboxes` to `true` to cover all current\nand future mailboxes, or to `false` and list specific mailboxes in\n`scope.mailbox_ids`.\n\nThe plaintext token is returned only in this response, never again.\nStore it securely, because anyone who has it gets the same access. A\nmaximum of 10 tokens can exist per order.",
|
|
10548
10548
|
"method": "POST",
|
|
10549
10549
|
"path": "/api/mail/v1/orders/{orderId}/api-tokens",
|
|
10550
10550
|
"inputSchema": {
|
|
@@ -10602,7 +10602,7 @@ const tools: OpenApiTool[] = [
|
|
|
10602
10602
|
"destructiveHint": true,
|
|
10603
10603
|
"idempotentHint": true
|
|
10604
10604
|
},
|
|
10605
|
-
"description": "Revoke an API token. The token immediately loses access to the\n[Hostinger
|
|
10605
|
+
"description": "Revoke an API token. The token immediately loses access to the\n[Hostinger Mail API](https://api.mail.hostinger.com/). This action\ncannot be undone.",
|
|
10606
10606
|
"method": "DELETE",
|
|
10607
10607
|
"path": "/api/mail/v1/api-tokens/{tokenId}",
|
|
10608
10608
|
"inputSchema": {
|
|
@@ -10632,7 +10632,7 @@ const tools: OpenApiTool[] = [
|
|
|
10632
10632
|
"readOnlyHint": true,
|
|
10633
10633
|
"destructiveHint": false
|
|
10634
10634
|
},
|
|
10635
|
-
"description": "Retrieve a paginated list of\n[Hostinger
|
|
10635
|
+
"description": "Retrieve a paginated list of\n[Hostinger Mail API](https://api.mail.hostinger.com/) tokens across\nall your mail orders, optionally filtered by order. Plaintext tokens\nare never included; they are returned only when a token is created.",
|
|
10636
10636
|
"method": "GET",
|
|
10637
10637
|
"path": "/api/mail/v1/api-tokens",
|
|
10638
10638
|
"inputSchema": {
|
package/src/core/tools/mail.js
CHANGED
|
@@ -163,7 +163,7 @@ export default [
|
|
|
163
163
|
"readOnlyHint": false,
|
|
164
164
|
"destructiveHint": false
|
|
165
165
|
},
|
|
166
|
-
"description": "Create an API token for the given mail order.
|
|
166
|
+
"description": "Create an API token for the given mail order. Through the\n[Hostinger Mail API](https://api.mail.hostinger.com/), the token\ngrants access to the mailboxes it is scoped to (for example, to read,\nsearch, send and organise email messages), without signing in with a\nmailbox password over IMAP, SMTP or webmail.\n\nA token covers either all mailboxes of the order or only the ones you\nchoose. Set `scope.has_all_mailboxes` to `true` to cover all current\nand future mailboxes, or to `false` and list specific mailboxes in\n`scope.mailbox_ids`.\n\nThe plaintext token is returned only in this response, never again.\nStore it securely, because anyone who has it gets the same access. A\nmaximum of 10 tokens can exist per order.",
|
|
167
167
|
"method": "POST",
|
|
168
168
|
"path": "/api/mail/v1/orders/{orderId}/api-tokens",
|
|
169
169
|
"inputSchema": {
|
|
@@ -221,7 +221,7 @@ export default [
|
|
|
221
221
|
"destructiveHint": true,
|
|
222
222
|
"idempotentHint": true
|
|
223
223
|
},
|
|
224
|
-
"description": "Revoke an API token. The token immediately loses access to the\n[Hostinger
|
|
224
|
+
"description": "Revoke an API token. The token immediately loses access to the\n[Hostinger Mail API](https://api.mail.hostinger.com/). This action\ncannot be undone.",
|
|
225
225
|
"method": "DELETE",
|
|
226
226
|
"path": "/api/mail/v1/api-tokens/{tokenId}",
|
|
227
227
|
"inputSchema": {
|
|
@@ -251,7 +251,7 @@ export default [
|
|
|
251
251
|
"readOnlyHint": true,
|
|
252
252
|
"destructiveHint": false
|
|
253
253
|
},
|
|
254
|
-
"description": "Retrieve a paginated list of\n[Hostinger
|
|
254
|
+
"description": "Retrieve a paginated list of\n[Hostinger Mail API](https://api.mail.hostinger.com/) tokens across\nall your mail orders, optionally filtered by order. Plaintext tokens\nare never included; they are returned only when a token is created.",
|
|
255
255
|
"method": "GET",
|
|
256
256
|
"path": "/api/mail/v1/api-tokens",
|
|
257
257
|
"inputSchema": {
|
package/src/core/tools/mail.ts
CHANGED
|
@@ -182,7 +182,7 @@ const tools: OpenApiTool[] = [
|
|
|
182
182
|
"readOnlyHint": false,
|
|
183
183
|
"destructiveHint": false
|
|
184
184
|
},
|
|
185
|
-
"description": "Create an API token for the given mail order.
|
|
185
|
+
"description": "Create an API token for the given mail order. Through the\n[Hostinger Mail API](https://api.mail.hostinger.com/), the token\ngrants access to the mailboxes it is scoped to (for example, to read,\nsearch, send and organise email messages), without signing in with a\nmailbox password over IMAP, SMTP or webmail.\n\nA token covers either all mailboxes of the order or only the ones you\nchoose. Set `scope.has_all_mailboxes` to `true` to cover all current\nand future mailboxes, or to `false` and list specific mailboxes in\n`scope.mailbox_ids`.\n\nThe plaintext token is returned only in this response, never again.\nStore it securely, because anyone who has it gets the same access. A\nmaximum of 10 tokens can exist per order.",
|
|
186
186
|
"method": "POST",
|
|
187
187
|
"path": "/api/mail/v1/orders/{orderId}/api-tokens",
|
|
188
188
|
"inputSchema": {
|
|
@@ -240,7 +240,7 @@ const tools: OpenApiTool[] = [
|
|
|
240
240
|
"destructiveHint": true,
|
|
241
241
|
"idempotentHint": true
|
|
242
242
|
},
|
|
243
|
-
"description": "Revoke an API token. The token immediately loses access to the\n[Hostinger
|
|
243
|
+
"description": "Revoke an API token. The token immediately loses access to the\n[Hostinger Mail API](https://api.mail.hostinger.com/). This action\ncannot be undone.",
|
|
244
244
|
"method": "DELETE",
|
|
245
245
|
"path": "/api/mail/v1/api-tokens/{tokenId}",
|
|
246
246
|
"inputSchema": {
|
|
@@ -270,7 +270,7 @@ const tools: OpenApiTool[] = [
|
|
|
270
270
|
"readOnlyHint": true,
|
|
271
271
|
"destructiveHint": false
|
|
272
272
|
},
|
|
273
|
-
"description": "Retrieve a paginated list of\n[Hostinger
|
|
273
|
+
"description": "Retrieve a paginated list of\n[Hostinger Mail API](https://api.mail.hostinger.com/) tokens across\nall your mail orders, optionally filtered by order. Plaintext tokens\nare never included; they are returned only when a token is created.",
|
|
274
274
|
"method": "GET",
|
|
275
275
|
"path": "/api/mail/v1/api-tokens",
|
|
276
276
|
"inputSchema": {
|
|
@@ -4,4 +4,4 @@ import { startServer } from '../core/runtime.js';
|
|
|
4
4
|
import tools from '../core/tools/agency-hosting.js';
|
|
5
5
|
import instructions from '../core/instructions.agency-hosting.js';
|
|
6
6
|
|
|
7
|
-
startServer({ name: 'hostinger-agency-hosting-mcp', version: '3.
|
|
7
|
+
startServer({ name: 'hostinger-agency-hosting-mcp', version: '3.40.0', tools, instructions });
|
|
@@ -4,4 +4,4 @@ import { startServer } from '../core/runtime.js';
|
|
|
4
4
|
import tools from '../core/tools/agency-hosting.js';
|
|
5
5
|
import instructions from '../core/instructions.agency-hosting.js';
|
|
6
6
|
|
|
7
|
-
startServer({ name: 'hostinger-agency-hosting-mcp', version: '3.
|
|
7
|
+
startServer({ name: 'hostinger-agency-hosting-mcp', version: '3.40.0', tools, instructions });
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
import { startServer } from '../core/runtime.js';
|
|
4
4
|
import tools from '../core/tools/agent-readiness.js';
|
|
5
5
|
|
|
6
|
-
startServer({ name: 'hostinger-agent-readiness-mcp', version: '3.
|
|
6
|
+
startServer({ name: 'hostinger-agent-readiness-mcp', version: '3.40.0', tools });
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
import { startServer } from '../core/runtime.js';
|
|
4
4
|
import tools from '../core/tools/agent-readiness.js';
|
|
5
5
|
|
|
6
|
-
startServer({ name: 'hostinger-agent-readiness-mcp', version: '3.
|
|
6
|
+
startServer({ name: 'hostinger-agent-readiness-mcp', version: '3.40.0', tools });
|
package/src/servers/all.js
CHANGED
|
@@ -5,4 +5,4 @@ import tools from '../core/tools/all.js';
|
|
|
5
5
|
import instructions from '../core/instructions.js';
|
|
6
6
|
import skills from '../core/skills.js';
|
|
7
7
|
|
|
8
|
-
startServer({ name: 'hostinger-api-mcp', version: '3.
|
|
8
|
+
startServer({ name: 'hostinger-api-mcp', version: '3.40.0', tools, instructions, skills });
|
package/src/servers/all.ts
CHANGED
|
@@ -5,4 +5,4 @@ import tools from '../core/tools/all.js';
|
|
|
5
5
|
import instructions from '../core/instructions.js';
|
|
6
6
|
import skills from '../core/skills.js';
|
|
7
7
|
|
|
8
|
-
startServer({ name: 'hostinger-api-mcp', version: '3.
|
|
8
|
+
startServer({ name: 'hostinger-api-mcp', version: '3.40.0', tools, instructions, skills });
|
package/src/servers/billing.js
CHANGED
package/src/servers/billing.ts
CHANGED
package/src/servers/dns.js
CHANGED
package/src/servers/dns.ts
CHANGED
package/src/servers/domains.js
CHANGED
package/src/servers/domains.ts
CHANGED
package/src/servers/ecommerce.js
CHANGED
package/src/servers/ecommerce.ts
CHANGED
package/src/servers/gpu.js
CHANGED
package/src/servers/gpu.ts
CHANGED
package/src/servers/horizons.js
CHANGED
package/src/servers/horizons.ts
CHANGED
package/src/servers/hosting.js
CHANGED
|
@@ -4,4 +4,4 @@ import { startServer } from '../core/runtime.js';
|
|
|
4
4
|
import tools from '../core/tools/hosting.js';
|
|
5
5
|
import instructions from '../core/instructions.js';
|
|
6
6
|
|
|
7
|
-
startServer({ name: 'hostinger-hosting-mcp', version: '3.
|
|
7
|
+
startServer({ name: 'hostinger-hosting-mcp', version: '3.40.0', tools, instructions });
|
package/src/servers/hosting.ts
CHANGED
|
@@ -4,4 +4,4 @@ import { startServer } from '../core/runtime.js';
|
|
|
4
4
|
import tools from '../core/tools/hosting.js';
|
|
5
5
|
import instructions from '../core/instructions.js';
|
|
6
6
|
|
|
7
|
-
startServer({ name: 'hostinger-hosting-mcp', version: '3.
|
|
7
|
+
startServer({ name: 'hostinger-hosting-mcp', version: '3.40.0', tools, instructions });
|
package/src/servers/mail.js
CHANGED
package/src/servers/mail.ts
CHANGED
package/src/servers/reach.js
CHANGED
package/src/servers/reach.ts
CHANGED
package/src/servers/vps.js
CHANGED
package/src/servers/vps.ts
CHANGED
package/src/servers/wordpress.js
CHANGED
package/src/servers/wordpress.ts
CHANGED
package/types.d.ts
CHANGED
|
@@ -6155,14 +6155,20 @@ order.
|
|
|
6155
6155
|
};
|
|
6156
6156
|
|
|
6157
6157
|
/**
|
|
6158
|
-
* Create an API token for the given mail order.
|
|
6159
|
-
|
|
6160
|
-
|
|
6158
|
+
* Create an API token for the given mail order. Through the
|
|
6159
|
+
[Hostinger Mail API](https://api.mail.hostinger.com/), the token
|
|
6160
|
+
grants access to the mailboxes it is scoped to (for example, to read,
|
|
6161
|
+
search, send and organise email messages), without signing in with a
|
|
6162
|
+
mailbox password over IMAP, SMTP or webmail.
|
|
6163
|
+
|
|
6164
|
+
A token covers either all mailboxes of the order or only the ones you
|
|
6165
|
+
choose. Set `scope.has_all_mailboxes` to `true` to cover all current
|
|
6166
|
+
and future mailboxes, or to `false` and list specific mailboxes in
|
|
6167
|
+
`scope.mailbox_ids`.
|
|
6161
6168
|
|
|
6162
6169
|
The plaintext token is returned only in this response, never again.
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
or list specific mailboxes in `scope.mailbox_ids`.
|
|
6170
|
+
Store it securely, because anyone who has it gets the same access. A
|
|
6171
|
+
maximum of 10 tokens can exist per order.
|
|
6166
6172
|
*/
|
|
6167
6173
|
"mail_api-tokens_create": {
|
|
6168
6174
|
params: {
|
|
@@ -6184,7 +6190,7 @@ or list specific mailboxes in `scope.mailbox_ids`.
|
|
|
6184
6190
|
|
|
6185
6191
|
/**
|
|
6186
6192
|
* Revoke an API token. The token immediately loses access to the
|
|
6187
|
-
[Hostinger
|
|
6193
|
+
[Hostinger Mail API](https://api.mail.hostinger.com/). This action
|
|
6188
6194
|
cannot be undone.
|
|
6189
6195
|
*/
|
|
6190
6196
|
"mail_api-tokens_revoke": {
|
|
@@ -6199,7 +6205,7 @@ cannot be undone.
|
|
|
6199
6205
|
|
|
6200
6206
|
/**
|
|
6201
6207
|
* Retrieve a paginated list of
|
|
6202
|
-
[Hostinger
|
|
6208
|
+
[Hostinger Mail API](https://api.mail.hostinger.com/) tokens across
|
|
6203
6209
|
all your mail orders, optionally filtered by order. Plaintext tokens
|
|
6204
6210
|
are never included; they are returned only when a token is created.
|
|
6205
6211
|
*/
|