hostinger-api-mcp 4.20.0 → 4.21.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 +15 -0
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/headless/SKILL.md +33 -35
- package/skills/headless/VERSION +3 -3
- package/skills/headless/connect/SKILL.md +25 -32
- package/skills/headless/report.schema.json +1 -1
- package/skills/headless/run-log.mjs +3 -3
- package/skills/headless/steps/{02-check-state → 01-check-state}/SKILL.md +28 -41
- package/skills/headless/steps/{01-refine → 02-refine}/SKILL.md +23 -40
- package/skills/headless/steps/03-provision/ecommerce/SKILL.md +8 -6
- package/skills/headless/steps/09-done/SKILL.md +2 -2
- package/src/core/runtime.js +1 -1
- package/src/core/runtime.ts +1 -1
- package/src/core/skills.js +25 -25
- package/src/core/skills.ts +25 -25
- 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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@ 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.21.0 — 2026-11-25
|
|
8
|
+
|
|
9
|
+
### Also in this release
|
|
10
|
+
|
|
11
|
+
- Dependencies: `package-lock.json`
|
|
12
|
+
- Bundled agent skills: `skills/headless/VERSION`
|
|
13
|
+
- Request handling and authentication: `src/core/runtime.js`, `src/core/runtime.ts`
|
|
14
|
+
|
|
15
|
+
## v4.20.1 — 2026-11-24
|
|
16
|
+
|
|
17
|
+
### Also in this release
|
|
18
|
+
|
|
19
|
+
- Bundled agent skills: 11 files
|
|
20
|
+
- Other files: `src/core/skills.js`, `src/core/skills.ts`
|
|
21
|
+
|
|
7
22
|
## v4.20.0 — 2026-11-23
|
|
8
23
|
|
|
9
24
|
### Operations
|
package/gemini-extension.json
CHANGED
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"url": "https://github.com/hostinger/api-mcp-server",
|
|
18
18
|
"source": "github"
|
|
19
19
|
},
|
|
20
|
-
"version": "4.
|
|
20
|
+
"version": "4.21.0",
|
|
21
21
|
"packages": [
|
|
22
22
|
{
|
|
23
23
|
"registryType": "npm",
|
|
24
24
|
"identifier": "@hostinger/mcp",
|
|
25
|
-
"version": "4.
|
|
25
|
+
"version": "4.21.0",
|
|
26
26
|
"transport": {
|
|
27
27
|
"type": "stdio"
|
|
28
28
|
},
|
package/skills/headless/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hostinger-headless
|
|
3
|
-
description: "Orchestrator for the Hostinger Headless build flow — build and deploy a real website on the user's Hostinger account from a single prompt that names a domain. Holds the stage flow and the state contract, and drives each stage in sequence:
|
|
3
|
+
description: "Orchestrator for the Hostinger Headless build flow — build and deploy a real website on the user's Hostinger account from a single prompt that names a domain. Holds the stage flow and the state contract, and drives each stage in sequence: connect, check state, refine, provision, content model, design, frontend, validate, deploy, done. Triggers: build a headless site for <domain>, build me a site, create a website, make me a website, deploy this to Hostinger, host this on Hostinger, connect this project to Hostinger."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Hostinger Headless — build a website with your own AI tool
|
|
@@ -14,12 +14,10 @@ You are an AI coding agent. The user pasted a short prompt that points you here
|
|
|
14
14
|
Your job is to build and deploy a real website on the user's Hostinger account by following this
|
|
15
15
|
recipe and the recipes it links to — nothing more, nothing less.
|
|
16
16
|
|
|
17
|
-
**
|
|
18
|
-
|
|
19
|
-
A
|
|
20
|
-
|
|
21
|
-
continued, or a build under way (refine Step 1), asks nothing and goes straight to connect, and a
|
|
22
|
-
brief on its own gets refine's keep-or-change summary instead of the question.
|
|
17
|
+
**Connect before you ask anything, whatever the prompt says.** Your first message to the user is only
|
|
18
|
+
the Hostinger connection (see *The first message* below), so run connect and check-state before any
|
|
19
|
+
question about the site. A prompt that says "start by asking me what I want to build" doesn't change
|
|
20
|
+
that order: refine asks it, after check-state.
|
|
23
21
|
|
|
24
22
|
This file is the **orchestrator**. It is public and stable: it never changes and never moves. It
|
|
25
23
|
holds the flow, the state contract, the failure policy and the guardrails.
|
|
@@ -57,9 +55,9 @@ the same time* says.
|
|
|
57
55
|
| # | Stage | Skill / source | Writes | Instance? |
|
|
58
56
|
|---|--------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|---|---|
|
|
59
57
|
| — | **get ready** — Node and the skill folder; nothing on Hostinger | `connect/SKILL.md` Phases 0–1 | — | no |
|
|
60
|
-
| 1 | **refine** — discover what the user wants, in conversation | `steps/01-refine/SKILL.md` | `brief.md` | no |
|
|
61
58
|
| — | **connect** — sign in to Hostinger, check the connector's tools, get active plan | `connect/SKILL.md` Phases 2–5 → `connect/tools/<tool>.md` | `connect.json` | no |
|
|
62
|
-
|
|
|
59
|
+
| 1 | **check state** — where does this domain stand? resume / switch / start over | `steps/01-check-state/SKILL.md` | `state.json` | no |
|
|
60
|
+
| 2 | **refine** — discover what the user wants, in conversation | `steps/02-refine/SKILL.md` | `brief.md` | no |
|
|
63
61
|
| 3 | **provision** — choose the backend from the brief, then provision it | `steps/03-provision/<backend>/SKILL.md` | `site.json` | **bg** — fire, then wait at the join |
|
|
64
62
|
| 4 | **content model** — define + create content/images, then push to the backend | `steps/04-content-model/<backend>/SKILL.md` | `content-model.md` | prepare: no · **push: yes** |
|
|
65
63
|
| 5 | **design** — derive design directions from the brief, pick one, write the `design.md` contract + logo | `steps/05-design/SKILL.md` | `design.md`, `brand/` | no |
|
|
@@ -77,31 +75,28 @@ Every run starts the same way:
|
|
|
77
75
|
user (Node missing or too old).
|
|
78
76
|
2. **Start the run log** (see *Run log and build report*):
|
|
79
77
|
`node <skill>/run-log.mjs <domain> run-start --tool <tool> --model <model> --skill <skill version>`.
|
|
80
|
-
It
|
|
81
|
-
|
|
82
|
-
provision or content model). Don't ask the brief again then: it's agreed, and check-state resumes
|
|
83
|
-
where the run paused.
|
|
78
|
+
It opens connect's stage and prints `next: connect`, also for a run it continued after a clean
|
|
79
|
+
pause for a tool restart (*A restart pause continues the run*).
|
|
84
80
|
|
|
85
81
|
`run-start` also takes the domain's lock, so only one session builds a domain at a time. A
|
|
86
82
|
session that crashed or was closed doesn't block it. If `run-start` fails with "another session
|
|
87
83
|
(…) is building <domain>":
|
|
88
|
-
1. Stop: no
|
|
84
|
+
1. Stop: no connect, no files, and no final report, since this session started no run.
|
|
89
85
|
2. Tell the user plainly which tool is building this domain, since when and in which stage (the
|
|
90
86
|
message names all three), and that if they tell you to take over, you will, and the other
|
|
91
87
|
session stops at its next step.
|
|
92
88
|
3. Only if the user says so, run `run-start` again with `--take-over` and the same flags. With no
|
|
93
89
|
one to ask (`claude -p` or another unattended run), just stop and say why.
|
|
94
|
-
3. **
|
|
95
|
-
rest of the table. When
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
the brief exists. Validation before deploy, always — nothing reaches the live domain unseen.
|
|
90
|
+
3. **Connect** (`connect/SKILL.md`, Phase 2 onward), then **check-state**, then **refine**, then the
|
|
91
|
+
rest of the table. When provision sends the run back to refine, refine returns to provision.
|
|
92
|
+
|
|
93
|
+
**Why this order.** Connect first, so account/plan failures surface before the user spends time
|
|
94
|
+
talking, and so Hostinger knows about the run from its first minute: a run the user leaves during
|
|
95
|
+
the brief still sends its build report. Check-state right after, so a resumed, duplicate, or
|
|
96
|
+
brand-new run is sorted out — and the user is offered the choice to continue, switch domains, or
|
|
97
|
+
start over — before any new work begins. Refinement before provisioning, because the backend cannot
|
|
98
|
+
be chosen until the brief exists. Validation before deploy, always — nothing reaches the live domain
|
|
99
|
+
unseen.
|
|
105
100
|
|
|
106
101
|
**One concurrency rule:** two *independent* stages in a single session may run at once, but never
|
|
107
102
|
two writers of the same artifact, and never two agents/windows on the same domain — `run-start`'s
|
|
@@ -129,15 +124,18 @@ alone, with no final report and no build report.
|
|
|
129
124
|
`run-log.mjs next <stage>` at each boundary — and log an event the moment something goes wrong, the user
|
|
130
125
|
corrects you, or a skill is missing or wrong — before you continue. See *Run log and build report*.
|
|
131
126
|
|
|
132
|
-
### The first message:
|
|
127
|
+
### The first message: only the connection
|
|
128
|
+
|
|
129
|
+
Your first message to the user is about the Hostinger connection and nothing else: connect's sign-in
|
|
130
|
+
link when it needs one (`awaiting_user`), then one line saying you're connected to Hostinger, with the
|
|
131
|
+
account's plan when you know it. Don't ask anything about the site, don't mention build reports, and
|
|
132
|
+
add nothing else. Get ready and `run-start` happen silently before it, with no line about Node, the
|
|
133
|
+
skill folder or the run log. Then go straight on to check-state without waiting for a reply. "What
|
|
134
|
+
do you want to build?" comes later, from refine, as its own short message.
|
|
133
135
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
pasted prompt already says about the site is refine input. Two things come before it, and only when
|
|
138
|
-
they apply: Node missing or too old (get ready needs the user), and a prompt with no domain (then
|
|
139
|
-
the first message asks for it; see *The domain parameter*). A run that `run-start` continued goes
|
|
140
|
-
straight to connect, which has its own message.
|
|
136
|
+
Anything the pasted prompt already says about the site stays as refine input. Two things come before
|
|
137
|
+
the connection, and only when they apply: Node missing or too old (get ready needs the user), and a
|
|
138
|
+
prompt with no domain (then the first message asks for it; see *The domain parameter*).
|
|
141
139
|
|
|
142
140
|
### When you ask the user
|
|
143
141
|
|
|
@@ -305,8 +303,8 @@ took from it.
|
|
|
305
303
|
|---|---|---|
|
|
306
304
|
| `state.json` | every stage | tool, next stage, Hostinger connector version, timestamps |
|
|
307
305
|
| `run-log.json` | `run-log.mjs` only | the current run, each stage's start and end times, which reports reached Hostinger |
|
|
308
|
-
| `brief.md` | refine | refined brief, audience, tone, pages, must-haves, image source |
|
|
309
306
|
| `connect.json` | connect | tool, MCP version, sign-in method, plan; shape in `connect/SKILL.md` |
|
|
307
|
+
| `brief.md` | refine | refined brief, audience, tone, pages, must-haves, image source |
|
|
310
308
|
| `site.json` | provision | chosen backend, username, install id, all URLs |
|
|
311
309
|
| `content-model.md` | content model | entities, fields, pages, navigation |
|
|
312
310
|
| `content.json` | content model (WordPress) | the drafted content `push-content.mjs` pushes |
|
|
@@ -411,7 +409,7 @@ is `connect`, `provision` or `content_model` and that paused, instead of closing
|
|
|
411
409
|
and opens connect. A run whose session crashed or was taken over is closed as `abandoned`.
|
|
412
410
|
|
|
413
411
|
`stage-end` results: `ok`, `ok_after_retries`, `ok_with_fixups`, `failed`, `skipped`, `stopped`.
|
|
414
|
-
Stages, in run order: `
|
|
412
|
+
Stages, in run order: `connect`, `check_state`, `refine`, `provision`, `content_model`, `design`,
|
|
415
413
|
`frontend`, `validate`, `deploy`, `done`. Get ready runs before the log starts and isn't logged.
|
|
416
414
|
Split stages use `--phase`: provision `fire` / `join`, content model `prepare` / `push`, frontend
|
|
417
415
|
`shell` / `data`.
|
package/skills/headless/VERSION
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
version=4.
|
|
2
|
-
commit=
|
|
3
|
-
built=2026-11-
|
|
1
|
+
version=4.21.0
|
|
2
|
+
commit=3dbb11b96745
|
|
3
|
+
built=2026-11-25
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hostinger-headless-connect
|
|
3
|
-
description: "Connect step for the Hostinger Headless flow, in
|
|
3
|
+
description: "Connect step for the Hostinger Headless flow, first in every run and before any question about the site: verify Node, find or install the skill folder, run the bootstrap (reach the Hostinger MCP server + OAuth sign-in), then route to the matching coding-tool skill under tools/ so the MCP tools are available before check-state. Triggers: connect to Hostinger, set up the Hostinger connector, start a headless build."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Hostinger Headless Skill — connect
|
|
7
7
|
|
|
8
|
-
You are a coding agent, and this is a skill for you to execute. Follow the phases below in order
|
|
9
|
-
in
|
|
8
|
+
You are a coding agent, and this is a skill for you to execute. Follow the phases below in order.
|
|
9
|
+
This skill runs first in every run, before any question about the site, in two parts with
|
|
10
|
+
`run-start` in between (see *Start of a run* in `<skill>/SKILL.md`):
|
|
10
11
|
|
|
11
|
-
- **Get ready** (Phases 0–1)
|
|
12
|
-
|
|
13
|
-
- **Connect** (Phases 2–5)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
The user talks about their site before any setup they'd have to watch (see *Start of a run* in
|
|
17
|
-
`<skill>/SKILL.md`).
|
|
12
|
+
- **Get ready** (Phases 0–1), before any message to the user, touches nothing on Hostinger: Node and
|
|
13
|
+
the skill folder.
|
|
14
|
+
- **Connect** (Phases 2–5): the Hostinger sign-in, the connector's tools and `connect.json`, then
|
|
15
|
+
check-state.
|
|
18
16
|
|
|
19
17
|
This skill goal is to help you to connect to Hostinger via MCP. That can be done via Hostinger Connector or adding the MCP via MCP Server.
|
|
20
18
|
|
|
@@ -79,14 +77,11 @@ directory is. A new release installs into its own folder, so a run never uses a
|
|
|
79
77
|
Read `<skill>/VERSION`: its line 1 is the skills version this run uses, which goes into
|
|
80
78
|
`connect.json` (Phase 4).
|
|
81
79
|
|
|
82
|
-
That's get ready. Go back to *Start of a run* in `<skill>/SKILL.md
|
|
83
|
-
|
|
80
|
+
That's get ready. Go back to *Start of a run* in `<skill>/SKILL.md` for `run-start`, which opens
|
|
81
|
+
connect's stage in the run log, then pick up at Phase 2.
|
|
84
82
|
|
|
85
83
|
## Phase 2 — Sign in: run the bootstrap (deterministic)
|
|
86
84
|
|
|
87
|
-
Start connect's stage in the run log: `node <skill>/run-log.mjs <domain> next connect` (it ends
|
|
88
|
-
refine's, and does nothing when `run-start` continued a run already in connect).
|
|
89
|
-
|
|
90
85
|
Phases 2–4 run without status lines. The user sees only the sign-in link when this phase needs one,
|
|
91
86
|
a failure's `detail` if one stops connect, and then Phase 5's one connected line (or, instead, the
|
|
92
87
|
restart request).
|
|
@@ -156,10 +151,10 @@ Check each group on its own, right here at connect, before anything else:
|
|
|
156
151
|
|
|
157
152
|
Only when **both** pass are the Hostinger tools "in this session". If either is missing, register the
|
|
158
153
|
missing server(s) now (*register, restart, resume* below), even though other Hostinger tools respond.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
154
|
+
Pause for a restart when the hosting group is missing, or when the ecommerce group is missing and a
|
|
155
|
+
`brief.md` already in the workspace (a continued or resumed build) names an Ecommerce backend.
|
|
156
|
+
Otherwise register the missing ecommerce group and carry on without a restart: a new run has no
|
|
157
|
+
brief yet, and `steps/03-provision/ecommerce/SKILL.md` pauses for it if refine picks Ecommerce.
|
|
163
158
|
|
|
164
159
|
### When the Hostinger tools aren't in this session: register, restart, resume
|
|
165
160
|
|
|
@@ -170,18 +165,18 @@ until the tool restarts. When either tool group above is missing:
|
|
|
170
165
|
(`<command> <launcher>`) if the hosting group is missing, and `hostinger-ecommerce`
|
|
171
166
|
(`<command> <launcher> hostinger-ecommerce-mcp`) if the ecommerce group is missing.
|
|
172
167
|
Skip a server that is already registered under its name. When neither group is there, register
|
|
173
|
-
both
|
|
174
|
-
2. **Write `connect.json`** (Phase 4) before you stop. The skill folder from Phase 1 and
|
|
175
|
-
stay in place, so the next run starts from them.
|
|
176
|
-
3. **Pause and end your turn.** Send one line
|
|
177
|
-
asking the user to restart the tool (the route says how)
|
|
178
|
-
build continues from there. Leave the current stage open
|
|
179
|
-
or content model's when they pause here), and run
|
|
168
|
+
both: one restart then covers every backend.
|
|
169
|
+
2. **Write `connect.json`** (Phase 4) before you stop. The skill folder from Phase 1 and the
|
|
170
|
+
workspace stay in place, so the next run starts from them.
|
|
171
|
+
3. **Pause and end your turn.** Send one line (at connect, after the sign-in link when one was
|
|
172
|
+
needed) saying Hostinger is set up and asking the user to restart the tool (the route says how)
|
|
173
|
+
and paste the same prompt again so the build continues from there. Leave the current stage open
|
|
174
|
+
in the run log (connect's, or provision's or content model's when they pause here), and run
|
|
180
175
|
`node <skill>/run-log.mjs <domain> pause`, which releases the domain for the next session: this
|
|
181
176
|
session ends here. This is a pause, not a run ending: no final report and no build report.
|
|
182
177
|
4. **On the next run** `run-start` continues this run at connect (*Start of a run* in
|
|
183
|
-
`<skill>/SKILL.md`)
|
|
184
|
-
|
|
178
|
+
`<skill>/SKILL.md`). Connect finds the tools loaded, skips registration, and the run goes on to
|
|
179
|
+
check-state, which resumes where the run paused, so a brief already agreed isn't asked again.
|
|
185
180
|
|
|
186
181
|
If a tool loads new servers without a restart (VS Code), use them right away and skip steps 3–4. Skip
|
|
187
182
|
them too when the only missing group is one this build doesn't need (above).
|
|
@@ -255,10 +250,8 @@ Extra keys are allowed, but keep these seven as above: the build report reads `t
|
|
|
255
250
|
## Phase 5 - Continue to check-state
|
|
256
251
|
|
|
257
252
|
Once everything is verified and you have the Hostinger MCP Server, tell the user in one line that
|
|
258
|
-
you're connected to Hostinger,
|
|
259
|
-
|
|
260
|
-
repeat the plan. Then go back to `<skill>/SKILL.md` and continue with check-state without waiting for
|
|
261
|
-
a reply. Refine already ran, so don't start the flow over.
|
|
253
|
+
you're connected to Hostinger, as *The first message* in `<skill>/SKILL.md` describes. Then go back
|
|
254
|
+
to `<skill>/SKILL.md` and continue with check-state without waiting for a reply.
|
|
262
255
|
|
|
263
256
|
|
|
264
257
|
## Reference Sources
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"type": "object",
|
|
63
63
|
"required": ["stage", "started_at", "ended_at", "result"],
|
|
64
64
|
"properties": {
|
|
65
|
-
"stage": { "type": "string", "enum": ["
|
|
65
|
+
"stage": { "type": "string", "enum": ["connect", "check_state", "refine", "provision", "content_model", "design", "frontend", "validate", "deploy", "done"] },
|
|
66
66
|
"phase": { "type": ["string", "null"] },
|
|
67
67
|
"started_at": { "type": "string" },
|
|
68
68
|
"ended_at": { "type": ["string", "null"] },
|
|
@@ -23,7 +23,7 @@ import { processName, processTable } from './processes.mjs';
|
|
|
23
23
|
import { describeServer, isDown, serversSince, stopServers } from './servers.mjs';
|
|
24
24
|
import { now, workspaceDir, writeJsonAtomic } from './workspace.mjs';
|
|
25
25
|
|
|
26
|
-
const STAGES = ['
|
|
26
|
+
const STAGES = ['connect', 'check_state', 'refine', 'provision', 'content_model', 'design', 'frontend', 'validate', 'deploy', 'done'];
|
|
27
27
|
// Stages that stop for the user to restart their tool, so it loads a newly registered Hostinger MCP server.
|
|
28
28
|
const RESTART_STAGES = ['connect', 'provision', 'content_model'];
|
|
29
29
|
const PAUSE_NOTE = 'paused for a tool restart';
|
|
@@ -322,9 +322,9 @@ async function runStart(ws, flags, lockWasFree) {
|
|
|
322
322
|
skill: flags.skill ?? previous.skill ?? null,
|
|
323
323
|
};
|
|
324
324
|
fresh.history ??= [];
|
|
325
|
-
fresh.history.push({ run: id, stage: '
|
|
325
|
+
fresh.history.push({ run: id, stage: 'connect', phase: null, started_at: startedAt, ended_at: null, result: null, note: null });
|
|
326
326
|
saveLog(ws, fresh);
|
|
327
|
-
console.log(`run ${fresh.run.id} started; next:
|
|
327
|
+
console.log(`run ${fresh.run.id} started; next: connect`);
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
function runUpdate(ws, flags) {
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: headless-step-check-state
|
|
3
|
-
description: "
|
|
3
|
+
description: "First build step of the Hostinger Headless flow, run right after connect. Works out where a given domain's build stands — is a run already in progress, does the site already exist, how far did it get — by reconciling the global workspace state under ~/.hostinger/<domain>/ with what the Hostinger connector reports, then guides the user to continue, switch or buy a domain, or start over. Owns all resume/position logic for the flow."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# headless-step-check-state
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
right after connect.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
all resume/position logic — no other stage second-guesses it.
|
|
8
|
+
The first build step of the Hostinger Headless flow (orchestrated by `hostinger.com/headless/skill.md`),
|
|
9
|
+
run right after connect. Connect has already connected the Hostinger connector and confirmed the
|
|
10
|
+
account can build. Your job here is to
|
|
11
|
+
**figure out where this domain stands and agree the route with the user** before any new work begins.
|
|
12
|
+
This step owns all resume/position logic — no other stage second-guesses it.
|
|
14
13
|
|
|
15
14
|
Nothing in this step creates, provisions, deploys, or deletes anything. It reads and guides. Its
|
|
16
15
|
only writes to Hostinger are unsent build reports (Step 0) and the tool-connected event (Step 3).
|
|
@@ -22,7 +21,7 @@ Everything for this domain lives in its global workspace `~/.hostinger/<domain>/
|
|
|
22
21
|
|
|
23
22
|
## Step 0 — Log the stage, send unsent reports
|
|
24
23
|
|
|
25
|
-
The run log started before
|
|
24
|
+
The run log started before connect (*Start of a run* in the top-level `SKILL.md`). Before anything
|
|
26
25
|
else, end connect's stage, start this one and list the reports still to send:
|
|
27
26
|
|
|
28
27
|
```bash
|
|
@@ -60,9 +59,9 @@ this session. What's left is the platform, and **never guess from a timestamp.**
|
|
|
60
59
|
|
|
61
60
|
## Step 2 — Read the workspace directory
|
|
62
61
|
|
|
63
|
-
Open `~/.hostinger/<domain>/` by its exact path, not by listing `~/.hostinger
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
Open `~/.hostinger/<domain>/` by its exact path, not by listing `~/.hostinger/` (`run-start` created
|
|
63
|
+
it): read `state.json` (its `stage`) and whatever artifacts exist (`brief.md`, `site.json`, …).
|
|
64
|
+
Treat these as a hint, not the truth.
|
|
66
65
|
|
|
67
66
|
---
|
|
68
67
|
|
|
@@ -93,18 +92,14 @@ Query the Hostinger connector — the local files are never trusted on their own
|
|
|
93
92
|
ownership: "all" }` returns **no** `/cms` row, `hosting_pocketbase_backend { username, domain }`
|
|
94
93
|
returns 404 or `state: "missing"` (the same test provision uses), and there is no `site.json`
|
|
95
94
|
recording a backend. It is a **new build** that
|
|
96
|
-
happens to already own its website, not a finished or resumable one. Route it to **
|
|
97
|
-
|
|
98
|
-
before swapping). Never create a second site, and never skip provision for it.
|
|
99
|
-
`headless_pocketbase` is **not** an empty shell: onboarding chose PocketBase, so
|
|
100
|
-
fixed as **PocketBase** and provision creates the backend if it isn't there yet
|
|
95
|
+
happens to already own its website, not a finished or resumable one. Route it to **refine** (choose
|
|
96
|
+
the backend), then **provision** adopts the shell and swaps it to that backend (provision's subfolder
|
|
97
|
+
repeats this check before swapping). Never create a second site, and never skip provision for it.
|
|
98
|
+
`headless_pocketbase` is **not** an empty shell: onboarding chose PocketBase, so refine keeps the
|
|
99
|
+
backend fixed as **PocketBase** and provision creates the backend if it isn't there yet
|
|
101
100
|
(`hosting_pocketbase_backend` → 404 or state `missing` means not yet). After 24 h the setup row is
|
|
102
|
-
gone and the public API can't tell such a site with no backend from an empty shell;
|
|
103
|
-
|
|
104
|
-
- **Does the brief fit what's there?** Refine ran before the connection, so it chose the backend
|
|
105
|
-
from the conversation alone. When the site already fixes the backend (an onboarding PocketBase
|
|
106
|
-
site, or a site with a real backend) and `brief.md`'s **Suggested backend** names another, the site
|
|
107
|
-
wins: Step 5 sends the run back to refine.
|
|
101
|
+
gone and the public API can't tell such a site with no backend from an empty shell; refine then
|
|
102
|
+
decides the backend as for any empty shell.
|
|
108
103
|
- **A `site.json → backend: "webapp"`** is from an older flow that built a plain Node.js host, which
|
|
109
104
|
this version no longer does. Tell the user in one line and point them at the `deploy-to-hosting`
|
|
110
105
|
skill for that app; don't resume it as a headless build.
|
|
@@ -116,16 +111,15 @@ corrected.
|
|
|
116
111
|
|
|
117
112
|
## Step 4 — Determine the position
|
|
118
113
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
artifacts** (`site.json`, `design.md`, `content-model.md`, `src/`, …).
|
|
114
|
+
**"Local state: none" here means no build artifacts yet** (`brief.md`, `site.json`, `design.md`,
|
|
115
|
+
`content-model.md`, `src/`, …). `connect.json`, the run log and `state.json` don't count.
|
|
122
116
|
|
|
123
117
|
| Local state | Reality (domain) | Position |
|
|
124
118
|
|---|---|---|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
119
|
+
| none (connect only) | free | **new build** — start from refine |
|
|
120
|
+
| none (connect only) | empty headless shell (onboarding) | **new build on an existing shell** — start from refine; provision adopts the shell and swaps it to the chosen backend. Never create a second site, never skip provision |
|
|
121
|
+
| none (connect only) | onboarding PocketBase site (setup `type` `headless_pocketbase`) | **new build on an existing PocketBase site** — start from refine with the backend fixed as PocketBase; provision creates the backend if it isn't there yet. Not something to resume, even when the backend already exists: nothing has been built on it |
|
|
122
|
+
| none (connect only) | site exists with a real backend | **adopt / resume** — never create a second site; route to the first unfinished stage |
|
|
129
123
|
| build artifacts present, incomplete | matches | **resume** at `state.json`'s `stage` |
|
|
130
124
|
| build artifacts present | disagrees | **reality wins** — recompute the stage from what actually exists |
|
|
131
125
|
| build artifacts present, all done | live site exists | **finished** — this is now an *iterate* request, not a build |
|
|
@@ -135,26 +129,19 @@ artifacts** (`site.json`, `design.md`, `content-model.md`, `src/`, …).
|
|
|
135
129
|
## Step 5 — Guide the user
|
|
136
130
|
|
|
137
131
|
The question to ask depends on whether there is actually **something to resume** — i.e. **build
|
|
138
|
-
artifacts**
|
|
139
|
-
something to resume.
|
|
132
|
+
artifacts** (`brief.md`, `site.json`, …) or a **live site** for this domain. Connect's files are
|
|
133
|
+
*not* something to resume.
|
|
140
134
|
|
|
141
135
|
- **A run paused in provision or content model for a tool restart** (`run-start` printed "continued
|
|
142
136
|
after a tool restart in <stage>/<phase>") → resume at that stage and phase without asking: the user only
|
|
143
137
|
restarted their tool (`run-start` continues a run only after a clean `pause`). What Steps 1–3
|
|
144
138
|
found still corrects the stage. A run paused in connect has nothing to resume yet: the cases below apply.
|
|
145
|
-
- **New build** (
|
|
146
|
-
shell or a PocketBase site from onboarding) → just proceed to
|
|
147
|
-
start over** — there's nothing to resume; both would land in the same place. An empty headless
|
|
139
|
+
- **New build** (no build artifacts and either the domain is free **or** it holds only an empty
|
|
140
|
+
headless shell or a PocketBase site from onboarding) → just proceed to refine. **Don't ask resume
|
|
141
|
+
vs start over** — there's nothing to resume; both would land in the same place. An empty headless
|
|
148
142
|
shell is not "something to resume": it has no backend and no content yet, so it's a fresh build
|
|
149
143
|
that already owns its website — provision will adopt and swap it. Mention it in one line ("Using
|
|
150
144
|
the headless site onboarding already created for this domain.").
|
|
151
|
-
- **The brief named another backend than the site fixes** (Step 3) → send the run back to refine
|
|
152
|
-
with that backend fixed (`next refine`; refine Step 1, *A fixed backend*). Refine re-confirms the
|
|
153
|
-
plan with the user in one message and writes the brief, then the run returns here and lands in
|
|
154
|
-
one of the other cases.
|
|
155
|
-
- **A live site with a real backend, and a brief only** (built from another machine, so there was no
|
|
156
|
-
workspace) → say what's live and offer **resume** or **iterate**, as below. Treat the brief as what
|
|
157
|
-
the user is asking for.
|
|
158
145
|
- **Something to resume** (build artifacts exist, or a site exists for the domain **with a real backend
|
|
159
146
|
installed** — WordPress at `/cms`, a store, a PocketBase backend with build artifacts, or a deployed app) → tell the user plainly what's there
|
|
160
147
|
and **ask them to choose**, regardless of how old it is (don't guess from timestamps):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: headless-step-refine
|
|
3
|
-
description: "Step
|
|
3
|
+
description: "Step 2 (refine) of the Hostinger Headless flow. Turns the user's seed — often just a domain — into a brief through conversation: asks what they want to build (purpose, audience, tone, pages, products, must-haves; images, local files, links all welcome), then *infers* the backend that fits (WordPress, Ecommerce, WordPress + Ecommerce, WordPress + WooCommerce for a one-site content+store, or PocketBase for a custom app/SPA or any site whose visitors create its data: accounts, bookings, comments, votes, order requests) — it never asks the user to pick a backend or a technology; it asks for the site name (suggesting a few when the user has none), the user confirms the plan (and the image source) in plain language, and only after their yes it writes brief.md. Hostinger Ecommerce stays the default for selling; WooCommerce is chosen only when the user explicitly asks for it or wants content and a store on one WordPress site."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# headless-step-refine
|
|
@@ -28,45 +28,31 @@ question tool is not the user passing on a question; see *When you ask the user*
|
|
|
28
28
|
**In:** the domain (the workspace directory name), plus anything the user already shared.
|
|
29
29
|
**Out:** `~/.hostinger/<domain>/brief.md`.
|
|
30
30
|
|
|
31
|
-
Nothing in this step touches Hostinger.
|
|
32
|
-
|
|
33
|
-
against Hostinger afterwards and sends the run back here when the site fixes the backend. Refine is
|
|
34
|
-
the only writer of `brief.md`. It only asks, decides and writes.
|
|
31
|
+
Nothing in this step touches Hostinger. Refine is the only writer of `brief.md`. It only asks,
|
|
32
|
+
decides and writes.
|
|
35
33
|
|
|
36
34
|
---
|
|
37
35
|
|
|
38
36
|
## Step 1 — Read the workspace, then the resume check
|
|
39
37
|
|
|
40
|
-
Read everything already in `~/.hostinger/<domain>/` (`state.json`, any notes, images
|
|
41
|
-
user dropped there) — it all counts as input.
|
|
42
|
-
|
|
43
|
-
If `brief.md` already exists for this domain, **don't overwrite it
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- **The site is already provisioned** (`site.json` exists). Explain that switching backends means a
|
|
60
|
-
new domain.
|
|
61
|
-
- **Check-state sent you back because the site fixes it** (an onboarding PocketBase site, or a live
|
|
62
|
-
site with a real backend). Re-decide
|
|
63
|
-
what follows from that backend (Step 4's rendering, the Step 5 images line), then go to Step 5: its
|
|
64
|
-
message opens by saying the site already runs on that backend and what changes for the user. When
|
|
65
|
-
the plan needs what that backend can't do (checkout, a CMS the owner writes in), say so in the same
|
|
66
|
-
message and offer to build on another domain instead.
|
|
67
|
-
|
|
68
|
-
A `brief.md` whose Suggested backend is **Webapp** is from an older flow: re-decide it in Step 4 (it
|
|
69
|
-
becomes **PocketBase**, or the user is pointed at the `deploy-to-hosting` skill).
|
|
38
|
+
Read everything already in `~/.hostinger/<domain>/` (`state.json`, `connect.json`, any notes, images
|
|
39
|
+
or files the user dropped there) — it all counts as input.
|
|
40
|
+
|
|
41
|
+
If `brief.md` already exists for this domain, **don't overwrite it**. Show the user a three-line
|
|
42
|
+
summary (what the site is, its pages, the suggested backend) and ask: *keep it, or change something?*
|
|
43
|
+
Keep → go to Step 6, unless the brief has no **Site name** or **Images** section: then ask what's
|
|
44
|
+
missing first (Round 1 question 4, or the Step 5 images line) and add it. Change → edit only what
|
|
45
|
+
they asked for, then re-confirm (Step 5). A skipped tool result is not Keep; see *When you ask the
|
|
46
|
+
user* in the top-level `SKILL.md`.
|
|
47
|
+
|
|
48
|
+
If the site is already provisioned (`site.json` exists), the backend is **fixed** — never change the
|
|
49
|
+
Suggested backend on a provisioned site. Explain that switching backends means a new domain. The same
|
|
50
|
+
holds when check-state found an onboarding site of setup type `headless_pocketbase`: onboarding has
|
|
51
|
+
already chosen PocketBase, so the backend is **PocketBase**, and when check-state found a live site
|
|
52
|
+
with a real backend (WordPress at `/cms`, a store, a PocketBase backend): keep that backend. Refine
|
|
53
|
+
still finds out what to build, but never picks another backend for that domain. A `brief.md` whose Suggested backend is **Webapp** is
|
|
54
|
+
from an older flow: re-decide it in Step 4 (it becomes **PocketBase**, or the user is pointed at the
|
|
55
|
+
`deploy-to-hosting` skill).
|
|
70
56
|
|
|
71
57
|
## Step 2 — Gather what you already have
|
|
72
58
|
|
|
@@ -96,8 +82,7 @@ If Step 2 already answers the Round 1 questions, skip the Round 1–3 questions
|
|
|
96
82
|
open with one line and **wait for the user's answer**: *"Tell me what you want to build — a
|
|
97
83
|
sentence is enough. Links, screenshots or files help too. Skip anything you don't want to answer."*
|
|
98
84
|
|
|
99
|
-
The opener is
|
|
100
|
-
before any Hostinger setup. Of the rounds it asks Round 1 only (plus the
|
|
85
|
+
The opener is its own message, sent after check-state. Of the rounds it asks Round 1 only (plus the
|
|
101
86
|
Build mode and Existing project confirms above, when they apply). Never fold Round 2 or 3 into it
|
|
102
87
|
(audience, pages, look, content or logo), not even as a numbered list under the opening question.
|
|
103
88
|
|
|
@@ -305,9 +290,7 @@ and note it in the brief.
|
|
|
305
290
|
Write `brief.md` from the template below. Fill every section from the conversation, defaulting what
|
|
306
291
|
the user skipped and tagging it `(assumed)`; leave out **Products** when nothing is sold and
|
|
307
292
|
**Existing project** unless Step 2 found a project in the folder. Use the user's own words where you
|
|
308
|
-
can. Then set `state.json` → `stage` to
|
|
309
|
-
after refine (`connect` on the first pass, else the stage that sent the run back here), with a fresh
|
|
310
|
-
`updated_at`, and go on to it.
|
|
293
|
+
can. Then set `state.json` → `stage` to `provision`, with a fresh `updated_at`.
|
|
311
294
|
|
|
312
295
|
The **Suggested backend** section is the contract with `03-provision/SKILL.md`, which routes on it.
|
|
313
296
|
Its first line must be exactly one of `**WordPress**`, `**Ecommerce**`, `**WordPress + Ecommerce**`,
|
|
@@ -18,16 +18,18 @@ Provision a **Hostinger Ecommerce** backend for `<domain>` and prove it is ready
|
|
|
18
18
|
> ## ⚠️ Prerequisite: the `hostinger-ecommerce` MCP server must be connected
|
|
19
19
|
> Store management is **not** in the `hosting`/`wordpress` MCP groups — it's the separate
|
|
20
20
|
> **`hostinger-ecommerce`** group (`ecommerce_*` ops, OAuth-backed, no API token needed). Connect
|
|
21
|
-
> registers it
|
|
22
|
-
>
|
|
21
|
+
> registers it when it's missing, but runs before refine, so on a new run it doesn't restart for it:
|
|
22
|
+
> here the server is often registered but its tools aren't loaded yet. If the ecommerce search finds
|
|
23
|
+
> nothing, check the registration as connect Phase 3 does and register it only if it isn't there. The
|
|
23
24
|
> command for each tool is in its `connect/tools/<tool>.md`; for Claude Code:
|
|
24
25
|
> ```bash
|
|
25
26
|
> claude mcp add hostinger-ecommerce --scope user -- "<command>" "<launcher>" hostinger-ecommerce-mcp
|
|
26
27
|
> ```
|
|
27
|
-
> (Or enable the **Ecommerce** MCP in the Hostinger Connector.)
|
|
28
|
-
> after a restart, so pause the run with *register, restart, resume* from
|
|
29
|
-
> state, ask the user to restart the tool and paste the same prompt, and end
|
|
30
|
-
> resumes at the stage that paused. Never spawn the server yourself or
|
|
28
|
+
> (Or enable the **Ecommerce** MCP in the Hostinger Connector.) Either way, already registered or just
|
|
29
|
+
> added, its tools only load after a restart, so pause the run with *register, restart, resume* from
|
|
30
|
+
> `connect/SKILL.md`: save state, ask the user to restart the tool and paste the same prompt, and end
|
|
31
|
+
> your turn. Check-state then resumes at the stage that paused. Never spawn the server yourself or
|
|
32
|
+
> write a JSON-RPC client to reach it.
|
|
31
33
|
>
|
|
32
34
|
> Verify the tools work in-session with a search — e.g. "list stores" →
|
|
33
35
|
> `ecommerce_stores_list` — before proceeding.
|