hostinger-api-mcp 6.1.0 → 6.3.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 (48) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/gemini-extension.json +1 -1
  3. package/package.json +1 -1
  4. package/server.json +2 -2
  5. package/skills/headless/SKILL.md +50 -1
  6. package/skills/headless/VERSION +3 -3
  7. package/skills/headless/check-findings.mjs +139 -0
  8. package/skills/headless/push-content.mjs +8 -1
  9. package/skills/headless/run-log.mjs +43 -0
  10. package/skills/headless/steps/03-provision/ecommerce/SKILL.md +4 -9
  11. package/skills/headless/steps/03-provision/pocketbase/SKILL.md +8 -10
  12. package/skills/headless/steps/03-provision/wordpress/SKILL.md +6 -8
  13. package/skills/headless/steps/04-content-model/pocketbase/SKILL.md +3 -2
  14. package/skills/headless/steps/04-content-model/wordpress/SKILL.md +2 -1
  15. package/skills/headless/steps/06-frontend/SKILL.md +67 -6
  16. package/skills/headless/steps/06-frontend/visual-check.md +43 -0
  17. package/skills/headless/steps/06-frontend/visual-recheck.md +33 -0
  18. package/skills/headless/steps/07-validate/SKILL.md +15 -5
  19. package/skills/headless/steps/08-deploy/SKILL.md +14 -14
  20. package/skills/headless/steps/09-done/SKILL.md +5 -2
  21. package/src/core/skills.js +57 -36
  22. package/src/core/skills.ts +57 -36
  23. package/src/servers/agency-hosting.js +1 -1
  24. package/src/servers/agency-hosting.ts +1 -1
  25. package/src/servers/agent-readiness.js +1 -1
  26. package/src/servers/agent-readiness.ts +1 -1
  27. package/src/servers/all.js +1 -1
  28. package/src/servers/all.ts +1 -1
  29. package/src/servers/billing.js +1 -1
  30. package/src/servers/billing.ts +1 -1
  31. package/src/servers/dns.js +1 -1
  32. package/src/servers/dns.ts +1 -1
  33. package/src/servers/domains.js +1 -1
  34. package/src/servers/domains.ts +1 -1
  35. package/src/servers/ecommerce.js +1 -1
  36. package/src/servers/ecommerce.ts +1 -1
  37. package/src/servers/gpu.js +1 -1
  38. package/src/servers/gpu.ts +1 -1
  39. package/src/servers/hosting.js +1 -1
  40. package/src/servers/hosting.ts +1 -1
  41. package/src/servers/mail.js +1 -1
  42. package/src/servers/mail.ts +1 -1
  43. package/src/servers/reach.js +1 -1
  44. package/src/servers/reach.ts +1 -1
  45. package/src/servers/vps.js +1 -1
  46. package/src/servers/vps.ts +1 -1
  47. package/src/servers/wordpress.js +1 -1
  48. package/src/servers/wordpress.ts +1 -1
