hostinger-api-mcp 4.2.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/headless/SKILL.md +14 -7
- package/skills/headless/VERSION +3 -3
- package/skills/headless/run-log.mjs +3 -5
- package/skills/headless/steps/01-check-state/SKILL.md +16 -5
- package/skills/headless/steps/02-refine/SKILL.md +56 -29
- package/skills/headless/steps/03-provision/SKILL.md +20 -25
- package/skills/headless/steps/03-provision/pocketbase/SKILL.md +190 -0
- package/skills/headless/steps/04-content-model/SKILL.md +12 -12
- package/skills/headless/steps/04-content-model/pocketbase/SKILL.md +90 -0
- package/skills/headless/steps/04-content-model/pocketbase/auth.md +52 -0
- package/skills/headless/steps/04-content-model/pocketbase/frontend.md +130 -0
- package/skills/headless/steps/04-content-model/pocketbase/patterns.md +286 -0
- package/skills/headless/steps/04-content-model/pocketbase/rules.md +66 -0
- package/skills/headless/steps/04-content-model/pocketbase/schema.example.json +65 -0
- package/skills/headless/steps/04-content-model/pocketbase/schema.md +78 -0
- package/skills/headless/steps/04-content-model/pocketbase/scripts/pb-apply-schema.mjs +245 -0
- package/skills/headless/steps/04-content-model/pocketbase/scripts/pb-lib.mjs +120 -0
- package/skills/headless/steps/04-content-model/pocketbase/scripts/pb-verify.mjs +127 -0
- package/skills/headless/steps/04-content-model/pocketbase/troubleshooting.md +55 -0
- package/skills/headless/steps/06-frontend/SKILL.md +32 -33
- package/skills/headless/steps/07-validate/SKILL.md +8 -2
- package/skills/headless/steps/08-deploy/SKILL.md +32 -17
- package/skills/headless/steps/09-done/SKILL.md +20 -3
- package/skills/headless/wait.mjs +19 -9
- package/src/core/runtime.js +1 -1
- package/src/core/runtime.ts +1 -1
- package/src/core/skills.js +114 -37
- package/src/core/skills.ts +114 -37
- package/src/servers/agency-hosting.js +1 -1
- package/src/servers/agency-hosting.ts +1 -1
- package/src/servers/agent-readiness.js +1 -1
- package/src/servers/agent-readiness.ts +1 -1
- package/src/servers/all.js +1 -1
- package/src/servers/all.ts +1 -1
- package/src/servers/billing.js +1 -1
- package/src/servers/billing.ts +1 -1
- package/src/servers/dns.js +1 -1
- package/src/servers/dns.ts +1 -1
- package/src/servers/domains.js +1 -1
- package/src/servers/domains.ts +1 -1
- package/src/servers/ecommerce.js +1 -1
- package/src/servers/ecommerce.ts +1 -1
- package/src/servers/gpu.js +1 -1
- package/src/servers/gpu.ts +1 -1
- package/src/servers/horizons.js +1 -1
- package/src/servers/horizons.ts +1 -1
- package/src/servers/hosting.js +1 -1
- package/src/servers/hosting.ts +1 -1
- package/src/servers/mail.js +1 -1
- package/src/servers/mail.ts +1 -1
- package/src/servers/reach.js +1 -1
- package/src/servers/reach.ts +1 -1
- package/src/servers/vps.js +1 -1
- package/src/servers/vps.ts +1 -1
- package/src/servers/wordpress.js +1 -1
- package/src/servers/wordpress.ts +1 -1
- package/skills/headless/steps/03-provision/webapp/SKILL.md +0 -164
|
@@ -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.
|
|
7
|
+
startServer({ name: 'hostinger-agency-hosting-mcp', version: '4.4.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.
|
|
7
|
+
startServer({ name: 'hostinger-agency-hosting-mcp', version: '4.4.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.
|
|
6
|
+
startServer({ name: 'hostinger-agent-readiness-mcp', version: '4.4.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.
|
|
6
|
+
startServer({ name: 'hostinger-agent-readiness-mcp', version: '4.4.0', tools });
|
package/src/servers/all.js
CHANGED
|
@@ -5,4 +5,4 @@ import tools from '../core/tools/all.js';
|
|
|
5
5
|
import instructions from '../core/instructions.js';
|
|
6
6
|
import skills from '../core/skills.js';
|
|
7
7
|
|
|
8
|
-
startServer({ name: 'hostinger-api-mcp', version: '4.
|
|
8
|
+
startServer({ name: 'hostinger-api-mcp', version: '4.4.0', tools, instructions, skills });
|
package/src/servers/all.ts
CHANGED
|
@@ -5,4 +5,4 @@ import tools from '../core/tools/all.js';
|
|
|
5
5
|
import instructions from '../core/instructions.js';
|
|
6
6
|
import skills from '../core/skills.js';
|
|
7
7
|
|
|
8
|
-
startServer({ name: 'hostinger-api-mcp', version: '4.
|
|
8
|
+
startServer({ name: 'hostinger-api-mcp', version: '4.4.0', tools, instructions, skills });
|
package/src/servers/billing.js
CHANGED
package/src/servers/billing.ts
CHANGED
package/src/servers/dns.js
CHANGED
package/src/servers/dns.ts
CHANGED
package/src/servers/domains.js
CHANGED
package/src/servers/domains.ts
CHANGED
package/src/servers/ecommerce.js
CHANGED
package/src/servers/ecommerce.ts
CHANGED
package/src/servers/gpu.js
CHANGED
package/src/servers/gpu.ts
CHANGED
package/src/servers/horizons.js
CHANGED
package/src/servers/horizons.ts
CHANGED
package/src/servers/hosting.js
CHANGED
|
@@ -4,4 +4,4 @@ import { startServer } from '../core/runtime.js';
|
|
|
4
4
|
import tools from '../core/tools/hosting.js';
|
|
5
5
|
import instructions from '../core/instructions.js';
|
|
6
6
|
|
|
7
|
-
startServer({ name: 'hostinger-hosting-mcp', version: '4.
|
|
7
|
+
startServer({ name: 'hostinger-hosting-mcp', version: '4.4.0', tools, instructions });
|
package/src/servers/hosting.ts
CHANGED
|
@@ -4,4 +4,4 @@ import { startServer } from '../core/runtime.js';
|
|
|
4
4
|
import tools from '../core/tools/hosting.js';
|
|
5
5
|
import instructions from '../core/instructions.js';
|
|
6
6
|
|
|
7
|
-
startServer({ name: 'hostinger-hosting-mcp', version: '4.
|
|
7
|
+
startServer({ name: 'hostinger-hosting-mcp', version: '4.4.0', tools, instructions });
|
package/src/servers/mail.js
CHANGED
package/src/servers/mail.ts
CHANGED
package/src/servers/reach.js
CHANGED
package/src/servers/reach.ts
CHANGED
package/src/servers/vps.js
CHANGED
package/src/servers/vps.ts
CHANGED
package/src/servers/wordpress.js
CHANGED
package/src/servers/wordpress.ts
CHANGED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: headless-step-provision-webapp
|
|
3
|
-
description: "Provision a plain Node.js app host for the Hostinger Headless flow: create an empty website (no WordPress, no store engine, no /cms), optionally a MySQL database, then record it in site.json. For any webapp / SPA / app that brings its own code and data."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# headless-step-provision-webapp
|
|
7
|
-
|
|
8
|
-
Provision a bare **Node.js app host** for `<domain>` and prove it is ready. This is the backend for
|
|
9
|
-
**any webapp, SPA or app** that brings its own code (and, if it needs one, its own database) — there is
|
|
10
|
-
no CMS and no store engine here. The site is an **empty website**: just the hosting slot that the
|
|
11
|
-
frontend step builds into and the deploy step ships to as a Node.js application. **Out:** `site.json`.
|
|
12
|
-
|
|
13
|
-
> **Not WordPress, not Ecommerce.** Never provision `headless_wordpress` / `headless_ecommerce` for a
|
|
14
|
-
> webapp, and never install WordPress at `/cms`. A webapp owns its own routes, data and rendering.
|
|
15
|
-
|
|
16
|
-
All website/database operations below go through the Hostinger connector (`execute`).
|
|
17
|
-
|
|
18
|
-
> **Fire vs join (background provision).** Steps 1–2 up to `hosting_websites_create` are the
|
|
19
|
-
> **fire** half: once the setup is queued, record `provision.in_progress` and return to do prepare work
|
|
20
|
-
> (see the router `../SKILL.md`). The readiness **poll** at the end of Step 2, plus Steps 3–5, are the
|
|
21
|
-
> **join** half — run them when an instance-barrier step needs the backend (or immediately, if the
|
|
22
|
-
> agent can't interleave). An already-`completed` site detected in Step 1 means provision is done:
|
|
23
|
-
> record `provision.completed` and adopt it.
|
|
24
|
-
|
|
25
|
-
## Step 1 — Detect before you create (never provision twice)
|
|
26
|
-
|
|
27
|
-
1. `hosting_websites_list { "domain": "<domain>" }` — substring filter, so **exact-match** the row's
|
|
28
|
-
`domain`. If a row exists, note `username`, `order_id`, `website_type`.
|
|
29
|
-
2. `hosting_websites_list-setups { "domain": "<domain>" }` — exact-match the row:
|
|
30
|
-
- `completed` → already provisioned → skip to Step 3 (adopt it).
|
|
31
|
-
- `running` → skip to Step 2 (poll).
|
|
32
|
-
- `failed` → tell the user and point them at hPanel; do **not** call `hosting_websites_create` again on your own.
|
|
33
|
-
3. If the site exists but is a different kind (`website_type` is `headless`, or a WordPress/store site),
|
|
34
|
-
stop and tell the user — this domain already hosts something else. **Never create a second site.**
|
|
35
|
-
4. **Only provision a webapp for a `webapp` brief.** A `wordpress` or `ecommerce` brief belongs in those
|
|
36
|
-
subfolders (installed into one headless instance's `/cms`) — never spin up a separate Node.js host for
|
|
37
|
-
it. And if this build already has a headless shell/site (a recorded `site.json → website_type:
|
|
38
|
-
"headless"`, or a `headless`/`headless_empty` row for the project's domain), do **not** create a new
|
|
39
|
-
website on another domain: stop and tell the user, so the build never ends up split across two
|
|
40
|
-
instances.
|
|
41
|
-
|
|
42
|
-
## Step 2 — Create (only when nothing exists)
|
|
43
|
-
|
|
44
|
-
1. Pick the plan: `hosting_orders_list { "statuses": ["active"] }`. One active order → use it; several
|
|
45
|
-
→ ask the user which.
|
|
46
|
-
2. Start the setup as an **empty website** — **omit `type`** (no WordPress, no store):
|
|
47
|
-
|
|
48
|
-
```json
|
|
49
|
-
{ "operation": "hosting_websites_create",
|
|
50
|
-
"params": { "order_id": <order_id>, "domain": "<domain>" } }
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
`domain` must be a **customer-owned** domain. For a temporary `*.hostingersite.com` subdomain,
|
|
54
|
-
**omit `domain`** — the setup generates one itself and returns it in the response. Don't call a
|
|
55
|
-
separate subdomain op to make one first: there's no need in this flow. The response then carries the
|
|
56
|
-
generated domain: if it differs from the workspace directory name, move `~/.hostinger/<old>/` to
|
|
57
|
-
`~/.hostinger/<new>/`
|
|
58
|
-
(if `<new>/` already exists, stop and ask instead of moving into it),
|
|
59
|
-
update the domain in `brief.md`, and tell the user the new domain.
|
|
60
|
-
3. Don't wait here. At the join, `cd "$HOME" && node <skill>/wait.mjs setup <domain>` (see *Waiting on Hostinger* in
|
|
61
|
-
the top-level `SKILL.md`) returns once the setup is `completed`, usually at once by then. A `failed`
|
|
62
|
-
setup → stop, point at hPanel.
|
|
63
|
-
|
|
64
|
-
## Step 3 — Database (only if the app needs one)
|
|
65
|
-
|
|
66
|
-
Skip this step entirely for an app with no database (static SPA, an app that talks to an external API).
|
|
67
|
-
The app needs one when `brief.md` → **Existing project** says **Database: MySQL**, or, for a new app,
|
|
68
|
-
when the brief describes data the app stores itself.
|
|
69
|
-
This is **join-half** work — it needs the live website, so run it once `provision.status == "completed"`.
|
|
70
|
-
|
|
71
|
-
**Preferred — let the platform create the database and inject the credentials:**
|
|
72
|
-
`hosting_databases_setup-website { username, domain }` creates a MySQL database, **generates the
|
|
73
|
-
password, writes `DB_HOST` / `DB_PORT` / `DB_NAME` / `DB_USER` / `DB_PASSWORD` / `DATABASE_URL` into the
|
|
74
|
-
website's environment variables, and restarts the app — in one call.** The password is never returned,
|
|
75
|
-
so there is **nothing to persist and nothing to lose across sessions** — the app reads it from the
|
|
76
|
-
environment. (It 422s if any of those env vars already exist; clear them first with
|
|
77
|
-
`hosting_nodejs_replace-environment-variables`. Frameworks that bake vars into the build — Next.js,
|
|
78
|
-
`NEXT_PUBLIC_*` — only pick up the values on the deploy build.)
|
|
79
|
-
|
|
80
|
-
> **⚠️ A later `hosting_nodejs_replace-environment-variables` wipes these credentials.** That call is a
|
|
81
|
-
> **full replace**, and when you list the current vars first the `DB_PASSWORD` (and `DATABASE_URL`) read
|
|
82
|
-
> back **masked** (`********`) — the generated password is unknown, so you cannot resend it and the DB
|
|
83
|
-
> env is lost. One rule, pick one:
|
|
84
|
-
> - **(a) Set every other app env var first, and call `setup-website` last** — then nothing has to
|
|
85
|
-
> replace the env again.
|
|
86
|
-
> - **(b) If a later replace is unavoidable**, reset the password with
|
|
87
|
-
> `hosting_databases_change-password { username, name, password }` and resend **all** of `DB_HOST`,
|
|
88
|
-
> `DB_PORT`, `DB_NAME`, `DB_USER`, `DB_PASSWORD` and `DATABASE_URL` with the new password in that same
|
|
89
|
-
> full replace.
|
|
90
|
-
|
|
91
|
-
**Manual alternative** — only when you need a specific name/user or finer control:
|
|
92
|
-
|
|
93
|
-
1. `hosting_databases_create` with a name, a user, and a password you generate — name and user are
|
|
94
|
-
prefixed with the account username automatically. Read the full, prefixed `name`/`user` back from
|
|
95
|
-
`hosting_databases_list`.
|
|
96
|
-
2. **Which host the app connects to:** the app runs **on the website**, so Node.js connects to
|
|
97
|
-
**`127.0.0.1:3306`** — never `localhost` (it can resolve to IPv6 `::1`, and not every database user
|
|
98
|
-
has that grant), and never the external `host` from `hosting_databases_list` (`srvNNNN.hstgr.io`,
|
|
99
|
-
which has no grant for connections from the server itself).
|
|
100
|
-
3. **Set the env vars now, while you still hold the generated password.** The password is **not persisted
|
|
101
|
-
anywhere** (never in `site.json`), so set `DB_HOST=127.0.0.1`, `DB_PORT=3306`, `DB_NAME`, `DB_USER`,
|
|
102
|
-
`DB_PASSWORD`, plus `DATABASE_URL=mysql://USER:PASSWORD@127.0.0.1:3306/NAME` (URL-encode USER/PASSWORD)
|
|
103
|
-
right here with `hosting_nodejs_replace-environment-variables` (a **full replace** — list current keys
|
|
104
|
-
first; values come back masked; send the complete set with real values). Saving restarts the process;
|
|
105
|
-
build-time vars need a fresh deploy (`hosting_deploy`) afterwards. **Don't defer this to deploy:** on
|
|
106
|
-
a **cross-session resume** the generated password is gone, so you must **reset it** with
|
|
107
|
-
`hosting_databases_change-password { username, name, password }` and set the env vars from the new one.
|
|
108
|
-
4. **Never** put the password in source, a committed `.env`, client-side JavaScript, or a chat reply;
|
|
109
|
-
never print it once stored.
|
|
110
|
-
|
|
111
|
-
## Step 4 — Verify
|
|
112
|
-
|
|
113
|
-
| Check | How | Expect |
|
|
114
|
-
|---|---|---|
|
|
115
|
-
| Website exists | `hosting_websites_list` exact row | the row is present, `username` known |
|
|
116
|
-
| Setup finished | `hosting_websites_list-setups` exact row | `status: completed` |
|
|
117
|
-
| Database reachable *(only if created)* | `hosting_databases_list { username }` | the prefixed db + user are listed |
|
|
118
|
-
|
|
119
|
-
`GET https://<domain>/` returns the Hostinger default page (or 403) until the frontend is deployed —
|
|
120
|
-
expected, not a failure. There is **no `/cms` and no API** on this domain; the app itself serves every
|
|
121
|
-
route once it is deployed (Step 8).
|
|
122
|
-
|
|
123
|
-
If a check fails: retry once after ~30 s; if it still fails, stop and point the user at hPanel.
|
|
124
|
-
|
|
125
|
-
## Step 5 — Record `site.json`
|
|
126
|
-
|
|
127
|
-
```json
|
|
128
|
-
{
|
|
129
|
-
"backend": "webapp",
|
|
130
|
-
"website_type": "empty",
|
|
131
|
-
"order_id": 1007223428,
|
|
132
|
-
"username": "u…",
|
|
133
|
-
"runtime": "nodejs",
|
|
134
|
-
"database": {
|
|
135
|
-
"enabled": false,
|
|
136
|
-
"engine": "mysql",
|
|
137
|
-
"name": "u…_appdb",
|
|
138
|
-
"user": "u…_app",
|
|
139
|
-
"host": "127.0.0.1",
|
|
140
|
-
"port": 3306
|
|
141
|
-
},
|
|
142
|
-
"urls": {
|
|
143
|
-
"site": "https://<domain>"
|
|
144
|
-
},
|
|
145
|
-
"provisioned_at": "…",
|
|
146
|
-
"verified_at": "…"
|
|
147
|
-
}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
No passwords or tokens in `site.json` — only the non-secret connection shape (host/port/name/user). Set
|
|
151
|
-
`"database": { "enabled": false }` (and drop the rest) when the app needs no database.
|
|
152
|
-
|
|
153
|
-
## Deploy & content model (what happens next)
|
|
154
|
-
|
|
155
|
-
- **Content model is skipped for a webapp** — there is no CMS or store to seed; the app owns its own
|
|
156
|
-
data. The content-model router (`../../04-content-model/SKILL.md`) passes straight through to the
|
|
157
|
-
frontend step for this backend.
|
|
158
|
-
- **Deploy** is a standard Node.js application deploy, handled by `../../08-deploy/SKILL.md`: it archives
|
|
159
|
-
the **source** (not the build output; exclude `node_modules/`, `.next/`, `dist/`, build output and
|
|
160
|
-
`.git/`), then deploys with `hosting_deploy` (`type: "nodejs"`, upload + server-side `npm install` +
|
|
161
|
-
build, one shot) passing the framework's `appType` + `outputDirectory` inline, and polls
|
|
162
|
-
`hosting_get-deployment` until the build completes. Any supported `appType` works (Next.js, Nuxt,
|
|
163
|
-
Express, NestJS, Fastify, Vite/React/Vue SPA, …). There is no `/cms` to preserve here, so the whole
|
|
164
|
-
root is the app.
|