hostinger-api-mcp 4.15.2 → 4.16.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 (46) hide show
  1. package/CHANGELOG.md +8 -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 +23 -0
  6. package/skills/headless/VERSION +2 -2
  7. package/skills/headless/local-server.mjs +64 -0
  8. package/skills/headless/processes.mjs +62 -0
  9. package/skills/headless/report.schema.json +16 -0
  10. package/skills/headless/run-log.mjs +27 -54
  11. package/skills/headless/servers.mjs +169 -0
  12. package/skills/headless/steps/06-frontend/SKILL.md +3 -1
  13. package/skills/headless/steps/06-frontend/bring-your-own-frontend.md +5 -0
  14. package/skills/headless/steps/07-validate/SKILL.md +5 -4
  15. package/skills/headless/steps/09-done/SKILL.md +3 -0
  16. package/skills/headless/workspace.mjs +28 -0
  17. package/src/core/skills.js +49 -21
  18. package/src/core/skills.ts +49 -21
  19. package/src/servers/agency-hosting.js +1 -1
  20. package/src/servers/agency-hosting.ts +1 -1
  21. package/src/servers/agent-readiness.js +1 -1
  22. package/src/servers/agent-readiness.ts +1 -1
  23. package/src/servers/all.js +1 -1
  24. package/src/servers/all.ts +1 -1
  25. package/src/servers/billing.js +1 -1
  26. package/src/servers/billing.ts +1 -1
  27. package/src/servers/dns.js +1 -1
  28. package/src/servers/dns.ts +1 -1
  29. package/src/servers/domains.js +1 -1
  30. package/src/servers/domains.ts +1 -1
  31. package/src/servers/ecommerce.js +1 -1
  32. package/src/servers/ecommerce.ts +1 -1
  33. package/src/servers/gpu.js +1 -1
  34. package/src/servers/gpu.ts +1 -1
  35. package/src/servers/horizons.js +1 -1
  36. package/src/servers/horizons.ts +1 -1
  37. package/src/servers/hosting.js +1 -1
  38. package/src/servers/hosting.ts +1 -1
  39. package/src/servers/mail.js +1 -1
  40. package/src/servers/mail.ts +1 -1
  41. package/src/servers/reach.js +1 -1
  42. package/src/servers/reach.ts +1 -1
  43. package/src/servers/vps.js +1 -1
  44. package/src/servers/vps.ts +1 -1
  45. package/src/servers/wordpress.js +1 -1
  46. package/src/servers/wordpress.ts +1 -1
@@ -92,11 +92,12 @@ fixtures, placeholder copy or `.htaccess` in the output).
92
92
 
93
93
  ## 5 — Preview & approval (optional — only when a person is signing off)
94
94
 
95
- When someone wants to see it first: start the local preview (Astro: `npm run preview`; Next.js:
96
- `npx next start`), show the user a couple of key routes at desktop and phone width (capture phone width
95
+ When someone wants to see it first: start the local preview with `local-server.mjs`, as *Local
96
+ 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
97
98
  as in frontend's *Visual check*; frontend already caught the layout bugs, so this is for the user, not a
98
- re-review) and navigation, and present it for **explicit approval**. If preview tooling is unavailable,
99
- give the user the command and URL. On an autonomous or temp-domain run, skip this — deploy will verify the live result anyway.
99
+ re-review) and navigation, and present it for **explicit approval**. If the preview won't start,
100
+ 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.
100
101
 
101
102
  Then (after approval, or immediately if 4–5 were skipped): `state.json` → `stage: "deploy"`, fresh
102
103
  `updated_at`; leave `provision` unchanged.
@@ -207,6 +207,9 @@ the flow." On a 422 say it's saved locally only; on any other failure say it'll
207
207
  a stage that was never logged. Fix what you can: `stage-end` an open stage, or correct a start with
208
208
  `stage-fix <stage> --started-ago <time>`, then run `report` again. What you can't fix stays in the report's
209
209
  *Logging gaps* section.
210
+ - `report` also stops the local servers this run started. Each `server not stopped:` line it prints
211
+ names one it couldn't confirm stopped: tell the user in one line its port and pid, so they can stop
212
+ it.
210
213
  - In the final report's *Where state lives*, add the path to `report.html` so the user can open it.
211
214
 
212
215
  Do this on every run, including the early stops: those reports are the most useful ones.
@@ -0,0 +1,28 @@
1
+ // The folder a Headless build keeps for a domain, ~/.hostinger/<domain>, shared by the scripts that
2
+ // write there (run-log.mjs, local-server.mjs).
3
+
4
+ import { existsSync, mkdirSync, renameSync, writeFileSync } from 'node:fs';
5
+ import { homedir } from 'node:os';
6
+ import { join } from 'node:path';
7
+
8
+ // A domain names a folder under ~/.hostinger, so "../x" or "a/b" must never reach the file system.
9
+ const HOSTNAME = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$/i;
10
+
11
+ export const now = () => new Date().toISOString().replace(/\.\d{3}Z$/, 'Z');
12
+
13
+ // The domain's workspace folder; throws a message for the agent when the domain isn't one, or when
14
+ // the folder is missing and not created (run-start, a run's first command, creates it).
15
+ export function workspaceDir(domain, { create = false } = {}) {
16
+ if (!HOSTNAME.test(domain ?? '')) throw new Error(`"${domain ?? ''}" is not a domain (use its ASCII form, e.g. xn--caf-dma.com)`);
17
+ const dir = join(homedir(), '.hostinger', domain);
18
+ if (create) mkdirSync(dir, { recursive: true });
19
+ else if (!existsSync(dir)) throw new Error(`no workspace at ${dir}; run-log.mjs run-start creates it`);
20
+ return dir;
21
+ }
22
+
23
+ // Through a rename, so a reader never sees half of the file.
24
+ export function writeJsonAtomic(file, value) {
25
+ const tmp = `${file}.${process.pid}.tmp`;
26
+ writeFileSync(tmp, `${JSON.stringify(value, null, 2)}\n`);
27
+ renameSync(tmp, file);
28
+ }