hostinger-api-mcp 4.10.2 → 4.12.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/gemini-extension.json +1 -1
  3. package/package.json +1 -1
  4. package/server.json +2 -2
  5. package/skills/headless/VERSION +2 -2
  6. package/skills/headless/steps/07-validate/SKILL.md +44 -8
  7. package/skills/headless/steps/08-deploy/SKILL.md +2 -1
  8. package/skills/headless/steps/09-done/SKILL.md +21 -5
  9. package/src/core/skills.js +9 -9
  10. package/src/core/skills.ts +9 -9
  11. package/src/core/tools/all.js +3 -2
  12. package/src/core/tools/all.ts +3 -2
  13. package/src/core/tools/hosting.js +3 -2
  14. package/src/core/tools/hosting.ts +3 -2
  15. package/src/servers/agency-hosting.js +1 -1
  16. package/src/servers/agency-hosting.ts +1 -1
  17. package/src/servers/agent-readiness.js +1 -1
  18. package/src/servers/agent-readiness.ts +1 -1
  19. package/src/servers/all.js +1 -1
  20. package/src/servers/all.ts +1 -1
  21. package/src/servers/billing.js +1 -1
  22. package/src/servers/billing.ts +1 -1
  23. package/src/servers/dns.js +1 -1
  24. package/src/servers/dns.ts +1 -1
  25. package/src/servers/domains.js +1 -1
  26. package/src/servers/domains.ts +1 -1
  27. package/src/servers/ecommerce.js +1 -1
  28. package/src/servers/ecommerce.ts +1 -1
  29. package/src/servers/gpu.js +1 -1
  30. package/src/servers/gpu.ts +1 -1
  31. package/src/servers/horizons.js +1 -1
  32. package/src/servers/horizons.ts +1 -1
  33. package/src/servers/hosting.js +1 -1
  34. package/src/servers/hosting.ts +1 -1
  35. package/src/servers/mail.js +1 -1
  36. package/src/servers/mail.ts +1 -1
  37. package/src/servers/reach.js +1 -1
  38. package/src/servers/reach.ts +1 -1
  39. package/src/servers/vps.js +1 -1
  40. package/src/servers/vps.ts +1 -1
  41. package/src/servers/wordpress.js +1 -1
  42. package/src/servers/wordpress.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,24 @@ 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
+ ## v4.12.0 — 2026-11-19
8
+
9
+ ### Also in this release
10
+
11
+ - Bundled agent skills: 4 files
12
+ - Other files: `src/core/skills.js`, `src/core/skills.ts`
13
+
14
+ ## v4.11.0 — 2026-11-19
15
+
16
+ ### Operations
17
+
18
+ - Changed the input schema of `hosting_websites_trigger-event`
19
+
20
+ ### Also in this release
21
+
22
+ - Bundled agent skills: `skills/headless/VERSION`, `skills/headless/steps/09-done/SKILL.md`
23
+ - Other files: `src/core/skills.js`, `src/core/skills.ts`
24
+
7
25
  ## v4.10.2 — 2026-11-19
8
26
 
9
27
  ### Also in this release
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-mcp",
3
- "version": "4.10.2",
3
+ "version": "4.12.0",
4
4
  "description": "Hostinger API — manage domains, DNS, hosting, VPS, billing and more from Gemini CLI.",