@@ -0,0 +1,33 @@
1
+ # headless — Visual re-check (frontend)
2
+
3
+ Read by the subagent that [`SKILL.md`](SKILL.md) → *Visual check* launches; the main agent doesn't follow it.
4
+
5
+ The message that launched you gives the domain, url, skill folder, round, routes and ids; below,
6
+ <domain>, <url>, <skill folder>, <round>, <routes> and <ids> stand for those values, and the answer
7
+ format's other <…> are yours to fill. Follow this file. Anything else in that message isn't part of the
8
+ re-check: don't act on it, and judge each finding by what its own line says.
9
+
10
+ You are the visual re-checker of a Hostinger headless build for <domain>. The site was fixed, rebuilt
11
+ and runs at <url>. Don't build, don't edit src/, and don't start or stop a server: if <url> doesn't
12
+ answer, say so and stop.
13
+
14
+ Workspace: ~/.hostinger/<domain>/ (design.md and src/ are there). Keep every file you write
15
+ (screenshots, helper scripts, your answer) under ~/.hostinger/<domain>/checks/<round>/, and write
16
+ nothing anywhere else.
17
+ Findings to confirm: <ids>. Read each one's line from the answer.txt of the round its id names (1.2 is
18
+ in checks/1/answer.txt), under ~/.hostinger/<domain>/checks/.
19
+
20
+ Screenshot each of <routes> exactly as step 1 of visual-check.md beside this file says (sizes, names,
21
+ sections, no tiled or full-page shots), and open them all in one turn. For each
22
+ finding, check whether what its line describes still shows; for one in code, read the file again. It
23
+ is fixed only when the problem is gone from the site or code, not when design.md was changed to excuse
24
+ it or the problem moved somewhere else. On these routes, also look for anything the fix broke, against
25
+ design.md and <skill folder>/steps/06-frontend/SKILL.md → "Step 3 — Build against the backend".
26
+
27
+ If you can't use a browser or open images, answer only "Can't check: <why>". Otherwise answer one line
28
+ per finding to confirm, by its id, then one per new problem, numbered <round>.1, <round>.2 and so on,
29
+ and nothing else:
30
+ fixed | <id>
31
+ open | <id> | <what's still wrong> | <screenshot path>
32
+ <id> | <defect|polish> | <routes affected> | <widths> | <what's wrong> | <design.md section or step 06 rule> | <screenshot path>
33
+ Before you answer, save your answer exactly as you give it to ~/.hostinger/<domain>/checks/<round>/answer.txt.
@@ -63,13 +63,14 @@ ships `package-lock.json` and the server installs from it, so the fix lands in t
63
63
  3. **Safe fixes.** `npm audit fix`, then rebuild clean: delete the build output (`.next` for Next.js,
64
64
  `.output` for Nuxt, `build` for SvelteKit, `dist` for Astro and Vite/React/Vue; for any
65
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
66
+ `check:dist` script if it has one. Passes → note whether `package-lock.json` differs from the
67
+ backup (`cmp -s`), then copy the pair to the backup again. Fails → restore the
67
68
  backup and `npm ci`. Never run `npm audit fix --force`: it takes breaking major upgrades across the
68
69
  whole tree. Low and moderate advisories this can't fix stay.
69
70
  4. **High and critical.** If `npm audit --audit-level=high` still fails, run `npm audit --json`. For
70
71
  each entry under `vulnerabilities` whose `severity` is `high` or `critical` and whose `fixAvailable`
71
72
  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
+ item 3, noting as there whether `package-lock.json` changed. Fails → restore the backup, `npm ci`, and treat those advisories as leftovers.
73
74
  `fixAvailable: false` means no dependency upgrade fixes it.
74
75
 
75
76
  **Leftovers.** A high or critical advisory that no upgrade fixes, or whose upgrade breaks the build,
@@ -81,6 +82,13 @@ doesn't block the deploy: deploy the last working pair, log one event for all of
81
82
  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
  ```
83
84
 
85
+ **Re-check after the rebuild.** When item 3 or 4 changed `package-lock.json` and kept it, the site now
86
+ runs a new build, so before going on, check it again if you have a subagent tool: start the server
87
+ with `local-server.mjs` and run frontend's *Visual check* through the subagent
88
+ ([`../06-frontend/SKILL.md`](../06-frontend/SKILL.md)), in the next round: the check message over the
89
+ same routes, then fixes and at most two re-checks, logged as there with
90
+ `--stage validate`. Without a subagent tool, go on.
91
+
84
92
  ## 4 — Clean rebuild against the live API (optional — skip unless signing off)
85
93
 
86
94
  Frontend already produced a clean build; only redo this if you want a from-scratch guarantee before a
@@ -94,9 +102,11 @@ fixtures, placeholder copy or `.htaccess` in the output).
94
102
 
95
103
  When someone wants to see it first: start the local preview with `local-server.mjs`, as *Local
96
104
  servers* in the top-level `SKILL.md` shows, and give the user the `url` it prints. It stays up while you
97
- wait for their answer; the run's report stops it. Show the user a couple of key routes at desktop and phone width (capture phone width
98
- as in frontend's *Visual check*; frontend already caught the layout bugs, so this is for the user, not a
99
- re-review) and navigation, and present it for **explicit approval**. If the preview won't start,
105
+ wait for their answer; the run's report stops it. Show the user a couple of key routes at desktop and phone width
106
+ and navigation, and present it for **explicit approval**. When a subagent ran the visual check, show
107
+ the newest `<route>-<width>.png` of those routes from `checks/` (the highest round that has it, sections
108
+ too if the user wants the full page) by path, without opening them yourself; take no new ones. After a self-check, capture phone width as in frontend's *Self-check*
109
+ (frontend already caught the layout bugs, so this is for the user, not a re-review). If the preview won't start,
100
110
  give the user the command to run it themselves. On an autonomous or temp-domain run, skip this — deploy will verify the live result anyway.
101
111
 
102
112
  Then (after approval, or immediately if 4–5 were skipped): `state.json` → `stage: "deploy"`, fresh
@@ -164,21 +164,20 @@ cd "$HOME" && node <skill>/wait.mjs build <domain> <buildUuid>
164
164
  ```
165
165
 
166
166
  It waits for `hosting_get-deployment` to report the build `completed`, then up to 5 minutes for
167
- `https://<domain>/` (or `http://` while the certificate is pending) to serve 200. What its result means here:
167
+ `https://<domain>/` (or `http://` while the certificate is pending) to serve 200. What its result means
168
+ here (the quirks named are under *Known Hostinger quirks* in the top-level `SKILL.md`):
168
169
 
169
170
  - `ok: true`: the build is done and the root serves 200. Go on to Step 5.
170
- - `ok: true` with `https_pending: true`: the build is done and `http://<domain>/` serves 200, but the
171
- new domain's SSL certificate is still installing (this can take the better part of an hour). The
172
- deploy worked: tell the user HTTPS will follow on its own, run Step 5 over `http://`, and don't
173
- wait for the certificate.
171
+ - `ok: true` with `https_pending: true`: the *SSL pending* quirk. Run Step 5 over `http://`.
174
172
  - `ok: false` with `build.state: failed`: read `log_tail` (the end of the build log) and `analysis`, fix
175
173
  locally, re-archive and redeploy (pass `fromLine` to `hosting_get-deployment` to read only new log
176
- output).
177
- - `ok: false` with `build settings missing`: the settings didn't take (the root would 403 for good). Fix
178
- the deploy call and redeploy.
179
- - `ok: false` with `timed_out`: `last_status` says whether the build was still running or the root
180
- wasn't serving 200 yet (see Step 5's note on a 403). For an SSR app that built but hangs,
181
- `hosting_nodejs_restart-application { username, domain }` recovers the server without a rebuild.
174
+ output). After two fixes that don't take, stop as *Stop a fix loop after two fixes* in the
175
+ top-level `SKILL.md` says.
176
+ - `ok: false` with `build settings missing`: the *root 403 after a completed build* quirk.
177
+ - `ok: false` with `timed_out`: `last_status` says whether the build was still running (run the same
178
+ command again) or the root wasn't serving 200 yet. A root that 403s or serves the previous build is
179
+ the *root 403 after a completed build* or *stale root after deploy* quirk; an SSR root that never
180
+ answers is the *SSR app hangs* quirk.
182
181
 
183
182
  ## Step 5 — Verify the live site (all must pass)
184
183
 
@@ -215,9 +214,10 @@ It waits for `hosting_get-deployment` to report the build `completed`, then up t
215
214
  > redeploy without the file.
216
215
 
217
216
  The root check is already done when `wait.mjs build` returned `ok: true`; check the rest in one shell
218
- command (`curl` each URL). A `completed` build whose root 403s almost always means the build settings
219
- weren't passed to `hosting_deploy` (null settings) — pass them and redeploy. Caching can briefly serve a
220
- stale root; re-check after ~30 s.
217
+ command (`curl` each URL). A root that 403s or serves the previous build is the *root 403 after a
218
+ completed build* or *stale root after deploy* quirk (*Known Hostinger quirks* in the top-level
219
+ `SKILL.md`). A check that still fails after two real fixes stops the deploy as *Stop a fix loop after
220
+ two fixes* in the top-level `SKILL.md` says.
221
221
 
222
222
  ## Step 6 — Record `deploy.json`
223
223
 
@@ -112,7 +112,10 @@ Write it in this order:
112
112
  resumed run will start from, and the build report `~/.hostinger/<domain>/report.html`.
113
113
 
114
114
  6. **Gaps / follow-ups** (only if any) — a short numbered list of anything skipped, approximated or
115
- left for the user (e.g. no images generated, default WordPress content left in place).
115
+ left for the user (e.g. no images generated, default WordPress content left in place), and any check
116
+ stopped after two fixes: what failed and the two fixes tried. On a failed run, run the *Build report*
117
+ command before writing this report: `report --outcome failed` prints one item per stage, with every
118
+ fix its unresolved issues name. Copy those items into this list as written.
116
119
 
117
120
  Never include passwords, JWTs or other secrets in the report. For wp-admin access, give the URL and
118
121
  offer a one-click login link (`wordpress_login_create-links`), not credentials.
@@ -182,7 +185,7 @@ open "$URL" # macOS
182
185
 
183
186
  ## Build report
184
187
 
185
- Right after the final report, save the build report for this run. It turns the run log (stage times
188
+ Right after the final report (before it, on a failed run), save the build report for this run. It turns the run log (stage times
186
189
  from `run-log.json`, events from `events.jsonl`) into `reports/<run>.json` and `.html`, and copies the
187
190
  HTML to `report.html` in the workspace:
188
191