5
5
  "mcpServers": {
6
6
  "hostinger": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-mcp",
3
- "version": "4.10.2",
3
+ "version": "4.12.0",
4
4
  "mcpName": "io.github.hostinger/hostinger-api-mcp",
5
5
  "description": "MCP server for Hostinger API",
6
6
  "repository": {
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": "4.10.2",
20
+ "version": "4.12.0",
21
21
  "packages": [
22
22
  {
23
23
  "registryType": "npm",
24
24
  "identifier": "@hostinger/mcp",
25
- "version": "4.10.2",
25
+ "version": "4.12.0",
26
26
  "transport": {
27
27
  "type": "stdio"
28
28
  },
@@ -1,3 +1,3 @@
1
- version=4.10.2
2
- commit=7276dbc74097
1
+ version=4.12.0
2
+ commit=1486c807727b
3
3
  built=2026-11-19
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  name: headless-step-validate
3
- description: "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."
3
+ description: "Step 7 (validate) of the Hostinger Headless flow. Quick gate before deploy: every prior stage already self-verifies, so this is a fast confirmation (instance live + backend API answers with seeded content), an npm audit of the frontend before the first deploy (fix high/critical advisories, rebuild clean), plus optional local preview and user sign-off. Skip the heavy parts when nobody needs to approve."
4
4
  ---
5
5
 
6
6
  # headless-step-validate
7
7
 
8
- > **Optional / fast.** Every stage before this one already verifies its own work (provision checks the
8
+ > **Fast.** Every stage before this one already verifies its own work (provision checks the
9
9
  > backend, content-model push checks the REST counts, frontend builds clean and looks right at desktop
10
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
- > temp-domain run where no one is signing off; just do the two 10-second checks below and move on. Spend
13
- > time here only when a person wants to see it before it goes live.
11
+ > that — it's two quick checks, an npm audit before the first deploy, and the optional human
12
+ > preview/sign-off. **Skip Steps 4–5 (rebuild + approval) entirely** on an autonomous or temp-domain run
13
+ > where no one is signing off. Spend time here only when a person wants to see it before it goes live.
14
14
 
15
15
  **In:** project in `~/.hostinger/<domain>/src/`, `site.json`, `state.json`.
16
16
 
@@ -45,7 +45,43 @@ with an empty catalog means the push didn't land:
45
45
 
46
46
  Fail or counts off → fix content-model push before building against live data.
47
47
 
48
- ## 3 — Clean rebuild against the live API (optional — skip unless signing off)
48
+ ## 3 — Dependency audit (first deploy only, even when nobody signs off)
49
+
50
+ Run this only when `~/.hostinger/<domain>/deploy.json` doesn't exist yet: deploy writes it after the
51
+ first passing deploy, so iterate and redeploy runs skip this step and don't report the skip. Deploy
52
+ ships `package-lock.json` and the server installs from it, so the fix lands in the lockfile here. In
53
+ `~/.hostinger/<domain>/src/`:
54
+
55
+ 1. **Audit.** `npm audit`. No vulnerabilities → note "npm audit clean" in validate's *Steps completed*
56
+ row of the final report and go on to Step 4. If it can't run (no `package-lock.json`, registry
57
+ unreachable), log an `issue` event
58
+ `{"stage":"validate","symptom":"npm audit could not run","cause":"<error>","severity":"medium","resolved":false}`,
59
+ list it under *Gaps / follow-ups*, and go on.
60
+ 2. **Back up.** Copy `package.json` and `package-lock.json` to `~/.hostinger/<domain>/audit-backup/`
61
+ (outside `src/`, so the deploy archive doesn't pick them up). This is the last working pair. Delete
62
+ `audit-backup/` when this step ends.
63
+ 3. **Safe fixes.** `npm audit fix`, then rebuild clean: delete the build output (`.next` for Next.js,
64
+ `.output` for Nuxt, `build` for SvelteKit, `dist` for Astro and Vite/React/Vue; for any
65
+ other framework, the folder `npm run build` writes), run `npm run build`, and run the project's `check` or
66
+ `check:dist` script if it has one. Passes → copy the pair to the backup again. Fails → restore the
67
+ backup and `npm ci`. Never run `npm audit fix --force`: it takes breaking major upgrades across the
68
+ whole tree. Low and moderate advisories this can't fix stay.
69
+ 4. **High and critical.** If `npm audit --audit-level=high` still fails, run `npm audit --json`. For
70
+ each entry under `vulnerabilities` whose `severity` is `high` or `critical` and whose `fixAvailable`
71
+ is an object, run `npm install <fixAvailable.name>@<fixAvailable.version>`. Rebuild clean as in
72
+ item 3. Fails → restore the backup, `npm ci`, and treat those advisories as leftovers.
73
+ `fixAvailable: false` means no dependency upgrade fixes it.
74
+
75
+ **Leftovers.** A high or critical advisory that no upgrade fixes, or whose upgrade breaks the build,
76
+ doesn't block the deploy: deploy the last working pair, log one event for all of them, and list each
77
+ (package, severity, advisory ID, why it stays) under *Gaps / follow-ups* in the final report
78
+ ([`../09-done/SKILL.md`](../09-done/SKILL.md)):
79
+
80
+ ```bash
81
+ node <skill>/run-log.mjs <domain> event issue '{"stage":"validate","symptom":"npm audit: <n> high/critical advisories left","cause":"<package>@<version> <advisory ID>: no fix through an upgrade | upgrade breaks the build; …","severity":"high","resolved":false}'
82
+ ```
83
+
84
+ ## 4 — Clean rebuild against the live API (optional — skip unless signing off)
49
85
 
50
86
  Frontend already produced a clean build; only redo this if you want a from-scratch guarantee before a
51
87
  human sign-off. Remove the build output and rebuild; a failed or incomplete build is a stop (no
@@ -54,7 +90,7 @@ fixtures, placeholder copy or `.htaccess` in the output).
54
90
  - **Astro (SSG):** `rm -rf dist && npm run build && npm run check:dist`.
55
91
  - **Next.js (SSR):** `rm -rf .next && npm run check && npm run build`.
56
92
 
57
- ## 4 — Preview & approval (optional — only when a person is signing off)
93
+ ## 5 — Preview & approval (optional — only when a person is signing off)
58
94
 
59
95
  When someone wants to see it first: start the local preview (Astro: `npm run preview`; Next.js:
60
96
  `npx next start`), show the user a couple of key routes at desktop and phone width (capture phone width
@@ -62,5 +98,5 @@ as in frontend's *Visual check*; frontend already caught the layout bugs, so thi
62
98
  re-review) and navigation, and present it for **explicit approval**. If preview tooling is unavailable,
63
99
  give the user the command and URL. On an autonomous or temp-domain run, skip this — deploy will verify the live result anyway.
64
100
 
65
- Then (after approval, or immediately if 3–4 were skipped): `state.json` → `stage: "deploy"`, fresh
101
+ Then (after approval, or immediately if 4–5 were skipped): `state.json` → `stage: "deploy"`, fresh
66
102
  `updated_at`; leave `provision` unchanged.
@@ -10,7 +10,8 @@ the project **source** and it uploads it, runs `npm install` + the build script
10
10
  serves the result. **Out:** `deploy.json`.
11
11
 
12
12
  This is an **instance-barrier** step: run it only after `provision.status == "completed"` and validate
13
- (if run) has passed. All operations go through the connector (`execute`).
13
+ has passed (on a first deploy that includes its dependency audit, even when the rest of validate is
14
+ skipped). All operations go through the connector (`execute`).
14
15
 
15
16
  > **Connected to the hosted server (`mcp.hostinger.com`)?** Its `hosting_deploy` deploys Git
16
17
  > repositories only and cannot read a local `path`. Run this step through the local
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: headless-step-done
3
- description: "Step 9 (done) of the Hostinger Headless flow. Verifies the live site, then hands over the URLs (hPanel success page, main site, WordPress/store admin, dashboard), opens the success page in the browser on a successful run, and gives a summary of what was built plus explicit next steps — how to log in to wp-admin and reset the password, how to manage content, and how to finish WooCommerce/store setup so it can take orders. Its final report format is also used whenever a run stops early."
3
+ description: "Step 9 (done) of the Hostinger Headless flow. Verifies the live site, then hands over the URLs (hPanel success page, main site, WordPress/store admin, dashboard), tells hPanel the build finished and opens the success page in the browser on a successful run, and gives a summary of what was built plus explicit next steps — how to log in to wp-admin and reset the password, how to manage content, and how to finish WooCommerce/store setup so it can take orders. Its final report format is also used whenever a run stops early."
4
4
  ---
5
5
 
6
6
  # headless-step-done
7
7
 
8
8
  Verify the live site, then hand over the URLs (success page, main site, WordPress admin, dashboard), a
9
- summary of what was built, and what the user can do next. **On a successful run, open the success page
10
- for the user** (see *Open the success page*).
9
+ summary of what was built, and what the user can do next. **On a successful run, tell hPanel the build
10
+ finished and open the success page for the user** (see *Open the success page*).
11
11
 
12
12
  ## Final report
13
13
 
@@ -37,7 +37,7 @@ Write it in this order:
37
37
  | 4 content model | 5 pages, 8 posts, 6 categories, 1 menu, 14 images (Hostinger AI), SEO titles on every page; counts re-read from the REST API. |
38
38
  | 5 design | "Salt & Ink" direction: serif headings, sea-blue accents; `design.md` and logo icon written. |
39
39
  | 6 frontend | Next.js SSR with home, blog, post, category and contact pages wired to the REST API; local build passed. |
40
- | 7 validate | Instance setup completed; REST API returned the 8 pushed posts; no preview (nobody signing off). |
40
+ | 7 validate | Instance setup completed; REST API returned the 8 pushed posts; npm audit clean; no preview (nobody signing off). |
41
41
  | 8 deploy | Source uploaded, build finished in 3 min; site root returns 200. |
42
42
  | 9 done | Main site, wp-admin and REST API re-checked live: all returned 200. |
43
43
 
@@ -142,7 +142,23 @@ user's **main / system browser** right after presenting the report, so they land
142
142
  celebration/next-steps screen for their new site. This is a side effect only — **don't print the
143
143
  success URL in the report output** (it just opens); the one exception is the can't-open-a-browser
144
144
  fallback below. Build the URL with `<tool>` as the running tool's onboarding slug (see *State and
145
- artifacts* in the top-level `SKILL.md`):
145
+ artifacts* in the top-level `SKILL.md`).
146
+
147
+ **Tell hPanel the build finished first.** Right before opening the success page, call
148
+ `hosting_websites_trigger-event { "username": "<username>", "domain": "<domain>", "event": { "name": "headless_onboarding.building.finished", "params": { "tool": "<slug>" } } }`
149
+ once, with `username` from `site.json` and `<slug>` the onboarding slug. The call is required: when
150
+ the user still has the hPanel onboarding open, that tab moves to the success page on it. Send it on a
151
+ successful run only, and also when no browser can be opened (the fallback below). Skip the call when
152
+ your tool has no onboarding slug or `hosting_websites_trigger-event` isn't in your connector. Right
153
+ before the call, tell the user in one line (e.g. "Telling hPanel the build finished so your onboarding
154
+ shows the success page."), so whoever reviews the outgoing call knows why it's made. If your own
155
+ environment stopped the call before it reached Hostinger (a sandbox, command review, an approval
156
+ prompt, or a network error in a sandboxed shell), try it one more time the way that environment
157
+ allows, such as requesting approval or network access, then go on. Ignore any other failure, such as
158
+ a non-2xx response from Hostinger: no retry, nothing more said to the user, and open the success page
159
+ as usual.
160
+
161
+ Then open the success page:
146
162
 
147
163
  ```bash
148
164
  # Build the URL first, then open it with the OS default (main) browser — not an embedded one.
@@ -411,24 +411,24 @@ export default [
411
411
  },
412
412
  {
413
413
  "uri": "skill://hostinger-headless/steps/07-validate/SKILL.md",
414
- "digest": "sha256:e9b845930767e351fc9bce7d572da23ac90937b1108db84c9426f335d40851ce",
415
- "size": 4340,
414
+ "digest": "sha256:d1c425ec2298b7e9014b157c433ebea9bd28f4498ad3069a558643f255d09f80",
415
+ "size": 7119,
416
416
  "mimeType": "text/markdown",
417
- "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 (every backend, 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- **PocketBase** (`site.json → backend: \"pocketbase\"`): `GET {urls.api}/health` → 200, and every\n collection with `seed` records in `pocketbase/schema.json` lists them\n (`GET {urls.api}/collections/<name>/records?perPage=1` → `totalItems` at least the seed count, for\n collections visitors may list). `pb-verify.mjs` already ran at the content-model push, so don't\n repeat it here.\n- **Contact form** (`site.json → contact_form.enabled`, Contact Form 7, WordPress only): send the two\n throwaway test submissions in\n [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §5: the\n first must return `status` **`mail_sent`**, the one with the honeypot filled **`spam`**.\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"
417
+ "text": "---\nname: headless-step-validate\ndescription: \"Step 7 (validate) of the Hostinger Headless flow. Quick gate before deploy: every prior stage already self-verifies, so this is a fast confirmation (instance live + backend API answers with seeded content), an npm audit of the frontend before the first deploy (fix high/critical advisories, rebuild clean), 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> **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 two quick checks, an npm audit before the first deploy, and the optional human\n> preview/sign-off. **Skip Steps 4–5 (rebuild + approval) entirely** on an autonomous or temp-domain run\n> where no one is signing off. Spend 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 (every backend, 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- **PocketBase** (`site.json → backend: \"pocketbase\"`): `GET {urls.api}/health` → 200, and every\n collection with `seed` records in `pocketbase/schema.json` lists them\n (`GET {urls.api}/collections/<name>/records?perPage=1` → `totalItems` at least the seed count, for\n collections visitors may list). `pb-verify.mjs` already ran at the content-model push, so don't\n repeat it here.\n- **Contact form** (`site.json → contact_form.enabled`, Contact Form 7, WordPress only): send the two\n throwaway test submissions in\n [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §5: the\n first must return `status` **`mail_sent`**, the one with the honeypot filled **`spam`**.\n\nFail or counts off → fix content-model push before building against live data.\n\n## 3 — Dependency audit (first deploy only, even when nobody signs off)\n\nRun this only when `~/.hostinger/<domain>/deploy.json` doesn't exist yet: deploy writes it after the\nfirst passing deploy, so iterate and redeploy runs skip this step and don't report the skip. Deploy\nships `package-lock.json` and the server installs from it, so the fix lands in the lockfile here. In\n`~/.hostinger/<domain>/src/`:\n\n1. **Audit.** `npm audit`. No vulnerabilities → note \"npm audit clean\" in validate's *Steps completed*\n row of the final report and go on to Step 4. If it can't run (no `package-lock.json`, registry\n unreachable), log an `issue` event\n `{\"stage\":\"validate\",\"symptom\":\"npm audit could not run\",\"cause\":\"<error>\",\"severity\":\"medium\",\"resolved\":false}`,\n list it under *Gaps / follow-ups*, and go on.\n2. **Back up.** Copy `package.json` and `package-lock.json` to `~/.hostinger/<domain>/audit-backup/`\n (outside `src/`, so the deploy archive doesn't pick them up). This is the last working pair. Delete\n `audit-backup/` when this step ends.\n3. **Safe fixes.** `npm audit fix`, then rebuild clean: delete the build output (`.next` for Next.js,\n `.output` for Nuxt, `build` for SvelteKit, `dist` for Astro and Vite/React/Vue; for any\n other framework, the folder `npm run build` writes), run `npm run build`, and run the project's `check` or\n `check:dist` script if it has one. Passes → copy the pair to the backup again. Fails → restore the\n backup and `npm ci`. Never run `npm audit fix --force`: it takes breaking major upgrades across the\n whole tree. Low and moderate advisories this can't fix stay.\n4. **High and critical.** If `npm audit --audit-level=high` still fails, run `npm audit --json`. For\n each entry under `vulnerabilities` whose `severity` is `high` or `critical` and whose `fixAvailable`\n is an object, run `npm install <fixAvailable.name>@<fixAvailable.version>`. Rebuild clean as in\n item 3. Fails → restore the backup, `npm ci`, and treat those advisories as leftovers.\n `fixAvailable: false` means no dependency upgrade fixes it.\n\n**Leftovers.** A high or critical advisory that no upgrade fixes, or whose upgrade breaks the build,\ndoesn't block the deploy: deploy the last working pair, log one event for all of them, and list each\n(package, severity, advisory ID, why it stays) under *Gaps / follow-ups* in the final report\n([`../09-done/SKILL.md`](../09-done/SKILL.md)):\n\n```bash\nnode <skill>/run-log.mjs <domain> event issue '{\"stage\":\"validate\",\"symptom\":\"npm audit: <n> high/critical advisories left\",\"cause\":\"<package>@<version> <advisory ID>: no fix through an upgrade | upgrade breaks the build; …\",\"severity\":\"high\",\"resolved\":false}'\n```\n\n## 4 — 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## 5 — 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 4–5 were skipped): `state.json` → `stage: \"deploy\"`, fresh\n`updated_at`; leave `provision` unchanged.\n"
418
418
  },
419
419
  {
420
420
  "uri": "skill://hostinger-headless/steps/08-deploy/SKILL.md",
421
- "digest": "sha256:0f3d36e77d0428edb2874e5733a774a7fa440edf68c74cca524de8177ac6047c",
422
- "size": 16826,
421
+ "digest": "sha256:2d28e17428e15cf9579a1e712ae7099969353535c32c3ab85a2527b8127bb2d9",
422
+ "size": 16915,
423
423
  "mimeType": "text/markdown",
424
- "text": "---\nname: headless-step-deploy\ndescription: \"Step 8 (deploy) of the Hostinger Headless flow. Archives the frontend source, then deploys through the connector's one-shot hosting_deploy (type nodejs — it uploads the source, runs npm install and the build on the server) with the chosen framework's build settings (appType + output dir) passed explicitly, polls to completion with hosting_get-deployment, verifies the live site and that the backend survived, then writes deploy.json.\"\n---\n\n# headless-step-deploy\n\nShip the frontend to the live domain through the Hostinger connector. You hand the connector a zip of\nthe project **source** and it uploads it, runs `npm install` + the build script on the server, and\nserves the result. **Out:** `deploy.json`.\n\nThis is an **instance-barrier** step: run it only after `provision.status == \"completed\"` and validate\n(if run) has passed. All operations go through the connector (`execute`).\n\n> **Connected to the hosted server (`mcp.hostinger.com`)?** Its `hosting_deploy` deploys Git\n> repositories only and cannot read a local `path`. Run this step through the local\n> `hostinger-api-mcp` server instead (see the connect step:\n> `<command> <launcher>`).\n\n> **With a shell and the Hostinger CLI installed**, the same deploy is one command, with the build\n> settings passed exactly as the table below says. Run it from the project, since it links the current directory:\n> `cd ~/.hostinger/<domain>/src && hostinger up --domain <domain> --type nodejs --app-type <appType> --output-directory <dir> --build-script build --node-version 22 --package-manager npm --message \"<what this deploy changes, like a commit message>\" --yes --format json`.\n> If it fails with `unknown flag: --message` (an older CLI), run `brew upgrade hostinger/tap/hostinger` or rerun it without `--message`.\n> It uploads, builds, waits and returns `data.buildUuid` and `data.buildState`; add `--no-wait` to\n> return at once and wait with `cd \"$HOME\" && node <skill>/wait.mjs build <domain> <uuid>`. Then continue at\n> \"Verify\" below. Recent CLI versions see that the site is headless (`data.headless: true`) and\n> deploy only its Node.js frontend, leaving `/cms` alone; still pass the settings above.\n\n**In:** the project in `~/.hostinger/<domain>/src/`, `site.json` (`username`, `urls`), `state.json`\n(`frontend.framework`, `frontend.rendering`).\n\n> ## ⚠️ The one rule that makes this work: pass build settings explicitly\n> If you let `hosting_deploy` **auto-detect** build settings, for a headless site that detection returns\n> **null** (`appType:null`, `outputDirectory:null`, Node 20) — the build \"completes\" but the **root\n> serves 403** (no `appType`/output → the vhost serves a directory with no entry). This is reproducible.\n> **Always pass `appType`, `outputDirectory`, `nodeVersion`, `buildScript`, `packageManager` and\n> `rootDirectory` on the `hosting_deploy` call** with the framework's values; the deploy then resolves\n> them and serves correctly, and `/cms` is preserved.\n\n## Build configurations\n\nMap `frontend.framework` (from `state.json`) to its `appType` + build output directory, and pass those\non the `hosting_deploy` call. `appType` is the framework's value, e.g. `next`, `nuxt`, `astro`,\n`svelte-kit`, `nest`, `express`, `fastify`, `react`, `create-react-app`, `gatsby`, `vite`, `vue`,\n`angular`, `parcel`, `svelte`, `other`.\n\nCommon cases (all `nodeVersion: 22`, `buildScript: \"build\"`, `packageManager: \"npm\"`, `rootDirectory: \".\"`):\n\n| Framework / mode | Local config | `appType` | `outputDirectory` |\n|---|---|---|---|\n| **Next.js — SSR** *(default)* | `output: 'standalone'` | `next` | `.next` |\n| **Nuxt — SSR** | default | `nuxt` | `.output` |\n| **SvelteKit — SSR** | node adapter | `svelte-kit` | `build` |\n| **Astro — static** | `output: 'static'` | `astro` | `dist` |\n| **Vite / React / Vue — static (SPA)** | — | `vite` (or `react`/`vue`) | `dist` |\n| **Express / NestJS / Fastify — server** | — | `express`/`nest`/`fastify` | build output dir |\n\nSSR/server frameworks run a persistent Node process (root sends `x-powered-by` / `cache-control: no-store`);\nstatic frameworks serve their output dir as files. If unsure of a framework's output dir, check the\nframework's own build output.\n\n## Step 1 — Pre-flight\n\n1. **Instance live (the deploy gate).** `provision.status == \"completed\"`, re-verified with\n `hosting_websites_list-setups { \"domain\": \"<domain>\" }`: deploy overwrites the site root, so it never\n trusts `state.json` alone.\n2. **Build output exists locally** (the framework's output dir — e.g. `.next/`, `dist/`, `.output/`) and\n the project builds clean (frontend/validate already did this). If not, go back.\n - **Next.js 16+:** `package.json`'s `build` script is `next build --webpack`, not plain `next build` —\n the server's glibc can't run Turbopack's native compiler, and Turbopack doesn't fall back to webpack\n (see `../06-frontend/SKILL.md` Step 3). On Next.js 15.x leave it as plain `next build`. Fix it here if it isn't.\n3. **PocketBase: nothing under `/api` or `/_`.** The app serves no route under those\n prefixes, whatever its framework (Next.js `app/api/` or `pages/api/`, Nuxt `server/api/`, SvelteKit\n `src/routes/api/`, Astro `src/pages/api/`, an Express or Fastify route), and `src/` holds no\n `.pocketbase/` folder or `credentials.json`. Fix it here if it does.\n4. **Env vars (only if used).** Build-time vars (e.g. `NEXT_PUBLIC_*`) must be set **before** the build\n with `hosting_nodejs_replace-environment-variables` (full replace: list the current keys first and\n send the complete set). Never put secrets in the repo or the archive. On PocketBase, server-side\n superuser work reads `PB_URL`, `PB_SUPERUSER_EMAIL` and `PB_SUPERUSER_PASSWORD` from here (the\n values come from `~/.hostinger/<domain>/.pocketbase/credentials.json`, never from the archive).\n\n## Step 2 — Archive the source\n\nZip the project **source** with `package.json` at the archive root. **Include** the app/source,\n`public/`, the framework config (`next.config.mjs` / `astro.config.mjs`), `tsconfig.json`,\n`package.json`, `package-lock.json`, `.nvmrc`. **Exclude** `node_modules/`, the build output\n(`.next/`, `dist/`, `out/`), `.git/`, and any `.htaccess` — the server installs and builds from source.\n**Never archive secrets:** the commands below also leave out `.env*` files, `.npmrc` and key/certificate\nfiles (`*.pem`, `*.key`, `*.p12`, `*.pfx`) and any `.pocketbase/` folder. A brought-in project often has a `.env.local`; its values go in\nas environment variables (Step 1), never in the archive. `hosting_deploy` also skips any file named\n`credentials.json` itself and lists it in `skippedFiles`.\n\n> ## ⚠️ Write the archive outside `~/.hostinger/` (the deploy refuses it there)\n> `hosting_deploy` refuses any `path` under a hidden folder at the top of the home directory\n> (`~/.hostinger`, `~/.config`, …) with *\"it is, or contains, a home, system or credentials location\"*:\n> a deploy publishes what it reads, so the connector protects dotfolders that can hold tokens. That\n> covers both `~/.hostinger/<domain>/app.zip` **and** the `~/.hostinger/<domain>/src/` directory\n> itself, so neither can be passed as `path`. Keep the source in the workspace as usual, but write the\n> archive to a fresh temp directory and pass that. Don't copy the archive somewhere else after a\n> refusal, and don't move `src/` out of the workspace.\n\n```bash\n# macOS/Linux — the OS temp dir is outside the home directory\ncd ~/.hostinger/<domain>/src\nDEPLOY_DIR=$(mktemp -d)\nzip -r -X \"$DEPLOY_DIR/app.zip\" . -x 'node_modules/*' '.next/*' 'dist/*' 'out/*' '.git/*' '**/.htaccess' \\\n '.env*' '*/.env*' '.npmrc' '*/.npmrc' '*.pem' '*.key' '*.p12' '*.pfx' '.pocketbase/*' '*/.pocketbase/*'\necho \"$DEPLOY_DIR/app.zip\" # the absolute path to pass as `path` in Step 3\n```\n\n```powershell\n# Windows PowerShell — %TEMP% sits under AppData, which the deploy also refuses; use a plain folder in your\n# profile, which only you can write to (never a folder under C:\\, which every local account can write into)\ncd $HOME\\.hostinger\\<domain>\\src\n$DeployDir = Join-Path $HOME \"hostinger-deploy\\<domain>\"; New-Item -ItemType Directory -Force $DeployDir | Out-Null\ntar -a -cf \"$DeployDir\\app.zip\" --exclude=node_modules --exclude=.next --exclude=dist --exclude=out --exclude=.git --exclude=.htaccess `\n --exclude=.env* --exclude=.npmrc --exclude=*.pem --exclude=*.key --exclude=*.p12 --exclude=*.pfx --exclude=.pocketbase .\n\"$DeployDir\\app.zip\" # the absolute path to pass as `path` in Step 3\n```\n\nDelete the temp directory once the build in Step 4 is `completed`.\n\n## Step 3 — Deploy (one shot: settings + upload + build)\n\nPass the framework's build settings **inline** on the deploy call — there is no separate settings step.\n`path` is the absolute path of the archive from Step 2, in its temp directory. Never pass a path under\n`~/.hostinger/`, the `src/` directory included: the deploy refuses it (see Step 2).\n`message` says what this deploy ships, written like a commit message (first line under 72 characters,\nat most 500): it labels the deploy in the website's deployment history, which otherwise shows only the\narchive's file name.\n\n```json\n{ \"operation\": \"hosting_deploy\",\n \"params\": {\n \"domain\": \"<domain>\",\n \"path\": \"<absolute path printed in Step 2, e.g. /var/folders/…/tmp.XXXX/app.zip>\",\n \"type\": \"nodejs\",\n \"appType\": \"<framework appType, e.g. next>\",\n \"outputDirectory\": \"<framework output dir, e.g. .next>\",\n \"nodeVersion\": 22,\n \"buildScript\": \"build\",\n \"packageManager\": \"npm\",\n \"rootDirectory\": \".\",\n \"message\": \"<one-line summary of what this deploy ships, e.g. Add pricing page>\" } }\n```\n\n`hosting_deploy` uploads the source and triggers `npm install` + the build **end-to-end** — do not call\nany upload or build operation yourself. It returns a build `buildUuid` at once. This **overwrites the\nwebsite root** (expected) and keeps the backend's paths intact (`/cms` for WordPress; `/api` and `/_/`\nfor PocketBase). `type` is always `\"nodejs\"` for a headless site, with the explicit `appType`/`outputDirectory` from\n*Build configurations* —\n**never `\"static\"`**, which serves the build as plain files over the document root and **overwrites\n`/cms`**, destroying the WordPress backend, and would likewise break the routing that keeps `/api` and\n`/_/` on a PocketBase backend. A static-built SPA (Vite/React/Vue) still deploys as\n`type: \"nodejs\"` with its `appType`.\n\n## Step 4 — Wait for the build and the live root\n\nWait for it in one command (see *Waiting on Hostinger* in the top-level `SKILL.md`):\n\n```bash\ncd \"$HOME\" && node <skill>/wait.mjs build <domain> <buildUuid>\n```\n\nIt waits for `hosting_get-deployment` to report the build `completed`, then up to 5 minutes for\n`https://<domain>/` (or `http://` while the certificate is pending) to serve 200. What its result means here:\n\n- `ok: true`: the build is done and the root serves 200. Go on to Step 5.\n- `ok: true` with `https_pending: true`: the build is done and `http://<domain>/` serves 200, but the\n new domain's SSL certificate is still installing (this can take the better part of an hour). The\n deploy worked: tell the user HTTPS will follow on its own, run Step 5 over `http://`, and don't\n wait for the certificate.\n- `ok: false` with `build.state: failed`: read `log_tail` (the end of the build log) and `analysis`, fix\n locally, re-archive and redeploy (pass `fromLine` to `hosting_get-deployment` to read only new log\n output).\n- `ok: false` with `build settings missing`: the settings didn't take (the root would 403 for good). Fix\n the deploy call and redeploy.\n- `ok: false` with `timed_out`: `last_status` says whether the build was still running or the root\n wasn't serving 200 yet (see Step 5's note on a 403). For an SSR app that built but hangs,\n `hosting_nodejs_restart-application { username, domain }` recovers the server without a rebuild.\n\n## Step 5 — Verify the live site (all must pass)\n\n| Check | How | Expect |\n|---|---|---|\n| Root serves | `GET https://<domain>/` | **200** (not 403 / 404) |\n| SSR is live *(server frameworks)* | response headers | `x-powered-by` present, `cache-control: no-store` |\n| Static serves *(static frameworks)* | `GET https://<domain>/` | 200 HTML with real home content |\n| Key routes | a couple of planned routes + one deep route | 200, real content |\n| **Backend survived** *(WordPress / WooCommerce)* | `GET https://<domain>/cms/wp-json/wp/v2/posts?per_page=1` | 200 |\n| **Backend survived** *(PocketBase)* | `GET https://<domain>/api/health` and `GET https://<domain>/_/` | 200 and 200 |\n| **No credentials served** *(PocketBase)* | `GET https://<domain>/.pocketbase/credentials.json` | 404 |\n\n> **Only WordPress (including WordPress + WooCommerce) has a `/cms` on the domain**, and only PocketBase\n> has `/api` and `/_/`, so the *Backend survived* check depends on the backend.\n> - **WordPress + WooCommerce:** also confirm the store survived the deploy —\n> `GET https://<domain>/cms/wp-json/wc/store/v1/products?per_page=1` → 200. There is nothing external to\n> link (no sales-channel step — that's Ecommerce only). **Checkout** stays owner-completed: when\n> `site.json → woocommerce.payment_enabled` is `false`, don't test `/checkout`; a catalog that serves 200\n> is a passing, complete deploy.\n> - **Ecommerce:** the backend is the **Hostinger Ecommerce store**, read over the external Storefront API\n> (`api-ecommerce.hostinger.com`) — nothing a deploy touches lives on this domain. There is no `/cms`;\n> confirm the storefront still fetches products as a frontend check if you like. **Only check that\n> checkout can be reached when `site.json → ecommerce.payment_enabled` is `true`** — on a free account\n> (`payment_enabled: false`) there is no checkout, so **skip that check entirely**; a catalog that serves\n> 200 is a passing, complete deploy. Never fail or hold the deploy because checkout is unavailable.\n> - **PocketBase** (`site.json → backend: \"pocketbase\"`): the backend lives on this domain at `/api`\n> and `/_`, so check both survived and that the credentials URL is a 404, then run\n> `node <skill>/steps/04-content-model/pocketbase/scripts/pb-verify.mjs ~/.hostinger/<domain>/.pocketbase/credentials.json ~/.hostinger/<domain>/pocketbase/schema.json`\n> and expect `READY` (its last check, the website serving the app, now passes). If `/api/health`\n> fails while the root serves the app, the app is answering `/api`: move its routes off that prefix\n> and redeploy. If the credentials URL returns anything but 404, rotate the superuser at once\n> (`hosting_pocketbase_set-superuser`, see `../03-provision/pocketbase/SKILL.md` Step 3) and\n> redeploy without the file.\n\nThe root check is already done when `wait.mjs build` returned `ok: true`; check the rest in one shell\ncommand (`curl` each URL). A `completed` build whose root 403s almost always means the build settings\nweren't passed to `hosting_deploy` (null settings) — pass them and redeploy. Caching can briefly serve a\nstale root; re-check after ~30 s.\n\n## Step 6 — Record `deploy.json`\n\n```json\n{\n \"build_uuid\": \"…\",\n \"stack\": \"nextjs\",\n \"rendering\": \"ssr\",\n \"app_type\": \"next\",\n \"output_directory\": \".next\",\n \"node_version\": 22,\n \"method\": \"hosting_deploy (type: nodejs, settings passed inline)\",\n \"deployed_at\": \"…\",\n \"verified_at\": \"…\",\n \"urls\": { \"live\": \"https://<domain>\", \"cms\": \"https://<domain>/cms\" },\n \"checks\": { \"root\": 200, \"ssr_headers\": true, \"backend_preserved\": true }\n}\n```\n\nNo secrets in `deploy.json`. The `urls.cms` field and the `backend_preserved` check above are\n**WordPress-only** — adjust the record to the backend:\n\n- **WordPress:** keep `urls.cms` and `checks.backend_preserved` as shown.\n- **WordPress + WooCommerce:** keep `urls.cms` + `checks.backend_preserved` (it *is* WordPress), and add\n `urls.store_api` from `site.json`; no external link step.\n- **Ecommerce:** omit `urls.cms`/`backend_preserved`; record the store URLs instead (`urls.storefront_api`,\n `urls.store_admin` from `site.json`) and link the custom sales channel to the live domain —\n `ecommerce_sales-channels_update { store_id, sales_channel_id, url }` (see the ecommerce provision step).\n- **PocketBase:** omit `urls.cms`; add `urls.api` and `urls.admin` from `site.json`,\n `checks.backend_preserved` (the `/api/health` and `/_/` checks) and `checks.pb_verify: \"READY\"`.\n\nUpdate `state.json` (`stage` → `done`), then continue to Step 9 (done).\n\n`hosting_deploy` on the local server is the only path: give its `path` a local **archive** (`zip`, `tar`,\n`tar.gz`, `tgz`, `7z`) written outside `~/.hostinger/` as in Step 2. There is no separate upload or\nbuild step to fall back to.\n"
424
+ "text": "---\nname: headless-step-deploy\ndescription: \"Step 8 (deploy) of the Hostinger Headless flow. Archives the frontend source, then deploys through the connector's one-shot hosting_deploy (type nodejs — it uploads the source, runs npm install and the build on the server) with the chosen framework's build settings (appType + output dir) passed explicitly, polls to completion with hosting_get-deployment, verifies the live site and that the backend survived, then writes deploy.json.\"\n---\n\n# headless-step-deploy\n\nShip the frontend to the live domain through the Hostinger connector. You hand the connector a zip of\nthe project **source** and it uploads it, runs `npm install` + the build script on the server, and\nserves the result. **Out:** `deploy.json`.\n\nThis is an **instance-barrier** step: run it only after `provision.status == \"completed\"` and validate\nhas passed (on a first deploy that includes its dependency audit, even when the rest of validate is\nskipped). All operations go through the connector (`execute`).\n\n> **Connected to the hosted server (`mcp.hostinger.com`)?** Its `hosting_deploy` deploys Git\n> repositories only and cannot read a local `path`. Run this step through the local\n> `hostinger-api-mcp` server instead (see the connect step:\n> `<command> <launcher>`).\n\n> **With a shell and the Hostinger CLI installed**, the same deploy is one command, with the build\n> settings passed exactly as the table below says. Run it from the project, since it links the current directory:\n> `cd ~/.hostinger/<domain>/src && hostinger up --domain <domain> --type nodejs --app-type <appType> --output-directory <dir> --build-script build --node-version 22 --package-manager npm --message \"<what this deploy changes, like a commit message>\" --yes --format json`.\n> If it fails with `unknown flag: --message` (an older CLI), run `brew upgrade hostinger/tap/hostinger` or rerun it without `--message`.\n> It uploads, builds, waits and returns `data.buildUuid` and `data.buildState`; add `--no-wait` to\n> return at once and wait with `cd \"$HOME\" && node <skill>/wait.mjs build <domain> <uuid>`. Then continue at\n> \"Verify\" below. Recent CLI versions see that the site is headless (`data.headless: true`) and\n> deploy only its Node.js frontend, leaving `/cms` alone; still pass the settings above.\n\n**In:** the project in `~/.hostinger/<domain>/src/`, `site.json` (`username`, `urls`), `state.json`\n(`frontend.framework`, `frontend.rendering`).\n\n> ## ⚠️ The one rule that makes this work: pass build settings explicitly\n> If you let `hosting_deploy` **auto-detect** build settings, for a headless site that detection returns\n> **null** (`appType:null`, `outputDirectory:null`, Node 20) — the build \"completes\" but the **root\n> serves 403** (no `appType`/output → the vhost serves a directory with no entry). This is reproducible.\n> **Always pass `appType`, `outputDirectory`, `nodeVersion`, `buildScript`, `packageManager` and\n> `rootDirectory` on the `hosting_deploy` call** with the framework's values; the deploy then resolves\n> them and serves correctly, and `/cms` is preserved.\n\n## Build configurations\n\nMap `frontend.framework` (from `state.json`) to its `appType` + build output directory, and pass those\non the `hosting_deploy` call. `appType` is the framework's value, e.g. `next`, `nuxt`, `astro`,\n`svelte-kit`, `nest`, `express`, `fastify`, `react`, `create-react-app`, `gatsby`, `vite`, `vue`,\n`angular`, `parcel`, `svelte`, `other`.\n\nCommon cases (all `nodeVersion: 22`, `buildScript: \"build\"`, `packageManager: \"npm\"`, `rootDirectory: \".\"`):\n\n| Framework / mode | Local config | `appType` | `outputDirectory` |\n|---|---|---|---|\n| **Next.js — SSR** *(default)* | `output: 'standalone'` | `next` | `.next` |\n| **Nuxt — SSR** | default | `nuxt` | `.output` |\n| **SvelteKit — SSR** | node adapter | `svelte-kit` | `build` |\n| **Astro — static** | `output: 'static'` | `astro` | `dist` |\n| **Vite / React / Vue — static (SPA)** | — | `vite` (or `react`/`vue`) | `dist` |\n| **Express / NestJS / Fastify — server** | — | `express`/`nest`/`fastify` | build output dir |\n\nSSR/server frameworks run a persistent Node process (root sends `x-powered-by` / `cache-control: no-store`);\nstatic frameworks serve their output dir as files. If unsure of a framework's output dir, check the\nframework's own build output.\n\n## Step 1 — Pre-flight\n\n1. **Instance live (the deploy gate).** `provision.status == \"completed\"`, re-verified with\n `hosting_websites_list-setups { \"domain\": \"<domain>\" }`: deploy overwrites the site root, so it never\n trusts `state.json` alone.\n2. **Build output exists locally** (the framework's output dir — e.g. `.next/`, `dist/`, `.output/`) and\n the project builds clean (frontend/validate already did this). If not, go back.\n - **Next.js 16+:** `package.json`'s `build` script is `next build --webpack`, not plain `next build` —\n the server's glibc can't run Turbopack's native compiler, and Turbopack doesn't fall back to webpack\n (see `../06-frontend/SKILL.md` Step 3). On Next.js 15.x leave it as plain `next build`. Fix it here if it isn't.\n3. **PocketBase: nothing under `/api` or `/_`.** The app serves no route under those\n prefixes, whatever its framework (Next.js `app/api/` or `pages/api/`, Nuxt `server/api/`, SvelteKit\n `src/routes/api/`, Astro `src/pages/api/`, an Express or Fastify route), and `src/` holds no\n `.pocketbase/` folder or `credentials.json`. Fix it here if it does.\n4. **Env vars (only if used).** Build-time vars (e.g. `NEXT_PUBLIC_*`) must be set **before** the build\n with `hosting_nodejs_replace-environment-variables` (full replace: list the current keys first and\n send the complete set). Never put secrets in the repo or the archive. On PocketBase, server-side\n superuser work reads `PB_URL`, `PB_SUPERUSER_EMAIL` and `PB_SUPERUSER_PASSWORD` from here (the\n values come from `~/.hostinger/<domain>/.pocketbase/credentials.json`, never from the archive).\n\n## Step 2 — Archive the source\n\nZip the project **source** with `package.json` at the archive root. **Include** the app/source,\n`public/`, the framework config (`next.config.mjs` / `astro.config.mjs`), `tsconfig.json`,\n`package.json`, `package-lock.json`, `.nvmrc`. **Exclude** `node_modules/`, the build output\n(`.next/`, `dist/`, `out/`), `.git/`, and any `.htaccess` — the server installs and builds from source.\n**Never archive secrets:** the commands below also leave out `.env*` files, `.npmrc` and key/certificate\nfiles (`*.pem`, `*.key`, `*.p12`, `*.pfx`) and any `.pocketbase/` folder. A brought-in project often has a `.env.local`; its values go in\nas environment variables (Step 1), never in the archive. `hosting_deploy` also skips any file named\n`credentials.json` itself and lists it in `skippedFiles`.\n\n> ## ⚠️ Write the archive outside `~/.hostinger/` (the deploy refuses it there)\n> `hosting_deploy` refuses any `path` under a hidden folder at the top of the home directory\n> (`~/.hostinger`, `~/.config`, …) with *\"it is, or contains, a home, system or credentials location\"*:\n> a deploy publishes what it reads, so the connector protects dotfolders that can hold tokens. That\n> covers both `~/.hostinger/<domain>/app.zip` **and** the `~/.hostinger/<domain>/src/` directory\n> itself, so neither can be passed as `path`. Keep the source in the workspace as usual, but write the\n> archive to a fresh temp directory and pass that. Don't copy the archive somewhere else after a\n> refusal, and don't move `src/` out of the workspace.\n\n```bash\n# macOS/Linux — the OS temp dir is outside the home directory\ncd ~/.hostinger/<domain>/src\nDEPLOY_DIR=$(mktemp -d)\nzip -r -X \"$DEPLOY_DIR/app.zip\" . -x 'node_modules/*' '.next/*' 'dist/*' 'out/*' '.git/*' '**/.htaccess' \\\n '.env*' '*/.env*' '.npmrc' '*/.npmrc' '*.pem' '*.key' '*.p12' '*.pfx' '.pocketbase/*' '*/.pocketbase/*'\necho \"$DEPLOY_DIR/app.zip\" # the absolute path to pass as `path` in Step 3\n```\n\n```powershell\n# Windows PowerShell — %TEMP% sits under AppData, which the deploy also refuses; use a plain folder in your\n# profile, which only you can write to (never a folder under C:\\, which every local account can write into)\ncd $HOME\\.hostinger\\<domain>\\src\n$DeployDir = Join-Path $HOME \"hostinger-deploy\\<domain>\"; New-Item -ItemType Directory -Force $DeployDir | Out-Null\ntar -a -cf \"$DeployDir\\app.zip\" --exclude=node_modules --exclude=.next --exclude=dist --exclude=out --exclude=.git --exclude=.htaccess `\n --exclude=.env* --exclude=.npmrc --exclude=*.pem --exclude=*.key --exclude=*.p12 --exclude=*.pfx --exclude=.pocketbase .\n\"$DeployDir\\app.zip\" # the absolute path to pass as `path` in Step 3\n```\n\nDelete the temp directory once the build in Step 4 is `completed`.\n\n## Step 3 — Deploy (one shot: settings + upload + build)\n\nPass the framework's build settings **inline** on the deploy call — there is no separate settings step.\n`path` is the absolute path of the archive from Step 2, in its temp directory. Never pass a path under\n`~/.hostinger/`, the `src/` directory included: the deploy refuses it (see Step 2).\n`message` says what this deploy ships, written like a commit message (first line under 72 characters,\nat most 500): it labels the deploy in the website's deployment history, which otherwise shows only the\narchive's file name.\n\n```json\n{ \"operation\": \"hosting_deploy\",\n \"params\": {\n \"domain\": \"<domain>\",\n \"path\": \"<absolute path printed in Step 2, e.g. /var/folders/…/tmp.XXXX/app.zip>\",\n \"type\": \"nodejs\",\n \"appType\": \"<framework appType, e.g. next>\",\n \"outputDirectory\": \"<framework output dir, e.g. .next>\",\n \"nodeVersion\": 22,\n \"buildScript\": \"build\",\n \"packageManager\": \"npm\",\n \"rootDirectory\": \".\",\n \"message\": \"<one-line summary of what this deploy ships, e.g. Add pricing page>\" } }\n```\n\n`hosting_deploy` uploads the source and triggers `npm install` + the build **end-to-end** — do not call\nany upload or build operation yourself. It returns a build `buildUuid` at once. This **overwrites the\nwebsite root** (expected) and keeps the backend's paths intact (`/cms` for WordPress; `/api` and `/_/`\nfor PocketBase). `type` is always `\"nodejs\"` for a headless site, with the explicit `appType`/`outputDirectory` from\n*Build configurations* —\n**never `\"static\"`**, which serves the build as plain files over the document root and **overwrites\n`/cms`**, destroying the WordPress backend, and would likewise break the routing that keeps `/api` and\n`/_/` on a PocketBase backend. A static-built SPA (Vite/React/Vue) still deploys as\n`type: \"nodejs\"` with its `appType`.\n\n## Step 4 — Wait for the build and the live root\n\nWait for it in one command (see *Waiting on Hostinger* in the top-level `SKILL.md`):\n\n```bash\ncd \"$HOME\" && node <skill>/wait.mjs build <domain> <buildUuid>\n```\n\nIt waits for `hosting_get-deployment` to report the build `completed`, then up to 5 minutes for\n`https://<domain>/` (or `http://` while the certificate is pending) to serve 200. What its result means here:\n\n- `ok: true`: the build is done and the root serves 200. Go on to Step 5.\n- `ok: true` with `https_pending: true`: the build is done and `http://<domain>/` serves 200, but the\n new domain's SSL certificate is still installing (this can take the better part of an hour). The\n deploy worked: tell the user HTTPS will follow on its own, run Step 5 over `http://`, and don't\n wait for the certificate.\n- `ok: false` with `build.state: failed`: read `log_tail` (the end of the build log) and `analysis`, fix\n locally, re-archive and redeploy (pass `fromLine` to `hosting_get-deployment` to read only new log\n output).\n- `ok: false` with `build settings missing`: the settings didn't take (the root would 403 for good). Fix\n the deploy call and redeploy.\n- `ok: false` with `timed_out`: `last_status` says whether the build was still running or the root\n wasn't serving 200 yet (see Step 5's note on a 403). For an SSR app that built but hangs,\n `hosting_nodejs_restart-application { username, domain }` recovers the server without a rebuild.\n\n## Step 5 — Verify the live site (all must pass)\n\n| Check | How | Expect |\n|---|---|---|\n| Root serves | `GET https://<domain>/` | **200** (not 403 / 404) |\n| SSR is live *(server frameworks)* | response headers | `x-powered-by` present, `cache-control: no-store` |\n| Static serves *(static frameworks)* | `GET https://<domain>/` | 200 HTML with real home content |\n| Key routes | a couple of planned routes + one deep route | 200, real content |\n| **Backend survived** *(WordPress / WooCommerce)* | `GET https://<domain>/cms/wp-json/wp/v2/posts?per_page=1` | 200 |\n| **Backend survived** *(PocketBase)* | `GET https://<domain>/api/health` and `GET https://<domain>/_/` | 200 and 200 |\n| **No credentials served** *(PocketBase)* | `GET https://<domain>/.pocketbase/credentials.json` | 404 |\n\n> **Only WordPress (including WordPress + WooCommerce) has a `/cms` on the domain**, and only PocketBase\n> has `/api` and `/_/`, so the *Backend survived* check depends on the backend.\n> - **WordPress + WooCommerce:** also confirm the store survived the deploy —\n> `GET https://<domain>/cms/wp-json/wc/store/v1/products?per_page=1` → 200. There is nothing external to\n> link (no sales-channel step — that's Ecommerce only). **Checkout** stays owner-completed: when\n> `site.json → woocommerce.payment_enabled` is `false`, don't test `/checkout`; a catalog that serves 200\n> is a passing, complete deploy.\n> - **Ecommerce:** the backend is the **Hostinger Ecommerce store**, read over the external Storefront API\n> (`api-ecommerce.hostinger.com`) — nothing a deploy touches lives on this domain. There is no `/cms`;\n> confirm the storefront still fetches products as a frontend check if you like. **Only check that\n> checkout can be reached when `site.json → ecommerce.payment_enabled` is `true`** — on a free account\n> (`payment_enabled: false`) there is no checkout, so **skip that check entirely**; a catalog that serves\n> 200 is a passing, complete deploy. Never fail or hold the deploy because checkout is unavailable.\n> - **PocketBase** (`site.json → backend: \"pocketbase\"`): the backend lives on this domain at `/api`\n> and `/_`, so check both survived and that the credentials URL is a 404, then run\n> `node <skill>/steps/04-content-model/pocketbase/scripts/pb-verify.mjs ~/.hostinger/<domain>/.pocketbase/credentials.json ~/.hostinger/<domain>/pocketbase/schema.json`\n> and expect `READY` (its last check, the website serving the app, now passes). If `/api/health`\n> fails while the root serves the app, the app is answering `/api`: move its routes off that prefix\n> and redeploy. If the credentials URL returns anything but 404, rotate the superuser at once\n> (`hosting_pocketbase_set-superuser`, see `../03-provision/pocketbase/SKILL.md` Step 3) and\n> redeploy without the file.\n\nThe root check is already done when `wait.mjs build` returned `ok: true`; check the rest in one shell\ncommand (`curl` each URL). A `completed` build whose root 403s almost always means the build settings\nweren't passed to `hosting_deploy` (null settings) — pass them and redeploy. Caching can briefly serve a\nstale root; re-check after ~30 s.\n\n## Step 6 — Record `deploy.json`\n\n```json\n{\n \"build_uuid\": \"…\",\n \"stack\": \"nextjs\",\n \"rendering\": \"ssr\",\n \"app_type\": \"next\",\n \"output_directory\": \".next\",\n \"node_version\": 22,\n \"method\": \"hosting_deploy (type: nodejs, settings passed inline)\",\n \"deployed_at\": \"…\",\n \"verified_at\": \"…\",\n \"urls\": { \"live\": \"https://<domain>\", \"cms\": \"https://<domain>/cms\" },\n \"checks\": { \"root\": 200, \"ssr_headers\": true, \"backend_preserved\": true }\n}\n```\n\nNo secrets in `deploy.json`. The `urls.cms` field and the `backend_preserved` check above are\n**WordPress-only** — adjust the record to the backend:\n\n- **WordPress:** keep `urls.cms` and `checks.backend_preserved` as shown.\n- **WordPress + WooCommerce:** keep `urls.cms` + `checks.backend_preserved` (it *is* WordPress), and add\n `urls.store_api` from `site.json`; no external link step.\n- **Ecommerce:** omit `urls.cms`/`backend_preserved`; record the store URLs instead (`urls.storefront_api`,\n `urls.store_admin` from `site.json`) and link the custom sales channel to the live domain —\n `ecommerce_sales-channels_update { store_id, sales_channel_id, url }` (see the ecommerce provision step).\n- **PocketBase:** omit `urls.cms`; add `urls.api` and `urls.admin` from `site.json`,\n `checks.backend_preserved` (the `/api/health` and `/_/` checks) and `checks.pb_verify: \"READY\"`.\n\nUpdate `state.json` (`stage` → `done`), then continue to Step 9 (done).\n\n`hosting_deploy` on the local server is the only path: give its `path` a local **archive** (`zip`, `tar`,\n`tar.gz`, `tgz`, `7z`) written outside `~/.hostinger/` as in Step 2. There is no separate upload or\nbuild step to fall back to.\n"
425
425
  },
426
426
  {
427
427
  "uri": "skill://hostinger-headless/steps/09-done/SKILL.md",
428
- "digest": "sha256:cb98c694c7ef4934ed934d913f4fa8f39a112654c95b7d2cf2cb3b5ae4e42a2e",
429
- "size": 14243,
428
+ "digest": "sha256:10396463d13ee9b19e2aac6c193b32cc6d68240573e0fa0befaba2b46596bb1e",
429
+ "size": 15634,
430
430
  "mimeType": "text/markdown",
431
- "text": "---\nname: headless-step-done\ndescription: \"Step 9 (done) of the Hostinger Headless flow. Verifies the live site, then hands over the URLs (hPanel success page, main site, WordPress/store admin, dashboard), opens the success page in the browser on a successful run, and gives a summary of what was built plus explicit next steps — how to log in to wp-admin and reset the password, how to manage content, and how to finish WooCommerce/store setup so it can take orders. Its final report format is also used whenever a run stops early.\"\n---\n\n# headless-step-done\n\nVerify the live site, then hand over the URLs (success page, main site, WordPress admin, dashboard), a\nsummary of what was built, and what the user can do next. **On a successful run, open the success page\nfor the user** (see *Open the success page*).\n\n## Final report\n\nEvery run ends with this report, whether it finishes here or stops at an earlier stage (a dummy or\nmissing step, a failed provision, the user pausing). On a run that deployed this session, run the\nchecks in *Verify the live site* below first. Build the report from `state.json`, `site.json`,\n`deploy.json` and what you actually did and checked in this run. Report only what you verified. Don't\nclaim a stage passed if you didn't check it.\n\nWrite it in this order:\n\n1. **One-paragraph outcome.** What was created and on which domain (bold it). If the run stopped\n early, name the stage it stopped at, why, and what the user will see right now (e.g. \"the site\n root returns 403 until the frontend is deployed\").\n\n2. **Steps completed.** This table is required on every run, including early stops: never replace\n it with prose. Give one row per stage that ran, using the stage numbers and names from the\n orchestrator's flow table. Leave out stages that didn't run and name them in the outcome\n paragraph instead. A finished WordPress blog build looks like this:\n\n | Stage | Result |\n |---|---|\n | connect | Hostinger connector reached over MCP (`@hostinger/mcp` 1.9.2); signed in through the browser login. |\n | 1 check state | New build for `harbourlight.blog`; no earlier workspace. |\n | 2 refine | Personal travel blog about coastal towns in the UK; backend: WordPress. |\n | 3 provision | Business plan, order 41875230; setup took 6 min; domain, SSL and WordPress checks passed. |\n | 4 content model | 5 pages, 8 posts, 6 categories, 1 menu, 14 images (Hostinger AI), SEO titles on every page; counts re-read from the REST API. |\n | 5 design | \"Salt & Ink\" direction: serif headings, sea-blue accents; `design.md` and logo icon written. |\n | 6 frontend | Next.js SSR with home, blog, post, category and contact pages wired to the REST API; local build passed. |\n | 7 validate | Instance setup completed; REST API returned the 8 pushed posts; no preview (nobody signing off). |\n | 8 deploy | Source uploaded, build finished in 3 min; site root returns 200. |\n | 9 done | Main site, wp-admin and REST API re-checked live: all returned 200. |\n\n3. **Links** — every URL that exists at this point. Build the hPanel URLs from `site.json`\n (`order_id`, `username`, `domain`) and the onboarding slug; take the rest from `site.json` /\n `deploy.json`. Lead with the one the user cares about most — the **main site** — then the admin\n and dashboards. **Don't list the success page here:** it opens on its own (see *Open the success\n page*), so printing its URL in the report is just noise — the only exception is when a browser\n can't be opened (handled in that section):\n\n - **Main site (live):** `urls.site` (`https://<domain>`) — only once deployed.\n - **WordPress admin (one-click auto-login):** for a WordPress backend, **mint and hand over the\n auto-login redirect URL** — `wordpress_login_create-links { username, software: <site.json\n wordpress.install_id> }` returns a temporary link that logs the user straight into wp-admin. Give\n that URL as the admin link (it lands on `/cms/wp-admin`), so the user never needs a password.\n Alongside it, give the two ways back in that don't expire: the **login URL `{urls.wp_admin}`**\n (`https://<domain>/cms/wp-admin` — the headless WordPress lives under `/cms`), and the **WP Admin\n button in hPanel** (hPanel → the website → *WP Admin*). Note how to **reset the password**: on the\n `/cms/wp-admin` login screen use **\"Lost your password?\"**, and WordPress emails a reset link to the\n **WordPress admin email** (the address set at install, which the owner already has). Optionally, for\n more reliable delivery, they can create a mailbox on the domain (hPanel → *Emails*) and set it as the\n admin address in **wp-admin → Settings → General**.\n **Never print or store a password.** For a **WordPress + WooCommerce** store, this *same* wp-admin\n login is the store admin (wp-admin → WooCommerce → Products/Orders) — do **not** use the Ecommerce\n `store_admin` path; the store setup the owner still needs is spelled out under *Next steps*. For a\n Hostinger **Ecommerce** store, link the store admin from `urls.store_admin` instead.\n - **PocketBase dashboard** (a PocketBase backend): `urls.admin` (`https://<domain>/_/`). Give\n the owner the **login access** in three lines: the sign-in email (`site.json →\n pocketbase.superuser_email`, by default the website owner's email), the full path of the\n credentials file (`~/.hostinger/<domain>/.pocketbase/credentials.json`, which holds\n `superuser_email` and `superuser_password`), and one command to read it (`cat <that path>`).\n **Name the file, never paste the password**, and tell them to move both into their password\n manager, since Hostinger can't show the password again. Say that this is the owner's\n superuser login, not a member account: members sign up on the site and live in the `users`\n collection. A lost password is reset by asking the agent to rotate the superuser\n (`hosting_pocketbase_set-superuser`), which saves a new password to the same file.\n - **hPanel site dashboard:** `https://hpanel.hostinger.com/websites/<domain>` (the headless website\n is installed by now).\n - **Onboarding (resume):** `https://hpanel.hostinger.com/headless-onboarding/<order_id>/<username>/`\n - **REST API** (for developers): `urls.rest_api`, or `urls.api` on PocketBase.\n\n > URL shape note: `<username>` may be dropped from the onboarding/success URLs in a future hPanel\n > release. If a built URL 404s, retry the same path without the `/<username>` segment before\n > reporting it as broken.\n\n4. **Next steps** — what the user does now to actually use the site. Required on a successful run;\n tailor the bullets to the backend and keep them concrete. This is the hand-holding the hPanel\n success page can't give: don't just link wp-admin, tell them what to do once they're in.\n\n - **Manage content (WordPress):** in wp-admin (the one-click link, the `/cms/wp-admin` login URL, or\n hPanel → *WP Admin*) → **Posts**, **Pages**, **Media**, **Appearance → Menus**. Say how edits reach\n the live site for *this* build: an **SSR** frontend re-reads the REST API each request, so changes\n show up with no redeploy; an **SSG/static** build must be redeployed to pick up new content (read\n `state.json → frontend.rendering`).\n - **WordPress + WooCommerce — finish store setup so it can take orders.** The catalog and cart already\n work, but **checkout stays off until the owner configures it in wp-admin**: WooCommerce → Settings →\n **Payments** (enable at least one method) and → **Shipping** (add a zone with a rate), then confirm\n products/prices and place a test order. When `site.json → woocommerce.payment_enabled` is `false`,\n state plainly that this step is **required before any purchase works** — this is the gap owners hit.\n - **Hostinger Ecommerce store:** when `site.json → ecommerce.payment_enabled` is `false`, finish\n payment setup in the store admin (`urls.store_admin`) before the storefront can sell; otherwise it's\n ready to take orders.\n - **PocketBase:** manage the app from hPanel → the website (environment variables, deployments,\n logs). Say in plain words who can do what, one line per kind of data from\n `pocketbase/schema.json` (e.g. \"anyone can book a free place; only you can see who booked\"), and\n that everything visitors enter is in the dashboard (`/_/`) → *Collections*. Then the two things\n only the owner can set there: **Settings → Mail settings** (SMTP) before password-reset or\n verification emails can be sent — required when visitors have accounts — and **Settings →\n Backups**. Data changes show up live; a schema change needs no redeploy.\n\n5. **Where state lives** — the workspace path `~/.hostinger/<domain>/`, the `stage` that a\n resumed run will start from, and the build report `~/.hostinger/<domain>/report.html`.\n\n6. **Gaps / follow-ups** (only if any) — a short numbered list of anything skipped, approximated or\n left for the user (e.g. no images generated, default WordPress content left in place).\n\nNever include passwords, JWTs or other secrets in the report. For wp-admin access, give the URL and\noffer a one-click login link (`wordpress_login_create-links`), not credentials.\n\n## Verify the live site (brief)\n\nOn a run that deployed this session, re-confirm what you're about to hand over actually works (deploy\nalready checked this — this is a quick re-confirm, not a full re-run):\n\n- **Main site:** `GET https://<domain>/` → 200 (Next.js SSR: `x-powered-by: Next.js`; Astro SSG: static\n HTML with real content).\n- **WordPress admin:** `GET {urls.wp_admin}` → reachable (a login page, 200/302), not 404.\n- **Backend API:** `GET {urls.rest_api}/posts?per_page=1` → 200 (WordPress); for a **WooCommerce** store\n (`site.json → woocommerce.enabled`) also `GET {urls.store_api}/products?per_page=1` → 200; or the\n storefront API for the sales channel → 200 (Ecommerce); or `GET {urls.api}/health` → 200 and\n `GET {urls.admin}` → 200 (PocketBase).\n- **Contact form** (`site.json → contact_form.enabled`): validate already sent a test submission, so\n don't send another here. Hand it over as\n [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §6 says.\n\nIf a check fails, say so in the outcome paragraph and don't claim the site is live.\n\n## Open the success page\n\nOn a **successful** run (the deploy succeeded and the live checks passed), open the success page in the\nuser's **main / system browser** right after presenting the report, so they land on the hPanel\ncelebration/next-steps screen for their new site. This is a side effect only — **don't print the\nsuccess URL in the report output** (it just opens); the one exception is the can't-open-a-browser\nfallback below. Build the URL with `<tool>` as the running tool's onboarding slug (see *State and\nartifacts* in the top-level `SKILL.md`):\n\n```bash\n# Build the URL first, then open it with the OS default (main) browser — not an embedded one.\n# <tool> = the onboarding slug\nURL=\"https://hpanel.hostinger.com/headless-onboarding/<order_id>/<username>/success/<domain>/<tool>\"\nopen \"$URL\" # macOS\n# xdg-open \"$URL\" # Linux\n# start \"\" \"$URL\" # Windows\n```\n\n- **Main browser only.** Use the OS opener above (`open` / `xdg-open` / `start`) so the page lands in\n Chrome, Safari, Edge, or whatever the user actually uses. **Do not** open it in an embedded or\n sandboxed browser (Cursor IDE browser / `cursor-ide-browser`, Playwright, Puppeteer, WebView, or\n any in-agent browser tab). Those stay inside the tool session and the user won't see the\n celebration page where they expect it.\n- Open it **once**, and only on a successful run — never on an early stop or a failed deploy.\n- If your tool can't open a browser (the command isn't available, or `open`/`xdg-open`/`start`\n fails), don't treat it as a failure and **don't fall back to an embedded browser**. This is the\n **one** case where you print the success URL — show it once in the report and tell the user to\n open it themselves in their main browser.\n\n## Build report\n\nRight after the final report, save the build report for this run. It turns the run log (stage times\nfrom `run-log.json`, events from `events.jsonl`) into `reports/<run>.json` and `.html`, and copies the\nHTML to `report.html` in the workspace:\n\n```bash\n# one shell command; one `event good` per thing that went well, if not logged yet\nnode <skill>/run-log.mjs <domain> event good '{\"text\":\"<something that went well>\"}' && \\\nnode <skill>/run-log.mjs <domain> stage-end done ok && \\\nnode <skill>/run-log.mjs <domain> report --outcome <live|stopped|failed> [--tokens '<json>']\n```\n\nThen send it to Hostinger as *Run log and build report* in the top-level `SKILL.md` says (for changes asked\nafter this report, see *Follow-ups continue the run* there), and tell the user in one line: \"Sent the build report to Hostinger to help improve\nthe flow.\" On a 422 say it's saved locally only; on any other failure say it'll be sent next session.\n\n- **Outcome:** `live` when the deploy succeeded this run, `failed` when a stage failed and you\n couldn't recover, `stopped` for everything else (the user paused, a dummy or missing step). Leave\n `--outcome` out and the script decides from the log.\n- **Before you write it,** check that every issue, correction and skill gap from this run is in\n `events.jsonl`. Log any that are missing now; the report only shows what was logged.\n- **After you write it,** read the `warning:` lines `report` prints. They list logging gaps: a stage\n that never ended, a start that was estimated, a stage logged with no duration, or (on a live build)\n a stage that was never logged. Fix what you can: `stage-end` an open stage, or correct a start with\n `stage-fix <stage> --started-ago <time>`, then run `report` again. What you can't fix stays in the report's\n *Logging gaps* section.\n- In the final report's *Where state lives*, add the path to `report.html` so the user can open it.\n\nDo this on every run, including the early stops: those reports are the most useful ones.\n"
431
+ "text": "---\nname: headless-step-done\ndescription: \"Step 9 (done) of the Hostinger Headless flow. Verifies the live site, then hands over the URLs (hPanel success page, main site, WordPress/store admin, dashboard), tells hPanel the build finished and opens the success page in the browser on a successful run, and gives a summary of what was built plus explicit next steps — how to log in to wp-admin and reset the password, how to manage content, and how to finish WooCommerce/store setup so it can take orders. Its final report format is also used whenever a run stops early.\"\n---\n\n# headless-step-done\n\nVerify the live site, then hand over the URLs (success page, main site, WordPress admin, dashboard), a\nsummary of what was built, and what the user can do next. **On a successful run, tell hPanel the build\nfinished and open the success page for the user** (see *Open the success page*).\n\n## Final report\n\nEvery run ends with this report, whether it finishes here or stops at an earlier stage (a dummy or\nmissing step, a failed provision, the user pausing). On a run that deployed this session, run the\nchecks in *Verify the live site* below first. Build the report from `state.json`, `site.json`,\n`deploy.json` and what you actually did and checked in this run. Report only what you verified. Don't\nclaim a stage passed if you didn't check it.\n\nWrite it in this order:\n\n1. **One-paragraph outcome.** What was created and on which domain (bold it). If the run stopped\n early, name the stage it stopped at, why, and what the user will see right now (e.g. \"the site\n root returns 403 until the frontend is deployed\").\n\n2. **Steps completed.** This table is required on every run, including early stops: never replace\n it with prose. Give one row per stage that ran, using the stage numbers and names from the\n orchestrator's flow table. Leave out stages that didn't run and name them in the outcome\n paragraph instead. A finished WordPress blog build looks like this:\n\n | Stage | Result |\n |---|---|\n | connect | Hostinger connector reached over MCP (`@hostinger/mcp` 1.9.2); signed in through the browser login. |\n | 1 check state | New build for `harbourlight.blog`; no earlier workspace. |\n | 2 refine | Personal travel blog about coastal towns in the UK; backend: WordPress. |\n | 3 provision | Business plan, order 41875230; setup took 6 min; domain, SSL and WordPress checks passed. |\n | 4 content model | 5 pages, 8 posts, 6 categories, 1 menu, 14 images (Hostinger AI), SEO titles on every page; counts re-read from the REST API. |\n | 5 design | \"Salt & Ink\" direction: serif headings, sea-blue accents; `design.md` and logo icon written. |\n | 6 frontend | Next.js SSR with home, blog, post, category and contact pages wired to the REST API; local build passed. |\n | 7 validate | Instance setup completed; REST API returned the 8 pushed posts; npm audit clean; no preview (nobody signing off). |\n | 8 deploy | Source uploaded, build finished in 3 min; site root returns 200. |\n | 9 done | Main site, wp-admin and REST API re-checked live: all returned 200. |\n\n3. **Links** — every URL that exists at this point. Build the hPanel URLs from `site.json`\n (`order_id`, `username`, `domain`) and the onboarding slug; take the rest from `site.json` /\n `deploy.json`. Lead with the one the user cares about most — the **main site** — then the admin\n and dashboards. **Don't list the success page here:** it opens on its own (see *Open the success\n page*), so printing its URL in the report is just noise — the only exception is when a browser\n can't be opened (handled in that section):\n\n - **Main site (live):** `urls.site` (`https://<domain>`) — only once deployed.\n - **WordPress admin (one-click auto-login):** for a WordPress backend, **mint and hand over the\n auto-login redirect URL** — `wordpress_login_create-links { username, software: <site.json\n wordpress.install_id> }` returns a temporary link that logs the user straight into wp-admin. Give\n that URL as the admin link (it lands on `/cms/wp-admin`), so the user never needs a password.\n Alongside it, give the two ways back in that don't expire: the **login URL `{urls.wp_admin}`**\n (`https://<domain>/cms/wp-admin` — the headless WordPress lives under `/cms`), and the **WP Admin\n button in hPanel** (hPanel → the website → *WP Admin*). Note how to **reset the password**: on the\n `/cms/wp-admin` login screen use **\"Lost your password?\"**, and WordPress emails a reset link to the\n **WordPress admin email** (the address set at install, which the owner already has). Optionally, for\n more reliable delivery, they can create a mailbox on the domain (hPanel → *Emails*) and set it as the\n admin address in **wp-admin → Settings → General**.\n **Never print or store a password.** For a **WordPress + WooCommerce** store, this *same* wp-admin\n login is the store admin (wp-admin → WooCommerce → Products/Orders) — do **not** use the Ecommerce\n `store_admin` path; the store setup the owner still needs is spelled out under *Next steps*. For a\n Hostinger **Ecommerce** store, link the store admin from `urls.store_admin` instead.\n - **PocketBase dashboard** (a PocketBase backend): `urls.admin` (`https://<domain>/_/`). Give\n the owner the **login access** in three lines: the sign-in email (`site.json →\n pocketbase.superuser_email`, by default the website owner's email), the full path of the\n credentials file (`~/.hostinger/<domain>/.pocketbase/credentials.json`, which holds\n `superuser_email` and `superuser_password`), and one command to read it (`cat <that path>`).\n **Name the file, never paste the password**, and tell them to move both into their password\n manager, since Hostinger can't show the password again. Say that this is the owner's\n superuser login, not a member account: members sign up on the site and live in the `users`\n collection. A lost password is reset by asking the agent to rotate the superuser\n (`hosting_pocketbase_set-superuser`), which saves a new password to the same file.\n - **hPanel site dashboard:** `https://hpanel.hostinger.com/websites/<domain>` (the headless website\n is installed by now).\n - **Onboarding (resume):** `https://hpanel.hostinger.com/headless-onboarding/<order_id>/<username>/`\n - **REST API** (for developers): `urls.rest_api`, or `urls.api` on PocketBase.\n\n > URL shape note: `<username>` may be dropped from the onboarding/success URLs in a future hPanel\n > release. If a built URL 404s, retry the same path without the `/<username>` segment before\n > reporting it as broken.\n\n4. **Next steps** — what the user does now to actually use the site. Required on a successful run;\n tailor the bullets to the backend and keep them concrete. This is the hand-holding the hPanel\n success page can't give: don't just link wp-admin, tell them what to do once they're in.\n\n - **Manage content (WordPress):** in wp-admin (the one-click link, the `/cms/wp-admin` login URL, or\n hPanel → *WP Admin*) → **Posts**, **Pages**, **Media**, **Appearance → Menus**. Say how edits reach\n the live site for *this* build: an **SSR** frontend re-reads the REST API each request, so changes\n show up with no redeploy; an **SSG/static** build must be redeployed to pick up new content (read\n `state.json → frontend.rendering`).\n - **WordPress + WooCommerce — finish store setup so it can take orders.** The catalog and cart already\n work, but **checkout stays off until the owner configures it in wp-admin**: WooCommerce → Settings →\n **Payments** (enable at least one method) and → **Shipping** (add a zone with a rate), then confirm\n products/prices and place a test order. When `site.json → woocommerce.payment_enabled` is `false`,\n state plainly that this step is **required before any purchase works** — this is the gap owners hit.\n - **Hostinger Ecommerce store:** when `site.json → ecommerce.payment_enabled` is `false`, finish\n payment setup in the store admin (`urls.store_admin`) before the storefront can sell; otherwise it's\n ready to take orders.\n - **PocketBase:** manage the app from hPanel → the website (environment variables, deployments,\n logs). Say in plain words who can do what, one line per kind of data from\n `pocketbase/schema.json` (e.g. \"anyone can book a free place; only you can see who booked\"), and\n that everything visitors enter is in the dashboard (`/_/`) → *Collections*. Then the two things\n only the owner can set there: **Settings → Mail settings** (SMTP) before password-reset or\n verification emails can be sent — required when visitors have accounts — and **Settings →\n Backups**. Data changes show up live; a schema change needs no redeploy.\n\n5. **Where state lives** — the workspace path `~/.hostinger/<domain>/`, the `stage` that a\n resumed run will start from, and the build report `~/.hostinger/<domain>/report.html`.\n\n6. **Gaps / follow-ups** (only if any) — a short numbered list of anything skipped, approximated or\n left for the user (e.g. no images generated, default WordPress content left in place).\n\nNever include passwords, JWTs or other secrets in the report. For wp-admin access, give the URL and\noffer a one-click login link (`wordpress_login_create-links`), not credentials.\n\n## Verify the live site (brief)\n\nOn a run that deployed this session, re-confirm what you're about to hand over actually works (deploy\nalready checked this — this is a quick re-confirm, not a full re-run):\n\n- **Main site:** `GET https://<domain>/` → 200 (Next.js SSR: `x-powered-by: Next.js`; Astro SSG: static\n HTML with real content).\n- **WordPress admin:** `GET {urls.wp_admin}` → reachable (a login page, 200/302), not 404.\n- **Backend API:** `GET {urls.rest_api}/posts?per_page=1` → 200 (WordPress); for a **WooCommerce** store\n (`site.json → woocommerce.enabled`) also `GET {urls.store_api}/products?per_page=1` → 200; or the\n storefront API for the sales channel → 200 (Ecommerce); or `GET {urls.api}/health` → 200 and\n `GET {urls.admin}` → 200 (PocketBase).\n- **Contact form** (`site.json → contact_form.enabled`): validate already sent a test submission, so\n don't send another here. Hand it over as\n [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §6 says.\n\nIf a check fails, say so in the outcome paragraph and don't claim the site is live.\n\n## Open the success page\n\nOn a **successful** run (the deploy succeeded and the live checks passed), open the success page in the\nuser's **main / system browser** right after presenting the report, so they land on the hPanel\ncelebration/next-steps screen for their new site. This is a side effect only — **don't print the\nsuccess URL in the report output** (it just opens); the one exception is the can't-open-a-browser\nfallback below. Build the URL with `<tool>` as the running tool's onboarding slug (see *State and\nartifacts* in the top-level `SKILL.md`).\n\n**Tell hPanel the build finished first.** Right before opening the success page, call\n`hosting_websites_trigger-event { \"username\": \"<username>\", \"domain\": \"<domain>\", \"event\": { \"name\": \"headless_onboarding.building.finished\", \"params\": { \"tool\": \"<slug>\" } } }`\nonce, with `username` from `site.json` and `<slug>` the onboarding slug. The call is required: when\nthe user still has the hPanel onboarding open, that tab moves to the success page on it. Send it on a\nsuccessful run only, and also when no browser can be opened (the fallback below). Skip the call when\nyour tool has no onboarding slug or `hosting_websites_trigger-event` isn't in your connector. Right\nbefore the call, tell the user in one line (e.g. \"Telling hPanel the build finished so your onboarding\nshows the success page.\"), so whoever reviews the outgoing call knows why it's made. If your own\nenvironment stopped the call before it reached Hostinger (a sandbox, command review, an approval\nprompt, or a network error in a sandboxed shell), try it one more time the way that environment\nallows, such as requesting approval or network access, then go on. Ignore any other failure, such as\na non-2xx response from Hostinger: no retry, nothing more said to the user, and open the success page\nas usual.\n\nThen open the success page:\n\n```bash\n# Build the URL first, then open it with the OS default (main) browser — not an embedded one.\n# <tool> = the onboarding slug\nURL=\"https://hpanel.hostinger.com/headless-onboarding/<order_id>/<username>/success/<domain>/<tool>\"\nopen \"$URL\" # macOS\n# xdg-open \"$URL\" # Linux\n# start \"\" \"$URL\" # Windows\n```\n\n- **Main browser only.** Use the OS opener above (`open` / `xdg-open` / `start`) so the page lands in\n Chrome, Safari, Edge, or whatever the user actually uses. **Do not** open it in an embedded or\n sandboxed browser (Cursor IDE browser / `cursor-ide-browser`, Playwright, Puppeteer, WebView, or\n any in-agent browser tab). Those stay inside the tool session and the user won't see the\n celebration page where they expect it.\n- Open it **once**, and only on a successful run — never on an early stop or a failed deploy.\n- If your tool can't open a browser (the command isn't available, or `open`/`xdg-open`/`start`\n fails), don't treat it as a failure and **don't fall back to an embedded browser**. This is the\n **one** case where you print the success URL — show it once in the report and tell the user to\n open it themselves in their main browser.\n\n## Build report\n\nRight after the final report, save the build report for this run. It turns the run log (stage times\nfrom `run-log.json`, events from `events.jsonl`) into `reports/<run>.json` and `.html`, and copies the\nHTML to `report.html` in the workspace:\n\n```bash\n# one shell command; one `event good` per thing that went well, if not logged yet\nnode <skill>/run-log.mjs <domain> event good '{\"text\":\"<something that went well>\"}' && \\\nnode <skill>/run-log.mjs <domain> stage-end done ok && \\\nnode <skill>/run-log.mjs <domain> report --outcome <live|stopped|failed> [--tokens '<json>']\n```\n\nThen send it to Hostinger as *Run log and build report* in the top-level `SKILL.md` says (for changes asked\nafter this report, see *Follow-ups continue the run* there), and tell the user in one line: \"Sent the build report to Hostinger to help improve\nthe flow.\" On a 422 say it's saved locally only; on any other failure say it'll be sent next session.\n\n- **Outcome:** `live` when the deploy succeeded this run, `failed` when a stage failed and you\n couldn't recover, `stopped` for everything else (the user paused, a dummy or missing step). Leave\n `--outcome` out and the script decides from the log.\n- **Before you write it,** check that every issue, correction and skill gap from this run is in\n `events.jsonl`. Log any that are missing now; the report only shows what was logged.\n- **After you write it,** read the `warning:` lines `report` prints. They list logging gaps: a stage\n that never ended, a start that was estimated, a stage logged with no duration, or (on a live build)\n a stage that was never logged. Fix what you can: `stage-end` an open stage, or correct a start with\n `stage-fix <stage> --started-ago <time>`, then run `report` again. What you can't fix stays in the report's\n *Logging gaps* section.\n- In the final report's *Where state lives*, add the path to `report.html` so the user can open it.\n\nDo this on every run, including the early stops: those reports are the most useful ones.\n"
432
432
  },
433
433
  {
434
434
  "uri": "skill://hostinger-headless/wait.mjs",
@@ -425,24 +425,24 @@ const skills: Skill[] = [
425
425
  },
426
426
  {
427
427
  "uri": "skill://hostinger-headless/steps/07-validate/SKILL.md",
428
- "digest": "sha256:e9b845930767e351fc9bce7d572da23ac90937b1108db84c9426f335d40851ce",
429
- "size": 4340,
428
+ "digest": "sha256:d1c425ec2298b7e9014b157c433ebea9bd28f4498ad3069a558643f255d09f80",
429
+ "size": 7119,
430
430
  "mimeType": "text/markdown",
431
- "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 (every backend, 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- **PocketBase** (`site.json → backend: \"pocketbase\"`): `GET {urls.api}/health` → 200, and every\n collection with `seed` records in `pocketbase/schema.json` lists them\n (`GET {urls.api}/collections/<name>/records?perPage=1` → `totalItems` at least the seed count, for\n collections visitors may list). `pb-verify.mjs` already ran at the content-model push, so don't\n repeat it here.\n- **Contact form** (`site.json → contact_form.enabled`, Contact Form 7, WordPress only): send the two\n throwaway test submissions in\n [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §5: the\n first must return `status` **`mail_sent`**, the one with the honeypot filled **`spam`**.\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"
431
+ "text": "---\nname: headless-step-validate\ndescription: \"Step 7 (validate) of the Hostinger Headless flow. Quick gate before deploy: every prior stage already self-verifies, so this is a fast confirmation (instance live + backend API answers with seeded content), an npm audit of the frontend before the first deploy (fix high/critical advisories, rebuild clean), 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> **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 two quick checks, an npm audit before the first deploy, and the optional human\n> preview/sign-off. **Skip Steps 4–5 (rebuild + approval) entirely** on an autonomous or temp-domain run\n> where no one is signing off. Spend 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 (every backend, 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- **PocketBase** (`site.json → backend: \"pocketbase\"`): `GET {urls.api}/health` → 200, and every\n collection with `seed` records in `pocketbase/schema.json` lists them\n (`GET {urls.api}/collections/<name>/records?perPage=1` → `totalItems` at least the seed count, for\n collections visitors may list). `pb-verify.mjs` already ran at the content-model push, so don't\n repeat it here.\n- **Contact form** (`site.json → contact_form.enabled`, Contact Form 7, WordPress only): send the two\n throwaway test submissions in\n [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §5: the\n first must return `status` **`mail_sent`**, the one with the honeypot filled **`spam`**.\n\nFail or counts off → fix content-model push before building against live data.\n\n## 3 — Dependency audit (first deploy only, even when nobody signs off)\n\nRun this only when `~/.hostinger/<domain>/deploy.json` doesn't exist yet: deploy writes it after the\nfirst passing deploy, so iterate and redeploy runs skip this step and don't report the skip. Deploy\nships `package-lock.json` and the server installs from it, so the fix lands in the lockfile here. In\n`~/.hostinger/<domain>/src/`:\n\n1. **Audit.** `npm audit`. No vulnerabilities → note \"npm audit clean\" in validate's *Steps completed*\n row of the final report and go on to Step 4. If it can't run (no `package-lock.json`, registry\n unreachable), log an `issue` event\n `{\"stage\":\"validate\",\"symptom\":\"npm audit could not run\",\"cause\":\"<error>\",\"severity\":\"medium\",\"resolved\":false}`,\n list it under *Gaps / follow-ups*, and go on.\n2. **Back up.** Copy `package.json` and `package-lock.json` to `~/.hostinger/<domain>/audit-backup/`\n (outside `src/`, so the deploy archive doesn't pick them up). This is the last working pair. Delete\n `audit-backup/` when this step ends.\n3. **Safe fixes.** `npm audit fix`, then rebuild clean: delete the build output (`.next` for Next.js,\n `.output` for Nuxt, `build` for SvelteKit, `dist` for Astro and Vite/React/Vue; for any\n other framework, the folder `npm run build` writes), run `npm run build`, and run the project's `check` or\n `check:dist` script if it has one. Passes → copy the pair to the backup again. Fails → restore the\n backup and `npm ci`. Never run `npm audit fix --force`: it takes breaking major upgrades across the\n whole tree. Low and moderate advisories this can't fix stay.\n4. **High and critical.** If `npm audit --audit-level=high` still fails, run `npm audit --json`. For\n each entry under `vulnerabilities` whose `severity` is `high` or `critical` and whose `fixAvailable`\n is an object, run `npm install <fixAvailable.name>@<fixAvailable.version>`. Rebuild clean as in\n item 3. Fails → restore the backup, `npm ci`, and treat those advisories as leftovers.\n `fixAvailable: false` means no dependency upgrade fixes it.\n\n**Leftovers.** A high or critical advisory that no upgrade fixes, or whose upgrade breaks the build,\ndoesn't block the deploy: deploy the last working pair, log one event for all of them, and list each\n(package, severity, advisory ID, why it stays) under *Gaps / follow-ups* in the final report\n([`../09-done/SKILL.md`](../09-done/SKILL.md)):\n\n```bash\nnode <skill>/run-log.mjs <domain> event issue '{\"stage\":\"validate\",\"symptom\":\"npm audit: <n> high/critical advisories left\",\"cause\":\"<package>@<version> <advisory ID>: no fix through an upgrade | upgrade breaks the build; …\",\"severity\":\"high\",\"resolved\":false}'\n```\n\n## 4 — 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## 5 — 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 4–5 were skipped): `state.json` → `stage: \"deploy\"`, fresh\n`updated_at`; leave `provision` unchanged.\n"
432
432
  },
433
433
  {
434
434
  "uri": "skill://hostinger-headless/steps/08-deploy/SKILL.md",
435
- "digest": "sha256:0f3d36e77d0428edb2874e5733a774a7fa440edf68c74cca524de8177ac6047c",
436
- "size": 16826,
435
+ "digest": "sha256:2d28e17428e15cf9579a1e712ae7099969353535c32c3ab85a2527b8127bb2d9",
436
+ "size": 16915,
437
437
  "mimeType": "text/markdown",
438
- "text": "---\nname: headless-step-deploy\ndescription: \"Step 8 (deploy) of the Hostinger Headless flow. Archives the frontend source, then deploys through the connector's one-shot hosting_deploy (type nodejs — it uploads the source, runs npm install and the build on the server) with the chosen framework's build settings (appType + output dir) passed explicitly, polls to completion with hosting_get-deployment, verifies the live site and that the backend survived, then writes deploy.json.\"\n---\n\n# headless-step-deploy\n\nShip the frontend to the live domain through the Hostinger connector. You hand the connector a zip of\nthe project **source** and it uploads it, runs `npm install` + the build script on the server, and\nserves the result. **Out:** `deploy.json`.\n\nThis is an **instance-barrier** step: run it only after `provision.status == \"completed\"` and validate\n(if run) has passed. All operations go through the connector (`execute`).\n\n> **Connected to the hosted server (`mcp.hostinger.com`)?** Its `hosting_deploy` deploys Git\n> repositories only and cannot read a local `path`. Run this step through the local\n> `hostinger-api-mcp` server instead (see the connect step:\n> `<command> <launcher>`).\n\n> **With a shell and the Hostinger CLI installed**, the same deploy is one command, with the build\n> settings passed exactly as the table below says. Run it from the project, since it links the current directory:\n> `cd ~/.hostinger/<domain>/src && hostinger up --domain <domain> --type nodejs --app-type <appType> --output-directory <dir> --build-script build --node-version 22 --package-manager npm --message \"<what this deploy changes, like a commit message>\" --yes --format json`.\n> If it fails with `unknown flag: --message` (an older CLI), run `brew upgrade hostinger/tap/hostinger` or rerun it without `--message`.\n> It uploads, builds, waits and returns `data.buildUuid` and `data.buildState`; add `--no-wait` to\n> return at once and wait with `cd \"$HOME\" && node <skill>/wait.mjs build <domain> <uuid>`. Then continue at\n> \"Verify\" below. Recent CLI versions see that the site is headless (`data.headless: true`) and\n> deploy only its Node.js frontend, leaving `/cms` alone; still pass the settings above.\n\n**In:** the project in `~/.hostinger/<domain>/src/`, `site.json` (`username`, `urls`), `state.json`\n(`frontend.framework`, `frontend.rendering`).\n\n> ## ⚠️ The one rule that makes this work: pass build settings explicitly\n> If you let `hosting_deploy` **auto-detect** build settings, for a headless site that detection returns\n> **null** (`appType:null`, `outputDirectory:null`, Node 20) — the build \"completes\" but the **root\n> serves 403** (no `appType`/output → the vhost serves a directory with no entry). This is reproducible.\n> **Always pass `appType`, `outputDirectory`, `nodeVersion`, `buildScript`, `packageManager` and\n> `rootDirectory` on the `hosting_deploy` call** with the framework's values; the deploy then resolves\n> them and serves correctly, and `/cms` is preserved.\n\n## Build configurations\n\nMap `frontend.framework` (from `state.json`) to its `appType` + build output directory, and pass those\non the `hosting_deploy` call. `appType` is the framework's value, e.g. `next`, `nuxt`, `astro`,\n`svelte-kit`, `nest`, `express`, `fastify`, `react`, `create-react-app`, `gatsby`, `vite`, `vue`,\n`angular`, `parcel`, `svelte`, `other`.\n\nCommon cases (all `nodeVersion: 22`, `buildScript: \"build\"`, `packageManager: \"npm\"`, `rootDirectory: \".\"`):\n\n| Framework / mode | Local config | `appType` | `outputDirectory` |\n|---|---|---|---|\n| **Next.js — SSR** *(default)* | `output: 'standalone'` | `next` | `.next` |\n| **Nuxt — SSR** | default | `nuxt` | `.output` |\n| **SvelteKit — SSR** | node adapter | `svelte-kit` | `build` |\n| **Astro — static** | `output: 'static'` | `astro` | `dist` |\n| **Vite / React / Vue — static (SPA)** | — | `vite` (or `react`/`vue`) | `dist` |\n| **Express / NestJS / Fastify — server** | — | `express`/`nest`/`fastify` | build output dir |\n\nSSR/server frameworks run a persistent Node process (root sends `x-powered-by` / `cache-control: no-store`);\nstatic frameworks serve their output dir as files. If unsure of a framework's output dir, check the\nframework's own build output.\n\n## Step 1 — Pre-flight\n\n1. **Instance live (the deploy gate).** `provision.status == \"completed\"`, re-verified with\n `hosting_websites_list-setups { \"domain\": \"<domain>\" }`: deploy overwrites the site root, so it never\n trusts `state.json` alone.\n2. **Build output exists locally** (the framework's output dir — e.g. `.next/`, `dist/`, `.output/`) and\n the project builds clean (frontend/validate already did this). If not, go back.\n - **Next.js 16+:** `package.json`'s `build` script is `next build --webpack`, not plain `next build` —\n the server's glibc can't run Turbopack's native compiler, and Turbopack doesn't fall back to webpack\n (see `../06-frontend/SKILL.md` Step 3). On Next.js 15.x leave it as plain `next build`. Fix it here if it isn't.\n3. **PocketBase: nothing under `/api` or `/_`.** The app serves no route under those\n prefixes, whatever its framework (Next.js `app/api/` or `pages/api/`, Nuxt `server/api/`, SvelteKit\n `src/routes/api/`, Astro `src/pages/api/`, an Express or Fastify route), and `src/` holds no\n `.pocketbase/` folder or `credentials.json`. Fix it here if it does.\n4. **Env vars (only if used).** Build-time vars (e.g. `NEXT_PUBLIC_*`) must be set **before** the build\n with `hosting_nodejs_replace-environment-variables` (full replace: list the current keys first and\n send the complete set). Never put secrets in the repo or the archive. On PocketBase, server-side\n superuser work reads `PB_URL`, `PB_SUPERUSER_EMAIL` and `PB_SUPERUSER_PASSWORD` from here (the\n values come from `~/.hostinger/<domain>/.pocketbase/credentials.json`, never from the archive).\n\n## Step 2 — Archive the source\n\nZip the project **source** with `package.json` at the archive root. **Include** the app/source,\n`public/`, the framework config (`next.config.mjs` / `astro.config.mjs`), `tsconfig.json`,\n`package.json`, `package-lock.json`, `.nvmrc`. **Exclude** `node_modules/`, the build output\n(`.next/`, `dist/`, `out/`), `.git/`, and any `.htaccess` — the server installs and builds from source.\n**Never archive secrets:** the commands below also leave out `.env*` files, `.npmrc` and key/certificate\nfiles (`*.pem`, `*.key`, `*.p12`, `*.pfx`) and any `.pocketbase/` folder. A brought-in project often has a `.env.local`; its values go in\nas environment variables (Step 1), never in the archive. `hosting_deploy` also skips any file named\n`credentials.json` itself and lists it in `skippedFiles`.\n\n> ## ⚠️ Write the archive outside `~/.hostinger/` (the deploy refuses it there)\n> `hosting_deploy` refuses any `path` under a hidden folder at the top of the home directory\n> (`~/.hostinger`, `~/.config`, …) with *\"it is, or contains, a home, system or credentials location\"*:\n> a deploy publishes what it reads, so the connector protects dotfolders that can hold tokens. That\n> covers both `~/.hostinger/<domain>/app.zip` **and** the `~/.hostinger/<domain>/src/` directory\n> itself, so neither can be passed as `path`. Keep the source in the workspace as usual, but write the\n> archive to a fresh temp directory and pass that. Don't copy the archive somewhere else after a\n> refusal, and don't move `src/` out of the workspace.\n\n```bash\n# macOS/Linux — the OS temp dir is outside the home directory\ncd ~/.hostinger/<domain>/src\nDEPLOY_DIR=$(mktemp -d)\nzip -r -X \"$DEPLOY_DIR/app.zip\" . -x 'node_modules/*' '.next/*' 'dist/*' 'out/*' '.git/*' '**/.htaccess' \\\n '.env*' '*/.env*' '.npmrc' '*/.npmrc' '*.pem' '*.key' '*.p12' '*.pfx' '.pocketbase/*' '*/.pocketbase/*'\necho \"$DEPLOY_DIR/app.zip\" # the absolute path to pass as `path` in Step 3\n```\n\n```powershell\n# Windows PowerShell — %TEMP% sits under AppData, which the deploy also refuses; use a plain folder in your\n# profile, which only you can write to (never a folder under C:\\, which every local account can write into)\ncd $HOME\\.hostinger\\<domain>\\src\n$DeployDir = Join-Path $HOME \"hostinger-deploy\\<domain>\"; New-Item -ItemType Directory -Force $DeployDir | Out-Null\ntar -a -cf \"$DeployDir\\app.zip\" --exclude=node_modules --exclude=.next --exclude=dist --exclude=out --exclude=.git --exclude=.htaccess `\n --exclude=.env* --exclude=.npmrc --exclude=*.pem --exclude=*.key --exclude=*.p12 --exclude=*.pfx --exclude=.pocketbase .\n\"$DeployDir\\app.zip\" # the absolute path to pass as `path` in Step 3\n```\n\nDelete the temp directory once the build in Step 4 is `completed`.\n\n## Step 3 — Deploy (one shot: settings + upload + build)\n\nPass the framework's build settings **inline** on the deploy call — there is no separate settings step.\n`path` is the absolute path of the archive from Step 2, in its temp directory. Never pass a path under\n`~/.hostinger/`, the `src/` directory included: the deploy refuses it (see Step 2).\n`message` says what this deploy ships, written like a commit message (first line under 72 characters,\nat most 500): it labels the deploy in the website's deployment history, which otherwise shows only the\narchive's file name.\n\n```json\n{ \"operation\": \"hosting_deploy\",\n \"params\": {\n \"domain\": \"<domain>\",\n \"path\": \"<absolute path printed in Step 2, e.g. /var/folders/…/tmp.XXXX/app.zip>\",\n \"type\": \"nodejs\",\n \"appType\": \"<framework appType, e.g. next>\",\n \"outputDirectory\": \"<framework output dir, e.g. .next>\",\n \"nodeVersion\": 22,\n \"buildScript\": \"build\",\n \"packageManager\": \"npm\",\n \"rootDirectory\": \".\",\n \"message\": \"<one-line summary of what this deploy ships, e.g. Add pricing page>\" } }\n```\n\n`hosting_deploy` uploads the source and triggers `npm install` + the build **end-to-end** — do not call\nany upload or build operation yourself. It returns a build `buildUuid` at once. This **overwrites the\nwebsite root** (expected) and keeps the backend's paths intact (`/cms` for WordPress; `/api` and `/_/`\nfor PocketBase). `type` is always `\"nodejs\"` for a headless site, with the explicit `appType`/`outputDirectory` from\n*Build configurations* —\n**never `\"static\"`**, which serves the build as plain files over the document root and **overwrites\n`/cms`**, destroying the WordPress backend, and would likewise break the routing that keeps `/api` and\n`/_/` on a PocketBase backend. A static-built SPA (Vite/React/Vue) still deploys as\n`type: \"nodejs\"` with its `appType`.\n\n## Step 4 — Wait for the build and the live root\n\nWait for it in one command (see *Waiting on Hostinger* in the top-level `SKILL.md`):\n\n```bash\ncd \"$HOME\" && node <skill>/wait.mjs build <domain> <buildUuid>\n```\n\nIt waits for `hosting_get-deployment` to report the build `completed`, then up to 5 minutes for\n`https://<domain>/` (or `http://` while the certificate is pending) to serve 200. What its result means here:\n\n- `ok: true`: the build is done and the root serves 200. Go on to Step 5.\n- `ok: true` with `https_pending: true`: the build is done and `http://<domain>/` serves 200, but the\n new domain's SSL certificate is still installing (this can take the better part of an hour). The\n deploy worked: tell the user HTTPS will follow on its own, run Step 5 over `http://`, and don't\n wait for the certificate.\n- `ok: false` with `build.state: failed`: read `log_tail` (the end of the build log) and `analysis`, fix\n locally, re-archive and redeploy (pass `fromLine` to `hosting_get-deployment` to read only new log\n output).\n- `ok: false` with `build settings missing`: the settings didn't take (the root would 403 for good). Fix\n the deploy call and redeploy.\n- `ok: false` with `timed_out`: `last_status` says whether the build was still running or the root\n wasn't serving 200 yet (see Step 5's note on a 403). For an SSR app that built but hangs,\n `hosting_nodejs_restart-application { username, domain }` recovers the server without a rebuild.\n\n## Step 5 — Verify the live site (all must pass)\n\n| Check | How | Expect |\n|---|---|---|\n| Root serves | `GET https://<domain>/` | **200** (not 403 / 404) |\n| SSR is live *(server frameworks)* | response headers | `x-powered-by` present, `cache-control: no-store` |\n| Static serves *(static frameworks)* | `GET https://<domain>/` | 200 HTML with real home content |\n| Key routes | a couple of planned routes + one deep route | 200, real content |\n| **Backend survived** *(WordPress / WooCommerce)* | `GET https://<domain>/cms/wp-json/wp/v2/posts?per_page=1` | 200 |\n| **Backend survived** *(PocketBase)* | `GET https://<domain>/api/health` and `GET https://<domain>/_/` | 200 and 200 |\n| **No credentials served** *(PocketBase)* | `GET https://<domain>/.pocketbase/credentials.json` | 404 |\n\n> **Only WordPress (including WordPress + WooCommerce) has a `/cms` on the domain**, and only PocketBase\n> has `/api` and `/_/`, so the *Backend survived* check depends on the backend.\n> - **WordPress + WooCommerce:** also confirm the store survived the deploy —\n> `GET https://<domain>/cms/wp-json/wc/store/v1/products?per_page=1` → 200. There is nothing external to\n> link (no sales-channel step — that's Ecommerce only). **Checkout** stays owner-completed: when\n> `site.json → woocommerce.payment_enabled` is `false`, don't test `/checkout`; a catalog that serves 200\n> is a passing, complete deploy.\n> - **Ecommerce:** the backend is the **Hostinger Ecommerce store**, read over the external Storefront API\n> (`api-ecommerce.hostinger.com`) — nothing a deploy touches lives on this domain. There is no `/cms`;\n> confirm the storefront still fetches products as a frontend check if you like. **Only check that\n> checkout can be reached when `site.json → ecommerce.payment_enabled` is `true`** — on a free account\n> (`payment_enabled: false`) there is no checkout, so **skip that check entirely**; a catalog that serves\n> 200 is a passing, complete deploy. Never fail or hold the deploy because checkout is unavailable.\n> - **PocketBase** (`site.json → backend: \"pocketbase\"`): the backend lives on this domain at `/api`\n> and `/_`, so check both survived and that the credentials URL is a 404, then run\n> `node <skill>/steps/04-content-model/pocketbase/scripts/pb-verify.mjs ~/.hostinger/<domain>/.pocketbase/credentials.json ~/.hostinger/<domain>/pocketbase/schema.json`\n> and expect `READY` (its last check, the website serving the app, now passes). If `/api/health`\n> fails while the root serves the app, the app is answering `/api`: move its routes off that prefix\n> and redeploy. If the credentials URL returns anything but 404, rotate the superuser at once\n> (`hosting_pocketbase_set-superuser`, see `../03-provision/pocketbase/SKILL.md` Step 3) and\n> redeploy without the file.\n\nThe root check is already done when `wait.mjs build` returned `ok: true`; check the rest in one shell\ncommand (`curl` each URL). A `completed` build whose root 403s almost always means the build settings\nweren't passed to `hosting_deploy` (null settings) — pass them and redeploy. Caching can briefly serve a\nstale root; re-check after ~30 s.\n\n## Step 6 — Record `deploy.json`\n\n```json\n{\n \"build_uuid\": \"…\",\n \"stack\": \"nextjs\",\n \"rendering\": \"ssr\",\n \"app_type\": \"next\",\n \"output_directory\": \".next\",\n \"node_version\": 22,\n \"method\": \"hosting_deploy (type: nodejs, settings passed inline)\",\n \"deployed_at\": \"…\",\n \"verified_at\": \"…\",\n \"urls\": { \"live\": \"https://<domain>\", \"cms\": \"https://<domain>/cms\" },\n \"checks\": { \"root\": 200, \"ssr_headers\": true, \"backend_preserved\": true }\n}\n```\n\nNo secrets in `deploy.json`. The `urls.cms` field and the `backend_preserved` check above are\n**WordPress-only** — adjust the record to the backend:\n\n- **WordPress:** keep `urls.cms` and `checks.backend_preserved` as shown.\n- **WordPress + WooCommerce:** keep `urls.cms` + `checks.backend_preserved` (it *is* WordPress), and add\n `urls.store_api` from `site.json`; no external link step.\n- **Ecommerce:** omit `urls.cms`/`backend_preserved`; record the store URLs instead (`urls.storefront_api`,\n `urls.store_admin` from `site.json`) and link the custom sales channel to the live domain —\n `ecommerce_sales-channels_update { store_id, sales_channel_id, url }` (see the ecommerce provision step).\n- **PocketBase:** omit `urls.cms`; add `urls.api` and `urls.admin` from `site.json`,\n `checks.backend_preserved` (the `/api/health` and `/_/` checks) and `checks.pb_verify: \"READY\"`.\n\nUpdate `state.json` (`stage` → `done`), then continue to Step 9 (done).\n\n`hosting_deploy` on the local server is the only path: give its `path` a local **archive** (`zip`, `tar`,\n`tar.gz`, `tgz`, `7z`) written outside `~/.hostinger/` as in Step 2. There is no separate upload or\nbuild step to fall back to.\n"
438
+ "text": "---\nname: headless-step-deploy\ndescription: \"Step 8 (deploy) of the Hostinger Headless flow. Archives the frontend source, then deploys through the connector's one-shot hosting_deploy (type nodejs — it uploads the source, runs npm install and the build on the server) with the chosen framework's build settings (appType + output dir) passed explicitly, polls to completion with hosting_get-deployment, verifies the live site and that the backend survived, then writes deploy.json.\"\n---\n\n# headless-step-deploy\n\nShip the frontend to the live domain through the Hostinger connector. You hand the connector a zip of\nthe project **source** and it uploads it, runs `npm install` + the build script on the server, and\nserves the result. **Out:** `deploy.json`.\n\nThis is an **instance-barrier** step: run it only after `provision.status == \"completed\"` and validate\nhas passed (on a first deploy that includes its dependency audit, even when the rest of validate is\nskipped). All operations go through the connector (`execute`).\n\n> **Connected to the hosted server (`mcp.hostinger.com`)?** Its `hosting_deploy` deploys Git\n> repositories only and cannot read a local `path`. Run this step through the local\n> `hostinger-api-mcp` server instead (see the connect step:\n> `<command> <launcher>`).\n\n> **With a shell and the Hostinger CLI installed**, the same deploy is one command, with the build\n> settings passed exactly as the table below says. Run it from the project, since it links the current directory:\n> `cd ~/.hostinger/<domain>/src && hostinger up --domain <domain> --type nodejs --app-type <appType> --output-directory <dir> --build-script build --node-version 22 --package-manager npm --message \"<what this deploy changes, like a commit message>\" --yes --format json`.\n> If it fails with `unknown flag: --message` (an older CLI), run `brew upgrade hostinger/tap/hostinger` or rerun it without `--message`.\n> It uploads, builds, waits and returns `data.buildUuid` and `data.buildState`; add `--no-wait` to\n> return at once and wait with `cd \"$HOME\" && node <skill>/wait.mjs build <domain> <uuid>`. Then continue at\n> \"Verify\" below. Recent CLI versions see that the site is headless (`data.headless: true`) and\n> deploy only its Node.js frontend, leaving `/cms` alone; still pass the settings above.\n\n**In:** the project in `~/.hostinger/<domain>/src/`, `site.json` (`username`, `urls`), `state.json`\n(`frontend.framework`, `frontend.rendering`).\n\n> ## ⚠️ The one rule that makes this work: pass build settings explicitly\n> If you let `hosting_deploy` **auto-detect** build settings, for a headless site that detection returns\n> **null** (`appType:null`, `outputDirectory:null`, Node 20) — the build \"completes\" but the **root\n> serves 403** (no `appType`/output → the vhost serves a directory with no entry). This is reproducible.\n> **Always pass `appType`, `outputDirectory`, `nodeVersion`, `buildScript`, `packageManager` and\n> `rootDirectory` on the `hosting_deploy` call** with the framework's values; the deploy then resolves\n> them and serves correctly, and `/cms` is preserved.\n\n## Build configurations\n\nMap `frontend.framework` (from `state.json`) to its `appType` + build output directory, and pass those\non the `hosting_deploy` call. `appType` is the framework's value, e.g. `next`, `nuxt`, `astro`,\n`svelte-kit`, `nest`, `express`, `fastify`, `react`, `create-react-app`, `gatsby`, `vite`, `vue`,\n`angular`, `parcel`, `svelte`, `other`.\n\nCommon cases (all `nodeVersion: 22`, `buildScript: \"build\"`, `packageManager: \"npm\"`, `rootDirectory: \".\"`):\n\n| Framework / mode | Local config | `appType` | `outputDirectory` |\n|---|---|---|---|\n| **Next.js — SSR** *(default)* | `output: 'standalone'` | `next` | `.next` |\n| **Nuxt — SSR** | default | `nuxt` | `.output` |\n| **SvelteKit — SSR** | node adapter | `svelte-kit` | `build` |\n| **Astro — static** | `output: 'static'` | `astro` | `dist` |\n| **Vite / React / Vue — static (SPA)** | — | `vite` (or `react`/`vue`) | `dist` |\n| **Express / NestJS / Fastify — server** | — | `express`/`nest`/`fastify` | build output dir |\n\nSSR/server frameworks run a persistent Node process (root sends `x-powered-by` / `cache-control: no-store`);\nstatic frameworks serve their output dir as files. If unsure of a framework's output dir, check the\nframework's own build output.\n\n## Step 1 — Pre-flight\n\n1. **Instance live (the deploy gate).** `provision.status == \"completed\"`, re-verified with\n `hosting_websites_list-setups { \"domain\": \"<domain>\" }`: deploy overwrites the site root, so it never\n trusts `state.json` alone.\n2. **Build output exists locally** (the framework's output dir — e.g. `.next/`, `dist/`, `.output/`) and\n the project builds clean (frontend/validate already did this). If not, go back.\n - **Next.js 16+:** `package.json`'s `build` script is `next build --webpack`, not plain `next build` —\n the server's glibc can't run Turbopack's native compiler, and Turbopack doesn't fall back to webpack\n (see `../06-frontend/SKILL.md` Step 3). On Next.js 15.x leave it as plain `next build`. Fix it here if it isn't.\n3. **PocketBase: nothing under `/api` or `/_`.** The app serves no route under those\n prefixes, whatever its framework (Next.js `app/api/` or `pages/api/`, Nuxt `server/api/`, SvelteKit\n `src/routes/api/`, Astro `src/pages/api/`, an Express or Fastify route), and `src/` holds no\n `.pocketbase/` folder or `credentials.json`. Fix it here if it does.\n4. **Env vars (only if used).** Build-time vars (e.g. `NEXT_PUBLIC_*`) must be set **before** the build\n with `hosting_nodejs_replace-environment-variables` (full replace: list the current keys first and\n send the complete set). Never put secrets in the repo or the archive. On PocketBase, server-side\n superuser work reads `PB_URL`, `PB_SUPERUSER_EMAIL` and `PB_SUPERUSER_PASSWORD` from here (the\n values come from `~/.hostinger/<domain>/.pocketbase/credentials.json`, never from the archive).\n\n## Step 2 — Archive the source\n\nZip the project **source** with `package.json` at the archive root. **Include** the app/source,\n`public/`, the framework config (`next.config.mjs` / `astro.config.mjs`), `tsconfig.json`,\n`package.json`, `package-lock.json`, `.nvmrc`. **Exclude** `node_modules/`, the build output\n(`.next/`, `dist/`, `out/`), `.git/`, and any `.htaccess` — the server installs and builds from source.\n**Never archive secrets:** the commands below also leave out `.env*` files, `.npmrc` and key/certificate\nfiles (`*.pem`, `*.key`, `*.p12`, `*.pfx`) and any `.pocketbase/` folder. A brought-in project often has a `.env.local`; its values go in\nas environment variables (Step 1), never in the archive. `hosting_deploy` also skips any file named\n`credentials.json` itself and lists it in `skippedFiles`.\n\n> ## ⚠️ Write the archive outside `~/.hostinger/` (the deploy refuses it there)\n> `hosting_deploy` refuses any `path` under a hidden folder at the top of the home directory\n> (`~/.hostinger`, `~/.config`, …) with *\"it is, or contains, a home, system or credentials location\"*:\n> a deploy publishes what it reads, so the connector protects dotfolders that can hold tokens. That\n> covers both `~/.hostinger/<domain>/app.zip` **and** the `~/.hostinger/<domain>/src/` directory\n> itself, so neither can be passed as `path`. Keep the source in the workspace as usual, but write the\n> archive to a fresh temp directory and pass that. Don't copy the archive somewhere else after a\n> refusal, and don't move `src/` out of the workspace.\n\n```bash\n# macOS/Linux — the OS temp dir is outside the home directory\ncd ~/.hostinger/<domain>/src\nDEPLOY_DIR=$(mktemp -d)\nzip -r -X \"$DEPLOY_DIR/app.zip\" . -x 'node_modules/*' '.next/*' 'dist/*' 'out/*' '.git/*' '**/.htaccess' \\\n '.env*' '*/.env*' '.npmrc' '*/.npmrc' '*.pem' '*.key' '*.p12' '*.pfx' '.pocketbase/*' '*/.pocketbase/*'\necho \"$DEPLOY_DIR/app.zip\" # the absolute path to pass as `path` in Step 3\n```\n\n```powershell\n# Windows PowerShell — %TEMP% sits under AppData, which the deploy also refuses; use a plain folder in your\n# profile, which only you can write to (never a folder under C:\\, which every local account can write into)\ncd $HOME\\.hostinger\\<domain>\\src\n$DeployDir = Join-Path $HOME \"hostinger-deploy\\<domain>\"; New-Item -ItemType Directory -Force $DeployDir | Out-Null\ntar -a -cf \"$DeployDir\\app.zip\" --exclude=node_modules --exclude=.next --exclude=dist --exclude=out --exclude=.git --exclude=.htaccess `\n --exclude=.env* --exclude=.npmrc --exclude=*.pem --exclude=*.key --exclude=*.p12 --exclude=*.pfx --exclude=.pocketbase .\n\"$DeployDir\\app.zip\" # the absolute path to pass as `path` in Step 3\n```\n\nDelete the temp directory once the build in Step 4 is `completed`.\n\n## Step 3 — Deploy (one shot: settings + upload + build)\n\nPass the framework's build settings **inline** on the deploy call — there is no separate settings step.\n`path` is the absolute path of the archive from Step 2, in its temp directory. Never pass a path under\n`~/.hostinger/`, the `src/` directory included: the deploy refuses it (see Step 2).\n`message` says what this deploy ships, written like a commit message (first line under 72 characters,\nat most 500): it labels the deploy in the website's deployment history, which otherwise shows only the\narchive's file name.\n\n```json\n{ \"operation\": \"hosting_deploy\",\n \"params\": {\n \"domain\": \"<domain>\",\n \"path\": \"<absolute path printed in Step 2, e.g. /var/folders/…/tmp.XXXX/app.zip>\",\n \"type\": \"nodejs\",\n \"appType\": \"<framework appType, e.g. next>\",\n \"outputDirectory\": \"<framework output dir, e.g. .next>\",\n \"nodeVersion\": 22,\n \"buildScript\": \"build\",\n \"packageManager\": \"npm\",\n \"rootDirectory\": \".\",\n \"message\": \"<one-line summary of what this deploy ships, e.g. Add pricing page>\" } }\n```\n\n`hosting_deploy` uploads the source and triggers `npm install` + the build **end-to-end** — do not call\nany upload or build operation yourself. It returns a build `buildUuid` at once. This **overwrites the\nwebsite root** (expected) and keeps the backend's paths intact (`/cms` for WordPress; `/api` and `/_/`\nfor PocketBase). `type` is always `\"nodejs\"` for a headless site, with the explicit `appType`/`outputDirectory` from\n*Build configurations* —\n**never `\"static\"`**, which serves the build as plain files over the document root and **overwrites\n`/cms`**, destroying the WordPress backend, and would likewise break the routing that keeps `/api` and\n`/_/` on a PocketBase backend. A static-built SPA (Vite/React/Vue) still deploys as\n`type: \"nodejs\"` with its `appType`.\n\n## Step 4 — Wait for the build and the live root\n\nWait for it in one command (see *Waiting on Hostinger* in the top-level `SKILL.md`):\n\n```bash\ncd \"$HOME\" && node <skill>/wait.mjs build <domain> <buildUuid>\n```\n\nIt waits for `hosting_get-deployment` to report the build `completed`, then up to 5 minutes for\n`https://<domain>/` (or `http://` while the certificate is pending) to serve 200. What its result means here:\n\n- `ok: true`: the build is done and the root serves 200. Go on to Step 5.\n- `ok: true` with `https_pending: true`: the build is done and `http://<domain>/` serves 200, but the\n new domain's SSL certificate is still installing (this can take the better part of an hour). The\n deploy worked: tell the user HTTPS will follow on its own, run Step 5 over `http://`, and don't\n wait for the certificate.\n- `ok: false` with `build.state: failed`: read `log_tail` (the end of the build log) and `analysis`, fix\n locally, re-archive and redeploy (pass `fromLine` to `hosting_get-deployment` to read only new log\n output).\n- `ok: false` with `build settings missing`: the settings didn't take (the root would 403 for good). Fix\n the deploy call and redeploy.\n- `ok: false` with `timed_out`: `last_status` says whether the build was still running or the root\n wasn't serving 200 yet (see Step 5's note on a 403). For an SSR app that built but hangs,\n `hosting_nodejs_restart-application { username, domain }` recovers the server without a rebuild.\n\n## Step 5 — Verify the live site (all must pass)\n\n| Check | How | Expect |\n|---|---|---|\n| Root serves | `GET https://<domain>/` | **200** (not 403 / 404) |\n| SSR is live *(server frameworks)* | response headers | `x-powered-by` present, `cache-control: no-store` |\n| Static serves *(static frameworks)* | `GET https://<domain>/` | 200 HTML with real home content |\n| Key routes | a couple of planned routes + one deep route | 200, real content |\n| **Backend survived** *(WordPress / WooCommerce)* | `GET https://<domain>/cms/wp-json/wp/v2/posts?per_page=1` | 200 |\n| **Backend survived** *(PocketBase)* | `GET https://<domain>/api/health` and `GET https://<domain>/_/` | 200 and 200 |\n| **No credentials served** *(PocketBase)* | `GET https://<domain>/.pocketbase/credentials.json` | 404 |\n\n> **Only WordPress (including WordPress + WooCommerce) has a `/cms` on the domain**, and only PocketBase\n> has `/api` and `/_/`, so the *Backend survived* check depends on the backend.\n> - **WordPress + WooCommerce:** also confirm the store survived the deploy —\n> `GET https://<domain>/cms/wp-json/wc/store/v1/products?per_page=1` → 200. There is nothing external to\n> link (no sales-channel step — that's Ecommerce only). **Checkout** stays owner-completed: when\n> `site.json → woocommerce.payment_enabled` is `false`, don't test `/checkout`; a catalog that serves 200\n> is a passing, complete deploy.\n> - **Ecommerce:** the backend is the **Hostinger Ecommerce store**, read over the external Storefront API\n> (`api-ecommerce.hostinger.com`) — nothing a deploy touches lives on this domain. There is no `/cms`;\n> confirm the storefront still fetches products as a frontend check if you like. **Only check that\n> checkout can be reached when `site.json → ecommerce.payment_enabled` is `true`** — on a free account\n> (`payment_enabled: false`) there is no checkout, so **skip that check entirely**; a catalog that serves\n> 200 is a passing, complete deploy. Never fail or hold the deploy because checkout is unavailable.\n> - **PocketBase** (`site.json → backend: \"pocketbase\"`): the backend lives on this domain at `/api`\n> and `/_`, so check both survived and that the credentials URL is a 404, then run\n> `node <skill>/steps/04-content-model/pocketbase/scripts/pb-verify.mjs ~/.hostinger/<domain>/.pocketbase/credentials.json ~/.hostinger/<domain>/pocketbase/schema.json`\n> and expect `READY` (its last check, the website serving the app, now passes). If `/api/health`\n> fails while the root serves the app, the app is answering `/api`: move its routes off that prefix\n> and redeploy. If the credentials URL returns anything but 404, rotate the superuser at once\n> (`hosting_pocketbase_set-superuser`, see `../03-provision/pocketbase/SKILL.md` Step 3) and\n> redeploy without the file.\n\nThe root check is already done when `wait.mjs build` returned `ok: true`; check the rest in one shell\ncommand (`curl` each URL). A `completed` build whose root 403s almost always means the build settings\nweren't passed to `hosting_deploy` (null settings) — pass them and redeploy. Caching can briefly serve a\nstale root; re-check after ~30 s.\n\n## Step 6 — Record `deploy.json`\n\n```json\n{\n \"build_uuid\": \"…\",\n \"stack\": \"nextjs\",\n \"rendering\": \"ssr\",\n \"app_type\": \"next\",\n \"output_directory\": \".next\",\n \"node_version\": 22,\n \"method\": \"hosting_deploy (type: nodejs, settings passed inline)\",\n \"deployed_at\": \"…\",\n \"verified_at\": \"…\",\n \"urls\": { \"live\": \"https://<domain>\", \"cms\": \"https://<domain>/cms\" },\n \"checks\": { \"root\": 200, \"ssr_headers\": true, \"backend_preserved\": true }\n}\n```\n\nNo secrets in `deploy.json`. The `urls.cms` field and the `backend_preserved` check above are\n**WordPress-only** — adjust the record to the backend:\n\n- **WordPress:** keep `urls.cms` and `checks.backend_preserved` as shown.\n- **WordPress + WooCommerce:** keep `urls.cms` + `checks.backend_preserved` (it *is* WordPress), and add\n `urls.store_api` from `site.json`; no external link step.\n- **Ecommerce:** omit `urls.cms`/`backend_preserved`; record the store URLs instead (`urls.storefront_api`,\n `urls.store_admin` from `site.json`) and link the custom sales channel to the live domain —\n `ecommerce_sales-channels_update { store_id, sales_channel_id, url }` (see the ecommerce provision step).\n- **PocketBase:** omit `urls.cms`; add `urls.api` and `urls.admin` from `site.json`,\n `checks.backend_preserved` (the `/api/health` and `/_/` checks) and `checks.pb_verify: \"READY\"`.\n\nUpdate `state.json` (`stage` → `done`), then continue to Step 9 (done).\n\n`hosting_deploy` on the local server is the only path: give its `path` a local **archive** (`zip`, `tar`,\n`tar.gz`, `tgz`, `7z`) written outside `~/.hostinger/` as in Step 2. There is no separate upload or\nbuild step to fall back to.\n"
439
439
  },
440
440
  {
441
441
  "uri": "skill://hostinger-headless/steps/09-done/SKILL.md",
442
- "digest": "sha256:cb98c694c7ef4934ed934d913f4fa8f39a112654c95b7d2cf2cb3b5ae4e42a2e",
443
- "size": 14243,
442
+ "digest": "sha256:10396463d13ee9b19e2aac6c193b32cc6d68240573e0fa0befaba2b46596bb1e",
443
+ "size": 15634,
444
444
  "mimeType": "text/markdown",
445
- "text": "---\nname: headless-step-done\ndescription: \"Step 9 (done) of the Hostinger Headless flow. Verifies the live site, then hands over the URLs (hPanel success page, main site, WordPress/store admin, dashboard), opens the success page in the browser on a successful run, and gives a summary of what was built plus explicit next steps — how to log in to wp-admin and reset the password, how to manage content, and how to finish WooCommerce/store setup so it can take orders. Its final report format is also used whenever a run stops early.\"\n---\n\n# headless-step-done\n\nVerify the live site, then hand over the URLs (success page, main site, WordPress admin, dashboard), a\nsummary of what was built, and what the user can do next. **On a successful run, open the success page\nfor the user** (see *Open the success page*).\n\n## Final report\n\nEvery run ends with this report, whether it finishes here or stops at an earlier stage (a dummy or\nmissing step, a failed provision, the user pausing). On a run that deployed this session, run the\nchecks in *Verify the live site* below first. Build the report from `state.json`, `site.json`,\n`deploy.json` and what you actually did and checked in this run. Report only what you verified. Don't\nclaim a stage passed if you didn't check it.\n\nWrite it in this order:\n\n1. **One-paragraph outcome.** What was created and on which domain (bold it). If the run stopped\n early, name the stage it stopped at, why, and what the user will see right now (e.g. \"the site\n root returns 403 until the frontend is deployed\").\n\n2. **Steps completed.** This table is required on every run, including early stops: never replace\n it with prose. Give one row per stage that ran, using the stage numbers and names from the\n orchestrator's flow table. Leave out stages that didn't run and name them in the outcome\n paragraph instead. A finished WordPress blog build looks like this:\n\n | Stage | Result |\n |---|---|\n | connect | Hostinger connector reached over MCP (`@hostinger/mcp` 1.9.2); signed in through the browser login. |\n | 1 check state | New build for `harbourlight.blog`; no earlier workspace. |\n | 2 refine | Personal travel blog about coastal towns in the UK; backend: WordPress. |\n | 3 provision | Business plan, order 41875230; setup took 6 min; domain, SSL and WordPress checks passed. |\n | 4 content model | 5 pages, 8 posts, 6 categories, 1 menu, 14 images (Hostinger AI), SEO titles on every page; counts re-read from the REST API. |\n | 5 design | \"Salt & Ink\" direction: serif headings, sea-blue accents; `design.md` and logo icon written. |\n | 6 frontend | Next.js SSR with home, blog, post, category and contact pages wired to the REST API; local build passed. |\n | 7 validate | Instance setup completed; REST API returned the 8 pushed posts; no preview (nobody signing off). |\n | 8 deploy | Source uploaded, build finished in 3 min; site root returns 200. |\n | 9 done | Main site, wp-admin and REST API re-checked live: all returned 200. |\n\n3. **Links** — every URL that exists at this point. Build the hPanel URLs from `site.json`\n (`order_id`, `username`, `domain`) and the onboarding slug; take the rest from `site.json` /\n `deploy.json`. Lead with the one the user cares about most — the **main site** — then the admin\n and dashboards. **Don't list the success page here:** it opens on its own (see *Open the success\n page*), so printing its URL in the report is just noise — the only exception is when a browser\n can't be opened (handled in that section):\n\n - **Main site (live):** `urls.site` (`https://<domain>`) — only once deployed.\n - **WordPress admin (one-click auto-login):** for a WordPress backend, **mint and hand over the\n auto-login redirect URL** — `wordpress_login_create-links { username, software: <site.json\n wordpress.install_id> }` returns a temporary link that logs the user straight into wp-admin. Give\n that URL as the admin link (it lands on `/cms/wp-admin`), so the user never needs a password.\n Alongside it, give the two ways back in that don't expire: the **login URL `{urls.wp_admin}`**\n (`https://<domain>/cms/wp-admin` — the headless WordPress lives under `/cms`), and the **WP Admin\n button in hPanel** (hPanel → the website → *WP Admin*). Note how to **reset the password**: on the\n `/cms/wp-admin` login screen use **\"Lost your password?\"**, and WordPress emails a reset link to the\n **WordPress admin email** (the address set at install, which the owner already has). Optionally, for\n more reliable delivery, they can create a mailbox on the domain (hPanel → *Emails*) and set it as the\n admin address in **wp-admin → Settings → General**.\n **Never print or store a password.** For a **WordPress + WooCommerce** store, this *same* wp-admin\n login is the store admin (wp-admin → WooCommerce → Products/Orders) — do **not** use the Ecommerce\n `store_admin` path; the store setup the owner still needs is spelled out under *Next steps*. For a\n Hostinger **Ecommerce** store, link the store admin from `urls.store_admin` instead.\n - **PocketBase dashboard** (a PocketBase backend): `urls.admin` (`https://<domain>/_/`). Give\n the owner the **login access** in three lines: the sign-in email (`site.json →\n pocketbase.superuser_email`, by default the website owner's email), the full path of the\n credentials file (`~/.hostinger/<domain>/.pocketbase/credentials.json`, which holds\n `superuser_email` and `superuser_password`), and one command to read it (`cat <that path>`).\n **Name the file, never paste the password**, and tell them to move both into their password\n manager, since Hostinger can't show the password again. Say that this is the owner's\n superuser login, not a member account: members sign up on the site and live in the `users`\n collection. A lost password is reset by asking the agent to rotate the superuser\n (`hosting_pocketbase_set-superuser`), which saves a new password to the same file.\n - **hPanel site dashboard:** `https://hpanel.hostinger.com/websites/<domain>` (the headless website\n is installed by now).\n - **Onboarding (resume):** `https://hpanel.hostinger.com/headless-onboarding/<order_id>/<username>/`\n - **REST API** (for developers): `urls.rest_api`, or `urls.api` on PocketBase.\n\n > URL shape note: `<username>` may be dropped from the onboarding/success URLs in a future hPanel\n > release. If a built URL 404s, retry the same path without the `/<username>` segment before\n > reporting it as broken.\n\n4. **Next steps** — what the user does now to actually use the site. Required on a successful run;\n tailor the bullets to the backend and keep them concrete. This is the hand-holding the hPanel\n success page can't give: don't just link wp-admin, tell them what to do once they're in.\n\n - **Manage content (WordPress):** in wp-admin (the one-click link, the `/cms/wp-admin` login URL, or\n hPanel → *WP Admin*) → **Posts**, **Pages**, **Media**, **Appearance → Menus**. Say how edits reach\n the live site for *this* build: an **SSR** frontend re-reads the REST API each request, so changes\n show up with no redeploy; an **SSG/static** build must be redeployed to pick up new content (read\n `state.json → frontend.rendering`).\n - **WordPress + WooCommerce — finish store setup so it can take orders.** The catalog and cart already\n work, but **checkout stays off until the owner configures it in wp-admin**: WooCommerce → Settings →\n **Payments** (enable at least one method) and → **Shipping** (add a zone with a rate), then confirm\n products/prices and place a test order. When `site.json → woocommerce.payment_enabled` is `false`,\n state plainly that this step is **required before any purchase works** — this is the gap owners hit.\n - **Hostinger Ecommerce store:** when `site.json → ecommerce.payment_enabled` is `false`, finish\n payment setup in the store admin (`urls.store_admin`) before the storefront can sell; otherwise it's\n ready to take orders.\n - **PocketBase:** manage the app from hPanel → the website (environment variables, deployments,\n logs). Say in plain words who can do what, one line per kind of data from\n `pocketbase/schema.json` (e.g. \"anyone can book a free place; only you can see who booked\"), and\n that everything visitors enter is in the dashboard (`/_/`) → *Collections*. Then the two things\n only the owner can set there: **Settings → Mail settings** (SMTP) before password-reset or\n verification emails can be sent — required when visitors have accounts — and **Settings →\n Backups**. Data changes show up live; a schema change needs no redeploy.\n\n5. **Where state lives** — the workspace path `~/.hostinger/<domain>/`, the `stage` that a\n resumed run will start from, and the build report `~/.hostinger/<domain>/report.html`.\n\n6. **Gaps / follow-ups** (only if any) — a short numbered list of anything skipped, approximated or\n left for the user (e.g. no images generated, default WordPress content left in place).\n\nNever include passwords, JWTs or other secrets in the report. For wp-admin access, give the URL and\noffer a one-click login link (`wordpress_login_create-links`), not credentials.\n\n## Verify the live site (brief)\n\nOn a run that deployed this session, re-confirm what you're about to hand over actually works (deploy\nalready checked this — this is a quick re-confirm, not a full re-run):\n\n- **Main site:** `GET https://<domain>/` → 200 (Next.js SSR: `x-powered-by: Next.js`; Astro SSG: static\n HTML with real content).\n- **WordPress admin:** `GET {urls.wp_admin}` → reachable (a login page, 200/302), not 404.\n- **Backend API:** `GET {urls.rest_api}/posts?per_page=1` → 200 (WordPress); for a **WooCommerce** store\n (`site.json → woocommerce.enabled`) also `GET {urls.store_api}/products?per_page=1` → 200; or the\n storefront API for the sales channel → 200 (Ecommerce); or `GET {urls.api}/health` → 200 and\n `GET {urls.admin}` → 200 (PocketBase).\n- **Contact form** (`site.json → contact_form.enabled`): validate already sent a test submission, so\n don't send another here. Hand it over as\n [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §6 says.\n\nIf a check fails, say so in the outcome paragraph and don't claim the site is live.\n\n## Open the success page\n\nOn a **successful** run (the deploy succeeded and the live checks passed), open the success page in the\nuser's **main / system browser** right after presenting the report, so they land on the hPanel\ncelebration/next-steps screen for their new site. This is a side effect only — **don't print the\nsuccess URL in the report output** (it just opens); the one exception is the can't-open-a-browser\nfallback below. Build the URL with `<tool>` as the running tool's onboarding slug (see *State and\nartifacts* in the top-level `SKILL.md`):\n\n```bash\n# Build the URL first, then open it with the OS default (main) browser — not an embedded one.\n# <tool> = the onboarding slug\nURL=\"https://hpanel.hostinger.com/headless-onboarding/<order_id>/<username>/success/<domain>/<tool>\"\nopen \"$URL\" # macOS\n# xdg-open \"$URL\" # Linux\n# start \"\" \"$URL\" # Windows\n```\n\n- **Main browser only.** Use the OS opener above (`open` / `xdg-open` / `start`) so the page lands in\n Chrome, Safari, Edge, or whatever the user actually uses. **Do not** open it in an embedded or\n sandboxed browser (Cursor IDE browser / `cursor-ide-browser`, Playwright, Puppeteer, WebView, or\n any in-agent browser tab). Those stay inside the tool session and the user won't see the\n celebration page where they expect it.\n- Open it **once**, and only on a successful run — never on an early stop or a failed deploy.\n- If your tool can't open a browser (the command isn't available, or `open`/`xdg-open`/`start`\n fails), don't treat it as a failure and **don't fall back to an embedded browser**. This is the\n **one** case where you print the success URL — show it once in the report and tell the user to\n open it themselves in their main browser.\n\n## Build report\n\nRight after the final report, save the build report for this run. It turns the run log (stage times\nfrom `run-log.json`, events from `events.jsonl`) into `reports/<run>.json` and `.html`, and copies the\nHTML to `report.html` in the workspace:\n\n```bash\n# one shell command; one `event good` per thing that went well, if not logged yet\nnode <skill>/run-log.mjs <domain> event good '{\"text\":\"<something that went well>\"}' && \\\nnode <skill>/run-log.mjs <domain> stage-end done ok && \\\nnode <skill>/run-log.mjs <domain> report --outcome <live|stopped|failed> [--tokens '<json>']\n```\n\nThen send it to Hostinger as *Run log and build report* in the top-level `SKILL.md` says (for changes asked\nafter this report, see *Follow-ups continue the run* there), and tell the user in one line: \"Sent the build report to Hostinger to help improve\nthe flow.\" On a 422 say it's saved locally only; on any other failure say it'll be sent next session.\n\n- **Outcome:** `live` when the deploy succeeded this run, `failed` when a stage failed and you\n couldn't recover, `stopped` for everything else (the user paused, a dummy or missing step). Leave\n `--outcome` out and the script decides from the log.\n- **Before you write it,** check that every issue, correction and skill gap from this run is in\n `events.jsonl`. Log any that are missing now; the report only shows what was logged.\n- **After you write it,** read the `warning:` lines `report` prints. They list logging gaps: a stage\n that never ended, a start that was estimated, a stage logged with no duration, or (on a live build)\n a stage that was never logged. Fix what you can: `stage-end` an open stage, or correct a start with\n `stage-fix <stage> --started-ago <time>`, then run `report` again. What you can't fix stays in the report's\n *Logging gaps* section.\n- In the final report's *Where state lives*, add the path to `report.html` so the user can open it.\n\nDo this on every run, including the early stops: those reports are the most useful ones.\n"
445
+ "text": "---\nname: headless-step-done\ndescription: \"Step 9 (done) of the Hostinger Headless flow. Verifies the live site, then hands over the URLs (hPanel success page, main site, WordPress/store admin, dashboard), tells hPanel the build finished and opens the success page in the browser on a successful run, and gives a summary of what was built plus explicit next steps — how to log in to wp-admin and reset the password, how to manage content, and how to finish WooCommerce/store setup so it can take orders. Its final report format is also used whenever a run stops early.\"\n---\n\n# headless-step-done\n\nVerify the live site, then hand over the URLs (success page, main site, WordPress admin, dashboard), a\nsummary of what was built, and what the user can do next. **On a successful run, tell hPanel the build\nfinished and open the success page for the user** (see *Open the success page*).\n\n## Final report\n\nEvery run ends with this report, whether it finishes here or stops at an earlier stage (a dummy or\nmissing step, a failed provision, the user pausing). On a run that deployed this session, run the\nchecks in *Verify the live site* below first. Build the report from `state.json`, `site.json`,\n`deploy.json` and what you actually did and checked in this run. Report only what you verified. Don't\nclaim a stage passed if you didn't check it.\n\nWrite it in this order:\n\n1. **One-paragraph outcome.** What was created and on which domain (bold it). If the run stopped\n early, name the stage it stopped at, why, and what the user will see right now (e.g. \"the site\n root returns 403 until the frontend is deployed\").\n\n2. **Steps completed.** This table is required on every run, including early stops: never replace\n it with prose. Give one row per stage that ran, using the stage numbers and names from the\n orchestrator's flow table. Leave out stages that didn't run and name them in the outcome\n paragraph instead. A finished WordPress blog build looks like this:\n\n | Stage | Result |\n |---|---|\n | connect | Hostinger connector reached over MCP (`@hostinger/mcp` 1.9.2); signed in through the browser login. |\n | 1 check state | New build for `harbourlight.blog`; no earlier workspace. |\n | 2 refine | Personal travel blog about coastal towns in the UK; backend: WordPress. |\n | 3 provision | Business plan, order 41875230; setup took 6 min; domain, SSL and WordPress checks passed. |\n | 4 content model | 5 pages, 8 posts, 6 categories, 1 menu, 14 images (Hostinger AI), SEO titles on every page; counts re-read from the REST API. |\n | 5 design | \"Salt & Ink\" direction: serif headings, sea-blue accents; `design.md` and logo icon written. |\n | 6 frontend | Next.js SSR with home, blog, post, category and contact pages wired to the REST API; local build passed. |\n | 7 validate | Instance setup completed; REST API returned the 8 pushed posts; npm audit clean; no preview (nobody signing off). |\n | 8 deploy | Source uploaded, build finished in 3 min; site root returns 200. |\n | 9 done | Main site, wp-admin and REST API re-checked live: all returned 200. |\n\n3. **Links** — every URL that exists at this point. Build the hPanel URLs from `site.json`\n (`order_id`, `username`, `domain`) and the onboarding slug; take the rest from `site.json` /\n `deploy.json`. Lead with the one the user cares about most — the **main site** — then the admin\n and dashboards. **Don't list the success page here:** it opens on its own (see *Open the success\n page*), so printing its URL in the report is just noise — the only exception is when a browser\n can't be opened (handled in that section):\n\n - **Main site (live):** `urls.site` (`https://<domain>`) — only once deployed.\n - **WordPress admin (one-click auto-login):** for a WordPress backend, **mint and hand over the\n auto-login redirect URL** — `wordpress_login_create-links { username, software: <site.json\n wordpress.install_id> }` returns a temporary link that logs the user straight into wp-admin. Give\n that URL as the admin link (it lands on `/cms/wp-admin`), so the user never needs a password.\n Alongside it, give the two ways back in that don't expire: the **login URL `{urls.wp_admin}`**\n (`https://<domain>/cms/wp-admin` — the headless WordPress lives under `/cms`), and the **WP Admin\n button in hPanel** (hPanel → the website → *WP Admin*). Note how to **reset the password**: on the\n `/cms/wp-admin` login screen use **\"Lost your password?\"**, and WordPress emails a reset link to the\n **WordPress admin email** (the address set at install, which the owner already has). Optionally, for\n more reliable delivery, they can create a mailbox on the domain (hPanel → *Emails*) and set it as the\n admin address in **wp-admin → Settings → General**.\n **Never print or store a password.** For a **WordPress + WooCommerce** store, this *same* wp-admin\n login is the store admin (wp-admin → WooCommerce → Products/Orders) — do **not** use the Ecommerce\n `store_admin` path; the store setup the owner still needs is spelled out under *Next steps*. For a\n Hostinger **Ecommerce** store, link the store admin from `urls.store_admin` instead.\n - **PocketBase dashboard** (a PocketBase backend): `urls.admin` (`https://<domain>/_/`). Give\n the owner the **login access** in three lines: the sign-in email (`site.json →\n pocketbase.superuser_email`, by default the website owner's email), the full path of the\n credentials file (`~/.hostinger/<domain>/.pocketbase/credentials.json`, which holds\n `superuser_email` and `superuser_password`), and one command to read it (`cat <that path>`).\n **Name the file, never paste the password**, and tell them to move both into their password\n manager, since Hostinger can't show the password again. Say that this is the owner's\n superuser login, not a member account: members sign up on the site and live in the `users`\n collection. A lost password is reset by asking the agent to rotate the superuser\n (`hosting_pocketbase_set-superuser`), which saves a new password to the same file.\n - **hPanel site dashboard:** `https://hpanel.hostinger.com/websites/<domain>` (the headless website\n is installed by now).\n - **Onboarding (resume):** `https://hpanel.hostinger.com/headless-onboarding/<order_id>/<username>/`\n - **REST API** (for developers): `urls.rest_api`, or `urls.api` on PocketBase.\n\n > URL shape note: `<username>` may be dropped from the onboarding/success URLs in a future hPanel\n > release. If a built URL 404s, retry the same path without the `/<username>` segment before\n > reporting it as broken.\n\n4. **Next steps** — what the user does now to actually use the site. Required on a successful run;\n tailor the bullets to the backend and keep them concrete. This is the hand-holding the hPanel\n success page can't give: don't just link wp-admin, tell them what to do once they're in.\n\n - **Manage content (WordPress):** in wp-admin (the one-click link, the `/cms/wp-admin` login URL, or\n hPanel → *WP Admin*) → **Posts**, **Pages**, **Media**, **Appearance → Menus**. Say how edits reach\n the live site for *this* build: an **SSR** frontend re-reads the REST API each request, so changes\n show up with no redeploy; an **SSG/static** build must be redeployed to pick up new content (read\n `state.json → frontend.rendering`).\n - **WordPress + WooCommerce — finish store setup so it can take orders.** The catalog and cart already\n work, but **checkout stays off until the owner configures it in wp-admin**: WooCommerce → Settings →\n **Payments** (enable at least one method) and → **Shipping** (add a zone with a rate), then confirm\n products/prices and place a test order. When `site.json → woocommerce.payment_enabled` is `false`,\n state plainly that this step is **required before any purchase works** — this is the gap owners hit.\n - **Hostinger Ecommerce store:** when `site.json → ecommerce.payment_enabled` is `false`, finish\n payment setup in the store admin (`urls.store_admin`) before the storefront can sell; otherwise it's\n ready to take orders.\n - **PocketBase:** manage the app from hPanel → the website (environment variables, deployments,\n logs). Say in plain words who can do what, one line per kind of data from\n `pocketbase/schema.json` (e.g. \"anyone can book a free place; only you can see who booked\"), and\n that everything visitors enter is in the dashboard (`/_/`) → *Collections*. Then the two things\n only the owner can set there: **Settings → Mail settings** (SMTP) before password-reset or\n verification emails can be sent — required when visitors have accounts — and **Settings →\n Backups**. Data changes show up live; a schema change needs no redeploy.\n\n5. **Where state lives** — the workspace path `~/.hostinger/<domain>/`, the `stage` that a\n resumed run will start from, and the build report `~/.hostinger/<domain>/report.html`.\n\n6. **Gaps / follow-ups** (only if any) — a short numbered list of anything skipped, approximated or\n left for the user (e.g. no images generated, default WordPress content left in place).\n\nNever include passwords, JWTs or other secrets in the report. For wp-admin access, give the URL and\noffer a one-click login link (`wordpress_login_create-links`), not credentials.\n\n## Verify the live site (brief)\n\nOn a run that deployed this session, re-confirm what you're about to hand over actually works (deploy\nalready checked this — this is a quick re-confirm, not a full re-run):\n\n- **Main site:** `GET https://<domain>/` → 200 (Next.js SSR: `x-powered-by: Next.js`; Astro SSG: static\n HTML with real content).\n- **WordPress admin:** `GET {urls.wp_admin}` → reachable (a login page, 200/302), not 404.\n- **Backend API:** `GET {urls.rest_api}/posts?per_page=1` → 200 (WordPress); for a **WooCommerce** store\n (`site.json → woocommerce.enabled`) also `GET {urls.store_api}/products?per_page=1` → 200; or the\n storefront API for the sales channel → 200 (Ecommerce); or `GET {urls.api}/health` → 200 and\n `GET {urls.admin}` → 200 (PocketBase).\n- **Contact form** (`site.json → contact_form.enabled`): validate already sent a test submission, so\n don't send another here. Hand it over as\n [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §6 says.\n\nIf a check fails, say so in the outcome paragraph and don't claim the site is live.\n\n## Open the success page\n\nOn a **successful** run (the deploy succeeded and the live checks passed), open the success page in the\nuser's **main / system browser** right after presenting the report, so they land on the hPanel\ncelebration/next-steps screen for their new site. This is a side effect only — **don't print the\nsuccess URL in the report output** (it just opens); the one exception is the can't-open-a-browser\nfallback below. Build the URL with `<tool>` as the running tool's onboarding slug (see *State and\nartifacts* in the top-level `SKILL.md`).\n\n**Tell hPanel the build finished first.** Right before opening the success page, call\n`hosting_websites_trigger-event { \"username\": \"<username>\", \"domain\": \"<domain>\", \"event\": { \"name\": \"headless_onboarding.building.finished\", \"params\": { \"tool\": \"<slug>\" } } }`\nonce, with `username` from `site.json` and `<slug>` the onboarding slug. The call is required: when\nthe user still has the hPanel onboarding open, that tab moves to the success page on it. Send it on a\nsuccessful run only, and also when no browser can be opened (the fallback below). Skip the call when\nyour tool has no onboarding slug or `hosting_websites_trigger-event` isn't in your connector. Right\nbefore the call, tell the user in one line (e.g. \"Telling hPanel the build finished so your onboarding\nshows the success page.\"), so whoever reviews the outgoing call knows why it's made. If your own\nenvironment stopped the call before it reached Hostinger (a sandbox, command review, an approval\nprompt, or a network error in a sandboxed shell), try it one more time the way that environment\nallows, such as requesting approval or network access, then go on. Ignore any other failure, such as\na non-2xx response from Hostinger: no retry, nothing more said to the user, and open the success page\nas usual.\n\nThen open the success page:\n\n```bash\n# Build the URL first, then open it with the OS default (main) browser — not an embedded one.\n# <tool> = the onboarding slug\nURL=\"https://hpanel.hostinger.com/headless-onboarding/<order_id>/<username>/success/<domain>/<tool>\"\nopen \"$URL\" # macOS\n# xdg-open \"$URL\" # Linux\n# start \"\" \"$URL\" # Windows\n```\n\n- **Main browser only.** Use the OS opener above (`open` / `xdg-open` / `start`) so the page lands in\n Chrome, Safari, Edge, or whatever the user actually uses. **Do not** open it in an embedded or\n sandboxed browser (Cursor IDE browser / `cursor-ide-browser`, Playwright, Puppeteer, WebView, or\n any in-agent browser tab). Those stay inside the tool session and the user won't see the\n celebration page where they expect it.\n- Open it **once**, and only on a successful run — never on an early stop or a failed deploy.\n- If your tool can't open a browser (the command isn't available, or `open`/`xdg-open`/`start`\n fails), don't treat it as a failure and **don't fall back to an embedded browser**. This is the\n **one** case where you print the success URL — show it once in the report and tell the user to\n open it themselves in their main browser.\n\n## Build report\n\nRight after the final report, save the build report for this run. It turns the run log (stage times\nfrom `run-log.json`, events from `events.jsonl`) into `reports/<run>.json` and `.html`, and copies the\nHTML to `report.html` in the workspace:\n\n```bash\n# one shell command; one `event good` per thing that went well, if not logged yet\nnode <skill>/run-log.mjs <domain> event good '{\"text\":\"<something that went well>\"}' && \\\nnode <skill>/run-log.mjs <domain> stage-end done ok && \\\nnode <skill>/run-log.mjs <domain> report --outcome <live|stopped|failed> [--tokens '<json>']\n```\n\nThen send it to Hostinger as *Run log and build report* in the top-level `SKILL.md` says (for changes asked\nafter this report, see *Follow-ups continue the run* there), and tell the user in one line: \"Sent the build report to Hostinger to help improve\nthe flow.\" On a 422 say it's saved locally only; on any other failure say it'll be sent next session.\n\n- **Outcome:** `live` when the deploy succeeded this run, `failed` when a stage failed and you\n couldn't recover, `stopped` for everything else (the user paused, a dummy or missing step). Leave\n `--outcome` out and the script decides from the log.\n- **Before you write it,** check that every issue, correction and skill gap from this run is in\n `events.jsonl`. Log any that are missing now; the report only shows what was logged.\n- **After you write it,** read the `warning:` lines `report` prints. They list logging gaps: a stage\n that never ended, a start that was estimated, a stage logged with no duration, or (on a live build)\n a stage that was never logged. Fix what you can: `stage-end` an open stage, or correct a start with\n `stage-fix <stage> --started-ago <time>`, then run `report` again. What you can't fix stays in the report's\n *Logging gaps* section.\n- In the final report's *Where state lives*, add the path to `report.html` so the user can open it.\n\nDo this on every run, including the early stops: those reports are the most useful ones.\n"
446
446
  },
447
447
  {
448
448
  "uri": "skill://hostinger-headless/wait.mjs",
@@ -704,9 +704,10 @@ export default [
704
704
  "properties": {
705
705
  "name": {
706
706
  "type": "string",
707
- "description": "Name of the event. `headless_onboarding.tool.connected`: an AI coding tool started building this website with the Hostinger headless skill, so hPanel shows the tool as connected; send it once per skill run; takes `params.tool`.",
707
+ "description": "Name of the event. `headless_onboarding.tool.connected`: an AI coding tool started building this website with the Hostinger headless skill, so hPanel shows the tool as connected; send it once per skill run; takes `params.tool`. `headless_onboarding.building.finished`: that tool finished building this website, so hPanel opens its success page; send it once, when the build succeeded, right before opening the success page; takes `params.tool`.",
708
708
  "enum": [
709
- "headless_onboarding.tool.connected"
709
+ "headless_onboarding.tool.connected",
710
+ "headless_onboarding.building.finished"
710
711
  ]
711
712
  },
712
713
  "params": {
@@ -724,9 +724,10 @@ const tools: OpenApiTool[] = [
724
724
  "properties": {
725
725
  "name": {
726
726
  "type": "string",
727
- "description": "Name of the event. `headless_onboarding.tool.connected`: an AI coding tool started building this website with the Hostinger headless skill, so hPanel shows the tool as connected; send it once per skill run; takes `params.tool`.",
727
+ "description": "Name of the event. `headless_onboarding.tool.connected`: an AI coding tool started building this website with the Hostinger headless skill, so hPanel shows the tool as connected; send it once per skill run; takes `params.tool`. `headless_onboarding.building.finished`: that tool finished building this website, so hPanel opens its success page; send it once, when the build succeeded, right before opening the success page; takes `params.tool`.",
728
728
  "enum": [
729
- "headless_onboarding.tool.connected"
729
+ "headless_onboarding.tool.connected",
730
+ "headless_onboarding.building.finished"
730
731
  ]
731
732
  },
732
733
  "params": {
@@ -624,9 +624,10 @@ export default [
624
624
  "properties": {
625
625
  "name": {
626
626
  "type": "string",
627
- "description": "Name of the event. `headless_onboarding.tool.connected`: an AI coding tool started building this website with the Hostinger headless skill, so hPanel shows the tool as connected; send it once per skill run; takes `params.tool`.",
627
+ "description": "Name of the event. `headless_onboarding.tool.connected`: an AI coding tool started building this website with the Hostinger headless skill, so hPanel shows the tool as connected; send it once per skill run; takes `params.tool`. `headless_onboarding.building.finished`: that tool finished building this website, so hPanel opens its success page; send it once, when the build succeeded, right before opening the success page; takes `params.tool`.",
628
628
  "enum": [
629
- "headless_onboarding.tool.connected"
629
+ "headless_onboarding.tool.connected",
630
+ "headless_onboarding.building.finished"
630
631
  ]
631
632
  },
632
633
  "params": {
@@ -644,9 +644,10 @@ const tools: OpenApiTool[] = [
644
644
  "properties": {
645
645
  "name": {
646
646
  "type": "string",
647
- "description": "Name of the event. `headless_onboarding.tool.connected`: an AI coding tool started building this website with the Hostinger headless skill, so hPanel shows the tool as connected; send it once per skill run; takes `params.tool`.",
647
+ "description": "Name of the event. `headless_onboarding.tool.connected`: an AI coding tool started building this website with the Hostinger headless skill, so hPanel shows the tool as connected; send it once per skill run; takes `params.tool`. `headless_onboarding.building.finished`: that tool finished building this website, so hPanel opens its success page; send it once, when the build succeeded, right before opening the success page; takes `params.tool`.",
648
648
  "enum": [
649
- "headless_onboarding.tool.connected"
649
+ "headless_onboarding.tool.connected",
650
+ "headless_onboarding.building.finished"
650
651
  ]
651
652
  },
652
653
  "params": {
@@ -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: '4.10.2', tools, instructions });
7
+ startServer({ name: 'hostinger-agency-hosting-mcp', version: '4.12.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: '4.10.2', tools, instructions });
7
+ startServer({ name: 'hostinger-agency-hosting-mcp', version: '4.12.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: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-agent-readiness-mcp', version: '4.12.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: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-agent-readiness-mcp', version: '4.12.0', tools });
@@ -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: '4.10.2', tools, instructions, skills });
8
+ startServer({ name: 'hostinger-api-mcp', version: '4.12.0', tools, instructions, skills });
@@ -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: '4.10.2', tools, instructions, skills });
8
+ startServer({ name: 'hostinger-api-mcp', version: '4.12.0', tools, instructions, skills });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/billing.js';
5
5
 
6
- startServer({ name: 'hostinger-billing-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-billing-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/billing.js';
5
5
 
6
- startServer({ name: 'hostinger-billing-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-billing-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/dns.js';
5
5
 
6
- startServer({ name: 'hostinger-dns-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-dns-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/dns.js';
5
5
 
6
- startServer({ name: 'hostinger-dns-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-dns-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/domains.js';
5
5
 
6
- startServer({ name: 'hostinger-domains-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-domains-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/domains.js';
5
5
 
6
- startServer({ name: 'hostinger-domains-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-domains-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/ecommerce.js';
5
5
 
6
- startServer({ name: 'hostinger-ecommerce-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-ecommerce-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/ecommerce.js';
5
5
 
6
- startServer({ name: 'hostinger-ecommerce-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-ecommerce-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/gpu.js';
5
5
 
6
- startServer({ name: 'hostinger-gpu-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-gpu-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/gpu.js';
5
5
 
6
- startServer({ name: 'hostinger-gpu-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-gpu-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/horizons.js';
5
5
 
6
- startServer({ name: 'hostinger-horizons-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-horizons-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/horizons.js';
5
5
 
6
- startServer({ name: 'hostinger-horizons-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-horizons-mcp', version: '4.12.0', tools });
@@ -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: '4.10.2', tools, instructions });
7
+ startServer({ name: 'hostinger-hosting-mcp', version: '4.12.0', tools, instructions });
@@ -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: '4.10.2', tools, instructions });
7
+ startServer({ name: 'hostinger-hosting-mcp', version: '4.12.0', tools, instructions });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/mail.js';
5
5
 
6
- startServer({ name: 'hostinger-mail-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-mail-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/mail.js';
5
5
 
6
- startServer({ name: 'hostinger-mail-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-mail-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/reach.js';
5
5
 
6
- startServer({ name: 'hostinger-reach-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-reach-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/reach.js';
5
5
 
6
- startServer({ name: 'hostinger-reach-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-reach-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/vps.js';
5
5
 
6
- startServer({ name: 'hostinger-vps-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-vps-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/vps.js';
5
5
 
6
- startServer({ name: 'hostinger-vps-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-vps-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/wordpress.js';
5
5
 
6
- startServer({ name: 'hostinger-wordpress-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-wordpress-mcp', version: '4.12.0', tools });
@@ -3,4 +3,4 @@
3
3
  import { startServer } from '../core/runtime.js';
4
4
  import tools from '../core/tools/wordpress.js';
5
5
 
6
- startServer({ name: 'hostinger-wordpress-mcp', version: '4.10.2', tools });
6
+ startServer({ name: 'hostinger-wordpress-mcp', version: '4.12.0', tools });